diff --git a/.gitignore b/.gitignore index 5b190012..a00551bc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ /target *.db* -/static/node_modules -/static/dist +/web/static/node_modules +/web/static/dist diff --git a/src/endpoints/vehicle_assignment/mod.rs b/src/endpoints/vehicle_assignment/mod.rs deleted file mode 100644 index 07dc54c2..00000000 --- a/src/endpoints/vehicle_assignment/mod.rs +++ /dev/null @@ -1 +0,0 @@ -mod post_new; diff --git a/src/endpoints/vehicle_assignment/post_new.rs b/src/endpoints/vehicle_assignment/post_new.rs deleted file mode 100644 index 3f7675de..00000000 --- a/src/endpoints/vehicle_assignment/post_new.rs +++ /dev/null @@ -1,36 +0,0 @@ -use actix_web::{web, HttpResponse, Responder}; -use sqlx::PgPool; - -use crate::{models::{Event, Role, User, Vehicle}, utils::ApplicationError}; - -pub struct VehicleAssignmentQuery { - event: i32, - vehicle: i32 -} - -#[actix_web::post("/vehicle-assignment")] -pub async fn post_new( - user: web::ReqData, - pool: web::Data, - query: web::Query -) -> Result { - let Some(event) = Event::read_by_id_including_location(pool.get_ref(), query.event).await? - else { - return Ok(HttpResponse::NotFound().finish()); - }; - - let user_is_admin_or_area_manager_of_event_area = user.role == Role::Admin - || (user.role == Role::AreaManager - && user.area_id == event.location.as_ref().unwrap().area_id); - - if !user_is_admin_or_area_manager_of_event_area { - return Err(ApplicationError::Unauthorized); - } - - let Some(vehicle) = Vehicle::read(pool.get_ref(), query.vehicle).await? else { - return Ok(HttpResponse::NotFound().finish()); - }; - - - -} diff --git a/web/static/dist/brass.jpeg b/web/static/dist/brass.jpeg deleted file mode 100644 index 791ffb2a..00000000 Binary files a/web/static/dist/brass.jpeg and /dev/null differ diff --git a/web/static/dist/feather-sprite.svg b/web/static/dist/feather-sprite.svg deleted file mode 100644 index b66f76f3..00000000 --- a/web/static/dist/feather-sprite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/static/dist/htmx.min.js b/web/static/dist/htmx.min.js deleted file mode 100644 index de5f0f1a..00000000 --- a/web/static/dist/htmx.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(e,t){if(typeof define==="function"&&define.amd){define([],t)}else if(typeof module==="object"&&module.exports){module.exports=t()}else{e.htmx=e.htmx||t()}})(typeof self!=="undefined"?self:this,function(){return function(){"use strict";var Q={onLoad:F,process:zt,on:de,off:ge,trigger:ce,ajax:Nr,find:C,findAll:f,closest:v,values:function(e,t){var r=dr(e,t||"post");return r.values},remove:_,addClass:z,removeClass:n,toggleClass:$,takeClass:W,defineExtension:Ur,removeExtension:Br,logAll:V,logNone:j,logger:null,config:{historyEnabled:true,historyCacheSize:10,refreshOnHistoryMiss:false,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:true,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:true,allowScriptTags:true,inlineScriptNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:false,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",useTemplateFragments:false,scrollBehavior:"smooth",defaultFocusScroll:false,getCacheBusterParam:false,globalViewTransitions:false,methodsThatUseUrlParams:["get"],selfRequestsOnly:false,ignoreTitle:false,scrollIntoViewOnBoost:true,triggerSpecsCache:null},parseInterval:d,_:t,createEventSource:function(e){return new EventSource(e,{withCredentials:true})},createWebSocket:function(e){var t=new WebSocket(e,[]);t.binaryType=Q.config.wsBinaryType;return t},version:"1.9.12"};var r={addTriggerHandler:Lt,bodyContains:se,canAccessLocalStorage:U,findThisElement:xe,filterValues:yr,hasAttribute:o,getAttributeValue:te,getClosestAttributeValue:ne,getClosestMatch:c,getExpressionVars:Hr,getHeaders:xr,getInputValues:dr,getInternalData:ae,getSwapSpecification:wr,getTriggerSpecs:it,getTarget:ye,makeFragment:l,mergeObjects:le,makeSettleInfo:T,oobSwap:Ee,querySelectorExt:ue,selectAndSwap:je,settleImmediately:nr,shouldCancel:ut,triggerEvent:ce,triggerErrorEvent:fe,withExtensions:R};var w=["get","post","put","delete","patch"];var i=w.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");var S=e("head"),q=e("title"),H=e("svg",true);function e(e,t){return new RegExp("<"+e+"(\\s[^>]*>|>)([\\s\\S]*?)<\\/"+e+">",!!t?"gim":"im")}function d(e){if(e==undefined){return undefined}let t=NaN;if(e.slice(-2)=="ms"){t=parseFloat(e.slice(0,-2))}else if(e.slice(-1)=="s"){t=parseFloat(e.slice(0,-1))*1e3}else if(e.slice(-1)=="m"){t=parseFloat(e.slice(0,-1))*1e3*60}else{t=parseFloat(e)}return isNaN(t)?undefined:t}function ee(e,t){return e.getAttribute&&e.getAttribute(t)}function o(e,t){return e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function te(e,t){return ee(e,t)||ee(e,"data-"+t)}function u(e){return e.parentElement}function re(){return document}function c(e,t){while(e&&!t(e)){e=u(e)}return e?e:null}function L(e,t,r){var n=te(t,r);var i=te(t,"hx-disinherit");if(e!==t&&i&&(i==="*"||i.split(" ").indexOf(r)>=0)){return"unset"}else{return n}}function ne(t,r){var n=null;c(t,function(e){return n=L(t,e,r)});if(n!=="unset"){return n}}function h(e,t){var r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return r&&r.call(e,t)}function A(e){var t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;var r=t.exec(e);if(r){return r[1].toLowerCase()}else{return""}}function s(e,t){var r=new DOMParser;var n=r.parseFromString(e,"text/html");var i=n.body;while(t>0){t--;i=i.firstChild}if(i==null){i=re().createDocumentFragment()}return i}function N(e){return/",0);var a=i.querySelector("template").content;if(Q.config.allowScriptTags){oe(a.querySelectorAll("script"),function(e){if(Q.config.inlineScriptNonce){e.nonce=Q.config.inlineScriptNonce}e.htmxExecuted=navigator.userAgent.indexOf("Firefox")===-1})}else{oe(a.querySelectorAll("script"),function(e){_(e)})}return a}switch(r){case"thead":case"tbody":case"tfoot":case"colgroup":case"caption":return s(""+n+"
",1);case"col":return s(""+n+"
",2);case"tr":return s(""+n+"
",2);case"td":case"th":return s(""+n+"
",3);case"script":case"style":return s("
"+n+"
",1);default:return s(n,0)}}function ie(e){if(e){e()}}function I(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function k(e){return I(e,"Function")}function P(e){return I(e,"Object")}function ae(e){var t="htmx-internal-data";var r=e[t];if(!r){r=e[t]={}}return r}function M(e){var t=[];if(e){for(var r=0;r=0}function se(e){if(e.getRootNode&&e.getRootNode()instanceof window.ShadowRoot){return re().body.contains(e.getRootNode().host)}else{return re().body.contains(e)}}function D(e){return e.trim().split(/\s+/)}function le(e,t){for(var r in t){if(t.hasOwnProperty(r)){e[r]=t[r]}}return e}function E(e){try{return JSON.parse(e)}catch(e){b(e);return null}}function U(){var e="htmx:localStorageTest";try{localStorage.setItem(e,e);localStorage.removeItem(e);return true}catch(e){return false}}function B(t){try{var e=new URL(t);if(e){t=e.pathname+e.search}if(!/^\/$/.test(t)){t=t.replace(/\/+$/,"")}return t}catch(e){return t}}function t(e){return Tr(re().body,function(){return eval(e)})}function F(t){var e=Q.on("htmx:load",function(e){t(e.detail.elt)});return e}function V(){Q.logger=function(e,t,r){if(console){console.log(t,e,r)}}}function j(){Q.logger=null}function C(e,t){if(t){return e.querySelector(t)}else{return C(re(),e)}}function f(e,t){if(t){return e.querySelectorAll(t)}else{return f(re(),e)}}function _(e,t){e=p(e);if(t){setTimeout(function(){_(e);e=null},t)}else{e.parentElement.removeChild(e)}}function z(e,t,r){e=p(e);if(r){setTimeout(function(){z(e,t);e=null},r)}else{e.classList&&e.classList.add(t)}}function n(e,t,r){e=p(e);if(r){setTimeout(function(){n(e,t);e=null},r)}else{if(e.classList){e.classList.remove(t);if(e.classList.length===0){e.removeAttribute("class")}}}}function $(e,t){e=p(e);e.classList.toggle(t)}function W(e,t){e=p(e);oe(e.parentElement.children,function(e){n(e,t)});z(e,t)}function v(e,t){e=p(e);if(e.closest){return e.closest(t)}else{do{if(e==null||h(e,t)){return e}}while(e=e&&u(e));return null}}function g(e,t){return e.substring(0,t.length)===t}function G(e,t){return e.substring(e.length-t.length)===t}function J(e){var t=e.trim();if(g(t,"<")&&G(t,"/>")){return t.substring(1,t.length-2)}else{return t}}function Z(e,t){if(t.indexOf("closest ")===0){return[v(e,J(t.substr(8)))]}else if(t.indexOf("find ")===0){return[C(e,J(t.substr(5)))]}else if(t==="next"){return[e.nextElementSibling]}else if(t.indexOf("next ")===0){return[K(e,J(t.substr(5)))]}else if(t==="previous"){return[e.previousElementSibling]}else if(t.indexOf("previous ")===0){return[Y(e,J(t.substr(9)))]}else if(t==="document"){return[document]}else if(t==="window"){return[window]}else if(t==="body"){return[document.body]}else{return re().querySelectorAll(J(t))}}var K=function(e,t){var r=re().querySelectorAll(t);for(var n=0;n=0;n--){var i=r[n];if(i.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_FOLLOWING){return i}}};function ue(e,t){if(t){return Z(e,t)[0]}else{return Z(re().body,e)[0]}}function p(e){if(I(e,"String")){return C(e)}else{return e}}function ve(e,t,r){if(k(t)){return{target:re().body,event:e,listener:t}}else{return{target:p(e),event:t,listener:r}}}function de(t,r,n){jr(function(){var e=ve(t,r,n);e.target.addEventListener(e.event,e.listener)});var e=k(r);return e?r:n}function ge(t,r,n){jr(function(){var e=ve(t,r,n);e.target.removeEventListener(e.event,e.listener)});return k(r)?r:n}var pe=re().createElement("output");function me(e,t){var r=ne(e,t);if(r){if(r==="this"){return[xe(e,t)]}else{var n=Z(e,r);if(n.length===0){b('The selector "'+r+'" on '+t+" returned no matches!");return[pe]}else{return n}}}}function xe(e,t){return c(e,function(e){return te(e,t)!=null})}function ye(e){var t=ne(e,"hx-target");if(t){if(t==="this"){return xe(e,"hx-target")}else{return ue(e,t)}}else{var r=ae(e);if(r.boosted){return re().body}else{return e}}}function be(e){var t=Q.config.attributesToSettle;for(var r=0;r0){o=e.substr(0,e.indexOf(":"));t=e.substr(e.indexOf(":")+1,e.length)}else{o=e}var r=re().querySelectorAll(t);if(r){oe(r,function(e){var t;var r=i.cloneNode(true);t=re().createDocumentFragment();t.appendChild(r);if(!Se(o,e)){t=r}var n={shouldSwap:true,target:e,fragment:t};if(!ce(e,"htmx:oobBeforeSwap",n))return;e=n.target;if(n["shouldSwap"]){Fe(o,e,e,t,a)}oe(a.elts,function(e){ce(e,"htmx:oobAfterSwap",n)})});i.parentNode.removeChild(i)}else{i.parentNode.removeChild(i);fe(re().body,"htmx:oobErrorNoTarget",{content:i})}return e}function Ce(e,t,r){var n=ne(e,"hx-select-oob");if(n){var i=n.split(",");for(var a=0;a0){var r=t.replace("'","\\'");var n=e.tagName.replace(":","\\:");var i=o.querySelector(n+"[id='"+r+"']");if(i&&i!==o){var a=e.cloneNode();we(e,i);s.tasks.push(function(){we(e,a)})}}})}function Oe(e){return function(){n(e,Q.config.addedClass);zt(e);Nt(e);qe(e);ce(e,"htmx:load")}}function qe(e){var t="[autofocus]";var r=h(e,t)?e:e.querySelector(t);if(r!=null){r.focus()}}function a(e,t,r,n){Te(e,r,n);while(r.childNodes.length>0){var i=r.firstChild;z(i,Q.config.addedClass);e.insertBefore(i,t);if(i.nodeType!==Node.TEXT_NODE&&i.nodeType!==Node.COMMENT_NODE){n.tasks.push(Oe(i))}}}function He(e,t){var r=0;while(r-1){var t=e.replace(H,"");var r=t.match(q);if(r){return r[2]}}}function je(e,t,r,n,i,a){i.title=Ve(n);var o=l(n);if(o){Ce(r,o,i);o=Be(r,o,a);Re(o);return Fe(e,r,t,o,i)}}function _e(e,t,r){var n=e.getResponseHeader(t);if(n.indexOf("{")===0){var i=E(n);for(var a in i){if(i.hasOwnProperty(a)){var o=i[a];if(!P(o)){o={value:o}}ce(r,a,o)}}}else{var s=n.split(",");for(var l=0;l0){var o=t[0];if(o==="]"){n--;if(n===0){if(a===null){i=i+"true"}t.shift();i+=")})";try{var s=Tr(e,function(){return Function(i)()},function(){return true});s.source=i;return s}catch(e){fe(re().body,"htmx:syntax:error",{error:e,source:i});return null}}}else if(o==="["){n++}if(Qe(o,a,r)){i+="(("+r+"."+o+") ? ("+r+"."+o+") : (window."+o+"))"}else{i=i+o}a=t.shift()}}}function y(e,t){var r="";while(e.length>0&&!t.test(e[0])){r+=e.shift()}return r}function tt(e){var t;if(e.length>0&&Ze.test(e[0])){e.shift();t=y(e,Ke).trim();e.shift()}else{t=y(e,x)}return t}var rt="input, textarea, select";function nt(e,t,r){var n=[];var i=Ye(t);do{y(i,Je);var a=i.length;var o=y(i,/[,\[\s]/);if(o!==""){if(o==="every"){var s={trigger:"every"};y(i,Je);s.pollInterval=d(y(i,/[,\[\s]/));y(i,Je);var l=et(e,i,"event");if(l){s.eventFilter=l}n.push(s)}else if(o.indexOf("sse:")===0){n.push({trigger:"sse",sseEvent:o.substr(4)})}else{var u={trigger:o};var l=et(e,i,"event");if(l){u.eventFilter=l}while(i.length>0&&i[0]!==","){y(i,Je);var f=i.shift();if(f==="changed"){u.changed=true}else if(f==="once"){u.once=true}else if(f==="consume"){u.consume=true}else if(f==="delay"&&i[0]===":"){i.shift();u.delay=d(y(i,x))}else if(f==="from"&&i[0]===":"){i.shift();if(Ze.test(i[0])){var c=tt(i)}else{var c=y(i,x);if(c==="closest"||c==="find"||c==="next"||c==="previous"){i.shift();var h=tt(i);if(h.length>0){c+=" "+h}}}u.from=c}else if(f==="target"&&i[0]===":"){i.shift();u.target=tt(i)}else if(f==="throttle"&&i[0]===":"){i.shift();u.throttle=d(y(i,x))}else if(f==="queue"&&i[0]===":"){i.shift();u.queue=y(i,x)}else if(f==="root"&&i[0]===":"){i.shift();u[f]=tt(i)}else if(f==="threshold"&&i[0]===":"){i.shift();u[f]=y(i,x)}else{fe(e,"htmx:syntax:error",{token:i.shift()})}}n.push(u)}}if(i.length===a){fe(e,"htmx:syntax:error",{token:i.shift()})}y(i,Je)}while(i[0]===","&&i.shift());if(r){r[t]=n}return n}function it(e){var t=te(e,"hx-trigger");var r=[];if(t){var n=Q.config.triggerSpecsCache;r=n&&n[t]||nt(e,t,n)}if(r.length>0){return r}else if(h(e,"form")){return[{trigger:"submit"}]}else if(h(e,'input[type="button"], input[type="submit"]')){return[{trigger:"click"}]}else if(h(e,rt)){return[{trigger:"change"}]}else{return[{trigger:"click"}]}}function at(e){ae(e).cancelled=true}function ot(e,t,r){var n=ae(e);n.timeout=setTimeout(function(){if(se(e)&&n.cancelled!==true){if(!ct(r,e,Wt("hx:poll:trigger",{triggerSpec:r,target:e}))){t(e)}ot(e,t,r)}},r.pollInterval)}function st(e){return location.hostname===e.hostname&&ee(e,"href")&&ee(e,"href").indexOf("#")!==0}function lt(t,r,e){if(t.tagName==="A"&&st(t)&&(t.target===""||t.target==="_self")||t.tagName==="FORM"){r.boosted=true;var n,i;if(t.tagName==="A"){n="get";i=ee(t,"href")}else{var a=ee(t,"method");n=a?a.toLowerCase():"get";if(n==="get"){}i=ee(t,"action")}e.forEach(function(e){ht(t,function(e,t){if(v(e,Q.config.disableSelector)){m(e);return}he(n,i,e,t)},r,e,true)})}}function ut(e,t){if(e.type==="submit"||e.type==="click"){if(t.tagName==="FORM"){return true}if(h(t,'input[type="submit"], button')&&v(t,"form")!==null){return true}if(t.tagName==="A"&&t.href&&(t.getAttribute("href")==="#"||t.getAttribute("href").indexOf("#")!==0)){return true}}return false}function ft(e,t){return ae(e).boosted&&e.tagName==="A"&&t.type==="click"&&(t.ctrlKey||t.metaKey)}function ct(e,t,r){var n=e.eventFilter;if(n){try{return n.call(t,r)!==true}catch(e){fe(re().body,"htmx:eventFilter:error",{error:e,source:n.source});return true}}return false}function ht(a,o,e,s,l){var u=ae(a);var t;if(s.from){t=Z(a,s.from)}else{t=[a]}if(s.changed){t.forEach(function(e){var t=ae(e);t.lastValue=e.value})}oe(t,function(n){var i=function(e){if(!se(a)){n.removeEventListener(s.trigger,i);return}if(ft(a,e)){return}if(l||ut(e,a)){e.preventDefault()}if(ct(s,a,e)){return}var t=ae(e);t.triggerSpec=s;if(t.handledFor==null){t.handledFor=[]}if(t.handledFor.indexOf(a)<0){t.handledFor.push(a);if(s.consume){e.stopPropagation()}if(s.target&&e.target){if(!h(e.target,s.target)){return}}if(s.once){if(u.triggeredOnce){return}else{u.triggeredOnce=true}}if(s.changed){var r=ae(n);if(r.lastValue===n.value){return}r.lastValue=n.value}if(u.delayed){clearTimeout(u.delayed)}if(u.throttle){return}if(s.throttle>0){if(!u.throttle){o(a,e);u.throttle=setTimeout(function(){u.throttle=null},s.throttle)}}else if(s.delay>0){u.delayed=setTimeout(function(){o(a,e)},s.delay)}else{ce(a,"htmx:trigger");o(a,e)}}};if(e.listenerInfos==null){e.listenerInfos=[]}e.listenerInfos.push({trigger:s.trigger,listener:i,on:n});n.addEventListener(s.trigger,i)})}var vt=false;var dt=null;function gt(){if(!dt){dt=function(){vt=true};window.addEventListener("scroll",dt);setInterval(function(){if(vt){vt=false;oe(re().querySelectorAll("[hx-trigger='revealed'],[data-hx-trigger='revealed']"),function(e){pt(e)})}},200)}}function pt(t){if(!o(t,"data-hx-revealed")&&X(t)){t.setAttribute("data-hx-revealed","true");var e=ae(t);if(e.initHash){ce(t,"revealed")}else{t.addEventListener("htmx:afterProcessNode",function(e){ce(t,"revealed")},{once:true})}}}function mt(e,t,r){var n=D(r);for(var i=0;i=0){var t=wt(n);setTimeout(function(){xt(s,r,n+1)},t)}};t.onopen=function(e){n=0};ae(s).webSocket=t;t.addEventListener("message",function(e){if(yt(s)){return}var t=e.data;R(s,function(e){t=e.transformResponse(t,null,s)});var r=T(s);var n=l(t);var i=M(n.children);for(var a=0;a0){ce(u,"htmx:validation:halted",i);return}t.send(JSON.stringify(l));if(ut(e,u)){e.preventDefault()}})}else{fe(u,"htmx:noWebSocketSourceError")}}function wt(e){var t=Q.config.wsReconnectDelay;if(typeof t==="function"){return t(e)}if(t==="full-jitter"){var r=Math.min(e,6);var n=1e3*Math.pow(2,r);return n*Math.random()}b('htmx.config.wsReconnectDelay must either be a function or the string "full-jitter"')}function St(e,t,r){var n=D(r);for(var i=0;i0){setTimeout(i,n)}else{i()}}function Ht(t,i,e){var a=false;oe(w,function(r){if(o(t,"hx-"+r)){var n=te(t,"hx-"+r);a=true;i.path=n;i.verb=r;e.forEach(function(e){Lt(t,e,i,function(e,t){if(v(e,Q.config.disableSelector)){m(e);return}he(r,n,e,t)})})}});return a}function Lt(n,e,t,r){if(e.sseEvent){Rt(n,r,e.sseEvent)}else if(e.trigger==="revealed"){gt();ht(n,r,t,e);pt(n)}else if(e.trigger==="intersect"){var i={};if(e.root){i.root=ue(n,e.root)}if(e.threshold){i.threshold=parseFloat(e.threshold)}var a=new IntersectionObserver(function(e){for(var t=0;t0){t.polling=true;ot(n,r,e)}else{ht(n,r,t,e)}}function At(e){if(!e.htmxExecuted&&Q.config.allowScriptTags&&(e.type==="text/javascript"||e.type==="module"||e.type==="")){var t=re().createElement("script");oe(e.attributes,function(e){t.setAttribute(e.name,e.value)});t.textContent=e.textContent;t.async=false;if(Q.config.inlineScriptNonce){t.nonce=Q.config.inlineScriptNonce}var r=e.parentElement;try{r.insertBefore(t,e)}catch(e){b(e)}finally{if(e.parentElement){e.parentElement.removeChild(e)}}}}function Nt(e){if(h(e,"script")){At(e)}oe(f(e,"script"),function(e){At(e)})}function It(e){var t=e.attributes;if(!t){return false}for(var r=0;r0){var o=n.shift();var s=o.match(/^\s*([a-zA-Z:\-\.]+:)(.*)/);if(a===0&&s){o.split(":");i=s[1].slice(0,-1);r[i]=s[2]}else{r[i]+=o}a+=Bt(o)}for(var l in r){Ft(e,l,r[l])}}}function jt(e){Ae(e);for(var t=0;tQ.config.historyCacheSize){i.shift()}while(i.length>0){try{localStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(e){fe(re().body,"htmx:historyCacheError",{cause:e,cache:i});i.shift()}}}function Yt(e){if(!U()){return null}e=B(e);var t=E(localStorage.getItem("htmx-history-cache"))||[];for(var r=0;r=200&&this.status<400){ce(re().body,"htmx:historyCacheMissLoad",o);var e=l(this.response);e=e.querySelector("[hx-history-elt],[data-hx-history-elt]")||e;var t=Zt();var r=T(t);var n=Ve(this.response);if(n){var i=C("title");if(i){i.innerHTML=n}else{window.document.title=n}}Ue(t,e,r);nr(r.tasks);Jt=a;ce(re().body,"htmx:historyRestore",{path:a,cacheMiss:true,serverResponse:this.response})}else{fe(re().body,"htmx:historyCacheMissLoadError",o)}};e.send()}function ar(e){er();e=e||location.pathname+location.search;var t=Yt(e);if(t){var r=l(t.content);var n=Zt();var i=T(n);Ue(n,r,i);nr(i.tasks);document.title=t.title;setTimeout(function(){window.scrollTo(0,t.scroll)},0);Jt=e;ce(re().body,"htmx:historyRestore",{path:e,item:t})}else{if(Q.config.refreshOnHistoryMiss){window.location.reload(true)}else{ir(e)}}}function or(e){var t=me(e,"hx-indicator");if(t==null){t=[e]}oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)+1;e.classList["add"].call(e.classList,Q.config.requestClass)});return t}function sr(e){var t=me(e,"hx-disabled-elt");if(t==null){t=[]}oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)+1;e.setAttribute("disabled","")});return t}function lr(e,t){oe(e,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.classList["remove"].call(e.classList,Q.config.requestClass)}});oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.removeAttribute("disabled")}})}function ur(e,t){for(var r=0;r=0}function wr(e,t){var r=t?t:ne(e,"hx-swap");var n={swapStyle:ae(e).boosted?"innerHTML":Q.config.defaultSwapStyle,swapDelay:Q.config.defaultSwapDelay,settleDelay:Q.config.defaultSettleDelay};if(Q.config.scrollIntoViewOnBoost&&ae(e).boosted&&!br(e)){n["show"]="top"}if(r){var i=D(r);if(i.length>0){for(var a=0;a0?l.join(":"):null;n["scroll"]=u;n["scrollTarget"]=f}else if(o.indexOf("show:")===0){var c=o.substr(5);var l=c.split(":");var h=l.pop();var f=l.length>0?l.join(":"):null;n["show"]=h;n["showTarget"]=f}else if(o.indexOf("focus-scroll:")===0){var v=o.substr("focus-scroll:".length);n["focusScroll"]=v=="true"}else if(a==0){n["swapStyle"]=o}else{b("Unknown modifier in hx-swap: "+o)}}}}return n}function Sr(e){return ne(e,"hx-encoding")==="multipart/form-data"||h(e,"form")&&ee(e,"enctype")==="multipart/form-data"}function Er(t,r,n){var i=null;R(r,function(e){if(i==null){i=e.encodeParameters(t,n,r)}});if(i!=null){return i}else{if(Sr(r)){return mr(n)}else{return pr(n)}}}function T(e){return{tasks:[],elts:[e]}}function Cr(e,t){var r=e[0];var n=e[e.length-1];if(t.scroll){var i=null;if(t.scrollTarget){i=ue(r,t.scrollTarget)}if(t.scroll==="top"&&(r||i)){i=i||r;i.scrollTop=0}if(t.scroll==="bottom"&&(n||i)){i=i||n;i.scrollTop=i.scrollHeight}}if(t.show){var i=null;if(t.showTarget){var a=t.showTarget;if(t.showTarget==="window"){a="body"}i=ue(r,a)}if(t.show==="top"&&(r||i)){i=i||r;i.scrollIntoView({block:"start",behavior:Q.config.scrollBehavior})}if(t.show==="bottom"&&(n||i)){i=i||n;i.scrollIntoView({block:"end",behavior:Q.config.scrollBehavior})}}}function Rr(e,t,r,n){if(n==null){n={}}if(e==null){return n}var i=te(e,t);if(i){var a=i.trim();var o=r;if(a==="unset"){return null}if(a.indexOf("javascript:")===0){a=a.substr(11);o=true}else if(a.indexOf("js:")===0){a=a.substr(3);o=true}if(a.indexOf("{")!==0){a="{"+a+"}"}var s;if(o){s=Tr(e,function(){return Function("return ("+a+")")()},{})}else{s=E(a)}for(var l in s){if(s.hasOwnProperty(l)){if(n[l]==null){n[l]=s[l]}}}}return Rr(u(e),t,r,n)}function Tr(e,t,r){if(Q.config.allowEval){return t()}else{fe(e,"htmx:evalDisallowedError");return r}}function Or(e,t){return Rr(e,"hx-vars",true,t)}function qr(e,t){return Rr(e,"hx-vals",false,t)}function Hr(e){return le(Or(e),qr(e))}function Lr(t,r,n){if(n!==null){try{t.setRequestHeader(r,n)}catch(e){t.setRequestHeader(r,encodeURIComponent(n));t.setRequestHeader(r+"-URI-AutoEncoded","true")}}}function Ar(t){if(t.responseURL&&typeof URL!=="undefined"){try{var e=new URL(t.responseURL);return e.pathname+e.search}catch(e){fe(re().body,"htmx:badResponseUrl",{url:t.responseURL})}}}function O(e,t){return t.test(e.getAllResponseHeaders())}function Nr(e,t,r){e=e.toLowerCase();if(r){if(r instanceof Element||I(r,"String")){return he(e,t,null,null,{targetOverride:p(r),returnPromise:true})}else{return he(e,t,p(r.source),r.event,{handler:r.handler,headers:r.headers,values:r.values,targetOverride:p(r.target),swapOverride:r.swap,select:r.select,returnPromise:true})}}else{return he(e,t,null,null,{returnPromise:true})}}function Ir(e){var t=[];while(e){t.push(e);e=e.parentElement}return t}function kr(e,t,r){var n;var i;if(typeof URL==="function"){i=new URL(t,document.location.href);var a=document.location.origin;n=a===i.origin}else{i=t;n=g(t,document.location.origin)}if(Q.config.selfRequestsOnly){if(!n){return false}}return ce(e,"htmx:validateUrl",le({url:i,sameHost:n},r))}function he(t,r,n,i,a,e){var o=null;var s=null;a=a!=null?a:{};if(a.returnPromise&&typeof Promise!=="undefined"){var l=new Promise(function(e,t){o=e;s=t})}if(n==null){n=re().body}var M=a.handler||Mr;var X=a.select||null;if(!se(n)){ie(o);return l}var u=a.targetOverride||ye(n);if(u==null||u==pe){fe(n,"htmx:targetError",{target:te(n,"hx-target")});ie(s);return l}var f=ae(n);var c=f.lastButtonClicked;if(c){var h=ee(c,"formaction");if(h!=null){r=h}var v=ee(c,"formmethod");if(v!=null){if(v.toLowerCase()!=="dialog"){t=v}}}var d=ne(n,"hx-confirm");if(e===undefined){var D=function(e){return he(t,r,n,i,a,!!e)};var U={target:u,elt:n,path:r,verb:t,triggeringEvent:i,etc:a,issueRequest:D,question:d};if(ce(n,"htmx:confirm",U)===false){ie(o);return l}}var g=n;var p=ne(n,"hx-sync");var m=null;var x=false;if(p){var B=p.split(":");var F=B[0].trim();if(F==="this"){g=xe(n,"hx-sync")}else{g=ue(n,F)}p=(B[1]||"drop").trim();f=ae(g);if(p==="drop"&&f.xhr&&f.abortable!==true){ie(o);return l}else if(p==="abort"){if(f.xhr){ie(o);return l}else{x=true}}else if(p==="replace"){ce(g,"htmx:abort")}else if(p.indexOf("queue")===0){var V=p.split(" ");m=(V[1]||"last").trim()}}if(f.xhr){if(f.abortable){ce(g,"htmx:abort")}else{if(m==null){if(i){var y=ae(i);if(y&&y.triggerSpec&&y.triggerSpec.queue){m=y.triggerSpec.queue}}if(m==null){m="last"}}if(f.queuedRequests==null){f.queuedRequests=[]}if(m==="first"&&f.queuedRequests.length===0){f.queuedRequests.push(function(){he(t,r,n,i,a)})}else if(m==="all"){f.queuedRequests.push(function(){he(t,r,n,i,a)})}else if(m==="last"){f.queuedRequests=[];f.queuedRequests.push(function(){he(t,r,n,i,a)})}ie(o);return l}}var b=new XMLHttpRequest;f.xhr=b;f.abortable=x;var w=function(){f.xhr=null;f.abortable=false;if(f.queuedRequests!=null&&f.queuedRequests.length>0){var e=f.queuedRequests.shift();e()}};var j=ne(n,"hx-prompt");if(j){var S=prompt(j);if(S===null||!ce(n,"htmx:prompt",{prompt:S,target:u})){ie(o);w();return l}}if(d&&!e){if(!confirm(d)){ie(o);w();return l}}var E=xr(n,u,S);if(t!=="get"&&!Sr(n)){E["Content-Type"]="application/x-www-form-urlencoded"}if(a.headers){E=le(E,a.headers)}var _=dr(n,t);var C=_.errors;var R=_.values;if(a.values){R=le(R,a.values)}var z=Hr(n);var $=le(R,z);var T=yr($,n);if(Q.config.getCacheBusterParam&&t==="get"){T["org.htmx.cache-buster"]=ee(u,"id")||"true"}if(r==null||r===""){r=re().location.href}var O=Rr(n,"hx-request");var W=ae(n).boosted;var q=Q.config.methodsThatUseUrlParams.indexOf(t)>=0;var H={boosted:W,useUrlParams:q,parameters:T,unfilteredParameters:$,headers:E,target:u,verb:t,errors:C,withCredentials:a.credentials||O.credentials||Q.config.withCredentials,timeout:a.timeout||O.timeout||Q.config.timeout,path:r,triggeringEvent:i};if(!ce(n,"htmx:configRequest",H)){ie(o);w();return l}r=H.path;t=H.verb;E=H.headers;T=H.parameters;C=H.errors;q=H.useUrlParams;if(C&&C.length>0){ce(n,"htmx:validation:halted",H);ie(o);w();return l}var G=r.split("#");var J=G[0];var L=G[1];var A=r;if(q){A=J;var Z=Object.keys(T).length!==0;if(Z){if(A.indexOf("?")<0){A+="?"}else{A+="&"}A+=pr(T);if(L){A+="#"+L}}}if(!kr(n,A,H)){fe(n,"htmx:invalidPath",H);ie(s);return l}b.open(t.toUpperCase(),A,true);b.overrideMimeType("text/html");b.withCredentials=H.withCredentials;b.timeout=H.timeout;if(O.noHeaders){}else{for(var N in E){if(E.hasOwnProperty(N)){var K=E[N];Lr(b,N,K)}}}var I={xhr:b,target:u,requestConfig:H,etc:a,boosted:W,select:X,pathInfo:{requestPath:r,finalRequestPath:A,anchor:L}};b.onload=function(){try{var e=Ir(n);I.pathInfo.responsePath=Ar(b);M(n,I);lr(k,P);ce(n,"htmx:afterRequest",I);ce(n,"htmx:afterOnLoad",I);if(!se(n)){var t=null;while(e.length>0&&t==null){var r=e.shift();if(se(r)){t=r}}if(t){ce(t,"htmx:afterRequest",I);ce(t,"htmx:afterOnLoad",I)}}ie(o);w()}catch(e){fe(n,"htmx:onLoadError",le({error:e},I));throw e}};b.onerror=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:sendError",I);ie(s);w()};b.onabort=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:sendAbort",I);ie(s);w()};b.ontimeout=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:timeout",I);ie(s);w()};if(!ce(n,"htmx:beforeRequest",I)){ie(o);w();return l}var k=or(n);var P=sr(n);oe(["loadstart","loadend","progress","abort"],function(t){oe([b,b.upload],function(e){e.addEventListener(t,function(e){ce(n,"htmx:xhr:"+t,{lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total})})})});ce(n,"htmx:beforeSend",I);var Y=q?null:Er(b,n,T);b.send(Y);return l}function Pr(e,t){var r=t.xhr;var n=null;var i=null;if(O(r,/HX-Push:/i)){n=r.getResponseHeader("HX-Push");i="push"}else if(O(r,/HX-Push-Url:/i)){n=r.getResponseHeader("HX-Push-Url");i="push"}else if(O(r,/HX-Replace-Url:/i)){n=r.getResponseHeader("HX-Replace-Url");i="replace"}if(n){if(n==="false"){return{}}else{return{type:i,path:n}}}var a=t.pathInfo.finalRequestPath;var o=t.pathInfo.responsePath;var s=ne(e,"hx-push-url");var l=ne(e,"hx-replace-url");var u=ae(e).boosted;var f=null;var c=null;if(s){f="push";c=s}else if(l){f="replace";c=l}else if(u){f="push";c=o||a}if(c){if(c==="false"){return{}}if(c==="true"){c=o||a}if(t.pathInfo.anchor&&c.indexOf("#")===-1){c=c+"#"+t.pathInfo.anchor}return{type:f,path:c}}else{return{}}}function Mr(l,u){var f=u.xhr;var c=u.target;var e=u.etc;var t=u.requestConfig;var h=u.select;if(!ce(l,"htmx:beforeOnLoad",u))return;if(O(f,/HX-Trigger:/i)){_e(f,"HX-Trigger",l)}if(O(f,/HX-Location:/i)){er();var r=f.getResponseHeader("HX-Location");var v;if(r.indexOf("{")===0){v=E(r);r=v["path"];delete v["path"]}Nr("GET",r,v).then(function(){tr(r)});return}var n=O(f,/HX-Refresh:/i)&&"true"===f.getResponseHeader("HX-Refresh");if(O(f,/HX-Redirect:/i)){location.href=f.getResponseHeader("HX-Redirect");n&&location.reload();return}if(n){location.reload();return}if(O(f,/HX-Retarget:/i)){if(f.getResponseHeader("HX-Retarget")==="this"){u.target=l}else{u.target=ue(l,f.getResponseHeader("HX-Retarget"))}}var d=Pr(l,u);var i=f.status>=200&&f.status<400&&f.status!==204;var g=f.response;var a=f.status>=400;var p=Q.config.ignoreTitle;var o=le({shouldSwap:i,serverResponse:g,isError:a,ignoreTitle:p},u);if(!ce(c,"htmx:beforeSwap",o))return;c=o.target;g=o.serverResponse;a=o.isError;p=o.ignoreTitle;u.target=c;u.failed=a;u.successful=!a;if(o.shouldSwap){if(f.status===286){at(l)}R(l,function(e){g=e.transformResponse(g,f,l)});if(d.type){er()}var s=e.swapOverride;if(O(f,/HX-Reswap:/i)){s=f.getResponseHeader("HX-Reswap")}var v=wr(l,s);if(v.hasOwnProperty("ignoreTitle")){p=v.ignoreTitle}c.classList.add(Q.config.swappingClass);var m=null;var x=null;var y=function(){try{var e=document.activeElement;var t={};try{t={elt:e,start:e?e.selectionStart:null,end:e?e.selectionEnd:null}}catch(e){}var r;if(h){r=h}if(O(f,/HX-Reselect:/i)){r=f.getResponseHeader("HX-Reselect")}if(d.type){ce(re().body,"htmx:beforeHistoryUpdate",le({history:d},u));if(d.type==="push"){tr(d.path);ce(re().body,"htmx:pushedIntoHistory",{path:d.path})}else{rr(d.path);ce(re().body,"htmx:replacedInHistory",{path:d.path})}}var n=T(c);je(v.swapStyle,c,l,g,n,r);if(t.elt&&!se(t.elt)&&ee(t.elt,"id")){var i=document.getElementById(ee(t.elt,"id"));var a={preventScroll:v.focusScroll!==undefined?!v.focusScroll:!Q.config.defaultFocusScroll};if(i){if(t.start&&i.setSelectionRange){try{i.setSelectionRange(t.start,t.end)}catch(e){}}i.focus(a)}}c.classList.remove(Q.config.swappingClass);oe(n.elts,function(e){if(e.classList){e.classList.add(Q.config.settlingClass)}ce(e,"htmx:afterSwap",u)});if(O(f,/HX-Trigger-After-Swap:/i)){var o=l;if(!se(l)){o=re().body}_e(f,"HX-Trigger-After-Swap",o)}var s=function(){oe(n.tasks,function(e){e.call()});oe(n.elts,function(e){if(e.classList){e.classList.remove(Q.config.settlingClass)}ce(e,"htmx:afterSettle",u)});if(u.pathInfo.anchor){var e=re().getElementById(u.pathInfo.anchor);if(e){e.scrollIntoView({block:"start",behavior:"auto"})}}if(n.title&&!p){var t=C("title");if(t){t.innerHTML=n.title}else{window.document.title=n.title}}Cr(n.elts,v);if(O(f,/HX-Trigger-After-Settle:/i)){var r=l;if(!se(l)){r=re().body}_e(f,"HX-Trigger-After-Settle",r)}ie(m)};if(v.settleDelay>0){setTimeout(s,v.settleDelay)}else{s()}}catch(e){fe(l,"htmx:swapError",u);ie(x);throw e}};var b=Q.config.globalViewTransitions;if(v.hasOwnProperty("transition")){b=v.transition}if(b&&ce(l,"htmx:beforeTransition",u)&&typeof Promise!=="undefined"&&document.startViewTransition){var w=new Promise(function(e,t){m=e;x=t});var S=y;y=function(){document.startViewTransition(function(){S();return w})}}if(v.swapDelay>0){setTimeout(y,v.swapDelay)}else{y()}}if(a){fe(l,"htmx:responseError",le({error:"Response Status Error Code "+f.status+" from "+u.pathInfo.requestPath},u))}}var Xr={};function Dr(){return{init:function(e){return null},onEvent:function(e,t){return true},transformResponse:function(e,t,r){return e},isInlineSwap:function(e){return false},handleSwap:function(e,t,r,n){return false},encodeParameters:function(e,t,r){return null}}}function Ur(e,t){if(t.init){t.init(r)}Xr[e]=le(Dr(),t)}function Br(e){delete Xr[e]}function Fr(e,r,n){if(e==undefined){return r}if(r==undefined){r=[]}if(n==undefined){n=[]}var t=te(e,"hx-ext");if(t){oe(t.split(","),function(e){e=e.replace(/ /g,"");if(e.slice(0,7)=="ignore:"){n.push(e.slice(7));return}if(n.indexOf(e)<0){var t=Xr[e];if(t&&r.indexOf(t)<0){r.push(t)}}})}return Fr(u(e),r,n)}var Vr=false;re().addEventListener("DOMContentLoaded",function(){Vr=true});function jr(e){if(Vr||re().readyState==="complete"){e()}else{re().addEventListener("DOMContentLoaded",e)}}function _r(){if(Q.config.includeIndicatorStyles!==false){re().head.insertAdjacentHTML("beforeend","")}}function zr(){var e=re().querySelector('meta[name="htmx-config"]');if(e){return E(e.content)}else{return null}}function $r(){var e=zr();if(e){Q.config=le(Q.config,e)}}jr(function(){$r();_r();var e=re().body;zt(e);var t=re().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){var t=e.target;var r=ae(t);if(r&&r.xhr){r.xhr.abort()}});const r=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(e){if(e.state&&e.state.htmx){ar();oe(t,function(e){ce(e,"htmx:restored",{document:re(),triggerEvent:ce})})}else{if(r){r(e)}}};setTimeout(function(){ce(e,"htmx:load",{});e=null},0)});return Q}()}); \ No newline at end of file diff --git a/web/static/dist/response-targets.js b/web/static/dist/response-targets.js deleted file mode 100644 index dd6fd418..00000000 --- a/web/static/dist/response-targets.js +++ /dev/null @@ -1,130 +0,0 @@ -(function(){ - - /** @type {import("../htmx").HtmxInternalApi} */ - var api; - - var attrPrefix = 'hx-target-'; - - // IE11 doesn't support string.startsWith - function startsWith(str, prefix) { - return str.substring(0, prefix.length) === prefix - } - - /** - * @param {HTMLElement} elt - * @param {number} respCode - * @returns {HTMLElement | null} - */ - function getRespCodeTarget(elt, respCodeNumber) { - if (!elt || !respCodeNumber) return null; - - var respCode = respCodeNumber.toString(); - - // '*' is the original syntax, as the obvious character for a wildcard. - // The 'x' alternative was added for maximum compatibility with HTML - // templating engines, due to ambiguity around which characters are - // supported in HTML attributes. - // - // Start with the most specific possible attribute and generalize from - // there. - var attrPossibilities = [ - respCode, - - respCode.substr(0, 2) + '*', - respCode.substr(0, 2) + 'x', - - respCode.substr(0, 1) + '*', - respCode.substr(0, 1) + 'x', - respCode.substr(0, 1) + '**', - respCode.substr(0, 1) + 'xx', - - '*', - 'x', - '***', - 'xxx', - ]; - if (startsWith(respCode, '4') || startsWith(respCode, '5')) { - attrPossibilities.push('error'); - } - - for (var i = 0; i < attrPossibilities.length; i++) { - var attr = attrPrefix + attrPossibilities[i]; - var attrValue = api.getClosestAttributeValue(elt, attr); - if (attrValue) { - if (attrValue === "this") { - return api.findThisElement(elt, attr); - } else { - return api.querySelectorExt(elt, attrValue); - } - } - } - - return null; - } - - /** @param {Event} evt */ - function handleErrorFlag(evt) { - if (evt.detail.isError) { - if (htmx.config.responseTargetUnsetsError) { - evt.detail.isError = false; - } - } else if (htmx.config.responseTargetSetsError) { - evt.detail.isError = true; - } - } - - htmx.defineExtension('response-targets', { - - /** @param {import("../htmx").HtmxInternalApi} apiRef */ - init: function (apiRef) { - api = apiRef; - - if (htmx.config.responseTargetUnsetsError === undefined) { - htmx.config.responseTargetUnsetsError = true; - } - if (htmx.config.responseTargetSetsError === undefined) { - htmx.config.responseTargetSetsError = false; - } - if (htmx.config.responseTargetPrefersExisting === undefined) { - htmx.config.responseTargetPrefersExisting = false; - } - if (htmx.config.responseTargetPrefersRetargetHeader === undefined) { - htmx.config.responseTargetPrefersRetargetHeader = true; - } - }, - - /** - * @param {string} name - * @param {Event} evt - */ - onEvent: function (name, evt) { - if (name === "htmx:beforeSwap" && - evt.detail.xhr && - evt.detail.xhr.status !== 200) { - if (evt.detail.target) { - if (htmx.config.responseTargetPrefersExisting) { - evt.detail.shouldSwap = true; - handleErrorFlag(evt); - return true; - } - if (htmx.config.responseTargetPrefersRetargetHeader && - evt.detail.xhr.getAllResponseHeaders().match(/HX-Retarget:/i)) { - evt.detail.shouldSwap = true; - handleErrorFlag(evt); - return true; - } - } - if (!evt.detail.requestConfig) { - return true; - } - var target = getRespCodeTarget(evt.detail.requestConfig.elt, evt.detail.xhr.status); - if (target) { - handleErrorFlag(evt); - evt.detail.shouldSwap = true; - evt.detail.target = target; - } - return true; - } - } - }); -})(); diff --git a/web/static/dist/style.css b/web/static/dist/style.css deleted file mode 100644 index 711fb3bd..00000000 --- a/web/static/dist/style.css +++ /dev/null @@ -1,19695 +0,0 @@ -/* Bulma Utilities */ -:root { - --bulma-control-radius: var(--bulma-radius); - --bulma-control-radius-small: var(--bulma-radius-small); - --bulma-control-border-width: 1px; - --bulma-control-height: 2.5em; - --bulma-control-line-height: 1.5; - --bulma-control-padding-vertical: calc(0.5em - 1px); - --bulma-control-padding-horizontal: calc(0.75em - 1px); - --bulma-control-size: var(--bulma-size-normal); - --bulma-control-focus-shadow-l: 50%; -} - -.footer { - --bulma-footer-background-color: var(--bulma-scheme-main-bis); - --bulma-footer-color: false; - --bulma-footer-padding: 1.5rem 1.5rem 3rem; - background-color: var(--bulma-footer-background-color); - padding: var(--bulma-footer-padding); -} - -/* Bulma Base */ -/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */ -html, -body, -p, -ol, -ul, -li, -dl, -dt, -dd, -blockquote, -figure, -fieldset, -legend, -textarea, -pre, -iframe, -hr, -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 0; - padding: 0; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - font-size: 100%; - font-weight: normal; -} - -ul { - list-style: none; -} - -button, -input, -select, -textarea { - margin: 0; -} - -html { - box-sizing: border-box; -} - -*, *::before, *::after { - box-sizing: inherit; -} - -img, -video { - height: auto; - max-width: 100%; -} - -iframe { - border: 0; -} - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} -td:not([align]), -th:not([align]) { - text-align: inherit; -} - -:root { - --bulma-body-background-color: var(--bulma-scheme-main); - --bulma-body-size: 1em; - --bulma-body-min-width: 300px; - --bulma-body-rendering: optimizeLegibility; - --bulma-body-family: var(--bulma-family-primary); - --bulma-body-overflow-x: hidden; - --bulma-body-overflow-y: scroll; - --bulma-body-color: var(--bulma-text); - --bulma-body-font-size: 1em; - --bulma-body-weight: var(--bulma-weight-normal); - --bulma-body-line-height: 1.5; - --bulma-code-family: var(--bulma-family-code); - --bulma-code-padding: 0.25em 0.5em 0.25em; - --bulma-code-weight: normal; - --bulma-code-size: 0.875em; - --bulma-small-font-size: 0.875em; - --bulma-hr-background-color: var(--bulma-background); - --bulma-hr-height: 2px; - --bulma-hr-margin: 1.5rem 0; - --bulma-strong-color: var(--bulma-text-strong); - --bulma-strong-weight: var(--bulma-weight-semibold); - --bulma-pre-font-size: 0.875em; - --bulma-pre-padding: 1.25rem 1.5rem; - --bulma-pre-code-font-size: 1em; -} - -html { - background-color: var(--bulma-body-background-color); - font-size: var(--bulma-body-size); - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - min-width: var(--bulma-body-min-width); - overflow-x: var(--bulma-body-overflow-x); - overflow-y: var(--bulma-body-overflow-y); - text-rendering: var(--bulma-body-rendering); - text-size-adjust: 100%; -} - -article, -aside, -figure, -footer, -header, -hgroup, -section { - display: block; -} - -body, -button, -input, -optgroup, -select, -textarea { - font-family: var(--bulma-body-family); -} - -code, -pre { - -moz-osx-font-smoothing: auto; - -webkit-font-smoothing: auto; - font-family: var(--bulma-code-family); -} - -body { - color: var(--bulma-body-color); - font-size: var(--bulma-body-font-size); - font-weight: var(--bulma-body-weight); - line-height: var(--bulma-body-line-height); -} - -a, -button { - cursor: pointer; -} -a:focus-visible, -button:focus-visible { - outline-color: hsl(var(--bulma-focus-h), var(--bulma-focus-s), var(--bulma-focus-l)); - outline-offset: var(--bulma-focus-offset); - outline-style: var(--bulma-focus-style); - outline-width: var(--bulma-focus-width); -} -a:focus-visible:active, -button:focus-visible:active { - outline-width: 1px; -} -a:active, -button:active { - outline-width: 1px; -} - -a { - color: var(--bulma-link-text); - cursor: pointer; - text-decoration: none; - transition-duration: var(--bulma-duration); - transition-property: background-color, border-color, color; -} -a strong { - color: currentColor; -} - -button { - appearance: none; - background: none; - border: none; - color: inherit; - font-family: inherit; - font-size: 1em; - margin: 0; - padding: 0; - transition-duration: var(--bulma-duration); - transition-property: background-color, border-color, color; -} - -code { - background-color: var(--bulma-code-background); - border-radius: 0.5em; - color: var(--bulma-code); - font-size: var(--bulma-code-size); - font-weight: var(--bulma-code-weight); - padding: var(--bulma-code-padding); -} - -hr { - background-color: var(--bulma-hr-background-color); - border: none; - display: block; - height: var(--bulma-hr-height); - margin: var(--bulma-hr-margin); -} - -img { - height: auto; - max-width: 100%; -} - -input[type=checkbox], -input[type=radio] { - vertical-align: baseline; -} - -small { - font-size: var(--bulma-small-font-size); -} - -span { - font-style: inherit; - font-weight: inherit; -} - -strong { - color: var(--bulma-strong-color); - font-weight: var(--bulma-strong-weight); -} - -svg { - height: auto; - width: auto; -} - -fieldset { - border: none; -} - -pre { - -webkit-overflow-scrolling: touch; - background-color: var(--bulma-pre-background); - color: var(--bulma-pre); - font-size: var(--bulma-pre-font-size); - overflow-x: auto; - padding: var(--bulma-pre-padding); - white-space: pre; - word-wrap: normal; -} -pre code { - background-color: transparent; - color: currentColor; - font-size: var(--bulma-pre-code-font-size); - padding: 0; -} - -table td, -table th { - vertical-align: top; -} -table td:not([align]), -table th:not([align]) { - text-align: inherit; -} -table th { - color: var(--bulma-text-strong); -} - -@keyframes spinAround { - from { - transform: rotate(0deg); - } - to { - transform: rotate(359deg); - } -} -@keyframes pulsate { - 50% { - opacity: 0.5; - } -} -.select:not(.is-multiple):not(.is-loading)::after, .navbar-link:not(.is-arrowless)::after { - border: 0.125em solid var(--bulma-arrow-color); - border-right: 0; - border-top: 0; - content: " "; - display: block; - height: 0.625em; - margin-top: -0.4375em; - pointer-events: none; - position: absolute; - top: 50%; - transform: rotate(-45deg); - transform-origin: center; - transition-duration: var(--bulma-duration); - transition-property: border-color; - width: 0.625em; -} - -.fixed-grid:not(:last-child), .grid:not(:last-child), .level:not(:last-child), .field:not(:last-child), .file:not(:last-child), .title:not(:last-child), -.subtitle:not(:last-child), .table:not(:last-child), .table-container:not(:last-child), .tags:not(:last-child), .progress:not(:last-child), .content:not(:last-child), .box:not(:last-child), .buttons:not(:last-child), .message:not(:last-child), .pagination:not(:last-child) { - margin-bottom: var(--bulma-block-spacing); -} - -.file-cta, -.file-name, .select select, .input, .textarea, .button, .pagination-previous, -.pagination-next, -.pagination-link, -.pagination-ellipsis { - align-items: center; - appearance: none; - border-color: transparent; - border-style: solid; - border-width: var(--bulma-control-border-width); - border-radius: var(--bulma-control-radius); - box-shadow: none; - display: inline-flex; - font-size: var(--bulma-control-size); - height: var(--bulma-control-height); - justify-content: flex-start; - line-height: var(--bulma-control-line-height); - padding-bottom: var(--bulma-control-padding-vertical); - padding-left: var(--bulma-control-padding-horizontal); - padding-right: var(--bulma-control-padding-horizontal); - padding-top: var(--bulma-control-padding-vertical); - position: relative; - transition-duration: var(--bulma-duration); - transition-property: background-color, border-color, box-shadow, color; - vertical-align: top; -} -.file-cta:focus, -.file-name:focus, .select select:focus, .input:focus, .textarea:focus, .button:focus, .pagination-previous:focus, -.pagination-next:focus, -.pagination-link:focus, -.pagination-ellipsis:focus, .file-cta:focus-visible, -.file-name:focus-visible, .select select:focus-visible, .input:focus-visible, .textarea:focus-visible, .button:focus-visible, .pagination-previous:focus-visible, -.pagination-next:focus-visible, -.pagination-link:focus-visible, -.pagination-ellipsis:focus-visible, .file-cta:focus-within, -.file-name:focus-within, .select select:focus-within, .input:focus-within, .textarea:focus-within, .button:focus-within, .pagination-previous:focus-within, -.pagination-next:focus-within, -.pagination-link:focus-within, -.pagination-ellipsis:focus-within, .is-focused.file-cta, -.is-focused.file-name, .select select.is-focused, .is-focused.input, .is-focused.textarea, .is-focused.button, .is-focused.pagination-previous, -.is-focused.pagination-next, -.is-focused.pagination-link, -.is-focused.pagination-ellipsis, .file-cta:active, -.file-name:active, .select select:active, .input:active, .textarea:active, .button:active, .pagination-previous:active, -.pagination-next:active, -.pagination-link:active, -.pagination-ellipsis:active, .is-active.file-cta, -.is-active.file-name, .select select.is-active, .is-active.input, .is-active.textarea, .is-active.button, .is-active.pagination-previous, -.is-active.pagination-next, -.is-active.pagination-link, -.is-active.pagination-ellipsis { - outline: none; -} -[disabled].file-cta, -[disabled].file-name, .select select[disabled], [disabled].input, [disabled].textarea, [disabled].button, [disabled].pagination-previous, -[disabled].pagination-next, -[disabled].pagination-link, -[disabled].pagination-ellipsis, fieldset[disabled] .file-cta, -fieldset[disabled] .file-name, fieldset[disabled] .select select, .select fieldset[disabled] select, fieldset[disabled] .input, fieldset[disabled] .textarea, fieldset[disabled] .button, fieldset[disabled] .pagination-previous, -fieldset[disabled] .pagination-next, -fieldset[disabled] .pagination-link, -fieldset[disabled] .pagination-ellipsis { - cursor: not-allowed; -} - -.control.is-loading::after, .select.is-loading::after, .button.is-loading::after { - animation: spinAround 500ms infinite linear; - border: 2px solid var(--bulma-loading-color); - border-radius: var(--bulma-radius-rounded); - border-right-color: transparent; - border-top-color: transparent; - content: ""; - display: block; - height: 1em; - position: relative; - width: 1em; -} - -.hero-video { - bottom: 0; - left: 0; - position: absolute; - right: 0; - top: 0; -} - -.navbar-burger { - appearance: none; - background: none; - border: none; - color: inherit; - font-family: inherit; - font-size: 1em; - margin: 0; - padding: 0; -} - -.file, .button, .pagination-previous, -.pagination-next, -.pagination-link, -.pagination-ellipsis { - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.pagination { - --bulma-pagination-margin: -0.25rem; - --bulma-pagination-min-width: var(--bulma-control-height); - --bulma-pagination-item-h: var(--bulma-scheme-h); - --bulma-pagination-item-s: var(--bulma-scheme-s); - --bulma-pagination-item-l: var(--bulma-scheme-main-l); - --bulma-pagination-item-background-l-delta: 0%; - --bulma-pagination-item-hover-background-l-delta: var(--bulma-hover-background-l-delta); - --bulma-pagination-item-active-background-l-delta: var(--bulma-active-background-l-delta); - --bulma-pagination-item-border-style: solid; - --bulma-pagination-item-border-width: var(--bulma-control-border-width); - --bulma-pagination-item-border-l: var(--bulma-border-l); - --bulma-pagination-item-border-l-delta: 0%; - --bulma-pagination-item-hover-border-l-delta: var(--bulma-hover-border-l-delta); - --bulma-pagination-item-active-border-l-delta: var(--bulma-active-border-l-delta); - --bulma-pagination-item-focus-border-l-delta: var(--bulma-focus-border-l-delta); - --bulma-pagination-item-color-l: var(--bulma-text-strong-l); - --bulma-pagination-item-font-size: 1em; - --bulma-pagination-item-margin: 0.25rem; - --bulma-pagination-item-padding-left: 0.5em; - --bulma-pagination-item-padding-right: 0.5em; - --bulma-pagination-item-outer-shadow-h: 0; - --bulma-pagination-item-outer-shadow-s: 0%; - --bulma-pagination-item-outer-shadow-l: 20%; - --bulma-pagination-item-outer-shadow-a: 0.05; - --bulma-pagination-nav-padding-left: 0.75em; - --bulma-pagination-nav-padding-right: 0.75em; - --bulma-pagination-disabled-color: var(--bulma-text-weak); - --bulma-pagination-disabled-background-color: var(--bulma-border); - --bulma-pagination-disabled-border-color: var(--bulma-border); - --bulma-pagination-current-color: var(--bulma-link-invert); - --bulma-pagination-current-background-color: var(--bulma-link); - --bulma-pagination-current-border-color: var(--bulma-link); - --bulma-pagination-ellipsis-color: var(--bulma-text-weak); - --bulma-pagination-shadow-inset: inset 0 0.0625em 0.125em hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.2); - --bulma-pagination-selected-item-h: var(--bulma-link-h); - --bulma-pagination-selected-item-s: var(--bulma-link-s); - --bulma-pagination-selected-item-l: var(--bulma-link-l); - --bulma-pagination-selected-item-background-l: var(--bulma-link-l); - --bulma-pagination-selected-item-border-l: var(--bulma-link-l); - --bulma-pagination-selected-item-color-l: var(--bulma-link-invert-l); -} - -.pagination { - font-size: var(--bulma-size-normal); - margin: var(--bulma-pagination-margin); -} -.pagination.is-small { - font-size: var(--bulma-size-small); -} -.pagination.is-medium { - font-size: var(--bulma-size-medium); -} -.pagination.is-large { - font-size: var(--bulma-size-large); -} -.pagination.is-rounded .pagination-previous, -.pagination.is-rounded .pagination-next { - padding-left: 1em; - padding-right: 1em; - border-radius: var(--bulma-radius-rounded); -} -.pagination.is-rounded .pagination-link { - border-radius: var(--bulma-radius-rounded); -} - -.pagination, -.pagination-list { - align-items: center; - display: flex; - justify-content: center; - text-align: center; -} - -.pagination-previous, -.pagination-next, -.pagination-link, -.pagination-ellipsis { - color: hsl(var(--bulma-pagination-item-h), var(--bulma-pagination-item-s), var(--bulma-pagination-item-color-l)); - font-size: var(--bulma-pagination-item-font-size); - justify-content: center; - margin: var(--bulma-pagination-item-margin); - padding-left: var(--bulma-pagination-item-padding-left); - padding-right: var(--bulma-pagination-item-padding-right); - text-align: center; -} - -.pagination-previous, -.pagination-next, -.pagination-link { - background-color: hsl(var(--bulma-pagination-item-h), var(--bulma-pagination-item-s), calc(var(--bulma-pagination-item-background-l) + var(--bulma-pagination-item-background-l-delta))); - border-color: hsl(var(--bulma-pagination-item-h), var(--bulma-pagination-item-s), calc(var(--bulma-pagination-item-border-l) + var(--bulma-pagination-item-border-l-delta))); - border-style: var(--bulma-pagination-item-border-style); - border-width: var(--bulma-pagination-item-border-width); - box-shadow: 0px 0.0625em 0.125em hsla(var(--bulma-pagination-item-outer-shadow-h), var(--bulma-pagination-item-outer-shadow-s), var(--bulma-pagination-item-outer-shadow-l), var(--bulma-pagination-item-outer-shadow-a)), 0px 0.125em 0.25em hsla(var(--bulma-pagination-item-outer-shadow-h), var(--bulma-pagination-item-outer-shadow-s), var(--bulma-pagination-item-outer-shadow-l), var(--bulma-pagination-item-outer-shadow-a)); - color: hsl(var(--bulma-pagination-item-h), var(--bulma-pagination-item-s), var(--bulma-pagination-item-color-l)); - min-width: var(--bulma-pagination-min-width); - transition-duration: var(--bulma-duration); - transition-property: background-color, border-color, box-shadow, color; -} -.pagination-previous:hover, -.pagination-next:hover, -.pagination-link:hover { - --bulma-pagination-item-background-l-delta: var(--bulma-pagination-item-hover-background-l-delta); - --bulma-pagination-item-border-l-delta: var(--bulma-pagination-item-hover-border-l-delta); -} -.pagination-previous:focus, -.pagination-next:focus, -.pagination-link:focus { - --bulma-pagination-item-background-l-delta: var(--bulma-pagination-item-hover-background-l-delta); - --bulma-pagination-item-border-l-delta: var(--bulma-pagination-item-hover-border-l-delta); -} -.pagination-previous:active, -.pagination-next:active, -.pagination-link:active { - box-shadow: var(--bulma-pagination-shadow-inset); -} -.pagination-previous[disabled], .pagination-previous.is-disabled, -.pagination-next[disabled], -.pagination-next.is-disabled, -.pagination-link[disabled], -.pagination-link.is-disabled { - background-color: var(--bulma-pagination-disabled-background-color); - border-color: var(--bulma-pagination-disabled-border-color); - box-shadow: none; - color: var(--bulma-pagination-disabled-color); - opacity: 0.5; -} - -.pagination-previous, -.pagination-next { - padding-left: var(--bulma-pagination-nav-padding-left); - padding-right: var(--bulma-pagination-nav-padding-right); - white-space: nowrap; -} - -.pagination-link.is-current, .pagination-link.is-selected { - --bulma-pagination-item-h: var(--bulma-pagination-selected-item-h); - --bulma-pagination-item-s: var(--bulma-pagination-selected-item-s); - --bulma-pagination-item-l: var(--bulma-pagination-selected-item-l); - --bulma-pagination-item-background-l: var(--bulma-pagination-selected-item-background-l); - --bulma-pagination-item-border-l: var(--bulma-pagination-selected-item-border-l); - --bulma-pagination-item-color-l: var(--bulma-pagination-selected-item-color-l); -} - -.pagination-ellipsis { - color: var(--bulma-pagination-ellipsis-color); - pointer-events: none; -} - -.pagination-list { - flex-wrap: wrap; -} -.pagination-list li { - list-style: none; -} - -@media screen and (max-width: 768px) { - .pagination { - flex-wrap: wrap; - } - .pagination-previous, - .pagination-next { - flex-grow: 1; - flex-shrink: 1; - } - .pagination-list li { - flex-grow: 1; - flex-shrink: 1; - } -} -@media screen and (min-width: 769px), print { - .pagination-list { - flex-grow: 1; - flex-shrink: 1; - justify-content: flex-start; - order: 1; - } - .pagination-previous, - .pagination-next, - .pagination-link, - .pagination-ellipsis { - margin-bottom: 0; - margin-top: 0; - } - .pagination-previous { - order: 2; - } - .pagination-next { - order: 3; - } - .pagination { - justify-content: space-between; - margin-bottom: 0; - margin-top: 0; - } - .pagination.is-centered .pagination-previous { - order: 1; - } - .pagination.is-centered .pagination-list { - justify-content: center; - order: 2; - } - .pagination.is-centered .pagination-next { - order: 3; - } - .pagination.is-right .pagination-previous { - order: 1; - } - .pagination.is-right .pagination-next { - order: 2; - } - .pagination.is-right .pagination-list { - justify-content: flex-end; - order: 3; - } -} -:root { - --bulma-navbar-height: 3.25rem; -} - -.navbar { - --bulma-navbar-h: var(--bulma-scheme-h); - --bulma-navbar-s: var(--bulma-scheme-s); - --bulma-navbar-l: var(--bulma-scheme-main-l); - --bulma-navbar-background-color: var(--bulma-scheme-main); - --bulma-navbar-box-shadow-size: 0 0.125em 0 0; - --bulma-navbar-box-shadow-color: var(--bulma-background); - --bulma-navbar-padding-vertical: 1rem; - --bulma-navbar-padding-horizontal: 2rem; - --bulma-navbar-z: 30; - --bulma-navbar-fixed-z: 30; - --bulma-navbar-item-background-a: 0; - --bulma-navbar-item-background-l: var(--bulma-scheme-main-l); - --bulma-navbar-item-background-l-delta: 0%; - --bulma-navbar-item-hover-background-l-delta: var(--bulma-hover-background-l-delta); - --bulma-navbar-item-active-background-l-delta: var(--bulma-active-background-l-delta); - --bulma-navbar-item-color-l: var(--bulma-text-l); - --bulma-navbar-item-color: hsl(var(--bulma-navbar-h), var(--bulma-navbar-s), var(--bulma-navbar-item-color-l)); - --bulma-navbar-item-selected-h: var(--bulma-link-h); - --bulma-navbar-item-selected-s: var(--bulma-link-s); - --bulma-navbar-item-selected-l: var(--bulma-link-l); - --bulma-navbar-item-selected-background-l: var(--bulma-link-l); - --bulma-navbar-item-selected-color-l: var(--bulma-link-invert-l); - --bulma-navbar-item-img-max-height: 1.75rem; - --bulma-navbar-burger-color: var(--bulma-link); - --bulma-navbar-tab-hover-background-color: transparent; - --bulma-navbar-tab-hover-border-bottom-color: var(--bulma-link); - --bulma-navbar-tab-active-color: var(--bulma-link); - --bulma-navbar-tab-active-background-color: transparent; - --bulma-navbar-tab-active-border-bottom-color: var(--bulma-link); - --bulma-navbar-tab-active-border-bottom-style: solid; - --bulma-navbar-tab-active-border-bottom-width: 0.1875em; - --bulma-navbar-dropdown-background-color: var(--bulma-scheme-main); - --bulma-navbar-dropdown-border-l: var(--bulma-border-l); - --bulma-navbar-dropdown-border-color: hsl(var(--bulma-navbar-h), var(--bulma-navbar-s), var(--bulma-navbar-dropdown-border-l)); - --bulma-navbar-dropdown-border-style: solid; - --bulma-navbar-dropdown-border-width: 0.125em; - --bulma-navbar-dropdown-offset: -0.25em; - --bulma-navbar-dropdown-arrow: var(--bulma-link); - --bulma-navbar-dropdown-radius: var(--bulma-radius-large); - --bulma-navbar-dropdown-z: 20; - --bulma-navbar-dropdown-boxed-radius: var(--bulma-radius-large); - --bulma-navbar-dropdown-boxed-shadow: 0 0.5em 0.5em hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.1), 0 0 0 1px hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.1); - --bulma-navbar-dropdown-item-h: var(--bulma-scheme-h); - --bulma-navbar-dropdown-item-s: var(--bulma-scheme-s); - --bulma-navbar-dropdown-item-l: var(--bulma-scheme-main-l); - --bulma-navbar-dropdown-item-background-l: var(--bulma-scheme-main-l); - --bulma-navbar-dropdown-item-color-l: var(--bulma-text-l); - --bulma-navbar-divider-background-l: var(--bulma-background-l); - --bulma-navbar-divider-height: 0.125em; - --bulma-navbar-bottom-box-shadow-size: 0 -0.125em 0 0; -} - -.navbar { - background-color: var(--bulma-navbar-background-color); - min-height: var(--bulma-navbar-height); - position: relative; - z-index: var(--bulma-navbar-z); -} -.navbar.is-white { - --bulma-navbar-h: var(--bulma-white-h); - --bulma-navbar-s: var(--bulma-white-s); - --bulma-navbar-l: var(--bulma-white-l); - --bulma-burger-h: var(--bulma-white-h); - --bulma-burger-s: var(--bulma-white-s); - --bulma-burger-l: var(--bulma-white-invert-l); - --bulma-navbar-background-color: var(--bulma-white); - --bulma-navbar-item-background-l: var(--bulma-white-l); - --bulma-navbar-item-color-l: var(--bulma-white-invert-l); - --bulma-navbar-item-selected-h: var(--bulma-white-h); - --bulma-navbar-item-selected-s: var(--bulma-white-s); - --bulma-navbar-item-selected-l: var(--bulma-white-l); - --bulma-navbar-item-selected-background-l: var(--bulma-white-l); - --bulma-navbar-item-selected-color-l: var(--bulma-white-invert-l); - --bulma-navbar-dropdown-arrow: var(--bulma-white-invert-l); - --bulma-navbar-dropdown-background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-navbar-dropdown-item-background-l)); - --bulma-navbar-dropdown-item-h: var(--bulma-white-h); - --bulma-navbar-dropdown-item-s: var(--bulma-white-s); -} -.navbar.is-black { - --bulma-navbar-h: var(--bulma-black-h); - --bulma-navbar-s: var(--bulma-black-s); - --bulma-navbar-l: var(--bulma-black-l); - --bulma-burger-h: var(--bulma-black-h); - --bulma-burger-s: var(--bulma-black-s); - --bulma-burger-l: var(--bulma-black-invert-l); - --bulma-navbar-background-color: var(--bulma-black); - --bulma-navbar-item-background-l: var(--bulma-black-l); - --bulma-navbar-item-color-l: var(--bulma-black-invert-l); - --bulma-navbar-item-selected-h: var(--bulma-black-h); - --bulma-navbar-item-selected-s: var(--bulma-black-s); - --bulma-navbar-item-selected-l: var(--bulma-black-l); - --bulma-navbar-item-selected-background-l: var(--bulma-black-l); - --bulma-navbar-item-selected-color-l: var(--bulma-black-invert-l); - --bulma-navbar-dropdown-arrow: var(--bulma-black-invert-l); - --bulma-navbar-dropdown-background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-navbar-dropdown-item-background-l)); - --bulma-navbar-dropdown-item-h: var(--bulma-black-h); - --bulma-navbar-dropdown-item-s: var(--bulma-black-s); -} -.navbar.is-light { - --bulma-navbar-h: var(--bulma-light-h); - --bulma-navbar-s: var(--bulma-light-s); - --bulma-navbar-l: var(--bulma-light-l); - --bulma-burger-h: var(--bulma-light-h); - --bulma-burger-s: var(--bulma-light-s); - --bulma-burger-l: var(--bulma-light-invert-l); - --bulma-navbar-background-color: var(--bulma-light); - --bulma-navbar-item-background-l: var(--bulma-light-l); - --bulma-navbar-item-color-l: var(--bulma-light-invert-l); - --bulma-navbar-item-selected-h: var(--bulma-light-h); - --bulma-navbar-item-selected-s: var(--bulma-light-s); - --bulma-navbar-item-selected-l: var(--bulma-light-l); - --bulma-navbar-item-selected-background-l: var(--bulma-light-l); - --bulma-navbar-item-selected-color-l: var(--bulma-light-invert-l); - --bulma-navbar-dropdown-arrow: var(--bulma-light-invert-l); - --bulma-navbar-dropdown-background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-navbar-dropdown-item-background-l)); - --bulma-navbar-dropdown-item-h: var(--bulma-light-h); - --bulma-navbar-dropdown-item-s: var(--bulma-light-s); -} -.navbar.is-dark { - --bulma-navbar-h: var(--bulma-dark-h); - --bulma-navbar-s: var(--bulma-dark-s); - --bulma-navbar-l: var(--bulma-dark-l); - --bulma-burger-h: var(--bulma-dark-h); - --bulma-burger-s: var(--bulma-dark-s); - --bulma-burger-l: var(--bulma-dark-invert-l); - --bulma-navbar-background-color: var(--bulma-dark); - --bulma-navbar-item-background-l: var(--bulma-dark-l); - --bulma-navbar-item-color-l: var(--bulma-dark-invert-l); - --bulma-navbar-item-selected-h: var(--bulma-dark-h); - --bulma-navbar-item-selected-s: var(--bulma-dark-s); - --bulma-navbar-item-selected-l: var(--bulma-dark-l); - --bulma-navbar-item-selected-background-l: var(--bulma-dark-l); - --bulma-navbar-item-selected-color-l: var(--bulma-dark-invert-l); - --bulma-navbar-dropdown-arrow: var(--bulma-dark-invert-l); - --bulma-navbar-dropdown-background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-navbar-dropdown-item-background-l)); - --bulma-navbar-dropdown-item-h: var(--bulma-dark-h); - --bulma-navbar-dropdown-item-s: var(--bulma-dark-s); -} -.navbar.is-text { - --bulma-navbar-h: var(--bulma-text-h); - --bulma-navbar-s: var(--bulma-text-s); - --bulma-navbar-l: var(--bulma-text-l); - --bulma-burger-h: var(--bulma-text-h); - --bulma-burger-s: var(--bulma-text-s); - --bulma-burger-l: var(--bulma-text-invert-l); - --bulma-navbar-background-color: var(--bulma-text); - --bulma-navbar-item-background-l: var(--bulma-text-l); - --bulma-navbar-item-color-l: var(--bulma-text-invert-l); - --bulma-navbar-item-selected-h: var(--bulma-text-h); - --bulma-navbar-item-selected-s: var(--bulma-text-s); - --bulma-navbar-item-selected-l: var(--bulma-text-l); - --bulma-navbar-item-selected-background-l: var(--bulma-text-l); - --bulma-navbar-item-selected-color-l: var(--bulma-text-invert-l); - --bulma-navbar-dropdown-arrow: var(--bulma-text-invert-l); - --bulma-navbar-dropdown-background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-navbar-dropdown-item-background-l)); - --bulma-navbar-dropdown-item-h: var(--bulma-text-h); - --bulma-navbar-dropdown-item-s: var(--bulma-text-s); -} -.navbar.is-primary { - --bulma-navbar-h: var(--bulma-primary-h); - --bulma-navbar-s: var(--bulma-primary-s); - --bulma-navbar-l: var(--bulma-primary-l); - --bulma-burger-h: var(--bulma-primary-h); - --bulma-burger-s: var(--bulma-primary-s); - --bulma-burger-l: var(--bulma-primary-invert-l); - --bulma-navbar-background-color: var(--bulma-primary); - --bulma-navbar-item-background-l: var(--bulma-primary-l); - --bulma-navbar-item-color-l: var(--bulma-primary-invert-l); - --bulma-navbar-item-selected-h: var(--bulma-primary-h); - --bulma-navbar-item-selected-s: var(--bulma-primary-s); - --bulma-navbar-item-selected-l: var(--bulma-primary-l); - --bulma-navbar-item-selected-background-l: var(--bulma-primary-l); - --bulma-navbar-item-selected-color-l: var(--bulma-primary-invert-l); - --bulma-navbar-dropdown-arrow: var(--bulma-primary-invert-l); - --bulma-navbar-dropdown-background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-navbar-dropdown-item-background-l)); - --bulma-navbar-dropdown-item-h: var(--bulma-primary-h); - --bulma-navbar-dropdown-item-s: var(--bulma-primary-s); -} -.navbar.is-link { - --bulma-navbar-h: var(--bulma-link-h); - --bulma-navbar-s: var(--bulma-link-s); - --bulma-navbar-l: var(--bulma-link-l); - --bulma-burger-h: var(--bulma-link-h); - --bulma-burger-s: var(--bulma-link-s); - --bulma-burger-l: var(--bulma-link-invert-l); - --bulma-navbar-background-color: var(--bulma-link); - --bulma-navbar-item-background-l: var(--bulma-link-l); - --bulma-navbar-item-color-l: var(--bulma-link-invert-l); - --bulma-navbar-item-selected-h: var(--bulma-link-h); - --bulma-navbar-item-selected-s: var(--bulma-link-s); - --bulma-navbar-item-selected-l: var(--bulma-link-l); - --bulma-navbar-item-selected-background-l: var(--bulma-link-l); - --bulma-navbar-item-selected-color-l: var(--bulma-link-invert-l); - --bulma-navbar-dropdown-arrow: var(--bulma-link-invert-l); - --bulma-navbar-dropdown-background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-navbar-dropdown-item-background-l)); - --bulma-navbar-dropdown-item-h: var(--bulma-link-h); - --bulma-navbar-dropdown-item-s: var(--bulma-link-s); -} -.navbar.is-info { - --bulma-navbar-h: var(--bulma-info-h); - --bulma-navbar-s: var(--bulma-info-s); - --bulma-navbar-l: var(--bulma-info-l); - --bulma-burger-h: var(--bulma-info-h); - --bulma-burger-s: var(--bulma-info-s); - --bulma-burger-l: var(--bulma-info-invert-l); - --bulma-navbar-background-color: var(--bulma-info); - --bulma-navbar-item-background-l: var(--bulma-info-l); - --bulma-navbar-item-color-l: var(--bulma-info-invert-l); - --bulma-navbar-item-selected-h: var(--bulma-info-h); - --bulma-navbar-item-selected-s: var(--bulma-info-s); - --bulma-navbar-item-selected-l: var(--bulma-info-l); - --bulma-navbar-item-selected-background-l: var(--bulma-info-l); - --bulma-navbar-item-selected-color-l: var(--bulma-info-invert-l); - --bulma-navbar-dropdown-arrow: var(--bulma-info-invert-l); - --bulma-navbar-dropdown-background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-navbar-dropdown-item-background-l)); - --bulma-navbar-dropdown-item-h: var(--bulma-info-h); - --bulma-navbar-dropdown-item-s: var(--bulma-info-s); -} -.navbar.is-success { - --bulma-navbar-h: var(--bulma-success-h); - --bulma-navbar-s: var(--bulma-success-s); - --bulma-navbar-l: var(--bulma-success-l); - --bulma-burger-h: var(--bulma-success-h); - --bulma-burger-s: var(--bulma-success-s); - --bulma-burger-l: var(--bulma-success-invert-l); - --bulma-navbar-background-color: var(--bulma-success); - --bulma-navbar-item-background-l: var(--bulma-success-l); - --bulma-navbar-item-color-l: var(--bulma-success-invert-l); - --bulma-navbar-item-selected-h: var(--bulma-success-h); - --bulma-navbar-item-selected-s: var(--bulma-success-s); - --bulma-navbar-item-selected-l: var(--bulma-success-l); - --bulma-navbar-item-selected-background-l: var(--bulma-success-l); - --bulma-navbar-item-selected-color-l: var(--bulma-success-invert-l); - --bulma-navbar-dropdown-arrow: var(--bulma-success-invert-l); - --bulma-navbar-dropdown-background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-navbar-dropdown-item-background-l)); - --bulma-navbar-dropdown-item-h: var(--bulma-success-h); - --bulma-navbar-dropdown-item-s: var(--bulma-success-s); -} -.navbar.is-warning { - --bulma-navbar-h: var(--bulma-warning-h); - --bulma-navbar-s: var(--bulma-warning-s); - --bulma-navbar-l: var(--bulma-warning-l); - --bulma-burger-h: var(--bulma-warning-h); - --bulma-burger-s: var(--bulma-warning-s); - --bulma-burger-l: var(--bulma-warning-invert-l); - --bulma-navbar-background-color: var(--bulma-warning); - --bulma-navbar-item-background-l: var(--bulma-warning-l); - --bulma-navbar-item-color-l: var(--bulma-warning-invert-l); - --bulma-navbar-item-selected-h: var(--bulma-warning-h); - --bulma-navbar-item-selected-s: var(--bulma-warning-s); - --bulma-navbar-item-selected-l: var(--bulma-warning-l); - --bulma-navbar-item-selected-background-l: var(--bulma-warning-l); - --bulma-navbar-item-selected-color-l: var(--bulma-warning-invert-l); - --bulma-navbar-dropdown-arrow: var(--bulma-warning-invert-l); - --bulma-navbar-dropdown-background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-navbar-dropdown-item-background-l)); - --bulma-navbar-dropdown-item-h: var(--bulma-warning-h); - --bulma-navbar-dropdown-item-s: var(--bulma-warning-s); -} -.navbar.is-danger { - --bulma-navbar-h: var(--bulma-danger-h); - --bulma-navbar-s: var(--bulma-danger-s); - --bulma-navbar-l: var(--bulma-danger-l); - --bulma-burger-h: var(--bulma-danger-h); - --bulma-burger-s: var(--bulma-danger-s); - --bulma-burger-l: var(--bulma-danger-invert-l); - --bulma-navbar-background-color: var(--bulma-danger); - --bulma-navbar-item-background-l: var(--bulma-danger-l); - --bulma-navbar-item-color-l: var(--bulma-danger-invert-l); - --bulma-navbar-item-selected-h: var(--bulma-danger-h); - --bulma-navbar-item-selected-s: var(--bulma-danger-s); - --bulma-navbar-item-selected-l: var(--bulma-danger-l); - --bulma-navbar-item-selected-background-l: var(--bulma-danger-l); - --bulma-navbar-item-selected-color-l: var(--bulma-danger-invert-l); - --bulma-navbar-dropdown-arrow: var(--bulma-danger-invert-l); - --bulma-navbar-dropdown-background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-navbar-dropdown-item-background-l)); - --bulma-navbar-dropdown-item-h: var(--bulma-danger-h); - --bulma-navbar-dropdown-item-s: var(--bulma-danger-s); -} -.navbar > .container { - align-items: stretch; - display: flex; - min-height: var(--bulma-navbar-height); - width: 100%; -} -.navbar.has-shadow { - box-shadow: var(--bulma-navbar-box-shadow-size) var(--bulma-navbar-box-shadow-color); -} -.navbar.is-fixed-bottom, .navbar.is-fixed-top { - left: 0; - position: fixed; - right: 0; - z-index: var(--bulma-navbar-fixed-z); -} -.navbar.is-fixed-bottom { - bottom: 0; -} -.navbar.is-fixed-bottom.has-shadow { - box-shadow: var(--bulma-navbar-bottom-box-shadow-size) var(--bulma-navbar-box-shadow-color); -} -.navbar.is-fixed-top { - top: 0; -} - -html.has-navbar-fixed-top, -body.has-navbar-fixed-top { - padding-top: var(--bulma-navbar-height); -} -html.has-navbar-fixed-bottom, -body.has-navbar-fixed-bottom { - padding-bottom: var(--bulma-navbar-height); -} - -.navbar-brand, -.navbar-tabs { - align-items: stretch; - display: flex; - flex-shrink: 0; - min-height: var(--bulma-navbar-height); -} - -.navbar-tabs { - -webkit-overflow-scrolling: touch; - max-width: 100vw; - overflow-x: auto; - overflow-y: hidden; -} - -.navbar-burger { - align-items: center; - appearance: none; - background: none; - border: none; - border-radius: var(--bulma-burger-border-radius); - color: hsl(var(--bulma-burger-h), var(--bulma-burger-s), var(--bulma-burger-l)); - cursor: pointer; - display: inline-flex; - flex-direction: column; - flex-shrink: 0; - height: 2.5rem; - justify-content: center; - position: relative; - vertical-align: top; - width: 2.5rem; -} -.navbar-burger span { - background-color: currentColor; - display: block; - height: var(--bulma-burger-item-height); - left: calc(50% - (var(--bulma-burger-item-width)) / 2); - position: absolute; - transform-origin: center; - transition-duration: var(--bulma-duration); - transition-property: background-color, color, opacity, transform; - transition-timing-function: var(--bulma-easing); - width: var(--bulma-burger-item-width); -} -.navbar-burger span:nth-child(1), .navbar-burger span:nth-child(2) { - top: calc(50% - (var(--bulma-burger-item-height)) / 2); -} -.navbar-burger span:nth-child(3) { - bottom: calc(50% + var(--bulma-burger-gap)); -} -.navbar-burger span:nth-child(4) { - top: calc(50% + var(--bulma-burger-gap)); -} -.navbar-burger:hover { - background-color: hsla(var(--bulma-burger-h), var(--bulma-burger-s), var(--bulma-burger-l), 0.1); -} -.navbar-burger:active { - background-color: hsla(var(--bulma-burger-h), var(--bulma-burger-s), var(--bulma-burger-l), 0.2); -} -.navbar-burger.is-active span:nth-child(1) { - transform: rotate(-45deg); -} -.navbar-burger.is-active span:nth-child(2) { - transform: rotate(45deg); -} -.navbar-burger.is-active span:nth-child(3), .navbar-burger.is-active span:nth-child(4) { - opacity: 0; -} -.navbar-burger { - align-self: center; - color: var(--bulma-navbar-burger-color); - margin-inline-start: auto; - margin-inline-end: 0.375rem; -} - -.navbar-menu { - display: none; -} - -.navbar-item, -.navbar-link { - color: var(--bulma-navbar-item-color); - display: block; - gap: 0.75rem; - line-height: 1.5; - padding: 0.5rem 0.75rem; - position: relative; -} -.navbar-item .icon:only-child, -.navbar-link .icon:only-child { - margin-left: -0.25rem; - margin-right: -0.25rem; -} - -a.navbar-item, -.navbar-link { - background-color: hsla(var(--bulma-navbar-h), var(--bulma-navbar-s), calc(var(--bulma-navbar-item-background-l) + var(--bulma-navbar-item-background-l-delta)), var(--bulma-navbar-item-background-a)); - cursor: pointer; -} -a.navbar-item:focus, a.navbar-item:focus-within, a.navbar-item:hover, -.navbar-link:focus, -.navbar-link:focus-within, -.navbar-link:hover { - --bulma-navbar-item-background-l-delta: var(--bulma-navbar-item-hover-background-l-delta); - --bulma-navbar-item-background-a: 1; -} -a.navbar-item:active, -.navbar-link:active { - --bulma-navbar-item-background-l-delta: var(--bulma-navbar-item-active-background-l-delta); - --bulma-navbar-item-background-a: 1; -} -a.navbar-item.is-active, a.navbar-item.is-selected, -.navbar-link.is-active, -.navbar-link.is-selected { - --bulma-navbar-h: var(--bulma-navbar-item-selected-h); - --bulma-navbar-s: var(--bulma-navbar-item-selected-s); - --bulma-navbar-l: var(--bulma-navbar-item-selected-l); - --bulma-navbar-item-background-l: var(--bulma-navbar-item-selected-background-l); - --bulma-navbar-item-background-a: 1; - --bulma-navbar-item-color-l: var(--bulma-navbar-item-selected-color-l); -} - -.navbar-item { - flex-grow: 0; - flex-shrink: 0; -} -.navbar-item img, -.navbar-item svg { - max-height: var(--bulma-navbar-item-img-max-height); -} -.navbar-item.has-dropdown { - padding: 0; -} -.navbar-item.is-expanded { - flex-grow: 1; - flex-shrink: 1; -} -.navbar-item.is-tab { - border-bottom: 1px solid transparent; - min-height: var(--bulma-navbar-height); - padding-bottom: calc(0.5rem - 1px); -} -.navbar-item.is-tab:focus, .navbar-item.is-tab:hover { - background-color: var(--bulma-navbar-tab-hover-background-color); - border-bottom-color: var(--bulma-navbar-tab-hover-border-bottom-color); -} -.navbar-item.is-tab.is-active { - background-color: var(--bulma-navbar-tab-active-background-color); - border-bottom-color: var(--bulma-navbar-tab-active-border-bottom-color); - border-bottom-style: var(--bulma-navbar-tab-active-border-bottom-style); - border-bottom-width: var(--bulma-navbar-tab-active-border-bottom-width); - color: var(--bulma-navbar-tab-active-color); - padding-bottom: calc(0.5rem - var(--bulma-navbar-tab-active-border-bottom-width)); -} - -.navbar-content { - flex-grow: 1; - flex-shrink: 1; -} - -.navbar-link:not(.is-arrowless) { - padding-inline-end: 2.5em; -} -.navbar-link:not(.is-arrowless)::after { - border-color: var(--bulma-navbar-dropdown-arrow); - margin-top: -0.375em; - inset-inline-end: 1.125em; -} - -.navbar-dropdown { - font-size: 0.875rem; - padding-bottom: 0.75rem; - padding-top: 0.5rem; -} -.navbar-dropdown .navbar-item { - padding-left: 1.5rem; - padding-right: 1.5rem; -} -.navbar-dropdown .navbar-item:not(.is-active, .is-selected) { - background-color: hsl(var(--bulma-navbar-dropdown-item-h), var(--bulma-navbar-dropdown-item-s), calc(var(--bulma-navbar-dropdown-item-background-l) + var(--bulma-navbar-item-background-l-delta))); - color: hsl(var(--bulma-navbar-dropdown-item-h), var(--bulma-navbar-dropdown-item-s), var(--bulma-navbar-dropdown-item-color-l)); -} - -.navbar-divider { - background-color: hsl(var(--bulma-navbar-h), var(--bulma-navbar-s), var(--bulma-navbar-divider-background-l)); - border: none; - display: none; - height: var(--bulma-navbar-divider-height); - margin: 0.5rem 0; -} - -@media screen and (max-width: 1023px) { - .navbar > .container { - display: block; - } - .navbar-brand .navbar-item, - .navbar-tabs .navbar-item { - align-items: center; - display: flex; - } - .navbar-link::after { - display: none; - } - .navbar-menu { - background-color: var(--bulma-navbar-background-color); - box-shadow: 0 0.5em 1em hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.1); - padding: 0.5rem 0; - } - .navbar-menu.is-active { - display: block; - } - .navbar.is-fixed-bottom-touch, .navbar.is-fixed-top-touch { - left: 0; - position: fixed; - right: 0; - z-index: var(--bulma-navbar-fixed-z); - } - .navbar.is-fixed-bottom-touch { - bottom: 0; - } - .navbar.is-fixed-bottom-touch.has-shadow { - box-shadow: 0 -0.125em 0.1875em hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.1); - } - .navbar.is-fixed-top-touch { - top: 0; - } - .navbar.is-fixed-top .navbar-menu, .navbar.is-fixed-top-touch .navbar-menu { - -webkit-overflow-scrolling: touch; - max-height: calc(100vh - var(--bulma-navbar-height)); - overflow: auto; - } - html.has-navbar-fixed-top-touch, - body.has-navbar-fixed-top-touch { - padding-top: var(--bulma-navbar-height); - } - html.has-navbar-fixed-bottom-touch, - body.has-navbar-fixed-bottom-touch { - padding-bottom: var(--bulma-navbar-height); - } -} -@media screen and (min-width: 1024px) { - .navbar, - .navbar-menu, - .navbar-start, - .navbar-end { - align-items: stretch; - display: flex; - } - .navbar { - min-height: var(--bulma-navbar-height); - } - .navbar.is-spaced { - padding: var(--bulma-navbar-padding-vertical) var(--bulma-navbar-padding-horizontal); - } - .navbar.is-spaced .navbar-start, - .navbar.is-spaced .navbar-end { - align-items: center; - } - .navbar.is-spaced a.navbar-item, - .navbar.is-spaced .navbar-link { - border-radius: var(--bulma-radius); - } - .navbar.is-transparent { - --bulma-navbar-item-background-a: 0; - } - .navbar.is-transparent .navbar-dropdown a.navbar-item { - background-color: hsl(var(--bulma-navbar-h), var(--bulma-navbar-s), calc(var(--bulma-navbar-item-background-l) + var(--bulma-navbar-item-background-l-delta))); - } - .navbar.is-transparent .navbar-dropdown a.navbar-item.is-active, .navbar.is-transparent .navbar-dropdown a.navbar-item.is-selected { - --bulma-navbar-h: var(--bulma-navbar-item-selected-h); - --bulma-navbar-s: var(--bulma-navbar-item-selected-s); - --bulma-navbar-l: var(--bulma-navbar-item-selected-l); - --bulma-navbar-item-background-l: var(--bulma-navbar-item-selected-background-l); - --bulma-navbar-item-color-l: var(--bulma-navbar-item-selected-color-l); - } - .navbar-burger { - display: none; - } - .navbar-item, - .navbar-link { - align-items: center; - display: flex; - } - .navbar-item.has-dropdown { - align-items: stretch; - } - .navbar-item.has-dropdown-up .navbar-link::after { - transform: rotate(135deg) translate(0.25em, -0.25em); - } - .navbar-item.has-dropdown-up .navbar-dropdown { - border-bottom-color: var(--bulma-navbar-dropdown-border-color); - border-bottom-style: var(--bulma-navbar-dropdown-border-style); - border-bottom-width: var(--bulma-navbar-dropdown-border-width); - border-radius: var(--bulma-navbar-dropdown-radius) var(--bulma-navbar-dropdown-radius) 0 0; - border-top: none; - bottom: 100%; - box-shadow: 0 -0.5em 0.5em hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.1); - top: auto; - } - .navbar-item.is-active .navbar-dropdown, .navbar-item.is-hoverable:focus .navbar-dropdown, .navbar-item.is-hoverable:focus-within .navbar-dropdown, .navbar-item.is-hoverable:hover .navbar-dropdown { - display: block; - } - .navbar.is-spaced .navbar-item.is-active .navbar-dropdown, .navbar-item.is-active .navbar-dropdown.is-boxed, .navbar.is-spaced .navbar-item.is-hoverable:focus .navbar-dropdown, .navbar-item.is-hoverable:focus .navbar-dropdown.is-boxed, .navbar.is-spaced .navbar-item.is-hoverable:focus-within .navbar-dropdown, .navbar-item.is-hoverable:focus-within .navbar-dropdown.is-boxed, .navbar.is-spaced .navbar-item.is-hoverable:hover .navbar-dropdown, .navbar-item.is-hoverable:hover .navbar-dropdown.is-boxed { - opacity: 1; - pointer-events: auto; - transform: translateY(0); - } - .navbar-menu { - flex-grow: 1; - flex-shrink: 0; - } - .navbar-start { - justify-content: flex-start; - margin-inline-end: auto; - } - .navbar-end { - justify-content: flex-end; - margin-inline-start: auto; - } - .navbar-dropdown { - background-color: var(--bulma-navbar-dropdown-background-color); - border-end-start-radius: var(--bulma-navbar-dropdown-radius); - border-end-end-radius: var(--bulma-navbar-dropdown-radius); - border-top-color: var(--bulma-navbar-dropdown-border-color); - border-top-style: var(--bulma-navbar-dropdown-border-style); - border-top-width: var(--bulma-navbar-dropdown-border-width); - box-shadow: 0 0.5em 0.5em hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.1); - display: none; - font-size: 0.875rem; - inset-inline-start: 0; - min-width: 100%; - position: absolute; - top: 100%; - z-index: var(--bulma-navbar-dropdown-z); - } - .navbar-dropdown .navbar-item { - padding: 0.375rem 1rem; - white-space: nowrap; - } - .navbar-dropdown a.navbar-item { - padding-inline-end: 3rem; - } - .navbar-dropdown a.navbar-item:not(.is-active, .is-selected) { - background-color: hsl(var(--bulma-navbar-dropdown-item-h), var(--bulma-navbar-dropdown-item-s), calc(var(--bulma-navbar-dropdown-item-background-l) + var(--bulma-navbar-item-background-l-delta))); - color: hsl(var(--bulma-navbar-dropdown-item-h), var(--bulma-navbar-dropdown-item-s), var(--bulma-navbar-dropdown-item-color-l)); - } - .navbar.is-spaced .navbar-dropdown, .navbar-dropdown.is-boxed { - border-radius: var(--bulma-navbar-dropdown-boxed-radius); - border-top: none; - box-shadow: var(--bulma-navbar-dropdown-boxed-shadow); - display: block; - opacity: 0; - pointer-events: none; - top: calc(100% + (var(--bulma-navbar-dropdown-offset))); - transform: translateY(-5px); - transition-duration: var(--bulma-duration); - transition-property: opacity, transform; - } - .navbar-dropdown.is-right { - left: auto; - right: 0; - } - .navbar-divider { - display: block; - } - .navbar > .container .navbar-brand, - .container > .navbar .navbar-brand { - margin-inline-start: -0.75rem; - } - .navbar > .container .navbar-menu, - .container > .navbar .navbar-menu { - margin-inline-end: -0.75rem; - } - .navbar.is-fixed-bottom-desktop, .navbar.is-fixed-top-desktop { - left: 0; - position: fixed; - right: 0; - z-index: var(--bulma-navbar-fixed-z); - } - .navbar.is-fixed-bottom-desktop { - bottom: 0; - } - .navbar.is-fixed-bottom-desktop.has-shadow { - box-shadow: 0 -0.125em 0.1875em hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.1); - } - .navbar.is-fixed-top-desktop { - top: 0; - } - html.has-navbar-fixed-top-desktop, - body.has-navbar-fixed-top-desktop { - padding-top: var(--bulma-navbar-height); - } - html.has-navbar-fixed-bottom-desktop, - body.has-navbar-fixed-bottom-desktop { - padding-bottom: var(--bulma-navbar-height); - } - html.has-spaced-navbar-fixed-top, - body.has-spaced-navbar-fixed-top { - padding-top: calc(var(--bulma-navbar-height) + var(--bulma-navbar-padding-vertical) * 2); - } - html.has-spaced-navbar-fixed-bottom, - body.has-spaced-navbar-fixed-bottom { - padding-bottom: calc(var(--bulma-navbar-height) + var(--bulma-navbar-padding-vertical) * 2); - } -} -.hero.is-fullheight-with-navbar { - min-height: calc(100vh - var(--bulma-navbar-height)); -} - -.message { - --bulma-message-border-l-delta: -20%; - --bulma-message-radius: var(--bulma-radius); - --bulma-message-header-weight: var(--bulma-weight-semibold); - --bulma-message-header-padding: 1em 1.25em; - --bulma-message-header-radius: var(--bulma-radius); - --bulma-message-body-border-width: 0 0 0 4px; - --bulma-message-body-color: var(--bulma-text); - --bulma-message-body-padding: 1.25em 1.5em; - --bulma-message-body-radius: var(--bulma-radius-small); - --bulma-message-body-pre-code-background-color: transparent; - --bulma-message-header-body-border-width: 0; - --bulma-message-h: var(--bulma-scheme-h); - --bulma-message-s: var(--bulma-scheme-s); - --bulma-message-background-l: var(--bulma-background-l); - --bulma-message-border-l: var(--bulma-border-l); - --bulma-message-border-style: solid; - --bulma-message-border-width: 0.25em; - --bulma-message-color-l: var(--bulma-text-l); - --bulma-message-header-background-l: var(--bulma-dark-l); - --bulma-message-header-color-l: var(--bulma-text-dark-invert-l); -} - -.message { - border-radius: var(--bulma-message-radius); - color: hsl(var(--bulma-message-h), var(--bulma-message-s), var(--bulma-message-color-l)); - font-size: var(--bulma-size-normal); -} -.message strong { - color: currentColor; -} -.message a:not(.button):not(.tag):not(.dropdown-item) { - color: currentColor; - text-decoration: underline; -} -.message.is-small { - font-size: var(--bulma-size-small); -} -.message.is-medium { - font-size: var(--bulma-size-medium); -} -.message.is-large { - font-size: var(--bulma-size-large); -} -.message.is-white { - --bulma-message-h: var(--bulma-white-h); - --bulma-message-s: var(--bulma-white-s); - --bulma-message-border-l: calc(var(--bulma-white-l) + var(--bulma-message-border-l-delta)); - --bulma-message-color-l: var(--bulma-white-on-scheme-l); - --bulma-message-header-background-l: var(--bulma-white-l); - --bulma-message-header-color-l: var(--bulma-white-invert-l); -} -.message.is-black { - --bulma-message-h: var(--bulma-black-h); - --bulma-message-s: var(--bulma-black-s); - --bulma-message-border-l: calc(var(--bulma-black-l) + var(--bulma-message-border-l-delta)); - --bulma-message-color-l: var(--bulma-black-on-scheme-l); - --bulma-message-header-background-l: var(--bulma-black-l); - --bulma-message-header-color-l: var(--bulma-black-invert-l); -} -.message.is-light { - --bulma-message-h: var(--bulma-light-h); - --bulma-message-s: var(--bulma-light-s); - --bulma-message-border-l: calc(var(--bulma-light-l) + var(--bulma-message-border-l-delta)); - --bulma-message-color-l: var(--bulma-light-on-scheme-l); - --bulma-message-header-background-l: var(--bulma-light-l); - --bulma-message-header-color-l: var(--bulma-light-invert-l); -} -.message.is-dark { - --bulma-message-h: var(--bulma-dark-h); - --bulma-message-s: var(--bulma-dark-s); - --bulma-message-border-l: calc(var(--bulma-dark-l) + var(--bulma-message-border-l-delta)); - --bulma-message-color-l: var(--bulma-dark-on-scheme-l); - --bulma-message-header-background-l: var(--bulma-dark-l); - --bulma-message-header-color-l: var(--bulma-dark-invert-l); -} -.message.is-text { - --bulma-message-h: var(--bulma-text-h); - --bulma-message-s: var(--bulma-text-s); - --bulma-message-border-l: calc(var(--bulma-text-l) + var(--bulma-message-border-l-delta)); - --bulma-message-color-l: var(--bulma-text-on-scheme-l); - --bulma-message-header-background-l: var(--bulma-text-l); - --bulma-message-header-color-l: var(--bulma-text-invert-l); -} -.message.is-primary { - --bulma-message-h: var(--bulma-primary-h); - --bulma-message-s: var(--bulma-primary-s); - --bulma-message-border-l: calc(var(--bulma-primary-l) + var(--bulma-message-border-l-delta)); - --bulma-message-color-l: var(--bulma-primary-on-scheme-l); - --bulma-message-header-background-l: var(--bulma-primary-l); - --bulma-message-header-color-l: var(--bulma-primary-invert-l); -} -.message.is-link { - --bulma-message-h: var(--bulma-link-h); - --bulma-message-s: var(--bulma-link-s); - --bulma-message-border-l: calc(var(--bulma-link-l) + var(--bulma-message-border-l-delta)); - --bulma-message-color-l: var(--bulma-link-on-scheme-l); - --bulma-message-header-background-l: var(--bulma-link-l); - --bulma-message-header-color-l: var(--bulma-link-invert-l); -} -.message.is-info { - --bulma-message-h: var(--bulma-info-h); - --bulma-message-s: var(--bulma-info-s); - --bulma-message-border-l: calc(var(--bulma-info-l) + var(--bulma-message-border-l-delta)); - --bulma-message-color-l: var(--bulma-info-on-scheme-l); - --bulma-message-header-background-l: var(--bulma-info-l); - --bulma-message-header-color-l: var(--bulma-info-invert-l); -} -.message.is-success { - --bulma-message-h: var(--bulma-success-h); - --bulma-message-s: var(--bulma-success-s); - --bulma-message-border-l: calc(var(--bulma-success-l) + var(--bulma-message-border-l-delta)); - --bulma-message-color-l: var(--bulma-success-on-scheme-l); - --bulma-message-header-background-l: var(--bulma-success-l); - --bulma-message-header-color-l: var(--bulma-success-invert-l); -} -.message.is-warning { - --bulma-message-h: var(--bulma-warning-h); - --bulma-message-s: var(--bulma-warning-s); - --bulma-message-border-l: calc(var(--bulma-warning-l) + var(--bulma-message-border-l-delta)); - --bulma-message-color-l: var(--bulma-warning-on-scheme-l); - --bulma-message-header-background-l: var(--bulma-warning-l); - --bulma-message-header-color-l: var(--bulma-warning-invert-l); -} -.message.is-danger { - --bulma-message-h: var(--bulma-danger-h); - --bulma-message-s: var(--bulma-danger-s); - --bulma-message-border-l: calc(var(--bulma-danger-l) + var(--bulma-message-border-l-delta)); - --bulma-message-color-l: var(--bulma-danger-on-scheme-l); - --bulma-message-header-background-l: var(--bulma-danger-l); - --bulma-message-header-color-l: var(--bulma-danger-invert-l); -} - -.message-header { - align-items: center; - background-color: hsl(var(--bulma-message-h), var(--bulma-message-s), var(--bulma-message-header-background-l)); - border-start-start-radius: var(--bulma-message-header-radius); - border-start-end-radius: var(--bulma-message-header-radius); - color: hsl(var(--bulma-message-h), var(--bulma-message-s), var(--bulma-message-header-color-l)); - display: flex; - font-weight: var(--bulma-message-header-weight); - justify-content: space-between; - line-height: 1.25; - padding: var(--bulma-message-header-padding); - position: relative; -} -.message-header .delete { - flex-grow: 0; - flex-shrink: 0; - margin-inline-start: 0.75em; -} -.message-header + .message-body { - border-width: var(--bulma-message-header-body-border-width); - border-start-start-radius: 0; - border-start-end-radius: 0; -} - -.message-body { - background-color: hsl(var(--bulma-message-h), var(--bulma-message-s), var(--bulma-message-background-l)); - border-inline-start-color: hsl(var(--bulma-message-h), var(--bulma-message-s), var(--bulma-message-border-l)); - border-inline-start-style: var(--bulma-message-border-style); - border-inline-start-width: var(--bulma-message-border-width); - border-radius: var(--bulma-message-body-radius); - padding: var(--bulma-message-body-padding); -} -.message-body code, -.message-body pre { - background-color: hsl(var(--bulma-message-h), var(--bulma-message-s), var(--bulma-message-header-color-l)); - color: hsl(var(--bulma-message-h), var(--bulma-message-s), var(--bulma-message-header-background-l)); -} -.message-body pre code { - background-color: var(--bulma-message-body-pre-code-background-color); -} - -.button { - --bulma-button-family: false; - --bulma-button-weight: var(--bulma-weight-medium); - --bulma-button-border-color: var(--bulma-border); - --bulma-button-border-style: solid; - --bulma-button-border-width: var(--bulma-control-border-width); - --bulma-button-padding-vertical: 0.5em; - --bulma-button-padding-horizontal: 1em; - --bulma-button-focus-border-color: var(--bulma-link-focus-border); - --bulma-button-focus-box-shadow-size: 0 0 0 0.125em; - --bulma-button-focus-box-shadow-color: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l), 0.25); - --bulma-button-active-color: var(--bulma-link-active); - --bulma-button-active-border-color: var(--bulma-link-active-border); - --bulma-button-text-color: var(--bulma-text); - --bulma-button-text-decoration: underline; - --bulma-button-text-hover-background-color: var(--bulma-background); - --bulma-button-text-hover-color: var(--bulma-text-strong); - --bulma-button-ghost-background: none; - --bulma-button-ghost-border-color: transparent; - --bulma-button-ghost-color: var(--bulma-link-text); - --bulma-button-ghost-decoration: none; - --bulma-button-ghost-hover-color: var(--bulma-link); - --bulma-button-ghost-hover-decoration: underline; - --bulma-button-disabled-background-color: var(--bulma-scheme-main); - --bulma-button-disabled-border-color: var(--bulma-border); - --bulma-button-disabled-shadow: none; - --bulma-button-disabled-opacity: 0.5; - --bulma-button-static-color: var(--bulma-text-weak); - --bulma-button-static-background-color: var(--bulma-scheme-main-ter); - --bulma-button-static-border-color: var(--bulma-border); -} - -.button { - --bulma-button-h: var(--bulma-scheme-h); - --bulma-button-s: var(--bulma-scheme-s); - --bulma-button-l: var(--bulma-scheme-main-l); - --bulma-button-background-l: var(--bulma-scheme-main-l); - --bulma-button-background-l-delta: 0%; - --bulma-button-hover-background-l-delta: var(--bulma-hover-background-l-delta); - --bulma-button-active-background-l-delta: var(--bulma-active-background-l-delta); - --bulma-button-color-l: var(--bulma-text-strong-l); - --bulma-button-border-l: var(--bulma-border-l); - --bulma-button-border-l-delta: 0%; - --bulma-button-hover-border-l-delta: var(--bulma-hover-border-l-delta); - --bulma-button-active-border-l-delta: var(--bulma-active-border-l-delta); - --bulma-button-focus-border-l-delta: var(--bulma-focus-border-l-delta); - --bulma-button-outer-shadow-h: 0; - --bulma-button-outer-shadow-s: 0%; - --bulma-button-outer-shadow-l: 20%; - --bulma-button-outer-shadow-a: 0.05; - --bulma-loading-color: hsl(var(--bulma-button-h), var(--bulma-button-s), var(--bulma-button-color-l)); - background-color: hsl(var(--bulma-button-h), var(--bulma-button-s), calc(var(--bulma-button-background-l) + var(--bulma-button-background-l-delta))); - border-color: hsl(var(--bulma-button-h), var(--bulma-button-s), calc(var(--bulma-button-border-l) + var(--bulma-button-border-l-delta))); - border-style: var(--bulma-button-border-style); - border-width: var(--bulma-button-border-width); - box-shadow: 0px 0.0625em 0.125em hsla(var(--bulma-button-outer-shadow-h), var(--bulma-button-outer-shadow-s), var(--bulma-button-outer-shadow-l), var(--bulma-button-outer-shadow-a)), 0px 0.125em 0.25em hsla(var(--bulma-button-outer-shadow-h), var(--bulma-button-outer-shadow-s), var(--bulma-button-outer-shadow-l), var(--bulma-button-outer-shadow-a)); - color: hsl(var(--bulma-button-h), var(--bulma-button-s), var(--bulma-button-color-l)); - cursor: pointer; - font-weight: var(--bulma-button-weight); - height: auto; - justify-content: center; - padding-bottom: calc(var(--bulma-button-padding-vertical) - var(--bulma-button-border-width)); - padding-left: calc(var(--bulma-button-padding-horizontal) - var(--bulma-button-border-width)); - padding-right: calc(var(--bulma-button-padding-horizontal) - var(--bulma-button-border-width)); - padding-top: calc(var(--bulma-button-padding-vertical) - var(--bulma-button-border-width)); - text-align: center; - white-space: nowrap; -} -.button strong { - color: inherit; -} -.button .icon, .button .icon.is-small, .button .icon.is-medium, .button .icon.is-large { - height: 1.5em; - width: 1.5em; -} -.button .icon:first-child:not(:last-child) { - margin-inline-start: calc(-0.5 * var(--bulma-button-padding-horizontal)); - margin-inline-end: calc(var(--bulma-button-padding-horizontal) * 0.25); -} -.button .icon:last-child:not(:first-child) { - margin-inline-start: calc(var(--bulma-button-padding-horizontal) * 0.25); - margin-inline-end: calc(-0.5 * var(--bulma-button-padding-horizontal)); -} -.button .icon:first-child:last-child { - margin-inline-start: calc(-0.5 * var(--bulma-button-padding-horizontal)); - margin-inline-end: calc(-0.5 * var(--bulma-button-padding-horizontal)); -} -.button:hover, .button.is-hovered { - --bulma-button-background-l-delta: var(--bulma-button-hover-background-l-delta); - --bulma-button-border-l-delta: var(--bulma-button-hover-border-l-delta); -} -.button:focus-visible, .button.is-focused { - --bulma-button-border-width: 1px; - border-color: hsl(var(--bulma-focus-h), var(--bulma-focus-s), var(--bulma-focus-l)); - box-shadow: var(--bulma-focus-shadow-size) hsla(var(--bulma-focus-h), var(--bulma-focus-s), var(--bulma-focus-l), var(--bulma-focus-shadow-alpha)); -} -.button:active, .button.is-active { - --bulma-button-background-l-delta: var(--bulma-button-active-background-l-delta); - --bulma-button-border-l-delta: var(--bulma-button-active-border-l-delta); - --bulma-button-outer-shadow-a: 0; -} -.button[disabled], fieldset[disabled] .button { - background-color: var(--bulma-button-disabled-background-color); - border-color: var(--bulma-button-disabled-border-color); - box-shadow: var(--bulma-button-disabled-shadow); - opacity: var(--bulma-button-disabled-opacity); -} -.button.is-white { - --bulma-button-h: var(--bulma-white-h); - --bulma-button-s: var(--bulma-white-s); - --bulma-button-l: var(--bulma-white-l); - --bulma-button-background-l: var(--bulma-white-l); - --bulma-button-border-l: var(--bulma-white-l); - --bulma-button-border-width: 0px; - --bulma-button-color-l: var(--bulma-white-invert-l); - --bulma-button-outer-shadow-a: 0; -} -.button.is-white:focus-visible, .button.is-white.is-focused { - --bulma-button-border-width: 1px; -} -.button.is-white.is-soft { - --bulma-button-background-l: var(--bulma-soft-l); - --bulma-button-color-l: var(--bulma-soft-invert-l); -} -.button.is-white.is-bold { - --bulma-button-background-l: var(--bulma-bold-l); - --bulma-button-color-l: var(--bulma-bold-invert-l); -} -.button.is-white[disabled], fieldset[disabled] .button.is-white { - background-color: var(--bulma-white); - border-color: var(--bulma-white); - box-shadow: none; -} -.button.is-black { - --bulma-button-h: var(--bulma-black-h); - --bulma-button-s: var(--bulma-black-s); - --bulma-button-l: var(--bulma-black-l); - --bulma-button-background-l: var(--bulma-black-l); - --bulma-button-border-l: var(--bulma-black-l); - --bulma-button-border-width: 0px; - --bulma-button-color-l: var(--bulma-black-invert-l); - --bulma-button-outer-shadow-a: 0; -} -.button.is-black:focus-visible, .button.is-black.is-focused { - --bulma-button-border-width: 1px; -} -.button.is-black.is-soft { - --bulma-button-background-l: var(--bulma-soft-l); - --bulma-button-color-l: var(--bulma-soft-invert-l); -} -.button.is-black.is-bold { - --bulma-button-background-l: var(--bulma-bold-l); - --bulma-button-color-l: var(--bulma-bold-invert-l); -} -.button.is-black[disabled], fieldset[disabled] .button.is-black { - background-color: var(--bulma-black); - border-color: var(--bulma-black); - box-shadow: none; -} -.button.is-light { - --bulma-button-h: var(--bulma-light-h); - --bulma-button-s: var(--bulma-light-s); - --bulma-button-l: var(--bulma-light-l); - --bulma-button-background-l: var(--bulma-light-l); - --bulma-button-border-l: var(--bulma-light-l); - --bulma-button-border-width: 0px; - --bulma-button-color-l: var(--bulma-light-invert-l); - --bulma-button-outer-shadow-a: 0; -} -.button.is-light:focus-visible, .button.is-light.is-focused { - --bulma-button-border-width: 1px; -} -.button.is-light.is-soft { - --bulma-button-background-l: var(--bulma-soft-l); - --bulma-button-color-l: var(--bulma-soft-invert-l); -} -.button.is-light.is-bold { - --bulma-button-background-l: var(--bulma-bold-l); - --bulma-button-color-l: var(--bulma-bold-invert-l); -} -.button.is-light[disabled], fieldset[disabled] .button.is-light { - background-color: var(--bulma-light); - border-color: var(--bulma-light); - box-shadow: none; -} -.button.is-dark { - --bulma-button-h: var(--bulma-dark-h); - --bulma-button-s: var(--bulma-dark-s); - --bulma-button-l: var(--bulma-dark-l); - --bulma-button-background-l: var(--bulma-dark-l); - --bulma-button-border-l: var(--bulma-dark-l); - --bulma-button-border-width: 0px; - --bulma-button-color-l: var(--bulma-dark-invert-l); - --bulma-button-outer-shadow-a: 0; -} -.button.is-dark:focus-visible, .button.is-dark.is-focused { - --bulma-button-border-width: 1px; -} -.button.is-dark.is-soft { - --bulma-button-background-l: var(--bulma-soft-l); - --bulma-button-color-l: var(--bulma-soft-invert-l); -} -.button.is-dark.is-bold { - --bulma-button-background-l: var(--bulma-bold-l); - --bulma-button-color-l: var(--bulma-bold-invert-l); -} -.button.is-dark[disabled], fieldset[disabled] .button.is-dark { - background-color: var(--bulma-dark); - border-color: var(--bulma-dark); - box-shadow: none; -} -.button.is-text { - --bulma-button-h: var(--bulma-text-h); - --bulma-button-s: var(--bulma-text-s); - --bulma-button-l: var(--bulma-text-l); - --bulma-button-background-l: var(--bulma-text-l); - --bulma-button-border-l: var(--bulma-text-l); - --bulma-button-border-width: 0px; - --bulma-button-color-l: var(--bulma-text-invert-l); - --bulma-button-outer-shadow-a: 0; -} -.button.is-text:focus-visible, .button.is-text.is-focused { - --bulma-button-border-width: 1px; -} -.button.is-text.is-light { - --bulma-button-background-l: var(--bulma-light-l); - --bulma-button-color-l: var(--bulma-text-light-invert-l); -} -.button.is-text.is-dark { - --bulma-button-background-l: var(--bulma-dark-l); - --bulma-button-color-l: var(--bulma-text-dark-invert-l); -} -.button.is-text.is-soft { - --bulma-button-background-l: var(--bulma-soft-l); - --bulma-button-color-l: var(--bulma-soft-invert-l); -} -.button.is-text.is-bold { - --bulma-button-background-l: var(--bulma-bold-l); - --bulma-button-color-l: var(--bulma-bold-invert-l); -} -.button.is-text[disabled], fieldset[disabled] .button.is-text { - background-color: var(--bulma-text); - border-color: var(--bulma-text); - box-shadow: none; -} -.button.is-primary { - --bulma-button-h: var(--bulma-primary-h); - --bulma-button-s: var(--bulma-primary-s); - --bulma-button-l: var(--bulma-primary-l); - --bulma-button-background-l: var(--bulma-primary-l); - --bulma-button-border-l: var(--bulma-primary-l); - --bulma-button-border-width: 0px; - --bulma-button-color-l: var(--bulma-primary-invert-l); - --bulma-button-outer-shadow-a: 0; -} -.button.is-primary:focus-visible, .button.is-primary.is-focused { - --bulma-button-border-width: 1px; -} -.button.is-primary.is-light { - --bulma-button-background-l: var(--bulma-light-l); - --bulma-button-color-l: var(--bulma-primary-light-invert-l); -} -.button.is-primary.is-dark { - --bulma-button-background-l: var(--bulma-dark-l); - --bulma-button-color-l: var(--bulma-primary-dark-invert-l); -} -.button.is-primary.is-soft { - --bulma-button-background-l: var(--bulma-soft-l); - --bulma-button-color-l: var(--bulma-soft-invert-l); -} -.button.is-primary.is-bold { - --bulma-button-background-l: var(--bulma-bold-l); - --bulma-button-color-l: var(--bulma-bold-invert-l); -} -.button.is-primary[disabled], fieldset[disabled] .button.is-primary { - background-color: var(--bulma-primary); - border-color: var(--bulma-primary); - box-shadow: none; -} -.button.is-link { - --bulma-button-h: var(--bulma-link-h); - --bulma-button-s: var(--bulma-link-s); - --bulma-button-l: var(--bulma-link-l); - --bulma-button-background-l: var(--bulma-link-l); - --bulma-button-border-l: var(--bulma-link-l); - --bulma-button-border-width: 0px; - --bulma-button-color-l: var(--bulma-link-invert-l); - --bulma-button-outer-shadow-a: 0; -} -.button.is-link:focus-visible, .button.is-link.is-focused { - --bulma-button-border-width: 1px; -} -.button.is-link.is-light { - --bulma-button-background-l: var(--bulma-light-l); - --bulma-button-color-l: var(--bulma-link-light-invert-l); -} -.button.is-link.is-dark { - --bulma-button-background-l: var(--bulma-dark-l); - --bulma-button-color-l: var(--bulma-link-dark-invert-l); -} -.button.is-link.is-soft { - --bulma-button-background-l: var(--bulma-soft-l); - --bulma-button-color-l: var(--bulma-soft-invert-l); -} -.button.is-link.is-bold { - --bulma-button-background-l: var(--bulma-bold-l); - --bulma-button-color-l: var(--bulma-bold-invert-l); -} -.button.is-link[disabled], fieldset[disabled] .button.is-link { - background-color: var(--bulma-link); - border-color: var(--bulma-link); - box-shadow: none; -} -.button.is-info { - --bulma-button-h: var(--bulma-info-h); - --bulma-button-s: var(--bulma-info-s); - --bulma-button-l: var(--bulma-info-l); - --bulma-button-background-l: var(--bulma-info-l); - --bulma-button-border-l: var(--bulma-info-l); - --bulma-button-border-width: 0px; - --bulma-button-color-l: var(--bulma-info-invert-l); - --bulma-button-outer-shadow-a: 0; -} -.button.is-info:focus-visible, .button.is-info.is-focused { - --bulma-button-border-width: 1px; -} -.button.is-info.is-light { - --bulma-button-background-l: var(--bulma-light-l); - --bulma-button-color-l: var(--bulma-info-light-invert-l); -} -.button.is-info.is-dark { - --bulma-button-background-l: var(--bulma-dark-l); - --bulma-button-color-l: var(--bulma-info-dark-invert-l); -} -.button.is-info.is-soft { - --bulma-button-background-l: var(--bulma-soft-l); - --bulma-button-color-l: var(--bulma-soft-invert-l); -} -.button.is-info.is-bold { - --bulma-button-background-l: var(--bulma-bold-l); - --bulma-button-color-l: var(--bulma-bold-invert-l); -} -.button.is-info[disabled], fieldset[disabled] .button.is-info { - background-color: var(--bulma-info); - border-color: var(--bulma-info); - box-shadow: none; -} -.button.is-success { - --bulma-button-h: var(--bulma-success-h); - --bulma-button-s: var(--bulma-success-s); - --bulma-button-l: var(--bulma-success-l); - --bulma-button-background-l: var(--bulma-success-l); - --bulma-button-border-l: var(--bulma-success-l); - --bulma-button-border-width: 0px; - --bulma-button-color-l: var(--bulma-success-invert-l); - --bulma-button-outer-shadow-a: 0; -} -.button.is-success:focus-visible, .button.is-success.is-focused { - --bulma-button-border-width: 1px; -} -.button.is-success.is-light { - --bulma-button-background-l: var(--bulma-light-l); - --bulma-button-color-l: var(--bulma-success-light-invert-l); -} -.button.is-success.is-dark { - --bulma-button-background-l: var(--bulma-dark-l); - --bulma-button-color-l: var(--bulma-success-dark-invert-l); -} -.button.is-success.is-soft { - --bulma-button-background-l: var(--bulma-soft-l); - --bulma-button-color-l: var(--bulma-soft-invert-l); -} -.button.is-success.is-bold { - --bulma-button-background-l: var(--bulma-bold-l); - --bulma-button-color-l: var(--bulma-bold-invert-l); -} -.button.is-success[disabled], fieldset[disabled] .button.is-success { - background-color: var(--bulma-success); - border-color: var(--bulma-success); - box-shadow: none; -} -.button.is-warning { - --bulma-button-h: var(--bulma-warning-h); - --bulma-button-s: var(--bulma-warning-s); - --bulma-button-l: var(--bulma-warning-l); - --bulma-button-background-l: var(--bulma-warning-l); - --bulma-button-border-l: var(--bulma-warning-l); - --bulma-button-border-width: 0px; - --bulma-button-color-l: var(--bulma-warning-invert-l); - --bulma-button-outer-shadow-a: 0; -} -.button.is-warning:focus-visible, .button.is-warning.is-focused { - --bulma-button-border-width: 1px; -} -.button.is-warning.is-light { - --bulma-button-background-l: var(--bulma-light-l); - --bulma-button-color-l: var(--bulma-warning-light-invert-l); -} -.button.is-warning.is-dark { - --bulma-button-background-l: var(--bulma-dark-l); - --bulma-button-color-l: var(--bulma-warning-dark-invert-l); -} -.button.is-warning.is-soft { - --bulma-button-background-l: var(--bulma-soft-l); - --bulma-button-color-l: var(--bulma-soft-invert-l); -} -.button.is-warning.is-bold { - --bulma-button-background-l: var(--bulma-bold-l); - --bulma-button-color-l: var(--bulma-bold-invert-l); -} -.button.is-warning[disabled], fieldset[disabled] .button.is-warning { - background-color: var(--bulma-warning); - border-color: var(--bulma-warning); - box-shadow: none; -} -.button.is-danger { - --bulma-button-h: var(--bulma-danger-h); - --bulma-button-s: var(--bulma-danger-s); - --bulma-button-l: var(--bulma-danger-l); - --bulma-button-background-l: var(--bulma-danger-l); - --bulma-button-border-l: var(--bulma-danger-l); - --bulma-button-border-width: 0px; - --bulma-button-color-l: var(--bulma-danger-invert-l); - --bulma-button-outer-shadow-a: 0; -} -.button.is-danger:focus-visible, .button.is-danger.is-focused { - --bulma-button-border-width: 1px; -} -.button.is-danger.is-light { - --bulma-button-background-l: var(--bulma-light-l); - --bulma-button-color-l: var(--bulma-danger-light-invert-l); -} -.button.is-danger.is-dark { - --bulma-button-background-l: var(--bulma-dark-l); - --bulma-button-color-l: var(--bulma-danger-dark-invert-l); -} -.button.is-danger.is-soft { - --bulma-button-background-l: var(--bulma-soft-l); - --bulma-button-color-l: var(--bulma-soft-invert-l); -} -.button.is-danger.is-bold { - --bulma-button-background-l: var(--bulma-bold-l); - --bulma-button-color-l: var(--bulma-bold-invert-l); -} -.button.is-danger[disabled], fieldset[disabled] .button.is-danger { - background-color: var(--bulma-danger); - border-color: var(--bulma-danger); - box-shadow: none; -} -.button.is-outlined { - --bulma-button-border-width: max(1px, 0.0625em); - background-color: transparent; - border-color: hsl(var(--bulma-button-h), var(--bulma-button-s), var(--bulma-button-l)); - color: hsl(var(--bulma-button-h), var(--bulma-button-s), var(--bulma-button-l)); -} -.button.is-outlined:hover { - --bulma-button-border-width: max(2px, 0.125em); - --bulma-button-outer-shadow-alpha: 1; -} -.button.is-inverted { - background-color: hsl(var(--bulma-button-h), var(--bulma-button-s), calc(var(--bulma-button-color-l) + var(--bulma-button-background-l-delta))); - color: hsl(var(--bulma-button-h), var(--bulma-button-s), var(--bulma-button-background-l)); -} -.button.is-text { - background-color: transparent; - border-color: transparent; - color: var(--bulma-button-text-color); - text-decoration: var(--bulma-button-text-decoration); -} -.button.is-text:hover, .button.is-text.is-hovered { - background-color: var(--bulma-button-text-hover-background-color); - color: var(--bulma-button-text-hover-color); -} -.button.is-text:active, .button.is-text.is-active { - color: var(--bulma-button-text-hover-color); -} -.button.is-text[disabled], fieldset[disabled] .button.is-text { - background-color: transparent; - border-color: transparent; - box-shadow: none; -} -.button.is-ghost { - background: var(--bulma-button-ghost-background); - border-color: var(--bulma-button-ghost-border-color); - box-shadow: none; - color: var(--bulma-button-ghost-color); - text-decoration: var(--bulma-button-ghost-decoration); -} -.button.is-ghost:hover, .button.is-ghost.is-hovered { - color: var(--bulma-button-ghost-hover-color); - text-decoration: var(--bulma-button-ghost-hover-decoration); -} -.button.is-small { - --bulma-control-size: var(--bulma-size-small); - --bulma-control-radius: var(--bulma-radius-small); -} -.button.is-normal { - --bulma-control-size: var(--bulma-size-normal); - --bulma-control-radius: var(--bulma-radius); -} -.button.is-medium { - --bulma-control-size: var(--bulma-size-medium); - --bulma-control-radius: var(--bulma-radius-medium); -} -.button.is-large { - --bulma-control-size: var(--bulma-size-large); - --bulma-control-radius: var(--bulma-radius-medium); -} -.button.is-fullwidth { - display: flex; - width: 100%; -} -.button.is-loading { - box-shadow: none; - color: transparent !important; - pointer-events: none; -} -.button.is-loading::after { - position: absolute; - left: calc(50% - 1em * 0.5); - top: calc(50% - 1em * 0.5); - position: absolute !important; -} -.button.is-static { - background-color: var(--bulma-button-static-background-color); - border-color: var(--bulma-button-static-border-color); - color: var(--bulma-button-static-color); - box-shadow: none; - pointer-events: none; -} -.button.is-rounded { - border-radius: var(--bulma-radius-rounded); - padding-left: calc(var(--bulma-button-padding-horizontal) + 0.25em - var(--bulma-button-border-width)); - padding-right: calc(var(--bulma-button-padding-horizontal) + 0.25em - var(--bulma-button-border-width)); -} - -.buttons { - align-items: center; - display: flex; - flex-wrap: wrap; - gap: 0.75rem; - justify-content: flex-start; -} -.buttons.are-small { - --bulma-control-size: var(--bulma-size-small); - --bulma-control-radius: var(--bulma-radius-small); -} -.buttons.are-medium { - --bulma-control-size: var(--bulma-size-medium); - --bulma-control-radius: var(--bulma-radius-medium); -} -.buttons.are-large { - --bulma-control-size: var(--bulma-size-large); - --bulma-control-radius: var(--bulma-radius-large); -} -.buttons.has-addons { - gap: 0; -} -.buttons.has-addons .button:not(:first-child) { - border-end-start-radius: 0; - border-start-start-radius: 0; -} -.buttons.has-addons .button:not(:last-child) { - border-end-end-radius: 0; - border-start-end-radius: 0; - margin-inline-end: -1px; -} -.buttons.has-addons .button:hover, .buttons.has-addons .button.is-hovered { - z-index: 2; -} -.buttons.has-addons .button:focus, .buttons.has-addons .button.is-focused, .buttons.has-addons .button:active, .buttons.has-addons .button.is-active, .buttons.has-addons .button.is-selected { - z-index: 3; -} -.buttons.has-addons .button:focus:hover, .buttons.has-addons .button.is-focused:hover, .buttons.has-addons .button:active:hover, .buttons.has-addons .button.is-active:hover, .buttons.has-addons .button.is-selected:hover { - z-index: 4; -} -.buttons.has-addons .button.is-expanded { - flex-grow: 1; - flex-shrink: 1; -} -.buttons.is-centered { - justify-content: center; -} -.buttons.is-right { - justify-content: flex-end; -} - -@media screen and (max-width: 768px) { - .button.is-responsive.is-small { - font-size: calc(var(--bulma-size-small) * 0.75); - } - .button.is-responsive, - .button.is-responsive.is-normal { - font-size: calc(var(--bulma-size-small) * 0.875); - } - .button.is-responsive.is-medium { - font-size: var(--bulma-size-small); - } - .button.is-responsive.is-large { - font-size: var(--bulma-size-normal); - } -} -@media screen and (min-width: 769px) and (max-width: 1023px) { - .button.is-responsive.is-small { - font-size: calc(var(--bulma-size-small) * 0.875); - } - .button.is-responsive, - .button.is-responsive.is-normal { - font-size: var(--bulma-size-small); - } - .button.is-responsive.is-medium { - font-size: var(--bulma-size-normal); - } - .button.is-responsive.is-large { - font-size: var(--bulma-size-medium); - } -} -.box { - --bulma-box-background-color: var(--bulma-scheme-main); - --bulma-box-color: var(--bulma-text); - --bulma-box-radius: var(--bulma-radius-large); - --bulma-box-shadow: var(--bulma-shadow); - --bulma-box-padding: 1.25rem; - --bulma-box-link-hover-shadow: 0 0.5em 1em -0.125em hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.1), 0 0 0 1px var(--bulma-link); - --bulma-box-link-active-shadow: inset 0 1px 2px hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.2), 0 0 0 1px var(--bulma-link); -} - -.box { - background-color: var(--bulma-box-background-color); - border-radius: var(--bulma-box-radius); - box-shadow: var(--bulma-box-shadow); - color: var(--bulma-box-color); - display: block; - padding: var(--bulma-box-padding); -} - -a.box:hover, a.box:focus { - box-shadow: var(--bulma-box-link-hover-shadow); -} -a.box:active { - box-shadow: var(--bulma-box-link-active-shadow); -} - -.icon, -.icon-text { - --bulma-icon-dimensions: 1.5rem; - --bulma-icon-dimensions-small: 1rem; - --bulma-icon-dimensions-medium: 2rem; - --bulma-icon-dimensions-large: 3rem; - --bulma-icon-text-spacing: 0.25em; -} - -.icon { - align-items: center; - display: inline-flex; - flex-shrink: 0; - justify-content: center; - height: var(--bulma-icon-dimensions); - transition-duration: var(--bulma-duration); - transition-property: color; - width: var(--bulma-icon-dimensions); -} -.icon.is-small { - height: var(--bulma-icon-dimensions-small); - width: var(--bulma-icon-dimensions-small); -} -.icon.is-medium { - height: var(--bulma-icon-dimensions-medium); - width: var(--bulma-icon-dimensions-medium); -} -.icon.is-large { - height: var(--bulma-icon-dimensions-large); - width: var(--bulma-icon-dimensions-large); -} - -.icon-text { - align-items: flex-start; - color: inherit; - display: inline-flex; - flex-wrap: wrap; - gap: var(--bulma-icon-text-spacing); - line-height: var(--bulma-icon-dimensions); - vertical-align: top; -} -.icon-text .icon { - flex-grow: 0; - flex-shrink: 0; -} - -div.icon-text { - display: flex; -} - -.content { - --bulma-content-heading-color: var(--bulma-text-strong); - --bulma-content-heading-weight: var(--bulma-weight-extrabold); - --bulma-content-heading-line-height: 1.125; - --bulma-content-block-margin-bottom: 1em; - --bulma-content-blockquote-background-color: var(--bulma-background); - --bulma-content-blockquote-border-left: 5px solid var(--bulma-border); - --bulma-content-blockquote-padding: 1.25em 1.5em; - --bulma-content-pre-padding: 1.25em 1.5em; - --bulma-content-table-cell-border: 1px solid var(--bulma-border); - --bulma-content-table-cell-border-width: 0 0 1px; - --bulma-content-table-cell-padding: 0.5em 0.75em; - --bulma-content-table-cell-heading-color: var(--bulma-text-strong); - --bulma-content-table-head-cell-border-width: 0 0 2px; - --bulma-content-table-head-cell-color: var(--bulma-text-strong); - --bulma-content-table-body-last-row-cell-border-bottom-width: 0; - --bulma-content-table-foot-cell-border-width: 2px 0 0; - --bulma-content-table-foot-cell-color: var(--bulma-text-strong); -} - -.content li + li { - margin-top: 0.25em; -} -.content p:not(:last-child), -.content dl:not(:last-child), -.content ol:not(:last-child), -.content ul:not(:last-child), -.content blockquote:not(:last-child), -.content pre:not(:last-child), -.content table:not(:last-child) { - margin-bottom: var(--bulma-content-block-margin-bottom); -} -.content h1, -.content h2, -.content h3, -.content h4, -.content h5, -.content h6 { - color: var(--bulma-content-heading-color); - font-weight: var(--bulma-content-heading-weight); - line-height: var(--bulma-content-heading-line-height); -} -.content h1 { - font-size: 2em; - margin-bottom: 0.5em; -} -.content h1:not(:first-child) { - margin-top: 1em; -} -.content h2 { - font-size: 1.75em; - margin-bottom: 0.5714em; -} -.content h2:not(:first-child) { - margin-top: 1.1428em; -} -.content h3 { - font-size: 1.5em; - margin-bottom: 0.6666em; -} -.content h3:not(:first-child) { - margin-top: 1.3333em; -} -.content h4 { - font-size: 1.25em; - margin-bottom: 0.8em; -} -.content h5 { - font-size: 1.125em; - margin-bottom: 0.8888em; -} -.content h6 { - font-size: 1em; - margin-bottom: 1em; -} -.content blockquote { - background-color: var(--bulma-content-blockquote-background-color); - border-inline-start: var(--bulma-content-blockquote-border-left); - padding: var(--bulma-content-blockquote-padding); -} -.content ol { - list-style-position: outside; - margin-inline-start: 2em; -} -.content ol:not(:first-child) { - margin-top: 1em; -} -.content ol:not([type]) { - list-style-type: decimal; -} -.content ol:not([type]).is-lower-alpha { - list-style-type: lower-alpha; -} -.content ol:not([type]).is-lower-roman { - list-style-type: lower-roman; -} -.content ol:not([type]).is-upper-alpha { - list-style-type: upper-alpha; -} -.content ol:not([type]).is-upper-roman { - list-style-type: upper-roman; -} -.content ul { - list-style: disc outside; - margin-inline-start: 2em; -} -.content ul:not(:first-child) { - margin-top: 1em; -} -.content ul ul { - list-style-type: circle; - margin-bottom: 0.25em; - margin-top: 0.25em; -} -.content ul ul ul { - list-style-type: square; -} -.content dd { - margin-inline-start: 2em; -} -.content figure:not([class]) { - margin-left: 2em; - margin-right: 2em; - text-align: center; -} -.content figure:not([class]):not(:first-child) { - margin-top: 2em; -} -.content figure:not([class]):not(:last-child) { - margin-bottom: 2em; -} -.content figure:not([class]) img { - display: inline-block; -} -.content figure:not([class]) figcaption { - font-style: italic; -} -.content pre { - -webkit-overflow-scrolling: touch; - overflow-x: auto; - padding: var(--bulma-content-pre-padding); - white-space: pre; - word-wrap: normal; -} -.content sup, -.content sub { - font-size: 75%; -} -.content table td, -.content table th { - border: var(--bulma-content-table-cell-border); - border-width: var(--bulma-content-table-cell-border-width); - padding: var(--bulma-content-table-cell-padding); - vertical-align: top; -} -.content table th { - color: var(--bulma-content-table-cell-heading-color); -} -.content table th:not([align]) { - text-align: inherit; -} -.content table thead td, -.content table thead th { - border-width: var(--bulma-content-table-head-cell-border-width); - color: var(--bulma-content-table-head-cell-color); -} -.content table tfoot td, -.content table tfoot th { - border-width: var(--bulma-content-table-foot-cell-border-width); - color: var(--bulma-content-table-foot-cell-color); -} -.content table tbody tr:last-child td, -.content table tbody tr:last-child th { - border-bottom-width: var(--bulma-content-table-body-last-row-cell-border-bottom-width); -} -.content .tabs li + li { - margin-top: 0; -} -.content.is-small { - font-size: var(--bulma-size-small); -} -.content.is-normal { - font-size: var(--bulma-size-normal); -} -.content.is-medium { - font-size: var(--bulma-size-medium); -} -.content.is-large { - font-size: var(--bulma-size-large); -} - -.progress { - --bulma-progress-border-radius: var(--bulma-radius-rounded); - --bulma-progress-bar-background-color: var(--bulma-border-weak); - --bulma-progress-value-background-color: var(--bulma-text); - --bulma-progress-indeterminate-duration: 1.5s; -} - -.progress { - appearance: none; - border: none; - border-radius: var(--bulma-progress-border-radius); - display: block; - height: var(--bulma-size-normal); - overflow: hidden; - padding: 0; - width: 100%; -} -.progress::-webkit-progress-bar { - background-color: var(--bulma-progress-bar-background-color); -} -.progress::-webkit-progress-value { - background-color: var(--bulma-progress-value-background-color); -} -.progress::-moz-progress-bar { - background-color: var(--bulma-progress-value-background-color); -} -.progress::-ms-fill { - background-color: var(--bulma-progress-value-background-color); - border: none; -} -.progress.is-white { - --bulma-progress-value-background-color: var(--bulma-white); -} -.progress.is-black { - --bulma-progress-value-background-color: var(--bulma-black); -} -.progress.is-light { - --bulma-progress-value-background-color: var(--bulma-light); -} -.progress.is-dark { - --bulma-progress-value-background-color: var(--bulma-dark); -} -.progress.is-text { - --bulma-progress-value-background-color: var(--bulma-text); -} -.progress.is-primary { - --bulma-progress-value-background-color: var(--bulma-primary); -} -.progress.is-link { - --bulma-progress-value-background-color: var(--bulma-link); -} -.progress.is-info { - --bulma-progress-value-background-color: var(--bulma-info); -} -.progress.is-success { - --bulma-progress-value-background-color: var(--bulma-success); -} -.progress.is-warning { - --bulma-progress-value-background-color: var(--bulma-warning); -} -.progress.is-danger { - --bulma-progress-value-background-color: var(--bulma-danger); -} -.progress:indeterminate { - animation-duration: var(--bulma-progress-indeterminate-duration); - animation-iteration-count: infinite; - animation-name: moveIndeterminate; - animation-timing-function: linear; - background-color: var(--bulma-progress-bar-background-color); - background-image: linear-gradient(to right, var(--bulma-progress-value-background-color) 30%, var(--bulma-progress-bar-background-color) 30%); - background-position: top left; - background-repeat: no-repeat; - background-size: 150% 150%; -} -.progress:indeterminate::-webkit-progress-bar { - background-color: transparent; -} -.progress:indeterminate::-moz-progress-bar { - background-color: transparent; -} -.progress:indeterminate::-ms-fill { - animation-name: none; -} -.progress.is-small { - height: var(--bulma-size-small); -} -.progress.is-medium { - height: var(--bulma-size-medium); -} -.progress.is-large { - height: var(--bulma-size-large); -} - -@keyframes moveIndeterminate { - from { - background-position: 200% 0; - } - to { - background-position: -200% 0; - } -} -.tags { - align-items: center; - color: hsl(var(--bulma-tag-h), var(--bulma-tag-s), var(--bulma-tag-color-l)); - display: flex; - flex-wrap: wrap; - gap: 0.5rem; - justify-content: flex-start; -} -.tags.are-medium .tag:not(.is-normal):not(.is-large) { - font-size: var(--bulma-size-normal); -} -.tags.are-large .tag:not(.is-normal):not(.is-medium) { - font-size: var(--bulma-size-medium); -} -.tags.is-centered { - gap: 0.25rem; - justify-content: center; -} -.tags.is-right { - justify-content: flex-end; -} -.tags.has-addons { - gap: 0; -} -.tags.has-addons .tag:not(:first-child) { - border-start-start-radius: 0; - border-end-start-radius: 0; -} -.tags.has-addons .tag:not(:last-child) { - border-start-end-radius: 0; - border-end-end-radius: 0; -} - -.tag { - --bulma-tag-h: var(--bulma-scheme-h); - --bulma-tag-s: var(--bulma-scheme-s); - --bulma-tag-background-l: var(--bulma-background-l); - --bulma-tag-background-l-delta: 0%; - --bulma-tag-hover-background-l-delta: var(--bulma-hover-background-l-delta); - --bulma-tag-active-background-l-delta: var(--bulma-active-background-l-delta); - --bulma-tag-color-l: var(--bulma-text-l); - --bulma-tag-radius: var(--bulma-radius); - --bulma-tag-delete-margin: 1px; - align-items: center; - background-color: hsl(var(--bulma-tag-h), var(--bulma-tag-s), calc(var(--bulma-tag-background-l) + var(--bulma-tag-background-l-delta))); - border-radius: var(--bulma-radius); - color: hsl(var(--bulma-tag-h), var(--bulma-tag-s), var(--bulma-tag-color-l)); - display: inline-flex; - font-size: var(--bulma-size-small); - height: 2em; - justify-content: center; - line-height: 1.5; - padding-left: 0.75em; - padding-right: 0.75em; - white-space: nowrap; -} -.tag .delete { - margin-inline-start: 0.25rem; - margin-inline-end: -0.375rem; -} -.tag.is-white { - --bulma-tag-h: var(--bulma-white-h); - --bulma-tag-s: var(--bulma-white-s); - --bulma-tag-background-l: var(--bulma-white-l); - --bulma-tag-color-l: var(--bulma-white-invert-l); -} -.tag.is-white.is-light { - --bulma-tag-background-l: var(--bulma-light-l); - --bulma-tag-color-l: var(--bulma-white-light-invert-l); -} -.tag.is-black { - --bulma-tag-h: var(--bulma-black-h); - --bulma-tag-s: var(--bulma-black-s); - --bulma-tag-background-l: var(--bulma-black-l); - --bulma-tag-color-l: var(--bulma-black-invert-l); -} -.tag.is-black.is-light { - --bulma-tag-background-l: var(--bulma-light-l); - --bulma-tag-color-l: var(--bulma-black-light-invert-l); -} -.tag.is-light { - --bulma-tag-h: var(--bulma-light-h); - --bulma-tag-s: var(--bulma-light-s); - --bulma-tag-background-l: var(--bulma-light-l); - --bulma-tag-color-l: var(--bulma-light-invert-l); -} -.tag.is-light.is-light { - --bulma-tag-background-l: var(--bulma-light-l); - --bulma-tag-color-l: var(--bulma-light-light-invert-l); -} -.tag.is-dark { - --bulma-tag-h: var(--bulma-dark-h); - --bulma-tag-s: var(--bulma-dark-s); - --bulma-tag-background-l: var(--bulma-dark-l); - --bulma-tag-color-l: var(--bulma-dark-invert-l); -} -.tag.is-dark.is-light { - --bulma-tag-background-l: var(--bulma-light-l); - --bulma-tag-color-l: var(--bulma-dark-light-invert-l); -} -.tag.is-text { - --bulma-tag-h: var(--bulma-text-h); - --bulma-tag-s: var(--bulma-text-s); - --bulma-tag-background-l: var(--bulma-text-l); - --bulma-tag-color-l: var(--bulma-text-invert-l); -} -.tag.is-text.is-light { - --bulma-tag-background-l: var(--bulma-light-l); - --bulma-tag-color-l: var(--bulma-text-light-invert-l); -} -.tag.is-primary { - --bulma-tag-h: var(--bulma-primary-h); - --bulma-tag-s: var(--bulma-primary-s); - --bulma-tag-background-l: var(--bulma-primary-l); - --bulma-tag-color-l: var(--bulma-primary-invert-l); -} -.tag.is-primary.is-light { - --bulma-tag-background-l: var(--bulma-light-l); - --bulma-tag-color-l: var(--bulma-primary-light-invert-l); -} -.tag.is-link { - --bulma-tag-h: var(--bulma-link-h); - --bulma-tag-s: var(--bulma-link-s); - --bulma-tag-background-l: var(--bulma-link-l); - --bulma-tag-color-l: var(--bulma-link-invert-l); -} -.tag.is-link.is-light { - --bulma-tag-background-l: var(--bulma-light-l); - --bulma-tag-color-l: var(--bulma-link-light-invert-l); -} -.tag.is-info { - --bulma-tag-h: var(--bulma-info-h); - --bulma-tag-s: var(--bulma-info-s); - --bulma-tag-background-l: var(--bulma-info-l); - --bulma-tag-color-l: var(--bulma-info-invert-l); -} -.tag.is-info.is-light { - --bulma-tag-background-l: var(--bulma-light-l); - --bulma-tag-color-l: var(--bulma-info-light-invert-l); -} -.tag.is-success { - --bulma-tag-h: var(--bulma-success-h); - --bulma-tag-s: var(--bulma-success-s); - --bulma-tag-background-l: var(--bulma-success-l); - --bulma-tag-color-l: var(--bulma-success-invert-l); -} -.tag.is-success.is-light { - --bulma-tag-background-l: var(--bulma-light-l); - --bulma-tag-color-l: var(--bulma-success-light-invert-l); -} -.tag.is-warning { - --bulma-tag-h: var(--bulma-warning-h); - --bulma-tag-s: var(--bulma-warning-s); - --bulma-tag-background-l: var(--bulma-warning-l); - --bulma-tag-color-l: var(--bulma-warning-invert-l); -} -.tag.is-warning.is-light { - --bulma-tag-background-l: var(--bulma-light-l); - --bulma-tag-color-l: var(--bulma-warning-light-invert-l); -} -.tag.is-danger { - --bulma-tag-h: var(--bulma-danger-h); - --bulma-tag-s: var(--bulma-danger-s); - --bulma-tag-background-l: var(--bulma-danger-l); - --bulma-tag-color-l: var(--bulma-danger-invert-l); -} -.tag.is-danger.is-light { - --bulma-tag-background-l: var(--bulma-light-l); - --bulma-tag-color-l: var(--bulma-danger-light-invert-l); -} -.tag.is-normal { - font-size: var(--bulma-size-small); -} -.tag.is-medium { - font-size: var(--bulma-size-normal); -} -.tag.is-large { - font-size: var(--bulma-size-medium); -} -.tag .icon:first-child:not(:last-child) { - margin-inline-start: -0.375em; - margin-inline-end: 0.1875em; -} -.tag .icon:last-child:not(:first-child) { - margin-inline-start: 0.1875em; - margin-inline-end: -0.375em; -} -.tag .icon:first-child:last-child { - margin-inline-start: -0.375em; - margin-inline-end: -0.375em; -} -.tag.is-delete { - margin-inline-start: var(--bulma-tag-delete-margin); - padding: 0; - position: relative; - width: 2em; -} -.tag.is-delete::before, .tag.is-delete::after { - background-color: currentColor; - content: ""; - display: block; - left: 50%; - position: absolute; - top: 50%; - transform: translateX(-50%) translateY(-50%) rotate(45deg); - transform-origin: center center; -} -.tag.is-delete::before { - height: 1px; - width: 50%; -} -.tag.is-delete::after { - height: 50%; - width: 1px; -} -.tag.is-rounded { - border-radius: var(--bulma-radius-rounded); -} - -a.tag, -button.tag, -.tag.is-hoverable { - cursor: pointer; -} -a.tag:hover, -button.tag:hover, -.tag.is-hoverable:hover { - --bulma-tag-background-l-delta: var(--bulma-tag-hover-background-l-delta); -} -a.tag:active, -button.tag:active, -.tag.is-hoverable:active { - --bulma-tag-background-l-delta: var(--bulma-tag-active-background-l-delta); -} - -.table { - --bulma-table-color: var(--bulma-text-strong); - --bulma-table-background-color: var(--bulma-scheme-main); - --bulma-table-cell-border-color: var(--bulma-border); - --bulma-table-cell-border-style: solid; - --bulma-table-cell-border-width: 0 0 1px; - --bulma-table-cell-padding: 0.5em 0.75em; - --bulma-table-cell-heading-color: var(--bulma-text-strong); - --bulma-table-cell-text-align: left; - --bulma-table-head-cell-border-width: 0 0 2px; - --bulma-table-head-cell-color: var(--bulma-text-strong); - --bulma-table-foot-cell-border-width: 2px 0 0; - --bulma-table-foot-cell-color: var(--bulma-text-strong); - --bulma-table-head-background-color: transparent; - --bulma-table-body-background-color: transparent; - --bulma-table-foot-background-color: transparent; - --bulma-table-row-hover-background-color: var(--bulma-scheme-main-bis); - --bulma-table-row-active-background-color: var(--bulma-primary); - --bulma-table-row-active-color: var(--bulma-primary-invert); - --bulma-table-striped-row-even-background-color: var(--bulma-scheme-main-bis); - --bulma-table-striped-row-even-hover-background-color: var(--bulma-scheme-main-ter); -} - -.table { - background-color: var(--bulma-table-background-color); - color: var(--bulma-table-color); -} -.table td, -.table th { - background-color: var(--bulma-table-cell-background-color); - border-color: var(--bulma-table-cell-border-color); - border-style: var(--bulma-table-cell-border-style); - border-width: var(--bulma-table-cell-border-width); - color: var(--bulma-table-color); - padding: var(--bulma-table-cell-padding); - vertical-align: top; -} -.table td.is-white, -.table th.is-white { - --bulma-table-color: var(--bulma-white-invert); - --bulma-table-cell-heading-color: var(--bulma-white-invert); - --bulma-table-cell-background-color: var(--bulma-white); - --bulma-table-cell-border-color: var(--bulma-white); -} -.table td.is-black, -.table th.is-black { - --bulma-table-color: var(--bulma-black-invert); - --bulma-table-cell-heading-color: var(--bulma-black-invert); - --bulma-table-cell-background-color: var(--bulma-black); - --bulma-table-cell-border-color: var(--bulma-black); -} -.table td.is-light, -.table th.is-light { - --bulma-table-color: var(--bulma-light-invert); - --bulma-table-cell-heading-color: var(--bulma-light-invert); - --bulma-table-cell-background-color: var(--bulma-light); - --bulma-table-cell-border-color: var(--bulma-light); -} -.table td.is-dark, -.table th.is-dark { - --bulma-table-color: var(--bulma-dark-invert); - --bulma-table-cell-heading-color: var(--bulma-dark-invert); - --bulma-table-cell-background-color: var(--bulma-dark); - --bulma-table-cell-border-color: var(--bulma-dark); -} -.table td.is-text, -.table th.is-text { - --bulma-table-color: var(--bulma-text-invert); - --bulma-table-cell-heading-color: var(--bulma-text-invert); - --bulma-table-cell-background-color: var(--bulma-text); - --bulma-table-cell-border-color: var(--bulma-text); -} -.table td.is-primary, -.table th.is-primary { - --bulma-table-color: var(--bulma-primary-invert); - --bulma-table-cell-heading-color: var(--bulma-primary-invert); - --bulma-table-cell-background-color: var(--bulma-primary); - --bulma-table-cell-border-color: var(--bulma-primary); -} -.table td.is-link, -.table th.is-link { - --bulma-table-color: var(--bulma-link-invert); - --bulma-table-cell-heading-color: var(--bulma-link-invert); - --bulma-table-cell-background-color: var(--bulma-link); - --bulma-table-cell-border-color: var(--bulma-link); -} -.table td.is-info, -.table th.is-info { - --bulma-table-color: var(--bulma-info-invert); - --bulma-table-cell-heading-color: var(--bulma-info-invert); - --bulma-table-cell-background-color: var(--bulma-info); - --bulma-table-cell-border-color: var(--bulma-info); -} -.table td.is-success, -.table th.is-success { - --bulma-table-color: var(--bulma-success-invert); - --bulma-table-cell-heading-color: var(--bulma-success-invert); - --bulma-table-cell-background-color: var(--bulma-success); - --bulma-table-cell-border-color: var(--bulma-success); -} -.table td.is-warning, -.table th.is-warning { - --bulma-table-color: var(--bulma-warning-invert); - --bulma-table-cell-heading-color: var(--bulma-warning-invert); - --bulma-table-cell-background-color: var(--bulma-warning); - --bulma-table-cell-border-color: var(--bulma-warning); -} -.table td.is-danger, -.table th.is-danger { - --bulma-table-color: var(--bulma-danger-invert); - --bulma-table-cell-heading-color: var(--bulma-danger-invert); - --bulma-table-cell-background-color: var(--bulma-danger); - --bulma-table-cell-border-color: var(--bulma-danger); -} -.table td.is-narrow, -.table th.is-narrow { - white-space: nowrap; - width: 1%; -} -.table td.is-selected, -.table th.is-selected { - background-color: var(--bulma-table-row-active-background-color); - color: var(--bulma-table-row-active-color); -} -.table td.is-selected a, -.table td.is-selected strong, -.table th.is-selected a, -.table th.is-selected strong { - color: currentColor; -} -.table td.is-vcentered, -.table th.is-vcentered { - vertical-align: middle; -} -.table th { - color: var(--bulma-table-cell-heading-color); -} -.table th:not([align]) { - text-align: var(--bulma-table-cell-text-align); -} -.table tr.is-selected { - background-color: var(--bulma-table-row-active-background-color); - color: var(--bulma-table-row-active-color); -} -.table tr.is-selected a, -.table tr.is-selected strong { - color: currentColor; -} -.table tr.is-selected td, -.table tr.is-selected th { - border-color: var(--bulma-table-row-active-color); - color: currentColor; -} -.table tr.is-white { - --bulma-table-color: var(--bulma-white-invert); - --bulma-table-cell-heading-color: var(--bulma-white-invert); - --bulma-table-cell-background-color: var(--bulma-white); - --bulma-table-cell-border-color: var(--bulma-white); -} -.table tr.is-black { - --bulma-table-color: var(--bulma-black-invert); - --bulma-table-cell-heading-color: var(--bulma-black-invert); - --bulma-table-cell-background-color: var(--bulma-black); - --bulma-table-cell-border-color: var(--bulma-black); -} -.table tr.is-light { - --bulma-table-color: var(--bulma-light-invert); - --bulma-table-cell-heading-color: var(--bulma-light-invert); - --bulma-table-cell-background-color: var(--bulma-light); - --bulma-table-cell-border-color: var(--bulma-light); -} -.table tr.is-dark { - --bulma-table-color: var(--bulma-dark-invert); - --bulma-table-cell-heading-color: var(--bulma-dark-invert); - --bulma-table-cell-background-color: var(--bulma-dark); - --bulma-table-cell-border-color: var(--bulma-dark); -} -.table tr.is-text { - --bulma-table-color: var(--bulma-text-invert); - --bulma-table-cell-heading-color: var(--bulma-text-invert); - --bulma-table-cell-background-color: var(--bulma-text); - --bulma-table-cell-border-color: var(--bulma-text); -} -.table tr.is-primary { - --bulma-table-color: var(--bulma-primary-invert); - --bulma-table-cell-heading-color: var(--bulma-primary-invert); - --bulma-table-cell-background-color: var(--bulma-primary); - --bulma-table-cell-border-color: var(--bulma-primary); -} -.table tr.is-link { - --bulma-table-color: var(--bulma-link-invert); - --bulma-table-cell-heading-color: var(--bulma-link-invert); - --bulma-table-cell-background-color: var(--bulma-link); - --bulma-table-cell-border-color: var(--bulma-link); -} -.table tr.is-info { - --bulma-table-color: var(--bulma-info-invert); - --bulma-table-cell-heading-color: var(--bulma-info-invert); - --bulma-table-cell-background-color: var(--bulma-info); - --bulma-table-cell-border-color: var(--bulma-info); -} -.table tr.is-success { - --bulma-table-color: var(--bulma-success-invert); - --bulma-table-cell-heading-color: var(--bulma-success-invert); - --bulma-table-cell-background-color: var(--bulma-success); - --bulma-table-cell-border-color: var(--bulma-success); -} -.table tr.is-warning { - --bulma-table-color: var(--bulma-warning-invert); - --bulma-table-cell-heading-color: var(--bulma-warning-invert); - --bulma-table-cell-background-color: var(--bulma-warning); - --bulma-table-cell-border-color: var(--bulma-warning); -} -.table tr.is-danger { - --bulma-table-color: var(--bulma-danger-invert); - --bulma-table-cell-heading-color: var(--bulma-danger-invert); - --bulma-table-cell-background-color: var(--bulma-danger); - --bulma-table-cell-border-color: var(--bulma-danger); -} -.table thead { - background-color: var(--bulma-table-head-background-color); -} -.table thead td, -.table thead th { - border-width: var(--bulma-table-head-cell-border-width); - color: var(--bulma-table-head-cell-color); -} -.table tfoot { - background-color: var(--bulma-table-foot-background-color); -} -.table tfoot td, -.table tfoot th { - border-width: var(--bulma-table-foot-cell-border-width); - color: var(--bulma-table-foot-cell-color); -} -.table tbody { - background-color: var(--bulma-table-body-background-color); -} -.table tbody tr:last-child td, -.table tbody tr:last-child th { - border-bottom-width: 0; -} -.table.is-bordered td, -.table.is-bordered th { - border-width: 1px; -} -.table.is-bordered tr:last-child td, -.table.is-bordered tr:last-child th { - border-bottom-width: 1px; -} -.table.is-fullwidth { - width: 100%; -} -.table.is-hoverable tbody tr:not(.is-selected):hover { - background-color: var(--bulma-table-row-hover-background-color); -} -.table.is-hoverable.is-striped tbody tr:not(.is-selected):hover { - background-color: var(--bulma-table-row-hover-background-color); -} -.table.is-hoverable.is-striped tbody tr:not(.is-selected):hover:nth-child(even) { - background-color: var(--bulma-table-striped-row-even-hover-background-color); -} -.table.is-narrow td, -.table.is-narrow th { - padding: 0.25em 0.5em; -} -.table.is-striped tbody tr:not(.is-selected):nth-child(even) { - background-color: var(--bulma-table-striped-row-even-background-color); -} - -.table-container { - -webkit-overflow-scrolling: touch; - overflow: auto; - overflow-y: hidden; - max-width: 100%; -} - -.title, -.subtitle { - --bulma-title-color: var(--bulma-text-strong); - --bulma-title-family: false; - --bulma-title-size: var(--bulma-size-3); - --bulma-title-weight: var(--bulma-weight-extrabold); - --bulma-title-line-height: 1.125; - --bulma-title-strong-color: inherit; - --bulma-title-strong-weight: inherit; - --bulma-title-sub-size: 0.75em; - --bulma-title-sup-size: 0.75em; - --bulma-subtitle-color: var(--bulma-text); - --bulma-subtitle-family: false; - --bulma-subtitle-size: var(--bulma-size-5); - --bulma-subtitle-weight: var(--bulma-weight-normal); - --bulma-subtitle-line-height: 1.25; - --bulma-subtitle-strong-color: var(--bulma-text-strong); - --bulma-subtitle-strong-weight: var(--bulma-weight-semibold); -} - -.title, -.subtitle { - word-break: break-word; -} -.title em, -.title span, -.subtitle em, -.subtitle span { - font-weight: inherit; -} -.title sub, -.subtitle sub { - font-size: var(--bulma-title-sub-size); -} -.title sup, -.subtitle sup { - font-size: var(--bulma-title-sup-size); -} -.title .tag, -.subtitle .tag { - vertical-align: middle; -} - -.title { - color: var(--bulma-title-color); - font-size: var(--bulma-title-size); - font-weight: var(--bulma-title-weight); - line-height: var(--bulma-title-line-height); -} -.title strong { - color: var(--bulma-title-strong-color); - font-weight: var(--bulma-title-strong-weight); -} -.title:not(.is-spaced):has(+ .subtitle) { - margin-bottom: 0; -} -.title.is-1 { - font-size: 3rem; -} -.title.is-2 { - font-size: 2.5rem; -} -.title.is-3 { - font-size: 2rem; -} -.title.is-4 { - font-size: 1.5rem; -} -.title.is-5 { - font-size: 1.25rem; -} -.title.is-6 { - font-size: 1rem; -} -.title.is-7 { - font-size: 0.75rem; -} - -.subtitle { - color: var(--bulma-subtitle-color); - font-size: var(--bulma-subtitle-size); - font-weight: var(--bulma-subtitle-weight); - line-height: var(--bulma-subtitle-line-height); -} -.subtitle strong { - color: var(--bulma-subtitle-strong-color); - font-weight: var(--bulma-subtitle-strong-weight); -} -.subtitle:not(.is-spaced):has(+ .title) { - margin-bottom: 0; -} -.subtitle.is-1 { - font-size: 3rem; -} -.subtitle.is-2 { - font-size: 2.5rem; -} -.subtitle.is-3 { - font-size: 2rem; -} -.subtitle.is-4 { - font-size: 1.5rem; -} -.subtitle.is-5 { - font-size: 1.25rem; -} -.subtitle.is-6 { - font-size: 1rem; -} -.subtitle.is-7 { - font-size: 0.75rem; -} - -/* Bulma Form */ -.control, -.input, -.textarea, -.select { - --bulma-input-h: var(--bulma-scheme-h); - --bulma-input-s: var(--bulma-scheme-s); - --bulma-input-l: var(--bulma-scheme-main-l); - --bulma-input-border-style: solid; - --bulma-input-border-width: var(--bulma-control-border-width); - --bulma-input-border-l: var(--bulma-border-l); - --bulma-input-border-l-delta: 0%; - --bulma-input-hover-border-l-delta: var(--bulma-hover-border-l-delta); - --bulma-input-active-border-l-delta: var(--bulma-active-border-l-delta); - --bulma-input-focus-h: var(--bulma-focus-h); - --bulma-input-focus-s: var(--bulma-focus-s); - --bulma-input-focus-l: var(--bulma-focus-l); - --bulma-input-focus-shadow-size: var(--bulma-focus-shadow-size); - --bulma-input-focus-shadow-alpha: var(--bulma-focus-shadow-alpha); - --bulma-input-color-l: var(--bulma-text-strong-l); - --bulma-input-background-l: var(--bulma-scheme-main-l); - --bulma-input-background-l-delta: 0%; - --bulma-input-height: var(--bulma-control-height); - --bulma-input-shadow: inset 0 0.0625em 0.125em hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.05); - --bulma-input-placeholder-color: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-strong-l), 0.3); - --bulma-input-disabled-color: var(--bulma-text-weak); - --bulma-input-disabled-background-color: var(--bulma-background); - --bulma-input-disabled-border-color: var(--bulma-background); - --bulma-input-disabled-placeholder-color: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-weak-l), 0.3); - --bulma-input-arrow: var(--bulma-link); - --bulma-input-icon-color: var(--bulma-text-light); - --bulma-input-icon-hover-color: var(--bulma-text-weak); - --bulma-input-icon-focus-color: var(--bulma-link); - --bulma-input-radius: var(--bulma-radius); -} - -.select select, .input, .textarea { - background-color: hsl(var(--bulma-input-h), var(--bulma-input-s), calc(var(--bulma-input-background-l) + var(--bulma-input-background-l-delta))); - border-color: hsl(var(--bulma-input-h), var(--bulma-input-s), calc(var(--bulma-input-border-l) + var(--bulma-input-border-l-delta))); - border-radius: var(--bulma-input-radius); - color: hsl(var(--bulma-input-h), var(--bulma-input-s), var(--bulma-input-color-l)); -} -.select select::-moz-placeholder, .input::-moz-placeholder, .textarea::-moz-placeholder { - color: var(--bulma-input-placeholder-color); -} -.select select::-webkit-input-placeholder, .input::-webkit-input-placeholder, .textarea::-webkit-input-placeholder { - color: var(--bulma-input-placeholder-color); -} -.select select:-moz-placeholder, .input:-moz-placeholder, .textarea:-moz-placeholder { - color: var(--bulma-input-placeholder-color); -} -.select select:-ms-input-placeholder, .input:-ms-input-placeholder, .textarea:-ms-input-placeholder { - color: var(--bulma-input-placeholder-color); -} -.select select:hover, .input:hover, .textarea:hover, .select select.is-hovered, .is-hovered.input, .is-hovered.textarea { - --bulma-input-border-l-delta: var(--bulma-input-hover-border-l-delta); -} -.select select:active, .input:active, .textarea:active, .select select.is-active, .is-active.input, .is-active.textarea { - --bulma-input-border-l-delta: var(--bulma-input-active-border-l-delta); -} -.select select:focus, .input:focus, .textarea:focus, .select select:focus-within, .input:focus-within, .textarea:focus-within, .select select.is-focused, .is-focused.input, .is-focused.textarea { - border-color: hsl(var(--bulma-input-focus-h), var(--bulma-input-focus-s), var(--bulma-input-focus-l)); - box-shadow: var(--bulma-input-focus-shadow-size) hsla(var(--bulma-input-focus-h), var(--bulma-input-focus-s), var(--bulma-input-focus-l), var(--bulma-input-focus-shadow-alpha)); -} -.select select[disabled], [disabled].input, [disabled].textarea, fieldset[disabled] .select select, .select fieldset[disabled] select, fieldset[disabled] .input, fieldset[disabled] .textarea { - background-color: var(--bulma-input-disabled-background-color); - border-color: var(--bulma-input-disabled-border-color); - box-shadow: none; - color: var(--bulma-input-disabled-color); -} -.select select[disabled]::-moz-placeholder, [disabled].input::-moz-placeholder, [disabled].textarea::-moz-placeholder, fieldset[disabled] .select select::-moz-placeholder, .select fieldset[disabled] select::-moz-placeholder, fieldset[disabled] .input::-moz-placeholder, fieldset[disabled] .textarea::-moz-placeholder { - color: var(--bulma-input-disabled-placeholder-color); -} -.select select[disabled]::-webkit-input-placeholder, [disabled].input::-webkit-input-placeholder, [disabled].textarea::-webkit-input-placeholder, fieldset[disabled] .select select::-webkit-input-placeholder, .select fieldset[disabled] select::-webkit-input-placeholder, fieldset[disabled] .input::-webkit-input-placeholder, fieldset[disabled] .textarea::-webkit-input-placeholder { - color: var(--bulma-input-disabled-placeholder-color); -} -.select select[disabled]:-moz-placeholder, [disabled].input:-moz-placeholder, [disabled].textarea:-moz-placeholder, fieldset[disabled] .select select:-moz-placeholder, .select fieldset[disabled] select:-moz-placeholder, fieldset[disabled] .input:-moz-placeholder, fieldset[disabled] .textarea:-moz-placeholder { - color: var(--bulma-input-disabled-placeholder-color); -} -.select select[disabled]:-ms-input-placeholder, [disabled].input:-ms-input-placeholder, [disabled].textarea:-ms-input-placeholder, fieldset[disabled] .select select:-ms-input-placeholder, .select fieldset[disabled] select:-ms-input-placeholder, fieldset[disabled] .input:-ms-input-placeholder, fieldset[disabled] .textarea:-ms-input-placeholder { - color: var(--bulma-input-disabled-placeholder-color); -} - -/* Bulma Form */ -.textarea, .input { - box-shadow: inset 0 0.0625em 0.125em hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.05); - max-width: 100%; - width: 100%; -} -[readonly].textarea, [readonly].input { - box-shadow: none; -} -.is-white.textarea, .is-white.input { - --bulma-input-h: var(--bulma-white-h); - --bulma-input-s: var(--bulma-white-s); - --bulma-input-l: var(--bulma-white-l); - --bulma-input-focus-h: var(--bulma-white-h); - --bulma-input-focus-s: var(--bulma-white-s); - --bulma-input-focus-l: var(--bulma-white-l); - --bulma-input-border-l: var(--bulma-white-l); -} -.is-black.textarea, .is-black.input { - --bulma-input-h: var(--bulma-black-h); - --bulma-input-s: var(--bulma-black-s); - --bulma-input-l: var(--bulma-black-l); - --bulma-input-focus-h: var(--bulma-black-h); - --bulma-input-focus-s: var(--bulma-black-s); - --bulma-input-focus-l: var(--bulma-black-l); - --bulma-input-border-l: var(--bulma-black-l); -} -.is-light.textarea, .is-light.input { - --bulma-input-h: var(--bulma-light-h); - --bulma-input-s: var(--bulma-light-s); - --bulma-input-l: var(--bulma-light-l); - --bulma-input-focus-h: var(--bulma-light-h); - --bulma-input-focus-s: var(--bulma-light-s); - --bulma-input-focus-l: var(--bulma-light-l); - --bulma-input-border-l: var(--bulma-light-l); -} -.is-dark.textarea, .is-dark.input { - --bulma-input-h: var(--bulma-dark-h); - --bulma-input-s: var(--bulma-dark-s); - --bulma-input-l: var(--bulma-dark-l); - --bulma-input-focus-h: var(--bulma-dark-h); - --bulma-input-focus-s: var(--bulma-dark-s); - --bulma-input-focus-l: var(--bulma-dark-l); - --bulma-input-border-l: var(--bulma-dark-l); -} -.is-text.textarea, .is-text.input { - --bulma-input-h: var(--bulma-text-h); - --bulma-input-s: var(--bulma-text-s); - --bulma-input-l: var(--bulma-text-l); - --bulma-input-focus-h: var(--bulma-text-h); - --bulma-input-focus-s: var(--bulma-text-s); - --bulma-input-focus-l: var(--bulma-text-l); - --bulma-input-border-l: var(--bulma-text-l); -} -.is-primary.textarea, .is-primary.input { - --bulma-input-h: var(--bulma-primary-h); - --bulma-input-s: var(--bulma-primary-s); - --bulma-input-l: var(--bulma-primary-l); - --bulma-input-focus-h: var(--bulma-primary-h); - --bulma-input-focus-s: var(--bulma-primary-s); - --bulma-input-focus-l: var(--bulma-primary-l); - --bulma-input-border-l: var(--bulma-primary-l); -} -.is-link.textarea, .is-link.input { - --bulma-input-h: var(--bulma-link-h); - --bulma-input-s: var(--bulma-link-s); - --bulma-input-l: var(--bulma-link-l); - --bulma-input-focus-h: var(--bulma-link-h); - --bulma-input-focus-s: var(--bulma-link-s); - --bulma-input-focus-l: var(--bulma-link-l); - --bulma-input-border-l: var(--bulma-link-l); -} -.is-info.textarea, .is-info.input { - --bulma-input-h: var(--bulma-info-h); - --bulma-input-s: var(--bulma-info-s); - --bulma-input-l: var(--bulma-info-l); - --bulma-input-focus-h: var(--bulma-info-h); - --bulma-input-focus-s: var(--bulma-info-s); - --bulma-input-focus-l: var(--bulma-info-l); - --bulma-input-border-l: var(--bulma-info-l); -} -.is-success.textarea, .is-success.input { - --bulma-input-h: var(--bulma-success-h); - --bulma-input-s: var(--bulma-success-s); - --bulma-input-l: var(--bulma-success-l); - --bulma-input-focus-h: var(--bulma-success-h); - --bulma-input-focus-s: var(--bulma-success-s); - --bulma-input-focus-l: var(--bulma-success-l); - --bulma-input-border-l: var(--bulma-success-l); -} -.is-warning.textarea, .is-warning.input { - --bulma-input-h: var(--bulma-warning-h); - --bulma-input-s: var(--bulma-warning-s); - --bulma-input-l: var(--bulma-warning-l); - --bulma-input-focus-h: var(--bulma-warning-h); - --bulma-input-focus-s: var(--bulma-warning-s); - --bulma-input-focus-l: var(--bulma-warning-l); - --bulma-input-border-l: var(--bulma-warning-l); -} -.is-danger.textarea, .is-danger.input { - --bulma-input-h: var(--bulma-danger-h); - --bulma-input-s: var(--bulma-danger-s); - --bulma-input-l: var(--bulma-danger-l); - --bulma-input-focus-h: var(--bulma-danger-h); - --bulma-input-focus-s: var(--bulma-danger-s); - --bulma-input-focus-l: var(--bulma-danger-l); - --bulma-input-border-l: var(--bulma-danger-l); -} -.is-small.textarea, .is-small.input { - border-radius: var(--bulma-radius-small); - font-size: var(--bulma-size-small); -} -.is-medium.textarea, .is-medium.input { - font-size: var(--bulma-size-medium); -} -.is-large.textarea, .is-large.input { - font-size: var(--bulma-size-large); -} -.is-fullwidth.textarea, .is-fullwidth.input { - display: block; - width: 100%; -} -.is-inline.textarea, .is-inline.input { - display: inline; - width: auto; -} - -.input.is-rounded { - border-radius: var(--bulma-radius-rounded); - padding-left: calc(calc(0.75em - 1px) + 0.375em); - padding-right: calc(calc(0.75em - 1px) + 0.375em); -} -.input.is-static { - background-color: transparent; - border-color: transparent; - box-shadow: none; - padding-left: 0; - padding-right: 0; -} - -.textarea { - --bulma-textarea-padding: var(--bulma-control-padding-horizontal); - --bulma-textarea-max-height: 40em; - --bulma-textarea-min-height: 8em; - display: block; - max-width: 100%; - min-width: 100%; - padding: var(--bulma-textarea-padding); - resize: vertical; -} -.textarea:not([rows]) { - max-height: var(--bulma-textarea-max-height); - min-height: var(--bulma-textarea-min-height); -} -.textarea[rows] { - height: initial; -} -.textarea.has-fixed-size { - resize: none; -} - -/* Bulma Form */ -.radio, .checkbox { - cursor: pointer; - display: inline-block; - line-height: 1.25; - position: relative; -} -.radio input, .checkbox input { - cursor: pointer; -} -[disabled].radio, [disabled].checkbox, fieldset[disabled] .radio, fieldset[disabled] .checkbox, -.radio input[disabled], -.checkbox input[disabled] { - color: var(--bulma-text-weak); - cursor: not-allowed; -} - -.checkboxes, -.radios { - display: flex; - flex-wrap: wrap; - column-gap: 1em; - row-gap: 0.5em; -} - -/* Bulma Form */ -.select { - --bulma-input-h: var(--bulma-scheme-h); - --bulma-input-s: var(--bulma-scheme-s); - --bulma-input-border-style: solid; - --bulma-input-border-width: 1px; - --bulma-input-border-l: var(--bulma-border-l); - display: inline-block; - max-width: 100%; - position: relative; - vertical-align: top; -} -.select:not(.is-multiple) { - height: var(--bulma-control-height); -} -.select:not(.is-multiple):not(.is-loading)::after { - inset-inline-end: 1.125em; - z-index: 4; -} -.select.is-rounded select { - border-radius: var(--bulma-radius-rounded); - padding-inline-start: 1em; -} -.select select { - cursor: pointer; - display: block; - font-size: 1em; - max-width: 100%; - outline: none; -} -.select select::-ms-expand { - display: none; -} -.select select[disabled]:hover, fieldset[disabled] .select select:hover { - border-color: var(--bulma-background); -} -.select select:not([multiple]) { - padding-inline-end: 2.5em; -} -.select select[multiple] { - height: auto; - padding: 0; -} -.select select[multiple] option { - padding: 0.5em 1em; -} -.select.is-white { - --bulma-input-h: var(--bulma-white-h); - --bulma-input-s: var(--bulma-white-s); - --bulma-input-l: var(--bulma-white-l); - --bulma-input-focus-h: var(--bulma-white-h); - --bulma-input-focus-s: var(--bulma-white-s); - --bulma-input-focus-l: var(--bulma-white-l); - --bulma-input-border-l: var(--bulma-white-l); - --bulma-arrow-color: var(--bulma-white); -} -.select.is-black { - --bulma-input-h: var(--bulma-black-h); - --bulma-input-s: var(--bulma-black-s); - --bulma-input-l: var(--bulma-black-l); - --bulma-input-focus-h: var(--bulma-black-h); - --bulma-input-focus-s: var(--bulma-black-s); - --bulma-input-focus-l: var(--bulma-black-l); - --bulma-input-border-l: var(--bulma-black-l); - --bulma-arrow-color: var(--bulma-black); -} -.select.is-light { - --bulma-input-h: var(--bulma-light-h); - --bulma-input-s: var(--bulma-light-s); - --bulma-input-l: var(--bulma-light-l); - --bulma-input-focus-h: var(--bulma-light-h); - --bulma-input-focus-s: var(--bulma-light-s); - --bulma-input-focus-l: var(--bulma-light-l); - --bulma-input-border-l: var(--bulma-light-l); - --bulma-arrow-color: var(--bulma-light); -} -.select.is-dark { - --bulma-input-h: var(--bulma-dark-h); - --bulma-input-s: var(--bulma-dark-s); - --bulma-input-l: var(--bulma-dark-l); - --bulma-input-focus-h: var(--bulma-dark-h); - --bulma-input-focus-s: var(--bulma-dark-s); - --bulma-input-focus-l: var(--bulma-dark-l); - --bulma-input-border-l: var(--bulma-dark-l); - --bulma-arrow-color: var(--bulma-dark); -} -.select.is-text { - --bulma-input-h: var(--bulma-text-h); - --bulma-input-s: var(--bulma-text-s); - --bulma-input-l: var(--bulma-text-l); - --bulma-input-focus-h: var(--bulma-text-h); - --bulma-input-focus-s: var(--bulma-text-s); - --bulma-input-focus-l: var(--bulma-text-l); - --bulma-input-border-l: var(--bulma-text-l); - --bulma-arrow-color: var(--bulma-text); -} -.select.is-primary { - --bulma-input-h: var(--bulma-primary-h); - --bulma-input-s: var(--bulma-primary-s); - --bulma-input-l: var(--bulma-primary-l); - --bulma-input-focus-h: var(--bulma-primary-h); - --bulma-input-focus-s: var(--bulma-primary-s); - --bulma-input-focus-l: var(--bulma-primary-l); - --bulma-input-border-l: var(--bulma-primary-l); - --bulma-arrow-color: var(--bulma-primary); -} -.select.is-link { - --bulma-input-h: var(--bulma-link-h); - --bulma-input-s: var(--bulma-link-s); - --bulma-input-l: var(--bulma-link-l); - --bulma-input-focus-h: var(--bulma-link-h); - --bulma-input-focus-s: var(--bulma-link-s); - --bulma-input-focus-l: var(--bulma-link-l); - --bulma-input-border-l: var(--bulma-link-l); - --bulma-arrow-color: var(--bulma-link); -} -.select.is-info { - --bulma-input-h: var(--bulma-info-h); - --bulma-input-s: var(--bulma-info-s); - --bulma-input-l: var(--bulma-info-l); - --bulma-input-focus-h: var(--bulma-info-h); - --bulma-input-focus-s: var(--bulma-info-s); - --bulma-input-focus-l: var(--bulma-info-l); - --bulma-input-border-l: var(--bulma-info-l); - --bulma-arrow-color: var(--bulma-info); -} -.select.is-success { - --bulma-input-h: var(--bulma-success-h); - --bulma-input-s: var(--bulma-success-s); - --bulma-input-l: var(--bulma-success-l); - --bulma-input-focus-h: var(--bulma-success-h); - --bulma-input-focus-s: var(--bulma-success-s); - --bulma-input-focus-l: var(--bulma-success-l); - --bulma-input-border-l: var(--bulma-success-l); - --bulma-arrow-color: var(--bulma-success); -} -.select.is-warning { - --bulma-input-h: var(--bulma-warning-h); - --bulma-input-s: var(--bulma-warning-s); - --bulma-input-l: var(--bulma-warning-l); - --bulma-input-focus-h: var(--bulma-warning-h); - --bulma-input-focus-s: var(--bulma-warning-s); - --bulma-input-focus-l: var(--bulma-warning-l); - --bulma-input-border-l: var(--bulma-warning-l); - --bulma-arrow-color: var(--bulma-warning); -} -.select.is-danger { - --bulma-input-h: var(--bulma-danger-h); - --bulma-input-s: var(--bulma-danger-s); - --bulma-input-l: var(--bulma-danger-l); - --bulma-input-focus-h: var(--bulma-danger-h); - --bulma-input-focus-s: var(--bulma-danger-s); - --bulma-input-focus-l: var(--bulma-danger-l); - --bulma-input-border-l: var(--bulma-danger-l); - --bulma-arrow-color: var(--bulma-danger); -} -.select.is-small { - border-radius: var(--bulma-radius-small); - font-size: var(--bulma-size-small); -} -.select.is-medium { - font-size: var(--bulma-size-medium); -} -.select.is-large { - font-size: var(--bulma-size-large); -} -.select.is-disabled::after { - border-color: var(--bulma-text-weak) !important; - opacity: 0.5; -} -.select.is-fullwidth { - width: 100%; -} -.select.is-fullwidth select { - width: 100%; -} -.select.is-loading::after { - inset-inline-end: 0.625em; - margin-top: 0; - position: absolute; - top: 0.625em; - transform: none; -} -.select.is-loading.is-small:after { - font-size: var(--bulma-size-small); -} -.select.is-loading.is-medium:after { - font-size: var(--bulma-size-medium); -} -.select.is-loading.is-large:after { - font-size: var(--bulma-size-large); -} - -/* Bulma Form */ -.file { - --bulma-file-radius: var(--bulma-radius); - --bulma-file-name-border-color: var(--bulma-border); - --bulma-file-name-border-style: solid; - --bulma-file-name-border-width: 1px 1px 1px 0; - --bulma-file-name-max-width: 16em; - --bulma-file-h: var(--bulma-scheme-h); - --bulma-file-s: var(--bulma-scheme-s); - --bulma-file-background-l: var(--bulma-scheme-main-ter-l); - --bulma-file-background-l-delta: 0%; - --bulma-file-hover-background-l-delta: -5%; - --bulma-file-active-background-l-delta: -10%; - --bulma-file-border-l: var(--bulma-border-l); - --bulma-file-border-l-delta: 0%; - --bulma-file-hover-border-l-delta: -10%; - --bulma-file-active-border-l-delta: -20%; - --bulma-file-cta-color-l: var(--bulma-text-strong-l); - --bulma-file-name-color-l: var(--bulma-text-strong-l); - --bulma-file-color-l-delta: 0%; - --bulma-file-hover-color-l-delta: -5%; - --bulma-file-active-color-l-delta: -10%; - align-items: stretch; - display: flex; - justify-content: flex-start; - position: relative; -} -.file.is-white { - --bulma-file-h: var(--bulma-white-h); - --bulma-file-s: var(--bulma-white-s); - --bulma-file-background-l: var(--bulma-white-l); - --bulma-file-border-l: var(--bulma-white-l); - --bulma-file-cta-color-l: var(--bulma-white-invert-l); - --bulma-file-name-color-l: var(--bulma-white-on-scheme-l); -} -.file.is-black { - --bulma-file-h: var(--bulma-black-h); - --bulma-file-s: var(--bulma-black-s); - --bulma-file-background-l: var(--bulma-black-l); - --bulma-file-border-l: var(--bulma-black-l); - --bulma-file-cta-color-l: var(--bulma-black-invert-l); - --bulma-file-name-color-l: var(--bulma-black-on-scheme-l); -} -.file.is-light { - --bulma-file-h: var(--bulma-light-h); - --bulma-file-s: var(--bulma-light-s); - --bulma-file-background-l: var(--bulma-light-l); - --bulma-file-border-l: var(--bulma-light-l); - --bulma-file-cta-color-l: var(--bulma-light-invert-l); - --bulma-file-name-color-l: var(--bulma-light-on-scheme-l); -} -.file.is-dark { - --bulma-file-h: var(--bulma-dark-h); - --bulma-file-s: var(--bulma-dark-s); - --bulma-file-background-l: var(--bulma-dark-l); - --bulma-file-border-l: var(--bulma-dark-l); - --bulma-file-cta-color-l: var(--bulma-dark-invert-l); - --bulma-file-name-color-l: var(--bulma-dark-on-scheme-l); -} -.file.is-text { - --bulma-file-h: var(--bulma-text-h); - --bulma-file-s: var(--bulma-text-s); - --bulma-file-background-l: var(--bulma-text-l); - --bulma-file-border-l: var(--bulma-text-l); - --bulma-file-cta-color-l: var(--bulma-text-invert-l); - --bulma-file-name-color-l: var(--bulma-text-on-scheme-l); -} -.file.is-primary { - --bulma-file-h: var(--bulma-primary-h); - --bulma-file-s: var(--bulma-primary-s); - --bulma-file-background-l: var(--bulma-primary-l); - --bulma-file-border-l: var(--bulma-primary-l); - --bulma-file-cta-color-l: var(--bulma-primary-invert-l); - --bulma-file-name-color-l: var(--bulma-primary-on-scheme-l); -} -.file.is-link { - --bulma-file-h: var(--bulma-link-h); - --bulma-file-s: var(--bulma-link-s); - --bulma-file-background-l: var(--bulma-link-l); - --bulma-file-border-l: var(--bulma-link-l); - --bulma-file-cta-color-l: var(--bulma-link-invert-l); - --bulma-file-name-color-l: var(--bulma-link-on-scheme-l); -} -.file.is-info { - --bulma-file-h: var(--bulma-info-h); - --bulma-file-s: var(--bulma-info-s); - --bulma-file-background-l: var(--bulma-info-l); - --bulma-file-border-l: var(--bulma-info-l); - --bulma-file-cta-color-l: var(--bulma-info-invert-l); - --bulma-file-name-color-l: var(--bulma-info-on-scheme-l); -} -.file.is-success { - --bulma-file-h: var(--bulma-success-h); - --bulma-file-s: var(--bulma-success-s); - --bulma-file-background-l: var(--bulma-success-l); - --bulma-file-border-l: var(--bulma-success-l); - --bulma-file-cta-color-l: var(--bulma-success-invert-l); - --bulma-file-name-color-l: var(--bulma-success-on-scheme-l); -} -.file.is-warning { - --bulma-file-h: var(--bulma-warning-h); - --bulma-file-s: var(--bulma-warning-s); - --bulma-file-background-l: var(--bulma-warning-l); - --bulma-file-border-l: var(--bulma-warning-l); - --bulma-file-cta-color-l: var(--bulma-warning-invert-l); - --bulma-file-name-color-l: var(--bulma-warning-on-scheme-l); -} -.file.is-danger { - --bulma-file-h: var(--bulma-danger-h); - --bulma-file-s: var(--bulma-danger-s); - --bulma-file-background-l: var(--bulma-danger-l); - --bulma-file-border-l: var(--bulma-danger-l); - --bulma-file-cta-color-l: var(--bulma-danger-invert-l); - --bulma-file-name-color-l: var(--bulma-danger-on-scheme-l); -} -.file.is-small { - font-size: var(--bulma-size-small); -} -.file.is-normal { - font-size: var(--bulma-size-normal); -} -.file.is-medium { - font-size: var(--bulma-size-medium); -} -.file.is-medium .file-icon .fa { - font-size: 1.5rem; -} -.file.is-large { - font-size: var(--bulma-size-large); -} -.file.is-large .file-icon .fa { - font-size: 2rem; -} -.file.has-name .file-cta { - border-end-end-radius: 0; - border-start-end-radius: 0; -} -.file.has-name .file-name { - border-end-start-radius: 0; - border-start-start-radius: 0; -} -.file.has-name.is-empty .file-cta { - border-radius: var(--bulma-file-radius); -} -.file.has-name.is-empty .file-name { - display: none; -} -.file.is-boxed .file-label { - flex-direction: column; -} -.file.is-boxed .file-cta { - flex-direction: column; - height: auto; - padding: 1em 3em; -} -.file.is-boxed .file-name { - border-width: 0 1px 1px; -} -.file.is-boxed .file-icon { - height: 1.5em; - width: 1.5em; -} -.file.is-boxed .file-icon .fa { - font-size: 1.5rem; -} -.file.is-boxed.is-small .file-icon .fa { - font-size: 1rem; -} -.file.is-boxed.is-medium .file-icon .fa { - font-size: 2rem; -} -.file.is-boxed.is-large .file-icon .fa { - font-size: 2.5rem; -} -.file.is-boxed.has-name .file-cta { - border-end-end-radius: 0; - border-end-start-radius: 0; - border-start-end-radius: var(--bulma-file-radius); - border-start-start-radius: var(--bulma-file-radius); -} -.file.is-boxed.has-name .file-name { - border-end-end-radius: var(--bulma-file-radius); - border-end-start-radius: var(--bulma-file-radius); - border-start-end-radius: 0; - border-start-start-radius: 0; - border-width: 0 1px 1px; -} -.file.is-centered { - justify-content: center; -} -.file.is-fullwidth .file-label { - width: 100%; -} -.file.is-fullwidth .file-name { - flex-grow: 1; - max-width: none; -} -.file.is-right { - justify-content: flex-end; -} -.file.is-right .file-cta { - border-radius: 0 var(--bulma-file-radius) var(--bulma-file-radius) 0; -} -.file.is-right .file-name { - border-radius: var(--bulma-file-radius) 0 0 var(--bulma-file-radius); - border-width: 1px 0 1px 1px; - order: -1; -} - -.file-label { - align-items: stretch; - display: flex; - cursor: pointer; - justify-content: flex-start; - overflow: hidden; - position: relative; -} -.file-label:hover { - --bulma-file-background-l-delta: var(--bulma-file-hover-background-l-delta); - --bulma-file-border-l-delta: var(--bulma-file-hover-border-l-delta); - --bulma-file-color-l-delta: var(--bulma-file-hover-color-l-delta); -} -.file-label:active { - --bulma-file-background-l-delta: var(--bulma-file-active-background-l-delta); - --bulma-file-border-l-delta: var(--bulma-file-active-border-l-delta); - --bulma-file-color-l-delta: var(--bulma-file-active-color-l-delta); -} - -.file-input { - height: 100%; - left: 0; - opacity: 0; - outline: none; - position: absolute; - top: 0; - width: 100%; -} - -.file-cta, -.file-name { - border-color: hsl(var(--bulma-file-h), var(--bulma-file-s), calc(var(--bulma-file-border-l) + var(--bulma-file-border-l-delta))); - border-radius: var(--bulma-file-radius); - font-size: 1em; - padding-left: 1em; - padding-right: 1em; - white-space: nowrap; -} - -.file-cta { - background-color: hsl(var(--bulma-file-h), var(--bulma-file-s), calc(var(--bulma-file-background-l) + var(--bulma-file-background-l-delta))); - color: hsl(var(--bulma-file-h), var(--bulma-file-s), calc(var(--bulma-file-cta-color-l) + var(--bulma-file-color-l-delta))); -} - -.file-name { - border-color: hsl(var(--bulma-file-h), var(--bulma-file-s), calc(var(--bulma-file-border-l) + var(--bulma-file-color-l-delta))); - border-style: var(--bulma-file-name-border-style); - border-width: var(--bulma-file-name-border-width); - color: hsl(var(--bulma-file-h), var(--bulma-file-s), calc(var(--bulma-file-name-color-l) + var(--bulma-file-color-l-delta))); - display: block; - max-width: var(--bulma-file-name-max-width); - overflow: hidden; - text-align: inherit; - text-overflow: ellipsis; -} - -.file-icon { - align-items: center; - display: flex; - height: 1em; - justify-content: center; - margin-inline-end: 0.5em; - width: 1em; -} -.file-icon .fa { - font-size: 1rem; -} - -/* Bulma Form */ -:root { - --bulma-label-color: var(--bulma-text-strong); - --bulma-label-spacing: 0.5em; - --bulma-label-weight: var(--bulma-weight-semibold); - --bulma-help-size: var(--bulma-size-small); - --bulma-field-block-spacing: 0.75rem; -} - -.label { - color: var(--bulma-label-color); - display: block; - font-size: var(--bulma-size-normal); - font-weight: var(--bulma-weight-semibold); -} -.label:not(:last-child) { - margin-bottom: var(--bulma-label-spacing); -} -.label.is-small { - font-size: var(--bulma-size-small); -} -.label.is-medium { - font-size: var(--bulma-size-medium); -} -.label.is-large { - font-size: var(--bulma-size-large); -} - -.help { - display: block; - font-size: var(--bulma-help-size); - margin-top: 0.25rem; -} -.help.is-white { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-on-scheme-l)); -} -.help.is-black { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-on-scheme-l)); -} -.help.is-light { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-on-scheme-l)); -} -.help.is-dark { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-on-scheme-l)); -} -.help.is-text { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-on-scheme-l)); -} -.help.is-primary { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-on-scheme-l)); -} -.help.is-link { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l)); -} -.help.is-info { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-on-scheme-l)); -} -.help.is-success { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-on-scheme-l)); -} -.help.is-warning { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-on-scheme-l)); -} -.help.is-danger { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-on-scheme-l)); -} - -.field { - --bulma-block-spacing: var(--bulma-field-block-spacing); -} -.field.has-addons { - display: flex; - justify-content: flex-start; -} -.field.has-addons .control:not(:last-child) { - margin-inline-end: -1px; -} -.field.has-addons .control:not(:first-child):not(:last-child) .button, -.field.has-addons .control:not(:first-child):not(:last-child) .input, -.field.has-addons .control:not(:first-child):not(:last-child) .select select { - border-radius: 0; -} -.field.has-addons .control:first-child:not(:only-child) .button, -.field.has-addons .control:first-child:not(:only-child) .input, -.field.has-addons .control:first-child:not(:only-child) .select select { - border-start-end-radius: 0; - border-end-end-radius: 0; -} -.field.has-addons .control:last-child:not(:only-child) .button, -.field.has-addons .control:last-child:not(:only-child) .input, -.field.has-addons .control:last-child:not(:only-child) .select select { - border-start-start-radius: 0; - border-end-start-radius: 0; -} -.field.has-addons .control .button:not([disabled]):hover, .field.has-addons .control .button:not([disabled]).is-hovered, -.field.has-addons .control .input:not([disabled]):hover, -.field.has-addons .control .input:not([disabled]).is-hovered, -.field.has-addons .control .select select:not([disabled]):hover, -.field.has-addons .control .select select:not([disabled]).is-hovered { - z-index: 2; -} -.field.has-addons .control .button:not([disabled]):focus, .field.has-addons .control .button:not([disabled]).is-focused, .field.has-addons .control .button:not([disabled]):active, .field.has-addons .control .button:not([disabled]).is-active, -.field.has-addons .control .input:not([disabled]):focus, -.field.has-addons .control .input:not([disabled]).is-focused, -.field.has-addons .control .input:not([disabled]):active, -.field.has-addons .control .input:not([disabled]).is-active, -.field.has-addons .control .select select:not([disabled]):focus, -.field.has-addons .control .select select:not([disabled]).is-focused, -.field.has-addons .control .select select:not([disabled]):active, -.field.has-addons .control .select select:not([disabled]).is-active { - z-index: 3; -} -.field.has-addons .control .button:not([disabled]):focus:hover, .field.has-addons .control .button:not([disabled]).is-focused:hover, .field.has-addons .control .button:not([disabled]):active:hover, .field.has-addons .control .button:not([disabled]).is-active:hover, -.field.has-addons .control .input:not([disabled]):focus:hover, -.field.has-addons .control .input:not([disabled]).is-focused:hover, -.field.has-addons .control .input:not([disabled]):active:hover, -.field.has-addons .control .input:not([disabled]).is-active:hover, -.field.has-addons .control .select select:not([disabled]):focus:hover, -.field.has-addons .control .select select:not([disabled]).is-focused:hover, -.field.has-addons .control .select select:not([disabled]):active:hover, -.field.has-addons .control .select select:not([disabled]).is-active:hover { - z-index: 4; -} -.field.has-addons .control.is-expanded { - flex-grow: 1; - flex-shrink: 1; -} -.field.has-addons.has-addons-centered { - justify-content: center; -} -.field.has-addons.has-addons-right { - justify-content: flex-end; -} -.field.has-addons.has-addons-fullwidth .control { - flex-grow: 1; - flex-shrink: 0; -} -.field.is-grouped { - display: flex; - gap: 0.75rem; - justify-content: flex-start; -} -.field.is-grouped > .control { - flex-shrink: 0; -} -.field.is-grouped > .control.is-expanded { - flex-grow: 1; - flex-shrink: 1; -} -.field.is-grouped.is-grouped-centered { - justify-content: center; -} -.field.is-grouped.is-grouped-right { - justify-content: flex-end; -} -.field.is-grouped.is-grouped-multiline { - flex-wrap: wrap; -} -@media screen and (min-width: 769px), print { - .field.is-horizontal { - display: flex; - } -} - -.field-label .label { - font-size: inherit; -} -@media screen and (max-width: 768px) { - .field-label { - margin-bottom: 0.5rem; - } -} -@media screen and (min-width: 769px), print { - .field-label { - flex-basis: 0; - flex-grow: 1; - flex-shrink: 0; - margin-inline-end: 1.5rem; - text-align: right; - } - .field-label.is-small { - font-size: var(--bulma-size-small); - padding-top: 0.375em; - } - .field-label.is-normal { - padding-top: 0.375em; - } - .field-label.is-medium { - font-size: var(--bulma-size-medium); - padding-top: 0.375em; - } - .field-label.is-large { - font-size: var(--bulma-size-large); - padding-top: 0.375em; - } -} - -.field-body .field .field { - margin-bottom: 0; -} -@media screen and (min-width: 769px), print { - .field-body { - display: flex; - flex-basis: 0; - flex-grow: 5; - flex-shrink: 1; - } - .field-body .field { - margin-bottom: 0; - } - .field-body > .field { - flex-shrink: 1; - } - .field-body > .field:not(.is-narrow) { - flex-grow: 1; - } - .field-body > .field:not(:last-child) { - margin-inline-end: 0.75rem; - } -} - -.control { - box-sizing: border-box; - clear: both; - font-size: var(--bulma-size-normal); - position: relative; - text-align: inherit; -} -.control.has-icons-left .input:hover ~ .icon, -.control.has-icons-left .select:hover ~ .icon, .control.has-icons-right .input:hover ~ .icon, -.control.has-icons-right .select:hover ~ .icon { - color: var(--bulma-input-icon-hover-color); -} -.control.has-icons-left .input:focus ~ .icon, -.control.has-icons-left .select:focus ~ .icon, .control.has-icons-right .input:focus ~ .icon, -.control.has-icons-right .select:focus ~ .icon { - color: var(--bulma-input-icon-focus-color); -} -.control.has-icons-left .input.is-small ~ .icon, -.control.has-icons-left .select.is-small ~ .icon, .control.has-icons-right .input.is-small ~ .icon, -.control.has-icons-right .select.is-small ~ .icon { - font-size: var(--bulma-size-small); -} -.control.has-icons-left .input.is-medium ~ .icon, -.control.has-icons-left .select.is-medium ~ .icon, .control.has-icons-right .input.is-medium ~ .icon, -.control.has-icons-right .select.is-medium ~ .icon { - font-size: var(--bulma-size-medium); -} -.control.has-icons-left .input.is-large ~ .icon, -.control.has-icons-left .select.is-large ~ .icon, .control.has-icons-right .input.is-large ~ .icon, -.control.has-icons-right .select.is-large ~ .icon { - font-size: var(--bulma-size-large); -} -.control.has-icons-left .icon, .control.has-icons-right .icon { - color: var(--bulma-input-icon-color); - height: var(--bulma-input-height); - pointer-events: none; - position: absolute; - top: 0; - width: var(--bulma-input-height); - z-index: 4; -} -.control.has-icons-left .input, -.control.has-icons-left .select select { - padding-left: var(--bulma-input-height); -} -.control.has-icons-left .icon.is-left { - left: 0; -} -.control.has-icons-right .input, -.control.has-icons-right .select select { - padding-right: var(--bulma-input-height); -} -.control.has-icons-right .icon.is-right { - right: 0; -} -.control.is-loading::after { - inset-inline-end: 0.75em; - position: absolute !important; - top: 0.75em; - z-index: 4; -} -.control.is-loading.is-small:after { - font-size: var(--bulma-size-small); -} -.control.is-loading.is-medium:after { - font-size: var(--bulma-size-medium); -} -.control.is-loading.is-large:after { - font-size: var(--bulma-size-large); -} - -.container { - flex-grow: 1; - margin: 0 auto; - position: relative; - width: 100%; -} -.container.is-fluid { - max-width: none !important; - padding-left: 32px; - padding-right: 32px; - width: 100%; -} -.container.is-max-tablet { - max-width: 705px; -} -@media screen and (min-width: 1024px) { - .container { - max-width: 960px; - } -} -@media screen and (max-width: 1215px) { - .container.is-widescreen:not(.is-max-tablet):not(.is-max-desktop) { - max-width: 1152px; - } -} -@media screen and (max-width: 1407px) { - .container.is-fullhd:not(.is-max-tablet):not(.is-max-desktop):not(.is-max-widescreen) { - max-width: 1344px; - } -} -@media screen and (min-width: 1216px) { - .container:not(.is-max-tablet):not(.is-max-desktop) { - max-width: 1152px; - } -} -@media screen and (min-width: 1408px) { - .container:not(.is-max-tablet):not(.is-max-desktop):not(.is-max-widescreen) { - max-width: 1344px; - } -} - -.level { - --bulma-level-item-spacing: calc(var(--bulma-block-spacing) * 0.5); - align-items: center; - display: flex; - flex-direction: column; - justify-content: space-between; - gap: var(--bulma-level-item-spacing); -} -.level code { - border-radius: var(--bulma-radius); -} -.level img { - display: inline-block; - vertical-align: top; -} -.level.is-mobile { - display: flex; - flex-direction: row; -} -.level.is-mobile .level-left, -.level.is-mobile .level-right { - display: flex; -} -.level.is-mobile .level-item:not(.is-narrow) { - flex-grow: 1; -} -@media screen and (min-width: 769px), print { - .level { - display: flex; - flex-direction: row; - } - .level > .level-item:not(.is-narrow) { - flex-grow: 1; - } -} - -.level-item { - align-items: center; - display: flex; - flex-basis: auto; - flex-grow: 0; - flex-shrink: 0; - justify-content: center; -} -.level-item .title, -.level-item .subtitle { - margin-bottom: 0; -} - -.level-left, -.level-right { - flex-basis: auto; - flex-grow: 0; - flex-shrink: 0; - gap: calc(var(--bulma-block-spacing) * 0.5); -} -.level-left .level-item.is-flexible, -.level-right .level-item.is-flexible { - flex-grow: 1; -} - -.level-left { - align-items: center; - display: flex; - flex-direction: column; - justify-content: flex-start; -} -@media screen and (min-width: 769px), print { - .level-left { - flex-direction: row; - } -} - -.level-right { - align-items: center; - display: flex; - flex-direction: column; - justify-content: flex-end; -} -@media screen and (min-width: 769px), print { - .level-right { - flex-direction: row; - } -} - -.section { - --bulma-section-padding: 3rem 1.5rem; - --bulma-section-padding-desktop: 3rem 3rem; - --bulma-section-padding-medium: 9rem 4.5rem; - --bulma-section-padding-large: 18rem 6rem; - padding: var(--bulma-section-padding); -} -@media screen and (min-width: 1024px) { - .section { - padding: var(--bulma-section-padding-desktop); - } - .section.is-medium { - padding: var(--bulma-section-padding-medium); - } - .section.is-large { - padding: var(--bulma-section-padding-large); - } -} -.section.is-fullheight { - min-height: 100vh; -} - -.hero { - --bulma-hero-body-padding: 3rem 1.5rem; - --bulma-hero-body-padding-tablet: 3rem 3rem; - --bulma-hero-body-padding-small: 1.5rem; - --bulma-hero-body-padding-medium: 9rem 4.5rem; - --bulma-hero-body-padding-large: 18rem 6rem; -} - -.hero { - align-items: stretch; - display: flex; - flex-direction: column; - justify-content: space-between; -} -.hero .navbar { - background: none; -} -.hero .tabs ul { - border-bottom: none; -} -.hero.is-white { - --bulma-hero-h: var(--bulma-white-h); - --bulma-hero-s: var(--bulma-white-s); - --bulma-hero-background-l: var(--bulma-white-l); - --bulma-hero-color-l: var(--bulma-white-invert-l); - background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-white .navbar { - --bulma-navbar-item-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-navbar-item-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-white .tabs { - --bulma-tabs-link-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-border-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-tabs-link-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-white .subtitle { - --bulma-subtitle-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-subtitle-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-white .title { - --bulma-title-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-title-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-white.is-bold { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); -} -@media screen and (max-width: 768px) { - .hero.is-white.is-bold .navbar-menu { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); - } -} -.hero.is-black { - --bulma-hero-h: var(--bulma-black-h); - --bulma-hero-s: var(--bulma-black-s); - --bulma-hero-background-l: var(--bulma-black-l); - --bulma-hero-color-l: var(--bulma-black-invert-l); - background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-black .navbar { - --bulma-navbar-item-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-navbar-item-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-black .tabs { - --bulma-tabs-link-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-border-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-tabs-link-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-black .subtitle { - --bulma-subtitle-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-subtitle-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-black .title { - --bulma-title-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-title-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-black.is-bold { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); -} -@media screen and (max-width: 768px) { - .hero.is-black.is-bold .navbar-menu { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); - } -} -.hero.is-light { - --bulma-hero-h: var(--bulma-light-h); - --bulma-hero-s: var(--bulma-light-s); - --bulma-hero-background-l: var(--bulma-light-l); - --bulma-hero-color-l: var(--bulma-light-invert-l); - background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-light .navbar { - --bulma-navbar-item-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-navbar-item-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-light .tabs { - --bulma-tabs-link-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-border-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-tabs-link-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-light .subtitle { - --bulma-subtitle-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-subtitle-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-light .title { - --bulma-title-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-title-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-light.is-bold { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); -} -@media screen and (max-width: 768px) { - .hero.is-light.is-bold .navbar-menu { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); - } -} -.hero.is-dark { - --bulma-hero-h: var(--bulma-dark-h); - --bulma-hero-s: var(--bulma-dark-s); - --bulma-hero-background-l: var(--bulma-dark-l); - --bulma-hero-color-l: var(--bulma-dark-invert-l); - background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-dark .navbar { - --bulma-navbar-item-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-navbar-item-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-dark .tabs { - --bulma-tabs-link-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-border-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-tabs-link-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-dark .subtitle { - --bulma-subtitle-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-subtitle-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-dark .title { - --bulma-title-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-title-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-dark.is-bold { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); -} -@media screen and (max-width: 768px) { - .hero.is-dark.is-bold .navbar-menu { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); - } -} -.hero.is-text { - --bulma-hero-h: var(--bulma-text-h); - --bulma-hero-s: var(--bulma-text-s); - --bulma-hero-background-l: var(--bulma-text-l); - --bulma-hero-color-l: var(--bulma-text-invert-l); - background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-text .navbar { - --bulma-navbar-item-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-navbar-item-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-text .tabs { - --bulma-tabs-link-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-border-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-tabs-link-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-text .subtitle { - --bulma-subtitle-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-subtitle-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-text .title { - --bulma-title-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-title-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-text.is-bold { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); -} -@media screen and (max-width: 768px) { - .hero.is-text.is-bold .navbar-menu { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); - } -} -.hero.is-primary { - --bulma-hero-h: var(--bulma-primary-h); - --bulma-hero-s: var(--bulma-primary-s); - --bulma-hero-background-l: var(--bulma-primary-l); - --bulma-hero-color-l: var(--bulma-primary-invert-l); - background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-primary .navbar { - --bulma-navbar-item-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-navbar-item-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-primary .tabs { - --bulma-tabs-link-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-border-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-tabs-link-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-primary .subtitle { - --bulma-subtitle-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-subtitle-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-primary .title { - --bulma-title-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-title-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-primary.is-bold { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); -} -@media screen and (max-width: 768px) { - .hero.is-primary.is-bold .navbar-menu { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); - } -} -.hero.is-link { - --bulma-hero-h: var(--bulma-link-h); - --bulma-hero-s: var(--bulma-link-s); - --bulma-hero-background-l: var(--bulma-link-l); - --bulma-hero-color-l: var(--bulma-link-invert-l); - background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-link .navbar { - --bulma-navbar-item-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-navbar-item-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-link .tabs { - --bulma-tabs-link-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-border-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-tabs-link-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-link .subtitle { - --bulma-subtitle-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-subtitle-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-link .title { - --bulma-title-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-title-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-link.is-bold { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); -} -@media screen and (max-width: 768px) { - .hero.is-link.is-bold .navbar-menu { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); - } -} -.hero.is-info { - --bulma-hero-h: var(--bulma-info-h); - --bulma-hero-s: var(--bulma-info-s); - --bulma-hero-background-l: var(--bulma-info-l); - --bulma-hero-color-l: var(--bulma-info-invert-l); - background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-info .navbar { - --bulma-navbar-item-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-navbar-item-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-info .tabs { - --bulma-tabs-link-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-border-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-tabs-link-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-info .subtitle { - --bulma-subtitle-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-subtitle-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-info .title { - --bulma-title-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-title-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-info.is-bold { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); -} -@media screen and (max-width: 768px) { - .hero.is-info.is-bold .navbar-menu { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); - } -} -.hero.is-success { - --bulma-hero-h: var(--bulma-success-h); - --bulma-hero-s: var(--bulma-success-s); - --bulma-hero-background-l: var(--bulma-success-l); - --bulma-hero-color-l: var(--bulma-success-invert-l); - background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-success .navbar { - --bulma-navbar-item-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-navbar-item-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-success .tabs { - --bulma-tabs-link-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-border-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-tabs-link-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-success .subtitle { - --bulma-subtitle-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-subtitle-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-success .title { - --bulma-title-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-title-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-success.is-bold { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); -} -@media screen and (max-width: 768px) { - .hero.is-success.is-bold .navbar-menu { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); - } -} -.hero.is-warning { - --bulma-hero-h: var(--bulma-warning-h); - --bulma-hero-s: var(--bulma-warning-s); - --bulma-hero-background-l: var(--bulma-warning-l); - --bulma-hero-color-l: var(--bulma-warning-invert-l); - background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-warning .navbar { - --bulma-navbar-item-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-navbar-item-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-warning .tabs { - --bulma-tabs-link-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-border-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-tabs-link-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-warning .subtitle { - --bulma-subtitle-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-subtitle-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-warning .title { - --bulma-title-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-title-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-warning.is-bold { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); -} -@media screen and (max-width: 768px) { - .hero.is-warning.is-bold .navbar-menu { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); - } -} -.hero.is-danger { - --bulma-hero-h: var(--bulma-danger-h); - --bulma-hero-s: var(--bulma-danger-s); - --bulma-hero-background-l: var(--bulma-danger-l); - --bulma-hero-color-l: var(--bulma-danger-invert-l); - background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-danger .navbar { - --bulma-navbar-item-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-hover-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-navbar-item-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-navbar-item-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-danger .tabs { - --bulma-tabs-link-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-background-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-tabs-boxed-link-active-border-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); - --bulma-tabs-link-active-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)); -} -.hero.is-danger .subtitle { - --bulma-subtitle-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-subtitle-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-danger .title { - --bulma-title-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); - --bulma-title-strong-color: hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)); -} -.hero.is-danger.is-bold { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-background-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); -} -@media screen and (max-width: 768px) { - .hero.is-danger.is-bold .navbar-menu { - background-image: linear-gradient(141deg, hsl(calc(var(--bulma-hero-h) - 5deg), calc(var(--bulma-hero-s) + 10%), calc(var(--bulma-hero-background-l) + 5%)) 0%, hsl(var(--bulma-hero-h), var(--bulma-hero-s), var(--bulma-hero-color-l)) 71%, hsl(calc(var(--bulma-hero-h) + 5deg), calc(var(--bulma-hero-s) - 10%), calc(var(--bulma-hero-background-l) - 5%)) 100%); - } -} -.hero.is-small .hero-body { - padding: var(--bulma-hero-body-padding-small); -} -@media screen and (min-width: 769px), print { - .hero.is-medium .hero-body { - padding: var(--bulma-hero-body-padding-medium); - } -} -@media screen and (min-width: 769px), print { - .hero.is-large .hero-body { - padding: var(--bulma-hero-body-padding-large); - } -} -.hero.is-halfheight .hero-body, .hero.is-fullheight .hero-body, .hero.is-fullheight-with-navbar .hero-body { - align-items: center; - display: flex; -} -.hero.is-halfheight .hero-body > .container, .hero.is-fullheight .hero-body > .container, .hero.is-fullheight-with-navbar .hero-body > .container { - flex-grow: 1; - flex-shrink: 1; -} -.hero.is-halfheight { - min-height: 50vh; -} -.hero.is-fullheight { - min-height: 100vh; -} - -.hero-video { - overflow: hidden; -} -.hero-video video { - left: 50%; - min-height: 100%; - min-width: 100%; - position: absolute; - top: 50%; - transform: translate3d(-50%, -50%, 0); -} -.hero-video.is-transparent { - opacity: 0.3; -} -@media screen and (max-width: 768px) { - .hero-video { - display: none; - } -} - -.hero-buttons { - margin-top: 1.5rem; -} -@media screen and (max-width: 768px) { - .hero-buttons .button { - display: flex; - } - .hero-buttons .button:not(:last-child) { - margin-bottom: 0.75rem; - } -} -@media screen and (min-width: 769px), print { - .hero-buttons { - display: flex; - justify-content: center; - } - .hero-buttons .button:not(:last-child) { - margin-inline-end: 1.5rem; - } -} - -.hero-head, -.hero-foot { - flex-grow: 0; - flex-shrink: 0; -} - -.hero-body { - flex-grow: 1; - flex-shrink: 0; - padding: var(--bulma-hero-body-padding); -} -@media screen and (min-width: 769px), print { - .hero-body { - padding: var(--bulma-hero-body-padding-tablet); - } -} - -/* Bulma Grid */ -:root { - --bulma-column-gap: 0.75rem; -} - -.column { - display: block; - flex-basis: 0; - flex-grow: 1; - flex-shrink: 1; - padding: var(--bulma-column-gap); -} -.columns.is-mobile > .column.is-narrow { - flex: none; - width: unset; -} -.columns.is-mobile > .column.is-full { - flex: none; - width: 100%; -} -.columns.is-mobile > .column.is-three-quarters { - flex: none; - width: 75%; -} -.columns.is-mobile > .column.is-two-thirds { - flex: none; - width: 66.6666%; -} -.columns.is-mobile > .column.is-half { - flex: none; - width: 50%; -} -.columns.is-mobile > .column.is-one-third { - flex: none; - width: 33.3333%; -} -.columns.is-mobile > .column.is-one-quarter { - flex: none; - width: 25%; -} -.columns.is-mobile > .column.is-one-fifth { - flex: none; - width: 20%; -} -.columns.is-mobile > .column.is-two-fifths { - flex: none; - width: 40%; -} -.columns.is-mobile > .column.is-three-fifths { - flex: none; - width: 60%; -} -.columns.is-mobile > .column.is-four-fifths { - flex: none; - width: 80%; -} -.columns.is-mobile > .column.is-offset-three-quarters { - margin-inline-start: 75%; -} -.columns.is-mobile > .column.is-offset-two-thirds { - margin-inline-start: 66.6666%; -} -.columns.is-mobile > .column.is-offset-half { - margin-inline-start: 50%; -} -.columns.is-mobile > .column.is-offset-one-third { - margin-inline-start: 0.3333%; -} -.columns.is-mobile > .column.is-offset-one-quarter { - margin-inline-start: 25%; -} -.columns.is-mobile > .column.is-offset-one-fifth { - margin-inline-start: 20%; -} -.columns.is-mobile > .column.is-offset-two-fifths { - margin-inline-start: 40%; -} -.columns.is-mobile > .column.is-offset-three-fifths { - margin-inline-start: 60%; -} -.columns.is-mobile > .column.is-offset-four-fifths { - margin-inline-start: 80%; -} -.columns.is-mobile > .column.is-0 { - flex: none; - width: 0%; -} -.columns.is-mobile > .column.is-offset-0 { - margin-inline-start: 0%; -} -.columns.is-mobile > .column.is-1 { - flex: none; - width: 8.3333333333%; -} -.columns.is-mobile > .column.is-offset-1 { - margin-inline-start: 8.3333333333%; -} -.columns.is-mobile > .column.is-2 { - flex: none; - width: 16.6666666667%; -} -.columns.is-mobile > .column.is-offset-2 { - margin-inline-start: 16.6666666667%; -} -.columns.is-mobile > .column.is-3 { - flex: none; - width: 25%; -} -.columns.is-mobile > .column.is-offset-3 { - margin-inline-start: 25%; -} -.columns.is-mobile > .column.is-4 { - flex: none; - width: 33.3333333333%; -} -.columns.is-mobile > .column.is-offset-4 { - margin-inline-start: 33.3333333333%; -} -.columns.is-mobile > .column.is-5 { - flex: none; - width: 41.6666666667%; -} -.columns.is-mobile > .column.is-offset-5 { - margin-inline-start: 41.6666666667%; -} -.columns.is-mobile > .column.is-6 { - flex: none; - width: 50%; -} -.columns.is-mobile > .column.is-offset-6 { - margin-inline-start: 50%; -} -.columns.is-mobile > .column.is-7 { - flex: none; - width: 58.3333333333%; -} -.columns.is-mobile > .column.is-offset-7 { - margin-inline-start: 58.3333333333%; -} -.columns.is-mobile > .column.is-8 { - flex: none; - width: 66.6666666667%; -} -.columns.is-mobile > .column.is-offset-8 { - margin-inline-start: 66.6666666667%; -} -.columns.is-mobile > .column.is-9 { - flex: none; - width: 75%; -} -.columns.is-mobile > .column.is-offset-9 { - margin-inline-start: 75%; -} -.columns.is-mobile > .column.is-10 { - flex: none; - width: 83.3333333333%; -} -.columns.is-mobile > .column.is-offset-10 { - margin-inline-start: 83.3333333333%; -} -.columns.is-mobile > .column.is-11 { - flex: none; - width: 91.6666666667%; -} -.columns.is-mobile > .column.is-offset-11 { - margin-inline-start: 91.6666666667%; -} -.columns.is-mobile > .column.is-12 { - flex: none; - width: 100%; -} -.columns.is-mobile > .column.is-offset-12 { - margin-inline-start: 100%; -} -@media screen and (max-width: 768px) { - .column.is-narrow-mobile { - flex: none; - width: unset; - } - .column.is-full-mobile { - flex: none; - width: 100%; - } - .column.is-three-quarters-mobile { - flex: none; - width: 75%; - } - .column.is-two-thirds-mobile { - flex: none; - width: 66.6666%; - } - .column.is-half-mobile { - flex: none; - width: 50%; - } - .column.is-one-third-mobile { - flex: none; - width: 33.3333%; - } - .column.is-one-quarter-mobile { - flex: none; - width: 25%; - } - .column.is-one-fifth-mobile { - flex: none; - width: 20%; - } - .column.is-two-fifths-mobile { - flex: none; - width: 40%; - } - .column.is-three-fifths-mobile { - flex: none; - width: 60%; - } - .column.is-four-fifths-mobile { - flex: none; - width: 80%; - } - .column.is-offset-three-quarters-mobile { - margin-inline-start: 75%; - } - .column.is-offset-two-thirds-mobile { - margin-inline-start: 66.6666%; - } - .column.is-offset-half-mobile { - margin-inline-start: 50%; - } - .column.is-offset-one-third-mobile { - margin-inline-start: 0.3333%; - } - .column.is-offset-one-quarter-mobile { - margin-inline-start: 25%; - } - .column.is-offset-one-fifth-mobile { - margin-inline-start: 20%; - } - .column.is-offset-two-fifths-mobile { - margin-inline-start: 40%; - } - .column.is-offset-three-fifths-mobile { - margin-inline-start: 60%; - } - .column.is-offset-four-fifths-mobile { - margin-inline-start: 80%; - } - .column.is-0-mobile { - flex: none; - width: 0%; - } - .column.is-offset-0-mobile { - margin-inline-start: 0%; - } - .column.is-1-mobile { - flex: none; - width: 8.3333333333%; - } - .column.is-offset-1-mobile { - margin-inline-start: 8.3333333333%; - } - .column.is-2-mobile { - flex: none; - width: 16.6666666667%; - } - .column.is-offset-2-mobile { - margin-inline-start: 16.6666666667%; - } - .column.is-3-mobile { - flex: none; - width: 25%; - } - .column.is-offset-3-mobile { - margin-inline-start: 25%; - } - .column.is-4-mobile { - flex: none; - width: 33.3333333333%; - } - .column.is-offset-4-mobile { - margin-inline-start: 33.3333333333%; - } - .column.is-5-mobile { - flex: none; - width: 41.6666666667%; - } - .column.is-offset-5-mobile { - margin-inline-start: 41.6666666667%; - } - .column.is-6-mobile { - flex: none; - width: 50%; - } - .column.is-offset-6-mobile { - margin-inline-start: 50%; - } - .column.is-7-mobile { - flex: none; - width: 58.3333333333%; - } - .column.is-offset-7-mobile { - margin-inline-start: 58.3333333333%; - } - .column.is-8-mobile { - flex: none; - width: 66.6666666667%; - } - .column.is-offset-8-mobile { - margin-inline-start: 66.6666666667%; - } - .column.is-9-mobile { - flex: none; - width: 75%; - } - .column.is-offset-9-mobile { - margin-inline-start: 75%; - } - .column.is-10-mobile { - flex: none; - width: 83.3333333333%; - } - .column.is-offset-10-mobile { - margin-inline-start: 83.3333333333%; - } - .column.is-11-mobile { - flex: none; - width: 91.6666666667%; - } - .column.is-offset-11-mobile { - margin-inline-start: 91.6666666667%; - } - .column.is-12-mobile { - flex: none; - width: 100%; - } - .column.is-offset-12-mobile { - margin-inline-start: 100%; - } -} -@media screen and (min-width: 769px), print { - .column.is-narrow, .column.is-narrow-tablet { - flex: none; - width: unset; - } - .column.is-full, .column.is-full-tablet { - flex: none; - width: 100%; - } - .column.is-three-quarters, .column.is-three-quarters-tablet { - flex: none; - width: 75%; - } - .column.is-two-thirds, .column.is-two-thirds-tablet { - flex: none; - width: 66.6666%; - } - .column.is-half, .column.is-half-tablet { - flex: none; - width: 50%; - } - .column.is-one-third, .column.is-one-third-tablet { - flex: none; - width: 33.3333%; - } - .column.is-one-quarter, .column.is-one-quarter-tablet { - flex: none; - width: 25%; - } - .column.is-one-fifth, .column.is-one-fifth-tablet { - flex: none; - width: 20%; - } - .column.is-two-fifths, .column.is-two-fifths-tablet { - flex: none; - width: 40%; - } - .column.is-three-fifths, .column.is-three-fifths-tablet { - flex: none; - width: 60%; - } - .column.is-four-fifths, .column.is-four-fifths-tablet { - flex: none; - width: 80%; - } - .column.is-offset-three-quarters, .column.is-offset-three-quarters-tablet { - margin-inline-start: 75%; - } - .column.is-offset-two-thirds, .column.is-offset-two-thirds-tablet { - margin-inline-start: 66.6666%; - } - .column.is-offset-half, .column.is-offset-half-tablet { - margin-inline-start: 50%; - } - .column.is-offset-one-third, .column.is-offset-one-third-tablet { - margin-inline-start: 0.3333%; - } - .column.is-offset-one-quarter, .column.is-offset-one-quarter-tablet { - margin-inline-start: 25%; - } - .column.is-offset-one-fifth, .column.is-offset-one-fifth-tablet { - margin-inline-start: 20%; - } - .column.is-offset-two-fifths, .column.is-offset-two-fifths-tablet { - margin-inline-start: 40%; - } - .column.is-offset-three-fifths, .column.is-offset-three-fifths-tablet { - margin-inline-start: 60%; - } - .column.is-offset-four-fifths, .column.is-offset-four-fifths-tablet { - margin-inline-start: 80%; - } - .column.is-0, .column.is-0-tablet { - flex: none; - width: 0%; - } - .column.is-offset-0, .column.is-offset-0-tablet { - margin-inline-start: 0%; - } - .column.is-1, .column.is-1-tablet { - flex: none; - width: 8.3333333333%; - } - .column.is-offset-1, .column.is-offset-1-tablet { - margin-inline-start: 8.3333333333%; - } - .column.is-2, .column.is-2-tablet { - flex: none; - width: 16.6666666667%; - } - .column.is-offset-2, .column.is-offset-2-tablet { - margin-inline-start: 16.6666666667%; - } - .column.is-3, .column.is-3-tablet { - flex: none; - width: 25%; - } - .column.is-offset-3, .column.is-offset-3-tablet { - margin-inline-start: 25%; - } - .column.is-4, .column.is-4-tablet { - flex: none; - width: 33.3333333333%; - } - .column.is-offset-4, .column.is-offset-4-tablet { - margin-inline-start: 33.3333333333%; - } - .column.is-5, .column.is-5-tablet { - flex: none; - width: 41.6666666667%; - } - .column.is-offset-5, .column.is-offset-5-tablet { - margin-inline-start: 41.6666666667%; - } - .column.is-6, .column.is-6-tablet { - flex: none; - width: 50%; - } - .column.is-offset-6, .column.is-offset-6-tablet { - margin-inline-start: 50%; - } - .column.is-7, .column.is-7-tablet { - flex: none; - width: 58.3333333333%; - } - .column.is-offset-7, .column.is-offset-7-tablet { - margin-inline-start: 58.3333333333%; - } - .column.is-8, .column.is-8-tablet { - flex: none; - width: 66.6666666667%; - } - .column.is-offset-8, .column.is-offset-8-tablet { - margin-inline-start: 66.6666666667%; - } - .column.is-9, .column.is-9-tablet { - flex: none; - width: 75%; - } - .column.is-offset-9, .column.is-offset-9-tablet { - margin-inline-start: 75%; - } - .column.is-10, .column.is-10-tablet { - flex: none; - width: 83.3333333333%; - } - .column.is-offset-10, .column.is-offset-10-tablet { - margin-inline-start: 83.3333333333%; - } - .column.is-11, .column.is-11-tablet { - flex: none; - width: 91.6666666667%; - } - .column.is-offset-11, .column.is-offset-11-tablet { - margin-inline-start: 91.6666666667%; - } - .column.is-12, .column.is-12-tablet { - flex: none; - width: 100%; - } - .column.is-offset-12, .column.is-offset-12-tablet { - margin-inline-start: 100%; - } -} -@media screen and (max-width: 1023px) { - .column.is-narrow-touch { - flex: none; - width: unset; - } - .column.is-full-touch { - flex: none; - width: 100%; - } - .column.is-three-quarters-touch { - flex: none; - width: 75%; - } - .column.is-two-thirds-touch { - flex: none; - width: 66.6666%; - } - .column.is-half-touch { - flex: none; - width: 50%; - } - .column.is-one-third-touch { - flex: none; - width: 33.3333%; - } - .column.is-one-quarter-touch { - flex: none; - width: 25%; - } - .column.is-one-fifth-touch { - flex: none; - width: 20%; - } - .column.is-two-fifths-touch { - flex: none; - width: 40%; - } - .column.is-three-fifths-touch { - flex: none; - width: 60%; - } - .column.is-four-fifths-touch { - flex: none; - width: 80%; - } - .column.is-offset-three-quarters-touch { - margin-inline-start: 75%; - } - .column.is-offset-two-thirds-touch { - margin-inline-start: 66.6666%; - } - .column.is-offset-half-touch { - margin-inline-start: 50%; - } - .column.is-offset-one-third-touch { - margin-inline-start: 0.3333%; - } - .column.is-offset-one-quarter-touch { - margin-inline-start: 25%; - } - .column.is-offset-one-fifth-touch { - margin-inline-start: 20%; - } - .column.is-offset-two-fifths-touch { - margin-inline-start: 40%; - } - .column.is-offset-three-fifths-touch { - margin-inline-start: 60%; - } - .column.is-offset-four-fifths-touch { - margin-inline-start: 80%; - } - .column.is-0-touch { - flex: none; - width: 0%; - } - .column.is-offset-0-touch { - margin-inline-start: 0%; - } - .column.is-1-touch { - flex: none; - width: 8.3333333333%; - } - .column.is-offset-1-touch { - margin-inline-start: 8.3333333333%; - } - .column.is-2-touch { - flex: none; - width: 16.6666666667%; - } - .column.is-offset-2-touch { - margin-inline-start: 16.6666666667%; - } - .column.is-3-touch { - flex: none; - width: 25%; - } - .column.is-offset-3-touch { - margin-inline-start: 25%; - } - .column.is-4-touch { - flex: none; - width: 33.3333333333%; - } - .column.is-offset-4-touch { - margin-inline-start: 33.3333333333%; - } - .column.is-5-touch { - flex: none; - width: 41.6666666667%; - } - .column.is-offset-5-touch { - margin-inline-start: 41.6666666667%; - } - .column.is-6-touch { - flex: none; - width: 50%; - } - .column.is-offset-6-touch { - margin-inline-start: 50%; - } - .column.is-7-touch { - flex: none; - width: 58.3333333333%; - } - .column.is-offset-7-touch { - margin-inline-start: 58.3333333333%; - } - .column.is-8-touch { - flex: none; - width: 66.6666666667%; - } - .column.is-offset-8-touch { - margin-inline-start: 66.6666666667%; - } - .column.is-9-touch { - flex: none; - width: 75%; - } - .column.is-offset-9-touch { - margin-inline-start: 75%; - } - .column.is-10-touch { - flex: none; - width: 83.3333333333%; - } - .column.is-offset-10-touch { - margin-inline-start: 83.3333333333%; - } - .column.is-11-touch { - flex: none; - width: 91.6666666667%; - } - .column.is-offset-11-touch { - margin-inline-start: 91.6666666667%; - } - .column.is-12-touch { - flex: none; - width: 100%; - } - .column.is-offset-12-touch { - margin-inline-start: 100%; - } -} -@media screen and (min-width: 1024px) { - .column.is-narrow-desktop { - flex: none; - width: unset; - } - .column.is-full-desktop { - flex: none; - width: 100%; - } - .column.is-three-quarters-desktop { - flex: none; - width: 75%; - } - .column.is-two-thirds-desktop { - flex: none; - width: 66.6666%; - } - .column.is-half-desktop { - flex: none; - width: 50%; - } - .column.is-one-third-desktop { - flex: none; - width: 33.3333%; - } - .column.is-one-quarter-desktop { - flex: none; - width: 25%; - } - .column.is-one-fifth-desktop { - flex: none; - width: 20%; - } - .column.is-two-fifths-desktop { - flex: none; - width: 40%; - } - .column.is-three-fifths-desktop { - flex: none; - width: 60%; - } - .column.is-four-fifths-desktop { - flex: none; - width: 80%; - } - .column.is-offset-three-quarters-desktop { - margin-inline-start: 75%; - } - .column.is-offset-two-thirds-desktop { - margin-inline-start: 66.6666%; - } - .column.is-offset-half-desktop { - margin-inline-start: 50%; - } - .column.is-offset-one-third-desktop { - margin-inline-start: 0.3333%; - } - .column.is-offset-one-quarter-desktop { - margin-inline-start: 25%; - } - .column.is-offset-one-fifth-desktop { - margin-inline-start: 20%; - } - .column.is-offset-two-fifths-desktop { - margin-inline-start: 40%; - } - .column.is-offset-three-fifths-desktop { - margin-inline-start: 60%; - } - .column.is-offset-four-fifths-desktop { - margin-inline-start: 80%; - } - .column.is-0-desktop { - flex: none; - width: 0%; - } - .column.is-offset-0-desktop { - margin-inline-start: 0%; - } - .column.is-1-desktop { - flex: none; - width: 8.3333333333%; - } - .column.is-offset-1-desktop { - margin-inline-start: 8.3333333333%; - } - .column.is-2-desktop { - flex: none; - width: 16.6666666667%; - } - .column.is-offset-2-desktop { - margin-inline-start: 16.6666666667%; - } - .column.is-3-desktop { - flex: none; - width: 25%; - } - .column.is-offset-3-desktop { - margin-inline-start: 25%; - } - .column.is-4-desktop { - flex: none; - width: 33.3333333333%; - } - .column.is-offset-4-desktop { - margin-inline-start: 33.3333333333%; - } - .column.is-5-desktop { - flex: none; - width: 41.6666666667%; - } - .column.is-offset-5-desktop { - margin-inline-start: 41.6666666667%; - } - .column.is-6-desktop { - flex: none; - width: 50%; - } - .column.is-offset-6-desktop { - margin-inline-start: 50%; - } - .column.is-7-desktop { - flex: none; - width: 58.3333333333%; - } - .column.is-offset-7-desktop { - margin-inline-start: 58.3333333333%; - } - .column.is-8-desktop { - flex: none; - width: 66.6666666667%; - } - .column.is-offset-8-desktop { - margin-inline-start: 66.6666666667%; - } - .column.is-9-desktop { - flex: none; - width: 75%; - } - .column.is-offset-9-desktop { - margin-inline-start: 75%; - } - .column.is-10-desktop { - flex: none; - width: 83.3333333333%; - } - .column.is-offset-10-desktop { - margin-inline-start: 83.3333333333%; - } - .column.is-11-desktop { - flex: none; - width: 91.6666666667%; - } - .column.is-offset-11-desktop { - margin-inline-start: 91.6666666667%; - } - .column.is-12-desktop { - flex: none; - width: 100%; - } - .column.is-offset-12-desktop { - margin-inline-start: 100%; - } -} -@media screen and (min-width: 1216px) { - .column.is-narrow-widescreen { - flex: none; - width: unset; - } - .column.is-full-widescreen { - flex: none; - width: 100%; - } - .column.is-three-quarters-widescreen { - flex: none; - width: 75%; - } - .column.is-two-thirds-widescreen { - flex: none; - width: 66.6666%; - } - .column.is-half-widescreen { - flex: none; - width: 50%; - } - .column.is-one-third-widescreen { - flex: none; - width: 33.3333%; - } - .column.is-one-quarter-widescreen { - flex: none; - width: 25%; - } - .column.is-one-fifth-widescreen { - flex: none; - width: 20%; - } - .column.is-two-fifths-widescreen { - flex: none; - width: 40%; - } - .column.is-three-fifths-widescreen { - flex: none; - width: 60%; - } - .column.is-four-fifths-widescreen { - flex: none; - width: 80%; - } - .column.is-offset-three-quarters-widescreen { - margin-inline-start: 75%; - } - .column.is-offset-two-thirds-widescreen { - margin-inline-start: 66.6666%; - } - .column.is-offset-half-widescreen { - margin-inline-start: 50%; - } - .column.is-offset-one-third-widescreen { - margin-inline-start: 0.3333%; - } - .column.is-offset-one-quarter-widescreen { - margin-inline-start: 25%; - } - .column.is-offset-one-fifth-widescreen { - margin-inline-start: 20%; - } - .column.is-offset-two-fifths-widescreen { - margin-inline-start: 40%; - } - .column.is-offset-three-fifths-widescreen { - margin-inline-start: 60%; - } - .column.is-offset-four-fifths-widescreen { - margin-inline-start: 80%; - } - .column.is-0-widescreen { - flex: none; - width: 0%; - } - .column.is-offset-0-widescreen { - margin-inline-start: 0%; - } - .column.is-1-widescreen { - flex: none; - width: 8.3333333333%; - } - .column.is-offset-1-widescreen { - margin-inline-start: 8.3333333333%; - } - .column.is-2-widescreen { - flex: none; - width: 16.6666666667%; - } - .column.is-offset-2-widescreen { - margin-inline-start: 16.6666666667%; - } - .column.is-3-widescreen { - flex: none; - width: 25%; - } - .column.is-offset-3-widescreen { - margin-inline-start: 25%; - } - .column.is-4-widescreen { - flex: none; - width: 33.3333333333%; - } - .column.is-offset-4-widescreen { - margin-inline-start: 33.3333333333%; - } - .column.is-5-widescreen { - flex: none; - width: 41.6666666667%; - } - .column.is-offset-5-widescreen { - margin-inline-start: 41.6666666667%; - } - .column.is-6-widescreen { - flex: none; - width: 50%; - } - .column.is-offset-6-widescreen { - margin-inline-start: 50%; - } - .column.is-7-widescreen { - flex: none; - width: 58.3333333333%; - } - .column.is-offset-7-widescreen { - margin-inline-start: 58.3333333333%; - } - .column.is-8-widescreen { - flex: none; - width: 66.6666666667%; - } - .column.is-offset-8-widescreen { - margin-inline-start: 66.6666666667%; - } - .column.is-9-widescreen { - flex: none; - width: 75%; - } - .column.is-offset-9-widescreen { - margin-inline-start: 75%; - } - .column.is-10-widescreen { - flex: none; - width: 83.3333333333%; - } - .column.is-offset-10-widescreen { - margin-inline-start: 83.3333333333%; - } - .column.is-11-widescreen { - flex: none; - width: 91.6666666667%; - } - .column.is-offset-11-widescreen { - margin-inline-start: 91.6666666667%; - } - .column.is-12-widescreen { - flex: none; - width: 100%; - } - .column.is-offset-12-widescreen { - margin-inline-start: 100%; - } -} -@media screen and (min-width: 1408px) { - .column.is-narrow-fullhd { - flex: none; - width: unset; - } - .column.is-full-fullhd { - flex: none; - width: 100%; - } - .column.is-three-quarters-fullhd { - flex: none; - width: 75%; - } - .column.is-two-thirds-fullhd { - flex: none; - width: 66.6666%; - } - .column.is-half-fullhd { - flex: none; - width: 50%; - } - .column.is-one-third-fullhd { - flex: none; - width: 33.3333%; - } - .column.is-one-quarter-fullhd { - flex: none; - width: 25%; - } - .column.is-one-fifth-fullhd { - flex: none; - width: 20%; - } - .column.is-two-fifths-fullhd { - flex: none; - width: 40%; - } - .column.is-three-fifths-fullhd { - flex: none; - width: 60%; - } - .column.is-four-fifths-fullhd { - flex: none; - width: 80%; - } - .column.is-offset-three-quarters-fullhd { - margin-inline-start: 75%; - } - .column.is-offset-two-thirds-fullhd { - margin-inline-start: 66.6666%; - } - .column.is-offset-half-fullhd { - margin-inline-start: 50%; - } - .column.is-offset-one-third-fullhd { - margin-inline-start: 33.3333%; - } - .column.is-offset-one-quarter-fullhd { - margin-inline-start: 25%; - } - .column.is-offset-one-fifth-fullhd { - margin-inline-start: 20%; - } - .column.is-offset-two-fifths-fullhd { - margin-inline-start: 40%; - } - .column.is-offset-three-fifths-fullhd { - margin-inline-start: 60%; - } - .column.is-offset-four-fifths-fullhd { - margin-inline-start: 80%; - } - .column.is-0-fullhd { - flex: none; - width: 0%; - } - .column.is-offset-0-fullhd { - margin-inline-start: 0%; - } - .column.is-1-fullhd { - flex: none; - width: 8.3333333333%; - } - .column.is-offset-1-fullhd { - margin-inline-start: 8.3333333333%; - } - .column.is-2-fullhd { - flex: none; - width: 16.6666666667%; - } - .column.is-offset-2-fullhd { - margin-inline-start: 16.6666666667%; - } - .column.is-3-fullhd { - flex: none; - width: 25%; - } - .column.is-offset-3-fullhd { - margin-inline-start: 25%; - } - .column.is-4-fullhd { - flex: none; - width: 33.3333333333%; - } - .column.is-offset-4-fullhd { - margin-inline-start: 33.3333333333%; - } - .column.is-5-fullhd { - flex: none; - width: 41.6666666667%; - } - .column.is-offset-5-fullhd { - margin-inline-start: 41.6666666667%; - } - .column.is-6-fullhd { - flex: none; - width: 50%; - } - .column.is-offset-6-fullhd { - margin-inline-start: 50%; - } - .column.is-7-fullhd { - flex: none; - width: 58.3333333333%; - } - .column.is-offset-7-fullhd { - margin-inline-start: 58.3333333333%; - } - .column.is-8-fullhd { - flex: none; - width: 66.6666666667%; - } - .column.is-offset-8-fullhd { - margin-inline-start: 66.6666666667%; - } - .column.is-9-fullhd { - flex: none; - width: 75%; - } - .column.is-offset-9-fullhd { - margin-inline-start: 75%; - } - .column.is-10-fullhd { - flex: none; - width: 83.3333333333%; - } - .column.is-offset-10-fullhd { - margin-inline-start: 83.3333333333%; - } - .column.is-11-fullhd { - flex: none; - width: 91.6666666667%; - } - .column.is-offset-11-fullhd { - margin-inline-start: 91.6666666667%; - } - .column.is-12-fullhd { - flex: none; - width: 100%; - } - .column.is-offset-12-fullhd { - margin-inline-start: 100%; - } -} - -.columns { - margin-inline-start: calc(-1 * var(--bulma-column-gap)); - margin-inline-end: calc(-1 * var(--bulma-column-gap)); - margin-top: calc(-1 * var(--bulma-column-gap)); -} -.columns:last-child { - margin-bottom: calc(-1 * var(--bulma-column-gap)); -} -.columns:not(:last-child) { - margin-bottom: calc(var(--bulma-block-spacing) - var(--bulma-column-gap)); -} -.columns.is-centered { - justify-content: center; -} -.columns.is-gapless { - margin-inline-start: 0; - margin-inline-end: 0; - margin-top: 0; -} -.columns.is-gapless > .column { - margin: 0; - padding: 0 !important; -} -.columns.is-gapless:not(:last-child) { - margin-bottom: 1.5rem; -} -.columns.is-gapless:last-child { - margin-bottom: 0; -} -.columns.is-mobile { - display: flex; -} -.columns.is-multiline { - flex-wrap: wrap; -} -.columns.is-vcentered { - align-items: center; -} -@media screen and (min-width: 769px), print { - .columns:not(.is-desktop) { - display: flex; - } -} -@media screen and (min-width: 1024px) { - .columns.is-desktop { - display: flex; - } -} -.columns.is-0 { - --bulma-column-gap: 0rem; -} -@media screen and (max-width: 768px) { - .columns.is-0-mobile { - --bulma-column-gap: 0rem; - } -} -@media screen and (min-width: 769px), print { - .columns.is-0-tablet { - --bulma-column-gap: 0rem; - } -} -@media screen and (min-width: 769px) and (max-width: 1023px) { - .columns.is-0-tablet-only { - --bulma-column-gap: 0rem; - } -} -@media screen and (max-width: 1023px) { - .columns.is-0-touch { - --bulma-column-gap: 0rem; - } -} -@media screen and (min-width: 1024px) { - .columns.is-0-desktop { - --bulma-column-gap: 0rem; - } -} -@media screen and (min-width: 1024px) and (max-width: 1215px) { - .columns.is-0-desktop-only { - --bulma-column-gap: 0rem; - } -} -@media screen and (min-width: 1216px) { - .columns.is-0-widescreen { - --bulma-column-gap: 0rem; - } -} -@media screen and (min-width: 1216px) and (max-width: 1407px) { - .columns.is-0-widescreen-only { - --bulma-column-gap: 0rem; - } -} -@media screen and (min-width: 1408px) { - .columns.is-0-fullhd { - --bulma-column-gap: 0rem; - } -} -.columns.is-1 { - --bulma-column-gap: 0.25rem; -} -@media screen and (max-width: 768px) { - .columns.is-1-mobile { - --bulma-column-gap: 0.25rem; - } -} -@media screen and (min-width: 769px), print { - .columns.is-1-tablet { - --bulma-column-gap: 0.25rem; - } -} -@media screen and (min-width: 769px) and (max-width: 1023px) { - .columns.is-1-tablet-only { - --bulma-column-gap: 0.25rem; - } -} -@media screen and (max-width: 1023px) { - .columns.is-1-touch { - --bulma-column-gap: 0.25rem; - } -} -@media screen and (min-width: 1024px) { - .columns.is-1-desktop { - --bulma-column-gap: 0.25rem; - } -} -@media screen and (min-width: 1024px) and (max-width: 1215px) { - .columns.is-1-desktop-only { - --bulma-column-gap: 0.25rem; - } -} -@media screen and (min-width: 1216px) { - .columns.is-1-widescreen { - --bulma-column-gap: 0.25rem; - } -} -@media screen and (min-width: 1216px) and (max-width: 1407px) { - .columns.is-1-widescreen-only { - --bulma-column-gap: 0.25rem; - } -} -@media screen and (min-width: 1408px) { - .columns.is-1-fullhd { - --bulma-column-gap: 0.25rem; - } -} -.columns.is-2 { - --bulma-column-gap: 0.5rem; -} -@media screen and (max-width: 768px) { - .columns.is-2-mobile { - --bulma-column-gap: 0.5rem; - } -} -@media screen and (min-width: 769px), print { - .columns.is-2-tablet { - --bulma-column-gap: 0.5rem; - } -} -@media screen and (min-width: 769px) and (max-width: 1023px) { - .columns.is-2-tablet-only { - --bulma-column-gap: 0.5rem; - } -} -@media screen and (max-width: 1023px) { - .columns.is-2-touch { - --bulma-column-gap: 0.5rem; - } -} -@media screen and (min-width: 1024px) { - .columns.is-2-desktop { - --bulma-column-gap: 0.5rem; - } -} -@media screen and (min-width: 1024px) and (max-width: 1215px) { - .columns.is-2-desktop-only { - --bulma-column-gap: 0.5rem; - } -} -@media screen and (min-width: 1216px) { - .columns.is-2-widescreen { - --bulma-column-gap: 0.5rem; - } -} -@media screen and (min-width: 1216px) and (max-width: 1407px) { - .columns.is-2-widescreen-only { - --bulma-column-gap: 0.5rem; - } -} -@media screen and (min-width: 1408px) { - .columns.is-2-fullhd { - --bulma-column-gap: 0.5rem; - } -} -.columns.is-3 { - --bulma-column-gap: 0.75rem; -} -@media screen and (max-width: 768px) { - .columns.is-3-mobile { - --bulma-column-gap: 0.75rem; - } -} -@media screen and (min-width: 769px), print { - .columns.is-3-tablet { - --bulma-column-gap: 0.75rem; - } -} -@media screen and (min-width: 769px) and (max-width: 1023px) { - .columns.is-3-tablet-only { - --bulma-column-gap: 0.75rem; - } -} -@media screen and (max-width: 1023px) { - .columns.is-3-touch { - --bulma-column-gap: 0.75rem; - } -} -@media screen and (min-width: 1024px) { - .columns.is-3-desktop { - --bulma-column-gap: 0.75rem; - } -} -@media screen and (min-width: 1024px) and (max-width: 1215px) { - .columns.is-3-desktop-only { - --bulma-column-gap: 0.75rem; - } -} -@media screen and (min-width: 1216px) { - .columns.is-3-widescreen { - --bulma-column-gap: 0.75rem; - } -} -@media screen and (min-width: 1216px) and (max-width: 1407px) { - .columns.is-3-widescreen-only { - --bulma-column-gap: 0.75rem; - } -} -@media screen and (min-width: 1408px) { - .columns.is-3-fullhd { - --bulma-column-gap: 0.75rem; - } -} -.columns.is-4 { - --bulma-column-gap: 1rem; -} -@media screen and (max-width: 768px) { - .columns.is-4-mobile { - --bulma-column-gap: 1rem; - } -} -@media screen and (min-width: 769px), print { - .columns.is-4-tablet { - --bulma-column-gap: 1rem; - } -} -@media screen and (min-width: 769px) and (max-width: 1023px) { - .columns.is-4-tablet-only { - --bulma-column-gap: 1rem; - } -} -@media screen and (max-width: 1023px) { - .columns.is-4-touch { - --bulma-column-gap: 1rem; - } -} -@media screen and (min-width: 1024px) { - .columns.is-4-desktop { - --bulma-column-gap: 1rem; - } -} -@media screen and (min-width: 1024px) and (max-width: 1215px) { - .columns.is-4-desktop-only { - --bulma-column-gap: 1rem; - } -} -@media screen and (min-width: 1216px) { - .columns.is-4-widescreen { - --bulma-column-gap: 1rem; - } -} -@media screen and (min-width: 1216px) and (max-width: 1407px) { - .columns.is-4-widescreen-only { - --bulma-column-gap: 1rem; - } -} -@media screen and (min-width: 1408px) { - .columns.is-4-fullhd { - --bulma-column-gap: 1rem; - } -} -.columns.is-5 { - --bulma-column-gap: 1.25rem; -} -@media screen and (max-width: 768px) { - .columns.is-5-mobile { - --bulma-column-gap: 1.25rem; - } -} -@media screen and (min-width: 769px), print { - .columns.is-5-tablet { - --bulma-column-gap: 1.25rem; - } -} -@media screen and (min-width: 769px) and (max-width: 1023px) { - .columns.is-5-tablet-only { - --bulma-column-gap: 1.25rem; - } -} -@media screen and (max-width: 1023px) { - .columns.is-5-touch { - --bulma-column-gap: 1.25rem; - } -} -@media screen and (min-width: 1024px) { - .columns.is-5-desktop { - --bulma-column-gap: 1.25rem; - } -} -@media screen and (min-width: 1024px) and (max-width: 1215px) { - .columns.is-5-desktop-only { - --bulma-column-gap: 1.25rem; - } -} -@media screen and (min-width: 1216px) { - .columns.is-5-widescreen { - --bulma-column-gap: 1.25rem; - } -} -@media screen and (min-width: 1216px) and (max-width: 1407px) { - .columns.is-5-widescreen-only { - --bulma-column-gap: 1.25rem; - } -} -@media screen and (min-width: 1408px) { - .columns.is-5-fullhd { - --bulma-column-gap: 1.25rem; - } -} -.columns.is-6 { - --bulma-column-gap: 1.5rem; -} -@media screen and (max-width: 768px) { - .columns.is-6-mobile { - --bulma-column-gap: 1.5rem; - } -} -@media screen and (min-width: 769px), print { - .columns.is-6-tablet { - --bulma-column-gap: 1.5rem; - } -} -@media screen and (min-width: 769px) and (max-width: 1023px) { - .columns.is-6-tablet-only { - --bulma-column-gap: 1.5rem; - } -} -@media screen and (max-width: 1023px) { - .columns.is-6-touch { - --bulma-column-gap: 1.5rem; - } -} -@media screen and (min-width: 1024px) { - .columns.is-6-desktop { - --bulma-column-gap: 1.5rem; - } -} -@media screen and (min-width: 1024px) and (max-width: 1215px) { - .columns.is-6-desktop-only { - --bulma-column-gap: 1.5rem; - } -} -@media screen and (min-width: 1216px) { - .columns.is-6-widescreen { - --bulma-column-gap: 1.5rem; - } -} -@media screen and (min-width: 1216px) and (max-width: 1407px) { - .columns.is-6-widescreen-only { - --bulma-column-gap: 1.5rem; - } -} -@media screen and (min-width: 1408px) { - .columns.is-6-fullhd { - --bulma-column-gap: 1.5rem; - } -} -.columns.is-7 { - --bulma-column-gap: 1.75rem; -} -@media screen and (max-width: 768px) { - .columns.is-7-mobile { - --bulma-column-gap: 1.75rem; - } -} -@media screen and (min-width: 769px), print { - .columns.is-7-tablet { - --bulma-column-gap: 1.75rem; - } -} -@media screen and (min-width: 769px) and (max-width: 1023px) { - .columns.is-7-tablet-only { - --bulma-column-gap: 1.75rem; - } -} -@media screen and (max-width: 1023px) { - .columns.is-7-touch { - --bulma-column-gap: 1.75rem; - } -} -@media screen and (min-width: 1024px) { - .columns.is-7-desktop { - --bulma-column-gap: 1.75rem; - } -} -@media screen and (min-width: 1024px) and (max-width: 1215px) { - .columns.is-7-desktop-only { - --bulma-column-gap: 1.75rem; - } -} -@media screen and (min-width: 1216px) { - .columns.is-7-widescreen { - --bulma-column-gap: 1.75rem; - } -} -@media screen and (min-width: 1216px) and (max-width: 1407px) { - .columns.is-7-widescreen-only { - --bulma-column-gap: 1.75rem; - } -} -@media screen and (min-width: 1408px) { - .columns.is-7-fullhd { - --bulma-column-gap: 1.75rem; - } -} -.columns.is-8 { - --bulma-column-gap: 2rem; -} -@media screen and (max-width: 768px) { - .columns.is-8-mobile { - --bulma-column-gap: 2rem; - } -} -@media screen and (min-width: 769px), print { - .columns.is-8-tablet { - --bulma-column-gap: 2rem; - } -} -@media screen and (min-width: 769px) and (max-width: 1023px) { - .columns.is-8-tablet-only { - --bulma-column-gap: 2rem; - } -} -@media screen and (max-width: 1023px) { - .columns.is-8-touch { - --bulma-column-gap: 2rem; - } -} -@media screen and (min-width: 1024px) { - .columns.is-8-desktop { - --bulma-column-gap: 2rem; - } -} -@media screen and (min-width: 1024px) and (max-width: 1215px) { - .columns.is-8-desktop-only { - --bulma-column-gap: 2rem; - } -} -@media screen and (min-width: 1216px) { - .columns.is-8-widescreen { - --bulma-column-gap: 2rem; - } -} -@media screen and (min-width: 1216px) and (max-width: 1407px) { - .columns.is-8-widescreen-only { - --bulma-column-gap: 2rem; - } -} -@media screen and (min-width: 1408px) { - .columns.is-8-fullhd { - --bulma-column-gap: 2rem; - } -} - -.fixed-grid { - container-name: bulma-fixed-grid; - container-type: inline-size; -} -.fixed-grid > .grid { - --bulma-grid-gap-count: calc(var(--bulma-grid-column-count) - 1); - --bulma-grid-column-count: 2; - grid-template-columns: repeat(var(--bulma-grid-column-count), 1fr); -} -.fixed-grid.has-1-cols > .grid { - --bulma-grid-column-count: 1; -} -.fixed-grid.has-2-cols > .grid { - --bulma-grid-column-count: 2; -} -.fixed-grid.has-3-cols > .grid { - --bulma-grid-column-count: 3; -} -.fixed-grid.has-4-cols > .grid { - --bulma-grid-column-count: 4; -} -.fixed-grid.has-5-cols > .grid { - --bulma-grid-column-count: 5; -} -.fixed-grid.has-6-cols > .grid { - --bulma-grid-column-count: 6; -} -.fixed-grid.has-7-cols > .grid { - --bulma-grid-column-count: 7; -} -.fixed-grid.has-8-cols > .grid { - --bulma-grid-column-count: 8; -} -.fixed-grid.has-9-cols > .grid { - --bulma-grid-column-count: 9; -} -.fixed-grid.has-10-cols > .grid { - --bulma-grid-column-count: 10; -} -.fixed-grid.has-11-cols > .grid { - --bulma-grid-column-count: 11; -} -.fixed-grid.has-12-cols > .grid { - --bulma-grid-column-count: 12; -} -@container bulma-fixed-grid (max-width: 768px) { - .fixed-grid.has-1-cols-mobile > .grid { - --bulma-grid-column-count: 1; - } - .fixed-grid.has-2-cols-mobile > .grid { - --bulma-grid-column-count: 2; - } - .fixed-grid.has-3-cols-mobile > .grid { - --bulma-grid-column-count: 3; - } - .fixed-grid.has-4-cols-mobile > .grid { - --bulma-grid-column-count: 4; - } - .fixed-grid.has-5-cols-mobile > .grid { - --bulma-grid-column-count: 5; - } - .fixed-grid.has-6-cols-mobile > .grid { - --bulma-grid-column-count: 6; - } - .fixed-grid.has-7-cols-mobile > .grid { - --bulma-grid-column-count: 7; - } - .fixed-grid.has-8-cols-mobile > .grid { - --bulma-grid-column-count: 8; - } - .fixed-grid.has-9-cols-mobile > .grid { - --bulma-grid-column-count: 9; - } - .fixed-grid.has-10-cols-mobile > .grid { - --bulma-grid-column-count: 10; - } - .fixed-grid.has-11-cols-mobile > .grid { - --bulma-grid-column-count: 11; - } - .fixed-grid.has-12-cols-mobile > .grid { - --bulma-grid-column-count: 12; - } -} -@container bulma-fixed-grid (min-width: 769px) { - .fixed-grid.has-1-cols-tablet > .grid { - --bulma-grid-column-count: 1; - } - .fixed-grid.has-2-cols-tablet > .grid { - --bulma-grid-column-count: 2; - } - .fixed-grid.has-3-cols-tablet > .grid { - --bulma-grid-column-count: 3; - } - .fixed-grid.has-4-cols-tablet > .grid { - --bulma-grid-column-count: 4; - } - .fixed-grid.has-5-cols-tablet > .grid { - --bulma-grid-column-count: 5; - } - .fixed-grid.has-6-cols-tablet > .grid { - --bulma-grid-column-count: 6; - } - .fixed-grid.has-7-cols-tablet > .grid { - --bulma-grid-column-count: 7; - } - .fixed-grid.has-8-cols-tablet > .grid { - --bulma-grid-column-count: 8; - } - .fixed-grid.has-9-cols-tablet > .grid { - --bulma-grid-column-count: 9; - } - .fixed-grid.has-10-cols-tablet > .grid { - --bulma-grid-column-count: 10; - } - .fixed-grid.has-11-cols-tablet > .grid { - --bulma-grid-column-count: 11; - } - .fixed-grid.has-12-cols-tablet > .grid { - --bulma-grid-column-count: 12; - } -} -@container bulma-fixed-grid (min-width: 1024px) { - .fixed-grid.has-1-cols-desktop > .grid { - --bulma-grid-column-count: 1; - } - .fixed-grid.has-2-cols-desktop > .grid { - --bulma-grid-column-count: 2; - } - .fixed-grid.has-3-cols-desktop > .grid { - --bulma-grid-column-count: 3; - } - .fixed-grid.has-4-cols-desktop > .grid { - --bulma-grid-column-count: 4; - } - .fixed-grid.has-5-cols-desktop > .grid { - --bulma-grid-column-count: 5; - } - .fixed-grid.has-6-cols-desktop > .grid { - --bulma-grid-column-count: 6; - } - .fixed-grid.has-7-cols-desktop > .grid { - --bulma-grid-column-count: 7; - } - .fixed-grid.has-8-cols-desktop > .grid { - --bulma-grid-column-count: 8; - } - .fixed-grid.has-9-cols-desktop > .grid { - --bulma-grid-column-count: 9; - } - .fixed-grid.has-10-cols-desktop > .grid { - --bulma-grid-column-count: 10; - } - .fixed-grid.has-11-cols-desktop > .grid { - --bulma-grid-column-count: 11; - } - .fixed-grid.has-12-cols-desktop > .grid { - --bulma-grid-column-count: 12; - } -} -@container bulma-fixed-grid (min-width: 1216px) { - .fixed-grid.has-1-cols-widescreen > .grid { - --bulma-grid-column-count: 1; - } - .fixed-grid.has-2-cols-widescreen > .grid { - --bulma-grid-column-count: 2; - } - .fixed-grid.has-3-cols-widescreen > .grid { - --bulma-grid-column-count: 3; - } - .fixed-grid.has-4-cols-widescreen > .grid { - --bulma-grid-column-count: 4; - } - .fixed-grid.has-5-cols-widescreen > .grid { - --bulma-grid-column-count: 5; - } - .fixed-grid.has-6-cols-widescreen > .grid { - --bulma-grid-column-count: 6; - } - .fixed-grid.has-7-cols-widescreen > .grid { - --bulma-grid-column-count: 7; - } - .fixed-grid.has-8-cols-widescreen > .grid { - --bulma-grid-column-count: 8; - } - .fixed-grid.has-9-cols-widescreen > .grid { - --bulma-grid-column-count: 9; - } - .fixed-grid.has-10-cols-widescreen > .grid { - --bulma-grid-column-count: 10; - } - .fixed-grid.has-11-cols-widescreen > .grid { - --bulma-grid-column-count: 11; - } - .fixed-grid.has-12-cols-widescreen > .grid { - --bulma-grid-column-count: 12; - } -} -@container bulma-fixed-grid (min-width: 1408px) { - .fixed-grid.has-1-cols-fullhd > .grid { - --bulma-grid-column-count: 1; - } - .fixed-grid.has-2-cols-fullhd > .grid { - --bulma-grid-column-count: 2; - } - .fixed-grid.has-3-cols-fullhd > .grid { - --bulma-grid-column-count: 3; - } - .fixed-grid.has-4-cols-fullhd > .grid { - --bulma-grid-column-count: 4; - } - .fixed-grid.has-5-cols-fullhd > .grid { - --bulma-grid-column-count: 5; - } - .fixed-grid.has-6-cols-fullhd > .grid { - --bulma-grid-column-count: 6; - } - .fixed-grid.has-7-cols-fullhd > .grid { - --bulma-grid-column-count: 7; - } - .fixed-grid.has-8-cols-fullhd > .grid { - --bulma-grid-column-count: 8; - } - .fixed-grid.has-9-cols-fullhd > .grid { - --bulma-grid-column-count: 9; - } - .fixed-grid.has-10-cols-fullhd > .grid { - --bulma-grid-column-count: 10; - } - .fixed-grid.has-11-cols-fullhd > .grid { - --bulma-grid-column-count: 11; - } - .fixed-grid.has-12-cols-fullhd > .grid { - --bulma-grid-column-count: 12; - } -} -@container bulma-fixed-grid (max-width: 768px) { - .fixed-grid.has-auto-count .grid { - --bulma-grid-column-count: 2; - } -} -@container bulma-fixed-grid (min-width: 769px) { - .fixed-grid.has-auto-count .grid { - --bulma-grid-column-count: 4; - } -} -@container bulma-fixed-grid (min-width: 1024px) { - .fixed-grid.has-auto-count .grid { - --bulma-grid-column-count: 8; - } -} -@container bulma-fixed-grid (min-width: 1216px) { - .fixed-grid.has-auto-count .grid { - --bulma-grid-column-count: 12; - } -} -@container bulma-fixed-grid (min-width: 1408px) { - .fixed-grid.has-auto-count .grid { - --bulma-grid-column-count: 16; - } -} - -.grid { - --bulma-grid-gap: 0.75rem; - --bulma-grid-column-min: 9rem; - --bulma-grid-cell-column-span: 1; - --bulma-grid-cell-row-span: 1; - display: grid; - gap: var(--bulma-grid-gap); - column-gap: var(--bulma-grid-column-gap, var(--bulma-grid-gap)); - row-gap: var(--bulma-grid-row-gap, var(--bulma-grid-gap)); - grid-template-columns: repeat(auto-fit, minmax(var(--bulma-grid-column-min), 1fr)); - grid-template-rows: auto; -} -.grid.is-auto-fill { - grid-template-columns: repeat(auto-fill, minmax(var(--bulma-grid-column-min), 1fr)); -} -.grid.is-col-min-1 { - --bulma-grid-column-min: 1.5rem; -} -.grid.is-col-min-2 { - --bulma-grid-column-min: 3rem; -} -.grid.is-col-min-3 { - --bulma-grid-column-min: 4.5rem; -} -.grid.is-col-min-4 { - --bulma-grid-column-min: 6rem; -} -.grid.is-col-min-5 { - --bulma-grid-column-min: 7.5rem; -} -.grid.is-col-min-6 { - --bulma-grid-column-min: 9rem; -} -.grid.is-col-min-7 { - --bulma-grid-column-min: 10.5rem; -} -.grid.is-col-min-8 { - --bulma-grid-column-min: 12rem; -} -.grid.is-col-min-9 { - --bulma-grid-column-min: 13.5rem; -} -.grid.is-col-min-10 { - --bulma-grid-column-min: 15rem; -} -.grid.is-col-min-11 { - --bulma-grid-column-min: 16.5rem; -} -.grid.is-col-min-12 { - --bulma-grid-column-min: 18rem; -} -.grid.is-col-min-13 { - --bulma-grid-column-min: 19.5rem; -} -.grid.is-col-min-14 { - --bulma-grid-column-min: 21rem; -} -.grid.is-col-min-15 { - --bulma-grid-column-min: 22.5rem; -} -.grid.is-col-min-16 { - --bulma-grid-column-min: 24rem; -} -.grid.is-col-min-17 { - --bulma-grid-column-min: 25.5rem; -} -.grid.is-col-min-18 { - --bulma-grid-column-min: 27rem; -} -.grid.is-col-min-19 { - --bulma-grid-column-min: 28.5rem; -} -.grid.is-col-min-20 { - --bulma-grid-column-min: 30rem; -} -.grid.is-col-min-21 { - --bulma-grid-column-min: 31.5rem; -} -.grid.is-col-min-22 { - --bulma-grid-column-min: 33rem; -} -.grid.is-col-min-23 { - --bulma-grid-column-min: 34.5rem; -} -.grid.is-col-min-24 { - --bulma-grid-column-min: 36rem; -} -.grid.is-col-min-25 { - --bulma-grid-column-min: 37.5rem; -} -.grid.is-col-min-26 { - --bulma-grid-column-min: 39rem; -} -.grid.is-col-min-27 { - --bulma-grid-column-min: 40.5rem; -} -.grid.is-col-min-28 { - --bulma-grid-column-min: 42rem; -} -.grid.is-col-min-29 { - --bulma-grid-column-min: 43.5rem; -} -.grid.is-col-min-30 { - --bulma-grid-column-min: 45rem; -} -.grid.is-col-min-31 { - --bulma-grid-column-min: 46.5rem; -} -.grid.is-col-min-32 { - --bulma-grid-column-min: 48rem; -} - -.cell { - grid-column-end: span var(--bulma-grid-cell-column-span); - grid-column-start: var(--bulma-grid-cell-column-start); - grid-row-end: span var(--bulma-grid-cell-row-span); - grid-row-start: var(--bulma-grid-cell-row-start); -} -.cell.is-col-start-end { - --bulma-grid-cell-column-start: -1; -} -.cell.is-row-start-end { - --bulma-grid-cell-row-start: -1; -} -.cell.is-col-start-1 { - --bulma-grid-cell-column-start: 1; -} -.cell.is-col-end-1 { - --bulma-grid-cell-column-end: 1; -} -.cell.is-col-from-end-1 { - --bulma-grid-cell-column-start: -1; -} -.cell.is-col-span-1 { - --bulma-grid-cell-column-span: 1; -} -.cell.is-row-start-1 { - --bulma-grid-cell-row-start: 1; -} -.cell.is-row-end-1 { - --bulma-grid-cell-row-end: 1; -} -.cell.is-row-from-end-1 { - --bulma-grid-cell-row-start: -1; -} -.cell.is-row-span-1 { - --bulma-grid-cell-row-span: 1; -} -.cell.is-col-start-2 { - --bulma-grid-cell-column-start: 2; -} -.cell.is-col-end-2 { - --bulma-grid-cell-column-end: 2; -} -.cell.is-col-from-end-2 { - --bulma-grid-cell-column-start: -2; -} -.cell.is-col-span-2 { - --bulma-grid-cell-column-span: 2; -} -.cell.is-row-start-2 { - --bulma-grid-cell-row-start: 2; -} -.cell.is-row-end-2 { - --bulma-grid-cell-row-end: 2; -} -.cell.is-row-from-end-2 { - --bulma-grid-cell-row-start: -2; -} -.cell.is-row-span-2 { - --bulma-grid-cell-row-span: 2; -} -.cell.is-col-start-3 { - --bulma-grid-cell-column-start: 3; -} -.cell.is-col-end-3 { - --bulma-grid-cell-column-end: 3; -} -.cell.is-col-from-end-3 { - --bulma-grid-cell-column-start: -3; -} -.cell.is-col-span-3 { - --bulma-grid-cell-column-span: 3; -} -.cell.is-row-start-3 { - --bulma-grid-cell-row-start: 3; -} -.cell.is-row-end-3 { - --bulma-grid-cell-row-end: 3; -} -.cell.is-row-from-end-3 { - --bulma-grid-cell-row-start: -3; -} -.cell.is-row-span-3 { - --bulma-grid-cell-row-span: 3; -} -.cell.is-col-start-4 { - --bulma-grid-cell-column-start: 4; -} -.cell.is-col-end-4 { - --bulma-grid-cell-column-end: 4; -} -.cell.is-col-from-end-4 { - --bulma-grid-cell-column-start: -4; -} -.cell.is-col-span-4 { - --bulma-grid-cell-column-span: 4; -} -.cell.is-row-start-4 { - --bulma-grid-cell-row-start: 4; -} -.cell.is-row-end-4 { - --bulma-grid-cell-row-end: 4; -} -.cell.is-row-from-end-4 { - --bulma-grid-cell-row-start: -4; -} -.cell.is-row-span-4 { - --bulma-grid-cell-row-span: 4; -} -.cell.is-col-start-5 { - --bulma-grid-cell-column-start: 5; -} -.cell.is-col-end-5 { - --bulma-grid-cell-column-end: 5; -} -.cell.is-col-from-end-5 { - --bulma-grid-cell-column-start: -5; -} -.cell.is-col-span-5 { - --bulma-grid-cell-column-span: 5; -} -.cell.is-row-start-5 { - --bulma-grid-cell-row-start: 5; -} -.cell.is-row-end-5 { - --bulma-grid-cell-row-end: 5; -} -.cell.is-row-from-end-5 { - --bulma-grid-cell-row-start: -5; -} -.cell.is-row-span-5 { - --bulma-grid-cell-row-span: 5; -} -.cell.is-col-start-6 { - --bulma-grid-cell-column-start: 6; -} -.cell.is-col-end-6 { - --bulma-grid-cell-column-end: 6; -} -.cell.is-col-from-end-6 { - --bulma-grid-cell-column-start: -6; -} -.cell.is-col-span-6 { - --bulma-grid-cell-column-span: 6; -} -.cell.is-row-start-6 { - --bulma-grid-cell-row-start: 6; -} -.cell.is-row-end-6 { - --bulma-grid-cell-row-end: 6; -} -.cell.is-row-from-end-6 { - --bulma-grid-cell-row-start: -6; -} -.cell.is-row-span-6 { - --bulma-grid-cell-row-span: 6; -} -.cell.is-col-start-7 { - --bulma-grid-cell-column-start: 7; -} -.cell.is-col-end-7 { - --bulma-grid-cell-column-end: 7; -} -.cell.is-col-from-end-7 { - --bulma-grid-cell-column-start: -7; -} -.cell.is-col-span-7 { - --bulma-grid-cell-column-span: 7; -} -.cell.is-row-start-7 { - --bulma-grid-cell-row-start: 7; -} -.cell.is-row-end-7 { - --bulma-grid-cell-row-end: 7; -} -.cell.is-row-from-end-7 { - --bulma-grid-cell-row-start: -7; -} -.cell.is-row-span-7 { - --bulma-grid-cell-row-span: 7; -} -.cell.is-col-start-8 { - --bulma-grid-cell-column-start: 8; -} -.cell.is-col-end-8 { - --bulma-grid-cell-column-end: 8; -} -.cell.is-col-from-end-8 { - --bulma-grid-cell-column-start: -8; -} -.cell.is-col-span-8 { - --bulma-grid-cell-column-span: 8; -} -.cell.is-row-start-8 { - --bulma-grid-cell-row-start: 8; -} -.cell.is-row-end-8 { - --bulma-grid-cell-row-end: 8; -} -.cell.is-row-from-end-8 { - --bulma-grid-cell-row-start: -8; -} -.cell.is-row-span-8 { - --bulma-grid-cell-row-span: 8; -} -.cell.is-col-start-9 { - --bulma-grid-cell-column-start: 9; -} -.cell.is-col-end-9 { - --bulma-grid-cell-column-end: 9; -} -.cell.is-col-from-end-9 { - --bulma-grid-cell-column-start: -9; -} -.cell.is-col-span-9 { - --bulma-grid-cell-column-span: 9; -} -.cell.is-row-start-9 { - --bulma-grid-cell-row-start: 9; -} -.cell.is-row-end-9 { - --bulma-grid-cell-row-end: 9; -} -.cell.is-row-from-end-9 { - --bulma-grid-cell-row-start: -9; -} -.cell.is-row-span-9 { - --bulma-grid-cell-row-span: 9; -} -.cell.is-col-start-10 { - --bulma-grid-cell-column-start: 10; -} -.cell.is-col-end-10 { - --bulma-grid-cell-column-end: 10; -} -.cell.is-col-from-end-10 { - --bulma-grid-cell-column-start: -10; -} -.cell.is-col-span-10 { - --bulma-grid-cell-column-span: 10; -} -.cell.is-row-start-10 { - --bulma-grid-cell-row-start: 10; -} -.cell.is-row-end-10 { - --bulma-grid-cell-row-end: 10; -} -.cell.is-row-from-end-10 { - --bulma-grid-cell-row-start: -10; -} -.cell.is-row-span-10 { - --bulma-grid-cell-row-span: 10; -} -.cell.is-col-start-11 { - --bulma-grid-cell-column-start: 11; -} -.cell.is-col-end-11 { - --bulma-grid-cell-column-end: 11; -} -.cell.is-col-from-end-11 { - --bulma-grid-cell-column-start: -11; -} -.cell.is-col-span-11 { - --bulma-grid-cell-column-span: 11; -} -.cell.is-row-start-11 { - --bulma-grid-cell-row-start: 11; -} -.cell.is-row-end-11 { - --bulma-grid-cell-row-end: 11; -} -.cell.is-row-from-end-11 { - --bulma-grid-cell-row-start: -11; -} -.cell.is-row-span-11 { - --bulma-grid-cell-row-span: 11; -} -.cell.is-col-start-12 { - --bulma-grid-cell-column-start: 12; -} -.cell.is-col-end-12 { - --bulma-grid-cell-column-end: 12; -} -.cell.is-col-from-end-12 { - --bulma-grid-cell-column-start: -12; -} -.cell.is-col-span-12 { - --bulma-grid-cell-column-span: 12; -} -.cell.is-row-start-12 { - --bulma-grid-cell-row-start: 12; -} -.cell.is-row-end-12 { - --bulma-grid-cell-row-end: 12; -} -.cell.is-row-from-end-12 { - --bulma-grid-cell-row-start: -12; -} -.cell.is-row-span-12 { - --bulma-grid-cell-row-span: 12; -} -@media screen and (max-width: 768px) { - .cell.is-col-start-1-mobile { - --bulma-grid-cell-column-start: 1; - } - .cell.is-col-end-1-mobile { - --bulma-grid-cell-column-end: 1; - } - .cell.is-col-from-end-1-mobile { - --bulma-grid-cell-column-start: -1; - } - .cell.is-col-span-1-mobile { - --bulma-grid-cell-column-span: 1; - } - .cell.is-row-start-1-mobile { - --bulma-grid-cell-row-start: 1; - } - .cell.is-row-end-1-mobile { - --bulma-grid-cell-row-end: 1; - } - .cell.is-row-from-end-1-mobile { - --bulma-grid-cell-row-start: -1; - } - .cell.is-row-span-1-mobile { - --bulma-grid-cell-row-span: 1; - } - .cell.is-col-start-2-mobile { - --bulma-grid-cell-column-start: 2; - } - .cell.is-col-end-2-mobile { - --bulma-grid-cell-column-end: 2; - } - .cell.is-col-from-end-2-mobile { - --bulma-grid-cell-column-start: -2; - } - .cell.is-col-span-2-mobile { - --bulma-grid-cell-column-span: 2; - } - .cell.is-row-start-2-mobile { - --bulma-grid-cell-row-start: 2; - } - .cell.is-row-end-2-mobile { - --bulma-grid-cell-row-end: 2; - } - .cell.is-row-from-end-2-mobile { - --bulma-grid-cell-row-start: -2; - } - .cell.is-row-span-2-mobile { - --bulma-grid-cell-row-span: 2; - } - .cell.is-col-start-3-mobile { - --bulma-grid-cell-column-start: 3; - } - .cell.is-col-end-3-mobile { - --bulma-grid-cell-column-end: 3; - } - .cell.is-col-from-end-3-mobile { - --bulma-grid-cell-column-start: -3; - } - .cell.is-col-span-3-mobile { - --bulma-grid-cell-column-span: 3; - } - .cell.is-row-start-3-mobile { - --bulma-grid-cell-row-start: 3; - } - .cell.is-row-end-3-mobile { - --bulma-grid-cell-row-end: 3; - } - .cell.is-row-from-end-3-mobile { - --bulma-grid-cell-row-start: -3; - } - .cell.is-row-span-3-mobile { - --bulma-grid-cell-row-span: 3; - } - .cell.is-col-start-4-mobile { - --bulma-grid-cell-column-start: 4; - } - .cell.is-col-end-4-mobile { - --bulma-grid-cell-column-end: 4; - } - .cell.is-col-from-end-4-mobile { - --bulma-grid-cell-column-start: -4; - } - .cell.is-col-span-4-mobile { - --bulma-grid-cell-column-span: 4; - } - .cell.is-row-start-4-mobile { - --bulma-grid-cell-row-start: 4; - } - .cell.is-row-end-4-mobile { - --bulma-grid-cell-row-end: 4; - } - .cell.is-row-from-end-4-mobile { - --bulma-grid-cell-row-start: -4; - } - .cell.is-row-span-4-mobile { - --bulma-grid-cell-row-span: 4; - } - .cell.is-col-start-5-mobile { - --bulma-grid-cell-column-start: 5; - } - .cell.is-col-end-5-mobile { - --bulma-grid-cell-column-end: 5; - } - .cell.is-col-from-end-5-mobile { - --bulma-grid-cell-column-start: -5; - } - .cell.is-col-span-5-mobile { - --bulma-grid-cell-column-span: 5; - } - .cell.is-row-start-5-mobile { - --bulma-grid-cell-row-start: 5; - } - .cell.is-row-end-5-mobile { - --bulma-grid-cell-row-end: 5; - } - .cell.is-row-from-end-5-mobile { - --bulma-grid-cell-row-start: -5; - } - .cell.is-row-span-5-mobile { - --bulma-grid-cell-row-span: 5; - } - .cell.is-col-start-6-mobile { - --bulma-grid-cell-column-start: 6; - } - .cell.is-col-end-6-mobile { - --bulma-grid-cell-column-end: 6; - } - .cell.is-col-from-end-6-mobile { - --bulma-grid-cell-column-start: -6; - } - .cell.is-col-span-6-mobile { - --bulma-grid-cell-column-span: 6; - } - .cell.is-row-start-6-mobile { - --bulma-grid-cell-row-start: 6; - } - .cell.is-row-end-6-mobile { - --bulma-grid-cell-row-end: 6; - } - .cell.is-row-from-end-6-mobile { - --bulma-grid-cell-row-start: -6; - } - .cell.is-row-span-6-mobile { - --bulma-grid-cell-row-span: 6; - } - .cell.is-col-start-7-mobile { - --bulma-grid-cell-column-start: 7; - } - .cell.is-col-end-7-mobile { - --bulma-grid-cell-column-end: 7; - } - .cell.is-col-from-end-7-mobile { - --bulma-grid-cell-column-start: -7; - } - .cell.is-col-span-7-mobile { - --bulma-grid-cell-column-span: 7; - } - .cell.is-row-start-7-mobile { - --bulma-grid-cell-row-start: 7; - } - .cell.is-row-end-7-mobile { - --bulma-grid-cell-row-end: 7; - } - .cell.is-row-from-end-7-mobile { - --bulma-grid-cell-row-start: -7; - } - .cell.is-row-span-7-mobile { - --bulma-grid-cell-row-span: 7; - } - .cell.is-col-start-8-mobile { - --bulma-grid-cell-column-start: 8; - } - .cell.is-col-end-8-mobile { - --bulma-grid-cell-column-end: 8; - } - .cell.is-col-from-end-8-mobile { - --bulma-grid-cell-column-start: -8; - } - .cell.is-col-span-8-mobile { - --bulma-grid-cell-column-span: 8; - } - .cell.is-row-start-8-mobile { - --bulma-grid-cell-row-start: 8; - } - .cell.is-row-end-8-mobile { - --bulma-grid-cell-row-end: 8; - } - .cell.is-row-from-end-8-mobile { - --bulma-grid-cell-row-start: -8; - } - .cell.is-row-span-8-mobile { - --bulma-grid-cell-row-span: 8; - } - .cell.is-col-start-9-mobile { - --bulma-grid-cell-column-start: 9; - } - .cell.is-col-end-9-mobile { - --bulma-grid-cell-column-end: 9; - } - .cell.is-col-from-end-9-mobile { - --bulma-grid-cell-column-start: -9; - } - .cell.is-col-span-9-mobile { - --bulma-grid-cell-column-span: 9; - } - .cell.is-row-start-9-mobile { - --bulma-grid-cell-row-start: 9; - } - .cell.is-row-end-9-mobile { - --bulma-grid-cell-row-end: 9; - } - .cell.is-row-from-end-9-mobile { - --bulma-grid-cell-row-start: -9; - } - .cell.is-row-span-9-mobile { - --bulma-grid-cell-row-span: 9; - } - .cell.is-col-start-10-mobile { - --bulma-grid-cell-column-start: 10; - } - .cell.is-col-end-10-mobile { - --bulma-grid-cell-column-end: 10; - } - .cell.is-col-from-end-10-mobile { - --bulma-grid-cell-column-start: -10; - } - .cell.is-col-span-10-mobile { - --bulma-grid-cell-column-span: 10; - } - .cell.is-row-start-10-mobile { - --bulma-grid-cell-row-start: 10; - } - .cell.is-row-end-10-mobile { - --bulma-grid-cell-row-end: 10; - } - .cell.is-row-from-end-10-mobile { - --bulma-grid-cell-row-start: -10; - } - .cell.is-row-span-10-mobile { - --bulma-grid-cell-row-span: 10; - } - .cell.is-col-start-11-mobile { - --bulma-grid-cell-column-start: 11; - } - .cell.is-col-end-11-mobile { - --bulma-grid-cell-column-end: 11; - } - .cell.is-col-from-end-11-mobile { - --bulma-grid-cell-column-start: -11; - } - .cell.is-col-span-11-mobile { - --bulma-grid-cell-column-span: 11; - } - .cell.is-row-start-11-mobile { - --bulma-grid-cell-row-start: 11; - } - .cell.is-row-end-11-mobile { - --bulma-grid-cell-row-end: 11; - } - .cell.is-row-from-end-11-mobile { - --bulma-grid-cell-row-start: -11; - } - .cell.is-row-span-11-mobile { - --bulma-grid-cell-row-span: 11; - } - .cell.is-col-start-12-mobile { - --bulma-grid-cell-column-start: 12; - } - .cell.is-col-end-12-mobile { - --bulma-grid-cell-column-end: 12; - } - .cell.is-col-from-end-12-mobile { - --bulma-grid-cell-column-start: -12; - } - .cell.is-col-span-12-mobile { - --bulma-grid-cell-column-span: 12; - } - .cell.is-row-start-12-mobile { - --bulma-grid-cell-row-start: 12; - } - .cell.is-row-end-12-mobile { - --bulma-grid-cell-row-end: 12; - } - .cell.is-row-from-end-12-mobile { - --bulma-grid-cell-row-start: -12; - } - .cell.is-row-span-12-mobile { - --bulma-grid-cell-row-span: 12; - } -} -@media screen and (min-width: 769px), print { - .cell.is-col-start-1-tablet { - --bulma-grid-cell-column-start: 1; - } - .cell.is-col-end-1-tablet { - --bulma-grid-cell-column-end: 1; - } - .cell.is-col-from-end-1-tablet { - --bulma-grid-cell-column-start: -1; - } - .cell.is-col-span-1-tablet { - --bulma-grid-cell-column-span: 1; - } - .cell.is-row-start-1-tablet { - --bulma-grid-cell-row-start: 1; - } - .cell.is-row-end-1-tablet { - --bulma-grid-cell-row-end: 1; - } - .cell.is-row-from-end-1-tablet { - --bulma-grid-cell-row-start: -1; - } - .cell.is-row-span-1-tablet { - --bulma-grid-cell-row-span: 1; - } - .cell.is-col-start-2-tablet { - --bulma-grid-cell-column-start: 2; - } - .cell.is-col-end-2-tablet { - --bulma-grid-cell-column-end: 2; - } - .cell.is-col-from-end-2-tablet { - --bulma-grid-cell-column-start: -2; - } - .cell.is-col-span-2-tablet { - --bulma-grid-cell-column-span: 2; - } - .cell.is-row-start-2-tablet { - --bulma-grid-cell-row-start: 2; - } - .cell.is-row-end-2-tablet { - --bulma-grid-cell-row-end: 2; - } - .cell.is-row-from-end-2-tablet { - --bulma-grid-cell-row-start: -2; - } - .cell.is-row-span-2-tablet { - --bulma-grid-cell-row-span: 2; - } - .cell.is-col-start-3-tablet { - --bulma-grid-cell-column-start: 3; - } - .cell.is-col-end-3-tablet { - --bulma-grid-cell-column-end: 3; - } - .cell.is-col-from-end-3-tablet { - --bulma-grid-cell-column-start: -3; - } - .cell.is-col-span-3-tablet { - --bulma-grid-cell-column-span: 3; - } - .cell.is-row-start-3-tablet { - --bulma-grid-cell-row-start: 3; - } - .cell.is-row-end-3-tablet { - --bulma-grid-cell-row-end: 3; - } - .cell.is-row-from-end-3-tablet { - --bulma-grid-cell-row-start: -3; - } - .cell.is-row-span-3-tablet { - --bulma-grid-cell-row-span: 3; - } - .cell.is-col-start-4-tablet { - --bulma-grid-cell-column-start: 4; - } - .cell.is-col-end-4-tablet { - --bulma-grid-cell-column-end: 4; - } - .cell.is-col-from-end-4-tablet { - --bulma-grid-cell-column-start: -4; - } - .cell.is-col-span-4-tablet { - --bulma-grid-cell-column-span: 4; - } - .cell.is-row-start-4-tablet { - --bulma-grid-cell-row-start: 4; - } - .cell.is-row-end-4-tablet { - --bulma-grid-cell-row-end: 4; - } - .cell.is-row-from-end-4-tablet { - --bulma-grid-cell-row-start: -4; - } - .cell.is-row-span-4-tablet { - --bulma-grid-cell-row-span: 4; - } - .cell.is-col-start-5-tablet { - --bulma-grid-cell-column-start: 5; - } - .cell.is-col-end-5-tablet { - --bulma-grid-cell-column-end: 5; - } - .cell.is-col-from-end-5-tablet { - --bulma-grid-cell-column-start: -5; - } - .cell.is-col-span-5-tablet { - --bulma-grid-cell-column-span: 5; - } - .cell.is-row-start-5-tablet { - --bulma-grid-cell-row-start: 5; - } - .cell.is-row-end-5-tablet { - --bulma-grid-cell-row-end: 5; - } - .cell.is-row-from-end-5-tablet { - --bulma-grid-cell-row-start: -5; - } - .cell.is-row-span-5-tablet { - --bulma-grid-cell-row-span: 5; - } - .cell.is-col-start-6-tablet { - --bulma-grid-cell-column-start: 6; - } - .cell.is-col-end-6-tablet { - --bulma-grid-cell-column-end: 6; - } - .cell.is-col-from-end-6-tablet { - --bulma-grid-cell-column-start: -6; - } - .cell.is-col-span-6-tablet { - --bulma-grid-cell-column-span: 6; - } - .cell.is-row-start-6-tablet { - --bulma-grid-cell-row-start: 6; - } - .cell.is-row-end-6-tablet { - --bulma-grid-cell-row-end: 6; - } - .cell.is-row-from-end-6-tablet { - --bulma-grid-cell-row-start: -6; - } - .cell.is-row-span-6-tablet { - --bulma-grid-cell-row-span: 6; - } - .cell.is-col-start-7-tablet { - --bulma-grid-cell-column-start: 7; - } - .cell.is-col-end-7-tablet { - --bulma-grid-cell-column-end: 7; - } - .cell.is-col-from-end-7-tablet { - --bulma-grid-cell-column-start: -7; - } - .cell.is-col-span-7-tablet { - --bulma-grid-cell-column-span: 7; - } - .cell.is-row-start-7-tablet { - --bulma-grid-cell-row-start: 7; - } - .cell.is-row-end-7-tablet { - --bulma-grid-cell-row-end: 7; - } - .cell.is-row-from-end-7-tablet { - --bulma-grid-cell-row-start: -7; - } - .cell.is-row-span-7-tablet { - --bulma-grid-cell-row-span: 7; - } - .cell.is-col-start-8-tablet { - --bulma-grid-cell-column-start: 8; - } - .cell.is-col-end-8-tablet { - --bulma-grid-cell-column-end: 8; - } - .cell.is-col-from-end-8-tablet { - --bulma-grid-cell-column-start: -8; - } - .cell.is-col-span-8-tablet { - --bulma-grid-cell-column-span: 8; - } - .cell.is-row-start-8-tablet { - --bulma-grid-cell-row-start: 8; - } - .cell.is-row-end-8-tablet { - --bulma-grid-cell-row-end: 8; - } - .cell.is-row-from-end-8-tablet { - --bulma-grid-cell-row-start: -8; - } - .cell.is-row-span-8-tablet { - --bulma-grid-cell-row-span: 8; - } - .cell.is-col-start-9-tablet { - --bulma-grid-cell-column-start: 9; - } - .cell.is-col-end-9-tablet { - --bulma-grid-cell-column-end: 9; - } - .cell.is-col-from-end-9-tablet { - --bulma-grid-cell-column-start: -9; - } - .cell.is-col-span-9-tablet { - --bulma-grid-cell-column-span: 9; - } - .cell.is-row-start-9-tablet { - --bulma-grid-cell-row-start: 9; - } - .cell.is-row-end-9-tablet { - --bulma-grid-cell-row-end: 9; - } - .cell.is-row-from-end-9-tablet { - --bulma-grid-cell-row-start: -9; - } - .cell.is-row-span-9-tablet { - --bulma-grid-cell-row-span: 9; - } - .cell.is-col-start-10-tablet { - --bulma-grid-cell-column-start: 10; - } - .cell.is-col-end-10-tablet { - --bulma-grid-cell-column-end: 10; - } - .cell.is-col-from-end-10-tablet { - --bulma-grid-cell-column-start: -10; - } - .cell.is-col-span-10-tablet { - --bulma-grid-cell-column-span: 10; - } - .cell.is-row-start-10-tablet { - --bulma-grid-cell-row-start: 10; - } - .cell.is-row-end-10-tablet { - --bulma-grid-cell-row-end: 10; - } - .cell.is-row-from-end-10-tablet { - --bulma-grid-cell-row-start: -10; - } - .cell.is-row-span-10-tablet { - --bulma-grid-cell-row-span: 10; - } - .cell.is-col-start-11-tablet { - --bulma-grid-cell-column-start: 11; - } - .cell.is-col-end-11-tablet { - --bulma-grid-cell-column-end: 11; - } - .cell.is-col-from-end-11-tablet { - --bulma-grid-cell-column-start: -11; - } - .cell.is-col-span-11-tablet { - --bulma-grid-cell-column-span: 11; - } - .cell.is-row-start-11-tablet { - --bulma-grid-cell-row-start: 11; - } - .cell.is-row-end-11-tablet { - --bulma-grid-cell-row-end: 11; - } - .cell.is-row-from-end-11-tablet { - --bulma-grid-cell-row-start: -11; - } - .cell.is-row-span-11-tablet { - --bulma-grid-cell-row-span: 11; - } - .cell.is-col-start-12-tablet { - --bulma-grid-cell-column-start: 12; - } - .cell.is-col-end-12-tablet { - --bulma-grid-cell-column-end: 12; - } - .cell.is-col-from-end-12-tablet { - --bulma-grid-cell-column-start: -12; - } - .cell.is-col-span-12-tablet { - --bulma-grid-cell-column-span: 12; - } - .cell.is-row-start-12-tablet { - --bulma-grid-cell-row-start: 12; - } - .cell.is-row-end-12-tablet { - --bulma-grid-cell-row-end: 12; - } - .cell.is-row-from-end-12-tablet { - --bulma-grid-cell-row-start: -12; - } - .cell.is-row-span-12-tablet { - --bulma-grid-cell-row-span: 12; - } -} -@media screen and (min-width: 769px) and (max-width: 1023px) { - .cell.is-col-start-1-tablet-only { - --bulma-grid-cell-column-start: 1; - } - .cell.is-col-end-1-tablet-only { - --bulma-grid-cell-column-end: 1; - } - .cell.is-col-from-end-1-tablet-only { - --bulma-grid-cell-column-start: -1; - } - .cell.is-col-span-1-tablet-only { - --bulma-grid-cell-column-span: 1; - } - .cell.is-row-start-1-tablet-only { - --bulma-grid-cell-row-start: 1; - } - .cell.is-row-end-1-tablet-only { - --bulma-grid-cell-row-end: 1; - } - .cell.is-row-from-end-1-tablet-only { - --bulma-grid-cell-row-start: -1; - } - .cell.is-row-span-1-tablet-only { - --bulma-grid-cell-row-span: 1; - } - .cell.is-col-start-2-tablet-only { - --bulma-grid-cell-column-start: 2; - } - .cell.is-col-end-2-tablet-only { - --bulma-grid-cell-column-end: 2; - } - .cell.is-col-from-end-2-tablet-only { - --bulma-grid-cell-column-start: -2; - } - .cell.is-col-span-2-tablet-only { - --bulma-grid-cell-column-span: 2; - } - .cell.is-row-start-2-tablet-only { - --bulma-grid-cell-row-start: 2; - } - .cell.is-row-end-2-tablet-only { - --bulma-grid-cell-row-end: 2; - } - .cell.is-row-from-end-2-tablet-only { - --bulma-grid-cell-row-start: -2; - } - .cell.is-row-span-2-tablet-only { - --bulma-grid-cell-row-span: 2; - } - .cell.is-col-start-3-tablet-only { - --bulma-grid-cell-column-start: 3; - } - .cell.is-col-end-3-tablet-only { - --bulma-grid-cell-column-end: 3; - } - .cell.is-col-from-end-3-tablet-only { - --bulma-grid-cell-column-start: -3; - } - .cell.is-col-span-3-tablet-only { - --bulma-grid-cell-column-span: 3; - } - .cell.is-row-start-3-tablet-only { - --bulma-grid-cell-row-start: 3; - } - .cell.is-row-end-3-tablet-only { - --bulma-grid-cell-row-end: 3; - } - .cell.is-row-from-end-3-tablet-only { - --bulma-grid-cell-row-start: -3; - } - .cell.is-row-span-3-tablet-only { - --bulma-grid-cell-row-span: 3; - } - .cell.is-col-start-4-tablet-only { - --bulma-grid-cell-column-start: 4; - } - .cell.is-col-end-4-tablet-only { - --bulma-grid-cell-column-end: 4; - } - .cell.is-col-from-end-4-tablet-only { - --bulma-grid-cell-column-start: -4; - } - .cell.is-col-span-4-tablet-only { - --bulma-grid-cell-column-span: 4; - } - .cell.is-row-start-4-tablet-only { - --bulma-grid-cell-row-start: 4; - } - .cell.is-row-end-4-tablet-only { - --bulma-grid-cell-row-end: 4; - } - .cell.is-row-from-end-4-tablet-only { - --bulma-grid-cell-row-start: -4; - } - .cell.is-row-span-4-tablet-only { - --bulma-grid-cell-row-span: 4; - } - .cell.is-col-start-5-tablet-only { - --bulma-grid-cell-column-start: 5; - } - .cell.is-col-end-5-tablet-only { - --bulma-grid-cell-column-end: 5; - } - .cell.is-col-from-end-5-tablet-only { - --bulma-grid-cell-column-start: -5; - } - .cell.is-col-span-5-tablet-only { - --bulma-grid-cell-column-span: 5; - } - .cell.is-row-start-5-tablet-only { - --bulma-grid-cell-row-start: 5; - } - .cell.is-row-end-5-tablet-only { - --bulma-grid-cell-row-end: 5; - } - .cell.is-row-from-end-5-tablet-only { - --bulma-grid-cell-row-start: -5; - } - .cell.is-row-span-5-tablet-only { - --bulma-grid-cell-row-span: 5; - } - .cell.is-col-start-6-tablet-only { - --bulma-grid-cell-column-start: 6; - } - .cell.is-col-end-6-tablet-only { - --bulma-grid-cell-column-end: 6; - } - .cell.is-col-from-end-6-tablet-only { - --bulma-grid-cell-column-start: -6; - } - .cell.is-col-span-6-tablet-only { - --bulma-grid-cell-column-span: 6; - } - .cell.is-row-start-6-tablet-only { - --bulma-grid-cell-row-start: 6; - } - .cell.is-row-end-6-tablet-only { - --bulma-grid-cell-row-end: 6; - } - .cell.is-row-from-end-6-tablet-only { - --bulma-grid-cell-row-start: -6; - } - .cell.is-row-span-6-tablet-only { - --bulma-grid-cell-row-span: 6; - } - .cell.is-col-start-7-tablet-only { - --bulma-grid-cell-column-start: 7; - } - .cell.is-col-end-7-tablet-only { - --bulma-grid-cell-column-end: 7; - } - .cell.is-col-from-end-7-tablet-only { - --bulma-grid-cell-column-start: -7; - } - .cell.is-col-span-7-tablet-only { - --bulma-grid-cell-column-span: 7; - } - .cell.is-row-start-7-tablet-only { - --bulma-grid-cell-row-start: 7; - } - .cell.is-row-end-7-tablet-only { - --bulma-grid-cell-row-end: 7; - } - .cell.is-row-from-end-7-tablet-only { - --bulma-grid-cell-row-start: -7; - } - .cell.is-row-span-7-tablet-only { - --bulma-grid-cell-row-span: 7; - } - .cell.is-col-start-8-tablet-only { - --bulma-grid-cell-column-start: 8; - } - .cell.is-col-end-8-tablet-only { - --bulma-grid-cell-column-end: 8; - } - .cell.is-col-from-end-8-tablet-only { - --bulma-grid-cell-column-start: -8; - } - .cell.is-col-span-8-tablet-only { - --bulma-grid-cell-column-span: 8; - } - .cell.is-row-start-8-tablet-only { - --bulma-grid-cell-row-start: 8; - } - .cell.is-row-end-8-tablet-only { - --bulma-grid-cell-row-end: 8; - } - .cell.is-row-from-end-8-tablet-only { - --bulma-grid-cell-row-start: -8; - } - .cell.is-row-span-8-tablet-only { - --bulma-grid-cell-row-span: 8; - } - .cell.is-col-start-9-tablet-only { - --bulma-grid-cell-column-start: 9; - } - .cell.is-col-end-9-tablet-only { - --bulma-grid-cell-column-end: 9; - } - .cell.is-col-from-end-9-tablet-only { - --bulma-grid-cell-column-start: -9; - } - .cell.is-col-span-9-tablet-only { - --bulma-grid-cell-column-span: 9; - } - .cell.is-row-start-9-tablet-only { - --bulma-grid-cell-row-start: 9; - } - .cell.is-row-end-9-tablet-only { - --bulma-grid-cell-row-end: 9; - } - .cell.is-row-from-end-9-tablet-only { - --bulma-grid-cell-row-start: -9; - } - .cell.is-row-span-9-tablet-only { - --bulma-grid-cell-row-span: 9; - } - .cell.is-col-start-10-tablet-only { - --bulma-grid-cell-column-start: 10; - } - .cell.is-col-end-10-tablet-only { - --bulma-grid-cell-column-end: 10; - } - .cell.is-col-from-end-10-tablet-only { - --bulma-grid-cell-column-start: -10; - } - .cell.is-col-span-10-tablet-only { - --bulma-grid-cell-column-span: 10; - } - .cell.is-row-start-10-tablet-only { - --bulma-grid-cell-row-start: 10; - } - .cell.is-row-end-10-tablet-only { - --bulma-grid-cell-row-end: 10; - } - .cell.is-row-from-end-10-tablet-only { - --bulma-grid-cell-row-start: -10; - } - .cell.is-row-span-10-tablet-only { - --bulma-grid-cell-row-span: 10; - } - .cell.is-col-start-11-tablet-only { - --bulma-grid-cell-column-start: 11; - } - .cell.is-col-end-11-tablet-only { - --bulma-grid-cell-column-end: 11; - } - .cell.is-col-from-end-11-tablet-only { - --bulma-grid-cell-column-start: -11; - } - .cell.is-col-span-11-tablet-only { - --bulma-grid-cell-column-span: 11; - } - .cell.is-row-start-11-tablet-only { - --bulma-grid-cell-row-start: 11; - } - .cell.is-row-end-11-tablet-only { - --bulma-grid-cell-row-end: 11; - } - .cell.is-row-from-end-11-tablet-only { - --bulma-grid-cell-row-start: -11; - } - .cell.is-row-span-11-tablet-only { - --bulma-grid-cell-row-span: 11; - } - .cell.is-col-start-12-tablet-only { - --bulma-grid-cell-column-start: 12; - } - .cell.is-col-end-12-tablet-only { - --bulma-grid-cell-column-end: 12; - } - .cell.is-col-from-end-12-tablet-only { - --bulma-grid-cell-column-start: -12; - } - .cell.is-col-span-12-tablet-only { - --bulma-grid-cell-column-span: 12; - } - .cell.is-row-start-12-tablet-only { - --bulma-grid-cell-row-start: 12; - } - .cell.is-row-end-12-tablet-only { - --bulma-grid-cell-row-end: 12; - } - .cell.is-row-from-end-12-tablet-only { - --bulma-grid-cell-row-start: -12; - } - .cell.is-row-span-12-tablet-only { - --bulma-grid-cell-row-span: 12; - } -} -@media screen and (min-width: 1024px) { - .cell.is-col-start-1-desktop { - --bulma-grid-cell-column-start: 1; - } - .cell.is-col-end-1-desktop { - --bulma-grid-cell-column-end: 1; - } - .cell.is-col-from-end-1-desktop { - --bulma-grid-cell-column-start: -1; - } - .cell.is-col-span-1-desktop { - --bulma-grid-cell-column-span: 1; - } - .cell.is-row-start-1-desktop { - --bulma-grid-cell-row-start: 1; - } - .cell.is-row-end-1-desktop { - --bulma-grid-cell-row-end: 1; - } - .cell.is-row-from-end-1-desktop { - --bulma-grid-cell-row-start: -1; - } - .cell.is-row-span-1-desktop { - --bulma-grid-cell-row-span: 1; - } - .cell.is-col-start-2-desktop { - --bulma-grid-cell-column-start: 2; - } - .cell.is-col-end-2-desktop { - --bulma-grid-cell-column-end: 2; - } - .cell.is-col-from-end-2-desktop { - --bulma-grid-cell-column-start: -2; - } - .cell.is-col-span-2-desktop { - --bulma-grid-cell-column-span: 2; - } - .cell.is-row-start-2-desktop { - --bulma-grid-cell-row-start: 2; - } - .cell.is-row-end-2-desktop { - --bulma-grid-cell-row-end: 2; - } - .cell.is-row-from-end-2-desktop { - --bulma-grid-cell-row-start: -2; - } - .cell.is-row-span-2-desktop { - --bulma-grid-cell-row-span: 2; - } - .cell.is-col-start-3-desktop { - --bulma-grid-cell-column-start: 3; - } - .cell.is-col-end-3-desktop { - --bulma-grid-cell-column-end: 3; - } - .cell.is-col-from-end-3-desktop { - --bulma-grid-cell-column-start: -3; - } - .cell.is-col-span-3-desktop { - --bulma-grid-cell-column-span: 3; - } - .cell.is-row-start-3-desktop { - --bulma-grid-cell-row-start: 3; - } - .cell.is-row-end-3-desktop { - --bulma-grid-cell-row-end: 3; - } - .cell.is-row-from-end-3-desktop { - --bulma-grid-cell-row-start: -3; - } - .cell.is-row-span-3-desktop { - --bulma-grid-cell-row-span: 3; - } - .cell.is-col-start-4-desktop { - --bulma-grid-cell-column-start: 4; - } - .cell.is-col-end-4-desktop { - --bulma-grid-cell-column-end: 4; - } - .cell.is-col-from-end-4-desktop { - --bulma-grid-cell-column-start: -4; - } - .cell.is-col-span-4-desktop { - --bulma-grid-cell-column-span: 4; - } - .cell.is-row-start-4-desktop { - --bulma-grid-cell-row-start: 4; - } - .cell.is-row-end-4-desktop { - --bulma-grid-cell-row-end: 4; - } - .cell.is-row-from-end-4-desktop { - --bulma-grid-cell-row-start: -4; - } - .cell.is-row-span-4-desktop { - --bulma-grid-cell-row-span: 4; - } - .cell.is-col-start-5-desktop { - --bulma-grid-cell-column-start: 5; - } - .cell.is-col-end-5-desktop { - --bulma-grid-cell-column-end: 5; - } - .cell.is-col-from-end-5-desktop { - --bulma-grid-cell-column-start: -5; - } - .cell.is-col-span-5-desktop { - --bulma-grid-cell-column-span: 5; - } - .cell.is-row-start-5-desktop { - --bulma-grid-cell-row-start: 5; - } - .cell.is-row-end-5-desktop { - --bulma-grid-cell-row-end: 5; - } - .cell.is-row-from-end-5-desktop { - --bulma-grid-cell-row-start: -5; - } - .cell.is-row-span-5-desktop { - --bulma-grid-cell-row-span: 5; - } - .cell.is-col-start-6-desktop { - --bulma-grid-cell-column-start: 6; - } - .cell.is-col-end-6-desktop { - --bulma-grid-cell-column-end: 6; - } - .cell.is-col-from-end-6-desktop { - --bulma-grid-cell-column-start: -6; - } - .cell.is-col-span-6-desktop { - --bulma-grid-cell-column-span: 6; - } - .cell.is-row-start-6-desktop { - --bulma-grid-cell-row-start: 6; - } - .cell.is-row-end-6-desktop { - --bulma-grid-cell-row-end: 6; - } - .cell.is-row-from-end-6-desktop { - --bulma-grid-cell-row-start: -6; - } - .cell.is-row-span-6-desktop { - --bulma-grid-cell-row-span: 6; - } - .cell.is-col-start-7-desktop { - --bulma-grid-cell-column-start: 7; - } - .cell.is-col-end-7-desktop { - --bulma-grid-cell-column-end: 7; - } - .cell.is-col-from-end-7-desktop { - --bulma-grid-cell-column-start: -7; - } - .cell.is-col-span-7-desktop { - --bulma-grid-cell-column-span: 7; - } - .cell.is-row-start-7-desktop { - --bulma-grid-cell-row-start: 7; - } - .cell.is-row-end-7-desktop { - --bulma-grid-cell-row-end: 7; - } - .cell.is-row-from-end-7-desktop { - --bulma-grid-cell-row-start: -7; - } - .cell.is-row-span-7-desktop { - --bulma-grid-cell-row-span: 7; - } - .cell.is-col-start-8-desktop { - --bulma-grid-cell-column-start: 8; - } - .cell.is-col-end-8-desktop { - --bulma-grid-cell-column-end: 8; - } - .cell.is-col-from-end-8-desktop { - --bulma-grid-cell-column-start: -8; - } - .cell.is-col-span-8-desktop { - --bulma-grid-cell-column-span: 8; - } - .cell.is-row-start-8-desktop { - --bulma-grid-cell-row-start: 8; - } - .cell.is-row-end-8-desktop { - --bulma-grid-cell-row-end: 8; - } - .cell.is-row-from-end-8-desktop { - --bulma-grid-cell-row-start: -8; - } - .cell.is-row-span-8-desktop { - --bulma-grid-cell-row-span: 8; - } - .cell.is-col-start-9-desktop { - --bulma-grid-cell-column-start: 9; - } - .cell.is-col-end-9-desktop { - --bulma-grid-cell-column-end: 9; - } - .cell.is-col-from-end-9-desktop { - --bulma-grid-cell-column-start: -9; - } - .cell.is-col-span-9-desktop { - --bulma-grid-cell-column-span: 9; - } - .cell.is-row-start-9-desktop { - --bulma-grid-cell-row-start: 9; - } - .cell.is-row-end-9-desktop { - --bulma-grid-cell-row-end: 9; - } - .cell.is-row-from-end-9-desktop { - --bulma-grid-cell-row-start: -9; - } - .cell.is-row-span-9-desktop { - --bulma-grid-cell-row-span: 9; - } - .cell.is-col-start-10-desktop { - --bulma-grid-cell-column-start: 10; - } - .cell.is-col-end-10-desktop { - --bulma-grid-cell-column-end: 10; - } - .cell.is-col-from-end-10-desktop { - --bulma-grid-cell-column-start: -10; - } - .cell.is-col-span-10-desktop { - --bulma-grid-cell-column-span: 10; - } - .cell.is-row-start-10-desktop { - --bulma-grid-cell-row-start: 10; - } - .cell.is-row-end-10-desktop { - --bulma-grid-cell-row-end: 10; - } - .cell.is-row-from-end-10-desktop { - --bulma-grid-cell-row-start: -10; - } - .cell.is-row-span-10-desktop { - --bulma-grid-cell-row-span: 10; - } - .cell.is-col-start-11-desktop { - --bulma-grid-cell-column-start: 11; - } - .cell.is-col-end-11-desktop { - --bulma-grid-cell-column-end: 11; - } - .cell.is-col-from-end-11-desktop { - --bulma-grid-cell-column-start: -11; - } - .cell.is-col-span-11-desktop { - --bulma-grid-cell-column-span: 11; - } - .cell.is-row-start-11-desktop { - --bulma-grid-cell-row-start: 11; - } - .cell.is-row-end-11-desktop { - --bulma-grid-cell-row-end: 11; - } - .cell.is-row-from-end-11-desktop { - --bulma-grid-cell-row-start: -11; - } - .cell.is-row-span-11-desktop { - --bulma-grid-cell-row-span: 11; - } - .cell.is-col-start-12-desktop { - --bulma-grid-cell-column-start: 12; - } - .cell.is-col-end-12-desktop { - --bulma-grid-cell-column-end: 12; - } - .cell.is-col-from-end-12-desktop { - --bulma-grid-cell-column-start: -12; - } - .cell.is-col-span-12-desktop { - --bulma-grid-cell-column-span: 12; - } - .cell.is-row-start-12-desktop { - --bulma-grid-cell-row-start: 12; - } - .cell.is-row-end-12-desktop { - --bulma-grid-cell-row-end: 12; - } - .cell.is-row-from-end-12-desktop { - --bulma-grid-cell-row-start: -12; - } - .cell.is-row-span-12-desktop { - --bulma-grid-cell-row-span: 12; - } -} -@media screen and (min-width: 1024px) and (max-width: 1215px) { - .cell.is-col-start-1-desktop-only { - --bulma-grid-cell-column-start: 1; - } - .cell.is-col-end-1-desktop-only { - --bulma-grid-cell-column-end: 1; - } - .cell.is-col-from-end-1-desktop-only { - --bulma-grid-cell-column-start: -1; - } - .cell.is-col-span-1-desktop-only { - --bulma-grid-cell-column-span: 1; - } - .cell.is-row-start-1-desktop-only { - --bulma-grid-cell-row-start: 1; - } - .cell.is-row-end-1-desktop-only { - --bulma-grid-cell-row-end: 1; - } - .cell.is-row-from-end-1-desktop-only { - --bulma-grid-cell-row-start: -1; - } - .cell.is-row-span-1-desktop-only { - --bulma-grid-cell-row-span: 1; - } - .cell.is-col-start-2-desktop-only { - --bulma-grid-cell-column-start: 2; - } - .cell.is-col-end-2-desktop-only { - --bulma-grid-cell-column-end: 2; - } - .cell.is-col-from-end-2-desktop-only { - --bulma-grid-cell-column-start: -2; - } - .cell.is-col-span-2-desktop-only { - --bulma-grid-cell-column-span: 2; - } - .cell.is-row-start-2-desktop-only { - --bulma-grid-cell-row-start: 2; - } - .cell.is-row-end-2-desktop-only { - --bulma-grid-cell-row-end: 2; - } - .cell.is-row-from-end-2-desktop-only { - --bulma-grid-cell-row-start: -2; - } - .cell.is-row-span-2-desktop-only { - --bulma-grid-cell-row-span: 2; - } - .cell.is-col-start-3-desktop-only { - --bulma-grid-cell-column-start: 3; - } - .cell.is-col-end-3-desktop-only { - --bulma-grid-cell-column-end: 3; - } - .cell.is-col-from-end-3-desktop-only { - --bulma-grid-cell-column-start: -3; - } - .cell.is-col-span-3-desktop-only { - --bulma-grid-cell-column-span: 3; - } - .cell.is-row-start-3-desktop-only { - --bulma-grid-cell-row-start: 3; - } - .cell.is-row-end-3-desktop-only { - --bulma-grid-cell-row-end: 3; - } - .cell.is-row-from-end-3-desktop-only { - --bulma-grid-cell-row-start: -3; - } - .cell.is-row-span-3-desktop-only { - --bulma-grid-cell-row-span: 3; - } - .cell.is-col-start-4-desktop-only { - --bulma-grid-cell-column-start: 4; - } - .cell.is-col-end-4-desktop-only { - --bulma-grid-cell-column-end: 4; - } - .cell.is-col-from-end-4-desktop-only { - --bulma-grid-cell-column-start: -4; - } - .cell.is-col-span-4-desktop-only { - --bulma-grid-cell-column-span: 4; - } - .cell.is-row-start-4-desktop-only { - --bulma-grid-cell-row-start: 4; - } - .cell.is-row-end-4-desktop-only { - --bulma-grid-cell-row-end: 4; - } - .cell.is-row-from-end-4-desktop-only { - --bulma-grid-cell-row-start: -4; - } - .cell.is-row-span-4-desktop-only { - --bulma-grid-cell-row-span: 4; - } - .cell.is-col-start-5-desktop-only { - --bulma-grid-cell-column-start: 5; - } - .cell.is-col-end-5-desktop-only { - --bulma-grid-cell-column-end: 5; - } - .cell.is-col-from-end-5-desktop-only { - --bulma-grid-cell-column-start: -5; - } - .cell.is-col-span-5-desktop-only { - --bulma-grid-cell-column-span: 5; - } - .cell.is-row-start-5-desktop-only { - --bulma-grid-cell-row-start: 5; - } - .cell.is-row-end-5-desktop-only { - --bulma-grid-cell-row-end: 5; - } - .cell.is-row-from-end-5-desktop-only { - --bulma-grid-cell-row-start: -5; - } - .cell.is-row-span-5-desktop-only { - --bulma-grid-cell-row-span: 5; - } - .cell.is-col-start-6-desktop-only { - --bulma-grid-cell-column-start: 6; - } - .cell.is-col-end-6-desktop-only { - --bulma-grid-cell-column-end: 6; - } - .cell.is-col-from-end-6-desktop-only { - --bulma-grid-cell-column-start: -6; - } - .cell.is-col-span-6-desktop-only { - --bulma-grid-cell-column-span: 6; - } - .cell.is-row-start-6-desktop-only { - --bulma-grid-cell-row-start: 6; - } - .cell.is-row-end-6-desktop-only { - --bulma-grid-cell-row-end: 6; - } - .cell.is-row-from-end-6-desktop-only { - --bulma-grid-cell-row-start: -6; - } - .cell.is-row-span-6-desktop-only { - --bulma-grid-cell-row-span: 6; - } - .cell.is-col-start-7-desktop-only { - --bulma-grid-cell-column-start: 7; - } - .cell.is-col-end-7-desktop-only { - --bulma-grid-cell-column-end: 7; - } - .cell.is-col-from-end-7-desktop-only { - --bulma-grid-cell-column-start: -7; - } - .cell.is-col-span-7-desktop-only { - --bulma-grid-cell-column-span: 7; - } - .cell.is-row-start-7-desktop-only { - --bulma-grid-cell-row-start: 7; - } - .cell.is-row-end-7-desktop-only { - --bulma-grid-cell-row-end: 7; - } - .cell.is-row-from-end-7-desktop-only { - --bulma-grid-cell-row-start: -7; - } - .cell.is-row-span-7-desktop-only { - --bulma-grid-cell-row-span: 7; - } - .cell.is-col-start-8-desktop-only { - --bulma-grid-cell-column-start: 8; - } - .cell.is-col-end-8-desktop-only { - --bulma-grid-cell-column-end: 8; - } - .cell.is-col-from-end-8-desktop-only { - --bulma-grid-cell-column-start: -8; - } - .cell.is-col-span-8-desktop-only { - --bulma-grid-cell-column-span: 8; - } - .cell.is-row-start-8-desktop-only { - --bulma-grid-cell-row-start: 8; - } - .cell.is-row-end-8-desktop-only { - --bulma-grid-cell-row-end: 8; - } - .cell.is-row-from-end-8-desktop-only { - --bulma-grid-cell-row-start: -8; - } - .cell.is-row-span-8-desktop-only { - --bulma-grid-cell-row-span: 8; - } - .cell.is-col-start-9-desktop-only { - --bulma-grid-cell-column-start: 9; - } - .cell.is-col-end-9-desktop-only { - --bulma-grid-cell-column-end: 9; - } - .cell.is-col-from-end-9-desktop-only { - --bulma-grid-cell-column-start: -9; - } - .cell.is-col-span-9-desktop-only { - --bulma-grid-cell-column-span: 9; - } - .cell.is-row-start-9-desktop-only { - --bulma-grid-cell-row-start: 9; - } - .cell.is-row-end-9-desktop-only { - --bulma-grid-cell-row-end: 9; - } - .cell.is-row-from-end-9-desktop-only { - --bulma-grid-cell-row-start: -9; - } - .cell.is-row-span-9-desktop-only { - --bulma-grid-cell-row-span: 9; - } - .cell.is-col-start-10-desktop-only { - --bulma-grid-cell-column-start: 10; - } - .cell.is-col-end-10-desktop-only { - --bulma-grid-cell-column-end: 10; - } - .cell.is-col-from-end-10-desktop-only { - --bulma-grid-cell-column-start: -10; - } - .cell.is-col-span-10-desktop-only { - --bulma-grid-cell-column-span: 10; - } - .cell.is-row-start-10-desktop-only { - --bulma-grid-cell-row-start: 10; - } - .cell.is-row-end-10-desktop-only { - --bulma-grid-cell-row-end: 10; - } - .cell.is-row-from-end-10-desktop-only { - --bulma-grid-cell-row-start: -10; - } - .cell.is-row-span-10-desktop-only { - --bulma-grid-cell-row-span: 10; - } - .cell.is-col-start-11-desktop-only { - --bulma-grid-cell-column-start: 11; - } - .cell.is-col-end-11-desktop-only { - --bulma-grid-cell-column-end: 11; - } - .cell.is-col-from-end-11-desktop-only { - --bulma-grid-cell-column-start: -11; - } - .cell.is-col-span-11-desktop-only { - --bulma-grid-cell-column-span: 11; - } - .cell.is-row-start-11-desktop-only { - --bulma-grid-cell-row-start: 11; - } - .cell.is-row-end-11-desktop-only { - --bulma-grid-cell-row-end: 11; - } - .cell.is-row-from-end-11-desktop-only { - --bulma-grid-cell-row-start: -11; - } - .cell.is-row-span-11-desktop-only { - --bulma-grid-cell-row-span: 11; - } - .cell.is-col-start-12-desktop-only { - --bulma-grid-cell-column-start: 12; - } - .cell.is-col-end-12-desktop-only { - --bulma-grid-cell-column-end: 12; - } - .cell.is-col-from-end-12-desktop-only { - --bulma-grid-cell-column-start: -12; - } - .cell.is-col-span-12-desktop-only { - --bulma-grid-cell-column-span: 12; - } - .cell.is-row-start-12-desktop-only { - --bulma-grid-cell-row-start: 12; - } - .cell.is-row-end-12-desktop-only { - --bulma-grid-cell-row-end: 12; - } - .cell.is-row-from-end-12-desktop-only { - --bulma-grid-cell-row-start: -12; - } - .cell.is-row-span-12-desktop-only { - --bulma-grid-cell-row-span: 12; - } -} -@media screen and (min-width: 1216px) { - .cell.is-col-start-1-widescreen { - --bulma-grid-cell-column-start: 1; - } - .cell.is-col-end-1-widescreen { - --bulma-grid-cell-column-end: 1; - } - .cell.is-col-from-end-1-widescreen { - --bulma-grid-cell-column-start: -1; - } - .cell.is-col-span-1-widescreen { - --bulma-grid-cell-column-span: 1; - } - .cell.is-row-start-1-widescreen { - --bulma-grid-cell-row-start: 1; - } - .cell.is-row-end-1-widescreen { - --bulma-grid-cell-row-end: 1; - } - .cell.is-row-from-end-1-widescreen { - --bulma-grid-cell-row-start: -1; - } - .cell.is-row-span-1-widescreen { - --bulma-grid-cell-row-span: 1; - } - .cell.is-col-start-2-widescreen { - --bulma-grid-cell-column-start: 2; - } - .cell.is-col-end-2-widescreen { - --bulma-grid-cell-column-end: 2; - } - .cell.is-col-from-end-2-widescreen { - --bulma-grid-cell-column-start: -2; - } - .cell.is-col-span-2-widescreen { - --bulma-grid-cell-column-span: 2; - } - .cell.is-row-start-2-widescreen { - --bulma-grid-cell-row-start: 2; - } - .cell.is-row-end-2-widescreen { - --bulma-grid-cell-row-end: 2; - } - .cell.is-row-from-end-2-widescreen { - --bulma-grid-cell-row-start: -2; - } - .cell.is-row-span-2-widescreen { - --bulma-grid-cell-row-span: 2; - } - .cell.is-col-start-3-widescreen { - --bulma-grid-cell-column-start: 3; - } - .cell.is-col-end-3-widescreen { - --bulma-grid-cell-column-end: 3; - } - .cell.is-col-from-end-3-widescreen { - --bulma-grid-cell-column-start: -3; - } - .cell.is-col-span-3-widescreen { - --bulma-grid-cell-column-span: 3; - } - .cell.is-row-start-3-widescreen { - --bulma-grid-cell-row-start: 3; - } - .cell.is-row-end-3-widescreen { - --bulma-grid-cell-row-end: 3; - } - .cell.is-row-from-end-3-widescreen { - --bulma-grid-cell-row-start: -3; - } - .cell.is-row-span-3-widescreen { - --bulma-grid-cell-row-span: 3; - } - .cell.is-col-start-4-widescreen { - --bulma-grid-cell-column-start: 4; - } - .cell.is-col-end-4-widescreen { - --bulma-grid-cell-column-end: 4; - } - .cell.is-col-from-end-4-widescreen { - --bulma-grid-cell-column-start: -4; - } - .cell.is-col-span-4-widescreen { - --bulma-grid-cell-column-span: 4; - } - .cell.is-row-start-4-widescreen { - --bulma-grid-cell-row-start: 4; - } - .cell.is-row-end-4-widescreen { - --bulma-grid-cell-row-end: 4; - } - .cell.is-row-from-end-4-widescreen { - --bulma-grid-cell-row-start: -4; - } - .cell.is-row-span-4-widescreen { - --bulma-grid-cell-row-span: 4; - } - .cell.is-col-start-5-widescreen { - --bulma-grid-cell-column-start: 5; - } - .cell.is-col-end-5-widescreen { - --bulma-grid-cell-column-end: 5; - } - .cell.is-col-from-end-5-widescreen { - --bulma-grid-cell-column-start: -5; - } - .cell.is-col-span-5-widescreen { - --bulma-grid-cell-column-span: 5; - } - .cell.is-row-start-5-widescreen { - --bulma-grid-cell-row-start: 5; - } - .cell.is-row-end-5-widescreen { - --bulma-grid-cell-row-end: 5; - } - .cell.is-row-from-end-5-widescreen { - --bulma-grid-cell-row-start: -5; - } - .cell.is-row-span-5-widescreen { - --bulma-grid-cell-row-span: 5; - } - .cell.is-col-start-6-widescreen { - --bulma-grid-cell-column-start: 6; - } - .cell.is-col-end-6-widescreen { - --bulma-grid-cell-column-end: 6; - } - .cell.is-col-from-end-6-widescreen { - --bulma-grid-cell-column-start: -6; - } - .cell.is-col-span-6-widescreen { - --bulma-grid-cell-column-span: 6; - } - .cell.is-row-start-6-widescreen { - --bulma-grid-cell-row-start: 6; - } - .cell.is-row-end-6-widescreen { - --bulma-grid-cell-row-end: 6; - } - .cell.is-row-from-end-6-widescreen { - --bulma-grid-cell-row-start: -6; - } - .cell.is-row-span-6-widescreen { - --bulma-grid-cell-row-span: 6; - } - .cell.is-col-start-7-widescreen { - --bulma-grid-cell-column-start: 7; - } - .cell.is-col-end-7-widescreen { - --bulma-grid-cell-column-end: 7; - } - .cell.is-col-from-end-7-widescreen { - --bulma-grid-cell-column-start: -7; - } - .cell.is-col-span-7-widescreen { - --bulma-grid-cell-column-span: 7; - } - .cell.is-row-start-7-widescreen { - --bulma-grid-cell-row-start: 7; - } - .cell.is-row-end-7-widescreen { - --bulma-grid-cell-row-end: 7; - } - .cell.is-row-from-end-7-widescreen { - --bulma-grid-cell-row-start: -7; - } - .cell.is-row-span-7-widescreen { - --bulma-grid-cell-row-span: 7; - } - .cell.is-col-start-8-widescreen { - --bulma-grid-cell-column-start: 8; - } - .cell.is-col-end-8-widescreen { - --bulma-grid-cell-column-end: 8; - } - .cell.is-col-from-end-8-widescreen { - --bulma-grid-cell-column-start: -8; - } - .cell.is-col-span-8-widescreen { - --bulma-grid-cell-column-span: 8; - } - .cell.is-row-start-8-widescreen { - --bulma-grid-cell-row-start: 8; - } - .cell.is-row-end-8-widescreen { - --bulma-grid-cell-row-end: 8; - } - .cell.is-row-from-end-8-widescreen { - --bulma-grid-cell-row-start: -8; - } - .cell.is-row-span-8-widescreen { - --bulma-grid-cell-row-span: 8; - } - .cell.is-col-start-9-widescreen { - --bulma-grid-cell-column-start: 9; - } - .cell.is-col-end-9-widescreen { - --bulma-grid-cell-column-end: 9; - } - .cell.is-col-from-end-9-widescreen { - --bulma-grid-cell-column-start: -9; - } - .cell.is-col-span-9-widescreen { - --bulma-grid-cell-column-span: 9; - } - .cell.is-row-start-9-widescreen { - --bulma-grid-cell-row-start: 9; - } - .cell.is-row-end-9-widescreen { - --bulma-grid-cell-row-end: 9; - } - .cell.is-row-from-end-9-widescreen { - --bulma-grid-cell-row-start: -9; - } - .cell.is-row-span-9-widescreen { - --bulma-grid-cell-row-span: 9; - } - .cell.is-col-start-10-widescreen { - --bulma-grid-cell-column-start: 10; - } - .cell.is-col-end-10-widescreen { - --bulma-grid-cell-column-end: 10; - } - .cell.is-col-from-end-10-widescreen { - --bulma-grid-cell-column-start: -10; - } - .cell.is-col-span-10-widescreen { - --bulma-grid-cell-column-span: 10; - } - .cell.is-row-start-10-widescreen { - --bulma-grid-cell-row-start: 10; - } - .cell.is-row-end-10-widescreen { - --bulma-grid-cell-row-end: 10; - } - .cell.is-row-from-end-10-widescreen { - --bulma-grid-cell-row-start: -10; - } - .cell.is-row-span-10-widescreen { - --bulma-grid-cell-row-span: 10; - } - .cell.is-col-start-11-widescreen { - --bulma-grid-cell-column-start: 11; - } - .cell.is-col-end-11-widescreen { - --bulma-grid-cell-column-end: 11; - } - .cell.is-col-from-end-11-widescreen { - --bulma-grid-cell-column-start: -11; - } - .cell.is-col-span-11-widescreen { - --bulma-grid-cell-column-span: 11; - } - .cell.is-row-start-11-widescreen { - --bulma-grid-cell-row-start: 11; - } - .cell.is-row-end-11-widescreen { - --bulma-grid-cell-row-end: 11; - } - .cell.is-row-from-end-11-widescreen { - --bulma-grid-cell-row-start: -11; - } - .cell.is-row-span-11-widescreen { - --bulma-grid-cell-row-span: 11; - } - .cell.is-col-start-12-widescreen { - --bulma-grid-cell-column-start: 12; - } - .cell.is-col-end-12-widescreen { - --bulma-grid-cell-column-end: 12; - } - .cell.is-col-from-end-12-widescreen { - --bulma-grid-cell-column-start: -12; - } - .cell.is-col-span-12-widescreen { - --bulma-grid-cell-column-span: 12; - } - .cell.is-row-start-12-widescreen { - --bulma-grid-cell-row-start: 12; - } - .cell.is-row-end-12-widescreen { - --bulma-grid-cell-row-end: 12; - } - .cell.is-row-from-end-12-widescreen { - --bulma-grid-cell-row-start: -12; - } - .cell.is-row-span-12-widescreen { - --bulma-grid-cell-row-span: 12; - } -} -@media screen and (min-width: 1216px) and (max-width: 1407px) { - .cell.is-col-start-1-widescreen-only { - --bulma-grid-cell-column-start: 1; - } - .cell.is-col-end-1-widescreen-only { - --bulma-grid-cell-column-end: 1; - } - .cell.is-col-from-end-1-widescreen-only { - --bulma-grid-cell-column-start: -1; - } - .cell.is-col-span-1-widescreen-only { - --bulma-grid-cell-column-span: 1; - } - .cell.is-row-start-1-widescreen-only { - --bulma-grid-cell-row-start: 1; - } - .cell.is-row-end-1-widescreen-only { - --bulma-grid-cell-row-end: 1; - } - .cell.is-row-from-end-1-widescreen-only { - --bulma-grid-cell-row-start: -1; - } - .cell.is-row-span-1-widescreen-only { - --bulma-grid-cell-row-span: 1; - } - .cell.is-col-start-2-widescreen-only { - --bulma-grid-cell-column-start: 2; - } - .cell.is-col-end-2-widescreen-only { - --bulma-grid-cell-column-end: 2; - } - .cell.is-col-from-end-2-widescreen-only { - --bulma-grid-cell-column-start: -2; - } - .cell.is-col-span-2-widescreen-only { - --bulma-grid-cell-column-span: 2; - } - .cell.is-row-start-2-widescreen-only { - --bulma-grid-cell-row-start: 2; - } - .cell.is-row-end-2-widescreen-only { - --bulma-grid-cell-row-end: 2; - } - .cell.is-row-from-end-2-widescreen-only { - --bulma-grid-cell-row-start: -2; - } - .cell.is-row-span-2-widescreen-only { - --bulma-grid-cell-row-span: 2; - } - .cell.is-col-start-3-widescreen-only { - --bulma-grid-cell-column-start: 3; - } - .cell.is-col-end-3-widescreen-only { - --bulma-grid-cell-column-end: 3; - } - .cell.is-col-from-end-3-widescreen-only { - --bulma-grid-cell-column-start: -3; - } - .cell.is-col-span-3-widescreen-only { - --bulma-grid-cell-column-span: 3; - } - .cell.is-row-start-3-widescreen-only { - --bulma-grid-cell-row-start: 3; - } - .cell.is-row-end-3-widescreen-only { - --bulma-grid-cell-row-end: 3; - } - .cell.is-row-from-end-3-widescreen-only { - --bulma-grid-cell-row-start: -3; - } - .cell.is-row-span-3-widescreen-only { - --bulma-grid-cell-row-span: 3; - } - .cell.is-col-start-4-widescreen-only { - --bulma-grid-cell-column-start: 4; - } - .cell.is-col-end-4-widescreen-only { - --bulma-grid-cell-column-end: 4; - } - .cell.is-col-from-end-4-widescreen-only { - --bulma-grid-cell-column-start: -4; - } - .cell.is-col-span-4-widescreen-only { - --bulma-grid-cell-column-span: 4; - } - .cell.is-row-start-4-widescreen-only { - --bulma-grid-cell-row-start: 4; - } - .cell.is-row-end-4-widescreen-only { - --bulma-grid-cell-row-end: 4; - } - .cell.is-row-from-end-4-widescreen-only { - --bulma-grid-cell-row-start: -4; - } - .cell.is-row-span-4-widescreen-only { - --bulma-grid-cell-row-span: 4; - } - .cell.is-col-start-5-widescreen-only { - --bulma-grid-cell-column-start: 5; - } - .cell.is-col-end-5-widescreen-only { - --bulma-grid-cell-column-end: 5; - } - .cell.is-col-from-end-5-widescreen-only { - --bulma-grid-cell-column-start: -5; - } - .cell.is-col-span-5-widescreen-only { - --bulma-grid-cell-column-span: 5; - } - .cell.is-row-start-5-widescreen-only { - --bulma-grid-cell-row-start: 5; - } - .cell.is-row-end-5-widescreen-only { - --bulma-grid-cell-row-end: 5; - } - .cell.is-row-from-end-5-widescreen-only { - --bulma-grid-cell-row-start: -5; - } - .cell.is-row-span-5-widescreen-only { - --bulma-grid-cell-row-span: 5; - } - .cell.is-col-start-6-widescreen-only { - --bulma-grid-cell-column-start: 6; - } - .cell.is-col-end-6-widescreen-only { - --bulma-grid-cell-column-end: 6; - } - .cell.is-col-from-end-6-widescreen-only { - --bulma-grid-cell-column-start: -6; - } - .cell.is-col-span-6-widescreen-only { - --bulma-grid-cell-column-span: 6; - } - .cell.is-row-start-6-widescreen-only { - --bulma-grid-cell-row-start: 6; - } - .cell.is-row-end-6-widescreen-only { - --bulma-grid-cell-row-end: 6; - } - .cell.is-row-from-end-6-widescreen-only { - --bulma-grid-cell-row-start: -6; - } - .cell.is-row-span-6-widescreen-only { - --bulma-grid-cell-row-span: 6; - } - .cell.is-col-start-7-widescreen-only { - --bulma-grid-cell-column-start: 7; - } - .cell.is-col-end-7-widescreen-only { - --bulma-grid-cell-column-end: 7; - } - .cell.is-col-from-end-7-widescreen-only { - --bulma-grid-cell-column-start: -7; - } - .cell.is-col-span-7-widescreen-only { - --bulma-grid-cell-column-span: 7; - } - .cell.is-row-start-7-widescreen-only { - --bulma-grid-cell-row-start: 7; - } - .cell.is-row-end-7-widescreen-only { - --bulma-grid-cell-row-end: 7; - } - .cell.is-row-from-end-7-widescreen-only { - --bulma-grid-cell-row-start: -7; - } - .cell.is-row-span-7-widescreen-only { - --bulma-grid-cell-row-span: 7; - } - .cell.is-col-start-8-widescreen-only { - --bulma-grid-cell-column-start: 8; - } - .cell.is-col-end-8-widescreen-only { - --bulma-grid-cell-column-end: 8; - } - .cell.is-col-from-end-8-widescreen-only { - --bulma-grid-cell-column-start: -8; - } - .cell.is-col-span-8-widescreen-only { - --bulma-grid-cell-column-span: 8; - } - .cell.is-row-start-8-widescreen-only { - --bulma-grid-cell-row-start: 8; - } - .cell.is-row-end-8-widescreen-only { - --bulma-grid-cell-row-end: 8; - } - .cell.is-row-from-end-8-widescreen-only { - --bulma-grid-cell-row-start: -8; - } - .cell.is-row-span-8-widescreen-only { - --bulma-grid-cell-row-span: 8; - } - .cell.is-col-start-9-widescreen-only { - --bulma-grid-cell-column-start: 9; - } - .cell.is-col-end-9-widescreen-only { - --bulma-grid-cell-column-end: 9; - } - .cell.is-col-from-end-9-widescreen-only { - --bulma-grid-cell-column-start: -9; - } - .cell.is-col-span-9-widescreen-only { - --bulma-grid-cell-column-span: 9; - } - .cell.is-row-start-9-widescreen-only { - --bulma-grid-cell-row-start: 9; - } - .cell.is-row-end-9-widescreen-only { - --bulma-grid-cell-row-end: 9; - } - .cell.is-row-from-end-9-widescreen-only { - --bulma-grid-cell-row-start: -9; - } - .cell.is-row-span-9-widescreen-only { - --bulma-grid-cell-row-span: 9; - } - .cell.is-col-start-10-widescreen-only { - --bulma-grid-cell-column-start: 10; - } - .cell.is-col-end-10-widescreen-only { - --bulma-grid-cell-column-end: 10; - } - .cell.is-col-from-end-10-widescreen-only { - --bulma-grid-cell-column-start: -10; - } - .cell.is-col-span-10-widescreen-only { - --bulma-grid-cell-column-span: 10; - } - .cell.is-row-start-10-widescreen-only { - --bulma-grid-cell-row-start: 10; - } - .cell.is-row-end-10-widescreen-only { - --bulma-grid-cell-row-end: 10; - } - .cell.is-row-from-end-10-widescreen-only { - --bulma-grid-cell-row-start: -10; - } - .cell.is-row-span-10-widescreen-only { - --bulma-grid-cell-row-span: 10; - } - .cell.is-col-start-11-widescreen-only { - --bulma-grid-cell-column-start: 11; - } - .cell.is-col-end-11-widescreen-only { - --bulma-grid-cell-column-end: 11; - } - .cell.is-col-from-end-11-widescreen-only { - --bulma-grid-cell-column-start: -11; - } - .cell.is-col-span-11-widescreen-only { - --bulma-grid-cell-column-span: 11; - } - .cell.is-row-start-11-widescreen-only { - --bulma-grid-cell-row-start: 11; - } - .cell.is-row-end-11-widescreen-only { - --bulma-grid-cell-row-end: 11; - } - .cell.is-row-from-end-11-widescreen-only { - --bulma-grid-cell-row-start: -11; - } - .cell.is-row-span-11-widescreen-only { - --bulma-grid-cell-row-span: 11; - } - .cell.is-col-start-12-widescreen-only { - --bulma-grid-cell-column-start: 12; - } - .cell.is-col-end-12-widescreen-only { - --bulma-grid-cell-column-end: 12; - } - .cell.is-col-from-end-12-widescreen-only { - --bulma-grid-cell-column-start: -12; - } - .cell.is-col-span-12-widescreen-only { - --bulma-grid-cell-column-span: 12; - } - .cell.is-row-start-12-widescreen-only { - --bulma-grid-cell-row-start: 12; - } - .cell.is-row-end-12-widescreen-only { - --bulma-grid-cell-row-end: 12; - } - .cell.is-row-from-end-12-widescreen-only { - --bulma-grid-cell-row-start: -12; - } - .cell.is-row-span-12-widescreen-only { - --bulma-grid-cell-row-span: 12; - } -} -@media screen and (min-width: 1408px) { - .cell.is-col-start-1-fullhd { - --bulma-grid-cell-column-start: 1; - } - .cell.is-col-end-1-fullhd { - --bulma-grid-cell-column-end: 1; - } - .cell.is-col-from-end-1-fullhd { - --bulma-grid-cell-column-start: -1; - } - .cell.is-col-span-1-fullhd { - --bulma-grid-cell-column-span: 1; - } - .cell.is-row-start-1-fullhd { - --bulma-grid-cell-row-start: 1; - } - .cell.is-row-end-1-fullhd { - --bulma-grid-cell-row-end: 1; - } - .cell.is-row-from-end-1-fullhd { - --bulma-grid-cell-row-start: -1; - } - .cell.is-row-span-1-fullhd { - --bulma-grid-cell-row-span: 1; - } - .cell.is-col-start-2-fullhd { - --bulma-grid-cell-column-start: 2; - } - .cell.is-col-end-2-fullhd { - --bulma-grid-cell-column-end: 2; - } - .cell.is-col-from-end-2-fullhd { - --bulma-grid-cell-column-start: -2; - } - .cell.is-col-span-2-fullhd { - --bulma-grid-cell-column-span: 2; - } - .cell.is-row-start-2-fullhd { - --bulma-grid-cell-row-start: 2; - } - .cell.is-row-end-2-fullhd { - --bulma-grid-cell-row-end: 2; - } - .cell.is-row-from-end-2-fullhd { - --bulma-grid-cell-row-start: -2; - } - .cell.is-row-span-2-fullhd { - --bulma-grid-cell-row-span: 2; - } - .cell.is-col-start-3-fullhd { - --bulma-grid-cell-column-start: 3; - } - .cell.is-col-end-3-fullhd { - --bulma-grid-cell-column-end: 3; - } - .cell.is-col-from-end-3-fullhd { - --bulma-grid-cell-column-start: -3; - } - .cell.is-col-span-3-fullhd { - --bulma-grid-cell-column-span: 3; - } - .cell.is-row-start-3-fullhd { - --bulma-grid-cell-row-start: 3; - } - .cell.is-row-end-3-fullhd { - --bulma-grid-cell-row-end: 3; - } - .cell.is-row-from-end-3-fullhd { - --bulma-grid-cell-row-start: -3; - } - .cell.is-row-span-3-fullhd { - --bulma-grid-cell-row-span: 3; - } - .cell.is-col-start-4-fullhd { - --bulma-grid-cell-column-start: 4; - } - .cell.is-col-end-4-fullhd { - --bulma-grid-cell-column-end: 4; - } - .cell.is-col-from-end-4-fullhd { - --bulma-grid-cell-column-start: -4; - } - .cell.is-col-span-4-fullhd { - --bulma-grid-cell-column-span: 4; - } - .cell.is-row-start-4-fullhd { - --bulma-grid-cell-row-start: 4; - } - .cell.is-row-end-4-fullhd { - --bulma-grid-cell-row-end: 4; - } - .cell.is-row-from-end-4-fullhd { - --bulma-grid-cell-row-start: -4; - } - .cell.is-row-span-4-fullhd { - --bulma-grid-cell-row-span: 4; - } - .cell.is-col-start-5-fullhd { - --bulma-grid-cell-column-start: 5; - } - .cell.is-col-end-5-fullhd { - --bulma-grid-cell-column-end: 5; - } - .cell.is-col-from-end-5-fullhd { - --bulma-grid-cell-column-start: -5; - } - .cell.is-col-span-5-fullhd { - --bulma-grid-cell-column-span: 5; - } - .cell.is-row-start-5-fullhd { - --bulma-grid-cell-row-start: 5; - } - .cell.is-row-end-5-fullhd { - --bulma-grid-cell-row-end: 5; - } - .cell.is-row-from-end-5-fullhd { - --bulma-grid-cell-row-start: -5; - } - .cell.is-row-span-5-fullhd { - --bulma-grid-cell-row-span: 5; - } - .cell.is-col-start-6-fullhd { - --bulma-grid-cell-column-start: 6; - } - .cell.is-col-end-6-fullhd { - --bulma-grid-cell-column-end: 6; - } - .cell.is-col-from-end-6-fullhd { - --bulma-grid-cell-column-start: -6; - } - .cell.is-col-span-6-fullhd { - --bulma-grid-cell-column-span: 6; - } - .cell.is-row-start-6-fullhd { - --bulma-grid-cell-row-start: 6; - } - .cell.is-row-end-6-fullhd { - --bulma-grid-cell-row-end: 6; - } - .cell.is-row-from-end-6-fullhd { - --bulma-grid-cell-row-start: -6; - } - .cell.is-row-span-6-fullhd { - --bulma-grid-cell-row-span: 6; - } - .cell.is-col-start-7-fullhd { - --bulma-grid-cell-column-start: 7; - } - .cell.is-col-end-7-fullhd { - --bulma-grid-cell-column-end: 7; - } - .cell.is-col-from-end-7-fullhd { - --bulma-grid-cell-column-start: -7; - } - .cell.is-col-span-7-fullhd { - --bulma-grid-cell-column-span: 7; - } - .cell.is-row-start-7-fullhd { - --bulma-grid-cell-row-start: 7; - } - .cell.is-row-end-7-fullhd { - --bulma-grid-cell-row-end: 7; - } - .cell.is-row-from-end-7-fullhd { - --bulma-grid-cell-row-start: -7; - } - .cell.is-row-span-7-fullhd { - --bulma-grid-cell-row-span: 7; - } - .cell.is-col-start-8-fullhd { - --bulma-grid-cell-column-start: 8; - } - .cell.is-col-end-8-fullhd { - --bulma-grid-cell-column-end: 8; - } - .cell.is-col-from-end-8-fullhd { - --bulma-grid-cell-column-start: -8; - } - .cell.is-col-span-8-fullhd { - --bulma-grid-cell-column-span: 8; - } - .cell.is-row-start-8-fullhd { - --bulma-grid-cell-row-start: 8; - } - .cell.is-row-end-8-fullhd { - --bulma-grid-cell-row-end: 8; - } - .cell.is-row-from-end-8-fullhd { - --bulma-grid-cell-row-start: -8; - } - .cell.is-row-span-8-fullhd { - --bulma-grid-cell-row-span: 8; - } - .cell.is-col-start-9-fullhd { - --bulma-grid-cell-column-start: 9; - } - .cell.is-col-end-9-fullhd { - --bulma-grid-cell-column-end: 9; - } - .cell.is-col-from-end-9-fullhd { - --bulma-grid-cell-column-start: -9; - } - .cell.is-col-span-9-fullhd { - --bulma-grid-cell-column-span: 9; - } - .cell.is-row-start-9-fullhd { - --bulma-grid-cell-row-start: 9; - } - .cell.is-row-end-9-fullhd { - --bulma-grid-cell-row-end: 9; - } - .cell.is-row-from-end-9-fullhd { - --bulma-grid-cell-row-start: -9; - } - .cell.is-row-span-9-fullhd { - --bulma-grid-cell-row-span: 9; - } - .cell.is-col-start-10-fullhd { - --bulma-grid-cell-column-start: 10; - } - .cell.is-col-end-10-fullhd { - --bulma-grid-cell-column-end: 10; - } - .cell.is-col-from-end-10-fullhd { - --bulma-grid-cell-column-start: -10; - } - .cell.is-col-span-10-fullhd { - --bulma-grid-cell-column-span: 10; - } - .cell.is-row-start-10-fullhd { - --bulma-grid-cell-row-start: 10; - } - .cell.is-row-end-10-fullhd { - --bulma-grid-cell-row-end: 10; - } - .cell.is-row-from-end-10-fullhd { - --bulma-grid-cell-row-start: -10; - } - .cell.is-row-span-10-fullhd { - --bulma-grid-cell-row-span: 10; - } - .cell.is-col-start-11-fullhd { - --bulma-grid-cell-column-start: 11; - } - .cell.is-col-end-11-fullhd { - --bulma-grid-cell-column-end: 11; - } - .cell.is-col-from-end-11-fullhd { - --bulma-grid-cell-column-start: -11; - } - .cell.is-col-span-11-fullhd { - --bulma-grid-cell-column-span: 11; - } - .cell.is-row-start-11-fullhd { - --bulma-grid-cell-row-start: 11; - } - .cell.is-row-end-11-fullhd { - --bulma-grid-cell-row-end: 11; - } - .cell.is-row-from-end-11-fullhd { - --bulma-grid-cell-row-start: -11; - } - .cell.is-row-span-11-fullhd { - --bulma-grid-cell-row-span: 11; - } - .cell.is-col-start-12-fullhd { - --bulma-grid-cell-column-start: 12; - } - .cell.is-col-end-12-fullhd { - --bulma-grid-cell-column-end: 12; - } - .cell.is-col-from-end-12-fullhd { - --bulma-grid-cell-column-start: -12; - } - .cell.is-col-span-12-fullhd { - --bulma-grid-cell-column-span: 12; - } - .cell.is-row-start-12-fullhd { - --bulma-grid-cell-row-start: 12; - } - .cell.is-row-end-12-fullhd { - --bulma-grid-cell-row-end: 12; - } - .cell.is-row-from-end-12-fullhd { - --bulma-grid-cell-row-start: -12; - } - .cell.is-row-span-12-fullhd { - --bulma-grid-cell-row-span: 12; - } -} - -.marginless { - margin: 0 !important; -} - -.paddingless { - padding: 0 !important; -} - -.m-0 { - margin: 0 !important; -} - -.mt-0 { - margin-top: 0 !important; -} - -.mr-0 { - margin-right: 0 !important; -} - -.mb-0 { - margin-bottom: 0 !important; -} - -.ml-0 { - margin-left: 0 !important; -} - -.mx-0 { - margin-left: 0 !important; - margin-right: 0 !important; -} - -.my-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; -} - -.m-1 { - margin: 0.25rem !important; -} - -.mt-1 { - margin-top: 0.25rem !important; -} - -.mr-1 { - margin-right: 0.25rem !important; -} - -.mb-1 { - margin-bottom: 0.25rem !important; -} - -.ml-1 { - margin-left: 0.25rem !important; -} - -.mx-1 { - margin-left: 0.25rem !important; - margin-right: 0.25rem !important; -} - -.my-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; -} - -.m-2 { - margin: 0.5rem !important; -} - -.mt-2 { - margin-top: 0.5rem !important; -} - -.mr-2 { - margin-right: 0.5rem !important; -} - -.mb-2 { - margin-bottom: 0.5rem !important; -} - -.ml-2 { - margin-left: 0.5rem !important; -} - -.mx-2 { - margin-left: 0.5rem !important; - margin-right: 0.5rem !important; -} - -.my-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; -} - -.m-3 { - margin: 0.75rem !important; -} - -.mt-3 { - margin-top: 0.75rem !important; -} - -.mr-3 { - margin-right: 0.75rem !important; -} - -.mb-3 { - margin-bottom: 0.75rem !important; -} - -.ml-3 { - margin-left: 0.75rem !important; -} - -.mx-3 { - margin-left: 0.75rem !important; - margin-right: 0.75rem !important; -} - -.my-3 { - margin-top: 0.75rem !important; - margin-bottom: 0.75rem !important; -} - -.m-4 { - margin: 1rem !important; -} - -.mt-4 { - margin-top: 1rem !important; -} - -.mr-4 { - margin-right: 1rem !important; -} - -.mb-4 { - margin-bottom: 1rem !important; -} - -.ml-4 { - margin-left: 1rem !important; -} - -.mx-4 { - margin-left: 1rem !important; - margin-right: 1rem !important; -} - -.my-4 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; -} - -.m-5 { - margin: 1.5rem !important; -} - -.mt-5 { - margin-top: 1.5rem !important; -} - -.mr-5 { - margin-right: 1.5rem !important; -} - -.mb-5 { - margin-bottom: 1.5rem !important; -} - -.ml-5 { - margin-left: 1.5rem !important; -} - -.mx-5 { - margin-left: 1.5rem !important; - margin-right: 1.5rem !important; -} - -.my-5 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; -} - -.m-6 { - margin: 3rem !important; -} - -.mt-6 { - margin-top: 3rem !important; -} - -.mr-6 { - margin-right: 3rem !important; -} - -.mb-6 { - margin-bottom: 3rem !important; -} - -.ml-6 { - margin-left: 3rem !important; -} - -.mx-6 { - margin-left: 3rem !important; - margin-right: 3rem !important; -} - -.my-6 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; -} - -.m-auto { - margin: auto !important; -} - -.mt-auto { - margin-top: auto !important; -} - -.mr-auto { - margin-right: auto !important; -} - -.mb-auto { - margin-bottom: auto !important; -} - -.ml-auto { - margin-left: auto !important; -} - -.mx-auto { - margin-left: auto !important; - margin-right: auto !important; -} - -.my-auto { - margin-top: auto !important; - margin-bottom: auto !important; -} - -.p-0 { - padding: 0 !important; -} - -.pt-0 { - padding-top: 0 !important; -} - -.pr-0 { - padding-right: 0 !important; -} - -.pb-0 { - padding-bottom: 0 !important; -} - -.pl-0 { - padding-left: 0 !important; -} - -.px-0 { - padding-left: 0 !important; - padding-right: 0 !important; -} - -.py-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; -} - -.p-1 { - padding: 0.25rem !important; -} - -.pt-1 { - padding-top: 0.25rem !important; -} - -.pr-1 { - padding-right: 0.25rem !important; -} - -.pb-1 { - padding-bottom: 0.25rem !important; -} - -.pl-1 { - padding-left: 0.25rem !important; -} - -.px-1 { - padding-left: 0.25rem !important; - padding-right: 0.25rem !important; -} - -.py-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; -} - -.p-2 { - padding: 0.5rem !important; -} - -.pt-2 { - padding-top: 0.5rem !important; -} - -.pr-2 { - padding-right: 0.5rem !important; -} - -.pb-2 { - padding-bottom: 0.5rem !important; -} - -.pl-2 { - padding-left: 0.5rem !important; -} - -.px-2 { - padding-left: 0.5rem !important; - padding-right: 0.5rem !important; -} - -.py-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; -} - -.p-3 { - padding: 0.75rem !important; -} - -.pt-3 { - padding-top: 0.75rem !important; -} - -.pr-3 { - padding-right: 0.75rem !important; -} - -.pb-3 { - padding-bottom: 0.75rem !important; -} - -.pl-3 { - padding-left: 0.75rem !important; -} - -.px-3 { - padding-left: 0.75rem !important; - padding-right: 0.75rem !important; -} - -.py-3 { - padding-top: 0.75rem !important; - padding-bottom: 0.75rem !important; -} - -.p-4 { - padding: 1rem !important; -} - -.pt-4 { - padding-top: 1rem !important; -} - -.pr-4 { - padding-right: 1rem !important; -} - -.pb-4 { - padding-bottom: 1rem !important; -} - -.pl-4 { - padding-left: 1rem !important; -} - -.px-4 { - padding-left: 1rem !important; - padding-right: 1rem !important; -} - -.py-4 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; -} - -.p-5 { - padding: 1.5rem !important; -} - -.pt-5 { - padding-top: 1.5rem !important; -} - -.pr-5 { - padding-right: 1.5rem !important; -} - -.pb-5 { - padding-bottom: 1.5rem !important; -} - -.pl-5 { - padding-left: 1.5rem !important; -} - -.px-5 { - padding-left: 1.5rem !important; - padding-right: 1.5rem !important; -} - -.py-5 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; -} - -.p-6 { - padding: 3rem !important; -} - -.pt-6 { - padding-top: 3rem !important; -} - -.pr-6 { - padding-right: 3rem !important; -} - -.pb-6 { - padding-bottom: 3rem !important; -} - -.pl-6 { - padding-left: 3rem !important; -} - -.px-6 { - padding-left: 3rem !important; - padding-right: 3rem !important; -} - -.py-6 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; -} - -.p-auto { - padding: auto !important; -} - -.pt-auto { - padding-top: auto !important; -} - -.pr-auto { - padding-right: auto !important; -} - -.pb-auto { - padding-bottom: auto !important; -} - -.pl-auto { - padding-left: auto !important; -} - -.px-auto { - padding-left: auto !important; - padding-right: auto !important; -} - -.py-auto { - padding-top: auto !important; - padding-bottom: auto !important; -} - -.is-flex-direction-row { - flex-direction: row !important; -} - -.is-flex-direction-row-reverse { - flex-direction: row-reverse !important; -} - -.is-flex-direction-column { - flex-direction: column !important; -} - -.is-flex-direction-column-reverse { - flex-direction: column-reverse !important; -} - -.is-flex-wrap-nowrap { - flex-wrap: nowrap !important; -} - -.is-flex-wrap-wrap { - flex-wrap: wrap !important; -} - -.is-flex-wrap-wrap-reverse { - flex-wrap: wrap-reverse !important; -} - -.is-justify-content-flex-start { - justify-content: flex-start !important; -} - -.is-justify-content-flex-end { - justify-content: flex-end !important; -} - -.is-justify-content-center { - justify-content: center !important; -} - -.is-justify-content-space-between { - justify-content: space-between !important; -} - -.is-justify-content-space-around { - justify-content: space-around !important; -} - -.is-justify-content-space-evenly { - justify-content: space-evenly !important; -} - -.is-justify-content-start { - justify-content: start !important; -} - -.is-justify-content-end { - justify-content: end !important; -} - -.is-justify-content-left { - justify-content: left !important; -} - -.is-justify-content-right { - justify-content: right !important; -} - -.is-align-content-flex-start { - align-content: flex-start !important; -} - -.is-align-content-flex-end { - align-content: flex-end !important; -} - -.is-align-content-center { - align-content: center !important; -} - -.is-align-content-space-between { - align-content: space-between !important; -} - -.is-align-content-space-around { - align-content: space-around !important; -} - -.is-align-content-space-evenly { - align-content: space-evenly !important; -} - -.is-align-content-stretch { - align-content: stretch !important; -} - -.is-align-content-start { - align-content: start !important; -} - -.is-align-content-end { - align-content: end !important; -} - -.is-align-content-baseline { - align-content: baseline !important; -} - -.is-align-items-stretch { - align-items: stretch !important; -} - -.is-align-items-flex-start { - align-items: flex-start !important; -} - -.is-align-items-flex-end { - align-items: flex-end !important; -} - -.is-align-items-center { - align-items: center !important; -} - -.is-align-items-baseline { - align-items: baseline !important; -} - -.is-align-items-start { - align-items: start !important; -} - -.is-align-items-end { - align-items: end !important; -} - -.is-align-items-self-start { - align-items: self-start !important; -} - -.is-align-items-self-end { - align-items: self-end !important; -} - -.is-align-self-auto { - align-self: auto !important; -} - -.is-align-self-flex-start { - align-self: flex-start !important; -} - -.is-align-self-flex-end { - align-self: flex-end !important; -} - -.is-align-self-center { - align-self: center !important; -} - -.is-align-self-baseline { - align-self: baseline !important; -} - -.is-align-self-stretch { - align-self: stretch !important; -} - -.is-flex-grow-0 { - flex-grow: 0 !important; -} - -.is-flex-grow-1 { - flex-grow: 1 !important; -} - -.is-flex-grow-2 { - flex-grow: 2 !important; -} - -.is-flex-grow-3 { - flex-grow: 3 !important; -} - -.is-flex-grow-4 { - flex-grow: 4 !important; -} - -.is-flex-grow-5 { - flex-grow: 5 !important; -} - -.is-flex-shrink-0 { - flex-shrink: 0 !important; -} - -.is-flex-shrink-1 { - flex-shrink: 1 !important; -} - -.is-flex-shrink-2 { - flex-shrink: 2 !important; -} - -.is-flex-shrink-3 { - flex-shrink: 3 !important; -} - -.is-flex-shrink-4 { - flex-shrink: 4 !important; -} - -.is-flex-shrink-5 { - flex-shrink: 5 !important; -} - -.has-background { - background-color: var(--bulma-background); -} - -.has-text-white { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-l)) !important; -} - -.has-background-white { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-l)) !important; -} - -.has-text-white-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-invert-l)) !important; -} - -.has-background-white-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-invert-l)) !important; -} - -.has-text-white-on-scheme { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-on-scheme-l)) !important; -} - -.has-background-white-on-scheme { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-on-scheme-l)) !important; -} - -.has-text-white-light { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-light-l)) !important; -} - -.has-background-white-light { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-light-l)) !important; -} - -.has-text-white-light-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-light-invert-l)) !important; -} - -.has-background-white-light-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-light-invert-l)) !important; -} - -.has-text-white-dark { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-dark-l)) !important; -} - -.has-background-white-dark { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-dark-l)) !important; -} - -.has-text-white-dark-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-dark-invert-l)) !important; -} - -.has-background-white-dark-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-dark-invert-l)) !important; -} - -.has-text-white-soft { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-soft-l)) !important; -} - -.has-background-white-soft { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-soft-l)) !important; -} - -.has-text-white-bold { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-bold-l)) !important; -} - -.has-background-white-bold { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-bold-l)) !important; -} - -.has-text-white-soft-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-soft-invert-l)) !important; -} - -.has-background-white-soft-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-soft-invert-l)) !important; -} - -.has-text-white-bold-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-bold-invert-l)) !important; -} - -.has-background-white-bold-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-bold-invert-l)) !important; -} - -.has-text-white-00 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-00-l)) !important; -} - -.has-background-white-00 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-00-l)) !important; -} - -.has-text-white-00-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-00-invert-l)) !important; -} - -.has-background-white-00-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-00-invert-l)) !important; -} - -.has-text-white-05 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-05-l)) !important; -} - -.has-background-white-05 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-05-l)) !important; -} - -.has-text-white-05-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-05-invert-l)) !important; -} - -.has-background-white-05-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-05-invert-l)) !important; -} - -.has-text-white-10 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-10-l)) !important; -} - -.has-background-white-10 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-10-l)) !important; -} - -.has-text-white-10-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-10-invert-l)) !important; -} - -.has-background-white-10-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-10-invert-l)) !important; -} - -.has-text-white-15 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-15-l)) !important; -} - -.has-background-white-15 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-15-l)) !important; -} - -.has-text-white-15-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-15-invert-l)) !important; -} - -.has-background-white-15-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-15-invert-l)) !important; -} - -.has-text-white-20 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-20-l)) !important; -} - -.has-background-white-20 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-20-l)) !important; -} - -.has-text-white-20-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-20-invert-l)) !important; -} - -.has-background-white-20-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-20-invert-l)) !important; -} - -.has-text-white-25 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-25-l)) !important; -} - -.has-background-white-25 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-25-l)) !important; -} - -.has-text-white-25-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-25-invert-l)) !important; -} - -.has-background-white-25-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-25-invert-l)) !important; -} - -.has-text-white-30 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-30-l)) !important; -} - -.has-background-white-30 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-30-l)) !important; -} - -.has-text-white-30-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-30-invert-l)) !important; -} - -.has-background-white-30-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-30-invert-l)) !important; -} - -.has-text-white-35 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-35-l)) !important; -} - -.has-background-white-35 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-35-l)) !important; -} - -.has-text-white-35-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-35-invert-l)) !important; -} - -.has-background-white-35-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-35-invert-l)) !important; -} - -.has-text-white-40 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-40-l)) !important; -} - -.has-background-white-40 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-40-l)) !important; -} - -.has-text-white-40-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-40-invert-l)) !important; -} - -.has-background-white-40-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-40-invert-l)) !important; -} - -.has-text-white-45 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-45-l)) !important; -} - -.has-background-white-45 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-45-l)) !important; -} - -.has-text-white-45-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-45-invert-l)) !important; -} - -.has-background-white-45-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-45-invert-l)) !important; -} - -.has-text-white-50 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-50-l)) !important; -} - -.has-background-white-50 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-50-l)) !important; -} - -.has-text-white-50-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-50-invert-l)) !important; -} - -.has-background-white-50-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-50-invert-l)) !important; -} - -.has-text-white-55 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-55-l)) !important; -} - -.has-background-white-55 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-55-l)) !important; -} - -.has-text-white-55-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-55-invert-l)) !important; -} - -.has-background-white-55-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-55-invert-l)) !important; -} - -.has-text-white-60 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-60-l)) !important; -} - -.has-background-white-60 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-60-l)) !important; -} - -.has-text-white-60-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-60-invert-l)) !important; -} - -.has-background-white-60-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-60-invert-l)) !important; -} - -.has-text-white-65 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-65-l)) !important; -} - -.has-background-white-65 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-65-l)) !important; -} - -.has-text-white-65-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-65-invert-l)) !important; -} - -.has-background-white-65-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-65-invert-l)) !important; -} - -.has-text-white-70 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-70-l)) !important; -} - -.has-background-white-70 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-70-l)) !important; -} - -.has-text-white-70-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-70-invert-l)) !important; -} - -.has-background-white-70-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-70-invert-l)) !important; -} - -.has-text-white-75 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-75-l)) !important; -} - -.has-background-white-75 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-75-l)) !important; -} - -.has-text-white-75-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-75-invert-l)) !important; -} - -.has-background-white-75-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-75-invert-l)) !important; -} - -.has-text-white-80 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-80-l)) !important; -} - -.has-background-white-80 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-80-l)) !important; -} - -.has-text-white-80-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-80-invert-l)) !important; -} - -.has-background-white-80-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-80-invert-l)) !important; -} - -.has-text-white-85 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-85-l)) !important; -} - -.has-background-white-85 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-85-l)) !important; -} - -.has-text-white-85-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-85-invert-l)) !important; -} - -.has-background-white-85-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-85-invert-l)) !important; -} - -.has-text-white-90 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-90-l)) !important; -} - -.has-background-white-90 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-90-l)) !important; -} - -.has-text-white-90-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-90-invert-l)) !important; -} - -.has-background-white-90-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-90-invert-l)) !important; -} - -.has-text-white-95 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-95-l)) !important; -} - -.has-background-white-95 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-95-l)) !important; -} - -.has-text-white-95-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-95-invert-l)) !important; -} - -.has-background-white-95-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-95-invert-l)) !important; -} - -.has-text-white-100 { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-100-l)) !important; -} - -.has-background-white-100 { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-100-l)) !important; -} - -.has-text-white-100-invert { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-100-invert-l)) !important; -} - -.has-background-white-100-invert { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-100-invert-l)) !important; -} - -a.has-text-white:hover, a.has-text-white:focus-visible, -button.has-text-white:hover, -button.has-text-white:focus-visible, -has-text-white.is-hoverable:hover, -has-text-white.is-hoverable:focus-visible { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), calc(var(--bulma-white-l) + var(--bulma-hover-color-l-delta))) !important; -} -a.has-text-white:active, -button.has-text-white:active, -has-text-white.is-hoverable:active { - color: hsl(var(--bulma-white-h), var(--bulma-white-s), calc(var(--bulma-white-l) + var(--bulma-active-color-l-delta))) !important; -} - -a.has-background-white:hover, a.has-background-white:focus-visible, -button.has-background-white:hover, -button.has-background-white:focus-visible, -has-background-white.is-hoverable:hover, -has-background-white.is-hoverable:focus-visible { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), calc(var(--bulma-white-l) + var(--bulma-hover-background-l-delta))) !important; -} -a.has-background-white:active, -button.has-background-white:active, -has-background-white.is-hoverable:active { - background-color: hsl(var(--bulma-white-h), var(--bulma-white-s), calc(var(--bulma-white-l) + var(--bulma-active-background-l-delta))) !important; -} - -.is-palette-white { - --h: var(--bulma-white-h); - --s: var(--bulma-white-s); - --l: var(--bulma-white-l); - --color: hsl(var(--h), var(--s), var(--l)); - --00-l: var(--bulma-white-00-l); - --color-00: hsl(var(--h), var(--s), var(--00-l)); - --05-l: var(--bulma-white-05-l); - --color-05: hsl(var(--h), var(--s), var(--05-l)); - --10-l: var(--bulma-white-10-l); - --color-10: hsl(var(--h), var(--s), var(--10-l)); - --15-l: var(--bulma-white-15-l); - --color-15: hsl(var(--h), var(--s), var(--15-l)); - --20-l: var(--bulma-white-20-l); - --color-20: hsl(var(--h), var(--s), var(--20-l)); - --25-l: var(--bulma-white-25-l); - --color-25: hsl(var(--h), var(--s), var(--25-l)); - --30-l: var(--bulma-white-30-l); - --color-30: hsl(var(--h), var(--s), var(--30-l)); - --35-l: var(--bulma-white-35-l); - --color-35: hsl(var(--h), var(--s), var(--35-l)); - --40-l: var(--bulma-white-40-l); - --color-40: hsl(var(--h), var(--s), var(--40-l)); - --45-l: var(--bulma-white-45-l); - --color-45: hsl(var(--h), var(--s), var(--45-l)); - --50-l: var(--bulma-white-50-l); - --color-50: hsl(var(--h), var(--s), var(--50-l)); - --55-l: var(--bulma-white-55-l); - --color-55: hsl(var(--h), var(--s), var(--55-l)); - --60-l: var(--bulma-white-60-l); - --color-60: hsl(var(--h), var(--s), var(--60-l)); - --65-l: var(--bulma-white-65-l); - --color-65: hsl(var(--h), var(--s), var(--65-l)); - --70-l: var(--bulma-white-70-l); - --color-70: hsl(var(--h), var(--s), var(--70-l)); - --75-l: var(--bulma-white-75-l); - --color-75: hsl(var(--h), var(--s), var(--75-l)); - --80-l: var(--bulma-white-80-l); - --color-80: hsl(var(--h), var(--s), var(--80-l)); - --85-l: var(--bulma-white-85-l); - --color-85: hsl(var(--h), var(--s), var(--85-l)); - --90-l: var(--bulma-white-90-l); - --color-90: hsl(var(--h), var(--s), var(--90-l)); - --95-l: var(--bulma-white-95-l); - --color-95: hsl(var(--h), var(--s), var(--95-l)); - --100-l: var(--bulma-white-100-l); - --color-100: hsl(var(--h), var(--s), var(--100-l)); -} - -.has-text-black { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-l)) !important; -} - -.has-background-black { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-l)) !important; -} - -.has-text-black-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-invert-l)) !important; -} - -.has-background-black-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-invert-l)) !important; -} - -.has-text-black-on-scheme { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-on-scheme-l)) !important; -} - -.has-background-black-on-scheme { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-on-scheme-l)) !important; -} - -.has-text-black-light { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-light-l)) !important; -} - -.has-background-black-light { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-light-l)) !important; -} - -.has-text-black-light-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-light-invert-l)) !important; -} - -.has-background-black-light-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-light-invert-l)) !important; -} - -.has-text-black-dark { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-dark-l)) !important; -} - -.has-background-black-dark { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-dark-l)) !important; -} - -.has-text-black-dark-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-dark-invert-l)) !important; -} - -.has-background-black-dark-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-dark-invert-l)) !important; -} - -.has-text-black-soft { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-soft-l)) !important; -} - -.has-background-black-soft { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-soft-l)) !important; -} - -.has-text-black-bold { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-bold-l)) !important; -} - -.has-background-black-bold { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-bold-l)) !important; -} - -.has-text-black-soft-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-soft-invert-l)) !important; -} - -.has-background-black-soft-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-soft-invert-l)) !important; -} - -.has-text-black-bold-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-bold-invert-l)) !important; -} - -.has-background-black-bold-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-bold-invert-l)) !important; -} - -.has-text-black-00 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-00-l)) !important; -} - -.has-background-black-00 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-00-l)) !important; -} - -.has-text-black-00-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-00-invert-l)) !important; -} - -.has-background-black-00-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-00-invert-l)) !important; -} - -.has-text-black-05 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-05-l)) !important; -} - -.has-background-black-05 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-05-l)) !important; -} - -.has-text-black-05-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-05-invert-l)) !important; -} - -.has-background-black-05-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-05-invert-l)) !important; -} - -.has-text-black-10 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-10-l)) !important; -} - -.has-background-black-10 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-10-l)) !important; -} - -.has-text-black-10-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-10-invert-l)) !important; -} - -.has-background-black-10-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-10-invert-l)) !important; -} - -.has-text-black-15 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-15-l)) !important; -} - -.has-background-black-15 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-15-l)) !important; -} - -.has-text-black-15-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-15-invert-l)) !important; -} - -.has-background-black-15-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-15-invert-l)) !important; -} - -.has-text-black-20 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-20-l)) !important; -} - -.has-background-black-20 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-20-l)) !important; -} - -.has-text-black-20-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-20-invert-l)) !important; -} - -.has-background-black-20-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-20-invert-l)) !important; -} - -.has-text-black-25 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-25-l)) !important; -} - -.has-background-black-25 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-25-l)) !important; -} - -.has-text-black-25-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-25-invert-l)) !important; -} - -.has-background-black-25-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-25-invert-l)) !important; -} - -.has-text-black-30 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-30-l)) !important; -} - -.has-background-black-30 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-30-l)) !important; -} - -.has-text-black-30-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-30-invert-l)) !important; -} - -.has-background-black-30-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-30-invert-l)) !important; -} - -.has-text-black-35 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-35-l)) !important; -} - -.has-background-black-35 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-35-l)) !important; -} - -.has-text-black-35-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-35-invert-l)) !important; -} - -.has-background-black-35-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-35-invert-l)) !important; -} - -.has-text-black-40 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-40-l)) !important; -} - -.has-background-black-40 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-40-l)) !important; -} - -.has-text-black-40-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-40-invert-l)) !important; -} - -.has-background-black-40-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-40-invert-l)) !important; -} - -.has-text-black-45 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-45-l)) !important; -} - -.has-background-black-45 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-45-l)) !important; -} - -.has-text-black-45-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-45-invert-l)) !important; -} - -.has-background-black-45-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-45-invert-l)) !important; -} - -.has-text-black-50 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-50-l)) !important; -} - -.has-background-black-50 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-50-l)) !important; -} - -.has-text-black-50-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-50-invert-l)) !important; -} - -.has-background-black-50-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-50-invert-l)) !important; -} - -.has-text-black-55 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-55-l)) !important; -} - -.has-background-black-55 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-55-l)) !important; -} - -.has-text-black-55-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-55-invert-l)) !important; -} - -.has-background-black-55-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-55-invert-l)) !important; -} - -.has-text-black-60 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-60-l)) !important; -} - -.has-background-black-60 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-60-l)) !important; -} - -.has-text-black-60-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-60-invert-l)) !important; -} - -.has-background-black-60-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-60-invert-l)) !important; -} - -.has-text-black-65 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-65-l)) !important; -} - -.has-background-black-65 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-65-l)) !important; -} - -.has-text-black-65-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-65-invert-l)) !important; -} - -.has-background-black-65-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-65-invert-l)) !important; -} - -.has-text-black-70 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-70-l)) !important; -} - -.has-background-black-70 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-70-l)) !important; -} - -.has-text-black-70-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-70-invert-l)) !important; -} - -.has-background-black-70-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-70-invert-l)) !important; -} - -.has-text-black-75 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-75-l)) !important; -} - -.has-background-black-75 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-75-l)) !important; -} - -.has-text-black-75-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-75-invert-l)) !important; -} - -.has-background-black-75-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-75-invert-l)) !important; -} - -.has-text-black-80 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-80-l)) !important; -} - -.has-background-black-80 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-80-l)) !important; -} - -.has-text-black-80-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-80-invert-l)) !important; -} - -.has-background-black-80-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-80-invert-l)) !important; -} - -.has-text-black-85 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-85-l)) !important; -} - -.has-background-black-85 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-85-l)) !important; -} - -.has-text-black-85-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-85-invert-l)) !important; -} - -.has-background-black-85-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-85-invert-l)) !important; -} - -.has-text-black-90 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-90-l)) !important; -} - -.has-background-black-90 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-90-l)) !important; -} - -.has-text-black-90-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-90-invert-l)) !important; -} - -.has-background-black-90-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-90-invert-l)) !important; -} - -.has-text-black-95 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-95-l)) !important; -} - -.has-background-black-95 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-95-l)) !important; -} - -.has-text-black-95-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-95-invert-l)) !important; -} - -.has-background-black-95-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-95-invert-l)) !important; -} - -.has-text-black-100 { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-100-l)) !important; -} - -.has-background-black-100 { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-100-l)) !important; -} - -.has-text-black-100-invert { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-100-invert-l)) !important; -} - -.has-background-black-100-invert { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-100-invert-l)) !important; -} - -a.has-text-black:hover, a.has-text-black:focus-visible, -button.has-text-black:hover, -button.has-text-black:focus-visible, -has-text-black.is-hoverable:hover, -has-text-black.is-hoverable:focus-visible { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), calc(var(--bulma-black-l) + var(--bulma-hover-color-l-delta))) !important; -} -a.has-text-black:active, -button.has-text-black:active, -has-text-black.is-hoverable:active { - color: hsl(var(--bulma-black-h), var(--bulma-black-s), calc(var(--bulma-black-l) + var(--bulma-active-color-l-delta))) !important; -} - -a.has-background-black:hover, a.has-background-black:focus-visible, -button.has-background-black:hover, -button.has-background-black:focus-visible, -has-background-black.is-hoverable:hover, -has-background-black.is-hoverable:focus-visible { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), calc(var(--bulma-black-l) + var(--bulma-hover-background-l-delta))) !important; -} -a.has-background-black:active, -button.has-background-black:active, -has-background-black.is-hoverable:active { - background-color: hsl(var(--bulma-black-h), var(--bulma-black-s), calc(var(--bulma-black-l) + var(--bulma-active-background-l-delta))) !important; -} - -.is-palette-black { - --h: var(--bulma-black-h); - --s: var(--bulma-black-s); - --l: var(--bulma-black-l); - --color: hsl(var(--h), var(--s), var(--l)); - --00-l: var(--bulma-black-00-l); - --color-00: hsl(var(--h), var(--s), var(--00-l)); - --05-l: var(--bulma-black-05-l); - --color-05: hsl(var(--h), var(--s), var(--05-l)); - --10-l: var(--bulma-black-10-l); - --color-10: hsl(var(--h), var(--s), var(--10-l)); - --15-l: var(--bulma-black-15-l); - --color-15: hsl(var(--h), var(--s), var(--15-l)); - --20-l: var(--bulma-black-20-l); - --color-20: hsl(var(--h), var(--s), var(--20-l)); - --25-l: var(--bulma-black-25-l); - --color-25: hsl(var(--h), var(--s), var(--25-l)); - --30-l: var(--bulma-black-30-l); - --color-30: hsl(var(--h), var(--s), var(--30-l)); - --35-l: var(--bulma-black-35-l); - --color-35: hsl(var(--h), var(--s), var(--35-l)); - --40-l: var(--bulma-black-40-l); - --color-40: hsl(var(--h), var(--s), var(--40-l)); - --45-l: var(--bulma-black-45-l); - --color-45: hsl(var(--h), var(--s), var(--45-l)); - --50-l: var(--bulma-black-50-l); - --color-50: hsl(var(--h), var(--s), var(--50-l)); - --55-l: var(--bulma-black-55-l); - --color-55: hsl(var(--h), var(--s), var(--55-l)); - --60-l: var(--bulma-black-60-l); - --color-60: hsl(var(--h), var(--s), var(--60-l)); - --65-l: var(--bulma-black-65-l); - --color-65: hsl(var(--h), var(--s), var(--65-l)); - --70-l: var(--bulma-black-70-l); - --color-70: hsl(var(--h), var(--s), var(--70-l)); - --75-l: var(--bulma-black-75-l); - --color-75: hsl(var(--h), var(--s), var(--75-l)); - --80-l: var(--bulma-black-80-l); - --color-80: hsl(var(--h), var(--s), var(--80-l)); - --85-l: var(--bulma-black-85-l); - --color-85: hsl(var(--h), var(--s), var(--85-l)); - --90-l: var(--bulma-black-90-l); - --color-90: hsl(var(--h), var(--s), var(--90-l)); - --95-l: var(--bulma-black-95-l); - --color-95: hsl(var(--h), var(--s), var(--95-l)); - --100-l: var(--bulma-black-100-l); - --color-100: hsl(var(--h), var(--s), var(--100-l)); -} - -.has-text-light { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-l)) !important; -} - -.has-background-light { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-l)) !important; -} - -.has-text-light-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-invert-l)) !important; -} - -.has-background-light-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-invert-l)) !important; -} - -.has-text-light-on-scheme { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-on-scheme-l)) !important; -} - -.has-background-light-on-scheme { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-on-scheme-l)) !important; -} - -.has-text-light-light { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-light-l)) !important; -} - -.has-background-light-light { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-light-l)) !important; -} - -.has-text-light-light-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-light-invert-l)) !important; -} - -.has-background-light-light-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-light-invert-l)) !important; -} - -.has-text-light-dark { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-dark-l)) !important; -} - -.has-background-light-dark { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-dark-l)) !important; -} - -.has-text-light-dark-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-dark-invert-l)) !important; -} - -.has-background-light-dark-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-dark-invert-l)) !important; -} - -.has-text-light-soft { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-soft-l)) !important; -} - -.has-background-light-soft { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-soft-l)) !important; -} - -.has-text-light-bold { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-bold-l)) !important; -} - -.has-background-light-bold { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-bold-l)) !important; -} - -.has-text-light-soft-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-soft-invert-l)) !important; -} - -.has-background-light-soft-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-soft-invert-l)) !important; -} - -.has-text-light-bold-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-bold-invert-l)) !important; -} - -.has-background-light-bold-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-bold-invert-l)) !important; -} - -.has-text-light-00 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-00-l)) !important; -} - -.has-background-light-00 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-00-l)) !important; -} - -.has-text-light-00-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-00-invert-l)) !important; -} - -.has-background-light-00-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-00-invert-l)) !important; -} - -.has-text-light-05 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-05-l)) !important; -} - -.has-background-light-05 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-05-l)) !important; -} - -.has-text-light-05-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-05-invert-l)) !important; -} - -.has-background-light-05-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-05-invert-l)) !important; -} - -.has-text-light-10 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-10-l)) !important; -} - -.has-background-light-10 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-10-l)) !important; -} - -.has-text-light-10-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-10-invert-l)) !important; -} - -.has-background-light-10-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-10-invert-l)) !important; -} - -.has-text-light-15 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-15-l)) !important; -} - -.has-background-light-15 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-15-l)) !important; -} - -.has-text-light-15-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-15-invert-l)) !important; -} - -.has-background-light-15-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-15-invert-l)) !important; -} - -.has-text-light-20 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-20-l)) !important; -} - -.has-background-light-20 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-20-l)) !important; -} - -.has-text-light-20-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-20-invert-l)) !important; -} - -.has-background-light-20-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-20-invert-l)) !important; -} - -.has-text-light-25 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-25-l)) !important; -} - -.has-background-light-25 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-25-l)) !important; -} - -.has-text-light-25-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-25-invert-l)) !important; -} - -.has-background-light-25-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-25-invert-l)) !important; -} - -.has-text-light-30 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-30-l)) !important; -} - -.has-background-light-30 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-30-l)) !important; -} - -.has-text-light-30-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-30-invert-l)) !important; -} - -.has-background-light-30-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-30-invert-l)) !important; -} - -.has-text-light-35 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-35-l)) !important; -} - -.has-background-light-35 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-35-l)) !important; -} - -.has-text-light-35-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-35-invert-l)) !important; -} - -.has-background-light-35-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-35-invert-l)) !important; -} - -.has-text-light-40 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-40-l)) !important; -} - -.has-background-light-40 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-40-l)) !important; -} - -.has-text-light-40-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-40-invert-l)) !important; -} - -.has-background-light-40-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-40-invert-l)) !important; -} - -.has-text-light-45 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-45-l)) !important; -} - -.has-background-light-45 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-45-l)) !important; -} - -.has-text-light-45-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-45-invert-l)) !important; -} - -.has-background-light-45-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-45-invert-l)) !important; -} - -.has-text-light-50 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-50-l)) !important; -} - -.has-background-light-50 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-50-l)) !important; -} - -.has-text-light-50-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-50-invert-l)) !important; -} - -.has-background-light-50-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-50-invert-l)) !important; -} - -.has-text-light-55 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-55-l)) !important; -} - -.has-background-light-55 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-55-l)) !important; -} - -.has-text-light-55-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-55-invert-l)) !important; -} - -.has-background-light-55-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-55-invert-l)) !important; -} - -.has-text-light-60 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-60-l)) !important; -} - -.has-background-light-60 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-60-l)) !important; -} - -.has-text-light-60-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-60-invert-l)) !important; -} - -.has-background-light-60-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-60-invert-l)) !important; -} - -.has-text-light-65 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-65-l)) !important; -} - -.has-background-light-65 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-65-l)) !important; -} - -.has-text-light-65-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-65-invert-l)) !important; -} - -.has-background-light-65-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-65-invert-l)) !important; -} - -.has-text-light-70 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-70-l)) !important; -} - -.has-background-light-70 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-70-l)) !important; -} - -.has-text-light-70-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-70-invert-l)) !important; -} - -.has-background-light-70-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-70-invert-l)) !important; -} - -.has-text-light-75 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-75-l)) !important; -} - -.has-background-light-75 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-75-l)) !important; -} - -.has-text-light-75-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-75-invert-l)) !important; -} - -.has-background-light-75-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-75-invert-l)) !important; -} - -.has-text-light-80 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-80-l)) !important; -} - -.has-background-light-80 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-80-l)) !important; -} - -.has-text-light-80-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-80-invert-l)) !important; -} - -.has-background-light-80-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-80-invert-l)) !important; -} - -.has-text-light-85 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-85-l)) !important; -} - -.has-background-light-85 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-85-l)) !important; -} - -.has-text-light-85-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-85-invert-l)) !important; -} - -.has-background-light-85-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-85-invert-l)) !important; -} - -.has-text-light-90 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-90-l)) !important; -} - -.has-background-light-90 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-90-l)) !important; -} - -.has-text-light-90-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-90-invert-l)) !important; -} - -.has-background-light-90-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-90-invert-l)) !important; -} - -.has-text-light-95 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-95-l)) !important; -} - -.has-background-light-95 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-95-l)) !important; -} - -.has-text-light-95-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-95-invert-l)) !important; -} - -.has-background-light-95-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-95-invert-l)) !important; -} - -.has-text-light-100 { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-100-l)) !important; -} - -.has-background-light-100 { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-100-l)) !important; -} - -.has-text-light-100-invert { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-100-invert-l)) !important; -} - -.has-background-light-100-invert { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-100-invert-l)) !important; -} - -a.has-text-light:hover, a.has-text-light:focus-visible, -button.has-text-light:hover, -button.has-text-light:focus-visible, -has-text-light.is-hoverable:hover, -has-text-light.is-hoverable:focus-visible { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), calc(var(--bulma-light-l) + var(--bulma-hover-color-l-delta))) !important; -} -a.has-text-light:active, -button.has-text-light:active, -has-text-light.is-hoverable:active { - color: hsl(var(--bulma-light-h), var(--bulma-light-s), calc(var(--bulma-light-l) + var(--bulma-active-color-l-delta))) !important; -} - -a.has-background-light:hover, a.has-background-light:focus-visible, -button.has-background-light:hover, -button.has-background-light:focus-visible, -has-background-light.is-hoverable:hover, -has-background-light.is-hoverable:focus-visible { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), calc(var(--bulma-light-l) + var(--bulma-hover-background-l-delta))) !important; -} -a.has-background-light:active, -button.has-background-light:active, -has-background-light.is-hoverable:active { - background-color: hsl(var(--bulma-light-h), var(--bulma-light-s), calc(var(--bulma-light-l) + var(--bulma-active-background-l-delta))) !important; -} - -.is-palette-light { - --h: var(--bulma-light-h); - --s: var(--bulma-light-s); - --l: var(--bulma-light-l); - --color: hsl(var(--h), var(--s), var(--l)); - --00-l: var(--bulma-light-00-l); - --color-00: hsl(var(--h), var(--s), var(--00-l)); - --05-l: var(--bulma-light-05-l); - --color-05: hsl(var(--h), var(--s), var(--05-l)); - --10-l: var(--bulma-light-10-l); - --color-10: hsl(var(--h), var(--s), var(--10-l)); - --15-l: var(--bulma-light-15-l); - --color-15: hsl(var(--h), var(--s), var(--15-l)); - --20-l: var(--bulma-light-20-l); - --color-20: hsl(var(--h), var(--s), var(--20-l)); - --25-l: var(--bulma-light-25-l); - --color-25: hsl(var(--h), var(--s), var(--25-l)); - --30-l: var(--bulma-light-30-l); - --color-30: hsl(var(--h), var(--s), var(--30-l)); - --35-l: var(--bulma-light-35-l); - --color-35: hsl(var(--h), var(--s), var(--35-l)); - --40-l: var(--bulma-light-40-l); - --color-40: hsl(var(--h), var(--s), var(--40-l)); - --45-l: var(--bulma-light-45-l); - --color-45: hsl(var(--h), var(--s), var(--45-l)); - --50-l: var(--bulma-light-50-l); - --color-50: hsl(var(--h), var(--s), var(--50-l)); - --55-l: var(--bulma-light-55-l); - --color-55: hsl(var(--h), var(--s), var(--55-l)); - --60-l: var(--bulma-light-60-l); - --color-60: hsl(var(--h), var(--s), var(--60-l)); - --65-l: var(--bulma-light-65-l); - --color-65: hsl(var(--h), var(--s), var(--65-l)); - --70-l: var(--bulma-light-70-l); - --color-70: hsl(var(--h), var(--s), var(--70-l)); - --75-l: var(--bulma-light-75-l); - --color-75: hsl(var(--h), var(--s), var(--75-l)); - --80-l: var(--bulma-light-80-l); - --color-80: hsl(var(--h), var(--s), var(--80-l)); - --85-l: var(--bulma-light-85-l); - --color-85: hsl(var(--h), var(--s), var(--85-l)); - --90-l: var(--bulma-light-90-l); - --color-90: hsl(var(--h), var(--s), var(--90-l)); - --95-l: var(--bulma-light-95-l); - --color-95: hsl(var(--h), var(--s), var(--95-l)); - --100-l: var(--bulma-light-100-l); - --color-100: hsl(var(--h), var(--s), var(--100-l)); -} - -.has-text-dark { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-l)) !important; -} - -.has-background-dark { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-l)) !important; -} - -.has-text-dark-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-invert-l)) !important; -} - -.has-background-dark-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-invert-l)) !important; -} - -.has-text-dark-on-scheme { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-on-scheme-l)) !important; -} - -.has-background-dark-on-scheme { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-on-scheme-l)) !important; -} - -.has-text-dark-light { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-light-l)) !important; -} - -.has-background-dark-light { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-light-l)) !important; -} - -.has-text-dark-light-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-light-invert-l)) !important; -} - -.has-background-dark-light-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-light-invert-l)) !important; -} - -.has-text-dark-dark { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-dark-l)) !important; -} - -.has-background-dark-dark { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-dark-l)) !important; -} - -.has-text-dark-dark-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-dark-invert-l)) !important; -} - -.has-background-dark-dark-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-dark-invert-l)) !important; -} - -.has-text-dark-soft { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-soft-l)) !important; -} - -.has-background-dark-soft { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-soft-l)) !important; -} - -.has-text-dark-bold { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-bold-l)) !important; -} - -.has-background-dark-bold { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-bold-l)) !important; -} - -.has-text-dark-soft-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-soft-invert-l)) !important; -} - -.has-background-dark-soft-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-soft-invert-l)) !important; -} - -.has-text-dark-bold-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-bold-invert-l)) !important; -} - -.has-background-dark-bold-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-bold-invert-l)) !important; -} - -.has-text-dark-00 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-00-l)) !important; -} - -.has-background-dark-00 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-00-l)) !important; -} - -.has-text-dark-00-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-00-invert-l)) !important; -} - -.has-background-dark-00-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-00-invert-l)) !important; -} - -.has-text-dark-05 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-05-l)) !important; -} - -.has-background-dark-05 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-05-l)) !important; -} - -.has-text-dark-05-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-05-invert-l)) !important; -} - -.has-background-dark-05-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-05-invert-l)) !important; -} - -.has-text-dark-10 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-10-l)) !important; -} - -.has-background-dark-10 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-10-l)) !important; -} - -.has-text-dark-10-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-10-invert-l)) !important; -} - -.has-background-dark-10-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-10-invert-l)) !important; -} - -.has-text-dark-15 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-15-l)) !important; -} - -.has-background-dark-15 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-15-l)) !important; -} - -.has-text-dark-15-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-15-invert-l)) !important; -} - -.has-background-dark-15-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-15-invert-l)) !important; -} - -.has-text-dark-20 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-20-l)) !important; -} - -.has-background-dark-20 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-20-l)) !important; -} - -.has-text-dark-20-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-20-invert-l)) !important; -} - -.has-background-dark-20-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-20-invert-l)) !important; -} - -.has-text-dark-25 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-25-l)) !important; -} - -.has-background-dark-25 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-25-l)) !important; -} - -.has-text-dark-25-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-25-invert-l)) !important; -} - -.has-background-dark-25-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-25-invert-l)) !important; -} - -.has-text-dark-30 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-30-l)) !important; -} - -.has-background-dark-30 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-30-l)) !important; -} - -.has-text-dark-30-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-30-invert-l)) !important; -} - -.has-background-dark-30-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-30-invert-l)) !important; -} - -.has-text-dark-35 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-35-l)) !important; -} - -.has-background-dark-35 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-35-l)) !important; -} - -.has-text-dark-35-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-35-invert-l)) !important; -} - -.has-background-dark-35-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-35-invert-l)) !important; -} - -.has-text-dark-40 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-40-l)) !important; -} - -.has-background-dark-40 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-40-l)) !important; -} - -.has-text-dark-40-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-40-invert-l)) !important; -} - -.has-background-dark-40-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-40-invert-l)) !important; -} - -.has-text-dark-45 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-45-l)) !important; -} - -.has-background-dark-45 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-45-l)) !important; -} - -.has-text-dark-45-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-45-invert-l)) !important; -} - -.has-background-dark-45-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-45-invert-l)) !important; -} - -.has-text-dark-50 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-50-l)) !important; -} - -.has-background-dark-50 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-50-l)) !important; -} - -.has-text-dark-50-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-50-invert-l)) !important; -} - -.has-background-dark-50-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-50-invert-l)) !important; -} - -.has-text-dark-55 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-55-l)) !important; -} - -.has-background-dark-55 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-55-l)) !important; -} - -.has-text-dark-55-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-55-invert-l)) !important; -} - -.has-background-dark-55-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-55-invert-l)) !important; -} - -.has-text-dark-60 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-60-l)) !important; -} - -.has-background-dark-60 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-60-l)) !important; -} - -.has-text-dark-60-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-60-invert-l)) !important; -} - -.has-background-dark-60-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-60-invert-l)) !important; -} - -.has-text-dark-65 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-65-l)) !important; -} - -.has-background-dark-65 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-65-l)) !important; -} - -.has-text-dark-65-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-65-invert-l)) !important; -} - -.has-background-dark-65-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-65-invert-l)) !important; -} - -.has-text-dark-70 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-70-l)) !important; -} - -.has-background-dark-70 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-70-l)) !important; -} - -.has-text-dark-70-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-70-invert-l)) !important; -} - -.has-background-dark-70-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-70-invert-l)) !important; -} - -.has-text-dark-75 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-75-l)) !important; -} - -.has-background-dark-75 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-75-l)) !important; -} - -.has-text-dark-75-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-75-invert-l)) !important; -} - -.has-background-dark-75-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-75-invert-l)) !important; -} - -.has-text-dark-80 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-80-l)) !important; -} - -.has-background-dark-80 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-80-l)) !important; -} - -.has-text-dark-80-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-80-invert-l)) !important; -} - -.has-background-dark-80-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-80-invert-l)) !important; -} - -.has-text-dark-85 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-85-l)) !important; -} - -.has-background-dark-85 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-85-l)) !important; -} - -.has-text-dark-85-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-85-invert-l)) !important; -} - -.has-background-dark-85-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-85-invert-l)) !important; -} - -.has-text-dark-90 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-90-l)) !important; -} - -.has-background-dark-90 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-90-l)) !important; -} - -.has-text-dark-90-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-90-invert-l)) !important; -} - -.has-background-dark-90-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-90-invert-l)) !important; -} - -.has-text-dark-95 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-95-l)) !important; -} - -.has-background-dark-95 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-95-l)) !important; -} - -.has-text-dark-95-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-95-invert-l)) !important; -} - -.has-background-dark-95-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-95-invert-l)) !important; -} - -.has-text-dark-100 { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-100-l)) !important; -} - -.has-background-dark-100 { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-100-l)) !important; -} - -.has-text-dark-100-invert { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-100-invert-l)) !important; -} - -.has-background-dark-100-invert { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-100-invert-l)) !important; -} - -a.has-text-dark:hover, a.has-text-dark:focus-visible, -button.has-text-dark:hover, -button.has-text-dark:focus-visible, -has-text-dark.is-hoverable:hover, -has-text-dark.is-hoverable:focus-visible { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), calc(var(--bulma-dark-l) + var(--bulma-hover-color-l-delta))) !important; -} -a.has-text-dark:active, -button.has-text-dark:active, -has-text-dark.is-hoverable:active { - color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), calc(var(--bulma-dark-l) + var(--bulma-active-color-l-delta))) !important; -} - -a.has-background-dark:hover, a.has-background-dark:focus-visible, -button.has-background-dark:hover, -button.has-background-dark:focus-visible, -has-background-dark.is-hoverable:hover, -has-background-dark.is-hoverable:focus-visible { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), calc(var(--bulma-dark-l) + var(--bulma-hover-background-l-delta))) !important; -} -a.has-background-dark:active, -button.has-background-dark:active, -has-background-dark.is-hoverable:active { - background-color: hsl(var(--bulma-dark-h), var(--bulma-dark-s), calc(var(--bulma-dark-l) + var(--bulma-active-background-l-delta))) !important; -} - -.is-palette-dark { - --h: var(--bulma-dark-h); - --s: var(--bulma-dark-s); - --l: var(--bulma-dark-l); - --color: hsl(var(--h), var(--s), var(--l)); - --00-l: var(--bulma-dark-00-l); - --color-00: hsl(var(--h), var(--s), var(--00-l)); - --05-l: var(--bulma-dark-05-l); - --color-05: hsl(var(--h), var(--s), var(--05-l)); - --10-l: var(--bulma-dark-10-l); - --color-10: hsl(var(--h), var(--s), var(--10-l)); - --15-l: var(--bulma-dark-15-l); - --color-15: hsl(var(--h), var(--s), var(--15-l)); - --20-l: var(--bulma-dark-20-l); - --color-20: hsl(var(--h), var(--s), var(--20-l)); - --25-l: var(--bulma-dark-25-l); - --color-25: hsl(var(--h), var(--s), var(--25-l)); - --30-l: var(--bulma-dark-30-l); - --color-30: hsl(var(--h), var(--s), var(--30-l)); - --35-l: var(--bulma-dark-35-l); - --color-35: hsl(var(--h), var(--s), var(--35-l)); - --40-l: var(--bulma-dark-40-l); - --color-40: hsl(var(--h), var(--s), var(--40-l)); - --45-l: var(--bulma-dark-45-l); - --color-45: hsl(var(--h), var(--s), var(--45-l)); - --50-l: var(--bulma-dark-50-l); - --color-50: hsl(var(--h), var(--s), var(--50-l)); - --55-l: var(--bulma-dark-55-l); - --color-55: hsl(var(--h), var(--s), var(--55-l)); - --60-l: var(--bulma-dark-60-l); - --color-60: hsl(var(--h), var(--s), var(--60-l)); - --65-l: var(--bulma-dark-65-l); - --color-65: hsl(var(--h), var(--s), var(--65-l)); - --70-l: var(--bulma-dark-70-l); - --color-70: hsl(var(--h), var(--s), var(--70-l)); - --75-l: var(--bulma-dark-75-l); - --color-75: hsl(var(--h), var(--s), var(--75-l)); - --80-l: var(--bulma-dark-80-l); - --color-80: hsl(var(--h), var(--s), var(--80-l)); - --85-l: var(--bulma-dark-85-l); - --color-85: hsl(var(--h), var(--s), var(--85-l)); - --90-l: var(--bulma-dark-90-l); - --color-90: hsl(var(--h), var(--s), var(--90-l)); - --95-l: var(--bulma-dark-95-l); - --color-95: hsl(var(--h), var(--s), var(--95-l)); - --100-l: var(--bulma-dark-100-l); - --color-100: hsl(var(--h), var(--s), var(--100-l)); -} - -.has-text-text { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-l)) !important; -} - -.has-background-text { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-l)) !important; -} - -.has-text-text-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-invert-l)) !important; -} - -.has-background-text-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-invert-l)) !important; -} - -.has-text-text-on-scheme { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-on-scheme-l)) !important; -} - -.has-background-text-on-scheme { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-on-scheme-l)) !important; -} - -.has-text-text-light { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-light-l)) !important; -} - -.has-background-text-light { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-light-l)) !important; -} - -.has-text-text-light-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-light-invert-l)) !important; -} - -.has-background-text-light-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-light-invert-l)) !important; -} - -.has-text-text-dark { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-dark-l)) !important; -} - -.has-background-text-dark { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-dark-l)) !important; -} - -.has-text-text-dark-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-dark-invert-l)) !important; -} - -.has-background-text-dark-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-dark-invert-l)) !important; -} - -.has-text-text-soft { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-soft-l)) !important; -} - -.has-background-text-soft { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-soft-l)) !important; -} - -.has-text-text-bold { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-bold-l)) !important; -} - -.has-background-text-bold { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-bold-l)) !important; -} - -.has-text-text-soft-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-soft-invert-l)) !important; -} - -.has-background-text-soft-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-soft-invert-l)) !important; -} - -.has-text-text-bold-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-bold-invert-l)) !important; -} - -.has-background-text-bold-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-bold-invert-l)) !important; -} - -.has-text-text-00 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-00-l)) !important; -} - -.has-background-text-00 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-00-l)) !important; -} - -.has-text-text-00-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-00-invert-l)) !important; -} - -.has-background-text-00-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-00-invert-l)) !important; -} - -.has-text-text-05 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-05-l)) !important; -} - -.has-background-text-05 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-05-l)) !important; -} - -.has-text-text-05-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-05-invert-l)) !important; -} - -.has-background-text-05-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-05-invert-l)) !important; -} - -.has-text-text-10 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-10-l)) !important; -} - -.has-background-text-10 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-10-l)) !important; -} - -.has-text-text-10-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-10-invert-l)) !important; -} - -.has-background-text-10-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-10-invert-l)) !important; -} - -.has-text-text-15 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-15-l)) !important; -} - -.has-background-text-15 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-15-l)) !important; -} - -.has-text-text-15-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-15-invert-l)) !important; -} - -.has-background-text-15-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-15-invert-l)) !important; -} - -.has-text-text-20 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-20-l)) !important; -} - -.has-background-text-20 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-20-l)) !important; -} - -.has-text-text-20-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-20-invert-l)) !important; -} - -.has-background-text-20-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-20-invert-l)) !important; -} - -.has-text-text-25 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-25-l)) !important; -} - -.has-background-text-25 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-25-l)) !important; -} - -.has-text-text-25-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-25-invert-l)) !important; -} - -.has-background-text-25-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-25-invert-l)) !important; -} - -.has-text-text-30 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-30-l)) !important; -} - -.has-background-text-30 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-30-l)) !important; -} - -.has-text-text-30-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-30-invert-l)) !important; -} - -.has-background-text-30-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-30-invert-l)) !important; -} - -.has-text-text-35 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-35-l)) !important; -} - -.has-background-text-35 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-35-l)) !important; -} - -.has-text-text-35-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-35-invert-l)) !important; -} - -.has-background-text-35-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-35-invert-l)) !important; -} - -.has-text-text-40 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-40-l)) !important; -} - -.has-background-text-40 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-40-l)) !important; -} - -.has-text-text-40-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-40-invert-l)) !important; -} - -.has-background-text-40-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-40-invert-l)) !important; -} - -.has-text-text-45 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-45-l)) !important; -} - -.has-background-text-45 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-45-l)) !important; -} - -.has-text-text-45-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-45-invert-l)) !important; -} - -.has-background-text-45-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-45-invert-l)) !important; -} - -.has-text-text-50 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-50-l)) !important; -} - -.has-background-text-50 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-50-l)) !important; -} - -.has-text-text-50-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-50-invert-l)) !important; -} - -.has-background-text-50-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-50-invert-l)) !important; -} - -.has-text-text-55 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-55-l)) !important; -} - -.has-background-text-55 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-55-l)) !important; -} - -.has-text-text-55-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-55-invert-l)) !important; -} - -.has-background-text-55-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-55-invert-l)) !important; -} - -.has-text-text-60 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-60-l)) !important; -} - -.has-background-text-60 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-60-l)) !important; -} - -.has-text-text-60-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-60-invert-l)) !important; -} - -.has-background-text-60-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-60-invert-l)) !important; -} - -.has-text-text-65 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-65-l)) !important; -} - -.has-background-text-65 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-65-l)) !important; -} - -.has-text-text-65-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-65-invert-l)) !important; -} - -.has-background-text-65-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-65-invert-l)) !important; -} - -.has-text-text-70 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-70-l)) !important; -} - -.has-background-text-70 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-70-l)) !important; -} - -.has-text-text-70-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-70-invert-l)) !important; -} - -.has-background-text-70-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-70-invert-l)) !important; -} - -.has-text-text-75 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-75-l)) !important; -} - -.has-background-text-75 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-75-l)) !important; -} - -.has-text-text-75-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-75-invert-l)) !important; -} - -.has-background-text-75-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-75-invert-l)) !important; -} - -.has-text-text-80 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-80-l)) !important; -} - -.has-background-text-80 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-80-l)) !important; -} - -.has-text-text-80-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-80-invert-l)) !important; -} - -.has-background-text-80-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-80-invert-l)) !important; -} - -.has-text-text-85 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-85-l)) !important; -} - -.has-background-text-85 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-85-l)) !important; -} - -.has-text-text-85-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-85-invert-l)) !important; -} - -.has-background-text-85-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-85-invert-l)) !important; -} - -.has-text-text-90 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-90-l)) !important; -} - -.has-background-text-90 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-90-l)) !important; -} - -.has-text-text-90-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-90-invert-l)) !important; -} - -.has-background-text-90-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-90-invert-l)) !important; -} - -.has-text-text-95 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-95-l)) !important; -} - -.has-background-text-95 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-95-l)) !important; -} - -.has-text-text-95-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-95-invert-l)) !important; -} - -.has-background-text-95-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-95-invert-l)) !important; -} - -.has-text-text-100 { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-100-l)) !important; -} - -.has-background-text-100 { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-100-l)) !important; -} - -.has-text-text-100-invert { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-100-invert-l)) !important; -} - -.has-background-text-100-invert { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-100-invert-l)) !important; -} - -a.has-text-text:hover, a.has-text-text:focus-visible, -button.has-text-text:hover, -button.has-text-text:focus-visible, -has-text-text.is-hoverable:hover, -has-text-text.is-hoverable:focus-visible { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), calc(var(--bulma-text-l) + var(--bulma-hover-color-l-delta))) !important; -} -a.has-text-text:active, -button.has-text-text:active, -has-text-text.is-hoverable:active { - color: hsl(var(--bulma-text-h), var(--bulma-text-s), calc(var(--bulma-text-l) + var(--bulma-active-color-l-delta))) !important; -} - -a.has-background-text:hover, a.has-background-text:focus-visible, -button.has-background-text:hover, -button.has-background-text:focus-visible, -has-background-text.is-hoverable:hover, -has-background-text.is-hoverable:focus-visible { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), calc(var(--bulma-text-l) + var(--bulma-hover-background-l-delta))) !important; -} -a.has-background-text:active, -button.has-background-text:active, -has-background-text.is-hoverable:active { - background-color: hsl(var(--bulma-text-h), var(--bulma-text-s), calc(var(--bulma-text-l) + var(--bulma-active-background-l-delta))) !important; -} - -.is-palette-text { - --h: var(--bulma-text-h); - --s: var(--bulma-text-s); - --l: var(--bulma-text-l); - --color: hsl(var(--h), var(--s), var(--l)); - --00-l: var(--bulma-text-00-l); - --color-00: hsl(var(--h), var(--s), var(--00-l)); - --05-l: var(--bulma-text-05-l); - --color-05: hsl(var(--h), var(--s), var(--05-l)); - --10-l: var(--bulma-text-10-l); - --color-10: hsl(var(--h), var(--s), var(--10-l)); - --15-l: var(--bulma-text-15-l); - --color-15: hsl(var(--h), var(--s), var(--15-l)); - --20-l: var(--bulma-text-20-l); - --color-20: hsl(var(--h), var(--s), var(--20-l)); - --25-l: var(--bulma-text-25-l); - --color-25: hsl(var(--h), var(--s), var(--25-l)); - --30-l: var(--bulma-text-30-l); - --color-30: hsl(var(--h), var(--s), var(--30-l)); - --35-l: var(--bulma-text-35-l); - --color-35: hsl(var(--h), var(--s), var(--35-l)); - --40-l: var(--bulma-text-40-l); - --color-40: hsl(var(--h), var(--s), var(--40-l)); - --45-l: var(--bulma-text-45-l); - --color-45: hsl(var(--h), var(--s), var(--45-l)); - --50-l: var(--bulma-text-50-l); - --color-50: hsl(var(--h), var(--s), var(--50-l)); - --55-l: var(--bulma-text-55-l); - --color-55: hsl(var(--h), var(--s), var(--55-l)); - --60-l: var(--bulma-text-60-l); - --color-60: hsl(var(--h), var(--s), var(--60-l)); - --65-l: var(--bulma-text-65-l); - --color-65: hsl(var(--h), var(--s), var(--65-l)); - --70-l: var(--bulma-text-70-l); - --color-70: hsl(var(--h), var(--s), var(--70-l)); - --75-l: var(--bulma-text-75-l); - --color-75: hsl(var(--h), var(--s), var(--75-l)); - --80-l: var(--bulma-text-80-l); - --color-80: hsl(var(--h), var(--s), var(--80-l)); - --85-l: var(--bulma-text-85-l); - --color-85: hsl(var(--h), var(--s), var(--85-l)); - --90-l: var(--bulma-text-90-l); - --color-90: hsl(var(--h), var(--s), var(--90-l)); - --95-l: var(--bulma-text-95-l); - --color-95: hsl(var(--h), var(--s), var(--95-l)); - --100-l: var(--bulma-text-100-l); - --color-100: hsl(var(--h), var(--s), var(--100-l)); -} - -.has-text-primary { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l)) !important; -} - -.has-background-primary { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l)) !important; -} - -.has-text-primary-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-invert-l)) !important; -} - -.has-background-primary-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-invert-l)) !important; -} - -.has-text-primary-on-scheme { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-on-scheme-l)) !important; -} - -.has-background-primary-on-scheme { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-on-scheme-l)) !important; -} - -.has-text-primary-light { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-light-l)) !important; -} - -.has-background-primary-light { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-light-l)) !important; -} - -.has-text-primary-light-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-light-invert-l)) !important; -} - -.has-background-primary-light-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-light-invert-l)) !important; -} - -.has-text-primary-dark { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-dark-l)) !important; -} - -.has-background-primary-dark { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-dark-l)) !important; -} - -.has-text-primary-dark-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-dark-invert-l)) !important; -} - -.has-background-primary-dark-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-dark-invert-l)) !important; -} - -.has-text-primary-soft { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-soft-l)) !important; -} - -.has-background-primary-soft { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-soft-l)) !important; -} - -.has-text-primary-bold { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-bold-l)) !important; -} - -.has-background-primary-bold { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-bold-l)) !important; -} - -.has-text-primary-soft-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-soft-invert-l)) !important; -} - -.has-background-primary-soft-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-soft-invert-l)) !important; -} - -.has-text-primary-bold-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-bold-invert-l)) !important; -} - -.has-background-primary-bold-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-bold-invert-l)) !important; -} - -.has-text-primary-00 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-00-l)) !important; -} - -.has-background-primary-00 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-00-l)) !important; -} - -.has-text-primary-00-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-00-invert-l)) !important; -} - -.has-background-primary-00-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-00-invert-l)) !important; -} - -.has-text-primary-05 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-05-l)) !important; -} - -.has-background-primary-05 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-05-l)) !important; -} - -.has-text-primary-05-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-05-invert-l)) !important; -} - -.has-background-primary-05-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-05-invert-l)) !important; -} - -.has-text-primary-10 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-10-l)) !important; -} - -.has-background-primary-10 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-10-l)) !important; -} - -.has-text-primary-10-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-10-invert-l)) !important; -} - -.has-background-primary-10-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-10-invert-l)) !important; -} - -.has-text-primary-15 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-15-l)) !important; -} - -.has-background-primary-15 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-15-l)) !important; -} - -.has-text-primary-15-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-15-invert-l)) !important; -} - -.has-background-primary-15-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-15-invert-l)) !important; -} - -.has-text-primary-20 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-20-l)) !important; -} - -.has-background-primary-20 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-20-l)) !important; -} - -.has-text-primary-20-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-20-invert-l)) !important; -} - -.has-background-primary-20-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-20-invert-l)) !important; -} - -.has-text-primary-25 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-25-l)) !important; -} - -.has-background-primary-25 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-25-l)) !important; -} - -.has-text-primary-25-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-25-invert-l)) !important; -} - -.has-background-primary-25-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-25-invert-l)) !important; -} - -.has-text-primary-30 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-30-l)) !important; -} - -.has-background-primary-30 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-30-l)) !important; -} - -.has-text-primary-30-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-30-invert-l)) !important; -} - -.has-background-primary-30-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-30-invert-l)) !important; -} - -.has-text-primary-35 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-35-l)) !important; -} - -.has-background-primary-35 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-35-l)) !important; -} - -.has-text-primary-35-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-35-invert-l)) !important; -} - -.has-background-primary-35-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-35-invert-l)) !important; -} - -.has-text-primary-40 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-40-l)) !important; -} - -.has-background-primary-40 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-40-l)) !important; -} - -.has-text-primary-40-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-40-invert-l)) !important; -} - -.has-background-primary-40-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-40-invert-l)) !important; -} - -.has-text-primary-45 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-45-l)) !important; -} - -.has-background-primary-45 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-45-l)) !important; -} - -.has-text-primary-45-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-45-invert-l)) !important; -} - -.has-background-primary-45-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-45-invert-l)) !important; -} - -.has-text-primary-50 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-50-l)) !important; -} - -.has-background-primary-50 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-50-l)) !important; -} - -.has-text-primary-50-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-50-invert-l)) !important; -} - -.has-background-primary-50-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-50-invert-l)) !important; -} - -.has-text-primary-55 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-55-l)) !important; -} - -.has-background-primary-55 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-55-l)) !important; -} - -.has-text-primary-55-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-55-invert-l)) !important; -} - -.has-background-primary-55-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-55-invert-l)) !important; -} - -.has-text-primary-60 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-60-l)) !important; -} - -.has-background-primary-60 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-60-l)) !important; -} - -.has-text-primary-60-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-60-invert-l)) !important; -} - -.has-background-primary-60-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-60-invert-l)) !important; -} - -.has-text-primary-65 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-65-l)) !important; -} - -.has-background-primary-65 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-65-l)) !important; -} - -.has-text-primary-65-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-65-invert-l)) !important; -} - -.has-background-primary-65-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-65-invert-l)) !important; -} - -.has-text-primary-70 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-70-l)) !important; -} - -.has-background-primary-70 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-70-l)) !important; -} - -.has-text-primary-70-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-70-invert-l)) !important; -} - -.has-background-primary-70-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-70-invert-l)) !important; -} - -.has-text-primary-75 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-75-l)) !important; -} - -.has-background-primary-75 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-75-l)) !important; -} - -.has-text-primary-75-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-75-invert-l)) !important; -} - -.has-background-primary-75-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-75-invert-l)) !important; -} - -.has-text-primary-80 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-80-l)) !important; -} - -.has-background-primary-80 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-80-l)) !important; -} - -.has-text-primary-80-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-80-invert-l)) !important; -} - -.has-background-primary-80-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-80-invert-l)) !important; -} - -.has-text-primary-85 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-85-l)) !important; -} - -.has-background-primary-85 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-85-l)) !important; -} - -.has-text-primary-85-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-85-invert-l)) !important; -} - -.has-background-primary-85-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-85-invert-l)) !important; -} - -.has-text-primary-90 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-90-l)) !important; -} - -.has-background-primary-90 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-90-l)) !important; -} - -.has-text-primary-90-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-90-invert-l)) !important; -} - -.has-background-primary-90-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-90-invert-l)) !important; -} - -.has-text-primary-95 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-95-l)) !important; -} - -.has-background-primary-95 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-95-l)) !important; -} - -.has-text-primary-95-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-95-invert-l)) !important; -} - -.has-background-primary-95-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-95-invert-l)) !important; -} - -.has-text-primary-100 { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-100-l)) !important; -} - -.has-background-primary-100 { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-100-l)) !important; -} - -.has-text-primary-100-invert { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-100-invert-l)) !important; -} - -.has-background-primary-100-invert { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-100-invert-l)) !important; -} - -a.has-text-primary:hover, a.has-text-primary:focus-visible, -button.has-text-primary:hover, -button.has-text-primary:focus-visible, -has-text-primary.is-hoverable:hover, -has-text-primary.is-hoverable:focus-visible { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), calc(var(--bulma-primary-l) + var(--bulma-hover-color-l-delta))) !important; -} -a.has-text-primary:active, -button.has-text-primary:active, -has-text-primary.is-hoverable:active { - color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), calc(var(--bulma-primary-l) + var(--bulma-active-color-l-delta))) !important; -} - -a.has-background-primary:hover, a.has-background-primary:focus-visible, -button.has-background-primary:hover, -button.has-background-primary:focus-visible, -has-background-primary.is-hoverable:hover, -has-background-primary.is-hoverable:focus-visible { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), calc(var(--bulma-primary-l) + var(--bulma-hover-background-l-delta))) !important; -} -a.has-background-primary:active, -button.has-background-primary:active, -has-background-primary.is-hoverable:active { - background-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), calc(var(--bulma-primary-l) + var(--bulma-active-background-l-delta))) !important; -} - -.is-palette-primary { - --h: var(--bulma-primary-h); - --s: var(--bulma-primary-s); - --l: var(--bulma-primary-l); - --color: hsl(var(--h), var(--s), var(--l)); - --00-l: var(--bulma-primary-00-l); - --color-00: hsl(var(--h), var(--s), var(--00-l)); - --05-l: var(--bulma-primary-05-l); - --color-05: hsl(var(--h), var(--s), var(--05-l)); - --10-l: var(--bulma-primary-10-l); - --color-10: hsl(var(--h), var(--s), var(--10-l)); - --15-l: var(--bulma-primary-15-l); - --color-15: hsl(var(--h), var(--s), var(--15-l)); - --20-l: var(--bulma-primary-20-l); - --color-20: hsl(var(--h), var(--s), var(--20-l)); - --25-l: var(--bulma-primary-25-l); - --color-25: hsl(var(--h), var(--s), var(--25-l)); - --30-l: var(--bulma-primary-30-l); - --color-30: hsl(var(--h), var(--s), var(--30-l)); - --35-l: var(--bulma-primary-35-l); - --color-35: hsl(var(--h), var(--s), var(--35-l)); - --40-l: var(--bulma-primary-40-l); - --color-40: hsl(var(--h), var(--s), var(--40-l)); - --45-l: var(--bulma-primary-45-l); - --color-45: hsl(var(--h), var(--s), var(--45-l)); - --50-l: var(--bulma-primary-50-l); - --color-50: hsl(var(--h), var(--s), var(--50-l)); - --55-l: var(--bulma-primary-55-l); - --color-55: hsl(var(--h), var(--s), var(--55-l)); - --60-l: var(--bulma-primary-60-l); - --color-60: hsl(var(--h), var(--s), var(--60-l)); - --65-l: var(--bulma-primary-65-l); - --color-65: hsl(var(--h), var(--s), var(--65-l)); - --70-l: var(--bulma-primary-70-l); - --color-70: hsl(var(--h), var(--s), var(--70-l)); - --75-l: var(--bulma-primary-75-l); - --color-75: hsl(var(--h), var(--s), var(--75-l)); - --80-l: var(--bulma-primary-80-l); - --color-80: hsl(var(--h), var(--s), var(--80-l)); - --85-l: var(--bulma-primary-85-l); - --color-85: hsl(var(--h), var(--s), var(--85-l)); - --90-l: var(--bulma-primary-90-l); - --color-90: hsl(var(--h), var(--s), var(--90-l)); - --95-l: var(--bulma-primary-95-l); - --color-95: hsl(var(--h), var(--s), var(--95-l)); - --100-l: var(--bulma-primary-100-l); - --color-100: hsl(var(--h), var(--s), var(--100-l)); -} - -.has-text-link { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-l)) !important; -} - -.has-background-link { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-l)) !important; -} - -.has-text-link-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-invert-l)) !important; -} - -.has-background-link-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-invert-l)) !important; -} - -.has-text-link-on-scheme { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l)) !important; -} - -.has-background-link-on-scheme { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l)) !important; -} - -.has-text-link-light { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-light-l)) !important; -} - -.has-background-link-light { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-light-l)) !important; -} - -.has-text-link-light-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-light-invert-l)) !important; -} - -.has-background-link-light-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-light-invert-l)) !important; -} - -.has-text-link-dark { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-dark-l)) !important; -} - -.has-background-link-dark { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-dark-l)) !important; -} - -.has-text-link-dark-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-dark-invert-l)) !important; -} - -.has-background-link-dark-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-dark-invert-l)) !important; -} - -.has-text-link-soft { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-soft-l)) !important; -} - -.has-background-link-soft { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-soft-l)) !important; -} - -.has-text-link-bold { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-bold-l)) !important; -} - -.has-background-link-bold { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-bold-l)) !important; -} - -.has-text-link-soft-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-soft-invert-l)) !important; -} - -.has-background-link-soft-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-soft-invert-l)) !important; -} - -.has-text-link-bold-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-bold-invert-l)) !important; -} - -.has-background-link-bold-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-bold-invert-l)) !important; -} - -.has-text-link-00 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-00-l)) !important; -} - -.has-background-link-00 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-00-l)) !important; -} - -.has-text-link-00-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-00-invert-l)) !important; -} - -.has-background-link-00-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-00-invert-l)) !important; -} - -.has-text-link-05 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-05-l)) !important; -} - -.has-background-link-05 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-05-l)) !important; -} - -.has-text-link-05-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-05-invert-l)) !important; -} - -.has-background-link-05-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-05-invert-l)) !important; -} - -.has-text-link-10 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-10-l)) !important; -} - -.has-background-link-10 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-10-l)) !important; -} - -.has-text-link-10-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-10-invert-l)) !important; -} - -.has-background-link-10-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-10-invert-l)) !important; -} - -.has-text-link-15 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-15-l)) !important; -} - -.has-background-link-15 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-15-l)) !important; -} - -.has-text-link-15-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-15-invert-l)) !important; -} - -.has-background-link-15-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-15-invert-l)) !important; -} - -.has-text-link-20 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-20-l)) !important; -} - -.has-background-link-20 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-20-l)) !important; -} - -.has-text-link-20-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-20-invert-l)) !important; -} - -.has-background-link-20-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-20-invert-l)) !important; -} - -.has-text-link-25 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-25-l)) !important; -} - -.has-background-link-25 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-25-l)) !important; -} - -.has-text-link-25-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-25-invert-l)) !important; -} - -.has-background-link-25-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-25-invert-l)) !important; -} - -.has-text-link-30 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-30-l)) !important; -} - -.has-background-link-30 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-30-l)) !important; -} - -.has-text-link-30-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-30-invert-l)) !important; -} - -.has-background-link-30-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-30-invert-l)) !important; -} - -.has-text-link-35 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-35-l)) !important; -} - -.has-background-link-35 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-35-l)) !important; -} - -.has-text-link-35-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-35-invert-l)) !important; -} - -.has-background-link-35-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-35-invert-l)) !important; -} - -.has-text-link-40 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-40-l)) !important; -} - -.has-background-link-40 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-40-l)) !important; -} - -.has-text-link-40-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-40-invert-l)) !important; -} - -.has-background-link-40-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-40-invert-l)) !important; -} - -.has-text-link-45 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-45-l)) !important; -} - -.has-background-link-45 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-45-l)) !important; -} - -.has-text-link-45-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-45-invert-l)) !important; -} - -.has-background-link-45-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-45-invert-l)) !important; -} - -.has-text-link-50 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-50-l)) !important; -} - -.has-background-link-50 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-50-l)) !important; -} - -.has-text-link-50-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-50-invert-l)) !important; -} - -.has-background-link-50-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-50-invert-l)) !important; -} - -.has-text-link-55 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-55-l)) !important; -} - -.has-background-link-55 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-55-l)) !important; -} - -.has-text-link-55-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-55-invert-l)) !important; -} - -.has-background-link-55-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-55-invert-l)) !important; -} - -.has-text-link-60 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-60-l)) !important; -} - -.has-background-link-60 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-60-l)) !important; -} - -.has-text-link-60-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-60-invert-l)) !important; -} - -.has-background-link-60-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-60-invert-l)) !important; -} - -.has-text-link-65 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-65-l)) !important; -} - -.has-background-link-65 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-65-l)) !important; -} - -.has-text-link-65-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-65-invert-l)) !important; -} - -.has-background-link-65-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-65-invert-l)) !important; -} - -.has-text-link-70 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-70-l)) !important; -} - -.has-background-link-70 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-70-l)) !important; -} - -.has-text-link-70-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-70-invert-l)) !important; -} - -.has-background-link-70-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-70-invert-l)) !important; -} - -.has-text-link-75 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-75-l)) !important; -} - -.has-background-link-75 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-75-l)) !important; -} - -.has-text-link-75-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-75-invert-l)) !important; -} - -.has-background-link-75-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-75-invert-l)) !important; -} - -.has-text-link-80 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-80-l)) !important; -} - -.has-background-link-80 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-80-l)) !important; -} - -.has-text-link-80-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-80-invert-l)) !important; -} - -.has-background-link-80-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-80-invert-l)) !important; -} - -.has-text-link-85 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-85-l)) !important; -} - -.has-background-link-85 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-85-l)) !important; -} - -.has-text-link-85-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-85-invert-l)) !important; -} - -.has-background-link-85-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-85-invert-l)) !important; -} - -.has-text-link-90 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-90-l)) !important; -} - -.has-background-link-90 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-90-l)) !important; -} - -.has-text-link-90-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-90-invert-l)) !important; -} - -.has-background-link-90-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-90-invert-l)) !important; -} - -.has-text-link-95 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-95-l)) !important; -} - -.has-background-link-95 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-95-l)) !important; -} - -.has-text-link-95-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-95-invert-l)) !important; -} - -.has-background-link-95-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-95-invert-l)) !important; -} - -.has-text-link-100 { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-100-l)) !important; -} - -.has-background-link-100 { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-100-l)) !important; -} - -.has-text-link-100-invert { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-100-invert-l)) !important; -} - -.has-background-link-100-invert { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-100-invert-l)) !important; -} - -a.has-text-link:hover, a.has-text-link:focus-visible, -button.has-text-link:hover, -button.has-text-link:focus-visible, -has-text-link.is-hoverable:hover, -has-text-link.is-hoverable:focus-visible { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), calc(var(--bulma-link-l) + var(--bulma-hover-color-l-delta))) !important; -} -a.has-text-link:active, -button.has-text-link:active, -has-text-link.is-hoverable:active { - color: hsl(var(--bulma-link-h), var(--bulma-link-s), calc(var(--bulma-link-l) + var(--bulma-active-color-l-delta))) !important; -} - -a.has-background-link:hover, a.has-background-link:focus-visible, -button.has-background-link:hover, -button.has-background-link:focus-visible, -has-background-link.is-hoverable:hover, -has-background-link.is-hoverable:focus-visible { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), calc(var(--bulma-link-l) + var(--bulma-hover-background-l-delta))) !important; -} -a.has-background-link:active, -button.has-background-link:active, -has-background-link.is-hoverable:active { - background-color: hsl(var(--bulma-link-h), var(--bulma-link-s), calc(var(--bulma-link-l) + var(--bulma-active-background-l-delta))) !important; -} - -.is-palette-link { - --h: var(--bulma-link-h); - --s: var(--bulma-link-s); - --l: var(--bulma-link-l); - --color: hsl(var(--h), var(--s), var(--l)); - --00-l: var(--bulma-link-00-l); - --color-00: hsl(var(--h), var(--s), var(--00-l)); - --05-l: var(--bulma-link-05-l); - --color-05: hsl(var(--h), var(--s), var(--05-l)); - --10-l: var(--bulma-link-10-l); - --color-10: hsl(var(--h), var(--s), var(--10-l)); - --15-l: var(--bulma-link-15-l); - --color-15: hsl(var(--h), var(--s), var(--15-l)); - --20-l: var(--bulma-link-20-l); - --color-20: hsl(var(--h), var(--s), var(--20-l)); - --25-l: var(--bulma-link-25-l); - --color-25: hsl(var(--h), var(--s), var(--25-l)); - --30-l: var(--bulma-link-30-l); - --color-30: hsl(var(--h), var(--s), var(--30-l)); - --35-l: var(--bulma-link-35-l); - --color-35: hsl(var(--h), var(--s), var(--35-l)); - --40-l: var(--bulma-link-40-l); - --color-40: hsl(var(--h), var(--s), var(--40-l)); - --45-l: var(--bulma-link-45-l); - --color-45: hsl(var(--h), var(--s), var(--45-l)); - --50-l: var(--bulma-link-50-l); - --color-50: hsl(var(--h), var(--s), var(--50-l)); - --55-l: var(--bulma-link-55-l); - --color-55: hsl(var(--h), var(--s), var(--55-l)); - --60-l: var(--bulma-link-60-l); - --color-60: hsl(var(--h), var(--s), var(--60-l)); - --65-l: var(--bulma-link-65-l); - --color-65: hsl(var(--h), var(--s), var(--65-l)); - --70-l: var(--bulma-link-70-l); - --color-70: hsl(var(--h), var(--s), var(--70-l)); - --75-l: var(--bulma-link-75-l); - --color-75: hsl(var(--h), var(--s), var(--75-l)); - --80-l: var(--bulma-link-80-l); - --color-80: hsl(var(--h), var(--s), var(--80-l)); - --85-l: var(--bulma-link-85-l); - --color-85: hsl(var(--h), var(--s), var(--85-l)); - --90-l: var(--bulma-link-90-l); - --color-90: hsl(var(--h), var(--s), var(--90-l)); - --95-l: var(--bulma-link-95-l); - --color-95: hsl(var(--h), var(--s), var(--95-l)); - --100-l: var(--bulma-link-100-l); - --color-100: hsl(var(--h), var(--s), var(--100-l)); -} - -.has-text-info { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-l)) !important; -} - -.has-background-info { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-l)) !important; -} - -.has-text-info-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-invert-l)) !important; -} - -.has-background-info-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-invert-l)) !important; -} - -.has-text-info-on-scheme { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-on-scheme-l)) !important; -} - -.has-background-info-on-scheme { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-on-scheme-l)) !important; -} - -.has-text-info-light { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-light-l)) !important; -} - -.has-background-info-light { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-light-l)) !important; -} - -.has-text-info-light-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-light-invert-l)) !important; -} - -.has-background-info-light-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-light-invert-l)) !important; -} - -.has-text-info-dark { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-dark-l)) !important; -} - -.has-background-info-dark { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-dark-l)) !important; -} - -.has-text-info-dark-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-dark-invert-l)) !important; -} - -.has-background-info-dark-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-dark-invert-l)) !important; -} - -.has-text-info-soft { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-soft-l)) !important; -} - -.has-background-info-soft { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-soft-l)) !important; -} - -.has-text-info-bold { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-bold-l)) !important; -} - -.has-background-info-bold { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-bold-l)) !important; -} - -.has-text-info-soft-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-soft-invert-l)) !important; -} - -.has-background-info-soft-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-soft-invert-l)) !important; -} - -.has-text-info-bold-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-bold-invert-l)) !important; -} - -.has-background-info-bold-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-bold-invert-l)) !important; -} - -.has-text-info-00 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-00-l)) !important; -} - -.has-background-info-00 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-00-l)) !important; -} - -.has-text-info-00-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-00-invert-l)) !important; -} - -.has-background-info-00-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-00-invert-l)) !important; -} - -.has-text-info-05 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-05-l)) !important; -} - -.has-background-info-05 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-05-l)) !important; -} - -.has-text-info-05-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-05-invert-l)) !important; -} - -.has-background-info-05-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-05-invert-l)) !important; -} - -.has-text-info-10 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-10-l)) !important; -} - -.has-background-info-10 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-10-l)) !important; -} - -.has-text-info-10-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-10-invert-l)) !important; -} - -.has-background-info-10-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-10-invert-l)) !important; -} - -.has-text-info-15 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-15-l)) !important; -} - -.has-background-info-15 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-15-l)) !important; -} - -.has-text-info-15-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-15-invert-l)) !important; -} - -.has-background-info-15-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-15-invert-l)) !important; -} - -.has-text-info-20 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-20-l)) !important; -} - -.has-background-info-20 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-20-l)) !important; -} - -.has-text-info-20-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-20-invert-l)) !important; -} - -.has-background-info-20-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-20-invert-l)) !important; -} - -.has-text-info-25 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-25-l)) !important; -} - -.has-background-info-25 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-25-l)) !important; -} - -.has-text-info-25-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-25-invert-l)) !important; -} - -.has-background-info-25-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-25-invert-l)) !important; -} - -.has-text-info-30 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-30-l)) !important; -} - -.has-background-info-30 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-30-l)) !important; -} - -.has-text-info-30-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-30-invert-l)) !important; -} - -.has-background-info-30-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-30-invert-l)) !important; -} - -.has-text-info-35 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-35-l)) !important; -} - -.has-background-info-35 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-35-l)) !important; -} - -.has-text-info-35-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-35-invert-l)) !important; -} - -.has-background-info-35-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-35-invert-l)) !important; -} - -.has-text-info-40 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-40-l)) !important; -} - -.has-background-info-40 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-40-l)) !important; -} - -.has-text-info-40-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-40-invert-l)) !important; -} - -.has-background-info-40-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-40-invert-l)) !important; -} - -.has-text-info-45 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-45-l)) !important; -} - -.has-background-info-45 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-45-l)) !important; -} - -.has-text-info-45-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-45-invert-l)) !important; -} - -.has-background-info-45-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-45-invert-l)) !important; -} - -.has-text-info-50 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-50-l)) !important; -} - -.has-background-info-50 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-50-l)) !important; -} - -.has-text-info-50-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-50-invert-l)) !important; -} - -.has-background-info-50-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-50-invert-l)) !important; -} - -.has-text-info-55 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-55-l)) !important; -} - -.has-background-info-55 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-55-l)) !important; -} - -.has-text-info-55-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-55-invert-l)) !important; -} - -.has-background-info-55-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-55-invert-l)) !important; -} - -.has-text-info-60 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-60-l)) !important; -} - -.has-background-info-60 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-60-l)) !important; -} - -.has-text-info-60-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-60-invert-l)) !important; -} - -.has-background-info-60-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-60-invert-l)) !important; -} - -.has-text-info-65 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-65-l)) !important; -} - -.has-background-info-65 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-65-l)) !important; -} - -.has-text-info-65-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-65-invert-l)) !important; -} - -.has-background-info-65-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-65-invert-l)) !important; -} - -.has-text-info-70 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-70-l)) !important; -} - -.has-background-info-70 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-70-l)) !important; -} - -.has-text-info-70-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-70-invert-l)) !important; -} - -.has-background-info-70-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-70-invert-l)) !important; -} - -.has-text-info-75 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-75-l)) !important; -} - -.has-background-info-75 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-75-l)) !important; -} - -.has-text-info-75-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-75-invert-l)) !important; -} - -.has-background-info-75-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-75-invert-l)) !important; -} - -.has-text-info-80 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-80-l)) !important; -} - -.has-background-info-80 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-80-l)) !important; -} - -.has-text-info-80-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-80-invert-l)) !important; -} - -.has-background-info-80-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-80-invert-l)) !important; -} - -.has-text-info-85 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-85-l)) !important; -} - -.has-background-info-85 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-85-l)) !important; -} - -.has-text-info-85-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-85-invert-l)) !important; -} - -.has-background-info-85-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-85-invert-l)) !important; -} - -.has-text-info-90 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-90-l)) !important; -} - -.has-background-info-90 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-90-l)) !important; -} - -.has-text-info-90-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-90-invert-l)) !important; -} - -.has-background-info-90-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-90-invert-l)) !important; -} - -.has-text-info-95 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-95-l)) !important; -} - -.has-background-info-95 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-95-l)) !important; -} - -.has-text-info-95-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-95-invert-l)) !important; -} - -.has-background-info-95-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-95-invert-l)) !important; -} - -.has-text-info-100 { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-100-l)) !important; -} - -.has-background-info-100 { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-100-l)) !important; -} - -.has-text-info-100-invert { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-100-invert-l)) !important; -} - -.has-background-info-100-invert { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-100-invert-l)) !important; -} - -a.has-text-info:hover, a.has-text-info:focus-visible, -button.has-text-info:hover, -button.has-text-info:focus-visible, -has-text-info.is-hoverable:hover, -has-text-info.is-hoverable:focus-visible { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), calc(var(--bulma-info-l) + var(--bulma-hover-color-l-delta))) !important; -} -a.has-text-info:active, -button.has-text-info:active, -has-text-info.is-hoverable:active { - color: hsl(var(--bulma-info-h), var(--bulma-info-s), calc(var(--bulma-info-l) + var(--bulma-active-color-l-delta))) !important; -} - -a.has-background-info:hover, a.has-background-info:focus-visible, -button.has-background-info:hover, -button.has-background-info:focus-visible, -has-background-info.is-hoverable:hover, -has-background-info.is-hoverable:focus-visible { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), calc(var(--bulma-info-l) + var(--bulma-hover-background-l-delta))) !important; -} -a.has-background-info:active, -button.has-background-info:active, -has-background-info.is-hoverable:active { - background-color: hsl(var(--bulma-info-h), var(--bulma-info-s), calc(var(--bulma-info-l) + var(--bulma-active-background-l-delta))) !important; -} - -.is-palette-info { - --h: var(--bulma-info-h); - --s: var(--bulma-info-s); - --l: var(--bulma-info-l); - --color: hsl(var(--h), var(--s), var(--l)); - --00-l: var(--bulma-info-00-l); - --color-00: hsl(var(--h), var(--s), var(--00-l)); - --05-l: var(--bulma-info-05-l); - --color-05: hsl(var(--h), var(--s), var(--05-l)); - --10-l: var(--bulma-info-10-l); - --color-10: hsl(var(--h), var(--s), var(--10-l)); - --15-l: var(--bulma-info-15-l); - --color-15: hsl(var(--h), var(--s), var(--15-l)); - --20-l: var(--bulma-info-20-l); - --color-20: hsl(var(--h), var(--s), var(--20-l)); - --25-l: var(--bulma-info-25-l); - --color-25: hsl(var(--h), var(--s), var(--25-l)); - --30-l: var(--bulma-info-30-l); - --color-30: hsl(var(--h), var(--s), var(--30-l)); - --35-l: var(--bulma-info-35-l); - --color-35: hsl(var(--h), var(--s), var(--35-l)); - --40-l: var(--bulma-info-40-l); - --color-40: hsl(var(--h), var(--s), var(--40-l)); - --45-l: var(--bulma-info-45-l); - --color-45: hsl(var(--h), var(--s), var(--45-l)); - --50-l: var(--bulma-info-50-l); - --color-50: hsl(var(--h), var(--s), var(--50-l)); - --55-l: var(--bulma-info-55-l); - --color-55: hsl(var(--h), var(--s), var(--55-l)); - --60-l: var(--bulma-info-60-l); - --color-60: hsl(var(--h), var(--s), var(--60-l)); - --65-l: var(--bulma-info-65-l); - --color-65: hsl(var(--h), var(--s), var(--65-l)); - --70-l: var(--bulma-info-70-l); - --color-70: hsl(var(--h), var(--s), var(--70-l)); - --75-l: var(--bulma-info-75-l); - --color-75: hsl(var(--h), var(--s), var(--75-l)); - --80-l: var(--bulma-info-80-l); - --color-80: hsl(var(--h), var(--s), var(--80-l)); - --85-l: var(--bulma-info-85-l); - --color-85: hsl(var(--h), var(--s), var(--85-l)); - --90-l: var(--bulma-info-90-l); - --color-90: hsl(var(--h), var(--s), var(--90-l)); - --95-l: var(--bulma-info-95-l); - --color-95: hsl(var(--h), var(--s), var(--95-l)); - --100-l: var(--bulma-info-100-l); - --color-100: hsl(var(--h), var(--s), var(--100-l)); -} - -.has-text-success { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-l)) !important; -} - -.has-background-success { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-l)) !important; -} - -.has-text-success-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-invert-l)) !important; -} - -.has-background-success-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-invert-l)) !important; -} - -.has-text-success-on-scheme { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-on-scheme-l)) !important; -} - -.has-background-success-on-scheme { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-on-scheme-l)) !important; -} - -.has-text-success-light { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-light-l)) !important; -} - -.has-background-success-light { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-light-l)) !important; -} - -.has-text-success-light-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-light-invert-l)) !important; -} - -.has-background-success-light-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-light-invert-l)) !important; -} - -.has-text-success-dark { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-dark-l)) !important; -} - -.has-background-success-dark { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-dark-l)) !important; -} - -.has-text-success-dark-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-dark-invert-l)) !important; -} - -.has-background-success-dark-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-dark-invert-l)) !important; -} - -.has-text-success-soft { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-soft-l)) !important; -} - -.has-background-success-soft { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-soft-l)) !important; -} - -.has-text-success-bold { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-bold-l)) !important; -} - -.has-background-success-bold { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-bold-l)) !important; -} - -.has-text-success-soft-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-soft-invert-l)) !important; -} - -.has-background-success-soft-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-soft-invert-l)) !important; -} - -.has-text-success-bold-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-bold-invert-l)) !important; -} - -.has-background-success-bold-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-bold-invert-l)) !important; -} - -.has-text-success-00 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-00-l)) !important; -} - -.has-background-success-00 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-00-l)) !important; -} - -.has-text-success-00-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-00-invert-l)) !important; -} - -.has-background-success-00-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-00-invert-l)) !important; -} - -.has-text-success-05 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-05-l)) !important; -} - -.has-background-success-05 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-05-l)) !important; -} - -.has-text-success-05-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-05-invert-l)) !important; -} - -.has-background-success-05-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-05-invert-l)) !important; -} - -.has-text-success-10 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-10-l)) !important; -} - -.has-background-success-10 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-10-l)) !important; -} - -.has-text-success-10-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-10-invert-l)) !important; -} - -.has-background-success-10-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-10-invert-l)) !important; -} - -.has-text-success-15 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-15-l)) !important; -} - -.has-background-success-15 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-15-l)) !important; -} - -.has-text-success-15-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-15-invert-l)) !important; -} - -.has-background-success-15-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-15-invert-l)) !important; -} - -.has-text-success-20 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-20-l)) !important; -} - -.has-background-success-20 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-20-l)) !important; -} - -.has-text-success-20-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-20-invert-l)) !important; -} - -.has-background-success-20-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-20-invert-l)) !important; -} - -.has-text-success-25 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-25-l)) !important; -} - -.has-background-success-25 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-25-l)) !important; -} - -.has-text-success-25-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-25-invert-l)) !important; -} - -.has-background-success-25-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-25-invert-l)) !important; -} - -.has-text-success-30 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-30-l)) !important; -} - -.has-background-success-30 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-30-l)) !important; -} - -.has-text-success-30-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-30-invert-l)) !important; -} - -.has-background-success-30-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-30-invert-l)) !important; -} - -.has-text-success-35 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-35-l)) !important; -} - -.has-background-success-35 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-35-l)) !important; -} - -.has-text-success-35-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-35-invert-l)) !important; -} - -.has-background-success-35-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-35-invert-l)) !important; -} - -.has-text-success-40 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-40-l)) !important; -} - -.has-background-success-40 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-40-l)) !important; -} - -.has-text-success-40-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-40-invert-l)) !important; -} - -.has-background-success-40-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-40-invert-l)) !important; -} - -.has-text-success-45 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-45-l)) !important; -} - -.has-background-success-45 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-45-l)) !important; -} - -.has-text-success-45-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-45-invert-l)) !important; -} - -.has-background-success-45-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-45-invert-l)) !important; -} - -.has-text-success-50 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-50-l)) !important; -} - -.has-background-success-50 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-50-l)) !important; -} - -.has-text-success-50-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-50-invert-l)) !important; -} - -.has-background-success-50-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-50-invert-l)) !important; -} - -.has-text-success-55 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-55-l)) !important; -} - -.has-background-success-55 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-55-l)) !important; -} - -.has-text-success-55-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-55-invert-l)) !important; -} - -.has-background-success-55-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-55-invert-l)) !important; -} - -.has-text-success-60 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-60-l)) !important; -} - -.has-background-success-60 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-60-l)) !important; -} - -.has-text-success-60-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-60-invert-l)) !important; -} - -.has-background-success-60-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-60-invert-l)) !important; -} - -.has-text-success-65 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-65-l)) !important; -} - -.has-background-success-65 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-65-l)) !important; -} - -.has-text-success-65-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-65-invert-l)) !important; -} - -.has-background-success-65-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-65-invert-l)) !important; -} - -.has-text-success-70 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-70-l)) !important; -} - -.has-background-success-70 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-70-l)) !important; -} - -.has-text-success-70-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-70-invert-l)) !important; -} - -.has-background-success-70-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-70-invert-l)) !important; -} - -.has-text-success-75 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-75-l)) !important; -} - -.has-background-success-75 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-75-l)) !important; -} - -.has-text-success-75-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-75-invert-l)) !important; -} - -.has-background-success-75-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-75-invert-l)) !important; -} - -.has-text-success-80 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-80-l)) !important; -} - -.has-background-success-80 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-80-l)) !important; -} - -.has-text-success-80-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-80-invert-l)) !important; -} - -.has-background-success-80-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-80-invert-l)) !important; -} - -.has-text-success-85 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-85-l)) !important; -} - -.has-background-success-85 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-85-l)) !important; -} - -.has-text-success-85-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-85-invert-l)) !important; -} - -.has-background-success-85-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-85-invert-l)) !important; -} - -.has-text-success-90 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-90-l)) !important; -} - -.has-background-success-90 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-90-l)) !important; -} - -.has-text-success-90-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-90-invert-l)) !important; -} - -.has-background-success-90-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-90-invert-l)) !important; -} - -.has-text-success-95 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-95-l)) !important; -} - -.has-background-success-95 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-95-l)) !important; -} - -.has-text-success-95-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-95-invert-l)) !important; -} - -.has-background-success-95-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-95-invert-l)) !important; -} - -.has-text-success-100 { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-100-l)) !important; -} - -.has-background-success-100 { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-100-l)) !important; -} - -.has-text-success-100-invert { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-100-invert-l)) !important; -} - -.has-background-success-100-invert { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-100-invert-l)) !important; -} - -a.has-text-success:hover, a.has-text-success:focus-visible, -button.has-text-success:hover, -button.has-text-success:focus-visible, -has-text-success.is-hoverable:hover, -has-text-success.is-hoverable:focus-visible { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), calc(var(--bulma-success-l) + var(--bulma-hover-color-l-delta))) !important; -} -a.has-text-success:active, -button.has-text-success:active, -has-text-success.is-hoverable:active { - color: hsl(var(--bulma-success-h), var(--bulma-success-s), calc(var(--bulma-success-l) + var(--bulma-active-color-l-delta))) !important; -} - -a.has-background-success:hover, a.has-background-success:focus-visible, -button.has-background-success:hover, -button.has-background-success:focus-visible, -has-background-success.is-hoverable:hover, -has-background-success.is-hoverable:focus-visible { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), calc(var(--bulma-success-l) + var(--bulma-hover-background-l-delta))) !important; -} -a.has-background-success:active, -button.has-background-success:active, -has-background-success.is-hoverable:active { - background-color: hsl(var(--bulma-success-h), var(--bulma-success-s), calc(var(--bulma-success-l) + var(--bulma-active-background-l-delta))) !important; -} - -.is-palette-success { - --h: var(--bulma-success-h); - --s: var(--bulma-success-s); - --l: var(--bulma-success-l); - --color: hsl(var(--h), var(--s), var(--l)); - --00-l: var(--bulma-success-00-l); - --color-00: hsl(var(--h), var(--s), var(--00-l)); - --05-l: var(--bulma-success-05-l); - --color-05: hsl(var(--h), var(--s), var(--05-l)); - --10-l: var(--bulma-success-10-l); - --color-10: hsl(var(--h), var(--s), var(--10-l)); - --15-l: var(--bulma-success-15-l); - --color-15: hsl(var(--h), var(--s), var(--15-l)); - --20-l: var(--bulma-success-20-l); - --color-20: hsl(var(--h), var(--s), var(--20-l)); - --25-l: var(--bulma-success-25-l); - --color-25: hsl(var(--h), var(--s), var(--25-l)); - --30-l: var(--bulma-success-30-l); - --color-30: hsl(var(--h), var(--s), var(--30-l)); - --35-l: var(--bulma-success-35-l); - --color-35: hsl(var(--h), var(--s), var(--35-l)); - --40-l: var(--bulma-success-40-l); - --color-40: hsl(var(--h), var(--s), var(--40-l)); - --45-l: var(--bulma-success-45-l); - --color-45: hsl(var(--h), var(--s), var(--45-l)); - --50-l: var(--bulma-success-50-l); - --color-50: hsl(var(--h), var(--s), var(--50-l)); - --55-l: var(--bulma-success-55-l); - --color-55: hsl(var(--h), var(--s), var(--55-l)); - --60-l: var(--bulma-success-60-l); - --color-60: hsl(var(--h), var(--s), var(--60-l)); - --65-l: var(--bulma-success-65-l); - --color-65: hsl(var(--h), var(--s), var(--65-l)); - --70-l: var(--bulma-success-70-l); - --color-70: hsl(var(--h), var(--s), var(--70-l)); - --75-l: var(--bulma-success-75-l); - --color-75: hsl(var(--h), var(--s), var(--75-l)); - --80-l: var(--bulma-success-80-l); - --color-80: hsl(var(--h), var(--s), var(--80-l)); - --85-l: var(--bulma-success-85-l); - --color-85: hsl(var(--h), var(--s), var(--85-l)); - --90-l: var(--bulma-success-90-l); - --color-90: hsl(var(--h), var(--s), var(--90-l)); - --95-l: var(--bulma-success-95-l); - --color-95: hsl(var(--h), var(--s), var(--95-l)); - --100-l: var(--bulma-success-100-l); - --color-100: hsl(var(--h), var(--s), var(--100-l)); -} - -.has-text-warning { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-l)) !important; -} - -.has-background-warning { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-l)) !important; -} - -.has-text-warning-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-invert-l)) !important; -} - -.has-background-warning-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-invert-l)) !important; -} - -.has-text-warning-on-scheme { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-on-scheme-l)) !important; -} - -.has-background-warning-on-scheme { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-on-scheme-l)) !important; -} - -.has-text-warning-light { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-light-l)) !important; -} - -.has-background-warning-light { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-light-l)) !important; -} - -.has-text-warning-light-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-light-invert-l)) !important; -} - -.has-background-warning-light-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-light-invert-l)) !important; -} - -.has-text-warning-dark { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-dark-l)) !important; -} - -.has-background-warning-dark { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-dark-l)) !important; -} - -.has-text-warning-dark-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-dark-invert-l)) !important; -} - -.has-background-warning-dark-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-dark-invert-l)) !important; -} - -.has-text-warning-soft { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-soft-l)) !important; -} - -.has-background-warning-soft { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-soft-l)) !important; -} - -.has-text-warning-bold { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-bold-l)) !important; -} - -.has-background-warning-bold { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-bold-l)) !important; -} - -.has-text-warning-soft-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-soft-invert-l)) !important; -} - -.has-background-warning-soft-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-soft-invert-l)) !important; -} - -.has-text-warning-bold-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-bold-invert-l)) !important; -} - -.has-background-warning-bold-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-bold-invert-l)) !important; -} - -.has-text-warning-00 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-00-l)) !important; -} - -.has-background-warning-00 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-00-l)) !important; -} - -.has-text-warning-00-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-00-invert-l)) !important; -} - -.has-background-warning-00-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-00-invert-l)) !important; -} - -.has-text-warning-05 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-05-l)) !important; -} - -.has-background-warning-05 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-05-l)) !important; -} - -.has-text-warning-05-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-05-invert-l)) !important; -} - -.has-background-warning-05-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-05-invert-l)) !important; -} - -.has-text-warning-10 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-10-l)) !important; -} - -.has-background-warning-10 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-10-l)) !important; -} - -.has-text-warning-10-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-10-invert-l)) !important; -} - -.has-background-warning-10-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-10-invert-l)) !important; -} - -.has-text-warning-15 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-15-l)) !important; -} - -.has-background-warning-15 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-15-l)) !important; -} - -.has-text-warning-15-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-15-invert-l)) !important; -} - -.has-background-warning-15-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-15-invert-l)) !important; -} - -.has-text-warning-20 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-20-l)) !important; -} - -.has-background-warning-20 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-20-l)) !important; -} - -.has-text-warning-20-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-20-invert-l)) !important; -} - -.has-background-warning-20-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-20-invert-l)) !important; -} - -.has-text-warning-25 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-25-l)) !important; -} - -.has-background-warning-25 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-25-l)) !important; -} - -.has-text-warning-25-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-25-invert-l)) !important; -} - -.has-background-warning-25-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-25-invert-l)) !important; -} - -.has-text-warning-30 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-30-l)) !important; -} - -.has-background-warning-30 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-30-l)) !important; -} - -.has-text-warning-30-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-30-invert-l)) !important; -} - -.has-background-warning-30-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-30-invert-l)) !important; -} - -.has-text-warning-35 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-35-l)) !important; -} - -.has-background-warning-35 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-35-l)) !important; -} - -.has-text-warning-35-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-35-invert-l)) !important; -} - -.has-background-warning-35-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-35-invert-l)) !important; -} - -.has-text-warning-40 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-40-l)) !important; -} - -.has-background-warning-40 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-40-l)) !important; -} - -.has-text-warning-40-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-40-invert-l)) !important; -} - -.has-background-warning-40-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-40-invert-l)) !important; -} - -.has-text-warning-45 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-45-l)) !important; -} - -.has-background-warning-45 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-45-l)) !important; -} - -.has-text-warning-45-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-45-invert-l)) !important; -} - -.has-background-warning-45-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-45-invert-l)) !important; -} - -.has-text-warning-50 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-50-l)) !important; -} - -.has-background-warning-50 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-50-l)) !important; -} - -.has-text-warning-50-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-50-invert-l)) !important; -} - -.has-background-warning-50-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-50-invert-l)) !important; -} - -.has-text-warning-55 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-55-l)) !important; -} - -.has-background-warning-55 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-55-l)) !important; -} - -.has-text-warning-55-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-55-invert-l)) !important; -} - -.has-background-warning-55-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-55-invert-l)) !important; -} - -.has-text-warning-60 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-60-l)) !important; -} - -.has-background-warning-60 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-60-l)) !important; -} - -.has-text-warning-60-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-60-invert-l)) !important; -} - -.has-background-warning-60-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-60-invert-l)) !important; -} - -.has-text-warning-65 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-65-l)) !important; -} - -.has-background-warning-65 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-65-l)) !important; -} - -.has-text-warning-65-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-65-invert-l)) !important; -} - -.has-background-warning-65-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-65-invert-l)) !important; -} - -.has-text-warning-70 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-70-l)) !important; -} - -.has-background-warning-70 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-70-l)) !important; -} - -.has-text-warning-70-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-70-invert-l)) !important; -} - -.has-background-warning-70-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-70-invert-l)) !important; -} - -.has-text-warning-75 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-75-l)) !important; -} - -.has-background-warning-75 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-75-l)) !important; -} - -.has-text-warning-75-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-75-invert-l)) !important; -} - -.has-background-warning-75-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-75-invert-l)) !important; -} - -.has-text-warning-80 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-80-l)) !important; -} - -.has-background-warning-80 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-80-l)) !important; -} - -.has-text-warning-80-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-80-invert-l)) !important; -} - -.has-background-warning-80-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-80-invert-l)) !important; -} - -.has-text-warning-85 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-85-l)) !important; -} - -.has-background-warning-85 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-85-l)) !important; -} - -.has-text-warning-85-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-85-invert-l)) !important; -} - -.has-background-warning-85-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-85-invert-l)) !important; -} - -.has-text-warning-90 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-90-l)) !important; -} - -.has-background-warning-90 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-90-l)) !important; -} - -.has-text-warning-90-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-90-invert-l)) !important; -} - -.has-background-warning-90-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-90-invert-l)) !important; -} - -.has-text-warning-95 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-95-l)) !important; -} - -.has-background-warning-95 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-95-l)) !important; -} - -.has-text-warning-95-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-95-invert-l)) !important; -} - -.has-background-warning-95-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-95-invert-l)) !important; -} - -.has-text-warning-100 { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-100-l)) !important; -} - -.has-background-warning-100 { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-100-l)) !important; -} - -.has-text-warning-100-invert { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-100-invert-l)) !important; -} - -.has-background-warning-100-invert { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-100-invert-l)) !important; -} - -a.has-text-warning:hover, a.has-text-warning:focus-visible, -button.has-text-warning:hover, -button.has-text-warning:focus-visible, -has-text-warning.is-hoverable:hover, -has-text-warning.is-hoverable:focus-visible { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), calc(var(--bulma-warning-l) + var(--bulma-hover-color-l-delta))) !important; -} -a.has-text-warning:active, -button.has-text-warning:active, -has-text-warning.is-hoverable:active { - color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), calc(var(--bulma-warning-l) + var(--bulma-active-color-l-delta))) !important; -} - -a.has-background-warning:hover, a.has-background-warning:focus-visible, -button.has-background-warning:hover, -button.has-background-warning:focus-visible, -has-background-warning.is-hoverable:hover, -has-background-warning.is-hoverable:focus-visible { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), calc(var(--bulma-warning-l) + var(--bulma-hover-background-l-delta))) !important; -} -a.has-background-warning:active, -button.has-background-warning:active, -has-background-warning.is-hoverable:active { - background-color: hsl(var(--bulma-warning-h), var(--bulma-warning-s), calc(var(--bulma-warning-l) + var(--bulma-active-background-l-delta))) !important; -} - -.is-palette-warning { - --h: var(--bulma-warning-h); - --s: var(--bulma-warning-s); - --l: var(--bulma-warning-l); - --color: hsl(var(--h), var(--s), var(--l)); - --00-l: var(--bulma-warning-00-l); - --color-00: hsl(var(--h), var(--s), var(--00-l)); - --05-l: var(--bulma-warning-05-l); - --color-05: hsl(var(--h), var(--s), var(--05-l)); - --10-l: var(--bulma-warning-10-l); - --color-10: hsl(var(--h), var(--s), var(--10-l)); - --15-l: var(--bulma-warning-15-l); - --color-15: hsl(var(--h), var(--s), var(--15-l)); - --20-l: var(--bulma-warning-20-l); - --color-20: hsl(var(--h), var(--s), var(--20-l)); - --25-l: var(--bulma-warning-25-l); - --color-25: hsl(var(--h), var(--s), var(--25-l)); - --30-l: var(--bulma-warning-30-l); - --color-30: hsl(var(--h), var(--s), var(--30-l)); - --35-l: var(--bulma-warning-35-l); - --color-35: hsl(var(--h), var(--s), var(--35-l)); - --40-l: var(--bulma-warning-40-l); - --color-40: hsl(var(--h), var(--s), var(--40-l)); - --45-l: var(--bulma-warning-45-l); - --color-45: hsl(var(--h), var(--s), var(--45-l)); - --50-l: var(--bulma-warning-50-l); - --color-50: hsl(var(--h), var(--s), var(--50-l)); - --55-l: var(--bulma-warning-55-l); - --color-55: hsl(var(--h), var(--s), var(--55-l)); - --60-l: var(--bulma-warning-60-l); - --color-60: hsl(var(--h), var(--s), var(--60-l)); - --65-l: var(--bulma-warning-65-l); - --color-65: hsl(var(--h), var(--s), var(--65-l)); - --70-l: var(--bulma-warning-70-l); - --color-70: hsl(var(--h), var(--s), var(--70-l)); - --75-l: var(--bulma-warning-75-l); - --color-75: hsl(var(--h), var(--s), var(--75-l)); - --80-l: var(--bulma-warning-80-l); - --color-80: hsl(var(--h), var(--s), var(--80-l)); - --85-l: var(--bulma-warning-85-l); - --color-85: hsl(var(--h), var(--s), var(--85-l)); - --90-l: var(--bulma-warning-90-l); - --color-90: hsl(var(--h), var(--s), var(--90-l)); - --95-l: var(--bulma-warning-95-l); - --color-95: hsl(var(--h), var(--s), var(--95-l)); - --100-l: var(--bulma-warning-100-l); - --color-100: hsl(var(--h), var(--s), var(--100-l)); -} - -.has-text-danger { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-l)) !important; -} - -.has-background-danger { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-l)) !important; -} - -.has-text-danger-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-invert-l)) !important; -} - -.has-background-danger-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-invert-l)) !important; -} - -.has-text-danger-on-scheme { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-on-scheme-l)) !important; -} - -.has-background-danger-on-scheme { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-on-scheme-l)) !important; -} - -.has-text-danger-light { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-light-l)) !important; -} - -.has-background-danger-light { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-light-l)) !important; -} - -.has-text-danger-light-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-light-invert-l)) !important; -} - -.has-background-danger-light-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-light-invert-l)) !important; -} - -.has-text-danger-dark { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-dark-l)) !important; -} - -.has-background-danger-dark { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-dark-l)) !important; -} - -.has-text-danger-dark-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-dark-invert-l)) !important; -} - -.has-background-danger-dark-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-dark-invert-l)) !important; -} - -.has-text-danger-soft { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-soft-l)) !important; -} - -.has-background-danger-soft { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-soft-l)) !important; -} - -.has-text-danger-bold { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-bold-l)) !important; -} - -.has-background-danger-bold { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-bold-l)) !important; -} - -.has-text-danger-soft-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-soft-invert-l)) !important; -} - -.has-background-danger-soft-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-soft-invert-l)) !important; -} - -.has-text-danger-bold-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-bold-invert-l)) !important; -} - -.has-background-danger-bold-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-bold-invert-l)) !important; -} - -.has-text-danger-00 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-00-l)) !important; -} - -.has-background-danger-00 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-00-l)) !important; -} - -.has-text-danger-00-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-00-invert-l)) !important; -} - -.has-background-danger-00-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-00-invert-l)) !important; -} - -.has-text-danger-05 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-05-l)) !important; -} - -.has-background-danger-05 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-05-l)) !important; -} - -.has-text-danger-05-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-05-invert-l)) !important; -} - -.has-background-danger-05-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-05-invert-l)) !important; -} - -.has-text-danger-10 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-10-l)) !important; -} - -.has-background-danger-10 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-10-l)) !important; -} - -.has-text-danger-10-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-10-invert-l)) !important; -} - -.has-background-danger-10-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-10-invert-l)) !important; -} - -.has-text-danger-15 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-15-l)) !important; -} - -.has-background-danger-15 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-15-l)) !important; -} - -.has-text-danger-15-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-15-invert-l)) !important; -} - -.has-background-danger-15-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-15-invert-l)) !important; -} - -.has-text-danger-20 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-20-l)) !important; -} - -.has-background-danger-20 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-20-l)) !important; -} - -.has-text-danger-20-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-20-invert-l)) !important; -} - -.has-background-danger-20-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-20-invert-l)) !important; -} - -.has-text-danger-25 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-25-l)) !important; -} - -.has-background-danger-25 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-25-l)) !important; -} - -.has-text-danger-25-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-25-invert-l)) !important; -} - -.has-background-danger-25-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-25-invert-l)) !important; -} - -.has-text-danger-30 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-30-l)) !important; -} - -.has-background-danger-30 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-30-l)) !important; -} - -.has-text-danger-30-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-30-invert-l)) !important; -} - -.has-background-danger-30-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-30-invert-l)) !important; -} - -.has-text-danger-35 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-35-l)) !important; -} - -.has-background-danger-35 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-35-l)) !important; -} - -.has-text-danger-35-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-35-invert-l)) !important; -} - -.has-background-danger-35-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-35-invert-l)) !important; -} - -.has-text-danger-40 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-40-l)) !important; -} - -.has-background-danger-40 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-40-l)) !important; -} - -.has-text-danger-40-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-40-invert-l)) !important; -} - -.has-background-danger-40-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-40-invert-l)) !important; -} - -.has-text-danger-45 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-45-l)) !important; -} - -.has-background-danger-45 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-45-l)) !important; -} - -.has-text-danger-45-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-45-invert-l)) !important; -} - -.has-background-danger-45-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-45-invert-l)) !important; -} - -.has-text-danger-50 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-50-l)) !important; -} - -.has-background-danger-50 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-50-l)) !important; -} - -.has-text-danger-50-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-50-invert-l)) !important; -} - -.has-background-danger-50-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-50-invert-l)) !important; -} - -.has-text-danger-55 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-55-l)) !important; -} - -.has-background-danger-55 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-55-l)) !important; -} - -.has-text-danger-55-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-55-invert-l)) !important; -} - -.has-background-danger-55-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-55-invert-l)) !important; -} - -.has-text-danger-60 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-60-l)) !important; -} - -.has-background-danger-60 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-60-l)) !important; -} - -.has-text-danger-60-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-60-invert-l)) !important; -} - -.has-background-danger-60-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-60-invert-l)) !important; -} - -.has-text-danger-65 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-65-l)) !important; -} - -.has-background-danger-65 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-65-l)) !important; -} - -.has-text-danger-65-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-65-invert-l)) !important; -} - -.has-background-danger-65-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-65-invert-l)) !important; -} - -.has-text-danger-70 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-70-l)) !important; -} - -.has-background-danger-70 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-70-l)) !important; -} - -.has-text-danger-70-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-70-invert-l)) !important; -} - -.has-background-danger-70-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-70-invert-l)) !important; -} - -.has-text-danger-75 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-75-l)) !important; -} - -.has-background-danger-75 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-75-l)) !important; -} - -.has-text-danger-75-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-75-invert-l)) !important; -} - -.has-background-danger-75-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-75-invert-l)) !important; -} - -.has-text-danger-80 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-80-l)) !important; -} - -.has-background-danger-80 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-80-l)) !important; -} - -.has-text-danger-80-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-80-invert-l)) !important; -} - -.has-background-danger-80-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-80-invert-l)) !important; -} - -.has-text-danger-85 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-85-l)) !important; -} - -.has-background-danger-85 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-85-l)) !important; -} - -.has-text-danger-85-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-85-invert-l)) !important; -} - -.has-background-danger-85-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-85-invert-l)) !important; -} - -.has-text-danger-90 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-90-l)) !important; -} - -.has-background-danger-90 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-90-l)) !important; -} - -.has-text-danger-90-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-90-invert-l)) !important; -} - -.has-background-danger-90-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-90-invert-l)) !important; -} - -.has-text-danger-95 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-95-l)) !important; -} - -.has-background-danger-95 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-95-l)) !important; -} - -.has-text-danger-95-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-95-invert-l)) !important; -} - -.has-background-danger-95-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-95-invert-l)) !important; -} - -.has-text-danger-100 { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-100-l)) !important; -} - -.has-background-danger-100 { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-100-l)) !important; -} - -.has-text-danger-100-invert { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-100-invert-l)) !important; -} - -.has-background-danger-100-invert { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-100-invert-l)) !important; -} - -a.has-text-danger:hover, a.has-text-danger:focus-visible, -button.has-text-danger:hover, -button.has-text-danger:focus-visible, -has-text-danger.is-hoverable:hover, -has-text-danger.is-hoverable:focus-visible { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), calc(var(--bulma-danger-l) + var(--bulma-hover-color-l-delta))) !important; -} -a.has-text-danger:active, -button.has-text-danger:active, -has-text-danger.is-hoverable:active { - color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), calc(var(--bulma-danger-l) + var(--bulma-active-color-l-delta))) !important; -} - -a.has-background-danger:hover, a.has-background-danger:focus-visible, -button.has-background-danger:hover, -button.has-background-danger:focus-visible, -has-background-danger.is-hoverable:hover, -has-background-danger.is-hoverable:focus-visible { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), calc(var(--bulma-danger-l) + var(--bulma-hover-background-l-delta))) !important; -} -a.has-background-danger:active, -button.has-background-danger:active, -has-background-danger.is-hoverable:active { - background-color: hsl(var(--bulma-danger-h), var(--bulma-danger-s), calc(var(--bulma-danger-l) + var(--bulma-active-background-l-delta))) !important; -} - -.is-palette-danger { - --h: var(--bulma-danger-h); - --s: var(--bulma-danger-s); - --l: var(--bulma-danger-l); - --color: hsl(var(--h), var(--s), var(--l)); - --00-l: var(--bulma-danger-00-l); - --color-00: hsl(var(--h), var(--s), var(--00-l)); - --05-l: var(--bulma-danger-05-l); - --color-05: hsl(var(--h), var(--s), var(--05-l)); - --10-l: var(--bulma-danger-10-l); - --color-10: hsl(var(--h), var(--s), var(--10-l)); - --15-l: var(--bulma-danger-15-l); - --color-15: hsl(var(--h), var(--s), var(--15-l)); - --20-l: var(--bulma-danger-20-l); - --color-20: hsl(var(--h), var(--s), var(--20-l)); - --25-l: var(--bulma-danger-25-l); - --color-25: hsl(var(--h), var(--s), var(--25-l)); - --30-l: var(--bulma-danger-30-l); - --color-30: hsl(var(--h), var(--s), var(--30-l)); - --35-l: var(--bulma-danger-35-l); - --color-35: hsl(var(--h), var(--s), var(--35-l)); - --40-l: var(--bulma-danger-40-l); - --color-40: hsl(var(--h), var(--s), var(--40-l)); - --45-l: var(--bulma-danger-45-l); - --color-45: hsl(var(--h), var(--s), var(--45-l)); - --50-l: var(--bulma-danger-50-l); - --color-50: hsl(var(--h), var(--s), var(--50-l)); - --55-l: var(--bulma-danger-55-l); - --color-55: hsl(var(--h), var(--s), var(--55-l)); - --60-l: var(--bulma-danger-60-l); - --color-60: hsl(var(--h), var(--s), var(--60-l)); - --65-l: var(--bulma-danger-65-l); - --color-65: hsl(var(--h), var(--s), var(--65-l)); - --70-l: var(--bulma-danger-70-l); - --color-70: hsl(var(--h), var(--s), var(--70-l)); - --75-l: var(--bulma-danger-75-l); - --color-75: hsl(var(--h), var(--s), var(--75-l)); - --80-l: var(--bulma-danger-80-l); - --color-80: hsl(var(--h), var(--s), var(--80-l)); - --85-l: var(--bulma-danger-85-l); - --color-85: hsl(var(--h), var(--s), var(--85-l)); - --90-l: var(--bulma-danger-90-l); - --color-90: hsl(var(--h), var(--s), var(--90-l)); - --95-l: var(--bulma-danger-95-l); - --color-95: hsl(var(--h), var(--s), var(--95-l)); - --100-l: var(--bulma-danger-100-l); - --color-100: hsl(var(--h), var(--s), var(--100-l)); -} - -.has-text-black-bis { - color: hsl(221, 14%, 9%) !important; -} - -.has-background-black-bis { - background-color: hsl(221, 14%, 9%) !important; -} - -.has-text-black-ter { - color: hsl(221, 14%, 14%) !important; -} - -.has-background-black-ter { - background-color: hsl(221, 14%, 14%) !important; -} - -.has-text-grey-darker { - color: hsl(221, 14%, 21%) !important; -} - -.has-background-grey-darker { - background-color: hsl(221, 14%, 21%) !important; -} - -.has-text-grey-dark { - color: hsl(221, 14%, 29%) !important; -} - -.has-background-grey-dark { - background-color: hsl(221, 14%, 29%) !important; -} - -.has-text-grey { - color: hsl(221, 14%, 48%) !important; -} - -.has-background-grey { - background-color: hsl(221, 14%, 48%) !important; -} - -.has-text-grey-light { - color: hsl(221, 14%, 71%) !important; -} - -.has-background-grey-light { - background-color: hsl(221, 14%, 71%) !important; -} - -.has-text-grey-lighter { - color: hsl(221, 14%, 86%) !important; -} - -.has-background-grey-lighter { - background-color: hsl(221, 14%, 86%) !important; -} - -.has-text-white-ter { - color: hsl(221, 14%, 96%) !important; -} - -.has-background-white-ter { - background-color: hsl(221, 14%, 96%) !important; -} - -.has-text-white-bis { - color: hsl(221, 14%, 98%) !important; -} - -.has-background-white-bis { - background-color: hsl(221, 14%, 98%) !important; -} - -.has-text-current { - color: currentColor !important; -} - -.has-text-inherit { - color: inherit !important; -} - -.has-background-current { - background-color: currentColor !important; -} - -.has-background-inherit { - background-color: inherit !important; -} - -/* Bulma Themes */ -:root { - --bulma-scheme-h: 221; - --bulma-scheme-s: 14%; - --bulma-light-l: 90%; - --bulma-light-invert-l: 20%; - --bulma-dark-l: 20%; - --bulma-dark-invert-l: 90%; - --bulma-soft-l: 90%; - --bulma-bold-l: 20%; - --bulma-soft-invert-l: 20%; - --bulma-bold-invert-l: 90%; - --bulma-hover-background-l-delta: -5%; - --bulma-active-background-l-delta: -10%; - --bulma-hover-border-l-delta: -10%; - --bulma-active-border-l-delta: -20%; - --bulma-hover-color-l-delta: -5%; - --bulma-active-color-l-delta: -10%; - --bulma-hover-shadow-a-delta: -0.05; - --bulma-active-shadow-a-delta: -0.1; - --bulma-scheme-brightness: light; - --bulma-scheme-main-l: 100%; - --bulma-scheme-main-bis-l: 98%; - --bulma-scheme-main-ter-l: 96%; - --bulma-background-l: 96%; - --bulma-border-weak-l: 93%; - --bulma-border-l: 86%; - --bulma-text-weak-l: 48%; - --bulma-text-l: 29%; - --bulma-text-strong-l: 21%; - --bulma-text-title-l: 14%; - --bulma-scheme-invert-ter-l: 14%; - --bulma-scheme-invert-bis-l: 7%; - --bulma-scheme-invert-l: 4%; - --bulma-family-primary: "Nunito", sans-serif; - --bulma-family-secondary: Inter, SF Pro, Segoe UI, Roboto, Oxygen, Ubuntu, Helvetica Neue, Helvetica, Arial, sans-serif; - --bulma-family-code: Inconsolata, Hack, SF Mono, Roboto Mono, Source Code Pro, Ubuntu Mono, monospace; - --bulma-size-small: 0.75rem; - --bulma-size-normal: 1rem; - --bulma-size-medium: 1.25rem; - --bulma-size-large: 1.5rem; - --bulma-weight-light: 300; - --bulma-weight-normal: 400; - --bulma-weight-medium: 500; - --bulma-weight-semibold: 600; - --bulma-weight-bold: 700; - --bulma-weight-extrabold: 800; - --bulma-block-spacing: 1.5rem; - --bulma-duration: 294ms; - --bulma-easing: ease-out; - --bulma-radius-small: 0.25rem; - --bulma-radius: 0.375rem; - --bulma-radius-medium: 0.5em; - --bulma-radius-large: 0.75rem; - --bulma-radius-rounded: 9999px; - --bulma-speed: 86ms; - --bulma-arrow-color: var(--bulma-link); - --bulma-loading-color: var(--bulma-border); - --bulma-burger-h: var(--bulma-link-h); - --bulma-burger-s: var(--bulma-link-s); - --bulma-burger-l: var(--bulma-link-l); - --bulma-burger-border-radius: 0.5em; - --bulma-burger-gap: 5px; - --bulma-burger-item-height: 2px; - --bulma-burger-item-width: 20px; - --bulma-white: hsla(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-l), 1); - --bulma-white-base: hsla(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-l), 1); - --bulma-white-rgb: 255, 255, 255; - --bulma-white-h: 221deg; - --bulma-white-s: 14%; - --bulma-white-l: 100%; - --bulma-white-invert-l: 4%; - --bulma-white-invert: hsl(221, 14%, 4%); - --bulma-white-on-scheme-l: 35%; - --bulma-white-on-scheme: hsla(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-on-scheme-l), 1); - --bulma-black: hsla(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-l), 1); - --bulma-black-base: hsla(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-l), 1); - --bulma-black-rgb: 9, 10, 12; - --bulma-black-h: 221deg; - --bulma-black-s: 14%; - --bulma-black-l: 4%; - --bulma-black-invert-l: 100%; - --bulma-black-invert: hsl(221, 14%, 100%); - --bulma-black-on-scheme-l: 4%; - --bulma-black-on-scheme: hsla(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-on-scheme-l), 1); - --bulma-light: hsla(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-l), 1); - --bulma-light-base: hsla(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-l), 1); - --bulma-light-rgb: 243, 244, 246; - --bulma-light-h: 221deg; - --bulma-light-s: 14%; - --bulma-light-l: 96%; - --bulma-light-invert-l: 21%; - --bulma-light-invert: hsl(221, 14%, 21%); - --bulma-light-on-scheme-l: 36%; - --bulma-light-on-scheme: hsla(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-on-scheme-l), 1); - --bulma-dark: hsla(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-l), 1); - --bulma-dark-base: hsla(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-l), 1); - --bulma-dark-rgb: 46, 51, 61; - --bulma-dark-h: 221deg; - --bulma-dark-s: 14%; - --bulma-dark-l: 21%; - --bulma-dark-invert-l: 96%; - --bulma-dark-invert: hsl(221, 14%, 96%); - --bulma-dark-on-scheme-l: 21%; - --bulma-dark-on-scheme: hsla(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-on-scheme-l), 1); - --bulma-text: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-l), 1); - --bulma-text-base: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-l), 1); - --bulma-text-rgb: 64, 70, 84; - --bulma-text-h: 221deg; - --bulma-text-s: 14%; - --bulma-text-l: 29%; - --bulma-text-00-l: 0%; - --bulma-text-05-l: 4%; - --bulma-text-10-l: 9%; - --bulma-text-15-l: 14%; - --bulma-text-20-l: 19%; - --bulma-text-25-l: 24%; - --bulma-text-30-l: 29%; - --bulma-text-35-l: 34%; - --bulma-text-40-l: 39%; - --bulma-text-45-l: 44%; - --bulma-text-50-l: 49%; - --bulma-text-55-l: 54%; - --bulma-text-60-l: 59%; - --bulma-text-65-l: 64%; - --bulma-text-70-l: 69%; - --bulma-text-75-l: 74%; - --bulma-text-80-l: 79%; - --bulma-text-85-l: 84%; - --bulma-text-90-l: 89%; - --bulma-text-95-l: 94%; - --bulma-text-100-l: 99%; - --bulma-text-00: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-00-l), 1); - --bulma-text-00-invert-l: var(--bulma-text-60-l); - --bulma-text-00-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-00-invert-l), 1); - --bulma-text-05: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-05-l), 1); - --bulma-text-05-invert-l: var(--bulma-text-60-l); - --bulma-text-05-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-05-invert-l), 1); - --bulma-text-10: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-10-l), 1); - --bulma-text-10-invert-l: var(--bulma-text-70-l); - --bulma-text-10-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-10-invert-l), 1); - --bulma-text-15: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-15-l), 1); - --bulma-text-15-invert-l: var(--bulma-text-75-l); - --bulma-text-15-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-15-invert-l), 1); - --bulma-text-20: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-20-l), 1); - --bulma-text-20-invert-l: var(--bulma-text-85-l); - --bulma-text-20-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-20-invert-l), 1); - --bulma-text-25: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-25-l), 1); - --bulma-text-25-invert-l: var(--bulma-text-95-l); - --bulma-text-25-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-25-invert-l), 1); - --bulma-text-30: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-30-l), 1); - --bulma-text-30-invert-l: var(--bulma-text-100-l); - --bulma-text-30-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-30-invert-l), 1); - --bulma-text-35: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-35-l), 1); - --bulma-text-35-invert-l: var(--bulma-text-100-l); - --bulma-text-35-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-35-invert-l), 1); - --bulma-text-40: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-40-l), 1); - --bulma-text-40-invert-l: var(--bulma-text-100-l); - --bulma-text-40-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-40-invert-l), 1); - --bulma-text-45: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-45-l), 1); - --bulma-text-45-invert-l: var(--bulma-text-100-l); - --bulma-text-45-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-45-invert-l), 1); - --bulma-text-50: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-50-l), 1); - --bulma-text-50-invert-l: var(--bulma-text-100-l); - --bulma-text-50-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-50-invert-l), 1); - --bulma-text-55: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-55-l), 1); - --bulma-text-55-invert-l: var(--bulma-text-100-l); - --bulma-text-55-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-55-invert-l), 1); - --bulma-text-60: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-60-l), 1); - --bulma-text-60-invert-l: var(--bulma-text-05-l); - --bulma-text-60-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-60-invert-l), 1); - --bulma-text-65: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-65-l), 1); - --bulma-text-65-invert-l: var(--bulma-text-05-l); - --bulma-text-65-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-65-invert-l), 1); - --bulma-text-70: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-70-l), 1); - --bulma-text-70-invert-l: var(--bulma-text-10-l); - --bulma-text-70-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-70-invert-l), 1); - --bulma-text-75: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-75-l), 1); - --bulma-text-75-invert-l: var(--bulma-text-15-l); - --bulma-text-75-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-75-invert-l), 1); - --bulma-text-80: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-80-l), 1); - --bulma-text-80-invert-l: var(--bulma-text-15-l); - --bulma-text-80-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-80-invert-l), 1); - --bulma-text-85: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-85-l), 1); - --bulma-text-85-invert-l: var(--bulma-text-20-l); - --bulma-text-85-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-85-invert-l), 1); - --bulma-text-90: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-90-l), 1); - --bulma-text-90-invert-l: var(--bulma-text-20-l); - --bulma-text-90-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-90-invert-l), 1); - --bulma-text-95: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-95-l), 1); - --bulma-text-95-invert-l: var(--bulma-text-25-l); - --bulma-text-95-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-95-invert-l), 1); - --bulma-text-100: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-100-l), 1); - --bulma-text-100-invert-l: var(--bulma-text-25-l); - --bulma-text-100-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-100-invert-l), 1); - --bulma-text-invert-l: var(--bulma-text-100-l); - --bulma-text-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-invert-l), 1); - --bulma-text-light-l: var(--bulma-text-90-l); - --bulma-text-light: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-light-l), 1); - --bulma-text-light-invert-l: var(--bulma-text-20-l); - --bulma-text-light-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-light-invert-l), 1); - --bulma-text-dark-l: var(--bulma-text-10-l); - --bulma-text-dark: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-dark-l), 1); - --bulma-text-dark-invert-l: var(--bulma-text-70-l); - --bulma-text-dark-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-dark-invert-l), 1); - --bulma-text-soft: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-soft-l), 1); - --bulma-text-bold: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-bold-l), 1); - --bulma-text-soft-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-soft-invert-l), 1); - --bulma-text-bold-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-bold-invert-l), 1); - --bulma-text-on-scheme-l: 29%; - --bulma-text-on-scheme: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-on-scheme-l), 1); - --bulma-primary: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l), 1); - --bulma-primary-base: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l), 1); - --bulma-primary-rgb: 0, 209, 178; - --bulma-primary-h: 171deg; - --bulma-primary-s: 100%; - --bulma-primary-l: 41%; - --bulma-primary-00-l: 1%; - --bulma-primary-05-l: 6%; - --bulma-primary-10-l: 11%; - --bulma-primary-15-l: 16%; - --bulma-primary-20-l: 21%; - --bulma-primary-25-l: 26%; - --bulma-primary-30-l: 31%; - --bulma-primary-35-l: 36%; - --bulma-primary-40-l: 41%; - --bulma-primary-45-l: 46%; - --bulma-primary-50-l: 51%; - --bulma-primary-55-l: 56%; - --bulma-primary-60-l: 61%; - --bulma-primary-65-l: 66%; - --bulma-primary-70-l: 71%; - --bulma-primary-75-l: 76%; - --bulma-primary-80-l: 81%; - --bulma-primary-85-l: 86%; - --bulma-primary-90-l: 91%; - --bulma-primary-95-l: 96%; - --bulma-primary-100-l: 100%; - --bulma-primary-00: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-00-l), 1); - --bulma-primary-00-invert-l: var(--bulma-primary-30-l); - --bulma-primary-00-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-00-invert-l), 1); - --bulma-primary-05: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-05-l), 1); - --bulma-primary-05-invert-l: var(--bulma-primary-40-l); - --bulma-primary-05-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-05-invert-l), 1); - --bulma-primary-10: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-10-l), 1); - --bulma-primary-10-invert-l: var(--bulma-primary-50-l); - --bulma-primary-10-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-10-invert-l), 1); - --bulma-primary-15: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-15-l), 1); - --bulma-primary-15-invert-l: var(--bulma-primary-100-l); - --bulma-primary-15-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-15-invert-l), 1); - --bulma-primary-20: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-20-l), 1); - --bulma-primary-20-invert-l: var(--bulma-primary-100-l); - --bulma-primary-20-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-20-invert-l), 1); - --bulma-primary-25: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-25-l), 1); - --bulma-primary-25-invert-l: var(--bulma-primary-100-l); - --bulma-primary-25-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-25-invert-l), 1); - --bulma-primary-30: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-30-l), 1); - --bulma-primary-30-invert-l: var(--bulma-primary-00-l); - --bulma-primary-30-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-30-invert-l), 1); - --bulma-primary-35: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-35-l), 1); - --bulma-primary-35-invert-l: var(--bulma-primary-00-l); - --bulma-primary-35-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-35-invert-l), 1); - --bulma-primary-40: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-40-l), 1); - --bulma-primary-40-invert-l: var(--bulma-primary-05-l); - --bulma-primary-40-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-40-invert-l), 1); - --bulma-primary-45: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-45-l), 1); - --bulma-primary-45-invert-l: var(--bulma-primary-05-l); - --bulma-primary-45-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-45-invert-l), 1); - --bulma-primary-50: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-50-l), 1); - --bulma-primary-50-invert-l: var(--bulma-primary-10-l); - --bulma-primary-50-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-50-invert-l), 1); - --bulma-primary-55: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-55-l), 1); - --bulma-primary-55-invert-l: var(--bulma-primary-10-l); - --bulma-primary-55-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-55-invert-l), 1); - --bulma-primary-60: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-60-l), 1); - --bulma-primary-60-invert-l: var(--bulma-primary-10-l); - --bulma-primary-60-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-60-invert-l), 1); - --bulma-primary-65: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-65-l), 1); - --bulma-primary-65-invert-l: var(--bulma-primary-10-l); - --bulma-primary-65-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-65-invert-l), 1); - --bulma-primary-70: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-70-l), 1); - --bulma-primary-70-invert-l: var(--bulma-primary-10-l); - --bulma-primary-70-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-70-invert-l), 1); - --bulma-primary-75: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-75-l), 1); - --bulma-primary-75-invert-l: var(--bulma-primary-10-l); - --bulma-primary-75-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-75-invert-l), 1); - --bulma-primary-80: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-80-l), 1); - --bulma-primary-80-invert-l: var(--bulma-primary-10-l); - --bulma-primary-80-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-80-invert-l), 1); - --bulma-primary-85: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-85-l), 1); - --bulma-primary-85-invert-l: var(--bulma-primary-10-l); - --bulma-primary-85-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-85-invert-l), 1); - --bulma-primary-90: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-90-l), 1); - --bulma-primary-90-invert-l: var(--bulma-primary-10-l); - --bulma-primary-90-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-90-invert-l), 1); - --bulma-primary-95: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-95-l), 1); - --bulma-primary-95-invert-l: var(--bulma-primary-10-l); - --bulma-primary-95-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-95-invert-l), 1); - --bulma-primary-100: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-100-l), 1); - --bulma-primary-100-invert-l: var(--bulma-primary-15-l); - --bulma-primary-100-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-100-invert-l), 1); - --bulma-primary-invert-l: var(--bulma-primary-05-l); - --bulma-primary-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-invert-l), 1); - --bulma-primary-light-l: var(--bulma-primary-90-l); - --bulma-primary-light: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-light-l), 1); - --bulma-primary-light-invert-l: var(--bulma-primary-10-l); - --bulma-primary-light-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-light-invert-l), 1); - --bulma-primary-dark-l: var(--bulma-primary-10-l); - --bulma-primary-dark: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-dark-l), 1); - --bulma-primary-dark-invert-l: var(--bulma-primary-50-l); - --bulma-primary-dark-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-dark-invert-l), 1); - --bulma-primary-soft: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-soft-l), 1); - --bulma-primary-bold: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-bold-l), 1); - --bulma-primary-soft-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-soft-invert-l), 1); - --bulma-primary-bold-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-bold-invert-l), 1); - --bulma-primary-on-scheme-l: 20.9803921569%; - --bulma-primary-on-scheme: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-on-scheme-l), 1); - --bulma-link: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-l), 1); - --bulma-link-base: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-l), 1); - --bulma-link-rgb: 66, 88, 255; - --bulma-link-h: 233deg; - --bulma-link-s: 100%; - --bulma-link-l: 63%; - --bulma-link-00-l: 0%; - --bulma-link-05-l: 3%; - --bulma-link-10-l: 8%; - --bulma-link-15-l: 13%; - --bulma-link-20-l: 18%; - --bulma-link-25-l: 23%; - --bulma-link-30-l: 28%; - --bulma-link-35-l: 33%; - --bulma-link-40-l: 38%; - --bulma-link-45-l: 43%; - --bulma-link-50-l: 48%; - --bulma-link-55-l: 53%; - --bulma-link-60-l: 58%; - --bulma-link-65-l: 63%; - --bulma-link-70-l: 68%; - --bulma-link-75-l: 73%; - --bulma-link-80-l: 78%; - --bulma-link-85-l: 83%; - --bulma-link-90-l: 88%; - --bulma-link-95-l: 93%; - --bulma-link-100-l: 98%; - --bulma-link-00: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-00-l), 1); - --bulma-link-00-invert-l: var(--bulma-link-75-l); - --bulma-link-00-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-00-invert-l), 1); - --bulma-link-05: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-05-l), 1); - --bulma-link-05-invert-l: var(--bulma-link-75-l); - --bulma-link-05-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-05-invert-l), 1); - --bulma-link-10: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-10-l), 1); - --bulma-link-10-invert-l: var(--bulma-link-75-l); - --bulma-link-10-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-10-invert-l), 1); - --bulma-link-15: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-15-l), 1); - --bulma-link-15-invert-l: var(--bulma-link-80-l); - --bulma-link-15-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-15-invert-l), 1); - --bulma-link-20: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-20-l), 1); - --bulma-link-20-invert-l: var(--bulma-link-80-l); - --bulma-link-20-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-20-invert-l), 1); - --bulma-link-25: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-25-l), 1); - --bulma-link-25-invert-l: var(--bulma-link-85-l); - --bulma-link-25-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-25-invert-l), 1); - --bulma-link-30: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-30-l), 1); - --bulma-link-30-invert-l: var(--bulma-link-90-l); - --bulma-link-30-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-30-invert-l), 1); - --bulma-link-35: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-35-l), 1); - --bulma-link-35-invert-l: var(--bulma-link-90-l); - --bulma-link-35-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-35-invert-l), 1); - --bulma-link-40: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-40-l), 1); - --bulma-link-40-invert-l: var(--bulma-link-95-l); - --bulma-link-40-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-40-invert-l), 1); - --bulma-link-45: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-45-l), 1); - --bulma-link-45-invert-l: var(--bulma-link-100-l); - --bulma-link-45-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-45-invert-l), 1); - --bulma-link-50: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-50-l), 1); - --bulma-link-50-invert-l: var(--bulma-link-100-l); - --bulma-link-50-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-50-invert-l), 1); - --bulma-link-55: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-55-l), 1); - --bulma-link-55-invert-l: var(--bulma-link-100-l); - --bulma-link-55-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-55-invert-l), 1); - --bulma-link-60: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-60-l), 1); - --bulma-link-60-invert-l: var(--bulma-link-100-l); - --bulma-link-60-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-60-invert-l), 1); - --bulma-link-65: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-65-l), 1); - --bulma-link-65-invert-l: var(--bulma-link-100-l); - --bulma-link-65-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-65-invert-l), 1); - --bulma-link-70: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-70-l), 1); - --bulma-link-70-invert-l: var(--bulma-link-100-l); - --bulma-link-70-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-70-invert-l), 1); - --bulma-link-75: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-75-l), 1); - --bulma-link-75-invert-l: var(--bulma-link-10-l); - --bulma-link-75-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-75-invert-l), 1); - --bulma-link-80: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-80-l), 1); - --bulma-link-80-invert-l: var(--bulma-link-20-l); - --bulma-link-80-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-80-invert-l), 1); - --bulma-link-85: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-85-l), 1); - --bulma-link-85-invert-l: var(--bulma-link-25-l); - --bulma-link-85-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-85-invert-l), 1); - --bulma-link-90: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-90-l), 1); - --bulma-link-90-invert-l: var(--bulma-link-35-l); - --bulma-link-90-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-90-invert-l), 1); - --bulma-link-95: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-95-l), 1); - --bulma-link-95-invert-l: var(--bulma-link-40-l); - --bulma-link-95-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-95-invert-l), 1); - --bulma-link-100: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-100-l), 1); - --bulma-link-100-invert-l: var(--bulma-link-50-l); - --bulma-link-100-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-100-invert-l), 1); - --bulma-link-invert-l: var(--bulma-link-100-l); - --bulma-link-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-invert-l), 1); - --bulma-link-light-l: var(--bulma-link-90-l); - --bulma-link-light: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-light-l), 1); - --bulma-link-light-invert-l: var(--bulma-link-35-l); - --bulma-link-light-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-light-invert-l), 1); - --bulma-link-dark-l: var(--bulma-link-10-l); - --bulma-link-dark: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-dark-l), 1); - --bulma-link-dark-invert-l: var(--bulma-link-75-l); - --bulma-link-dark-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-dark-invert-l), 1); - --bulma-link-soft: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-soft-l), 1); - --bulma-link-bold: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-bold-l), 1); - --bulma-link-soft-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-soft-invert-l), 1); - --bulma-link-bold-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-bold-invert-l), 1); - --bulma-link-on-scheme-l: 58%; - --bulma-link-on-scheme: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l), 1); - --bulma-info: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-l), 1); - --bulma-info-base: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-l), 1); - --bulma-info-rgb: 102, 209, 255; - --bulma-info-h: 198deg; - --bulma-info-s: 100%; - --bulma-info-l: 70%; - --bulma-info-00-l: 0%; - --bulma-info-05-l: 5%; - --bulma-info-10-l: 10%; - --bulma-info-15-l: 15%; - --bulma-info-20-l: 20%; - --bulma-info-25-l: 25%; - --bulma-info-30-l: 30%; - --bulma-info-35-l: 35%; - --bulma-info-40-l: 40%; - --bulma-info-45-l: 45%; - --bulma-info-50-l: 50%; - --bulma-info-55-l: 55%; - --bulma-info-60-l: 60%; - --bulma-info-65-l: 65%; - --bulma-info-70-l: 70%; - --bulma-info-75-l: 75%; - --bulma-info-80-l: 80%; - --bulma-info-85-l: 85%; - --bulma-info-90-l: 90%; - --bulma-info-95-l: 95%; - --bulma-info-100-l: 100%; - --bulma-info-00: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-00-l), 1); - --bulma-info-00-invert-l: var(--bulma-info-45-l); - --bulma-info-00-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-00-invert-l), 1); - --bulma-info-05: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-05-l), 1); - --bulma-info-05-invert-l: var(--bulma-info-50-l); - --bulma-info-05-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-05-invert-l), 1); - --bulma-info-10: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-10-l), 1); - --bulma-info-10-invert-l: var(--bulma-info-60-l); - --bulma-info-10-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-10-invert-l), 1); - --bulma-info-15: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-15-l), 1); - --bulma-info-15-invert-l: var(--bulma-info-80-l); - --bulma-info-15-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-15-invert-l), 1); - --bulma-info-20: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-20-l), 1); - --bulma-info-20-invert-l: var(--bulma-info-95-l); - --bulma-info-20-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-20-invert-l), 1); - --bulma-info-25: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-25-l), 1); - --bulma-info-25-invert-l: var(--bulma-info-100-l); - --bulma-info-25-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-25-invert-l), 1); - --bulma-info-30: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-30-l), 1); - --bulma-info-30-invert-l: var(--bulma-info-100-l); - --bulma-info-30-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-30-invert-l), 1); - --bulma-info-35: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-35-l), 1); - --bulma-info-35-invert-l: var(--bulma-info-100-l); - --bulma-info-35-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-35-invert-l), 1); - --bulma-info-40: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-40-l), 1); - --bulma-info-40-invert-l: var(--bulma-info-100-l); - --bulma-info-40-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-40-invert-l), 1); - --bulma-info-45: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-45-l), 1); - --bulma-info-45-invert-l: var(--bulma-info-00-l); - --bulma-info-45-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-45-invert-l), 1); - --bulma-info-50: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-50-l), 1); - --bulma-info-50-invert-l: var(--bulma-info-05-l); - --bulma-info-50-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-50-invert-l), 1); - --bulma-info-55: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-55-l), 1); - --bulma-info-55-invert-l: var(--bulma-info-05-l); - --bulma-info-55-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-55-invert-l), 1); - --bulma-info-60: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-60-l), 1); - --bulma-info-60-invert-l: var(--bulma-info-10-l); - --bulma-info-60-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-60-invert-l), 1); - --bulma-info-65: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-65-l), 1); - --bulma-info-65-invert-l: var(--bulma-info-10-l); - --bulma-info-65-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-65-invert-l), 1); - --bulma-info-70: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-70-l), 1); - --bulma-info-70-invert-l: var(--bulma-info-10-l); - --bulma-info-70-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-70-invert-l), 1); - --bulma-info-75: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-75-l), 1); - --bulma-info-75-invert-l: var(--bulma-info-10-l); - --bulma-info-75-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-75-invert-l), 1); - --bulma-info-80: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-80-l), 1); - --bulma-info-80-invert-l: var(--bulma-info-15-l); - --bulma-info-80-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-80-invert-l), 1); - --bulma-info-85: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-85-l), 1); - --bulma-info-85-invert-l: var(--bulma-info-15-l); - --bulma-info-85-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-85-invert-l), 1); - --bulma-info-90: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-90-l), 1); - --bulma-info-90-invert-l: var(--bulma-info-15-l); - --bulma-info-90-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-90-invert-l), 1); - --bulma-info-95: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-95-l), 1); - --bulma-info-95-invert-l: var(--bulma-info-20-l); - --bulma-info-95-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-95-invert-l), 1); - --bulma-info-100: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-100-l), 1); - --bulma-info-100-invert-l: var(--bulma-info-20-l); - --bulma-info-100-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-100-invert-l), 1); - --bulma-info-invert-l: var(--bulma-info-10-l); - --bulma-info-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-invert-l), 1); - --bulma-info-light-l: var(--bulma-info-90-l); - --bulma-info-light: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-light-l), 1); - --bulma-info-light-invert-l: var(--bulma-info-15-l); - --bulma-info-light-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-light-invert-l), 1); - --bulma-info-dark-l: var(--bulma-info-10-l); - --bulma-info-dark: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-dark-l), 1); - --bulma-info-dark-invert-l: var(--bulma-info-60-l); - --bulma-info-dark-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-dark-invert-l), 1); - --bulma-info-soft: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-soft-l), 1); - --bulma-info-bold: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-bold-l), 1); - --bulma-info-soft-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-soft-invert-l), 1); - --bulma-info-bold-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-bold-invert-l), 1); - --bulma-info-on-scheme-l: 25%; - --bulma-info-on-scheme: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-on-scheme-l), 1); - --bulma-success: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-l), 1); - --bulma-success-base: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-l), 1); - --bulma-success-rgb: 72, 199, 142; - --bulma-success-h: 153deg; - --bulma-success-s: 53%; - --bulma-success-l: 53%; - --bulma-success-00-l: 0%; - --bulma-success-05-l: 3%; - --bulma-success-10-l: 8%; - --bulma-success-15-l: 13%; - --bulma-success-20-l: 18%; - --bulma-success-25-l: 23%; - --bulma-success-30-l: 28%; - --bulma-success-35-l: 33%; - --bulma-success-40-l: 38%; - --bulma-success-45-l: 43%; - --bulma-success-50-l: 48%; - --bulma-success-55-l: 53%; - --bulma-success-60-l: 58%; - --bulma-success-65-l: 63%; - --bulma-success-70-l: 68%; - --bulma-success-75-l: 73%; - --bulma-success-80-l: 78%; - --bulma-success-85-l: 83%; - --bulma-success-90-l: 88%; - --bulma-success-95-l: 93%; - --bulma-success-100-l: 98%; - --bulma-success-00: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-00-l), 1); - --bulma-success-00-invert-l: var(--bulma-success-45-l); - --bulma-success-00-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-00-invert-l), 1); - --bulma-success-05: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-05-l), 1); - --bulma-success-05-invert-l: var(--bulma-success-45-l); - --bulma-success-05-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-05-invert-l), 1); - --bulma-success-10: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-10-l), 1); - --bulma-success-10-invert-l: var(--bulma-success-55-l); - --bulma-success-10-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-10-invert-l), 1); - --bulma-success-15: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-15-l), 1); - --bulma-success-15-invert-l: var(--bulma-success-75-l); - --bulma-success-15-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-15-invert-l), 1); - --bulma-success-20: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-20-l), 1); - --bulma-success-20-invert-l: var(--bulma-success-90-l); - --bulma-success-20-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-20-invert-l), 1); - --bulma-success-25: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-25-l), 1); - --bulma-success-25-invert-l: var(--bulma-success-100-l); - --bulma-success-25-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-25-invert-l), 1); - --bulma-success-30: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-30-l), 1); - --bulma-success-30-invert-l: var(--bulma-success-100-l); - --bulma-success-30-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-30-invert-l), 1); - --bulma-success-35: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-35-l), 1); - --bulma-success-35-invert-l: var(--bulma-success-100-l); - --bulma-success-35-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-35-invert-l), 1); - --bulma-success-40: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-40-l), 1); - --bulma-success-40-invert-l: var(--bulma-success-100-l); - --bulma-success-40-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-40-invert-l), 1); - --bulma-success-45: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-45-l), 1); - --bulma-success-45-invert-l: var(--bulma-success-05-l); - --bulma-success-45-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-45-invert-l), 1); - --bulma-success-50: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-50-l), 1); - --bulma-success-50-invert-l: var(--bulma-success-05-l); - --bulma-success-50-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-50-invert-l), 1); - --bulma-success-55: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-55-l), 1); - --bulma-success-55-invert-l: var(--bulma-success-10-l); - --bulma-success-55-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-55-invert-l), 1); - --bulma-success-60: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-60-l), 1); - --bulma-success-60-invert-l: var(--bulma-success-10-l); - --bulma-success-60-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-60-invert-l), 1); - --bulma-success-65: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-65-l), 1); - --bulma-success-65-invert-l: var(--bulma-success-10-l); - --bulma-success-65-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-65-invert-l), 1); - --bulma-success-70: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-70-l), 1); - --bulma-success-70-invert-l: var(--bulma-success-10-l); - --bulma-success-70-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-70-invert-l), 1); - --bulma-success-75: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-75-l), 1); - --bulma-success-75-invert-l: var(--bulma-success-15-l); - --bulma-success-75-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-75-invert-l), 1); - --bulma-success-80: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-80-l), 1); - --bulma-success-80-invert-l: var(--bulma-success-15-l); - --bulma-success-80-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-80-invert-l), 1); - --bulma-success-85: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-85-l), 1); - --bulma-success-85-invert-l: var(--bulma-success-15-l); - --bulma-success-85-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-85-invert-l), 1); - --bulma-success-90: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-90-l), 1); - --bulma-success-90-invert-l: var(--bulma-success-20-l); - --bulma-success-90-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-90-invert-l), 1); - --bulma-success-95: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-95-l), 1); - --bulma-success-95-invert-l: var(--bulma-success-20-l); - --bulma-success-95-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-95-invert-l), 1); - --bulma-success-100: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-100-l), 1); - --bulma-success-100-invert-l: var(--bulma-success-20-l); - --bulma-success-100-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-100-invert-l), 1); - --bulma-success-invert-l: var(--bulma-success-10-l); - --bulma-success-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-invert-l), 1); - --bulma-success-light-l: var(--bulma-success-90-l); - --bulma-success-light: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-light-l), 1); - --bulma-success-light-invert-l: var(--bulma-success-20-l); - --bulma-success-light-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-light-invert-l), 1); - --bulma-success-dark-l: var(--bulma-success-10-l); - --bulma-success-dark: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-dark-l), 1); - --bulma-success-dark-invert-l: var(--bulma-success-55-l); - --bulma-success-dark-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-dark-invert-l), 1); - --bulma-success-soft: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-soft-l), 1); - --bulma-success-bold: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-bold-l), 1); - --bulma-success-soft-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-soft-invert-l), 1); - --bulma-success-bold-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-bold-invert-l), 1); - --bulma-success-on-scheme-l: 23%; - --bulma-success-on-scheme: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-on-scheme-l), 1); - --bulma-warning: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-l), 1); - --bulma-warning-base: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-l), 1); - --bulma-warning-rgb: 255, 183, 15; - --bulma-warning-h: 42deg; - --bulma-warning-s: 100%; - --bulma-warning-l: 53%; - --bulma-warning-00-l: 0%; - --bulma-warning-05-l: 3%; - --bulma-warning-10-l: 8%; - --bulma-warning-15-l: 13%; - --bulma-warning-20-l: 18%; - --bulma-warning-25-l: 23%; - --bulma-warning-30-l: 28%; - --bulma-warning-35-l: 33%; - --bulma-warning-40-l: 38%; - --bulma-warning-45-l: 43%; - --bulma-warning-50-l: 48%; - --bulma-warning-55-l: 53%; - --bulma-warning-60-l: 58%; - --bulma-warning-65-l: 63%; - --bulma-warning-70-l: 68%; - --bulma-warning-75-l: 73%; - --bulma-warning-80-l: 78%; - --bulma-warning-85-l: 83%; - --bulma-warning-90-l: 88%; - --bulma-warning-95-l: 93%; - --bulma-warning-100-l: 98%; - --bulma-warning-00: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-00-l), 1); - --bulma-warning-00-invert-l: var(--bulma-warning-40-l); - --bulma-warning-00-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-00-invert-l), 1); - --bulma-warning-05: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-05-l), 1); - --bulma-warning-05-invert-l: var(--bulma-warning-45-l); - --bulma-warning-05-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-05-invert-l), 1); - --bulma-warning-10: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-10-l), 1); - --bulma-warning-10-invert-l: var(--bulma-warning-50-l); - --bulma-warning-10-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-10-invert-l), 1); - --bulma-warning-15: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-15-l), 1); - --bulma-warning-15-invert-l: var(--bulma-warning-70-l); - --bulma-warning-15-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-15-invert-l), 1); - --bulma-warning-20: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-20-l), 1); - --bulma-warning-20-invert-l: var(--bulma-warning-100-l); - --bulma-warning-20-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-20-invert-l), 1); - --bulma-warning-25: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-25-l), 1); - --bulma-warning-25-invert-l: var(--bulma-warning-100-l); - --bulma-warning-25-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-25-invert-l), 1); - --bulma-warning-30: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-30-l), 1); - --bulma-warning-30-invert-l: var(--bulma-warning-100-l); - --bulma-warning-30-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-30-invert-l), 1); - --bulma-warning-35: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-35-l), 1); - --bulma-warning-35-invert-l: var(--bulma-warning-100-l); - --bulma-warning-35-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-35-invert-l), 1); - --bulma-warning-40: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-40-l), 1); - --bulma-warning-40-invert-l: var(--bulma-warning-00-l); - --bulma-warning-40-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-40-invert-l), 1); - --bulma-warning-45: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-45-l), 1); - --bulma-warning-45-invert-l: var(--bulma-warning-05-l); - --bulma-warning-45-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-45-invert-l), 1); - --bulma-warning-50: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-50-l), 1); - --bulma-warning-50-invert-l: var(--bulma-warning-10-l); - --bulma-warning-50-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-50-invert-l), 1); - --bulma-warning-55: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-55-l), 1); - --bulma-warning-55-invert-l: var(--bulma-warning-10-l); - --bulma-warning-55-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-55-invert-l), 1); - --bulma-warning-60: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-60-l), 1); - --bulma-warning-60-invert-l: var(--bulma-warning-10-l); - --bulma-warning-60-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-60-invert-l), 1); - --bulma-warning-65: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-65-l), 1); - --bulma-warning-65-invert-l: var(--bulma-warning-10-l); - --bulma-warning-65-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-65-invert-l), 1); - --bulma-warning-70: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-70-l), 1); - --bulma-warning-70-invert-l: var(--bulma-warning-15-l); - --bulma-warning-70-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-70-invert-l), 1); - --bulma-warning-75: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-75-l), 1); - --bulma-warning-75-invert-l: var(--bulma-warning-15-l); - --bulma-warning-75-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-75-invert-l), 1); - --bulma-warning-80: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-80-l), 1); - --bulma-warning-80-invert-l: var(--bulma-warning-15-l); - --bulma-warning-80-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-80-invert-l), 1); - --bulma-warning-85: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-85-l), 1); - --bulma-warning-85-invert-l: var(--bulma-warning-15-l); - --bulma-warning-85-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-85-invert-l), 1); - --bulma-warning-90: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-90-l), 1); - --bulma-warning-90-invert-l: var(--bulma-warning-15-l); - --bulma-warning-90-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-90-invert-l), 1); - --bulma-warning-95: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-95-l), 1); - --bulma-warning-95-invert-l: var(--bulma-warning-15-l); - --bulma-warning-95-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-95-invert-l), 1); - --bulma-warning-100: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-100-l), 1); - --bulma-warning-100-invert-l: var(--bulma-warning-20-l); - --bulma-warning-100-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-100-invert-l), 1); - --bulma-warning-invert-l: var(--bulma-warning-10-l); - --bulma-warning-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-invert-l), 1); - --bulma-warning-light-l: var(--bulma-warning-90-l); - --bulma-warning-light: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-light-l), 1); - --bulma-warning-light-invert-l: var(--bulma-warning-15-l); - --bulma-warning-light-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-light-invert-l), 1); - --bulma-warning-dark-l: var(--bulma-warning-10-l); - --bulma-warning-dark: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-dark-l), 1); - --bulma-warning-dark-invert-l: var(--bulma-warning-50-l); - --bulma-warning-dark-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-dark-invert-l), 1); - --bulma-warning-soft: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-soft-l), 1); - --bulma-warning-bold: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-bold-l), 1); - --bulma-warning-soft-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-soft-invert-l), 1); - --bulma-warning-bold-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-bold-invert-l), 1); - --bulma-warning-on-scheme-l: 23%; - --bulma-warning-on-scheme: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-on-scheme-l), 1); - --bulma-danger: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-l), 1); - --bulma-danger-base: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-l), 1); - --bulma-danger-rgb: 255, 102, 133; - --bulma-danger-h: 348deg; - --bulma-danger-s: 100%; - --bulma-danger-l: 70%; - --bulma-danger-00-l: 0%; - --bulma-danger-05-l: 5%; - --bulma-danger-10-l: 10%; - --bulma-danger-15-l: 15%; - --bulma-danger-20-l: 20%; - --bulma-danger-25-l: 25%; - --bulma-danger-30-l: 30%; - --bulma-danger-35-l: 35%; - --bulma-danger-40-l: 40%; - --bulma-danger-45-l: 45%; - --bulma-danger-50-l: 50%; - --bulma-danger-55-l: 55%; - --bulma-danger-60-l: 60%; - --bulma-danger-65-l: 65%; - --bulma-danger-70-l: 70%; - --bulma-danger-75-l: 75%; - --bulma-danger-80-l: 80%; - --bulma-danger-85-l: 85%; - --bulma-danger-90-l: 90%; - --bulma-danger-95-l: 95%; - --bulma-danger-100-l: 100%; - --bulma-danger-00: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-00-l), 1); - --bulma-danger-00-invert-l: var(--bulma-danger-65-l); - --bulma-danger-00-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-00-invert-l), 1); - --bulma-danger-05: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-05-l), 1); - --bulma-danger-05-invert-l: var(--bulma-danger-70-l); - --bulma-danger-05-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-05-invert-l), 1); - --bulma-danger-10: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-10-l), 1); - --bulma-danger-10-invert-l: var(--bulma-danger-75-l); - --bulma-danger-10-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-10-invert-l), 1); - --bulma-danger-15: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-15-l), 1); - --bulma-danger-15-invert-l: var(--bulma-danger-80-l); - --bulma-danger-15-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-15-invert-l), 1); - --bulma-danger-20: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-20-l), 1); - --bulma-danger-20-invert-l: var(--bulma-danger-85-l); - --bulma-danger-20-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-20-invert-l), 1); - --bulma-danger-25: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-25-l), 1); - --bulma-danger-25-invert-l: var(--bulma-danger-90-l); - --bulma-danger-25-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-25-invert-l), 1); - --bulma-danger-30: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-30-l), 1); - --bulma-danger-30-invert-l: var(--bulma-danger-100-l); - --bulma-danger-30-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-30-invert-l), 1); - --bulma-danger-35: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-35-l), 1); - --bulma-danger-35-invert-l: var(--bulma-danger-100-l); - --bulma-danger-35-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-35-invert-l), 1); - --bulma-danger-40: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-40-l), 1); - --bulma-danger-40-invert-l: var(--bulma-danger-100-l); - --bulma-danger-40-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-40-invert-l), 1); - --bulma-danger-45: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-45-l), 1); - --bulma-danger-45-invert-l: var(--bulma-danger-100-l); - --bulma-danger-45-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-45-invert-l), 1); - --bulma-danger-50: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-50-l), 1); - --bulma-danger-50-invert-l: var(--bulma-danger-100-l); - --bulma-danger-50-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-50-invert-l), 1); - --bulma-danger-55: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-55-l), 1); - --bulma-danger-55-invert-l: var(--bulma-danger-100-l); - --bulma-danger-55-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-55-invert-l), 1); - --bulma-danger-60: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-60-l), 1); - --bulma-danger-60-invert-l: var(--bulma-danger-100-l); - --bulma-danger-60-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-60-invert-l), 1); - --bulma-danger-65: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-65-l), 1); - --bulma-danger-65-invert-l: var(--bulma-danger-00-l); - --bulma-danger-65-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-65-invert-l), 1); - --bulma-danger-70: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-70-l), 1); - --bulma-danger-70-invert-l: var(--bulma-danger-05-l); - --bulma-danger-70-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-70-invert-l), 1); - --bulma-danger-75: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-75-l), 1); - --bulma-danger-75-invert-l: var(--bulma-danger-10-l); - --bulma-danger-75-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-75-invert-l), 1); - --bulma-danger-80: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-80-l), 1); - --bulma-danger-80-invert-l: var(--bulma-danger-15-l); - --bulma-danger-80-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-80-invert-l), 1); - --bulma-danger-85: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-85-l), 1); - --bulma-danger-85-invert-l: var(--bulma-danger-20-l); - --bulma-danger-85-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-85-invert-l), 1); - --bulma-danger-90: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-90-l), 1); - --bulma-danger-90-invert-l: var(--bulma-danger-25-l); - --bulma-danger-90-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-90-invert-l), 1); - --bulma-danger-95: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-95-l), 1); - --bulma-danger-95-invert-l: var(--bulma-danger-25-l); - --bulma-danger-95-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-95-invert-l), 1); - --bulma-danger-100: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-100-l), 1); - --bulma-danger-100-invert-l: var(--bulma-danger-30-l); - --bulma-danger-100-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-100-invert-l), 1); - --bulma-danger-invert-l: var(--bulma-danger-05-l); - --bulma-danger-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-invert-l), 1); - --bulma-danger-light-l: var(--bulma-danger-90-l); - --bulma-danger-light: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-light-l), 1); - --bulma-danger-light-invert-l: var(--bulma-danger-25-l); - --bulma-danger-light-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-light-invert-l), 1); - --bulma-danger-dark-l: var(--bulma-danger-10-l); - --bulma-danger-dark: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-dark-l), 1); - --bulma-danger-dark-invert-l: var(--bulma-danger-75-l); - --bulma-danger-dark-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-dark-invert-l), 1); - --bulma-danger-soft: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-soft-l), 1); - --bulma-danger-bold: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-bold-l), 1); - --bulma-danger-soft-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-soft-invert-l), 1); - --bulma-danger-bold-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-bold-invert-l), 1); - --bulma-danger-on-scheme-l: 40%; - --bulma-danger-on-scheme: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-on-scheme-l), 1); - --bulma-black-bis: hsl(221, 14%, 9%); - --bulma-black-ter: hsl(221, 14%, 14%); - --bulma-grey-darker: hsl(221, 14%, 21%); - --bulma-grey-dark: hsl(221, 14%, 29%); - --bulma-grey: hsl(221, 14%, 48%); - --bulma-grey-light: hsl(221, 14%, 71%); - --bulma-grey-lighter: hsl(221, 14%, 86%); - --bulma-white-ter: hsl(221, 14%, 96%); - --bulma-white-bis: hsl(221, 14%, 98%); - --bulma-shadow-h: 221deg; - --bulma-shadow-s: 14%; - --bulma-shadow-l: 4%; - --bulma-size-1: 3rem; - --bulma-size-2: 2.5rem; - --bulma-size-3: 2rem; - --bulma-size-4: 1.5rem; - --bulma-size-5: 1.25rem; - --bulma-size-6: 1rem; - --bulma-size-7: 0.75rem; - --bulma-scheme-main: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-main-l)); - --bulma-scheme-main-bis: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-main-bis-l)); - --bulma-scheme-main-ter: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-main-ter-l)); - --bulma-background: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-background-l)); - --bulma-background-hover: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-background-l) + var(--bulma-hover-background-l-delta))); - --bulma-background-active: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-background-l) + var(--bulma-active-background-l-delta))); - --bulma-border-weak: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-border-weak-l)); - --bulma-border: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-border-l)); - --bulma-border-hover: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-border-l) + var(--bulma-hover-border-l-delta))); - --bulma-border-active: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-border-l) + var(--bulma-active-border-l-delta))); - --bulma-text-weak: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-weak-l)); - --bulma-text: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-l)); - --bulma-text-strong: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-strong-l)); - --bulma-scheme-invert-ter: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-ter-l)); - --bulma-scheme-invert-bis: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-bis-l)); - --bulma-scheme-invert: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l)); - --bulma-link: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-l)); - --bulma-link-text: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l)); - --bulma-link-text-hover: hsl(var(--bulma-link-h), var(--bulma-link-s), calc(var(--bulma-link-on-scheme-l) + var(--bulma-hover-color-l-delta))); - --bulma-link-text-active: hsl(var(--bulma-link-h), var(--bulma-link-s), calc(var(--bulma-link-on-scheme-l) + var(--bulma-active-color-l-delta))); - --bulma-focus-h: var(--bulma-link-h); - --bulma-focus-s: var(--bulma-link-s); - --bulma-focus-l: var(--bulma-link-l); - --bulma-focus-offset: 1px; - --bulma-focus-style: solid; - --bulma-focus-width: 2px; - --bulma-focus-shadow-size: 0 0 0 0.1875em; - --bulma-focus-shadow-alpha: 0.25; - --bulma-code: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-on-scheme-l)); - --bulma-code-background: var(--bulma-background); - --bulma-pre: var(--bulma-text); - --bulma-pre-background: var(--bulma-background); - --bulma-shadow: 0 0.5em 1em -0.125em hsla(var(--bulma-shadow-h), var(--bulma-shadow-s), var(--bulma-shadow-l), 0.1), 0 0px 0 1px hsla(var(--bulma-shadow-h), var(--bulma-shadow-s), var(--bulma-shadow-l), 0.02); -} - -@media (prefers-color-scheme: light) { - :root { - --bulma-scheme-h: 221; - --bulma-scheme-s: 14%; - --bulma-light-l: 90%; - --bulma-light-invert-l: 20%; - --bulma-dark-l: 20%; - --bulma-dark-invert-l: 90%; - --bulma-soft-l: 90%; - --bulma-bold-l: 20%; - --bulma-soft-invert-l: 20%; - --bulma-bold-invert-l: 90%; - --bulma-hover-background-l-delta: -5%; - --bulma-active-background-l-delta: -10%; - --bulma-hover-border-l-delta: -10%; - --bulma-active-border-l-delta: -20%; - --bulma-hover-color-l-delta: -5%; - --bulma-active-color-l-delta: -10%; - --bulma-hover-shadow-a-delta: -0.05; - --bulma-active-shadow-a-delta: -0.1; - --bulma-scheme-brightness: light; - --bulma-scheme-main-l: 100%; - --bulma-scheme-main-bis-l: 98%; - --bulma-scheme-main-ter-l: 96%; - --bulma-background-l: 96%; - --bulma-border-weak-l: 93%; - --bulma-border-l: 86%; - --bulma-text-weak-l: 48%; - --bulma-text-l: 29%; - --bulma-text-strong-l: 21%; - --bulma-text-title-l: 14%; - --bulma-scheme-invert-ter-l: 14%; - --bulma-scheme-invert-bis-l: 7%; - --bulma-scheme-invert-l: 4%; - --bulma-family-primary: "Nunito", sans-serif; - --bulma-family-secondary: Inter, SF Pro, Segoe UI, Roboto, Oxygen, Ubuntu, Helvetica Neue, Helvetica, Arial, sans-serif; - --bulma-family-code: Inconsolata, Hack, SF Mono, Roboto Mono, Source Code Pro, Ubuntu Mono, monospace; - --bulma-size-small: 0.75rem; - --bulma-size-normal: 1rem; - --bulma-size-medium: 1.25rem; - --bulma-size-large: 1.5rem; - --bulma-weight-light: 300; - --bulma-weight-normal: 400; - --bulma-weight-medium: 500; - --bulma-weight-semibold: 600; - --bulma-weight-bold: 700; - --bulma-weight-extrabold: 800; - --bulma-block-spacing: 1.5rem; - --bulma-duration: 294ms; - --bulma-easing: ease-out; - --bulma-radius-small: 0.25rem; - --bulma-radius: 0.375rem; - --bulma-radius-medium: 0.5em; - --bulma-radius-large: 0.75rem; - --bulma-radius-rounded: 9999px; - --bulma-speed: 86ms; - --bulma-arrow-color: var(--bulma-link); - --bulma-loading-color: var(--bulma-border); - --bulma-burger-h: var(--bulma-link-h); - --bulma-burger-s: var(--bulma-link-s); - --bulma-burger-l: var(--bulma-link-l); - --bulma-burger-border-radius: 0.5em; - --bulma-burger-gap: 5px; - --bulma-burger-item-height: 2px; - --bulma-burger-item-width: 20px; - --bulma-white: hsla(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-l), 1); - --bulma-white-base: hsla(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-l), 1); - --bulma-white-rgb: 255, 255, 255; - --bulma-white-h: 221deg; - --bulma-white-s: 14%; - --bulma-white-l: 100%; - --bulma-white-invert-l: 4%; - --bulma-white-invert: hsl(221, 14%, 4%); - --bulma-white-on-scheme-l: 35%; - --bulma-white-on-scheme: hsla(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-on-scheme-l), 1); - --bulma-black: hsla(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-l), 1); - --bulma-black-base: hsla(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-l), 1); - --bulma-black-rgb: 9, 10, 12; - --bulma-black-h: 221deg; - --bulma-black-s: 14%; - --bulma-black-l: 4%; - --bulma-black-invert-l: 100%; - --bulma-black-invert: hsl(221, 14%, 100%); - --bulma-black-on-scheme-l: 4%; - --bulma-black-on-scheme: hsla(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-on-scheme-l), 1); - --bulma-light: hsla(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-l), 1); - --bulma-light-base: hsla(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-l), 1); - --bulma-light-rgb: 243, 244, 246; - --bulma-light-h: 221deg; - --bulma-light-s: 14%; - --bulma-light-l: 96%; - --bulma-light-invert-l: 21%; - --bulma-light-invert: hsl(221, 14%, 21%); - --bulma-light-on-scheme-l: 36%; - --bulma-light-on-scheme: hsla(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-on-scheme-l), 1); - --bulma-dark: hsla(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-l), 1); - --bulma-dark-base: hsla(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-l), 1); - --bulma-dark-rgb: 46, 51, 61; - --bulma-dark-h: 221deg; - --bulma-dark-s: 14%; - --bulma-dark-l: 21%; - --bulma-dark-invert-l: 96%; - --bulma-dark-invert: hsl(221, 14%, 96%); - --bulma-dark-on-scheme-l: 21%; - --bulma-dark-on-scheme: hsla(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-on-scheme-l), 1); - --bulma-text: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-l), 1); - --bulma-text-base: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-l), 1); - --bulma-text-rgb: 64, 70, 84; - --bulma-text-h: 221deg; - --bulma-text-s: 14%; - --bulma-text-l: 29%; - --bulma-text-00-l: 0%; - --bulma-text-05-l: 4%; - --bulma-text-10-l: 9%; - --bulma-text-15-l: 14%; - --bulma-text-20-l: 19%; - --bulma-text-25-l: 24%; - --bulma-text-30-l: 29%; - --bulma-text-35-l: 34%; - --bulma-text-40-l: 39%; - --bulma-text-45-l: 44%; - --bulma-text-50-l: 49%; - --bulma-text-55-l: 54%; - --bulma-text-60-l: 59%; - --bulma-text-65-l: 64%; - --bulma-text-70-l: 69%; - --bulma-text-75-l: 74%; - --bulma-text-80-l: 79%; - --bulma-text-85-l: 84%; - --bulma-text-90-l: 89%; - --bulma-text-95-l: 94%; - --bulma-text-100-l: 99%; - --bulma-text-00: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-00-l), 1); - --bulma-text-00-invert-l: var(--bulma-text-60-l); - --bulma-text-00-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-00-invert-l), 1); - --bulma-text-05: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-05-l), 1); - --bulma-text-05-invert-l: var(--bulma-text-60-l); - --bulma-text-05-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-05-invert-l), 1); - --bulma-text-10: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-10-l), 1); - --bulma-text-10-invert-l: var(--bulma-text-70-l); - --bulma-text-10-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-10-invert-l), 1); - --bulma-text-15: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-15-l), 1); - --bulma-text-15-invert-l: var(--bulma-text-75-l); - --bulma-text-15-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-15-invert-l), 1); - --bulma-text-20: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-20-l), 1); - --bulma-text-20-invert-l: var(--bulma-text-85-l); - --bulma-text-20-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-20-invert-l), 1); - --bulma-text-25: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-25-l), 1); - --bulma-text-25-invert-l: var(--bulma-text-95-l); - --bulma-text-25-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-25-invert-l), 1); - --bulma-text-30: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-30-l), 1); - --bulma-text-30-invert-l: var(--bulma-text-100-l); - --bulma-text-30-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-30-invert-l), 1); - --bulma-text-35: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-35-l), 1); - --bulma-text-35-invert-l: var(--bulma-text-100-l); - --bulma-text-35-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-35-invert-l), 1); - --bulma-text-40: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-40-l), 1); - --bulma-text-40-invert-l: var(--bulma-text-100-l); - --bulma-text-40-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-40-invert-l), 1); - --bulma-text-45: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-45-l), 1); - --bulma-text-45-invert-l: var(--bulma-text-100-l); - --bulma-text-45-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-45-invert-l), 1); - --bulma-text-50: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-50-l), 1); - --bulma-text-50-invert-l: var(--bulma-text-100-l); - --bulma-text-50-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-50-invert-l), 1); - --bulma-text-55: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-55-l), 1); - --bulma-text-55-invert-l: var(--bulma-text-100-l); - --bulma-text-55-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-55-invert-l), 1); - --bulma-text-60: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-60-l), 1); - --bulma-text-60-invert-l: var(--bulma-text-05-l); - --bulma-text-60-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-60-invert-l), 1); - --bulma-text-65: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-65-l), 1); - --bulma-text-65-invert-l: var(--bulma-text-05-l); - --bulma-text-65-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-65-invert-l), 1); - --bulma-text-70: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-70-l), 1); - --bulma-text-70-invert-l: var(--bulma-text-10-l); - --bulma-text-70-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-70-invert-l), 1); - --bulma-text-75: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-75-l), 1); - --bulma-text-75-invert-l: var(--bulma-text-15-l); - --bulma-text-75-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-75-invert-l), 1); - --bulma-text-80: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-80-l), 1); - --bulma-text-80-invert-l: var(--bulma-text-15-l); - --bulma-text-80-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-80-invert-l), 1); - --bulma-text-85: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-85-l), 1); - --bulma-text-85-invert-l: var(--bulma-text-20-l); - --bulma-text-85-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-85-invert-l), 1); - --bulma-text-90: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-90-l), 1); - --bulma-text-90-invert-l: var(--bulma-text-20-l); - --bulma-text-90-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-90-invert-l), 1); - --bulma-text-95: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-95-l), 1); - --bulma-text-95-invert-l: var(--bulma-text-25-l); - --bulma-text-95-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-95-invert-l), 1); - --bulma-text-100: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-100-l), 1); - --bulma-text-100-invert-l: var(--bulma-text-25-l); - --bulma-text-100-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-100-invert-l), 1); - --bulma-text-invert-l: var(--bulma-text-100-l); - --bulma-text-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-invert-l), 1); - --bulma-text-light-l: var(--bulma-text-90-l); - --bulma-text-light: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-light-l), 1); - --bulma-text-light-invert-l: var(--bulma-text-20-l); - --bulma-text-light-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-light-invert-l), 1); - --bulma-text-dark-l: var(--bulma-text-10-l); - --bulma-text-dark: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-dark-l), 1); - --bulma-text-dark-invert-l: var(--bulma-text-70-l); - --bulma-text-dark-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-dark-invert-l), 1); - --bulma-text-soft: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-soft-l), 1); - --bulma-text-bold: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-bold-l), 1); - --bulma-text-soft-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-soft-invert-l), 1); - --bulma-text-bold-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-bold-invert-l), 1); - --bulma-text-on-scheme-l: 29%; - --bulma-text-on-scheme: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-on-scheme-l), 1); - --bulma-primary: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l), 1); - --bulma-primary-base: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l), 1); - --bulma-primary-rgb: 0, 209, 178; - --bulma-primary-h: 171deg; - --bulma-primary-s: 100%; - --bulma-primary-l: 41%; - --bulma-primary-00-l: 1%; - --bulma-primary-05-l: 6%; - --bulma-primary-10-l: 11%; - --bulma-primary-15-l: 16%; - --bulma-primary-20-l: 21%; - --bulma-primary-25-l: 26%; - --bulma-primary-30-l: 31%; - --bulma-primary-35-l: 36%; - --bulma-primary-40-l: 41%; - --bulma-primary-45-l: 46%; - --bulma-primary-50-l: 51%; - --bulma-primary-55-l: 56%; - --bulma-primary-60-l: 61%; - --bulma-primary-65-l: 66%; - --bulma-primary-70-l: 71%; - --bulma-primary-75-l: 76%; - --bulma-primary-80-l: 81%; - --bulma-primary-85-l: 86%; - --bulma-primary-90-l: 91%; - --bulma-primary-95-l: 96%; - --bulma-primary-100-l: 100%; - --bulma-primary-00: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-00-l), 1); - --bulma-primary-00-invert-l: var(--bulma-primary-30-l); - --bulma-primary-00-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-00-invert-l), 1); - --bulma-primary-05: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-05-l), 1); - --bulma-primary-05-invert-l: var(--bulma-primary-40-l); - --bulma-primary-05-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-05-invert-l), 1); - --bulma-primary-10: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-10-l), 1); - --bulma-primary-10-invert-l: var(--bulma-primary-50-l); - --bulma-primary-10-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-10-invert-l), 1); - --bulma-primary-15: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-15-l), 1); - --bulma-primary-15-invert-l: var(--bulma-primary-100-l); - --bulma-primary-15-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-15-invert-l), 1); - --bulma-primary-20: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-20-l), 1); - --bulma-primary-20-invert-l: var(--bulma-primary-100-l); - --bulma-primary-20-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-20-invert-l), 1); - --bulma-primary-25: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-25-l), 1); - --bulma-primary-25-invert-l: var(--bulma-primary-100-l); - --bulma-primary-25-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-25-invert-l), 1); - --bulma-primary-30: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-30-l), 1); - --bulma-primary-30-invert-l: var(--bulma-primary-00-l); - --bulma-primary-30-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-30-invert-l), 1); - --bulma-primary-35: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-35-l), 1); - --bulma-primary-35-invert-l: var(--bulma-primary-00-l); - --bulma-primary-35-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-35-invert-l), 1); - --bulma-primary-40: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-40-l), 1); - --bulma-primary-40-invert-l: var(--bulma-primary-05-l); - --bulma-primary-40-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-40-invert-l), 1); - --bulma-primary-45: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-45-l), 1); - --bulma-primary-45-invert-l: var(--bulma-primary-05-l); - --bulma-primary-45-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-45-invert-l), 1); - --bulma-primary-50: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-50-l), 1); - --bulma-primary-50-invert-l: var(--bulma-primary-10-l); - --bulma-primary-50-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-50-invert-l), 1); - --bulma-primary-55: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-55-l), 1); - --bulma-primary-55-invert-l: var(--bulma-primary-10-l); - --bulma-primary-55-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-55-invert-l), 1); - --bulma-primary-60: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-60-l), 1); - --bulma-primary-60-invert-l: var(--bulma-primary-10-l); - --bulma-primary-60-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-60-invert-l), 1); - --bulma-primary-65: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-65-l), 1); - --bulma-primary-65-invert-l: var(--bulma-primary-10-l); - --bulma-primary-65-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-65-invert-l), 1); - --bulma-primary-70: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-70-l), 1); - --bulma-primary-70-invert-l: var(--bulma-primary-10-l); - --bulma-primary-70-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-70-invert-l), 1); - --bulma-primary-75: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-75-l), 1); - --bulma-primary-75-invert-l: var(--bulma-primary-10-l); - --bulma-primary-75-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-75-invert-l), 1); - --bulma-primary-80: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-80-l), 1); - --bulma-primary-80-invert-l: var(--bulma-primary-10-l); - --bulma-primary-80-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-80-invert-l), 1); - --bulma-primary-85: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-85-l), 1); - --bulma-primary-85-invert-l: var(--bulma-primary-10-l); - --bulma-primary-85-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-85-invert-l), 1); - --bulma-primary-90: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-90-l), 1); - --bulma-primary-90-invert-l: var(--bulma-primary-10-l); - --bulma-primary-90-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-90-invert-l), 1); - --bulma-primary-95: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-95-l), 1); - --bulma-primary-95-invert-l: var(--bulma-primary-10-l); - --bulma-primary-95-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-95-invert-l), 1); - --bulma-primary-100: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-100-l), 1); - --bulma-primary-100-invert-l: var(--bulma-primary-15-l); - --bulma-primary-100-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-100-invert-l), 1); - --bulma-primary-invert-l: var(--bulma-primary-05-l); - --bulma-primary-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-invert-l), 1); - --bulma-primary-light-l: var(--bulma-primary-90-l); - --bulma-primary-light: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-light-l), 1); - --bulma-primary-light-invert-l: var(--bulma-primary-10-l); - --bulma-primary-light-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-light-invert-l), 1); - --bulma-primary-dark-l: var(--bulma-primary-10-l); - --bulma-primary-dark: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-dark-l), 1); - --bulma-primary-dark-invert-l: var(--bulma-primary-50-l); - --bulma-primary-dark-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-dark-invert-l), 1); - --bulma-primary-soft: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-soft-l), 1); - --bulma-primary-bold: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-bold-l), 1); - --bulma-primary-soft-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-soft-invert-l), 1); - --bulma-primary-bold-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-bold-invert-l), 1); - --bulma-primary-on-scheme-l: 20.9803921569%; - --bulma-primary-on-scheme: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-on-scheme-l), 1); - --bulma-link: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-l), 1); - --bulma-link-base: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-l), 1); - --bulma-link-rgb: 66, 88, 255; - --bulma-link-h: 233deg; - --bulma-link-s: 100%; - --bulma-link-l: 63%; - --bulma-link-00-l: 0%; - --bulma-link-05-l: 3%; - --bulma-link-10-l: 8%; - --bulma-link-15-l: 13%; - --bulma-link-20-l: 18%; - --bulma-link-25-l: 23%; - --bulma-link-30-l: 28%; - --bulma-link-35-l: 33%; - --bulma-link-40-l: 38%; - --bulma-link-45-l: 43%; - --bulma-link-50-l: 48%; - --bulma-link-55-l: 53%; - --bulma-link-60-l: 58%; - --bulma-link-65-l: 63%; - --bulma-link-70-l: 68%; - --bulma-link-75-l: 73%; - --bulma-link-80-l: 78%; - --bulma-link-85-l: 83%; - --bulma-link-90-l: 88%; - --bulma-link-95-l: 93%; - --bulma-link-100-l: 98%; - --bulma-link-00: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-00-l), 1); - --bulma-link-00-invert-l: var(--bulma-link-75-l); - --bulma-link-00-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-00-invert-l), 1); - --bulma-link-05: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-05-l), 1); - --bulma-link-05-invert-l: var(--bulma-link-75-l); - --bulma-link-05-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-05-invert-l), 1); - --bulma-link-10: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-10-l), 1); - --bulma-link-10-invert-l: var(--bulma-link-75-l); - --bulma-link-10-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-10-invert-l), 1); - --bulma-link-15: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-15-l), 1); - --bulma-link-15-invert-l: var(--bulma-link-80-l); - --bulma-link-15-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-15-invert-l), 1); - --bulma-link-20: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-20-l), 1); - --bulma-link-20-invert-l: var(--bulma-link-80-l); - --bulma-link-20-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-20-invert-l), 1); - --bulma-link-25: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-25-l), 1); - --bulma-link-25-invert-l: var(--bulma-link-85-l); - --bulma-link-25-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-25-invert-l), 1); - --bulma-link-30: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-30-l), 1); - --bulma-link-30-invert-l: var(--bulma-link-90-l); - --bulma-link-30-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-30-invert-l), 1); - --bulma-link-35: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-35-l), 1); - --bulma-link-35-invert-l: var(--bulma-link-90-l); - --bulma-link-35-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-35-invert-l), 1); - --bulma-link-40: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-40-l), 1); - --bulma-link-40-invert-l: var(--bulma-link-95-l); - --bulma-link-40-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-40-invert-l), 1); - --bulma-link-45: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-45-l), 1); - --bulma-link-45-invert-l: var(--bulma-link-100-l); - --bulma-link-45-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-45-invert-l), 1); - --bulma-link-50: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-50-l), 1); - --bulma-link-50-invert-l: var(--bulma-link-100-l); - --bulma-link-50-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-50-invert-l), 1); - --bulma-link-55: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-55-l), 1); - --bulma-link-55-invert-l: var(--bulma-link-100-l); - --bulma-link-55-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-55-invert-l), 1); - --bulma-link-60: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-60-l), 1); - --bulma-link-60-invert-l: var(--bulma-link-100-l); - --bulma-link-60-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-60-invert-l), 1); - --bulma-link-65: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-65-l), 1); - --bulma-link-65-invert-l: var(--bulma-link-100-l); - --bulma-link-65-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-65-invert-l), 1); - --bulma-link-70: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-70-l), 1); - --bulma-link-70-invert-l: var(--bulma-link-100-l); - --bulma-link-70-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-70-invert-l), 1); - --bulma-link-75: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-75-l), 1); - --bulma-link-75-invert-l: var(--bulma-link-10-l); - --bulma-link-75-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-75-invert-l), 1); - --bulma-link-80: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-80-l), 1); - --bulma-link-80-invert-l: var(--bulma-link-20-l); - --bulma-link-80-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-80-invert-l), 1); - --bulma-link-85: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-85-l), 1); - --bulma-link-85-invert-l: var(--bulma-link-25-l); - --bulma-link-85-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-85-invert-l), 1); - --bulma-link-90: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-90-l), 1); - --bulma-link-90-invert-l: var(--bulma-link-35-l); - --bulma-link-90-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-90-invert-l), 1); - --bulma-link-95: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-95-l), 1); - --bulma-link-95-invert-l: var(--bulma-link-40-l); - --bulma-link-95-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-95-invert-l), 1); - --bulma-link-100: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-100-l), 1); - --bulma-link-100-invert-l: var(--bulma-link-50-l); - --bulma-link-100-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-100-invert-l), 1); - --bulma-link-invert-l: var(--bulma-link-100-l); - --bulma-link-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-invert-l), 1); - --bulma-link-light-l: var(--bulma-link-90-l); - --bulma-link-light: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-light-l), 1); - --bulma-link-light-invert-l: var(--bulma-link-35-l); - --bulma-link-light-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-light-invert-l), 1); - --bulma-link-dark-l: var(--bulma-link-10-l); - --bulma-link-dark: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-dark-l), 1); - --bulma-link-dark-invert-l: var(--bulma-link-75-l); - --bulma-link-dark-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-dark-invert-l), 1); - --bulma-link-soft: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-soft-l), 1); - --bulma-link-bold: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-bold-l), 1); - --bulma-link-soft-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-soft-invert-l), 1); - --bulma-link-bold-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-bold-invert-l), 1); - --bulma-link-on-scheme-l: 58%; - --bulma-link-on-scheme: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l), 1); - --bulma-info: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-l), 1); - --bulma-info-base: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-l), 1); - --bulma-info-rgb: 102, 209, 255; - --bulma-info-h: 198deg; - --bulma-info-s: 100%; - --bulma-info-l: 70%; - --bulma-info-00-l: 0%; - --bulma-info-05-l: 5%; - --bulma-info-10-l: 10%; - --bulma-info-15-l: 15%; - --bulma-info-20-l: 20%; - --bulma-info-25-l: 25%; - --bulma-info-30-l: 30%; - --bulma-info-35-l: 35%; - --bulma-info-40-l: 40%; - --bulma-info-45-l: 45%; - --bulma-info-50-l: 50%; - --bulma-info-55-l: 55%; - --bulma-info-60-l: 60%; - --bulma-info-65-l: 65%; - --bulma-info-70-l: 70%; - --bulma-info-75-l: 75%; - --bulma-info-80-l: 80%; - --bulma-info-85-l: 85%; - --bulma-info-90-l: 90%; - --bulma-info-95-l: 95%; - --bulma-info-100-l: 100%; - --bulma-info-00: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-00-l), 1); - --bulma-info-00-invert-l: var(--bulma-info-45-l); - --bulma-info-00-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-00-invert-l), 1); - --bulma-info-05: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-05-l), 1); - --bulma-info-05-invert-l: var(--bulma-info-50-l); - --bulma-info-05-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-05-invert-l), 1); - --bulma-info-10: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-10-l), 1); - --bulma-info-10-invert-l: var(--bulma-info-60-l); - --bulma-info-10-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-10-invert-l), 1); - --bulma-info-15: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-15-l), 1); - --bulma-info-15-invert-l: var(--bulma-info-80-l); - --bulma-info-15-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-15-invert-l), 1); - --bulma-info-20: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-20-l), 1); - --bulma-info-20-invert-l: var(--bulma-info-95-l); - --bulma-info-20-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-20-invert-l), 1); - --bulma-info-25: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-25-l), 1); - --bulma-info-25-invert-l: var(--bulma-info-100-l); - --bulma-info-25-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-25-invert-l), 1); - --bulma-info-30: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-30-l), 1); - --bulma-info-30-invert-l: var(--bulma-info-100-l); - --bulma-info-30-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-30-invert-l), 1); - --bulma-info-35: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-35-l), 1); - --bulma-info-35-invert-l: var(--bulma-info-100-l); - --bulma-info-35-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-35-invert-l), 1); - --bulma-info-40: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-40-l), 1); - --bulma-info-40-invert-l: var(--bulma-info-100-l); - --bulma-info-40-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-40-invert-l), 1); - --bulma-info-45: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-45-l), 1); - --bulma-info-45-invert-l: var(--bulma-info-00-l); - --bulma-info-45-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-45-invert-l), 1); - --bulma-info-50: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-50-l), 1); - --bulma-info-50-invert-l: var(--bulma-info-05-l); - --bulma-info-50-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-50-invert-l), 1); - --bulma-info-55: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-55-l), 1); - --bulma-info-55-invert-l: var(--bulma-info-05-l); - --bulma-info-55-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-55-invert-l), 1); - --bulma-info-60: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-60-l), 1); - --bulma-info-60-invert-l: var(--bulma-info-10-l); - --bulma-info-60-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-60-invert-l), 1); - --bulma-info-65: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-65-l), 1); - --bulma-info-65-invert-l: var(--bulma-info-10-l); - --bulma-info-65-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-65-invert-l), 1); - --bulma-info-70: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-70-l), 1); - --bulma-info-70-invert-l: var(--bulma-info-10-l); - --bulma-info-70-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-70-invert-l), 1); - --bulma-info-75: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-75-l), 1); - --bulma-info-75-invert-l: var(--bulma-info-10-l); - --bulma-info-75-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-75-invert-l), 1); - --bulma-info-80: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-80-l), 1); - --bulma-info-80-invert-l: var(--bulma-info-15-l); - --bulma-info-80-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-80-invert-l), 1); - --bulma-info-85: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-85-l), 1); - --bulma-info-85-invert-l: var(--bulma-info-15-l); - --bulma-info-85-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-85-invert-l), 1); - --bulma-info-90: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-90-l), 1); - --bulma-info-90-invert-l: var(--bulma-info-15-l); - --bulma-info-90-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-90-invert-l), 1); - --bulma-info-95: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-95-l), 1); - --bulma-info-95-invert-l: var(--bulma-info-20-l); - --bulma-info-95-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-95-invert-l), 1); - --bulma-info-100: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-100-l), 1); - --bulma-info-100-invert-l: var(--bulma-info-20-l); - --bulma-info-100-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-100-invert-l), 1); - --bulma-info-invert-l: var(--bulma-info-10-l); - --bulma-info-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-invert-l), 1); - --bulma-info-light-l: var(--bulma-info-90-l); - --bulma-info-light: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-light-l), 1); - --bulma-info-light-invert-l: var(--bulma-info-15-l); - --bulma-info-light-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-light-invert-l), 1); - --bulma-info-dark-l: var(--bulma-info-10-l); - --bulma-info-dark: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-dark-l), 1); - --bulma-info-dark-invert-l: var(--bulma-info-60-l); - --bulma-info-dark-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-dark-invert-l), 1); - --bulma-info-soft: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-soft-l), 1); - --bulma-info-bold: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-bold-l), 1); - --bulma-info-soft-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-soft-invert-l), 1); - --bulma-info-bold-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-bold-invert-l), 1); - --bulma-info-on-scheme-l: 25%; - --bulma-info-on-scheme: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-on-scheme-l), 1); - --bulma-success: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-l), 1); - --bulma-success-base: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-l), 1); - --bulma-success-rgb: 72, 199, 142; - --bulma-success-h: 153deg; - --bulma-success-s: 53%; - --bulma-success-l: 53%; - --bulma-success-00-l: 0%; - --bulma-success-05-l: 3%; - --bulma-success-10-l: 8%; - --bulma-success-15-l: 13%; - --bulma-success-20-l: 18%; - --bulma-success-25-l: 23%; - --bulma-success-30-l: 28%; - --bulma-success-35-l: 33%; - --bulma-success-40-l: 38%; - --bulma-success-45-l: 43%; - --bulma-success-50-l: 48%; - --bulma-success-55-l: 53%; - --bulma-success-60-l: 58%; - --bulma-success-65-l: 63%; - --bulma-success-70-l: 68%; - --bulma-success-75-l: 73%; - --bulma-success-80-l: 78%; - --bulma-success-85-l: 83%; - --bulma-success-90-l: 88%; - --bulma-success-95-l: 93%; - --bulma-success-100-l: 98%; - --bulma-success-00: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-00-l), 1); - --bulma-success-00-invert-l: var(--bulma-success-45-l); - --bulma-success-00-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-00-invert-l), 1); - --bulma-success-05: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-05-l), 1); - --bulma-success-05-invert-l: var(--bulma-success-45-l); - --bulma-success-05-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-05-invert-l), 1); - --bulma-success-10: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-10-l), 1); - --bulma-success-10-invert-l: var(--bulma-success-55-l); - --bulma-success-10-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-10-invert-l), 1); - --bulma-success-15: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-15-l), 1); - --bulma-success-15-invert-l: var(--bulma-success-75-l); - --bulma-success-15-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-15-invert-l), 1); - --bulma-success-20: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-20-l), 1); - --bulma-success-20-invert-l: var(--bulma-success-90-l); - --bulma-success-20-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-20-invert-l), 1); - --bulma-success-25: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-25-l), 1); - --bulma-success-25-invert-l: var(--bulma-success-100-l); - --bulma-success-25-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-25-invert-l), 1); - --bulma-success-30: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-30-l), 1); - --bulma-success-30-invert-l: var(--bulma-success-100-l); - --bulma-success-30-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-30-invert-l), 1); - --bulma-success-35: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-35-l), 1); - --bulma-success-35-invert-l: var(--bulma-success-100-l); - --bulma-success-35-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-35-invert-l), 1); - --bulma-success-40: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-40-l), 1); - --bulma-success-40-invert-l: var(--bulma-success-100-l); - --bulma-success-40-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-40-invert-l), 1); - --bulma-success-45: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-45-l), 1); - --bulma-success-45-invert-l: var(--bulma-success-05-l); - --bulma-success-45-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-45-invert-l), 1); - --bulma-success-50: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-50-l), 1); - --bulma-success-50-invert-l: var(--bulma-success-05-l); - --bulma-success-50-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-50-invert-l), 1); - --bulma-success-55: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-55-l), 1); - --bulma-success-55-invert-l: var(--bulma-success-10-l); - --bulma-success-55-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-55-invert-l), 1); - --bulma-success-60: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-60-l), 1); - --bulma-success-60-invert-l: var(--bulma-success-10-l); - --bulma-success-60-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-60-invert-l), 1); - --bulma-success-65: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-65-l), 1); - --bulma-success-65-invert-l: var(--bulma-success-10-l); - --bulma-success-65-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-65-invert-l), 1); - --bulma-success-70: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-70-l), 1); - --bulma-success-70-invert-l: var(--bulma-success-10-l); - --bulma-success-70-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-70-invert-l), 1); - --bulma-success-75: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-75-l), 1); - --bulma-success-75-invert-l: var(--bulma-success-15-l); - --bulma-success-75-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-75-invert-l), 1); - --bulma-success-80: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-80-l), 1); - --bulma-success-80-invert-l: var(--bulma-success-15-l); - --bulma-success-80-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-80-invert-l), 1); - --bulma-success-85: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-85-l), 1); - --bulma-success-85-invert-l: var(--bulma-success-15-l); - --bulma-success-85-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-85-invert-l), 1); - --bulma-success-90: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-90-l), 1); - --bulma-success-90-invert-l: var(--bulma-success-20-l); - --bulma-success-90-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-90-invert-l), 1); - --bulma-success-95: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-95-l), 1); - --bulma-success-95-invert-l: var(--bulma-success-20-l); - --bulma-success-95-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-95-invert-l), 1); - --bulma-success-100: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-100-l), 1); - --bulma-success-100-invert-l: var(--bulma-success-20-l); - --bulma-success-100-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-100-invert-l), 1); - --bulma-success-invert-l: var(--bulma-success-10-l); - --bulma-success-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-invert-l), 1); - --bulma-success-light-l: var(--bulma-success-90-l); - --bulma-success-light: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-light-l), 1); - --bulma-success-light-invert-l: var(--bulma-success-20-l); - --bulma-success-light-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-light-invert-l), 1); - --bulma-success-dark-l: var(--bulma-success-10-l); - --bulma-success-dark: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-dark-l), 1); - --bulma-success-dark-invert-l: var(--bulma-success-55-l); - --bulma-success-dark-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-dark-invert-l), 1); - --bulma-success-soft: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-soft-l), 1); - --bulma-success-bold: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-bold-l), 1); - --bulma-success-soft-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-soft-invert-l), 1); - --bulma-success-bold-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-bold-invert-l), 1); - --bulma-success-on-scheme-l: 23%; - --bulma-success-on-scheme: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-on-scheme-l), 1); - --bulma-warning: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-l), 1); - --bulma-warning-base: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-l), 1); - --bulma-warning-rgb: 255, 183, 15; - --bulma-warning-h: 42deg; - --bulma-warning-s: 100%; - --bulma-warning-l: 53%; - --bulma-warning-00-l: 0%; - --bulma-warning-05-l: 3%; - --bulma-warning-10-l: 8%; - --bulma-warning-15-l: 13%; - --bulma-warning-20-l: 18%; - --bulma-warning-25-l: 23%; - --bulma-warning-30-l: 28%; - --bulma-warning-35-l: 33%; - --bulma-warning-40-l: 38%; - --bulma-warning-45-l: 43%; - --bulma-warning-50-l: 48%; - --bulma-warning-55-l: 53%; - --bulma-warning-60-l: 58%; - --bulma-warning-65-l: 63%; - --bulma-warning-70-l: 68%; - --bulma-warning-75-l: 73%; - --bulma-warning-80-l: 78%; - --bulma-warning-85-l: 83%; - --bulma-warning-90-l: 88%; - --bulma-warning-95-l: 93%; - --bulma-warning-100-l: 98%; - --bulma-warning-00: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-00-l), 1); - --bulma-warning-00-invert-l: var(--bulma-warning-40-l); - --bulma-warning-00-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-00-invert-l), 1); - --bulma-warning-05: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-05-l), 1); - --bulma-warning-05-invert-l: var(--bulma-warning-45-l); - --bulma-warning-05-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-05-invert-l), 1); - --bulma-warning-10: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-10-l), 1); - --bulma-warning-10-invert-l: var(--bulma-warning-50-l); - --bulma-warning-10-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-10-invert-l), 1); - --bulma-warning-15: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-15-l), 1); - --bulma-warning-15-invert-l: var(--bulma-warning-70-l); - --bulma-warning-15-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-15-invert-l), 1); - --bulma-warning-20: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-20-l), 1); - --bulma-warning-20-invert-l: var(--bulma-warning-100-l); - --bulma-warning-20-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-20-invert-l), 1); - --bulma-warning-25: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-25-l), 1); - --bulma-warning-25-invert-l: var(--bulma-warning-100-l); - --bulma-warning-25-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-25-invert-l), 1); - --bulma-warning-30: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-30-l), 1); - --bulma-warning-30-invert-l: var(--bulma-warning-100-l); - --bulma-warning-30-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-30-invert-l), 1); - --bulma-warning-35: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-35-l), 1); - --bulma-warning-35-invert-l: var(--bulma-warning-100-l); - --bulma-warning-35-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-35-invert-l), 1); - --bulma-warning-40: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-40-l), 1); - --bulma-warning-40-invert-l: var(--bulma-warning-00-l); - --bulma-warning-40-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-40-invert-l), 1); - --bulma-warning-45: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-45-l), 1); - --bulma-warning-45-invert-l: var(--bulma-warning-05-l); - --bulma-warning-45-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-45-invert-l), 1); - --bulma-warning-50: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-50-l), 1); - --bulma-warning-50-invert-l: var(--bulma-warning-10-l); - --bulma-warning-50-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-50-invert-l), 1); - --bulma-warning-55: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-55-l), 1); - --bulma-warning-55-invert-l: var(--bulma-warning-10-l); - --bulma-warning-55-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-55-invert-l), 1); - --bulma-warning-60: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-60-l), 1); - --bulma-warning-60-invert-l: var(--bulma-warning-10-l); - --bulma-warning-60-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-60-invert-l), 1); - --bulma-warning-65: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-65-l), 1); - --bulma-warning-65-invert-l: var(--bulma-warning-10-l); - --bulma-warning-65-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-65-invert-l), 1); - --bulma-warning-70: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-70-l), 1); - --bulma-warning-70-invert-l: var(--bulma-warning-15-l); - --bulma-warning-70-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-70-invert-l), 1); - --bulma-warning-75: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-75-l), 1); - --bulma-warning-75-invert-l: var(--bulma-warning-15-l); - --bulma-warning-75-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-75-invert-l), 1); - --bulma-warning-80: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-80-l), 1); - --bulma-warning-80-invert-l: var(--bulma-warning-15-l); - --bulma-warning-80-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-80-invert-l), 1); - --bulma-warning-85: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-85-l), 1); - --bulma-warning-85-invert-l: var(--bulma-warning-15-l); - --bulma-warning-85-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-85-invert-l), 1); - --bulma-warning-90: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-90-l), 1); - --bulma-warning-90-invert-l: var(--bulma-warning-15-l); - --bulma-warning-90-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-90-invert-l), 1); - --bulma-warning-95: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-95-l), 1); - --bulma-warning-95-invert-l: var(--bulma-warning-15-l); - --bulma-warning-95-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-95-invert-l), 1); - --bulma-warning-100: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-100-l), 1); - --bulma-warning-100-invert-l: var(--bulma-warning-20-l); - --bulma-warning-100-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-100-invert-l), 1); - --bulma-warning-invert-l: var(--bulma-warning-10-l); - --bulma-warning-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-invert-l), 1); - --bulma-warning-light-l: var(--bulma-warning-90-l); - --bulma-warning-light: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-light-l), 1); - --bulma-warning-light-invert-l: var(--bulma-warning-15-l); - --bulma-warning-light-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-light-invert-l), 1); - --bulma-warning-dark-l: var(--bulma-warning-10-l); - --bulma-warning-dark: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-dark-l), 1); - --bulma-warning-dark-invert-l: var(--bulma-warning-50-l); - --bulma-warning-dark-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-dark-invert-l), 1); - --bulma-warning-soft: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-soft-l), 1); - --bulma-warning-bold: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-bold-l), 1); - --bulma-warning-soft-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-soft-invert-l), 1); - --bulma-warning-bold-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-bold-invert-l), 1); - --bulma-warning-on-scheme-l: 23%; - --bulma-warning-on-scheme: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-on-scheme-l), 1); - --bulma-danger: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-l), 1); - --bulma-danger-base: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-l), 1); - --bulma-danger-rgb: 255, 102, 133; - --bulma-danger-h: 348deg; - --bulma-danger-s: 100%; - --bulma-danger-l: 70%; - --bulma-danger-00-l: 0%; - --bulma-danger-05-l: 5%; - --bulma-danger-10-l: 10%; - --bulma-danger-15-l: 15%; - --bulma-danger-20-l: 20%; - --bulma-danger-25-l: 25%; - --bulma-danger-30-l: 30%; - --bulma-danger-35-l: 35%; - --bulma-danger-40-l: 40%; - --bulma-danger-45-l: 45%; - --bulma-danger-50-l: 50%; - --bulma-danger-55-l: 55%; - --bulma-danger-60-l: 60%; - --bulma-danger-65-l: 65%; - --bulma-danger-70-l: 70%; - --bulma-danger-75-l: 75%; - --bulma-danger-80-l: 80%; - --bulma-danger-85-l: 85%; - --bulma-danger-90-l: 90%; - --bulma-danger-95-l: 95%; - --bulma-danger-100-l: 100%; - --bulma-danger-00: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-00-l), 1); - --bulma-danger-00-invert-l: var(--bulma-danger-65-l); - --bulma-danger-00-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-00-invert-l), 1); - --bulma-danger-05: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-05-l), 1); - --bulma-danger-05-invert-l: var(--bulma-danger-70-l); - --bulma-danger-05-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-05-invert-l), 1); - --bulma-danger-10: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-10-l), 1); - --bulma-danger-10-invert-l: var(--bulma-danger-75-l); - --bulma-danger-10-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-10-invert-l), 1); - --bulma-danger-15: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-15-l), 1); - --bulma-danger-15-invert-l: var(--bulma-danger-80-l); - --bulma-danger-15-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-15-invert-l), 1); - --bulma-danger-20: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-20-l), 1); - --bulma-danger-20-invert-l: var(--bulma-danger-85-l); - --bulma-danger-20-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-20-invert-l), 1); - --bulma-danger-25: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-25-l), 1); - --bulma-danger-25-invert-l: var(--bulma-danger-90-l); - --bulma-danger-25-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-25-invert-l), 1); - --bulma-danger-30: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-30-l), 1); - --bulma-danger-30-invert-l: var(--bulma-danger-100-l); - --bulma-danger-30-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-30-invert-l), 1); - --bulma-danger-35: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-35-l), 1); - --bulma-danger-35-invert-l: var(--bulma-danger-100-l); - --bulma-danger-35-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-35-invert-l), 1); - --bulma-danger-40: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-40-l), 1); - --bulma-danger-40-invert-l: var(--bulma-danger-100-l); - --bulma-danger-40-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-40-invert-l), 1); - --bulma-danger-45: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-45-l), 1); - --bulma-danger-45-invert-l: var(--bulma-danger-100-l); - --bulma-danger-45-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-45-invert-l), 1); - --bulma-danger-50: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-50-l), 1); - --bulma-danger-50-invert-l: var(--bulma-danger-100-l); - --bulma-danger-50-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-50-invert-l), 1); - --bulma-danger-55: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-55-l), 1); - --bulma-danger-55-invert-l: var(--bulma-danger-100-l); - --bulma-danger-55-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-55-invert-l), 1); - --bulma-danger-60: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-60-l), 1); - --bulma-danger-60-invert-l: var(--bulma-danger-100-l); - --bulma-danger-60-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-60-invert-l), 1); - --bulma-danger-65: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-65-l), 1); - --bulma-danger-65-invert-l: var(--bulma-danger-00-l); - --bulma-danger-65-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-65-invert-l), 1); - --bulma-danger-70: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-70-l), 1); - --bulma-danger-70-invert-l: var(--bulma-danger-05-l); - --bulma-danger-70-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-70-invert-l), 1); - --bulma-danger-75: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-75-l), 1); - --bulma-danger-75-invert-l: var(--bulma-danger-10-l); - --bulma-danger-75-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-75-invert-l), 1); - --bulma-danger-80: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-80-l), 1); - --bulma-danger-80-invert-l: var(--bulma-danger-15-l); - --bulma-danger-80-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-80-invert-l), 1); - --bulma-danger-85: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-85-l), 1); - --bulma-danger-85-invert-l: var(--bulma-danger-20-l); - --bulma-danger-85-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-85-invert-l), 1); - --bulma-danger-90: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-90-l), 1); - --bulma-danger-90-invert-l: var(--bulma-danger-25-l); - --bulma-danger-90-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-90-invert-l), 1); - --bulma-danger-95: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-95-l), 1); - --bulma-danger-95-invert-l: var(--bulma-danger-25-l); - --bulma-danger-95-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-95-invert-l), 1); - --bulma-danger-100: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-100-l), 1); - --bulma-danger-100-invert-l: var(--bulma-danger-30-l); - --bulma-danger-100-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-100-invert-l), 1); - --bulma-danger-invert-l: var(--bulma-danger-05-l); - --bulma-danger-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-invert-l), 1); - --bulma-danger-light-l: var(--bulma-danger-90-l); - --bulma-danger-light: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-light-l), 1); - --bulma-danger-light-invert-l: var(--bulma-danger-25-l); - --bulma-danger-light-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-light-invert-l), 1); - --bulma-danger-dark-l: var(--bulma-danger-10-l); - --bulma-danger-dark: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-dark-l), 1); - --bulma-danger-dark-invert-l: var(--bulma-danger-75-l); - --bulma-danger-dark-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-dark-invert-l), 1); - --bulma-danger-soft: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-soft-l), 1); - --bulma-danger-bold: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-bold-l), 1); - --bulma-danger-soft-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-soft-invert-l), 1); - --bulma-danger-bold-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-bold-invert-l), 1); - --bulma-danger-on-scheme-l: 40%; - --bulma-danger-on-scheme: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-on-scheme-l), 1); - --bulma-black-bis: hsl(221, 14%, 9%); - --bulma-black-ter: hsl(221, 14%, 14%); - --bulma-grey-darker: hsl(221, 14%, 21%); - --bulma-grey-dark: hsl(221, 14%, 29%); - --bulma-grey: hsl(221, 14%, 48%); - --bulma-grey-light: hsl(221, 14%, 71%); - --bulma-grey-lighter: hsl(221, 14%, 86%); - --bulma-white-ter: hsl(221, 14%, 96%); - --bulma-white-bis: hsl(221, 14%, 98%); - --bulma-shadow-h: 221deg; - --bulma-shadow-s: 14%; - --bulma-shadow-l: 4%; - --bulma-size-1: 3rem; - --bulma-size-2: 2.5rem; - --bulma-size-3: 2rem; - --bulma-size-4: 1.5rem; - --bulma-size-5: 1.25rem; - --bulma-size-6: 1rem; - --bulma-size-7: 0.75rem; - } -} -@media (prefers-color-scheme: dark) { - :root { - --bulma-white-on-scheme-l: 100%; - --bulma-white-on-scheme: hsla(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-on-scheme-l), 1); - --bulma-black-on-scheme-l: 0%; - --bulma-black-on-scheme: hsla(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-on-scheme-l), 1); - --bulma-light-on-scheme-l: 96%; - --bulma-light-on-scheme: hsla(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-on-scheme-l), 1); - --bulma-dark-on-scheme-l: 56%; - --bulma-dark-on-scheme: hsla(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-on-scheme-l), 1); - --bulma-text-on-scheme-l: 54%; - --bulma-text-on-scheme: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-on-scheme-l), 1); - --bulma-primary-on-scheme-l: 40.9803921569%; - --bulma-primary-on-scheme: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-on-scheme-l), 1); - --bulma-link-on-scheme-l: 73%; - --bulma-link-on-scheme: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l), 1); - --bulma-info-on-scheme-l: 70%; - --bulma-info-on-scheme: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-on-scheme-l), 1); - --bulma-success-on-scheme-l: 53%; - --bulma-success-on-scheme: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-on-scheme-l), 1); - --bulma-warning-on-scheme-l: 53%; - --bulma-warning-on-scheme: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-on-scheme-l), 1); - --bulma-danger-on-scheme-l: 70%; - --bulma-danger-on-scheme: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-on-scheme-l), 1); - --bulma-scheme-brightness: dark; - --bulma-scheme-main-l: 9%; - --bulma-scheme-main-bis-l: 11%; - --bulma-scheme-main-ter-l: 13%; - --bulma-soft-l: 20%; - --bulma-bold-l: 90%; - --bulma-soft-invert-l: 90%; - --bulma-bold-invert-l: 20%; - --bulma-background-l: 14%; - --bulma-border-weak-l: 21%; - --bulma-border-l: 24%; - --bulma-text-weak-l: 53%; - --bulma-text-l: 71%; - --bulma-text-strong-l: 93%; - --bulma-text-title-l: 100%; - --bulma-hover-background-l-delta: 5%; - --bulma-active-background-l-delta: 10%; - --bulma-hover-border-l-delta: 10%; - --bulma-active-border-l-delta: 20%; - --bulma-hover-color-l-delta: 5%; - --bulma-active-color-l-delta: 10%; - --bulma-shadow-h: 0deg; - --bulma-shadow-s: 0%; - --bulma-shadow-l: 100%; - } -} -[data-theme=light], -.theme-light { - --bulma-scheme-h: 221; - --bulma-scheme-s: 14%; - --bulma-light-l: 90%; - --bulma-light-invert-l: 20%; - --bulma-dark-l: 20%; - --bulma-dark-invert-l: 90%; - --bulma-soft-l: 90%; - --bulma-bold-l: 20%; - --bulma-soft-invert-l: 20%; - --bulma-bold-invert-l: 90%; - --bulma-hover-background-l-delta: -5%; - --bulma-active-background-l-delta: -10%; - --bulma-hover-border-l-delta: -10%; - --bulma-active-border-l-delta: -20%; - --bulma-hover-color-l-delta: -5%; - --bulma-active-color-l-delta: -10%; - --bulma-hover-shadow-a-delta: -0.05; - --bulma-active-shadow-a-delta: -0.1; - --bulma-scheme-brightness: light; - --bulma-scheme-main-l: 100%; - --bulma-scheme-main-bis-l: 98%; - --bulma-scheme-main-ter-l: 96%; - --bulma-background-l: 96%; - --bulma-border-weak-l: 93%; - --bulma-border-l: 86%; - --bulma-text-weak-l: 48%; - --bulma-text-l: 29%; - --bulma-text-strong-l: 21%; - --bulma-text-title-l: 14%; - --bulma-scheme-invert-ter-l: 14%; - --bulma-scheme-invert-bis-l: 7%; - --bulma-scheme-invert-l: 4%; - --bulma-family-primary: "Nunito", sans-serif; - --bulma-family-secondary: Inter, SF Pro, Segoe UI, Roboto, Oxygen, Ubuntu, Helvetica Neue, Helvetica, Arial, sans-serif; - --bulma-family-code: Inconsolata, Hack, SF Mono, Roboto Mono, Source Code Pro, Ubuntu Mono, monospace; - --bulma-size-small: 0.75rem; - --bulma-size-normal: 1rem; - --bulma-size-medium: 1.25rem; - --bulma-size-large: 1.5rem; - --bulma-weight-light: 300; - --bulma-weight-normal: 400; - --bulma-weight-medium: 500; - --bulma-weight-semibold: 600; - --bulma-weight-bold: 700; - --bulma-weight-extrabold: 800; - --bulma-block-spacing: 1.5rem; - --bulma-duration: 294ms; - --bulma-easing: ease-out; - --bulma-radius-small: 0.25rem; - --bulma-radius: 0.375rem; - --bulma-radius-medium: 0.5em; - --bulma-radius-large: 0.75rem; - --bulma-radius-rounded: 9999px; - --bulma-speed: 86ms; - --bulma-arrow-color: var(--bulma-link); - --bulma-loading-color: var(--bulma-border); - --bulma-burger-h: var(--bulma-link-h); - --bulma-burger-s: var(--bulma-link-s); - --bulma-burger-l: var(--bulma-link-l); - --bulma-burger-border-radius: 0.5em; - --bulma-burger-gap: 5px; - --bulma-burger-item-height: 2px; - --bulma-burger-item-width: 20px; - --bulma-white: hsla(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-l), 1); - --bulma-white-base: hsla(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-l), 1); - --bulma-white-rgb: 255, 255, 255; - --bulma-white-h: 221deg; - --bulma-white-s: 14%; - --bulma-white-l: 100%; - --bulma-white-invert-l: 4%; - --bulma-white-invert: hsl(221, 14%, 4%); - --bulma-white-on-scheme-l: 35%; - --bulma-white-on-scheme: hsla(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-on-scheme-l), 1); - --bulma-black: hsla(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-l), 1); - --bulma-black-base: hsla(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-l), 1); - --bulma-black-rgb: 9, 10, 12; - --bulma-black-h: 221deg; - --bulma-black-s: 14%; - --bulma-black-l: 4%; - --bulma-black-invert-l: 100%; - --bulma-black-invert: hsl(221, 14%, 100%); - --bulma-black-on-scheme-l: 4%; - --bulma-black-on-scheme: hsla(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-on-scheme-l), 1); - --bulma-light: hsla(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-l), 1); - --bulma-light-base: hsla(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-l), 1); - --bulma-light-rgb: 243, 244, 246; - --bulma-light-h: 221deg; - --bulma-light-s: 14%; - --bulma-light-l: 96%; - --bulma-light-invert-l: 21%; - --bulma-light-invert: hsl(221, 14%, 21%); - --bulma-light-on-scheme-l: 36%; - --bulma-light-on-scheme: hsla(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-on-scheme-l), 1); - --bulma-dark: hsla(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-l), 1); - --bulma-dark-base: hsla(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-l), 1); - --bulma-dark-rgb: 46, 51, 61; - --bulma-dark-h: 221deg; - --bulma-dark-s: 14%; - --bulma-dark-l: 21%; - --bulma-dark-invert-l: 96%; - --bulma-dark-invert: hsl(221, 14%, 96%); - --bulma-dark-on-scheme-l: 21%; - --bulma-dark-on-scheme: hsla(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-on-scheme-l), 1); - --bulma-text: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-l), 1); - --bulma-text-base: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-l), 1); - --bulma-text-rgb: 64, 70, 84; - --bulma-text-h: 221deg; - --bulma-text-s: 14%; - --bulma-text-l: 29%; - --bulma-text-00-l: 0%; - --bulma-text-05-l: 4%; - --bulma-text-10-l: 9%; - --bulma-text-15-l: 14%; - --bulma-text-20-l: 19%; - --bulma-text-25-l: 24%; - --bulma-text-30-l: 29%; - --bulma-text-35-l: 34%; - --bulma-text-40-l: 39%; - --bulma-text-45-l: 44%; - --bulma-text-50-l: 49%; - --bulma-text-55-l: 54%; - --bulma-text-60-l: 59%; - --bulma-text-65-l: 64%; - --bulma-text-70-l: 69%; - --bulma-text-75-l: 74%; - --bulma-text-80-l: 79%; - --bulma-text-85-l: 84%; - --bulma-text-90-l: 89%; - --bulma-text-95-l: 94%; - --bulma-text-100-l: 99%; - --bulma-text-00: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-00-l), 1); - --bulma-text-00-invert-l: var(--bulma-text-60-l); - --bulma-text-00-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-00-invert-l), 1); - --bulma-text-05: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-05-l), 1); - --bulma-text-05-invert-l: var(--bulma-text-60-l); - --bulma-text-05-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-05-invert-l), 1); - --bulma-text-10: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-10-l), 1); - --bulma-text-10-invert-l: var(--bulma-text-70-l); - --bulma-text-10-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-10-invert-l), 1); - --bulma-text-15: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-15-l), 1); - --bulma-text-15-invert-l: var(--bulma-text-75-l); - --bulma-text-15-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-15-invert-l), 1); - --bulma-text-20: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-20-l), 1); - --bulma-text-20-invert-l: var(--bulma-text-85-l); - --bulma-text-20-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-20-invert-l), 1); - --bulma-text-25: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-25-l), 1); - --bulma-text-25-invert-l: var(--bulma-text-95-l); - --bulma-text-25-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-25-invert-l), 1); - --bulma-text-30: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-30-l), 1); - --bulma-text-30-invert-l: var(--bulma-text-100-l); - --bulma-text-30-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-30-invert-l), 1); - --bulma-text-35: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-35-l), 1); - --bulma-text-35-invert-l: var(--bulma-text-100-l); - --bulma-text-35-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-35-invert-l), 1); - --bulma-text-40: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-40-l), 1); - --bulma-text-40-invert-l: var(--bulma-text-100-l); - --bulma-text-40-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-40-invert-l), 1); - --bulma-text-45: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-45-l), 1); - --bulma-text-45-invert-l: var(--bulma-text-100-l); - --bulma-text-45-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-45-invert-l), 1); - --bulma-text-50: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-50-l), 1); - --bulma-text-50-invert-l: var(--bulma-text-100-l); - --bulma-text-50-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-50-invert-l), 1); - --bulma-text-55: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-55-l), 1); - --bulma-text-55-invert-l: var(--bulma-text-100-l); - --bulma-text-55-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-55-invert-l), 1); - --bulma-text-60: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-60-l), 1); - --bulma-text-60-invert-l: var(--bulma-text-05-l); - --bulma-text-60-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-60-invert-l), 1); - --bulma-text-65: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-65-l), 1); - --bulma-text-65-invert-l: var(--bulma-text-05-l); - --bulma-text-65-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-65-invert-l), 1); - --bulma-text-70: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-70-l), 1); - --bulma-text-70-invert-l: var(--bulma-text-10-l); - --bulma-text-70-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-70-invert-l), 1); - --bulma-text-75: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-75-l), 1); - --bulma-text-75-invert-l: var(--bulma-text-15-l); - --bulma-text-75-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-75-invert-l), 1); - --bulma-text-80: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-80-l), 1); - --bulma-text-80-invert-l: var(--bulma-text-15-l); - --bulma-text-80-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-80-invert-l), 1); - --bulma-text-85: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-85-l), 1); - --bulma-text-85-invert-l: var(--bulma-text-20-l); - --bulma-text-85-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-85-invert-l), 1); - --bulma-text-90: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-90-l), 1); - --bulma-text-90-invert-l: var(--bulma-text-20-l); - --bulma-text-90-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-90-invert-l), 1); - --bulma-text-95: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-95-l), 1); - --bulma-text-95-invert-l: var(--bulma-text-25-l); - --bulma-text-95-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-95-invert-l), 1); - --bulma-text-100: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-100-l), 1); - --bulma-text-100-invert-l: var(--bulma-text-25-l); - --bulma-text-100-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-100-invert-l), 1); - --bulma-text-invert-l: var(--bulma-text-100-l); - --bulma-text-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-invert-l), 1); - --bulma-text-light-l: var(--bulma-text-90-l); - --bulma-text-light: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-light-l), 1); - --bulma-text-light-invert-l: var(--bulma-text-20-l); - --bulma-text-light-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-light-invert-l), 1); - --bulma-text-dark-l: var(--bulma-text-10-l); - --bulma-text-dark: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-dark-l), 1); - --bulma-text-dark-invert-l: var(--bulma-text-70-l); - --bulma-text-dark-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-dark-invert-l), 1); - --bulma-text-soft: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-soft-l), 1); - --bulma-text-bold: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-bold-l), 1); - --bulma-text-soft-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-soft-invert-l), 1); - --bulma-text-bold-invert: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-bold-invert-l), 1); - --bulma-text-on-scheme-l: 29%; - --bulma-text-on-scheme: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-on-scheme-l), 1); - --bulma-primary: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l), 1); - --bulma-primary-base: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l), 1); - --bulma-primary-rgb: 0, 209, 178; - --bulma-primary-h: 171deg; - --bulma-primary-s: 100%; - --bulma-primary-l: 41%; - --bulma-primary-00-l: 1%; - --bulma-primary-05-l: 6%; - --bulma-primary-10-l: 11%; - --bulma-primary-15-l: 16%; - --bulma-primary-20-l: 21%; - --bulma-primary-25-l: 26%; - --bulma-primary-30-l: 31%; - --bulma-primary-35-l: 36%; - --bulma-primary-40-l: 41%; - --bulma-primary-45-l: 46%; - --bulma-primary-50-l: 51%; - --bulma-primary-55-l: 56%; - --bulma-primary-60-l: 61%; - --bulma-primary-65-l: 66%; - --bulma-primary-70-l: 71%; - --bulma-primary-75-l: 76%; - --bulma-primary-80-l: 81%; - --bulma-primary-85-l: 86%; - --bulma-primary-90-l: 91%; - --bulma-primary-95-l: 96%; - --bulma-primary-100-l: 100%; - --bulma-primary-00: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-00-l), 1); - --bulma-primary-00-invert-l: var(--bulma-primary-30-l); - --bulma-primary-00-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-00-invert-l), 1); - --bulma-primary-05: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-05-l), 1); - --bulma-primary-05-invert-l: var(--bulma-primary-40-l); - --bulma-primary-05-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-05-invert-l), 1); - --bulma-primary-10: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-10-l), 1); - --bulma-primary-10-invert-l: var(--bulma-primary-50-l); - --bulma-primary-10-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-10-invert-l), 1); - --bulma-primary-15: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-15-l), 1); - --bulma-primary-15-invert-l: var(--bulma-primary-100-l); - --bulma-primary-15-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-15-invert-l), 1); - --bulma-primary-20: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-20-l), 1); - --bulma-primary-20-invert-l: var(--bulma-primary-100-l); - --bulma-primary-20-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-20-invert-l), 1); - --bulma-primary-25: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-25-l), 1); - --bulma-primary-25-invert-l: var(--bulma-primary-100-l); - --bulma-primary-25-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-25-invert-l), 1); - --bulma-primary-30: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-30-l), 1); - --bulma-primary-30-invert-l: var(--bulma-primary-00-l); - --bulma-primary-30-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-30-invert-l), 1); - --bulma-primary-35: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-35-l), 1); - --bulma-primary-35-invert-l: var(--bulma-primary-00-l); - --bulma-primary-35-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-35-invert-l), 1); - --bulma-primary-40: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-40-l), 1); - --bulma-primary-40-invert-l: var(--bulma-primary-05-l); - --bulma-primary-40-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-40-invert-l), 1); - --bulma-primary-45: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-45-l), 1); - --bulma-primary-45-invert-l: var(--bulma-primary-05-l); - --bulma-primary-45-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-45-invert-l), 1); - --bulma-primary-50: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-50-l), 1); - --bulma-primary-50-invert-l: var(--bulma-primary-10-l); - --bulma-primary-50-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-50-invert-l), 1); - --bulma-primary-55: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-55-l), 1); - --bulma-primary-55-invert-l: var(--bulma-primary-10-l); - --bulma-primary-55-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-55-invert-l), 1); - --bulma-primary-60: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-60-l), 1); - --bulma-primary-60-invert-l: var(--bulma-primary-10-l); - --bulma-primary-60-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-60-invert-l), 1); - --bulma-primary-65: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-65-l), 1); - --bulma-primary-65-invert-l: var(--bulma-primary-10-l); - --bulma-primary-65-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-65-invert-l), 1); - --bulma-primary-70: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-70-l), 1); - --bulma-primary-70-invert-l: var(--bulma-primary-10-l); - --bulma-primary-70-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-70-invert-l), 1); - --bulma-primary-75: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-75-l), 1); - --bulma-primary-75-invert-l: var(--bulma-primary-10-l); - --bulma-primary-75-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-75-invert-l), 1); - --bulma-primary-80: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-80-l), 1); - --bulma-primary-80-invert-l: var(--bulma-primary-10-l); - --bulma-primary-80-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-80-invert-l), 1); - --bulma-primary-85: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-85-l), 1); - --bulma-primary-85-invert-l: var(--bulma-primary-10-l); - --bulma-primary-85-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-85-invert-l), 1); - --bulma-primary-90: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-90-l), 1); - --bulma-primary-90-invert-l: var(--bulma-primary-10-l); - --bulma-primary-90-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-90-invert-l), 1); - --bulma-primary-95: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-95-l), 1); - --bulma-primary-95-invert-l: var(--bulma-primary-10-l); - --bulma-primary-95-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-95-invert-l), 1); - --bulma-primary-100: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-100-l), 1); - --bulma-primary-100-invert-l: var(--bulma-primary-15-l); - --bulma-primary-100-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-100-invert-l), 1); - --bulma-primary-invert-l: var(--bulma-primary-05-l); - --bulma-primary-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-invert-l), 1); - --bulma-primary-light-l: var(--bulma-primary-90-l); - --bulma-primary-light: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-light-l), 1); - --bulma-primary-light-invert-l: var(--bulma-primary-10-l); - --bulma-primary-light-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-light-invert-l), 1); - --bulma-primary-dark-l: var(--bulma-primary-10-l); - --bulma-primary-dark: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-dark-l), 1); - --bulma-primary-dark-invert-l: var(--bulma-primary-50-l); - --bulma-primary-dark-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-dark-invert-l), 1); - --bulma-primary-soft: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-soft-l), 1); - --bulma-primary-bold: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-bold-l), 1); - --bulma-primary-soft-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-soft-invert-l), 1); - --bulma-primary-bold-invert: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-bold-invert-l), 1); - --bulma-primary-on-scheme-l: 20.9803921569%; - --bulma-primary-on-scheme: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-on-scheme-l), 1); - --bulma-link: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-l), 1); - --bulma-link-base: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-l), 1); - --bulma-link-rgb: 66, 88, 255; - --bulma-link-h: 233deg; - --bulma-link-s: 100%; - --bulma-link-l: 63%; - --bulma-link-00-l: 0%; - --bulma-link-05-l: 3%; - --bulma-link-10-l: 8%; - --bulma-link-15-l: 13%; - --bulma-link-20-l: 18%; - --bulma-link-25-l: 23%; - --bulma-link-30-l: 28%; - --bulma-link-35-l: 33%; - --bulma-link-40-l: 38%; - --bulma-link-45-l: 43%; - --bulma-link-50-l: 48%; - --bulma-link-55-l: 53%; - --bulma-link-60-l: 58%; - --bulma-link-65-l: 63%; - --bulma-link-70-l: 68%; - --bulma-link-75-l: 73%; - --bulma-link-80-l: 78%; - --bulma-link-85-l: 83%; - --bulma-link-90-l: 88%; - --bulma-link-95-l: 93%; - --bulma-link-100-l: 98%; - --bulma-link-00: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-00-l), 1); - --bulma-link-00-invert-l: var(--bulma-link-75-l); - --bulma-link-00-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-00-invert-l), 1); - --bulma-link-05: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-05-l), 1); - --bulma-link-05-invert-l: var(--bulma-link-75-l); - --bulma-link-05-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-05-invert-l), 1); - --bulma-link-10: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-10-l), 1); - --bulma-link-10-invert-l: var(--bulma-link-75-l); - --bulma-link-10-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-10-invert-l), 1); - --bulma-link-15: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-15-l), 1); - --bulma-link-15-invert-l: var(--bulma-link-80-l); - --bulma-link-15-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-15-invert-l), 1); - --bulma-link-20: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-20-l), 1); - --bulma-link-20-invert-l: var(--bulma-link-80-l); - --bulma-link-20-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-20-invert-l), 1); - --bulma-link-25: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-25-l), 1); - --bulma-link-25-invert-l: var(--bulma-link-85-l); - --bulma-link-25-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-25-invert-l), 1); - --bulma-link-30: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-30-l), 1); - --bulma-link-30-invert-l: var(--bulma-link-90-l); - --bulma-link-30-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-30-invert-l), 1); - --bulma-link-35: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-35-l), 1); - --bulma-link-35-invert-l: var(--bulma-link-90-l); - --bulma-link-35-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-35-invert-l), 1); - --bulma-link-40: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-40-l), 1); - --bulma-link-40-invert-l: var(--bulma-link-95-l); - --bulma-link-40-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-40-invert-l), 1); - --bulma-link-45: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-45-l), 1); - --bulma-link-45-invert-l: var(--bulma-link-100-l); - --bulma-link-45-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-45-invert-l), 1); - --bulma-link-50: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-50-l), 1); - --bulma-link-50-invert-l: var(--bulma-link-100-l); - --bulma-link-50-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-50-invert-l), 1); - --bulma-link-55: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-55-l), 1); - --bulma-link-55-invert-l: var(--bulma-link-100-l); - --bulma-link-55-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-55-invert-l), 1); - --bulma-link-60: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-60-l), 1); - --bulma-link-60-invert-l: var(--bulma-link-100-l); - --bulma-link-60-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-60-invert-l), 1); - --bulma-link-65: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-65-l), 1); - --bulma-link-65-invert-l: var(--bulma-link-100-l); - --bulma-link-65-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-65-invert-l), 1); - --bulma-link-70: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-70-l), 1); - --bulma-link-70-invert-l: var(--bulma-link-100-l); - --bulma-link-70-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-70-invert-l), 1); - --bulma-link-75: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-75-l), 1); - --bulma-link-75-invert-l: var(--bulma-link-10-l); - --bulma-link-75-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-75-invert-l), 1); - --bulma-link-80: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-80-l), 1); - --bulma-link-80-invert-l: var(--bulma-link-20-l); - --bulma-link-80-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-80-invert-l), 1); - --bulma-link-85: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-85-l), 1); - --bulma-link-85-invert-l: var(--bulma-link-25-l); - --bulma-link-85-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-85-invert-l), 1); - --bulma-link-90: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-90-l), 1); - --bulma-link-90-invert-l: var(--bulma-link-35-l); - --bulma-link-90-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-90-invert-l), 1); - --bulma-link-95: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-95-l), 1); - --bulma-link-95-invert-l: var(--bulma-link-40-l); - --bulma-link-95-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-95-invert-l), 1); - --bulma-link-100: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-100-l), 1); - --bulma-link-100-invert-l: var(--bulma-link-50-l); - --bulma-link-100-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-100-invert-l), 1); - --bulma-link-invert-l: var(--bulma-link-100-l); - --bulma-link-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-invert-l), 1); - --bulma-link-light-l: var(--bulma-link-90-l); - --bulma-link-light: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-light-l), 1); - --bulma-link-light-invert-l: var(--bulma-link-35-l); - --bulma-link-light-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-light-invert-l), 1); - --bulma-link-dark-l: var(--bulma-link-10-l); - --bulma-link-dark: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-dark-l), 1); - --bulma-link-dark-invert-l: var(--bulma-link-75-l); - --bulma-link-dark-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-dark-invert-l), 1); - --bulma-link-soft: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-soft-l), 1); - --bulma-link-bold: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-bold-l), 1); - --bulma-link-soft-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-soft-invert-l), 1); - --bulma-link-bold-invert: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-bold-invert-l), 1); - --bulma-link-on-scheme-l: 58%; - --bulma-link-on-scheme: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l), 1); - --bulma-info: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-l), 1); - --bulma-info-base: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-l), 1); - --bulma-info-rgb: 102, 209, 255; - --bulma-info-h: 198deg; - --bulma-info-s: 100%; - --bulma-info-l: 70%; - --bulma-info-00-l: 0%; - --bulma-info-05-l: 5%; - --bulma-info-10-l: 10%; - --bulma-info-15-l: 15%; - --bulma-info-20-l: 20%; - --bulma-info-25-l: 25%; - --bulma-info-30-l: 30%; - --bulma-info-35-l: 35%; - --bulma-info-40-l: 40%; - --bulma-info-45-l: 45%; - --bulma-info-50-l: 50%; - --bulma-info-55-l: 55%; - --bulma-info-60-l: 60%; - --bulma-info-65-l: 65%; - --bulma-info-70-l: 70%; - --bulma-info-75-l: 75%; - --bulma-info-80-l: 80%; - --bulma-info-85-l: 85%; - --bulma-info-90-l: 90%; - --bulma-info-95-l: 95%; - --bulma-info-100-l: 100%; - --bulma-info-00: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-00-l), 1); - --bulma-info-00-invert-l: var(--bulma-info-45-l); - --bulma-info-00-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-00-invert-l), 1); - --bulma-info-05: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-05-l), 1); - --bulma-info-05-invert-l: var(--bulma-info-50-l); - --bulma-info-05-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-05-invert-l), 1); - --bulma-info-10: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-10-l), 1); - --bulma-info-10-invert-l: var(--bulma-info-60-l); - --bulma-info-10-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-10-invert-l), 1); - --bulma-info-15: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-15-l), 1); - --bulma-info-15-invert-l: var(--bulma-info-80-l); - --bulma-info-15-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-15-invert-l), 1); - --bulma-info-20: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-20-l), 1); - --bulma-info-20-invert-l: var(--bulma-info-95-l); - --bulma-info-20-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-20-invert-l), 1); - --bulma-info-25: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-25-l), 1); - --bulma-info-25-invert-l: var(--bulma-info-100-l); - --bulma-info-25-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-25-invert-l), 1); - --bulma-info-30: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-30-l), 1); - --bulma-info-30-invert-l: var(--bulma-info-100-l); - --bulma-info-30-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-30-invert-l), 1); - --bulma-info-35: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-35-l), 1); - --bulma-info-35-invert-l: var(--bulma-info-100-l); - --bulma-info-35-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-35-invert-l), 1); - --bulma-info-40: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-40-l), 1); - --bulma-info-40-invert-l: var(--bulma-info-100-l); - --bulma-info-40-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-40-invert-l), 1); - --bulma-info-45: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-45-l), 1); - --bulma-info-45-invert-l: var(--bulma-info-00-l); - --bulma-info-45-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-45-invert-l), 1); - --bulma-info-50: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-50-l), 1); - --bulma-info-50-invert-l: var(--bulma-info-05-l); - --bulma-info-50-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-50-invert-l), 1); - --bulma-info-55: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-55-l), 1); - --bulma-info-55-invert-l: var(--bulma-info-05-l); - --bulma-info-55-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-55-invert-l), 1); - --bulma-info-60: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-60-l), 1); - --bulma-info-60-invert-l: var(--bulma-info-10-l); - --bulma-info-60-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-60-invert-l), 1); - --bulma-info-65: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-65-l), 1); - --bulma-info-65-invert-l: var(--bulma-info-10-l); - --bulma-info-65-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-65-invert-l), 1); - --bulma-info-70: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-70-l), 1); - --bulma-info-70-invert-l: var(--bulma-info-10-l); - --bulma-info-70-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-70-invert-l), 1); - --bulma-info-75: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-75-l), 1); - --bulma-info-75-invert-l: var(--bulma-info-10-l); - --bulma-info-75-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-75-invert-l), 1); - --bulma-info-80: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-80-l), 1); - --bulma-info-80-invert-l: var(--bulma-info-15-l); - --bulma-info-80-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-80-invert-l), 1); - --bulma-info-85: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-85-l), 1); - --bulma-info-85-invert-l: var(--bulma-info-15-l); - --bulma-info-85-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-85-invert-l), 1); - --bulma-info-90: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-90-l), 1); - --bulma-info-90-invert-l: var(--bulma-info-15-l); - --bulma-info-90-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-90-invert-l), 1); - --bulma-info-95: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-95-l), 1); - --bulma-info-95-invert-l: var(--bulma-info-20-l); - --bulma-info-95-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-95-invert-l), 1); - --bulma-info-100: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-100-l), 1); - --bulma-info-100-invert-l: var(--bulma-info-20-l); - --bulma-info-100-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-100-invert-l), 1); - --bulma-info-invert-l: var(--bulma-info-10-l); - --bulma-info-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-invert-l), 1); - --bulma-info-light-l: var(--bulma-info-90-l); - --bulma-info-light: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-light-l), 1); - --bulma-info-light-invert-l: var(--bulma-info-15-l); - --bulma-info-light-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-light-invert-l), 1); - --bulma-info-dark-l: var(--bulma-info-10-l); - --bulma-info-dark: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-dark-l), 1); - --bulma-info-dark-invert-l: var(--bulma-info-60-l); - --bulma-info-dark-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-dark-invert-l), 1); - --bulma-info-soft: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-soft-l), 1); - --bulma-info-bold: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-bold-l), 1); - --bulma-info-soft-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-soft-invert-l), 1); - --bulma-info-bold-invert: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-bold-invert-l), 1); - --bulma-info-on-scheme-l: 25%; - --bulma-info-on-scheme: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-on-scheme-l), 1); - --bulma-success: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-l), 1); - --bulma-success-base: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-l), 1); - --bulma-success-rgb: 72, 199, 142; - --bulma-success-h: 153deg; - --bulma-success-s: 53%; - --bulma-success-l: 53%; - --bulma-success-00-l: 0%; - --bulma-success-05-l: 3%; - --bulma-success-10-l: 8%; - --bulma-success-15-l: 13%; - --bulma-success-20-l: 18%; - --bulma-success-25-l: 23%; - --bulma-success-30-l: 28%; - --bulma-success-35-l: 33%; - --bulma-success-40-l: 38%; - --bulma-success-45-l: 43%; - --bulma-success-50-l: 48%; - --bulma-success-55-l: 53%; - --bulma-success-60-l: 58%; - --bulma-success-65-l: 63%; - --bulma-success-70-l: 68%; - --bulma-success-75-l: 73%; - --bulma-success-80-l: 78%; - --bulma-success-85-l: 83%; - --bulma-success-90-l: 88%; - --bulma-success-95-l: 93%; - --bulma-success-100-l: 98%; - --bulma-success-00: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-00-l), 1); - --bulma-success-00-invert-l: var(--bulma-success-45-l); - --bulma-success-00-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-00-invert-l), 1); - --bulma-success-05: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-05-l), 1); - --bulma-success-05-invert-l: var(--bulma-success-45-l); - --bulma-success-05-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-05-invert-l), 1); - --bulma-success-10: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-10-l), 1); - --bulma-success-10-invert-l: var(--bulma-success-55-l); - --bulma-success-10-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-10-invert-l), 1); - --bulma-success-15: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-15-l), 1); - --bulma-success-15-invert-l: var(--bulma-success-75-l); - --bulma-success-15-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-15-invert-l), 1); - --bulma-success-20: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-20-l), 1); - --bulma-success-20-invert-l: var(--bulma-success-90-l); - --bulma-success-20-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-20-invert-l), 1); - --bulma-success-25: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-25-l), 1); - --bulma-success-25-invert-l: var(--bulma-success-100-l); - --bulma-success-25-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-25-invert-l), 1); - --bulma-success-30: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-30-l), 1); - --bulma-success-30-invert-l: var(--bulma-success-100-l); - --bulma-success-30-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-30-invert-l), 1); - --bulma-success-35: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-35-l), 1); - --bulma-success-35-invert-l: var(--bulma-success-100-l); - --bulma-success-35-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-35-invert-l), 1); - --bulma-success-40: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-40-l), 1); - --bulma-success-40-invert-l: var(--bulma-success-100-l); - --bulma-success-40-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-40-invert-l), 1); - --bulma-success-45: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-45-l), 1); - --bulma-success-45-invert-l: var(--bulma-success-05-l); - --bulma-success-45-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-45-invert-l), 1); - --bulma-success-50: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-50-l), 1); - --bulma-success-50-invert-l: var(--bulma-success-05-l); - --bulma-success-50-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-50-invert-l), 1); - --bulma-success-55: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-55-l), 1); - --bulma-success-55-invert-l: var(--bulma-success-10-l); - --bulma-success-55-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-55-invert-l), 1); - --bulma-success-60: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-60-l), 1); - --bulma-success-60-invert-l: var(--bulma-success-10-l); - --bulma-success-60-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-60-invert-l), 1); - --bulma-success-65: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-65-l), 1); - --bulma-success-65-invert-l: var(--bulma-success-10-l); - --bulma-success-65-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-65-invert-l), 1); - --bulma-success-70: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-70-l), 1); - --bulma-success-70-invert-l: var(--bulma-success-10-l); - --bulma-success-70-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-70-invert-l), 1); - --bulma-success-75: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-75-l), 1); - --bulma-success-75-invert-l: var(--bulma-success-15-l); - --bulma-success-75-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-75-invert-l), 1); - --bulma-success-80: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-80-l), 1); - --bulma-success-80-invert-l: var(--bulma-success-15-l); - --bulma-success-80-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-80-invert-l), 1); - --bulma-success-85: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-85-l), 1); - --bulma-success-85-invert-l: var(--bulma-success-15-l); - --bulma-success-85-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-85-invert-l), 1); - --bulma-success-90: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-90-l), 1); - --bulma-success-90-invert-l: var(--bulma-success-20-l); - --bulma-success-90-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-90-invert-l), 1); - --bulma-success-95: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-95-l), 1); - --bulma-success-95-invert-l: var(--bulma-success-20-l); - --bulma-success-95-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-95-invert-l), 1); - --bulma-success-100: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-100-l), 1); - --bulma-success-100-invert-l: var(--bulma-success-20-l); - --bulma-success-100-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-100-invert-l), 1); - --bulma-success-invert-l: var(--bulma-success-10-l); - --bulma-success-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-invert-l), 1); - --bulma-success-light-l: var(--bulma-success-90-l); - --bulma-success-light: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-light-l), 1); - --bulma-success-light-invert-l: var(--bulma-success-20-l); - --bulma-success-light-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-light-invert-l), 1); - --bulma-success-dark-l: var(--bulma-success-10-l); - --bulma-success-dark: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-dark-l), 1); - --bulma-success-dark-invert-l: var(--bulma-success-55-l); - --bulma-success-dark-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-dark-invert-l), 1); - --bulma-success-soft: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-soft-l), 1); - --bulma-success-bold: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-bold-l), 1); - --bulma-success-soft-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-soft-invert-l), 1); - --bulma-success-bold-invert: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-bold-invert-l), 1); - --bulma-success-on-scheme-l: 23%; - --bulma-success-on-scheme: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-on-scheme-l), 1); - --bulma-warning: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-l), 1); - --bulma-warning-base: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-l), 1); - --bulma-warning-rgb: 255, 183, 15; - --bulma-warning-h: 42deg; - --bulma-warning-s: 100%; - --bulma-warning-l: 53%; - --bulma-warning-00-l: 0%; - --bulma-warning-05-l: 3%; - --bulma-warning-10-l: 8%; - --bulma-warning-15-l: 13%; - --bulma-warning-20-l: 18%; - --bulma-warning-25-l: 23%; - --bulma-warning-30-l: 28%; - --bulma-warning-35-l: 33%; - --bulma-warning-40-l: 38%; - --bulma-warning-45-l: 43%; - --bulma-warning-50-l: 48%; - --bulma-warning-55-l: 53%; - --bulma-warning-60-l: 58%; - --bulma-warning-65-l: 63%; - --bulma-warning-70-l: 68%; - --bulma-warning-75-l: 73%; - --bulma-warning-80-l: 78%; - --bulma-warning-85-l: 83%; - --bulma-warning-90-l: 88%; - --bulma-warning-95-l: 93%; - --bulma-warning-100-l: 98%; - --bulma-warning-00: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-00-l), 1); - --bulma-warning-00-invert-l: var(--bulma-warning-40-l); - --bulma-warning-00-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-00-invert-l), 1); - --bulma-warning-05: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-05-l), 1); - --bulma-warning-05-invert-l: var(--bulma-warning-45-l); - --bulma-warning-05-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-05-invert-l), 1); - --bulma-warning-10: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-10-l), 1); - --bulma-warning-10-invert-l: var(--bulma-warning-50-l); - --bulma-warning-10-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-10-invert-l), 1); - --bulma-warning-15: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-15-l), 1); - --bulma-warning-15-invert-l: var(--bulma-warning-70-l); - --bulma-warning-15-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-15-invert-l), 1); - --bulma-warning-20: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-20-l), 1); - --bulma-warning-20-invert-l: var(--bulma-warning-100-l); - --bulma-warning-20-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-20-invert-l), 1); - --bulma-warning-25: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-25-l), 1); - --bulma-warning-25-invert-l: var(--bulma-warning-100-l); - --bulma-warning-25-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-25-invert-l), 1); - --bulma-warning-30: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-30-l), 1); - --bulma-warning-30-invert-l: var(--bulma-warning-100-l); - --bulma-warning-30-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-30-invert-l), 1); - --bulma-warning-35: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-35-l), 1); - --bulma-warning-35-invert-l: var(--bulma-warning-100-l); - --bulma-warning-35-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-35-invert-l), 1); - --bulma-warning-40: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-40-l), 1); - --bulma-warning-40-invert-l: var(--bulma-warning-00-l); - --bulma-warning-40-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-40-invert-l), 1); - --bulma-warning-45: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-45-l), 1); - --bulma-warning-45-invert-l: var(--bulma-warning-05-l); - --bulma-warning-45-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-45-invert-l), 1); - --bulma-warning-50: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-50-l), 1); - --bulma-warning-50-invert-l: var(--bulma-warning-10-l); - --bulma-warning-50-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-50-invert-l), 1); - --bulma-warning-55: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-55-l), 1); - --bulma-warning-55-invert-l: var(--bulma-warning-10-l); - --bulma-warning-55-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-55-invert-l), 1); - --bulma-warning-60: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-60-l), 1); - --bulma-warning-60-invert-l: var(--bulma-warning-10-l); - --bulma-warning-60-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-60-invert-l), 1); - --bulma-warning-65: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-65-l), 1); - --bulma-warning-65-invert-l: var(--bulma-warning-10-l); - --bulma-warning-65-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-65-invert-l), 1); - --bulma-warning-70: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-70-l), 1); - --bulma-warning-70-invert-l: var(--bulma-warning-15-l); - --bulma-warning-70-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-70-invert-l), 1); - --bulma-warning-75: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-75-l), 1); - --bulma-warning-75-invert-l: var(--bulma-warning-15-l); - --bulma-warning-75-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-75-invert-l), 1); - --bulma-warning-80: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-80-l), 1); - --bulma-warning-80-invert-l: var(--bulma-warning-15-l); - --bulma-warning-80-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-80-invert-l), 1); - --bulma-warning-85: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-85-l), 1); - --bulma-warning-85-invert-l: var(--bulma-warning-15-l); - --bulma-warning-85-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-85-invert-l), 1); - --bulma-warning-90: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-90-l), 1); - --bulma-warning-90-invert-l: var(--bulma-warning-15-l); - --bulma-warning-90-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-90-invert-l), 1); - --bulma-warning-95: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-95-l), 1); - --bulma-warning-95-invert-l: var(--bulma-warning-15-l); - --bulma-warning-95-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-95-invert-l), 1); - --bulma-warning-100: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-100-l), 1); - --bulma-warning-100-invert-l: var(--bulma-warning-20-l); - --bulma-warning-100-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-100-invert-l), 1); - --bulma-warning-invert-l: var(--bulma-warning-10-l); - --bulma-warning-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-invert-l), 1); - --bulma-warning-light-l: var(--bulma-warning-90-l); - --bulma-warning-light: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-light-l), 1); - --bulma-warning-light-invert-l: var(--bulma-warning-15-l); - --bulma-warning-light-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-light-invert-l), 1); - --bulma-warning-dark-l: var(--bulma-warning-10-l); - --bulma-warning-dark: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-dark-l), 1); - --bulma-warning-dark-invert-l: var(--bulma-warning-50-l); - --bulma-warning-dark-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-dark-invert-l), 1); - --bulma-warning-soft: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-soft-l), 1); - --bulma-warning-bold: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-bold-l), 1); - --bulma-warning-soft-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-soft-invert-l), 1); - --bulma-warning-bold-invert: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-bold-invert-l), 1); - --bulma-warning-on-scheme-l: 23%; - --bulma-warning-on-scheme: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-on-scheme-l), 1); - --bulma-danger: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-l), 1); - --bulma-danger-base: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-l), 1); - --bulma-danger-rgb: 255, 102, 133; - --bulma-danger-h: 348deg; - --bulma-danger-s: 100%; - --bulma-danger-l: 70%; - --bulma-danger-00-l: 0%; - --bulma-danger-05-l: 5%; - --bulma-danger-10-l: 10%; - --bulma-danger-15-l: 15%; - --bulma-danger-20-l: 20%; - --bulma-danger-25-l: 25%; - --bulma-danger-30-l: 30%; - --bulma-danger-35-l: 35%; - --bulma-danger-40-l: 40%; - --bulma-danger-45-l: 45%; - --bulma-danger-50-l: 50%; - --bulma-danger-55-l: 55%; - --bulma-danger-60-l: 60%; - --bulma-danger-65-l: 65%; - --bulma-danger-70-l: 70%; - --bulma-danger-75-l: 75%; - --bulma-danger-80-l: 80%; - --bulma-danger-85-l: 85%; - --bulma-danger-90-l: 90%; - --bulma-danger-95-l: 95%; - --bulma-danger-100-l: 100%; - --bulma-danger-00: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-00-l), 1); - --bulma-danger-00-invert-l: var(--bulma-danger-65-l); - --bulma-danger-00-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-00-invert-l), 1); - --bulma-danger-05: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-05-l), 1); - --bulma-danger-05-invert-l: var(--bulma-danger-70-l); - --bulma-danger-05-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-05-invert-l), 1); - --bulma-danger-10: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-10-l), 1); - --bulma-danger-10-invert-l: var(--bulma-danger-75-l); - --bulma-danger-10-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-10-invert-l), 1); - --bulma-danger-15: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-15-l), 1); - --bulma-danger-15-invert-l: var(--bulma-danger-80-l); - --bulma-danger-15-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-15-invert-l), 1); - --bulma-danger-20: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-20-l), 1); - --bulma-danger-20-invert-l: var(--bulma-danger-85-l); - --bulma-danger-20-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-20-invert-l), 1); - --bulma-danger-25: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-25-l), 1); - --bulma-danger-25-invert-l: var(--bulma-danger-90-l); - --bulma-danger-25-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-25-invert-l), 1); - --bulma-danger-30: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-30-l), 1); - --bulma-danger-30-invert-l: var(--bulma-danger-100-l); - --bulma-danger-30-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-30-invert-l), 1); - --bulma-danger-35: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-35-l), 1); - --bulma-danger-35-invert-l: var(--bulma-danger-100-l); - --bulma-danger-35-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-35-invert-l), 1); - --bulma-danger-40: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-40-l), 1); - --bulma-danger-40-invert-l: var(--bulma-danger-100-l); - --bulma-danger-40-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-40-invert-l), 1); - --bulma-danger-45: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-45-l), 1); - --bulma-danger-45-invert-l: var(--bulma-danger-100-l); - --bulma-danger-45-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-45-invert-l), 1); - --bulma-danger-50: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-50-l), 1); - --bulma-danger-50-invert-l: var(--bulma-danger-100-l); - --bulma-danger-50-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-50-invert-l), 1); - --bulma-danger-55: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-55-l), 1); - --bulma-danger-55-invert-l: var(--bulma-danger-100-l); - --bulma-danger-55-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-55-invert-l), 1); - --bulma-danger-60: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-60-l), 1); - --bulma-danger-60-invert-l: var(--bulma-danger-100-l); - --bulma-danger-60-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-60-invert-l), 1); - --bulma-danger-65: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-65-l), 1); - --bulma-danger-65-invert-l: var(--bulma-danger-00-l); - --bulma-danger-65-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-65-invert-l), 1); - --bulma-danger-70: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-70-l), 1); - --bulma-danger-70-invert-l: var(--bulma-danger-05-l); - --bulma-danger-70-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-70-invert-l), 1); - --bulma-danger-75: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-75-l), 1); - --bulma-danger-75-invert-l: var(--bulma-danger-10-l); - --bulma-danger-75-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-75-invert-l), 1); - --bulma-danger-80: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-80-l), 1); - --bulma-danger-80-invert-l: var(--bulma-danger-15-l); - --bulma-danger-80-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-80-invert-l), 1); - --bulma-danger-85: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-85-l), 1); - --bulma-danger-85-invert-l: var(--bulma-danger-20-l); - --bulma-danger-85-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-85-invert-l), 1); - --bulma-danger-90: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-90-l), 1); - --bulma-danger-90-invert-l: var(--bulma-danger-25-l); - --bulma-danger-90-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-90-invert-l), 1); - --bulma-danger-95: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-95-l), 1); - --bulma-danger-95-invert-l: var(--bulma-danger-25-l); - --bulma-danger-95-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-95-invert-l), 1); - --bulma-danger-100: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-100-l), 1); - --bulma-danger-100-invert-l: var(--bulma-danger-30-l); - --bulma-danger-100-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-100-invert-l), 1); - --bulma-danger-invert-l: var(--bulma-danger-05-l); - --bulma-danger-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-invert-l), 1); - --bulma-danger-light-l: var(--bulma-danger-90-l); - --bulma-danger-light: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-light-l), 1); - --bulma-danger-light-invert-l: var(--bulma-danger-25-l); - --bulma-danger-light-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-light-invert-l), 1); - --bulma-danger-dark-l: var(--bulma-danger-10-l); - --bulma-danger-dark: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-dark-l), 1); - --bulma-danger-dark-invert-l: var(--bulma-danger-75-l); - --bulma-danger-dark-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-dark-invert-l), 1); - --bulma-danger-soft: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-soft-l), 1); - --bulma-danger-bold: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-bold-l), 1); - --bulma-danger-soft-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-soft-invert-l), 1); - --bulma-danger-bold-invert: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-bold-invert-l), 1); - --bulma-danger-on-scheme-l: 40%; - --bulma-danger-on-scheme: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-on-scheme-l), 1); - --bulma-black-bis: hsl(221, 14%, 9%); - --bulma-black-ter: hsl(221, 14%, 14%); - --bulma-grey-darker: hsl(221, 14%, 21%); - --bulma-grey-dark: hsl(221, 14%, 29%); - --bulma-grey: hsl(221, 14%, 48%); - --bulma-grey-light: hsl(221, 14%, 71%); - --bulma-grey-lighter: hsl(221, 14%, 86%); - --bulma-white-ter: hsl(221, 14%, 96%); - --bulma-white-bis: hsl(221, 14%, 98%); - --bulma-shadow-h: 221deg; - --bulma-shadow-s: 14%; - --bulma-shadow-l: 4%; - --bulma-size-1: 3rem; - --bulma-size-2: 2.5rem; - --bulma-size-3: 2rem; - --bulma-size-4: 1.5rem; - --bulma-size-5: 1.25rem; - --bulma-size-6: 1rem; - --bulma-size-7: 0.75rem; - --bulma-scheme-main: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-main-l)); - --bulma-scheme-main-bis: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-main-bis-l)); - --bulma-scheme-main-ter: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-main-ter-l)); - --bulma-background: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-background-l)); - --bulma-background-hover: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-background-l) + var(--bulma-hover-background-l-delta))); - --bulma-background-active: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-background-l) + var(--bulma-active-background-l-delta))); - --bulma-border-weak: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-border-weak-l)); - --bulma-border: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-border-l)); - --bulma-border-hover: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-border-l) + var(--bulma-hover-border-l-delta))); - --bulma-border-active: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-border-l) + var(--bulma-active-border-l-delta))); - --bulma-text-weak: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-weak-l)); - --bulma-text: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-l)); - --bulma-text-strong: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-strong-l)); - --bulma-scheme-invert-ter: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-ter-l)); - --bulma-scheme-invert-bis: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-bis-l)); - --bulma-scheme-invert: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l)); - --bulma-link: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-l)); - --bulma-link-text: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l)); - --bulma-link-text-hover: hsl(var(--bulma-link-h), var(--bulma-link-s), calc(var(--bulma-link-on-scheme-l) + var(--bulma-hover-color-l-delta))); - --bulma-link-text-active: hsl(var(--bulma-link-h), var(--bulma-link-s), calc(var(--bulma-link-on-scheme-l) + var(--bulma-active-color-l-delta))); - --bulma-focus-h: var(--bulma-link-h); - --bulma-focus-s: var(--bulma-link-s); - --bulma-focus-l: var(--bulma-link-l); - --bulma-focus-offset: 1px; - --bulma-focus-style: solid; - --bulma-focus-width: 2px; - --bulma-focus-shadow-size: 0 0 0 0.1875em; - --bulma-focus-shadow-alpha: 0.25; - --bulma-code: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-on-scheme-l)); - --bulma-code-background: var(--bulma-background); - --bulma-pre: var(--bulma-text); - --bulma-pre-background: var(--bulma-background); - --bulma-shadow: 0 0.5em 1em -0.125em hsla(var(--bulma-shadow-h), var(--bulma-shadow-s), var(--bulma-shadow-l), 0.1), 0 0px 0 1px hsla(var(--bulma-shadow-h), var(--bulma-shadow-s), var(--bulma-shadow-l), 0.02); -} - -[data-theme=dark], -.theme-dark { - --bulma-white-on-scheme-l: 100%; - --bulma-white-on-scheme: hsla(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-on-scheme-l), 1); - --bulma-black-on-scheme-l: 0%; - --bulma-black-on-scheme: hsla(var(--bulma-black-h), var(--bulma-black-s), var(--bulma-black-on-scheme-l), 1); - --bulma-light-on-scheme-l: 96%; - --bulma-light-on-scheme: hsla(var(--bulma-light-h), var(--bulma-light-s), var(--bulma-light-on-scheme-l), 1); - --bulma-dark-on-scheme-l: 56%; - --bulma-dark-on-scheme: hsla(var(--bulma-dark-h), var(--bulma-dark-s), var(--bulma-dark-on-scheme-l), 1); - --bulma-text-on-scheme-l: 54%; - --bulma-text-on-scheme: hsla(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-on-scheme-l), 1); - --bulma-primary-on-scheme-l: 40.9803921569%; - --bulma-primary-on-scheme: hsla(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-on-scheme-l), 1); - --bulma-link-on-scheme-l: 73%; - --bulma-link-on-scheme: hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l), 1); - --bulma-info-on-scheme-l: 70%; - --bulma-info-on-scheme: hsla(var(--bulma-info-h), var(--bulma-info-s), var(--bulma-info-on-scheme-l), 1); - --bulma-success-on-scheme-l: 53%; - --bulma-success-on-scheme: hsla(var(--bulma-success-h), var(--bulma-success-s), var(--bulma-success-on-scheme-l), 1); - --bulma-warning-on-scheme-l: 53%; - --bulma-warning-on-scheme: hsla(var(--bulma-warning-h), var(--bulma-warning-s), var(--bulma-warning-on-scheme-l), 1); - --bulma-danger-on-scheme-l: 70%; - --bulma-danger-on-scheme: hsla(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-on-scheme-l), 1); - --bulma-scheme-brightness: dark; - --bulma-scheme-main-l: 9%; - --bulma-scheme-main-bis-l: 11%; - --bulma-scheme-main-ter-l: 13%; - --bulma-soft-l: 20%; - --bulma-bold-l: 90%; - --bulma-soft-invert-l: 90%; - --bulma-bold-invert-l: 20%; - --bulma-background-l: 14%; - --bulma-border-weak-l: 21%; - --bulma-border-l: 24%; - --bulma-text-weak-l: 53%; - --bulma-text-l: 71%; - --bulma-text-strong-l: 93%; - --bulma-text-title-l: 100%; - --bulma-hover-background-l-delta: 5%; - --bulma-active-background-l-delta: 10%; - --bulma-hover-border-l-delta: 10%; - --bulma-active-border-l-delta: 20%; - --bulma-hover-color-l-delta: 5%; - --bulma-active-color-l-delta: 10%; - --bulma-shadow-h: 0deg; - --bulma-shadow-s: 0%; - --bulma-shadow-l: 100%; - --bulma-scheme-main: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-main-l)); - --bulma-scheme-main-bis: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-main-bis-l)); - --bulma-scheme-main-ter: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-main-ter-l)); - --bulma-background: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-background-l)); - --bulma-background-hover: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-background-l) + var(--bulma-hover-background-l-delta))); - --bulma-background-active: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-background-l) + var(--bulma-active-background-l-delta))); - --bulma-border-weak: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-border-weak-l)); - --bulma-border: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-border-l)); - --bulma-border-hover: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-border-l) + var(--bulma-hover-border-l-delta))); - --bulma-border-active: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-border-l) + var(--bulma-active-border-l-delta))); - --bulma-text-weak: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-weak-l)); - --bulma-text: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-l)); - --bulma-text-strong: hsl(var(--bulma-text-h), var(--bulma-text-s), var(--bulma-text-strong-l)); - --bulma-scheme-invert-ter: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-ter-l)); - --bulma-scheme-invert-bis: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-bis-l)); - --bulma-scheme-invert: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l)); - --bulma-link: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-l)); - --bulma-link-text: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l)); - --bulma-link-text-hover: hsl(var(--bulma-link-h), var(--bulma-link-s), calc(var(--bulma-link-on-scheme-l) + var(--bulma-hover-color-l-delta))); - --bulma-link-text-active: hsl(var(--bulma-link-h), var(--bulma-link-s), calc(var(--bulma-link-on-scheme-l) + var(--bulma-active-color-l-delta))); - --bulma-focus-h: var(--bulma-link-h); - --bulma-focus-s: var(--bulma-link-s); - --bulma-focus-l: var(--bulma-link-l); - --bulma-focus-offset: 1px; - --bulma-focus-style: solid; - --bulma-focus-width: 2px; - --bulma-focus-shadow-size: 0 0 0 0.1875em; - --bulma-focus-shadow-alpha: 0.25; - --bulma-code: hsl(var(--bulma-danger-h), var(--bulma-danger-s), var(--bulma-danger-on-scheme-l)); - --bulma-code-background: var(--bulma-background); - --bulma-pre: var(--bulma-text); - --bulma-pre-background: var(--bulma-background); - --bulma-shadow: 0 0.5em 1em -0.125em hsla(var(--bulma-shadow-h), var(--bulma-shadow-s), var(--bulma-shadow-l), 0.1), 0 0px 0 1px hsla(var(--bulma-shadow-h), var(--bulma-shadow-s), var(--bulma-shadow-l), 0.02); -} - -.swal2-popup.swal2-toast { - box-sizing: border-box; - grid-column: 1/4 !important; - grid-row: 1/4 !important; - grid-template-columns: min-content auto min-content; - padding: 1em; - overflow-y: hidden; - background: #fff; - box-shadow: 0 0 1px hsla(0, 0%, 0%, 0.075), 0 1px 2px hsla(0, 0%, 0%, 0.075), 1px 2px 4px hsla(0, 0%, 0%, 0.075), 1px 3px 8px hsla(0, 0%, 0%, 0.075), 2px 4px 16px hsla(0, 0%, 0%, 0.075); - pointer-events: all; -} -.swal2-popup.swal2-toast > * { - grid-column: 2; -} -.swal2-popup.swal2-toast .swal2-title { - margin: 0.5em 1em; - padding: 0; - font-size: 1em; - text-align: initial; -} -.swal2-popup.swal2-toast .swal2-loading { - justify-content: center; -} -.swal2-popup.swal2-toast .swal2-input { - height: 2em; - margin: 0.5em; - font-size: 1em; -} -.swal2-popup.swal2-toast .swal2-validation-message { - font-size: 1em; -} -.swal2-popup.swal2-toast .swal2-footer { - margin: 0.5em 0 0; - padding: 0.5em 0 0; - font-size: 0.8em; -} -.swal2-popup.swal2-toast .swal2-close { - grid-column: 3/3; - grid-row: 1/99; - align-self: center; - width: 0.8em; - height: 0.8em; - margin: 0; - font-size: 2em; -} -.swal2-popup.swal2-toast .swal2-html-container { - margin: 0.5em 1em; - padding: 0; - overflow: initial; - font-size: 1em; - text-align: initial; -} -.swal2-popup.swal2-toast .swal2-html-container:empty { - padding: 0; -} -.swal2-popup.swal2-toast .swal2-loader { - grid-column: 1; - grid-row: 1/99; - align-self: center; - width: 2em; - height: 2em; - margin: 0.25em; -} -.swal2-popup.swal2-toast .swal2-icon { - grid-column: 1; - grid-row: 1/99; - align-self: center; - width: 2em; - min-width: 2em; - height: 2em; - margin: 0 0.5em 0 0; -} -.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content { - display: flex; - align-items: center; - font-size: 1.8em; - font-weight: bold; -} -.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring { - width: 2em; - height: 2em; -} -.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] { - top: 0.875em; - width: 1.375em; -} -.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { - left: 0.3125em; -} -.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { - right: 0.3125em; -} -.swal2-popup.swal2-toast .swal2-actions { - justify-content: flex-start; - height: auto; - margin: 0; - margin-top: 0.5em; - padding: 0 0.5em; -} -.swal2-popup.swal2-toast .swal2-styled { - margin: 0.25em 0.5em; - padding: 0.4em 0.6em; - font-size: 1em; -} -.swal2-popup.swal2-toast .swal2-success { - border-color: #a5dc86; -} -.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line] { - position: absolute; - width: 1.6em; - height: 3em; - border-radius: 50%; -} -.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] { - top: -0.8em; - left: -0.5em; - transform: rotate(-45deg); - transform-origin: 2em 2em; - border-radius: 4em 0 0 4em; -} -.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right] { - top: -0.25em; - left: 0.9375em; - transform-origin: 0 1.5em; - border-radius: 0 4em 4em 0; -} -.swal2-popup.swal2-toast .swal2-success .swal2-success-ring { - width: 2em; - height: 2em; -} -.swal2-popup.swal2-toast .swal2-success .swal2-success-fix { - top: 0; - left: 0.4375em; - width: 0.4375em; - height: 2.6875em; -} -.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line] { - height: 0.3125em; -} -.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip] { - top: 1.125em; - left: 0.1875em; - width: 0.75em; -} -.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long] { - top: 0.9375em; - right: 0.1875em; - width: 1.375em; -} -.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip { - animation: swal2-toast-animate-success-line-tip 0.75s; -} -.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long { - animation: swal2-toast-animate-success-line-long 0.75s; -} -.swal2-popup.swal2-toast.swal2-show { - animation: swal2-toast-show 0.5s; -} -.swal2-popup.swal2-toast.swal2-hide { - animation: swal2-toast-hide 0.1s forwards; -} - -div:where(.swal2-container) { - display: grid; - position: fixed; - z-index: 1060; - inset: 0; - box-sizing: border-box; - grid-template-areas: "top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end"; - grid-template-rows: minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto); - height: 100%; - padding: 0.625em; - overflow-x: hidden; - transition: background-color 0.1s; - -webkit-overflow-scrolling: touch; -} -div:where(.swal2-container).swal2-backdrop-show, div:where(.swal2-container).swal2-noanimation { - background: rgba(0, 0, 0, 0.4); -} -div:where(.swal2-container).swal2-backdrop-hide { - background: transparent !important; -} -div:where(.swal2-container).swal2-top-start, div:where(.swal2-container).swal2-center-start, div:where(.swal2-container).swal2-bottom-start { - grid-template-columns: minmax(0, 1fr) auto auto; -} -div:where(.swal2-container).swal2-top, div:where(.swal2-container).swal2-center, div:where(.swal2-container).swal2-bottom { - grid-template-columns: auto minmax(0, 1fr) auto; -} -div:where(.swal2-container).swal2-top-end, div:where(.swal2-container).swal2-center-end, div:where(.swal2-container).swal2-bottom-end { - grid-template-columns: auto auto minmax(0, 1fr); -} -div:where(.swal2-container).swal2-top-start > .swal2-popup { - align-self: start; -} -div:where(.swal2-container).swal2-top > .swal2-popup { - grid-column: 2; - place-self: start center; -} -div:where(.swal2-container).swal2-top-end > .swal2-popup, div:where(.swal2-container).swal2-top-right > .swal2-popup { - grid-column: 3; - place-self: start end; -} -div:where(.swal2-container).swal2-center-start > .swal2-popup, div:where(.swal2-container).swal2-center-left > .swal2-popup { - grid-row: 2; - align-self: center; -} -div:where(.swal2-container).swal2-center > .swal2-popup { - grid-column: 2; - grid-row: 2; - place-self: center center; -} -div:where(.swal2-container).swal2-center-end > .swal2-popup, div:where(.swal2-container).swal2-center-right > .swal2-popup { - grid-column: 3; - grid-row: 2; - place-self: center end; -} -div:where(.swal2-container).swal2-bottom-start > .swal2-popup, div:where(.swal2-container).swal2-bottom-left > .swal2-popup { - grid-column: 1; - grid-row: 3; - align-self: end; -} -div:where(.swal2-container).swal2-bottom > .swal2-popup { - grid-column: 2; - grid-row: 3; - place-self: end center; -} -div:where(.swal2-container).swal2-bottom-end > .swal2-popup, div:where(.swal2-container).swal2-bottom-right > .swal2-popup { - grid-column: 3; - grid-row: 3; - place-self: end end; -} -div:where(.swal2-container).swal2-grow-row > .swal2-popup, div:where(.swal2-container).swal2-grow-fullscreen > .swal2-popup { - grid-column: 1/4; - width: 100%; -} -div:where(.swal2-container).swal2-grow-column > .swal2-popup, div:where(.swal2-container).swal2-grow-fullscreen > .swal2-popup { - grid-row: 1/4; - align-self: stretch; -} -div:where(.swal2-container).swal2-no-transition { - transition: none !important; -} -div:where(.swal2-container) div:where(.swal2-popup) { - display: none; - position: relative; - box-sizing: border-box; - grid-template-columns: minmax(0, 100%); - width: 32em; - max-width: 100%; - padding: 0 0 1.25em; - border: none; - border-radius: 5px; - background: #fff; - color: rgb(84.15, 84.15, 84.15); - font-family: inherit; - font-size: 1rem; -} -div:where(.swal2-container) div:where(.swal2-popup):focus { - outline: none; -} -div:where(.swal2-container) div:where(.swal2-popup).swal2-loading { - overflow-y: hidden; -} -div:where(.swal2-container) h2:where(.swal2-title) { - position: relative; - max-width: 100%; - margin: 0; - padding: 0.8em 1em 0; - color: inherit; - font-size: 1.875em; - font-weight: 600; - text-align: center; - text-transform: none; - word-wrap: break-word; -} -div:where(.swal2-container) div:where(.swal2-actions) { - display: flex; - z-index: 1; - box-sizing: border-box; - flex-wrap: wrap; - align-items: center; - justify-content: center; - width: auto; - margin: 1.25em auto 0; - padding: 0; -} -div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled] { - opacity: 0.4; -} -div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover { - background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); -} -div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active { - background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); -} -div:where(.swal2-container) div:where(.swal2-loader) { - display: none; - align-items: center; - justify-content: center; - width: 2.2em; - height: 2.2em; - margin: 0 1.875em; - animation: swal2-rotate-loading 1.5s linear 0s infinite normal; - border-width: 0.25em; - border-style: solid; - border-radius: 100%; - border-color: #2778c4 transparent #2778c4 transparent; -} -div:where(.swal2-container) button:where(.swal2-styled) { - margin: 0.3125em; - padding: 0.625em 1.1em; - transition: box-shadow 0.1s; - box-shadow: 0 0 0 3px transparent; - font-weight: 500; -} -div:where(.swal2-container) button:where(.swal2-styled):not([disabled]) { - cursor: pointer; -} -div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm) { - border: 0; - border-radius: 0.25em; - background: initial; - background-color: #00d1b2; - color: #fff; - font-size: 1em; -} -div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible { - box-shadow: 0 0 0 3px rgba(0, 209, 178, 0.5); -} -div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny) { - border: 0; - border-radius: 0.25em; - background: initial; - background-color: #dc3741; - color: #fff; - font-size: 1em; -} -div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible { - box-shadow: 0 0 0 3px rgba(220, 55, 65, 0.5); -} -div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel) { - border: 0; - border-radius: 0.25em; - background: initial; - background-color: #6e7881; - color: #fff; - font-size: 1em; -} -div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible { - box-shadow: 0 0 0 3px rgba(110, 120, 129, 0.5); -} -div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible { - box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5); -} -div:where(.swal2-container) button:where(.swal2-styled):focus-visible { - outline: none; -} -div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner { - border: 0; -} -div:where(.swal2-container) div:where(.swal2-footer) { - margin: 1em 0 0; - padding: 1em 1em 0; - border-top: 1px solid #eee; - color: inherit; - font-size: 1em; - text-align: center; -} -div:where(.swal2-container) .swal2-timer-progress-bar-container { - position: absolute; - right: 0; - bottom: 0; - left: 0; - grid-column: auto !important; - overflow: hidden; - border-bottom-right-radius: 5px; - border-bottom-left-radius: 5px; -} -div:where(.swal2-container) div:where(.swal2-timer-progress-bar) { - width: 100%; - height: 0.25em; - background: rgba(0, 0, 0, 0.2); -} -div:where(.swal2-container) img:where(.swal2-image) { - max-width: 100%; - margin: 2em auto 1em; -} -div:where(.swal2-container) button:where(.swal2-close) { - z-index: 2; - align-items: center; - justify-content: center; - width: 1.2em; - height: 1.2em; - margin-top: 0; - margin-right: 0; - margin-bottom: -1.2em; - padding: 0; - overflow: hidden; - transition: color 0.1s, box-shadow 0.1s; - border: none; - border-radius: 5px; - background: transparent; - color: #ccc; - font-family: monospace; - font-size: 2.5em; - cursor: pointer; - justify-self: end; -} -div:where(.swal2-container) button:where(.swal2-close):hover { - transform: none; - background: transparent; - color: #f27474; -} -div:where(.swal2-container) button:where(.swal2-close):focus-visible { - outline: none; - box-shadow: inset 0 0 0 3px rgba(100, 150, 200, 0.5); -} -div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner { - border: 0; -} -div:where(.swal2-container) .swal2-html-container { - z-index: 1; - justify-content: center; - margin: 0; - padding: 1em 1.6em 0.3em; - overflow: auto; - color: inherit; - font-size: 1.125em; - font-weight: normal; - line-height: normal; - text-align: center; - word-wrap: break-word; - word-break: break-word; -} -div:where(.swal2-container) input:where(.swal2-input), -div:where(.swal2-container) input:where(.swal2-file), -div:where(.swal2-container) textarea:where(.swal2-textarea), -div:where(.swal2-container) select:where(.swal2-select), -div:where(.swal2-container) div:where(.swal2-radio), -div:where(.swal2-container) label:where(.swal2-checkbox) { - margin: 1em 2em 3px; -} -div:where(.swal2-container) input:where(.swal2-input), -div:where(.swal2-container) input:where(.swal2-file), -div:where(.swal2-container) textarea:where(.swal2-textarea) { - box-sizing: border-box; - width: auto; - transition: border-color 0.1s, box-shadow 0.1s; - border: 1px solid rgb(216.75, 216.75, 216.75); - border-radius: 0.1875em; - background: transparent; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent; - color: inherit; - font-size: 1.125em; -} -div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror, -div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror, -div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror { - border-color: #f27474 !important; - box-shadow: 0 0 2px #f27474 !important; -} -div:where(.swal2-container) input:where(.swal2-input):focus, -div:where(.swal2-container) input:where(.swal2-file):focus, -div:where(.swal2-container) textarea:where(.swal2-textarea):focus { - border: 1px solid #b4dbed; - outline: none; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5); -} -div:where(.swal2-container) input:where(.swal2-input)::placeholder, -div:where(.swal2-container) input:where(.swal2-file)::placeholder, -div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder { - color: #ccc; -} -div:where(.swal2-container) .swal2-range { - margin: 1em 2em 3px; - background: #fff; -} -div:where(.swal2-container) .swal2-range input { - width: 80%; -} -div:where(.swal2-container) .swal2-range output { - width: 20%; - color: inherit; - font-weight: 600; - text-align: center; -} -div:where(.swal2-container) .swal2-range input, -div:where(.swal2-container) .swal2-range output { - height: 2.625em; - padding: 0; - font-size: 1.125em; - line-height: 2.625em; -} -div:where(.swal2-container) .swal2-input { - height: 2.625em; - padding: 0 0.75em; -} -div:where(.swal2-container) .swal2-file { - width: 75%; - margin-right: auto; - margin-left: auto; - background: transparent; - font-size: 1.125em; -} -div:where(.swal2-container) .swal2-textarea { - height: 6.75em; - padding: 0.75em; -} -div:where(.swal2-container) .swal2-select { - min-width: 50%; - max-width: 100%; - padding: 0.375em 0.625em; - background: transparent; - color: inherit; - font-size: 1.125em; -} -div:where(.swal2-container) .swal2-radio, -div:where(.swal2-container) .swal2-checkbox { - align-items: center; - justify-content: center; - background: #fff; - color: inherit; -} -div:where(.swal2-container) .swal2-radio label, -div:where(.swal2-container) .swal2-checkbox label { - margin: 0 0.6em; - font-size: 1.125em; -} -div:where(.swal2-container) .swal2-radio input, -div:where(.swal2-container) .swal2-checkbox input { - flex-shrink: 0; - margin: 0 0.4em; -} -div:where(.swal2-container) label:where(.swal2-input-label) { - display: flex; - justify-content: center; - margin: 1em auto 0; -} -div:where(.swal2-container) div:where(.swal2-validation-message) { - align-items: center; - justify-content: center; - margin: 1em 0 0; - padding: 0.625em; - overflow: hidden; - background: rgb(239.7, 239.7, 239.7); - color: #666666; - font-size: 1em; - font-weight: 300; -} -div:where(.swal2-container) div:where(.swal2-validation-message)::before { - content: "!"; - display: inline-block; - width: 1.5em; - min-width: 1.5em; - height: 1.5em; - margin: 0 0.625em; - border-radius: 50%; - background-color: #f27474; - color: #fff; - font-weight: 600; - line-height: 1.5em; - text-align: center; -} -div:where(.swal2-container) .swal2-progress-steps { - flex-wrap: wrap; - align-items: center; - max-width: 100%; - margin: 1.25em auto; - padding: 0; - background: transparent; - font-weight: 600; -} -div:where(.swal2-container) .swal2-progress-steps li { - display: inline-block; - position: relative; -} -div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step { - z-index: 20; - flex-shrink: 0; - width: 2em; - height: 2em; - border-radius: 2em; - background: #2778c4; - color: #fff; - line-height: 2em; - text-align: center; -} -div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { - background: #2778c4; -} -div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step { - background: #add8e6; - color: #fff; -} -div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line { - background: #add8e6; -} -div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line { - z-index: 10; - flex-shrink: 0; - width: 2.5em; - height: 0.4em; - margin: 0 -1px; - background: #2778c4; -} - -div:where(.swal2-icon) { - position: relative; - box-sizing: content-box; - justify-content: center; - width: 5em; - height: 5em; - margin: 2.5em auto 0.6em; - border: 0.25em solid transparent; - border-radius: 50%; - border-color: #000; - font-family: inherit; - line-height: 5em; - cursor: default; - user-select: none; -} -div:where(.swal2-icon) .swal2-icon-content { - display: flex; - align-items: center; - font-size: 3.75em; -} -div:where(.swal2-icon).swal2-error { - border-color: #f27474; - color: #f27474; -} -div:where(.swal2-icon).swal2-error .swal2-x-mark { - position: relative; - flex-grow: 1; -} -div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line] { - display: block; - position: absolute; - top: 2.3125em; - width: 2.9375em; - height: 0.3125em; - border-radius: 0.125em; - background-color: #f27474; -} -div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left] { - left: 1.0625em; - transform: rotate(45deg); -} -div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right] { - right: 1em; - transform: rotate(-45deg); -} -div:where(.swal2-icon).swal2-error.swal2-icon-show { - animation: swal2-animate-error-icon 0.5s; -} -div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark { - animation: swal2-animate-error-x-mark 0.5s; -} -div:where(.swal2-icon).swal2-warning { - border-color: rgb(249.95234375, 205.965625, 167.74765625); - color: #f8bb86; -} -div:where(.swal2-icon).swal2-warning.swal2-icon-show { - animation: swal2-animate-error-icon 0.5s; -} -div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content { - animation: swal2-animate-i-mark 0.5s; -} -div:where(.swal2-icon).swal2-info { - border-color: rgb(156.7033492823, 224.2822966507, 246.2966507177); - color: #3fc3ee; -} -div:where(.swal2-icon).swal2-info.swal2-icon-show { - animation: swal2-animate-error-icon 0.5s; -} -div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content { - animation: swal2-animate-i-mark 0.8s; -} -div:where(.swal2-icon).swal2-question { - border-color: rgb(200.8064516129, 217.9677419355, 225.1935483871); - color: #87adbd; -} -div:where(.swal2-icon).swal2-question.swal2-icon-show { - animation: swal2-animate-error-icon 0.5s; -} -div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content { - animation: swal2-animate-question-mark 0.8s; -} -div:where(.swal2-icon).swal2-success { - border-color: #a5dc86; - color: #a5dc86; -} -div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line] { - position: absolute; - width: 3.75em; - height: 7.5em; - border-radius: 50%; -} -div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left] { - top: -0.4375em; - left: -2.0635em; - transform: rotate(-45deg); - transform-origin: 3.75em 3.75em; - border-radius: 7.5em 0 0 7.5em; -} -div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right] { - top: -0.6875em; - left: 1.875em; - transform: rotate(-45deg); - transform-origin: 0 3.75em; - border-radius: 0 7.5em 7.5em 0; -} -div:where(.swal2-icon).swal2-success .swal2-success-ring { - position: absolute; - z-index: 2; - top: -0.25em; - left: -0.25em; - box-sizing: content-box; - width: 100%; - height: 100%; - border: 0.25em solid rgba(165, 220, 134, 0.3); - border-radius: 50%; -} -div:where(.swal2-icon).swal2-success .swal2-success-fix { - position: absolute; - z-index: 1; - top: 0.5em; - left: 1.625em; - width: 0.4375em; - height: 5.625em; - transform: rotate(-45deg); -} -div:where(.swal2-icon).swal2-success [class^=swal2-success-line] { - display: block; - position: absolute; - z-index: 2; - height: 0.3125em; - border-radius: 0.125em; - background-color: #a5dc86; -} -div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip] { - top: 2.875em; - left: 0.8125em; - width: 1.5625em; - transform: rotate(45deg); -} -div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long] { - top: 2.375em; - right: 0.5em; - width: 2.9375em; - transform: rotate(-45deg); -} -div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip { - animation: swal2-animate-success-line-tip 0.75s; -} -div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long { - animation: swal2-animate-success-line-long 0.75s; -} -div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right { - animation: swal2-rotate-success-circular-line 4.25s ease-in; -} - -[class^=swal2] { - -webkit-tap-highlight-color: transparent; -} - -.swal2-show { - animation: swal2-show 0.3s; -} - -.swal2-hide { - animation: swal2-hide 0.15s forwards; -} - -.swal2-noanimation { - transition: none; -} - -.swal2-scrollbar-measure { - position: absolute; - top: -9999px; - width: 50px; - height: 50px; - overflow: scroll; -} - -.swal2-rtl .swal2-close { - margin-right: initial; - margin-left: 0; -} -.swal2-rtl .swal2-timer-progress-bar { - right: 0; - left: auto; -} - -@keyframes swal2-toast-show { - 0% { - transform: translateY(-0.625em) rotateZ(2deg); - } - 33% { - transform: translateY(0) rotateZ(-2deg); - } - 66% { - transform: translateY(0.3125em) rotateZ(2deg); - } - 100% { - transform: translateY(0) rotateZ(0deg); - } -} -@keyframes swal2-toast-hide { - 100% { - transform: rotateZ(1deg); - opacity: 0; - } -} -@keyframes swal2-toast-animate-success-line-tip { - 0% { - top: 0.5625em; - left: 0.0625em; - width: 0; - } - 54% { - top: 0.125em; - left: 0.125em; - width: 0; - } - 70% { - top: 0.625em; - left: -0.25em; - width: 1.625em; - } - 84% { - top: 1.0625em; - left: 0.75em; - width: 0.5em; - } - 100% { - top: 1.125em; - left: 0.1875em; - width: 0.75em; - } -} -@keyframes swal2-toast-animate-success-line-long { - 0% { - top: 1.625em; - right: 1.375em; - width: 0; - } - 65% { - top: 1.25em; - right: 0.9375em; - width: 0; - } - 84% { - top: 0.9375em; - right: 0; - width: 1.125em; - } - 100% { - top: 0.9375em; - right: 0.1875em; - width: 1.375em; - } -} -@keyframes swal2-show { - 0% { - transform: scale(0.7); - } - 45% { - transform: scale(1.05); - } - 80% { - transform: scale(0.95); - } - 100% { - transform: scale(1); - } -} -@keyframes swal2-hide { - 0% { - transform: scale(1); - opacity: 1; - } - 100% { - transform: scale(0.5); - opacity: 0; - } -} -@keyframes swal2-animate-success-line-tip { - 0% { - top: 1.1875em; - left: 0.0625em; - width: 0; - } - 54% { - top: 1.0625em; - left: 0.125em; - width: 0; - } - 70% { - top: 2.1875em; - left: -0.375em; - width: 3.125em; - } - 84% { - top: 3em; - left: 1.3125em; - width: 1.0625em; - } - 100% { - top: 2.8125em; - left: 0.8125em; - width: 1.5625em; - } -} -@keyframes swal2-animate-success-line-long { - 0% { - top: 3.375em; - right: 2.875em; - width: 0; - } - 65% { - top: 3.375em; - right: 2.875em; - width: 0; - } - 84% { - top: 2.1875em; - right: 0; - width: 3.4375em; - } - 100% { - top: 2.375em; - right: 0.5em; - width: 2.9375em; - } -} -@keyframes swal2-rotate-success-circular-line { - 0% { - transform: rotate(-45deg); - } - 5% { - transform: rotate(-45deg); - } - 12% { - transform: rotate(-405deg); - } - 100% { - transform: rotate(-405deg); - } -} -@keyframes swal2-animate-error-x-mark { - 0% { - margin-top: 1.625em; - transform: scale(0.4); - opacity: 0; - } - 50% { - margin-top: 1.625em; - transform: scale(0.4); - opacity: 0; - } - 80% { - margin-top: -0.375em; - transform: scale(1.15); - } - 100% { - margin-top: 0; - transform: scale(1); - opacity: 1; - } -} -@keyframes swal2-animate-error-icon { - 0% { - transform: rotateX(100deg); - opacity: 0; - } - 100% { - transform: rotateX(0deg); - opacity: 1; - } -} -@keyframes swal2-rotate-loading { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} -@keyframes swal2-animate-question-mark { - 0% { - transform: rotateY(-360deg); - } - 100% { - transform: rotateY(0); - } -} -@keyframes swal2-animate-i-mark { - 0% { - transform: rotateZ(45deg); - opacity: 0; - } - 25% { - transform: rotateZ(-25deg); - opacity: 0.4; - } - 50% { - transform: rotateZ(15deg); - opacity: 0.8; - } - 75% { - transform: rotateZ(-5deg); - opacity: 1; - } - 100% { - transform: rotateX(0); - opacity: 1; - } -} -body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { - overflow: hidden; -} -body.swal2-height-auto { - height: auto !important; -} -body.swal2-no-backdrop .swal2-container { - background-color: transparent !important; - pointer-events: none; -} -body.swal2-no-backdrop .swal2-container .swal2-popup { - pointer-events: all; -} -body.swal2-no-backdrop .swal2-container .swal2-modal { - box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); -} -@media print { - body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { - overflow-y: scroll !important; - } - body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] { - display: none; - } - body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container { - position: static !important; - } -} -body.swal2-toast-shown .swal2-container { - box-sizing: border-box; - width: 360px; - max-width: 100%; - background-color: transparent; - pointer-events: none; -} -body.swal2-toast-shown .swal2-container.swal2-top { - inset: 0 auto auto 50%; - transform: translateX(-50%); -} -body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right { - inset: 0 0 auto auto; -} -body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left { - inset: 0 auto auto 0; -} -body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left { - inset: 50% auto auto 0; - transform: translateY(-50%); -} -body.swal2-toast-shown .swal2-container.swal2-center { - inset: 50% auto auto 50%; - transform: translate(-50%, -50%); -} -body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right { - inset: 50% 0 auto auto; - transform: translateY(-50%); -} -body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left { - inset: auto auto 0 0; -} -body.swal2-toast-shown .swal2-container.swal2-bottom { - inset: auto auto 0 50%; - transform: translateX(-50%); -} -body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right { - inset: auto 0 0 auto; -} - -[class*=" icon"], -[class^=icon] { - stroke: currentColor; - stroke-width: 2; - stroke-linecap: round; - stroke-linejoin: round; - fill: none; - display: inline-block; - position: relative; - top: -0.05em; - vertical-align: middle; -} - -.result { - visibility: hidden; -} - -.fadeout { - visibility: visible; - opacity: 0; - transition: opacity 2s ease-in; -} - -section.htmx-request { - visibility: hidden; -} diff --git a/web/static/dist/sweetalert2.min.js b/web/static/dist/sweetalert2.min.js deleted file mode 100644 index de35cdd1..00000000 --- a/web/static/dist/sweetalert2.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! -* sweetalert2-neutral v11.14.1-neutral-fix2 -* Released under the MIT License. -*/ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sweetalert2=t()}(this,(function(){"use strict";function e(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function t(t,n){return t.get(e(t,n))}function n(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}const o={},i=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,i=window.scrollY;o.restoreFocusTimeout=setTimeout((()=>{o.previousActiveElement instanceof HTMLElement?(o.previousActiveElement.focus(),o.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,i)})),s="swal2-",r=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"].reduce(((e,t)=>(e[t]=s+t,e)),{}),a=["success","warning","info","question","error"].reduce(((e,t)=>(e[t]=s+t,e)),{}),l="SweetAlert2:",c=e=>e.charAt(0).toUpperCase()+e.slice(1),u=e=>{console.warn(`${l} ${"object"==typeof e?e.join(" "):e}`)},d=e=>{console.error(`${l} ${e}`)},p=[],m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;var n;n=`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`,p.includes(n)||(p.push(n),u(n))},h=e=>"function"==typeof e?e():e,g=e=>e&&"function"==typeof e.toPromise,f=e=>g(e)?e.toPromise():Promise.resolve(e),b=e=>e&&Promise.resolve(e)===e,y=()=>document.body.querySelector(`.${r.container}`),w=e=>{const t=y();return t?t.querySelector(e):null},v=e=>w(`.${e}`),C=()=>v(r.popup),A=()=>v(r.icon),k=()=>v(r.title),E=()=>v(r["html-container"]),B=()=>v(r.image),$=()=>v(r["progress-steps"]),P=()=>v(r["validation-message"]),x=()=>w(`.${r.actions} .${r.confirm}`),L=()=>w(`.${r.actions} .${r.cancel}`),T=()=>w(`.${r.actions} .${r.deny}`),S=()=>w(`.${r.loader}`),O=()=>v(r.actions),M=()=>v(r.footer),j=()=>v(r["timer-progress-bar"]),H=()=>v(r.close),I=()=>{const e=C();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(t).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")||"0"),o=parseInt(t.getAttribute("tabindex")||"0");return n>o?1:n"-1"!==e.getAttribute("tabindex")));return[...new Set(n.concat(i))].filter((e=>ee(e)))},D=()=>N(document.body,r.shown)&&!N(document.body,r["toast-shown"])&&!N(document.body,r["no-backdrop"]),q=()=>{const e=C();return!!e&&N(e,r.toast)},V=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html"),o=n.querySelector("head");o&&Array.from(o.childNodes).forEach((t=>{e.appendChild(t)}));const i=n.querySelector("body");i&&Array.from(i.childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},N=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t{if(((e,t)=>{Array.from(e.classList).forEach((n=>{Object.values(r).includes(n)||Object.values(a).includes(n)||Object.values(t.showClass||{}).includes(n)||e.classList.remove(n)}))})(e,t),!t.customClass)return;const o=t.customClass[n];o&&("string"==typeof o||o.forEach?z(e,o):u(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof o}"`))},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${r.popup} > .${r[t]}`);case"checkbox":return e.querySelector(`.${r.popup} > .${r.checkbox} input`);case"radio":return e.querySelector(`.${r.popup} > .${r.radio} input:checked`)||e.querySelector(`.${r.popup} > .${r.radio} input:first-child`);case"range":return e.querySelector(`.${r.popup} > .${r.range} input`);default:return e.querySelector(`.${r.popup} > .${r.input}`)}},R=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},U=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},z=(e,t)=>{U(e,t,!0)},K=(e,t)=>{U(e,t,!1)},W=(e,t)=>{const n=Array.from(e.children);for(let e=0;e{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style.setProperty(t,"number"==typeof n?`${n}px`:n):e.style.removeProperty(t)},Z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e&&(e.style.display=t)},J=e=>{e&&(e.style.display="none")},X=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"block";e&&new MutationObserver((()=>{Q(e,e.innerHTML,t)})).observe(e,{childList:!0,subtree:!0})},G=(e,t,n,o)=>{const i=e.querySelector(t);i&&i.style.setProperty(n,o)},Q=function(e,t){t?Z(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):J(e)},ee=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),te=e=>!!(e.scrollHeight>e.clientHeight),ne=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),o=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||o>0},oe=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=j();n&&ee(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},ie=()=>"undefined"==typeof window||"undefined"==typeof document,se=`\n
\n \n
    \n
    \n \n

    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n`.replace(/(^|\n)\s*/g,""),re=()=>{o.currentInstance.resetValidationMessage()},ae=e=>{const t=(()=>{const e=y();return!!e&&(e.remove(),K([document.documentElement,document.body],[r["no-backdrop"],r["toast-shown"],r["has-column"]]),!0)})();if(ie())return void d("SweetAlert2 requires document to initialize");const n=document.createElement("div");n.className=r.container,t&&z(n,r["no-transition"]),V(n,se);const o="string"==typeof(i=e.target)?document.querySelector(i):i;var i;o.appendChild(n),(e=>{const t=C();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&z(y(),r.rtl)})(o),(()=>{const e=C(),t=W(e,r.input),n=W(e,r.file),o=e.querySelector(`.${r.range} input`),i=e.querySelector(`.${r.range} output`),s=W(e,r.select),a=e.querySelector(`.${r.checkbox} input`),l=W(e,r.textarea);t.oninput=re,n.onchange=re,s.onchange=re,a.onchange=re,l.oninput=re,o.oninput=()=>{re(),i.value=o.value},o.onchange=()=>{re(),i.value=o.value}})()},le=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?ue(t,e):V(t,e.toString())},ue=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},de=(()=>{if(ie())return!1;const e=document.createElement("div");return void 0!==e.style.webkitAnimation?"webkitAnimationEnd":void 0!==e.style.animation&&"animationend"})(),pe=(e,t)=>{const n=O(),o=S();n&&o&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z(n):J(n),_(n,t,"actions"),function(e,t,n){const o=x(),i=T(),s=L();if(!o||!i||!s)return;me(o,"confirm",n),me(i,"deny",n),me(s,"cancel",n),function(e,t,n,o){if(!o.buttonsStyling)return void K([e,t,n],r.styled);z([e,t,n],r.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,z(e,r["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,z(t,r["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,z(n,r["default-outline"]))}(o,i,s,n),n.reverseButtons&&(n.toast?(e.insertBefore(s,o),e.insertBefore(i,o)):(e.insertBefore(s,t),e.insertBefore(i,t),e.insertBefore(o,t)))}(n,o,t),V(o,t.loaderHtml||""),_(o,t,"loader"))};function me(e,t,n){const o=c(t);Q(e,n[`show${o}Button`],"inline-block"),V(e,n[`${t}ButtonText`]||""),e.setAttribute("aria-label",n[`${t}ButtonAriaLabel`]||""),e.className=r[t],_(e,n,`${t}Button`)}const he=(e,t)=>{const n=y();n&&(!function(e,t){"string"==typeof t?e.style.background=t:t||z([document.documentElement,document.body],r["no-backdrop"])}(n,t.backdrop),function(e,t){if(!t)return;t in r?z(e,r[t]):(u('The "position" parameter is not valid, defaulting to "center"'),z(e,r.center))}(n,t.position),function(e,t){if(!t)return;z(e,r[`grow-${t}`])}(n,t.grow),_(n,t,"container"))};var ge={innerParams:new WeakMap,domCache:new WeakMap};const fe=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!e.input)return;if(!Ee[e.input])return void d(`Unexpected type of input! Expected ${Object.keys(Ee).join(" | ")}, got "${e.input}"`);const t=Ae(e.input);if(!t)return;const n=Ee[e.input](t,e);Z(t),e.inputAutoFocus&&setTimeout((()=>{R(n)}))},ye=(e,t)=>{const n=C();if(!n)return;const o=F(n,e);if(o){(e=>{for(let t=0;t{if(!e.input)return;const t=Ae(e.input);t&&_(t,e,"input")},ve=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},Ce=(e,t,n)=>{if(n.inputLabel){const o=document.createElement("label"),i=r["input-label"];o.setAttribute("for",e.id),o.className=i,"object"==typeof n.customClass&&z(o,n.customClass.inputLabel),o.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",o)}},Ae=e=>{const t=C();if(t)return W(t,r[e]||r.input)},ke=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:b(t)||u(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Ee={};Ee.text=Ee.email=Ee.password=Ee.number=Ee.tel=Ee.url=Ee.search=Ee.date=Ee["datetime-local"]=Ee.time=Ee.week=Ee.month=(e,t)=>(ke(e,t.inputValue),Ce(e,e,t),ve(e,t),e.type=t.input,e),Ee.file=(e,t)=>(Ce(e,e,t),ve(e,t),e),Ee.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return ke(n,t.inputValue),n.type=t.input,ke(o,t.inputValue),Ce(n,e,t),e},Ee.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return Ce(e,e,t),e},Ee.radio=e=>(e.textContent="",e),Ee.checkbox=(e,t)=>{const n=F(C(),"checkbox");n.value="1",n.checked=Boolean(t.inputValue);const o=e.querySelector("span");return V(o,t.inputPlaceholder||t.inputLabel),n},Ee.textarea=(e,t)=>{ke(e,t.inputValue),ve(e,t),Ce(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const n=parseInt(window.getComputedStyle(C()).width);new MutationObserver((()=>{if(!document.body.contains(e))return;const o=e.offsetWidth+(i=e,parseInt(window.getComputedStyle(i).marginLeft)+parseInt(window.getComputedStyle(i).marginRight));var i;o>n?C().style.width=`${o}px`:Y(C(),"width",t.width)})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Be=(e,t)=>{const n=E();n&&(X(n),_(n,t,"htmlContainer"),t.html?(le(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,t)=>{const n=C();if(!n)return;const o=ge.innerParams.get(e),i=!o||t.input!==o.input;fe.forEach((e=>{const o=W(n,r[e]);o&&(ye(e,t.inputAttributes),o.className=r[e],i&&J(o))})),t.input&&(i&&be(t),we(t))})(e,t))},$e=(e,t)=>{for(const[n,o]of Object.entries(a))t.icon!==n&&K(e,o);z(e,t.icon&&a[t.icon]),Le(e,t),Pe(),_(e,t,"icon")},Pe=()=>{const e=C();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{if(!t.icon&&!t.iconHtml)return;let n=e.innerHTML,o="";if(t.iconHtml)o=Te(t.iconHtml);else if("success"===t.icon)o='\n
    \n \n
    \n
    \n',n=n.replace(/ style=".*?"/g,"");else if("error"===t.icon)o='\n \n \n \n \n';else if(t.icon){o=Te({question:"?",warning:"!",info:"i"}[t.icon])}n.trim()!==o.trim()&&V(e,o)},Le=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])G(e,n,"background-color",t.iconColor);G(e,".swal2-success-ring","border-color",t.iconColor)}},Te=e=>`
    ${e}
    `,Se=(e,t)=>{const n=t.showClass||{};e.className=`${r.popup} ${ee(e)?n.popup:""}`,t.toast?(z([document.documentElement,document.body],r["toast-shown"]),z(e,r.toast)):z(e,r.modal),_(e,t,"popup"),"string"==typeof t.customClass&&z(e,t.customClass),t.icon&&z(e,r[`icon-${t.icon}`])},Oe=e=>{const t=document.createElement("li");return z(t,r["progress-step"]),V(t,e),t},Me=e=>{const t=document.createElement("li");return z(t,r["progress-step-line"]),e.progressStepsDistance&&Y(t,"width",e.progressStepsDistance),t},je=(e,t)=>{((e,t)=>{const n=y(),o=C();if(n&&o){if(t.toast){Y(n,"width",t.width),o.style.width="100%";const e=S();e&&o.insertBefore(e,A())}else Y(o,"width",t.width);Y(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),J(P()),Se(o,t)}})(0,t),he(0,t),((e,t)=>{const n=$();if(!n)return;const{progressSteps:o,currentProgressStep:i}=t;o&&0!==o.length&&void 0!==i?(Z(n),n.textContent="",i>=o.length&&u("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach(((e,s)=>{const a=Oe(e);if(n.appendChild(a),s===i&&z(a,r["active-progress-step"]),s!==o.length-1){const e=Me(t);n.appendChild(e)}}))):J(n)})(0,t),((e,t)=>{const n=ge.innerParams.get(e),o=A();if(o){if(n&&t.icon===n.icon)return xe(o,t),void $e(o,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(a).indexOf(t.icon))return d(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void J(o);Z(o),xe(o,t),$e(o,t),z(o,t.showClass&&t.showClass.icon)}else J(o)}})(e,t),((e,t)=>{const n=B();n&&(t.imageUrl?(Z(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt||""),Y(n,"width",t.imageWidth),Y(n,"height",t.imageHeight),n.className=r.image,_(n,t,"image")):J(n))})(0,t),((e,t)=>{const n=k();n&&(X(n),Q(n,t.title||t.titleText,"block"),t.title&&le(t.title,n),t.titleText&&(n.innerText=t.titleText),_(n,t,"title"))})(0,t),((e,t)=>{const n=H();n&&(V(n,t.closeButtonHtml||""),_(n,t,"closeButton"),Q(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),Be(e,t),pe(0,t),((e,t)=>{const n=M();n&&(X(n),Q(n,t.footer,"block"),t.footer&&le(t.footer,n),_(n,t,"footer"))})(0,t);const n=C();"function"==typeof t.didRender&&n&&t.didRender(n),o.eventEmitter.emit("didRender",n)},He=()=>{var e;return null===(e=x())||void 0===e?void 0:e.click()},Ie=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),De=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},qe=(e,t)=>{var n;const o=I();if(o.length)return(e+=t)===o.length?e=0:-1===e&&(e=o.length-1),void o[e].focus();null===(n=C())||void 0===n||n.focus()},Ve=["ArrowRight","ArrowDown"],Ne=["ArrowLeft","ArrowUp"],_e=(e,t,n)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Fe(t,e):"Tab"===t.key?Re(t):[...Ve,...Ne].includes(t.key)?Ue(t.key):"Escape"===t.key&&ze(t,e,n)))},Fe=(e,t)=>{if(!h(t.allowEnterKey))return;const n=F(C(),t.input);if(e.target&&n&&e.target instanceof HTMLElement&&e.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(t.input))return;He(),e.preventDefault()}},Re=e=>{const t=e.target,n=I();let o=-1;for(let e=0;e{const t=O(),n=x(),o=T(),i=L();if(!(t&&n&&o&&i))return;const s=[n,o,i];if(document.activeElement instanceof HTMLElement&&!s.includes(document.activeElement))return;const r=Ve.includes(e)?"nextElementSibling":"previousElementSibling";let a=document.activeElement;if(a){for(let e=0;e{h(t.allowEscapeKey)&&(e.preventDefault(),n(Ie.esc))};var Ke={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const We=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},Ye="undefined"!=typeof window&&!!window.GestureEvent,Ze=()=>{const e=y();if(!e)return;let t;e.ontouchstart=e=>{t=Je(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},Je=e=>{const t=e.target,n=y(),o=E();return!(!n||!o)&&(!Xe(e)&&!Ge(e)&&(t===n||!te(n)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!te(o)||!o.contains(t))))},Xe=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Ge=e=>e.touches&&e.touches.length>1;let Qe=null;const et=e=>{null===Qe&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(Qe=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${Qe+(()=>{const e=document.createElement("div");e.className=r["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function tt(e,t,n,s){q()?ct(e,s):(i(n).then((()=>ct(e,s))),De(o)),Ye?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),D()&&(null!==Qe&&(document.body.style.paddingRight=`${Qe}px`,Qe=null),(()=>{if(N(document.body,r.iosfix)){const e=parseInt(document.body.style.top,10);K(document.body,r.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),We()),K([document.documentElement,document.body],[r.shown,r["height-auto"],r["no-backdrop"],r["toast-shown"]])}function nt(e){e=rt(e);const t=Ke.swalPromiseResolve.get(this),n=ot(this);this.isAwaitingPromise?e.isDismissed||(st(this),t(e)):n&&t(e)}const ot=e=>{const t=C();if(!t)return!1;const n=ge.innerParams.get(e);if(!n||N(t,n.hideClass.popup))return!1;K(t,n.showClass.popup),z(t,n.hideClass.popup);const o=y();return K(o,n.showClass.backdrop),z(o,n.hideClass.backdrop),at(e,t,n),!0};function it(e){const t=Ke.swalPromiseReject.get(this);st(this),t&&t(e)}const st=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,ge.innerParams.get(e)||e._destroy())},rt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),at=(e,t,n)=>{const i=y(),s=de&&ne(t);"function"==typeof n.willClose&&n.willClose(t),o.eventEmitter.emit("willClose",t),s?lt(e,t,i,n.returnFocus,n.didClose):tt(e,i,n.returnFocus,n.didClose)},lt=(e,t,n,i,s)=>{de&&(o.swalCloseEventFinishedCallback=tt.bind(null,e,n,i,s),t.addEventListener(de,(function(e){e.target===t&&(o.swalCloseEventFinishedCallback(),delete o.swalCloseEventFinishedCallback)})))},ct=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),o.eventEmitter.emit("didClose"),e._destroy&&e._destroy()}))},ut=e=>{let t=C();if(t||new Rn,t=C(),!t)return;const n=S();q()?J(A()):dt(t,e),Z(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},dt=(e,t)=>{const n=O(),o=S();n&&o&&(!t&&ee(x())&&(t=x()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className),n.insertBefore(o,t)),z([e,n],r.loading))},pt=e=>e.checked?1:0,mt=e=>e.checked?e.value:null,ht=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,gt=(e,t)=>{const n=C();if(!n)return;const o=e=>{"select"===t.input?function(e,t,n){const o=W(e,r.select);if(!o)return;const i=(e,t,o)=>{const i=document.createElement("option");i.value=o,V(i,t),i.selected=yt(o,n.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,o.appendChild(e),n.forEach((t=>i(e,t[1],t[0])))}else i(o,n,t)})),o.focus()}(n,bt(e),t):"radio"===t.input&&function(e,t,n){const o=W(e,r.radio);if(!o)return;t.forEach((e=>{const t=e[0],i=e[1],s=document.createElement("input"),a=document.createElement("label");s.type="radio",s.name=r.radio,s.value=t,yt(t,n.inputValue)&&(s.checked=!0);const l=document.createElement("span");V(l,i),l.className=r.label,a.appendChild(s),a.appendChild(l),o.appendChild(a)}));const i=o.querySelectorAll("input");i.length&&i[0].focus()}(n,bt(e),t)};g(t.inputOptions)||b(t.inputOptions)?(ut(x()),f(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):d("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},ft=(e,t)=>{const n=e.getInput();n&&(J(n),f(t.inputValue).then((o=>{n.value="number"===t.input?`${parseFloat(o)||0}`:`${o}`,Z(n),n.focus(),e.hideLoading()})).catch((t=>{d(`Error in inputValue promise: ${t}`),n.value="",Z(n),n.focus(),e.hideLoading()})))};const bt=e=>{const t=[];return e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=bt(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=bt(o)),t.push([n,o])})),t},yt=(e,t)=>!!t&&t.toString()===e.toString(),wt=(e,t)=>{const n=ge.innerParams.get(e);if(!n.input)return void d(`The "input" parameter is needed to be set when using returnInputValueOn${c(t)}`);const o=e.getInput(),i=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return pt(n);case"radio":return mt(n);case"file":return ht(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?vt(e,i,t):o&&!o.checkValidity()?(e.enableButtons(),e.showValidationMessage(n.validationMessage||o.validationMessage)):"deny"===t?Ct(e,i):Et(e,i)},vt=(e,t,n)=>{const o=ge.innerParams.get(e);e.disableInput();Promise.resolve().then((()=>f(o.inputValidator(t,o.validationMessage)))).then((o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===n?Ct(e,t):Et(e,t)}))},Ct=(e,t)=>{const n=ge.innerParams.get(e||void 0);if(n.showLoaderOnDeny&&ut(T()),n.preDeny){e.isAwaitingPromise=!0;Promise.resolve().then((()=>f(n.preDeny(t,n.validationMessage)))).then((n=>{!1===n?(e.hideLoading(),st(e)):e.close({isDenied:!0,value:void 0===n?t:n})})).catch((t=>kt(e||void 0,t)))}else e.close({isDenied:!0,value:t})},At=(e,t)=>{e.close({isConfirmed:!0,value:t})},kt=(e,t)=>{e.rejectPromise(t)},Et=(e,t)=>{const n=ge.innerParams.get(e||void 0);if(n.showLoaderOnConfirm&&ut(),n.preConfirm){e.resetValidationMessage(),e.isAwaitingPromise=!0;Promise.resolve().then((()=>f(n.preConfirm(t,n.validationMessage)))).then((n=>{ee(P())||!1===n?(e.hideLoading(),st(e)):At(e,void 0===n?t:n)})).catch((t=>kt(e||void 0,t)))}else At(e,t)};function Bt(){const e=ge.innerParams.get(this);if(!e)return;const t=ge.domCache.get(this);J(t.loader),q()?e.icon&&Z(A()):$t(t),K([t.popup,t.actions],r.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const $t=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?Z(t[0],"inline-block"):ee(x())||ee(T())||ee(L())||J(e.actions)};function Pt(){const e=ge.innerParams.get(this),t=ge.domCache.get(this);return t?F(t.popup,e.input):null}function xt(e,t,n){const o=ge.domCache.get(e);t.forEach((e=>{o[e].disabled=n}))}function Lt(e,t){const n=C();if(n&&e)if("radio"===e.type){const e=n.querySelectorAll(`[name="${r.radio}"]`);for(let n=0;nObject.prototype.hasOwnProperty.call(It,e),_t=e=>-1!==Dt.indexOf(e),Ft=e=>qt[e],Rt=e=>{Nt(e)||u(`Unknown parameter "${e}"`)},Ut=e=>{Vt.includes(e)&&u(`The parameter "${e}" is incompatible with toasts`)},zt=e=>{const t=Ft(e);t&&m(e,t)};function Kt(e){const t=C(),n=ge.innerParams.get(this);if(!t||N(t,n.hideClass.popup))return void u("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o=Wt(e),i=Object.assign({},n,o);je(this,i),ge.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const Wt=e=>{const t={};return Object.keys(e).forEach((n=>{_t(n)?t[n]=e[n]:u(`Invalid parameter to update: ${n}`)})),t};function Yt(){const e=ge.domCache.get(this),t=ge.innerParams.get(this);t?(e.popup&&o.swalCloseEventFinishedCallback&&(o.swalCloseEventFinishedCallback(),delete o.swalCloseEventFinishedCallback),"function"==typeof t.didDestroy&&t.didDestroy(),o.eventEmitter.emit("didDestroy"),Zt(this)):Jt(this)}const Zt=e=>{Jt(e),delete e.params,delete o.keydownHandler,delete o.keydownTarget,delete o.currentInstance},Jt=e=>{e.isAwaitingPromise?(Xt(ge,e),e.isAwaitingPromise=!0):(Xt(Ke,e),Xt(ge,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},Xt=(e,t)=>{for(const n in e)e[n].delete(t)};var Gt=Object.freeze({__proto__:null,hideLoading:Bt,disableLoading:Bt,getInput:Pt,close:nt,rejectPromise:it,handleAwaitingPromise:st,closePopup:nt,closeModal:nt,closeToast:nt,enableButtons:Tt,disableButtons:St,enableInput:Ot,disableInput:Mt,showValidationMessage:jt,resetValidationMessage:Ht,update:Kt,_destroy:Yt});const Qt=(e,t,n)=>{t.popup.onclick=()=>{e&&(en(e)||e.timer||e.input)||n(Ie.close)}},en=e=>!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let tn=!1;const nn=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(tn=!0)}}},on=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(tn=!0)}}},sn=(e,t,n)=>{t.container.onclick=o=>{tn?tn=!1:o.target===t.container&&h(e.allowOutsideClick)&&n(Ie.backdrop)}},rn=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const an=()=>{if(o.timeout)return(()=>{const e=j();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${n}%`})(),o.timeout.stop()},ln=()=>{if(o.timeout){const e=o.timeout.start();return oe(e),e}};let cn=!1;const un={};const dn=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in un){const n=t.getAttribute(e);if(n)return void un[e].fire({template:n})}};o.eventEmitter=new class{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const n=this._getHandlersByEventName(e);n.includes(t)||n.push(t)}once(e,t){var n=this;const o=function(){n.removeListener(e,o);for(var i=arguments.length,s=new Array(i),r=0;r1?t-1:0),o=1;o{try{e.apply(this,n)}catch(e){console.error(e)}}))}removeListener(e,t){const n=this._getHandlersByEventName(e),o=n.indexOf(t);o>-1&&n.splice(o,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}};var pn=Object.freeze({__proto__:null,isValidParameter:Nt,isUpdatableParameter:_t,isDeprecatedParameter:Ft,argsToParams:e=>{const t={};return"object"!=typeof e[0]||rn(e[0])?["title","html","icon"].forEach(((n,o)=>{const i=e[o];"string"==typeof i||rn(i)?t[n]=i:void 0!==i&&d(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},getContainer:y,getPopup:C,getTitle:k,getHtmlContainer:E,getImage:B,getIcon:A,getIconContent:()=>v(r["icon-content"]),getInputLabel:()=>v(r["input-label"]),getCloseButton:H,getActions:O,getConfirmButton:x,getDenyButton:T,getCancelButton:L,getLoader:S,getFooter:M,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:P,getProgressSteps:$,isLoading:()=>{const e=C();return!!e&&e.hasAttribute("data-loading")},isVisible:()=>ee(C()),clickConfirm:He,clickDeny:()=>{var e;return null===(e=T())||void 0===e?void 0:e.click()},clickCancel:()=>{var e;return null===(e=L())||void 0===e?void 0:e.click()},fire:function(){for(var e=arguments.length,t=new Array(e),n=0;no.timeout&&o.timeout.getTimerLeft(),stopTimer:an,resumeTimer:ln,toggleTimer:()=>{const e=o.timeout;return e&&(e.running?an():ln())},increaseTimer:e=>{if(o.timeout){const t=o.timeout.increase(e);return oe(t,!0),t}},isTimerRunning:()=>!(!o.timeout||!o.timeout.isRunning()),bindClickHandler:function(){un[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,cn||(document.body.addEventListener("click",dn),cn=!0)},on:(e,t)=>{o.eventEmitter.on(e,t)},once:(e,t)=>{o.eventEmitter.once(e,t)},off:(e,t)=>{e?t?o.eventEmitter.removeListener(e,t):o.eventEmitter.removeAllListeners(e):o.eventEmitter.reset()}});class mn{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const hn=["swal-title","swal-html","swal-footer"],gn=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{kn(e,["name","value"]);const n=e.getAttribute("name"),o=e.getAttribute("value");n&&o&&(t[n]="boolean"==typeof It[n]?"false"!==o:"object"==typeof It[n]?JSON.parse(o):o)})),t},fn=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const n=e.getAttribute("name"),o=e.getAttribute("value");n&&o&&(t[n]=new Function(`return ${o}`)())})),t},bn=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{kn(e,["type","color","aria-label"]);const n=e.getAttribute("type");n&&["confirm","cancel","deny"].includes(n)&&(t[`${n}ButtonText`]=e.innerHTML,t[`show${c(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label")))})),t},yn=e=>{const t={},n=e.querySelector("swal-image");return n&&(kn(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")||void 0),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")||void 0),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")||void 0),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt")||void 0)),t},wn=e=>{const t={},n=e.querySelector("swal-icon");return n&&(kn(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},vn=e=>{const t={},n=e.querySelector("swal-input");n&&(kn(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const o=Array.from(e.querySelectorAll("swal-input-option"));return o.length&&(t.inputOptions={},o.forEach((e=>{kn(e,["value"]);const n=e.getAttribute("value");if(!n)return;const o=e.innerHTML;t.inputOptions[n]=o}))),t},Cn=(e,t)=>{const n={};for(const o in t){const i=t[o],s=e.querySelector(i);s&&(kn(s,[]),n[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},An=e=>{const t=hn.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const n=e.tagName.toLowerCase();t.includes(n)||u(`Unrecognized element <${n}>`)}))},kn=(e,t)=>{Array.from(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&u([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])}))},En=e=>{const t=y(),n=C();"function"==typeof e.willOpen&&e.willOpen(n),o.eventEmitter.emit("willOpen",n);const i=window.getComputedStyle(document.body).overflowY;xn(t,n,e),setTimeout((()=>{$n(t,n)}),10),D()&&(Pn(t,e.scrollbarPadding,i),(()=>{const e=y();Array.from(document.body.children).forEach((t=>{t.contains(e)||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")||""),t.setAttribute("aria-hidden","true"))}))})()),q()||o.previousActiveElement||(o.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(n))),o.eventEmitter.emit("didOpen",n),K(t,r["no-transition"])},Bn=e=>{const t=C();if(e.target!==t||!de)return;const n=y();t.removeEventListener(de,Bn),n.style.overflowY="auto"},$n=(e,t)=>{de&&ne(t)?(e.style.overflowY="hidden",t.addEventListener(de,Bn)):e.style.overflowY="auto"},Pn=(e,t,n)=>{(()=>{if(Ye&&!N(document.body,r.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",z(document.body,r.iosfix),Ze()}})(),t&&"hidden"!==n&&et(n),setTimeout((()=>{e.scrollTop=0}))},xn=(e,t,n)=>{z(e,n.showClass.backdrop),n.animation?(t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout((()=>{z(t,n.showClass.popup),t.style.removeProperty("opacity")}),10)):Z(t,"grid"),z([document.documentElement,document.body],r.shown),n.heightAuto&&n.backdrop&&!n.toast&&z([document.documentElement,document.body],r["height-auto"])};var Ln=(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),Tn=(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL");function Sn(e){!function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=Ln),"url"===e.input&&(e.inputValidator=Tn))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&u("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(u('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
    ")),ae(e)}let On;var Mn=new WeakMap;class jn{constructor(){if(n(this,Mn,void 0),"undefined"==typeof window)return;On=this;for(var t=arguments.length,o=new Array(t),i=0;i1&&void 0!==arguments[1]?arguments[1]:{};if((e=>{!1===e.backdrop&&e.allowOutsideClick&&u('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)Rt(t),e.toast&&Ut(t),zt(t)})(Object.assign({},t,e)),o.currentInstance){const e=Ke.swalPromiseResolve.get(o.currentInstance),{isAwaitingPromise:t}=o.currentInstance;o.currentInstance._destroy(),t||e({isDismissed:!0}),D()&&We()}o.currentInstance=On;const n=In(e,t);Sn(n),Object.freeze(n),o.timeout&&(o.timeout.stop(),delete o.timeout),clearTimeout(o.restoreFocusTimeout);const i=Dn(On);return je(On,n),ge.innerParams.set(On,n),Hn(On,i,n)}then(e){return t(Mn,this).then(e)}finally(e){return t(Mn,this).finally(e)}}const Hn=(e,t,n)=>new Promise(((i,s)=>{const r=t=>{e.close({isDismissed:!0,dismiss:t})};Ke.swalPromiseResolve.set(e,i),Ke.swalPromiseReject.set(e,s),t.confirmButton.onclick=()=>{(e=>{const t=ge.innerParams.get(e);e.disableButtons(),t.input?wt(e,"confirm"):Et(e,!0)})(e)},t.denyButton.onclick=()=>{(e=>{const t=ge.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?wt(e,"deny"):Ct(e,!1)})(e)},t.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Ie.cancel)})(e,r)},t.closeButton.onclick=()=>{r(Ie.close)},((e,t,n)=>{e.toast?Qt(e,t,n):(nn(t),on(t),sn(e,t,n))})(n,t,r),((e,t,n)=>{De(e),t.toast||(e.keydownHandler=e=>_e(t,e,n),e.keydownTarget=t.keydownListenerCapture?window:C(),e.keydownListenerCapture=t.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)})(o,n,r),((e,t)=>{"select"===t.input||"radio"===t.input?gt(e,t):["text","email","number","tel","textarea"].some((e=>e===t.input))&&(g(t.inputValue)||b(t.inputValue))&&(ut(x()),ft(e,t))})(e,n),En(n),qn(o,n,r),Vn(t,n),setTimeout((()=>{t.container.scrollTop=0}))})),In=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return An(n),Object.assign(gn(n),fn(n),bn(n),yn(n),wn(n),vn(n),Cn(n,hn))})(e),o=Object.assign({},It,t,n,e);return o.showClass=Object.assign({},It.showClass,o.showClass),o.hideClass=Object.assign({},It.hideClass,o.hideClass),!1===o.animation&&(o.showClass={backdrop:"swal2-noanimation"},o.hideClass={}),o},Dn=e=>{const t={popup:C(),container:y(),actions:O(),confirmButton:x(),denyButton:T(),cancelButton:L(),loader:S(),closeButton:H(),validationMessage:P(),progressSteps:$()};return ge.domCache.set(e,t),t},qn=(e,t,n)=>{const o=j();J(o),t.timer&&(e.timeout=new mn((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(Z(o),_(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&oe(t.timer)}))))},Vn=(e,t)=>{if(!t.toast)return h(t.allowEnterKey)?void(Nn(e)||_n(e,t)||qe(-1,1)):(m("allowEnterKey"),void Fn())},Nn=e=>{const t=e.popup.querySelectorAll("[autofocus]");for(const e of t)if(e instanceof HTMLElement&&ee(e))return e.focus(),!0;return!1},_n=(e,t)=>t.focusDeny&&ee(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ee(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!ee(e.confirmButton))&&(e.confirmButton.focus(),!0),Fn=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};jn.prototype.disableButtons=St,jn.prototype.enableButtons=Tt,jn.prototype.getInput=Pt,jn.prototype.disableInput=Mt,jn.prototype.enableInput=Ot,jn.prototype.hideLoading=Bt,jn.prototype.disableLoading=Bt,jn.prototype.showValidationMessage=jt,jn.prototype.resetValidationMessage=Ht,jn.prototype.close=nt,jn.prototype.closePopup=nt,jn.prototype.closeModal=nt,jn.prototype.closeToast=nt,jn.prototype.rejectPromise=it,jn.prototype.update=Kt,jn.prototype._destroy=Yt,Object.assign(jn,pn),Object.keys(Gt).forEach((e=>{jn[e]=function(){return On&&On[e]?On[e](...arguments):null}})),jn.DismissReason=Ie,jn.version="11.14.1";const Rn=jn;return Rn.default=Rn,Rn})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); diff --git a/web/static/dist/utils.js b/web/static/dist/utils.js deleted file mode 100644 index aacfdebc..00000000 --- a/web/static/dist/utils.js +++ /dev/null @@ -1,57 +0,0 @@ -const fireConfirmModal = (event) => { - Swal.fire({ title: 'Wirklich löschen?', showCancelButton: true, cancelButtonText: 'Abbrechen', icon: 'warning', confirmButtonText: "Löschen", showCloseButton: true }) - .then((result) => { if (result.isConfirmed) { htmx.trigger(event.target, 'confirmed'); } }); -} - - -document.querySelectorAll("button[hx-trigger='confirmed']").forEach((value) => value.addEventListener("click", fireConfirmModal)); - -document.addEventListener("htmx:afterSwap", () => { - document.querySelectorAll("button[hx-trigger='confirmed']").forEach((value) => value.addEventListener("click", fireConfirmModal)); -}); - -const getCurrentTheme = () => { - let current = localStorage.getItem("theme"); - - if (current == null) { - current = document.documentElement.getAttribute("data-theme"); - } - - if (current === null) { - if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { - current = "dark"; - } else { - current = "light"; - } - } - - return current; -} - -const switchTheme = () => { - const isCurrentlyLight = getCurrentTheme() === "light"; - - document.documentElement.setAttribute("data-theme", isCurrentlyLight ? "dark" : "light"); - document.querySelector("#theme-switcher use").setAttribute("href", `/static/feather-sprite.svg#${isCurrentlyLight ? "sun" : "moon"}`) - localStorage.setItem("theme", isCurrentlyLight ? "dark" : "light"); -} - -const observer = new MutationObserver((mutationList, observer) => { - for (const mut of mutationList) { - for (const node of mut.addedNodes) { - if (node.className?.includes("navbar")) { - console.log("found"); - document.getElementById("theme-switcher")?.addEventListener("click", switchTheme); - document.querySelector("#theme-switcher use")?.setAttribute("href", `/static/feather-sprite.svg#${getCurrentTheme() === "light" ? "moon" : "sun"}`) - } - } - } -}); - -observer.observe(document, { childList: true, subtree: true }); - - -const isCurrentlyLight = getCurrentTheme() === "light"; -document.documentElement.setAttribute("data-theme", isCurrentlyLight ? "light" : "dark"); -document.querySelector("#theme-switcher use")?.setAttribute("href", `/static/feather-sprite.svg#${isCurrentlyLight ? "moon" : "sun"}`) -document.getElementById("theme-switcher")?.addEventListener("click", switchTheme); diff --git a/web/static/node_modules/.bin/acorn b/web/static/node_modules/.bin/acorn deleted file mode 120000 index cf767603..00000000 --- a/web/static/node_modules/.bin/acorn +++ /dev/null @@ -1 +0,0 @@ -../acorn/bin/acorn \ No newline at end of file diff --git a/web/static/node_modules/.bin/browserslist b/web/static/node_modules/.bin/browserslist deleted file mode 120000 index 3cd991b2..00000000 --- a/web/static/node_modules/.bin/browserslist +++ /dev/null @@ -1 +0,0 @@ -../browserslist/cli.js \ No newline at end of file diff --git a/web/static/node_modules/.bin/detect-libc b/web/static/node_modules/.bin/detect-libc deleted file mode 120000 index b4c4b767..00000000 --- a/web/static/node_modules/.bin/detect-libc +++ /dev/null @@ -1 +0,0 @@ -../detect-libc/bin/detect-libc.js \ No newline at end of file diff --git a/web/static/node_modules/.bin/sass b/web/static/node_modules/.bin/sass deleted file mode 120000 index 4bda500d..00000000 --- a/web/static/node_modules/.bin/sass +++ /dev/null @@ -1 +0,0 @@ -../sass/sass.js \ No newline at end of file diff --git a/web/static/node_modules/.bin/terser b/web/static/node_modules/.bin/terser deleted file mode 120000 index 0792ff47..00000000 --- a/web/static/node_modules/.bin/terser +++ /dev/null @@ -1 +0,0 @@ -../terser/bin/terser \ No newline at end of file diff --git a/web/static/node_modules/.bin/update-browserslist-db b/web/static/node_modules/.bin/update-browserslist-db deleted file mode 120000 index b11e16f3..00000000 --- a/web/static/node_modules/.bin/update-browserslist-db +++ /dev/null @@ -1 +0,0 @@ -../update-browserslist-db/cli.js \ No newline at end of file diff --git a/web/static/node_modules/.bin/webpack b/web/static/node_modules/.bin/webpack deleted file mode 120000 index d462c1d1..00000000 --- a/web/static/node_modules/.bin/webpack +++ /dev/null @@ -1 +0,0 @@ -../webpack/bin/webpack.js \ No newline at end of file diff --git a/web/static/node_modules/.package-lock.json b/web/static/node_modules/.package-lock.json deleted file mode 100644 index eecfa7e2..00000000 --- a/web/static/node_modules/.package-lock.json +++ /dev/null @@ -1,1253 +0,0 @@ -{ - "name": "static", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@parcel/watcher": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.0.tgz", - "integrity": "sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.5.0", - "@parcel/watcher-darwin-arm64": "2.5.0", - "@parcel/watcher-darwin-x64": "2.5.0", - "@parcel/watcher-freebsd-x64": "2.5.0", - "@parcel/watcher-linux-arm-glibc": "2.5.0", - "@parcel/watcher-linux-arm-musl": "2.5.0", - "@parcel/watcher-linux-arm64-glibc": "2.5.0", - "@parcel/watcher-linux-arm64-musl": "2.5.0", - "@parcel/watcher-linux-x64-glibc": "2.5.0", - "@parcel/watcher-linux-x64-musl": "2.5.0", - "@parcel/watcher-win32-arm64": "2.5.0", - "@parcel/watcher-win32-ia32": "2.5.0", - "@parcel/watcher-win32-x64": "2.5.0" - } - }, - "node_modules/@parcel/watcher-linux-x64-glibc": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.0.tgz", - "integrity": "sha512-d9AOkusyXARkFD66S6zlGXyzx5RvY+chTP9Jp0ypSTC9d4lzyRs9ovGf/80VCxjKddcUvnsGwCHWuF2EoPgWjw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-musl": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.0.tgz", - "integrity": "sha512-iqOC+GoTDoFyk/VYSFHwjHhYrk8bljW6zOhPuhi5t9ulqiYq1togGJB5e3PwYVFFfeVgc6pbz3JdQyDoBszVaA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@types/eslint": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", - "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "22.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.1.tgz", - "integrity": "sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.19.8" - } - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", - "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/helper-numbers": "1.13.2", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", - "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", - "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", - "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", - "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.13.2", - "@webassemblyjs/helper-api-error": "1.13.2", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", - "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", - "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-buffer": "1.14.1", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2", - "@webassemblyjs/wasm-gen": "1.14.1" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", - "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", - "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", - "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", - "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-buffer": "1.14.1", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2", - "@webassemblyjs/helper-wasm-section": "1.14.1", - "@webassemblyjs/wasm-gen": "1.14.1", - "@webassemblyjs/wasm-opt": "1.14.1", - "@webassemblyjs/wasm-parser": "1.14.1", - "@webassemblyjs/wast-printer": "1.14.1" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", - "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2", - "@webassemblyjs/ieee754": "1.13.2", - "@webassemblyjs/leb128": "1.13.2", - "@webassemblyjs/utf8": "1.13.2" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", - "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-buffer": "1.14.1", - "@webassemblyjs/wasm-gen": "1.14.1", - "@webassemblyjs/wasm-parser": "1.14.1" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", - "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-api-error": "1.13.2", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2", - "@webassemblyjs/ieee754": "1.13.2", - "@webassemblyjs/leb128": "1.13.2", - "@webassemblyjs/utf8": "1.13.2" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", - "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", - "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001669", - "electron-to-chromium": "^1.5.41", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.1" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/bulma": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bulma/-/bulma-1.0.2.tgz", - "integrity": "sha512-D7GnDuF6seb6HkcnRMM9E739QpEY9chDzzeFrHMyEns/EXyDJuQ0XA0KxbBl/B2NTsKSoDomW61jFGFaAxhK5A==", - "dev": true, - "license": "MIT" - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001683", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001683.tgz", - "integrity": "sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chokidar": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", - "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/chrome-trace-event": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", - "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0" - } - }, - "node_modules/classnames": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", - "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", - "dev": true, - "license": "MIT" - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/core-js": { - "version": "3.39.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.39.0.tgz", - "integrity": "sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.64", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.64.tgz", - "integrity": "sha512-IXEuxU+5ClW2IGEYFC2T7szbyVgehupCWQe5GNh+H065CD6U6IFN0s4KeAMFGNmQolRU4IV7zGBWSYMmZ8uuqQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/enhanced-resolve": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", - "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/es-module-lexer": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", - "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", - "dev": true, - "license": "MIT" - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/feather-icons": { - "version": "4.29.2", - "resolved": "https://registry.npmjs.org/feather-icons/-/feather-icons-4.29.2.tgz", - "integrity": "sha512-0TaCFTnBTVCz6U+baY2UJNKne5ifGh7sMG4ZC2LoBWCZdIyPa+y6UiR4lEYGws1JOFWdee8KAsAIvu0VcXqiqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "classnames": "^2.2.5", - "core-js": "^3.1.3" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/htmx.org": { - "version": "1.9.12", - "resolved": "https://registry.npmjs.org/htmx.org/-/htmx.org-1.9.12.tgz", - "integrity": "sha512-VZAohXyF7xPGS52IM8d1T1283y+X4D+Owf3qY1NZ9RuBypyu9l8cGsxUMAG5fEAb/DhT7rDoJ9Hpu5/HxFD3cw==", - "dev": true, - "license": "0BSD" - }, - "node_modules/immutable": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.3.tgz", - "integrity": "sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.11.5" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-addon-api": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", - "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "dev": true, - "license": "MIT", - "optional": true - }, - "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true, - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readdirp": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", - "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/sass": { - "version": "1.81.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.81.0.tgz", - "integrity": "sha512-Q4fOxRfhmv3sqCLoGfvrC9pRV8btc0UtqL9mN6Yrv6Qi9ScL55CVH1vlPP863ISLEEMNLLuu9P+enCeGHlnzhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "chokidar": "^4.0.0", - "immutable": "^5.0.2", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" - }, - "optionalDependencies": { - "@parcel/watcher": "^2.4.1" - } - }, - "node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/sweetalert2-neutral": { - "version": "11.14.1-neutral-fix6", - "resolved": "https://registry.npmjs.org/sweetalert2-neutral/-/sweetalert2-neutral-11.14.1-neutral-fix6.tgz", - "integrity": "sha512-DpBDnF43AKBtpUZ96uqLsMhezvAG87rXS4Af69e1MP7zfh/8nKPkDeAD3w8oTNl32FUqBcF2d0d0HmAEH2+viw==", - "dev": true, - "license": "MIT", - "dependencies": { - "webpack": "^5.95.0" - } - }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/terser": { - "version": "5.36.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", - "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", - "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.20", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.26.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "dev": true, - "license": "MIT" - }, - "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/watchpack": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", - "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", - "dev": true, - "license": "MIT", - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack": { - "version": "5.96.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", - "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint-scope": "^3.7.7", - "@types/estree": "^1.0.6", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.14.0", - "browserslist": "^4.24.0", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.1", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.11", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.10", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.13.0" - } - } - } -} diff --git a/web/static/node_modules/@jridgewell/gen-mapping/LICENSE b/web/static/node_modules/@jridgewell/gen-mapping/LICENSE deleted file mode 100644 index 352f0715..00000000 --- a/web/static/node_modules/@jridgewell/gen-mapping/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2022 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/@jridgewell/gen-mapping/README.md b/web/static/node_modules/@jridgewell/gen-mapping/README.md deleted file mode 100644 index 4066cdbb..00000000 --- a/web/static/node_modules/@jridgewell/gen-mapping/README.md +++ /dev/null @@ -1,227 +0,0 @@ -# @jridgewell/gen-mapping - -> Generate source maps - -`gen-mapping` allows you to generate a source map during transpilation or minification. -With a source map, you're able to trace the original location in the source file, either in Chrome's -DevTools or using a library like [`@jridgewell/trace-mapping`][trace-mapping]. - -You may already be familiar with the [`source-map`][source-map] package's `SourceMapGenerator`. This -provides the same `addMapping` and `setSourceContent` API. - -## Installation - -```sh -npm install @jridgewell/gen-mapping -``` - -## Usage - -```typescript -import { GenMapping, addMapping, setSourceContent, toEncodedMap, toDecodedMap } from '@jridgewell/gen-mapping'; - -const map = new GenMapping({ - file: 'output.js', - sourceRoot: 'https://example.com/', -}); - -setSourceContent(map, 'input.js', `function foo() {}`); - -addMapping(map, { - // Lines start at line 1, columns at column 0. - generated: { line: 1, column: 0 }, - source: 'input.js', - original: { line: 1, column: 0 }, -}); - -addMapping(map, { - generated: { line: 1, column: 9 }, - source: 'input.js', - original: { line: 1, column: 9 }, - name: 'foo', -}); - -assert.deepEqual(toDecodedMap(map), { - version: 3, - file: 'output.js', - names: ['foo'], - sourceRoot: 'https://example.com/', - sources: ['input.js'], - sourcesContent: ['function foo() {}'], - mappings: [ - [ [0, 0, 0, 0], [9, 0, 0, 9, 0] ] - ], -}); - -assert.deepEqual(toEncodedMap(map), { - version: 3, - file: 'output.js', - names: ['foo'], - sourceRoot: 'https://example.com/', - sources: ['input.js'], - sourcesContent: ['function foo() {}'], - mappings: 'AAAA,SAASA', -}); -``` - -### Smaller Sourcemaps - -Not everything needs to be added to a sourcemap, and needless markings can cause signficantly -larger file sizes. `gen-mapping` exposes `maybeAddSegment`/`maybeAddMapping` APIs that will -intelligently determine if this marking adds useful information. If not, the marking will be -skipped. - -```typescript -import { maybeAddMapping } from '@jridgewell/gen-mapping'; - -const map = new GenMapping(); - -// Adding a sourceless marking at the beginning of a line isn't useful. -maybeAddMapping(map, { - generated: { line: 1, column: 0 }, -}); - -// Adding a new source marking is useful. -maybeAddMapping(map, { - generated: { line: 1, column: 0 }, - source: 'input.js', - original: { line: 1, column: 0 }, -}); - -// But adding another marking pointing to the exact same original location isn't, even if the -// generated column changed. -maybeAddMapping(map, { - generated: { line: 1, column: 9 }, - source: 'input.js', - original: { line: 1, column: 0 }, -}); - -assert.deepEqual(toEncodedMap(map), { - version: 3, - names: [], - sources: ['input.js'], - sourcesContent: [null], - mappings: 'AAAA', -}); -``` - -## Benchmarks - -``` -node v18.0.0 - -amp.js.map -Memory Usage: -gen-mapping: addSegment 5852872 bytes -gen-mapping: addMapping 7716042 bytes -source-map-js 6143250 bytes -source-map-0.6.1 6124102 bytes -source-map-0.8.0 6121173 bytes -Smallest memory usage is gen-mapping: addSegment - -Adding speed: -gen-mapping: addSegment x 441 ops/sec ±2.07% (90 runs sampled) -gen-mapping: addMapping x 350 ops/sec ±2.40% (86 runs sampled) -source-map-js: addMapping x 169 ops/sec ±2.42% (80 runs sampled) -source-map-0.6.1: addMapping x 167 ops/sec ±2.56% (80 runs sampled) -source-map-0.8.0: addMapping x 168 ops/sec ±2.52% (80 runs sampled) -Fastest is gen-mapping: addSegment - -Generate speed: -gen-mapping: decoded output x 150,824,370 ops/sec ±0.07% (102 runs sampled) -gen-mapping: encoded output x 663 ops/sec ±0.22% (98 runs sampled) -source-map-js: encoded output x 197 ops/sec ±0.45% (84 runs sampled) -source-map-0.6.1: encoded output x 198 ops/sec ±0.33% (85 runs sampled) -source-map-0.8.0: encoded output x 197 ops/sec ±0.06% (93 runs sampled) -Fastest is gen-mapping: decoded output - - -*** - - -babel.min.js.map -Memory Usage: -gen-mapping: addSegment 37578063 bytes -gen-mapping: addMapping 37212897 bytes -source-map-js 47638527 bytes -source-map-0.6.1 47690503 bytes -source-map-0.8.0 47470188 bytes -Smallest memory usage is gen-mapping: addMapping - -Adding speed: -gen-mapping: addSegment x 31.05 ops/sec ±8.31% (43 runs sampled) -gen-mapping: addMapping x 29.83 ops/sec ±7.36% (51 runs sampled) -source-map-js: addMapping x 20.73 ops/sec ±6.22% (38 runs sampled) -source-map-0.6.1: addMapping x 20.03 ops/sec ±10.51% (38 runs sampled) -source-map-0.8.0: addMapping x 19.30 ops/sec ±8.27% (37 runs sampled) -Fastest is gen-mapping: addSegment - -Generate speed: -gen-mapping: decoded output x 381,379,234 ops/sec ±0.29% (96 runs sampled) -gen-mapping: encoded output x 95.15 ops/sec ±2.98% (72 runs sampled) -source-map-js: encoded output x 15.20 ops/sec ±7.41% (33 runs sampled) -source-map-0.6.1: encoded output x 16.36 ops/sec ±10.46% (31 runs sampled) -source-map-0.8.0: encoded output x 16.06 ops/sec ±6.45% (31 runs sampled) -Fastest is gen-mapping: decoded output - - -*** - - -preact.js.map -Memory Usage: -gen-mapping: addSegment 416247 bytes -gen-mapping: addMapping 419824 bytes -source-map-js 1024619 bytes -source-map-0.6.1 1146004 bytes -source-map-0.8.0 1113250 bytes -Smallest memory usage is gen-mapping: addSegment - -Adding speed: -gen-mapping: addSegment x 13,755 ops/sec ±0.15% (98 runs sampled) -gen-mapping: addMapping x 13,013 ops/sec ±0.11% (101 runs sampled) -source-map-js: addMapping x 4,564 ops/sec ±0.21% (98 runs sampled) -source-map-0.6.1: addMapping x 4,562 ops/sec ±0.11% (99 runs sampled) -source-map-0.8.0: addMapping x 4,593 ops/sec ±0.11% (100 runs sampled) -Fastest is gen-mapping: addSegment - -Generate speed: -gen-mapping: decoded output x 379,864,020 ops/sec ±0.23% (93 runs sampled) -gen-mapping: encoded output x 14,368 ops/sec ±4.07% (82 runs sampled) -source-map-js: encoded output x 5,261 ops/sec ±0.21% (99 runs sampled) -source-map-0.6.1: encoded output x 5,124 ops/sec ±0.58% (99 runs sampled) -source-map-0.8.0: encoded output x 5,434 ops/sec ±0.33% (96 runs sampled) -Fastest is gen-mapping: decoded output - - -*** - - -react.js.map -Memory Usage: -gen-mapping: addSegment 975096 bytes -gen-mapping: addMapping 1102981 bytes -source-map-js 2918836 bytes -source-map-0.6.1 2885435 bytes -source-map-0.8.0 2874336 bytes -Smallest memory usage is gen-mapping: addSegment - -Adding speed: -gen-mapping: addSegment x 4,772 ops/sec ±0.15% (100 runs sampled) -gen-mapping: addMapping x 4,456 ops/sec ±0.13% (97 runs sampled) -source-map-js: addMapping x 1,618 ops/sec ±0.24% (97 runs sampled) -source-map-0.6.1: addMapping x 1,622 ops/sec ±0.12% (99 runs sampled) -source-map-0.8.0: addMapping x 1,631 ops/sec ±0.12% (100 runs sampled) -Fastest is gen-mapping: addSegment - -Generate speed: -gen-mapping: decoded output x 379,107,695 ops/sec ±0.07% (99 runs sampled) -gen-mapping: encoded output x 5,421 ops/sec ±1.60% (89 runs sampled) -source-map-js: encoded output x 2,113 ops/sec ±1.81% (98 runs sampled) -source-map-0.6.1: encoded output x 2,126 ops/sec ±0.10% (100 runs sampled) -source-map-0.8.0: encoded output x 2,176 ops/sec ±0.39% (98 runs sampled) -Fastest is gen-mapping: decoded output -``` - -[source-map]: https://www.npmjs.com/package/source-map -[trace-mapping]: https://github.com/jridgewell/trace-mapping diff --git a/web/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs b/web/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs deleted file mode 100644 index 5d38e383..00000000 --- a/web/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs +++ /dev/null @@ -1,230 +0,0 @@ -import { SetArray, put, remove } from '@jridgewell/set-array'; -import { encode } from '@jridgewell/sourcemap-codec'; -import { TraceMap, decodedMappings } from '@jridgewell/trace-mapping'; - -const COLUMN = 0; -const SOURCES_INDEX = 1; -const SOURCE_LINE = 2; -const SOURCE_COLUMN = 3; -const NAMES_INDEX = 4; - -const NO_NAME = -1; -/** - * Provides the state to generate a sourcemap. - */ -class GenMapping { - constructor({ file, sourceRoot } = {}) { - this._names = new SetArray(); - this._sources = new SetArray(); - this._sourcesContent = []; - this._mappings = []; - this.file = file; - this.sourceRoot = sourceRoot; - this._ignoreList = new SetArray(); - } -} -/** - * Typescript doesn't allow friend access to private fields, so this just casts the map into a type - * with public access modifiers. - */ -function cast(map) { - return map; -} -function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { - return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); -} -function addMapping(map, mapping) { - return addMappingInternal(false, map, mapping); -} -/** - * Same as `addSegment`, but will only add the segment if it generates useful information in the - * resulting map. This only works correctly if segments are added **in order**, meaning you should - * not add a segment with a lower generated line/column than one that came before. - */ -const maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { - return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); -}; -/** - * Same as `addMapping`, but will only add the mapping if it generates useful information in the - * resulting map. This only works correctly if mappings are added **in order**, meaning you should - * not add a mapping with a lower generated line/column than one that came before. - */ -const maybeAddMapping = (map, mapping) => { - return addMappingInternal(true, map, mapping); -}; -/** - * Adds/removes the content of the source file to the source map. - */ -function setSourceContent(map, source, content) { - const { _sources: sources, _sourcesContent: sourcesContent } = cast(map); - const index = put(sources, source); - sourcesContent[index] = content; -} -function setIgnore(map, source, ignore = true) { - const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map); - const index = put(sources, source); - if (index === sourcesContent.length) - sourcesContent[index] = null; - if (ignore) - put(ignoreList, index); - else - remove(ignoreList, index); -} -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -function toDecodedMap(map) { - const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList, } = cast(map); - removeEmptyFinalLines(mappings); - return { - version: 3, - file: map.file || undefined, - names: names.array, - sourceRoot: map.sourceRoot || undefined, - sources: sources.array, - sourcesContent, - mappings, - ignoreList: ignoreList.array, - }; -} -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -function toEncodedMap(map) { - const decoded = toDecodedMap(map); - return Object.assign(Object.assign({}, decoded), { mappings: encode(decoded.mappings) }); -} -/** - * Constructs a new GenMapping, using the already present mappings of the input. - */ -function fromMap(input) { - const map = new TraceMap(input); - const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); - putAll(cast(gen)._names, map.names); - putAll(cast(gen)._sources, map.sources); - cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); - cast(gen)._mappings = decodedMappings(map); - if (map.ignoreList) - putAll(cast(gen)._ignoreList, map.ignoreList); - return gen; -} -/** - * Returns an array of high-level mapping objects for every recorded segment, which could then be - * passed to the `source-map` library. - */ -function allMappings(map) { - const out = []; - const { _mappings: mappings, _sources: sources, _names: names } = cast(map); - for (let i = 0; i < mappings.length; i++) { - const line = mappings[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generated = { line: i + 1, column: seg[COLUMN] }; - let source = undefined; - let original = undefined; - let name = undefined; - if (seg.length !== 1) { - source = sources.array[seg[SOURCES_INDEX]]; - original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; - if (seg.length === 5) - name = names.array[seg[NAMES_INDEX]]; - } - out.push({ generated, source, original, name }); - } - } - return out; -} -// This split declaration is only so that terser can elminiate the static initialization block. -function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { - const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = cast(map); - const line = getLine(mappings, genLine); - const index = getColumnIndex(line, genColumn); - if (!source) { - if (skipable && skipSourceless(line, index)) - return; - return insert(line, index, [genColumn]); - } - const sourcesIndex = put(sources, source); - const namesIndex = name ? put(names, name) : NO_NAME; - if (sourcesIndex === sourcesContent.length) - sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null; - if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { - return; - } - return insert(line, index, name - ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] - : [genColumn, sourcesIndex, sourceLine, sourceColumn]); -} -function getLine(mappings, index) { - for (let i = mappings.length; i <= index; i++) { - mappings[i] = []; - } - return mappings[index]; -} -function getColumnIndex(line, genColumn) { - let index = line.length; - for (let i = index - 1; i >= 0; index = i--) { - const current = line[i]; - if (genColumn >= current[COLUMN]) - break; - } - return index; -} -function insert(array, index, value) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; -} -function removeEmptyFinalLines(mappings) { - const { length } = mappings; - let len = length; - for (let i = len - 1; i >= 0; len = i, i--) { - if (mappings[i].length > 0) - break; - } - if (len < length) - mappings.length = len; -} -function putAll(setarr, array) { - for (let i = 0; i < array.length; i++) - put(setarr, array[i]); -} -function skipSourceless(line, index) { - // The start of a line is already sourceless, so adding a sourceless segment to the beginning - // doesn't generate any useful information. - if (index === 0) - return true; - const prev = line[index - 1]; - // If the previous segment is also sourceless, then adding another sourceless segment doesn't - // genrate any new information. Else, this segment will end the source/named segment and point to - // a sourceless position, which is useful. - return prev.length === 1; -} -function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { - // A source/named segment at the start of a line gives position at that genColumn - if (index === 0) - return false; - const prev = line[index - 1]; - // If the previous segment is sourceless, then we're transitioning to a source. - if (prev.length === 1) - return false; - // If the previous segment maps to the exact same source position, then this segment doesn't - // provide any new position information. - return (sourcesIndex === prev[SOURCES_INDEX] && - sourceLine === prev[SOURCE_LINE] && - sourceColumn === prev[SOURCE_COLUMN] && - namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)); -} -function addMappingInternal(skipable, map, mapping) { - const { generated, source, original, name, content } = mapping; - if (!source) { - return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null); - } - return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content); -} - -export { GenMapping, addMapping, addSegment, allMappings, fromMap, maybeAddMapping, maybeAddSegment, setIgnore, setSourceContent, toDecodedMap, toEncodedMap }; -//# sourceMappingURL=gen-mapping.mjs.map diff --git a/web/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map b/web/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map deleted file mode 100644 index 6290b970..00000000 --- a/web/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gen-mapping.mjs","sources":["../src/sourcemap-segment.ts","../src/gen-mapping.ts"],"sourcesContent":["type GeneratedColumn = number;\ntype SourcesIndex = number;\ntype SourceLine = number;\ntype SourceColumn = number;\ntype NamesIndex = number;\n\nexport type SourceMapSegment =\n | [GeneratedColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];\n\nexport const COLUMN = 0;\nexport const SOURCES_INDEX = 1;\nexport const SOURCE_LINE = 2;\nexport const SOURCE_COLUMN = 3;\nexport const NAMES_INDEX = 4;\n","import { SetArray, put, remove } from '@jridgewell/set-array';\nimport { encode } from '@jridgewell/sourcemap-codec';\nimport { TraceMap, decodedMappings } from '@jridgewell/trace-mapping';\n\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n} from './sourcemap-segment';\n\nimport type { SourceMapInput } from '@jridgewell/trace-mapping';\nimport type { SourceMapSegment } from './sourcemap-segment';\nimport type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types';\n\nexport type { DecodedSourceMap, EncodedSourceMap, Mapping };\n\nexport type Options = {\n file?: string | null;\n sourceRoot?: string | null;\n};\n\nconst NO_NAME = -1;\n\n/**\n * Provides the state to generate a sourcemap.\n */\nexport class GenMapping {\n private declare _names: SetArray;\n private declare _sources: SetArray;\n private declare _sourcesContent: (string | null)[];\n private declare _mappings: SourceMapSegment[][];\n private declare _ignoreList: SetArray;\n declare file: string | null | undefined;\n declare sourceRoot: string | null | undefined;\n\n constructor({ file, sourceRoot }: Options = {}) {\n this._names = new SetArray();\n this._sources = new SetArray();\n this._sourcesContent = [];\n this._mappings = [];\n this.file = file;\n this.sourceRoot = sourceRoot;\n this._ignoreList = new SetArray();\n }\n}\n\ninterface PublicMap {\n _names: GenMapping['_names'];\n _sources: GenMapping['_sources'];\n _sourcesContent: GenMapping['_sourcesContent'];\n _mappings: GenMapping['_mappings'];\n _ignoreList: GenMapping['_ignoreList'];\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\nfunction cast(map: unknown): PublicMap {\n return map as any;\n}\n\n/**\n * A low-level API to associate a generated position with an original source position. Line and\n * column here are 0-based, unlike `addMapping`.\n */\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source?: null,\n sourceLine?: null,\n sourceColumn?: null,\n name?: null,\n content?: null,\n): void;\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: string,\n sourceLine: number,\n sourceColumn: number,\n name?: null,\n content?: string | null,\n): void;\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: string,\n sourceLine: number,\n sourceColumn: number,\n name: string,\n content?: string | null,\n): void;\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source?: string | null,\n sourceLine?: number | null,\n sourceColumn?: number | null,\n name?: string | null,\n content?: string | null,\n): void {\n return addSegmentInternal(\n false,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n );\n}\n\n/**\n * A high-level API to associate a generated position with an original source position. Line is\n * 1-based, but column is 0-based, due to legacy behavior in `source-map` library.\n */\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source?: null;\n original?: null;\n name?: null;\n content?: null;\n },\n): void;\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: string;\n original: Pos;\n name?: null;\n content?: string | null;\n },\n): void;\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: string;\n original: Pos;\n name: string;\n content?: string | null;\n },\n): void;\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source?: string | null;\n original?: Pos | null;\n name?: string | null;\n content?: string | null;\n },\n): void {\n return addMappingInternal(false, map, mapping as Parameters[2]);\n}\n\n/**\n * Same as `addSegment`, but will only add the segment if it generates useful information in the\n * resulting map. This only works correctly if segments are added **in order**, meaning you should\n * not add a segment with a lower generated line/column than one that came before.\n */\nexport const maybeAddSegment: typeof addSegment = (\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n) => {\n return addSegmentInternal(\n true,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n );\n};\n\n/**\n * Same as `addMapping`, but will only add the mapping if it generates useful information in the\n * resulting map. This only works correctly if mappings are added **in order**, meaning you should\n * not add a mapping with a lower generated line/column than one that came before.\n */\nexport const maybeAddMapping: typeof addMapping = (map, mapping) => {\n return addMappingInternal(true, map, mapping as Parameters[2]);\n};\n\n/**\n * Adds/removes the content of the source file to the source map.\n */\nexport function setSourceContent(map: GenMapping, source: string, content: string | null): void {\n const { _sources: sources, _sourcesContent: sourcesContent } = cast(map);\n const index = put(sources, source);\n sourcesContent[index] = content;\n}\n\nexport function setIgnore(map: GenMapping, source: string, ignore = true) {\n const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map);\n const index = put(sources, source);\n if (index === sourcesContent.length) sourcesContent[index] = null;\n if (ignore) put(ignoreList, index);\n else remove(ignoreList, index);\n}\n\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function toDecodedMap(map: GenMapping): DecodedSourceMap {\n const {\n _mappings: mappings,\n _sources: sources,\n _sourcesContent: sourcesContent,\n _names: names,\n _ignoreList: ignoreList,\n } = cast(map);\n removeEmptyFinalLines(mappings);\n\n return {\n version: 3,\n file: map.file || undefined,\n names: names.array,\n sourceRoot: map.sourceRoot || undefined,\n sources: sources.array,\n sourcesContent,\n mappings,\n ignoreList: ignoreList.array,\n };\n}\n\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function toEncodedMap(map: GenMapping): EncodedSourceMap {\n const decoded = toDecodedMap(map);\n return {\n ...decoded,\n mappings: encode(decoded.mappings as SourceMapSegment[][]),\n };\n}\n\n/**\n * Constructs a new GenMapping, using the already present mappings of the input.\n */\nexport function fromMap(input: SourceMapInput): GenMapping {\n const map = new TraceMap(input);\n const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });\n\n putAll(cast(gen)._names, map.names);\n putAll(cast(gen)._sources, map.sources as string[]);\n cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);\n cast(gen)._mappings = decodedMappings(map) as GenMapping['_mappings'];\n if (map.ignoreList) putAll(cast(gen)._ignoreList, map.ignoreList);\n\n return gen;\n}\n\n/**\n * Returns an array of high-level mapping objects for every recorded segment, which could then be\n * passed to the `source-map` library.\n */\nexport function allMappings(map: GenMapping): Mapping[] {\n const out: Mapping[] = [];\n const { _mappings: mappings, _sources: sources, _names: names } = cast(map);\n\n for (let i = 0; i < mappings.length; i++) {\n const line = mappings[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n\n const generated = { line: i + 1, column: seg[COLUMN] };\n let source: string | undefined = undefined;\n let original: Pos | undefined = undefined;\n let name: string | undefined = undefined;\n\n if (seg.length !== 1) {\n source = sources.array[seg[SOURCES_INDEX]];\n original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };\n\n if (seg.length === 5) name = names.array[seg[NAMES_INDEX]];\n }\n\n out.push({ generated, source, original, name } as Mapping);\n }\n }\n\n return out;\n}\n\n// This split declaration is only so that terser can elminiate the static initialization block.\nfunction addSegmentInternal(\n skipable: boolean,\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: S,\n sourceLine: S extends string ? number : null | undefined,\n sourceColumn: S extends string ? number : null | undefined,\n name: S extends string ? string | null | undefined : null | undefined,\n content: S extends string ? string | null | undefined : null | undefined,\n): void {\n const {\n _mappings: mappings,\n _sources: sources,\n _sourcesContent: sourcesContent,\n _names: names,\n } = cast(map);\n const line = getLine(mappings, genLine);\n const index = getColumnIndex(line, genColumn);\n\n if (!source) {\n if (skipable && skipSourceless(line, index)) return;\n return insert(line, index, [genColumn]);\n }\n\n // Sigh, TypeScript can't figure out sourceLine and sourceColumn aren't nullish if source\n // isn't nullish.\n assert(sourceLine);\n assert(sourceColumn);\n\n const sourcesIndex = put(sources, source);\n const namesIndex = name ? put(names, name) : NO_NAME;\n if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content ?? null;\n\n if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {\n return;\n }\n\n return insert(\n line,\n index,\n name\n ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]\n : [genColumn, sourcesIndex, sourceLine, sourceColumn],\n );\n}\n\nfunction assert(_val: unknown): asserts _val is T {\n // noop.\n}\n\nfunction getLine(mappings: SourceMapSegment[][], index: number): SourceMapSegment[] {\n for (let i = mappings.length; i <= index; i++) {\n mappings[i] = [];\n }\n return mappings[index];\n}\n\nfunction getColumnIndex(line: SourceMapSegment[], genColumn: number): number {\n let index = line.length;\n for (let i = index - 1; i >= 0; index = i--) {\n const current = line[i];\n if (genColumn >= current[COLUMN]) break;\n }\n return index;\n}\n\nfunction insert(array: T[], index: number, value: T) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n}\n\nfunction removeEmptyFinalLines(mappings: SourceMapSegment[][]) {\n const { length } = mappings;\n let len = length;\n for (let i = len - 1; i >= 0; len = i, i--) {\n if (mappings[i].length > 0) break;\n }\n if (len < length) mappings.length = len;\n}\n\nfunction putAll(setarr: SetArray, array: T[]) {\n for (let i = 0; i < array.length; i++) put(setarr, array[i]);\n}\n\nfunction skipSourceless(line: SourceMapSegment[], index: number): boolean {\n // The start of a line is already sourceless, so adding a sourceless segment to the beginning\n // doesn't generate any useful information.\n if (index === 0) return true;\n\n const prev = line[index - 1];\n // If the previous segment is also sourceless, then adding another sourceless segment doesn't\n // genrate any new information. Else, this segment will end the source/named segment and point to\n // a sourceless position, which is useful.\n return prev.length === 1;\n}\n\nfunction skipSource(\n line: SourceMapSegment[],\n index: number,\n sourcesIndex: number,\n sourceLine: number,\n sourceColumn: number,\n namesIndex: number,\n): boolean {\n // A source/named segment at the start of a line gives position at that genColumn\n if (index === 0) return false;\n\n const prev = line[index - 1];\n\n // If the previous segment is sourceless, then we're transitioning to a source.\n if (prev.length === 1) return false;\n\n // If the previous segment maps to the exact same source position, then this segment doesn't\n // provide any new position information.\n return (\n sourcesIndex === prev[SOURCES_INDEX] &&\n sourceLine === prev[SOURCE_LINE] &&\n sourceColumn === prev[SOURCE_COLUMN] &&\n namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)\n );\n}\n\nfunction addMappingInternal(\n skipable: boolean,\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: S;\n original: S extends string ? Pos : null | undefined;\n name: S extends string ? string | null | undefined : null | undefined;\n content: S extends string ? string | null | undefined : null | undefined;\n },\n) {\n const { generated, source, original, name, content } = mapping;\n if (!source) {\n return addSegmentInternal(\n skipable,\n map,\n generated.line - 1,\n generated.column,\n null,\n null,\n null,\n null,\n null,\n );\n }\n assert(original);\n return addSegmentInternal(\n skipable,\n map,\n generated.line - 1,\n generated.column,\n source as string,\n original.line - 1,\n original.column,\n name,\n content,\n );\n}\n"],"names":[],"mappings":";;;;AAWO,MAAM,MAAM,GAAG,CAAC,CAAC;AACjB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC;;ACQ5B,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC;AAEnB;;AAEG;MACU,UAAU,CAAA;AASrB,IAAA,WAAA,CAAY,EAAE,IAAI,EAAE,UAAU,KAAc,EAAE,EAAA;AAC5C,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;AAC7B,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;AAC/B,QAAA,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;AACpB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACjB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,QAAQ,EAAE,CAAC;KACnC;AACF,CAAA;AAUD;;;AAGG;AACH,SAAS,IAAI,CAAC,GAAY,EAAA;AACxB,IAAA,OAAO,GAAU,CAAC;AACpB,CAAC;SAoCe,UAAU,CACxB,GAAe,EACf,OAAe,EACf,SAAiB,EACjB,MAAsB,EACtB,UAA0B,EAC1B,YAA4B,EAC5B,IAAoB,EACpB,OAAuB,EAAA;IAEvB,OAAO,kBAAkB,CACvB,KAAK,EACL,GAAG,EACH,OAAO,EACP,SAAS,EACT,MAAM,EACN,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,OAAO,CACR,CAAC;AACJ,CAAC;AAoCe,SAAA,UAAU,CACxB,GAAe,EACf,OAMC,EAAA;IAED,OAAO,kBAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,OAAmD,CAAC,CAAC;AAC7F,CAAC;AAED;;;;AAIG;MACU,eAAe,GAAsB,CAChD,GAAG,EACH,OAAO,EACP,SAAS,EACT,MAAM,EACN,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,OAAO,KACL;IACF,OAAO,kBAAkB,CACvB,IAAI,EACJ,GAAG,EACH,OAAO,EACP,SAAS,EACT,MAAM,EACN,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,OAAO,CACR,CAAC;AACJ,EAAE;AAEF;;;;AAIG;MACU,eAAe,GAAsB,CAAC,GAAG,EAAE,OAAO,KAAI;IACjE,OAAO,kBAAkB,CAAC,IAAI,EAAE,GAAG,EAAE,OAAmD,CAAC,CAAC;AAC5F,EAAE;AAEF;;AAEG;SACa,gBAAgB,CAAC,GAAe,EAAE,MAAc,EAAE,OAAsB,EAAA;AACtF,IAAA,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACzE,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACnC,IAAA,cAAc,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;AAClC,CAAC;AAEK,SAAU,SAAS,CAAC,GAAe,EAAE,MAAc,EAAE,MAAM,GAAG,IAAI,EAAA;AACtE,IAAA,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IAClG,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACnC,IAAA,IAAI,KAAK,KAAK,cAAc,CAAC,MAAM;AAAE,QAAA,cAAc,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;AAClE,IAAA,IAAI,MAAM;AAAE,QAAA,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;;AAC9B,QAAA,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AACjC,CAAC;AAED;;;AAGG;AACG,SAAU,YAAY,CAAC,GAAe,EAAA;IAC1C,MAAM,EACJ,SAAS,EAAE,QAAQ,EACnB,QAAQ,EAAE,OAAO,EACjB,eAAe,EAAE,cAAc,EAC/B,MAAM,EAAE,KAAK,EACb,WAAW,EAAE,UAAU,GACxB,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACd,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IAEhC,OAAO;AACL,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,SAAS;QAC3B,KAAK,EAAE,KAAK,CAAC,KAAK;AAClB,QAAA,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,SAAS;QACvC,OAAO,EAAE,OAAO,CAAC,KAAK;QACtB,cAAc;QACd,QAAQ;QACR,UAAU,EAAE,UAAU,CAAC,KAAK;KAC7B,CAAC;AACJ,CAAC;AAED;;;AAGG;AACG,SAAU,YAAY,CAAC,GAAe,EAAA;AAC1C,IAAA,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IAClC,OACK,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,OAAO,CACV,EAAA,EAAA,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,QAAgC,CAAC,EAC1D,CAAA,CAAA;AACJ,CAAC;AAED;;AAEG;AACG,SAAU,OAAO,CAAC,KAAqB,EAAA;AAC3C,IAAA,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChC,IAAA,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;AAE3E,IAAA,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;AACpC,IAAA,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAmB,CAAC,CAAC;IACpD,IAAI,CAAC,GAAG,CAAC,CAAC,eAAe,GAAG,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9E,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,GAAG,eAAe,CAAC,GAAG,CAA4B,CAAC;IACtE,IAAI,GAAG,CAAC,UAAU;AAAE,QAAA,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;AAElE,IAAA,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;AAGG;AACG,SAAU,WAAW,CAAC,GAAe,EAAA;IACzC,MAAM,GAAG,GAAc,EAAE,CAAC;AAC1B,IAAA,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AAE5E,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACxC,QAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;AACzB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACpC,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AAEpB,YAAA,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YACvD,IAAI,MAAM,GAAuB,SAAS,CAAC;YAC3C,IAAI,QAAQ,GAAoB,SAAS,CAAC;YAC1C,IAAI,IAAI,GAAuB,SAAS,CAAC;AAEzC,YAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;gBACpB,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;AAC3C,gBAAA,QAAQ,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;AAEtE,gBAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;oBAAE,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;AAC5D,aAAA;AAED,YAAA,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAa,CAAC,CAAC;AAC5D,SAAA;AACF,KAAA;AAED,IAAA,OAAO,GAAG,CAAC;AACb,CAAC;AAED;AACA,SAAS,kBAAkB,CACzB,QAAiB,EACjB,GAAe,EACf,OAAe,EACf,SAAiB,EACjB,MAAS,EACT,UAAwD,EACxD,YAA0D,EAC1D,IAAqE,EACrE,OAAwE,EAAA;IAExE,MAAM,EACJ,SAAS,EAAE,QAAQ,EACnB,QAAQ,EAAE,OAAO,EACjB,eAAe,EAAE,cAAc,EAC/B,MAAM,EAAE,KAAK,GACd,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACd,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAE9C,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,IAAI,QAAQ,IAAI,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC;YAAE,OAAO;QACpD,OAAO,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;AACzC,KAAA;IAOD,MAAM,YAAY,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAA,MAAM,UAAU,GAAG,IAAI,GAAG,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC;AACrD,IAAA,IAAI,YAAY,KAAK,cAAc,CAAC,MAAM;QAAE,cAAc,CAAC,YAAY,CAAC,GAAG,OAAO,KAAP,IAAA,IAAA,OAAO,KAAP,KAAA,CAAA,GAAA,OAAO,GAAI,IAAI,CAAC;AAE3F,IAAA,IAAI,QAAQ,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE;QAC3F,OAAO;AACR,KAAA;AAED,IAAA,OAAO,MAAM,CACX,IAAI,EACJ,KAAK,EACL,IAAI;UACA,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC;UAC/D,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,CACxD,CAAC;AACJ,CAAC;AAMD,SAAS,OAAO,CAAC,QAA8B,EAAE,KAAa,EAAA;AAC5D,IAAA,KAAK,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE,EAAE;AAC7C,QAAA,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AAClB,KAAA;AACD,IAAA,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC;AAED,SAAS,cAAc,CAAC,IAAwB,EAAE,SAAiB,EAAA;AACjE,IAAA,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;AACxB,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;AAC3C,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AACxB,QAAA,IAAI,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;YAAE,MAAM;AACzC,KAAA;AACD,IAAA,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,MAAM,CAAI,KAAU,EAAE,KAAa,EAAE,KAAQ,EAAA;AACpD,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;QACzC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACzB,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AACvB,CAAC;AAED,SAAS,qBAAqB,CAAC,QAA8B,EAAA;AAC3D,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;IAC5B,IAAI,GAAG,GAAG,MAAM,CAAC;AACjB,IAAA,KAAK,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AAC1C,QAAA,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM;AACnC,KAAA;IACD,IAAI,GAAG,GAAG,MAAM;AAAE,QAAA,QAAQ,CAAC,MAAM,GAAG,GAAG,CAAC;AAC1C,CAAC;AAED,SAAS,MAAM,CAA4B,MAAmB,EAAE,KAAU,EAAA;AACxE,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,cAAc,CAAC,IAAwB,EAAE,KAAa,EAAA;;;IAG7D,IAAI,KAAK,KAAK,CAAC;AAAE,QAAA,OAAO,IAAI,CAAC;IAE7B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;;;;AAI7B,IAAA,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,UAAU,CACjB,IAAwB,EACxB,KAAa,EACb,YAAoB,EACpB,UAAkB,EAClB,YAAoB,EACpB,UAAkB,EAAA;;IAGlB,IAAI,KAAK,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK,CAAC;IAE9B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;;AAG7B,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK,CAAC;;;AAIpC,IAAA,QACE,YAAY,KAAK,IAAI,CAAC,aAAa,CAAC;AACpC,QAAA,UAAU,KAAK,IAAI,CAAC,WAAW,CAAC;AAChC,QAAA,YAAY,KAAK,IAAI,CAAC,aAAa,CAAC;QACpC,UAAU,MAAM,IAAI,CAAC,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,EAChE;AACJ,CAAC;AAED,SAAS,kBAAkB,CACzB,QAAiB,EACjB,GAAe,EACf,OAMC,EAAA;AAED,IAAA,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC/D,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,kBAAkB,CACvB,QAAQ,EACR,GAAG,EACH,SAAS,CAAC,IAAI,GAAG,CAAC,EAClB,SAAS,CAAC,MAAM,EAChB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,CACL,CAAC;AACH,KAAA;AAED,IAAA,OAAO,kBAAkB,CACvB,QAAQ,EACR,GAAG,EACH,SAAS,CAAC,IAAI,GAAG,CAAC,EAClB,SAAS,CAAC,MAAM,EAChB,MAAgB,EAChB,QAAQ,CAAC,IAAI,GAAG,CAAC,EACjB,QAAQ,CAAC,MAAM,EACf,IAAI,EACJ,OAAO,CACR,CAAC;AACJ;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js b/web/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js deleted file mode 100644 index 3bf18f3a..00000000 --- a/web/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js +++ /dev/null @@ -1,246 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/set-array'), require('@jridgewell/sourcemap-codec'), require('@jridgewell/trace-mapping')) : - typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/set-array', '@jridgewell/sourcemap-codec', '@jridgewell/trace-mapping'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.genMapping = {}, global.setArray, global.sourcemapCodec, global.traceMapping)); -})(this, (function (exports, setArray, sourcemapCodec, traceMapping) { 'use strict'; - - const COLUMN = 0; - const SOURCES_INDEX = 1; - const SOURCE_LINE = 2; - const SOURCE_COLUMN = 3; - const NAMES_INDEX = 4; - - const NO_NAME = -1; - /** - * Provides the state to generate a sourcemap. - */ - class GenMapping { - constructor({ file, sourceRoot } = {}) { - this._names = new setArray.SetArray(); - this._sources = new setArray.SetArray(); - this._sourcesContent = []; - this._mappings = []; - this.file = file; - this.sourceRoot = sourceRoot; - this._ignoreList = new setArray.SetArray(); - } - } - /** - * Typescript doesn't allow friend access to private fields, so this just casts the map into a type - * with public access modifiers. - */ - function cast(map) { - return map; - } - function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { - return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); - } - function addMapping(map, mapping) { - return addMappingInternal(false, map, mapping); - } - /** - * Same as `addSegment`, but will only add the segment if it generates useful information in the - * resulting map. This only works correctly if segments are added **in order**, meaning you should - * not add a segment with a lower generated line/column than one that came before. - */ - const maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { - return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); - }; - /** - * Same as `addMapping`, but will only add the mapping if it generates useful information in the - * resulting map. This only works correctly if mappings are added **in order**, meaning you should - * not add a mapping with a lower generated line/column than one that came before. - */ - const maybeAddMapping = (map, mapping) => { - return addMappingInternal(true, map, mapping); - }; - /** - * Adds/removes the content of the source file to the source map. - */ - function setSourceContent(map, source, content) { - const { _sources: sources, _sourcesContent: sourcesContent } = cast(map); - const index = setArray.put(sources, source); - sourcesContent[index] = content; - } - function setIgnore(map, source, ignore = true) { - const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map); - const index = setArray.put(sources, source); - if (index === sourcesContent.length) - sourcesContent[index] = null; - if (ignore) - setArray.put(ignoreList, index); - else - setArray.remove(ignoreList, index); - } - /** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ - function toDecodedMap(map) { - const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList, } = cast(map); - removeEmptyFinalLines(mappings); - return { - version: 3, - file: map.file || undefined, - names: names.array, - sourceRoot: map.sourceRoot || undefined, - sources: sources.array, - sourcesContent, - mappings, - ignoreList: ignoreList.array, - }; - } - /** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ - function toEncodedMap(map) { - const decoded = toDecodedMap(map); - return Object.assign(Object.assign({}, decoded), { mappings: sourcemapCodec.encode(decoded.mappings) }); - } - /** - * Constructs a new GenMapping, using the already present mappings of the input. - */ - function fromMap(input) { - const map = new traceMapping.TraceMap(input); - const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); - putAll(cast(gen)._names, map.names); - putAll(cast(gen)._sources, map.sources); - cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); - cast(gen)._mappings = traceMapping.decodedMappings(map); - if (map.ignoreList) - putAll(cast(gen)._ignoreList, map.ignoreList); - return gen; - } - /** - * Returns an array of high-level mapping objects for every recorded segment, which could then be - * passed to the `source-map` library. - */ - function allMappings(map) { - const out = []; - const { _mappings: mappings, _sources: sources, _names: names } = cast(map); - for (let i = 0; i < mappings.length; i++) { - const line = mappings[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generated = { line: i + 1, column: seg[COLUMN] }; - let source = undefined; - let original = undefined; - let name = undefined; - if (seg.length !== 1) { - source = sources.array[seg[SOURCES_INDEX]]; - original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; - if (seg.length === 5) - name = names.array[seg[NAMES_INDEX]]; - } - out.push({ generated, source, original, name }); - } - } - return out; - } - // This split declaration is only so that terser can elminiate the static initialization block. - function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { - const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = cast(map); - const line = getLine(mappings, genLine); - const index = getColumnIndex(line, genColumn); - if (!source) { - if (skipable && skipSourceless(line, index)) - return; - return insert(line, index, [genColumn]); - } - const sourcesIndex = setArray.put(sources, source); - const namesIndex = name ? setArray.put(names, name) : NO_NAME; - if (sourcesIndex === sourcesContent.length) - sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null; - if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { - return; - } - return insert(line, index, name - ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] - : [genColumn, sourcesIndex, sourceLine, sourceColumn]); - } - function getLine(mappings, index) { - for (let i = mappings.length; i <= index; i++) { - mappings[i] = []; - } - return mappings[index]; - } - function getColumnIndex(line, genColumn) { - let index = line.length; - for (let i = index - 1; i >= 0; index = i--) { - const current = line[i]; - if (genColumn >= current[COLUMN]) - break; - } - return index; - } - function insert(array, index, value) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; - } - function removeEmptyFinalLines(mappings) { - const { length } = mappings; - let len = length; - for (let i = len - 1; i >= 0; len = i, i--) { - if (mappings[i].length > 0) - break; - } - if (len < length) - mappings.length = len; - } - function putAll(setarr, array) { - for (let i = 0; i < array.length; i++) - setArray.put(setarr, array[i]); - } - function skipSourceless(line, index) { - // The start of a line is already sourceless, so adding a sourceless segment to the beginning - // doesn't generate any useful information. - if (index === 0) - return true; - const prev = line[index - 1]; - // If the previous segment is also sourceless, then adding another sourceless segment doesn't - // genrate any new information. Else, this segment will end the source/named segment and point to - // a sourceless position, which is useful. - return prev.length === 1; - } - function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { - // A source/named segment at the start of a line gives position at that genColumn - if (index === 0) - return false; - const prev = line[index - 1]; - // If the previous segment is sourceless, then we're transitioning to a source. - if (prev.length === 1) - return false; - // If the previous segment maps to the exact same source position, then this segment doesn't - // provide any new position information. - return (sourcesIndex === prev[SOURCES_INDEX] && - sourceLine === prev[SOURCE_LINE] && - sourceColumn === prev[SOURCE_COLUMN] && - namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)); - } - function addMappingInternal(skipable, map, mapping) { - const { generated, source, original, name, content } = mapping; - if (!source) { - return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null); - } - return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content); - } - - exports.GenMapping = GenMapping; - exports.addMapping = addMapping; - exports.addSegment = addSegment; - exports.allMappings = allMappings; - exports.fromMap = fromMap; - exports.maybeAddMapping = maybeAddMapping; - exports.maybeAddSegment = maybeAddSegment; - exports.setIgnore = setIgnore; - exports.setSourceContent = setSourceContent; - exports.toDecodedMap = toDecodedMap; - exports.toEncodedMap = toEncodedMap; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); -//# sourceMappingURL=gen-mapping.umd.js.map diff --git a/web/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map b/web/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map deleted file mode 100644 index 72172ac7..00000000 --- a/web/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gen-mapping.umd.js","sources":["../src/sourcemap-segment.ts","../src/gen-mapping.ts"],"sourcesContent":["type GeneratedColumn = number;\ntype SourcesIndex = number;\ntype SourceLine = number;\ntype SourceColumn = number;\ntype NamesIndex = number;\n\nexport type SourceMapSegment =\n | [GeneratedColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];\n\nexport const COLUMN = 0;\nexport const SOURCES_INDEX = 1;\nexport const SOURCE_LINE = 2;\nexport const SOURCE_COLUMN = 3;\nexport const NAMES_INDEX = 4;\n","import { SetArray, put, remove } from '@jridgewell/set-array';\nimport { encode } from '@jridgewell/sourcemap-codec';\nimport { TraceMap, decodedMappings } from '@jridgewell/trace-mapping';\n\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n} from './sourcemap-segment';\n\nimport type { SourceMapInput } from '@jridgewell/trace-mapping';\nimport type { SourceMapSegment } from './sourcemap-segment';\nimport type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types';\n\nexport type { DecodedSourceMap, EncodedSourceMap, Mapping };\n\nexport type Options = {\n file?: string | null;\n sourceRoot?: string | null;\n};\n\nconst NO_NAME = -1;\n\n/**\n * Provides the state to generate a sourcemap.\n */\nexport class GenMapping {\n private declare _names: SetArray;\n private declare _sources: SetArray;\n private declare _sourcesContent: (string | null)[];\n private declare _mappings: SourceMapSegment[][];\n private declare _ignoreList: SetArray;\n declare file: string | null | undefined;\n declare sourceRoot: string | null | undefined;\n\n constructor({ file, sourceRoot }: Options = {}) {\n this._names = new SetArray();\n this._sources = new SetArray();\n this._sourcesContent = [];\n this._mappings = [];\n this.file = file;\n this.sourceRoot = sourceRoot;\n this._ignoreList = new SetArray();\n }\n}\n\ninterface PublicMap {\n _names: GenMapping['_names'];\n _sources: GenMapping['_sources'];\n _sourcesContent: GenMapping['_sourcesContent'];\n _mappings: GenMapping['_mappings'];\n _ignoreList: GenMapping['_ignoreList'];\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\nfunction cast(map: unknown): PublicMap {\n return map as any;\n}\n\n/**\n * A low-level API to associate a generated position with an original source position. Line and\n * column here are 0-based, unlike `addMapping`.\n */\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source?: null,\n sourceLine?: null,\n sourceColumn?: null,\n name?: null,\n content?: null,\n): void;\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: string,\n sourceLine: number,\n sourceColumn: number,\n name?: null,\n content?: string | null,\n): void;\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: string,\n sourceLine: number,\n sourceColumn: number,\n name: string,\n content?: string | null,\n): void;\nexport function addSegment(\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source?: string | null,\n sourceLine?: number | null,\n sourceColumn?: number | null,\n name?: string | null,\n content?: string | null,\n): void {\n return addSegmentInternal(\n false,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n );\n}\n\n/**\n * A high-level API to associate a generated position with an original source position. Line is\n * 1-based, but column is 0-based, due to legacy behavior in `source-map` library.\n */\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source?: null;\n original?: null;\n name?: null;\n content?: null;\n },\n): void;\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: string;\n original: Pos;\n name?: null;\n content?: string | null;\n },\n): void;\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: string;\n original: Pos;\n name: string;\n content?: string | null;\n },\n): void;\nexport function addMapping(\n map: GenMapping,\n mapping: {\n generated: Pos;\n source?: string | null;\n original?: Pos | null;\n name?: string | null;\n content?: string | null;\n },\n): void {\n return addMappingInternal(false, map, mapping as Parameters[2]);\n}\n\n/**\n * Same as `addSegment`, but will only add the segment if it generates useful information in the\n * resulting map. This only works correctly if segments are added **in order**, meaning you should\n * not add a segment with a lower generated line/column than one that came before.\n */\nexport const maybeAddSegment: typeof addSegment = (\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n) => {\n return addSegmentInternal(\n true,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n );\n};\n\n/**\n * Same as `addMapping`, but will only add the mapping if it generates useful information in the\n * resulting map. This only works correctly if mappings are added **in order**, meaning you should\n * not add a mapping with a lower generated line/column than one that came before.\n */\nexport const maybeAddMapping: typeof addMapping = (map, mapping) => {\n return addMappingInternal(true, map, mapping as Parameters[2]);\n};\n\n/**\n * Adds/removes the content of the source file to the source map.\n */\nexport function setSourceContent(map: GenMapping, source: string, content: string | null): void {\n const { _sources: sources, _sourcesContent: sourcesContent } = cast(map);\n const index = put(sources, source);\n sourcesContent[index] = content;\n}\n\nexport function setIgnore(map: GenMapping, source: string, ignore = true) {\n const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map);\n const index = put(sources, source);\n if (index === sourcesContent.length) sourcesContent[index] = null;\n if (ignore) put(ignoreList, index);\n else remove(ignoreList, index);\n}\n\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function toDecodedMap(map: GenMapping): DecodedSourceMap {\n const {\n _mappings: mappings,\n _sources: sources,\n _sourcesContent: sourcesContent,\n _names: names,\n _ignoreList: ignoreList,\n } = cast(map);\n removeEmptyFinalLines(mappings);\n\n return {\n version: 3,\n file: map.file || undefined,\n names: names.array,\n sourceRoot: map.sourceRoot || undefined,\n sources: sources.array,\n sourcesContent,\n mappings,\n ignoreList: ignoreList.array,\n };\n}\n\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function toEncodedMap(map: GenMapping): EncodedSourceMap {\n const decoded = toDecodedMap(map);\n return {\n ...decoded,\n mappings: encode(decoded.mappings as SourceMapSegment[][]),\n };\n}\n\n/**\n * Constructs a new GenMapping, using the already present mappings of the input.\n */\nexport function fromMap(input: SourceMapInput): GenMapping {\n const map = new TraceMap(input);\n const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });\n\n putAll(cast(gen)._names, map.names);\n putAll(cast(gen)._sources, map.sources as string[]);\n cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);\n cast(gen)._mappings = decodedMappings(map) as GenMapping['_mappings'];\n if (map.ignoreList) putAll(cast(gen)._ignoreList, map.ignoreList);\n\n return gen;\n}\n\n/**\n * Returns an array of high-level mapping objects for every recorded segment, which could then be\n * passed to the `source-map` library.\n */\nexport function allMappings(map: GenMapping): Mapping[] {\n const out: Mapping[] = [];\n const { _mappings: mappings, _sources: sources, _names: names } = cast(map);\n\n for (let i = 0; i < mappings.length; i++) {\n const line = mappings[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n\n const generated = { line: i + 1, column: seg[COLUMN] };\n let source: string | undefined = undefined;\n let original: Pos | undefined = undefined;\n let name: string | undefined = undefined;\n\n if (seg.length !== 1) {\n source = sources.array[seg[SOURCES_INDEX]];\n original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };\n\n if (seg.length === 5) name = names.array[seg[NAMES_INDEX]];\n }\n\n out.push({ generated, source, original, name } as Mapping);\n }\n }\n\n return out;\n}\n\n// This split declaration is only so that terser can elminiate the static initialization block.\nfunction addSegmentInternal(\n skipable: boolean,\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: S,\n sourceLine: S extends string ? number : null | undefined,\n sourceColumn: S extends string ? number : null | undefined,\n name: S extends string ? string | null | undefined : null | undefined,\n content: S extends string ? string | null | undefined : null | undefined,\n): void {\n const {\n _mappings: mappings,\n _sources: sources,\n _sourcesContent: sourcesContent,\n _names: names,\n } = cast(map);\n const line = getLine(mappings, genLine);\n const index = getColumnIndex(line, genColumn);\n\n if (!source) {\n if (skipable && skipSourceless(line, index)) return;\n return insert(line, index, [genColumn]);\n }\n\n // Sigh, TypeScript can't figure out sourceLine and sourceColumn aren't nullish if source\n // isn't nullish.\n assert(sourceLine);\n assert(sourceColumn);\n\n const sourcesIndex = put(sources, source);\n const namesIndex = name ? put(names, name) : NO_NAME;\n if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content ?? null;\n\n if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {\n return;\n }\n\n return insert(\n line,\n index,\n name\n ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]\n : [genColumn, sourcesIndex, sourceLine, sourceColumn],\n );\n}\n\nfunction assert(_val: unknown): asserts _val is T {\n // noop.\n}\n\nfunction getLine(mappings: SourceMapSegment[][], index: number): SourceMapSegment[] {\n for (let i = mappings.length; i <= index; i++) {\n mappings[i] = [];\n }\n return mappings[index];\n}\n\nfunction getColumnIndex(line: SourceMapSegment[], genColumn: number): number {\n let index = line.length;\n for (let i = index - 1; i >= 0; index = i--) {\n const current = line[i];\n if (genColumn >= current[COLUMN]) break;\n }\n return index;\n}\n\nfunction insert(array: T[], index: number, value: T) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n}\n\nfunction removeEmptyFinalLines(mappings: SourceMapSegment[][]) {\n const { length } = mappings;\n let len = length;\n for (let i = len - 1; i >= 0; len = i, i--) {\n if (mappings[i].length > 0) break;\n }\n if (len < length) mappings.length = len;\n}\n\nfunction putAll(setarr: SetArray, array: T[]) {\n for (let i = 0; i < array.length; i++) put(setarr, array[i]);\n}\n\nfunction skipSourceless(line: SourceMapSegment[], index: number): boolean {\n // The start of a line is already sourceless, so adding a sourceless segment to the beginning\n // doesn't generate any useful information.\n if (index === 0) return true;\n\n const prev = line[index - 1];\n // If the previous segment is also sourceless, then adding another sourceless segment doesn't\n // genrate any new information. Else, this segment will end the source/named segment and point to\n // a sourceless position, which is useful.\n return prev.length === 1;\n}\n\nfunction skipSource(\n line: SourceMapSegment[],\n index: number,\n sourcesIndex: number,\n sourceLine: number,\n sourceColumn: number,\n namesIndex: number,\n): boolean {\n // A source/named segment at the start of a line gives position at that genColumn\n if (index === 0) return false;\n\n const prev = line[index - 1];\n\n // If the previous segment is sourceless, then we're transitioning to a source.\n if (prev.length === 1) return false;\n\n // If the previous segment maps to the exact same source position, then this segment doesn't\n // provide any new position information.\n return (\n sourcesIndex === prev[SOURCES_INDEX] &&\n sourceLine === prev[SOURCE_LINE] &&\n sourceColumn === prev[SOURCE_COLUMN] &&\n namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)\n );\n}\n\nfunction addMappingInternal(\n skipable: boolean,\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: S;\n original: S extends string ? Pos : null | undefined;\n name: S extends string ? string | null | undefined : null | undefined;\n content: S extends string ? string | null | undefined : null | undefined;\n },\n) {\n const { generated, source, original, name, content } = mapping;\n if (!source) {\n return addSegmentInternal(\n skipable,\n map,\n generated.line - 1,\n generated.column,\n null,\n null,\n null,\n null,\n null,\n );\n }\n assert(original);\n return addSegmentInternal(\n skipable,\n map,\n generated.line - 1,\n generated.column,\n source as string,\n original.line - 1,\n original.column,\n name,\n content,\n );\n}\n"],"names":["SetArray","put","remove","encode","TraceMap","decodedMappings"],"mappings":";;;;;;IAWO,MAAM,MAAM,GAAG,CAAC,CAAC;IACjB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IACtB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC;;ICQ5B,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC;IAEnB;;IAEG;UACU,UAAU,CAAA;IASrB,IAAA,WAAA,CAAY,EAAE,IAAI,EAAE,UAAU,KAAc,EAAE,EAAA;IAC5C,QAAA,IAAI,CAAC,MAAM,GAAG,IAAIA,iBAAQ,EAAE,CAAC;IAC7B,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAIA,iBAAQ,EAAE,CAAC;IAC/B,QAAA,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACpB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC7B,QAAA,IAAI,CAAC,WAAW,GAAG,IAAIA,iBAAQ,EAAE,CAAC;SACnC;IACF,CAAA;IAUD;;;IAGG;IACH,SAAS,IAAI,CAAC,GAAY,EAAA;IACxB,IAAA,OAAO,GAAU,CAAC;IACpB,CAAC;aAoCe,UAAU,CACxB,GAAe,EACf,OAAe,EACf,SAAiB,EACjB,MAAsB,EACtB,UAA0B,EAC1B,YAA4B,EAC5B,IAAoB,EACpB,OAAuB,EAAA;QAEvB,OAAO,kBAAkB,CACvB,KAAK,EACL,GAAG,EACH,OAAO,EACP,SAAS,EACT,MAAM,EACN,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,OAAO,CACR,CAAC;IACJ,CAAC;IAoCe,SAAA,UAAU,CACxB,GAAe,EACf,OAMC,EAAA;QAED,OAAO,kBAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,OAAmD,CAAC,CAAC;IAC7F,CAAC;IAED;;;;IAIG;UACU,eAAe,GAAsB,CAChD,GAAG,EACH,OAAO,EACP,SAAS,EACT,MAAM,EACN,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,OAAO,KACL;QACF,OAAO,kBAAkB,CACvB,IAAI,EACJ,GAAG,EACH,OAAO,EACP,SAAS,EACT,MAAM,EACN,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,OAAO,CACR,CAAC;IACJ,EAAE;IAEF;;;;IAIG;UACU,eAAe,GAAsB,CAAC,GAAG,EAAE,OAAO,KAAI;QACjE,OAAO,kBAAkB,CAAC,IAAI,EAAE,GAAG,EAAE,OAAmD,CAAC,CAAC;IAC5F,EAAE;IAEF;;IAEG;aACa,gBAAgB,CAAC,GAAe,EAAE,MAAc,EAAE,OAAsB,EAAA;IACtF,IAAA,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACzE,MAAM,KAAK,GAAGC,YAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACnC,IAAA,cAAc,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;IAClC,CAAC;IAEK,SAAU,SAAS,CAAC,GAAe,EAAE,MAAc,EAAE,MAAM,GAAG,IAAI,EAAA;IACtE,IAAA,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QAClG,MAAM,KAAK,GAAGA,YAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACnC,IAAA,IAAI,KAAK,KAAK,cAAc,CAAC,MAAM;IAAE,QAAA,cAAc,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAClE,IAAA,IAAI,MAAM;IAAE,QAAAA,YAAG,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;;IAC9B,QAAAC,eAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;IAED;;;IAGG;IACG,SAAU,YAAY,CAAC,GAAe,EAAA;QAC1C,MAAM,EACJ,SAAS,EAAE,QAAQ,EACnB,QAAQ,EAAE,OAAO,EACjB,eAAe,EAAE,cAAc,EAC/B,MAAM,EAAE,KAAK,EACb,WAAW,EAAE,UAAU,GACxB,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACd,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QAEhC,OAAO;IACL,QAAA,OAAO,EAAE,CAAC;IACV,QAAA,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,SAAS;YAC3B,KAAK,EAAE,KAAK,CAAC,KAAK;IAClB,QAAA,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,SAAS;YACvC,OAAO,EAAE,OAAO,CAAC,KAAK;YACtB,cAAc;YACd,QAAQ;YACR,UAAU,EAAE,UAAU,CAAC,KAAK;SAC7B,CAAC;IACJ,CAAC;IAED;;;IAGG;IACG,SAAU,YAAY,CAAC,GAAe,EAAA;IAC1C,IAAA,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QAClC,OACK,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,OAAO,CACV,EAAA,EAAA,QAAQ,EAAEC,qBAAM,CAAC,OAAO,CAAC,QAAgC,CAAC,EAC1D,CAAA,CAAA;IACJ,CAAC;IAED;;IAEG;IACG,SAAU,OAAO,CAAC,KAAqB,EAAA;IAC3C,IAAA,MAAM,GAAG,GAAG,IAAIC,qBAAQ,CAAC,KAAK,CAAC,CAAC;IAChC,IAAA,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IAE3E,IAAA,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,IAAA,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAmB,CAAC,CAAC;QACpD,IAAI,CAAC,GAAG,CAAC,CAAC,eAAe,GAAG,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;QAC9E,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,GAAGC,4BAAe,CAAC,GAAG,CAA4B,CAAC;QACtE,IAAI,GAAG,CAAC,UAAU;IAAE,QAAA,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IAElE,IAAA,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;IAGG;IACG,SAAU,WAAW,CAAC,GAAe,EAAA;QACzC,MAAM,GAAG,GAAc,EAAE,CAAC;IAC1B,IAAA,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5E,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACxC,QAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACzB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACpC,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAEpB,YAAA,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;gBACvD,IAAI,MAAM,GAAuB,SAAS,CAAC;gBAC3C,IAAI,QAAQ,GAAoB,SAAS,CAAC;gBAC1C,IAAI,IAAI,GAAuB,SAAS,CAAC;IAEzC,YAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;oBACpB,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;IAC3C,gBAAA,QAAQ,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;IAEtE,gBAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;wBAAE,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5D,aAAA;IAED,YAAA,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAa,CAAC,CAAC;IAC5D,SAAA;IACF,KAAA;IAED,IAAA,OAAO,GAAG,CAAC;IACb,CAAC;IAED;IACA,SAAS,kBAAkB,CACzB,QAAiB,EACjB,GAAe,EACf,OAAe,EACf,SAAiB,EACjB,MAAS,EACT,UAAwD,EACxD,YAA0D,EAC1D,IAAqE,EACrE,OAAwE,EAAA;QAExE,MAAM,EACJ,SAAS,EAAE,QAAQ,EACnB,QAAQ,EAAE,OAAO,EACjB,eAAe,EAAE,cAAc,EAC/B,MAAM,EAAE,KAAK,GACd,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACd,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACxC,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAE9C,IAAI,CAAC,MAAM,EAAE;IACX,QAAA,IAAI,QAAQ,IAAI,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC;gBAAE,OAAO;YACpD,OAAO,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IACzC,KAAA;QAOD,MAAM,YAAY,GAAGJ,YAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1C,IAAA,MAAM,UAAU,GAAG,IAAI,GAAGA,YAAG,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC;IACrD,IAAA,IAAI,YAAY,KAAK,cAAc,CAAC,MAAM;YAAE,cAAc,CAAC,YAAY,CAAC,GAAG,OAAO,KAAP,IAAA,IAAA,OAAO,KAAP,KAAA,CAAA,GAAA,OAAO,GAAI,IAAI,CAAC;IAE3F,IAAA,IAAI,QAAQ,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE;YAC3F,OAAO;IACR,KAAA;IAED,IAAA,OAAO,MAAM,CACX,IAAI,EACJ,KAAK,EACL,IAAI;cACA,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC;cAC/D,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,CACxD,CAAC;IACJ,CAAC;IAMD,SAAS,OAAO,CAAC,QAA8B,EAAE,KAAa,EAAA;IAC5D,IAAA,KAAK,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE,EAAE;IAC7C,QAAA,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IAClB,KAAA;IACD,IAAA,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAED,SAAS,cAAc,CAAC,IAAwB,EAAE,SAAiB,EAAA;IACjE,IAAA,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;IACxB,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IAC3C,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACxB,QAAA,IAAI,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;gBAAE,MAAM;IACzC,KAAA;IACD,IAAA,OAAO,KAAK,CAAC;IACf,CAAC;IAED,SAAS,MAAM,CAAI,KAAU,EAAE,KAAa,EAAE,KAAQ,EAAA;IACpD,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YACzC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,KAAA;IACD,IAAA,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,SAAS,qBAAqB,CAAC,QAA8B,EAAA;IAC3D,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;QAC5B,IAAI,GAAG,GAAG,MAAM,CAAC;IACjB,IAAA,KAAK,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1C,QAAA,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC;gBAAE,MAAM;IACnC,KAAA;QACD,IAAI,GAAG,GAAG,MAAM;IAAE,QAAA,QAAQ,CAAC,MAAM,GAAG,GAAG,CAAC;IAC1C,CAAC;IAED,SAAS,MAAM,CAA4B,MAAmB,EAAE,KAAU,EAAA;IACxE,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;YAAEA,YAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED,SAAS,cAAc,CAAC,IAAwB,EAAE,KAAa,EAAA;;;QAG7D,IAAI,KAAK,KAAK,CAAC;IAAE,QAAA,OAAO,IAAI,CAAC;QAE7B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;;;;IAI7B,IAAA,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;IAC3B,CAAC;IAED,SAAS,UAAU,CACjB,IAAwB,EACxB,KAAa,EACb,YAAoB,EACpB,UAAkB,EAClB,YAAoB,EACpB,UAAkB,EAAA;;QAGlB,IAAI,KAAK,KAAK,CAAC;IAAE,QAAA,OAAO,KAAK,CAAC;QAE9B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;;IAG7B,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;IAAE,QAAA,OAAO,KAAK,CAAC;;;IAIpC,IAAA,QACE,YAAY,KAAK,IAAI,CAAC,aAAa,CAAC;IACpC,QAAA,UAAU,KAAK,IAAI,CAAC,WAAW,CAAC;IAChC,QAAA,YAAY,KAAK,IAAI,CAAC,aAAa,CAAC;YACpC,UAAU,MAAM,IAAI,CAAC,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,EAChE;IACJ,CAAC;IAED,SAAS,kBAAkB,CACzB,QAAiB,EACjB,GAAe,EACf,OAMC,EAAA;IAED,IAAA,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAC/D,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,kBAAkB,CACvB,QAAQ,EACR,GAAG,EACH,SAAS,CAAC,IAAI,GAAG,CAAC,EAClB,SAAS,CAAC,MAAM,EAChB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,CACL,CAAC;IACH,KAAA;IAED,IAAA,OAAO,kBAAkB,CACvB,QAAQ,EACR,GAAG,EACH,SAAS,CAAC,IAAI,GAAG,CAAC,EAClB,SAAS,CAAC,MAAM,EAChB,MAAgB,EAChB,QAAQ,CAAC,IAAI,GAAG,CAAC,EACjB,QAAQ,CAAC,MAAM,EACf,IAAI,EACJ,OAAO,CACR,CAAC;IACJ;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts b/web/static/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts deleted file mode 100644 index 398a6956..00000000 --- a/web/static/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -import type { SourceMapInput } from '@jridgewell/trace-mapping'; -import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types'; -export type { DecodedSourceMap, EncodedSourceMap, Mapping }; -export declare type Options = { - file?: string | null; - sourceRoot?: string | null; -}; -/** - * Provides the state to generate a sourcemap. - */ -export declare class GenMapping { - private _names; - private _sources; - private _sourcesContent; - private _mappings; - private _ignoreList; - file: string | null | undefined; - sourceRoot: string | null | undefined; - constructor({ file, sourceRoot }?: Options); -} -/** - * A low-level API to associate a generated position with an original source position. Line and - * column here are 0-based, unlike `addMapping`. - */ -export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void; -export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void; -export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void; -/** - * A high-level API to associate a generated position with an original source position. Line is - * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. - */ -export declare function addMapping(map: GenMapping, mapping: { - generated: Pos; - source?: null; - original?: null; - name?: null; - content?: null; -}): void; -export declare function addMapping(map: GenMapping, mapping: { - generated: Pos; - source: string; - original: Pos; - name?: null; - content?: string | null; -}): void; -export declare function addMapping(map: GenMapping, mapping: { - generated: Pos; - source: string; - original: Pos; - name: string; - content?: string | null; -}): void; -/** - * Same as `addSegment`, but will only add the segment if it generates useful information in the - * resulting map. This only works correctly if segments are added **in order**, meaning you should - * not add a segment with a lower generated line/column than one that came before. - */ -export declare const maybeAddSegment: typeof addSegment; -/** - * Same as `addMapping`, but will only add the mapping if it generates useful information in the - * resulting map. This only works correctly if mappings are added **in order**, meaning you should - * not add a mapping with a lower generated line/column than one that came before. - */ -export declare const maybeAddMapping: typeof addMapping; -/** - * Adds/removes the content of the source file to the source map. - */ -export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void; -export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void; -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function toDecodedMap(map: GenMapping): DecodedSourceMap; -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function toEncodedMap(map: GenMapping): EncodedSourceMap; -/** - * Constructs a new GenMapping, using the already present mappings of the input. - */ -export declare function fromMap(input: SourceMapInput): GenMapping; -/** - * Returns an array of high-level mapping objects for every recorded segment, which could then be - * passed to the `source-map` library. - */ -export declare function allMappings(map: GenMapping): Mapping[]; diff --git a/web/static/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts b/web/static/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts deleted file mode 100644 index e187ba98..00000000 --- a/web/static/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -declare type GeneratedColumn = number; -declare type SourcesIndex = number; -declare type SourceLine = number; -declare type SourceColumn = number; -declare type NamesIndex = number; -export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; -export declare const COLUMN = 0; -export declare const SOURCES_INDEX = 1; -export declare const SOURCE_LINE = 2; -export declare const SOURCE_COLUMN = 3; -export declare const NAMES_INDEX = 4; -export {}; diff --git a/web/static/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts b/web/static/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts deleted file mode 100644 index 7f0ab15f..00000000 --- a/web/static/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment'; -export interface SourceMapV3 { - file?: string | null; - names: readonly string[]; - sourceRoot?: string; - sources: readonly (string | null)[]; - sourcesContent?: readonly (string | null)[]; - version: 3; - ignoreList?: readonly number[]; -} -export interface EncodedSourceMap extends SourceMapV3 { - mappings: string; -} -export interface DecodedSourceMap extends SourceMapV3 { - mappings: readonly SourceMapSegment[][]; -} -export interface Pos { - line: number; - column: number; -} -export declare type Mapping = { - generated: Pos; - source: undefined; - original: undefined; - name: undefined; -} | { - generated: Pos; - source: string; - original: Pos; - name: string; -} | { - generated: Pos; - source: string; - original: Pos; - name: undefined; -}; diff --git a/web/static/node_modules/@jridgewell/gen-mapping/package.json b/web/static/node_modules/@jridgewell/gen-mapping/package.json deleted file mode 100644 index f2e7fe0e..00000000 --- a/web/static/node_modules/@jridgewell/gen-mapping/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "@jridgewell/gen-mapping", - "version": "0.3.5", - "description": "Generate source maps", - "keywords": [ - "source", - "map" - ], - "author": "Justin Ridgewell ", - "license": "MIT", - "repository": "https://github.com/jridgewell/gen-mapping", - "main": "dist/gen-mapping.umd.js", - "module": "dist/gen-mapping.mjs", - "types": "dist/types/gen-mapping.d.ts", - "exports": { - ".": [ - { - "types": "./dist/types/gen-mapping.d.ts", - "browser": "./dist/gen-mapping.umd.js", - "require": "./dist/gen-mapping.umd.js", - "import": "./dist/gen-mapping.mjs" - }, - "./dist/gen-mapping.umd.js" - ], - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], - "engines": { - "node": ">=6.0.0" - }, - "scripts": { - "benchmark": "run-s build:rollup benchmark:*", - "benchmark:install": "cd benchmark && npm install", - "benchmark:only": "node benchmark/index.mjs", - "prebuild": "rm -rf dist", - "build": "run-s -n build:*", - "build:rollup": "rollup -c rollup.config.js", - "build:ts": "tsc --project tsconfig.build.json", - "lint": "run-s -n lint:*", - "lint:prettier": "npm run test:lint:prettier -- --write", - "lint:ts": "npm run test:lint:ts -- --fix", - "test": "run-s -n test:lint test:only", - "test:debug": "mocha --inspect-brk", - "test:lint": "run-s -n test:lint:*", - "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", - "test:lint:ts": "eslint '{src,test}/**/*.ts'", - "test:only": "c8 mocha", - "test:watch": "mocha --watch", - "prepublishOnly": "npm run preversion", - "preversion": "run-s test build" - }, - "devDependencies": { - "@rollup/plugin-typescript": "8.3.2", - "@types/mocha": "9.1.1", - "@types/node": "17.0.29", - "@typescript-eslint/eslint-plugin": "5.21.0", - "@typescript-eslint/parser": "5.21.0", - "benchmark": "2.1.4", - "c8": "7.11.2", - "eslint": "8.14.0", - "eslint-config-prettier": "8.5.0", - "mocha": "9.2.2", - "npm-run-all": "4.1.5", - "prettier": "2.6.2", - "rollup": "2.70.2", - "tsx": "4.7.1", - "typescript": "4.6.3" - }, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - } -} diff --git a/web/static/node_modules/@jridgewell/resolve-uri/LICENSE b/web/static/node_modules/@jridgewell/resolve-uri/LICENSE deleted file mode 100644 index 0a81b2ad..00000000 --- a/web/static/node_modules/@jridgewell/resolve-uri/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2019 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/resolve-uri/README.md b/web/static/node_modules/@jridgewell/resolve-uri/README.md deleted file mode 100644 index 2fe70df7..00000000 --- a/web/static/node_modules/@jridgewell/resolve-uri/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# @jridgewell/resolve-uri - -> Resolve a URI relative to an optional base URI - -Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths. - -## Installation - -```sh -npm install @jridgewell/resolve-uri -``` - -## Usage - -```typescript -function resolve(input: string, base?: string): string; -``` - -```js -import resolve from '@jridgewell/resolve-uri'; - -resolve('foo', 'https://example.com'); // => 'https://example.com/foo' -``` - -| Input | Base | Resolution | Explanation | -|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------| -| `https://example.com` | _any_ | `https://example.com/` | Input is normalized only | -| `//example.com` | `https://base.com/` | `https://example.com/` | Input inherits the base's protocol | -| `//example.com` | _rest_ | `//example.com/` | Input is normalized only | -| `/example` | `https://base.com/` | `https://base.com/example` | Input inherits the base's origin | -| `/example` | `//base.com/` | `//base.com/example` | Input inherits the base's host and remains protocol relative | -| `/example` | _rest_ | `/example` | Input is normalized only | -| `example` | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base | -| `example` | `https://base.com/file` | `https://base.com/example` | Input is joined with the base without its file | -| `example` | `//base.com/dir/` | `//base.com/dir/example` | Input is joined with the base's last directory | -| `example` | `//base.com/file` | `//base.com/example` | Input is joined with the base without its file | -| `example` | `/base/dir/` | `/base/dir/example` | Input is joined with the base's last directory | -| `example` | `/base/file` | `/base/example` | Input is joined with the base without its file | -| `example` | `base/dir/` | `base/dir/example` | Input is joined with the base's last directory | -| `example` | `base/file` | `base/example` | Input is joined with the base without its file | diff --git a/web/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs b/web/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs deleted file mode 100644 index e958e881..00000000 --- a/web/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs +++ /dev/null @@ -1,232 +0,0 @@ -// Matches the scheme of a URL, eg "http://" -const schemeRegex = /^[\w+.-]+:\/\//; -/** - * Matches the parts of a URL: - * 1. Scheme, including ":", guaranteed. - * 2. User/password, including "@", optional. - * 3. Host, guaranteed. - * 4. Port, including ":", optional. - * 5. Path, including "/", optional. - * 6. Query, including "?", optional. - * 7. Hash, including "#", optional. - */ -const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; -/** - * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start - * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). - * - * 1. Host, optional. - * 2. Path, which may include "/", guaranteed. - * 3. Query, including "?", optional. - * 4. Hash, including "#", optional. - */ -const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; -function isAbsoluteUrl(input) { - return schemeRegex.test(input); -} -function isSchemeRelativeUrl(input) { - return input.startsWith('//'); -} -function isAbsolutePath(input) { - return input.startsWith('/'); -} -function isFileUrl(input) { - return input.startsWith('file:'); -} -function isRelative(input) { - return /^[.?#]/.test(input); -} -function parseAbsoluteUrl(input) { - const match = urlRegex.exec(input); - return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); -} -function parseFileUrl(input) { - const match = fileRegex.exec(input); - const path = match[2]; - return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); -} -function makeUrl(scheme, user, host, port, path, query, hash) { - return { - scheme, - user, - host, - port, - path, - query, - hash, - type: 7 /* Absolute */, - }; -} -function parseUrl(input) { - if (isSchemeRelativeUrl(input)) { - const url = parseAbsoluteUrl('http:' + input); - url.scheme = ''; - url.type = 6 /* SchemeRelative */; - return url; - } - if (isAbsolutePath(input)) { - const url = parseAbsoluteUrl('http://foo.com' + input); - url.scheme = ''; - url.host = ''; - url.type = 5 /* AbsolutePath */; - return url; - } - if (isFileUrl(input)) - return parseFileUrl(input); - if (isAbsoluteUrl(input)) - return parseAbsoluteUrl(input); - const url = parseAbsoluteUrl('http://foo.com/' + input); - url.scheme = ''; - url.host = ''; - url.type = input - ? input.startsWith('?') - ? 3 /* Query */ - : input.startsWith('#') - ? 2 /* Hash */ - : 4 /* RelativePath */ - : 1 /* Empty */; - return url; -} -function stripPathFilename(path) { - // If a path ends with a parent directory "..", then it's a relative path with excess parent - // paths. It's not a file, so we can't strip it. - if (path.endsWith('/..')) - return path; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); -} -function mergePaths(url, base) { - normalizePath(base, base.type); - // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative - // path). - if (url.path === '/') { - url.path = base.path; - } - else { - // Resolution happens relative to the base path's directory, not the file. - url.path = stripPathFilename(base.path) + url.path; - } -} -/** - * The path can have empty directories "//", unneeded parents "foo/..", or current directory - * "foo/.". We need to normalize to a standard representation. - */ -function normalizePath(url, type) { - const rel = type <= 4 /* RelativePath */; - const pieces = url.path.split('/'); - // We need to preserve the first piece always, so that we output a leading slash. The item at - // pieces[0] is an empty string. - let pointer = 1; - // Positive is the number of real directories we've output, used for popping a parent directory. - // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". - let positive = 0; - // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will - // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a - // real directory, we won't need to append, unless the other conditions happen again. - let addTrailingSlash = false; - for (let i = 1; i < pieces.length; i++) { - const piece = pieces[i]; - // An empty directory, could be a trailing slash, or just a double "//" in the path. - if (!piece) { - addTrailingSlash = true; - continue; - } - // If we encounter a real directory, then we don't need to append anymore. - addTrailingSlash = false; - // A current directory, which we can always drop. - if (piece === '.') - continue; - // A parent directory, we need to see if there are any real directories we can pop. Else, we - // have an excess of parents, and we'll need to keep the "..". - if (piece === '..') { - if (positive) { - addTrailingSlash = true; - positive--; - pointer--; - } - else if (rel) { - // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute - // URL, protocol relative URL, or an absolute path, we don't need to keep excess. - pieces[pointer++] = piece; - } - continue; - } - // We've encountered a real directory. Move it to the next insertion pointer, which accounts for - // any popped or dropped directories. - pieces[pointer++] = piece; - positive++; - } - let path = ''; - for (let i = 1; i < pointer; i++) { - path += '/' + pieces[i]; - } - if (!path || (addTrailingSlash && !path.endsWith('/..'))) { - path += '/'; - } - url.path = path; -} -/** - * Attempts to resolve `input` URL/path relative to `base`. - */ -function resolve(input, base) { - if (!input && !base) - return ''; - const url = parseUrl(input); - let inputType = url.type; - if (base && inputType !== 7 /* Absolute */) { - const baseUrl = parseUrl(base); - const baseType = baseUrl.type; - switch (inputType) { - case 1 /* Empty */: - url.hash = baseUrl.hash; - // fall through - case 2 /* Hash */: - url.query = baseUrl.query; - // fall through - case 3 /* Query */: - case 4 /* RelativePath */: - mergePaths(url, baseUrl); - // fall through - case 5 /* AbsolutePath */: - // The host, user, and port are joined, you can't copy one without the others. - url.user = baseUrl.user; - url.host = baseUrl.host; - url.port = baseUrl.port; - // fall through - case 6 /* SchemeRelative */: - // The input doesn't have a schema at least, so we need to copy at least that over. - url.scheme = baseUrl.scheme; - } - if (baseType > inputType) - inputType = baseType; - } - normalizePath(url, inputType); - const queryHash = url.query + url.hash; - switch (inputType) { - // This is impossible, because of the empty checks at the start of the function. - // case UrlType.Empty: - case 2 /* Hash */: - case 3 /* Query */: - return queryHash; - case 4 /* RelativePath */: { - // The first char is always a "/", and we need it to be relative. - const path = url.path.slice(1); - if (!path) - return queryHash || '.'; - if (isRelative(base || input) && !isRelative(path)) { - // If base started with a leading ".", or there is no base and input started with a ".", - // then we need to ensure that the relative path starts with a ".". We don't know if - // relative starts with a "..", though, so check before prepending. - return './' + path + queryHash; - } - return path + queryHash; - } - case 5 /* AbsolutePath */: - return url.path + queryHash; - default: - return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; - } -} - -export { resolve as default }; -//# sourceMappingURL=resolve-uri.mjs.map diff --git a/web/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map b/web/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map deleted file mode 100644 index 1de97d01..00000000 --- a/web/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-uri.mjs","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":"AAAA;AACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;;;;;;;;;AAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;AAE5F;;;;;;;;;AASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;AAuBpF,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;IACpC,OAAO,OAAO,CACZ,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,EACf,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CACf,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;IACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACtB,OAAO,OAAO,CACZ,OAAO,EACP,EAAE,EACF,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,EAAE,EACF,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,EACxC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CACf,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CACd,MAAc,EACd,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,KAAa,EACb,IAAY;IAEZ,OAAO;QACL,MAAM;QACN,IAAI;QACJ,IAAI;QACJ,IAAI;QACJ,IAAI;QACJ,KAAK;QACL,IAAI;QACJ,IAAI;KACL,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa;IAC7B,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;QAC9B,MAAM,GAAG,GAAG,gBAAgB,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;QAC9C,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;QAChB,GAAG,CAAC,IAAI,0BAA0B;QAClC,OAAO,GAAG,CAAC;KACZ;IAED,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE;QACzB,MAAM,GAAG,GAAG,gBAAgB,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;QACvD,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;QAChB,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;QACd,GAAG,CAAC,IAAI,wBAAwB;QAChC,OAAO,GAAG,CAAC;KACZ;IAED,IAAI,SAAS,CAAC,KAAK,CAAC;QAAE,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAEjD,IAAI,aAAa,CAAC,KAAK,CAAC;QAAE,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAEzD,MAAM,GAAG,GAAG,gBAAgB,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;IACxD,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;IAChB,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;IACd,GAAG,CAAC,IAAI,GAAG,KAAK;UACZ,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;;cAEnB,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;;;wBAGT;IAClB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAY;;;IAGrC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,UAAU,CAAC,GAAQ,EAAE,IAAS;IACrC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;;;IAI/B,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,EAAE;QACpB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;KACtB;SAAM;;QAEL,GAAG,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC;KACpD;AACH,CAAC;AAED;;;;AAIA,SAAS,aAAa,CAAC,GAAQ,EAAE,IAAa;IAC5C,MAAM,GAAG,GAAG,IAAI,yBAAyB;IACzC,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;;;IAInC,IAAI,OAAO,GAAG,CAAC,CAAC;;;IAIhB,IAAI,QAAQ,GAAG,CAAC,CAAC;;;;IAKjB,IAAI,gBAAgB,GAAG,KAAK,CAAC;IAE7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;;QAGxB,IAAI,CAAC,KAAK,EAAE;YACV,gBAAgB,GAAG,IAAI,CAAC;YACxB,SAAS;SACV;;QAGD,gBAAgB,GAAG,KAAK,CAAC;;QAGzB,IAAI,KAAK,KAAK,GAAG;YAAE,SAAS;;;QAI5B,IAAI,KAAK,KAAK,IAAI,EAAE;YAClB,IAAI,QAAQ,EAAE;gBACZ,gBAAgB,GAAG,IAAI,CAAC;gBACxB,QAAQ,EAAE,CAAC;gBACX,OAAO,EAAE,CAAC;aACX;iBAAM,IAAI,GAAG,EAAE;;;gBAGd,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC;aAC3B;YACD,SAAS;SACV;;;QAID,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC;QAC1B,QAAQ,EAAE,CAAC;KACZ;IAED,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;QAChC,IAAI,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;KACzB;IACD,IAAI,CAAC,IAAI,KAAK,gBAAgB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE;QACxD,IAAI,IAAI,GAAG,CAAC;KACb;IACD,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;AAClB,CAAC;AAED;;;SAGwB,OAAO,CAAC,KAAa,EAAE,IAAwB;IACrE,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAE/B,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;IAEzB,IAAI,IAAI,IAAI,SAAS,uBAAuB;QAC1C,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;QAE9B,QAAQ,SAAS;YACf;gBACE,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;YAG1B;gBACE,GAAG,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;;YAG5B,mBAAmB;YACnB;gBACE,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;;YAG3B;;gBAEE,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;gBACxB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;gBACxB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;YAG1B;;gBAEE,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;SAC/B;QACD,IAAI,QAAQ,GAAG,SAAS;YAAE,SAAS,GAAG,QAAQ,CAAC;KAChD;IAED,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAE9B,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC;IACvC,QAAQ,SAAS;;;QAIf,kBAAkB;QAClB;YACE,OAAO,SAAS,CAAC;QAEnB,2BAA2B;;YAEzB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAE/B,IAAI,CAAC,IAAI;gBAAE,OAAO,SAAS,IAAI,GAAG,CAAC;YAEnC,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;;;;gBAIlD,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;aAChC;YAED,OAAO,IAAI,GAAG,SAAS,CAAC;SACzB;QAED;YACE,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;QAE9B;YACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;KACpF;AACH;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js b/web/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js deleted file mode 100644 index a783049b..00000000 --- a/web/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js +++ /dev/null @@ -1,240 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory()); -})(this, (function () { 'use strict'; - - // Matches the scheme of a URL, eg "http://" - const schemeRegex = /^[\w+.-]+:\/\//; - /** - * Matches the parts of a URL: - * 1. Scheme, including ":", guaranteed. - * 2. User/password, including "@", optional. - * 3. Host, guaranteed. - * 4. Port, including ":", optional. - * 5. Path, including "/", optional. - * 6. Query, including "?", optional. - * 7. Hash, including "#", optional. - */ - const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; - /** - * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start - * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). - * - * 1. Host, optional. - * 2. Path, which may include "/", guaranteed. - * 3. Query, including "?", optional. - * 4. Hash, including "#", optional. - */ - const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; - function isAbsoluteUrl(input) { - return schemeRegex.test(input); - } - function isSchemeRelativeUrl(input) { - return input.startsWith('//'); - } - function isAbsolutePath(input) { - return input.startsWith('/'); - } - function isFileUrl(input) { - return input.startsWith('file:'); - } - function isRelative(input) { - return /^[.?#]/.test(input); - } - function parseAbsoluteUrl(input) { - const match = urlRegex.exec(input); - return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); - } - function parseFileUrl(input) { - const match = fileRegex.exec(input); - const path = match[2]; - return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); - } - function makeUrl(scheme, user, host, port, path, query, hash) { - return { - scheme, - user, - host, - port, - path, - query, - hash, - type: 7 /* Absolute */, - }; - } - function parseUrl(input) { - if (isSchemeRelativeUrl(input)) { - const url = parseAbsoluteUrl('http:' + input); - url.scheme = ''; - url.type = 6 /* SchemeRelative */; - return url; - } - if (isAbsolutePath(input)) { - const url = parseAbsoluteUrl('http://foo.com' + input); - url.scheme = ''; - url.host = ''; - url.type = 5 /* AbsolutePath */; - return url; - } - if (isFileUrl(input)) - return parseFileUrl(input); - if (isAbsoluteUrl(input)) - return parseAbsoluteUrl(input); - const url = parseAbsoluteUrl('http://foo.com/' + input); - url.scheme = ''; - url.host = ''; - url.type = input - ? input.startsWith('?') - ? 3 /* Query */ - : input.startsWith('#') - ? 2 /* Hash */ - : 4 /* RelativePath */ - : 1 /* Empty */; - return url; - } - function stripPathFilename(path) { - // If a path ends with a parent directory "..", then it's a relative path with excess parent - // paths. It's not a file, so we can't strip it. - if (path.endsWith('/..')) - return path; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); - } - function mergePaths(url, base) { - normalizePath(base, base.type); - // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative - // path). - if (url.path === '/') { - url.path = base.path; - } - else { - // Resolution happens relative to the base path's directory, not the file. - url.path = stripPathFilename(base.path) + url.path; - } - } - /** - * The path can have empty directories "//", unneeded parents "foo/..", or current directory - * "foo/.". We need to normalize to a standard representation. - */ - function normalizePath(url, type) { - const rel = type <= 4 /* RelativePath */; - const pieces = url.path.split('/'); - // We need to preserve the first piece always, so that we output a leading slash. The item at - // pieces[0] is an empty string. - let pointer = 1; - // Positive is the number of real directories we've output, used for popping a parent directory. - // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". - let positive = 0; - // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will - // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a - // real directory, we won't need to append, unless the other conditions happen again. - let addTrailingSlash = false; - for (let i = 1; i < pieces.length; i++) { - const piece = pieces[i]; - // An empty directory, could be a trailing slash, or just a double "//" in the path. - if (!piece) { - addTrailingSlash = true; - continue; - } - // If we encounter a real directory, then we don't need to append anymore. - addTrailingSlash = false; - // A current directory, which we can always drop. - if (piece === '.') - continue; - // A parent directory, we need to see if there are any real directories we can pop. Else, we - // have an excess of parents, and we'll need to keep the "..". - if (piece === '..') { - if (positive) { - addTrailingSlash = true; - positive--; - pointer--; - } - else if (rel) { - // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute - // URL, protocol relative URL, or an absolute path, we don't need to keep excess. - pieces[pointer++] = piece; - } - continue; - } - // We've encountered a real directory. Move it to the next insertion pointer, which accounts for - // any popped or dropped directories. - pieces[pointer++] = piece; - positive++; - } - let path = ''; - for (let i = 1; i < pointer; i++) { - path += '/' + pieces[i]; - } - if (!path || (addTrailingSlash && !path.endsWith('/..'))) { - path += '/'; - } - url.path = path; - } - /** - * Attempts to resolve `input` URL/path relative to `base`. - */ - function resolve(input, base) { - if (!input && !base) - return ''; - const url = parseUrl(input); - let inputType = url.type; - if (base && inputType !== 7 /* Absolute */) { - const baseUrl = parseUrl(base); - const baseType = baseUrl.type; - switch (inputType) { - case 1 /* Empty */: - url.hash = baseUrl.hash; - // fall through - case 2 /* Hash */: - url.query = baseUrl.query; - // fall through - case 3 /* Query */: - case 4 /* RelativePath */: - mergePaths(url, baseUrl); - // fall through - case 5 /* AbsolutePath */: - // The host, user, and port are joined, you can't copy one without the others. - url.user = baseUrl.user; - url.host = baseUrl.host; - url.port = baseUrl.port; - // fall through - case 6 /* SchemeRelative */: - // The input doesn't have a schema at least, so we need to copy at least that over. - url.scheme = baseUrl.scheme; - } - if (baseType > inputType) - inputType = baseType; - } - normalizePath(url, inputType); - const queryHash = url.query + url.hash; - switch (inputType) { - // This is impossible, because of the empty checks at the start of the function. - // case UrlType.Empty: - case 2 /* Hash */: - case 3 /* Query */: - return queryHash; - case 4 /* RelativePath */: { - // The first char is always a "/", and we need it to be relative. - const path = url.path.slice(1); - if (!path) - return queryHash || '.'; - if (isRelative(base || input) && !isRelative(path)) { - // If base started with a leading ".", or there is no base and input started with a ".", - // then we need to ensure that the relative path starts with a ".". We don't know if - // relative starts with a "..", though, so check before prepending. - return './' + path + queryHash; - } - return path + queryHash; - } - case 5 /* AbsolutePath */: - return url.path + queryHash; - default: - return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; - } - } - - return resolve; - -})); -//# sourceMappingURL=resolve-uri.umd.js.map diff --git a/web/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map b/web/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map deleted file mode 100644 index 70a37f21..00000000 --- a/web/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-uri.umd.js","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":";;;;;;IAAA;IACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;IAErC;;;;;;;;;;IAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;IAE5F;;;;;;;;;IASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;IAuBpF,SAAS,aAAa,CAAC,KAAa;QAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,mBAAmB,CAAC,KAAa;QACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,SAAS,cAAc,CAAC,KAAa;QACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,SAAS,SAAS,CAAC,KAAa;QAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,SAAS,UAAU,CAAC,KAAa;QAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,gBAAgB,CAAC,KAAa;QACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;QACpC,OAAO,OAAO,CACZ,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,EACf,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CACf,CAAC;IACJ,CAAC;IAED,SAAS,YAAY,CAAC,KAAa;QACjC,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;QACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,OAAO,OAAO,CACZ,OAAO,EACP,EAAE,EACF,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,EAAE,EACF,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,EACxC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CACf,CAAC;IACJ,CAAC;IAED,SAAS,OAAO,CACd,MAAc,EACd,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,KAAa,EACb,IAAY;QAEZ,OAAO;YACL,MAAM;YACN,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,KAAK;YACL,IAAI;YACJ,IAAI;SACL,CAAC;IACJ,CAAC;IAED,SAAS,QAAQ,CAAC,KAAa;QAC7B,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,MAAM,GAAG,GAAG,gBAAgB,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;YAC9C,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;YAChB,GAAG,CAAC,IAAI,0BAA0B;YAClC,OAAO,GAAG,CAAC;SACZ;QAED,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE;YACzB,MAAM,GAAG,GAAG,gBAAgB,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;YACvD,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;YAChB,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;YACd,GAAG,CAAC,IAAI,wBAAwB;YAChC,OAAO,GAAG,CAAC;SACZ;QAED,IAAI,SAAS,CAAC,KAAK,CAAC;YAAE,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;QAEjD,IAAI,aAAa,CAAC,KAAK,CAAC;YAAE,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAEzD,MAAM,GAAG,GAAG,gBAAgB,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;QACxD,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;QAChB,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;QACd,GAAG,CAAC,IAAI,GAAG,KAAK;cACZ,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;;kBAEnB,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;;;4BAGT;QAClB,OAAO,GAAG,CAAC;IACb,CAAC;IAED,SAAS,iBAAiB,CAAC,IAAY;;;QAGrC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAClC,CAAC;IAED,SAAS,UAAU,CAAC,GAAQ,EAAE,IAAS;QACrC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;;;QAI/B,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,EAAE;YACpB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;SACtB;aAAM;;YAEL,GAAG,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC;SACpD;IACH,CAAC;IAED;;;;IAIA,SAAS,aAAa,CAAC,GAAQ,EAAE,IAAa;QAC5C,MAAM,GAAG,GAAG,IAAI,yBAAyB;QACzC,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;;;QAInC,IAAI,OAAO,GAAG,CAAC,CAAC;;;QAIhB,IAAI,QAAQ,GAAG,CAAC,CAAC;;;;QAKjB,IAAI,gBAAgB,GAAG,KAAK,CAAC;QAE7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACtC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;;YAGxB,IAAI,CAAC,KAAK,EAAE;gBACV,gBAAgB,GAAG,IAAI,CAAC;gBACxB,SAAS;aACV;;YAGD,gBAAgB,GAAG,KAAK,CAAC;;YAGzB,IAAI,KAAK,KAAK,GAAG;gBAAE,SAAS;;;YAI5B,IAAI,KAAK,KAAK,IAAI,EAAE;gBAClB,IAAI,QAAQ,EAAE;oBACZ,gBAAgB,GAAG,IAAI,CAAC;oBACxB,QAAQ,EAAE,CAAC;oBACX,OAAO,EAAE,CAAC;iBACX;qBAAM,IAAI,GAAG,EAAE;;;oBAGd,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC;iBAC3B;gBACD,SAAS;aACV;;;YAID,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC;YAC1B,QAAQ,EAAE,CAAC;SACZ;QAED,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;YAChC,IAAI,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;SACzB;QACD,IAAI,CAAC,IAAI,KAAK,gBAAgB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE;YACxD,IAAI,IAAI,GAAG,CAAC;SACb;QACD,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;IAED;;;aAGwB,OAAO,CAAC,KAAa,EAAE,IAAwB;QACrE,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QAE/B,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;QAEzB,IAAI,IAAI,IAAI,SAAS,uBAAuB;YAC1C,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;YAE9B,QAAQ,SAAS;gBACf;oBACE,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;gBAG1B;oBACE,GAAG,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;;gBAG5B,mBAAmB;gBACnB;oBACE,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;;gBAG3B;;oBAEE,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;oBACxB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;oBACxB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;gBAG1B;;oBAEE,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;aAC/B;YACD,IAAI,QAAQ,GAAG,SAAS;gBAAE,SAAS,GAAG,QAAQ,CAAC;SAChD;QAED,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAE9B,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC;QACvC,QAAQ,SAAS;;;YAIf,kBAAkB;YAClB;gBACE,OAAO,SAAS,CAAC;YAEnB,2BAA2B;;gBAEzB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAE/B,IAAI,CAAC,IAAI;oBAAE,OAAO,SAAS,IAAI,GAAG,CAAC;gBAEnC,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;;;;oBAIlD,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;iBAChC;gBAED,OAAO,IAAI,GAAG,SAAS,CAAC;aACzB;YAED;gBACE,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;YAE9B;gBACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;SACpF;IACH;;;;;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts b/web/static/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts deleted file mode 100644 index b7f0b3b2..00000000 --- a/web/static/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Attempts to resolve `input` URL/path relative to `base`. - */ -export default function resolve(input: string, base: string | undefined): string; diff --git a/web/static/node_modules/@jridgewell/resolve-uri/package.json b/web/static/node_modules/@jridgewell/resolve-uri/package.json deleted file mode 100644 index 02a4c518..00000000 --- a/web/static/node_modules/@jridgewell/resolve-uri/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "@jridgewell/resolve-uri", - "version": "3.1.2", - "description": "Resolve a URI relative to an optional base URI", - "keywords": [ - "resolve", - "uri", - "url", - "path" - ], - "author": "Justin Ridgewell ", - "license": "MIT", - "repository": "https://github.com/jridgewell/resolve-uri", - "main": "dist/resolve-uri.umd.js", - "module": "dist/resolve-uri.mjs", - "types": "dist/types/resolve-uri.d.ts", - "exports": { - ".": [ - { - "types": "./dist/types/resolve-uri.d.ts", - "browser": "./dist/resolve-uri.umd.js", - "require": "./dist/resolve-uri.umd.js", - "import": "./dist/resolve-uri.mjs" - }, - "./dist/resolve-uri.umd.js" - ], - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], - "engines": { - "node": ">=6.0.0" - }, - "scripts": { - "prebuild": "rm -rf dist", - "build": "run-s -n build:*", - "build:rollup": "rollup -c rollup.config.js", - "build:ts": "tsc --project tsconfig.build.json", - "lint": "run-s -n lint:*", - "lint:prettier": "npm run test:lint:prettier -- --write", - "lint:ts": "npm run test:lint:ts -- --fix", - "pretest": "run-s build:rollup", - "test": "run-s -n test:lint test:only", - "test:debug": "mocha --inspect-brk", - "test:lint": "run-s -n test:lint:*", - "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", - "test:lint:ts": "eslint '{src,test}/**/*.ts'", - "test:only": "mocha", - "test:coverage": "c8 mocha", - "test:watch": "mocha --watch", - "prepublishOnly": "npm run preversion", - "preversion": "run-s test build" - }, - "devDependencies": { - "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*", - "@rollup/plugin-typescript": "8.3.0", - "@typescript-eslint/eslint-plugin": "5.10.0", - "@typescript-eslint/parser": "5.10.0", - "c8": "7.11.0", - "eslint": "8.7.0", - "eslint-config-prettier": "8.3.0", - "mocha": "9.2.0", - "npm-run-all": "4.1.5", - "prettier": "2.5.1", - "rollup": "2.66.0", - "typescript": "4.5.5" - } -} diff --git a/web/static/node_modules/@jridgewell/set-array/LICENSE b/web/static/node_modules/@jridgewell/set-array/LICENSE deleted file mode 100644 index 352f0715..00000000 --- a/web/static/node_modules/@jridgewell/set-array/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2022 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/@jridgewell/set-array/README.md b/web/static/node_modules/@jridgewell/set-array/README.md deleted file mode 100644 index 2ed155ff..00000000 --- a/web/static/node_modules/@jridgewell/set-array/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# @jridgewell/set-array - -> Like a Set, but provides the index of the `key` in the backing array - -This is designed to allow synchronizing a second array with the contents of the backing array, like -how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, and there -are never duplicates. - -## Installation - -```sh -npm install @jridgewell/set-array -``` - -## Usage - -```js -import { SetArray, get, put, pop } from '@jridgewell/set-array'; - -const sa = new SetArray(); - -let index = put(sa, 'first'); -assert.strictEqual(index, 0); - -index = put(sa, 'second'); -assert.strictEqual(index, 1); - -assert.deepEqual(sa.array, [ 'first', 'second' ]); - -index = get(sa, 'first'); -assert.strictEqual(index, 0); - -pop(sa); -index = get(sa, 'second'); -assert.strictEqual(index, undefined); -assert.deepEqual(sa.array, [ 'first' ]); -``` diff --git a/web/static/node_modules/@jridgewell/set-array/dist/set-array.mjs b/web/static/node_modules/@jridgewell/set-array/dist/set-array.mjs deleted file mode 100644 index 8a2d60b8..00000000 --- a/web/static/node_modules/@jridgewell/set-array/dist/set-array.mjs +++ /dev/null @@ -1,69 +0,0 @@ -/** - * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the - * index of the `key` in the backing array. - * - * This is designed to allow synchronizing a second array with the contents of the backing array, - * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, - * and there are never duplicates. - */ -class SetArray { - constructor() { - this._indexes = { __proto__: null }; - this.array = []; - } -} -/** - * Typescript doesn't allow friend access to private fields, so this just casts the set into a type - * with public access modifiers. - */ -function cast(set) { - return set; -} -/** - * Gets the index associated with `key` in the backing array, if it is already present. - */ -function get(setarr, key) { - return cast(setarr)._indexes[key]; -} -/** - * Puts `key` into the backing array, if it is not already present. Returns - * the index of the `key` in the backing array. - */ -function put(setarr, key) { - // The key may or may not be present. If it is present, it's a number. - const index = get(setarr, key); - if (index !== undefined) - return index; - const { array, _indexes: indexes } = cast(setarr); - const length = array.push(key); - return (indexes[key] = length - 1); -} -/** - * Pops the last added item out of the SetArray. - */ -function pop(setarr) { - const { array, _indexes: indexes } = cast(setarr); - if (array.length === 0) - return; - const last = array.pop(); - indexes[last] = undefined; -} -/** - * Removes the key, if it exists in the set. - */ -function remove(setarr, key) { - const index = get(setarr, key); - if (index === undefined) - return; - const { array, _indexes: indexes } = cast(setarr); - for (let i = index + 1; i < array.length; i++) { - const k = array[i]; - array[i - 1] = k; - indexes[k]--; - } - indexes[key] = undefined; - array.pop(); -} - -export { SetArray, get, pop, put, remove }; -//# sourceMappingURL=set-array.mjs.map diff --git a/web/static/node_modules/@jridgewell/set-array/dist/set-array.mjs.map b/web/static/node_modules/@jridgewell/set-array/dist/set-array.mjs.map deleted file mode 100644 index 9276dfa2..00000000 --- a/web/static/node_modules/@jridgewell/set-array/dist/set-array.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"set-array.mjs","sources":["../src/set-array.ts"],"sourcesContent":["type Key = string | number | symbol;\n\n/**\n * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the\n * index of the `key` in the backing array.\n *\n * This is designed to allow synchronizing a second array with the contents of the backing array,\n * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,\n * and there are never duplicates.\n */\nexport class SetArray {\n private declare _indexes: Record;\n declare array: readonly T[];\n\n constructor() {\n this._indexes = { __proto__: null } as any;\n this.array = [];\n }\n}\n\ninterface PublicSet {\n array: T[];\n _indexes: SetArray['_indexes'];\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the set into a type\n * with public access modifiers.\n */\nfunction cast(set: SetArray): PublicSet {\n return set as any;\n}\n\n/**\n * Gets the index associated with `key` in the backing array, if it is already present.\n */\nexport function get(setarr: SetArray, key: T): number | undefined {\n return cast(setarr)._indexes[key];\n}\n\n/**\n * Puts `key` into the backing array, if it is not already present. Returns\n * the index of the `key` in the backing array.\n */\nexport function put(setarr: SetArray, key: T): number {\n // The key may or may not be present. If it is present, it's a number.\n const index = get(setarr, key);\n if (index !== undefined) return index;\n\n const { array, _indexes: indexes } = cast(setarr);\n\n const length = array.push(key);\n return (indexes[key] = length - 1);\n}\n\n/**\n * Pops the last added item out of the SetArray.\n */\nexport function pop(setarr: SetArray): void {\n const { array, _indexes: indexes } = cast(setarr);\n if (array.length === 0) return;\n\n const last = array.pop()!;\n indexes[last] = undefined;\n}\n\n/**\n * Removes the key, if it exists in the set.\n */\nexport function remove(setarr: SetArray, key: T): void {\n const index = get(setarr, key);\n if (index === undefined) return;\n\n const { array, _indexes: indexes } = cast(setarr);\n for (let i = index + 1; i < array.length; i++) {\n const k = array[i];\n array[i - 1] = k;\n indexes[k]!--;\n }\n indexes[key] = undefined;\n array.pop();\n}\n"],"names":[],"mappings":"AAEA;;;;;;;;MAQa,QAAQ;IAInB;QACE,IAAI,CAAC,QAAQ,GAAG,EAAE,SAAS,EAAE,IAAI,EAAS,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;KACjB;CACF;AAOD;;;;AAIA,SAAS,IAAI,CAAgB,GAAgB;IAC3C,OAAO,GAAU,CAAC;AACpB,CAAC;AAED;;;SAGgB,GAAG,CAAgB,MAAmB,EAAE,GAAM;IAC5D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC;AAED;;;;SAIgB,GAAG,CAAgB,MAAmB,EAAE,GAAM;;IAE5D,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAEtC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAElD,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/B,QAAQ,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE;AACrC,CAAC;AAED;;;SAGgB,GAAG,CAAgB,MAAmB;IACpD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAE/B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;IAC1B,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;AAC5B,CAAC;AAED;;;SAGgB,MAAM,CAAgB,MAAmB,EAAE,GAAM;IAC/D,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO;IAEhC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC7C,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACnB,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACjB,OAAO,CAAC,CAAC,CAAE,EAAE,CAAC;KACf;IACD,OAAO,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IACzB,KAAK,CAAC,GAAG,EAAE,CAAC;AACd;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/set-array/dist/set-array.umd.js b/web/static/node_modules/@jridgewell/set-array/dist/set-array.umd.js deleted file mode 100644 index ab498cc1..00000000 --- a/web/static/node_modules/@jridgewell/set-array/dist/set-array.umd.js +++ /dev/null @@ -1,83 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.setArray = {})); -})(this, (function (exports) { 'use strict'; - - /** - * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the - * index of the `key` in the backing array. - * - * This is designed to allow synchronizing a second array with the contents of the backing array, - * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, - * and there are never duplicates. - */ - class SetArray { - constructor() { - this._indexes = { __proto__: null }; - this.array = []; - } - } - /** - * Typescript doesn't allow friend access to private fields, so this just casts the set into a type - * with public access modifiers. - */ - function cast(set) { - return set; - } - /** - * Gets the index associated with `key` in the backing array, if it is already present. - */ - function get(setarr, key) { - return cast(setarr)._indexes[key]; - } - /** - * Puts `key` into the backing array, if it is not already present. Returns - * the index of the `key` in the backing array. - */ - function put(setarr, key) { - // The key may or may not be present. If it is present, it's a number. - const index = get(setarr, key); - if (index !== undefined) - return index; - const { array, _indexes: indexes } = cast(setarr); - const length = array.push(key); - return (indexes[key] = length - 1); - } - /** - * Pops the last added item out of the SetArray. - */ - function pop(setarr) { - const { array, _indexes: indexes } = cast(setarr); - if (array.length === 0) - return; - const last = array.pop(); - indexes[last] = undefined; - } - /** - * Removes the key, if it exists in the set. - */ - function remove(setarr, key) { - const index = get(setarr, key); - if (index === undefined) - return; - const { array, _indexes: indexes } = cast(setarr); - for (let i = index + 1; i < array.length; i++) { - const k = array[i]; - array[i - 1] = k; - indexes[k]--; - } - indexes[key] = undefined; - array.pop(); - } - - exports.SetArray = SetArray; - exports.get = get; - exports.pop = pop; - exports.put = put; - exports.remove = remove; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); -//# sourceMappingURL=set-array.umd.js.map diff --git a/web/static/node_modules/@jridgewell/set-array/dist/set-array.umd.js.map b/web/static/node_modules/@jridgewell/set-array/dist/set-array.umd.js.map deleted file mode 100644 index 9edb8bc5..00000000 --- a/web/static/node_modules/@jridgewell/set-array/dist/set-array.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"set-array.umd.js","sources":["../src/set-array.ts"],"sourcesContent":["type Key = string | number | symbol;\n\n/**\n * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the\n * index of the `key` in the backing array.\n *\n * This is designed to allow synchronizing a second array with the contents of the backing array,\n * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,\n * and there are never duplicates.\n */\nexport class SetArray {\n private declare _indexes: Record;\n declare array: readonly T[];\n\n constructor() {\n this._indexes = { __proto__: null } as any;\n this.array = [];\n }\n}\n\ninterface PublicSet {\n array: T[];\n _indexes: SetArray['_indexes'];\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the set into a type\n * with public access modifiers.\n */\nfunction cast(set: SetArray): PublicSet {\n return set as any;\n}\n\n/**\n * Gets the index associated with `key` in the backing array, if it is already present.\n */\nexport function get(setarr: SetArray, key: T): number | undefined {\n return cast(setarr)._indexes[key];\n}\n\n/**\n * Puts `key` into the backing array, if it is not already present. Returns\n * the index of the `key` in the backing array.\n */\nexport function put(setarr: SetArray, key: T): number {\n // The key may or may not be present. If it is present, it's a number.\n const index = get(setarr, key);\n if (index !== undefined) return index;\n\n const { array, _indexes: indexes } = cast(setarr);\n\n const length = array.push(key);\n return (indexes[key] = length - 1);\n}\n\n/**\n * Pops the last added item out of the SetArray.\n */\nexport function pop(setarr: SetArray): void {\n const { array, _indexes: indexes } = cast(setarr);\n if (array.length === 0) return;\n\n const last = array.pop()!;\n indexes[last] = undefined;\n}\n\n/**\n * Removes the key, if it exists in the set.\n */\nexport function remove(setarr: SetArray, key: T): void {\n const index = get(setarr, key);\n if (index === undefined) return;\n\n const { array, _indexes: indexes } = cast(setarr);\n for (let i = index + 1; i < array.length; i++) {\n const k = array[i];\n array[i - 1] = k;\n indexes[k]!--;\n }\n indexes[key] = undefined;\n array.pop();\n}\n"],"names":[],"mappings":";;;;;;IAEA;;;;;;;;UAQa,QAAQ;QAInB;YACE,IAAI,CAAC,QAAQ,GAAG,EAAE,SAAS,EAAE,IAAI,EAAS,CAAC;YAC3C,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;SACjB;KACF;IAOD;;;;IAIA,SAAS,IAAI,CAAgB,GAAgB;QAC3C,OAAO,GAAU,CAAC;IACpB,CAAC;IAED;;;aAGgB,GAAG,CAAgB,MAAmB,EAAE,GAAM;QAC5D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAED;;;;aAIgB,GAAG,CAAgB,MAAmB,EAAE,GAAM;;QAE5D,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC/B,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QAEtC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAElD,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,QAAQ,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE;IACrC,CAAC;IAED;;;aAGgB,GAAG,CAAgB,MAAmB;QACpD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAE/B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5B,CAAC;IAED;;;aAGgB,MAAM,CAAgB,MAAmB,EAAE,GAAM;QAC/D,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC/B,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO;QAEhC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAClD,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7C,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACnB,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACjB,OAAO,CAAC,CAAC,CAAE,EAAE,CAAC;SACf;QACD,OAAO,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;QACzB,KAAK,CAAC,GAAG,EAAE,CAAC;IACd;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/set-array/dist/types/set-array.d.ts b/web/static/node_modules/@jridgewell/set-array/dist/types/set-array.d.ts deleted file mode 100644 index 5f68e5db..00000000 --- a/web/static/node_modules/@jridgewell/set-array/dist/types/set-array.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -declare type Key = string | number | symbol; -/** - * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the - * index of the `key` in the backing array. - * - * This is designed to allow synchronizing a second array with the contents of the backing array, - * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, - * and there are never duplicates. - */ -export declare class SetArray { - private _indexes; - array: readonly T[]; - constructor(); -} -/** - * Gets the index associated with `key` in the backing array, if it is already present. - */ -export declare function get(setarr: SetArray, key: T): number | undefined; -/** - * Puts `key` into the backing array, if it is not already present. Returns - * the index of the `key` in the backing array. - */ -export declare function put(setarr: SetArray, key: T): number; -/** - * Pops the last added item out of the SetArray. - */ -export declare function pop(setarr: SetArray): void; -/** - * Removes the key, if it exists in the set. - */ -export declare function remove(setarr: SetArray, key: T): void; -export {}; diff --git a/web/static/node_modules/@jridgewell/set-array/package.json b/web/static/node_modules/@jridgewell/set-array/package.json deleted file mode 100644 index f652ca59..00000000 --- a/web/static/node_modules/@jridgewell/set-array/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "@jridgewell/set-array", - "version": "1.2.1", - "description": "Like a Set, but provides the index of the `key` in the backing array", - "keywords": [], - "author": "Justin Ridgewell ", - "license": "MIT", - "repository": "https://github.com/jridgewell/set-array", - "main": "dist/set-array.umd.js", - "module": "dist/set-array.mjs", - "typings": "dist/types/set-array.d.ts", - "exports": { - ".": [ - { - "types": "./dist/types/set-array.d.ts", - "browser": "./dist/set-array.umd.js", - "require": "./dist/set-array.umd.js", - "import": "./dist/set-array.mjs" - }, - "./dist/set-array.umd.js" - ], - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], - "engines": { - "node": ">=6.0.0" - }, - "scripts": { - "prebuild": "rm -rf dist", - "build": "run-s -n build:*", - "build:rollup": "rollup -c rollup.config.js", - "build:ts": "tsc --project tsconfig.build.json", - "lint": "run-s -n lint:*", - "lint:prettier": "npm run test:lint:prettier -- --write", - "lint:ts": "npm run test:lint:ts -- --fix", - "test": "run-s -n test:lint test:only", - "test:debug": "mocha --inspect-brk", - "test:lint": "run-s -n test:lint:*", - "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", - "test:lint:ts": "eslint '{src,test}/**/*.ts'", - "test:only": "mocha", - "test:coverage": "c8 mocha", - "test:watch": "mocha --watch", - "prepublishOnly": "npm run preversion", - "preversion": "run-s test build" - }, - "devDependencies": { - "@rollup/plugin-typescript": "8.3.0", - "@types/mocha": "9.1.1", - "@types/node": "17.0.29", - "@typescript-eslint/eslint-plugin": "5.10.0", - "@typescript-eslint/parser": "5.10.0", - "c8": "7.11.0", - "eslint": "8.7.0", - "eslint-config-prettier": "8.3.0", - "mocha": "9.2.0", - "npm-run-all": "4.1.5", - "prettier": "2.5.1", - "rollup": "2.66.0", - "tsx": "4.7.1", - "typescript": "4.5.5" - } -} diff --git a/web/static/node_modules/@jridgewell/source-map/LICENSE b/web/static/node_modules/@jridgewell/source-map/LICENSE deleted file mode 100644 index 0a81b2ad..00000000 --- a/web/static/node_modules/@jridgewell/source-map/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2019 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/source-map/README.md b/web/static/node_modules/@jridgewell/source-map/README.md deleted file mode 100644 index a565f9ad..00000000 --- a/web/static/node_modules/@jridgewell/source-map/README.md +++ /dev/null @@ -1,184 +0,0 @@ -# @jridgewell/source-map - -> Packages `@jridgewell/trace-mapping` and `@jridgewell/gen-mapping` into the familiar source-map API - -This isn't the full API, but it's the core functionality. This wraps -[@jridgewell/trace-mapping][trace-mapping] and [@jridgewell/gen-mapping][gen-mapping] -implementations. - -## Installation - -```sh -npm install @jridgewell/source-map -``` - -## Usage - -TODO - -### SourceMapConsumer - -```typescript -import { SourceMapConsumer } from '@jridgewell/source-map'; -const smc = new SourceMapConsumer({ - version: 3, - names: ['foo'], - sources: ['input.js'], - mappings: 'AAAAA', -}); -``` - -#### SourceMapConsumer.fromSourceMap(mapGenerator[, mapUrl]) - -Transforms a `SourceMapGenerator` into a `SourceMapConsumer`. - -```typescript -const smg = new SourceMapGenerator(); - -const smc = SourceMapConsumer.fromSourceMap(map); -smc.originalPositionFor({ line: 1, column: 0 }); -``` - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -```typescript -const smc = new SourceMapConsumer(map); -smc.originalPositionFor({ line: 1, column: 0 }); -``` - -#### SourceMapConsumer.prototype.mappings - -```typescript -const smc = new SourceMapConsumer(map); -smc.mappings; // AAAA -``` - -#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) - -```typescript -const smc = new SourceMapConsumer(map); -smc.allGeneratedpositionsfor({ line: 1, column: 5, source: "baz.ts" }); -// [ -// { line: 2, column: 8 } -// ] -``` - -#### SourceMapConsumer.prototype.eachMapping(callback[, context[, order]]) - -> This implementation currently does not support the "order" parameter. -> This function can only iterate in Generated order. - -```typescript -const smc = new SourceMapConsumer(map); -smc.eachMapping((mapping) => { -// { source: 'baz.ts', -// generatedLine: 4, -// generatedColumn: 5, -// originalLine: 4, -// originalColumn: 5, -// name: null } -}); -``` - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -```typescript -const smc = new SourceMapConsumer(map); -smc.generatedPositionFor({ line: 1, column: 5, source: "baz.ts" }); -// { line: 2, column: 8 } -``` - -#### SourceMapConsumer.prototype.hasContentsOfAllSources() - -```typescript -const smc = new SourceMapConsumer(map); -smc.hasContentsOfAllSources(); -// true -``` - -#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) - -```typescript -const smc = new SourceMapConsumer(map); -smc.generatedPositionFor("baz.ts"); -// "export default ..." -``` - -#### SourceMapConsumer.prototype.version - -Returns the source map's version - -### SourceMapGenerator - -```typescript -import { SourceMapGenerator } from '@jridgewell/source-map'; -const smg = new SourceMapGenerator({ - file: 'output.js', - sourceRoot: 'https://example.com/', -}); -``` - -#### SourceMapGenerator.fromSourceMap(map) - -Transform a `SourceMapConsumer` into a `SourceMapGenerator`. - -```typescript -const smc = new SourceMapConsumer(); -const smg = SourceMapGenerator.fromSourceMap(smc); -``` - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -> This method is not implemented yet - -#### SourceMapGenerator.prototype.addMapping(mapping) - -```typescript -const smg = new SourceMapGenerator(); -smg.addMapping({ - generated: { line: 1, column: 0 }, - source: 'input.js', - original: { line: 1, column: 0 }, - name: 'foo', -}); -``` - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -```typescript -const smg = new SourceMapGenerator(); -smg.setSourceContent('input.js', 'foobar'); -``` - -#### SourceMapGenerator.prototype.toJSON() - -```typescript -const smg = new SourceMapGenerator(); -smg.toJSON(); // { version: 3, names: [], sources: [], mappings: '' } -``` - -#### SourceMapGenerator.prototype.toString() - -```typescript -const smg = new SourceMapGenerator(); -smg.toJSON(); // "{version:3,names:[],sources:[],mappings:''}" -``` - -#### SourceMapGenerator.prototype.toDecodedMap() - -```typescript -const smg = new SourceMapGenerator(); -smg.toDecodedMap(); // { version: 3, names: [], sources: [], mappings: [] } -``` - -## Known differences with other implementations - -This implementation has some differences with `source-map` and `source-map-js`. - -- `SourceMapConsumer.prototype.eachMapping()` - - Does not support the `order` argument -- `SourceMapGenerator.prototype.applySourceMap()` - - Not implemented - -[trace-mapping]: https://github.com/jridgewell/trace-mapping/ -[gen-mapping]: https://github.com/jridgewell/gen-mapping/ diff --git a/web/static/node_modules/@jridgewell/source-map/dist/source-map.cjs b/web/static/node_modules/@jridgewell/source-map/dist/source-map.cjs deleted file mode 100644 index 82d1e2b2..00000000 --- a/web/static/node_modules/@jridgewell/source-map/dist/source-map.cjs +++ /dev/null @@ -1,95 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var traceMapping = require('@jridgewell/trace-mapping'); -var genMapping = require('@jridgewell/gen-mapping'); - -class SourceMapConsumer { - constructor(map, mapUrl) { - const trace = (this._map = new traceMapping.AnyMap(map, mapUrl)); - this.file = trace.file; - this.names = trace.names; - this.sourceRoot = trace.sourceRoot; - this.sources = trace.resolvedSources; - this.sourcesContent = trace.sourcesContent; - this.version = trace.version; - } - static fromSourceMap(map, mapUrl) { - // This is more performant if we receive - // a @jridgewell/source-map SourceMapGenerator - if (map.toDecodedMap) { - return new SourceMapConsumer(map.toDecodedMap(), mapUrl); - } - // This is a fallback for `source-map` and `source-map-js` - return new SourceMapConsumer(map.toJSON(), mapUrl); - } - get mappings() { - return traceMapping.encodedMappings(this._map); - } - originalPositionFor(needle) { - return traceMapping.originalPositionFor(this._map, needle); - } - generatedPositionFor(originalPosition) { - return traceMapping.generatedPositionFor(this._map, originalPosition); - } - allGeneratedPositionsFor(originalPosition) { - return traceMapping.allGeneratedPositionsFor(this._map, originalPosition); - } - hasContentsOfAllSources() { - if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) { - return false; - } - for (const content of this.sourcesContent) { - if (content == null) { - return false; - } - } - return true; - } - sourceContentFor(source, nullOnMissing) { - const sourceContent = traceMapping.sourceContentFor(this._map, source); - if (sourceContent != null) { - return sourceContent; - } - if (nullOnMissing) { - return null; - } - throw new Error(`"${source}" is not in the SourceMap.`); - } - eachMapping(callback, context /*, order?: number*/) { - // order is ignored as @jridgewell/trace-map doesn't implement it - traceMapping.eachMapping(this._map, context ? callback.bind(context) : callback); - } - destroy() { - // noop. - } -} -class SourceMapGenerator { - constructor(opts) { - // TODO :: should this be duck-typed ? - this._map = opts instanceof genMapping.GenMapping ? opts : new genMapping.GenMapping(opts); - } - static fromSourceMap(consumer) { - return new SourceMapGenerator(genMapping.fromMap(consumer)); - } - addMapping(mapping) { - genMapping.maybeAddMapping(this._map, mapping); - } - setSourceContent(source, content) { - genMapping.setSourceContent(this._map, source, content); - } - toJSON() { - return genMapping.toEncodedMap(this._map); - } - toString() { - return JSON.stringify(this.toJSON()); - } - toDecodedMap() { - return genMapping.toDecodedMap(this._map); - } -} - -exports.SourceMapConsumer = SourceMapConsumer; -exports.SourceMapGenerator = SourceMapGenerator; -//# sourceMappingURL=source-map.cjs.map diff --git a/web/static/node_modules/@jridgewell/source-map/dist/source-map.cjs.map b/web/static/node_modules/@jridgewell/source-map/dist/source-map.cjs.map deleted file mode 100644 index cf4e637d..00000000 --- a/web/static/node_modules/@jridgewell/source-map/dist/source-map.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"source-map.cjs","sources":["../../src/source-map.ts"],"sourcesContent":["import {\n AnyMap,\n originalPositionFor,\n generatedPositionFor,\n allGeneratedPositionsFor,\n eachMapping,\n encodedMappings,\n sourceContentFor,\n} from '@jridgewell/trace-mapping';\nimport {\n GenMapping,\n maybeAddMapping,\n toDecodedMap,\n toEncodedMap,\n setSourceContent,\n fromMap,\n} from '@jridgewell/gen-mapping';\n\nimport type {\n TraceMap,\n SourceMapInput,\n SectionedSourceMapInput,\n DecodedSourceMap,\n} from '@jridgewell/trace-mapping';\nexport type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap };\n\nimport type { Mapping, EncodedSourceMap } from '@jridgewell/gen-mapping';\nexport type { Mapping, EncodedSourceMap };\n\nexport class SourceMapConsumer {\n private declare _map: TraceMap;\n declare file: TraceMap['file'];\n declare names: TraceMap['names'];\n declare sourceRoot: TraceMap['sourceRoot'];\n declare sources: TraceMap['sources'];\n declare sourcesContent: TraceMap['sourcesContent'];\n declare version: TraceMap['version'];\n\n constructor(map: ConstructorParameters[0], mapUrl: Parameters[1]) {\n const trace = (this._map = new AnyMap(map, mapUrl));\n\n this.file = trace.file;\n this.names = trace.names;\n this.sourceRoot = trace.sourceRoot;\n this.sources = trace.resolvedSources;\n this.sourcesContent = trace.sourcesContent;\n this.version = trace.version;\n }\n\n static fromSourceMap(map: SourceMapGenerator, mapUrl: Parameters[1]) {\n // This is more performant if we receive\n // a @jridgewell/source-map SourceMapGenerator\n if (map.toDecodedMap) {\n return new SourceMapConsumer(map.toDecodedMap() as SectionedSourceMapInput, mapUrl);\n }\n\n // This is a fallback for `source-map` and `source-map-js`\n return new SourceMapConsumer(map.toJSON() as SectionedSourceMapInput, mapUrl);\n }\n\n get mappings(): string {\n return encodedMappings(this._map);\n }\n\n originalPositionFor(\n needle: Parameters[1],\n ): ReturnType {\n return originalPositionFor(this._map, needle);\n }\n\n generatedPositionFor(\n originalPosition: Parameters[1],\n ): ReturnType {\n return generatedPositionFor(this._map, originalPosition);\n }\n\n allGeneratedPositionsFor(\n originalPosition: Parameters[1],\n ): ReturnType[] {\n return allGeneratedPositionsFor(this._map, originalPosition);\n }\n\n hasContentsOfAllSources(): boolean {\n if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) {\n return false;\n }\n\n for (const content of this.sourcesContent) {\n if (content == null) {\n return false;\n }\n }\n\n return true;\n }\n\n sourceContentFor(source: string, nullOnMissing?: boolean): string | null {\n const sourceContent = sourceContentFor(this._map, source);\n if (sourceContent != null) {\n return sourceContent;\n }\n\n if (nullOnMissing) {\n return null;\n }\n throw new Error(`\"${source}\" is not in the SourceMap.`);\n }\n\n eachMapping(\n callback: Parameters[1],\n context?: any /*, order?: number*/,\n ): void {\n // order is ignored as @jridgewell/trace-map doesn't implement it\n eachMapping(this._map, context ? callback.bind(context) : callback);\n }\n\n destroy() {\n // noop.\n }\n}\n\nexport class SourceMapGenerator {\n private declare _map: GenMapping;\n\n constructor(opts: ConstructorParameters[0] | GenMapping) {\n // TODO :: should this be duck-typed ?\n this._map = opts instanceof GenMapping ? opts : new GenMapping(opts);\n }\n\n static fromSourceMap(consumer: SourceMapConsumer) {\n return new SourceMapGenerator(fromMap(consumer));\n }\n\n addMapping(mapping: Parameters[1]): ReturnType {\n maybeAddMapping(this._map, mapping);\n }\n\n setSourceContent(\n source: Parameters[1],\n content: Parameters[2],\n ): ReturnType {\n setSourceContent(this._map, source, content);\n }\n\n toJSON(): ReturnType {\n return toEncodedMap(this._map);\n }\n\n toString(): string {\n return JSON.stringify(this.toJSON());\n }\n\n toDecodedMap(): ReturnType {\n return toDecodedMap(this._map);\n }\n}\n"],"names":["AnyMap","encodedMappings","originalPositionFor","generatedPositionFor","allGeneratedPositionsFor","sourceContentFor","eachMapping","GenMapping","fromMap","maybeAddMapping","setSourceContent","toEncodedMap","toDecodedMap"],"mappings":";;;;;;;MA6Ba,iBAAiB;IAS5B,YAAY,GAA4C,EAAE,MAAoC;QAC5F,MAAM,KAAK,IAAI,IAAI,CAAC,IAAI,GAAG,IAAIA,mBAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;QAEpD,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,eAAe,CAAC;QACrC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;KAC9B;IAED,OAAO,aAAa,CAAC,GAAuB,EAAE,MAAoC;;;QAGhF,IAAI,GAAG,CAAC,YAAY,EAAE;YACpB,OAAO,IAAI,iBAAiB,CAAC,GAAG,CAAC,YAAY,EAA6B,EAAE,MAAM,CAAC,CAAC;SACrF;;QAGD,OAAO,IAAI,iBAAiB,CAAC,GAAG,CAAC,MAAM,EAA6B,EAAE,MAAM,CAAC,CAAC;KAC/E;IAED,IAAI,QAAQ;QACV,OAAOC,4BAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACnC;IAED,mBAAmB,CACjB,MAAiD;QAEjD,OAAOC,gCAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KAC/C;IAED,oBAAoB,CAClB,gBAA4D;QAE5D,OAAOC,iCAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;KAC1D;IAED,wBAAwB,CACtB,gBAA4D;QAE5D,OAAOC,qCAAwB,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;KAC9D;IAED,uBAAuB;QACrB,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,KAAK,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YAC9E,OAAO,KAAK,CAAC;SACd;QAED,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,cAAc,EAAE;YACzC,IAAI,OAAO,IAAI,IAAI,EAAE;gBACnB,OAAO,KAAK,CAAC;aACd;SACF;QAED,OAAO,IAAI,CAAC;KACb;IAED,gBAAgB,CAAC,MAAc,EAAE,aAAuB;QACtD,MAAM,aAAa,GAAGC,6BAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC1D,IAAI,aAAa,IAAI,IAAI,EAAE;YACzB,OAAO,aAAa,CAAC;SACtB;QAED,IAAI,aAAa,EAAE;YACjB,OAAO,IAAI,CAAC;SACb;QACD,MAAM,IAAI,KAAK,CAAC,IAAI,MAAM,4BAA4B,CAAC,CAAC;KACzD;IAED,WAAW,CACT,QAA2C,EAC3C,OAAa;;QAGbC,wBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;KACrE;IAED,OAAO;;KAEN;CACF;MAEY,kBAAkB;IAG7B,YAAY,IAA8D;;QAExE,IAAI,CAAC,IAAI,GAAG,IAAI,YAAYC,qBAAU,GAAG,IAAI,GAAG,IAAIA,qBAAU,CAAC,IAAI,CAAC,CAAC;KACtE;IAED,OAAO,aAAa,CAAC,QAA2B;QAC9C,OAAO,IAAI,kBAAkB,CAACC,kBAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;KAClD;IAED,UAAU,CAAC,OAA8C;QACvDC,0BAAe,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACrC;IAED,gBAAgB,CACd,MAA8C,EAC9C,OAA+C;QAE/CC,2BAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9C;IAED,MAAM;QACJ,OAAOC,uBAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAChC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;KACtC;IAED,YAAY;QACV,OAAOC,uBAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAChC;;;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/source-map/dist/source-map.mjs b/web/static/node_modules/@jridgewell/source-map/dist/source-map.mjs deleted file mode 100644 index 0d7b29cb..00000000 --- a/web/static/node_modules/@jridgewell/source-map/dist/source-map.mjs +++ /dev/null @@ -1,90 +0,0 @@ -import { AnyMap, encodedMappings, originalPositionFor, generatedPositionFor, allGeneratedPositionsFor, sourceContentFor, eachMapping } from '@jridgewell/trace-mapping'; -import { GenMapping, fromMap, maybeAddMapping, setSourceContent, toEncodedMap, toDecodedMap } from '@jridgewell/gen-mapping'; - -class SourceMapConsumer { - constructor(map, mapUrl) { - const trace = (this._map = new AnyMap(map, mapUrl)); - this.file = trace.file; - this.names = trace.names; - this.sourceRoot = trace.sourceRoot; - this.sources = trace.resolvedSources; - this.sourcesContent = trace.sourcesContent; - this.version = trace.version; - } - static fromSourceMap(map, mapUrl) { - // This is more performant if we receive - // a @jridgewell/source-map SourceMapGenerator - if (map.toDecodedMap) { - return new SourceMapConsumer(map.toDecodedMap(), mapUrl); - } - // This is a fallback for `source-map` and `source-map-js` - return new SourceMapConsumer(map.toJSON(), mapUrl); - } - get mappings() { - return encodedMappings(this._map); - } - originalPositionFor(needle) { - return originalPositionFor(this._map, needle); - } - generatedPositionFor(originalPosition) { - return generatedPositionFor(this._map, originalPosition); - } - allGeneratedPositionsFor(originalPosition) { - return allGeneratedPositionsFor(this._map, originalPosition); - } - hasContentsOfAllSources() { - if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) { - return false; - } - for (const content of this.sourcesContent) { - if (content == null) { - return false; - } - } - return true; - } - sourceContentFor(source, nullOnMissing) { - const sourceContent = sourceContentFor(this._map, source); - if (sourceContent != null) { - return sourceContent; - } - if (nullOnMissing) { - return null; - } - throw new Error(`"${source}" is not in the SourceMap.`); - } - eachMapping(callback, context /*, order?: number*/) { - // order is ignored as @jridgewell/trace-map doesn't implement it - eachMapping(this._map, context ? callback.bind(context) : callback); - } - destroy() { - // noop. - } -} -class SourceMapGenerator { - constructor(opts) { - // TODO :: should this be duck-typed ? - this._map = opts instanceof GenMapping ? opts : new GenMapping(opts); - } - static fromSourceMap(consumer) { - return new SourceMapGenerator(fromMap(consumer)); - } - addMapping(mapping) { - maybeAddMapping(this._map, mapping); - } - setSourceContent(source, content) { - setSourceContent(this._map, source, content); - } - toJSON() { - return toEncodedMap(this._map); - } - toString() { - return JSON.stringify(this.toJSON()); - } - toDecodedMap() { - return toDecodedMap(this._map); - } -} - -export { SourceMapConsumer, SourceMapGenerator }; -//# sourceMappingURL=source-map.mjs.map diff --git a/web/static/node_modules/@jridgewell/source-map/dist/source-map.mjs.map b/web/static/node_modules/@jridgewell/source-map/dist/source-map.mjs.map deleted file mode 100644 index 91d9aa2f..00000000 --- a/web/static/node_modules/@jridgewell/source-map/dist/source-map.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"source-map.mjs","sources":["../../src/source-map.ts"],"sourcesContent":["import {\n AnyMap,\n originalPositionFor,\n generatedPositionFor,\n allGeneratedPositionsFor,\n eachMapping,\n encodedMappings,\n sourceContentFor,\n} from '@jridgewell/trace-mapping';\nimport {\n GenMapping,\n maybeAddMapping,\n toDecodedMap,\n toEncodedMap,\n setSourceContent,\n fromMap,\n} from '@jridgewell/gen-mapping';\n\nimport type {\n TraceMap,\n SourceMapInput,\n SectionedSourceMapInput,\n DecodedSourceMap,\n} from '@jridgewell/trace-mapping';\nexport type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap };\n\nimport type { Mapping, EncodedSourceMap } from '@jridgewell/gen-mapping';\nexport type { Mapping, EncodedSourceMap };\n\nexport class SourceMapConsumer {\n private declare _map: TraceMap;\n declare file: TraceMap['file'];\n declare names: TraceMap['names'];\n declare sourceRoot: TraceMap['sourceRoot'];\n declare sources: TraceMap['sources'];\n declare sourcesContent: TraceMap['sourcesContent'];\n declare version: TraceMap['version'];\n\n constructor(map: ConstructorParameters[0], mapUrl: Parameters[1]) {\n const trace = (this._map = new AnyMap(map, mapUrl));\n\n this.file = trace.file;\n this.names = trace.names;\n this.sourceRoot = trace.sourceRoot;\n this.sources = trace.resolvedSources;\n this.sourcesContent = trace.sourcesContent;\n this.version = trace.version;\n }\n\n static fromSourceMap(map: SourceMapGenerator, mapUrl: Parameters[1]) {\n // This is more performant if we receive\n // a @jridgewell/source-map SourceMapGenerator\n if (map.toDecodedMap) {\n return new SourceMapConsumer(map.toDecodedMap() as SectionedSourceMapInput, mapUrl);\n }\n\n // This is a fallback for `source-map` and `source-map-js`\n return new SourceMapConsumer(map.toJSON() as SectionedSourceMapInput, mapUrl);\n }\n\n get mappings(): string {\n return encodedMappings(this._map);\n }\n\n originalPositionFor(\n needle: Parameters[1],\n ): ReturnType {\n return originalPositionFor(this._map, needle);\n }\n\n generatedPositionFor(\n originalPosition: Parameters[1],\n ): ReturnType {\n return generatedPositionFor(this._map, originalPosition);\n }\n\n allGeneratedPositionsFor(\n originalPosition: Parameters[1],\n ): ReturnType[] {\n return allGeneratedPositionsFor(this._map, originalPosition);\n }\n\n hasContentsOfAllSources(): boolean {\n if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) {\n return false;\n }\n\n for (const content of this.sourcesContent) {\n if (content == null) {\n return false;\n }\n }\n\n return true;\n }\n\n sourceContentFor(source: string, nullOnMissing?: boolean): string | null {\n const sourceContent = sourceContentFor(this._map, source);\n if (sourceContent != null) {\n return sourceContent;\n }\n\n if (nullOnMissing) {\n return null;\n }\n throw new Error(`\"${source}\" is not in the SourceMap.`);\n }\n\n eachMapping(\n callback: Parameters[1],\n context?: any /*, order?: number*/,\n ): void {\n // order is ignored as @jridgewell/trace-map doesn't implement it\n eachMapping(this._map, context ? callback.bind(context) : callback);\n }\n\n destroy() {\n // noop.\n }\n}\n\nexport class SourceMapGenerator {\n private declare _map: GenMapping;\n\n constructor(opts: ConstructorParameters[0] | GenMapping) {\n // TODO :: should this be duck-typed ?\n this._map = opts instanceof GenMapping ? opts : new GenMapping(opts);\n }\n\n static fromSourceMap(consumer: SourceMapConsumer) {\n return new SourceMapGenerator(fromMap(consumer));\n }\n\n addMapping(mapping: Parameters[1]): ReturnType {\n maybeAddMapping(this._map, mapping);\n }\n\n setSourceContent(\n source: Parameters[1],\n content: Parameters[2],\n ): ReturnType {\n setSourceContent(this._map, source, content);\n }\n\n toJSON(): ReturnType {\n return toEncodedMap(this._map);\n }\n\n toString(): string {\n return JSON.stringify(this.toJSON());\n }\n\n toDecodedMap(): ReturnType {\n return toDecodedMap(this._map);\n }\n}\n"],"names":[],"mappings":";;;MA6Ba,iBAAiB;IAS5B,YAAY,GAA4C,EAAE,MAAoC;QAC5F,MAAM,KAAK,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;QAEpD,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,eAAe,CAAC;QACrC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;KAC9B;IAED,OAAO,aAAa,CAAC,GAAuB,EAAE,MAAoC;;;QAGhF,IAAI,GAAG,CAAC,YAAY,EAAE;YACpB,OAAO,IAAI,iBAAiB,CAAC,GAAG,CAAC,YAAY,EAA6B,EAAE,MAAM,CAAC,CAAC;SACrF;;QAGD,OAAO,IAAI,iBAAiB,CAAC,GAAG,CAAC,MAAM,EAA6B,EAAE,MAAM,CAAC,CAAC;KAC/E;IAED,IAAI,QAAQ;QACV,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACnC;IAED,mBAAmB,CACjB,MAAiD;QAEjD,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KAC/C;IAED,oBAAoB,CAClB,gBAA4D;QAE5D,OAAO,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;KAC1D;IAED,wBAAwB,CACtB,gBAA4D;QAE5D,OAAO,wBAAwB,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;KAC9D;IAED,uBAAuB;QACrB,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,KAAK,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YAC9E,OAAO,KAAK,CAAC;SACd;QAED,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,cAAc,EAAE;YACzC,IAAI,OAAO,IAAI,IAAI,EAAE;gBACnB,OAAO,KAAK,CAAC;aACd;SACF;QAED,OAAO,IAAI,CAAC;KACb;IAED,gBAAgB,CAAC,MAAc,EAAE,aAAuB;QACtD,MAAM,aAAa,GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC1D,IAAI,aAAa,IAAI,IAAI,EAAE;YACzB,OAAO,aAAa,CAAC;SACtB;QAED,IAAI,aAAa,EAAE;YACjB,OAAO,IAAI,CAAC;SACb;QACD,MAAM,IAAI,KAAK,CAAC,IAAI,MAAM,4BAA4B,CAAC,CAAC;KACzD;IAED,WAAW,CACT,QAA2C,EAC3C,OAAa;;QAGb,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;KACrE;IAED,OAAO;;KAEN;CACF;MAEY,kBAAkB;IAG7B,YAAY,IAA8D;;QAExE,IAAI,CAAC,IAAI,GAAG,IAAI,YAAY,UAAU,GAAG,IAAI,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;KACtE;IAED,OAAO,aAAa,CAAC,QAA2B;QAC9C,OAAO,IAAI,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;KAClD;IAED,UAAU,CAAC,OAA8C;QACvD,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACrC;IAED,gBAAgB,CACd,MAA8C,EAC9C,OAA+C;QAE/C,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9C;IAED,MAAM;QACJ,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAChC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;KACtC;IAED,YAAY;QACV,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAChC;;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/source-map/dist/source-map.umd.js b/web/static/node_modules/@jridgewell/source-map/dist/source-map.umd.js deleted file mode 100644 index 70594c2a..00000000 --- a/web/static/node_modules/@jridgewell/source-map/dist/source-map.umd.js +++ /dev/null @@ -1,1242 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourceMap = {})); -})(this, (function (exports) { 'use strict'; - - const comma = ','.charCodeAt(0); - const semicolon = ';'.charCodeAt(0); - const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - const intToChar = new Uint8Array(64); // 64 possible chars. - const charToInt = new Uint8Array(128); // z is 122 in ASCII - for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; - } - // Provide a fallback for older environments. - const td = typeof TextDecoder !== 'undefined' - ? /* #__PURE__ */ new TextDecoder() - : typeof Buffer !== 'undefined' - ? { - decode(buf) { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - }, - } - : { - decode(buf) { - let out = ''; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - }, - }; - function decode(mappings) { - const state = new Int32Array(5); - const decoded = []; - let index = 0; - do { - const semi = indexOf(mappings, index); - const line = []; - let sorted = true; - let lastCol = 0; - state[0] = 0; - for (let i = index; i < semi; i++) { - let seg; - i = decodeInteger(mappings, i, state, 0); // genColumn - const col = state[0]; - if (col < lastCol) - sorted = false; - lastCol = col; - if (hasMoreVlq(mappings, i, semi)) { - i = decodeInteger(mappings, i, state, 1); // sourcesIndex - i = decodeInteger(mappings, i, state, 2); // sourceLine - i = decodeInteger(mappings, i, state, 3); // sourceColumn - if (hasMoreVlq(mappings, i, semi)) { - i = decodeInteger(mappings, i, state, 4); // namesIndex - seg = [col, state[1], state[2], state[3], state[4]]; - } - else { - seg = [col, state[1], state[2], state[3]]; - } - } - else { - seg = [col]; - } - line.push(seg); - } - if (!sorted) - sort(line); - decoded.push(line); - index = semi + 1; - } while (index <= mappings.length); - return decoded; - } - function indexOf(mappings, index) { - const idx = mappings.indexOf(';', index); - return idx === -1 ? mappings.length : idx; - } - function decodeInteger(mappings, pos, state, j) { - let value = 0; - let shift = 0; - let integer = 0; - do { - const c = mappings.charCodeAt(pos++); - integer = charToInt[c]; - value |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - const shouldNegate = value & 1; - value >>>= 1; - if (shouldNegate) { - value = -0x80000000 | -value; - } - state[j] += value; - return pos; - } - function hasMoreVlq(mappings, i, length) { - if (i >= length) - return false; - return mappings.charCodeAt(i) !== comma; - } - function sort(line) { - line.sort(sortComparator$1); - } - function sortComparator$1(a, b) { - return a[0] - b[0]; - } - function encode(decoded) { - const state = new Int32Array(5); - const bufLength = 1024 * 16; - const subLength = bufLength - 36; - const buf = new Uint8Array(bufLength); - const sub = buf.subarray(0, subLength); - let pos = 0; - let out = ''; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) { - if (pos === bufLength) { - out += td.decode(buf); - pos = 0; - } - buf[pos++] = semicolon; - } - if (line.length === 0) - continue; - state[0] = 0; - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - // We can push up to 5 ints, each int can take at most 7 chars, and we - // may push a comma. - if (pos > subLength) { - out += td.decode(sub); - buf.copyWithin(0, subLength, pos); - pos -= subLength; - } - if (j > 0) - buf[pos++] = comma; - pos = encodeInteger(buf, pos, state, segment, 0); // genColumn - if (segment.length === 1) - continue; - pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex - pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine - pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn - if (segment.length === 4) - continue; - pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex - } - } - return out + td.decode(buf.subarray(0, pos)); - } - function encodeInteger(buf, pos, state, segment, j) { - const next = segment[j]; - let num = next - state[j]; - state[j] = next; - num = num < 0 ? (-num << 1) | 1 : num << 1; - do { - let clamped = num & 0b011111; - num >>>= 5; - if (num > 0) - clamped |= 0b100000; - buf[pos++] = intToChar[clamped]; - } while (num > 0); - return pos; - } - - // Matches the scheme of a URL, eg "http://" - const schemeRegex = /^[\w+.-]+:\/\//; - /** - * Matches the parts of a URL: - * 1. Scheme, including ":", guaranteed. - * 2. User/password, including "@", optional. - * 3. Host, guaranteed. - * 4. Port, including ":", optional. - * 5. Path, including "/", optional. - * 6. Query, including "?", optional. - * 7. Hash, including "#", optional. - */ - const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; - /** - * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start - * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). - * - * 1. Host, optional. - * 2. Path, which may include "/", guaranteed. - * 3. Query, including "?", optional. - * 4. Hash, including "#", optional. - */ - const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; - function isAbsoluteUrl(input) { - return schemeRegex.test(input); - } - function isSchemeRelativeUrl(input) { - return input.startsWith('//'); - } - function isAbsolutePath(input) { - return input.startsWith('/'); - } - function isFileUrl(input) { - return input.startsWith('file:'); - } - function isRelative(input) { - return /^[.?#]/.test(input); - } - function parseAbsoluteUrl(input) { - const match = urlRegex.exec(input); - return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); - } - function parseFileUrl(input) { - const match = fileRegex.exec(input); - const path = match[2]; - return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); - } - function makeUrl(scheme, user, host, port, path, query, hash) { - return { - scheme, - user, - host, - port, - path, - query, - hash, - type: 7 /* Absolute */, - }; - } - function parseUrl(input) { - if (isSchemeRelativeUrl(input)) { - const url = parseAbsoluteUrl('http:' + input); - url.scheme = ''; - url.type = 6 /* SchemeRelative */; - return url; - } - if (isAbsolutePath(input)) { - const url = parseAbsoluteUrl('http://foo.com' + input); - url.scheme = ''; - url.host = ''; - url.type = 5 /* AbsolutePath */; - return url; - } - if (isFileUrl(input)) - return parseFileUrl(input); - if (isAbsoluteUrl(input)) - return parseAbsoluteUrl(input); - const url = parseAbsoluteUrl('http://foo.com/' + input); - url.scheme = ''; - url.host = ''; - url.type = input - ? input.startsWith('?') - ? 3 /* Query */ - : input.startsWith('#') - ? 2 /* Hash */ - : 4 /* RelativePath */ - : 1 /* Empty */; - return url; - } - function stripPathFilename(path) { - // If a path ends with a parent directory "..", then it's a relative path with excess parent - // paths. It's not a file, so we can't strip it. - if (path.endsWith('/..')) - return path; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); - } - function mergePaths(url, base) { - normalizePath(base, base.type); - // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative - // path). - if (url.path === '/') { - url.path = base.path; - } - else { - // Resolution happens relative to the base path's directory, not the file. - url.path = stripPathFilename(base.path) + url.path; - } - } - /** - * The path can have empty directories "//", unneeded parents "foo/..", or current directory - * "foo/.". We need to normalize to a standard representation. - */ - function normalizePath(url, type) { - const rel = type <= 4 /* RelativePath */; - const pieces = url.path.split('/'); - // We need to preserve the first piece always, so that we output a leading slash. The item at - // pieces[0] is an empty string. - let pointer = 1; - // Positive is the number of real directories we've output, used for popping a parent directory. - // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". - let positive = 0; - // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will - // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a - // real directory, we won't need to append, unless the other conditions happen again. - let addTrailingSlash = false; - for (let i = 1; i < pieces.length; i++) { - const piece = pieces[i]; - // An empty directory, could be a trailing slash, or just a double "//" in the path. - if (!piece) { - addTrailingSlash = true; - continue; - } - // If we encounter a real directory, then we don't need to append anymore. - addTrailingSlash = false; - // A current directory, which we can always drop. - if (piece === '.') - continue; - // A parent directory, we need to see if there are any real directories we can pop. Else, we - // have an excess of parents, and we'll need to keep the "..". - if (piece === '..') { - if (positive) { - addTrailingSlash = true; - positive--; - pointer--; - } - else if (rel) { - // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute - // URL, protocol relative URL, or an absolute path, we don't need to keep excess. - pieces[pointer++] = piece; - } - continue; - } - // We've encountered a real directory. Move it to the next insertion pointer, which accounts for - // any popped or dropped directories. - pieces[pointer++] = piece; - positive++; - } - let path = ''; - for (let i = 1; i < pointer; i++) { - path += '/' + pieces[i]; - } - if (!path || (addTrailingSlash && !path.endsWith('/..'))) { - path += '/'; - } - url.path = path; - } - /** - * Attempts to resolve `input` URL/path relative to `base`. - */ - function resolve$1(input, base) { - if (!input && !base) - return ''; - const url = parseUrl(input); - let inputType = url.type; - if (base && inputType !== 7 /* Absolute */) { - const baseUrl = parseUrl(base); - const baseType = baseUrl.type; - switch (inputType) { - case 1 /* Empty */: - url.hash = baseUrl.hash; - // fall through - case 2 /* Hash */: - url.query = baseUrl.query; - // fall through - case 3 /* Query */: - case 4 /* RelativePath */: - mergePaths(url, baseUrl); - // fall through - case 5 /* AbsolutePath */: - // The host, user, and port are joined, you can't copy one without the others. - url.user = baseUrl.user; - url.host = baseUrl.host; - url.port = baseUrl.port; - // fall through - case 6 /* SchemeRelative */: - // The input doesn't have a schema at least, so we need to copy at least that over. - url.scheme = baseUrl.scheme; - } - if (baseType > inputType) - inputType = baseType; - } - normalizePath(url, inputType); - const queryHash = url.query + url.hash; - switch (inputType) { - // This is impossible, because of the empty checks at the start of the function. - // case UrlType.Empty: - case 2 /* Hash */: - case 3 /* Query */: - return queryHash; - case 4 /* RelativePath */: { - // The first char is always a "/", and we need it to be relative. - const path = url.path.slice(1); - if (!path) - return queryHash || '.'; - if (isRelative(base || input) && !isRelative(path)) { - // If base started with a leading ".", or there is no base and input started with a ".", - // then we need to ensure that the relative path starts with a ".". We don't know if - // relative starts with a "..", though, so check before prepending. - return './' + path + queryHash; - } - return path + queryHash; - } - case 5 /* AbsolutePath */: - return url.path + queryHash; - default: - return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; - } - } - - function resolve(input, base) { - // The base is always treated as a directory, if it's not empty. - // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 - // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 - if (base && !base.endsWith('/')) - base += '/'; - return resolve$1(input, base); - } - - /** - * Removes everything after the last "/", but leaves the slash. - */ - function stripFilename(path) { - if (!path) - return ''; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); - } - - const COLUMN$1 = 0; - const SOURCES_INDEX$1 = 1; - const SOURCE_LINE$1 = 2; - const SOURCE_COLUMN$1 = 3; - const NAMES_INDEX$1 = 4; - const REV_GENERATED_LINE = 1; - const REV_GENERATED_COLUMN = 2; - - function maybeSort(mappings, owned) { - const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); - if (unsortedIndex === mappings.length) - return mappings; - // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If - // not, we do not want to modify the consumer's input array. - if (!owned) - mappings = mappings.slice(); - for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { - mappings[i] = sortSegments(mappings[i], owned); - } - return mappings; - } - function nextUnsortedSegmentLine(mappings, start) { - for (let i = start; i < mappings.length; i++) { - if (!isSorted(mappings[i])) - return i; - } - return mappings.length; - } - function isSorted(line) { - for (let j = 1; j < line.length; j++) { - if (line[j][COLUMN$1] < line[j - 1][COLUMN$1]) { - return false; - } - } - return true; - } - function sortSegments(line, owned) { - if (!owned) - line = line.slice(); - return line.sort(sortComparator); - } - function sortComparator(a, b) { - return a[COLUMN$1] - b[COLUMN$1]; - } - - let found = false; - /** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ - function binarySearch(haystack, needle, low, high) { - while (low <= high) { - const mid = low + ((high - low) >> 1); - const cmp = haystack[mid][COLUMN$1] - needle; - if (cmp === 0) { - found = true; - return mid; - } - if (cmp < 0) { - low = mid + 1; - } - else { - high = mid - 1; - } - } - found = false; - return low - 1; - } - function upperBound(haystack, needle, index) { - for (let i = index + 1; i < haystack.length; index = i++) { - if (haystack[i][COLUMN$1] !== needle) - break; - } - return index; - } - function lowerBound(haystack, needle, index) { - for (let i = index - 1; i >= 0; index = i--) { - if (haystack[i][COLUMN$1] !== needle) - break; - } - return index; - } - function memoizedState() { - return { - lastKey: -1, - lastNeedle: -1, - lastIndex: -1, - }; - } - /** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ - function memoizedBinarySearch(haystack, needle, state, key) { - const { lastKey, lastNeedle, lastIndex } = state; - let low = 0; - let high = haystack.length - 1; - if (key === lastKey) { - if (needle === lastNeedle) { - found = lastIndex !== -1 && haystack[lastIndex][COLUMN$1] === needle; - return lastIndex; - } - if (needle >= lastNeedle) { - // lastIndex may be -1 if the previous needle was not found. - low = lastIndex === -1 ? 0 : lastIndex; - } - else { - high = lastIndex; - } - } - state.lastKey = key; - state.lastNeedle = needle; - return (state.lastIndex = binarySearch(haystack, needle, low, high)); - } - - // Rebuilds the original source files, with mappings that are ordered by source line/column instead - // of generated line/column. - function buildBySources(decoded, memos) { - const sources = memos.map(buildNullArray); - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - if (seg.length === 1) - continue; - const sourceIndex = seg[SOURCES_INDEX$1]; - const sourceLine = seg[SOURCE_LINE$1]; - const sourceColumn = seg[SOURCE_COLUMN$1]; - const originalSource = sources[sourceIndex]; - const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); - const memo = memos[sourceIndex]; - // The binary search either found a match, or it found the left-index just before where the - // segment should go. Either way, we want to insert after that. And there may be multiple - // generated segments associated with an original location, so there may need to move several - // indexes before we find where we need to insert. - let index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); - memo.lastIndex = ++index; - insert$1(originalLine, index, [sourceColumn, i, seg[COLUMN$1]]); - } - } - return sources; - } - function insert$1(array, index, value) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; - } - // Null arrays allow us to use ordered index keys without actually allocating contiguous memory like - // a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. - // Numeric properties on objects are magically sorted in ascending order by the engine regardless of - // the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending - // order when iterating with for-in. - function buildNullArray() { - return { __proto__: null }; - } - - const AnyMap = function (map, mapUrl) { - const parsed = parse(map); - if (!('sections' in parsed)) { - return new TraceMap(parsed, mapUrl); - } - const mappings = []; - const sources = []; - const sourcesContent = []; - const names = []; - const ignoreList = []; - recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, ignoreList, 0, 0, Infinity, Infinity); - const joined = { - version: 3, - file: parsed.file, - names, - sources, - sourcesContent, - mappings, - ignoreList, - }; - return presortedDecodedMap(joined); - }; - function parse(map) { - return typeof map === 'string' ? JSON.parse(map) : map; - } - function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { - const { sections } = input; - for (let i = 0; i < sections.length; i++) { - const { map, offset } = sections[i]; - let sl = stopLine; - let sc = stopColumn; - if (i + 1 < sections.length) { - const nextOffset = sections[i + 1].offset; - sl = Math.min(stopLine, lineOffset + nextOffset.line); - if (sl === stopLine) { - sc = Math.min(stopColumn, columnOffset + nextOffset.column); - } - else if (sl < stopLine) { - sc = columnOffset + nextOffset.column; - } - } - addSection(map, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset + offset.line, columnOffset + offset.column, sl, sc); - } - } - function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { - const parsed = parse(input); - if ('sections' in parsed) - return recurse(...arguments); - const map = new TraceMap(parsed, mapUrl); - const sourcesOffset = sources.length; - const namesOffset = names.length; - const decoded = decodedMappings(map); - const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; - append(sources, resolvedSources); - append(names, map.names); - if (contents) - append(sourcesContent, contents); - else - for (let i = 0; i < resolvedSources.length; i++) - sourcesContent.push(null); - if (ignores) - for (let i = 0; i < ignores.length; i++) - ignoreList.push(ignores[i] + sourcesOffset); - for (let i = 0; i < decoded.length; i++) { - const lineI = lineOffset + i; - // We can only add so many lines before we step into the range that the next section's map - // controls. When we get to the last line, then we'll start checking the segments to see if - // they've crossed into the column range. But it may not have any columns that overstep, so we - // still need to check that we don't overstep lines, too. - if (lineI > stopLine) - return; - // The out line may already exist in mappings (if we're continuing the line started by a - // previous section). Or, we may have jumped ahead several lines to start this section. - const out = getLine$1(mappings, lineI); - // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the - // map can be multiple lines), it doesn't. - const cOffset = i === 0 ? columnOffset : 0; - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const column = cOffset + seg[COLUMN$1]; - // If this segment steps into the column range that the next section's map controls, we need - // to stop early. - if (lineI === stopLine && column >= stopColumn) - return; - if (seg.length === 1) { - out.push([column]); - continue; - } - const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX$1]; - const sourceLine = seg[SOURCE_LINE$1]; - const sourceColumn = seg[SOURCE_COLUMN$1]; - out.push(seg.length === 4 - ? [column, sourcesIndex, sourceLine, sourceColumn] - : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX$1]]); - } - } - } - function append(arr, other) { - for (let i = 0; i < other.length; i++) - arr.push(other[i]); - } - function getLine$1(arr, index) { - for (let i = arr.length; i <= index; i++) - arr[i] = []; - return arr[index]; - } - - const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; - const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; - const LEAST_UPPER_BOUND = -1; - const GREATEST_LOWER_BOUND = 1; - class TraceMap { - constructor(map, mapUrl) { - const isString = typeof map === 'string'; - if (!isString && map._decodedMemo) - return map; - const parsed = (isString ? JSON.parse(map) : map); - const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; - this.version = version; - this.file = file; - this.names = names || []; - this.sourceRoot = sourceRoot; - this.sources = sources; - this.sourcesContent = sourcesContent; - this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined; - const from = resolve(sourceRoot || '', stripFilename(mapUrl)); - this.resolvedSources = sources.map((s) => resolve(s || '', from)); - const { mappings } = parsed; - if (typeof mappings === 'string') { - this._encoded = mappings; - this._decoded = undefined; - } - else { - this._encoded = undefined; - this._decoded = maybeSort(mappings, isString); - } - this._decodedMemo = memoizedState(); - this._bySources = undefined; - this._bySourceMemos = undefined; - } - } - /** - * Typescript doesn't allow friend access to private fields, so this just casts the map into a type - * with public access modifiers. - */ - function cast$2(map) { - return map; - } - /** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ - function encodedMappings(map) { - var _a; - var _b; - return ((_a = (_b = cast$2(map))._encoded) !== null && _a !== void 0 ? _a : (_b._encoded = encode(cast$2(map)._decoded))); - } - /** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ - function decodedMappings(map) { - var _a; - return ((_a = cast$2(map))._decoded || (_a._decoded = decode(cast$2(map)._encoded))); - } - /** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ - function originalPositionFor(map, needle) { - let { line, column, bias } = needle; - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const decoded = decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return OMapping(null, null, null, null); - const segments = decoded[line]; - const index = traceSegmentInternal(segments, cast$2(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); - if (index === -1) - return OMapping(null, null, null, null); - const segment = segments[index]; - if (segment.length === 1) - return OMapping(null, null, null, null); - const { names, resolvedSources } = map; - return OMapping(resolvedSources[segment[SOURCES_INDEX$1]], segment[SOURCE_LINE$1] + 1, segment[SOURCE_COLUMN$1], segment.length === 5 ? names[segment[NAMES_INDEX$1]] : null); - } - /** - * Finds the generated line/column position of the provided source/line/column source position. - */ - function generatedPositionFor(map, needle) { - const { source, line, column, bias } = needle; - return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); - } - /** - * Finds all generated line/column positions of the provided source/line/column source position. - */ - function allGeneratedPositionsFor(map, needle) { - const { source, line, column, bias } = needle; - // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit. - return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); - } - /** - * Iterates each mapping in generated position order. - */ - function eachMapping(map, cb) { - const decoded = decodedMappings(map); - const { names, resolvedSources } = map; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generatedLine = i + 1; - const generatedColumn = seg[0]; - let source = null; - let originalLine = null; - let originalColumn = null; - let name = null; - if (seg.length !== 1) { - source = resolvedSources[seg[1]]; - originalLine = seg[2] + 1; - originalColumn = seg[3]; - } - if (seg.length === 5) - name = names[seg[4]]; - cb({ - generatedLine, - generatedColumn, - source, - originalLine, - originalColumn, - name, - }); - } - } - } - function sourceIndex(map, source) { - const { sources, resolvedSources } = map; - let index = sources.indexOf(source); - if (index === -1) - index = resolvedSources.indexOf(source); - return index; - } - /** - * Retrieves the source content for a particular source, if its found. Returns null if not. - */ - function sourceContentFor(map, source) { - const { sourcesContent } = map; - if (sourcesContent == null) - return null; - const index = sourceIndex(map, source); - return index === -1 ? null : sourcesContent[index]; - } - /** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ - function presortedDecodedMap(map, mapUrl) { - const tracer = new TraceMap(clone(map, []), mapUrl); - cast$2(tracer)._decoded = map.mappings; - return tracer; - } - function clone(map, mappings) { - return { - version: map.version, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings, - ignoreList: map.ignoreList || map.x_google_ignoreList, - }; - } - function OMapping(source, line, column, name) { - return { source, line, column, name }; - } - function GMapping(line, column) { - return { line, column }; - } - function traceSegmentInternal(segments, memo, line, column, bias) { - let index = memoizedBinarySearch(segments, column, memo, line); - if (found) { - index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); - } - else if (bias === LEAST_UPPER_BOUND) - index++; - if (index === -1 || index === segments.length) - return -1; - return index; - } - function sliceGeneratedPositions(segments, memo, line, column, bias) { - let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); - // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in - // insertion order) segment that matched. Even if we did respect the bias when tracing, we would - // still need to call `lowerBound()` to find the first segment, which is slower than just looking - // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the - // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to - // match LEAST_UPPER_BOUND. - if (!found && bias === LEAST_UPPER_BOUND) - min++; - if (min === -1 || min === segments.length) - return []; - // We may have found the segment that started at an earlier column. If this is the case, then we - // need to slice all generated segments that match _that_ column, because all such segments span - // to our desired column. - const matchedColumn = found ? column : segments[min][COLUMN$1]; - // The binary search is not guaranteed to find the lower bound when a match wasn't found. - if (!found) - min = lowerBound(segments, matchedColumn, min); - const max = upperBound(segments, matchedColumn, min); - const result = []; - for (; min <= max; min++) { - const segment = segments[min]; - result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); - } - return result; - } - function generatedPosition(map, source, line, column, bias, all) { - var _a; - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const { sources, resolvedSources } = map; - let sourceIndex = sources.indexOf(source); - if (sourceIndex === -1) - sourceIndex = resolvedSources.indexOf(source); - if (sourceIndex === -1) - return all ? [] : GMapping(null, null); - const generated = ((_a = cast$2(map))._bySources || (_a._bySources = buildBySources(decodedMappings(map), (cast$2(map)._bySourceMemos = sources.map(memoizedState))))); - const segments = generated[sourceIndex][line]; - if (segments == null) - return all ? [] : GMapping(null, null); - const memo = cast$2(map)._bySourceMemos[sourceIndex]; - if (all) - return sliceGeneratedPositions(segments, memo, line, column, bias); - const index = traceSegmentInternal(segments, memo, line, column, bias); - if (index === -1) - return GMapping(null, null); - const segment = segments[index]; - return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); - } - - /** - * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the - * index of the `key` in the backing array. - * - * This is designed to allow synchronizing a second array with the contents of the backing array, - * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, - * and there are never duplicates. - */ - class SetArray { - constructor() { - this._indexes = { __proto__: null }; - this.array = []; - } - } - /** - * Typescript doesn't allow friend access to private fields, so this just casts the set into a type - * with public access modifiers. - */ - function cast$1(set) { - return set; - } - /** - * Gets the index associated with `key` in the backing array, if it is already present. - */ - function get(setarr, key) { - return cast$1(setarr)._indexes[key]; - } - /** - * Puts `key` into the backing array, if it is not already present. Returns - * the index of the `key` in the backing array. - */ - function put(setarr, key) { - // The key may or may not be present. If it is present, it's a number. - const index = get(setarr, key); - if (index !== undefined) - return index; - const { array, _indexes: indexes } = cast$1(setarr); - const length = array.push(key); - return (indexes[key] = length - 1); - } - - const COLUMN = 0; - const SOURCES_INDEX = 1; - const SOURCE_LINE = 2; - const SOURCE_COLUMN = 3; - const NAMES_INDEX = 4; - - const NO_NAME = -1; - /** - * Provides the state to generate a sourcemap. - */ - class GenMapping { - constructor({ file, sourceRoot } = {}) { - this._names = new SetArray(); - this._sources = new SetArray(); - this._sourcesContent = []; - this._mappings = []; - this.file = file; - this.sourceRoot = sourceRoot; - this._ignoreList = new SetArray(); - } - } - /** - * Typescript doesn't allow friend access to private fields, so this just casts the map into a type - * with public access modifiers. - */ - function cast(map) { - return map; - } - /** - * Same as `addMapping`, but will only add the mapping if it generates useful information in the - * resulting map. This only works correctly if mappings are added **in order**, meaning you should - * not add a mapping with a lower generated line/column than one that came before. - */ - const maybeAddMapping = (map, mapping) => { - return addMappingInternal(true, map, mapping); - }; - /** - * Adds/removes the content of the source file to the source map. - */ - function setSourceContent(map, source, content) { - const { _sources: sources, _sourcesContent: sourcesContent } = cast(map); - const index = put(sources, source); - sourcesContent[index] = content; - } - /** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ - function toDecodedMap(map) { - const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList, } = cast(map); - removeEmptyFinalLines(mappings); - return { - version: 3, - file: map.file || undefined, - names: names.array, - sourceRoot: map.sourceRoot || undefined, - sources: sources.array, - sourcesContent, - mappings, - ignoreList: ignoreList.array, - }; - } - /** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ - function toEncodedMap(map) { - const decoded = toDecodedMap(map); - return Object.assign(Object.assign({}, decoded), { mappings: encode(decoded.mappings) }); - } - /** - * Constructs a new GenMapping, using the already present mappings of the input. - */ - function fromMap(input) { - const map = new TraceMap(input); - const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); - putAll(cast(gen)._names, map.names); - putAll(cast(gen)._sources, map.sources); - cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); - cast(gen)._mappings = decodedMappings(map); - if (map.ignoreList) - putAll(cast(gen)._ignoreList, map.ignoreList); - return gen; - } - // This split declaration is only so that terser can elminiate the static initialization block. - function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { - const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = cast(map); - const line = getLine(mappings, genLine); - const index = getColumnIndex(line, genColumn); - if (!source) { - if (skipable && skipSourceless(line, index)) - return; - return insert(line, index, [genColumn]); - } - const sourcesIndex = put(sources, source); - const namesIndex = name ? put(names, name) : NO_NAME; - if (sourcesIndex === sourcesContent.length) - sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null; - if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { - return; - } - return insert(line, index, name - ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] - : [genColumn, sourcesIndex, sourceLine, sourceColumn]); - } - function getLine(mappings, index) { - for (let i = mappings.length; i <= index; i++) { - mappings[i] = []; - } - return mappings[index]; - } - function getColumnIndex(line, genColumn) { - let index = line.length; - for (let i = index - 1; i >= 0; index = i--) { - const current = line[i]; - if (genColumn >= current[COLUMN]) - break; - } - return index; - } - function insert(array, index, value) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; - } - function removeEmptyFinalLines(mappings) { - const { length } = mappings; - let len = length; - for (let i = len - 1; i >= 0; len = i, i--) { - if (mappings[i].length > 0) - break; - } - if (len < length) - mappings.length = len; - } - function putAll(setarr, array) { - for (let i = 0; i < array.length; i++) - put(setarr, array[i]); - } - function skipSourceless(line, index) { - // The start of a line is already sourceless, so adding a sourceless segment to the beginning - // doesn't generate any useful information. - if (index === 0) - return true; - const prev = line[index - 1]; - // If the previous segment is also sourceless, then adding another sourceless segment doesn't - // genrate any new information. Else, this segment will end the source/named segment and point to - // a sourceless position, which is useful. - return prev.length === 1; - } - function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { - // A source/named segment at the start of a line gives position at that genColumn - if (index === 0) - return false; - const prev = line[index - 1]; - // If the previous segment is sourceless, then we're transitioning to a source. - if (prev.length === 1) - return false; - // If the previous segment maps to the exact same source position, then this segment doesn't - // provide any new position information. - return (sourcesIndex === prev[SOURCES_INDEX] && - sourceLine === prev[SOURCE_LINE] && - sourceColumn === prev[SOURCE_COLUMN] && - namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)); - } - function addMappingInternal(skipable, map, mapping) { - const { generated, source, original, name, content } = mapping; - if (!source) { - return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null); - } - return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content); - } - - class SourceMapConsumer { - constructor(map, mapUrl) { - const trace = (this._map = new AnyMap(map, mapUrl)); - this.file = trace.file; - this.names = trace.names; - this.sourceRoot = trace.sourceRoot; - this.sources = trace.resolvedSources; - this.sourcesContent = trace.sourcesContent; - this.version = trace.version; - } - static fromSourceMap(map, mapUrl) { - // This is more performant if we receive - // a @jridgewell/source-map SourceMapGenerator - if (map.toDecodedMap) { - return new SourceMapConsumer(map.toDecodedMap(), mapUrl); - } - // This is a fallback for `source-map` and `source-map-js` - return new SourceMapConsumer(map.toJSON(), mapUrl); - } - get mappings() { - return encodedMappings(this._map); - } - originalPositionFor(needle) { - return originalPositionFor(this._map, needle); - } - generatedPositionFor(originalPosition) { - return generatedPositionFor(this._map, originalPosition); - } - allGeneratedPositionsFor(originalPosition) { - return allGeneratedPositionsFor(this._map, originalPosition); - } - hasContentsOfAllSources() { - if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) { - return false; - } - for (const content of this.sourcesContent) { - if (content == null) { - return false; - } - } - return true; - } - sourceContentFor(source, nullOnMissing) { - const sourceContent = sourceContentFor(this._map, source); - if (sourceContent != null) { - return sourceContent; - } - if (nullOnMissing) { - return null; - } - throw new Error(`"${source}" is not in the SourceMap.`); - } - eachMapping(callback, context /*, order?: number*/) { - // order is ignored as @jridgewell/trace-map doesn't implement it - eachMapping(this._map, context ? callback.bind(context) : callback); - } - destroy() { - // noop. - } - } - class SourceMapGenerator { - constructor(opts) { - // TODO :: should this be duck-typed ? - this._map = opts instanceof GenMapping ? opts : new GenMapping(opts); - } - static fromSourceMap(consumer) { - return new SourceMapGenerator(fromMap(consumer)); - } - addMapping(mapping) { - maybeAddMapping(this._map, mapping); - } - setSourceContent(source, content) { - setSourceContent(this._map, source, content); - } - toJSON() { - return toEncodedMap(this._map); - } - toString() { - return JSON.stringify(this.toJSON()); - } - toDecodedMap() { - return toDecodedMap(this._map); - } - } - - exports.SourceMapConsumer = SourceMapConsumer; - exports.SourceMapGenerator = SourceMapGenerator; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); -//# sourceMappingURL=source-map.umd.js.map diff --git a/web/static/node_modules/@jridgewell/source-map/dist/source-map.umd.js.map b/web/static/node_modules/@jridgewell/source-map/dist/source-map.umd.js.map deleted file mode 100644 index 01dcb27f..00000000 --- a/web/static/node_modules/@jridgewell/source-map/dist/source-map.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"source-map.umd.js","sources":["../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs","../node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs","../node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs","../node_modules/@jridgewell/set-array/dist/set-array.mjs","../node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs","../../src/source-map.ts"],"sourcesContent":["const comma = ','.charCodeAt(0);\nconst semicolon = ';'.charCodeAt(0);\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n// Provide a fallback for older environments.\nconst td = typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf) {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\nfunction decode(mappings) {\n const state = new Int32Array(5);\n const decoded = [];\n let index = 0;\n do {\n const semi = indexOf(mappings, index);\n const line = [];\n let sorted = true;\n let lastCol = 0;\n state[0] = 0;\n for (let i = index; i < semi; i++) {\n let seg;\n i = decodeInteger(mappings, i, state, 0); // genColumn\n const col = state[0];\n if (col < lastCol)\n sorted = false;\n lastCol = col;\n if (hasMoreVlq(mappings, i, semi)) {\n i = decodeInteger(mappings, i, state, 1); // sourcesIndex\n i = decodeInteger(mappings, i, state, 2); // sourceLine\n i = decodeInteger(mappings, i, state, 3); // sourceColumn\n if (hasMoreVlq(mappings, i, semi)) {\n i = decodeInteger(mappings, i, state, 4); // namesIndex\n seg = [col, state[1], state[2], state[3], state[4]];\n }\n else {\n seg = [col, state[1], state[2], state[3]];\n }\n }\n else {\n seg = [col];\n }\n line.push(seg);\n }\n if (!sorted)\n sort(line);\n decoded.push(line);\n index = semi + 1;\n } while (index <= mappings.length);\n return decoded;\n}\nfunction indexOf(mappings, index) {\n const idx = mappings.indexOf(';', index);\n return idx === -1 ? mappings.length : idx;\n}\nfunction decodeInteger(mappings, pos, state, j) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = mappings.charCodeAt(pos++);\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n state[j] += value;\n return pos;\n}\nfunction hasMoreVlq(mappings, i, length) {\n if (i >= length)\n return false;\n return mappings.charCodeAt(i) !== comma;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const state = new Int32Array(5);\n const bufLength = 1024 * 16;\n const subLength = bufLength - 36;\n const buf = new Uint8Array(bufLength);\n const sub = buf.subarray(0, subLength);\n let pos = 0;\n let out = '';\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) {\n if (pos === bufLength) {\n out += td.decode(buf);\n pos = 0;\n }\n buf[pos++] = semicolon;\n }\n if (line.length === 0)\n continue;\n state[0] = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n // We can push up to 5 ints, each int can take at most 7 chars, and we\n // may push a comma.\n if (pos > subLength) {\n out += td.decode(sub);\n buf.copyWithin(0, subLength, pos);\n pos -= subLength;\n }\n if (j > 0)\n buf[pos++] = comma;\n pos = encodeInteger(buf, pos, state, segment, 0); // genColumn\n if (segment.length === 1)\n continue;\n pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex\n pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine\n pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn\n if (segment.length === 4)\n continue;\n pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex\n }\n }\n return out + td.decode(buf.subarray(0, pos));\n}\nfunction encodeInteger(buf, pos, state, segment, j) {\n const next = segment[j];\n let num = next - state[j];\n state[j] = next;\n num = num < 0 ? (-num << 1) | 1 : num << 1;\n do {\n let clamped = num & 0b011111;\n num >>>= 5;\n if (num > 0)\n clamped |= 0b100000;\n buf[pos++] = intToChar[clamped];\n } while (num > 0);\n return pos;\n}\n\nexport { decode, encode };\n//# sourceMappingURL=sourcemap-codec.mjs.map\n","// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\nfunction isAbsoluteUrl(input) {\n return schemeRegex.test(input);\n}\nfunction isSchemeRelativeUrl(input) {\n return input.startsWith('//');\n}\nfunction isAbsolutePath(input) {\n return input.startsWith('/');\n}\nfunction isFileUrl(input) {\n return input.startsWith('file:');\n}\nfunction isRelative(input) {\n return /^[.?#]/.test(input);\n}\nfunction parseAbsoluteUrl(input) {\n const match = urlRegex.exec(input);\n return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');\n}\nfunction parseFileUrl(input) {\n const match = fileRegex.exec(input);\n const path = match[2];\n return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');\n}\nfunction makeUrl(scheme, user, host, port, path, query, hash) {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: 7 /* Absolute */,\n };\n}\nfunction parseUrl(input) {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = 6 /* SchemeRelative */;\n return url;\n }\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = 5 /* AbsolutePath */;\n return url;\n }\n if (isFileUrl(input))\n return parseFileUrl(input);\n if (isAbsoluteUrl(input))\n return parseAbsoluteUrl(input);\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? 3 /* Query */\n : input.startsWith('#')\n ? 2 /* Hash */\n : 4 /* RelativePath */\n : 1 /* Empty */;\n return url;\n}\nfunction stripPathFilename(path) {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..'))\n return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\nfunction mergePaths(url, base) {\n normalizePath(base, base.type);\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n }\n else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url, type) {\n const rel = type <= 4 /* RelativePath */;\n const pieces = url.path.split('/');\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n // A current directory, which we can always drop.\n if (piece === '.')\n continue;\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n }\n else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nfunction resolve(input, base) {\n if (!input && !base)\n return '';\n const url = parseUrl(input);\n let inputType = url.type;\n if (base && inputType !== 7 /* Absolute */) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n switch (inputType) {\n case 1 /* Empty */:\n url.hash = baseUrl.hash;\n // fall through\n case 2 /* Hash */:\n url.query = baseUrl.query;\n // fall through\n case 3 /* Query */:\n case 4 /* RelativePath */:\n mergePaths(url, baseUrl);\n // fall through\n case 5 /* AbsolutePath */:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n case 6 /* SchemeRelative */:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType)\n inputType = baseType;\n }\n normalizePath(url, inputType);\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n case 2 /* Hash */:\n case 3 /* Query */:\n return queryHash;\n case 4 /* RelativePath */: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n if (!path)\n return queryHash || '.';\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n return path + queryHash;\n }\n case 5 /* AbsolutePath */:\n return url.path + queryHash;\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n\nexport { resolve as default };\n//# sourceMappingURL=resolve-uri.mjs.map\n","import { encode, decode } from '@jridgewell/sourcemap-codec';\nimport resolveUri from '@jridgewell/resolve-uri';\n\nfunction resolve(input, base) {\n // The base is always treated as a directory, if it's not empty.\n // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327\n // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401\n if (base && !base.endsWith('/'))\n base += '/';\n return resolveUri(input, base);\n}\n\n/**\n * Removes everything after the last \"/\", but leaves the slash.\n */\nfunction stripFilename(path) {\n if (!path)\n return '';\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nconst COLUMN = 0;\nconst SOURCES_INDEX = 1;\nconst SOURCE_LINE = 2;\nconst SOURCE_COLUMN = 3;\nconst NAMES_INDEX = 4;\nconst REV_GENERATED_LINE = 1;\nconst REV_GENERATED_COLUMN = 2;\n\nfunction maybeSort(mappings, owned) {\n const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);\n if (unsortedIndex === mappings.length)\n return mappings;\n // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If\n // not, we do not want to modify the consumer's input array.\n if (!owned)\n mappings = mappings.slice();\n for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {\n mappings[i] = sortSegments(mappings[i], owned);\n }\n return mappings;\n}\nfunction nextUnsortedSegmentLine(mappings, start) {\n for (let i = start; i < mappings.length; i++) {\n if (!isSorted(mappings[i]))\n return i;\n }\n return mappings.length;\n}\nfunction isSorted(line) {\n for (let j = 1; j < line.length; j++) {\n if (line[j][COLUMN] < line[j - 1][COLUMN]) {\n return false;\n }\n }\n return true;\n}\nfunction sortSegments(line, owned) {\n if (!owned)\n line = line.slice();\n return line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[COLUMN] - b[COLUMN];\n}\n\nlet found = false;\n/**\n * A binary search implementation that returns the index if a match is found.\n * If no match is found, then the left-index (the index associated with the item that comes just\n * before the desired index) is returned. To maintain proper sort order, a splice would happen at\n * the next index:\n *\n * ```js\n * const array = [1, 3];\n * const needle = 2;\n * const index = binarySearch(array, needle, (item, needle) => item - needle);\n *\n * assert.equal(index, 0);\n * array.splice(index + 1, 0, needle);\n * assert.deepEqual(array, [1, 2, 3]);\n * ```\n */\nfunction binarySearch(haystack, needle, low, high) {\n while (low <= high) {\n const mid = low + ((high - low) >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n if (cmp === 0) {\n found = true;\n return mid;\n }\n if (cmp < 0) {\n low = mid + 1;\n }\n else {\n high = mid - 1;\n }\n }\n found = false;\n return low - 1;\n}\nfunction upperBound(haystack, needle, index) {\n for (let i = index + 1; i < haystack.length; index = i++) {\n if (haystack[i][COLUMN] !== needle)\n break;\n }\n return index;\n}\nfunction lowerBound(haystack, needle, index) {\n for (let i = index - 1; i >= 0; index = i--) {\n if (haystack[i][COLUMN] !== needle)\n break;\n }\n return index;\n}\nfunction memoizedState() {\n return {\n lastKey: -1,\n lastNeedle: -1,\n lastIndex: -1,\n };\n}\n/**\n * This overly complicated beast is just to record the last tested line/column and the resulting\n * index, allowing us to skip a few tests if mappings are monotonically increasing.\n */\nfunction memoizedBinarySearch(haystack, needle, state, key) {\n const { lastKey, lastNeedle, lastIndex } = state;\n let low = 0;\n let high = haystack.length - 1;\n if (key === lastKey) {\n if (needle === lastNeedle) {\n found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;\n return lastIndex;\n }\n if (needle >= lastNeedle) {\n // lastIndex may be -1 if the previous needle was not found.\n low = lastIndex === -1 ? 0 : lastIndex;\n }\n else {\n high = lastIndex;\n }\n }\n state.lastKey = key;\n state.lastNeedle = needle;\n return (state.lastIndex = binarySearch(haystack, needle, low, high));\n}\n\n// Rebuilds the original source files, with mappings that are ordered by source line/column instead\n// of generated line/column.\nfunction buildBySources(decoded, memos) {\n const sources = memos.map(buildNullArray);\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n if (seg.length === 1)\n continue;\n const sourceIndex = seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n const originalSource = sources[sourceIndex];\n const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = []));\n const memo = memos[sourceIndex];\n // The binary search either found a match, or it found the left-index just before where the\n // segment should go. Either way, we want to insert after that. And there may be multiple\n // generated segments associated with an original location, so there may need to move several\n // indexes before we find where we need to insert.\n let index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine));\n memo.lastIndex = ++index;\n insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]);\n }\n }\n return sources;\n}\nfunction insert(array, index, value) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n}\n// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like\n// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations.\n// Numeric properties on objects are magically sorted in ascending order by the engine regardless of\n// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending\n// order when iterating with for-in.\nfunction buildNullArray() {\n return { __proto__: null };\n}\n\nconst AnyMap = function (map, mapUrl) {\n const parsed = parse(map);\n if (!('sections' in parsed)) {\n return new TraceMap(parsed, mapUrl);\n }\n const mappings = [];\n const sources = [];\n const sourcesContent = [];\n const names = [];\n const ignoreList = [];\n recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, ignoreList, 0, 0, Infinity, Infinity);\n const joined = {\n version: 3,\n file: parsed.file,\n names,\n sources,\n sourcesContent,\n mappings,\n ignoreList,\n };\n return presortedDecodedMap(joined);\n};\nfunction parse(map) {\n return typeof map === 'string' ? JSON.parse(map) : map;\n}\nfunction recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {\n const { sections } = input;\n for (let i = 0; i < sections.length; i++) {\n const { map, offset } = sections[i];\n let sl = stopLine;\n let sc = stopColumn;\n if (i + 1 < sections.length) {\n const nextOffset = sections[i + 1].offset;\n sl = Math.min(stopLine, lineOffset + nextOffset.line);\n if (sl === stopLine) {\n sc = Math.min(stopColumn, columnOffset + nextOffset.column);\n }\n else if (sl < stopLine) {\n sc = columnOffset + nextOffset.column;\n }\n }\n addSection(map, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset + offset.line, columnOffset + offset.column, sl, sc);\n }\n}\nfunction addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {\n const parsed = parse(input);\n if ('sections' in parsed)\n return recurse(...arguments);\n const map = new TraceMap(parsed, mapUrl);\n const sourcesOffset = sources.length;\n const namesOffset = names.length;\n const decoded = decodedMappings(map);\n const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;\n append(sources, resolvedSources);\n append(names, map.names);\n if (contents)\n append(sourcesContent, contents);\n else\n for (let i = 0; i < resolvedSources.length; i++)\n sourcesContent.push(null);\n if (ignores)\n for (let i = 0; i < ignores.length; i++)\n ignoreList.push(ignores[i] + sourcesOffset);\n for (let i = 0; i < decoded.length; i++) {\n const lineI = lineOffset + i;\n // We can only add so many lines before we step into the range that the next section's map\n // controls. When we get to the last line, then we'll start checking the segments to see if\n // they've crossed into the column range. But it may not have any columns that overstep, so we\n // still need to check that we don't overstep lines, too.\n if (lineI > stopLine)\n return;\n // The out line may already exist in mappings (if we're continuing the line started by a\n // previous section). Or, we may have jumped ahead several lines to start this section.\n const out = getLine(mappings, lineI);\n // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the\n // map can be multiple lines), it doesn't.\n const cOffset = i === 0 ? columnOffset : 0;\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const column = cOffset + seg[COLUMN];\n // If this segment steps into the column range that the next section's map controls, we need\n // to stop early.\n if (lineI === stopLine && column >= stopColumn)\n return;\n if (seg.length === 1) {\n out.push([column]);\n continue;\n }\n const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n out.push(seg.length === 4\n ? [column, sourcesIndex, sourceLine, sourceColumn]\n : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]);\n }\n }\n}\nfunction append(arr, other) {\n for (let i = 0; i < other.length; i++)\n arr.push(other[i]);\n}\nfunction getLine(arr, index) {\n for (let i = arr.length; i <= index; i++)\n arr[i] = [];\n return arr[index];\n}\n\nconst LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';\nconst COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';\nconst LEAST_UPPER_BOUND = -1;\nconst GREATEST_LOWER_BOUND = 1;\nclass TraceMap {\n constructor(map, mapUrl) {\n const isString = typeof map === 'string';\n if (!isString && map._decodedMemo)\n return map;\n const parsed = (isString ? JSON.parse(map) : map);\n const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;\n this.version = version;\n this.file = file;\n this.names = names || [];\n this.sourceRoot = sourceRoot;\n this.sources = sources;\n this.sourcesContent = sourcesContent;\n this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined;\n const from = resolve(sourceRoot || '', stripFilename(mapUrl));\n this.resolvedSources = sources.map((s) => resolve(s || '', from));\n const { mappings } = parsed;\n if (typeof mappings === 'string') {\n this._encoded = mappings;\n this._decoded = undefined;\n }\n else {\n this._encoded = undefined;\n this._decoded = maybeSort(mappings, isString);\n }\n this._decodedMemo = memoizedState();\n this._bySources = undefined;\n this._bySourceMemos = undefined;\n }\n}\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\nfunction cast(map) {\n return map;\n}\n/**\n * Returns the encoded (VLQ string) form of the SourceMap's mappings field.\n */\nfunction encodedMappings(map) {\n var _a;\n var _b;\n return ((_a = (_b = cast(map))._encoded) !== null && _a !== void 0 ? _a : (_b._encoded = encode(cast(map)._decoded)));\n}\n/**\n * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.\n */\nfunction decodedMappings(map) {\n var _a;\n return ((_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded)));\n}\n/**\n * A low-level API to find the segment associated with a generated line/column (think, from a\n * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.\n */\nfunction traceSegment(map, line, column) {\n const decoded = decodedMappings(map);\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length)\n return null;\n const segments = decoded[line];\n const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, GREATEST_LOWER_BOUND);\n return index === -1 ? null : segments[index];\n}\n/**\n * A higher-level API to find the source/line/column associated with a generated line/column\n * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in\n * `source-map` library.\n */\nfunction originalPositionFor(map, needle) {\n let { line, column, bias } = needle;\n line--;\n if (line < 0)\n throw new Error(LINE_GTR_ZERO);\n if (column < 0)\n throw new Error(COL_GTR_EQ_ZERO);\n const decoded = decodedMappings(map);\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length)\n return OMapping(null, null, null, null);\n const segments = decoded[line];\n const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);\n if (index === -1)\n return OMapping(null, null, null, null);\n const segment = segments[index];\n if (segment.length === 1)\n return OMapping(null, null, null, null);\n const { names, resolvedSources } = map;\n return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);\n}\n/**\n * Finds the generated line/column position of the provided source/line/column source position.\n */\nfunction generatedPositionFor(map, needle) {\n const { source, line, column, bias } = needle;\n return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);\n}\n/**\n * Finds all generated line/column positions of the provided source/line/column source position.\n */\nfunction allGeneratedPositionsFor(map, needle) {\n const { source, line, column, bias } = needle;\n // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.\n return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);\n}\n/**\n * Iterates each mapping in generated position order.\n */\nfunction eachMapping(map, cb) {\n const decoded = decodedMappings(map);\n const { names, resolvedSources } = map;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const generatedLine = i + 1;\n const generatedColumn = seg[0];\n let source = null;\n let originalLine = null;\n let originalColumn = null;\n let name = null;\n if (seg.length !== 1) {\n source = resolvedSources[seg[1]];\n originalLine = seg[2] + 1;\n originalColumn = seg[3];\n }\n if (seg.length === 5)\n name = names[seg[4]];\n cb({\n generatedLine,\n generatedColumn,\n source,\n originalLine,\n originalColumn,\n name,\n });\n }\n }\n}\nfunction sourceIndex(map, source) {\n const { sources, resolvedSources } = map;\n let index = sources.indexOf(source);\n if (index === -1)\n index = resolvedSources.indexOf(source);\n return index;\n}\n/**\n * Retrieves the source content for a particular source, if its found. Returns null if not.\n */\nfunction sourceContentFor(map, source) {\n const { sourcesContent } = map;\n if (sourcesContent == null)\n return null;\n const index = sourceIndex(map, source);\n return index === -1 ? null : sourcesContent[index];\n}\n/**\n * Determines if the source is marked to ignore by the source map.\n */\nfunction isIgnored(map, source) {\n const { ignoreList } = map;\n if (ignoreList == null)\n return false;\n const index = sourceIndex(map, source);\n return index === -1 ? false : ignoreList.includes(index);\n}\n/**\n * A helper that skips sorting of the input map's mappings array, which can be expensive for larger\n * maps.\n */\nfunction presortedDecodedMap(map, mapUrl) {\n const tracer = new TraceMap(clone(map, []), mapUrl);\n cast(tracer)._decoded = map.mappings;\n return tracer;\n}\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nfunction decodedMap(map) {\n return clone(map, decodedMappings(map));\n}\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nfunction encodedMap(map) {\n return clone(map, encodedMappings(map));\n}\nfunction clone(map, mappings) {\n return {\n version: map.version,\n file: map.file,\n names: map.names,\n sourceRoot: map.sourceRoot,\n sources: map.sources,\n sourcesContent: map.sourcesContent,\n mappings,\n ignoreList: map.ignoreList || map.x_google_ignoreList,\n };\n}\nfunction OMapping(source, line, column, name) {\n return { source, line, column, name };\n}\nfunction GMapping(line, column) {\n return { line, column };\n}\nfunction traceSegmentInternal(segments, memo, line, column, bias) {\n let index = memoizedBinarySearch(segments, column, memo, line);\n if (found) {\n index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);\n }\n else if (bias === LEAST_UPPER_BOUND)\n index++;\n if (index === -1 || index === segments.length)\n return -1;\n return index;\n}\nfunction sliceGeneratedPositions(segments, memo, line, column, bias) {\n let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);\n // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in\n // insertion order) segment that matched. Even if we did respect the bias when tracing, we would\n // still need to call `lowerBound()` to find the first segment, which is slower than just looking\n // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the\n // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to\n // match LEAST_UPPER_BOUND.\n if (!found && bias === LEAST_UPPER_BOUND)\n min++;\n if (min === -1 || min === segments.length)\n return [];\n // We may have found the segment that started at an earlier column. If this is the case, then we\n // need to slice all generated segments that match _that_ column, because all such segments span\n // to our desired column.\n const matchedColumn = found ? column : segments[min][COLUMN];\n // The binary search is not guaranteed to find the lower bound when a match wasn't found.\n if (!found)\n min = lowerBound(segments, matchedColumn, min);\n const max = upperBound(segments, matchedColumn, min);\n const result = [];\n for (; min <= max; min++) {\n const segment = segments[min];\n result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));\n }\n return result;\n}\nfunction generatedPosition(map, source, line, column, bias, all) {\n var _a;\n line--;\n if (line < 0)\n throw new Error(LINE_GTR_ZERO);\n if (column < 0)\n throw new Error(COL_GTR_EQ_ZERO);\n const { sources, resolvedSources } = map;\n let sourceIndex = sources.indexOf(source);\n if (sourceIndex === -1)\n sourceIndex = resolvedSources.indexOf(source);\n if (sourceIndex === -1)\n return all ? [] : GMapping(null, null);\n const generated = ((_a = cast(map))._bySources || (_a._bySources = buildBySources(decodedMappings(map), (cast(map)._bySourceMemos = sources.map(memoizedState)))));\n const segments = generated[sourceIndex][line];\n if (segments == null)\n return all ? [] : GMapping(null, null);\n const memo = cast(map)._bySourceMemos[sourceIndex];\n if (all)\n return sliceGeneratedPositions(segments, memo, line, column, bias);\n const index = traceSegmentInternal(segments, memo, line, column, bias);\n if (index === -1)\n return GMapping(null, null);\n const segment = segments[index];\n return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);\n}\n\nexport { AnyMap, GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap, allGeneratedPositionsFor, decodedMap, decodedMappings, eachMapping, encodedMap, encodedMappings, generatedPositionFor, isIgnored, originalPositionFor, presortedDecodedMap, sourceContentFor, traceSegment };\n//# sourceMappingURL=trace-mapping.mjs.map\n","/**\n * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the\n * index of the `key` in the backing array.\n *\n * This is designed to allow synchronizing a second array with the contents of the backing array,\n * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,\n * and there are never duplicates.\n */\nclass SetArray {\n constructor() {\n this._indexes = { __proto__: null };\n this.array = [];\n }\n}\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the set into a type\n * with public access modifiers.\n */\nfunction cast(set) {\n return set;\n}\n/**\n * Gets the index associated with `key` in the backing array, if it is already present.\n */\nfunction get(setarr, key) {\n return cast(setarr)._indexes[key];\n}\n/**\n * Puts `key` into the backing array, if it is not already present. Returns\n * the index of the `key` in the backing array.\n */\nfunction put(setarr, key) {\n // The key may or may not be present. If it is present, it's a number.\n const index = get(setarr, key);\n if (index !== undefined)\n return index;\n const { array, _indexes: indexes } = cast(setarr);\n const length = array.push(key);\n return (indexes[key] = length - 1);\n}\n/**\n * Pops the last added item out of the SetArray.\n */\nfunction pop(setarr) {\n const { array, _indexes: indexes } = cast(setarr);\n if (array.length === 0)\n return;\n const last = array.pop();\n indexes[last] = undefined;\n}\n/**\n * Removes the key, if it exists in the set.\n */\nfunction remove(setarr, key) {\n const index = get(setarr, key);\n if (index === undefined)\n return;\n const { array, _indexes: indexes } = cast(setarr);\n for (let i = index + 1; i < array.length; i++) {\n const k = array[i];\n array[i - 1] = k;\n indexes[k]--;\n }\n indexes[key] = undefined;\n array.pop();\n}\n\nexport { SetArray, get, pop, put, remove };\n//# sourceMappingURL=set-array.mjs.map\n","import { SetArray, put, remove } from '@jridgewell/set-array';\nimport { encode } from '@jridgewell/sourcemap-codec';\nimport { TraceMap, decodedMappings } from '@jridgewell/trace-mapping';\n\nconst COLUMN = 0;\nconst SOURCES_INDEX = 1;\nconst SOURCE_LINE = 2;\nconst SOURCE_COLUMN = 3;\nconst NAMES_INDEX = 4;\n\nconst NO_NAME = -1;\n/**\n * Provides the state to generate a sourcemap.\n */\nclass GenMapping {\n constructor({ file, sourceRoot } = {}) {\n this._names = new SetArray();\n this._sources = new SetArray();\n this._sourcesContent = [];\n this._mappings = [];\n this.file = file;\n this.sourceRoot = sourceRoot;\n this._ignoreList = new SetArray();\n }\n}\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\nfunction cast(map) {\n return map;\n}\nfunction addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {\n return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content);\n}\nfunction addMapping(map, mapping) {\n return addMappingInternal(false, map, mapping);\n}\n/**\n * Same as `addSegment`, but will only add the segment if it generates useful information in the\n * resulting map. This only works correctly if segments are added **in order**, meaning you should\n * not add a segment with a lower generated line/column than one that came before.\n */\nconst maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {\n return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content);\n};\n/**\n * Same as `addMapping`, but will only add the mapping if it generates useful information in the\n * resulting map. This only works correctly if mappings are added **in order**, meaning you should\n * not add a mapping with a lower generated line/column than one that came before.\n */\nconst maybeAddMapping = (map, mapping) => {\n return addMappingInternal(true, map, mapping);\n};\n/**\n * Adds/removes the content of the source file to the source map.\n */\nfunction setSourceContent(map, source, content) {\n const { _sources: sources, _sourcesContent: sourcesContent } = cast(map);\n const index = put(sources, source);\n sourcesContent[index] = content;\n}\nfunction setIgnore(map, source, ignore = true) {\n const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map);\n const index = put(sources, source);\n if (index === sourcesContent.length)\n sourcesContent[index] = null;\n if (ignore)\n put(ignoreList, index);\n else\n remove(ignoreList, index);\n}\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nfunction toDecodedMap(map) {\n const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList, } = cast(map);\n removeEmptyFinalLines(mappings);\n return {\n version: 3,\n file: map.file || undefined,\n names: names.array,\n sourceRoot: map.sourceRoot || undefined,\n sources: sources.array,\n sourcesContent,\n mappings,\n ignoreList: ignoreList.array,\n };\n}\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nfunction toEncodedMap(map) {\n const decoded = toDecodedMap(map);\n return Object.assign(Object.assign({}, decoded), { mappings: encode(decoded.mappings) });\n}\n/**\n * Constructs a new GenMapping, using the already present mappings of the input.\n */\nfunction fromMap(input) {\n const map = new TraceMap(input);\n const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });\n putAll(cast(gen)._names, map.names);\n putAll(cast(gen)._sources, map.sources);\n cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);\n cast(gen)._mappings = decodedMappings(map);\n if (map.ignoreList)\n putAll(cast(gen)._ignoreList, map.ignoreList);\n return gen;\n}\n/**\n * Returns an array of high-level mapping objects for every recorded segment, which could then be\n * passed to the `source-map` library.\n */\nfunction allMappings(map) {\n const out = [];\n const { _mappings: mappings, _sources: sources, _names: names } = cast(map);\n for (let i = 0; i < mappings.length; i++) {\n const line = mappings[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const generated = { line: i + 1, column: seg[COLUMN] };\n let source = undefined;\n let original = undefined;\n let name = undefined;\n if (seg.length !== 1) {\n source = sources.array[seg[SOURCES_INDEX]];\n original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };\n if (seg.length === 5)\n name = names.array[seg[NAMES_INDEX]];\n }\n out.push({ generated, source, original, name });\n }\n }\n return out;\n}\n// This split declaration is only so that terser can elminiate the static initialization block.\nfunction addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {\n const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = cast(map);\n const line = getLine(mappings, genLine);\n const index = getColumnIndex(line, genColumn);\n if (!source) {\n if (skipable && skipSourceless(line, index))\n return;\n return insert(line, index, [genColumn]);\n }\n const sourcesIndex = put(sources, source);\n const namesIndex = name ? put(names, name) : NO_NAME;\n if (sourcesIndex === sourcesContent.length)\n sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null;\n if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {\n return;\n }\n return insert(line, index, name\n ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]\n : [genColumn, sourcesIndex, sourceLine, sourceColumn]);\n}\nfunction getLine(mappings, index) {\n for (let i = mappings.length; i <= index; i++) {\n mappings[i] = [];\n }\n return mappings[index];\n}\nfunction getColumnIndex(line, genColumn) {\n let index = line.length;\n for (let i = index - 1; i >= 0; index = i--) {\n const current = line[i];\n if (genColumn >= current[COLUMN])\n break;\n }\n return index;\n}\nfunction insert(array, index, value) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n}\nfunction removeEmptyFinalLines(mappings) {\n const { length } = mappings;\n let len = length;\n for (let i = len - 1; i >= 0; len = i, i--) {\n if (mappings[i].length > 0)\n break;\n }\n if (len < length)\n mappings.length = len;\n}\nfunction putAll(setarr, array) {\n for (let i = 0; i < array.length; i++)\n put(setarr, array[i]);\n}\nfunction skipSourceless(line, index) {\n // The start of a line is already sourceless, so adding a sourceless segment to the beginning\n // doesn't generate any useful information.\n if (index === 0)\n return true;\n const prev = line[index - 1];\n // If the previous segment is also sourceless, then adding another sourceless segment doesn't\n // genrate any new information. Else, this segment will end the source/named segment and point to\n // a sourceless position, which is useful.\n return prev.length === 1;\n}\nfunction skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {\n // A source/named segment at the start of a line gives position at that genColumn\n if (index === 0)\n return false;\n const prev = line[index - 1];\n // If the previous segment is sourceless, then we're transitioning to a source.\n if (prev.length === 1)\n return false;\n // If the previous segment maps to the exact same source position, then this segment doesn't\n // provide any new position information.\n return (sourcesIndex === prev[SOURCES_INDEX] &&\n sourceLine === prev[SOURCE_LINE] &&\n sourceColumn === prev[SOURCE_COLUMN] &&\n namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME));\n}\nfunction addMappingInternal(skipable, map, mapping) {\n const { generated, source, original, name, content } = mapping;\n if (!source) {\n return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null);\n }\n return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content);\n}\n\nexport { GenMapping, addMapping, addSegment, allMappings, fromMap, maybeAddMapping, maybeAddSegment, setIgnore, setSourceContent, toDecodedMap, toEncodedMap };\n//# sourceMappingURL=gen-mapping.mjs.map\n","import {\n AnyMap,\n originalPositionFor,\n generatedPositionFor,\n allGeneratedPositionsFor,\n eachMapping,\n encodedMappings,\n sourceContentFor,\n} from '@jridgewell/trace-mapping';\nimport {\n GenMapping,\n maybeAddMapping,\n toDecodedMap,\n toEncodedMap,\n setSourceContent,\n fromMap,\n} from '@jridgewell/gen-mapping';\n\nimport type {\n TraceMap,\n SourceMapInput,\n SectionedSourceMapInput,\n DecodedSourceMap,\n} from '@jridgewell/trace-mapping';\nexport type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap };\n\nimport type { Mapping, EncodedSourceMap } from '@jridgewell/gen-mapping';\nexport type { Mapping, EncodedSourceMap };\n\nexport class SourceMapConsumer {\n private declare _map: TraceMap;\n declare file: TraceMap['file'];\n declare names: TraceMap['names'];\n declare sourceRoot: TraceMap['sourceRoot'];\n declare sources: TraceMap['sources'];\n declare sourcesContent: TraceMap['sourcesContent'];\n declare version: TraceMap['version'];\n\n constructor(map: ConstructorParameters[0], mapUrl: Parameters[1]) {\n const trace = (this._map = new AnyMap(map, mapUrl));\n\n this.file = trace.file;\n this.names = trace.names;\n this.sourceRoot = trace.sourceRoot;\n this.sources = trace.resolvedSources;\n this.sourcesContent = trace.sourcesContent;\n this.version = trace.version;\n }\n\n static fromSourceMap(map: SourceMapGenerator, mapUrl: Parameters[1]) {\n // This is more performant if we receive\n // a @jridgewell/source-map SourceMapGenerator\n if (map.toDecodedMap) {\n return new SourceMapConsumer(map.toDecodedMap() as SectionedSourceMapInput, mapUrl);\n }\n\n // This is a fallback for `source-map` and `source-map-js`\n return new SourceMapConsumer(map.toJSON() as SectionedSourceMapInput, mapUrl);\n }\n\n get mappings(): string {\n return encodedMappings(this._map);\n }\n\n originalPositionFor(\n needle: Parameters[1],\n ): ReturnType {\n return originalPositionFor(this._map, needle);\n }\n\n generatedPositionFor(\n originalPosition: Parameters[1],\n ): ReturnType {\n return generatedPositionFor(this._map, originalPosition);\n }\n\n allGeneratedPositionsFor(\n originalPosition: Parameters[1],\n ): ReturnType[] {\n return allGeneratedPositionsFor(this._map, originalPosition);\n }\n\n hasContentsOfAllSources(): boolean {\n if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) {\n return false;\n }\n\n for (const content of this.sourcesContent) {\n if (content == null) {\n return false;\n }\n }\n\n return true;\n }\n\n sourceContentFor(source: string, nullOnMissing?: boolean): string | null {\n const sourceContent = sourceContentFor(this._map, source);\n if (sourceContent != null) {\n return sourceContent;\n }\n\n if (nullOnMissing) {\n return null;\n }\n throw new Error(`\"${source}\" is not in the SourceMap.`);\n }\n\n eachMapping(\n callback: Parameters[1],\n context?: any /*, order?: number*/,\n ): void {\n // order is ignored as @jridgewell/trace-map doesn't implement it\n eachMapping(this._map, context ? callback.bind(context) : callback);\n }\n\n destroy() {\n // noop.\n }\n}\n\nexport class SourceMapGenerator {\n private declare _map: GenMapping;\n\n constructor(opts: ConstructorParameters[0] | GenMapping) {\n // TODO :: should this be duck-typed ?\n this._map = opts instanceof GenMapping ? opts : new GenMapping(opts);\n }\n\n static fromSourceMap(consumer: SourceMapConsumer) {\n return new SourceMapGenerator(fromMap(consumer));\n }\n\n addMapping(mapping: Parameters[1]): ReturnType {\n maybeAddMapping(this._map, mapping);\n }\n\n setSourceContent(\n source: Parameters[1],\n content: Parameters[2],\n ): ReturnType {\n setSourceContent(this._map, source, content);\n }\n\n toJSON(): ReturnType {\n return toEncodedMap(this._map);\n }\n\n toString(): string {\n return JSON.stringify(this.toJSON());\n }\n\n toDecodedMap(): ReturnType {\n return toDecodedMap(this._map);\n }\n}\n"],"names":["sortComparator","resolve","resolveUri","COLUMN","SOURCES_INDEX","SOURCE_LINE","SOURCE_COLUMN","NAMES_INDEX","insert","getLine","cast"],"mappings":";;;;;;IAAA,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,kEAAkE,CAAC;IACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACvC,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAClC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACrB,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IACD;IACA,MAAM,EAAE,GAAG,OAAO,WAAW,KAAK,WAAW;IAC7C,sBAAsB,IAAI,WAAW,EAAE;IACvC,MAAM,OAAO,MAAM,KAAK,WAAW;IACnC,UAAU;IACV,YAAY,MAAM,CAAC,GAAG,EAAE;IACxB,gBAAgB,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IACpF,gBAAgB,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACtC,aAAa;IACb,SAAS;IACT,UAAU;IACV,YAAY,MAAM,CAAC,GAAG,EAAE;IACxB,gBAAgB,IAAI,GAAG,GAAG,EAAE,CAAC;IAC7B,gBAAgB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrD,oBAAoB,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,iBAAiB;IACjB,gBAAgB,OAAO,GAAG,CAAC;IAC3B,aAAa;IACb,SAAS,CAAC;IACV,SAAS,MAAM,CAAC,QAAQ,EAAE;IAC1B,IAAI,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IACpC,IAAI,MAAM,OAAO,GAAG,EAAE,CAAC;IACvB,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC;IAClB,IAAI,GAAG;IACP,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC9C,QAAQ,MAAM,IAAI,GAAG,EAAE,CAAC;IACxB,QAAQ,IAAI,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,IAAI,OAAO,GAAG,CAAC,CAAC;IACxB,QAAQ,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACrB,QAAQ,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;IAC3C,YAAY,IAAI,GAAG,CAAC;IACpB,YAAY,CAAC,GAAG,aAAa,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACrD,YAAY,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,YAAY,IAAI,GAAG,GAAG,OAAO;IAC7B,gBAAgB,MAAM,GAAG,KAAK,CAAC;IAC/B,YAAY,OAAO,GAAG,GAAG,CAAC;IAC1B,YAAY,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE;IAC/C,gBAAgB,CAAC,GAAG,aAAa,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACzD,gBAAgB,CAAC,GAAG,aAAa,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACzD,gBAAgB,CAAC,GAAG,aAAa,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACzD,gBAAgB,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE;IACnD,oBAAoB,CAAC,GAAG,aAAa,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC7D,oBAAoB,GAAG,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACxE,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB,GAAG,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9D,iBAAiB;IACjB,aAAa;IACb,iBAAiB;IACjB,gBAAgB,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,aAAa;IACb,YAAY,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,SAAS;IACT,QAAQ,IAAI,CAAC,MAAM;IACnB,YAAY,IAAI,CAAC,IAAI,CAAC,CAAC;IACvB,QAAQ,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,QAAQ,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC;IACzB,KAAK,QAAQ,KAAK,IAAI,QAAQ,CAAC,MAAM,EAAE;IACvC,IAAI,OAAO,OAAO,CAAC;IACnB,CAAC;IACD,SAAS,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE;IAClC,IAAI,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC7C,IAAI,OAAO,GAAG,KAAK,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,GAAG,CAAC;IAC9C,CAAC;IACD,SAAS,aAAa,CAAC,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;IAChD,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC;IAClB,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC;IAClB,IAAI,IAAI,OAAO,GAAG,CAAC,CAAC;IACpB,IAAI,GAAG;IACP,QAAQ,MAAM,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7C,QAAQ,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IAC/B,QAAQ,KAAK,IAAI,CAAC,OAAO,GAAG,EAAE,KAAK,KAAK,CAAC;IACzC,QAAQ,KAAK,IAAI,CAAC,CAAC;IACnB,KAAK,QAAQ,OAAO,GAAG,EAAE,EAAE;IAC3B,IAAI,MAAM,YAAY,GAAG,KAAK,GAAG,CAAC,CAAC;IACnC,IAAI,KAAK,MAAM,CAAC,CAAC;IACjB,IAAI,IAAI,YAAY,EAAE;IACtB,QAAQ,KAAK,GAAG,CAAC,UAAU,GAAG,CAAC,KAAK,CAAC;IACrC,KAAK;IACL,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC;IACtB,IAAI,OAAO,GAAG,CAAC;IACf,CAAC;IACD,SAAS,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE;IACzC,IAAI,IAAI,CAAC,IAAI,MAAM;IACnB,QAAQ,OAAO,KAAK,CAAC;IACrB,IAAI,OAAO,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC;IAC5C,CAAC;IACD,SAAS,IAAI,CAAC,IAAI,EAAE;IACpB,IAAI,IAAI,CAAC,IAAI,CAACA,gBAAc,CAAC,CAAC;IAC9B,CAAC;IACD,SAASA,gBAAc,CAAC,CAAC,EAAE,CAAC,EAAE;IAC9B,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;IACD,SAAS,MAAM,CAAC,OAAO,EAAE;IACzB,IAAI,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IACpC,IAAI,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;IAChC,IAAI,MAAM,SAAS,GAAG,SAAS,GAAG,EAAE,CAAC;IACrC,IAAI,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC;IAC1C,IAAI,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAC3C,IAAI,IAAI,GAAG,GAAG,CAAC,CAAC;IAChB,IAAI,IAAI,GAAG,GAAG,EAAE,CAAC;IACjB,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAC7C,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAChC,QAAQ,IAAI,CAAC,GAAG,CAAC,EAAE;IACnB,YAAY,IAAI,GAAG,KAAK,SAAS,EAAE;IACnC,gBAAgB,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACtC,gBAAgB,GAAG,GAAG,CAAC,CAAC;IACxB,aAAa;IACb,YAAY,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC;IACnC,SAAS;IACT,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;IAC7B,YAAY,SAAS;IACrB,QAAQ,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACrB,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAC9C,YAAY,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACpC;IACA;IACA,YAAY,IAAI,GAAG,GAAG,SAAS,EAAE;IACjC,gBAAgB,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACtC,gBAAgB,GAAG,CAAC,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;IAClD,gBAAgB,GAAG,IAAI,SAAS,CAAC;IACjC,aAAa;IACb,YAAY,IAAI,CAAC,GAAG,CAAC;IACrB,gBAAgB,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,KAAK,CAAC;IACnC,YAAY,GAAG,GAAG,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7D,YAAY,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;IACpC,gBAAgB,SAAS;IACzB,YAAY,GAAG,GAAG,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7D,YAAY,GAAG,GAAG,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7D,YAAY,GAAG,GAAG,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7D,YAAY,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;IACpC,gBAAgB,SAAS;IACzB,YAAY,GAAG,GAAG,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7D,SAAS;IACT,KAAK;IACL,IAAI,OAAO,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,SAAS,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE;IACpD,IAAI,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,IAAI,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACpB,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IAC/C,IAAI,GAAG;IACP,QAAQ,IAAI,OAAO,GAAG,GAAG,GAAG,QAAQ,CAAC;IACrC,QAAQ,GAAG,MAAM,CAAC,CAAC;IACnB,QAAQ,IAAI,GAAG,GAAG,CAAC;IACnB,YAAY,OAAO,IAAI,QAAQ,CAAC;IAChC,QAAQ,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IACxC,KAAK,QAAQ,GAAG,GAAG,CAAC,EAAE;IACtB,IAAI,OAAO,GAAG,CAAC;IACf;;IChKA;IACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;IACrC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;IAC5F;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAM,SAAS,GAAG,iEAAiE,CAAC;IACpF,SAAS,aAAa,CAAC,KAAK,EAAE;IAC9B,IAAI,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IACD,SAAS,mBAAmB,CAAC,KAAK,EAAE;IACpC,IAAI,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IACD,SAAS,cAAc,CAAC,KAAK,EAAE;IAC/B,IAAI,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IACD,SAAS,SAAS,CAAC,KAAK,EAAE;IAC1B,IAAI,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IACD,SAAS,UAAU,CAAC,KAAK,EAAE;IAC3B,IAAI,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IACD,SAAS,gBAAgB,CAAC,KAAK,EAAE;IACjC,IAAI,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,IAAI,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACxH,CAAC;IACD,SAAS,YAAY,CAAC,KAAK,EAAE;IAC7B,IAAI,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1B,IAAI,OAAO,OAAO,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9H,CAAC;IACD,SAAS,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;IAC9D,IAAI,OAAO;IACX,QAAQ,MAAM;IACd,QAAQ,IAAI;IACZ,QAAQ,IAAI;IACZ,QAAQ,IAAI;IACZ,QAAQ,IAAI;IACZ,QAAQ,KAAK;IACb,QAAQ,IAAI;IACZ,QAAQ,IAAI,EAAE,CAAC;IACf,KAAK,CAAC;IACN,CAAC;IACD,SAAS,QAAQ,CAAC,KAAK,EAAE;IACzB,IAAI,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;IACpC,QAAQ,MAAM,GAAG,GAAG,gBAAgB,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;IACtD,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;IACxB,QAAQ,GAAG,CAAC,IAAI,GAAG,CAAC,sBAAsB;IAC1C,QAAQ,OAAO,GAAG,CAAC;IACnB,KAAK;IACL,IAAI,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE;IAC/B,QAAQ,MAAM,GAAG,GAAG,gBAAgB,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;IAC/D,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;IACxB,QAAQ,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;IACtB,QAAQ,GAAG,CAAC,IAAI,GAAG,CAAC,oBAAoB;IACxC,QAAQ,OAAO,GAAG,CAAC;IACnB,KAAK;IACL,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC;IACxB,QAAQ,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IACnC,IAAI,IAAI,aAAa,CAAC,KAAK,CAAC;IAC5B,QAAQ,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACvC,IAAI,MAAM,GAAG,GAAG,gBAAgB,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;IAC5D,IAAI,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;IACpB,IAAI,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,GAAG,CAAC,IAAI,GAAG,KAAK;IACpB,UAAU,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;IAC/B,cAAc,CAAC;IACf,cAAc,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;IACnC,kBAAkB,CAAC;IACnB,kBAAkB,CAAC;IACnB,UAAU,CAAC,aAAa;IACxB,IAAI,OAAO,GAAG,CAAC;IACf,CAAC;IACD,SAAS,iBAAiB,CAAC,IAAI,EAAE;IACjC;IACA;IACA,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;IAC5B,QAAQ,OAAO,IAAI,CAAC;IACpB,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACxC,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IACpC,CAAC;IACD,SAAS,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE;IAC/B,IAAI,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC;IACA;IACA,IAAI,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,EAAE;IAC1B,QAAQ,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IAC7B,KAAK;IACL,SAAS;IACT;IACA,QAAQ,GAAG,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC;IAC3D,KAAK;IACL,CAAC;IACD;IACA;IACA;IACA;IACA,SAAS,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE;IAClC,IAAI,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,oBAAoB;IAC7C,IAAI,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACvC;IACA;IACA,IAAI,IAAI,OAAO,GAAG,CAAC,CAAC;IACpB;IACA;IACA,IAAI,IAAI,QAAQ,GAAG,CAAC,CAAC;IACrB;IACA;IACA;IACA,IAAI,IAAI,gBAAgB,GAAG,KAAK,CAAC;IACjC,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAC5C,QAAQ,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAChC;IACA,QAAQ,IAAI,CAAC,KAAK,EAAE;IACpB,YAAY,gBAAgB,GAAG,IAAI,CAAC;IACpC,YAAY,SAAS;IACrB,SAAS;IACT;IACA,QAAQ,gBAAgB,GAAG,KAAK,CAAC;IACjC;IACA,QAAQ,IAAI,KAAK,KAAK,GAAG;IACzB,YAAY,SAAS;IACrB;IACA;IACA,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;IAC5B,YAAY,IAAI,QAAQ,EAAE;IAC1B,gBAAgB,gBAAgB,GAAG,IAAI,CAAC;IACxC,gBAAgB,QAAQ,EAAE,CAAC;IAC3B,gBAAgB,OAAO,EAAE,CAAC;IAC1B,aAAa;IACb,iBAAiB,IAAI,GAAG,EAAE;IAC1B;IACA;IACA,gBAAgB,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC;IAC1C,aAAa;IACb,YAAY,SAAS;IACrB,SAAS;IACT;IACA;IACA,QAAQ,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC;IAClC,QAAQ,QAAQ,EAAE,CAAC;IACnB,KAAK;IACL,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;IACtC,QAAQ,IAAI,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAChC,KAAK;IACL,IAAI,IAAI,CAAC,IAAI,KAAK,gBAAgB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE;IAC9D,QAAQ,IAAI,IAAI,GAAG,CAAC;IACpB,KAAK;IACL,IAAI,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,CAAC;IACD;IACA;IACA;IACA,SAASC,SAAO,CAAC,KAAK,EAAE,IAAI,EAAE;IAC9B,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI;IACvB,QAAQ,OAAO,EAAE,CAAC;IAClB,IAAI,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,IAAI,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;IAC7B,IAAI,IAAI,IAAI,IAAI,SAAS,KAAK,CAAC,iBAAiB;IAChD,QAAQ,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvC,QAAQ,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IACtC,QAAQ,QAAQ,SAAS;IACzB,YAAY,KAAK,CAAC;IAClB,gBAAgB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IACxC;IACA,YAAY,KAAK,CAAC;IAClB,gBAAgB,GAAG,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAC1C;IACA,YAAY,KAAK,CAAC,aAAa;IAC/B,YAAY,KAAK,CAAC;IAClB,gBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACzC;IACA,YAAY,KAAK,CAAC;IAClB;IACA,gBAAgB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IACxC,gBAAgB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IACxC,gBAAgB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IACxC;IACA,YAAY,KAAK,CAAC;IAClB;IACA,gBAAgB,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC5C,SAAS;IACT,QAAQ,IAAI,QAAQ,GAAG,SAAS;IAChC,YAAY,SAAS,GAAG,QAAQ,CAAC;IACjC,KAAK;IACL,IAAI,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAClC,IAAI,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC;IAC3C,IAAI,QAAQ,SAAS;IACrB;IACA;IACA,QAAQ,KAAK,CAAC,YAAY;IAC1B,QAAQ,KAAK,CAAC;IACd,YAAY,OAAO,SAAS,CAAC;IAC7B,QAAQ,KAAK,CAAC,qBAAqB;IACnC;IACA,YAAY,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3C,YAAY,IAAI,CAAC,IAAI;IACrB,gBAAgB,OAAO,SAAS,IAAI,GAAG,CAAC;IACxC,YAAY,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;IAChE;IACA;IACA;IACA,gBAAgB,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,aAAa;IACb,YAAY,OAAO,IAAI,GAAG,SAAS,CAAC;IACpC,SAAS;IACT,QAAQ,KAAK,CAAC;IACd,YAAY,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;IACxC,QAAQ;IACR,YAAY,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;IAC7F,KAAK;IACL;;ICjOA,SAAS,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE;IAC9B;IACA;IACA;IACA,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;IACnC,QAAQ,IAAI,IAAI,GAAG,CAAC;IACpB,IAAI,OAAOC,SAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;AACD;IACA;IACA;IACA;IACA,SAAS,aAAa,CAAC,IAAI,EAAE;IAC7B,IAAI,IAAI,CAAC,IAAI;IACb,QAAQ,OAAO,EAAE,CAAC;IAClB,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACxC,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IACpC,CAAC;AACD;IACA,MAAMC,QAAM,GAAG,CAAC,CAAC;IACjB,MAAMC,eAAa,GAAG,CAAC,CAAC;IACxB,MAAMC,aAAW,GAAG,CAAC,CAAC;IACtB,MAAMC,eAAa,GAAG,CAAC,CAAC;IACxB,MAAMC,aAAW,GAAG,CAAC,CAAC;IACtB,MAAM,kBAAkB,GAAG,CAAC,CAAC;IAC7B,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B;IACA,SAAS,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE;IACpC,IAAI,MAAM,aAAa,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC/D,IAAI,IAAI,aAAa,KAAK,QAAQ,CAAC,MAAM;IACzC,QAAQ,OAAO,QAAQ,CAAC;IACxB;IACA;IACA,IAAI,IAAI,CAAC,KAAK;IACd,QAAQ,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;IACpC,IAAI,KAAK,IAAI,CAAC,GAAG,aAAa,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;IACnG,QAAQ,QAAQ,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACvD,KAAK;IACL,IAAI,OAAO,QAAQ,CAAC;IACpB,CAAC;IACD,SAAS,uBAAuB,CAAC,QAAQ,EAAE,KAAK,EAAE;IAClD,IAAI,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAClD,QAAQ,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClC,YAAY,OAAO,CAAC,CAAC;IACrB,KAAK;IACL,IAAI,OAAO,QAAQ,CAAC,MAAM,CAAC;IAC3B,CAAC;IACD,SAAS,QAAQ,CAAC,IAAI,EAAE;IACxB,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAC1C,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,CAACJ,QAAM,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAACA,QAAM,CAAC,EAAE;IACnD,YAAY,OAAO,KAAK,CAAC;IACzB,SAAS;IACT,KAAK;IACL,IAAI,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,SAAS,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE;IACnC,IAAI,IAAI,CAAC,KAAK;IACd,QAAQ,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAC5B,IAAI,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IACD,SAAS,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE;IAC9B,IAAI,OAAO,CAAC,CAACA,QAAM,CAAC,GAAG,CAAC,CAACA,QAAM,CAAC,CAAC;IACjC,CAAC;AACD;IACA,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,SAAS,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;IACnD,IAAI,OAAO,GAAG,IAAI,IAAI,EAAE;IACxB,QAAQ,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;IAC9C,QAAQ,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAACA,QAAM,CAAC,GAAG,MAAM,CAAC;IACnD,QAAQ,IAAI,GAAG,KAAK,CAAC,EAAE;IACvB,YAAY,KAAK,GAAG,IAAI,CAAC;IACzB,YAAY,OAAO,GAAG,CAAC;IACvB,SAAS;IACT,QAAQ,IAAI,GAAG,GAAG,CAAC,EAAE;IACrB,YAAY,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;IAC1B,SAAS;IACT,aAAa;IACb,YAAY,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;IAC3B,SAAS;IACT,KAAK;IACL,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,IAAI,OAAO,GAAG,GAAG,CAAC,CAAC;IACnB,CAAC;IACD,SAAS,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE;IAC7C,IAAI,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IAC9D,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,CAACA,QAAM,CAAC,KAAK,MAAM;IAC1C,YAAY,MAAM;IAClB,KAAK;IACL,IAAI,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,SAAS,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE;IAC7C,IAAI,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IACjD,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,CAACA,QAAM,CAAC,KAAK,MAAM;IAC1C,YAAY,MAAM;IAClB,KAAK;IACL,IAAI,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,SAAS,aAAa,GAAG;IACzB,IAAI,OAAO;IACX,QAAQ,OAAO,EAAE,CAAC,CAAC;IACnB,QAAQ,UAAU,EAAE,CAAC,CAAC;IACtB,QAAQ,SAAS,EAAE,CAAC,CAAC;IACrB,KAAK,CAAC;IACN,CAAC;IACD;IACA;IACA;IACA;IACA,SAAS,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE;IAC5D,IAAI,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACrD,IAAI,IAAI,GAAG,GAAG,CAAC,CAAC;IAChB,IAAI,IAAI,IAAI,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IACnC,IAAI,IAAI,GAAG,KAAK,OAAO,EAAE;IACzB,QAAQ,IAAI,MAAM,KAAK,UAAU,EAAE;IACnC,YAAY,KAAK,GAAG,SAAS,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC,SAAS,CAAC,CAACA,QAAM,CAAC,KAAK,MAAM,CAAC;IAC/E,YAAY,OAAO,SAAS,CAAC;IAC7B,SAAS;IACT,QAAQ,IAAI,MAAM,IAAI,UAAU,EAAE;IAClC;IACA,YAAY,GAAG,GAAG,SAAS,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IACnD,SAAS;IACT,aAAa;IACb,YAAY,IAAI,GAAG,SAAS,CAAC;IAC7B,SAAS;IACT,KAAK;IACL,IAAI,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;IACxB,IAAI,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;IAC9B,IAAI,QAAQ,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;IACzE,CAAC;AACD;IACA;IACA;IACA,SAAS,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE;IACxC,IAAI,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC9C,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAC7C,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAChC,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAC9C,YAAY,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAChC,YAAY,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;IAChC,gBAAgB,SAAS;IACzB,YAAY,MAAM,WAAW,GAAG,GAAG,CAACC,eAAa,CAAC,CAAC;IACnD,YAAY,MAAM,UAAU,GAAG,GAAG,CAACC,aAAW,CAAC,CAAC;IAChD,YAAY,MAAM,YAAY,GAAG,GAAG,CAACC,eAAa,CAAC,CAAC;IACpD,YAAY,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACxD,YAAY,MAAM,YAAY,IAAI,cAAc,CAAC,UAAU,CAAC,KAAK,cAAc,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACnG,YAAY,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;IAC5C;IACA;IACA;IACA;IACA,YAAY,IAAI,KAAK,GAAG,UAAU,CAAC,YAAY,EAAE,YAAY,EAAE,oBAAoB,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;IACnI,YAAY,IAAI,CAAC,SAAS,GAAG,EAAE,KAAK,CAAC;IACrC,YAAYE,QAAM,CAAC,YAAY,EAAE,KAAK,EAAE,CAAC,YAAY,EAAE,CAAC,EAAE,GAAG,CAACL,QAAM,CAAC,CAAC,CAAC,CAAC;IACxE,SAAS;IACT,KAAK;IACL,IAAI,OAAO,OAAO,CAAC;IACnB,CAAC;IACD,SAASK,QAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;IACrC,IAAI,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;IAC/C,QAAQ,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,KAAK;IACL,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IACzB,CAAC;IACD;IACA;IACA;IACA;IACA;IACA,SAAS,cAAc,GAAG;IAC1B,IAAI,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAC/B,CAAC;AACD;IACA,MAAM,MAAM,GAAG,UAAU,GAAG,EAAE,MAAM,EAAE;IACtC,IAAI,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,IAAI,EAAE,UAAU,IAAI,MAAM,CAAC,EAAE;IACjC,QAAQ,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,KAAK;IACL,IAAI,MAAM,QAAQ,GAAG,EAAE,CAAC;IACxB,IAAI,MAAM,OAAO,GAAG,EAAE,CAAC;IACvB,IAAI,MAAM,cAAc,GAAG,EAAE,CAAC;IAC9B,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;IACrB,IAAI,MAAM,UAAU,GAAG,EAAE,CAAC;IAC1B,IAAI,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC5G,IAAI,MAAM,MAAM,GAAG;IACnB,QAAQ,OAAO,EAAE,CAAC;IAClB,QAAQ,IAAI,EAAE,MAAM,CAAC,IAAI;IACzB,QAAQ,KAAK;IACb,QAAQ,OAAO;IACf,QAAQ,cAAc;IACtB,QAAQ,QAAQ;IAChB,QAAQ,UAAU;IAClB,KAAK,CAAC;IACN,IAAI,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC,CAAC;IACF,SAAS,KAAK,CAAC,GAAG,EAAE;IACpB,IAAI,OAAO,OAAO,GAAG,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IAC3D,CAAC;IACD,SAAS,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE;IACtI,IAAI,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC/B,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAC9C,QAAQ,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5C,QAAQ,IAAI,EAAE,GAAG,QAAQ,CAAC;IAC1B,QAAQ,IAAI,EAAE,GAAG,UAAU,CAAC;IAC5B,QAAQ,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE;IACrC,YAAY,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;IACtD,YAAY,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAClE,YAAY,IAAI,EAAE,KAAK,QAAQ,EAAE;IACjC,gBAAgB,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC5E,aAAa;IACb,iBAAiB,IAAI,EAAE,GAAG,QAAQ,EAAE;IACpC,gBAAgB,EAAE,GAAG,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC;IACtD,aAAa;IACb,SAAS;IACT,QAAQ,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACtJ,KAAK;IACL,CAAC;IACD,SAAS,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE;IACzI,IAAI,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,IAAI,UAAU,IAAI,MAAM;IAC5B,QAAQ,OAAO,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;IACrC,IAAI,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,IAAI,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IACzC,IAAI,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;IACrC,IAAI,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC;IACnF,IAAI,MAAM,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACrC,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,IAAI,QAAQ;IAChB,QAAQ,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACzC;IACA,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE;IACvD,YAAY,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,IAAI,OAAO;IACf,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE;IAC/C,YAAY,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;IACxD,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAC7C,QAAQ,MAAM,KAAK,GAAG,UAAU,GAAG,CAAC,CAAC;IACrC;IACA;IACA;IACA;IACA,QAAQ,IAAI,KAAK,GAAG,QAAQ;IAC5B,YAAY,OAAO;IACnB;IACA;IACA,QAAQ,MAAM,GAAG,GAAGC,SAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC7C;IACA;IACA,QAAQ,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,YAAY,GAAG,CAAC,CAAC;IACnD,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAChC,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAC9C,YAAY,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAChC,YAAY,MAAM,MAAM,GAAG,OAAO,GAAG,GAAG,CAACN,QAAM,CAAC,CAAC;IACjD;IACA;IACA,YAAY,IAAI,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,UAAU;IAC1D,gBAAgB,OAAO;IACvB,YAAY,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;IAClC,gBAAgB,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IACnC,gBAAgB,SAAS;IACzB,aAAa;IACb,YAAY,MAAM,YAAY,GAAG,aAAa,GAAG,GAAG,CAACC,eAAa,CAAC,CAAC;IACpE,YAAY,MAAM,UAAU,GAAG,GAAG,CAACC,aAAW,CAAC,CAAC;IAChD,YAAY,MAAM,YAAY,GAAG,GAAG,CAACC,eAAa,CAAC,CAAC;IACpD,YAAY,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC;IACrC,kBAAkB,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC;IAClE,kBAAkB,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,GAAG,GAAG,CAACC,aAAW,CAAC,CAAC,CAAC,CAAC;IACpG,SAAS;IACT,KAAK;IACL,CAAC;IACD,SAAS,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE;IAC5B,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;IACzC,QAAQ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IACD,SAASE,SAAO,CAAC,GAAG,EAAE,KAAK,EAAE;IAC7B,IAAI,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE;IAC5C,QAAQ,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACpB,IAAI,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;AACD;IACA,MAAM,aAAa,GAAG,uDAAuD,CAAC;IAC9E,MAAM,eAAe,GAAG,yEAAyE,CAAC;IAClG,MAAM,iBAAiB,GAAG,CAAC,CAAC,CAAC;IAC7B,MAAM,oBAAoB,GAAG,CAAC,CAAC;IAC/B,MAAM,QAAQ,CAAC;IACf,IAAI,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE;IAC7B,QAAQ,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC;IACjD,QAAQ,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC,YAAY;IACzC,YAAY,OAAO,GAAG,CAAC;IACvB,QAAQ,MAAM,MAAM,IAAI,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;IAC1D,QAAQ,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;IACrF,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC/B,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,EAAE,CAAC;IACjC,QAAQ,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACrC,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC/B,QAAQ,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IAC7C,QAAQ,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,mBAAmB,IAAI,SAAS,CAAC;IACvF,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IACtE,QAAQ,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IAC1E,QAAQ,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IACpC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;IAC1C,YAAY,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACrC,YAAY,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;IACtC,SAAS;IACT,aAAa;IACb,YAAY,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;IACtC,YAAY,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC1D,SAAS;IACT,QAAQ,IAAI,CAAC,YAAY,GAAG,aAAa,EAAE,CAAC;IAC5C,QAAQ,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IACpC,QAAQ,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;IACxC,KAAK;IACL,CAAC;IACD;IACA;IACA;IACA;IACA,SAASC,MAAI,CAAC,GAAG,EAAE;IACnB,IAAI,OAAO,GAAG,CAAC;IACf,CAAC;IACD;IACA;IACA;IACA,SAAS,eAAe,CAAC,GAAG,EAAE;IAC9B,IAAI,IAAI,EAAE,CAAC;IACX,IAAI,IAAI,EAAE,CAAC;IACX,IAAI,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,GAAGA,MAAI,CAAC,GAAG,CAAC,EAAE,QAAQ,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,QAAQ,GAAG,MAAM,CAACA,MAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE;IAC1H,CAAC;IACD;IACA;IACA;IACA,SAAS,eAAe,CAAC,GAAG,EAAE;IAC9B,IAAI,IAAI,EAAE,CAAC;IACX,IAAI,QAAQ,CAAC,EAAE,GAAGA,MAAI,CAAC,GAAG,CAAC,EAAE,QAAQ,KAAK,EAAE,CAAC,QAAQ,GAAG,MAAM,CAACA,MAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE;IACrF,CAAC;IAeD;IACA;IACA;IACA;IACA;IACA,SAAS,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE;IAC1C,IAAI,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IACxC,IAAI,IAAI,EAAE,CAAC;IACX,IAAI,IAAI,IAAI,GAAG,CAAC;IAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;IACvC,IAAI,IAAI,MAAM,GAAG,CAAC;IAClB,QAAQ,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;IACzC,IAAI,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IACzC;IACA;IACA,IAAI,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM;IAC9B,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAChD,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,MAAM,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAEA,MAAI,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,IAAI,oBAAoB,CAAC,CAAC;IACrH,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC;IACpB,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAChD,IAAI,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpC,IAAI,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;IAC5B,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAChD,IAAI,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAC3C,IAAI,OAAO,QAAQ,CAAC,eAAe,CAAC,OAAO,CAACN,eAAa,CAAC,CAAC,EAAE,OAAO,CAACC,aAAW,CAAC,GAAG,CAAC,EAAE,OAAO,CAACC,eAAa,CAAC,EAAE,OAAO,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,CAAC,OAAO,CAACC,aAAW,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC1K,CAAC;IACD;IACA;IACA;IACA,SAAS,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE;IAC3C,IAAI,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAClD,IAAI,OAAO,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,IAAI,oBAAoB,EAAE,KAAK,CAAC,CAAC;IAC7F,CAAC;IACD;IACA;IACA;IACA,SAAS,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE;IAC/C,IAAI,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAClD;IACA,IAAI,OAAO,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,IAAI,iBAAiB,EAAE,IAAI,CAAC,CAAC;IACzF,CAAC;IACD;IACA;IACA;IACA,SAAS,WAAW,CAAC,GAAG,EAAE,EAAE,EAAE;IAC9B,IAAI,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAC3C,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAC7C,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAChC,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAC9C,YAAY,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAChC,YAAY,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,CAAC;IACxC,YAAY,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3C,YAAY,IAAI,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,IAAI,YAAY,GAAG,IAAI,CAAC;IACpC,YAAY,IAAI,cAAc,GAAG,IAAI,CAAC;IACtC,YAAY,IAAI,IAAI,GAAG,IAAI,CAAC;IAC5B,YAAY,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;IAClC,gBAAgB,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,gBAAgB,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC1C,gBAAgB,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACxC,aAAa;IACb,YAAY,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;IAChC,gBAAgB,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,YAAY,EAAE,CAAC;IACf,gBAAgB,aAAa;IAC7B,gBAAgB,eAAe;IAC/B,gBAAgB,MAAM;IACtB,gBAAgB,YAAY;IAC5B,gBAAgB,cAAc;IAC9B,gBAAgB,IAAI;IACpB,aAAa,CAAC,CAAC;IACf,SAAS;IACT,KAAK;IACL,CAAC;IACD,SAAS,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE;IAClC,IAAI,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAC7C,IAAI,IAAI,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC;IACpB,QAAQ,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAChD,IAAI,OAAO,KAAK,CAAC;IACjB,CAAC;IACD;IACA;IACA;IACA,SAAS,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE;IACvC,IAAI,MAAM,EAAE,cAAc,EAAE,GAAG,GAAG,CAAC;IACnC,IAAI,IAAI,cAAc,IAAI,IAAI;IAC9B,QAAQ,OAAO,IAAI,CAAC;IACpB,IAAI,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC3C,IAAI,OAAO,KAAK,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACvD,CAAC;IAWD;IACA;IACA;IACA;IACA,SAAS,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE;IAC1C,IAAI,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IACxD,IAAIG,MAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IACzC,IAAI,OAAO,MAAM,CAAC;IAClB,CAAC;IAeD,SAAS,KAAK,CAAC,GAAG,EAAE,QAAQ,EAAE;IAC9B,IAAI,OAAO;IACX,QAAQ,OAAO,EAAE,GAAG,CAAC,OAAO;IAC5B,QAAQ,IAAI,EAAE,GAAG,CAAC,IAAI;IACtB,QAAQ,KAAK,EAAE,GAAG,CAAC,KAAK;IACxB,QAAQ,UAAU,EAAE,GAAG,CAAC,UAAU;IAClC,QAAQ,OAAO,EAAE,GAAG,CAAC,OAAO;IAC5B,QAAQ,cAAc,EAAE,GAAG,CAAC,cAAc;IAC1C,QAAQ,QAAQ;IAChB,QAAQ,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,mBAAmB;IAC7D,KAAK,CAAC;IACN,CAAC;IACD,SAAS,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IAC9C,IAAI,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC1C,CAAC;IACD,SAAS,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE;IAChC,IAAI,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC5B,CAAC;IACD,SAAS,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IAClE,IAAI,IAAI,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACnE,IAAI,IAAI,KAAK,EAAE;IACf,QAAQ,KAAK,GAAG,CAAC,IAAI,KAAK,iBAAiB,GAAG,UAAU,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAChG,KAAK;IACL,SAAS,IAAI,IAAI,KAAK,iBAAiB;IACvC,QAAQ,KAAK,EAAE,CAAC;IAChB,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM;IACjD,QAAQ,OAAO,CAAC,CAAC,CAAC;IAClB,IAAI,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,SAAS,uBAAuB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACrE,IAAI,IAAI,GAAG,GAAG,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC;IACvF;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,KAAK,iBAAiB;IAC5C,QAAQ,GAAG,EAAE,CAAC;IACd,IAAI,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,GAAG,KAAK,QAAQ,CAAC,MAAM;IAC7C,QAAQ,OAAO,EAAE,CAAC;IAClB;IACA;IACA;IACA,IAAI,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAACP,QAAM,CAAC,CAAC;IACjE;IACA,IAAI,IAAI,CAAC,KAAK;IACd,QAAQ,GAAG,GAAG,UAAU,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,CAAC,CAAC;IACvD,IAAI,MAAM,GAAG,GAAG,UAAU,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,CAAC,CAAC;IACzD,IAAI,MAAM,MAAM,GAAG,EAAE,CAAC;IACtB,IAAI,OAAO,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,EAAE;IAC9B,QAAQ,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IACtC,QAAQ,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAC9F,KAAK;IACL,IAAI,OAAO,MAAM,CAAC;IAClB,CAAC;IACD,SAAS,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE;IACjE,IAAI,IAAI,EAAE,CAAC;IACX,IAAI,IAAI,EAAE,CAAC;IACX,IAAI,IAAI,IAAI,GAAG,CAAC;IAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;IACvC,IAAI,IAAI,MAAM,GAAG,CAAC;IAClB,QAAQ,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;IACzC,IAAI,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAC7C,IAAI,IAAI,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,IAAI,IAAI,WAAW,KAAK,CAAC,CAAC;IAC1B,QAAQ,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACtD,IAAI,IAAI,WAAW,KAAK,CAAC,CAAC;IAC1B,QAAQ,OAAO,GAAG,GAAG,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/C,IAAI,MAAM,SAAS,IAAI,CAAC,EAAE,GAAGO,MAAI,CAAC,GAAG,CAAC,EAAE,UAAU,KAAK,EAAE,CAAC,UAAU,GAAG,cAAc,CAAC,eAAe,CAAC,GAAG,CAAC,GAAGA,MAAI,CAAC,GAAG,CAAC,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC;IACvK,IAAI,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;IAClD,IAAI,IAAI,QAAQ,IAAI,IAAI;IACxB,QAAQ,OAAO,GAAG,GAAG,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/C,IAAI,MAAM,IAAI,GAAGA,MAAI,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IACvD,IAAI,IAAI,GAAG;IACX,QAAQ,OAAO,uBAAuB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAC3E,IAAI,MAAM,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAC3E,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC;IACpB,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,IAAI,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpC,IAAI,OAAO,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;IACpF;;IChkBA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAM,QAAQ,CAAC;IACf,IAAI,WAAW,GAAG;IAClB,QAAQ,IAAI,CAAC,QAAQ,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAC5C,QAAQ,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IACxB,KAAK;IACL,CAAC;IACD;IACA;IACA;IACA;IACA,SAASA,MAAI,CAAC,GAAG,EAAE;IACnB,IAAI,OAAO,GAAG,CAAC;IACf,CAAC;IACD;IACA;IACA;IACA,SAAS,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE;IAC1B,IAAI,OAAOA,MAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IACD;IACA;IACA;IACA;IACA,SAAS,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE;IAC1B;IACA,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,IAAI,IAAI,KAAK,KAAK,SAAS;IAC3B,QAAQ,OAAO,KAAK,CAAC;IACrB,IAAI,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAGA,MAAI,CAAC,MAAM,CAAC,CAAC;IACtD,IAAI,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,QAAQ,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE;IACvC;;ICnCA,MAAM,MAAM,GAAG,CAAC,CAAC;IACjB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IACtB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB;IACA,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC;IACnB;IACA;IACA;IACA,MAAM,UAAU,CAAC;IACjB,IAAI,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,EAAE;IAC3C,QAAQ,IAAI,CAAC,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;IACrC,QAAQ,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;IACvC,QAAQ,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAClC,QAAQ,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IAC5B,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACrC,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI,QAAQ,EAAE,CAAC;IAC1C,KAAK;IACL,CAAC;IACD;IACA;IACA;IACA;IACA,SAAS,IAAI,CAAC,GAAG,EAAE;IACnB,IAAI,OAAO,GAAG,CAAC;IACf,CAAC;IAeD;IACA;IACA;IACA;IACA;IACA,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK;IAC1C,IAAI,OAAO,kBAAkB,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC,CAAC;IACF;IACA;IACA;IACA,SAAS,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;IAChD,IAAI,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7E,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACvC,IAAI,cAAc,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;IACpC,CAAC;IAWD;IACA;IACA;IACA;IACA,SAAS,YAAY,CAAC,GAAG,EAAE;IAC3B,IAAI,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3I,IAAI,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACpC,IAAI,OAAO;IACX,QAAQ,OAAO,EAAE,CAAC;IAClB,QAAQ,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,SAAS;IACnC,QAAQ,KAAK,EAAE,KAAK,CAAC,KAAK;IAC1B,QAAQ,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,SAAS;IAC/C,QAAQ,OAAO,EAAE,OAAO,CAAC,KAAK;IAC9B,QAAQ,cAAc;IACtB,QAAQ,QAAQ;IAChB,QAAQ,UAAU,EAAE,UAAU,CAAC,KAAK;IACpC,KAAK,CAAC;IACN,CAAC;IACD;IACA;IACA;IACA;IACA,SAAS,YAAY,CAAC,GAAG,EAAE;IAC3B,IAAI,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC7F,CAAC;IACD;IACA;IACA;IACA,SAAS,OAAO,CAAC,KAAK,EAAE;IACxB,IAAI,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpC,IAAI,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IAC/E,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC5C,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,eAAe,GAAG,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAClF,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IAC/C,IAAI,IAAI,GAAG,CAAC,UAAU;IACtB,QAAQ,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IACtD,IAAI,OAAO,GAAG,CAAC;IACf,CAAC;IA2BD;IACA,SAAS,kBAAkB,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE;IAChH,IAAI,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IAClH,IAAI,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC5C,IAAI,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAClD,IAAI,IAAI,CAAC,MAAM,EAAE;IACjB,QAAQ,IAAI,QAAQ,IAAI,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC;IACnD,YAAY,OAAO;IACnB,QAAQ,OAAO,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAChD,KAAK;IACL,IAAI,MAAM,YAAY,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC9C,IAAI,MAAM,UAAU,GAAG,IAAI,GAAG,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC;IACzD,IAAI,IAAI,YAAY,KAAK,cAAc,CAAC,MAAM;IAC9C,QAAQ,cAAc,CAAC,YAAY,CAAC,GAAG,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;IAC/F,IAAI,IAAI,QAAQ,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE;IACjG,QAAQ,OAAO;IACf,KAAK;IACL,IAAI,OAAO,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI;IACnC,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC;IACzE,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;IAC/D,CAAC;IACD,SAAS,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE;IAClC,IAAI,KAAK,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE,EAAE;IACnD,QAAQ,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACzB,KAAK;IACL,IAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IACD,SAAS,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;IACzC,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;IAC5B,IAAI,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IACjD,QAAQ,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAChC,QAAQ,IAAI,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IACxC,YAAY,MAAM;IAClB,KAAK;IACL,IAAI,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,SAAS,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;IACrC,IAAI,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;IAC/C,QAAQ,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,KAAK;IACL,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IACzB,CAAC;IACD,SAAS,qBAAqB,CAAC,QAAQ,EAAE;IACzC,IAAI,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;IAChC,IAAI,IAAI,GAAG,GAAG,MAAM,CAAC;IACrB,IAAI,KAAK,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;IAChD,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC;IAClC,YAAY,MAAM;IAClB,KAAK;IACL,IAAI,IAAI,GAAG,GAAG,MAAM;IACpB,QAAQ,QAAQ,CAAC,MAAM,GAAG,GAAG,CAAC;IAC9B,CAAC;IACD,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE;IAC/B,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;IACzC,QAAQ,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IACD,SAAS,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE;IACrC;IACA;IACA,IAAI,IAAI,KAAK,KAAK,CAAC;IACnB,QAAQ,OAAO,IAAI,CAAC;IACpB,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IACjC;IACA;IACA;IACA,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;IAC7B,CAAC;IACD,SAAS,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE;IACrF;IACA,IAAI,IAAI,KAAK,KAAK,CAAC;IACnB,QAAQ,OAAO,KAAK,CAAC;IACrB,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IACjC;IACA,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;IACzB,QAAQ,OAAO,KAAK,CAAC;IACrB;IACA;IACA,IAAI,QAAQ,YAAY,KAAK,IAAI,CAAC,aAAa,CAAC;IAChD,QAAQ,UAAU,KAAK,IAAI,CAAC,WAAW,CAAC;IACxC,QAAQ,YAAY,KAAK,IAAI,CAAC,aAAa,CAAC;IAC5C,QAAQ,UAAU,MAAM,IAAI,CAAC,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,EAAE;IAC1E,CAAC;IACD,SAAS,kBAAkB,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE;IACpD,IAAI,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IACnE,IAAI,IAAI,CAAC,MAAM,EAAE;IACjB,QAAQ,OAAO,kBAAkB,CAAC,QAAQ,EAAE,GAAG,EAAE,SAAS,CAAC,IAAI,GAAG,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACrH,KAAK;IACL,IAAI,OAAO,kBAAkB,CAAC,QAAQ,EAAE,GAAG,EAAE,SAAS,CAAC,IAAI,GAAG,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9I;;UCrMa,iBAAiB;QAS5B,YAAY,GAA4C,EAAE,MAAoC;YAC5F,MAAM,KAAK,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;YAEpD,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;YACzB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;YACnC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,eAAe,CAAC;YACrC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;YAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;SAC9B;QAED,OAAO,aAAa,CAAC,GAAuB,EAAE,MAAoC;;;YAGhF,IAAI,GAAG,CAAC,YAAY,EAAE;gBACpB,OAAO,IAAI,iBAAiB,CAAC,GAAG,CAAC,YAAY,EAA6B,EAAE,MAAM,CAAC,CAAC;aACrF;;YAGD,OAAO,IAAI,iBAAiB,CAAC,GAAG,CAAC,MAAM,EAA6B,EAAE,MAAM,CAAC,CAAC;SAC/E;QAED,IAAI,QAAQ;YACV,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACnC;QAED,mBAAmB,CACjB,MAAiD;YAEjD,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;SAC/C;QAED,oBAAoB,CAClB,gBAA4D;YAE5D,OAAO,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;SAC1D;QAED,wBAAwB,CACtB,gBAA4D;YAE5D,OAAO,wBAAwB,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;SAC9D;QAED,uBAAuB;YACrB,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,KAAK,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;gBAC9E,OAAO,KAAK,CAAC;aACd;YAED,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,cAAc,EAAE;gBACzC,IAAI,OAAO,IAAI,IAAI,EAAE;oBACnB,OAAO,KAAK,CAAC;iBACd;aACF;YAED,OAAO,IAAI,CAAC;SACb;QAED,gBAAgB,CAAC,MAAc,EAAE,aAAuB;YACtD,MAAM,aAAa,GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAC1D,IAAI,aAAa,IAAI,IAAI,EAAE;gBACzB,OAAO,aAAa,CAAC;aACtB;YAED,IAAI,aAAa,EAAE;gBACjB,OAAO,IAAI,CAAC;aACb;YACD,MAAM,IAAI,KAAK,CAAC,IAAI,MAAM,4BAA4B,CAAC,CAAC;SACzD;QAED,WAAW,CACT,QAA2C,EAC3C,OAAa;;YAGb,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;SACrE;QAED,OAAO;;SAEN;KACF;UAEY,kBAAkB;QAG7B,YAAY,IAA8D;;YAExE,IAAI,CAAC,IAAI,GAAG,IAAI,YAAY,UAAU,GAAG,IAAI,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;SACtE;QAED,OAAO,aAAa,CAAC,QAA2B;YAC9C,OAAO,IAAI,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;SAClD;QAED,UAAU,CAAC,OAA8C;YACvD,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SACrC;QAED,gBAAgB,CACd,MAA8C,EAC9C,OAA+C;YAE/C,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;SAC9C;QAED,MAAM;YACJ,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAChC;QAED,QAAQ;YACN,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;SACtC;QAED,YAAY;YACV,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAChC;;;;;;;;;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/source-map/dist/types/source-map.d.ts b/web/static/node_modules/@jridgewell/source-map/dist/types/source-map.d.ts deleted file mode 100644 index 97b8b930..00000000 --- a/web/static/node_modules/@jridgewell/source-map/dist/types/source-map.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { AnyMap, originalPositionFor, generatedPositionFor, eachMapping } from '@jridgewell/trace-mapping'; -import { GenMapping, maybeAddMapping, toDecodedMap, toEncodedMap, setSourceContent } from '@jridgewell/gen-mapping'; -import type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap } from '@jridgewell/trace-mapping'; -export type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap }; -import type { Mapping, EncodedSourceMap } from '@jridgewell/gen-mapping'; -export type { Mapping, EncodedSourceMap }; -export declare class SourceMapConsumer { - private _map; - file: TraceMap['file']; - names: TraceMap['names']; - sourceRoot: TraceMap['sourceRoot']; - sources: TraceMap['sources']; - sourcesContent: TraceMap['sourcesContent']; - version: TraceMap['version']; - constructor(map: ConstructorParameters[0], mapUrl: Parameters[1]); - static fromSourceMap(map: SourceMapGenerator, mapUrl: Parameters[1]): SourceMapConsumer; - get mappings(): string; - originalPositionFor(needle: Parameters[1]): ReturnType; - generatedPositionFor(originalPosition: Parameters[1]): ReturnType; - allGeneratedPositionsFor(originalPosition: Parameters[1]): ReturnType[]; - hasContentsOfAllSources(): boolean; - sourceContentFor(source: string, nullOnMissing?: boolean): string | null; - eachMapping(callback: Parameters[1], context?: any): void; - destroy(): void; -} -export declare class SourceMapGenerator { - private _map; - constructor(opts: ConstructorParameters[0] | GenMapping); - static fromSourceMap(consumer: SourceMapConsumer): SourceMapGenerator; - addMapping(mapping: Parameters[1]): ReturnType; - setSourceContent(source: Parameters[1], content: Parameters[2]): ReturnType; - toJSON(): ReturnType; - toString(): string; - toDecodedMap(): ReturnType; -} diff --git a/web/static/node_modules/@jridgewell/source-map/package.json b/web/static/node_modules/@jridgewell/source-map/package.json deleted file mode 100644 index 1925054a..00000000 --- a/web/static/node_modules/@jridgewell/source-map/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "@jridgewell/source-map", - "version": "0.3.6", - "description": "Packages @jridgewell/trace-mapping and @jridgewell/gen-mapping into the familiar source-map API", - "keywords": [ - "sourcemap", - "source", - "map" - ], - "author": "Justin Ridgewell ", - "license": "MIT", - "repository": "https://github.com/jridgewell/source-map", - "main": "dist/source-map.cjs", - "module": "dist/source-map.mjs", - "types": "dist/types/source-map.d.ts", - "exports": { - ".": [ - { - "types": "./dist/types/source-map.d.ts", - "browser": "./dist/source-map.umd.js", - "require": "./dist/source-map.cjs", - "import": "./dist/source-map.mjs" - }, - "./dist/source-map.cjs" - ], - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], - "scripts": { - "prebuild": "rm -rf dist", - "build": "run-s -n build:*", - "build:rollup": "rollup -c rollup.config.js", - "build:ts": "tsc --project tsconfig.build.json", - "lint": "run-s -n lint:*", - "lint:prettier": "npm run test:lint:prettier -- --write", - "lint:ts": "npm run test:lint:ts -- --fix", - "test": "run-s -n test:lint test:only", - "test:debug": "ts-mocha --inspect-brk", - "test:lint": "run-s -n test:lint:*", - "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", - "test:lint:ts": "eslint '{src,test}/**/*.ts'", - "test:only": "ts-mocha", - "test:coverage": "c8 --reporter text --reporter html ts-mocha", - "test:watch": "ts-mocha --watch", - "prepublishOnly": "npm run preversion", - "preversion": "run-s test build" - }, - "devDependencies": { - "@rollup/plugin-node-resolve": "13.2.1", - "@rollup/plugin-typescript": "8.3.0", - "@types/mocha": "9.1.1", - "@types/node": "17.0.30", - "@typescript-eslint/eslint-plugin": "5.10.0", - "@typescript-eslint/parser": "5.10.0", - "c8": "7.11.0", - "eslint": "8.7.0", - "eslint-config-prettier": "8.3.0", - "mocha": "10.0.0", - "npm-run-all": "4.1.5", - "prettier": "2.5.1", - "rollup": "2.66.0", - "ts-mocha": "10.0.0", - "typescript": "4.5.5" - }, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } -} diff --git a/web/static/node_modules/@jridgewell/sourcemap-codec/LICENSE b/web/static/node_modules/@jridgewell/sourcemap-codec/LICENSE deleted file mode 100644 index a331065a..00000000 --- a/web/static/node_modules/@jridgewell/sourcemap-codec/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2015 Rich Harris - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/web/static/node_modules/@jridgewell/sourcemap-codec/README.md b/web/static/node_modules/@jridgewell/sourcemap-codec/README.md deleted file mode 100644 index b3e0708b..00000000 --- a/web/static/node_modules/@jridgewell/sourcemap-codec/README.md +++ /dev/null @@ -1,264 +0,0 @@ -# @jridgewell/sourcemap-codec - -Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). - - -## Why? - -Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap. - -This package makes the process slightly easier. - - -## Installation - -```bash -npm install @jridgewell/sourcemap-codec -``` - - -## Usage - -```js -import { encode, decode } from '@jridgewell/sourcemap-codec'; - -var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); - -assert.deepEqual( decoded, [ - // the first line (of the generated code) has no mappings, - // as shown by the starting semi-colon (which separates lines) - [], - - // the second line contains four (comma-separated) segments - [ - // segments are encoded as you'd expect: - // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ] - - // i.e. the first segment begins at column 2, and maps back to the second column - // of the second line (both zero-based) of the 0th source, and uses the 0th - // name in the `map.names` array - [ 2, 0, 2, 2, 0 ], - - // the remaining segments are 4-length rather than 5-length, - // because they don't map a name - [ 4, 0, 2, 4 ], - [ 6, 0, 2, 5 ], - [ 7, 0, 2, 7 ] - ], - - // the final line contains two segments - [ - [ 2, 1, 10, 19 ], - [ 12, 1, 11, 20 ] - ] -]); - -var encoded = encode( decoded ); -assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); -``` - -## Benchmarks - -``` -node v20.10.0 - -amp.js.map - 45120 segments - -Decode Memory Usage: -local code 5815135 bytes -@jridgewell/sourcemap-codec 1.4.15 5868160 bytes -sourcemap-codec 5492584 bytes -source-map-0.6.1 13569984 bytes -source-map-0.8.0 6390584 bytes -chrome dev tools 8011136 bytes -Smallest memory usage is sourcemap-codec - -Decode speed: -decode: local code x 492 ops/sec ±1.22% (90 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 499 ops/sec ±1.16% (89 runs sampled) -decode: sourcemap-codec x 376 ops/sec ±1.66% (89 runs sampled) -decode: source-map-0.6.1 x 34.99 ops/sec ±0.94% (48 runs sampled) -decode: source-map-0.8.0 x 351 ops/sec ±0.07% (95 runs sampled) -chrome dev tools x 165 ops/sec ±0.91% (86 runs sampled) -Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 - -Encode Memory Usage: -local code 444248 bytes -@jridgewell/sourcemap-codec 1.4.15 623024 bytes -sourcemap-codec 8696280 bytes -source-map-0.6.1 8745176 bytes -source-map-0.8.0 8736624 bytes -Smallest memory usage is local code - -Encode speed: -encode: local code x 796 ops/sec ±0.11% (97 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 795 ops/sec ±0.25% (98 runs sampled) -encode: sourcemap-codec x 231 ops/sec ±0.83% (86 runs sampled) -encode: source-map-0.6.1 x 166 ops/sec ±0.57% (86 runs sampled) -encode: source-map-0.8.0 x 203 ops/sec ±0.45% (88 runs sampled) -Fastest is encode: local code,encode: @jridgewell/sourcemap-codec 1.4.15 - - -*** - - -babel.min.js.map - 347793 segments - -Decode Memory Usage: -local code 35424960 bytes -@jridgewell/sourcemap-codec 1.4.15 35424696 bytes -sourcemap-codec 36033464 bytes -source-map-0.6.1 62253704 bytes -source-map-0.8.0 43843920 bytes -chrome dev tools 45111400 bytes -Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 - -Decode speed: -decode: local code x 38.18 ops/sec ±5.44% (52 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 38.36 ops/sec ±5.02% (52 runs sampled) -decode: sourcemap-codec x 34.05 ops/sec ±4.45% (47 runs sampled) -decode: source-map-0.6.1 x 4.31 ops/sec ±2.76% (15 runs sampled) -decode: source-map-0.8.0 x 55.60 ops/sec ±0.13% (73 runs sampled) -chrome dev tools x 16.94 ops/sec ±3.78% (46 runs sampled) -Fastest is decode: source-map-0.8.0 - -Encode Memory Usage: -local code 2606016 bytes -@jridgewell/sourcemap-codec 1.4.15 2626440 bytes -sourcemap-codec 21152576 bytes -source-map-0.6.1 25023928 bytes -source-map-0.8.0 25256448 bytes -Smallest memory usage is local code - -Encode speed: -encode: local code x 127 ops/sec ±0.18% (83 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 128 ops/sec ±0.26% (83 runs sampled) -encode: sourcemap-codec x 29.31 ops/sec ±2.55% (53 runs sampled) -encode: source-map-0.6.1 x 18.85 ops/sec ±3.19% (36 runs sampled) -encode: source-map-0.8.0 x 19.34 ops/sec ±1.97% (36 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 - - -*** - - -preact.js.map - 1992 segments - -Decode Memory Usage: -local code 261696 bytes -@jridgewell/sourcemap-codec 1.4.15 244296 bytes -sourcemap-codec 302816 bytes -source-map-0.6.1 939176 bytes -source-map-0.8.0 336 bytes -chrome dev tools 587368 bytes -Smallest memory usage is source-map-0.8.0 - -Decode speed: -decode: local code x 17,782 ops/sec ±0.32% (97 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 17,863 ops/sec ±0.40% (100 runs sampled) -decode: sourcemap-codec x 12,453 ops/sec ±0.27% (101 runs sampled) -decode: source-map-0.6.1 x 1,288 ops/sec ±1.05% (96 runs sampled) -decode: source-map-0.8.0 x 9,289 ops/sec ±0.27% (101 runs sampled) -chrome dev tools x 4,769 ops/sec ±0.18% (100 runs sampled) -Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 - -Encode Memory Usage: -local code 262944 bytes -@jridgewell/sourcemap-codec 1.4.15 25544 bytes -sourcemap-codec 323048 bytes -source-map-0.6.1 507808 bytes -source-map-0.8.0 507480 bytes -Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 - -Encode speed: -encode: local code x 24,207 ops/sec ±0.79% (95 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 24,288 ops/sec ±0.48% (96 runs sampled) -encode: sourcemap-codec x 6,761 ops/sec ±0.21% (100 runs sampled) -encode: source-map-0.6.1 x 5,374 ops/sec ±0.17% (99 runs sampled) -encode: source-map-0.8.0 x 5,633 ops/sec ±0.32% (99 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec 1.4.15,encode: local code - - -*** - - -react.js.map - 5726 segments - -Decode Memory Usage: -local code 678816 bytes -@jridgewell/sourcemap-codec 1.4.15 678816 bytes -sourcemap-codec 816400 bytes -source-map-0.6.1 2288864 bytes -source-map-0.8.0 721360 bytes -chrome dev tools 1012512 bytes -Smallest memory usage is local code - -Decode speed: -decode: local code x 6,178 ops/sec ±0.19% (98 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 6,261 ops/sec ±0.22% (100 runs sampled) -decode: sourcemap-codec x 4,472 ops/sec ±0.90% (99 runs sampled) -decode: source-map-0.6.1 x 449 ops/sec ±0.31% (95 runs sampled) -decode: source-map-0.8.0 x 3,219 ops/sec ±0.13% (100 runs sampled) -chrome dev tools x 1,743 ops/sec ±0.20% (99 runs sampled) -Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 - -Encode Memory Usage: -local code 140960 bytes -@jridgewell/sourcemap-codec 1.4.15 159808 bytes -sourcemap-codec 969304 bytes -source-map-0.6.1 930520 bytes -source-map-0.8.0 930248 bytes -Smallest memory usage is local code - -Encode speed: -encode: local code x 8,013 ops/sec ±0.19% (100 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 7,989 ops/sec ±0.20% (101 runs sampled) -encode: sourcemap-codec x 2,472 ops/sec ±0.21% (99 runs sampled) -encode: source-map-0.6.1 x 2,200 ops/sec ±0.17% (99 runs sampled) -encode: source-map-0.8.0 x 2,220 ops/sec ±0.37% (99 runs sampled) -Fastest is encode: local code - - -*** - - -vscode.map - 2141001 segments - -Decode Memory Usage: -local code 198955264 bytes -@jridgewell/sourcemap-codec 1.4.15 199175352 bytes -sourcemap-codec 199102688 bytes -source-map-0.6.1 386323432 bytes -source-map-0.8.0 244116432 bytes -chrome dev tools 293734280 bytes -Smallest memory usage is local code - -Decode speed: -decode: local code x 3.90 ops/sec ±22.21% (15 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 3.95 ops/sec ±23.53% (15 runs sampled) -decode: sourcemap-codec x 3.82 ops/sec ±17.94% (14 runs sampled) -decode: source-map-0.6.1 x 0.61 ops/sec ±7.81% (6 runs sampled) -decode: source-map-0.8.0 x 9.54 ops/sec ±0.28% (28 runs sampled) -chrome dev tools x 2.18 ops/sec ±10.58% (10 runs sampled) -Fastest is decode: source-map-0.8.0 - -Encode Memory Usage: -local code 13509880 bytes -@jridgewell/sourcemap-codec 1.4.15 13537648 bytes -sourcemap-codec 32540104 bytes -source-map-0.6.1 127531040 bytes -source-map-0.8.0 127535312 bytes -Smallest memory usage is local code - -Encode speed: -encode: local code x 20.10 ops/sec ±0.19% (38 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 20.26 ops/sec ±0.32% (38 runs sampled) -encode: sourcemap-codec x 5.44 ops/sec ±1.64% (18 runs sampled) -encode: source-map-0.6.1 x 2.30 ops/sec ±4.79% (10 runs sampled) -encode: source-map-0.8.0 x 2.46 ops/sec ±6.53% (10 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 -``` - -# License - -MIT diff --git a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs b/web/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs deleted file mode 100644 index 60e17b3d..00000000 --- a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +++ /dev/null @@ -1,424 +0,0 @@ -const comma = ','.charCodeAt(0); -const semicolon = ';'.charCodeAt(0); -const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -const intToChar = new Uint8Array(64); // 64 possible chars. -const charToInt = new Uint8Array(128); // z is 122 in ASCII -for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; -} -function decodeInteger(reader, relative) { - let value = 0; - let shift = 0; - let integer = 0; - do { - const c = reader.next(); - integer = charToInt[c]; - value |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - const shouldNegate = value & 1; - value >>>= 1; - if (shouldNegate) { - value = -0x80000000 | -value; - } - return relative + value; -} -function encodeInteger(builder, num, relative) { - let delta = num - relative; - delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; - do { - let clamped = delta & 0b011111; - delta >>>= 5; - if (delta > 0) - clamped |= 0b100000; - builder.write(intToChar[clamped]); - } while (delta > 0); - return num; -} -function hasMoreVlq(reader, max) { - if (reader.pos >= max) - return false; - return reader.peek() !== comma; -} - -const bufLength = 1024 * 16; -// Provide a fallback for older environments. -const td = typeof TextDecoder !== 'undefined' - ? /* #__PURE__ */ new TextDecoder() - : typeof Buffer !== 'undefined' - ? { - decode(buf) { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - }, - } - : { - decode(buf) { - let out = ''; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - }, - }; -class StringWriter { - constructor() { - this.pos = 0; - this.out = ''; - this.buffer = new Uint8Array(bufLength); - } - write(v) { - const { buffer } = this; - buffer[this.pos++] = v; - if (this.pos === bufLength) { - this.out += td.decode(buffer); - this.pos = 0; - } - } - flush() { - const { buffer, out, pos } = this; - return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; - } -} -class StringReader { - constructor(buffer) { - this.pos = 0; - this.buffer = buffer; - } - next() { - return this.buffer.charCodeAt(this.pos++); - } - peek() { - return this.buffer.charCodeAt(this.pos); - } - indexOf(char) { - const { buffer, pos } = this; - const idx = buffer.indexOf(char, pos); - return idx === -1 ? buffer.length : idx; - } -} - -const EMPTY = []; -function decodeOriginalScopes(input) { - const { length } = input; - const reader = new StringReader(input); - const scopes = []; - const stack = []; - let line = 0; - for (; reader.pos < length; reader.pos++) { - line = decodeInteger(reader, line); - const column = decodeInteger(reader, 0); - if (!hasMoreVlq(reader, length)) { - const last = stack.pop(); - last[2] = line; - last[3] = column; - continue; - } - const kind = decodeInteger(reader, 0); - const fields = decodeInteger(reader, 0); - const hasName = fields & 0b0001; - const scope = (hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]); - let vars = EMPTY; - if (hasMoreVlq(reader, length)) { - vars = []; - do { - const varsIndex = decodeInteger(reader, 0); - vars.push(varsIndex); - } while (hasMoreVlq(reader, length)); - } - scope.vars = vars; - scopes.push(scope); - stack.push(scope); - } - return scopes; -} -function encodeOriginalScopes(scopes) { - const writer = new StringWriter(); - for (let i = 0; i < scopes.length;) { - i = _encodeOriginalScopes(scopes, i, writer, [0]); - } - return writer.flush(); -} -function _encodeOriginalScopes(scopes, index, writer, state) { - const scope = scopes[index]; - const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; - if (index > 0) - writer.write(comma); - state[0] = encodeInteger(writer, startLine, state[0]); - encodeInteger(writer, startColumn, 0); - encodeInteger(writer, kind, 0); - const fields = scope.length === 6 ? 0b0001 : 0; - encodeInteger(writer, fields, 0); - if (scope.length === 6) - encodeInteger(writer, scope[5], 0); - for (const v of vars) { - encodeInteger(writer, v, 0); - } - for (index++; index < scopes.length;) { - const next = scopes[index]; - const { 0: l, 1: c } = next; - if (l > endLine || (l === endLine && c >= endColumn)) { - break; - } - index = _encodeOriginalScopes(scopes, index, writer, state); - } - writer.write(comma); - state[0] = encodeInteger(writer, endLine, state[0]); - encodeInteger(writer, endColumn, 0); - return index; -} -function decodeGeneratedRanges(input) { - const { length } = input; - const reader = new StringReader(input); - const ranges = []; - const stack = []; - let genLine = 0; - let definitionSourcesIndex = 0; - let definitionScopeIndex = 0; - let callsiteSourcesIndex = 0; - let callsiteLine = 0; - let callsiteColumn = 0; - let bindingLine = 0; - let bindingColumn = 0; - do { - const semi = reader.indexOf(';'); - let genColumn = 0; - for (; reader.pos < semi; reader.pos++) { - genColumn = decodeInteger(reader, genColumn); - if (!hasMoreVlq(reader, semi)) { - const last = stack.pop(); - last[2] = genLine; - last[3] = genColumn; - continue; - } - const fields = decodeInteger(reader, 0); - const hasDefinition = fields & 0b0001; - const hasCallsite = fields & 0b0010; - const hasScope = fields & 0b0100; - let callsite = null; - let bindings = EMPTY; - let range; - if (hasDefinition) { - const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); - definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0); - definitionSourcesIndex = defSourcesIndex; - range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; - } - else { - range = [genLine, genColumn, 0, 0]; - } - range.isScope = !!hasScope; - if (hasCallsite) { - const prevCsi = callsiteSourcesIndex; - const prevLine = callsiteLine; - callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); - const sameSource = prevCsi === callsiteSourcesIndex; - callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); - callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0); - callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; - } - range.callsite = callsite; - if (hasMoreVlq(reader, semi)) { - bindings = []; - do { - bindingLine = genLine; - bindingColumn = genColumn; - const expressionsCount = decodeInteger(reader, 0); - let expressionRanges; - if (expressionsCount < -1) { - expressionRanges = [[decodeInteger(reader, 0)]]; - for (let i = -1; i > expressionsCount; i--) { - const prevBl = bindingLine; - bindingLine = decodeInteger(reader, bindingLine); - bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); - const expression = decodeInteger(reader, 0); - expressionRanges.push([expression, bindingLine, bindingColumn]); - } - } - else { - expressionRanges = [[expressionsCount]]; - } - bindings.push(expressionRanges); - } while (hasMoreVlq(reader, semi)); - } - range.bindings = bindings; - ranges.push(range); - stack.push(range); - } - genLine++; - reader.pos = semi + 1; - } while (reader.pos < length); - return ranges; -} -function encodeGeneratedRanges(ranges) { - if (ranges.length === 0) - return ''; - const writer = new StringWriter(); - for (let i = 0; i < ranges.length;) { - i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); - } - return writer.flush(); -} -function _encodeGeneratedRanges(ranges, index, writer, state) { - const range = ranges[index]; - const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings, } = range; - if (state[0] < startLine) { - catchupLine(writer, state[0], startLine); - state[0] = startLine; - state[1] = 0; - } - else if (index > 0) { - writer.write(comma); - } - state[1] = encodeInteger(writer, range[1], state[1]); - const fields = (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); - encodeInteger(writer, fields, 0); - if (range.length === 6) { - const { 4: sourcesIndex, 5: scopesIndex } = range; - if (sourcesIndex !== state[2]) { - state[3] = 0; - } - state[2] = encodeInteger(writer, sourcesIndex, state[2]); - state[3] = encodeInteger(writer, scopesIndex, state[3]); - } - if (callsite) { - const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; - if (sourcesIndex !== state[4]) { - state[5] = 0; - state[6] = 0; - } - else if (callLine !== state[5]) { - state[6] = 0; - } - state[4] = encodeInteger(writer, sourcesIndex, state[4]); - state[5] = encodeInteger(writer, callLine, state[5]); - state[6] = encodeInteger(writer, callColumn, state[6]); - } - if (bindings) { - for (const binding of bindings) { - if (binding.length > 1) - encodeInteger(writer, -binding.length, 0); - const expression = binding[0][0]; - encodeInteger(writer, expression, 0); - let bindingStartLine = startLine; - let bindingStartColumn = startColumn; - for (let i = 1; i < binding.length; i++) { - const expRange = binding[i]; - bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); - bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); - encodeInteger(writer, expRange[0], 0); - } - } - } - for (index++; index < ranges.length;) { - const next = ranges[index]; - const { 0: l, 1: c } = next; - if (l > endLine || (l === endLine && c >= endColumn)) { - break; - } - index = _encodeGeneratedRanges(ranges, index, writer, state); - } - if (state[0] < endLine) { - catchupLine(writer, state[0], endLine); - state[0] = endLine; - state[1] = 0; - } - else { - writer.write(comma); - } - state[1] = encodeInteger(writer, endColumn, state[1]); - return index; -} -function catchupLine(writer, lastLine, line) { - do { - writer.write(semicolon); - } while (++lastLine < line); -} - -function decode(mappings) { - const { length } = mappings; - const reader = new StringReader(mappings); - const decoded = []; - let genColumn = 0; - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - do { - const semi = reader.indexOf(';'); - const line = []; - let sorted = true; - let lastCol = 0; - genColumn = 0; - while (reader.pos < semi) { - let seg; - genColumn = decodeInteger(reader, genColumn); - if (genColumn < lastCol) - sorted = false; - lastCol = genColumn; - if (hasMoreVlq(reader, semi)) { - sourcesIndex = decodeInteger(reader, sourcesIndex); - sourceLine = decodeInteger(reader, sourceLine); - sourceColumn = decodeInteger(reader, sourceColumn); - if (hasMoreVlq(reader, semi)) { - namesIndex = decodeInteger(reader, namesIndex); - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; - } - else { - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; - } - } - else { - seg = [genColumn]; - } - line.push(seg); - reader.pos++; - } - if (!sorted) - sort(line); - decoded.push(line); - reader.pos = semi + 1; - } while (reader.pos <= length); - return decoded; -} -function sort(line) { - line.sort(sortComparator); -} -function sortComparator(a, b) { - return a[0] - b[0]; -} -function encode(decoded) { - const writer = new StringWriter(); - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) - writer.write(semicolon); - if (line.length === 0) - continue; - let genColumn = 0; - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - if (j > 0) - writer.write(comma); - genColumn = encodeInteger(writer, segment[0], genColumn); - if (segment.length === 1) - continue; - sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); - sourceLine = encodeInteger(writer, segment[2], sourceLine); - sourceColumn = encodeInteger(writer, segment[3], sourceColumn); - if (segment.length === 4) - continue; - namesIndex = encodeInteger(writer, segment[4], namesIndex); - } - } - return writer.flush(); -} - -export { decode, decodeGeneratedRanges, decodeOriginalScopes, encode, encodeGeneratedRanges, encodeOriginalScopes }; -//# sourceMappingURL=sourcemap-codec.mjs.map diff --git a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map b/web/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map deleted file mode 100644 index 73882288..00000000 --- a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-codec.mjs","sources":["../src/vlq.ts","../src/strings.ts","../src/scopes.ts","../src/sourcemap-codec.ts"],"sourcesContent":["import type { StringReader, StringWriter } from './strings';\n\nexport const comma = ','.charCodeAt(0);\nexport const semicolon = ';'.charCodeAt(0);\n\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\n\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n\nexport function decodeInteger(reader: StringReader, relative: number): number {\n let value = 0;\n let shift = 0;\n let integer = 0;\n\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n\n const shouldNegate = value & 1;\n value >>>= 1;\n\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n\n return relative + value;\n}\n\nexport function encodeInteger(builder: StringWriter, num: number, relative: number): number {\n let delta = num - relative;\n\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0) clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n\n return num;\n}\n\nexport function hasMoreVlq(reader: StringReader, max: number) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n","const bufLength = 1024 * 16;\n\n// Provide a fallback for older environments.\nconst td =\n typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf: Uint8Array): string {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf: Uint8Array): string {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n\nexport class StringWriter {\n pos = 0;\n private out = '';\n private buffer = new Uint8Array(bufLength);\n\n write(v: number): void {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n\n flush(): string {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\n\nexport class StringReader {\n pos = 0;\n private declare buffer: string;\n\n constructor(buffer: string) {\n this.buffer = buffer;\n }\n\n next(): number {\n return this.buffer.charCodeAt(this.pos++);\n }\n\n peek(): number {\n return this.buffer.charCodeAt(this.pos);\n }\n\n indexOf(char: string): number {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n","import { StringReader, StringWriter } from './strings';\nimport { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\n\nconst EMPTY: any[] = [];\n\ntype Line = number;\ntype Column = number;\ntype Kind = number;\ntype Name = number;\ntype Var = number;\ntype SourcesIndex = number;\ntype ScopesIndex = number;\n\ntype Mix = (A & O) | (B & O);\n\nexport type OriginalScope = Mix<\n [Line, Column, Line, Column, Kind],\n [Line, Column, Line, Column, Kind, Name],\n { vars: Var[] }\n>;\n\nexport type GeneratedRange = Mix<\n [Line, Column, Line, Column],\n [Line, Column, Line, Column, SourcesIndex, ScopesIndex],\n {\n callsite: CallSite | null;\n bindings: Binding[];\n isScope: boolean;\n }\n>;\nexport type CallSite = [SourcesIndex, Line, Column];\ntype Binding = BindingExpressionRange[];\nexport type BindingExpressionRange = [Name] | [Name, Line, Column];\n\nexport function decodeOriginalScopes(input: string): OriginalScope[] {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes: OriginalScope[] = [];\n const stack: OriginalScope[] = [];\n let line = 0;\n\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop()!;\n last[2] = line;\n last[3] = column;\n continue;\n }\n\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n\n const scope: OriginalScope = (\n hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]\n ) as OriginalScope;\n\n let vars: Var[] = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n\n scopes.push(scope);\n stack.push(scope);\n }\n\n return scopes;\n}\n\nexport function encodeOriginalScopes(scopes: OriginalScope[]): string {\n const writer = new StringWriter();\n\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeOriginalScopes(\n scopes: OriginalScope[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenColumn\n ],\n): number {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n\n if (index > 0) writer.write(comma);\n\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n\n return index;\n}\n\nexport function decodeGeneratedRanges(input: string): GeneratedRange[] {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges: GeneratedRange[] = [];\n const stack: GeneratedRange[] = [];\n\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop()!;\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n\n let callsite: CallSite | null = null;\n let bindings: Binding[] = EMPTY;\n let range: GeneratedRange;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0,\n );\n\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange;\n } else {\n range = [genLine, genColumn, 0, 0] as GeneratedRange;\n }\n\n range.isScope = !!hasScope;\n\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0,\n );\n\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges: BindingExpressionRange[];\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n\n ranges.push(range);\n stack.push(range);\n }\n\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n\n return ranges;\n}\n\nexport function encodeGeneratedRanges(ranges: GeneratedRange[]): string {\n if (ranges.length === 0) return '';\n\n const writer = new StringWriter();\n\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeGeneratedRanges(\n ranges: GeneratedRange[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenLine\n number, // GenColumn\n number, // DefSourcesIndex\n number, // DefScopesIndex\n number, // CallSourcesIndex\n number, // CallLine\n number, // CallColumn\n ],\n): number {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings,\n } = range;\n\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n\n state[1] = encodeInteger(writer, range[1], state[1]);\n\n const fields =\n (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn);\n encodeInteger(writer, expRange[0]!, 0);\n }\n }\n }\n\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n\n return index;\n}\n\nfunction catchupLine(writer: StringWriter, lastLine: number, line: number) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n","import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\nimport { StringWriter, StringReader } from './strings';\n\nexport {\n decodeOriginalScopes,\n encodeOriginalScopes,\n decodeGeneratedRanges,\n encodeGeneratedRanges,\n} from './scopes';\nexport type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes';\n\nexport type SourceMapSegment =\n | [number]\n | [number, number, number, number]\n | [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nexport function decode(mappings: string): SourceMapMappings {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded: SourceMapMappings = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n do {\n const semi = reader.indexOf(';');\n const line: SourceMapLine = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n\n while (reader.pos < semi) {\n let seg: SourceMapSegment;\n\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n\n line.push(seg);\n reader.pos++;\n }\n\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n\n return decoded;\n}\n\nfunction sort(line: SourceMapSegment[]) {\n line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[0] - b[0];\n}\n\nexport function encode(decoded: SourceMapMappings): string;\nexport function encode(decoded: Readonly): string;\nexport function encode(decoded: Readonly): string {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n\n let genColumn = 0;\n\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n\n genColumn = encodeInteger(writer, segment[0], genColumn);\n\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n\n return writer.flush();\n}\n"],"names":[],"mappings":"AAEO,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAE3C,MAAM,KAAK,GAAG,kEAAkE,CAAC;AACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;AAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC9B,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACjB,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAClB;SAEe,aAAa,CAAC,MAAoB,EAAE,QAAgB;IAClE,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,GAAG;QACD,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QACxB,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QACvB,KAAK,IAAI,CAAC,OAAO,GAAG,EAAE,KAAK,KAAK,CAAC;QACjC,KAAK,IAAI,CAAC,CAAC;KACZ,QAAQ,OAAO,GAAG,EAAE,EAAE;IAEvB,MAAM,YAAY,GAAG,KAAK,GAAG,CAAC,CAAC;IAC/B,KAAK,MAAM,CAAC,CAAC;IAEb,IAAI,YAAY,EAAE;QAChB,KAAK,GAAG,CAAC,UAAU,GAAG,CAAC,KAAK,CAAC;KAC9B;IAED,OAAO,QAAQ,GAAG,KAAK,CAAC;AAC1B,CAAC;SAEe,aAAa,CAAC,OAAqB,EAAE,GAAW,EAAE,QAAgB;IAChF,IAAI,KAAK,GAAG,GAAG,GAAG,QAAQ,CAAC;IAE3B,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;IACnD,GAAG;QACD,IAAI,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;QAC/B,KAAK,MAAM,CAAC,CAAC;QACb,IAAI,KAAK,GAAG,CAAC;YAAE,OAAO,IAAI,QAAQ,CAAC;QACnC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;KACnC,QAAQ,KAAK,GAAG,CAAC,EAAE;IAEpB,OAAO,GAAG,CAAC;AACb,CAAC;SAEe,UAAU,CAAC,MAAoB,EAAE,GAAW;IAC1D,IAAI,MAAM,CAAC,GAAG,IAAI,GAAG;QAAE,OAAO,KAAK,CAAC;IACpC,OAAO,MAAM,CAAC,IAAI,EAAE,KAAK,KAAK,CAAC;AACjC;;ACtDA,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;AAE5B;AACA,MAAM,EAAE,GACN,OAAO,WAAW,KAAK,WAAW;sBACd,IAAI,WAAW,EAAE;MACjC,OAAO,MAAM,KAAK,WAAW;UAC7B;YACE,MAAM,CAAC,GAAe;gBACpB,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;gBACpE,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;aACvB;SACF;UACD;YACE,MAAM,CAAC,GAAe;gBACpB,IAAI,GAAG,GAAG,EAAE,CAAC;gBACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACnC,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;iBACpC;gBACD,OAAO,GAAG,CAAC;aACZ;SACF,CAAC;MAEK,YAAY;IAAzB;QACE,QAAG,GAAG,CAAC,CAAC;QACA,QAAG,GAAG,EAAE,CAAC;QACT,WAAM,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC;KAe5C;IAbC,KAAK,CAAC,CAAS;QACb,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACxB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE;YAC1B,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC9B,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;SACd;KACF;IAED,KAAK;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAClC,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;KACjE;CACF;MAEY,YAAY;IAIvB,YAAY,MAAc;QAH1B,QAAG,GAAG,CAAC,CAAC;QAIN,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;KACtB;IAED,IAAI;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;KAC3C;IAED,IAAI;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACzC;IAED,OAAO,CAAC,IAAY;QAClB,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACtC,OAAO,GAAG,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC;KACzC;;;AC5DH,MAAM,KAAK,GAAU,EAAE,CAAC;SA+BR,oBAAoB,CAAC,KAAa;IAChD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,MAAM,GAAoB,EAAE,CAAC;IACnC,MAAM,KAAK,GAAoB,EAAE,CAAC;IAClC,IAAI,IAAI,GAAG,CAAC,CAAC;IAEb,OAAO,MAAM,CAAC,GAAG,GAAG,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE;QACxC,IAAI,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACnC,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAExC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;YAC/B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;YAC1B,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;YACf,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;YACjB,SAAS;SACV;QAED,MAAM,IAAI,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACxC,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;QAEhC,MAAM,KAAK,IACT,OAAO,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAC3E,CAAC;QAEnB,IAAI,IAAI,GAAU,KAAK,CAAC;QACxB,IAAI,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;YAC9B,IAAI,GAAG,EAAE,CAAC;YACV,GAAG;gBACD,MAAM,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;gBAC3C,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aACtB,QAAQ,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;SACtC;QACD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAElB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACnB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;SAEe,oBAAoB,CAAC,MAAuB;IAC1D,MAAM,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;IAElC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,GAAI;QACnC,CAAC,GAAG,qBAAqB,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;KACnD;IAED,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;AACxB,CAAC;AAED,SAAS,qBAAqB,CAC5B,MAAuB,EACvB,KAAa,EACb,MAAoB,EACpB,KAEC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5B,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAExF,IAAI,KAAK,GAAG,CAAC;QAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEnC,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;IACtC,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAE/B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC;IAC/C,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IACjC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAE3D,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE;QACpB,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;KAC7B;IAED,KAAK,KAAK,EAAE,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,GAAI;QACrC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3B,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,GAAG,OAAO,KAAK,CAAC,KAAK,OAAO,IAAI,CAAC,IAAI,SAAS,CAAC,EAAE;YACpD,MAAM;SACP;QACD,KAAK,GAAG,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;KAC7D;IAED,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;IAEpC,OAAO,KAAK,CAAC;AACf,CAAC;SAEe,qBAAqB,CAAC,KAAa;IACjD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,MAAM,GAAqB,EAAE,CAAC;IACpC,MAAM,KAAK,GAAqB,EAAE,CAAC;IAEnC,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,sBAAsB,GAAG,CAAC,CAAC;IAC/B,IAAI,oBAAoB,GAAG,CAAC,CAAC;IAC7B,IAAI,oBAAoB,GAAG,CAAC,CAAC;IAC7B,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,IAAI,cAAc,GAAG,CAAC,CAAC;IACvB,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,aAAa,GAAG,CAAC,CAAC;IAEtB,GAAG;QACD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,SAAS,GAAG,CAAC,CAAC;QAElB,OAAO,MAAM,CAAC,GAAG,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE;YACtC,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;YAE7C,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;gBAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;gBAC1B,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;gBAClB,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;gBACpB,SAAS;aACV;YAED,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YACxC,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;YACtC,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;YACpC,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;YAEjC,IAAI,QAAQ,GAAoB,IAAI,CAAC;YACrC,IAAI,QAAQ,GAAc,KAAK,CAAC;YAChC,IAAI,KAAqB,CAAC;YAC1B,IAAI,aAAa,EAAE;gBACjB,MAAM,eAAe,GAAG,aAAa,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;gBACtE,oBAAoB,GAAG,aAAa,CAClC,MAAM,EACN,sBAAsB,KAAK,eAAe,GAAG,oBAAoB,GAAG,CAAC,CACtE,CAAC;gBAEF,sBAAsB,GAAG,eAAe,CAAC;gBACzC,KAAK,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,eAAe,EAAE,oBAAoB,CAAmB,CAAC;aAC7F;iBAAM;gBACL,KAAK,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAmB,CAAC;aACtD;YAED,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,QAAQ,CAAC;YAE3B,IAAI,WAAW,EAAE;gBACf,MAAM,OAAO,GAAG,oBAAoB,CAAC;gBACrC,MAAM,QAAQ,GAAG,YAAY,CAAC;gBAC9B,oBAAoB,GAAG,aAAa,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;gBACnE,MAAM,UAAU,GAAG,OAAO,KAAK,oBAAoB,CAAC;gBACpD,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC;gBACpE,cAAc,GAAG,aAAa,CAC5B,MAAM,EACN,UAAU,IAAI,QAAQ,KAAK,YAAY,GAAG,cAAc,GAAG,CAAC,CAC7D,CAAC;gBAEF,QAAQ,GAAG,CAAC,oBAAoB,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;aACjE;YACD,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAE1B,IAAI,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;gBAC5B,QAAQ,GAAG,EAAE,CAAC;gBACd,GAAG;oBACD,WAAW,GAAG,OAAO,CAAC;oBACtB,aAAa,GAAG,SAAS,CAAC;oBAC1B,MAAM,gBAAgB,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;oBAClD,IAAI,gBAA0C,CAAC;oBAC/C,IAAI,gBAAgB,GAAG,CAAC,CAAC,EAAE;wBACzB,gBAAgB,GAAG,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;wBAChD,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,gBAAgB,EAAE,CAAC,EAAE,EAAE;4BAC1C,MAAM,MAAM,GAAG,WAAW,CAAC;4BAC3B,WAAW,GAAG,aAAa,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;4BACjD,aAAa,GAAG,aAAa,CAAC,MAAM,EAAE,WAAW,KAAK,MAAM,GAAG,aAAa,GAAG,CAAC,CAAC,CAAC;4BAClF,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;4BAC5C,gBAAgB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC;yBACjE;qBACF;yBAAM;wBACL,gBAAgB,GAAG,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;qBACzC;oBACD,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;iBACjC,QAAQ,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;aACpC;YACD,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAE1B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACnB;QAED,OAAO,EAAE,CAAC;QACV,MAAM,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC;KACvB,QAAQ,MAAM,CAAC,GAAG,GAAG,MAAM,EAAE;IAE9B,OAAO,MAAM,CAAC;AAChB,CAAC;SAEe,qBAAqB,CAAC,MAAwB;IAC5D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;IAElC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,GAAI;QACnC,CAAC,GAAG,sBAAsB,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACtE;IAED,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;AACxB,CAAC;AAED,SAAS,sBAAsB,CAC7B,MAAwB,EACxB,KAAa,EACb,MAAoB,EACpB,KAQC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5B,MAAM,EACJ,CAAC,EAAE,SAAS,EACZ,CAAC,EAAE,WAAW,EACd,CAAC,EAAE,OAAO,EACV,CAAC,EAAE,SAAS,EACZ,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,GAAG,KAAK,CAAC;IAEV,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE;QACxB,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;QACzC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;QACrB,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KACd;SAAM,IAAI,KAAK,GAAG,CAAC,EAAE;QACpB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KACrB;IAED,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAErD,MAAM,MAAM,GACV,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,MAAM,GAAG,CAAC,KAAK,QAAQ,GAAG,MAAM,GAAG,CAAC,CAAC,IAAI,OAAO,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC;IACvF,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAEjC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;QAClD,IAAI,YAAY,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;YAC7B,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SACd;QACD,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KACzD;IAED,IAAI,QAAQ,EAAE;QACZ,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,QAAS,CAAC;QACxE,IAAI,YAAY,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;YAC7B,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YACb,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SACd;aAAM,IAAI,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;YAChC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SACd;QACD,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KACxD;IAED,IAAI,QAAQ,EAAE;QACZ,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC9B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;gBAAE,aAAa,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YAClE,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACjC,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;YACrC,IAAI,gBAAgB,GAAG,SAAS,CAAC;YACjC,IAAI,kBAAkB,GAAG,WAAW,CAAC;YACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;gBAC5B,gBAAgB,GAAG,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAE,EAAE,gBAAgB,CAAC,CAAC;gBACzE,kBAAkB,GAAG,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAE,EAAE,kBAAkB,CAAC,CAAC;gBAC7E,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAE,EAAE,CAAC,CAAC,CAAC;aACxC;SACF;KACF;IAED,KAAK,KAAK,EAAE,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,GAAI;QACrC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3B,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,GAAG,OAAO,KAAK,CAAC,KAAK,OAAO,IAAI,CAAC,IAAI,SAAS,CAAC,EAAE;YACpD,MAAM;SACP;QACD,KAAK,GAAG,sBAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;KAC9D;IAED,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,EAAE;QACtB,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;QACvC,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KACd;SAAM;QACL,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KACrB;IACD,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,WAAW,CAAC,MAAoB,EAAE,QAAgB,EAAE,IAAY;IACvE,GAAG;QACD,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;KACzB,QAAQ,EAAE,QAAQ,GAAG,IAAI,EAAE;AAC9B;;SCtUgB,MAAM,CAAC,QAAgB;IACrC,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;IAC5B,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAsB,EAAE,CAAC;IACtC,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,IAAI,UAAU,GAAG,CAAC,CAAC;IAEnB,GAAG;QACD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,MAAM,IAAI,GAAkB,EAAE,CAAC;QAC/B,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,SAAS,GAAG,CAAC,CAAC;QAEd,OAAO,MAAM,CAAC,GAAG,GAAG,IAAI,EAAE;YACxB,IAAI,GAAqB,CAAC;YAE1B,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;YAC7C,IAAI,SAAS,GAAG,OAAO;gBAAE,MAAM,GAAG,KAAK,CAAC;YACxC,OAAO,GAAG,SAAS,CAAC;YAEpB,IAAI,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;gBAC5B,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;gBACnD,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;gBAC/C,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;gBAEnD,IAAI,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;oBAC5B,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;oBAC/C,GAAG,GAAG,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;iBACvE;qBAAM;oBACL,GAAG,GAAG,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;iBAC3D;aACF;iBAAM;gBACL,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC;aACnB;YAED,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACf,MAAM,CAAC,GAAG,EAAE,CAAC;SACd;QAED,IAAI,CAAC,MAAM;YAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACxB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,MAAM,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC;KACvB,QAAQ,MAAM,CAAC,GAAG,IAAI,MAAM,EAAE;IAE/B,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,IAAI,CAAC,IAAwB;IACpC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,cAAc,CAAC,CAAmB,EAAE,CAAmB;IAC9D,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC;SAIe,MAAM,CAAC,OAAoC;IACzD,MAAM,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;IAClC,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,IAAI,UAAU,GAAG,CAAC,CAAC;IAEnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,CAAC,GAAG,CAAC;YAAE,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACnC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAEhC,IAAI,SAAS,GAAG,CAAC,CAAC;QAElB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACpC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC;gBAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAE/B,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;YAEzD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YACnC,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;YAC/D,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;YAC3D,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;YAE/D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YACnC,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;SAC5D;KACF;IAED,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;AACxB;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js b/web/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js deleted file mode 100644 index 93caf176..00000000 --- a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +++ /dev/null @@ -1,439 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {})); -})(this, (function (exports) { 'use strict'; - - const comma = ','.charCodeAt(0); - const semicolon = ';'.charCodeAt(0); - const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - const intToChar = new Uint8Array(64); // 64 possible chars. - const charToInt = new Uint8Array(128); // z is 122 in ASCII - for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; - } - function decodeInteger(reader, relative) { - let value = 0; - let shift = 0; - let integer = 0; - do { - const c = reader.next(); - integer = charToInt[c]; - value |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - const shouldNegate = value & 1; - value >>>= 1; - if (shouldNegate) { - value = -0x80000000 | -value; - } - return relative + value; - } - function encodeInteger(builder, num, relative) { - let delta = num - relative; - delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; - do { - let clamped = delta & 0b011111; - delta >>>= 5; - if (delta > 0) - clamped |= 0b100000; - builder.write(intToChar[clamped]); - } while (delta > 0); - return num; - } - function hasMoreVlq(reader, max) { - if (reader.pos >= max) - return false; - return reader.peek() !== comma; - } - - const bufLength = 1024 * 16; - // Provide a fallback for older environments. - const td = typeof TextDecoder !== 'undefined' - ? /* #__PURE__ */ new TextDecoder() - : typeof Buffer !== 'undefined' - ? { - decode(buf) { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - }, - } - : { - decode(buf) { - let out = ''; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - }, - }; - class StringWriter { - constructor() { - this.pos = 0; - this.out = ''; - this.buffer = new Uint8Array(bufLength); - } - write(v) { - const { buffer } = this; - buffer[this.pos++] = v; - if (this.pos === bufLength) { - this.out += td.decode(buffer); - this.pos = 0; - } - } - flush() { - const { buffer, out, pos } = this; - return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; - } - } - class StringReader { - constructor(buffer) { - this.pos = 0; - this.buffer = buffer; - } - next() { - return this.buffer.charCodeAt(this.pos++); - } - peek() { - return this.buffer.charCodeAt(this.pos); - } - indexOf(char) { - const { buffer, pos } = this; - const idx = buffer.indexOf(char, pos); - return idx === -1 ? buffer.length : idx; - } - } - - const EMPTY = []; - function decodeOriginalScopes(input) { - const { length } = input; - const reader = new StringReader(input); - const scopes = []; - const stack = []; - let line = 0; - for (; reader.pos < length; reader.pos++) { - line = decodeInteger(reader, line); - const column = decodeInteger(reader, 0); - if (!hasMoreVlq(reader, length)) { - const last = stack.pop(); - last[2] = line; - last[3] = column; - continue; - } - const kind = decodeInteger(reader, 0); - const fields = decodeInteger(reader, 0); - const hasName = fields & 0b0001; - const scope = (hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]); - let vars = EMPTY; - if (hasMoreVlq(reader, length)) { - vars = []; - do { - const varsIndex = decodeInteger(reader, 0); - vars.push(varsIndex); - } while (hasMoreVlq(reader, length)); - } - scope.vars = vars; - scopes.push(scope); - stack.push(scope); - } - return scopes; - } - function encodeOriginalScopes(scopes) { - const writer = new StringWriter(); - for (let i = 0; i < scopes.length;) { - i = _encodeOriginalScopes(scopes, i, writer, [0]); - } - return writer.flush(); - } - function _encodeOriginalScopes(scopes, index, writer, state) { - const scope = scopes[index]; - const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; - if (index > 0) - writer.write(comma); - state[0] = encodeInteger(writer, startLine, state[0]); - encodeInteger(writer, startColumn, 0); - encodeInteger(writer, kind, 0); - const fields = scope.length === 6 ? 0b0001 : 0; - encodeInteger(writer, fields, 0); - if (scope.length === 6) - encodeInteger(writer, scope[5], 0); - for (const v of vars) { - encodeInteger(writer, v, 0); - } - for (index++; index < scopes.length;) { - const next = scopes[index]; - const { 0: l, 1: c } = next; - if (l > endLine || (l === endLine && c >= endColumn)) { - break; - } - index = _encodeOriginalScopes(scopes, index, writer, state); - } - writer.write(comma); - state[0] = encodeInteger(writer, endLine, state[0]); - encodeInteger(writer, endColumn, 0); - return index; - } - function decodeGeneratedRanges(input) { - const { length } = input; - const reader = new StringReader(input); - const ranges = []; - const stack = []; - let genLine = 0; - let definitionSourcesIndex = 0; - let definitionScopeIndex = 0; - let callsiteSourcesIndex = 0; - let callsiteLine = 0; - let callsiteColumn = 0; - let bindingLine = 0; - let bindingColumn = 0; - do { - const semi = reader.indexOf(';'); - let genColumn = 0; - for (; reader.pos < semi; reader.pos++) { - genColumn = decodeInteger(reader, genColumn); - if (!hasMoreVlq(reader, semi)) { - const last = stack.pop(); - last[2] = genLine; - last[3] = genColumn; - continue; - } - const fields = decodeInteger(reader, 0); - const hasDefinition = fields & 0b0001; - const hasCallsite = fields & 0b0010; - const hasScope = fields & 0b0100; - let callsite = null; - let bindings = EMPTY; - let range; - if (hasDefinition) { - const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); - definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0); - definitionSourcesIndex = defSourcesIndex; - range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; - } - else { - range = [genLine, genColumn, 0, 0]; - } - range.isScope = !!hasScope; - if (hasCallsite) { - const prevCsi = callsiteSourcesIndex; - const prevLine = callsiteLine; - callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); - const sameSource = prevCsi === callsiteSourcesIndex; - callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); - callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0); - callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; - } - range.callsite = callsite; - if (hasMoreVlq(reader, semi)) { - bindings = []; - do { - bindingLine = genLine; - bindingColumn = genColumn; - const expressionsCount = decodeInteger(reader, 0); - let expressionRanges; - if (expressionsCount < -1) { - expressionRanges = [[decodeInteger(reader, 0)]]; - for (let i = -1; i > expressionsCount; i--) { - const prevBl = bindingLine; - bindingLine = decodeInteger(reader, bindingLine); - bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); - const expression = decodeInteger(reader, 0); - expressionRanges.push([expression, bindingLine, bindingColumn]); - } - } - else { - expressionRanges = [[expressionsCount]]; - } - bindings.push(expressionRanges); - } while (hasMoreVlq(reader, semi)); - } - range.bindings = bindings; - ranges.push(range); - stack.push(range); - } - genLine++; - reader.pos = semi + 1; - } while (reader.pos < length); - return ranges; - } - function encodeGeneratedRanges(ranges) { - if (ranges.length === 0) - return ''; - const writer = new StringWriter(); - for (let i = 0; i < ranges.length;) { - i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); - } - return writer.flush(); - } - function _encodeGeneratedRanges(ranges, index, writer, state) { - const range = ranges[index]; - const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings, } = range; - if (state[0] < startLine) { - catchupLine(writer, state[0], startLine); - state[0] = startLine; - state[1] = 0; - } - else if (index > 0) { - writer.write(comma); - } - state[1] = encodeInteger(writer, range[1], state[1]); - const fields = (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); - encodeInteger(writer, fields, 0); - if (range.length === 6) { - const { 4: sourcesIndex, 5: scopesIndex } = range; - if (sourcesIndex !== state[2]) { - state[3] = 0; - } - state[2] = encodeInteger(writer, sourcesIndex, state[2]); - state[3] = encodeInteger(writer, scopesIndex, state[3]); - } - if (callsite) { - const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; - if (sourcesIndex !== state[4]) { - state[5] = 0; - state[6] = 0; - } - else if (callLine !== state[5]) { - state[6] = 0; - } - state[4] = encodeInteger(writer, sourcesIndex, state[4]); - state[5] = encodeInteger(writer, callLine, state[5]); - state[6] = encodeInteger(writer, callColumn, state[6]); - } - if (bindings) { - for (const binding of bindings) { - if (binding.length > 1) - encodeInteger(writer, -binding.length, 0); - const expression = binding[0][0]; - encodeInteger(writer, expression, 0); - let bindingStartLine = startLine; - let bindingStartColumn = startColumn; - for (let i = 1; i < binding.length; i++) { - const expRange = binding[i]; - bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); - bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); - encodeInteger(writer, expRange[0], 0); - } - } - } - for (index++; index < ranges.length;) { - const next = ranges[index]; - const { 0: l, 1: c } = next; - if (l > endLine || (l === endLine && c >= endColumn)) { - break; - } - index = _encodeGeneratedRanges(ranges, index, writer, state); - } - if (state[0] < endLine) { - catchupLine(writer, state[0], endLine); - state[0] = endLine; - state[1] = 0; - } - else { - writer.write(comma); - } - state[1] = encodeInteger(writer, endColumn, state[1]); - return index; - } - function catchupLine(writer, lastLine, line) { - do { - writer.write(semicolon); - } while (++lastLine < line); - } - - function decode(mappings) { - const { length } = mappings; - const reader = new StringReader(mappings); - const decoded = []; - let genColumn = 0; - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - do { - const semi = reader.indexOf(';'); - const line = []; - let sorted = true; - let lastCol = 0; - genColumn = 0; - while (reader.pos < semi) { - let seg; - genColumn = decodeInteger(reader, genColumn); - if (genColumn < lastCol) - sorted = false; - lastCol = genColumn; - if (hasMoreVlq(reader, semi)) { - sourcesIndex = decodeInteger(reader, sourcesIndex); - sourceLine = decodeInteger(reader, sourceLine); - sourceColumn = decodeInteger(reader, sourceColumn); - if (hasMoreVlq(reader, semi)) { - namesIndex = decodeInteger(reader, namesIndex); - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; - } - else { - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; - } - } - else { - seg = [genColumn]; - } - line.push(seg); - reader.pos++; - } - if (!sorted) - sort(line); - decoded.push(line); - reader.pos = semi + 1; - } while (reader.pos <= length); - return decoded; - } - function sort(line) { - line.sort(sortComparator); - } - function sortComparator(a, b) { - return a[0] - b[0]; - } - function encode(decoded) { - const writer = new StringWriter(); - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) - writer.write(semicolon); - if (line.length === 0) - continue; - let genColumn = 0; - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - if (j > 0) - writer.write(comma); - genColumn = encodeInteger(writer, segment[0], genColumn); - if (segment.length === 1) - continue; - sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); - sourceLine = encodeInteger(writer, segment[2], sourceLine); - sourceColumn = encodeInteger(writer, segment[3], sourceColumn); - if (segment.length === 4) - continue; - namesIndex = encodeInteger(writer, segment[4], namesIndex); - } - } - return writer.flush(); - } - - exports.decode = decode; - exports.decodeGeneratedRanges = decodeGeneratedRanges; - exports.decodeOriginalScopes = decodeOriginalScopes; - exports.encode = encode; - exports.encodeGeneratedRanges = encodeGeneratedRanges; - exports.encodeOriginalScopes = encodeOriginalScopes; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); -//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/web/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map deleted file mode 100644 index 65b36746..00000000 --- a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-codec.umd.js","sources":["../src/vlq.ts","../src/strings.ts","../src/scopes.ts","../src/sourcemap-codec.ts"],"sourcesContent":["import type { StringReader, StringWriter } from './strings';\n\nexport const comma = ','.charCodeAt(0);\nexport const semicolon = ';'.charCodeAt(0);\n\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\n\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n\nexport function decodeInteger(reader: StringReader, relative: number): number {\n let value = 0;\n let shift = 0;\n let integer = 0;\n\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n\n const shouldNegate = value & 1;\n value >>>= 1;\n\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n\n return relative + value;\n}\n\nexport function encodeInteger(builder: StringWriter, num: number, relative: number): number {\n let delta = num - relative;\n\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0) clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n\n return num;\n}\n\nexport function hasMoreVlq(reader: StringReader, max: number) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n","const bufLength = 1024 * 16;\n\n// Provide a fallback for older environments.\nconst td =\n typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf: Uint8Array): string {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf: Uint8Array): string {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n\nexport class StringWriter {\n pos = 0;\n private out = '';\n private buffer = new Uint8Array(bufLength);\n\n write(v: number): void {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n\n flush(): string {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\n\nexport class StringReader {\n pos = 0;\n private declare buffer: string;\n\n constructor(buffer: string) {\n this.buffer = buffer;\n }\n\n next(): number {\n return this.buffer.charCodeAt(this.pos++);\n }\n\n peek(): number {\n return this.buffer.charCodeAt(this.pos);\n }\n\n indexOf(char: string): number {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n","import { StringReader, StringWriter } from './strings';\nimport { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\n\nconst EMPTY: any[] = [];\n\ntype Line = number;\ntype Column = number;\ntype Kind = number;\ntype Name = number;\ntype Var = number;\ntype SourcesIndex = number;\ntype ScopesIndex = number;\n\ntype Mix = (A & O) | (B & O);\n\nexport type OriginalScope = Mix<\n [Line, Column, Line, Column, Kind],\n [Line, Column, Line, Column, Kind, Name],\n { vars: Var[] }\n>;\n\nexport type GeneratedRange = Mix<\n [Line, Column, Line, Column],\n [Line, Column, Line, Column, SourcesIndex, ScopesIndex],\n {\n callsite: CallSite | null;\n bindings: Binding[];\n isScope: boolean;\n }\n>;\nexport type CallSite = [SourcesIndex, Line, Column];\ntype Binding = BindingExpressionRange[];\nexport type BindingExpressionRange = [Name] | [Name, Line, Column];\n\nexport function decodeOriginalScopes(input: string): OriginalScope[] {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes: OriginalScope[] = [];\n const stack: OriginalScope[] = [];\n let line = 0;\n\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop()!;\n last[2] = line;\n last[3] = column;\n continue;\n }\n\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n\n const scope: OriginalScope = (\n hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]\n ) as OriginalScope;\n\n let vars: Var[] = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n\n scopes.push(scope);\n stack.push(scope);\n }\n\n return scopes;\n}\n\nexport function encodeOriginalScopes(scopes: OriginalScope[]): string {\n const writer = new StringWriter();\n\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeOriginalScopes(\n scopes: OriginalScope[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenColumn\n ],\n): number {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n\n if (index > 0) writer.write(comma);\n\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n\n return index;\n}\n\nexport function decodeGeneratedRanges(input: string): GeneratedRange[] {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges: GeneratedRange[] = [];\n const stack: GeneratedRange[] = [];\n\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop()!;\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n\n let callsite: CallSite | null = null;\n let bindings: Binding[] = EMPTY;\n let range: GeneratedRange;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0,\n );\n\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange;\n } else {\n range = [genLine, genColumn, 0, 0] as GeneratedRange;\n }\n\n range.isScope = !!hasScope;\n\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0,\n );\n\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges: BindingExpressionRange[];\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n\n ranges.push(range);\n stack.push(range);\n }\n\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n\n return ranges;\n}\n\nexport function encodeGeneratedRanges(ranges: GeneratedRange[]): string {\n if (ranges.length === 0) return '';\n\n const writer = new StringWriter();\n\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeGeneratedRanges(\n ranges: GeneratedRange[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenLine\n number, // GenColumn\n number, // DefSourcesIndex\n number, // DefScopesIndex\n number, // CallSourcesIndex\n number, // CallLine\n number, // CallColumn\n ],\n): number {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings,\n } = range;\n\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n\n state[1] = encodeInteger(writer, range[1], state[1]);\n\n const fields =\n (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn);\n encodeInteger(writer, expRange[0]!, 0);\n }\n }\n }\n\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n\n return index;\n}\n\nfunction catchupLine(writer: StringWriter, lastLine: number, line: number) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n","import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\nimport { StringWriter, StringReader } from './strings';\n\nexport {\n decodeOriginalScopes,\n encodeOriginalScopes,\n decodeGeneratedRanges,\n encodeGeneratedRanges,\n} from './scopes';\nexport type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes';\n\nexport type SourceMapSegment =\n | [number]\n | [number, number, number, number]\n | [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nexport function decode(mappings: string): SourceMapMappings {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded: SourceMapMappings = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n do {\n const semi = reader.indexOf(';');\n const line: SourceMapLine = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n\n while (reader.pos < semi) {\n let seg: SourceMapSegment;\n\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n\n line.push(seg);\n reader.pos++;\n }\n\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n\n return decoded;\n}\n\nfunction sort(line: SourceMapSegment[]) {\n line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[0] - b[0];\n}\n\nexport function encode(decoded: SourceMapMappings): string;\nexport function encode(decoded: Readonly): string;\nexport function encode(decoded: Readonly): string {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n\n let genColumn = 0;\n\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n\n genColumn = encodeInteger(writer, segment[0], genColumn);\n\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n\n return writer.flush();\n}\n"],"names":[],"mappings":";;;;;;IAEO,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAE3C,MAAM,KAAK,GAAG,kEAAkE,CAAC;IACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACjB,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KAClB;aAEe,aAAa,CAAC,MAAoB,EAAE,QAAgB;QAClE,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,OAAO,GAAG,CAAC,CAAC;QAEhB,GAAG;YACD,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;YACxB,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;YACvB,KAAK,IAAI,CAAC,OAAO,GAAG,EAAE,KAAK,KAAK,CAAC;YACjC,KAAK,IAAI,CAAC,CAAC;SACZ,QAAQ,OAAO,GAAG,EAAE,EAAE;QAEvB,MAAM,YAAY,GAAG,KAAK,GAAG,CAAC,CAAC;QAC/B,KAAK,MAAM,CAAC,CAAC;QAEb,IAAI,YAAY,EAAE;YAChB,KAAK,GAAG,CAAC,UAAU,GAAG,CAAC,KAAK,CAAC;SAC9B;QAED,OAAO,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;aAEe,aAAa,CAAC,OAAqB,EAAE,GAAW,EAAE,QAAgB;QAChF,IAAI,KAAK,GAAG,GAAG,GAAG,QAAQ,CAAC;QAE3B,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;QACnD,GAAG;YACD,IAAI,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;YAC/B,KAAK,MAAM,CAAC,CAAC;YACb,IAAI,KAAK,GAAG,CAAC;gBAAE,OAAO,IAAI,QAAQ,CAAC;YACnC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;SACnC,QAAQ,KAAK,GAAG,CAAC,EAAE;QAEpB,OAAO,GAAG,CAAC;IACb,CAAC;aAEe,UAAU,CAAC,MAAoB,EAAE,GAAW;QAC1D,IAAI,MAAM,CAAC,GAAG,IAAI,GAAG;YAAE,OAAO,KAAK,CAAC;QACpC,OAAO,MAAM,CAAC,IAAI,EAAE,KAAK,KAAK,CAAC;IACjC;;ICtDA,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;IAE5B;IACA,MAAM,EAAE,GACN,OAAO,WAAW,KAAK,WAAW;0BACd,IAAI,WAAW,EAAE;UACjC,OAAO,MAAM,KAAK,WAAW;cAC7B;gBACE,MAAM,CAAC,GAAe;oBACpB,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;oBACpE,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;iBACvB;aACF;cACD;gBACE,MAAM,CAAC,GAAe;oBACpB,IAAI,GAAG,GAAG,EAAE,CAAC;oBACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBACnC,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;qBACpC;oBACD,OAAO,GAAG,CAAC;iBACZ;aACF,CAAC;UAEK,YAAY;QAAzB;YACE,QAAG,GAAG,CAAC,CAAC;YACA,QAAG,GAAG,EAAE,CAAC;YACT,WAAM,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC;SAe5C;QAbC,KAAK,CAAC,CAAS;YACb,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YACxB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;YACvB,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE;gBAC1B,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAC9B,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;aACd;SACF;QAED,KAAK;YACH,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;YAClC,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;SACjE;KACF;UAEY,YAAY;QAIvB,YAAY,MAAc;YAH1B,QAAG,GAAG,CAAC,CAAC;YAIN,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;SACtB;QAED,IAAI;YACF,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;SAC3C;QAED,IAAI;YACF,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACzC;QAED,OAAO,CAAC,IAAY;YAClB,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;YAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YACtC,OAAO,GAAG,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC;SACzC;;;IC5DH,MAAM,KAAK,GAAU,EAAE,CAAC;aA+BR,oBAAoB,CAAC,KAAa;QAChD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QACzB,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,MAAM,GAAoB,EAAE,CAAC;QACnC,MAAM,KAAK,GAAoB,EAAE,CAAC;QAClC,IAAI,IAAI,GAAG,CAAC,CAAC;QAEb,OAAO,MAAM,CAAC,GAAG,GAAG,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE;YACxC,IAAI,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACnC,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YAExC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;gBAC/B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;gBAC1B,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;gBACf,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;gBACjB,SAAS;aACV;YAED,MAAM,IAAI,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YACtC,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YACxC,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;YAEhC,MAAM,KAAK,IACT,OAAO,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAC3E,CAAC;YAEnB,IAAI,IAAI,GAAU,KAAK,CAAC;YACxB,IAAI,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;gBAC9B,IAAI,GAAG,EAAE,CAAC;gBACV,GAAG;oBACD,MAAM,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;oBAC3C,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACtB,QAAQ,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;aACtC;YACD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;YAElB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACnB;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;aAEe,oBAAoB,CAAC,MAAuB;QAC1D,MAAM,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;QAElC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,GAAI;YACnC,CAAC,GAAG,qBAAqB,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;SACnD;QAED,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IAED,SAAS,qBAAqB,CAC5B,MAAuB,EACvB,KAAa,EACb,MAAoB,EACpB,KAEC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;QAExF,IAAI,KAAK,GAAG,CAAC;YAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAEnC,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACtD,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;QACtC,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAE/B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC;QAC/C,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACjC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAE3D,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE;YACpB,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;SAC7B;QAED,KAAK,KAAK,EAAE,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,GAAI;YACrC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAC3B,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC;YAC5B,IAAI,CAAC,GAAG,OAAO,KAAK,CAAC,KAAK,OAAO,IAAI,CAAC,IAAI,SAAS,CAAC,EAAE;gBACpD,MAAM;aACP;YACD,KAAK,GAAG,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;SAC7D;QAED,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpB,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACpD,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;QAEpC,OAAO,KAAK,CAAC;IACf,CAAC;aAEe,qBAAqB,CAAC,KAAa;QACjD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QACzB,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,MAAM,GAAqB,EAAE,CAAC;QACpC,MAAM,KAAK,GAAqB,EAAE,CAAC;QAEnC,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,IAAI,sBAAsB,GAAG,CAAC,CAAC;QAC/B,IAAI,oBAAoB,GAAG,CAAC,CAAC;QAC7B,IAAI,oBAAoB,GAAG,CAAC,CAAC;QAC7B,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,cAAc,GAAG,CAAC,CAAC;QACvB,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,IAAI,aAAa,GAAG,CAAC,CAAC;QAEtB,GAAG;YACD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACjC,IAAI,SAAS,GAAG,CAAC,CAAC;YAElB,OAAO,MAAM,CAAC,GAAG,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE;gBACtC,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;gBAE7C,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;oBAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;oBAC1B,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;oBAClB,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;oBACpB,SAAS;iBACV;gBAED,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;gBACxC,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;gBACtC,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;gBACpC,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;gBAEjC,IAAI,QAAQ,GAAoB,IAAI,CAAC;gBACrC,IAAI,QAAQ,GAAc,KAAK,CAAC;gBAChC,IAAI,KAAqB,CAAC;gBAC1B,IAAI,aAAa,EAAE;oBACjB,MAAM,eAAe,GAAG,aAAa,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;oBACtE,oBAAoB,GAAG,aAAa,CAClC,MAAM,EACN,sBAAsB,KAAK,eAAe,GAAG,oBAAoB,GAAG,CAAC,CACtE,CAAC;oBAEF,sBAAsB,GAAG,eAAe,CAAC;oBACzC,KAAK,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,eAAe,EAAE,oBAAoB,CAAmB,CAAC;iBAC7F;qBAAM;oBACL,KAAK,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAmB,CAAC;iBACtD;gBAED,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,QAAQ,CAAC;gBAE3B,IAAI,WAAW,EAAE;oBACf,MAAM,OAAO,GAAG,oBAAoB,CAAC;oBACrC,MAAM,QAAQ,GAAG,YAAY,CAAC;oBAC9B,oBAAoB,GAAG,aAAa,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;oBACnE,MAAM,UAAU,GAAG,OAAO,KAAK,oBAAoB,CAAC;oBACpD,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC;oBACpE,cAAc,GAAG,aAAa,CAC5B,MAAM,EACN,UAAU,IAAI,QAAQ,KAAK,YAAY,GAAG,cAAc,GAAG,CAAC,CAC7D,CAAC;oBAEF,QAAQ,GAAG,CAAC,oBAAoB,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;iBACjE;gBACD,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBAE1B,IAAI,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;oBAC5B,QAAQ,GAAG,EAAE,CAAC;oBACd,GAAG;wBACD,WAAW,GAAG,OAAO,CAAC;wBACtB,aAAa,GAAG,SAAS,CAAC;wBAC1B,MAAM,gBAAgB,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;wBAClD,IAAI,gBAA0C,CAAC;wBAC/C,IAAI,gBAAgB,GAAG,CAAC,CAAC,EAAE;4BACzB,gBAAgB,GAAG,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;4BAChD,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,gBAAgB,EAAE,CAAC,EAAE,EAAE;gCAC1C,MAAM,MAAM,GAAG,WAAW,CAAC;gCAC3B,WAAW,GAAG,aAAa,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;gCACjD,aAAa,GAAG,aAAa,CAAC,MAAM,EAAE,WAAW,KAAK,MAAM,GAAG,aAAa,GAAG,CAAC,CAAC,CAAC;gCAClF,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;gCAC5C,gBAAgB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC;6BACjE;yBACF;6BAAM;4BACL,gBAAgB,GAAG,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;yBACzC;wBACD,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;qBACjC,QAAQ,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;iBACpC;gBACD,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBAE1B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACnB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACnB;YAED,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC;SACvB,QAAQ,MAAM,CAAC,GAAG,GAAG,MAAM,EAAE;QAE9B,OAAO,MAAM,CAAC;IAChB,CAAC;aAEe,qBAAqB,CAAC,MAAwB;QAC5D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAEnC,MAAM,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;QAElC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,GAAI;YACnC,CAAC,GAAG,sBAAsB,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SACtE;QAED,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IAED,SAAS,sBAAsB,CAC7B,MAAwB,EACxB,KAAa,EACb,MAAoB,EACpB,KAQC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM,EACJ,CAAC,EAAE,SAAS,EACZ,CAAC,EAAE,WAAW,EACd,CAAC,EAAE,OAAO,EACV,CAAC,EAAE,SAAS,EACZ,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,GAAG,KAAK,CAAC;QAEV,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE;YACxB,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;YACzC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;YACrB,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SACd;aAAM,IAAI,KAAK,GAAG,CAAC,EAAE;YACpB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACrB;QAED,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAErD,MAAM,MAAM,GACV,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,MAAM,GAAG,CAAC,KAAK,QAAQ,GAAG,MAAM,GAAG,CAAC,CAAC,IAAI,OAAO,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC;QACvF,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QAEjC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;YAClD,IAAI,YAAY,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;gBAC7B,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;aACd;YACD,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACzD,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACzD;QAED,IAAI,QAAQ,EAAE;YACZ,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,QAAS,CAAC;YACxE,IAAI,YAAY,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;gBAC7B,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;gBACb,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;aACd;iBAAM,IAAI,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;gBAChC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;aACd;YACD,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACzD,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACrD,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACxD;QAED,IAAI,QAAQ,EAAE;YACZ,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;gBAC9B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;oBAAE,aAAa,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;gBAClE,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACjC,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;gBACrC,IAAI,gBAAgB,GAAG,SAAS,CAAC;gBACjC,IAAI,kBAAkB,GAAG,WAAW,CAAC;gBACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;oBAC5B,gBAAgB,GAAG,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAE,EAAE,gBAAgB,CAAC,CAAC;oBACzE,kBAAkB,GAAG,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAE,EAAE,kBAAkB,CAAC,CAAC;oBAC7E,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAE,EAAE,CAAC,CAAC,CAAC;iBACxC;aACF;SACF;QAED,KAAK,KAAK,EAAE,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,GAAI;YACrC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAC3B,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC;YAC5B,IAAI,CAAC,GAAG,OAAO,KAAK,CAAC,KAAK,OAAO,IAAI,CAAC,IAAI,SAAS,CAAC,EAAE;gBACpD,MAAM;aACP;YACD,KAAK,GAAG,sBAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;SAC9D;QAED,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,EAAE;YACtB,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YACvC,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;YACnB,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SACd;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACrB;QACD,KAAK,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,SAAS,WAAW,CAAC,MAAoB,EAAE,QAAgB,EAAE,IAAY;QACvE,GAAG;YACD,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;SACzB,QAAQ,EAAE,QAAQ,GAAG,IAAI,EAAE;IAC9B;;aCtUgB,MAAM,CAAC,QAAgB;QACrC,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;QAC5B,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC1C,MAAM,OAAO,GAAsB,EAAE,CAAC;QACtC,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,UAAU,GAAG,CAAC,CAAC;QAEnB,GAAG;YACD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACjC,MAAM,IAAI,GAAkB,EAAE,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,CAAC;YAClB,IAAI,OAAO,GAAG,CAAC,CAAC;YAChB,SAAS,GAAG,CAAC,CAAC;YAEd,OAAO,MAAM,CAAC,GAAG,GAAG,IAAI,EAAE;gBACxB,IAAI,GAAqB,CAAC;gBAE1B,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;gBAC7C,IAAI,SAAS,GAAG,OAAO;oBAAE,MAAM,GAAG,KAAK,CAAC;gBACxC,OAAO,GAAG,SAAS,CAAC;gBAEpB,IAAI,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;oBAC5B,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;oBACnD,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;oBAC/C,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;oBAEnD,IAAI,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;wBAC5B,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;wBAC/C,GAAG,GAAG,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;qBACvE;yBAAM;wBACL,GAAG,GAAG,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;qBAC3D;iBACF;qBAAM;oBACL,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC;iBACnB;gBAED,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACf,MAAM,CAAC,GAAG,EAAE,CAAC;aACd;YAED,IAAI,CAAC,MAAM;gBAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACxB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,MAAM,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC;SACvB,QAAQ,MAAM,CAAC,GAAG,IAAI,MAAM,EAAE;QAE/B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,SAAS,IAAI,CAAC,IAAwB;QACpC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC5B,CAAC;IAED,SAAS,cAAc,CAAC,CAAmB,EAAE,CAAmB;QAC9D,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC;aAIe,MAAM,CAAC,OAAoC;QACzD,MAAM,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;QAClC,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,UAAU,GAAG,CAAC,CAAC;QAEnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC;gBAAE,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACnC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YAEhC,IAAI,SAAS,GAAG,CAAC,CAAC;YAElB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACpC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBACxB,IAAI,CAAC,GAAG,CAAC;oBAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAE/B,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;gBAEzD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;oBAAE,SAAS;gBACnC,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;gBAC/D,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;gBAC3D,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;gBAE/D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;oBAAE,SAAS;gBACnC,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;aAC5D;SACF;QAED,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;IACxB;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts b/web/static/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts deleted file mode 100644 index d156fabd..00000000 --- a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -declare type Line = number; -declare type Column = number; -declare type Kind = number; -declare type Name = number; -declare type Var = number; -declare type SourcesIndex = number; -declare type ScopesIndex = number; -declare type Mix = (A & O) | (B & O); -export declare type OriginalScope = Mix<[ - Line, - Column, - Line, - Column, - Kind -], [ - Line, - Column, - Line, - Column, - Kind, - Name -], { - vars: Var[]; -}>; -export declare type GeneratedRange = Mix<[ - Line, - Column, - Line, - Column -], [ - Line, - Column, - Line, - Column, - SourcesIndex, - ScopesIndex -], { - callsite: CallSite | null; - bindings: Binding[]; - isScope: boolean; -}>; -export declare type CallSite = [SourcesIndex, Line, Column]; -declare type Binding = BindingExpressionRange[]; -export declare type BindingExpressionRange = [Name] | [Name, Line, Column]; -export declare function decodeOriginalScopes(input: string): OriginalScope[]; -export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; -export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; -export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; -export {}; diff --git a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts b/web/static/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts deleted file mode 100644 index 336e658f..00000000 --- a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes'; -export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes'; -export declare type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; -export declare type SourceMapLine = SourceMapSegment[]; -export declare type SourceMapMappings = SourceMapLine[]; -export declare function decode(mappings: string): SourceMapMappings; -export declare function encode(decoded: SourceMapMappings): string; -export declare function encode(decoded: Readonly): string; diff --git a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts b/web/static/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts deleted file mode 100644 index 78bd88eb..00000000 --- a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export declare class StringWriter { - pos: number; - private out; - private buffer; - write(v: number): void; - flush(): string; -} -export declare class StringReader { - pos: number; - private buffer; - constructor(buffer: string); - next(): number; - peek(): number; - indexOf(char: string): number; -} diff --git a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts b/web/static/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts deleted file mode 100644 index 450ee572..00000000 --- a/web/static/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { StringReader, StringWriter } from './strings'; -export declare const comma: number; -export declare const semicolon: number; -export declare function decodeInteger(reader: StringReader, relative: number): number; -export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number; -export declare function hasMoreVlq(reader: StringReader, max: number): boolean; diff --git a/web/static/node_modules/@jridgewell/sourcemap-codec/package.json b/web/static/node_modules/@jridgewell/sourcemap-codec/package.json deleted file mode 100644 index 7168efca..00000000 --- a/web/static/node_modules/@jridgewell/sourcemap-codec/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "@jridgewell/sourcemap-codec", - "version": "1.5.0", - "description": "Encode/decode sourcemap mappings", - "keywords": [ - "sourcemap", - "vlq" - ], - "main": "dist/sourcemap-codec.umd.js", - "module": "dist/sourcemap-codec.mjs", - "types": "dist/types/sourcemap-codec.d.ts", - "files": [ - "dist" - ], - "exports": { - ".": [ - { - "types": "./dist/types/sourcemap-codec.d.ts", - "browser": "./dist/sourcemap-codec.umd.js", - "require": "./dist/sourcemap-codec.umd.js", - "import": "./dist/sourcemap-codec.mjs" - }, - "./dist/sourcemap-codec.umd.js" - ], - "./package.json": "./package.json" - }, - "scripts": { - "benchmark": "run-s build:rollup benchmark:*", - "benchmark:install": "cd benchmark && npm install", - "benchmark:only": "node --expose-gc benchmark/index.js", - "build": "run-s -n build:*", - "build:rollup": "rollup -c rollup.config.js", - "build:ts": "tsc --project tsconfig.build.json", - "lint": "run-s -n lint:*", - "lint:prettier": "npm run test:lint:prettier -- --write", - "lint:ts": "npm run test:lint:ts -- --fix", - "prebuild": "rm -rf dist", - "prepublishOnly": "npm run preversion", - "preversion": "run-s test build", - "test": "run-s -n test:lint test:only", - "test:debug": "mocha --inspect-brk", - "test:lint": "run-s -n test:lint:*", - "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", - "test:lint:ts": "eslint '{src,test}/**/*.ts'", - "test:only": "mocha", - "test:coverage": "c8 mocha", - "test:watch": "mocha --watch" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/jridgewell/sourcemap-codec.git" - }, - "author": "Rich Harris", - "license": "MIT", - "devDependencies": { - "@rollup/plugin-typescript": "8.3.0", - "@types/mocha": "10.0.6", - "@types/node": "17.0.15", - "@typescript-eslint/eslint-plugin": "5.10.0", - "@typescript-eslint/parser": "5.10.0", - "benchmark": "2.1.4", - "c8": "7.11.2", - "eslint": "8.7.0", - "eslint-config-prettier": "8.3.0", - "mocha": "9.2.0", - "npm-run-all": "4.1.5", - "prettier": "2.5.1", - "rollup": "2.64.0", - "source-map": "0.6.1", - "source-map-js": "1.0.2", - "sourcemap-codec": "1.4.8", - "tsx": "4.7.1", - "typescript": "4.5.4" - } -} diff --git a/web/static/node_modules/@jridgewell/trace-mapping/LICENSE b/web/static/node_modules/@jridgewell/trace-mapping/LICENSE deleted file mode 100644 index 37bb488f..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2022 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/@jridgewell/trace-mapping/README.md b/web/static/node_modules/@jridgewell/trace-mapping/README.md deleted file mode 100644 index 969558d7..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/README.md +++ /dev/null @@ -1,257 +0,0 @@ -# @jridgewell/trace-mapping - -> Trace the original position through a source map - -`trace-mapping` allows you to take the line and column of an output file and trace it to the -original location in the source file through a source map. - -You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This -provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM. - -## Installation - -```sh -npm install @jridgewell/trace-mapping -``` - -## Usage - -```typescript -import { - TraceMap, - originalPositionFor, - generatedPositionFor, - sourceContentFor, - isIgnored, -} from '@jridgewell/trace-mapping'; - -const tracer = new TraceMap({ - version: 3, - sources: ['input.js'], - sourcesContent: ['content of input.js'], - names: ['foo'], - mappings: 'KAyCIA', - ignoreList: [], -}); - -// Lines start at line 1, columns at column 0. -const traced = originalPositionFor(tracer, { line: 1, column: 5 }); -assert.deepEqual(traced, { - source: 'input.js', - line: 42, - column: 4, - name: 'foo', -}); - -const content = sourceContentFor(tracer, traced.source); -assert.strictEqual(content, 'content for input.js'); - -const generated = generatedPositionFor(tracer, { - source: 'input.js', - line: 42, - column: 4, -}); -assert.deepEqual(generated, { - line: 1, - column: 5, -}); - -const ignored = isIgnored(tracer, 'input.js'); -assert.equal(ignored, false); -``` - -We also provide a lower level API to get the actual segment that matches our line and column. Unlike -`originalPositionFor`, `traceSegment` uses a 0-base for `line`: - -```typescript -import { traceSegment } from '@jridgewell/trace-mapping'; - -// line is 0-base. -const traced = traceSegment(tracer, /* line */ 0, /* column */ 5); - -// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] -// Again, line is 0-base and so is sourceLine -assert.deepEqual(traced, [5, 0, 41, 4, 0]); -``` - -### SectionedSourceMaps - -The sourcemap spec defines a special `sections` field that's designed to handle concatenation of -output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool -produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap` -helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a -`TraceMap` instance: - -```typescript -import { AnyMap } from '@jridgewell/trace-mapping'; -const fooOutput = 'foo'; -const barOutput = 'bar'; -const output = [fooOutput, barOutput].join('\n'); - -const sectioned = new AnyMap({ - version: 3, - sections: [ - { - // 0-base line and column - offset: { line: 0, column: 0 }, - // fooOutput's sourcemap - map: { - version: 3, - sources: ['foo.js'], - names: ['foo'], - mappings: 'AAAAA', - }, - }, - { - // barOutput's sourcemap will not affect the first line, only the second - offset: { line: 1, column: 0 }, - map: { - version: 3, - sources: ['bar.js'], - names: ['bar'], - mappings: 'AAAAA', - }, - }, - ], -}); - -const traced = originalPositionFor(sectioned, { - line: 2, - column: 0, -}); - -assert.deepEqual(traced, { - source: 'bar.js', - line: 1, - column: 0, - name: 'bar', -}); -``` - -## Benchmarks - -``` -node v18.0.0 - -amp.js.map - 45120 segments - -Memory Usage: -trace-mapping decoded 562400 bytes -trace-mapping encoded 5706544 bytes -source-map-js 10717664 bytes -source-map-0.6.1 17446384 bytes -source-map-0.8.0 9701757 bytes -Smallest memory usage is trace-mapping decoded - -Init speed: -trace-mapping: decoded JSON input x 180 ops/sec ±0.34% (85 runs sampled) -trace-mapping: encoded JSON input x 364 ops/sec ±1.77% (89 runs sampled) -trace-mapping: decoded Object input x 3,116 ops/sec ±0.50% (96 runs sampled) -trace-mapping: encoded Object input x 410 ops/sec ±2.62% (85 runs sampled) -source-map-js: encoded Object input x 84.23 ops/sec ±0.91% (73 runs sampled) -source-map-0.6.1: encoded Object input x 37.21 ops/sec ±2.08% (51 runs sampled) -Fastest is trace-mapping: decoded Object input - -Trace speed: -trace-mapping: decoded originalPositionFor x 3,952,212 ops/sec ±0.17% (98 runs sampled) -trace-mapping: encoded originalPositionFor x 3,487,468 ops/sec ±1.58% (90 runs sampled) -source-map-js: encoded originalPositionFor x 827,730 ops/sec ±0.78% (97 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 748,991 ops/sec ±0.53% (94 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 2,532,894 ops/sec ±0.57% (95 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - - -*** - - -babel.min.js.map - 347793 segments - -Memory Usage: -trace-mapping decoded 89832 bytes -trace-mapping encoded 35474640 bytes -source-map-js 51257176 bytes -source-map-0.6.1 63515664 bytes -source-map-0.8.0 42933752 bytes -Smallest memory usage is trace-mapping decoded - -Init speed: -trace-mapping: decoded JSON input x 15.41 ops/sec ±8.65% (34 runs sampled) -trace-mapping: encoded JSON input x 28.20 ops/sec ±12.87% (42 runs sampled) -trace-mapping: decoded Object input x 964 ops/sec ±0.36% (99 runs sampled) -trace-mapping: encoded Object input x 31.77 ops/sec ±13.79% (45 runs sampled) -source-map-js: encoded Object input x 6.45 ops/sec ±5.16% (21 runs sampled) -source-map-0.6.1: encoded Object input x 4.07 ops/sec ±5.24% (15 runs sampled) -Fastest is trace-mapping: decoded Object input - -Trace speed: -trace-mapping: decoded originalPositionFor x 7,183,038 ops/sec ±0.58% (95 runs sampled) -trace-mapping: encoded originalPositionFor x 5,192,185 ops/sec ±0.41% (100 runs sampled) -source-map-js: encoded originalPositionFor x 4,259,489 ops/sec ±0.79% (94 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 3,742,629 ops/sec ±0.71% (95 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 6,270,211 ops/sec ±0.64% (94 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - - -*** - - -preact.js.map - 1992 segments - -Memory Usage: -trace-mapping decoded 37128 bytes -trace-mapping encoded 247280 bytes -source-map-js 1143536 bytes -source-map-0.6.1 1290992 bytes -source-map-0.8.0 96544 bytes -Smallest memory usage is trace-mapping decoded - -Init speed: -trace-mapping: decoded JSON input x 3,483 ops/sec ±0.30% (98 runs sampled) -trace-mapping: encoded JSON input x 6,092 ops/sec ±0.18% (97 runs sampled) -trace-mapping: decoded Object input x 249,076 ops/sec ±0.24% (98 runs sampled) -trace-mapping: encoded Object input x 14,555 ops/sec ±0.48% (100 runs sampled) -source-map-js: encoded Object input x 2,447 ops/sec ±0.36% (99 runs sampled) -source-map-0.6.1: encoded Object input x 1,201 ops/sec ±0.57% (96 runs sampled) -Fastest is trace-mapping: decoded Object input - -Trace speed: -trace-mapping: decoded originalPositionFor x 7,620,192 ops/sec ±0.09% (99 runs sampled) -trace-mapping: encoded originalPositionFor x 6,872,554 ops/sec ±0.30% (97 runs sampled) -source-map-js: encoded originalPositionFor x 2,489,570 ops/sec ±0.35% (94 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 1,698,633 ops/sec ±0.28% (98 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 4,015,644 ops/sec ±0.22% (98 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - - -*** - - -react.js.map - 5726 segments - -Memory Usage: -trace-mapping decoded 16176 bytes -trace-mapping encoded 681552 bytes -source-map-js 2418352 bytes -source-map-0.6.1 2443672 bytes -source-map-0.8.0 111768 bytes -Smallest memory usage is trace-mapping decoded - -Init speed: -trace-mapping: decoded JSON input x 1,720 ops/sec ±0.34% (98 runs sampled) -trace-mapping: encoded JSON input x 4,406 ops/sec ±0.35% (100 runs sampled) -trace-mapping: decoded Object input x 92,122 ops/sec ±0.10% (99 runs sampled) -trace-mapping: encoded Object input x 5,385 ops/sec ±0.37% (99 runs sampled) -source-map-js: encoded Object input x 794 ops/sec ±0.40% (98 runs sampled) -source-map-0.6.1: encoded Object input x 416 ops/sec ±0.54% (91 runs sampled) -Fastest is trace-mapping: decoded Object input - -Trace speed: -trace-mapping: decoded originalPositionFor x 32,759,519 ops/sec ±0.33% (100 runs sampled) -trace-mapping: encoded originalPositionFor x 31,116,306 ops/sec ±0.33% (97 runs sampled) -source-map-js: encoded originalPositionFor x 17,458,435 ops/sec ±0.44% (97 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 12,687,097 ops/sec ±0.43% (95 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 23,538,275 ops/sec ±0.38% (95 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor -``` - -[source-map]: https://www.npmjs.com/package/source-map diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs b/web/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs deleted file mode 100644 index 8238e0ae..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +++ /dev/null @@ -1,580 +0,0 @@ -import { encode, decode } from '@jridgewell/sourcemap-codec'; -import resolveUri from '@jridgewell/resolve-uri'; - -function resolve(input, base) { - // The base is always treated as a directory, if it's not empty. - // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 - // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 - if (base && !base.endsWith('/')) - base += '/'; - return resolveUri(input, base); -} - -/** - * Removes everything after the last "/", but leaves the slash. - */ -function stripFilename(path) { - if (!path) - return ''; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); -} - -const COLUMN = 0; -const SOURCES_INDEX = 1; -const SOURCE_LINE = 2; -const SOURCE_COLUMN = 3; -const NAMES_INDEX = 4; -const REV_GENERATED_LINE = 1; -const REV_GENERATED_COLUMN = 2; - -function maybeSort(mappings, owned) { - const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); - if (unsortedIndex === mappings.length) - return mappings; - // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If - // not, we do not want to modify the consumer's input array. - if (!owned) - mappings = mappings.slice(); - for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { - mappings[i] = sortSegments(mappings[i], owned); - } - return mappings; -} -function nextUnsortedSegmentLine(mappings, start) { - for (let i = start; i < mappings.length; i++) { - if (!isSorted(mappings[i])) - return i; - } - return mappings.length; -} -function isSorted(line) { - for (let j = 1; j < line.length; j++) { - if (line[j][COLUMN] < line[j - 1][COLUMN]) { - return false; - } - } - return true; -} -function sortSegments(line, owned) { - if (!owned) - line = line.slice(); - return line.sort(sortComparator); -} -function sortComparator(a, b) { - return a[COLUMN] - b[COLUMN]; -} - -let found = false; -/** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ -function binarySearch(haystack, needle, low, high) { - while (low <= high) { - const mid = low + ((high - low) >> 1); - const cmp = haystack[mid][COLUMN] - needle; - if (cmp === 0) { - found = true; - return mid; - } - if (cmp < 0) { - low = mid + 1; - } - else { - high = mid - 1; - } - } - found = false; - return low - 1; -} -function upperBound(haystack, needle, index) { - for (let i = index + 1; i < haystack.length; index = i++) { - if (haystack[i][COLUMN] !== needle) - break; - } - return index; -} -function lowerBound(haystack, needle, index) { - for (let i = index - 1; i >= 0; index = i--) { - if (haystack[i][COLUMN] !== needle) - break; - } - return index; -} -function memoizedState() { - return { - lastKey: -1, - lastNeedle: -1, - lastIndex: -1, - }; -} -/** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ -function memoizedBinarySearch(haystack, needle, state, key) { - const { lastKey, lastNeedle, lastIndex } = state; - let low = 0; - let high = haystack.length - 1; - if (key === lastKey) { - if (needle === lastNeedle) { - found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; - return lastIndex; - } - if (needle >= lastNeedle) { - // lastIndex may be -1 if the previous needle was not found. - low = lastIndex === -1 ? 0 : lastIndex; - } - else { - high = lastIndex; - } - } - state.lastKey = key; - state.lastNeedle = needle; - return (state.lastIndex = binarySearch(haystack, needle, low, high)); -} - -// Rebuilds the original source files, with mappings that are ordered by source line/column instead -// of generated line/column. -function buildBySources(decoded, memos) { - const sources = memos.map(buildNullArray); - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - if (seg.length === 1) - continue; - const sourceIndex = seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - const originalSource = sources[sourceIndex]; - const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); - const memo = memos[sourceIndex]; - // The binary search either found a match, or it found the left-index just before where the - // segment should go. Either way, we want to insert after that. And there may be multiple - // generated segments associated with an original location, so there may need to move several - // indexes before we find where we need to insert. - let index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); - memo.lastIndex = ++index; - insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]); - } - } - return sources; -} -function insert(array, index, value) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; -} -// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like -// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. -// Numeric properties on objects are magically sorted in ascending order by the engine regardless of -// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending -// order when iterating with for-in. -function buildNullArray() { - return { __proto__: null }; -} - -const AnyMap = function (map, mapUrl) { - const parsed = parse(map); - if (!('sections' in parsed)) { - return new TraceMap(parsed, mapUrl); - } - const mappings = []; - const sources = []; - const sourcesContent = []; - const names = []; - const ignoreList = []; - recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, ignoreList, 0, 0, Infinity, Infinity); - const joined = { - version: 3, - file: parsed.file, - names, - sources, - sourcesContent, - mappings, - ignoreList, - }; - return presortedDecodedMap(joined); -}; -function parse(map) { - return typeof map === 'string' ? JSON.parse(map) : map; -} -function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { - const { sections } = input; - for (let i = 0; i < sections.length; i++) { - const { map, offset } = sections[i]; - let sl = stopLine; - let sc = stopColumn; - if (i + 1 < sections.length) { - const nextOffset = sections[i + 1].offset; - sl = Math.min(stopLine, lineOffset + nextOffset.line); - if (sl === stopLine) { - sc = Math.min(stopColumn, columnOffset + nextOffset.column); - } - else if (sl < stopLine) { - sc = columnOffset + nextOffset.column; - } - } - addSection(map, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset + offset.line, columnOffset + offset.column, sl, sc); - } -} -function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { - const parsed = parse(input); - if ('sections' in parsed) - return recurse(...arguments); - const map = new TraceMap(parsed, mapUrl); - const sourcesOffset = sources.length; - const namesOffset = names.length; - const decoded = decodedMappings(map); - const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; - append(sources, resolvedSources); - append(names, map.names); - if (contents) - append(sourcesContent, contents); - else - for (let i = 0; i < resolvedSources.length; i++) - sourcesContent.push(null); - if (ignores) - for (let i = 0; i < ignores.length; i++) - ignoreList.push(ignores[i] + sourcesOffset); - for (let i = 0; i < decoded.length; i++) { - const lineI = lineOffset + i; - // We can only add so many lines before we step into the range that the next section's map - // controls. When we get to the last line, then we'll start checking the segments to see if - // they've crossed into the column range. But it may not have any columns that overstep, so we - // still need to check that we don't overstep lines, too. - if (lineI > stopLine) - return; - // The out line may already exist in mappings (if we're continuing the line started by a - // previous section). Or, we may have jumped ahead several lines to start this section. - const out = getLine(mappings, lineI); - // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the - // map can be multiple lines), it doesn't. - const cOffset = i === 0 ? columnOffset : 0; - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const column = cOffset + seg[COLUMN]; - // If this segment steps into the column range that the next section's map controls, we need - // to stop early. - if (lineI === stopLine && column >= stopColumn) - return; - if (seg.length === 1) { - out.push([column]); - continue; - } - const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - out.push(seg.length === 4 - ? [column, sourcesIndex, sourceLine, sourceColumn] - : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); - } - } -} -function append(arr, other) { - for (let i = 0; i < other.length; i++) - arr.push(other[i]); -} -function getLine(arr, index) { - for (let i = arr.length; i <= index; i++) - arr[i] = []; - return arr[index]; -} - -const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; -const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; -const LEAST_UPPER_BOUND = -1; -const GREATEST_LOWER_BOUND = 1; -class TraceMap { - constructor(map, mapUrl) { - const isString = typeof map === 'string'; - if (!isString && map._decodedMemo) - return map; - const parsed = (isString ? JSON.parse(map) : map); - const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; - this.version = version; - this.file = file; - this.names = names || []; - this.sourceRoot = sourceRoot; - this.sources = sources; - this.sourcesContent = sourcesContent; - this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined; - const from = resolve(sourceRoot || '', stripFilename(mapUrl)); - this.resolvedSources = sources.map((s) => resolve(s || '', from)); - const { mappings } = parsed; - if (typeof mappings === 'string') { - this._encoded = mappings; - this._decoded = undefined; - } - else { - this._encoded = undefined; - this._decoded = maybeSort(mappings, isString); - } - this._decodedMemo = memoizedState(); - this._bySources = undefined; - this._bySourceMemos = undefined; - } -} -/** - * Typescript doesn't allow friend access to private fields, so this just casts the map into a type - * with public access modifiers. - */ -function cast(map) { - return map; -} -/** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ -function encodedMappings(map) { - var _a; - var _b; - return ((_a = (_b = cast(map))._encoded) !== null && _a !== void 0 ? _a : (_b._encoded = encode(cast(map)._decoded))); -} -/** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ -function decodedMappings(map) { - var _a; - return ((_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded))); -} -/** - * A low-level API to find the segment associated with a generated line/column (think, from a - * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. - */ -function traceSegment(map, line, column) { - const decoded = decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return null; - const segments = decoded[line]; - const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, GREATEST_LOWER_BOUND); - return index === -1 ? null : segments[index]; -} -/** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ -function originalPositionFor(map, needle) { - let { line, column, bias } = needle; - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const decoded = decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return OMapping(null, null, null, null); - const segments = decoded[line]; - const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); - if (index === -1) - return OMapping(null, null, null, null); - const segment = segments[index]; - if (segment.length === 1) - return OMapping(null, null, null, null); - const { names, resolvedSources } = map; - return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null); -} -/** - * Finds the generated line/column position of the provided source/line/column source position. - */ -function generatedPositionFor(map, needle) { - const { source, line, column, bias } = needle; - return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); -} -/** - * Finds all generated line/column positions of the provided source/line/column source position. - */ -function allGeneratedPositionsFor(map, needle) { - const { source, line, column, bias } = needle; - // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit. - return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); -} -/** - * Iterates each mapping in generated position order. - */ -function eachMapping(map, cb) { - const decoded = decodedMappings(map); - const { names, resolvedSources } = map; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generatedLine = i + 1; - const generatedColumn = seg[0]; - let source = null; - let originalLine = null; - let originalColumn = null; - let name = null; - if (seg.length !== 1) { - source = resolvedSources[seg[1]]; - originalLine = seg[2] + 1; - originalColumn = seg[3]; - } - if (seg.length === 5) - name = names[seg[4]]; - cb({ - generatedLine, - generatedColumn, - source, - originalLine, - originalColumn, - name, - }); - } - } -} -function sourceIndex(map, source) { - const { sources, resolvedSources } = map; - let index = sources.indexOf(source); - if (index === -1) - index = resolvedSources.indexOf(source); - return index; -} -/** - * Retrieves the source content for a particular source, if its found. Returns null if not. - */ -function sourceContentFor(map, source) { - const { sourcesContent } = map; - if (sourcesContent == null) - return null; - const index = sourceIndex(map, source); - return index === -1 ? null : sourcesContent[index]; -} -/** - * Determines if the source is marked to ignore by the source map. - */ -function isIgnored(map, source) { - const { ignoreList } = map; - if (ignoreList == null) - return false; - const index = sourceIndex(map, source); - return index === -1 ? false : ignoreList.includes(index); -} -/** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ -function presortedDecodedMap(map, mapUrl) { - const tracer = new TraceMap(clone(map, []), mapUrl); - cast(tracer)._decoded = map.mappings; - return tracer; -} -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -function decodedMap(map) { - return clone(map, decodedMappings(map)); -} -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -function encodedMap(map) { - return clone(map, encodedMappings(map)); -} -function clone(map, mappings) { - return { - version: map.version, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings, - ignoreList: map.ignoreList || map.x_google_ignoreList, - }; -} -function OMapping(source, line, column, name) { - return { source, line, column, name }; -} -function GMapping(line, column) { - return { line, column }; -} -function traceSegmentInternal(segments, memo, line, column, bias) { - let index = memoizedBinarySearch(segments, column, memo, line); - if (found) { - index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); - } - else if (bias === LEAST_UPPER_BOUND) - index++; - if (index === -1 || index === segments.length) - return -1; - return index; -} -function sliceGeneratedPositions(segments, memo, line, column, bias) { - let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); - // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in - // insertion order) segment that matched. Even if we did respect the bias when tracing, we would - // still need to call `lowerBound()` to find the first segment, which is slower than just looking - // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the - // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to - // match LEAST_UPPER_BOUND. - if (!found && bias === LEAST_UPPER_BOUND) - min++; - if (min === -1 || min === segments.length) - return []; - // We may have found the segment that started at an earlier column. If this is the case, then we - // need to slice all generated segments that match _that_ column, because all such segments span - // to our desired column. - const matchedColumn = found ? column : segments[min][COLUMN]; - // The binary search is not guaranteed to find the lower bound when a match wasn't found. - if (!found) - min = lowerBound(segments, matchedColumn, min); - const max = upperBound(segments, matchedColumn, min); - const result = []; - for (; min <= max; min++) { - const segment = segments[min]; - result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); - } - return result; -} -function generatedPosition(map, source, line, column, bias, all) { - var _a; - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const { sources, resolvedSources } = map; - let sourceIndex = sources.indexOf(source); - if (sourceIndex === -1) - sourceIndex = resolvedSources.indexOf(source); - if (sourceIndex === -1) - return all ? [] : GMapping(null, null); - const generated = ((_a = cast(map))._bySources || (_a._bySources = buildBySources(decodedMappings(map), (cast(map)._bySourceMemos = sources.map(memoizedState))))); - const segments = generated[sourceIndex][line]; - if (segments == null) - return all ? [] : GMapping(null, null); - const memo = cast(map)._bySourceMemos[sourceIndex]; - if (all) - return sliceGeneratedPositions(segments, memo, line, column, bias); - const index = traceSegmentInternal(segments, memo, line, column, bias); - if (index === -1) - return GMapping(null, null); - const segment = segments[index]; - return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); -} - -export { AnyMap, GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap, allGeneratedPositionsFor, decodedMap, decodedMappings, eachMapping, encodedMap, encodedMappings, generatedPositionFor, isIgnored, originalPositionFor, presortedDecodedMap, sourceContentFor, traceSegment }; -//# sourceMappingURL=trace-mapping.mjs.map diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map b/web/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map deleted file mode 100644 index 016e4ee4..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trace-mapping.mjs","sources":["../src/resolve.ts","../src/strip-filename.ts","../src/sourcemap-segment.ts","../src/sort.ts","../src/binary-search.ts","../src/by-source.ts","../src/any-map.ts","../src/trace-mapping.ts"],"sourcesContent":["import resolveUri from '@jridgewell/resolve-uri';\n\nexport default function resolve(input: string, base: string | undefined): string {\n // The base is always treated as a directory, if it's not empty.\n // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327\n // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401\n if (base && !base.endsWith('/')) base += '/';\n\n return resolveUri(input, base);\n}\n","/**\n * Removes everything after the last \"/\", but leaves the slash.\n */\nexport default function stripFilename(path: string | undefined | null): string {\n if (!path) return '';\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n","type GeneratedColumn = number;\ntype SourcesIndex = number;\ntype SourceLine = number;\ntype SourceColumn = number;\ntype NamesIndex = number;\n\ntype GeneratedLine = number;\n\nexport type SourceMapSegment =\n | [GeneratedColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];\n\nexport type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn];\n\nexport const COLUMN = 0;\nexport const SOURCES_INDEX = 1;\nexport const SOURCE_LINE = 2;\nexport const SOURCE_COLUMN = 3;\nexport const NAMES_INDEX = 4;\n\nexport const REV_GENERATED_LINE = 1;\nexport const REV_GENERATED_COLUMN = 2;\n","import { COLUMN } from './sourcemap-segment';\n\nimport type { SourceMapSegment } from './sourcemap-segment';\n\nexport default function maybeSort(\n mappings: SourceMapSegment[][],\n owned: boolean,\n): SourceMapSegment[][] {\n const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);\n if (unsortedIndex === mappings.length) return mappings;\n\n // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If\n // not, we do not want to modify the consumer's input array.\n if (!owned) mappings = mappings.slice();\n\n for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {\n mappings[i] = sortSegments(mappings[i], owned);\n }\n return mappings;\n}\n\nfunction nextUnsortedSegmentLine(mappings: SourceMapSegment[][], start: number): number {\n for (let i = start; i < mappings.length; i++) {\n if (!isSorted(mappings[i])) return i;\n }\n return mappings.length;\n}\n\nfunction isSorted(line: SourceMapSegment[]): boolean {\n for (let j = 1; j < line.length; j++) {\n if (line[j][COLUMN] < line[j - 1][COLUMN]) {\n return false;\n }\n }\n return true;\n}\n\nfunction sortSegments(line: SourceMapSegment[], owned: boolean): SourceMapSegment[] {\n if (!owned) line = line.slice();\n return line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[COLUMN] - b[COLUMN];\n}\n","import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';\nimport { COLUMN } from './sourcemap-segment';\n\nexport type MemoState = {\n lastKey: number;\n lastNeedle: number;\n lastIndex: number;\n};\n\nexport let found = false;\n\n/**\n * A binary search implementation that returns the index if a match is found.\n * If no match is found, then the left-index (the index associated with the item that comes just\n * before the desired index) is returned. To maintain proper sort order, a splice would happen at\n * the next index:\n *\n * ```js\n * const array = [1, 3];\n * const needle = 2;\n * const index = binarySearch(array, needle, (item, needle) => item - needle);\n *\n * assert.equal(index, 0);\n * array.splice(index + 1, 0, needle);\n * assert.deepEqual(array, [1, 2, 3]);\n * ```\n */\nexport function binarySearch(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n low: number,\n high: number,\n): number {\n while (low <= high) {\n const mid = low + ((high - low) >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n\n if (cmp === 0) {\n found = true;\n return mid;\n }\n\n if (cmp < 0) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n\n found = false;\n return low - 1;\n}\n\nexport function upperBound(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n index: number,\n): number {\n for (let i = index + 1; i < haystack.length; index = i++) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\n\nexport function lowerBound(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n index: number,\n): number {\n for (let i = index - 1; i >= 0; index = i--) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\n\nexport function memoizedState(): MemoState {\n return {\n lastKey: -1,\n lastNeedle: -1,\n lastIndex: -1,\n };\n}\n\n/**\n * This overly complicated beast is just to record the last tested line/column and the resulting\n * index, allowing us to skip a few tests if mappings are monotonically increasing.\n */\nexport function memoizedBinarySearch(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n state: MemoState,\n key: number,\n): number {\n const { lastKey, lastNeedle, lastIndex } = state;\n\n let low = 0;\n let high = haystack.length - 1;\n if (key === lastKey) {\n if (needle === lastNeedle) {\n found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;\n return lastIndex;\n }\n\n if (needle >= lastNeedle) {\n // lastIndex may be -1 if the previous needle was not found.\n low = lastIndex === -1 ? 0 : lastIndex;\n } else {\n high = lastIndex;\n }\n }\n state.lastKey = key;\n state.lastNeedle = needle;\n\n return (state.lastIndex = binarySearch(haystack, needle, low, high));\n}\n","import { COLUMN, SOURCES_INDEX, SOURCE_LINE, SOURCE_COLUMN } from './sourcemap-segment';\nimport { memoizedBinarySearch, upperBound } from './binary-search';\n\nimport type { ReverseSegment, SourceMapSegment } from './sourcemap-segment';\nimport type { MemoState } from './binary-search';\n\nexport type Source = {\n __proto__: null;\n [line: number]: Exclude[];\n};\n\n// Rebuilds the original source files, with mappings that are ordered by source line/column instead\n// of generated line/column.\nexport default function buildBySources(\n decoded: readonly SourceMapSegment[][],\n memos: MemoState[],\n): Source[] {\n const sources: Source[] = memos.map(buildNullArray);\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n if (seg.length === 1) continue;\n\n const sourceIndex = seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n const originalSource = sources[sourceIndex];\n const originalLine = (originalSource[sourceLine] ||= []);\n const memo = memos[sourceIndex];\n\n // The binary search either found a match, or it found the left-index just before where the\n // segment should go. Either way, we want to insert after that. And there may be multiple\n // generated segments associated with an original location, so there may need to move several\n // indexes before we find where we need to insert.\n let index = upperBound(\n originalLine,\n sourceColumn,\n memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine),\n );\n\n memo.lastIndex = ++index;\n insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]);\n }\n }\n\n return sources;\n}\n\nfunction insert(array: T[], index: number, value: T) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n}\n\n// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like\n// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations.\n// Numeric properties on objects are magically sorted in ascending order by the engine regardless of\n// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending\n// order when iterating with for-in.\nfunction buildNullArray(): T {\n return { __proto__: null } as T;\n}\n","import { TraceMap, presortedDecodedMap, decodedMappings } from './trace-mapping';\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n} from './sourcemap-segment';\n\nimport type {\n DecodedSourceMap,\n DecodedSourceMapXInput,\n EncodedSourceMapXInput,\n SectionedSourceMapXInput,\n SectionedSourceMapInput,\n SectionXInput,\n} from './types';\nimport type { SourceMapSegment } from './sourcemap-segment';\n\ntype AnyMap = {\n new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap;\n (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap;\n};\n\nexport const AnyMap: AnyMap = function (map, mapUrl) {\n const parsed = parse(map);\n\n if (!('sections' in parsed)) {\n return new TraceMap(parsed as DecodedSourceMapXInput | EncodedSourceMapXInput, mapUrl);\n }\n\n const mappings: SourceMapSegment[][] = [];\n const sources: string[] = [];\n const sourcesContent: (string | null)[] = [];\n const names: string[] = [];\n const ignoreList: number[] = [];\n\n recurse(\n parsed,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n 0,\n 0,\n Infinity,\n Infinity,\n );\n\n const joined: DecodedSourceMap = {\n version: 3,\n file: parsed.file,\n names,\n sources,\n sourcesContent,\n mappings,\n ignoreList,\n };\n\n return presortedDecodedMap(joined);\n} as AnyMap;\n\nfunction parse(map: T): Exclude {\n return typeof map === 'string' ? JSON.parse(map) : map;\n}\n\nfunction recurse(\n input: SectionedSourceMapXInput,\n mapUrl: string | null | undefined,\n mappings: SourceMapSegment[][],\n sources: string[],\n sourcesContent: (string | null)[],\n names: string[],\n ignoreList: number[],\n lineOffset: number,\n columnOffset: number,\n stopLine: number,\n stopColumn: number,\n) {\n const { sections } = input;\n for (let i = 0; i < sections.length; i++) {\n const { map, offset } = sections[i];\n\n let sl = stopLine;\n let sc = stopColumn;\n if (i + 1 < sections.length) {\n const nextOffset = sections[i + 1].offset;\n sl = Math.min(stopLine, lineOffset + nextOffset.line);\n\n if (sl === stopLine) {\n sc = Math.min(stopColumn, columnOffset + nextOffset.column);\n } else if (sl < stopLine) {\n sc = columnOffset + nextOffset.column;\n }\n }\n\n addSection(\n map,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n lineOffset + offset.line,\n columnOffset + offset.column,\n sl,\n sc,\n );\n }\n}\n\nfunction addSection(\n input: SectionXInput['map'],\n mapUrl: string | null | undefined,\n mappings: SourceMapSegment[][],\n sources: string[],\n sourcesContent: (string | null)[],\n names: string[],\n ignoreList: number[],\n lineOffset: number,\n columnOffset: number,\n stopLine: number,\n stopColumn: number,\n) {\n const parsed = parse(input);\n if ('sections' in parsed) return recurse(...(arguments as unknown as Parameters));\n\n const map = new TraceMap(parsed, mapUrl);\n const sourcesOffset = sources.length;\n const namesOffset = names.length;\n const decoded = decodedMappings(map);\n const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;\n\n append(sources, resolvedSources);\n append(names, map.names);\n\n if (contents) append(sourcesContent, contents);\n else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);\n\n if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);\n\n for (let i = 0; i < decoded.length; i++) {\n const lineI = lineOffset + i;\n\n // We can only add so many lines before we step into the range that the next section's map\n // controls. When we get to the last line, then we'll start checking the segments to see if\n // they've crossed into the column range. But it may not have any columns that overstep, so we\n // still need to check that we don't overstep lines, too.\n if (lineI > stopLine) return;\n\n // The out line may already exist in mappings (if we're continuing the line started by a\n // previous section). Or, we may have jumped ahead several lines to start this section.\n const out = getLine(mappings, lineI);\n // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the\n // map can be multiple lines), it doesn't.\n const cOffset = i === 0 ? columnOffset : 0;\n\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const column = cOffset + seg[COLUMN];\n\n // If this segment steps into the column range that the next section's map controls, we need\n // to stop early.\n if (lineI === stopLine && column >= stopColumn) return;\n\n if (seg.length === 1) {\n out.push([column]);\n continue;\n }\n\n const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n out.push(\n seg.length === 4\n ? [column, sourcesIndex, sourceLine, sourceColumn]\n : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]],\n );\n }\n }\n}\n\nfunction append(arr: T[], other: T[]) {\n for (let i = 0; i < other.length; i++) arr.push(other[i]);\n}\n\nfunction getLine(arr: T[][], index: number): T[] {\n for (let i = arr.length; i <= index; i++) arr[i] = [];\n return arr[index];\n}\n","import { encode, decode } from '@jridgewell/sourcemap-codec';\n\nimport resolve from './resolve';\nimport stripFilename from './strip-filename';\nimport maybeSort from './sort';\nimport buildBySources from './by-source';\nimport {\n memoizedState,\n memoizedBinarySearch,\n upperBound,\n lowerBound,\n found as bsFound,\n} from './binary-search';\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n REV_GENERATED_LINE,\n REV_GENERATED_COLUMN,\n} from './sourcemap-segment';\n\nimport type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';\nimport type {\n SourceMapV3,\n DecodedSourceMap,\n EncodedSourceMap,\n InvalidOriginalMapping,\n OriginalMapping,\n InvalidGeneratedMapping,\n GeneratedMapping,\n SourceMapInput,\n Needle,\n SourceNeedle,\n SourceMap,\n EachMapping,\n Bias,\n XInput,\n} from './types';\nimport type { Source } from './by-source';\nimport type { MemoState } from './binary-search';\n\nexport type { SourceMapSegment } from './sourcemap-segment';\nexport type {\n SourceMap,\n DecodedSourceMap,\n EncodedSourceMap,\n Section,\n SectionedSourceMap,\n SourceMapV3,\n Bias,\n EachMapping,\n GeneratedMapping,\n InvalidGeneratedMapping,\n InvalidOriginalMapping,\n Needle,\n OriginalMapping,\n OriginalMapping as Mapping,\n SectionedSourceMapInput,\n SourceMapInput,\n SourceNeedle,\n XInput,\n EncodedSourceMapXInput,\n DecodedSourceMapXInput,\n SectionedSourceMapXInput,\n SectionXInput,\n} from './types';\n\ninterface PublicMap {\n _encoded: TraceMap['_encoded'];\n _decoded: TraceMap['_decoded'];\n _decodedMemo: TraceMap['_decodedMemo'];\n _bySources: TraceMap['_bySources'];\n _bySourceMemos: TraceMap['_bySourceMemos'];\n}\n\nconst LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';\nconst COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';\n\nexport const LEAST_UPPER_BOUND = -1;\nexport const GREATEST_LOWER_BOUND = 1;\n\nexport { AnyMap } from './any-map';\n\nexport class TraceMap implements SourceMap {\n declare version: SourceMapV3['version'];\n declare file: SourceMapV3['file'];\n declare names: SourceMapV3['names'];\n declare sourceRoot: SourceMapV3['sourceRoot'];\n declare sources: SourceMapV3['sources'];\n declare sourcesContent: SourceMapV3['sourcesContent'];\n declare ignoreList: SourceMapV3['ignoreList'];\n\n declare resolvedSources: string[];\n private declare _encoded: string | undefined;\n\n private declare _decoded: SourceMapSegment[][] | undefined;\n private declare _decodedMemo: MemoState;\n\n private declare _bySources: Source[] | undefined;\n private declare _bySourceMemos: MemoState[] | undefined;\n\n constructor(map: SourceMapInput, mapUrl?: string | null) {\n const isString = typeof map === 'string';\n\n if (!isString && (map as unknown as { _decodedMemo: any })._decodedMemo) return map as TraceMap;\n\n const parsed = (isString ? JSON.parse(map) : map) as DecodedSourceMap | EncodedSourceMap;\n\n const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;\n this.version = version;\n this.file = file;\n this.names = names || [];\n this.sourceRoot = sourceRoot;\n this.sources = sources;\n this.sourcesContent = sourcesContent;\n this.ignoreList = parsed.ignoreList || (parsed as XInput).x_google_ignoreList || undefined;\n\n const from = resolve(sourceRoot || '', stripFilename(mapUrl));\n this.resolvedSources = sources.map((s) => resolve(s || '', from));\n\n const { mappings } = parsed;\n if (typeof mappings === 'string') {\n this._encoded = mappings;\n this._decoded = undefined;\n } else {\n this._encoded = undefined;\n this._decoded = maybeSort(mappings, isString);\n }\n\n this._decodedMemo = memoizedState();\n this._bySources = undefined;\n this._bySourceMemos = undefined;\n }\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\nfunction cast(map: unknown): PublicMap {\n return map as any;\n}\n\n/**\n * Returns the encoded (VLQ string) form of the SourceMap's mappings field.\n */\nexport function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'] {\n return (cast(map)._encoded ??= encode(cast(map)._decoded!));\n}\n\n/**\n * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.\n */\nexport function decodedMappings(map: TraceMap): Readonly {\n return (cast(map)._decoded ||= decode(cast(map)._encoded!));\n}\n\n/**\n * A low-level API to find the segment associated with a generated line/column (think, from a\n * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.\n */\nexport function traceSegment(\n map: TraceMap,\n line: number,\n column: number,\n): Readonly | null {\n const decoded = decodedMappings(map);\n\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length) return null;\n\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n GREATEST_LOWER_BOUND,\n );\n\n return index === -1 ? null : segments[index];\n}\n\n/**\n * A higher-level API to find the source/line/column associated with a generated line/column\n * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in\n * `source-map` library.\n */\nexport function originalPositionFor(\n map: TraceMap,\n needle: Needle,\n): OriginalMapping | InvalidOriginalMapping {\n let { line, column, bias } = needle;\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n\n const decoded = decodedMappings(map);\n\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length) return OMapping(null, null, null, null);\n\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n bias || GREATEST_LOWER_BOUND,\n );\n\n if (index === -1) return OMapping(null, null, null, null);\n\n const segment = segments[index];\n if (segment.length === 1) return OMapping(null, null, null, null);\n\n const { names, resolvedSources } = map;\n return OMapping(\n resolvedSources[segment[SOURCES_INDEX]],\n segment[SOURCE_LINE] + 1,\n segment[SOURCE_COLUMN],\n segment.length === 5 ? names[segment[NAMES_INDEX]] : null,\n );\n}\n\n/**\n * Finds the generated line/column position of the provided source/line/column source position.\n */\nexport function generatedPositionFor(\n map: TraceMap,\n needle: SourceNeedle,\n): GeneratedMapping | InvalidGeneratedMapping {\n const { source, line, column, bias } = needle;\n return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);\n}\n\n/**\n * Finds all generated line/column positions of the provided source/line/column source position.\n */\nexport function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[] {\n const { source, line, column, bias } = needle;\n // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.\n return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);\n}\n\n/**\n * Iterates each mapping in generated position order.\n */\nexport function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void {\n const decoded = decodedMappings(map);\n const { names, resolvedSources } = map;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n\n const generatedLine = i + 1;\n const generatedColumn = seg[0];\n let source = null;\n let originalLine = null;\n let originalColumn = null;\n let name = null;\n if (seg.length !== 1) {\n source = resolvedSources[seg[1]];\n originalLine = seg[2] + 1;\n originalColumn = seg[3];\n }\n if (seg.length === 5) name = names[seg[4]];\n\n cb({\n generatedLine,\n generatedColumn,\n source,\n originalLine,\n originalColumn,\n name,\n } as EachMapping);\n }\n }\n}\n\nfunction sourceIndex(map: TraceMap, source: string): number {\n const { sources, resolvedSources } = map;\n let index = sources.indexOf(source);\n if (index === -1) index = resolvedSources.indexOf(source);\n return index;\n}\n\n/**\n * Retrieves the source content for a particular source, if its found. Returns null if not.\n */\nexport function sourceContentFor(map: TraceMap, source: string): string | null {\n const { sourcesContent } = map;\n if (sourcesContent == null) return null;\n const index = sourceIndex(map, source);\n return index === -1 ? null : sourcesContent[index];\n}\n\n/**\n * Determines if the source is marked to ignore by the source map.\n */\nexport function isIgnored(map: TraceMap, source: string): boolean {\n const { ignoreList } = map;\n if (ignoreList == null) return false;\n const index = sourceIndex(map, source);\n return index === -1 ? false : ignoreList.includes(index);\n}\n\n/**\n * A helper that skips sorting of the input map's mappings array, which can be expensive for larger\n * maps.\n */\nexport function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap {\n const tracer = new TraceMap(clone(map, []), mapUrl);\n cast(tracer)._decoded = map.mappings;\n return tracer;\n}\n\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function decodedMap(\n map: TraceMap,\n): Omit & { mappings: readonly SourceMapSegment[][] } {\n return clone(map, decodedMappings(map));\n}\n\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function encodedMap(map: TraceMap): EncodedSourceMap {\n return clone(map, encodedMappings(map));\n}\n\nfunction clone(\n map: TraceMap | DecodedSourceMap,\n mappings: T,\n): T extends string ? EncodedSourceMap : DecodedSourceMap {\n return {\n version: map.version,\n file: map.file,\n names: map.names,\n sourceRoot: map.sourceRoot,\n sources: map.sources,\n sourcesContent: map.sourcesContent,\n mappings,\n ignoreList: map.ignoreList || (map as XInput).x_google_ignoreList,\n } as any;\n}\n\nfunction OMapping(source: null, line: null, column: null, name: null): InvalidOriginalMapping;\nfunction OMapping(\n source: string,\n line: number,\n column: number,\n name: string | null,\n): OriginalMapping;\nfunction OMapping(\n source: string | null,\n line: number | null,\n column: number | null,\n name: string | null,\n): OriginalMapping | InvalidOriginalMapping {\n return { source, line, column, name } as any;\n}\n\nfunction GMapping(line: null, column: null): InvalidGeneratedMapping;\nfunction GMapping(line: number, column: number): GeneratedMapping;\nfunction GMapping(\n line: number | null,\n column: number | null,\n): GeneratedMapping | InvalidGeneratedMapping {\n return { line, column } as any;\n}\n\nfunction traceSegmentInternal(\n segments: SourceMapSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number;\nfunction traceSegmentInternal(\n segments: ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number;\nfunction traceSegmentInternal(\n segments: SourceMapSegment[] | ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number {\n let index = memoizedBinarySearch(segments, column, memo, line);\n if (bsFound) {\n index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);\n } else if (bias === LEAST_UPPER_BOUND) index++;\n\n if (index === -1 || index === segments.length) return -1;\n return index;\n}\n\nfunction sliceGeneratedPositions(\n segments: ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): GeneratedMapping[] {\n let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);\n\n // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in\n // insertion order) segment that matched. Even if we did respect the bias when tracing, we would\n // still need to call `lowerBound()` to find the first segment, which is slower than just looking\n // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the\n // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to\n // match LEAST_UPPER_BOUND.\n if (!bsFound && bias === LEAST_UPPER_BOUND) min++;\n\n if (min === -1 || min === segments.length) return [];\n\n // We may have found the segment that started at an earlier column. If this is the case, then we\n // need to slice all generated segments that match _that_ column, because all such segments span\n // to our desired column.\n const matchedColumn = bsFound ? column : segments[min][COLUMN];\n\n // The binary search is not guaranteed to find the lower bound when a match wasn't found.\n if (!bsFound) min = lowerBound(segments, matchedColumn, min);\n const max = upperBound(segments, matchedColumn, min);\n\n const result = [];\n for (; min <= max; min++) {\n const segment = segments[min];\n result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));\n }\n return result;\n}\n\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: false,\n): GeneratedMapping | InvalidGeneratedMapping;\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: true,\n): GeneratedMapping[];\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: boolean,\n): GeneratedMapping | InvalidGeneratedMapping | GeneratedMapping[] {\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n\n const { sources, resolvedSources } = map;\n let sourceIndex = sources.indexOf(source);\n if (sourceIndex === -1) sourceIndex = resolvedSources.indexOf(source);\n if (sourceIndex === -1) return all ? [] : GMapping(null, null);\n\n const generated = (cast(map)._bySources ||= buildBySources(\n decodedMappings(map),\n (cast(map)._bySourceMemos = sources.map(memoizedState)),\n ));\n\n const segments = generated[sourceIndex][line];\n if (segments == null) return all ? [] : GMapping(null, null);\n\n const memo = cast(map)._bySourceMemos![sourceIndex];\n\n if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);\n\n const index = traceSegmentInternal(segments, memo, line, column, bias);\n if (index === -1) return GMapping(null, null);\n\n const segment = segments[index];\n return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);\n}\n"],"names":["bsFound"],"mappings":";;;AAEc,SAAU,OAAO,CAAC,KAAa,EAAE,IAAwB,EAAA;;;;IAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,IAAI,IAAI,GAAG,CAAC;AAE7C,IAAA,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACjC;;ACTA;;AAEG;AACqB,SAAA,aAAa,CAAC,IAA+B,EAAA;AACnE,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,EAAE,CAAC;IACrB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAClC;;ACQO,MAAM,MAAM,GAAG,CAAC,CAAC;AACjB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,oBAAoB,GAAG,CAAC;;AClBvB,SAAU,SAAS,CAC/B,QAA8B,EAC9B,KAAc,EAAA;IAEd,MAAM,aAAa,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAC3D,IAAA,IAAI,aAAa,KAAK,QAAQ,CAAC,MAAM;AAAE,QAAA,OAAO,QAAQ,CAAC;;;AAIvD,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;IAExC,KAAK,IAAI,CAAC,GAAG,aAAa,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;AAC7F,QAAA,QAAQ,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;KAChD;AACD,IAAA,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,uBAAuB,CAAC,QAA8B,EAAE,KAAa,EAAA;AAC5E,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC5C,QAAA,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAAE,YAAA,OAAO,CAAC,CAAC;KACtC;IACD,OAAO,QAAQ,CAAC,MAAM,CAAC;AACzB,CAAC;AAED,SAAS,QAAQ,CAAC,IAAwB,EAAA;AACxC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACpC,QAAA,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE;AACzC,YAAA,OAAO,KAAK,CAAC;SACd;KACF;AACD,IAAA,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,YAAY,CAAC,IAAwB,EAAE,KAAc,EAAA;AAC5D,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;AAChC,IAAA,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,cAAc,CAAC,CAAmB,EAAE,CAAmB,EAAA;IAC9D,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/B;;ACnCO,IAAI,KAAK,GAAG,KAAK,CAAC;AAEzB;;;;;;;;;;;;;;;AAeG;AACG,SAAU,YAAY,CAC1B,QAA+C,EAC/C,MAAc,EACd,GAAW,EACX,IAAY,EAAA;AAEZ,IAAA,OAAO,GAAG,IAAI,IAAI,EAAE;AAClB,QAAA,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;QACtC,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAE3C,QAAA,IAAI,GAAG,KAAK,CAAC,EAAE;YACb,KAAK,GAAG,IAAI,CAAC;AACb,YAAA,OAAO,GAAG,CAAC;SACZ;AAED,QAAA,IAAI,GAAG,GAAG,CAAC,EAAE;AACX,YAAA,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;SACf;aAAM;AACL,YAAA,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;SAChB;KACF;IAED,KAAK,GAAG,KAAK,CAAC;IACd,OAAO,GAAG,GAAG,CAAC,CAAC;AACjB,CAAC;SAEe,UAAU,CACxB,QAA+C,EAC/C,MAAc,EACd,KAAa,EAAA;AAEb,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;QACxD,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM;YAAE,MAAM;KAC3C;AACD,IAAA,OAAO,KAAK,CAAC;AACf,CAAC;SAEe,UAAU,CACxB,QAA+C,EAC/C,MAAc,EACd,KAAa,EAAA;AAEb,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;QAC3C,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM;YAAE,MAAM;KAC3C;AACD,IAAA,OAAO,KAAK,CAAC;AACf,CAAC;SAEe,aAAa,GAAA;IAC3B,OAAO;QACL,OAAO,EAAE,CAAC,CAAC;QACX,UAAU,EAAE,CAAC,CAAC;QACd,SAAS,EAAE,CAAC,CAAC;KACd,CAAC;AACJ,CAAC;AAED;;;AAGG;AACG,SAAU,oBAAoB,CAClC,QAA+C,EAC/C,MAAc,EACd,KAAgB,EAChB,GAAW,EAAA;IAEX,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEjD,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAA,IAAI,IAAI,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;AAC/B,IAAA,IAAI,GAAG,KAAK,OAAO,EAAE;AACnB,QAAA,IAAI,MAAM,KAAK,UAAU,EAAE;AACzB,YAAA,KAAK,GAAG,SAAS,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;AACnE,YAAA,OAAO,SAAS,CAAC;SAClB;AAED,QAAA,IAAI,MAAM,IAAI,UAAU,EAAE;;AAExB,YAAA,GAAG,GAAG,SAAS,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;SACxC;aAAM;YACL,IAAI,GAAG,SAAS,CAAC;SAClB;KACF;AACD,IAAA,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;AACpB,IAAA,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;AAE1B,IAAA,QAAQ,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;AACvE;;ACvGA;AACA;AACc,SAAU,cAAc,CACpC,OAAsC,EACtC,KAAkB,EAAA;IAElB,MAAM,OAAO,GAAa,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAEpD,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACvC,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AACxB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACpC,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,YAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;AAE/B,YAAA,MAAM,WAAW,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;AACvC,YAAA,MAAM,UAAU,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;AACpC,YAAA,MAAM,YAAY,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;AACxC,YAAA,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAC5C,YAAA,MAAM,YAAY,IAAI,cAAc,CAAC,UAAU,CAAzB,KAAA,cAAc,CAAC,UAAU,CAAM,GAAA,EAAE,EAAC,CAAC;AACzD,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;;;;;AAMhC,YAAA,IAAI,KAAK,GAAG,UAAU,CACpB,YAAY,EACZ,YAAY,EACZ,oBAAoB,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,CAAC,CACnE,CAAC;AAEF,YAAA,IAAI,CAAC,SAAS,GAAG,EAAE,KAAK,CAAC;AACzB,YAAA,MAAM,CAAC,YAAY,EAAE,KAAK,EAAE,CAAC,YAAY,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SAC7D;KACF;AAED,IAAA,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,MAAM,CAAI,KAAU,EAAE,KAAa,EAAE,KAAQ,EAAA;AACpD,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;QACzC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;KACzB;AACD,IAAA,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AACvB,CAAC;AAED;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,GAAA;AACrB,IAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAO,CAAC;AAClC;;ACxCa,MAAA,MAAM,GAAW,UAAU,GAAG,EAAE,MAAM,EAAA;AACjD,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAE1B,IAAA,IAAI,EAAE,UAAU,IAAI,MAAM,CAAC,EAAE;AAC3B,QAAA,OAAO,IAAI,QAAQ,CAAC,MAAyD,EAAE,MAAM,CAAC,CAAC;KACxF;IAED,MAAM,QAAQ,GAAyB,EAAE,CAAC;IAC1C,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,cAAc,GAAsB,EAAE,CAAC;IAC7C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,UAAU,GAAa,EAAE,CAAC;IAEhC,OAAO,CACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,cAAc,EACd,KAAK,EACL,UAAU,EACV,CAAC,EACD,CAAC,EACD,QAAQ,EACR,QAAQ,CACT,CAAC;AAEF,IAAA,MAAM,MAAM,GAAqB;AAC/B,QAAA,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK;QACL,OAAO;QACP,cAAc;QACd,QAAQ;QACR,UAAU;KACX,CAAC;AAEF,IAAA,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;AACrC,EAAY;AAEZ,SAAS,KAAK,CAAI,GAAM,EAAA;AACtB,IAAA,OAAO,OAAO,GAAG,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AACzD,CAAC;AAED,SAAS,OAAO,CACd,KAA+B,EAC/B,MAAiC,EACjC,QAA8B,EAC9B,OAAiB,EACjB,cAAiC,EACjC,KAAe,EACf,UAAoB,EACpB,UAAkB,EAClB,YAAoB,EACpB,QAAgB,EAChB,UAAkB,EAAA;AAElB,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;AAC3B,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACxC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAEpC,IAAI,EAAE,GAAG,QAAQ,CAAC;QAClB,IAAI,EAAE,GAAG,UAAU,CAAC;QACpB,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE;YAC3B,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;AAC1C,YAAA,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;AAEtD,YAAA,IAAI,EAAE,KAAK,QAAQ,EAAE;AACnB,gBAAA,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;aAC7D;AAAM,iBAAA,IAAI,EAAE,GAAG,QAAQ,EAAE;AACxB,gBAAA,EAAE,GAAG,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC;aACvC;SACF;AAED,QAAA,UAAU,CACR,GAAG,EACH,MAAM,EACN,QAAQ,EACR,OAAO,EACP,cAAc,EACd,KAAK,EACL,UAAU,EACV,UAAU,GAAG,MAAM,CAAC,IAAI,EACxB,YAAY,GAAG,MAAM,CAAC,MAAM,EAC5B,EAAE,EACF,EAAE,CACH,CAAC;KACH;AACH,CAAC;AAED,SAAS,UAAU,CACjB,KAA2B,EAC3B,MAAiC,EACjC,QAA8B,EAC9B,OAAiB,EACjB,cAAiC,EACjC,KAAe,EACf,UAAoB,EACpB,UAAkB,EAClB,YAAoB,EACpB,QAAgB,EAChB,UAAkB,EAAA;AAElB,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,UAAU,IAAI,MAAM;AAAE,QAAA,OAAO,OAAO,CAAC,GAAI,SAAmD,CAAC,CAAC;IAElG,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACzC,IAAA,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;AACrC,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;AACjC,IAAA,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;AACrC,IAAA,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC;AAE/E,IAAA,MAAM,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AACjC,IAAA,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;AAEzB,IAAA,IAAI,QAAQ;AAAE,QAAA,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;;AAC1C,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE;AAAE,YAAA,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEhF,IAAA,IAAI,OAAO;AAAE,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE;YAAE,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;AAElG,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACvC,QAAA,MAAM,KAAK,GAAG,UAAU,GAAG,CAAC,CAAC;;;;;QAM7B,IAAI,KAAK,GAAG,QAAQ;YAAE,OAAO;;;QAI7B,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;;;AAGrC,QAAA,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,YAAY,GAAG,CAAC,CAAC;AAE3C,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AACxB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACpC,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACpB,MAAM,MAAM,GAAG,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;;;AAIrC,YAAA,IAAI,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,UAAU;gBAAE,OAAO;AAEvD,YAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;AACpB,gBAAA,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;gBACnB,SAAS;aACV;YAED,MAAM,YAAY,GAAG,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;AACxD,YAAA,MAAM,UAAU,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;AACpC,YAAA,MAAM,YAAY,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;AACxC,YAAA,GAAG,CAAC,IAAI,CACN,GAAG,CAAC,MAAM,KAAK,CAAC;kBACZ,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC;AAClD,kBAAE,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CACrF,CAAC;SACH;KACF;AACH,CAAC;AAED,SAAS,MAAM,CAAI,GAAQ,EAAE,KAAU,EAAA;AACrC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,OAAO,CAAI,GAAU,EAAE,KAAa,EAAA;AAC3C,IAAA,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE;AAAE,QAAA,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACtD,IAAA,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;AACpB;;ACpHA,MAAM,aAAa,GAAG,uDAAuD,CAAC;AAC9E,MAAM,eAAe,GAAG,yEAAyE,CAAC;AAErF,MAAA,iBAAiB,GAAG,CAAC,EAAE;AAC7B,MAAM,oBAAoB,GAAG,EAAE;MAIzB,QAAQ,CAAA;IAkBnB,WAAY,CAAA,GAAmB,EAAE,MAAsB,EAAA;AACrD,QAAA,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC;AAEzC,QAAA,IAAI,CAAC,QAAQ,IAAK,GAAwC,CAAC,YAAY;AAAE,YAAA,OAAO,GAAe,CAAC;AAEhG,QAAA,MAAM,MAAM,IAAI,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAwC,CAAC;AAEzF,QAAA,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;AAC7E,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACvB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACjB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,EAAE,CAAC;AACzB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AAC7B,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACvB,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;AACrC,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAK,MAAiB,CAAC,mBAAmB,IAAI,SAAS,CAAC;AAE3F,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;QAC9D,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;AAElE,QAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;AAC5B,QAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;AAChC,YAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACzB,YAAA,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;SAC3B;aAAM;AACL,YAAA,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC1B,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;SAC/C;AAED,QAAA,IAAI,CAAC,YAAY,GAAG,aAAa,EAAE,CAAC;AACpC,QAAA,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;AAC5B,QAAA,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;KACjC;AACF,CAAA;AAED;;;AAGG;AACH,SAAS,IAAI,CAAC,GAAY,EAAA;AACxB,IAAA,OAAO,GAAU,CAAC;AACpB,CAAC;AAED;;AAEG;AACG,SAAU,eAAe,CAAC,GAAa,EAAA;;;IAC3C,QAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAC,IAAI,CAAC,GAAG,CAAC,EAAC,QAAQ,uCAAR,QAAQ,GAAK,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAS,CAAC,GAAE;AAC9D,CAAC;AAED;;AAEG;AACG,SAAU,eAAe,CAAC,GAAa,EAAA;;IAC3C,QAAO,CAAA,EAAA,GAAC,IAAI,CAAC,GAAG,CAAC,EAAC,QAAQ,QAAR,QAAQ,GAAK,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAS,CAAC,GAAE;AAC9D,CAAC;AAED;;;AAGG;SACa,YAAY,CAC1B,GAAa,EACb,IAAY,EACZ,MAAc,EAAA;AAEd,IAAA,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;;;AAIrC,IAAA,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM;AAAE,QAAA,OAAO,IAAI,CAAC;AAExC,IAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAC/B,IAAA,MAAM,KAAK,GAAG,oBAAoB,CAChC,QAAQ,EACR,IAAI,CAAC,GAAG,CAAC,CAAC,YAAY,EACtB,IAAI,EACJ,MAAM,EACN,oBAAoB,CACrB,CAAC;AAEF,IAAA,OAAO,KAAK,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC/C,CAAC;AAED;;;;AAIG;AACa,SAAA,mBAAmB,CACjC,GAAa,EACb,MAAc,EAAA;IAEd,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;AACpC,IAAA,IAAI,EAAE,CAAC;IACP,IAAI,IAAI,GAAG,CAAC;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;IAC7C,IAAI,MAAM,GAAG,CAAC;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;AAEjD,IAAA,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;;;AAIrC,IAAA,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM;QAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAEpE,IAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,KAAK,GAAG,oBAAoB,CAChC,QAAQ,EACR,IAAI,CAAC,GAAG,CAAC,CAAC,YAAY,EACtB,IAAI,EACJ,MAAM,EACN,IAAI,IAAI,oBAAoB,CAC7B,CAAC;IAEF,IAAI,KAAK,KAAK,CAAC,CAAC;QAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAE1D,IAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChC,IAAA,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAElE,IAAA,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;AACvC,IAAA,OAAO,QAAQ,CACb,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,EACvC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,EACxB,OAAO,CAAC,aAAa,CAAC,EACtB,OAAO,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GAAG,IAAI,CAC1D,CAAC;AACJ,CAAC;AAED;;AAEG;AACa,SAAA,oBAAoB,CAClC,GAAa,EACb,MAAoB,EAAA;IAEpB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;AAC9C,IAAA,OAAO,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,IAAI,oBAAoB,EAAE,KAAK,CAAC,CAAC;AAC3F,CAAC;AAED;;AAEG;AACa,SAAA,wBAAwB,CAAC,GAAa,EAAE,MAAoB,EAAA;IAC1E,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;;AAE9C,IAAA,OAAO,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,IAAI,iBAAiB,EAAE,IAAI,CAAC,CAAC;AACvF,CAAC;AAED;;AAEG;AACa,SAAA,WAAW,CAAC,GAAa,EAAE,EAAkC,EAAA;AAC3E,IAAA,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;AACrC,IAAA,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;AAEvC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACvC,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AACxB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACpC,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AAEpB,YAAA,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5B,YAAA,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,CAAC;YAClB,IAAI,YAAY,GAAG,IAAI,CAAC;YACxB,IAAI,cAAc,GAAG,IAAI,CAAC;YAC1B,IAAI,IAAI,GAAG,IAAI,CAAC;AAChB,YAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;gBACpB,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACjC,gBAAA,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAC1B,gBAAA,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;aACzB;AACD,YAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;gBAAE,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3C,YAAA,EAAE,CAAC;gBACD,aAAa;gBACb,eAAe;gBACf,MAAM;gBACN,YAAY;gBACZ,cAAc;gBACd,IAAI;AACU,aAAA,CAAC,CAAC;SACnB;KACF;AACH,CAAC;AAED,SAAS,WAAW,CAAC,GAAa,EAAE,MAAc,EAAA;AAChD,IAAA,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IACzC,IAAI,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,KAAK,KAAK,CAAC,CAAC;AAAE,QAAA,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC1D,IAAA,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;AAEG;AACa,SAAA,gBAAgB,CAAC,GAAa,EAAE,MAAc,EAAA;AAC5D,IAAA,MAAM,EAAE,cAAc,EAAE,GAAG,GAAG,CAAC;IAC/B,IAAI,cAAc,IAAI,IAAI;AAAE,QAAA,OAAO,IAAI,CAAC;IACxC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AACvC,IAAA,OAAO,KAAK,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AACrD,CAAC;AAED;;AAEG;AACa,SAAA,SAAS,CAAC,GAAa,EAAE,MAAc,EAAA;AACrD,IAAA,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC;IAC3B,IAAI,UAAU,IAAI,IAAI;AAAE,QAAA,OAAO,KAAK,CAAC;IACrC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AACvC,IAAA,OAAO,KAAK,KAAK,CAAC,CAAC,GAAG,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC3D,CAAC;AAED;;;AAGG;AACa,SAAA,mBAAmB,CAAC,GAAqB,EAAE,MAAe,EAAA;AACxE,IAAA,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AACrC,IAAA,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;AAGG;AACG,SAAU,UAAU,CACxB,GAAa,EAAA;IAEb,OAAO,KAAK,CAAC,GAAG,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED;;;AAGG;AACG,SAAU,UAAU,CAAC,GAAa,EAAA;IACtC,OAAO,KAAK,CAAC,GAAG,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,KAAK,CACZ,GAAgC,EAChC,QAAW,EAAA;IAEX,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,cAAc,EAAE,GAAG,CAAC,cAAc;QAClC,QAAQ;AACR,QAAA,UAAU,EAAE,GAAG,CAAC,UAAU,IAAK,GAAc,CAAC,mBAAmB;KAC3D,CAAC;AACX,CAAC;AASD,SAAS,QAAQ,CACf,MAAqB,EACrB,IAAmB,EACnB,MAAqB,EACrB,IAAmB,EAAA;IAEnB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAS,CAAC;AAC/C,CAAC;AAID,SAAS,QAAQ,CACf,IAAmB,EACnB,MAAqB,EAAA;AAErB,IAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAS,CAAC;AACjC,CAAC;AAgBD,SAAS,oBAAoB,CAC3B,QAA+C,EAC/C,IAAe,EACf,IAAY,EACZ,MAAc,EACd,IAAU,EAAA;AAEV,IAAA,IAAI,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/D,IAAIA,KAAO,EAAE;QACX,KAAK,GAAG,CAAC,IAAI,KAAK,iBAAiB,GAAG,UAAU,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;KACzF;SAAM,IAAI,IAAI,KAAK,iBAAiB;AAAE,QAAA,KAAK,EAAE,CAAC;IAE/C,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,CAAC,CAAC,CAAC;AACzD,IAAA,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,uBAAuB,CAC9B,QAA0B,EAC1B,IAAe,EACf,IAAY,EACZ,MAAc,EACd,IAAU,EAAA;AAEV,IAAA,IAAI,GAAG,GAAG,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC;;;;;;;AAQnF,IAAA,IAAI,CAACA,KAAO,IAAI,IAAI,KAAK,iBAAiB;AAAE,QAAA,GAAG,EAAE,CAAC;IAElD,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,GAAG,KAAK,QAAQ,CAAC,MAAM;AAAE,QAAA,OAAO,EAAE,CAAC;;;;AAKrD,IAAA,MAAM,aAAa,GAAGA,KAAO,GAAG,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;;AAG/D,IAAA,IAAI,CAACA,KAAO;QAAE,GAAG,GAAG,UAAU,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,CAAC,CAAC;IAC7D,MAAM,GAAG,GAAG,UAAU,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,CAAC,CAAC;IAErD,MAAM,MAAM,GAAG,EAAE,CAAC;AAClB,IAAA,OAAO,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,EAAE;AACxB,QAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC9B,QAAA,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;KACvF;AACD,IAAA,OAAO,MAAM,CAAC;AAChB,CAAC;AAkBD,SAAS,iBAAiB,CACxB,GAAa,EACb,MAAc,EACd,IAAY,EACZ,MAAc,EACd,IAAU,EACV,GAAY,EAAA;;AAEZ,IAAA,IAAI,EAAE,CAAC;IACP,IAAI,IAAI,GAAG,CAAC;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;IAC7C,IAAI,MAAM,GAAG,CAAC;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;AAEjD,IAAA,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IACzC,IAAI,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,WAAW,KAAK,CAAC,CAAC;AAAE,QAAA,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACtE,IAAI,WAAW,KAAK,CAAC,CAAC;AAAE,QAAA,OAAO,GAAG,GAAG,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAE/D,IAAA,MAAM,SAAS,IAAG,CAAA,EAAA,GAAC,IAAI,CAAC,GAAG,CAAC,EAAC,UAAU,KAAA,EAAA,CAAV,UAAU,GAAK,cAAc,CACxD,eAAe,CAAC,GAAG,CAAC,GACnB,IAAI,CAAC,GAAG,CAAC,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,EACvD,EAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9C,IAAI,QAAQ,IAAI,IAAI;AAAE,QAAA,OAAO,GAAG,GAAG,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAE7D,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,cAAe,CAAC,WAAW,CAAC,CAAC;AAEpD,IAAA,IAAI,GAAG;AAAE,QAAA,OAAO,uBAAuB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;AAE5E,IAAA,MAAM,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACvE,IAAI,KAAK,KAAK,CAAC,CAAC;AAAE,QAAA,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAE9C,IAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChC,IAAA,OAAO,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAClF;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js b/web/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js deleted file mode 100644 index 3be0f36e..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +++ /dev/null @@ -1,600 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/sourcemap-codec'), require('@jridgewell/resolve-uri')) : - typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/sourcemap-codec', '@jridgewell/resolve-uri'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.traceMapping = {}, global.sourcemapCodec, global.resolveURI)); -})(this, (function (exports, sourcemapCodec, resolveUri) { 'use strict'; - - function resolve(input, base) { - // The base is always treated as a directory, if it's not empty. - // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 - // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 - if (base && !base.endsWith('/')) - base += '/'; - return resolveUri(input, base); - } - - /** - * Removes everything after the last "/", but leaves the slash. - */ - function stripFilename(path) { - if (!path) - return ''; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); - } - - const COLUMN = 0; - const SOURCES_INDEX = 1; - const SOURCE_LINE = 2; - const SOURCE_COLUMN = 3; - const NAMES_INDEX = 4; - const REV_GENERATED_LINE = 1; - const REV_GENERATED_COLUMN = 2; - - function maybeSort(mappings, owned) { - const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); - if (unsortedIndex === mappings.length) - return mappings; - // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If - // not, we do not want to modify the consumer's input array. - if (!owned) - mappings = mappings.slice(); - for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { - mappings[i] = sortSegments(mappings[i], owned); - } - return mappings; - } - function nextUnsortedSegmentLine(mappings, start) { - for (let i = start; i < mappings.length; i++) { - if (!isSorted(mappings[i])) - return i; - } - return mappings.length; - } - function isSorted(line) { - for (let j = 1; j < line.length; j++) { - if (line[j][COLUMN] < line[j - 1][COLUMN]) { - return false; - } - } - return true; - } - function sortSegments(line, owned) { - if (!owned) - line = line.slice(); - return line.sort(sortComparator); - } - function sortComparator(a, b) { - return a[COLUMN] - b[COLUMN]; - } - - let found = false; - /** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ - function binarySearch(haystack, needle, low, high) { - while (low <= high) { - const mid = low + ((high - low) >> 1); - const cmp = haystack[mid][COLUMN] - needle; - if (cmp === 0) { - found = true; - return mid; - } - if (cmp < 0) { - low = mid + 1; - } - else { - high = mid - 1; - } - } - found = false; - return low - 1; - } - function upperBound(haystack, needle, index) { - for (let i = index + 1; i < haystack.length; index = i++) { - if (haystack[i][COLUMN] !== needle) - break; - } - return index; - } - function lowerBound(haystack, needle, index) { - for (let i = index - 1; i >= 0; index = i--) { - if (haystack[i][COLUMN] !== needle) - break; - } - return index; - } - function memoizedState() { - return { - lastKey: -1, - lastNeedle: -1, - lastIndex: -1, - }; - } - /** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ - function memoizedBinarySearch(haystack, needle, state, key) { - const { lastKey, lastNeedle, lastIndex } = state; - let low = 0; - let high = haystack.length - 1; - if (key === lastKey) { - if (needle === lastNeedle) { - found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; - return lastIndex; - } - if (needle >= lastNeedle) { - // lastIndex may be -1 if the previous needle was not found. - low = lastIndex === -1 ? 0 : lastIndex; - } - else { - high = lastIndex; - } - } - state.lastKey = key; - state.lastNeedle = needle; - return (state.lastIndex = binarySearch(haystack, needle, low, high)); - } - - // Rebuilds the original source files, with mappings that are ordered by source line/column instead - // of generated line/column. - function buildBySources(decoded, memos) { - const sources = memos.map(buildNullArray); - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - if (seg.length === 1) - continue; - const sourceIndex = seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - const originalSource = sources[sourceIndex]; - const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); - const memo = memos[sourceIndex]; - // The binary search either found a match, or it found the left-index just before where the - // segment should go. Either way, we want to insert after that. And there may be multiple - // generated segments associated with an original location, so there may need to move several - // indexes before we find where we need to insert. - let index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); - memo.lastIndex = ++index; - insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]); - } - } - return sources; - } - function insert(array, index, value) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; - } - // Null arrays allow us to use ordered index keys without actually allocating contiguous memory like - // a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. - // Numeric properties on objects are magically sorted in ascending order by the engine regardless of - // the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending - // order when iterating with for-in. - function buildNullArray() { - return { __proto__: null }; - } - - const AnyMap = function (map, mapUrl) { - const parsed = parse(map); - if (!('sections' in parsed)) { - return new TraceMap(parsed, mapUrl); - } - const mappings = []; - const sources = []; - const sourcesContent = []; - const names = []; - const ignoreList = []; - recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, ignoreList, 0, 0, Infinity, Infinity); - const joined = { - version: 3, - file: parsed.file, - names, - sources, - sourcesContent, - mappings, - ignoreList, - }; - return presortedDecodedMap(joined); - }; - function parse(map) { - return typeof map === 'string' ? JSON.parse(map) : map; - } - function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { - const { sections } = input; - for (let i = 0; i < sections.length; i++) { - const { map, offset } = sections[i]; - let sl = stopLine; - let sc = stopColumn; - if (i + 1 < sections.length) { - const nextOffset = sections[i + 1].offset; - sl = Math.min(stopLine, lineOffset + nextOffset.line); - if (sl === stopLine) { - sc = Math.min(stopColumn, columnOffset + nextOffset.column); - } - else if (sl < stopLine) { - sc = columnOffset + nextOffset.column; - } - } - addSection(map, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset + offset.line, columnOffset + offset.column, sl, sc); - } - } - function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { - const parsed = parse(input); - if ('sections' in parsed) - return recurse(...arguments); - const map = new TraceMap(parsed, mapUrl); - const sourcesOffset = sources.length; - const namesOffset = names.length; - const decoded = decodedMappings(map); - const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; - append(sources, resolvedSources); - append(names, map.names); - if (contents) - append(sourcesContent, contents); - else - for (let i = 0; i < resolvedSources.length; i++) - sourcesContent.push(null); - if (ignores) - for (let i = 0; i < ignores.length; i++) - ignoreList.push(ignores[i] + sourcesOffset); - for (let i = 0; i < decoded.length; i++) { - const lineI = lineOffset + i; - // We can only add so many lines before we step into the range that the next section's map - // controls. When we get to the last line, then we'll start checking the segments to see if - // they've crossed into the column range. But it may not have any columns that overstep, so we - // still need to check that we don't overstep lines, too. - if (lineI > stopLine) - return; - // The out line may already exist in mappings (if we're continuing the line started by a - // previous section). Or, we may have jumped ahead several lines to start this section. - const out = getLine(mappings, lineI); - // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the - // map can be multiple lines), it doesn't. - const cOffset = i === 0 ? columnOffset : 0; - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const column = cOffset + seg[COLUMN]; - // If this segment steps into the column range that the next section's map controls, we need - // to stop early. - if (lineI === stopLine && column >= stopColumn) - return; - if (seg.length === 1) { - out.push([column]); - continue; - } - const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - out.push(seg.length === 4 - ? [column, sourcesIndex, sourceLine, sourceColumn] - : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); - } - } - } - function append(arr, other) { - for (let i = 0; i < other.length; i++) - arr.push(other[i]); - } - function getLine(arr, index) { - for (let i = arr.length; i <= index; i++) - arr[i] = []; - return arr[index]; - } - - const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; - const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; - const LEAST_UPPER_BOUND = -1; - const GREATEST_LOWER_BOUND = 1; - class TraceMap { - constructor(map, mapUrl) { - const isString = typeof map === 'string'; - if (!isString && map._decodedMemo) - return map; - const parsed = (isString ? JSON.parse(map) : map); - const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; - this.version = version; - this.file = file; - this.names = names || []; - this.sourceRoot = sourceRoot; - this.sources = sources; - this.sourcesContent = sourcesContent; - this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined; - const from = resolve(sourceRoot || '', stripFilename(mapUrl)); - this.resolvedSources = sources.map((s) => resolve(s || '', from)); - const { mappings } = parsed; - if (typeof mappings === 'string') { - this._encoded = mappings; - this._decoded = undefined; - } - else { - this._encoded = undefined; - this._decoded = maybeSort(mappings, isString); - } - this._decodedMemo = memoizedState(); - this._bySources = undefined; - this._bySourceMemos = undefined; - } - } - /** - * Typescript doesn't allow friend access to private fields, so this just casts the map into a type - * with public access modifiers. - */ - function cast(map) { - return map; - } - /** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ - function encodedMappings(map) { - var _a; - var _b; - return ((_a = (_b = cast(map))._encoded) !== null && _a !== void 0 ? _a : (_b._encoded = sourcemapCodec.encode(cast(map)._decoded))); - } - /** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ - function decodedMappings(map) { - var _a; - return ((_a = cast(map))._decoded || (_a._decoded = sourcemapCodec.decode(cast(map)._encoded))); - } - /** - * A low-level API to find the segment associated with a generated line/column (think, from a - * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. - */ - function traceSegment(map, line, column) { - const decoded = decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return null; - const segments = decoded[line]; - const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, GREATEST_LOWER_BOUND); - return index === -1 ? null : segments[index]; - } - /** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ - function originalPositionFor(map, needle) { - let { line, column, bias } = needle; - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const decoded = decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return OMapping(null, null, null, null); - const segments = decoded[line]; - const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); - if (index === -1) - return OMapping(null, null, null, null); - const segment = segments[index]; - if (segment.length === 1) - return OMapping(null, null, null, null); - const { names, resolvedSources } = map; - return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null); - } - /** - * Finds the generated line/column position of the provided source/line/column source position. - */ - function generatedPositionFor(map, needle) { - const { source, line, column, bias } = needle; - return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); - } - /** - * Finds all generated line/column positions of the provided source/line/column source position. - */ - function allGeneratedPositionsFor(map, needle) { - const { source, line, column, bias } = needle; - // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit. - return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); - } - /** - * Iterates each mapping in generated position order. - */ - function eachMapping(map, cb) { - const decoded = decodedMappings(map); - const { names, resolvedSources } = map; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generatedLine = i + 1; - const generatedColumn = seg[0]; - let source = null; - let originalLine = null; - let originalColumn = null; - let name = null; - if (seg.length !== 1) { - source = resolvedSources[seg[1]]; - originalLine = seg[2] + 1; - originalColumn = seg[3]; - } - if (seg.length === 5) - name = names[seg[4]]; - cb({ - generatedLine, - generatedColumn, - source, - originalLine, - originalColumn, - name, - }); - } - } - } - function sourceIndex(map, source) { - const { sources, resolvedSources } = map; - let index = sources.indexOf(source); - if (index === -1) - index = resolvedSources.indexOf(source); - return index; - } - /** - * Retrieves the source content for a particular source, if its found. Returns null if not. - */ - function sourceContentFor(map, source) { - const { sourcesContent } = map; - if (sourcesContent == null) - return null; - const index = sourceIndex(map, source); - return index === -1 ? null : sourcesContent[index]; - } - /** - * Determines if the source is marked to ignore by the source map. - */ - function isIgnored(map, source) { - const { ignoreList } = map; - if (ignoreList == null) - return false; - const index = sourceIndex(map, source); - return index === -1 ? false : ignoreList.includes(index); - } - /** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ - function presortedDecodedMap(map, mapUrl) { - const tracer = new TraceMap(clone(map, []), mapUrl); - cast(tracer)._decoded = map.mappings; - return tracer; - } - /** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ - function decodedMap(map) { - return clone(map, decodedMappings(map)); - } - /** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ - function encodedMap(map) { - return clone(map, encodedMappings(map)); - } - function clone(map, mappings) { - return { - version: map.version, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings, - ignoreList: map.ignoreList || map.x_google_ignoreList, - }; - } - function OMapping(source, line, column, name) { - return { source, line, column, name }; - } - function GMapping(line, column) { - return { line, column }; - } - function traceSegmentInternal(segments, memo, line, column, bias) { - let index = memoizedBinarySearch(segments, column, memo, line); - if (found) { - index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); - } - else if (bias === LEAST_UPPER_BOUND) - index++; - if (index === -1 || index === segments.length) - return -1; - return index; - } - function sliceGeneratedPositions(segments, memo, line, column, bias) { - let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); - // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in - // insertion order) segment that matched. Even if we did respect the bias when tracing, we would - // still need to call `lowerBound()` to find the first segment, which is slower than just looking - // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the - // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to - // match LEAST_UPPER_BOUND. - if (!found && bias === LEAST_UPPER_BOUND) - min++; - if (min === -1 || min === segments.length) - return []; - // We may have found the segment that started at an earlier column. If this is the case, then we - // need to slice all generated segments that match _that_ column, because all such segments span - // to our desired column. - const matchedColumn = found ? column : segments[min][COLUMN]; - // The binary search is not guaranteed to find the lower bound when a match wasn't found. - if (!found) - min = lowerBound(segments, matchedColumn, min); - const max = upperBound(segments, matchedColumn, min); - const result = []; - for (; min <= max; min++) { - const segment = segments[min]; - result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); - } - return result; - } - function generatedPosition(map, source, line, column, bias, all) { - var _a; - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const { sources, resolvedSources } = map; - let sourceIndex = sources.indexOf(source); - if (sourceIndex === -1) - sourceIndex = resolvedSources.indexOf(source); - if (sourceIndex === -1) - return all ? [] : GMapping(null, null); - const generated = ((_a = cast(map))._bySources || (_a._bySources = buildBySources(decodedMappings(map), (cast(map)._bySourceMemos = sources.map(memoizedState))))); - const segments = generated[sourceIndex][line]; - if (segments == null) - return all ? [] : GMapping(null, null); - const memo = cast(map)._bySourceMemos[sourceIndex]; - if (all) - return sliceGeneratedPositions(segments, memo, line, column, bias); - const index = traceSegmentInternal(segments, memo, line, column, bias); - if (index === -1) - return GMapping(null, null); - const segment = segments[index]; - return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); - } - - exports.AnyMap = AnyMap; - exports.GREATEST_LOWER_BOUND = GREATEST_LOWER_BOUND; - exports.LEAST_UPPER_BOUND = LEAST_UPPER_BOUND; - exports.TraceMap = TraceMap; - exports.allGeneratedPositionsFor = allGeneratedPositionsFor; - exports.decodedMap = decodedMap; - exports.decodedMappings = decodedMappings; - exports.eachMapping = eachMapping; - exports.encodedMap = encodedMap; - exports.encodedMappings = encodedMappings; - exports.generatedPositionFor = generatedPositionFor; - exports.isIgnored = isIgnored; - exports.originalPositionFor = originalPositionFor; - exports.presortedDecodedMap = presortedDecodedMap; - exports.sourceContentFor = sourceContentFor; - exports.traceSegment = traceSegment; - -})); -//# sourceMappingURL=trace-mapping.umd.js.map diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map b/web/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map deleted file mode 100644 index c6716eaf..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trace-mapping.umd.js","sources":["../src/resolve.ts","../src/strip-filename.ts","../src/sourcemap-segment.ts","../src/sort.ts","../src/binary-search.ts","../src/by-source.ts","../src/any-map.ts","../src/trace-mapping.ts"],"sourcesContent":["import resolveUri from '@jridgewell/resolve-uri';\n\nexport default function resolve(input: string, base: string | undefined): string {\n // The base is always treated as a directory, if it's not empty.\n // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327\n // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401\n if (base && !base.endsWith('/')) base += '/';\n\n return resolveUri(input, base);\n}\n","/**\n * Removes everything after the last \"/\", but leaves the slash.\n */\nexport default function stripFilename(path: string | undefined | null): string {\n if (!path) return '';\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n","type GeneratedColumn = number;\ntype SourcesIndex = number;\ntype SourceLine = number;\ntype SourceColumn = number;\ntype NamesIndex = number;\n\ntype GeneratedLine = number;\n\nexport type SourceMapSegment =\n | [GeneratedColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];\n\nexport type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn];\n\nexport const COLUMN = 0;\nexport const SOURCES_INDEX = 1;\nexport const SOURCE_LINE = 2;\nexport const SOURCE_COLUMN = 3;\nexport const NAMES_INDEX = 4;\n\nexport const REV_GENERATED_LINE = 1;\nexport const REV_GENERATED_COLUMN = 2;\n","import { COLUMN } from './sourcemap-segment';\n\nimport type { SourceMapSegment } from './sourcemap-segment';\n\nexport default function maybeSort(\n mappings: SourceMapSegment[][],\n owned: boolean,\n): SourceMapSegment[][] {\n const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);\n if (unsortedIndex === mappings.length) return mappings;\n\n // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If\n // not, we do not want to modify the consumer's input array.\n if (!owned) mappings = mappings.slice();\n\n for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {\n mappings[i] = sortSegments(mappings[i], owned);\n }\n return mappings;\n}\n\nfunction nextUnsortedSegmentLine(mappings: SourceMapSegment[][], start: number): number {\n for (let i = start; i < mappings.length; i++) {\n if (!isSorted(mappings[i])) return i;\n }\n return mappings.length;\n}\n\nfunction isSorted(line: SourceMapSegment[]): boolean {\n for (let j = 1; j < line.length; j++) {\n if (line[j][COLUMN] < line[j - 1][COLUMN]) {\n return false;\n }\n }\n return true;\n}\n\nfunction sortSegments(line: SourceMapSegment[], owned: boolean): SourceMapSegment[] {\n if (!owned) line = line.slice();\n return line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[COLUMN] - b[COLUMN];\n}\n","import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';\nimport { COLUMN } from './sourcemap-segment';\n\nexport type MemoState = {\n lastKey: number;\n lastNeedle: number;\n lastIndex: number;\n};\n\nexport let found = false;\n\n/**\n * A binary search implementation that returns the index if a match is found.\n * If no match is found, then the left-index (the index associated with the item that comes just\n * before the desired index) is returned. To maintain proper sort order, a splice would happen at\n * the next index:\n *\n * ```js\n * const array = [1, 3];\n * const needle = 2;\n * const index = binarySearch(array, needle, (item, needle) => item - needle);\n *\n * assert.equal(index, 0);\n * array.splice(index + 1, 0, needle);\n * assert.deepEqual(array, [1, 2, 3]);\n * ```\n */\nexport function binarySearch(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n low: number,\n high: number,\n): number {\n while (low <= high) {\n const mid = low + ((high - low) >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n\n if (cmp === 0) {\n found = true;\n return mid;\n }\n\n if (cmp < 0) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n\n found = false;\n return low - 1;\n}\n\nexport function upperBound(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n index: number,\n): number {\n for (let i = index + 1; i < haystack.length; index = i++) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\n\nexport function lowerBound(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n index: number,\n): number {\n for (let i = index - 1; i >= 0; index = i--) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\n\nexport function memoizedState(): MemoState {\n return {\n lastKey: -1,\n lastNeedle: -1,\n lastIndex: -1,\n };\n}\n\n/**\n * This overly complicated beast is just to record the last tested line/column and the resulting\n * index, allowing us to skip a few tests if mappings are monotonically increasing.\n */\nexport function memoizedBinarySearch(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n state: MemoState,\n key: number,\n): number {\n const { lastKey, lastNeedle, lastIndex } = state;\n\n let low = 0;\n let high = haystack.length - 1;\n if (key === lastKey) {\n if (needle === lastNeedle) {\n found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;\n return lastIndex;\n }\n\n if (needle >= lastNeedle) {\n // lastIndex may be -1 if the previous needle was not found.\n low = lastIndex === -1 ? 0 : lastIndex;\n } else {\n high = lastIndex;\n }\n }\n state.lastKey = key;\n state.lastNeedle = needle;\n\n return (state.lastIndex = binarySearch(haystack, needle, low, high));\n}\n","import { COLUMN, SOURCES_INDEX, SOURCE_LINE, SOURCE_COLUMN } from './sourcemap-segment';\nimport { memoizedBinarySearch, upperBound } from './binary-search';\n\nimport type { ReverseSegment, SourceMapSegment } from './sourcemap-segment';\nimport type { MemoState } from './binary-search';\n\nexport type Source = {\n __proto__: null;\n [line: number]: Exclude[];\n};\n\n// Rebuilds the original source files, with mappings that are ordered by source line/column instead\n// of generated line/column.\nexport default function buildBySources(\n decoded: readonly SourceMapSegment[][],\n memos: MemoState[],\n): Source[] {\n const sources: Source[] = memos.map(buildNullArray);\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n if (seg.length === 1) continue;\n\n const sourceIndex = seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n const originalSource = sources[sourceIndex];\n const originalLine = (originalSource[sourceLine] ||= []);\n const memo = memos[sourceIndex];\n\n // The binary search either found a match, or it found the left-index just before where the\n // segment should go. Either way, we want to insert after that. And there may be multiple\n // generated segments associated with an original location, so there may need to move several\n // indexes before we find where we need to insert.\n let index = upperBound(\n originalLine,\n sourceColumn,\n memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine),\n );\n\n memo.lastIndex = ++index;\n insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]);\n }\n }\n\n return sources;\n}\n\nfunction insert(array: T[], index: number, value: T) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n}\n\n// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like\n// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations.\n// Numeric properties on objects are magically sorted in ascending order by the engine regardless of\n// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending\n// order when iterating with for-in.\nfunction buildNullArray(): T {\n return { __proto__: null } as T;\n}\n","import { TraceMap, presortedDecodedMap, decodedMappings } from './trace-mapping';\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n} from './sourcemap-segment';\n\nimport type {\n DecodedSourceMap,\n DecodedSourceMapXInput,\n EncodedSourceMapXInput,\n SectionedSourceMapXInput,\n SectionedSourceMapInput,\n SectionXInput,\n} from './types';\nimport type { SourceMapSegment } from './sourcemap-segment';\n\ntype AnyMap = {\n new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap;\n (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap;\n};\n\nexport const AnyMap: AnyMap = function (map, mapUrl) {\n const parsed = parse(map);\n\n if (!('sections' in parsed)) {\n return new TraceMap(parsed as DecodedSourceMapXInput | EncodedSourceMapXInput, mapUrl);\n }\n\n const mappings: SourceMapSegment[][] = [];\n const sources: string[] = [];\n const sourcesContent: (string | null)[] = [];\n const names: string[] = [];\n const ignoreList: number[] = [];\n\n recurse(\n parsed,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n 0,\n 0,\n Infinity,\n Infinity,\n );\n\n const joined: DecodedSourceMap = {\n version: 3,\n file: parsed.file,\n names,\n sources,\n sourcesContent,\n mappings,\n ignoreList,\n };\n\n return presortedDecodedMap(joined);\n} as AnyMap;\n\nfunction parse(map: T): Exclude {\n return typeof map === 'string' ? JSON.parse(map) : map;\n}\n\nfunction recurse(\n input: SectionedSourceMapXInput,\n mapUrl: string | null | undefined,\n mappings: SourceMapSegment[][],\n sources: string[],\n sourcesContent: (string | null)[],\n names: string[],\n ignoreList: number[],\n lineOffset: number,\n columnOffset: number,\n stopLine: number,\n stopColumn: number,\n) {\n const { sections } = input;\n for (let i = 0; i < sections.length; i++) {\n const { map, offset } = sections[i];\n\n let sl = stopLine;\n let sc = stopColumn;\n if (i + 1 < sections.length) {\n const nextOffset = sections[i + 1].offset;\n sl = Math.min(stopLine, lineOffset + nextOffset.line);\n\n if (sl === stopLine) {\n sc = Math.min(stopColumn, columnOffset + nextOffset.column);\n } else if (sl < stopLine) {\n sc = columnOffset + nextOffset.column;\n }\n }\n\n addSection(\n map,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n lineOffset + offset.line,\n columnOffset + offset.column,\n sl,\n sc,\n );\n }\n}\n\nfunction addSection(\n input: SectionXInput['map'],\n mapUrl: string | null | undefined,\n mappings: SourceMapSegment[][],\n sources: string[],\n sourcesContent: (string | null)[],\n names: string[],\n ignoreList: number[],\n lineOffset: number,\n columnOffset: number,\n stopLine: number,\n stopColumn: number,\n) {\n const parsed = parse(input);\n if ('sections' in parsed) return recurse(...(arguments as unknown as Parameters));\n\n const map = new TraceMap(parsed, mapUrl);\n const sourcesOffset = sources.length;\n const namesOffset = names.length;\n const decoded = decodedMappings(map);\n const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;\n\n append(sources, resolvedSources);\n append(names, map.names);\n\n if (contents) append(sourcesContent, contents);\n else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);\n\n if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);\n\n for (let i = 0; i < decoded.length; i++) {\n const lineI = lineOffset + i;\n\n // We can only add so many lines before we step into the range that the next section's map\n // controls. When we get to the last line, then we'll start checking the segments to see if\n // they've crossed into the column range. But it may not have any columns that overstep, so we\n // still need to check that we don't overstep lines, too.\n if (lineI > stopLine) return;\n\n // The out line may already exist in mappings (if we're continuing the line started by a\n // previous section). Or, we may have jumped ahead several lines to start this section.\n const out = getLine(mappings, lineI);\n // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the\n // map can be multiple lines), it doesn't.\n const cOffset = i === 0 ? columnOffset : 0;\n\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const column = cOffset + seg[COLUMN];\n\n // If this segment steps into the column range that the next section's map controls, we need\n // to stop early.\n if (lineI === stopLine && column >= stopColumn) return;\n\n if (seg.length === 1) {\n out.push([column]);\n continue;\n }\n\n const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n out.push(\n seg.length === 4\n ? [column, sourcesIndex, sourceLine, sourceColumn]\n : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]],\n );\n }\n }\n}\n\nfunction append(arr: T[], other: T[]) {\n for (let i = 0; i < other.length; i++) arr.push(other[i]);\n}\n\nfunction getLine(arr: T[][], index: number): T[] {\n for (let i = arr.length; i <= index; i++) arr[i] = [];\n return arr[index];\n}\n","import { encode, decode } from '@jridgewell/sourcemap-codec';\n\nimport resolve from './resolve';\nimport stripFilename from './strip-filename';\nimport maybeSort from './sort';\nimport buildBySources from './by-source';\nimport {\n memoizedState,\n memoizedBinarySearch,\n upperBound,\n lowerBound,\n found as bsFound,\n} from './binary-search';\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n REV_GENERATED_LINE,\n REV_GENERATED_COLUMN,\n} from './sourcemap-segment';\n\nimport type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';\nimport type {\n SourceMapV3,\n DecodedSourceMap,\n EncodedSourceMap,\n InvalidOriginalMapping,\n OriginalMapping,\n InvalidGeneratedMapping,\n GeneratedMapping,\n SourceMapInput,\n Needle,\n SourceNeedle,\n SourceMap,\n EachMapping,\n Bias,\n XInput,\n} from './types';\nimport type { Source } from './by-source';\nimport type { MemoState } from './binary-search';\n\nexport type { SourceMapSegment } from './sourcemap-segment';\nexport type {\n SourceMap,\n DecodedSourceMap,\n EncodedSourceMap,\n Section,\n SectionedSourceMap,\n SourceMapV3,\n Bias,\n EachMapping,\n GeneratedMapping,\n InvalidGeneratedMapping,\n InvalidOriginalMapping,\n Needle,\n OriginalMapping,\n OriginalMapping as Mapping,\n SectionedSourceMapInput,\n SourceMapInput,\n SourceNeedle,\n XInput,\n EncodedSourceMapXInput,\n DecodedSourceMapXInput,\n SectionedSourceMapXInput,\n SectionXInput,\n} from './types';\n\ninterface PublicMap {\n _encoded: TraceMap['_encoded'];\n _decoded: TraceMap['_decoded'];\n _decodedMemo: TraceMap['_decodedMemo'];\n _bySources: TraceMap['_bySources'];\n _bySourceMemos: TraceMap['_bySourceMemos'];\n}\n\nconst LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';\nconst COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';\n\nexport const LEAST_UPPER_BOUND = -1;\nexport const GREATEST_LOWER_BOUND = 1;\n\nexport { AnyMap } from './any-map';\n\nexport class TraceMap implements SourceMap {\n declare version: SourceMapV3['version'];\n declare file: SourceMapV3['file'];\n declare names: SourceMapV3['names'];\n declare sourceRoot: SourceMapV3['sourceRoot'];\n declare sources: SourceMapV3['sources'];\n declare sourcesContent: SourceMapV3['sourcesContent'];\n declare ignoreList: SourceMapV3['ignoreList'];\n\n declare resolvedSources: string[];\n private declare _encoded: string | undefined;\n\n private declare _decoded: SourceMapSegment[][] | undefined;\n private declare _decodedMemo: MemoState;\n\n private declare _bySources: Source[] | undefined;\n private declare _bySourceMemos: MemoState[] | undefined;\n\n constructor(map: SourceMapInput, mapUrl?: string | null) {\n const isString = typeof map === 'string';\n\n if (!isString && (map as unknown as { _decodedMemo: any })._decodedMemo) return map as TraceMap;\n\n const parsed = (isString ? JSON.parse(map) : map) as DecodedSourceMap | EncodedSourceMap;\n\n const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;\n this.version = version;\n this.file = file;\n this.names = names || [];\n this.sourceRoot = sourceRoot;\n this.sources = sources;\n this.sourcesContent = sourcesContent;\n this.ignoreList = parsed.ignoreList || (parsed as XInput).x_google_ignoreList || undefined;\n\n const from = resolve(sourceRoot || '', stripFilename(mapUrl));\n this.resolvedSources = sources.map((s) => resolve(s || '', from));\n\n const { mappings } = parsed;\n if (typeof mappings === 'string') {\n this._encoded = mappings;\n this._decoded = undefined;\n } else {\n this._encoded = undefined;\n this._decoded = maybeSort(mappings, isString);\n }\n\n this._decodedMemo = memoizedState();\n this._bySources = undefined;\n this._bySourceMemos = undefined;\n }\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\nfunction cast(map: unknown): PublicMap {\n return map as any;\n}\n\n/**\n * Returns the encoded (VLQ string) form of the SourceMap's mappings field.\n */\nexport function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'] {\n return (cast(map)._encoded ??= encode(cast(map)._decoded!));\n}\n\n/**\n * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.\n */\nexport function decodedMappings(map: TraceMap): Readonly {\n return (cast(map)._decoded ||= decode(cast(map)._encoded!));\n}\n\n/**\n * A low-level API to find the segment associated with a generated line/column (think, from a\n * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.\n */\nexport function traceSegment(\n map: TraceMap,\n line: number,\n column: number,\n): Readonly | null {\n const decoded = decodedMappings(map);\n\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length) return null;\n\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n GREATEST_LOWER_BOUND,\n );\n\n return index === -1 ? null : segments[index];\n}\n\n/**\n * A higher-level API to find the source/line/column associated with a generated line/column\n * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in\n * `source-map` library.\n */\nexport function originalPositionFor(\n map: TraceMap,\n needle: Needle,\n): OriginalMapping | InvalidOriginalMapping {\n let { line, column, bias } = needle;\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n\n const decoded = decodedMappings(map);\n\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length) return OMapping(null, null, null, null);\n\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n bias || GREATEST_LOWER_BOUND,\n );\n\n if (index === -1) return OMapping(null, null, null, null);\n\n const segment = segments[index];\n if (segment.length === 1) return OMapping(null, null, null, null);\n\n const { names, resolvedSources } = map;\n return OMapping(\n resolvedSources[segment[SOURCES_INDEX]],\n segment[SOURCE_LINE] + 1,\n segment[SOURCE_COLUMN],\n segment.length === 5 ? names[segment[NAMES_INDEX]] : null,\n );\n}\n\n/**\n * Finds the generated line/column position of the provided source/line/column source position.\n */\nexport function generatedPositionFor(\n map: TraceMap,\n needle: SourceNeedle,\n): GeneratedMapping | InvalidGeneratedMapping {\n const { source, line, column, bias } = needle;\n return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);\n}\n\n/**\n * Finds all generated line/column positions of the provided source/line/column source position.\n */\nexport function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[] {\n const { source, line, column, bias } = needle;\n // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.\n return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);\n}\n\n/**\n * Iterates each mapping in generated position order.\n */\nexport function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void {\n const decoded = decodedMappings(map);\n const { names, resolvedSources } = map;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n\n const generatedLine = i + 1;\n const generatedColumn = seg[0];\n let source = null;\n let originalLine = null;\n let originalColumn = null;\n let name = null;\n if (seg.length !== 1) {\n source = resolvedSources[seg[1]];\n originalLine = seg[2] + 1;\n originalColumn = seg[3];\n }\n if (seg.length === 5) name = names[seg[4]];\n\n cb({\n generatedLine,\n generatedColumn,\n source,\n originalLine,\n originalColumn,\n name,\n } as EachMapping);\n }\n }\n}\n\nfunction sourceIndex(map: TraceMap, source: string): number {\n const { sources, resolvedSources } = map;\n let index = sources.indexOf(source);\n if (index === -1) index = resolvedSources.indexOf(source);\n return index;\n}\n\n/**\n * Retrieves the source content for a particular source, if its found. Returns null if not.\n */\nexport function sourceContentFor(map: TraceMap, source: string): string | null {\n const { sourcesContent } = map;\n if (sourcesContent == null) return null;\n const index = sourceIndex(map, source);\n return index === -1 ? null : sourcesContent[index];\n}\n\n/**\n * Determines if the source is marked to ignore by the source map.\n */\nexport function isIgnored(map: TraceMap, source: string): boolean {\n const { ignoreList } = map;\n if (ignoreList == null) return false;\n const index = sourceIndex(map, source);\n return index === -1 ? false : ignoreList.includes(index);\n}\n\n/**\n * A helper that skips sorting of the input map's mappings array, which can be expensive for larger\n * maps.\n */\nexport function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap {\n const tracer = new TraceMap(clone(map, []), mapUrl);\n cast(tracer)._decoded = map.mappings;\n return tracer;\n}\n\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function decodedMap(\n map: TraceMap,\n): Omit & { mappings: readonly SourceMapSegment[][] } {\n return clone(map, decodedMappings(map));\n}\n\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function encodedMap(map: TraceMap): EncodedSourceMap {\n return clone(map, encodedMappings(map));\n}\n\nfunction clone(\n map: TraceMap | DecodedSourceMap,\n mappings: T,\n): T extends string ? EncodedSourceMap : DecodedSourceMap {\n return {\n version: map.version,\n file: map.file,\n names: map.names,\n sourceRoot: map.sourceRoot,\n sources: map.sources,\n sourcesContent: map.sourcesContent,\n mappings,\n ignoreList: map.ignoreList || (map as XInput).x_google_ignoreList,\n } as any;\n}\n\nfunction OMapping(source: null, line: null, column: null, name: null): InvalidOriginalMapping;\nfunction OMapping(\n source: string,\n line: number,\n column: number,\n name: string | null,\n): OriginalMapping;\nfunction OMapping(\n source: string | null,\n line: number | null,\n column: number | null,\n name: string | null,\n): OriginalMapping | InvalidOriginalMapping {\n return { source, line, column, name } as any;\n}\n\nfunction GMapping(line: null, column: null): InvalidGeneratedMapping;\nfunction GMapping(line: number, column: number): GeneratedMapping;\nfunction GMapping(\n line: number | null,\n column: number | null,\n): GeneratedMapping | InvalidGeneratedMapping {\n return { line, column } as any;\n}\n\nfunction traceSegmentInternal(\n segments: SourceMapSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number;\nfunction traceSegmentInternal(\n segments: ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number;\nfunction traceSegmentInternal(\n segments: SourceMapSegment[] | ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number {\n let index = memoizedBinarySearch(segments, column, memo, line);\n if (bsFound) {\n index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);\n } else if (bias === LEAST_UPPER_BOUND) index++;\n\n if (index === -1 || index === segments.length) return -1;\n return index;\n}\n\nfunction sliceGeneratedPositions(\n segments: ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): GeneratedMapping[] {\n let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);\n\n // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in\n // insertion order) segment that matched. Even if we did respect the bias when tracing, we would\n // still need to call `lowerBound()` to find the first segment, which is slower than just looking\n // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the\n // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to\n // match LEAST_UPPER_BOUND.\n if (!bsFound && bias === LEAST_UPPER_BOUND) min++;\n\n if (min === -1 || min === segments.length) return [];\n\n // We may have found the segment that started at an earlier column. If this is the case, then we\n // need to slice all generated segments that match _that_ column, because all such segments span\n // to our desired column.\n const matchedColumn = bsFound ? column : segments[min][COLUMN];\n\n // The binary search is not guaranteed to find the lower bound when a match wasn't found.\n if (!bsFound) min = lowerBound(segments, matchedColumn, min);\n const max = upperBound(segments, matchedColumn, min);\n\n const result = [];\n for (; min <= max; min++) {\n const segment = segments[min];\n result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));\n }\n return result;\n}\n\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: false,\n): GeneratedMapping | InvalidGeneratedMapping;\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: true,\n): GeneratedMapping[];\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: boolean,\n): GeneratedMapping | InvalidGeneratedMapping | GeneratedMapping[] {\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n\n const { sources, resolvedSources } = map;\n let sourceIndex = sources.indexOf(source);\n if (sourceIndex === -1) sourceIndex = resolvedSources.indexOf(source);\n if (sourceIndex === -1) return all ? [] : GMapping(null, null);\n\n const generated = (cast(map)._bySources ||= buildBySources(\n decodedMappings(map),\n (cast(map)._bySourceMemos = sources.map(memoizedState)),\n ));\n\n const segments = generated[sourceIndex][line];\n if (segments == null) return all ? [] : GMapping(null, null);\n\n const memo = cast(map)._bySourceMemos![sourceIndex];\n\n if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);\n\n const index = traceSegmentInternal(segments, memo, line, column, bias);\n if (index === -1) return GMapping(null, null);\n\n const segment = segments[index];\n return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);\n}\n"],"names":["encode","decode","bsFound"],"mappings":";;;;;;IAEc,SAAU,OAAO,CAAC,KAAa,EAAE,IAAwB,EAAA;;;;QAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,IAAI,IAAI,GAAG,CAAC;IAE7C,IAAA,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACjC;;ICTA;;IAEG;IACqB,SAAA,aAAa,CAAC,IAA+B,EAAA;IACnE,IAAA,IAAI,CAAC,IAAI;IAAE,QAAA,OAAO,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAClC;;ICQO,MAAM,MAAM,GAAG,CAAC,CAAC;IACjB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IACtB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IAEtB,MAAM,kBAAkB,GAAG,CAAC,CAAC;IAC7B,MAAM,oBAAoB,GAAG,CAAC;;IClBvB,SAAU,SAAS,CAC/B,QAA8B,EAC9B,KAAc,EAAA;QAEd,MAAM,aAAa,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC3D,IAAA,IAAI,aAAa,KAAK,QAAQ,CAAC,MAAM;IAAE,QAAA,OAAO,QAAQ,CAAC;;;IAIvD,IAAA,IAAI,CAAC,KAAK;IAAE,QAAA,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;QAExC,KAAK,IAAI,CAAC,GAAG,aAAa,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;IAC7F,QAAA,QAAQ,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;SAChD;IACD,IAAA,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,SAAS,uBAAuB,CAAC,QAA8B,EAAE,KAAa,EAAA;IAC5E,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAC5C,QAAA,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAAE,YAAA,OAAO,CAAC,CAAC;SACtC;QACD,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,SAAS,QAAQ,CAAC,IAAwB,EAAA;IACxC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACpC,QAAA,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE;IACzC,YAAA,OAAO,KAAK,CAAC;aACd;SACF;IACD,IAAA,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,YAAY,CAAC,IAAwB,EAAE,KAAc,EAAA;IAC5D,IAAA,IAAI,CAAC,KAAK;IAAE,QAAA,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAChC,IAAA,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACnC,CAAC;IAED,SAAS,cAAc,CAAC,CAAmB,EAAE,CAAmB,EAAA;QAC9D,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/B;;ICnCO,IAAI,KAAK,GAAG,KAAK,CAAC;IAEzB;;;;;;;;;;;;;;;IAeG;IACG,SAAU,YAAY,CAC1B,QAA+C,EAC/C,MAAc,EACd,GAAW,EACX,IAAY,EAAA;IAEZ,IAAA,OAAO,GAAG,IAAI,IAAI,EAAE;IAClB,QAAA,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;YACtC,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAE3C,QAAA,IAAI,GAAG,KAAK,CAAC,EAAE;gBACb,KAAK,GAAG,IAAI,CAAC;IACb,YAAA,OAAO,GAAG,CAAC;aACZ;IAED,QAAA,IAAI,GAAG,GAAG,CAAC,EAAE;IACX,YAAA,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;aACf;iBAAM;IACL,YAAA,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;aAChB;SACF;QAED,KAAK,GAAG,KAAK,CAAC;QACd,OAAO,GAAG,GAAG,CAAC,CAAC;IACjB,CAAC;aAEe,UAAU,CACxB,QAA+C,EAC/C,MAAc,EACd,KAAa,EAAA;IAEb,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;YACxD,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM;gBAAE,MAAM;SAC3C;IACD,IAAA,OAAO,KAAK,CAAC;IACf,CAAC;aAEe,UAAU,CACxB,QAA+C,EAC/C,MAAc,EACd,KAAa,EAAA;IAEb,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;YAC3C,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM;gBAAE,MAAM;SAC3C;IACD,IAAA,OAAO,KAAK,CAAC;IACf,CAAC;aAEe,aAAa,GAAA;QAC3B,OAAO;YACL,OAAO,EAAE,CAAC,CAAC;YACX,UAAU,EAAE,CAAC,CAAC;YACd,SAAS,EAAE,CAAC,CAAC;SACd,CAAC;IACJ,CAAC;IAED;;;IAGG;IACG,SAAU,oBAAoB,CAClC,QAA+C,EAC/C,MAAc,EACd,KAAgB,EAChB,GAAW,EAAA;QAEX,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;QAEjD,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,IAAA,IAAI,IAAI,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAC/B,IAAA,IAAI,GAAG,KAAK,OAAO,EAAE;IACnB,QAAA,IAAI,MAAM,KAAK,UAAU,EAAE;IACzB,YAAA,KAAK,GAAG,SAAS,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;IACnE,YAAA,OAAO,SAAS,CAAC;aAClB;IAED,QAAA,IAAI,MAAM,IAAI,UAAU,EAAE;;IAExB,YAAA,GAAG,GAAG,SAAS,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;aACxC;iBAAM;gBACL,IAAI,GAAG,SAAS,CAAC;aAClB;SACF;IACD,IAAA,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;IACpB,IAAA,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;IAE1B,IAAA,QAAQ,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;IACvE;;ICvGA;IACA;IACc,SAAU,cAAc,CACpC,OAAsC,EACtC,KAAkB,EAAA;QAElB,MAAM,OAAO,GAAa,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEpD,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACvC,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACxB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACpC,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,YAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;oBAAE,SAAS;IAE/B,YAAA,MAAM,WAAW,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;IACvC,YAAA,MAAM,UAAU,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;IACpC,YAAA,MAAM,YAAY,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;IACxC,YAAA,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5C,YAAA,MAAM,YAAY,IAAI,cAAc,CAAC,UAAU,CAAzB,KAAA,cAAc,CAAC,UAAU,CAAM,GAAA,EAAE,EAAC,CAAC;IACzD,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;;;;;IAMhC,YAAA,IAAI,KAAK,GAAG,UAAU,CACpB,YAAY,EACZ,YAAY,EACZ,oBAAoB,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,CAAC,CACnE,CAAC;IAEF,YAAA,IAAI,CAAC,SAAS,GAAG,EAAE,KAAK,CAAC;IACzB,YAAA,MAAM,CAAC,YAAY,EAAE,KAAK,EAAE,CAAC,YAAY,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aAC7D;SACF;IAED,IAAA,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,SAAS,MAAM,CAAI,KAAU,EAAE,KAAa,EAAE,KAAQ,EAAA;IACpD,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YACzC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;SACzB;IACD,IAAA,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IACvB,CAAC;IAED;IACA;IACA;IACA;IACA;IACA,SAAS,cAAc,GAAA;IACrB,IAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAO,CAAC;IAClC;;ACxCa,UAAA,MAAM,GAAW,UAAU,GAAG,EAAE,MAAM,EAAA;IACjD,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAE1B,IAAA,IAAI,EAAE,UAAU,IAAI,MAAM,CAAC,EAAE;IAC3B,QAAA,OAAO,IAAI,QAAQ,CAAC,MAAyD,EAAE,MAAM,CAAC,CAAC;SACxF;QAED,MAAM,QAAQ,GAAyB,EAAE,CAAC;QAC1C,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,MAAM,cAAc,GAAsB,EAAE,CAAC;QAC7C,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,MAAM,UAAU,GAAa,EAAE,CAAC;QAEhC,OAAO,CACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,cAAc,EACd,KAAK,EACL,UAAU,EACV,CAAC,EACD,CAAC,EACD,QAAQ,EACR,QAAQ,CACT,CAAC;IAEF,IAAA,MAAM,MAAM,GAAqB;IAC/B,QAAA,OAAO,EAAE,CAAC;YACV,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,KAAK;YACL,OAAO;YACP,cAAc;YACd,QAAQ;YACR,UAAU;SACX,CAAC;IAEF,IAAA,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACrC,EAAY;IAEZ,SAAS,KAAK,CAAI,GAAM,EAAA;IACtB,IAAA,OAAO,OAAO,GAAG,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IACzD,CAAC;IAED,SAAS,OAAO,CACd,KAA+B,EAC/B,MAAiC,EACjC,QAA8B,EAC9B,OAAiB,EACjB,cAAiC,EACjC,KAAe,EACf,UAAoB,EACpB,UAAkB,EAClB,YAAoB,EACpB,QAAgB,EAChB,UAAkB,EAAA;IAElB,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACxC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAEpC,IAAI,EAAE,GAAG,QAAQ,CAAC;YAClB,IAAI,EAAE,GAAG,UAAU,CAAC;YACpB,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE;gBAC3B,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,YAAA,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAEtD,YAAA,IAAI,EAAE,KAAK,QAAQ,EAAE;IACnB,gBAAA,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;iBAC7D;IAAM,iBAAA,IAAI,EAAE,GAAG,QAAQ,EAAE;IACxB,gBAAA,EAAE,GAAG,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC;iBACvC;aACF;IAED,QAAA,UAAU,CACR,GAAG,EACH,MAAM,EACN,QAAQ,EACR,OAAO,EACP,cAAc,EACd,KAAK,EACL,UAAU,EACV,UAAU,GAAG,MAAM,CAAC,IAAI,EACxB,YAAY,GAAG,MAAM,CAAC,MAAM,EAC5B,EAAE,EACF,EAAE,CACH,CAAC;SACH;IACH,CAAC;IAED,SAAS,UAAU,CACjB,KAA2B,EAC3B,MAAiC,EACjC,QAA8B,EAC9B,OAAiB,EACjB,cAAiC,EACjC,KAAe,EACf,UAAoB,EACpB,UAAkB,EAClB,YAAoB,EACpB,QAAgB,EAChB,UAAkB,EAAA;IAElB,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,UAAU,IAAI,MAAM;IAAE,QAAA,OAAO,OAAO,CAAC,GAAI,SAAmD,CAAC,CAAC;QAElG,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,IAAA,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IACrC,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;IACjC,IAAA,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IACrC,IAAA,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC;IAE/E,IAAA,MAAM,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACjC,IAAA,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IAEzB,IAAA,IAAI,QAAQ;IAAE,QAAA,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;;IAC1C,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE;IAAE,YAAA,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEhF,IAAA,IAAI,OAAO;IAAE,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE;gBAAE,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;IAElG,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACvC,QAAA,MAAM,KAAK,GAAG,UAAU,GAAG,CAAC,CAAC;;;;;YAM7B,IAAI,KAAK,GAAG,QAAQ;gBAAE,OAAO;;;YAI7B,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;;;IAGrC,QAAA,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,YAAY,GAAG,CAAC,CAAC;IAE3C,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACxB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACpC,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBACpB,MAAM,MAAM,GAAG,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;;;IAIrC,YAAA,IAAI,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,UAAU;oBAAE,OAAO;IAEvD,YAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;IACpB,gBAAA,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;oBACnB,SAAS;iBACV;gBAED,MAAM,YAAY,GAAG,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;IACxD,YAAA,MAAM,UAAU,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;IACpC,YAAA,MAAM,YAAY,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;IACxC,YAAA,GAAG,CAAC,IAAI,CACN,GAAG,CAAC,MAAM,KAAK,CAAC;sBACZ,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC;IAClD,kBAAE,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CACrF,CAAC;aACH;SACF;IACH,CAAC;IAED,SAAS,MAAM,CAAI,GAAQ,EAAE,KAAU,EAAA;IACrC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;YAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,SAAS,OAAO,CAAI,GAAU,EAAE,KAAa,EAAA;IAC3C,IAAA,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,EAAE;IAAE,QAAA,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACtD,IAAA,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;IACpB;;ICpHA,MAAM,aAAa,GAAG,uDAAuD,CAAC;IAC9E,MAAM,eAAe,GAAG,yEAAyE,CAAC;AAErF,UAAA,iBAAiB,GAAG,CAAC,EAAE;AAC7B,UAAM,oBAAoB,GAAG,EAAE;UAIzB,QAAQ,CAAA;QAkBnB,WAAY,CAAA,GAAmB,EAAE,MAAsB,EAAA;IACrD,QAAA,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC;IAEzC,QAAA,IAAI,CAAC,QAAQ,IAAK,GAAwC,CAAC,YAAY;IAAE,YAAA,OAAO,GAAe,CAAC;IAEhG,QAAA,MAAM,MAAM,IAAI,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAwC,CAAC;IAEzF,QAAA,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;IAC7E,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACvB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,EAAE,CAAC;IACzB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC7B,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACvB,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACrC,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAK,MAAiB,CAAC,mBAAmB,IAAI,SAAS,CAAC;IAE3F,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;YAC9D,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IAElE,QAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAC5B,QAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;IAChC,YAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACzB,YAAA,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;aAC3B;iBAAM;IACL,YAAA,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;gBAC1B,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;aAC/C;IAED,QAAA,IAAI,CAAC,YAAY,GAAG,aAAa,EAAE,CAAC;IACpC,QAAA,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC5B,QAAA,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;SACjC;IACF,CAAA;IAED;;;IAGG;IACH,SAAS,IAAI,CAAC,GAAY,EAAA;IACxB,IAAA,OAAO,GAAU,CAAC;IACpB,CAAC;IAED;;IAEG;IACG,SAAU,eAAe,CAAC,GAAa,EAAA;;;QAC3C,QAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAC,IAAI,CAAC,GAAG,CAAC,EAAC,QAAQ,uCAAR,QAAQ,GAAKA,qBAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAS,CAAC,GAAE;IAC9D,CAAC;IAED;;IAEG;IACG,SAAU,eAAe,CAAC,GAAa,EAAA;;QAC3C,QAAO,CAAA,EAAA,GAAC,IAAI,CAAC,GAAG,CAAC,EAAC,QAAQ,QAAR,QAAQ,GAAKC,qBAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAS,CAAC,GAAE;IAC9D,CAAC;IAED;;;IAGG;aACa,YAAY,CAC1B,GAAa,EACb,IAAY,EACZ,MAAc,EAAA;IAEd,IAAA,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;;;IAIrC,IAAA,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM;IAAE,QAAA,OAAO,IAAI,CAAC;IAExC,IAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAA,MAAM,KAAK,GAAG,oBAAoB,CAChC,QAAQ,EACR,IAAI,CAAC,GAAG,CAAC,CAAC,YAAY,EACtB,IAAI,EACJ,MAAM,EACN,oBAAoB,CACrB,CAAC;IAEF,IAAA,OAAO,KAAK,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED;;;;IAIG;IACa,SAAA,mBAAmB,CACjC,GAAa,EACb,MAAc,EAAA;QAEd,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IACpC,IAAA,IAAI,EAAE,CAAC;QACP,IAAI,IAAI,GAAG,CAAC;IAAE,QAAA,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;QAC7C,IAAI,MAAM,GAAG,CAAC;IAAE,QAAA,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;IAEjD,IAAA,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;;;IAIrC,IAAA,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM;YAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAEpE,IAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,KAAK,GAAG,oBAAoB,CAChC,QAAQ,EACR,IAAI,CAAC,GAAG,CAAC,CAAC,YAAY,EACtB,IAAI,EACJ,MAAM,EACN,IAAI,IAAI,oBAAoB,CAC7B,CAAC;QAEF,IAAI,KAAK,KAAK,CAAC,CAAC;YAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAE1D,IAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChC,IAAA,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAElE,IAAA,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IACvC,IAAA,OAAO,QAAQ,CACb,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,EACvC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,EACxB,OAAO,CAAC,aAAa,CAAC,EACtB,OAAO,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GAAG,IAAI,CAC1D,CAAC;IACJ,CAAC;IAED;;IAEG;IACa,SAAA,oBAAoB,CAClC,GAAa,EACb,MAAoB,EAAA;QAEpB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAC9C,IAAA,OAAO,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,IAAI,oBAAoB,EAAE,KAAK,CAAC,CAAC;IAC3F,CAAC;IAED;;IAEG;IACa,SAAA,wBAAwB,CAAC,GAAa,EAAE,MAAoB,EAAA;QAC1E,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;;IAE9C,IAAA,OAAO,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,IAAI,iBAAiB,EAAE,IAAI,CAAC,CAAC;IACvF,CAAC;IAED;;IAEG;IACa,SAAA,WAAW,CAAC,GAAa,EAAE,EAAkC,EAAA;IAC3E,IAAA,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IACrC,IAAA,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAEvC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACvC,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACxB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACpC,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAEpB,YAAA,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,YAAA,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC/B,IAAI,MAAM,GAAG,IAAI,CAAC;gBAClB,IAAI,YAAY,GAAG,IAAI,CAAC;gBACxB,IAAI,cAAc,GAAG,IAAI,CAAC;gBAC1B,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,YAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;oBACpB,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,gBAAA,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC1B,gBAAA,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;iBACzB;IACD,YAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;oBAAE,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3C,YAAA,EAAE,CAAC;oBACD,aAAa;oBACb,eAAe;oBACf,MAAM;oBACN,YAAY;oBACZ,cAAc;oBACd,IAAI;IACU,aAAA,CAAC,CAAC;aACnB;SACF;IACH,CAAC;IAED,SAAS,WAAW,CAAC,GAAa,EAAE,MAAc,EAAA;IAChD,IAAA,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;QACzC,IAAI,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,KAAK,KAAK,CAAC,CAAC;IAAE,QAAA,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,IAAA,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;IAEG;IACa,SAAA,gBAAgB,CAAC,GAAa,EAAE,MAAc,EAAA;IAC5D,IAAA,MAAM,EAAE,cAAc,EAAE,GAAG,GAAG,CAAC;QAC/B,IAAI,cAAc,IAAI,IAAI;IAAE,QAAA,OAAO,IAAI,CAAC;QACxC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACvC,IAAA,OAAO,KAAK,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACrD,CAAC;IAED;;IAEG;IACa,SAAA,SAAS,CAAC,GAAa,EAAE,MAAc,EAAA;IACrD,IAAA,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC;QAC3B,IAAI,UAAU,IAAI,IAAI;IAAE,QAAA,OAAO,KAAK,CAAC;QACrC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACvC,IAAA,OAAO,KAAK,KAAK,CAAC,CAAC,GAAG,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3D,CAAC;IAED;;;IAGG;IACa,SAAA,mBAAmB,CAAC,GAAqB,EAAE,MAAe,EAAA;IACxE,IAAA,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IACrC,IAAA,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;IAGG;IACG,SAAU,UAAU,CACxB,GAAa,EAAA;QAEb,OAAO,KAAK,CAAC,GAAG,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED;;;IAGG;IACG,SAAU,UAAU,CAAC,GAAa,EAAA;QACtC,OAAO,KAAK,CAAC,GAAG,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,SAAS,KAAK,CACZ,GAAgC,EAChC,QAAW,EAAA;QAEX,OAAO;YACL,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,cAAc,EAAE,GAAG,CAAC,cAAc;YAClC,QAAQ;IACR,QAAA,UAAU,EAAE,GAAG,CAAC,UAAU,IAAK,GAAc,CAAC,mBAAmB;SAC3D,CAAC;IACX,CAAC;IASD,SAAS,QAAQ,CACf,MAAqB,EACrB,IAAmB,EACnB,MAAqB,EACrB,IAAmB,EAAA;QAEnB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAS,CAAC;IAC/C,CAAC;IAID,SAAS,QAAQ,CACf,IAAmB,EACnB,MAAqB,EAAA;IAErB,IAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAS,CAAC;IACjC,CAAC;IAgBD,SAAS,oBAAoB,CAC3B,QAA+C,EAC/C,IAAe,EACf,IAAY,EACZ,MAAc,EACd,IAAU,EAAA;IAEV,IAAA,IAAI,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC/D,IAAIC,KAAO,EAAE;YACX,KAAK,GAAG,CAAC,IAAI,KAAK,iBAAiB,GAAG,UAAU,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;SACzF;aAAM,IAAI,IAAI,KAAK,iBAAiB;IAAE,QAAA,KAAK,EAAE,CAAC;QAE/C,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM;YAAE,OAAO,CAAC,CAAC,CAAC;IACzD,IAAA,OAAO,KAAK,CAAC;IACf,CAAC;IAED,SAAS,uBAAuB,CAC9B,QAA0B,EAC1B,IAAe,EACf,IAAY,EACZ,MAAc,EACd,IAAU,EAAA;IAEV,IAAA,IAAI,GAAG,GAAG,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC;;;;;;;IAQnF,IAAA,IAAI,CAACA,KAAO,IAAI,IAAI,KAAK,iBAAiB;IAAE,QAAA,GAAG,EAAE,CAAC;QAElD,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,GAAG,KAAK,QAAQ,CAAC,MAAM;IAAE,QAAA,OAAO,EAAE,CAAC;;;;IAKrD,IAAA,MAAM,aAAa,GAAGA,KAAO,GAAG,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;;IAG/D,IAAA,IAAI,CAACA,KAAO;YAAE,GAAG,GAAG,UAAU,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,CAAC,CAAC;QAC7D,MAAM,GAAG,GAAG,UAAU,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,CAAC,CAAC;QAErD,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,IAAA,OAAO,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,EAAE;IACxB,QAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC9B,QAAA,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;SACvF;IACD,IAAA,OAAO,MAAM,CAAC;IAChB,CAAC;IAkBD,SAAS,iBAAiB,CACxB,GAAa,EACb,MAAc,EACd,IAAY,EACZ,MAAc,EACd,IAAU,EACV,GAAY,EAAA;;IAEZ,IAAA,IAAI,EAAE,CAAC;QACP,IAAI,IAAI,GAAG,CAAC;IAAE,QAAA,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;QAC7C,IAAI,MAAM,GAAG,CAAC;IAAE,QAAA,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;IAEjD,IAAA,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;QACzC,IAAI,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,WAAW,KAAK,CAAC,CAAC;IAAE,QAAA,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACtE,IAAI,WAAW,KAAK,CAAC,CAAC;IAAE,QAAA,OAAO,GAAG,GAAG,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAE/D,IAAA,MAAM,SAAS,IAAG,CAAA,EAAA,GAAC,IAAI,CAAC,GAAG,CAAC,EAAC,UAAU,KAAA,EAAA,CAAV,UAAU,GAAK,cAAc,CACxD,eAAe,CAAC,GAAG,CAAC,GACnB,IAAI,CAAC,GAAG,CAAC,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,EACvD,EAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,QAAQ,IAAI,IAAI;IAAE,QAAA,OAAO,GAAG,GAAG,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAE7D,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,cAAe,CAAC,WAAW,CAAC,CAAC;IAEpD,IAAA,IAAI,GAAG;IAAE,QAAA,OAAO,uBAAuB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAE5E,IAAA,MAAM,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QACvE,IAAI,KAAK,KAAK,CAAC,CAAC;IAAE,QAAA,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAE9C,IAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChC,IAAA,OAAO,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAClF;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts b/web/static/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts deleted file mode 100644 index ec775fbe..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { TraceMap } from './trace-mapping'; -import type { SectionedSourceMapInput } from './types'; -type AnyMap = { - new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; - (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; -}; -export declare const AnyMap: AnyMap; -export {}; diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts b/web/static/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts deleted file mode 100644 index ecb2873c..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; -export type MemoState = { - lastKey: number; - lastNeedle: number; - lastIndex: number; -}; -export declare let found: boolean; -/** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ -export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; -export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; -export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; -export declare function memoizedState(): MemoState; -/** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ -export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts b/web/static/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts deleted file mode 100644 index a91751cd..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment'; -import type { MemoState } from './binary-search'; -export type Source = { - __proto__: null; - [line: number]: Exclude[]; -}; -export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: MemoState[]): Source[]; diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts b/web/static/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts deleted file mode 100644 index cf7d4f8a..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function resolve(input: string, base: string | undefined): string; diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts b/web/static/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts deleted file mode 100644 index 2bfb5dc1..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment'; -export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts b/web/static/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts deleted file mode 100644 index 6d4d318d..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -type GeneratedColumn = number; -type SourcesIndex = number; -type SourceLine = number; -type SourceColumn = number; -type NamesIndex = number; -type GeneratedLine = number; -export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; -export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; -export declare const COLUMN = 0; -export declare const SOURCES_INDEX = 1; -export declare const SOURCE_LINE = 2; -export declare const SOURCE_COLUMN = 3; -export declare const NAMES_INDEX = 4; -export declare const REV_GENERATED_LINE = 1; -export declare const REV_GENERATED_COLUMN = 2; -export {}; diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts b/web/static/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts deleted file mode 100644 index bead5c12..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Removes everything after the last "/", but leaves the slash. - */ -export default function stripFilename(path: string | undefined | null): string; diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts b/web/static/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts deleted file mode 100644 index f618ec36..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment'; -import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping } from './types'; -export type { SourceMapSegment } from './sourcemap-segment'; -export type { SourceMap, DecodedSourceMap, EncodedSourceMap, Section, SectionedSourceMap, SourceMapV3, Bias, EachMapping, GeneratedMapping, InvalidGeneratedMapping, InvalidOriginalMapping, Needle, OriginalMapping, OriginalMapping as Mapping, SectionedSourceMapInput, SourceMapInput, SourceNeedle, XInput, EncodedSourceMapXInput, DecodedSourceMapXInput, SectionedSourceMapXInput, SectionXInput, } from './types'; -export declare const LEAST_UPPER_BOUND = -1; -export declare const GREATEST_LOWER_BOUND = 1; -export { AnyMap } from './any-map'; -export declare class TraceMap implements SourceMap { - version: SourceMapV3['version']; - file: SourceMapV3['file']; - names: SourceMapV3['names']; - sourceRoot: SourceMapV3['sourceRoot']; - sources: SourceMapV3['sources']; - sourcesContent: SourceMapV3['sourcesContent']; - ignoreList: SourceMapV3['ignoreList']; - resolvedSources: string[]; - private _encoded; - private _decoded; - private _decodedMemo; - private _bySources; - private _bySourceMemos; - constructor(map: SourceMapInput, mapUrl?: string | null); -} -/** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ -export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings']; -/** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ -export declare function decodedMappings(map: TraceMap): Readonly; -/** - * A low-level API to find the segment associated with a generated line/column (think, from a - * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. - */ -export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly | null; -/** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ -export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping; -/** - * Finds the generated line/column position of the provided source/line/column source position. - */ -export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping; -/** - * Finds all generated line/column positions of the provided source/line/column source position. - */ -export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[]; -/** - * Iterates each mapping in generated position order. - */ -export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void; -/** - * Retrieves the source content for a particular source, if its found. Returns null if not. - */ -export declare function sourceContentFor(map: TraceMap, source: string): string | null; -/** - * Determines if the source is marked to ignore by the source map. - */ -export declare function isIgnored(map: TraceMap, source: string): boolean; -/** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ -export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap; -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function decodedMap(map: TraceMap): Omit & { - mappings: readonly SourceMapSegment[][]; -}; -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function encodedMap(map: TraceMap): EncodedSourceMap; diff --git a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts b/web/static/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts deleted file mode 100644 index a94e6b25..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment'; -import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping'; -export interface SourceMapV3 { - file?: string | null; - names: string[]; - sourceRoot?: string; - sources: (string | null)[]; - sourcesContent?: (string | null)[]; - version: 3; - ignoreList?: number[]; -} -export interface EncodedSourceMap extends SourceMapV3 { - mappings: string; -} -export interface DecodedSourceMap extends SourceMapV3 { - mappings: SourceMapSegment[][]; -} -export interface Section { - offset: { - line: number; - column: number; - }; - map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; -} -export interface SectionedSourceMap { - file?: string | null; - sections: Section[]; - version: 3; -} -export type OriginalMapping = { - source: string | null; - line: number; - column: number; - name: string | null; -}; -export type InvalidOriginalMapping = { - source: null; - line: null; - column: null; - name: null; -}; -export type GeneratedMapping = { - line: number; - column: number; -}; -export type InvalidGeneratedMapping = { - line: null; - column: null; -}; -export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND; -export type XInput = { - x_google_ignoreList?: SourceMapV3['ignoreList']; -}; -export type EncodedSourceMapXInput = EncodedSourceMap & XInput; -export type DecodedSourceMapXInput = DecodedSourceMap & XInput; -export type SectionedSourceMapXInput = Omit & { - sections: SectionXInput[]; -}; -export type SectionXInput = Omit & { - map: SectionedSourceMapInput; -}; -export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap; -export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput; -export type Needle = { - line: number; - column: number; - bias?: Bias; -}; -export type SourceNeedle = { - source: string; - line: number; - column: number; - bias?: Bias; -}; -export type EachMapping = { - generatedLine: number; - generatedColumn: number; - source: null; - originalLine: null; - originalColumn: null; - name: null; -} | { - generatedLine: number; - generatedColumn: number; - source: string | null; - originalLine: number; - originalColumn: number; - name: string | null; -}; -export declare abstract class SourceMap { - version: SourceMapV3['version']; - file: SourceMapV3['file']; - names: SourceMapV3['names']; - sourceRoot: SourceMapV3['sourceRoot']; - sources: SourceMapV3['sources']; - sourcesContent: SourceMapV3['sourcesContent']; - resolvedSources: SourceMapV3['sources']; - ignoreList: SourceMapV3['ignoreList']; -} diff --git a/web/static/node_modules/@jridgewell/trace-mapping/package.json b/web/static/node_modules/@jridgewell/trace-mapping/package.json deleted file mode 100644 index 454a1bdb..00000000 --- a/web/static/node_modules/@jridgewell/trace-mapping/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "@jridgewell/trace-mapping", - "version": "0.3.25", - "description": "Trace the original position through a source map", - "keywords": [ - "source", - "map" - ], - "main": "dist/trace-mapping.umd.js", - "module": "dist/trace-mapping.mjs", - "types": "dist/types/trace-mapping.d.ts", - "files": [ - "dist" - ], - "exports": { - ".": [ - { - "types": "./dist/types/trace-mapping.d.ts", - "browser": "./dist/trace-mapping.umd.js", - "require": "./dist/trace-mapping.umd.js", - "import": "./dist/trace-mapping.mjs" - }, - "./dist/trace-mapping.umd.js" - ], - "./package.json": "./package.json" - }, - "author": "Justin Ridgewell ", - "repository": { - "type": "git", - "url": "git+https://github.com/jridgewell/trace-mapping.git" - }, - "license": "MIT", - "scripts": { - "benchmark": "run-s build:rollup benchmark:*", - "benchmark:install": "cd benchmark && npm install", - "benchmark:only": "node --expose-gc benchmark/index.mjs", - "build": "run-s -n build:*", - "build:rollup": "rollup -c rollup.config.mjs", - "build:ts": "tsc --project tsconfig.build.json", - "lint": "run-s -n lint:*", - "lint:prettier": "npm run test:lint:prettier -- --write", - "lint:ts": "npm run test:lint:ts -- --fix", - "prebuild": "rm -rf dist", - "prepublishOnly": "npm run preversion", - "preversion": "run-s test build", - "test": "run-s -n test:lint test:only", - "test:debug": "mocha --inspect-brk", - "test:lint": "run-s -n test:lint:*", - "test:lint:prettier": "prettier --check '{src,test}/**/*.ts' '**/*.md'", - "test:lint:ts": "eslint '{src,test}/**/*.ts'", - "test:only": "c8 mocha", - "test:watch": "mocha --watch" - }, - "devDependencies": { - "@rollup/plugin-typescript": "11.1.6", - "@types/mocha": "10.0.6", - "@types/node": "20.11.20", - "@typescript-eslint/eslint-plugin": "6.18.1", - "@typescript-eslint/parser": "6.18.1", - "benchmark": "2.1.4", - "c8": "9.0.0", - "esbuild": "0.19.11", - "eslint": "8.56.0", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-no-only-tests": "3.1.0", - "mocha": "10.3.0", - "npm-run-all": "4.1.5", - "prettier": "3.1.1", - "rollup": "4.9.4", - "tsx": "4.7.0", - "typescript": "5.3.3" - }, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } -} diff --git a/web/static/node_modules/@parcel/watcher-linux-x64-glibc/LICENSE b/web/static/node_modules/@parcel/watcher-linux-x64-glibc/LICENSE deleted file mode 100644 index 7fb9bc95..00000000 --- a/web/static/node_modules/@parcel/watcher-linux-x64-glibc/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017-present Devon Govett - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/@parcel/watcher-linux-x64-glibc/README.md b/web/static/node_modules/@parcel/watcher-linux-x64-glibc/README.md deleted file mode 100644 index 0214354c..00000000 --- a/web/static/node_modules/@parcel/watcher-linux-x64-glibc/README.md +++ /dev/null @@ -1 +0,0 @@ -This is the linux-x64-glibc build of @parcel/watcher. See https://github.com/parcel-bundler/watcher for details. \ No newline at end of file diff --git a/web/static/node_modules/@parcel/watcher-linux-x64-glibc/package.json b/web/static/node_modules/@parcel/watcher-linux-x64-glibc/package.json deleted file mode 100644 index d8484afb..00000000 --- a/web/static/node_modules/@parcel/watcher-linux-x64-glibc/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@parcel/watcher-linux-x64-glibc", - "version": "2.5.0", - "main": "watcher.node", - "repository": { - "type": "git", - "url": "https://github.com/parcel-bundler/watcher.git" - }, - "description": "A native C++ Node module for querying and subscribing to filesystem events. Used by Parcel 2.", - "license": "MIT", - "publishConfig": { - "access": "public" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "files": [ - "watcher.node" - ], - "engines": { - "node": ">= 10.0.0" - }, - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "libc": [ - "glibc" - ] -} diff --git a/web/static/node_modules/@parcel/watcher-linux-x64-glibc/watcher.node b/web/static/node_modules/@parcel/watcher-linux-x64-glibc/watcher.node deleted file mode 100644 index f3091b2a..00000000 Binary files a/web/static/node_modules/@parcel/watcher-linux-x64-glibc/watcher.node and /dev/null differ diff --git a/web/static/node_modules/@parcel/watcher-linux-x64-musl/LICENSE b/web/static/node_modules/@parcel/watcher-linux-x64-musl/LICENSE deleted file mode 100644 index 7fb9bc95..00000000 --- a/web/static/node_modules/@parcel/watcher-linux-x64-musl/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017-present Devon Govett - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/@parcel/watcher-linux-x64-musl/README.md b/web/static/node_modules/@parcel/watcher-linux-x64-musl/README.md deleted file mode 100644 index 6c3b0df0..00000000 --- a/web/static/node_modules/@parcel/watcher-linux-x64-musl/README.md +++ /dev/null @@ -1 +0,0 @@ -This is the linux-x64-musl build of @parcel/watcher. See https://github.com/parcel-bundler/watcher for details. \ No newline at end of file diff --git a/web/static/node_modules/@parcel/watcher-linux-x64-musl/package.json b/web/static/node_modules/@parcel/watcher-linux-x64-musl/package.json deleted file mode 100644 index b7e4d948..00000000 --- a/web/static/node_modules/@parcel/watcher-linux-x64-musl/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@parcel/watcher-linux-x64-musl", - "version": "2.5.0", - "main": "watcher.node", - "repository": { - "type": "git", - "url": "https://github.com/parcel-bundler/watcher.git" - }, - "description": "A native C++ Node module for querying and subscribing to filesystem events. Used by Parcel 2.", - "license": "MIT", - "publishConfig": { - "access": "public" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "files": [ - "watcher.node" - ], - "engines": { - "node": ">= 10.0.0" - }, - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "libc": [ - "musl" - ] -} diff --git a/web/static/node_modules/@parcel/watcher-linux-x64-musl/watcher.node b/web/static/node_modules/@parcel/watcher-linux-x64-musl/watcher.node deleted file mode 100644 index 1181f541..00000000 Binary files a/web/static/node_modules/@parcel/watcher-linux-x64-musl/watcher.node and /dev/null differ diff --git a/web/static/node_modules/@parcel/watcher/LICENSE b/web/static/node_modules/@parcel/watcher/LICENSE deleted file mode 100644 index 7fb9bc95..00000000 --- a/web/static/node_modules/@parcel/watcher/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017-present Devon Govett - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/@parcel/watcher/README.md b/web/static/node_modules/@parcel/watcher/README.md deleted file mode 100644 index d212b932..00000000 --- a/web/static/node_modules/@parcel/watcher/README.md +++ /dev/null @@ -1,135 +0,0 @@ -# @parcel/watcher - -A native C++ Node module for querying and subscribing to filesystem events. Used by [Parcel 2](https://github.com/parcel-bundler/parcel). - -## Features - -- **Watch** - subscribe to realtime recursive directory change notifications when files or directories are created, updated, or deleted. -- **Query** - performantly query for historical change events in a directory, even when your program is not running. -- **Native** - implemented in C++ for performance and low-level integration with the operating system. -- **Cross platform** - includes backends for macOS, Linux, Windows, FreeBSD, and Watchman. -- **Performant** - events are throttled in C++ so the JavaScript thread is not overwhelmed during large filesystem changes (e.g. `git checkout` or `npm install`). -- **Scalable** - tens of thousands of files can be watched or queried at once with good performance. - -## Example - -```javascript -const watcher = require('@parcel/watcher'); -const path = require('path'); - -// Subscribe to events -let subscription = await watcher.subscribe(process.cwd(), (err, events) => { - console.log(events); -}); - -// later on... -await subscription.unsubscribe(); - -// Get events since some saved snapshot in the past -let snapshotPath = path.join(process.cwd(), 'snapshot.txt'); -let events = await watcher.getEventsSince(process.cwd(), snapshotPath); - -// Save a snapshot for later -await watcher.writeSnapshot(process.cwd(), snapshotPath); -``` - -## Watching - -`@parcel/watcher` supports subscribing to realtime notifications of changes in a directory. It works recursively, so changes in sub-directories will also be emitted. - -Events are throttled and coalesced for performance during large changes like `git checkout` or `npm install`, and a single notification will be emitted with all of the events at the end. - -Only one notification will be emitted per file. For example, if a file was both created and updated since the last event, you'll get only a `create` event. If a file is both created and deleted, you will not be notifed of that file. Renames cause two events: a `delete` for the old name, and a `create` for the new name. - -```javascript -let subscription = await watcher.subscribe(process.cwd(), (err, events) => { - console.log(events); -}); -``` - -Events have two properties: - -- `type` - the event type: `create`, `update`, or `delete`. -- `path` - the absolute path to the file or directory. - -To unsubscribe from change notifications, call the `unsubscribe` method on the returned subscription object. - -```javascript -await subscription.unsubscribe(); -``` - -`@parcel/watcher` has the following watcher backends, listed in priority order: - -- [FSEvents](https://developer.apple.com/documentation/coreservices/file_system_events) on macOS -- [Watchman](https://facebook.github.io/watchman/) if installed -- [inotify](http://man7.org/linux/man-pages/man7/inotify.7.html) on Linux -- [ReadDirectoryChangesW](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v%3Dvs.85%29.aspx) on Windows -- [kqueue](https://man.freebsd.org/cgi/man.cgi?kqueue) on FreeBSD, or as an alternative to FSEvents on macOS - -You can specify the exact backend you wish to use by passing the `backend` option. If that backend is not available on the current platform, the default backend will be used instead. See below for the list of backend names that can be passed to the options. - -## Querying - -`@parcel/watcher` also supports querying for historical changes made in a directory, even when your program is not running. This makes it easy to invalidate a cache and re-build only the files that have changed, for example. It can be **significantly** faster than traversing the entire filesystem to determine what files changed, depending on the platform. - -In order to query for historical changes, you first need a previous snapshot to compare to. This can be saved to a file with the `writeSnapshot` function, e.g. just before your program exits. - -```javascript -await watcher.writeSnapshot(dirPath, snapshotPath); -``` - -When your program starts up, you can query for changes that have occurred since that snapshot using the `getEventsSince` function. - -```javascript -let events = await watcher.getEventsSince(dirPath, snapshotPath); -``` - -The events returned are exactly the same as the events that would be passed to the `subscribe` callback (see above). - -`@parcel/watcher` has the following watcher backends, listed in priority order: - -- [FSEvents](https://developer.apple.com/documentation/coreservices/file_system_events) on macOS -- [Watchman](https://facebook.github.io/watchman/) if installed -- [fts](http://man7.org/linux/man-pages/man3/fts.3.html) (brute force) on Linux and FreeBSD -- [FindFirstFile](https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-findfirstfilea) (brute force) on Windows - -The FSEvents (macOS) and Watchman backends are significantly more performant than the brute force backends used by default on Linux and Windows, for example returning results in miliseconds instead of seconds for large directory trees. This is because a background daemon monitoring filesystem changes on those platforms allows us to query cached data rather than traversing the filesystem manually (brute force). - -macOS has good performance with FSEvents by default. For the best performance on other platforms, install [Watchman](https://facebook.github.io/watchman/) and it will be used by `@parcel/watcher` automatically. - -You can specify the exact backend you wish to use by passing the `backend` option. If that backend is not available on the current platform, the default backend will be used instead. See below for the list of backend names that can be passed to the options. - -## Options - -All of the APIs in `@parcel/watcher` support the following options, which are passed as an object as the last function argument. - -- `ignore` - an array of paths or glob patterns to ignore. uses [`is-glob`](https://github.com/micromatch/is-glob) to distinguish paths from globs. glob patterns are parsed with [`micromatch`](https://github.com/micromatch/micromatch) (see [features](https://github.com/micromatch/micromatch#matching-features)). - - paths can be relative or absolute and can either be files or directories. No events will be emitted about these files or directories or their children. - - glob patterns match on relative paths from the root that is watched. No events will be emitted for matching paths. -- `backend` - the name of an explicitly chosen backend to use. Allowed options are `"fs-events"`, `"watchman"`, `"inotify"`, `"kqueue"`, `"windows"`, or `"brute-force"` (only for querying). If the specified backend is not available on the current platform, the default backend will be used instead. - -## WASM - -The `@parcel/watcher-wasm` package can be used in place of `@parcel/watcher` on unsupported platforms. It relies on the Node `fs` module, so in non-Node environments such as browsers, an `fs` polyfill will be needed. - -**Note**: the WASM implementation is significantly less efficient than the native implementations because it must crawl the file system to watch each directory individually. Use the native `@parcel/watcher` package wherever possible. - -```js -import {subscribe} from '@parcel/watcher-wasm'; - -// Use the module as documented above. -subscribe(/* ... */); -``` - -## Who is using this? - -- [Parcel 2](https://parceljs.org/) -- [VSCode](https://code.visualstudio.com/updates/v1_62#_file-watching-changes) -- [Tailwind CSS Intellisense](https://github.com/tailwindlabs/tailwindcss-intellisense) -- [Gatsby Cloud](https://twitter.com/chatsidhartha/status/1435647412828196867) -- [Nx](https://nx.dev) -- [Nuxt](https://nuxt.com) - -## License - -MIT diff --git a/web/static/node_modules/@parcel/watcher/binding.gyp b/web/static/node_modules/@parcel/watcher/binding.gyp deleted file mode 100644 index f886bde8..00000000 --- a/web/static/node_modules/@parcel/watcher/binding.gyp +++ /dev/null @@ -1,92 +0,0 @@ -{ - "targets": [ - { - "target_name": "watcher", - "defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ], - "sources": [ "src/binding.cc", "src/Watcher.cc", "src/Backend.cc", "src/DirTree.cc", "src/Glob.cc", "src/Debounce.cc" ], - "include_dirs" : [" unknown; - export interface AsyncSubscription { - unsubscribe(): Promise; - } - export interface Event { - path: FilePath; - type: EventType; - } - export function getEventsSince( - dir: FilePath, - snapshot: FilePath, - opts?: Options - ): Promise; - export function subscribe( - dir: FilePath, - fn: SubscribeCallback, - opts?: Options - ): Promise; - export function unsubscribe( - dir: FilePath, - fn: SubscribeCallback, - opts?: Options - ): Promise; - export function writeSnapshot( - dir: FilePath, - snapshot: FilePath, - opts?: Options - ): Promise; -} - -export = ParcelWatcher; \ No newline at end of file diff --git a/web/static/node_modules/@parcel/watcher/index.js b/web/static/node_modules/@parcel/watcher/index.js deleted file mode 100644 index 8afb2b11..00000000 --- a/web/static/node_modules/@parcel/watcher/index.js +++ /dev/null @@ -1,41 +0,0 @@ -const {createWrapper} = require('./wrapper'); - -let name = `@parcel/watcher-${process.platform}-${process.arch}`; -if (process.platform === 'linux') { - const { MUSL, family } = require('detect-libc'); - if (family === MUSL) { - name += '-musl'; - } else { - name += '-glibc'; - } -} - -let binding; -try { - binding = require(name); -} catch (err) { - handleError(err); - try { - binding = require('./build/Release/watcher.node'); - } catch (err) { - handleError(err); - try { - binding = require('./build/Debug/watcher.node'); - } catch (err) { - handleError(err); - throw new Error(`No prebuild or local build of @parcel/watcher found. Tried ${name}. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.`); - } - } -} - -function handleError(err) { - if (err?.code !== 'MODULE_NOT_FOUND') { - throw err; - } -} - -const wrapper = createWrapper(binding); -exports.writeSnapshot = wrapper.writeSnapshot; -exports.getEventsSince = wrapper.getEventsSince; -exports.subscribe = wrapper.subscribe; -exports.unsubscribe = wrapper.unsubscribe; diff --git a/web/static/node_modules/@parcel/watcher/index.js.flow b/web/static/node_modules/@parcel/watcher/index.js.flow deleted file mode 100644 index d75da93d..00000000 --- a/web/static/node_modules/@parcel/watcher/index.js.flow +++ /dev/null @@ -1,48 +0,0 @@ -// @flow -declare type FilePath = string; -declare type GlobPattern = string; - -export type BackendType = - | 'fs-events' - | 'watchman' - | 'inotify' - | 'windows' - | 'brute-force'; -export type EventType = 'create' | 'update' | 'delete'; -export interface Options { - ignore?: Array, - backend?: BackendType -} -export type SubscribeCallback = ( - err: ?Error, - events: Array -) => mixed; -export interface AsyncSubscription { - unsubscribe(): Promise -} -export interface Event { - path: FilePath, - type: EventType -} -declare module.exports: { - getEventsSince( - dir: FilePath, - snapshot: FilePath, - opts?: Options - ): Promise>, - subscribe( - dir: FilePath, - fn: SubscribeCallback, - opts?: Options - ): Promise, - unsubscribe( - dir: FilePath, - fn: SubscribeCallback, - opts?: Options - ): Promise, - writeSnapshot( - dir: FilePath, - snapshot: FilePath, - opts?: Options - ): Promise -} \ No newline at end of file diff --git a/web/static/node_modules/@parcel/watcher/package.json b/web/static/node_modules/@parcel/watcher/package.json deleted file mode 100644 index 171bf8a2..00000000 --- a/web/static/node_modules/@parcel/watcher/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "@parcel/watcher", - "version": "2.5.0", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/parcel-bundler/watcher.git" - }, - "description": "A native C++ Node module for querying and subscribing to filesystem events. Used by Parcel 2.", - "license": "MIT", - "publishConfig": { - "access": "public" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "files": [ - "index.js", - "index.js.flow", - "index.d.ts", - "wrapper.js", - "package.json", - "README.md", - "LICENSE", - "src", - "scripts/build-from-source.js", - "binding.gyp" - ], - "scripts": { - "prebuild": "prebuildify --napi --strip --tag-libc", - "format": "prettier --write \"./**/*.{js,json,md}\"", - "build": "node-gyp rebuild", - "install": "node scripts/build-from-source.js", - "test": "mocha" - }, - "engines": { - "node": ">= 10.0.0" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.{js,json,md}": [ - "prettier --write", - "git add" - ] - }, - "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" - }, - "devDependencies": { - "esbuild": "^0.19.8", - "fs-extra": "^10.0.0", - "husky": "^7.0.2", - "lint-staged": "^11.1.2", - "mocha": "^9.1.1", - "napi-wasm": "^1.1.0", - "prebuildify": "^6.0.1", - "prettier": "^2.3.2" - }, - "binary": { - "napi_versions": [ - 3 - ] - }, - "optionalDependencies": { - "@parcel/watcher-darwin-x64": "2.5.0", - "@parcel/watcher-darwin-arm64": "2.5.0", - "@parcel/watcher-win32-x64": "2.5.0", - "@parcel/watcher-win32-arm64": "2.5.0", - "@parcel/watcher-win32-ia32": "2.5.0", - "@parcel/watcher-linux-x64-glibc": "2.5.0", - "@parcel/watcher-linux-x64-musl": "2.5.0", - "@parcel/watcher-linux-arm64-glibc": "2.5.0", - "@parcel/watcher-linux-arm64-musl": "2.5.0", - "@parcel/watcher-linux-arm-glibc": "2.5.0", - "@parcel/watcher-linux-arm-musl": "2.5.0", - "@parcel/watcher-android-arm64": "2.5.0", - "@parcel/watcher-freebsd-x64": "2.5.0" - } -} diff --git a/web/static/node_modules/@parcel/watcher/scripts/build-from-source.js b/web/static/node_modules/@parcel/watcher/scripts/build-from-source.js deleted file mode 100644 index 4602008b..00000000 --- a/web/static/node_modules/@parcel/watcher/scripts/build-from-source.js +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env node - -const {spawn} = require('child_process'); - -if (process.env.npm_config_build_from_source === 'true') { - build(); -} - -function build() { - spawn('node-gyp', ['rebuild'], { stdio: 'inherit', shell: true }).on('exit', function (code) { - process.exit(code); - }); -} diff --git a/web/static/node_modules/@parcel/watcher/src/Backend.cc b/web/static/node_modules/@parcel/watcher/src/Backend.cc deleted file mode 100644 index fcf55446..00000000 --- a/web/static/node_modules/@parcel/watcher/src/Backend.cc +++ /dev/null @@ -1,182 +0,0 @@ -#ifdef FS_EVENTS -#include "macos/FSEventsBackend.hh" -#endif -#ifdef WATCHMAN -#include "watchman/WatchmanBackend.hh" -#endif -#ifdef WINDOWS -#include "windows/WindowsBackend.hh" -#endif -#ifdef INOTIFY -#include "linux/InotifyBackend.hh" -#endif -#ifdef KQUEUE -#include "kqueue/KqueueBackend.hh" -#endif -#ifdef __wasm32__ -#include "wasm/WasmBackend.hh" -#endif -#include "shared/BruteForceBackend.hh" - -#include "Backend.hh" -#include - -static std::unordered_map> sharedBackends; - -std::shared_ptr getBackend(std::string backend) { - // Use FSEvents on macOS by default. - // Use watchman by default if available on other platforms. - // Fall back to brute force. - #ifdef FS_EVENTS - if (backend == "fs-events" || backend == "default") { - return std::make_shared(); - } - #endif - #ifdef WATCHMAN - if ((backend == "watchman" || backend == "default") && WatchmanBackend::checkAvailable()) { - return std::make_shared(); - } - #endif - #ifdef WINDOWS - if (backend == "windows" || backend == "default") { - return std::make_shared(); - } - #endif - #ifdef INOTIFY - if (backend == "inotify" || backend == "default") { - return std::make_shared(); - } - #endif - #ifdef KQUEUE - if (backend == "kqueue" || backend == "default") { - return std::make_shared(); - } - #endif - #ifdef __wasm32__ - if (backend == "wasm" || backend == "default") { - return std::make_shared(); - } - #endif - if (backend == "brute-force" || backend == "default") { - return std::make_shared(); - } - - return nullptr; -} - -std::shared_ptr Backend::getShared(std::string backend) { - auto found = sharedBackends.find(backend); - if (found != sharedBackends.end()) { - return found->second; - } - - auto result = getBackend(backend); - if (!result) { - return getShared("default"); - } - - result->run(); - sharedBackends.emplace(backend, result); - return result; -} - -void removeShared(Backend *backend) { - for (auto it = sharedBackends.begin(); it != sharedBackends.end(); it++) { - if (it->second.get() == backend) { - sharedBackends.erase(it); - break; - } - } - - // Free up memory. - if (sharedBackends.size() == 0) { - sharedBackends.rehash(0); - } -} - -void Backend::run() { - #ifndef __wasm32__ - mThread = std::thread([this] () { - try { - start(); - } catch (std::exception &err) { - handleError(err); - } - }); - - if (mThread.joinable()) { - mStartedSignal.wait(); - } - #else - try { - start(); - } catch (std::exception &err) { - handleError(err); - } - #endif -} - -void Backend::notifyStarted() { - mStartedSignal.notify(); -} - -void Backend::start() { - notifyStarted(); -} - -Backend::~Backend() { - #ifndef __wasm32__ - // Wait for thread to stop - if (mThread.joinable()) { - // If the backend is being destroyed from the thread itself, detach, otherwise join. - if (mThread.get_id() == std::this_thread::get_id()) { - mThread.detach(); - } else { - mThread.join(); - } - } - #endif -} - -void Backend::watch(WatcherRef watcher) { - std::unique_lock lock(mMutex); - auto res = mSubscriptions.find(watcher); - if (res == mSubscriptions.end()) { - try { - this->subscribe(watcher); - mSubscriptions.insert(watcher); - } catch (std::exception &err) { - unref(); - throw; - } - } -} - -void Backend::unwatch(WatcherRef watcher) { - std::unique_lock lock(mMutex); - size_t deleted = mSubscriptions.erase(watcher); - if (deleted > 0) { - this->unsubscribe(watcher); - unref(); - } -} - -void Backend::unref() { - if (mSubscriptions.size() == 0) { - removeShared(this); - } -} - -void Backend::handleWatcherError(WatcherError &err) { - unwatch(err.mWatcher); - err.mWatcher->notifyError(err); -} - -void Backend::handleError(std::exception &err) { - std::unique_lock lock(mMutex); - for (auto it = mSubscriptions.begin(); it != mSubscriptions.end(); it++) { - (*it)->notifyError(err); - } - - removeShared(this); -} diff --git a/web/static/node_modules/@parcel/watcher/src/Backend.hh b/web/static/node_modules/@parcel/watcher/src/Backend.hh deleted file mode 100644 index d673bd1a..00000000 --- a/web/static/node_modules/@parcel/watcher/src/Backend.hh +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef BACKEND_H -#define BACKEND_H - -#include "Event.hh" -#include "Watcher.hh" -#include "Signal.hh" -#include - -class Backend { -public: - virtual ~Backend(); - void run(); - void notifyStarted(); - - virtual void start(); - virtual void writeSnapshot(WatcherRef watcher, std::string *snapshotPath) = 0; - virtual void getEventsSince(WatcherRef watcher, std::string *snapshotPath) = 0; - virtual void subscribe(WatcherRef watcher) = 0; - virtual void unsubscribe(WatcherRef watcher) = 0; - - static std::shared_ptr getShared(std::string backend); - - void watch(WatcherRef watcher); - void unwatch(WatcherRef watcher); - void unref(); - void handleWatcherError(WatcherError &err); - - std::mutex mMutex; - std::thread mThread; -private: - std::unordered_set mSubscriptions; - Signal mStartedSignal; - - void handleError(std::exception &err); -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/Debounce.cc b/web/static/node_modules/@parcel/watcher/src/Debounce.cc deleted file mode 100644 index be07e782..00000000 --- a/web/static/node_modules/@parcel/watcher/src/Debounce.cc +++ /dev/null @@ -1,113 +0,0 @@ -#include "Debounce.hh" - -#ifdef __wasm32__ -extern "C" void on_timeout(void *ctx) { - Debounce *debounce = (Debounce *)ctx; - debounce->notify(); -} -#endif - -std::shared_ptr Debounce::getShared() { - static std::weak_ptr sharedInstance; - std::shared_ptr shared = sharedInstance.lock(); - if (!shared) { - shared = std::make_shared(); - sharedInstance = shared; - } - - return shared; -} - -Debounce::Debounce() { - mRunning = true; - #ifndef __wasm32__ - mThread = std::thread([this] () { - loop(); - }); - #endif -} - -Debounce::~Debounce() { - mRunning = false; - #ifndef __wasm32__ - mWaitSignal.notify(); - mThread.join(); - #endif -} - -void Debounce::add(void *key, std::function cb) { - std::unique_lock lock(mMutex); - mCallbacks.emplace(key, cb); -} - -void Debounce::remove(void *key) { - std::unique_lock lock(mMutex); - mCallbacks.erase(key); -} - -void Debounce::trigger() { - std::unique_lock lock(mMutex); - #ifdef __wasm32__ - notifyIfReady(); - #else - mWaitSignal.notify(); - #endif -} - -#ifndef __wasm32__ -void Debounce::loop() { - while (mRunning) { - mWaitSignal.wait(); - if (!mRunning) { - break; - } - - notifyIfReady(); - } -} -#endif - -void Debounce::notifyIfReady() { - if (!mRunning) { - return; - } - - // If we haven't seen an event in more than the maximum wait time, notify callbacks immediately - // to ensure that we don't wait forever. Otherwise, wait for the minimum wait time and batch - // subsequent fast changes. This also means the first file change in a batch is notified immediately, - // separately from the rest of the batch. This seems like an acceptable tradeoff if the common case - // is that only a single file was updated at a time. - auto time = std::chrono::steady_clock::now(); - if ((time - mLastTime) > std::chrono::milliseconds(MAX_WAIT_TIME)) { - mLastTime = time; - notify(); - } else { - wait(); - } -} - -void Debounce::wait() { - #ifdef __wasm32__ - clear_timeout(mTimeout); - mTimeout = set_timeout(MIN_WAIT_TIME, this); - #else - auto status = mWaitSignal.waitFor(std::chrono::milliseconds(MIN_WAIT_TIME)); - if (mRunning && (status == std::cv_status::timeout)) { - notify(); - } - #endif -} - -void Debounce::notify() { - std::unique_lock lock(mMutex); - - mLastTime = std::chrono::steady_clock::now(); - for (auto it = mCallbacks.begin(); it != mCallbacks.end(); it++) { - auto cb = it->second; - cb(); - } - - #ifndef __wasm32__ - mWaitSignal.reset(); - #endif -} diff --git a/web/static/node_modules/@parcel/watcher/src/Debounce.hh b/web/static/node_modules/@parcel/watcher/src/Debounce.hh deleted file mode 100644 index a17fdef7..00000000 --- a/web/static/node_modules/@parcel/watcher/src/Debounce.hh +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef DEBOUNCE_H -#define DEBOUNCE_H - -#include -#include -#include -#include "Signal.hh" - -#define MIN_WAIT_TIME 50 -#define MAX_WAIT_TIME 500 - -#ifdef __wasm32__ -extern "C" { - int set_timeout(int ms, void *ctx); - void clear_timeout(int timeout); - void on_timeout(void *ctx); -}; -#endif - -class Debounce { -public: - static std::shared_ptr getShared(); - - Debounce(); - ~Debounce(); - - void add(void *key, std::function cb); - void remove(void *key); - void trigger(); - void notify(); - -private: - bool mRunning; - std::mutex mMutex; - #ifdef __wasm32__ - int mTimeout; - #else - Signal mWaitSignal; - std::thread mThread; - #endif - std::unordered_map> mCallbacks; - std::chrono::time_point mLastTime; - - void loop(); - void notifyIfReady(); - void wait(); -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/DirTree.cc b/web/static/node_modules/@parcel/watcher/src/DirTree.cc deleted file mode 100644 index ac17c15c..00000000 --- a/web/static/node_modules/@parcel/watcher/src/DirTree.cc +++ /dev/null @@ -1,152 +0,0 @@ -#include "DirTree.hh" -#include - -static std::mutex mDirCacheMutex; -static std::unordered_map> dirTreeCache; - -struct DirTreeDeleter { - void operator()(DirTree *tree) { - std::lock_guard lock(mDirCacheMutex); - dirTreeCache.erase(tree->root); - delete tree; - - // Free up memory. - if (dirTreeCache.size() == 0) { - dirTreeCache.rehash(0); - } - } -}; - -std::shared_ptr DirTree::getCached(std::string root) { - std::lock_guard lock(mDirCacheMutex); - - auto found = dirTreeCache.find(root); - std::shared_ptr tree; - - // Use cached tree, or create an empty one. - if (found != dirTreeCache.end()) { - tree = found->second.lock(); - } else { - tree = std::shared_ptr(new DirTree(root), DirTreeDeleter()); - dirTreeCache.emplace(root, tree); - } - - return tree; -} - -DirTree::DirTree(std::string root, FILE *f) : root(root), isComplete(true) { - size_t size; - if (fscanf(f, "%zu", &size)) { - for (size_t i = 0; i < size; i++) { - DirEntry entry(f); - entries.emplace(entry.path, entry); - } - } -} - -// Internal find method that has no lock -DirEntry *DirTree::_find(std::string path) { - auto found = entries.find(path); - if (found == entries.end()) { - return NULL; - } - - return &found->second; -} - -DirEntry *DirTree::add(std::string path, uint64_t mtime, bool isDir) { - std::lock_guard lock(mMutex); - - DirEntry entry(path, mtime, isDir); - auto it = entries.emplace(entry.path, entry); - return &it.first->second; -} - -DirEntry *DirTree::find(std::string path) { - std::lock_guard lock(mMutex); - return _find(path); -} - -DirEntry *DirTree::update(std::string path, uint64_t mtime) { - std::lock_guard lock(mMutex); - - DirEntry *found = _find(path); - if (found) { - found->mtime = mtime; - } - - return found; -} - -void DirTree::remove(std::string path) { - std::lock_guard lock(mMutex); - - DirEntry *found = _find(path); - - // Remove all sub-entries if this is a directory - if (found && found->isDir) { - std::string pathStart = path + DIR_SEP; - for (auto it = entries.begin(); it != entries.end();) { - if (it->first.rfind(pathStart, 0) == 0) { - it = entries.erase(it); - } else { - it++; - } - } - } - - entries.erase(path); -} - -void DirTree::write(FILE *f) { - std::lock_guard lock(mMutex); - - fprintf(f, "%zu\n", entries.size()); - for (auto it = entries.begin(); it != entries.end(); it++) { - it->second.write(f); - } -} - -void DirTree::getChanges(DirTree *snapshot, EventList &events) { - std::lock_guard lock(mMutex); - std::lock_guard snapshotLock(snapshot->mMutex); - - for (auto it = entries.begin(); it != entries.end(); it++) { - auto found = snapshot->entries.find(it->first); - if (found == snapshot->entries.end()) { - events.create(it->second.path); - } else if (found->second.mtime != it->second.mtime && !found->second.isDir && !it->second.isDir) { - events.update(it->second.path); - } - } - - for (auto it = snapshot->entries.begin(); it != snapshot->entries.end(); it++) { - size_t count = entries.count(it->first); - if (count == 0) { - events.remove(it->second.path); - } - } -} - -DirEntry::DirEntry(std::string p, uint64_t t, bool d) { - path = p; - mtime = t; - isDir = d; - state = NULL; -} - -DirEntry::DirEntry(FILE *f) { - size_t size; - if (fscanf(f, "%zu", &size)) { - path.resize(size); - if (fread(&path[0], sizeof(char), size, f)) { - int d = 0; - fscanf(f, "%" PRIu64 " %d\n", &mtime, &d); - isDir = d == 1; - } - } -} - -void DirEntry::write(FILE *f) const { - fprintf(f, "%zu%s%" PRIu64 " %d\n", path.size(), path.c_str(), mtime, isDir); -} diff --git a/web/static/node_modules/@parcel/watcher/src/DirTree.hh b/web/static/node_modules/@parcel/watcher/src/DirTree.hh deleted file mode 100644 index 328f4699..00000000 --- a/web/static/node_modules/@parcel/watcher/src/DirTree.hh +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef DIR_TREE_H -#define DIR_TREE_H - -#include -#include -#include -#include "Event.hh" - -#ifdef _WIN32 -#define DIR_SEP "\\" -#else -#define DIR_SEP "/" -#endif - -struct DirEntry { - std::string path; - uint64_t mtime; - bool isDir; - mutable void *state; - - DirEntry(std::string p, uint64_t t, bool d); - DirEntry(FILE *f); - void write(FILE *f) const; - bool operator==(const DirEntry &other) const { - return path == other.path; - } -}; - -class DirTree { -public: - static std::shared_ptr getCached(std::string root); - DirTree(std::string root) : root(root), isComplete(false) {} - DirTree(std::string root, FILE *f); - DirEntry *add(std::string path, uint64_t mtime, bool isDir); - DirEntry *find(std::string path); - DirEntry *update(std::string path, uint64_t mtime); - void remove(std::string path); - void write(FILE *f); - void getChanges(DirTree *snapshot, EventList &events); - - std::mutex mMutex; - std::string root; - bool isComplete; - std::unordered_map entries; - -private: - DirEntry *_find(std::string path); -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/Event.hh b/web/static/node_modules/@parcel/watcher/src/Event.hh deleted file mode 100644 index 629dfdf6..00000000 --- a/web/static/node_modules/@parcel/watcher/src/Event.hh +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef EVENT_H -#define EVENT_H - -#include -#include -#include "wasm/include.h" -#include -#include -#include - -using namespace Napi; - -struct Event { - std::string path; - bool isCreated; - bool isDeleted; - Event(std::string path) : path(path), isCreated(false), isDeleted(false) {} - - Value toJS(const Env& env) { - EscapableHandleScope scope(env); - Object res = Object::New(env); - std::string type = isCreated ? "create" : isDeleted ? "delete" : "update"; - res.Set(String::New(env, "path"), String::New(env, path.c_str())); - res.Set(String::New(env, "type"), String::New(env, type.c_str())); - return scope.Escape(res); - } -}; - -class EventList { -public: - void create(std::string path) { - std::lock_guard l(mMutex); - Event *event = internalUpdate(path); - if (event->isDeleted) { - // Assume update event when rapidly removed and created - // https://github.com/parcel-bundler/watcher/issues/72 - event->isDeleted = false; - } else { - event->isCreated = true; - } - } - - Event *update(std::string path) { - std::lock_guard l(mMutex); - return internalUpdate(path); - } - - void remove(std::string path) { - std::lock_guard l(mMutex); - Event *event = internalUpdate(path); - event->isDeleted = true; - } - - size_t size() { - std::lock_guard l(mMutex); - return mEvents.size(); - } - - std::vector getEvents() { - std::lock_guard l(mMutex); - std::vector eventsCloneVector; - for(auto it = mEvents.begin(); it != mEvents.end(); ++it) { - if (!(it->second.isCreated && it->second.isDeleted)) { - eventsCloneVector.push_back(it->second); - } - } - return eventsCloneVector; - } - - void clear() { - std::lock_guard l(mMutex); - mEvents.clear(); - } - -private: - mutable std::mutex mMutex; - std::map mEvents; - Event *internalUpdate(std::string path) { - auto found = mEvents.find(path); - if (found == mEvents.end()) { - auto it = mEvents.emplace(path, Event(path)); - return &it.first->second; - } - - return &found->second; - } -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/Glob.cc b/web/static/node_modules/@parcel/watcher/src/Glob.cc deleted file mode 100644 index a4a17224..00000000 --- a/web/static/node_modules/@parcel/watcher/src/Glob.cc +++ /dev/null @@ -1,22 +0,0 @@ -#include "Glob.hh" - -#ifdef __wasm32__ -extern "C" bool wasm_regex_match(const char *s, const char *regex); -#endif - -Glob::Glob(std::string raw) { - mRaw = raw; - mHash = std::hash()(raw); - #ifndef __wasm32__ - mRegex = std::regex(raw); - #endif -} - -bool Glob::isIgnored(std::string relative_path) const { - // Use native JS regex engine for wasm to reduce binary size. - #ifdef __wasm32__ - return wasm_regex_match(relative_path.c_str(), mRaw.c_str()); - #else - return std::regex_match(relative_path, mRegex); - #endif -} diff --git a/web/static/node_modules/@parcel/watcher/src/Glob.hh b/web/static/node_modules/@parcel/watcher/src/Glob.hh deleted file mode 100644 index 6e049e6c..00000000 --- a/web/static/node_modules/@parcel/watcher/src/Glob.hh +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef GLOB_H -#define GLOB_H - -#include -#include - -struct Glob { - std::size_t mHash; - std::string mRaw; - #ifndef __wasm32__ - std::regex mRegex; - #endif - - Glob(std::string raw); - - bool operator==(const Glob &other) const { - return mHash == other.mHash; - } - - bool isIgnored(std::string relative_path) const; -}; - -namespace std -{ - template <> - struct hash - { - size_t operator()(const Glob& g) const { - return g.mHash; - } - }; -} - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/PromiseRunner.hh b/web/static/node_modules/@parcel/watcher/src/PromiseRunner.hh deleted file mode 100644 index 4ca3bb66..00000000 --- a/web/static/node_modules/@parcel/watcher/src/PromiseRunner.hh +++ /dev/null @@ -1,101 +0,0 @@ -#ifndef PROMISE_RUNNER_H -#define PROMISE_RUNNER_H - -#include -#include "wasm/include.h" -#include - -using namespace Napi; - -class PromiseRunner { -public: - const Env env; - Promise::Deferred deferred; - - PromiseRunner(Env env) : env(env), deferred(Promise::Deferred::New(env)) { - napi_status status = napi_create_async_work(env, nullptr, env.Undefined(), - onExecute, onWorkComplete, this, &work); - if (status != napi_ok) { - work = nullptr; - const napi_extended_error_info *error_info = 0; - napi_get_last_error_info(env, &error_info); - if (error_info->error_message) { - Error::New(env, error_info->error_message).ThrowAsJavaScriptException(); - } else { - Error::New(env).ThrowAsJavaScriptException(); - } - } - } - - virtual ~PromiseRunner() {} - - Value queue() { - if (work) { - napi_status status = napi_queue_async_work(env, work); - if (status != napi_ok) { - onError(Error::New(env)); - } - } - - return deferred.Promise(); - } - -private: - napi_async_work work; - std::string error; - - static void onExecute(napi_env env, void *this_pointer) { - PromiseRunner* self = (PromiseRunner*) this_pointer; - try { - self->execute(); - } catch (std::exception &err) { - self->error = err.what(); - } - } - - static void onWorkComplete(napi_env env, napi_status status, void *this_pointer) { - PromiseRunner* self = (PromiseRunner*) this_pointer; - if (status != napi_cancelled) { - HandleScope scope(self->env); - if (status == napi_ok) { - status = napi_delete_async_work(self->env, self->work); - if (status == napi_ok) { - if (self->error.size() == 0) { - self->onOK(); - } else { - self->onError(Error::New(self->env, self->error)); - } - delete self; - return; - } - } - } - - // fallthrough for error handling - const napi_extended_error_info *error_info = 0; - napi_get_last_error_info(env, &error_info); - if (error_info->error_message){ - self->onError(Error::New(env, error_info->error_message)); - } else { - self->onError(Error::New(env)); - } - delete self; - } - - virtual void execute() {} - virtual Value getResult() { - return env.Null(); - } - - void onOK() { - HandleScope scope(env); - Value result = getResult(); - deferred.Resolve(result); - } - - void onError(const Error &e) { - deferred.Reject(e.Value()); - } -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/Signal.hh b/web/static/node_modules/@parcel/watcher/src/Signal.hh deleted file mode 100644 index e577319d..00000000 --- a/web/static/node_modules/@parcel/watcher/src/Signal.hh +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef SIGNAL_H -#define SIGNAL_H - -#include -#include - -class Signal { -public: - Signal() : mFlag(false), mWaiting(false) {} - void wait() { - std::unique_lock lock(mMutex); - while (!mFlag) { - mWaiting = true; - mCond.wait(lock); - } - } - - std::cv_status waitFor(std::chrono::milliseconds ms) { - std::unique_lock lock(mMutex); - return mCond.wait_for(lock, ms); - } - - void notify() { - std::unique_lock lock(mMutex); - mFlag = true; - mCond.notify_all(); - } - - void reset() { - std::unique_lock lock(mMutex); - mFlag = false; - mWaiting = false; - } - - bool isWaiting() { - return mWaiting; - } - -private: - bool mFlag; - bool mWaiting; - std::mutex mMutex; - std::condition_variable mCond; -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/Watcher.cc b/web/static/node_modules/@parcel/watcher/src/Watcher.cc deleted file mode 100644 index 4c7e24e1..00000000 --- a/web/static/node_modules/@parcel/watcher/src/Watcher.cc +++ /dev/null @@ -1,236 +0,0 @@ -#include "Watcher.hh" -#include - -using namespace Napi; - -struct WatcherHash { - std::size_t operator() (WatcherRef const &k) const { - return std::hash()(k->mDir); - } -}; - -struct WatcherCompare { - size_t operator() (WatcherRef const &a, WatcherRef const &b) const { - return *a == *b; - } -}; - -static std::unordered_set sharedWatchers; - -WatcherRef Watcher::getShared(std::string dir, std::unordered_set ignorePaths, std::unordered_set ignoreGlobs) { - WatcherRef watcher = std::make_shared(dir, ignorePaths, ignoreGlobs); - auto found = sharedWatchers.find(watcher); - if (found != sharedWatchers.end()) { - return *found; - } - - sharedWatchers.insert(watcher); - return watcher; -} - -void removeShared(Watcher *watcher) { - for (auto it = sharedWatchers.begin(); it != sharedWatchers.end(); it++) { - if (it->get() == watcher) { - sharedWatchers.erase(it); - break; - } - } - - // Free up memory. - if (sharedWatchers.size() == 0) { - sharedWatchers.rehash(0); - } -} - -Watcher::Watcher(std::string dir, std::unordered_set ignorePaths, std::unordered_set ignoreGlobs) - : mDir(dir), - mIgnorePaths(ignorePaths), - mIgnoreGlobs(ignoreGlobs) { - mDebounce = Debounce::getShared(); - mDebounce->add(this, [this] () { - triggerCallbacks(); - }); - } - -Watcher::~Watcher() { - mDebounce->remove(this); -} - -void Watcher::wait() { - std::unique_lock lk(mMutex); - mCond.wait(lk); -} - -void Watcher::notify() { - std::unique_lock lk(mMutex); - mCond.notify_all(); - - if (mCallbacks.size() > 0 && mEvents.size() > 0) { - // We must release our lock before calling into the debouncer - // to avoid a deadlock: the debouncer thread itself will require - // our lock from its thread when calling into `triggerCallbacks` - // while holding its own debouncer lock. - lk.unlock(); - mDebounce->trigger(); - } -} - -struct CallbackData { - std::string error; - std::vector events; - CallbackData(std::string error, std::vector events) : error(error), events(events) {} -}; - -Value callbackEventsToJS(const Env &env, std::vector &events) { - EscapableHandleScope scope(env); - Array arr = Array::New(env, events.size()); - size_t currentEventIndex = 0; - for (auto eventIterator = events.begin(); eventIterator != events.end(); eventIterator++) { - arr.Set(currentEventIndex++, eventIterator->toJS(env)); - } - return scope.Escape(arr); -} - -void callJSFunction(Napi::Env env, Function jsCallback, CallbackData *data) { - HandleScope scope(env); - auto err = data->error.size() > 0 ? Error::New(env, data->error).Value() : env.Null(); - auto events = callbackEventsToJS(env, data->events); - jsCallback.Call({err, events}); - delete data; - - // Throw errors from the callback as fatal exceptions - // If we don't handle these node segfaults... - if (env.IsExceptionPending()) { - Napi::Error err = env.GetAndClearPendingException(); - napi_fatal_exception(env, err.Value()); - } -} - -void Watcher::notifyError(std::exception &err) { - std::unique_lock lk(mMutex); - for (auto it = mCallbacks.begin(); it != mCallbacks.end(); it++) { - CallbackData *data = new CallbackData(err.what(), {}); - it->tsfn.BlockingCall(data, callJSFunction); - } - - clearCallbacks(); -} - -// This function is called from the debounce thread. -void Watcher::triggerCallbacks() { - std::unique_lock lk(mMutex); - if (mCallbacks.size() > 0 && mEvents.size() > 0) { - auto events = mEvents.getEvents(); - mEvents.clear(); - - for (auto it = mCallbacks.begin(); it != mCallbacks.end(); it++) { - it->tsfn.BlockingCall(new CallbackData("", events), callJSFunction); - } - } -} - -// This should be called from the JavaScript thread. -bool Watcher::watch(Function callback) { - std::unique_lock lk(mMutex); - - auto it = findCallback(callback); - if (it != mCallbacks.end()) { - return false; - } - - auto tsfn = ThreadSafeFunction::New( - callback.Env(), - callback, - "Watcher callback", - 0, // Unlimited queue - 1 // Initial thread count - ); - - mCallbacks.push_back(Callback { - tsfn, - Napi::Persistent(callback), - std::this_thread::get_id() - }); - - return true; -} - -// This should be called from the JavaScript thread. -std::vector::iterator Watcher::findCallback(Function callback) { - for (auto it = mCallbacks.begin(); it != mCallbacks.end(); it++) { - // Only consider callbacks created by the same thread, or V8 will panic. - if (it->threadId == std::this_thread::get_id() && it->ref.Value() == callback) { - return it; - } - } - - return mCallbacks.end(); -} - -// This should be called from the JavaScript thread. -bool Watcher::unwatch(Function callback) { - std::unique_lock lk(mMutex); - - bool removed = false; - auto it = findCallback(callback); - if (it != mCallbacks.end()) { - it->tsfn.Release(); - it->ref.Unref(); - mCallbacks.erase(it); - removed = true; - } - - if (removed && mCallbacks.size() == 0) { - unref(); - return true; - } - - return false; -} - -void Watcher::unref() { - if (mCallbacks.size() == 0) { - removeShared(this); - } -} - -void Watcher::destroy() { - std::unique_lock lk(mMutex); - clearCallbacks(); -} - -// Private because it doesn't lock. -void Watcher::clearCallbacks() { - for (auto it = mCallbacks.begin(); it != mCallbacks.end(); it++) { - it->tsfn.Release(); - it->ref.Unref(); - } - - mCallbacks.clear(); - unref(); -} - -bool Watcher::isIgnored(std::string path) { - for (auto it = mIgnorePaths.begin(); it != mIgnorePaths.end(); it++) { - auto dir = *it + DIR_SEP; - if (*it == path || path.compare(0, dir.size(), dir) == 0) { - return true; - } - } - - auto basePath = mDir + DIR_SEP; - - if (path.rfind(basePath, 0) != 0) { - return false; - } - - auto relativePath = path.substr(basePath.size()); - - for (auto it = mIgnoreGlobs.begin(); it != mIgnoreGlobs.end(); it++) { - if (it->isIgnored(relativePath)) { - return true; - } - } - - return false; -} diff --git a/web/static/node_modules/@parcel/watcher/src/Watcher.hh b/web/static/node_modules/@parcel/watcher/src/Watcher.hh deleted file mode 100644 index f89e9f5d..00000000 --- a/web/static/node_modules/@parcel/watcher/src/Watcher.hh +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef WATCHER_H -#define WATCHER_H - -#include -#include -#include -#include -#include "Glob.hh" -#include "Event.hh" -#include "Debounce.hh" -#include "DirTree.hh" -#include "Signal.hh" - -using namespace Napi; - -struct Watcher; -using WatcherRef = std::shared_ptr; - -struct Callback { - Napi::ThreadSafeFunction tsfn; - Napi::FunctionReference ref; - std::thread::id threadId; -}; - -class WatcherState { -public: - virtual ~WatcherState() = default; -}; - -struct Watcher { - std::string mDir; - std::unordered_set mIgnorePaths; - std::unordered_set mIgnoreGlobs; - EventList mEvents; - std::shared_ptr state; - - Watcher(std::string dir, std::unordered_set ignorePaths, std::unordered_set ignoreGlobs); - ~Watcher(); - - bool operator==(const Watcher &other) const { - return mDir == other.mDir && mIgnorePaths == other.mIgnorePaths && mIgnoreGlobs == other.mIgnoreGlobs; - } - - void wait(); - void notify(); - void notifyError(std::exception &err); - bool watch(Function callback); - bool unwatch(Function callback); - void unref(); - bool isIgnored(std::string path); - void destroy(); - - static WatcherRef getShared(std::string dir, std::unordered_set ignorePaths, std::unordered_set ignoreGlobs); - -private: - std::mutex mMutex; - std::condition_variable mCond; - std::vector mCallbacks; - std::shared_ptr mDebounce; - - std::vector::iterator findCallback(Function callback); - void clearCallbacks(); - void triggerCallbacks(); -}; - -class WatcherError : public std::runtime_error { -public: - WatcherRef mWatcher; - WatcherError(std::string msg, WatcherRef watcher) : std::runtime_error(msg), mWatcher(watcher) {} - WatcherError(const char *msg, WatcherRef watcher) : std::runtime_error(msg), mWatcher(watcher) {} -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/binding.cc b/web/static/node_modules/@parcel/watcher/src/binding.cc deleted file mode 100644 index c478ca37..00000000 --- a/web/static/node_modules/@parcel/watcher/src/binding.cc +++ /dev/null @@ -1,261 +0,0 @@ -#include -#include -#include "wasm/include.h" -#include -#include "Glob.hh" -#include "Event.hh" -#include "Backend.hh" -#include "Watcher.hh" -#include "PromiseRunner.hh" - -using namespace Napi; - -std::unordered_set getIgnorePaths(Env env, Value opts) { - std::unordered_set result; - - if (opts.IsObject()) { - Value v = opts.As().Get(String::New(env, "ignorePaths")); - if (v.IsArray()) { - Array items = v.As(); - for (size_t i = 0; i < items.Length(); i++) { - Value item = items.Get(Number::New(env, i)); - if (item.IsString()) { - result.insert(std::string(item.As().Utf8Value().c_str())); - } - } - } - } - - return result; -} - -std::unordered_set getIgnoreGlobs(Env env, Value opts) { - std::unordered_set result; - - if (opts.IsObject()) { - Value v = opts.As().Get(String::New(env, "ignoreGlobs")); - if (v.IsArray()) { - Array items = v.As(); - for (size_t i = 0; i < items.Length(); i++) { - Value item = items.Get(Number::New(env, i)); - if (item.IsString()) { - auto key = item.As().Utf8Value(); - result.emplace(key); - } - } - } - } - - return result; -} - -std::shared_ptr getBackend(Env env, Value opts) { - Value b = opts.As().Get(String::New(env, "backend")); - std::string backendName; - if (b.IsString()) { - backendName = std::string(b.As().Utf8Value().c_str()); - } - - return Backend::getShared(backendName); -} - -class WriteSnapshotRunner : public PromiseRunner { -public: - WriteSnapshotRunner(Env env, Value dir, Value snap, Value opts) - : PromiseRunner(env), - snapshotPath(std::string(snap.As().Utf8Value().c_str())) { - watcher = Watcher::getShared( - std::string(dir.As().Utf8Value().c_str()), - getIgnorePaths(env, opts), - getIgnoreGlobs(env, opts) - ); - - backend = getBackend(env, opts); - } - - ~WriteSnapshotRunner() { - watcher->unref(); - backend->unref(); - } -private: - std::shared_ptr backend; - WatcherRef watcher; - std::string snapshotPath; - - void execute() override { - backend->writeSnapshot(watcher, &snapshotPath); - } -}; - -class GetEventsSinceRunner : public PromiseRunner { -public: - GetEventsSinceRunner(Env env, Value dir, Value snap, Value opts) - : PromiseRunner(env), - snapshotPath(std::string(snap.As().Utf8Value().c_str())) { - watcher = std::make_shared( - std::string(dir.As().Utf8Value().c_str()), - getIgnorePaths(env, opts), - getIgnoreGlobs(env, opts) - ); - - backend = getBackend(env, opts); - } - - ~GetEventsSinceRunner() { - watcher->unref(); - backend->unref(); - } -private: - std::shared_ptr backend; - WatcherRef watcher; - std::string snapshotPath; - - void execute() override { - backend->getEventsSince(watcher, &snapshotPath); - } - - Value getResult() override { - std::vector events = watcher->mEvents.getEvents(); - Array eventsArray = Array::New(env, events.size()); - size_t i = 0; - for (auto it = events.begin(); it != events.end(); it++) { - eventsArray.Set(i++, it->toJS(env)); - } - return eventsArray; - } -}; - -template -Value queueSnapshotWork(const CallbackInfo& info) { - Env env = info.Env(); - if (info.Length() < 1 || !info[0].IsString()) { - TypeError::New(env, "Expected a string").ThrowAsJavaScriptException(); - return env.Null(); - } - - if (info.Length() < 2 || !info[1].IsString()) { - TypeError::New(env, "Expected a string").ThrowAsJavaScriptException(); - return env.Null(); - } - - if (info.Length() >= 3 && !info[2].IsObject()) { - TypeError::New(env, "Expected an object").ThrowAsJavaScriptException(); - return env.Null(); - } - - Runner *runner = new Runner(info.Env(), info[0], info[1], info[2]); - return runner->queue(); -} - -Value writeSnapshot(const CallbackInfo& info) { - return queueSnapshotWork(info); -} - -Value getEventsSince(const CallbackInfo& info) { - return queueSnapshotWork(info); -} - -class SubscribeRunner : public PromiseRunner { -public: - SubscribeRunner(Env env, Value dir, Value fn, Value opts) : PromiseRunner(env) { - watcher = Watcher::getShared( - std::string(dir.As().Utf8Value().c_str()), - getIgnorePaths(env, opts), - getIgnoreGlobs(env, opts) - ); - - backend = getBackend(env, opts); - watcher->watch(fn.As()); - } - -private: - WatcherRef watcher; - std::shared_ptr backend; - FunctionReference callback; - - void execute() override { - try { - backend->watch(watcher); - } catch (std::exception &err) { - watcher->destroy(); - throw; - } - } -}; - -class UnsubscribeRunner : public PromiseRunner { -public: - UnsubscribeRunner(Env env, Value dir, Value fn, Value opts) : PromiseRunner(env) { - watcher = Watcher::getShared( - std::string(dir.As().Utf8Value().c_str()), - getIgnorePaths(env, opts), - getIgnoreGlobs(env, opts) - ); - - backend = getBackend(env, opts); - shouldUnwatch = watcher->unwatch(fn.As()); - } - -private: - WatcherRef watcher; - std::shared_ptr backend; - bool shouldUnwatch; - - void execute() override { - if (shouldUnwatch) { - backend->unwatch(watcher); - } - } -}; - -template -Value queueSubscriptionWork(const CallbackInfo& info) { - Env env = info.Env(); - if (info.Length() < 1 || !info[0].IsString()) { - TypeError::New(env, "Expected a string").ThrowAsJavaScriptException(); - return env.Null(); - } - - if (info.Length() < 2 || !info[1].IsFunction()) { - TypeError::New(env, "Expected a function").ThrowAsJavaScriptException(); - return env.Null(); - } - - if (info.Length() >= 3 && !info[2].IsObject()) { - TypeError::New(env, "Expected an object").ThrowAsJavaScriptException(); - return env.Null(); - } - - Runner *runner = new Runner(info.Env(), info[0], info[1], info[2]); - return runner->queue(); -} - -Value subscribe(const CallbackInfo& info) { - return queueSubscriptionWork(info); -} - -Value unsubscribe(const CallbackInfo& info) { - return queueSubscriptionWork(info); -} - -Object Init(Env env, Object exports) { - exports.Set( - String::New(env, "writeSnapshot"), - Function::New(env, writeSnapshot) - ); - exports.Set( - String::New(env, "getEventsSince"), - Function::New(env, getEventsSince) - ); - exports.Set( - String::New(env, "subscribe"), - Function::New(env, subscribe) - ); - exports.Set( - String::New(env, "unsubscribe"), - Function::New(env, unsubscribe) - ); - return exports; -} - -NODE_API_MODULE(watcher, Init) diff --git a/web/static/node_modules/@parcel/watcher/src/kqueue/KqueueBackend.cc b/web/static/node_modules/@parcel/watcher/src/kqueue/KqueueBackend.cc deleted file mode 100644 index 1f0b26f6..00000000 --- a/web/static/node_modules/@parcel/watcher/src/kqueue/KqueueBackend.cc +++ /dev/null @@ -1,307 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include "KqueueBackend.hh" - -#if __APPLE__ -#define st_mtim st_mtimespec -#endif - -#if !defined(O_EVTONLY) -#define O_EVTONLY O_RDONLY -#endif - -#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) - -void KqueueBackend::start() { - if ((mKqueue = kqueue()) < 0) { - throw std::runtime_error(std::string("Unable to open kqueue: ") + strerror(errno)); - } - - // Create a pipe that we will write to when we want to end the thread. - int err = pipe(mPipe); - if (err == -1) { - throw std::runtime_error(std::string("Unable to open pipe: ") + strerror(errno)); - } - - // Subscribe kqueue to this pipe. - struct kevent ev; - EV_SET( - &ev, - mPipe[0], - EVFILT_READ, - EV_ADD | EV_CLEAR, - 0, - 0, - 0 - ); - - if (kevent(mKqueue, &ev, 1, NULL, 0, 0)) { - close(mPipe[0]); - close(mPipe[1]); - throw std::runtime_error(std::string("Unable to watch pipe: ") + strerror(errno)); - } - - notifyStarted(); - - struct kevent events[128]; - - while (true) { - int event_count = kevent(mKqueue, NULL, 0, events, 128, 0); - if (event_count < 0 || events[0].flags == EV_ERROR) { - throw std::runtime_error(std::string("kevent error: ") + strerror(errno)); - } - - // Track all of the watchers that are touched so we can notify them at the end of the events. - std::unordered_set watchers; - - for (int i = 0; i < event_count; i++) { - int flags = events[i].fflags; - int fd = events[i].ident; - if (fd == mPipe[0]) { - // pipe was written to. break out of the loop. - goto done; - } - - auto it = mFdToEntry.find(fd); - if (it == mFdToEntry.end()) { - // If fd wasn't in our map, we may have already stopped watching it. Ignore the event. - continue; - } - - DirEntry *entry = it->second; - - if (flags & NOTE_WRITE && entry && entry->isDir) { - // If a write occurred on a directory, we have to diff the contents of that - // directory to determine what file was added/deleted. - compareDir(fd, entry->path, watchers); - } else { - std::vector subs = findSubscriptions(entry->path); - for (auto it = subs.begin(); it != subs.end(); it++) { - KqueueSubscription *sub = *it; - if (flags & (NOTE_DELETE | NOTE_RENAME | NOTE_REVOKE)) { - sub->watcher->mEvents.remove(sub->path); - sub->tree->remove(sub->path); - mFdToEntry.erase((int)(size_t)entry->state); - mSubscriptions.erase(sub->path); - } else if (flags & (NOTE_WRITE | NOTE_ATTRIB | NOTE_EXTEND)) { - struct stat st; - lstat(sub->path.c_str(), &st); - if (entry->mtime != CONVERT_TIME(st.st_mtim)) { - entry->mtime = CONVERT_TIME(st.st_mtim); - sub->watcher->mEvents.update(sub->path); - } - } - - watchers.insert(sub->watcher); - } - } - } - - for (auto it = watchers.begin(); it != watchers.end(); it++) { - (*it)->notify(); - } - } - -done: - close(mPipe[0]); - close(mPipe[1]); - mEndedSignal.notify(); -} - -KqueueBackend::~KqueueBackend() { - write(mPipe[1], "X", 1); - mEndedSignal.wait(); -} - -void KqueueBackend::subscribe(WatcherRef watcher) { - // Build a full directory tree recursively, and watch each directory. - std::shared_ptr tree = getTree(watcher); - - for (auto it = tree->entries.begin(); it != tree->entries.end(); it++) { - bool success = watchDir(watcher, it->second.path, tree); - if (!success) { - throw WatcherError(std::string("error watching " + watcher->mDir + ": " + strerror(errno)), watcher); - } - } -} - -bool KqueueBackend::watchDir(WatcherRef watcher, std::string path, std::shared_ptr tree) { - if (watcher->isIgnored(path)) { - return false; - } - - DirEntry *entry = tree->find(path); - if (!entry) { - return false; - } - - KqueueSubscription sub = { - .watcher = watcher, - .path = path, - .tree = tree - }; - - if (!entry->state) { - int fd = open(path.c_str(), O_EVTONLY); - if (fd <= 0) { - return false; - } - - struct kevent event; - EV_SET( - &event, - fd, - EVFILT_VNODE, - EV_ADD | EV_CLEAR | EV_ENABLE, - NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | NOTE_ATTRIB | NOTE_RENAME | NOTE_REVOKE, - 0, - 0 - ); - - if (kevent(mKqueue, &event, 1, NULL, 0, 0)) { - close(fd); - return false; - } - - entry->state = (void *)(size_t)fd; - mFdToEntry.emplace(fd, entry); - } - - sub.fd = (int)(size_t)entry->state; - mSubscriptions.emplace(path, sub); - return true; -} - -std::vector KqueueBackend::findSubscriptions(std::string &path) { - // Find the subscriptions affected by this path. - // Copy pointers to them into a vector so that modifying mSubscriptions doesn't invalidate the iterator. - auto range = mSubscriptions.equal_range(path); - std::vector subs; - for (auto it = range.first; it != range.second; it++) { - subs.push_back(&it->second); - } - - return subs; -} - -bool KqueueBackend::compareDir(int fd, std::string &path, std::unordered_set &watchers) { - // macOS doesn't support fdclosedir, so we have to duplicate the file descriptor - // to ensure the closedir doesn't also stop watching. - #if __APPLE__ - fd = dup(fd); - #endif - - DIR *dir = fdopendir(fd); - if (dir == NULL) { - return false; - } - - // fdopendir doesn't rewind to the beginning. - rewinddir(dir); - - std::vector subs = findSubscriptions(path); - std::string dirStart = path + DIR_SEP; - - std::unordered_set> trees; - for (auto it = subs.begin(); it != subs.end(); it++) { - trees.emplace((*it)->tree); - } - - std::unordered_set entries; - struct dirent *entry; - while ((entry = readdir(dir))) { - if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { - continue; - } - - std::string fullpath = dirStart + entry->d_name; - entries.emplace(fullpath); - - for (auto it = trees.begin(); it != trees.end(); it++) { - std::shared_ptr tree = *it; - if (!tree->find(fullpath)) { - struct stat st; - fstatat(fd, entry->d_name, &st, AT_SYMLINK_NOFOLLOW); - tree->add(fullpath, CONVERT_TIME(st.st_mtim), S_ISDIR(st.st_mode)); - - // Notify all watchers with the same tree. - for (auto i = subs.begin(); i != subs.end(); i++) { - KqueueSubscription *sub = *i; - if (sub->tree == tree) { - if (sub->watcher->isIgnored(fullpath)) { - continue; - } - - sub->watcher->mEvents.create(fullpath); - watchers.emplace(sub->watcher); - - bool success = watchDir(sub->watcher, fullpath, sub->tree); - if (!success) { - sub->tree->remove(fullpath); - return false; - } - } - } - } - } - } - - for (auto it = trees.begin(); it != trees.end(); it++) { - std::shared_ptr tree = *it; - for (auto entry = tree->entries.begin(); entry != tree->entries.end();) { - - if ( - entry->first.rfind(dirStart, 0) == 0 && - entry->first.find(DIR_SEP, dirStart.length()) == std::string::npos && - entries.count(entry->first) == 0 - ) { - // Notify all watchers with the same tree. - for (auto i = subs.begin(); i != subs.end(); i++) { - if ((*i)->tree == tree) { - KqueueSubscription *sub = *i; - if (!sub->watcher->isIgnored(entry->first)) { - sub->watcher->mEvents.remove(entry->first); - watchers.emplace(sub->watcher); - } - } - } - - mFdToEntry.erase((int)(size_t)entry->second.state); - mSubscriptions.erase(entry->first); - entry = tree->entries.erase(entry); - } else { - entry++; - } - } - } - - #if __APPLE__ - closedir(dir); - #else - fdclosedir(dir); - #endif - - return true; -} - -void KqueueBackend::unsubscribe(WatcherRef watcher) { - // Find any subscriptions pointing to this watcher, and remove them. - for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) { - if (it->second.watcher.get() == watcher.get()) { - if (mSubscriptions.count(it->first) == 1) { - // Closing the file descriptor automatically unwatches it in the kqueue. - close(it->second.fd); - mFdToEntry.erase(it->second.fd); - } - - it = mSubscriptions.erase(it); - } else { - it++; - } - } -} diff --git a/web/static/node_modules/@parcel/watcher/src/kqueue/KqueueBackend.hh b/web/static/node_modules/@parcel/watcher/src/kqueue/KqueueBackend.hh deleted file mode 100644 index 3c6a9cdd..00000000 --- a/web/static/node_modules/@parcel/watcher/src/kqueue/KqueueBackend.hh +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef KQUEUE_H -#define KQUEUE_H - -#include -#include -#include "../shared/BruteForceBackend.hh" -#include "../DirTree.hh" -#include "../Signal.hh" - -struct KqueueSubscription { - WatcherRef watcher; - std::string path; - std::shared_ptr tree; - int fd; -}; - -class KqueueBackend : public BruteForceBackend { -public: - void start() override; - ~KqueueBackend(); - void subscribe(WatcherRef watcher) override; - void unsubscribe(WatcherRef watcher) override; -private: - int mKqueue; - int mPipe[2]; - std::unordered_multimap mSubscriptions; - std::unordered_map mFdToEntry; - Signal mEndedSignal; - - bool watchDir(WatcherRef watcher, std::string path, std::shared_ptr tree); - bool compareDir(int fd, std::string &dir, std::unordered_set &watchers); - std::vector findSubscriptions(std::string &path); -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/linux/InotifyBackend.cc b/web/static/node_modules/@parcel/watcher/src/linux/InotifyBackend.cc deleted file mode 100644 index ec926915..00000000 --- a/web/static/node_modules/@parcel/watcher/src/linux/InotifyBackend.cc +++ /dev/null @@ -1,232 +0,0 @@ -#include -#include -#include -#include -#include -#include "InotifyBackend.hh" - -#define INOTIFY_MASK \ - IN_ATTRIB | IN_CREATE | IN_DELETE | \ - IN_DELETE_SELF | IN_MODIFY | IN_MOVE_SELF | IN_MOVED_FROM | \ - IN_MOVED_TO | IN_DONT_FOLLOW | IN_ONLYDIR | IN_EXCL_UNLINK -#define BUFFER_SIZE 8192 -#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) - -void InotifyBackend::start() { - // Create a pipe that we will write to when we want to end the thread. - int err = pipe2(mPipe, O_CLOEXEC | O_NONBLOCK); - if (err == -1) { - throw std::runtime_error(std::string("Unable to open pipe: ") + strerror(errno)); - } - - // Init inotify file descriptor. - mInotify = inotify_init1(IN_NONBLOCK | IN_CLOEXEC); - if (mInotify == -1) { - throw std::runtime_error(std::string("Unable to initialize inotify: ") + strerror(errno)); - } - - pollfd pollfds[2]; - pollfds[0].fd = mPipe[0]; - pollfds[0].events = POLLIN; - pollfds[0].revents = 0; - pollfds[1].fd = mInotify; - pollfds[1].events = POLLIN; - pollfds[1].revents = 0; - - notifyStarted(); - - // Loop until we get an event from the pipe. - while (true) { - int result = poll(pollfds, 2, 500); - if (result < 0) { - throw std::runtime_error(std::string("Unable to poll: ") + strerror(errno)); - } - - if (pollfds[0].revents) { - break; - } - - if (pollfds[1].revents) { - handleEvents(); - } - } - - close(mPipe[0]); - close(mPipe[1]); - close(mInotify); - - mEndedSignal.notify(); -} - -InotifyBackend::~InotifyBackend() { - write(mPipe[1], "X", 1); - mEndedSignal.wait(); -} - -// This function is called by Backend::watch which takes a lock on mMutex -void InotifyBackend::subscribe(WatcherRef watcher) { - // Build a full directory tree recursively, and watch each directory. - std::shared_ptr tree = getTree(watcher); - - for (auto it = tree->entries.begin(); it != tree->entries.end(); it++) { - if (it->second.isDir) { - bool success = watchDir(watcher, it->second.path, tree); - if (!success) { - throw WatcherError(std::string("inotify_add_watch on '") + it->second.path + std::string("' failed: ") + strerror(errno), watcher); - } - } - } -} - -bool InotifyBackend::watchDir(WatcherRef watcher, std::string path, std::shared_ptr tree) { - int wd = inotify_add_watch(mInotify, path.c_str(), INOTIFY_MASK); - if (wd == -1) { - return false; - } - - std::shared_ptr sub = std::make_shared(); - sub->tree = tree; - sub->path = path; - sub->watcher = watcher; - mSubscriptions.emplace(wd, sub); - - return true; -} - -void InotifyBackend::handleEvents() { - char buf[BUFFER_SIZE] __attribute__ ((aligned(__alignof__(struct inotify_event))));; - struct inotify_event *event; - - // Track all of the watchers that are touched so we can notify them at the end of the events. - std::unordered_set watchers; - - while (true) { - int n = read(mInotify, &buf, BUFFER_SIZE); - if (n < 0) { - if (errno == EAGAIN || errno == EWOULDBLOCK) { - break; - } - - throw std::runtime_error(std::string("Error reading from inotify: ") + strerror(errno)); - } - - if (n == 0) { - break; - } - - for (char *ptr = buf; ptr < buf + n; ptr += sizeof(*event) + event->len) { - event = (struct inotify_event *)ptr; - - if ((event->mask & IN_Q_OVERFLOW) == IN_Q_OVERFLOW) { - // overflow - continue; - } - - handleEvent(event, watchers); - } - } - - for (auto it = watchers.begin(); it != watchers.end(); it++) { - (*it)->notify(); - } -} - -void InotifyBackend::handleEvent(struct inotify_event *event, std::unordered_set &watchers) { - std::unique_lock lock(mMutex); - - // Find the subscriptions for this watch descriptor - auto range = mSubscriptions.equal_range(event->wd); - std::unordered_set> set; - for (auto it = range.first; it != range.second; it++) { - set.insert(it->second); - } - - for (auto it = set.begin(); it != set.end(); it++) { - if (handleSubscription(event, *it)) { - watchers.insert((*it)->watcher); - } - } -} - -bool InotifyBackend::handleSubscription(struct inotify_event *event, std::shared_ptr sub) { - // Build full path and check if its in our ignore list. - std::shared_ptr watcher = sub->watcher; - std::string path = std::string(sub->path); - bool isDir = event->mask & IN_ISDIR; - - if (event->len > 0) { - path += "/" + std::string(event->name); - } - - if (watcher->isIgnored(path)) { - return false; - } - - // If this is a create, check if it's a directory and start watching if it is. - // In any case, keep the directory tree up to date. - if (event->mask & (IN_CREATE | IN_MOVED_TO)) { - watcher->mEvents.create(path); - - struct stat st; - // Use lstat to avoid resolving symbolic links that we cannot watch anyway - // https://github.com/parcel-bundler/watcher/issues/76 - lstat(path.c_str(), &st); - DirEntry *entry = sub->tree->add(path, CONVERT_TIME(st.st_mtim), S_ISDIR(st.st_mode)); - - if (entry->isDir) { - bool success = watchDir(watcher, path, sub->tree); - if (!success) { - sub->tree->remove(path); - return false; - } - } - } else if (event->mask & (IN_MODIFY | IN_ATTRIB)) { - watcher->mEvents.update(path); - - struct stat st; - stat(path.c_str(), &st); - sub->tree->update(path, CONVERT_TIME(st.st_mtim)); - } else if (event->mask & (IN_DELETE | IN_DELETE_SELF | IN_MOVED_FROM | IN_MOVE_SELF)) { - bool isSelfEvent = (event->mask & (IN_DELETE_SELF | IN_MOVE_SELF)); - // Ignore delete/move self events unless this is the recursive watch root - if (isSelfEvent && path != watcher->mDir) { - return false; - } - - // If the entry being deleted/moved is a directory, remove it from the list of subscriptions - // XXX: self events don't have the IN_ISDIR mask - if (isSelfEvent || isDir) { - for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) { - if (it->second->path == path) { - it = mSubscriptions.erase(it); - } else { - ++it; - } - } - } - - watcher->mEvents.remove(path); - sub->tree->remove(path); - } - - return true; -} - -// This function is called by Backend::unwatch which takes a lock on mMutex -void InotifyBackend::unsubscribe(WatcherRef watcher) { - // Find any subscriptions pointing to this watcher, and remove them. - for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) { - if (it->second->watcher.get() == watcher.get()) { - if (mSubscriptions.count(it->first) == 1) { - int err = inotify_rm_watch(mInotify, it->first); - if (err == -1) { - throw WatcherError(std::string("Unable to remove watcher: ") + strerror(errno), watcher); - } - } - - it = mSubscriptions.erase(it); - } else { - it++; - } - } -} diff --git a/web/static/node_modules/@parcel/watcher/src/linux/InotifyBackend.hh b/web/static/node_modules/@parcel/watcher/src/linux/InotifyBackend.hh deleted file mode 100644 index f34cd1f0..00000000 --- a/web/static/node_modules/@parcel/watcher/src/linux/InotifyBackend.hh +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef INOTIFY_H -#define INOTIFY_H - -#include -#include -#include "../shared/BruteForceBackend.hh" -#include "../DirTree.hh" -#include "../Signal.hh" - -struct InotifySubscription { - std::shared_ptr tree; - std::string path; - WatcherRef watcher; -}; - -class InotifyBackend : public BruteForceBackend { -public: - void start() override; - ~InotifyBackend(); - void subscribe(WatcherRef watcher) override; - void unsubscribe(WatcherRef watcher) override; -private: - int mPipe[2]; - int mInotify; - std::unordered_multimap> mSubscriptions; - Signal mEndedSignal; - - bool watchDir(WatcherRef watcher, std::string path, std::shared_ptr tree); - void handleEvents(); - void handleEvent(struct inotify_event *event, std::unordered_set &watchers); - bool handleSubscription(struct inotify_event *event, std::shared_ptr sub); -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/macos/FSEventsBackend.cc b/web/static/node_modules/@parcel/watcher/src/macos/FSEventsBackend.cc deleted file mode 100644 index 65c1c6ea..00000000 --- a/web/static/node_modules/@parcel/watcher/src/macos/FSEventsBackend.cc +++ /dev/null @@ -1,325 +0,0 @@ -#include -#include -#include -#include -#include -#include "../Event.hh" -#include "../Backend.hh" -#include "./FSEventsBackend.hh" -#include "../Watcher.hh" - -#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) -#define IGNORED_FLAGS (kFSEventStreamEventFlagItemIsHardlink | kFSEventStreamEventFlagItemIsLastHardlink | kFSEventStreamEventFlagItemIsSymlink | kFSEventStreamEventFlagItemIsDir | kFSEventStreamEventFlagItemIsFile) - -void stopStream(FSEventStreamRef stream, CFRunLoopRef runLoop) { - FSEventStreamStop(stream); - FSEventStreamUnscheduleFromRunLoop(stream, runLoop, kCFRunLoopDefaultMode); - FSEventStreamInvalidate(stream); - FSEventStreamRelease(stream); -} - -// macOS has a case insensitive file system by default. In order to detect -// file renames that only affect case, we need to get the canonical path -// and compare it with the input path to determine if a file was created or deleted. -bool pathExists(char *path) { - int fd = open(path, O_RDONLY | O_SYMLINK); - if (fd == -1) { - return false; - } - - char buf[PATH_MAX]; - if (fcntl(fd, F_GETPATH, buf) == -1) { - close(fd); - return false; - } - - bool res = strncmp(path, buf, PATH_MAX) == 0; - close(fd); - return res; -} - -class State: public WatcherState { -public: - FSEventStreamRef stream; - std::shared_ptr tree; - uint64_t since; -}; - -void FSEventsCallback( - ConstFSEventStreamRef streamRef, - void *clientCallBackInfo, - size_t numEvents, - void *eventPaths, - const FSEventStreamEventFlags eventFlags[], - const FSEventStreamEventId eventIds[] -) { - char **paths = (char **)eventPaths; - std::shared_ptr& watcher = *static_cast *>(clientCallBackInfo); - - EventList& list = watcher->mEvents; - if (watcher->state == nullptr) { - return; - } - - auto stateGuard = watcher->state; - auto* state = static_cast(stateGuard.get()); - uint64_t since = state->since; - bool deletedRoot = false; - - for (size_t i = 0; i < numEvents; ++i) { - bool isCreated = (eventFlags[i] & kFSEventStreamEventFlagItemCreated) == kFSEventStreamEventFlagItemCreated; - bool isRemoved = (eventFlags[i] & kFSEventStreamEventFlagItemRemoved) == kFSEventStreamEventFlagItemRemoved; - bool isModified = (eventFlags[i] & kFSEventStreamEventFlagItemModified) == kFSEventStreamEventFlagItemModified || - (eventFlags[i] & kFSEventStreamEventFlagItemInodeMetaMod) == kFSEventStreamEventFlagItemInodeMetaMod || - (eventFlags[i] & kFSEventStreamEventFlagItemFinderInfoMod) == kFSEventStreamEventFlagItemFinderInfoMod || - (eventFlags[i] & kFSEventStreamEventFlagItemChangeOwner) == kFSEventStreamEventFlagItemChangeOwner || - (eventFlags[i] & kFSEventStreamEventFlagItemXattrMod) == kFSEventStreamEventFlagItemXattrMod; - bool isRenamed = (eventFlags[i] & kFSEventStreamEventFlagItemRenamed) == kFSEventStreamEventFlagItemRenamed; - bool isDone = (eventFlags[i] & kFSEventStreamEventFlagHistoryDone) == kFSEventStreamEventFlagHistoryDone; - bool isDir = (eventFlags[i] & kFSEventStreamEventFlagItemIsDir) == kFSEventStreamEventFlagItemIsDir; - - if (isDone) { - watcher->notify(); - break; - } - - auto ignoredFlags = IGNORED_FLAGS; - if (__builtin_available(macOS 10.13, *)) { - ignoredFlags |= kFSEventStreamEventFlagItemCloned; - } - - // If we don't care about any of the flags that are set, ignore this event. - if ((eventFlags[i] & ~ignoredFlags) == 0) { - continue; - } - - // FSEvents exclusion paths only apply to files, not directories. - if (watcher->isIgnored(paths[i])) { - continue; - } - - // Handle unambiguous events first - if (isCreated && !(isRemoved || isModified || isRenamed)) { - state->tree->add(paths[i], 0, isDir); - list.create(paths[i]); - } else if (isRemoved && !(isCreated || isModified || isRenamed)) { - state->tree->remove(paths[i]); - list.remove(paths[i]); - if (paths[i] == watcher->mDir) { - deletedRoot = true; - } - } else if (isModified && !(isCreated || isRemoved || isRenamed)) { - struct stat file; - if (stat(paths[i], &file)) { - continue; - } - - // Ignore if mtime is the same as the last event. - // This prevents duplicate events from being emitted. - // If tv_nsec is zero, the file system probably only has second-level - // granularity so allow the even through in that case. - uint64_t mtime = CONVERT_TIME(file.st_mtimespec); - DirEntry *entry = state->tree->find(paths[i]); - if (entry && mtime == entry->mtime && file.st_mtimespec.tv_nsec != 0) { - continue; - } - - if (entry) { - // Update mtime. - entry->mtime = mtime; - } else { - // Add to tree if this path has not been discovered yet. - state->tree->add(paths[i], mtime, S_ISDIR(file.st_mode)); - } - - list.update(paths[i]); - } else { - // If multiple flags were set, then we need to call `stat` to determine if the file really exists. - // This helps disambiguate creates, updates, and deletes. - struct stat file; - if (stat(paths[i], &file) || !pathExists(paths[i])) { - // File does not exist, so we have to assume it was removed. This is not exact since the - // flags set by fsevents get coalesced together (e.g. created & deleted), so there is no way to - // know whether the create and delete both happened since our snapshot (in which case - // we'd rather ignore this event completely). This will result in some extra delete events - // being emitted for files we don't know about, but that is the best we can do. - state->tree->remove(paths[i]); - list.remove(paths[i]); - if (paths[i] == watcher->mDir) { - deletedRoot = true; - } - continue; - } - - // If the file was modified, and existed before, then this is an update, otherwise a create. - uint64_t ctime = CONVERT_TIME(file.st_birthtimespec); - uint64_t mtime = CONVERT_TIME(file.st_mtimespec); - DirEntry *entry = !since ? state->tree->find(paths[i]) : NULL; - if (entry && entry->mtime == mtime && file.st_mtimespec.tv_nsec != 0) { - continue; - } - - // Some mounted file systems report a creation time of 0/unix epoch which we special case. - if (isModified && (entry || (ctime <= since && ctime != 0))) { - state->tree->update(paths[i], mtime); - list.update(paths[i]); - } else { - state->tree->add(paths[i], mtime, S_ISDIR(file.st_mode)); - list.create(paths[i]); - } - } - } - - watcher->notify(); - - // Stop watching if the root directory was deleted. - if (deletedRoot) { - stopStream((FSEventStreamRef)streamRef, CFRunLoopGetCurrent()); - watcher->state = nullptr; - } -} - -void checkWatcher(WatcherRef watcher) { - struct stat file; - if (stat(watcher->mDir.c_str(), &file)) { - throw WatcherError(strerror(errno), watcher); - } - - if (!S_ISDIR(file.st_mode)) { - throw WatcherError(strerror(ENOTDIR), watcher); - } -} - -void FSEventsBackend::startStream(WatcherRef watcher, FSEventStreamEventId id) { - checkWatcher(watcher); - - CFAbsoluteTime latency = 0.001; - CFStringRef fileWatchPath = CFStringCreateWithCString( - NULL, - watcher->mDir.c_str(), - kCFStringEncodingUTF8 - ); - - CFArrayRef pathsToWatch = CFArrayCreate( - NULL, - (const void **)&fileWatchPath, - 1, - NULL - ); - - // Make a watcher reference we can pass into the callback. This ensures bumped ref-count. - std::shared_ptr* callbackWatcher = new std::shared_ptr (watcher); - FSEventStreamContext callbackInfo {0, static_cast (callbackWatcher), nullptr, nullptr, nullptr}; - FSEventStreamRef stream = FSEventStreamCreate( - NULL, - &FSEventsCallback, - &callbackInfo, - pathsToWatch, - id, - latency, - kFSEventStreamCreateFlagFileEvents - ); - - CFMutableArrayRef exclusions = CFArrayCreateMutable(NULL, watcher->mIgnorePaths.size(), NULL); - for (auto it = watcher->mIgnorePaths.begin(); it != watcher->mIgnorePaths.end(); it++) { - CFStringRef path = CFStringCreateWithCString( - NULL, - it->c_str(), - kCFStringEncodingUTF8 - ); - - CFArrayAppendValue(exclusions, (const void *)path); - } - - FSEventStreamSetExclusionPaths(stream, exclusions); - - FSEventStreamScheduleWithRunLoop(stream, mRunLoop, kCFRunLoopDefaultMode); - bool started = FSEventStreamStart(stream); - - CFRelease(pathsToWatch); - CFRelease(fileWatchPath); - - if (!started) { - FSEventStreamRelease(stream); - throw WatcherError("Error starting FSEvents stream", watcher); - } - - auto stateGuard = watcher->state; - State* s = static_cast(stateGuard.get()); - s->tree = std::make_shared(watcher->mDir); - s->stream = stream; -} - -void FSEventsBackend::start() { - mRunLoop = CFRunLoopGetCurrent(); - CFRetain(mRunLoop); - - // Unlock once run loop has started. - CFRunLoopPerformBlock(mRunLoop, kCFRunLoopDefaultMode, ^ { - notifyStarted(); - }); - - CFRunLoopWakeUp(mRunLoop); - CFRunLoopRun(); -} - -FSEventsBackend::~FSEventsBackend() { - std::unique_lock lock(mMutex); - CFRunLoopStop(mRunLoop); - CFRelease(mRunLoop); -} - -void FSEventsBackend::writeSnapshot(WatcherRef watcher, std::string *snapshotPath) { - std::unique_lock lock(mMutex); - checkWatcher(watcher); - - FSEventStreamEventId id = FSEventsGetCurrentEventId(); - std::ofstream ofs(*snapshotPath); - ofs << id; - ofs << "\n"; - - struct timespec now; - clock_gettime(CLOCK_REALTIME, &now); - ofs << CONVERT_TIME(now); -} - -void FSEventsBackend::getEventsSince(WatcherRef watcher, std::string *snapshotPath) { - std::unique_lock lock(mMutex); - std::ifstream ifs(*snapshotPath); - if (ifs.fail()) { - return; - } - - FSEventStreamEventId id; - uint64_t since; - ifs >> id; - ifs >> since; - - auto s = std::make_shared(); - s->since = since; - watcher->state = s; - - startStream(watcher, id); - watcher->wait(); - stopStream(s->stream, mRunLoop); - - watcher->state = nullptr; -} - -// This function is called by Backend::watch which takes a lock on mMutex -void FSEventsBackend::subscribe(WatcherRef watcher) { - auto s = std::make_shared(); - s->since = 0; - watcher->state = s; - startStream(watcher, kFSEventStreamEventIdSinceNow); -} - -// This function is called by Backend::unwatch which takes a lock on mMutex -void FSEventsBackend::unsubscribe(WatcherRef watcher) { - auto stateGuard = watcher->state; - State* s = static_cast(stateGuard.get()); - if (s != nullptr) { - stopStream(s->stream, mRunLoop); - watcher->state = nullptr; - } -} diff --git a/web/static/node_modules/@parcel/watcher/src/macos/FSEventsBackend.hh b/web/static/node_modules/@parcel/watcher/src/macos/FSEventsBackend.hh deleted file mode 100644 index 57ded666..00000000 --- a/web/static/node_modules/@parcel/watcher/src/macos/FSEventsBackend.hh +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef FS_EVENTS_H -#define FS_EVENTS_H - -#include -#include "../Backend.hh" - -class FSEventsBackend : public Backend { -public: - void start() override; - ~FSEventsBackend(); - void writeSnapshot(WatcherRef watcher, std::string *snapshotPath) override; - void getEventsSince(WatcherRef watcher, std::string *snapshotPath) override; - void subscribe(WatcherRef watcher) override; - void unsubscribe(WatcherRef watcher) override; -private: - void startStream(WatcherRef watcher, FSEventStreamEventId id); - CFRunLoopRef mRunLoop; -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/shared/BruteForceBackend.cc b/web/static/node_modules/@parcel/watcher/src/shared/BruteForceBackend.cc deleted file mode 100644 index 0e9b84f0..00000000 --- a/web/static/node_modules/@parcel/watcher/src/shared/BruteForceBackend.cc +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include "../DirTree.hh" -#include "../Event.hh" -#include "./BruteForceBackend.hh" - -std::shared_ptr BruteForceBackend::getTree(WatcherRef watcher, bool shouldRead) { - auto tree = DirTree::getCached(watcher->mDir); - - // If the tree is not complete, read it if needed. - if (!tree->isComplete && shouldRead) { - readTree(watcher, tree); - tree->isComplete = true; - } - - return tree; -} - -void BruteForceBackend::writeSnapshot(WatcherRef watcher, std::string *snapshotPath) { - std::unique_lock lock(mMutex); - auto tree = getTree(watcher); - FILE *f = fopen(snapshotPath->c_str(), "w"); - if (!f) { - throw std::runtime_error(std::string("Unable to open snapshot file: ") + strerror(errno)); - } - - tree->write(f); - fclose(f); -} - -void BruteForceBackend::getEventsSince(WatcherRef watcher, std::string *snapshotPath) { - std::unique_lock lock(mMutex); - FILE *f = fopen(snapshotPath->c_str(), "r"); - if (!f) { - throw std::runtime_error(std::string("Unable to open snapshot file: ") + strerror(errno)); - } - - DirTree snapshot{watcher->mDir, f}; - auto now = getTree(watcher); - now->getChanges(&snapshot, watcher->mEvents); - fclose(f); -} diff --git a/web/static/node_modules/@parcel/watcher/src/shared/BruteForceBackend.hh b/web/static/node_modules/@parcel/watcher/src/shared/BruteForceBackend.hh deleted file mode 100644 index de7a73d1..00000000 --- a/web/static/node_modules/@parcel/watcher/src/shared/BruteForceBackend.hh +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef BRUTE_FORCE_H -#define BRUTE_FORCE_H - -#include "../Backend.hh" -#include "../DirTree.hh" -#include "../Watcher.hh" - -class BruteForceBackend : public Backend { -public: - void writeSnapshot(WatcherRef watcher, std::string *snapshotPath) override; - void getEventsSince(WatcherRef watcher, std::string *snapshotPath) override; - void subscribe(WatcherRef watcher) override { - throw "Brute force backend doesn't support subscriptions."; - } - - void unsubscribe(WatcherRef watcher) override { - throw "Brute force backend doesn't support subscriptions."; - } - - std::shared_ptr getTree(WatcherRef watcher, bool shouldRead = true); -private: - void readTree(WatcherRef watcher, std::shared_ptr tree); -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/unix/fts.cc b/web/static/node_modules/@parcel/watcher/src/unix/fts.cc deleted file mode 100644 index d50c3e49..00000000 --- a/web/static/node_modules/@parcel/watcher/src/unix/fts.cc +++ /dev/null @@ -1,50 +0,0 @@ -#include - -// weird error on linux -#ifdef __THROW -#undef __THROW -#endif -#define __THROW - -#include -#include -#include "../DirTree.hh" -#include "../shared/BruteForceBackend.hh" - -#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) -#if __APPLE__ -#define st_mtim st_mtimespec -#endif - -void BruteForceBackend::readTree(WatcherRef watcher, std::shared_ptr tree) { - char *paths[2] {(char *)watcher->mDir.c_str(), NULL}; - FTS *fts = fts_open(paths, FTS_NOCHDIR | FTS_PHYSICAL, NULL); - if (!fts) { - throw WatcherError(strerror(errno), watcher); - } - - FTSENT *node; - bool isRoot = true; - - while ((node = fts_read(fts)) != NULL) { - if (node->fts_errno) { - fts_close(fts); - throw WatcherError(strerror(node->fts_errno), watcher); - } - - if (isRoot && !(node->fts_info & FTS_D)) { - fts_close(fts); - throw WatcherError(strerror(ENOTDIR), watcher); - } - - if (watcher->isIgnored(std::string(node->fts_path))) { - fts_set(fts, node, FTS_SKIP); - continue; - } - - tree->add(node->fts_path, CONVERT_TIME(node->fts_statp->st_mtim), (node->fts_info & FTS_D) == FTS_D); - isRoot = false; - } - - fts_close(fts); -} diff --git a/web/static/node_modules/@parcel/watcher/src/unix/legacy.cc b/web/static/node_modules/@parcel/watcher/src/unix/legacy.cc deleted file mode 100644 index 60490c63..00000000 --- a/web/static/node_modules/@parcel/watcher/src/unix/legacy.cc +++ /dev/null @@ -1,77 +0,0 @@ -#include - -// weird error on linux -#ifdef __THROW -#undef __THROW -#endif -#define __THROW - -#ifdef _LIBC -# include -#else -# include -#endif -#include -#include -#include - -#include "../DirTree.hh" -#include "../shared/BruteForceBackend.hh" - -#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) -#if __APPLE__ -#define st_mtim st_mtimespec -#endif -#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) - -void iterateDir(WatcherRef watcher, const std::shared_ptr tree, const char *relative, int parent_fd, const std::string &dirname) { - int open_flags = (O_RDONLY | O_CLOEXEC | O_DIRECTORY | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW); - int new_fd = openat(parent_fd, relative, open_flags); - if (new_fd == -1) { - if (errno == EACCES) { - return; // ignore insufficient permissions - } - - throw WatcherError(strerror(errno), watcher); - } - - struct stat rootAttributes; - fstatat(new_fd, ".", &rootAttributes, AT_SYMLINK_NOFOLLOW); - tree->add(dirname, CONVERT_TIME(rootAttributes.st_mtim), true); - - if (DIR *dir = fdopendir(new_fd)) { - while (struct dirent *ent = (errno = 0, readdir(dir))) { - if (ISDOT(ent->d_name)) continue; - - std::string fullPath = dirname + "/" + ent->d_name; - - if (!watcher->isIgnored(fullPath)) { - struct stat attrib; - fstatat(new_fd, ent->d_name, &attrib, AT_SYMLINK_NOFOLLOW); - bool isDir = ent->d_type == DT_DIR; - - if (isDir) { - iterateDir(watcher, tree, ent->d_name, new_fd, fullPath); - } else { - tree->add(fullPath, CONVERT_TIME(attrib.st_mtim), isDir); - } - } - } - - closedir(dir); - } else { - close(new_fd); - } - - if (errno) { - throw WatcherError(strerror(errno), watcher); - } -} - -void BruteForceBackend::readTree(WatcherRef watcher, std::shared_ptr tree) { - int fd = open(watcher->mDir.c_str(), O_RDONLY); - if (fd) { - iterateDir(watcher, tree, ".", fd, watcher->mDir); - close(fd); - } -} diff --git a/web/static/node_modules/@parcel/watcher/src/wasm/WasmBackend.cc b/web/static/node_modules/@parcel/watcher/src/wasm/WasmBackend.cc deleted file mode 100644 index 9514109c..00000000 --- a/web/static/node_modules/@parcel/watcher/src/wasm/WasmBackend.cc +++ /dev/null @@ -1,132 +0,0 @@ -#include -#include "WasmBackend.hh" - -#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) - -void WasmBackend::start() { - notifyStarted(); -} - -void WasmBackend::subscribe(WatcherRef watcher) { - // Build a full directory tree recursively, and watch each directory. - std::shared_ptr tree = getTree(watcher); - - for (auto it = tree->entries.begin(); it != tree->entries.end(); it++) { - if (it->second.isDir) { - watchDir(watcher, it->second.path, tree); - } - } -} - -void WasmBackend::watchDir(WatcherRef watcher, std::string path, std::shared_ptr tree) { - int wd = wasm_backend_add_watch(path.c_str(), (void *)this); - std::shared_ptr sub = std::make_shared(); - sub->tree = tree; - sub->path = path; - sub->watcher = watcher; - mSubscriptions.emplace(wd, sub); -} - -extern "C" void wasm_backend_event_handler(void *backend, int wd, int type, char *filename) { - WasmBackend *b = (WasmBackend *)(backend); - b->handleEvent(wd, type, filename); -} - -void WasmBackend::handleEvent(int wd, int type, char *filename) { - // Find the subscriptions for this watch descriptor - auto range = mSubscriptions.equal_range(wd); - std::unordered_set> set; - for (auto it = range.first; it != range.second; it++) { - set.insert(it->second); - } - - for (auto it = set.begin(); it != set.end(); it++) { - if (handleSubscription(type, filename, *it)) { - (*it)->watcher->notify(); - } - } -} - -bool WasmBackend::handleSubscription(int type, char *filename, std::shared_ptr sub) { - // Build full path and check if its in our ignore list. - WatcherRef watcher = sub->watcher; - std::string path = std::string(sub->path); - - if (filename[0] != '\0') { - path += "/" + std::string(filename); - } - - if (watcher->isIgnored(path)) { - return false; - } - - if (type == 1) { - struct stat st; - stat(path.c_str(), &st); - sub->tree->update(path, CONVERT_TIME(st.st_mtim)); - watcher->mEvents.update(path); - } else if (type == 2) { - // Determine if this is a create or delete depending on if the file exists or not. - struct stat st; - if (lstat(path.c_str(), &st)) { - // If the entry being deleted/moved is a directory, remove it from the list of subscriptions - DirEntry *entry = sub->tree->find(path); - if (!entry) { - return false; - } - - if (entry->isDir) { - std::string pathStart = path + DIR_SEP; - for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) { - if (it->second->path == path || it->second->path.rfind(pathStart, 0) == 0) { - wasm_backend_remove_watch(it->first); - it = mSubscriptions.erase(it); - } else { - ++it; - } - } - - // Remove all sub-entries - for (auto it = sub->tree->entries.begin(); it != sub->tree->entries.end();) { - if (it->first.rfind(pathStart, 0) == 0) { - watcher->mEvents.remove(it->first); - it = sub->tree->entries.erase(it); - } else { - it++; - } - } - } - - watcher->mEvents.remove(path); - sub->tree->remove(path); - } else if (sub->tree->find(path)) { - sub->tree->update(path, CONVERT_TIME(st.st_mtim)); - watcher->mEvents.update(path); - } else { - watcher->mEvents.create(path); - - // If this is a create, check if it's a directory and start watching if it is. - DirEntry *entry = sub->tree->add(path, CONVERT_TIME(st.st_mtim), S_ISDIR(st.st_mode)); - if (entry->isDir) { - watchDir(watcher, path, sub->tree); - } - } - } - - return true; -} - -void WasmBackend::unsubscribe(WatcherRef watcher) { - // Find any subscriptions pointing to this watcher, and remove them. - for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) { - if (it->second->watcher.get() == watcher.get()) { - if (mSubscriptions.count(it->first) == 1) { - wasm_backend_remove_watch(it->first); - } - - it = mSubscriptions.erase(it); - } else { - it++; - } - } -} diff --git a/web/static/node_modules/@parcel/watcher/src/wasm/WasmBackend.hh b/web/static/node_modules/@parcel/watcher/src/wasm/WasmBackend.hh deleted file mode 100644 index 9facac85..00000000 --- a/web/static/node_modules/@parcel/watcher/src/wasm/WasmBackend.hh +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef WASM_H -#define WASM_H - -#include -#include "../shared/BruteForceBackend.hh" -#include "../DirTree.hh" - -extern "C" { - int wasm_backend_add_watch(const char *filename, void *backend); - void wasm_backend_remove_watch(int wd); - void wasm_backend_event_handler(void *backend, int wd, int type, char *filename); -}; - -struct WasmSubscription { - std::shared_ptr tree; - std::string path; - WatcherRef watcher; -}; - -class WasmBackend : public BruteForceBackend { -public: - void start() override; - void subscribe(WatcherRef watcher) override; - void unsubscribe(WatcherRef watcher) override; - void handleEvent(int wd, int type, char *filename); -private: - int mWasm; - std::unordered_multimap> mSubscriptions; - - void watchDir(WatcherRef watcher, std::string path, std::shared_ptr tree); - bool handleSubscription(int type, char *filename, std::shared_ptr sub); -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/wasm/include.h b/web/static/node_modules/@parcel/watcher/src/wasm/include.h deleted file mode 100644 index 60e4d657..00000000 --- a/web/static/node_modules/@parcel/watcher/src/wasm/include.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -*/ - -// Node does not include the headers for these functions when compiling for WASM, so add them here. -#ifdef __wasm32__ -extern "C" { -NAPI_EXTERN napi_status NAPI_CDECL -napi_create_threadsafe_function(napi_env env, - napi_value func, - napi_value async_resource, - napi_value async_resource_name, - size_t max_queue_size, - size_t initial_thread_count, - void* thread_finalize_data, - napi_finalize thread_finalize_cb, - void* context, - napi_threadsafe_function_call_js call_js_cb, - napi_threadsafe_function* result); - -NAPI_EXTERN napi_status NAPI_CDECL napi_get_threadsafe_function_context( - napi_threadsafe_function func, void** result); - -NAPI_EXTERN napi_status NAPI_CDECL -napi_call_threadsafe_function(napi_threadsafe_function func, - void* data, - napi_threadsafe_function_call_mode is_blocking); - -NAPI_EXTERN napi_status NAPI_CDECL -napi_acquire_threadsafe_function(napi_threadsafe_function func); - -NAPI_EXTERN napi_status NAPI_CDECL napi_release_threadsafe_function( - napi_threadsafe_function func, napi_threadsafe_function_release_mode mode); - -NAPI_EXTERN napi_status NAPI_CDECL -napi_unref_threadsafe_function(napi_env env, napi_threadsafe_function func); - -NAPI_EXTERN napi_status NAPI_CDECL -napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func); - -NAPI_EXTERN napi_status NAPI_CDECL -napi_create_async_work(napi_env env, - napi_value async_resource, - napi_value async_resource_name, - napi_async_execute_callback execute, - napi_async_complete_callback complete, - void* data, - napi_async_work* result); -NAPI_EXTERN napi_status NAPI_CDECL napi_delete_async_work(napi_env env, - napi_async_work work); -NAPI_EXTERN napi_status NAPI_CDECL napi_queue_async_work(napi_env env, - napi_async_work work); -NAPI_EXTERN napi_status NAPI_CDECL napi_cancel_async_work(napi_env env, - napi_async_work work); -} -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/watchman/BSER.cc b/web/static/node_modules/@parcel/watcher/src/watchman/BSER.cc deleted file mode 100644 index 1fbcd45b..00000000 --- a/web/static/node_modules/@parcel/watcher/src/watchman/BSER.cc +++ /dev/null @@ -1,302 +0,0 @@ -#include -#include "./BSER.hh" - -BSERType decodeType(std::istream &iss) { - int8_t type; - iss.read(reinterpret_cast(&type), sizeof(type)); - return (BSERType) type; -} - -void expectType(std::istream &iss, BSERType expected) { - BSERType got = decodeType(iss); - if (got != expected) { - throw std::runtime_error("Unexpected BSER type"); - } -} - -void encodeType(std::ostream &oss, BSERType type) { - int8_t t = (int8_t)type; - oss.write(reinterpret_cast(&t), sizeof(t)); -} - -template -class Value : public BSERValue { -public: - T value; - Value(T val) { - value = val; - } - - Value() {} -}; - -class BSERInteger : public Value { -public: - BSERInteger(int64_t value) : Value(value) {} - BSERInteger(std::istream &iss) { - int8_t int8; - int16_t int16; - int32_t int32; - int64_t int64; - - BSERType type = decodeType(iss); - - switch (type) { - case BSER_INT8: - iss.read(reinterpret_cast(&int8), sizeof(int8)); - value = int8; - break; - case BSER_INT16: - iss.read(reinterpret_cast(&int16), sizeof(int16)); - value = int16; - break; - case BSER_INT32: - iss.read(reinterpret_cast(&int32), sizeof(int32)); - value = int32; - break; - case BSER_INT64: - iss.read(reinterpret_cast(&int64), sizeof(int64)); - value = int64; - break; - default: - throw std::runtime_error("Invalid BSER int type"); - } - } - - int64_t intValue() override { - return value; - } - - void encode(std::ostream &oss) override { - if (value <= INT8_MAX) { - encodeType(oss, BSER_INT8); - int8_t v = (int8_t)value; - oss.write(reinterpret_cast(&v), sizeof(v)); - } else if (value <= INT16_MAX) { - encodeType(oss, BSER_INT16); - int16_t v = (int16_t)value; - oss.write(reinterpret_cast(&v), sizeof(v)); - } else if (value <= INT32_MAX) { - encodeType(oss, BSER_INT32); - int32_t v = (int32_t)value; - oss.write(reinterpret_cast(&v), sizeof(v)); - } else { - encodeType(oss, BSER_INT64); - oss.write(reinterpret_cast(&value), sizeof(value)); - } - } -}; - -class BSERArray : public Value { -public: - BSERArray() : Value() {} - BSERArray(BSER::Array value) : Value(value) {} - BSERArray(std::istream &iss) { - expectType(iss, BSER_ARRAY); - int64_t len = BSERInteger(iss).intValue(); - for (int64_t i = 0; i < len; i++) { - value.push_back(BSER(iss)); - } - } - - BSER::Array arrayValue() override { - return value; - } - - void encode(std::ostream &oss) override { - encodeType(oss, BSER_ARRAY); - BSERInteger(value.size()).encode(oss); - for (auto it = value.begin(); it != value.end(); it++) { - it->encode(oss); - } - } -}; - -class BSERString : public Value { -public: - BSERString(std::string value) : Value(value) {} - BSERString(std::istream &iss) { - expectType(iss, BSER_STRING); - int64_t len = BSERInteger(iss).intValue(); - value.resize(len); - iss.read(&value[0], len); - } - - std::string stringValue() override { - return value; - } - - void encode(std::ostream &oss) override { - encodeType(oss, BSER_STRING); - BSERInteger(value.size()).encode(oss); - oss << value; - } -}; - -class BSERObject : public Value { -public: - BSERObject() : Value() {} - BSERObject(BSER::Object value) : Value(value) {} - BSERObject(std::istream &iss) { - expectType(iss, BSER_OBJECT); - int64_t len = BSERInteger(iss).intValue(); - for (int64_t i = 0; i < len; i++) { - auto key = BSERString(iss).stringValue(); - auto val = BSER(iss); - value.emplace(key, val); - } - } - - BSER::Object objectValue() override { - return value; - } - - void encode(std::ostream &oss) override { - encodeType(oss, BSER_OBJECT); - BSERInteger(value.size()).encode(oss); - for (auto it = value.begin(); it != value.end(); it++) { - BSERString(it->first).encode(oss); - it->second.encode(oss); - } - } -}; - -class BSERDouble : public Value { -public: - BSERDouble(double value) : Value(value) {} - BSERDouble(std::istream &iss) { - expectType(iss, BSER_REAL); - iss.read(reinterpret_cast(&value), sizeof(value)); - } - - double doubleValue() override { - return value; - } - - void encode(std::ostream &oss) override { - encodeType(oss, BSER_REAL); - oss.write(reinterpret_cast(&value), sizeof(value)); - } -}; - -class BSERBoolean : public Value { -public: - BSERBoolean(bool value) : Value(value) {} - bool boolValue() override { return value; } - void encode(std::ostream &oss) override { - int8_t t = value == true ? BSER_BOOL_TRUE : BSER_BOOL_FALSE; - oss.write(reinterpret_cast(&t), sizeof(t)); - } -}; - -class BSERNull : public Value { -public: - BSERNull() : Value(false) {} - void encode(std::ostream &oss) override { - encodeType(oss, BSER_NULL); - } -}; - -std::shared_ptr decodeTemplate(std::istream &iss) { - expectType(iss, BSER_TEMPLATE); - auto keys = BSERArray(iss).arrayValue(); - auto len = BSERInteger(iss).intValue(); - std::shared_ptr arr = std::make_shared(); - for (int64_t i = 0; i < len; i++) { - BSER::Object obj; - for (auto it = keys.begin(); it != keys.end(); it++) { - if (iss.peek() == 0x0c) { - iss.ignore(1); - continue; - } - - auto val = BSER(iss); - obj.emplace(it->stringValue(), val); - } - arr->value.push_back(obj); - } - return arr; -} - -BSER::BSER(std::istream &iss) { - BSERType type = decodeType(iss); - iss.unget(); - - switch (type) { - case BSER_ARRAY: - m_ptr = std::make_shared(iss); - break; - case BSER_OBJECT: - m_ptr = std::make_shared(iss); - break; - case BSER_STRING: - m_ptr = std::make_shared(iss); - break; - case BSER_INT8: - case BSER_INT16: - case BSER_INT32: - case BSER_INT64: - m_ptr = std::make_shared(iss); - break; - case BSER_REAL: - m_ptr = std::make_shared(iss); - break; - case BSER_BOOL_TRUE: - iss.ignore(1); - m_ptr = std::make_shared(true); - break; - case BSER_BOOL_FALSE: - iss.ignore(1); - m_ptr = std::make_shared(false); - break; - case BSER_NULL: - iss.ignore(1); - m_ptr = std::make_shared(); - break; - case BSER_TEMPLATE: - m_ptr = decodeTemplate(iss); - break; - default: - throw std::runtime_error("unknown BSER type"); - } -} - -BSER::BSER() : m_ptr(std::make_shared()) {} -BSER::BSER(BSER::Array value) : m_ptr(std::make_shared(value)) {} -BSER::BSER(BSER::Object value) : m_ptr(std::make_shared(value)) {} -BSER::BSER(const char *value) : m_ptr(std::make_shared(value)) {} -BSER::BSER(std::string value) : m_ptr(std::make_shared(value)) {} -BSER::BSER(int64_t value) : m_ptr(std::make_shared(value)) {} -BSER::BSER(double value) : m_ptr(std::make_shared(value)) {} -BSER::BSER(bool value) : m_ptr(std::make_shared(value)) {} - -BSER::Array BSER::arrayValue() { return m_ptr->arrayValue(); } -BSER::Object BSER::objectValue() { return m_ptr->objectValue(); } -std::string BSER::stringValue() { return m_ptr->stringValue(); } -int64_t BSER::intValue() { return m_ptr->intValue(); } -double BSER::doubleValue() { return m_ptr->doubleValue(); } -bool BSER::boolValue() { return m_ptr->boolValue(); } -void BSER::encode(std::ostream &oss) { - m_ptr->encode(oss); -} - -int64_t BSER::decodeLength(std::istream &iss) { - char pdu[2]; - if (!iss.read(pdu, 2) || pdu[0] != 0 || pdu[1] != 1) { - throw std::runtime_error("Invalid BSER"); - } - - return BSERInteger(iss).intValue(); -} - -std::string BSER::encode() { - std::ostringstream oss(std::ios_base::binary); - encode(oss); - - std::ostringstream res(std::ios_base::binary); - res.write("\x00\x01", 2); - - BSERInteger(oss.str().size()).encode(res); - res << oss.str(); - return res.str(); -} diff --git a/web/static/node_modules/@parcel/watcher/src/watchman/BSER.hh b/web/static/node_modules/@parcel/watcher/src/watchman/BSER.hh deleted file mode 100644 index 6bd20254..00000000 --- a/web/static/node_modules/@parcel/watcher/src/watchman/BSER.hh +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef BSER_H -#define BSER_H - -#include -#include -#include -#include -#include - -enum BSERType { - BSER_ARRAY = 0x00, - BSER_OBJECT = 0x01, - BSER_STRING = 0x02, - BSER_INT8 = 0x03, - BSER_INT16 = 0x04, - BSER_INT32 = 0x05, - BSER_INT64 = 0x06, - BSER_REAL = 0x07, - BSER_BOOL_TRUE = 0x08, - BSER_BOOL_FALSE = 0x09, - BSER_NULL = 0x0a, - BSER_TEMPLATE = 0x0b -}; - -class BSERValue; - -class BSER { -public: - typedef std::vector Array; - typedef std::unordered_map Object; - - BSER(); - BSER(BSER::Array value); - BSER(BSER::Object value); - BSER(std::string value); - BSER(const char *value); - BSER(int64_t value); - BSER(double value); - BSER(bool value); - BSER(std::istream &iss); - - BSER::Array arrayValue(); - BSER::Object objectValue(); - std::string stringValue(); - int64_t intValue(); - double doubleValue(); - bool boolValue(); - void encode(std::ostream &oss); - - static int64_t decodeLength(std::istream &iss); - std::string encode(); -private: - std::shared_ptr m_ptr; -}; - -class BSERValue { -protected: - friend class BSER; - virtual BSER::Array arrayValue() { return BSER::Array(); } - virtual BSER::Object objectValue() { return BSER::Object(); } - virtual std::string stringValue() { return std::string(); } - virtual int64_t intValue() { return 0; } - virtual double doubleValue() { return 0; } - virtual bool boolValue() { return false; } - virtual void encode(std::ostream &oss) {} - virtual ~BSERValue() {} -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/watchman/IPC.hh b/web/static/node_modules/@parcel/watcher/src/watchman/IPC.hh deleted file mode 100644 index 6e852c8d..00000000 --- a/web/static/node_modules/@parcel/watcher/src/watchman/IPC.hh +++ /dev/null @@ -1,175 +0,0 @@ -#ifndef IPC_H -#define IPC_H - -#include -#include - -#ifdef _WIN32 -#include -#include -#else -#include -#include -#include -#endif - -class IPC { -public: - IPC(std::string path) { - mStopped = false; - #ifdef _WIN32 - while (true) { - mPipe = CreateFile( - path.data(), // pipe name - GENERIC_READ | GENERIC_WRITE, // read and write access - 0, // no sharing - NULL, // default security attributes - OPEN_EXISTING, // opens existing pipe - FILE_FLAG_OVERLAPPED, // attributes - NULL // no template file - ); - - if (mPipe != INVALID_HANDLE_VALUE) { - break; - } - - if (GetLastError() != ERROR_PIPE_BUSY) { - throw std::runtime_error("Could not open pipe"); - } - - // Wait for pipe to become available if it is busy - if (!WaitNamedPipe(path.data(), 30000)) { - throw std::runtime_error("Error waiting for pipe"); - } - } - - mReader = CreateEvent(NULL, true, false, NULL); - mWriter = CreateEvent(NULL, true, false, NULL); - #else - struct sockaddr_un addr; - memset(&addr, 0, sizeof(addr)); - addr.sun_family = AF_UNIX; - strncpy(addr.sun_path, path.c_str(), sizeof(addr.sun_path) - 1); - - mSock = socket(AF_UNIX, SOCK_STREAM, 0); - if (connect(mSock, (struct sockaddr *) &addr, sizeof(struct sockaddr_un))) { - throw std::runtime_error("Error connecting to socket"); - } - #endif - } - - ~IPC() { - mStopped = true; - #ifdef _WIN32 - CancelIo(mPipe); - CloseHandle(mPipe); - CloseHandle(mReader); - CloseHandle(mWriter); - #else - shutdown(mSock, SHUT_RDWR); - #endif - } - - void write(std::string buf) { - #ifdef _WIN32 - OVERLAPPED overlapped; - overlapped.hEvent = mWriter; - bool success = WriteFile( - mPipe, // pipe handle - buf.data(), // message - buf.size(), // message length - NULL, // bytes written - &overlapped // overlapped - ); - - if (mStopped) { - return; - } - - if (!success) { - if (GetLastError() != ERROR_IO_PENDING) { - throw std::runtime_error("Write error"); - } - } - - DWORD written; - success = GetOverlappedResult(mPipe, &overlapped, &written, true); - if (!success) { - throw std::runtime_error("GetOverlappedResult failed"); - } - - if (written != buf.size()) { - throw std::runtime_error("Wrong number of bytes written"); - } - #else - int r = 0; - for (unsigned int i = 0; i != buf.size(); i += r) { - r = ::write(mSock, &buf[i], buf.size() - i); - if (r == -1) { - if (errno == EAGAIN) { - r = 0; - } else if (mStopped) { - return; - } else { - throw std::runtime_error("Write error"); - } - } - } - #endif - } - - int read(char *buf, size_t len) { - #ifdef _WIN32 - OVERLAPPED overlapped; - overlapped.hEvent = mReader; - bool success = ReadFile( - mPipe, // pipe handle - buf, // buffer to receive reply - len, // size of buffer - NULL, // number of bytes read - &overlapped // overlapped - ); - - if (!success && !mStopped) { - if (GetLastError() != ERROR_IO_PENDING) { - throw std::runtime_error("Read error"); - } - } - - DWORD read = 0; - success = GetOverlappedResult(mPipe, &overlapped, &read, true); - if (!success && !mStopped) { - throw std::runtime_error("GetOverlappedResult failed"); - } - - return read; - #else - int r = ::read(mSock, buf, len); - if (r == 0 && !mStopped) { - throw std::runtime_error("Socket ended unexpectedly"); - } - - if (r < 0) { - if (mStopped) { - return 0; - } - - throw std::runtime_error(strerror(errno)); - } - - return r; - #endif - } - -private: - bool mStopped; - #ifdef _WIN32 - HANDLE mPipe; - HANDLE mReader; - HANDLE mWriter; - #else - int mSock; - #endif -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/watchman/WatchmanBackend.cc b/web/static/node_modules/@parcel/watcher/src/watchman/WatchmanBackend.cc deleted file mode 100644 index 82a23f52..00000000 --- a/web/static/node_modules/@parcel/watcher/src/watchman/WatchmanBackend.cc +++ /dev/null @@ -1,338 +0,0 @@ -#include -#include -#include -#include -#include "../DirTree.hh" -#include "../Event.hh" -#include "./BSER.hh" -#include "./WatchmanBackend.hh" - -#ifdef _WIN32 -#include "../windows/win_utils.hh" -#define S_ISDIR(mode) ((mode & _S_IFDIR) == _S_IFDIR) -#define popen _popen -#define pclose _pclose -#else -#include -#define normalizePath(dir) dir -#endif - -template -BSER readBSER(T &&do_read) { - std::stringstream oss; - char buffer[256]; - int r; - int64_t len = -1; - do { - // Start by reading a minimal amount of data in order to decode the length. - // After that, attempt to read the remaining length, up to the buffer size. - r = do_read(buffer, len == -1 ? 20 : (len < 256 ? len : 256)); - oss << std::string(buffer, r); - - if (len == -1) { - uint64_t l = BSER::decodeLength(oss); - len = l + oss.tellg(); - } - - len -= r; - } while (len > 0); - - return BSER(oss); -} - -std::string getSockPath() { - auto var = getenv("WATCHMAN_SOCK"); - if (var && *var) { - return std::string(var); - } - - FILE *fp = popen("watchman --output-encoding=bser get-sockname", "r"); - if (fp == NULL || errno == ECHILD) { - throw std::runtime_error("Failed to execute watchman"); - } - - BSER b = readBSER([fp] (char *buf, size_t len) { - return fread(buf, sizeof(char), len, fp); - }); - - pclose(fp); - - auto objValue = b.objectValue(); - auto foundSockname = objValue.find("sockname"); - if (foundSockname == objValue.end()) { - throw std::runtime_error("sockname not found"); - } - return foundSockname->second.stringValue(); -} - -std::unique_ptr watchmanConnect() { - std::string path = getSockPath(); - return std::unique_ptr(new IPC(path)); -} - -BSER watchmanRead(IPC *ipc) { - return readBSER([ipc] (char *buf, size_t len) { - return ipc->read(buf, len); - }); -} - -BSER::Object WatchmanBackend::watchmanRequest(BSER b) { - std::string cmd = b.encode(); - mIPC->write(cmd); - mRequestSignal.notify(); - - mResponseSignal.wait(); - mResponseSignal.reset(); - - if (!mError.empty()) { - std::runtime_error err = std::runtime_error(mError); - mError = std::string(); - throw err; - } - - return mResponse; -} - -void WatchmanBackend::watchmanWatch(std::string dir) { - std::vector cmd; - cmd.push_back("watch"); - cmd.push_back(normalizePath(dir)); - watchmanRequest(cmd); -} - -bool WatchmanBackend::checkAvailable() { - try { - watchmanConnect(); - return true; - } catch (std::exception &err) { - return false; - } -} - -void handleFiles(WatcherRef watcher, BSER::Object obj) { - auto found = obj.find("files"); - if (found == obj.end()) { - throw WatcherError("Error reading changes from watchman", watcher); - } - - auto files = found->second.arrayValue(); - for (auto it = files.begin(); it != files.end(); it++) { - auto file = it->objectValue(); - auto name = file.find("name")->second.stringValue(); - #ifdef _WIN32 - std::replace(name.begin(), name.end(), '/', '\\'); - #endif - auto mode = file.find("mode")->second.intValue(); - auto isNew = file.find("new")->second.boolValue(); - auto exists = file.find("exists")->second.boolValue(); - auto path = watcher->mDir + DIR_SEP + name; - if (watcher->isIgnored(path)) { - continue; - } - - if (isNew && exists) { - watcher->mEvents.create(path); - } else if (exists && !S_ISDIR(mode)) { - watcher->mEvents.update(path); - } else if (!isNew && !exists) { - watcher->mEvents.remove(path); - } - } -} - -void WatchmanBackend::handleSubscription(BSER::Object obj) { - std::unique_lock lock(mMutex); - auto subscription = obj.find("subscription")->second.stringValue(); - auto it = mSubscriptions.find(subscription); - if (it == mSubscriptions.end()) { - return; - } - - auto watcher = it->second; - try { - handleFiles(watcher, obj); - watcher->notify(); - } catch (WatcherError &err) { - handleWatcherError(err); - } -} - -void WatchmanBackend::start() { - mIPC = watchmanConnect(); - notifyStarted(); - - while (true) { - // If there are no subscriptions we are reading, wait for a request. - if (mSubscriptions.size() == 0) { - mRequestSignal.wait(); - mRequestSignal.reset(); - } - - // Break out of loop if we are stopped. - if (mStopped) { - break; - } - - // Attempt to read from the socket. - // If there is an error and we are stopped, break. - BSER b; - try { - b = watchmanRead(&*mIPC); - } catch (std::exception &err) { - if (mStopped) { - break; - } else if (mResponseSignal.isWaiting()) { - mError = err.what(); - mResponseSignal.notify(); - } else { - // Throwing causes the backend to be destroyed, but we never reach the code below to notify the signal - mEndedSignal.notify(); - throw; - } - } - - auto obj = b.objectValue(); - auto error = obj.find("error"); - if (error != obj.end()) { - mError = error->second.stringValue(); - mResponseSignal.notify(); - continue; - } - - // If this message is for a subscription, handle it, otherwise notify the request. - auto subscription = obj.find("subscription"); - if (subscription != obj.end()) { - handleSubscription(obj); - } else { - mResponse = obj; - mResponseSignal.notify(); - } - } - - mEndedSignal.notify(); -} - -WatchmanBackend::~WatchmanBackend() { - // Mark the watcher as stopped, close the socket, and trigger the lock. - // This will cause the read loop to be broken and the thread to exit. - mStopped = true; - mIPC.reset(); - mRequestSignal.notify(); - - // If not ended yet, wait. - mEndedSignal.wait(); -} - -std::string WatchmanBackend::clock(WatcherRef watcher) { - BSER::Array cmd; - cmd.push_back("clock"); - cmd.push_back(normalizePath(watcher->mDir)); - - BSER::Object obj = watchmanRequest(cmd); - auto found = obj.find("clock"); - if (found == obj.end()) { - throw WatcherError("Error reading clock from watchman", watcher); - } - - return found->second.stringValue(); -} - -void WatchmanBackend::writeSnapshot(WatcherRef watcher, std::string *snapshotPath) { - std::unique_lock lock(mMutex); - watchmanWatch(watcher->mDir); - - std::ofstream ofs(*snapshotPath); - ofs << clock(watcher); -} - -void WatchmanBackend::getEventsSince(WatcherRef watcher, std::string *snapshotPath) { - std::unique_lock lock(mMutex); - std::ifstream ifs(*snapshotPath); - if (ifs.fail()) { - return; - } - - watchmanWatch(watcher->mDir); - - std::string clock; - ifs >> clock; - - BSER::Array cmd; - cmd.push_back("since"); - cmd.push_back(normalizePath(watcher->mDir)); - cmd.push_back(clock); - - BSER::Object obj = watchmanRequest(cmd); - handleFiles(watcher, obj); -} - -std::string getId(WatcherRef watcher) { - std::ostringstream id; - id << "parcel-"; - id << static_cast(watcher.get()); - return id.str(); -} - -// This function is called by Backend::watch which takes a lock on mMutex -void WatchmanBackend::subscribe(WatcherRef watcher) { - watchmanWatch(watcher->mDir); - - std::string id = getId(watcher); - BSER::Array cmd; - cmd.push_back("subscribe"); - cmd.push_back(normalizePath(watcher->mDir)); - cmd.push_back(id); - - BSER::Array fields; - fields.push_back("name"); - fields.push_back("mode"); - fields.push_back("exists"); - fields.push_back("new"); - - BSER::Object opts; - opts.emplace("fields", fields); - opts.emplace("since", clock(watcher)); - - if (watcher->mIgnorePaths.size() > 0) { - BSER::Array ignore; - BSER::Array anyOf; - anyOf.push_back("anyof"); - - for (auto it = watcher->mIgnorePaths.begin(); it != watcher->mIgnorePaths.end(); it++) { - std::string pathStart = watcher->mDir + DIR_SEP; - if (it->rfind(pathStart, 0) == 0) { - auto relative = it->substr(pathStart.size()); - BSER::Array dirname; - dirname.push_back("dirname"); - dirname.push_back(relative); - anyOf.push_back(dirname); - } - } - - ignore.push_back("not"); - ignore.push_back(anyOf); - - opts.emplace("expression", ignore); - } - - cmd.push_back(opts); - watchmanRequest(cmd); - - mSubscriptions.emplace(id, watcher); - mRequestSignal.notify(); -} - -// This function is called by Backend::unwatch which takes a lock on mMutex -void WatchmanBackend::unsubscribe(WatcherRef watcher) { - std::string id = getId(watcher); - auto erased = mSubscriptions.erase(id); - - if (erased) { - BSER::Array cmd; - cmd.push_back("unsubscribe"); - cmd.push_back(normalizePath(watcher->mDir)); - cmd.push_back(id); - - watchmanRequest(cmd); - } -} diff --git a/web/static/node_modules/@parcel/watcher/src/watchman/WatchmanBackend.hh b/web/static/node_modules/@parcel/watcher/src/watchman/WatchmanBackend.hh deleted file mode 100644 index 699cded9..00000000 --- a/web/static/node_modules/@parcel/watcher/src/watchman/WatchmanBackend.hh +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef WATCHMAN_H -#define WATCHMAN_H - -#include "../Backend.hh" -#include "./BSER.hh" -#include "../Signal.hh" -#include "./IPC.hh" - -class WatchmanBackend : public Backend { -public: - static bool checkAvailable(); - void start() override; - WatchmanBackend() : mStopped(false) {}; - ~WatchmanBackend(); - void writeSnapshot(WatcherRef watcher, std::string *snapshotPath) override; - void getEventsSince(WatcherRef watcher, std::string *snapshotPath) override; - void subscribe(WatcherRef watcher) override; - void unsubscribe(WatcherRef watcher) override; -private: - std::unique_ptr mIPC; - Signal mRequestSignal; - Signal mResponseSignal; - BSER::Object mResponse; - std::string mError; - std::unordered_map mSubscriptions; - bool mStopped; - Signal mEndedSignal; - - std::string clock(WatcherRef watcher); - void watchmanWatch(std::string dir); - BSER::Object watchmanRequest(BSER cmd); - void handleSubscription(BSER::Object obj); -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/windows/WindowsBackend.cc b/web/static/node_modules/@parcel/watcher/src/windows/WindowsBackend.cc deleted file mode 100644 index eabce1e0..00000000 --- a/web/static/node_modules/@parcel/watcher/src/windows/WindowsBackend.cc +++ /dev/null @@ -1,282 +0,0 @@ -#include -#include -#include "../DirTree.hh" -#include "../shared/BruteForceBackend.hh" -#include "./WindowsBackend.hh" -#include "./win_utils.hh" - -#define DEFAULT_BUF_SIZE 1024 * 1024 -#define NETWORK_BUF_SIZE 64 * 1024 -#define CONVERT_TIME(ft) ULARGE_INTEGER{ft.dwLowDateTime, ft.dwHighDateTime}.QuadPart - -void BruteForceBackend::readTree(WatcherRef watcher, std::shared_ptr tree) { - std::stack directories; - - directories.push(watcher->mDir); - - while (!directories.empty()) { - HANDLE hFind = INVALID_HANDLE_VALUE; - - std::string path = directories.top(); - std::string spec = path + "\\*"; - directories.pop(); - - WIN32_FIND_DATA ffd; - hFind = FindFirstFile(spec.c_str(), &ffd); - - if (hFind == INVALID_HANDLE_VALUE) { - if (path == watcher->mDir) { - FindClose(hFind); - throw WatcherError("Error opening directory", watcher); - } - - tree->remove(path); - continue; - } - - do { - if (strcmp(ffd.cFileName, ".") != 0 && strcmp(ffd.cFileName, "..") != 0) { - std::string fullPath = path + "\\" + ffd.cFileName; - if (watcher->isIgnored(fullPath)) { - continue; - } - - tree->add(fullPath, CONVERT_TIME(ffd.ftLastWriteTime), ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); - if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - directories.push(fullPath); - } - } - } while (FindNextFile(hFind, &ffd) != 0); - - FindClose(hFind); - } -} - -void WindowsBackend::start() { - mRunning = true; - notifyStarted(); - - while (mRunning) { - SleepEx(INFINITE, true); - } -} - -WindowsBackend::~WindowsBackend() { - // Mark as stopped, and queue a noop function in the thread to break the loop - mRunning = false; - QueueUserAPC([](__in ULONG_PTR) {}, mThread.native_handle(), (ULONG_PTR)this); -} - -class Subscription: public WatcherState { -public: - Subscription(WindowsBackend *backend, WatcherRef watcher, std::shared_ptr tree) { - mRunning = true; - mBackend = backend; - mWatcher = watcher; - mTree = tree; - ZeroMemory(&mOverlapped, sizeof(OVERLAPPED)); - mOverlapped.hEvent = this; - mReadBuffer.resize(DEFAULT_BUF_SIZE); - mWriteBuffer.resize(DEFAULT_BUF_SIZE); - - mDirectoryHandle = CreateFileW( - utf8ToUtf16(watcher->mDir).data(), - FILE_LIST_DIRECTORY, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, - OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, - NULL - ); - - if (mDirectoryHandle == INVALID_HANDLE_VALUE) { - throw WatcherError("Invalid handle", mWatcher); - } - - // Ensure that the path is a directory - BY_HANDLE_FILE_INFORMATION info; - bool success = GetFileInformationByHandle( - mDirectoryHandle, - &info - ); - - if (!success) { - throw WatcherError("Could not get file information", mWatcher); - } - - if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - throw WatcherError("Not a directory", mWatcher); - } - } - - virtual ~Subscription() { - stop(); - } - - void run() { - try { - poll(); - } catch (WatcherError &err) { - mBackend->handleWatcherError(err); - } - } - - void stop() { - if (mRunning) { - mRunning = false; - CancelIo(mDirectoryHandle); - CloseHandle(mDirectoryHandle); - } - } - - void poll() { - if (!mRunning) { - return; - } - - // Asynchronously wait for changes. - int success = ReadDirectoryChangesW( - mDirectoryHandle, - mWriteBuffer.data(), - static_cast(mWriteBuffer.size()), - TRUE, // recursive - FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES - | FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_LAST_WRITE, - NULL, - &mOverlapped, - [](DWORD errorCode, DWORD numBytes, LPOVERLAPPED overlapped) { - auto subscription = reinterpret_cast(overlapped->hEvent); - try { - subscription->processEvents(errorCode); - } catch (WatcherError &err) { - subscription->mBackend->handleWatcherError(err); - } - } - ); - - if (!success) { - throw WatcherError("Failed to read changes", mWatcher); - } - } - - void processEvents(DWORD errorCode) { - if (!mRunning) { - return; - } - - switch (errorCode) { - case ERROR_OPERATION_ABORTED: - return; - case ERROR_INVALID_PARAMETER: - // resize buffers to network size (64kb), and try again - mReadBuffer.resize(NETWORK_BUF_SIZE); - mWriteBuffer.resize(NETWORK_BUF_SIZE); - poll(); - return; - case ERROR_NOTIFY_ENUM_DIR: - throw WatcherError("Buffer overflow. Some events may have been lost.", mWatcher); - case ERROR_ACCESS_DENIED: { - // This can happen if the watched directory is deleted. Check if that is the case, - // and if so emit a delete event. Otherwise, fall through to default error case. - DWORD attrs = GetFileAttributesW(utf8ToUtf16(mWatcher->mDir).data()); - bool isDir = attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY); - if (!isDir) { - mWatcher->mEvents.remove(mWatcher->mDir); - mTree->remove(mWatcher->mDir); - mWatcher->notify(); - stop(); - return; - } - } - default: - if (errorCode != ERROR_SUCCESS) { - throw WatcherError("Unknown error", mWatcher); - } - } - - // Swap read and write buffers, and poll again - std::swap(mWriteBuffer, mReadBuffer); - poll(); - - // Read change events - BYTE *base = mReadBuffer.data(); - while (true) { - PFILE_NOTIFY_INFORMATION info = (PFILE_NOTIFY_INFORMATION)base; - processEvent(info); - - if (info->NextEntryOffset == 0) { - break; - } - - base += info->NextEntryOffset; - } - - mWatcher->notify(); - } - - void processEvent(PFILE_NOTIFY_INFORMATION info) { - std::string path = mWatcher->mDir + "\\" + utf16ToUtf8(info->FileName, info->FileNameLength / sizeof(WCHAR)); - if (mWatcher->isIgnored(path)) { - return; - } - - switch (info->Action) { - case FILE_ACTION_ADDED: - case FILE_ACTION_RENAMED_NEW_NAME: { - WIN32_FILE_ATTRIBUTE_DATA data; - if (GetFileAttributesExW(utf8ToUtf16(path).data(), GetFileExInfoStandard, &data)) { - mWatcher->mEvents.create(path); - mTree->add(path, CONVERT_TIME(data.ftLastWriteTime), data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); - } - break; - } - case FILE_ACTION_MODIFIED: { - WIN32_FILE_ATTRIBUTE_DATA data; - if (GetFileAttributesExW(utf8ToUtf16(path).data(), GetFileExInfoStandard, &data)) { - mTree->update(path, CONVERT_TIME(data.ftLastWriteTime)); - if (!(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - mWatcher->mEvents.update(path); - } - } - break; - } - case FILE_ACTION_REMOVED: - case FILE_ACTION_RENAMED_OLD_NAME: - mWatcher->mEvents.remove(path); - mTree->remove(path); - break; - } - } - -private: - WindowsBackend *mBackend; - std::shared_ptr mWatcher; - std::shared_ptr mTree; - bool mRunning; - HANDLE mDirectoryHandle; - std::vector mReadBuffer; - std::vector mWriteBuffer; - OVERLAPPED mOverlapped; -}; - -// This function is called by Backend::watch which takes a lock on mMutex -void WindowsBackend::subscribe(WatcherRef watcher) { - // Create a subscription for this watcher - auto sub = std::make_shared(this, watcher, getTree(watcher, false)); - watcher->state = sub; - - // Queue polling for this subscription in the correct thread. - bool success = QueueUserAPC([](__in ULONG_PTR ptr) { - Subscription *sub = (Subscription *)ptr; - sub->run(); - }, mThread.native_handle(), (ULONG_PTR)sub.get()); - - if (!success) { - throw std::runtime_error("Unable to queue APC"); - } -} - -// This function is called by Backend::unwatch which takes a lock on mMutex -void WindowsBackend::unsubscribe(WatcherRef watcher) { - watcher->state = nullptr; -} diff --git a/web/static/node_modules/@parcel/watcher/src/windows/WindowsBackend.hh b/web/static/node_modules/@parcel/watcher/src/windows/WindowsBackend.hh deleted file mode 100644 index d6797828..00000000 --- a/web/static/node_modules/@parcel/watcher/src/windows/WindowsBackend.hh +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef WINDOWS_H -#define WINDOWS_H - -#include -#include -#include "../shared/BruteForceBackend.hh" - -class WindowsBackend : public BruteForceBackend { -public: - void start() override; - ~WindowsBackend(); - void subscribe(WatcherRef watcher) override; - void unsubscribe(WatcherRef watcher) override; -private: - bool mRunning; -}; - -#endif diff --git a/web/static/node_modules/@parcel/watcher/src/windows/win_utils.cc b/web/static/node_modules/@parcel/watcher/src/windows/win_utils.cc deleted file mode 100644 index 986690ff..00000000 --- a/web/static/node_modules/@parcel/watcher/src/windows/win_utils.cc +++ /dev/null @@ -1,44 +0,0 @@ -#include "./win_utils.hh" - -std::wstring utf8ToUtf16(std::string input) { - unsigned int len = MultiByteToWideChar(CP_UTF8, 0, input.c_str(), -1, NULL, 0); - WCHAR *output = new WCHAR[len]; - MultiByteToWideChar(CP_UTF8, 0, input.c_str(), -1, output, len); - std::wstring res(output); - delete output; - return res; -} - -std::string utf16ToUtf8(const WCHAR *input, size_t length) { - unsigned int len = WideCharToMultiByte(CP_UTF8, 0, input, length, NULL, 0, NULL, NULL); - char *output = new char[len + 1]; - WideCharToMultiByte(CP_UTF8, 0, input, length, output, len, NULL, NULL); - output[len] = '\0'; - std::string res(output); - delete output; - return res; -} - -std::string normalizePath(std::string path) { - // Prevent truncation to MAX_PATH characters by adding the \\?\ prefix - std::wstring p = utf8ToUtf16("\\\\?\\" + path); - - // Get the required length for the output - unsigned int len = GetLongPathNameW(p.data(), NULL, 0); - if (!len) { - return path; - } - - // Allocate output array and get long path - WCHAR *output = new WCHAR[len]; - len = GetLongPathNameW(p.data(), output, len); - if (!len) { - delete output; - return path; - } - - // Convert back to utf8 - std::string res = utf16ToUtf8(output + 4, len - 4); - delete output; - return res; -} diff --git a/web/static/node_modules/@parcel/watcher/src/windows/win_utils.hh b/web/static/node_modules/@parcel/watcher/src/windows/win_utils.hh deleted file mode 100644 index 23134934..00000000 --- a/web/static/node_modules/@parcel/watcher/src/windows/win_utils.hh +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef WIN_UTILS_H -#define WIN_UTILS_H - -#include -#include - -std::wstring utf8ToUtf16(std::string input); -std::string utf16ToUtf8(const WCHAR *input, size_t length); -std::string normalizePath(std::string path); - -#endif diff --git a/web/static/node_modules/@parcel/watcher/wrapper.js b/web/static/node_modules/@parcel/watcher/wrapper.js deleted file mode 100644 index 496d56bc..00000000 --- a/web/static/node_modules/@parcel/watcher/wrapper.js +++ /dev/null @@ -1,77 +0,0 @@ -const path = require('path'); -const micromatch = require('micromatch'); -const isGlob = require('is-glob'); - -function normalizeOptions(dir, opts = {}) { - const { ignore, ...rest } = opts; - - if (Array.isArray(ignore)) { - opts = { ...rest }; - - for (const value of ignore) { - if (isGlob(value)) { - if (!opts.ignoreGlobs) { - opts.ignoreGlobs = []; - } - - const regex = micromatch.makeRe(value, { - // We set `dot: true` to workaround an issue with the - // regular expression on Linux where the resulting - // negative lookahead `(?!(\\/|^)` was never matching - // in some cases. See also https://bit.ly/3UZlQDm - dot: true, - // C++ does not support lookbehind regex patterns, they - // were only added later to JavaScript engines - // (https://bit.ly/3V7S6UL) - lookbehinds: false - }); - opts.ignoreGlobs.push(regex.source); - } else { - if (!opts.ignorePaths) { - opts.ignorePaths = []; - } - - opts.ignorePaths.push(path.resolve(dir, value)); - } - } - } - - return opts; -} - -exports.createWrapper = (binding) => { - return { - writeSnapshot(dir, snapshot, opts) { - return binding.writeSnapshot( - path.resolve(dir), - path.resolve(snapshot), - normalizeOptions(dir, opts), - ); - }, - getEventsSince(dir, snapshot, opts) { - return binding.getEventsSince( - path.resolve(dir), - path.resolve(snapshot), - normalizeOptions(dir, opts), - ); - }, - async subscribe(dir, fn, opts) { - dir = path.resolve(dir); - opts = normalizeOptions(dir, opts); - await binding.subscribe(dir, fn, opts); - - return { - unsubscribe() { - return binding.unsubscribe(dir, fn, opts); - }, - }; - }, - unsubscribe(dir, fn, opts) { - return binding.unsubscribe( - path.resolve(dir), - fn, - normalizeOptions(dir, opts), - ); - } - }; -}; diff --git a/web/static/node_modules/@types/eslint-scope/LICENSE b/web/static/node_modules/@types/eslint-scope/LICENSE deleted file mode 100644 index 9e841e7a..00000000 --- a/web/static/node_modules/@types/eslint-scope/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/web/static/node_modules/@types/eslint-scope/README.md b/web/static/node_modules/@types/eslint-scope/README.md deleted file mode 100644 index cae6d8b2..00000000 --- a/web/static/node_modules/@types/eslint-scope/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# Installation -> `npm install --save @types/eslint-scope` - -# Summary -This package contains type definitions for eslint-scope (https://github.com/eslint/eslint-scope). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-scope. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-scope/index.d.ts) -````ts -import * as eslint from "eslint"; -import * as estree from "estree"; - -export const version: string; - -export class ScopeManager implements eslint.Scope.ScopeManager { - scopes: Scope[]; - globalScope: Scope; - acquire(node: {}, inner?: boolean): Scope | null; - getDeclaredVariables(node: {}): Variable[]; -} - -export class Scope implements eslint.Scope.Scope { - type: - | "block" - | "catch" - | "class" - | "for" - | "function" - | "function-expression-name" - | "global" - | "module" - | "switch" - | "with" - | "TDZ"; - isStrict: boolean; - upper: Scope | null; - childScopes: Scope[]; - variableScope: Scope; - block: estree.Node; - variables: Variable[]; - set: Map; - references: Reference[]; - through: Reference[]; - functionExpressionScope: boolean; -} - -export class Variable implements eslint.Scope.Variable { - name: string; - scope: Scope; - identifiers: estree.Identifier[]; - references: Reference[]; - defs: eslint.Scope.Definition[]; -} - -export class Reference implements eslint.Scope.Reference { - identifier: estree.Identifier; - from: Scope; - resolved: Variable | null; - writeExpr: estree.Node | null; - init: boolean; - - isWrite(): boolean; - isRead(): boolean; - isWriteOnly(): boolean; - isReadOnly(): boolean; - isReadWrite(): boolean; -} - -export interface AnalysisOptions { - optimistic?: boolean; - directive?: boolean; - ignoreEval?: boolean; - nodejsScope?: boolean; - impliedStrict?: boolean; - fallback?: string | ((node: {}) => string[]); - sourceType?: "script" | "module"; - ecmaVersion?: number; -} - -export function analyze(ast: {}, options?: AnalysisOptions): ScopeManager; - -```` - -### Additional Details - * Last updated: Mon, 06 Nov 2023 22:41:05 GMT - * Dependencies: [@types/eslint](https://npmjs.com/package/@types/eslint), [@types/estree](https://npmjs.com/package/@types/estree) - -# Credits -These definitions were written by [Toru Nagashima](https://github.com/mysticatea). diff --git a/web/static/node_modules/@types/eslint-scope/index.d.ts b/web/static/node_modules/@types/eslint-scope/index.d.ts deleted file mode 100644 index 96e3fb37..00000000 --- a/web/static/node_modules/@types/eslint-scope/index.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import * as eslint from "eslint"; -import * as estree from "estree"; - -export const version: string; - -export class ScopeManager implements eslint.Scope.ScopeManager { - scopes: Scope[]; - globalScope: Scope; - acquire(node: {}, inner?: boolean): Scope | null; - getDeclaredVariables(node: {}): Variable[]; -} - -export class Scope implements eslint.Scope.Scope { - type: - | "block" - | "catch" - | "class" - | "for" - | "function" - | "function-expression-name" - | "global" - | "module" - | "switch" - | "with" - | "TDZ"; - isStrict: boolean; - upper: Scope | null; - childScopes: Scope[]; - variableScope: Scope; - block: estree.Node; - variables: Variable[]; - set: Map; - references: Reference[]; - through: Reference[]; - functionExpressionScope: boolean; -} - -export class Variable implements eslint.Scope.Variable { - name: string; - scope: Scope; - identifiers: estree.Identifier[]; - references: Reference[]; - defs: eslint.Scope.Definition[]; -} - -export class Reference implements eslint.Scope.Reference { - identifier: estree.Identifier; - from: Scope; - resolved: Variable | null; - writeExpr: estree.Node | null; - init: boolean; - - isWrite(): boolean; - isRead(): boolean; - isWriteOnly(): boolean; - isReadOnly(): boolean; - isReadWrite(): boolean; -} - -export interface AnalysisOptions { - optimistic?: boolean; - directive?: boolean; - ignoreEval?: boolean; - nodejsScope?: boolean; - impliedStrict?: boolean; - fallback?: string | ((node: {}) => string[]); - sourceType?: "script" | "module"; - ecmaVersion?: number; -} - -export function analyze(ast: {}, options?: AnalysisOptions): ScopeManager; diff --git a/web/static/node_modules/@types/eslint-scope/package.json b/web/static/node_modules/@types/eslint-scope/package.json deleted file mode 100644 index 4dabc9ba..00000000 --- a/web/static/node_modules/@types/eslint-scope/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "@types/eslint-scope", - "version": "3.7.7", - "description": "TypeScript definitions for eslint-scope", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-scope", - "license": "MIT", - "contributors": [ - { - "name": "Toru Nagashima", - "githubUsername": "mysticatea", - "url": "https://github.com/mysticatea" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/eslint-scope" - }, - "scripts": {}, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - }, - "typesPublisherContentHash": "49eee35b78c19e2c83bc96ce190c7a88329006f876dd7f1fb378c1e8034fc8f2", - "typeScriptVersion": "4.5" -} \ No newline at end of file diff --git a/web/static/node_modules/@types/eslint/LICENSE b/web/static/node_modules/@types/eslint/LICENSE deleted file mode 100644 index 9e841e7a..00000000 --- a/web/static/node_modules/@types/eslint/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/web/static/node_modules/@types/eslint/README.md b/web/static/node_modules/@types/eslint/README.md deleted file mode 100644 index 4757ca94..00000000 --- a/web/static/node_modules/@types/eslint/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/eslint` - -# Summary -This package contains type definitions for eslint (https://eslint.org). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint. - -### Additional Details - * Last updated: Mon, 26 Aug 2024 07:08:02 GMT - * Dependencies: [@types/estree](https://npmjs.com/package/@types/estree), [@types/json-schema](https://npmjs.com/package/@types/json-schema) - -# Credits -These definitions were written by [Pierre-Marie Dartus](https://github.com/pmdartus), [Jed Fox](https://github.com/j-f1), [Saad Quadri](https://github.com/saadq), [Jason Kwok](https://github.com/JasonHK), [Brad Zacher](https://github.com/bradzacher), [JounQin](https://github.com/JounQin), and [Bryan Mishkin](https://github.com/bmish). diff --git a/web/static/node_modules/@types/eslint/index.d.ts b/web/static/node_modules/@types/eslint/index.d.ts deleted file mode 100644 index 76dab774..00000000 --- a/web/static/node_modules/@types/eslint/index.d.ts +++ /dev/null @@ -1,1596 +0,0 @@ -import * as ESTree from "estree"; -import { JSONSchema4 } from "json-schema"; -import { LegacyESLint } from "./use-at-your-own-risk"; - -export namespace AST { - type TokenType = - | "Boolean" - | "Null" - | "Identifier" - | "Keyword" - | "Punctuator" - | "JSXIdentifier" - | "JSXText" - | "Numeric" - | "String" - | "RegularExpression"; - - interface Token { - type: TokenType; - value: string; - range: Range; - loc: SourceLocation; - } - - interface SourceLocation { - start: ESTree.Position; - end: ESTree.Position; - } - - type Range = [number, number]; - - interface Program extends ESTree.Program { - comments: ESTree.Comment[]; - tokens: Token[]; - loc: SourceLocation; - range: Range; - } -} - -export namespace Scope { - interface ScopeManager { - scopes: Scope[]; - globalScope: Scope | null; - - acquire(node: ESTree.Node, inner?: boolean): Scope | null; - - getDeclaredVariables(node: ESTree.Node): Variable[]; - } - - interface Scope { - type: - | "block" - | "catch" - | "class" - | "for" - | "function" - | "function-expression-name" - | "global" - | "module" - | "switch" - | "with" - | "TDZ"; - isStrict: boolean; - upper: Scope | null; - childScopes: Scope[]; - variableScope: Scope; - block: ESTree.Node; - variables: Variable[]; - set: Map; - references: Reference[]; - through: Reference[]; - functionExpressionScope: boolean; - } - - interface Variable { - name: string; - scope: Scope; - identifiers: ESTree.Identifier[]; - references: Reference[]; - defs: Definition[]; - } - - interface Reference { - identifier: ESTree.Identifier; - from: Scope; - resolved: Variable | null; - writeExpr: ESTree.Node | null; - init: boolean; - - isWrite(): boolean; - - isRead(): boolean; - - isWriteOnly(): boolean; - - isReadOnly(): boolean; - - isReadWrite(): boolean; - } - - type DefinitionType = - | { type: "CatchClause"; node: ESTree.CatchClause; parent: null } - | { type: "ClassName"; node: ESTree.ClassDeclaration | ESTree.ClassExpression; parent: null } - | { type: "FunctionName"; node: ESTree.FunctionDeclaration | ESTree.FunctionExpression; parent: null } - | { type: "ImplicitGlobalVariable"; node: ESTree.Program; parent: null } - | { - type: "ImportBinding"; - node: ESTree.ImportSpecifier | ESTree.ImportDefaultSpecifier | ESTree.ImportNamespaceSpecifier; - parent: ESTree.ImportDeclaration; - } - | { - type: "Parameter"; - node: ESTree.FunctionDeclaration | ESTree.FunctionExpression | ESTree.ArrowFunctionExpression; - parent: null; - } - | { type: "TDZ"; node: any; parent: null } - | { type: "Variable"; node: ESTree.VariableDeclarator; parent: ESTree.VariableDeclaration }; - - type Definition = DefinitionType & { name: ESTree.Identifier }; -} - -// #region SourceCode - -export class SourceCode { - text: string; - ast: AST.Program; - lines: string[]; - hasBOM: boolean; - parserServices: SourceCode.ParserServices; - scopeManager: Scope.ScopeManager; - visitorKeys: SourceCode.VisitorKeys; - - constructor(text: string, ast: AST.Program); - constructor(config: SourceCode.Config); - - static splitLines(text: string): string[]; - - getText(node?: ESTree.Node, beforeCount?: number, afterCount?: number): string; - - getLines(): string[]; - - getAllComments(): ESTree.Comment[]; - - getAncestors(node: ESTree.Node): ESTree.Node[]; - - getDeclaredVariables(node: ESTree.Node): Scope.Variable[]; - - getJSDocComment(node: ESTree.Node): ESTree.Comment | null; - - getNodeByRangeIndex(index: number): ESTree.Node | null; - - isSpaceBetweenTokens(first: AST.Token, second: AST.Token): boolean; - - getLocFromIndex(index: number): ESTree.Position; - - getIndexFromLoc(location: ESTree.Position): number; - - // Inherited methods from TokenStore - // --------------------------------- - - getTokenByRangeStart(offset: number, options?: { includeComments: false }): AST.Token | null; - getTokenByRangeStart(offset: number, options: { includeComments: boolean }): AST.Token | ESTree.Comment | null; - - getFirstToken: SourceCode.UnaryNodeCursorWithSkipOptions; - - getFirstTokens: SourceCode.UnaryNodeCursorWithCountOptions; - - getLastToken: SourceCode.UnaryNodeCursorWithSkipOptions; - - getLastTokens: SourceCode.UnaryNodeCursorWithCountOptions; - - getTokenBefore: SourceCode.UnaryCursorWithSkipOptions; - - getTokensBefore: SourceCode.UnaryCursorWithCountOptions; - - getTokenAfter: SourceCode.UnaryCursorWithSkipOptions; - - getTokensAfter: SourceCode.UnaryCursorWithCountOptions; - - getFirstTokenBetween: SourceCode.BinaryCursorWithSkipOptions; - - getFirstTokensBetween: SourceCode.BinaryCursorWithCountOptions; - - getLastTokenBetween: SourceCode.BinaryCursorWithSkipOptions; - - getLastTokensBetween: SourceCode.BinaryCursorWithCountOptions; - - getTokensBetween: SourceCode.BinaryCursorWithCountOptions; - - getTokens: - & ((node: ESTree.Node, beforeCount?: number, afterCount?: number) => AST.Token[]) - & SourceCode.UnaryNodeCursorWithCountOptions; - - commentsExistBetween( - left: ESTree.Node | AST.Token | ESTree.Comment, - right: ESTree.Node | AST.Token | ESTree.Comment, - ): boolean; - - getCommentsBefore(nodeOrToken: ESTree.Node | AST.Token): ESTree.Comment[]; - - getCommentsAfter(nodeOrToken: ESTree.Node | AST.Token): ESTree.Comment[]; - - getCommentsInside(node: ESTree.Node): ESTree.Comment[]; - - getScope(node: ESTree.Node): Scope.Scope; - - isSpaceBetween( - first: ESTree.Node | AST.Token, - second: ESTree.Node | AST.Token, - ): boolean; - - markVariableAsUsed(name: string, refNode?: ESTree.Node): boolean; -} - -export namespace SourceCode { - interface Config { - text: string; - ast: AST.Program; - parserServices?: ParserServices | undefined; - scopeManager?: Scope.ScopeManager | undefined; - visitorKeys?: VisitorKeys | undefined; - } - - type ParserServices = any; - - interface VisitorKeys { - [nodeType: string]: string[]; - } - - interface UnaryNodeCursorWithSkipOptions { - ( - node: ESTree.Node, - options: - | ((token: AST.Token) => token is T) - | { - filter: (token: AST.Token) => token is T; - includeComments?: false | undefined; - skip?: number | undefined; - }, - ): T | null; - ( - node: ESTree.Node, - options: { - filter: (tokenOrComment: AST.Token | ESTree.Comment) => tokenOrComment is T; - includeComments: boolean; - skip?: number | undefined; - }, - ): T | null; - ( - node: ESTree.Node, - options?: - | { - filter?: ((token: AST.Token) => boolean) | undefined; - includeComments?: false | undefined; - skip?: number | undefined; - } - | ((token: AST.Token) => boolean) - | number, - ): AST.Token | null; - ( - node: ESTree.Node, - options: { - filter?: ((token: AST.Token | ESTree.Comment) => boolean) | undefined; - includeComments: boolean; - skip?: number | undefined; - }, - ): AST.Token | ESTree.Comment | null; - } - - interface UnaryNodeCursorWithCountOptions { - ( - node: ESTree.Node, - options: - | ((token: AST.Token) => token is T) - | { - filter: (token: AST.Token) => token is T; - includeComments?: false | undefined; - count?: number | undefined; - }, - ): T[]; - ( - node: ESTree.Node, - options: { - filter: (tokenOrComment: AST.Token | ESTree.Comment) => tokenOrComment is T; - includeComments: boolean; - count?: number | undefined; - }, - ): T[]; - ( - node: ESTree.Node, - options?: - | { - filter?: ((token: AST.Token) => boolean) | undefined; - includeComments?: false | undefined; - count?: number | undefined; - } - | ((token: AST.Token) => boolean) - | number, - ): AST.Token[]; - ( - node: ESTree.Node, - options: { - filter?: ((token: AST.Token | ESTree.Comment) => boolean) | undefined; - includeComments: boolean; - count?: number | undefined; - }, - ): Array; - } - - interface UnaryCursorWithSkipOptions { - ( - node: ESTree.Node | AST.Token | ESTree.Comment, - options: - | ((token: AST.Token) => token is T) - | { - filter: (token: AST.Token) => token is T; - includeComments?: false | undefined; - skip?: number | undefined; - }, - ): T | null; - ( - node: ESTree.Node | AST.Token | ESTree.Comment, - options: { - filter: (tokenOrComment: AST.Token | ESTree.Comment) => tokenOrComment is T; - includeComments: boolean; - skip?: number | undefined; - }, - ): T | null; - ( - node: ESTree.Node | AST.Token | ESTree.Comment, - options?: - | { - filter?: ((token: AST.Token) => boolean) | undefined; - includeComments?: false | undefined; - skip?: number | undefined; - } - | ((token: AST.Token) => boolean) - | number, - ): AST.Token | null; - ( - node: ESTree.Node | AST.Token | ESTree.Comment, - options: { - filter?: ((token: AST.Token | ESTree.Comment) => boolean) | undefined; - includeComments: boolean; - skip?: number | undefined; - }, - ): AST.Token | ESTree.Comment | null; - } - - interface UnaryCursorWithCountOptions { - ( - node: ESTree.Node | AST.Token | ESTree.Comment, - options: - | ((token: AST.Token) => token is T) - | { - filter: (token: AST.Token) => token is T; - includeComments?: false | undefined; - count?: number | undefined; - }, - ): T[]; - ( - node: ESTree.Node | AST.Token | ESTree.Comment, - options: { - filter: (tokenOrComment: AST.Token | ESTree.Comment) => tokenOrComment is T; - includeComments: boolean; - count?: number | undefined; - }, - ): T[]; - ( - node: ESTree.Node | AST.Token | ESTree.Comment, - options?: - | { - filter?: ((token: AST.Token) => boolean) | undefined; - includeComments?: false | undefined; - count?: number | undefined; - } - | ((token: AST.Token) => boolean) - | number, - ): AST.Token[]; - ( - node: ESTree.Node | AST.Token | ESTree.Comment, - options: { - filter?: ((token: AST.Token | ESTree.Comment) => boolean) | undefined; - includeComments: boolean; - count?: number | undefined; - }, - ): Array; - } - - interface BinaryCursorWithSkipOptions { - ( - left: ESTree.Node | AST.Token | ESTree.Comment, - right: ESTree.Node | AST.Token | ESTree.Comment, - options: - | ((token: AST.Token) => token is T) - | { - filter: (token: AST.Token) => token is T; - includeComments?: false | undefined; - skip?: number | undefined; - }, - ): T | null; - ( - left: ESTree.Node | AST.Token | ESTree.Comment, - right: ESTree.Node | AST.Token | ESTree.Comment, - options: { - filter: (tokenOrComment: AST.Token | ESTree.Comment) => tokenOrComment is T; - includeComments: boolean; - skip?: number | undefined; - }, - ): T | null; - ( - left: ESTree.Node | AST.Token | ESTree.Comment, - right: ESTree.Node | AST.Token | ESTree.Comment, - options?: - | { - filter?: ((token: AST.Token) => boolean) | undefined; - includeComments?: false | undefined; - skip?: number | undefined; - } - | ((token: AST.Token) => boolean) - | number, - ): AST.Token | null; - ( - left: ESTree.Node | AST.Token | ESTree.Comment, - right: ESTree.Node | AST.Token | ESTree.Comment, - options: { - filter?: ((token: AST.Token | ESTree.Comment) => boolean) | undefined; - includeComments: boolean; - skip?: number | undefined; - }, - ): AST.Token | ESTree.Comment | null; - } - - interface BinaryCursorWithCountOptions { - ( - left: ESTree.Node | AST.Token | ESTree.Comment, - right: ESTree.Node | AST.Token | ESTree.Comment, - options: - | ((token: AST.Token) => token is T) - | { - filter: (token: AST.Token) => token is T; - includeComments?: false | undefined; - count?: number | undefined; - }, - ): T[]; - ( - left: ESTree.Node | AST.Token | ESTree.Comment, - right: ESTree.Node | AST.Token | ESTree.Comment, - options: { - filter: (tokenOrComment: AST.Token | ESTree.Comment) => tokenOrComment is T; - includeComments: boolean; - count?: number | undefined; - }, - ): T[]; - ( - left: ESTree.Node | AST.Token | ESTree.Comment, - right: ESTree.Node | AST.Token | ESTree.Comment, - options?: - | { - filter?: ((token: AST.Token) => boolean) | undefined; - includeComments?: false | undefined; - count?: number | undefined; - } - | ((token: AST.Token) => boolean) - | number, - ): AST.Token[]; - ( - left: ESTree.Node | AST.Token | ESTree.Comment, - right: ESTree.Node | AST.Token | ESTree.Comment, - options: { - filter?: ((token: AST.Token | ESTree.Comment) => boolean) | undefined; - includeComments: boolean; - count?: number | undefined; - }, - ): Array; - } -} - -// #endregion - -export namespace Rule { - interface RuleModule { - create(context: RuleContext): RuleListener; - meta?: RuleMetaData | undefined; - } - - type NodeTypes = ESTree.Node["type"]; - interface NodeListener { - ArrayExpression?: ((node: ESTree.ArrayExpression & NodeParentExtension) => void) | undefined; - "ArrayExpression:exit"?: ((node: ESTree.ArrayExpression & NodeParentExtension) => void) | undefined; - ArrayPattern?: ((node: ESTree.ArrayPattern & NodeParentExtension) => void) | undefined; - "ArrayPattern:exit"?: ((node: ESTree.ArrayPattern & NodeParentExtension) => void) | undefined; - ArrowFunctionExpression?: ((node: ESTree.ArrowFunctionExpression & NodeParentExtension) => void) | undefined; - "ArrowFunctionExpression:exit"?: - | ((node: ESTree.ArrowFunctionExpression & NodeParentExtension) => void) - | undefined; - AssignmentExpression?: ((node: ESTree.AssignmentExpression & NodeParentExtension) => void) | undefined; - "AssignmentExpression:exit"?: ((node: ESTree.AssignmentExpression & NodeParentExtension) => void) | undefined; - AssignmentPattern?: ((node: ESTree.AssignmentPattern & NodeParentExtension) => void) | undefined; - "AssignmentPattern:exit"?: ((node: ESTree.AssignmentPattern & NodeParentExtension) => void) | undefined; - AwaitExpression?: ((node: ESTree.AwaitExpression & NodeParentExtension) => void) | undefined; - "AwaitExpression:exit"?: ((node: ESTree.AwaitExpression & NodeParentExtension) => void) | undefined; - BinaryExpression?: ((node: ESTree.BinaryExpression & NodeParentExtension) => void) | undefined; - "BinaryExpression:exit"?: ((node: ESTree.BinaryExpression & NodeParentExtension) => void) | undefined; - BlockStatement?: ((node: ESTree.BlockStatement & NodeParentExtension) => void) | undefined; - "BlockStatement:exit"?: ((node: ESTree.BlockStatement & NodeParentExtension) => void) | undefined; - BreakStatement?: ((node: ESTree.BreakStatement & NodeParentExtension) => void) | undefined; - "BreakStatement:exit"?: ((node: ESTree.BreakStatement & NodeParentExtension) => void) | undefined; - CallExpression?: ((node: ESTree.CallExpression & NodeParentExtension) => void) | undefined; - "CallExpression:exit"?: ((node: ESTree.CallExpression & NodeParentExtension) => void) | undefined; - CatchClause?: ((node: ESTree.CatchClause & NodeParentExtension) => void) | undefined; - "CatchClause:exit"?: ((node: ESTree.CatchClause & NodeParentExtension) => void) | undefined; - ChainExpression?: ((node: ESTree.ChainExpression & NodeParentExtension) => void) | undefined; - "ChainExpression:exit"?: ((node: ESTree.ChainExpression & NodeParentExtension) => void) | undefined; - ClassBody?: ((node: ESTree.ClassBody & NodeParentExtension) => void) | undefined; - "ClassBody:exit"?: ((node: ESTree.ClassBody & NodeParentExtension) => void) | undefined; - ClassDeclaration?: ((node: ESTree.ClassDeclaration & NodeParentExtension) => void) | undefined; - "ClassDeclaration:exit"?: ((node: ESTree.ClassDeclaration & NodeParentExtension) => void) | undefined; - ClassExpression?: ((node: ESTree.ClassExpression & NodeParentExtension) => void) | undefined; - "ClassExpression:exit"?: ((node: ESTree.ClassExpression & NodeParentExtension) => void) | undefined; - ConditionalExpression?: ((node: ESTree.ConditionalExpression & NodeParentExtension) => void) | undefined; - "ConditionalExpression:exit"?: ((node: ESTree.ConditionalExpression & NodeParentExtension) => void) | undefined; - ContinueStatement?: ((node: ESTree.ContinueStatement & NodeParentExtension) => void) | undefined; - "ContinueStatement:exit"?: ((node: ESTree.ContinueStatement & NodeParentExtension) => void) | undefined; - DebuggerStatement?: ((node: ESTree.DebuggerStatement & NodeParentExtension) => void) | undefined; - "DebuggerStatement:exit"?: ((node: ESTree.DebuggerStatement & NodeParentExtension) => void) | undefined; - DoWhileStatement?: ((node: ESTree.DoWhileStatement & NodeParentExtension) => void) | undefined; - "DoWhileStatement:exit"?: ((node: ESTree.DoWhileStatement & NodeParentExtension) => void) | undefined; - EmptyStatement?: ((node: ESTree.EmptyStatement & NodeParentExtension) => void) | undefined; - "EmptyStatement:exit"?: ((node: ESTree.EmptyStatement & NodeParentExtension) => void) | undefined; - ExportAllDeclaration?: ((node: ESTree.ExportAllDeclaration & NodeParentExtension) => void) | undefined; - "ExportAllDeclaration:exit"?: ((node: ESTree.ExportAllDeclaration & NodeParentExtension) => void) | undefined; - ExportDefaultDeclaration?: ((node: ESTree.ExportDefaultDeclaration & NodeParentExtension) => void) | undefined; - "ExportDefaultDeclaration:exit"?: - | ((node: ESTree.ExportDefaultDeclaration & NodeParentExtension) => void) - | undefined; - ExportNamedDeclaration?: ((node: ESTree.ExportNamedDeclaration & NodeParentExtension) => void) | undefined; - "ExportNamedDeclaration:exit"?: - | ((node: ESTree.ExportNamedDeclaration & NodeParentExtension) => void) - | undefined; - ExportSpecifier?: ((node: ESTree.ExportSpecifier & NodeParentExtension) => void) | undefined; - "ExportSpecifier:exit"?: ((node: ESTree.ExportSpecifier & NodeParentExtension) => void) | undefined; - ExpressionStatement?: ((node: ESTree.ExpressionStatement & NodeParentExtension) => void) | undefined; - "ExpressionStatement:exit"?: ((node: ESTree.ExpressionStatement & NodeParentExtension) => void) | undefined; - ForInStatement?: ((node: ESTree.ForInStatement & NodeParentExtension) => void) | undefined; - "ForInStatement:exit"?: ((node: ESTree.ForInStatement & NodeParentExtension) => void) | undefined; - ForOfStatement?: ((node: ESTree.ForOfStatement & NodeParentExtension) => void) | undefined; - "ForOfStatement:exit"?: ((node: ESTree.ForOfStatement & NodeParentExtension) => void) | undefined; - ForStatement?: ((node: ESTree.ForStatement & NodeParentExtension) => void) | undefined; - "ForStatement:exit"?: ((node: ESTree.ForStatement & NodeParentExtension) => void) | undefined; - FunctionDeclaration?: ((node: ESTree.FunctionDeclaration & NodeParentExtension) => void) | undefined; - "FunctionDeclaration:exit"?: ((node: ESTree.FunctionDeclaration & NodeParentExtension) => void) | undefined; - FunctionExpression?: ((node: ESTree.FunctionExpression & NodeParentExtension) => void) | undefined; - "FunctionExpression:exit"?: ((node: ESTree.FunctionExpression & NodeParentExtension) => void) | undefined; - Identifier?: ((node: ESTree.Identifier & NodeParentExtension) => void) | undefined; - "Identifier:exit"?: ((node: ESTree.Identifier & NodeParentExtension) => void) | undefined; - IfStatement?: ((node: ESTree.IfStatement & NodeParentExtension) => void) | undefined; - "IfStatement:exit"?: ((node: ESTree.IfStatement & NodeParentExtension) => void) | undefined; - ImportDeclaration?: ((node: ESTree.ImportDeclaration & NodeParentExtension) => void) | undefined; - "ImportDeclaration:exit"?: ((node: ESTree.ImportDeclaration & NodeParentExtension) => void) | undefined; - ImportDefaultSpecifier?: ((node: ESTree.ImportDefaultSpecifier & NodeParentExtension) => void) | undefined; - "ImportDefaultSpecifier:exit"?: - | ((node: ESTree.ImportDefaultSpecifier & NodeParentExtension) => void) - | undefined; - ImportExpression?: ((node: ESTree.ImportExpression & NodeParentExtension) => void) | undefined; - "ImportExpression:exit"?: ((node: ESTree.ImportExpression & NodeParentExtension) => void) | undefined; - ImportNamespaceSpecifier?: ((node: ESTree.ImportNamespaceSpecifier & NodeParentExtension) => void) | undefined; - "ImportNamespaceSpecifier:exit"?: - | ((node: ESTree.ImportNamespaceSpecifier & NodeParentExtension) => void) - | undefined; - ImportSpecifier?: ((node: ESTree.ImportSpecifier & NodeParentExtension) => void) | undefined; - "ImportSpecifier:exit"?: ((node: ESTree.ImportSpecifier & NodeParentExtension) => void) | undefined; - LabeledStatement?: ((node: ESTree.LabeledStatement & NodeParentExtension) => void) | undefined; - "LabeledStatement:exit"?: ((node: ESTree.LabeledStatement & NodeParentExtension) => void) | undefined; - Literal?: ((node: ESTree.Literal & NodeParentExtension) => void) | undefined; - "Literal:exit"?: ((node: ESTree.Literal & NodeParentExtension) => void) | undefined; - LogicalExpression?: ((node: ESTree.LogicalExpression & NodeParentExtension) => void) | undefined; - "LogicalExpression:exit"?: ((node: ESTree.LogicalExpression & NodeParentExtension) => void) | undefined; - MemberExpression?: ((node: ESTree.MemberExpression & NodeParentExtension) => void) | undefined; - "MemberExpression:exit"?: ((node: ESTree.MemberExpression & NodeParentExtension) => void) | undefined; - MetaProperty?: ((node: ESTree.MetaProperty & NodeParentExtension) => void) | undefined; - "MetaProperty:exit"?: ((node: ESTree.MetaProperty & NodeParentExtension) => void) | undefined; - MethodDefinition?: ((node: ESTree.MethodDefinition & NodeParentExtension) => void) | undefined; - "MethodDefinition:exit"?: ((node: ESTree.MethodDefinition & NodeParentExtension) => void) | undefined; - NewExpression?: ((node: ESTree.NewExpression & NodeParentExtension) => void) | undefined; - "NewExpression:exit"?: ((node: ESTree.NewExpression & NodeParentExtension) => void) | undefined; - ObjectExpression?: ((node: ESTree.ObjectExpression & NodeParentExtension) => void) | undefined; - "ObjectExpression:exit"?: ((node: ESTree.ObjectExpression & NodeParentExtension) => void) | undefined; - ObjectPattern?: ((node: ESTree.ObjectPattern & NodeParentExtension) => void) | undefined; - "ObjectPattern:exit"?: ((node: ESTree.ObjectPattern & NodeParentExtension) => void) | undefined; - PrivateIdentifier?: ((node: ESTree.PrivateIdentifier & NodeParentExtension) => void) | undefined; - "PrivateIdentifier:exit"?: ((node: ESTree.PrivateIdentifier & NodeParentExtension) => void) | undefined; - Program?: ((node: ESTree.Program) => void) | undefined; - "Program:exit"?: ((node: ESTree.Program) => void) | undefined; - Property?: ((node: ESTree.Property & NodeParentExtension) => void) | undefined; - "Property:exit"?: ((node: ESTree.Property & NodeParentExtension) => void) | undefined; - PropertyDefinition?: ((node: ESTree.PropertyDefinition & NodeParentExtension) => void) | undefined; - "PropertyDefinition:exit"?: ((node: ESTree.PropertyDefinition & NodeParentExtension) => void) | undefined; - RestElement?: ((node: ESTree.RestElement & NodeParentExtension) => void) | undefined; - "RestElement:exit"?: ((node: ESTree.RestElement & NodeParentExtension) => void) | undefined; - ReturnStatement?: ((node: ESTree.ReturnStatement & NodeParentExtension) => void) | undefined; - "ReturnStatement:exit"?: ((node: ESTree.ReturnStatement & NodeParentExtension) => void) | undefined; - SequenceExpression?: ((node: ESTree.SequenceExpression & NodeParentExtension) => void) | undefined; - "SequenceExpression:exit"?: ((node: ESTree.SequenceExpression & NodeParentExtension) => void) | undefined; - SpreadElement?: ((node: ESTree.SpreadElement & NodeParentExtension) => void) | undefined; - "SpreadElement:exit"?: ((node: ESTree.SpreadElement & NodeParentExtension) => void) | undefined; - StaticBlock?: ((node: ESTree.StaticBlock & NodeParentExtension) => void) | undefined; - "StaticBlock:exit"?: ((node: ESTree.StaticBlock & NodeParentExtension) => void) | undefined; - Super?: ((node: ESTree.Super & NodeParentExtension) => void) | undefined; - "Super:exit"?: ((node: ESTree.Super & NodeParentExtension) => void) | undefined; - SwitchCase?: ((node: ESTree.SwitchCase & NodeParentExtension) => void) | undefined; - "SwitchCase:exit"?: ((node: ESTree.SwitchCase & NodeParentExtension) => void) | undefined; - SwitchStatement?: ((node: ESTree.SwitchStatement & NodeParentExtension) => void) | undefined; - "SwitchStatement:exit"?: ((node: ESTree.SwitchStatement & NodeParentExtension) => void) | undefined; - TaggedTemplateExpression?: ((node: ESTree.TaggedTemplateExpression & NodeParentExtension) => void) | undefined; - "TaggedTemplateExpression:exit"?: - | ((node: ESTree.TaggedTemplateExpression & NodeParentExtension) => void) - | undefined; - TemplateElement?: ((node: ESTree.TemplateElement & NodeParentExtension) => void) | undefined; - "TemplateElement:exit"?: ((node: ESTree.TemplateElement & NodeParentExtension) => void) | undefined; - TemplateLiteral?: ((node: ESTree.TemplateLiteral & NodeParentExtension) => void) | undefined; - "TemplateLiteral:exit"?: ((node: ESTree.TemplateLiteral & NodeParentExtension) => void) | undefined; - ThisExpression?: ((node: ESTree.ThisExpression & NodeParentExtension) => void) | undefined; - "ThisExpression:exit"?: ((node: ESTree.ThisExpression & NodeParentExtension) => void) | undefined; - ThrowStatement?: ((node: ESTree.ThrowStatement & NodeParentExtension) => void) | undefined; - "ThrowStatement:exit"?: ((node: ESTree.ThrowStatement & NodeParentExtension) => void) | undefined; - TryStatement?: ((node: ESTree.TryStatement & NodeParentExtension) => void) | undefined; - "TryStatement:exit"?: ((node: ESTree.TryStatement & NodeParentExtension) => void) | undefined; - UnaryExpression?: ((node: ESTree.UnaryExpression & NodeParentExtension) => void) | undefined; - "UnaryExpression:exit"?: ((node: ESTree.UnaryExpression & NodeParentExtension) => void) | undefined; - UpdateExpression?: ((node: ESTree.UpdateExpression & NodeParentExtension) => void) | undefined; - "UpdateExpression:exit"?: ((node: ESTree.UpdateExpression & NodeParentExtension) => void) | undefined; - VariableDeclaration?: ((node: ESTree.VariableDeclaration & NodeParentExtension) => void) | undefined; - "VariableDeclaration:exit"?: ((node: ESTree.VariableDeclaration & NodeParentExtension) => void) | undefined; - VariableDeclarator?: ((node: ESTree.VariableDeclarator & NodeParentExtension) => void) | undefined; - "VariableDeclarator:exit"?: ((node: ESTree.VariableDeclarator & NodeParentExtension) => void) | undefined; - WhileStatement?: ((node: ESTree.WhileStatement & NodeParentExtension) => void) | undefined; - "WhileStatement:exit"?: ((node: ESTree.WhileStatement & NodeParentExtension) => void) | undefined; - WithStatement?: ((node: ESTree.WithStatement & NodeParentExtension) => void) | undefined; - "WithStatement:exit"?: ((node: ESTree.WithStatement & NodeParentExtension) => void) | undefined; - YieldExpression?: ((node: ESTree.YieldExpression & NodeParentExtension) => void) | undefined; - "YieldExpression:exit"?: ((node: ESTree.YieldExpression & NodeParentExtension) => void) | undefined; - } - - interface NodeParentExtension { - parent: Node; - } - type Node = ESTree.Node & NodeParentExtension; - - interface RuleListener extends NodeListener { - onCodePathStart?(codePath: CodePath, node: Node): void; - - onCodePathEnd?(codePath: CodePath, node: Node): void; - - onCodePathSegmentStart?(segment: CodePathSegment, node: Node): void; - - onCodePathSegmentEnd?(segment: CodePathSegment, node: Node): void; - - onCodePathSegmentLoop?(fromSegment: CodePathSegment, toSegment: CodePathSegment, node: Node): void; - - [key: string]: - | ((codePath: CodePath, node: Node) => void) - | ((segment: CodePathSegment, node: Node) => void) - | ((fromSegment: CodePathSegment, toSegment: CodePathSegment, node: Node) => void) - | ((node: Node) => void) - | NodeListener[keyof NodeListener] - | undefined; - } - - type CodePathOrigin = "program" | "function" | "class-field-initializer" | "class-static-block"; - - interface CodePath { - id: string; - origin: CodePathOrigin; - initialSegment: CodePathSegment; - finalSegments: CodePathSegment[]; - returnedSegments: CodePathSegment[]; - thrownSegments: CodePathSegment[]; - upper: CodePath | null; - childCodePaths: CodePath[]; - } - - interface CodePathSegment { - id: string; - nextSegments: CodePathSegment[]; - prevSegments: CodePathSegment[]; - reachable: boolean; - } - - interface RuleMetaData { - /** Properties often used for documentation generation and tooling. */ - docs?: { - /** Provides a short description of the rule. Commonly used when generating lists of rules. */ - description?: string | undefined; - /** Historically used by some plugins that divide rules into categories in their documentation. */ - category?: string | undefined; - /** Historically used by some plugins to indicate a rule belongs in their `recommended` configuration. */ - recommended?: boolean | undefined; - /** Specifies the URL at which the full documentation can be accessed. Code editors often use this to provide a helpful link on highlighted rule violations. */ - url?: string | undefined; - } | undefined; - /** Violation and suggestion messages. */ - messages?: { [messageId: string]: string } | undefined; - /** - * Specifies if the `--fix` option on the command line automatically fixes problems reported by the rule. - * Mandatory for fixable rules. - */ - fixable?: "code" | "whitespace" | undefined; - /** - * Specifies the [options](https://eslint.org/docs/latest/extend/custom-rules#options-schemas) - * so ESLint can prevent invalid [rule configurations](https://eslint.org/docs/latest/use/configure/rules#configuring-rules). - * Mandatory for rules with options. - */ - schema?: JSONSchema4 | JSONSchema4[] | false | undefined; - - /** Indicates whether the rule has been deprecated. Omit if not deprecated. */ - deprecated?: boolean | undefined; - /** The name of the rule(s) this rule was replaced by, if it was deprecated. */ - replacedBy?: readonly string[]; - - /** - * Indicates the type of rule: - * - `"problem"` means the rule is identifying code that either will cause an error or may cause a confusing behavior. Developers should consider this a high priority to resolve. - * - `"suggestion"` means the rule is identifying something that could be done in a better way but no errors will occur if the code isn’t changed. - * - `"layout"` means the rule cares primarily about whitespace, semicolons, commas, and parentheses, - * all the parts of the program that determine how the code looks rather than how it executes. - * These rules work on parts of the code that aren’t specified in the AST. - */ - type?: "problem" | "suggestion" | "layout" | undefined; - /** - * Specifies whether the rule can return suggestions (defaults to `false` if omitted). - * Mandatory for rules that provide suggestions. - */ - hasSuggestions?: boolean | undefined; - } - - interface RuleContext { - id: string; - options: any[]; - settings: { [name: string]: any }; - parserPath: string | undefined; - languageOptions: Linter.LanguageOptions; - parserOptions: Linter.ParserOptions; - cwd: string; - filename: string; - physicalFilename: string; - sourceCode: SourceCode; - - getAncestors(): ESTree.Node[]; - - getDeclaredVariables(node: ESTree.Node): Scope.Variable[]; - - /** @deprecated Use property `filename` directly instead */ - getFilename(): string; - - /** @deprecated Use property `physicalFilename` directly instead */ - getPhysicalFilename(): string; - - /** @deprecated Use property `cwd` directly instead */ - getCwd(): string; - - getScope(): Scope.Scope; - - /** @deprecated Use property `sourceCode` directly instead */ - getSourceCode(): SourceCode; - - markVariableAsUsed(name: string): boolean; - - report(descriptor: ReportDescriptor): void; - } - - type ReportFixer = (fixer: RuleFixer) => null | Fix | IterableIterator | Fix[]; - - interface ReportDescriptorOptionsBase { - data?: { [key: string]: string }; - - fix?: null | ReportFixer; - } - - interface SuggestionReportOptions { - data?: { [key: string]: string }; - - fix: ReportFixer; - } - - type SuggestionDescriptorMessage = { desc: string } | { messageId: string }; - type SuggestionReportDescriptor = SuggestionDescriptorMessage & SuggestionReportOptions; - - interface ReportDescriptorOptions extends ReportDescriptorOptionsBase { - suggest?: SuggestionReportDescriptor[] | null | undefined; - } - - type ReportDescriptor = ReportDescriptorMessage & ReportDescriptorLocation & ReportDescriptorOptions; - type ReportDescriptorMessage = { message: string } | { messageId: string }; - type ReportDescriptorLocation = - | { node: ESTree.Node } - | { loc: AST.SourceLocation | { line: number; column: number } }; - - interface RuleFixer { - insertTextAfter(nodeOrToken: ESTree.Node | AST.Token, text: string): Fix; - - insertTextAfterRange(range: AST.Range, text: string): Fix; - - insertTextBefore(nodeOrToken: ESTree.Node | AST.Token, text: string): Fix; - - insertTextBeforeRange(range: AST.Range, text: string): Fix; - - remove(nodeOrToken: ESTree.Node | AST.Token): Fix; - - removeRange(range: AST.Range): Fix; - - replaceText(nodeOrToken: ESTree.Node | AST.Token, text: string): Fix; - - replaceTextRange(range: AST.Range, text: string): Fix; - } - - interface Fix { - range: AST.Range; - text: string; - } -} - -// #region Linter - -export class Linter { - static readonly version: string; - - version: string; - - constructor(options?: { cwd?: string | undefined; configType?: "flat" | "eslintrc" }); - - verify( - code: SourceCode | string, - config: Linter.LegacyConfig | Linter.Config | Linter.Config[], - filename?: string, - ): Linter.LintMessage[]; - verify( - code: SourceCode | string, - config: Linter.LegacyConfig | Linter.Config | Linter.Config[], - options: Linter.LintOptions, - ): Linter.LintMessage[]; - - verifyAndFix( - code: string, - config: Linter.LegacyConfig | Linter.Config | Linter.Config[], - filename?: string, - ): Linter.FixReport; - verifyAndFix( - code: string, - config: Linter.LegacyConfig | Linter.Config | Linter.Config[], - options: Linter.FixOptions, - ): Linter.FixReport; - - getSourceCode(): SourceCode; - - defineRule(name: string, rule: Rule.RuleModule): void; - - defineRules(rules: { [name: string]: Rule.RuleModule }): void; - - getRules(): Map; - - defineParser(name: string, parser: Linter.Parser): void; - - getTimes(): Linter.Stats["times"]; - - getFixPassCount(): Linter.Stats["fixPasses"]; -} - -export namespace Linter { - /** - * The numeric severity level for a rule. - * - * - `0` means off. - * - `1` means warn. - * - `2` means error. - * - * @see [Rule Severities](https://eslint.org/docs/latest/use/configure/rules#rule-severities) - */ - type Severity = 0 | 1 | 2; - - /** - * The human readable severity level for a rule. - * - * @see [Rule Severities](https://eslint.org/docs/latest/use/configure/rules#rule-severities) - */ - type StringSeverity = "off" | "warn" | "error"; - - /** - * The numeric or human readable severity level for a rule. - * - * @see [Rule Severities](https://eslint.org/docs/latest/use/configure/rules#rule-severities) - */ - type RuleSeverity = Severity | StringSeverity; - - /** - * An array containing the rule severity level, followed by the rule options. - * - * @see [Rules](https://eslint.org/docs/latest/use/configure/rules) - */ - type RuleSeverityAndOptions = [RuleSeverity, ...Partial]; - - /** - * The severity level for the rule or an array containing the rule severity level, followed by the rule options. - * - * @see [Rules](https://eslint.org/docs/latest/use/configure/rules) - */ - type RuleEntry = RuleSeverity | RuleSeverityAndOptions; - - /** - * The rules config object is a key/value map of rule names and their severity and options. - */ - interface RulesRecord { - [rule: string]: RuleEntry; - } - - /** - * A configuration object that may have a `rules` block. - */ - interface HasRules { - rules?: Partial | undefined; - } - - /** - * The ECMAScript version of the code being linted. - */ - type EcmaVersion = - | 3 - | 5 - | 6 - | 7 - | 8 - | 9 - | 10 - | 11 - | 12 - | 13 - | 14 - | 15 - | 16 - | 2015 - | 2016 - | 2017 - | 2018 - | 2019 - | 2020 - | 2021 - | 2022 - | 2023 - | 2024 - | 2025 - | "latest"; - - /** - * The type of JavaScript source code. - */ - type SourceType = "script" | "module" | "commonjs"; - - /** - * ESLint legacy configuration. - * - * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/) - */ - interface BaseConfig - extends HasRules - { - $schema?: string | undefined; - - /** - * An environment provides predefined global variables. - * - * @see [Environments](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-environments) - */ - env?: { [name: string]: boolean } | undefined; - - /** - * Extending configuration files. - * - * @see [Extends](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#extending-configuration-files) - */ - extends?: string | string[] | undefined; - - /** - * Specifying globals. - * - * @see [Globals](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-globals) - */ - globals?: Linter.Globals | undefined; - - /** - * Disable processing of inline comments. - * - * @see [Disabling Inline Comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#disabling-inline-comments) - */ - noInlineConfig?: boolean | undefined; - - /** - * Overrides can be used to use a differing configuration for matching sub-directories and files. - * - * @see [How do overrides work](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#how-do-overrides-work) - */ - overrides?: Array> | undefined; - - /** - * Parser. - * - * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers) - * @see [Specifying Parser](https://eslint.org/docs/latest/use/configure/parser-deprecated) - */ - parser?: string | undefined; - - /** - * Parser options. - * - * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers) - * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options) - */ - parserOptions?: ParserOptions | undefined; - - /** - * Which third-party plugins define additional rules, environments, configs, etc. for ESLint to use. - * - * @see [Configuring Plugins](https://eslint.org/docs/latest/use/configure/plugins-deprecated#configure-plugins) - */ - plugins?: string[] | undefined; - - /** - * Specifying processor. - * - * @see [processor](https://eslint.org/docs/latest/use/configure/plugins-deprecated#specify-a-processor) - */ - processor?: string | undefined; - - /** - * Report unused eslint-disable comments as warning. - * - * @see [Report unused eslint-disable comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#report-unused-eslint-disable-comments) - */ - reportUnusedDisableDirectives?: boolean | undefined; - - /** - * Settings. - * - * @see [Settings](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#adding-shared-settings) - */ - settings?: { [name: string]: any } | undefined; - } - - /** - * The overwrites that apply more differing configuration to specific files or directories. - */ - interface ConfigOverride extends BaseConfig { - /** - * The glob patterns for excluded files. - */ - excludedFiles?: string | string[] | undefined; - - /** - * The glob patterns for target files. - */ - files: string | string[]; - } - - /** - * ESLint legacy configuration. - * - * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/) - */ - // https://github.com/eslint/eslint/blob/v8.57.0/conf/config-schema.js - interface LegacyConfig - extends BaseConfig - { - /** - * Tell ESLint to ignore specific files and directories. - * - * @see [Ignore Patterns](https://eslint.org/docs/latest/use/configure/ignore-deprecated#ignorepatterns-in-config-files) - */ - ignorePatterns?: string | string[] | undefined; - - /** - * @see [Using Configuration Files](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#using-configuration-files) - */ - root?: boolean | undefined; - } - - /** - * Parser options. - * - * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options) - */ - interface ParserOptions { - /** - * Accepts any valid ECMAScript version number or `'latest'`: - * - * - A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, es14, ..., or - * - A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, ..., or - * - `'latest'` - * - * When it's a version or a year, the value must be a number - so do not include the `es` prefix. - * - * Specifies the version of ECMAScript syntax you want to use. This is used by the parser to determine how to perform scope analysis, and it affects the default - * - * @default 5 - */ - ecmaVersion?: EcmaVersion | undefined; - - /** - * The type of JavaScript source code. Possible values are "script" for - * traditional script files, "module" for ECMAScript modules (ESM), and - * "commonjs" for CommonJS files. - * - * @default 'script' - * - * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options - */ - sourceType?: SourceType | undefined; - - /** - * An object indicating which additional language features you'd like to use. - * - * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options - */ - ecmaFeatures?: { - globalReturn?: boolean | undefined; - impliedStrict?: boolean | undefined; - jsx?: boolean | undefined; - experimentalObjectRestSpread?: boolean | undefined; - [key: string]: any; - } | undefined; - [key: string]: any; - } - - interface LintOptions { - filename?: string | undefined; - preprocess?: ((code: string) => string[]) | undefined; - postprocess?: ((problemLists: LintMessage[][]) => LintMessage[]) | undefined; - filterCodeBlock?: boolean | undefined; - disableFixes?: boolean | undefined; - allowInlineConfig?: boolean | undefined; - reportUnusedDisableDirectives?: boolean | undefined; - } - - interface LintSuggestion { - desc: string; - fix: Rule.Fix; - messageId?: string | undefined; - } - - interface LintMessage { - column: number; - line: number; - endColumn?: number | undefined; - endLine?: number | undefined; - ruleId: string | null; - message: string; - messageId?: string | undefined; - nodeType?: string | undefined; - fatal?: true | undefined; - severity: Exclude; - fix?: Rule.Fix | undefined; - suggestions?: LintSuggestion[] | undefined; - } - - interface LintSuppression { - kind: string; - justification: string; - } - - interface SuppressedLintMessage extends LintMessage { - suppressions: LintSuppression[]; - } - - interface FixOptions extends LintOptions { - fix?: boolean | undefined; - } - - interface FixReport { - fixed: boolean; - output: string; - messages: LintMessage[]; - } - - // Temporarily loosen type for just flat config files (see #68232) - type NonESTreeParser = - & Omit - & ({ - parse(text: string, options?: any): unknown; - } | { - parseForESLint(text: string, options?: any): Omit & { - ast: unknown; - scopeManager?: unknown; - }; - }); - - type ESTreeParser = - & ESLint.ObjectMetaProperties - & ( - | { parse(text: string, options?: any): AST.Program } - | { parseForESLint(text: string, options?: any): ESLintParseResult } - ); - - type Parser = NonESTreeParser | ESTreeParser; - - interface ESLintParseResult { - ast: AST.Program; - parserServices?: SourceCode.ParserServices | undefined; - scopeManager?: Scope.ScopeManager | undefined; - visitorKeys?: SourceCode.VisitorKeys | undefined; - } - - interface ProcessorFile { - text: string; - filename: string; - } - - // https://eslint.org/docs/latest/extend/plugins#processors-in-plugins - interface Processor extends ESLint.ObjectMetaProperties { - supportsAutofix?: boolean | undefined; - preprocess?(text: string, filename: string): T[]; - postprocess?(messages: LintMessage[][], filename: string): LintMessage[]; - } - - interface Config { - /** - * An string to identify the configuration object. Used in error messages and - * inspection tools. - */ - name?: string; - - /** - * An array of glob patterns indicating the files that the configuration - * object should apply to. If not specified, the configuration object applies - * to all files - */ - files?: Array; - - /** - * An array of glob patterns indicating the files that the configuration - * object should not apply to. If not specified, the configuration object - * applies to all files matched by files - */ - ignores?: string[]; - - /** - * An object containing settings related to how JavaScript is configured for - * linting. - */ - languageOptions?: LanguageOptions; - - /** - * An object containing settings related to the linting process - */ - linterOptions?: LinterOptions; - - /** - * Either an object containing preprocess() and postprocess() methods or a - * string indicating the name of a processor inside of a plugin - * (i.e., "pluginName/processorName"). - */ - processor?: string | Processor; - - /** - * An object containing a name-value mapping of plugin names to plugin objects. - * When files is specified, these plugins are only available to the matching files. - */ - plugins?: Record; - - /** - * An object containing the configured rules. When files or ignores are specified, - * these rule configurations are only available to the matching files. - */ - rules?: Partial; - - /** - * An object containing name-value pairs of information that should be - * available to all rules. - */ - settings?: Record; - } - - /** @deprecated Use `Config` instead of `FlatConfig` */ - type FlatConfig = Config; - - type GlobalConf = boolean | "off" | "readable" | "readonly" | "writable" | "writeable"; - - interface Globals { - [name: string]: GlobalConf; - } - - interface LanguageOptions { - /** - * The version of ECMAScript to support. May be any year (i.e., 2022) or - * version (i.e., 5). Set to "latest" for the most recent supported version. - * @default "latest" - */ - ecmaVersion?: EcmaVersion | undefined; - - /** - * The type of JavaScript source code. Possible values are "script" for - * traditional script files, "module" for ECMAScript modules (ESM), and - * "commonjs" for CommonJS files. (default: "module" for .js and .mjs - * files; "commonjs" for .cjs files) - */ - sourceType?: SourceType | undefined; - - /** - * An object specifying additional objects that should be added to the - * global scope during linting. - */ - globals?: Globals | undefined; - - /** - * An object containing a parse() or parseForESLint() method. - * If not configured, the default ESLint parser (Espree) will be used. - */ - parser?: Parser | undefined; - - /** - * An object specifying additional options that are passed directly to the - * parser() method on the parser. The available options are parser-dependent - */ - parserOptions?: Linter.ParserOptions | undefined; - } - - interface LinterOptions { - /** - * A boolean value indicating if inline configuration is allowed. - */ - noInlineConfig?: boolean; - - /** - * A severity value indicating if and how unused disable directives should be - * tracked and reported. - */ - reportUnusedDisableDirectives?: Severity | StringSeverity | boolean; - } - - interface Stats { - /** - * The number of times ESLint has applied at least one fix after linting. - */ - fixPasses: number; - - /** - * The times spent on (parsing, fixing, linting) a file, where the linting refers to the timing information for each rule. - */ - times: { passes: TimePass[] }; - } - - interface TimePass { - parse: { total: number }; - rules?: Record; - fix: { total: number }; - total: number; - } -} - -// #endregion - -// #region ESLint - -export class ESLint { - static configType: "flat"; - - static readonly version: string; - - static outputFixes(results: ESLint.LintResult[]): Promise; - - static getErrorResults(results: ESLint.LintResult[]): ESLint.LintResult[]; - - constructor(options?: ESLint.Options); - - lintFiles(patterns: string | string[]): Promise; - - lintText( - code: string, - options?: { filePath?: string | undefined; warnIgnored?: boolean | undefined }, - ): Promise; - - getRulesMetaForResults(results: ESLint.LintResult[]): ESLint.LintResultData["rulesMeta"]; - - hasFlag(flag: string): boolean; - - calculateConfigForFile(filePath: string): Promise; - - findConfigFile(): Promise; - - isPathIgnored(filePath: string): Promise; - - loadFormatter(nameOrPath?: string): Promise; -} - -export namespace ESLint { - type ConfigData = Omit< - Linter.LegacyConfig, - "$schema" - >; - - interface Environment { - globals?: Linter.Globals | undefined; - parserOptions?: Linter.ParserOptions | undefined; - } - - interface ObjectMetaProperties { - /** @deprecated Use `meta.name` instead. */ - name?: string | undefined; - - /** @deprecated Use `meta.version` instead. */ - version?: string | undefined; - - meta?: { - name?: string | undefined; - version?: string | undefined; - }; - } - - interface Plugin extends ObjectMetaProperties { - configs?: Record | undefined; - environments?: Record | undefined; - processors?: Record | undefined; - rules?: Record | undefined; - } - - type FixType = "directive" | "problem" | "suggestion" | "layout"; - - type CacheStrategy = "content" | "metadata"; - - interface Options { - // File enumeration - cwd?: string | undefined; - errorOnUnmatchedPattern?: boolean | undefined; - globInputPaths?: boolean | undefined; - ignore?: boolean | undefined; - ignorePatterns?: string[] | null | undefined; - passOnNoPatterns?: boolean | undefined; - warnIgnored?: boolean | undefined; - - // Linting - allowInlineConfig?: boolean | undefined; - baseConfig?: Linter.Config | Linter.Config[] | null | undefined; - overrideConfig?: Linter.Config | Linter.Config[] | null | undefined; - overrideConfigFile?: string | boolean | undefined; - plugins?: Record | null | undefined; - ruleFilter?: ((arg: { ruleId: string; severity: Exclude }) => boolean) | undefined; - stats?: boolean | undefined; - - // Autofix - fix?: boolean | ((message: Linter.LintMessage) => boolean) | undefined; - fixTypes?: FixType[] | undefined; - - // Cache-related - cache?: boolean | undefined; - cacheLocation?: string | undefined; - cacheStrategy?: CacheStrategy | undefined; - - // Other Options - flags?: string[] | undefined; - } - - interface LegacyOptions { - // File enumeration - cwd?: string | undefined; - errorOnUnmatchedPattern?: boolean | undefined; - extensions?: string[] | undefined; - globInputPaths?: boolean | undefined; - ignore?: boolean | undefined; - ignorePath?: string | undefined; - - // Linting - allowInlineConfig?: boolean | undefined; - baseConfig?: Linter.LegacyConfig | undefined; - overrideConfig?: Linter.LegacyConfig | undefined; - overrideConfigFile?: string | undefined; - plugins?: Record | undefined; - reportUnusedDisableDirectives?: Linter.StringSeverity | undefined; - resolvePluginsRelativeTo?: string | undefined; - rulePaths?: string[] | undefined; - useEslintrc?: boolean | undefined; - - // Autofix - fix?: boolean | ((message: Linter.LintMessage) => boolean) | undefined; - fixTypes?: FixType[] | undefined; - - // Cache-related - cache?: boolean | undefined; - cacheLocation?: string | undefined; - cacheStrategy?: CacheStrategy | undefined; - - // Other Options - flags?: string[] | undefined; - } - - interface LintResult { - filePath: string; - messages: Linter.LintMessage[]; - suppressedMessages: Linter.SuppressedLintMessage[]; - errorCount: number; - fatalErrorCount: number; - warningCount: number; - fixableErrorCount: number; - fixableWarningCount: number; - output?: string | undefined; - source?: string | undefined; - stats?: Linter.Stats | undefined; - usedDeprecatedRules: DeprecatedRuleUse[]; - } - - interface LintResultData { - cwd: string; - rulesMeta: { - [ruleId: string]: Rule.RuleMetaData; - }; - } - - interface DeprecatedRuleUse { - ruleId: string; - replacedBy: string[]; - } - - interface Formatter { - format(results: LintResult[], data: LintResultData): string | Promise; - } - - // Docs reference the types by those name - type EditInfo = Rule.Fix; - type LoadedFormatter = Formatter; - type ResultsMeta = LintResultData; -} - -// #endregion - -export function loadESLint(options: { useFlatConfig: true }): Promise; -export function loadESLint(options: { useFlatConfig: false }): Promise; -export function loadESLint( - options?: { useFlatConfig?: boolean | undefined }, -): Promise; - -// #region RuleTester - -export class RuleTester { - static describe: ((...args: any) => any) | null; - static it: ((...args: any) => any) | null; - static itOnly: ((...args: any) => any) | null; - - constructor(config?: Linter.Config); - - run( - name: string, - rule: Rule.RuleModule, - tests: { - valid: Array; - invalid: RuleTester.InvalidTestCase[]; - }, - ): void; - - static only( - item: string | RuleTester.ValidTestCase | RuleTester.InvalidTestCase, - ): RuleTester.ValidTestCase | RuleTester.InvalidTestCase; -} - -export namespace RuleTester { - interface ValidTestCase { - name?: string; - code: string; - options?: any; - filename?: string | undefined; - only?: boolean; - languageOptions?: Linter.LanguageOptions | undefined; - settings?: { [name: string]: any } | undefined; - } - - interface SuggestionOutput { - messageId?: string; - desc?: string; - data?: Record | undefined; - output: string; - } - - interface InvalidTestCase extends ValidTestCase { - errors: number | Array; - output?: string | null | undefined; - } - - interface TestCaseError { - message?: string | RegExp; - messageId?: string; - type?: string | undefined; - data?: any; - line?: number | undefined; - column?: number | undefined; - endLine?: number | undefined; - endColumn?: number | undefined; - suggestions?: SuggestionOutput[] | undefined; - } -} - -// #endregion diff --git a/web/static/node_modules/@types/eslint/package.json b/web/static/node_modules/@types/eslint/package.json deleted file mode 100644 index ef52af65..00000000 --- a/web/static/node_modules/@types/eslint/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "@types/eslint", - "version": "9.6.1", - "description": "TypeScript definitions for eslint", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint", - "license": "MIT", - "contributors": [ - { - "name": "Pierre-Marie Dartus", - "githubUsername": "pmdartus", - "url": "https://github.com/pmdartus" - }, - { - "name": "Jed Fox", - "githubUsername": "j-f1", - "url": "https://github.com/j-f1" - }, - { - "name": "Saad Quadri", - "githubUsername": "saadq", - "url": "https://github.com/saadq" - }, - { - "name": "Jason Kwok", - "githubUsername": "JasonHK", - "url": "https://github.com/JasonHK" - }, - { - "name": "Brad Zacher", - "githubUsername": "bradzacher", - "url": "https://github.com/bradzacher" - }, - { - "name": "JounQin", - "githubUsername": "JounQin", - "url": "https://github.com/JounQin" - }, - { - "name": "Bryan Mishkin", - "githubUsername": "bmish", - "url": "https://github.com/bmish" - } - ], - "main": "", - "types": "index.d.ts", - "exports": { - ".": { - "types": "./index.d.ts" - }, - "./use-at-your-own-risk": { - "types": "./use-at-your-own-risk.d.ts" - }, - "./rules": { - "types": "./rules/index.d.ts" - }, - "./package.json": "./package.json" - }, - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/eslint" - }, - "scripts": {}, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - }, - "typesPublisherContentHash": "bc2620143f844d291da2d199e7b8e2605e3277f1941a508dc72ac92843b149b6", - "typeScriptVersion": "4.8" -} \ No newline at end of file diff --git a/web/static/node_modules/@types/eslint/rules/best-practices.d.ts b/web/static/node_modules/@types/eslint/rules/best-practices.d.ts deleted file mode 100644 index fdb3067b..00000000 --- a/web/static/node_modules/@types/eslint/rules/best-practices.d.ts +++ /dev/null @@ -1,1048 +0,0 @@ -import { Linter } from "../index"; - -export interface BestPractices extends Linter.RulesRecord { - /** - * Rule to enforce getter and setter pairs in objects. - * - * @since 0.22.0 - * @see https://eslint.org/docs/rules/accessor-pairs - */ - "accessor-pairs": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - setWithoutGet: boolean; - /** - * @default false - */ - getWithoutSet: boolean; - /** - * @default true - */ - enforceForClassMembers: boolean; - }>, - ] - >; - - /** - * Rule to enforce `return` statements in callbacks of array methods. - * - * @since 2.0.0-alpha-1 - * @see https://eslint.org/docs/rules/array-callback-return - */ - "array-callback-return": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - allowImplicit: boolean; - /** - * @default false - */ - checkForEach: boolean; - /** - * @default false - */ - allowVoid: boolean; - }>, - ] - >; - - /** - * Rule to enforce the use of variables within the scope they are defined. - * - * @since 0.1.0 - * @see https://eslint.org/docs/rules/block-scoped-var - */ - "block-scoped-var": Linter.RuleEntry<[]>; - - /** - * Rule to enforce that class methods utilize `this`. - * - * @since 3.4.0 - * @see https://eslint.org/docs/rules/class-methods-use-this - */ - "class-methods-use-this": Linter.RuleEntry< - [ - Partial<{ - exceptMethods: string[]; - }>, - ] - >; - - /** - * Rule to enforce a maximum cyclomatic complexity allowed in a program. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/complexity - */ - complexity: Linter.RuleEntry< - [ - | Partial<{ - /** - * @default 20 - */ - max: number; - /** - * @deprecated - * @default 20 - */ - maximum: number; - }> - | number, - ] - >; - - /** - * Rule to require `return` statements to either always or never specify values. - * - * @since 0.4.0 - * @see https://eslint.org/docs/rules/consistent-return - */ - "consistent-return": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - treatUndefinedAsUnspecified: boolean; - }>, - ] - >; - - /** - * Rule to enforce consistent brace style for all control statements. - * - * @since 0.0.2 - * @see https://eslint.org/docs/rules/curly - */ - curly: Linter.RuleEntry<["all" | "multi" | "multi-line" | "multi-or-nest" | "consistent"]>; - - /** - * Rule to require `default` cases in `switch` statements. - * - * @since 0.6.0 - * @see https://eslint.org/docs/rules/default-case - */ - "default-case": Linter.RuleEntry< - [ - Partial<{ - /** - * @default '^no default$' - */ - commentPattern: string; - }>, - ] - >; - - /** - * Rule to enforce default clauses in switch statements to be last - * - * @since 7.0.0 - * @see https://eslint.org/docs/latest/rules/default-case-last - */ - "default-case-last": Linter.RuleEntry<[]>; - - /** - * Enforce default parameters to be last - * - * @since 6.4.0 - * @see https://eslint.org/docs/latest/rules/default-param-last - */ - "default-param-last": Linter.RuleEntry<[]>; - - /** - * Rule to enforce consistent newlines before and after dots. - * - * @since 0.21.0 - * @see https://eslint.org/docs/rules/dot-location - */ - "dot-location": Linter.RuleEntry<["object" | "property"]>; - - /** - * Rule to enforce dot notation whenever possible. - * - * @since 0.0.7 - * @see https://eslint.org/docs/rules/dot-notation - */ - "dot-notation": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - allowKeywords: boolean; - allowPattern: string; - }>, - ] - >; - - /** - * Rule to require the use of `===` and `!==`. - * - * @since 0.0.2 - * @see https://eslint.org/docs/rules/eqeqeq - */ - eqeqeq: - | Linter.RuleEntry< - [ - "always", - Partial<{ - /** - * @default 'always' - */ - null: "always" | "never" | "ignore"; - }>, - ] - > - | Linter.RuleEntry<["smart" | "allow-null"]>; - - /** - * Require grouped accessor pairs in object literals and classes. - * - * @since 6.7.0 - * @see https://eslint.org/docs/latest/rules/grouped-accessor-pairs - */ - "grouped-accessor-pairs": Linter.RuleEntry<["anyOrder" | "getBeforeSet" | "setBeforeGet"]>; - - /** - * Rule to require `for-in` loops to include an `if` statement. - * - * @since 0.0.6 - * @see https://eslint.org/docs/rules/guard-for-in - */ - "guard-for-in": Linter.RuleEntry<[]>; - - /** - * Rule to enforce a maximum number of classes per file. - * - * @since 5.0.0-alpha.3 - * @see https://eslint.org/docs/rules/max-classes-per-file - */ - "max-classes-per-file": Linter.RuleEntry<[number]>; - - /** - * Rule to disallow the use of `alert`, `confirm`, and `prompt`. - * - * @since 0.0.5 - * @see https://eslint.org/docs/rules/no-alert - */ - "no-alert": Linter.RuleEntry<[]>; - - /** - * Rule to disallow the use of `arguments.caller` or `arguments.callee`. - * - * @since 0.0.6 - * @see https://eslint.org/docs/rules/no-caller - */ - "no-caller": Linter.RuleEntry<[]>; - - /** - * Rule to disallow lexical declarations in case clauses. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 1.9.0 - * @see https://eslint.org/docs/rules/no-case-declarations - */ - "no-case-declarations": Linter.RuleEntry<[]>; - - /** - * Rule to disallow division operators explicitly at the beginning of regular expressions. - * - * @since 0.1.0 - * @see https://eslint.org/docs/rules/no-div-regex - */ - "no-div-regex": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `else` blocks after `return` statements in `if` statements. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-else-return - */ - "no-else-return": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - allowElseIf: boolean; - }>, - ] - >; - - /** - * Rule to disallow empty functions. - * - * @since 2.0.0 - * @see https://eslint.org/docs/rules/no-empty-function - */ - "no-empty-function": Linter.RuleEntry< - [ - Partial<{ - /** - * @default [] - */ - allow: Array< - | "functions" - | "arrowFunctions" - | "generatorFunctions" - | "methods" - | "generatorMethods" - | "getters" - | "setters" - | "constructors" - >; - }>, - ] - >; - - /** - * Rule to disallow empty destructuring patterns. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 1.7.0 - * @see https://eslint.org/docs/rules/no-empty-pattern - */ - "no-empty-pattern": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `null` comparisons without type-checking operators. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-eq-null - */ - "no-eq-null": Linter.RuleEntry<[]>; - - /** - * Rule to disallow the use of `eval()`. - * - * @since 0.0.2 - * @see https://eslint.org/docs/rules/no-eval - */ - "no-eval": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - allowIndirect: boolean; - }>, - ] - >; - - /** - * Rule to disallow extending native types. - * - * @since 0.1.4 - * @see https://eslint.org/docs/rules/no-extend-native - */ - "no-extend-native": Linter.RuleEntry< - [ - Partial<{ - exceptions: string[]; - }>, - ] - >; - - /** - * Rule to disallow unnecessary calls to `.bind()`. - * - * @since 0.8.0 - * @see https://eslint.org/docs/rules/no-extra-bind - */ - "no-extra-bind": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unnecessary labels. - * - * @since 2.0.0-rc.0 - * @see https://eslint.org/docs/rules/no-extra-label - */ - "no-extra-label": Linter.RuleEntry<[]>; - - /** - * Rule to disallow fallthrough of `case` statements. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.7 - * @see https://eslint.org/docs/rules/no-fallthrough - */ - "no-fallthrough": Linter.RuleEntry< - [ - Partial<{ - /** - * @default 'falls?\s?through' - */ - commentPattern: string; - /** - * @default false - */ - allowEmptyCase: boolean; - }>, - ] - >; - - /** - * Rule to disallow leading or trailing decimal points in numeric literals. - * - * @since 0.0.6 - * @see https://eslint.org/docs/rules/no-floating-decimal - */ - "no-floating-decimal": Linter.RuleEntry<[]>; - - /** - * Rule to disallow assignments to native objects or read-only global variables. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 3.3.0 - * @see https://eslint.org/docs/rules/no-global-assign - */ - "no-global-assign": Linter.RuleEntry< - [ - Partial<{ - exceptions: string[]; - }>, - ] - >; - - /** - * Rule to disallow shorthand type conversions. - * - * @since 1.0.0-rc-2 - * @see https://eslint.org/docs/rules/no-implicit-coercion - */ - "no-implicit-coercion": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - boolean: boolean; - /** - * @default true - */ - number: boolean; - /** - * @default true - */ - string: boolean; - /** - * @default false - */ - disallowTemplateShorthand: boolean; - /** - * @default [] - */ - allow: Array<"~" | "!!" | "+" | "*">; - }>, - ] - >; - - /** - * Rule to disallow variable and `function` declarations in the global scope. - * - * @since 2.0.0-alpha-1 - * @see https://eslint.org/docs/rules/no-implicit-globals - */ - "no-implicit-globals": Linter.RuleEntry<[]>; - - /** - * Rule to disallow the use of `eval()`-like methods. - * - * @since 0.0.7 - * @see https://eslint.org/docs/rules/no-implied-eval - */ - "no-implied-eval": Linter.RuleEntry<[]>; - - /** - * Disallow assigning to imported bindings. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 6.4.0 - * @see https://eslint.org/docs/latest/rules/no-import-assign - */ - "no-import-assign": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `this` keywords outside of classes or class-like objects. - * - * @since 1.0.0-rc-2 - * @see https://eslint.org/docs/rules/no-invalid-this - */ - "no-invalid-this": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - capIsConstructor: boolean; - }>, - ] - >; - - /** - * Rule to disallow the use of the `__iterator__` property. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-iterator - */ - "no-iterator": Linter.RuleEntry<[]>; - - /** - * Rule to disallow labeled statements. - * - * @since 0.4.0 - * @see https://eslint.org/docs/rules/no-labels - */ - "no-labels": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - allowLoop: boolean; - /** - * @default false - */ - allowSwitch: boolean; - }>, - ] - >; - - /** - * Rule to disallow unnecessary nested blocks. - * - * @since 0.4.0 - * @see https://eslint.org/docs/rules/no-lone-blocks - */ - "no-lone-blocks": Linter.RuleEntry<[]>; - - /** - * Rule to disallow function declarations that contain unsafe references inside loop statements. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-loop-func - */ - "no-loop-func": Linter.RuleEntry<[]>; - - /** - * Rule to disallow magic numbers. - * - * @since 1.7.0 - * @see https://eslint.org/docs/rules/no-magic-numbers - */ - "no-magic-numbers": Linter.RuleEntry< - [ - Partial<{ - /** - * @default [] - */ - ignore: number[]; - /** - * @default false - */ - ignoreArrayIndexes: boolean; - /** - * @default false - */ - enforceConst: boolean; - /** - * @default false - */ - detectObjects: boolean; - }>, - ] - >; - - /** - * Rule to disallow multiple spaces. - * - * @since 0.9.0 - * @see https://eslint.org/docs/rules/no-multi-spaces - */ - "no-multi-spaces": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - ignoreEOLComments: boolean; - /** - * @default { Property: true } - */ - exceptions: Record; - }>, - ] - >; - - /** - * Rule to disallow multiline strings. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-multi-str - */ - "no-multi-str": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `new` operators outside of assignments or comparisons. - * - * @since 0.0.7 - * @see https://eslint.org/docs/rules/no-new - */ - "no-new": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `new` operators with the `Function` object. - * - * @since 0.0.7 - * @see https://eslint.org/docs/rules/no-new-func - */ - "no-new-func": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `new` operators with the `String`, `Number`, and `Boolean` objects. - * - * @since 0.0.6 - * @see https://eslint.org/docs/rules/no-new-wrappers - */ - "no-new-wrappers": Linter.RuleEntry<[]>; - - /** - * Disallow `\\8` and `\\9` escape sequences in string literals. - * - * @since 7.14.0 - * @see https://eslint.org/docs/rules/no-nonoctal-decimal-escape - */ - "no-nonoctal-decimal-escape": Linter.RuleEntry<[]>; - - /** - * Rule to disallow octal literals. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.6 - * @see https://eslint.org/docs/rules/no-octal - */ - "no-octal": Linter.RuleEntry<[]>; - - /** - * Rule to disallow octal escape sequences in string literals. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-octal-escape - */ - "no-octal-escape": Linter.RuleEntry<[]>; - - /** - * Rule to disallow reassigning `function` parameters. - * - * @since 0.18.0 - * @see https://eslint.org/docs/rules/no-param-reassign - */ - "no-param-reassign": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - props: boolean; - /** - * @default [] - */ - ignorePropertyModificationsFor: string[]; - }>, - ] - >; - - /** - * Rule to disallow the use of the `__proto__` property. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-proto - */ - "no-proto": Linter.RuleEntry<[]>; - - /** - * Rule to disallow variable redeclaration. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-redeclare - */ - "no-redeclare": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - builtinGlobals: boolean; - }>, - ] - >; - - /** - * Rule to disallow certain properties on certain objects. - * - * @since 3.5.0 - * @see https://eslint.org/docs/rules/no-restricted-properties - */ - "no-restricted-properties": Linter.RuleEntry< - [ - ...Array< - | { - object: string; - property?: string | undefined; - message?: string | undefined; - } - | { - property: string; - message?: string | undefined; - } - >, - ] - >; - - /** - * Rule to disallow assignment operators in `return` statements. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-return-assign - */ - "no-return-assign": Linter.RuleEntry<["except-parens" | "always"]>; - - /** - * Rule to disallow unnecessary `return await`. - * - * @since 3.10.0 - * @see https://eslint.org/docs/rules/no-return-await - */ - "no-return-await": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `javascript:` urls. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-script-url - */ - "no-script-url": Linter.RuleEntry<[]>; - - /** - * Rule to disallow assignments where both sides are exactly the same. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 2.0.0-rc.0 - * @see https://eslint.org/docs/rules/no-self-assign - */ - "no-self-assign": Linter.RuleEntry<[]>; - - /** - * Rule to disallow comparisons where both sides are exactly the same. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-self-compare - */ - "no-self-compare": Linter.RuleEntry<[]>; - - /** - * Rule to disallow comma operators. - * - * @since 0.5.1 - * @see https://eslint.org/docs/rules/no-sequences - */ - "no-sequences": Linter.RuleEntry<[]>; - - /** - * Rule to disallow throwing literals as exceptions. - * - * @since 0.15.0 - * @see https://eslint.org/docs/rules/no-throw-literal - */ - "no-throw-literal": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unmodified loop conditions. - * - * @since 2.0.0-alpha-2 - * @see https://eslint.org/docs/rules/no-unmodified-loop-condition - */ - "no-unmodified-loop-condition": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unused expressions. - * - * @since 0.1.0 - * @see https://eslint.org/docs/rules/no-unused-expressions - */ - "no-unused-expressions": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - allowShortCircuit: boolean; - /** - * @default false - */ - allowTernary: boolean; - /** - * @default false - */ - allowTaggedTemplates: boolean; - }>, - ] - >; - - /** - * Rule to disallow unused labels. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 2.0.0-rc.0 - * @see https://eslint.org/docs/rules/no-unused-labels - */ - "no-unused-labels": Linter.RuleEntry<[]>; - - /** - * Disallow useless backreferences in regular expressions - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 7.0.0-alpha.0 - * @see https://eslint.org/docs/latest/rules/no-useless-backreference - */ - "no-useless-backreference": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unnecessary calls to `.call()` and `.apply()`. - * - * @since 1.0.0-rc-1 - * @see https://eslint.org/docs/rules/no-useless-call - */ - "no-useless-call": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unnecessary `catch` clauses. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 5.11.0 - * @see https://eslint.org/docs/rules/no-useless-catch - */ - "no-useless-catch": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unnecessary concatenation of literals or template literals. - * - * @since 1.3.0 - * @see https://eslint.org/docs/rules/no-useless-concat - */ - "no-useless-concat": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unnecessary escape characters. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 2.5.0 - * @see https://eslint.org/docs/rules/no-useless-escape - */ - "no-useless-escape": Linter.RuleEntry<[]>; - - /** - * Rule to disallow redundant return statements. - * - * @since 3.9.0 - * @see https://eslint.org/docs/rules/no-useless-return - */ - "no-useless-return": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `void` operators. - * - * @since 0.8.0 - * @see https://eslint.org/docs/rules/no-void - */ - "no-void": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - allowAsStatement: boolean; - }>, - ] - >; - - /** - * Rule to disallow specified warning terms in comments. - * - * @since 0.4.4 - * @see https://eslint.org/docs/rules/no-warning-comments - */ - "no-warning-comments": Linter.RuleEntry< - [ - { - /** - * @default ["todo", "fixme", "xxx"] - */ - terms: string[]; - /** - * @default 'start' - */ - location: "start" | "anywhere"; - }, - ] - >; - - /** - * Rule to disallow `with` statements. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.2 - * @see https://eslint.org/docs/rules/no-with - */ - "no-with": Linter.RuleEntry<[]>; - - /** - * Rule to enforce using named capture group in regular expression. - * - * @since 5.15.0 - * @see https://eslint.org/docs/rules/prefer-named-capture-group - */ - "prefer-named-capture-group": Linter.RuleEntry<[]>; - - /** - * Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`. - * - * @since 3.5.0 - * @see https://eslint.org/docs/rules/prefer-object-has-own - */ - "prefer-object-has-own": Linter.RuleEntry<[]>; - - /** - * Rule to require using Error objects as Promise rejection reasons. - * - * @since 3.14.0 - * @see https://eslint.org/docs/rules/prefer-promise-reject-errors - */ - "prefer-promise-reject-errors": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - allowEmptyReject: boolean; - }>, - ] - >; - - /** - * Disallow use of the `RegExp` constructor in favor of regular expression literals. - * - * @since 6.4.0 - * @see https://eslint.org/docs/latest/rules/prefer-regex-literals - */ - "prefer-regex-literals": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - disallowRedundantWrapping: boolean; - }>, - ] - >; - - /** - * Rule to enforce the consistent use of the radix argument when using `parseInt()`. - * - * @since 0.0.7 - * @see https://eslint.org/docs/rules/radix - */ - radix: Linter.RuleEntry<["always" | "as-needed"]>; - - /** - * Rule to disallow async functions which have no `await` expression. - * - * @since 3.11.0 - * @see https://eslint.org/docs/rules/require-await - */ - "require-await": Linter.RuleEntry<[]>; - - /** - * Rule to enforce the use of `u` flag on RegExp. - * - * @since 5.3.0 - * @see https://eslint.org/docs/rules/require-unicode-regexp - */ - "require-unicode-regexp": Linter.RuleEntry<[]>; - - /** - * Rule to require `var` declarations be placed at the top of their containing scope. - * - * @since 0.8.0 - * @see https://eslint.org/docs/rules/vars-on-top - */ - "vars-on-top": Linter.RuleEntry<[]>; - - /** - * Rule to require parentheses around immediate `function` invocations. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/wrap-iife - */ - "wrap-iife": Linter.RuleEntry< - [ - "outside" | "inside" | "any", - Partial<{ - /** - * @default false - */ - functionPrototypeMethods: boolean; - }>, - ] - >; - - /** - * Rule to require or disallow “Yoda” conditions. - * - * @since 0.7.1 - * @see https://eslint.org/docs/rules/yoda - */ - yoda: - | Linter.RuleEntry< - [ - "never", - Partial<{ - exceptRange: boolean; - onlyEquality: boolean; - }>, - ] - > - | Linter.RuleEntry<["always"]>; -} diff --git a/web/static/node_modules/@types/eslint/rules/deprecated.d.ts b/web/static/node_modules/@types/eslint/rules/deprecated.d.ts deleted file mode 100644 index 0024d892..00000000 --- a/web/static/node_modules/@types/eslint/rules/deprecated.d.ts +++ /dev/null @@ -1,267 +0,0 @@ -import { Linter } from "../index"; - -export interface Deprecated extends Linter.RulesRecord { - /** - * Rule to enforce consistent indentation. - * - * @since 4.0.0-alpha.0 - * @deprecated since 4.0.0, use [`indent`](https://eslint.org/docs/rules/indent) instead. - * @see https://eslint.org/docs/rules/indent-legacy - */ - "indent-legacy": Linter.RuleEntry< - [ - number | "tab", - Partial<{ - /** - * @default 0 - */ - SwitchCase: number; - /** - * @default 1 - */ - VariableDeclarator: - | Partial<{ - /** - * @default 1 - */ - var: number | "first"; - /** - * @default 1 - */ - let: number | "first"; - /** - * @default 1 - */ - const: number | "first"; - }> - | number - | "first"; - /** - * @default 1 - */ - outerIIFEBody: number; - /** - * @default 1 - */ - MemberExpression: number | "off"; - /** - * @default { parameters: 1, body: 1 } - */ - FunctionDeclaration: Partial<{ - /** - * @default 1 - */ - parameters: number | "first" | "off"; - /** - * @default 1 - */ - body: number; - }>; - /** - * @default { parameters: 1, body: 1 } - */ - FunctionExpression: Partial<{ - /** - * @default 1 - */ - parameters: number | "first" | "off"; - /** - * @default 1 - */ - body: number; - }>; - /** - * @default { arguments: 1 } - */ - CallExpression: Partial<{ - /** - * @default 1 - */ - arguments: number | "first" | "off"; - }>; - /** - * @default 1 - */ - ArrayExpression: number | "first" | "off"; - /** - * @default 1 - */ - ObjectExpression: number | "first" | "off"; - /** - * @default 1 - */ - ImportDeclaration: number | "first" | "off"; - /** - * @default false - */ - flatTernaryExpressions: boolean; - ignoredNodes: string[]; - /** - * @default false - */ - ignoreComments: boolean; - }>, - ] - >; - - /** - * Rule to require or disallow newlines around directives. - * - * @since 3.5.0 - * @deprecated since 4.0.0, use [`padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) instead. - * @see https://eslint.org/docs/rules/lines-around-directive - */ - "lines-around-directive": Linter.RuleEntry<["always" | "never"]>; - - /** - * Rule to require or disallow an empty line after variable declarations. - * - * @since 0.18.0 - * @deprecated since 4.0.0, use [`padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) instead. - * @see https://eslint.org/docs/rules/newline-after-var - */ - "newline-after-var": Linter.RuleEntry<["always" | "never"]>; - - /** - * Rule to require an empty line before `return` statements. - * - * @since 2.3.0 - * @deprecated since 4.0.0, use [`padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) instead. - * @see https://eslint.org/docs/rules/newline-before-return - */ - "newline-before-return": Linter.RuleEntry<[]>; - - /** - * Rule to disallow shadowing of variables inside of `catch`. - * - * @since 0.0.9 - * @deprecated since 5.1.0, use [`no-shadow`](https://eslint.org/docs/rules/no-shadow) instead. - * @see https://eslint.org/docs/rules/no-catch-shadow - */ - "no-catch-shadow": Linter.RuleEntry<[]>; - - /** - * Rule to disallow reassignment of native objects. - * - * @since 0.0.9 - * @deprecated since 3.3.0, use [`no-global-assign`](https://eslint.org/docs/rules/no-global-assign) instead. - * @see https://eslint.org/docs/rules/no-native-reassign - */ - "no-native-reassign": Linter.RuleEntry< - [ - Partial<{ - exceptions: string[]; - }>, - ] - >; - - /** - * Rule to disallow negating the left operand in `in` expressions. - * - * @since 0.1.2 - * @deprecated since 3.3.0, use [`no-unsafe-negation`](https://eslint.org/docs/rules/no-unsafe-negation) instead. - * @see https://eslint.org/docs/rules/no-negated-in-lhs - */ - "no-negated-in-lhs": Linter.RuleEntry<[]>; - - /** - * Rule to disallow spacing between function identifiers and their applications. - * - * @since 0.1.2 - * @deprecated since 3.3.0, use [`func-call-spacing`](https://eslint.org/docs/rules/func-call-spacing) instead. - * @see https://eslint.org/docs/rules/no-spaced-func - */ - "no-spaced-func": Linter.RuleEntry<[]>; - - /** - * Rule to suggest using `Reflect` methods where applicable. - * - * @since 1.0.0-rc-2 - * @deprecated since 3.9.0 - * @see https://eslint.org/docs/rules/prefer-reflect - */ - "prefer-reflect": Linter.RuleEntry< - [ - Partial<{ - exceptions: string[]; - }>, - ] - >; - - /** - * Rule to require JSDoc comments. - * - * @since 1.4.0 - * @deprecated since 5.10.0 - * @see https://eslint.org/docs/rules/require-jsdoc - */ - "require-jsdoc": Linter.RuleEntry< - [ - Partial<{ - require: Partial<{ - /** - * @default true - */ - FunctionDeclaration: boolean; - /** - * @default false - */ - MethodDefinition: boolean; - /** - * @default false - */ - ClassDeclaration: boolean; - /** - * @default false - */ - ArrowFunctionExpression: boolean; - /** - * @default false - */ - FunctionExpression: boolean; - }>; - }>, - ] - >; - - /** - * Rule to enforce valid JSDoc comments. - * - * @since 0.4.0 - * @deprecated since 5.10.0 - * @see https://eslint.org/docs/rules/valid-jsdoc - */ - "valid-jsdoc": Linter.RuleEntry< - [ - Partial<{ - prefer: Record; - preferType: Record; - /** - * @default true - */ - requireReturn: boolean; - /** - * @default true - */ - requireReturnType: boolean; - /** - * @remarks - * Also accept for regular expression pattern - */ - matchDescription: string; - /** - * @default true - */ - requireParamDescription: boolean; - /** - * @default true - */ - requireReturnDescription: boolean; - /** - * @default true - */ - requireParamType: boolean; - }>, - ] - >; -} diff --git a/web/static/node_modules/@types/eslint/rules/ecmascript-6.d.ts b/web/static/node_modules/@types/eslint/rules/ecmascript-6.d.ts deleted file mode 100644 index 564a1dca..00000000 --- a/web/static/node_modules/@types/eslint/rules/ecmascript-6.d.ts +++ /dev/null @@ -1,534 +0,0 @@ -import { Linter } from "../index"; - -export interface ECMAScript6 extends Linter.RulesRecord { - /** - * Rule to require braces around arrow function bodies. - * - * @since 1.8.0 - * @see https://eslint.org/docs/rules/arrow-body-style - */ - "arrow-body-style": - | Linter.RuleEntry< - [ - "as-needed", - Partial<{ - /** - * @default false - */ - requireReturnForObjectLiteral: boolean; - }>, - ] - > - | Linter.RuleEntry<["always" | "never"]>; - - /** - * Rule to require parentheses around arrow function arguments. - * - * @since 1.0.0-rc-1 - * @see https://eslint.org/docs/rules/arrow-parens - */ - "arrow-parens": - | Linter.RuleEntry<["always"]> - | Linter.RuleEntry< - [ - "as-needed", - Partial<{ - /** - * @default false - */ - requireForBlockBody: boolean; - }>, - ] - >; - - /** - * Rule to enforce consistent spacing before and after the arrow in arrow functions. - * - * @since 1.0.0-rc-1 - * @see https://eslint.org/docs/rules/arrow-spacing - */ - "arrow-spacing": Linter.RuleEntry<[]>; - - /** - * Rule to require `super()` calls in constructors. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.24.0 - * @see https://eslint.org/docs/rules/constructor-super - */ - "constructor-super": Linter.RuleEntry<[]>; - - /** - * Rule to enforce consistent spacing around `*` operators in generator functions. - * - * @since 0.17.0 - * @see https://eslint.org/docs/rules/generator-star-spacing - */ - "generator-star-spacing": Linter.RuleEntry< - [ - | Partial<{ - before: boolean; - after: boolean; - named: - | Partial<{ - before: boolean; - after: boolean; - }> - | "before" - | "after" - | "both" - | "neither"; - anonymous: - | Partial<{ - before: boolean; - after: boolean; - }> - | "before" - | "after" - | "both" - | "neither"; - method: - | Partial<{ - before: boolean; - after: boolean; - }> - | "before" - | "after" - | "both" - | "neither"; - }> - | "before" - | "after" - | "both" - | "neither", - ] - >; - - /** - * Require or disallow logical assignment operator shorthand. - * - * @since 8.24.0 - * @see https://eslint.org/docs/rules/logical-assignment-operators - */ - "logical-assignment-operators": - | Linter.RuleEntry< - [ - "always", - Partial<{ - /** - * @default false - */ - enforceForIfStatements: boolean; - }>, - ] - > - | Linter.RuleEntry<["never"]>; - - /** - * Rule to disallow reassigning class members. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 1.0.0-rc-1 - * @see https://eslint.org/docs/rules/no-class-assign - */ - "no-class-assign": Linter.RuleEntry<[]>; - - /** - * Rule to disallow arrow functions where they could be confused with comparisons. - * - * @since 2.0.0-alpha-2 - * @see https://eslint.org/docs/rules/no-confusing-arrow - */ - "no-confusing-arrow": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - allowParens: boolean; - }>, - ] - >; - - /** - * Rule to disallow reassigning `const` variables. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 1.0.0-rc-1 - * @see https://eslint.org/docs/rules/no-const-assign - */ - "no-const-assign": Linter.RuleEntry<[]>; - - /** - * Rule to disallow duplicate class members. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 1.2.0 - * @see https://eslint.org/docs/rules/no-dupe-class-members - */ - "no-dupe-class-members": Linter.RuleEntry<[]>; - - /** - * Rule to disallow duplicate module imports. - * - * @since 2.5.0 - * @see https://eslint.org/docs/rules/no-duplicate-imports - */ - "no-duplicate-imports": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - includeExports: boolean; - }>, - ] - >; - - /** - * Rule to disallow `new` operators with the `Symbol` object. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 2.0.0-beta.1 - * @see https://eslint.org/docs/rules/no-new-symbol - */ - "no-new-symbol": Linter.RuleEntry<[]>; - - /** - * Rule to disallow specified modules when loaded by `import`. - * - * @since 2.0.0-alpha-1 - * @see https://eslint.org/docs/rules/no-restricted-imports - */ - "no-restricted-imports": Linter.RuleEntry< - [ - ...Array< - | string - | { - name: string; - importNames?: string[] | undefined; - message?: string | undefined; - } - | Partial<{ - paths: Array< - | string - | { - name: string; - importNames?: string[] | undefined; - message?: string | undefined; - } - >; - patterns: string[]; - }> - >, - ] - >; - - /** - * Rule to disallow `this`/`super` before calling `super()` in constructors. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.24.0 - * @see https://eslint.org/docs/rules/no-this-before-super - */ - "no-this-before-super": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unnecessary computed property keys in object literals. - * - * @since 2.9.0 - * @see https://eslint.org/docs/rules/no-useless-computed-key - */ - "no-useless-computed-key": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unnecessary constructors. - * - * @since 2.0.0-beta.1 - * @see https://eslint.org/docs/rules/no-useless-constructor - */ - "no-useless-constructor": Linter.RuleEntry<[]>; - - /** - * Rule to disallow renaming import, export, and destructured assignments to the same name. - * - * @since 2.11.0 - * @see https://eslint.org/docs/rules/no-useless-rename - */ - "no-useless-rename": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - ignoreImport: boolean; - /** - * @default false - */ - ignoreExport: boolean; - /** - * @default false - */ - ignoreDestructuring: boolean; - }>, - ] - >; - - /** - * Rule to require `let` or `const` instead of `var`. - * - * @since 0.12.0 - * @see https://eslint.org/docs/rules/no-var - */ - "no-var": Linter.RuleEntry<[]>; - - /** - * Rule to require or disallow method and property shorthand syntax for object literals. - * - * @since 0.20.0 - * @see https://eslint.org/docs/rules/object-shorthand - */ - "object-shorthand": - | Linter.RuleEntry< - [ - "always" | "methods", - Partial<{ - /** - * @default false - */ - avoidQuotes: boolean; - /** - * @default false - */ - ignoreConstructors: boolean; - /** - * @default false - */ - avoidExplicitReturnArrows: boolean; - }>, - ] - > - | Linter.RuleEntry< - [ - "properties", - Partial<{ - /** - * @default false - */ - avoidQuotes: boolean; - }>, - ] - > - | Linter.RuleEntry<["never" | "consistent" | "consistent-as-needed"]>; - - /** - * Rule to require using arrow functions for callbacks. - * - * @since 1.2.0 - * @see https://eslint.org/docs/rules/prefer-arrow-callback - */ - "prefer-arrow-callback": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - allowNamedFunctions: boolean; - /** - * @default true - */ - allowUnboundThis: boolean; - }>, - ] - >; - - /** - * Rule to require `const` declarations for variables that are never reassigned after declared. - * - * @since 0.23.0 - * @see https://eslint.org/docs/rules/prefer-const - */ - "prefer-const": Linter.RuleEntry< - [ - Partial<{ - /** - * @default 'any' - */ - destructuring: "any" | "all"; - /** - * @default false - */ - ignoreReadBeforeAssign: boolean; - }>, - ] - >; - - /** - * Rule to require destructuring from arrays and/or objects. - * - * @since 3.13.0 - * @see https://eslint.org/docs/rules/prefer-destructuring - */ - "prefer-destructuring": Linter.RuleEntry< - [ - Partial< - | { - VariableDeclarator: Partial<{ - array: boolean; - object: boolean; - }>; - AssignmentExpression: Partial<{ - array: boolean; - object: boolean; - }>; - } - | { - array: boolean; - object: boolean; - } - >, - Partial<{ - enforceForRenamedProperties: boolean; - }>, - ] - >; - - /** - * Disallow the use of `Math.pow` in favor of the `**` operator. - * - * @since 6.7.0 - * @see https://eslint.org/docs/latest/rules/prefer-exponentiation-operator - */ - "prefer-exponentiation-operator": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals. - * - * @since 3.5.0 - * @see https://eslint.org/docs/rules/prefer-numeric-literals - */ - "prefer-numeric-literals": Linter.RuleEntry<[]>; - - /** - * Rule to require rest parameters instead of `arguments`. - * - * @since 2.0.0-alpha-1 - * @see https://eslint.org/docs/rules/prefer-rest-params - */ - "prefer-rest-params": Linter.RuleEntry<[]>; - - /** - * Rule to require spread operators instead of `.apply()`. - * - * @since 1.0.0-rc-1 - * @see https://eslint.org/docs/rules/prefer-spread - */ - "prefer-spread": Linter.RuleEntry<[]>; - - /** - * Rule to require template literals instead of string concatenation. - * - * @since 1.2.0 - * @see https://eslint.org/docs/rules/prefer-template - */ - "prefer-template": Linter.RuleEntry<[]>; - - /** - * Rule to require generator functions to contain `yield`. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 1.0.0-rc-1 - * @see https://eslint.org/docs/rules/require-yield - */ - "require-yield": Linter.RuleEntry<[]>; - - /** - * Rule to enforce spacing between rest and spread operators and their expressions. - * - * @since 2.12.0 - * @see https://eslint.org/docs/rules/rest-spread-spacing - */ - "rest-spread-spacing": Linter.RuleEntry<["never" | "always"]>; - - /** - * Rule to enforce sorted import declarations within modules. - * - * @since 2.0.0-beta.1 - * @see https://eslint.org/docs/rules/sort-imports - */ - "sort-imports": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - ignoreCase: boolean; - /** - * @default false - */ - ignoreDeclarationSort: boolean; - /** - * @default false - */ - ignoreMemberSort: boolean; - /** - * @default ['none', 'all', 'multiple', 'single'] - */ - memberSyntaxSortOrder: Array<"none" | "all" | "multiple" | "single">; - /** - * @default false - */ - allowSeparatedGroups: boolean; - }>, - ] - >; - - /** - * Rule to require symbol descriptions. - * - * @since 3.4.0 - * @see https://eslint.org/docs/rules/symbol-description - */ - "symbol-description": Linter.RuleEntry<[]>; - - /** - * Rule to require or disallow spacing around embedded expressions of template strings. - * - * @since 2.0.0-rc.0 - * @see https://eslint.org/docs/rules/template-curly-spacing - */ - "template-curly-spacing": Linter.RuleEntry<["never" | "always"]>; - - /** - * Rule to require or disallow spacing around the `*` in `yield*` expressions. - * - * @since 2.0.0-alpha-1 - * @see https://eslint.org/docs/rules/yield-star-spacing - */ - "yield-star-spacing": Linter.RuleEntry< - [ - | Partial<{ - before: boolean; - after: boolean; - }> - | "before" - | "after" - | "both" - | "neither", - ] - >; -} diff --git a/web/static/node_modules/@types/eslint/rules/index.d.ts b/web/static/node_modules/@types/eslint/rules/index.d.ts deleted file mode 100644 index 7470777c..00000000 --- a/web/static/node_modules/@types/eslint/rules/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Linter } from "../index"; - -import { BestPractices } from "./best-practices"; -import { Deprecated } from "./deprecated"; -import { ECMAScript6 } from "./ecmascript-6"; -import { NodeJSAndCommonJS } from "./node-commonjs"; -import { PossibleErrors } from "./possible-errors"; -import { StrictMode } from "./strict-mode"; -import { StylisticIssues } from "./stylistic-issues"; -import { Variables } from "./variables"; - -export interface ESLintRules - extends - Linter.RulesRecord, - PossibleErrors, - BestPractices, - StrictMode, - Variables, - NodeJSAndCommonJS, - StylisticIssues, - ECMAScript6, - Deprecated -{} diff --git a/web/static/node_modules/@types/eslint/rules/node-commonjs.d.ts b/web/static/node_modules/@types/eslint/rules/node-commonjs.d.ts deleted file mode 100644 index 56a96e3e..00000000 --- a/web/static/node_modules/@types/eslint/rules/node-commonjs.d.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { Linter } from "../index"; - -export interface NodeJSAndCommonJS extends Linter.RulesRecord { - /** - * Rule to require `return` statements after callbacks. - * - * @since 1.0.0-rc-1 - * @see https://eslint.org/docs/rules/callback-return - */ - "callback-return": Linter.RuleEntry<[string[]]>; - - /** - * Rule to require `require()` calls to be placed at top-level module scope. - * - * @since 1.4.0 - * @see https://eslint.org/docs/rules/global-require - */ - "global-require": Linter.RuleEntry<[]>; - - /** - * Rule to require error handling in callbacks. - * - * @since 0.4.5 - * @see https://eslint.org/docs/rules/handle-callback-err - */ - "handle-callback-err": Linter.RuleEntry<[string]>; - - /** - * Rule to disallow use of the `Buffer()` constructor. - * - * @since 4.0.0-alpha.0 - * @see https://eslint.org/docs/rules/no-buffer-constructor - */ - "no-buffer-constructor": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `require` calls to be mixed with regular variable declarations. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-mixed-requires - */ - "no-mixed-requires": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - grouping: boolean; - /** - * @default false - */ - allowCall: boolean; - }>, - ] - >; - - /** - * Rule to disallow `new` operators with calls to `require`. - * - * @since 0.6.0 - * @see https://eslint.org/docs/rules/no-new-require - */ - "no-new-require": Linter.RuleEntry<[]>; - - /** - * Rule to disallow string concatenation when using `__dirname` and `__filename`. - * - * @since 0.4.0 - * @see https://eslint.org/docs/rules/no-path-concat - */ - "no-path-concat": Linter.RuleEntry<[]>; - - /** - * Rule to disallow the use of `process.env`. - * - * @since 0.9.0 - * @see https://eslint.org/docs/rules/no-process-env - */ - "no-process-env": Linter.RuleEntry<[]>; - - /** - * Rule to disallow the use of `process.exit()`. - * - * @since 0.4.0 - * @see https://eslint.org/docs/rules/no-process-exit - */ - "no-process-exit": Linter.RuleEntry<[]>; - - /** - * Rule to disallow specified modules when loaded by `require`. - * - * @since 0.6.0 - * @see https://eslint.org/docs/rules/no-restricted-modules - */ - "no-restricted-modules": Linter.RuleEntry< - [ - ...Array< - | string - | { - name: string; - message?: string | undefined; - } - | Partial<{ - paths: Array< - | string - | { - name: string; - message?: string | undefined; - } - >; - patterns: string[]; - }> - >, - ] - >; - - /** - * Rule to disallow synchronous methods. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-sync - */ - "no-sync": Linter.RuleEntry< - [ - { - /** - * @default false - */ - allowAtRootLevel: boolean; - }, - ] - >; -} diff --git a/web/static/node_modules/@types/eslint/rules/possible-errors.d.ts b/web/static/node_modules/@types/eslint/rules/possible-errors.d.ts deleted file mode 100644 index b6fb185d..00000000 --- a/web/static/node_modules/@types/eslint/rules/possible-errors.d.ts +++ /dev/null @@ -1,571 +0,0 @@ -import { Linter } from "../index"; - -export interface PossibleErrors extends Linter.RulesRecord { - /** - * Rule to enforce `for` loop update clause moving the counter in the right direction. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 4.0.0-beta.0 - * @see https://eslint.org/docs/rules/for-direction - */ - "for-direction": Linter.RuleEntry<[]>; - - /** - * Rule to enforce `return` statements in getters. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 4.2.0 - * @see https://eslint.org/docs/rules/getter-return - */ - "getter-return": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - allowImplicit: boolean; - }>, - ] - >; - - /** - * Rule to disallow using an async function as a `Promise` executor. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 5.3.0 - * @see https://eslint.org/docs/rules/no-async-promise-executor - */ - "no-async-promise-executor": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `await` inside of loops. - * - * @since 3.12.0 - * @see https://eslint.org/docs/rules/no-await-in-loop - */ - "no-await-in-loop": Linter.RuleEntry<[]>; - - /** - * Rule to disallow comparing against `-0`. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 3.17.0 - * @see https://eslint.org/docs/rules/no-compare-neg-zero - */ - "no-compare-neg-zero": Linter.RuleEntry<[]>; - - /** - * Rule to disallow assignment operators in conditional statements. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-cond-assign - */ - "no-cond-assign": Linter.RuleEntry<["except-parens" | "always"]>; - - /** - * Rule to disallow the use of `console`. - * - * @since 0.0.2 - * @see https://eslint.org/docs/rules/no-console - */ - "no-console": Linter.RuleEntry< - [ - Partial<{ - allow: Array; - }>, - ] - >; - - /** - * Rule to disallow constant expressions in conditions. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.4.1 - * @see https://eslint.org/docs/rules/no-constant-condition - */ - "no-constant-condition": Linter.RuleEntry< - [ - { - /** - * @default true - */ - checkLoops: boolean; - }, - ] - >; - - /** - * Rule to disallow control characters in regular expressions. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.1.0 - * @see https://eslint.org/docs/rules/no-control-regex - */ - "no-control-regex": Linter.RuleEntry<[]>; - - /** - * Rule to disallow the use of `debugger`. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.2 - * @see https://eslint.org/docs/rules/no-debugger - */ - "no-debugger": Linter.RuleEntry<[]>; - - /** - * Rule to disallow duplicate arguments in `function` definitions. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.16.0 - * @see https://eslint.org/docs/rules/no-dupe-args - */ - "no-dupe-args": Linter.RuleEntry<[]>; - - /** - * Disallow duplicate conditions in if-else-if chains. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 6.7.0 - * @see https://eslint.org/docs/rules/no-dupe-else-if - */ - "no-dupe-else-if": Linter.RuleEntry<[]>; - - /** - * Rule to disallow duplicate keys in object literals. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-dupe-keys - */ - "no-dupe-keys": Linter.RuleEntry<[]>; - - /** - * Rule to disallow a duplicate case label. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.17.0 - * @see https://eslint.org/docs/rules/no-duplicate-case - */ - "no-duplicate-case": Linter.RuleEntry<[]>; - - /** - * Rule to disallow empty block statements. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.2 - * @see https://eslint.org/docs/rules/no-empty - */ - "no-empty": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - allowEmptyCatch: boolean; - }>, - ] - >; - - /** - * Rule to disallow empty character classes in regular expressions. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.22.0 - * @see https://eslint.org/docs/rules/no-empty-character-class - */ - "no-empty-character-class": Linter.RuleEntry<[]>; - - /** - * Rule to disallow reassigning exceptions in `catch` clauses. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-ex-assign - */ - "no-ex-assign": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unnecessary boolean casts. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.4.0 - * @see https://eslint.org/docs/rules/no-extra-boolean-cast - */ - "no-extra-boolean-cast": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unnecessary parentheses. - * - * @since 0.1.4 - * @see https://eslint.org/docs/rules/no-extra-parens - */ - "no-extra-parens": - | Linter.RuleEntry< - [ - "all", - Partial<{ - /** - * @default true, - */ - conditionalAssign: boolean; - /** - * @default true - */ - returnAssign: boolean; - /** - * @default true - */ - nestedBinaryExpressions: boolean; - /** - * @default 'none' - */ - ignoreJSX: "none" | "all" | "multi-line" | "single-line"; - /** - * @default true - */ - enforceForArrowConditionals: boolean; - }>, - ] - > - | Linter.RuleEntry<["functions"]>; - - /** - * Rule to disallow unnecessary semicolons. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-extra-semi - */ - "no-extra-semi": Linter.RuleEntry<[]>; - - /** - * Rule to disallow reassigning `function` declarations. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-func-assign - */ - "no-func-assign": Linter.RuleEntry<[]>; - - /** - * Rule to disallow variable or `function` declarations in nested blocks. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.6.0 - * @see https://eslint.org/docs/rules/no-inner-declarations - */ - "no-inner-declarations": Linter.RuleEntry<["functions" | "both"]>; - - /** - * Rule to disallow invalid regular expression strings in `RegExp` constructors. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.1.4 - * @see https://eslint.org/docs/rules/no-invalid-regexp - */ - "no-invalid-regexp": Linter.RuleEntry< - [ - Partial<{ - allowConstructorFlags: string[]; - }>, - ] - >; - - /** - * Rule to disallow irregular whitespace. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.9.0 - * @see https://eslint.org/docs/rules/no-irregular-whitespace - */ - "no-irregular-whitespace": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - skipStrings: boolean; - /** - * @default false - */ - skipComments: boolean; - /** - * @default false - */ - skipRegExps: boolean; - /** - * @default false - */ - skipTemplates: boolean; - }>, - ] - >; - - /** - * Disallow literal numbers that lose precision. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 7.1.0 - * @see https://eslint.org/docs/latest/rules/no-loss-of-precision - */ - "no-loss-of-precision": Linter.RuleEntry<[]>; - - /** - * Rule to disallow characters which are made with multiple code points in character class syntax. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 5.3.0 - * @see https://eslint.org/docs/rules/no-misleading-character-class - */ - "no-misleading-character-class": Linter.RuleEntry<[]>; - - /** - * Rule to disallow calling global object properties as functions. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-obj-calls - */ - "no-obj-calls": Linter.RuleEntry<[]>; - - /** - * Rule to disallow returning values from Promise executor functions. - * - * @since 7.3.0 - * @see https://eslint.org/docs/rules/no-promise-executor-return - */ - "no-promise-executor-return": Linter.RuleEntry<[ - { - /** - * @default false - */ - allowVoid?: boolean; - }, - ]>; - - /** - * Rule to disallow use of `Object.prototypes` builtins directly. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 2.11.0 - * @see https://eslint.org/docs/rules/no-prototype-builtins - */ - "no-prototype-builtins": Linter.RuleEntry<[]>; - - /** - * Rule to disallow multiple spaces in regular expressions. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.4.0 - * @see https://eslint.org/docs/rules/no-regex-spaces - */ - "no-regex-spaces": Linter.RuleEntry<[]>; - - /** - * Rule to disallow sparse arrays. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.4.0 - * @see https://eslint.org/docs/rules/no-sparse-arrays - */ - "no-sparse-arrays": Linter.RuleEntry<[]>; - - /** - * Rule to disallow template literal placeholder syntax in regular strings. - * - * @since 3.3.0 - * @see https://eslint.org/docs/rules/no-template-curly-in-string - */ - "no-template-curly-in-string": Linter.RuleEntry<[]>; - - /** - * Rule to disallow confusing multiline expressions. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.24.0 - * @see https://eslint.org/docs/rules/no-unexpected-multiline - */ - "no-unexpected-multiline": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unreachable code after `return`, `throw`, `continue`, and `break` statements. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.6 - * @see https://eslint.org/docs/rules/no-unreachable - */ - "no-unreachable": Linter.RuleEntry<[]>; - - /** - * Disallow loops with a body that allows only one iteration. - * - * @since 7.3.0 - * @see https://eslint.org/docs/latest/rules/no-unreachable-loop - */ - "no-unreachable-loop": Linter.RuleEntry< - [ - Partial<{ - /** - * @default [] - */ - ignore: "WhileStatement" | "DoWhileStatement" | "ForStatement" | "ForInStatement" | "ForOfStatement"; - }>, - ] - >; - - /** - * Rule to disallow control flow statements in `finally` blocks. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 2.9.0 - * @see https://eslint.org/docs/rules/no-unsafe-finally - */ - "no-unsafe-finally": Linter.RuleEntry<[]>; - - /** - * Rule to disallow negating the left operand of relational operators. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 3.3.0 - * @see https://eslint.org/docs/rules/no-unsafe-negation - */ - "no-unsafe-negation": Linter.RuleEntry<[]>; - - /** - * Disallow use of optional chaining in contexts where the `undefined` value is not allowed. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 7.15.0 - * @see https://eslint.org/docs/rules/no-unsafe-optional-chaining - */ - "no-unsafe-optional-chaining": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - disallowArithmeticOperators: boolean; - }>, - ] - >; - - /** - * Rule to disallow assignments that can lead to race conditions due to usage of `await` or `yield`. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 5.3.0 - * @see https://eslint.org/docs/rules/require-atomic-updates - */ - "require-atomic-updates": Linter.RuleEntry<[]>; - - /** - * Rule to require calls to `isNaN()` when checking for `NaN`. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.6 - * @see https://eslint.org/docs/rules/use-isnan - */ - "use-isnan": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - enforceForSwitchCase: boolean; - /** - * @default true - */ - enforceForIndexOf: boolean; - }>, - ] - >; - - /** - * Rule to enforce comparing `typeof` expressions against valid strings. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.5.0 - * @see https://eslint.org/docs/rules/valid-typeof - */ - "valid-typeof": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - requireStringLiterals: boolean; - }>, - ] - >; -} diff --git a/web/static/node_modules/@types/eslint/rules/strict-mode.d.ts b/web/static/node_modules/@types/eslint/rules/strict-mode.d.ts deleted file mode 100644 index d63929b1..00000000 --- a/web/static/node_modules/@types/eslint/rules/strict-mode.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Linter } from "../index"; - -export interface StrictMode extends Linter.RulesRecord { - /** - * Rule to require or disallow strict mode directives. - * - * @since 0.1.0 - * @see https://eslint.org/docs/rules/strict - */ - strict: Linter.RuleEntry<["safe" | "global" | "function" | "never"]>; -} diff --git a/web/static/node_modules/@types/eslint/rules/stylistic-issues.d.ts b/web/static/node_modules/@types/eslint/rules/stylistic-issues.d.ts deleted file mode 100644 index ec2f2028..00000000 --- a/web/static/node_modules/@types/eslint/rules/stylistic-issues.d.ts +++ /dev/null @@ -1,1905 +0,0 @@ -import { Linter } from "../index"; - -export interface StylisticIssues extends Linter.RulesRecord { - /** - * Rule to enforce linebreaks after opening and before closing array brackets. - * - * @since 4.0.0-alpha.1 - * @see https://eslint.org/docs/rules/array-bracket-newline - */ - "array-bracket-newline": Linter.RuleEntry< - [ - | "always" - | "never" - | "consistent" - | Partial<{ - /** - * @default true - */ - multiline: boolean; - /** - * @default null - */ - minItems: number | null; - }>, - ] - >; - - /** - * Rule to enforce consistent spacing inside array brackets. - * - * @since 0.24.0 - * @see https://eslint.org/docs/rules/array-bracket-spacing - */ - "array-bracket-spacing": - | Linter.RuleEntry< - [ - "never", - Partial<{ - /** - * @default false - */ - singleValue: boolean; - /** - * @default false - */ - objectsInArrays: boolean; - /** - * @default false - */ - arraysInArrays: boolean; - }>, - ] - > - | Linter.RuleEntry< - [ - "always", - Partial<{ - /** - * @default true - */ - singleValue: boolean; - /** - * @default true - */ - objectsInArrays: boolean; - /** - * @default true - */ - arraysInArrays: boolean; - }>, - ] - >; - - /** - * Rule to enforce line breaks after each array element. - * - * @since 4.0.0-rc.0 - * @see https://eslint.org/docs/rules/array-element-newline - */ - "array-element-newline": Linter.RuleEntry< - [ - | "always" - | "never" - | "consistent" - | Partial<{ - /** - * @default true - */ - multiline: boolean; - /** - * @default null - */ - minItems: number | null; - }>, - ] - >; - - /** - * Rule to disallow or enforce spaces inside of blocks after opening block and before closing block. - * - * @since 1.2.0 - * @see https://eslint.org/docs/rules/block-spacing - */ - "block-spacing": Linter.RuleEntry<["always" | "never"]>; - - /** - * Rule to enforce consistent brace style for blocks. - * - * @since 0.0.7 - * @see https://eslint.org/docs/rules/brace-style - */ - "brace-style": Linter.RuleEntry< - [ - "1tbs" | "stroustrup" | "allman", - Partial<{ - /** - * @default false - */ - allowSingleLine: boolean; - }>, - ] - >; - - /** - * Rule to enforce camelcase naming convention. - * - * @since 0.0.2 - * @see https://eslint.org/docs/rules/camelcase - */ - camelcase: Linter.RuleEntry< - [ - Partial<{ - /** - * @default 'always' - */ - properties: "always" | "never"; - /** - * @default false - */ - ignoreDestructuring: boolean; - /** - * @remarks - * Also accept for regular expression patterns - */ - allow: string[]; - }>, - ] - >; - - /** - * Rule to enforce or disallow capitalization of the first letter of a comment. - * - * @since 3.11.0 - * @see https://eslint.org/docs/rules/capitalized-comments - */ - "capitalized-comments": Linter.RuleEntry< - [ - "always" | "never", - Partial<{ - ignorePattern: string; - /** - * @default false - */ - ignoreInlineComments: boolean; - /** - * @default false - */ - ignoreConsecutiveComments: boolean; - }>, - ] - >; - - /** - * Rule to require or disallow trailing commas. - * - * @since 0.16.0 - * @see https://eslint.org/docs/rules/comma-dangle - */ - "comma-dangle": Linter.RuleEntry< - [ - | "never" - | "always" - | "always-multiline" - | "only-multiline" - | Partial<{ - /** - * @default 'never' - */ - arrays: "never" | "always" | "always-multiline" | "only-multiline"; - /** - * @default 'never' - */ - objects: "never" | "always" | "always-multiline" | "only-multiline"; - /** - * @default 'never' - */ - imports: "never" | "always" | "always-multiline" | "only-multiline"; - /** - * @default 'never' - */ - exports: "never" | "always" | "always-multiline" | "only-multiline"; - /** - * @default 'never' - */ - functions: "never" | "always" | "always-multiline" | "only-multiline"; - }>, - ] - >; - - /** - * Rule to enforce consistent spacing before and after commas. - * - * @since 0.9.0 - * @see https://eslint.org/docs/rules/comma-spacing - */ - "comma-spacing": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - before: boolean; - /** - * @default true - */ - after: boolean; - }>, - ] - >; - - /** - * Rule to enforce consistent comma style. - * - * @since 0.9.0 - * @see https://eslint.org/docs/rules/comma-style - */ - "comma-style": Linter.RuleEntry< - [ - "last" | "first", - Partial<{ - exceptions: Record; - }>, - ] - >; - - /** - * Rule to enforce consistent spacing inside computed property brackets. - * - * @since 0.23.0 - * @see https://eslint.org/docs/rules/computed-property-spacing - */ - "computed-property-spacing": Linter.RuleEntry<["never" | "always"]>; - - /** - * Rule to enforce consistent naming when capturing the current execution context. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/consistent-this - */ - "consistent-this": Linter.RuleEntry<[...string[]]>; - - /** - * Rule to require or disallow newline at the end of files. - * - * @since 0.7.1 - * @see https://eslint.org/docs/rules/eol-last - */ - "eol-last": Linter.RuleEntry< - [ - "always" | "never", // | 'unix' | 'windows' - ] - >; - - /** - * Rule to require or disallow spacing between function identifiers and their invocations. - * - * @since 3.3.0 - * @see https://eslint.org/docs/rules/func-call-spacing - */ - "func-call-spacing": Linter.RuleEntry<["never" | "always"]>; - - /** - * Rule to require function names to match the name of the variable or property to which they are assigned. - * - * @since 3.8.0 - * @see https://eslint.org/docs/rules/func-name-matching - */ - "func-name-matching": - | Linter.RuleEntry< - [ - "always" | "never", - Partial<{ - /** - * @default false - */ - considerPropertyDescriptor: boolean; - /** - * @default false - */ - includeCommonJSModuleExports: boolean; - }>, - ] - > - | Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - considerPropertyDescriptor: boolean; - /** - * @default false - */ - includeCommonJSModuleExports: boolean; - }>, - ] - >; - - /** - * Rule to require or disallow named `function` expressions. - * - * @since 0.4.0 - * @see https://eslint.org/docs/rules/func-names - */ - "func-names": Linter.RuleEntry< - [ - "always" | "as-needed" | "never", - Partial<{ - generators: "always" | "as-needed" | "never"; - }>, - ] - >; - - /** - * Rule to enforce the consistent use of either `function` declarations or expressions. - * - * @since 0.2.0 - * @see https://eslint.org/docs/rules/func-style - */ - "func-style": Linter.RuleEntry< - [ - "expression" | "declaration", - Partial<{ - /** - * @default false - */ - allowArrowFunctions: boolean; - }>, - ] - >; - - /** - * Rule to enforce consistent line breaks inside function parentheses. - * - * @since 4.6.0 - * @see https://eslint.org/docs/rules/function-paren-newline - */ - "function-paren-newline": Linter.RuleEntry< - [ - | "always" - | "never" - | "multiline" - | "multiline-arguments" - | "consistent" - | Partial<{ - minItems: number; - }>, - ] - >; - - /** - * Rule to disallow specified identifiers. - * - * @since 2.0.0-beta.2 - * @see https://eslint.org/docs/rules/id-blacklist - */ - "id-blacklist": Linter.RuleEntry<[...string[]]>; - - /** - * Rule to enforce minimum and maximum identifier lengths. - * - * @since 1.0.0 - * @see https://eslint.org/docs/rules/id-length - */ - "id-length": Linter.RuleEntry< - [ - Partial<{ - /** - * @default 2 - */ - min: number; - /** - * @default Infinity - */ - max: number; - /** - * @default 'always' - */ - properties: "always" | "never"; - exceptions: string[]; - }>, - ] - >; - - /** - * Rule to require identifiers to match a specified regular expression. - * - * @since 1.0.0 - * @see https://eslint.org/docs/rules/id-match - */ - "id-match": Linter.RuleEntry< - [ - string, - Partial<{ - /** - * @default false - */ - properties: boolean; - /** - * @default false - */ - onlyDeclarations: boolean; - /** - * @default false - */ - ignoreDestructuring: boolean; - }>, - ] - >; - - /** - * Rule to enforce the location of arrow function bodies. - * - * @since 4.12.0 - * @see https://eslint.org/docs/rules/implicit-arrow-linebreak - */ - "implicit-arrow-linebreak": Linter.RuleEntry<["beside" | "below"]>; - - /** - * Rule to enforce consistent indentation. - * - * @since 0.14.0 - * @see https://eslint.org/docs/rules/indent - */ - indent: Linter.RuleEntry< - [ - number | "tab", - Partial<{ - /** - * @default 0 - */ - SwitchCase: number; - /** - * @default 1 - */ - VariableDeclarator: - | Partial<{ - /** - * @default 1 - */ - var: number | "first"; - /** - * @default 1 - */ - let: number | "first"; - /** - * @default 1 - */ - const: number | "first"; - }> - | number - | "first"; - /** - * @default 1 - */ - outerIIFEBody: number; - /** - * @default 1 - */ - MemberExpression: number | "off"; - /** - * @default { parameters: 1, body: 1 } - */ - FunctionDeclaration: Partial<{ - /** - * @default 1 - */ - parameters: number | "first" | "off"; - /** - * @default 1 - */ - body: number; - }>; - /** - * @default { parameters: 1, body: 1 } - */ - FunctionExpression: Partial<{ - /** - * @default 1 - */ - parameters: number | "first" | "off"; - /** - * @default 1 - */ - body: number; - }>; - /** - * @default { arguments: 1 } - */ - CallExpression: Partial<{ - /** - * @default 1 - */ - arguments: number | "first" | "off"; - }>; - /** - * @default 1 - */ - ArrayExpression: number | "first" | "off"; - /** - * @default 1 - */ - ObjectExpression: number | "first" | "off"; - /** - * @default 1 - */ - ImportDeclaration: number | "first" | "off"; - /** - * @default false - */ - flatTernaryExpressions: boolean; - ignoredNodes: string[]; - /** - * @default false - */ - ignoreComments: boolean; - }>, - ] - >; - - /** - * Rule to enforce the consistent use of either double or single quotes in JSX attributes. - * - * @since 1.4.0 - * @see https://eslint.org/docs/rules/jsx-quotes - */ - "jsx-quotes": Linter.RuleEntry<["prefer-double" | "prefer-single"]>; - - /** - * Rule to enforce consistent spacing between keys and values in object literal properties. - * - * @since 0.9.0 - * @see https://eslint.org/docs/rules/key-spacing - */ - "key-spacing": Linter.RuleEntry< - [ - | Partial< - | { - /** - * @default false - */ - beforeColon: boolean; - /** - * @default true - */ - afterColon: boolean; - /** - * @default 'strict' - */ - mode: "strict" | "minimum"; - align: - | Partial<{ - /** - * @default false - */ - beforeColon: boolean; - /** - * @default true - */ - afterColon: boolean; - /** - * @default 'colon' - */ - on: "value" | "colon"; - /** - * @default 'strict' - */ - mode: "strict" | "minimum"; - }> - | "value" - | "colon"; - } - | { - singleLine?: - | Partial<{ - /** - * @default false - */ - beforeColon: boolean; - /** - * @default true - */ - afterColon: boolean; - /** - * @default 'strict' - */ - mode: "strict" | "minimum"; - }> - | undefined; - multiLine?: - | Partial<{ - /** - * @default false - */ - beforeColon: boolean; - /** - * @default true - */ - afterColon: boolean; - /** - * @default 'strict' - */ - mode: "strict" | "minimum"; - align: - | Partial<{ - /** - * @default false - */ - beforeColon: boolean; - /** - * @default true - */ - afterColon: boolean; - /** - * @default 'colon' - */ - on: "value" | "colon"; - /** - * @default 'strict' - */ - mode: "strict" | "minimum"; - }> - | "value" - | "colon"; - }> - | undefined; - } - > - | { - align: Partial<{ - /** - * @default false - */ - beforeColon: boolean; - /** - * @default true - */ - afterColon: boolean; - /** - * @default 'colon' - */ - on: "value" | "colon"; - /** - * @default 'strict' - */ - mode: "strict" | "minimum"; - }>; - singleLine?: - | Partial<{ - /** - * @default false - */ - beforeColon: boolean; - /** - * @default true - */ - afterColon: boolean; - /** - * @default 'strict' - */ - mode: "strict" | "minimum"; - }> - | undefined; - multiLine?: - | Partial<{ - /** - * @default false - */ - beforeColon: boolean; - /** - * @default true - */ - afterColon: boolean; - /** - * @default 'strict' - */ - mode: "strict" | "minimum"; - }> - | undefined; - }, - ] - >; - - /** - * Rule to enforce consistent spacing before and after keywords. - * - * @since 2.0.0-beta.1 - * @see https://eslint.org/docs/rules/keyword-spacing - */ - "keyword-spacing": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - before: boolean; - /** - * @default true - */ - after: boolean; - overrides: Record< - string, - Partial<{ - before: boolean; - after: boolean; - }> - >; - }>, - ] - >; - - /** - * Rule to enforce position of line comments. - * - * @since 3.5.0 - * @see https://eslint.org/docs/rules/line-comment-position - */ - "line-comment-position": Linter.RuleEntry< - [ - Partial<{ - /** - * @default 'above' - */ - position: "above" | "beside"; - ignorePattern: string; - /** - * @default true - */ - applyDefaultIgnorePatterns: boolean; - }>, - ] - >; - - /** - * Rule to enforce consistent linebreak style. - * - * @since 0.21.0 - * @see https://eslint.org/docs/rules/linebreak-style - */ - "linebreak-style": Linter.RuleEntry<["unix" | "windows"]>; - - /** - * Rule to require empty lines around comments. - * - * @since 0.22.0 - * @see https://eslint.org/docs/rules/lines-around-comment - */ - "lines-around-comment": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - beforeBlockComment: boolean; - /** - * @default false - */ - afterBlockComment: boolean; - /** - * @default false - */ - beforeLineComment: boolean; - /** - * @default false - */ - afterLineComment: boolean; - /** - * @default false - */ - allowBlockStart: boolean; - /** - * @default false - */ - allowBlockEnd: boolean; - /** - * @default false - */ - allowObjectStart: boolean; - /** - * @default false - */ - allowObjectEnd: boolean; - /** - * @default false - */ - allowArrayStart: boolean; - /** - * @default false - */ - allowArrayEnd: boolean; - /** - * @default false - */ - allowClassStart: boolean; - /** - * @default false - */ - allowClassEnd: boolean; - ignorePattern: string; - /** - * @default true - */ - applyDefaultIgnorePatterns: boolean; - }>, - ] - >; - - /** - * Rule to require or disallow an empty line between class members. - * - * @since 4.9.0 - * @see https://eslint.org/docs/rules/lines-between-class-members - */ - "lines-between-class-members": Linter.RuleEntry< - [ - "always" | "never", - Partial<{ - /** - * @default false - */ - exceptAfterSingleLine: boolean; - }>, - ] - >; - - /** - * Rule to enforce a maximum depth that blocks can be nested. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/max-depth - */ - "max-depth": Linter.RuleEntry< - [ - Partial<{ - /** - * @default 4 - */ - max: number; - }>, - ] - >; - - /** - * Rule to enforce a maximum line length. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/max-len - */ - "max-len": Linter.RuleEntry< - [ - Partial<{ - /** - * @default 80 - */ - code: number; - /** - * @default 4 - */ - tabWidth: number; - comments: number; - ignorePattern: string; - /** - * @default false - */ - ignoreComments: boolean; - /** - * @default false - */ - ignoreTrailingComments: boolean; - /** - * @default false - */ - ignoreUrls: boolean; - /** - * @default false - */ - ignoreStrings: boolean; - /** - * @default false - */ - ignoreTemplateLiterals: boolean; - /** - * @default false - */ - ignoreRegExpLiterals: boolean; - }>, - ] - >; - - /** - * Rule to enforce a maximum number of lines per file. - * - * @since 2.12.0 - * @see https://eslint.org/docs/rules/max-lines - */ - "max-lines": Linter.RuleEntry< - [ - | Partial<{ - /** - * @default 300 - */ - max: number; - /** - * @default false - */ - skipBlankLines: boolean; - /** - * @default false - */ - skipComments: boolean; - }> - | number, - ] - >; - - /** - * Rule to enforce a maximum number of line of code in a function. - * - * @since 5.0.0 - * @see https://eslint.org/docs/rules/max-lines-per-function - */ - "max-lines-per-function": Linter.RuleEntry< - [ - Partial<{ - /** - * @default 50 - */ - max: number; - /** - * @default false - */ - skipBlankLines: boolean; - /** - * @default false - */ - skipComments: boolean; - /** - * @default false - */ - IIFEs: boolean; - }>, - ] - >; - - /** - * Rule to enforce a maximum depth that callbacks can be nested. - * - * @since 0.2.0 - * @see https://eslint.org/docs/rules/max-nested-callbacks - */ - "max-nested-callbacks": Linter.RuleEntry< - [ - | Partial<{ - /** - * @default 10 - */ - max: number; - }> - | number, - ] - >; - - /** - * Rule to enforce a maximum number of parameters in function definitions. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/max-params - */ - "max-params": Linter.RuleEntry< - [ - | Partial<{ - /** - * @default 3 - */ - max: number; - }> - | number, - ] - >; - - /** - * Rule to enforce a maximum number of statements allowed in function blocks. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/max-statements - */ - "max-statements": Linter.RuleEntry< - [ - | Partial<{ - /** - * @default 10 - */ - max: number; - /** - * @default false - */ - ignoreTopLevelFunctions: boolean; - }> - | number, - ] - >; - - /** - * Rule to enforce a maximum number of statements allowed per line. - * - * @since 2.5.0 - * @see https://eslint.org/docs/rules/max-statements-per-line - */ - "max-statements-per-line": Linter.RuleEntry< - [ - | Partial<{ - /** - * @default 1 - */ - max: number; - }> - | number, - ] - >; - - /** - * Rule to enforce a particular style for multiline comments. - * - * @since 4.10.0 - * @see https://eslint.org/docs/rules/multiline-comment-style - */ - "multiline-comment-style": Linter.RuleEntry<["starred-block" | "bare-block" | "separate-lines"]>; - - /** - * Rule to enforce newlines between operands of ternary expressions. - * - * @since 3.1.0 - * @see https://eslint.org/docs/rules/multiline-ternary - */ - "multiline-ternary": Linter.RuleEntry<["always" | "always-multiline" | "never"]>; - - /** - * Rule to require constructor names to begin with a capital letter. - * - * @since 0.0.3-0 - * @see https://eslint.org/docs/rules/new-cap - */ - "new-cap": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - newIsCap: boolean; - /** - * @default true - */ - capIsNew: boolean; - newIsCapExceptions: string[]; - newIsCapExceptionPattern: string; - capIsNewExceptions: string[]; - capIsNewExceptionPattern: string; - /** - * @default true - */ - properties: boolean; - }>, - ] - >; - - /** - * Rule to enforce or disallow parentheses when invoking a constructor with no arguments. - * - * @since 0.0.6 - * @see https://eslint.org/docs/rules/new-parens - */ - "new-parens": Linter.RuleEntry<["always" | "never"]>; - - /** - * Rule to require a newline after each call in a method chain. - * - * @since 2.0.0-rc.0 - * @see https://eslint.org/docs/rules/newline-per-chained-call - */ - "newline-per-chained-call": Linter.RuleEntry< - [ - { - /** - * @default 2 - */ - ignoreChainWithDepth: number; - }, - ] - >; - - /** - * Rule to disallow `Array` constructors. - * - * @since 0.4.0 - * @see https://eslint.org/docs/rules/no-array-constructor - */ - "no-array-constructor": Linter.RuleEntry<[]>; - - /** - * Rule to disallow bitwise operators. - * - * @since 0.0.2 - * @see https://eslint.org/docs/rules/no-bitwise - */ - "no-bitwise": Linter.RuleEntry< - [ - Partial<{ - allow: string[]; - /** - * @default false - */ - int32Hint: boolean; - }>, - ] - >; - - /** - * Rule to disallow `continue` statements. - * - * @since 0.19.0 - * @see https://eslint.org/docs/rules/no-continue - */ - "no-continue": Linter.RuleEntry<[]>; - - /** - * Rule to disallow inline comments after code. - * - * @since 0.10.0 - * @see https://eslint.org/docs/rules/no-inline-comments - */ - "no-inline-comments": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `if` statements as the only statement in `else` blocks. - * - * @since 0.6.0 - * @see https://eslint.org/docs/rules/no-lonely-if - */ - "no-lonely-if": Linter.RuleEntry<[]>; - - /** - * Rule to disallow mixed binary operators. - * - * @since 2.12.0 - * @see https://eslint.org/docs/rules/no-mixed-operators - */ - "no-mixed-operators": Linter.RuleEntry< - [ - Partial<{ - /** - * @default - * [ - * ["+", "-", "*", "/", "%", "**"], - * ["&", "|", "^", "~", "<<", ">>", ">>>"], - * ["==", "!=", "===", "!==", ">", ">=", "<", "<="], - * ["&&", "||"], - * ["in", "instanceof"] - * ] - */ - groups: string[][]; - /** - * @default true - */ - allowSamePrecedence: boolean; - }>, - ] - >; - - /** - * Rule to disallow mixed spaces and tabs for indentation. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.7.1 - * @see https://eslint.org/docs/rules/no-mixed-spaces-and-tabs - */ - "no-mixed-spaces-and-tabs": Linter.RuleEntry<["smart-tabs"]>; - - /** - * Rule to disallow use of chained assignment expressions. - * - * @since 3.14.0 - * @see https://eslint.org/docs/rules/no-multi-assign - */ - "no-multi-assign": Linter.RuleEntry<[]>; - - /** - * Rule to disallow multiple empty lines. - * - * @since 0.9.0 - * @see https://eslint.org/docs/rules/no-multiple-empty-lines - */ - "no-multiple-empty-lines": Linter.RuleEntry< - [ - | Partial<{ - /** - * @default 2 - */ - max: number; - maxEOF: number; - maxBOF: number; - }> - | number, - ] - >; - - /** - * Rule to disallow negated conditions. - * - * @since 1.6.0 - * @see https://eslint.org/docs/rules/no-negated-condition - */ - "no-negated-condition": Linter.RuleEntry<[]>; - - /** - * Rule to disallow nested ternary expressions. - * - * @since 0.2.0 - * @see https://eslint.org/docs/rules/no-nested-ternary - */ - "no-nested-ternary": Linter.RuleEntry<[]>; - - /** - * Rule to disallow `Object` constructors. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-new-object - */ - "no-new-object": Linter.RuleEntry<[]>; - - /** - * Rule to disallow the unary operators `++` and `--`. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-plusplus - */ - "no-plusplus": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - allowForLoopAfterthoughts: boolean; - }>, - ] - >; - - /** - * Rule to disallow specified syntax. - * - * @since 1.4.0 - * @see https://eslint.org/docs/rules/no-restricted-syntax - */ - "no-restricted-syntax": Linter.RuleEntry< - [ - ...Array< - | string - | { - selector: string; - message?: string | undefined; - } - >, - ] - >; - - /** - * Rule to disallow all tabs. - * - * @since 3.2.0 - * @see https://eslint.org/docs/rules/no-tabs - */ - "no-tabs": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - allowIndentationTabs: boolean; - }>, - ] - >; - - /** - * Rule to disallow ternary operators. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-ternary - */ - "no-ternary": Linter.RuleEntry<[]>; - - /** - * Rule to disallow trailing whitespace at the end of lines. - * - * @since 0.7.1 - * @see https://eslint.org/docs/rules/no-trailing-spaces - */ - "no-trailing-spaces": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - skipBlankLines: boolean; - /** - * @default false - */ - ignoreComments: boolean; - }>, - ] - >; - - /** - * Rule to disallow dangling underscores in identifiers. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-underscore-dangle - */ - "no-underscore-dangle": Linter.RuleEntry< - [ - Partial<{ - allow: string[]; - /** - * @default false - */ - allowAfterThis: boolean; - /** - * @default false - */ - allowAfterSuper: boolean; - /** - * @default false - */ - enforceInMethodNames: boolean; - }>, - ] - >; - - /** - * Rule to disallow ternary operators when simpler alternatives exist. - * - * @since 0.21.0 - * @see https://eslint.org/docs/rules/no-unneeded-ternary - */ - "no-unneeded-ternary": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - defaultAssignment: boolean; - }>, - ] - >; - - /** - * Rule to disallow whitespace before properties. - * - * @since 2.0.0-beta.1 - * @see https://eslint.org/docs/rules/no-whitespace-before-property - */ - "no-whitespace-before-property": Linter.RuleEntry<[]>; - - /** - * Rule to enforce the location of single-line statements. - * - * @since 3.17.0 - * @see https://eslint.org/docs/rules/nonblock-statement-body-position - */ - "nonblock-statement-body-position": Linter.RuleEntry< - [ - "beside" | "below" | "any", - Partial<{ - overrides: Record; - }>, - ] - >; - - /** - * Rule to enforce consistent line breaks inside braces. - * - * @since 2.12.0 - * @see https://eslint.org/docs/rules/object-curly-newline - */ - "object-curly-newline": Linter.RuleEntry< - [ - | "always" - | "never" - | Partial<{ - /** - * @default false - */ - multiline: boolean; - minProperties: number; - /** - * @default true - */ - consistent: boolean; - }> - | Partial< - Record< - "ObjectExpression" | "ObjectPattern" | "ImportDeclaration" | "ExportDeclaration", - | "always" - | "never" - | Partial<{ - /** - * @default false - */ - multiline: boolean; - minProperties: number; - /** - * @default true - */ - consistent: boolean; - }> - > - >, - ] - >; - - /** - * Rule to enforce consistent spacing inside braces. - * - * @since 0.22.0 - * @see https://eslint.org/docs/rules/object-curly-spacing - */ - "object-curly-spacing": - | Linter.RuleEntry< - [ - "never", - { - /** - * @default false - */ - arraysInObjects: boolean; - /** - * @default false - */ - objectsInObjects: boolean; - }, - ] - > - | Linter.RuleEntry< - [ - "always", - { - /** - * @default true - */ - arraysInObjects: boolean; - /** - * @default true - */ - objectsInObjects: boolean; - }, - ] - >; - - /** - * Rule to enforce placing object properties on separate lines. - * - * @since 2.10.0 - * @see https://eslint.org/docs/rules/object-property-newline - */ - "object-property-newline": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - allowAllPropertiesOnSameLine: boolean; - }>, - ] - >; - - /** - * Rule to enforce variables to be declared either together or separately in functions. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/one-var - */ - "one-var": Linter.RuleEntry< - [ - | "always" - | "never" - | "consecutive" - | Partial< - { - /** - * @default false - */ - separateRequires: boolean; - } & Record<"var" | "let" | "const", "always" | "never" | "consecutive"> - > - | Partial>, - ] - >; - - /** - * Rule to require or disallow newlines around variable declarations. - * - * @since 2.0.0-beta.3 - * @see https://eslint.org/docs/rules/one-var-declaration-per-line - */ - "one-var-declaration-per-line": Linter.RuleEntry<["initializations" | "always"]>; - - /** - * Rule to require or disallow assignment operator shorthand where possible. - * - * @since 0.10.0 - * @see https://eslint.org/docs/rules/operator-assignment - */ - "operator-assignment": Linter.RuleEntry<["always" | "never"]>; - - /** - * Rule to enforce consistent linebreak style for operators. - * - * @since 0.19.0 - * @see https://eslint.org/docs/rules/operator-linebreak - */ - "operator-linebreak": Linter.RuleEntry< - [ - "after" | "before" | "none", - Partial<{ - overrides: Record; - }>, - ] - >; - - /** - * Rule to require or disallow padding within blocks. - * - * @since 0.9.0 - * @see https://eslint.org/docs/rules/padded-blocks - */ - "padded-blocks": Linter.RuleEntry< - [ - "always" | "never" | Partial>, - { - /** - * @default false - */ - allowSingleLineBlocks: boolean; - }, - ] - >; - - /** - * Rule to require or disallow padding lines between statements. - * - * @since 4.0.0-beta.0 - * @see https://eslint.org/docs/rules/padding-line-between-statements - */ - "padding-line-between-statements": Linter.RuleEntry< - [ - ...Array< - { - blankLine: "any" | "never" | "always"; - } & Record<"prev" | "next", string | string[]> - >, - ] - >; - - /** - * Rule to disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead. - * - * @since 5.0.0-alpha.3 - * @see https://eslint.org/docs/rules/prefer-object-spread - */ - "prefer-object-spread": Linter.RuleEntry<[]>; - - /** - * Rule to require quotes around object literal property names. - * - * @since 0.0.6 - * @see https://eslint.org/docs/rules/quote-props - */ - "quote-props": - | Linter.RuleEntry<["always" | "consistent"]> - | Linter.RuleEntry< - [ - "as-needed", - Partial<{ - /** - * @default false - */ - keywords: boolean; - /** - * @default true - */ - unnecessary: boolean; - /** - * @default false - */ - numbers: boolean; - }>, - ] - > - | Linter.RuleEntry< - [ - "consistent-as-needed", - Partial<{ - /** - * @default false - */ - keywords: boolean; - }>, - ] - >; - - /** - * Rule to enforce the consistent use of either backticks, double, or single quotes. - * - * @since 0.0.7 - * @see https://eslint.org/docs/rules/quotes - */ - quotes: Linter.RuleEntry< - [ - "double" | "single" | "backtick", - Partial<{ - /** - * @default false - */ - avoidEscape: boolean; - /** - * @default false - */ - allowTemplateLiterals: boolean; - }>, - ] - >; - - /** - * Rule to require or disallow semicolons instead of ASI. - * - * @since 0.0.6 - * @see https://eslint.org/docs/rules/semi - */ - semi: - | Linter.RuleEntry< - [ - "always", - Partial<{ - /** - * @default false - */ - omitLastInOneLineBlock: boolean; - }>, - ] - > - | Linter.RuleEntry< - [ - "never", - Partial<{ - /** - * @default 'any' - */ - beforeStatementContinuationChars: "any" | "always" | "never"; - }>, - ] - >; - - /** - * Rule to enforce consistent spacing before and after semicolons. - * - * @since 0.16.0 - * @see https://eslint.org/docs/rules/semi-spacing - */ - "semi-spacing": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - before: boolean; - /** - * @default true - */ - after: boolean; - }>, - ] - >; - - /** - * Rule to enforce location of semicolons. - * - * @since 4.0.0-beta.0 - * @see https://eslint.org/docs/rules/semi-style - */ - "semi-style": Linter.RuleEntry<["last" | "first"]>; - - /** - * Rule to require object keys to be sorted. - * - * @since 3.3.0 - * @see https://eslint.org/docs/rules/sort-keys - */ - "sort-keys": Linter.RuleEntry< - [ - "asc" | "desc", - Partial<{ - /** - * @default true - */ - caseSensitive: boolean; - /** - * @default 2 - */ - minKeys: number; - /** - * @default false - */ - natural: boolean; - /** - * @default false - */ - allowLineSeparatedGroups: boolean; - }>, - ] - >; - - /** - * Rule to require variables within the same declaration block to be sorted. - * - * @since 0.2.0 - * @see https://eslint.org/docs/rules/sort-vars - */ - "sort-vars": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - ignoreCase: boolean; - }>, - ] - >; - - /** - * Rule to enforce consistent spacing before blocks. - * - * @since 0.9.0 - * @see https://eslint.org/docs/rules/space-before-blocks - */ - "space-before-blocks": Linter.RuleEntry< - ["always" | "never" | Partial>] - >; - - /** - * Rule to enforce consistent spacing before `function` definition opening parenthesis. - * - * @since 0.18.0 - * @see https://eslint.org/docs/rules/space-before-function-paren - */ - "space-before-function-paren": Linter.RuleEntry< - ["always" | "never" | Partial>] - >; - - /** - * Rule to enforce consistent spacing inside parentheses. - * - * @since 0.8.0 - * @see https://eslint.org/docs/rules/space-in-parens - */ - "space-in-parens": Linter.RuleEntry< - [ - "never" | "always", - Partial<{ - exceptions: string[]; - }>, - ] - >; - - /** - * Rule to require spacing around infix operators. - * - * @since 0.2.0 - * @see https://eslint.org/docs/rules/space-infix-ops - */ - "space-infix-ops": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - int32Hint: boolean; - }>, - ] - >; - - /** - * Rule to enforce consistent spacing before or after unary operators. - * - * @since 0.10.0 - * @see https://eslint.org/docs/rules/space-unary-ops - */ - "space-unary-ops": Linter.RuleEntry< - [ - Partial<{ - /** - * @default true - */ - words: boolean; - /** - * @default false - */ - nonwords: boolean; - overrides: Record; - }>, - ] - >; - - /** - * Rule to enforce consistent spacing after the `//` or `/*` in a comment. - * - * @since 0.23.0 - * @see https://eslint.org/docs/rules/spaced-comment - */ - "spaced-comment": Linter.RuleEntry< - [ - "always" | "never", - { - exceptions: string[]; - markers: string[]; - line: { - exceptions: string[]; - markers: string[]; - }; - block: { - exceptions: string[]; - markers: string[]; - /** - * @default false - */ - balanced: boolean; - }; - }, - ] - >; - - /** - * Rule to enforce spacing around colons of switch statements. - * - * @since 4.0.0-beta.0 - * @see https://eslint.org/docs/rules/switch-colon-spacing - */ - "switch-colon-spacing": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - before: boolean; - /** - * @default true - */ - after: boolean; - }>, - ] - >; - - /** - * Rule to require or disallow spacing between template tags and their literals. - * - * @since 3.15.0 - * @see https://eslint.org/docs/rules/template-tag-spacing - */ - "template-tag-spacing": Linter.RuleEntry<["never" | "always"]>; - - /** - * Rule to require or disallow Unicode byte order mark (BOM). - * - * @since 2.11.0 - * @see https://eslint.org/docs/rules/unicode-bom - */ - "unicode-bom": Linter.RuleEntry<["never" | "always"]>; - - /** - * Rule to require parenthesis around regex literals. - * - * @since 0.1.0 - * @see https://eslint.org/docs/rules/wrap-regex - */ - "wrap-regex": Linter.RuleEntry<[]>; -} diff --git a/web/static/node_modules/@types/eslint/rules/variables.d.ts b/web/static/node_modules/@types/eslint/rules/variables.d.ts deleted file mode 100644 index 796274d1..00000000 --- a/web/static/node_modules/@types/eslint/rules/variables.d.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { Linter } from "../index"; - -export interface Variables extends Linter.RulesRecord { - /** - * Rule to require or disallow initialization in variable declarations. - * - * @since 1.0.0-rc-1 - * @see https://eslint.org/docs/rules/init-declarations - */ - "init-declarations": - | Linter.RuleEntry<["always"]> - | Linter.RuleEntry< - [ - "never", - Partial<{ - ignoreForLoopInit: boolean; - }>, - ] - >; - - /** - * Rule to disallow deleting variables. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-delete-var - */ - "no-delete-var": Linter.RuleEntry<[]>; - - /** - * Rule to disallow labels that share a name with a variable. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-label-var - */ - "no-label-var": Linter.RuleEntry<[]>; - - /** - * Rule to disallow specified global variables. - * - * @since 2.3.0 - * @see https://eslint.org/docs/rules/no-restricted-globals - */ - "no-restricted-globals": Linter.RuleEntry< - [ - ...Array< - | string - | { - name: string; - message?: string | undefined; - } - >, - ] - >; - - /** - * Rule to disallow variable declarations from shadowing variables declared in the outer scope. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-shadow - */ - "no-shadow": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - builtinGlobals: boolean; - /** - * @default 'functions' - */ - hoist: "functions" | "all" | "never"; - allow: string[]; - }>, - ] - >; - - /** - * Rule to disallow identifiers from shadowing restricted names. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.1.4 - * @see https://eslint.org/docs/rules/no-shadow-restricted-names - */ - "no-shadow-restricted-names": Linter.RuleEntry<[]>; - - /** - * Rule to disallow the use of undeclared variables unless mentioned in `global` comments. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-undef - */ - "no-undef": Linter.RuleEntry< - [ - Partial<{ - /** - * @default false - */ - typeof: boolean; - }>, - ] - >; - - /** - * Rule to disallow initializing variables to `undefined`. - * - * @since 0.0.6 - * @see https://eslint.org/docs/rules/no-undef-init - */ - "no-undef-init": Linter.RuleEntry<[]>; - - /** - * Rule to disallow the use of `undefined` as an identifier. - * - * @since 0.7.1 - * @see https://eslint.org/docs/rules/no-undefined - */ - "no-undefined": Linter.RuleEntry<[]>; - - /** - * Rule to disallow unused variables. - * - * @remarks - * Recommended by ESLint, the rule was enabled in `eslint:recommended`. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-unused-vars - */ - "no-unused-vars": Linter.RuleEntry< - [ - | "all" - | "local" - | Partial<{ - /** - * @default 'all' - */ - vars: "all" | "local"; - varsIgnorePattern: string; - /** - * @default 'after-used' - */ - args: "after-used" | "all" | "none"; - /** - * @default false - */ - ignoreRestSiblings: boolean; - argsIgnorePattern: string; - /** - * @default 'none' - */ - caughtErrors: "none" | "all"; - caughtErrorsIgnorePattern: string; - destructuredArrayIgnorePattern: string; - }>, - ] - >; - - /** - * Rule to disallow the use of variables before they are defined. - * - * @since 0.0.9 - * @see https://eslint.org/docs/rules/no-use-before-define - */ - "no-use-before-define": Linter.RuleEntry< - [ - | Partial<{ - /** - * @default true - */ - functions: boolean; - /** - * @default true - */ - classes: boolean; - /** - * @default true - */ - variables: boolean; - /** - * @default false - */ - allowNamedExports: boolean; - }> - | "nofunc", - ] - >; -} diff --git a/web/static/node_modules/@types/eslint/use-at-your-own-risk.d.ts b/web/static/node_modules/@types/eslint/use-at-your-own-risk.d.ts deleted file mode 100644 index e2ce2c55..00000000 --- a/web/static/node_modules/@types/eslint/use-at-your-own-risk.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { ESLint, Rule } from "./index.js"; - -/** @deprecated */ -export const builtinRules: Map; - -/** @deprecated */ -export class FileEnumerator { - constructor( - params?: { - cwd?: string; - configArrayFactory?: any; - extensions?: any; - globInputPaths?: boolean; - errorOnUnmatchedPattern?: boolean; - ignore?: boolean; - }, - ); - isTargetPath(filePath: string, providedConfig?: any): boolean; - iterateFiles( - patternOrPatterns: string | string[], - ): IterableIterator<{ config: any; filePath: string; ignored: boolean }>; -} - -export { /** @deprecated */ ESLint as FlatESLint }; - -/** @deprecated */ -export class LegacyESLint { - static configType: "eslintrc"; - - static readonly version: string; - - static outputFixes(results: ESLint.LintResult[]): Promise; - - static getErrorResults(results: ESLint.LintResult[]): ESLint.LintResult[]; - - constructor(options?: ESLint.LegacyOptions); - - lintFiles(patterns: string | string[]): Promise; - - lintText( - code: string, - options?: { filePath?: string | undefined; warnIgnored?: boolean | undefined }, - ): Promise; - - getRulesMetaForResults(results: ESLint.LintResult[]): ESLint.LintResultData["rulesMeta"]; - - hasFlag(flag: string): false; - - calculateConfigForFile(filePath: string): Promise; - - isPathIgnored(filePath: string): Promise; - - loadFormatter(nameOrPath?: string): Promise; -} - -/** @deprecated */ -export function shouldUseFlatConfig(): Promise; diff --git a/web/static/node_modules/@types/estree/LICENSE b/web/static/node_modules/@types/estree/LICENSE deleted file mode 100644 index 9e841e7a..00000000 --- a/web/static/node_modules/@types/estree/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/web/static/node_modules/@types/estree/README.md b/web/static/node_modules/@types/estree/README.md deleted file mode 100644 index 5a6f4c85..00000000 --- a/web/static/node_modules/@types/estree/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/estree` - -# Summary -This package contains type definitions for estree (https://github.com/estree/estree). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree. - -### Additional Details - * Last updated: Wed, 18 Sep 2024 09:37:00 GMT - * Dependencies: none - -# Credits -These definitions were written by [RReverser](https://github.com/RReverser). diff --git a/web/static/node_modules/@types/estree/flow.d.ts b/web/static/node_modules/@types/estree/flow.d.ts deleted file mode 100644 index 9d001a92..00000000 --- a/web/static/node_modules/@types/estree/flow.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -declare namespace ESTree { - interface FlowTypeAnnotation extends Node {} - - interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {} - - interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {} - - interface FlowDeclaration extends Declaration {} - - interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface ArrayTypeAnnotation extends FlowTypeAnnotation { - elementType: FlowTypeAnnotation; - } - - interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} - - interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface ClassImplements extends Node { - id: Identifier; - typeParameters?: TypeParameterInstantiation | null; - } - - interface ClassProperty { - key: Expression; - value?: Expression | null; - typeAnnotation?: TypeAnnotation | null; - computed: boolean; - static: boolean; - } - - interface DeclareClass extends FlowDeclaration { - id: Identifier; - typeParameters?: TypeParameterDeclaration | null; - body: ObjectTypeAnnotation; - extends: InterfaceExtends[]; - } - - interface DeclareFunction extends FlowDeclaration { - id: Identifier; - } - - interface DeclareModule extends FlowDeclaration { - id: Literal | Identifier; - body: BlockStatement; - } - - interface DeclareVariable extends FlowDeclaration { - id: Identifier; - } - - interface FunctionTypeAnnotation extends FlowTypeAnnotation { - params: FunctionTypeParam[]; - returnType: FlowTypeAnnotation; - rest?: FunctionTypeParam | null; - typeParameters?: TypeParameterDeclaration | null; - } - - interface FunctionTypeParam { - name: Identifier; - typeAnnotation: FlowTypeAnnotation; - optional: boolean; - } - - interface GenericTypeAnnotation extends FlowTypeAnnotation { - id: Identifier | QualifiedTypeIdentifier; - typeParameters?: TypeParameterInstantiation | null; - } - - interface InterfaceExtends extends Node { - id: Identifier | QualifiedTypeIdentifier; - typeParameters?: TypeParameterInstantiation | null; - } - - interface InterfaceDeclaration extends FlowDeclaration { - id: Identifier; - typeParameters?: TypeParameterDeclaration | null; - extends: InterfaceExtends[]; - body: ObjectTypeAnnotation; - } - - interface IntersectionTypeAnnotation extends FlowTypeAnnotation { - types: FlowTypeAnnotation[]; - } - - interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface NullableTypeAnnotation extends FlowTypeAnnotation { - typeAnnotation: TypeAnnotation; - } - - interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} - - interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} - - interface StringTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface TupleTypeAnnotation extends FlowTypeAnnotation { - types: FlowTypeAnnotation[]; - } - - interface TypeofTypeAnnotation extends FlowTypeAnnotation { - argument: FlowTypeAnnotation; - } - - interface TypeAlias extends FlowDeclaration { - id: Identifier; - typeParameters?: TypeParameterDeclaration | null; - right: FlowTypeAnnotation; - } - - interface TypeAnnotation extends Node { - typeAnnotation: FlowTypeAnnotation; - } - - interface TypeCastExpression extends Expression { - expression: Expression; - typeAnnotation: TypeAnnotation; - } - - interface TypeParameterDeclaration extends Node { - params: Identifier[]; - } - - interface TypeParameterInstantiation extends Node { - params: FlowTypeAnnotation[]; - } - - interface ObjectTypeAnnotation extends FlowTypeAnnotation { - properties: ObjectTypeProperty[]; - indexers: ObjectTypeIndexer[]; - callProperties: ObjectTypeCallProperty[]; - } - - interface ObjectTypeCallProperty extends Node { - value: FunctionTypeAnnotation; - static: boolean; - } - - interface ObjectTypeIndexer extends Node { - id: Identifier; - key: FlowTypeAnnotation; - value: FlowTypeAnnotation; - static: boolean; - } - - interface ObjectTypeProperty extends Node { - key: Expression; - value: FlowTypeAnnotation; - optional: boolean; - static: boolean; - } - - interface QualifiedTypeIdentifier extends Node { - qualification: Identifier | QualifiedTypeIdentifier; - id: Identifier; - } - - interface UnionTypeAnnotation extends FlowTypeAnnotation { - types: FlowTypeAnnotation[]; - } - - interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {} -} diff --git a/web/static/node_modules/@types/estree/index.d.ts b/web/static/node_modules/@types/estree/index.d.ts deleted file mode 100644 index 81a351f9..00000000 --- a/web/static/node_modules/@types/estree/index.d.ts +++ /dev/null @@ -1,684 +0,0 @@ -// This definition file follows a somewhat unusual format. ESTree allows -// runtime type checks based on the `type` parameter. In order to explain this -// to typescript we want to use discriminated union types: -// https://github.com/Microsoft/TypeScript/pull/9163 -// -// For ESTree this is a bit tricky because the high level interfaces like -// Node or Function are pulling double duty. We want to pass common fields down -// to the interfaces that extend them (like Identifier or -// ArrowFunctionExpression), but you can't extend a type union or enforce -// common fields on them. So we've split the high level interfaces into two -// types, a base type which passes down inherited fields, and a type union of -// all types which extend the base type. Only the type union is exported, and -// the union is how other types refer to the collection of inheriting types. -// -// This makes the definitions file here somewhat more difficult to maintain, -// but it has the notable advantage of making ESTree much easier to use as -// an end user. - -export interface BaseNodeWithoutComments { - // Every leaf interface that extends BaseNode must specify a type property. - // The type property should be a string literal. For example, Identifier - // has: `type: "Identifier"` - type: string; - loc?: SourceLocation | null | undefined; - range?: [number, number] | undefined; -} - -export interface BaseNode extends BaseNodeWithoutComments { - leadingComments?: Comment[] | undefined; - trailingComments?: Comment[] | undefined; -} - -export interface NodeMap { - AssignmentProperty: AssignmentProperty; - CatchClause: CatchClause; - Class: Class; - ClassBody: ClassBody; - Expression: Expression; - Function: Function; - Identifier: Identifier; - Literal: Literal; - MethodDefinition: MethodDefinition; - ModuleDeclaration: ModuleDeclaration; - ModuleSpecifier: ModuleSpecifier; - Pattern: Pattern; - PrivateIdentifier: PrivateIdentifier; - Program: Program; - Property: Property; - PropertyDefinition: PropertyDefinition; - SpreadElement: SpreadElement; - Statement: Statement; - Super: Super; - SwitchCase: SwitchCase; - TemplateElement: TemplateElement; - VariableDeclarator: VariableDeclarator; -} - -export type Node = NodeMap[keyof NodeMap]; - -export interface Comment extends BaseNodeWithoutComments { - type: "Line" | "Block"; - value: string; -} - -export interface SourceLocation { - source?: string | null | undefined; - start: Position; - end: Position; -} - -export interface Position { - /** >= 1 */ - line: number; - /** >= 0 */ - column: number; -} - -export interface Program extends BaseNode { - type: "Program"; - sourceType: "script" | "module"; - body: Array; - comments?: Comment[] | undefined; -} - -export interface Directive extends BaseNode { - type: "ExpressionStatement"; - expression: Literal; - directive: string; -} - -export interface BaseFunction extends BaseNode { - params: Pattern[]; - generator?: boolean | undefined; - async?: boolean | undefined; - // The body is either BlockStatement or Expression because arrow functions - // can have a body that's either. FunctionDeclarations and - // FunctionExpressions have only BlockStatement bodies. - body: BlockStatement | Expression; -} - -export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression; - -export type Statement = - | ExpressionStatement - | BlockStatement - | StaticBlock - | EmptyStatement - | DebuggerStatement - | WithStatement - | ReturnStatement - | LabeledStatement - | BreakStatement - | ContinueStatement - | IfStatement - | SwitchStatement - | ThrowStatement - | TryStatement - | WhileStatement - | DoWhileStatement - | ForStatement - | ForInStatement - | ForOfStatement - | Declaration; - -export interface BaseStatement extends BaseNode {} - -export interface EmptyStatement extends BaseStatement { - type: "EmptyStatement"; -} - -export interface BlockStatement extends BaseStatement { - type: "BlockStatement"; - body: Statement[]; - innerComments?: Comment[] | undefined; -} - -export interface StaticBlock extends Omit { - type: "StaticBlock"; -} - -export interface ExpressionStatement extends BaseStatement { - type: "ExpressionStatement"; - expression: Expression; -} - -export interface IfStatement extends BaseStatement { - type: "IfStatement"; - test: Expression; - consequent: Statement; - alternate?: Statement | null | undefined; -} - -export interface LabeledStatement extends BaseStatement { - type: "LabeledStatement"; - label: Identifier; - body: Statement; -} - -export interface BreakStatement extends BaseStatement { - type: "BreakStatement"; - label?: Identifier | null | undefined; -} - -export interface ContinueStatement extends BaseStatement { - type: "ContinueStatement"; - label?: Identifier | null | undefined; -} - -export interface WithStatement extends BaseStatement { - type: "WithStatement"; - object: Expression; - body: Statement; -} - -export interface SwitchStatement extends BaseStatement { - type: "SwitchStatement"; - discriminant: Expression; - cases: SwitchCase[]; -} - -export interface ReturnStatement extends BaseStatement { - type: "ReturnStatement"; - argument?: Expression | null | undefined; -} - -export interface ThrowStatement extends BaseStatement { - type: "ThrowStatement"; - argument: Expression; -} - -export interface TryStatement extends BaseStatement { - type: "TryStatement"; - block: BlockStatement; - handler?: CatchClause | null | undefined; - finalizer?: BlockStatement | null | undefined; -} - -export interface WhileStatement extends BaseStatement { - type: "WhileStatement"; - test: Expression; - body: Statement; -} - -export interface DoWhileStatement extends BaseStatement { - type: "DoWhileStatement"; - body: Statement; - test: Expression; -} - -export interface ForStatement extends BaseStatement { - type: "ForStatement"; - init?: VariableDeclaration | Expression | null | undefined; - test?: Expression | null | undefined; - update?: Expression | null | undefined; - body: Statement; -} - -export interface BaseForXStatement extends BaseStatement { - left: VariableDeclaration | Pattern; - right: Expression; - body: Statement; -} - -export interface ForInStatement extends BaseForXStatement { - type: "ForInStatement"; -} - -export interface DebuggerStatement extends BaseStatement { - type: "DebuggerStatement"; -} - -export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration; - -export interface BaseDeclaration extends BaseStatement {} - -export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration { - type: "FunctionDeclaration"; - /** It is null when a function declaration is a part of the `export default function` statement */ - id: Identifier | null; - body: BlockStatement; -} - -export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration { - id: Identifier; -} - -export interface VariableDeclaration extends BaseDeclaration { - type: "VariableDeclaration"; - declarations: VariableDeclarator[]; - kind: "var" | "let" | "const"; -} - -export interface VariableDeclarator extends BaseNode { - type: "VariableDeclarator"; - id: Pattern; - init?: Expression | null | undefined; -} - -export interface ExpressionMap { - ArrayExpression: ArrayExpression; - ArrowFunctionExpression: ArrowFunctionExpression; - AssignmentExpression: AssignmentExpression; - AwaitExpression: AwaitExpression; - BinaryExpression: BinaryExpression; - CallExpression: CallExpression; - ChainExpression: ChainExpression; - ClassExpression: ClassExpression; - ConditionalExpression: ConditionalExpression; - FunctionExpression: FunctionExpression; - Identifier: Identifier; - ImportExpression: ImportExpression; - Literal: Literal; - LogicalExpression: LogicalExpression; - MemberExpression: MemberExpression; - MetaProperty: MetaProperty; - NewExpression: NewExpression; - ObjectExpression: ObjectExpression; - SequenceExpression: SequenceExpression; - TaggedTemplateExpression: TaggedTemplateExpression; - TemplateLiteral: TemplateLiteral; - ThisExpression: ThisExpression; - UnaryExpression: UnaryExpression; - UpdateExpression: UpdateExpression; - YieldExpression: YieldExpression; -} - -export type Expression = ExpressionMap[keyof ExpressionMap]; - -export interface BaseExpression extends BaseNode {} - -export type ChainElement = SimpleCallExpression | MemberExpression; - -export interface ChainExpression extends BaseExpression { - type: "ChainExpression"; - expression: ChainElement; -} - -export interface ThisExpression extends BaseExpression { - type: "ThisExpression"; -} - -export interface ArrayExpression extends BaseExpression { - type: "ArrayExpression"; - elements: Array; -} - -export interface ObjectExpression extends BaseExpression { - type: "ObjectExpression"; - properties: Array; -} - -export interface PrivateIdentifier extends BaseNode { - type: "PrivateIdentifier"; - name: string; -} - -export interface Property extends BaseNode { - type: "Property"; - key: Expression | PrivateIdentifier; - value: Expression | Pattern; // Could be an AssignmentProperty - kind: "init" | "get" | "set"; - method: boolean; - shorthand: boolean; - computed: boolean; -} - -export interface PropertyDefinition extends BaseNode { - type: "PropertyDefinition"; - key: Expression | PrivateIdentifier; - value?: Expression | null | undefined; - computed: boolean; - static: boolean; -} - -export interface FunctionExpression extends BaseFunction, BaseExpression { - id?: Identifier | null | undefined; - type: "FunctionExpression"; - body: BlockStatement; -} - -export interface SequenceExpression extends BaseExpression { - type: "SequenceExpression"; - expressions: Expression[]; -} - -export interface UnaryExpression extends BaseExpression { - type: "UnaryExpression"; - operator: UnaryOperator; - prefix: true; - argument: Expression; -} - -export interface BinaryExpression extends BaseExpression { - type: "BinaryExpression"; - operator: BinaryOperator; - left: Expression | PrivateIdentifier; - right: Expression; -} - -export interface AssignmentExpression extends BaseExpression { - type: "AssignmentExpression"; - operator: AssignmentOperator; - left: Pattern | MemberExpression; - right: Expression; -} - -export interface UpdateExpression extends BaseExpression { - type: "UpdateExpression"; - operator: UpdateOperator; - argument: Expression; - prefix: boolean; -} - -export interface LogicalExpression extends BaseExpression { - type: "LogicalExpression"; - operator: LogicalOperator; - left: Expression; - right: Expression; -} - -export interface ConditionalExpression extends BaseExpression { - type: "ConditionalExpression"; - test: Expression; - alternate: Expression; - consequent: Expression; -} - -export interface BaseCallExpression extends BaseExpression { - callee: Expression | Super; - arguments: Array; -} -export type CallExpression = SimpleCallExpression | NewExpression; - -export interface SimpleCallExpression extends BaseCallExpression { - type: "CallExpression"; - optional: boolean; -} - -export interface NewExpression extends BaseCallExpression { - type: "NewExpression"; -} - -export interface MemberExpression extends BaseExpression, BasePattern { - type: "MemberExpression"; - object: Expression | Super; - property: Expression | PrivateIdentifier; - computed: boolean; - optional: boolean; -} - -export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression; - -export interface BasePattern extends BaseNode {} - -export interface SwitchCase extends BaseNode { - type: "SwitchCase"; - test?: Expression | null | undefined; - consequent: Statement[]; -} - -export interface CatchClause extends BaseNode { - type: "CatchClause"; - param: Pattern | null; - body: BlockStatement; -} - -export interface Identifier extends BaseNode, BaseExpression, BasePattern { - type: "Identifier"; - name: string; -} - -export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral; - -export interface SimpleLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value: string | boolean | number | null; - raw?: string | undefined; -} - -export interface RegExpLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value?: RegExp | null | undefined; - regex: { - pattern: string; - flags: string; - }; - raw?: string | undefined; -} - -export interface BigIntLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value?: bigint | null | undefined; - bigint: string; - raw?: string | undefined; -} - -export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; - -export type BinaryOperator = - | "==" - | "!=" - | "===" - | "!==" - | "<" - | "<=" - | ">" - | ">=" - | "<<" - | ">>" - | ">>>" - | "+" - | "-" - | "*" - | "/" - | "%" - | "**" - | "|" - | "^" - | "&" - | "in" - | "instanceof"; - -export type LogicalOperator = "||" | "&&" | "??"; - -export type AssignmentOperator = - | "=" - | "+=" - | "-=" - | "*=" - | "/=" - | "%=" - | "**=" - | "<<=" - | ">>=" - | ">>>=" - | "|=" - | "^=" - | "&=" - | "||=" - | "&&=" - | "??="; - -export type UpdateOperator = "++" | "--"; - -export interface ForOfStatement extends BaseForXStatement { - type: "ForOfStatement"; - await: boolean; -} - -export interface Super extends BaseNode { - type: "Super"; -} - -export interface SpreadElement extends BaseNode { - type: "SpreadElement"; - argument: Expression; -} - -export interface ArrowFunctionExpression extends BaseExpression, BaseFunction { - type: "ArrowFunctionExpression"; - expression: boolean; - body: BlockStatement | Expression; -} - -export interface YieldExpression extends BaseExpression { - type: "YieldExpression"; - argument?: Expression | null | undefined; - delegate: boolean; -} - -export interface TemplateLiteral extends BaseExpression { - type: "TemplateLiteral"; - quasis: TemplateElement[]; - expressions: Expression[]; -} - -export interface TaggedTemplateExpression extends BaseExpression { - type: "TaggedTemplateExpression"; - tag: Expression; - quasi: TemplateLiteral; -} - -export interface TemplateElement extends BaseNode { - type: "TemplateElement"; - tail: boolean; - value: { - /** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */ - cooked?: string | null | undefined; - raw: string; - }; -} - -export interface AssignmentProperty extends Property { - value: Pattern; - kind: "init"; - method: boolean; // false -} - -export interface ObjectPattern extends BasePattern { - type: "ObjectPattern"; - properties: Array; -} - -export interface ArrayPattern extends BasePattern { - type: "ArrayPattern"; - elements: Array; -} - -export interface RestElement extends BasePattern { - type: "RestElement"; - argument: Pattern; -} - -export interface AssignmentPattern extends BasePattern { - type: "AssignmentPattern"; - left: Pattern; - right: Expression; -} - -export type Class = ClassDeclaration | ClassExpression; -export interface BaseClass extends BaseNode { - superClass?: Expression | null | undefined; - body: ClassBody; -} - -export interface ClassBody extends BaseNode { - type: "ClassBody"; - body: Array; -} - -export interface MethodDefinition extends BaseNode { - type: "MethodDefinition"; - key: Expression | PrivateIdentifier; - value: FunctionExpression; - kind: "constructor" | "method" | "get" | "set"; - computed: boolean; - static: boolean; -} - -export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration { - type: "ClassDeclaration"; - /** It is null when a class declaration is a part of the `export default class` statement */ - id: Identifier | null; -} - -export interface ClassDeclaration extends MaybeNamedClassDeclaration { - id: Identifier; -} - -export interface ClassExpression extends BaseClass, BaseExpression { - type: "ClassExpression"; - id?: Identifier | null | undefined; -} - -export interface MetaProperty extends BaseExpression { - type: "MetaProperty"; - meta: Identifier; - property: Identifier; -} - -export type ModuleDeclaration = - | ImportDeclaration - | ExportNamedDeclaration - | ExportDefaultDeclaration - | ExportAllDeclaration; -export interface BaseModuleDeclaration extends BaseNode {} - -export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier; -export interface BaseModuleSpecifier extends BaseNode { - local: Identifier; -} - -export interface ImportDeclaration extends BaseModuleDeclaration { - type: "ImportDeclaration"; - specifiers: Array; - source: Literal; -} - -export interface ImportSpecifier extends BaseModuleSpecifier { - type: "ImportSpecifier"; - imported: Identifier | Literal; -} - -export interface ImportExpression extends BaseExpression { - type: "ImportExpression"; - source: Expression; -} - -export interface ImportDefaultSpecifier extends BaseModuleSpecifier { - type: "ImportDefaultSpecifier"; -} - -export interface ImportNamespaceSpecifier extends BaseModuleSpecifier { - type: "ImportNamespaceSpecifier"; -} - -export interface ExportNamedDeclaration extends BaseModuleDeclaration { - type: "ExportNamedDeclaration"; - declaration?: Declaration | null | undefined; - specifiers: ExportSpecifier[]; - source?: Literal | null | undefined; -} - -export interface ExportSpecifier extends Omit { - type: "ExportSpecifier"; - local: Identifier | Literal; - exported: Identifier | Literal; -} - -export interface ExportDefaultDeclaration extends BaseModuleDeclaration { - type: "ExportDefaultDeclaration"; - declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression; -} - -export interface ExportAllDeclaration extends BaseModuleDeclaration { - type: "ExportAllDeclaration"; - exported: Identifier | Literal | null; - source: Literal; -} - -export interface AwaitExpression extends BaseExpression { - type: "AwaitExpression"; - argument: Expression; -} diff --git a/web/static/node_modules/@types/estree/package.json b/web/static/node_modules/@types/estree/package.json deleted file mode 100644 index f4107619..00000000 --- a/web/static/node_modules/@types/estree/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@types/estree", - "version": "1.0.6", - "description": "TypeScript definitions for estree", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree", - "license": "MIT", - "contributors": [ - { - "name": "RReverser", - "githubUsername": "RReverser", - "url": "https://github.com/RReverser" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/estree" - }, - "scripts": {}, - "dependencies": {}, - "typesPublisherContentHash": "0310b41994a6f8d7530af6c53d47d8b227f32925e43718507fdb1178e05006b1", - "typeScriptVersion": "4.8", - "nonNpm": true -} \ No newline at end of file diff --git a/web/static/node_modules/@types/json-schema/LICENSE b/web/static/node_modules/@types/json-schema/LICENSE deleted file mode 100644 index 9e841e7a..00000000 --- a/web/static/node_modules/@types/json-schema/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/web/static/node_modules/@types/json-schema/README.md b/web/static/node_modules/@types/json-schema/README.md deleted file mode 100644 index 78c610f0..00000000 --- a/web/static/node_modules/@types/json-schema/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/json-schema` - -# Summary -This package contains type definitions for json-schema (https://github.com/kriszyp/json-schema). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 03:09:37 GMT - * Dependencies: none - -# Credits -These definitions were written by [Boris Cherny](https://github.com/bcherny), [Lucian Buzzo](https://github.com/lucianbuzzo), [Roland Groza](https://github.com/rolandjitsu), and [Jason Kwok](https://github.com/JasonHK). diff --git a/web/static/node_modules/@types/json-schema/index.d.ts b/web/static/node_modules/@types/json-schema/index.d.ts deleted file mode 100644 index 9381e999..00000000 --- a/web/static/node_modules/@types/json-schema/index.d.ts +++ /dev/null @@ -1,749 +0,0 @@ -// ================================================================================================== -// JSON Schema Draft 04 -// ================================================================================================== - -/** - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1 - */ -export type JSONSchema4TypeName = - | "string" // - | "number" - | "integer" - | "boolean" - | "object" - | "array" - | "null" - | "any"; - -/** - * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5 - */ -export type JSONSchema4Type = - | string // - | number - | boolean - | JSONSchema4Object - | JSONSchema4Array - | null; - -// Workaround for infinite type recursion -export interface JSONSchema4Object { - [key: string]: JSONSchema4Type; -} - -// Workaround for infinite type recursion -// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540 -export interface JSONSchema4Array extends Array {} - -/** - * Meta schema - * - * Recommended values: - * - 'http://json-schema.org/schema#' - * - 'http://json-schema.org/hyper-schema#' - * - 'http://json-schema.org/draft-04/schema#' - * - 'http://json-schema.org/draft-04/hyper-schema#' - * - 'http://json-schema.org/draft-03/schema#' - * - 'http://json-schema.org/draft-03/hyper-schema#' - * - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5 - */ -export type JSONSchema4Version = string; - -/** - * JSON Schema V4 - * @see https://tools.ietf.org/html/draft-zyp-json-schema-04 - */ -export interface JSONSchema4 { - id?: string | undefined; - $ref?: string | undefined; - $schema?: JSONSchema4Version | undefined; - - /** - * This attribute is a string that provides a short description of the - * instance property. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21 - */ - title?: string | undefined; - - /** - * This attribute is a string that provides a full description of the of - * purpose the instance property. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22 - */ - description?: string | undefined; - - default?: JSONSchema4Type | undefined; - multipleOf?: number | undefined; - maximum?: number | undefined; - exclusiveMaximum?: boolean | undefined; - minimum?: number | undefined; - exclusiveMinimum?: boolean | undefined; - maxLength?: number | undefined; - minLength?: number | undefined; - pattern?: string | undefined; - - /** - * May only be defined when "items" is defined, and is a tuple of JSONSchemas. - * - * This provides a definition for additional items in an array instance - * when tuple definitions of the items is provided. This can be false - * to indicate additional items in the array are not allowed, or it can - * be a schema that defines the schema of the additional items. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6 - */ - additionalItems?: boolean | JSONSchema4 | undefined; - - /** - * This attribute defines the allowed items in an instance array, and - * MUST be a schema or an array of schemas. The default value is an - * empty schema which allows any value for items in the instance array. - * - * When this attribute value is a schema and the instance value is an - * array, then all the items in the array MUST be valid according to the - * schema. - * - * When this attribute value is an array of schemas and the instance - * value is an array, each position in the instance array MUST conform - * to the schema in the corresponding position for this array. This - * called tuple typing. When tuple typing is used, additional items are - * allowed, disallowed, or constrained by the "additionalItems" - * (Section 5.6) attribute using the same rules as - * "additionalProperties" (Section 5.4) for objects. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5 - */ - items?: JSONSchema4 | JSONSchema4[] | undefined; - - maxItems?: number | undefined; - minItems?: number | undefined; - uniqueItems?: boolean | undefined; - maxProperties?: number | undefined; - minProperties?: number | undefined; - - /** - * This attribute indicates if the instance must have a value, and not - * be undefined. This is false by default, making the instance - * optional. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7 - */ - required?: boolean | string[] | undefined; - - /** - * This attribute defines a schema for all properties that are not - * explicitly defined in an object type definition. If specified, the - * value MUST be a schema or a boolean. If false is provided, no - * additional properties are allowed beyond the properties defined in - * the schema. The default value is an empty schema which allows any - * value for additional properties. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4 - */ - additionalProperties?: boolean | JSONSchema4 | undefined; - - definitions?: { - [k: string]: JSONSchema4; - } | undefined; - - /** - * This attribute is an object with property definitions that define the - * valid values of instance object property values. When the instance - * value is an object, the property values of the instance object MUST - * conform to the property definitions in this object. In this object, - * each property definition's value MUST be a schema, and the property's - * name MUST be the name of the instance property that it defines. The - * instance property value MUST be valid according to the schema from - * the property definition. Properties are considered unordered, the - * order of the instance properties MAY be in any order. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2 - */ - properties?: { - [k: string]: JSONSchema4; - } | undefined; - - /** - * This attribute is an object that defines the schema for a set of - * property names of an object instance. The name of each property of - * this attribute's object is a regular expression pattern in the ECMA - * 262/Perl 5 format, while the value is a schema. If the pattern - * matches the name of a property on the instance object, the value of - * the instance's property MUST be valid against the pattern name's - * schema value. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3 - */ - patternProperties?: { - [k: string]: JSONSchema4; - } | undefined; - dependencies?: { - [k: string]: JSONSchema4 | string[]; - } | undefined; - - /** - * This provides an enumeration of all possible values that are valid - * for the instance property. This MUST be an array, and each item in - * the array represents a possible value for the instance value. If - * this attribute is defined, the instance value MUST be one of the - * values in the array in order for the schema to be valid. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19 - */ - enum?: JSONSchema4Type[] | undefined; - - /** - * A single type, or a union of simple types - */ - type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined; - - allOf?: JSONSchema4[] | undefined; - anyOf?: JSONSchema4[] | undefined; - oneOf?: JSONSchema4[] | undefined; - not?: JSONSchema4 | undefined; - - /** - * The value of this property MUST be another schema which will provide - * a base schema which the current schema will inherit from. The - * inheritance rules are such that any instance that is valid according - * to the current schema MUST be valid according to the referenced - * schema. This MAY also be an array, in which case, the instance MUST - * be valid for all the schemas in the array. A schema that extends - * another schema MAY define additional attributes, constrain existing - * attributes, or add other constraints. - * - * Conceptually, the behavior of extends can be seen as validating an - * instance against all constraints in the extending schema as well as - * the extended schema(s). - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26 - */ - extends?: string | string[] | undefined; - - /** - * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6 - */ - [k: string]: any; - - format?: string | undefined; -} - -// ================================================================================================== -// JSON Schema Draft 06 -// ================================================================================================== - -export type JSONSchema6TypeName = - | "string" // - | "number" - | "integer" - | "boolean" - | "object" - | "array" - | "null" - | "any"; - -export type JSONSchema6Type = - | string // - | number - | boolean - | JSONSchema6Object - | JSONSchema6Array - | null; - -// Workaround for infinite type recursion -export interface JSONSchema6Object { - [key: string]: JSONSchema6Type; -} - -// Workaround for infinite type recursion -// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540 -export interface JSONSchema6Array extends Array {} - -/** - * Meta schema - * - * Recommended values: - * - 'http://json-schema.org/schema#' - * - 'http://json-schema.org/hyper-schema#' - * - 'http://json-schema.org/draft-06/schema#' - * - 'http://json-schema.org/draft-06/hyper-schema#' - * - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5 - */ -export type JSONSchema6Version = string; - -/** - * JSON Schema V6 - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01 - */ -export type JSONSchema6Definition = JSONSchema6 | boolean; -export interface JSONSchema6 { - $id?: string | undefined; - $ref?: string | undefined; - $schema?: JSONSchema6Version | undefined; - - /** - * Must be strictly greater than 0. - * A numeric instance is valid only if division by this keyword's value results in an integer. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1 - */ - multipleOf?: number | undefined; - - /** - * Representing an inclusive upper limit for a numeric instance. - * This keyword validates only if the instance is less than or exactly equal to "maximum". - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2 - */ - maximum?: number | undefined; - - /** - * Representing an exclusive upper limit for a numeric instance. - * This keyword validates only if the instance is strictly less than (not equal to) to "exclusiveMaximum". - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3 - */ - exclusiveMaximum?: number | undefined; - - /** - * Representing an inclusive lower limit for a numeric instance. - * This keyword validates only if the instance is greater than or exactly equal to "minimum". - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4 - */ - minimum?: number | undefined; - - /** - * Representing an exclusive lower limit for a numeric instance. - * This keyword validates only if the instance is strictly greater than (not equal to) to "exclusiveMinimum". - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5 - */ - exclusiveMinimum?: number | undefined; - - /** - * Must be a non-negative integer. - * A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6 - */ - maxLength?: number | undefined; - - /** - * Must be a non-negative integer. - * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword. - * Omitting this keyword has the same behavior as a value of 0. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7 - */ - minLength?: number | undefined; - - /** - * Should be a valid regular expression, according to the ECMA 262 regular expression dialect. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8 - */ - pattern?: string | undefined; - - /** - * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself. - * Omitting this keyword has the same behavior as an empty schema. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9 - */ - items?: JSONSchema6Definition | JSONSchema6Definition[] | undefined; - - /** - * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself. - * If "items" is an array of schemas, validation succeeds if every instance element - * at a position greater than the size of "items" validates against "additionalItems". - * Otherwise, "additionalItems" MUST be ignored, as the "items" schema - * (possibly the default value of an empty schema) is applied to all elements. - * Omitting this keyword has the same behavior as an empty schema. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10 - */ - additionalItems?: JSONSchema6Definition | undefined; - - /** - * Must be a non-negative integer. - * An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11 - */ - maxItems?: number | undefined; - - /** - * Must be a non-negative integer. - * An array instance is valid against "maxItems" if its size is greater than, or equal to, the value of this keyword. - * Omitting this keyword has the same behavior as a value of 0. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12 - */ - minItems?: number | undefined; - - /** - * If this keyword has boolean value false, the instance validates successfully. - * If it has boolean value true, the instance validates successfully if all of its elements are unique. - * Omitting this keyword has the same behavior as a value of false. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13 - */ - uniqueItems?: boolean | undefined; - - /** - * An array instance is valid against "contains" if at least one of its elements is valid against the given schema. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14 - */ - contains?: JSONSchema6Definition | undefined; - - /** - * Must be a non-negative integer. - * An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15 - */ - maxProperties?: number | undefined; - - /** - * Must be a non-negative integer. - * An object instance is valid against "maxProperties" if its number of properties is greater than, - * or equal to, the value of this keyword. - * Omitting this keyword has the same behavior as a value of 0. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16 - */ - minProperties?: number | undefined; - - /** - * Elements of this array must be unique. - * An object instance is valid against this keyword if every item in the array is the name of a property in the instance. - * Omitting this keyword has the same behavior as an empty array. - * - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17 - */ - required?: string[] | undefined; - - /** - * This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself. - * Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value, - * the child instance for that name successfully validates against the corresponding schema. - * Omitting this keyword has the same behavior as an empty object. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18 - */ - properties?: { - [k: string]: JSONSchema6Definition; - } | undefined; - - /** - * This attribute is an object that defines the schema for a set of property names of an object instance. - * The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema. - * If the pattern matches the name of a property on the instance object, the value of the instance's property - * MUST be valid against the pattern name's schema value. - * Omitting this keyword has the same behavior as an empty object. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19 - */ - patternProperties?: { - [k: string]: JSONSchema6Definition; - } | undefined; - - /** - * This attribute defines a schema for all properties that are not explicitly defined in an object type definition. - * If specified, the value MUST be a schema or a boolean. - * If false is provided, no additional properties are allowed beyond the properties defined in the schema. - * The default value is an empty schema which allows any value for additional properties. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20 - */ - additionalProperties?: JSONSchema6Definition | undefined; - - /** - * This keyword specifies rules that are evaluated if the instance is an object and contains a certain property. - * Each property specifies a dependency. - * If the dependency value is an array, each element in the array must be unique. - * Omitting this keyword has the same behavior as an empty object. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21 - */ - dependencies?: { - [k: string]: JSONSchema6Definition | string[]; - } | undefined; - - /** - * Takes a schema which validates the names of all properties rather than their values. - * Note the property name that the schema is testing will always be a string. - * Omitting this keyword has the same behavior as an empty schema. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22 - */ - propertyNames?: JSONSchema6Definition | undefined; - - /** - * This provides an enumeration of all possible values that are valid - * for the instance property. This MUST be an array, and each item in - * the array represents a possible value for the instance value. If - * this attribute is defined, the instance value MUST be one of the - * values in the array in order for the schema to be valid. - * - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23 - */ - enum?: JSONSchema6Type[] | undefined; - - /** - * More readable form of a one-element "enum" - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24 - */ - const?: JSONSchema6Type | undefined; - - /** - * A single type, or a union of simple types - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25 - */ - type?: JSONSchema6TypeName | JSONSchema6TypeName[] | undefined; - - /** - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26 - */ - allOf?: JSONSchema6Definition[] | undefined; - - /** - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27 - */ - anyOf?: JSONSchema6Definition[] | undefined; - - /** - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28 - */ - oneOf?: JSONSchema6Definition[] | undefined; - - /** - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29 - */ - not?: JSONSchema6Definition | undefined; - - /** - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1 - */ - definitions?: { - [k: string]: JSONSchema6Definition; - } | undefined; - - /** - * This attribute is a string that provides a short description of the instance property. - * - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2 - */ - title?: string | undefined; - - /** - * This attribute is a string that provides a full description of the of purpose the instance property. - * - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2 - */ - description?: string | undefined; - - /** - * This keyword can be used to supply a default JSON value associated with a particular schema. - * It is RECOMMENDED that a default value be valid against the associated schema. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3 - */ - default?: JSONSchema6Type | undefined; - - /** - * Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4 - */ - examples?: JSONSchema6Type[] | undefined; - - /** - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8 - */ - format?: string | undefined; -} - -// ================================================================================================== -// JSON Schema Draft 07 -// ================================================================================================== -// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01 -// -------------------------------------------------------------------------------------------------- - -/** - * Primitive type - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1 - */ -export type JSONSchema7TypeName = - | "string" // - | "number" - | "integer" - | "boolean" - | "object" - | "array" - | "null"; - -/** - * Primitive type - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1 - */ -export type JSONSchema7Type = - | string // - | number - | boolean - | JSONSchema7Object - | JSONSchema7Array - | null; - -// Workaround for infinite type recursion -export interface JSONSchema7Object { - [key: string]: JSONSchema7Type; -} - -// Workaround for infinite type recursion -// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540 -export interface JSONSchema7Array extends Array {} - -/** - * Meta schema - * - * Recommended values: - * - 'http://json-schema.org/schema#' - * - 'http://json-schema.org/hyper-schema#' - * - 'http://json-schema.org/draft-07/schema#' - * - 'http://json-schema.org/draft-07/hyper-schema#' - * - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5 - */ -export type JSONSchema7Version = string; - -/** - * JSON Schema v7 - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01 - */ -export type JSONSchema7Definition = JSONSchema7 | boolean; -export interface JSONSchema7 { - $id?: string | undefined; - $ref?: string | undefined; - $schema?: JSONSchema7Version | undefined; - $comment?: string | undefined; - - /** - * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4 - * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A - */ - $defs?: { - [key: string]: JSONSchema7Definition; - } | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1 - */ - type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined; - enum?: JSONSchema7Type[] | undefined; - const?: JSONSchema7Type | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2 - */ - multipleOf?: number | undefined; - maximum?: number | undefined; - exclusiveMaximum?: number | undefined; - minimum?: number | undefined; - exclusiveMinimum?: number | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3 - */ - maxLength?: number | undefined; - minLength?: number | undefined; - pattern?: string | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4 - */ - items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined; - additionalItems?: JSONSchema7Definition | undefined; - maxItems?: number | undefined; - minItems?: number | undefined; - uniqueItems?: boolean | undefined; - contains?: JSONSchema7Definition | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5 - */ - maxProperties?: number | undefined; - minProperties?: number | undefined; - required?: string[] | undefined; - properties?: { - [key: string]: JSONSchema7Definition; - } | undefined; - patternProperties?: { - [key: string]: JSONSchema7Definition; - } | undefined; - additionalProperties?: JSONSchema7Definition | undefined; - dependencies?: { - [key: string]: JSONSchema7Definition | string[]; - } | undefined; - propertyNames?: JSONSchema7Definition | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6 - */ - if?: JSONSchema7Definition | undefined; - then?: JSONSchema7Definition | undefined; - else?: JSONSchema7Definition | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7 - */ - allOf?: JSONSchema7Definition[] | undefined; - anyOf?: JSONSchema7Definition[] | undefined; - oneOf?: JSONSchema7Definition[] | undefined; - not?: JSONSchema7Definition | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7 - */ - format?: string | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8 - */ - contentMediaType?: string | undefined; - contentEncoding?: string | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9 - */ - definitions?: { - [key: string]: JSONSchema7Definition; - } | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10 - */ - title?: string | undefined; - description?: string | undefined; - default?: JSONSchema7Type | undefined; - readOnly?: boolean | undefined; - writeOnly?: boolean | undefined; - examples?: JSONSchema7Type | undefined; -} - -export interface ValidationResult { - valid: boolean; - errors: ValidationError[]; -} - -export interface ValidationError { - property: string; - message: string; -} - -/** - * To use the validator call JSONSchema.validate with an instance object and an optional schema object. - * If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating), - * that schema will be used to validate and the schema parameter is not necessary (if both exist, - * both validations will occur). - */ -export function validate(instance: {}, schema: JSONSchema4 | JSONSchema6 | JSONSchema7): ValidationResult; - -/** - * The checkPropertyChange method will check to see if an value can legally be in property with the given schema - * This is slightly different than the validate method in that it will fail if the schema is readonly and it will - * not check for self-validation, it is assumed that the passed in value is already internally valid. - */ -export function checkPropertyChange( - value: any, - schema: JSONSchema4 | JSONSchema6 | JSONSchema7, - property: string, -): ValidationResult; - -/** - * This checks to ensure that the result is valid and will throw an appropriate error message if it is not. - */ -export function mustBeValid(result: ValidationResult): void; diff --git a/web/static/node_modules/@types/json-schema/package.json b/web/static/node_modules/@types/json-schema/package.json deleted file mode 100644 index 3c41bd7f..00000000 --- a/web/static/node_modules/@types/json-schema/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "@types/json-schema", - "version": "7.0.15", - "description": "TypeScript definitions for json-schema", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema", - "license": "MIT", - "contributors": [ - { - "name": "Boris Cherny", - "githubUsername": "bcherny", - "url": "https://github.com/bcherny" - }, - { - "name": "Lucian Buzzo", - "githubUsername": "lucianbuzzo", - "url": "https://github.com/lucianbuzzo" - }, - { - "name": "Roland Groza", - "githubUsername": "rolandjitsu", - "url": "https://github.com/rolandjitsu" - }, - { - "name": "Jason Kwok", - "githubUsername": "JasonHK", - "url": "https://github.com/JasonHK" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/json-schema" - }, - "scripts": {}, - "dependencies": {}, - "typesPublisherContentHash": "79984fd70cd25c3f7d72b84368778c763c89728ea0073832d745d4691b705257", - "typeScriptVersion": "4.5" -} \ No newline at end of file diff --git a/web/static/node_modules/@types/node/LICENSE b/web/static/node_modules/@types/node/LICENSE deleted file mode 100644 index 9e841e7a..00000000 --- a/web/static/node_modules/@types/node/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/web/static/node_modules/@types/node/README.md b/web/static/node_modules/@types/node/README.md deleted file mode 100644 index 1be52dd5..00000000 --- a/web/static/node_modules/@types/node/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/node` - -# Summary -This package contains type definitions for node (https://nodejs.org/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. - -### Additional Details - * Last updated: Tue, 19 Nov 2024 17:34:45 GMT - * Dependencies: [undici-types](https://npmjs.com/package/undici-types) - -# Credits -These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky). diff --git a/web/static/node_modules/@types/node/assert.d.ts b/web/static/node_modules/@types/node/assert.d.ts deleted file mode 100644 index d7e37191..00000000 --- a/web/static/node_modules/@types/node/assert.d.ts +++ /dev/null @@ -1,1040 +0,0 @@ -/** - * The `node:assert` module provides a set of assertion functions for verifying - * invariants. - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/assert.js) - */ -declare module "assert" { - /** - * An alias of {@link ok}. - * @since v0.5.9 - * @param value The input that is checked for being truthy. - */ - function assert(value: unknown, message?: string | Error): asserts value; - namespace assert { - /** - * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class. - */ - class AssertionError extends Error { - /** - * Set to the `actual` argument for methods such as {@link assert.strictEqual()}. - */ - actual: unknown; - /** - * Set to the `expected` argument for methods such as {@link assert.strictEqual()}. - */ - expected: unknown; - /** - * Set to the passed in operator value. - */ - operator: string; - /** - * Indicates if the message was auto-generated (`true`) or not. - */ - generatedMessage: boolean; - /** - * Value is always `ERR_ASSERTION` to show that the error is an assertion error. - */ - code: "ERR_ASSERTION"; - constructor(options?: { - /** If provided, the error message is set to this value. */ - message?: string | undefined; - /** The `actual` property on the error instance. */ - actual?: unknown | undefined; - /** The `expected` property on the error instance. */ - expected?: unknown | undefined; - /** The `operator` property on the error instance. */ - operator?: string | undefined; - /** If provided, the generated stack trace omits frames before this function. */ - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - stackStartFn?: Function | undefined; - }); - } - /** - * This feature is deprecated and will be removed in a future version. - * Please consider using alternatives such as the `mock` helper function. - * @since v14.2.0, v12.19.0 - * @deprecated Deprecated - */ - class CallTracker { - /** - * The wrapper function is expected to be called exactly `exact` times. If the - * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an - * error. - * - * ```js - * import assert from 'node:assert'; - * - * // Creates call tracker. - * const tracker = new assert.CallTracker(); - * - * function func() {} - * - * // Returns a function that wraps func() that must be called exact times - * // before tracker.verify(). - * const callsfunc = tracker.calls(func); - * ``` - * @since v14.2.0, v12.19.0 - * @param [fn='A no-op function'] - * @param [exact=1] - * @return A function that wraps `fn`. - */ - calls(exact?: number): () => void; - calls any>(fn?: Func, exact?: number): Func; - /** - * Example: - * - * ```js - * import assert from 'node:assert'; - * - * const tracker = new assert.CallTracker(); - * - * function func() {} - * const callsfunc = tracker.calls(func); - * callsfunc(1, 2, 3); - * - * assert.deepStrictEqual(tracker.getCalls(callsfunc), - * [{ thisArg: undefined, arguments: [1, 2, 3] }]); - * ``` - * @since v18.8.0, v16.18.0 - * @return An array with all the calls to a tracked function. - */ - getCalls(fn: Function): CallTrackerCall[]; - /** - * The arrays contains information about the expected and actual number of calls of - * the functions that have not been called the expected number of times. - * - * ```js - * import assert from 'node:assert'; - * - * // Creates call tracker. - * const tracker = new assert.CallTracker(); - * - * function func() {} - * - * // Returns a function that wraps func() that must be called exact times - * // before tracker.verify(). - * const callsfunc = tracker.calls(func, 2); - * - * // Returns an array containing information on callsfunc() - * console.log(tracker.report()); - * // [ - * // { - * // message: 'Expected the func function to be executed 2 time(s) but was - * // executed 0 time(s).', - * // actual: 0, - * // expected: 2, - * // operator: 'func', - * // stack: stack trace - * // } - * // ] - * ``` - * @since v14.2.0, v12.19.0 - * @return An array of objects containing information about the wrapper functions returned by {@link tracker.calls()}. - */ - report(): CallTrackerReportInformation[]; - /** - * Reset calls of the call tracker. If a tracked function is passed as an argument, the calls will be reset for it. - * If no arguments are passed, all tracked functions will be reset. - * - * ```js - * import assert from 'node:assert'; - * - * const tracker = new assert.CallTracker(); - * - * function func() {} - * const callsfunc = tracker.calls(func); - * - * callsfunc(); - * // Tracker was called once - * assert.strictEqual(tracker.getCalls(callsfunc).length, 1); - * - * tracker.reset(callsfunc); - * assert.strictEqual(tracker.getCalls(callsfunc).length, 0); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn a tracked function to reset. - */ - reset(fn?: Function): void; - /** - * Iterates through the list of functions passed to {@link tracker.calls()} and will throw an error for functions that - * have not been called the expected number of times. - * - * ```js - * import assert from 'node:assert'; - * - * // Creates call tracker. - * const tracker = new assert.CallTracker(); - * - * function func() {} - * - * // Returns a function that wraps func() that must be called exact times - * // before tracker.verify(). - * const callsfunc = tracker.calls(func, 2); - * - * callsfunc(); - * - * // Will throw an error since callsfunc() was only called once. - * tracker.verify(); - * ``` - * @since v14.2.0, v12.19.0 - */ - verify(): void; - } - interface CallTrackerCall { - thisArg: object; - arguments: unknown[]; - } - interface CallTrackerReportInformation { - message: string; - /** The actual number of times the function was called. */ - actual: number; - /** The number of times the function was expected to be called. */ - expected: number; - /** The name of the function that is wrapped. */ - operator: string; - /** A stack trace of the function. */ - stack: object; - } - type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error; - /** - * Throws an `AssertionError` with the provided error message or a default - * error message. If the `message` parameter is an instance of an `Error` then - * it will be thrown instead of the `AssertionError`. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.fail(); - * // AssertionError [ERR_ASSERTION]: Failed - * - * assert.fail('boom'); - * // AssertionError [ERR_ASSERTION]: boom - * - * assert.fail(new TypeError('need array')); - * // TypeError: need array - * ``` - * - * Using `assert.fail()` with more than two arguments is possible but deprecated. - * See below for further details. - * @since v0.1.21 - * @param [message='Failed'] - */ - function fail(message?: string | Error): never; - /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ - function fail( - actual: unknown, - expected: unknown, - message?: string | Error, - operator?: string, - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - stackStartFn?: Function, - ): never; - /** - * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`. - * - * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default - * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. - * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``. - * - * Be aware that in the `repl` the error message will be different to the one - * thrown in a file! See below for further details. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.ok(true); - * // OK - * assert.ok(1); - * // OK - * - * assert.ok(); - * // AssertionError: No value argument passed to `assert.ok()` - * - * assert.ok(false, 'it\'s false'); - * // AssertionError: it's false - * - * // In the repl: - * assert.ok(typeof 123 === 'string'); - * // AssertionError: false == true - * - * // In a file (e.g. test.js): - * assert.ok(typeof 123 === 'string'); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert.ok(typeof 123 === 'string') - * - * assert.ok(false); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert.ok(false) - * - * assert.ok(0); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert.ok(0) - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * // Using `assert()` works the same: - * assert(0); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert(0) - * ``` - * @since v0.1.21 - */ - function ok(value: unknown, message?: string | Error): asserts value; - /** - * **Strict assertion mode** - * - * An alias of {@link strictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link strictEqual} instead. - * - * Tests shallow, coercive equality between the `actual` and `expected` parameters - * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled - * and treated as being identical if both sides are `NaN`. - * - * ```js - * import assert from 'node:assert'; - * - * assert.equal(1, 1); - * // OK, 1 == 1 - * assert.equal(1, '1'); - * // OK, 1 == '1' - * assert.equal(NaN, NaN); - * // OK - * - * assert.equal(1, 2); - * // AssertionError: 1 == 2 - * assert.equal({ a: { b: 1 } }, { a: { b: 1 } }); - * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } } - * ``` - * - * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default - * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. - * @since v0.1.21 - */ - function equal(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * **Strict assertion mode** - * - * An alias of {@link notStrictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead. - * - * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is - * specially handled and treated as being identical if both sides are `NaN`. - * - * ```js - * import assert from 'node:assert'; - * - * assert.notEqual(1, 2); - * // OK - * - * assert.notEqual(1, 1); - * // AssertionError: 1 != 1 - * - * assert.notEqual(1, '1'); - * // AssertionError: 1 != '1' - * ``` - * - * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error - * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. - * @since v0.1.21 - */ - function notEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * **Strict assertion mode** - * - * An alias of {@link deepStrictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead. - * - * Tests for deep equality between the `actual` and `expected` parameters. Consider - * using {@link deepStrictEqual} instead. {@link deepEqual} can have - * surprising results. - * - * _Deep equality_ means that the enumerable "own" properties of child objects - * are also recursively evaluated by the following rules. - * @since v0.1.21 - */ - function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * **Strict assertion mode** - * - * An alias of {@link notDeepStrictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead. - * - * Tests for any deep inequality. Opposite of {@link deepEqual}. - * - * ```js - * import assert from 'node:assert'; - * - * const obj1 = { - * a: { - * b: 1, - * }, - * }; - * const obj2 = { - * a: { - * b: 2, - * }, - * }; - * const obj3 = { - * a: { - * b: 1, - * }, - * }; - * const obj4 = { __proto__: obj1 }; - * - * assert.notDeepEqual(obj1, obj1); - * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } - * - * assert.notDeepEqual(obj1, obj2); - * // OK - * - * assert.notDeepEqual(obj1, obj3); - * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } - * - * assert.notDeepEqual(obj1, obj4); - * // OK - * ``` - * - * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default - * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v0.1.21 - */ - function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * Tests strict equality between the `actual` and `expected` parameters as - * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.strictEqual(1, 2); - * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: - * // - * // 1 !== 2 - * - * assert.strictEqual(1, 1); - * // OK - * - * assert.strictEqual('Hello foobar', 'Hello World!'); - * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: - * // + actual - expected - * // - * // + 'Hello foobar' - * // - 'Hello World!' - * // ^ - * - * const apples = 1; - * const oranges = 2; - * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); - * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 - * - * assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); - * // TypeError: Inputs are not identical - * ``` - * - * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a - * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v0.1.21 - */ - function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; - /** - * Tests strict inequality between the `actual` and `expected` parameters as - * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.notStrictEqual(1, 2); - * // OK - * - * assert.notStrictEqual(1, 1); - * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to: - * // - * // 1 - * - * assert.notStrictEqual(1, '1'); - * // OK - * ``` - * - * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a - * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v0.1.21 - */ - function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * Tests for deep equality between the `actual` and `expected` parameters. - * "Deep" equality means that the enumerable "own" properties of child objects - * are recursively evaluated also by the following rules. - * @since v1.2.0 - */ - function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; - /** - * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.notDeepStrictEqual({ a: 1 }, { a: '1' }); - * // OK - * ``` - * - * If the values are deeply and strictly equal, an `AssertionError` is thrown - * with a `message` property set equal to the value of the `message` parameter. If - * the `message` parameter is undefined, a default error message is assigned. If - * the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v1.2.0 - */ - function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * Expects the function `fn` to throw an error. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, - * a validation object where each property will be tested for strict deep equality, - * or an instance of error where each property will be tested for strict deep - * equality including the non-enumerable `message` and `name` properties. When - * using an object, it is also possible to use a regular expression, when - * validating against a string property. See below for examples. - * - * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation - * fails. - * - * Custom validation object/error instance: - * - * ```js - * import assert from 'node:assert/strict'; - * - * const err = new TypeError('Wrong value'); - * err.code = 404; - * err.foo = 'bar'; - * err.info = { - * nested: true, - * baz: 'text', - * }; - * err.reg = /abc/i; - * - * assert.throws( - * () => { - * throw err; - * }, - * { - * name: 'TypeError', - * message: 'Wrong value', - * info: { - * nested: true, - * baz: 'text', - * }, - * // Only properties on the validation object will be tested for. - * // Using nested objects requires all properties to be present. Otherwise - * // the validation is going to fail. - * }, - * ); - * - * // Using regular expressions to validate error properties: - * assert.throws( - * () => { - * throw err; - * }, - * { - * // The `name` and `message` properties are strings and using regular - * // expressions on those will match against the string. If they fail, an - * // error is thrown. - * name: /^TypeError$/, - * message: /Wrong/, - * foo: 'bar', - * info: { - * nested: true, - * // It is not possible to use regular expressions for nested properties! - * baz: 'text', - * }, - * // The `reg` property contains a regular expression and only if the - * // validation object contains an identical regular expression, it is going - * // to pass. - * reg: /abc/i, - * }, - * ); - * - * // Fails due to the different `message` and `name` properties: - * assert.throws( - * () => { - * const otherErr = new Error('Not found'); - * // Copy all enumerable properties from `err` to `otherErr`. - * for (const [key, value] of Object.entries(err)) { - * otherErr[key] = value; - * } - * throw otherErr; - * }, - * // The error's `message` and `name` properties will also be checked when using - * // an error as validation object. - * err, - * ); - * ``` - * - * Validate instanceof using constructor: - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.throws( - * () => { - * throw new Error('Wrong value'); - * }, - * Error, - * ); - * ``` - * - * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions): - * - * Using a regular expression runs `.toString` on the error object, and will - * therefore also include the error name. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.throws( - * () => { - * throw new Error('Wrong value'); - * }, - * /^Error: Wrong value$/, - * ); - * ``` - * - * Custom error validation: - * - * The function must return `true` to indicate all internal validations passed. - * It will otherwise fail with an `AssertionError`. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.throws( - * () => { - * throw new Error('Wrong value'); - * }, - * (err) => { - * assert(err instanceof Error); - * assert(/value/.test(err)); - * // Avoid returning anything from validation functions besides `true`. - * // Otherwise, it's not clear what part of the validation failed. Instead, - * // throw an error about the specific validation that failed (as done in this - * // example) and add as much helpful debugging information to that error as - * // possible. - * return true; - * }, - * 'unexpected error', - * ); - * ``` - * - * `error` cannot be a string. If a string is provided as the second - * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same - * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using - * a string as the second argument gets considered: - * - * ```js - * import assert from 'node:assert/strict'; - * - * function throwingFirst() { - * throw new Error('First'); - * } - * - * function throwingSecond() { - * throw new Error('Second'); - * } - * - * function notThrowing() {} - * - * // The second argument is a string and the input function threw an Error. - * // The first case will not throw as it does not match for the error message - * // thrown by the input function! - * assert.throws(throwingFirst, 'Second'); - * // In the next example the message has no benefit over the message from the - * // error and since it is not clear if the user intended to actually match - * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error. - * assert.throws(throwingSecond, 'Second'); - * // TypeError [ERR_AMBIGUOUS_ARGUMENT] - * - * // The string is only used (as message) in case the function does not throw: - * assert.throws(notThrowing, 'Second'); - * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second - * - * // If it was intended to match for the error message do this instead: - * // It does not throw because the error messages match. - * assert.throws(throwingSecond, /Second$/); - * - * // If the error message does not match, an AssertionError is thrown. - * assert.throws(throwingFirst, /Second$/); - * // AssertionError [ERR_ASSERTION] - * ``` - * - * Due to the confusing error-prone notation, avoid a string as the second - * argument. - * @since v0.1.21 - */ - function throws(block: () => unknown, message?: string | Error): void; - function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void; - /** - * Asserts that the function `fn` does not throw an error. - * - * Using `assert.doesNotThrow()` is actually not useful because there - * is no benefit in catching an error and then rethrowing it. Instead, consider - * adding a comment next to the specific code path that should not throw and keep - * error messages as expressive as possible. - * - * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function. - * - * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a - * different type, or if the `error` parameter is undefined, the error is - * propagated back to the caller. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation - * function. See {@link throws} for more details. - * - * The following, for instance, will throw the `TypeError` because there is no - * matching error type in the assertion: - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotThrow( - * () => { - * throw new TypeError('Wrong value'); - * }, - * SyntaxError, - * ); - * ``` - * - * However, the following will result in an `AssertionError` with the message - * 'Got unwanted exception...': - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotThrow( - * () => { - * throw new TypeError('Wrong value'); - * }, - * TypeError, - * ); - * ``` - * - * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message: - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotThrow( - * () => { - * throw new TypeError('Wrong value'); - * }, - * /Wrong value/, - * 'Whoops', - * ); - * // Throws: AssertionError: Got unwanted exception: Whoops - * ``` - * @since v0.1.21 - */ - function doesNotThrow(block: () => unknown, message?: string | Error): void; - function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void; - /** - * Throws `value` if `value` is not `undefined` or `null`. This is useful when - * testing the `error` argument in callbacks. The stack trace contains all frames - * from the error passed to `ifError()` including the potential new frames for `ifError()` itself. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.ifError(null); - * // OK - * assert.ifError(0); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0 - * assert.ifError('error'); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error' - * assert.ifError(new Error()); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error - * - * // Create some random error frames. - * let err; - * (function errorFrame() { - * err = new Error('test error'); - * })(); - * - * (function ifErrorFrame() { - * assert.ifError(err); - * })(); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error - * // at ifErrorFrame - * // at errorFrame - * ``` - * @since v0.1.97 - */ - function ifError(value: unknown): asserts value is null | undefined; - /** - * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately - * calls the function and awaits the returned promise to complete. It will then - * check that the promise is rejected. - * - * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the - * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v22.x/api/errors.html#err_invalid_return_value) - * error. In both cases the error handler is skipped. - * - * Besides the async nature to await the completion behaves identically to {@link throws}. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, - * an object where each property will be tested for, or an instance of error where - * each property will be tested for including the non-enumerable `message` and `name` properties. - * - * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject. - * - * ```js - * import assert from 'node:assert/strict'; - * - * await assert.rejects( - * async () => { - * throw new TypeError('Wrong value'); - * }, - * { - * name: 'TypeError', - * message: 'Wrong value', - * }, - * ); - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * await assert.rejects( - * async () => { - * throw new TypeError('Wrong value'); - * }, - * (err) => { - * assert.strictEqual(err.name, 'TypeError'); - * assert.strictEqual(err.message, 'Wrong value'); - * return true; - * }, - * ); - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.rejects( - * Promise.reject(new Error('Wrong value')), - * Error, - * ).then(() => { - * // ... - * }); - * ``` - * - * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to - * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the - * example in {@link throws} carefully if using a string as the second argument gets considered. - * @since v10.0.0 - */ - function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; - function rejects( - block: (() => Promise) | Promise, - error: AssertPredicate, - message?: string | Error, - ): Promise; - /** - * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately - * calls the function and awaits the returned promise to complete. It will then - * check that the promise is not rejected. - * - * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If - * the function does not return a promise, `assert.doesNotReject()` will return a - * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v22.x/api/errors.html#err_invalid_return_value) error. In both cases - * the error handler is skipped. - * - * Using `assert.doesNotReject()` is actually not useful because there is little - * benefit in catching a rejection and then rejecting it again. Instead, consider - * adding a comment next to the specific code path that should not reject and keep - * error messages as expressive as possible. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation - * function. See {@link throws} for more details. - * - * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}. - * - * ```js - * import assert from 'node:assert/strict'; - * - * await assert.doesNotReject( - * async () => { - * throw new TypeError('Wrong value'); - * }, - * SyntaxError, - * ); - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) - * .then(() => { - * // ... - * }); - * ``` - * @since v10.0.0 - */ - function doesNotReject( - block: (() => Promise) | Promise, - message?: string | Error, - ): Promise; - function doesNotReject( - block: (() => Promise) | Promise, - error: AssertPredicate, - message?: string | Error, - ): Promise; - /** - * Expects the `string` input to match the regular expression. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.match('I will fail', /pass/); - * // AssertionError [ERR_ASSERTION]: The input did not match the regular ... - * - * assert.match(123, /pass/); - * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. - * - * assert.match('I will pass', /pass/); - * // OK - * ``` - * - * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal - * to the value of the `message` parameter. If the `message` parameter is - * undefined, a default error message is assigned. If the `message` parameter is an - * instance of an [Error](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. - * @since v13.6.0, v12.16.0 - */ - function match(value: string, regExp: RegExp, message?: string | Error): void; - /** - * Expects the `string` input not to match the regular expression. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotMatch('I will fail', /fail/); - * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ... - * - * assert.doesNotMatch(123, /pass/); - * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. - * - * assert.doesNotMatch('I will pass', /different/); - * // OK - * ``` - * - * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal - * to the value of the `message` parameter. If the `message` parameter is - * undefined, a default error message is assigned. If the `message` parameter is an - * instance of an [Error](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. - * @since v13.6.0, v12.16.0 - */ - function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void; - /** - * In strict assertion mode, non-strict methods behave like their corresponding strict methods. For example, - * {@link deepEqual} will behave like {@link deepStrictEqual}. - * - * In strict assertion mode, error messages for objects display a diff. In legacy assertion mode, error - * messages for objects display the objects, often truncated. - * - * To use strict assertion mode: - * - * ```js - * import { strict as assert } from 'node:assert'; - * import assert from 'node:assert/strict'; - * ``` - * - * Example error diff: - * - * ```js - * import { strict as assert } from 'node:assert'; - * - * assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]); - * // AssertionError: Expected inputs to be strictly deep-equal: - * // + actual - expected ... Lines skipped - * // - * // [ - * // [ - * // ... - * // 2, - * // + 3 - * // - '3' - * // ], - * // ... - * // 5 - * // ] - * ``` - * - * To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS` environment variables. This will also - * deactivate the colors in the REPL. For more on color support in terminal environments, read the tty - * `getColorDepth()` documentation. - * - * @since v15.0.0, v13.9.0, v12.16.2, v9.9.0 - */ - namespace strict { - type AssertionError = assert.AssertionError; - type AssertPredicate = assert.AssertPredicate; - type CallTrackerCall = assert.CallTrackerCall; - type CallTrackerReportInformation = assert.CallTrackerReportInformation; - } - const strict: - & Omit< - typeof assert, - | "equal" - | "notEqual" - | "deepEqual" - | "notDeepEqual" - | "ok" - | "strictEqual" - | "deepStrictEqual" - | "ifError" - | "strict" - > - & { - (value: unknown, message?: string | Error): asserts value; - equal: typeof strictEqual; - notEqual: typeof notStrictEqual; - deepEqual: typeof deepStrictEqual; - notDeepEqual: typeof notDeepStrictEqual; - // Mapped types and assertion functions are incompatible? - // TS2775: Assertions require every name in the call target - // to be declared with an explicit type annotation. - ok: typeof ok; - strictEqual: typeof strictEqual; - deepStrictEqual: typeof deepStrictEqual; - ifError: typeof ifError; - strict: typeof strict; - }; - } - export = assert; -} -declare module "node:assert" { - import assert = require("assert"); - export = assert; -} diff --git a/web/static/node_modules/@types/node/assert/strict.d.ts b/web/static/node_modules/@types/node/assert/strict.d.ts deleted file mode 100644 index f333913a..00000000 --- a/web/static/node_modules/@types/node/assert/strict.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare module "assert/strict" { - import { strict } from "node:assert"; - export = strict; -} -declare module "node:assert/strict" { - import { strict } from "node:assert"; - export = strict; -} diff --git a/web/static/node_modules/@types/node/async_hooks.d.ts b/web/static/node_modules/@types/node/async_hooks.d.ts deleted file mode 100644 index 4d6df815..00000000 --- a/web/static/node_modules/@types/node/async_hooks.d.ts +++ /dev/null @@ -1,541 +0,0 @@ -/** - * We strongly discourage the use of the `async_hooks` API. - * Other APIs that can cover most of its use cases include: - * - * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v22.x/api/async_context.html#class-asynclocalstorage) tracks async context - * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v22.x/api/process.html#processgetactiveresourcesinfo) tracks active resources - * - * The `node:async_hooks` module provides an API to track asynchronous resources. - * It can be accessed using: - * - * ```js - * import async_hooks from 'node:async_hooks'; - * ``` - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/async_hooks.js) - */ -declare module "async_hooks" { - /** - * ```js - * import { executionAsyncId } from 'node:async_hooks'; - * import fs from 'node:fs'; - * - * console.log(executionAsyncId()); // 1 - bootstrap - * const path = '.'; - * fs.open(path, 'r', (err, fd) => { - * console.log(executionAsyncId()); // 6 - open() - * }); - * ``` - * - * The ID returned from `executionAsyncId()` is related to execution timing, not - * causality (which is covered by `triggerAsyncId()`): - * - * ```js - * const server = net.createServer((conn) => { - * // Returns the ID of the server, not of the new connection, because the - * // callback runs in the execution scope of the server's MakeCallback(). - * async_hooks.executionAsyncId(); - * - * }).listen(port, () => { - * // Returns the ID of a TickObject (process.nextTick()) because all - * // callbacks passed to .listen() are wrapped in a nextTick(). - * async_hooks.executionAsyncId(); - * }); - * ``` - * - * Promise contexts may not get precise `executionAsyncIds` by default. - * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html#promise-execution-tracking). - * @since v8.1.0 - * @return The `asyncId` of the current execution context. Useful to track when something calls. - */ - function executionAsyncId(): number; - /** - * Resource objects returned by `executionAsyncResource()` are most often internal - * Node.js handle objects with undocumented APIs. Using any functions or properties - * on the object is likely to crash your application and should be avoided. - * - * Using `executionAsyncResource()` in the top-level execution context will - * return an empty object as there is no handle or request object to use, - * but having an object representing the top-level can be helpful. - * - * ```js - * import { open } from 'node:fs'; - * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks'; - * - * console.log(executionAsyncId(), executionAsyncResource()); // 1 {} - * open(new URL(import.meta.url), 'r', (err, fd) => { - * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap - * }); - * ``` - * - * This can be used to implement continuation local storage without the - * use of a tracking `Map` to store the metadata: - * - * ```js - * import { createServer } from 'node:http'; - * import { - * executionAsyncId, - * executionAsyncResource, - * createHook, - * } from 'node:async_hooks'; - * const sym = Symbol('state'); // Private symbol to avoid pollution - * - * createHook({ - * init(asyncId, type, triggerAsyncId, resource) { - * const cr = executionAsyncResource(); - * if (cr) { - * resource[sym] = cr[sym]; - * } - * }, - * }).enable(); - * - * const server = createServer((req, res) => { - * executionAsyncResource()[sym] = { state: req.url }; - * setTimeout(function() { - * res.end(JSON.stringify(executionAsyncResource()[sym])); - * }, 100); - * }).listen(3000); - * ``` - * @since v13.9.0, v12.17.0 - * @return The resource representing the current execution. Useful to store data within the resource. - */ - function executionAsyncResource(): object; - /** - * ```js - * const server = net.createServer((conn) => { - * // The resource that caused (or triggered) this callback to be called - * // was that of the new connection. Thus the return value of triggerAsyncId() - * // is the asyncId of "conn". - * async_hooks.triggerAsyncId(); - * - * }).listen(port, () => { - * // Even though all callbacks passed to .listen() are wrapped in a nextTick() - * // the callback itself exists because the call to the server's .listen() - * // was made. So the return value would be the ID of the server. - * async_hooks.triggerAsyncId(); - * }); - * ``` - * - * Promise contexts may not get valid `triggerAsyncId`s by default. See - * the section on [promise execution tracking](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html#promise-execution-tracking). - * @return The ID of the resource responsible for calling the callback that is currently being executed. - */ - function triggerAsyncId(): number; - interface HookCallbacks { - /** - * Called when a class is constructed that has the possibility to emit an asynchronous event. - * @param asyncId A unique ID for the async resource - * @param type The type of the async resource - * @param triggerAsyncId The unique ID of the async resource in whose execution context this async resource was created - * @param resource Reference to the resource representing the async operation, needs to be released during destroy - */ - init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void; - /** - * When an asynchronous operation is initiated or completes a callback is called to notify the user. - * The before callback is called just before said callback is executed. - * @param asyncId the unique identifier assigned to the resource about to execute the callback. - */ - before?(asyncId: number): void; - /** - * Called immediately after the callback specified in `before` is completed. - * - * If an uncaught exception occurs during execution of the callback, then `after` will run after the `'uncaughtException'` event is emitted or a `domain`'s handler runs. - * @param asyncId the unique identifier assigned to the resource which has executed the callback. - */ - after?(asyncId: number): void; - /** - * Called when a promise has resolve() called. This may not be in the same execution id - * as the promise itself. - * @param asyncId the unique id for the promise that was resolve()d. - */ - promiseResolve?(asyncId: number): void; - /** - * Called after the resource corresponding to asyncId is destroyed - * @param asyncId a unique ID for the async resource - */ - destroy?(asyncId: number): void; - } - interface AsyncHook { - /** - * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. - */ - enable(): this; - /** - * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. - */ - disable(): this; - } - /** - * Registers functions to be called for different lifetime events of each async - * operation. - * - * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the - * respective asynchronous event during a resource's lifetime. - * - * All callbacks are optional. For example, if only resource cleanup needs to - * be tracked, then only the `destroy` callback needs to be passed. The - * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section. - * - * ```js - * import { createHook } from 'node:async_hooks'; - * - * const asyncHook = createHook({ - * init(asyncId, type, triggerAsyncId, resource) { }, - * destroy(asyncId) { }, - * }); - * ``` - * - * The callbacks will be inherited via the prototype chain: - * - * ```js - * class MyAsyncCallbacks { - * init(asyncId, type, triggerAsyncId, resource) { } - * destroy(asyncId) {} - * } - * - * class MyAddedCallbacks extends MyAsyncCallbacks { - * before(asyncId) { } - * after(asyncId) { } - * } - * - * const asyncHook = async_hooks.createHook(new MyAddedCallbacks()); - * ``` - * - * Because promises are asynchronous resources whose lifecycle is tracked - * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises. - * @since v8.1.0 - * @param callbacks The `Hook Callbacks` to register - * @return Instance used for disabling and enabling hooks - */ - function createHook(callbacks: HookCallbacks): AsyncHook; - interface AsyncResourceOptions { - /** - * The ID of the execution context that created this async event. - * @default executionAsyncId() - */ - triggerAsyncId?: number | undefined; - /** - * Disables automatic `emitDestroy` when the object is garbage collected. - * This usually does not need to be set (even if `emitDestroy` is called - * manually), unless the resource's `asyncId` is retrieved and the - * sensitive API's `emitDestroy` is called with it. - * @default false - */ - requireManualDestroy?: boolean | undefined; - } - /** - * The class `AsyncResource` is designed to be extended by the embedder's async - * resources. Using this, users can easily trigger the lifetime events of their - * own resources. - * - * The `init` hook will trigger when an `AsyncResource` is instantiated. - * - * The following is an overview of the `AsyncResource` API. - * - * ```js - * import { AsyncResource, executionAsyncId } from 'node:async_hooks'; - * - * // AsyncResource() is meant to be extended. Instantiating a - * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then - * // async_hook.executionAsyncId() is used. - * const asyncResource = new AsyncResource( - * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }, - * ); - * - * // Run a function in the execution context of the resource. This will - * // * establish the context of the resource - * // * trigger the AsyncHooks before callbacks - * // * call the provided function `fn` with the supplied arguments - * // * trigger the AsyncHooks after callbacks - * // * restore the original execution context - * asyncResource.runInAsyncScope(fn, thisArg, ...args); - * - * // Call AsyncHooks destroy callbacks. - * asyncResource.emitDestroy(); - * - * // Return the unique ID assigned to the AsyncResource instance. - * asyncResource.asyncId(); - * - * // Return the trigger ID for the AsyncResource instance. - * asyncResource.triggerAsyncId(); - * ``` - */ - class AsyncResource { - /** - * AsyncResource() is meant to be extended. Instantiating a - * new AsyncResource() also triggers init. If triggerAsyncId is omitted then - * async_hook.executionAsyncId() is used. - * @param type The type of async event. - * @param triggerAsyncId The ID of the execution context that created - * this async event (default: `executionAsyncId()`), or an - * AsyncResourceOptions object (since v9.3.0) - */ - constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions); - /** - * Binds the given function to the current execution context. - * @since v14.8.0, v12.19.0 - * @param fn The function to bind to the current execution context. - * @param type An optional name to associate with the underlying `AsyncResource`. - */ - static bind any, ThisArg>( - fn: Func, - type?: string, - thisArg?: ThisArg, - ): Func; - /** - * Binds the given function to execute to this `AsyncResource`'s scope. - * @since v14.8.0, v12.19.0 - * @param fn The function to bind to the current `AsyncResource`. - */ - bind any>(fn: Func): Func; - /** - * Call the provided function with the provided arguments in the execution context - * of the async resource. This will establish the context, trigger the AsyncHooks - * before callbacks, call the function, trigger the AsyncHooks after callbacks, and - * then restore the original execution context. - * @since v9.6.0 - * @param fn The function to call in the execution context of this async resource. - * @param thisArg The receiver to be used for the function call. - * @param args Optional arguments to pass to the function. - */ - runInAsyncScope( - fn: (this: This, ...args: any[]) => Result, - thisArg?: This, - ...args: any[] - ): Result; - /** - * Call all `destroy` hooks. This should only ever be called once. An error will - * be thrown if it is called more than once. This **must** be manually called. If - * the resource is left to be collected by the GC then the `destroy` hooks will - * never be called. - * @return A reference to `asyncResource`. - */ - emitDestroy(): this; - /** - * @return The unique `asyncId` assigned to the resource. - */ - asyncId(): number; - /** - * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor. - */ - triggerAsyncId(): number; - } - /** - * This class creates stores that stay coherent through asynchronous operations. - * - * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory - * safe implementation that involves significant optimizations that are non-obvious - * to implement. - * - * The following example uses `AsyncLocalStorage` to build a simple logger - * that assigns IDs to incoming HTTP requests and includes them in messages - * logged within each request. - * - * ```js - * import http from 'node:http'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const asyncLocalStorage = new AsyncLocalStorage(); - * - * function logWithId(msg) { - * const id = asyncLocalStorage.getStore(); - * console.log(`${id !== undefined ? id : '-'}:`, msg); - * } - * - * let idSeq = 0; - * http.createServer((req, res) => { - * asyncLocalStorage.run(idSeq++, () => { - * logWithId('start'); - * // Imagine any chain of async operations here - * setImmediate(() => { - * logWithId('finish'); - * res.end(); - * }); - * }); - * }).listen(8080); - * - * http.get('http://localhost:8080'); - * http.get('http://localhost:8080'); - * // Prints: - * // 0: start - * // 1: start - * // 0: finish - * // 1: finish - * ``` - * - * Each instance of `AsyncLocalStorage` maintains an independent storage context. - * Multiple instances can safely exist simultaneously without risk of interfering - * with each other's data. - * @since v13.10.0, v12.17.0 - */ - class AsyncLocalStorage { - /** - * Binds the given function to the current execution context. - * @since v19.8.0 - * @experimental - * @param fn The function to bind to the current execution context. - * @return A new function that calls `fn` within the captured execution context. - */ - static bind any>(fn: Func): Func; - /** - * Captures the current execution context and returns a function that accepts a - * function as an argument. Whenever the returned function is called, it - * calls the function passed to it within the captured context. - * - * ```js - * const asyncLocalStorage = new AsyncLocalStorage(); - * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot()); - * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore())); - * console.log(result); // returns 123 - * ``` - * - * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple - * async context tracking purposes, for example: - * - * ```js - * class Foo { - * #runInAsyncScope = AsyncLocalStorage.snapshot(); - * - * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); } - * } - * - * const foo = asyncLocalStorage.run(123, () => new Foo()); - * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123 - * ``` - * @since v19.8.0 - * @experimental - * @return A new function with the signature `(fn: (...args) : R, ...args) : R`. - */ - static snapshot(): (fn: (...args: TArgs) => R, ...args: TArgs) => R; - /** - * Disables the instance of `AsyncLocalStorage`. All subsequent calls - * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. - * - * When calling `asyncLocalStorage.disable()`, all current contexts linked to the - * instance will be exited. - * - * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores - * provided by the `asyncLocalStorage`, as those objects are garbage collected - * along with the corresponding async resources. - * - * Use this method when the `asyncLocalStorage` is not in use anymore - * in the current process. - * @since v13.10.0, v12.17.0 - * @experimental - */ - disable(): void; - /** - * Returns the current store. - * If called outside of an asynchronous context initialized by - * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it - * returns `undefined`. - * @since v13.10.0, v12.17.0 - */ - getStore(): T | undefined; - /** - * Runs a function synchronously within a context and returns its - * return value. The store is not accessible outside of the callback function. - * The store is accessible to any asynchronous operations created within the - * callback. - * - * The optional `args` are passed to the callback function. - * - * If the callback function throws an error, the error is thrown by `run()` too. - * The stacktrace is not impacted by this call and the context is exited. - * - * Example: - * - * ```js - * const store = { id: 2 }; - * try { - * asyncLocalStorage.run(store, () => { - * asyncLocalStorage.getStore(); // Returns the store object - * setTimeout(() => { - * asyncLocalStorage.getStore(); // Returns the store object - * }, 200); - * throw new Error(); - * }); - * } catch (e) { - * asyncLocalStorage.getStore(); // Returns undefined - * // The error will be caught here - * } - * ``` - * @since v13.10.0, v12.17.0 - */ - run(store: T, callback: () => R): R; - run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R; - /** - * Runs a function synchronously outside of a context and returns its - * return value. The store is not accessible within the callback function or - * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`. - * - * The optional `args` are passed to the callback function. - * - * If the callback function throws an error, the error is thrown by `exit()` too. - * The stacktrace is not impacted by this call and the context is re-entered. - * - * Example: - * - * ```js - * // Within a call to run - * try { - * asyncLocalStorage.getStore(); // Returns the store object or value - * asyncLocalStorage.exit(() => { - * asyncLocalStorage.getStore(); // Returns undefined - * throw new Error(); - * }); - * } catch (e) { - * asyncLocalStorage.getStore(); // Returns the same object or value - * // The error will be caught here - * } - * ``` - * @since v13.10.0, v12.17.0 - * @experimental - */ - exit(callback: (...args: TArgs) => R, ...args: TArgs): R; - /** - * Transitions into the context for the remainder of the current - * synchronous execution and then persists the store through any following - * asynchronous calls. - * - * Example: - * - * ```js - * const store = { id: 1 }; - * // Replaces previous store with the given store object - * asyncLocalStorage.enterWith(store); - * asyncLocalStorage.getStore(); // Returns the store object - * someAsyncOperation(() => { - * asyncLocalStorage.getStore(); // Returns the same object - * }); - * ``` - * - * This transition will continue for the _entire_ synchronous execution. - * This means that if, for example, the context is entered within an event - * handler subsequent event handlers will also run within that context unless - * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons - * to use the latter method. - * - * ```js - * const store = { id: 1 }; - * - * emitter.on('my-event', () => { - * asyncLocalStorage.enterWith(store); - * }); - * emitter.on('my-event', () => { - * asyncLocalStorage.getStore(); // Returns the same object - * }); - * - * asyncLocalStorage.getStore(); // Returns undefined - * emitter.emit('my-event'); - * asyncLocalStorage.getStore(); // Returns the same object - * ``` - * @since v13.11.0, v12.17.0 - * @experimental - */ - enterWith(store: T): void; - } -} -declare module "node:async_hooks" { - export * from "async_hooks"; -} diff --git a/web/static/node_modules/@types/node/buffer.buffer.d.ts b/web/static/node_modules/@types/node/buffer.buffer.d.ts deleted file mode 100644 index 0b6c49a6..00000000 --- a/web/static/node_modules/@types/node/buffer.buffer.d.ts +++ /dev/null @@ -1,385 +0,0 @@ -declare module "buffer" { - global { - interface BufferConstructor { - // see buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. - */ - new(str: string, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). - */ - new(size: number): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - new(array: Uint8Array): Buffer; - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}/{SharedArrayBuffer}. - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. - */ - new(arrayBuffer: TArrayBuffer): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - new(array: readonly any[]): Buffer; - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. - */ - new(buffer: Buffer): Buffer; - /** - * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. - * Array entries outside that range will be truncated to fit into it. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. - * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); - * ``` - * - * If `array` is an `Array`\-like object (that is, one with a `length` property of - * type `number`), it is treated as if it is an array, unless it is a `Buffer` or - * a `Uint8Array`. This means all other `TypedArray` variants get treated as an `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use `Buffer.copyBytesFrom()`. - * - * A `TypeError` will be thrown if `array` is not an `Array` or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v5.10.0 - */ - from( - arrayBuffer: WithImplicitCoercion, - byteOffset?: number, - length?: number, - ): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param data data to create a new Buffer - */ - from(data: Uint8Array | readonly number[]): Buffer; - from(data: WithImplicitCoercion): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - */ - from( - str: - | WithImplicitCoercion - | { - [Symbol.toPrimitive](hint: "string"): string; - }, - encoding?: BufferEncoding, - ): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param values to create a new Buffer - */ - of(...items: number[]): Buffer; - /** - * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. - * - * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. - * - * If `totalLength` is not provided, it is calculated from the `Buffer` instances - * in `list` by adding their lengths. - * - * If `totalLength` is provided, it is coerced to an unsigned integer. If the - * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is - * truncated to `totalLength`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a single `Buffer` from a list of three `Buffer` instances. - * - * const buf1 = Buffer.alloc(10); - * const buf2 = Buffer.alloc(14); - * const buf3 = Buffer.alloc(18); - * const totalLength = buf1.length + buf2.length + buf3.length; - * - * console.log(totalLength); - * // Prints: 42 - * - * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); - * - * console.log(bufA); - * // Prints: - * console.log(bufA.length); - * // Prints: 42 - * ``` - * - * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v0.7.11 - * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. - * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. - */ - concat(list: readonly Uint8Array[], totalLength?: number): Buffer; - /** - * Copies the underlying memory of `view` into a new `Buffer`. - * - * ```js - * const u16 = new Uint16Array([0, 0xffff]); - * const buf = Buffer.copyBytesFrom(u16, 1, 1); - * u16[1] = 0; - * console.log(buf.length); // 2 - * console.log(buf[0]); // 255 - * console.log(buf[1]); // 255 - * ``` - * @since v19.8.0 - * @param view The {TypedArray} to copy. - * @param [offset=0] The starting offset within `view`. - * @param [length=view.length - offset] The number of elements from `view` to copy. - */ - copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5); - * - * console.log(buf); - * // Prints: - * ``` - * - * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5, 'a'); - * - * console.log(buf); - * // Prints: - * ``` - * - * If both `fill` and `encoding` are specified, the allocated `Buffer` will be - * initialized by calling `buf.fill(fill, encoding)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); - * - * console.log(buf); - * // Prints: - * ``` - * - * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance - * contents will never contain sensitive data from previous allocations, including - * data that might not have been allocated for `Buffer`s. - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - * @param [fill=0] A value to pre-fill the new `Buffer` with. - * @param [encoding='utf8'] If `fill` is a string, this is its encoding. - */ - alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(10); - * - * console.log(buf); - * // Prints (contents may vary): - * - * buf.fill(0); - * - * console.log(buf); - * // Prints: - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * - * The `Buffer` module pre-allocates an internal `Buffer` instance of - * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, - * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). - * - * Use of this pre-allocated internal memory pool is a key difference between - * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. - * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less - * than or equal to half `Buffer.poolSize`. The - * difference is subtle but can be important when an application requires the - * additional performance that `Buffer.allocUnsafe()` provides. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafe(size: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if - * `size` is 0. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize - * such `Buffer` instances with zeroes. - * - * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, - * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This - * allows applications to avoid the garbage collection overhead of creating many - * individually allocated `Buffer` instances. This approach improves both - * performance and memory usage by eliminating the need to track and clean up as - * many individual `ArrayBuffer` objects. - * - * However, in the case where a developer may need to retain a small chunk of - * memory from a pool for an indeterminate amount of time, it may be appropriate - * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and - * then copying out the relevant bits. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Need to keep around a few small chunks of memory. - * const store = []; - * - * socket.on('readable', () => { - * let data; - * while (null !== (data = readable.read())) { - * // Allocate for retained data. - * const sb = Buffer.allocUnsafeSlow(10); - * - * // Copy the data into the new allocation. - * data.copy(sb, 0, 0, 10); - * - * store.push(sb); - * } - * }); - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.12.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafeSlow(size: number): Buffer; - } - interface Buffer extends Uint8Array { - // see buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * This method is not compatible with the `Uint8Array.prototype.slice()`, - * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * const copiedBuf = Uint8Array.prototype.slice.call(buf); - * copiedBuf[0]++; - * console.log(copiedBuf.toString()); - * // Prints: cuffer - * - * console.log(buf.toString()); - * // Prints: buffer - * - * // With buf.slice(), the original buffer is modified. - * const notReallyCopiedBuf = buf.slice(); - * notReallyCopiedBuf[0]++; - * console.log(notReallyCopiedBuf.toString()); - * // Prints: cuffer - * console.log(buf.toString()); - * // Also prints: cuffer (!) - * ``` - * @since v0.3.0 - * @deprecated Use `subarray` instead. - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - slice(start?: number, end?: number): Buffer; - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * Specifying `end` greater than `buf.length` will return the same result as - * that of `end` equal to `buf.length`. - * - * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). - * - * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte - * // from the original `Buffer`. - * - * const buf1 = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * const buf2 = buf1.subarray(0, 3); - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: abc - * - * buf1[0] = 33; - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: !bc - * ``` - * - * Specifying negative indexes causes the slice to be generated relative to the - * end of `buf` rather than the beginning. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * console.log(buf.subarray(-6, -1).toString()); - * // Prints: buffe - * // (Equivalent to buf.subarray(0, 5).) - * - * console.log(buf.subarray(-6, -2).toString()); - * // Prints: buff - * // (Equivalent to buf.subarray(0, 4).) - * - * console.log(buf.subarray(-5, -2).toString()); - * // Prints: uff - * // (Equivalent to buf.subarray(1, 4).) - * ``` - * @since v3.0.0 - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - subarray(start?: number, end?: number): Buffer; - } - } -} diff --git a/web/static/node_modules/@types/node/buffer.d.ts b/web/static/node_modules/@types/node/buffer.d.ts deleted file mode 100644 index 792bf4d7..00000000 --- a/web/static/node_modules/@types/node/buffer.d.ts +++ /dev/null @@ -1,1933 +0,0 @@ -// If lib.dom.d.ts or lib.webworker.d.ts is loaded, then use the global types. -// Otherwise, use the types from node. -type _Blob = typeof globalThis extends { onmessage: any; Blob: any } ? {} : import("buffer").Blob; -type _File = typeof globalThis extends { onmessage: any; File: any } ? {} : import("buffer").File; - -/** - * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many - * Node.js APIs support `Buffer`s. - * - * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and - * extends it with methods that cover additional use cases. Node.js APIs accept - * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well. - * - * While the `Buffer` class is available within the global scope, it is still - * recommended to explicitly reference it via an import or require statement. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Creates a zero-filled Buffer of length 10. - * const buf1 = Buffer.alloc(10); - * - * // Creates a Buffer of length 10, - * // filled with bytes which all have the value `1`. - * const buf2 = Buffer.alloc(10, 1); - * - * // Creates an uninitialized buffer of length 10. - * // This is faster than calling Buffer.alloc() but the returned - * // Buffer instance might contain old data that needs to be - * // overwritten using fill(), write(), or other functions that fill the Buffer's - * // contents. - * const buf3 = Buffer.allocUnsafe(10); - * - * // Creates a Buffer containing the bytes [1, 2, 3]. - * const buf4 = Buffer.from([1, 2, 3]); - * - * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries - * // are all truncated using `(value & 255)` to fit into the range 0–255. - * const buf5 = Buffer.from([257, 257.5, -255, '1']); - * - * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést': - * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation) - * // [116, 195, 169, 115, 116] (in decimal notation) - * const buf6 = Buffer.from('tést'); - * - * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74]. - * const buf7 = Buffer.from('tést', 'latin1'); - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/buffer.js) - */ -declare module "buffer" { - import { BinaryLike } from "node:crypto"; - import { ReadableStream as WebReadableStream } from "node:stream/web"; - /** - * This function returns `true` if `input` contains only valid UTF-8-encoded data, - * including the case in which `input` is empty. - * - * Throws if the `input` is a detached array buffer. - * @since v19.4.0, v18.14.0 - * @param input The input to validate. - */ - export function isUtf8(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean; - /** - * This function returns `true` if `input` contains only valid ASCII-encoded data, - * including the case in which `input` is empty. - * - * Throws if the `input` is a detached array buffer. - * @since v19.6.0, v18.15.0 - * @param input The input to validate. - */ - export function isAscii(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean; - export const INSPECT_MAX_BYTES: number; - export const kMaxLength: number; - export const kStringMaxLength: number; - export const constants: { - MAX_LENGTH: number; - MAX_STRING_LENGTH: number; - }; - export type TranscodeEncoding = - | "ascii" - | "utf8" - | "utf-8" - | "utf16le" - | "utf-16le" - | "ucs2" - | "ucs-2" - | "latin1" - | "binary"; - /** - * Re-encodes the given `Buffer` or `Uint8Array` instance from one character - * encoding to another. Returns a new `Buffer` instance. - * - * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if - * conversion from `fromEnc` to `toEnc` is not permitted. - * - * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`, `'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`. - * - * The transcoding process will use substitution characters if a given byte - * sequence cannot be adequately represented in the target encoding. For instance: - * - * ```js - * import { Buffer, transcode } from 'node:buffer'; - * - * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii'); - * console.log(newBuf.toString('ascii')); - * // Prints: '?' - * ``` - * - * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced - * with `?` in the transcoded `Buffer`. - * @since v7.1.0 - * @param source A `Buffer` or `Uint8Array` instance. - * @param fromEnc The current encoding. - * @param toEnc To target encoding. - */ - export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer; - export const SlowBuffer: { - /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */ - new(size: number): Buffer; - prototype: Buffer; - }; - /** - * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using - * a prior call to `URL.createObjectURL()`. - * @since v16.7.0 - * @experimental - * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. - */ - export function resolveObjectURL(id: string): Blob | undefined; - export { Buffer }; - /** - * @experimental - */ - export interface BlobOptions { - /** - * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts - * will be converted to the platform native line-ending as specified by `import { EOL } from 'node:os'`. - */ - endings?: "transparent" | "native"; - /** - * The Blob content-type. The intent is for `type` to convey - * the MIME media type of the data, however no validation of the type format - * is performed. - */ - type?: string | undefined; - } - /** - * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across - * multiple worker threads. - * @since v15.7.0, v14.18.0 - */ - export class Blob { - /** - * The total size of the `Blob` in bytes. - * @since v15.7.0, v14.18.0 - */ - readonly size: number; - /** - * The content-type of the `Blob`. - * @since v15.7.0, v14.18.0 - */ - readonly type: string; - /** - * Creates a new `Blob` object containing a concatenation of the given sources. - * - * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into - * the 'Blob' and can therefore be safely modified after the 'Blob' is created. - * - * String sources are also copied into the `Blob`. - */ - constructor(sources: Array, options?: BlobOptions); - /** - * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of - * the `Blob` data. - * @since v15.7.0, v14.18.0 - */ - arrayBuffer(): Promise; - /** - * The `blob.bytes()` method returns the byte of the `Blob` object as a `Promise`. - * - * ```js - * const blob = new Blob(['hello']); - * blob.bytes().then((bytes) => { - * console.log(bytes); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ] - * }); - * ``` - */ - bytes(): Promise; - /** - * Creates and returns a new `Blob` containing a subset of this `Blob` objects - * data. The original `Blob` is not altered. - * @since v15.7.0, v14.18.0 - * @param start The starting index. - * @param end The ending index. - * @param type The content-type for the new `Blob` - */ - slice(start?: number, end?: number, type?: string): Blob; - /** - * Returns a promise that fulfills with the contents of the `Blob` decoded as a - * UTF-8 string. - * @since v15.7.0, v14.18.0 - */ - text(): Promise; - /** - * Returns a new `ReadableStream` that allows the content of the `Blob` to be read. - * @since v16.7.0 - */ - stream(): WebReadableStream; - } - export interface FileOptions { - /** - * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be - * converted to the platform native line-ending as specified by `import { EOL } from 'node:os'`. - */ - endings?: "native" | "transparent"; - /** The File content-type. */ - type?: string; - /** The last modified date of the file. `Default`: Date.now(). */ - lastModified?: number; - } - /** - * A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files. - * @since v19.2.0, v18.13.0 - */ - export class File extends Blob { - constructor(sources: Array, fileName: string, options?: FileOptions); - /** - * The name of the `File`. - * @since v19.2.0, v18.13.0 - */ - readonly name: string; - /** - * The last modified date of the `File`. - * @since v19.2.0, v18.13.0 - */ - readonly lastModified: number; - } - export import atob = globalThis.atob; - export import btoa = globalThis.btoa; - - global { - namespace NodeJS { - export { BufferEncoding }; - } - // Buffer class - type BufferEncoding = - | "ascii" - | "utf8" - | "utf-8" - | "utf16le" - | "utf-16le" - | "ucs2" - | "ucs-2" - | "base64" - | "base64url" - | "latin1" - | "binary" - | "hex"; - type WithImplicitCoercion = - | T - | { - valueOf(): T; - }; - /** - * Raw data is stored in instances of the Buffer class. - * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. - * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex' - */ - interface BufferConstructor { - // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later - // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier - - /** - * Returns `true` if `obj` is a `Buffer`, `false` otherwise. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * Buffer.isBuffer(Buffer.alloc(10)); // true - * Buffer.isBuffer(Buffer.from('foo')); // true - * Buffer.isBuffer('a string'); // false - * Buffer.isBuffer([]); // false - * Buffer.isBuffer(new Uint8Array(1024)); // false - * ``` - * @since v0.1.101 - */ - isBuffer(obj: any): obj is Buffer; - /** - * Returns `true` if `encoding` is the name of a supported character encoding, - * or `false` otherwise. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * console.log(Buffer.isEncoding('utf8')); - * // Prints: true - * - * console.log(Buffer.isEncoding('hex')); - * // Prints: true - * - * console.log(Buffer.isEncoding('utf/8')); - * // Prints: false - * - * console.log(Buffer.isEncoding('')); - * // Prints: false - * ``` - * @since v0.9.1 - * @param encoding A character encoding name to check. - */ - isEncoding(encoding: string): encoding is BufferEncoding; - /** - * Returns the byte length of a string when encoded using `encoding`. - * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account - * for the encoding that is used to convert the string into bytes. - * - * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input. - * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the - * return value might be greater than the length of a `Buffer` created from the - * string. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const str = '\u00bd + \u00bc = \u00be'; - * - * console.log(`${str}: ${str.length} characters, ` + - * `${Buffer.byteLength(str, 'utf8')} bytes`); - * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes - * ``` - * - * When `string` is a - * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/- - * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- - * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. - * @since v0.1.90 - * @param string A value to calculate the length of. - * @param [encoding='utf8'] If `string` is a string, this is its encoding. - * @return The number of bytes contained within `string`. - */ - byteLength( - string: string | Buffer | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, - encoding?: BufferEncoding, - ): number; - /** - * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('1234'); - * const buf2 = Buffer.from('0123'); - * const arr = [buf1, buf2]; - * - * console.log(arr.sort(Buffer.compare)); - * // Prints: [ , ] - * // (This result is equal to: [buf2, buf1].) - * ``` - * @since v0.11.13 - * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details. - */ - compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1; - /** - * This is the size (in bytes) of pre-allocated internal `Buffer` instances used - * for pooling. This value may be modified. - * @since v0.11.3 - */ - poolSize: number; - } - interface Buffer { - // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later - // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier - - /** - * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did - * not contain enough space to fit the entire string, only part of `string` will be - * written. However, partially encoded characters will not be written. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(256); - * - * const len = buf.write('\u00bd + \u00bc = \u00be', 0); - * - * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); - * // Prints: 12 bytes: ½ + ¼ = ¾ - * - * const buffer = Buffer.alloc(10); - * - * const length = buffer.write('abcd', 8); - * - * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); - * // Prints: 2 bytes : ab - * ``` - * @since v0.1.90 - * @param string String to write to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write `string`. - * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`). - * @param [encoding='utf8'] The character encoding of `string`. - * @return Number of bytes written. - */ - write(string: string, encoding?: BufferEncoding): number; - write(string: string, offset: number, encoding?: BufferEncoding): number; - write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; - /** - * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. - * - * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8, - * then each invalid byte is replaced with the replacement character `U+FFFD`. - * - * The maximum length of a string instance (in UTF-16 code units) is available - * as {@link constants.MAX_STRING_LENGTH}. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * console.log(buf1.toString('utf8')); - * // Prints: abcdefghijklmnopqrstuvwxyz - * console.log(buf1.toString('utf8', 0, 5)); - * // Prints: abcde - * - * const buf2 = Buffer.from('tést'); - * - * console.log(buf2.toString('hex')); - * // Prints: 74c3a97374 - * console.log(buf2.toString('utf8', 0, 3)); - * // Prints: té - * console.log(buf2.toString(undefined, 0, 3)); - * // Prints: té - * ``` - * @since v0.1.90 - * @param [encoding='utf8'] The character encoding to use. - * @param [start=0] The byte offset to start decoding at. - * @param [end=buf.length] The byte offset to stop decoding at (not inclusive). - */ - toString(encoding?: BufferEncoding, start?: number, end?: number): string; - /** - * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls - * this function when stringifying a `Buffer` instance. - * - * `Buffer.from()` accepts objects in the format returned from this method. - * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); - * const json = JSON.stringify(buf); - * - * console.log(json); - * // Prints: {"type":"Buffer","data":[1,2,3,4,5]} - * - * const copy = JSON.parse(json, (key, value) => { - * return value && value.type === 'Buffer' ? - * Buffer.from(value) : - * value; - * }); - * - * console.log(copy); - * // Prints: - * ``` - * @since v0.9.2 - */ - toJSON(): { - type: "Buffer"; - data: number[]; - }; - /** - * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('ABC'); - * const buf2 = Buffer.from('414243', 'hex'); - * const buf3 = Buffer.from('ABCD'); - * - * console.log(buf1.equals(buf2)); - * // Prints: true - * console.log(buf1.equals(buf3)); - * // Prints: false - * ``` - * @since v0.11.13 - * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`. - */ - equals(otherBuffer: Uint8Array): boolean; - /** - * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order. - * Comparison is based on the actual sequence of bytes in each `Buffer`. - * - * * `0` is returned if `target` is the same as `buf` - * * `1` is returned if `target` should come _before_`buf` when sorted. - * * `-1` is returned if `target` should come _after_`buf` when sorted. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('ABC'); - * const buf2 = Buffer.from('BCD'); - * const buf3 = Buffer.from('ABCD'); - * - * console.log(buf1.compare(buf1)); - * // Prints: 0 - * console.log(buf1.compare(buf2)); - * // Prints: -1 - * console.log(buf1.compare(buf3)); - * // Prints: -1 - * console.log(buf2.compare(buf1)); - * // Prints: 1 - * console.log(buf2.compare(buf3)); - * // Prints: 1 - * console.log([buf1, buf2, buf3].sort(Buffer.compare)); - * // Prints: [ , , ] - * // (This result is equal to: [buf1, buf3, buf2].) - * ``` - * - * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd` arguments can be used to limit the comparison to specific ranges within `target` and `buf` respectively. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]); - * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]); - * - * console.log(buf1.compare(buf2, 5, 9, 0, 4)); - * // Prints: 0 - * console.log(buf1.compare(buf2, 0, 6, 4)); - * // Prints: -1 - * console.log(buf1.compare(buf2, 5, 6, 5)); - * // Prints: 1 - * ``` - * - * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. - * @since v0.11.13 - * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`. - * @param [targetStart=0] The offset within `target` at which to begin comparison. - * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive). - * @param [sourceStart=0] The offset within `buf` at which to begin comparison. - * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive). - */ - compare( - target: Uint8Array, - targetStart?: number, - targetEnd?: number, - sourceStart?: number, - sourceEnd?: number, - ): -1 | 0 | 1; - /** - * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`. - * - * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available - * for all TypedArrays, including Node.js `Buffer`s, although it takes - * different function arguments. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create two `Buffer` instances. - * const buf1 = Buffer.allocUnsafe(26); - * const buf2 = Buffer.allocUnsafe(26).fill('!'); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`. - * buf1.copy(buf2, 8, 16, 20); - * // This is equivalent to: - * // buf2.set(buf1.subarray(16, 20), 8); - * - * console.log(buf2.toString('ascii', 0, 25)); - * // Prints: !!!!!!!!qrst!!!!!!!!!!!!! - * ``` - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a `Buffer` and copy data from one region to an overlapping region - * // within the same `Buffer`. - * - * const buf = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf[i] = i + 97; - * } - * - * buf.copy(buf, 0, 4, 10); - * - * console.log(buf.toString()); - * // Prints: efghijghijklmnopqrstuvwxyz - * ``` - * @since v0.1.90 - * @param target A `Buffer` or {@link Uint8Array} to copy into. - * @param [targetStart=0] The offset within `target` at which to begin writing. - * @param [sourceStart=0] The offset within `buf` from which to begin copying. - * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive). - * @return The number of bytes copied. - */ - copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. - * - * `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigInt64BE(0x0102030405060708n, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigInt64BE(value: bigint, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. - * - * `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigInt64LE(0x0102030405060708n, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigInt64LE(value: bigint, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. - * - * This function is also available under the `writeBigUint64BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigUInt64BE(0xdecafafecacefaden, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigUInt64BE(value: bigint, offset?: number): number; - /** - * @alias Buffer.writeBigUInt64BE - * @since v14.10.0, v12.19.0 - */ - writeBigUint64BE(value: bigint, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigUInt64LE(0xdecafafecacefaden, 0); - * - * console.log(buf); - * // Prints: - * ``` - * - * This function is also available under the `writeBigUint64LE` alias. - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigUInt64LE(value: bigint, offset?: number): number; - /** - * @alias Buffer.writeBigUInt64LE - * @since v14.10.0, v12.19.0 - */ - writeBigUint64LE(value: bigint, offset?: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined - * when `value` is anything other than an unsigned integer. - * - * This function is also available under the `writeUintLE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeUIntLE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeUIntLE(value: number, offset: number, byteLength: number): number; - /** - * @alias Buffer.writeUIntLE - * @since v14.9.0, v12.19.0 - */ - writeUintLE(value: number, offset: number, byteLength: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined - * when `value` is anything other than an unsigned integer. - * - * This function is also available under the `writeUintBE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeUIntBE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeUIntBE(value: number, offset: number, byteLength: number): number; - /** - * @alias Buffer.writeUIntBE - * @since v14.9.0, v12.19.0 - */ - writeUintBE(value: number, offset: number, byteLength: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined - * when `value` is anything other than a signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeIntLE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeIntLE(value: number, offset: number, byteLength: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a - * signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeIntBE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeIntBE(value: number, offset: number, byteLength: number): number; - /** - * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readBigUint64BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); - * - * console.log(buf.readBigUInt64BE(0)); - * // Prints: 4294967295n - * ``` - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigUInt64BE(offset?: number): bigint; - /** - * @alias Buffer.readBigUInt64BE - * @since v14.10.0, v12.19.0 - */ - readBigUint64BE(offset?: number): bigint; - /** - * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readBigUint64LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); - * - * console.log(buf.readBigUInt64LE(0)); - * // Prints: 18446744069414584320n - * ``` - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigUInt64LE(offset?: number): bigint; - /** - * @alias Buffer.readBigUInt64LE - * @since v14.10.0, v12.19.0 - */ - readBigUint64LE(offset?: number): bigint; - /** - * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed - * values. - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigInt64BE(offset?: number): bigint; - /** - * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed - * values. - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigInt64LE(offset?: number): bigint; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned, little-endian integer supporting - * up to 48 bits of accuracy. - * - * This function is also available under the `readUintLE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readUIntLE(0, 6).toString(16)); - * // Prints: ab9078563412 - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readUIntLE(offset: number, byteLength: number): number; - /** - * @alias Buffer.readUIntLE - * @since v14.9.0, v12.19.0 - */ - readUintLE(offset: number, byteLength: number): number; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian integer supporting - * up to 48 bits of accuracy. - * - * This function is also available under the `readUintBE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readUIntBE(0, 6).toString(16)); - * // Prints: 1234567890ab - * console.log(buf.readUIntBE(1, 6).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readUIntBE(offset: number, byteLength: number): number; - /** - * @alias Buffer.readUIntBE - * @since v14.9.0, v12.19.0 - */ - readUintBE(offset: number, byteLength: number): number; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value - * supporting up to 48 bits of accuracy. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readIntLE(0, 6).toString(16)); - * // Prints: -546f87a9cbee - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readIntLE(offset: number, byteLength: number): number; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value - * supporting up to 48 bits of accuracy. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readIntBE(0, 6).toString(16)); - * // Prints: 1234567890ab - * console.log(buf.readIntBE(1, 6).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * console.log(buf.readIntBE(1, 0).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readIntBE(offset: number, byteLength: number): number; - /** - * Reads an unsigned 8-bit integer from `buf` at the specified `offset`. - * - * This function is also available under the `readUint8` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, -2]); - * - * console.log(buf.readUInt8(0)); - * // Prints: 1 - * console.log(buf.readUInt8(1)); - * // Prints: 254 - * console.log(buf.readUInt8(2)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. - */ - readUInt8(offset?: number): number; - /** - * @alias Buffer.readUInt8 - * @since v14.9.0, v12.19.0 - */ - readUint8(offset?: number): number; - /** - * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`. - * - * This function is also available under the `readUint16LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56]); - * - * console.log(buf.readUInt16LE(0).toString(16)); - * // Prints: 3412 - * console.log(buf.readUInt16LE(1).toString(16)); - * // Prints: 5634 - * console.log(buf.readUInt16LE(2).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readUInt16LE(offset?: number): number; - /** - * @alias Buffer.readUInt16LE - * @since v14.9.0, v12.19.0 - */ - readUint16LE(offset?: number): number; - /** - * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readUint16BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56]); - * - * console.log(buf.readUInt16BE(0).toString(16)); - * // Prints: 1234 - * console.log(buf.readUInt16BE(1).toString(16)); - * // Prints: 3456 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readUInt16BE(offset?: number): number; - /** - * @alias Buffer.readUInt16BE - * @since v14.9.0, v12.19.0 - */ - readUint16BE(offset?: number): number; - /** - * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readUint32LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); - * - * console.log(buf.readUInt32LE(0).toString(16)); - * // Prints: 78563412 - * console.log(buf.readUInt32LE(1).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readUInt32LE(offset?: number): number; - /** - * @alias Buffer.readUInt32LE - * @since v14.9.0, v12.19.0 - */ - readUint32LE(offset?: number): number; - /** - * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readUint32BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); - * - * console.log(buf.readUInt32BE(0).toString(16)); - * // Prints: 12345678 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readUInt32BE(offset?: number): number; - /** - * @alias Buffer.readUInt32BE - * @since v14.9.0, v12.19.0 - */ - readUint32BE(offset?: number): number; - /** - * Reads a signed 8-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([-1, 5]); - * - * console.log(buf.readInt8(0)); - * // Prints: -1 - * console.log(buf.readInt8(1)); - * // Prints: 5 - * console.log(buf.readInt8(2)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. - */ - readInt8(offset?: number): number; - /** - * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 5]); - * - * console.log(buf.readInt16LE(0)); - * // Prints: 1280 - * console.log(buf.readInt16LE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readInt16LE(offset?: number): number; - /** - * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 5]); - * - * console.log(buf.readInt16BE(0)); - * // Prints: 5 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readInt16BE(offset?: number): number; - /** - * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 0, 0, 5]); - * - * console.log(buf.readInt32LE(0)); - * // Prints: 83886080 - * console.log(buf.readInt32LE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readInt32LE(offset?: number): number; - /** - * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 0, 0, 5]); - * - * console.log(buf.readInt32BE(0)); - * // Prints: 5 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readInt32BE(offset?: number): number; - /** - * Reads a 32-bit, little-endian float from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4]); - * - * console.log(buf.readFloatLE(0)); - * // Prints: 1.539989614439558e-36 - * console.log(buf.readFloatLE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readFloatLE(offset?: number): number; - /** - * Reads a 32-bit, big-endian float from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4]); - * - * console.log(buf.readFloatBE(0)); - * // Prints: 2.387939260590663e-38 - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readFloatBE(offset?: number): number; - /** - * Reads a 64-bit, little-endian double from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); - * - * console.log(buf.readDoubleLE(0)); - * // Prints: 5.447603722011605e-270 - * console.log(buf.readDoubleLE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. - */ - readDoubleLE(offset?: number): number; - /** - * Reads a 64-bit, big-endian double from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); - * - * console.log(buf.readDoubleBE(0)); - * // Prints: 8.20788039913184e-304 - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. - */ - readDoubleBE(offset?: number): number; - reverse(): this; - /** - * Interprets `buf` as an array of unsigned 16-bit integers and swaps the - * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); - * - * console.log(buf1); - * // Prints: - * - * buf1.swap16(); - * - * console.log(buf1); - * // Prints: - * - * const buf2 = Buffer.from([0x1, 0x2, 0x3]); - * - * buf2.swap16(); - * // Throws ERR_INVALID_BUFFER_SIZE. - * ``` - * - * One convenient use of `buf.swap16()` is to perform a fast in-place conversion - * between UTF-16 little-endian and UTF-16 big-endian: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); - * buf.swap16(); // Convert to big-endian UTF-16 text. - * ``` - * @since v5.10.0 - * @return A reference to `buf`. - */ - swap16(): this; - /** - * Interprets `buf` as an array of unsigned 32-bit integers and swaps the - * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); - * - * console.log(buf1); - * // Prints: - * - * buf1.swap32(); - * - * console.log(buf1); - * // Prints: - * - * const buf2 = Buffer.from([0x1, 0x2, 0x3]); - * - * buf2.swap32(); - * // Throws ERR_INVALID_BUFFER_SIZE. - * ``` - * @since v5.10.0 - * @return A reference to `buf`. - */ - swap32(): this; - /** - * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_. - * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); - * - * console.log(buf1); - * // Prints: - * - * buf1.swap64(); - * - * console.log(buf1); - * // Prints: - * - * const buf2 = Buffer.from([0x1, 0x2, 0x3]); - * - * buf2.swap64(); - * // Throws ERR_INVALID_BUFFER_SIZE. - * ``` - * @since v6.3.0 - * @return A reference to `buf`. - */ - swap64(): this; - /** - * Writes `value` to `buf` at the specified `offset`. `value` must be a - * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything - * other than an unsigned 8-bit integer. - * - * This function is also available under the `writeUint8` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt8(0x3, 0); - * buf.writeUInt8(0x4, 1); - * buf.writeUInt8(0x23, 2); - * buf.writeUInt8(0x42, 3); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. - * @return `offset` plus the number of bytes written. - */ - writeUInt8(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt8 - * @since v14.9.0, v12.19.0 - */ - writeUint8(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is - * anything other than an unsigned 16-bit integer. - * - * This function is also available under the `writeUint16LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt16LE(0xdead, 0); - * buf.writeUInt16LE(0xbeef, 2); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeUInt16LE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt16LE - * @since v14.9.0, v12.19.0 - */ - writeUint16LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an - * unsigned 16-bit integer. - * - * This function is also available under the `writeUint16BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt16BE(0xdead, 0); - * buf.writeUInt16BE(0xbeef, 2); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeUInt16BE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt16BE - * @since v14.9.0, v12.19.0 - */ - writeUint16BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is - * anything other than an unsigned 32-bit integer. - * - * This function is also available under the `writeUint32LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt32LE(0xfeedface, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeUInt32LE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt32LE - * @since v14.9.0, v12.19.0 - */ - writeUint32LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an - * unsigned 32-bit integer. - * - * This function is also available under the `writeUint32BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt32BE(0xfeedface, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeUInt32BE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt32BE - * @since v14.9.0, v12.19.0 - */ - writeUint32BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset`. `value` must be a valid - * signed 8-bit integer. Behavior is undefined when `value` is anything other than - * a signed 8-bit integer. - * - * `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(2); - * - * buf.writeInt8(2, 0); - * buf.writeInt8(-2, 1); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. - * @return `offset` plus the number of bytes written. - */ - writeInt8(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is - * anything other than a signed 16-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(2); - * - * buf.writeInt16LE(0x0304, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeInt16LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is - * anything other than a signed 16-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(2); - * - * buf.writeInt16BE(0x0102, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeInt16BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is - * anything other than a signed 32-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeInt32LE(0x05060708, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeInt32LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is - * anything other than a signed 32-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeInt32BE(0x01020304, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeInt32BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is - * undefined when `value` is anything other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeFloatLE(0xcafebabe, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeFloatLE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is - * undefined when `value` is anything other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeFloatBE(0xcafebabe, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeFloatBE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything - * other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeDoubleLE(123.456, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeDoubleLE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything - * other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeDoubleBE(123.456, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeDoubleBE(value: number, offset?: number): number; - /** - * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, - * the entire `buf` will be filled: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Fill a `Buffer` with the ASCII character 'h'. - * - * const b = Buffer.allocUnsafe(50).fill('h'); - * - * console.log(b.toString()); - * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh - * - * // Fill a buffer with empty string - * const c = Buffer.allocUnsafe(5).fill(''); - * - * console.log(c.fill('')); - * // Prints: - * ``` - * - * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or - * integer. If the resulting integer is greater than `255` (decimal), `buf` will be - * filled with `value & 255`. - * - * If the final write of a `fill()` operation falls on a multi-byte character, - * then only the bytes of that character that fit into `buf` are written: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Fill a `Buffer` with character that takes up two bytes in UTF-8. - * - * console.log(Buffer.allocUnsafe(5).fill('\u0222')); - * // Prints: - * ``` - * - * If `value` contains invalid characters, it is truncated; if no valid - * fill data remains, an exception is thrown: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(5); - * - * console.log(buf.fill('a')); - * // Prints: - * console.log(buf.fill('aazz', 'hex')); - * // Prints: - * console.log(buf.fill('zz', 'hex')); - * // Throws an exception. - * ``` - * @since v0.5.0 - * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`. - * @param [offset=0] Number of bytes to skip before starting to fill `buf`. - * @param [end=buf.length] Where to stop filling `buf` (not inclusive). - * @param [encoding='utf8'] The encoding for `value` if `value` is a string. - * @return A reference to `buf`. - */ - fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; - /** - * If `value` is: - * - * * a string, `value` is interpreted according to the character encoding in `encoding`. - * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety. - * To compare a partial `Buffer`, use `buf.subarray`. - * * a number, `value` will be interpreted as an unsigned 8-bit integer - * value between `0` and `255`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('this is a buffer'); - * - * console.log(buf.indexOf('this')); - * // Prints: 0 - * console.log(buf.indexOf('is')); - * // Prints: 2 - * console.log(buf.indexOf(Buffer.from('a buffer'))); - * // Prints: 8 - * console.log(buf.indexOf(97)); - * // Prints: 8 (97 is the decimal ASCII value for 'a') - * console.log(buf.indexOf(Buffer.from('a buffer example'))); - * // Prints: -1 - * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8))); - * // Prints: 8 - * - * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); - * - * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le')); - * // Prints: 4 - * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le')); - * // Prints: 6 - * ``` - * - * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value, - * an integer between 0 and 255. - * - * If `byteOffset` is not a number, it will be coerced to a number. If the result - * of coercion is `NaN` or `0`, then the entire buffer will be searched. This - * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf). - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const b = Buffer.from('abcdef'); - * - * // Passing a value that's a number, but not a valid byte. - * // Prints: 2, equivalent to searching for 99 or 'c'. - * console.log(b.indexOf(99.9)); - * console.log(b.indexOf(256 + 99)); - * - * // Passing a byteOffset that coerces to NaN or 0. - * // Prints: 1, searching the whole buffer. - * console.log(b.indexOf('b', undefined)); - * console.log(b.indexOf('b', {})); - * console.log(b.indexOf('b', null)); - * console.log(b.indexOf('b', [])); - * ``` - * - * If `value` is an empty string or empty `Buffer` and `byteOffset` is less - * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned. - * @since v1.5.0 - * @param value What to search for. - * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. - * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. - * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. - */ - indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; - /** - * Identical to `buf.indexOf()`, except the last occurrence of `value` is found - * rather than the first occurrence. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('this buffer is a buffer'); - * - * console.log(buf.lastIndexOf('this')); - * // Prints: 0 - * console.log(buf.lastIndexOf('buffer')); - * // Prints: 17 - * console.log(buf.lastIndexOf(Buffer.from('buffer'))); - * // Prints: 17 - * console.log(buf.lastIndexOf(97)); - * // Prints: 15 (97 is the decimal ASCII value for 'a') - * console.log(buf.lastIndexOf(Buffer.from('yolo'))); - * // Prints: -1 - * console.log(buf.lastIndexOf('buffer', 5)); - * // Prints: 5 - * console.log(buf.lastIndexOf('buffer', 4)); - * // Prints: -1 - * - * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); - * - * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le')); - * // Prints: 6 - * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le')); - * // Prints: 4 - * ``` - * - * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value, - * an integer between 0 and 255. - * - * If `byteOffset` is not a number, it will be coerced to a number. Any arguments - * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer. - * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf). - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const b = Buffer.from('abcdef'); - * - * // Passing a value that's a number, but not a valid byte. - * // Prints: 2, equivalent to searching for 99 or 'c'. - * console.log(b.lastIndexOf(99.9)); - * console.log(b.lastIndexOf(256 + 99)); - * - * // Passing a byteOffset that coerces to NaN. - * // Prints: 1, searching the whole buffer. - * console.log(b.lastIndexOf('b', undefined)); - * console.log(b.lastIndexOf('b', {})); - * - * // Passing a byteOffset that coerces to 0. - * // Prints: -1, equivalent to passing 0. - * console.log(b.lastIndexOf('b', null)); - * console.log(b.lastIndexOf('b', [])); - * ``` - * - * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. - * @since v6.0.0 - * @param value What to search for. - * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. - * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. - * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. - */ - lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; - /** - * Equivalent to `buf.indexOf() !== -1`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('this is a buffer'); - * - * console.log(buf.includes('this')); - * // Prints: true - * console.log(buf.includes('is')); - * // Prints: true - * console.log(buf.includes(Buffer.from('a buffer'))); - * // Prints: true - * console.log(buf.includes(97)); - * // Prints: true (97 is the decimal ASCII value for 'a') - * console.log(buf.includes(Buffer.from('a buffer example'))); - * // Prints: false - * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8))); - * // Prints: true - * console.log(buf.includes('this', 4)); - * // Prints: false - * ``` - * @since v5.3.0 - * @param value What to search for. - * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. - * @param [encoding='utf8'] If `value` is a string, this is its encoding. - * @return `true` if `value` was found in `buf`, `false` otherwise. - */ - includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; - } - var Buffer: BufferConstructor; - /** - * Decodes a string of Base64-encoded data into bytes, and encodes those bytes - * into a string using Latin-1 (ISO-8859-1). - * - * The `data` may be any JavaScript-value that can be coerced into a string. - * - * **This function is only provided for compatibility with legacy web platform APIs** - * **and should never be used in new code, because they use strings to represent** - * **binary data and predate the introduction of typed arrays in JavaScript.** - * **For code running using Node.js APIs, converting between base64-encoded strings** - * **and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.** - * @since v15.13.0, v14.17.0 - * @legacy Use `Buffer.from(data, 'base64')` instead. - * @param data The Base64-encoded input string. - */ - function atob(data: string): string; - /** - * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes - * into a string using Base64. - * - * The `data` may be any JavaScript-value that can be coerced into a string. - * - * **This function is only provided for compatibility with legacy web platform APIs** - * **and should never be used in new code, because they use strings to represent** - * **binary data and predate the introduction of typed arrays in JavaScript.** - * **For code running using Node.js APIs, converting between base64-encoded strings** - * **and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.** - * @since v15.13.0, v14.17.0 - * @legacy Use `buf.toString('base64')` instead. - * @param data An ASCII (Latin1) string. - */ - function btoa(data: string): string; - interface Blob extends _Blob {} - /** - * `Blob` class is a global reference for `import { Blob } from 'node:buffer'` - * https://nodejs.org/api/buffer.html#class-blob - * @since v18.0.0 - */ - var Blob: typeof globalThis extends { onmessage: any; Blob: infer T } ? T - : typeof import("buffer").Blob; - interface File extends _File {} - /** - * `File` class is a global reference for `import { File } from 'node:buffer'` - * https://nodejs.org/api/buffer.html#class-file - * @since v20.0.0 - */ - var File: typeof globalThis extends { onmessage: any; File: infer T } ? T - : typeof import("buffer").File; - } -} -declare module "node:buffer" { - export * from "buffer"; -} diff --git a/web/static/node_modules/@types/node/child_process.d.ts b/web/static/node_modules/@types/node/child_process.d.ts deleted file mode 100644 index 09f181f9..00000000 --- a/web/static/node_modules/@types/node/child_process.d.ts +++ /dev/null @@ -1,1549 +0,0 @@ -/** - * The `node:child_process` module provides the ability to spawn subprocesses in - * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability - * is primarily provided by the {@link spawn} function: - * - * ```js - * import { spawn } from 'node:child_process'; - * const ls = spawn('ls', ['-lh', '/usr']); - * - * ls.stdout.on('data', (data) => { - * console.log(`stdout: ${data}`); - * }); - * - * ls.stderr.on('data', (data) => { - * console.error(`stderr: ${data}`); - * }); - * - * ls.on('close', (code) => { - * console.log(`child process exited with code ${code}`); - * }); - * ``` - * - * By default, pipes for `stdin`, `stdout`, and `stderr` are established between - * the parent Node.js process and the spawned subprocess. These pipes have - * limited (and platform-specific) capacity. If the subprocess writes to - * stdout in excess of that limit without the output being captured, the - * subprocess blocks waiting for the pipe buffer to accept more data. This is - * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed. - * - * The command lookup is performed using the `options.env.PATH` environment - * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is - * used. If `options.env` is set without `PATH`, lookup on Unix is performed - * on a default search path search of `/usr/bin:/bin` (see your operating system's - * manual for execvpe/execvp), on Windows the current processes environment - * variable `PATH` is used. - * - * On Windows, environment variables are case-insensitive. Node.js - * lexicographically sorts the `env` keys and uses the first one that - * case-insensitively matches. Only first (in lexicographic order) entry will be - * passed to the subprocess. This might lead to issues on Windows when passing - * objects to the `env` option that have multiple variants of the same key, such as `PATH` and `Path`. - * - * The {@link spawn} method spawns the child process asynchronously, - * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks - * the event loop until the spawned process either exits or is terminated. - * - * For convenience, the `node:child_process` module provides a handful of - * synchronous and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on - * top of {@link spawn} or {@link spawnSync}. - * - * * {@link exec}: spawns a shell and runs a command within that - * shell, passing the `stdout` and `stderr` to a callback function when - * complete. - * * {@link execFile}: similar to {@link exec} except - * that it spawns the command directly without first spawning a shell by - * default. - * * {@link fork}: spawns a new Node.js process and invokes a - * specified module with an IPC communication channel established that allows - * sending messages between parent and child. - * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop. - * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop. - * - * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however, - * the synchronous methods can have significant impact on performance due to - * stalling the event loop while spawned processes complete. - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/child_process.js) - */ -declare module "child_process" { - import { ObjectEncodingOptions } from "node:fs"; - import { Abortable, EventEmitter } from "node:events"; - import * as dgram from "node:dgram"; - import * as net from "node:net"; - import { Pipe, Readable, Stream, Writable } from "node:stream"; - import { URL } from "node:url"; - type Serializable = string | object | number | boolean | bigint; - type SendHandle = net.Socket | net.Server | dgram.Socket | undefined; - /** - * Instances of the `ChildProcess` represent spawned child processes. - * - * Instances of `ChildProcess` are not intended to be created directly. Rather, - * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create - * instances of `ChildProcess`. - * @since v2.2.0 - */ - class ChildProcess extends EventEmitter { - /** - * A `Writable Stream` that represents the child process's `stdin`. - * - * If a child process waits to read all of its input, the child will not continue - * until this stream has been closed via `end()`. - * - * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`, - * then this will be `null`. - * - * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will - * refer to the same value. - * - * The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned. - * @since v0.1.90 - */ - stdin: Writable | null; - /** - * A `Readable Stream` that represents the child process's `stdout`. - * - * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`, - * then this will be `null`. - * - * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will - * refer to the same value. - * - * ```js - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn('ls'); - * - * subprocess.stdout.on('data', (data) => { - * console.log(`Received chunk ${data}`); - * }); - * ``` - * - * The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned. - * @since v0.1.90 - */ - stdout: Readable | null; - /** - * A `Readable Stream` that represents the child process's `stderr`. - * - * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`, - * then this will be `null`. - * - * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will - * refer to the same value. - * - * The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned. - * @since v0.1.90 - */ - stderr: Readable | null; - /** - * The `subprocess.channel` property is a reference to the child's IPC channel. If - * no IPC channel exists, this property is `undefined`. - * @since v7.1.0 - */ - readonly channel?: Pipe | null | undefined; - /** - * A sparse array of pipes to the child process, corresponding with positions in - * the `stdio` option passed to {@link spawn} that have been set - * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and `subprocess.stdio[2]` are also available as `subprocess.stdin`, `subprocess.stdout`, and `subprocess.stderr`, - * respectively. - * - * In the following example, only the child's fd `1` (stdout) is configured as a - * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values - * in the array are `null`. - * - * ```js - * import assert from 'node:assert'; - * import fs from 'node:fs'; - * import child_process from 'node:child_process'; - * - * const subprocess = child_process.spawn('ls', { - * stdio: [ - * 0, // Use parent's stdin for child. - * 'pipe', // Pipe child's stdout to parent. - * fs.openSync('err.out', 'w'), // Direct child's stderr to a file. - * ], - * }); - * - * assert.strictEqual(subprocess.stdio[0], null); - * assert.strictEqual(subprocess.stdio[0], subprocess.stdin); - * - * assert(subprocess.stdout); - * assert.strictEqual(subprocess.stdio[1], subprocess.stdout); - * - * assert.strictEqual(subprocess.stdio[2], null); - * assert.strictEqual(subprocess.stdio[2], subprocess.stderr); - * ``` - * - * The `subprocess.stdio` property can be `undefined` if the child process could - * not be successfully spawned. - * @since v0.7.10 - */ - readonly stdio: [ - Writable | null, - // stdin - Readable | null, - // stdout - Readable | null, - // stderr - Readable | Writable | null | undefined, - // extra - Readable | Writable | null | undefined, // extra - ]; - /** - * The `subprocess.killed` property indicates whether the child process - * successfully received a signal from `subprocess.kill()`. The `killed` property - * does not indicate that the child process has been terminated. - * @since v0.5.10 - */ - readonly killed: boolean; - /** - * Returns the process identifier (PID) of the child process. If the child process - * fails to spawn due to errors, then the value is `undefined` and `error` is - * emitted. - * - * ```js - * import { spawn } from 'node:child_process'; - * const grep = spawn('grep', ['ssh']); - * - * console.log(`Spawned child pid: ${grep.pid}`); - * grep.stdin.end(); - * ``` - * @since v0.1.90 - */ - readonly pid?: number | undefined; - /** - * The `subprocess.connected` property indicates whether it is still possible to - * send and receive messages from a child process. When `subprocess.connected` is `false`, it is no longer possible to send or receive messages. - * @since v0.7.2 - */ - readonly connected: boolean; - /** - * The `subprocess.exitCode` property indicates the exit code of the child process. - * If the child process is still running, the field will be `null`. - */ - readonly exitCode: number | null; - /** - * The `subprocess.signalCode` property indicates the signal received by - * the child process if any, else `null`. - */ - readonly signalCode: NodeJS.Signals | null; - /** - * The `subprocess.spawnargs` property represents the full list of command-line - * arguments the child process was launched with. - */ - readonly spawnargs: string[]; - /** - * The `subprocess.spawnfile` property indicates the executable file name of - * the child process that is launched. - * - * For {@link fork}, its value will be equal to `process.execPath`. - * For {@link spawn}, its value will be the name of - * the executable file. - * For {@link exec}, its value will be the name of the shell - * in which the child process is launched. - */ - readonly spawnfile: string; - /** - * The `subprocess.kill()` method sends a signal to the child process. If no - * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function - * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise. - * - * ```js - * import { spawn } from 'node:child_process'; - * const grep = spawn('grep', ['ssh']); - * - * grep.on('close', (code, signal) => { - * console.log( - * `child process terminated due to receipt of signal ${signal}`); - * }); - * - * // Send SIGHUP to process. - * grep.kill('SIGHUP'); - * ``` - * - * The `ChildProcess` object may emit an `'error'` event if the signal - * cannot be delivered. Sending a signal to a child process that has already exited - * is not an error but may have unforeseen consequences. Specifically, if the - * process identifier (PID) has been reassigned to another process, the signal will - * be delivered to that process instead which can have unexpected results. - * - * While the function is called `kill`, the signal delivered to the child process - * may not actually terminate the process. - * - * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference. - * - * On Windows, where POSIX signals do not exist, the `signal` argument will be - * ignored, and the process will be killed forcefully and abruptly (similar to `'SIGKILL'`). - * See `Signal Events` for more details. - * - * On Linux, child processes of child processes will not be terminated - * when attempting to kill their parent. This is likely to happen when running a - * new process in a shell or with the use of the `shell` option of `ChildProcess`: - * - * ```js - * 'use strict'; - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn( - * 'sh', - * [ - * '-c', - * `node -e "setInterval(() => { - * console.log(process.pid, 'is alive') - * }, 500);"`, - * ], { - * stdio: ['inherit', 'inherit', 'inherit'], - * }, - * ); - * - * setTimeout(() => { - * subprocess.kill(); // Does not terminate the Node.js process in the shell. - * }, 2000); - * ``` - * @since v0.1.90 - */ - kill(signal?: NodeJS.Signals | number): boolean; - /** - * Calls {@link ChildProcess.kill} with `'SIGTERM'`. - * @since v20.5.0 - */ - [Symbol.dispose](): void; - /** - * When an IPC channel has been established between the parent and child ( - * i.e. when using {@link fork}), the `subprocess.send()` method can - * be used to send messages to the child process. When the child process is a - * Node.js instance, these messages can be received via the `'message'` event. - * - * The message goes through serialization and parsing. The resulting - * message might not be the same as what is originally sent. - * - * For example, in the parent script: - * - * ```js - * import cp from 'node:child_process'; - * const n = cp.fork(`${__dirname}/sub.js`); - * - * n.on('message', (m) => { - * console.log('PARENT got message:', m); - * }); - * - * // Causes the child to print: CHILD got message: { hello: 'world' } - * n.send({ hello: 'world' }); - * ``` - * - * And then the child script, `'sub.js'` might look like this: - * - * ```js - * process.on('message', (m) => { - * console.log('CHILD got message:', m); - * }); - * - * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null } - * process.send({ foo: 'bar', baz: NaN }); - * ``` - * - * Child Node.js processes will have a `process.send()` method of their own - * that allows the child to send messages back to the parent. - * - * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages - * containing a `NODE_` prefix in the `cmd` property are reserved for use within - * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the `'internalMessage'` event and are consumed internally by Node.js. - * Applications should avoid using such messages or listening for `'internalMessage'` events as it is subject to change without notice. - * - * The optional `sendHandle` argument that may be passed to `subprocess.send()` is - * for passing a TCP server or socket object to the child process. The child will - * receive the object as the second argument passed to the callback function - * registered on the `'message'` event. Any data that is received and buffered in - * the socket will not be sent to the child. Sending IPC sockets is not supported on Windows. - * - * The optional `callback` is a function that is invoked after the message is - * sent but before the child may have received it. The function is called with a - * single argument: `null` on success, or an `Error` object on failure. - * - * If no `callback` function is provided and the message cannot be sent, an `'error'` event will be emitted by the `ChildProcess` object. This can - * happen, for instance, when the child process has already exited. - * - * `subprocess.send()` will return `false` if the channel has closed or when the - * backlog of unsent messages exceeds a threshold that makes it unwise to send - * more. Otherwise, the method returns `true`. The `callback` function can be - * used to implement flow control. - * - * #### Example: sending a server object - * - * The `sendHandle` argument can be used, for instance, to pass the handle of - * a TCP server object to the child process as illustrated in the example below: - * - * ```js - * import { createServer } from 'node:net'; - * import { fork } from 'node:child_process'; - * const subprocess = fork('subprocess.js'); - * - * // Open up the server object and send the handle. - * const server = createServer(); - * server.on('connection', (socket) => { - * socket.end('handled by parent'); - * }); - * server.listen(1337, () => { - * subprocess.send('server', server); - * }); - * ``` - * - * The child would then receive the server object as: - * - * ```js - * process.on('message', (m, server) => { - * if (m === 'server') { - * server.on('connection', (socket) => { - * socket.end('handled by child'); - * }); - * } - * }); - * ``` - * - * Once the server is now shared between the parent and child, some connections - * can be handled by the parent and some by the child. - * - * While the example above uses a server created using the `node:net` module, `node:dgram` module servers use exactly the same workflow with the exceptions of - * listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead of `server.listen()`. This is, however, only - * supported on Unix platforms. - * - * #### Example: sending a socket object - * - * Similarly, the `sendHandler` argument can be used to pass the handle of a - * socket to the child process. The example below spawns two children that each - * handle connections with "normal" or "special" priority: - * - * ```js - * import { createServer } from 'node:net'; - * import { fork } from 'node:child_process'; - * const normal = fork('subprocess.js', ['normal']); - * const special = fork('subprocess.js', ['special']); - * - * // Open up the server and send sockets to child. Use pauseOnConnect to prevent - * // the sockets from being read before they are sent to the child process. - * const server = createServer({ pauseOnConnect: true }); - * server.on('connection', (socket) => { - * - * // If this is special priority... - * if (socket.remoteAddress === '74.125.127.100') { - * special.send('socket', socket); - * return; - * } - * // This is normal priority. - * normal.send('socket', socket); - * }); - * server.listen(1337); - * ``` - * - * The `subprocess.js` would receive the socket handle as the second argument - * passed to the event callback function: - * - * ```js - * process.on('message', (m, socket) => { - * if (m === 'socket') { - * if (socket) { - * // Check that the client socket exists. - * // It is possible for the socket to be closed between the time it is - * // sent and the time it is received in the child process. - * socket.end(`Request handled with ${process.argv[2]} priority`); - * } - * } - * }); - * ``` - * - * Do not use `.maxConnections` on a socket that has been passed to a subprocess. - * The parent cannot track when the socket is destroyed. - * - * Any `'message'` handlers in the subprocess should verify that `socket` exists, - * as the connection may have been closed during the time it takes to send the - * connection to the child. - * @since v0.5.9 - * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v22.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v22.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v22.x/api/dgram.html#class-dgramsocket) object. - * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: - */ - send(message: Serializable, callback?: (error: Error | null) => void): boolean; - send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean; - send( - message: Serializable, - sendHandle?: SendHandle, - options?: MessageOptions, - callback?: (error: Error | null) => void, - ): boolean; - /** - * Closes the IPC channel between parent and child, allowing the child to exit - * gracefully once there are no other connections keeping it alive. After calling - * this method the `subprocess.connected` and `process.connected` properties in - * both the parent and child (respectively) will be set to `false`, and it will be - * no longer possible to pass messages between the processes. - * - * The `'disconnect'` event will be emitted when there are no messages in the - * process of being received. This will most often be triggered immediately after - * calling `subprocess.disconnect()`. - * - * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked - * within the child process to close the IPC channel as well. - * @since v0.7.2 - */ - disconnect(): void; - /** - * By default, the parent will wait for the detached child to exit. To prevent the - * parent from waiting for a given `subprocess` to exit, use the `subprocess.unref()` method. Doing so will cause the parent's event loop to not - * include the child in its reference count, allowing the parent to exit - * independently of the child, unless there is an established IPC channel between - * the child and the parent. - * - * ```js - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn(process.argv[0], ['child_program.js'], { - * detached: true, - * stdio: 'ignore', - * }); - * - * subprocess.unref(); - * ``` - * @since v0.7.10 - */ - unref(): void; - /** - * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will - * restore the removed reference count for the child process, forcing the parent - * to wait for the child to exit before exiting itself. - * - * ```js - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn(process.argv[0], ['child_program.js'], { - * detached: true, - * stdio: 'ignore', - * }); - * - * subprocess.unref(); - * subprocess.ref(); - * ``` - * @since v0.7.10 - */ - ref(): void; - /** - * events.EventEmitter - * 1. close - * 2. disconnect - * 3. error - * 4. exit - * 5. message - * 6. spawn - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - addListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - addListener(event: "spawn", listener: () => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close", code: number | null, signal: NodeJS.Signals | null): boolean; - emit(event: "disconnect"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean; - emit(event: "message", message: Serializable, sendHandle: SendHandle): boolean; - emit(event: "spawn", listener: () => void): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - on(event: "disconnect", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - on(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - on(event: "spawn", listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - once(event: "disconnect", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - once(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - once(event: "spawn", listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - prependListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - prependListener(event: "spawn", listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener( - event: "close", - listener: (code: number | null, signal: NodeJS.Signals | null) => void, - ): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener( - event: "exit", - listener: (code: number | null, signal: NodeJS.Signals | null) => void, - ): this; - prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - prependOnceListener(event: "spawn", listener: () => void): this; - } - // return this object when stdio option is undefined or not specified - interface ChildProcessWithoutNullStreams extends ChildProcess { - stdin: Writable; - stdout: Readable; - stderr: Readable; - readonly stdio: [ - Writable, - Readable, - Readable, - // stderr - Readable | Writable | null | undefined, - // extra, no modification - Readable | Writable | null | undefined, // extra, no modification - ]; - } - // return this object when stdio option is a tuple of 3 - interface ChildProcessByStdio - extends ChildProcess - { - stdin: I; - stdout: O; - stderr: E; - readonly stdio: [ - I, - O, - E, - Readable | Writable | null | undefined, - // extra, no modification - Readable | Writable | null | undefined, // extra, no modification - ]; - } - interface MessageOptions { - keepOpen?: boolean | undefined; - } - type IOType = "overlapped" | "pipe" | "ignore" | "inherit"; - type StdioOptions = IOType | Array; - type SerializationType = "json" | "advanced"; - interface MessagingOptions extends Abortable { - /** - * Specify the kind of serialization used for sending messages between processes. - * @default 'json' - */ - serialization?: SerializationType | undefined; - /** - * The signal value to be used when the spawned process will be killed by the abort signal. - * @default 'SIGTERM' - */ - killSignal?: NodeJS.Signals | number | undefined; - /** - * In milliseconds the maximum amount of time the process is allowed to run. - */ - timeout?: number | undefined; - } - interface ProcessEnvOptions { - uid?: number | undefined; - gid?: number | undefined; - cwd?: string | URL | undefined; - env?: NodeJS.ProcessEnv | undefined; - } - interface CommonOptions extends ProcessEnvOptions { - /** - * @default false - */ - windowsHide?: boolean | undefined; - /** - * @default 0 - */ - timeout?: number | undefined; - } - interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable { - argv0?: string | undefined; - /** - * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. - * If passed as an array, the first element is used for `stdin`, the second for - * `stdout`, and the third for `stderr`. A fourth element can be used to - * specify the `stdio` behavior beyond the standard streams. See - * {@link ChildProcess.stdio} for more information. - * - * @default 'pipe' - */ - stdio?: StdioOptions | undefined; - shell?: boolean | string | undefined; - windowsVerbatimArguments?: boolean | undefined; - } - interface SpawnOptions extends CommonSpawnOptions { - detached?: boolean | undefined; - } - interface SpawnOptionsWithoutStdio extends SpawnOptions { - stdio?: StdioPipeNamed | StdioPipe[] | undefined; - } - type StdioNull = "inherit" | "ignore" | Stream; - type StdioPipeNamed = "pipe" | "overlapped"; - type StdioPipe = undefined | null | StdioPipeNamed; - interface SpawnOptionsWithStdioTuple< - Stdin extends StdioNull | StdioPipe, - Stdout extends StdioNull | StdioPipe, - Stderr extends StdioNull | StdioPipe, - > extends SpawnOptions { - stdio: [Stdin, Stdout, Stderr]; - } - /** - * The `child_process.spawn()` method spawns a new process using the given `command`, with command-line arguments in `args`. If omitted, `args` defaults - * to an empty array. - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * - * A third argument may be used to specify additional options, with these defaults: - * - * ```js - * const defaults = { - * cwd: undefined, - * env: process.env, - * }; - * ``` - * - * Use `cwd` to specify the working directory from which the process is spawned. - * If not given, the default is to inherit the current working directory. If given, - * but the path does not exist, the child process emits an `ENOENT` error - * and exits immediately. `ENOENT` is also emitted when the command - * does not exist. - * - * Use `env` to specify environment variables that will be visible to the new - * process, the default is `process.env`. - * - * `undefined` values in `env` will be ignored. - * - * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the - * exit code: - * - * ```js - * import { spawn } from 'node:child_process'; - * const ls = spawn('ls', ['-lh', '/usr']); - * - * ls.stdout.on('data', (data) => { - * console.log(`stdout: ${data}`); - * }); - * - * ls.stderr.on('data', (data) => { - * console.error(`stderr: ${data}`); - * }); - * - * ls.on('close', (code) => { - * console.log(`child process exited with code ${code}`); - * }); - * ``` - * - * Example: A very elaborate way to run `ps ax | grep ssh` - * - * ```js - * import { spawn } from 'node:child_process'; - * const ps = spawn('ps', ['ax']); - * const grep = spawn('grep', ['ssh']); - * - * ps.stdout.on('data', (data) => { - * grep.stdin.write(data); - * }); - * - * ps.stderr.on('data', (data) => { - * console.error(`ps stderr: ${data}`); - * }); - * - * ps.on('close', (code) => { - * if (code !== 0) { - * console.log(`ps process exited with code ${code}`); - * } - * grep.stdin.end(); - * }); - * - * grep.stdout.on('data', (data) => { - * console.log(data.toString()); - * }); - * - * grep.stderr.on('data', (data) => { - * console.error(`grep stderr: ${data}`); - * }); - * - * grep.on('close', (code) => { - * if (code !== 0) { - * console.log(`grep process exited with code ${code}`); - * } - * }); - * ``` - * - * Example of checking for failed `spawn`: - * - * ```js - * import { spawn } from 'node:child_process'; - * const subprocess = spawn('bad_command'); - * - * subprocess.on('error', (err) => { - * console.error('Failed to start subprocess.'); - * }); - * ``` - * - * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process - * title while others (Windows, SunOS) will use `command`. - * - * Node.js overwrites `argv[0]` with `process.execPath` on startup, so `process.argv[0]` in a Node.js child process will not match the `argv0` parameter passed to `spawn` from the parent. Retrieve - * it with the `process.argv0` property instead. - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * import { spawn } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const grep = spawn('grep', ['ssh'], { signal }); - * grep.on('error', (err) => { - * // This will be called with err being an AbortError if the controller aborts - * }); - * controller.abort(); // Stops the child process - * ``` - * @since v0.1.90 - * @param command The command to run. - * @param args List of string arguments. - */ - function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn(command: string, options: SpawnOptions): ChildProcess; - // overloads of spawn with 'args' - function spawn( - command: string, - args?: readonly string[], - options?: SpawnOptionsWithoutStdio, - ): ChildProcessWithoutNullStreams; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess; - interface ExecOptions extends CommonOptions { - shell?: string | undefined; - signal?: AbortSignal | undefined; - maxBuffer?: number | undefined; - killSignal?: NodeJS.Signals | number | undefined; - } - interface ExecOptionsWithStringEncoding extends ExecOptions { - encoding: BufferEncoding; - } - interface ExecOptionsWithBufferEncoding extends ExecOptions { - encoding: BufferEncoding | null; // specify `null`. - } - interface ExecException extends Error { - cmd?: string | undefined; - killed?: boolean | undefined; - code?: number | undefined; - signal?: NodeJS.Signals | undefined; - stdout?: string; - stderr?: string; - } - /** - * Spawns a shell then executes the `command` within that shell, buffering any - * generated output. The `command` string passed to the exec function is processed - * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters)) - * need to be dealt with accordingly: - * - * ```js - * import { exec } from 'node:child_process'; - * - * exec('"/path/to/test file/test.sh" arg1 arg2'); - * // Double quotes are used so that the space in the path is not interpreted as - * // a delimiter of multiple arguments. - * - * exec('echo "The \\$HOME variable is $HOME"'); - * // The $HOME variable is escaped in the first instance, but not in the second. - * ``` - * - * **Never pass unsanitized user input to this function. Any input containing shell** - * **metacharacters may be used to trigger arbitrary command execution.** - * - * If a `callback` function is provided, it is called with the arguments `(error, stdout, stderr)`. On success, `error` will be `null`. On error, `error` will be an instance of `Error`. The - * `error.code` property will be - * the exit code of the process. By convention, any exit code other than `0` indicates an error. `error.signal` will be the signal that terminated the - * process. - * - * The `stdout` and `stderr` arguments passed to the callback will contain the - * stdout and stderr output of the child process. By default, Node.js will decode - * the output as UTF-8 and pass strings to the callback. The `encoding` option - * can be used to specify the character encoding used to decode the stdout and - * stderr output. If `encoding` is `'buffer'`, or an unrecognized character - * encoding, `Buffer` objects will be passed to the callback instead. - * - * ```js - * import { exec } from 'node:child_process'; - * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => { - * if (error) { - * console.error(`exec error: ${error}`); - * return; - * } - * console.log(`stdout: ${stdout}`); - * console.error(`stderr: ${stderr}`); - * }); - * ``` - * - * If `timeout` is greater than `0`, the parent will send the signal - * identified by the `killSignal` property (the default is `'SIGTERM'`) if the - * child runs longer than `timeout` milliseconds. - * - * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace - * the existing process and uses a shell to execute the command. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In - * case of an error (including any error resulting in an exit code other than 0), a - * rejected promise is returned, with the same `error` object given in the - * callback, but with two additional properties `stdout` and `stderr`. - * - * ```js - * import util from 'node:util'; - * import child_process from 'node:child_process'; - * const exec = util.promisify(child_process.exec); - * - * async function lsExample() { - * const { stdout, stderr } = await exec('ls'); - * console.log('stdout:', stdout); - * console.error('stderr:', stderr); - * } - * lsExample(); - * ``` - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * import { exec } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const child = exec('grep ssh', { signal }, (error) => { - * console.error(error); // an AbortError - * }); - * controller.abort(); - * ``` - * @since v0.1.90 - * @param command The command to run, with space-separated arguments. - * @param callback called with the output when process terminates. - */ - function exec( - command: string, - callback?: (error: ExecException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. - function exec( - command: string, - options: { - encoding: "buffer" | null; - } & ExecOptions, - callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void, - ): ChildProcess; - // `options` with well known `encoding` means stdout/stderr are definitely `string`. - function exec( - command: string, - options: { - encoding: BufferEncoding; - } & ExecOptions, - callback?: (error: ExecException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. - // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. - function exec( - command: string, - options: { - encoding: BufferEncoding; - } & ExecOptions, - callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void, - ): ChildProcess; - // `options` without an `encoding` means stdout/stderr are definitely `string`. - function exec( - command: string, - options: ExecOptions, - callback?: (error: ExecException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // fallback if nothing else matches. Worst case is always `string | Buffer`. - function exec( - command: string, - options: (ObjectEncodingOptions & ExecOptions) | undefined | null, - callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void, - ): ChildProcess; - interface PromiseWithChild extends Promise { - child: ChildProcess; - } - namespace exec { - function __promisify__(command: string): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - command: string, - options: { - encoding: "buffer" | null; - } & ExecOptions, - ): PromiseWithChild<{ - stdout: Buffer; - stderr: Buffer; - }>; - function __promisify__( - command: string, - options: { - encoding: BufferEncoding; - } & ExecOptions, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - command: string, - options: ExecOptions, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - command: string, - options?: (ObjectEncodingOptions & ExecOptions) | null, - ): PromiseWithChild<{ - stdout: string | Buffer; - stderr: string | Buffer; - }>; - } - interface ExecFileOptions extends CommonOptions, Abortable { - maxBuffer?: number | undefined; - killSignal?: NodeJS.Signals | number | undefined; - windowsVerbatimArguments?: boolean | undefined; - shell?: boolean | string | undefined; - signal?: AbortSignal | undefined; - } - interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { - encoding: BufferEncoding; - } - interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { - encoding: "buffer" | null; - } - interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions { - encoding: BufferEncoding; - } - type ExecFileException = - & Omit - & Omit - & { code?: string | number | undefined | null }; - /** - * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified - * executable `file` is spawned directly as a new process making it slightly more - * efficient than {@link exec}. - * - * The same options as {@link exec} are supported. Since a shell is - * not spawned, behaviors such as I/O redirection and file globbing are not - * supported. - * - * ```js - * import { execFile } from 'node:child_process'; - * const child = execFile('node', ['--version'], (error, stdout, stderr) => { - * if (error) { - * throw error; - * } - * console.log(stdout); - * }); - * ``` - * - * The `stdout` and `stderr` arguments passed to the callback will contain the - * stdout and stderr output of the child process. By default, Node.js will decode - * the output as UTF-8 and pass strings to the callback. The `encoding` option - * can be used to specify the character encoding used to decode the stdout and - * stderr output. If `encoding` is `'buffer'`, or an unrecognized character - * encoding, `Buffer` objects will be passed to the callback instead. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In - * case of an error (including any error resulting in an exit code other than 0), a - * rejected promise is returned, with the same `error` object given in the - * callback, but with two additional properties `stdout` and `stderr`. - * - * ```js - * import util from 'node:util'; - * import child_process from 'node:child_process'; - * const execFile = util.promisify(child_process.execFile); - * async function getVersion() { - * const { stdout } = await execFile('node', ['--version']); - * console.log(stdout); - * } - * getVersion(); - * ``` - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * import { execFile } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const child = execFile('node', ['--version'], { signal }, (error) => { - * console.error(error); // an AbortError - * }); - * controller.abort(); - * ``` - * @since v0.1.91 - * @param file The name or path of the executable file to run. - * @param args List of string arguments. - * @param callback Called with the output when process terminates. - */ - function execFile(file: string): ChildProcess; - function execFile( - file: string, - options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, - ): ChildProcess; - function execFile(file: string, args?: readonly string[] | null): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, - ): ChildProcess; - // no `options` definitely means stdout/stderr are `string`. - function execFile( - file: string, - callback: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - callback: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. - function execFile( - file: string, - options: ExecFileOptionsWithBufferEncoding, - callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithBufferEncoding, - callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void, - ): ChildProcess; - // `options` with well known `encoding` means stdout/stderr are definitely `string`. - function execFile( - file: string, - options: ExecFileOptionsWithStringEncoding, - callback: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithStringEncoding, - callback: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. - // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. - function execFile( - file: string, - options: ExecFileOptionsWithOtherEncoding, - callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithOtherEncoding, - callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void, - ): ChildProcess; - // `options` without an `encoding` means stdout/stderr are definitely `string`. - function execFile( - file: string, - options: ExecFileOptions, - callback: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptions, - callback: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // fallback if nothing else matches. Worst case is always `string | Buffer`. - function execFile( - file: string, - options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, - callback: - | ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) - | undefined - | null, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, - callback: - | ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) - | undefined - | null, - ): ChildProcess; - namespace execFile { - function __promisify__(file: string): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - options: ExecFileOptionsWithBufferEncoding, - ): PromiseWithChild<{ - stdout: Buffer; - stderr: Buffer; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithBufferEncoding, - ): PromiseWithChild<{ - stdout: Buffer; - stderr: Buffer; - }>; - function __promisify__( - file: string, - options: ExecFileOptionsWithStringEncoding, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithStringEncoding, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - options: ExecFileOptionsWithOtherEncoding, - ): PromiseWithChild<{ - stdout: string | Buffer; - stderr: string | Buffer; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithOtherEncoding, - ): PromiseWithChild<{ - stdout: string | Buffer; - stderr: string | Buffer; - }>; - function __promisify__( - file: string, - options: ExecFileOptions, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptions, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, - ): PromiseWithChild<{ - stdout: string | Buffer; - stderr: string | Buffer; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, - ): PromiseWithChild<{ - stdout: string | Buffer; - stderr: string | Buffer; - }>; - } - interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable { - execPath?: string | undefined; - execArgv?: string[] | undefined; - silent?: boolean | undefined; - /** - * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. - * If passed as an array, the first element is used for `stdin`, the second for - * `stdout`, and the third for `stderr`. A fourth element can be used to - * specify the `stdio` behavior beyond the standard streams. See - * {@link ChildProcess.stdio} for more information. - * - * @default 'pipe' - */ - stdio?: StdioOptions | undefined; - detached?: boolean | undefined; - windowsVerbatimArguments?: boolean | undefined; - } - /** - * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes. - * Like {@link spawn}, a `ChildProcess` object is returned. The - * returned `ChildProcess` will have an additional communication channel - * built-in that allows messages to be passed back and forth between the parent and - * child. See `subprocess.send()` for details. - * - * Keep in mind that spawned Node.js child processes are - * independent of the parent with exception of the IPC communication channel - * that is established between the two. Each process has its own memory, with - * their own V8 instances. Because of the additional resource allocations - * required, spawning a large number of child Node.js processes is not - * recommended. - * - * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the `options` object allows for an alternative - * execution path to be used. - * - * Node.js processes launched with a custom `execPath` will communicate with the - * parent process using the file descriptor (fd) identified using the - * environment variable `NODE_CHANNEL_FD` on the child process. - * - * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the - * current process. - * - * The `shell` option available in {@link spawn} is not supported by `child_process.fork()` and will be ignored if set. - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * if (process.argv[2] === 'child') { - * setTimeout(() => { - * console.log(`Hello from ${process.argv[2]}!`); - * }, 1_000); - * } else { - * import { fork } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const child = fork(__filename, ['child'], { signal }); - * child.on('error', (err) => { - * // This will be called with err being an AbortError if the controller aborts - * }); - * controller.abort(); // Stops the child process - * } - * ``` - * @since v0.5.0 - * @param modulePath The module to run in the child. - * @param args List of string arguments. - */ - function fork(modulePath: string | URL, options?: ForkOptions): ChildProcess; - function fork(modulePath: string | URL, args?: readonly string[], options?: ForkOptions): ChildProcess; - interface SpawnSyncOptions extends CommonSpawnOptions { - input?: string | NodeJS.ArrayBufferView | undefined; - maxBuffer?: number | undefined; - encoding?: BufferEncoding | "buffer" | null | undefined; - } - interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { - encoding: BufferEncoding; - } - interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { - encoding?: "buffer" | null | undefined; - } - interface SpawnSyncReturns { - pid: number; - output: Array; - stdout: T; - stderr: T; - status: number | null; - signal: NodeJS.Signals | null; - error?: Error | undefined; - } - /** - * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return - * until the child process has fully closed. When a timeout has been encountered - * and `killSignal` is sent, the method won't return until the process has - * completely exited. If the process intercepts and handles the `SIGTERM` signal - * and doesn't exit, the parent process will wait until the child process has - * exited. - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * @since v0.11.12 - * @param command The command to run. - * @param args List of string arguments. - */ - function spawnSync(command: string): SpawnSyncReturns; - function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; - function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns; - function spawnSync( - command: string, - args: readonly string[], - options: SpawnSyncOptionsWithStringEncoding, - ): SpawnSyncReturns; - function spawnSync( - command: string, - args: readonly string[], - options: SpawnSyncOptionsWithBufferEncoding, - ): SpawnSyncReturns; - function spawnSync( - command: string, - args?: readonly string[], - options?: SpawnSyncOptions, - ): SpawnSyncReturns; - interface CommonExecOptions extends CommonOptions { - input?: string | NodeJS.ArrayBufferView | undefined; - /** - * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings. - * If passed as an array, the first element is used for `stdin`, the second for - * `stdout`, and the third for `stderr`. A fourth element can be used to - * specify the `stdio` behavior beyond the standard streams. See - * {@link ChildProcess.stdio} for more information. - * - * @default 'pipe' - */ - stdio?: StdioOptions | undefined; - killSignal?: NodeJS.Signals | number | undefined; - maxBuffer?: number | undefined; - encoding?: BufferEncoding | "buffer" | null | undefined; - } - interface ExecSyncOptions extends CommonExecOptions { - shell?: string | undefined; - } - interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { - encoding: BufferEncoding; - } - interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { - encoding?: "buffer" | null | undefined; - } - /** - * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return - * until the child process has fully closed. When a timeout has been encountered - * and `killSignal` is sent, the method won't return until the process has - * completely exited. If the child process intercepts and handles the `SIGTERM` signal and doesn't exit, the parent process will wait until the child process - * has exited. - * - * If the process times out or has a non-zero exit code, this method will throw. - * The `Error` object will contain the entire result from {@link spawnSync}. - * - * **Never pass unsanitized user input to this function. Any input containing shell** - * **metacharacters may be used to trigger arbitrary command execution.** - * @since v0.11.12 - * @param command The command to run. - * @return The stdout from the command. - */ - function execSync(command: string): Buffer; - function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string; - function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer; - function execSync(command: string, options?: ExecSyncOptions): string | Buffer; - interface ExecFileSyncOptions extends CommonExecOptions { - shell?: boolean | string | undefined; - } - interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { - encoding: BufferEncoding; - } - interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { - encoding?: "buffer" | null; // specify `null`. - } - /** - * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not - * return until the child process has fully closed. When a timeout has been - * encountered and `killSignal` is sent, the method won't return until the process - * has completely exited. - * - * If the child process intercepts and handles the `SIGTERM` signal and - * does not exit, the parent process will still wait until the child process has - * exited. - * - * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}. - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * @since v0.11.12 - * @param file The name or path of the executable file to run. - * @param args List of string arguments. - * @return The stdout from the command. - */ - function execFileSync(file: string): Buffer; - function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string; - function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer; - function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer; - function execFileSync(file: string, args: readonly string[]): Buffer; - function execFileSync( - file: string, - args: readonly string[], - options: ExecFileSyncOptionsWithStringEncoding, - ): string; - function execFileSync( - file: string, - args: readonly string[], - options: ExecFileSyncOptionsWithBufferEncoding, - ): Buffer; - function execFileSync(file: string, args?: readonly string[], options?: ExecFileSyncOptions): string | Buffer; -} -declare module "node:child_process" { - export * from "child_process"; -} diff --git a/web/static/node_modules/@types/node/cluster.d.ts b/web/static/node_modules/@types/node/cluster.d.ts deleted file mode 100644 index 86b48d9b..00000000 --- a/web/static/node_modules/@types/node/cluster.d.ts +++ /dev/null @@ -1,579 +0,0 @@ -/** - * Clusters of Node.js processes can be used to run multiple instances of Node.js - * that can distribute workloads among their application threads. When process isolation - * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html) - * module instead, which allows running multiple application threads within a single Node.js instance. - * - * The cluster module allows easy creation of child processes that all share - * server ports. - * - * ```js - * import cluster from 'node:cluster'; - * import http from 'node:http'; - * import { availableParallelism } from 'node:os'; - * import process from 'node:process'; - * - * const numCPUs = availableParallelism(); - * - * if (cluster.isPrimary) { - * console.log(`Primary ${process.pid} is running`); - * - * // Fork workers. - * for (let i = 0; i < numCPUs; i++) { - * cluster.fork(); - * } - * - * cluster.on('exit', (worker, code, signal) => { - * console.log(`worker ${worker.process.pid} died`); - * }); - * } else { - * // Workers can share any TCP connection - * // In this case it is an HTTP server - * http.createServer((req, res) => { - * res.writeHead(200); - * res.end('hello world\n'); - * }).listen(8000); - * - * console.log(`Worker ${process.pid} started`); - * } - * ``` - * - * Running Node.js will now share port 8000 between the workers: - * - * ```console - * $ node server.js - * Primary 3596 is running - * Worker 4324 started - * Worker 4520 started - * Worker 6056 started - * Worker 5644 started - * ``` - * - * On Windows, it is not yet possible to set up a named pipe server in a worker. - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/cluster.js) - */ -declare module "cluster" { - import * as child from "node:child_process"; - import EventEmitter = require("node:events"); - import * as net from "node:net"; - type SerializationType = "json" | "advanced"; - export interface ClusterSettings { - /** - * List of string arguments passed to the Node.js executable. - * @default process.execArgv - */ - execArgv?: string[] | undefined; - /** - * File path to worker file. - * @default process.argv[1] - */ - exec?: string | undefined; - /** - * String arguments passed to worker. - * @default process.argv.slice(2) - */ - args?: string[] | undefined; - /** - * Whether or not to send output to parent's stdio. - * @default false - */ - silent?: boolean | undefined; - /** - * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must - * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#child_processspawncommand-args-options)'s - * [`stdio`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#optionsstdio). - */ - stdio?: any[] | undefined; - /** - * Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).) - */ - uid?: number | undefined; - /** - * Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).) - */ - gid?: number | undefined; - /** - * Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number. - * By default each worker gets its own port, incremented from the primary's `process.debugPort`. - */ - inspectPort?: number | (() => number) | undefined; - /** - * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`. - * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#advanced-serialization) for more details. - * @default false - */ - serialization?: SerializationType | undefined; - /** - * Current working directory of the worker process. - * @default undefined (inherits from parent process) - */ - cwd?: string | undefined; - /** - * Hide the forked processes console window that would normally be created on Windows systems. - * @default false - */ - windowsHide?: boolean | undefined; - } - export interface Address { - address: string; - port: number; - /** - * The `addressType` is one of: - * - * * `4` (TCPv4) - * * `6` (TCPv6) - * * `-1` (Unix domain socket) - * * `'udp4'` or `'udp6'` (UDPv4 or UDPv6) - */ - addressType: 4 | 6 | -1 | "udp4" | "udp6"; - } - /** - * A `Worker` object contains all public information and method about a worker. - * In the primary it can be obtained using `cluster.workers`. In a worker - * it can be obtained using `cluster.worker`. - * @since v0.7.0 - */ - export class Worker extends EventEmitter { - /** - * Each new worker is given its own unique id, this id is stored in the `id`. - * - * While a worker is alive, this is the key that indexes it in `cluster.workers`. - * @since v0.8.0 - */ - id: number; - /** - * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object - * from this function is stored as `.process`. In a worker, the global `process` is stored. - * - * See: [Child Process module](https://nodejs.org/docs/latest-v22.x/api/child_process.html#child_processforkmodulepath-args-options). - * - * Workers will call `process.exit(0)` if the `'disconnect'` event occurs - * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against - * accidental disconnection. - * @since v0.7.0 - */ - process: child.ChildProcess; - /** - * Send a message to a worker or primary, optionally with a handle. - * - * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback). - * - * In a worker, this sends a message to the primary. It is identical to `process.send()`. - * - * This example will echo back all messages from the primary: - * - * ```js - * if (cluster.isPrimary) { - * const worker = cluster.fork(); - * worker.send('hi there'); - * - * } else if (cluster.isWorker) { - * process.on('message', (msg) => { - * process.send(msg); - * }); - * } - * ``` - * @since v0.7.0 - * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. - */ - send(message: child.Serializable, callback?: (error: Error | null) => void): boolean; - send( - message: child.Serializable, - sendHandle: child.SendHandle, - callback?: (error: Error | null) => void, - ): boolean; - send( - message: child.Serializable, - sendHandle: child.SendHandle, - options?: child.MessageOptions, - callback?: (error: Error | null) => void, - ): boolean; - /** - * This function will kill the worker. In the primary worker, it does this by - * disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by killing the process with `signal`. - * - * The `kill()` function kills the worker process without waiting for a graceful - * disconnect, it has the same behavior as `worker.process.kill()`. - * - * This method is aliased as `worker.destroy()` for backwards compatibility. - * - * In a worker, `process.kill()` exists, but it is not this function; - * it is [`kill()`](https://nodejs.org/docs/latest-v22.x/api/process.html#processkillpid-signal). - * @since v0.9.12 - * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process. - */ - kill(signal?: string): void; - destroy(signal?: string): void; - /** - * In a worker, this function will close all servers, wait for the `'close'` event - * on those servers, and then disconnect the IPC channel. - * - * In the primary, an internal message is sent to the worker causing it to call `.disconnect()` on itself. - * - * Causes `.exitedAfterDisconnect` to be set. - * - * After a server is closed, it will no longer accept new connections, - * but connections may be accepted by any other listening worker. Existing - * connections will be allowed to close as usual. When no more connections exist, - * see `server.close()`, the IPC channel to the worker will close allowing it - * to die gracefully. - * - * The above applies _only_ to server connections, client connections are not - * automatically closed by workers, and disconnect does not wait for them to close - * before exiting. - * - * In a worker, `process.disconnect` exists, but it is not this function; - * it is `disconnect()`. - * - * Because long living server connections may block workers from disconnecting, it - * may be useful to send a message, so application specific actions may be taken to - * close them. It also may be useful to implement a timeout, killing a worker if - * the `'disconnect'` event has not been emitted after some time. - * - * ```js - * import net from 'node:net'; - * - * if (cluster.isPrimary) { - * const worker = cluster.fork(); - * let timeout; - * - * worker.on('listening', (address) => { - * worker.send('shutdown'); - * worker.disconnect(); - * timeout = setTimeout(() => { - * worker.kill(); - * }, 2000); - * }); - * - * worker.on('disconnect', () => { - * clearTimeout(timeout); - * }); - * - * } else if (cluster.isWorker) { - * const server = net.createServer((socket) => { - * // Connections never end - * }); - * - * server.listen(8000); - * - * process.on('message', (msg) => { - * if (msg === 'shutdown') { - * // Initiate graceful close of any connections to server - * } - * }); - * } - * ``` - * @since v0.7.7 - * @return A reference to `worker`. - */ - disconnect(): void; - /** - * This function returns `true` if the worker is connected to its primary via its - * IPC channel, `false` otherwise. A worker is connected to its primary after it - * has been created. It is disconnected after the `'disconnect'` event is emitted. - * @since v0.11.14 - */ - isConnected(): boolean; - /** - * This function returns `true` if the worker's process has terminated (either - * because of exiting or being signaled). Otherwise, it returns `false`. - * - * ```js - * import cluster from 'node:cluster'; - * import http from 'node:http'; - * import { availableParallelism } from 'node:os'; - * import process from 'node:process'; - * - * const numCPUs = availableParallelism(); - * - * if (cluster.isPrimary) { - * console.log(`Primary ${process.pid} is running`); - * - * // Fork workers. - * for (let i = 0; i < numCPUs; i++) { - * cluster.fork(); - * } - * - * cluster.on('fork', (worker) => { - * console.log('worker is dead:', worker.isDead()); - * }); - * - * cluster.on('exit', (worker, code, signal) => { - * console.log('worker is dead:', worker.isDead()); - * }); - * } else { - * // Workers can share any TCP connection. In this case, it is an HTTP server. - * http.createServer((req, res) => { - * res.writeHead(200); - * res.end(`Current process\n ${process.pid}`); - * process.kill(process.pid); - * }).listen(8000); - * } - * ``` - * @since v0.11.14 - */ - isDead(): boolean; - /** - * This property is `true` if the worker exited due to `.disconnect()`. - * If the worker exited any other way, it is `false`. If the - * worker has not exited, it is `undefined`. - * - * The boolean `worker.exitedAfterDisconnect` allows distinguishing between - * voluntary and accidental exit, the primary may choose not to respawn a worker - * based on this value. - * - * ```js - * cluster.on('exit', (worker, code, signal) => { - * if (worker.exitedAfterDisconnect === true) { - * console.log('Oh, it was just voluntary – no need to worry'); - * } - * }); - * - * // kill worker - * worker.kill(); - * ``` - * @since v6.0.0 - */ - exitedAfterDisconnect: boolean; - /** - * events.EventEmitter - * 1. disconnect - * 2. error - * 3. exit - * 4. listening - * 5. message - * 6. online - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "error", listener: (error: Error) => void): this; - addListener(event: "exit", listener: (code: number, signal: string) => void): this; - addListener(event: "listening", listener: (address: Address) => void): this; - addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: () => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "disconnect"): boolean; - emit(event: "error", error: Error): boolean; - emit(event: "exit", code: number, signal: string): boolean; - emit(event: "listening", address: Address): boolean; - emit(event: "message", message: any, handle: net.Socket | net.Server): boolean; - emit(event: "online"): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "disconnect", listener: () => void): this; - on(event: "error", listener: (error: Error) => void): this; - on(event: "exit", listener: (code: number, signal: string) => void): this; - on(event: "listening", listener: (address: Address) => void): this; - on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "disconnect", listener: () => void): this; - once(event: "error", listener: (error: Error) => void): this; - once(event: "exit", listener: (code: number, signal: string) => void): this; - once(event: "listening", listener: (address: Address) => void): this; - once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "error", listener: (error: Error) => void): this; - prependListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependListener(event: "listening", listener: (address: Address) => void): this; - prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependListener(event: "online", listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "error", listener: (error: Error) => void): this; - prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "listening", listener: (address: Address) => void): this; - prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener(event: "online", listener: () => void): this; - } - export interface Cluster extends EventEmitter { - disconnect(callback?: () => void): void; - /** - * Spawn a new worker process. - * - * This can only be called from the primary process. - * @param env Key/value pairs to add to worker process environment. - * @since v0.6.0 - */ - fork(env?: any): Worker; - /** @deprecated since v16.0.0 - use isPrimary. */ - readonly isMaster: boolean; - /** - * True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` - * is undefined, then `isPrimary` is `true`. - * @since v16.0.0 - */ - readonly isPrimary: boolean; - /** - * True if the process is not a primary (it is the negation of `cluster.isPrimary`). - * @since v0.6.0 - */ - readonly isWorker: boolean; - /** - * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a - * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clustersetupprimarysettings) - * is called, whichever comes first. - * - * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute - * IOCP handles without incurring a large performance hit. - * - * `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`. - * @since v0.11.2 - */ - schedulingPolicy: number; - /** - * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clustersetupprimarysettings) - * (or [`.fork()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clusterforkenv)) this settings object will contain - * the settings, including the default values. - * - * This object is not intended to be changed or set manually. - * @since v0.7.1 - */ - readonly settings: ClusterSettings; - /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clustersetupprimarysettings) instead. */ - setupMaster(settings?: ClusterSettings): void; - /** - * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`. - * - * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clusterforkenv) - * and have no effect on workers that are already running. - * - * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to - * [`.fork()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clusterforkenv). - * - * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of - * `cluster.setupPrimary()` is called. - * - * ```js - * import cluster from 'node:cluster'; - * - * cluster.setupPrimary({ - * exec: 'worker.js', - * args: ['--use', 'https'], - * silent: true, - * }); - * cluster.fork(); // https worker - * cluster.setupPrimary({ - * exec: 'worker.js', - * args: ['--use', 'http'], - * }); - * cluster.fork(); // http worker - * ``` - * - * This can only be called from the primary process. - * @since v16.0.0 - */ - setupPrimary(settings?: ClusterSettings): void; - /** - * A reference to the current worker object. Not available in the primary process. - * - * ```js - * import cluster from 'node:cluster'; - * - * if (cluster.isPrimary) { - * console.log('I am primary'); - * cluster.fork(); - * cluster.fork(); - * } else if (cluster.isWorker) { - * console.log(`I am worker #${cluster.worker.id}`); - * } - * ``` - * @since v0.7.0 - */ - readonly worker?: Worker | undefined; - /** - * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process. - * - * A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it - * is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted. - * - * ```js - * import cluster from 'node:cluster'; - * - * for (const worker of Object.values(cluster.workers)) { - * worker.send('big announcement to all workers'); - * } - * ``` - * @since v0.7.0 - */ - readonly workers?: NodeJS.Dict | undefined; - readonly SCHED_NONE: number; - readonly SCHED_RR: number; - /** - * events.EventEmitter - * 1. disconnect - * 2. exit - * 3. fork - * 4. listening - * 5. message - * 6. online - * 7. setup - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "disconnect", listener: (worker: Worker) => void): this; - addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - addListener(event: "fork", listener: (worker: Worker) => void): this; - addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - addListener( - event: "message", - listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void, - ): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: (worker: Worker) => void): this; - addListener(event: "setup", listener: (settings: ClusterSettings) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "disconnect", worker: Worker): boolean; - emit(event: "exit", worker: Worker, code: number, signal: string): boolean; - emit(event: "fork", worker: Worker): boolean; - emit(event: "listening", worker: Worker, address: Address): boolean; - emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; - emit(event: "online", worker: Worker): boolean; - emit(event: "setup", settings: ClusterSettings): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "disconnect", listener: (worker: Worker) => void): this; - on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - on(event: "fork", listener: (worker: Worker) => void): this; - on(event: "listening", listener: (worker: Worker, address: Address) => void): this; - on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: (worker: Worker) => void): this; - on(event: "setup", listener: (settings: ClusterSettings) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "disconnect", listener: (worker: Worker) => void): this; - once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - once(event: "fork", listener: (worker: Worker) => void): this; - once(event: "listening", listener: (worker: Worker, address: Address) => void): this; - once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: (worker: Worker) => void): this; - once(event: "setup", listener: (settings: ClusterSettings) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependListener(event: "fork", listener: (worker: Worker) => void): this; - prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - // the handle is a net.Socket or net.Server object, or undefined. - prependListener( - event: "message", - listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void, - ): this; - prependListener(event: "online", listener: (worker: Worker) => void): this; - prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; - prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener( - event: "message", - listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void, - ): this; - prependOnceListener(event: "online", listener: (worker: Worker) => void): this; - prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this; - } - const cluster: Cluster; - export default cluster; -} -declare module "node:cluster" { - export * from "cluster"; - export { default as default } from "cluster"; -} diff --git a/web/static/node_modules/@types/node/compatibility/disposable.d.ts b/web/static/node_modules/@types/node/compatibility/disposable.d.ts deleted file mode 100644 index 5fff612b..00000000 --- a/web/static/node_modules/@types/node/compatibility/disposable.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Polyfills for the explicit resource management types added in TypeScript 5.2. -// TODO: remove once this package no longer supports TS 5.1, and replace with a -// to TypeScript's disposable library in index.d.ts. - -interface SymbolConstructor { - readonly dispose: unique symbol; - readonly asyncDispose: unique symbol; -} - -interface Disposable { - [Symbol.dispose](): void; -} - -interface AsyncDisposable { - [Symbol.asyncDispose](): PromiseLike; -} diff --git a/web/static/node_modules/@types/node/compatibility/index.d.ts b/web/static/node_modules/@types/node/compatibility/index.d.ts deleted file mode 100644 index 5c41e372..00000000 --- a/web/static/node_modules/@types/node/compatibility/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// Declaration files in this directory contain types relating to TypeScript library features -// that are not included in all TypeScript versions supported by DefinitelyTyped, but -// which can be made backwards-compatible without needing `typesVersions`. -// If adding declarations to this directory, please specify which versions of TypeScript require them, -// so that they can be removed when no longer needed. - -/// -/// -/// diff --git a/web/static/node_modules/@types/node/compatibility/indexable.d.ts b/web/static/node_modules/@types/node/compatibility/indexable.d.ts deleted file mode 100644 index 99197029..00000000 --- a/web/static/node_modules/@types/node/compatibility/indexable.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Polyfill for ES2022's .at() method on string/array prototypes, added to TypeScript in 4.6. -// TODO: these methods are not used within @types/node, and should be removed at the next -// major @types/node version; users should include the es2022 TypeScript libraries -// if they need these features. - -interface RelativeIndexable { - at(index: number): T | undefined; -} - -interface String extends RelativeIndexable {} -interface Array extends RelativeIndexable {} -interface ReadonlyArray extends RelativeIndexable {} -interface Int8Array extends RelativeIndexable {} -interface Uint8Array extends RelativeIndexable {} -interface Uint8ClampedArray extends RelativeIndexable {} -interface Int16Array extends RelativeIndexable {} -interface Uint16Array extends RelativeIndexable {} -interface Int32Array extends RelativeIndexable {} -interface Uint32Array extends RelativeIndexable {} -interface Float32Array extends RelativeIndexable {} -interface Float64Array extends RelativeIndexable {} -interface BigInt64Array extends RelativeIndexable {} -interface BigUint64Array extends RelativeIndexable {} diff --git a/web/static/node_modules/@types/node/compatibility/iterators.d.ts b/web/static/node_modules/@types/node/compatibility/iterators.d.ts deleted file mode 100644 index 156e7856..00000000 --- a/web/static/node_modules/@types/node/compatibility/iterators.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Backwards-compatible iterator interfaces, augmented with iterator helper methods by lib.esnext.iterator in TypeScript 5.6. -// The IterableIterator interface does not contain these methods, which creates assignability issues in places where IteratorObjects -// are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded. -// Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods -// if lib.esnext.iterator is loaded. -// TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn. - -// Placeholders for TS <5.6 -interface IteratorObject {} -interface AsyncIteratorObject {} - -declare namespace NodeJS { - // Populate iterator methods for TS <5.6 - interface Iterator extends globalThis.Iterator {} - interface AsyncIterator extends globalThis.AsyncIterator {} - - // Polyfill for TS 5.6's instrinsic BuiltinIteratorReturn type, required for DOM-compatible iterators - type BuiltinIteratorReturn = ReturnType extends - globalThis.Iterator ? TReturn - : any; -} diff --git a/web/static/node_modules/@types/node/console.d.ts b/web/static/node_modules/@types/node/console.d.ts deleted file mode 100644 index 3e4c2d9a..00000000 --- a/web/static/node_modules/@types/node/console.d.ts +++ /dev/null @@ -1,452 +0,0 @@ -/** - * The `node:console` module provides a simple debugging console that is similar to - * the JavaScript console mechanism provided by web browsers. - * - * The module exports two specific components: - * - * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream. - * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdout) and - * [`process.stderr`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. - * - * _**Warning**_: The global console object's methods are neither consistently - * synchronous like the browser APIs they resemble, nor are they consistently - * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v22.x/api/process.html#a-note-on-process-io) for - * more information. - * - * Example using the global `console`: - * - * ```js - * console.log('hello world'); - * // Prints: hello world, to stdout - * console.log('hello %s', 'world'); - * // Prints: hello world, to stdout - * console.error(new Error('Whoops, something bad happened')); - * // Prints error message and stack trace to stderr: - * // Error: Whoops, something bad happened - * // at [eval]:5:15 - * // at Script.runInThisContext (node:vm:132:18) - * // at Object.runInThisContext (node:vm:309:38) - * // at node:internal/process/execution:77:19 - * // at [eval]-wrapper:6:22 - * // at evalScript (node:internal/process/execution:76:60) - * // at node:internal/main/eval_string:23:3 - * - * const name = 'Will Robinson'; - * console.warn(`Danger ${name}! Danger!`); - * // Prints: Danger Will Robinson! Danger!, to stderr - * ``` - * - * Example using the `Console` class: - * - * ```js - * const out = getStreamSomehow(); - * const err = getStreamSomehow(); - * const myConsole = new console.Console(out, err); - * - * myConsole.log('hello world'); - * // Prints: hello world, to out - * myConsole.log('hello %s', 'world'); - * // Prints: hello world, to out - * myConsole.error(new Error('Whoops, something bad happened')); - * // Prints: [Error: Whoops, something bad happened], to err - * - * const name = 'Will Robinson'; - * myConsole.warn(`Danger ${name}! Danger!`); - * // Prints: Danger Will Robinson! Danger!, to err - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/console.js) - */ -declare module "console" { - import console = require("node:console"); - export = console; -} -declare module "node:console" { - import { InspectOptions } from "node:util"; - global { - // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build - interface Console { - Console: console.ConsoleConstructor; - /** - * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only - * writes a message and does not otherwise affect execution. The output always - * starts with `"Assertion failed"`. If provided, `message` is formatted using - * [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args). - * - * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens. - * - * ```js - * console.assert(true, 'does nothing'); - * - * console.assert(false, 'Whoops %s work', 'didn\'t'); - * // Assertion failed: Whoops didn't work - * - * console.assert(); - * // Assertion failed - * ``` - * @since v0.1.101 - * @param value The value tested for being truthy. - * @param message All arguments besides `value` are used as error message. - */ - assert(value: any, message?: string, ...optionalParams: any[]): void; - /** - * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the - * TTY. When `stdout` is not a TTY, this method does nothing. - * - * The specific operation of `console.clear()` can vary across operating systems - * and terminal types. For most Linux operating systems, `console.clear()` operates similarly to the `clear` shell command. On Windows, `console.clear()` will clear only the output in the - * current terminal viewport for the Node.js - * binary. - * @since v8.3.0 - */ - clear(): void; - /** - * Maintains an internal counter specific to `label` and outputs to `stdout` the - * number of times `console.count()` has been called with the given `label`. - * - * ```js - * > console.count() - * default: 1 - * undefined - * > console.count('default') - * default: 2 - * undefined - * > console.count('abc') - * abc: 1 - * undefined - * > console.count('xyz') - * xyz: 1 - * undefined - * > console.count('abc') - * abc: 2 - * undefined - * > console.count() - * default: 3 - * undefined - * > - * ``` - * @since v8.3.0 - * @param [label='default'] The display label for the counter. - */ - count(label?: string): void; - /** - * Resets the internal counter specific to `label`. - * - * ```js - * > console.count('abc'); - * abc: 1 - * undefined - * > console.countReset('abc'); - * undefined - * > console.count('abc'); - * abc: 1 - * undefined - * > - * ``` - * @since v8.3.0 - * @param [label='default'] The display label for the counter. - */ - countReset(label?: string): void; - /** - * The `console.debug()` function is an alias for {@link log}. - * @since v8.0.0 - */ - debug(message?: any, ...optionalParams: any[]): void; - /** - * Uses [`util.inspect()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`. - * This function bypasses any custom `inspect()` function defined on `obj`. - * @since v0.1.101 - */ - dir(obj: any, options?: InspectOptions): void; - /** - * This method calls `console.log()` passing it the arguments received. - * This method does not produce any XML formatting. - * @since v8.0.0 - */ - dirxml(...data: any[]): void; - /** - * Prints to `stderr` with newline. Multiple arguments can be passed, with the - * first used as the primary message and all additional used as substitution - * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) - * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args)). - * - * ```js - * const code = 5; - * console.error('error #%d', code); - * // Prints: error #5, to stderr - * console.error('error', code); - * // Prints: error 5, to stderr - * ``` - * - * If formatting elements (e.g. `%d`) are not found in the first string then - * [`util.inspect()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilinspectobject-options) is called on each argument and the - * resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args) - * for more information. - * @since v0.1.100 - */ - error(message?: any, ...optionalParams: any[]): void; - /** - * Increases indentation of subsequent lines by spaces for `groupIndentation` length. - * - * If one or more `label`s are provided, those are printed first without the - * additional indentation. - * @since v8.5.0 - */ - group(...label: any[]): void; - /** - * An alias for {@link group}. - * @since v8.5.0 - */ - groupCollapsed(...label: any[]): void; - /** - * Decreases indentation of subsequent lines by spaces for `groupIndentation` length. - * @since v8.5.0 - */ - groupEnd(): void; - /** - * The `console.info()` function is an alias for {@link log}. - * @since v0.1.100 - */ - info(message?: any, ...optionalParams: any[]): void; - /** - * Prints to `stdout` with newline. Multiple arguments can be passed, with the - * first used as the primary message and all additional used as substitution - * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) - * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args)). - * - * ```js - * const count = 5; - * console.log('count: %d', count); - * // Prints: count: 5, to stdout - * console.log('count:', count); - * // Prints: count: 5, to stdout - * ``` - * - * See [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args) for more information. - * @since v0.1.100 - */ - log(message?: any, ...optionalParams: any[]): void; - /** - * Try to construct a table with the columns of the properties of `tabularData` (or use `properties`) and rows of `tabularData` and log it. Falls back to just - * logging the argument if it can't be parsed as tabular. - * - * ```js - * // These can't be parsed as tabular data - * console.table(Symbol()); - * // Symbol() - * - * console.table(undefined); - * // undefined - * - * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]); - * // ┌─────────┬─────┬─────┐ - * // │ (index) │ a │ b │ - * // ├─────────┼─────┼─────┤ - * // │ 0 │ 1 │ 'Y' │ - * // │ 1 │ 'Z' │ 2 │ - * // └─────────┴─────┴─────┘ - * - * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']); - * // ┌─────────┬─────┐ - * // │ (index) │ a │ - * // ├─────────┼─────┤ - * // │ 0 │ 1 │ - * // │ 1 │ 'Z' │ - * // └─────────┴─────┘ - * ``` - * @since v10.0.0 - * @param properties Alternate properties for constructing the table. - */ - table(tabularData: any, properties?: readonly string[]): void; - /** - * Starts a timer that can be used to compute the duration of an operation. Timers - * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in - * suitable time units to `stdout`. For example, if the elapsed - * time is 3869ms, `console.timeEnd()` displays "3.869s". - * @since v0.1.104 - * @param [label='default'] - */ - time(label?: string): void; - /** - * Stops a timer that was previously started by calling {@link time} and - * prints the result to `stdout`: - * - * ```js - * console.time('bunch-of-stuff'); - * // Do a bunch of stuff. - * console.timeEnd('bunch-of-stuff'); - * // Prints: bunch-of-stuff: 225.438ms - * ``` - * @since v0.1.104 - * @param [label='default'] - */ - timeEnd(label?: string): void; - /** - * For a timer that was previously started by calling {@link time}, prints - * the elapsed time and other `data` arguments to `stdout`: - * - * ```js - * console.time('process'); - * const value = expensiveProcess1(); // Returns 42 - * console.timeLog('process', value); - * // Prints "process: 365.227ms 42". - * doExpensiveProcess2(value); - * console.timeEnd('process'); - * ``` - * @since v10.7.0 - * @param [label='default'] - */ - timeLog(label?: string, ...data: any[]): void; - /** - * Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args) - * formatted message and stack trace to the current position in the code. - * - * ```js - * console.trace('Show me'); - * // Prints: (stack trace will vary based on where trace is called) - * // Trace: Show me - * // at repl:2:9 - * // at REPLServer.defaultEval (repl.js:248:27) - * // at bound (domain.js:287:14) - * // at REPLServer.runBound [as eval] (domain.js:300:12) - * // at REPLServer. (repl.js:412:12) - * // at emitOne (events.js:82:20) - * // at REPLServer.emit (events.js:169:7) - * // at REPLServer.Interface._onLine (readline.js:210:10) - * // at REPLServer.Interface._line (readline.js:549:8) - * // at REPLServer.Interface._ttyWrite (readline.js:826:14) - * ``` - * @since v0.1.104 - */ - trace(message?: any, ...optionalParams: any[]): void; - /** - * The `console.warn()` function is an alias for {@link error}. - * @since v0.1.100 - */ - warn(message?: any, ...optionalParams: any[]): void; - // --- Inspector mode only --- - /** - * This method does not display anything unless used in the inspector. The `console.profile()` - * method starts a JavaScript CPU profile with an optional label until {@link profileEnd} - * is called. The profile is then added to the Profile panel of the inspector. - * - * ```js - * console.profile('MyLabel'); - * // Some code - * console.profileEnd('MyLabel'); - * // Adds the profile 'MyLabel' to the Profiles panel of the inspector. - * ``` - * @since v8.0.0 - */ - profile(label?: string): void; - /** - * This method does not display anything unless used in the inspector. Stops the current - * JavaScript CPU profiling session if one has been started and prints the report to the - * Profiles panel of the inspector. See {@link profile} for an example. - * - * If this method is called without a label, the most recently started profile is stopped. - * @since v8.0.0 - */ - profileEnd(label?: string): void; - /** - * This method does not display anything unless used in the inspector. The `console.timeStamp()` - * method adds an event with the label `'label'` to the Timeline panel of the inspector. - * @since v8.0.0 - */ - timeStamp(label?: string): void; - } - /** - * The `console` module provides a simple debugging console that is similar to the - * JavaScript console mechanism provided by web browsers. - * - * The module exports two specific components: - * - * * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. - * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdout) and - * [`process.stderr`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. - * - * _**Warning**_: The global console object's methods are neither consistently - * synchronous like the browser APIs they resemble, nor are they consistently - * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v22.x/api/process.html#a-note-on-process-io) for - * more information. - * - * Example using the global `console`: - * - * ```js - * console.log('hello world'); - * // Prints: hello world, to stdout - * console.log('hello %s', 'world'); - * // Prints: hello world, to stdout - * console.error(new Error('Whoops, something bad happened')); - * // Prints error message and stack trace to stderr: - * // Error: Whoops, something bad happened - * // at [eval]:5:15 - * // at Script.runInThisContext (node:vm:132:18) - * // at Object.runInThisContext (node:vm:309:38) - * // at node:internal/process/execution:77:19 - * // at [eval]-wrapper:6:22 - * // at evalScript (node:internal/process/execution:76:60) - * // at node:internal/main/eval_string:23:3 - * - * const name = 'Will Robinson'; - * console.warn(`Danger ${name}! Danger!`); - * // Prints: Danger Will Robinson! Danger!, to stderr - * ``` - * - * Example using the `Console` class: - * - * ```js - * const out = getStreamSomehow(); - * const err = getStreamSomehow(); - * const myConsole = new console.Console(out, err); - * - * myConsole.log('hello world'); - * // Prints: hello world, to out - * myConsole.log('hello %s', 'world'); - * // Prints: hello world, to out - * myConsole.error(new Error('Whoops, something bad happened')); - * // Prints: [Error: Whoops, something bad happened], to err - * - * const name = 'Will Robinson'; - * myConsole.warn(`Danger ${name}! Danger!`); - * // Prints: Danger Will Robinson! Danger!, to err - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/console.js) - */ - namespace console { - interface ConsoleConstructorOptions { - stdout: NodeJS.WritableStream; - stderr?: NodeJS.WritableStream | undefined; - /** - * Ignore errors when writing to the underlying streams. - * @default true - */ - ignoreErrors?: boolean | undefined; - /** - * Set color support for this `Console` instance. Setting to true enables coloring while inspecting - * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color - * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the - * respective stream. This option can not be used, if `inspectOptions.colors` is set as well. - * @default auto - */ - colorMode?: boolean | "auto" | undefined; - /** - * Specifies options that are passed along to - * [`util.inspect()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilinspectobject-options). - */ - inspectOptions?: InspectOptions | undefined; - /** - * Set group indentation. - * @default 2 - */ - groupIndentation?: number | undefined; - } - interface ConsoleConstructor { - prototype: Console; - new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console; - new(options: ConsoleConstructorOptions): Console; - } - } - var console: Console; - } - export = globalThis.console; -} diff --git a/web/static/node_modules/@types/node/constants.d.ts b/web/static/node_modules/@types/node/constants.d.ts deleted file mode 100644 index c3ac2b82..00000000 --- a/web/static/node_modules/@types/node/constants.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ -declare module "constants" { - import { constants as osConstants, SignalConstants } from "node:os"; - import { constants as cryptoConstants } from "node:crypto"; - import { constants as fsConstants } from "node:fs"; - - const exp: - & typeof osConstants.errno - & typeof osConstants.priority - & SignalConstants - & typeof cryptoConstants - & typeof fsConstants; - export = exp; -} - -declare module "node:constants" { - import constants = require("constants"); - export = constants; -} diff --git a/web/static/node_modules/@types/node/crypto.d.ts b/web/static/node_modules/@types/node/crypto.d.ts deleted file mode 100644 index 1a019898..00000000 --- a/web/static/node_modules/@types/node/crypto.d.ts +++ /dev/null @@ -1,4452 +0,0 @@ -/** - * The `node:crypto` module provides cryptographic functionality that includes a - * set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify - * functions. - * - * ```js - * const { createHmac } = await import('node:crypto'); - * - * const secret = 'abcdefg'; - * const hash = createHmac('sha256', secret) - * .update('I love cupcakes') - * .digest('hex'); - * console.log(hash); - * // Prints: - * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/crypto.js) - */ -declare module "crypto" { - import * as stream from "node:stream"; - import { PeerCertificate } from "node:tls"; - /** - * SPKAC is a Certificate Signing Request mechanism originally implemented by - * Netscape and was specified formally as part of HTML5's `keygen` element. - * - * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects - * should not use this element anymore. - * - * The `node:crypto` module provides the `Certificate` class for working with SPKAC - * data. The most common usage is handling output generated by the HTML5 `` element. Node.js uses [OpenSSL's SPKAC - * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally. - * @since v0.11.8 - */ - class Certificate { - /** - * ```js - * const { Certificate } = await import('node:crypto'); - * const spkac = getSpkacSomehow(); - * const challenge = Certificate.exportChallenge(spkac); - * console.log(challenge.toString('utf8')); - * // Prints: the challenge as a UTF8 string - * ``` - * @since v9.0.0 - * @param encoding The `encoding` of the `spkac` string. - * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge. - */ - static exportChallenge(spkac: BinaryLike): Buffer; - /** - * ```js - * const { Certificate } = await import('node:crypto'); - * const spkac = getSpkacSomehow(); - * const publicKey = Certificate.exportPublicKey(spkac); - * console.log(publicKey); - * // Prints: the public key as - * ``` - * @since v9.0.0 - * @param encoding The `encoding` of the `spkac` string. - * @return The public key component of the `spkac` data structure, which includes a public key and a challenge. - */ - static exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer; - /** - * ```js - * import { Buffer } from 'node:buffer'; - * const { Certificate } = await import('node:crypto'); - * - * const spkac = getSpkacSomehow(); - * console.log(Certificate.verifySpkac(Buffer.from(spkac))); - * // Prints: true or false - * ``` - * @since v9.0.0 - * @param encoding The `encoding` of the `spkac` string. - * @return `true` if the given `spkac` data structure is valid, `false` otherwise. - */ - static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; - /** - * @deprecated - * @param spkac - * @returns The challenge component of the `spkac` data structure, - * which includes a public key and a challenge. - */ - exportChallenge(spkac: BinaryLike): Buffer; - /** - * @deprecated - * @param spkac - * @param encoding The encoding of the spkac string. - * @returns The public key component of the `spkac` data structure, - * which includes a public key and a challenge. - */ - exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer; - /** - * @deprecated - * @param spkac - * @returns `true` if the given `spkac` data structure is valid, - * `false` otherwise. - */ - verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; - } - namespace constants { - // https://nodejs.org/dist/latest-v22.x/docs/api/crypto.html#crypto-constants - const OPENSSL_VERSION_NUMBER: number; - /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ - const SSL_OP_ALL: number; - /** Instructs OpenSSL to allow a non-[EC]DHE-based key exchange mode for TLS v1.3 */ - const SSL_OP_ALLOW_NO_DHE_KEX: number; - /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ - const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; - /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ - const SSL_OP_CIPHER_SERVER_PREFERENCE: number; - /** Instructs OpenSSL to use Cisco's version identifier of DTLS_BAD_VER. */ - const SSL_OP_CISCO_ANYCONNECT: number; - /** Instructs OpenSSL to turn on cookie exchange. */ - const SSL_OP_COOKIE_EXCHANGE: number; - /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */ - const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; - /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */ - const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; - /** Allows initial connection to servers that do not support RI. */ - const SSL_OP_LEGACY_SERVER_CONNECT: number; - /** Instructs OpenSSL to disable support for SSL/TLS compression. */ - const SSL_OP_NO_COMPRESSION: number; - /** Instructs OpenSSL to disable encrypt-then-MAC. */ - const SSL_OP_NO_ENCRYPT_THEN_MAC: number; - const SSL_OP_NO_QUERY_MTU: number; - /** Instructs OpenSSL to disable renegotiation. */ - const SSL_OP_NO_RENEGOTIATION: number; - /** Instructs OpenSSL to always start a new session when performing renegotiation. */ - const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; - /** Instructs OpenSSL to turn off SSL v2 */ - const SSL_OP_NO_SSLv2: number; - /** Instructs OpenSSL to turn off SSL v3 */ - const SSL_OP_NO_SSLv3: number; - /** Instructs OpenSSL to disable use of RFC4507bis tickets. */ - const SSL_OP_NO_TICKET: number; - /** Instructs OpenSSL to turn off TLS v1 */ - const SSL_OP_NO_TLSv1: number; - /** Instructs OpenSSL to turn off TLS v1.1 */ - const SSL_OP_NO_TLSv1_1: number; - /** Instructs OpenSSL to turn off TLS v1.2 */ - const SSL_OP_NO_TLSv1_2: number; - /** Instructs OpenSSL to turn off TLS v1.3 */ - const SSL_OP_NO_TLSv1_3: number; - /** Instructs OpenSSL server to prioritize ChaCha20-Poly1305 when the client does. This option has no effect if `SSL_OP_CIPHER_SERVER_PREFERENCE` is not enabled. */ - const SSL_OP_PRIORITIZE_CHACHA: number; - /** Instructs OpenSSL to disable version rollback attack detection. */ - const SSL_OP_TLS_ROLLBACK_BUG: number; - const ENGINE_METHOD_RSA: number; - const ENGINE_METHOD_DSA: number; - const ENGINE_METHOD_DH: number; - const ENGINE_METHOD_RAND: number; - const ENGINE_METHOD_EC: number; - const ENGINE_METHOD_CIPHERS: number; - const ENGINE_METHOD_DIGESTS: number; - const ENGINE_METHOD_PKEY_METHS: number; - const ENGINE_METHOD_PKEY_ASN1_METHS: number; - const ENGINE_METHOD_ALL: number; - const ENGINE_METHOD_NONE: number; - const DH_CHECK_P_NOT_SAFE_PRIME: number; - const DH_CHECK_P_NOT_PRIME: number; - const DH_UNABLE_TO_CHECK_GENERATOR: number; - const DH_NOT_SUITABLE_GENERATOR: number; - const RSA_PKCS1_PADDING: number; - const RSA_SSLV23_PADDING: number; - const RSA_NO_PADDING: number; - const RSA_PKCS1_OAEP_PADDING: number; - const RSA_X931_PADDING: number; - const RSA_PKCS1_PSS_PADDING: number; - /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */ - const RSA_PSS_SALTLEN_DIGEST: number; - /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */ - const RSA_PSS_SALTLEN_MAX_SIGN: number; - /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */ - const RSA_PSS_SALTLEN_AUTO: number; - const POINT_CONVERSION_COMPRESSED: number; - const POINT_CONVERSION_UNCOMPRESSED: number; - const POINT_CONVERSION_HYBRID: number; - /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */ - const defaultCoreCipherList: string; - /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */ - const defaultCipherList: string; - } - interface HashOptions extends stream.TransformOptions { - /** - * For XOF hash functions such as `shake256`, the - * outputLength option can be used to specify the desired output length in bytes. - */ - outputLength?: number | undefined; - } - /** @deprecated since v10.0.0 */ - const fips: boolean; - /** - * Creates and returns a `Hash` object that can be used to generate hash digests - * using the given `algorithm`. Optional `options` argument controls stream - * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option - * can be used to specify the desired output length in bytes. - * - * The `algorithm` is dependent on the available algorithms supported by the - * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. - * On recent releases of OpenSSL, `openssl list -digest-algorithms` will - * display the available digest algorithms. - * - * Example: generating the sha256 sum of a file - * - * ```js - * import { - * createReadStream, - * } from 'node:fs'; - * import { argv } from 'node:process'; - * const { - * createHash, - * } = await import('node:crypto'); - * - * const filename = argv[2]; - * - * const hash = createHash('sha256'); - * - * const input = createReadStream(filename); - * input.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = input.read(); - * if (data) - * hash.update(data); - * else { - * console.log(`${hash.digest('hex')} ${filename}`); - * } - * }); - * ``` - * @since v0.1.92 - * @param options `stream.transform` options - */ - function createHash(algorithm: string, options?: HashOptions): Hash; - /** - * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. - * Optional `options` argument controls stream behavior. - * - * The `algorithm` is dependent on the available algorithms supported by the - * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. - * On recent releases of OpenSSL, `openssl list -digest-algorithms` will - * display the available digest algorithms. - * - * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is - * a `KeyObject`, its type must be `secret`. If it is a string, please consider `caveats when using strings as inputs to cryptographic APIs`. If it was - * obtained from a cryptographically secure source of entropy, such as {@link randomBytes} or {@link generateKey}, its length should not - * exceed the block size of `algorithm` (e.g., 512 bits for SHA-256). - * - * Example: generating the sha256 HMAC of a file - * - * ```js - * import { - * createReadStream, - * } from 'node:fs'; - * import { argv } from 'node:process'; - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const filename = argv[2]; - * - * const hmac = createHmac('sha256', 'a secret'); - * - * const input = createReadStream(filename); - * input.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = input.read(); - * if (data) - * hmac.update(data); - * else { - * console.log(`${hmac.digest('hex')} ${filename}`); - * } - * }); - * ``` - * @since v0.1.94 - * @param options `stream.transform` options - */ - function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac; - // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings - type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary"; - type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1"; - type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2"; - type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding; - type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; - /** - * The `Hash` class is a utility for creating hash digests of data. It can be - * used in one of two ways: - * - * * As a `stream` that is both readable and writable, where data is written - * to produce a computed hash digest on the readable side, or - * * Using the `hash.update()` and `hash.digest()` methods to produce the - * computed hash. - * - * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword. - * - * Example: Using `Hash` objects as streams: - * - * ```js - * const { - * createHash, - * } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * hash.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = hash.read(); - * if (data) { - * console.log(data.toString('hex')); - * // Prints: - * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 - * } - * }); - * - * hash.write('some data to hash'); - * hash.end(); - * ``` - * - * Example: Using `Hash` and piped streams: - * - * ```js - * import { createReadStream } from 'node:fs'; - * import { stdout } from 'node:process'; - * const { createHash } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * const input = createReadStream('test.js'); - * input.pipe(hash).setEncoding('hex').pipe(stdout); - * ``` - * - * Example: Using the `hash.update()` and `hash.digest()` methods: - * - * ```js - * const { - * createHash, - * } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * hash.update('some data to hash'); - * console.log(hash.digest('hex')); - * // Prints: - * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 - * ``` - * @since v0.1.92 - */ - class Hash extends stream.Transform { - private constructor(); - /** - * Creates a new `Hash` object that contains a deep copy of the internal state - * of the current `Hash` object. - * - * The optional `options` argument controls stream behavior. For XOF hash - * functions such as `'shake256'`, the `outputLength` option can be used to - * specify the desired output length in bytes. - * - * An error is thrown when an attempt is made to copy the `Hash` object after - * its `hash.digest()` method has been called. - * - * ```js - * // Calculate a rolling hash. - * const { - * createHash, - * } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * hash.update('one'); - * console.log(hash.copy().digest('hex')); - * - * hash.update('two'); - * console.log(hash.copy().digest('hex')); - * - * hash.update('three'); - * console.log(hash.copy().digest('hex')); - * - * // Etc. - * ``` - * @since v13.1.0 - * @param options `stream.transform` options - */ - copy(options?: HashOptions): Hash; - /** - * Updates the hash content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `encoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.92 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): Hash; - update(data: string, inputEncoding: Encoding): Hash; - /** - * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). - * If `encoding` is provided a string will be returned; otherwise - * a `Buffer` is returned. - * - * The `Hash` object can not be used again after `hash.digest()` method has been - * called. Multiple calls will cause an error to be thrown. - * @since v0.1.92 - * @param encoding The `encoding` of the return value. - */ - digest(): Buffer; - digest(encoding: BinaryToTextEncoding): string; - } - /** - * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can - * be used in one of two ways: - * - * * As a `stream` that is both readable and writable, where data is written - * to produce a computed HMAC digest on the readable side, or - * * Using the `hmac.update()` and `hmac.digest()` methods to produce the - * computed HMAC digest. - * - * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword. - * - * Example: Using `Hmac` objects as streams: - * - * ```js - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const hmac = createHmac('sha256', 'a secret'); - * - * hmac.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = hmac.read(); - * if (data) { - * console.log(data.toString('hex')); - * // Prints: - * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e - * } - * }); - * - * hmac.write('some data to hash'); - * hmac.end(); - * ``` - * - * Example: Using `Hmac` and piped streams: - * - * ```js - * import { createReadStream } from 'node:fs'; - * import { stdout } from 'node:process'; - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const hmac = createHmac('sha256', 'a secret'); - * - * const input = createReadStream('test.js'); - * input.pipe(hmac).pipe(stdout); - * ``` - * - * Example: Using the `hmac.update()` and `hmac.digest()` methods: - * - * ```js - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const hmac = createHmac('sha256', 'a secret'); - * - * hmac.update('some data to hash'); - * console.log(hmac.digest('hex')); - * // Prints: - * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e - * ``` - * @since v0.1.94 - * @deprecated Since v20.13.0 Calling `Hmac` class directly with `Hmac()` or `new Hmac()` is deprecated due to being internals, not intended for public use. Please use the {@link createHmac} method to create Hmac instances. - */ - class Hmac extends stream.Transform { - private constructor(); - /** - * Updates the `Hmac` content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `encoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.94 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): Hmac; - update(data: string, inputEncoding: Encoding): Hmac; - /** - * Calculates the HMAC digest of all of the data passed using `hmac.update()`. - * If `encoding` is - * provided a string is returned; otherwise a `Buffer` is returned; - * - * The `Hmac` object can not be used again after `hmac.digest()` has been - * called. Multiple calls to `hmac.digest()` will result in an error being thrown. - * @since v0.1.94 - * @param encoding The `encoding` of the return value. - */ - digest(): Buffer; - digest(encoding: BinaryToTextEncoding): string; - } - type KeyObjectType = "secret" | "public" | "private"; - interface KeyExportOptions { - type: "pkcs1" | "spki" | "pkcs8" | "sec1"; - format: T; - cipher?: string | undefined; - passphrase?: string | Buffer | undefined; - } - interface JwkKeyExportOptions { - format: "jwk"; - } - interface JsonWebKey { - crv?: string | undefined; - d?: string | undefined; - dp?: string | undefined; - dq?: string | undefined; - e?: string | undefined; - k?: string | undefined; - kty?: string | undefined; - n?: string | undefined; - p?: string | undefined; - q?: string | undefined; - qi?: string | undefined; - x?: string | undefined; - y?: string | undefined; - [key: string]: unknown; - } - interface AsymmetricKeyDetails { - /** - * Key size in bits (RSA, DSA). - */ - modulusLength?: number | undefined; - /** - * Public exponent (RSA). - */ - publicExponent?: bigint | undefined; - /** - * Name of the message digest (RSA-PSS). - */ - hashAlgorithm?: string | undefined; - /** - * Name of the message digest used by MGF1 (RSA-PSS). - */ - mgf1HashAlgorithm?: string | undefined; - /** - * Minimal salt length in bytes (RSA-PSS). - */ - saltLength?: number | undefined; - /** - * Size of q in bits (DSA). - */ - divisorLength?: number | undefined; - /** - * Name of the curve (EC). - */ - namedCurve?: string | undefined; - } - /** - * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key, - * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject` - * objects are not to be created directly using the `new`keyword. - * - * Most applications should consider using the new `KeyObject` API instead of - * passing keys as strings or `Buffer`s due to improved security features. - * - * `KeyObject` instances can be passed to other threads via `postMessage()`. - * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to - * be listed in the `transferList` argument. - * @since v11.6.0 - */ - class KeyObject { - private constructor(); - /** - * Example: Converting a `CryptoKey` instance to a `KeyObject`: - * - * ```js - * const { KeyObject } = await import('node:crypto'); - * const { subtle } = globalThis.crypto; - * - * const key = await subtle.generateKey({ - * name: 'HMAC', - * hash: 'SHA-256', - * length: 256, - * }, true, ['sign', 'verify']); - * - * const keyObject = KeyObject.from(key); - * console.log(keyObject.symmetricKeySize); - * // Prints: 32 (symmetric key size in bytes) - * ``` - * @since v15.0.0 - */ - static from(key: webcrypto.CryptoKey): KeyObject; - /** - * For asymmetric keys, this property represents the type of the key. Supported key - * types are: - * - * * `'rsa'` (OID 1.2.840.113549.1.1.1) - * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10) - * * `'dsa'` (OID 1.2.840.10040.4.1) - * * `'ec'` (OID 1.2.840.10045.2.1) - * * `'x25519'` (OID 1.3.101.110) - * * `'x448'` (OID 1.3.101.111) - * * `'ed25519'` (OID 1.3.101.112) - * * `'ed448'` (OID 1.3.101.113) - * * `'dh'` (OID 1.2.840.113549.1.3.1) - * - * This property is `undefined` for unrecognized `KeyObject` types and symmetric - * keys. - * @since v11.6.0 - */ - asymmetricKeyType?: KeyType | undefined; - /** - * This property exists only on asymmetric keys. Depending on the type of the key, - * this object contains information about the key. None of the information obtained - * through this property can be used to uniquely identify a key or to compromise - * the security of the key. - * - * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence, - * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be - * set. - * - * Other key details might be exposed via this API using additional attributes. - * @since v15.7.0 - */ - asymmetricKeyDetails?: AsymmetricKeyDetails | undefined; - /** - * For symmetric keys, the following encoding options can be used: - * - * For public keys, the following encoding options can be used: - * - * For private keys, the following encoding options can be used: - * - * The result type depends on the selected encoding format, when PEM the - * result is a string, when DER it will be a buffer containing the data - * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object. - * - * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are - * ignored. - * - * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of - * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be - * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for - * encrypted private keys. Since PKCS#8 defines its own - * encryption mechanism, PEM-level encryption is not supported when encrypting - * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for - * PKCS#1 and SEC1 encryption. - * @since v11.6.0 - */ - export(options: KeyExportOptions<"pem">): string | Buffer; - export(options?: KeyExportOptions<"der">): Buffer; - export(options?: JwkKeyExportOptions): JsonWebKey; - /** - * Returns `true` or `false` depending on whether the keys have exactly the same - * type, value, and parameters. This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack). - * @since v17.7.0, v16.15.0 - * @param otherKeyObject A `KeyObject` with which to compare `keyObject`. - */ - equals(otherKeyObject: KeyObject): boolean; - /** - * For secret keys, this property represents the size of the key in bytes. This - * property is `undefined` for asymmetric keys. - * @since v11.6.0 - */ - symmetricKeySize?: number | undefined; - /** - * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys - * or `'private'` for private (asymmetric) keys. - * @since v11.6.0 - */ - type: KeyObjectType; - } - type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm" | "chacha20-poly1305"; - type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm"; - type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb"; - type BinaryLike = string | NodeJS.ArrayBufferView; - type CipherKey = BinaryLike | KeyObject; - interface CipherCCMOptions extends stream.TransformOptions { - authTagLength: number; - } - interface CipherGCMOptions extends stream.TransformOptions { - authTagLength?: number | undefined; - } - interface CipherOCBOptions extends stream.TransformOptions { - authTagLength: number; - } - /** - * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and - * initialization vector (`iv`). - * - * The `options` argument controls stream behavior and is optional except when a - * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the - * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication - * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. - * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. - * - * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On - * recent OpenSSL releases, `openssl list -cipher-algorithms` will - * display the available cipher algorithms. - * - * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded - * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be - * a `KeyObject` of type `secret`. If the cipher does not need - * an initialization vector, `iv` may be `null`. - * - * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * Initialization vectors should be unpredictable and unique; ideally, they will be - * cryptographically random. They do not have to be secret: IVs are typically just - * added to ciphertext messages unencrypted. It may sound contradictory that - * something has to be unpredictable and unique, but does not have to be secret; - * remember that an attacker must not be able to predict ahead of time what a - * given IV will be. - * @since v0.1.94 - * @param options `stream.transform` options - */ - function createCipheriv( - algorithm: CipherCCMTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherCCMOptions, - ): CipherCCM; - function createCipheriv( - algorithm: CipherOCBTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherOCBOptions, - ): CipherOCB; - function createCipheriv( - algorithm: CipherGCMTypes, - key: CipherKey, - iv: BinaryLike, - options?: CipherGCMOptions, - ): CipherGCM; - function createCipheriv( - algorithm: string, - key: CipherKey, - iv: BinaryLike | null, - options?: stream.TransformOptions, - ): Cipher; - /** - * Instances of the `Cipher` class are used to encrypt data. The class can be - * used in one of two ways: - * - * * As a `stream` that is both readable and writable, where plain unencrypted - * data is written to produce encrypted data on the readable side, or - * * Using the `cipher.update()` and `cipher.final()` methods to produce - * the encrypted data. - * - * The {@link createCipheriv} method is - * used to create `Cipher` instances. `Cipher` objects are not to be created - * directly using the `new` keyword. - * - * Example: Using `Cipher` objects as streams: - * - * ```js - * const { - * scrypt, - * randomFill, - * createCipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * - * // First, we'll generate the key. The key length is dependent on the algorithm. - * // In this case for aes192, it is 24 bytes (192 bits). - * scrypt(password, 'salt', 24, (err, key) => { - * if (err) throw err; - * // Then, we'll generate a random initialization vector - * randomFill(new Uint8Array(16), (err, iv) => { - * if (err) throw err; - * - * // Once we have the key and iv, we can create and use the cipher... - * const cipher = createCipheriv(algorithm, key, iv); - * - * let encrypted = ''; - * cipher.setEncoding('hex'); - * - * cipher.on('data', (chunk) => encrypted += chunk); - * cipher.on('end', () => console.log(encrypted)); - * - * cipher.write('some clear text data'); - * cipher.end(); - * }); - * }); - * ``` - * - * Example: Using `Cipher` and piped streams: - * - * ```js - * import { - * createReadStream, - * createWriteStream, - * } from 'node:fs'; - * - * import { - * pipeline, - * } from 'node:stream'; - * - * const { - * scrypt, - * randomFill, - * createCipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * - * // First, we'll generate the key. The key length is dependent on the algorithm. - * // In this case for aes192, it is 24 bytes (192 bits). - * scrypt(password, 'salt', 24, (err, key) => { - * if (err) throw err; - * // Then, we'll generate a random initialization vector - * randomFill(new Uint8Array(16), (err, iv) => { - * if (err) throw err; - * - * const cipher = createCipheriv(algorithm, key, iv); - * - * const input = createReadStream('test.js'); - * const output = createWriteStream('test.enc'); - * - * pipeline(input, cipher, output, (err) => { - * if (err) throw err; - * }); - * }); - * }); - * ``` - * - * Example: Using the `cipher.update()` and `cipher.final()` methods: - * - * ```js - * const { - * scrypt, - * randomFill, - * createCipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * - * // First, we'll generate the key. The key length is dependent on the algorithm. - * // In this case for aes192, it is 24 bytes (192 bits). - * scrypt(password, 'salt', 24, (err, key) => { - * if (err) throw err; - * // Then, we'll generate a random initialization vector - * randomFill(new Uint8Array(16), (err, iv) => { - * if (err) throw err; - * - * const cipher = createCipheriv(algorithm, key, iv); - * - * let encrypted = cipher.update('some clear text data', 'utf8', 'hex'); - * encrypted += cipher.final('hex'); - * console.log(encrypted); - * }); - * }); - * ``` - * @since v0.1.94 - */ - class Cipher extends stream.Transform { - private constructor(); - /** - * Updates the cipher with `data`. If the `inputEncoding` argument is given, - * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or `DataView`. If `data` is a `Buffer`, - * `TypedArray`, or `DataView`, then `inputEncoding` is ignored. - * - * The `outputEncoding` specifies the output format of the enciphered - * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. - * - * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being - * thrown. - * @since v0.1.94 - * @param inputEncoding The `encoding` of the data. - * @param outputEncoding The `encoding` of the return value. - */ - update(data: BinaryLike): Buffer; - update(data: string, inputEncoding: Encoding): Buffer; - update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; - update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; - /** - * Once the `cipher.final()` method has been called, the `Cipher` object can no - * longer be used to encrypt data. Attempts to call `cipher.final()` more than - * once will result in an error being thrown. - * @since v0.1.94 - * @param outputEncoding The `encoding` of the return value. - * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. - */ - final(): Buffer; - final(outputEncoding: BufferEncoding): string; - /** - * When using block encryption algorithms, the `Cipher` class will automatically - * add padding to the input data to the appropriate block size. To disable the - * default padding call `cipher.setAutoPadding(false)`. - * - * When `autoPadding` is `false`, the length of the entire input data must be a - * multiple of the cipher's block size or `cipher.final()` will throw an error. - * Disabling automatic padding is useful for non-standard padding, for instance - * using `0x0` instead of PKCS padding. - * - * The `cipher.setAutoPadding()` method must be called before `cipher.final()`. - * @since v0.7.1 - * @param [autoPadding=true] - * @return for method chaining. - */ - setAutoPadding(autoPadding?: boolean): this; - } - interface CipherCCM extends Cipher { - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - getAuthTag(): Buffer; - } - interface CipherGCM extends Cipher { - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - getAuthTag(): Buffer; - } - interface CipherOCB extends Cipher { - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - getAuthTag(): Buffer; - } - /** - * Creates and returns a `Decipher` object that uses the given `algorithm`, `key` and initialization vector (`iv`). - * - * The `options` argument controls stream behavior and is optional except when a - * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the - * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength` option is not required but can be used to restrict accepted authentication tags - * to those with the specified length. - * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. - * - * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On - * recent OpenSSL releases, `openssl list -cipher-algorithms` will - * display the available cipher algorithms. - * - * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded - * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be - * a `KeyObject` of type `secret`. If the cipher does not need - * an initialization vector, `iv` may be `null`. - * - * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * Initialization vectors should be unpredictable and unique; ideally, they will be - * cryptographically random. They do not have to be secret: IVs are typically just - * added to ciphertext messages unencrypted. It may sound contradictory that - * something has to be unpredictable and unique, but does not have to be secret; - * remember that an attacker must not be able to predict ahead of time what a given - * IV will be. - * @since v0.1.94 - * @param options `stream.transform` options - */ - function createDecipheriv( - algorithm: CipherCCMTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherCCMOptions, - ): DecipherCCM; - function createDecipheriv( - algorithm: CipherOCBTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherOCBOptions, - ): DecipherOCB; - function createDecipheriv( - algorithm: CipherGCMTypes, - key: CipherKey, - iv: BinaryLike, - options?: CipherGCMOptions, - ): DecipherGCM; - function createDecipheriv( - algorithm: string, - key: CipherKey, - iv: BinaryLike | null, - options?: stream.TransformOptions, - ): Decipher; - /** - * Instances of the `Decipher` class are used to decrypt data. The class can be - * used in one of two ways: - * - * * As a `stream` that is both readable and writable, where plain encrypted - * data is written to produce unencrypted data on the readable side, or - * * Using the `decipher.update()` and `decipher.final()` methods to - * produce the unencrypted data. - * - * The {@link createDecipheriv} method is - * used to create `Decipher` instances. `Decipher` objects are not to be created - * directly using the `new` keyword. - * - * Example: Using `Decipher` objects as streams: - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * scryptSync, - * createDecipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * // Key length is dependent on the algorithm. In this case for aes192, it is - * // 24 bytes (192 bits). - * // Use the async `crypto.scrypt()` instead. - * const key = scryptSync(password, 'salt', 24); - * // The IV is usually passed along with the ciphertext. - * const iv = Buffer.alloc(16, 0); // Initialization vector. - * - * const decipher = createDecipheriv(algorithm, key, iv); - * - * let decrypted = ''; - * decipher.on('readable', () => { - * let chunk; - * while (null !== (chunk = decipher.read())) { - * decrypted += chunk.toString('utf8'); - * } - * }); - * decipher.on('end', () => { - * console.log(decrypted); - * // Prints: some clear text data - * }); - * - * // Encrypted with same algorithm, key and iv. - * const encrypted = - * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; - * decipher.write(encrypted, 'hex'); - * decipher.end(); - * ``` - * - * Example: Using `Decipher` and piped streams: - * - * ```js - * import { - * createReadStream, - * createWriteStream, - * } from 'node:fs'; - * import { Buffer } from 'node:buffer'; - * const { - * scryptSync, - * createDecipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * // Use the async `crypto.scrypt()` instead. - * const key = scryptSync(password, 'salt', 24); - * // The IV is usually passed along with the ciphertext. - * const iv = Buffer.alloc(16, 0); // Initialization vector. - * - * const decipher = createDecipheriv(algorithm, key, iv); - * - * const input = createReadStream('test.enc'); - * const output = createWriteStream('test.js'); - * - * input.pipe(decipher).pipe(output); - * ``` - * - * Example: Using the `decipher.update()` and `decipher.final()` methods: - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * scryptSync, - * createDecipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * // Use the async `crypto.scrypt()` instead. - * const key = scryptSync(password, 'salt', 24); - * // The IV is usually passed along with the ciphertext. - * const iv = Buffer.alloc(16, 0); // Initialization vector. - * - * const decipher = createDecipheriv(algorithm, key, iv); - * - * // Encrypted using same algorithm, key and iv. - * const encrypted = - * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; - * let decrypted = decipher.update(encrypted, 'hex', 'utf8'); - * decrypted += decipher.final('utf8'); - * console.log(decrypted); - * // Prints: some clear text data - * ``` - * @since v0.1.94 - */ - class Decipher extends stream.Transform { - private constructor(); - /** - * Updates the decipher with `data`. If the `inputEncoding` argument is given, - * the `data` argument is a string using the specified encoding. If the `inputEncoding` argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is - * ignored. - * - * The `outputEncoding` specifies the output format of the enciphered - * data. If the `outputEncoding` is specified, a string using the specified encoding is returned. If no `outputEncoding` is provided, a `Buffer` is returned. - * - * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error - * being thrown. - * @since v0.1.94 - * @param inputEncoding The `encoding` of the `data` string. - * @param outputEncoding The `encoding` of the return value. - */ - update(data: NodeJS.ArrayBufferView): Buffer; - update(data: string, inputEncoding: Encoding): Buffer; - update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; - update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; - /** - * Once the `decipher.final()` method has been called, the `Decipher` object can - * no longer be used to decrypt data. Attempts to call `decipher.final()` more - * than once will result in an error being thrown. - * @since v0.1.94 - * @param outputEncoding The `encoding` of the return value. - * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. - */ - final(): Buffer; - final(outputEncoding: BufferEncoding): string; - /** - * When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and - * removing padding. - * - * Turning auto padding off will only work if the input data's length is a - * multiple of the ciphers block size. - * - * The `decipher.setAutoPadding()` method must be called before `decipher.final()`. - * @since v0.7.1 - * @param [autoPadding=true] - * @return for method chaining. - */ - setAutoPadding(auto_padding?: boolean): this; - } - interface DecipherCCM extends Decipher { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - } - interface DecipherGCM extends Decipher { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - } - interface DecipherOCB extends Decipher { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - } - interface PrivateKeyInput { - key: string | Buffer; - format?: KeyFormat | undefined; - type?: "pkcs1" | "pkcs8" | "sec1" | undefined; - passphrase?: string | Buffer | undefined; - encoding?: string | undefined; - } - interface PublicKeyInput { - key: string | Buffer; - format?: KeyFormat | undefined; - type?: "pkcs1" | "spki" | undefined; - encoding?: string | undefined; - } - /** - * Asynchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. - * - * ```js - * const { - * generateKey, - * } = await import('node:crypto'); - * - * generateKey('hmac', { length: 512 }, (err, key) => { - * if (err) throw err; - * console.log(key.export().toString('hex')); // 46e..........620 - * }); - * ``` - * - * The size of a generated HMAC key should not exceed the block size of the - * underlying hash function. See {@link createHmac} for more information. - * @since v15.0.0 - * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. - */ - function generateKey( - type: "hmac" | "aes", - options: { - length: number; - }, - callback: (err: Error | null, key: KeyObject) => void, - ): void; - /** - * Synchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. - * - * ```js - * const { - * generateKeySync, - * } = await import('node:crypto'); - * - * const key = generateKeySync('hmac', { length: 512 }); - * console.log(key.export().toString('hex')); // e89..........41e - * ``` - * - * The size of a generated HMAC key should not exceed the block size of the - * underlying hash function. See {@link createHmac} for more information. - * @since v15.0.0 - * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. - */ - function generateKeySync( - type: "hmac" | "aes", - options: { - length: number; - }, - ): KeyObject; - interface JsonWebKeyInput { - key: JsonWebKey; - format: "jwk"; - } - /** - * Creates and returns a new key object containing a private key. If `key` is a - * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above. - * - * If the private key is encrypted, a `passphrase` must be specified. The length - * of the passphrase is limited to 1024 bytes. - * @since v11.6.0 - */ - function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject; - /** - * Creates and returns a new key object containing a public key. If `key` is a - * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject` with type `'private'`, the public key is derived from the given private key; - * otherwise, `key` must be an object with the properties described above. - * - * If the format is `'pem'`, the `'key'` may also be an X.509 certificate. - * - * Because public keys can be derived from private keys, a private key may be - * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the - * returned `KeyObject` will be `'public'` and that the private key cannot be - * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type `'private'` is given, a new `KeyObject` with type `'public'` will be returned - * and it will be impossible to extract the private key from the returned object. - * @since v11.6.0 - */ - function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject; - /** - * Creates and returns a new key object containing a secret key for symmetric - * encryption or `Hmac`. - * @since v11.6.0 - * @param encoding The string encoding when `key` is a string. - */ - function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject; - function createSecretKey(key: string, encoding: BufferEncoding): KeyObject; - /** - * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms. - * Optional `options` argument controls the `stream.Writable` behavior. - * - * In some cases, a `Sign` instance can be created using the name of a signature - * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use - * the corresponding digest algorithm. This does not work for all signature - * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest - * algorithm names. - * @since v0.1.92 - * @param options `stream.Writable` options - */ - function createSign(algorithm: string, options?: stream.WritableOptions): Sign; - type DSAEncoding = "der" | "ieee-p1363"; - interface SigningOptions { - /** - * @see crypto.constants.RSA_PKCS1_PADDING - */ - padding?: number | undefined; - saltLength?: number | undefined; - dsaEncoding?: DSAEncoding | undefined; - } - interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {} - interface SignKeyObjectInput extends SigningOptions { - key: KeyObject; - } - interface SignJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} - interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {} - interface VerifyKeyObjectInput extends SigningOptions { - key: KeyObject; - } - interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} - type KeyLike = string | Buffer | KeyObject; - /** - * The `Sign` class is a utility for generating signatures. It can be used in one - * of two ways: - * - * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or - * * Using the `sign.update()` and `sign.sign()` methods to produce the - * signature. - * - * The {@link createSign} method is used to create `Sign` instances. The - * argument is the string name of the hash function to use. `Sign` objects are not - * to be created directly using the `new` keyword. - * - * Example: Using `Sign` and `Verify` objects as streams: - * - * ```js - * const { - * generateKeyPairSync, - * createSign, - * createVerify, - * } = await import('node:crypto'); - * - * const { privateKey, publicKey } = generateKeyPairSync('ec', { - * namedCurve: 'sect239k1', - * }); - * - * const sign = createSign('SHA256'); - * sign.write('some data to sign'); - * sign.end(); - * const signature = sign.sign(privateKey, 'hex'); - * - * const verify = createVerify('SHA256'); - * verify.write('some data to sign'); - * verify.end(); - * console.log(verify.verify(publicKey, signature, 'hex')); - * // Prints: true - * ``` - * - * Example: Using the `sign.update()` and `verify.update()` methods: - * - * ```js - * const { - * generateKeyPairSync, - * createSign, - * createVerify, - * } = await import('node:crypto'); - * - * const { privateKey, publicKey } = generateKeyPairSync('rsa', { - * modulusLength: 2048, - * }); - * - * const sign = createSign('SHA256'); - * sign.update('some data to sign'); - * sign.end(); - * const signature = sign.sign(privateKey); - * - * const verify = createVerify('SHA256'); - * verify.update('some data to sign'); - * verify.end(); - * console.log(verify.verify(publicKey, signature)); - * // Prints: true - * ``` - * @since v0.1.92 - */ - class Sign extends stream.Writable { - private constructor(); - /** - * Updates the `Sign` content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `encoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.92 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): this; - update(data: string, inputEncoding: Encoding): this; - /** - * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`. - * - * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an - * object, the following additional properties can be passed: - * - * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned. - * - * The `Sign` object can not be again used after `sign.sign()` method has been - * called. Multiple calls to `sign.sign()` will result in an error being thrown. - * @since v0.1.92 - */ - sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): Buffer; - sign( - privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, - outputFormat: BinaryToTextEncoding, - ): string; - } - /** - * Creates and returns a `Verify` object that uses the given algorithm. - * Use {@link getHashes} to obtain an array of names of the available - * signing algorithms. Optional `options` argument controls the `stream.Writable` behavior. - * - * In some cases, a `Verify` instance can be created using the name of a signature - * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use - * the corresponding digest algorithm. This does not work for all signature - * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest - * algorithm names. - * @since v0.1.92 - * @param options `stream.Writable` options - */ - function createVerify(algorithm: string, options?: stream.WritableOptions): Verify; - /** - * The `Verify` class is a utility for verifying signatures. It can be used in one - * of two ways: - * - * * As a writable `stream` where written data is used to validate against the - * supplied signature, or - * * Using the `verify.update()` and `verify.verify()` methods to verify - * the signature. - * - * The {@link createVerify} method is used to create `Verify` instances. `Verify` objects are not to be created directly using the `new` keyword. - * - * See `Sign` for examples. - * @since v0.1.92 - */ - class Verify extends stream.Writable { - private constructor(); - /** - * Updates the `Verify` content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `inputEncoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or `DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.92 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): Verify; - update(data: string, inputEncoding: Encoding): Verify; - /** - * Verifies the provided data using the given `object` and `signature`. - * - * If `object` is not a `KeyObject`, this function behaves as if `object` had been passed to {@link createPublicKey}. If it is an - * object, the following additional properties can be passed: - * - * The `signature` argument is the previously calculated signature for the data, in - * the `signatureEncoding`. - * If a `signatureEncoding` is specified, the `signature` is expected to be a - * string; otherwise `signature` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * The `verify` object can not be used again after `verify.verify()` has been - * called. Multiple calls to `verify.verify()` will result in an error being - * thrown. - * - * Because public keys can be derived from private keys, a private key may - * be passed instead of a public key. - * @since v0.1.92 - */ - verify( - object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: NodeJS.ArrayBufferView, - ): boolean; - verify( - object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: string, - signature_format?: BinaryToTextEncoding, - ): boolean; - } - /** - * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an - * optional specific `generator`. - * - * The `generator` argument can be a number, string, or `Buffer`. If `generator` is not specified, the value `2` is used. - * - * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise - * a `Buffer`, `TypedArray`, or `DataView` is expected. - * - * If `generatorEncoding` is specified, `generator` is expected to be a string; - * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected. - * @since v0.11.12 - * @param primeEncoding The `encoding` of the `prime` string. - * @param [generator=2] - * @param generatorEncoding The `encoding` of the `generator` string. - */ - function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman; - function createDiffieHellman( - prime: ArrayBuffer | NodeJS.ArrayBufferView, - generator?: number | ArrayBuffer | NodeJS.ArrayBufferView, - ): DiffieHellman; - function createDiffieHellman( - prime: ArrayBuffer | NodeJS.ArrayBufferView, - generator: string, - generatorEncoding: BinaryToTextEncoding, - ): DiffieHellman; - function createDiffieHellman( - prime: string, - primeEncoding: BinaryToTextEncoding, - generator?: number | ArrayBuffer | NodeJS.ArrayBufferView, - ): DiffieHellman; - function createDiffieHellman( - prime: string, - primeEncoding: BinaryToTextEncoding, - generator: string, - generatorEncoding: BinaryToTextEncoding, - ): DiffieHellman; - /** - * The `DiffieHellman` class is a utility for creating Diffie-Hellman key - * exchanges. - * - * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function. - * - * ```js - * import assert from 'node:assert'; - * - * const { - * createDiffieHellman, - * } = await import('node:crypto'); - * - * // Generate Alice's keys... - * const alice = createDiffieHellman(2048); - * const aliceKey = alice.generateKeys(); - * - * // Generate Bob's keys... - * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator()); - * const bobKey = bob.generateKeys(); - * - * // Exchange and generate the secret... - * const aliceSecret = alice.computeSecret(bobKey); - * const bobSecret = bob.computeSecret(aliceKey); - * - * // OK - * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); - * ``` - * @since v0.5.0 - */ - class DiffieHellman { - private constructor(); - /** - * Generates private and public Diffie-Hellman key values unless they have been - * generated or computed already, and returns - * the public key in the specified `encoding`. This key should be - * transferred to the other party. - * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. - * - * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular, - * once a private key has been generated or set, calling this function only updates - * the public key but does not generate a new private key. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - generateKeys(): Buffer; - generateKeys(encoding: BinaryToTextEncoding): string; - /** - * Computes the shared secret using `otherPublicKey` as the other - * party's public key and returns the computed shared secret. The supplied - * key is interpreted using the specified `inputEncoding`, and secret is - * encoded using specified `outputEncoding`. - * If the `inputEncoding` is not - * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned. - * @since v0.5.0 - * @param inputEncoding The `encoding` of an `otherPublicKey` string. - * @param outputEncoding The `encoding` of the return value. - */ - computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding?: null, outputEncoding?: null): Buffer; - computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer; - computeSecret( - otherPublicKey: NodeJS.ArrayBufferView, - inputEncoding: null, - outputEncoding: BinaryToTextEncoding, - ): string; - computeSecret( - otherPublicKey: string, - inputEncoding: BinaryToTextEncoding, - outputEncoding: BinaryToTextEncoding, - ): string; - /** - * Returns the Diffie-Hellman prime in the specified `encoding`. - * If `encoding` is provided a string is - * returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getPrime(): Buffer; - getPrime(encoding: BinaryToTextEncoding): string; - /** - * Returns the Diffie-Hellman generator in the specified `encoding`. - * If `encoding` is provided a string is - * returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getGenerator(): Buffer; - getGenerator(encoding: BinaryToTextEncoding): string; - /** - * Returns the Diffie-Hellman public key in the specified `encoding`. - * If `encoding` is provided a - * string is returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getPublicKey(): Buffer; - getPublicKey(encoding: BinaryToTextEncoding): string; - /** - * Returns the Diffie-Hellman private key in the specified `encoding`. - * If `encoding` is provided a - * string is returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getPrivateKey(): Buffer; - getPrivateKey(encoding: BinaryToTextEncoding): string; - /** - * Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected - * to be a string. If no `encoding` is provided, `publicKey` is expected - * to be a `Buffer`, `TypedArray`, or `DataView`. - * @since v0.5.0 - * @param encoding The `encoding` of the `publicKey` string. - */ - setPublicKey(publicKey: NodeJS.ArrayBufferView): void; - setPublicKey(publicKey: string, encoding: BufferEncoding): void; - /** - * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected - * to be a string. If no `encoding` is provided, `privateKey` is expected - * to be a `Buffer`, `TypedArray`, or `DataView`. - * - * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be - * used to manually provide the public key or to automatically derive it. - * @since v0.5.0 - * @param encoding The `encoding` of the `privateKey` string. - */ - setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; - setPrivateKey(privateKey: string, encoding: BufferEncoding): void; - /** - * A bit field containing any warnings and/or errors resulting from a check - * performed during initialization of the `DiffieHellman` object. - * - * The following values are valid for this property (as defined in `node:constants` module): - * - * * `DH_CHECK_P_NOT_SAFE_PRIME` - * * `DH_CHECK_P_NOT_PRIME` - * * `DH_UNABLE_TO_CHECK_GENERATOR` - * * `DH_NOT_SUITABLE_GENERATOR` - * @since v0.11.12 - */ - verifyError: number; - } - /** - * The `DiffieHellmanGroup` class takes a well-known modp group as its argument. - * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation. - * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods. - * - * ```js - * const { createDiffieHellmanGroup } = await import('node:crypto'); - * const dh = createDiffieHellmanGroup('modp1'); - * ``` - * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt): - * ```bash - * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h - * modp1 # 768 bits - * modp2 # 1024 bits - * modp5 # 1536 bits - * modp14 # 2048 bits - * modp15 # etc. - * modp16 - * modp17 - * modp18 - * ``` - * @since v0.7.5 - */ - const DiffieHellmanGroup: DiffieHellmanGroupConstructor; - interface DiffieHellmanGroupConstructor { - new(name: string): DiffieHellmanGroup; - (name: string): DiffieHellmanGroup; - readonly prototype: DiffieHellmanGroup; - } - type DiffieHellmanGroup = Omit; - /** - * Creates a predefined `DiffieHellmanGroup` key exchange object. The - * supported groups are listed in the documentation for `DiffieHellmanGroup`. - * - * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing - * the keys (with `diffieHellman.setPublicKey()`, for example). The - * advantage of using this method is that the parties do not have to - * generate nor exchange a group modulus beforehand, saving both processor - * and communication time. - * - * Example (obtaining a shared secret): - * - * ```js - * const { - * getDiffieHellman, - * } = await import('node:crypto'); - * const alice = getDiffieHellman('modp14'); - * const bob = getDiffieHellman('modp14'); - * - * alice.generateKeys(); - * bob.generateKeys(); - * - * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); - * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); - * - * // aliceSecret and bobSecret should be the same - * console.log(aliceSecret === bobSecret); - * ``` - * @since v0.7.5 - */ - function getDiffieHellman(groupName: string): DiffieHellmanGroup; - /** - * An alias for {@link getDiffieHellman} - * @since v0.9.3 - */ - function createDiffieHellmanGroup(name: string): DiffieHellmanGroup; - /** - * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) - * implementation. A selected HMAC digest algorithm specified by `digest` is - * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. - * - * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an error occurs while deriving the key, `err` will be set; - * otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a `Buffer`. An error will be - * thrown if any of the input arguments specify invalid values or types. - * - * The `iterations` argument must be a number set as high as possible. The - * higher the number of iterations, the more secure the derived key will be, - * but will take a longer amount of time to complete. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * ```js - * const { - * pbkdf2, - * } = await import('node:crypto'); - * - * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' - * }); - * ``` - * - * An array of supported digest functions can be retrieved using {@link getHashes}. - * - * This API uses libuv's threadpool, which can have surprising and - * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. - * @since v0.5.5 - */ - function pbkdf2( - password: BinaryLike, - salt: BinaryLike, - iterations: number, - keylen: number, - digest: string, - callback: (err: Error | null, derivedKey: Buffer) => void, - ): void; - /** - * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) - * implementation. A selected HMAC digest algorithm specified by `digest` is - * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. - * - * If an error occurs an `Error` will be thrown, otherwise the derived key will be - * returned as a `Buffer`. - * - * The `iterations` argument must be a number set as high as possible. The - * higher the number of iterations, the more secure the derived key will be, - * but will take a longer amount of time to complete. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * ```js - * const { - * pbkdf2Sync, - * } = await import('node:crypto'); - * - * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); - * console.log(key.toString('hex')); // '3745e48...08d59ae' - * ``` - * - * An array of supported digest functions can be retrieved using {@link getHashes}. - * @since v0.9.3 - */ - function pbkdf2Sync( - password: BinaryLike, - salt: BinaryLike, - iterations: number, - keylen: number, - digest: string, - ): Buffer; - /** - * Generates cryptographically strong pseudorandom data. The `size` argument - * is a number indicating the number of bytes to generate. - * - * If a `callback` function is provided, the bytes are generated asynchronously - * and the `callback` function is invoked with two arguments: `err` and `buf`. - * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The `buf` argument is a `Buffer` containing the generated bytes. - * - * ```js - * // Asynchronous - * const { - * randomBytes, - * } = await import('node:crypto'); - * - * randomBytes(256, (err, buf) => { - * if (err) throw err; - * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`); - * }); - * ``` - * - * If the `callback` function is not provided, the random bytes are generated - * synchronously and returned as a `Buffer`. An error will be thrown if - * there is a problem generating the bytes. - * - * ```js - * // Synchronous - * const { - * randomBytes, - * } = await import('node:crypto'); - * - * const buf = randomBytes(256); - * console.log( - * `${buf.length} bytes of random data: ${buf.toString('hex')}`); - * ``` - * - * The `crypto.randomBytes()` method will not complete until there is - * sufficient entropy available. - * This should normally never take longer than a few milliseconds. The only time - * when generating the random bytes may conceivably block for a longer period of - * time is right after boot, when the whole system is still low on entropy. - * - * This API uses libuv's threadpool, which can have surprising and - * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. - * - * The asynchronous version of `crypto.randomBytes()` is carried out in a single - * threadpool request. To minimize threadpool task length variation, partition - * large `randomBytes` requests when doing so as part of fulfilling a client - * request. - * @since v0.5.8 - * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`. - * @return if the `callback` function is not provided. - */ - function randomBytes(size: number): Buffer; - function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; - function pseudoRandomBytes(size: number): Buffer; - function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; - /** - * Return a random integer `n` such that `min <= n < max`. This - * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias). - * - * The range (`max - min`) must be less than 2**48. `min` and `max` must - * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). - * - * If the `callback` function is not provided, the random integer is - * generated synchronously. - * - * ```js - * // Asynchronous - * const { - * randomInt, - * } = await import('node:crypto'); - * - * randomInt(3, (err, n) => { - * if (err) throw err; - * console.log(`Random number chosen from (0, 1, 2): ${n}`); - * }); - * ``` - * - * ```js - * // Synchronous - * const { - * randomInt, - * } = await import('node:crypto'); - * - * const n = randomInt(3); - * console.log(`Random number chosen from (0, 1, 2): ${n}`); - * ``` - * - * ```js - * // With `min` argument - * const { - * randomInt, - * } = await import('node:crypto'); - * - * const n = randomInt(1, 7); - * console.log(`The dice rolled: ${n}`); - * ``` - * @since v14.10.0, v12.19.0 - * @param [min=0] Start of random range (inclusive). - * @param max End of random range (exclusive). - * @param callback `function(err, n) {}`. - */ - function randomInt(max: number): number; - function randomInt(min: number, max: number): number; - function randomInt(max: number, callback: (err: Error | null, value: number) => void): void; - function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void; - /** - * Synchronous version of {@link randomFill}. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFillSync } = await import('node:crypto'); - * - * const buf = Buffer.alloc(10); - * console.log(randomFillSync(buf).toString('hex')); - * - * randomFillSync(buf, 5); - * console.log(buf.toString('hex')); - * - * // The above is equivalent to the following: - * randomFillSync(buf, 5, 5); - * console.log(buf.toString('hex')); - * ``` - * - * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFillSync } = await import('node:crypto'); - * - * const a = new Uint32Array(10); - * console.log(Buffer.from(randomFillSync(a).buffer, - * a.byteOffset, a.byteLength).toString('hex')); - * - * const b = new DataView(new ArrayBuffer(10)); - * console.log(Buffer.from(randomFillSync(b).buffer, - * b.byteOffset, b.byteLength).toString('hex')); - * - * const c = new ArrayBuffer(10); - * console.log(Buffer.from(randomFillSync(c)).toString('hex')); - * ``` - * @since v7.10.0, v6.13.0 - * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. - * @param [offset=0] - * @param [size=buffer.length - offset] - * @return The object passed as `buffer` argument. - */ - function randomFillSync(buffer: T, offset?: number, size?: number): T; - /** - * This function is similar to {@link randomBytes} but requires the first - * argument to be a `Buffer` that will be filled. It also - * requires that a callback is passed in. - * - * If the `callback` function is not provided, an error will be thrown. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFill } = await import('node:crypto'); - * - * const buf = Buffer.alloc(10); - * randomFill(buf, (err, buf) => { - * if (err) throw err; - * console.log(buf.toString('hex')); - * }); - * - * randomFill(buf, 5, (err, buf) => { - * if (err) throw err; - * console.log(buf.toString('hex')); - * }); - * - * // The above is equivalent to the following: - * randomFill(buf, 5, 5, (err, buf) => { - * if (err) throw err; - * console.log(buf.toString('hex')); - * }); - * ``` - * - * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as `buffer`. - * - * While this includes instances of `Float32Array` and `Float64Array`, this - * function should not be used to generate random floating-point numbers. The - * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array - * contains finite numbers only, they are not drawn from a uniform random - * distribution and have no meaningful lower or upper bounds. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFill } = await import('node:crypto'); - * - * const a = new Uint32Array(10); - * randomFill(a, (err, buf) => { - * if (err) throw err; - * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) - * .toString('hex')); - * }); - * - * const b = new DataView(new ArrayBuffer(10)); - * randomFill(b, (err, buf) => { - * if (err) throw err; - * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) - * .toString('hex')); - * }); - * - * const c = new ArrayBuffer(10); - * randomFill(c, (err, buf) => { - * if (err) throw err; - * console.log(Buffer.from(buf).toString('hex')); - * }); - * ``` - * - * This API uses libuv's threadpool, which can have surprising and - * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. - * - * The asynchronous version of `crypto.randomFill()` is carried out in a single - * threadpool request. To minimize threadpool task length variation, partition - * large `randomFill` requests when doing so as part of fulfilling a client - * request. - * @since v7.10.0, v6.13.0 - * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. - * @param [offset=0] - * @param [size=buffer.length - offset] - * @param callback `function(err, buf) {}`. - */ - function randomFill( - buffer: T, - callback: (err: Error | null, buf: T) => void, - ): void; - function randomFill( - buffer: T, - offset: number, - callback: (err: Error | null, buf: T) => void, - ): void; - function randomFill( - buffer: T, - offset: number, - size: number, - callback: (err: Error | null, buf: T) => void, - ): void; - interface ScryptOptions { - cost?: number | undefined; - blockSize?: number | undefined; - parallelization?: number | undefined; - N?: number | undefined; - r?: number | undefined; - p?: number | undefined; - maxmem?: number | undefined; - } - /** - * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based - * key derivation function that is designed to be expensive computationally and - * memory-wise in order to make brute-force attacks unrewarding. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * The `callback` function is called with two arguments: `err` and `derivedKey`. `err` is an exception object when key derivation fails, otherwise `err` is `null`. `derivedKey` is passed to the - * callback as a `Buffer`. - * - * An exception is thrown when any of the input arguments specify invalid values - * or types. - * - * ```js - * const { - * scrypt, - * } = await import('node:crypto'); - * - * // Using the factory defaults. - * scrypt('password', 'salt', 64, (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' - * }); - * // Using a custom N parameter. Must be a power of two. - * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' - * }); - * ``` - * @since v10.5.0 - */ - function scrypt( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - callback: (err: Error | null, derivedKey: Buffer) => void, - ): void; - function scrypt( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - options: ScryptOptions, - callback: (err: Error | null, derivedKey: Buffer) => void, - ): void; - /** - * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based - * key derivation function that is designed to be expensive computationally and - * memory-wise in order to make brute-force attacks unrewarding. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * An exception is thrown when key derivation fails, otherwise the derived key is - * returned as a `Buffer`. - * - * An exception is thrown when any of the input arguments specify invalid values - * or types. - * - * ```js - * const { - * scryptSync, - * } = await import('node:crypto'); - * // Using the factory defaults. - * - * const key1 = scryptSync('password', 'salt', 64); - * console.log(key1.toString('hex')); // '3745e48...08d59ae' - * // Using a custom N parameter. Must be a power of two. - * const key2 = scryptSync('password', 'salt', 64, { N: 1024 }); - * console.log(key2.toString('hex')); // '3745e48...aa39b34' - * ``` - * @since v10.5.0 - */ - function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer; - interface RsaPublicKey { - key: KeyLike; - padding?: number | undefined; - } - interface RsaPrivateKey { - key: KeyLike; - passphrase?: string | undefined; - /** - * @default 'sha1' - */ - oaepHash?: string | undefined; - oaepLabel?: NodeJS.TypedArray | undefined; - padding?: number | undefined; - } - /** - * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using - * the corresponding private key, for example using {@link privateDecrypt}. - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. - * - * Because RSA public keys can be derived from private keys, a private key may - * be passed instead of a public key. - * @since v0.11.14 - */ - function publicEncrypt( - key: RsaPublicKey | RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView | string, - ): Buffer; - /** - * Decrypts `buffer` with `key`.`buffer` was previously encrypted using - * the corresponding private key, for example using {@link privateEncrypt}. - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. - * - * Because RSA public keys can be derived from private keys, a private key may - * be passed instead of a public key. - * @since v1.1.0 - */ - function publicDecrypt( - key: RsaPublicKey | RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView | string, - ): Buffer; - /** - * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using - * the corresponding public key, for example using {@link publicEncrypt}. - * - * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. - * @since v0.11.14 - */ - function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView | string): Buffer; - /** - * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using - * the corresponding public key, for example using {@link publicDecrypt}. - * - * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. - * @since v1.1.0 - */ - function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView | string): Buffer; - /** - * ```js - * const { - * getCiphers, - * } = await import('node:crypto'); - * - * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...] - * ``` - * @since v0.9.3 - * @return An array with the names of the supported cipher algorithms. - */ - function getCiphers(): string[]; - /** - * ```js - * const { - * getCurves, - * } = await import('node:crypto'); - * - * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...] - * ``` - * @since v2.3.0 - * @return An array with the names of the supported elliptic curves. - */ - function getCurves(): string[]; - /** - * @since v10.0.0 - * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}. - */ - function getFips(): 1 | 0; - /** - * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. - * Throws an error if FIPS mode is not available. - * @since v10.0.0 - * @param bool `true` to enable FIPS mode. - */ - function setFips(bool: boolean): void; - /** - * ```js - * const { - * getHashes, - * } = await import('node:crypto'); - * - * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...] - * ``` - * @since v0.9.3 - * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms. - */ - function getHashes(): string[]; - /** - * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH) - * key exchanges. - * - * Instances of the `ECDH` class can be created using the {@link createECDH} function. - * - * ```js - * import assert from 'node:assert'; - * - * const { - * createECDH, - * } = await import('node:crypto'); - * - * // Generate Alice's keys... - * const alice = createECDH('secp521r1'); - * const aliceKey = alice.generateKeys(); - * - * // Generate Bob's keys... - * const bob = createECDH('secp521r1'); - * const bobKey = bob.generateKeys(); - * - * // Exchange and generate the secret... - * const aliceSecret = alice.computeSecret(bobKey); - * const bobSecret = bob.computeSecret(aliceKey); - * - * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); - * // OK - * ``` - * @since v0.11.14 - */ - class ECDH { - private constructor(); - /** - * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the - * format specified by `format`. The `format` argument specifies point encoding - * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is - * interpreted using the specified `inputEncoding`, and the returned key is encoded - * using the specified `outputEncoding`. - * - * Use {@link getCurves} to obtain a list of available curve names. - * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display - * the name and description of each available elliptic curve. - * - * If `format` is not specified the point will be returned in `'uncompressed'` format. - * - * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * Example (uncompressing a key): - * - * ```js - * const { - * createECDH, - * ECDH, - * } = await import('node:crypto'); - * - * const ecdh = createECDH('secp256k1'); - * ecdh.generateKeys(); - * - * const compressedKey = ecdh.getPublicKey('hex', 'compressed'); - * - * const uncompressedKey = ECDH.convertKey(compressedKey, - * 'secp256k1', - * 'hex', - * 'hex', - * 'uncompressed'); - * - * // The converted key and the uncompressed public key should be the same - * console.log(uncompressedKey === ecdh.getPublicKey('hex')); - * ``` - * @since v10.0.0 - * @param inputEncoding The `encoding` of the `key` string. - * @param outputEncoding The `encoding` of the return value. - * @param [format='uncompressed'] - */ - static convertKey( - key: BinaryLike, - curve: string, - inputEncoding?: BinaryToTextEncoding, - outputEncoding?: "latin1" | "hex" | "base64" | "base64url", - format?: "uncompressed" | "compressed" | "hybrid", - ): Buffer | string; - /** - * Generates private and public EC Diffie-Hellman key values, and returns - * the public key in the specified `format` and `encoding`. This key should be - * transferred to the other party. - * - * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format. - * - * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. - * @since v0.11.14 - * @param encoding The `encoding` of the return value. - * @param [format='uncompressed'] - */ - generateKeys(): Buffer; - generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; - /** - * Computes the shared secret using `otherPublicKey` as the other - * party's public key and returns the computed shared secret. The supplied - * key is interpreted using specified `inputEncoding`, and the returned secret - * is encoded using the specified `outputEncoding`. - * If the `inputEncoding` is not - * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned. - * - * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey` lies outside of the elliptic curve. Since `otherPublicKey` is - * usually supplied from a remote user over an insecure network, - * be sure to handle this exception accordingly. - * @since v0.11.14 - * @param inputEncoding The `encoding` of the `otherPublicKey` string. - * @param outputEncoding The `encoding` of the return value. - */ - computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer; - computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer; - computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string; - computeSecret( - otherPublicKey: string, - inputEncoding: BinaryToTextEncoding, - outputEncoding: BinaryToTextEncoding, - ): string; - /** - * If `encoding` is specified, a string is returned; otherwise a `Buffer` is - * returned. - * @since v0.11.14 - * @param encoding The `encoding` of the return value. - * @return The EC Diffie-Hellman in the specified `encoding`. - */ - getPrivateKey(): Buffer; - getPrivateKey(encoding: BinaryToTextEncoding): string; - /** - * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format. - * - * If `encoding` is specified, a string is returned; otherwise a `Buffer` is - * returned. - * @since v0.11.14 - * @param encoding The `encoding` of the return value. - * @param [format='uncompressed'] - * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`. - */ - getPublicKey(encoding?: null, format?: ECDHKeyFormat): Buffer; - getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; - /** - * Sets the EC Diffie-Hellman private key. - * If `encoding` is provided, `privateKey` is expected - * to be a string; otherwise `privateKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * If `privateKey` is not valid for the curve specified when the `ECDH` object was - * created, an error is thrown. Upon setting the private key, the associated - * public point (key) is also generated and set in the `ECDH` object. - * @since v0.11.14 - * @param encoding The `encoding` of the `privateKey` string. - */ - setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; - setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void; - } - /** - * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a - * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent - * OpenSSL releases, `openssl ecparam -list_curves` will also display the name - * and description of each available elliptic curve. - * @since v0.11.14 - */ - function createECDH(curveName: string): ECDH; - /** - * This function compares the underlying bytes that represent the given `ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time - * algorithm. - * - * This function does not leak timing information that - * would allow an attacker to guess one of the values. This is suitable for - * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). - * - * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they - * must have the same byte length. An error is thrown if `a` and `b` have - * different byte lengths. - * - * If at least one of `a` and `b` is a `TypedArray` with more than one byte per - * entry, such as `Uint16Array`, the result will be computed using the platform - * byte order. - * - * **When both of the inputs are `Float32Array`s or `Float64Array`s, this function might return unexpected results due to IEEE 754** - * **encoding of floating-point numbers. In particular, neither `x === y` nor `Object.is(x, y)` implies that the byte representations of two floating-point** - * **numbers `x` and `y` are equal.** - * - * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code - * is timing-safe. Care should be taken to ensure that the surrounding code does - * not introduce timing vulnerabilities. - * @since v6.6.0 - */ - function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean; - type KeyType = "rsa" | "rsa-pss" | "dsa" | "ec" | "ed25519" | "ed448" | "x25519" | "x448"; - type KeyFormat = "pem" | "der" | "jwk"; - interface BasePrivateKeyEncodingOptions { - format: T; - cipher?: string | undefined; - passphrase?: string | undefined; - } - interface KeyPairKeyObjectResult { - publicKey: KeyObject; - privateKey: KeyObject; - } - interface ED25519KeyPairKeyObjectOptions {} - interface ED448KeyPairKeyObjectOptions {} - interface X25519KeyPairKeyObjectOptions {} - interface X448KeyPairKeyObjectOptions {} - interface ECKeyPairKeyObjectOptions { - /** - * Name of the curve to use - */ - namedCurve: string; - /** - * Must be `'named'` or `'explicit'`. Default: `'named'`. - */ - paramEncoding?: "explicit" | "named" | undefined; - } - interface RSAKeyPairKeyObjectOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Public exponent - * @default 0x10001 - */ - publicExponent?: number | undefined; - } - interface RSAPSSKeyPairKeyObjectOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Public exponent - * @default 0x10001 - */ - publicExponent?: number | undefined; - /** - * Name of the message digest - */ - hashAlgorithm?: string; - /** - * Name of the message digest used by MGF1 - */ - mgf1HashAlgorithm?: string; - /** - * Minimal salt length in bytes - */ - saltLength?: string; - } - interface DSAKeyPairKeyObjectOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Size of q in bits - */ - divisorLength: number; - } - interface RSAKeyPairOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Public exponent - * @default 0x10001 - */ - publicExponent?: number | undefined; - publicKeyEncoding: { - type: "pkcs1" | "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs1" | "pkcs8"; - }; - } - interface RSAPSSKeyPairOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Public exponent - * @default 0x10001 - */ - publicExponent?: number | undefined; - /** - * Name of the message digest - */ - hashAlgorithm?: string; - /** - * Name of the message digest used by MGF1 - */ - mgf1HashAlgorithm?: string; - /** - * Minimal salt length in bytes - */ - saltLength?: string; - publicKeyEncoding: { - type: "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs8"; - }; - } - interface DSAKeyPairOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Size of q in bits - */ - divisorLength: number; - publicKeyEncoding: { - type: "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs8"; - }; - } - interface ECKeyPairOptions extends ECKeyPairKeyObjectOptions { - publicKeyEncoding: { - type: "pkcs1" | "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "sec1" | "pkcs8"; - }; - } - interface ED25519KeyPairOptions { - publicKeyEncoding: { - type: "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs8"; - }; - } - interface ED448KeyPairOptions { - publicKeyEncoding: { - type: "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs8"; - }; - } - interface X25519KeyPairOptions { - publicKeyEncoding: { - type: "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs8"; - }; - } - interface X448KeyPairOptions { - publicKeyEncoding: { - type: "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs8"; - }; - } - interface KeyPairSyncResult { - publicKey: T1; - privateKey: T2; - } - /** - * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, - * Ed25519, Ed448, X25519, X448, and DH are currently supported. - * - * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function - * behaves as if `keyObject.export()` had been called on its result. Otherwise, - * the respective part of the key is returned as a `KeyObject`. - * - * When encoding public keys, it is recommended to use `'spki'`. When encoding - * private keys, it is recommended to use `'pkcs8'` with a strong passphrase, - * and to keep the passphrase confidential. - * - * ```js - * const { - * generateKeyPairSync, - * } = await import('node:crypto'); - * - * const { - * publicKey, - * privateKey, - * } = generateKeyPairSync('rsa', { - * modulusLength: 4096, - * publicKeyEncoding: { - * type: 'spki', - * format: 'pem', - * }, - * privateKeyEncoding: { - * type: 'pkcs8', - * format: 'pem', - * cipher: 'aes-256-cbc', - * passphrase: 'top secret', - * }, - * }); - * ``` - * - * The return value `{ publicKey, privateKey }` represents the generated key pair. - * When PEM encoding was selected, the respective key will be a string, otherwise - * it will be a buffer containing the data encoded as DER. - * @since v10.12.0 - * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`. - */ - function generateKeyPairSync( - type: "rsa", - options: RSAKeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "rsa", - options: RSAKeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "rsa", - options: RSAKeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "rsa", - options: RSAKeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "rsa", options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "rsa-pss", options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "dsa", - options: DSAKeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "dsa", - options: DSAKeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "dsa", - options: DSAKeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "dsa", - options: DSAKeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "dsa", options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "ec", - options: ECKeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ec", - options: ECKeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ec", - options: ECKeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ec", - options: ECKeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "ec", options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "ed25519", - options: ED25519KeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ed25519", - options: ED25519KeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ed25519", - options: ED25519KeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ed25519", - options: ED25519KeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "ed25519", options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "ed448", - options: ED448KeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ed448", - options: ED448KeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ed448", - options: ED448KeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ed448", - options: ED448KeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "ed448", options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "x25519", - options: X25519KeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "x25519", - options: X25519KeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "x25519", - options: X25519KeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "x25519", - options: X25519KeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "x25519", options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "x448", - options: X448KeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "x448", - options: X448KeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "x448", - options: X448KeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "x448", - options: X448KeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "x448", options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult; - /** - * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, - * Ed25519, Ed448, X25519, X448, and DH are currently supported. - * - * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function - * behaves as if `keyObject.export()` had been called on its result. Otherwise, - * the respective part of the key is returned as a `KeyObject`. - * - * It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage: - * - * ```js - * const { - * generateKeyPair, - * } = await import('node:crypto'); - * - * generateKeyPair('rsa', { - * modulusLength: 4096, - * publicKeyEncoding: { - * type: 'spki', - * format: 'pem', - * }, - * privateKeyEncoding: { - * type: 'pkcs8', - * format: 'pem', - * cipher: 'aes-256-cbc', - * passphrase: 'top secret', - * }, - * }, (err, publicKey, privateKey) => { - * // Handle errors and use the generated key pair. - * }); - * ``` - * - * On completion, `callback` will be called with `err` set to `undefined` and `publicKey` / `privateKey` representing the generated key pair. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a `Promise` for an `Object` with `publicKey` and `privateKey` properties. - * @since v10.12.0 - * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`. - */ - function generateKeyPair( - type: "rsa", - options: RSAKeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "rsa", - options: RSAKeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "rsa", - options: RSAKeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "rsa", - options: RSAKeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "rsa", - options: RSAKeyPairKeyObjectOptions, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "rsa-pss", - options: RSAPSSKeyPairKeyObjectOptions, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "dsa", - options: DSAKeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "dsa", - options: DSAKeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "dsa", - options: DSAKeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "dsa", - options: DSAKeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "dsa", - options: DSAKeyPairKeyObjectOptions, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "ec", - options: ECKeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "ec", - options: ECKeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "ec", - options: ECKeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "ec", - options: ECKeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "ec", - options: ECKeyPairKeyObjectOptions, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "ed25519", - options: ED25519KeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "ed25519", - options: ED25519KeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "ed25519", - options: ED25519KeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "ed25519", - options: ED25519KeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "ed25519", - options: ED25519KeyPairKeyObjectOptions | undefined, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "ed448", - options: ED448KeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "ed448", - options: ED448KeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "ed448", - options: ED448KeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "ed448", - options: ED448KeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "ed448", - options: ED448KeyPairKeyObjectOptions | undefined, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "x25519", - options: X25519KeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "x25519", - options: X25519KeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "x25519", - options: X25519KeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "x25519", - options: X25519KeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "x25519", - options: X25519KeyPairKeyObjectOptions | undefined, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "x448", - options: X448KeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "x448", - options: X448KeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "x448", - options: X448KeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "x448", - options: X448KeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, - ): void; - function generateKeyPair( - type: "x448", - options: X448KeyPairKeyObjectOptions | undefined, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - namespace generateKeyPair { - function __promisify__( - type: "rsa", - options: RSAKeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "rsa", - options: RSAKeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: Buffer; - }>; - function __promisify__( - type: "rsa", - options: RSAKeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: Buffer; - privateKey: string; - }>; - function __promisify__( - type: "rsa", - options: RSAKeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: Buffer; - privateKey: Buffer; - }>; - function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise; - function __promisify__( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: Buffer; - }>; - function __promisify__( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: Buffer; - privateKey: string; - }>; - function __promisify__( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: Buffer; - privateKey: Buffer; - }>; - function __promisify__( - type: "rsa-pss", - options: RSAPSSKeyPairKeyObjectOptions, - ): Promise; - function __promisify__( - type: "dsa", - options: DSAKeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "dsa", - options: DSAKeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: Buffer; - }>; - function __promisify__( - type: "dsa", - options: DSAKeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: Buffer; - privateKey: string; - }>; - function __promisify__( - type: "dsa", - options: DSAKeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: Buffer; - privateKey: Buffer; - }>; - function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise; - function __promisify__( - type: "ec", - options: ECKeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "ec", - options: ECKeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: Buffer; - }>; - function __promisify__( - type: "ec", - options: ECKeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: Buffer; - privateKey: string; - }>; - function __promisify__( - type: "ec", - options: ECKeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: Buffer; - privateKey: Buffer; - }>; - function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise; - function __promisify__( - type: "ed25519", - options: ED25519KeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "ed25519", - options: ED25519KeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: Buffer; - }>; - function __promisify__( - type: "ed25519", - options: ED25519KeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: Buffer; - privateKey: string; - }>; - function __promisify__( - type: "ed25519", - options: ED25519KeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: Buffer; - privateKey: Buffer; - }>; - function __promisify__( - type: "ed25519", - options?: ED25519KeyPairKeyObjectOptions, - ): Promise; - function __promisify__( - type: "ed448", - options: ED448KeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "ed448", - options: ED448KeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: Buffer; - }>; - function __promisify__( - type: "ed448", - options: ED448KeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: Buffer; - privateKey: string; - }>; - function __promisify__( - type: "ed448", - options: ED448KeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: Buffer; - privateKey: Buffer; - }>; - function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise; - function __promisify__( - type: "x25519", - options: X25519KeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "x25519", - options: X25519KeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: Buffer; - }>; - function __promisify__( - type: "x25519", - options: X25519KeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: Buffer; - privateKey: string; - }>; - function __promisify__( - type: "x25519", - options: X25519KeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: Buffer; - privateKey: Buffer; - }>; - function __promisify__( - type: "x25519", - options?: X25519KeyPairKeyObjectOptions, - ): Promise; - function __promisify__( - type: "x448", - options: X448KeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "x448", - options: X448KeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: Buffer; - }>; - function __promisify__( - type: "x448", - options: X448KeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: Buffer; - privateKey: string; - }>; - function __promisify__( - type: "x448", - options: X448KeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: Buffer; - privateKey: Buffer; - }>; - function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise; - } - /** - * Calculates and returns the signature for `data` using the given private key and - * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is - * dependent upon the key type (especially Ed25519 and Ed448). - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been - * passed to {@link createPrivateKey}. If it is an object, the following - * additional properties can be passed: - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v12.0.0 - */ - function sign( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, - ): Buffer; - function sign( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, - callback: (error: Error | null, data: Buffer) => void, - ): void; - /** - * Verifies the given signature for `data` using the given key and algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the - * key type (especially Ed25519 and Ed448). - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been - * passed to {@link createPublicKey}. If it is an object, the following - * additional properties can be passed: - * - * The `signature` argument is the previously calculated signature for the `data`. - * - * Because public keys can be derived from private keys, a private key or a public - * key may be passed for `key`. - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v12.0.0 - */ - function verify( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: NodeJS.ArrayBufferView, - ): boolean; - function verify( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: NodeJS.ArrayBufferView, - callback: (error: Error | null, result: boolean) => void, - ): void; - /** - * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`. - * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'` (for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES). - * @since v13.9.0, v12.17.0 - */ - function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer; - /** - * A utility for creating one-shot hash digests of data. It can be faster than the object-based `crypto.createHash()` when hashing a smaller amount of data - * (<= 5MB) that's readily available. If the data can be big or if it is streamed, it's still recommended to use `crypto.createHash()` instead. The `algorithm` - * is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. On recent releases - * of OpenSSL, `openssl list -digest-algorithms` will display the available digest algorithms. - * - * Example: - * - * ```js - * import crypto from 'node:crypto'; - * import { Buffer } from 'node:buffer'; - * - * // Hashing a string and return the result as a hex-encoded string. - * const string = 'Node.js'; - * // 10b3493287f831e81a438811a1ffba01f8cec4b7 - * console.log(crypto.hash('sha1', string)); - * - * // Encode a base64-encoded string into a Buffer, hash it and return - * // the result as a buffer. - * const base64 = 'Tm9kZS5qcw=='; - * // - * console.log(crypto.hash('sha1', Buffer.from(base64, 'base64'), 'buffer')); - * ``` - * @since v21.7.0, v20.12.0 - * @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different input encoding is desired for a string input, user - * could encode the string into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing the encoded `TypedArray` into this API instead. - * @param [outputEncoding='hex'] [Encoding](https://nodejs.org/docs/latest-v22.x/api/buffer.html#buffers-and-character-encodings) used to encode the returned digest. - */ - function hash(algorithm: string, data: BinaryLike, outputEncoding?: BinaryToTextEncoding): string; - function hash(algorithm: string, data: BinaryLike, outputEncoding: "buffer"): Buffer; - function hash( - algorithm: string, - data: BinaryLike, - outputEncoding?: BinaryToTextEncoding | "buffer", - ): string | Buffer; - type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts"; - interface CipherInfoOptions { - /** - * A test key length. - */ - keyLength?: number | undefined; - /** - * A test IV length. - */ - ivLength?: number | undefined; - } - interface CipherInfo { - /** - * The name of the cipher. - */ - name: string; - /** - * The nid of the cipher. - */ - nid: number; - /** - * The block size of the cipher in bytes. - * This property is omitted when mode is 'stream'. - */ - blockSize?: number | undefined; - /** - * The expected or default initialization vector length in bytes. - * This property is omitted if the cipher does not use an initialization vector. - */ - ivLength?: number | undefined; - /** - * The expected or default key length in bytes. - */ - keyLength: number; - /** - * The cipher mode. - */ - mode: CipherMode; - } - /** - * Returns information about a given cipher. - * - * Some ciphers accept variable length keys and initialization vectors. By default, - * the `crypto.getCipherInfo()` method will return the default values for these - * ciphers. To test if a given key length or iv length is acceptable for given - * cipher, use the `keyLength` and `ivLength` options. If the given values are - * unacceptable, `undefined` will be returned. - * @since v15.0.0 - * @param nameOrNid The name or nid of the cipher to query. - */ - function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined; - /** - * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. - * - * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an errors occurs while deriving the key, `err` will be set; - * otherwise `err` will be `null`. The successfully generated `derivedKey` will - * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any - * of the input arguments specify invalid values or types. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * hkdf, - * } = await import('node:crypto'); - * - * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => { - * if (err) throw err; - * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' - * }); - * ``` - * @since v15.0.0 - * @param digest The digest algorithm to use. - * @param ikm The input keying material. Must be provided but can be zero-length. - * @param salt The salt value. Must be provided but can be zero-length. - * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. - * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` - * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). - */ - function hkdf( - digest: string, - irm: BinaryLike | KeyObject, - salt: BinaryLike, - info: BinaryLike, - keylen: number, - callback: (err: Error | null, derivedKey: ArrayBuffer) => void, - ): void; - /** - * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The - * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. - * - * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). - * - * An error will be thrown if any of the input arguments specify invalid values or - * types, or if the derived key cannot be generated. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * hkdfSync, - * } = await import('node:crypto'); - * - * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64); - * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' - * ``` - * @since v15.0.0 - * @param digest The digest algorithm to use. - * @param ikm The input keying material. Must be provided but can be zero-length. - * @param salt The salt value. Must be provided but can be zero-length. - * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. - * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` - * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). - */ - function hkdfSync( - digest: string, - ikm: BinaryLike | KeyObject, - salt: BinaryLike, - info: BinaryLike, - keylen: number, - ): ArrayBuffer; - interface SecureHeapUsage { - /** - * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag. - */ - total: number; - /** - * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag. - */ - min: number; - /** - * The total number of bytes currently allocated from the secure heap. - */ - used: number; - /** - * The calculated ratio of `used` to `total` allocated bytes. - */ - utilization: number; - } - /** - * @since v15.6.0 - */ - function secureHeapUsed(): SecureHeapUsage; - interface RandomUUIDOptions { - /** - * By default, to improve performance, - * Node.js will pre-emptively generate and persistently cache enough - * random data to generate up to 128 random UUIDs. To generate a UUID - * without using the cache, set `disableEntropyCache` to `true`. - * - * @default `false` - */ - disableEntropyCache?: boolean | undefined; - } - type UUID = `${string}-${string}-${string}-${string}-${string}`; - /** - * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a - * cryptographic pseudorandom number generator. - * @since v15.6.0, v14.17.0 - */ - function randomUUID(options?: RandomUUIDOptions): UUID; - interface X509CheckOptions { - /** - * @default 'always' - */ - subject?: "always" | "default" | "never"; - /** - * @default true - */ - wildcards?: boolean; - /** - * @default true - */ - partialWildcards?: boolean; - /** - * @default false - */ - multiLabelWildcards?: boolean; - /** - * @default false - */ - singleLabelSubdomains?: boolean; - } - /** - * Encapsulates an X509 certificate and provides read-only access to - * its information. - * - * ```js - * const { X509Certificate } = await import('node:crypto'); - * - * const x509 = new X509Certificate('{... pem encoded cert ...}'); - * - * console.log(x509.subject); - * ``` - * @since v15.6.0 - */ - class X509Certificate { - /** - * Will be \`true\` if this is a Certificate Authority (CA) certificate. - * @since v15.6.0 - */ - readonly ca: boolean; - /** - * The SHA-1 fingerprint of this certificate. - * - * Because SHA-1 is cryptographically broken and because the security of SHA-1 is - * significantly worse than that of algorithms that are commonly used to sign - * certificates, consider using `x509.fingerprint256` instead. - * @since v15.6.0 - */ - readonly fingerprint: string; - /** - * The SHA-256 fingerprint of this certificate. - * @since v15.6.0 - */ - readonly fingerprint256: string; - /** - * The SHA-512 fingerprint of this certificate. - * - * Because computing the SHA-256 fingerprint is usually faster and because it is - * only half the size of the SHA-512 fingerprint, `x509.fingerprint256` may be - * a better choice. While SHA-512 presumably provides a higher level of security in - * general, the security of SHA-256 matches that of most algorithms that are - * commonly used to sign certificates. - * @since v17.2.0, v16.14.0 - */ - readonly fingerprint512: string; - /** - * The complete subject of this certificate. - * @since v15.6.0 - */ - readonly subject: string; - /** - * The subject alternative name specified for this certificate. - * - * This is a comma-separated list of subject alternative names. Each entry begins - * with a string identifying the kind of the subject alternative name followed by - * a colon and the value associated with the entry. - * - * Earlier versions of Node.js incorrectly assumed that it is safe to split this - * property at the two-character sequence `', '` (see [CVE-2021-44532](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532)). However, - * both malicious and legitimate certificates can contain subject alternative names - * that include this sequence when represented as a string. - * - * After the prefix denoting the type of the entry, the remainder of each entry - * might be enclosed in quotes to indicate that the value is a JSON string literal. - * For backward compatibility, Node.js only uses JSON string literals within this - * property when necessary to avoid ambiguity. Third-party code should be prepared - * to handle both possible entry formats. - * @since v15.6.0 - */ - readonly subjectAltName: string | undefined; - /** - * A textual representation of the certificate's authority information access - * extension. - * - * This is a line feed separated list of access descriptions. Each line begins with - * the access method and the kind of the access location, followed by a colon and - * the value associated with the access location. - * - * After the prefix denoting the access method and the kind of the access location, - * the remainder of each line might be enclosed in quotes to indicate that the - * value is a JSON string literal. For backward compatibility, Node.js only uses - * JSON string literals within this property when necessary to avoid ambiguity. - * Third-party code should be prepared to handle both possible entry formats. - * @since v15.6.0 - */ - readonly infoAccess: string | undefined; - /** - * An array detailing the key usages for this certificate. - * @since v15.6.0 - */ - readonly keyUsage: string[]; - /** - * The issuer identification included in this certificate. - * @since v15.6.0 - */ - readonly issuer: string; - /** - * The issuer certificate or `undefined` if the issuer certificate is not - * available. - * @since v15.9.0 - */ - readonly issuerCertificate?: X509Certificate | undefined; - /** - * The public key `KeyObject` for this certificate. - * @since v15.6.0 - */ - readonly publicKey: KeyObject; - /** - * A `Buffer` containing the DER encoding of this certificate. - * @since v15.6.0 - */ - readonly raw: Buffer; - /** - * The serial number of this certificate. - * - * Serial numbers are assigned by certificate authorities and do not uniquely - * identify certificates. Consider using `x509.fingerprint256` as a unique - * identifier instead. - * @since v15.6.0 - */ - readonly serialNumber: string; - /** - * The date/time from which this certificate is considered valid. - * @since v15.6.0 - */ - readonly validFrom: string; - /** - * The date/time until which this certificate is considered valid. - * @since v15.6.0 - */ - readonly validTo: string; - constructor(buffer: BinaryLike); - /** - * Checks whether the certificate matches the given email address. - * - * If the `'subject'` option is undefined or set to `'default'`, the certificate - * subject is only considered if the subject alternative name extension either does - * not exist or does not contain any email addresses. - * - * If the `'subject'` option is set to `'always'` and if the subject alternative - * name extension either does not exist or does not contain a matching email - * address, the certificate subject is considered. - * - * If the `'subject'` option is set to `'never'`, the certificate subject is never - * considered, even if the certificate contains no subject alternative names. - * @since v15.6.0 - * @return Returns `email` if the certificate matches, `undefined` if it does not. - */ - checkEmail(email: string, options?: Pick): string | undefined; - /** - * Checks whether the certificate matches the given host name. - * - * If the certificate matches the given host name, the matching subject name is - * returned. The returned name might be an exact match (e.g., `foo.example.com`) - * or it might contain wildcards (e.g., `*.example.com`). Because host name - * comparisons are case-insensitive, the returned subject name might also differ - * from the given `name` in capitalization. - * - * If the `'subject'` option is undefined or set to `'default'`, the certificate - * subject is only considered if the subject alternative name extension either does - * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS"). - * - * If the `'subject'` option is set to `'always'` and if the subject alternative - * name extension either does not exist or does not contain a matching DNS name, - * the certificate subject is considered. - * - * If the `'subject'` option is set to `'never'`, the certificate subject is never - * considered, even if the certificate contains no subject alternative names. - * @since v15.6.0 - * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`. - */ - checkHost(name: string, options?: X509CheckOptions): string | undefined; - /** - * Checks whether the certificate matches the given IP address (IPv4 or IPv6). - * - * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they - * must match the given `ip` address exactly. Other subject alternative names as - * well as the subject field of the certificate are ignored. - * @since v15.6.0 - * @return Returns `ip` if the certificate matches, `undefined` if it does not. - */ - checkIP(ip: string): string | undefined; - /** - * Checks whether this certificate was issued by the given `otherCert`. - * @since v15.6.0 - */ - checkIssued(otherCert: X509Certificate): boolean; - /** - * Checks whether the public key for this certificate is consistent with - * the given private key. - * @since v15.6.0 - * @param privateKey A private key. - */ - checkPrivateKey(privateKey: KeyObject): boolean; - /** - * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded - * certificate. - * @since v15.6.0 - */ - toJSON(): string; - /** - * Returns information about this certificate using the legacy `certificate object` encoding. - * @since v15.6.0 - */ - toLegacyObject(): PeerCertificate; - /** - * Returns the PEM-encoded certificate. - * @since v15.6.0 - */ - toString(): string; - /** - * Verifies that this certificate was signed by the given public key. - * Does not perform any other validation checks on the certificate. - * @since v15.6.0 - * @param publicKey A public key. - */ - verify(publicKey: KeyObject): boolean; - } - type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint; - interface GeneratePrimeOptions { - add?: LargeNumberLike | undefined; - rem?: LargeNumberLike | undefined; - /** - * @default false - */ - safe?: boolean | undefined; - bigint?: boolean | undefined; - } - interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions { - bigint: true; - } - interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions { - bigint?: false | undefined; - } - /** - * Generates a pseudorandom prime of `size` bits. - * - * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. - * - * The `options.add` and `options.rem` parameters can be used to enforce additional - * requirements, e.g., for Diffie-Hellman: - * - * * If `options.add` and `options.rem` are both set, the prime will satisfy the - * condition that `prime % add = rem`. - * * If only `options.add` is set and `options.safe` is not `true`, the prime will - * satisfy the condition that `prime % add = 1`. - * * If only `options.add` is set and `options.safe` is set to `true`, the prime - * will instead satisfy the condition that `prime % add = 3`. This is necessary - * because `prime % add = 1` for `options.add > 2` would contradict the condition - * enforced by `options.safe`. - * * `options.rem` is ignored if `options.add` is not given. - * - * Both `options.add` and `options.rem` must be encoded as big-endian sequences - * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. - * - * By default, the prime is encoded as a big-endian sequence of octets - * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. - * @since v15.8.0 - * @param size The size (in bits) of the prime to generate. - */ - function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void; - function generatePrime( - size: number, - options: GeneratePrimeOptionsBigInt, - callback: (err: Error | null, prime: bigint) => void, - ): void; - function generatePrime( - size: number, - options: GeneratePrimeOptionsArrayBuffer, - callback: (err: Error | null, prime: ArrayBuffer) => void, - ): void; - function generatePrime( - size: number, - options: GeneratePrimeOptions, - callback: (err: Error | null, prime: ArrayBuffer | bigint) => void, - ): void; - /** - * Generates a pseudorandom prime of `size` bits. - * - * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. - * - * The `options.add` and `options.rem` parameters can be used to enforce additional - * requirements, e.g., for Diffie-Hellman: - * - * * If `options.add` and `options.rem` are both set, the prime will satisfy the - * condition that `prime % add = rem`. - * * If only `options.add` is set and `options.safe` is not `true`, the prime will - * satisfy the condition that `prime % add = 1`. - * * If only `options.add` is set and `options.safe` is set to `true`, the prime - * will instead satisfy the condition that `prime % add = 3`. This is necessary - * because `prime % add = 1` for `options.add > 2` would contradict the condition - * enforced by `options.safe`. - * * `options.rem` is ignored if `options.add` is not given. - * - * Both `options.add` and `options.rem` must be encoded as big-endian sequences - * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. - * - * By default, the prime is encoded as a big-endian sequence of octets - * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. - * @since v15.8.0 - * @param size The size (in bits) of the prime to generate. - */ - function generatePrimeSync(size: number): ArrayBuffer; - function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint; - function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer; - function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint; - interface CheckPrimeOptions { - /** - * The number of Miller-Rabin probabilistic primality iterations to perform. - * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input. - * Care must be used when selecting a number of checks. - * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details. - * - * @default 0 - */ - checks?: number | undefined; - } - /** - * Checks the primality of the `candidate`. - * @since v15.8.0 - * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. - */ - function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void; - function checkPrime( - value: LargeNumberLike, - options: CheckPrimeOptions, - callback: (err: Error | null, result: boolean) => void, - ): void; - /** - * Checks the primality of the `candidate`. - * @since v15.8.0 - * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. - * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`. - */ - function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean; - /** - * Load and set the `engine` for some or all OpenSSL functions (selected by flags). - * - * `engine` could be either an id or a path to the engine's shared library. - * - * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`): - * - * * `crypto.constants.ENGINE_METHOD_RSA` - * * `crypto.constants.ENGINE_METHOD_DSA` - * * `crypto.constants.ENGINE_METHOD_DH` - * * `crypto.constants.ENGINE_METHOD_RAND` - * * `crypto.constants.ENGINE_METHOD_EC` - * * `crypto.constants.ENGINE_METHOD_CIPHERS` - * * `crypto.constants.ENGINE_METHOD_DIGESTS` - * * `crypto.constants.ENGINE_METHOD_PKEY_METHS` - * * `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS` - * * `crypto.constants.ENGINE_METHOD_ALL` - * * `crypto.constants.ENGINE_METHOD_NONE` - * @since v0.11.11 - * @param flags - */ - function setEngine(engine: string, flags?: number): void; - /** - * A convenient alias for {@link webcrypto.getRandomValues}. This - * implementation is not compliant with the Web Crypto spec, to write - * web-compatible code use {@link webcrypto.getRandomValues} instead. - * @since v17.4.0 - * @return Returns `typedArray`. - */ - function getRandomValues(typedArray: T): T; - /** - * A convenient alias for `crypto.webcrypto.subtle`. - * @since v17.4.0 - */ - const subtle: webcrypto.SubtleCrypto; - /** - * An implementation of the Web Crypto API standard. - * - * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details. - * @since v15.0.0 - */ - const webcrypto: webcrypto.Crypto; - namespace webcrypto { - type BufferSource = ArrayBufferView | ArrayBuffer; - type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki"; - type KeyType = "private" | "public" | "secret"; - type KeyUsage = - | "decrypt" - | "deriveBits" - | "deriveKey" - | "encrypt" - | "sign" - | "unwrapKey" - | "verify" - | "wrapKey"; - type AlgorithmIdentifier = Algorithm | string; - type HashAlgorithmIdentifier = AlgorithmIdentifier; - type NamedCurve = string; - type BigInteger = Uint8Array; - interface AesCbcParams extends Algorithm { - iv: BufferSource; - } - interface AesCtrParams extends Algorithm { - counter: BufferSource; - length: number; - } - interface AesDerivedKeyParams extends Algorithm { - length: number; - } - interface AesGcmParams extends Algorithm { - additionalData?: BufferSource; - iv: BufferSource; - tagLength?: number; - } - interface AesKeyAlgorithm extends KeyAlgorithm { - length: number; - } - interface AesKeyGenParams extends Algorithm { - length: number; - } - interface Algorithm { - name: string; - } - interface EcKeyAlgorithm extends KeyAlgorithm { - namedCurve: NamedCurve; - } - interface EcKeyGenParams extends Algorithm { - namedCurve: NamedCurve; - } - interface EcKeyImportParams extends Algorithm { - namedCurve: NamedCurve; - } - interface EcdhKeyDeriveParams extends Algorithm { - public: CryptoKey; - } - interface EcdsaParams extends Algorithm { - hash: HashAlgorithmIdentifier; - } - interface Ed448Params extends Algorithm { - context?: BufferSource; - } - interface HkdfParams extends Algorithm { - hash: HashAlgorithmIdentifier; - info: BufferSource; - salt: BufferSource; - } - interface HmacImportParams extends Algorithm { - hash: HashAlgorithmIdentifier; - length?: number; - } - interface HmacKeyAlgorithm extends KeyAlgorithm { - hash: KeyAlgorithm; - length: number; - } - interface HmacKeyGenParams extends Algorithm { - hash: HashAlgorithmIdentifier; - length?: number; - } - interface JsonWebKey { - alg?: string; - crv?: string; - d?: string; - dp?: string; - dq?: string; - e?: string; - ext?: boolean; - k?: string; - key_ops?: string[]; - kty?: string; - n?: string; - oth?: RsaOtherPrimesInfo[]; - p?: string; - q?: string; - qi?: string; - use?: string; - x?: string; - y?: string; - } - interface KeyAlgorithm { - name: string; - } - interface Pbkdf2Params extends Algorithm { - hash: HashAlgorithmIdentifier; - iterations: number; - salt: BufferSource; - } - interface RsaHashedImportParams extends Algorithm { - hash: HashAlgorithmIdentifier; - } - interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm { - hash: KeyAlgorithm; - } - interface RsaHashedKeyGenParams extends RsaKeyGenParams { - hash: HashAlgorithmIdentifier; - } - interface RsaKeyAlgorithm extends KeyAlgorithm { - modulusLength: number; - publicExponent: BigInteger; - } - interface RsaKeyGenParams extends Algorithm { - modulusLength: number; - publicExponent: BigInteger; - } - interface RsaOaepParams extends Algorithm { - label?: BufferSource; - } - interface RsaOtherPrimesInfo { - d?: string; - r?: string; - t?: string; - } - interface RsaPssParams extends Algorithm { - saltLength: number; - } - /** - * Importing the `webcrypto` object (`import { webcrypto } from 'node:crypto'`) gives an instance of the `Crypto` class. - * `Crypto` is a singleton that provides access to the remainder of the crypto API. - * @since v15.0.0 - */ - interface Crypto { - /** - * Provides access to the `SubtleCrypto` API. - * @since v15.0.0 - */ - readonly subtle: SubtleCrypto; - /** - * Generates cryptographically strong random values. - * The given `typedArray` is filled with random values, and a reference to `typedArray` is returned. - * - * The given `typedArray` must be an integer-based instance of {@link NodeJS.TypedArray}, i.e. `Float32Array` and `Float64Array` are not accepted. - * - * An error will be thrown if the given `typedArray` is larger than 65,536 bytes. - * @since v15.0.0 - */ - getRandomValues>(typedArray: T): T; - /** - * Generates a random {@link https://www.rfc-editor.org/rfc/rfc4122.txt RFC 4122} version 4 UUID. - * The UUID is generated using a cryptographic pseudorandom number generator. - * @since v16.7.0 - */ - randomUUID(): UUID; - CryptoKey: CryptoKeyConstructor; - } - // This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable. - interface CryptoKeyConstructor { - /** Illegal constructor */ - (_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user. - readonly length: 0; - readonly name: "CryptoKey"; - readonly prototype: CryptoKey; - } - /** - * @since v15.0.0 - */ - interface CryptoKey { - /** - * An object detailing the algorithm for which the key can be used along with additional algorithm-specific parameters. - * @since v15.0.0 - */ - readonly algorithm: KeyAlgorithm; - /** - * When `true`, the {@link CryptoKey} can be extracted using either `subtleCrypto.exportKey()` or `subtleCrypto.wrapKey()`. - * @since v15.0.0 - */ - readonly extractable: boolean; - /** - * A string identifying whether the key is a symmetric (`'secret'`) or asymmetric (`'private'` or `'public'`) key. - * @since v15.0.0 - */ - readonly type: KeyType; - /** - * An array of strings identifying the operations for which the key may be used. - * - * The possible usages are: - * - `'encrypt'` - The key may be used to encrypt data. - * - `'decrypt'` - The key may be used to decrypt data. - * - `'sign'` - The key may be used to generate digital signatures. - * - `'verify'` - The key may be used to verify digital signatures. - * - `'deriveKey'` - The key may be used to derive a new key. - * - `'deriveBits'` - The key may be used to derive bits. - * - `'wrapKey'` - The key may be used to wrap another key. - * - `'unwrapKey'` - The key may be used to unwrap another key. - * - * Valid key usages depend on the key algorithm (identified by `cryptokey.algorithm.name`). - * @since v15.0.0 - */ - readonly usages: KeyUsage[]; - } - /** - * The `CryptoKeyPair` is a simple dictionary object with `publicKey` and `privateKey` properties, representing an asymmetric key pair. - * @since v15.0.0 - */ - interface CryptoKeyPair { - /** - * A {@link CryptoKey} whose type will be `'private'`. - * @since v15.0.0 - */ - privateKey: CryptoKey; - /** - * A {@link CryptoKey} whose type will be `'public'`. - * @since v15.0.0 - */ - publicKey: CryptoKey; - } - /** - * @since v15.0.0 - */ - interface SubtleCrypto { - /** - * Using the method and parameters specified in `algorithm` and the keying material provided by `key`, - * `subtle.decrypt()` attempts to decipher the provided `data`. If successful, - * the returned promise will be resolved with an `` containing the plaintext result. - * - * The algorithms currently supported include: - * - * - `'RSA-OAEP'` - * - `'AES-CTR'` - * - `'AES-CBC'` - * - `'AES-GCM'` - * @since v15.0.0 - */ - decrypt( - algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, - key: CryptoKey, - data: BufferSource, - ): Promise; - /** - * Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`, - * `subtle.deriveBits()` attempts to generate `length` bits. - * The Node.js implementation requires that when `length` is a number it must be multiple of `8`. - * When `length` is `null` the maximum number of bits for a given algorithm is generated. This is allowed - * for the `'ECDH'`, `'X25519'`, and `'X448'` algorithms. - * If successful, the returned promise will be resolved with an `` containing the generated data. - * - * The algorithms currently supported include: - * - * - `'ECDH'` - * - `'X25519'` - * - `'X448'` - * - `'HKDF'` - * - `'PBKDF2'` - * @since v15.0.0 - */ - deriveBits(algorithm: EcdhKeyDeriveParams, baseKey: CryptoKey, length: number | null): Promise; - deriveBits( - algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params, - baseKey: CryptoKey, - length: number, - ): Promise; - /** - * Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`, - * `subtle.deriveKey()` attempts to generate a new ` based on the method and parameters in `derivedKeyAlgorithm`. - * - * Calling `subtle.deriveKey()` is equivalent to calling `subtle.deriveBits()` to generate raw keying material, - * then passing the result into the `subtle.importKey()` method using the `deriveKeyAlgorithm`, `extractable`, and `keyUsages` parameters as input. - * - * The algorithms currently supported include: - * - * - `'ECDH'` - * - `'X25519'` - * - `'X448'` - * - `'HKDF'` - * - `'PBKDF2'` - * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. - * @since v15.0.0 - */ - deriveKey( - algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, - baseKey: CryptoKey, - derivedKeyAlgorithm: - | AlgorithmIdentifier - | AesDerivedKeyParams - | HmacImportParams - | HkdfParams - | Pbkdf2Params, - extractable: boolean, - keyUsages: readonly KeyUsage[], - ): Promise; - /** - * Using the method identified by `algorithm`, `subtle.digest()` attempts to generate a digest of `data`. - * If successful, the returned promise is resolved with an `` containing the computed digest. - * - * If `algorithm` is provided as a ``, it must be one of: - * - * - `'SHA-1'` - * - `'SHA-256'` - * - `'SHA-384'` - * - `'SHA-512'` - * - * If `algorithm` is provided as an ``, it must have a `name` property whose value is one of the above. - * @since v15.0.0 - */ - digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise; - /** - * Using the method and parameters specified by `algorithm` and the keying material provided by `key`, - * `subtle.encrypt()` attempts to encipher `data`. If successful, - * the returned promise is resolved with an `` containing the encrypted result. - * - * The algorithms currently supported include: - * - * - `'RSA-OAEP'` - * - `'AES-CTR'` - * - `'AES-CBC'` - * - `'AES-GCM'` - * @since v15.0.0 - */ - encrypt( - algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, - key: CryptoKey, - data: BufferSource, - ): Promise; - /** - * Exports the given key into the specified format, if supported. - * - * If the `` is not extractable, the returned promise will reject. - * - * When `format` is either `'pkcs8'` or `'spki'` and the export is successful, - * the returned promise will be resolved with an `` containing the exported key data. - * - * When `format` is `'jwk'` and the export is successful, the returned promise will be resolved with a - * JavaScript object conforming to the {@link https://tools.ietf.org/html/rfc7517 JSON Web Key} specification. - * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. - * @returns `` containing ``. - * @since v15.0.0 - */ - exportKey(format: "jwk", key: CryptoKey): Promise; - exportKey(format: Exclude, key: CryptoKey): Promise; - /** - * Using the method and parameters provided in `algorithm`, - * `subtle.generateKey()` attempts to generate new keying material. - * Depending the method used, the method may generate either a single `` or a ``. - * - * The `` (public and private key) generating algorithms supported include: - * - * - `'RSASSA-PKCS1-v1_5'` - * - `'RSA-PSS'` - * - `'RSA-OAEP'` - * - `'ECDSA'` - * - `'Ed25519'` - * - `'Ed448'` - * - `'ECDH'` - * - `'X25519'` - * - `'X448'` - * The `` (secret key) generating algorithms supported include: - * - * - `'HMAC'` - * - `'AES-CTR'` - * - `'AES-CBC'` - * - `'AES-GCM'` - * - `'AES-KW'` - * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. - * @since v15.0.0 - */ - generateKey( - algorithm: RsaHashedKeyGenParams | EcKeyGenParams, - extractable: boolean, - keyUsages: readonly KeyUsage[], - ): Promise; - generateKey( - algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, - extractable: boolean, - keyUsages: readonly KeyUsage[], - ): Promise; - generateKey( - algorithm: AlgorithmIdentifier, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - /** - * The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format` - * to create a `` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments. - * If the import is successful, the returned promise will be resolved with the created ``. - * - * If importing a `'PBKDF2'` key, `extractable` must be `false`. - * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. - * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. - * @since v15.0.0 - */ - importKey( - format: "jwk", - keyData: JsonWebKey, - algorithm: - | AlgorithmIdentifier - | RsaHashedImportParams - | EcKeyImportParams - | HmacImportParams - | AesKeyAlgorithm, - extractable: boolean, - keyUsages: readonly KeyUsage[], - ): Promise; - importKey( - format: Exclude, - keyData: BufferSource, - algorithm: - | AlgorithmIdentifier - | RsaHashedImportParams - | EcKeyImportParams - | HmacImportParams - | AesKeyAlgorithm, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - /** - * Using the method and parameters given by `algorithm` and the keying material provided by `key`, - * `subtle.sign()` attempts to generate a cryptographic signature of `data`. If successful, - * the returned promise is resolved with an `` containing the generated signature. - * - * The algorithms currently supported include: - * - * - `'RSASSA-PKCS1-v1_5'` - * - `'RSA-PSS'` - * - `'ECDSA'` - * - `'Ed25519'` - * - `'Ed448'` - * - `'HMAC'` - * @since v15.0.0 - */ - sign( - algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, - key: CryptoKey, - data: BufferSource, - ): Promise; - /** - * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material. - * The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `` instance. - * It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgo`, and `unwrappingKey` arguments as input) - * then passing the results in to the `subtle.importKey()` method using the `unwrappedKeyAlgo`, `extractable`, and `keyUsages` arguments as inputs. - * If successful, the returned promise is resolved with a `` object. - * - * The wrapping algorithms currently supported include: - * - * - `'RSA-OAEP'` - * - `'AES-CTR'` - * - `'AES-CBC'` - * - `'AES-GCM'` - * - `'AES-KW'` - * - * The unwrapped key algorithms supported include: - * - * - `'RSASSA-PKCS1-v1_5'` - * - `'RSA-PSS'` - * - `'RSA-OAEP'` - * - `'ECDSA'` - * - `'Ed25519'` - * - `'Ed448'` - * - `'ECDH'` - * - `'X25519'` - * - `'X448'` - * - `'HMAC'` - * - `'AES-CTR'` - * - `'AES-CBC'` - * - `'AES-GCM'` - * - `'AES-KW'` - * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. - * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. - * @since v15.0.0 - */ - unwrapKey( - format: KeyFormat, - wrappedKey: BufferSource, - unwrappingKey: CryptoKey, - unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, - unwrappedKeyAlgorithm: - | AlgorithmIdentifier - | RsaHashedImportParams - | EcKeyImportParams - | HmacImportParams - | AesKeyAlgorithm, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - /** - * Using the method and parameters given in `algorithm` and the keying material provided by `key`, - * `subtle.verify()` attempts to verify that `signature` is a valid cryptographic signature of `data`. - * The returned promise is resolved with either `true` or `false`. - * - * The algorithms currently supported include: - * - * - `'RSASSA-PKCS1-v1_5'` - * - `'RSA-PSS'` - * - `'ECDSA'` - * - `'Ed25519'` - * - `'Ed448'` - * - `'HMAC'` - * @since v15.0.0 - */ - verify( - algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, - key: CryptoKey, - signature: BufferSource, - data: BufferSource, - ): Promise; - /** - * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material. - * The `subtle.wrapKey()` method exports the keying material into the format identified by `format`, - * then encrypts it using the method and parameters specified by `wrapAlgo` and the keying material provided by `wrappingKey`. - * It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments, - * then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgo` as inputs. - * If successful, the returned promise will be resolved with an `` containing the encrypted key data. - * - * The wrapping algorithms currently supported include: - * - * - `'RSA-OAEP'` - * - `'AES-CTR'` - * - `'AES-CBC'` - * - `'AES-GCM'` - * - `'AES-KW'` - * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. - * @since v15.0.0 - */ - wrapKey( - format: KeyFormat, - key: CryptoKey, - wrappingKey: CryptoKey, - wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, - ): Promise; - } - } - - global { - var crypto: typeof globalThis extends { - crypto: infer T; - onmessage: any; - } ? T - : webcrypto.Crypto; - } -} -declare module "node:crypto" { - export * from "crypto"; -} diff --git a/web/static/node_modules/@types/node/dgram.d.ts b/web/static/node_modules/@types/node/dgram.d.ts deleted file mode 100644 index 8c2ac9b7..00000000 --- a/web/static/node_modules/@types/node/dgram.d.ts +++ /dev/null @@ -1,596 +0,0 @@ -/** - * The `node:dgram` module provides an implementation of UDP datagram sockets. - * - * ```js - * import dgram from 'node:dgram'; - * - * const server = dgram.createSocket('udp4'); - * - * server.on('error', (err) => { - * console.error(`server error:\n${err.stack}`); - * server.close(); - * }); - * - * server.on('message', (msg, rinfo) => { - * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); - * }); - * - * server.on('listening', () => { - * const address = server.address(); - * console.log(`server listening ${address.address}:${address.port}`); - * }); - * - * server.bind(41234); - * // Prints: server listening 0.0.0.0:41234 - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/dgram.js) - */ -declare module "dgram" { - import { AddressInfo } from "node:net"; - import * as dns from "node:dns"; - import { Abortable, EventEmitter } from "node:events"; - interface RemoteInfo { - address: string; - family: "IPv4" | "IPv6"; - port: number; - size: number; - } - interface BindOptions { - port?: number | undefined; - address?: string | undefined; - exclusive?: boolean | undefined; - fd?: number | undefined; - } - type SocketType = "udp4" | "udp6"; - interface SocketOptions extends Abortable { - type: SocketType; - reuseAddr?: boolean | undefined; - /** - * @default false - */ - ipv6Only?: boolean | undefined; - recvBufferSize?: number | undefined; - sendBufferSize?: number | undefined; - lookup?: - | (( - hostname: string, - options: dns.LookupOneOptions, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ) => void) - | undefined; - } - /** - * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram - * messages. When `address` and `port` are not passed to `socket.bind()` the - * method will bind the socket to the "all interfaces" address on a random port - * (it does the right thing for both `udp4` and `udp6` sockets). The bound address - * and port can be retrieved using `socket.address().address` and `socket.address().port`. - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.close()` on the socket: - * - * ```js - * const controller = new AbortController(); - * const { signal } = controller; - * const server = dgram.createSocket({ type: 'udp4', signal }); - * server.on('message', (msg, rinfo) => { - * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); - * }); - * // Later, when you want to close the server. - * controller.abort(); - * ``` - * @since v0.11.13 - * @param options Available options are: - * @param callback Attached as a listener for `'message'` events. Optional. - */ - function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - /** - * Encapsulates the datagram functionality. - * - * New instances of `dgram.Socket` are created using {@link createSocket}. - * The `new` keyword is not to be used to create `dgram.Socket` instances. - * @since v0.1.99 - */ - class Socket extends EventEmitter { - /** - * Tells the kernel to join a multicast group at the given `multicastAddress` and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` argument is not - * specified, the operating system will choose - * one interface and will add membership to it. To add membership to every - * available interface, call `addMembership` multiple times, once per interface. - * - * When called on an unbound socket, this method will implicitly bind to a random - * port, listening on all interfaces. - * - * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur: - * - * ```js - * import cluster from 'node:cluster'; - * import dgram from 'node:dgram'; - * - * if (cluster.isPrimary) { - * cluster.fork(); // Works ok. - * cluster.fork(); // Fails with EADDRINUSE. - * } else { - * const s = dgram.createSocket('udp4'); - * s.bind(1234, () => { - * s.addMembership('224.0.0.114'); - * }); - * } - * ``` - * @since v0.6.9 - */ - addMembership(multicastAddress: string, multicastInterface?: string): void; - /** - * Returns an object containing the address information for a socket. - * For UDP sockets, this object will contain `address`, `family`, and `port` properties. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.1.99 - */ - address(): AddressInfo; - /** - * For UDP sockets, causes the `dgram.Socket` to listen for datagram - * messages on a named `port` and optional `address`. If `port` is not - * specified or is `0`, the operating system will attempt to bind to a - * random port. If `address` is not specified, the operating system will - * attempt to listen on all addresses. Once binding is complete, a `'listening'` event is emitted and the optional `callback` function is - * called. - * - * Specifying both a `'listening'` event listener and passing a `callback` to the `socket.bind()` method is not harmful but not very - * useful. - * - * A bound datagram socket keeps the Node.js process running to receive - * datagram messages. - * - * If binding fails, an `'error'` event is generated. In rare case (e.g. - * attempting to bind with a closed socket), an `Error` may be thrown. - * - * Example of a UDP server listening on port 41234: - * - * ```js - * import dgram from 'node:dgram'; - * - * const server = dgram.createSocket('udp4'); - * - * server.on('error', (err) => { - * console.error(`server error:\n${err.stack}`); - * server.close(); - * }); - * - * server.on('message', (msg, rinfo) => { - * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); - * }); - * - * server.on('listening', () => { - * const address = server.address(); - * console.log(`server listening ${address.address}:${address.port}`); - * }); - * - * server.bind(41234); - * // Prints: server listening 0.0.0.0:41234 - * ``` - * @since v0.1.99 - * @param callback with no parameters. Called when binding is complete. - */ - bind(port?: number, address?: string, callback?: () => void): this; - bind(port?: number, callback?: () => void): this; - bind(callback?: () => void): this; - bind(options: BindOptions, callback?: () => void): this; - /** - * Close the underlying socket and stop listening for data on it. If a callback is - * provided, it is added as a listener for the `'close'` event. - * @since v0.1.99 - * @param callback Called when the socket has been closed. - */ - close(callback?: () => void): this; - /** - * Associates the `dgram.Socket` to a remote address and port. Every - * message sent by this handle is automatically sent to that destination. Also, - * the socket will only receive messages from that remote peer. - * Trying to call `connect()` on an already connected socket will result - * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not - * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) - * will be used by default. Once the connection is complete, a `'connect'` event - * is emitted and the optional `callback` function is called. In case of failure, - * the `callback` is called or, failing this, an `'error'` event is emitted. - * @since v12.0.0 - * @param callback Called when the connection is completed or on error. - */ - connect(port: number, address?: string, callback?: () => void): void; - connect(port: number, callback: () => void): void; - /** - * A synchronous function that disassociates a connected `dgram.Socket` from - * its remote address. Trying to call `disconnect()` on an unbound or already - * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception. - * @since v12.0.0 - */ - disconnect(): void; - /** - * Instructs the kernel to leave a multicast group at `multicastAddress` using the `IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the - * kernel when the socket is closed or the process terminates, so most apps will - * never have reason to call this. - * - * If `multicastInterface` is not specified, the operating system will attempt to - * drop membership on all valid interfaces. - * @since v0.6.9 - */ - dropMembership(multicastAddress: string, multicastInterface?: string): void; - /** - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - * @return the `SO_RCVBUF` socket receive buffer size in bytes. - */ - getRecvBufferSize(): number; - /** - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - * @return the `SO_SNDBUF` socket send buffer size in bytes. - */ - getSendBufferSize(): number; - /** - * @since v18.8.0, v16.19.0 - * @return Number of bytes queued for sending. - */ - getSendQueueSize(): number; - /** - * @since v18.8.0, v16.19.0 - * @return Number of send requests currently in the queue awaiting to be processed. - */ - getSendQueueCount(): number; - /** - * By default, binding a socket will cause it to block the Node.js process from - * exiting as long as the socket is open. The `socket.unref()` method can be used - * to exclude the socket from the reference counting that keeps the Node.js - * process active. The `socket.ref()` method adds the socket back to the reference - * counting and restores the default behavior. - * - * Calling `socket.ref()` multiples times will have no additional effect. - * - * The `socket.ref()` method returns a reference to the socket so calls can be - * chained. - * @since v0.9.1 - */ - ref(): this; - /** - * Returns an object containing the `address`, `family`, and `port` of the remote - * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception - * if the socket is not connected. - * @since v12.0.0 - */ - remoteAddress(): AddressInfo; - /** - * Broadcasts a datagram on the socket. - * For connectionless sockets, the destination `port` and `address` must be - * specified. Connected sockets, on the other hand, will use their associated - * remote endpoint, so the `port` and `address` arguments must not be set. - * - * The `msg` argument contains the message to be sent. - * Depending on its type, different behavior can apply. If `msg` is a `Buffer`, - * any `TypedArray` or a `DataView`, - * the `offset` and `length` specify the offset within the `Buffer` where the - * message begins and the number of bytes in the message, respectively. - * If `msg` is a `String`, then it is automatically converted to a `Buffer` with `'utf8'` encoding. With messages that - * contain multi-byte characters, `offset` and `length` will be calculated with - * respect to `byte length` and not the character position. - * If `msg` is an array, `offset` and `length` must not be specified. - * - * The `address` argument is a string. If the value of `address` is a host name, - * DNS will be used to resolve the address of the host. If `address` is not - * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) will be used by default. - * - * If the socket has not been previously bound with a call to `bind`, the socket - * is assigned a random port number and is bound to the "all interfaces" address - * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.) - * - * An optional `callback` function may be specified to as a way of reporting - * DNS errors or for determining when it is safe to reuse the `buf` object. - * DNS lookups delay the time to send for at least one tick of the - * Node.js event loop. - * - * The only way to know for sure that the datagram has been sent is by using a `callback`. If an error occurs and a `callback` is given, the error will be - * passed as the first argument to the `callback`. If a `callback` is not given, - * the error is emitted as an `'error'` event on the `socket` object. - * - * Offset and length are optional but both _must_ be set if either are used. - * They are supported only when the first argument is a `Buffer`, a `TypedArray`, - * or a `DataView`. - * - * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket. - * - * Example of sending a UDP packet to a port on `localhost`; - * - * ```js - * import dgram from 'node:dgram'; - * import { Buffer } from 'node:buffer'; - * - * const message = Buffer.from('Some bytes'); - * const client = dgram.createSocket('udp4'); - * client.send(message, 41234, 'localhost', (err) => { - * client.close(); - * }); - * ``` - * - * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`; - * - * ```js - * import dgram from 'node:dgram'; - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('Some '); - * const buf2 = Buffer.from('bytes'); - * const client = dgram.createSocket('udp4'); - * client.send([buf1, buf2], 41234, (err) => { - * client.close(); - * }); - * ``` - * - * Sending multiple buffers might be faster or slower depending on the - * application and operating system. Run benchmarks to - * determine the optimal strategy on a case-by-case basis. Generally speaking, - * however, sending multiple buffers is faster. - * - * Example of sending a UDP packet using a socket connected to a port on `localhost`: - * - * ```js - * import dgram from 'node:dgram'; - * import { Buffer } from 'node:buffer'; - * - * const message = Buffer.from('Some bytes'); - * const client = dgram.createSocket('udp4'); - * client.connect(41234, 'localhost', (err) => { - * client.send(message, (err) => { - * client.close(); - * }); - * }); - * ``` - * @since v0.1.99 - * @param msg Message to be sent. - * @param offset Offset in the buffer where the message starts. - * @param length Number of bytes in the message. - * @param port Destination port. - * @param address Destination host name or IP address. - * @param callback Called when the message has been sent. - */ - send( - msg: string | Uint8Array | readonly any[], - port?: number, - address?: string, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | Uint8Array | readonly any[], - port?: number, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | Uint8Array | readonly any[], - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | Uint8Array, - offset: number, - length: number, - port?: number, - address?: string, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | Uint8Array, - offset: number, - length: number, - port?: number, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | Uint8Array, - offset: number, - length: number, - callback?: (error: Error | null, bytes: number) => void, - ): void; - /** - * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP - * packets may be sent to a local interface's broadcast address. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.6.9 - */ - setBroadcast(flag: boolean): void; - /** - * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC - * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_ - * _with a scope index is written as `'IP%scope'` where scope is an interface name_ - * _or interface number._ - * - * Sets the default outgoing multicast interface of the socket to a chosen - * interface or back to system interface selection. The `multicastInterface` must - * be a valid string representation of an IP from the socket's family. - * - * For IPv4 sockets, this should be the IP configured for the desired physical - * interface. All packets sent to multicast on the socket will be sent on the - * interface determined by the most recent successful use of this call. - * - * For IPv6 sockets, `multicastInterface` should include a scope to indicate the - * interface as in the examples that follow. In IPv6, individual `send` calls can - * also use explicit scope in addresses, so only packets sent to a multicast - * address without specifying an explicit scope are affected by the most recent - * successful use of this call. - * - * This method throws `EBADF` if called on an unbound socket. - * - * #### Example: IPv6 outgoing multicast interface - * - * On most systems, where scope format uses the interface name: - * - * ```js - * const socket = dgram.createSocket('udp6'); - * - * socket.bind(1234, () => { - * socket.setMulticastInterface('::%eth1'); - * }); - * ``` - * - * On Windows, where scope format uses an interface number: - * - * ```js - * const socket = dgram.createSocket('udp6'); - * - * socket.bind(1234, () => { - * socket.setMulticastInterface('::%2'); - * }); - * ``` - * - * #### Example: IPv4 outgoing multicast interface - * - * All systems use an IP of the host on the desired physical interface: - * - * ```js - * const socket = dgram.createSocket('udp4'); - * - * socket.bind(1234, () => { - * socket.setMulticastInterface('10.0.0.2'); - * }); - * ``` - * @since v8.6.0 - */ - setMulticastInterface(multicastInterface: string): void; - /** - * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, - * multicast packets will also be received on the local interface. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.3.8 - */ - setMulticastLoopback(flag: boolean): boolean; - /** - * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for - * "Time to Live", in this context it specifies the number of IP hops that a - * packet is allowed to travel through, specifically for multicast traffic. Each - * router or gateway that forwards a packet decrements the TTL. If the TTL is - * decremented to 0 by a router, it will not be forwarded. - * - * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.3.8 - */ - setMulticastTTL(ttl: number): number; - /** - * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer - * in bytes. - * - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - */ - setRecvBufferSize(size: number): void; - /** - * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer - * in bytes. - * - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - */ - setSendBufferSize(size: number): void; - /** - * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", - * in this context it specifies the number of IP hops that a packet is allowed to - * travel through. Each router or gateway that forwards a packet decrements the - * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. - * Changing TTL values is typically done for network probes or when multicasting. - * - * The `ttl` argument may be between 1 and 255\. The default on most systems - * is 64. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.1.101 - */ - setTTL(ttl: number): number; - /** - * By default, binding a socket will cause it to block the Node.js process from - * exiting as long as the socket is open. The `socket.unref()` method can be used - * to exclude the socket from the reference counting that keeps the Node.js - * process active, allowing the process to exit even if the socket is still - * listening. - * - * Calling `socket.unref()` multiple times will have no additional effect. - * - * The `socket.unref()` method returns a reference to the socket so calls can be - * chained. - * @since v0.9.1 - */ - unref(): this; - /** - * Tells the kernel to join a source-specific multicast channel at the given `sourceAddress` and `groupAddress`, using the `multicastInterface` with the `IP_ADD_SOURCE_MEMBERSHIP` socket - * option. If the `multicastInterface` argument - * is not specified, the operating system will choose one interface and will add - * membership to it. To add membership to every available interface, call `socket.addSourceSpecificMembership()` multiple times, once per interface. - * - * When called on an unbound socket, this method will implicitly bind to a random - * port, listening on all interfaces. - * @since v13.1.0, v12.16.0 - */ - addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; - /** - * Instructs the kernel to leave a source-specific multicast channel at the given `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP` socket option. This method is - * automatically called by the kernel when the - * socket is closed or the process terminates, so most apps will never have - * reason to call this. - * - * If `multicastInterface` is not specified, the operating system will attempt to - * drop membership on all valid interfaces. - * @since v13.1.0, v12.16.0 - */ - dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; - /** - * events.EventEmitter - * 1. close - * 2. connect - * 3. error - * 4. listening - * 5. message - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connect", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "connect"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "connect", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "connect", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connect", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connect", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - /** - * Calls `socket.close()` and returns a promise that fulfills when the socket has closed. - * @since v20.5.0 - */ - [Symbol.asyncDispose](): Promise; - } -} -declare module "node:dgram" { - export * from "dgram"; -} diff --git a/web/static/node_modules/@types/node/diagnostics_channel.d.ts b/web/static/node_modules/@types/node/diagnostics_channel.d.ts deleted file mode 100644 index 1cc7486b..00000000 --- a/web/static/node_modules/@types/node/diagnostics_channel.d.ts +++ /dev/null @@ -1,554 +0,0 @@ -/** - * The `node:diagnostics_channel` module provides an API to create named channels - * to report arbitrary message data for diagnostics purposes. - * - * It can be accessed using: - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * ``` - * - * It is intended that a module writer wanting to report diagnostics messages - * will create one or many top-level channels to report messages through. - * Channels may also be acquired at runtime but it is not encouraged - * due to the additional overhead of doing so. Channels may be exported for - * convenience, but as long as the name is known it can be acquired anywhere. - * - * If you intend for your module to produce diagnostics data for others to - * consume it is recommended that you include documentation of what named - * channels are used along with the shape of the message data. Channel names - * should generally include the module name to avoid collisions with data from - * other modules. - * @since v15.1.0, v14.17.0 - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/diagnostics_channel.js) - */ -declare module "diagnostics_channel" { - import { AsyncLocalStorage } from "node:async_hooks"; - /** - * Check if there are active subscribers to the named channel. This is helpful if - * the message you want to send might be expensive to prepare. - * - * This API is optional but helpful when trying to publish messages from very - * performance-sensitive code. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * if (diagnostics_channel.hasSubscribers('my-channel')) { - * // There are subscribers, prepare and publish message - * } - * ``` - * @since v15.1.0, v14.17.0 - * @param name The channel name - * @return If there are active subscribers - */ - function hasSubscribers(name: string | symbol): boolean; - /** - * This is the primary entry-point for anyone wanting to publish to a named - * channel. It produces a channel object which is optimized to reduce overhead at - * publish time as much as possible. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * ``` - * @since v15.1.0, v14.17.0 - * @param name The channel name - * @return The named channel object - */ - function channel(name: string | symbol): Channel; - type ChannelListener = (message: unknown, name: string | symbol) => void; - /** - * Register a message handler to subscribe to this channel. This message handler - * will be run synchronously whenever a message is published to the channel. Any - * errors thrown in the message handler will trigger an `'uncaughtException'`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * diagnostics_channel.subscribe('my-channel', (message, name) => { - * // Received data - * }); - * ``` - * @since v18.7.0, v16.17.0 - * @param name The channel name - * @param onMessage The handler to receive channel messages - */ - function subscribe(name: string | symbol, onMessage: ChannelListener): void; - /** - * Remove a message handler previously registered to this channel with {@link subscribe}. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * function onMessage(message, name) { - * // Received data - * } - * - * diagnostics_channel.subscribe('my-channel', onMessage); - * - * diagnostics_channel.unsubscribe('my-channel', onMessage); - * ``` - * @since v18.7.0, v16.17.0 - * @param name The channel name - * @param onMessage The previous subscribed handler to remove - * @return `true` if the handler was found, `false` otherwise. - */ - function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean; - /** - * Creates a `TracingChannel` wrapper for the given `TracingChannel Channels`. If a name is given, the corresponding tracing - * channels will be created in the form of `tracing:${name}:${eventType}` where `eventType` corresponds to the types of `TracingChannel Channels`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channelsByName = diagnostics_channel.tracingChannel('my-channel'); - * - * // or... - * - * const channelsByCollection = diagnostics_channel.tracingChannel({ - * start: diagnostics_channel.channel('tracing:my-channel:start'), - * end: diagnostics_channel.channel('tracing:my-channel:end'), - * asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'), - * asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'), - * error: diagnostics_channel.channel('tracing:my-channel:error'), - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param nameOrChannels Channel name or object containing all the `TracingChannel Channels` - * @return Collection of channels to trace with - */ - function tracingChannel< - StoreType = unknown, - ContextType extends object = StoreType extends object ? StoreType : object, - >( - nameOrChannels: string | TracingChannelCollection, - ): TracingChannel; - /** - * The class `Channel` represents an individual named channel within the data - * pipeline. It is used to track subscribers and to publish messages when there - * are subscribers present. It exists as a separate object to avoid channel - * lookups at publish time, enabling very fast publish speeds and allowing - * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly - * with `new Channel(name)` is not supported. - * @since v15.1.0, v14.17.0 - */ - class Channel { - readonly name: string | symbol; - /** - * Check if there are active subscribers to this channel. This is helpful if - * the message you want to send might be expensive to prepare. - * - * This API is optional but helpful when trying to publish messages from very - * performance-sensitive code. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * if (channel.hasSubscribers) { - * // There are subscribers, prepare and publish message - * } - * ``` - * @since v15.1.0, v14.17.0 - */ - readonly hasSubscribers: boolean; - private constructor(name: string | symbol); - /** - * Publish a message to any subscribers to the channel. This will trigger - * message handlers synchronously so they will execute within the same context. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.publish({ - * some: 'message', - * }); - * ``` - * @since v15.1.0, v14.17.0 - * @param message The message to send to the channel subscribers - */ - publish(message: unknown): void; - /** - * Register a message handler to subscribe to this channel. This message handler - * will be run synchronously whenever a message is published to the channel. Any - * errors thrown in the message handler will trigger an `'uncaughtException'`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.subscribe((message, name) => { - * // Received data - * }); - * ``` - * @since v15.1.0, v14.17.0 - * @deprecated Since v18.7.0,v16.17.0 - Use {@link subscribe(name, onMessage)} - * @param onMessage The handler to receive channel messages - */ - subscribe(onMessage: ChannelListener): void; - /** - * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * function onMessage(message, name) { - * // Received data - * } - * - * channel.subscribe(onMessage); - * - * channel.unsubscribe(onMessage); - * ``` - * @since v15.1.0, v14.17.0 - * @deprecated Since v18.7.0,v16.17.0 - Use {@link unsubscribe(name, onMessage)} - * @param onMessage The previous subscribed handler to remove - * @return `true` if the handler was found, `false` otherwise. - */ - unsubscribe(onMessage: ChannelListener): void; - /** - * When `channel.runStores(context, ...)` is called, the given context data - * will be applied to any store bound to the channel. If the store has already been - * bound the previous `transform` function will be replaced with the new one. - * The `transform` function may be omitted to set the given context data as the - * context directly. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const store = new AsyncLocalStorage(); - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.bindStore(store, (data) => { - * return { data }; - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param store The store to which to bind the context data - * @param transform Transform context data before setting the store context - */ - bindStore(store: AsyncLocalStorage, transform?: (context: ContextType) => StoreType): void; - /** - * Remove a message handler previously registered to this channel with `channel.bindStore(store)`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const store = new AsyncLocalStorage(); - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.bindStore(store); - * channel.unbindStore(store); - * ``` - * @since v19.9.0 - * @experimental - * @param store The store to unbind from the channel. - * @return `true` if the store was found, `false` otherwise. - */ - unbindStore(store: any): void; - /** - * Applies the given data to any AsyncLocalStorage instances bound to the channel - * for the duration of the given function, then publishes to the channel within - * the scope of that data is applied to the stores. - * - * If a transform function was given to `channel.bindStore(store)` it will be - * applied to transform the message data before it becomes the context value for - * the store. The prior storage context is accessible from within the transform - * function in cases where context linking is required. - * - * The context applied to the store should be accessible in any async code which - * continues from execution which began during the given function, however - * there are some situations in which `context loss` may occur. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const store = new AsyncLocalStorage(); - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.bindStore(store, (message) => { - * const parent = store.getStore(); - * return new Span(message, parent); - * }); - * channel.runStores({ some: 'message' }, () => { - * store.getStore(); // Span({ some: 'message' }) - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param context Message to send to subscribers and bind to stores - * @param fn Handler to run within the entered storage context - * @param thisArg The receiver to be used for the function call. - * @param args Optional arguments to pass to the function. - */ - runStores(): void; - } - interface TracingChannelSubscribers { - start: (message: ContextType) => void; - end: ( - message: ContextType & { - error?: unknown; - result?: unknown; - }, - ) => void; - asyncStart: ( - message: ContextType & { - error?: unknown; - result?: unknown; - }, - ) => void; - asyncEnd: ( - message: ContextType & { - error?: unknown; - result?: unknown; - }, - ) => void; - error: ( - message: ContextType & { - error: unknown; - }, - ) => void; - } - interface TracingChannelCollection { - start: Channel; - end: Channel; - asyncStart: Channel; - asyncEnd: Channel; - error: Channel; - } - /** - * The class `TracingChannel` is a collection of `TracingChannel Channels` which - * together express a single traceable action. It is used to formalize and - * simplify the process of producing events for tracing application flow. {@link tracingChannel} is used to construct a `TracingChannel`. As with `Channel` it is recommended to create and reuse a - * single `TracingChannel` at the top-level of the file rather than creating them - * dynamically. - * @since v19.9.0 - * @experimental - */ - class TracingChannel implements TracingChannelCollection { - start: Channel; - end: Channel; - asyncStart: Channel; - asyncEnd: Channel; - error: Channel; - /** - * Helper to subscribe a collection of functions to the corresponding channels. - * This is the same as calling `channel.subscribe(onMessage)` on each channel - * individually. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.subscribe({ - * start(message) { - * // Handle start message - * }, - * end(message) { - * // Handle end message - * }, - * asyncStart(message) { - * // Handle asyncStart message - * }, - * asyncEnd(message) { - * // Handle asyncEnd message - * }, - * error(message) { - * // Handle error message - * }, - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param subscribers Set of `TracingChannel Channels` subscribers - */ - subscribe(subscribers: TracingChannelSubscribers): void; - /** - * Helper to unsubscribe a collection of functions from the corresponding channels. - * This is the same as calling `channel.unsubscribe(onMessage)` on each channel - * individually. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.unsubscribe({ - * start(message) { - * // Handle start message - * }, - * end(message) { - * // Handle end message - * }, - * asyncStart(message) { - * // Handle asyncStart message - * }, - * asyncEnd(message) { - * // Handle asyncEnd message - * }, - * error(message) { - * // Handle error message - * }, - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param subscribers Set of `TracingChannel Channels` subscribers - * @return `true` if all handlers were successfully unsubscribed, and `false` otherwise. - */ - unsubscribe(subscribers: TracingChannelSubscribers): void; - /** - * Trace a synchronous function call. This will always produce a `start event` and `end event` around the execution and may produce an `error event` if the given function throws an error. - * This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all - * events should have any bound stores set to match this trace context. - * - * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions - * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.traceSync(() => { - * // Do something - * }, { - * some: 'thing', - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param fn Function to wrap a trace around - * @param context Shared object to correlate events through - * @param thisArg The receiver to be used for the function call - * @param args Optional arguments to pass to the function - * @return The return value of the given function - */ - traceSync( - fn: (this: ThisArg, ...args: Args) => any, - context?: ContextType, - thisArg?: ThisArg, - ...args: Args - ): void; - /** - * Trace a promise-returning function call. This will always produce a `start event` and `end event` around the synchronous portion of the - * function execution, and will produce an `asyncStart event` and `asyncEnd event` when a promise continuation is reached. It may also - * produce an `error event` if the given function throws an error or the - * returned promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all - * events should have any bound stores set to match this trace context. - * - * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions - * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.tracePromise(async () => { - * // Do something - * }, { - * some: 'thing', - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param fn Promise-returning function to wrap a trace around - * @param context Shared object to correlate trace events through - * @param thisArg The receiver to be used for the function call - * @param args Optional arguments to pass to the function - * @return Chained from promise returned by the given function - */ - tracePromise( - fn: (this: ThisArg, ...args: Args) => Promise, - context?: ContextType, - thisArg?: ThisArg, - ...args: Args - ): void; - /** - * Trace a callback-receiving function call. This will always produce a `start event` and `end event` around the synchronous portion of the - * function execution, and will produce a `asyncStart event` and `asyncEnd event` around the callback execution. It may also produce an `error event` if the given function throws an error or - * the returned - * promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all - * events should have any bound stores set to match this trace context. - * - * The `position` will be -1 by default to indicate the final argument should - * be used as the callback. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.traceCallback((arg1, callback) => { - * // Do something - * callback(null, 'result'); - * }, 1, { - * some: 'thing', - * }, thisArg, arg1, callback); - * ``` - * - * The callback will also be run with `channel.runStores(context, ...)` which - * enables context loss recovery in some cases. - * - * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions - * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * const myStore = new AsyncLocalStorage(); - * - * // The start channel sets the initial store data to something - * // and stores that store data value on the trace context object - * channels.start.bindStore(myStore, (data) => { - * const span = new Span(data); - * data.span = span; - * return span; - * }); - * - * // Then asyncStart can restore from that data it stored previously - * channels.asyncStart.bindStore(myStore, (data) => { - * return data.span; - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param fn callback using function to wrap a trace around - * @param position Zero-indexed argument position of expected callback - * @param context Shared object to correlate trace events through - * @param thisArg The receiver to be used for the function call - * @param args Optional arguments to pass to the function - * @return The return value of the given function - */ - traceCallback any>( - fn: Fn, - position?: number, - context?: ContextType, - thisArg?: any, - ...args: Parameters - ): void; - } -} -declare module "node:diagnostics_channel" { - export * from "diagnostics_channel"; -} diff --git a/web/static/node_modules/@types/node/dns.d.ts b/web/static/node_modules/@types/node/dns.d.ts deleted file mode 100644 index af10fd92..00000000 --- a/web/static/node_modules/@types/node/dns.d.ts +++ /dev/null @@ -1,865 +0,0 @@ -/** - * The `node:dns` module enables name resolution. For example, use it to look up IP - * addresses of host names. - * - * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the - * DNS protocol for lookups. {@link lookup} uses the operating system - * facilities to perform name resolution. It may not need to perform any network - * communication. To perform name resolution the way other applications on the same - * system do, use {@link lookup}. - * - * ```js - * import dns from 'node:dns'; - * - * dns.lookup('example.org', (err, address, family) => { - * console.log('address: %j family: IPv%s', address, family); - * }); - * // address: "93.184.216.34" family: IPv4 - * ``` - * - * All other functions in the `node:dns` module connect to an actual DNS server to - * perform name resolution. They will always use the network to perform DNS - * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform - * DNS queries, bypassing other name-resolution facilities. - * - * ```js - * import dns from 'node:dns'; - * - * dns.resolve4('archive.org', (err, addresses) => { - * if (err) throw err; - * - * console.log(`addresses: ${JSON.stringify(addresses)}`); - * - * addresses.forEach((a) => { - * dns.reverse(a, (err, hostnames) => { - * if (err) { - * throw err; - * } - * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`); - * }); - * }); - * }); - * ``` - * - * See the [Implementation considerations section](https://nodejs.org/docs/latest-v22.x/api/dns.html#implementation-considerations) for more information. - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/dns.js) - */ -declare module "dns" { - import * as dnsPromises from "node:dns/promises"; - // Supported getaddrinfo flags. - /** - * Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are - * only returned if the current system has at least one IPv4 address configured. - */ - export const ADDRCONFIG: number; - /** - * If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported - * on some operating systems (e.g. FreeBSD 10.1). - */ - export const V4MAPPED: number; - /** - * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as - * well as IPv4 mapped IPv6 addresses. - */ - export const ALL: number; - export interface LookupOptions { - /** - * The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted - * as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used - * with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned. - * @default 0 - */ - family?: number | "IPv4" | "IPv6" | undefined; - /** - * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v22.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be - * passed by bitwise `OR`ing their values. - */ - hints?: number | undefined; - /** - * When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address. - * @default false - */ - all?: boolean | undefined; - /** - * When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted - * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6 - * addresses before IPv4 addresses. Default value is configurable using - * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). - * @default `verbatim` (addresses are not reordered) - * @since v22.1.0 - */ - order?: "ipv4first" | "ipv6first" | "verbatim" | undefined; - /** - * When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4 - * addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified, - * `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder} - * @default true (addresses are not reordered) - * @deprecated Please use `order` option - */ - verbatim?: boolean | undefined; - } - export interface LookupOneOptions extends LookupOptions { - all?: false | undefined; - } - export interface LookupAllOptions extends LookupOptions { - all: true; - } - export interface LookupAddress { - /** - * A string representation of an IPv4 or IPv6 address. - */ - address: string; - /** - * `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a - * bug in the name resolution service used by the operating system. - */ - family: number; - } - /** - * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or - * AAAA (IPv6) record. All `option` properties are optional. If `options` is an - * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then - * IPv4 and IPv6 addresses are both returned if found. - * - * With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the - * properties `address` and `family`. - * - * On error, `err` is an `Error` object, where `err.code` is the error code. - * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when - * the host name does not exist but also when the lookup fails in other ways - * such as no available file descriptors. - * - * `dns.lookup()` does not necessarily have anything to do with the DNS protocol. - * The implementation uses an operating system facility that can associate names - * with addresses and vice versa. This implementation can have subtle but - * important consequences on the behavior of any Node.js program. Please take some - * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v22.x/api/dns.html#implementation-considerations) - * before using `dns.lookup()`. - * - * Example usage: - * - * ```js - * import dns from 'node:dns'; - * const options = { - * family: 6, - * hints: dns.ADDRCONFIG | dns.V4MAPPED, - * }; - * dns.lookup('example.com', options, (err, address, family) => - * console.log('address: %j family: IPv%s', address, family)); - * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 - * - * // When options.all is true, the result will be an Array. - * options.all = true; - * dns.lookup('example.com', options, (err, addresses) => - * console.log('addresses: %j', addresses)); - * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] - * ``` - * - * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v22.x/api/util.html#utilpromisifyoriginal) ed - * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties. - * @since v0.1.90 - */ - export function lookup( - hostname: string, - family: number, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ): void; - export function lookup( - hostname: string, - options: LookupOneOptions, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ): void; - export function lookup( - hostname: string, - options: LookupAllOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void, - ): void; - export function lookup( - hostname: string, - options: LookupOptions, - callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void, - ): void; - export function lookup( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ): void; - export namespace lookup { - function __promisify__(hostname: string, options: LookupAllOptions): Promise; - function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; - function __promisify__(hostname: string, options: LookupOptions): Promise; - } - /** - * Resolves the given `address` and `port` into a host name and service using - * the operating system's underlying `getnameinfo` implementation. - * - * If `address` is not a valid IP address, a `TypeError` will be thrown. - * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. - * - * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object, - * where `err.code` is the error code. - * - * ```js - * import dns from 'node:dns'; - * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { - * console.log(hostname, service); - * // Prints: localhost ssh - * }); - * ``` - * - * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v22.x/api/util.html#utilpromisifyoriginal) ed - * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties. - * @since v0.11.14 - */ - export function lookupService( - address: string, - port: number, - callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void, - ): void; - export namespace lookupService { - function __promisify__( - address: string, - port: number, - ): Promise<{ - hostname: string; - service: string; - }>; - } - export interface ResolveOptions { - ttl: boolean; - } - export interface ResolveWithTtlOptions extends ResolveOptions { - ttl: true; - } - export interface RecordWithTtl { - address: string; - ttl: number; - } - /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */ - export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord; - export interface AnyARecord extends RecordWithTtl { - type: "A"; - } - export interface AnyAaaaRecord extends RecordWithTtl { - type: "AAAA"; - } - export interface CaaRecord { - critical: number; - issue?: string | undefined; - issuewild?: string | undefined; - iodef?: string | undefined; - contactemail?: string | undefined; - contactphone?: string | undefined; - } - export interface MxRecord { - priority: number; - exchange: string; - } - export interface AnyMxRecord extends MxRecord { - type: "MX"; - } - export interface NaptrRecord { - flags: string; - service: string; - regexp: string; - replacement: string; - order: number; - preference: number; - } - export interface AnyNaptrRecord extends NaptrRecord { - type: "NAPTR"; - } - export interface SoaRecord { - nsname: string; - hostmaster: string; - serial: number; - refresh: number; - retry: number; - expire: number; - minttl: number; - } - export interface AnySoaRecord extends SoaRecord { - type: "SOA"; - } - export interface SrvRecord { - priority: number; - weight: number; - port: number; - name: string; - } - export interface AnySrvRecord extends SrvRecord { - type: "SRV"; - } - export interface AnyTxtRecord { - type: "TXT"; - entries: string[]; - } - export interface AnyNsRecord { - type: "NS"; - value: string; - } - export interface AnyPtrRecord { - type: "PTR"; - value: string; - } - export interface AnyCnameRecord { - type: "CNAME"; - value: string; - } - export type AnyRecord = - | AnyARecord - | AnyAaaaRecord - | AnyCnameRecord - | AnyMxRecord - | AnyNaptrRecord - | AnyNsRecord - | AnyPtrRecord - | AnySoaRecord - | AnySrvRecord - | AnyTxtRecord; - /** - * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array - * of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource - * records. The type and structure of individual results varies based on `rrtype`: - * - * - * - * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object, - * where `err.code` is one of the `DNS error codes`. - * @since v0.1.27 - * @param hostname Host name to resolve. - * @param [rrtype='A'] Resource record type. - */ - export function resolve( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "A", - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "AAAA", - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "ANY", - callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "CNAME", - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "MX", - callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "NAPTR", - callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "NS", - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "PTR", - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "SOA", - callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "SRV", - callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "TXT", - callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: string, - callback: ( - err: NodeJS.ErrnoException | null, - addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[], - ) => void, - ): void; - export namespace resolve { - function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; - function __promisify__(hostname: string, rrtype: "ANY"): Promise; - function __promisify__(hostname: string, rrtype: "MX"): Promise; - function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; - function __promisify__(hostname: string, rrtype: "SOA"): Promise; - function __promisify__(hostname: string, rrtype: "SRV"): Promise; - function __promisify__(hostname: string, rrtype: "TXT"): Promise; - function __promisify__( - hostname: string, - rrtype: string, - ): Promise; - } - /** - * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`). - * @since v0.1.16 - * @param hostname Host name to resolve. - */ - export function resolve4( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export function resolve4( - hostname: string, - options: ResolveWithTtlOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, - ): void; - export function resolve4( - hostname: string, - options: ResolveOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, - ): void; - export namespace resolve4 { - function __promisify__(hostname: string): Promise; - function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; - function __promisify__(hostname: string, options?: ResolveOptions): Promise; - } - /** - * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of IPv6 addresses. - * @since v0.1.16 - * @param hostname Host name to resolve. - */ - export function resolve6( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export function resolve6( - hostname: string, - options: ResolveWithTtlOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, - ): void; - export function resolve6( - hostname: string, - options: ResolveOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, - ): void; - export namespace resolve6 { - function __promisify__(hostname: string): Promise; - function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; - function __promisify__(hostname: string, options?: ResolveOptions): Promise; - } - /** - * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`). - * @since v0.3.2 - */ - export function resolveCname( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export namespace resolveCname { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of certification authority authorization records - * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`). - * @since v15.0.0, v14.17.0 - */ - export function resolveCaa( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void, - ): void; - export namespace resolveCaa { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). - * @since v0.1.27 - */ - export function resolveMx( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, - ): void; - export namespace resolveMx { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of - * objects with the following properties: - * - * * `flags` - * * `service` - * * `regexp` - * * `replacement` - * * `order` - * * `preference` - * - * ```js - * { - * flags: 's', - * service: 'SIP+D2U', - * regexp: '', - * replacement: '_sip._udp.example.com', - * order: 30, - * preference: 100 - * } - * ``` - * @since v0.9.12 - */ - export function resolveNaptr( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, - ): void; - export namespace resolveNaptr { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`). - * @since v0.1.90 - */ - export function resolveNs( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export namespace resolveNs { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * be an array of strings containing the reply records. - * @since v6.0.0 - */ - export function resolvePtr( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export namespace resolvePtr { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for - * the `hostname`. The `address` argument passed to the `callback` function will - * be an object with the following properties: - * - * * `nsname` - * * `hostmaster` - * * `serial` - * * `refresh` - * * `retry` - * * `expire` - * * `minttl` - * - * ```js - * { - * nsname: 'ns.example.com', - * hostmaster: 'root.example.com', - * serial: 2013101809, - * refresh: 10000, - * retry: 2400, - * expire: 604800, - * minttl: 3600 - * } - * ``` - * @since v0.11.10 - */ - export function resolveSoa( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void, - ): void; - export namespace resolveSoa { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * be an array of objects with the following properties: - * - * * `priority` - * * `weight` - * * `port` - * * `name` - * - * ```js - * { - * priority: 10, - * weight: 5, - * port: 21223, - * name: 'service.example.com' - * } - * ``` - * @since v0.1.27 - */ - export function resolveSrv( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, - ): void; - export namespace resolveSrv { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a - * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of - * one record. Depending on the use case, these could be either joined together or - * treated separately. - * @since v0.1.27 - */ - export function resolveTxt( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, - ): void; - export namespace resolveTxt { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). - * The `ret` argument passed to the `callback` function will be an array containing - * various types of records. Each object has a property `type` that indicates the - * type of the current record. And depending on the `type`, additional properties - * will be present on the object: - * - * - * - * Here is an example of the `ret` object passed to the callback: - * - * ```js - * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, - * { type: 'CNAME', value: 'example.com' }, - * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, - * { type: 'NS', value: 'ns1.example.com' }, - * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, - * { type: 'SOA', - * nsname: 'ns1.example.com', - * hostmaster: 'admin.example.com', - * serial: 156696742, - * refresh: 900, - * retry: 900, - * expire: 1800, - * minttl: 60 } ] - * ``` - * - * DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see - * [RFC 8482](https://tools.ietf.org/html/rfc8482). - */ - export function resolveAny( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, - ): void; - export namespace resolveAny { - function __promisify__(hostname: string): Promise; - } - /** - * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an - * array of host names. - * - * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object, where `err.code` is - * one of the [DNS error codes](https://nodejs.org/docs/latest-v22.x/api/dns.html#error-codes). - * @since v0.1.16 - */ - export function reverse( - ip: string, - callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void, - ): void; - /** - * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options). - * The value could be: - * - * * `ipv4first`: for `order` defaulting to `ipv4first`. - * * `ipv6first`: for `order` defaulting to `ipv6first`. - * * `verbatim`: for `order` defaulting to `verbatim`. - * @since v18.17.0 - */ - export function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim"; - /** - * Sets the IP address and port of servers to be used when performing DNS - * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted - * addresses. If the port is the IANA default DNS port (53) it can be omitted. - * - * ```js - * dns.setServers([ - * '4.4.4.4', - * '[2001:4860:4860::8888]', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ]); - * ``` - * - * An error will be thrown if an invalid address is provided. - * - * The `dns.setServers()` method must not be called while a DNS query is in - * progress. - * - * The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}). - * - * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). - * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with - * subsequent servers provided. Fallback DNS servers will only be used if the - * earlier ones time out or result in some other error. - * @since v0.11.3 - * @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses - */ - export function setServers(servers: readonly string[]): void; - /** - * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), - * that are currently configured for DNS resolution. A string will include a port - * section if a custom port is used. - * - * ```js - * [ - * '4.4.4.4', - * '2001:4860:4860::8888', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ] - * ``` - * @since v0.11.3 - */ - export function getServers(): string[]; - /** - * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options). - * The value could be: - * - * * `ipv4first`: sets default `order` to `ipv4first`. - * * `ipv6first`: sets default `order` to `ipv6first`. - * * `verbatim`: sets default `order` to `verbatim`. - * - * The default is `verbatim` and {@link setDefaultResultOrder} have higher - * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using - * [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main - * thread won't affect the default dns orders in workers. - * @since v16.4.0, v14.18.0 - * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. - */ - export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; - // Error codes - export const NODATA: "ENODATA"; - export const FORMERR: "EFORMERR"; - export const SERVFAIL: "ESERVFAIL"; - export const NOTFOUND: "ENOTFOUND"; - export const NOTIMP: "ENOTIMP"; - export const REFUSED: "EREFUSED"; - export const BADQUERY: "EBADQUERY"; - export const BADNAME: "EBADNAME"; - export const BADFAMILY: "EBADFAMILY"; - export const BADRESP: "EBADRESP"; - export const CONNREFUSED: "ECONNREFUSED"; - export const TIMEOUT: "ETIMEOUT"; - export const EOF: "EOF"; - export const FILE: "EFILE"; - export const NOMEM: "ENOMEM"; - export const DESTRUCTION: "EDESTRUCTION"; - export const BADSTR: "EBADSTR"; - export const BADFLAGS: "EBADFLAGS"; - export const NONAME: "ENONAME"; - export const BADHINTS: "EBADHINTS"; - export const NOTINITIALIZED: "ENOTINITIALIZED"; - export const LOADIPHLPAPI: "ELOADIPHLPAPI"; - export const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; - export const CANCELLED: "ECANCELLED"; - export interface ResolverOptions { - /** - * Query timeout in milliseconds, or `-1` to use the default timeout. - */ - timeout?: number | undefined; - /** - * The number of tries the resolver will try contacting each name server before giving up. - * @default 4 - */ - tries?: number; - } - /** - * An independent resolver for DNS requests. - * - * Creating a new resolver uses the default server settings. Setting - * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnssetserversservers) does not affect - * other resolvers: - * - * ```js - * import { Resolver } from 'node:dns'; - * const resolver = new Resolver(); - * resolver.setServers(['4.4.4.4']); - * - * // This request will use the server at 4.4.4.4, independent of global settings. - * resolver.resolve4('example.org', (err, addresses) => { - * // ... - * }); - * ``` - * - * The following methods from the `node:dns` module are available: - * - * * `resolver.getServers()` - * * `resolver.resolve()` - * * `resolver.resolve4()` - * * `resolver.resolve6()` - * * `resolver.resolveAny()` - * * `resolver.resolveCaa()` - * * `resolver.resolveCname()` - * * `resolver.resolveMx()` - * * `resolver.resolveNaptr()` - * * `resolver.resolveNs()` - * * `resolver.resolvePtr()` - * * `resolver.resolveSoa()` - * * `resolver.resolveSrv()` - * * `resolver.resolveTxt()` - * * `resolver.reverse()` - * * `resolver.setServers()` - * @since v8.3.0 - */ - export class Resolver { - constructor(options?: ResolverOptions); - /** - * Cancel all outstanding DNS queries made by this resolver. The corresponding - * callbacks will be called with an error with code `ECANCELLED`. - * @since v8.3.0 - */ - cancel(): void; - getServers: typeof getServers; - resolve: typeof resolve; - resolve4: typeof resolve4; - resolve6: typeof resolve6; - resolveAny: typeof resolveAny; - resolveCaa: typeof resolveCaa; - resolveCname: typeof resolveCname; - resolveMx: typeof resolveMx; - resolveNaptr: typeof resolveNaptr; - resolveNs: typeof resolveNs; - resolvePtr: typeof resolvePtr; - resolveSoa: typeof resolveSoa; - resolveSrv: typeof resolveSrv; - resolveTxt: typeof resolveTxt; - reverse: typeof reverse; - /** - * The resolver instance will send its requests from the specified IP address. - * This allows programs to specify outbound interfaces when used on multi-homed - * systems. - * - * If a v4 or v6 address is not specified, it is set to the default and the - * operating system will choose a local address automatically. - * - * The resolver will use the v4 local address when making requests to IPv4 DNS - * servers, and the v6 local address when making requests to IPv6 DNS servers. - * The `rrtype` of resolution requests has no impact on the local address used. - * @since v15.1.0, v14.17.0 - * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. - * @param [ipv6='::0'] A string representation of an IPv6 address. - */ - setLocalAddress(ipv4?: string, ipv6?: string): void; - setServers: typeof setServers; - } - export { dnsPromises as promises }; -} -declare module "node:dns" { - export * from "dns"; -} diff --git a/web/static/node_modules/@types/node/dns/promises.d.ts b/web/static/node_modules/@types/node/dns/promises.d.ts deleted file mode 100644 index 2b5dff02..00000000 --- a/web/static/node_modules/@types/node/dns/promises.d.ts +++ /dev/null @@ -1,476 +0,0 @@ -/** - * The `dns.promises` API provides an alternative set of asynchronous DNS methods - * that return `Promise` objects rather than using callbacks. The API is accessible - * via `import { promises as dnsPromises } from 'node:dns'` or `import dnsPromises from 'node:dns/promises'`. - * @since v10.6.0 - */ -declare module "dns/promises" { - import { - AnyRecord, - CaaRecord, - LookupAddress, - LookupAllOptions, - LookupOneOptions, - LookupOptions, - MxRecord, - NaptrRecord, - RecordWithTtl, - ResolveOptions, - ResolverOptions, - ResolveWithTtlOptions, - SoaRecord, - SrvRecord, - } from "node:dns"; - /** - * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), - * that are currently configured for DNS resolution. A string will include a port - * section if a custom port is used. - * - * ```js - * [ - * '4.4.4.4', - * '2001:4860:4860::8888', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ] - * ``` - * @since v10.6.0 - */ - function getServers(): string[]; - /** - * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or - * AAAA (IPv6) record. All `option` properties are optional. If `options` is an - * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 - * and IPv6 addresses are both returned if found. - * - * With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`. - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. - * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when - * the host name does not exist but also when the lookup fails in other ways - * such as no available file descriptors. - * - * [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS - * protocol. The implementation uses an operating system facility that can - * associate names with addresses and vice versa. This implementation can have - * subtle but important consequences on the behavior of any Node.js program. Please - * take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before - * using `dnsPromises.lookup()`. - * - * Example usage: - * - * ```js - * import dns from 'node:dns'; - * const dnsPromises = dns.promises; - * const options = { - * family: 6, - * hints: dns.ADDRCONFIG | dns.V4MAPPED, - * }; - * - * dnsPromises.lookup('example.com', options).then((result) => { - * console.log('address: %j family: IPv%s', result.address, result.family); - * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 - * }); - * - * // When options.all is true, the result will be an Array. - * options.all = true; - * dnsPromises.lookup('example.com', options).then((result) => { - * console.log('addresses: %j', result); - * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] - * }); - * ``` - * @since v10.6.0 - */ - function lookup(hostname: string, family: number): Promise; - function lookup(hostname: string, options: LookupOneOptions): Promise; - function lookup(hostname: string, options: LookupAllOptions): Promise; - function lookup(hostname: string, options: LookupOptions): Promise; - function lookup(hostname: string): Promise; - /** - * Resolves the given `address` and `port` into a host name and service using - * the operating system's underlying `getnameinfo` implementation. - * - * If `address` is not a valid IP address, a `TypeError` will be thrown. - * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. - * - * ```js - * import dnsPromises from 'node:dns'; - * dnsPromises.lookupService('127.0.0.1', 22).then((result) => { - * console.log(result.hostname, result.service); - * // Prints: localhost ssh - * }); - * ``` - * @since v10.6.0 - */ - function lookupService( - address: string, - port: number, - ): Promise<{ - hostname: string; - service: string; - }>; - /** - * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array - * of the resource records. When successful, the `Promise` is resolved with an - * array of resource records. The type and structure of individual results vary - * based on `rrtype`: - * - * - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` - * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). - * @since v10.6.0 - * @param hostname Host name to resolve. - * @param [rrtype='A'] Resource record type. - */ - function resolve(hostname: string): Promise; - function resolve(hostname: string, rrtype: "A"): Promise; - function resolve(hostname: string, rrtype: "AAAA"): Promise; - function resolve(hostname: string, rrtype: "ANY"): Promise; - function resolve(hostname: string, rrtype: "CAA"): Promise; - function resolve(hostname: string, rrtype: "CNAME"): Promise; - function resolve(hostname: string, rrtype: "MX"): Promise; - function resolve(hostname: string, rrtype: "NAPTR"): Promise; - function resolve(hostname: string, rrtype: "NS"): Promise; - function resolve(hostname: string, rrtype: "PTR"): Promise; - function resolve(hostname: string, rrtype: "SOA"): Promise; - function resolve(hostname: string, rrtype: "SRV"): Promise; - function resolve(hostname: string, rrtype: "TXT"): Promise; - function resolve( - hostname: string, - rrtype: string, - ): Promise; - /** - * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4 - * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). - * @since v10.6.0 - * @param hostname Host name to resolve. - */ - function resolve4(hostname: string): Promise; - function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; - function resolve4(hostname: string, options: ResolveOptions): Promise; - /** - * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6 - * addresses. - * @since v10.6.0 - * @param hostname Host name to resolve. - */ - function resolve6(hostname: string): Promise; - function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; - function resolve6(hostname: string, options: ResolveOptions): Promise; - /** - * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). - * On success, the `Promise` is resolved with an array containing various types of - * records. Each object has a property `type` that indicates the type of the - * current record. And depending on the `type`, additional properties will be - * present on the object: - * - * - * - * Here is an example of the result object: - * - * ```js - * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, - * { type: 'CNAME', value: 'example.com' }, - * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, - * { type: 'NS', value: 'ns1.example.com' }, - * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, - * { type: 'SOA', - * nsname: 'ns1.example.com', - * hostmaster: 'admin.example.com', - * serial: 156696742, - * refresh: 900, - * retry: 900, - * expire: 1800, - * minttl: 60 } ] - * ``` - * @since v10.6.0 - */ - function resolveAny(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success, - * the `Promise` is resolved with an array of objects containing available - * certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`). - * @since v15.0.0, v14.17.0 - */ - function resolveCaa(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success, - * the `Promise` is resolved with an array of canonical name records available for - * the `hostname` (e.g. `['bar.example.com']`). - * @since v10.6.0 - */ - function resolveCname(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects - * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`). - * @since v10.6.0 - */ - function resolveMx(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array - * of objects with the following properties: - * - * * `flags` - * * `service` - * * `regexp` - * * `replacement` - * * `order` - * * `preference` - * - * ```js - * { - * flags: 's', - * service: 'SIP+D2U', - * regexp: '', - * replacement: '_sip._udp.example.com', - * order: 30, - * preference: 100 - * } - * ``` - * @since v10.6.0 - */ - function resolveNaptr(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server - * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`). - * @since v10.6.0 - */ - function resolveNs(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings - * containing the reply records. - * @since v10.6.0 - */ - function resolvePtr(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for - * the `hostname`. On success, the `Promise` is resolved with an object with the - * following properties: - * - * * `nsname` - * * `hostmaster` - * * `serial` - * * `refresh` - * * `retry` - * * `expire` - * * `minttl` - * - * ```js - * { - * nsname: 'ns.example.com', - * hostmaster: 'root.example.com', - * serial: 2013101809, - * refresh: 10000, - * retry: 2400, - * expire: 604800, - * minttl: 3600 - * } - * ``` - * @since v10.6.0 - */ - function resolveSoa(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with - * the following properties: - * - * * `priority` - * * `weight` - * * `port` - * * `name` - * - * ```js - * { - * priority: 10, - * weight: 5, - * port: 21223, - * name: 'service.example.com' - * } - * ``` - * @since v10.6.0 - */ - function resolveSrv(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array - * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of - * one record. Depending on the use case, these could be either joined together or - * treated separately. - * @since v10.6.0 - */ - function resolveTxt(hostname: string): Promise; - /** - * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an - * array of host names. - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` - * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). - * @since v10.6.0 - */ - function reverse(ip: string): Promise; - /** - * Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). - * The value could be: - * - * * `ipv4first`: for `verbatim` defaulting to `false`. - * * `verbatim`: for `verbatim` defaulting to `true`. - * @since v20.1.0 - */ - function getDefaultResultOrder(): "ipv4first" | "verbatim"; - /** - * Sets the IP address and port of servers to be used when performing DNS - * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted - * addresses. If the port is the IANA default DNS port (53) it can be omitted. - * - * ```js - * dnsPromises.setServers([ - * '4.4.4.4', - * '[2001:4860:4860::8888]', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ]); - * ``` - * - * An error will be thrown if an invalid address is provided. - * - * The `dnsPromises.setServers()` method must not be called while a DNS query is in - * progress. - * - * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). - * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with - * subsequent servers provided. Fallback DNS servers will only be used if the - * earlier ones time out or result in some other error. - * @since v10.6.0 - * @param servers array of `RFC 5952` formatted addresses - */ - function setServers(servers: readonly string[]): void; - /** - * Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be: - * - * * `ipv4first`: sets default `order` to `ipv4first`. - * * `ipv6first`: sets default `order` to `ipv6first`. - * * `verbatim`: sets default `order` to `verbatim`. - * - * The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) - * have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). - * When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) - * from the main thread won't affect the default dns orders in workers. - * @since v16.4.0, v14.18.0 - * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. - */ - function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; - // Error codes - const NODATA: "ENODATA"; - const FORMERR: "EFORMERR"; - const SERVFAIL: "ESERVFAIL"; - const NOTFOUND: "ENOTFOUND"; - const NOTIMP: "ENOTIMP"; - const REFUSED: "EREFUSED"; - const BADQUERY: "EBADQUERY"; - const BADNAME: "EBADNAME"; - const BADFAMILY: "EBADFAMILY"; - const BADRESP: "EBADRESP"; - const CONNREFUSED: "ECONNREFUSED"; - const TIMEOUT: "ETIMEOUT"; - const EOF: "EOF"; - const FILE: "EFILE"; - const NOMEM: "ENOMEM"; - const DESTRUCTION: "EDESTRUCTION"; - const BADSTR: "EBADSTR"; - const BADFLAGS: "EBADFLAGS"; - const NONAME: "ENONAME"; - const BADHINTS: "EBADHINTS"; - const NOTINITIALIZED: "ENOTINITIALIZED"; - const LOADIPHLPAPI: "ELOADIPHLPAPI"; - const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; - const CANCELLED: "ECANCELLED"; - - /** - * An independent resolver for DNS requests. - * - * Creating a new resolver uses the default server settings. Setting - * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect - * other resolvers: - * - * ```js - * import { promises } from 'node:dns'; - * const resolver = new promises.Resolver(); - * resolver.setServers(['4.4.4.4']); - * - * // This request will use the server at 4.4.4.4, independent of global settings. - * resolver.resolve4('example.org').then((addresses) => { - * // ... - * }); - * - * // Alternatively, the same code can be written using async-await style. - * (async function() { - * const addresses = await resolver.resolve4('example.org'); - * })(); - * ``` - * - * The following methods from the `dnsPromises` API are available: - * - * * `resolver.getServers()` - * * `resolver.resolve()` - * * `resolver.resolve4()` - * * `resolver.resolve6()` - * * `resolver.resolveAny()` - * * `resolver.resolveCaa()` - * * `resolver.resolveCname()` - * * `resolver.resolveMx()` - * * `resolver.resolveNaptr()` - * * `resolver.resolveNs()` - * * `resolver.resolvePtr()` - * * `resolver.resolveSoa()` - * * `resolver.resolveSrv()` - * * `resolver.resolveTxt()` - * * `resolver.reverse()` - * * `resolver.setServers()` - * @since v10.6.0 - */ - class Resolver { - constructor(options?: ResolverOptions); - /** - * Cancel all outstanding DNS queries made by this resolver. The corresponding - * callbacks will be called with an error with code `ECANCELLED`. - * @since v8.3.0 - */ - cancel(): void; - getServers: typeof getServers; - resolve: typeof resolve; - resolve4: typeof resolve4; - resolve6: typeof resolve6; - resolveAny: typeof resolveAny; - resolveCaa: typeof resolveCaa; - resolveCname: typeof resolveCname; - resolveMx: typeof resolveMx; - resolveNaptr: typeof resolveNaptr; - resolveNs: typeof resolveNs; - resolvePtr: typeof resolvePtr; - resolveSoa: typeof resolveSoa; - resolveSrv: typeof resolveSrv; - resolveTxt: typeof resolveTxt; - reverse: typeof reverse; - /** - * The resolver instance will send its requests from the specified IP address. - * This allows programs to specify outbound interfaces when used on multi-homed - * systems. - * - * If a v4 or v6 address is not specified, it is set to the default and the - * operating system will choose a local address automatically. - * - * The resolver will use the v4 local address when making requests to IPv4 DNS - * servers, and the v6 local address when making requests to IPv6 DNS servers. - * The `rrtype` of resolution requests has no impact on the local address used. - * @since v15.1.0, v14.17.0 - * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. - * @param [ipv6='::0'] A string representation of an IPv6 address. - */ - setLocalAddress(ipv4?: string, ipv6?: string): void; - setServers: typeof setServers; - } -} -declare module "node:dns/promises" { - export * from "dns/promises"; -} diff --git a/web/static/node_modules/@types/node/dom-events.d.ts b/web/static/node_modules/@types/node/dom-events.d.ts deleted file mode 100644 index f47f71d6..00000000 --- a/web/static/node_modules/@types/node/dom-events.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -export {}; // Don't export anything! - -//// DOM-like Events -// NB: The Event / EventTarget / EventListener implementations below were copied -// from lib.dom.d.ts, then edited to reflect Node's documentation at -// https://nodejs.org/api/events.html#class-eventtarget. -// Please read that link to understand important implementation differences. - -// This conditional type will be the existing global Event in a browser, or -// the copy below in a Node environment. -type __Event = typeof globalThis extends { onmessage: any; Event: any } ? {} - : { - /** This is not used in Node.js and is provided purely for completeness. */ - readonly bubbles: boolean; - /** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */ - cancelBubble: () => void; - /** True if the event was created with the cancelable option */ - readonly cancelable: boolean; - /** This is not used in Node.js and is provided purely for completeness. */ - readonly composed: boolean; - /** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */ - composedPath(): [EventTarget?]; - /** Alias for event.target. */ - readonly currentTarget: EventTarget | null; - /** Is true if cancelable is true and event.preventDefault() has been called. */ - readonly defaultPrevented: boolean; - /** This is not used in Node.js and is provided purely for completeness. */ - readonly eventPhase: 0 | 2; - /** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */ - readonly isTrusted: boolean; - /** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */ - preventDefault(): void; - /** This is not used in Node.js and is provided purely for completeness. */ - returnValue: boolean; - /** Alias for event.target. */ - readonly srcElement: EventTarget | null; - /** Stops the invocation of event listeners after the current one completes. */ - stopImmediatePropagation(): void; - /** This is not used in Node.js and is provided purely for completeness. */ - stopPropagation(): void; - /** The `EventTarget` dispatching the event */ - readonly target: EventTarget | null; - /** The millisecond timestamp when the Event object was created. */ - readonly timeStamp: number; - /** Returns the type of event, e.g. "click", "hashchange", or "submit". */ - readonly type: string; - }; - -// See comment above explaining conditional type -type __EventTarget = typeof globalThis extends { onmessage: any; EventTarget: any } ? {} - : { - /** - * Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value. - * - * If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched. - * - * The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification. - * Specifically, the `capture` option is used as part of the key when registering a `listener`. - * Any individual `listener` may be added once with `capture = false`, and once with `capture = true`. - */ - addEventListener( - type: string, - listener: EventListener | EventListenerObject, - options?: AddEventListenerOptions | boolean, - ): void; - /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */ - dispatchEvent(event: Event): boolean; - /** Removes the event listener in target's event listener list with the same type, callback, and options. */ - removeEventListener( - type: string, - listener: EventListener | EventListenerObject, - options?: EventListenerOptions | boolean, - ): void; - }; - -interface EventInit { - bubbles?: boolean; - cancelable?: boolean; - composed?: boolean; -} - -interface EventListenerOptions { - /** Not directly used by Node.js. Added for API completeness. Default: `false`. */ - capture?: boolean; -} - -interface AddEventListenerOptions extends EventListenerOptions { - /** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */ - once?: boolean; - /** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */ - passive?: boolean; - /** The listener will be removed when the given AbortSignal object's `abort()` method is called. */ - signal?: AbortSignal; -} - -interface EventListener { - (evt: Event): void; -} - -interface EventListenerObject { - handleEvent(object: Event): void; -} - -import {} from "events"; // Make this an ambient declaration -declare global { - /** An event which takes place in the DOM. */ - interface Event extends __Event {} - var Event: typeof globalThis extends { onmessage: any; Event: infer T } ? T - : { - prototype: __Event; - new(type: string, eventInitDict?: EventInit): __Event; - }; - - /** - * EventTarget is a DOM interface implemented by objects that can - * receive events and may have listeners for them. - */ - interface EventTarget extends __EventTarget {} - var EventTarget: typeof globalThis extends { onmessage: any; EventTarget: infer T } ? T - : { - prototype: __EventTarget; - new(): __EventTarget; - }; -} diff --git a/web/static/node_modules/@types/node/domain.d.ts b/web/static/node_modules/@types/node/domain.d.ts deleted file mode 100644 index ba8a02c1..00000000 --- a/web/static/node_modules/@types/node/domain.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -/** - * **This module is pending deprecation.** Once a replacement API has been - * finalized, this module will be fully deprecated. Most developers should - * **not** have cause to use this module. Users who absolutely must have - * the functionality that domains provide may rely on it for the time being - * but should expect to have to migrate to a different solution - * in the future. - * - * Domains provide a way to handle multiple different IO operations as a - * single group. If any of the event emitters or callbacks registered to a - * domain emit an `'error'` event, or throw an error, then the domain object - * will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to - * exit immediately with an error code. - * @deprecated Since v1.4.2 - Deprecated - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/domain.js) - */ -declare module "domain" { - import EventEmitter = require("node:events"); - /** - * The `Domain` class encapsulates the functionality of routing errors and - * uncaught exceptions to the active `Domain` object. - * - * To handle the errors that it catches, listen to its `'error'` event. - */ - class Domain extends EventEmitter { - /** - * An array of timers and event emitters that have been explicitly added - * to the domain. - */ - members: Array; - /** - * The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly - * pushes the domain onto the domain - * stack managed by the domain module (see {@link exit} for details on the - * domain stack). The call to `enter()` delimits the beginning of a chain of - * asynchronous calls and I/O operations bound to a domain. - * - * Calling `enter()` changes only the active domain, and does not alter the domain - * itself. `enter()` and `exit()` can be called an arbitrary number of times on a - * single domain. - */ - enter(): void; - /** - * The `exit()` method exits the current domain, popping it off the domain stack. - * Any time execution is going to switch to the context of a different chain of - * asynchronous calls, it's important to ensure that the current domain is exited. - * The call to `exit()` delimits either the end of or an interruption to the chain - * of asynchronous calls and I/O operations bound to a domain. - * - * If there are multiple, nested domains bound to the current execution context, `exit()` will exit any domains nested within this domain. - * - * Calling `exit()` changes only the active domain, and does not alter the domain - * itself. `enter()` and `exit()` can be called an arbitrary number of times on a - * single domain. - */ - exit(): void; - /** - * Run the supplied function in the context of the domain, implicitly - * binding all event emitters, timers, and low-level requests that are - * created in that context. Optionally, arguments can be passed to - * the function. - * - * This is the most basic way to use a domain. - * - * ```js - * import domain from 'node:domain'; - * import fs from 'node:fs'; - * const d = domain.create(); - * d.on('error', (er) => { - * console.error('Caught error!', er); - * }); - * d.run(() => { - * process.nextTick(() => { - * setTimeout(() => { // Simulating some various async stuff - * fs.open('non-existent file', 'r', (er, fd) => { - * if (er) throw er; - * // proceed... - * }); - * }, 100); - * }); - * }); - * ``` - * - * In this example, the `d.on('error')` handler will be triggered, rather - * than crashing the program. - */ - run(fn: (...args: any[]) => T, ...args: any[]): T; - /** - * Explicitly adds an emitter to the domain. If any event handlers called by - * the emitter throw an error, or if the emitter emits an `'error'` event, it - * will be routed to the domain's `'error'` event, just like with implicit - * binding. - * - * This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by - * the domain `'error'` handler. - * - * If the Timer or `EventEmitter` was already bound to a domain, it is removed - * from that one, and bound to this one instead. - * @param emitter emitter or timer to be added to the domain - */ - add(emitter: EventEmitter | NodeJS.Timer): void; - /** - * The opposite of {@link add}. Removes domain handling from the - * specified emitter. - * @param emitter emitter or timer to be removed from the domain - */ - remove(emitter: EventEmitter | NodeJS.Timer): void; - /** - * The returned function will be a wrapper around the supplied callback - * function. When the returned function is called, any errors that are - * thrown will be routed to the domain's `'error'` event. - * - * ```js - * const d = domain.create(); - * - * function readSomeFile(filename, cb) { - * fs.readFile(filename, 'utf8', d.bind((er, data) => { - * // If this throws, it will also be passed to the domain. - * return cb(er, data ? JSON.parse(data) : null); - * })); - * } - * - * d.on('error', (er) => { - * // An error occurred somewhere. If we throw it now, it will crash the program - * // with the normal line number and stack message. - * }); - * ``` - * @param callback The callback function - * @return The bound function - */ - bind(callback: T): T; - /** - * This method is almost identical to {@link bind}. However, in - * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function. - * - * In this way, the common `if (err) return callback(err);` pattern can be replaced - * with a single error handler in a single place. - * - * ```js - * const d = domain.create(); - * - * function readSomeFile(filename, cb) { - * fs.readFile(filename, 'utf8', d.intercept((data) => { - * // Note, the first argument is never passed to the - * // callback since it is assumed to be the 'Error' argument - * // and thus intercepted by the domain. - * - * // If this throws, it will also be passed to the domain - * // so the error-handling logic can be moved to the 'error' - * // event on the domain instead of being repeated throughout - * // the program. - * return cb(null, JSON.parse(data)); - * })); - * } - * - * d.on('error', (er) => { - * // An error occurred somewhere. If we throw it now, it will crash the program - * // with the normal line number and stack message. - * }); - * ``` - * @param callback The callback function - * @return The intercepted function - */ - intercept(callback: T): T; - } - function create(): Domain; -} -declare module "node:domain" { - export * from "domain"; -} diff --git a/web/static/node_modules/@types/node/events.d.ts b/web/static/node_modules/@types/node/events.d.ts deleted file mode 100644 index 63b94336..00000000 --- a/web/static/node_modules/@types/node/events.d.ts +++ /dev/null @@ -1,931 +0,0 @@ -/** - * Much of the Node.js core API is built around an idiomatic asynchronous - * event-driven architecture in which certain kinds of objects (called "emitters") - * emit named events that cause `Function` objects ("listeners") to be called. - * - * For instance: a `net.Server` object emits an event each time a peer - * connects to it; a `fs.ReadStream` emits an event when the file is opened; - * a `stream` emits an event whenever data is available to be read. - * - * All objects that emit events are instances of the `EventEmitter` class. These - * objects expose an `eventEmitter.on()` function that allows one or more - * functions to be attached to named events emitted by the object. Typically, - * event names are camel-cased strings but any valid JavaScript property key - * can be used. - * - * When the `EventEmitter` object emits an event, all of the functions attached - * to that specific event are called _synchronously_. Any values returned by the - * called listeners are _ignored_ and discarded. - * - * The following example shows a simple `EventEmitter` instance with a single - * listener. The `eventEmitter.on()` method is used to register listeners, while - * the `eventEmitter.emit()` method is used to trigger the event. - * - * ```js - * import { EventEmitter } from 'node:events'; - * - * class MyEmitter extends EventEmitter {} - * - * const myEmitter = new MyEmitter(); - * myEmitter.on('event', () => { - * console.log('an event occurred!'); - * }); - * myEmitter.emit('event'); - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/events.js) - */ -declare module "events" { - import { AsyncResource, AsyncResourceOptions } from "node:async_hooks"; - // NOTE: This class is in the docs but is **not actually exported** by Node. - // If https://github.com/nodejs/node/issues/39903 gets resolved and Node - // actually starts exporting the class, uncomment below. - // import { EventListener, EventListenerObject } from '__dom-events'; - // /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */ - // interface NodeEventTarget extends EventTarget { - // /** - // * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API. - // * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget. - // */ - // addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this; - // /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */ - // eventNames(): string[]; - // /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */ - // listenerCount(type: string): number; - // /** Node.js-specific alias for `eventTarget.removeListener()`. */ - // off(type: string, listener: EventListener | EventListenerObject): this; - // /** Node.js-specific alias for `eventTarget.addListener()`. */ - // on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this; - // /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */ - // once(type: string, listener: EventListener | EventListenerObject): this; - // /** - // * Node.js-specific extension to the `EventTarget` class. - // * If `type` is specified, removes all registered listeners for `type`, - // * otherwise removes all registered listeners. - // */ - // removeAllListeners(type: string): this; - // /** - // * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`. - // * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`. - // */ - // removeListener(type: string, listener: EventListener | EventListenerObject): this; - // } - interface EventEmitterOptions { - /** - * Enables automatic capturing of promise rejection. - */ - captureRejections?: boolean | undefined; - } - interface StaticEventEmitterOptions { - /** - * Can be used to cancel awaiting events. - */ - signal?: AbortSignal | undefined; - } - interface StaticEventEmitterIteratorOptions extends StaticEventEmitterOptions { - /** - * Names of events that will end the iteration. - */ - close?: string[] | undefined; - /** - * The high watermark. The emitter is paused every time the size of events being buffered is higher than it. - * Supported only on emitters implementing `pause()` and `resume()` methods. - * @default Number.MAX_SAFE_INTEGER - */ - highWaterMark?: number | undefined; - /** - * The low watermark. The emitter is resumed every time the size of events being buffered is lower than it. - * Supported only on emitters implementing `pause()` and `resume()` methods. - * @default 1 - */ - lowWaterMark?: number | undefined; - } - interface EventEmitter = DefaultEventMap> extends NodeJS.EventEmitter {} - type EventMap = Record | DefaultEventMap; - type DefaultEventMap = [never]; - type AnyRest = [...args: any[]]; - type Args = T extends DefaultEventMap ? AnyRest : ( - K extends keyof T ? T[K] : never - ); - type Key = T extends DefaultEventMap ? string | symbol : K | keyof T; - type Key2 = T extends DefaultEventMap ? string | symbol : K & keyof T; - type Listener = T extends DefaultEventMap ? F : ( - K extends keyof T ? ( - T[K] extends unknown[] ? (...args: T[K]) => void : never - ) - : never - ); - type Listener1 = Listener void>; - type Listener2 = Listener; - - /** - * The `EventEmitter` class is defined and exposed by the `node:events` module: - * - * ```js - * import { EventEmitter } from 'node:events'; - * ``` - * - * All `EventEmitter`s emit the event `'newListener'` when new listeners are - * added and `'removeListener'` when existing listeners are removed. - * - * It supports the following option: - * @since v0.1.26 - */ - class EventEmitter = DefaultEventMap> { - constructor(options?: EventEmitterOptions); - - [EventEmitter.captureRejectionSymbol]?(error: Error, event: Key, ...args: Args): void; - - /** - * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given - * event or that is rejected if the `EventEmitter` emits `'error'` while waiting. - * The `Promise` will resolve with an array of all the arguments emitted to the - * given event. - * - * This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event - * semantics and does not listen to the `'error'` event. - * - * ```js - * import { once, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ee = new EventEmitter(); - * - * process.nextTick(() => { - * ee.emit('myevent', 42); - * }); - * - * const [value] = await once(ee, 'myevent'); - * console.log(value); - * - * const err = new Error('kaboom'); - * process.nextTick(() => { - * ee.emit('error', err); - * }); - * - * try { - * await once(ee, 'myevent'); - * } catch (err) { - * console.error('error happened', err); - * } - * ``` - * - * The special handling of the `'error'` event is only used when `events.once()` is used to wait for another event. If `events.once()` is used to wait for the - * '`error'` event itself, then it is treated as any other kind of event without - * special handling: - * - * ```js - * import { EventEmitter, once } from 'node:events'; - * - * const ee = new EventEmitter(); - * - * once(ee, 'error') - * .then(([err]) => console.log('ok', err.message)) - * .catch((err) => console.error('error', err.message)); - * - * ee.emit('error', new Error('boom')); - * - * // Prints: ok boom - * ``` - * - * An `AbortSignal` can be used to cancel waiting for the event: - * - * ```js - * import { EventEmitter, once } from 'node:events'; - * - * const ee = new EventEmitter(); - * const ac = new AbortController(); - * - * async function foo(emitter, event, signal) { - * try { - * await once(emitter, event, { signal }); - * console.log('event emitted!'); - * } catch (error) { - * if (error.name === 'AbortError') { - * console.error('Waiting for the event was canceled!'); - * } else { - * console.error('There was an error', error.message); - * } - * } - * } - * - * foo(ee, 'foo', ac.signal); - * ac.abort(); // Abort waiting for the event - * ee.emit('foo'); // Prints: Waiting for the event was canceled! - * ``` - * @since v11.13.0, v10.16.0 - */ - static once( - emitter: NodeJS.EventEmitter, - eventName: string | symbol, - options?: StaticEventEmitterOptions, - ): Promise; - static once(emitter: EventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise; - /** - * ```js - * import { on, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ee = new EventEmitter(); - * - * // Emit later on - * process.nextTick(() => { - * ee.emit('foo', 'bar'); - * ee.emit('foo', 42); - * }); - * - * for await (const event of on(ee, 'foo')) { - * // The execution of this inner block is synchronous and it - * // processes one event at a time (even with await). Do not use - * // if concurrent execution is required. - * console.log(event); // prints ['bar'] [42] - * } - * // Unreachable here - * ``` - * - * Returns an `AsyncIterator` that iterates `eventName` events. It will throw - * if the `EventEmitter` emits `'error'`. It removes all listeners when - * exiting the loop. The `value` returned by each iteration is an array - * composed of the emitted event arguments. - * - * An `AbortSignal` can be used to cancel waiting on events: - * - * ```js - * import { on, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ac = new AbortController(); - * - * (async () => { - * const ee = new EventEmitter(); - * - * // Emit later on - * process.nextTick(() => { - * ee.emit('foo', 'bar'); - * ee.emit('foo', 42); - * }); - * - * for await (const event of on(ee, 'foo', { signal: ac.signal })) { - * // The execution of this inner block is synchronous and it - * // processes one event at a time (even with await). Do not use - * // if concurrent execution is required. - * console.log(event); // prints ['bar'] [42] - * } - * // Unreachable here - * })(); - * - * process.nextTick(() => ac.abort()); - * ``` - * - * Use the `close` option to specify an array of event names that will end the iteration: - * - * ```js - * import { on, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ee = new EventEmitter(); - * - * // Emit later on - * process.nextTick(() => { - * ee.emit('foo', 'bar'); - * ee.emit('foo', 42); - * ee.emit('close'); - * }); - * - * for await (const event of on(ee, 'foo', { close: ['close'] })) { - * console.log(event); // prints ['bar'] [42] - * } - * // the loop will exit after 'close' is emitted - * console.log('done'); // prints 'done' - * ``` - * @since v13.6.0, v12.16.0 - * @return An `AsyncIterator` that iterates `eventName` events emitted by the `emitter` - */ - static on( - emitter: NodeJS.EventEmitter, - eventName: string | symbol, - options?: StaticEventEmitterIteratorOptions, - ): NodeJS.AsyncIterator; - static on( - emitter: EventTarget, - eventName: string, - options?: StaticEventEmitterIteratorOptions, - ): NodeJS.AsyncIterator; - /** - * A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`. - * - * ```js - * import { EventEmitter, listenerCount } from 'node:events'; - * - * const myEmitter = new EventEmitter(); - * myEmitter.on('event', () => {}); - * myEmitter.on('event', () => {}); - * console.log(listenerCount(myEmitter, 'event')); - * // Prints: 2 - * ``` - * @since v0.9.12 - * @deprecated Since v3.2.0 - Use `listenerCount` instead. - * @param emitter The emitter to query - * @param eventName The event name - */ - static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number; - /** - * Returns a copy of the array of listeners for the event named `eventName`. - * - * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on - * the emitter. - * - * For `EventTarget`s this is the only way to get the event listeners for the - * event target. This is useful for debugging and diagnostic purposes. - * - * ```js - * import { getEventListeners, EventEmitter } from 'node:events'; - * - * { - * const ee = new EventEmitter(); - * const listener = () => console.log('Events are fun'); - * ee.on('foo', listener); - * console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ] - * } - * { - * const et = new EventTarget(); - * const listener = () => console.log('Events are fun'); - * et.addEventListener('foo', listener); - * console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ] - * } - * ``` - * @since v15.2.0, v14.17.0 - */ - static getEventListeners(emitter: EventTarget | NodeJS.EventEmitter, name: string | symbol): Function[]; - /** - * Returns the currently set max amount of listeners. - * - * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on - * the emitter. - * - * For `EventTarget`s this is the only way to get the max event listeners for the - * event target. If the number of event handlers on a single EventTarget exceeds - * the max set, the EventTarget will print a warning. - * - * ```js - * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events'; - * - * { - * const ee = new EventEmitter(); - * console.log(getMaxListeners(ee)); // 10 - * setMaxListeners(11, ee); - * console.log(getMaxListeners(ee)); // 11 - * } - * { - * const et = new EventTarget(); - * console.log(getMaxListeners(et)); // 10 - * setMaxListeners(11, et); - * console.log(getMaxListeners(et)); // 11 - * } - * ``` - * @since v19.9.0 - */ - static getMaxListeners(emitter: EventTarget | NodeJS.EventEmitter): number; - /** - * ```js - * import { setMaxListeners, EventEmitter } from 'node:events'; - * - * const target = new EventTarget(); - * const emitter = new EventEmitter(); - * - * setMaxListeners(5, target, emitter); - * ``` - * @since v15.4.0 - * @param n A non-negative number. The maximum number of listeners per `EventTarget` event. - * @param eventTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter} - * objects. - */ - static setMaxListeners(n?: number, ...eventTargets: Array): void; - /** - * Listens once to the `abort` event on the provided `signal`. - * - * Listening to the `abort` event on abort signals is unsafe and may - * lead to resource leaks since another third party with the signal can - * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change - * this since it would violate the web standard. Additionally, the original - * API makes it easy to forget to remove listeners. - * - * This API allows safely using `AbortSignal`s in Node.js APIs by solving these - * two issues by listening to the event such that `stopImmediatePropagation` does - * not prevent the listener from running. - * - * Returns a disposable so that it may be unsubscribed from more easily. - * - * ```js - * import { addAbortListener } from 'node:events'; - * - * function example(signal) { - * let disposable; - * try { - * signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); - * disposable = addAbortListener(signal, (e) => { - * // Do something when signal is aborted. - * }); - * } finally { - * disposable?.[Symbol.dispose](); - * } - * } - * ``` - * @since v20.5.0 - * @experimental - * @return Disposable that removes the `abort` listener. - */ - static addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable; - /** - * This symbol shall be used to install a listener for only monitoring `'error'` events. Listeners installed using this symbol are called before the regular `'error'` listeners are called. - * - * Installing a listener using this symbol does not change the behavior once an `'error'` event is emitted. Therefore, the process will still crash if no - * regular `'error'` listener is installed. - * @since v13.6.0, v12.17.0 - */ - static readonly errorMonitor: unique symbol; - /** - * Value: `Symbol.for('nodejs.rejection')` - * - * See how to write a custom `rejection handler`. - * @since v13.4.0, v12.16.0 - */ - static readonly captureRejectionSymbol: unique symbol; - /** - * Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) - * - * Change the default `captureRejections` option on all new `EventEmitter` objects. - * @since v13.4.0, v12.16.0 - */ - static captureRejections: boolean; - /** - * By default, a maximum of `10` listeners can be registered for any single - * event. This limit can be changed for individual `EventEmitter` instances - * using the `emitter.setMaxListeners(n)` method. To change the default - * for _all_`EventEmitter` instances, the `events.defaultMaxListeners` property - * can be used. If this value is not a positive number, a `RangeError` is thrown. - * - * Take caution when setting the `events.defaultMaxListeners` because the - * change affects _all_ `EventEmitter` instances, including those created before - * the change is made. However, calling `emitter.setMaxListeners(n)` still has - * precedence over `events.defaultMaxListeners`. - * - * This is not a hard limit. The `EventEmitter` instance will allow - * more listeners to be added but will output a trace warning to stderr indicating - * that a "possible EventEmitter memory leak" has been detected. For any single - * `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` methods can be used to - * temporarily avoid this warning: - * - * ```js - * import { EventEmitter } from 'node:events'; - * const emitter = new EventEmitter(); - * emitter.setMaxListeners(emitter.getMaxListeners() + 1); - * emitter.once('event', () => { - * // do stuff - * emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); - * }); - * ``` - * - * The `--trace-warnings` command-line flag can be used to display the - * stack trace for such warnings. - * - * The emitted warning can be inspected with `process.on('warning')` and will - * have the additional `emitter`, `type`, and `count` properties, referring to - * the event emitter instance, the event's name and the number of attached - * listeners, respectively. - * Its `name` property is set to `'MaxListenersExceededWarning'`. - * @since v0.11.2 - */ - static defaultMaxListeners: number; - } - import internal = require("node:events"); - namespace EventEmitter { - // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4 - export { internal as EventEmitter }; - export interface Abortable { - /** - * When provided the corresponding `AbortController` can be used to cancel an asynchronous action. - */ - signal?: AbortSignal | undefined; - } - - export interface EventEmitterReferencingAsyncResource extends AsyncResource { - readonly eventEmitter: EventEmitterAsyncResource; - } - - export interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions { - /** - * The type of async event, this is required when instantiating `EventEmitterAsyncResource` - * directly rather than as a child class. - * @default new.target.name if instantiated as a child class. - */ - name?: string; - } - - /** - * Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that - * require manual async tracking. Specifically, all events emitted by instances - * of `events.EventEmitterAsyncResource` will run within its `async context`. - * - * ```js - * import { EventEmitterAsyncResource, EventEmitter } from 'node:events'; - * import { notStrictEqual, strictEqual } from 'node:assert'; - * import { executionAsyncId, triggerAsyncId } from 'node:async_hooks'; - * - * // Async tracking tooling will identify this as 'Q'. - * const ee1 = new EventEmitterAsyncResource({ name: 'Q' }); - * - * // 'foo' listeners will run in the EventEmitters async context. - * ee1.on('foo', () => { - * strictEqual(executionAsyncId(), ee1.asyncId); - * strictEqual(triggerAsyncId(), ee1.triggerAsyncId); - * }); - * - * const ee2 = new EventEmitter(); - * - * // 'foo' listeners on ordinary EventEmitters that do not track async - * // context, however, run in the same async context as the emit(). - * ee2.on('foo', () => { - * notStrictEqual(executionAsyncId(), ee2.asyncId); - * notStrictEqual(triggerAsyncId(), ee2.triggerAsyncId); - * }); - * - * Promise.resolve().then(() => { - * ee1.emit('foo'); - * ee2.emit('foo'); - * }); - * ``` - * - * The `EventEmitterAsyncResource` class has the same methods and takes the - * same options as `EventEmitter` and `AsyncResource` themselves. - * @since v17.4.0, v16.14.0 - */ - export class EventEmitterAsyncResource extends EventEmitter { - /** - * @param options Only optional in child class. - */ - constructor(options?: EventEmitterAsyncResourceOptions); - /** - * Call all `destroy` hooks. This should only ever be called once. An error will - * be thrown if it is called more than once. This **must** be manually called. If - * the resource is left to be collected by the GC then the `destroy` hooks will - * never be called. - */ - emitDestroy(): void; - /** - * The unique `asyncId` assigned to the resource. - */ - readonly asyncId: number; - /** - * The same triggerAsyncId that is passed to the AsyncResource constructor. - */ - readonly triggerAsyncId: number; - /** - * The returned `AsyncResource` object has an additional `eventEmitter` property - * that provides a reference to this `EventEmitterAsyncResource`. - */ - readonly asyncResource: EventEmitterReferencingAsyncResource; - } - } - global { - namespace NodeJS { - interface EventEmitter = DefaultEventMap> { - [EventEmitter.captureRejectionSymbol]?(error: Error, event: Key, ...args: Args): void; - /** - * Alias for `emitter.on(eventName, listener)`. - * @since v0.1.26 - */ - addListener(eventName: Key, listener: Listener1): this; - /** - * Adds the `listener` function to the end of the listeners array for the event - * named `eventName`. No checks are made to see if the `listener` has already - * been added. Multiple calls passing the same combination of `eventName` and - * `listener` will result in the `listener` being added, and called, multiple times. - * - * ```js - * server.on('connection', (stream) => { - * console.log('someone connected!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * By default, event listeners are invoked in the order they are added. The `emitter.prependListener()` method can be used as an alternative to add the - * event listener to the beginning of the listeners array. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const myEE = new EventEmitter(); - * myEE.on('foo', () => console.log('a')); - * myEE.prependListener('foo', () => console.log('b')); - * myEE.emit('foo'); - * // Prints: - * // b - * // a - * ``` - * @since v0.1.101 - * @param eventName The name of the event. - * @param listener The callback function - */ - on(eventName: Key, listener: Listener1): this; - /** - * Adds a **one-time** `listener` function for the event named `eventName`. The - * next time `eventName` is triggered, this listener is removed and then invoked. - * - * ```js - * server.once('connection', (stream) => { - * console.log('Ah, we have our first user!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * By default, event listeners are invoked in the order they are added. The `emitter.prependOnceListener()` method can be used as an alternative to add the - * event listener to the beginning of the listeners array. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const myEE = new EventEmitter(); - * myEE.once('foo', () => console.log('a')); - * myEE.prependOnceListener('foo', () => console.log('b')); - * myEE.emit('foo'); - * // Prints: - * // b - * // a - * ``` - * @since v0.3.0 - * @param eventName The name of the event. - * @param listener The callback function - */ - once(eventName: Key, listener: Listener1): this; - /** - * Removes the specified `listener` from the listener array for the event named `eventName`. - * - * ```js - * const callback = (stream) => { - * console.log('someone connected!'); - * }; - * server.on('connection', callback); - * // ... - * server.removeListener('connection', callback); - * ``` - * - * `removeListener()` will remove, at most, one instance of a listener from the - * listener array. If any single listener has been added multiple times to the - * listener array for the specified `eventName`, then `removeListener()` must be - * called multiple times to remove each instance. - * - * Once an event is emitted, all listeners attached to it at the - * time of emitting are called in order. This implies that any `removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution - * will not remove them from`emit()` in progress. Subsequent events behave as expected. - * - * ```js - * import { EventEmitter } from 'node:events'; - * class MyEmitter extends EventEmitter {} - * const myEmitter = new MyEmitter(); - * - * const callbackA = () => { - * console.log('A'); - * myEmitter.removeListener('event', callbackB); - * }; - * - * const callbackB = () => { - * console.log('B'); - * }; - * - * myEmitter.on('event', callbackA); - * - * myEmitter.on('event', callbackB); - * - * // callbackA removes listener callbackB but it will still be called. - * // Internal listener array at time of emit [callbackA, callbackB] - * myEmitter.emit('event'); - * // Prints: - * // A - * // B - * - * // callbackB is now removed. - * // Internal listener array [callbackA] - * myEmitter.emit('event'); - * // Prints: - * // A - * ``` - * - * Because listeners are managed using an internal array, calling this will - * change the position indices of any listener registered _after_ the listener - * being removed. This will not impact the order in which listeners are called, - * but it means that any copies of the listener array as returned by - * the `emitter.listeners()` method will need to be recreated. - * - * When a single function has been added as a handler multiple times for a single - * event (as in the example below), `removeListener()` will remove the most - * recently added instance. In the example the `once('ping')` listener is removed: - * - * ```js - * import { EventEmitter } from 'node:events'; - * const ee = new EventEmitter(); - * - * function pong() { - * console.log('pong'); - * } - * - * ee.on('ping', pong); - * ee.once('ping', pong); - * ee.removeListener('ping', pong); - * - * ee.emit('ping'); - * ee.emit('ping'); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v0.1.26 - */ - removeListener(eventName: Key, listener: Listener1): this; - /** - * Alias for `emitter.removeListener()`. - * @since v10.0.0 - */ - off(eventName: Key, listener: Listener1): this; - /** - * Removes all listeners, or those of the specified `eventName`. - * - * It is bad practice to remove listeners added elsewhere in the code, - * particularly when the `EventEmitter` instance was created by some other - * component or module (e.g. sockets or file streams). - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v0.1.26 - */ - removeAllListeners(eventName?: Key): this; - /** - * By default `EventEmitter`s will print a warning if more than `10` listeners are - * added for a particular event. This is a useful default that helps finding - * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be - * modified for this specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners. - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v0.3.5 - */ - setMaxListeners(n: number): this; - /** - * Returns the current max listener value for the `EventEmitter` which is either - * set by `emitter.setMaxListeners(n)` or defaults to {@link defaultMaxListeners}. - * @since v1.0.0 - */ - getMaxListeners(): number; - /** - * Returns a copy of the array of listeners for the event named `eventName`. - * - * ```js - * server.on('connection', (stream) => { - * console.log('someone connected!'); - * }); - * console.log(util.inspect(server.listeners('connection'))); - * // Prints: [ [Function] ] - * ``` - * @since v0.1.26 - */ - listeners(eventName: Key): Array>; - /** - * Returns a copy of the array of listeners for the event named `eventName`, - * including any wrappers (such as those created by `.once()`). - * - * ```js - * import { EventEmitter } from 'node:events'; - * const emitter = new EventEmitter(); - * emitter.once('log', () => console.log('log once')); - * - * // Returns a new Array with a function `onceWrapper` which has a property - * // `listener` which contains the original listener bound above - * const listeners = emitter.rawListeners('log'); - * const logFnWrapper = listeners[0]; - * - * // Logs "log once" to the console and does not unbind the `once` event - * logFnWrapper.listener(); - * - * // Logs "log once" to the console and removes the listener - * logFnWrapper(); - * - * emitter.on('log', () => console.log('log persistently')); - * // Will return a new Array with a single function bound by `.on()` above - * const newListeners = emitter.rawListeners('log'); - * - * // Logs "log persistently" twice - * newListeners[0](); - * emitter.emit('log'); - * ``` - * @since v9.4.0 - */ - rawListeners(eventName: Key): Array>; - /** - * Synchronously calls each of the listeners registered for the event named `eventName`, in the order they were registered, passing the supplied arguments - * to each. - * - * Returns `true` if the event had listeners, `false` otherwise. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const myEmitter = new EventEmitter(); - * - * // First listener - * myEmitter.on('event', function firstListener() { - * console.log('Helloooo! first listener'); - * }); - * // Second listener - * myEmitter.on('event', function secondListener(arg1, arg2) { - * console.log(`event with parameters ${arg1}, ${arg2} in second listener`); - * }); - * // Third listener - * myEmitter.on('event', function thirdListener(...args) { - * const parameters = args.join(', '); - * console.log(`event with parameters ${parameters} in third listener`); - * }); - * - * console.log(myEmitter.listeners('event')); - * - * myEmitter.emit('event', 1, 2, 3, 4, 5); - * - * // Prints: - * // [ - * // [Function: firstListener], - * // [Function: secondListener], - * // [Function: thirdListener] - * // ] - * // Helloooo! first listener - * // event with parameters 1, 2 in second listener - * // event with parameters 1, 2, 3, 4, 5 in third listener - * ``` - * @since v0.1.26 - */ - emit(eventName: Key, ...args: Args): boolean; - /** - * Returns the number of listeners listening for the event named `eventName`. - * If `listener` is provided, it will return how many times the listener is found - * in the list of the listeners of the event. - * @since v3.2.0 - * @param eventName The name of the event being listened for - * @param listener The event handler function - */ - listenerCount(eventName: Key, listener?: Listener2): number; - /** - * Adds the `listener` function to the _beginning_ of the listeners array for the - * event named `eventName`. No checks are made to see if the `listener` has - * already been added. Multiple calls passing the same combination of `eventName` - * and `listener` will result in the `listener` being added, and called, multiple times. - * - * ```js - * server.prependListener('connection', (stream) => { - * console.log('someone connected!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v6.0.0 - * @param eventName The name of the event. - * @param listener The callback function - */ - prependListener(eventName: Key, listener: Listener1): this; - /** - * Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this - * listener is removed, and then invoked. - * - * ```js - * server.prependOnceListener('connection', (stream) => { - * console.log('Ah, we have our first user!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v6.0.0 - * @param eventName The name of the event. - * @param listener The callback function - */ - prependOnceListener(eventName: Key, listener: Listener1): this; - /** - * Returns an array listing the events for which the emitter has registered - * listeners. The values in the array are strings or `Symbol`s. - * - * ```js - * import { EventEmitter } from 'node:events'; - * - * const myEE = new EventEmitter(); - * myEE.on('foo', () => {}); - * myEE.on('bar', () => {}); - * - * const sym = Symbol('symbol'); - * myEE.on(sym, () => {}); - * - * console.log(myEE.eventNames()); - * // Prints: [ 'foo', 'bar', Symbol(symbol) ] - * ``` - * @since v6.0.0 - */ - eventNames(): Array<(string | symbol) & Key2>; - } - } - } - export = EventEmitter; -} -declare module "node:events" { - import events = require("events"); - export = events; -} diff --git a/web/static/node_modules/@types/node/fs.d.ts b/web/static/node_modules/@types/node/fs.d.ts deleted file mode 100644 index 9ae12cd2..00000000 --- a/web/static/node_modules/@types/node/fs.d.ts +++ /dev/null @@ -1,4396 +0,0 @@ -/** - * The `node:fs` module enables interacting with the file system in a - * way modeled on standard POSIX functions. - * - * To use the promise-based APIs: - * - * ```js - * import * as fs from 'node:fs/promises'; - * ``` - * - * To use the callback and sync APIs: - * - * ```js - * import * as fs from 'node:fs'; - * ``` - * - * All file system operations have synchronous, callback, and promise-based - * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM). - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/fs.js) - */ -declare module "fs" { - import * as stream from "node:stream"; - import { Abortable, EventEmitter } from "node:events"; - import { URL } from "node:url"; - import * as promises from "node:fs/promises"; - export { promises }; - /** - * Valid types for path values in "fs". - */ - export type PathLike = string | Buffer | URL; - export type PathOrFileDescriptor = PathLike | number; - export type TimeLike = string | number | Date; - export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void; - export type BufferEncodingOption = - | "buffer" - | { - encoding: "buffer"; - }; - export interface ObjectEncodingOptions { - encoding?: BufferEncoding | null | undefined; - } - export type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; - export type OpenMode = number | string; - export type Mode = number | string; - export interface StatsBase { - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - dev: T; - ino: T; - mode: T; - nlink: T; - uid: T; - gid: T; - rdev: T; - size: T; - blksize: T; - blocks: T; - atimeMs: T; - mtimeMs: T; - ctimeMs: T; - birthtimeMs: T; - atime: Date; - mtime: Date; - ctime: Date; - birthtime: Date; - } - export interface Stats extends StatsBase {} - /** - * A `fs.Stats` object provides information about a file. - * - * Objects returned from {@link stat}, {@link lstat}, {@link fstat}, and - * their synchronous counterparts are of this type. - * If `bigint` in the `options` passed to those methods is true, the numeric values - * will be `bigint` instead of `number`, and the object will contain additional - * nanosecond-precision properties suffixed with `Ns`. `Stat` objects are not to be created directly using the `new` keyword. - * - * ```console - * Stats { - * dev: 2114, - * ino: 48064969, - * mode: 33188, - * nlink: 1, - * uid: 85, - * gid: 100, - * rdev: 0, - * size: 527, - * blksize: 4096, - * blocks: 8, - * atimeMs: 1318289051000.1, - * mtimeMs: 1318289051000.1, - * ctimeMs: 1318289051000.1, - * birthtimeMs: 1318289051000.1, - * atime: Mon, 10 Oct 2011 23:24:11 GMT, - * mtime: Mon, 10 Oct 2011 23:24:11 GMT, - * ctime: Mon, 10 Oct 2011 23:24:11 GMT, - * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } - * ``` - * - * `bigint` version: - * - * ```console - * BigIntStats { - * dev: 2114n, - * ino: 48064969n, - * mode: 33188n, - * nlink: 1n, - * uid: 85n, - * gid: 100n, - * rdev: 0n, - * size: 527n, - * blksize: 4096n, - * blocks: 8n, - * atimeMs: 1318289051000n, - * mtimeMs: 1318289051000n, - * ctimeMs: 1318289051000n, - * birthtimeMs: 1318289051000n, - * atimeNs: 1318289051000000000n, - * mtimeNs: 1318289051000000000n, - * ctimeNs: 1318289051000000000n, - * birthtimeNs: 1318289051000000000n, - * atime: Mon, 10 Oct 2011 23:24:11 GMT, - * mtime: Mon, 10 Oct 2011 23:24:11 GMT, - * ctime: Mon, 10 Oct 2011 23:24:11 GMT, - * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } - * ``` - * @since v0.1.21 - */ - export class Stats { - private constructor(); - } - export interface StatsFsBase { - /** Type of file system. */ - type: T; - /** Optimal transfer block size. */ - bsize: T; - /** Total data blocks in file system. */ - blocks: T; - /** Free blocks in file system. */ - bfree: T; - /** Available blocks for unprivileged users */ - bavail: T; - /** Total file nodes in file system. */ - files: T; - /** Free file nodes in file system. */ - ffree: T; - } - export interface StatsFs extends StatsFsBase {} - /** - * Provides information about a mounted file system. - * - * Objects returned from {@link statfs} and its synchronous counterpart are of - * this type. If `bigint` in the `options` passed to those methods is `true`, the - * numeric values will be `bigint` instead of `number`. - * - * ```console - * StatFs { - * type: 1397114950, - * bsize: 4096, - * blocks: 121938943, - * bfree: 61058895, - * bavail: 61058895, - * files: 999, - * ffree: 1000000 - * } - * ``` - * - * `bigint` version: - * - * ```console - * StatFs { - * type: 1397114950n, - * bsize: 4096n, - * blocks: 121938943n, - * bfree: 61058895n, - * bavail: 61058895n, - * files: 999n, - * ffree: 1000000n - * } - * ``` - * @since v19.6.0, v18.15.0 - */ - export class StatsFs {} - export interface BigIntStatsFs extends StatsFsBase {} - export interface StatFsOptions { - bigint?: boolean | undefined; - } - /** - * A representation of a directory entry, which can be a file or a subdirectory - * within the directory, as returned by reading from an `fs.Dir`. The - * directory entry is a combination of the file name and file type pairs. - * - * Additionally, when {@link readdir} or {@link readdirSync} is called with - * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s. - * @since v10.10.0 - */ - export class Dirent { - /** - * Returns `true` if the `fs.Dirent` object describes a regular file. - * @since v10.10.0 - */ - isFile(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a file system - * directory. - * @since v10.10.0 - */ - isDirectory(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a block device. - * @since v10.10.0 - */ - isBlockDevice(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a character device. - * @since v10.10.0 - */ - isCharacterDevice(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a symbolic link. - * @since v10.10.0 - */ - isSymbolicLink(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a first-in-first-out - * (FIFO) pipe. - * @since v10.10.0 - */ - isFIFO(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a socket. - * @since v10.10.0 - */ - isSocket(): boolean; - /** - * The file name that this `fs.Dirent` object refers to. The type of this - * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}. - * @since v10.10.0 - */ - name: string; - /** - * The base path that this `fs.Dirent` object refers to. - * @since v20.12.0 - */ - parentPath: string; - /** - * Alias for `dirent.parentPath`. - * @since v20.1.0 - * @deprecated Since v20.12.0 - */ - path: string; - } - /** - * A class representing a directory stream. - * - * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`. - * - * ```js - * import { opendir } from 'node:fs/promises'; - * - * try { - * const dir = await opendir('./'); - * for await (const dirent of dir) - * console.log(dirent.name); - * } catch (err) { - * console.error(err); - * } - * ``` - * - * When using the async iterator, the `fs.Dir` object will be automatically - * closed after the iterator exits. - * @since v12.12.0 - */ - export class Dir implements AsyncIterable { - /** - * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`. - * @since v12.12.0 - */ - readonly path: string; - /** - * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read. - */ - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - /** - * Asynchronously close the directory's underlying resource handle. - * Subsequent reads will result in errors. - * - * A promise is returned that will be fulfilled after the resource has been - * closed. - * @since v12.12.0 - */ - close(): Promise; - close(cb: NoParamCallback): void; - /** - * Synchronously close the directory's underlying resource handle. - * Subsequent reads will result in errors. - * @since v12.12.0 - */ - closeSync(): void; - /** - * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`. - * - * A promise is returned that will be fulfilled with an `fs.Dirent`, or `null` if there are no more directory entries to read. - * - * Directory entries returned by this function are in no particular order as - * provided by the operating system's underlying directory mechanisms. - * Entries added or removed while iterating over the directory might not be - * included in the iteration results. - * @since v12.12.0 - * @return containing {fs.Dirent|null} - */ - read(): Promise; - read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void; - /** - * Synchronously read the next directory entry as an `fs.Dirent`. See the - * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail. - * - * If there are no more directory entries to read, `null` will be returned. - * - * Directory entries returned by this function are in no particular order as - * provided by the operating system's underlying directory mechanisms. - * Entries added or removed while iterating over the directory might not be - * included in the iteration results. - * @since v12.12.0 - */ - readSync(): Dirent | null; - } - /** - * Class: fs.StatWatcher - * @since v14.3.0, v12.20.0 - * Extends `EventEmitter` - * A successful call to {@link watchFile} method will return a new fs.StatWatcher object. - */ - export interface StatWatcher extends EventEmitter { - /** - * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have - * no effect. - * - * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally - * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been - * called previously. - * @since v14.3.0, v12.20.0 - */ - ref(): this; - /** - * When called, the active `fs.StatWatcher` object will not require the Node.js - * event loop to remain active. If there is no other activity keeping the - * event loop running, the process may exit before the `fs.StatWatcher` object's - * callback is invoked. Calling `watcher.unref()` multiple times will have - * no effect. - * @since v14.3.0, v12.20.0 - */ - unref(): this; - } - export interface FSWatcher extends EventEmitter { - /** - * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable. - * @since v0.5.8 - */ - close(): void; - /** - * When called, requests that the Node.js event loop _not_ exit so long as the `fs.FSWatcher` is active. Calling `watcher.ref()` multiple times will have - * no effect. - * - * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally - * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been - * called previously. - * @since v14.3.0, v12.20.0 - */ - ref(): this; - /** - * When called, the active `fs.FSWatcher` object will not require the Node.js - * event loop to remain active. If there is no other activity keeping the - * event loop running, the process may exit before the `fs.FSWatcher` object's - * callback is invoked. Calling `watcher.unref()` multiple times will have - * no effect. - * @since v14.3.0, v12.20.0 - */ - unref(): this; - /** - * events.EventEmitter - * 1. change - * 2. close - * 3. error - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "error", listener: (error: Error) => void): this; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - on(event: "close", listener: () => void): this; - on(event: "error", listener: (error: Error) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - once(event: "close", listener: () => void): this; - once(event: "error", listener: (error: Error) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "error", listener: (error: Error) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "error", listener: (error: Error) => void): this; - } - /** - * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function. - * @since v0.1.93 - */ - export class ReadStream extends stream.Readable { - close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; - /** - * The number of bytes that have been read so far. - * @since v6.4.0 - */ - bytesRead: number; - /** - * The path to the file the stream is reading from as specified in the first - * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a - * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`. - * @since v0.1.93 - */ - path: string | Buffer; - /** - * This property is `true` if the underlying file has not been opened yet, - * i.e. before the `'ready'` event is emitted. - * @since v11.2.0, v10.16.0 - */ - pending: boolean; - /** - * events.EventEmitter - * 1. open - * 2. close - * 3. ready - */ - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: Buffer | string) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "open", listener: (fd: number) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "ready", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: Buffer | string) => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "open", listener: (fd: number) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "ready", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: Buffer | string) => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "open", listener: (fd: number) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "ready", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "open", listener: (fd: number) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "ready", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "open", listener: (fd: number) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "ready", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - /** - * * Extends `stream.Writable` - * - * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function. - * @since v0.1.93 - */ - export class WriteStream extends stream.Writable { - /** - * Closes `writeStream`. Optionally accepts a - * callback that will be executed once the `writeStream`is closed. - * @since v0.9.4 - */ - close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; - /** - * The number of bytes written so far. Does not include data that is still queued - * for writing. - * @since v0.4.7 - */ - bytesWritten: number; - /** - * The path to the file the stream is writing to as specified in the first - * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a - * `Buffer`. - * @since v0.1.93 - */ - path: string | Buffer; - /** - * This property is `true` if the underlying file has not been opened yet, - * i.e. before the `'ready'` event is emitted. - * @since v11.2.0 - */ - pending: boolean; - /** - * events.EventEmitter - * 1. open - * 2. close - * 3. ready - */ - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "open", listener: (fd: number) => void): this; - addListener(event: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "ready", listener: () => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "open", listener: (fd: number) => void): this; - on(event: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "ready", listener: () => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "open", listener: (fd: number) => void): this; - once(event: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "ready", listener: () => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "open", listener: (fd: number) => void): this; - prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "ready", listener: () => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "open", listener: (fd: number) => void): this; - prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "ready", listener: () => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - /** - * Asynchronously rename file at `oldPath` to the pathname provided - * as `newPath`. In the case that `newPath` already exists, it will - * be overwritten. If there is a directory at `newPath`, an error will - * be raised instead. No arguments other than a possible exception are - * given to the completion callback. - * - * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html). - * - * ```js - * import { rename } from 'node:fs'; - * - * rename('oldFile.txt', 'newFile.txt', (err) => { - * if (err) throw err; - * console.log('Rename complete!'); - * }); - * ``` - * @since v0.0.2 - */ - export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; - export namespace rename { - /** - * Asynchronous rename(2) - Change the name or location of a file or directory. - * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; - } - /** - * Renames the file from `oldPath` to `newPath`. Returns `undefined`. - * - * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details. - * @since v0.1.21 - */ - export function renameSync(oldPath: PathLike, newPath: PathLike): void; - /** - * Truncates the file. No arguments other than a possible exception are - * given to the completion callback. A file descriptor can also be passed as the - * first argument. In this case, `fs.ftruncate()` is called. - * - * ```js - * import { truncate } from 'node:fs'; - * // Assuming that 'path/file.txt' is a regular file. - * truncate('path/file.txt', (err) => { - * if (err) throw err; - * console.log('path/file.txt was truncated'); - * }); - * ``` - * - * Passing a file descriptor is deprecated and may result in an error being thrown - * in the future. - * - * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details. - * @since v0.8.6 - * @param [len=0] - */ - export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void; - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export function truncate(path: PathLike, callback: NoParamCallback): void; - export namespace truncate { - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param len If not specified, defaults to `0`. - */ - function __promisify__(path: PathLike, len?: number | null): Promise; - } - /** - * Truncates the file. Returns `undefined`. A file descriptor can also be - * passed as the first argument. In this case, `fs.ftruncateSync()` is called. - * - * Passing a file descriptor is deprecated and may result in an error being thrown - * in the future. - * @since v0.8.6 - * @param [len=0] - */ - export function truncateSync(path: PathLike, len?: number | null): void; - /** - * Truncates the file descriptor. No arguments other than a possible exception are - * given to the completion callback. - * - * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail. - * - * If the file referred to by the file descriptor was larger than `len` bytes, only - * the first `len` bytes will be retained in the file. - * - * For example, the following program retains only the first four bytes of the - * file: - * - * ```js - * import { open, close, ftruncate } from 'node:fs'; - * - * function closeFd(fd) { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * - * open('temp.txt', 'r+', (err, fd) => { - * if (err) throw err; - * - * try { - * ftruncate(fd, 4, (err) => { - * closeFd(fd); - * if (err) throw err; - * }); - * } catch (err) { - * closeFd(fd); - * if (err) throw err; - * } - * }); - * ``` - * - * If the file previously was shorter than `len` bytes, it is extended, and the - * extended part is filled with null bytes (`'\0'`): - * - * If `len` is negative then `0` will be used. - * @since v0.8.6 - * @param [len=0] - */ - export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void; - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - */ - export function ftruncate(fd: number, callback: NoParamCallback): void; - export namespace ftruncate { - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - * @param len If not specified, defaults to `0`. - */ - function __promisify__(fd: number, len?: number | null): Promise; - } - /** - * Truncates the file descriptor. Returns `undefined`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link ftruncate}. - * @since v0.8.6 - * @param [len=0] - */ - export function ftruncateSync(fd: number, len?: number | null): void; - /** - * Asynchronously changes owner and group of a file. No arguments other than a - * possible exception are given to the completion callback. - * - * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. - * @since v0.1.97 - */ - export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; - export namespace chown { - /** - * Asynchronous chown(2) - Change ownership of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike, uid: number, gid: number): Promise; - } - /** - * Synchronously changes owner and group of a file. Returns `undefined`. - * This is the synchronous version of {@link chown}. - * - * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. - * @since v0.1.97 - */ - export function chownSync(path: PathLike, uid: number, gid: number): void; - /** - * Sets the owner of the file. No arguments other than a possible exception are - * given to the completion callback. - * - * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. - * @since v0.4.7 - */ - export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void; - export namespace fchown { - /** - * Asynchronous fchown(2) - Change ownership of a file. - * @param fd A file descriptor. - */ - function __promisify__(fd: number, uid: number, gid: number): Promise; - } - /** - * Sets the owner of the file. Returns `undefined`. - * - * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. - * @since v0.4.7 - * @param uid The file's new owner's user id. - * @param gid The file's new group's group id. - */ - export function fchownSync(fd: number, uid: number, gid: number): void; - /** - * Set the owner of the symbolic link. No arguments other than a possible - * exception are given to the completion callback. - * - * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail. - */ - export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; - export namespace lchown { - /** - * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike, uid: number, gid: number): Promise; - } - /** - * Set the owner for the path. Returns `undefined`. - * - * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details. - * @param uid The file's new owner's user id. - * @param gid The file's new group's group id. - */ - export function lchownSync(path: PathLike, uid: number, gid: number): void; - /** - * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic - * link, then the link is not dereferenced: instead, the timestamps of the - * symbolic link itself are changed. - * - * No arguments other than a possible exception are given to the completion - * callback. - * @since v14.5.0, v12.19.0 - */ - export function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; - export namespace lutimes { - /** - * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, - * with the difference that if the path refers to a symbolic link, then the link is not - * dereferenced: instead, the timestamps of the symbolic link itself are changed. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - } - /** - * Change the file system timestamps of the symbolic link referenced by `path`. - * Returns `undefined`, or throws an exception when parameters are incorrect or - * the operation fails. This is the synchronous version of {@link lutimes}. - * @since v14.5.0, v12.19.0 - */ - export function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; - /** - * Asynchronously changes the permissions of a file. No arguments other than a - * possible exception are given to the completion callback. - * - * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. - * - * ```js - * import { chmod } from 'node:fs'; - * - * chmod('my_file.txt', 0o775, (err) => { - * if (err) throw err; - * console.log('The permissions for file "my_file.txt" have been changed!'); - * }); - * ``` - * @since v0.1.30 - */ - export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; - export namespace chmod { - /** - * Asynchronous chmod(2) - Change permissions of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(path: PathLike, mode: Mode): Promise; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link chmod}. - * - * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. - * @since v0.6.7 - */ - export function chmodSync(path: PathLike, mode: Mode): void; - /** - * Sets the permissions on the file. No arguments other than a possible exception - * are given to the completion callback. - * - * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. - * @since v0.4.7 - */ - export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void; - export namespace fchmod { - /** - * Asynchronous fchmod(2) - Change permissions of a file. - * @param fd A file descriptor. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(fd: number, mode: Mode): Promise; - } - /** - * Sets the permissions on the file. Returns `undefined`. - * - * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. - * @since v0.4.7 - */ - export function fchmodSync(fd: number, mode: Mode): void; - /** - * Changes the permissions on a symbolic link. No arguments other than a possible - * exception are given to the completion callback. - * - * This method is only implemented on macOS. - * - * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. - * @deprecated Since v0.4.7 - */ - export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; - /** @deprecated */ - export namespace lchmod { - /** - * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(path: PathLike, mode: Mode): Promise; - } - /** - * Changes the permissions on a symbolic link. Returns `undefined`. - * - * This method is only implemented on macOS. - * - * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. - * @deprecated Since v0.4.7 - */ - export function lchmodSync(path: PathLike, mode: Mode): void; - /** - * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object. - * - * In case of an error, the `err.code` will be one of `Common System Errors`. - * - * {@link stat} follows symbolic links. Use {@link lstat} to look at the - * links themselves. - * - * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. - * Instead, user code should open/read/write the file directly and handle the - * error raised if the file is not available. - * - * To check if a file exists without manipulating it afterwards, {@link access} is recommended. - * - * For example, given the following directory structure: - * - * ```text - * - txtDir - * -- file.txt - * - app.js - * ``` - * - * The next program will check for the stats of the given paths: - * - * ```js - * import { stat } from 'node:fs'; - * - * const pathsToCheck = ['./txtDir', './txtDir/file.txt']; - * - * for (let i = 0; i < pathsToCheck.length; i++) { - * stat(pathsToCheck[i], (err, stats) => { - * console.log(stats.isDirectory()); - * console.log(stats); - * }); - * } - * ``` - * - * The resulting output will resemble: - * - * ```console - * true - * Stats { - * dev: 16777220, - * mode: 16877, - * nlink: 3, - * uid: 501, - * gid: 20, - * rdev: 0, - * blksize: 4096, - * ino: 14214262, - * size: 96, - * blocks: 0, - * atimeMs: 1561174653071.963, - * mtimeMs: 1561174614583.3518, - * ctimeMs: 1561174626623.5366, - * birthtimeMs: 1561174126937.2893, - * atime: 2019-06-22T03:37:33.072Z, - * mtime: 2019-06-22T03:36:54.583Z, - * ctime: 2019-06-22T03:37:06.624Z, - * birthtime: 2019-06-22T03:28:46.937Z - * } - * false - * Stats { - * dev: 16777220, - * mode: 33188, - * nlink: 1, - * uid: 501, - * gid: 20, - * rdev: 0, - * blksize: 4096, - * ino: 14214074, - * size: 8, - * blocks: 8, - * atimeMs: 1561174616618.8555, - * mtimeMs: 1561174614584, - * ctimeMs: 1561174614583.8145, - * birthtimeMs: 1561174007710.7478, - * atime: 2019-06-22T03:36:56.619Z, - * mtime: 2019-06-22T03:36:54.584Z, - * ctime: 2019-06-22T03:36:54.584Z, - * birthtime: 2019-06-22T03:26:47.711Z - * } - * ``` - * @since v0.0.2 - */ - export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - export function stat( - path: PathLike, - options: - | (StatOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, - ): void; - export function stat( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, - ): void; - export function stat( - path: PathLike, - options: StatOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, - ): void; - export namespace stat { - /** - * Asynchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__( - path: PathLike, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(path: PathLike, options?: StatOptions): Promise; - } - export interface StatSyncFn extends Function { - (path: PathLike, options?: undefined): Stats; - ( - path: PathLike, - options?: StatSyncOptions & { - bigint?: false | undefined; - throwIfNoEntry: false; - }, - ): Stats | undefined; - ( - path: PathLike, - options: StatSyncOptions & { - bigint: true; - throwIfNoEntry: false; - }, - ): BigIntStats | undefined; - ( - path: PathLike, - options?: StatSyncOptions & { - bigint?: false | undefined; - }, - ): Stats; - ( - path: PathLike, - options: StatSyncOptions & { - bigint: true; - }, - ): BigIntStats; - ( - path: PathLike, - options: StatSyncOptions & { - bigint: boolean; - throwIfNoEntry?: false | undefined; - }, - ): Stats | BigIntStats; - (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined; - } - /** - * Synchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export const statSync: StatSyncFn; - /** - * Invokes the callback with the `fs.Stats` for the file descriptor. - * - * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. - * @since v0.1.95 - */ - export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - export function fstat( - fd: number, - options: - | (StatOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, - ): void; - export function fstat( - fd: number, - options: StatOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, - ): void; - export function fstat( - fd: number, - options: StatOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, - ): void; - export namespace fstat { - /** - * Asynchronous fstat(2) - Get file status. - * @param fd A file descriptor. - */ - function __promisify__( - fd: number, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - fd: number, - options: StatOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(fd: number, options?: StatOptions): Promise; - } - /** - * Retrieves the `fs.Stats` for the file descriptor. - * - * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. - * @since v0.1.95 - */ - export function fstatSync( - fd: number, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Stats; - export function fstatSync( - fd: number, - options: StatOptions & { - bigint: true; - }, - ): BigIntStats; - export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; - /** - * Retrieves the `fs.Stats` for the symbolic link referred to by the path. - * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic - * link, then the link itself is stat-ed, not the file that it refers to. - * - * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details. - * @since v0.1.30 - */ - export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - export function lstat( - path: PathLike, - options: - | (StatOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, - ): void; - export function lstat( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, - ): void; - export function lstat( - path: PathLike, - options: StatOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, - ): void; - export namespace lstat { - /** - * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__( - path: PathLike, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(path: PathLike, options?: StatOptions): Promise; - } - /** - * Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which - * contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object. - * - * In case of an error, the `err.code` will be one of `Common System Errors`. - * @since v19.6.0, v18.15.0 - * @param path A path to an existing file or directory on the file system to be queried. - */ - export function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void; - export function statfs( - path: PathLike, - options: - | (StatFsOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void, - ): void; - export function statfs( - path: PathLike, - options: StatFsOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void, - ): void; - export function statfs( - path: PathLike, - options: StatFsOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void, - ): void; - export namespace statfs { - /** - * Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an object. - * @param path A path to an existing file or directory on the file system to be queried. - */ - function __promisify__( - path: PathLike, - options?: StatFsOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatFsOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(path: PathLike, options?: StatFsOptions): Promise; - } - /** - * Synchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which - * contains `path`. - * - * In case of an error, the `err.code` will be one of `Common System Errors`. - * @since v19.6.0, v18.15.0 - * @param path A path to an existing file or directory on the file system to be queried. - */ - export function statfsSync( - path: PathLike, - options?: StatFsOptions & { - bigint?: false | undefined; - }, - ): StatsFs; - export function statfsSync( - path: PathLike, - options: StatFsOptions & { - bigint: true; - }, - ): BigIntStatsFs; - export function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs; - /** - * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export const lstatSync: StatSyncFn; - /** - * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than - * a possible - * exception are given to the completion callback. - * @since v0.1.31 - */ - export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; - export namespace link { - /** - * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. - * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(existingPath: PathLike, newPath: PathLike): Promise; - } - /** - * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`. - * @since v0.1.31 - */ - export function linkSync(existingPath: PathLike, newPath: PathLike): void; - /** - * Creates the link called `path` pointing to `target`. No arguments other than a - * possible exception are given to the completion callback. - * - * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details. - * - * The `type` argument is only available on Windows and ignored on other platforms. - * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is - * not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`. - * If the `target` does not exist, `'file'` will be used. Windows junction points - * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction - * points on NTFS volumes can only point to directories. - * - * Relative targets are relative to the link's parent directory. - * - * ```js - * import { symlink } from 'node:fs'; - * - * symlink('./mew', './mewtwo', callback); - * ``` - * - * The above example creates a symbolic link `mewtwo` which points to `mew` in the - * same directory: - * - * ```bash - * $ tree . - * . - * ├── mew - * └── mewtwo -> ./mew - * ``` - * @since v0.1.31 - * @param [type='null'] - */ - export function symlink( - target: PathLike, - path: PathLike, - type: symlink.Type | undefined | null, - callback: NoParamCallback, - ): void; - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - */ - export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void; - export namespace symlink { - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). - * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. - */ - function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; - type Type = "dir" | "file" | "junction"; - } - /** - * Returns `undefined`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link symlink}. - * @since v0.1.31 - * @param [type='null'] - */ - export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; - /** - * Reads the contents of the symbolic link referred to by `path`. The callback gets - * two arguments `(err, linkString)`. - * - * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the link path passed to the callback. If the `encoding` is set to `'buffer'`, - * the link path returned will be passed as a `Buffer` object. - * @since v0.1.31 - */ - export function readlink( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, - ): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readlink( - path: PathLike, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void, - ): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readlink( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void, - ): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export function readlink( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, - ): void; - export namespace readlink { - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - } - /** - * Returns the symbolic link's string value. - * - * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the link path returned. If the `encoding` is set to `'buffer'`, - * the link path returned will be passed as a `Buffer` object. - * @since v0.1.31 - */ - export function readlinkSync(path: PathLike, options?: EncodingOption): string; - /** - * Synchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readlinkSync(path: PathLike, options: BufferEncodingOption): Buffer; - /** - * Synchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readlinkSync(path: PathLike, options?: EncodingOption): string | Buffer; - /** - * Asynchronously computes the canonical pathname by resolving `.`, `..`, and - * symbolic links. - * - * A canonical pathname is not necessarily unique. Hard links and bind mounts can - * expose a file system entity through many pathnames. - * - * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions: - * - * 1. No case conversion is performed on case-insensitive file systems. - * 2. The maximum number of symbolic links is platform-independent and generally - * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports. - * - * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd` to resolve relative paths. - * - * Only paths that can be converted to UTF8 strings are supported. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the path passed to the callback. If the `encoding` is set to `'buffer'`, - * the path returned will be passed as a `Buffer` object. - * - * If `path` resolves to a socket or a pipe, the function will return a system - * dependent name for that object. - * @since v0.1.31 - */ - export function realpath( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function realpath( - path: PathLike, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void, - ): void; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function realpath( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void, - ): void; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export function realpath( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - export namespace realpath { - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html). - * - * The `callback` gets two arguments `(err, resolvedPath)`. - * - * Only paths that can be converted to UTF8 strings are supported. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the path passed to the callback. If the `encoding` is set to `'buffer'`, - * the path returned will be passed as a `Buffer` object. - * - * On Linux, when Node.js is linked against musl libc, the procfs file system must - * be mounted on `/proc` in order for this function to work. Glibc does not have - * this restriction. - * @since v9.2.0 - */ - function native( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - function native( - path: PathLike, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void, - ): void; - function native( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void, - ): void; - function native( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - } - /** - * Returns the resolved pathname. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link realpath}. - * @since v0.1.31 - */ - export function realpathSync(path: PathLike, options?: EncodingOption): string; - /** - * Synchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function realpathSync(path: PathLike, options: BufferEncodingOption): Buffer; - /** - * Synchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function realpathSync(path: PathLike, options?: EncodingOption): string | Buffer; - export namespace realpathSync { - function native(path: PathLike, options?: EncodingOption): string; - function native(path: PathLike, options: BufferEncodingOption): Buffer; - function native(path: PathLike, options?: EncodingOption): string | Buffer; - } - /** - * Asynchronously removes a file or symbolic link. No arguments other than a - * possible exception are given to the completion callback. - * - * ```js - * import { unlink } from 'node:fs'; - * // Assuming that 'path/file.txt' is a regular file. - * unlink('path/file.txt', (err) => { - * if (err) throw err; - * console.log('path/file.txt was deleted'); - * }); - * ``` - * - * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a - * directory, use {@link rmdir}. - * - * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details. - * @since v0.0.2 - */ - export function unlink(path: PathLike, callback: NoParamCallback): void; - export namespace unlink { - /** - * Asynchronous unlink(2) - delete a name and possibly the file it refers to. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike): Promise; - } - /** - * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`. - * @since v0.1.21 - */ - export function unlinkSync(path: PathLike): void; - export interface RmDirOptions { - /** - * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or - * `EPERM` error is encountered, Node.js will retry the operation with a linear - * backoff wait of `retryDelay` ms longer on each try. This option represents the - * number of retries. This option is ignored if the `recursive` option is not - * `true`. - * @default 0 - */ - maxRetries?: number | undefined; - /** - * @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning - * `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file. - * Use `fs.rm(path, { recursive: true, force: true })` instead. - * - * If `true`, perform a recursive directory removal. In - * recursive mode, operations are retried on failure. - * @default false - */ - recursive?: boolean | undefined; - /** - * The amount of time in milliseconds to wait between retries. - * This option is ignored if the `recursive` option is not `true`. - * @default 100 - */ - retryDelay?: number | undefined; - } - /** - * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given - * to the completion callback. - * - * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on - * Windows and an `ENOTDIR` error on POSIX. - * - * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`. - * @since v0.0.2 - */ - export function rmdir(path: PathLike, callback: NoParamCallback): void; - export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void; - export namespace rmdir { - /** - * Asynchronous rmdir(2) - delete a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike, options?: RmDirOptions): Promise; - } - /** - * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`. - * - * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error - * on Windows and an `ENOTDIR` error on POSIX. - * - * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`. - * @since v0.1.21 - */ - export function rmdirSync(path: PathLike, options?: RmDirOptions): void; - export interface RmOptions { - /** - * When `true`, exceptions will be ignored if `path` does not exist. - * @default false - */ - force?: boolean | undefined; - /** - * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or - * `EPERM` error is encountered, Node.js will retry the operation with a linear - * backoff wait of `retryDelay` ms longer on each try. This option represents the - * number of retries. This option is ignored if the `recursive` option is not - * `true`. - * @default 0 - */ - maxRetries?: number | undefined; - /** - * If `true`, perform a recursive directory removal. In - * recursive mode, operations are retried on failure. - * @default false - */ - recursive?: boolean | undefined; - /** - * The amount of time in milliseconds to wait between retries. - * This option is ignored if the `recursive` option is not `true`. - * @default 100 - */ - retryDelay?: number | undefined; - } - /** - * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). No arguments other than a possible exception are given to the - * completion callback. - * @since v14.14.0 - */ - export function rm(path: PathLike, callback: NoParamCallback): void; - export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void; - export namespace rm { - /** - * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). - */ - function __promisify__(path: PathLike, options?: RmOptions): Promise; - } - /** - * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). Returns `undefined`. - * @since v14.14.0 - */ - export function rmSync(path: PathLike, options?: RmOptions): void; - export interface MakeDirectoryOptions { - /** - * Indicates whether parent folders should be created. - * If a folder was created, the path to the first created folder will be returned. - * @default false - */ - recursive?: boolean | undefined; - /** - * A file mode. If a string is passed, it is parsed as an octal integer. If not specified - * @default 0o777 - */ - mode?: Mode | undefined; - } - /** - * Asynchronously creates a directory. - * - * The callback is given a possible exception and, if `recursive` is `true`, the - * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was - * created (for instance, if it was previously created). - * - * The optional `options` argument can be an integer specifying `mode` (permission - * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fs.mkdir()` when `path` is a directory that - * exists results in an error only - * when `recursive` is false. If `recursive` is false and the directory exists, - * an `EEXIST` error occurs. - * - * ```js - * import { mkdir } from 'node:fs'; - * - * // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist. - * mkdir('./tmp/a/apple', { recursive: true }, (err) => { - * if (err) throw err; - * }); - * ``` - * - * On Windows, using `fs.mkdir()` on the root directory even with recursion will - * result in an error: - * - * ```js - * import { mkdir } from 'node:fs'; - * - * mkdir('/', { recursive: true }, (err) => { - * // => [Error: EPERM: operation not permitted, mkdir 'C:\'] - * }); - * ``` - * - * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. - * @since v0.1.8 - */ - export function mkdir( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - callback: (err: NodeJS.ErrnoException | null, path?: string) => void, - ): void; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - export function mkdir( - path: PathLike, - options: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null - | undefined, - callback: NoParamCallback, - ): void; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - export function mkdir( - path: PathLike, - options: Mode | MakeDirectoryOptions | null | undefined, - callback: (err: NodeJS.ErrnoException | null, path?: string) => void, - ): void; - /** - * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export function mkdir(path: PathLike, callback: NoParamCallback): void; - export namespace mkdir { - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__( - path: PathLike, - options?: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__( - path: PathLike, - options?: Mode | MakeDirectoryOptions | null, - ): Promise; - } - /** - * Synchronously creates a directory. Returns `undefined`, or if `recursive` is `true`, the first directory path created. - * This is the synchronous version of {@link mkdir}. - * - * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. - * @since v0.1.21 - */ - export function mkdirSync( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - ): string | undefined; - /** - * Synchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - export function mkdirSync( - path: PathLike, - options?: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null, - ): void; - /** - * Synchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined; - /** - * Creates a unique temporary directory. - * - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. Due to platform - * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, - * notably the BSDs, can return more than six random characters, and replace - * trailing `X` characters in `prefix` with random characters. - * - * The created directory path is passed as a string to the callback's second - * parameter. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * - * ```js - * import { mkdtemp } from 'node:fs'; - * import { join } from 'node:path'; - * import { tmpdir } from 'node:os'; - * - * mkdtemp(join(tmpdir(), 'foo-'), (err, directory) => { - * if (err) throw err; - * console.log(directory); - * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 - * }); - * ``` - * - * The `fs.mkdtemp()` method will append the six randomly selected characters - * directly to the `prefix` string. For instance, given a directory `/tmp`, if the - * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator - * (`import { sep } from 'node:path'`). - * - * ```js - * import { tmpdir } from 'node:os'; - * import { mkdtemp } from 'node:fs'; - * - * // The parent directory for the new temporary directory - * const tmpDir = tmpdir(); - * - * // This method is *INCORRECT*: - * mkdtemp(tmpDir, (err, directory) => { - * if (err) throw err; - * console.log(directory); - * // Will print something similar to `/tmpabc123`. - * // A new temporary directory is created at the file system root - * // rather than *within* the /tmp directory. - * }); - * - * // This method is *CORRECT*: - * import { sep } from 'node:path'; - * mkdtemp(`${tmpDir}${sep}`, (err, directory) => { - * if (err) throw err; - * console.log(directory); - * // Will print something similar to `/tmp/abc123`. - * // A new temporary directory is created within - * // the /tmp directory. - * }); - * ``` - * @since v5.10.0 - */ - export function mkdtemp( - prefix: string, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, folder: string) => void, - ): void; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function mkdtemp( - prefix: string, - options: - | "buffer" - | { - encoding: "buffer"; - }, - callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void, - ): void; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function mkdtemp( - prefix: string, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void, - ): void; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - */ - export function mkdtemp( - prefix: string, - callback: (err: NodeJS.ErrnoException | null, folder: string) => void, - ): void; - export namespace mkdtemp { - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options?: EncodingOption): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options: BufferEncodingOption): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options?: EncodingOption): Promise; - } - /** - * Returns the created directory path. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link mkdtemp}. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * @since v5.10.0 - */ - export function mkdtempSync(prefix: string, options?: EncodingOption): string; - /** - * Synchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function mkdtempSync(prefix: string, options: BufferEncodingOption): Buffer; - /** - * Synchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function mkdtempSync(prefix: string, options?: EncodingOption): string | Buffer; - /** - * Reads the contents of a directory. The callback gets two arguments `(err, files)` where `files` is an array of the names of the files in the directory excluding `'.'` and `'..'`. - * - * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the filenames passed to the callback. If the `encoding` is set to `'buffer'`, - * the filenames returned will be passed as `Buffer` objects. - * - * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects. - * @since v0.1.8 - */ - export function readdir( - path: PathLike, - options: - | { - encoding: BufferEncoding | null; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | BufferEncoding - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readdir( - path: PathLike, - options: - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | "buffer", - callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readdir( - path: PathLike, - options: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export function readdir( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - export function readdir( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, - ): void; - export namespace readdir { - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__( - path: PathLike, - options?: - | { - encoding: BufferEncoding | null; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__( - path: PathLike, - options: - | "buffer" - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent - */ - function __promisify__( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise; - } - /** - * Reads the contents of the directory. - * - * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the filenames returned. If the `encoding` is set to `'buffer'`, - * the filenames returned will be passed as `Buffer` objects. - * - * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects. - * @since v0.1.21 - */ - export function readdirSync( - path: PathLike, - options?: - | { - encoding: BufferEncoding | null; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | BufferEncoding - | null, - ): string[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readdirSync( - path: PathLike, - options: - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | "buffer", - ): Buffer[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readdirSync( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): string[] | Buffer[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - export function readdirSync( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Dirent[]; - /** - * Closes the file descriptor. No arguments other than a possible exception are - * given to the completion callback. - * - * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use - * through any other `fs` operation may lead to undefined behavior. - * - * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. - * @since v0.0.2 - */ - export function close(fd: number, callback?: NoParamCallback): void; - export namespace close { - /** - * Asynchronous close(2) - close a file descriptor. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - /** - * Closes the file descriptor. Returns `undefined`. - * - * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use - * through any other `fs` operation may lead to undefined behavior. - * - * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. - * @since v0.1.21 - */ - export function closeSync(fd: number): void; - /** - * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details. - * - * `mode` sets the file mode (permission and sticky bits), but only if the file was - * created. On Windows, only the write permission can be manipulated; see {@link chmod}. - * - * The callback gets two arguments `(err, fd)`. - * - * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented - * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains - * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). - * - * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc. - * @since v0.0.2 - * @param [flags='r'] See `support of file system `flags``. - * @param [mode=0o666] - */ - export function open( - path: PathLike, - flags: OpenMode | undefined, - mode: Mode | undefined | null, - callback: (err: NodeJS.ErrnoException | null, fd: number) => void, - ): void; - /** - * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param [flags='r'] See `support of file system `flags``. - */ - export function open( - path: PathLike, - flags: OpenMode | undefined, - callback: (err: NodeJS.ErrnoException | null, fd: number) => void, - ): void; - /** - * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; - export namespace open { - /** - * Asynchronous open(2) - open and possibly create a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. - */ - function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise; - } - /** - * Returns an integer representing the file descriptor. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link open}. - * @since v0.1.21 - * @param [flags='r'] - * @param [mode=0o666] - */ - export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number; - /** - * Change the file system timestamps of the object referenced by `path`. - * - * The `atime` and `mtime` arguments follow these rules: - * - * * Values can be either numbers representing Unix epoch time in seconds, `Date`s, or a numeric string like `'123456789.0'`. - * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. - * @since v0.4.2 - */ - export function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; - export namespace utimes { - /** - * Asynchronously change file timestamps of the file referenced by the supplied path. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - } - /** - * Returns `undefined`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link utimes}. - * @since v0.4.2 - */ - export function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; - /** - * Change the file system timestamps of the object referenced by the supplied file - * descriptor. See {@link utimes}. - * @since v0.4.2 - */ - export function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; - export namespace futimes { - /** - * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise; - } - /** - * Synchronous version of {@link futimes}. Returns `undefined`. - * @since v0.4.2 - */ - export function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void; - /** - * Request that all data for the open file descriptor is flushed to the storage - * device. The specific implementation is operating system and device specific. - * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other - * than a possible exception are given to the completion callback. - * @since v0.1.96 - */ - export function fsync(fd: number, callback: NoParamCallback): void; - export namespace fsync { - /** - * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - /** - * Request that all data for the open file descriptor is flushed to the storage - * device. The specific implementation is operating system and device specific. - * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`. - * @since v0.1.96 - */ - export function fsyncSync(fd: number): void; - /** - * Write `buffer` to the file specified by `fd`. - * - * `offset` determines the part of the buffer to be written, and `length` is - * an integer specifying the number of bytes to write. - * - * `position` refers to the offset from the beginning of the file where this data - * should be written. If `typeof position !== 'number'`, the data will be written - * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html). - * - * The callback will be given three arguments `(err, bytesWritten, buffer)` where `bytesWritten` specifies how many _bytes_ were written from `buffer`. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a promise for an `Object` with `bytesWritten` and `buffer` properties. - * - * It is unsafe to use `fs.write()` multiple times on the same file without waiting - * for the callback. For this scenario, {@link createWriteStream} is - * recommended. - * - * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v0.0.2 - * @param [offset=0] - * @param [length=buffer.byteLength - offset] - * @param [position='null'] - */ - export function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - length: number | undefined | null, - position: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - */ - export function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - length: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - */ - export function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - */ - export function write( - fd: number, - buffer: TBuffer, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - export function write( - fd: number, - string: string, - position: number | undefined | null, - encoding: BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - export function write( - fd: number, - string: string, - position: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - */ - export function write( - fd: number, - string: string, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - export namespace write { - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function __promisify__( - fd: number, - buffer?: TBuffer, - offset?: number, - length?: number, - position?: number | null, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - function __promisify__( - fd: number, - string: string, - position?: number | null, - encoding?: BufferEncoding | null, - ): Promise<{ - bytesWritten: number; - buffer: string; - }>; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link write}. - * @since v0.1.21 - * @param [offset=0] - * @param [length=buffer.byteLength - offset] - * @param [position='null'] - * @return The number of bytes written. - */ - export function writeSync( - fd: number, - buffer: NodeJS.ArrayBufferView, - offset?: number | null, - length?: number | null, - position?: number | null, - ): number; - /** - * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - export function writeSync( - fd: number, - string: string, - position?: number | null, - encoding?: BufferEncoding | null, - ): number; - export type ReadPosition = number | bigint; - export interface ReadSyncOptions { - /** - * @default 0 - */ - offset?: number | undefined; - /** - * @default `length of buffer` - */ - length?: number | undefined; - /** - * @default null - */ - position?: ReadPosition | null | undefined; - } - export interface ReadAsyncOptions extends ReadSyncOptions { - buffer?: TBuffer; - } - /** - * Read data from the file specified by `fd`. - * - * The callback is given the three arguments, `(err, bytesRead, buffer)`. - * - * If the file is not modified concurrently, the end-of-file is reached when the - * number of bytes read is zero. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a promise for an `Object` with `bytesRead` and `buffer` properties. - * @since v0.0.2 - * @param buffer The buffer that the data will be written to. - * @param offset The position in `buffer` to write the data to. - * @param length The number of bytes to read. - * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If - * `position` is an integer, the file position will be unchanged. - */ - export function read( - fd: number, - buffer: TBuffer, - offset: number, - length: number, - position: ReadPosition | null, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - /** - * Similar to the above `fs.read` function, this version takes an optional `options` object. - * If not otherwise specified in an `options` object, - * `buffer` defaults to `Buffer.alloc(16384)`, - * `offset` defaults to `0`, - * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0 - * `position` defaults to `null` - * @since v12.17.0, 13.11.0 - */ - export function read( - fd: number, - options: ReadAsyncOptions, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - export function read( - fd: number, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void, - ): void; - export namespace read { - /** - * @param fd A file descriptor. - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. - * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. - */ - function __promisify__( - fd: number, - buffer: TBuffer, - offset: number, - length: number, - position: number | null, - ): Promise<{ - bytesRead: number; - buffer: TBuffer; - }>; - function __promisify__( - fd: number, - options: ReadAsyncOptions, - ): Promise<{ - bytesRead: number; - buffer: TBuffer; - }>; - function __promisify__(fd: number): Promise<{ - bytesRead: number; - buffer: NodeJS.ArrayBufferView; - }>; - } - /** - * Returns the number of `bytesRead`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link read}. - * @since v0.1.21 - * @param [position='null'] - */ - export function readSync( - fd: number, - buffer: NodeJS.ArrayBufferView, - offset: number, - length: number, - position: ReadPosition | null, - ): number; - /** - * Similar to the above `fs.readSync` function, this version takes an optional `options` object. - * If no `options` object is specified, it will default with the above values. - */ - export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadSyncOptions): number; - /** - * Asynchronously reads the entire contents of a file. - * - * ```js - * import { readFile } from 'node:fs'; - * - * readFile('/etc/passwd', (err, data) => { - * if (err) throw err; - * console.log(data); - * }); - * ``` - * - * The callback is passed two arguments `(err, data)`, where `data` is the - * contents of the file. - * - * If no encoding is specified, then the raw buffer is returned. - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { readFile } from 'node:fs'; - * - * readFile('/etc/passwd', 'utf8', callback); - * ``` - * - * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an - * error will be returned. On FreeBSD, a representation of the directory's contents - * will be returned. - * - * ```js - * import { readFile } from 'node:fs'; - * - * // macOS, Linux, and Windows - * readFile('', (err, data) => { - * // => [Error: EISDIR: illegal operation on a directory, read ] - * }); - * - * // FreeBSD - * readFile('', (err, data) => { - * // => null, - * }); - * ``` - * - * It is possible to abort an ongoing request using an `AbortSignal`. If a - * request is aborted the callback is called with an `AbortError`: - * - * ```js - * import { readFile } from 'node:fs'; - * - * const controller = new AbortController(); - * const signal = controller.signal; - * readFile(fileInfo[0].name, { signal }, (err, buf) => { - * // ... - * }); - * // When you want to abort the request - * controller.abort(); - * ``` - * - * The `fs.readFile()` function buffers the entire file. To minimize memory costs, - * when possible prefer streaming via `fs.createReadStream()`. - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.readFile` performs. - * @since v0.1.29 - * @param path filename or file descriptor - */ - export function readFile( - path: PathOrFileDescriptor, - options: - | ({ - encoding?: null | undefined; - flag?: string | undefined; - } & Abortable) - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void, - ): void; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - export function readFile( - path: PathOrFileDescriptor, - options: - | ({ - encoding: BufferEncoding; - flag?: string | undefined; - } & Abortable) - | BufferEncoding, - callback: (err: NodeJS.ErrnoException | null, data: string) => void, - ): void; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - export function readFile( - path: PathOrFileDescriptor, - options: - | (ObjectEncodingOptions & { - flag?: string | undefined; - } & Abortable) - | BufferEncoding - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void, - ): void; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - */ - export function readFile( - path: PathOrFileDescriptor, - callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void, - ): void; - export namespace readFile { - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__( - path: PathOrFileDescriptor, - options?: { - encoding?: null | undefined; - flag?: string | undefined; - } | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__( - path: PathOrFileDescriptor, - options: - | { - encoding: BufferEncoding; - flag?: string | undefined; - } - | BufferEncoding, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__( - path: PathOrFileDescriptor, - options?: - | (ObjectEncodingOptions & { - flag?: string | undefined; - }) - | BufferEncoding - | null, - ): Promise; - } - /** - * Returns the contents of the `path`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link readFile}. - * - * If the `encoding` option is specified then this function returns a - * string. Otherwise it returns a buffer. - * - * Similar to {@link readFile}, when the path is a directory, the behavior of `fs.readFileSync()` is platform-specific. - * - * ```js - * import { readFileSync } from 'node:fs'; - * - * // macOS, Linux, and Windows - * readFileSync(''); - * // => [Error: EISDIR: illegal operation on a directory, read ] - * - * // FreeBSD - * readFileSync(''); // => - * ``` - * @since v0.1.8 - * @param path filename or file descriptor - */ - export function readFileSync( - path: PathOrFileDescriptor, - options?: { - encoding?: null | undefined; - flag?: string | undefined; - } | null, - ): Buffer; - /** - * Synchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - export function readFileSync( - path: PathOrFileDescriptor, - options: - | { - encoding: BufferEncoding; - flag?: string | undefined; - } - | BufferEncoding, - ): string; - /** - * Synchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - export function readFileSync( - path: PathOrFileDescriptor, - options?: - | (ObjectEncodingOptions & { - flag?: string | undefined; - }) - | BufferEncoding - | null, - ): string | Buffer; - export type WriteFileOptions = - | ( - & ObjectEncodingOptions - & Abortable - & { - mode?: Mode | undefined; - flag?: string | undefined; - flush?: boolean | undefined; - } - ) - | BufferEncoding - | null; - /** - * When `file` is a filename, asynchronously writes data to the file, replacing the - * file if it already exists. `data` can be a string or a buffer. - * - * When `file` is a file descriptor, the behavior is similar to calling `fs.write()` directly (which is recommended). See the notes below on using - * a file descriptor. - * - * The `encoding` option is ignored if `data` is a buffer. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * ```js - * import { writeFile } from 'node:fs'; - * import { Buffer } from 'node:buffer'; - * - * const data = new Uint8Array(Buffer.from('Hello Node.js')); - * writeFile('message.txt', data, (err) => { - * if (err) throw err; - * console.log('The file has been saved!'); - * }); - * ``` - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { writeFile } from 'node:fs'; - * - * writeFile('message.txt', 'Hello Node.js', 'utf8', callback); - * ``` - * - * It is unsafe to use `fs.writeFile()` multiple times on the same file without - * waiting for the callback. For this scenario, {@link createWriteStream} is - * recommended. - * - * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that - * performs multiple `write` calls internally to write the buffer passed to it. - * For performance sensitive code consider using {@link createWriteStream}. - * - * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`. - * Cancelation is "best effort", and some amount of data is likely still - * to be written. - * - * ```js - * import { writeFile } from 'node:fs'; - * import { Buffer } from 'node:buffer'; - * - * const controller = new AbortController(); - * const { signal } = controller; - * const data = new Uint8Array(Buffer.from('Hello Node.js')); - * writeFile('message.txt', data, { signal }, (err) => { - * // When a request is aborted - the callback is called with an AbortError - * }); - * // When the request should be aborted - * controller.abort(); - * ``` - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.writeFile` performs. - * @since v0.1.29 - * @param file filename or file descriptor - */ - export function writeFile( - file: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - options: WriteFileOptions, - callback: NoParamCallback, - ): void; - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - */ - export function writeFile( - path: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - callback: NoParamCallback, - ): void; - export namespace writeFile { - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. - */ - function __promisify__( - path: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - options?: WriteFileOptions, - ): Promise; - } - /** - * Returns `undefined`. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link writeFile}. - * @since v0.1.29 - * @param file filename or file descriptor - */ - export function writeFileSync( - file: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - options?: WriteFileOptions, - ): void; - /** - * Asynchronously append data to a file, creating the file if it does not yet - * exist. `data` can be a string or a `Buffer`. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * ```js - * import { appendFile } from 'node:fs'; - * - * appendFile('message.txt', 'data to append', (err) => { - * if (err) throw err; - * console.log('The "data to append" was appended to file!'); - * }); - * ``` - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { appendFile } from 'node:fs'; - * - * appendFile('message.txt', 'data to append', 'utf8', callback); - * ``` - * - * The `path` may be specified as a numeric file descriptor that has been opened - * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will - * not be closed automatically. - * - * ```js - * import { open, close, appendFile } from 'node:fs'; - * - * function closeFd(fd) { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * - * open('message.txt', 'a', (err, fd) => { - * if (err) throw err; - * - * try { - * appendFile(fd, 'data to append', 'utf8', (err) => { - * closeFd(fd); - * if (err) throw err; - * }); - * } catch (err) { - * closeFd(fd); - * throw err; - * } - * }); - * ``` - * @since v0.6.7 - * @param path filename or file descriptor - */ - export function appendFile( - path: PathOrFileDescriptor, - data: string | Uint8Array, - options: WriteFileOptions, - callback: NoParamCallback, - ): void; - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - */ - export function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void; - export namespace appendFile { - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. - */ - function __promisify__( - file: PathOrFileDescriptor, - data: string | Uint8Array, - options?: WriteFileOptions, - ): Promise; - } - /** - * Synchronously append data to a file, creating the file if it does not yet - * exist. `data` can be a string or a `Buffer`. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * ```js - * import { appendFileSync } from 'node:fs'; - * - * try { - * appendFileSync('message.txt', 'data to append'); - * console.log('The "data to append" was appended to file!'); - * } catch (err) { - * // Handle the error - * } - * ``` - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { appendFileSync } from 'node:fs'; - * - * appendFileSync('message.txt', 'data to append', 'utf8'); - * ``` - * - * The `path` may be specified as a numeric file descriptor that has been opened - * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will - * not be closed automatically. - * - * ```js - * import { openSync, closeSync, appendFileSync } from 'node:fs'; - * - * let fd; - * - * try { - * fd = openSync('message.txt', 'a'); - * appendFileSync(fd, 'data to append', 'utf8'); - * } catch (err) { - * // Handle the error - * } finally { - * if (fd !== undefined) - * closeSync(fd); - * } - * ``` - * @since v0.6.7 - * @param path filename or file descriptor - */ - export function appendFileSync( - path: PathOrFileDescriptor, - data: string | Uint8Array, - options?: WriteFileOptions, - ): void; - /** - * Watch for changes on `filename`. The callback `listener` will be called each - * time the file is accessed. - * - * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates - * whether the process should continue to run as long as files are being watched. - * The `options` object may specify an `interval` property indicating how often the - * target should be polled in milliseconds. - * - * The `listener` gets two arguments the current stat object and the previous - * stat object: - * - * ```js - * import { watchFile } from 'node:fs'; - * - * watchFile('message.text', (curr, prev) => { - * console.log(`the current mtime is: ${curr.mtime}`); - * console.log(`the previous mtime was: ${prev.mtime}`); - * }); - * ``` - * - * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, - * the numeric values in these objects are specified as `BigInt`s. - * - * To be notified when the file was modified, not just accessed, it is necessary - * to compare `curr.mtimeMs` and `prev.mtimeMs`. - * - * When an `fs.watchFile` operation results in an `ENOENT` error, it - * will invoke the listener once, with all the fields zeroed (or, for dates, the - * Unix Epoch). If the file is created later on, the listener will be called - * again, with the latest stat objects. This is a change in functionality since - * v0.10. - * - * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. - * - * When a file being watched by `fs.watchFile()` disappears and reappears, - * then the contents of `previous` in the second callback event (the file's - * reappearance) will be the same as the contents of `previous` in the first - * callback event (its disappearance). - * - * This happens when: - * - * * the file is deleted, followed by a restore - * * the file is renamed and then renamed a second time back to its original name - * @since v0.1.31 - */ - export interface WatchFileOptions { - bigint?: boolean | undefined; - persistent?: boolean | undefined; - interval?: number | undefined; - } - /** - * Watch for changes on `filename`. The callback `listener` will be called each - * time the file is accessed. - * - * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates - * whether the process should continue to run as long as files are being watched. - * The `options` object may specify an `interval` property indicating how often the - * target should be polled in milliseconds. - * - * The `listener` gets two arguments the current stat object and the previous - * stat object: - * - * ```js - * import { watchFile } from 'node:fs'; - * - * watchFile('message.text', (curr, prev) => { - * console.log(`the current mtime is: ${curr.mtime}`); - * console.log(`the previous mtime was: ${prev.mtime}`); - * }); - * ``` - * - * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, - * the numeric values in these objects are specified as `BigInt`s. - * - * To be notified when the file was modified, not just accessed, it is necessary - * to compare `curr.mtimeMs` and `prev.mtimeMs`. - * - * When an `fs.watchFile` operation results in an `ENOENT` error, it - * will invoke the listener once, with all the fields zeroed (or, for dates, the - * Unix Epoch). If the file is created later on, the listener will be called - * again, with the latest stat objects. This is a change in functionality since - * v0.10. - * - * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. - * - * When a file being watched by `fs.watchFile()` disappears and reappears, - * then the contents of `previous` in the second callback event (the file's - * reappearance) will be the same as the contents of `previous` in the first - * callback event (its disappearance). - * - * This happens when: - * - * * the file is deleted, followed by a restore - * * the file is renamed and then renamed a second time back to its original name - * @since v0.1.31 - */ - export function watchFile( - filename: PathLike, - options: - | (WatchFileOptions & { - bigint?: false | undefined; - }) - | undefined, - listener: StatsListener, - ): StatWatcher; - export function watchFile( - filename: PathLike, - options: - | (WatchFileOptions & { - bigint: true; - }) - | undefined, - listener: BigIntStatsListener, - ): StatWatcher; - /** - * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - */ - export function watchFile(filename: PathLike, listener: StatsListener): StatWatcher; - /** - * Stop watching for changes on `filename`. If `listener` is specified, only that - * particular listener is removed. Otherwise, _all_ listeners are removed, - * effectively stopping watching of `filename`. - * - * Calling `fs.unwatchFile()` with a filename that is not being watched is a - * no-op, not an error. - * - * Using {@link watch} is more efficient than `fs.watchFile()` and `fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()` and `fs.unwatchFile()` when possible. - * @since v0.1.31 - * @param listener Optional, a listener previously attached using `fs.watchFile()` - */ - export function unwatchFile(filename: PathLike, listener?: StatsListener): void; - export function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void; - export interface WatchOptions extends Abortable { - encoding?: BufferEncoding | "buffer" | undefined; - persistent?: boolean | undefined; - recursive?: boolean | undefined; - } - export type WatchEventType = "rename" | "change"; - export type WatchListener = (event: WatchEventType, filename: T | null) => void; - export type StatsListener = (curr: Stats, prev: Stats) => void; - export type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void; - /** - * Watch for changes on `filename`, where `filename` is either a file or a - * directory. - * - * The second argument is optional. If `options` is provided as a string, it - * specifies the `encoding`. Otherwise `options` should be passed as an object. - * - * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file - * which triggered the event. - * - * On most platforms, `'rename'` is emitted whenever a filename appears or - * disappears in the directory. - * - * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of `eventType`. - * - * If a `signal` is passed, aborting the corresponding AbortController will close - * the returned `fs.FSWatcher`. - * @since v0.5.10 - * @param listener - */ - export function watch( - filename: PathLike, - options: - | (WatchOptions & { - encoding: "buffer"; - }) - | "buffer", - listener?: WatchListener, - ): FSWatcher; - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `persistent` is not supplied, the default of `true` is used. - * If `recursive` is not supplied, the default of `false` is used. - */ - export function watch( - filename: PathLike, - options?: WatchOptions | BufferEncoding | null, - listener?: WatchListener, - ): FSWatcher; - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `persistent` is not supplied, the default of `true` is used. - * If `recursive` is not supplied, the default of `false` is used. - */ - export function watch( - filename: PathLike, - options: WatchOptions | string, - listener?: WatchListener, - ): FSWatcher; - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - */ - export function watch(filename: PathLike, listener?: WatchListener): FSWatcher; - /** - * Test whether or not the given path exists by checking with the file system. - * Then call the `callback` argument with either true or false: - * - * ```js - * import { exists } from 'node:fs'; - * - * exists('/etc/passwd', (e) => { - * console.log(e ? 'it exists' : 'no passwd!'); - * }); - * ``` - * - * **The parameters for this callback are not consistent with other Node.js** - * **callbacks.** Normally, the first parameter to a Node.js callback is an `err` parameter, optionally followed by other parameters. The `fs.exists()` callback - * has only one boolean parameter. This is one reason `fs.access()` is recommended - * instead of `fs.exists()`. - * - * Using `fs.exists()` to check for the existence of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing - * so introduces a race condition, since other processes may change the file's - * state between the two calls. Instead, user code should open/read/write the - * file directly and handle the error raised if the file does not exist. - * - * **write (NOT RECOMMENDED)** - * - * ```js - * import { exists, open, close } from 'node:fs'; - * - * exists('myfile', (e) => { - * if (e) { - * console.error('myfile already exists'); - * } else { - * open('myfile', 'wx', (err, fd) => { - * if (err) throw err; - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * } - * }); - * ``` - * - * **write (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * open('myfile', 'wx', (err, fd) => { - * if (err) { - * if (err.code === 'EEXIST') { - * console.error('myfile already exists'); - * return; - * } - * - * throw err; - * } - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * **read (NOT RECOMMENDED)** - * - * ```js - * import { open, close, exists } from 'node:fs'; - * - * exists('myfile', (e) => { - * if (e) { - * open('myfile', 'r', (err, fd) => { - * if (err) throw err; - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * } else { - * console.error('myfile does not exist'); - * } - * }); - * ``` - * - * **read (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * - * open('myfile', 'r', (err, fd) => { - * if (err) { - * if (err.code === 'ENOENT') { - * console.error('myfile does not exist'); - * return; - * } - * - * throw err; - * } - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * The "not recommended" examples above check for existence and then use the - * file; the "recommended" examples are better because they use the file directly - * and handle the error, if any. - * - * In general, check for the existence of a file only if the file won't be - * used directly, for example when its existence is a signal from another - * process. - * @since v0.0.2 - * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead. - */ - export function exists(path: PathLike, callback: (exists: boolean) => void): void; - /** @deprecated */ - export namespace exists { - /** - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(path: PathLike): Promise; - } - /** - * Returns `true` if the path exists, `false` otherwise. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link exists}. - * - * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback` parameter to `fs.exists()` accepts parameters that are inconsistent with other - * Node.js callbacks. `fs.existsSync()` does not use a callback. - * - * ```js - * import { existsSync } from 'node:fs'; - * - * if (existsSync('/etc/passwd')) - * console.log('The path exists.'); - * ``` - * @since v0.1.21 - */ - export function existsSync(path: PathLike): boolean; - export namespace constants { - // File Access Constants - /** Constant for fs.access(). File is visible to the calling process. */ - const F_OK: number; - /** Constant for fs.access(). File can be read by the calling process. */ - const R_OK: number; - /** Constant for fs.access(). File can be written by the calling process. */ - const W_OK: number; - /** Constant for fs.access(). File can be executed by the calling process. */ - const X_OK: number; - // File Copy Constants - /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ - const COPYFILE_EXCL: number; - /** - * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. - * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. - */ - const COPYFILE_FICLONE: number; - /** - * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. - * If the underlying platform does not support copy-on-write, then the operation will fail with an error. - */ - const COPYFILE_FICLONE_FORCE: number; - // File Open Constants - /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ - const O_RDONLY: number; - /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ - const O_WRONLY: number; - /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ - const O_RDWR: number; - /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ - const O_CREAT: number; - /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ - const O_EXCL: number; - /** - * Constant for fs.open(). Flag indicating that if path identifies a terminal device, - * opening the path shall not cause that terminal to become the controlling terminal for the process - * (if the process does not already have one). - */ - const O_NOCTTY: number; - /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ - const O_TRUNC: number; - /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ - const O_APPEND: number; - /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ - const O_DIRECTORY: number; - /** - * constant for fs.open(). - * Flag indicating reading accesses to the file system will no longer result in - * an update to the atime information associated with the file. - * This flag is available on Linux operating systems only. - */ - const O_NOATIME: number; - /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ - const O_NOFOLLOW: number; - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ - const O_SYNC: number; - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ - const O_DSYNC: number; - /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ - const O_SYMLINK: number; - /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ - const O_DIRECT: number; - /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ - const O_NONBLOCK: number; - // File Type Constants - /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ - const S_IFMT: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ - const S_IFREG: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ - const S_IFDIR: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ - const S_IFCHR: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ - const S_IFBLK: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ - const S_IFIFO: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ - const S_IFLNK: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ - const S_IFSOCK: number; - // File Mode Constants - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ - const S_IRWXU: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ - const S_IRUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ - const S_IWUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ - const S_IXUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ - const S_IRWXG: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ - const S_IRGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ - const S_IWGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ - const S_IXGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ - const S_IRWXO: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ - const S_IROTH: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ - const S_IWOTH: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ - const S_IXOTH: number; - /** - * When set, a memory file mapping is used to access the file. This flag - * is available on Windows operating systems only. On other operating systems, - * this flag is ignored. - */ - const UV_FS_O_FILEMAP: number; - } - /** - * Tests a user's permissions for the file or directory specified by `path`. - * The `mode` argument is an optional integer that specifies the accessibility - * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` - * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for - * possible values of `mode`. - * - * The final argument, `callback`, is a callback function that is invoked with - * a possible error argument. If any of the accessibility checks fail, the error - * argument will be an `Error` object. The following examples check if `package.json` exists, and if it is readable or writable. - * - * ```js - * import { access, constants } from 'node:fs'; - * - * const file = 'package.json'; - * - * // Check if the file exists in the current directory. - * access(file, constants.F_OK, (err) => { - * console.log(`${file} ${err ? 'does not exist' : 'exists'}`); - * }); - * - * // Check if the file is readable. - * access(file, constants.R_OK, (err) => { - * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`); - * }); - * - * // Check if the file is writable. - * access(file, constants.W_OK, (err) => { - * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`); - * }); - * - * // Check if the file is readable and writable. - * access(file, constants.R_OK | constants.W_OK, (err) => { - * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`); - * }); - * ``` - * - * Do not use `fs.access()` to check for the accessibility of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing - * so introduces a race condition, since other processes may change the file's - * state between the two calls. Instead, user code should open/read/write the - * file directly and handle the error raised if the file is not accessible. - * - * **write (NOT RECOMMENDED)** - * - * ```js - * import { access, open, close } from 'node:fs'; - * - * access('myfile', (err) => { - * if (!err) { - * console.error('myfile already exists'); - * return; - * } - * - * open('myfile', 'wx', (err, fd) => { - * if (err) throw err; - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * }); - * ``` - * - * **write (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * - * open('myfile', 'wx', (err, fd) => { - * if (err) { - * if (err.code === 'EEXIST') { - * console.error('myfile already exists'); - * return; - * } - * - * throw err; - * } - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * **read (NOT RECOMMENDED)** - * - * ```js - * import { access, open, close } from 'node:fs'; - * access('myfile', (err) => { - * if (err) { - * if (err.code === 'ENOENT') { - * console.error('myfile does not exist'); - * return; - * } - * - * throw err; - * } - * - * open('myfile', 'r', (err, fd) => { - * if (err) throw err; - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * }); - * ``` - * - * **read (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * - * open('myfile', 'r', (err, fd) => { - * if (err) { - * if (err.code === 'ENOENT') { - * console.error('myfile does not exist'); - * return; - * } - * - * throw err; - * } - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * The "not recommended" examples above check for accessibility and then use the - * file; the "recommended" examples are better because they use the file directly - * and handle the error, if any. - * - * In general, check for the accessibility of a file only if the file will not be - * used directly, for example when its accessibility is a signal from another - * process. - * - * On Windows, access-control policies (ACLs) on a directory may limit access to - * a file or directory. The `fs.access()` function, however, does not check the - * ACL and therefore may report that a path is accessible even if the ACL restricts - * the user from reading or writing to it. - * @since v0.11.15 - * @param [mode=fs.constants.F_OK] - */ - export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void; - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - */ - export function access(path: PathLike, callback: NoParamCallback): void; - export namespace access { - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(path: PathLike, mode?: number): Promise; - } - /** - * Synchronously tests a user's permissions for the file or directory specified - * by `path`. The `mode` argument is an optional integer that specifies the - * accessibility checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and - * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for - * possible values of `mode`. - * - * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise, - * the method will return `undefined`. - * - * ```js - * import { accessSync, constants } from 'node:fs'; - * - * try { - * accessSync('etc/passwd', constants.R_OK | constants.W_OK); - * console.log('can read/write'); - * } catch (err) { - * console.error('no access!'); - * } - * ``` - * @since v0.11.15 - * @param [mode=fs.constants.F_OK] - */ - export function accessSync(path: PathLike, mode?: number): void; - interface StreamOptions { - flags?: string | undefined; - encoding?: BufferEncoding | undefined; - fd?: number | promises.FileHandle | undefined; - mode?: number | undefined; - autoClose?: boolean | undefined; - emitClose?: boolean | undefined; - start?: number | undefined; - signal?: AbortSignal | null | undefined; - highWaterMark?: number | undefined; - } - interface FSImplementation { - open?: (...args: any[]) => any; - close?: (...args: any[]) => any; - } - interface CreateReadStreamFSImplementation extends FSImplementation { - read: (...args: any[]) => any; - } - interface CreateWriteStreamFSImplementation extends FSImplementation { - write: (...args: any[]) => any; - writev?: (...args: any[]) => any; - } - interface ReadStreamOptions extends StreamOptions { - fs?: CreateReadStreamFSImplementation | null | undefined; - end?: number | undefined; - } - interface WriteStreamOptions extends StreamOptions { - fs?: CreateWriteStreamFSImplementation | null | undefined; - flush?: boolean | undefined; - } - /** - * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream - * returned by this method has a default `highWaterMark` of 64 KiB. - * - * `options` can include `start` and `end` values to read a range of bytes from - * the file instead of the entire file. Both `start` and `end` are inclusive and - * start counting at 0, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is - * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the - * current file position. The `encoding` can be any one of those accepted by `Buffer`. - * - * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use - * the specified file descriptor. This means that no `'open'` event will be - * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`. - * - * If `fd` points to a character device that only supports blocking reads - * (such as keyboard or sound card), read operations do not finish until data is - * available. This can prevent the process from exiting and the stream from - * closing naturally. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * - * By providing the `fs` option, it is possible to override the corresponding `fs` implementations for `open`, `read`, and `close`. When providing the `fs` option, - * an override for `read` is required. If no `fd` is provided, an override for `open` is also required. If `autoClose` is `true`, an override for `close` is - * also required. - * - * ```js - * import { createReadStream } from 'node:fs'; - * - * // Create a stream from some character device. - * const stream = createReadStream('/dev/input/event0'); - * setTimeout(() => { - * stream.close(); // This may not close the stream. - * // Artificially marking end-of-stream, as if the underlying resource had - * // indicated end-of-file by itself, allows the stream to close. - * // This does not cancel pending read operations, and if there is such an - * // operation, the process may still not be able to exit successfully - * // until it finishes. - * stream.push(null); - * stream.read(0); - * }, 100); - * ``` - * - * If `autoClose` is false, then the file descriptor won't be closed, even if - * there's an error. It is the application's responsibility to close it and make - * sure there's no file descriptor leak. If `autoClose` is set to true (default - * behavior), on `'error'` or `'end'` the file descriptor will be closed - * automatically. - * - * `mode` sets the file mode (permission and sticky bits), but only if the - * file was created. - * - * An example to read the last 10 bytes of a file which is 100 bytes long: - * - * ```js - * import { createReadStream } from 'node:fs'; - * - * createReadStream('sample.txt', { start: 90, end: 99 }); - * ``` - * - * If `options` is a string, then it specifies the encoding. - * @since v0.1.31 - */ - export function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream; - /** - * `options` may also include a `start` option to allow writing data at some - * position past the beginning of the file, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than - * replacing it may require the `flags` option to be set to `r+` rather than the - * default `w`. The `encoding` can be any one of those accepted by `Buffer`. - * - * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, - * then the file descriptor won't be closed, even if there's an error. - * It is the application's responsibility to close it and make sure there's no - * file descriptor leak. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * - * By providing the `fs` option it is possible to override the corresponding `fs` implementations for `open`, `write`, `writev`, and `close`. Overriding `write()` without `writev()` can reduce - * performance as some optimizations (`_writev()`) - * will be disabled. When providing the `fs` option, overrides for at least one of `write` and `writev` are required. If no `fd` option is supplied, an override - * for `open` is also required. If `autoClose` is `true`, an override for `close` is also required. - * - * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the `path` argument and will use the specified file descriptor. This means that no `'open'` event will be - * emitted. `fd` should be blocking; non-blocking `fd`s - * should be passed to `net.Socket`. - * - * If `options` is a string, then it specifies the encoding. - * @since v0.1.31 - */ - export function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream; - /** - * Forces all currently queued I/O operations associated with the file to the - * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other - * than a possible - * exception are given to the completion callback. - * @since v0.1.96 - */ - export function fdatasync(fd: number, callback: NoParamCallback): void; - export namespace fdatasync { - /** - * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - /** - * Forces all currently queued I/O operations associated with the file to the - * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`. - * @since v0.1.96 - */ - export function fdatasyncSync(fd: number): void; - /** - * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it - * already exists. No arguments other than a possible exception are given to the - * callback function. Node.js makes no guarantees about the atomicity of the copy - * operation. If an error occurs after the destination file has been opened for - * writing, Node.js will attempt to remove the destination. - * - * `mode` is an optional integer that specifies the behavior - * of the copy operation. It is possible to create a mask consisting of the bitwise - * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). - * - * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already - * exists. - * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a - * copy-on-write reflink. If the platform does not support copy-on-write, then a - * fallback copy mechanism is used. - * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to - * create a copy-on-write reflink. If the platform does not support - * copy-on-write, then the operation will fail. - * - * ```js - * import { copyFile, constants } from 'node:fs'; - * - * function callback(err) { - * if (err) throw err; - * console.log('source.txt was copied to destination.txt'); - * } - * - * // destination.txt will be created or overwritten by default. - * copyFile('source.txt', 'destination.txt', callback); - * - * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. - * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback); - * ``` - * @since v8.5.0 - * @param src source filename to copy - * @param dest destination filename of the copy operation - * @param [mode=0] modifiers for copy operation. - */ - export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; - export function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void; - export namespace copyFile { - function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise; - } - /** - * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it - * already exists. Returns `undefined`. Node.js makes no guarantees about the - * atomicity of the copy operation. If an error occurs after the destination file - * has been opened for writing, Node.js will attempt to remove the destination. - * - * `mode` is an optional integer that specifies the behavior - * of the copy operation. It is possible to create a mask consisting of the bitwise - * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). - * - * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already - * exists. - * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a - * copy-on-write reflink. If the platform does not support copy-on-write, then a - * fallback copy mechanism is used. - * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to - * create a copy-on-write reflink. If the platform does not support - * copy-on-write, then the operation will fail. - * - * ```js - * import { copyFileSync, constants } from 'node:fs'; - * - * // destination.txt will be created or overwritten by default. - * copyFileSync('source.txt', 'destination.txt'); - * console.log('source.txt was copied to destination.txt'); - * - * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. - * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL); - * ``` - * @since v8.5.0 - * @param src source filename to copy - * @param dest destination filename of the copy operation - * @param [mode=0] modifiers for copy operation. - */ - export function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void; - /** - * Write an array of `ArrayBufferView`s to the file specified by `fd` using `writev()`. - * - * `position` is the offset from the beginning of the file where this data - * should be written. If `typeof position !== 'number'`, the data will be written - * at the current position. - * - * The callback will be given three arguments: `err`, `bytesWritten`, and `buffers`. `bytesWritten` is how many bytes were written from `buffers`. - * - * If this method is `util.promisify()` ed, it returns a promise for an `Object` with `bytesWritten` and `buffers` properties. - * - * It is unsafe to use `fs.writev()` multiple times on the same file without - * waiting for the callback. For this scenario, use {@link createWriteStream}. - * - * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v12.9.0 - * @param [position='null'] - */ - export function writev( - fd: number, - buffers: readonly NodeJS.ArrayBufferView[], - cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void, - ): void; - export function writev( - fd: number, - buffers: readonly NodeJS.ArrayBufferView[], - position: number, - cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void, - ): void; - export interface WriteVResult { - bytesWritten: number; - buffers: NodeJS.ArrayBufferView[]; - } - export namespace writev { - function __promisify__( - fd: number, - buffers: readonly NodeJS.ArrayBufferView[], - position?: number, - ): Promise; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link writev}. - * @since v12.9.0 - * @param [position='null'] - * @return The number of bytes written. - */ - export function writevSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; - /** - * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s - * using `readv()`. - * - * `position` is the offset from the beginning of the file from where data - * should be read. If `typeof position !== 'number'`, the data will be read - * from the current position. - * - * The callback will be given three arguments: `err`, `bytesRead`, and `buffers`. `bytesRead` is how many bytes were read from the file. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a promise for an `Object` with `bytesRead` and `buffers` properties. - * @since v13.13.0, v12.17.0 - * @param [position='null'] - */ - export function readv( - fd: number, - buffers: readonly NodeJS.ArrayBufferView[], - cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void, - ): void; - export function readv( - fd: number, - buffers: readonly NodeJS.ArrayBufferView[], - position: number, - cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void, - ): void; - export interface ReadVResult { - bytesRead: number; - buffers: NodeJS.ArrayBufferView[]; - } - export namespace readv { - function __promisify__( - fd: number, - buffers: readonly NodeJS.ArrayBufferView[], - position?: number, - ): Promise; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link readv}. - * @since v13.13.0, v12.17.0 - * @param [position='null'] - * @return The number of bytes read. - */ - export function readvSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; - - export interface OpenAsBlobOptions { - /** - * An optional mime type for the blob. - * - * @default 'undefined' - */ - type?: string | undefined; - } - - /** - * Returns a `Blob` whose data is backed by the given file. - * - * The file must not be modified after the `Blob` is created. Any modifications - * will cause reading the `Blob` data to fail with a `DOMException` error. - * Synchronous stat operations on the file when the `Blob` is created, and before - * each read in order to detect whether the file data has been modified on disk. - * - * ```js - * import { openAsBlob } from 'node:fs'; - * - * const blob = await openAsBlob('the.file.txt'); - * const ab = await blob.arrayBuffer(); - * blob.stream(); - * ``` - * @since v19.8.0 - * @experimental - */ - export function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise; - - export interface OpenDirOptions { - /** - * @default 'utf8' - */ - encoding?: BufferEncoding | undefined; - /** - * Number of directory entries that are buffered - * internally when reading from the directory. Higher values lead to better - * performance but higher memory usage. - * @default 32 - */ - bufferSize?: number | undefined; - /** - * @default false - */ - recursive?: boolean; - } - /** - * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html). - * - * Creates an `fs.Dir`, which contains all further functions for reading from - * and cleaning up the directory. - * - * The `encoding` option sets the encoding for the `path` while opening the - * directory and subsequent read operations. - * @since v12.12.0 - */ - export function opendirSync(path: PathLike, options?: OpenDirOptions): Dir; - /** - * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for - * more details. - * - * Creates an `fs.Dir`, which contains all further functions for reading from - * and cleaning up the directory. - * - * The `encoding` option sets the encoding for the `path` while opening the - * directory and subsequent read operations. - * @since v12.12.0 - */ - export function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; - export function opendir( - path: PathLike, - options: OpenDirOptions, - cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void, - ): void; - export namespace opendir { - function __promisify__(path: PathLike, options?: OpenDirOptions): Promise; - } - export interface BigIntStats extends StatsBase { - atimeNs: bigint; - mtimeNs: bigint; - ctimeNs: bigint; - birthtimeNs: bigint; - } - export interface BigIntOptions { - bigint: true; - } - export interface StatOptions { - bigint?: boolean | undefined; - } - export interface StatSyncOptions extends StatOptions { - throwIfNoEntry?: boolean | undefined; - } - interface CopyOptionsBase { - /** - * Dereference symlinks - * @default false - */ - dereference?: boolean; - /** - * When `force` is `false`, and the destination - * exists, throw an error. - * @default false - */ - errorOnExist?: boolean; - /** - * Overwrite existing file or directory. _The copy - * operation will ignore errors if you set this to false and the destination - * exists. Use the `errorOnExist` option to change this behavior. - * @default true - */ - force?: boolean; - /** - * Modifiers for copy operation. See `mode` flag of {@link copyFileSync()} - */ - mode?: number; - /** - * When `true` timestamps from `src` will - * be preserved. - * @default false - */ - preserveTimestamps?: boolean; - /** - * Copy directories recursively. - * @default false - */ - recursive?: boolean; - /** - * When true, path resolution for symlinks will be skipped - * @default false - */ - verbatimSymlinks?: boolean; - } - export interface CopyOptions extends CopyOptionsBase { - /** - * Function to filter copied files/directories. Return - * `true` to copy the item, `false` to ignore it. - */ - filter?(source: string, destination: string): boolean | Promise; - } - export interface CopySyncOptions extends CopyOptionsBase { - /** - * Function to filter copied files/directories. Return - * `true` to copy the item, `false` to ignore it. - */ - filter?(source: string, destination: string): boolean; - } - /** - * Asynchronously copies the entire directory structure from `src` to `dest`, - * including subdirectories and files. - * - * When copying a directory to another directory, globs are not supported and - * behavior is similar to `cp dir1/ dir2/`. - * @since v16.7.0 - * @experimental - * @param src source path to copy. - * @param dest destination path to copy to. - */ - export function cp( - source: string | URL, - destination: string | URL, - callback: (err: NodeJS.ErrnoException | null) => void, - ): void; - export function cp( - source: string | URL, - destination: string | URL, - opts: CopyOptions, - callback: (err: NodeJS.ErrnoException | null) => void, - ): void; - /** - * Synchronously copies the entire directory structure from `src` to `dest`, - * including subdirectories and files. - * - * When copying a directory to another directory, globs are not supported and - * behavior is similar to `cp dir1/ dir2/`. - * @since v16.7.0 - * @experimental - * @param src source path to copy. - * @param dest destination path to copy to. - */ - export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void; - - interface GlobOptionsBase { - /** - * Current working directory. - * @default process.cwd() - */ - cwd?: string | undefined; - /** - * `true` if the glob should return paths as `Dirent`s, `false` otherwise. - * @default false - * @since v22.2.0 - */ - withFileTypes?: boolean | undefined; - /** - * Function to filter out files/directories. Return true to exclude the item, false to include it. - */ - exclude?: ((fileName: any) => boolean) | undefined; - } - export interface GlobOptionsWithFileTypes extends GlobOptionsBase { - exclude?: ((fileName: Dirent) => boolean) | undefined; - withFileTypes: true; - } - export interface GlobOptionsWithoutFileTypes extends GlobOptionsBase { - exclude?: ((fileName: string) => boolean) | undefined; - withFileTypes?: false | undefined; - } - export interface GlobOptions extends GlobOptionsBase { - exclude?: ((fileName: Dirent | string) => boolean) | undefined; - } - - /** - * Retrieves the files matching the specified pattern. - */ - export function glob( - pattern: string | string[], - callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void, - ): void; - export function glob( - pattern: string | string[], - options: GlobOptionsWithFileTypes, - callback: ( - err: NodeJS.ErrnoException | null, - matches: Dirent[], - ) => void, - ): void; - export function glob( - pattern: string | string[], - options: GlobOptionsWithoutFileTypes, - callback: ( - err: NodeJS.ErrnoException | null, - matches: string[], - ) => void, - ): void; - export function glob( - pattern: string | string[], - options: GlobOptions, - callback: ( - err: NodeJS.ErrnoException | null, - matches: Dirent[] | string[], - ) => void, - ): void; - /** - * Retrieves the files matching the specified pattern. - */ - export function globSync(pattern: string | string[]): string[]; - export function globSync( - pattern: string | string[], - options: GlobOptionsWithFileTypes, - ): Dirent[]; - export function globSync( - pattern: string | string[], - options: GlobOptionsWithoutFileTypes, - ): string[]; - export function globSync( - pattern: string | string[], - options: GlobOptions, - ): Dirent[] | string[]; -} -declare module "node:fs" { - export * from "fs"; -} diff --git a/web/static/node_modules/@types/node/fs/promises.d.ts b/web/static/node_modules/@types/node/fs/promises.d.ts deleted file mode 100644 index cca6ad1d..00000000 --- a/web/static/node_modules/@types/node/fs/promises.d.ts +++ /dev/null @@ -1,1275 +0,0 @@ -/** - * The `fs/promises` API provides asynchronous file system methods that return - * promises. - * - * The promise APIs use the underlying Node.js threadpool to perform file - * system operations off the event loop thread. These operations are not - * synchronized or threadsafe. Care must be taken when performing multiple - * concurrent modifications on the same file or data corruption may occur. - * @since v10.0.0 - */ -declare module "fs/promises" { - import { Abortable } from "node:events"; - import { Stream } from "node:stream"; - import { ReadableStream } from "node:stream/web"; - import { - BigIntStats, - BigIntStatsFs, - BufferEncodingOption, - constants as fsConstants, - CopyOptions, - Dir, - Dirent, - GlobOptions, - GlobOptionsWithFileTypes, - GlobOptionsWithoutFileTypes, - MakeDirectoryOptions, - Mode, - ObjectEncodingOptions, - OpenDirOptions, - OpenMode, - PathLike, - ReadStream, - ReadVResult, - RmDirOptions, - RmOptions, - StatFsOptions, - StatOptions, - Stats, - StatsFs, - TimeLike, - WatchEventType, - WatchOptions, - WriteStream, - WriteVResult, - } from "node:fs"; - import { Interface as ReadlineInterface } from "node:readline"; - interface FileChangeInfo { - eventType: WatchEventType; - filename: T | null; - } - interface FlagAndOpenMode { - mode?: Mode | undefined; - flag?: OpenMode | undefined; - } - interface FileReadResult { - bytesRead: number; - buffer: T; - } - interface FileReadOptions { - /** - * @default `Buffer.alloc(0xffff)` - */ - buffer?: T; - /** - * @default 0 - */ - offset?: number | null; - /** - * @default `buffer.byteLength` - */ - length?: number | null; - position?: number | null; - } - interface CreateReadStreamOptions { - encoding?: BufferEncoding | null | undefined; - autoClose?: boolean | undefined; - emitClose?: boolean | undefined; - start?: number | undefined; - end?: number | undefined; - highWaterMark?: number | undefined; - } - interface CreateWriteStreamOptions { - encoding?: BufferEncoding | null | undefined; - autoClose?: boolean | undefined; - emitClose?: boolean | undefined; - start?: number | undefined; - highWaterMark?: number | undefined; - flush?: boolean | undefined; - } - interface ReadableWebStreamOptions { - /** - * Whether to open a normal or a `'bytes'` stream. - * @since v20.0.0 - */ - type?: "bytes" | undefined; - } - // TODO: Add `EventEmitter` close - interface FileHandle { - /** - * The numeric file descriptor managed by the {FileHandle} object. - * @since v10.0.0 - */ - readonly fd: number; - /** - * Alias of `filehandle.writeFile()`. - * - * When operating on file handles, the mode cannot be changed from what it was set - * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - appendFile( - data: string | Uint8Array, - options?: - | (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) - | BufferEncoding - | null, - ): Promise; - /** - * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html). - * @since v10.0.0 - * @param uid The file's new owner's user id. - * @param gid The file's new group's group id. - * @return Fulfills with `undefined` upon success. - */ - chown(uid: number, gid: number): Promise; - /** - * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html). - * @since v10.0.0 - * @param mode the file mode bit mask. - * @return Fulfills with `undefined` upon success. - */ - chmod(mode: Mode): Promise; - /** - * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream - * returned by this method has a default `highWaterMark` of 64 KiB. - * - * `options` can include `start` and `end` values to read a range of bytes from - * the file instead of the entire file. Both `start` and `end` are inclusive and - * start counting at 0, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is - * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from - * the current file position. The `encoding` can be any one of those accepted by `Buffer`. - * - * If the `FileHandle` points to a character device that only supports blocking - * reads (such as keyboard or sound card), read operations do not finish until data - * is available. This can prevent the process from exiting and the stream from - * closing naturally. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * - * ```js - * import { open } from 'node:fs/promises'; - * - * const fd = await open('/dev/input/event0'); - * // Create a stream from some character device. - * const stream = fd.createReadStream(); - * setTimeout(() => { - * stream.close(); // This may not close the stream. - * // Artificially marking end-of-stream, as if the underlying resource had - * // indicated end-of-file by itself, allows the stream to close. - * // This does not cancel pending read operations, and if there is such an - * // operation, the process may still not be able to exit successfully - * // until it finishes. - * stream.push(null); - * stream.read(0); - * }, 100); - * ``` - * - * If `autoClose` is false, then the file descriptor won't be closed, even if - * there's an error. It is the application's responsibility to close it and make - * sure there's no file descriptor leak. If `autoClose` is set to true (default - * behavior), on `'error'` or `'end'` the file descriptor will be closed - * automatically. - * - * An example to read the last 10 bytes of a file which is 100 bytes long: - * - * ```js - * import { open } from 'node:fs/promises'; - * - * const fd = await open('sample.txt'); - * fd.createReadStream({ start: 90, end: 99 }); - * ``` - * @since v16.11.0 - */ - createReadStream(options?: CreateReadStreamOptions): ReadStream; - /** - * `options` may also include a `start` option to allow writing data at some - * position past the beginning of the file, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than - * replacing it may require the `flags` `open` option to be set to `r+` rather than - * the default `r`. The `encoding` can be any one of those accepted by `Buffer`. - * - * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, - * then the file descriptor won't be closed, even if there's an error. - * It is the application's responsibility to close it and make sure there's no - * file descriptor leak. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * @since v16.11.0 - */ - createWriteStream(options?: CreateWriteStreamOptions): WriteStream; - /** - * Forces all currently queued I/O operations associated with the file to the - * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. - * - * Unlike `filehandle.sync` this method does not flush modified metadata. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - datasync(): Promise; - /** - * Request that all data for the open file descriptor is flushed to the storage - * device. The specific implementation is operating system and device specific. - * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - sync(): Promise; - /** - * Reads data from the file and stores that in the given buffer. - * - * If the file is not modified concurrently, the end-of-file is reached when the - * number of bytes read is zero. - * @since v10.0.0 - * @param buffer A buffer that will be filled with the file data read. - * @param offset The location in the buffer at which to start filling. - * @param length The number of bytes to read. - * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an - * integer, the current file position will remain unchanged. - * @return Fulfills upon success with an object with two properties: - */ - read( - buffer: T, - offset?: number | null, - length?: number | null, - position?: number | null, - ): Promise>; - read( - buffer: T, - options?: FileReadOptions, - ): Promise>; - read(options?: FileReadOptions): Promise>; - /** - * Returns a `ReadableStream` that may be used to read the files data. - * - * An error will be thrown if this method is called more than once or is called - * after the `FileHandle` is closed or closing. - * - * ```js - * import { - * open, - * } from 'node:fs/promises'; - * - * const file = await open('./some/file/to/read'); - * - * for await (const chunk of file.readableWebStream()) - * console.log(chunk); - * - * await file.close(); - * ``` - * - * While the `ReadableStream` will read the file to completion, it will not - * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method. - * @since v17.0.0 - * @experimental - */ - readableWebStream(options?: ReadableWebStreamOptions): ReadableStream; - /** - * Asynchronously reads the entire contents of a file. - * - * If `options` is a string, then it specifies the `encoding`. - * - * The `FileHandle` has to support reading. - * - * If one or more `filehandle.read()` calls are made on a file handle and then a `filehandle.readFile()` call is made, the data will be read from the current - * position till the end of the file. It doesn't always read from the beginning - * of the file. - * @since v10.0.0 - * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the - * data will be a string. - */ - readFile( - options?: { - encoding?: null | undefined; - flag?: OpenMode | undefined; - } | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for reading. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - readFile( - options: - | { - encoding: BufferEncoding; - flag?: OpenMode | undefined; - } - | BufferEncoding, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for reading. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - readFile( - options?: - | (ObjectEncodingOptions & { - flag?: OpenMode | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Convenience method to create a `readline` interface and stream over the file. - * See `filehandle.createReadStream()` for the options. - * - * ```js - * import { open } from 'node:fs/promises'; - * - * const file = await open('./some/file/to/read'); - * - * for await (const line of file.readLines()) { - * console.log(line); - * } - * ``` - * @since v18.11.0 - */ - readLines(options?: CreateReadStreamOptions): ReadlineInterface; - /** - * @since v10.0.0 - * @return Fulfills with an {fs.Stats} for the file. - */ - stat( - opts?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - stat( - opts: StatOptions & { - bigint: true; - }, - ): Promise; - stat(opts?: StatOptions): Promise; - /** - * Truncates the file. - * - * If the file was larger than `len` bytes, only the first `len` bytes will be - * retained in the file. - * - * The following example retains only the first four bytes of the file: - * - * ```js - * import { open } from 'node:fs/promises'; - * - * let filehandle = null; - * try { - * filehandle = await open('temp.txt', 'r+'); - * await filehandle.truncate(4); - * } finally { - * await filehandle?.close(); - * } - * ``` - * - * If the file previously was shorter than `len` bytes, it is extended, and the - * extended part is filled with null bytes (`'\0'`): - * - * If `len` is negative then `0` will be used. - * @since v10.0.0 - * @param [len=0] - * @return Fulfills with `undefined` upon success. - */ - truncate(len?: number): Promise; - /** - * Change the file system timestamps of the object referenced by the `FileHandle` then fulfills the promise with no arguments upon success. - * @since v10.0.0 - */ - utimes(atime: TimeLike, mtime: TimeLike): Promise; - /** - * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an - * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an - * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. - * The promise is fulfilled with no arguments upon success. - * - * If `options` is a string, then it specifies the `encoding`. - * - * The `FileHandle` has to support writing. - * - * It is unsafe to use `filehandle.writeFile()` multiple times on the same file - * without waiting for the promise to be fulfilled (or rejected). - * - * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the - * current position till the end of the file. It doesn't always write from the - * beginning of the file. - * @since v10.0.0 - */ - writeFile( - data: string | Uint8Array, - options?: - | (ObjectEncodingOptions & FlagAndOpenMode & Abortable & { flush?: boolean | undefined }) - | BufferEncoding - | null, - ): Promise; - /** - * Write `buffer` to the file. - * - * The promise is fulfilled with an object containing two properties: - * - * It is unsafe to use `filehandle.write()` multiple times on the same file - * without waiting for the promise to be fulfilled (or rejected). For this - * scenario, use `filehandle.createWriteStream()`. - * - * On Linux, positional writes do not work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v10.0.0 - * @param offset The start position from within `buffer` where the data to write begins. - * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write. - * @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current - * position. See the POSIX pwrite(2) documentation for more detail. - */ - write( - buffer: TBuffer, - offset?: number | null, - length?: number | null, - position?: number | null, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - write( - buffer: TBuffer, - options?: { offset?: number; length?: number; position?: number }, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - write( - data: string, - position?: number | null, - encoding?: BufferEncoding | null, - ): Promise<{ - bytesWritten: number; - buffer: string; - }>; - /** - * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file. - * - * The promise is fulfilled with an object containing a two properties: - * - * It is unsafe to call `writev()` multiple times on the same file without waiting - * for the promise to be fulfilled (or rejected). - * - * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v12.9.0 - * @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current - * position. - */ - writev(buffers: readonly NodeJS.ArrayBufferView[], position?: number): Promise; - /** - * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s - * @since v13.13.0, v12.17.0 - * @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position. - * @return Fulfills upon success an object containing two properties: - */ - readv(buffers: readonly NodeJS.ArrayBufferView[], position?: number): Promise; - /** - * Closes the file handle after waiting for any pending operation on the handle to - * complete. - * - * ```js - * import { open } from 'node:fs/promises'; - * - * let filehandle; - * try { - * filehandle = await open('thefile.txt', 'r'); - * } finally { - * await filehandle?.close(); - * } - * ``` - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - close(): Promise; - /** - * An alias for {@link FileHandle.close()}. - * @since v20.4.0 - */ - [Symbol.asyncDispose](): Promise; - } - const constants: typeof fsConstants; - /** - * Tests a user's permissions for the file or directory specified by `path`. - * The `mode` argument is an optional integer that specifies the accessibility - * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` - * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for - * possible values of `mode`. - * - * If the accessibility check is successful, the promise is fulfilled with no - * value. If any of the accessibility checks fail, the promise is rejected - * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and - * written by the current process. - * - * ```js - * import { access, constants } from 'node:fs/promises'; - * - * try { - * await access('/etc/passwd', constants.R_OK | constants.W_OK); - * console.log('can access'); - * } catch { - * console.error('cannot access'); - * } - * ``` - * - * Using `fsPromises.access()` to check for the accessibility of a file before - * calling `fsPromises.open()` is not recommended. Doing so introduces a race - * condition, since other processes may change the file's state between the two - * calls. Instead, user code should open/read/write the file directly and handle - * the error raised if the file is not accessible. - * @since v10.0.0 - * @param [mode=fs.constants.F_OK] - * @return Fulfills with `undefined` upon success. - */ - function access(path: PathLike, mode?: number): Promise; - /** - * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it - * already exists. - * - * No guarantees are made about the atomicity of the copy operation. If an - * error occurs after the destination file has been opened for writing, an attempt - * will be made to remove the destination. - * - * ```js - * import { copyFile, constants } from 'node:fs/promises'; - * - * try { - * await copyFile('source.txt', 'destination.txt'); - * console.log('source.txt was copied to destination.txt'); - * } catch { - * console.error('The file could not be copied'); - * } - * - * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. - * try { - * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL); - * console.log('source.txt was copied to destination.txt'); - * } catch { - * console.error('The file could not be copied'); - * } - * ``` - * @since v10.0.0 - * @param src source filename to copy - * @param dest destination filename of the copy operation - * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. - * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`) - * @return Fulfills with `undefined` upon success. - */ - function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise; - /** - * Opens a `FileHandle`. - * - * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail. - * - * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented - * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains - * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). - * @since v10.0.0 - * @param [flags='r'] See `support of file system `flags``. - * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created. - * @return Fulfills with a {FileHandle} object. - */ - function open(path: PathLike, flags?: string | number, mode?: Mode): Promise; - /** - * Renames `oldPath` to `newPath`. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function rename(oldPath: PathLike, newPath: PathLike): Promise; - /** - * Truncates (shortens or extends the length) of the content at `path` to `len` bytes. - * @since v10.0.0 - * @param [len=0] - * @return Fulfills with `undefined` upon success. - */ - function truncate(path: PathLike, len?: number): Promise; - /** - * Removes the directory identified by `path`. - * - * Using `fsPromises.rmdir()` on a file (not a directory) results in the - * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX. - * - * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function rmdir(path: PathLike, options?: RmDirOptions): Promise; - /** - * Removes files and directories (modeled on the standard POSIX `rm` utility). - * @since v14.14.0 - * @return Fulfills with `undefined` upon success. - */ - function rm(path: PathLike, options?: RmOptions): Promise; - /** - * Asynchronously creates a directory. - * - * The optional `options` argument can be an integer specifying `mode` (permission - * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fsPromises.mkdir()` when `path` is a directory - * that exists results in a - * rejection only when `recursive` is false. - * - * ```js - * import { mkdir } from 'node:fs/promises'; - * - * try { - * const projectFolder = new URL('./test/project/', import.meta.url); - * const createDir = await mkdir(projectFolder, { recursive: true }); - * - * console.log(`created ${createDir}`); - * } catch (err) { - * console.error(err.message); - * } - * ``` - * @since v10.0.0 - * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`. - */ - function mkdir( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir( - path: PathLike, - options?: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; - /** - * Reads the contents of a directory. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned - * will be passed as `Buffer` objects. - * - * If `options.withFileTypes` is set to `true`, the returned array will contain `fs.Dirent` objects. - * - * ```js - * import { readdir } from 'node:fs/promises'; - * - * try { - * const files = await readdir(path); - * for (const file of files) - * console.log(file); - * } catch (err) { - * console.error(err); - * } - * ``` - * @since v10.0.0 - * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. - */ - function readdir( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options: - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | "buffer", - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - function readdir( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise; - /** - * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is - * fulfilled with the`linkString` upon success. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the link path returned. If the `encoding` is set to `'buffer'`, the link path - * returned will be passed as a `Buffer` object. - * @since v10.0.0 - * @return Fulfills with the `linkString` upon success. - */ - function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise; - /** - * Creates a symbolic link. - * - * The `type` argument is only used on Windows platforms and can be one of `'dir'`, `'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will - * autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not - * exist, `'file'` will be used. Windows junction points require the destination - * path to be absolute. When using `'junction'`, the `target` argument will - * automatically be normalized to absolute path. Junction points on NTFS volumes - * can only point to directories. - * @since v10.0.0 - * @param [type='null'] - * @return Fulfills with `undefined` upon success. - */ - function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; - /** - * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link, - * in which case the link itself is stat-ed, not the file that it refers to. - * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail. - * @since v10.0.0 - * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`. - */ - function lstat( - path: PathLike, - opts?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function lstat( - path: PathLike, - opts: StatOptions & { - bigint: true; - }, - ): Promise; - function lstat(path: PathLike, opts?: StatOptions): Promise; - /** - * @since v10.0.0 - * @return Fulfills with the {fs.Stats} object for the given `path`. - */ - function stat( - path: PathLike, - opts?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function stat( - path: PathLike, - opts: StatOptions & { - bigint: true; - }, - ): Promise; - function stat(path: PathLike, opts?: StatOptions): Promise; - /** - * @since v19.6.0, v18.15.0 - * @return Fulfills with the {fs.StatFs} object for the given `path`. - */ - function statfs( - path: PathLike, - opts?: StatFsOptions & { - bigint?: false | undefined; - }, - ): Promise; - function statfs( - path: PathLike, - opts: StatFsOptions & { - bigint: true; - }, - ): Promise; - function statfs(path: PathLike, opts?: StatFsOptions): Promise; - /** - * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function link(existingPath: PathLike, newPath: PathLike): Promise; - /** - * If `path` refers to a symbolic link, then the link is removed without affecting - * the file or directory to which that link refers. If the `path` refers to a file - * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function unlink(path: PathLike): Promise; - /** - * Changes the permissions of a file. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function chmod(path: PathLike, mode: Mode): Promise; - /** - * Changes the permissions on a symbolic link. - * - * This method is only implemented on macOS. - * @deprecated Since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function lchmod(path: PathLike, mode: Mode): Promise; - /** - * Changes the ownership on a symbolic link. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function lchown(path: PathLike, uid: number, gid: number): Promise; - /** - * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a - * symbolic link, then the link is not dereferenced: instead, the timestamps of - * the symbolic link itself are changed. - * @since v14.5.0, v12.19.0 - * @return Fulfills with `undefined` upon success. - */ - function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - /** - * Changes the ownership of a file. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function chown(path: PathLike, uid: number, gid: number): Promise; - /** - * Change the file system timestamps of the object referenced by `path`. - * - * The `atime` and `mtime` arguments follow these rules: - * - * * Values can be either numbers representing Unix epoch time, `Date`s, or a - * numeric string like `'123456789.0'`. - * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - /** - * Determines the actual location of `path` using the same semantics as the `fs.realpath.native()` function. - * - * Only paths that can be converted to UTF8 strings are supported. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the path. If the `encoding` is set to `'buffer'`, the path returned will be - * passed as a `Buffer` object. - * - * On Linux, when Node.js is linked against musl libc, the procfs file system must - * be mounted on `/proc` in order for this function to work. Glibc does not have - * this restriction. - * @since v10.0.0 - * @return Fulfills with the resolved path upon success. - */ - function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath( - path: PathLike, - options?: ObjectEncodingOptions | BufferEncoding | null, - ): Promise; - /** - * Creates a unique temporary directory. A unique directory name is generated by - * appending six random characters to the end of the provided `prefix`. Due to - * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some - * platforms, notably the BSDs, can return more than six random characters, and - * replace trailing `X` characters in `prefix` with random characters. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * - * ```js - * import { mkdtemp } from 'node:fs/promises'; - * import { join } from 'node:path'; - * import { tmpdir } from 'node:os'; - * - * try { - * await mkdtemp(join(tmpdir(), 'foo-')); - * } catch (err) { - * console.error(err); - * } - * ``` - * - * The `fsPromises.mkdtemp()` method will append the six randomly selected - * characters directly to the `prefix` string. For instance, given a directory `/tmp`, if the intention is to create a temporary directory _within_ `/tmp`, the `prefix` must end with a trailing - * platform-specific path separator - * (`import { sep } from 'node:path'`). - * @since v10.0.0 - * @return Fulfills with a string containing the file system path of the newly created temporary directory. - */ - function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp(prefix: string, options: BufferEncodingOption): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an - * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an - * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. - * - * The `encoding` option is ignored if `data` is a buffer. - * - * If `options` is a string, then it specifies the encoding. - * - * The `mode` option only affects the newly created file. See `fs.open()` for more details. - * - * Any specified `FileHandle` has to support writing. - * - * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file - * without waiting for the promise to be settled. - * - * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience - * method that performs multiple `write` calls internally to write the buffer - * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`. - * - * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`. - * Cancelation is "best effort", and some amount of data is likely still - * to be written. - * - * ```js - * import { writeFile } from 'node:fs/promises'; - * import { Buffer } from 'node:buffer'; - * - * try { - * const controller = new AbortController(); - * const { signal } = controller; - * const data = new Uint8Array(Buffer.from('Hello Node.js')); - * const promise = writeFile('message.txt', data, { signal }); - * - * // Abort the request before the promise settles. - * controller.abort(); - * - * await promise; - * } catch (err) { - * // When a request is aborted - err is an AbortError - * console.error(err); - * } - * ``` - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.writeFile` performs. - * @since v10.0.0 - * @param file filename or `FileHandle` - * @return Fulfills with `undefined` upon success. - */ - function writeFile( - file: PathLike | FileHandle, - data: - | string - | NodeJS.ArrayBufferView - | Iterable - | AsyncIterable - | Stream, - options?: - | (ObjectEncodingOptions & { - mode?: Mode | undefined; - flag?: OpenMode | undefined; - /** - * If all data is successfully written to the file, and `flush` - * is `true`, `filehandle.sync()` is used to flush the data. - * @default false - */ - flush?: boolean | undefined; - } & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronously append data to a file, creating the file if it does not yet - * exist. `data` can be a string or a `Buffer`. - * - * If `options` is a string, then it specifies the `encoding`. - * - * The `mode` option only affects the newly created file. See `fs.open()` for more details. - * - * The `path` may be specified as a `FileHandle` that has been opened - * for appending (using `fsPromises.open()`). - * @since v10.0.0 - * @param path filename or {FileHandle} - * @return Fulfills with `undefined` upon success. - */ - function appendFile( - path: PathLike | FileHandle, - data: string | Uint8Array, - options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * - * If no encoding is specified (using `options.encoding`), the data is returned - * as a `Buffer` object. Otherwise, the data will be a string. - * - * If `options` is a string, then it specifies the encoding. - * - * When the `path` is a directory, the behavior of `fsPromises.readFile()` is - * platform-specific. On macOS, Linux, and Windows, the promise will be rejected - * with an error. On FreeBSD, a representation of the directory's contents will be - * returned. - * - * An example of reading a `package.json` file located in the same directory of the - * running code: - * - * ```js - * import { readFile } from 'node:fs/promises'; - * try { - * const filePath = new URL('./package.json', import.meta.url); - * const contents = await readFile(filePath, { encoding: 'utf8' }); - * console.log(contents); - * } catch (err) { - * console.error(err.message); - * } - * ``` - * - * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a - * request is aborted the promise returned is rejected with an `AbortError`: - * - * ```js - * import { readFile } from 'node:fs/promises'; - * - * try { - * const controller = new AbortController(); - * const { signal } = controller; - * const promise = readFile(fileName, { signal }); - * - * // Abort the request before the promise settles. - * controller.abort(); - * - * await promise; - * } catch (err) { - * // When a request is aborted - err is an AbortError - * console.error(err); - * } - * ``` - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.readFile` performs. - * - * Any specified `FileHandle` has to support reading. - * @since v10.0.0 - * @param path filename or `FileHandle` - * @return Fulfills with the contents of the file. - */ - function readFile( - path: PathLike | FileHandle, - options?: - | ({ - encoding?: null | undefined; - flag?: OpenMode | undefined; - } & Abortable) - | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathLike | FileHandle, - options: - | ({ - encoding: BufferEncoding; - flag?: OpenMode | undefined; - } & Abortable) - | BufferEncoding, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathLike | FileHandle, - options?: - | ( - & ObjectEncodingOptions - & Abortable - & { - flag?: OpenMode | undefined; - } - ) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail. - * - * Creates an `fs.Dir`, which contains all further functions for reading from - * and cleaning up the directory. - * - * The `encoding` option sets the encoding for the `path` while opening the - * directory and subsequent read operations. - * - * Example using async iteration: - * - * ```js - * import { opendir } from 'node:fs/promises'; - * - * try { - * const dir = await opendir('./'); - * for await (const dirent of dir) - * console.log(dirent.name); - * } catch (err) { - * console.error(err); - * } - * ``` - * - * When using the async iterator, the `fs.Dir` object will be automatically - * closed after the iterator exits. - * @since v12.12.0 - * @return Fulfills with an {fs.Dir}. - */ - function opendir(path: PathLike, options?: OpenDirOptions): Promise; - /** - * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory. - * - * ```js - * import { watch } from 'node:fs/promises'; - * - * const ac = new AbortController(); - * const { signal } = ac; - * setTimeout(() => ac.abort(), 10000); - * - * (async () => { - * try { - * const watcher = watch(__filename, { signal }); - * for await (const event of watcher) - * console.log(event); - * } catch (err) { - * if (err.name === 'AbortError') - * return; - * throw err; - * } - * })(); - * ``` - * - * On most platforms, `'rename'` is emitted whenever a filename appears or - * disappears in the directory. - * - * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. - * @since v15.9.0, v14.18.0 - * @return of objects with the properties: - */ - function watch( - filename: PathLike, - options: - | (WatchOptions & { - encoding: "buffer"; - }) - | "buffer", - ): AsyncIterable>; - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `persistent` is not supplied, the default of `true` is used. - * If `recursive` is not supplied, the default of `false` is used. - */ - function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable>; - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `persistent` is not supplied, the default of `true` is used. - * If `recursive` is not supplied, the default of `false` is used. - */ - function watch( - filename: PathLike, - options: WatchOptions | string, - ): AsyncIterable> | AsyncIterable>; - /** - * Asynchronously copies the entire directory structure from `src` to `dest`, - * including subdirectories and files. - * - * When copying a directory to another directory, globs are not supported and - * behavior is similar to `cp dir1/ dir2/`. - * @since v16.7.0 - * @experimental - * @param src source path to copy. - * @param dest destination path to copy to. - * @return Fulfills with `undefined` upon success. - */ - function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise; - /** - * Retrieves the files matching the specified pattern. - */ - function glob(pattern: string | string[]): NodeJS.AsyncIterator; - function glob( - pattern: string | string[], - opt: GlobOptionsWithFileTypes, - ): NodeJS.AsyncIterator; - function glob( - pattern: string | string[], - opt: GlobOptionsWithoutFileTypes, - ): NodeJS.AsyncIterator; - function glob( - pattern: string | string[], - opt: GlobOptions, - ): NodeJS.AsyncIterator; -} -declare module "node:fs/promises" { - export * from "fs/promises"; -} diff --git a/web/static/node_modules/@types/node/globals.d.ts b/web/static/node_modules/@types/node/globals.d.ts deleted file mode 100644 index e223aed9..00000000 --- a/web/static/node_modules/@types/node/globals.d.ts +++ /dev/null @@ -1,566 +0,0 @@ -export {}; // Make this a module - -// #region Fetch and friends -// Conditional type aliases, used at the end of this file. -// Will either be empty if lib.dom (or lib.webworker) is included, or the undici version otherwise. -type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request; -type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response; -type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData; -type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers; -type _MessageEvent = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").MessageEvent; -type _RequestInit = typeof globalThis extends { onmessage: any } ? {} - : import("undici-types").RequestInit; -type _ResponseInit = typeof globalThis extends { onmessage: any } ? {} - : import("undici-types").ResponseInit; -type _WebSocket = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").WebSocket; -type _EventSource = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").EventSource; -// #endregion Fetch and friends - -// Conditional type definitions for webstorage interface, which conflicts with lib.dom otherwise. -type _Storage = typeof globalThis extends { onabort: any } ? {} : { - /** - * Returns the number of key/value pairs. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/length) - */ - readonly length: number; - /** - * Removes all key/value pairs, if there are any. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/clear) - */ - clear(): void; - /** - * Returns the current value associated with the given key, or null if the given key does not exist. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/getItem) - */ - getItem(key: string): string | null; - /** - * Returns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/key) - */ - key(index: number): string | null; - /** - * Removes the key/value pair with the given key, if a key/value pair with the given key exists. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/removeItem) - */ - removeItem(key: string): void; - /** - * Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously. - * - * Throws a "QuotaExceededError" DOMException exception if the new value couldn't be set. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/setItem) - */ - setItem(key: string, value: string): void; - [key: string]: any; -}; - -// #region DOMException -type _DOMException = typeof globalThis extends { onmessage: any } ? {} : NodeDOMException; -interface NodeDOMException extends Error { - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code) - */ - readonly code: number; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) */ - readonly message: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) */ - readonly name: string; - readonly INDEX_SIZE_ERR: 1; - readonly DOMSTRING_SIZE_ERR: 2; - readonly HIERARCHY_REQUEST_ERR: 3; - readonly WRONG_DOCUMENT_ERR: 4; - readonly INVALID_CHARACTER_ERR: 5; - readonly NO_DATA_ALLOWED_ERR: 6; - readonly NO_MODIFICATION_ALLOWED_ERR: 7; - readonly NOT_FOUND_ERR: 8; - readonly NOT_SUPPORTED_ERR: 9; - readonly INUSE_ATTRIBUTE_ERR: 10; - readonly INVALID_STATE_ERR: 11; - readonly SYNTAX_ERR: 12; - readonly INVALID_MODIFICATION_ERR: 13; - readonly NAMESPACE_ERR: 14; - readonly INVALID_ACCESS_ERR: 15; - readonly VALIDATION_ERR: 16; - readonly TYPE_MISMATCH_ERR: 17; - readonly SECURITY_ERR: 18; - readonly NETWORK_ERR: 19; - readonly ABORT_ERR: 20; - readonly URL_MISMATCH_ERR: 21; - readonly QUOTA_EXCEEDED_ERR: 22; - readonly TIMEOUT_ERR: 23; - readonly INVALID_NODE_TYPE_ERR: 24; - readonly DATA_CLONE_ERR: 25; -} -interface NodeDOMExceptionConstructor { - prototype: DOMException; - new(message?: string, nameOrOptions?: string | { name?: string; cause?: unknown }): DOMException; - readonly INDEX_SIZE_ERR: 1; - readonly DOMSTRING_SIZE_ERR: 2; - readonly HIERARCHY_REQUEST_ERR: 3; - readonly WRONG_DOCUMENT_ERR: 4; - readonly INVALID_CHARACTER_ERR: 5; - readonly NO_DATA_ALLOWED_ERR: 6; - readonly NO_MODIFICATION_ALLOWED_ERR: 7; - readonly NOT_FOUND_ERR: 8; - readonly NOT_SUPPORTED_ERR: 9; - readonly INUSE_ATTRIBUTE_ERR: 10; - readonly INVALID_STATE_ERR: 11; - readonly SYNTAX_ERR: 12; - readonly INVALID_MODIFICATION_ERR: 13; - readonly NAMESPACE_ERR: 14; - readonly INVALID_ACCESS_ERR: 15; - readonly VALIDATION_ERR: 16; - readonly TYPE_MISMATCH_ERR: 17; - readonly SECURITY_ERR: 18; - readonly NETWORK_ERR: 19; - readonly ABORT_ERR: 20; - readonly URL_MISMATCH_ERR: 21; - readonly QUOTA_EXCEEDED_ERR: 22; - readonly TIMEOUT_ERR: 23; - readonly INVALID_NODE_TYPE_ERR: 24; - readonly DATA_CLONE_ERR: 25; -} -// #endregion DOMException - -declare global { - // Declare "static" methods in Error - interface ErrorConstructor { - /** Create .stack property on a target object */ - captureStackTrace(targetObject: object, constructorOpt?: Function): void; - - /** - * Optional override for formatting stack traces - * - * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces - */ - prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; - - stackTraceLimit: number; - } - - /*-----------------------------------------------* - * * - * GLOBAL * - * * - ------------------------------------------------*/ - - // For backwards compability - interface NodeRequire extends NodeJS.Require {} - interface RequireResolve extends NodeJS.RequireResolve {} - interface NodeModule extends NodeJS.Module {} - - var global: typeof globalThis; - - var process: NodeJS.Process; - var console: Console; - - var __filename: string; - var __dirname: string; - - var require: NodeRequire; - var module: NodeModule; - - // Same as module.exports - var exports: any; - - interface GCFunction { - (options: { - execution?: "sync"; - flavor?: "regular" | "last-resort"; - type?: "major-snapshot" | "major" | "minor"; - filename?: string; - }): void; - (options: { - execution: "async"; - flavor?: "regular" | "last-resort"; - type?: "major-snapshot" | "major" | "minor"; - filename?: string; - }): Promise; - (options?: boolean): void; - } - - /** - * Only available if `--expose-gc` is passed to the process. - */ - var gc: undefined | GCFunction; - - // #region borrowed - // from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib - /** A controller object that allows you to abort one or more DOM requests as and when desired. */ - interface AbortController { - /** - * Returns the AbortSignal object associated with this object. - */ - - readonly signal: AbortSignal; - /** - * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. - */ - abort(reason?: any): void; - } - - /** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */ - interface AbortSignal extends EventTarget { - /** - * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. - */ - readonly aborted: boolean; - readonly reason: any; - onabort: null | ((this: AbortSignal, event: Event) => any); - throwIfAborted(): void; - } - - var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T - : { - prototype: AbortController; - new(): AbortController; - }; - - var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T - : { - prototype: AbortSignal; - new(): AbortSignal; - abort(reason?: any): AbortSignal; - timeout(milliseconds: number): AbortSignal; - any(signals: AbortSignal[]): AbortSignal; - }; - // #endregion borrowed - - // #region Storage - /** - * This Web Storage API interface provides access to a particular domain's session or local storage. It allows, for example, the addition, modification, or deletion of stored data items. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage) - */ - interface Storage extends _Storage {} - - // Conditional on `onabort` rather than `onmessage`, in order to exclude lib.webworker - var Storage: typeof globalThis extends { onabort: any; Storage: infer T } ? T - : { - prototype: Storage; - new(): Storage; - }; - - /** - * A browser-compatible implementation of [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage). - * Data is stored unencrypted in the file specified by the `--localstorage-file` CLI flag. - * Any modification of this data outside of the Web Storage API is not supported. - * Enable this API with the `--experimental-webstorage` CLI flag. - * @since v22.4.0 - */ - var localStorage: Storage; - - /** - * A browser-compatible implementation of [`sessionStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage). - * Data is stored in memory, with a storage quota of 10 MB. - * Any modification of this data outside of the Web Storage API is not supported. - * Enable this API with the `--experimental-webstorage` CLI flag. - * @since v22.4.0 - */ - var sessionStorage: Storage; - // #endregion Storage - - /** - * @since v17.0.0 - * - * Creates a deep clone of an object. - */ - function structuredClone( - value: T, - transfer?: { transfer: ReadonlyArray }, - ): T; - - // #region DOMException - /** - * @since v17.0.0 - * An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException) - */ - interface DOMException extends _DOMException {} - - /** - * @since v17.0.0 - * - * The WHATWG `DOMException` class. See [DOMException](https://developer.mozilla.org/docs/Web/API/DOMException) for more details. - */ - var DOMException: typeof globalThis extends { onmessage: any; DOMException: infer T } ? T - : NodeDOMExceptionConstructor; - // #endregion DOMException - - /*----------------------------------------------* - * * - * GLOBAL INTERFACES * - * * - *-----------------------------------------------*/ - namespace NodeJS { - interface CallSite { - /** - * Value of "this" - */ - getThis(): unknown; - - /** - * Type of "this" as a string. - * This is the name of the function stored in the constructor field of - * "this", if available. Otherwise the object's [[Class]] internal - * property. - */ - getTypeName(): string | null; - - /** - * Current function - */ - getFunction(): Function | undefined; - - /** - * Name of the current function, typically its name property. - * If a name property is not available an attempt will be made to try - * to infer a name from the function's context. - */ - getFunctionName(): string | null; - - /** - * Name of the property [of "this" or one of its prototypes] that holds - * the current function - */ - getMethodName(): string | null; - - /** - * Name of the script [if this function was defined in a script] - */ - getFileName(): string | undefined; - - /** - * Current line number [if this function was defined in a script] - */ - getLineNumber(): number | null; - - /** - * Current column number [if this function was defined in a script] - */ - getColumnNumber(): number | null; - - /** - * A call site object representing the location where eval was called - * [if this function was created using a call to eval] - */ - getEvalOrigin(): string | undefined; - - /** - * Is this a toplevel invocation, that is, is "this" the global object? - */ - isToplevel(): boolean; - - /** - * Does this call take place in code defined by a call to eval? - */ - isEval(): boolean; - - /** - * Is this call in native V8 code? - */ - isNative(): boolean; - - /** - * Is this a constructor call? - */ - isConstructor(): boolean; - - /** - * is this an async call (i.e. await, Promise.all(), or Promise.any())? - */ - isAsync(): boolean; - - /** - * is this an async call to Promise.all()? - */ - isPromiseAll(): boolean; - - /** - * returns the index of the promise element that was followed in - * Promise.all() or Promise.any() for async stack traces, or null - * if the CallSite is not an async - */ - getPromiseIndex(): number | null; - - getScriptNameOrSourceURL(): string; - getScriptHash(): string; - - getEnclosingColumnNumber(): number; - getEnclosingLineNumber(): number; - getPosition(): number; - - toString(): string; - } - - interface ErrnoException extends Error { - errno?: number | undefined; - code?: string | undefined; - path?: string | undefined; - syscall?: string | undefined; - } - - interface ReadableStream extends EventEmitter { - readable: boolean; - read(size?: number): string | Buffer; - setEncoding(encoding: BufferEncoding): this; - pause(): this; - resume(): this; - isPaused(): boolean; - pipe(destination: T, options?: { end?: boolean | undefined }): T; - unpipe(destination?: WritableStream): this; - unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; - wrap(oldStream: ReadableStream): this; - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - } - - interface WritableStream extends EventEmitter { - writable: boolean; - write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; - write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; - end(cb?: () => void): this; - end(data: string | Uint8Array, cb?: () => void): this; - end(str: string, encoding?: BufferEncoding, cb?: () => void): this; - } - - interface ReadWriteStream extends ReadableStream, WritableStream {} - - interface RefCounted { - ref(): this; - unref(): this; - } - - interface Require { - (id: string): any; - resolve: RequireResolve; - cache: Dict; - /** - * @deprecated - */ - extensions: RequireExtensions; - main: Module | undefined; - } - - interface RequireResolve { - (id: string, options?: { paths?: string[] | undefined }): string; - paths(request: string): string[] | null; - } - - interface RequireExtensions extends Dict<(m: Module, filename: string) => any> { - ".js": (m: Module, filename: string) => any; - ".json": (m: Module, filename: string) => any; - ".node": (m: Module, filename: string) => any; - } - interface Module { - /** - * `true` if the module is running during the Node.js preload - */ - isPreloading: boolean; - exports: any; - require: Require; - id: string; - filename: string; - loaded: boolean; - /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */ - parent: Module | null | undefined; - children: Module[]; - /** - * @since v11.14.0 - * - * The directory name of the module. This is usually the same as the path.dirname() of the module.id. - */ - path: string; - paths: string[]; - } - - interface Dict { - [key: string]: T | undefined; - } - - interface ReadOnlyDict { - readonly [key: string]: T | undefined; - } - - /** An iterable iterator returned by the Node.js API. */ - // Default TReturn/TNext in v22 is `any`, for compatibility with the previously-used IterableIterator. - // TODO: In next major @types/node version, change default TReturn to undefined. - interface Iterator extends IteratorObject { - [Symbol.iterator](): NodeJS.Iterator; - } - - /** An async iterable iterator returned by the Node.js API. */ - // Default TReturn/TNext in v22 is `any`, for compatibility with the previously-used AsyncIterableIterator. - // TODO: In next major @types/node version, change default TReturn to undefined. - interface AsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - } - } - - interface RequestInit extends _RequestInit {} - - function fetch( - input: string | URL | globalThis.Request, - init?: RequestInit, - ): Promise; - - interface Request extends _Request {} - var Request: typeof globalThis extends { - onmessage: any; - Request: infer T; - } ? T - : typeof import("undici-types").Request; - - interface ResponseInit extends _ResponseInit {} - - interface Response extends _Response {} - var Response: typeof globalThis extends { - onmessage: any; - Response: infer T; - } ? T - : typeof import("undici-types").Response; - - interface FormData extends _FormData {} - var FormData: typeof globalThis extends { - onmessage: any; - FormData: infer T; - } ? T - : typeof import("undici-types").FormData; - - interface Headers extends _Headers {} - var Headers: typeof globalThis extends { - onmessage: any; - Headers: infer T; - } ? T - : typeof import("undici-types").Headers; - - interface MessageEvent extends _MessageEvent {} - /** - * @since v15.0.0 - */ - var MessageEvent: typeof globalThis extends { - onmessage: any; - MessageEvent: infer T; - } ? T - : typeof import("undici-types").MessageEvent; - - interface WebSocket extends _WebSocket {} - var WebSocket: typeof globalThis extends { onmessage: any; WebSocket: infer T } ? T - : typeof import("undici-types").WebSocket; - - interface EventSource extends _EventSource {} - /** - * Only available through the [--experimental-eventsource](https://nodejs.org/api/cli.html#--experimental-eventsource) flag. - * - * @since v22.3.0 - */ - var EventSource: typeof globalThis extends { onmessage: any; EventSource: infer T } ? T - : typeof import("undici-types").EventSource; -} diff --git a/web/static/node_modules/@types/node/globals.typedarray.d.ts b/web/static/node_modules/@types/node/globals.typedarray.d.ts deleted file mode 100644 index 0c7280c3..00000000 --- a/web/static/node_modules/@types/node/globals.typedarray.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export {}; // Make this a module - -declare global { - namespace NodeJS { - type TypedArray = - | Uint8Array - | Uint8ClampedArray - | Uint16Array - | Uint32Array - | Int8Array - | Int16Array - | Int32Array - | BigUint64Array - | BigInt64Array - | Float32Array - | Float64Array; - type ArrayBufferView = - | TypedArray - | DataView; - } -} diff --git a/web/static/node_modules/@types/node/http.d.ts b/web/static/node_modules/@types/node/http.d.ts deleted file mode 100644 index 19991808..00000000 --- a/web/static/node_modules/@types/node/http.d.ts +++ /dev/null @@ -1,1958 +0,0 @@ -/** - * To use the HTTP server and client one must import the `node:http` module. - * - * The HTTP interfaces in Node.js are designed to support many features - * of the protocol which have been traditionally difficult to use. - * In particular, large, possibly chunk-encoded, messages. The interface is - * careful to never buffer entire requests or responses, so the - * user is able to stream data. - * - * HTTP message headers are represented by an object like this: - * - * ```json - * { "content-length": "123", - * "content-type": "text/plain", - * "connection": "keep-alive", - * "host": "example.com", - * "accept": "*" } - * ``` - * - * Keys are lowercased. Values are not modified. - * - * In order to support the full spectrum of possible HTTP applications, the Node.js - * HTTP API is very low-level. It deals with stream handling and message - * parsing only. It parses a message into headers and body but it does not - * parse the actual headers or the body. - * - * See `message.headers` for details on how duplicate headers are handled. - * - * The raw headers as they were received are retained in the `rawHeaders` property, which is an array of `[key, value, key2, value2, ...]`. For - * example, the previous message header object might have a `rawHeaders` list like the following: - * - * ```js - * [ 'ConTent-Length', '123456', - * 'content-LENGTH', '123', - * 'content-type', 'text/plain', - * 'CONNECTION', 'keep-alive', - * 'Host', 'example.com', - * 'accepT', '*' ] - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/http.js) - */ -declare module "http" { - import * as stream from "node:stream"; - import { URL } from "node:url"; - import { LookupOptions } from "node:dns"; - import { EventEmitter } from "node:events"; - import { LookupFunction, Server as NetServer, Socket, TcpSocketConnectOpts } from "node:net"; - // incoming headers will never contain number - interface IncomingHttpHeaders extends NodeJS.Dict { - accept?: string | undefined; - "accept-language"?: string | undefined; - "accept-patch"?: string | undefined; - "accept-ranges"?: string | undefined; - "access-control-allow-credentials"?: string | undefined; - "access-control-allow-headers"?: string | undefined; - "access-control-allow-methods"?: string | undefined; - "access-control-allow-origin"?: string | undefined; - "access-control-expose-headers"?: string | undefined; - "access-control-max-age"?: string | undefined; - "access-control-request-headers"?: string | undefined; - "access-control-request-method"?: string | undefined; - age?: string | undefined; - allow?: string | undefined; - "alt-svc"?: string | undefined; - authorization?: string | undefined; - "cache-control"?: string | undefined; - connection?: string | undefined; - "content-disposition"?: string | undefined; - "content-encoding"?: string | undefined; - "content-language"?: string | undefined; - "content-length"?: string | undefined; - "content-location"?: string | undefined; - "content-range"?: string | undefined; - "content-type"?: string | undefined; - cookie?: string | undefined; - date?: string | undefined; - etag?: string | undefined; - expect?: string | undefined; - expires?: string | undefined; - forwarded?: string | undefined; - from?: string | undefined; - host?: string | undefined; - "if-match"?: string | undefined; - "if-modified-since"?: string | undefined; - "if-none-match"?: string | undefined; - "if-unmodified-since"?: string | undefined; - "last-modified"?: string | undefined; - location?: string | undefined; - origin?: string | undefined; - pragma?: string | undefined; - "proxy-authenticate"?: string | undefined; - "proxy-authorization"?: string | undefined; - "public-key-pins"?: string | undefined; - range?: string | undefined; - referer?: string | undefined; - "retry-after"?: string | undefined; - "sec-websocket-accept"?: string | undefined; - "sec-websocket-extensions"?: string | undefined; - "sec-websocket-key"?: string | undefined; - "sec-websocket-protocol"?: string | undefined; - "sec-websocket-version"?: string | undefined; - "set-cookie"?: string[] | undefined; - "strict-transport-security"?: string | undefined; - tk?: string | undefined; - trailer?: string | undefined; - "transfer-encoding"?: string | undefined; - upgrade?: string | undefined; - "user-agent"?: string | undefined; - vary?: string | undefined; - via?: string | undefined; - warning?: string | undefined; - "www-authenticate"?: string | undefined; - } - // outgoing headers allows numbers (as they are converted internally to strings) - type OutgoingHttpHeader = number | string | string[]; - interface OutgoingHttpHeaders extends NodeJS.Dict { - accept?: string | string[] | undefined; - "accept-charset"?: string | string[] | undefined; - "accept-encoding"?: string | string[] | undefined; - "accept-language"?: string | string[] | undefined; - "accept-ranges"?: string | undefined; - "access-control-allow-credentials"?: string | undefined; - "access-control-allow-headers"?: string | undefined; - "access-control-allow-methods"?: string | undefined; - "access-control-allow-origin"?: string | undefined; - "access-control-expose-headers"?: string | undefined; - "access-control-max-age"?: string | undefined; - "access-control-request-headers"?: string | undefined; - "access-control-request-method"?: string | undefined; - age?: string | undefined; - allow?: string | undefined; - authorization?: string | undefined; - "cache-control"?: string | undefined; - "cdn-cache-control"?: string | undefined; - connection?: string | string[] | undefined; - "content-disposition"?: string | undefined; - "content-encoding"?: string | undefined; - "content-language"?: string | undefined; - "content-length"?: string | number | undefined; - "content-location"?: string | undefined; - "content-range"?: string | undefined; - "content-security-policy"?: string | undefined; - "content-security-policy-report-only"?: string | undefined; - "content-type"?: string | undefined; - cookie?: string | string[] | undefined; - dav?: string | string[] | undefined; - dnt?: string | undefined; - date?: string | undefined; - etag?: string | undefined; - expect?: string | undefined; - expires?: string | undefined; - forwarded?: string | undefined; - from?: string | undefined; - host?: string | undefined; - "if-match"?: string | undefined; - "if-modified-since"?: string | undefined; - "if-none-match"?: string | undefined; - "if-range"?: string | undefined; - "if-unmodified-since"?: string | undefined; - "last-modified"?: string | undefined; - link?: string | string[] | undefined; - location?: string | undefined; - "max-forwards"?: string | undefined; - origin?: string | undefined; - prgama?: string | string[] | undefined; - "proxy-authenticate"?: string | string[] | undefined; - "proxy-authorization"?: string | undefined; - "public-key-pins"?: string | undefined; - "public-key-pins-report-only"?: string | undefined; - range?: string | undefined; - referer?: string | undefined; - "referrer-policy"?: string | undefined; - refresh?: string | undefined; - "retry-after"?: string | undefined; - "sec-websocket-accept"?: string | undefined; - "sec-websocket-extensions"?: string | string[] | undefined; - "sec-websocket-key"?: string | undefined; - "sec-websocket-protocol"?: string | string[] | undefined; - "sec-websocket-version"?: string | undefined; - server?: string | undefined; - "set-cookie"?: string | string[] | undefined; - "strict-transport-security"?: string | undefined; - te?: string | undefined; - trailer?: string | undefined; - "transfer-encoding"?: string | undefined; - "user-agent"?: string | undefined; - upgrade?: string | undefined; - "upgrade-insecure-requests"?: string | undefined; - vary?: string | undefined; - via?: string | string[] | undefined; - warning?: string | undefined; - "www-authenticate"?: string | string[] | undefined; - "x-content-type-options"?: string | undefined; - "x-dns-prefetch-control"?: string | undefined; - "x-frame-options"?: string | undefined; - "x-xss-protection"?: string | undefined; - } - interface ClientRequestArgs { - _defaultAgent?: Agent | undefined; - agent?: Agent | boolean | undefined; - auth?: string | null | undefined; - createConnection?: - | (( - options: ClientRequestArgs, - oncreate: (err: Error | null, socket: stream.Duplex) => void, - ) => stream.Duplex | null | undefined) - | undefined; - defaultPort?: number | string | undefined; - family?: number | undefined; - headers?: OutgoingHttpHeaders | undefined; - hints?: LookupOptions["hints"]; - host?: string | null | undefined; - hostname?: string | null | undefined; - insecureHTTPParser?: boolean | undefined; - localAddress?: string | undefined; - localPort?: number | undefined; - lookup?: LookupFunction | undefined; - /** - * @default 16384 - */ - maxHeaderSize?: number | undefined; - method?: string | undefined; - path?: string | null | undefined; - port?: number | string | null | undefined; - protocol?: string | null | undefined; - setHost?: boolean | undefined; - signal?: AbortSignal | undefined; - socketPath?: string | undefined; - timeout?: number | undefined; - uniqueHeaders?: Array | undefined; - joinDuplicateHeaders?: boolean; - } - interface ServerOptions< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > { - /** - * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`. - */ - IncomingMessage?: Request | undefined; - /** - * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`. - */ - ServerResponse?: Response | undefined; - /** - * Sets the timeout value in milliseconds for receiving the entire request from the client. - * @see Server.requestTimeout for more information. - * @default 300000 - * @since v18.0.0 - */ - requestTimeout?: number | undefined; - /** - * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates. - * @default false - * @since v18.14.0 - */ - joinDuplicateHeaders?: boolean; - /** - * The number of milliseconds of inactivity a server needs to wait for additional incoming data, - * after it has finished writing the last response, before a socket will be destroyed. - * @see Server.keepAliveTimeout for more information. - * @default 5000 - * @since v18.0.0 - */ - keepAliveTimeout?: number | undefined; - /** - * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests. - * @default 30000 - */ - connectionsCheckingInterval?: number | undefined; - /** - * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`. - * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`. - * Default: @see stream.getDefaultHighWaterMark(). - * @since v20.1.0 - */ - highWaterMark?: number | undefined; - /** - * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. - * Using the insecure parser should be avoided. - * See --insecure-http-parser for more information. - * @default false - */ - insecureHTTPParser?: boolean | undefined; - /** - * Optionally overrides the value of `--max-http-header-size` for requests received by - * this server, i.e. the maximum length of request headers in bytes. - * @default 16384 - * @since v13.3.0 - */ - maxHeaderSize?: number | undefined; - /** - * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. - * @default true - * @since v16.5.0 - */ - noDelay?: boolean | undefined; - /** - * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, - * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. - * @default false - * @since v16.5.0 - */ - keepAlive?: boolean | undefined; - /** - * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. - * @default 0 - * @since v16.5.0 - */ - keepAliveInitialDelay?: number | undefined; - /** - * A list of response headers that should be sent only once. - * If the header's value is an array, the items will be joined using `; `. - */ - uniqueHeaders?: Array | undefined; - } - type RequestListener< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > = (req: InstanceType, res: InstanceType & { req: InstanceType }) => void; - /** - * @since v0.1.17 - */ - class Server< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > extends NetServer { - constructor(requestListener?: RequestListener); - constructor(options: ServerOptions, requestListener?: RequestListener); - /** - * Sets the timeout value for sockets, and emits a `'timeout'` event on - * the Server object, passing the socket as an argument, if a timeout - * occurs. - * - * If there is a `'timeout'` event listener on the Server object, then it - * will be called with the timed-out socket as an argument. - * - * By default, the Server does not timeout sockets. However, if a callback - * is assigned to the Server's `'timeout'` event, timeouts must be handled - * explicitly. - * @since v0.9.12 - * @param [msecs=0 (no timeout)] - */ - setTimeout(msecs?: number, callback?: () => void): this; - setTimeout(callback: () => void): this; - /** - * Limits maximum incoming headers count. If set to 0, no limit will be applied. - * @since v0.7.0 - */ - maxHeadersCount: number | null; - /** - * The maximum number of requests socket can handle - * before closing keep alive connection. - * - * A value of `0` will disable the limit. - * - * When the limit is reached it will set the `Connection` header value to `close`, - * but will not actually close the connection, subsequent requests sent - * after the limit is reached will get `503 Service Unavailable` as a response. - * @since v16.10.0 - */ - maxRequestsPerSocket: number | null; - /** - * The number of milliseconds of inactivity before a socket is presumed - * to have timed out. - * - * A value of `0` will disable the timeout behavior on incoming connections. - * - * The socket timeout logic is set up on connection, so changing this - * value only affects new connections to the server, not any existing connections. - * @since v0.9.12 - */ - timeout: number; - /** - * Limit the amount of time the parser will wait to receive the complete HTTP - * headers. - * - * If the timeout expires, the server responds with status 408 without - * forwarding the request to the request listener and then closes the connection. - * - * It must be set to a non-zero value (e.g. 120 seconds) to protect against - * potential Denial-of-Service attacks in case the server is deployed without a - * reverse proxy in front. - * @since v11.3.0, v10.14.0 - */ - headersTimeout: number; - /** - * The number of milliseconds of inactivity a server needs to wait for additional - * incoming data, after it has finished writing the last response, before a socket - * will be destroyed. If the server receives new data before the keep-alive - * timeout has fired, it will reset the regular inactivity timeout, i.e., `server.timeout`. - * - * A value of `0` will disable the keep-alive timeout behavior on incoming - * connections. - * A value of `0` makes the http server behave similarly to Node.js versions prior - * to 8.0.0, which did not have a keep-alive timeout. - * - * The socket timeout logic is set up on connection, so changing this value only - * affects new connections to the server, not any existing connections. - * @since v8.0.0 - */ - keepAliveTimeout: number; - /** - * Sets the timeout value in milliseconds for receiving the entire request from - * the client. - * - * If the timeout expires, the server responds with status 408 without - * forwarding the request to the request listener and then closes the connection. - * - * It must be set to a non-zero value (e.g. 120 seconds) to protect against - * potential Denial-of-Service attacks in case the server is deployed without a - * reverse proxy in front. - * @since v14.11.0 - */ - requestTimeout: number; - /** - * Closes all connections connected to this server. - * @since v18.2.0 - */ - closeAllConnections(): void; - /** - * Closes all connections connected to this server which are not sending a request - * or waiting for a response. - * @since v18.2.0 - */ - closeIdleConnections(): void; - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connection", listener: (socket: Socket) => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "checkContinue", listener: RequestListener): this; - addListener(event: "checkExpectation", listener: RequestListener): this; - addListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; - addListener( - event: "connect", - listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, - ): this; - addListener(event: "dropRequest", listener: (req: InstanceType, socket: stream.Duplex) => void): this; - addListener(event: "request", listener: RequestListener): this; - addListener( - event: "upgrade", - listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, - ): this; - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "connection", socket: Socket): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit( - event: "checkContinue", - req: InstanceType, - res: InstanceType & { req: InstanceType }, - ): boolean; - emit( - event: "checkExpectation", - req: InstanceType, - res: InstanceType & { req: InstanceType }, - ): boolean; - emit(event: "clientError", err: Error, socket: stream.Duplex): boolean; - emit(event: "connect", req: InstanceType, socket: stream.Duplex, head: Buffer): boolean; - emit(event: "dropRequest", req: InstanceType, socket: stream.Duplex): boolean; - emit( - event: "request", - req: InstanceType, - res: InstanceType & { req: InstanceType }, - ): boolean; - emit(event: "upgrade", req: InstanceType, socket: stream.Duplex, head: Buffer): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "connection", listener: (socket: Socket) => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "checkContinue", listener: RequestListener): this; - on(event: "checkExpectation", listener: RequestListener): this; - on(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; - on(event: "connect", listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void): this; - on(event: "dropRequest", listener: (req: InstanceType, socket: stream.Duplex) => void): this; - on(event: "request", listener: RequestListener): this; - on(event: "upgrade", listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "connection", listener: (socket: Socket) => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "checkContinue", listener: RequestListener): this; - once(event: "checkExpectation", listener: RequestListener): this; - once(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; - once( - event: "connect", - listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, - ): this; - once(event: "dropRequest", listener: (req: InstanceType, socket: stream.Duplex) => void): this; - once(event: "request", listener: RequestListener): this; - once( - event: "upgrade", - listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, - ): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connection", listener: (socket: Socket) => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "checkContinue", listener: RequestListener): this; - prependListener(event: "checkExpectation", listener: RequestListener): this; - prependListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; - prependListener( - event: "connect", - listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, - ): this; - prependListener( - event: "dropRequest", - listener: (req: InstanceType, socket: stream.Duplex) => void, - ): this; - prependListener(event: "request", listener: RequestListener): this; - prependListener( - event: "upgrade", - listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, - ): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "checkContinue", listener: RequestListener): this; - prependOnceListener(event: "checkExpectation", listener: RequestListener): this; - prependOnceListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; - prependOnceListener( - event: "connect", - listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, - ): this; - prependOnceListener( - event: "dropRequest", - listener: (req: InstanceType, socket: stream.Duplex) => void, - ): this; - prependOnceListener(event: "request", listener: RequestListener): this; - prependOnceListener( - event: "upgrade", - listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, - ): this; - } - /** - * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from - * the perspective of the participants of an HTTP transaction. - * @since v0.1.17 - */ - class OutgoingMessage extends stream.Writable { - readonly req: Request; - chunkedEncoding: boolean; - shouldKeepAlive: boolean; - useChunkedEncodingByDefault: boolean; - sendDate: boolean; - /** - * @deprecated Use `writableEnded` instead. - */ - finished: boolean; - /** - * Read-only. `true` if the headers were sent, otherwise `false`. - * @since v0.9.3 - */ - readonly headersSent: boolean; - /** - * Alias of `outgoingMessage.socket`. - * @since v0.3.0 - * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead. - */ - readonly connection: Socket | null; - /** - * Reference to the underlying socket. Usually, users will not want to access - * this property. - * - * After calling `outgoingMessage.end()`, this property will be nulled. - * @since v0.3.0 - */ - readonly socket: Socket | null; - constructor(); - /** - * Once a socket is associated with the message and is connected, `socket.setTimeout()` will be called with `msecs` as the first parameter. - * @since v0.9.12 - * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. - */ - setTimeout(msecs: number, callback?: () => void): this; - /** - * Sets a single header value. If the header already exists in the to-be-sent - * headers, its value will be replaced. Use an array of strings to send multiple - * headers with the same name. - * @since v0.4.0 - * @param name Header name - * @param value Header value - */ - setHeader(name: string, value: number | string | readonly string[]): this; - /** - * Sets multiple header values for implicit headers. headers must be an instance of - * `Headers` or `Map`, if a header already exists in the to-be-sent headers, its - * value will be replaced. - * - * ```js - * const headers = new Headers({ foo: 'bar' }); - * outgoingMessage.setHeaders(headers); - * ``` - * - * or - * - * ```js - * const headers = new Map([['foo', 'bar']]); - * outgoingMessage.setHeaders(headers); - * ``` - * - * When headers have been set with `outgoingMessage.setHeaders()`, they will be - * merged with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * ```js - * // Returns content-type = text/plain - * const server = http.createServer((req, res) => { - * const headers = new Headers({ 'Content-Type': 'text/html' }); - * res.setHeaders(headers); - * res.writeHead(200, { 'Content-Type': 'text/plain' }); - * res.end('ok'); - * }); - * ``` - * - * @since v19.6.0, v18.15.0 - * @param name Header name - * @param value Header value - */ - setHeaders(headers: Headers | Map): this; - /** - * Append a single header value to the header object. - * - * If the value is an array, this is equivalent to calling this method multiple - * times. - * - * If there were no previous values for the header, this is equivalent to calling `outgoingMessage.setHeader(name, value)`. - * - * Depending of the value of `options.uniqueHeaders` when the client request or the - * server were created, this will end up in the header being sent multiple times or - * a single time with values joined using `; `. - * @since v18.3.0, v16.17.0 - * @param name Header name - * @param value Header value - */ - appendHeader(name: string, value: string | readonly string[]): this; - /** - * Gets the value of the HTTP header with the given name. If that header is not - * set, the returned value will be `undefined`. - * @since v0.4.0 - * @param name Name of header - */ - getHeader(name: string): number | string | string[] | undefined; - /** - * Returns a shallow copy of the current outgoing headers. Since a shallow - * copy is used, array values may be mutated without additional calls to - * various header-related HTTP module methods. The keys of the returned - * object are the header names and the values are the respective header - * values. All header names are lowercase. - * - * The object returned by the `outgoingMessage.getHeaders()` method does - * not prototypically inherit from the JavaScript `Object`. This means that - * typical `Object` methods such as `obj.toString()`, `obj.hasOwnProperty()`, - * and others are not defined and will not work. - * - * ```js - * outgoingMessage.setHeader('Foo', 'bar'); - * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headers = outgoingMessage.getHeaders(); - * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } - * ``` - * @since v7.7.0 - */ - getHeaders(): OutgoingHttpHeaders; - /** - * Returns an array containing the unique names of the current outgoing headers. - * All names are lowercase. - * @since v7.7.0 - */ - getHeaderNames(): string[]; - /** - * Returns `true` if the header identified by `name` is currently set in the - * outgoing headers. The header name is case-insensitive. - * - * ```js - * const hasContentType = outgoingMessage.hasHeader('content-type'); - * ``` - * @since v7.7.0 - */ - hasHeader(name: string): boolean; - /** - * Removes a header that is queued for implicit sending. - * - * ```js - * outgoingMessage.removeHeader('Content-Encoding'); - * ``` - * @since v0.4.0 - * @param name Header name - */ - removeHeader(name: string): void; - /** - * Adds HTTP trailers (headers but at the end of the message) to the message. - * - * Trailers will **only** be emitted if the message is chunked encoded. If not, - * the trailers will be silently discarded. - * - * HTTP requires the `Trailer` header to be sent to emit trailers, - * with a list of header field names in its value, e.g. - * - * ```js - * message.writeHead(200, { 'Content-Type': 'text/plain', - * 'Trailer': 'Content-MD5' }); - * message.write(fileData); - * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' }); - * message.end(); - * ``` - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * @since v0.3.0 - */ - addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void; - /** - * Flushes the message headers. - * - * For efficiency reason, Node.js normally buffers the message headers - * until `outgoingMessage.end()` is called or the first chunk of message data - * is written. It then tries to pack the headers and data into a single TCP - * packet. - * - * It is usually desired (it saves a TCP round-trip), but not when the first - * data is not sent until possibly much later. `outgoingMessage.flushHeaders()` bypasses the optimization and kickstarts the message. - * @since v1.6.0 - */ - flushHeaders(): void; - } - /** - * This object is created internally by an HTTP server, not by the user. It is - * passed as the second parameter to the `'request'` event. - * @since v0.1.17 - */ - class ServerResponse extends OutgoingMessage { - /** - * When using implicit headers (not calling `response.writeHead()` explicitly), - * this property controls the status code that will be sent to the client when - * the headers get flushed. - * - * ```js - * response.statusCode = 404; - * ``` - * - * After response header was sent to the client, this property indicates the - * status code which was sent out. - * @since v0.4.0 - */ - statusCode: number; - /** - * When using implicit headers (not calling `response.writeHead()` explicitly), - * this property controls the status message that will be sent to the client when - * the headers get flushed. If this is left as `undefined` then the standard - * message for the status code will be used. - * - * ```js - * response.statusMessage = 'Not found'; - * ``` - * - * After response header was sent to the client, this property indicates the - * status message which was sent out. - * @since v0.11.8 - */ - statusMessage: string; - /** - * If set to `true`, Node.js will check whether the `Content-Length` header value and the size of the body, in bytes, are equal. - * Mismatching the `Content-Length` header value will result - * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. - * @since v18.10.0, v16.18.0 - */ - strictContentLength: boolean; - constructor(req: Request); - assignSocket(socket: Socket): void; - detachSocket(socket: Socket): void; - /** - * Sends an HTTP/1.1 100 Continue message to the client, indicating that - * the request body should be sent. See the `'checkContinue'` event on `Server`. - * @since v0.3.0 - */ - writeContinue(callback?: () => void): void; - /** - * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header, - * indicating that the user agent can preload/preconnect the linked resources. - * The `hints` is an object containing the values of headers to be sent with - * early hints message. The optional `callback` argument will be called when - * the response message has been written. - * - * **Example** - * - * ```js - * const earlyHintsLink = '; rel=preload; as=style'; - * response.writeEarlyHints({ - * 'link': earlyHintsLink, - * }); - * - * const earlyHintsLinks = [ - * '; rel=preload; as=style', - * '; rel=preload; as=script', - * ]; - * response.writeEarlyHints({ - * 'link': earlyHintsLinks, - * 'x-trace-id': 'id for diagnostics', - * }); - * - * const earlyHintsCallback = () => console.log('early hints message sent'); - * response.writeEarlyHints({ - * 'link': earlyHintsLinks, - * }, earlyHintsCallback); - * ``` - * @since v18.11.0 - * @param hints An object containing the values of headers - * @param callback Will be called when the response message has been written - */ - writeEarlyHints(hints: Record, callback?: () => void): void; - /** - * Sends a response header to the request. The status code is a 3-digit HTTP - * status code, like `404`. The last argument, `headers`, are the response headers. - * Optionally one can give a human-readable `statusMessage` as the second - * argument. - * - * `headers` may be an `Array` where the keys and values are in the same list. - * It is _not_ a list of tuples. So, the even-numbered offsets are key values, - * and the odd-numbered offsets are the associated values. The array is in the same - * format as `request.rawHeaders`. - * - * Returns a reference to the `ServerResponse`, so that calls can be chained. - * - * ```js - * const body = 'hello world'; - * response - * .writeHead(200, { - * 'Content-Length': Buffer.byteLength(body), - * 'Content-Type': 'text/plain', - * }) - * .end(body); - * ``` - * - * This method must only be called once on a message and it must - * be called before `response.end()` is called. - * - * If `response.write()` or `response.end()` are called before calling - * this, the implicit/mutable headers will be calculated and call this function. - * - * When headers have been set with `response.setHeader()`, they will be merged - * with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * If this method is called and `response.setHeader()` has not been called, - * it will directly write the supplied header values onto the network channel - * without caching internally, and the `response.getHeader()` on the header - * will not yield the expected result. If progressive population of headers is - * desired with potential future retrieval and modification, use `response.setHeader()` instead. - * - * ```js - * // Returns content-type = text/plain - * const server = http.createServer((req, res) => { - * res.setHeader('Content-Type', 'text/html'); - * res.setHeader('X-Foo', 'bar'); - * res.writeHead(200, { 'Content-Type': 'text/plain' }); - * res.end('ok'); - * }); - * ``` - * - * `Content-Length` is read in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js - * will check whether `Content-Length` and the length of the body which has - * been transmitted are equal or not. - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a \[`Error`\]\[\] being thrown. - * @since v0.1.30 - */ - writeHead( - statusCode: number, - statusMessage?: string, - headers?: OutgoingHttpHeaders | OutgoingHttpHeader[], - ): this; - writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; - /** - * Sends a HTTP/1.1 102 Processing message to the client, indicating that - * the request body should be sent. - * @since v10.0.0 - */ - writeProcessing(): void; - } - interface InformationEvent { - statusCode: number; - statusMessage: string; - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - headers: IncomingHttpHeaders; - rawHeaders: string[]; - } - /** - * This object is created internally and returned from {@link request}. It - * represents an _in-progress_ request whose header has already been queued. The - * header is still mutable using the `setHeader(name, value)`, `getHeader(name)`, `removeHeader(name)` API. The actual header will - * be sent along with the first data chunk or when calling `request.end()`. - * - * To get the response, add a listener for `'response'` to the request object. `'response'` will be emitted from the request object when the response - * headers have been received. The `'response'` event is executed with one - * argument which is an instance of {@link IncomingMessage}. - * - * During the `'response'` event, one can add listeners to the - * response object; particularly to listen for the `'data'` event. - * - * If no `'response'` handler is added, then the response will be - * entirely discarded. However, if a `'response'` event handler is added, - * then the data from the response object **must** be consumed, either by - * calling `response.read()` whenever there is a `'readable'` event, or - * by adding a `'data'` handler, or by calling the `.resume()` method. - * Until the data is consumed, the `'end'` event will not fire. Also, until - * the data is read it will consume memory that can eventually lead to a - * 'process out of memory' error. - * - * For backward compatibility, `res` will only emit `'error'` if there is an `'error'` listener registered. - * - * Set `Content-Length` header to limit the response body size. - * If `response.strictContentLength` is set to `true`, mismatching the `Content-Length` header value will result in an `Error` being thrown, - * identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. - * - * `Content-Length` value should be in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. - * @since v0.1.17 - */ - class ClientRequest extends OutgoingMessage { - /** - * The `request.aborted` property will be `true` if the request has - * been aborted. - * @since v0.11.14 - * @deprecated Since v17.0.0, v16.12.0 - Check `destroyed` instead. - */ - aborted: boolean; - /** - * The request host. - * @since v14.5.0, v12.19.0 - */ - host: string; - /** - * The request protocol. - * @since v14.5.0, v12.19.0 - */ - protocol: string; - /** - * When sending request through a keep-alive enabled agent, the underlying socket - * might be reused. But if server closes connection at unfortunate time, client - * may run into a 'ECONNRESET' error. - * - * ```js - * import http from 'node:http'; - * - * // Server has a 5 seconds keep-alive timeout by default - * http - * .createServer((req, res) => { - * res.write('hello\n'); - * res.end(); - * }) - * .listen(3000); - * - * setInterval(() => { - * // Adapting a keep-alive agent - * http.get('http://localhost:3000', { agent }, (res) => { - * res.on('data', (data) => { - * // Do nothing - * }); - * }); - * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout - * ``` - * - * By marking a request whether it reused socket or not, we can do - * automatic error retry base on it. - * - * ```js - * import http from 'node:http'; - * const agent = new http.Agent({ keepAlive: true }); - * - * function retriableRequest() { - * const req = http - * .get('http://localhost:3000', { agent }, (res) => { - * // ... - * }) - * .on('error', (err) => { - * // Check if retry is needed - * if (req.reusedSocket && err.code === 'ECONNRESET') { - * retriableRequest(); - * } - * }); - * } - * - * retriableRequest(); - * ``` - * @since v13.0.0, v12.16.0 - */ - reusedSocket: boolean; - /** - * Limits maximum response headers count. If set to 0, no limit will be applied. - */ - maxHeadersCount: number; - constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); - /** - * The request method. - * @since v0.1.97 - */ - method: string; - /** - * The request path. - * @since v0.4.0 - */ - path: string; - /** - * Marks the request as aborting. Calling this will cause remaining data - * in the response to be dropped and the socket to be destroyed. - * @since v0.3.8 - * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead. - */ - abort(): void; - onSocket(socket: Socket): void; - /** - * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called. - * @since v0.5.9 - * @param timeout Milliseconds before a request times out. - * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event. - */ - setTimeout(timeout: number, callback?: () => void): this; - /** - * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called. - * @since v0.5.9 - */ - setNoDelay(noDelay?: boolean): void; - /** - * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called. - * @since v0.5.9 - */ - setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; - /** - * Returns an array containing the unique names of the current outgoing raw - * headers. Header names are returned with their exact casing being set. - * - * ```js - * request.setHeader('Foo', 'bar'); - * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headerNames = request.getRawHeaderNames(); - * // headerNames === ['Foo', 'Set-Cookie'] - * ``` - * @since v15.13.0, v14.17.0 - */ - getRawHeaderNames(): string[]; - /** - * @deprecated - */ - addListener(event: "abort", listener: () => void): this; - addListener( - event: "connect", - listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, - ): this; - addListener(event: "continue", listener: () => void): this; - addListener(event: "information", listener: (info: InformationEvent) => void): this; - addListener(event: "response", listener: (response: IncomingMessage) => void): this; - addListener(event: "socket", listener: (socket: Socket) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener( - event: "upgrade", - listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, - ): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - /** - * @deprecated - */ - on(event: "abort", listener: () => void): this; - on(event: "connect", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - on(event: "continue", listener: () => void): this; - on(event: "information", listener: (info: InformationEvent) => void): this; - on(event: "response", listener: (response: IncomingMessage) => void): this; - on(event: "socket", listener: (socket: Socket) => void): this; - on(event: "timeout", listener: () => void): this; - on(event: "upgrade", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - /** - * @deprecated - */ - once(event: "abort", listener: () => void): this; - once(event: "connect", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - once(event: "continue", listener: () => void): this; - once(event: "information", listener: (info: InformationEvent) => void): this; - once(event: "response", listener: (response: IncomingMessage) => void): this; - once(event: "socket", listener: (socket: Socket) => void): this; - once(event: "timeout", listener: () => void): this; - once(event: "upgrade", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - /** - * @deprecated - */ - prependListener(event: "abort", listener: () => void): this; - prependListener( - event: "connect", - listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, - ): this; - prependListener(event: "continue", listener: () => void): this; - prependListener(event: "information", listener: (info: InformationEvent) => void): this; - prependListener(event: "response", listener: (response: IncomingMessage) => void): this; - prependListener(event: "socket", listener: (socket: Socket) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener( - event: "upgrade", - listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, - ): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - /** - * @deprecated - */ - prependOnceListener(event: "abort", listener: () => void): this; - prependOnceListener( - event: "connect", - listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, - ): this; - prependOnceListener(event: "continue", listener: () => void): this; - prependOnceListener(event: "information", listener: (info: InformationEvent) => void): this; - prependOnceListener(event: "response", listener: (response: IncomingMessage) => void): this; - prependOnceListener(event: "socket", listener: (socket: Socket) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener( - event: "upgrade", - listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, - ): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - /** - * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to - * access response - * status, headers, and data. - * - * Different from its `socket` value which is a subclass of `stream.Duplex`, the `IncomingMessage` itself extends `stream.Readable` and is created separately to - * parse and emit the incoming HTTP headers and payload, as the underlying socket - * may be reused multiple times in case of keep-alive. - * @since v0.1.17 - */ - class IncomingMessage extends stream.Readable { - constructor(socket: Socket); - /** - * The `message.aborted` property will be `true` if the request has - * been aborted. - * @since v10.1.0 - * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from stream.Readable. - */ - aborted: boolean; - /** - * In case of server request, the HTTP version sent by the client. In the case of - * client response, the HTTP version of the connected-to server. - * Probably either `'1.1'` or `'1.0'`. - * - * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. - * @since v0.1.1 - */ - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - /** - * The `message.complete` property will be `true` if a complete HTTP message has - * been received and successfully parsed. - * - * This property is particularly useful as a means of determining if a client or - * server fully transmitted a message before a connection was terminated: - * - * ```js - * const req = http.request({ - * host: '127.0.0.1', - * port: 8080, - * method: 'POST', - * }, (res) => { - * res.resume(); - * res.on('end', () => { - * if (!res.complete) - * console.error( - * 'The connection was terminated while the message was still being sent'); - * }); - * }); - * ``` - * @since v0.3.0 - */ - complete: boolean; - /** - * Alias for `message.socket`. - * @since v0.1.90 - * @deprecated Since v16.0.0 - Use `socket`. - */ - connection: Socket; - /** - * The `net.Socket` object associated with the connection. - * - * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the - * client's authentication details. - * - * This property is guaranteed to be an instance of the `net.Socket` class, - * a subclass of `stream.Duplex`, unless the user specified a socket - * type other than `net.Socket` or internally nulled. - * @since v0.3.0 - */ - socket: Socket; - /** - * The request/response headers object. - * - * Key-value pairs of header names and values. Header names are lower-cased. - * - * ```js - * // Prints something like: - * // - * // { 'user-agent': 'curl/7.22.0', - * // host: '127.0.0.1:8000', - * // accept: '*' } - * console.log(request.headers); - * ``` - * - * Duplicates in raw headers are handled in the following ways, depending on the - * header name: - * - * * Duplicates of `age`, `authorization`, `content-length`, `content-type`, `etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`, - * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`, or `user-agent` are discarded. - * To allow duplicate values of the headers listed above to be joined, - * use the option `joinDuplicateHeaders` in {@link request} and {@link createServer}. See RFC 9110 Section 5.3 for more - * information. - * * `set-cookie` is always an array. Duplicates are added to the array. - * * For duplicate `cookie` headers, the values are joined together with `; `. - * * For all other headers, the values are joined together with `, `. - * @since v0.1.5 - */ - headers: IncomingHttpHeaders; - /** - * Similar to `message.headers`, but there is no join logic and the values are - * always arrays of strings, even for headers received just once. - * - * ```js - * // Prints something like: - * // - * // { 'user-agent': ['curl/7.22.0'], - * // host: ['127.0.0.1:8000'], - * // accept: ['*'] } - * console.log(request.headersDistinct); - * ``` - * @since v18.3.0, v16.17.0 - */ - headersDistinct: NodeJS.Dict; - /** - * The raw request/response headers list exactly as they were received. - * - * The keys and values are in the same list. It is _not_ a - * list of tuples. So, the even-numbered offsets are key values, and the - * odd-numbered offsets are the associated values. - * - * Header names are not lowercased, and duplicates are not merged. - * - * ```js - * // Prints something like: - * // - * // [ 'user-agent', - * // 'this is invalid because there can be only one', - * // 'User-Agent', - * // 'curl/7.22.0', - * // 'Host', - * // '127.0.0.1:8000', - * // 'ACCEPT', - * // '*' ] - * console.log(request.rawHeaders); - * ``` - * @since v0.11.6 - */ - rawHeaders: string[]; - /** - * The request/response trailers object. Only populated at the `'end'` event. - * @since v0.3.0 - */ - trailers: NodeJS.Dict; - /** - * Similar to `message.trailers`, but there is no join logic and the values are - * always arrays of strings, even for headers received just once. - * Only populated at the `'end'` event. - * @since v18.3.0, v16.17.0 - */ - trailersDistinct: NodeJS.Dict; - /** - * The raw request/response trailer keys and values exactly as they were - * received. Only populated at the `'end'` event. - * @since v0.11.6 - */ - rawTrailers: string[]; - /** - * Calls `message.socket.setTimeout(msecs, callback)`. - * @since v0.5.9 - */ - setTimeout(msecs: number, callback?: () => void): this; - /** - * **Only valid for request obtained from {@link Server}.** - * - * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`. - * @since v0.1.1 - */ - method?: string | undefined; - /** - * **Only valid for request obtained from {@link Server}.** - * - * Request URL string. This contains only the URL that is present in the actual - * HTTP request. Take the following request: - * - * ```http - * GET /status?name=ryan HTTP/1.1 - * Accept: text/plain - * ``` - * - * To parse the URL into its parts: - * - * ```js - * new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); - * ``` - * - * When `request.url` is `'/status?name=ryan'` and `process.env.HOST` is undefined: - * - * ```console - * $ node - * > new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); - * URL { - * href: 'http://localhost/status?name=ryan', - * origin: 'http://localhost', - * protocol: 'http:', - * username: '', - * password: '', - * host: 'localhost', - * hostname: 'localhost', - * port: '', - * pathname: '/status', - * search: '?name=ryan', - * searchParams: URLSearchParams { 'name' => 'ryan' }, - * hash: '' - * } - * ``` - * - * Ensure that you set `process.env.HOST` to the server's host name, or consider replacing this part entirely. If using `req.headers.host`, ensure proper - * validation is used, as clients may specify a custom `Host` header. - * @since v0.1.90 - */ - url?: string | undefined; - /** - * **Only valid for response obtained from {@link ClientRequest}.** - * - * The 3-digit HTTP response status code. E.G. `404`. - * @since v0.1.1 - */ - statusCode?: number | undefined; - /** - * **Only valid for response obtained from {@link ClientRequest}.** - * - * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. - * @since v0.11.10 - */ - statusMessage?: string | undefined; - /** - * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error` is provided, an `'error'` event is emitted on the socket and `error` is passed - * as an argument to any listeners on the event. - * @since v0.3.0 - */ - destroy(error?: Error): this; - } - interface AgentOptions extends Partial { - /** - * Keep sockets around in a pool to be used by other requests in the future. Default = false - */ - keepAlive?: boolean | undefined; - /** - * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. - * Only relevant if keepAlive is set to true. - */ - keepAliveMsecs?: number | undefined; - /** - * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity - */ - maxSockets?: number | undefined; - /** - * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity. - */ - maxTotalSockets?: number | undefined; - /** - * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. - */ - maxFreeSockets?: number | undefined; - /** - * Socket timeout in milliseconds. This will set the timeout after the socket is connected. - */ - timeout?: number | undefined; - /** - * Scheduling strategy to apply when picking the next free socket to use. - * @default `lifo` - */ - scheduling?: "fifo" | "lifo" | undefined; - } - /** - * An `Agent` is responsible for managing connection persistence - * and reuse for HTTP clients. It maintains a queue of pending requests - * for a given host and port, reusing a single socket connection for each - * until the queue is empty, at which time the socket is either destroyed - * or put into a pool where it is kept to be used again for requests to the - * same host and port. Whether it is destroyed or pooled depends on the `keepAlive` `option`. - * - * Pooled connections have TCP Keep-Alive enabled for them, but servers may - * still close idle connections, in which case they will be removed from the - * pool and a new connection will be made when a new HTTP request is made for - * that host and port. Servers may also refuse to allow multiple requests - * over the same connection, in which case the connection will have to be - * remade for every request and cannot be pooled. The `Agent` will still make - * the requests to that server, but each one will occur over a new connection. - * - * When a connection is closed by the client or the server, it is removed - * from the pool. Any unused sockets in the pool will be unrefed so as not - * to keep the Node.js process running when there are no outstanding requests. - * (see `socket.unref()`). - * - * It is good practice, to `destroy()` an `Agent` instance when it is no - * longer in use, because unused sockets consume OS resources. - * - * Sockets are removed from an agent when the socket emits either - * a `'close'` event or an `'agentRemove'` event. When intending to keep one - * HTTP request open for a long time without keeping it in the agent, something - * like the following may be done: - * - * ```js - * http.get(options, (res) => { - * // Do stuff - * }).on('socket', (socket) => { - * socket.emit('agentRemove'); - * }); - * ``` - * - * An agent may also be used for an individual request. By providing `{agent: false}` as an option to the `http.get()` or `http.request()` functions, a one-time use `Agent` with default options - * will be used - * for the client connection. - * - * `agent:false`: - * - * ```js - * http.get({ - * hostname: 'localhost', - * port: 80, - * path: '/', - * agent: false, // Create a new agent just for this one request - * }, (res) => { - * // Do stuff with response - * }); - * ``` - * - * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v22.x/api/net.html#socketconnectoptions-connectlistener) are also supported. - * - * To configure any of them, a custom {@link Agent} instance must be created. - * - * ```js - * import http from 'node:http'; - * const keepAliveAgent = new http.Agent({ keepAlive: true }); - * options.agent = keepAliveAgent; - * http.request(options, onResponseCallback) - * ``` - * @since v0.3.4 - */ - class Agent extends EventEmitter { - /** - * By default set to 256. For agents with `keepAlive` enabled, this - * sets the maximum number of sockets that will be left open in the free - * state. - * @since v0.11.7 - */ - maxFreeSockets: number; - /** - * By default set to `Infinity`. Determines how many concurrent sockets the agent - * can have open per origin. Origin is the returned value of `agent.getName()`. - * @since v0.3.6 - */ - maxSockets: number; - /** - * By default set to `Infinity`. Determines how many concurrent sockets the agent - * can have open. Unlike `maxSockets`, this parameter applies across all origins. - * @since v14.5.0, v12.19.0 - */ - maxTotalSockets: number; - /** - * An object which contains arrays of sockets currently awaiting use by - * the agent when `keepAlive` is enabled. Do not modify. - * - * Sockets in the `freeSockets` list will be automatically destroyed and - * removed from the array on `'timeout'`. - * @since v0.11.4 - */ - readonly freeSockets: NodeJS.ReadOnlyDict; - /** - * An object which contains arrays of sockets currently in use by the - * agent. Do not modify. - * @since v0.3.6 - */ - readonly sockets: NodeJS.ReadOnlyDict; - /** - * An object which contains queues of requests that have not yet been assigned to - * sockets. Do not modify. - * @since v0.5.9 - */ - readonly requests: NodeJS.ReadOnlyDict; - constructor(opts?: AgentOptions); - /** - * Destroy any sockets that are currently in use by the agent. - * - * It is usually not necessary to do this. However, if using an - * agent with `keepAlive` enabled, then it is best to explicitly shut down - * the agent when it is no longer needed. Otherwise, - * sockets might stay open for quite a long time before the server - * terminates them. - * @since v0.11.4 - */ - destroy(): void; - } - const METHODS: string[]; - const STATUS_CODES: { - [errorCode: number]: string | undefined; - [errorCode: string]: string | undefined; - }; - /** - * Returns a new instance of {@link Server}. - * - * The `requestListener` is a function which is automatically - * added to the `'request'` event. - * - * ```js - * import http from 'node:http'; - * - * // Create a local server to receive data from - * const server = http.createServer((req, res) => { - * res.writeHead(200, { 'Content-Type': 'application/json' }); - * res.end(JSON.stringify({ - * data: 'Hello World!', - * })); - * }); - * - * server.listen(8000); - * ``` - * - * ```js - * import http from 'node:http'; - * - * // Create a local server to receive data from - * const server = http.createServer(); - * - * // Listen to the request event - * server.on('request', (request, res) => { - * res.writeHead(200, { 'Content-Type': 'application/json' }); - * res.end(JSON.stringify({ - * data: 'Hello World!', - * })); - * }); - * - * server.listen(8000); - * ``` - * @since v0.1.13 - */ - function createServer< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - >(requestListener?: RequestListener): Server; - function createServer< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - >( - options: ServerOptions, - requestListener?: RequestListener, - ): Server; - // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, - // create interface RequestOptions would make the naming more clear to developers - interface RequestOptions extends ClientRequestArgs {} - /** - * `options` in `socket.connect()` are also supported. - * - * Node.js maintains several connections per server to make HTTP requests. - * This function allows one to transparently issue requests. - * - * `url` can be a string or a `URL` object. If `url` is a - * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. - * - * If both `url` and `options` are specified, the objects are merged, with the `options` properties taking precedence. - * - * The optional `callback` parameter will be added as a one-time listener for - * the `'response'` event. - * - * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to - * upload a file with a POST request, then write to the `ClientRequest` object. - * - * ```js - * import http from 'node:http'; - * import { Buffer } from 'node:buffer'; - * - * const postData = JSON.stringify({ - * 'msg': 'Hello World!', - * }); - * - * const options = { - * hostname: 'www.google.com', - * port: 80, - * path: '/upload', - * method: 'POST', - * headers: { - * 'Content-Type': 'application/json', - * 'Content-Length': Buffer.byteLength(postData), - * }, - * }; - * - * const req = http.request(options, (res) => { - * console.log(`STATUS: ${res.statusCode}`); - * console.log(`HEADERS: ${JSON.stringify(res.headers)}`); - * res.setEncoding('utf8'); - * res.on('data', (chunk) => { - * console.log(`BODY: ${chunk}`); - * }); - * res.on('end', () => { - * console.log('No more data in response.'); - * }); - * }); - * - * req.on('error', (e) => { - * console.error(`problem with request: ${e.message}`); - * }); - * - * // Write data to request body - * req.write(postData); - * req.end(); - * ``` - * - * In the example `req.end()` was called. With `http.request()` one - * must always call `req.end()` to signify the end of the request - - * even if there is no data being written to the request body. - * - * If any error is encountered during the request (be that with DNS resolution, - * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted - * on the returned request object. As with all `'error'` events, if no listeners - * are registered the error will be thrown. - * - * There are a few special headers that should be noted. - * - * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to - * the server should be persisted until the next request. - * * Sending a 'Content-Length' header will disable the default chunked encoding. - * * Sending an 'Expect' header will immediately send the request headers. - * Usually, when sending 'Expect: 100-continue', both a timeout and a listener - * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more - * information. - * * Sending an Authorization header will override using the `auth` option - * to compute basic authentication. - * - * Example using a `URL` as `options`: - * - * ```js - * const options = new URL('http://abc:xyz@example.com'); - * - * const req = http.request(options, (res) => { - * // ... - * }); - * ``` - * - * In a successful request, the following events will be emitted in the following - * order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * (`'data'` will not be emitted at all if the response body is empty, for - * instance, in most redirects) - * * `'end'` on the `res` object - * * `'close'` - * - * In the case of a connection error, the following events will be emitted: - * - * * `'socket'` - * * `'error'` - * * `'close'` - * - * In the case of a premature connection close before the response is received, - * the following events will be emitted in the following order: - * - * * `'socket'` - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` - * * `'close'` - * - * In the case of a premature connection close after the response is received, - * the following events will be emitted in the following order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * * (connection closed here) - * * `'aborted'` on the `res` object - * * `'close'` - * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'` - * * `'close'` on the `res` object - * - * If `req.destroy()` is called before a socket is assigned, the following - * events will be emitted in the following order: - * - * * (`req.destroy()` called here) - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called - * * `'close'` - * - * If `req.destroy()` is called before the connection succeeds, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * (`req.destroy()` called here) - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called - * * `'close'` - * - * If `req.destroy()` is called after the response is received, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * * (`req.destroy()` called here) - * * `'aborted'` on the `res` object - * * `'close'` - * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called - * * `'close'` on the `res` object - * - * If `req.abort()` is called before a socket is assigned, the following - * events will be emitted in the following order: - * - * * (`req.abort()` called here) - * * `'abort'` - * * `'close'` - * - * If `req.abort()` is called before the connection succeeds, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * (`req.abort()` called here) - * * `'abort'` - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` - * * `'close'` - * - * If `req.abort()` is called after the response is received, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * * (`req.abort()` called here) - * * `'abort'` - * * `'aborted'` on the `res` object - * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`. - * * `'close'` - * * `'close'` on the `res` object - * - * Setting the `timeout` option or using the `setTimeout()` function will - * not abort the request or do anything besides add a `'timeout'` event. - * - * Passing an `AbortSignal` and then calling `abort()` on the corresponding `AbortController` will behave the same way as calling `.destroy()` on the - * request. Specifically, the `'error'` event will be emitted with an error with - * the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'` and the `cause`, if one was provided. - * @since v0.3.6 - */ - function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; - function request( - url: string | URL, - options: RequestOptions, - callback?: (res: IncomingMessage) => void, - ): ClientRequest; - /** - * Since most requests are GET requests without bodies, Node.js provides this - * convenience method. The only difference between this method and {@link request} is that it sets the method to GET by default and calls `req.end()` automatically. The callback must take care to - * consume the response - * data for reasons stated in {@link ClientRequest} section. - * - * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}. - * - * JSON fetching example: - * - * ```js - * http.get('http://localhost:8000/', (res) => { - * const { statusCode } = res; - * const contentType = res.headers['content-type']; - * - * let error; - * // Any 2xx status code signals a successful response but - * // here we're only checking for 200. - * if (statusCode !== 200) { - * error = new Error('Request Failed.\n' + - * `Status Code: ${statusCode}`); - * } else if (!/^application\/json/.test(contentType)) { - * error = new Error('Invalid content-type.\n' + - * `Expected application/json but received ${contentType}`); - * } - * if (error) { - * console.error(error.message); - * // Consume response data to free up memory - * res.resume(); - * return; - * } - * - * res.setEncoding('utf8'); - * let rawData = ''; - * res.on('data', (chunk) => { rawData += chunk; }); - * res.on('end', () => { - * try { - * const parsedData = JSON.parse(rawData); - * console.log(parsedData); - * } catch (e) { - * console.error(e.message); - * } - * }); - * }).on('error', (e) => { - * console.error(`Got error: ${e.message}`); - * }); - * - * // Create a local server to receive data from - * const server = http.createServer((req, res) => { - * res.writeHead(200, { 'Content-Type': 'application/json' }); - * res.end(JSON.stringify({ - * data: 'Hello World!', - * })); - * }); - * - * server.listen(8000); - * ``` - * @since v0.3.6 - * @param options Accepts the same `options` as {@link request}, with the method set to GET by default. - */ - function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; - function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; - /** - * Performs the low-level validations on the provided `name` that are done when `res.setHeader(name, value)` is called. - * - * Passing illegal value as `name` will result in a `TypeError` being thrown, - * identified by `code: 'ERR_INVALID_HTTP_TOKEN'`. - * - * It is not necessary to use this method before passing headers to an HTTP request - * or response. The HTTP module will automatically validate such headers. - * - * Example: - * - * ```js - * import { validateHeaderName } from 'node:http'; - * - * try { - * validateHeaderName(''); - * } catch (err) { - * console.error(err instanceof TypeError); // --> true - * console.error(err.code); // --> 'ERR_INVALID_HTTP_TOKEN' - * console.error(err.message); // --> 'Header name must be a valid HTTP token [""]' - * } - * ``` - * @since v14.3.0 - * @param [label='Header name'] Label for error message. - */ - function validateHeaderName(name: string): void; - /** - * Performs the low-level validations on the provided `value` that are done when `res.setHeader(name, value)` is called. - * - * Passing illegal value as `value` will result in a `TypeError` being thrown. - * - * * Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`. - * * Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`. - * - * It is not necessary to use this method before passing headers to an HTTP request - * or response. The HTTP module will automatically validate such headers. - * - * Examples: - * - * ```js - * import { validateHeaderValue } from 'node:http'; - * - * try { - * validateHeaderValue('x-my-header', undefined); - * } catch (err) { - * console.error(err instanceof TypeError); // --> true - * console.error(err.code === 'ERR_HTTP_INVALID_HEADER_VALUE'); // --> true - * console.error(err.message); // --> 'Invalid value "undefined" for header "x-my-header"' - * } - * - * try { - * validateHeaderValue('x-my-header', 'oʊmɪɡə'); - * } catch (err) { - * console.error(err instanceof TypeError); // --> true - * console.error(err.code === 'ERR_INVALID_CHAR'); // --> true - * console.error(err.message); // --> 'Invalid character in header content ["x-my-header"]' - * } - * ``` - * @since v14.3.0 - * @param name Header name - * @param value Header value - */ - function validateHeaderValue(name: string, value: string): void; - /** - * Set the maximum number of idle HTTP parsers. - * @since v18.8.0, v16.18.0 - * @param [max=1000] - */ - function setMaxIdleHTTPParsers(max: number): void; - /** - * Global instance of `Agent` which is used as the default for all HTTP client - * requests. Diverges from a default `Agent` configuration by having `keepAlive` - * enabled and a `timeout` of 5 seconds. - * @since v0.5.9 - */ - let globalAgent: Agent; - /** - * Read-only property specifying the maximum allowed size of HTTP headers in bytes. - * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option. - */ - const maxHeaderSize: number; - /** - * A browser-compatible implementation of [WebSocket](https://nodejs.org/docs/latest/api/http.html#websocket). - * @since v22.5.0 - */ - const WebSocket: import("undici-types").WebSocket; - /** - * @since v22.5.0 - */ - const CloseEvent: import("undici-types").CloseEvent; - /** - * @since v22.5.0 - */ - const MessageEvent: import("undici-types").MessageEvent; -} -declare module "node:http" { - export * from "http"; -} diff --git a/web/static/node_modules/@types/node/http2.d.ts b/web/static/node_modules/@types/node/http2.d.ts deleted file mode 100644 index 0838ae8b..00000000 --- a/web/static/node_modules/@types/node/http2.d.ts +++ /dev/null @@ -1,2555 +0,0 @@ -/** - * The `node:http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol. - * It can be accessed using: - * - * ```js - * import http2 from 'node:http2'; - * ``` - * @since v8.4.0 - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/http2.js) - */ -declare module "http2" { - import EventEmitter = require("node:events"); - import * as fs from "node:fs"; - import * as net from "node:net"; - import * as stream from "node:stream"; - import * as tls from "node:tls"; - import * as url from "node:url"; - import { - IncomingHttpHeaders as Http1IncomingHttpHeaders, - IncomingMessage, - OutgoingHttpHeaders, - ServerResponse, - } from "node:http"; - export { OutgoingHttpHeaders } from "node:http"; - export interface IncomingHttpStatusHeader { - ":status"?: number | undefined; - } - export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { - ":path"?: string | undefined; - ":method"?: string | undefined; - ":authority"?: string | undefined; - ":scheme"?: string | undefined; - } - // Http2Stream - export interface StreamPriorityOptions { - exclusive?: boolean | undefined; - parent?: number | undefined; - weight?: number | undefined; - silent?: boolean | undefined; - } - export interface StreamState { - localWindowSize?: number | undefined; - state?: number | undefined; - localClose?: number | undefined; - remoteClose?: number | undefined; - sumDependencyWeight?: number | undefined; - weight?: number | undefined; - } - export interface ServerStreamResponseOptions { - endStream?: boolean | undefined; - waitForTrailers?: boolean | undefined; - } - export interface StatOptions { - offset: number; - length: number; - } - export interface ServerStreamFileResponseOptions { - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean; - waitForTrailers?: boolean | undefined; - offset?: number | undefined; - length?: number | undefined; - } - export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { - onError?(err: NodeJS.ErrnoException): void; - } - export interface Http2Stream extends stream.Duplex { - /** - * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, - * the `'aborted'` event will have been emitted. - * @since v8.4.0 - */ - readonly aborted: boolean; - /** - * This property shows the number of characters currently buffered to be written. - * See `net.Socket.bufferSize` for details. - * @since v11.2.0, v10.16.0 - */ - readonly bufferSize: number; - /** - * Set to `true` if the `Http2Stream` instance has been closed. - * @since v9.4.0 - */ - readonly closed: boolean; - /** - * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer - * usable. - * @since v8.4.0 - */ - readonly destroyed: boolean; - /** - * Set to `true` if the `END_STREAM` flag was set in the request or response - * HEADERS frame received, indicating that no additional data should be received - * and the readable side of the `Http2Stream` will be closed. - * @since v10.11.0 - */ - readonly endAfterHeaders: boolean; - /** - * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined` if the stream identifier has not yet been assigned. - * @since v8.4.0 - */ - readonly id?: number | undefined; - /** - * Set to `true` if the `Http2Stream` instance has not yet been assigned a - * numeric stream identifier. - * @since v9.4.0 - */ - readonly pending: boolean; - /** - * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is - * destroyed after either receiving an `RST_STREAM` frame from the connected peer, - * calling `http2stream.close()`, or `http2stream.destroy()`. Will be `undefined` if the `Http2Stream` has not been closed. - * @since v8.4.0 - */ - readonly rstCode: number; - /** - * An object containing the outbound headers sent for this `Http2Stream`. - * @since v9.5.0 - */ - readonly sentHeaders: OutgoingHttpHeaders; - /** - * An array of objects containing the outbound informational (additional) headers - * sent for this `Http2Stream`. - * @since v9.5.0 - */ - readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined; - /** - * An object containing the outbound trailers sent for this `HttpStream`. - * @since v9.5.0 - */ - readonly sentTrailers?: OutgoingHttpHeaders | undefined; - /** - * A reference to the `Http2Session` instance that owns this `Http2Stream`. The - * value will be `undefined` after the `Http2Stream` instance is destroyed. - * @since v8.4.0 - */ - readonly session: Http2Session | undefined; - /** - * Provides miscellaneous information about the current state of the `Http2Stream`. - * - * A current state of this `Http2Stream`. - * @since v8.4.0 - */ - readonly state: StreamState; - /** - * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the - * connected HTTP/2 peer. - * @since v8.4.0 - * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code. - * @param callback An optional function registered to listen for the `'close'` event. - */ - close(code?: number, callback?: () => void): void; - /** - * Updates the priority for this `Http2Stream` instance. - * @since v8.4.0 - */ - priority(options: StreamPriorityOptions): void; - /** - * ```js - * import http2 from 'node:http2'; - * const client = http2.connect('http://example.org:8000'); - * const { NGHTTP2_CANCEL } = http2.constants; - * const req = client.request({ ':path': '/' }); - * - * // Cancel the stream if there's no activity after 5 seconds - * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL)); - * ``` - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - /** - * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method - * will cause the `Http2Stream` to be immediately closed and must only be - * called after the `'wantTrailers'` event has been emitted. When sending a - * request or sending a response, the `options.waitForTrailers` option must be set - * in order to keep the `Http2Stream` open after the final `DATA` frame so that - * trailers can be sent. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond(undefined, { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ xyz: 'abc' }); - * }); - * stream.end('Hello World'); - * }); - * ``` - * - * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header - * fields (e.g. `':method'`, `':path'`, etc). - * @since v10.0.0 - */ - sendTrailers(headers: OutgoingHttpHeaders): void; - addListener(event: "aborted", listener: () => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: Buffer | string) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - addListener(event: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - addListener(event: "streamClosed", listener: (code: number) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - addListener(event: "wantTrailers", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "aborted"): boolean; - emit(event: "close"): boolean; - emit(event: "data", chunk: Buffer | string): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "frameError", frameType: number, errorCode: number): boolean; - emit(event: "pipe", src: stream.Readable): boolean; - emit(event: "unpipe", src: stream.Readable): boolean; - emit(event: "streamClosed", code: number): boolean; - emit(event: "timeout"): boolean; - emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "wantTrailers"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "aborted", listener: () => void): this; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: Buffer | string) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - on(event: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; - on(event: "streamClosed", listener: (code: number) => void): this; - on(event: "timeout", listener: () => void): this; - on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - on(event: "wantTrailers", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "aborted", listener: () => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: Buffer | string) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - once(event: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; - once(event: "streamClosed", listener: (code: number) => void): this; - once(event: "timeout", listener: () => void): this; - once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - once(event: "wantTrailers", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "aborted", listener: () => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "streamClosed", listener: (code: number) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - prependListener(event: "wantTrailers", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "aborted", listener: () => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "streamClosed", listener: (code: number) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener(event: "wantTrailers", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - export interface ClientHttp2Stream extends Http2Stream { - addListener(event: "continue", listener: () => {}): this; - addListener( - event: "headers", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - addListener( - event: "response", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "continue"): boolean; - emit(event: "headers", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; - emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "response", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "continue", listener: () => {}): this; - on( - event: "headers", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - on( - event: "response", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "continue", listener: () => {}): this; - once( - event: "headers", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - once( - event: "response", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "continue", listener: () => {}): this; - prependListener( - event: "headers", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - prependListener( - event: "response", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "continue", listener: () => {}): this; - prependOnceListener( - event: "headers", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener( - event: "response", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - export interface ServerHttp2Stream extends Http2Stream { - /** - * True if headers were sent, false otherwise (read-only). - * @since v8.4.0 - */ - readonly headersSent: boolean; - /** - * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote - * client's most recent `SETTINGS` frame. Will be `true` if the remote peer - * accepts push streams, `false` otherwise. Settings are the same for every `Http2Stream` in the same `Http2Session`. - * @since v8.4.0 - */ - readonly pushAllowed: boolean; - /** - * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer. - * @since v8.4.0 - */ - additionalHeaders(headers: OutgoingHttpHeaders): void; - /** - * Initiates a push stream. The callback is invoked with the new `Http2Stream` instance created for the push stream passed as the second argument, or an `Error` passed as the first argument. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond({ ':status': 200 }); - * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => { - * if (err) throw err; - * pushStream.respond({ ':status': 200 }); - * pushStream.end('some pushed data'); - * }); - * stream.end('some data'); - * }); - * ``` - * - * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass - * a `weight` value to `http2stream.priority` with the `silent` option set to `true` to enable server-side bandwidth balancing between concurrent streams. - * - * Calling `http2stream.pushStream()` from within a pushed stream is not permitted - * and will throw an error. - * @since v8.4.0 - * @param callback Callback that is called once the push stream has been initiated. - */ - pushStream( - headers: OutgoingHttpHeaders, - callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, - ): void; - pushStream( - headers: OutgoingHttpHeaders, - options?: StreamPriorityOptions, - callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, - ): void; - /** - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond({ ':status': 200 }); - * stream.end('some data'); - * }); - * ``` - * - * Initiates a response. When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * will be emitted immediately after queuing the last chunk of payload data to be sent. - * The `http2stream.sendTrailers()` method can then be used to send trailing header fields to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code must call either `http2stream.sendTrailers()` or `http2stream.close()` to close the `Http2Stream`. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond({ ':status': 200 }, { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ ABC: 'some value to send' }); - * }); - * stream.end('some data'); - * }); - * ``` - * @since v8.4.0 - */ - respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void; - /** - * Initiates a response whose data is read from the given file descriptor. No - * validation is performed on the given file descriptor. If an error occurs while - * attempting to read data using the file descriptor, the `Http2Stream` will be - * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. - * - * When used, the `Http2Stream` object's `Duplex` interface will be closed - * automatically. - * - * ```js - * import http2 from 'node:http2'; - * import fs from 'node:fs'; - * - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * const fd = fs.openSync('/some/file', 'r'); - * - * const stat = fs.fstatSync(fd); - * const headers = { - * 'content-length': stat.size, - * 'last-modified': stat.mtime.toUTCString(), - * 'content-type': 'text/plain; charset=utf-8', - * }; - * stream.respondWithFD(fd, headers); - * stream.on('close', () => fs.closeSync(fd)); - * }); - * ``` - * - * The optional `options.statCheck` function may be specified to give user code - * an opportunity to set additional content headers based on the `fs.Stat` details - * of the given fd. If the `statCheck` function is provided, the `http2stream.respondWithFD()` method will - * perform an `fs.fstat()` call to collect details on the provided file descriptor. - * - * The `offset` and `length` options may be used to limit the response to a - * specific range subset. This can be used, for instance, to support HTTP Range - * requests. - * - * The file descriptor or `FileHandle` is not closed when the stream is closed, - * so it will need to be closed manually once it is no longer needed. - * Using the same file descriptor concurrently for multiple streams - * is not supported and may result in data loss. Re-using a file descriptor - * after a stream has finished is supported. - * - * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * will be emitted immediately after queuing the last chunk of payload data to be - * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing - * header fields to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code _must_ call either `http2stream.sendTrailers()` - * or `http2stream.close()` to close the `Http2Stream`. - * - * ```js - * import http2 from 'node:http2'; - * import fs from 'node:fs'; - * - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * const fd = fs.openSync('/some/file', 'r'); - * - * const stat = fs.fstatSync(fd); - * const headers = { - * 'content-length': stat.size, - * 'last-modified': stat.mtime.toUTCString(), - * 'content-type': 'text/plain; charset=utf-8', - * }; - * stream.respondWithFD(fd, headers, { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ ABC: 'some value to send' }); - * }); - * - * stream.on('close', () => fs.closeSync(fd)); - * }); - * ``` - * @since v8.4.0 - * @param fd A readable file descriptor. - */ - respondWithFD( - fd: number | fs.promises.FileHandle, - headers?: OutgoingHttpHeaders, - options?: ServerStreamFileResponseOptions, - ): void; - /** - * Sends a regular file as the response. The `path` must specify a regular file - * or an `'error'` event will be emitted on the `Http2Stream` object. - * - * When used, the `Http2Stream` object's `Duplex` interface will be closed - * automatically. - * - * The optional `options.statCheck` function may be specified to give user code - * an opportunity to set additional content headers based on the `fs.Stat` details - * of the given file: - * - * If an error occurs while attempting to read the file data, the `Http2Stream` will be closed using an - * `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. - * If the `onError` callback is defined, then it will be called. Otherwise, the stream will be destroyed. - * - * Example using a file path: - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * function statCheck(stat, headers) { - * headers['last-modified'] = stat.mtime.toUTCString(); - * } - * - * function onError(err) { - * // stream.respond() can throw if the stream has been destroyed by - * // the other side. - * try { - * if (err.code === 'ENOENT') { - * stream.respond({ ':status': 404 }); - * } else { - * stream.respond({ ':status': 500 }); - * } - * } catch (err) { - * // Perform actual error handling. - * console.error(err); - * } - * stream.end(); - * } - * - * stream.respondWithFile('/some/file', - * { 'content-type': 'text/plain; charset=utf-8' }, - * { statCheck, onError }); - * }); - * ``` - * - * The `options.statCheck` function may also be used to cancel the send operation - * by returning `false`. For instance, a conditional request may check the stat - * results to determine if the file has been modified to return an appropriate `304` response: - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * function statCheck(stat, headers) { - * // Check the stat here... - * stream.respond({ ':status': 304 }); - * return false; // Cancel the send operation - * } - * stream.respondWithFile('/some/file', - * { 'content-type': 'text/plain; charset=utf-8' }, - * { statCheck }); - * }); - * ``` - * - * The `content-length` header field will be automatically set. - * - * The `offset` and `length` options may be used to limit the response to a - * specific range subset. This can be used, for instance, to support HTTP Range - * requests. - * - * The `options.onError` function may also be used to handle all the errors - * that could happen before the delivery of the file is initiated. The - * default behavior is to destroy the stream. - * - * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * will be emitted immediately after queuing the last chunk of payload data to be - * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing - * header fields to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respondWithFile('/some/file', - * { 'content-type': 'text/plain; charset=utf-8' }, - * { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ ABC: 'some value to send' }); - * }); - * }); - * ``` - * @since v8.4.0 - */ - respondWithFile( - path: string, - headers?: OutgoingHttpHeaders, - options?: ServerStreamFileResponseOptionsWithError, - ): void; - } - // Http2Session - export interface Settings { - headerTableSize?: number | undefined; - enablePush?: boolean | undefined; - initialWindowSize?: number | undefined; - maxFrameSize?: number | undefined; - maxConcurrentStreams?: number | undefined; - maxHeaderListSize?: number | undefined; - enableConnectProtocol?: boolean | undefined; - } - export interface ClientSessionRequestOptions { - endStream?: boolean | undefined; - exclusive?: boolean | undefined; - parent?: number | undefined; - weight?: number | undefined; - waitForTrailers?: boolean | undefined; - signal?: AbortSignal | undefined; - } - export interface SessionState { - effectiveLocalWindowSize?: number | undefined; - effectiveRecvDataLength?: number | undefined; - nextStreamID?: number | undefined; - localWindowSize?: number | undefined; - lastProcStreamID?: number | undefined; - remoteWindowSize?: number | undefined; - outboundQueueSize?: number | undefined; - deflateDynamicTableSize?: number | undefined; - inflateDynamicTableSize?: number | undefined; - } - export interface Http2Session extends EventEmitter { - /** - * Value will be `undefined` if the `Http2Session` is not yet connected to a - * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or - * will return the value of the connected `TLSSocket`'s own `alpnProtocol` property. - * @since v9.4.0 - */ - readonly alpnProtocol?: string | undefined; - /** - * Will be `true` if this `Http2Session` instance has been closed, otherwise `false`. - * @since v9.4.0 - */ - readonly closed: boolean; - /** - * Will be `true` if this `Http2Session` instance is still connecting, will be set - * to `false` before emitting `connect` event and/or calling the `http2.connect` callback. - * @since v10.0.0 - */ - readonly connecting: boolean; - /** - * Will be `true` if this `Http2Session` instance has been destroyed and must no - * longer be used, otherwise `false`. - * @since v8.4.0 - */ - readonly destroyed: boolean; - /** - * Value is `undefined` if the `Http2Session` session socket has not yet been - * connected, `true` if the `Http2Session` is connected with a `TLSSocket`, - * and `false` if the `Http2Session` is connected to any other kind of socket - * or stream. - * @since v9.4.0 - */ - readonly encrypted?: boolean | undefined; - /** - * A prototype-less object describing the current local settings of this `Http2Session`. - * The local settings are local to _this_`Http2Session` instance. - * @since v8.4.0 - */ - readonly localSettings: Settings; - /** - * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property - * will return an `Array` of origins for which the `Http2Session` may be - * considered authoritative. - * - * The `originSet` property is only available when using a secure TLS connection. - * @since v9.4.0 - */ - readonly originSet?: string[] | undefined; - /** - * Indicates whether the `Http2Session` is currently waiting for acknowledgment of - * a sent `SETTINGS` frame. Will be `true` after calling the `http2session.settings()` method. - * Will be `false` once all sent `SETTINGS` frames have been acknowledged. - * @since v8.4.0 - */ - readonly pendingSettingsAck: boolean; - /** - * A prototype-less object describing the current remote settings of this`Http2Session`. - * The remote settings are set by the _connected_ HTTP/2 peer. - * @since v8.4.0 - */ - readonly remoteSettings: Settings; - /** - * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but - * limits available methods to ones safe to use with HTTP/2. - * - * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw - * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information. - * - * `setTimeout` method will be called on this `Http2Session`. - * - * All other interactions will be routed directly to the socket. - * @since v8.4.0 - */ - readonly socket: net.Socket | tls.TLSSocket; - /** - * Provides miscellaneous information about the current state of the`Http2Session`. - * - * An object describing the current status of this `Http2Session`. - * @since v8.4.0 - */ - readonly state: SessionState; - /** - * The `http2session.type` will be equal to `http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a - * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a - * client. - * @since v8.4.0 - */ - readonly type: number; - /** - * Gracefully closes the `Http2Session`, allowing any existing streams to - * complete on their own and preventing new `Http2Stream` instances from being - * created. Once closed, `http2session.destroy()`_might_ be called if there - * are no open `Http2Stream` instances. - * - * If specified, the `callback` function is registered as a handler for the`'close'` event. - * @since v9.4.0 - */ - close(callback?: () => void): void; - /** - * Immediately terminates the `Http2Session` and the associated `net.Socket` or `tls.TLSSocket`. - * - * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error` is not undefined, an `'error'` event will be emitted immediately before the `'close'` event. - * - * If there are any remaining open `Http2Streams` associated with the `Http2Session`, those will also be destroyed. - * @since v8.4.0 - * @param error An `Error` object if the `Http2Session` is being destroyed due to an error. - * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`. - */ - destroy(error?: Error, code?: number): void; - /** - * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`. - * @since v9.4.0 - * @param code An HTTP/2 error code - * @param lastStreamID The numeric ID of the last processed `Http2Stream` - * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame. - */ - goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void; - /** - * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must - * be provided. The method will return `true` if the `PING` was sent, `false` otherwise. - * - * The maximum number of outstanding (unacknowledged) pings is determined by the `maxOutstandingPings` configuration option. The default maximum is 10. - * - * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView` containing 8 bytes of data that will be transmitted with the `PING` and - * returned with the ping acknowledgment. - * - * The callback will be invoked with three arguments: an error argument that will - * be `null` if the `PING` was successfully acknowledged, a `duration` argument - * that reports the number of milliseconds elapsed since the ping was sent and the - * acknowledgment was received, and a `Buffer` containing the 8-byte `PING` payload. - * - * ```js - * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => { - * if (!err) { - * console.log(`Ping acknowledged in ${duration} milliseconds`); - * console.log(`With payload '${payload.toString()}'`); - * } - * }); - * ``` - * - * If the `payload` argument is not specified, the default payload will be the - * 64-bit timestamp (little endian) marking the start of the `PING` duration. - * @since v8.9.3 - * @param payload Optional ping payload. - */ - ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; - ping( - payload: NodeJS.ArrayBufferView, - callback: (err: Error | null, duration: number, payload: Buffer) => void, - ): boolean; - /** - * Calls `ref()` on this `Http2Session` instance's underlying `net.Socket`. - * @since v9.4.0 - */ - ref(): void; - /** - * Sets the local endpoint's window size. - * The `windowSize` is the total window size to set, not - * the delta. - * - * ```js - * import http2 from 'node:http2'; - * - * const server = http2.createServer(); - * const expectedWindowSize = 2 ** 20; - * server.on('connect', (session) => { - * - * // Set local window size to be 2 ** 20 - * session.setLocalWindowSize(expectedWindowSize); - * }); - * ``` - * @since v15.3.0, v14.18.0 - */ - setLocalWindowSize(windowSize: number): void; - /** - * Used to set a callback function that is called when there is no activity on - * the `Http2Session` after `msecs` milliseconds. The given `callback` is - * registered as a listener on the `'timeout'` event. - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - /** - * Updates the current local settings for this `Http2Session` and sends a new `SETTINGS` frame to the connected HTTP/2 peer. - * - * Once called, the `http2session.pendingSettingsAck` property will be `true` while the session is waiting for the remote peer to acknowledge the new - * settings. - * - * The new settings will not become effective until the `SETTINGS` acknowledgment - * is received and the `'localSettings'` event is emitted. It is possible to send - * multiple `SETTINGS` frames while acknowledgment is still pending. - * @since v8.4.0 - * @param callback Callback that is called once the session is connected or right away if the session is already connected. - */ - settings( - settings: Settings, - callback?: (err: Error | null, settings: Settings, duration: number) => void, - ): void; - /** - * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`. - * @since v9.4.0 - */ - unref(): void; - addListener(event: "close", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener( - event: "frameError", - listener: (frameType: number, errorCode: number, streamID: number) => void, - ): this; - addListener( - event: "goaway", - listener: (errorCode: number, lastStreamID: number, opaqueData?: Buffer) => void, - ): this; - addListener(event: "localSettings", listener: (settings: Settings) => void): this; - addListener(event: "ping", listener: () => void): this; - addListener(event: "remoteSettings", listener: (settings: Settings) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "close"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean; - emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData?: Buffer): boolean; - emit(event: "localSettings", settings: Settings): boolean; - emit(event: "ping"): boolean; - emit(event: "remoteSettings", settings: Settings): boolean; - emit(event: "timeout"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "close", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData?: Buffer) => void): this; - on(event: "localSettings", listener: (settings: Settings) => void): this; - on(event: "ping", listener: () => void): this; - on(event: "remoteSettings", listener: (settings: Settings) => void): this; - on(event: "timeout", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData?: Buffer) => void): this; - once(event: "localSettings", listener: (settings: Settings) => void): this; - once(event: "ping", listener: () => void): this; - once(event: "remoteSettings", listener: (settings: Settings) => void): this; - once(event: "timeout", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener( - event: "frameError", - listener: (frameType: number, errorCode: number, streamID: number) => void, - ): this; - prependListener( - event: "goaway", - listener: (errorCode: number, lastStreamID: number, opaqueData?: Buffer) => void, - ): this; - prependListener(event: "localSettings", listener: (settings: Settings) => void): this; - prependListener(event: "ping", listener: () => void): this; - prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener( - event: "frameError", - listener: (frameType: number, errorCode: number, streamID: number) => void, - ): this; - prependOnceListener( - event: "goaway", - listener: (errorCode: number, lastStreamID: number, opaqueData?: Buffer) => void, - ): this; - prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this; - prependOnceListener(event: "ping", listener: () => void): this; - prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - export interface ClientHttp2Session extends Http2Session { - /** - * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()` creates and returns an `Http2Stream` instance that can be used to send an - * HTTP/2 request to the connected server. - * - * When a `ClientHttp2Session` is first created, the socket may not yet be - * connected. if `clienthttp2session.request()` is called during this time, the - * actual request will be deferred until the socket is ready to go. - * If the `session` is closed before the actual request be executed, an `ERR_HTTP2_GOAWAY_SESSION` is thrown. - * - * This method is only available if `http2session.type` is equal to `http2.constants.NGHTTP2_SESSION_CLIENT`. - * - * ```js - * import http2 from 'node:http2'; - * const clientSession = http2.connect('https://localhost:1234'); - * const { - * HTTP2_HEADER_PATH, - * HTTP2_HEADER_STATUS, - * } = http2.constants; - * - * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' }); - * req.on('response', (headers) => { - * console.log(headers[HTTP2_HEADER_STATUS]); - * req.on('data', (chunk) => { // .. }); - * req.on('end', () => { // .. }); - * }); - * ``` - * - * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * is emitted immediately after queuing the last chunk of payload data to be sent. - * The `http2stream.sendTrailers()` method can then be called to send trailing - * headers to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. - * - * When `options.signal` is set with an `AbortSignal` and then `abort` on the - * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error. - * - * The `:method` and `:path` pseudo-headers are not specified within `headers`, - * they respectively default to: - * - * * `:method` \= `'GET'` - * * `:path` \= `/` - * @since v8.4.0 - */ - request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; - addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - addListener(event: "origin", listener: (origins: string[]) => void): this; - addListener( - event: "connect", - listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): this; - addListener( - event: "stream", - listener: ( - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - ) => void, - ): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "altsvc", alt: string, origin: string, stream: number): boolean; - emit(event: "origin", origins: readonly string[]): boolean; - emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; - emit( - event: "stream", - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - ): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - on(event: "origin", listener: (origins: string[]) => void): this; - on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - on( - event: "stream", - listener: ( - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - ) => void, - ): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - once(event: "origin", listener: (origins: string[]) => void): this; - once( - event: "connect", - listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): this; - once( - event: "stream", - listener: ( - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - ) => void, - ): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - prependListener(event: "origin", listener: (origins: string[]) => void): this; - prependListener( - event: "connect", - listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): this; - prependListener( - event: "stream", - listener: ( - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - ) => void, - ): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - prependOnceListener(event: "origin", listener: (origins: string[]) => void): this; - prependOnceListener( - event: "connect", - listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): this; - prependOnceListener( - event: "stream", - listener: ( - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - ) => void, - ): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - export interface AlternativeServiceOptions { - origin: number | string | url.URL; - } - export interface ServerHttp2Session< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends Http2Session { - readonly server: - | Http2Server - | Http2SecureServer; - /** - * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client. - * - * ```js - * import http2 from 'node:http2'; - * - * const server = http2.createServer(); - * server.on('session', (session) => { - * // Set altsvc for origin https://example.org:80 - * session.altsvc('h2=":8000"', 'https://example.org:80'); - * }); - * - * server.on('stream', (stream) => { - * // Set altsvc for a specific stream - * stream.session.altsvc('h2=":8000"', stream.id); - * }); - * ``` - * - * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate - * service is associated with the origin of the given `Http2Stream`. - * - * The `alt` and origin string _must_ contain only ASCII bytes and are - * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given - * domain. - * - * When a string is passed for the `originOrStream` argument, it will be parsed as - * a URL and the origin will be derived. For instance, the origin for the - * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string - * cannot be parsed as a URL or if a valid origin cannot be derived. - * - * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be - * used. The value of the `origin` property _must_ be a properly serialized - * ASCII origin. - * @since v9.4.0 - * @param alt A description of the alternative service configuration as defined by `RFC 7838`. - * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the - * `http2stream.id` property. - */ - altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; - /** - * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client - * to advertise the set of origins for which the server is capable of providing - * authoritative responses. - * - * ```js - * import http2 from 'node:http2'; - * const options = getSecureOptionsSomehow(); - * const server = http2.createSecureServer(options); - * server.on('stream', (stream) => { - * stream.respond(); - * stream.end('ok'); - * }); - * server.on('session', (session) => { - * session.origin('https://example.com', 'https://example.org'); - * }); - * ``` - * - * When a string is passed as an `origin`, it will be parsed as a URL and the - * origin will be derived. For instance, the origin for the HTTP URL `'https://example.org/foo/bar'` is the ASCII string` 'https://example.org'`. An error will be thrown if either the given - * string - * cannot be parsed as a URL or if a valid origin cannot be derived. - * - * A `URL` object, or any object with an `origin` property, may be passed as - * an `origin`, in which case the value of the `origin` property will be - * used. The value of the `origin` property _must_ be a properly serialized - * ASCII origin. - * - * Alternatively, the `origins` option may be used when creating a new HTTP/2 - * server using the `http2.createSecureServer()` method: - * - * ```js - * import http2 from 'node:http2'; - * const options = getSecureOptionsSomehow(); - * options.origins = ['https://example.com', 'https://example.org']; - * const server = http2.createSecureServer(options); - * server.on('stream', (stream) => { - * stream.respond(); - * stream.end('ok'); - * }); - * ``` - * @since v10.12.0 - * @param origins One or more URL Strings passed as separate arguments. - */ - origin( - ...origins: Array< - | string - | url.URL - | { - origin: string; - } - > - ): void; - addListener( - event: "connect", - listener: ( - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ) => void, - ): this; - addListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit( - event: "connect", - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on( - event: "connect", - listener: ( - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ) => void, - ): this; - on( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once( - event: "connect", - listener: ( - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ) => void, - ): this; - once( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - event: "connect", - listener: ( - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ) => void, - ): this; - prependListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - event: "connect", - listener: ( - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ) => void, - ): this; - prependOnceListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - // Http2Server - export interface SessionOptions { - maxDeflateDynamicTableSize?: number | undefined; - maxSessionMemory?: number | undefined; - maxHeaderListPairs?: number | undefined; - maxOutstandingPings?: number | undefined; - maxSendHeaderBlockLength?: number | undefined; - paddingStrategy?: number | undefined; - peerMaxConcurrentStreams?: number | undefined; - settings?: Settings | undefined; - remoteCustomSettings?: number[] | undefined; - /** - * Specifies a timeout in milliseconds that - * a server should wait when an [`'unknownProtocol'`][] is emitted. If the - * socket has not been destroyed by that time the server will destroy it. - * @default 100000 - */ - unknownProtocolTimeout?: number | undefined; - selectPadding?(frameLen: number, maxFrameLen: number): number; - } - export interface ClientSessionOptions extends SessionOptions { - maxReservedRemoteStreams?: number | undefined; - createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined; - protocol?: "http:" | "https:" | undefined; - } - export interface ServerSessionOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends SessionOptions { - Http1IncomingMessage?: Http1Request | undefined; - Http1ServerResponse?: Http1Response | undefined; - Http2ServerRequest?: Http2Request | undefined; - Http2ServerResponse?: Http2Response | undefined; - } - export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} - export interface SecureServerSessionOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends ServerSessionOptions, tls.TlsOptions {} - export interface ServerOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends ServerSessionOptions {} - export interface SecureServerOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends SecureServerSessionOptions { - allowHTTP1?: boolean | undefined; - origins?: string[] | undefined; - } - interface HTTP2ServerCommon { - setTimeout(msec?: number, callback?: () => void): this; - /** - * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values. - * Throws ERR_INVALID_ARG_TYPE for invalid settings argument. - */ - updateSettings(settings: Settings): void; - } - export interface Http2Server< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends net.Server, HTTP2ServerCommon { - addListener( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - addListener( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - addListener( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - addListener(event: "sessionError", listener: (err: Error) => void): this; - addListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit( - event: "checkContinue", - request: InstanceType, - response: InstanceType, - ): boolean; - emit(event: "request", request: InstanceType, response: InstanceType): boolean; - emit( - event: "session", - session: ServerHttp2Session, - ): boolean; - emit(event: "sessionError", err: Error): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "timeout"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - on( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - on( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - on(event: "sessionError", listener: (err: Error) => void): this; - on( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - on(event: "timeout", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - once( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - once( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - once(event: "sessionError", listener: (err: Error) => void): this; - once( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - once(event: "timeout", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependListener( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependListener( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - prependListener(event: "sessionError", listener: (err: Error) => void): this; - prependListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependOnceListener( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependOnceListener( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; - prependOnceListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - export interface Http2SecureServer< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends tls.Server, HTTP2ServerCommon { - addListener( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - addListener( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - addListener( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - addListener(event: "sessionError", listener: (err: Error) => void): this; - addListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit( - event: "checkContinue", - request: InstanceType, - response: InstanceType, - ): boolean; - emit(event: "request", request: InstanceType, response: InstanceType): boolean; - emit( - event: "session", - session: ServerHttp2Session, - ): boolean; - emit(event: "sessionError", err: Error): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "timeout"): boolean; - emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - on( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - on( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - on(event: "sessionError", listener: (err: Error) => void): this; - on( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - on(event: "timeout", listener: () => void): this; - on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - once( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - once( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - once(event: "sessionError", listener: (err: Error) => void): this; - once( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - once(event: "timeout", listener: () => void): this; - once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependListener( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependListener( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - prependListener(event: "sessionError", listener: (err: Error) => void): this; - prependListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependOnceListener( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependOnceListener( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; - prependOnceListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - /** - * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status, - * headers, and - * data. - * @since v8.4.0 - */ - export class Http2ServerRequest extends stream.Readable { - constructor( - stream: ServerHttp2Stream, - headers: IncomingHttpHeaders, - options: stream.ReadableOptions, - rawHeaders: readonly string[], - ); - /** - * The `request.aborted` property will be `true` if the request has - * been aborted. - * @since v10.1.0 - */ - readonly aborted: boolean; - /** - * The request authority pseudo header field. Because HTTP/2 allows requests - * to set either `:authority` or `host`, this value is derived from `req.headers[':authority']` if present. Otherwise, it is derived from `req.headers['host']`. - * @since v8.4.0 - */ - readonly authority: string; - /** - * See `request.socket`. - * @since v8.4.0 - * @deprecated Since v13.0.0 - Use `socket`. - */ - readonly connection: net.Socket | tls.TLSSocket; - /** - * The `request.complete` property will be `true` if the request has - * been completed, aborted, or destroyed. - * @since v12.10.0 - */ - readonly complete: boolean; - /** - * The request/response headers object. - * - * Key-value pairs of header names and values. Header names are lower-cased. - * - * ```js - * // Prints something like: - * // - * // { 'user-agent': 'curl/7.22.0', - * // host: '127.0.0.1:8000', - * // accept: '*' } - * console.log(request.headers); - * ``` - * - * See `HTTP/2 Headers Object`. - * - * In HTTP/2, the request path, host name, protocol, and method are represented as - * special headers prefixed with the `:` character (e.g. `':path'`). These special - * headers will be included in the `request.headers` object. Care must be taken not - * to inadvertently modify these special headers or errors may occur. For instance, - * removing all headers from the request will cause errors to occur: - * - * ```js - * removeAllHeaders(request.headers); - * assert(request.url); // Fails because the :path header has been removed - * ``` - * @since v8.4.0 - */ - readonly headers: IncomingHttpHeaders; - /** - * In case of server request, the HTTP version sent by the client. In the case of - * client response, the HTTP version of the connected-to server. Returns `'2.0'`. - * - * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. - * @since v8.4.0 - */ - readonly httpVersion: string; - readonly httpVersionMinor: number; - readonly httpVersionMajor: number; - /** - * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`. - * @since v8.4.0 - */ - readonly method: string; - /** - * The raw request/response headers list exactly as they were received. - * - * The keys and values are in the same list. It is _not_ a - * list of tuples. So, the even-numbered offsets are key values, and the - * odd-numbered offsets are the associated values. - * - * Header names are not lowercased, and duplicates are not merged. - * - * ```js - * // Prints something like: - * // - * // [ 'user-agent', - * // 'this is invalid because there can be only one', - * // 'User-Agent', - * // 'curl/7.22.0', - * // 'Host', - * // '127.0.0.1:8000', - * // 'ACCEPT', - * // '*' ] - * console.log(request.rawHeaders); - * ``` - * @since v8.4.0 - */ - readonly rawHeaders: string[]; - /** - * The raw request/response trailer keys and values exactly as they were - * received. Only populated at the `'end'` event. - * @since v8.4.0 - */ - readonly rawTrailers: string[]; - /** - * The request scheme pseudo header field indicating the scheme - * portion of the target URL. - * @since v8.4.0 - */ - readonly scheme: string; - /** - * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but - * applies getters, setters, and methods based on HTTP/2 logic. - * - * `destroyed`, `readable`, and `writable` properties will be retrieved from and - * set on `request.stream`. - * - * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `request.stream`. - * - * `setTimeout` method will be called on `request.stream.session`. - * - * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for - * more information. - * - * All other interactions will be routed directly to the socket. With TLS support, - * use `request.socket.getPeerCertificate()` to obtain the client's - * authentication details. - * @since v8.4.0 - */ - readonly socket: net.Socket | tls.TLSSocket; - /** - * The `Http2Stream` object backing the request. - * @since v8.4.0 - */ - readonly stream: ServerHttp2Stream; - /** - * The request/response trailers object. Only populated at the `'end'` event. - * @since v8.4.0 - */ - readonly trailers: IncomingHttpHeaders; - /** - * Request URL string. This contains only the URL that is present in the actual - * HTTP request. If the request is: - * - * ```http - * GET /status?name=ryan HTTP/1.1 - * Accept: text/plain - * ``` - * - * Then `request.url` will be: - * - * ```js - * '/status?name=ryan' - * ``` - * - * To parse the url into its parts, `new URL()` can be used: - * - * ```console - * $ node - * > new URL('/status?name=ryan', 'http://example.com') - * URL { - * href: 'http://example.com/status?name=ryan', - * origin: 'http://example.com', - * protocol: 'http:', - * username: '', - * password: '', - * host: 'example.com', - * hostname: 'example.com', - * port: '', - * pathname: '/status', - * search: '?name=ryan', - * searchParams: URLSearchParams { 'name' => 'ryan' }, - * hash: '' - * } - * ``` - * @since v8.4.0 - */ - url: string; - /** - * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is - * provided, then it is added as a listener on the `'timeout'` event on - * the response object. - * - * If no `'timeout'` listener is added to the request, the response, or - * the server, then `Http2Stream`s are destroyed when they time out. If a - * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - read(size?: number): Buffer | string | null; - addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: Buffer | string) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "aborted", hadError: boolean, code: number): boolean; - emit(event: "close"): boolean; - emit(event: "data", chunk: Buffer | string): boolean; - emit(event: "end"): boolean; - emit(event: "readable"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: Buffer | string) => void): this; - on(event: "end", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: Buffer | string) => void): this; - once(event: "end", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - /** - * This object is created internally by an HTTP server, not by the user. It is - * passed as the second parameter to the `'request'` event. - * @since v8.4.0 - */ - export class Http2ServerResponse extends stream.Writable { - constructor(stream: ServerHttp2Stream); - /** - * See `response.socket`. - * @since v8.4.0 - * @deprecated Since v13.0.0 - Use `socket`. - */ - readonly connection: net.Socket | tls.TLSSocket; - /** - * Append a single header value to the header object. - * - * If the value is an array, this is equivalent to calling this method multiple times. - * - * If there were no previous values for the header, this is equivalent to calling {@link setHeader}. - * - * Attempting to set a header field name or value that contains invalid characters will result in a - * [TypeError](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-typeerror) being thrown. - * - * ```js - * // Returns headers including "set-cookie: a" and "set-cookie: b" - * const server = http2.createServer((req, res) => { - * res.setHeader('set-cookie', 'a'); - * res.appendHeader('set-cookie', 'b'); - * res.writeHead(200); - * res.end('ok'); - * }); - * ``` - * @since v20.12.0 - */ - appendHeader(name: string, value: string | string[]): void; - /** - * Boolean value that indicates whether the response has completed. Starts - * as `false`. After `response.end()` executes, the value will be `true`. - * @since v8.4.0 - * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`. - */ - readonly finished: boolean; - /** - * True if headers were sent, false otherwise (read-only). - * @since v8.4.0 - */ - readonly headersSent: boolean; - /** - * A reference to the original HTTP2 `request` object. - * @since v15.7.0 - */ - readonly req: Request; - /** - * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but - * applies getters, setters, and methods based on HTTP/2 logic. - * - * `destroyed`, `readable`, and `writable` properties will be retrieved from and - * set on `response.stream`. - * - * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `response.stream`. - * - * `setTimeout` method will be called on `response.stream.session`. - * - * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for - * more information. - * - * All other interactions will be routed directly to the socket. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer((req, res) => { - * const ip = req.socket.remoteAddress; - * const port = req.socket.remotePort; - * res.end(`Your IP address is ${ip} and your source port is ${port}.`); - * }).listen(3000); - * ``` - * @since v8.4.0 - */ - readonly socket: net.Socket | tls.TLSSocket; - /** - * The `Http2Stream` object backing the response. - * @since v8.4.0 - */ - readonly stream: ServerHttp2Stream; - /** - * When true, the Date header will be automatically generated and sent in - * the response if it is not already present in the headers. Defaults to true. - * - * This should only be disabled for testing; HTTP requires the Date header - * in responses. - * @since v8.4.0 - */ - sendDate: boolean; - /** - * When using implicit headers (not calling `response.writeHead()` explicitly), - * this property controls the status code that will be sent to the client when - * the headers get flushed. - * - * ```js - * response.statusCode = 404; - * ``` - * - * After response header was sent to the client, this property indicates the - * status code which was sent out. - * @since v8.4.0 - */ - statusCode: number; - /** - * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns - * an empty string. - * @since v8.4.0 - */ - statusMessage: ""; - /** - * This method adds HTTP trailing headers (a header but at the end of the - * message) to the response. - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * @since v8.4.0 - */ - addTrailers(trailers: OutgoingHttpHeaders): void; - /** - * This method signals to the server that all of the response headers and body - * have been sent; that server should consider this message complete. - * The method, `response.end()`, MUST be called on each response. - * - * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`. - * - * If `callback` is specified, it will be called when the response stream - * is finished. - * @since v8.4.0 - */ - end(callback?: () => void): this; - end(data: string | Uint8Array, callback?: () => void): this; - end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this; - /** - * Reads out a header that has already been queued but not sent to the client. - * The name is case-insensitive. - * - * ```js - * const contentType = response.getHeader('content-type'); - * ``` - * @since v8.4.0 - */ - getHeader(name: string): string; - /** - * Returns an array containing the unique names of the current outgoing headers. - * All header names are lowercase. - * - * ```js - * response.setHeader('Foo', 'bar'); - * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headerNames = response.getHeaderNames(); - * // headerNames === ['foo', 'set-cookie'] - * ``` - * @since v8.4.0 - */ - getHeaderNames(): string[]; - /** - * Returns a shallow copy of the current outgoing headers. Since a shallow copy - * is used, array values may be mutated without additional calls to various - * header-related http module methods. The keys of the returned object are the - * header names and the values are the respective header values. All header names - * are lowercase. - * - * The object returned by the `response.getHeaders()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, - * `obj.hasOwnProperty()`, and others - * are not defined and _will not work_. - * - * ```js - * response.setHeader('Foo', 'bar'); - * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headers = response.getHeaders(); - * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } - * ``` - * @since v8.4.0 - */ - getHeaders(): OutgoingHttpHeaders; - /** - * Returns `true` if the header identified by `name` is currently set in the - * outgoing headers. The header name matching is case-insensitive. - * - * ```js - * const hasContentType = response.hasHeader('content-type'); - * ``` - * @since v8.4.0 - */ - hasHeader(name: string): boolean; - /** - * Removes a header that has been queued for implicit sending. - * - * ```js - * response.removeHeader('Content-Encoding'); - * ``` - * @since v8.4.0 - */ - removeHeader(name: string): void; - /** - * Sets a single header value for implicit headers. If this header already exists - * in the to-be-sent headers, its value will be replaced. Use an array of strings - * here to send multiple headers with the same name. - * - * ```js - * response.setHeader('Content-Type', 'text/html; charset=utf-8'); - * ``` - * - * or - * - * ```js - * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); - * ``` - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * - * When headers have been set with `response.setHeader()`, they will be merged - * with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * ```js - * // Returns content-type = text/plain - * const server = http2.createServer((req, res) => { - * res.setHeader('Content-Type', 'text/html; charset=utf-8'); - * res.setHeader('X-Foo', 'bar'); - * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); - * res.end('ok'); - * }); - * ``` - * @since v8.4.0 - */ - setHeader(name: string, value: number | string | readonly string[]): void; - /** - * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is - * provided, then it is added as a listener on the `'timeout'` event on - * the response object. - * - * If no `'timeout'` listener is added to the request, the response, or - * the server, then `Http2Stream` s are destroyed when they time out. If a - * handler is assigned to the request, the response, or the server's `'timeout'` events, timed out sockets must be handled explicitly. - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - /** - * If this method is called and `response.writeHead()` has not been called, - * it will switch to implicit header mode and flush the implicit headers. - * - * This sends a chunk of the response body. This method may - * be called multiple times to provide successive parts of the body. - * - * In the `node:http` module, the response body is omitted when the - * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body. - * - * `chunk` can be a string or a buffer. If `chunk` is a string, - * the second parameter specifies how to encode it into a byte stream. - * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk - * of data is flushed. - * - * This is the raw HTTP body and has nothing to do with higher-level multi-part - * body encodings that may be used. - * - * The first time `response.write()` is called, it will send the buffered - * header information and the first chunk of the body to the client. The second - * time `response.write()` is called, Node.js assumes data will be streamed, - * and sends the new data separately. That is, the response is buffered up to the - * first chunk of the body. - * - * Returns `true` if the entire data was flushed successfully to the kernel - * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again. - * @since v8.4.0 - */ - write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; - write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean; - /** - * Sends a status `100 Continue` to the client, indicating that the request body - * should be sent. See the `'checkContinue'` event on `Http2Server` and `Http2SecureServer`. - * @since v8.4.0 - */ - writeContinue(): void; - /** - * Sends a status `103 Early Hints` to the client with a Link header, - * indicating that the user agent can preload/preconnect the linked resources. - * The `hints` is an object containing the values of headers to be sent with - * early hints message. - * - * **Example** - * - * ```js - * const earlyHintsLink = '; rel=preload; as=style'; - * response.writeEarlyHints({ - * 'link': earlyHintsLink, - * }); - * - * const earlyHintsLinks = [ - * '; rel=preload; as=style', - * '; rel=preload; as=script', - * ]; - * response.writeEarlyHints({ - * 'link': earlyHintsLinks, - * }); - * ``` - * @since v18.11.0 - */ - writeEarlyHints(hints: Record): void; - /** - * Sends a response header to the request. The status code is a 3-digit HTTP - * status code, like `404`. The last argument, `headers`, are the response headers. - * - * Returns a reference to the `Http2ServerResponse`, so that calls can be chained. - * - * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be - * passed as the second argument. However, because the `statusMessage` has no - * meaning within HTTP/2, the argument will have no effect and a process warning - * will be emitted. - * - * ```js - * const body = 'hello world'; - * response.writeHead(200, { - * 'Content-Length': Buffer.byteLength(body), - * 'Content-Type': 'text/plain; charset=utf-8', - * }); - * ``` - * - * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a - * given encoding. On outbound messages, Node.js does not check if Content-Length - * and the length of the body being transmitted are equal or not. However, when - * receiving messages, Node.js will automatically reject messages when the `Content-Length` does not match the actual payload size. - * - * This method may be called at most one time on a message before `response.end()` is called. - * - * If `response.write()` or `response.end()` are called before calling - * this, the implicit/mutable headers will be calculated and call this function. - * - * When headers have been set with `response.setHeader()`, they will be merged - * with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * ```js - * // Returns content-type = text/plain - * const server = http2.createServer((req, res) => { - * res.setHeader('Content-Type', 'text/html; charset=utf-8'); - * res.setHeader('X-Foo', 'bar'); - * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); - * res.end('ok'); - * }); - * ``` - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * @since v8.4.0 - */ - writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; - writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this; - /** - * Call `http2stream.pushStream()` with the given headers, and wrap the - * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback - * parameter if successful. When `Http2ServerRequest` is closed, the callback is - * called with an error `ERR_HTTP2_INVALID_STREAM`. - * @since v8.4.0 - * @param headers An object describing the headers - * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of - * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method - */ - createPushResponse( - headers: OutgoingHttpHeaders, - callback: (err: Error | null, res: Http2ServerResponse) => void, - ): void; - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (error: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "close"): boolean; - emit(event: "drain"): boolean; - emit(event: "error", error: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pipe", src: stream.Readable): boolean; - emit(event: "unpipe", src: stream.Readable): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (error: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (error: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (error: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (error: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - export namespace constants { - const NGHTTP2_SESSION_SERVER: number; - const NGHTTP2_SESSION_CLIENT: number; - const NGHTTP2_STREAM_STATE_IDLE: number; - const NGHTTP2_STREAM_STATE_OPEN: number; - const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; - const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; - const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; - const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; - const NGHTTP2_STREAM_STATE_CLOSED: number; - const NGHTTP2_NO_ERROR: number; - const NGHTTP2_PROTOCOL_ERROR: number; - const NGHTTP2_INTERNAL_ERROR: number; - const NGHTTP2_FLOW_CONTROL_ERROR: number; - const NGHTTP2_SETTINGS_TIMEOUT: number; - const NGHTTP2_STREAM_CLOSED: number; - const NGHTTP2_FRAME_SIZE_ERROR: number; - const NGHTTP2_REFUSED_STREAM: number; - const NGHTTP2_CANCEL: number; - const NGHTTP2_COMPRESSION_ERROR: number; - const NGHTTP2_CONNECT_ERROR: number; - const NGHTTP2_ENHANCE_YOUR_CALM: number; - const NGHTTP2_INADEQUATE_SECURITY: number; - const NGHTTP2_HTTP_1_1_REQUIRED: number; - const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; - const NGHTTP2_FLAG_NONE: number; - const NGHTTP2_FLAG_END_STREAM: number; - const NGHTTP2_FLAG_END_HEADERS: number; - const NGHTTP2_FLAG_ACK: number; - const NGHTTP2_FLAG_PADDED: number; - const NGHTTP2_FLAG_PRIORITY: number; - const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; - const DEFAULT_SETTINGS_ENABLE_PUSH: number; - const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; - const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; - const MAX_MAX_FRAME_SIZE: number; - const MIN_MAX_FRAME_SIZE: number; - const MAX_INITIAL_WINDOW_SIZE: number; - const NGHTTP2_DEFAULT_WEIGHT: number; - const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; - const NGHTTP2_SETTINGS_ENABLE_PUSH: number; - const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; - const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; - const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; - const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; - const PADDING_STRATEGY_NONE: number; - const PADDING_STRATEGY_MAX: number; - const PADDING_STRATEGY_CALLBACK: number; - const HTTP2_HEADER_STATUS: string; - const HTTP2_HEADER_METHOD: string; - const HTTP2_HEADER_AUTHORITY: string; - const HTTP2_HEADER_SCHEME: string; - const HTTP2_HEADER_PATH: string; - const HTTP2_HEADER_ACCEPT_CHARSET: string; - const HTTP2_HEADER_ACCEPT_ENCODING: string; - const HTTP2_HEADER_ACCEPT_LANGUAGE: string; - const HTTP2_HEADER_ACCEPT_RANGES: string; - const HTTP2_HEADER_ACCEPT: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; - const HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS: string; - const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS: string; - const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD: string; - const HTTP2_HEADER_AGE: string; - const HTTP2_HEADER_ALLOW: string; - const HTTP2_HEADER_AUTHORIZATION: string; - const HTTP2_HEADER_CACHE_CONTROL: string; - const HTTP2_HEADER_CONNECTION: string; - const HTTP2_HEADER_CONTENT_DISPOSITION: string; - const HTTP2_HEADER_CONTENT_ENCODING: string; - const HTTP2_HEADER_CONTENT_LANGUAGE: string; - const HTTP2_HEADER_CONTENT_LENGTH: string; - const HTTP2_HEADER_CONTENT_LOCATION: string; - const HTTP2_HEADER_CONTENT_MD5: string; - const HTTP2_HEADER_CONTENT_RANGE: string; - const HTTP2_HEADER_CONTENT_TYPE: string; - const HTTP2_HEADER_COOKIE: string; - const HTTP2_HEADER_DATE: string; - const HTTP2_HEADER_ETAG: string; - const HTTP2_HEADER_EXPECT: string; - const HTTP2_HEADER_EXPIRES: string; - const HTTP2_HEADER_FROM: string; - const HTTP2_HEADER_HOST: string; - const HTTP2_HEADER_IF_MATCH: string; - const HTTP2_HEADER_IF_MODIFIED_SINCE: string; - const HTTP2_HEADER_IF_NONE_MATCH: string; - const HTTP2_HEADER_IF_RANGE: string; - const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; - const HTTP2_HEADER_LAST_MODIFIED: string; - const HTTP2_HEADER_LINK: string; - const HTTP2_HEADER_LOCATION: string; - const HTTP2_HEADER_MAX_FORWARDS: string; - const HTTP2_HEADER_PREFER: string; - const HTTP2_HEADER_PROXY_AUTHENTICATE: string; - const HTTP2_HEADER_PROXY_AUTHORIZATION: string; - const HTTP2_HEADER_RANGE: string; - const HTTP2_HEADER_REFERER: string; - const HTTP2_HEADER_REFRESH: string; - const HTTP2_HEADER_RETRY_AFTER: string; - const HTTP2_HEADER_SERVER: string; - const HTTP2_HEADER_SET_COOKIE: string; - const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; - const HTTP2_HEADER_TRANSFER_ENCODING: string; - const HTTP2_HEADER_TE: string; - const HTTP2_HEADER_UPGRADE: string; - const HTTP2_HEADER_USER_AGENT: string; - const HTTP2_HEADER_VARY: string; - const HTTP2_HEADER_VIA: string; - const HTTP2_HEADER_WWW_AUTHENTICATE: string; - const HTTP2_HEADER_HTTP2_SETTINGS: string; - const HTTP2_HEADER_KEEP_ALIVE: string; - const HTTP2_HEADER_PROXY_CONNECTION: string; - const HTTP2_METHOD_ACL: string; - const HTTP2_METHOD_BASELINE_CONTROL: string; - const HTTP2_METHOD_BIND: string; - const HTTP2_METHOD_CHECKIN: string; - const HTTP2_METHOD_CHECKOUT: string; - const HTTP2_METHOD_CONNECT: string; - const HTTP2_METHOD_COPY: string; - const HTTP2_METHOD_DELETE: string; - const HTTP2_METHOD_GET: string; - const HTTP2_METHOD_HEAD: string; - const HTTP2_METHOD_LABEL: string; - const HTTP2_METHOD_LINK: string; - const HTTP2_METHOD_LOCK: string; - const HTTP2_METHOD_MERGE: string; - const HTTP2_METHOD_MKACTIVITY: string; - const HTTP2_METHOD_MKCALENDAR: string; - const HTTP2_METHOD_MKCOL: string; - const HTTP2_METHOD_MKREDIRECTREF: string; - const HTTP2_METHOD_MKWORKSPACE: string; - const HTTP2_METHOD_MOVE: string; - const HTTP2_METHOD_OPTIONS: string; - const HTTP2_METHOD_ORDERPATCH: string; - const HTTP2_METHOD_PATCH: string; - const HTTP2_METHOD_POST: string; - const HTTP2_METHOD_PRI: string; - const HTTP2_METHOD_PROPFIND: string; - const HTTP2_METHOD_PROPPATCH: string; - const HTTP2_METHOD_PUT: string; - const HTTP2_METHOD_REBIND: string; - const HTTP2_METHOD_REPORT: string; - const HTTP2_METHOD_SEARCH: string; - const HTTP2_METHOD_TRACE: string; - const HTTP2_METHOD_UNBIND: string; - const HTTP2_METHOD_UNCHECKOUT: string; - const HTTP2_METHOD_UNLINK: string; - const HTTP2_METHOD_UNLOCK: string; - const HTTP2_METHOD_UPDATE: string; - const HTTP2_METHOD_UPDATEREDIRECTREF: string; - const HTTP2_METHOD_VERSION_CONTROL: string; - const HTTP_STATUS_CONTINUE: number; - const HTTP_STATUS_SWITCHING_PROTOCOLS: number; - const HTTP_STATUS_PROCESSING: number; - const HTTP_STATUS_OK: number; - const HTTP_STATUS_CREATED: number; - const HTTP_STATUS_ACCEPTED: number; - const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; - const HTTP_STATUS_NO_CONTENT: number; - const HTTP_STATUS_RESET_CONTENT: number; - const HTTP_STATUS_PARTIAL_CONTENT: number; - const HTTP_STATUS_MULTI_STATUS: number; - const HTTP_STATUS_ALREADY_REPORTED: number; - const HTTP_STATUS_IM_USED: number; - const HTTP_STATUS_MULTIPLE_CHOICES: number; - const HTTP_STATUS_MOVED_PERMANENTLY: number; - const HTTP_STATUS_FOUND: number; - const HTTP_STATUS_SEE_OTHER: number; - const HTTP_STATUS_NOT_MODIFIED: number; - const HTTP_STATUS_USE_PROXY: number; - const HTTP_STATUS_TEMPORARY_REDIRECT: number; - const HTTP_STATUS_PERMANENT_REDIRECT: number; - const HTTP_STATUS_BAD_REQUEST: number; - const HTTP_STATUS_UNAUTHORIZED: number; - const HTTP_STATUS_PAYMENT_REQUIRED: number; - const HTTP_STATUS_FORBIDDEN: number; - const HTTP_STATUS_NOT_FOUND: number; - const HTTP_STATUS_METHOD_NOT_ALLOWED: number; - const HTTP_STATUS_NOT_ACCEPTABLE: number; - const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; - const HTTP_STATUS_REQUEST_TIMEOUT: number; - const HTTP_STATUS_CONFLICT: number; - const HTTP_STATUS_GONE: number; - const HTTP_STATUS_LENGTH_REQUIRED: number; - const HTTP_STATUS_PRECONDITION_FAILED: number; - const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; - const HTTP_STATUS_URI_TOO_LONG: number; - const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; - const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; - const HTTP_STATUS_EXPECTATION_FAILED: number; - const HTTP_STATUS_TEAPOT: number; - const HTTP_STATUS_MISDIRECTED_REQUEST: number; - const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; - const HTTP_STATUS_LOCKED: number; - const HTTP_STATUS_FAILED_DEPENDENCY: number; - const HTTP_STATUS_UNORDERED_COLLECTION: number; - const HTTP_STATUS_UPGRADE_REQUIRED: number; - const HTTP_STATUS_PRECONDITION_REQUIRED: number; - const HTTP_STATUS_TOO_MANY_REQUESTS: number; - const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; - const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; - const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; - const HTTP_STATUS_NOT_IMPLEMENTED: number; - const HTTP_STATUS_BAD_GATEWAY: number; - const HTTP_STATUS_SERVICE_UNAVAILABLE: number; - const HTTP_STATUS_GATEWAY_TIMEOUT: number; - const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; - const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; - const HTTP_STATUS_INSUFFICIENT_STORAGE: number; - const HTTP_STATUS_LOOP_DETECTED: number; - const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; - const HTTP_STATUS_NOT_EXTENDED: number; - const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; - } - /** - * This symbol can be set as a property on the HTTP/2 headers object with - * an array value in order to provide a list of headers considered sensitive. - */ - export const sensitiveHeaders: symbol; - /** - * Returns an object containing the default settings for an `Http2Session` instance. This method returns a new object instance every time it is called - * so instances returned may be safely modified for use. - * @since v8.4.0 - */ - export function getDefaultSettings(): Settings; - /** - * Returns a `Buffer` instance containing serialized representation of the given - * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended - * for use with the `HTTP2-Settings` header field. - * - * ```js - * import http2 from 'node:http2'; - * - * const packed = http2.getPackedSettings({ enablePush: false }); - * - * console.log(packed.toString('base64')); - * // Prints: AAIAAAAA - * ``` - * @since v8.4.0 - */ - export function getPackedSettings(settings: Settings): Buffer; - /** - * Returns a `HTTP/2 Settings Object` containing the deserialized settings from - * the given `Buffer` as generated by `http2.getPackedSettings()`. - * @since v8.4.0 - * @param buf The packed settings. - */ - export function getUnpackedSettings(buf: Uint8Array): Settings; - /** - * Returns a `net.Server` instance that creates and manages `Http2Session` instances. - * - * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when - * communicating - * with browser clients. - * - * ```js - * import http2 from 'node:http2'; - * - * // Create an unencrypted HTTP/2 server. - * // Since there are no browsers known that support - * // unencrypted HTTP/2, the use of `http2.createSecureServer()` - * // is necessary when communicating with browser clients. - * const server = http2.createServer(); - * - * server.on('stream', (stream, headers) => { - * stream.respond({ - * 'content-type': 'text/html; charset=utf-8', - * ':status': 200, - * }); - * stream.end('

    Hello World

    '); - * }); - * - * server.listen(8000); - * ``` - * @since v8.4.0 - * @param onRequestHandler See `Compatibility API` - */ - export function createServer( - onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, - ): Http2Server; - export function createServer< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - >( - options: ServerOptions, - onRequestHandler?: (request: InstanceType, response: InstanceType) => void, - ): Http2Server; - /** - * Returns a `tls.Server` instance that creates and manages `Http2Session` instances. - * - * ```js - * import http2 from 'node:http2'; - * import fs from 'node:fs'; - * - * const options = { - * key: fs.readFileSync('server-key.pem'), - * cert: fs.readFileSync('server-cert.pem'), - * }; - * - * // Create a secure HTTP/2 server - * const server = http2.createSecureServer(options); - * - * server.on('stream', (stream, headers) => { - * stream.respond({ - * 'content-type': 'text/html; charset=utf-8', - * ':status': 200, - * }); - * stream.end('

    Hello World

    '); - * }); - * - * server.listen(8443); - * ``` - * @since v8.4.0 - * @param onRequestHandler See `Compatibility API` - */ - export function createSecureServer( - onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, - ): Http2SecureServer; - export function createSecureServer< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - >( - options: SecureServerOptions, - onRequestHandler?: (request: InstanceType, response: InstanceType) => void, - ): Http2SecureServer; - /** - * Returns a `ClientHttp2Session` instance. - * - * ```js - * import http2 from 'node:http2'; - * const client = http2.connect('https://localhost:1234'); - * - * // Use the client - * - * client.close(); - * ``` - * @since v8.4.0 - * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port - * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored. - * @param listener Will be registered as a one-time listener of the {@link 'connect'} event. - */ - export function connect( - authority: string | url.URL, - listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): ClientHttp2Session; - export function connect( - authority: string | url.URL, - options?: ClientSessionOptions | SecureClientSessionOptions, - listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): ClientHttp2Session; - /** - * Create an HTTP/2 server session from an existing socket. - * @param socket A Duplex Stream - * @param options Any `{@link createServer}` options can be provided. - * @since v20.12.0 - */ - export function performServerHandshake< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - >( - socket: stream.Duplex, - options?: ServerOptions, - ): ServerHttp2Session; -} -declare module "node:http2" { - export * from "http2"; -} diff --git a/web/static/node_modules/@types/node/https.d.ts b/web/static/node_modules/@types/node/https.d.ts deleted file mode 100644 index 7112b8d4..00000000 --- a/web/static/node_modules/@types/node/https.d.ts +++ /dev/null @@ -1,544 +0,0 @@ -/** - * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a - * separate module. - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/https.js) - */ -declare module "https" { - import { Duplex } from "node:stream"; - import * as tls from "node:tls"; - import * as http from "node:http"; - import { URL } from "node:url"; - type ServerOptions< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions; - type RequestOptions = - & http.RequestOptions - & tls.SecureContextOptions - & { - checkServerIdentity?: typeof tls.checkServerIdentity | undefined; - rejectUnauthorized?: boolean | undefined; // Defaults to true - servername?: string | undefined; // SNI TLS Extension - }; - interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { - rejectUnauthorized?: boolean | undefined; - maxCachedSessions?: number | undefined; - } - /** - * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information. - * @since v0.4.5 - */ - class Agent extends http.Agent { - constructor(options?: AgentOptions); - options: AgentOptions; - } - interface Server< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends http.Server {} - /** - * See `http.Server` for more information. - * @since v0.3.4 - */ - class Server< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends tls.Server { - constructor(requestListener?: http.RequestListener); - constructor( - options: ServerOptions, - requestListener?: http.RequestListener, - ); - /** - * Closes all connections connected to this server. - * @since v18.2.0 - */ - closeAllConnections(): void; - /** - * Closes all connections connected to this server which are not sending a request or waiting for a response. - * @since v18.2.0 - */ - closeIdleConnections(): void; - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; - addListener( - event: "newSession", - listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, - ): this; - addListener( - event: "OCSPRequest", - listener: ( - certificate: Buffer, - issuer: Buffer, - callback: (err: Error | null, resp: Buffer) => void, - ) => void, - ): this; - addListener( - event: "resumeSession", - listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, - ): this; - addListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; - addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connection", listener: (socket: Duplex) => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "checkContinue", listener: http.RequestListener): this; - addListener(event: "checkExpectation", listener: http.RequestListener): this; - addListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; - addListener( - event: "connect", - listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, - ): this; - addListener(event: "request", listener: http.RequestListener): this; - addListener( - event: "upgrade", - listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, - ): this; - emit(event: string, ...args: any[]): boolean; - emit(event: "keylog", line: Buffer, tlsSocket: tls.TLSSocket): boolean; - emit( - event: "newSession", - sessionId: Buffer, - sessionData: Buffer, - callback: (err: Error, resp: Buffer) => void, - ): boolean; - emit( - event: "OCSPRequest", - certificate: Buffer, - issuer: Buffer, - callback: (err: Error | null, resp: Buffer) => void, - ): boolean; - emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean; - emit(event: "secureConnection", tlsSocket: tls.TLSSocket): boolean; - emit(event: "tlsClientError", err: Error, tlsSocket: tls.TLSSocket): boolean; - emit(event: "close"): boolean; - emit(event: "connection", socket: Duplex): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit( - event: "checkContinue", - req: InstanceType, - res: InstanceType, - ): boolean; - emit( - event: "checkExpectation", - req: InstanceType, - res: InstanceType, - ): boolean; - emit(event: "clientError", err: Error, socket: Duplex): boolean; - emit(event: "connect", req: InstanceType, socket: Duplex, head: Buffer): boolean; - emit( - event: "request", - req: InstanceType, - res: InstanceType, - ): boolean; - emit(event: "upgrade", req: InstanceType, socket: Duplex, head: Buffer): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; - on( - event: "newSession", - listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, - ): this; - on( - event: "OCSPRequest", - listener: ( - certificate: Buffer, - issuer: Buffer, - callback: (err: Error | null, resp: Buffer) => void, - ) => void, - ): this; - on( - event: "resumeSession", - listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, - ): this; - on(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; - on(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; - on(event: "close", listener: () => void): this; - on(event: "connection", listener: (socket: Duplex) => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "checkContinue", listener: http.RequestListener): this; - on(event: "checkExpectation", listener: http.RequestListener): this; - on(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; - on(event: "connect", listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; - on(event: "request", listener: http.RequestListener): this; - on(event: "upgrade", listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; - once( - event: "newSession", - listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, - ): this; - once( - event: "OCSPRequest", - listener: ( - certificate: Buffer, - issuer: Buffer, - callback: (err: Error | null, resp: Buffer) => void, - ) => void, - ): this; - once( - event: "resumeSession", - listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, - ): this; - once(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; - once(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; - once(event: "close", listener: () => void): this; - once(event: "connection", listener: (socket: Duplex) => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "checkContinue", listener: http.RequestListener): this; - once(event: "checkExpectation", listener: http.RequestListener): this; - once(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; - once(event: "connect", listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; - once(event: "request", listener: http.RequestListener): this; - once(event: "upgrade", listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; - prependListener( - event: "newSession", - listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, - ): this; - prependListener( - event: "OCSPRequest", - listener: ( - certificate: Buffer, - issuer: Buffer, - callback: (err: Error | null, resp: Buffer) => void, - ) => void, - ): this; - prependListener( - event: "resumeSession", - listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, - ): this; - prependListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; - prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connection", listener: (socket: Duplex) => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "checkContinue", listener: http.RequestListener): this; - prependListener(event: "checkExpectation", listener: http.RequestListener): this; - prependListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; - prependListener( - event: "connect", - listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, - ): this; - prependListener(event: "request", listener: http.RequestListener): this; - prependListener( - event: "upgrade", - listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, - ): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; - prependOnceListener( - event: "newSession", - listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, - ): this; - prependOnceListener( - event: "OCSPRequest", - listener: ( - certificate: Buffer, - issuer: Buffer, - callback: (err: Error | null, resp: Buffer) => void, - ) => void, - ): this; - prependOnceListener( - event: "resumeSession", - listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, - ): this; - prependOnceListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; - prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connection", listener: (socket: Duplex) => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "checkContinue", listener: http.RequestListener): this; - prependOnceListener(event: "checkExpectation", listener: http.RequestListener): this; - prependOnceListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; - prependOnceListener( - event: "connect", - listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, - ): this; - prependOnceListener(event: "request", listener: http.RequestListener): this; - prependOnceListener( - event: "upgrade", - listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, - ): this; - } - /** - * ```js - * // curl -k https://localhost:8000/ - * import https from 'node:https'; - * import fs from 'node:fs'; - * - * const options = { - * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), - * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), - * }; - * - * https.createServer(options, (req, res) => { - * res.writeHead(200); - * res.end('hello world\n'); - * }).listen(8000); - * ``` - * - * Or - * - * ```js - * import https from 'node:https'; - * import fs from 'node:fs'; - * - * const options = { - * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'), - * passphrase: 'sample', - * }; - * - * https.createServer(options, (req, res) => { - * res.writeHead(200); - * res.end('hello world\n'); - * }).listen(8000); - * ``` - * @since v0.3.4 - * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`. - * @param requestListener A listener to be added to the `'request'` event. - */ - function createServer< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - >(requestListener?: http.RequestListener): Server; - function createServer< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - >( - options: ServerOptions, - requestListener?: http.RequestListener, - ): Server; - /** - * Makes a request to a secure web server. - * - * The following additional `options` from `tls.connect()` are also accepted: `ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`, `honorCipherOrder`, `key`, `passphrase`, - * `pfx`, `rejectUnauthorized`, `secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`, `highWaterMark`. - * - * `options` can be an object, a string, or a `URL` object. If `options` is a - * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. - * - * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to - * upload a file with a POST request, then write to the `ClientRequest` object. - * - * ```js - * import https from 'node:https'; - * - * const options = { - * hostname: 'encrypted.google.com', - * port: 443, - * path: '/', - * method: 'GET', - * }; - * - * const req = https.request(options, (res) => { - * console.log('statusCode:', res.statusCode); - * console.log('headers:', res.headers); - * - * res.on('data', (d) => { - * process.stdout.write(d); - * }); - * }); - * - * req.on('error', (e) => { - * console.error(e); - * }); - * req.end(); - * ``` - * - * Example using options from `tls.connect()`: - * - * ```js - * const options = { - * hostname: 'encrypted.google.com', - * port: 443, - * path: '/', - * method: 'GET', - * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), - * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), - * }; - * options.agent = new https.Agent(options); - * - * const req = https.request(options, (res) => { - * // ... - * }); - * ``` - * - * Alternatively, opt out of connection pooling by not using an `Agent`. - * - * ```js - * const options = { - * hostname: 'encrypted.google.com', - * port: 443, - * path: '/', - * method: 'GET', - * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), - * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), - * agent: false, - * }; - * - * const req = https.request(options, (res) => { - * // ... - * }); - * ``` - * - * Example using a `URL` as `options`: - * - * ```js - * const options = new URL('https://abc:xyz@example.com'); - * - * const req = https.request(options, (res) => { - * // ... - * }); - * ``` - * - * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`): - * - * ```js - * import tls from 'node:tls'; - * import https from 'node:https'; - * import crypto from 'node:crypto'; - * - * function sha256(s) { - * return crypto.createHash('sha256').update(s).digest('base64'); - * } - * const options = { - * hostname: 'github.com', - * port: 443, - * path: '/', - * method: 'GET', - * checkServerIdentity: function(host, cert) { - * // Make sure the certificate is issued to the host we are connected to - * const err = tls.checkServerIdentity(host, cert); - * if (err) { - * return err; - * } - * - * // Pin the public key, similar to HPKP pin-sha256 pinning - * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU='; - * if (sha256(cert.pubkey) !== pubkey256) { - * const msg = 'Certificate verification error: ' + - * `The public key of '${cert.subject.CN}' ` + - * 'does not match our pinned fingerprint'; - * return new Error(msg); - * } - * - * // Pin the exact certificate, rather than the pub key - * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' + - * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16'; - * if (cert.fingerprint256 !== cert256) { - * const msg = 'Certificate verification error: ' + - * `The certificate of '${cert.subject.CN}' ` + - * 'does not match our pinned fingerprint'; - * return new Error(msg); - * } - * - * // This loop is informational only. - * // Print the certificate and public key fingerprints of all certs in the - * // chain. Its common to pin the public key of the issuer on the public - * // internet, while pinning the public key of the service in sensitive - * // environments. - * do { - * console.log('Subject Common Name:', cert.subject.CN); - * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256); - * - * hash = crypto.createHash('sha256'); - * console.log(' Public key ping-sha256:', sha256(cert.pubkey)); - * - * lastprint256 = cert.fingerprint256; - * cert = cert.issuerCertificate; - * } while (cert.fingerprint256 !== lastprint256); - * - * }, - * }; - * - * options.agent = new https.Agent(options); - * const req = https.request(options, (res) => { - * console.log('All OK. Server matched our pinned cert or public key'); - * console.log('statusCode:', res.statusCode); - * // Print the HPKP values - * console.log('headers:', res.headers['public-key-pins']); - * - * res.on('data', (d) => {}); - * }); - * - * req.on('error', (e) => { - * console.error(e.message); - * }); - * req.end(); - * ``` - * - * Outputs for example: - * - * ```text - * Subject Common Name: github.com - * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16 - * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU= - * Subject Common Name: DigiCert SHA2 Extended Validation Server CA - * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A - * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho= - * Subject Common Name: DigiCert High Assurance EV Root CA - * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF - * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18= - * All OK. Server matched our pinned cert or public key - * statusCode: 200 - * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; - * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; - * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains - * ``` - * @since v0.3.6 - * @param options Accepts all `options` from `request`, with some differences in default values: - */ - function request( - options: RequestOptions | string | URL, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - function request( - url: string | URL, - options: RequestOptions, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - /** - * Like `http.get()` but for HTTPS. - * - * `options` can be an object, a string, or a `URL` object. If `options` is a - * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. - * - * ```js - * import https from 'node:https'; - * - * https.get('https://encrypted.google.com/', (res) => { - * console.log('statusCode:', res.statusCode); - * console.log('headers:', res.headers); - * - * res.on('data', (d) => { - * process.stdout.write(d); - * }); - * - * }).on('error', (e) => { - * console.error(e); - * }); - * ``` - * @since v0.3.6 - * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. - */ - function get( - options: RequestOptions | string | URL, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - function get( - url: string | URL, - options: RequestOptions, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - let globalAgent: Agent; -} -declare module "node:https" { - export * from "https"; -} diff --git a/web/static/node_modules/@types/node/index.d.ts b/web/static/node_modules/@types/node/index.d.ts deleted file mode 100644 index e99dc838..00000000 --- a/web/static/node_modules/@types/node/index.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -// NOTE: These definitions support Node.js and TypeScript 5.7+. - -// Reference required TypeScript libs: -/// - -// TypeScript backwards-compatibility definitions: -/// - -// Definitions specific to TypeScript 5.7+: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/web/static/node_modules/@types/node/inspector.d.ts b/web/static/node_modules/@types/node/inspector.d.ts deleted file mode 100644 index 32d9ba4a..00000000 --- a/web/static/node_modules/@types/node/inspector.d.ts +++ /dev/null @@ -1,3966 +0,0 @@ -// These definitions are automatically generated by the generate-inspector script. -// Do not edit this file directly. -// See scripts/generate-inspector/README.md for information on how to update the protocol definitions. -// Changes to the module itself should be added to the generator template (scripts/generate-inspector/inspector.d.ts.template). - -/** - * The `node:inspector` module provides an API for interacting with the V8 - * inspector. - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/inspector.js) - */ -declare module 'inspector' { - import EventEmitter = require('node:events'); - - interface InspectorNotification { - method: string; - params: T; - } - - namespace Schema { - /** - * Description of the protocol domain. - */ - interface Domain { - /** - * Domain name. - */ - name: string; - /** - * Domain version. - */ - version: string; - } - interface GetDomainsReturnType { - /** - * List of supported domains. - */ - domains: Domain[]; - } - } - namespace Runtime { - /** - * Unique script identifier. - */ - type ScriptId = string; - /** - * Unique object identifier. - */ - type RemoteObjectId = string; - /** - * Primitive value which cannot be JSON-stringified. - */ - type UnserializableValue = string; - /** - * Mirror object referencing original JavaScript object. - */ - interface RemoteObject { - /** - * Object type. - */ - type: string; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string | undefined; - /** - * Object class (constructor) name. Specified for object type values only. - */ - className?: string | undefined; - /** - * Remote object value in case of primitive values or JSON values (if it was requested). - */ - value?: any; - /** - * Primitive value which can not be JSON-stringified does not have value, but gets this property. - */ - unserializableValue?: UnserializableValue | undefined; - /** - * String representation of the object. - */ - description?: string | undefined; - /** - * Unique object identifier (for non-primitive values). - */ - objectId?: RemoteObjectId | undefined; - /** - * Preview containing abbreviated property values. Specified for object type values only. - * @experimental - */ - preview?: ObjectPreview | undefined; - /** - * @experimental - */ - customPreview?: CustomPreview | undefined; - } - /** - * @experimental - */ - interface CustomPreview { - header: string; - hasBody: boolean; - formatterObjectId: RemoteObjectId; - bindRemoteObjectFunctionId: RemoteObjectId; - configObjectId?: RemoteObjectId | undefined; - } - /** - * Object containing abbreviated remote object value. - * @experimental - */ - interface ObjectPreview { - /** - * Object type. - */ - type: string; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string | undefined; - /** - * String representation of the object. - */ - description?: string | undefined; - /** - * True iff some of the properties or entries of the original object did not fit. - */ - overflow: boolean; - /** - * List of the properties. - */ - properties: PropertyPreview[]; - /** - * List of the entries. Specified for map and set subtype values only. - */ - entries?: EntryPreview[] | undefined; - } - /** - * @experimental - */ - interface PropertyPreview { - /** - * Property name. - */ - name: string; - /** - * Object type. Accessor means that the property itself is an accessor property. - */ - type: string; - /** - * User-friendly property value string. - */ - value?: string | undefined; - /** - * Nested value preview. - */ - valuePreview?: ObjectPreview | undefined; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string | undefined; - } - /** - * @experimental - */ - interface EntryPreview { - /** - * Preview of the key. Specified for map-like collection entries. - */ - key?: ObjectPreview | undefined; - /** - * Preview of the value. - */ - value: ObjectPreview; - } - /** - * Object property descriptor. - */ - interface PropertyDescriptor { - /** - * Property name or symbol description. - */ - name: string; - /** - * The value associated with the property. - */ - value?: RemoteObject | undefined; - /** - * True if the value associated with the property may be changed (data descriptors only). - */ - writable?: boolean | undefined; - /** - * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). - */ - get?: RemoteObject | undefined; - /** - * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). - */ - set?: RemoteObject | undefined; - /** - * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. - */ - configurable: boolean; - /** - * True if this property shows up during enumeration of the properties on the corresponding object. - */ - enumerable: boolean; - /** - * True if the result was thrown during the evaluation. - */ - wasThrown?: boolean | undefined; - /** - * True if the property is owned for the object. - */ - isOwn?: boolean | undefined; - /** - * Property symbol object, if the property is of the symbol type. - */ - symbol?: RemoteObject | undefined; - } - /** - * Object internal property descriptor. This property isn't normally visible in JavaScript code. - */ - interface InternalPropertyDescriptor { - /** - * Conventional property name. - */ - name: string; - /** - * The value associated with the property. - */ - value?: RemoteObject | undefined; - } - /** - * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. - */ - interface CallArgument { - /** - * Primitive value or serializable javascript object. - */ - value?: any; - /** - * Primitive value which can not be JSON-stringified. - */ - unserializableValue?: UnserializableValue | undefined; - /** - * Remote object handle. - */ - objectId?: RemoteObjectId | undefined; - } - /** - * Id of an execution context. - */ - type ExecutionContextId = number; - /** - * Description of an isolated world. - */ - interface ExecutionContextDescription { - /** - * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. - */ - id: ExecutionContextId; - /** - * Execution context origin. - */ - origin: string; - /** - * Human readable name describing given context. - */ - name: string; - /** - * Embedder-specific auxiliary data. - */ - auxData?: {} | undefined; - } - /** - * Detailed information about exception (or error) that was thrown during script compilation or execution. - */ - interface ExceptionDetails { - /** - * Exception id. - */ - exceptionId: number; - /** - * Exception text, which should be used together with exception object when available. - */ - text: string; - /** - * Line number of the exception location (0-based). - */ - lineNumber: number; - /** - * Column number of the exception location (0-based). - */ - columnNumber: number; - /** - * Script ID of the exception location. - */ - scriptId?: ScriptId | undefined; - /** - * URL of the exception location, to be used when the script was not reported. - */ - url?: string | undefined; - /** - * JavaScript stack trace if available. - */ - stackTrace?: StackTrace | undefined; - /** - * Exception object if available. - */ - exception?: RemoteObject | undefined; - /** - * Identifier of the context where exception happened. - */ - executionContextId?: ExecutionContextId | undefined; - } - /** - * Number of milliseconds since epoch. - */ - type Timestamp = number; - /** - * Stack entry for runtime errors and assertions. - */ - interface CallFrame { - /** - * JavaScript function name. - */ - functionName: string; - /** - * JavaScript script id. - */ - scriptId: ScriptId; - /** - * JavaScript script name or url. - */ - url: string; - /** - * JavaScript script line number (0-based). - */ - lineNumber: number; - /** - * JavaScript script column number (0-based). - */ - columnNumber: number; - } - /** - * Call frames for assertions or error messages. - */ - interface StackTrace { - /** - * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. - */ - description?: string | undefined; - /** - * JavaScript function name. - */ - callFrames: CallFrame[]; - /** - * Asynchronous JavaScript stack trace that preceded this stack, if available. - */ - parent?: StackTrace | undefined; - /** - * Asynchronous JavaScript stack trace that preceded this stack, if available. - * @experimental - */ - parentId?: StackTraceId | undefined; - } - /** - * Unique identifier of current debugger. - * @experimental - */ - type UniqueDebuggerId = string; - /** - * If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages. - * @experimental - */ - interface StackTraceId { - id: string; - debuggerId?: UniqueDebuggerId | undefined; - } - interface EvaluateParameterType { - /** - * Expression to evaluate. - */ - expression: string; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string | undefined; - /** - * Determines whether Command Line API should be available during the evaluation. - */ - includeCommandLineAPI?: boolean | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. - */ - contextId?: ExecutionContextId | undefined; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean | undefined; - /** - * Whether execution should be treated as initiated by user in the UI. - */ - userGesture?: boolean | undefined; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean | undefined; - } - interface AwaitPromiseParameterType { - /** - * Identifier of the promise. - */ - promiseObjectId: RemoteObjectId; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean | undefined; - } - interface CallFunctionOnParameterType { - /** - * Declaration of the function to call. - */ - functionDeclaration: string; - /** - * Identifier of the object to call function on. Either objectId or executionContextId should be specified. - */ - objectId?: RemoteObjectId | undefined; - /** - * Call arguments. All call arguments must belong to the same JavaScript world as the target object. - */ - arguments?: CallArgument[] | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Whether the result is expected to be a JSON object which should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean | undefined; - /** - * Whether execution should be treated as initiated by user in the UI. - */ - userGesture?: boolean | undefined; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean | undefined; - /** - * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. - */ - executionContextId?: ExecutionContextId | undefined; - /** - * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. - */ - objectGroup?: string | undefined; - } - interface GetPropertiesParameterType { - /** - * Identifier of the object to return properties for. - */ - objectId: RemoteObjectId; - /** - * If true, returns properties belonging only to the element itself, not to its prototype chain. - */ - ownProperties?: boolean | undefined; - /** - * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. - * @experimental - */ - accessorPropertiesOnly?: boolean | undefined; - /** - * Whether preview should be generated for the results. - * @experimental - */ - generatePreview?: boolean | undefined; - } - interface ReleaseObjectParameterType { - /** - * Identifier of the object to release. - */ - objectId: RemoteObjectId; - } - interface ReleaseObjectGroupParameterType { - /** - * Symbolic object group name. - */ - objectGroup: string; - } - interface SetCustomObjectFormatterEnabledParameterType { - enabled: boolean; - } - interface CompileScriptParameterType { - /** - * Expression to compile. - */ - expression: string; - /** - * Source url to be set for the script. - */ - sourceURL: string; - /** - * Specifies whether the compiled script should be persisted. - */ - persistScript: boolean; - /** - * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. - */ - executionContextId?: ExecutionContextId | undefined; - } - interface RunScriptParameterType { - /** - * Id of the script to run. - */ - scriptId: ScriptId; - /** - * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. - */ - executionContextId?: ExecutionContextId | undefined; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Determines whether Command Line API should be available during the evaluation. - */ - includeCommandLineAPI?: boolean | undefined; - /** - * Whether the result is expected to be a JSON object which should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean | undefined; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean | undefined; - } - interface QueryObjectsParameterType { - /** - * Identifier of the prototype to return objects for. - */ - prototypeObjectId: RemoteObjectId; - } - interface GlobalLexicalScopeNamesParameterType { - /** - * Specifies in which execution context to lookup global scope variables. - */ - executionContextId?: ExecutionContextId | undefined; - } - interface EvaluateReturnType { - /** - * Evaluation result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface AwaitPromiseReturnType { - /** - * Promise result. Will contain rejected value if promise was rejected. - */ - result: RemoteObject; - /** - * Exception details if stack strace is available. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface CallFunctionOnReturnType { - /** - * Call result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface GetPropertiesReturnType { - /** - * Object properties. - */ - result: PropertyDescriptor[]; - /** - * Internal object properties (only of the element itself). - */ - internalProperties?: InternalPropertyDescriptor[] | undefined; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface CompileScriptReturnType { - /** - * Id of the script. - */ - scriptId?: ScriptId | undefined; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface RunScriptReturnType { - /** - * Run result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface QueryObjectsReturnType { - /** - * Array with objects. - */ - objects: RemoteObject; - } - interface GlobalLexicalScopeNamesReturnType { - names: string[]; - } - interface ExecutionContextCreatedEventDataType { - /** - * A newly created execution context. - */ - context: ExecutionContextDescription; - } - interface ExecutionContextDestroyedEventDataType { - /** - * Id of the destroyed context - */ - executionContextId: ExecutionContextId; - } - interface ExceptionThrownEventDataType { - /** - * Timestamp of the exception. - */ - timestamp: Timestamp; - exceptionDetails: ExceptionDetails; - } - interface ExceptionRevokedEventDataType { - /** - * Reason describing why exception was revoked. - */ - reason: string; - /** - * The id of revoked exception, as reported in exceptionThrown. - */ - exceptionId: number; - } - interface ConsoleAPICalledEventDataType { - /** - * Type of the call. - */ - type: string; - /** - * Call arguments. - */ - args: RemoteObject[]; - /** - * Identifier of the context where the call was made. - */ - executionContextId: ExecutionContextId; - /** - * Call timestamp. - */ - timestamp: Timestamp; - /** - * Stack trace captured when the call was made. - */ - stackTrace?: StackTrace | undefined; - /** - * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. - * @experimental - */ - context?: string | undefined; - } - interface InspectRequestedEventDataType { - object: RemoteObject; - hints: {}; - } - } - namespace Debugger { - /** - * Breakpoint identifier. - */ - type BreakpointId = string; - /** - * Call frame identifier. - */ - type CallFrameId = string; - /** - * Location in the source code. - */ - interface Location { - /** - * Script identifier as reported in the Debugger.scriptParsed. - */ - scriptId: Runtime.ScriptId; - /** - * Line number in the script (0-based). - */ - lineNumber: number; - /** - * Column number in the script (0-based). - */ - columnNumber?: number | undefined; - } - /** - * Location in the source code. - * @experimental - */ - interface ScriptPosition { - lineNumber: number; - columnNumber: number; - } - /** - * JavaScript call frame. Array of call frames form the call stack. - */ - interface CallFrame { - /** - * Call frame identifier. This identifier is only valid while the virtual machine is paused. - */ - callFrameId: CallFrameId; - /** - * Name of the JavaScript function called on this call frame. - */ - functionName: string; - /** - * Location in the source code. - */ - functionLocation?: Location | undefined; - /** - * Location in the source code. - */ - location: Location; - /** - * JavaScript script name or url. - */ - url: string; - /** - * Scope chain for this call frame. - */ - scopeChain: Scope[]; - /** - * this object for this call frame. - */ - this: Runtime.RemoteObject; - /** - * The value being returned, if the function is at return point. - */ - returnValue?: Runtime.RemoteObject | undefined; - } - /** - * Scope description. - */ - interface Scope { - /** - * Scope type. - */ - type: string; - /** - * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. - */ - object: Runtime.RemoteObject; - name?: string | undefined; - /** - * Location in the source code where scope starts - */ - startLocation?: Location | undefined; - /** - * Location in the source code where scope ends - */ - endLocation?: Location | undefined; - } - /** - * Search match for resource. - */ - interface SearchMatch { - /** - * Line number in resource content. - */ - lineNumber: number; - /** - * Line with match content. - */ - lineContent: string; - } - interface BreakLocation { - /** - * Script identifier as reported in the Debugger.scriptParsed. - */ - scriptId: Runtime.ScriptId; - /** - * Line number in the script (0-based). - */ - lineNumber: number; - /** - * Column number in the script (0-based). - */ - columnNumber?: number | undefined; - type?: string | undefined; - } - interface SetBreakpointsActiveParameterType { - /** - * New value for breakpoints active state. - */ - active: boolean; - } - interface SetSkipAllPausesParameterType { - /** - * New value for skip pauses state. - */ - skip: boolean; - } - interface SetBreakpointByUrlParameterType { - /** - * Line number to set breakpoint at. - */ - lineNumber: number; - /** - * URL of the resources to set breakpoint on. - */ - url?: string | undefined; - /** - * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. - */ - urlRegex?: string | undefined; - /** - * Script hash of the resources to set breakpoint on. - */ - scriptHash?: string | undefined; - /** - * Offset in the line to set breakpoint at. - */ - columnNumber?: number | undefined; - /** - * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. - */ - condition?: string | undefined; - } - interface SetBreakpointParameterType { - /** - * Location to set breakpoint in. - */ - location: Location; - /** - * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. - */ - condition?: string | undefined; - } - interface RemoveBreakpointParameterType { - breakpointId: BreakpointId; - } - interface GetPossibleBreakpointsParameterType { - /** - * Start of range to search possible breakpoint locations in. - */ - start: Location; - /** - * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. - */ - end?: Location | undefined; - /** - * Only consider locations which are in the same (non-nested) function as start. - */ - restrictToFunction?: boolean | undefined; - } - interface ContinueToLocationParameterType { - /** - * Location to continue to. - */ - location: Location; - targetCallFrames?: string | undefined; - } - interface PauseOnAsyncCallParameterType { - /** - * Debugger will pause when async call with given stack trace is started. - */ - parentStackTraceId: Runtime.StackTraceId; - } - interface StepIntoParameterType { - /** - * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. - * @experimental - */ - breakOnAsyncCall?: boolean | undefined; - } - interface GetStackTraceParameterType { - stackTraceId: Runtime.StackTraceId; - } - interface SearchInContentParameterType { - /** - * Id of the script to search in. - */ - scriptId: Runtime.ScriptId; - /** - * String to search for. - */ - query: string; - /** - * If true, search is case sensitive. - */ - caseSensitive?: boolean | undefined; - /** - * If true, treats string parameter as regex. - */ - isRegex?: boolean | undefined; - } - interface SetScriptSourceParameterType { - /** - * Id of the script to edit. - */ - scriptId: Runtime.ScriptId; - /** - * New content of the script. - */ - scriptSource: string; - /** - * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. - */ - dryRun?: boolean | undefined; - } - interface RestartFrameParameterType { - /** - * Call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - } - interface GetScriptSourceParameterType { - /** - * Id of the script to get source for. - */ - scriptId: Runtime.ScriptId; - } - interface SetPauseOnExceptionsParameterType { - /** - * Pause on exceptions mode. - */ - state: string; - } - interface EvaluateOnCallFrameParameterType { - /** - * Call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - /** - * Expression to evaluate. - */ - expression: string; - /** - * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). - */ - objectGroup?: string | undefined; - /** - * Specifies whether command line API should be available to the evaluated expression, defaults to false. - */ - includeCommandLineAPI?: boolean | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean | undefined; - /** - * Whether to throw an exception if side effect cannot be ruled out during evaluation. - */ - throwOnSideEffect?: boolean | undefined; - } - interface SetVariableValueParameterType { - /** - * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. - */ - scopeNumber: number; - /** - * Variable name. - */ - variableName: string; - /** - * New variable value. - */ - newValue: Runtime.CallArgument; - /** - * Id of callframe that holds variable. - */ - callFrameId: CallFrameId; - } - interface SetReturnValueParameterType { - /** - * New return value. - */ - newValue: Runtime.CallArgument; - } - interface SetAsyncCallStackDepthParameterType { - /** - * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). - */ - maxDepth: number; - } - interface SetBlackboxPatternsParameterType { - /** - * Array of regexps that will be used to check script url for blackbox state. - */ - patterns: string[]; - } - interface SetBlackboxedRangesParameterType { - /** - * Id of the script. - */ - scriptId: Runtime.ScriptId; - positions: ScriptPosition[]; - } - interface EnableReturnType { - /** - * Unique identifier of the debugger. - * @experimental - */ - debuggerId: Runtime.UniqueDebuggerId; - } - interface SetBreakpointByUrlReturnType { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * List of the locations this breakpoint resolved into upon addition. - */ - locations: Location[]; - } - interface SetBreakpointReturnType { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * Location this breakpoint resolved into. - */ - actualLocation: Location; - } - interface GetPossibleBreakpointsReturnType { - /** - * List of the possible breakpoint locations. - */ - locations: BreakLocation[]; - } - interface GetStackTraceReturnType { - stackTrace: Runtime.StackTrace; - } - interface SearchInContentReturnType { - /** - * List of search matches. - */ - result: SearchMatch[]; - } - interface SetScriptSourceReturnType { - /** - * New stack trace in case editing has happened while VM was stopped. - */ - callFrames?: CallFrame[] | undefined; - /** - * Whether current call stack was modified after applying the changes. - */ - stackChanged?: boolean | undefined; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace | undefined; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId | undefined; - /** - * Exception details if any. - */ - exceptionDetails?: Runtime.ExceptionDetails | undefined; - } - interface RestartFrameReturnType { - /** - * New stack trace. - */ - callFrames: CallFrame[]; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace | undefined; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId | undefined; - } - interface GetScriptSourceReturnType { - /** - * Script source. - */ - scriptSource: string; - } - interface EvaluateOnCallFrameReturnType { - /** - * Object wrapper for the evaluation result. - */ - result: Runtime.RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: Runtime.ExceptionDetails | undefined; - } - interface ScriptParsedEventDataType { - /** - * Identifier of the script parsed. - */ - scriptId: Runtime.ScriptId; - /** - * URL or name of the script parsed (if any). - */ - url: string; - /** - * Line offset of the script within the resource with given URL (for script tags). - */ - startLine: number; - /** - * Column offset of the script within the resource with given URL. - */ - startColumn: number; - /** - * Last line of the script. - */ - endLine: number; - /** - * Length of the last line of the script. - */ - endColumn: number; - /** - * Specifies script creation context. - */ - executionContextId: Runtime.ExecutionContextId; - /** - * Content hash of the script. - */ - hash: string; - /** - * Embedder-specific auxiliary data. - */ - executionContextAuxData?: {} | undefined; - /** - * True, if this script is generated as a result of the live edit operation. - * @experimental - */ - isLiveEdit?: boolean | undefined; - /** - * URL of source map associated with script (if any). - */ - sourceMapURL?: string | undefined; - /** - * True, if this script has sourceURL. - */ - hasSourceURL?: boolean | undefined; - /** - * True, if this script is ES6 module. - */ - isModule?: boolean | undefined; - /** - * This script length. - */ - length?: number | undefined; - /** - * JavaScript top stack frame of where the script parsed event was triggered if available. - * @experimental - */ - stackTrace?: Runtime.StackTrace | undefined; - } - interface ScriptFailedToParseEventDataType { - /** - * Identifier of the script parsed. - */ - scriptId: Runtime.ScriptId; - /** - * URL or name of the script parsed (if any). - */ - url: string; - /** - * Line offset of the script within the resource with given URL (for script tags). - */ - startLine: number; - /** - * Column offset of the script within the resource with given URL. - */ - startColumn: number; - /** - * Last line of the script. - */ - endLine: number; - /** - * Length of the last line of the script. - */ - endColumn: number; - /** - * Specifies script creation context. - */ - executionContextId: Runtime.ExecutionContextId; - /** - * Content hash of the script. - */ - hash: string; - /** - * Embedder-specific auxiliary data. - */ - executionContextAuxData?: {} | undefined; - /** - * URL of source map associated with script (if any). - */ - sourceMapURL?: string | undefined; - /** - * True, if this script has sourceURL. - */ - hasSourceURL?: boolean | undefined; - /** - * True, if this script is ES6 module. - */ - isModule?: boolean | undefined; - /** - * This script length. - */ - length?: number | undefined; - /** - * JavaScript top stack frame of where the script parsed event was triggered if available. - * @experimental - */ - stackTrace?: Runtime.StackTrace | undefined; - } - interface BreakpointResolvedEventDataType { - /** - * Breakpoint unique identifier. - */ - breakpointId: BreakpointId; - /** - * Actual breakpoint location. - */ - location: Location; - } - interface PausedEventDataType { - /** - * Call stack the virtual machine stopped on. - */ - callFrames: CallFrame[]; - /** - * Pause reason. - */ - reason: string; - /** - * Object containing break-specific auxiliary properties. - */ - data?: {} | undefined; - /** - * Hit breakpoints IDs - */ - hitBreakpoints?: string[] | undefined; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace | undefined; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId | undefined; - /** - * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. - * @experimental - */ - asyncCallStackTraceId?: Runtime.StackTraceId | undefined; - } - } - namespace Console { - /** - * Console message. - */ - interface ConsoleMessage { - /** - * Message source. - */ - source: string; - /** - * Message severity. - */ - level: string; - /** - * Message text. - */ - text: string; - /** - * URL of the message origin. - */ - url?: string | undefined; - /** - * Line number in the resource that generated this message (1-based). - */ - line?: number | undefined; - /** - * Column number in the resource that generated this message (1-based). - */ - column?: number | undefined; - } - interface MessageAddedEventDataType { - /** - * Console message that has been added. - */ - message: ConsoleMessage; - } - } - namespace Profiler { - /** - * Profile node. Holds callsite information, execution statistics and child nodes. - */ - interface ProfileNode { - /** - * Unique id of the node. - */ - id: number; - /** - * Function location. - */ - callFrame: Runtime.CallFrame; - /** - * Number of samples where this node was on top of the call stack. - */ - hitCount?: number | undefined; - /** - * Child node ids. - */ - children?: number[] | undefined; - /** - * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. - */ - deoptReason?: string | undefined; - /** - * An array of source position ticks. - */ - positionTicks?: PositionTickInfo[] | undefined; - } - /** - * Profile. - */ - interface Profile { - /** - * The list of profile nodes. First item is the root node. - */ - nodes: ProfileNode[]; - /** - * Profiling start timestamp in microseconds. - */ - startTime: number; - /** - * Profiling end timestamp in microseconds. - */ - endTime: number; - /** - * Ids of samples top nodes. - */ - samples?: number[] | undefined; - /** - * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. - */ - timeDeltas?: number[] | undefined; - } - /** - * Specifies a number of samples attributed to a certain source position. - */ - interface PositionTickInfo { - /** - * Source line number (1-based). - */ - line: number; - /** - * Number of samples attributed to the source line. - */ - ticks: number; - } - /** - * Coverage data for a source range. - */ - interface CoverageRange { - /** - * JavaScript script source offset for the range start. - */ - startOffset: number; - /** - * JavaScript script source offset for the range end. - */ - endOffset: number; - /** - * Collected execution count of the source range. - */ - count: number; - } - /** - * Coverage data for a JavaScript function. - */ - interface FunctionCoverage { - /** - * JavaScript function name. - */ - functionName: string; - /** - * Source ranges inside the function with coverage data. - */ - ranges: CoverageRange[]; - /** - * Whether coverage data for this function has block granularity. - */ - isBlockCoverage: boolean; - } - /** - * Coverage data for a JavaScript script. - */ - interface ScriptCoverage { - /** - * JavaScript script id. - */ - scriptId: Runtime.ScriptId; - /** - * JavaScript script name or url. - */ - url: string; - /** - * Functions contained in the script that has coverage data. - */ - functions: FunctionCoverage[]; - } - interface SetSamplingIntervalParameterType { - /** - * New sampling interval in microseconds. - */ - interval: number; - } - interface StartPreciseCoverageParameterType { - /** - * Collect accurate call counts beyond simple 'covered' or 'not covered'. - */ - callCount?: boolean | undefined; - /** - * Collect block-based coverage. - */ - detailed?: boolean | undefined; - } - interface StopReturnType { - /** - * Recorded profile. - */ - profile: Profile; - } - interface TakePreciseCoverageReturnType { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - interface GetBestEffortCoverageReturnType { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - interface ConsoleProfileStartedEventDataType { - id: string; - /** - * Location of console.profile(). - */ - location: Debugger.Location; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string | undefined; - } - interface ConsoleProfileFinishedEventDataType { - id: string; - /** - * Location of console.profileEnd(). - */ - location: Debugger.Location; - profile: Profile; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string | undefined; - } - } - namespace HeapProfiler { - /** - * Heap snapshot object id. - */ - type HeapSnapshotObjectId = string; - /** - * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. - */ - interface SamplingHeapProfileNode { - /** - * Function location. - */ - callFrame: Runtime.CallFrame; - /** - * Allocations size in bytes for the node excluding children. - */ - selfSize: number; - /** - * Child nodes. - */ - children: SamplingHeapProfileNode[]; - } - /** - * Profile. - */ - interface SamplingHeapProfile { - head: SamplingHeapProfileNode; - } - interface StartTrackingHeapObjectsParameterType { - trackAllocations?: boolean | undefined; - } - interface StopTrackingHeapObjectsParameterType { - /** - * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. - */ - reportProgress?: boolean | undefined; - } - interface TakeHeapSnapshotParameterType { - /** - * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. - */ - reportProgress?: boolean | undefined; - } - interface GetObjectByHeapObjectIdParameterType { - objectId: HeapSnapshotObjectId; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string | undefined; - } - interface AddInspectedHeapObjectParameterType { - /** - * Heap snapshot object id to be accessible by means of $x command line API. - */ - heapObjectId: HeapSnapshotObjectId; - } - interface GetHeapObjectIdParameterType { - /** - * Identifier of the object to get heap object id for. - */ - objectId: Runtime.RemoteObjectId; - } - interface StartSamplingParameterType { - /** - * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. - */ - samplingInterval?: number | undefined; - } - interface GetObjectByHeapObjectIdReturnType { - /** - * Evaluation result. - */ - result: Runtime.RemoteObject; - } - interface GetHeapObjectIdReturnType { - /** - * Id of the heap snapshot object corresponding to the passed remote object id. - */ - heapSnapshotObjectId: HeapSnapshotObjectId; - } - interface StopSamplingReturnType { - /** - * Recorded sampling heap profile. - */ - profile: SamplingHeapProfile; - } - interface GetSamplingProfileReturnType { - /** - * Return the sampling profile being collected. - */ - profile: SamplingHeapProfile; - } - interface AddHeapSnapshotChunkEventDataType { - chunk: string; - } - interface ReportHeapSnapshotProgressEventDataType { - done: number; - total: number; - finished?: boolean | undefined; - } - interface LastSeenObjectIdEventDataType { - lastSeenObjectId: number; - timestamp: number; - } - interface HeapStatsUpdateEventDataType { - /** - * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. - */ - statsUpdate: number[]; - } - } - namespace NodeTracing { - interface TraceConfig { - /** - * Controls how the trace buffer stores data. - */ - recordMode?: string | undefined; - /** - * Included category filters. - */ - includedCategories: string[]; - } - interface StartParameterType { - traceConfig: TraceConfig; - } - interface GetCategoriesReturnType { - /** - * A list of supported tracing categories. - */ - categories: string[]; - } - interface DataCollectedEventDataType { - value: Array<{}>; - } - } - namespace NodeWorker { - type WorkerID = string; - /** - * Unique identifier of attached debugging session. - */ - type SessionID = string; - interface WorkerInfo { - workerId: WorkerID; - type: string; - title: string; - url: string; - } - interface SendMessageToWorkerParameterType { - message: string; - /** - * Identifier of the session. - */ - sessionId: SessionID; - } - interface EnableParameterType { - /** - * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` - * message to run them. - */ - waitForDebuggerOnStart: boolean; - } - interface DetachParameterType { - sessionId: SessionID; - } - interface AttachedToWorkerEventDataType { - /** - * Identifier assigned to the session used to send/receive messages. - */ - sessionId: SessionID; - workerInfo: WorkerInfo; - waitingForDebugger: boolean; - } - interface DetachedFromWorkerEventDataType { - /** - * Detached session identifier. - */ - sessionId: SessionID; - } - interface ReceivedMessageFromWorkerEventDataType { - /** - * Identifier of a session which sends a message. - */ - sessionId: SessionID; - message: string; - } - } - namespace Network { - /** - * Resource type as it was perceived by the rendering engine. - */ - type ResourceType = string; - /** - * Unique request identifier. - */ - type RequestId = string; - /** - * UTC time in seconds, counted from January 1, 1970. - */ - type TimeSinceEpoch = number; - /** - * Monotonically increasing time in seconds since an arbitrary point in the past. - */ - type MonotonicTime = number; - /** - * HTTP request data. - */ - interface Request { - url: string; - method: string; - headers: Headers; - } - /** - * HTTP response data. - */ - interface Response { - url: string; - status: number; - statusText: string; - headers: Headers; - } - /** - * Request / response headers as keys / values of JSON object. - */ - interface Headers { - } - interface RequestWillBeSentEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Request data. - */ - request: Request; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Timestamp. - */ - wallTime: TimeSinceEpoch; - } - interface ResponseReceivedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Resource type. - */ - type: ResourceType; - /** - * Response data. - */ - response: Response; - } - interface LoadingFailedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Resource type. - */ - type: ResourceType; - /** - * Error message. - */ - errorText: string; - } - interface LoadingFinishedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - } - } - namespace NodeRuntime { - interface NotifyWhenWaitingForDisconnectParameterType { - enabled: boolean; - } - } - - /** - * The `inspector.Session` is used for dispatching messages to the V8 inspector - * back-end and receiving message responses and notifications. - */ - class Session extends EventEmitter { - /** - * Create a new instance of the inspector.Session class. - * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. - */ - constructor(); - - /** - * Connects a session to the inspector back-end. - */ - connect(): void; - - /** - * Connects a session to the inspector back-end. - * An exception will be thrown if this API was not called on a Worker thread. - * @since v12.11.0 - */ - connectToMainThread(): void; - - /** - * Immediately close the session. All pending message callbacks will be called with an error. - * `session.connect()` will need to be called to be able to send messages again. - * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. - */ - disconnect(): void; - - /** - * Posts a message to the inspector back-end. `callback` will be notified when - * a response is received. `callback` is a function that accepts two optional - * arguments: error and message-specific result. - * - * ```js - * session.post('Runtime.evaluate', { expression: '2 + 2' }, - * (error, { result }) => console.log(result)); - * // Output: { type: 'number', value: 4, description: '4' } - * ``` - * - * The latest version of the V8 inspector protocol is published on the - * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). - * - * Node.js inspector supports all the Chrome DevTools Protocol domains declared - * by V8. Chrome DevTools Protocol domain provides an interface for interacting - * with one of the runtime agents used to inspect the application state and listen - * to the run-time events. - */ - post(method: string, callback?: (err: Error | null, params?: object) => void): void; - post(method: string, params?: object, callback?: (err: Error | null, params?: object) => void): void; - /** - * Returns supported domains. - */ - post(method: 'Schema.getDomains', callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; - /** - * Evaluates expression on global object. - */ - post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; - post(method: 'Runtime.evaluate', callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; - /** - * Add handler to promise with given promise object id. - */ - post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; - post(method: 'Runtime.awaitPromise', callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; - /** - * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. - */ - post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; - post(method: 'Runtime.callFunctionOn', callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; - /** - * Returns properties of a given object. Object group of the result is inherited from the target object. - */ - post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; - post(method: 'Runtime.getProperties', callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; - /** - * Releases remote object with given id. - */ - post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Runtime.releaseObject', callback?: (err: Error | null) => void): void; - /** - * Releases all remote objects that belong to a given group. - */ - post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Runtime.releaseObjectGroup', callback?: (err: Error | null) => void): void; - /** - * Tells inspected instance to run if it was waiting for debugger to attach. - */ - post(method: 'Runtime.runIfWaitingForDebugger', callback?: (err: Error | null) => void): void; - /** - * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. - */ - post(method: 'Runtime.enable', callback?: (err: Error | null) => void): void; - /** - * Disables reporting of execution contexts creation. - */ - post(method: 'Runtime.disable', callback?: (err: Error | null) => void): void; - /** - * Discards collected exceptions and console API calls. - */ - post(method: 'Runtime.discardConsoleEntries', callback?: (err: Error | null) => void): void; - /** - * @experimental - */ - post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Runtime.setCustomObjectFormatterEnabled', callback?: (err: Error | null) => void): void; - /** - * Compiles expression. - */ - post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; - post(method: 'Runtime.compileScript', callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; - /** - * Runs script with given id in a given context. - */ - post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; - post(method: 'Runtime.runScript', callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; - post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; - post(method: 'Runtime.queryObjects', callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; - /** - * Returns all let, const and class variables from global scope. - */ - post( - method: 'Runtime.globalLexicalScopeNames', - params?: Runtime.GlobalLexicalScopeNamesParameterType, - callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void - ): void; - post(method: 'Runtime.globalLexicalScopeNames', callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; - /** - * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. - */ - post(method: 'Debugger.enable', callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; - /** - * Disables debugger for given page. - */ - post(method: 'Debugger.disable', callback?: (err: Error | null) => void): void; - /** - * Activates / deactivates all breakpoints on the page. - */ - post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setBreakpointsActive', callback?: (err: Error | null) => void): void; - /** - * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). - */ - post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setSkipAllPauses', callback?: (err: Error | null) => void): void; - /** - * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. - */ - post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; - post(method: 'Debugger.setBreakpointByUrl', callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; - /** - * Sets JavaScript breakpoint at a given location. - */ - post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; - post(method: 'Debugger.setBreakpoint', callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; - /** - * Removes JavaScript breakpoint. - */ - post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.removeBreakpoint', callback?: (err: Error | null) => void): void; - /** - * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. - */ - post( - method: 'Debugger.getPossibleBreakpoints', - params?: Debugger.GetPossibleBreakpointsParameterType, - callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void - ): void; - post(method: 'Debugger.getPossibleBreakpoints', callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; - /** - * Continues execution until specific location is reached. - */ - post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.continueToLocation', callback?: (err: Error | null) => void): void; - /** - * @experimental - */ - post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.pauseOnAsyncCall', callback?: (err: Error | null) => void): void; - /** - * Steps over the statement. - */ - post(method: 'Debugger.stepOver', callback?: (err: Error | null) => void): void; - /** - * Steps into the function call. - */ - post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.stepInto', callback?: (err: Error | null) => void): void; - /** - * Steps out of the function call. - */ - post(method: 'Debugger.stepOut', callback?: (err: Error | null) => void): void; - /** - * Stops on the next JavaScript statement. - */ - post(method: 'Debugger.pause', callback?: (err: Error | null) => void): void; - /** - * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. - * @experimental - */ - post(method: 'Debugger.scheduleStepIntoAsync', callback?: (err: Error | null) => void): void; - /** - * Resumes JavaScript execution. - */ - post(method: 'Debugger.resume', callback?: (err: Error | null) => void): void; - /** - * Returns stack trace with given stackTraceId. - * @experimental - */ - post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; - post(method: 'Debugger.getStackTrace', callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; - /** - * Searches for given string in script content. - */ - post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; - post(method: 'Debugger.searchInContent', callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; - /** - * Edits JavaScript source live. - */ - post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; - post(method: 'Debugger.setScriptSource', callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; - /** - * Restarts particular call frame from the beginning. - */ - post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; - post(method: 'Debugger.restartFrame', callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; - /** - * Returns source for the script with given id. - */ - post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; - post(method: 'Debugger.getScriptSource', callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; - /** - * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. - */ - post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setPauseOnExceptions', callback?: (err: Error | null) => void): void; - /** - * Evaluates expression on a given call frame. - */ - post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; - post(method: 'Debugger.evaluateOnCallFrame', callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; - /** - * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. - */ - post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setVariableValue', callback?: (err: Error | null) => void): void; - /** - * Changes return value in top frame. Available only at return break position. - * @experimental - */ - post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setReturnValue', callback?: (err: Error | null) => void): void; - /** - * Enables or disables async call stacks tracking. - */ - post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setAsyncCallStackDepth', callback?: (err: Error | null) => void): void; - /** - * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - * @experimental - */ - post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setBlackboxPatterns', callback?: (err: Error | null) => void): void; - /** - * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. - * @experimental - */ - post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setBlackboxedRanges', callback?: (err: Error | null) => void): void; - /** - * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. - */ - post(method: 'Console.enable', callback?: (err: Error | null) => void): void; - /** - * Disables console domain, prevents further console messages from being reported to the client. - */ - post(method: 'Console.disable', callback?: (err: Error | null) => void): void; - /** - * Does nothing. - */ - post(method: 'Console.clearMessages', callback?: (err: Error | null) => void): void; - post(method: 'Profiler.enable', callback?: (err: Error | null) => void): void; - post(method: 'Profiler.disable', callback?: (err: Error | null) => void): void; - /** - * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. - */ - post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Profiler.setSamplingInterval', callback?: (err: Error | null) => void): void; - post(method: 'Profiler.start', callback?: (err: Error | null) => void): void; - post(method: 'Profiler.stop', callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; - /** - * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. - */ - post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Profiler.startPreciseCoverage', callback?: (err: Error | null) => void): void; - /** - * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. - */ - post(method: 'Profiler.stopPreciseCoverage', callback?: (err: Error | null) => void): void; - /** - * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. - */ - post(method: 'Profiler.takePreciseCoverage', callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; - /** - * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. - */ - post(method: 'Profiler.getBestEffortCoverage', callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; - post(method: 'HeapProfiler.enable', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.disable', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.startTrackingHeapObjects', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.stopTrackingHeapObjects', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.takeHeapSnapshot', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.collectGarbage', callback?: (err: Error | null) => void): void; - post( - method: 'HeapProfiler.getObjectByHeapObjectId', - params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, - callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void - ): void; - post(method: 'HeapProfiler.getObjectByHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; - /** - * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). - */ - post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.addInspectedHeapObject', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; - post(method: 'HeapProfiler.getHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; - post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.startSampling', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.stopSampling', callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; - post(method: 'HeapProfiler.getSamplingProfile', callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; - /** - * Gets supported tracing categories. - */ - post(method: 'NodeTracing.getCategories', callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; - /** - * Start trace events collection. - */ - post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; - post(method: 'NodeTracing.start', callback?: (err: Error | null) => void): void; - /** - * Stop trace events collection. Remaining collected events will be sent as a sequence of - * dataCollected events followed by tracingComplete event. - */ - post(method: 'NodeTracing.stop', callback?: (err: Error | null) => void): void; - /** - * Sends protocol message over session with given id. - */ - post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; - post(method: 'NodeWorker.sendMessageToWorker', callback?: (err: Error | null) => void): void; - /** - * Instructs the inspector to attach to running workers. Will also attach to new workers - * as they start - */ - post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; - post(method: 'NodeWorker.enable', callback?: (err: Error | null) => void): void; - /** - * Detaches from all running workers and disables attaching to new workers as they are started. - */ - post(method: 'NodeWorker.disable', callback?: (err: Error | null) => void): void; - /** - * Detached from the worker with given sessionId. - */ - post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; - post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void; - /** - * Disables network tracking, prevents network events from being sent to the client. - */ - post(method: 'Network.disable', callback?: (err: Error | null) => void): void; - /** - * Enables network tracking, network events will now be delivered to the client. - */ - post(method: 'Network.enable', callback?: (err: Error | null) => void): void; - /** - * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. - */ - post(method: 'NodeRuntime.enable', callback?: (err: Error | null) => void): void; - /** - * Disable NodeRuntime events - */ - post(method: 'NodeRuntime.disable', callback?: (err: Error | null) => void): void; - /** - * Enable the `NodeRuntime.waitingForDisconnect`. - */ - post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; - post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void; - - addListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - addListener(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - addListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - addListener(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - addListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - addListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - addListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - addListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - addListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: 'inspectorNotification', message: InspectorNotification): boolean; - emit(event: 'Runtime.executionContextCreated', message: InspectorNotification): boolean; - emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification): boolean; - emit(event: 'Runtime.executionContextsCleared'): boolean; - emit(event: 'Runtime.exceptionThrown', message: InspectorNotification): boolean; - emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification): boolean; - emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification): boolean; - emit(event: 'Runtime.inspectRequested', message: InspectorNotification): boolean; - emit(event: 'Debugger.scriptParsed', message: InspectorNotification): boolean; - emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification): boolean; - emit(event: 'Debugger.breakpointResolved', message: InspectorNotification): boolean; - emit(event: 'Debugger.paused', message: InspectorNotification): boolean; - emit(event: 'Debugger.resumed'): boolean; - emit(event: 'Console.messageAdded', message: InspectorNotification): boolean; - emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification): boolean; - emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.resetProfiles'): boolean; - emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification): boolean; - emit(event: 'NodeTracing.dataCollected', message: InspectorNotification): boolean; - emit(event: 'NodeTracing.tracingComplete'): boolean; - emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification): boolean; - emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification): boolean; - emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification): boolean; - emit(event: 'Network.requestWillBeSent', message: InspectorNotification): boolean; - emit(event: 'Network.responseReceived', message: InspectorNotification): boolean; - emit(event: 'Network.loadingFailed', message: InspectorNotification): boolean; - emit(event: 'Network.loadingFinished', message: InspectorNotification): boolean; - emit(event: 'NodeRuntime.waitingForDisconnect'): boolean; - emit(event: 'NodeRuntime.waitingForDebugger'): boolean; - on(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - on(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - on(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - on(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - on(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - on(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - on(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - on(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - on(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - on(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - on(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - on(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - on(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - once(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - once(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - once(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - once(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - once(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - once(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - once(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - once(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - once(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - once(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - once(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - once(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependListener(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependOnceListener(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependOnceListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependOnceListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependOnceListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - } - - /** - * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has - * started. - * - * If wait is `true`, will block until a client has connected to the inspect port - * and flow control has been passed to the debugger client. - * - * See the [security warning](https://nodejs.org/docs/latest-v22.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) - * regarding the `host` parameter usage. - * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI. - * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI. - * @param wait Block until a client has connected. Defaults to what was specified on the CLI. - * @returns Disposable that calls `inspector.close()`. - */ - function open(port?: number, host?: string, wait?: boolean): Disposable; - - /** - * Deactivate the inspector. Blocks until there are no active connections. - */ - function close(): void; - - /** - * Return the URL of the active inspector, or `undefined` if there is none. - * - * ```console - * $ node --inspect -p 'inspector.url()' - * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 - * For help, see: https://nodejs.org/en/docs/inspector - * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 - * - * $ node --inspect=localhost:3000 -p 'inspector.url()' - * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a - * For help, see: https://nodejs.org/en/docs/inspector - * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a - * - * $ node -p 'inspector.url()' - * undefined - * ``` - */ - function url(): string | undefined; - - /** - * Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command. - * - * An exception will be thrown if there is no active inspector. - * @since v12.7.0 - */ - function waitForDebugger(): void; - - // These methods are exposed by the V8 inspector console API (inspector/v8-console.h). - // The method signatures differ from those of the Node.js console, and are deliberately - // typed permissively. - interface InspectorConsole { - debug(...data: any[]): void; - error(...data: any[]): void; - info(...data: any[]): void; - log(...data: any[]): void; - warn(...data: any[]): void; - dir(...data: any[]): void; - dirxml(...data: any[]): void; - table(...data: any[]): void; - trace(...data: any[]): void; - group(...data: any[]): void; - groupCollapsed(...data: any[]): void; - groupEnd(...data: any[]): void; - clear(...data: any[]): void; - count(label?: any): void; - countReset(label?: any): void; - assert(value?: any, ...data: any[]): void; - profile(label?: any): void; - profileEnd(label?: any): void; - time(label?: any): void; - timeLog(label?: any): void; - timeStamp(label?: any): void; - } - - /** - * An object to send messages to the remote inspector console. - * @since v11.0.0 - */ - const console: InspectorConsole; - - // DevTools protocol event broadcast methods - namespace Network { - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that - * the application is about to send an HTTP request. - * @since v22.6.0 - * @experimental - */ - function requestWillBeSent(params: RequestWillBeSentEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that - * HTTP response is available. - * @since v22.6.0 - * @experimental - */ - function responseReceived(params: ResponseReceivedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that - * HTTP request has finished loading. - * @since v22.6.0 - * @experimental - */ - function loadingFinished(params: LoadingFinishedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that - * HTTP request has failed to load. - * @since v22.7.0 - * @experimental - */ - function loadingFailed(params: LoadingFailedEventDataType): void; - } -} - -/** - * The `node:inspector` module provides an API for interacting with the V8 - * inspector. - */ -declare module 'node:inspector' { - export * from 'inspector'; -} - -/** - * The `node:inspector/promises` module provides an API for interacting with the V8 - * inspector. - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/inspector/promises.js) - * @since v19.0.0 - */ -declare module 'inspector/promises' { - import EventEmitter = require('node:events'); - import { - open, - close, - url, - waitForDebugger, - console, - InspectorNotification, - Schema, - Runtime, - Debugger, - Console, - Profiler, - HeapProfiler, - NodeTracing, - NodeWorker, - Network, - NodeRuntime, - } from 'inspector'; - - /** - * The `inspector.Session` is used for dispatching messages to the V8 inspector - * back-end and receiving message responses and notifications. - * @since v19.0.0 - */ - class Session extends EventEmitter { - /** - * Create a new instance of the `inspector.Session` class. - * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. - */ - constructor(); - - /** - * Connects a session to the inspector back-end. - */ - connect(): void; - - /** - * Connects a session to the inspector back-end. - * An exception will be thrown if this API was not called on a Worker thread. - */ - connectToMainThread(): void; - - /** - * Immediately close the session. All pending message callbacks will be called with an error. - * `session.connect()` will need to be called to be able to send messages again. - * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. - */ - disconnect(): void; - - /** - * Posts a message to the inspector back-end. - * - * ```js - * import { Session } from 'node:inspector/promises'; - * try { - * const session = new Session(); - * session.connect(); - * const result = await session.post('Runtime.evaluate', { expression: '2 + 2' }); - * console.log(result); - * } catch (error) { - * console.error(error); - * } - * // Output: { result: { type: 'number', value: 4, description: '4' } } - * ``` - * - * The latest version of the V8 inspector protocol is published on the - * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). - * - * Node.js inspector supports all the Chrome DevTools Protocol domains declared - * by V8. Chrome DevTools Protocol domain provides an interface for interacting - * with one of the runtime agents used to inspect the application state and listen - * to the run-time events. - */ - post(method: string, params?: object): Promise; - /** - * Returns supported domains. - */ - post(method: 'Schema.getDomains'): Promise; - /** - * Evaluates expression on global object. - */ - post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType): Promise; - /** - * Add handler to promise with given promise object id. - */ - post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType): Promise; - /** - * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. - */ - post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType): Promise; - /** - * Returns properties of a given object. Object group of the result is inherited from the target object. - */ - post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType): Promise; - /** - * Releases remote object with given id. - */ - post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType): Promise; - /** - * Releases all remote objects that belong to a given group. - */ - post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType): Promise; - /** - * Tells inspected instance to run if it was waiting for debugger to attach. - */ - post(method: 'Runtime.runIfWaitingForDebugger'): Promise; - /** - * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. - */ - post(method: 'Runtime.enable'): Promise; - /** - * Disables reporting of execution contexts creation. - */ - post(method: 'Runtime.disable'): Promise; - /** - * Discards collected exceptions and console API calls. - */ - post(method: 'Runtime.discardConsoleEntries'): Promise; - /** - * @experimental - */ - post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType): Promise; - /** - * Compiles expression. - */ - post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType): Promise; - /** - * Runs script with given id in a given context. - */ - post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType): Promise; - post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType): Promise; - /** - * Returns all let, const and class variables from global scope. - */ - post(method: 'Runtime.globalLexicalScopeNames', params?: Runtime.GlobalLexicalScopeNamesParameterType): Promise; - /** - * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. - */ - post(method: 'Debugger.enable'): Promise; - /** - * Disables debugger for given page. - */ - post(method: 'Debugger.disable'): Promise; - /** - * Activates / deactivates all breakpoints on the page. - */ - post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType): Promise; - /** - * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). - */ - post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType): Promise; - /** - * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. - */ - post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType): Promise; - /** - * Sets JavaScript breakpoint at a given location. - */ - post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType): Promise; - /** - * Removes JavaScript breakpoint. - */ - post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType): Promise; - /** - * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. - */ - post(method: 'Debugger.getPossibleBreakpoints', params?: Debugger.GetPossibleBreakpointsParameterType): Promise; - /** - * Continues execution until specific location is reached. - */ - post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType): Promise; - /** - * @experimental - */ - post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType): Promise; - /** - * Steps over the statement. - */ - post(method: 'Debugger.stepOver'): Promise; - /** - * Steps into the function call. - */ - post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType): Promise; - /** - * Steps out of the function call. - */ - post(method: 'Debugger.stepOut'): Promise; - /** - * Stops on the next JavaScript statement. - */ - post(method: 'Debugger.pause'): Promise; - /** - * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. - * @experimental - */ - post(method: 'Debugger.scheduleStepIntoAsync'): Promise; - /** - * Resumes JavaScript execution. - */ - post(method: 'Debugger.resume'): Promise; - /** - * Returns stack trace with given stackTraceId. - * @experimental - */ - post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType): Promise; - /** - * Searches for given string in script content. - */ - post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType): Promise; - /** - * Edits JavaScript source live. - */ - post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType): Promise; - /** - * Restarts particular call frame from the beginning. - */ - post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType): Promise; - /** - * Returns source for the script with given id. - */ - post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType): Promise; - /** - * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. - */ - post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType): Promise; - /** - * Evaluates expression on a given call frame. - */ - post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType): Promise; - /** - * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. - */ - post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType): Promise; - /** - * Changes return value in top frame. Available only at return break position. - * @experimental - */ - post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType): Promise; - /** - * Enables or disables async call stacks tracking. - */ - post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType): Promise; - /** - * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - * @experimental - */ - post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType): Promise; - /** - * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. - * @experimental - */ - post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType): Promise; - /** - * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. - */ - post(method: 'Console.enable'): Promise; - /** - * Disables console domain, prevents further console messages from being reported to the client. - */ - post(method: 'Console.disable'): Promise; - /** - * Does nothing. - */ - post(method: 'Console.clearMessages'): Promise; - post(method: 'Profiler.enable'): Promise; - post(method: 'Profiler.disable'): Promise; - /** - * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. - */ - post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType): Promise; - post(method: 'Profiler.start'): Promise; - post(method: 'Profiler.stop'): Promise; - /** - * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. - */ - post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType): Promise; - /** - * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. - */ - post(method: 'Profiler.stopPreciseCoverage'): Promise; - /** - * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. - */ - post(method: 'Profiler.takePreciseCoverage'): Promise; - /** - * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. - */ - post(method: 'Profiler.getBestEffortCoverage'): Promise; - post(method: 'HeapProfiler.enable'): Promise; - post(method: 'HeapProfiler.disable'): Promise; - post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType): Promise; - post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType): Promise; - post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType): Promise; - post(method: 'HeapProfiler.collectGarbage'): Promise; - post(method: 'HeapProfiler.getObjectByHeapObjectId', params?: HeapProfiler.GetObjectByHeapObjectIdParameterType): Promise; - /** - * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). - */ - post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType): Promise; - post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType): Promise; - post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType): Promise; - post(method: 'HeapProfiler.stopSampling'): Promise; - post(method: 'HeapProfiler.getSamplingProfile'): Promise; - /** - * Gets supported tracing categories. - */ - post(method: 'NodeTracing.getCategories'): Promise; - /** - * Start trace events collection. - */ - post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType): Promise; - /** - * Stop trace events collection. Remaining collected events will be sent as a sequence of - * dataCollected events followed by tracingComplete event. - */ - post(method: 'NodeTracing.stop'): Promise; - /** - * Sends protocol message over session with given id. - */ - post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType): Promise; - /** - * Instructs the inspector to attach to running workers. Will also attach to new workers - * as they start - */ - post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType): Promise; - /** - * Detaches from all running workers and disables attaching to new workers as they are started. - */ - post(method: 'NodeWorker.disable'): Promise; - /** - * Detached from the worker with given sessionId. - */ - post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType): Promise; - /** - * Disables network tracking, prevents network events from being sent to the client. - */ - post(method: 'Network.disable'): Promise; - /** - * Enables network tracking, network events will now be delivered to the client. - */ - post(method: 'Network.enable'): Promise; - /** - * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. - */ - post(method: 'NodeRuntime.enable'): Promise; - /** - * Disable NodeRuntime events - */ - post(method: 'NodeRuntime.disable'): Promise; - /** - * Enable the `NodeRuntime.waitingForDisconnect`. - */ - post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise; - - addListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - addListener(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - addListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - addListener(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - addListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - addListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - addListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - addListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - addListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: 'inspectorNotification', message: InspectorNotification): boolean; - emit(event: 'Runtime.executionContextCreated', message: InspectorNotification): boolean; - emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification): boolean; - emit(event: 'Runtime.executionContextsCleared'): boolean; - emit(event: 'Runtime.exceptionThrown', message: InspectorNotification): boolean; - emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification): boolean; - emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification): boolean; - emit(event: 'Runtime.inspectRequested', message: InspectorNotification): boolean; - emit(event: 'Debugger.scriptParsed', message: InspectorNotification): boolean; - emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification): boolean; - emit(event: 'Debugger.breakpointResolved', message: InspectorNotification): boolean; - emit(event: 'Debugger.paused', message: InspectorNotification): boolean; - emit(event: 'Debugger.resumed'): boolean; - emit(event: 'Console.messageAdded', message: InspectorNotification): boolean; - emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification): boolean; - emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.resetProfiles'): boolean; - emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification): boolean; - emit(event: 'NodeTracing.dataCollected', message: InspectorNotification): boolean; - emit(event: 'NodeTracing.tracingComplete'): boolean; - emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification): boolean; - emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification): boolean; - emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification): boolean; - emit(event: 'Network.requestWillBeSent', message: InspectorNotification): boolean; - emit(event: 'Network.responseReceived', message: InspectorNotification): boolean; - emit(event: 'Network.loadingFailed', message: InspectorNotification): boolean; - emit(event: 'Network.loadingFinished', message: InspectorNotification): boolean; - emit(event: 'NodeRuntime.waitingForDisconnect'): boolean; - emit(event: 'NodeRuntime.waitingForDebugger'): boolean; - on(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - on(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - on(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - on(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - on(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - on(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - on(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - on(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - on(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - on(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - on(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - on(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - on(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - once(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - once(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - once(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - once(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - once(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - once(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - once(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - once(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - once(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - once(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - once(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - once(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependListener(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependOnceListener(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependOnceListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependOnceListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependOnceListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - } - - export { - Session, - open, - close, - url, - waitForDebugger, - console, - InspectorNotification, - Schema, - Runtime, - Debugger, - Console, - Profiler, - HeapProfiler, - NodeTracing, - NodeWorker, - Network, - NodeRuntime, - }; -} - -/** - * The `node:inspector/promises` module provides an API for interacting with the V8 - * inspector. - * @since v19.0.0 - */ -declare module 'node:inspector/promises' { - export * from 'inspector/promises'; -} diff --git a/web/static/node_modules/@types/node/module.d.ts b/web/static/node_modules/@types/node/module.d.ts deleted file mode 100644 index 36434f85..00000000 --- a/web/static/node_modules/@types/node/module.d.ts +++ /dev/null @@ -1,392 +0,0 @@ -/** - * @since v0.3.7 - * @experimental - */ -declare module "module" { - import { URL } from "node:url"; - import { MessagePort } from "node:worker_threads"; - namespace Module { - /** - * The `module.syncBuiltinESMExports()` method updates all the live bindings for - * builtin `ES Modules` to match the properties of the `CommonJS` exports. It - * does not add or remove exported names from the `ES Modules`. - * - * ```js - * import fs from 'node:fs'; - * import assert from 'node:assert'; - * import { syncBuiltinESMExports } from 'node:module'; - * - * fs.readFile = newAPI; - * - * delete fs.readFileSync; - * - * function newAPI() { - * // ... - * } - * - * fs.newAPI = newAPI; - * - * syncBuiltinESMExports(); - * - * import('node:fs').then((esmFS) => { - * // It syncs the existing readFile property with the new value - * assert.strictEqual(esmFS.readFile, newAPI); - * // readFileSync has been deleted from the required fs - * assert.strictEqual('readFileSync' in fs, false); - * // syncBuiltinESMExports() does not remove readFileSync from esmFS - * assert.strictEqual('readFileSync' in esmFS, true); - * // syncBuiltinESMExports() does not add names - * assert.strictEqual(esmFS.newAPI, undefined); - * }); - * ``` - * @since v12.12.0 - */ - function syncBuiltinESMExports(): void; - /** - * `path` is the resolved path for the file for which a corresponding source map - * should be fetched. - * @since v13.7.0, v12.17.0 - * @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise. - */ - function findSourceMap(path: string, error?: Error): SourceMap; - interface SourceMapPayload { - file: string; - version: number; - sources: string[]; - sourcesContent: string[]; - names: string[]; - mappings: string; - sourceRoot: string; - } - interface SourceMapping { - generatedLine: number; - generatedColumn: number; - originalSource: string; - originalLine: number; - originalColumn: number; - } - interface SourceOrigin { - /** - * The name of the range in the source map, if one was provided - */ - name?: string; - /** - * The file name of the original source, as reported in the SourceMap - */ - fileName: string; - /** - * The 1-indexed lineNumber of the corresponding call site in the original source - */ - lineNumber: number; - /** - * The 1-indexed columnNumber of the corresponding call site in the original source - */ - columnNumber: number; - } - /** - * @since v13.7.0, v12.17.0 - */ - class SourceMap { - /** - * Getter for the payload used to construct the `SourceMap` instance. - */ - readonly payload: SourceMapPayload; - constructor(payload: SourceMapPayload); - /** - * Given a line offset and column offset in the generated source - * file, returns an object representing the SourceMap range in the - * original file if found, or an empty object if not. - * - * The object returned contains the following keys: - * - * The returned value represents the raw range as it appears in the - * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and - * column numbers as they appear in Error messages and CallSite - * objects. - * - * To get the corresponding 1-indexed line and column numbers from a - * lineNumber and columnNumber as they are reported by Error stacks - * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)` - * @param lineOffset The zero-indexed line number offset in the generated source - * @param columnOffset The zero-indexed column number offset in the generated source - */ - findEntry(lineOffset: number, columnOffset: number): SourceMapping; - /** - * Given a 1-indexed `lineNumber` and `columnNumber` from a call site in the generated source, - * find the corresponding call site location in the original source. - * - * If the `lineNumber` and `columnNumber` provided are not found in any source map, - * then an empty object is returned. - * @param lineNumber The 1-indexed line number of the call site in the generated source - * @param columnNumber The 1-indexed column number of the call site in the generated source - */ - findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {}; - } - interface ImportAttributes extends NodeJS.Dict { - type?: string | undefined; - } - type ModuleFormat = "builtin" | "commonjs" | "json" | "module" | "wasm"; - type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray; - interface GlobalPreloadContext { - port: MessagePort; - } - /** - * @deprecated This hook will be removed in a future version. - * Use `initialize` instead. When a loader has an `initialize` export, `globalPreload` will be ignored. - * - * Sometimes it might be necessary to run some code inside of the same global scope that the application runs in. - * This hook allows the return of a string that is run as a sloppy-mode script on startup. - * - * @param context Information to assist the preload code - * @return Code to run before application startup - */ - type GlobalPreloadHook = (context: GlobalPreloadContext) => string; - /** - * The `initialize` hook provides a way to define a custom function that runs in the hooks thread - * when the hooks module is initialized. Initialization happens when the hooks module is registered via `register`. - * - * This hook can receive data from a `register` invocation, including ports and other transferrable objects. - * The return value of `initialize` can be a `Promise`, in which case it will be awaited before the main application thread execution resumes. - */ - type InitializeHook = (data: Data) => void | Promise; - interface ResolveHookContext { - /** - * Export conditions of the relevant `package.json` - */ - conditions: string[]; - /** - * An object whose key-value pairs represent the assertions for the module to import - */ - importAttributes: ImportAttributes; - /** - * The module importing this one, or undefined if this is the Node.js entry point - */ - parentURL: string | undefined; - } - interface ResolveFnOutput { - /** - * A hint to the load hook (it might be ignored) - */ - format?: ModuleFormat | null | undefined; - /** - * The import attributes to use when caching the module (optional; if excluded the input will be used) - */ - importAttributes?: ImportAttributes | undefined; - /** - * A signal that this hook intends to terminate the chain of `resolve` hooks. - * @default false - */ - shortCircuit?: boolean | undefined; - /** - * The absolute URL to which this input resolves - */ - url: string; - } - /** - * The `resolve` hook chain is responsible for resolving file URL for a given module specifier and parent URL, and optionally its format (such as `'module'`) as a hint to the `load` hook. - * If a format is specified, the load hook is ultimately responsible for providing the final `format` value (and it is free to ignore the hint provided by `resolve`); - * if `resolve` provides a format, a custom `load` hook is required even if only to pass the value to the Node.js default `load` hook. - * - * @param specifier The specified URL path of the module to be resolved - * @param context - * @param nextResolve The subsequent `resolve` hook in the chain, or the Node.js default `resolve` hook after the last user-supplied resolve hook - */ - type ResolveHook = ( - specifier: string, - context: ResolveHookContext, - nextResolve: ( - specifier: string, - context?: ResolveHookContext, - ) => ResolveFnOutput | Promise, - ) => ResolveFnOutput | Promise; - interface LoadHookContext { - /** - * Export conditions of the relevant `package.json` - */ - conditions: string[]; - /** - * The format optionally supplied by the `resolve` hook chain - */ - format: ModuleFormat; - /** - * An object whose key-value pairs represent the assertions for the module to import - */ - importAttributes: ImportAttributes; - } - interface LoadFnOutput { - format: ModuleFormat; - /** - * A signal that this hook intends to terminate the chain of `resolve` hooks. - * @default false - */ - shortCircuit?: boolean | undefined; - /** - * The source for Node.js to evaluate - */ - source?: ModuleSource; - } - /** - * The `load` hook provides a way to define a custom method of determining how a URL should be interpreted, retrieved, and parsed. - * It is also in charge of validating the import assertion. - * - * @param url The URL/path of the module to be loaded - * @param context Metadata about the module - * @param nextLoad The subsequent `load` hook in the chain, or the Node.js default `load` hook after the last user-supplied `load` hook - */ - type LoadHook = ( - url: string, - context: LoadHookContext, - nextLoad: (url: string, context?: LoadHookContext) => LoadFnOutput | Promise, - ) => LoadFnOutput | Promise; - namespace constants { - /** - * The following constants are returned as the `status` field in the object returned by - * {@link enableCompileCache} to indicate the result of the attempt to enable the - * [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache). - * @since v22.8.0 - */ - namespace compileCacheStatus { - /** - * Node.js has enabled the compile cache successfully. The directory used to store the - * compile cache will be returned in the `directory` field in the - * returned object. - */ - const ENABLED: number; - /** - * The compile cache has already been enabled before, either by a previous call to - * {@link enableCompileCache}, or by the `NODE_COMPILE_CACHE=dir` - * environment variable. The directory used to store the - * compile cache will be returned in the `directory` field in the - * returned object. - */ - const ALREADY_ENABLED: number; - /** - * Node.js fails to enable the compile cache. This can be caused by the lack of - * permission to use the specified directory, or various kinds of file system errors. - * The detail of the failure will be returned in the `message` field in the - * returned object. - */ - const FAILED: number; - /** - * Node.js cannot enable the compile cache because the environment variable - * `NODE_DISABLE_COMPILE_CACHE=1` has been set. - */ - const DISABLED: number; - } - } - } - interface RegisterOptions { - parentURL: string | URL; - data?: Data | undefined; - transferList?: any[] | undefined; - } - interface EnableCompileCacheResult { - /** - * One of the {@link constants.compileCacheStatus} - */ - status: number; - /** - * If Node.js cannot enable the compile cache, this contains - * the error message. Only set if `status` is `module.constants.compileCacheStatus.FAILED`. - */ - message?: string; - /** - * If the compile cache is enabled, this contains the directory - * where the compile cache is stored. Only set if `status` is - * `module.constants.compileCacheStatus.ENABLED` or - * `module.constants.compileCacheStatus.ALREADY_ENABLED`. - */ - directory?: string; - } - interface Module extends NodeModule {} - class Module { - static runMain(): void; - static wrap(code: string): string; - static createRequire(path: string | URL): NodeRequire; - static builtinModules: string[]; - static isBuiltin(moduleName: string): boolean; - static Module: typeof Module; - static register( - specifier: string | URL, - parentURL?: string | URL, - options?: RegisterOptions, - ): void; - static register(specifier: string | URL, options?: RegisterOptions): void; - /** - * Enable [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache) - * in the current Node.js instance. - * - * If `cacheDir` is not specified, Node.js will either use the directory specified by the - * `NODE_COMPILE_CACHE=dir` environment variable if it's set, or use - * `path.join(os.tmpdir(), 'node-compile-cache')` otherwise. For general use cases, it's - * recommended to call `module.enableCompileCache()` without specifying the `cacheDir`, - * so that the directory can be overridden by the `NODE_COMPILE_CACHE` environment - * variable when necessary. - * - * Since compile cache is supposed to be a quiet optimization that is not required for the - * application to be functional, this method is designed to not throw any exception when the - * compile cache cannot be enabled. Instead, it will return an object containing an error - * message in the `message` field to aid debugging. - * If compile cache is enabled successfully, the `directory` field in the returned object - * contains the path to the directory where the compile cache is stored. The `status` - * field in the returned object would be one of the `module.constants.compileCacheStatus` - * values to indicate the result of the attempt to enable the - * [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache). - * - * This method only affects the current Node.js instance. To enable it in child worker threads, - * either call this method in child worker threads too, or set the - * `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can - * be inherited into the child workers. The directory can be obtained either from the - * `directory` field returned by this method, or with {@link getCompileCacheDir}. - * @since v22.8.0 - * @param cacheDir Optional path to specify the directory where the compile cache - * will be stored/retrieved. - */ - static enableCompileCache(cacheDir?: string): EnableCompileCacheResult; - /** - * @since v22.8.0 - * @return Path to the [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache) - * directory if it is enabled, or `undefined` otherwise. - */ - static getCompileCacheDir(): string | undefined; - constructor(id: string, parent?: Module); - } - global { - interface ImportMeta { - /** - * The directory name of the current module. This is the same as the `path.dirname()` of the `import.meta.filename`. - * **Caveat:** only present on `file:` modules. - */ - dirname: string; - /** - * The full absolute path and filename of the current module, with symlinks resolved. - * This is the same as the `url.fileURLToPath()` of the `import.meta.url`. - * **Caveat:** only local modules support this property. Modules not using the `file:` protocol will not provide it. - */ - filename: string; - /** - * The absolute `file:` URL of the module. - */ - url: string; - /** - * Provides a module-relative resolution function scoped to each module, returning - * the URL string. - * - * Second `parent` parameter is only used when the `--experimental-import-meta-resolve` - * command flag enabled. - * - * @since v20.6.0 - * - * @param specifier The module specifier to resolve relative to `parent`. - * @param parent The absolute parent module URL to resolve from. - * @returns The absolute (`file:`) URL string for the resolved module. - */ - resolve(specifier: string, parent?: string | URL | undefined): string; - } - } - export = Module; -} -declare module "node:module" { - import module = require("module"); - export = module; -} diff --git a/web/static/node_modules/@types/node/net.d.ts b/web/static/node_modules/@types/node/net.d.ts deleted file mode 100644 index d113e21f..00000000 --- a/web/static/node_modules/@types/node/net.d.ts +++ /dev/null @@ -1,1001 +0,0 @@ -/** - * > Stability: 2 - Stable - * - * The `node:net` module provides an asynchronous network API for creating stream-based - * TCP or `IPC` servers ({@link createServer}) and clients - * ({@link createConnection}). - * - * It can be accessed using: - * - * ```js - * import net from 'node:net'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/net.js) - */ -declare module "net" { - import * as stream from "node:stream"; - import { Abortable, EventEmitter } from "node:events"; - import * as dns from "node:dns"; - type LookupFunction = ( - hostname: string, - options: dns.LookupOptions, - callback: (err: NodeJS.ErrnoException | null, address: string | dns.LookupAddress[], family?: number) => void, - ) => void; - interface AddressInfo { - address: string; - family: string; - port: number; - } - interface SocketConstructorOpts { - fd?: number | undefined; - allowHalfOpen?: boolean | undefined; - onread?: OnReadOpts | undefined; - readable?: boolean | undefined; - writable?: boolean | undefined; - signal?: AbortSignal; - } - interface OnReadOpts { - buffer: Uint8Array | (() => Uint8Array); - /** - * This function is called for every chunk of incoming data. - * Two arguments are passed to it: the number of bytes written to `buffer` and a reference to `buffer`. - * Return `false` from this function to implicitly `pause()` the socket. - */ - callback(bytesWritten: number, buffer: Uint8Array): boolean; - } - // TODO: remove empty ConnectOpts placeholder at next major @types/node version. - /** @deprecated */ - interface ConnectOpts {} - interface TcpSocketConnectOpts { - port: number; - host?: string | undefined; - localAddress?: string | undefined; - localPort?: number | undefined; - hints?: number | undefined; - family?: number | undefined; - lookup?: LookupFunction | undefined; - noDelay?: boolean | undefined; - keepAlive?: boolean | undefined; - keepAliveInitialDelay?: number | undefined; - /** - * @since v18.13.0 - */ - autoSelectFamily?: boolean | undefined; - /** - * @since v18.13.0 - */ - autoSelectFamilyAttemptTimeout?: number | undefined; - } - interface IpcSocketConnectOpts { - path: string; - } - type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; - type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed"; - /** - * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint - * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also - * an `EventEmitter`. - * - * A `net.Socket` can be created by the user and used directly to interact with - * a server. For example, it is returned by {@link createConnection}, - * so the user can use it to talk to the server. - * - * It can also be created by Node.js and passed to the user when a connection - * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use - * it to interact with the client. - * @since v0.3.4 - */ - class Socket extends stream.Duplex { - constructor(options?: SocketConstructorOpts); - /** - * Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately. - * If the socket is still writable it implicitly calls `socket.end()`. - * @since v0.3.4 - */ - destroySoon(): void; - /** - * Sends data on the socket. The second parameter specifies the encoding in the - * case of a string. It defaults to UTF8 encoding. - * - * Returns `true` if the entire data was flushed successfully to the kernel - * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free. - * - * The optional `callback` parameter will be executed when the data is finally - * written out, which may not be immediately. - * - * See `Writable` stream `write()` method for more - * information. - * @since v0.1.90 - * @param [encoding='utf8'] Only used when data is `string`. - */ - write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean; - write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean; - /** - * Initiate a connection on a given socket. - * - * Possible signatures: - * - * * `socket.connect(options[, connectListener])` - * * `socket.connect(path[, connectListener])` for `IPC` connections. - * * `socket.connect(port[, host][, connectListener])` for TCP connections. - * * Returns: `net.Socket` The socket itself. - * - * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting, - * instead of a `'connect'` event, an `'error'` event will be emitted with - * the error passed to the `'error'` listener. - * The last parameter `connectListener`, if supplied, will be added as a listener - * for the `'connect'` event **once**. - * - * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined - * behavior. - */ - connect(options: SocketConnectOpts, connectionListener?: () => void): this; - connect(port: number, host: string, connectionListener?: () => void): this; - connect(port: number, connectionListener?: () => void): this; - connect(path: string, connectionListener?: () => void): this; - /** - * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information. - * @since v0.1.90 - * @return The socket itself. - */ - setEncoding(encoding?: BufferEncoding): this; - /** - * Pauses the reading of data. That is, `'data'` events will not be emitted. - * Useful to throttle back an upload. - * @return The socket itself. - */ - pause(): this; - /** - * Close the TCP connection by sending an RST packet and destroy the stream. - * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected. - * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. - * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error. - * @since v18.3.0, v16.17.0 - */ - resetAndDestroy(): this; - /** - * Resumes reading after a call to `socket.pause()`. - * @return The socket itself. - */ - resume(): this; - /** - * Sets the socket to timeout after `timeout` milliseconds of inactivity on - * the socket. By default `net.Socket` do not have a timeout. - * - * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to - * end the connection. - * - * ```js - * socket.setTimeout(3000); - * socket.on('timeout', () => { - * console.log('socket timeout'); - * socket.end(); - * }); - * ``` - * - * If `timeout` is 0, then the existing idle timeout is disabled. - * - * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event. - * @since v0.1.90 - * @return The socket itself. - */ - setTimeout(timeout: number, callback?: () => void): this; - /** - * Enable/disable the use of Nagle's algorithm. - * - * When a TCP connection is created, it will have Nagle's algorithm enabled. - * - * Nagle's algorithm delays data before it is sent via the network. It attempts - * to optimize throughput at the expense of latency. - * - * Passing `true` for `noDelay` or not passing an argument will disable Nagle's - * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's - * algorithm. - * @since v0.1.90 - * @param [noDelay=true] - * @return The socket itself. - */ - setNoDelay(noDelay?: boolean): this; - /** - * Enable/disable keep-alive functionality, and optionally set the initial - * delay before the first keepalive probe is sent on an idle socket. - * - * Set `initialDelay` (in milliseconds) to set the delay between the last - * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default - * (or previous) setting. - * - * Enabling the keep-alive functionality will set the following socket options: - * - * * `SO_KEEPALIVE=1` - * * `TCP_KEEPIDLE=initialDelay` - * * `TCP_KEEPCNT=10` - * * `TCP_KEEPINTVL=1` - * @since v0.1.92 - * @param [enable=false] - * @param [initialDelay=0] - * @return The socket itself. - */ - setKeepAlive(enable?: boolean, initialDelay?: number): this; - /** - * Returns the bound `address`, the address `family` name and `port` of the - * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` - * @since v0.1.90 - */ - address(): AddressInfo | {}; - /** - * Calling `unref()` on a socket will allow the program to exit if this is the only - * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect. - * @since v0.9.1 - * @return The socket itself. - */ - unref(): this; - /** - * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior). - * If the socket is `ref`ed calling `ref` again will have no effect. - * @since v0.9.1 - * @return The socket itself. - */ - ref(): this; - /** - * This property is only present if the family autoselection algorithm is enabled in `socket.connect(options)` - * and it is an array of the addresses that have been attempted. - * - * Each address is a string in the form of `$IP:$PORT`. - * If the connection was successful, then the last address is the one that the socket is currently connected to. - * @since v19.4.0 - */ - readonly autoSelectFamilyAttemptedAddresses: string[]; - /** - * This property shows the number of characters buffered for writing. The buffer - * may contain strings whose length after encoding is not yet known. So this number - * is only an approximation of the number of bytes in the buffer. - * - * `net.Socket` has the property that `socket.write()` always works. This is to - * help users get up and running quickly. The computer cannot always keep up - * with the amount of data that is written to a socket. The network connection - * simply might be too slow. Node.js will internally queue up the data written to a - * socket and send it out over the wire when it is possible. - * - * The consequence of this internal buffering is that memory may grow. - * Users who experience large or growing `bufferSize` should attempt to - * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`. - * @since v0.3.8 - * @deprecated Since v14.6.0 - Use `writableLength` instead. - */ - readonly bufferSize: number; - /** - * The amount of received bytes. - * @since v0.5.3 - */ - readonly bytesRead: number; - /** - * The amount of bytes sent. - * @since v0.5.3 - */ - readonly bytesWritten: number; - /** - * If `true`, `socket.connect(options[, connectListener])` was - * called and has not yet finished. It will stay `true` until the socket becomes - * connected, then it is set to `false` and the `'connect'` event is emitted. Note - * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event. - * @since v6.1.0 - */ - readonly connecting: boolean; - /** - * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting - * (see `socket.connecting`). - * @since v11.2.0, v10.16.0 - */ - readonly pending: boolean; - /** - * See `writable.destroyed` for further details. - */ - readonly destroyed: boolean; - /** - * The string representation of the local IP address the remote client is - * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client - * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`. - * @since v0.9.6 - */ - readonly localAddress?: string; - /** - * The numeric representation of the local port. For example, `80` or `21`. - * @since v0.9.6 - */ - readonly localPort?: number; - /** - * The string representation of the local IP family. `'IPv4'` or `'IPv6'`. - * @since v18.8.0, v16.18.0 - */ - readonly localFamily?: string; - /** - * This property represents the state of the connection as a string. - * - * * If the stream is connecting `socket.readyState` is `opening`. - * * If the stream is readable and writable, it is `open`. - * * If the stream is readable and not writable, it is `readOnly`. - * * If the stream is not readable and writable, it is `writeOnly`. - * @since v0.5.0 - */ - readonly readyState: SocketReadyState; - /** - * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if - * the socket is destroyed (for example, if the client disconnected). - * @since v0.5.10 - */ - readonly remoteAddress?: string | undefined; - /** - * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if - * the socket is destroyed (for example, if the client disconnected). - * @since v0.11.14 - */ - readonly remoteFamily?: string | undefined; - /** - * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if - * the socket is destroyed (for example, if the client disconnected). - * @since v0.5.10 - */ - readonly remotePort?: number | undefined; - /** - * The socket timeout in milliseconds as set by `socket.setTimeout()`. - * It is `undefined` if a timeout has not been set. - * @since v10.7.0 - */ - readonly timeout?: number | undefined; - /** - * Half-closes the socket. i.e., it sends a FIN packet. It is possible the - * server will still send some data. - * - * See `writable.end()` for further details. - * @since v0.1.90 - * @param [encoding='utf8'] Only used when data is `string`. - * @param callback Optional callback for when the socket is finished. - * @return The socket itself. - */ - end(callback?: () => void): this; - end(buffer: Uint8Array | string, callback?: () => void): this; - end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this; - /** - * events.EventEmitter - * 1. close - * 2. connect - * 3. connectionAttempt - * 4. connectionAttemptFailed - * 5. connectionAttemptTimeout - * 6. data - * 7. drain - * 8. end - * 9. error - * 10. lookup - * 11. ready - * 12. timeout - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: (hadError: boolean) => void): this; - addListener(event: "connect", listener: () => void): this; - addListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this; - addListener( - event: "connectionAttemptFailed", - listener: (ip: string, port: number, family: number) => void, - ): this; - addListener( - event: "connectionAttemptTimeout", - listener: (ip: string, port: number, family: number) => void, - ): this; - addListener(event: "data", listener: (data: Buffer) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener( - event: "lookup", - listener: (err: Error, address: string, family: string | number, host: string) => void, - ): this; - addListener(event: "ready", listener: () => void): this; - addListener(event: "timeout", listener: () => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close", hadError: boolean): boolean; - emit(event: "connect"): boolean; - emit(event: "connectionAttempt", ip: string, port: number, family: number): boolean; - emit(event: "connectionAttemptFailed", ip: string, port: number, family: number): boolean; - emit(event: "connectionAttemptTimeout", ip: string, port: number, family: number): boolean; - emit(event: "data", data: Buffer): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; - emit(event: "ready"): boolean; - emit(event: "timeout"): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: (hadError: boolean) => void): this; - on(event: "connect", listener: () => void): this; - on(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this; - on(event: "connectionAttemptFailed", listener: (ip: string, port: number, family: number) => void): this; - on(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this; - on(event: "data", listener: (data: Buffer) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on( - event: "lookup", - listener: (err: Error, address: string, family: string | number, host: string) => void, - ): this; - on(event: "ready", listener: () => void): this; - on(event: "timeout", listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: (hadError: boolean) => void): this; - once(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this; - once(event: "connectionAttemptFailed", listener: (ip: string, port: number, family: number) => void): this; - once(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this; - once(event: "connect", listener: () => void): this; - once(event: "data", listener: (data: Buffer) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once( - event: "lookup", - listener: (err: Error, address: string, family: string | number, host: string) => void, - ): this; - once(event: "ready", listener: () => void): this; - once(event: "timeout", listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: (hadError: boolean) => void): this; - prependListener(event: "connect", listener: () => void): this; - prependListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this; - prependListener( - event: "connectionAttemptFailed", - listener: (ip: string, port: number, family: number) => void, - ): this; - prependListener( - event: "connectionAttemptTimeout", - listener: (ip: string, port: number, family: number) => void, - ): this; - prependListener(event: "data", listener: (data: Buffer) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener( - event: "lookup", - listener: (err: Error, address: string, family: string | number, host: string) => void, - ): this; - prependListener(event: "ready", listener: () => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: (hadError: boolean) => void): this; - prependOnceListener(event: "connect", listener: () => void): this; - prependOnceListener( - event: "connectionAttempt", - listener: (ip: string, port: number, family: number) => void, - ): this; - prependOnceListener( - event: "connectionAttemptFailed", - listener: (ip: string, port: number, family: number) => void, - ): this; - prependOnceListener( - event: "connectionAttemptTimeout", - listener: (ip: string, port: number, family: number) => void, - ): this; - prependOnceListener(event: "data", listener: (data: Buffer) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener( - event: "lookup", - listener: (err: Error, address: string, family: string | number, host: string) => void, - ): this; - prependOnceListener(event: "ready", listener: () => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - } - interface ListenOptions extends Abortable { - port?: number | undefined; - host?: string | undefined; - backlog?: number | undefined; - path?: string | undefined; - exclusive?: boolean | undefined; - readableAll?: boolean | undefined; - writableAll?: boolean | undefined; - /** - * @default false - */ - ipv6Only?: boolean | undefined; - } - interface ServerOpts { - /** - * Indicates whether half-opened TCP connections are allowed. - * @default false - */ - allowHalfOpen?: boolean | undefined; - /** - * Indicates whether the socket should be paused on incoming connections. - * @default false - */ - pauseOnConnect?: boolean | undefined; - /** - * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. - * @default false - * @since v16.5.0 - */ - noDelay?: boolean | undefined; - /** - * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, - * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. - * @default false - * @since v16.5.0 - */ - keepAlive?: boolean | undefined; - /** - * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. - * @default 0 - * @since v16.5.0 - */ - keepAliveInitialDelay?: number | undefined; - /** - * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`. - * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v22.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode). - * @since v18.17.0, v20.1.0 - */ - highWaterMark?: number | undefined; - } - interface DropArgument { - localAddress?: string; - localPort?: number; - localFamily?: string; - remoteAddress?: string; - remotePort?: number; - remoteFamily?: string; - } - /** - * This class is used to create a TCP or `IPC` server. - * @since v0.1.90 - */ - class Server extends EventEmitter { - constructor(connectionListener?: (socket: Socket) => void); - constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void); - /** - * Start a server listening for connections. A `net.Server` can be a TCP or - * an `IPC` server depending on what it listens to. - * - * Possible signatures: - * - * * `server.listen(handle[, backlog][, callback])` - * * `server.listen(options[, callback])` - * * `server.listen(path[, backlog][, callback])` for `IPC` servers - * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers - * - * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'` - * event. - * - * All `listen()` methods can take a `backlog` parameter to specify the maximum - * length of the queue of pending connections. The actual length will be determined - * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on Linux. The default value of this parameter is 511 (not 512). - * - * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for - * details). - * - * The `server.listen()` method can be called again if and only if there was an - * error during the first `server.listen()` call or `server.close()` has been - * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. - * - * One of the most common errors raised when listening is `EADDRINUSE`. - * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry - * after a certain amount of time: - * - * ```js - * server.on('error', (e) => { - * if (e.code === 'EADDRINUSE') { - * console.error('Address in use, retrying...'); - * setTimeout(() => { - * server.close(); - * server.listen(PORT, HOST); - * }, 1000); - * } - * }); - * ``` - */ - listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; - listen(port?: number, hostname?: string, listeningListener?: () => void): this; - listen(port?: number, backlog?: number, listeningListener?: () => void): this; - listen(port?: number, listeningListener?: () => void): this; - listen(path: string, backlog?: number, listeningListener?: () => void): this; - listen(path: string, listeningListener?: () => void): this; - listen(options: ListenOptions, listeningListener?: () => void): this; - listen(handle: any, backlog?: number, listeningListener?: () => void): this; - listen(handle: any, listeningListener?: () => void): this; - /** - * Stops the server from accepting new connections and keeps existing - * connections. This function is asynchronous, the server is finally closed - * when all connections are ended and the server emits a `'close'` event. - * The optional `callback` will be called once the `'close'` event occurs. Unlike - * that event, it will be called with an `Error` as its only argument if the server - * was not open when it was closed. - * @since v0.1.90 - * @param callback Called when the server is closed. - */ - close(callback?: (err?: Error) => void): this; - /** - * Returns the bound `address`, the address `family` name, and `port` of the server - * as reported by the operating system if listening on an IP socket - * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. - * - * For a server listening on a pipe or Unix domain socket, the name is returned - * as a string. - * - * ```js - * const server = net.createServer((socket) => { - * socket.end('goodbye\n'); - * }).on('error', (err) => { - * // Handle errors here. - * throw err; - * }); - * - * // Grab an arbitrary unused port. - * server.listen(() => { - * console.log('opened server on', server.address()); - * }); - * ``` - * - * `server.address()` returns `null` before the `'listening'` event has been - * emitted or after calling `server.close()`. - * @since v0.1.90 - */ - address(): AddressInfo | string | null; - /** - * Asynchronously get the number of concurrent connections on the server. Works - * when sockets were sent to forks. - * - * Callback should take two arguments `err` and `count`. - * @since v0.9.7 - */ - getConnections(cb: (error: Error | null, count: number) => void): void; - /** - * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior). - * If the server is `ref`ed calling `ref()` again will have no effect. - * @since v0.9.1 - */ - ref(): this; - /** - * Calling `unref()` on a server will allow the program to exit if this is the only - * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect. - * @since v0.9.1 - */ - unref(): this; - /** - * Set this property to reject connections when the server's connection count gets - * high. - * - * It is not recommended to use this option once a socket has been sent to a child - * with `child_process.fork()`. - * @since v0.2.0 - */ - maxConnections: number; - connections: number; - /** - * Indicates whether or not the server is listening for connections. - * @since v5.7.0 - */ - readonly listening: boolean; - /** - * events.EventEmitter - * 1. close - * 2. connection - * 3. error - * 4. listening - * 5. drop - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connection", listener: (socket: Socket) => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "drop", listener: (data?: DropArgument) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "connection", socket: Socket): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit(event: "drop", data?: DropArgument): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "connection", listener: (socket: Socket) => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "drop", listener: (data?: DropArgument) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "connection", listener: (socket: Socket) => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "drop", listener: (data?: DropArgument) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connection", listener: (socket: Socket) => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "drop", listener: (data?: DropArgument) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "drop", listener: (data?: DropArgument) => void): this; - /** - * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed. - * @since v20.5.0 - */ - [Symbol.asyncDispose](): Promise; - } - type IPVersion = "ipv4" | "ipv6"; - /** - * The `BlockList` object can be used with some network APIs to specify rules for - * disabling inbound or outbound access to specific IP addresses, IP ranges, or - * IP subnets. - * @since v15.0.0, v14.18.0 - */ - class BlockList { - /** - * Adds a rule to block the given IP address. - * @since v15.0.0, v14.18.0 - * @param address An IPv4 or IPv6 address. - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - addAddress(address: string, type?: IPVersion): void; - addAddress(address: SocketAddress): void; - /** - * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). - * @since v15.0.0, v14.18.0 - * @param start The starting IPv4 or IPv6 address in the range. - * @param end The ending IPv4 or IPv6 address in the range. - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - addRange(start: string, end: string, type?: IPVersion): void; - addRange(start: SocketAddress, end: SocketAddress): void; - /** - * Adds a rule to block a range of IP addresses specified as a subnet mask. - * @since v15.0.0, v14.18.0 - * @param net The network IPv4 or IPv6 address. - * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`. - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - addSubnet(net: SocketAddress, prefix: number): void; - addSubnet(net: string, prefix: number, type?: IPVersion): void; - /** - * Returns `true` if the given IP address matches any of the rules added to the`BlockList`. - * - * ```js - * const blockList = new net.BlockList(); - * blockList.addAddress('123.123.123.123'); - * blockList.addRange('10.0.0.1', '10.0.0.10'); - * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); - * - * console.log(blockList.check('123.123.123.123')); // Prints: true - * console.log(blockList.check('10.0.0.3')); // Prints: true - * console.log(blockList.check('222.111.111.222')); // Prints: false - * - * // IPv6 notation for IPv4 addresses works: - * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true - * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true - * ``` - * @since v15.0.0, v14.18.0 - * @param address The IP address to check - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - check(address: SocketAddress): boolean; - check(address: string, type?: IPVersion): boolean; - /** - * The list of rules added to the blocklist. - * @since v15.0.0, v14.18.0 - */ - rules: readonly string[]; - } - interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { - timeout?: number | undefined; - } - interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { - timeout?: number | undefined; - } - type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; - /** - * Creates a new TCP or `IPC` server. - * - * If `allowHalfOpen` is set to `true`, when the other end of the socket - * signals the end of transmission, the server will only send back the end of - * transmission when `socket.end()` is explicitly called. For example, in the - * context of TCP, when a FIN packed is received, a FIN packed is sent - * back only when `socket.end()` is explicitly called. Until then the - * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information. - * - * If `pauseOnConnect` is set to `true`, then the socket associated with each - * incoming connection will be paused, and no data will be read from its handle. - * This allows connections to be passed between processes without any data being - * read by the original process. To begin reading data from a paused socket, call `socket.resume()`. - * - * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to. - * - * Here is an example of a TCP echo server which listens for connections - * on port 8124: - * - * ```js - * import net from 'node:net'; - * const server = net.createServer((c) => { - * // 'connection' listener. - * console.log('client connected'); - * c.on('end', () => { - * console.log('client disconnected'); - * }); - * c.write('hello\r\n'); - * c.pipe(c); - * }); - * server.on('error', (err) => { - * throw err; - * }); - * server.listen(8124, () => { - * console.log('server bound'); - * }); - * ``` - * - * Test this by using `telnet`: - * - * ```bash - * telnet localhost 8124 - * ``` - * - * To listen on the socket `/tmp/echo.sock`: - * - * ```js - * server.listen('/tmp/echo.sock', () => { - * console.log('server bound'); - * }); - * ``` - * - * Use `nc` to connect to a Unix domain socket server: - * - * ```bash - * nc -U /tmp/echo.sock - * ``` - * @since v0.5.0 - * @param connectionListener Automatically set as a listener for the {@link 'connection'} event. - */ - function createServer(connectionListener?: (socket: Socket) => void): Server; - function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server; - /** - * Aliases to {@link createConnection}. - * - * Possible signatures: - * - * * {@link connect} - * * {@link connect} for `IPC` connections. - * * {@link connect} for TCP connections. - */ - function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; - function connect(port: number, host?: string, connectionListener?: () => void): Socket; - function connect(path: string, connectionListener?: () => void): Socket; - /** - * A factory function, which creates a new {@link Socket}, - * immediately initiates connection with `socket.connect()`, - * then returns the `net.Socket` that starts the connection. - * - * When the connection is established, a `'connect'` event will be emitted - * on the returned socket. The last parameter `connectListener`, if supplied, - * will be added as a listener for the `'connect'` event **once**. - * - * Possible signatures: - * - * * {@link createConnection} - * * {@link createConnection} for `IPC` connections. - * * {@link createConnection} for TCP connections. - * - * The {@link connect} function is an alias to this function. - */ - function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; - function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; - function createConnection(path: string, connectionListener?: () => void): Socket; - /** - * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`. - * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided. - * @since v19.4.0 - */ - function getDefaultAutoSelectFamily(): boolean; - /** - * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`. - * @since v19.4.0 - */ - function setDefaultAutoSelectFamily(value: boolean): void; - /** - * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. - * The initial default value is `250` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`. - * @returns The current default value of the `autoSelectFamilyAttemptTimeout` option. - * @since v19.8.0, v18.8.0 - */ - function getDefaultAutoSelectFamilyAttemptTimeout(): number; - /** - * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. - * @param value The new default value, which must be a positive number. If the number is less than `10`, the value `10` is used instead. The initial default value is `250` or the value specified via the command line - * option `--network-family-autoselection-attempt-timeout`. - * @since v19.8.0, v18.8.0 - */ - function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void; - /** - * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4 - * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`. - * - * ```js - * net.isIP('::1'); // returns 6 - * net.isIP('127.0.0.1'); // returns 4 - * net.isIP('127.000.000.001'); // returns 0 - * net.isIP('127.0.0.1/24'); // returns 0 - * net.isIP('fhqwhgads'); // returns 0 - * ``` - * @since v0.3.0 - */ - function isIP(input: string): number; - /** - * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no - * leading zeroes. Otherwise, returns `false`. - * - * ```js - * net.isIPv4('127.0.0.1'); // returns true - * net.isIPv4('127.000.000.001'); // returns false - * net.isIPv4('127.0.0.1/24'); // returns false - * net.isIPv4('fhqwhgads'); // returns false - * ``` - * @since v0.3.0 - */ - function isIPv4(input: string): boolean; - /** - * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`. - * - * ```js - * net.isIPv6('::1'); // returns true - * net.isIPv6('fhqwhgads'); // returns false - * ``` - * @since v0.3.0 - */ - function isIPv6(input: string): boolean; - interface SocketAddressInitOptions { - /** - * The network address as either an IPv4 or IPv6 string. - * @default 127.0.0.1 - */ - address?: string | undefined; - /** - * @default `'ipv4'` - */ - family?: IPVersion | undefined; - /** - * An IPv6 flow-label used only if `family` is `'ipv6'`. - * @default 0 - */ - flowlabel?: number | undefined; - /** - * An IP port. - * @default 0 - */ - port?: number | undefined; - } - /** - * @since v15.14.0, v14.18.0 - */ - class SocketAddress { - constructor(options: SocketAddressInitOptions); - /** - * Either \`'ipv4'\` or \`'ipv6'\`. - * @since v15.14.0, v14.18.0 - */ - readonly address: string; - /** - * Either \`'ipv4'\` or \`'ipv6'\`. - * @since v15.14.0, v14.18.0 - */ - readonly family: IPVersion; - /** - * @since v15.14.0, v14.18.0 - */ - readonly port: number; - /** - * @since v15.14.0, v14.18.0 - */ - readonly flowlabel: number; - } -} -declare module "node:net" { - export * from "net"; -} diff --git a/web/static/node_modules/@types/node/os.d.ts b/web/static/node_modules/@types/node/os.d.ts deleted file mode 100644 index 7f305358..00000000 --- a/web/static/node_modules/@types/node/os.d.ts +++ /dev/null @@ -1,495 +0,0 @@ -/** - * The `node:os` module provides operating system-related utility methods and - * properties. It can be accessed using: - * - * ```js - * import os from 'node:os'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/os.js) - */ -declare module "os" { - interface CpuInfo { - model: string; - speed: number; - times: { - /** The number of milliseconds the CPU has spent in user mode. */ - user: number; - /** The number of milliseconds the CPU has spent in nice mode. */ - nice: number; - /** The number of milliseconds the CPU has spent in sys mode. */ - sys: number; - /** The number of milliseconds the CPU has spent in idle mode. */ - idle: number; - /** The number of milliseconds the CPU has spent in irq mode. */ - irq: number; - }; - } - interface NetworkInterfaceBase { - address: string; - netmask: string; - mac: string; - internal: boolean; - cidr: string | null; - } - interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { - family: "IPv4"; - scopeid?: undefined; - } - interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { - family: "IPv6"; - scopeid: number; - } - interface UserInfo { - username: T; - uid: number; - gid: number; - shell: T | null; - homedir: T; - } - type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; - /** - * Returns the host name of the operating system as a string. - * @since v0.3.3 - */ - function hostname(): string; - /** - * Returns an array containing the 1, 5, and 15 minute load averages. - * - * The load average is a measure of system activity calculated by the operating - * system and expressed as a fractional number. - * - * The load average is a Unix-specific concept. On Windows, the return value is - * always `[0, 0, 0]`. - * @since v0.3.3 - */ - function loadavg(): number[]; - /** - * Returns the system uptime in number of seconds. - * @since v0.3.3 - */ - function uptime(): number; - /** - * Returns the amount of free system memory in bytes as an integer. - * @since v0.3.3 - */ - function freemem(): number; - /** - * Returns the total amount of system memory in bytes as an integer. - * @since v0.3.3 - */ - function totalmem(): number; - /** - * Returns an array of objects containing information about each logical CPU core. - * The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable. - * - * The properties included on each object include: - * - * ```js - * [ - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 252020, - * nice: 0, - * sys: 30340, - * idle: 1070356870, - * irq: 0, - * }, - * }, - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 306960, - * nice: 0, - * sys: 26980, - * idle: 1071569080, - * irq: 0, - * }, - * }, - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 248450, - * nice: 0, - * sys: 21750, - * idle: 1070919370, - * irq: 0, - * }, - * }, - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 256880, - * nice: 0, - * sys: 19430, - * idle: 1070905480, - * irq: 20, - * }, - * }, - * ] - * ``` - * - * `nice` values are POSIX-only. On Windows, the `nice` values of all processors - * are always 0. - * - * `os.cpus().length` should not be used to calculate the amount of parallelism - * available to an application. Use {@link availableParallelism} for this purpose. - * @since v0.3.3 - */ - function cpus(): CpuInfo[]; - /** - * Returns an estimate of the default amount of parallelism a program should use. - * Always returns a value greater than zero. - * - * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism). - * @since v19.4.0, v18.14.0 - */ - function availableParallelism(): number; - /** - * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it - * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows. - * - * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information - * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems. - * @since v0.3.3 - */ - function type(): string; - /** - * Returns the operating system as a string. - * - * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See - * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. - * @since v0.3.3 - */ - function release(): string; - /** - * Returns an object containing network interfaces that have been assigned a - * network address. - * - * Each key on the returned object identifies a network interface. The associated - * value is an array of objects that each describe an assigned network address. - * - * The properties available on the assigned network address object include: - * - * ```js - * { - * lo: [ - * { - * address: '127.0.0.1', - * netmask: '255.0.0.0', - * family: 'IPv4', - * mac: '00:00:00:00:00:00', - * internal: true, - * cidr: '127.0.0.1/8' - * }, - * { - * address: '::1', - * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', - * family: 'IPv6', - * mac: '00:00:00:00:00:00', - * scopeid: 0, - * internal: true, - * cidr: '::1/128' - * } - * ], - * eth0: [ - * { - * address: '192.168.1.108', - * netmask: '255.255.255.0', - * family: 'IPv4', - * mac: '01:02:03:0a:0b:0c', - * internal: false, - * cidr: '192.168.1.108/24' - * }, - * { - * address: 'fe80::a00:27ff:fe4e:66a1', - * netmask: 'ffff:ffff:ffff:ffff::', - * family: 'IPv6', - * mac: '01:02:03:0a:0b:0c', - * scopeid: 1, - * internal: false, - * cidr: 'fe80::a00:27ff:fe4e:66a1/64' - * } - * ] - * } - * ``` - * @since v0.6.0 - */ - function networkInterfaces(): NodeJS.Dict; - /** - * Returns the string path of the current user's home directory. - * - * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it - * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory. - * - * On Windows, it uses the `USERPROFILE` environment variable if defined. - * Otherwise it uses the path to the profile directory of the current user. - * @since v2.3.0 - */ - function homedir(): string; - /** - * Returns information about the currently effective user. On POSIX platforms, - * this is typically a subset of the password file. The returned object includes - * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`. - * - * The value of `homedir` returned by `os.userInfo()` is provided by the operating - * system. This differs from the result of `os.homedir()`, which queries - * environment variables for the home directory before falling back to the - * operating system response. - * - * Throws a [`SystemError`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`. - * @since v6.0.0 - */ - function userInfo(options: { encoding: "buffer" }): UserInfo; - function userInfo(options?: { encoding: BufferEncoding }): UserInfo; - type SignalConstants = { - [key in NodeJS.Signals]: number; - }; - namespace constants { - const UV_UDP_REUSEADDR: number; - namespace signals {} - const signals: SignalConstants; - namespace errno { - const E2BIG: number; - const EACCES: number; - const EADDRINUSE: number; - const EADDRNOTAVAIL: number; - const EAFNOSUPPORT: number; - const EAGAIN: number; - const EALREADY: number; - const EBADF: number; - const EBADMSG: number; - const EBUSY: number; - const ECANCELED: number; - const ECHILD: number; - const ECONNABORTED: number; - const ECONNREFUSED: number; - const ECONNRESET: number; - const EDEADLK: number; - const EDESTADDRREQ: number; - const EDOM: number; - const EDQUOT: number; - const EEXIST: number; - const EFAULT: number; - const EFBIG: number; - const EHOSTUNREACH: number; - const EIDRM: number; - const EILSEQ: number; - const EINPROGRESS: number; - const EINTR: number; - const EINVAL: number; - const EIO: number; - const EISCONN: number; - const EISDIR: number; - const ELOOP: number; - const EMFILE: number; - const EMLINK: number; - const EMSGSIZE: number; - const EMULTIHOP: number; - const ENAMETOOLONG: number; - const ENETDOWN: number; - const ENETRESET: number; - const ENETUNREACH: number; - const ENFILE: number; - const ENOBUFS: number; - const ENODATA: number; - const ENODEV: number; - const ENOENT: number; - const ENOEXEC: number; - const ENOLCK: number; - const ENOLINK: number; - const ENOMEM: number; - const ENOMSG: number; - const ENOPROTOOPT: number; - const ENOSPC: number; - const ENOSR: number; - const ENOSTR: number; - const ENOSYS: number; - const ENOTCONN: number; - const ENOTDIR: number; - const ENOTEMPTY: number; - const ENOTSOCK: number; - const ENOTSUP: number; - const ENOTTY: number; - const ENXIO: number; - const EOPNOTSUPP: number; - const EOVERFLOW: number; - const EPERM: number; - const EPIPE: number; - const EPROTO: number; - const EPROTONOSUPPORT: number; - const EPROTOTYPE: number; - const ERANGE: number; - const EROFS: number; - const ESPIPE: number; - const ESRCH: number; - const ESTALE: number; - const ETIME: number; - const ETIMEDOUT: number; - const ETXTBSY: number; - const EWOULDBLOCK: number; - const EXDEV: number; - const WSAEINTR: number; - const WSAEBADF: number; - const WSAEACCES: number; - const WSAEFAULT: number; - const WSAEINVAL: number; - const WSAEMFILE: number; - const WSAEWOULDBLOCK: number; - const WSAEINPROGRESS: number; - const WSAEALREADY: number; - const WSAENOTSOCK: number; - const WSAEDESTADDRREQ: number; - const WSAEMSGSIZE: number; - const WSAEPROTOTYPE: number; - const WSAENOPROTOOPT: number; - const WSAEPROTONOSUPPORT: number; - const WSAESOCKTNOSUPPORT: number; - const WSAEOPNOTSUPP: number; - const WSAEPFNOSUPPORT: number; - const WSAEAFNOSUPPORT: number; - const WSAEADDRINUSE: number; - const WSAEADDRNOTAVAIL: number; - const WSAENETDOWN: number; - const WSAENETUNREACH: number; - const WSAENETRESET: number; - const WSAECONNABORTED: number; - const WSAECONNRESET: number; - const WSAENOBUFS: number; - const WSAEISCONN: number; - const WSAENOTCONN: number; - const WSAESHUTDOWN: number; - const WSAETOOMANYREFS: number; - const WSAETIMEDOUT: number; - const WSAECONNREFUSED: number; - const WSAELOOP: number; - const WSAENAMETOOLONG: number; - const WSAEHOSTDOWN: number; - const WSAEHOSTUNREACH: number; - const WSAENOTEMPTY: number; - const WSAEPROCLIM: number; - const WSAEUSERS: number; - const WSAEDQUOT: number; - const WSAESTALE: number; - const WSAEREMOTE: number; - const WSASYSNOTREADY: number; - const WSAVERNOTSUPPORTED: number; - const WSANOTINITIALISED: number; - const WSAEDISCON: number; - const WSAENOMORE: number; - const WSAECANCELLED: number; - const WSAEINVALIDPROCTABLE: number; - const WSAEINVALIDPROVIDER: number; - const WSAEPROVIDERFAILEDINIT: number; - const WSASYSCALLFAILURE: number; - const WSASERVICE_NOT_FOUND: number; - const WSATYPE_NOT_FOUND: number; - const WSA_E_NO_MORE: number; - const WSA_E_CANCELLED: number; - const WSAEREFUSED: number; - } - namespace dlopen { - const RTLD_LAZY: number; - const RTLD_NOW: number; - const RTLD_GLOBAL: number; - const RTLD_LOCAL: number; - const RTLD_DEEPBIND: number; - } - namespace priority { - const PRIORITY_LOW: number; - const PRIORITY_BELOW_NORMAL: number; - const PRIORITY_NORMAL: number; - const PRIORITY_ABOVE_NORMAL: number; - const PRIORITY_HIGH: number; - const PRIORITY_HIGHEST: number; - } - } - const devNull: string; - /** - * The operating system-specific end-of-line marker. - * * `\n` on POSIX - * * `\r\n` on Windows - */ - const EOL: string; - /** - * Returns the operating system CPU architecture for which the Node.js binary was - * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, - * and `'x64'`. - * - * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v22.x/api/process.html#processarch). - * @since v0.5.0 - */ - function arch(): string; - /** - * Returns a string identifying the kernel version. - * - * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not - * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. - * @since v13.11.0, v12.17.0 - */ - function version(): string; - /** - * Returns a string identifying the operating system platform for which - * the Node.js binary was compiled. The value is set at compile time. - * Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`. - * - * The return value is equivalent to `process.platform`. - * - * The value `'android'` may also be returned if Node.js is built on the Android - * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). - * @since v0.5.0 - */ - function platform(): NodeJS.Platform; - /** - * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, `mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`. - * - * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not - * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. - * @since v18.9.0, v16.18.0 - */ - function machine(): string; - /** - * Returns the operating system's default directory for temporary files as a - * string. - * @since v0.9.9 - */ - function tmpdir(): string; - /** - * Returns a string identifying the endianness of the CPU for which the Node.js - * binary was compiled. - * - * Possible values are `'BE'` for big endian and `'LE'` for little endian. - * @since v0.9.4 - */ - function endianness(): "BE" | "LE"; - /** - * Returns the scheduling priority for the process specified by `pid`. If `pid` is - * not provided or is `0`, the priority of the current process is returned. - * @since v10.10.0 - * @param [pid=0] The process ID to retrieve scheduling priority for. - */ - function getPriority(pid?: number): number; - /** - * Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used. - * - * The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows - * priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range - * mapping may cause the return value to be slightly different on Windows. To avoid - * confusion, set `priority` to one of the priority constants. - * - * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user - * privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`. - * @since v10.10.0 - * @param [pid=0] The process ID to set scheduling priority for. - * @param priority The scheduling priority to assign to the process. - */ - function setPriority(priority: number): void; - function setPriority(pid: number, priority: number): void; -} -declare module "node:os" { - export * from "os"; -} diff --git a/web/static/node_modules/@types/node/package.json b/web/static/node_modules/@types/node/package.json deleted file mode 100644 index 20ace583..00000000 --- a/web/static/node_modules/@types/node/package.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "name": "@types/node", - "version": "22.9.1", - "description": "TypeScript definitions for node", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", - "license": "MIT", - "contributors": [ - { - "name": "Microsoft TypeScript", - "githubUsername": "Microsoft", - "url": "https://github.com/Microsoft" - }, - { - "name": "Alberto Schiabel", - "githubUsername": "jkomyno", - "url": "https://github.com/jkomyno" - }, - { - "name": "Alvis HT Tang", - "githubUsername": "alvis", - "url": "https://github.com/alvis" - }, - { - "name": "Andrew Makarov", - "githubUsername": "r3nya", - "url": "https://github.com/r3nya" - }, - { - "name": "Benjamin Toueg", - "githubUsername": "btoueg", - "url": "https://github.com/btoueg" - }, - { - "name": "Chigozirim C.", - "githubUsername": "smac89", - "url": "https://github.com/smac89" - }, - { - "name": "David Junger", - "githubUsername": "touffy", - "url": "https://github.com/touffy" - }, - { - "name": "Deividas Bakanas", - "githubUsername": "DeividasBakanas", - "url": "https://github.com/DeividasBakanas" - }, - { - "name": "Eugene Y. Q. Shen", - "githubUsername": "eyqs", - "url": "https://github.com/eyqs" - }, - { - "name": "Hannes Magnusson", - "githubUsername": "Hannes-Magnusson-CK", - "url": "https://github.com/Hannes-Magnusson-CK" - }, - { - "name": "Huw", - "githubUsername": "hoo29", - "url": "https://github.com/hoo29" - }, - { - "name": "Kelvin Jin", - "githubUsername": "kjin", - "url": "https://github.com/kjin" - }, - { - "name": "Klaus Meinhardt", - "githubUsername": "ajafff", - "url": "https://github.com/ajafff" - }, - { - "name": "Lishude", - "githubUsername": "islishude", - "url": "https://github.com/islishude" - }, - { - "name": "Mariusz Wiktorczyk", - "githubUsername": "mwiktorczyk", - "url": "https://github.com/mwiktorczyk" - }, - { - "name": "Mohsen Azimi", - "githubUsername": "mohsen1", - "url": "https://github.com/mohsen1" - }, - { - "name": "Nikita Galkin", - "githubUsername": "galkin", - "url": "https://github.com/galkin" - }, - { - "name": "Parambir Singh", - "githubUsername": "parambirs", - "url": "https://github.com/parambirs" - }, - { - "name": "Sebastian Silbermann", - "githubUsername": "eps1lon", - "url": "https://github.com/eps1lon" - }, - { - "name": "Thomas den Hollander", - "githubUsername": "ThomasdenH", - "url": "https://github.com/ThomasdenH" - }, - { - "name": "Wilco Bakker", - "githubUsername": "WilcoBakker", - "url": "https://github.com/WilcoBakker" - }, - { - "name": "wwwy3y3", - "githubUsername": "wwwy3y3", - "url": "https://github.com/wwwy3y3" - }, - { - "name": "Samuel Ainsworth", - "githubUsername": "samuela", - "url": "https://github.com/samuela" - }, - { - "name": "Kyle Uehlein", - "githubUsername": "kuehlein", - "url": "https://github.com/kuehlein" - }, - { - "name": "Thanik Bhongbhibhat", - "githubUsername": "bhongy", - "url": "https://github.com/bhongy" - }, - { - "name": "Marcin Kopacz", - "githubUsername": "chyzwar", - "url": "https://github.com/chyzwar" - }, - { - "name": "Trivikram Kamat", - "githubUsername": "trivikr", - "url": "https://github.com/trivikr" - }, - { - "name": "Junxiao Shi", - "githubUsername": "yoursunny", - "url": "https://github.com/yoursunny" - }, - { - "name": "Ilia Baryshnikov", - "githubUsername": "qwelias", - "url": "https://github.com/qwelias" - }, - { - "name": "ExE Boss", - "githubUsername": "ExE-Boss", - "url": "https://github.com/ExE-Boss" - }, - { - "name": "Piotr Błażejewicz", - "githubUsername": "peterblazejewicz", - "url": "https://github.com/peterblazejewicz" - }, - { - "name": "Anna Henningsen", - "githubUsername": "addaleax", - "url": "https://github.com/addaleax" - }, - { - "name": "Victor Perin", - "githubUsername": "victorperin", - "url": "https://github.com/victorperin" - }, - { - "name": "Yongsheng Zhang", - "githubUsername": "ZYSzys", - "url": "https://github.com/ZYSzys" - }, - { - "name": "NodeJS Contributors", - "githubUsername": "NodeJS", - "url": "https://github.com/NodeJS" - }, - { - "name": "Linus Unnebäck", - "githubUsername": "LinusU", - "url": "https://github.com/LinusU" - }, - { - "name": "wafuwafu13", - "githubUsername": "wafuwafu13", - "url": "https://github.com/wafuwafu13" - }, - { - "name": "Matteo Collina", - "githubUsername": "mcollina", - "url": "https://github.com/mcollina" - }, - { - "name": "Dmitry Semigradsky", - "githubUsername": "Semigradsky", - "url": "https://github.com/Semigradsky" - } - ], - "main": "", - "types": "index.d.ts", - "typesVersions": { - "<=5.6": { - "*": [ - "ts5.6/*" - ] - } - }, - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/node" - }, - "scripts": {}, - "dependencies": { - "undici-types": "~6.19.8" - }, - "peerDependencies": {}, - "typesPublisherContentHash": "8cdfe0993eefe6c2c47cdca25f2e469aebde173da438c2effa178b85614d5022", - "typeScriptVersion": "4.9" -} \ No newline at end of file diff --git a/web/static/node_modules/@types/node/path.d.ts b/web/static/node_modules/@types/node/path.d.ts deleted file mode 100644 index 25bfc802..00000000 --- a/web/static/node_modules/@types/node/path.d.ts +++ /dev/null @@ -1,200 +0,0 @@ -declare module "path/posix" { - import path = require("path"); - export = path; -} -declare module "path/win32" { - import path = require("path"); - export = path; -} -/** - * The `node:path` module provides utilities for working with file and directory - * paths. It can be accessed using: - * - * ```js - * import path from 'node:path'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/path.js) - */ -declare module "path" { - namespace path { - /** - * A parsed path object generated by path.parse() or consumed by path.format(). - */ - interface ParsedPath { - /** - * The root of the path such as '/' or 'c:\' - */ - root: string; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir: string; - /** - * The file name including extension (if any) such as 'index.html' - */ - base: string; - /** - * The file extension (if any) such as '.html' - */ - ext: string; - /** - * The file name without extension (if any) such as 'index' - */ - name: string; - } - interface FormatInputPathObject { - /** - * The root of the path such as '/' or 'c:\' - */ - root?: string | undefined; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir?: string | undefined; - /** - * The file name including extension (if any) such as 'index.html' - */ - base?: string | undefined; - /** - * The file extension (if any) such as '.html' - */ - ext?: string | undefined; - /** - * The file name without extension (if any) such as 'index' - */ - name?: string | undefined; - } - interface PlatformPath { - /** - * Normalize a string path, reducing '..' and '.' parts. - * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. - * - * @param path string path to normalize. - * @throws {TypeError} if `path` is not a string. - */ - normalize(path: string): string; - /** - * Join all arguments together and normalize the resulting path. - * - * @param paths paths to join. - * @throws {TypeError} if any of the path segments is not a string. - */ - join(...paths: string[]): string; - /** - * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. - * - * Starting from leftmost {from} parameter, resolves {to} to an absolute path. - * - * If {to} isn't already absolute, {from} arguments are prepended in right to left order, - * until an absolute path is found. If after using all {from} paths still no absolute path is found, - * the current working directory is used as well. The resulting path is normalized, - * and trailing slashes are removed unless the path gets resolved to the root directory. - * - * @param paths A sequence of paths or path segments. - * @throws {TypeError} if any of the arguments is not a string. - */ - resolve(...paths: string[]): string; - /** - * The `path.matchesGlob()` method determines if `path` matches the `pattern`. - * @param path The path to glob-match against. - * @param pattern The glob to check the path against. - * @returns Whether or not the `path` matched the `pattern`. - * @throws {TypeError} if `path` or `pattern` are not strings. - * @since v22.5.0 - */ - matchesGlob(path: string, pattern: string): boolean; - /** - * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. - * - * If the given {path} is a zero-length string, `false` will be returned. - * - * @param path path to test. - * @throws {TypeError} if `path` is not a string. - */ - isAbsolute(path: string): boolean; - /** - * Solve the relative path from {from} to {to} based on the current working directory. - * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. - * - * @throws {TypeError} if either `from` or `to` is not a string. - */ - relative(from: string, to: string): string; - /** - * Return the directory name of a path. Similar to the Unix dirname command. - * - * @param path the path to evaluate. - * @throws {TypeError} if `path` is not a string. - */ - dirname(path: string): string; - /** - * Return the last portion of a path. Similar to the Unix basename command. - * Often used to extract the file name from a fully qualified path. - * - * @param path the path to evaluate. - * @param suffix optionally, an extension to remove from the result. - * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string. - */ - basename(path: string, suffix?: string): string; - /** - * Return the extension of the path, from the last '.' to end of string in the last portion of the path. - * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string. - * - * @param path the path to evaluate. - * @throws {TypeError} if `path` is not a string. - */ - extname(path: string): string; - /** - * The platform-specific file separator. '\\' or '/'. - */ - readonly sep: "\\" | "/"; - /** - * The platform-specific file delimiter. ';' or ':'. - */ - readonly delimiter: ";" | ":"; - /** - * Returns an object from a path string - the opposite of format(). - * - * @param path path to evaluate. - * @throws {TypeError} if `path` is not a string. - */ - parse(path: string): ParsedPath; - /** - * Returns a path string from an object - the opposite of parse(). - * - * @param pathObject path to evaluate. - */ - format(pathObject: FormatInputPathObject): string; - /** - * On Windows systems only, returns an equivalent namespace-prefixed path for the given path. - * If path is not a string, path will be returned without modifications. - * This method is meaningful only on Windows system. - * On POSIX systems, the method is non-operational and always returns path without modifications. - */ - toNamespacedPath(path: string): string; - /** - * Posix specific pathing. - * Same as parent object on posix. - */ - readonly posix: PlatformPath; - /** - * Windows specific pathing. - * Same as parent object on windows - */ - readonly win32: PlatformPath; - } - } - const path: path.PlatformPath; - export = path; -} -declare module "node:path" { - import path = require("path"); - export = path; -} -declare module "node:path/posix" { - import path = require("path/posix"); - export = path; -} -declare module "node:path/win32" { - import path = require("path/win32"); - export = path; -} diff --git a/web/static/node_modules/@types/node/perf_hooks.d.ts b/web/static/node_modules/@types/node/perf_hooks.d.ts deleted file mode 100644 index 8c39ad0f..00000000 --- a/web/static/node_modules/@types/node/perf_hooks.d.ts +++ /dev/null @@ -1,965 +0,0 @@ -/** - * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for - * Node.js-specific performance measurements. - * - * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/): - * - * * [High Resolution Time](https://www.w3.org/TR/hr-time-2) - * * [Performance Timeline](https://w3c.github.io/performance-timeline/) - * * [User Timing](https://www.w3.org/TR/user-timing/) - * * [Resource Timing](https://www.w3.org/TR/resource-timing-2/) - * - * ```js - * import { PerformanceObserver, performance } from 'node:perf_hooks'; - * - * const obs = new PerformanceObserver((items) => { - * console.log(items.getEntries()[0].duration); - * performance.clearMarks(); - * }); - * obs.observe({ type: 'measure' }); - * performance.measure('Start to Now'); - * - * performance.mark('A'); - * doSomeLongRunningProcess(() => { - * performance.measure('A to Now', 'A'); - * - * performance.mark('B'); - * performance.measure('A to B', 'A', 'B'); - * }); - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/perf_hooks.js) - */ -declare module "perf_hooks" { - import { AsyncResource } from "node:async_hooks"; - type EntryType = - | "dns" // Node.js only - | "function" // Node.js only - | "gc" // Node.js only - | "http2" // Node.js only - | "http" // Node.js only - | "mark" // available on the Web - | "measure" // available on the Web - | "net" // Node.js only - | "node" // Node.js only - | "resource"; // available on the Web - interface NodeGCPerformanceDetail { - /** - * When `performanceEntry.entryType` is equal to 'gc', the `performance.kind` property identifies - * the type of garbage collection operation that occurred. - * See perf_hooks.constants for valid values. - */ - readonly kind?: number | undefined; - /** - * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags` - * property contains additional information about garbage collection operation. - * See perf_hooks.constants for valid values. - */ - readonly flags?: number | undefined; - } - /** - * The constructor of this class is not exposed to users directly. - * @since v8.5.0 - */ - class PerformanceEntry { - protected constructor(); - /** - * The total number of milliseconds elapsed for this entry. This value will not - * be meaningful for all Performance Entry types. - * @since v8.5.0 - */ - readonly duration: number; - /** - * The name of the performance entry. - * @since v8.5.0 - */ - readonly name: string; - /** - * The high resolution millisecond timestamp marking the starting time of the - * Performance Entry. - * @since v8.5.0 - */ - readonly startTime: number; - /** - * The type of the performance entry. It may be one of: - * - * * `'node'` (Node.js only) - * * `'mark'` (available on the Web) - * * `'measure'` (available on the Web) - * * `'gc'` (Node.js only) - * * `'function'` (Node.js only) - * * `'http2'` (Node.js only) - * * `'http'` (Node.js only) - * @since v8.5.0 - */ - readonly entryType: EntryType; - /** - * Additional detail specific to the `entryType`. - * @since v16.0.0 - */ - readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type. - toJSON(): any; - } - /** - * Exposes marks created via the `Performance.mark()` method. - * @since v18.2.0, v16.17.0 - */ - class PerformanceMark extends PerformanceEntry { - readonly duration: 0; - readonly entryType: "mark"; - } - /** - * Exposes measures created via the `Performance.measure()` method. - * - * The constructor of this class is not exposed to users directly. - * @since v18.2.0, v16.17.0 - */ - class PerformanceMeasure extends PerformanceEntry { - readonly entryType: "measure"; - } - interface UVMetrics { - /** - * Number of event loop iterations. - */ - readonly loopCount: number; - /** - * Number of events that have been processed by the event handler. - */ - readonly events: number; - /** - * Number of events that were waiting to be processed when the event provider was called. - */ - readonly eventsWaiting: number; - } - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * Provides timing details for Node.js itself. The constructor of this class - * is not exposed to users. - * @since v8.5.0 - */ - class PerformanceNodeTiming extends PerformanceEntry { - readonly entryType: "node"; - /** - * The high resolution millisecond timestamp at which the Node.js process - * completed bootstrapping. If bootstrapping has not yet finished, the property - * has the value of -1. - * @since v8.5.0 - */ - readonly bootstrapComplete: number; - /** - * The high resolution millisecond timestamp at which the Node.js environment was - * initialized. - * @since v8.5.0 - */ - readonly environment: number; - /** - * The high resolution millisecond timestamp of the amount of time the event loop - * has been idle within the event loop's event provider (e.g. `epoll_wait`). This - * does not take CPU usage into consideration. If the event loop has not yet - * started (e.g., in the first tick of the main script), the property has the - * value of 0. - * @since v14.10.0, v12.19.0 - */ - readonly idleTime: number; - /** - * The high resolution millisecond timestamp at which the Node.js event loop - * exited. If the event loop has not yet exited, the property has the value of -1\. - * It can only have a value of not -1 in a handler of the `'exit'` event. - * @since v8.5.0 - */ - readonly loopExit: number; - /** - * The high resolution millisecond timestamp at which the Node.js event loop - * started. If the event loop has not yet started (e.g., in the first tick of the - * main script), the property has the value of -1. - * @since v8.5.0 - */ - readonly loopStart: number; - /** - * The high resolution millisecond timestamp at which the Node.js process was initialized. - * @since v8.5.0 - */ - readonly nodeStart: number; - /** - * This is a wrapper to the `uv_metrics_info` function. - * It returns the current set of event loop metrics. - * - * It is recommended to use this property inside a function whose execution was - * scheduled using `setImmediate` to avoid collecting metrics before finishing all - * operations scheduled during the current loop iteration. - * @since v22.8.0, v20.18.0 - */ - readonly uvMetricsInfo: UVMetrics; - /** - * The high resolution millisecond timestamp at which the V8 platform was - * initialized. - * @since v8.5.0 - */ - readonly v8Start: number; - } - interface EventLoopUtilization { - idle: number; - active: number; - utilization: number; - } - /** - * @param utilization1 The result of a previous call to `eventLoopUtilization()`. - * @param utilization2 The result of a previous call to `eventLoopUtilization()` prior to `utilization1`. - */ - type EventLoopUtilityFunction = ( - utilization1?: EventLoopUtilization, - utilization2?: EventLoopUtilization, - ) => EventLoopUtilization; - interface MarkOptions { - /** - * Additional optional detail to include with the mark. - */ - detail?: unknown | undefined; - /** - * An optional timestamp to be used as the mark time. - * @default `performance.now()` - */ - startTime?: number | undefined; - } - interface MeasureOptions { - /** - * Additional optional detail to include with the mark. - */ - detail?: unknown | undefined; - /** - * Duration between start and end times. - */ - duration?: number | undefined; - /** - * Timestamp to be used as the end time, or a string identifying a previously recorded mark. - */ - end?: number | string | undefined; - /** - * Timestamp to be used as the start time, or a string identifying a previously recorded mark. - */ - start?: number | string | undefined; - } - interface TimerifyOptions { - /** - * A histogram object created using `perf_hooks.createHistogram()` that will record runtime - * durations in nanoseconds. - */ - histogram?: RecordableHistogram | undefined; - } - interface Performance { - /** - * If `name` is not provided, removes all `PerformanceMark` objects from the Performance Timeline. - * If `name` is provided, removes only the named mark. - * @since v8.5.0 - */ - clearMarks(name?: string): void; - /** - * If `name` is not provided, removes all `PerformanceMeasure` objects from the Performance Timeline. - * If `name` is provided, removes only the named measure. - * @since v16.7.0 - */ - clearMeasures(name?: string): void; - /** - * If `name` is not provided, removes all `PerformanceResourceTiming` objects from the Resource Timeline. - * If `name` is provided, removes only the named resource. - * @since v18.2.0, v16.17.0 - */ - clearResourceTimings(name?: string): void; - /** - * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time. - * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait). - * No other CPU idle time is taken into consideration. - */ - eventLoopUtilization: EventLoopUtilityFunction; - /** - * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`. - * If you are only interested in performance entries of certain types or that have certain names, see - * `performance.getEntriesByType()` and `performance.getEntriesByName()`. - * @since v16.7.0 - */ - getEntries(): PerformanceEntry[]; - /** - * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` - * whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`. - * @param name - * @param type - * @since v16.7.0 - */ - getEntriesByName(name: string, type?: EntryType): PerformanceEntry[]; - /** - * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` - * whose `performanceEntry.entryType` is equal to `type`. - * @param type - * @since v16.7.0 - */ - getEntriesByType(type: EntryType): PerformanceEntry[]; - /** - * Creates a new `PerformanceMark` entry in the Performance Timeline. - * A `PerformanceMark` is a subclass of `PerformanceEntry` whose `performanceEntry.entryType` is always `'mark'`, - * and whose `performanceEntry.duration` is always `0`. - * Performance marks are used to mark specific significant moments in the Performance Timeline. - * - * The created `PerformanceMark` entry is put in the global Performance Timeline and can be queried with - * `performance.getEntries`, `performance.getEntriesByName`, and `performance.getEntriesByType`. When the observation is - * performed, the entries should be cleared from the global Performance Timeline manually with `performance.clearMarks`. - * @param name - */ - mark(name: string, options?: MarkOptions): PerformanceMark; - /** - * Creates a new `PerformanceResourceTiming` entry in the Resource Timeline. - * A `PerformanceResourceTiming` is a subclass of `PerformanceEntry` whose `performanceEntry.entryType` is always `'resource'`. - * Performance resources are used to mark moments in the Resource Timeline. - * @param timingInfo [Fetch Timing Info](https://fetch.spec.whatwg.org/#fetch-timing-info) - * @param requestedUrl The resource url - * @param initiatorType The initiator name, e.g: 'fetch' - * @param global - * @param cacheMode The cache mode must be an empty string ('') or 'local' - * @param bodyInfo [Fetch Response Body Info](https://fetch.spec.whatwg.org/#response-body-info) - * @param responseStatus The response's status code - * @param deliveryType The delivery type. Default: ''. - * @since v18.2.0, v16.17.0 - */ - markResourceTiming( - timingInfo: object, - requestedUrl: string, - initiatorType: string, - global: object, - cacheMode: "" | "local", - bodyInfo: object, - responseStatus: number, - deliveryType?: string, - ): PerformanceResourceTiming; - /** - * Creates a new PerformanceMeasure entry in the Performance Timeline. - * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure', - * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark. - * - * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify - * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist, - * then startMark is set to timeOrigin by default. - * - * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp - * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown. - * @param name - * @param startMark - * @param endMark - * @return The PerformanceMeasure entry that was created - */ - measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure; - measure(name: string, options: MeasureOptions): PerformanceMeasure; - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * An instance of the `PerformanceNodeTiming` class that provides performance metrics for specific Node.js operational milestones. - * @since v8.5.0 - */ - readonly nodeTiming: PerformanceNodeTiming; - /** - * Returns the current high resolution millisecond timestamp, where 0 represents the start of the current `node` process. - * @since v8.5.0 - */ - now(): number; - /** - * Sets the global performance resource timing buffer size to the specified number of "resource" type performance entry objects. - * - * By default the max buffer size is set to 250. - * @since v18.8.0 - */ - setResourceTimingBufferSize(maxSize: number): void; - /** - * The [`timeOrigin`](https://w3c.github.io/hr-time/#dom-performance-timeorigin) specifies the high resolution millisecond timestamp - * at which the current `node` process began, measured in Unix time. - * @since v8.5.0 - */ - readonly timeOrigin: number; - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * Wraps a function within a new function that measures the running time of the wrapped function. - * A `PerformanceObserver` must be subscribed to the `'function'` event type in order for the timing details to be accessed. - * - * ```js - * import { - * performance, - * PerformanceObserver, - * } from 'node:perf_hooks'; - * - * function someFunction() { - * console.log('hello world'); - * } - * - * const wrapped = performance.timerify(someFunction); - * - * const obs = new PerformanceObserver((list) => { - * console.log(list.getEntries()[0].duration); - * - * performance.clearMarks(); - * performance.clearMeasures(); - * obs.disconnect(); - * }); - * obs.observe({ entryTypes: ['function'] }); - * - * // A performance timeline entry will be created - * wrapped(); - * ``` - * - * If the wrapped function returns a promise, a finally handler will be attached to the promise and the duration will be reported - * once the finally handler is invoked. - * @param fn - */ - timerify any>(fn: T, options?: TimerifyOptions): T; - /** - * An object which is JSON representation of the performance object. It is similar to - * [`window.performance.toJSON`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/toJSON) in browsers. - * @since v16.1.0 - */ - toJSON(): any; - } - class PerformanceObserverEntryList { - /** - * Returns a list of `PerformanceEntry` objects in chronological order - * with respect to `performanceEntry.startTime`. - * - * ```js - * import { - * performance, - * PerformanceObserver, - * } from 'node:perf_hooks'; - * - * const obs = new PerformanceObserver((perfObserverList, observer) => { - * console.log(perfObserverList.getEntries()); - * - * * [ - * * PerformanceEntry { - * * name: 'test', - * * entryType: 'mark', - * * startTime: 81.465639, - * * duration: 0, - * * detail: null - * * }, - * * PerformanceEntry { - * * name: 'meow', - * * entryType: 'mark', - * * startTime: 81.860064, - * * duration: 0, - * * detail: null - * * } - * * ] - * - * performance.clearMarks(); - * performance.clearMeasures(); - * observer.disconnect(); - * }); - * obs.observe({ type: 'mark' }); - * - * performance.mark('test'); - * performance.mark('meow'); - * ``` - * @since v8.5.0 - */ - getEntries(): PerformanceEntry[]; - /** - * Returns a list of `PerformanceEntry` objects in chronological order - * with respect to `performanceEntry.startTime` whose `performanceEntry.name` is - * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`. - * - * ```js - * import { - * performance, - * PerformanceObserver, - * } from 'node:perf_hooks'; - * - * const obs = new PerformanceObserver((perfObserverList, observer) => { - * console.log(perfObserverList.getEntriesByName('meow')); - * - * * [ - * * PerformanceEntry { - * * name: 'meow', - * * entryType: 'mark', - * * startTime: 98.545991, - * * duration: 0, - * * detail: null - * * } - * * ] - * - * console.log(perfObserverList.getEntriesByName('nope')); // [] - * - * console.log(perfObserverList.getEntriesByName('test', 'mark')); - * - * * [ - * * PerformanceEntry { - * * name: 'test', - * * entryType: 'mark', - * * startTime: 63.518931, - * * duration: 0, - * * detail: null - * * } - * * ] - * - * console.log(perfObserverList.getEntriesByName('test', 'measure')); // [] - * - * performance.clearMarks(); - * performance.clearMeasures(); - * observer.disconnect(); - * }); - * obs.observe({ entryTypes: ['mark', 'measure'] }); - * - * performance.mark('test'); - * performance.mark('meow'); - * ``` - * @since v8.5.0 - */ - getEntriesByName(name: string, type?: EntryType): PerformanceEntry[]; - /** - * Returns a list of `PerformanceEntry` objects in chronological order - * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType` is equal to `type`. - * - * ```js - * import { - * performance, - * PerformanceObserver, - * } from 'node:perf_hooks'; - * - * const obs = new PerformanceObserver((perfObserverList, observer) => { - * console.log(perfObserverList.getEntriesByType('mark')); - * - * * [ - * * PerformanceEntry { - * * name: 'test', - * * entryType: 'mark', - * * startTime: 55.897834, - * * duration: 0, - * * detail: null - * * }, - * * PerformanceEntry { - * * name: 'meow', - * * entryType: 'mark', - * * startTime: 56.350146, - * * duration: 0, - * * detail: null - * * } - * * ] - * - * performance.clearMarks(); - * performance.clearMeasures(); - * observer.disconnect(); - * }); - * obs.observe({ type: 'mark' }); - * - * performance.mark('test'); - * performance.mark('meow'); - * ``` - * @since v8.5.0 - */ - getEntriesByType(type: EntryType): PerformanceEntry[]; - } - type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void; - /** - * @since v8.5.0 - */ - class PerformanceObserver extends AsyncResource { - constructor(callback: PerformanceObserverCallback); - /** - * Disconnects the `PerformanceObserver` instance from all notifications. - * @since v8.5.0 - */ - disconnect(): void; - /** - * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes` or `options.type`: - * - * ```js - * import { - * performance, - * PerformanceObserver, - * } from 'node:perf_hooks'; - * - * const obs = new PerformanceObserver((list, observer) => { - * // Called once asynchronously. `list` contains three items. - * }); - * obs.observe({ type: 'mark' }); - * - * for (let n = 0; n < 3; n++) - * performance.mark(`test${n}`); - * ``` - * @since v8.5.0 - */ - observe( - options: - | { - entryTypes: readonly EntryType[]; - buffered?: boolean | undefined; - } - | { - type: EntryType; - buffered?: boolean | undefined; - }, - ): void; - } - /** - * Provides detailed network timing data regarding the loading of an application's resources. - * - * The constructor of this class is not exposed to users directly. - * @since v18.2.0, v16.17.0 - */ - class PerformanceResourceTiming extends PerformanceEntry { - readonly entryType: "resource"; - protected constructor(); - /** - * The high resolution millisecond timestamp at immediately before dispatching the `fetch` - * request. If the resource is not intercepted by a worker the property will always return 0. - * @since v18.2.0, v16.17.0 - */ - readonly workerStart: number; - /** - * The high resolution millisecond timestamp that represents the start time of the fetch which - * initiates the redirect. - * @since v18.2.0, v16.17.0 - */ - readonly redirectStart: number; - /** - * The high resolution millisecond timestamp that will be created immediately after receiving - * the last byte of the response of the last redirect. - * @since v18.2.0, v16.17.0 - */ - readonly redirectEnd: number; - /** - * The high resolution millisecond timestamp immediately before the Node.js starts to fetch the resource. - * @since v18.2.0, v16.17.0 - */ - readonly fetchStart: number; - /** - * The high resolution millisecond timestamp immediately before the Node.js starts the domain name lookup - * for the resource. - * @since v18.2.0, v16.17.0 - */ - readonly domainLookupStart: number; - /** - * The high resolution millisecond timestamp representing the time immediately after the Node.js finished - * the domain name lookup for the resource. - * @since v18.2.0, v16.17.0 - */ - readonly domainLookupEnd: number; - /** - * The high resolution millisecond timestamp representing the time immediately before Node.js starts to - * establish the connection to the server to retrieve the resource. - * @since v18.2.0, v16.17.0 - */ - readonly connectStart: number; - /** - * The high resolution millisecond timestamp representing the time immediately after Node.js finishes - * establishing the connection to the server to retrieve the resource. - * @since v18.2.0, v16.17.0 - */ - readonly connectEnd: number; - /** - * The high resolution millisecond timestamp representing the time immediately before Node.js starts the - * handshake process to secure the current connection. - * @since v18.2.0, v16.17.0 - */ - readonly secureConnectionStart: number; - /** - * The high resolution millisecond timestamp representing the time immediately before Node.js receives the - * first byte of the response from the server. - * @since v18.2.0, v16.17.0 - */ - readonly requestStart: number; - /** - * The high resolution millisecond timestamp representing the time immediately after Node.js receives the - * last byte of the resource or immediately before the transport connection is closed, whichever comes first. - * @since v18.2.0, v16.17.0 - */ - readonly responseEnd: number; - /** - * A number representing the size (in octets) of the fetched resource. The size includes the response header - * fields plus the response payload body. - * @since v18.2.0, v16.17.0 - */ - readonly transferSize: number; - /** - * A number representing the size (in octets) received from the fetch (HTTP or cache), of the payload body, before - * removing any applied content-codings. - * @since v18.2.0, v16.17.0 - */ - readonly encodedBodySize: number; - /** - * A number representing the size (in octets) received from the fetch (HTTP or cache), of the message body, after - * removing any applied content-codings. - * @since v18.2.0, v16.17.0 - */ - readonly decodedBodySize: number; - /** - * Returns a `object` that is the JSON representation of the `PerformanceResourceTiming` object - * @since v18.2.0, v16.17.0 - */ - toJSON(): any; - } - namespace constants { - const NODE_PERFORMANCE_GC_MAJOR: number; - const NODE_PERFORMANCE_GC_MINOR: number; - const NODE_PERFORMANCE_GC_INCREMENTAL: number; - const NODE_PERFORMANCE_GC_WEAKCB: number; - const NODE_PERFORMANCE_GC_FLAGS_NO: number; - const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number; - const NODE_PERFORMANCE_GC_FLAGS_FORCED: number; - const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number; - const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number; - const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number; - const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number; - } - const performance: Performance; - interface EventLoopMonitorOptions { - /** - * The sampling rate in milliseconds. - * Must be greater than zero. - * @default 10 - */ - resolution?: number | undefined; - } - interface Histogram { - /** - * The number of samples recorded by the histogram. - * @since v17.4.0, v16.14.0 - */ - readonly count: number; - /** - * The number of samples recorded by the histogram. - * v17.4.0, v16.14.0 - */ - readonly countBigInt: bigint; - /** - * The number of times the event loop delay exceeded the maximum 1 hour event - * loop delay threshold. - * @since v11.10.0 - */ - readonly exceeds: number; - /** - * The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold. - * @since v17.4.0, v16.14.0 - */ - readonly exceedsBigInt: bigint; - /** - * The maximum recorded event loop delay. - * @since v11.10.0 - */ - readonly max: number; - /** - * The maximum recorded event loop delay. - * v17.4.0, v16.14.0 - */ - readonly maxBigInt: number; - /** - * The mean of the recorded event loop delays. - * @since v11.10.0 - */ - readonly mean: number; - /** - * The minimum recorded event loop delay. - * @since v11.10.0 - */ - readonly min: number; - /** - * The minimum recorded event loop delay. - * v17.4.0, v16.14.0 - */ - readonly minBigInt: bigint; - /** - * Returns the value at the given percentile. - * @since v11.10.0 - * @param percentile A percentile value in the range (0, 100]. - */ - percentile(percentile: number): number; - /** - * Returns the value at the given percentile. - * @since v17.4.0, v16.14.0 - * @param percentile A percentile value in the range (0, 100]. - */ - percentileBigInt(percentile: number): bigint; - /** - * Returns a `Map` object detailing the accumulated percentile distribution. - * @since v11.10.0 - */ - readonly percentiles: Map; - /** - * Returns a `Map` object detailing the accumulated percentile distribution. - * @since v17.4.0, v16.14.0 - */ - readonly percentilesBigInt: Map; - /** - * Resets the collected histogram data. - * @since v11.10.0 - */ - reset(): void; - /** - * The standard deviation of the recorded event loop delays. - * @since v11.10.0 - */ - readonly stddev: number; - } - interface IntervalHistogram extends Histogram { - /** - * Enables the update interval timer. Returns `true` if the timer was - * started, `false` if it was already started. - * @since v11.10.0 - */ - enable(): boolean; - /** - * Disables the update interval timer. Returns `true` if the timer was - * stopped, `false` if it was already stopped. - * @since v11.10.0 - */ - disable(): boolean; - } - interface RecordableHistogram extends Histogram { - /** - * @since v15.9.0, v14.18.0 - * @param val The amount to record in the histogram. - */ - record(val: number | bigint): void; - /** - * Calculates the amount of time (in nanoseconds) that has passed since the - * previous call to `recordDelta()` and records that amount in the histogram. - * @since v15.9.0, v14.18.0 - */ - recordDelta(): void; - /** - * Adds the values from `other` to this histogram. - * @since v17.4.0, v16.14.0 - */ - add(other: RecordableHistogram): void; - } - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * Creates an `IntervalHistogram` object that samples and reports the event loop - * delay over time. The delays will be reported in nanoseconds. - * - * Using a timer to detect approximate event loop delay works because the - * execution of timers is tied specifically to the lifecycle of the libuv - * event loop. That is, a delay in the loop will cause a delay in the execution - * of the timer, and those delays are specifically what this API is intended to - * detect. - * - * ```js - * import { monitorEventLoopDelay } from 'node:perf_hooks'; - * const h = monitorEventLoopDelay({ resolution: 20 }); - * h.enable(); - * // Do something. - * h.disable(); - * console.log(h.min); - * console.log(h.max); - * console.log(h.mean); - * console.log(h.stddev); - * console.log(h.percentiles); - * console.log(h.percentile(50)); - * console.log(h.percentile(99)); - * ``` - * @since v11.10.0 - */ - function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram; - interface CreateHistogramOptions { - /** - * The minimum recordable value. Must be an integer value greater than 0. - * @default 1 - */ - min?: number | bigint | undefined; - /** - * The maximum recordable value. Must be an integer value greater than min. - * @default Number.MAX_SAFE_INTEGER - */ - max?: number | bigint | undefined; - /** - * The number of accuracy digits. Must be a number between 1 and 5. - * @default 3 - */ - figures?: number | undefined; - } - /** - * Returns a `RecordableHistogram`. - * @since v15.9.0, v14.18.0 - */ - function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; - import { - performance as _performance, - PerformanceEntry as _PerformanceEntry, - PerformanceMark as _PerformanceMark, - PerformanceMeasure as _PerformanceMeasure, - PerformanceObserver as _PerformanceObserver, - PerformanceObserverEntryList as _PerformanceObserverEntryList, - PerformanceResourceTiming as _PerformanceResourceTiming, - } from "perf_hooks"; - global { - /** - * `PerformanceEntry` is a global reference for `import { PerformanceEntry } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceentry - * @since v19.0.0 - */ - var PerformanceEntry: typeof globalThis extends { - onmessage: any; - PerformanceEntry: infer T; - } ? T - : typeof _PerformanceEntry; - /** - * `PerformanceMark` is a global reference for `import { PerformanceMark } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performancemark - * @since v19.0.0 - */ - var PerformanceMark: typeof globalThis extends { - onmessage: any; - PerformanceMark: infer T; - } ? T - : typeof _PerformanceMark; - /** - * `PerformanceMeasure` is a global reference for `import { PerformanceMeasure } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performancemeasure - * @since v19.0.0 - */ - var PerformanceMeasure: typeof globalThis extends { - onmessage: any; - PerformanceMeasure: infer T; - } ? T - : typeof _PerformanceMeasure; - /** - * `PerformanceObserver` is a global reference for `import { PerformanceObserver } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceobserver - * @since v19.0.0 - */ - var PerformanceObserver: typeof globalThis extends { - onmessage: any; - PerformanceObserver: infer T; - } ? T - : typeof _PerformanceObserver; - /** - * `PerformanceObserverEntryList` is a global reference for `import { PerformanceObserverEntryList } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceobserverentrylist - * @since v19.0.0 - */ - var PerformanceObserverEntryList: typeof globalThis extends { - onmessage: any; - PerformanceObserverEntryList: infer T; - } ? T - : typeof _PerformanceObserverEntryList; - /** - * `PerformanceResourceTiming` is a global reference for `import { PerformanceResourceTiming } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceresourcetiming - * @since v19.0.0 - */ - var PerformanceResourceTiming: typeof globalThis extends { - onmessage: any; - PerformanceResourceTiming: infer T; - } ? T - : typeof _PerformanceResourceTiming; - /** - * `performance` is a global reference for `import { performance } from 'node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performance - * @since v16.0.0 - */ - var performance: typeof globalThis extends { - onmessage: any; - performance: infer T; - } ? T - : typeof _performance; - } -} -declare module "node:perf_hooks" { - export * from "perf_hooks"; -} diff --git a/web/static/node_modules/@types/node/process.d.ts b/web/static/node_modules/@types/node/process.d.ts deleted file mode 100644 index e7fd20bb..00000000 --- a/web/static/node_modules/@types/node/process.d.ts +++ /dev/null @@ -1,1912 +0,0 @@ -declare module "process" { - import * as tty from "node:tty"; - import { Worker } from "node:worker_threads"; - - interface BuiltInModule { - "assert": typeof import("assert"); - "node:assert": typeof import("node:assert"); - "assert/strict": typeof import("assert/strict"); - "node:assert/strict": typeof import("node:assert/strict"); - "async_hooks": typeof import("async_hooks"); - "node:async_hooks": typeof import("node:async_hooks"); - "buffer": typeof import("buffer"); - "node:buffer": typeof import("node:buffer"); - "child_process": typeof import("child_process"); - "node:child_process": typeof import("node:child_process"); - "cluster": typeof import("cluster"); - "node:cluster": typeof import("node:cluster"); - "console": typeof import("console"); - "node:console": typeof import("node:console"); - "constants": typeof import("constants"); - "node:constants": typeof import("node:constants"); - "crypto": typeof import("crypto"); - "node:crypto": typeof import("node:crypto"); - "dgram": typeof import("dgram"); - "node:dgram": typeof import("node:dgram"); - "diagnostics_channel": typeof import("diagnostics_channel"); - "node:diagnostics_channel": typeof import("node:diagnostics_channel"); - "dns": typeof import("dns"); - "node:dns": typeof import("node:dns"); - "dns/promises": typeof import("dns/promises"); - "node:dns/promises": typeof import("node:dns/promises"); - "domain": typeof import("domain"); - "node:domain": typeof import("node:domain"); - "events": typeof import("events"); - "node:events": typeof import("node:events"); - "fs": typeof import("fs"); - "node:fs": typeof import("node:fs"); - "fs/promises": typeof import("fs/promises"); - "node:fs/promises": typeof import("node:fs/promises"); - "http": typeof import("http"); - "node:http": typeof import("node:http"); - "http2": typeof import("http2"); - "node:http2": typeof import("node:http2"); - "https": typeof import("https"); - "node:https": typeof import("node:https"); - "inspector": typeof import("inspector"); - "node:inspector": typeof import("node:inspector"); - "inspector/promises": typeof import("inspector/promises"); - "node:inspector/promises": typeof import("node:inspector/promises"); - "module": typeof import("module"); - "node:module": typeof import("node:module"); - "net": typeof import("net"); - "node:net": typeof import("node:net"); - "os": typeof import("os"); - "node:os": typeof import("node:os"); - "path": typeof import("path"); - "node:path": typeof import("node:path"); - "path/posix": typeof import("path/posix"); - "node:path/posix": typeof import("node:path/posix"); - "path/win32": typeof import("path/win32"); - "node:path/win32": typeof import("node:path/win32"); - "perf_hooks": typeof import("perf_hooks"); - "node:perf_hooks": typeof import("node:perf_hooks"); - "process": typeof import("process"); - "node:process": typeof import("node:process"); - "punycode": typeof import("punycode"); - "node:punycode": typeof import("node:punycode"); - "querystring": typeof import("querystring"); - "node:querystring": typeof import("node:querystring"); - "readline": typeof import("readline"); - "node:readline": typeof import("node:readline"); - "readline/promises": typeof import("readline/promises"); - "node:readline/promises": typeof import("node:readline/promises"); - "repl": typeof import("repl"); - "node:repl": typeof import("node:repl"); - "node:sea": typeof import("node:sea"); - "node:sqlite": typeof import("node:sqlite"); - "stream": typeof import("stream"); - "node:stream": typeof import("node:stream"); - "stream/consumers": typeof import("stream/consumers"); - "node:stream/consumers": typeof import("node:stream/consumers"); - "stream/promises": typeof import("stream/promises"); - "node:stream/promises": typeof import("node:stream/promises"); - "stream/web": typeof import("stream/web"); - "node:stream/web": typeof import("node:stream/web"); - "string_decoder": typeof import("string_decoder"); - "node:string_decoder": typeof import("node:string_decoder"); - "node:test": typeof import("node:test"); - "node:test/reporters": typeof import("node:test/reporters"); - "timers": typeof import("timers"); - "node:timers": typeof import("node:timers"); - "timers/promises": typeof import("timers/promises"); - "node:timers/promises": typeof import("node:timers/promises"); - "tls": typeof import("tls"); - "node:tls": typeof import("node:tls"); - "trace_events": typeof import("trace_events"); - "node:trace_events": typeof import("node:trace_events"); - "tty": typeof import("tty"); - "node:tty": typeof import("node:tty"); - "url": typeof import("url"); - "node:url": typeof import("node:url"); - "util": typeof import("util"); - "node:util": typeof import("node:util"); - "sys": typeof import("util"); - "node:sys": typeof import("node:util"); - "util/types": typeof import("util/types"); - "node:util/types": typeof import("node:util/types"); - "v8": typeof import("v8"); - "node:v8": typeof import("node:v8"); - "vm": typeof import("vm"); - "node:vm": typeof import("node:vm"); - "wasi": typeof import("wasi"); - "node:wasi": typeof import("node:wasi"); - "worker_threads": typeof import("worker_threads"); - "node:worker_threads": typeof import("node:worker_threads"); - "zlib": typeof import("zlib"); - "node:zlib": typeof import("node:zlib"); - } - global { - var process: NodeJS.Process; - namespace NodeJS { - // this namespace merge is here because these are specifically used - // as the type for process.stdin, process.stdout, and process.stderr. - // they can't live in tty.d.ts because we need to disambiguate the imported name. - interface ReadStream extends tty.ReadStream {} - interface WriteStream extends tty.WriteStream {} - interface MemoryUsageFn { - /** - * The `process.memoryUsage()` method iterate over each page to gather informations about memory - * usage which can be slow depending on the program memory allocations. - */ - (): MemoryUsage; - /** - * method returns an integer representing the Resident Set Size (RSS) in bytes. - */ - rss(): number; - } - interface MemoryUsage { - /** - * Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the - * process, including all C++ and JavaScript objects and code. - */ - rss: number; - /** - * Refers to V8's memory usage. - */ - heapTotal: number; - /** - * Refers to V8's memory usage. - */ - heapUsed: number; - external: number; - /** - * Refers to memory allocated for `ArrayBuffer`s and `SharedArrayBuffer`s, including all Node.js Buffers. This is also included - * in the external value. When Node.js is used as an embedded library, this value may be `0` because allocations for `ArrayBuffer`s - * may not be tracked in that case. - */ - arrayBuffers: number; - } - interface CpuUsage { - user: number; - system: number; - } - interface ProcessRelease { - name: string; - sourceUrl?: string | undefined; - headersUrl?: string | undefined; - libUrl?: string | undefined; - lts?: string | undefined; - } - interface ProcessVersions extends Dict { - http_parser: string; - node: string; - v8: string; - ares: string; - uv: string; - zlib: string; - modules: string; - openssl: string; - } - type Platform = - | "aix" - | "android" - | "darwin" - | "freebsd" - | "haiku" - | "linux" - | "openbsd" - | "sunos" - | "win32" - | "cygwin" - | "netbsd"; - type Architecture = - | "arm" - | "arm64" - | "ia32" - | "loong64" - | "mips" - | "mipsel" - | "ppc" - | "ppc64" - | "riscv64" - | "s390" - | "s390x" - | "x64"; - type Signals = - | "SIGABRT" - | "SIGALRM" - | "SIGBUS" - | "SIGCHLD" - | "SIGCONT" - | "SIGFPE" - | "SIGHUP" - | "SIGILL" - | "SIGINT" - | "SIGIO" - | "SIGIOT" - | "SIGKILL" - | "SIGPIPE" - | "SIGPOLL" - | "SIGPROF" - | "SIGPWR" - | "SIGQUIT" - | "SIGSEGV" - | "SIGSTKFLT" - | "SIGSTOP" - | "SIGSYS" - | "SIGTERM" - | "SIGTRAP" - | "SIGTSTP" - | "SIGTTIN" - | "SIGTTOU" - | "SIGUNUSED" - | "SIGURG" - | "SIGUSR1" - | "SIGUSR2" - | "SIGVTALRM" - | "SIGWINCH" - | "SIGXCPU" - | "SIGXFSZ" - | "SIGBREAK" - | "SIGLOST" - | "SIGINFO"; - type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection"; - type MultipleResolveType = "resolve" | "reject"; - type BeforeExitListener = (code: number) => void; - type DisconnectListener = () => void; - type ExitListener = (code: number) => void; - type RejectionHandledListener = (promise: Promise) => void; - type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void; - /** - * Most of the time the unhandledRejection will be an Error, but this should not be relied upon - * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error. - */ - type UnhandledRejectionListener = (reason: unknown, promise: Promise) => void; - type WarningListener = (warning: Error) => void; - type MessageListener = (message: unknown, sendHandle: unknown) => void; - type SignalsListener = (signal: Signals) => void; - type MultipleResolveListener = ( - type: MultipleResolveType, - promise: Promise, - value: unknown, - ) => void; - type WorkerListener = (worker: Worker) => void; - interface Socket extends ReadWriteStream { - isTTY?: true | undefined; - } - // Alias for compatibility - interface ProcessEnv extends Dict { - /** - * Can be used to change the default timezone at runtime - */ - TZ?: string; - } - interface HRTime { - (time?: [number, number]): [number, number]; - /** - * The `bigint` version of the `{@link hrtime()}` method returning the current high-resolution real time in nanoseconds as a `bigint`. - * - * Unlike `{@link hrtime()}`, it does not support an additional time argument since the difference can just be computed directly by subtraction of the two `bigint`s. - * ```js - * import { hrtime } from 'node:process'; - * - * const start = hrtime.bigint(); - * // 191051479007711n - * - * setTimeout(() => { - * const end = hrtime.bigint(); - * // 191052633396993n - * - * console.log(`Benchmark took ${end - start} nanoseconds`); - * // Benchmark took 1154389282 nanoseconds - * }, 1000); - * ``` - */ - bigint(): bigint; - } - interface ProcessPermission { - /** - * Verifies that the process is able to access the given scope and reference. - * If no reference is provided, a global scope is assumed, for instance, `process.permission.has('fs.read')` - * will check if the process has ALL file system read permissions. - * - * The reference has a meaning based on the provided scope. For example, the reference when the scope is File System means files and folders. - * - * The available scopes are: - * - * * `fs` - All File System - * * `fs.read` - File System read operations - * * `fs.write` - File System write operations - * * `child` - Child process spawning operations - * * `worker` - Worker thread spawning operation - * - * ```js - * // Check if the process has permission to read the README file - * process.permission.has('fs.read', './README.md'); - * // Check if the process has read permission operations - * process.permission.has('fs.read'); - * ``` - * @since v20.0.0 - */ - has(scope: string, reference?: string): boolean; - } - interface ProcessReport { - /** - * Write reports in a compact format, single-line JSON, more easily consumable by log processing systems - * than the default multi-line format designed for human consumption. - * @since v13.12.0, v12.17.0 - */ - compact: boolean; - /** - * Directory where the report is written. - * The default value is the empty string, indicating that reports are written to the current - * working directory of the Node.js process. - */ - directory: string; - /** - * Filename where the report is written. If set to the empty string, the output filename will be comprised - * of a timestamp, PID, and sequence number. The default value is the empty string. - */ - filename: string; - /** - * Returns a JavaScript Object representation of a diagnostic report for the running process. - * The report's JavaScript stack trace is taken from `err`, if present. - */ - getReport(err?: Error): object; - /** - * If true, a diagnostic report is generated on fatal errors, - * such as out of memory errors or failed C++ assertions. - * @default false - */ - reportOnFatalError: boolean; - /** - * If true, a diagnostic report is generated when the process - * receives the signal specified by process.report.signal. - * @default false - */ - reportOnSignal: boolean; - /** - * If true, a diagnostic report is generated on uncaught exception. - * @default false - */ - reportOnUncaughtException: boolean; - /** - * The signal used to trigger the creation of a diagnostic report. - * @default 'SIGUSR2' - */ - signal: Signals; - /** - * Writes a diagnostic report to a file. If filename is not provided, the default filename - * includes the date, time, PID, and a sequence number. - * The report's JavaScript stack trace is taken from `err`, if present. - * - * If the value of filename is set to `'stdout'` or `'stderr'`, the report is written - * to the stdout or stderr of the process respectively. - * @param fileName Name of the file where the report is written. - * This should be a relative path, that will be appended to the directory specified in - * `process.report.directory`, or the current working directory of the Node.js process, - * if unspecified. - * @param err A custom error used for reporting the JavaScript stack. - * @return Filename of the generated report. - */ - writeReport(fileName?: string, err?: Error): string; - writeReport(err?: Error): string; - } - interface ResourceUsage { - fsRead: number; - fsWrite: number; - involuntaryContextSwitches: number; - ipcReceived: number; - ipcSent: number; - majorPageFault: number; - maxRSS: number; - minorPageFault: number; - sharedMemorySize: number; - signalsCount: number; - swappedOut: number; - systemCPUTime: number; - unsharedDataSize: number; - unsharedStackSize: number; - userCPUTime: number; - voluntaryContextSwitches: number; - } - interface EmitWarningOptions { - /** - * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. - * - * @default 'Warning' - */ - type?: string | undefined; - /** - * A unique identifier for the warning instance being emitted. - */ - code?: string | undefined; - /** - * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. - * - * @default process.emitWarning - */ - ctor?: Function | undefined; - /** - * Additional text to include with the error. - */ - detail?: string | undefined; - } - interface ProcessConfig { - readonly target_defaults: { - readonly cflags: any[]; - readonly default_configuration: string; - readonly defines: string[]; - readonly include_dirs: string[]; - readonly libraries: string[]; - }; - readonly variables: { - readonly clang: number; - readonly host_arch: string; - readonly node_install_npm: boolean; - readonly node_install_waf: boolean; - readonly node_prefix: string; - readonly node_shared_openssl: boolean; - readonly node_shared_v8: boolean; - readonly node_shared_zlib: boolean; - readonly node_use_dtrace: boolean; - readonly node_use_etw: boolean; - readonly node_use_openssl: boolean; - readonly target_arch: string; - readonly v8_no_strict_aliasing: number; - readonly v8_use_snapshot: boolean; - readonly visibility: string; - }; - } - interface Process extends EventEmitter { - /** - * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is - * a `Writable` stream. - * - * For example, to copy `process.stdin` to `process.stdout`: - * - * ```js - * import { stdin, stdout } from 'node:process'; - * - * stdin.pipe(stdout); - * ``` - * - * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information. - */ - stdout: WriteStream & { - fd: 1; - }; - /** - * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is - * a `Writable` stream. - * - * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information. - */ - stderr: WriteStream & { - fd: 2; - }; - /** - * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is - * a `Readable` stream. - * - * For details of how to read from `stdin` see `readable.read()`. - * - * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that - * is compatible with scripts written for Node.js prior to v0.10\. - * For more information see `Stream compatibility`. - * - * In "old" streams mode the `stdin` stream is paused by default, so one - * must call `process.stdin.resume()` to read from it. Note also that calling `process.stdin.resume()` itself would switch stream to "old" mode. - */ - stdin: ReadStream & { - fd: 0; - }; - /** - * The `process.argv` property returns an array containing the command-line - * arguments passed when the Node.js process was launched. The first element will - * be {@link execPath}. See `process.argv0` if access to the original value - * of `argv[0]` is needed. The second element will be the path to the JavaScript - * file being executed. The remaining elements will be any additional command-line - * arguments. - * - * For example, assuming the following script for `process-args.js`: - * - * ```js - * import { argv } from 'node:process'; - * - * // print process.argv - * argv.forEach((val, index) => { - * console.log(`${index}: ${val}`); - * }); - * ``` - * - * Launching the Node.js process as: - * - * ```bash - * node process-args.js one two=three four - * ``` - * - * Would generate the output: - * - * ```text - * 0: /usr/local/bin/node - * 1: /Users/mjr/work/node/process-args.js - * 2: one - * 3: two=three - * 4: four - * ``` - * @since v0.1.27 - */ - argv: string[]; - /** - * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts. - * - * ```console - * $ bash -c 'exec -a customArgv0 ./node' - * > process.argv[0] - * '/Volumes/code/external/node/out/Release/node' - * > process.argv0 - * 'customArgv0' - * ``` - * @since v6.4.0 - */ - argv0: string; - /** - * The `process.execArgv` property returns the set of Node.js-specific command-line - * options passed when the Node.js process was launched. These options do not - * appear in the array returned by the {@link argv} property, and do not - * include the Node.js executable, the name of the script, or any options following - * the script name. These options are useful in order to spawn child processes with - * the same execution environment as the parent. - * - * ```bash - * node --icu-data-dir=./foo --require ./bar.js script.js --version - * ``` - * - * Results in `process.execArgv`: - * - * ```js - * ["--icu-data-dir=./foo", "--require", "./bar.js"] - * ``` - * - * And `process.argv`: - * - * ```js - * ['/usr/local/bin/node', 'script.js', '--version'] - * ``` - * - * Refer to `Worker constructor` for the detailed behavior of worker - * threads with this property. - * @since v0.7.7 - */ - execArgv: string[]; - /** - * The `process.execPath` property returns the absolute pathname of the executable - * that started the Node.js process. Symbolic links, if any, are resolved. - * - * ```js - * '/usr/local/bin/node' - * ``` - * @since v0.1.100 - */ - execPath: string; - /** - * The `process.abort()` method causes the Node.js process to exit immediately and - * generate a core file. - * - * This feature is not available in `Worker` threads. - * @since v0.7.0 - */ - abort(): never; - /** - * The `process.chdir()` method changes the current working directory of the - * Node.js process or throws an exception if doing so fails (for instance, if - * the specified `directory` does not exist). - * - * ```js - * import { chdir, cwd } from 'node:process'; - * - * console.log(`Starting directory: ${cwd()}`); - * try { - * chdir('/tmp'); - * console.log(`New directory: ${cwd()}`); - * } catch (err) { - * console.error(`chdir: ${err}`); - * } - * ``` - * - * This feature is not available in `Worker` threads. - * @since v0.1.17 - */ - chdir(directory: string): void; - /** - * The `process.cwd()` method returns the current working directory of the Node.js - * process. - * - * ```js - * import { cwd } from 'node:process'; - * - * console.log(`Current directory: ${cwd()}`); - * ``` - * @since v0.1.8 - */ - cwd(): string; - /** - * The port used by the Node.js debugger when enabled. - * - * ```js - * import process from 'node:process'; - * - * process.debugPort = 5858; - * ``` - * @since v0.7.2 - */ - debugPort: number; - /** - * The `process.dlopen()` method allows dynamically loading shared objects. It is primarily used by `require()` to load C++ Addons, and - * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()` - * unless there are specific reasons such as custom dlopen flags or loading from ES modules. - * - * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v22.x/api/os.html#dlopen-constants)` - * documentation for details. - * - * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon - * are then accessible via `module.exports`. - * - * The example below shows how to load a C++ Addon, named `local.node`, that exports a `foo` function. All the symbols are loaded before the call returns, by passing the `RTLD_NOW` constant. - * In this example the constant is assumed to be available. - * - * ```js - * import { dlopen } from 'node:process'; - * import { constants } from 'node:os'; - * import { fileURLToPath } from 'node:url'; - * - * const module = { exports: {} }; - * dlopen(module, fileURLToPath(new URL('local.node', import.meta.url)), - * constants.dlopen.RTLD_NOW); - * module.exports.foo(); - * ``` - */ - dlopen(module: object, filename: string, flags?: number): void; - /** - * The `process.emitWarning()` method can be used to emit custom or application - * specific process warnings. These can be listened for by adding a handler to the `'warning'` event. - * - * ```js - * import { emitWarning } from 'node:process'; - * - * // Emit a warning using a string. - * emitWarning('Something happened!'); - * // Emits: (node: 56338) Warning: Something happened! - * ``` - * - * ```js - * import { emitWarning } from 'node:process'; - * - * // Emit a warning using a string and a type. - * emitWarning('Something Happened!', 'CustomWarning'); - * // Emits: (node:56338) CustomWarning: Something Happened! - * ``` - * - * ```js - * import { emitWarning } from 'node:process'; - * - * emitWarning('Something happened!', 'CustomWarning', 'WARN001'); - * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! - * ```js - * - * In each of the previous examples, an `Error` object is generated internally by `process.emitWarning()` and passed through to the `'warning'` handler. - * - * ```js - * import process from 'node:process'; - * - * process.on('warning', (warning) => { - * console.warn(warning.name); // 'Warning' - * console.warn(warning.message); // 'Something happened!' - * console.warn(warning.code); // 'MY_WARNING' - * console.warn(warning.stack); // Stack trace - * console.warn(warning.detail); // 'This is some additional information' - * }); - * ``` - * - * If `warning` is passed as an `Error` object, it will be passed through to the `'warning'` event handler - * unmodified (and the optional `type`, `code` and `ctor` arguments will be ignored): - * - * ```js - * import { emitWarning } from 'node:process'; - * - * // Emit a warning using an Error object. - * const myWarning = new Error('Something happened!'); - * // Use the Error name property to specify the type name - * myWarning.name = 'CustomWarning'; - * myWarning.code = 'WARN001'; - * - * emitWarning(myWarning); - * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! - * ``` - * - * A `TypeError` is thrown if `warning` is anything other than a string or `Error` object. - * - * While process warnings use `Error` objects, the process warning mechanism is not a replacement for normal error handling mechanisms. - * - * The following additional handling is implemented if the warning `type` is `'DeprecationWarning'`: - * * If the `--throw-deprecation` command-line flag is used, the deprecation warning is thrown as an exception rather than being emitted as an event. - * * If the `--no-deprecation` command-line flag is used, the deprecation warning is suppressed. - * * If the `--trace-deprecation` command-line flag is used, the deprecation warning is printed to `stderr` along with the full stack trace. - * @since v8.0.0 - * @param warning The warning to emit. - */ - emitWarning(warning: string | Error, ctor?: Function): void; - emitWarning(warning: string | Error, type?: string, ctor?: Function): void; - emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void; - emitWarning(warning: string | Error, options?: EmitWarningOptions): void; - /** - * The `process.env` property returns an object containing the user environment. - * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html). - * - * An example of this object looks like: - * - * ```js - * { - * TERM: 'xterm-256color', - * SHELL: '/usr/local/bin/bash', - * USER: 'maciej', - * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin', - * PWD: '/Users/maciej', - * EDITOR: 'vim', - * SHLVL: '1', - * HOME: '/Users/maciej', - * LOGNAME: 'maciej', - * _: '/usr/local/bin/node' - * } - * ``` - * - * It is possible to modify this object, but such modifications will not be - * reflected outside the Node.js process, or (unless explicitly requested) - * to other `Worker` threads. - * In other words, the following example would not work: - * - * ```bash - * node -e 'process.env.foo = "bar"' && echo $foo - * ``` - * - * While the following will: - * - * ```js - * import { env } from 'node:process'; - * - * env.foo = 'bar'; - * console.log(env.foo); - * ``` - * - * Assigning a property on `process.env` will implicitly convert the value - * to a string. **This behavior is deprecated.** Future versions of Node.js may - * throw an error when the value is not a string, number, or boolean. - * - * ```js - * import { env } from 'node:process'; - * - * env.test = null; - * console.log(env.test); - * // => 'null' - * env.test = undefined; - * console.log(env.test); - * // => 'undefined' - * ``` - * - * Use `delete` to delete a property from `process.env`. - * - * ```js - * import { env } from 'node:process'; - * - * env.TEST = 1; - * delete env.TEST; - * console.log(env.TEST); - * // => undefined - * ``` - * - * On Windows operating systems, environment variables are case-insensitive. - * - * ```js - * import { env } from 'node:process'; - * - * env.TEST = 1; - * console.log(env.test); - * // => 1 - * ``` - * - * Unless explicitly specified when creating a `Worker` instance, - * each `Worker` thread has its own copy of `process.env`, based on its - * parent thread's `process.env`, or whatever was specified as the `env` option - * to the `Worker` constructor. Changes to `process.env` will not be visible - * across `Worker` threads, and only the main thread can make changes that - * are visible to the operating system or to native add-ons. On Windows, a copy of `process.env` on a `Worker` instance operates in a case-sensitive manner - * unlike the main thread. - * @since v0.1.27 - */ - env: ProcessEnv; - /** - * The `process.exit()` method instructs Node.js to terminate the process - * synchronously with an exit status of `code`. If `code` is omitted, exit uses - * either the 'success' code `0` or the value of `process.exitCode` if it has been - * set. Node.js will not terminate until all the `'exit'` event listeners are - * called. - * - * To exit with a 'failure' code: - * - * ```js - * import { exit } from 'node:process'; - * - * exit(1); - * ``` - * - * The shell that executed Node.js should see the exit code as `1`. - * - * Calling `process.exit()` will force the process to exit as quickly as possible - * even if there are still asynchronous operations pending that have not yet - * completed fully, including I/O operations to `process.stdout` and `process.stderr`. - * - * In most situations, it is not actually necessary to call `process.exit()` explicitly. The Node.js process will exit on its own _if there is no additional_ - * _work pending_ in the event loop. The `process.exitCode` property can be set to - * tell the process which exit code to use when the process exits gracefully. - * - * For instance, the following example illustrates a _misuse_ of the `process.exit()` method that could lead to data printed to stdout being - * truncated and lost: - * - * ```js - * import { exit } from 'node:process'; - * - * // This is an example of what *not* to do: - * if (someConditionNotMet()) { - * printUsageToStdout(); - * exit(1); - * } - * ``` - * - * The reason this is problematic is because writes to `process.stdout` in Node.js - * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js - * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed. - * - * Rather than calling `process.exit()` directly, the code _should_ set the `process.exitCode` and allow the process to exit naturally by avoiding - * scheduling any additional work for the event loop: - * - * ```js - * import process from 'node:process'; - * - * // How to properly set the exit code while letting - * // the process exit gracefully. - * if (someConditionNotMet()) { - * printUsageToStdout(); - * process.exitCode = 1; - * } - * ``` - * - * If it is necessary to terminate the Node.js process due to an error condition, - * throwing an _uncaught_ error and allowing the process to terminate accordingly - * is safer than calling `process.exit()`. - * - * In `Worker` threads, this function stops the current thread rather - * than the current process. - * @since v0.1.13 - * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed. - */ - exit(code?: number | string | null | undefined): never; - /** - * A number which will be the process exit code, when the process either - * exits gracefully, or is exited via {@link exit} without specifying - * a code. - * - * Specifying a code to {@link exit} will override any - * previous setting of `process.exitCode`. - * @default undefined - * @since v0.11.8 - */ - exitCode?: number | string | number | undefined; - finalization: { - /** - * This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected. - * If the object `ref` was garbage collected before the `exit` event is emitted, the callback will be removed from the finalization registry, and it will not be called on process exit. - * - * Inside the callback you can release the resources allocated by the `ref` object. - * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, - * this means that there is a possibility that the callback will not be called under special circumstances. - * - * The idea of ​​this function is to help you free up resources when the starts process exiting, but also let the object be garbage collected if it is no longer being used. - * @param ref The reference to the resource that is being tracked. - * @param callback The callback function to be called when the resource is finalized. - * @since v22.5.0 - * @experimental - */ - register(ref: T, callback: (ref: T, event: "exit") => void): void; - /** - * This function behaves exactly like the `register`, except that the callback will be called when the process emits the `beforeExit` event if `ref` object was not garbage collected. - * - * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, this means that there is a possibility that the callback will not be called under special circumstances. - * @param ref The reference to the resource that is being tracked. - * @param callback The callback function to be called when the resource is finalized. - * @since v22.5.0 - * @experimental - */ - registerBeforeExit(ref: T, callback: (ref: T, event: "beforeExit") => void): void; - /** - * This function remove the register of the object from the finalization registry, so the callback will not be called anymore. - * @param ref The reference to the resource that was registered previously. - * @since v22.5.0 - * @experimental - */ - unregister(ref: object): void; - }; - /** - * The `process.getActiveResourcesInfo()` method returns an array of strings containing - * the types of the active resources that are currently keeping the event loop alive. - * - * ```js - * import { getActiveResourcesInfo } from 'node:process'; - * import { setTimeout } from 'node:timers'; - - * console.log('Before:', getActiveResourcesInfo()); - * setTimeout(() => {}, 1000); - * console.log('After:', getActiveResourcesInfo()); - * // Prints: - * // Before: [ 'TTYWrap', 'TTYWrap', 'TTYWrap' ] - * // After: [ 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ] - * ``` - * @since v17.3.0, v16.14.0 - */ - getActiveResourcesInfo(): string[]; - /** - * Provides a way to load built-in modules in a globally available function. - * @param id ID of the built-in module being requested. - */ - getBuiltinModule(id: ID): BuiltInModule[ID]; - getBuiltinModule(id: string): object | undefined; - /** - * The `process.getgid()` method returns the numerical group identity of the - * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.getgid) { - * console.log(`Current gid: ${process.getgid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v0.1.31 - */ - getgid?: () => number; - /** - * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a - * numeric ID or a group name - * string. If a group name is specified, this method blocks while resolving the - * associated numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.getgid && process.setgid) { - * console.log(`Current gid: ${process.getgid()}`); - * try { - * process.setgid(501); - * console.log(`New gid: ${process.getgid()}`); - * } catch (err) { - * console.log(`Failed to set gid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v0.1.31 - * @param id The group name or ID - */ - setgid?: (id: number | string) => void; - /** - * The `process.getuid()` method returns the numeric user identity of the process. - * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.getuid) { - * console.log(`Current uid: ${process.getuid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v0.1.28 - */ - getuid?: () => number; - /** - * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a - * numeric ID or a username string. - * If a username is specified, the method blocks while resolving the associated - * numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.getuid && process.setuid) { - * console.log(`Current uid: ${process.getuid()}`); - * try { - * process.setuid(501); - * console.log(`New uid: ${process.getuid()}`); - * } catch (err) { - * console.log(`Failed to set uid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v0.1.28 - */ - setuid?: (id: number | string) => void; - /** - * The `process.geteuid()` method returns the numerical effective user identity of - * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.geteuid) { - * console.log(`Current uid: ${process.geteuid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v2.0.0 - */ - geteuid?: () => number; - /** - * The `process.seteuid()` method sets the effective user identity of the process. - * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username - * string. If a username is specified, the method blocks while resolving the - * associated numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.geteuid && process.seteuid) { - * console.log(`Current uid: ${process.geteuid()}`); - * try { - * process.seteuid(501); - * console.log(`New uid: ${process.geteuid()}`); - * } catch (err) { - * console.log(`Failed to set uid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v2.0.0 - * @param id A user name or ID - */ - seteuid?: (id: number | string) => void; - /** - * The `process.getegid()` method returns the numerical effective group identity - * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.getegid) { - * console.log(`Current gid: ${process.getegid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v2.0.0 - */ - getegid?: () => number; - /** - * The `process.setegid()` method sets the effective group identity of the process. - * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group - * name string. If a group name is specified, this method blocks while resolving - * the associated a numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.getegid && process.setegid) { - * console.log(`Current gid: ${process.getegid()}`); - * try { - * process.setegid(501); - * console.log(`New gid: ${process.getegid()}`); - * } catch (err) { - * console.log(`Failed to set gid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v2.0.0 - * @param id A group name or ID - */ - setegid?: (id: number | string) => void; - /** - * The `process.getgroups()` method returns an array with the supplementary group - * IDs. POSIX leaves it unspecified if the effective group ID is included but - * Node.js ensures it always is. - * - * ```js - * import process from 'node:process'; - * - * if (process.getgroups) { - * console.log(process.getgroups()); // [ 16, 21, 297 ] - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v0.9.4 - */ - getgroups?: () => number[]; - /** - * The `process.setgroups()` method sets the supplementary group IDs for the - * Node.js process. This is a privileged operation that requires the Node.js - * process to have `root` or the `CAP_SETGID` capability. - * - * The `groups` array can contain numeric group IDs, group names, or both. - * - * ```js - * import process from 'node:process'; - * - * if (process.getgroups && process.setgroups) { - * try { - * process.setgroups([501]); - * console.log(process.getgroups()); // new groups - * } catch (err) { - * console.log(`Failed to set groups: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v0.9.4 - */ - setgroups?: (groups: ReadonlyArray) => void; - /** - * The `process.setUncaughtExceptionCaptureCallback()` function sets a function - * that will be invoked when an uncaught exception occurs, which will receive the - * exception value itself as its first argument. - * - * If such a function is set, the `'uncaughtException'` event will - * not be emitted. If `--abort-on-uncaught-exception` was passed from the - * command line or set through `v8.setFlagsFromString()`, the process will - * not abort. Actions configured to take place on exceptions such as report - * generations will be affected too - * - * To unset the capture function, `process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this - * method with a non-`null` argument while another capture function is set will - * throw an error. - * - * Using this function is mutually exclusive with using the deprecated `domain` built-in module. - * @since v9.3.0 - */ - setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; - /** - * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}. - * @since v9.3.0 - */ - hasUncaughtExceptionCaptureCallback(): boolean; - /** - * The `process.sourceMapsEnabled` property returns whether the [Source Map v3](https://sourcemaps.info/spec.html) support for stack traces is enabled. - * @since v20.7.0 - * @experimental - */ - readonly sourceMapsEnabled: boolean; - /** - * This function enables or disables the [Source Map v3](https://sourcemaps.info/spec.html) support for - * stack traces. - * - * It provides same features as launching Node.js process with commandline options `--enable-source-maps`. - * - * Only source maps in JavaScript files that are loaded after source maps has been - * enabled will be parsed and loaded. - * @since v16.6.0, v14.18.0 - * @experimental - */ - setSourceMapsEnabled(value: boolean): void; - /** - * The `process.version` property contains the Node.js version string. - * - * ```js - * import { version } from 'node:process'; - * - * console.log(`Version: ${version}`); - * // Version: v14.8.0 - * ``` - * - * To get the version string without the prepended _v_, use`process.versions.node`. - * @since v0.1.3 - */ - readonly version: string; - /** - * The `process.versions` property returns an object listing the version strings of - * Node.js and its dependencies. `process.versions.modules` indicates the current - * ABI version, which is increased whenever a C++ API changes. Node.js will refuse - * to load modules that were compiled against a different module ABI version. - * - * ```js - * import { versions } from 'node:process'; - * - * console.log(versions); - * ``` - * - * Will generate an object similar to: - * - * ```console - * { node: '20.2.0', - * acorn: '8.8.2', - * ada: '2.4.0', - * ares: '1.19.0', - * base64: '0.5.0', - * brotli: '1.0.9', - * cjs_module_lexer: '1.2.2', - * cldr: '43.0', - * icu: '73.1', - * llhttp: '8.1.0', - * modules: '115', - * napi: '8', - * nghttp2: '1.52.0', - * nghttp3: '0.7.0', - * ngtcp2: '0.8.1', - * openssl: '3.0.8+quic', - * simdutf: '3.2.9', - * tz: '2023c', - * undici: '5.22.0', - * unicode: '15.0', - * uv: '1.44.2', - * uvwasi: '0.0.16', - * v8: '11.3.244.8-node.9', - * zlib: '1.2.13' } - * ``` - * @since v0.2.0 - */ - readonly versions: ProcessVersions; - /** - * The `process.config` property returns a frozen `Object` containing the - * JavaScript representation of the configure options used to compile the current - * Node.js executable. This is the same as the `config.gypi` file that was produced - * when running the `./configure` script. - * - * An example of the possible output looks like: - * - * ```js - * { - * target_defaults: - * { cflags: [], - * default_configuration: 'Release', - * defines: [], - * include_dirs: [], - * libraries: [] }, - * variables: - * { - * host_arch: 'x64', - * napi_build_version: 5, - * node_install_npm: 'true', - * node_prefix: '', - * node_shared_cares: 'false', - * node_shared_http_parser: 'false', - * node_shared_libuv: 'false', - * node_shared_zlib: 'false', - * node_use_openssl: 'true', - * node_shared_openssl: 'false', - * strict_aliasing: 'true', - * target_arch: 'x64', - * v8_use_snapshot: 1 - * } - * } - * ``` - * @since v0.7.7 - */ - readonly config: ProcessConfig; - /** - * The `process.kill()` method sends the `signal` to the process identified by`pid`. - * - * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information. - * - * This method will throw an error if the target `pid` does not exist. As a special - * case, a signal of `0` can be used to test for the existence of a process. - * Windows platforms will throw an error if the `pid` is used to kill a process - * group. - * - * Even though the name of this function is `process.kill()`, it is really just a - * signal sender, like the `kill` system call. The signal sent may do something - * other than kill the target process. - * - * ```js - * import process, { kill } from 'node:process'; - * - * process.on('SIGHUP', () => { - * console.log('Got SIGHUP signal.'); - * }); - * - * setTimeout(() => { - * console.log('Exiting.'); - * process.exit(0); - * }, 100); - * - * kill(process.pid, 'SIGHUP'); - * ``` - * - * When `SIGUSR1` is received by a Node.js process, Node.js will start the - * debugger. See `Signal Events`. - * @since v0.0.6 - * @param pid A process ID - * @param [signal='SIGTERM'] The signal to send, either as a string or number. - */ - kill(pid: number, signal?: string | number): true; - /** - * Loads the environment configuration from a `.env` file into `process.env`. If - * the file is not found, error will be thrown. - * - * To load a specific .env file by specifying its path, use the following code: - * - * ```js - * import { loadEnvFile } from 'node:process'; - * - * loadEnvFile('./development.env') - * ``` - * @since v20.12.0 - * @param path The path to the .env file - */ - loadEnvFile(path?: string | URL | Buffer): void; - /** - * The `process.pid` property returns the PID of the process. - * - * ```js - * import { pid } from 'node:process'; - * - * console.log(`This process is pid ${pid}`); - * ``` - * @since v0.1.15 - */ - readonly pid: number; - /** - * The `process.ppid` property returns the PID of the parent of the - * current process. - * - * ```js - * import { ppid } from 'node:process'; - * - * console.log(`The parent process is pid ${ppid}`); - * ``` - * @since v9.2.0, v8.10.0, v6.13.0 - */ - readonly ppid: number; - /** - * The `process.title` property returns the current process title (i.e. returns - * the current value of `ps`). Assigning a new value to `process.title` modifies - * the current value of `ps`. - * - * When a new value is assigned, different platforms will impose different maximum - * length restrictions on the title. Usually such restrictions are quite limited. - * For instance, on Linux and macOS, `process.title` is limited to the size of the - * binary name plus the length of the command-line arguments because setting the `process.title` overwrites the `argv` memory of the process. Node.js v0.8 - * allowed for longer process title strings by also overwriting the `environ` memory but that was potentially insecure and confusing in some (rather obscure) - * cases. - * - * Assigning a value to `process.title` might not result in an accurate label - * within process manager applications such as macOS Activity Monitor or Windows - * Services Manager. - * @since v0.1.104 - */ - title: string; - /** - * The operating system CPU architecture for which the Node.js binary was compiled. - * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`. - * - * ```js - * import { arch } from 'node:process'; - * - * console.log(`This processor architecture is ${arch}`); - * ``` - * @since v0.5.0 - */ - readonly arch: Architecture; - /** - * The `process.platform` property returns a string identifying the operating - * system platform for which the Node.js binary was compiled. - * - * Currently possible values are: - * - * * `'aix'` - * * `'darwin'` - * * `'freebsd'` - * * `'linux'` - * * `'openbsd'` - * * `'sunos'` - * * `'win32'` - * - * ```js - * import { platform } from 'node:process'; - * - * console.log(`This platform is ${platform}`); - * ``` - * - * The value `'android'` may also be returned if the Node.js is built on the - * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). - * @since v0.1.16 - */ - readonly platform: Platform; - /** - * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at - * runtime, `require.main` may still refer to the original main module in - * modules that were required before the change occurred. Generally, it's - * safe to assume that the two refer to the same module. - * - * As with `require.main`, `process.mainModule` will be `undefined` if there - * is no entry script. - * @since v0.1.17 - * @deprecated Since v14.0.0 - Use `main` instead. - */ - mainModule?: Module | undefined; - memoryUsage: MemoryUsageFn; - /** - * Gets the amount of memory available to the process (in bytes) based on - * limits imposed by the OS. If there is no such constraint, or the constraint - * is unknown, `0` is returned. - * - * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more - * information. - * @since v19.6.0, v18.15.0 - * @experimental - */ - constrainedMemory(): number; - /** - * Gets the amount of free memory that is still available to the process (in bytes). - * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v22.x/api/process.html#processavailablememory) for more information. - * @experimental - * @since v20.13.0 - */ - availableMemory(): number; - /** - * The `process.cpuUsage()` method returns the user and system CPU time usage of - * the current process, in an object with properties `user` and `system`, whose - * values are microsecond values (millionth of a second). These values measure time - * spent in user and system code respectively, and may end up being greater than - * actual elapsed time if multiple CPU cores are performing work for this process. - * - * The result of a previous call to `process.cpuUsage()` can be passed as the - * argument to the function, to get a diff reading. - * - * ```js - * import { cpuUsage } from 'node:process'; - * - * const startUsage = cpuUsage(); - * // { user: 38579, system: 6986 } - * - * // spin the CPU for 500 milliseconds - * const now = Date.now(); - * while (Date.now() - now < 500); - * - * console.log(cpuUsage(startUsage)); - * // { user: 514883, system: 11226 } - * ``` - * @since v6.1.0 - * @param previousValue A previous return value from calling `process.cpuUsage()` - */ - cpuUsage(previousValue?: CpuUsage): CpuUsage; - /** - * `process.nextTick()` adds `callback` to the "next tick queue". This queue is - * fully drained after the current operation on the JavaScript stack runs to - * completion and before the event loop is allowed to continue. It's possible to - * create an infinite loop if one were to recursively call `process.nextTick()`. - * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background. - * - * ```js - * import { nextTick } from 'node:process'; - * - * console.log('start'); - * nextTick(() => { - * console.log('nextTick callback'); - * }); - * console.log('scheduled'); - * // Output: - * // start - * // scheduled - * // nextTick callback - * ``` - * - * This is important when developing APIs in order to give users the opportunity - * to assign event handlers _after_ an object has been constructed but before any - * I/O has occurred: - * - * ```js - * import { nextTick } from 'node:process'; - * - * function MyThing(options) { - * this.setupOptions(options); - * - * nextTick(() => { - * this.startDoingStuff(); - * }); - * } - * - * const thing = new MyThing(); - * thing.getReadyForStuff(); - * - * // thing.startDoingStuff() gets called now, not before. - * ``` - * - * It is very important for APIs to be either 100% synchronous or 100% - * asynchronous. Consider this example: - * - * ```js - * // WARNING! DO NOT USE! BAD UNSAFE HAZARD! - * function maybeSync(arg, cb) { - * if (arg) { - * cb(); - * return; - * } - * - * fs.stat('file', cb); - * } - * ``` - * - * This API is hazardous because in the following case: - * - * ```js - * const maybeTrue = Math.random() > 0.5; - * - * maybeSync(maybeTrue, () => { - * foo(); - * }); - * - * bar(); - * ``` - * - * It is not clear whether `foo()` or `bar()` will be called first. - * - * The following approach is much better: - * - * ```js - * import { nextTick } from 'node:process'; - * - * function definitelyAsync(arg, cb) { - * if (arg) { - * nextTick(cb); - * return; - * } - * - * fs.stat('file', cb); - * } - * ``` - * @since v0.1.26 - * @param args Additional arguments to pass when invoking the `callback` - */ - nextTick(callback: Function, ...args: any[]): void; - /** - * This API is available through the [--experimental-permission](https://nodejs.org/api/cli.html#--experimental-permission) flag. - * - * `process.permission` is an object whose methods are used to manage permissions for the current process. - * Additional documentation is available in the [Permission Model](https://nodejs.org/api/permissions.html#permission-model). - * @since v20.0.0 - */ - permission: ProcessPermission; - /** - * The `process.release` property returns an `Object` containing metadata related - * to the current release, including URLs for the source tarball and headers-only - * tarball. - * - * `process.release` contains the following properties: - * - * ```js - * { - * name: 'node', - * lts: 'Hydrogen', - * sourceUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz', - * headersUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz', - * libUrl: 'https://nodejs.org/download/release/v18.12.0/win-x64/node.lib' - * } - * ``` - * - * In custom builds from non-release versions of the source tree, only the `name` property may be present. The additional properties should not be - * relied upon to exist. - * @since v3.0.0 - */ - readonly release: ProcessRelease; - features: { - inspector: boolean; - debug: boolean; - uv: boolean; - ipv6: boolean; - tls_alpn: boolean; - tls_sni: boolean; - tls_ocsp: boolean; - tls: boolean; - }; - /** - * `process.umask()` returns the Node.js process's file mode creation mask. Child - * processes inherit the mask from the parent process. - * @since v0.1.19 - * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential - * security vulnerability. There is no safe, cross-platform alternative API. - */ - umask(): number; - /** - * Can only be set if not in worker thread. - */ - umask(mask: string | number): number; - /** - * The `process.uptime()` method returns the number of seconds the current Node.js - * process has been running. - * - * The return value includes fractions of a second. Use `Math.floor()` to get whole - * seconds. - * @since v0.5.0 - */ - uptime(): number; - hrtime: HRTime; - /** - * If the Node.js process was spawned with an IPC channel, the process.channel property is a reference to the IPC channel. - * If no IPC channel exists, this property is undefined. - * @since v7.1.0 - */ - channel?: { - /** - * This method makes the IPC channel keep the event loop of the process running if .unref() has been called before. - * @since v7.1.0 - */ - ref(): void; - /** - * This method makes the IPC channel not keep the event loop of the process running, and lets it finish even while the channel is open. - * @since v7.1.0 - */ - unref(): void; - }; - /** - * If Node.js is spawned with an IPC channel, the `process.send()` method can be - * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object. - * - * If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`. - * - * The message goes through serialization and parsing. The resulting message might - * not be the same as what is originally sent. - * @since v0.5.9 - * @param options used to parameterize the sending of certain types of handles. `options` supports the following properties: - */ - send?( - message: any, - sendHandle?: any, - options?: { - keepOpen?: boolean | undefined; - }, - callback?: (error: Error | null) => void, - ): boolean; - /** - * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the - * IPC channel to the parent process, allowing the child process to exit gracefully - * once there are no other connections keeping it alive. - * - * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process. - * - * If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`. - * @since v0.7.2 - */ - disconnect(): void; - /** - * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC - * channel is connected and will return `false` after `process.disconnect()` is called. - * - * Once `process.connected` is `false`, it is no longer possible to send messages - * over the IPC channel using `process.send()`. - * @since v0.7.2 - */ - connected: boolean; - /** - * The `process.allowedNodeEnvironmentFlags` property is a special, - * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable. - * - * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides `Set.prototype.has` to recognize several different possible flag - * representations. `process.allowedNodeEnvironmentFlags.has()` will - * return `true` in the following cases: - * - * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g., `inspect-brk` for `--inspect-brk`, or `r` for `-r`. - * * Flags passed through to V8 (as listed in `--v8-options`) may replace - * one or more _non-leading_ dashes for an underscore, or vice-versa; - * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`, - * etc. - * * Flags may contain one or more equals (`=`) characters; all - * characters after and including the first equals will be ignored; - * e.g., `--stack-trace-limit=100`. - * * Flags _must_ be allowable within `NODE_OPTIONS`. - * - * When iterating over `process.allowedNodeEnvironmentFlags`, flags will - * appear only _once_; each will begin with one or more dashes. Flags - * passed through to V8 will contain underscores instead of non-leading - * dashes: - * - * ```js - * import { allowedNodeEnvironmentFlags } from 'node:process'; - * - * allowedNodeEnvironmentFlags.forEach((flag) => { - * // -r - * // --inspect-brk - * // --abort_on_uncaught_exception - * // ... - * }); - * ``` - * - * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail - * silently. - * - * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will - * contain what _would have_ been allowable. - * @since v10.10.0 - */ - allowedNodeEnvironmentFlags: ReadonlySet; - /** - * `process.report` is an object whose methods are used to generate diagnostic reports for the current process. - * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v22.x/api/report.html). - * @since v11.8.0 - */ - report: ProcessReport; - /** - * ```js - * import { resourceUsage } from 'node:process'; - * - * console.log(resourceUsage()); - * /* - * Will output: - * { - * userCPUTime: 82872, - * systemCPUTime: 4143, - * maxRSS: 33164, - * sharedMemorySize: 0, - * unsharedDataSize: 0, - * unsharedStackSize: 0, - * minorPageFault: 2469, - * majorPageFault: 0, - * swappedOut: 0, - * fsRead: 0, - * fsWrite: 8, - * ipcSent: 0, - * ipcReceived: 0, - * signalsCount: 0, - * voluntaryContextSwitches: 79, - * involuntaryContextSwitches: 1 - * } - * - * ``` - * @since v12.6.0 - * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t]. - */ - resourceUsage(): ResourceUsage; - /** - * The initial value of `process.throwDeprecation` indicates whether the `--throw-deprecation` flag is set on the current Node.js process. `process.throwDeprecation` - * is mutable, so whether or not deprecation warnings result in errors may be altered at runtime. See the documentation for the 'warning' event and the emitWarning() - * method for more information. - * - * ```bash - * $ node --throw-deprecation -p "process.throwDeprecation" - * true - * $ node -p "process.throwDeprecation" - * undefined - * $ node - * > process.emitWarning('test', 'DeprecationWarning'); - * undefined - * > (node:26598) DeprecationWarning: test - * > process.throwDeprecation = true; - * true - * > process.emitWarning('test', 'DeprecationWarning'); - * Thrown: - * [DeprecationWarning: test] { name: 'DeprecationWarning' } - * ``` - * @since v0.9.12 - */ - throwDeprecation: boolean; - /** - * The `process.traceDeprecation` property indicates whether the `--trace-deprecation` flag is set on the current Node.js process. See the - * documentation for the `'warning' event` and the `emitWarning() method` for more information about this - * flag's behavior. - * @since v0.8.0 - */ - traceDeprecation: boolean; - /* EventEmitter */ - addListener(event: "beforeExit", listener: BeforeExitListener): this; - addListener(event: "disconnect", listener: DisconnectListener): this; - addListener(event: "exit", listener: ExitListener): this; - addListener(event: "rejectionHandled", listener: RejectionHandledListener): this; - addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; - addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - addListener(event: "warning", listener: WarningListener): this; - addListener(event: "message", listener: MessageListener): this; - addListener(event: Signals, listener: SignalsListener): this; - addListener(event: "multipleResolves", listener: MultipleResolveListener): this; - addListener(event: "worker", listener: WorkerListener): this; - emit(event: "beforeExit", code: number): boolean; - emit(event: "disconnect"): boolean; - emit(event: "exit", code: number): boolean; - emit(event: "rejectionHandled", promise: Promise): boolean; - emit(event: "uncaughtException", error: Error): boolean; - emit(event: "uncaughtExceptionMonitor", error: Error): boolean; - emit(event: "unhandledRejection", reason: unknown, promise: Promise): boolean; - emit(event: "warning", warning: Error): boolean; - emit(event: "message", message: unknown, sendHandle: unknown): this; - emit(event: Signals, signal?: Signals): boolean; - emit( - event: "multipleResolves", - type: MultipleResolveType, - promise: Promise, - value: unknown, - ): this; - emit(event: "worker", listener: WorkerListener): this; - on(event: "beforeExit", listener: BeforeExitListener): this; - on(event: "disconnect", listener: DisconnectListener): this; - on(event: "exit", listener: ExitListener): this; - on(event: "rejectionHandled", listener: RejectionHandledListener): this; - on(event: "uncaughtException", listener: UncaughtExceptionListener): this; - on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - on(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - on(event: "warning", listener: WarningListener): this; - on(event: "message", listener: MessageListener): this; - on(event: Signals, listener: SignalsListener): this; - on(event: "multipleResolves", listener: MultipleResolveListener): this; - on(event: "worker", listener: WorkerListener): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "beforeExit", listener: BeforeExitListener): this; - once(event: "disconnect", listener: DisconnectListener): this; - once(event: "exit", listener: ExitListener): this; - once(event: "rejectionHandled", listener: RejectionHandledListener): this; - once(event: "uncaughtException", listener: UncaughtExceptionListener): this; - once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - once(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - once(event: "warning", listener: WarningListener): this; - once(event: "message", listener: MessageListener): this; - once(event: Signals, listener: SignalsListener): this; - once(event: "multipleResolves", listener: MultipleResolveListener): this; - once(event: "worker", listener: WorkerListener): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "beforeExit", listener: BeforeExitListener): this; - prependListener(event: "disconnect", listener: DisconnectListener): this; - prependListener(event: "exit", listener: ExitListener): this; - prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this; - prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; - prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - prependListener(event: "warning", listener: WarningListener): this; - prependListener(event: "message", listener: MessageListener): this; - prependListener(event: Signals, listener: SignalsListener): this; - prependListener(event: "multipleResolves", listener: MultipleResolveListener): this; - prependListener(event: "worker", listener: WorkerListener): this; - prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this; - prependOnceListener(event: "disconnect", listener: DisconnectListener): this; - prependOnceListener(event: "exit", listener: ExitListener): this; - prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this; - prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; - prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - prependOnceListener(event: "warning", listener: WarningListener): this; - prependOnceListener(event: "message", listener: MessageListener): this; - prependOnceListener(event: Signals, listener: SignalsListener): this; - prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this; - prependOnceListener(event: "worker", listener: WorkerListener): this; - listeners(event: "beforeExit"): BeforeExitListener[]; - listeners(event: "disconnect"): DisconnectListener[]; - listeners(event: "exit"): ExitListener[]; - listeners(event: "rejectionHandled"): RejectionHandledListener[]; - listeners(event: "uncaughtException"): UncaughtExceptionListener[]; - listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[]; - listeners(event: "unhandledRejection"): UnhandledRejectionListener[]; - listeners(event: "warning"): WarningListener[]; - listeners(event: "message"): MessageListener[]; - listeners(event: Signals): SignalsListener[]; - listeners(event: "multipleResolves"): MultipleResolveListener[]; - listeners(event: "worker"): WorkerListener[]; - } - } - } - export = process; -} -declare module "node:process" { - import process = require("process"); - export = process; -} diff --git a/web/static/node_modules/@types/node/punycode.d.ts b/web/static/node_modules/@types/node/punycode.d.ts deleted file mode 100644 index 655c47b6..00000000 --- a/web/static/node_modules/@types/node/punycode.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -/** - * **The version of the punycode module bundled in Node.js is being deprecated. **In a future major version of Node.js this module will be removed. Users - * currently depending on the `punycode` module should switch to using the - * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL - * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`. - * - * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It - * can be accessed using: - * - * ```js - * import punycode from 'node:punycode'; - * ``` - * - * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is - * primarily intended for use in Internationalized Domain Names. Because host - * names in URLs are limited to ASCII characters only, Domain Names that contain - * non-ASCII characters must be converted into ASCII using the Punycode scheme. - * For instance, the Japanese character that translates into the English word, `'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent - * to `'example.com'`) is represented by Punycode as the ASCII string `'xn--fsq.com'`. - * - * The `punycode` module provides a simple implementation of the Punycode standard. - * - * The `punycode` module is a third-party dependency used by Node.js and - * made available to developers as a convenience. Fixes or other modifications to - * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project. - * @deprecated Since v7.0.0 - Deprecated - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/punycode.js) - */ -declare module "punycode" { - /** - * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only - * characters to the equivalent string of Unicode codepoints. - * - * ```js - * punycode.decode('maana-pta'); // 'mañana' - * punycode.decode('--dqo34k'); // '☃-⌘' - * ``` - * @since v0.5.1 - */ - function decode(string: string): string; - /** - * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters. - * - * ```js - * punycode.encode('mañana'); // 'maana-pta' - * punycode.encode('☃-⌘'); // '--dqo34k' - * ``` - * @since v0.5.1 - */ - function encode(string: string): string; - /** - * The `punycode.toUnicode()` method converts a string representing a domain name - * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be - * converted. - * - * ```js - * // decode domain names - * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com' - * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com' - * punycode.toUnicode('example.com'); // 'example.com' - * ``` - * @since v0.6.1 - */ - function toUnicode(domain: string): string; - /** - * The `punycode.toASCII()` method converts a Unicode string representing an - * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the - * domain name will be converted. Calling `punycode.toASCII()` on a string that - * already only contains ASCII characters will have no effect. - * - * ```js - * // encode domain names - * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com' - * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com' - * punycode.toASCII('example.com'); // 'example.com' - * ``` - * @since v0.6.1 - */ - function toASCII(domain: string): string; - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - const ucs2: ucs2; - interface ucs2 { - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - decode(string: string): number[]; - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - encode(codePoints: readonly number[]): string; - } - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - const version: string; -} -declare module "node:punycode" { - export * from "punycode"; -} diff --git a/web/static/node_modules/@types/node/querystring.d.ts b/web/static/node_modules/@types/node/querystring.d.ts deleted file mode 100644 index 4d6dac18..00000000 --- a/web/static/node_modules/@types/node/querystring.d.ts +++ /dev/null @@ -1,153 +0,0 @@ -/** - * The `node:querystring` module provides utilities for parsing and formatting URL - * query strings. It can be accessed using: - * - * ```js - * import querystring from 'node:querystring'; - * ``` - * - * `querystring` is more performant than `URLSearchParams` but is not a - * standardized API. Use `URLSearchParams` when performance is not critical or - * when compatibility with browser code is desirable. - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/querystring.js) - */ -declare module "querystring" { - interface StringifyOptions { - /** - * The function to use when converting URL-unsafe characters to percent-encoding in the query string. - * @default `querystring.escape()` - */ - encodeURIComponent?: ((str: string) => string) | undefined; - } - interface ParseOptions { - /** - * Specifies the maximum number of keys to parse. Specify `0` to remove key counting limitations. - * @default 1000 - */ - maxKeys?: number | undefined; - /** - * The function to use when decoding percent-encoded characters in the query string. - * @default `querystring.unescape()` - */ - decodeURIComponent?: ((str: string) => string) | undefined; - } - interface ParsedUrlQuery extends NodeJS.Dict {} - interface ParsedUrlQueryInput extends - NodeJS.Dict< - | string - | number - | boolean - | readonly string[] - | readonly number[] - | readonly boolean[] - | null - > - {} - /** - * The `querystring.stringify()` method produces a URL query string from a - * given `obj` by iterating through the object's "own properties". - * - * It serializes the following types of values passed in `obj`: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | - * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | - * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) | - * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | - * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | - * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | - * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to - * empty strings. - * - * ```js - * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }); - * // Returns 'foo=bar&baz=qux&baz=quux&corge=' - * - * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':'); - * // Returns 'foo:bar;baz:qux' - * ``` - * - * By default, characters requiring percent-encoding within the query string will - * be encoded as UTF-8\. If an alternative encoding is required, then an alternative `encodeURIComponent` option will need to be specified: - * - * ```js - * // Assuming gbkEncodeURIComponent function already exists, - * - * querystring.stringify({ w: '中文', foo: 'bar' }, null, null, - * { encodeURIComponent: gbkEncodeURIComponent }); - * ``` - * @since v0.1.25 - * @param obj The object to serialize into a URL query string - * @param [sep='&'] The substring used to delimit key and value pairs in the query string. - * @param [eq='='] . The substring used to delimit keys and values in the query string. - */ - function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; - /** - * The `querystring.parse()` method parses a URL query string (`str`) into a - * collection of key and value pairs. - * - * For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: - * - * ```json - * { - * "foo": "bar", - * "abc": ["xyz", "123"] - * } - * ``` - * - * The object returned by the `querystring.parse()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, - * `obj.hasOwnProperty()`, and others - * are not defined and _will not work_. - * - * By default, percent-encoded characters within the query string will be assumed - * to use UTF-8 encoding. If an alternative character encoding is used, then an - * alternative `decodeURIComponent` option will need to be specified: - * - * ```js - * // Assuming gbkDecodeURIComponent function already exists... - * - * querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null, - * { decodeURIComponent: gbkDecodeURIComponent }); - * ``` - * @since v0.1.25 - * @param str The URL query string to parse - * @param [sep='&'] The substring used to delimit key and value pairs in the query string. - * @param [eq='='] The substring used to delimit keys and values in the query string. - */ - function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; - /** - * The querystring.encode() function is an alias for querystring.stringify(). - */ - const encode: typeof stringify; - /** - * The querystring.decode() function is an alias for querystring.parse(). - */ - const decode: typeof parse; - /** - * The `querystring.escape()` method performs URL percent-encoding on the given `str` in a manner that is optimized for the specific requirements of URL - * query strings. - * - * The `querystring.escape()` method is used by `querystring.stringify()` and is - * generally not expected to be used directly. It is exported primarily to allow - * application code to provide a replacement percent-encoding implementation if - * necessary by assigning `querystring.escape` to an alternative function. - * @since v0.1.25 - */ - function escape(str: string): string; - /** - * The `querystring.unescape()` method performs decoding of URL percent-encoded - * characters on the given `str`. - * - * The `querystring.unescape()` method is used by `querystring.parse()` and is - * generally not expected to be used directly. It is exported primarily to allow - * application code to provide a replacement decoding implementation if - * necessary by assigning `querystring.unescape` to an alternative function. - * - * By default, the `querystring.unescape()` method will attempt to use the - * JavaScript built-in `decodeURIComponent()` method to decode. If that fails, - * a safer equivalent that does not throw on malformed URLs will be used. - * @since v0.1.25 - */ - function unescape(str: string): string; -} -declare module "node:querystring" { - export * from "querystring"; -} diff --git a/web/static/node_modules/@types/node/readline.d.ts b/web/static/node_modules/@types/node/readline.d.ts deleted file mode 100644 index a1f304fd..00000000 --- a/web/static/node_modules/@types/node/readline.d.ts +++ /dev/null @@ -1,589 +0,0 @@ -/** - * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream - * (such as [`process.stdin`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdin)) one line at a time. - * - * To use the promise-based APIs: - * - * ```js - * import * as readline from 'node:readline/promises'; - * ``` - * - * To use the callback and sync APIs: - * - * ```js - * import * as readline from 'node:readline'; - * ``` - * - * The following simple example illustrates the basic use of the `node:readline` module. - * - * ```js - * import * as readline from 'node:readline/promises'; - * import { stdin as input, stdout as output } from 'node:process'; - * - * const rl = readline.createInterface({ input, output }); - * - * const answer = await rl.question('What do you think of Node.js? '); - * - * console.log(`Thank you for your valuable feedback: ${answer}`); - * - * rl.close(); - * ``` - * - * Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be - * received on the `input` stream. - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/readline.js) - */ -declare module "readline" { - import { Abortable, EventEmitter } from "node:events"; - import * as promises from "node:readline/promises"; - export { promises }; - export interface Key { - sequence?: string | undefined; - name?: string | undefined; - ctrl?: boolean | undefined; - meta?: boolean | undefined; - shift?: boolean | undefined; - } - /** - * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a - * single `input` [Readable](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v22.x/api/stream.html#writable-streams) stream. - * The `output` stream is used to print prompts for user input that arrives on, - * and is read from, the `input` stream. - * @since v0.1.104 - */ - export class Interface extends EventEmitter { - readonly terminal: boolean; - /** - * The current input data being processed by node. - * - * This can be used when collecting input from a TTY stream to retrieve the - * current value that has been processed thus far, prior to the `line` event - * being emitted. Once the `line` event has been emitted, this property will - * be an empty string. - * - * Be aware that modifying the value during the instance runtime may have - * unintended consequences if `rl.cursor` is not also controlled. - * - * **If not using a TTY stream for input, use the `'line'` event.** - * - * One possible use case would be as follows: - * - * ```js - * const values = ['lorem ipsum', 'dolor sit amet']; - * const rl = readline.createInterface(process.stdin); - * const showResults = debounce(() => { - * console.log( - * '\n', - * values.filter((val) => val.startsWith(rl.line)).join(' '), - * ); - * }, 300); - * process.stdin.on('keypress', (c, k) => { - * showResults(); - * }); - * ``` - * @since v0.1.98 - */ - readonly line: string; - /** - * The cursor position relative to `rl.line`. - * - * This will track where the current cursor lands in the input string, when - * reading input from a TTY stream. The position of cursor determines the - * portion of the input string that will be modified as input is processed, - * as well as the column where the terminal caret will be rendered. - * @since v0.1.98 - */ - readonly cursor: number; - /** - * NOTE: According to the documentation: - * - * > Instances of the `readline.Interface` class are constructed using the - * > `readline.createInterface()` method. - * - * @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#class-interfaceconstructor - */ - protected constructor( - input: NodeJS.ReadableStream, - output?: NodeJS.WritableStream, - completer?: Completer | AsyncCompleter, - terminal?: boolean, - ); - /** - * NOTE: According to the documentation: - * - * > Instances of the `readline.Interface` class are constructed using the - * > `readline.createInterface()` method. - * - * @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#class-interfaceconstructor - */ - protected constructor(options: ReadLineOptions); - /** - * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. - * @since v15.3.0, v14.17.0 - * @return the current prompt string - */ - getPrompt(): string; - /** - * The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. - * @since v0.1.98 - */ - setPrompt(prompt: string): void; - /** - * The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new - * location at which to provide input. - * - * When called, `rl.prompt()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the prompt is not written. - * @since v0.1.98 - * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`. - */ - prompt(preserveCursor?: boolean): void; - /** - * The `rl.question()` method displays the `query` by writing it to the `output`, - * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. - * - * When called, `rl.question()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. - * - * The `callback` function passed to `rl.question()` does not follow the typical - * pattern of accepting an `Error` object or `null` as the first argument. - * The `callback` is called with the provided answer as the only argument. - * - * An error will be thrown if calling `rl.question()` after `rl.close()`. - * - * Example usage: - * - * ```js - * rl.question('What is your favorite food? ', (answer) => { - * console.log(`Oh, so your favorite food is ${answer}`); - * }); - * ``` - * - * Using an `AbortController` to cancel a question. - * - * ```js - * const ac = new AbortController(); - * const signal = ac.signal; - * - * rl.question('What is your favorite food? ', { signal }, (answer) => { - * console.log(`Oh, so your favorite food is ${answer}`); - * }); - * - * signal.addEventListener('abort', () => { - * console.log('The food question timed out'); - * }, { once: true }); - * - * setTimeout(() => ac.abort(), 10000); - * ``` - * @since v0.3.3 - * @param query A statement or query to write to `output`, prepended to the prompt. - * @param callback A callback function that is invoked with the user's input in response to the `query`. - */ - question(query: string, callback: (answer: string) => void): void; - question(query: string, options: Abortable, callback: (answer: string) => void): void; - /** - * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed - * later if necessary. - * - * Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `Interface` instance. - * @since v0.3.4 - */ - pause(): this; - /** - * The `rl.resume()` method resumes the `input` stream if it has been paused. - * @since v0.3.4 - */ - resume(): this; - /** - * The `rl.close()` method closes the `Interface` instance and - * relinquishes control over the `input` and `output` streams. When called, - * the `'close'` event will be emitted. - * - * Calling `rl.close()` does not immediately stop other events (including `'line'`) - * from being emitted by the `Interface` instance. - * @since v0.1.98 - */ - close(): void; - /** - * The `rl.write()` method will write either `data` or a key sequence identified - * by `key` to the `output`. The `key` argument is supported only if `output` is - * a `TTY` text terminal. See `TTY keybindings` for a list of key - * combinations. - * - * If `key` is specified, `data` is ignored. - * - * When called, `rl.write()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the `data` and `key` are not written. - * - * ```js - * rl.write('Delete this!'); - * // Simulate Ctrl+U to delete the line written previously - * rl.write(null, { ctrl: true, name: 'u' }); - * ``` - * - * The `rl.write()` method will write the data to the `readline` `Interface`'s `input` _as if it were provided by the user_. - * @since v0.1.98 - */ - write(data: string | Buffer, key?: Key): void; - write(data: undefined | null | string | Buffer, key: Key): void; - /** - * Returns the real position of the cursor in relation to the input - * prompt + string. Long input (wrapping) strings, as well as multiple - * line prompts are included in the calculations. - * @since v13.5.0, v12.16.0 - */ - getCursorPos(): CursorPos; - /** - * events.EventEmitter - * 1. close - * 2. line - * 3. pause - * 4. resume - * 5. SIGCONT - * 6. SIGINT - * 7. SIGTSTP - * 8. history - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "line", listener: (input: string) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: "SIGCONT", listener: () => void): this; - addListener(event: "SIGINT", listener: () => void): this; - addListener(event: "SIGTSTP", listener: () => void): this; - addListener(event: "history", listener: (history: string[]) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "line", input: string): boolean; - emit(event: "pause"): boolean; - emit(event: "resume"): boolean; - emit(event: "SIGCONT"): boolean; - emit(event: "SIGINT"): boolean; - emit(event: "SIGTSTP"): boolean; - emit(event: "history", history: string[]): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "line", listener: (input: string) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: "SIGCONT", listener: () => void): this; - on(event: "SIGINT", listener: () => void): this; - on(event: "SIGTSTP", listener: () => void): this; - on(event: "history", listener: (history: string[]) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "line", listener: (input: string) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: "SIGCONT", listener: () => void): this; - once(event: "SIGINT", listener: () => void): this; - once(event: "SIGTSTP", listener: () => void): this; - once(event: "history", listener: (history: string[]) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "line", listener: (input: string) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: "SIGCONT", listener: () => void): this; - prependListener(event: "SIGINT", listener: () => void): this; - prependListener(event: "SIGTSTP", listener: () => void): this; - prependListener(event: "history", listener: (history: string[]) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "line", listener: (input: string) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: "SIGCONT", listener: () => void): this; - prependOnceListener(event: "SIGINT", listener: () => void): this; - prependOnceListener(event: "SIGTSTP", listener: () => void): this; - prependOnceListener(event: "history", listener: (history: string[]) => void): this; - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - } - export type ReadLine = Interface; // type forwarded for backwards compatibility - export type Completer = (line: string) => CompleterResult; - export type AsyncCompleter = ( - line: string, - callback: (err?: null | Error, result?: CompleterResult) => void, - ) => void; - export type CompleterResult = [string[], string]; - export interface ReadLineOptions { - /** - * The [`Readable`](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream to listen to - */ - input: NodeJS.ReadableStream; - /** - * The [`Writable`](https://nodejs.org/docs/latest-v22.x/api/stream.html#writable-streams) stream to write readline data to. - */ - output?: NodeJS.WritableStream | undefined; - /** - * An optional function used for Tab autocompletion. - */ - completer?: Completer | AsyncCompleter | undefined; - /** - * `true` if the `input` and `output` streams should be treated like a TTY, - * and have ANSI/VT100 escape codes written to it. - * Default: checking `isTTY` on the `output` stream upon instantiation. - */ - terminal?: boolean | undefined; - /** - * Initial list of history lines. - * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, - * otherwise the history caching mechanism is not initialized at all. - * @default [] - */ - history?: string[] | undefined; - /** - * Maximum number of history lines retained. - * To disable the history set this value to `0`. - * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, - * otherwise the history caching mechanism is not initialized at all. - * @default 30 - */ - historySize?: number | undefined; - /** - * If `true`, when a new input line added to the history list duplicates an older one, - * this removes the older line from the list. - * @default false - */ - removeHistoryDuplicates?: boolean | undefined; - /** - * The prompt string to use. - * @default "> " - */ - prompt?: string | undefined; - /** - * If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds, - * both `\r` and `\n` will be treated as separate end-of-line input. - * `crlfDelay` will be coerced to a number no less than `100`. - * It can be set to `Infinity`, in which case - * `\r` followed by `\n` will always be considered a single newline - * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v22.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter). - * @default 100 - */ - crlfDelay?: number | undefined; - /** - * The duration `readline` will wait for a character - * (when reading an ambiguous key sequence in milliseconds - * one that can both form a complete key sequence using the input read so far - * and can take additional input to complete a longer key sequence). - * @default 500 - */ - escapeCodeTimeout?: number | undefined; - /** - * The number of spaces a tab is equal to (minimum 1). - * @default 8 - */ - tabSize?: number | undefined; - /** - * Allows closing the interface using an AbortSignal. - * Aborting the signal will internally call `close` on the interface. - */ - signal?: AbortSignal | undefined; - } - /** - * The `readline.createInterface()` method creates a new `readline.Interface` instance. - * - * ```js - * import readline from 'node:readline'; - * const rl = readline.createInterface({ - * input: process.stdin, - * output: process.stdout, - * }); - * ``` - * - * Once the `readline.Interface` instance is created, the most common case is to - * listen for the `'line'` event: - * - * ```js - * rl.on('line', (line) => { - * console.log(`Received: ${line}`); - * }); - * ``` - * - * If `terminal` is `true` for this instance then the `output` stream will get - * the best compatibility if it defines an `output.columns` property and emits - * a `'resize'` event on the `output` if or when the columns ever change - * (`process.stdout` does this automatically when it is a TTY). - * - * When creating a `readline.Interface` using `stdin` as input, the program - * will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without - * waiting for user input, call `process.stdin.unref()`. - * @since v0.1.98 - */ - export function createInterface( - input: NodeJS.ReadableStream, - output?: NodeJS.WritableStream, - completer?: Completer | AsyncCompleter, - terminal?: boolean, - ): Interface; - export function createInterface(options: ReadLineOptions): Interface; - /** - * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input. - * - * Optionally, `interface` specifies a `readline.Interface` instance for which - * autocompletion is disabled when copy-pasted input is detected. - * - * If the `stream` is a `TTY`, then it must be in raw mode. - * - * This is automatically called by any readline instance on its `input` if the `input` is a terminal. Closing the `readline` instance does not stop - * the `input` from emitting `'keypress'` events. - * - * ```js - * readline.emitKeypressEvents(process.stdin); - * if (process.stdin.isTTY) - * process.stdin.setRawMode(true); - * ``` - * - * ## Example: Tiny CLI - * - * The following example illustrates the use of `readline.Interface` class to - * implement a small command-line interface: - * - * ```js - * import readline from 'node:readline'; - * const rl = readline.createInterface({ - * input: process.stdin, - * output: process.stdout, - * prompt: 'OHAI> ', - * }); - * - * rl.prompt(); - * - * rl.on('line', (line) => { - * switch (line.trim()) { - * case 'hello': - * console.log('world!'); - * break; - * default: - * console.log(`Say what? I might have heard '${line.trim()}'`); - * break; - * } - * rl.prompt(); - * }).on('close', () => { - * console.log('Have a great day!'); - * process.exit(0); - * }); - * ``` - * - * ## Example: Read file stream line-by-Line - * - * A common use case for `readline` is to consume an input file one line at a - * time. The easiest way to do so is leveraging the `fs.ReadStream` API as - * well as a `for await...of` loop: - * - * ```js - * import fs from 'node:fs'; - * import readline from 'node:readline'; - * - * async function processLineByLine() { - * const fileStream = fs.createReadStream('input.txt'); - * - * const rl = readline.createInterface({ - * input: fileStream, - * crlfDelay: Infinity, - * }); - * // Note: we use the crlfDelay option to recognize all instances of CR LF - * // ('\r\n') in input.txt as a single line break. - * - * for await (const line of rl) { - * // Each line in input.txt will be successively available here as `line`. - * console.log(`Line from file: ${line}`); - * } - * } - * - * processLineByLine(); - * ``` - * - * Alternatively, one could use the `'line'` event: - * - * ```js - * import fs from 'node:fs'; - * import readline from 'node:readline'; - * - * const rl = readline.createInterface({ - * input: fs.createReadStream('sample.txt'), - * crlfDelay: Infinity, - * }); - * - * rl.on('line', (line) => { - * console.log(`Line from file: ${line}`); - * }); - * ``` - * - * Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied: - * - * ```js - * import { once } from 'node:events'; - * import { createReadStream } from 'node:fs'; - * import { createInterface } from 'node:readline'; - * - * (async function processLineByLine() { - * try { - * const rl = createInterface({ - * input: createReadStream('big-file.txt'), - * crlfDelay: Infinity, - * }); - * - * rl.on('line', (line) => { - * // Process the line. - * }); - * - * await once(rl, 'close'); - * - * console.log('File processed.'); - * } catch (err) { - * console.error(err); - * } - * })(); - * ``` - * @since v0.7.7 - */ - export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; - export type Direction = -1 | 0 | 1; - export interface CursorPos { - rows: number; - cols: number; - } - /** - * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) stream - * in a specified direction identified by `dir`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; - /** - * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) stream from - * the current position of the cursor down. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; - /** - * The `readline.cursorTo()` method moves cursor to the specified position in a - * given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) `stream`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; - /** - * The `readline.moveCursor()` method moves the cursor _relative_ to its current - * position in a given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) `stream`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; -} -declare module "node:readline" { - export * from "readline"; -} diff --git a/web/static/node_modules/@types/node/readline/promises.d.ts b/web/static/node_modules/@types/node/readline/promises.d.ts deleted file mode 100644 index 86754bba..00000000 --- a/web/static/node_modules/@types/node/readline/promises.d.ts +++ /dev/null @@ -1,162 +0,0 @@ -/** - * @since v17.0.0 - * @experimental - */ -declare module "readline/promises" { - import { Abortable } from "node:events"; - import { - CompleterResult, - Direction, - Interface as _Interface, - ReadLineOptions as _ReadLineOptions, - } from "node:readline"; - /** - * Instances of the `readlinePromises.Interface` class are constructed using the `readlinePromises.createInterface()` method. Every instance is associated with a - * single `input` `Readable` stream and a single `output` `Writable` stream. - * The `output` stream is used to print prompts for user input that arrives on, - * and is read from, the `input` stream. - * @since v17.0.0 - */ - class Interface extends _Interface { - /** - * The `rl.question()` method displays the `query` by writing it to the `output`, - * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. - * - * When called, `rl.question()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. - * - * If the question is called after `rl.close()`, it returns a rejected promise. - * - * Example usage: - * - * ```js - * const answer = await rl.question('What is your favorite food? '); - * console.log(`Oh, so your favorite food is ${answer}`); - * ``` - * - * Using an `AbortSignal` to cancel a question. - * - * ```js - * const signal = AbortSignal.timeout(10_000); - * - * signal.addEventListener('abort', () => { - * console.log('The food question timed out'); - * }, { once: true }); - * - * const answer = await rl.question('What is your favorite food? ', { signal }); - * console.log(`Oh, so your favorite food is ${answer}`); - * ``` - * @since v17.0.0 - * @param query A statement or query to write to `output`, prepended to the prompt. - * @return A promise that is fulfilled with the user's input in response to the `query`. - */ - question(query: string): Promise; - question(query: string, options: Abortable): Promise; - } - /** - * @since v17.0.0 - */ - class Readline { - /** - * @param stream A TTY stream. - */ - constructor( - stream: NodeJS.WritableStream, - options?: { - autoCommit?: boolean; - }, - ); - /** - * The `rl.clearLine()` method adds to the internal list of pending action an - * action that clears current line of the associated `stream` in a specified - * direction identified by `dir`. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - clearLine(dir: Direction): this; - /** - * The `rl.clearScreenDown()` method adds to the internal list of pending action an - * action that clears the associated stream from the current position of the - * cursor down. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - clearScreenDown(): this; - /** - * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions. - * @since v17.0.0 - */ - commit(): Promise; - /** - * The `rl.cursorTo()` method adds to the internal list of pending action an action - * that moves cursor to the specified position in the associated `stream`. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - cursorTo(x: number, y?: number): this; - /** - * The `rl.moveCursor()` method adds to the internal list of pending action an - * action that moves the cursor _relative_ to its current position in the - * associated `stream`. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - moveCursor(dx: number, dy: number): this; - /** - * The `rl.rollback` methods clears the internal list of pending actions without - * sending it to the associated `stream`. - * @since v17.0.0 - * @return this - */ - rollback(): this; - } - type Completer = (line: string) => CompleterResult | Promise; - interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> { - /** - * An optional function used for Tab autocompletion. - */ - completer?: Completer | undefined; - } - /** - * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance. - * - * ```js - * import readlinePromises from 'node:readline/promises'; - * const rl = readlinePromises.createInterface({ - * input: process.stdin, - * output: process.stdout, - * }); - * ``` - * - * Once the `readlinePromises.Interface` instance is created, the most common case - * is to listen for the `'line'` event: - * - * ```js - * rl.on('line', (line) => { - * console.log(`Received: ${line}`); - * }); - * ``` - * - * If `terminal` is `true` for this instance then the `output` stream will get - * the best compatibility if it defines an `output.columns` property and emits - * a `'resize'` event on the `output` if or when the columns ever change - * (`process.stdout` does this automatically when it is a TTY). - * @since v17.0.0 - */ - function createInterface( - input: NodeJS.ReadableStream, - output?: NodeJS.WritableStream, - completer?: Completer, - terminal?: boolean, - ): Interface; - function createInterface(options: ReadLineOptions): Interface; -} -declare module "node:readline/promises" { - export * from "readline/promises"; -} diff --git a/web/static/node_modules/@types/node/repl.d.ts b/web/static/node_modules/@types/node/repl.d.ts deleted file mode 100644 index 5ff046ad..00000000 --- a/web/static/node_modules/@types/node/repl.d.ts +++ /dev/null @@ -1,430 +0,0 @@ -/** - * The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation - * that is available both as a standalone program or includible in other - * applications. It can be accessed using: - * - * ```js - * import repl from 'node:repl'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/repl.js) - */ -declare module "repl" { - import { AsyncCompleter, Completer, Interface } from "node:readline"; - import { Context } from "node:vm"; - import { InspectOptions } from "node:util"; - interface ReplOptions { - /** - * The input prompt to display. - * @default "> " - */ - prompt?: string | undefined; - /** - * The `Readable` stream from which REPL input will be read. - * @default process.stdin - */ - input?: NodeJS.ReadableStream | undefined; - /** - * The `Writable` stream to which REPL output will be written. - * @default process.stdout - */ - output?: NodeJS.WritableStream | undefined; - /** - * If `true`, specifies that the output should be treated as a TTY terminal, and have - * ANSI/VT100 escape codes written to it. - * Default: checking the value of the `isTTY` property on the output stream upon - * instantiation. - */ - terminal?: boolean | undefined; - /** - * The function to be used when evaluating each given line of input. - * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can - * error with `repl.Recoverable` to indicate the input was incomplete and prompt for - * additional lines. - * - * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_default_evaluation - * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_custom_evaluation_functions - */ - eval?: REPLEval | undefined; - /** - * Defines if the repl prints output previews or not. - * @default `true` Always `false` in case `terminal` is falsy. - */ - preview?: boolean | undefined; - /** - * If `true`, specifies that the default `writer` function should include ANSI color - * styling to REPL output. If a custom `writer` function is provided then this has no - * effect. - * @default the REPL instance's `terminal` value - */ - useColors?: boolean | undefined; - /** - * If `true`, specifies that the default evaluation function will use the JavaScript - * `global` as the context as opposed to creating a new separate context for the REPL - * instance. The node CLI REPL sets this value to `true`. - * @default false - */ - useGlobal?: boolean | undefined; - /** - * If `true`, specifies that the default writer will not output the return value of a - * command if it evaluates to `undefined`. - * @default false - */ - ignoreUndefined?: boolean | undefined; - /** - * The function to invoke to format the output of each command before writing to `output`. - * @default a wrapper for `util.inspect` - * - * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_customizing_repl_output - */ - writer?: REPLWriter | undefined; - /** - * An optional function used for custom Tab auto completion. - * - * @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#readline_use_of_the_completer_function - */ - completer?: Completer | AsyncCompleter | undefined; - /** - * A flag that specifies whether the default evaluator executes all JavaScript commands in - * strict mode or default (sloppy) mode. - * Accepted values are: - * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. - * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to - * prefacing every repl statement with `'use strict'`. - */ - replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined; - /** - * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is - * pressed. This cannot be used together with a custom `eval` function. - * @default false - */ - breakEvalOnSigint?: boolean | undefined; - } - type REPLEval = ( - this: REPLServer, - evalCmd: string, - context: Context, - file: string, - cb: (err: Error | null, result: any) => void, - ) => void; - type REPLWriter = (this: REPLServer, obj: any) => string; - /** - * This is the default "writer" value, if none is passed in the REPL options, - * and it can be overridden by custom print functions. - */ - const writer: REPLWriter & { - options: InspectOptions; - }; - type REPLCommandAction = (this: REPLServer, text: string) => void; - interface REPLCommand { - /** - * Help text to be displayed when `.help` is entered. - */ - help?: string | undefined; - /** - * The function to execute, optionally accepting a single string argument. - */ - action: REPLCommandAction; - } - /** - * Instances of `repl.REPLServer` are created using the {@link start} method - * or directly using the JavaScript `new` keyword. - * - * ```js - * import repl from 'node:repl'; - * - * const options = { useColors: true }; - * - * const firstInstance = repl.start(options); - * const secondInstance = new repl.REPLServer(options); - * ``` - * @since v0.1.91 - */ - class REPLServer extends Interface { - /** - * The `vm.Context` provided to the `eval` function to be used for JavaScript - * evaluation. - */ - readonly context: Context; - /** - * @deprecated since v14.3.0 - Use `input` instead. - */ - readonly inputStream: NodeJS.ReadableStream; - /** - * @deprecated since v14.3.0 - Use `output` instead. - */ - readonly outputStream: NodeJS.WritableStream; - /** - * The `Readable` stream from which REPL input will be read. - */ - readonly input: NodeJS.ReadableStream; - /** - * The `Writable` stream to which REPL output will be written. - */ - readonly output: NodeJS.WritableStream; - /** - * The commands registered via `replServer.defineCommand()`. - */ - readonly commands: NodeJS.ReadOnlyDict; - /** - * A value indicating whether the REPL is currently in "editor mode". - * - * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_commands_and_special_keys - */ - readonly editorMode: boolean; - /** - * A value indicating whether the `_` variable has been assigned. - * - * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly underscoreAssigned: boolean; - /** - * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). - * - * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly last: any; - /** - * A value indicating whether the `_error` variable has been assigned. - * - * @since v9.8.0 - * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly underscoreErrAssigned: boolean; - /** - * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). - * - * @since v9.8.0 - * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly lastError: any; - /** - * Specified in the REPL options, this is the function to be used when evaluating each - * given line of input. If not specified in the REPL options, this is an async wrapper - * for the JavaScript `eval()` function. - */ - readonly eval: REPLEval; - /** - * Specified in the REPL options, this is a value indicating whether the default - * `writer` function should include ANSI color styling to REPL output. - */ - readonly useColors: boolean; - /** - * Specified in the REPL options, this is a value indicating whether the default `eval` - * function will use the JavaScript `global` as the context as opposed to creating a new - * separate context for the REPL instance. - */ - readonly useGlobal: boolean; - /** - * Specified in the REPL options, this is a value indicating whether the default `writer` - * function should output the result of a command if it evaluates to `undefined`. - */ - readonly ignoreUndefined: boolean; - /** - * Specified in the REPL options, this is the function to invoke to format the output of - * each command before writing to `outputStream`. If not specified in the REPL options, - * this will be a wrapper for `util.inspect`. - */ - readonly writer: REPLWriter; - /** - * Specified in the REPL options, this is the function to use for custom Tab auto-completion. - */ - readonly completer: Completer | AsyncCompleter; - /** - * Specified in the REPL options, this is a flag that specifies whether the default `eval` - * function should execute all JavaScript commands in strict mode or default (sloppy) mode. - * Possible values are: - * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. - * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to - * prefacing every repl statement with `'use strict'`. - */ - readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; - /** - * NOTE: According to the documentation: - * - * > Instances of `repl.REPLServer` are created using the `repl.start()` method and - * > _should not_ be created directly using the JavaScript `new` keyword. - * - * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. - * - * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_class_replserver - */ - private constructor(); - /** - * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands - * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following - * properties: - * - * The following example shows two new commands added to the REPL instance: - * - * ```js - * import repl from 'node:repl'; - * - * const replServer = repl.start({ prompt: '> ' }); - * replServer.defineCommand('sayhello', { - * help: 'Say hello', - * action(name) { - * this.clearBufferedCommand(); - * console.log(`Hello, ${name}!`); - * this.displayPrompt(); - * }, - * }); - * replServer.defineCommand('saybye', function saybye() { - * console.log('Goodbye!'); - * this.close(); - * }); - * ``` - * - * The new commands can then be used from within the REPL instance: - * - * ```console - * > .sayhello Node.js User - * Hello, Node.js User! - * > .saybye - * Goodbye! - * ``` - * @since v0.3.0 - * @param keyword The command keyword (_without_ a leading `.` character). - * @param cmd The function to invoke when the command is processed. - */ - defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; - /** - * The `replServer.displayPrompt()` method readies the REPL instance for input - * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input. - * - * When multi-line input is being entered, an ellipsis is printed rather than the - * 'prompt'. - * - * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`. - * - * The `replServer.displayPrompt` method is primarily intended to be called from - * within the action function for commands registered using the `replServer.defineCommand()` method. - * @since v0.1.91 - */ - displayPrompt(preserveCursor?: boolean): void; - /** - * The `replServer.clearBufferedCommand()` method clears any command that has been - * buffered but not yet executed. This method is primarily intended to be - * called from within the action function for commands registered using the `replServer.defineCommand()` method. - * @since v9.0.0 - */ - clearBufferedCommand(): void; - /** - * Initializes a history log file for the REPL instance. When executing the - * Node.js binary and using the command-line REPL, a history file is initialized - * by default. However, this is not the case when creating a REPL - * programmatically. Use this method to initialize a history log file when working - * with REPL instances programmatically. - * @since v11.10.0 - * @param historyPath the path to the history file - * @param callback called when history writes are ready or upon error - */ - setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void; - /** - * events.EventEmitter - * 1. close - inherited from `readline.Interface` - * 2. line - inherited from `readline.Interface` - * 3. pause - inherited from `readline.Interface` - * 4. resume - inherited from `readline.Interface` - * 5. SIGCONT - inherited from `readline.Interface` - * 6. SIGINT - inherited from `readline.Interface` - * 7. SIGTSTP - inherited from `readline.Interface` - * 8. exit - * 9. reset - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "line", listener: (input: string) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: "SIGCONT", listener: () => void): this; - addListener(event: "SIGINT", listener: () => void): this; - addListener(event: "SIGTSTP", listener: () => void): this; - addListener(event: "exit", listener: () => void): this; - addListener(event: "reset", listener: (context: Context) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "line", input: string): boolean; - emit(event: "pause"): boolean; - emit(event: "resume"): boolean; - emit(event: "SIGCONT"): boolean; - emit(event: "SIGINT"): boolean; - emit(event: "SIGTSTP"): boolean; - emit(event: "exit"): boolean; - emit(event: "reset", context: Context): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "line", listener: (input: string) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: "SIGCONT", listener: () => void): this; - on(event: "SIGINT", listener: () => void): this; - on(event: "SIGTSTP", listener: () => void): this; - on(event: "exit", listener: () => void): this; - on(event: "reset", listener: (context: Context) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "line", listener: (input: string) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: "SIGCONT", listener: () => void): this; - once(event: "SIGINT", listener: () => void): this; - once(event: "SIGTSTP", listener: () => void): this; - once(event: "exit", listener: () => void): this; - once(event: "reset", listener: (context: Context) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "line", listener: (input: string) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: "SIGCONT", listener: () => void): this; - prependListener(event: "SIGINT", listener: () => void): this; - prependListener(event: "SIGTSTP", listener: () => void): this; - prependListener(event: "exit", listener: () => void): this; - prependListener(event: "reset", listener: (context: Context) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "line", listener: (input: string) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: "SIGCONT", listener: () => void): this; - prependOnceListener(event: "SIGINT", listener: () => void): this; - prependOnceListener(event: "SIGTSTP", listener: () => void): this; - prependOnceListener(event: "exit", listener: () => void): this; - prependOnceListener(event: "reset", listener: (context: Context) => void): this; - } - /** - * A flag passed in the REPL options. Evaluates expressions in sloppy mode. - */ - const REPL_MODE_SLOPPY: unique symbol; - /** - * A flag passed in the REPL options. Evaluates expressions in strict mode. - * This is equivalent to prefacing every repl statement with `'use strict'`. - */ - const REPL_MODE_STRICT: unique symbol; - /** - * The `repl.start()` method creates and starts a {@link REPLServer} instance. - * - * If `options` is a string, then it specifies the input prompt: - * - * ```js - * import repl from 'node:repl'; - * - * // a Unix style prompt - * repl.start('$ '); - * ``` - * @since v0.1.91 - */ - function start(options?: string | ReplOptions): REPLServer; - /** - * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. - * - * @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_recoverable_errors - */ - class Recoverable extends SyntaxError { - err: Error; - constructor(err: Error); - } -} -declare module "node:repl" { - export * from "repl"; -} diff --git a/web/static/node_modules/@types/node/sea.d.ts b/web/static/node_modules/@types/node/sea.d.ts deleted file mode 100644 index 0bedc625..00000000 --- a/web/static/node_modules/@types/node/sea.d.ts +++ /dev/null @@ -1,153 +0,0 @@ -/** - * This feature allows the distribution of a Node.js application conveniently to a - * system that does not have Node.js installed. - * - * Node.js supports the creation of [single executable applications](https://github.com/nodejs/single-executable) by allowing - * the injection of a blob prepared by Node.js, which can contain a bundled script, - * into the `node` binary. During start up, the program checks if anything has been - * injected. If the blob is found, it executes the script in the blob. Otherwise - * Node.js operates as it normally does. - * - * The single executable application feature currently only supports running a - * single embedded script using the `CommonJS` module system. - * - * Users can create a single executable application from their bundled script - * with the `node` binary itself and any tool which can inject resources into the - * binary. - * - * Here are the steps for creating a single executable application using one such - * tool, [postject](https://github.com/nodejs/postject): - * - * 1. Create a JavaScript file: - * ```bash - * echo 'console.log(`Hello, ${process.argv[2]}!`);' > hello.js - * ``` - * 2. Create a configuration file building a blob that can be injected into the - * single executable application (see `Generating single executable preparation blobs` for details): - * ```bash - * echo '{ "main": "hello.js", "output": "sea-prep.blob" }' > sea-config.json - * ``` - * 3. Generate the blob to be injected: - * ```bash - * node --experimental-sea-config sea-config.json - * ``` - * 4. Create a copy of the `node` executable and name it according to your needs: - * * On systems other than Windows: - * ```bash - * cp $(command -v node) hello - * ``` - * * On Windows: - * ```text - * node -e "require('fs').copyFileSync(process.execPath, 'hello.exe')" - * ``` - * The `.exe` extension is necessary. - * 5. Remove the signature of the binary (macOS and Windows only): - * * On macOS: - * ```bash - * codesign --remove-signature hello - * ``` - * * On Windows (optional): - * [signtool](https://learn.microsoft.com/en-us/windows/win32/seccrypto/signtool) can be used from the installed [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/). - * If this step is - * skipped, ignore any signature-related warning from postject. - * ```powershell - * signtool remove /s hello.exe - * ``` - * 6. Inject the blob into the copied binary by running `postject` with - * the following options: - * * `hello` / `hello.exe` \- The name of the copy of the `node` executable - * created in step 4. - * * `NODE_SEA_BLOB` \- The name of the resource / note / section in the binary - * where the contents of the blob will be stored. - * * `sea-prep.blob` \- The name of the blob created in step 1. - * * `--sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2` \- The [fuse](https://www.electronjs.org/docs/latest/tutorial/fuses) used by the Node.js project to detect if a file has been - * injected. - * * `--macho-segment-name NODE_SEA` (only needed on macOS) - The name of the - * segment in the binary where the contents of the blob will be - * stored. - * To summarize, here is the required command for each platform: - * * On Linux: - * ```bash - * npx postject hello NODE_SEA_BLOB sea-prep.blob \ - * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 - * ``` - * * On Windows - PowerShell: - * ```powershell - * npx postject hello.exe NODE_SEA_BLOB sea-prep.blob ` - * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 - * ``` - * * On Windows - Command Prompt: - * ```text - * npx postject hello.exe NODE_SEA_BLOB sea-prep.blob ^ - * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 - * ``` - * * On macOS: - * ```bash - * npx postject hello NODE_SEA_BLOB sea-prep.blob \ - * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \ - * --macho-segment-name NODE_SEA - * ``` - * 7. Sign the binary (macOS and Windows only): - * * On macOS: - * ```bash - * codesign --sign - hello - * ``` - * * On Windows (optional): - * A certificate needs to be present for this to work. However, the unsigned - * binary would still be runnable. - * ```powershell - * signtool sign /fd SHA256 hello.exe - * ``` - * 8. Run the binary: - * * On systems other than Windows - * ```console - * $ ./hello world - * Hello, world! - * ``` - * * On Windows - * ```console - * $ .\hello.exe world - * Hello, world! - * ``` - * @since v19.7.0, v18.16.0 - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v22.x/src/node_sea.cc) - */ -declare module "node:sea" { - type AssetKey = string; - /** - * @since v20.12.0 - * @return Whether this script is running inside a single-executable application. - */ - function isSea(): boolean; - /** - * This method can be used to retrieve the assets configured to be bundled into the - * single-executable application at build time. - * An error is thrown when no matching asset can be found. - * @since v20.12.0 - */ - function getAsset(key: AssetKey): ArrayBuffer; - function getAsset(key: AssetKey, encoding: string): string; - /** - * Similar to `sea.getAsset()`, but returns the result in a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob). - * An error is thrown when no matching asset can be found. - * @since v20.12.0 - */ - function getAssetAsBlob(key: AssetKey, options?: { - type: string; - }): Blob; - /** - * This method can be used to retrieve the assets configured to be bundled into the - * single-executable application at build time. - * An error is thrown when no matching asset can be found. - * - * Unlike `sea.getRawAsset()` or `sea.getAssetAsBlob()`, this method does not - * return a copy. Instead, it returns the raw asset bundled inside the executable. - * - * For now, users should avoid writing to the returned array buffer. If the - * injected section is not marked as writable or not aligned properly, - * writes to the returned array buffer is likely to result in a crash. - * @since v20.12.0 - */ - function getRawAsset(key: AssetKey): string | ArrayBuffer; -} diff --git a/web/static/node_modules/@types/node/sqlite.d.ts b/web/static/node_modules/@types/node/sqlite.d.ts deleted file mode 100644 index 9fa7babb..00000000 --- a/web/static/node_modules/@types/node/sqlite.d.ts +++ /dev/null @@ -1,213 +0,0 @@ -/** - * The `node:sqlite` module facilitates working with SQLite databases. - * To access it: - * - * ```js - * import sqlite from 'node:sqlite'; - * ``` - * - * This module is only available under the `node:` scheme. The following will not - * work: - * - * ```js - * import sqlite from 'node:sqlite'; - * ``` - * - * The following example shows the basic usage of the `node:sqlite` module to open - * an in-memory database, write data to the database, and then read the data back. - * - * ```js - * import { DatabaseSync } from 'node:sqlite'; - * const database = new DatabaseSync(':memory:'); - * - * // Execute SQL statements from strings. - * database.exec(` - * CREATE TABLE data( - * key INTEGER PRIMARY KEY, - * value TEXT - * ) STRICT - * `); - * // Create a prepared statement to insert data into the database. - * const insert = database.prepare('INSERT INTO data (key, value) VALUES (?, ?)'); - * // Execute the prepared statement with bound values. - * insert.run(1, 'hello'); - * insert.run(2, 'world'); - * // Create a prepared statement to read data from the database. - * const query = database.prepare('SELECT * FROM data ORDER BY key'); - * // Execute the prepared statement and log the result set. - * console.log(query.all()); - * // Prints: [ { key: 1, value: 'hello' }, { key: 2, value: 'world' } ] - * ``` - * @since v22.5.0 - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/sqlite.js) - */ -declare module "node:sqlite" { - interface DatabaseSyncOptions { - /** - * If `true`, the database is opened by the constructor. - * When this value is `false`, the database must be opened via the `open()` method. - */ - open?: boolean | undefined; - } - /** - * This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs - * exposed by this class execute synchronously. - * @since v22.5.0 - */ - class DatabaseSync { - /** - * Constructs a new `DatabaseSync` instance. - * @param location The location of the database. - * A SQLite database can be stored in a file or completely [in memory](https://www.sqlite.org/inmemorydb.html). - * To use a file-backed database, the location should be a file path. - * To use an in-memory database, the location should be the special name `':memory:'`. - * @param options Configuration options for the database connection. - */ - constructor(location: string, options?: DatabaseSyncOptions); - /** - * Closes the database connection. An exception is thrown if the database is not - * open. This method is a wrapper around [`sqlite3_close_v2()`](https://www.sqlite.org/c3ref/close.html). - * @since v22.5.0 - */ - close(): void; - /** - * This method allows one or more SQL statements to be executed without returning - * any results. This method is useful when executing SQL statements read from a - * file. This method is a wrapper around [`sqlite3_exec()`](https://www.sqlite.org/c3ref/exec.html). - * @since v22.5.0 - * @param sql A SQL string to execute. - */ - exec(sql: string): void; - /** - * Opens the database specified in the `location` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via - * the constructor. An exception is thrown if the database is already open. - * @since v22.5.0 - */ - open(): void; - /** - * Compiles a SQL statement into a [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This method is a wrapper - * around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html). - * @since v22.5.0 - * @param sql A SQL string to compile to a prepared statement. - * @return The prepared statement. - */ - prepare(sql: string): StatementSync; - } - type SupportedValueType = null | number | bigint | string | Uint8Array; - interface StatementResultingChanges { - /** - * The number of rows modified, inserted, or deleted by the most recently completed `INSERT`, `UPDATE`, or `DELETE` statement. - * This field is either a number or a `BigInt` depending on the prepared statement's configuration. - * This property is the result of [`sqlite3_changes64()`](https://www.sqlite.org/c3ref/changes.html). - */ - changes: number | bigint; - /** - * The most recently inserted rowid. - * This field is either a number or a `BigInt` depending on the prepared statement's configuration. - * This property is the result of [`sqlite3_last_insert_rowid()`](https://www.sqlite.org/c3ref/last_insert_rowid.html). - */ - lastInsertRowid: number | bigint; - } - /** - * This class represents a single [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This class cannot be - * instantiated via its constructor. Instead, instances are created via the`database.prepare()` method. All APIs exposed by this class execute - * synchronously. - * - * A prepared statement is an efficient binary representation of the SQL used to - * create it. Prepared statements are parameterizable, and can be invoked multiple - * times with different bound values. Parameters also offer protection against [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) attacks. For these reasons, prepared statements are - * preferred - * over hand-crafted SQL strings when handling user input. - * @since v22.5.0 - */ - class StatementSync { - private constructor(); - /** - * This method executes a prepared statement and returns all results as an array of - * objects. If the prepared statement does not return any results, this method - * returns an empty array. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using - * the values in `namedParameters` and `anonymousParameters`. - * @since v22.5.0 - * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - * @return An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of - * the row. - */ - all(...anonymousParameters: SupportedValueType[]): unknown[]; - all( - namedParameters: Record, - ...anonymousParameters: SupportedValueType[] - ): unknown[]; - /** - * This method returns the source SQL of the prepared statement with parameter - * placeholders replaced by values. This method is a wrapper around [`sqlite3_expanded_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). - * @since v22.5.0 - * @return The source SQL expanded to include parameter values. - */ - expandedSQL(): string; - /** - * This method executes a prepared statement and returns the first result as an - * object. If the prepared statement does not return any results, this method - * returns `undefined`. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the - * values in `namedParameters` and `anonymousParameters`. - * @since v22.5.0 - * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - * @return An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no - * rows were returned from the database then this method returns `undefined`. - */ - get(...anonymousParameters: SupportedValueType[]): unknown; - get(namedParameters: Record, ...anonymousParameters: SupportedValueType[]): unknown; - /** - * This method executes a prepared statement and returns an object summarizing the - * resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the - * values in `namedParameters` and `anonymousParameters`. - * @since v22.5.0 - * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. - * @param anonymousParameters Zero or more values to bind to anonymous parameters. - */ - run(...anonymousParameters: SupportedValueType[]): StatementResultingChanges; - run( - namedParameters: Record, - ...anonymousParameters: SupportedValueType[] - ): StatementResultingChanges; - /** - * The names of SQLite parameters begin with a prefix character. By default,`node:sqlite` requires that this prefix character is present when binding - * parameters. However, with the exception of dollar sign character, these - * prefix characters also require extra quoting when used in object keys. - * - * To improve ergonomics, this method can be used to also allow bare named - * parameters, which do not require the prefix character in JavaScript code. There - * are several caveats to be aware of when enabling bare named parameters: - * - * * The prefix character is still required in SQL. - * * The prefix character is still allowed in JavaScript. In fact, prefixed names - * will have slightly better binding performance. - * * Using ambiguous named parameters, such as `$k` and `@k`, in the same prepared - * statement will result in an exception as it cannot be determined how to bind - * a bare name. - * @since v22.5.0 - * @param enabled Enables or disables support for binding named parameters without the prefix character. - */ - setAllowBareNamedParameters(enabled: boolean): void; - /** - * When reading from the database, SQLite `INTEGER`s are mapped to JavaScript - * numbers by default. However, SQLite `INTEGER`s can store values larger than - * JavaScript numbers are capable of representing. In such cases, this method can - * be used to read `INTEGER` data using JavaScript `BigInt`s. This method has no - * impact on database write operations where numbers and `BigInt`s are both - * supported at all times. - * @since v22.5.0 - * @param enabled Enables or disables the use of `BigInt`s when reading `INTEGER` fields from the database. - */ - setReadBigInts(enabled: boolean): void; - /** - * This method returns the source SQL of the prepared statement. This method is a - * wrapper around [`sqlite3_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). - * @since v22.5.0 - * @return The source SQL used to create this prepared statement. - */ - sourceSQL(): string; - } -} diff --git a/web/static/node_modules/@types/node/stream.d.ts b/web/static/node_modules/@types/node/stream.d.ts deleted file mode 100644 index 916bfcb0..00000000 --- a/web/static/node_modules/@types/node/stream.d.ts +++ /dev/null @@ -1,1726 +0,0 @@ -/** - * A stream is an abstract interface for working with streaming data in Node.js. - * The `node:stream` module provides an API for implementing the stream interface. - * - * There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-v22.x/api/http.html#class-httpincomingmessage) - * and [`process.stdout`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdout) are both stream instances. - * - * Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-v22.x/api/events.html#class-eventemitter). - * - * To access the `node:stream` module: - * - * ```js - * import stream from 'node:stream'; - * ``` - * - * The `node:stream` module is useful for creating new types of stream instances. - * It is usually not necessary to use the `node:stream` module to consume streams. - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/stream.js) - */ -declare module "stream" { - import { Abortable, EventEmitter } from "node:events"; - import { Blob as NodeBlob } from "node:buffer"; - import * as streamPromises from "node:stream/promises"; - import * as streamConsumers from "node:stream/consumers"; - import * as streamWeb from "node:stream/web"; - - type ComposeFnParam = (source: any) => void; - - class internal extends EventEmitter { - pipe( - destination: T, - options?: { - end?: boolean | undefined; - }, - ): T; - compose( - stream: T | ComposeFnParam | Iterable | AsyncIterable, - options?: { signal: AbortSignal }, - ): T; - } - import Stream = internal.Stream; - import Readable = internal.Readable; - import ReadableOptions = internal.ReadableOptions; - interface ArrayOptions { - /** - * The maximum concurrent invocations of `fn` to call on the stream at once. - * @default 1 - */ - concurrency?: number; - /** Allows destroying the stream if the signal is aborted. */ - signal?: AbortSignal; - } - class ReadableBase extends Stream implements NodeJS.ReadableStream { - /** - * A utility method for creating Readable Streams out of iterators. - * @since v12.3.0, v10.17.0 - * @param iterable Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. Emits an 'error' event if a null value is passed. - * @param options Options provided to `new stream.Readable([options])`. By default, `Readable.from()` will set `options.objectMode` to `true`, unless this is explicitly opted out by setting `options.objectMode` to `false`. - */ - static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; - /** - * Returns whether the stream has been read from or cancelled. - * @since v16.8.0 - */ - static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean; - /** - * Returns whether the stream was destroyed or errored before emitting `'end'`. - * @since v16.8.0 - * @experimental - */ - readonly readableAborted: boolean; - /** - * Is `true` if it is safe to call {@link read}, which means - * the stream has not been destroyed or emitted `'error'` or `'end'`. - * @since v11.4.0 - */ - readable: boolean; - /** - * Returns whether `'data'` has been emitted. - * @since v16.7.0, v14.18.0 - * @experimental - */ - readonly readableDidRead: boolean; - /** - * Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method. - * @since v12.7.0 - */ - readonly readableEncoding: BufferEncoding | null; - /** - * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v22.x/api/stream.html#event-end) event is emitted. - * @since v12.9.0 - */ - readonly readableEnded: boolean; - /** - * This property reflects the current state of a `Readable` stream as described - * in the [Three states](https://nodejs.org/docs/latest-v22.x/api/stream.html#three-states) section. - * @since v9.4.0 - */ - readonly readableFlowing: boolean | null; - /** - * Returns the value of `highWaterMark` passed when creating this `Readable`. - * @since v9.3.0 - */ - readonly readableHighWaterMark: number; - /** - * This property contains the number of bytes (or objects) in the queue - * ready to be read. The value provides introspection data regarding - * the status of the `highWaterMark`. - * @since v9.4.0 - */ - readonly readableLength: number; - /** - * Getter for the property `objectMode` of a given `Readable` stream. - * @since v12.3.0 - */ - readonly readableObjectMode: boolean; - /** - * Is `true` after `readable.destroy()` has been called. - * @since v8.0.0 - */ - destroyed: boolean; - /** - * Is `true` after `'close'` has been emitted. - * @since v18.0.0 - */ - readonly closed: boolean; - /** - * Returns error if the stream has been destroyed with an error. - * @since v18.0.0 - */ - readonly errored: Error | null; - constructor(opts?: ReadableOptions); - _construct?(callback: (error?: Error | null) => void): void; - _read(size: number): void; - /** - * The `readable.read()` method reads data out of the internal buffer and - * returns it. If no data is available to be read, `null` is returned. By default, - * the data is returned as a `Buffer` object unless an encoding has been - * specified using the `readable.setEncoding()` method or the stream is operating - * in object mode. - * - * The optional `size` argument specifies a specific number of bytes to read. If - * `size` bytes are not available to be read, `null` will be returned _unless_ the - * stream has ended, in which case all of the data remaining in the internal buffer - * will be returned. - * - * If the `size` argument is not specified, all of the data contained in the - * internal buffer will be returned. - * - * The `size` argument must be less than or equal to 1 GiB. - * - * The `readable.read()` method should only be called on `Readable` streams - * operating in paused mode. In flowing mode, `readable.read()` is called - * automatically until the internal buffer is fully drained. - * - * ```js - * const readable = getReadableStreamSomehow(); - * - * // 'readable' may be triggered multiple times as data is buffered in - * readable.on('readable', () => { - * let chunk; - * console.log('Stream is readable (new data received in buffer)'); - * // Use a loop to make sure we read all currently available data - * while (null !== (chunk = readable.read())) { - * console.log(`Read ${chunk.length} bytes of data...`); - * } - * }); - * - * // 'end' will be triggered once when there is no more data available - * readable.on('end', () => { - * console.log('Reached end of stream.'); - * }); - * ``` - * - * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks - * are not concatenated. A `while` loop is necessary to consume all data - * currently in the buffer. When reading a large file `.read()` may return `null`, - * having consumed all buffered content so far, but there is still more data to - * come not yet buffered. In this case a new `'readable'` event will be emitted - * when there is more data in the buffer. Finally the `'end'` event will be - * emitted when there is no more data to come. - * - * Therefore to read a file's whole contents from a `readable`, it is necessary - * to collect chunks across multiple `'readable'` events: - * - * ```js - * const chunks = []; - * - * readable.on('readable', () => { - * let chunk; - * while (null !== (chunk = readable.read())) { - * chunks.push(chunk); - * } - * }); - * - * readable.on('end', () => { - * const content = chunks.join(''); - * }); - * ``` - * - * A `Readable` stream in object mode will always return a single item from - * a call to `readable.read(size)`, regardless of the value of the `size` argument. - * - * If the `readable.read()` method returns a chunk of data, a `'data'` event will - * also be emitted. - * - * Calling {@link read} after the `'end'` event has - * been emitted will return `null`. No runtime error will be raised. - * @since v0.9.4 - * @param size Optional argument to specify how much data to read. - */ - read(size?: number): any; - /** - * The `readable.setEncoding()` method sets the character encoding for - * data read from the `Readable` stream. - * - * By default, no encoding is assigned and stream data will be returned as `Buffer` objects. Setting an encoding causes the stream data - * to be returned as strings of the specified encoding rather than as `Buffer` objects. For instance, calling `readable.setEncoding('utf8')` will cause the - * output data to be interpreted as UTF-8 data, and passed as strings. Calling `readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal - * string format. - * - * The `Readable` stream will properly handle multi-byte characters delivered - * through the stream that would otherwise become improperly decoded if simply - * pulled from the stream as `Buffer` objects. - * - * ```js - * const readable = getReadableStreamSomehow(); - * readable.setEncoding('utf8'); - * readable.on('data', (chunk) => { - * assert.equal(typeof chunk, 'string'); - * console.log('Got %d characters of string data:', chunk.length); - * }); - * ``` - * @since v0.9.4 - * @param encoding The encoding to use. - */ - setEncoding(encoding: BufferEncoding): this; - /** - * The `readable.pause()` method will cause a stream in flowing mode to stop - * emitting `'data'` events, switching out of flowing mode. Any data that - * becomes available will remain in the internal buffer. - * - * ```js - * const readable = getReadableStreamSomehow(); - * readable.on('data', (chunk) => { - * console.log(`Received ${chunk.length} bytes of data.`); - * readable.pause(); - * console.log('There will be no additional data for 1 second.'); - * setTimeout(() => { - * console.log('Now data will start flowing again.'); - * readable.resume(); - * }, 1000); - * }); - * ``` - * - * The `readable.pause()` method has no effect if there is a `'readable'` event listener. - * @since v0.9.4 - */ - pause(): this; - /** - * The `readable.resume()` method causes an explicitly paused `Readable` stream to - * resume emitting `'data'` events, switching the stream into flowing mode. - * - * The `readable.resume()` method can be used to fully consume the data from a - * stream without actually processing any of that data: - * - * ```js - * getReadableStreamSomehow() - * .resume() - * .on('end', () => { - * console.log('Reached the end, but did not read anything.'); - * }); - * ``` - * - * The `readable.resume()` method has no effect if there is a `'readable'` event listener. - * @since v0.9.4 - */ - resume(): this; - /** - * The `readable.isPaused()` method returns the current operating state of the `Readable`. - * This is used primarily by the mechanism that underlies the `readable.pipe()` method. - * In most typical cases, there will be no reason to use this method directly. - * - * ```js - * const readable = new stream.Readable(); - * - * readable.isPaused(); // === false - * readable.pause(); - * readable.isPaused(); // === true - * readable.resume(); - * readable.isPaused(); // === false - * ``` - * @since v0.11.14 - */ - isPaused(): boolean; - /** - * The `readable.unpipe()` method detaches a `Writable` stream previously attached - * using the {@link pipe} method. - * - * If the `destination` is not specified, then _all_ pipes are detached. - * - * If the `destination` is specified, but no pipe is set up for it, then - * the method does nothing. - * - * ```js - * import fs from 'node:fs'; - * const readable = getReadableStreamSomehow(); - * const writable = fs.createWriteStream('file.txt'); - * // All the data from readable goes into 'file.txt', - * // but only for the first second. - * readable.pipe(writable); - * setTimeout(() => { - * console.log('Stop writing to file.txt.'); - * readable.unpipe(writable); - * console.log('Manually close the file stream.'); - * writable.end(); - * }, 1000); - * ``` - * @since v0.9.4 - * @param destination Optional specific stream to unpipe - */ - unpipe(destination?: NodeJS.WritableStream): this; - /** - * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the - * same as `readable.push(null)`, after which no more data can be written. The EOF - * signal is put at the end of the buffer and any buffered data will still be - * flushed. - * - * The `readable.unshift()` method pushes a chunk of data back into the internal - * buffer. This is useful in certain situations where a stream is being consumed by - * code that needs to "un-consume" some amount of data that it has optimistically - * pulled out of the source, so that the data can be passed on to some other party. - * - * The `stream.unshift(chunk)` method cannot be called after the `'end'` event - * has been emitted or a runtime error will be thrown. - * - * Developers using `stream.unshift()` often should consider switching to - * use of a `Transform` stream instead. See the `API for stream implementers` section for more information. - * - * ```js - * // Pull off a header delimited by \n\n. - * // Use unshift() if we get too much. - * // Call the callback with (error, header, stream). - * import { StringDecoder } from 'node:string_decoder'; - * function parseHeader(stream, callback) { - * stream.on('error', callback); - * stream.on('readable', onReadable); - * const decoder = new StringDecoder('utf8'); - * let header = ''; - * function onReadable() { - * let chunk; - * while (null !== (chunk = stream.read())) { - * const str = decoder.write(chunk); - * if (str.includes('\n\n')) { - * // Found the header boundary. - * const split = str.split(/\n\n/); - * header += split.shift(); - * const remaining = split.join('\n\n'); - * const buf = Buffer.from(remaining, 'utf8'); - * stream.removeListener('error', callback); - * // Remove the 'readable' listener before unshifting. - * stream.removeListener('readable', onReadable); - * if (buf.length) - * stream.unshift(buf); - * // Now the body of the message can be read from the stream. - * callback(null, header, stream); - * return; - * } - * // Still reading the header. - * header += str; - * } - * } - * } - * ``` - * - * Unlike {@link push}, `stream.unshift(chunk)` will not - * end the reading process by resetting the internal reading state of the stream. - * This can cause unexpected results if `readable.unshift()` is called during a - * read (i.e. from within a {@link _read} implementation on a - * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately, - * however it is best to simply avoid calling `readable.unshift()` while in the - * process of performing a read. - * @since v0.9.11 - * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must - * be a {string}, {Buffer}, {TypedArray}, {DataView} or `null`. For object mode streams, `chunk` may be any JavaScript value. - * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`. - */ - unshift(chunk: any, encoding?: BufferEncoding): void; - /** - * Prior to Node.js 0.10, streams did not implement the entire `node:stream` module API as it is currently defined. (See `Compatibility` for more - * information.) - * - * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the `readable.wrap()` method can be used to create a `Readable` - * stream that uses - * the old stream as its data source. - * - * It will rarely be necessary to use `readable.wrap()` but the method has been - * provided as a convenience for interacting with older Node.js applications and - * libraries. - * - * ```js - * import { OldReader } from './old-api-module.js'; - * import { Readable } from 'node:stream'; - * const oreader = new OldReader(); - * const myReader = new Readable().wrap(oreader); - * - * myReader.on('readable', () => { - * myReader.read(); // etc. - * }); - * ``` - * @since v0.9.4 - * @param stream An "old style" readable stream - */ - wrap(stream: NodeJS.ReadableStream): this; - push(chunk: any, encoding?: BufferEncoding): boolean; - /** - * The iterator created by this method gives users the option to cancel the destruction - * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`, - * or if the iterator should destroy the stream if the stream emitted an error during iteration. - * @since v16.3.0 - * @param options.destroyOnReturn When set to `false`, calling `return` on the async iterator, - * or exiting a `for await...of` iteration using a `break`, `return`, or `throw` will not destroy the stream. - * **Default: `true`**. - */ - iterator(options?: { destroyOnReturn?: boolean }): NodeJS.AsyncIterator; - /** - * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream. - * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream. - * @since v17.4.0, v16.14.0 - * @param fn a function to map over every chunk in the stream. Async or not. - * @returns a stream mapped with the function *fn*. - */ - map(fn: (data: any, options?: Pick) => any, options?: ArrayOptions): Readable; - /** - * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called - * and if it returns a truthy value, the chunk will be passed to the result stream. - * If the *fn* function returns a promise - that promise will be `await`ed. - * @since v17.4.0, v16.14.0 - * @param fn a function to filter chunks from the stream. Async or not. - * @returns a stream filtered with the predicate *fn*. - */ - filter( - fn: (data: any, options?: Pick) => boolean | Promise, - options?: ArrayOptions, - ): Readable; - /** - * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called. - * If the *fn* function returns a promise - that promise will be `await`ed. - * - * This method is different from `for await...of` loops in that it can optionally process chunks concurrently. - * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option - * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`. - * In either case the stream will be destroyed. - * - * This method is different from listening to the `'data'` event in that it uses the `readable` event - * in the underlying machinary and can limit the number of concurrent *fn* calls. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise for when the stream has finished. - */ - forEach( - fn: (data: any, options?: Pick) => void | Promise, - options?: ArrayOptions, - ): Promise; - /** - * This method allows easily obtaining the contents of a stream. - * - * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended - * for interoperability and convenience, not as the primary way to consume streams. - * @since v17.5.0 - * @returns a promise containing an array with the contents of the stream. - */ - toArray(options?: Pick): Promise; - /** - * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream - * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk - * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`. - * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks. - */ - some( - fn: (data: any, options?: Pick) => boolean | Promise, - options?: ArrayOptions, - ): Promise; - /** - * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream - * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy, - * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. - * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value, - * or `undefined` if no element was found. - */ - find( - fn: (data: any, options?: Pick) => data is T, - options?: ArrayOptions, - ): Promise; - find( - fn: (data: any, options?: Pick) => boolean | Promise, - options?: ArrayOptions, - ): Promise; - /** - * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream - * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk - * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`. - * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks. - */ - every( - fn: (data: any, options?: Pick) => boolean | Promise, - options?: ArrayOptions, - ): Promise; - /** - * This method returns a new stream by applying the given callback to each chunk of the stream - * and then flattening the result. - * - * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams - * will be merged (flattened) into the returned stream. - * @since v17.5.0 - * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator. - * @returns a stream flat-mapped with the function *fn*. - */ - flatMap(fn: (data: any, options?: Pick) => any, options?: ArrayOptions): Readable; - /** - * This method returns a new stream with the first *limit* chunks dropped from the start. - * @since v17.5.0 - * @param limit the number of chunks to drop from the readable. - * @returns a stream with *limit* chunks dropped from the start. - */ - drop(limit: number, options?: Pick): Readable; - /** - * This method returns a new stream with the first *limit* chunks. - * @since v17.5.0 - * @param limit the number of chunks to take from the readable. - * @returns a stream with *limit* chunks taken. - */ - take(limit: number, options?: Pick): Readable; - /** - * This method returns a new stream with chunks of the underlying stream paired with a counter - * in the form `[index, chunk]`. The first index value is `0` and it increases by 1 for each chunk produced. - * @since v17.5.0 - * @returns a stream of indexed pairs. - */ - asIndexedPairs(options?: Pick): Readable; - /** - * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation - * on the previous element. It returns a promise for the final value of the reduction. - * - * If no *initial* value is supplied the first chunk of the stream is used as the initial value. - * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property. - * - * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter - * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. - * @since v17.5.0 - * @param fn a reducer function to call over every chunk in the stream. Async or not. - * @param initial the initial value to use in the reduction. - * @returns a promise for the final value of the reduction. - */ - reduce( - fn: (previous: any, data: any, options?: Pick) => T, - initial?: undefined, - options?: Pick, - ): Promise; - reduce( - fn: (previous: T, data: any, options?: Pick) => T, - initial: T, - options?: Pick, - ): Promise; - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - /** - * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the readable - * stream will release any internal resources and subsequent calls to `push()` will be ignored. - * - * Once `destroy()` has been called any further calls will be a no-op and no - * further errors except from `_destroy()` may be emitted as `'error'`. - * - * Implementors should not override this method, but instead implement `readable._destroy()`. - * @since v8.0.0 - * @param error Error which will be passed as payload in `'error'` event - */ - destroy(error?: Error): this; - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. data - * 3. end - * 4. error - * 5. pause - * 6. readable - * 7. resume - */ - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: any) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "close"): boolean; - emit(event: "data", chunk: any): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "pause"): boolean; - emit(event: "readable"): boolean; - emit(event: "resume"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: any) => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: any) => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: any) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: any) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "data", listener: (chunk: any) => void): this; - removeListener(event: "end", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "pause", listener: () => void): this; - removeListener(event: "readable", listener: () => void): this; - removeListener(event: "resume", listener: () => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - /** - * Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished. - * @since v20.4.0 - */ - [Symbol.asyncDispose](): Promise; - } - import WritableOptions = internal.WritableOptions; - class WritableBase extends Stream implements NodeJS.WritableStream { - /** - * Is `true` if it is safe to call `writable.write()`, which means - * the stream has not been destroyed, errored, or ended. - * @since v11.4.0 - */ - readonly writable: boolean; - /** - * Is `true` after `writable.end()` has been called. This property - * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. - * @since v12.9.0 - */ - readonly writableEnded: boolean; - /** - * Is set to `true` immediately before the `'finish'` event is emitted. - * @since v12.6.0 - */ - readonly writableFinished: boolean; - /** - * Return the value of `highWaterMark` passed when creating this `Writable`. - * @since v9.3.0 - */ - readonly writableHighWaterMark: number; - /** - * This property contains the number of bytes (or objects) in the queue - * ready to be written. The value provides introspection data regarding - * the status of the `highWaterMark`. - * @since v9.4.0 - */ - readonly writableLength: number; - /** - * Getter for the property `objectMode` of a given `Writable` stream. - * @since v12.3.0 - */ - readonly writableObjectMode: boolean; - /** - * Number of times `writable.uncork()` needs to be - * called in order to fully uncork the stream. - * @since v13.2.0, v12.16.0 - */ - readonly writableCorked: number; - /** - * Is `true` after `writable.destroy()` has been called. - * @since v8.0.0 - */ - destroyed: boolean; - /** - * Is `true` after `'close'` has been emitted. - * @since v18.0.0 - */ - readonly closed: boolean; - /** - * Returns error if the stream has been destroyed with an error. - * @since v18.0.0 - */ - readonly errored: Error | null; - /** - * Is `true` if the stream's buffer has been full and stream will emit `'drain'`. - * @since v15.2.0, v14.17.0 - */ - readonly writableNeedDrain: boolean; - constructor(opts?: WritableOptions); - _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; - _writev?( - chunks: Array<{ - chunk: any; - encoding: BufferEncoding; - }>, - callback: (error?: Error | null) => void, - ): void; - _construct?(callback: (error?: Error | null) => void): void; - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - _final(callback: (error?: Error | null) => void): void; - /** - * The `writable.write()` method writes some data to the stream, and calls the - * supplied `callback` once the data has been fully handled. If an error - * occurs, the `callback` will be called with the error as its - * first argument. The `callback` is called asynchronously and before `'error'` is - * emitted. - * - * The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`. - * If `false` is returned, further attempts to write data to the stream should - * stop until the `'drain'` event is emitted. - * - * While a stream is not draining, calls to `write()` will buffer `chunk`, and - * return false. Once all currently buffered chunks are drained (accepted for - * delivery by the operating system), the `'drain'` event will be emitted. - * Once `write()` returns false, do not write more chunks - * until the `'drain'` event is emitted. While calling `write()` on a stream that - * is not draining is allowed, Node.js will buffer all written chunks until - * maximum memory usage occurs, at which point it will abort unconditionally. - * Even before it aborts, high memory usage will cause poor garbage collector - * performance and high RSS (which is not typically released back to the system, - * even after the memory is no longer required). Since TCP sockets may never - * drain if the remote peer does not read the data, writing a socket that is - * not draining may lead to a remotely exploitable vulnerability. - * - * Writing data while the stream is not draining is particularly - * problematic for a `Transform`, because the `Transform` streams are paused - * by default until they are piped or a `'data'` or `'readable'` event handler - * is added. - * - * If the data to be written can be generated or fetched on demand, it is - * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is - * possible to respect backpressure and avoid memory issues using the `'drain'` event: - * - * ```js - * function write(data, cb) { - * if (!stream.write(data)) { - * stream.once('drain', cb); - * } else { - * process.nextTick(cb); - * } - * } - * - * // Wait for cb to be called before doing any other write. - * write('hello', () => { - * console.log('Write completed, do more writes now.'); - * }); - * ``` - * - * A `Writable` stream in object mode will always ignore the `encoding` argument. - * @since v0.9.4 - * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, - * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. - * @param [encoding='utf8'] The encoding, if `chunk` is a string. - * @param callback Callback for when this chunk of data is flushed. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean; - write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean; - /** - * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream. - * @since v0.11.15 - * @param encoding The new default encoding - */ - setDefaultEncoding(encoding: BufferEncoding): this; - /** - * Calling the `writable.end()` method signals that no more data will be written - * to the `Writable`. The optional `chunk` and `encoding` arguments allow one - * final additional chunk of data to be written immediately before closing the - * stream. - * - * Calling the {@link write} method after calling {@link end} will raise an error. - * - * ```js - * // Write 'hello, ' and then end with 'world!'. - * import fs from 'node:fs'; - * const file = fs.createWriteStream('example.txt'); - * file.write('hello, '); - * file.end('world!'); - * // Writing more now is not allowed! - * ``` - * @since v0.9.4 - * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, - * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. - * @param encoding The encoding if `chunk` is a string - * @param callback Callback for when the stream is finished. - */ - end(cb?: () => void): this; - end(chunk: any, cb?: () => void): this; - end(chunk: any, encoding: BufferEncoding, cb?: () => void): this; - /** - * The `writable.cork()` method forces all written data to be buffered in memory. - * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called. - * - * The primary intent of `writable.cork()` is to accommodate a situation in which - * several small chunks are written to the stream in rapid succession. Instead of - * immediately forwarding them to the underlying destination, `writable.cork()` buffers all the chunks until `writable.uncork()` is called, which will pass them - * all to `writable._writev()`, if present. This prevents a head-of-line blocking - * situation where data is being buffered while waiting for the first small chunk - * to be processed. However, use of `writable.cork()` without implementing `writable._writev()` may have an adverse effect on throughput. - * - * See also: `writable.uncork()`, `writable._writev()`. - * @since v0.11.2 - */ - cork(): void; - /** - * The `writable.uncork()` method flushes all data buffered since {@link cork} was called. - * - * When using `writable.cork()` and `writable.uncork()` to manage the buffering - * of writes to a stream, defer calls to `writable.uncork()` using `process.nextTick()`. Doing so allows batching of all `writable.write()` calls that occur within a given Node.js event - * loop phase. - * - * ```js - * stream.cork(); - * stream.write('some '); - * stream.write('data '); - * process.nextTick(() => stream.uncork()); - * ``` - * - * If the `writable.cork()` method is called multiple times on a stream, the - * same number of calls to `writable.uncork()` must be called to flush the buffered - * data. - * - * ```js - * stream.cork(); - * stream.write('some '); - * stream.cork(); - * stream.write('data '); - * process.nextTick(() => { - * stream.uncork(); - * // The data will not be flushed until uncork() is called a second time. - * stream.uncork(); - * }); - * ``` - * - * See also: `writable.cork()`. - * @since v0.11.2 - */ - uncork(): void; - /** - * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the writable - * stream has ended and subsequent calls to `write()` or `end()` will result in - * an `ERR_STREAM_DESTROYED` error. - * This is a destructive and immediate way to destroy a stream. Previous calls to `write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error. - * Use `end()` instead of destroy if data should flush before close, or wait for - * the `'drain'` event before destroying the stream. - * - * Once `destroy()` has been called any further calls will be a no-op and no - * further errors except from `_destroy()` may be emitted as `'error'`. - * - * Implementors should not override this method, - * but instead implement `writable._destroy()`. - * @since v8.0.0 - * @param error Optional, an error to emit with `'error'` event. - */ - destroy(error?: Error): this; - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. drain - * 3. error - * 4. finish - * 5. pipe - * 6. unpipe - */ - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: Readable) => void): this; - addListener(event: "unpipe", listener: (src: Readable) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "close"): boolean; - emit(event: "drain"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pipe", src: Readable): boolean; - emit(event: "unpipe", src: Readable): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: Readable) => void): this; - on(event: "unpipe", listener: (src: Readable) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: Readable) => void): this; - once(event: "unpipe", listener: (src: Readable) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: Readable) => void): this; - prependListener(event: "unpipe", listener: (src: Readable) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "drain", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "finish", listener: () => void): this; - removeListener(event: "pipe", listener: (src: Readable) => void): this; - removeListener(event: "unpipe", listener: (src: Readable) => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - namespace internal { - class Stream extends internal { - constructor(opts?: ReadableOptions); - } - interface StreamOptions extends Abortable { - emitClose?: boolean | undefined; - highWaterMark?: number | undefined; - objectMode?: boolean | undefined; - construct?(this: T, callback: (error?: Error | null) => void): void; - destroy?(this: T, error: Error | null, callback: (error?: Error | null) => void): void; - autoDestroy?: boolean | undefined; - } - interface ReadableOptions extends StreamOptions { - encoding?: BufferEncoding | undefined; - read?(this: Readable, size: number): void; - } - /** - * @since v0.9.4 - */ - class Readable extends ReadableBase { - /** - * A utility method for creating a `Readable` from a web `ReadableStream`. - * @since v17.0.0 - * @experimental - */ - static fromWeb( - readableStream: streamWeb.ReadableStream, - options?: Pick, - ): Readable; - /** - * A utility method for creating a web `ReadableStream` from a `Readable`. - * @since v17.0.0 - * @experimental - */ - static toWeb(streamReadable: Readable): streamWeb.ReadableStream; - } - interface WritableOptions extends StreamOptions { - decodeStrings?: boolean | undefined; - defaultEncoding?: BufferEncoding | undefined; - write?( - this: Writable, - chunk: any, - encoding: BufferEncoding, - callback: (error?: Error | null) => void, - ): void; - writev?( - this: Writable, - chunks: Array<{ - chunk: any; - encoding: BufferEncoding; - }>, - callback: (error?: Error | null) => void, - ): void; - final?(this: Writable, callback: (error?: Error | null) => void): void; - } - /** - * @since v0.9.4 - */ - class Writable extends WritableBase { - /** - * A utility method for creating a `Writable` from a web `WritableStream`. - * @since v17.0.0 - * @experimental - */ - static fromWeb( - writableStream: streamWeb.WritableStream, - options?: Pick, - ): Writable; - /** - * A utility method for creating a web `WritableStream` from a `Writable`. - * @since v17.0.0 - * @experimental - */ - static toWeb(streamWritable: Writable): streamWeb.WritableStream; - } - interface DuplexOptions extends ReadableOptions, WritableOptions { - allowHalfOpen?: boolean | undefined; - readableObjectMode?: boolean | undefined; - writableObjectMode?: boolean | undefined; - readableHighWaterMark?: number | undefined; - writableHighWaterMark?: number | undefined; - writableCorked?: number | undefined; - construct?(this: Duplex, callback: (error?: Error | null) => void): void; - read?(this: Duplex, size: number): void; - write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; - writev?( - this: Duplex, - chunks: Array<{ - chunk: any; - encoding: BufferEncoding; - }>, - callback: (error?: Error | null) => void, - ): void; - final?(this: Duplex, callback: (error?: Error | null) => void): void; - destroy?(this: Duplex, error: Error | null, callback: (error?: Error | null) => void): void; - } - /** - * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces. - * - * Examples of `Duplex` streams include: - * - * * `TCP sockets` - * * `zlib streams` - * * `crypto streams` - * @since v0.9.4 - */ - class Duplex extends ReadableBase implements WritableBase { - readonly writable: boolean; - readonly writableEnded: boolean; - readonly writableFinished: boolean; - readonly writableHighWaterMark: number; - readonly writableLength: number; - readonly writableObjectMode: boolean; - readonly writableCorked: number; - readonly writableNeedDrain: boolean; - readonly closed: boolean; - readonly errored: Error | null; - /** - * If `false` then the stream will automatically end the writable side when the - * readable side ends. Set initially by the `allowHalfOpen` constructor option, - * which defaults to `true`. - * - * This can be changed manually to change the half-open behavior of an existing - * `Duplex` stream instance, but must be changed before the `'end'` event is emitted. - * @since v0.9.4 - */ - allowHalfOpen: boolean; - constructor(opts?: DuplexOptions); - /** - * A utility method for creating duplex streams. - * - * - `Stream` converts writable stream into writable `Duplex` and readable stream - * to `Duplex`. - * - `Blob` converts into readable `Duplex`. - * - `string` converts into readable `Duplex`. - * - `ArrayBuffer` converts into readable `Duplex`. - * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`. - * - `AsyncGeneratorFunction` converts into a readable/writable transform - * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield - * `null`. - * - `AsyncFunction` converts into a writable `Duplex`. Must return - * either `null` or `undefined` - * - `Object ({ writable, readable })` converts `readable` and - * `writable` into `Stream` and then combines them into `Duplex` where the - * `Duplex` will write to the `writable` and read from the `readable`. - * - `Promise` converts into readable `Duplex`. Value `null` is ignored. - * - * @since v16.8.0 - */ - static from( - src: - | Stream - | NodeBlob - | ArrayBuffer - | string - | Iterable - | AsyncIterable - | AsyncGeneratorFunction - | Promise - | Object, - ): Duplex; - _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; - _writev?( - chunks: Array<{ - chunk: any; - encoding: BufferEncoding; - }>, - callback: (error?: Error | null) => void, - ): void; - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - _final(callback: (error?: Error | null) => void): void; - write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean; - write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; - setDefaultEncoding(encoding: BufferEncoding): this; - end(cb?: () => void): this; - end(chunk: any, cb?: () => void): this; - end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this; - cork(): void; - uncork(): void; - /** - * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`. - * @since v17.0.0 - * @experimental - */ - static toWeb(streamDuplex: Duplex): { - readable: streamWeb.ReadableStream; - writable: streamWeb.WritableStream; - }; - /** - * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`. - * @since v17.0.0 - * @experimental - */ - static fromWeb( - duplexStream: { - readable: streamWeb.ReadableStream; - writable: streamWeb.WritableStream; - }, - options?: Pick< - DuplexOptions, - "allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal" - >, - ): Duplex; - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. data - * 3. drain - * 4. end - * 5. error - * 6. finish - * 7. pause - * 8. pipe - * 9. readable - * 10. resume - * 11. unpipe - */ - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: any) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "pipe", listener: (src: Readable) => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: "unpipe", listener: (src: Readable) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "close"): boolean; - emit(event: "data", chunk: any): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pause"): boolean; - emit(event: "pipe", src: Readable): boolean; - emit(event: "readable"): boolean; - emit(event: "resume"): boolean; - emit(event: "unpipe", src: Readable): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: any) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pause", listener: () => void): this; - on(event: "pipe", listener: (src: Readable) => void): this; - on(event: "readable", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: "unpipe", listener: (src: Readable) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: any) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pause", listener: () => void): this; - once(event: "pipe", listener: (src: Readable) => void): this; - once(event: "readable", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: "unpipe", listener: (src: Readable) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: any) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "pipe", listener: (src: Readable) => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: "unpipe", listener: (src: Readable) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: any) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "data", listener: (chunk: any) => void): this; - removeListener(event: "drain", listener: () => void): this; - removeListener(event: "end", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "finish", listener: () => void): this; - removeListener(event: "pause", listener: () => void): this; - removeListener(event: "pipe", listener: (src: Readable) => void): this; - removeListener(event: "readable", listener: () => void): this; - removeListener(event: "resume", listener: () => void): this; - removeListener(event: "unpipe", listener: (src: Readable) => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - /** - * The utility function `duplexPair` returns an Array with two items, - * each being a `Duplex` stream connected to the other side: - * - * ```js - * const [ sideA, sideB ] = duplexPair(); - * ``` - * - * Whatever is written to one stream is made readable on the other. It provides - * behavior analogous to a network connection, where the data written by the client - * becomes readable by the server, and vice-versa. - * - * The Duplex streams are symmetrical; one or the other may be used without any - * difference in behavior. - * @param options A value to pass to both {@link Duplex} constructors, - * to set options such as buffering. - * @since v22.6.0 - */ - function duplexPair(options?: DuplexOptions): [Duplex, Duplex]; - type TransformCallback = (error?: Error | null, data?: any) => void; - interface TransformOptions extends DuplexOptions { - construct?(this: Transform, callback: (error?: Error | null) => void): void; - read?(this: Transform, size: number): void; - write?( - this: Transform, - chunk: any, - encoding: BufferEncoding, - callback: (error?: Error | null) => void, - ): void; - writev?( - this: Transform, - chunks: Array<{ - chunk: any; - encoding: BufferEncoding; - }>, - callback: (error?: Error | null) => void, - ): void; - final?(this: Transform, callback: (error?: Error | null) => void): void; - destroy?(this: Transform, error: Error | null, callback: (error?: Error | null) => void): void; - transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; - flush?(this: Transform, callback: TransformCallback): void; - } - /** - * Transform streams are `Duplex` streams where the output is in some way - * related to the input. Like all `Duplex` streams, `Transform` streams - * implement both the `Readable` and `Writable` interfaces. - * - * Examples of `Transform` streams include: - * - * * `zlib streams` - * * `crypto streams` - * @since v0.9.4 - */ - class Transform extends Duplex { - constructor(opts?: TransformOptions); - _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; - _flush(callback: TransformCallback): void; - } - /** - * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is - * primarily for examples and testing, but there are some use cases where `stream.PassThrough` is useful as a building block for novel sorts of streams. - */ - class PassThrough extends Transform {} - /** - * A stream to attach a signal to. - * - * Attaches an AbortSignal to a readable or writeable stream. This lets code - * control stream destruction using an `AbortController`. - * - * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as calling `.destroy(new AbortError())` on the - * stream, and `controller.error(new AbortError())` for webstreams. - * - * ```js - * import fs from 'node:fs'; - * - * const controller = new AbortController(); - * const read = addAbortSignal( - * controller.signal, - * fs.createReadStream(('object.json')), - * ); - * // Later, abort the operation closing the stream - * controller.abort(); - * ``` - * - * Or using an `AbortSignal` with a readable stream as an async iterable: - * - * ```js - * const controller = new AbortController(); - * setTimeout(() => controller.abort(), 10_000); // set a timeout - * const stream = addAbortSignal( - * controller.signal, - * fs.createReadStream(('object.json')), - * ); - * (async () => { - * try { - * for await (const chunk of stream) { - * await process(chunk); - * } - * } catch (e) { - * if (e.name === 'AbortError') { - * // The operation was cancelled - * } else { - * throw e; - * } - * } - * })(); - * ``` - * - * Or using an `AbortSignal` with a ReadableStream: - * - * ```js - * const controller = new AbortController(); - * const rs = new ReadableStream({ - * start(controller) { - * controller.enqueue('hello'); - * controller.enqueue('world'); - * controller.close(); - * }, - * }); - * - * addAbortSignal(controller.signal, rs); - * - * finished(rs, (err) => { - * if (err) { - * if (err.name === 'AbortError') { - * // The operation was cancelled - * } - * } - * }); - * - * const reader = rs.getReader(); - * - * reader.read().then(({ value, done }) => { - * console.log(value); // hello - * console.log(done); // false - * controller.abort(); - * }); - * ``` - * @since v15.4.0 - * @param signal A signal representing possible cancellation - * @param stream A stream to attach a signal to. - */ - function addAbortSignal(signal: AbortSignal, stream: T): T; - /** - * Returns the default highWaterMark used by streams. - * Defaults to `65536` (64 KiB), or `16` for `objectMode`. - * @since v19.9.0 - */ - function getDefaultHighWaterMark(objectMode: boolean): number; - /** - * Sets the default highWaterMark used by streams. - * @since v19.9.0 - * @param value highWaterMark value - */ - function setDefaultHighWaterMark(objectMode: boolean, value: number): void; - interface FinishedOptions extends Abortable { - error?: boolean | undefined; - readable?: boolean | undefined; - writable?: boolean | undefined; - } - /** - * A readable and/or writable stream/webstream. - * - * A function to get notified when a stream is no longer readable, writable - * or has experienced an error or a premature close event. - * - * ```js - * import { finished } from 'node:stream'; - * import fs from 'node:fs'; - * - * const rs = fs.createReadStream('archive.tar'); - * - * finished(rs, (err) => { - * if (err) { - * console.error('Stream failed.', err); - * } else { - * console.log('Stream is done reading.'); - * } - * }); - * - * rs.resume(); // Drain the stream. - * ``` - * - * Especially useful in error handling scenarios where a stream is destroyed - * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`. - * - * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v22.x/api/stream.html#streamfinishedstream-options). - * - * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been - * invoked. The reason for this is so that unexpected `'error'` events (due to - * incorrect stream implementations) do not cause unexpected crashes. - * If this is unwanted behavior then the returned cleanup function needs to be - * invoked in the callback: - * - * ```js - * const cleanup = finished(rs, (err) => { - * cleanup(); - * // ... - * }); - * ``` - * @since v10.0.0 - * @param stream A readable and/or writable stream. - * @param callback A callback function that takes an optional error argument. - * @returns A cleanup function which removes all registered listeners. - */ - function finished( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, - options: FinishedOptions, - callback: (err?: NodeJS.ErrnoException | null) => void, - ): () => void; - function finished( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, - callback: (err?: NodeJS.ErrnoException | null) => void, - ): () => void; - namespace finished { - function __promisify__( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, - options?: FinishedOptions, - ): Promise; - } - type PipelineSourceFunction = () => Iterable | AsyncIterable; - type PipelineSource = Iterable | AsyncIterable | NodeJS.ReadableStream | PipelineSourceFunction; - type PipelineTransform, U> = - | NodeJS.ReadWriteStream - | (( - source: S extends (...args: any[]) => Iterable | AsyncIterable ? AsyncIterable - : S, - ) => AsyncIterable); - type PipelineTransformSource = PipelineSource | PipelineTransform; - type PipelineDestinationIterableFunction = (source: AsyncIterable) => AsyncIterable; - type PipelineDestinationPromiseFunction = (source: AsyncIterable) => Promise

    ; - type PipelineDestination, P> = S extends - PipelineTransformSource ? - | NodeJS.WritableStream - | PipelineDestinationIterableFunction - | PipelineDestinationPromiseFunction - : never; - type PipelineCallback> = S extends - PipelineDestinationPromiseFunction ? (err: NodeJS.ErrnoException | null, value: P) => void - : (err: NodeJS.ErrnoException | null) => void; - type PipelinePromise> = S extends - PipelineDestinationPromiseFunction ? Promise

    : Promise; - interface PipelineOptions { - signal?: AbortSignal | undefined; - end?: boolean | undefined; - } - /** - * A module method to pipe between streams and generators forwarding errors and - * properly cleaning up and provide a callback when the pipeline is complete. - * - * ```js - * import { pipeline } from 'node:stream'; - * import fs from 'node:fs'; - * import zlib from 'node:zlib'; - * - * // Use the pipeline API to easily pipe a series of streams - * // together and get notified when the pipeline is fully done. - * - * // A pipeline to gzip a potentially huge tar file efficiently: - * - * pipeline( - * fs.createReadStream('archive.tar'), - * zlib.createGzip(), - * fs.createWriteStream('archive.tar.gz'), - * (err) => { - * if (err) { - * console.error('Pipeline failed.', err); - * } else { - * console.log('Pipeline succeeded.'); - * } - * }, - * ); - * ``` - * - * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v22.x/api/stream.html#streampipelinesource-transforms-destination-options). - * - * `stream.pipeline()` will call `stream.destroy(err)` on all streams except: - * - * * `Readable` streams which have emitted `'end'` or `'close'`. - * * `Writable` streams which have emitted `'finish'` or `'close'`. - * - * `stream.pipeline()` leaves dangling event listeners on the streams - * after the `callback` has been invoked. In the case of reuse of streams after - * failure, this can cause event listener leaks and swallowed errors. If the last - * stream is readable, dangling event listeners will be removed so that the last - * stream can be consumed later. - * - * `stream.pipeline()` closes all the streams when an error is raised. - * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior - * once it would destroy the socket without sending the expected response. - * See the example below: - * - * ```js - * import fs from 'node:fs'; - * import http from 'node:http'; - * import { pipeline } from 'node:stream'; - * - * const server = http.createServer((req, res) => { - * const fileStream = fs.createReadStream('./fileNotExist.txt'); - * pipeline(fileStream, res, (err) => { - * if (err) { - * console.log(err); // No such file - * // this message can't be sent once `pipeline` already destroyed the socket - * return res.end('error!!!'); - * } - * }); - * }); - * ``` - * @since v10.0.0 - * @param callback Called when the pipeline is fully done. - */ - function pipeline, B extends PipelineDestination>( - source: A, - destination: B, - callback: PipelineCallback, - ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - destination: B, - callback: PipelineCallback, - ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - destination: B, - callback: PipelineCallback, - ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - destination: B, - callback: PipelineCallback, - ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - T4 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - transform4: T4, - destination: B, - callback: PipelineCallback, - ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; - function pipeline( - streams: ReadonlyArray, - callback: (err: NodeJS.ErrnoException | null) => void, - ): NodeJS.WritableStream; - function pipeline( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, - ...streams: Array< - NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void) - > - ): NodeJS.WritableStream; - namespace pipeline { - function __promisify__, B extends PipelineDestination>( - source: A, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function __promisify__< - A extends PipelineSource, - T1 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function __promisify__< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function __promisify__< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function __promisify__< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - T4 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - transform4: T4, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function __promisify__( - streams: ReadonlyArray, - options?: PipelineOptions, - ): Promise; - function __promisify__( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, - ...streams: Array - ): Promise; - } - interface Pipe { - close(): void; - hasRef(): boolean; - ref(): void; - unref(): void; - } - /** - * Returns whether the stream has encountered an error. - * @since v17.3.0, v16.14.0 - * @experimental - */ - function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean; - /** - * Returns whether the stream is readable. - * @since v17.4.0, v16.14.0 - * @experimental - */ - function isReadable(stream: Readable | NodeJS.ReadableStream): boolean; - const promises: typeof streamPromises; - const consumers: typeof streamConsumers; - } - export = internal; -} -declare module "node:stream" { - import stream = require("stream"); - export = stream; -} diff --git a/web/static/node_modules/@types/node/stream/consumers.d.ts b/web/static/node_modules/@types/node/stream/consumers.d.ts deleted file mode 100644 index 5ad9cbab..00000000 --- a/web/static/node_modules/@types/node/stream/consumers.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -declare module "stream/consumers" { - import { Blob as NodeBlob } from "node:buffer"; - import { Readable } from "node:stream"; - function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; - function text(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; - function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; - function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; - function json(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; -} -declare module "node:stream/consumers" { - export * from "stream/consumers"; -} diff --git a/web/static/node_modules/@types/node/stream/promises.d.ts b/web/static/node_modules/@types/node/stream/promises.d.ts deleted file mode 100644 index d54c14c6..00000000 --- a/web/static/node_modules/@types/node/stream/promises.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -declare module "stream/promises" { - import { - FinishedOptions as _FinishedOptions, - PipelineDestination, - PipelineOptions, - PipelinePromise, - PipelineSource, - PipelineTransform, - } from "node:stream"; - interface FinishedOptions extends _FinishedOptions { - /** - * If true, removes the listeners registered by this function before the promise is fulfilled. - * @default false - */ - cleanup?: boolean | undefined; - } - function finished( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, - options?: FinishedOptions, - ): Promise; - function pipeline, B extends PipelineDestination>( - source: A, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - T4 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - transform4: T4, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function pipeline( - streams: ReadonlyArray, - options?: PipelineOptions, - ): Promise; - function pipeline( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, - ...streams: Array - ): Promise; -} -declare module "node:stream/promises" { - export * from "stream/promises"; -} diff --git a/web/static/node_modules/@types/node/stream/web.d.ts b/web/static/node_modules/@types/node/stream/web.d.ts deleted file mode 100644 index 5da8a984..00000000 --- a/web/static/node_modules/@types/node/stream/web.d.ts +++ /dev/null @@ -1,609 +0,0 @@ -type _ByteLengthQueuingStrategy = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ByteLengthQueuingStrategy; -type _CompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {} - : import("stream/web").CompressionStream; -type _CountQueuingStrategy = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").CountQueuingStrategy; -type _DecompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {} - : import("stream/web").DecompressionStream; -type _ReadableByteStreamController = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ReadableByteStreamController; -type _ReadableStream = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ReadableStream; -type _ReadableStreamBYOBReader = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ReadableStreamBYOBReader; -type _ReadableStreamBYOBRequest = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ReadableStreamBYOBRequest; -type _ReadableStreamDefaultController = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ReadableStreamDefaultController; -type _ReadableStreamDefaultReader = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ReadableStreamDefaultReader; -type _TextDecoderStream = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").TextDecoderStream; -type _TextEncoderStream = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").TextEncoderStream; -type _TransformStream = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").TransformStream; -type _TransformStreamDefaultController = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").TransformStreamDefaultController; -type _WritableStream = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").WritableStream; -type _WritableStreamDefaultController = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").WritableStreamDefaultController; -type _WritableStreamDefaultWriter = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").WritableStreamDefaultWriter; - -declare module "stream/web" { - // stub module, pending copy&paste from .d.ts or manual impl - // copy from lib.dom.d.ts - interface ReadableWritablePair { - readable: ReadableStream; - /** - * Provides a convenient, chainable way of piping this readable stream - * through a transform stream (or any other { writable, readable } - * pair). It simply pipes the stream into the writable side of the - * supplied pair, and returns the readable side for further use. - * - * Piping a stream will lock it for the duration of the pipe, preventing - * any other consumer from acquiring a reader. - */ - writable: WritableStream; - } - interface StreamPipeOptions { - preventAbort?: boolean; - preventCancel?: boolean; - /** - * Pipes this readable stream to a given writable stream destination. - * The way in which the piping process behaves under various error - * conditions can be customized with a number of passed options. It - * returns a promise that fulfills when the piping process completes - * successfully, or rejects if any errors were encountered. - * - * Piping a stream will lock it for the duration of the pipe, preventing - * any other consumer from acquiring a reader. - * - * Errors and closures of the source and destination streams propagate - * as follows: - * - * An error in this source readable stream will abort destination, - * unless preventAbort is truthy. The returned promise will be rejected - * with the source's error, or with any error that occurs during - * aborting the destination. - * - * An error in destination will cancel this source readable stream, - * unless preventCancel is truthy. The returned promise will be rejected - * with the destination's error, or with any error that occurs during - * canceling the source. - * - * When this source readable stream closes, destination will be closed, - * unless preventClose is truthy. The returned promise will be fulfilled - * once this process completes, unless an error is encountered while - * closing the destination, in which case it will be rejected with that - * error. - * - * If destination starts out closed or closing, this source readable - * stream will be canceled, unless preventCancel is true. The returned - * promise will be rejected with an error indicating piping to a closed - * stream failed, or with any error that occurs during canceling the - * source. - * - * The signal option can be set to an AbortSignal to allow aborting an - * ongoing pipe operation via the corresponding AbortController. In this - * case, this source readable stream will be canceled, and destination - * aborted, unless the respective options preventCancel or preventAbort - * are set. - */ - preventClose?: boolean; - signal?: AbortSignal; - } - interface ReadableStreamGenericReader { - readonly closed: Promise; - cancel(reason?: any): Promise; - } - type ReadableStreamController = ReadableStreamDefaultController; - interface ReadableStreamReadValueResult { - done: false; - value: T; - } - interface ReadableStreamReadDoneResult { - done: true; - value?: T; - } - type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; - interface ReadableByteStreamControllerCallback { - (controller: ReadableByteStreamController): void | PromiseLike; - } - interface UnderlyingSinkAbortCallback { - (reason?: any): void | PromiseLike; - } - interface UnderlyingSinkCloseCallback { - (): void | PromiseLike; - } - interface UnderlyingSinkStartCallback { - (controller: WritableStreamDefaultController): any; - } - interface UnderlyingSinkWriteCallback { - (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; - } - interface UnderlyingSourceCancelCallback { - (reason?: any): void | PromiseLike; - } - interface UnderlyingSourcePullCallback { - (controller: ReadableStreamController): void | PromiseLike; - } - interface UnderlyingSourceStartCallback { - (controller: ReadableStreamController): any; - } - interface TransformerFlushCallback { - (controller: TransformStreamDefaultController): void | PromiseLike; - } - interface TransformerStartCallback { - (controller: TransformStreamDefaultController): any; - } - interface TransformerTransformCallback { - (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; - } - interface UnderlyingByteSource { - autoAllocateChunkSize?: number; - cancel?: ReadableStreamErrorCallback; - pull?: ReadableByteStreamControllerCallback; - start?: ReadableByteStreamControllerCallback; - type: "bytes"; - } - interface UnderlyingSource { - cancel?: UnderlyingSourceCancelCallback; - pull?: UnderlyingSourcePullCallback; - start?: UnderlyingSourceStartCallback; - type?: undefined; - } - interface UnderlyingSink { - abort?: UnderlyingSinkAbortCallback; - close?: UnderlyingSinkCloseCallback; - start?: UnderlyingSinkStartCallback; - type?: undefined; - write?: UnderlyingSinkWriteCallback; - } - interface ReadableStreamErrorCallback { - (reason: any): void | PromiseLike; - } - interface ReadableStreamAsyncIterator extends NodeJS.AsyncIterator { - [Symbol.asyncIterator](): ReadableStreamAsyncIterator; - } - /** This Streams API interface represents a readable stream of byte data. */ - interface ReadableStream { - readonly locked: boolean; - cancel(reason?: any): Promise; - getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; - getReader(): ReadableStreamDefaultReader; - getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader; - pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; - pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; - tee(): [ReadableStream, ReadableStream]; - values(options?: { preventCancel?: boolean }): ReadableStreamAsyncIterator; - [Symbol.asyncIterator](): ReadableStreamAsyncIterator; - } - const ReadableStream: { - prototype: ReadableStream; - from(iterable: Iterable | AsyncIterable): ReadableStream; - new(underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy): ReadableStream; - new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; - }; - type ReadableStreamReaderMode = "byob"; - interface ReadableStreamGetReaderOptions { - /** - * Creates a ReadableStreamBYOBReader and locks the stream to the new reader. - * - * This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation. - */ - mode?: ReadableStreamReaderMode; - } - type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; - interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { - read(): Promise>; - releaseLock(): void; - } - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */ - interface ReadableStreamBYOBReader extends ReadableStreamGenericReader { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */ - read(view: T): Promise>; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */ - releaseLock(): void; - } - const ReadableStreamDefaultReader: { - prototype: ReadableStreamDefaultReader; - new(stream: ReadableStream): ReadableStreamDefaultReader; - }; - const ReadableStreamBYOBReader: { - prototype: ReadableStreamBYOBReader; - new(stream: ReadableStream): ReadableStreamBYOBReader; - }; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */ - interface ReadableStreamBYOBRequest { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */ - readonly view: ArrayBufferView | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */ - respond(bytesWritten: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */ - respondWithNewView(view: ArrayBufferView): void; - } - const ReadableStreamBYOBRequest: { - prototype: ReadableStreamBYOBRequest; - new(): ReadableStreamBYOBRequest; - }; - interface ReadableByteStreamController { - readonly byobRequest: undefined; - readonly desiredSize: number | null; - close(): void; - enqueue(chunk: ArrayBufferView): void; - error(error?: any): void; - } - const ReadableByteStreamController: { - prototype: ReadableByteStreamController; - new(): ReadableByteStreamController; - }; - interface ReadableStreamDefaultController { - readonly desiredSize: number | null; - close(): void; - enqueue(chunk?: R): void; - error(e?: any): void; - } - const ReadableStreamDefaultController: { - prototype: ReadableStreamDefaultController; - new(): ReadableStreamDefaultController; - }; - interface Transformer { - flush?: TransformerFlushCallback; - readableType?: undefined; - start?: TransformerStartCallback; - transform?: TransformerTransformCallback; - writableType?: undefined; - } - interface TransformStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - const TransformStream: { - prototype: TransformStream; - new( - transformer?: Transformer, - writableStrategy?: QueuingStrategy, - readableStrategy?: QueuingStrategy, - ): TransformStream; - }; - interface TransformStreamDefaultController { - readonly desiredSize: number | null; - enqueue(chunk?: O): void; - error(reason?: any): void; - terminate(): void; - } - const TransformStreamDefaultController: { - prototype: TransformStreamDefaultController; - new(): TransformStreamDefaultController; - }; - /** - * This Streams API interface provides a standard abstraction for writing - * streaming data to a destination, known as a sink. This object comes with - * built-in back pressure and queuing. - */ - interface WritableStream { - readonly locked: boolean; - abort(reason?: any): Promise; - close(): Promise; - getWriter(): WritableStreamDefaultWriter; - } - const WritableStream: { - prototype: WritableStream; - new(underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream; - }; - /** - * This Streams API interface is the object returned by - * WritableStream.getWriter() and once created locks the < writer to the - * WritableStream ensuring that no other streams can write to the underlying - * sink. - */ - interface WritableStreamDefaultWriter { - readonly closed: Promise; - readonly desiredSize: number | null; - readonly ready: Promise; - abort(reason?: any): Promise; - close(): Promise; - releaseLock(): void; - write(chunk?: W): Promise; - } - const WritableStreamDefaultWriter: { - prototype: WritableStreamDefaultWriter; - new(stream: WritableStream): WritableStreamDefaultWriter; - }; - /** - * This Streams API interface represents a controller allowing control of a - * WritableStream's state. When constructing a WritableStream, the - * underlying sink is given a corresponding WritableStreamDefaultController - * instance to manipulate. - */ - interface WritableStreamDefaultController { - error(e?: any): void; - } - const WritableStreamDefaultController: { - prototype: WritableStreamDefaultController; - new(): WritableStreamDefaultController; - }; - interface QueuingStrategy { - highWaterMark?: number; - size?: QueuingStrategySize; - } - interface QueuingStrategySize { - (chunk?: T): number; - } - interface QueuingStrategyInit { - /** - * Creates a new ByteLengthQueuingStrategy with the provided high water - * mark. - * - * Note that the provided high water mark will not be validated ahead of - * time. Instead, if it is negative, NaN, or not a number, the resulting - * ByteLengthQueuingStrategy will cause the corresponding stream - * constructor to throw. - */ - highWaterMark: number; - } - /** - * This Streams API interface provides a built-in byte length queuing - * strategy that can be used when constructing streams. - */ - interface ByteLengthQueuingStrategy extends QueuingStrategy { - readonly highWaterMark: number; - readonly size: QueuingStrategySize; - } - const ByteLengthQueuingStrategy: { - prototype: ByteLengthQueuingStrategy; - new(init: QueuingStrategyInit): ByteLengthQueuingStrategy; - }; - /** - * This Streams API interface provides a built-in byte length queuing - * strategy that can be used when constructing streams. - */ - interface CountQueuingStrategy extends QueuingStrategy { - readonly highWaterMark: number; - readonly size: QueuingStrategySize; - } - const CountQueuingStrategy: { - prototype: CountQueuingStrategy; - new(init: QueuingStrategyInit): CountQueuingStrategy; - }; - interface TextEncoderStream { - /** Returns "utf-8". */ - readonly encoding: "utf-8"; - readonly readable: ReadableStream; - readonly writable: WritableStream; - readonly [Symbol.toStringTag]: string; - } - const TextEncoderStream: { - prototype: TextEncoderStream; - new(): TextEncoderStream; - }; - interface TextDecoderOptions { - fatal?: boolean; - ignoreBOM?: boolean; - } - type BufferSource = ArrayBufferView | ArrayBuffer; - interface TextDecoderStream { - /** Returns encoding's name, lower cased. */ - readonly encoding: string; - /** Returns `true` if error mode is "fatal", and `false` otherwise. */ - readonly fatal: boolean; - /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */ - readonly ignoreBOM: boolean; - readonly readable: ReadableStream; - readonly writable: WritableStream; - readonly [Symbol.toStringTag]: string; - } - const TextDecoderStream: { - prototype: TextDecoderStream; - new(encoding?: string, options?: TextDecoderOptions): TextDecoderStream; - }; - interface CompressionStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - const CompressionStream: { - prototype: CompressionStream; - new(format: "deflate" | "deflate-raw" | "gzip"): CompressionStream; - }; - interface DecompressionStream { - readonly writable: WritableStream; - readonly readable: ReadableStream; - } - const DecompressionStream: { - prototype: DecompressionStream; - new(format: "deflate" | "deflate-raw" | "gzip"): DecompressionStream; - }; - - global { - interface ByteLengthQueuingStrategy extends _ByteLengthQueuingStrategy {} - /** - * `ByteLengthQueuingStrategy` class is a global reference for `import { ByteLengthQueuingStrategy } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-bytelengthqueuingstrategy - * @since v18.0.0 - */ - var ByteLengthQueuingStrategy: typeof globalThis extends { onmessage: any; ByteLengthQueuingStrategy: infer T } - ? T - : typeof import("stream/web").ByteLengthQueuingStrategy; - - interface CompressionStream extends _CompressionStream {} - /** - * `CompressionStream` class is a global reference for `import { CompressionStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-compressionstream - * @since v18.0.0 - */ - var CompressionStream: typeof globalThis extends { - onmessage: any; - // CompressionStream, DecompressionStream and ReportingObserver was introduced in the same commit. - // If ReportingObserver check is removed, the type here will form a circular reference in TS5.0+lib.dom.d.ts - ReportingObserver: any; - CompressionStream: infer T; - } ? T - // TS 4.8, 4.9, 5.0 - : typeof globalThis extends { onmessage: any; TransformStream: { prototype: infer T } } ? { - prototype: T; - new(format: "deflate" | "deflate-raw" | "gzip"): T; - } - : typeof import("stream/web").CompressionStream; - - interface CountQueuingStrategy extends _CountQueuingStrategy {} - /** - * `CountQueuingStrategy` class is a global reference for `import { CountQueuingStrategy } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-countqueuingstrategy - * @since v18.0.0 - */ - var CountQueuingStrategy: typeof globalThis extends { onmessage: any; CountQueuingStrategy: infer T } ? T - : typeof import("stream/web").CountQueuingStrategy; - - interface DecompressionStream extends _DecompressionStream {} - /** - * `DecompressionStream` class is a global reference for `import { DecompressionStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-decompressionstream - * @since v18.0.0 - */ - var DecompressionStream: typeof globalThis extends { - onmessage: any; - // CompressionStream, DecompressionStream and ReportingObserver was introduced in the same commit. - // If ReportingObserver check is removed, the type here will form a circular reference in TS5.0+lib.dom.d.ts - ReportingObserver: any; - DecompressionStream: infer T extends object; - } ? T - // TS 4.8, 4.9, 5.0 - : typeof globalThis extends { onmessage: any; TransformStream: { prototype: infer T } } ? { - prototype: T; - new(format: "deflate" | "deflate-raw" | "gzip"): T; - } - : typeof import("stream/web").DecompressionStream; - - interface ReadableByteStreamController extends _ReadableByteStreamController {} - /** - * `ReadableByteStreamController` class is a global reference for `import { ReadableByteStreamController } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-readablebytestreamcontroller - * @since v18.0.0 - */ - var ReadableByteStreamController: typeof globalThis extends - { onmessage: any; ReadableByteStreamController: infer T } ? T - : typeof import("stream/web").ReadableByteStreamController; - - interface ReadableStream extends _ReadableStream {} - /** - * `ReadableStream` class is a global reference for `import { ReadableStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-readablestream - * @since v18.0.0 - */ - var ReadableStream: typeof globalThis extends { onmessage: any; ReadableStream: infer T } ? T - : typeof import("stream/web").ReadableStream; - - interface ReadableStreamBYOBReader extends _ReadableStreamBYOBReader {} - /** - * `ReadableStreamBYOBReader` class is a global reference for `import { ReadableStreamBYOBReader } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-readablestreambyobreader - * @since v18.0.0 - */ - var ReadableStreamBYOBReader: typeof globalThis extends { onmessage: any; ReadableStreamBYOBReader: infer T } - ? T - : typeof import("stream/web").ReadableStreamBYOBReader; - - interface ReadableStreamBYOBRequest extends _ReadableStreamBYOBRequest {} - /** - * `ReadableStreamBYOBRequest` class is a global reference for `import { ReadableStreamBYOBRequest } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-readablestreambyobrequest - * @since v18.0.0 - */ - var ReadableStreamBYOBRequest: typeof globalThis extends { onmessage: any; ReadableStreamBYOBRequest: infer T } - ? T - : typeof import("stream/web").ReadableStreamBYOBRequest; - - interface ReadableStreamDefaultController extends _ReadableStreamDefaultController {} - /** - * `ReadableStreamDefaultController` class is a global reference for `import { ReadableStreamDefaultController } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-readablestreamdefaultcontroller - * @since v18.0.0 - */ - var ReadableStreamDefaultController: typeof globalThis extends - { onmessage: any; ReadableStreamDefaultController: infer T } ? T - : typeof import("stream/web").ReadableStreamDefaultController; - - interface ReadableStreamDefaultReader extends _ReadableStreamDefaultReader {} - /** - * `ReadableStreamDefaultReader` class is a global reference for `import { ReadableStreamDefaultReader } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-readablestreamdefaultreader - * @since v18.0.0 - */ - var ReadableStreamDefaultReader: typeof globalThis extends - { onmessage: any; ReadableStreamDefaultReader: infer T } ? T - : typeof import("stream/web").ReadableStreamDefaultReader; - - interface TextDecoderStream extends _TextDecoderStream {} - /** - * `TextDecoderStream` class is a global reference for `import { TextDecoderStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-textdecoderstream - * @since v18.0.0 - */ - var TextDecoderStream: typeof globalThis extends { onmessage: any; TextDecoderStream: infer T } ? T - : typeof import("stream/web").TextDecoderStream; - - interface TextEncoderStream extends _TextEncoderStream {} - /** - * `TextEncoderStream` class is a global reference for `import { TextEncoderStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-textencoderstream - * @since v18.0.0 - */ - var TextEncoderStream: typeof globalThis extends { onmessage: any; TextEncoderStream: infer T } ? T - : typeof import("stream/web").TextEncoderStream; - - interface TransformStream extends _TransformStream {} - /** - * `TransformStream` class is a global reference for `import { TransformStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-transformstream - * @since v18.0.0 - */ - var TransformStream: typeof globalThis extends { onmessage: any; TransformStream: infer T } ? T - : typeof import("stream/web").TransformStream; - - interface TransformStreamDefaultController extends _TransformStreamDefaultController {} - /** - * `TransformStreamDefaultController` class is a global reference for `import { TransformStreamDefaultController } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-transformstreamdefaultcontroller - * @since v18.0.0 - */ - var TransformStreamDefaultController: typeof globalThis extends - { onmessage: any; TransformStreamDefaultController: infer T } ? T - : typeof import("stream/web").TransformStreamDefaultController; - - interface WritableStream extends _WritableStream {} - /** - * `WritableStream` class is a global reference for `import { WritableStream } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-writablestream - * @since v18.0.0 - */ - var WritableStream: typeof globalThis extends { onmessage: any; WritableStream: infer T } ? T - : typeof import("stream/web").WritableStream; - - interface WritableStreamDefaultController extends _WritableStreamDefaultController {} - /** - * `WritableStreamDefaultController` class is a global reference for `import { WritableStreamDefaultController } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-writablestreamdefaultcontroller - * @since v18.0.0 - */ - var WritableStreamDefaultController: typeof globalThis extends - { onmessage: any; WritableStreamDefaultController: infer T } ? T - : typeof import("stream/web").WritableStreamDefaultController; - - interface WritableStreamDefaultWriter extends _WritableStreamDefaultWriter {} - /** - * `WritableStreamDefaultWriter` class is a global reference for `import { WritableStreamDefaultWriter } from 'node:stream/web'`. - * https://nodejs.org/api/globals.html#class-writablestreamdefaultwriter - * @since v18.0.0 - */ - var WritableStreamDefaultWriter: typeof globalThis extends - { onmessage: any; WritableStreamDefaultWriter: infer T } ? T - : typeof import("stream/web").WritableStreamDefaultWriter; - } -} -declare module "node:stream/web" { - export * from "stream/web"; -} diff --git a/web/static/node_modules/@types/node/string_decoder.d.ts b/web/static/node_modules/@types/node/string_decoder.d.ts deleted file mode 100644 index 350aace2..00000000 --- a/web/static/node_modules/@types/node/string_decoder.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * The `node:string_decoder` module provides an API for decoding `Buffer` objects - * into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 - * characters. It can be accessed using: - * - * ```js - * import { StringDecoder } from 'node:string_decoder'; - * ``` - * - * The following example shows the basic use of the `StringDecoder` class. - * - * ```js - * import { StringDecoder } from 'node:string_decoder'; - * const decoder = new StringDecoder('utf8'); - * - * const cent = Buffer.from([0xC2, 0xA2]); - * console.log(decoder.write(cent)); // Prints: ¢ - * - * const euro = Buffer.from([0xE2, 0x82, 0xAC]); - * console.log(decoder.write(euro)); // Prints: € - * ``` - * - * When a `Buffer` instance is written to the `StringDecoder` instance, an - * internal buffer is used to ensure that the decoded string does not contain - * any incomplete multibyte characters. These are held in the buffer until the - * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called. - * - * In the following example, the three UTF-8 encoded bytes of the European Euro - * symbol (`€`) are written over three separate operations: - * - * ```js - * import { StringDecoder } from 'node:string_decoder'; - * const decoder = new StringDecoder('utf8'); - * - * decoder.write(Buffer.from([0xE2])); - * decoder.write(Buffer.from([0x82])); - * console.log(decoder.end(Buffer.from([0xAC]))); // Prints: € - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/string_decoder.js) - */ -declare module "string_decoder" { - class StringDecoder { - constructor(encoding?: BufferEncoding); - /** - * Returns a decoded string, ensuring that any incomplete multibyte characters at - * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the - * returned string and stored in an internal buffer for the next call to `stringDecoder.write()` or `stringDecoder.end()`. - * @since v0.1.99 - * @param buffer The bytes to decode. - */ - write(buffer: string | Buffer | NodeJS.ArrayBufferView): string; - /** - * Returns any remaining input stored in the internal buffer as a string. Bytes - * representing incomplete UTF-8 and UTF-16 characters will be replaced with - * substitution characters appropriate for the character encoding. - * - * If the `buffer` argument is provided, one final call to `stringDecoder.write()` is performed before returning the remaining input. - * After `end()` is called, the `stringDecoder` object can be reused for new input. - * @since v0.9.3 - * @param buffer The bytes to decode. - */ - end(buffer?: string | Buffer | NodeJS.ArrayBufferView): string; - } -} -declare module "node:string_decoder" { - export * from "string_decoder"; -} diff --git a/web/static/node_modules/@types/node/test.d.ts b/web/static/node_modules/@types/node/test.d.ts deleted file mode 100644 index c3351e0f..00000000 --- a/web/static/node_modules/@types/node/test.d.ts +++ /dev/null @@ -1,2129 +0,0 @@ -/** - * The `node:test` module facilitates the creation of JavaScript tests. - * To access it: - * - * ```js - * import test from 'node:test'; - * ``` - * - * This module is only available under the `node:` scheme. The following will not - * work: - * - * ```js - * import test from 'node:test'; - * ``` - * - * Tests created via the `test` module consist of a single function that is - * processed in one of three ways: - * - * 1. A synchronous function that is considered failing if it throws an exception, - * and is considered passing otherwise. - * 2. A function that returns a `Promise` that is considered failing if the `Promise` rejects, and is considered passing if the `Promise` fulfills. - * 3. A function that receives a callback function. If the callback receives any - * truthy value as its first argument, the test is considered failing. If a - * falsy value is passed as the first argument to the callback, the test is - * considered passing. If the test function receives a callback function and - * also returns a `Promise`, the test will fail. - * - * The following example illustrates how tests are written using the `test` module. - * - * ```js - * test('synchronous passing test', (t) => { - * // This test passes because it does not throw an exception. - * assert.strictEqual(1, 1); - * }); - * - * test('synchronous failing test', (t) => { - * // This test fails because it throws an exception. - * assert.strictEqual(1, 2); - * }); - * - * test('asynchronous passing test', async (t) => { - * // This test passes because the Promise returned by the async - * // function is settled and not rejected. - * assert.strictEqual(1, 1); - * }); - * - * test('asynchronous failing test', async (t) => { - * // This test fails because the Promise returned by the async - * // function is rejected. - * assert.strictEqual(1, 2); - * }); - * - * test('failing test using Promises', (t) => { - * // Promises can be used directly as well. - * return new Promise((resolve, reject) => { - * setImmediate(() => { - * reject(new Error('this will cause the test to fail')); - * }); - * }); - * }); - * - * test('callback passing test', (t, done) => { - * // done() is the callback function. When the setImmediate() runs, it invokes - * // done() with no arguments. - * setImmediate(done); - * }); - * - * test('callback failing test', (t, done) => { - * // When the setImmediate() runs, done() is invoked with an Error object and - * // the test fails. - * setImmediate(() => { - * done(new Error('callback failure')); - * }); - * }); - * ``` - * - * If any tests fail, the process exit code is set to `1`. - * @since v18.0.0, v16.17.0 - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/test.js) - */ -declare module "node:test" { - import { Readable } from "node:stream"; - /** - * **Note:** `shard` is used to horizontally parallelize test running across - * machines or processes, ideal for large-scale executions across varied - * environments. It's incompatible with `watch` mode, tailored for rapid - * code iteration by automatically rerunning tests on file changes. - * - * ```js - * import { tap } from 'node:test/reporters'; - * import { run } from 'node:test'; - * import process from 'node:process'; - * import path from 'node:path'; - * - * run({ files: [path.resolve('./tests/test.js')] }) - * .compose(tap) - * .pipe(process.stdout); - * ``` - * @since v18.9.0, v16.19.0 - * @param options Configuration options for running tests. - */ - function run(options?: RunOptions): TestsStream; - /** - * The `test()` function is the value imported from the `test` module. Each - * invocation of this function results in reporting the test to the `TestsStream`. - * - * The `TestContext` object passed to the `fn` argument can be used to perform - * actions related to the current test. Examples include skipping the test, adding - * additional diagnostic information, or creating subtests. - * - * `test()` returns a `Promise` that fulfills once the test completes. - * if `test()` is called within a suite, it fulfills immediately. - * The return value can usually be discarded for top level tests. - * However, the return value from subtests should be used to prevent the parent - * test from finishing first and cancelling the subtest - * as shown in the following example. - * - * ```js - * test('top level test', async (t) => { - * // The setTimeout() in the following subtest would cause it to outlive its - * // parent test if 'await' is removed on the next line. Once the parent test - * // completes, it will cancel any outstanding subtests. - * await t.test('longer running subtest', async (t) => { - * return new Promise((resolve, reject) => { - * setTimeout(resolve, 1000); - * }); - * }); - * }); - * ``` - * - * The `timeout` option can be used to fail the test if it takes longer than `timeout` milliseconds to complete. However, it is not a reliable mechanism for - * canceling tests because a running test might block the application thread and - * thus prevent the scheduled cancellation. - * @since v18.0.0, v16.17.0 - * @param name The name of the test, which is displayed when reporting test results. - * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. - * @param options Configuration options for the test. - * @param fn The function under test. The first argument to this function is a {@link TestContext} object. - * If the test uses callbacks, the callback function is passed as the second argument. - * @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within a suite. - */ - function test(name?: string, fn?: TestFn): Promise; - function test(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function test(options?: TestOptions, fn?: TestFn): Promise; - function test(fn?: TestFn): Promise; - namespace test { - export { - after, - afterEach, - before, - beforeEach, - describe, - it, - mock, - only, - run, - skip, - snapshot, - suite, - test, - todo, - }; - } - /** - * The `suite()` function is imported from the `node:test` module. - * @param name The name of the suite, which is displayed when reporting test results. - * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. - * @param options Configuration options for the suite. This supports the same options as {@link test}. - * @param fn The suite function declaring nested tests and suites. The first argument to this function is a {@link SuiteContext} object. - * @return Immediately fulfilled with `undefined`. - * @since v20.13.0 - */ - function suite(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function suite(name?: string, fn?: SuiteFn): Promise; - function suite(options?: TestOptions, fn?: SuiteFn): Promise; - function suite(fn?: SuiteFn): Promise; - namespace suite { - /** - * Shorthand for skipping a suite. This is the same as calling {@link suite} with `options.skip` set to `true`. - * @since v20.13.0 - */ - function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function skip(name?: string, fn?: SuiteFn): Promise; - function skip(options?: TestOptions, fn?: SuiteFn): Promise; - function skip(fn?: SuiteFn): Promise; - /** - * Shorthand for marking a suite as `TODO`. This is the same as calling {@link suite} with `options.todo` set to `true`. - * @since v20.13.0 - */ - function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function todo(name?: string, fn?: SuiteFn): Promise; - function todo(options?: TestOptions, fn?: SuiteFn): Promise; - function todo(fn?: SuiteFn): Promise; - /** - * Shorthand for marking a suite as `only`. This is the same as calling {@link suite} with `options.only` set to `true`. - * @since v20.13.0 - */ - function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function only(name?: string, fn?: SuiteFn): Promise; - function only(options?: TestOptions, fn?: SuiteFn): Promise; - function only(fn?: SuiteFn): Promise; - } - /** - * Alias for {@link suite}. - * - * The `describe()` function is imported from the `node:test` module. - */ - function describe(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function describe(name?: string, fn?: SuiteFn): Promise; - function describe(options?: TestOptions, fn?: SuiteFn): Promise; - function describe(fn?: SuiteFn): Promise; - namespace describe { - /** - * Shorthand for skipping a suite. This is the same as calling {@link describe} with `options.skip` set to `true`. - * @since v18.15.0 - */ - function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function skip(name?: string, fn?: SuiteFn): Promise; - function skip(options?: TestOptions, fn?: SuiteFn): Promise; - function skip(fn?: SuiteFn): Promise; - /** - * Shorthand for marking a suite as `TODO`. This is the same as calling {@link describe} with `options.todo` set to `true`. - * @since v18.15.0 - */ - function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function todo(name?: string, fn?: SuiteFn): Promise; - function todo(options?: TestOptions, fn?: SuiteFn): Promise; - function todo(fn?: SuiteFn): Promise; - /** - * Shorthand for marking a suite as `only`. This is the same as calling {@link describe} with `options.only` set to `true`. - * @since v18.15.0 - */ - function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function only(name?: string, fn?: SuiteFn): Promise; - function only(options?: TestOptions, fn?: SuiteFn): Promise; - function only(fn?: SuiteFn): Promise; - } - /** - * Alias for {@link test}. - * - * The `it()` function is imported from the `node:test` module. - * @since v18.6.0, v16.17.0 - */ - function it(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function it(name?: string, fn?: TestFn): Promise; - function it(options?: TestOptions, fn?: TestFn): Promise; - function it(fn?: TestFn): Promise; - namespace it { - /** - * Shorthand for skipping a test. This is the same as calling {@link it} with `options.skip` set to `true`. - */ - function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function skip(name?: string, fn?: TestFn): Promise; - function skip(options?: TestOptions, fn?: TestFn): Promise; - function skip(fn?: TestFn): Promise; - /** - * Shorthand for marking a test as `TODO`. This is the same as calling {@link it} with `options.todo` set to `true`. - */ - function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function todo(name?: string, fn?: TestFn): Promise; - function todo(options?: TestOptions, fn?: TestFn): Promise; - function todo(fn?: TestFn): Promise; - /** - * Shorthand for marking a test as `only`. This is the same as calling {@link it} with `options.only` set to `true`. - * @since v18.15.0 - */ - function only(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function only(name?: string, fn?: TestFn): Promise; - function only(options?: TestOptions, fn?: TestFn): Promise; - function only(fn?: TestFn): Promise; - } - /** - * Shorthand for skipping a test. This is the same as calling {@link test} with `options.skip` set to `true`. - * @since v20.2.0 - */ - function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function skip(name?: string, fn?: TestFn): Promise; - function skip(options?: TestOptions, fn?: TestFn): Promise; - function skip(fn?: TestFn): Promise; - /** - * Shorthand for marking a test as `TODO`. This is the same as calling {@link test} with `options.todo` set to `true`. - * @since v20.2.0 - */ - function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function todo(name?: string, fn?: TestFn): Promise; - function todo(options?: TestOptions, fn?: TestFn): Promise; - function todo(fn?: TestFn): Promise; - /** - * Shorthand for marking a test as `only`. This is the same as calling {@link test} with `options.only` set to `true`. - * @since v20.2.0 - */ - function only(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function only(name?: string, fn?: TestFn): Promise; - function only(options?: TestOptions, fn?: TestFn): Promise; - function only(fn?: TestFn): Promise; - /** - * The type of a function passed to {@link test}. The first argument to this function is a {@link TestContext} object. - * If the test uses callbacks, the callback function is passed as the second argument. - */ - type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise; - /** - * The type of a suite test function. The argument to this function is a {@link SuiteContext} object. - */ - type SuiteFn = (s: SuiteContext) => void | Promise; - interface TestShard { - /** - * A positive integer between 1 and `total` that specifies the index of the shard to run. - */ - index: number; - /** - * A positive integer that specifies the total number of shards to split the test files to. - */ - total: number; - } - interface RunOptions { - /** - * If a number is provided, then that many test processes would run in parallel, where each process corresponds to one test file. - * If `true`, it would run `os.availableParallelism() - 1` test files in parallel. If `false`, it would only run one test file at a time. - * @default false - */ - concurrency?: number | boolean | undefined; - /** - * An array containing the list of files to run. If omitted, files are run according to the - * [test runner execution model](https://nodejs.org/docs/latest-v22.x/api/test.html#test-runner-execution-model). - */ - files?: readonly string[] | undefined; - /** - * Configures the test runner to exit the process once all known - * tests have finished executing even if the event loop would - * otherwise remain active. - * @default false - */ - forceExit?: boolean | undefined; - /** - * An array containing the list of glob patterns to match test files. - * This option cannot be used together with `files`. If omitted, files are run according to the - * [test runner execution model](https://nodejs.org/docs/latest-v22.x/api/test.html#test-runner-execution-model). - * @since v22.6.0 - */ - globPatterns?: readonly string[] | undefined; - /** - * Sets inspector port of test child process. - * This can be a number, or a function that takes no arguments and returns a - * number. If a nullish value is provided, each process gets its own port, - * incremented from the primary's `process.debugPort`. This option is ignored - * if the `isolation` option is set to `'none'` as no child processes are - * spawned. - * @default undefined - */ - inspectPort?: number | (() => number) | undefined; - /** - * Configures the type of test isolation. If set to - * `'process'`, each test file is run in a separate child process. If set to - * `'none'`, all test files run in the current process. - * @default 'process' - * @since v22.8.0 - */ - isolation?: "process" | "none" | undefined; - /** - * If truthy, the test context will only run tests that have the `only` option set - */ - only?: boolean | undefined; - /** - * A function that accepts the `TestsStream` instance and can be used to setup listeners before any tests are run. - * @default undefined - */ - setup?: ((reporter: TestsStream) => void | Promise) | undefined; - /** - * Allows aborting an in-progress test execution. - */ - signal?: AbortSignal | undefined; - /** - * If provided, only run tests whose name matches the provided pattern. - * Strings are interpreted as JavaScript regular expressions. - * @default undefined - */ - testNamePatterns?: string | RegExp | ReadonlyArray | undefined; - /** - * A String, RegExp or a RegExp Array, that can be used to exclude running tests whose - * name matches the provided pattern. Test name patterns are interpreted as JavaScript - * regular expressions. For each test that is executed, any corresponding test hooks, - * such as `beforeEach()`, are also run. - * @default undefined - * @since v22.1.0 - */ - testSkipPatterns?: string | RegExp | ReadonlyArray | undefined; - /** - * The number of milliseconds after which the test execution will fail. - * If unspecified, subtests inherit this value from their parent. - * @default Infinity - */ - timeout?: number | undefined; - /** - * Whether to run in watch mode or not. - * @default false - */ - watch?: boolean | undefined; - /** - * Running tests in a specific shard. - * @default undefined - */ - shard?: TestShard | undefined; - } - /** - * A successful call to `run()` will return a new `TestsStream` object, streaming a series of events representing the execution of the tests. - * - * Some of the events are guaranteed to be emitted in the same order as the tests are defined, while others are emitted in the order that the tests execute. - * @since v18.9.0, v16.19.0 - */ - class TestsStream extends Readable implements NodeJS.ReadableStream { - addListener(event: "test:coverage", listener: (data: TestCoverage) => void): this; - addListener(event: "test:complete", listener: (data: TestComplete) => void): this; - addListener(event: "test:dequeue", listener: (data: TestDequeue) => void): this; - addListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this; - addListener(event: "test:enqueue", listener: (data: TestEnqueue) => void): this; - addListener(event: "test:fail", listener: (data: TestFail) => void): this; - addListener(event: "test:pass", listener: (data: TestPass) => void): this; - addListener(event: "test:plan", listener: (data: TestPlan) => void): this; - addListener(event: "test:start", listener: (data: TestStart) => void): this; - addListener(event: "test:stderr", listener: (data: TestStderr) => void): this; - addListener(event: "test:stdout", listener: (data: TestStdout) => void): this; - addListener(event: "test:watch:drained", listener: () => void): this; - addListener(event: string, listener: (...args: any[]) => void): this; - emit(event: "test:coverage", data: TestCoverage): boolean; - emit(event: "test:complete", data: TestComplete): boolean; - emit(event: "test:dequeue", data: TestDequeue): boolean; - emit(event: "test:diagnostic", data: DiagnosticData): boolean; - emit(event: "test:enqueue", data: TestEnqueue): boolean; - emit(event: "test:fail", data: TestFail): boolean; - emit(event: "test:pass", data: TestPass): boolean; - emit(event: "test:plan", data: TestPlan): boolean; - emit(event: "test:start", data: TestStart): boolean; - emit(event: "test:stderr", data: TestStderr): boolean; - emit(event: "test:stdout", data: TestStdout): boolean; - emit(event: "test:watch:drained"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "test:coverage", listener: (data: TestCoverage) => void): this; - on(event: "test:complete", listener: (data: TestComplete) => void): this; - on(event: "test:dequeue", listener: (data: TestDequeue) => void): this; - on(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this; - on(event: "test:enqueue", listener: (data: TestEnqueue) => void): this; - on(event: "test:fail", listener: (data: TestFail) => void): this; - on(event: "test:pass", listener: (data: TestPass) => void): this; - on(event: "test:plan", listener: (data: TestPlan) => void): this; - on(event: "test:start", listener: (data: TestStart) => void): this; - on(event: "test:stderr", listener: (data: TestStderr) => void): this; - on(event: "test:stdout", listener: (data: TestStdout) => void): this; - on(event: "test:watch:drained", listener: () => void): this; - on(event: string, listener: (...args: any[]) => void): this; - once(event: "test:coverage", listener: (data: TestCoverage) => void): this; - once(event: "test:complete", listener: (data: TestComplete) => void): this; - once(event: "test:dequeue", listener: (data: TestDequeue) => void): this; - once(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this; - once(event: "test:enqueue", listener: (data: TestEnqueue) => void): this; - once(event: "test:fail", listener: (data: TestFail) => void): this; - once(event: "test:pass", listener: (data: TestPass) => void): this; - once(event: "test:plan", listener: (data: TestPlan) => void): this; - once(event: "test:start", listener: (data: TestStart) => void): this; - once(event: "test:stderr", listener: (data: TestStderr) => void): this; - once(event: "test:stdout", listener: (data: TestStdout) => void): this; - once(event: "test:watch:drained", listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "test:coverage", listener: (data: TestCoverage) => void): this; - prependListener(event: "test:complete", listener: (data: TestComplete) => void): this; - prependListener(event: "test:dequeue", listener: (data: TestDequeue) => void): this; - prependListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this; - prependListener(event: "test:enqueue", listener: (data: TestEnqueue) => void): this; - prependListener(event: "test:fail", listener: (data: TestFail) => void): this; - prependListener(event: "test:pass", listener: (data: TestPass) => void): this; - prependListener(event: "test:plan", listener: (data: TestPlan) => void): this; - prependListener(event: "test:start", listener: (data: TestStart) => void): this; - prependListener(event: "test:stderr", listener: (data: TestStderr) => void): this; - prependListener(event: "test:stdout", listener: (data: TestStdout) => void): this; - prependListener(event: "test:watch:drained", listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "test:coverage", listener: (data: TestCoverage) => void): this; - prependOnceListener(event: "test:complete", listener: (data: TestComplete) => void): this; - prependOnceListener(event: "test:dequeue", listener: (data: TestDequeue) => void): this; - prependOnceListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this; - prependOnceListener(event: "test:enqueue", listener: (data: TestEnqueue) => void): this; - prependOnceListener(event: "test:fail", listener: (data: TestFail) => void): this; - prependOnceListener(event: "test:pass", listener: (data: TestPass) => void): this; - prependOnceListener(event: "test:plan", listener: (data: TestPlan) => void): this; - prependOnceListener(event: "test:start", listener: (data: TestStart) => void): this; - prependOnceListener(event: "test:stderr", listener: (data: TestStderr) => void): this; - prependOnceListener(event: "test:stdout", listener: (data: TestStdout) => void): this; - prependOnceListener(event: "test:watch:drained", listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - } - /** - * An instance of `TestContext` is passed to each test function in order to - * interact with the test runner. However, the `TestContext` constructor is not - * exposed as part of the API. - * @since v18.0.0, v16.17.0 - */ - class TestContext { - /** - * An object containing assertion methods bound to the test context. - * The top-level functions from the `node:assert` module are exposed here for the purpose of creating test plans. - * @since v22.2.0, v20.15.0 - */ - readonly assert: TestContextAssert; - /** - * This function is used to create a hook running before subtest of the current test. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v20.1.0, v18.17.0 - */ - before(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to create a hook running before each subtest of the current test. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v18.8.0 - */ - beforeEach(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to create a hook that runs after the current test finishes. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v18.13.0 - */ - after(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to create a hook running after each subtest of the current test. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v18.8.0 - */ - afterEach(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to write diagnostics to the output. Any diagnostic - * information is included at the end of the test's results. This function does - * not return a value. - * - * ```js - * test('top level test', (t) => { - * t.diagnostic('A diagnostic message'); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param message Message to be reported. - */ - diagnostic(message: string): void; - /** - * The absolute path of the test file that created the current test. If a test file imports - * additional modules that generate tests, the imported tests will return the path of the root test file. - * @since v22.6.0 - */ - readonly filePath: string | undefined; - /** - * The name of the test and each of its ancestors, separated by `>`. - * @since v22.3.0 - */ - readonly fullName: string; - /** - * The name of the test. - * @since v18.8.0, v16.18.0 - */ - readonly name: string; - /** - * Used to set the number of assertions and subtests that are expected to run within the test. - * If the number of assertions and subtests that run does not match the expected count, the test will fail. - * - * To make sure assertions are tracked, the assert functions on `context.assert` must be used, - * instead of importing from the `node:assert` module. - * ```js - * test('top level test', (t) => { - * t.plan(2); - * t.assert.ok('some relevant assertion here'); - * t.test('subtest', () => {}); - * }); - * ``` - * - * When working with asynchronous code, the `plan` function can be used to ensure that the correct number of assertions are run: - * ```js - * test('planning with streams', (t, done) => { - * function* generate() { - * yield 'a'; - * yield 'b'; - * yield 'c'; - * } - * const expected = ['a', 'b', 'c']; - * t.plan(expected.length); - * const stream = Readable.from(generate()); - * stream.on('data', (chunk) => { - * t.assert.strictEqual(chunk, expected.shift()); - * }); - * stream.on('end', () => { - * done(); - * }); - * }); - * ``` - * @since v22.2.0 - */ - plan(count: number): void; - /** - * If `shouldRunOnlyTests` is truthy, the test context will only run tests that - * have the `only` option set. Otherwise, all tests are run. If Node.js was not - * started with the `--test-only` command-line option, this function is a - * no-op. - * - * ```js - * test('top level test', (t) => { - * // The test context can be set to run subtests with the 'only' option. - * t.runOnly(true); - * return Promise.all([ - * t.test('this subtest is now skipped'), - * t.test('this subtest is run', { only: true }), - * ]); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param shouldRunOnlyTests Whether or not to run `only` tests. - */ - runOnly(shouldRunOnlyTests: boolean): void; - /** - * ```js - * test('top level test', async (t) => { - * await fetch('some/uri', { signal: t.signal }); - * }); - * ``` - * @since v18.7.0, v16.17.0 - */ - readonly signal: AbortSignal; - /** - * This function causes the test's output to indicate the test as skipped. If `message` is provided, it is included in the output. Calling `skip()` does - * not terminate execution of the test function. This function does not return a - * value. - * - * ```js - * test('top level test', (t) => { - * // Make sure to return here as well if the test contains additional logic. - * t.skip('this is skipped'); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param message Optional skip message. - */ - skip(message?: string): void; - /** - * This function adds a `TODO` directive to the test's output. If `message` is - * provided, it is included in the output. Calling `todo()` does not terminate - * execution of the test function. This function does not return a value. - * - * ```js - * test('top level test', (t) => { - * // This test is marked as `TODO` - * t.todo('this is a todo'); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param message Optional `TODO` message. - */ - todo(message?: string): void; - /** - * This function is used to create subtests under the current test. This function behaves in - * the same fashion as the top level {@link test} function. - * @since v18.0.0 - * @param name The name of the test, which is displayed when reporting test results. - * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. - * @param options Configuration options for the test. - * @param fn The function under test. This first argument to this function is a {@link TestContext} object. - * If the test uses callbacks, the callback function is passed as the second argument. - * @returns A {@link Promise} resolved with `undefined` once the test completes. - */ - test: typeof test; - /** - * Each test provides its own MockTracker instance. - */ - readonly mock: MockTracker; - } - interface TestContextAssert { - /** - * Identical to the `deepEqual` function from the `node:assert` module, but bound to the test context. - */ - deepEqual: typeof import("node:assert").deepEqual; - /** - * Identical to the `deepStrictEqual` function from the `node:assert` module, but bound to the test context. - * - * **Note:** as this method returns a type assertion, the context parameter in the callback signature must have a - * type annotation, otherwise an error will be raised by the TypeScript compiler: - * ```ts - * import { test, type TestContext } from 'node:test'; - * - * // The test function's context parameter must have a type annotation. - * test('example', (t: TestContext) => { - * t.assert.deepStrictEqual(actual, expected); - * }); - * - * // Omitting the type annotation will result in a compilation error. - * test('example', t => { - * t.assert.deepStrictEqual(actual, expected); // Error: 't' needs an explicit type annotation. - * }); - * ``` - */ - deepStrictEqual: typeof import("node:assert").deepStrictEqual; - /** - * Identical to the `doesNotMatch` function from the `node:assert` module, but bound to the test context. - */ - doesNotMatch: typeof import("node:assert").doesNotMatch; - /** - * Identical to the `doesNotReject` function from the `node:assert` module, but bound to the test context. - */ - doesNotReject: typeof import("node:assert").doesNotReject; - /** - * Identical to the `doesNotThrow` function from the `node:assert` module, but bound to the test context. - */ - doesNotThrow: typeof import("node:assert").doesNotThrow; - /** - * Identical to the `equal` function from the `node:assert` module, but bound to the test context. - */ - equal: typeof import("node:assert").equal; - /** - * Identical to the `fail` function from the `node:assert` module, but bound to the test context. - */ - fail: typeof import("node:assert").fail; - /** - * Identical to the `ifError` function from the `node:assert` module, but bound to the test context. - * - * **Note:** as this method returns a type assertion, the context parameter in the callback signature must have a - * type annotation, otherwise an error will be raised by the TypeScript compiler: - * ```ts - * import { test, type TestContext } from 'node:test'; - * - * // The test function's context parameter must have a type annotation. - * test('example', (t: TestContext) => { - * t.assert.ifError(err); - * }); - * - * // Omitting the type annotation will result in a compilation error. - * test('example', t => { - * t.assert.ifError(err); // Error: 't' needs an explicit type annotation. - * }); - * ``` - */ - ifError: typeof import("node:assert").ifError; - /** - * Identical to the `match` function from the `node:assert` module, but bound to the test context. - */ - match: typeof import("node:assert").match; - /** - * Identical to the `notDeepEqual` function from the `node:assert` module, but bound to the test context. - */ - notDeepEqual: typeof import("node:assert").notDeepEqual; - /** - * Identical to the `notDeepStrictEqual` function from the `node:assert` module, but bound to the test context. - */ - notDeepStrictEqual: typeof import("node:assert").notDeepStrictEqual; - /** - * Identical to the `notEqual` function from the `node:assert` module, but bound to the test context. - */ - notEqual: typeof import("node:assert").notEqual; - /** - * Identical to the `notStrictEqual` function from the `node:assert` module, but bound to the test context. - */ - notStrictEqual: typeof import("node:assert").notStrictEqual; - /** - * Identical to the `ok` function from the `node:assert` module, but bound to the test context. - * - * **Note:** as this method returns a type assertion, the context parameter in the callback signature must have a - * type annotation, otherwise an error will be raised by the TypeScript compiler: - * ```ts - * import { test, type TestContext } from 'node:test'; - * - * // The test function's context parameter must have a type annotation. - * test('example', (t: TestContext) => { - * t.assert.ok(condition); - * }); - * - * // Omitting the type annotation will result in a compilation error. - * test('example', t => { - * t.assert.ok(condition)); // Error: 't' needs an explicit type annotation. - * }); - * ``` - */ - ok: typeof import("node:assert").ok; - /** - * Identical to the `rejects` function from the `node:assert` module, but bound to the test context. - */ - rejects: typeof import("node:assert").rejects; - /** - * Identical to the `strictEqual` function from the `node:assert` module, but bound to the test context. - * - * **Note:** as this method returns a type assertion, the context parameter in the callback signature must have a - * type annotation, otherwise an error will be raised by the TypeScript compiler: - * ```ts - * import { test, type TestContext } from 'node:test'; - * - * // The test function's context parameter must have a type annotation. - * test('example', (t: TestContext) => { - * t.assert.strictEqual(actual, expected); - * }); - * - * // Omitting the type annotation will result in a compilation error. - * test('example', t => { - * t.assert.strictEqual(actual, expected); // Error: 't' needs an explicit type annotation. - * }); - * ``` - */ - strictEqual: typeof import("node:assert").strictEqual; - /** - * Identical to the `throws` function from the `node:assert` module, but bound to the test context. - */ - throws: typeof import("node:assert").throws; - /** - * This function implements assertions for snapshot testing. - * ```js - * test('snapshot test with default serialization', (t) => { - * t.assert.snapshot({ value1: 1, value2: 2 }); - * }); - * - * test('snapshot test with custom serialization', (t) => { - * t.assert.snapshot({ value3: 3, value4: 4 }, { - * serializers: [(value) => JSON.stringify(value)] - * }); - * }); - * ``` - * - * Only available through the [--experimental-test-snapshots](https://nodejs.org/api/cli.html#--experimental-test-snapshots) flag. - * @since v22.3.0 - * @experimental - */ - snapshot(value: any, options?: AssertSnapshotOptions): void; - } - interface AssertSnapshotOptions { - /** - * An array of synchronous functions used to serialize `value` into a string. - * `value` is passed as the only argument to the first serializer function. - * The return value of each serializer is passed as input to the next serializer. - * Once all serializers have run, the resulting value is coerced to a string. - * - * If no serializers are provided, the test runner's default serializers are used. - */ - serializers?: ReadonlyArray<(value: any) => any> | undefined; - } - - /** - * An instance of `SuiteContext` is passed to each suite function in order to - * interact with the test runner. However, the `SuiteContext` constructor is not - * exposed as part of the API. - * @since v18.7.0, v16.17.0 - */ - class SuiteContext { - /** - * The absolute path of the test file that created the current suite. If a test file imports - * additional modules that generate suites, the imported suites will return the path of the root test file. - * @since v22.6.0 - */ - readonly filePath: string | undefined; - /** - * The name of the suite. - * @since v18.8.0, v16.18.0 - */ - readonly name: string; - /** - * Can be used to abort test subtasks when the test has been aborted. - * @since v18.7.0, v16.17.0 - */ - readonly signal: AbortSignal; - } - interface TestOptions { - /** - * If a number is provided, then that many tests would run in parallel. - * If truthy, it would run (number of cpu cores - 1) tests in parallel. - * For subtests, it will be `Infinity` tests in parallel. - * If falsy, it would only run one test at a time. - * If unspecified, subtests inherit this value from their parent. - * @default false - */ - concurrency?: number | boolean | undefined; - /** - * If truthy, and the test context is configured to run `only` tests, then this test will be - * run. Otherwise, the test is skipped. - * @default false - */ - only?: boolean | undefined; - /** - * Allows aborting an in-progress test. - * @since v18.8.0 - */ - signal?: AbortSignal | undefined; - /** - * If truthy, the test is skipped. If a string is provided, that string is displayed in the - * test results as the reason for skipping the test. - * @default false - */ - skip?: boolean | string | undefined; - /** - * A number of milliseconds the test will fail after. If unspecified, subtests inherit this - * value from their parent. - * @default Infinity - * @since v18.7.0 - */ - timeout?: number | undefined; - /** - * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in - * the test results as the reason why the test is `TODO`. - * @default false - */ - todo?: boolean | string | undefined; - /** - * The number of assertions and subtests expected to be run in the test. - * If the number of assertions run in the test does not match the number - * specified in the plan, the test will fail. - * @default undefined - * @since v22.2.0 - */ - plan?: number | undefined; - } - /** - * This function creates a hook that runs before executing a suite. - * - * ```js - * describe('tests', async () => { - * before(() => console.log('about to run some test')); - * it('is a subtest', () => { - * assert.ok('some relevant assertion here'); - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function before(fn?: HookFn, options?: HookOptions): void; - /** - * This function creates a hook that runs after executing a suite. - * - * ```js - * describe('tests', async () => { - * after(() => console.log('finished running tests')); - * it('is a subtest', () => { - * assert.ok('some relevant assertion here'); - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function after(fn?: HookFn, options?: HookOptions): void; - /** - * This function creates a hook that runs before each test in the current suite. - * - * ```js - * describe('tests', async () => { - * beforeEach(() => console.log('about to run a test')); - * it('is a subtest', () => { - * assert.ok('some relevant assertion here'); - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function beforeEach(fn?: HookFn, options?: HookOptions): void; - /** - * This function creates a hook that runs after each test in the current suite. - * The `afterEach()` hook is run even if the test fails. - * - * ```js - * describe('tests', async () => { - * afterEach(() => console.log('finished running a test')); - * it('is a subtest', () => { - * assert.ok('some relevant assertion here'); - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function afterEach(fn?: HookFn, options?: HookOptions): void; - /** - * The hook function. The first argument is the context in which the hook is called. - * If the hook uses callbacks, the callback function is passed as the second argument. - */ - type HookFn = (c: TestContext | SuiteContext, done: (result?: any) => void) => any; - /** - * The hook function. The first argument is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - */ - type TestContextHookFn = (t: TestContext, done: (result?: any) => void) => any; - /** - * Configuration options for hooks. - * @since v18.8.0 - */ - interface HookOptions { - /** - * Allows aborting an in-progress hook. - */ - signal?: AbortSignal | undefined; - /** - * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this - * value from their parent. - * @default Infinity - */ - timeout?: number | undefined; - } - interface MockFunctionOptions { - /** - * The number of times that the mock will use the behavior of `implementation`. - * Once the mock function has been called `times` times, - * it will automatically restore the behavior of `original`. - * This value must be an integer greater than zero. - * @default Infinity - */ - times?: number | undefined; - } - interface MockMethodOptions extends MockFunctionOptions { - /** - * If `true`, `object[methodName]` is treated as a getter. - * This option cannot be used with the `setter` option. - */ - getter?: boolean | undefined; - /** - * If `true`, `object[methodName]` is treated as a setter. - * This option cannot be used with the `getter` option. - */ - setter?: boolean | undefined; - } - type Mock = F & { - mock: MockFunctionContext; - }; - type NoOpFunction = (...args: any[]) => undefined; - type FunctionPropertyNames = { - [K in keyof T]: T[K] extends Function ? K : never; - }[keyof T]; - interface MockModuleOptions { - /** - * If false, each call to `require()` or `import()` generates a new mock module. - * If true, subsequent calls will return the same module mock, and the mock module is inserted into the CommonJS cache. - * @default false - */ - cache?: boolean | undefined; - /** - * The value to use as the mocked module's default export. - * - * If this value is not provided, ESM mocks do not include a default export. - * If the mock is a CommonJS or builtin module, this setting is used as the value of `module.exports`. - * If this value is not provided, CJS and builtin mocks use an empty object as the value of `module.exports`. - */ - defaultExport?: any; - /** - * An object whose keys and values are used to create the named exports of the mock module. - * - * If the mock is a CommonJS or builtin module, these values are copied onto `module.exports`. - * Therefore, if a mock is created with both named exports and a non-object default export, - * the mock will throw an exception when used as a CJS or builtin module. - */ - namedExports?: object | undefined; - } - /** - * The `MockTracker` class is used to manage mocking functionality. The test runner - * module provides a top level `mock` export which is a `MockTracker` instance. - * Each test also provides its own `MockTracker` instance via the test context's `mock` property. - * @since v19.1.0, v18.13.0 - */ - class MockTracker { - /** - * This function is used to create a mock function. - * - * The following example creates a mock function that increments a counter by one - * on each invocation. The `times` option is used to modify the mock behavior such - * that the first two invocations add two to the counter instead of one. - * - * ```js - * test('mocks a counting function', (t) => { - * let cnt = 0; - * - * function addOne() { - * cnt++; - * return cnt; - * } - * - * function addTwo() { - * cnt += 2; - * return cnt; - * } - * - * const fn = t.mock.fn(addOne, addTwo, { times: 2 }); - * - * assert.strictEqual(fn(), 2); - * assert.strictEqual(fn(), 4); - * assert.strictEqual(fn(), 5); - * assert.strictEqual(fn(), 6); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param original An optional function to create a mock on. - * @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and - * then restore the behavior of `original`. - * @param options Optional configuration options for the mock function. - * @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the - * behavior of the mocked function. - */ - fn(original?: F, options?: MockFunctionOptions): Mock; - fn( - original?: F, - implementation?: Implementation, - options?: MockFunctionOptions, - ): Mock; - /** - * This function is used to create a mock on an existing object method. The - * following example demonstrates how a mock is created on an existing object - * method. - * - * ```js - * test('spies on an object method', (t) => { - * const number = { - * value: 5, - * subtract(a) { - * return this.value - a; - * }, - * }; - * - * t.mock.method(number, 'subtract'); - * assert.strictEqual(number.subtract.mock.calls.length, 0); - * assert.strictEqual(number.subtract(3), 2); - * assert.strictEqual(number.subtract.mock.calls.length, 1); - * - * const call = number.subtract.mock.calls[0]; - * - * assert.deepStrictEqual(call.arguments, [3]); - * assert.strictEqual(call.result, 2); - * assert.strictEqual(call.error, undefined); - * assert.strictEqual(call.target, undefined); - * assert.strictEqual(call.this, number); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param object The object whose method is being mocked. - * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown. - * @param implementation An optional function used as the mock implementation for `object[methodName]`. - * @param options Optional configuration options for the mock method. - * @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the - * behavior of the mocked method. - */ - method< - MockedObject extends object, - MethodName extends FunctionPropertyNames, - >( - object: MockedObject, - methodName: MethodName, - options?: MockFunctionOptions, - ): MockedObject[MethodName] extends Function ? Mock - : never; - method< - MockedObject extends object, - MethodName extends FunctionPropertyNames, - Implementation extends Function, - >( - object: MockedObject, - methodName: MethodName, - implementation: Implementation, - options?: MockFunctionOptions, - ): MockedObject[MethodName] extends Function ? Mock - : never; - method( - object: MockedObject, - methodName: keyof MockedObject, - options: MockMethodOptions, - ): Mock; - method( - object: MockedObject, - methodName: keyof MockedObject, - implementation: Function, - options: MockMethodOptions, - ): Mock; - - /** - * This function is syntax sugar for `MockTracker.method` with `options.getter` set to `true`. - * @since v19.3.0, v18.13.0 - */ - getter< - MockedObject extends object, - MethodName extends keyof MockedObject, - >( - object: MockedObject, - methodName: MethodName, - options?: MockFunctionOptions, - ): Mock<() => MockedObject[MethodName]>; - getter< - MockedObject extends object, - MethodName extends keyof MockedObject, - Implementation extends Function, - >( - object: MockedObject, - methodName: MethodName, - implementation?: Implementation, - options?: MockFunctionOptions, - ): Mock<(() => MockedObject[MethodName]) | Implementation>; - /** - * This function is syntax sugar for `MockTracker.method` with `options.setter` set to `true`. - * @since v19.3.0, v18.13.0 - */ - setter< - MockedObject extends object, - MethodName extends keyof MockedObject, - >( - object: MockedObject, - methodName: MethodName, - options?: MockFunctionOptions, - ): Mock<(value: MockedObject[MethodName]) => void>; - setter< - MockedObject extends object, - MethodName extends keyof MockedObject, - Implementation extends Function, - >( - object: MockedObject, - methodName: MethodName, - implementation?: Implementation, - options?: MockFunctionOptions, - ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>; - - /** - * This function is used to mock the exports of ECMAScript modules, CommonJS modules, and Node.js builtin modules. - * Any references to the original module prior to mocking are not impacted. - * - * Only available through the [--experimental-test-module-mocks](https://nodejs.org/api/cli.html#--experimental-test-module-mocks) flag. - * @since v22.3.0 - * @experimental - * @param specifier A string identifying the module to mock. - * @param options Optional configuration options for the mock module. - */ - module(specifier: string, options?: MockModuleOptions): MockModuleContext; - - /** - * This function restores the default behavior of all mocks that were previously - * created by this `MockTracker` and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used, but the `MockTracker` instance can no longer be - * used to reset their behavior or - * otherwise interact with them. - * - * After each test completes, this function is called on the test context's `MockTracker`. If the global `MockTracker` is used extensively, calling this - * function manually is recommended. - * @since v19.1.0, v18.13.0 - */ - reset(): void; - /** - * This function restores the default behavior of all mocks that were previously - * created by this `MockTracker`. Unlike `mock.reset()`, `mock.restoreAll()` does - * not disassociate the mocks from the `MockTracker` instance. - * @since v19.1.0, v18.13.0 - */ - restoreAll(): void; - - timers: MockTimers; - } - const mock: MockTracker; - interface MockFunctionCall< - F extends Function, - ReturnType = F extends (...args: any) => infer T ? T - : F extends abstract new(...args: any) => infer T ? T - : unknown, - Args = F extends (...args: infer Y) => any ? Y - : F extends abstract new(...args: infer Y) => any ? Y - : unknown[], - > { - /** - * An array of the arguments passed to the mock function. - */ - arguments: Args; - /** - * If the mocked function threw then this property contains the thrown value. - */ - error: unknown | undefined; - /** - * The value returned by the mocked function. - * - * If the mocked function threw, it will be `undefined`. - */ - result: ReturnType | undefined; - /** - * An `Error` object whose stack can be used to determine the callsite of the mocked function invocation. - */ - stack: Error; - /** - * If the mocked function is a constructor, this field contains the class being constructed. - * Otherwise this will be `undefined`. - */ - target: F extends abstract new(...args: any) => any ? F : undefined; - /** - * The mocked function's `this` value. - */ - this: unknown; - } - /** - * The `MockFunctionContext` class is used to inspect or manipulate the behavior of - * mocks created via the `MockTracker` APIs. - * @since v19.1.0, v18.13.0 - */ - class MockFunctionContext { - /** - * A getter that returns a copy of the internal array used to track calls to the - * mock. Each entry in the array is an object with the following properties. - * @since v19.1.0, v18.13.0 - */ - readonly calls: Array>; - /** - * This function returns the number of times that this mock has been invoked. This - * function is more efficient than checking `ctx.calls.length` because `ctx.calls` is a getter that creates a copy of the internal call tracking array. - * @since v19.1.0, v18.13.0 - * @return The number of times that this mock has been invoked. - */ - callCount(): number; - /** - * This function is used to change the behavior of an existing mock. - * - * The following example creates a mock function using `t.mock.fn()`, calls the - * mock function, and then changes the mock implementation to a different function. - * - * ```js - * test('changes a mock behavior', (t) => { - * let cnt = 0; - * - * function addOne() { - * cnt++; - * return cnt; - * } - * - * function addTwo() { - * cnt += 2; - * return cnt; - * } - * - * const fn = t.mock.fn(addOne); - * - * assert.strictEqual(fn(), 1); - * fn.mock.mockImplementation(addTwo); - * assert.strictEqual(fn(), 3); - * assert.strictEqual(fn(), 5); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param implementation The function to be used as the mock's new implementation. - */ - mockImplementation(implementation: F): void; - /** - * This function is used to change the behavior of an existing mock for a single - * invocation. Once invocation `onCall` has occurred, the mock will revert to - * whatever behavior it would have used had `mockImplementationOnce()` not been - * called. - * - * The following example creates a mock function using `t.mock.fn()`, calls the - * mock function, changes the mock implementation to a different function for the - * next invocation, and then resumes its previous behavior. - * - * ```js - * test('changes a mock behavior once', (t) => { - * let cnt = 0; - * - * function addOne() { - * cnt++; - * return cnt; - * } - * - * function addTwo() { - * cnt += 2; - * return cnt; - * } - * - * const fn = t.mock.fn(addOne); - * - * assert.strictEqual(fn(), 1); - * fn.mock.mockImplementationOnce(addTwo); - * assert.strictEqual(fn(), 3); - * assert.strictEqual(fn(), 4); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`. - * @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown. - */ - mockImplementationOnce(implementation: F, onCall?: number): void; - /** - * Resets the call history of the mock function. - * @since v19.3.0, v18.13.0 - */ - resetCalls(): void; - /** - * Resets the implementation of the mock function to its original behavior. The - * mock can still be used after calling this function. - * @since v19.1.0, v18.13.0 - */ - restore(): void; - } - /** - * @since v22.3.0 - * @experimental - */ - class MockModuleContext { - /** - * Resets the implementation of the mock module. - * @since v22.3.0 - */ - restore(): void; - } - - type Timer = "setInterval" | "setTimeout" | "setImmediate" | "Date"; - interface MockTimersOptions { - apis: Timer[]; - now?: number | Date | undefined; - } - /** - * Mocking timers is a technique commonly used in software testing to simulate and - * control the behavior of timers, such as `setInterval` and `setTimeout`, - * without actually waiting for the specified time intervals. - * - * The MockTimers API also allows for mocking of the `Date` constructor and - * `setImmediate`/`clearImmediate` functions. - * - * The `MockTracker` provides a top-level `timers` export - * which is a `MockTimers` instance. - * @since v20.4.0 - * @experimental - */ - class MockTimers { - /** - * Enables timer mocking for the specified timers. - * - * **Note:** When you enable mocking for a specific timer, its associated - * clear function will also be implicitly mocked. - * - * **Note:** Mocking `Date` will affect the behavior of the mocked timers - * as they use the same internal clock. - * - * Example usage without setting initial time: - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.enable({ apis: ['setInterval', 'Date'], now: 1234 }); - * ``` - * - * The above example enables mocking for the `Date` constructor, `setInterval` timer and - * implicitly mocks the `clearInterval` function. Only the `Date` constructor from `globalThis`, - * `setInterval` and `clearInterval` functions from `node:timers`, `node:timers/promises`, and `globalThis` will be mocked. - * - * Example usage with initial time set - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.enable({ apis: ['Date'], now: 1000 }); - * ``` - * - * Example usage with initial Date object as time set - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.enable({ apis: ['Date'], now: new Date() }); - * ``` - * - * Alternatively, if you call `mock.timers.enable()` without any parameters: - * - * All timers (`'setInterval'`, `'clearInterval'`, `'Date'`, `'setImmediate'`, `'clearImmediate'`, `'setTimeout'`, and `'clearTimeout'`) - * will be mocked. - * - * The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout` functions from `node:timers`, `node:timers/promises`, - * and `globalThis` will be mocked. - * The `Date` constructor from `globalThis` will be mocked. - * - * If there is no initial epoch set, the initial date will be based on 0 in the Unix epoch. This is `January 1st, 1970, 00:00:00 UTC`. You can - * set an initial date by passing a now property to the `.enable()` method. This value will be used as the initial date for the mocked Date - * object. It can either be a positive integer, or another Date object. - * @since v20.4.0 - */ - enable(options?: MockTimersOptions): void; - /** - * You can use the `.setTime()` method to manually move the mocked date to another time. This method only accepts a positive integer. - * Note: This method will execute any mocked timers that are in the past from the new time. - * In the below example we are setting a new time for the mocked date. - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * test('sets the time of a date object', (context) => { - * // Optionally choose what to mock - * context.mock.timers.enable({ apis: ['Date'], now: 100 }); - * assert.strictEqual(Date.now(), 100); - * // Advance in time will also advance the date - * context.mock.timers.setTime(1000); - * context.mock.timers.tick(200); - * assert.strictEqual(Date.now(), 1200); - * }); - * ``` - */ - setTime(time: number): void; - /** - * This function restores the default behavior of all mocks that were previously - * created by this `MockTimers` instance and disassociates the mocks - * from the `MockTracker` instance. - * - * **Note:** After each test completes, this function is called on - * the test context's `MockTracker`. - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.reset(); - * ``` - * @since v20.4.0 - */ - reset(): void; - /** - * Advances time for all mocked timers. - * - * **Note:** This diverges from how `setTimeout` in Node.js behaves and accepts - * only positive numbers. In Node.js, `setTimeout` with negative numbers is - * only supported for web compatibility reasons. - * - * The following example mocks a `setTimeout` function and - * by using `.tick` advances in - * time triggering all pending timers. - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { - * const fn = context.mock.fn(); - * - * context.mock.timers.enable({ apis: ['setTimeout'] }); - * - * setTimeout(fn, 9999); - * - * assert.strictEqual(fn.mock.callCount(), 0); - * - * // Advance in time - * context.mock.timers.tick(9999); - * - * assert.strictEqual(fn.mock.callCount(), 1); - * }); - * ``` - * - * Alternativelly, the `.tick` function can be called many times - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { - * const fn = context.mock.fn(); - * context.mock.timers.enable({ apis: ['setTimeout'] }); - * const nineSecs = 9000; - * setTimeout(fn, nineSecs); - * - * const twoSeconds = 3000; - * context.mock.timers.tick(twoSeconds); - * context.mock.timers.tick(twoSeconds); - * context.mock.timers.tick(twoSeconds); - * - * assert.strictEqual(fn.mock.callCount(), 1); - * }); - * ``` - * - * Advancing time using `.tick` will also advance the time for any `Date` object - * created after the mock was enabled (if `Date` was also set to be mocked). - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { - * const fn = context.mock.fn(); - * - * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); - * setTimeout(fn, 9999); - * - * assert.strictEqual(fn.mock.callCount(), 0); - * assert.strictEqual(Date.now(), 0); - * - * // Advance in time - * context.mock.timers.tick(9999); - * assert.strictEqual(fn.mock.callCount(), 1); - * assert.strictEqual(Date.now(), 9999); - * }); - * ``` - * @since v20.4.0 - */ - tick(milliseconds: number): void; - /** - * Triggers all pending mocked timers immediately. If the `Date` object is also - * mocked, it will also advance the `Date` object to the furthest timer's time. - * - * The example below triggers all pending timers immediately, - * causing them to execute without any delay. - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('runAll functions following the given order', (context) => { - * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); - * const results = []; - * setTimeout(() => results.push(1), 9999); - * - * // Notice that if both timers have the same timeout, - * // the order of execution is guaranteed - * setTimeout(() => results.push(3), 8888); - * setTimeout(() => results.push(2), 8888); - * - * assert.deepStrictEqual(results, []); - * - * context.mock.timers.runAll(); - * assert.deepStrictEqual(results, [3, 2, 1]); - * // The Date object is also advanced to the furthest timer's time - * assert.strictEqual(Date.now(), 9999); - * }); - * ``` - * - * **Note:** The `runAll()` function is specifically designed for - * triggering timers in the context of timer mocking. - * It does not have any effect on real-time system - * clocks or actual timers outside of the mocking environment. - * @since v20.4.0 - */ - runAll(): void; - /** - * Calls {@link MockTimers.reset()}. - */ - [Symbol.dispose](): void; - } - /** - * Only available through the [--experimental-test-snapshots](https://nodejs.org/api/cli.html#--experimental-test-snapshots) flag. - * @since v22.3.0 - * @experimental - */ - namespace snapshot { - /** - * This function is used to customize the default serialization mechanism used by the test runner. - * - * By default, the test runner performs serialization by calling `JSON.stringify(value, null, 2)` on the provided value. - * `JSON.stringify()` does have limitations regarding circular structures and supported data types. - * If a more robust serialization mechanism is required, this function should be used to specify a list of custom serializers. - * - * Serializers are called in order, with the output of the previous serializer passed as input to the next. - * The final result must be a string value. - * @since v22.3.0 - * @param serializers An array of synchronous functions used as the default serializers for snapshot tests. - */ - function setDefaultSnapshotSerializers(serializers: ReadonlyArray<(value: any) => any>): void; - /** - * This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing. - * By default, the snapshot filename is the same as the entry point filename with `.snapshot` appended. - * @since v22.3.0 - * @param fn A function used to compute the location of the snapshot file. - * The function receives the path of the test file as its only argument. If the - * test is not associated with a file (for example in the REPL), the input is - * undefined. `fn()` must return a string specifying the location of the snapshot file. - */ - function setResolveSnapshotPath(fn: (path: string | undefined) => string): void; - } - export { - after, - afterEach, - before, - beforeEach, - describe, - it, - Mock, - mock, - only, - run, - skip, - snapshot, - suite, - SuiteContext, - test, - test as default, - TestContext, - todo, - }; -} - -interface TestError extends Error { - cause: Error; -} -interface TestLocationInfo { - /** - * The column number where the test is defined, or - * `undefined` if the test was run through the REPL. - */ - column?: number; - /** - * The path of the test file, `undefined` if test was run through the REPL. - */ - file?: string; - /** - * The line number where the test is defined, or `undefined` if the test was run through the REPL. - */ - line?: number; -} -interface DiagnosticData extends TestLocationInfo { - /** - * The diagnostic message. - */ - message: string; - /** - * The nesting level of the test. - */ - nesting: number; -} -interface TestCoverage { - /** - * An object containing the coverage report. - */ - summary: { - /** - * An array of coverage reports for individual files. - */ - files: Array<{ - /** - * The absolute path of the file. - */ - path: string; - /** - * The total number of lines. - */ - totalLineCount: number; - /** - * The total number of branches. - */ - totalBranchCount: number; - /** - * The total number of functions. - */ - totalFunctionCount: number; - /** - * The number of covered lines. - */ - coveredLineCount: number; - /** - * The number of covered branches. - */ - coveredBranchCount: number; - /** - * The number of covered functions. - */ - coveredFunctionCount: number; - /** - * The percentage of lines covered. - */ - coveredLinePercent: number; - /** - * The percentage of branches covered. - */ - coveredBranchPercent: number; - /** - * The percentage of functions covered. - */ - coveredFunctionPercent: number; - /** - * An array of functions representing function coverage. - */ - functions: Array<{ - /** - * The name of the function. - */ - name: string; - /** - * The line number where the function is defined. - */ - line: number; - /** - * The number of times the function was called. - */ - count: number; - }>; - /** - * An array of branches representing branch coverage. - */ - branches: Array<{ - /** - * The line number where the branch is defined. - */ - line: number; - /** - * The number of times the branch was taken. - */ - count: number; - }>; - /** - * An array of lines representing line numbers and the number of times they were covered. - */ - lines: Array<{ - /** - * The line number. - */ - line: number; - /** - * The number of times the line was covered. - */ - count: number; - }>; - }>; - /** - * An object containing whether or not the coverage for - * each coverage type. - * @since v22.9.0 - */ - thresholds: { - /** - * The function coverage threshold. - */ - function: number; - /** - * The branch coverage threshold. - */ - branch: number; - /** - * The line coverage threshold. - */ - line: number; - }; - /** - * An object containing a summary of coverage for all files. - */ - totals: { - /** - * The total number of lines. - */ - totalLineCount: number; - /** - * The total number of branches. - */ - totalBranchCount: number; - /** - * The total number of functions. - */ - totalFunctionCount: number; - /** - * The number of covered lines. - */ - coveredLineCount: number; - /** - * The number of covered branches. - */ - coveredBranchCount: number; - /** - * The number of covered functions. - */ - coveredFunctionCount: number; - /** - * The percentage of lines covered. - */ - coveredLinePercent: number; - /** - * The percentage of branches covered. - */ - coveredBranchPercent: number; - /** - * The percentage of functions covered. - */ - coveredFunctionPercent: number; - }; - /** - * The working directory when code coverage began. This - * is useful for displaying relative path names in case - * the tests changed the working directory of the Node.js process. - */ - workingDirectory: string; - }; - /** - * The nesting level of the test. - */ - nesting: number; -} -interface TestComplete extends TestLocationInfo { - /** - * Additional execution metadata. - */ - details: { - /** - * Whether the test passed or not. - */ - passed: boolean; - /** - * The duration of the test in milliseconds. - */ - duration_ms: number; - /** - * An error wrapping the error thrown by the test if it did not pass. - */ - error?: TestError; - /** - * The type of the test, used to denote whether this is a suite. - */ - type?: "suite"; - }; - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The ordinal number of the test. - */ - testNumber: number; - /** - * Present if `context.todo` is called. - */ - todo?: string | boolean; - /** - * Present if `context.skip` is called. - */ - skip?: string | boolean; -} -interface TestDequeue extends TestLocationInfo { - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; -} -interface TestEnqueue extends TestLocationInfo { - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; -} -interface TestFail extends TestLocationInfo { - /** - * Additional execution metadata. - */ - details: { - /** - * The duration of the test in milliseconds. - */ - duration_ms: number; - /** - * An error wrapping the error thrown by the test. - */ - error: TestError; - /** - * The type of the test, used to denote whether this is a suite. - * @since v20.0.0, v19.9.0, v18.17.0 - */ - type?: "suite"; - }; - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The ordinal number of the test. - */ - testNumber: number; - /** - * Present if `context.todo` is called. - */ - todo?: string | boolean; - /** - * Present if `context.skip` is called. - */ - skip?: string | boolean; -} -interface TestPass extends TestLocationInfo { - /** - * Additional execution metadata. - */ - details: { - /** - * The duration of the test in milliseconds. - */ - duration_ms: number; - /** - * The type of the test, used to denote whether this is a suite. - * @since 20.0.0, 19.9.0, 18.17.0 - */ - type?: "suite"; - }; - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The ordinal number of the test. - */ - testNumber: number; - /** - * Present if `context.todo` is called. - */ - todo?: string | boolean; - /** - * Present if `context.skip` is called. - */ - skip?: string | boolean; -} -interface TestPlan extends TestLocationInfo { - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The number of subtests that have ran. - */ - count: number; -} -interface TestStart extends TestLocationInfo { - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; -} -interface TestStderr { - /** - * The path of the test file. - */ - file: string; - /** - * The message written to `stderr`. - */ - message: string; -} -interface TestStdout { - /** - * The path of the test file. - */ - file: string; - /** - * The message written to `stdout`. - */ - message: string; -} - -/** - * The `node:test/reporters` module exposes the builtin-reporters for `node:test`. - * To access it: - * - * ```js - * import test from 'node:test/reporters'; - * ``` - * - * This module is only available under the `node:` scheme. The following will not - * work: - * - * ```js - * import test from 'node:test/reporters'; - * ``` - * @since v19.9.0 - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/test/reporters.js) - */ -declare module "node:test/reporters" { - import { Transform, TransformOptions } from "node:stream"; - - type TestEvent = - | { type: "test:coverage"; data: TestCoverage } - | { type: "test:complete"; data: TestComplete } - | { type: "test:dequeue"; data: TestDequeue } - | { type: "test:diagnostic"; data: DiagnosticData } - | { type: "test:enqueue"; data: TestEnqueue } - | { type: "test:fail"; data: TestFail } - | { type: "test:pass"; data: TestPass } - | { type: "test:plan"; data: TestPlan } - | { type: "test:start"; data: TestStart } - | { type: "test:stderr"; data: TestStderr } - | { type: "test:stdout"; data: TestStdout } - | { type: "test:watch:drained"; data: undefined }; - type TestEventGenerator = AsyncGenerator; - - interface ReporterConstructorWrapper Transform> { - new(...args: ConstructorParameters): InstanceType; - (...args: ConstructorParameters): InstanceType; - } - - /** - * The `dot` reporter outputs the test results in a compact format, - * where each passing test is represented by a `.`, - * and each failing test is represented by a `X`. - * @since v20.0.0 - */ - function dot(source: TestEventGenerator): AsyncGenerator<"\n" | "." | "X", void>; - /** - * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format. - * @since v20.0.0 - */ - function tap(source: TestEventGenerator): AsyncGenerator; - class SpecReporter extends Transform { - constructor(); - } - /** - * The `spec` reporter outputs the test results in a human-readable format. - * @since v20.0.0 - */ - const spec: ReporterConstructorWrapper; - /** - * The `junit` reporter outputs test results in a jUnit XML format. - * @since v21.0.0 - */ - function junit(source: TestEventGenerator): AsyncGenerator; - class LcovReporter extends Transform { - constructor(opts?: Omit); - } - /** - * The `lcov` reporter outputs test coverage when used with the - * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--experimental-test-coverage) flag. - * @since v22.0.0 - */ - // TODO: change the export to a wrapper function once node@0db38f0 is merged (breaking change) - // const lcov: ReporterConstructorWrapper; - const lcov: LcovReporter; - - export { dot, junit, lcov, spec, tap, TestEvent }; -} diff --git a/web/static/node_modules/@types/node/timers.d.ts b/web/static/node_modules/@types/node/timers.d.ts deleted file mode 100644 index a4ea3e57..00000000 --- a/web/static/node_modules/@types/node/timers.d.ts +++ /dev/null @@ -1,240 +0,0 @@ -/** - * The `timer` module exposes a global API for scheduling functions to - * be called at some future period of time. Because the timer functions are - * globals, there is no need to import `node:timers` to use the API. - * - * The timer functions within Node.js implement a similar API as the timers API - * provided by Web Browsers but use a different internal implementation that is - * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout). - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/timers.js) - */ -declare module "timers" { - import { Abortable } from "node:events"; - import { - setImmediate as setImmediatePromise, - setInterval as setIntervalPromise, - setTimeout as setTimeoutPromise, - } from "node:timers/promises"; - interface TimerOptions extends Abortable { - /** - * Set to `false` to indicate that the scheduled `Timeout` - * should not require the Node.js event loop to remain active. - * @default true - */ - ref?: boolean | undefined; - } - let setTimeout: typeof global.setTimeout; - let clearTimeout: typeof global.clearTimeout; - let setInterval: typeof global.setInterval; - let clearInterval: typeof global.clearInterval; - let setImmediate: typeof global.setImmediate; - let clearImmediate: typeof global.clearImmediate; - global { - namespace NodeJS { - // compatibility with older typings - interface Timer extends RefCounted { - hasRef(): boolean; - refresh(): this; - [Symbol.toPrimitive](): number; - } - /** - * This object is created internally and is returned from `setImmediate()`. It - * can be passed to `clearImmediate()` in order to cancel the scheduled - * actions. - * - * By default, when an immediate is scheduled, the Node.js event loop will continue - * running as long as the immediate is active. The `Immediate` object returned by `setImmediate()` exports both `immediate.ref()` and `immediate.unref()` functions that can be used to - * control this default behavior. - */ - class Immediate implements RefCounted { - /** - * When called, requests that the Node.js event loop _not_ exit so long as the `Immediate` is active. Calling `immediate.ref()` multiple times will have no - * effect. - * - * By default, all `Immediate` objects are "ref'ed", making it normally unnecessary - * to call `immediate.ref()` unless `immediate.unref()` had been called previously. - * @since v9.7.0 - * @return a reference to `immediate` - */ - ref(): this; - /** - * When called, the active `Immediate` object will not require the Node.js event - * loop to remain active. If there is no other activity keeping the event loop - * running, the process may exit before the `Immediate` object's callback is - * invoked. Calling `immediate.unref()` multiple times will have no effect. - * @since v9.7.0 - * @return a reference to `immediate` - */ - unref(): this; - /** - * If true, the `Immediate` object will keep the Node.js event loop active. - * @since v11.0.0 - */ - hasRef(): boolean; - _onImmediate: Function; // to distinguish it from the Timeout class - /** - * Cancels the immediate. This is similar to calling `clearImmediate()`. - * @since v20.5.0 - */ - [Symbol.dispose](): void; - } - /** - * This object is created internally and is returned from `setTimeout()` and `setInterval()`. It can be passed to either `clearTimeout()` or `clearInterval()` in order to cancel the - * scheduled actions. - * - * By default, when a timer is scheduled using either `setTimeout()` or `setInterval()`, the Node.js event loop will continue running as long as the - * timer is active. Each of the `Timeout` objects returned by these functions - * export both `timeout.ref()` and `timeout.unref()` functions that can be used to - * control this default behavior. - */ - class Timeout implements Timer { - /** - * When called, requests that the Node.js event loop _not_ exit so long as the`Timeout` is active. Calling `timeout.ref()` multiple times will have no effect. - * - * By default, all `Timeout` objects are "ref'ed", making it normally unnecessary - * to call `timeout.ref()` unless `timeout.unref()` had been called previously. - * @since v0.9.1 - * @return a reference to `timeout` - */ - ref(): this; - /** - * When called, the active `Timeout` object will not require the Node.js event loop - * to remain active. If there is no other activity keeping the event loop running, - * the process may exit before the `Timeout` object's callback is invoked. Calling `timeout.unref()` multiple times will have no effect. - * @since v0.9.1 - * @return a reference to `timeout` - */ - unref(): this; - /** - * If true, the `Timeout` object will keep the Node.js event loop active. - * @since v11.0.0 - */ - hasRef(): boolean; - /** - * Sets the timer's start time to the current time, and reschedules the timer to - * call its callback at the previously specified duration adjusted to the current - * time. This is useful for refreshing a timer without allocating a new - * JavaScript object. - * - * Using this on a timer that has already called its callback will reactivate the - * timer. - * @since v10.2.0 - * @return a reference to `timeout` - */ - refresh(): this; - [Symbol.toPrimitive](): number; - /** - * Cancels the timeout. - * @since v20.5.0 - */ - [Symbol.dispose](): void; - } - } - /** - * Schedules execution of a one-time `callback` after `delay` milliseconds. - * - * The `callback` will likely not be invoked in precisely `delay` milliseconds. - * Node.js makes no guarantees about the exact timing of when callbacks will fire, - * nor of their ordering. The callback will be called as close as possible to the - * time specified. - * - * When `delay` is larger than `2147483647` or less than `1`, the `delay` will be set to `1`. Non-integer delays are truncated to an integer. - * - * If `callback` is not a function, a `TypeError` will be thrown. - * - * This method has a custom variant for promises that is available using `timersPromises.setTimeout()`. - * @since v0.0.1 - * @param callback The function to call when the timer elapses. - * @param [delay=1] The number of milliseconds to wait before calling the `callback`. - * @param args Optional arguments to pass when the `callback` is called. - * @return for use with {@link clearTimeout} - */ - function setTimeout( - callback: (...args: TArgs) => void, - ms?: number, - ...args: TArgs - ): NodeJS.Timeout; - // util.promisify no rest args compability - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout; - namespace setTimeout { - const __promisify__: typeof setTimeoutPromise; - } - /** - * Cancels a `Timeout` object created by `setTimeout()`. - * @since v0.0.1 - * @param timeout A `Timeout` object as returned by {@link setTimeout} or the `primitive` of the `Timeout` object as a string or a number. - */ - function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void; - /** - * Schedules repeated execution of `callback` every `delay` milliseconds. - * - * When `delay` is larger than `2147483647` or less than `1`, the `delay` will be - * set to `1`. Non-integer delays are truncated to an integer. - * - * If `callback` is not a function, a `TypeError` will be thrown. - * - * This method has a custom variant for promises that is available using `timersPromises.setInterval()`. - * @since v0.0.1 - * @param callback The function to call when the timer elapses. - * @param [delay=1] The number of milliseconds to wait before calling the `callback`. - * @param args Optional arguments to pass when the `callback` is called. - * @return for use with {@link clearInterval} - */ - function setInterval( - callback: (...args: TArgs) => void, - ms?: number, - ...args: TArgs - ): NodeJS.Timeout; - // util.promisify no rest args compability - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timeout; - namespace setInterval { - const __promisify__: typeof setIntervalPromise; - } - /** - * Cancels a `Timeout` object created by `setInterval()`. - * @since v0.0.1 - * @param timeout A `Timeout` object as returned by {@link setInterval} or the `primitive` of the `Timeout` object as a string or a number. - */ - function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void; - /** - * Schedules the "immediate" execution of the `callback` after I/O events' - * callbacks. - * - * When multiple calls to `setImmediate()` are made, the `callback` functions are - * queued for execution in the order in which they are created. The entire callback - * queue is processed every event loop iteration. If an immediate timer is queued - * from inside an executing callback, that timer will not be triggered until the - * next event loop iteration. - * - * If `callback` is not a function, a `TypeError` will be thrown. - * - * This method has a custom variant for promises that is available using `timersPromises.setImmediate()`. - * @since v0.9.1 - * @param callback The function to call at the end of this turn of the Node.js `Event Loop` - * @param args Optional arguments to pass when the `callback` is called. - * @return for use with {@link clearImmediate} - */ - function setImmediate( - callback: (...args: TArgs) => void, - ...args: TArgs - ): NodeJS.Immediate; - // util.promisify no rest args compability - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - function setImmediate(callback: (args: void) => void): NodeJS.Immediate; - namespace setImmediate { - const __promisify__: typeof setImmediatePromise; - } - /** - * Cancels an `Immediate` object created by `setImmediate()`. - * @since v0.9.1 - * @param immediate An `Immediate` object as returned by {@link setImmediate}. - */ - function clearImmediate(immediateId: NodeJS.Immediate | undefined): void; - function queueMicrotask(callback: () => void): void; - } -} -declare module "node:timers" { - export * from "timers"; -} diff --git a/web/static/node_modules/@types/node/timers/promises.d.ts b/web/static/node_modules/@types/node/timers/promises.d.ts deleted file mode 100644 index 3530418e..00000000 --- a/web/static/node_modules/@types/node/timers/promises.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * The `timers/promises` API provides an alternative set of timer functions - * that return `Promise` objects. The API is accessible via `import timersPromises from 'node:timers/promises'`. - * - * ```js - * import { - * setTimeout, - * setImmediate, - * setInterval, - * } from 'node:timers/promises'; - * ``` - * @since v15.0.0 - */ -declare module "timers/promises" { - import { TimerOptions } from "node:timers"; - /** - * ```js - * import { - * setTimeout, - * } from 'node:timers/promises'; - * - * const res = await setTimeout(100, 'result'); - * - * console.log(res); // Prints 'result' - * ``` - * @since v15.0.0 - * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. - * @param value A value with which the promise is fulfilled. - */ - function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; - /** - * ```js - * import { - * setImmediate, - * } from 'node:timers/promises'; - * - * const res = await setImmediate('result'); - * - * console.log(res); // Prints 'result' - * ``` - * @since v15.0.0 - * @param value A value with which the promise is fulfilled. - */ - function setImmediate(value?: T, options?: TimerOptions): Promise; - /** - * Returns an async iterator that generates values in an interval of `delay` ms. - * If `ref` is `true`, you need to call `next()` of async iterator explicitly - * or implicitly to keep the event loop alive. - * - * ```js - * import { - * setInterval, - * } from 'node:timers/promises'; - * - * const interval = 100; - * for await (const startTime of setInterval(interval, Date.now())) { - * const now = Date.now(); - * console.log(now); - * if ((now - startTime) > 1000) - * break; - * } - * console.log(Date.now()); - * ``` - * @since v15.9.0 - */ - function setInterval(delay?: number, value?: T, options?: TimerOptions): AsyncIterable; - interface Scheduler { - /** - * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification being developed as a standard Web Platform API. - * - * Calling `timersPromises.scheduler.wait(delay, options)` is roughly equivalent to calling `timersPromises.setTimeout(delay, undefined, options)` except that the `ref` - * option is not supported. - * - * ```js - * import { scheduler } from 'node:timers/promises'; - * - * await scheduler.wait(1000); // Wait one second before continuing - * ``` - * @since v16.14.0 - * @experimental - * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. - */ - wait: (delay?: number, options?: TimerOptions) => Promise; - /** - * An experimental API defined by the [Scheduling APIs](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html#promise-execution-tracking) draft specification - * being developed as a standard Web Platform API. - * Calling `timersPromises.scheduler.yield()` is equivalent to calling `timersPromises.setImmediate()` with no arguments. - * @since v16.14.0 - * @experimental - */ - yield: () => Promise; - } - const scheduler: Scheduler; -} -declare module "node:timers/promises" { - export * from "timers/promises"; -} diff --git a/web/static/node_modules/@types/node/tls.d.ts b/web/static/node_modules/@types/node/tls.d.ts deleted file mode 100644 index ba37f066..00000000 --- a/web/static/node_modules/@types/node/tls.d.ts +++ /dev/null @@ -1,1226 +0,0 @@ -/** - * The `node:tls` module provides an implementation of the Transport Layer Security - * (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL. - * The module can be accessed using: - * - * ```js - * import tls from 'node:tls'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/tls.js) - */ -declare module "tls" { - import { X509Certificate } from "node:crypto"; - import * as net from "node:net"; - import * as stream from "stream"; - const CLIENT_RENEG_LIMIT: number; - const CLIENT_RENEG_WINDOW: number; - interface Certificate { - /** - * Country code. - */ - C: string; - /** - * Street. - */ - ST: string; - /** - * Locality. - */ - L: string; - /** - * Organization. - */ - O: string; - /** - * Organizational unit. - */ - OU: string; - /** - * Common name. - */ - CN: string; - } - interface PeerCertificate { - /** - * `true` if a Certificate Authority (CA), `false` otherwise. - * @since v18.13.0 - */ - ca: boolean; - /** - * The DER encoded X.509 certificate data. - */ - raw: Buffer; - /** - * The certificate subject. - */ - subject: Certificate; - /** - * The certificate issuer, described in the same terms as the `subject`. - */ - issuer: Certificate; - /** - * The date-time the certificate is valid from. - */ - valid_from: string; - /** - * The date-time the certificate is valid to. - */ - valid_to: string; - /** - * The certificate serial number, as a hex string. - */ - serialNumber: string; - /** - * The SHA-1 digest of the DER encoded certificate. - * It is returned as a `:` separated hexadecimal string. - */ - fingerprint: string; - /** - * The SHA-256 digest of the DER encoded certificate. - * It is returned as a `:` separated hexadecimal string. - */ - fingerprint256: string; - /** - * The SHA-512 digest of the DER encoded certificate. - * It is returned as a `:` separated hexadecimal string. - */ - fingerprint512: string; - /** - * The extended key usage, a set of OIDs. - */ - ext_key_usage?: string[]; - /** - * A string containing concatenated names for the subject, - * an alternative to the `subject` names. - */ - subjectaltname?: string; - /** - * An array describing the AuthorityInfoAccess, used with OCSP. - */ - infoAccess?: NodeJS.Dict; - /** - * For RSA keys: The RSA bit size. - * - * For EC keys: The key size in bits. - */ - bits?: number; - /** - * The RSA exponent, as a string in hexadecimal number notation. - */ - exponent?: string; - /** - * The RSA modulus, as a hexadecimal string. - */ - modulus?: string; - /** - * The public key. - */ - pubkey?: Buffer; - /** - * The ASN.1 name of the OID of the elliptic curve. - * Well-known curves are identified by an OID. - * While it is unusual, it is possible that the curve - * is identified by its mathematical properties, - * in which case it will not have an OID. - */ - asn1Curve?: string; - /** - * The NIST name for the elliptic curve, if it has one - * (not all well-known curves have been assigned names by NIST). - */ - nistCurve?: string; - } - interface DetailedPeerCertificate extends PeerCertificate { - /** - * The issuer certificate object. - * For self-signed certificates, this may be a circular reference. - */ - issuerCertificate: DetailedPeerCertificate; - } - interface CipherNameAndProtocol { - /** - * The cipher name. - */ - name: string; - /** - * SSL/TLS protocol version. - */ - version: string; - /** - * IETF name for the cipher suite. - */ - standardName: string; - } - interface EphemeralKeyInfo { - /** - * The supported types are 'DH' and 'ECDH'. - */ - type: string; - /** - * The name property is available only when type is 'ECDH'. - */ - name?: string | undefined; - /** - * The size of parameter of an ephemeral key exchange. - */ - size: number; - } - interface KeyObject { - /** - * Private keys in PEM format. - */ - pem: string | Buffer; - /** - * Optional passphrase. - */ - passphrase?: string | undefined; - } - interface PxfObject { - /** - * PFX or PKCS12 encoded private key and certificate chain. - */ - buf: string | Buffer; - /** - * Optional passphrase. - */ - passphrase?: string | undefined; - } - interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { - /** - * If true the TLS socket will be instantiated in server-mode. - * Defaults to false. - */ - isServer?: boolean | undefined; - /** - * An optional net.Server instance. - */ - server?: net.Server | undefined; - /** - * An optional Buffer instance containing a TLS session. - */ - session?: Buffer | undefined; - /** - * If true, specifies that the OCSP status request extension will be - * added to the client hello and an 'OCSPResponse' event will be - * emitted on the socket before establishing a secure communication - */ - requestOCSP?: boolean | undefined; - } - /** - * Performs transparent encryption of written data and all required TLS - * negotiation. - * - * Instances of `tls.TLSSocket` implement the duplex `Stream` interface. - * - * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate}) will only return data while the - * connection is open. - * @since v0.11.4 - */ - class TLSSocket extends net.Socket { - /** - * Construct a new tls.TLSSocket object from an existing TCP socket. - */ - constructor(socket: net.Socket | stream.Duplex, options?: TLSSocketOptions); - /** - * This property is `true` if the peer certificate was signed by one of the CAs - * specified when creating the `tls.TLSSocket` instance, otherwise `false`. - * @since v0.11.4 - */ - authorized: boolean; - /** - * Returns the reason why the peer's certificate was not been verified. This - * property is set only when `tlsSocket.authorized === false`. - * @since v0.11.4 - */ - authorizationError: Error; - /** - * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances. - * @since v0.11.4 - */ - encrypted: true; - /** - * String containing the selected ALPN protocol. - * Before a handshake has completed, this value is always null. - * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false. - */ - alpnProtocol: string | false | null; - /** - * Returns an object representing the local certificate. The returned object has - * some properties corresponding to the fields of the certificate. - * - * See {@link TLSSocket.getPeerCertificate} for an example of the certificate - * structure. - * - * If there is no local certificate, an empty object will be returned. If the - * socket has been destroyed, `null` will be returned. - * @since v11.2.0 - */ - getCertificate(): PeerCertificate | object | null; - /** - * Returns an object containing information on the negotiated cipher suite. - * - * For example, a TLSv1.2 protocol with AES256-SHA cipher: - * - * ```json - * { - * "name": "AES256-SHA", - * "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA", - * "version": "SSLv3" - * } - * ``` - * - * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information. - * @since v0.11.4 - */ - getCipher(): CipherNameAndProtocol; - /** - * Returns an object representing the type, name, and size of parameter of - * an ephemeral key exchange in `perfect forward secrecy` on a client - * connection. It returns an empty object when the key exchange is not - * ephemeral. As this is only supported on a client socket; `null` is returned - * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The `name` property is available only when type is `'ECDH'`. - * - * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. - * @since v5.0.0 - */ - getEphemeralKeyInfo(): EphemeralKeyInfo | object | null; - /** - * As the `Finished` messages are message digests of the complete handshake - * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can - * be used for external authentication procedures when the authentication - * provided by SSL/TLS is not desired or is not enough. - * - * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used - * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). - * @since v9.9.0 - * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet. - */ - getFinished(): Buffer | undefined; - /** - * Returns an object representing the peer's certificate. If the peer does not - * provide a certificate, an empty object will be returned. If the socket has been - * destroyed, `null` will be returned. - * - * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's - * certificate. - * @since v0.11.4 - * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate. - * @return A certificate object. - */ - getPeerCertificate(detailed: true): DetailedPeerCertificate; - getPeerCertificate(detailed?: false): PeerCertificate; - getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; - /** - * As the `Finished` messages are message digests of the complete handshake - * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can - * be used for external authentication procedures when the authentication - * provided by SSL/TLS is not desired or is not enough. - * - * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used - * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). - * @since v9.9.0 - * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so - * far. - */ - getPeerFinished(): Buffer | undefined; - /** - * Returns a string containing the negotiated SSL/TLS protocol version of the - * current connection. The value `'unknown'` will be returned for connected - * sockets that have not completed the handshaking process. The value `null` will - * be returned for server sockets or disconnected client sockets. - * - * Protocol versions are: - * - * * `'SSLv3'` - * * `'TLSv1'` - * * `'TLSv1.1'` - * * `'TLSv1.2'` - * * `'TLSv1.3'` - * - * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information. - * @since v5.7.0 - */ - getProtocol(): string | null; - /** - * Returns the TLS session data or `undefined` if no session was - * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful - * for debugging. - * - * See `Session Resumption` for more information. - * - * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications - * must use the `'session'` event (it also works for TLSv1.2 and below). - * @since v0.11.4 - */ - getSession(): Buffer | undefined; - /** - * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information. - * @since v12.11.0 - * @return List of signature algorithms shared between the server and the client in the order of decreasing preference. - */ - getSharedSigalgs(): string[]; - /** - * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`. - * - * It may be useful for debugging. - * - * See `Session Resumption` for more information. - * @since v0.11.4 - */ - getTLSTicket(): Buffer | undefined; - /** - * See `Session Resumption` for more information. - * @since v0.5.6 - * @return `true` if the session was reused, `false` otherwise. - */ - isSessionReused(): boolean; - /** - * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process. - * Upon completion, the `callback` function will be passed a single argument - * that is either an `Error` (if the request failed) or `null`. - * - * This method can be used to request a peer's certificate after the secure - * connection has been established. - * - * When running as the server, the socket will be destroyed with an error after `handshakeTimeout` timeout. - * - * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the - * protocol. - * @since v0.11.8 - * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with - * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all. - * @return `true` if renegotiation was initiated, `false` otherwise. - */ - renegotiate( - options: { - rejectUnauthorized?: boolean | undefined; - requestCert?: boolean | undefined; - }, - callback: (err: Error | null) => void, - ): undefined | boolean; - /** - * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size. - * Returns `true` if setting the limit succeeded; `false` otherwise. - * - * Smaller fragment sizes decrease the buffering latency on the client: larger - * fragments are buffered by the TLS layer until the entire fragment is received - * and its integrity is verified; large fragments can span multiple roundtrips - * and their processing can be delayed due to packet loss or reordering. However, - * smaller fragments add extra TLS framing bytes and CPU overhead, which may - * decrease overall server throughput. - * @since v0.11.11 - * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`. - */ - setMaxSendFragment(size: number): boolean; - /** - * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts - * to renegotiate will trigger an `'error'` event on the `TLSSocket`. - * @since v8.4.0 - */ - disableRenegotiation(): void; - /** - * When enabled, TLS packet trace information is written to `stderr`. This can be - * used to debug TLS connection problems. - * - * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by - * OpenSSL's `SSL_trace()` function, the format is undocumented, can change - * without notice, and should not be relied on. - * @since v12.2.0 - */ - enableTrace(): void; - /** - * Returns the peer certificate as an `X509Certificate` object. - * - * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned. - * @since v15.9.0 - */ - getPeerX509Certificate(): X509Certificate | undefined; - /** - * Returns the local certificate as an `X509Certificate` object. - * - * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned. - * @since v15.9.0 - */ - getX509Certificate(): X509Certificate | undefined; - /** - * Keying material is used for validations to prevent different kind of attacks in - * network protocols, for example in the specifications of IEEE 802.1X. - * - * Example - * - * ```js - * const keyingMaterial = tlsSocket.exportKeyingMaterial( - * 128, - * 'client finished'); - * - * /* - * Example return value of keyingMaterial: - * - * - * ``` - * - * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more - * information. - * @since v13.10.0, v12.17.0 - * @param length number of bytes to retrieve from keying material - * @param label an application specific label, typically this will be a value from the [IANA Exporter Label - * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). - * @param context Optionally provide a context. - * @return requested bytes of the keying material - */ - exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer; - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - addListener(event: "secureConnect", listener: () => void): this; - addListener(event: "session", listener: (session: Buffer) => void): this; - addListener(event: "keylog", listener: (line: Buffer) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "OCSPResponse", response: Buffer): boolean; - emit(event: "secureConnect"): boolean; - emit(event: "session", session: Buffer): boolean; - emit(event: "keylog", line: Buffer): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "OCSPResponse", listener: (response: Buffer) => void): this; - on(event: "secureConnect", listener: () => void): this; - on(event: "session", listener: (session: Buffer) => void): this; - on(event: "keylog", listener: (line: Buffer) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "OCSPResponse", listener: (response: Buffer) => void): this; - once(event: "secureConnect", listener: () => void): this; - once(event: "session", listener: (session: Buffer) => void): this; - once(event: "keylog", listener: (line: Buffer) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependListener(event: "secureConnect", listener: () => void): this; - prependListener(event: "session", listener: (session: Buffer) => void): this; - prependListener(event: "keylog", listener: (line: Buffer) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependOnceListener(event: "secureConnect", listener: () => void): this; - prependOnceListener(event: "session", listener: (session: Buffer) => void): this; - prependOnceListener(event: "keylog", listener: (line: Buffer) => void): this; - } - interface CommonConnectionOptions { - /** - * An optional TLS context object from tls.createSecureContext() - */ - secureContext?: SecureContext | undefined; - /** - * When enabled, TLS packet trace information is written to `stderr`. This can be - * used to debug TLS connection problems. - * @default false - */ - enableTrace?: boolean | undefined; - /** - * If true the server will request a certificate from clients that - * connect and attempt to verify that certificate. Defaults to - * false. - */ - requestCert?: boolean | undefined; - /** - * An array of strings or a Buffer naming possible ALPN protocols. - * (Protocols should be ordered by their priority.) - */ - ALPNProtocols?: string[] | Uint8Array[] | Uint8Array | undefined; - /** - * SNICallback(servername, cb) A function that will be - * called if the client supports SNI TLS extension. Two arguments - * will be passed when called: servername and cb. SNICallback should - * invoke cb(null, ctx), where ctx is a SecureContext instance. - * (tls.createSecureContext(...) can be used to get a proper - * SecureContext.) If SNICallback wasn't provided the default callback - * with high-level API will be used (see below). - */ - SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined; - /** - * If true the server will reject any connection which is not - * authorized with the list of supplied CAs. This option only has an - * effect if requestCert is true. - * @default true - */ - rejectUnauthorized?: boolean | undefined; - } - interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts { - /** - * Abort the connection if the SSL/TLS handshake does not finish in the - * specified number of milliseconds. A 'tlsClientError' is emitted on - * the tls.Server object whenever a handshake times out. Default: - * 120000 (120 seconds). - */ - handshakeTimeout?: number | undefined; - /** - * The number of seconds after which a TLS session created by the - * server will no longer be resumable. See Session Resumption for more - * information. Default: 300. - */ - sessionTimeout?: number | undefined; - /** - * 48-bytes of cryptographically strong pseudo-random data. - */ - ticketKeys?: Buffer | undefined; - /** - * @param socket - * @param identity identity parameter sent from the client. - * @return pre-shared key that must either be - * a buffer or `null` to stop the negotiation process. Returned PSK must be - * compatible with the selected cipher's digest. - * - * When negotiating TLS-PSK (pre-shared keys), this function is called - * with the identity provided by the client. - * If the return value is `null` the negotiation process will stop and an - * "unknown_psk_identity" alert message will be sent to the other party. - * If the server wishes to hide the fact that the PSK identity was not known, - * the callback must provide some random data as `psk` to make the connection - * fail with "decrypt_error" before negotiation is finished. - * PSK ciphers are disabled by default, and using TLS-PSK thus - * requires explicitly specifying a cipher suite with the `ciphers` option. - * More information can be found in the RFC 4279. - */ - pskCallback?(socket: TLSSocket, identity: string): DataView | NodeJS.TypedArray | null; - /** - * hint to send to a client to help - * with selecting the identity during TLS-PSK negotiation. Will be ignored - * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be - * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code. - */ - pskIdentityHint?: string | undefined; - } - interface PSKCallbackNegotation { - psk: DataView | NodeJS.TypedArray; - identity: string; - } - interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { - host?: string | undefined; - port?: number | undefined; - path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. - socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket - checkServerIdentity?: typeof checkServerIdentity | undefined; - servername?: string | undefined; // SNI TLS Extension - session?: Buffer | undefined; - minDHSize?: number | undefined; - lookup?: net.LookupFunction | undefined; - timeout?: number | undefined; - /** - * When negotiating TLS-PSK (pre-shared keys), this function is called - * with optional identity `hint` provided by the server or `null` - * in case of TLS 1.3 where `hint` was removed. - * It will be necessary to provide a custom `tls.checkServerIdentity()` - * for the connection as the default one will try to check hostname/IP - * of the server against the certificate but that's not applicable for PSK - * because there won't be a certificate present. - * More information can be found in the RFC 4279. - * - * @param hint message sent from the server to help client - * decide which identity to use during negotiation. - * Always `null` if TLS 1.3 is used. - * @returns Return `null` to stop the negotiation process. `psk` must be - * compatible with the selected cipher's digest. - * `identity` must use UTF-8 encoding. - */ - pskCallback?(hint: string | null): PSKCallbackNegotation | null; - } - /** - * Accepts encrypted connections using TLS or SSL. - * @since v0.3.2 - */ - class Server extends net.Server { - constructor(secureConnectionListener?: (socket: TLSSocket) => void); - constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void); - /** - * The `server.addContext()` method adds a secure context that will be used if - * the client request's SNI name matches the supplied `hostname` (or wildcard). - * - * When there are multiple matching contexts, the most recently added one is - * used. - * @since v0.5.3 - * @param hostname A SNI host name or wildcard (e.g. `'*'`) - * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc), or a TLS context object created - * with {@link createSecureContext} itself. - */ - addContext(hostname: string, context: SecureContextOptions): void; - /** - * Returns the session ticket keys. - * - * See `Session Resumption` for more information. - * @since v3.0.0 - * @return A 48-byte buffer containing the session ticket keys. - */ - getTicketKeys(): Buffer; - /** - * The `server.setSecureContext()` method replaces the secure context of an - * existing server. Existing connections to the server are not interrupted. - * @since v11.0.0 - * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). - */ - setSecureContext(options: SecureContextOptions): void; - /** - * Sets the session ticket keys. - * - * Changes to the ticket keys are effective only for future server connections. - * Existing or currently pending server connections will use the previous keys. - * - * See `Session Resumption` for more information. - * @since v3.0.0 - * @param keys A 48-byte buffer containing the session ticket keys. - */ - setTicketKeys(keys: Buffer): void; - /** - * events.EventEmitter - * 1. tlsClientError - * 2. newSession - * 3. OCSPRequest - * 4. resumeSession - * 5. secureConnection - * 6. keylog - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - addListener( - event: "newSession", - listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void, - ): this; - addListener( - event: "OCSPRequest", - listener: ( - certificate: Buffer, - issuer: Buffer, - callback: (err: Error | null, resp: Buffer) => void, - ) => void, - ): this; - addListener( - event: "resumeSession", - listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void, - ): this; - addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; - emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: () => void): boolean; - emit( - event: "OCSPRequest", - certificate: Buffer, - issuer: Buffer, - callback: (err: Error | null, resp: Buffer) => void, - ): boolean; - emit( - event: "resumeSession", - sessionId: Buffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ): boolean; - emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; - emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this; - on( - event: "OCSPRequest", - listener: ( - certificate: Buffer, - issuer: Buffer, - callback: (err: Error | null, resp: Buffer) => void, - ) => void, - ): this; - on( - event: "resumeSession", - listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void, - ): this; - on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - once( - event: "newSession", - listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void, - ): this; - once( - event: "OCSPRequest", - listener: ( - certificate: Buffer, - issuer: Buffer, - callback: (err: Error | null, resp: Buffer) => void, - ) => void, - ): this; - once( - event: "resumeSession", - listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void, - ): this; - once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependListener( - event: "newSession", - listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void, - ): this; - prependListener( - event: "OCSPRequest", - listener: ( - certificate: Buffer, - issuer: Buffer, - callback: (err: Error | null, resp: Buffer) => void, - ) => void, - ): this; - prependListener( - event: "resumeSession", - listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void, - ): this; - prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependOnceListener( - event: "newSession", - listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void, - ): this; - prependOnceListener( - event: "OCSPRequest", - listener: ( - certificate: Buffer, - issuer: Buffer, - callback: (err: Error | null, resp: Buffer) => void, - ) => void, - ): this; - prependOnceListener( - event: "resumeSession", - listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void, - ): this; - prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - } - /** - * @deprecated since v0.11.3 Use `tls.TLSSocket` instead. - */ - interface SecurePair { - encrypted: TLSSocket; - cleartext: TLSSocket; - } - type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1"; - interface SecureContextOptions { - /** - * If set, this will be called when a client opens a connection using the ALPN extension. - * One argument will be passed to the callback: an object containing `servername` and `protocols` fields, - * respectively containing the server name from the SNI extension (if any) and an array of - * ALPN protocol name strings. The callback must return either one of the strings listed in `protocols`, - * which will be returned to the client as the selected ALPN protocol, or `undefined`, - * to reject the connection with a fatal alert. If a string is returned that does not match one of - * the client's ALPN protocols, an error will be thrown. - * This option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error. - */ - ALPNCallback?: ((arg: { servername: string; protocols: string[] }) => string | undefined) | undefined; - /** - * Treat intermediate (non-self-signed) - * certificates in the trust CA certificate list as trusted. - * @since v22.9.0, v20.18.0 - */ - allowPartialTrustChain?: boolean | undefined; - /** - * Optionally override the trusted CA certificates. Default is to trust - * the well-known CAs curated by Mozilla. Mozilla's CAs are completely - * replaced when CAs are explicitly specified using this option. - */ - ca?: string | Buffer | Array | undefined; - /** - * Cert chains in PEM format. One cert chain should be provided per - * private key. Each cert chain should consist of the PEM formatted - * certificate for a provided private key, followed by the PEM - * formatted intermediate certificates (if any), in order, and not - * including the root CA (the root CA must be pre-known to the peer, - * see ca). When providing multiple cert chains, they do not have to - * be in the same order as their private keys in key. If the - * intermediate certificates are not provided, the peer will not be - * able to validate the certificate, and the handshake will fail. - */ - cert?: string | Buffer | Array | undefined; - /** - * Colon-separated list of supported signature algorithms. The list - * can contain digest algorithms (SHA256, MD5 etc.), public key - * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g - * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512). - */ - sigalgs?: string | undefined; - /** - * Cipher suite specification, replacing the default. For more - * information, see modifying the default cipher suite. Permitted - * ciphers can be obtained via tls.getCiphers(). Cipher names must be - * uppercased in order for OpenSSL to accept them. - */ - ciphers?: string | undefined; - /** - * Name of an OpenSSL engine which can provide the client certificate. - * @deprecated - */ - clientCertEngine?: string | undefined; - /** - * PEM formatted CRLs (Certificate Revocation Lists). - */ - crl?: string | Buffer | Array | undefined; - /** - * `'auto'` or custom Diffie-Hellman parameters, required for non-ECDHE perfect forward secrecy. - * If omitted or invalid, the parameters are silently discarded and DHE ciphers will not be available. - * ECDHE-based perfect forward secrecy will still be available. - */ - dhparam?: string | Buffer | undefined; - /** - * A string describing a named curve or a colon separated list of curve - * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key - * agreement. Set to auto to select the curve automatically. Use - * crypto.getCurves() to obtain a list of available curve names. On - * recent releases, openssl ecparam -list_curves will also display the - * name and description of each available elliptic curve. Default: - * tls.DEFAULT_ECDH_CURVE. - */ - ecdhCurve?: string | undefined; - /** - * Attempt to use the server's cipher suite preferences instead of the - * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be - * set in secureOptions - */ - honorCipherOrder?: boolean | undefined; - /** - * Private keys in PEM format. PEM allows the option of private keys - * being encrypted. Encrypted keys will be decrypted with - * options.passphrase. Multiple keys using different algorithms can be - * provided either as an array of unencrypted key strings or buffers, - * or an array of objects in the form {pem: [, - * passphrase: ]}. The object form can only occur in an array. - * object.passphrase is optional. Encrypted keys will be decrypted with - * object.passphrase if provided, or options.passphrase if it is not. - */ - key?: string | Buffer | Array | undefined; - /** - * Name of an OpenSSL engine to get private key from. Should be used - * together with privateKeyIdentifier. - * @deprecated - */ - privateKeyEngine?: string | undefined; - /** - * Identifier of a private key managed by an OpenSSL engine. Should be - * used together with privateKeyEngine. Should not be set together with - * key, because both options define a private key in different ways. - * @deprecated - */ - privateKeyIdentifier?: string | undefined; - /** - * Optionally set the maximum TLS version to allow. One - * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the - * `secureProtocol` option, use one or the other. - * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using - * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to - * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. - */ - maxVersion?: SecureVersion | undefined; - /** - * Optionally set the minimum TLS version to allow. One - * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the - * `secureProtocol` option, use one or the other. It is not recommended to use - * less than TLSv1.2, but it may be required for interoperability. - * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using - * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to - * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to - * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. - */ - minVersion?: SecureVersion | undefined; - /** - * Shared passphrase used for a single private key and/or a PFX. - */ - passphrase?: string | undefined; - /** - * PFX or PKCS12 encoded private key and certificate chain. pfx is an - * alternative to providing key and cert individually. PFX is usually - * encrypted, if it is, passphrase will be used to decrypt it. Multiple - * PFX can be provided either as an array of unencrypted PFX buffers, - * or an array of objects in the form {buf: [, - * passphrase: ]}. The object form can only occur in an array. - * object.passphrase is optional. Encrypted PFX will be decrypted with - * object.passphrase if provided, or options.passphrase if it is not. - */ - pfx?: string | Buffer | Array | undefined; - /** - * Optionally affect the OpenSSL protocol behavior, which is not - * usually necessary. This should be used carefully if at all! Value is - * a numeric bitmask of the SSL_OP_* options from OpenSSL Options - */ - secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options - /** - * Legacy mechanism to select the TLS protocol version to use, it does - * not support independent control of the minimum and maximum version, - * and does not support limiting the protocol to TLSv1.3. Use - * minVersion and maxVersion instead. The possible values are listed as - * SSL_METHODS, use the function names as strings. For example, use - * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow - * any TLS protocol version up to TLSv1.3. It is not recommended to use - * TLS versions less than 1.2, but it may be required for - * interoperability. Default: none, see minVersion. - */ - secureProtocol?: string | undefined; - /** - * Opaque identifier used by servers to ensure session state is not - * shared between applications. Unused by clients. - */ - sessionIdContext?: string | undefined; - /** - * 48-bytes of cryptographically strong pseudo-random data. - * See Session Resumption for more information. - */ - ticketKeys?: Buffer | undefined; - /** - * The number of seconds after which a TLS session created by the - * server will no longer be resumable. See Session Resumption for more - * information. Default: 300. - */ - sessionTimeout?: number | undefined; - } - interface SecureContext { - context: any; - } - /** - * Verifies the certificate `cert` is issued to `hostname`. - * - * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on - * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type). - * - * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as - * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead. - * - * This function can be overwritten by providing an alternative function as the `options.checkServerIdentity` option that is passed to `tls.connect()`. The - * overwriting function can call `tls.checkServerIdentity()` of course, to augment - * the checks done with additional verification. - * - * This function is only called if the certificate passed all other checks, such as - * being issued by trusted CA (`options.ca`). - * - * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name - * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use - * a custom `options.checkServerIdentity` function that implements the desired behavior. - * @since v0.8.4 - * @param hostname The host name or IP address to verify the certificate against. - * @param cert A `certificate object` representing the peer's certificate. - */ - function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined; - /** - * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is - * automatically set as a listener for the `'secureConnection'` event. - * - * The `ticketKeys` options is automatically shared between `node:cluster` module - * workers. - * - * The following illustrates a simple echo server: - * - * ```js - * import tls from 'node:tls'; - * import fs from 'node:fs'; - * - * const options = { - * key: fs.readFileSync('server-key.pem'), - * cert: fs.readFileSync('server-cert.pem'), - * - * // This is necessary only if using client certificate authentication. - * requestCert: true, - * - * // This is necessary only if the client uses a self-signed certificate. - * ca: [ fs.readFileSync('client-cert.pem') ], - * }; - * - * const server = tls.createServer(options, (socket) => { - * console.log('server connected', - * socket.authorized ? 'authorized' : 'unauthorized'); - * socket.write('welcome!\n'); - * socket.setEncoding('utf8'); - * socket.pipe(socket); - * }); - * server.listen(8000, () => { - * console.log('server bound'); - * }); - * ``` - * - * The server can be tested by connecting to it using the example client from {@link connect}. - * @since v0.3.2 - */ - function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; - function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; - /** - * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event. - * - * `tls.connect()` returns a {@link TLSSocket} object. - * - * Unlike the `https` API, `tls.connect()` does not enable the - * SNI (Server Name Indication) extension by default, which may cause some - * servers to return an incorrect certificate or reject the connection - * altogether. To enable SNI, set the `servername` option in addition - * to `host`. - * - * The following illustrates a client for the echo server example from {@link createServer}: - * - * ```js - * // Assumes an echo server that is listening on port 8000. - * import tls from 'node:tls'; - * import fs from 'node:fs'; - * - * const options = { - * // Necessary only if the server requires client certificate authentication. - * key: fs.readFileSync('client-key.pem'), - * cert: fs.readFileSync('client-cert.pem'), - * - * // Necessary only if the server uses a self-signed certificate. - * ca: [ fs.readFileSync('server-cert.pem') ], - * - * // Necessary only if the server's cert isn't for "localhost". - * checkServerIdentity: () => { return null; }, - * }; - * - * const socket = tls.connect(8000, options, () => { - * console.log('client connected', - * socket.authorized ? 'authorized' : 'unauthorized'); - * process.stdin.pipe(socket); - * process.stdin.resume(); - * }); - * socket.setEncoding('utf8'); - * socket.on('data', (data) => { - * console.log(data); - * }); - * socket.on('end', () => { - * console.log('server ends connection'); - * }); - * ``` - * @since v0.11.3 - */ - function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - function connect( - port: number, - host?: string, - options?: ConnectionOptions, - secureConnectListener?: () => void, - ): TLSSocket; - function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - /** - * Creates a new secure pair object with two streams, one of which reads and writes - * the encrypted data and the other of which reads and writes the cleartext data. - * Generally, the encrypted stream is piped to/from an incoming encrypted data - * stream and the cleartext one is used as a replacement for the initial encrypted - * stream. - * - * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and `encrypted` stream properties. - * - * Using `cleartext` has the same API as {@link TLSSocket}. - * - * The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code: - * - * ```js - * pair = tls.createSecurePair(// ... ); - * pair.encrypted.pipe(socket); - * socket.pipe(pair.encrypted); - * ``` - * - * can be replaced by: - * - * ```js - * secureSocket = tls.TLSSocket(socket, options); - * ``` - * - * where `secureSocket` has the same API as `pair.cleartext`. - * @since v0.3.2 - * @deprecated Since v0.11.3 - Use {@link TLSSocket} instead. - * @param context A secure context object as returned by `tls.createSecureContext()` - * @param isServer `true` to specify that this TLS connection should be opened as a server. - * @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`. - * @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`. - */ - function createSecurePair( - context?: SecureContext, - isServer?: boolean, - requestCert?: boolean, - rejectUnauthorized?: boolean, - ): SecurePair; - /** - * `{@link createServer}` sets the default value of the `honorCipherOrder` option - * to `true`, other APIs that create secure contexts leave it unset. - * - * `{@link createServer}` uses a 128 bit truncated SHA1 hash value generated - * from `process.argv` as the default value of the `sessionIdContext` option, other - * APIs that create secure contexts have no default value. - * - * The `tls.createSecureContext()` method creates a `SecureContext` object. It is - * usable as an argument to several `tls` APIs, such as `server.addContext()`, - * but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option. - * - * A key is _required_ for ciphers that use certificates. Either `key` or `pfx` can be used to provide it. - * - * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of - * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt). - * - * Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto' `option. When set to `'auto'`, well-known DHE parameters of sufficient strength - * will be selected automatically. Otherwise, if necessary, `openssl dhparam` can - * be used to create custom parameters. The key length must be greater than or - * equal to 1024 bits or else an error will be thrown. Although 1024 bits is - * permissible, use 2048 bits or larger for stronger security. - * @since v0.11.13 - */ - function createSecureContext(options?: SecureContextOptions): SecureContext; - /** - * Returns an array with the names of the supported TLS ciphers. The names are - * lower-case for historical reasons, but must be uppercased to be used in - * the `ciphers` option of `{@link createSecureContext}`. - * - * Not all supported ciphers are enabled by default. See - * [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v22.x/api/tls.html#modifying-the-default-tls-cipher-suite). - * - * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for - * TLSv1.2 and below. - * - * ```js - * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...] - * ``` - * @since v0.10.2 - */ - function getCiphers(): string[]; - /** - * The default curve name to use for ECDH key agreement in a tls server. - * The default value is `'auto'`. See `{@link createSecureContext()}` for further - * information. - * @since v0.11.13 - */ - let DEFAULT_ECDH_CURVE: string; - /** - * The default value of the `maxVersion` option of `{@link createSecureContext()}`. - * It can be assigned any of the supported TLS protocol versions, - * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.3'`, unless - * changed using CLI options. Using `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using - * `--tls-max-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options - * are provided, the highest maximum is used. - * @since v11.4.0 - */ - let DEFAULT_MAX_VERSION: SecureVersion; - /** - * The default value of the `minVersion` option of `{@link createSecureContext()}`. - * It can be assigned any of the supported TLS protocol versions, - * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.2'`, unless - * changed using CLI options. Using `--tls-min-v1.0` sets the default to - * `'TLSv1'`. Using `--tls-min-v1.1` sets the default to `'TLSv1.1'`. Using - * `--tls-min-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options - * are provided, the lowest minimum is used. - * @since v11.4.0 - */ - let DEFAULT_MIN_VERSION: SecureVersion; - /** - * The default value of the `ciphers` option of `{@link createSecureContext()}`. - * It can be assigned any of the supported OpenSSL ciphers. - * Defaults to the content of `crypto.constants.defaultCoreCipherList`, unless - * changed using CLI options using `--tls-default-ciphers`. - * @since v19.8.0 - */ - let DEFAULT_CIPHERS: string; - /** - * An immutable array of strings representing the root certificates (in PEM format) - * from the bundled Mozilla CA store as supplied by the current Node.js version. - * - * The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store - * that is fixed at release time. It is identical on all supported platforms. - * @since v12.3.0 - */ - const rootCertificates: readonly string[]; -} -declare module "node:tls" { - export * from "tls"; -} diff --git a/web/static/node_modules/@types/node/trace_events.d.ts b/web/static/node_modules/@types/node/trace_events.d.ts deleted file mode 100644 index f334b0bc..00000000 --- a/web/static/node_modules/@types/node/trace_events.d.ts +++ /dev/null @@ -1,197 +0,0 @@ -/** - * The `node:trace_events` module provides a mechanism to centralize tracing information - * generated by V8, Node.js core, and userspace code. - * - * Tracing can be enabled with the `--trace-event-categories` command-line flag - * or by using the `trace_events` module. The `--trace-event-categories` flag - * accepts a list of comma-separated category names. - * - * The available categories are: - * - * * `node`: An empty placeholder. - * * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html) trace data. - * The [`async_hooks`](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property. - * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones. - * * `node.console`: Enables capture of `console.time()` and `console.count()` output. - * * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`. - * * `node.threadpoolwork.async`: Enables capture of trace data for threadpool asynchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`. - * * `node.dns.native`: Enables capture of trace data for DNS queries. - * * `node.net.native`: Enables capture of trace data for network. - * * `node.environment`: Enables capture of Node.js Environment milestones. - * * `node.fs.sync`: Enables capture of trace data for file system sync methods. - * * `node.fs_dir.sync`: Enables capture of trace data for file system sync directory methods. - * * `node.fs.async`: Enables capture of trace data for file system async methods. - * * `node.fs_dir.async`: Enables capture of trace data for file system async directory methods. - * * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v22.x/api/perf_hooks.html) measurements. - * * `node.perf.usertiming`: Enables capture of only Performance API User Timing - * measures and marks. - * * `node.perf.timerify`: Enables capture of only Performance API timerify - * measurements. - * * `node.promises.rejections`: Enables capture of trace data tracking the number - * of unhandled Promise rejections and handled-after-rejections. - * * `node.vm.script`: Enables capture of trace data for the `node:vm` module's `runInNewContext()`, `runInContext()`, and `runInThisContext()` methods. - * * `v8`: The [V8](https://nodejs.org/docs/latest-v22.x/api/v8.html) events are GC, compiling, and execution related. - * * `node.http`: Enables capture of trace data for http request / response. - * - * By default the `node`, `node.async_hooks`, and `v8` categories are enabled. - * - * ```bash - * node --trace-event-categories v8,node,node.async_hooks server.js - * ``` - * - * Prior versions of Node.js required the use of the `--trace-events-enabled` flag to enable trace events. This requirement has been removed. However, the `--trace-events-enabled` flag _may_ still be - * used and will enable the `node`, `node.async_hooks`, and `v8` trace event categories by default. - * - * ```bash - * node --trace-events-enabled - * - * # is equivalent to - * - * node --trace-event-categories v8,node,node.async_hooks - * ``` - * - * Alternatively, trace events may be enabled using the `node:trace_events` module: - * - * ```js - * import trace_events from 'node:trace_events'; - * const tracing = trace_events.createTracing({ categories: ['node.perf'] }); - * tracing.enable(); // Enable trace event capture for the 'node.perf' category - * - * // do work - * - * tracing.disable(); // Disable trace event capture for the 'node.perf' category - * ``` - * - * Running Node.js with tracing enabled will produce log files that can be opened - * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome. - * - * The logging file is by default called `node_trace.${rotation}.log`, where `${rotation}` is an incrementing log-rotation id. The filepath pattern can - * be specified with `--trace-event-file-pattern` that accepts a template - * string that supports `${rotation}` and `${pid}`: - * - * ```bash - * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js - * ``` - * - * To guarantee that the log file is properly generated after signal events like `SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers - * in your code, such as: - * - * ```js - * process.on('SIGINT', function onSigint() { - * console.info('Received SIGINT.'); - * process.exit(130); // Or applicable exit code depending on OS and signal - * }); - * ``` - * - * The tracing system uses the same time source - * as the one used by `process.hrtime()`. - * However the trace-event timestamps are expressed in microseconds, - * unlike `process.hrtime()` which returns nanoseconds. - * - * The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html#class-worker) threads. - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/trace_events.js) - */ -declare module "trace_events" { - /** - * The `Tracing` object is used to enable or disable tracing for sets of - * categories. Instances are created using the - * `trace_events.createTracing()` method. - * - * When created, the `Tracing` object is disabled. Calling the - * `tracing.enable()` method adds the categories to the set of enabled trace - * event categories. Calling `tracing.disable()` will remove the categories - * from the set of enabled trace event categories. - */ - interface Tracing { - /** - * A comma-separated list of the trace event categories covered by this - * `Tracing` object. - * @since v10.0.0 - */ - readonly categories: string; - /** - * Disables this `Tracing` object. - * - * Only trace event categories _not_ covered by other enabled `Tracing` - * objects and _not_ specified by the `--trace-event-categories` flag - * will be disabled. - * - * ```js - * import trace_events from 'node:trace_events'; - * const t1 = trace_events.createTracing({ categories: ['node', 'v8'] }); - * const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] }); - * t1.enable(); - * t2.enable(); - * - * // Prints 'node,node.perf,v8' - * console.log(trace_events.getEnabledCategories()); - * - * t2.disable(); // Will only disable emission of the 'node.perf' category - * - * // Prints 'node,v8' - * console.log(trace_events.getEnabledCategories()); - * ``` - * @since v10.0.0 - */ - disable(): void; - /** - * Enables this `Tracing` object for the set of categories covered by - * the `Tracing` object. - * @since v10.0.0 - */ - enable(): void; - /** - * `true` only if the `Tracing` object has been enabled. - * @since v10.0.0 - */ - readonly enabled: boolean; - } - interface CreateTracingOptions { - /** - * An array of trace category names. Values included in the array are - * coerced to a string when possible. An error will be thrown if the - * value cannot be coerced. - */ - categories: string[]; - } - /** - * Creates and returns a `Tracing` object for the given set of `categories`. - * - * ```js - * import trace_events from 'node:trace_events'; - * const categories = ['node.perf', 'node.async_hooks']; - * const tracing = trace_events.createTracing({ categories }); - * tracing.enable(); - * // do stuff - * tracing.disable(); - * ``` - * @since v10.0.0 - */ - function createTracing(options: CreateTracingOptions): Tracing; - /** - * Returns a comma-separated list of all currently-enabled trace event - * categories. The current set of enabled trace event categories is determined - * by the _union_ of all currently-enabled `Tracing` objects and any categories - * enabled using the `--trace-event-categories` flag. - * - * Given the file `test.js` below, the command `node --trace-event-categories node.perf test.js` will print `'node.async_hooks,node.perf'` to the console. - * - * ```js - * import trace_events from 'node:trace_events'; - * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); - * const t2 = trace_events.createTracing({ categories: ['node.perf'] }); - * const t3 = trace_events.createTracing({ categories: ['v8'] }); - * - * t1.enable(); - * t2.enable(); - * - * console.log(trace_events.getEnabledCategories()); - * ``` - * @since v10.0.0 - */ - function getEnabledCategories(): string | undefined; -} -declare module "node:trace_events" { - export * from "trace_events"; -} diff --git a/web/static/node_modules/@types/node/ts5.6/buffer.buffer.d.ts b/web/static/node_modules/@types/node/ts5.6/buffer.buffer.d.ts deleted file mode 100644 index 21f72115..00000000 --- a/web/static/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +++ /dev/null @@ -1,385 +0,0 @@ -declare module "buffer" { - global { - interface BufferConstructor { - // see ../buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. - */ - new(str: string, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). - */ - new(size: number): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - new(array: Uint8Array): Buffer; - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}/{SharedArrayBuffer}. - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. - */ - new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - new(array: readonly any[]): Buffer; - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. - */ - new(buffer: Buffer): Buffer; - /** - * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. - * Array entries outside that range will be truncated to fit into it. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. - * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); - * ``` - * - * If `array` is an `Array`\-like object (that is, one with a `length` property of - * type `number`), it is treated as if it is an array, unless it is a `Buffer` or - * a `Uint8Array`. This means all other `TypedArray` variants get treated as an `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use `Buffer.copyBytesFrom()`. - * - * A `TypeError` will be thrown if `array` is not an `Array` or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v5.10.0 - */ - from( - arrayBuffer: WithImplicitCoercion, - byteOffset?: number, - length?: number, - ): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param data data to create a new Buffer - */ - from(data: Uint8Array | readonly number[]): Buffer; - from(data: WithImplicitCoercion): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - */ - from( - str: - | WithImplicitCoercion - | { - [Symbol.toPrimitive](hint: "string"): string; - }, - encoding?: BufferEncoding, - ): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param values to create a new Buffer - */ - of(...items: number[]): Buffer; - /** - * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. - * - * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. - * - * If `totalLength` is not provided, it is calculated from the `Buffer` instances - * in `list` by adding their lengths. - * - * If `totalLength` is provided, it is coerced to an unsigned integer. If the - * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is - * truncated to `totalLength`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a single `Buffer` from a list of three `Buffer` instances. - * - * const buf1 = Buffer.alloc(10); - * const buf2 = Buffer.alloc(14); - * const buf3 = Buffer.alloc(18); - * const totalLength = buf1.length + buf2.length + buf3.length; - * - * console.log(totalLength); - * // Prints: 42 - * - * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); - * - * console.log(bufA); - * // Prints: - * console.log(bufA.length); - * // Prints: 42 - * ``` - * - * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v0.7.11 - * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. - * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. - */ - concat(list: readonly Uint8Array[], totalLength?: number): Buffer; - /** - * Copies the underlying memory of `view` into a new `Buffer`. - * - * ```js - * const u16 = new Uint16Array([0, 0xffff]); - * const buf = Buffer.copyBytesFrom(u16, 1, 1); - * u16[1] = 0; - * console.log(buf.length); // 2 - * console.log(buf[0]); // 255 - * console.log(buf[1]); // 255 - * ``` - * @since v19.8.0 - * @param view The {TypedArray} to copy. - * @param [offset=0] The starting offset within `view`. - * @param [length=view.length - offset] The number of elements from `view` to copy. - */ - copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5); - * - * console.log(buf); - * // Prints: - * ``` - * - * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5, 'a'); - * - * console.log(buf); - * // Prints: - * ``` - * - * If both `fill` and `encoding` are specified, the allocated `Buffer` will be - * initialized by calling `buf.fill(fill, encoding)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); - * - * console.log(buf); - * // Prints: - * ``` - * - * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance - * contents will never contain sensitive data from previous allocations, including - * data that might not have been allocated for `Buffer`s. - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - * @param [fill=0] A value to pre-fill the new `Buffer` with. - * @param [encoding='utf8'] If `fill` is a string, this is its encoding. - */ - alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(10); - * - * console.log(buf); - * // Prints (contents may vary): - * - * buf.fill(0); - * - * console.log(buf); - * // Prints: - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * - * The `Buffer` module pre-allocates an internal `Buffer` instance of - * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, - * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). - * - * Use of this pre-allocated internal memory pool is a key difference between - * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. - * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less - * than or equal to half `Buffer.poolSize`. The - * difference is subtle but can be important when an application requires the - * additional performance that `Buffer.allocUnsafe()` provides. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafe(size: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if - * `size` is 0. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize - * such `Buffer` instances with zeroes. - * - * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, - * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This - * allows applications to avoid the garbage collection overhead of creating many - * individually allocated `Buffer` instances. This approach improves both - * performance and memory usage by eliminating the need to track and clean up as - * many individual `ArrayBuffer` objects. - * - * However, in the case where a developer may need to retain a small chunk of - * memory from a pool for an indeterminate amount of time, it may be appropriate - * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and - * then copying out the relevant bits. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Need to keep around a few small chunks of memory. - * const store = []; - * - * socket.on('readable', () => { - * let data; - * while (null !== (data = readable.read())) { - * // Allocate for retained data. - * const sb = Buffer.allocUnsafeSlow(10); - * - * // Copy the data into the new allocation. - * data.copy(sb, 0, 0, 10); - * - * store.push(sb); - * } - * }); - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.12.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafeSlow(size: number): Buffer; - } - interface Buffer extends Uint8Array { - // see ../buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * This method is not compatible with the `Uint8Array.prototype.slice()`, - * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * const copiedBuf = Uint8Array.prototype.slice.call(buf); - * copiedBuf[0]++; - * console.log(copiedBuf.toString()); - * // Prints: cuffer - * - * console.log(buf.toString()); - * // Prints: buffer - * - * // With buf.slice(), the original buffer is modified. - * const notReallyCopiedBuf = buf.slice(); - * notReallyCopiedBuf[0]++; - * console.log(notReallyCopiedBuf.toString()); - * // Prints: cuffer - * console.log(buf.toString()); - * // Also prints: cuffer (!) - * ``` - * @since v0.3.0 - * @deprecated Use `subarray` instead. - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - slice(start?: number, end?: number): Buffer; - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * Specifying `end` greater than `buf.length` will return the same result as - * that of `end` equal to `buf.length`. - * - * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). - * - * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte - * // from the original `Buffer`. - * - * const buf1 = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * const buf2 = buf1.subarray(0, 3); - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: abc - * - * buf1[0] = 33; - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: !bc - * ``` - * - * Specifying negative indexes causes the slice to be generated relative to the - * end of `buf` rather than the beginning. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * console.log(buf.subarray(-6, -1).toString()); - * // Prints: buffe - * // (Equivalent to buf.subarray(0, 5).) - * - * console.log(buf.subarray(-6, -2).toString()); - * // Prints: buff - * // (Equivalent to buf.subarray(0, 4).) - * - * console.log(buf.subarray(-5, -2).toString()); - * // Prints: uff - * // (Equivalent to buf.subarray(1, 4).) - * ``` - * @since v3.0.0 - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - subarray(start?: number, end?: number): Buffer; - } - } -} diff --git a/web/static/node_modules/@types/node/ts5.6/globals.typedarray.d.ts b/web/static/node_modules/@types/node/ts5.6/globals.typedarray.d.ts deleted file mode 100644 index 0e4633b9..00000000 --- a/web/static/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export {}; // Make this a module - -declare global { - namespace NodeJS { - type TypedArray = - | Uint8Array - | Uint8ClampedArray - | Uint16Array - | Uint32Array - | Int8Array - | Int16Array - | Int32Array - | BigUint64Array - | BigInt64Array - | Float32Array - | Float64Array; - type ArrayBufferView = TypedArray | DataView; - } -} diff --git a/web/static/node_modules/@types/node/ts5.6/index.d.ts b/web/static/node_modules/@types/node/ts5.6/index.d.ts deleted file mode 100644 index 96c9532a..00000000 --- a/web/static/node_modules/@types/node/ts5.6/index.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -// NOTE: These definitions support Node.js and TypeScript 4.9 through 5.6. - -// Reference required TypeScript libs: -/// - -// TypeScript backwards-compatibility definitions: -/// - -// Definitions specific to TypeScript 4.9 through 5.6: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/web/static/node_modules/@types/node/tty.d.ts b/web/static/node_modules/@types/node/tty.d.ts deleted file mode 100644 index f5679466..00000000 --- a/web/static/node_modules/@types/node/tty.d.ts +++ /dev/null @@ -1,208 +0,0 @@ -/** - * The `node:tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes. In most cases, it will not be necessary or possible to use this module - * directly. However, it can be accessed using: - * - * ```js - * import tty from 'node:tty'; - * ``` - * - * When Node.js detects that it is being run with a text terminal ("TTY") - * attached, `process.stdin` will, by default, be initialized as an instance of `tty.ReadStream` and both `process.stdout` and `process.stderr` will, by - * default, be instances of `tty.WriteStream`. The preferred method of determining - * whether Node.js is being run within a TTY context is to check that the value of - * the `process.stdout.isTTY` property is `true`: - * - * ```console - * $ node -p -e "Boolean(process.stdout.isTTY)" - * true - * $ node -p -e "Boolean(process.stdout.isTTY)" | cat - * false - * ``` - * - * In most cases, there should be little to no reason for an application to - * manually create instances of the `tty.ReadStream` and `tty.WriteStream` classes. - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/tty.js) - */ -declare module "tty" { - import * as net from "node:net"; - /** - * The `tty.isatty()` method returns `true` if the given `fd` is associated with - * a TTY and `false` if it is not, including whenever `fd` is not a non-negative - * integer. - * @since v0.5.8 - * @param fd A numeric file descriptor - */ - function isatty(fd: number): boolean; - /** - * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js - * process and there should be no reason to create additional instances. - * @since v0.5.8 - */ - class ReadStream extends net.Socket { - constructor(fd: number, options?: net.SocketConstructorOpts); - /** - * A `boolean` that is `true` if the TTY is currently configured to operate as a - * raw device. - * - * This flag is always `false` when a process starts, even if the terminal is - * operating in raw mode. Its value will change with subsequent calls to `setRawMode`. - * @since v0.7.7 - */ - isRaw: boolean; - /** - * Allows configuration of `tty.ReadStream` so that it operates as a raw device. - * - * When in raw mode, input is always available character-by-character, not - * including modifiers. Additionally, all special processing of characters by the - * terminal is disabled, including echoing input - * characters. Ctrl+C will no longer cause a `SIGINT` when - * in this mode. - * @since v0.7.7 - * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw` - * property will be set to the resulting mode. - * @return The read stream instance. - */ - setRawMode(mode: boolean): this; - /** - * A `boolean` that is always `true` for `tty.ReadStream` instances. - * @since v0.5.8 - */ - isTTY: boolean; - } - /** - * -1 - to the left from cursor - * 0 - the entire line - * 1 - to the right from cursor - */ - type Direction = -1 | 0 | 1; - /** - * Represents the writable side of a TTY. In normal circumstances, `process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there - * should be no reason to create additional instances. - * @since v0.5.8 - */ - class WriteStream extends net.Socket { - constructor(fd: number); - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "resize", listener: () => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "resize"): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "resize", listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "resize", listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "resize", listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "resize", listener: () => void): this; - /** - * `writeStream.clearLine()` clears the current line of this `WriteStream` in a - * direction identified by `dir`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - clearLine(dir: Direction, callback?: () => void): boolean; - /** - * `writeStream.clearScreenDown()` clears this `WriteStream` from the current - * cursor down. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - clearScreenDown(callback?: () => void): boolean; - /** - * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified - * position. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - cursorTo(x: number, y?: number, callback?: () => void): boolean; - cursorTo(x: number, callback: () => void): boolean; - /** - * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its - * current position. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - moveCursor(dx: number, dy: number, callback?: () => void): boolean; - /** - * Returns: - * - * * `1` for 2, - * * `4` for 16, - * * `8` for 256, - * * `24` for 16,777,216 colors supported. - * - * Use this to determine what colors the terminal supports. Due to the nature of - * colors in terminals it is possible to either have false positives or false - * negatives. It depends on process information and the environment variables that - * may lie about what terminal is used. - * It is possible to pass in an `env` object to simulate the usage of a specific - * terminal. This can be useful to check how specific environment settings behave. - * - * To enforce a specific color support, use one of the below environment settings. - * - * * 2 colors: `FORCE_COLOR = 0` (Disables colors) - * * 16 colors: `FORCE_COLOR = 1` - * * 256 colors: `FORCE_COLOR = 2` - * * 16,777,216 colors: `FORCE_COLOR = 3` - * - * Disabling color support is also possible by using the `NO_COLOR` and `NODE_DISABLE_COLORS` environment variables. - * @since v9.9.0 - * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. - */ - getColorDepth(env?: object): number; - /** - * Returns `true` if the `writeStream` supports at least as many colors as provided - * in `count`. Minimum support is 2 (black and white). - * - * This has the same false positives and negatives as described in `writeStream.getColorDepth()`. - * - * ```js - * process.stdout.hasColors(); - * // Returns true or false depending on if `stdout` supports at least 16 colors. - * process.stdout.hasColors(256); - * // Returns true or false depending on if `stdout` supports at least 256 colors. - * process.stdout.hasColors({ TMUX: '1' }); - * // Returns true. - * process.stdout.hasColors(2 ** 24, { TMUX: '1' }); - * // Returns false (the environment setting pretends to support 2 ** 8 colors). - * ``` - * @since v11.13.0, v10.16.0 - * @param [count=16] The number of colors that are requested (minimum 2). - * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. - */ - hasColors(count?: number): boolean; - hasColors(env?: object): boolean; - hasColors(count: number, env?: object): boolean; - /** - * `writeStream.getWindowSize()` returns the size of the TTY - * corresponding to this `WriteStream`. The array is of the type `[numColumns, numRows]` where `numColumns` and `numRows` represent the number - * of columns and rows in the corresponding TTY. - * @since v0.7.7 - */ - getWindowSize(): [number, number]; - /** - * A `number` specifying the number of columns the TTY currently has. This property - * is updated whenever the `'resize'` event is emitted. - * @since v0.7.7 - */ - columns: number; - /** - * A `number` specifying the number of rows the TTY currently has. This property - * is updated whenever the `'resize'` event is emitted. - * @since v0.7.7 - */ - rows: number; - /** - * A `boolean` that is always `true`. - * @since v0.5.8 - */ - isTTY: boolean; - } -} -declare module "node:tty" { - export * from "tty"; -} diff --git a/web/static/node_modules/@types/node/url.d.ts b/web/static/node_modules/@types/node/url.d.ts deleted file mode 100644 index 72232c7a..00000000 --- a/web/static/node_modules/@types/node/url.d.ts +++ /dev/null @@ -1,972 +0,0 @@ -/** - * The `node:url` module provides utilities for URL resolution and parsing. It can - * be accessed using: - * - * ```js - * import url from 'node:url'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/url.js) - */ -declare module "url" { - import { Blob as NodeBlob } from "node:buffer"; - import { ClientRequestArgs } from "node:http"; - import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring"; - // Input to `url.format` - interface UrlObject { - auth?: string | null | undefined; - hash?: string | null | undefined; - host?: string | null | undefined; - hostname?: string | null | undefined; - href?: string | null | undefined; - pathname?: string | null | undefined; - protocol?: string | null | undefined; - search?: string | null | undefined; - slashes?: boolean | null | undefined; - port?: string | number | null | undefined; - query?: string | null | ParsedUrlQueryInput | undefined; - } - // Output of `url.parse` - interface Url { - auth: string | null; - hash: string | null; - host: string | null; - hostname: string | null; - href: string; - path: string | null; - pathname: string | null; - protocol: string | null; - search: string | null; - slashes: boolean | null; - port: string | null; - query: string | null | ParsedUrlQuery; - } - interface UrlWithParsedQuery extends Url { - query: ParsedUrlQuery; - } - interface UrlWithStringQuery extends Url { - query: string | null; - } - interface FileUrlToPathOptions { - /** - * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. - * @default undefined - * @since v22.1.0 - */ - windows?: boolean | undefined; - } - interface PathToFileUrlOptions { - /** - * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. - * @default undefined - * @since v22.1.0 - */ - windows?: boolean | undefined; - } - /** - * The `url.parse()` method takes a URL string, parses it, and returns a URL - * object. - * - * A `TypeError` is thrown if `urlString` is not a string. - * - * A `URIError` is thrown if the `auth` property is present but cannot be decoded. - * - * `url.parse()` uses a lenient, non-standard algorithm for parsing URL - * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted - * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the `WHATWG URL` API instead. - * @since v0.1.25 - * @deprecated Use the WHATWG URL API instead. - * @param urlString The URL string to parse. - * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property - * on the returned URL object will be an unparsed, undecoded string. - * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the - * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`. - */ - function parse(urlString: string): UrlWithStringQuery; - function parse( - urlString: string, - parseQueryString: false | undefined, - slashesDenoteHost?: boolean, - ): UrlWithStringQuery; - function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; - function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; - /** - * The `url.format()` method returns a formatted URL string derived from `urlObject`. - * - * ```js - * import url from 'node:url'; - * url.format({ - * protocol: 'https', - * hostname: 'example.com', - * pathname: '/some/path', - * query: { - * page: 1, - * format: 'json', - * }, - * }); - * - * // => 'https://example.com/some/path?page=1&format=json' - * ``` - * - * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. - * - * The formatting process operates as follows: - * - * * A new empty string `result` is created. - * * If `urlObject.protocol` is a string, it is appended as-is to `result`. - * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. - * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII - * colon (`:`) character, the literal string `:` will be appended to `result`. - * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: - * * `urlObject.slashes` property is true; - * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; - * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string - * and appended to `result` followed by the literal string `@`. - * * If the `urlObject.host` property is `undefined` then: - * * If the `urlObject.hostname` is a string, it is appended to `result`. - * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, - * an `Error` is thrown. - * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: - * * The literal string `:` is appended to `result`, and - * * The value of `urlObject.port` is coerced to a string and appended to `result`. - * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. - * * If the `urlObject.pathname` property is a string that is not an empty string: - * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash - * (`/`), then the literal string `'/'` is appended to `result`. - * * The value of `urlObject.pathname` is appended to `result`. - * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the - * `querystring` module's `stringify()` method passing the value of `urlObject.query`. - * * Otherwise, if `urlObject.search` is a string: - * * If the value of `urlObject.search` _does not start_ with the ASCII question - * mark (`?`) character, the literal string `?` is appended to `result`. - * * The value of `urlObject.search` is appended to `result`. - * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.hash` property is a string: - * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) - * character, the literal string `#` is appended to `result`. - * * The value of `urlObject.hash` is appended to `result`. - * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a - * string, an `Error` is thrown. - * * `result` is returned. - * @since v0.1.25 - * @legacy Use the WHATWG URL API instead. - * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. - */ - function format(urlObject: URL, options?: URLFormatOptions): string; - /** - * The `url.format()` method returns a formatted URL string derived from `urlObject`. - * - * ```js - * import url from 'node:url'; - * url.format({ - * protocol: 'https', - * hostname: 'example.com', - * pathname: '/some/path', - * query: { - * page: 1, - * format: 'json', - * }, - * }); - * - * // => 'https://example.com/some/path?page=1&format=json' - * ``` - * - * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. - * - * The formatting process operates as follows: - * - * * A new empty string `result` is created. - * * If `urlObject.protocol` is a string, it is appended as-is to `result`. - * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. - * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII - * colon (`:`) character, the literal string `:` will be appended to `result`. - * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: - * * `urlObject.slashes` property is true; - * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; - * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string - * and appended to `result` followed by the literal string `@`. - * * If the `urlObject.host` property is `undefined` then: - * * If the `urlObject.hostname` is a string, it is appended to `result`. - * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, - * an `Error` is thrown. - * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: - * * The literal string `:` is appended to `result`, and - * * The value of `urlObject.port` is coerced to a string and appended to `result`. - * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. - * * If the `urlObject.pathname` property is a string that is not an empty string: - * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash - * (`/`), then the literal string `'/'` is appended to `result`. - * * The value of `urlObject.pathname` is appended to `result`. - * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the - * `querystring` module's `stringify()` method passing the value of `urlObject.query`. - * * Otherwise, if `urlObject.search` is a string: - * * If the value of `urlObject.search` _does not start_ with the ASCII question - * mark (`?`) character, the literal string `?` is appended to `result`. - * * The value of `urlObject.search` is appended to `result`. - * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.hash` property is a string: - * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) - * character, the literal string `#` is appended to `result`. - * * The value of `urlObject.hash` is appended to `result`. - * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a - * string, an `Error` is thrown. - * * `result` is returned. - * @since v0.1.25 - * @legacy Use the WHATWG URL API instead. - * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. - */ - function format(urlObject: UrlObject | string): string; - /** - * The `url.resolve()` method resolves a target URL relative to a base URL in a - * manner similar to that of a web browser resolving an anchor tag. - * - * ```js - * import url from 'node:url'; - * url.resolve('/one/two/three', 'four'); // '/one/two/four' - * url.resolve('http://example.com/', '/one'); // 'http://example.com/one' - * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' - * ``` - * - * To achieve the same result using the WHATWG URL API: - * - * ```js - * function resolve(from, to) { - * const resolvedUrl = new URL(to, new URL(from, 'resolve://')); - * if (resolvedUrl.protocol === 'resolve:') { - * // `from` is a relative URL. - * const { pathname, search, hash } = resolvedUrl; - * return pathname + search + hash; - * } - * return resolvedUrl.toString(); - * } - * - * resolve('/one/two/three', 'four'); // '/one/two/four' - * resolve('http://example.com/', '/one'); // 'http://example.com/one' - * resolve('http://example.com/one', '/two'); // 'http://example.com/two' - * ``` - * @since v0.1.25 - * @legacy Use the WHATWG URL API instead. - * @param from The base URL to use if `to` is a relative URL. - * @param to The target URL to resolve. - */ - function resolve(from: string, to: string): string; - /** - * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an - * invalid domain, the empty string is returned. - * - * It performs the inverse operation to {@link domainToUnicode}. - * - * ```js - * import url from 'node:url'; - * - * console.log(url.domainToASCII('español.com')); - * // Prints xn--espaol-zwa.com - * console.log(url.domainToASCII('中文.com')); - * // Prints xn--fiq228c.com - * console.log(url.domainToASCII('xn--iñvalid.com')); - * // Prints an empty string - * ``` - * @since v7.4.0, v6.13.0 - */ - function domainToASCII(domain: string): string; - /** - * Returns the Unicode serialization of the `domain`. If `domain` is an invalid - * domain, the empty string is returned. - * - * It performs the inverse operation to {@link domainToASCII}. - * - * ```js - * import url from 'node:url'; - * - * console.log(url.domainToUnicode('xn--espaol-zwa.com')); - * // Prints español.com - * console.log(url.domainToUnicode('xn--fiq228c.com')); - * // Prints 中文.com - * console.log(url.domainToUnicode('xn--iñvalid.com')); - * // Prints an empty string - * ``` - * @since v7.4.0, v6.13.0 - */ - function domainToUnicode(domain: string): string; - /** - * This function ensures the correct decodings of percent-encoded characters as - * well as ensuring a cross-platform valid absolute path string. - * - * ```js - * import { fileURLToPath } from 'node:url'; - * - * const __filename = fileURLToPath(import.meta.url); - * - * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/ - * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows) - * - * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt - * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows) - * - * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt - * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX) - * - * new URL('file:///hello world').pathname; // Incorrect: /hello%20world - * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX) - * ``` - * @since v10.12.0 - * @param url The file URL string or URL object to convert to a path. - * @return The fully-resolved platform-specific Node.js file path. - */ - function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string; - /** - * This function ensures that `path` is resolved absolutely, and that the URL - * control characters are correctly encoded when converting into a File URL. - * - * ```js - * import { pathToFileURL } from 'node:url'; - * - * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1 - * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX) - * - * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c - * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX) - * ``` - * @since v10.12.0 - * @param path The path to convert to a File URL. - * @return The file URL object. - */ - function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL; - /** - * This utility function converts a URL object into an ordinary options object as - * expected by the `http.request()` and `https.request()` APIs. - * - * ```js - * import { urlToHttpOptions } from 'node:url'; - * const myURL = new URL('https://a:b@測試?abc#foo'); - * - * console.log(urlToHttpOptions(myURL)); - * /* - * { - * protocol: 'https:', - * hostname: 'xn--g6w251d', - * hash: '#foo', - * search: '?abc', - * pathname: '/', - * path: '/?abc', - * href: 'https://a:b@xn--g6w251d/?abc#foo', - * auth: 'a:b' - * } - * - * ``` - * @since v15.7.0, v14.18.0 - * @param url The `WHATWG URL` object to convert to an options object. - * @return Options object - */ - function urlToHttpOptions(url: URL): ClientRequestArgs; - interface URLFormatOptions { - /** - * `true` if the serialized URL string should include the username and password, `false` otherwise. - * @default true - */ - auth?: boolean | undefined; - /** - * `true` if the serialized URL string should include the fragment, `false` otherwise. - * @default true - */ - fragment?: boolean | undefined; - /** - * `true` if the serialized URL string should include the search query, `false` otherwise. - * @default true - */ - search?: boolean | undefined; - /** - * `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to - * being Punycode encoded. - * @default false - */ - unicode?: boolean | undefined; - } - /** - * Browser-compatible `URL` class, implemented by following the WHATWG URL - * Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself. - * The `URL` class is also available on the global object. - * - * In accordance with browser conventions, all properties of `URL` objects - * are implemented as getters and setters on the class prototype, rather than as - * data properties on the object itself. Thus, unlike `legacy urlObject`s, - * using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still - * return `true`. - * @since v7.0.0, v6.13.0 - */ - class URL { - /** - * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later. - * - * ```js - * import { - * Blob, - * resolveObjectURL, - * } from 'node:buffer'; - * - * const blob = new Blob(['hello']); - * const id = URL.createObjectURL(blob); - * - * // later... - * - * const otherBlob = resolveObjectURL(id); - * console.log(otherBlob.size); - * ``` - * - * The data stored by the registered `Blob` will be retained in memory until `URL.revokeObjectURL()` is called to remove it. - * - * `Blob` objects are registered within the current thread. If using Worker - * Threads, `Blob` objects registered within one Worker will not be available - * to other workers or the main thread. - * @since v16.7.0 - * @experimental - */ - static createObjectURL(blob: NodeBlob): string; - /** - * Removes the stored `Blob` identified by the given ID. Attempting to revoke a - * ID that isn't registered will silently fail. - * @since v16.7.0 - * @experimental - * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. - */ - static revokeObjectURL(id: string): void; - /** - * Checks if an `input` relative to the `base` can be parsed to a `URL`. - * - * ```js - * const isValid = URL.canParse('/foo', 'https://example.org/'); // true - * - * const isNotValid = URL.canParse('/foo'); // false - * ``` - * @since v19.9.0 - * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is - * `converted to a string` first. - * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first. - */ - static canParse(input: string, base?: string): boolean; - /** - * Parses a string as a URL. If `base` is provided, it will be used as the base URL for the purpose of resolving non-absolute `input` URLs. - * Returns `null` if `input` is not a valid. - * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is - * `converted to a string` first. - * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first. - * @since v22.1.0 - */ - static parse(input: string, base?: string): URL | null; - constructor(input: string | { toString: () => string }, base?: string | URL); - /** - * Gets and sets the fragment portion of the URL. - * - * ```js - * const myURL = new URL('https://example.org/foo#bar'); - * console.log(myURL.hash); - * // Prints #bar - * - * myURL.hash = 'baz'; - * console.log(myURL.href); - * // Prints https://example.org/foo#baz - * ``` - * - * Invalid URL characters included in the value assigned to the `hash` property - * are `percent-encoded`. The selection of which characters to - * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. - */ - hash: string; - /** - * Gets and sets the host portion of the URL. - * - * ```js - * const myURL = new URL('https://example.org:81/foo'); - * console.log(myURL.host); - * // Prints example.org:81 - * - * myURL.host = 'example.com:82'; - * console.log(myURL.href); - * // Prints https://example.com:82/foo - * ``` - * - * Invalid host values assigned to the `host` property are ignored. - */ - host: string; - /** - * Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the - * port. - * - * ```js - * const myURL = new URL('https://example.org:81/foo'); - * console.log(myURL.hostname); - * // Prints example.org - * - * // Setting the hostname does not change the port - * myURL.hostname = 'example.com'; - * console.log(myURL.href); - * // Prints https://example.com:81/foo - * - * // Use myURL.host to change the hostname and port - * myURL.host = 'example.org:82'; - * console.log(myURL.href); - * // Prints https://example.org:82/foo - * ``` - * - * Invalid host name values assigned to the `hostname` property are ignored. - */ - hostname: string; - /** - * Gets and sets the serialized URL. - * - * ```js - * const myURL = new URL('https://example.org/foo'); - * console.log(myURL.href); - * // Prints https://example.org/foo - * - * myURL.href = 'https://example.com/bar'; - * console.log(myURL.href); - * // Prints https://example.com/bar - * ``` - * - * Getting the value of the `href` property is equivalent to calling {@link toString}. - * - * Setting the value of this property to a new value is equivalent to creating a - * new `URL` object using `new URL(value)`. Each of the `URL` object's properties will be modified. - * - * If the value assigned to the `href` property is not a valid URL, a `TypeError` will be thrown. - */ - href: string; - /** - * Gets the read-only serialization of the URL's origin. - * - * ```js - * const myURL = new URL('https://example.org/foo/bar?baz'); - * console.log(myURL.origin); - * // Prints https://example.org - * ``` - * - * ```js - * const idnURL = new URL('https://測試'); - * console.log(idnURL.origin); - * // Prints https://xn--g6w251d - * - * console.log(idnURL.hostname); - * // Prints xn--g6w251d - * ``` - */ - readonly origin: string; - /** - * Gets and sets the password portion of the URL. - * - * ```js - * const myURL = new URL('https://abc:xyz@example.com'); - * console.log(myURL.password); - * // Prints xyz - * - * myURL.password = '123'; - * console.log(myURL.href); - * // Prints https://abc:123@example.com/ - * ``` - * - * Invalid URL characters included in the value assigned to the `password` property - * are `percent-encoded`. The selection of which characters to - * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. - */ - password: string; - /** - * Gets and sets the path portion of the URL. - * - * ```js - * const myURL = new URL('https://example.org/abc/xyz?123'); - * console.log(myURL.pathname); - * // Prints /abc/xyz - * - * myURL.pathname = '/abcdef'; - * console.log(myURL.href); - * // Prints https://example.org/abcdef?123 - * ``` - * - * Invalid URL characters included in the value assigned to the `pathname` property are `percent-encoded`. The selection of which characters - * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. - */ - pathname: string; - /** - * Gets and sets the port portion of the URL. - * - * The port value may be a number or a string containing a number in the range `0` to `65535` (inclusive). Setting the value to the default port of the `URL` objects given `protocol` will - * result in the `port` value becoming - * the empty string (`''`). - * - * The port value can be an empty string in which case the port depends on - * the protocol/scheme: - * - * - * - * Upon assigning a value to the port, the value will first be converted to a - * string using `.toString()`. - * - * If that string is invalid but it begins with a number, the leading number is - * assigned to `port`. - * If the number lies outside the range denoted above, it is ignored. - * - * ```js - * const myURL = new URL('https://example.org:8888'); - * console.log(myURL.port); - * // Prints 8888 - * - * // Default ports are automatically transformed to the empty string - * // (HTTPS protocol's default port is 443) - * myURL.port = '443'; - * console.log(myURL.port); - * // Prints the empty string - * console.log(myURL.href); - * // Prints https://example.org/ - * - * myURL.port = 1234; - * console.log(myURL.port); - * // Prints 1234 - * console.log(myURL.href); - * // Prints https://example.org:1234/ - * - * // Completely invalid port strings are ignored - * myURL.port = 'abcd'; - * console.log(myURL.port); - * // Prints 1234 - * - * // Leading numbers are treated as a port number - * myURL.port = '5678abcd'; - * console.log(myURL.port); - * // Prints 5678 - * - * // Non-integers are truncated - * myURL.port = 1234.5678; - * console.log(myURL.port); - * // Prints 1234 - * - * // Out-of-range numbers which are not represented in scientific notation - * // will be ignored. - * myURL.port = 1e10; // 10000000000, will be range-checked as described below - * console.log(myURL.port); - * // Prints 1234 - * ``` - * - * Numbers which contain a decimal point, - * such as floating-point numbers or numbers in scientific notation, - * are not an exception to this rule. - * Leading numbers up to the decimal point will be set as the URL's port, - * assuming they are valid: - * - * ```js - * myURL.port = 4.567e21; - * console.log(myURL.port); - * // Prints 4 (because it is the leading number in the string '4.567e21') - * ``` - */ - port: string; - /** - * Gets and sets the protocol portion of the URL. - * - * ```js - * const myURL = new URL('https://example.org'); - * console.log(myURL.protocol); - * // Prints https: - * - * myURL.protocol = 'ftp'; - * console.log(myURL.href); - * // Prints ftp://example.org/ - * ``` - * - * Invalid URL protocol values assigned to the `protocol` property are ignored. - */ - protocol: string; - /** - * Gets and sets the serialized query portion of the URL. - * - * ```js - * const myURL = new URL('https://example.org/abc?123'); - * console.log(myURL.search); - * // Prints ?123 - * - * myURL.search = 'abc=xyz'; - * console.log(myURL.href); - * // Prints https://example.org/abc?abc=xyz - * ``` - * - * Any invalid URL characters appearing in the value assigned the `search` property will be `percent-encoded`. The selection of which - * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. - */ - search: string; - /** - * Gets the `URLSearchParams` object representing the query parameters of the - * URL. This property is read-only but the `URLSearchParams` object it provides - * can be used to mutate the URL instance; to replace the entirety of query - * parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details. - * - * Use care when using `.searchParams` to modify the `URL` because, - * per the WHATWG specification, the `URLSearchParams` object uses - * different rules to determine which characters to percent-encode. For - * instance, the `URL` object will not percent encode the ASCII tilde (`~`) - * character, while `URLSearchParams` will always encode it: - * - * ```js - * const myURL = new URL('https://example.org/abc?foo=~bar'); - * - * console.log(myURL.search); // prints ?foo=~bar - * - * // Modify the URL via searchParams... - * myURL.searchParams.sort(); - * - * console.log(myURL.search); // prints ?foo=%7Ebar - * ``` - */ - readonly searchParams: URLSearchParams; - /** - * Gets and sets the username portion of the URL. - * - * ```js - * const myURL = new URL('https://abc:xyz@example.com'); - * console.log(myURL.username); - * // Prints abc - * - * myURL.username = '123'; - * console.log(myURL.href); - * // Prints https://123:xyz@example.com/ - * ``` - * - * Any invalid URL characters appearing in the value assigned the `username` property will be `percent-encoded`. The selection of which - * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. - */ - username: string; - /** - * The `toString()` method on the `URL` object returns the serialized URL. The - * value returned is equivalent to that of {@link href} and {@link toJSON}. - */ - toString(): string; - /** - * The `toJSON()` method on the `URL` object returns the serialized URL. The - * value returned is equivalent to that of {@link href} and {@link toString}. - * - * This method is automatically called when an `URL` object is serialized - * with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). - * - * ```js - * const myURLs = [ - * new URL('https://www.example.com'), - * new URL('https://test.example.org'), - * ]; - * console.log(JSON.stringify(myURLs)); - * // Prints ["https://www.example.com/","https://test.example.org/"] - * ``` - */ - toJSON(): string; - } - interface URLSearchParamsIterator extends NodeJS.Iterator { - [Symbol.iterator](): URLSearchParamsIterator; - } - /** - * The `URLSearchParams` API provides read and write access to the query of a `URL`. The `URLSearchParams` class can also be used standalone with one of the - * four following constructors. - * The `URLSearchParams` class is also available on the global object. - * - * The WHATWG `URLSearchParams` interface and the `querystring` module have - * similar purpose, but the purpose of the `querystring` module is more - * general, as it allows the customization of delimiter characters (`&` and `=`). - * On the other hand, this API is designed purely for URL query strings. - * - * ```js - * const myURL = new URL('https://example.org/?abc=123'); - * console.log(myURL.searchParams.get('abc')); - * // Prints 123 - * - * myURL.searchParams.append('abc', 'xyz'); - * console.log(myURL.href); - * // Prints https://example.org/?abc=123&abc=xyz - * - * myURL.searchParams.delete('abc'); - * myURL.searchParams.set('a', 'b'); - * console.log(myURL.href); - * // Prints https://example.org/?a=b - * - * const newSearchParams = new URLSearchParams(myURL.searchParams); - * // The above is equivalent to - * // const newSearchParams = new URLSearchParams(myURL.search); - * - * newSearchParams.append('a', 'c'); - * console.log(myURL.href); - * // Prints https://example.org/?a=b - * console.log(newSearchParams.toString()); - * // Prints a=b&a=c - * - * // newSearchParams.toString() is implicitly called - * myURL.search = newSearchParams; - * console.log(myURL.href); - * // Prints https://example.org/?a=b&a=c - * newSearchParams.delete('a'); - * console.log(myURL.href); - * // Prints https://example.org/?a=b&a=c - * ``` - * @since v7.5.0, v6.13.0 - */ - class URLSearchParams implements Iterable<[string, string]> { - constructor( - init?: - | URLSearchParams - | string - | Record - | Iterable<[string, string]> - | ReadonlyArray<[string, string]>, - ); - /** - * Append a new name-value pair to the query string. - */ - append(name: string, value: string): void; - /** - * If `value` is provided, removes all name-value pairs - * where name is `name` and value is `value`. - * - * If `value` is not provided, removes all name-value pairs whose name is `name`. - */ - delete(name: string, value?: string): void; - /** - * Returns an ES6 `Iterator` over each of the name-value pairs in the query. - * Each item of the iterator is a JavaScript `Array`. The first item of the `Array` is the `name`, the second item of the `Array` is the `value`. - * - * Alias for `urlSearchParams[@@iterator]()`. - */ - entries(): URLSearchParamsIterator<[string, string]>; - /** - * Iterates over each name-value pair in the query and invokes the given function. - * - * ```js - * const myURL = new URL('https://example.org/?a=b&c=d'); - * myURL.searchParams.forEach((value, name, searchParams) => { - * console.log(name, value, myURL.searchParams === searchParams); - * }); - * // Prints: - * // a b true - * // c d true - * ``` - * @param fn Invoked for each name-value pair in the query - * @param thisArg To be used as `this` value for when `fn` is called - */ - forEach( - fn: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void, - thisArg?: TThis, - ): void; - /** - * Returns the value of the first name-value pair whose name is `name`. If there - * are no such pairs, `null` is returned. - * @return or `null` if there is no name-value pair with the given `name`. - */ - get(name: string): string | null; - /** - * Returns the values of all name-value pairs whose name is `name`. If there are - * no such pairs, an empty array is returned. - */ - getAll(name: string): string[]; - /** - * Checks if the `URLSearchParams` object contains key-value pair(s) based on `name` and an optional `value` argument. - * - * If `value` is provided, returns `true` when name-value pair with - * same `name` and `value` exists. - * - * If `value` is not provided, returns `true` if there is at least one name-value - * pair whose name is `name`. - */ - has(name: string, value?: string): boolean; - /** - * Returns an ES6 `Iterator` over the names of each name-value pair. - * - * ```js - * const params = new URLSearchParams('foo=bar&foo=baz'); - * for (const name of params.keys()) { - * console.log(name); - * } - * // Prints: - * // foo - * // foo - * ``` - */ - keys(): URLSearchParamsIterator; - /** - * Sets the value in the `URLSearchParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`, - * set the first such pair's value to `value` and remove all others. If not, - * append the name-value pair to the query string. - * - * ```js - * const params = new URLSearchParams(); - * params.append('foo', 'bar'); - * params.append('foo', 'baz'); - * params.append('abc', 'def'); - * console.log(params.toString()); - * // Prints foo=bar&foo=baz&abc=def - * - * params.set('foo', 'def'); - * params.set('xyz', 'opq'); - * console.log(params.toString()); - * // Prints foo=def&abc=def&xyz=opq - * ``` - */ - set(name: string, value: string): void; - /** - * The total number of parameter entries. - * @since v19.8.0 - */ - readonly size: number; - /** - * Sort all existing name-value pairs in-place by their names. Sorting is done - * with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs - * with the same name is preserved. - * - * This method can be used, in particular, to increase cache hits. - * - * ```js - * const params = new URLSearchParams('query[]=abc&type=search&query[]=123'); - * params.sort(); - * console.log(params.toString()); - * // Prints query%5B%5D=abc&query%5B%5D=123&type=search - * ``` - * @since v7.7.0, v6.13.0 - */ - sort(): void; - /** - * Returns the search parameters serialized as a string, with characters - * percent-encoded where necessary. - */ - toString(): string; - /** - * Returns an ES6 `Iterator` over the values of each name-value pair. - */ - values(): URLSearchParamsIterator; - [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; - } - import { URL as _URL, URLSearchParams as _URLSearchParams } from "url"; - global { - interface URLSearchParams extends _URLSearchParams {} - interface URL extends _URL {} - interface Global { - URL: typeof _URL; - URLSearchParams: typeof _URLSearchParams; - } - /** - * `URL` class is a global reference for `import { URL } from 'url'` - * https://nodejs.org/api/url.html#the-whatwg-url-api - * @since v10.0.0 - */ - var URL: typeof globalThis extends { - onmessage: any; - URL: infer T; - } ? T - : typeof _URL; - /** - * `URLSearchParams` class is a global reference for `import { URLSearchParams } from 'node:url'` - * https://nodejs.org/api/url.html#class-urlsearchparams - * @since v10.0.0 - */ - var URLSearchParams: typeof globalThis extends { - onmessage: any; - URLSearchParams: infer T; - } ? T - : typeof _URLSearchParams; - } -} -declare module "node:url" { - export * from "url"; -} diff --git a/web/static/node_modules/@types/node/util.d.ts b/web/static/node_modules/@types/node/util.d.ts deleted file mode 100644 index 4f7d29b9..00000000 --- a/web/static/node_modules/@types/node/util.d.ts +++ /dev/null @@ -1,2371 +0,0 @@ -/** - * The `node:util` module supports the needs of Node.js internal APIs. Many of the - * utilities are useful for application and module developers as well. To access - * it: - * - * ```js - * import util from 'node:util'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/util.js) - */ -declare module "util" { - import * as types from "node:util/types"; - export interface InspectOptions { - /** - * If `true`, object's non-enumerable symbols and properties are included in the formatted result. - * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties). - * @default false - */ - showHidden?: boolean | undefined; - /** - * Specifies the number of times to recurse while formatting object. - * This is useful for inspecting large objects. - * To recurse up to the maximum call stack size pass `Infinity` or `null`. - * @default 2 - */ - depth?: number | null | undefined; - /** - * If `true`, the output is styled with ANSI color codes. Colors are customizable. - */ - colors?: boolean | undefined; - /** - * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked. - * @default true - */ - customInspect?: boolean | undefined; - /** - * If `true`, `Proxy` inspection includes the target and handler objects. - * @default false - */ - showProxy?: boolean | undefined; - /** - * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements - * to include when formatting. Set to `null` or `Infinity` to show all elements. - * Set to `0` or negative to show no elements. - * @default 100 - */ - maxArrayLength?: number | null | undefined; - /** - * Specifies the maximum number of characters to - * include when formatting. Set to `null` or `Infinity` to show all elements. - * Set to `0` or negative to show no characters. - * @default 10000 - */ - maxStringLength?: number | null | undefined; - /** - * The length at which input values are split across multiple lines. - * Set to `Infinity` to format the input as a single line - * (in combination with `compact` set to `true` or any number >= `1`). - * @default 80 - */ - breakLength?: number | undefined; - /** - * Setting this to `false` causes each object key - * to be displayed on a new line. It will also add new lines to text that is - * longer than `breakLength`. If set to a number, the most `n` inner elements - * are united on a single line as long as all properties fit into - * `breakLength`. Short array elements are also grouped together. Note that no - * text will be reduced below 16 characters, no matter the `breakLength` size. - * For more information, see the example below. - * @default true - */ - compact?: boolean | number | undefined; - /** - * If set to `true` or a function, all properties of an object, and `Set` and `Map` - * entries are sorted in the resulting string. - * If set to `true` the default sort is used. - * If set to a function, it is used as a compare function. - */ - sorted?: boolean | ((a: string, b: string) => number) | undefined; - /** - * If set to `true`, getters are going to be - * inspected as well. If set to `'get'` only getters without setter are going - * to be inspected. If set to `'set'` only getters having a corresponding - * setter are going to be inspected. This might cause side effects depending on - * the getter function. - * @default false - */ - getters?: "get" | "set" | boolean | undefined; - /** - * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers. - * @default false - */ - numericSeparator?: boolean | undefined; - } - export type Style = - | "special" - | "number" - | "bigint" - | "boolean" - | "undefined" - | "null" - | "string" - | "symbol" - | "date" - | "regexp" - | "module"; - export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => any; // TODO: , inspect: inspect - export interface InspectOptionsStylized extends InspectOptions { - stylize(text: string, styleType: Style): string; - } - export interface StacktraceObject { - /** - * Returns the name of the function associated with this stack frame. - */ - functionName: string; - /** - * Returns the name of the resource that contains the script for the - * function for this StackFrame. - */ - scriptName: string; - /** - * Returns the number, 1-based, of the line for the associate function call. - */ - lineNumber: number; - /** - * Returns the 1-based column offset on the line for the associated function call. - */ - column: number; - } - /** - * The `util.format()` method returns a formatted string using the first argument - * as a `printf`-like format string which can contain zero or more format - * specifiers. Each specifier is replaced with the converted value from the - * corresponding argument. Supported specifiers are: - * - * If a specifier does not have a corresponding argument, it is not replaced: - * - * ```js - * util.format('%s:%s', 'foo'); - * // Returns: 'foo:%s' - * ``` - * - * Values that are not part of the format string are formatted using `util.inspect()` if their type is not `string`. - * - * If there are more arguments passed to the `util.format()` method than the - * number of specifiers, the extra arguments are concatenated to the returned - * string, separated by spaces: - * - * ```js - * util.format('%s:%s', 'foo', 'bar', 'baz'); - * // Returns: 'foo:bar baz' - * ``` - * - * If the first argument does not contain a valid format specifier, `util.format()` returns a string that is the concatenation of all arguments separated by spaces: - * - * ```js - * util.format(1, 2, 3); - * // Returns: '1 2 3' - * ``` - * - * If only one argument is passed to `util.format()`, it is returned as it is - * without any formatting: - * - * ```js - * util.format('%% %s'); - * // Returns: '%% %s' - * ``` - * - * `util.format()` is a synchronous method that is intended as a debugging tool. - * Some input values can have a significant performance overhead that can block the - * event loop. Use this function with care and never in a hot code path. - * @since v0.5.3 - * @param format A `printf`-like format string. - */ - export function format(format?: any, ...param: any[]): string; - /** - * This function is identical to {@link format}, except in that it takes - * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}. - * - * ```js - * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 }); - * // Returns 'See object { foo: 42 }', where `42` is colored as a number - * // when printed to a terminal. - * ``` - * @since v10.0.0 - */ - export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string; - /** - * Returns an array of stacktrace objects containing the stack of - * the caller function. - * - * ```js - * const util = require('node:util'); - * - * function exampleFunction() { - * const callSites = util.getCallSite(); - * - * console.log('Call Sites:'); - * callSites.forEach((callSite, index) => { - * console.log(`CallSite ${index + 1}:`); - * console.log(`Function Name: ${callSite.functionName}`); - * console.log(`Script Name: ${callSite.scriptName}`); - * console.log(`Line Number: ${callSite.lineNumber}`); - * console.log(`Column Number: ${callSite.column}`); - * }); - * // CallSite 1: - * // Function Name: exampleFunction - * // Script Name: /home/example.js - * // Line Number: 5 - * // Column Number: 26 - * - * // CallSite 2: - * // Function Name: anotherFunction - * // Script Name: /home/example.js - * // Line Number: 22 - * // Column Number: 3 - * - * // ... - * } - * - * // A function to simulate another stack layer - * function anotherFunction() { - * exampleFunction(); - * } - * - * anotherFunction(); - * ``` - * @param frames Number of frames returned in the stacktrace. - * **Default:** `10`. Allowable range is between 1 and 200. - * @return An array of stacktrace objects - * @since v22.9.0 - */ - export function getCallSite(frames?: number): StacktraceObject[]; - /** - * Returns the string name for a numeric error code that comes from a Node.js API. - * The mapping between error codes and error names is platform-dependent. - * See `Common System Errors` for the names of common errors. - * - * ```js - * fs.access('file/that/does/not/exist', (err) => { - * const name = util.getSystemErrorName(err.errno); - * console.error(name); // ENOENT - * }); - * ``` - * @since v9.7.0 - */ - export function getSystemErrorName(err: number): string; - /** - * Returns a Map of all system error codes available from the Node.js API. - * The mapping between error codes and error names is platform-dependent. - * See `Common System Errors` for the names of common errors. - * - * ```js - * fs.access('file/that/does/not/exist', (err) => { - * const errorMap = util.getSystemErrorMap(); - * const name = errorMap.get(err.errno); - * console.error(name); // ENOENT - * }); - * ``` - * @since v16.0.0, v14.17.0 - */ - export function getSystemErrorMap(): Map; - /** - * The `util.log()` method prints the given `string` to `stdout` with an included - * timestamp. - * - * ```js - * import util from 'node:util'; - * - * util.log('Timestamped message.'); - * ``` - * @since v0.3.0 - * @deprecated Since v6.0.0 - Use a third party module instead. - */ - export function log(string: string): void; - /** - * Returns the `string` after replacing any surrogate code points - * (or equivalently, any unpaired surrogate code units) with the - * Unicode "replacement character" U+FFFD. - * @since v16.8.0, v14.18.0 - */ - export function toUSVString(string: string): string; - /** - * Creates and returns an `AbortController` instance whose `AbortSignal` is marked - * as transferable and can be used with `structuredClone()` or `postMessage()`. - * @since v18.11.0 - * @experimental - * @returns A transferable AbortController - */ - export function transferableAbortController(): AbortController; - /** - * Marks the given `AbortSignal` as transferable so that it can be used with`structuredClone()` and `postMessage()`. - * - * ```js - * const signal = transferableAbortSignal(AbortSignal.timeout(100)); - * const channel = new MessageChannel(); - * channel.port2.postMessage(signal, [signal]); - * ``` - * @since v18.11.0 - * @experimental - * @param signal The AbortSignal - * @returns The same AbortSignal - */ - export function transferableAbortSignal(signal: AbortSignal): AbortSignal; - /** - * Listens to abort event on the provided `signal` and - * returns a promise that is fulfilled when the `signal` is - * aborted. If the passed `resource` is garbage collected before the `signal` is - * aborted, the returned promise shall remain pending indefinitely. - * - * ```js - * import { aborted } from 'node:util'; - * - * const dependent = obtainSomethingAbortable(); - * - * aborted(dependent.signal, dependent).then(() => { - * // Do something when dependent is aborted. - * }); - * - * dependent.on('event', () => { - * dependent.abort(); - * }); - * ``` - * @since v19.7.0 - * @experimental - * @param resource Any non-null entity, reference to which is held weakly. - */ - export function aborted(signal: AbortSignal, resource: any): Promise; - /** - * The `util.inspect()` method returns a string representation of `object` that is - * intended for debugging. The output of `util.inspect` may change at any time - * and should not be depended upon programmatically. Additional `options` may be - * passed that alter the result. `util.inspect()` will use the constructor's name and/or `@@toStringTag` to make - * an identifiable tag for an inspected value. - * - * ```js - * class Foo { - * get [Symbol.toStringTag]() { - * return 'bar'; - * } - * } - * - * class Bar {} - * - * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } }); - * - * util.inspect(new Foo()); // 'Foo [bar] {}' - * util.inspect(new Bar()); // 'Bar {}' - * util.inspect(baz); // '[foo] {}' - * ``` - * - * Circular references point to their anchor by using a reference index: - * - * ```js - * import { inspect } from 'node:util'; - * - * const obj = {}; - * obj.a = [obj]; - * obj.b = {}; - * obj.b.inner = obj.b; - * obj.b.obj = obj; - * - * console.log(inspect(obj)); - * // { - * // a: [ [Circular *1] ], - * // b: { inner: [Circular *2], obj: [Circular *1] } - * // } - * ``` - * - * The following example inspects all properties of the `util` object: - * - * ```js - * import util from 'node:util'; - * - * console.log(util.inspect(util, { showHidden: true, depth: null })); - * ``` - * - * The following example highlights the effect of the `compact` option: - * - * ```js - * import util from 'node:util'; - * - * const o = { - * a: [1, 2, [[ - * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' + - * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.', - * 'test', - * 'foo']], 4], - * b: new Map([['za', 1], ['zb', 'test']]), - * }; - * console.log(util.inspect(o, { compact: true, depth: 5, breakLength: 80 })); - * - * // { a: - * // [ 1, - * // 2, - * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line - * // 'test', - * // 'foo' ] ], - * // 4 ], - * // b: Map(2) { 'za' => 1, 'zb' => 'test' } } - * - * // Setting `compact` to false or an integer creates more reader friendly output. - * console.log(util.inspect(o, { compact: false, depth: 5, breakLength: 80 })); - * - * // { - * // a: [ - * // 1, - * // 2, - * // [ - * // [ - * // 'Lorem ipsum dolor sit amet,\n' + - * // 'consectetur adipiscing elit, sed do eiusmod \n' + - * // 'tempor incididunt ut labore et dolore magna aliqua.', - * // 'test', - * // 'foo' - * // ] - * // ], - * // 4 - * // ], - * // b: Map(2) { - * // 'za' => 1, - * // 'zb' => 'test' - * // } - * // } - * - * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a - * // single line. - * ``` - * - * The `showHidden` option allows [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) and - * [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries to be - * inspected. If there are more entries than `maxArrayLength`, there is no - * guarantee which entries are displayed. That means retrieving the same [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries twice may - * result in different output. Furthermore, entries - * with no remaining strong references may be garbage collected at any time. - * - * ```js - * import { inspect } from 'node:util'; - * - * const obj = { a: 1 }; - * const obj2 = { b: 2 }; - * const weakSet = new WeakSet([obj, obj2]); - * - * console.log(inspect(weakSet, { showHidden: true })); - * // WeakSet { { a: 1 }, { b: 2 } } - * ``` - * - * The `sorted` option ensures that an object's property insertion order does not - * impact the result of `util.inspect()`. - * - * ```js - * import { inspect } from 'node:util'; - * import assert from 'node:assert'; - * - * const o1 = { - * b: [2, 3, 1], - * a: '`a` comes before `b`', - * c: new Set([2, 3, 1]), - * }; - * console.log(inspect(o1, { sorted: true })); - * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } } - * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) })); - * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' } - * - * const o2 = { - * c: new Set([2, 1, 3]), - * a: '`a` comes before `b`', - * b: [2, 3, 1], - * }; - * assert.strict.equal( - * inspect(o1, { sorted: true }), - * inspect(o2, { sorted: true }), - * ); - * ``` - * - * The `numericSeparator` option adds an underscore every three digits to all - * numbers. - * - * ```js - * import { inspect } from 'node:util'; - * - * const thousand = 1_000; - * const million = 1_000_000; - * const bigNumber = 123_456_789n; - * const bigDecimal = 1_234.123_45; - * - * console.log(inspect(thousand, { numericSeparator: true })); - * // 1_000 - * console.log(inspect(million, { numericSeparator: true })); - * // 1_000_000 - * console.log(inspect(bigNumber, { numericSeparator: true })); - * // 123_456_789n - * console.log(inspect(bigDecimal, { numericSeparator: true })); - * // 1_234.123_45 - * ``` - * - * `util.inspect()` is a synchronous method intended for debugging. Its maximum - * output length is approximately 128 MiB. Inputs that result in longer output will - * be truncated. - * @since v0.3.0 - * @param object Any JavaScript primitive or `Object`. - * @return The representation of `object`. - */ - export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; - export function inspect(object: any, options?: InspectOptions): string; - export namespace inspect { - let colors: NodeJS.Dict<[number, number]>; - let styles: { - [K in Style]: string; - }; - let defaultOptions: InspectOptions; - /** - * Allows changing inspect settings from the repl. - */ - let replDefaults: InspectOptions; - /** - * That can be used to declare custom inspect functions. - */ - const custom: unique symbol; - } - /** - * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray). - * - * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isArray([]); - * // Returns: true - * util.isArray(new Array()); - * // Returns: true - * util.isArray({}); - * // Returns: false - * ``` - * @since v0.6.0 - * @deprecated Since v4.0.0 - Use `isArray` instead. - */ - export function isArray(object: unknown): object is unknown[]; - /** - * Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isRegExp(/some regexp/); - * // Returns: true - * util.isRegExp(new RegExp('another regexp')); - * // Returns: true - * util.isRegExp({}); - * // Returns: false - * ``` - * @since v0.6.0 - * @deprecated Since v4.0.0 - Deprecated - */ - export function isRegExp(object: unknown): object is RegExp; - /** - * Returns `true` if the given `object` is a `Date`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isDate(new Date()); - * // Returns: true - * util.isDate(Date()); - * // false (without 'new' returns a String) - * util.isDate({}); - * // Returns: false - * ``` - * @since v0.6.0 - * @deprecated Since v4.0.0 - Use {@link types.isDate} instead. - */ - export function isDate(object: unknown): object is Date; - /** - * Returns `true` if the given `object` is an `Error`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isError(new Error()); - * // Returns: true - * util.isError(new TypeError()); - * // Returns: true - * util.isError({ name: 'Error', message: 'an error occurred' }); - * // Returns: false - * ``` - * - * This method relies on `Object.prototype.toString()` behavior. It is - * possible to obtain an incorrect result when the `object` argument manipulates `@@toStringTag`. - * - * ```js - * import util from 'node:util'; - * const obj = { name: 'Error', message: 'an error occurred' }; - * - * util.isError(obj); - * // Returns: false - * obj[Symbol.toStringTag] = 'Error'; - * util.isError(obj); - * // Returns: true - * ``` - * @since v0.6.0 - * @deprecated Since v4.0.0 - Use {@link types.isNativeError} instead. - */ - export function isError(object: unknown): object is Error; - /** - * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and `extends` keywords to get language level inheritance support. Also note - * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179). - * - * Inherit the prototype methods from one [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The - * prototype of `constructor` will be set to a new object created from `superConstructor`. - * - * This mainly adds some input validation on top of`Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. - * As an additional convenience, `superConstructor` will be accessible - * through the `constructor.super_` property. - * - * ```js - * import util from 'node:util'; - * import EventEmitter from 'node:events'; - * - * function MyStream() { - * EventEmitter.call(this); - * } - * - * util.inherits(MyStream, EventEmitter); - * - * MyStream.prototype.write = function(data) { - * this.emit('data', data); - * }; - * - * const stream = new MyStream(); - * - * console.log(stream instanceof EventEmitter); // true - * console.log(MyStream.super_ === EventEmitter); // true - * - * stream.on('data', (data) => { - * console.log(`Received data: "${data}"`); - * }); - * stream.write('It works!'); // Received data: "It works!" - * ``` - * - * ES6 example using `class` and `extends`: - * - * ```js - * import EventEmitter from 'node:events'; - * - * class MyStream extends EventEmitter { - * write(data) { - * this.emit('data', data); - * } - * } - * - * const stream = new MyStream(); - * - * stream.on('data', (data) => { - * console.log(`Received data: "${data}"`); - * }); - * stream.write('With ES6'); - * ``` - * @since v0.3.0 - * @legacy Use ES2015 class syntax and `extends` keyword instead. - */ - export function inherits(constructor: unknown, superConstructor: unknown): void; - export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void; - export interface DebugLogger extends DebugLoggerFunction { - enabled: boolean; - } - /** - * The `util.debuglog()` method is used to create a function that conditionally - * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`environment variable. If the `section` name appears within the value of that - * environment variable, then the returned function operates similar to `console.error()`. If not, then the returned function is a no-op. - * - * ```js - * import util from 'node:util'; - * const debuglog = util.debuglog('foo'); - * - * debuglog('hello from foo [%d]', 123); - * ``` - * - * If this program is run with `NODE_DEBUG=foo` in the environment, then - * it will output something like: - * - * ```console - * FOO 3245: hello from foo [123] - * ``` - * - * where `3245` is the process id. If it is not run with that - * environment variable set, then it will not print anything. - * - * The `section` supports wildcard also: - * - * ```js - * import util from 'node:util'; - * const debuglog = util.debuglog('foo-bar'); - * - * debuglog('hi there, it\'s foo-bar [%d]', 2333); - * ``` - * - * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output - * something like: - * - * ```console - * FOO-BAR 3257: hi there, it's foo-bar [2333] - * ``` - * - * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`environment variable: `NODE_DEBUG=fs,net,tls`. - * - * The optional `callback` argument can be used to replace the logging function - * with a different function that doesn't have any initialization or - * unnecessary wrapping. - * - * ```js - * import util from 'node:util'; - * let debuglog = util.debuglog('internals', (debug) => { - * // Replace with a logging function that optimizes out - * // testing if the section is enabled - * debuglog = debug; - * }); - * ``` - * @since v0.11.3 - * @param section A string identifying the portion of the application for which the `debuglog` function is being created. - * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function. - * @return The logging function - */ - export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; - export const debug: typeof debuglog; - /** - * Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isBoolean(1); - * // Returns: false - * util.isBoolean(0); - * // Returns: false - * util.isBoolean(false); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `typeof value === 'boolean'` instead. - */ - export function isBoolean(object: unknown): object is boolean; - /** - * Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isBuffer({ length: 0 }); - * // Returns: false - * util.isBuffer([]); - * // Returns: false - * util.isBuffer(Buffer.from('hello world')); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `isBuffer` instead. - */ - export function isBuffer(object: unknown): object is Buffer; - /** - * Returns `true` if the given `object` is a `Function`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * function Foo() {} - * const Bar = () => {}; - * - * util.isFunction({}); - * // Returns: false - * util.isFunction(Foo); - * // Returns: true - * util.isFunction(Bar); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `typeof value === 'function'` instead. - */ - export function isFunction(object: unknown): boolean; - /** - * Returns `true` if the given `object` is strictly `null`. Otherwise, returns`false`. - * - * ```js - * import util from 'node:util'; - * - * util.isNull(0); - * // Returns: false - * util.isNull(undefined); - * // Returns: false - * util.isNull(null); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `value === null` instead. - */ - export function isNull(object: unknown): object is null; - /** - * Returns `true` if the given `object` is `null` or `undefined`. Otherwise, - * returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isNullOrUndefined(0); - * // Returns: false - * util.isNullOrUndefined(undefined); - * // Returns: true - * util.isNullOrUndefined(null); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `value === undefined || value === null` instead. - */ - export function isNullOrUndefined(object: unknown): object is null | undefined; - /** - * Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isNumber(false); - * // Returns: false - * util.isNumber(Infinity); - * // Returns: true - * util.isNumber(0); - * // Returns: true - * util.isNumber(NaN); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `typeof value === 'number'` instead. - */ - export function isNumber(object: unknown): object is number; - /** - * Returns `true` if the given `object` is strictly an `Object`**and** not a`Function` (even though functions are objects in JavaScript). - * Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isObject(5); - * // Returns: false - * util.isObject(null); - * // Returns: false - * util.isObject({}); - * // Returns: true - * util.isObject(() => {}); - * // Returns: false - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `value !== null && typeof value === 'object'` instead. - */ - export function isObject(object: unknown): boolean; - /** - * Returns `true` if the given `object` is a primitive type. Otherwise, returns`false`. - * - * ```js - * import util from 'node:util'; - * - * util.isPrimitive(5); - * // Returns: true - * util.isPrimitive('foo'); - * // Returns: true - * util.isPrimitive(false); - * // Returns: true - * util.isPrimitive(null); - * // Returns: true - * util.isPrimitive(undefined); - * // Returns: true - * util.isPrimitive({}); - * // Returns: false - * util.isPrimitive(() => {}); - * // Returns: false - * util.isPrimitive(/^$/); - * // Returns: false - * util.isPrimitive(new Date()); - * // Returns: false - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. - */ - export function isPrimitive(object: unknown): boolean; - /** - * Returns `true` if the given `object` is a `string`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isString(''); - * // Returns: true - * util.isString('foo'); - * // Returns: true - * util.isString(String('foo')); - * // Returns: true - * util.isString(5); - * // Returns: false - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `typeof value === 'string'` instead. - */ - export function isString(object: unknown): object is string; - /** - * Returns `true` if the given `object` is a `Symbol`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isSymbol(5); - * // Returns: false - * util.isSymbol('foo'); - * // Returns: false - * util.isSymbol(Symbol('foo')); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `typeof value === 'symbol'` instead. - */ - export function isSymbol(object: unknown): object is symbol; - /** - * Returns `true` if the given `object` is `undefined`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * const foo = undefined; - * util.isUndefined(5); - * // Returns: false - * util.isUndefined(foo); - * // Returns: true - * util.isUndefined(null); - * // Returns: false - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `value === undefined` instead. - */ - export function isUndefined(object: unknown): object is undefined; - /** - * The `util.deprecate()` method wraps `fn` (which may be a function or class) in - * such a way that it is marked as deprecated. - * - * ```js - * import util from 'node:util'; - * - * exports.obsoleteFunction = util.deprecate(() => { - * // Do something here. - * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.'); - * ``` - * - * When called, `util.deprecate()` will return a function that will emit a `DeprecationWarning` using the `'warning'` event. The warning will - * be emitted and printed to `stderr` the first time the returned function is - * called. After the warning is emitted, the wrapped function is called without - * emitting a warning. - * - * If the same optional `code` is supplied in multiple calls to `util.deprecate()`, - * the warning will be emitted only once for that `code`. - * - * ```js - * import util from 'node:util'; - * - * const fn1 = util.deprecate(someFunction, someMessage, 'DEP0001'); - * const fn2 = util.deprecate(someOtherFunction, someOtherMessage, 'DEP0001'); - * fn1(); // Emits a deprecation warning with code DEP0001 - * fn2(); // Does not emit a deprecation warning because it has the same code - * ``` - * - * If either the `--no-deprecation` or `--no-warnings` command-line flags are - * used, or if the `process.noDeprecation` property is set to `true`_prior_ to - * the first deprecation warning, the `util.deprecate()` method does nothing. - * - * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set, - * or the `process.traceDeprecation` property is set to `true`, a warning and a - * stack trace are printed to `stderr` the first time the deprecated function is - * called. - * - * If the `--throw-deprecation` command-line flag is set, or the `process.throwDeprecation` property is set to `true`, then an exception will be - * thrown when the deprecated function is called. - * - * The `--throw-deprecation` command-line flag and `process.throwDeprecation` property take precedence over `--trace-deprecation` and `process.traceDeprecation`. - * @since v0.8.0 - * @param fn The function that is being deprecated. - * @param msg A warning message to display when the deprecated function is invoked. - * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes. - * @return The deprecated function wrapped to emit a warning. - */ - export function deprecate(fn: T, msg: string, code?: string): T; - /** - * Returns `true` if there is deep strict equality between `val1` and `val2`. - * Otherwise, returns `false`. - * - * See `assert.deepStrictEqual()` for more information about deep strict - * equality. - * @since v9.0.0 - */ - export function isDeepStrictEqual(val1: unknown, val2: unknown): boolean; - /** - * Returns `str` with any ANSI escape codes removed. - * - * ```js - * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m')); - * // Prints "value" - * ``` - * @since v16.11.0 - */ - export function stripVTControlCharacters(str: string): string; - /** - * Takes an `async` function (or a function that returns a `Promise`) and returns a - * function following the error-first callback style, i.e. taking - * an `(err, value) => ...` callback as the last argument. In the callback, the - * first argument will be the rejection reason (or `null` if the `Promise` resolved), and the second argument will be the resolved value. - * - * ```js - * import util from 'node:util'; - * - * async function fn() { - * return 'hello world'; - * } - * const callbackFunction = util.callbackify(fn); - * - * callbackFunction((err, ret) => { - * if (err) throw err; - * console.log(ret); - * }); - * ``` - * - * Will print: - * - * ```text - * hello world - * ``` - * - * The callback is executed asynchronously, and will have a limited stack trace. - * If the callback throws, the process will emit an `'uncaughtException'` event, and if not handled will exit. - * - * Since `null` has a special meaning as the first argument to a callback, if a - * wrapped function rejects a `Promise` with a falsy value as a reason, the value - * is wrapped in an `Error` with the original value stored in a field named `reason`. - * - * ```js - * function fn() { - * return Promise.reject(null); - * } - * const callbackFunction = util.callbackify(fn); - * - * callbackFunction((err, ret) => { - * // When the Promise was rejected with `null` it is wrapped with an Error and - * // the original value is stored in `reason`. - * err && Object.hasOwn(err, 'reason') && err.reason === null; // true - * }); - * ``` - * @since v8.2.0 - * @param fn An `async` function - * @return a callback style function - */ - export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: () => Promise, - ): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1) => Promise, - ): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1) => Promise, - ): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2) => Promise, - ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2) => Promise, - ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, - ) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, - ) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - arg6: T6, - callback: (err: NodeJS.ErrnoException) => void, - ) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - arg6: T6, - callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, - ) => void; - export interface CustomPromisifyLegacy extends Function { - __promisify__: TCustom; - } - export interface CustomPromisifySymbol extends Function { - [promisify.custom]: TCustom; - } - export type CustomPromisify = - | CustomPromisifySymbol - | CustomPromisifyLegacy; - /** - * Takes a function following the common error-first callback style, i.e. taking - * an `(err, value) => ...` callback as the last argument, and returns a version - * that returns promises. - * - * ```js - * import util from 'node:util'; - * import fs from 'node:fs'; - * - * const stat = util.promisify(fs.stat); - * stat('.').then((stats) => { - * // Do something with `stats` - * }).catch((error) => { - * // Handle the error. - * }); - * ``` - * - * Or, equivalently using `async function`s: - * - * ```js - * import util from 'node:util'; - * import fs from 'node:fs'; - * - * const stat = util.promisify(fs.stat); - * - * async function callStat() { - * const stats = await stat('.'); - * console.log(`This directory is owned by ${stats.uid}`); - * } - * - * callStat(); - * ``` - * - * If there is an `original[util.promisify.custom]` property present, `promisify` will return its value, see `Custom promisified functions`. - * - * `promisify()` assumes that `original` is a function taking a callback as its - * final argument in all cases. If `original` is not a function, `promisify()` will throw an error. If `original` is a function but its last argument is not - * an error-first callback, it will still be passed an error-first - * callback as its last argument. - * - * Using `promisify()` on class methods or other methods that use `this` may not - * work as expected unless handled specially: - * - * ```js - * import util from 'node:util'; - * - * class Foo { - * constructor() { - * this.a = 42; - * } - * - * bar(callback) { - * callback(null, this.a); - * } - * } - * - * const foo = new Foo(); - * - * const naiveBar = util.promisify(foo.bar); - * // TypeError: Cannot read property 'a' of undefined - * // naiveBar().then(a => console.log(a)); - * - * naiveBar.call(foo).then((a) => console.log(a)); // '42' - * - * const bindBar = naiveBar.bind(foo); - * bindBar().then((a) => console.log(a)); // '42' - * ``` - * @since v8.0.0 - */ - export function promisify(fn: CustomPromisify): TCustom; - export function promisify( - fn: (callback: (err: any, result: TResult) => void) => void, - ): () => Promise; - export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise; - export function promisify( - fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1) => Promise; - export function promisify(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; - export function promisify(fn: Function): Function; - export namespace promisify { - /** - * That can be used to declare custom promisified variants of functions. - */ - const custom: unique symbol; - } - /** - * Stability: 1.1 - Active development - * Given an example `.env` file: - * - * ```js - * import { parseEnv } from 'node:util'; - * - * parseEnv('HELLO=world\nHELLO=oh my\n'); - * // Returns: { HELLO: 'oh my' } - * ``` - * @param content The raw contents of a `.env` file. - * @since v20.12.0 - */ - export function parseEnv(content: string): object; - // https://nodejs.org/docs/latest/api/util.html#foreground-colors - type ForegroundColors = - | "black" - | "blackBright" - | "blue" - | "blueBright" - | "cyan" - | "cyanBright" - | "gray" - | "green" - | "greenBright" - | "grey" - | "magenta" - | "magentaBright" - | "red" - | "redBright" - | "white" - | "whiteBright" - | "yellow" - | "yellowBright"; - // https://nodejs.org/docs/latest/api/util.html#background-colors - type BackgroundColors = - | "bgBlack" - | "bgBlackBright" - | "bgBlue" - | "bgBlueBright" - | "bgCyan" - | "bgCyanBright" - | "bgGray" - | "bgGreen" - | "bgGreenBright" - | "bgGrey" - | "bgMagenta" - | "bgMagentaBright" - | "bgRed" - | "bgRedBright" - | "bgWhite" - | "bgWhiteBright" - | "bgYellow" - | "bgYellowBright"; - // https://nodejs.org/docs/latest/api/util.html#modifiers - type Modifiers = - | "blink" - | "bold" - | "dim" - | "doubleunderline" - | "framed" - | "hidden" - | "inverse" - | "italic" - | "overlined" - | "reset" - | "strikethrough" - | "underline"; - /** - * Stability: 1.1 - Active development - * - * This function returns a formatted text considering the `format` passed. - * - * ```js - * import { styleText } from 'node:util'; - * const errorMessage = styleText('red', 'Error! Error!'); - * console.log(errorMessage); - * ``` - * - * `util.inspect.colors` also provides text formats such as `italic`, and `underline` and you can combine both: - * - * ```js - * console.log( - * util.styleText(['underline', 'italic'], 'My italic underlined message'), - * ); - * ``` - * - * When passing an array of formats, the order of the format applied is left to right so the following style - * might overwrite the previous one. - * - * ```js - * console.log( - * util.styleText(['red', 'green'], 'text'), // green - * ); - * ``` - * - * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v22.x/api/util.html#modifiers). - * @param format A text format or an Array of text formats defined in `util.inspect.colors`. - * @param text The text to to be formatted. - * @since v20.12.0 - */ - export function styleText( - format: - | ForegroundColors - | BackgroundColors - | Modifiers - | Array, - text: string, - ): string; - /** - * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API. - * - * ```js - * const decoder = new TextDecoder(); - * const u8arr = new Uint8Array([72, 101, 108, 108, 111]); - * console.log(decoder.decode(u8arr)); // Hello - * ``` - * @since v8.3.0 - */ - export class TextDecoder { - /** - * The encoding supported by the `TextDecoder` instance. - */ - readonly encoding: string; - /** - * The value will be `true` if decoding errors result in a `TypeError` being - * thrown. - */ - readonly fatal: boolean; - /** - * The value will be `true` if the decoding result will include the byte order - * mark. - */ - readonly ignoreBOM: boolean; - constructor( - encoding?: string, - options?: { - fatal?: boolean | undefined; - ignoreBOM?: boolean | undefined; - }, - ); - /** - * Decodes the `input` and returns a string. If `options.stream` is `true`, any - * incomplete byte sequences occurring at the end of the `input` are buffered - * internally and emitted after the next call to `textDecoder.decode()`. - * - * If `textDecoder.fatal` is `true`, decoding errors that occur will result in a `TypeError` being thrown. - * @param input An `ArrayBuffer`, `DataView`, or `TypedArray` instance containing the encoded data. - */ - decode( - input?: NodeJS.ArrayBufferView | ArrayBuffer | null, - options?: { - stream?: boolean | undefined; - }, - ): string; - } - export interface EncodeIntoResult { - /** - * The read Unicode code units of input. - */ - read: number; - /** - * The written UTF-8 bytes of output. - */ - written: number; - } - export { types }; - - //// TextEncoder/Decoder - /** - * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All - * instances of `TextEncoder` only support UTF-8 encoding. - * - * ```js - * const encoder = new TextEncoder(); - * const uint8array = encoder.encode('this is some data'); - * ``` - * - * The `TextEncoder` class is also available on the global object. - * @since v8.3.0 - */ - export class TextEncoder { - /** - * The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`. - */ - readonly encoding: string; - /** - * UTF-8 encodes the `input` string and returns a `Uint8Array` containing the - * encoded bytes. - * @param [input='an empty string'] The text to encode. - */ - encode(input?: string): Uint8Array; - /** - * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object - * containing the read Unicode code units and written UTF-8 bytes. - * - * ```js - * const encoder = new TextEncoder(); - * const src = 'this is some data'; - * const dest = new Uint8Array(10); - * const { read, written } = encoder.encodeInto(src, dest); - * ``` - * @param src The text to encode. - * @param dest The array to hold the encode result. - */ - encodeInto(src: string, dest: Uint8Array): EncodeIntoResult; - } - import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from "util"; - global { - /** - * `TextDecoder` class is a global reference for `import { TextDecoder } from 'node:util'` - * https://nodejs.org/api/globals.html#textdecoder - * @since v11.0.0 - */ - var TextDecoder: typeof globalThis extends { - onmessage: any; - TextDecoder: infer TextDecoder; - } ? TextDecoder - : typeof _TextDecoder; - /** - * `TextEncoder` class is a global reference for `import { TextEncoder } from 'node:util'` - * https://nodejs.org/api/globals.html#textencoder - * @since v11.0.0 - */ - var TextEncoder: typeof globalThis extends { - onmessage: any; - TextEncoder: infer TextEncoder; - } ? TextEncoder - : typeof _TextEncoder; - } - - //// parseArgs - /** - * Provides a higher level API for command-line argument parsing than interacting - * with `process.argv` directly. Takes a specification for the expected arguments - * and returns a structured object with the parsed options and positionals. - * - * ```js - * import { parseArgs } from 'node:util'; - * const args = ['-f', '--bar', 'b']; - * const options = { - * foo: { - * type: 'boolean', - * short: 'f', - * }, - * bar: { - * type: 'string', - * }, - * }; - * const { - * values, - * positionals, - * } = parseArgs({ args, options }); - * console.log(values, positionals); - * // Prints: [Object: null prototype] { foo: true, bar: 'b' } [] - * ``` - * @since v18.3.0, v16.17.0 - * @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties: - * @return The parsed command line arguments: - */ - export function parseArgs(config?: T): ParsedResults; - interface ParseArgsOptionConfig { - /** - * Type of argument. - */ - type: "string" | "boolean"; - /** - * Whether this option can be provided multiple times. - * If `true`, all values will be collected in an array. - * If `false`, values for the option are last-wins. - * @default false. - */ - multiple?: boolean | undefined; - /** - * A single character alias for the option. - */ - short?: string | undefined; - /** - * The default option value when it is not set by args. - * It must be of the same type as the the `type` property. - * When `multiple` is `true`, it must be an array. - * @since v18.11.0 - */ - default?: string | boolean | string[] | boolean[] | undefined; - } - interface ParseArgsOptionsConfig { - [longOption: string]: ParseArgsOptionConfig; - } - export interface ParseArgsConfig { - /** - * Array of argument strings. - */ - args?: string[] | undefined; - /** - * Used to describe arguments known to the parser. - */ - options?: ParseArgsOptionsConfig | undefined; - /** - * Should an error be thrown when unknown arguments are encountered, - * or when arguments are passed that do not match the `type` configured in `options`. - * @default true - */ - strict?: boolean | undefined; - /** - * Whether this command accepts positional arguments. - */ - allowPositionals?: boolean | undefined; - /** - * If `true`, allows explicitly setting boolean options to `false` by prefixing the option name with `--no-`. - * @default false - * @since v22.4.0 - */ - allowNegative?: boolean | undefined; - /** - * Return the parsed tokens. This is useful for extending the built-in behavior, - * from adding additional checks through to reprocessing the tokens in different ways. - * @default false - */ - tokens?: boolean | undefined; - } - /* - IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties. - TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936 - This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present". - But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present. - So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value. - This is technically incorrect but is a much nicer UX for the common case. - The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false. - */ - type IfDefaultsTrue = T extends true ? IfTrue - : T extends false ? IfFalse - : IfTrue; - - // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false` - type IfDefaultsFalse = T extends false ? IfFalse - : T extends true ? IfTrue - : IfFalse; - - type ExtractOptionValue = IfDefaultsTrue< - T["strict"], - O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean, - string | boolean - >; - - type ApplyOptionalModifiers> = ( - & { -readonly [LongOption in keyof O]?: V[LongOption] } - & { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] } - ) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object - - type ParsedValues = - & IfDefaultsTrue - & (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers< - T["options"], - { - [LongOption in keyof T["options"]]: IfDefaultsFalse< - T["options"][LongOption]["multiple"], - Array>, - ExtractOptionValue - >; - } - > - : {}); - - type ParsedPositionals = IfDefaultsTrue< - T["strict"], - IfDefaultsFalse, - IfDefaultsTrue - >; - - type PreciseTokenForOptions< - K extends string, - O extends ParseArgsOptionConfig, - > = O["type"] extends "string" ? { - kind: "option"; - index: number; - name: K; - rawName: string; - value: string; - inlineValue: boolean; - } - : O["type"] extends "boolean" ? { - kind: "option"; - index: number; - name: K; - rawName: string; - value: undefined; - inlineValue: undefined; - } - : OptionToken & { name: K }; - - type TokenForOptions< - T extends ParseArgsConfig, - K extends keyof T["options"] = keyof T["options"], - > = K extends unknown - ? T["options"] extends ParseArgsOptionsConfig ? PreciseTokenForOptions - : OptionToken - : never; - - type ParsedOptionToken = IfDefaultsTrue, OptionToken>; - - type ParsedPositionalToken = IfDefaultsTrue< - T["strict"], - IfDefaultsFalse, - IfDefaultsTrue - >; - - type ParsedTokens = Array< - ParsedOptionToken | ParsedPositionalToken | { kind: "option-terminator"; index: number } - >; - - type PreciseParsedResults = IfDefaultsFalse< - T["tokens"], - { - values: ParsedValues; - positionals: ParsedPositionals; - tokens: ParsedTokens; - }, - { - values: ParsedValues; - positionals: ParsedPositionals; - } - >; - - type OptionToken = - | { kind: "option"; index: number; name: string; rawName: string; value: string; inlineValue: boolean } - | { - kind: "option"; - index: number; - name: string; - rawName: string; - value: undefined; - inlineValue: undefined; - }; - - type Token = - | OptionToken - | { kind: "positional"; index: number; value: string } - | { kind: "option-terminator"; index: number }; - - // If ParseArgsConfig extends T, then the user passed config constructed elsewhere. - // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above. - type ParsedResults = ParseArgsConfig extends T ? { - values: { - [longOption: string]: undefined | string | boolean | Array; - }; - positionals: string[]; - tokens?: Token[]; - } - : PreciseParsedResults; - - /** - * An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/). - * - * In accordance with browser conventions, all properties of `MIMEType` objects - * are implemented as getters and setters on the class prototype, rather than as - * data properties on the object itself. - * - * A MIME string is a structured string containing multiple meaningful - * components. When parsed, a `MIMEType` object is returned containing - * properties for each of these components. - * @since v19.1.0, v18.13.0 - * @experimental - */ - export class MIMEType { - /** - * Creates a new MIMEType object by parsing the input. - * - * A `TypeError` will be thrown if the `input` is not a valid MIME. - * Note that an effort will be made to coerce the given values into strings. - * @param input The input MIME to parse. - */ - constructor(input: string | { toString: () => string }); - - /** - * Gets and sets the type portion of the MIME. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const myMIME = new MIMEType('text/javascript'); - * console.log(myMIME.type); - * // Prints: text - * myMIME.type = 'application'; - * console.log(myMIME.type); - * // Prints: application - * console.log(String(myMIME)); - * // Prints: application/javascript - * ``` - */ - type: string; - /** - * Gets and sets the subtype portion of the MIME. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const myMIME = new MIMEType('text/ecmascript'); - * console.log(myMIME.subtype); - * // Prints: ecmascript - * myMIME.subtype = 'javascript'; - * console.log(myMIME.subtype); - * // Prints: javascript - * console.log(String(myMIME)); - * // Prints: text/javascript - * ``` - */ - subtype: string; - /** - * Gets the essence of the MIME. This property is read only. - * Use `mime.type` or `mime.subtype` to alter the MIME. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const myMIME = new MIMEType('text/javascript;key=value'); - * console.log(myMIME.essence); - * // Prints: text/javascript - * myMIME.type = 'application'; - * console.log(myMIME.essence); - * // Prints: application/javascript - * console.log(String(myMIME)); - * // Prints: application/javascript;key=value - * ``` - */ - readonly essence: string; - /** - * Gets the `MIMEParams` object representing the - * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details. - */ - readonly params: MIMEParams; - /** - * The `toString()` method on the `MIMEType` object returns the serialized MIME. - * - * Because of the need for standard compliance, this method does not allow users - * to customize the serialization process of the MIME. - */ - toString(): string; - } - /** - * The `MIMEParams` API provides read and write access to the parameters of a `MIMEType`. - * @since v19.1.0, v18.13.0 - */ - export class MIMEParams { - /** - * Remove all name-value pairs whose name is `name`. - */ - delete(name: string): void; - /** - * Returns an iterator over each of the name-value pairs in the parameters. - * Each item of the iterator is a JavaScript `Array`. The first item of the array - * is the `name`, the second item of the array is the `value`. - */ - entries(): NodeJS.Iterator<[name: string, value: string]>; - /** - * Returns the value of the first name-value pair whose name is `name`. If there - * are no such pairs, `null` is returned. - * @return or `null` if there is no name-value pair with the given `name`. - */ - get(name: string): string | null; - /** - * Returns `true` if there is at least one name-value pair whose name is `name`. - */ - has(name: string): boolean; - /** - * Returns an iterator over the names of each name-value pair. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const { params } = new MIMEType('text/plain;foo=0;bar=1'); - * for (const name of params.keys()) { - * console.log(name); - * } - * // Prints: - * // foo - * // bar - * ``` - */ - keys(): NodeJS.Iterator; - /** - * Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`, - * set the first such pair's value to `value`. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const { params } = new MIMEType('text/plain;foo=0;bar=1'); - * params.set('foo', 'def'); - * params.set('baz', 'xyz'); - * console.log(params.toString()); - * // Prints: foo=def;bar=1;baz=xyz - * ``` - */ - set(name: string, value: string): void; - /** - * Returns an iterator over the values of each name-value pair. - */ - values(): NodeJS.Iterator; - /** - * Returns an iterator over each of the name-value pairs in the parameters. - */ - [Symbol.iterator](): NodeJS.Iterator<[name: string, value: string]>; - } -} -declare module "util/types" { - import { KeyObject, webcrypto } from "node:crypto"; - /** - * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or - * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. - * - * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`. - * - * ```js - * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true - * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true - * ``` - * @since v10.0.0 - */ - function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike; - /** - * Returns `true` if the value is an `arguments` object. - * - * ```js - * function foo() { - * util.types.isArgumentsObject(arguments); // Returns true - * } - * ``` - * @since v10.0.0 - */ - function isArgumentsObject(object: unknown): object is IArguments; - /** - * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance. - * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is - * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. - * - * ```js - * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true - * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false - * ``` - * @since v10.0.0 - */ - function isArrayBuffer(object: unknown): object is ArrayBuffer; - /** - * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed - * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to - * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). - * - * ```js - * util.types.isArrayBufferView(new Int8Array()); // true - * util.types.isArrayBufferView(Buffer.from('hello world')); // true - * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true - * util.types.isArrayBufferView(new ArrayBuffer()); // false - * ``` - * @since v10.0.0 - */ - function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView; - /** - * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function). - * This only reports back what the JavaScript engine is seeing; - * in particular, the return value may not match the original source code if - * a transpilation tool was used. - * - * ```js - * util.types.isAsyncFunction(function foo() {}); // Returns false - * util.types.isAsyncFunction(async function foo() {}); // Returns true - * ``` - * @since v10.0.0 - */ - function isAsyncFunction(object: unknown): boolean; - /** - * Returns `true` if the value is a `BigInt64Array` instance. - * - * ```js - * util.types.isBigInt64Array(new BigInt64Array()); // Returns true - * util.types.isBigInt64Array(new BigUint64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isBigInt64Array(value: unknown): value is BigInt64Array; - /** - * Returns `true` if the value is a `BigUint64Array` instance. - * - * ```js - * util.types.isBigUint64Array(new BigInt64Array()); // Returns false - * util.types.isBigUint64Array(new BigUint64Array()); // Returns true - * ``` - * @since v10.0.0 - */ - function isBigUint64Array(value: unknown): value is BigUint64Array; - /** - * Returns `true` if the value is a boolean object, e.g. created - * by `new Boolean()`. - * - * ```js - * util.types.isBooleanObject(false); // Returns false - * util.types.isBooleanObject(true); // Returns false - * util.types.isBooleanObject(new Boolean(false)); // Returns true - * util.types.isBooleanObject(new Boolean(true)); // Returns true - * util.types.isBooleanObject(Boolean(false)); // Returns false - * util.types.isBooleanObject(Boolean(true)); // Returns false - * ``` - * @since v10.0.0 - */ - function isBooleanObject(object: unknown): object is Boolean; - /** - * Returns `true` if the value is any boxed primitive object, e.g. created - * by `new Boolean()`, `new String()` or `Object(Symbol())`. - * - * For example: - * - * ```js - * util.types.isBoxedPrimitive(false); // Returns false - * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true - * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false - * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true - * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true - * ``` - * @since v10.11.0 - */ - function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol; - /** - * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance. - * - * ```js - * const ab = new ArrayBuffer(20); - * util.types.isDataView(new DataView(ab)); // Returns true - * util.types.isDataView(new Float64Array()); // Returns false - * ``` - * - * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). - * @since v10.0.0 - */ - function isDataView(object: unknown): object is DataView; - /** - * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance. - * - * ```js - * util.types.isDate(new Date()); // Returns true - * ``` - * @since v10.0.0 - */ - function isDate(object: unknown): object is Date; - /** - * Returns `true` if the value is a native `External` value. - * - * A native `External` value is a special type of object that contains a - * raw C++ pointer (`void*`) for access from native code, and has no other - * properties. Such objects are created either by Node.js internals or native - * addons. In JavaScript, they are [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a`null` prototype. - * - * ```c - * #include - * #include - * napi_value result; - * static napi_value MyNapi(napi_env env, napi_callback_info info) { - * int* raw = (int*) malloc(1024); - * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result); - * if (status != napi_ok) { - * napi_throw_error(env, NULL, "napi_create_external failed"); - * return NULL; - * } - * return result; - * } - * ... - * DECLARE_NAPI_PROPERTY("myNapi", MyNapi) - * ... - * ``` - * - * ```js - * const native = require('napi_addon.node'); - * const data = native.myNapi(); - * util.types.isExternal(data); // returns true - * util.types.isExternal(0); // returns false - * util.types.isExternal(new String('foo')); // returns false - * ``` - * - * For further information on `napi_create_external`, refer to `napi_create_external()`. - * @since v10.0.0 - */ - function isExternal(object: unknown): boolean; - /** - * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance. - * - * ```js - * util.types.isFloat32Array(new ArrayBuffer()); // Returns false - * util.types.isFloat32Array(new Float32Array()); // Returns true - * util.types.isFloat32Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isFloat32Array(object: unknown): object is Float32Array; - /** - * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance. - * - * ```js - * util.types.isFloat64Array(new ArrayBuffer()); // Returns false - * util.types.isFloat64Array(new Uint8Array()); // Returns false - * util.types.isFloat64Array(new Float64Array()); // Returns true - * ``` - * @since v10.0.0 - */ - function isFloat64Array(object: unknown): object is Float64Array; - /** - * Returns `true` if the value is a generator function. - * This only reports back what the JavaScript engine is seeing; - * in particular, the return value may not match the original source code if - * a transpilation tool was used. - * - * ```js - * util.types.isGeneratorFunction(function foo() {}); // Returns false - * util.types.isGeneratorFunction(function* foo() {}); // Returns true - * ``` - * @since v10.0.0 - */ - function isGeneratorFunction(object: unknown): object is GeneratorFunction; - /** - * Returns `true` if the value is a generator object as returned from a - * built-in generator function. - * This only reports back what the JavaScript engine is seeing; - * in particular, the return value may not match the original source code if - * a transpilation tool was used. - * - * ```js - * function* foo() {} - * const generator = foo(); - * util.types.isGeneratorObject(generator); // Returns true - * ``` - * @since v10.0.0 - */ - function isGeneratorObject(object: unknown): object is Generator; - /** - * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance. - * - * ```js - * util.types.isInt8Array(new ArrayBuffer()); // Returns false - * util.types.isInt8Array(new Int8Array()); // Returns true - * util.types.isInt8Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isInt8Array(object: unknown): object is Int8Array; - /** - * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance. - * - * ```js - * util.types.isInt16Array(new ArrayBuffer()); // Returns false - * util.types.isInt16Array(new Int16Array()); // Returns true - * util.types.isInt16Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isInt16Array(object: unknown): object is Int16Array; - /** - * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance. - * - * ```js - * util.types.isInt32Array(new ArrayBuffer()); // Returns false - * util.types.isInt32Array(new Int32Array()); // Returns true - * util.types.isInt32Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isInt32Array(object: unknown): object is Int32Array; - /** - * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. - * - * ```js - * util.types.isMap(new Map()); // Returns true - * ``` - * @since v10.0.0 - */ - function isMap( - object: T | {}, - ): object is T extends ReadonlyMap ? (unknown extends T ? never : ReadonlyMap) - : Map; - /** - * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. - * - * ```js - * const map = new Map(); - * util.types.isMapIterator(map.keys()); // Returns true - * util.types.isMapIterator(map.values()); // Returns true - * util.types.isMapIterator(map.entries()); // Returns true - * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true - * ``` - * @since v10.0.0 - */ - function isMapIterator(object: unknown): boolean; - /** - * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects). - * - * ```js - * import * as ns from './a.js'; - * - * util.types.isModuleNamespaceObject(ns); // Returns true - * ``` - * @since v10.0.0 - */ - function isModuleNamespaceObject(value: unknown): boolean; - /** - * Returns `true` if the value was returned by the constructor of a [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects). - * - * ```js - * console.log(util.types.isNativeError(new Error())); // true - * console.log(util.types.isNativeError(new TypeError())); // true - * console.log(util.types.isNativeError(new RangeError())); // true - * ``` - * - * Subclasses of the native error types are also native errors: - * - * ```js - * class MyError extends Error {} - * console.log(util.types.isNativeError(new MyError())); // true - * ``` - * - * A value being `instanceof` a native error class is not equivalent to `isNativeError()` returning `true` for that value. `isNativeError()` returns `true` for errors - * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false` for these errors: - * - * ```js - * import vm from 'node:vm'; - * const context = vm.createContext({}); - * const myError = vm.runInContext('new Error()', context); - * console.log(util.types.isNativeError(myError)); // true - * console.log(myError instanceof Error); // false - * ``` - * - * Conversely, `isNativeError()` returns `false` for all objects which were not - * returned by the constructor of a native error. That includes values - * which are `instanceof` native errors: - * - * ```js - * const myError = { __proto__: Error.prototype }; - * console.log(util.types.isNativeError(myError)); // false - * console.log(myError instanceof Error); // true - * ``` - * @since v10.0.0 - */ - function isNativeError(object: unknown): object is Error; - /** - * Returns `true` if the value is a number object, e.g. created - * by `new Number()`. - * - * ```js - * util.types.isNumberObject(0); // Returns false - * util.types.isNumberObject(new Number(0)); // Returns true - * ``` - * @since v10.0.0 - */ - function isNumberObject(object: unknown): object is Number; - /** - * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). - * - * ```js - * util.types.isPromise(Promise.resolve(42)); // Returns true - * ``` - * @since v10.0.0 - */ - function isPromise(object: unknown): object is Promise; - /** - * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance. - * - * ```js - * const target = {}; - * const proxy = new Proxy(target, {}); - * util.types.isProxy(target); // Returns false - * util.types.isProxy(proxy); // Returns true - * ``` - * @since v10.0.0 - */ - function isProxy(object: unknown): boolean; - /** - * Returns `true` if the value is a regular expression object. - * - * ```js - * util.types.isRegExp(/abc/); // Returns true - * util.types.isRegExp(new RegExp('abc')); // Returns true - * ``` - * @since v10.0.0 - */ - function isRegExp(object: unknown): object is RegExp; - /** - * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. - * - * ```js - * util.types.isSet(new Set()); // Returns true - * ``` - * @since v10.0.0 - */ - function isSet( - object: T | {}, - ): object is T extends ReadonlySet ? (unknown extends T ? never : ReadonlySet) : Set; - /** - * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. - * - * ```js - * const set = new Set(); - * util.types.isSetIterator(set.keys()); // Returns true - * util.types.isSetIterator(set.values()); // Returns true - * util.types.isSetIterator(set.entries()); // Returns true - * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true - * ``` - * @since v10.0.0 - */ - function isSetIterator(object: unknown): boolean; - /** - * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. - * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is - * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. - * - * ```js - * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false - * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true - * ``` - * @since v10.0.0 - */ - function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer; - /** - * Returns `true` if the value is a string object, e.g. created - * by `new String()`. - * - * ```js - * util.types.isStringObject('foo'); // Returns false - * util.types.isStringObject(new String('foo')); // Returns true - * ``` - * @since v10.0.0 - */ - function isStringObject(object: unknown): object is String; - /** - * Returns `true` if the value is a symbol object, created - * by calling `Object()` on a `Symbol` primitive. - * - * ```js - * const symbol = Symbol('foo'); - * util.types.isSymbolObject(symbol); // Returns false - * util.types.isSymbolObject(Object(symbol)); // Returns true - * ``` - * @since v10.0.0 - */ - function isSymbolObject(object: unknown): object is Symbol; - /** - * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance. - * - * ```js - * util.types.isTypedArray(new ArrayBuffer()); // Returns false - * util.types.isTypedArray(new Uint8Array()); // Returns true - * util.types.isTypedArray(new Float64Array()); // Returns true - * ``` - * - * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). - * @since v10.0.0 - */ - function isTypedArray(object: unknown): object is NodeJS.TypedArray; - /** - * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance. - * - * ```js - * util.types.isUint8Array(new ArrayBuffer()); // Returns false - * util.types.isUint8Array(new Uint8Array()); // Returns true - * util.types.isUint8Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint8Array(object: unknown): object is Uint8Array; - /** - * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance. - * - * ```js - * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false - * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true - * util.types.isUint8ClampedArray(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray; - /** - * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance. - * - * ```js - * util.types.isUint16Array(new ArrayBuffer()); // Returns false - * util.types.isUint16Array(new Uint16Array()); // Returns true - * util.types.isUint16Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint16Array(object: unknown): object is Uint16Array; - /** - * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance. - * - * ```js - * util.types.isUint32Array(new ArrayBuffer()); // Returns false - * util.types.isUint32Array(new Uint32Array()); // Returns true - * util.types.isUint32Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint32Array(object: unknown): object is Uint32Array; - /** - * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance. - * - * ```js - * util.types.isWeakMap(new WeakMap()); // Returns true - * ``` - * @since v10.0.0 - */ - function isWeakMap(object: unknown): object is WeakMap; - /** - * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance. - * - * ```js - * util.types.isWeakSet(new WeakSet()); // Returns true - * ``` - * @since v10.0.0 - */ - function isWeakSet(object: unknown): object is WeakSet; - /** - * Returns `true` if `value` is a `KeyObject`, `false` otherwise. - * @since v16.2.0 - */ - function isKeyObject(object: unknown): object is KeyObject; - /** - * Returns `true` if `value` is a `CryptoKey`, `false` otherwise. - * @since v16.2.0 - */ - function isCryptoKey(object: unknown): object is webcrypto.CryptoKey; -} -declare module "node:util" { - export * from "util"; -} -declare module "node:util/types" { - export * from "util/types"; -} diff --git a/web/static/node_modules/@types/node/v8.d.ts b/web/static/node_modules/@types/node/v8.d.ts deleted file mode 100644 index 040bcfaf..00000000 --- a/web/static/node_modules/@types/node/v8.d.ts +++ /dev/null @@ -1,808 +0,0 @@ -/** - * The `node:v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using: - * - * ```js - * import v8 from 'node:v8'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/v8.js) - */ -declare module "v8" { - import { Readable } from "node:stream"; - interface HeapSpaceInfo { - space_name: string; - space_size: number; - space_used_size: number; - space_available_size: number; - physical_space_size: number; - } - // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ - type DoesZapCodeSpaceFlag = 0 | 1; - interface HeapInfo { - total_heap_size: number; - total_heap_size_executable: number; - total_physical_size: number; - total_available_size: number; - used_heap_size: number; - heap_size_limit: number; - malloced_memory: number; - peak_malloced_memory: number; - does_zap_garbage: DoesZapCodeSpaceFlag; - number_of_native_contexts: number; - number_of_detached_contexts: number; - total_global_handles_size: number; - used_global_handles_size: number; - external_memory: number; - } - interface HeapCodeStatistics { - code_and_metadata_size: number; - bytecode_and_metadata_size: number; - external_script_source_size: number; - } - interface HeapSnapshotOptions { - /** - * If true, expose internals in the heap snapshot. - * @default false - */ - exposeInternals?: boolean; - /** - * If true, expose numeric values in artificial fields. - * @default false - */ - exposeNumericValues?: boolean; - } - /** - * Returns an integer representing a version tag derived from the V8 version, - * command-line flags, and detected CPU features. This is useful for determining - * whether a `vm.Script` `cachedData` buffer is compatible with this instance - * of V8. - * - * ```js - * console.log(v8.cachedDataVersionTag()); // 3947234607 - * // The value returned by v8.cachedDataVersionTag() is derived from the V8 - * // version, command-line flags, and detected CPU features. Test that the value - * // does indeed update when flags are toggled. - * v8.setFlagsFromString('--allow_natives_syntax'); - * console.log(v8.cachedDataVersionTag()); // 183726201 - * ``` - * @since v8.0.0 - */ - function cachedDataVersionTag(): number; - /** - * Returns an object with the following properties: - * - * `does_zap_garbage` is a 0/1 boolean, which signifies whether the `--zap_code_space` option is enabled or not. This makes V8 overwrite heap - * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger - * because it continuously touches all heap pages and that makes them less likely - * to get swapped out by the operating system. - * - * `number_of_native_contexts` The value of native\_context is the number of the - * top-level contexts currently active. Increase of this number over time indicates - * a memory leak. - * - * `number_of_detached_contexts` The value of detached\_context is the number - * of contexts that were detached and not yet garbage collected. This number - * being non-zero indicates a potential memory leak. - * - * `total_global_handles_size` The value of total\_global\_handles\_size is the - * total memory size of V8 global handles. - * - * `used_global_handles_size` The value of used\_global\_handles\_size is the - * used memory size of V8 global handles. - * - * `external_memory` The value of external\_memory is the memory size of array - * buffers and external strings. - * - * ```js - * { - * total_heap_size: 7326976, - * total_heap_size_executable: 4194304, - * total_physical_size: 7326976, - * total_available_size: 1152656, - * used_heap_size: 3476208, - * heap_size_limit: 1535115264, - * malloced_memory: 16384, - * peak_malloced_memory: 1127496, - * does_zap_garbage: 0, - * number_of_native_contexts: 1, - * number_of_detached_contexts: 0, - * total_global_handles_size: 8192, - * used_global_handles_size: 3296, - * external_memory: 318824 - * } - * ``` - * @since v1.0.0 - */ - function getHeapStatistics(): HeapInfo; - /** - * Returns statistics about the V8 heap spaces, i.e. the segments which make up - * the V8 heap. Neither the ordering of heap spaces, nor the availability of a - * heap space can be guaranteed as the statistics are provided via the - * V8 [`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the - * next. - * - * The value returned is an array of objects containing the following properties: - * - * ```json - * [ - * { - * "space_name": "new_space", - * "space_size": 2063872, - * "space_used_size": 951112, - * "space_available_size": 80824, - * "physical_space_size": 2063872 - * }, - * { - * "space_name": "old_space", - * "space_size": 3090560, - * "space_used_size": 2493792, - * "space_available_size": 0, - * "physical_space_size": 3090560 - * }, - * { - * "space_name": "code_space", - * "space_size": 1260160, - * "space_used_size": 644256, - * "space_available_size": 960, - * "physical_space_size": 1260160 - * }, - * { - * "space_name": "map_space", - * "space_size": 1094160, - * "space_used_size": 201608, - * "space_available_size": 0, - * "physical_space_size": 1094160 - * }, - * { - * "space_name": "large_object_space", - * "space_size": 0, - * "space_used_size": 0, - * "space_available_size": 1490980608, - * "physical_space_size": 0 - * } - * ] - * ``` - * @since v6.0.0 - */ - function getHeapSpaceStatistics(): HeapSpaceInfo[]; - /** - * The `v8.setFlagsFromString()` method can be used to programmatically set - * V8 command-line flags. This method should be used with care. Changing settings - * after the VM has started may result in unpredictable behavior, including - * crashes and data loss; or it may simply do nothing. - * - * The V8 options available for a version of Node.js may be determined by running `node --v8-options`. - * - * Usage: - * - * ```js - * // Print GC events to stdout for one minute. - * import v8 from 'node:v8'; - * v8.setFlagsFromString('--trace_gc'); - * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3); - * ``` - * @since v1.0.0 - */ - function setFlagsFromString(flags: string): void; - /** - * This is similar to the [`queryObjects()` console API](https://developer.chrome.com/docs/devtools/console/utilities#queryObjects-function) - * provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain - * in the heap after a full garbage collection, which can be useful for memory leak regression tests. To avoid surprising results, users should - * avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the - * application. - * - * To avoid accidental leaks, this API does not return raw references to the objects found. By default, it returns the count of the objects - * found. If `options.format` is `'summary'`, it returns an array containing brief string representations for each object. The visibility provided - * in this API is similar to what the heap snapshot provides, while users can save the cost of serialization and parsing and directly filter the - * target objects during the search. - * - * Only objects created in the current execution context are included in the results. - * - * ```js - * import { queryObjects } from 'node:v8'; - * class A { foo = 'bar'; } - * console.log(queryObjects(A)); // 0 - * const a = new A(); - * console.log(queryObjects(A)); // 1 - * // [ "A { foo: 'bar' }" ] - * console.log(queryObjects(A, { format: 'summary' })); - * - * class B extends A { bar = 'qux'; } - * const b = new B(); - * console.log(queryObjects(B)); // 1 - * // [ "B { foo: 'bar', bar: 'qux' }" ] - * console.log(queryObjects(B, { format: 'summary' })); - * - * // Note that, when there are child classes inheriting from a constructor, - * // the constructor also shows up in the prototype chain of the child - * // classes's prototoype, so the child classes's prototoype would also be - * // included in the result. - * console.log(queryObjects(A)); // 3 - * // [ "B { foo: 'bar', bar: 'qux' }", 'A {}', "A { foo: 'bar' }" ] - * console.log(queryObjects(A, { format: 'summary' })); - * ``` - * @param ctor The constructor that can be used to search on the prototype chain in order to filter target objects in the heap. - * @since v20.13.0 - * @experimental - */ - function queryObjects(ctor: Function): number | string[]; - function queryObjects(ctor: Function, options: { format: "count" }): number; - function queryObjects(ctor: Function, options: { format: "summary" }): string[]; - /** - * Generates a snapshot of the current V8 heap and returns a Readable - * Stream that may be used to read the JSON serialized representation. - * This JSON stream format is intended to be used with tools such as - * Chrome DevTools. The JSON schema is undocumented and specific to the - * V8 engine. Therefore, the schema may change from one version of V8 to the next. - * - * Creating a heap snapshot requires memory about twice the size of the heap at - * the time the snapshot is created. This results in the risk of OOM killers - * terminating the process. - * - * Generating a snapshot is a synchronous operation which blocks the event loop - * for a duration depending on the heap size. - * - * ```js - * // Print heap snapshot to the console - * import v8 from 'node:v8'; - * const stream = v8.getHeapSnapshot(); - * stream.pipe(process.stdout); - * ``` - * @since v11.13.0 - * @return A Readable containing the V8 heap snapshot. - */ - function getHeapSnapshot(options?: HeapSnapshotOptions): Readable; - /** - * Generates a snapshot of the current V8 heap and writes it to a JSON - * file. This file is intended to be used with tools such as Chrome - * DevTools. The JSON schema is undocumented and specific to the V8 - * engine, and may change from one version of V8 to the next. - * - * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will - * not contain any information about the workers, and vice versa. - * - * Creating a heap snapshot requires memory about twice the size of the heap at - * the time the snapshot is created. This results in the risk of OOM killers - * terminating the process. - * - * Generating a snapshot is a synchronous operation which blocks the event loop - * for a duration depending on the heap size. - * - * ```js - * import { writeHeapSnapshot } from 'node:v8'; - * import { - * Worker, - * isMainThread, - * parentPort, - * } from 'node:worker_threads'; - * - * if (isMainThread) { - * const worker = new Worker(__filename); - * - * worker.once('message', (filename) => { - * console.log(`worker heapdump: ${filename}`); - * // Now get a heapdump for the main thread. - * console.log(`main thread heapdump: ${writeHeapSnapshot()}`); - * }); - * - * // Tell the worker to create a heapdump. - * worker.postMessage('heapdump'); - * } else { - * parentPort.once('message', (message) => { - * if (message === 'heapdump') { - * // Generate a heapdump for the worker - * // and return the filename to the parent. - * parentPort.postMessage(writeHeapSnapshot()); - * } - * }); - * } - * ``` - * @since v11.13.0 - * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be - * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a - * worker thread. - * @return The filename where the snapshot was saved. - */ - function writeHeapSnapshot(filename?: string, options?: HeapSnapshotOptions): string; - /** - * Get statistics about code and its metadata in the heap, see - * V8 [`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the - * following properties: - * - * ```js - * { - * code_and_metadata_size: 212208, - * bytecode_and_metadata_size: 161368, - * external_script_source_size: 1410794, - * cpu_profiler_metadata_size: 0, - * } - * ``` - * @since v12.8.0 - */ - function getHeapCodeStatistics(): HeapCodeStatistics; - /** - * @since v8.0.0 - */ - class Serializer { - /** - * Writes out a header, which includes the serialization format version. - */ - writeHeader(): void; - /** - * Serializes a JavaScript value and adds the serialized representation to the - * internal buffer. - * - * This throws an error if `value` cannot be serialized. - */ - writeValue(val: any): boolean; - /** - * Returns the stored internal buffer. This serializer should not be used once - * the buffer is released. Calling this method results in undefined behavior - * if a previous write has failed. - */ - releaseBuffer(): Buffer; - /** - * Marks an `ArrayBuffer` as having its contents transferred out of band. - * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`. - * @param id A 32-bit unsigned integer. - * @param arrayBuffer An `ArrayBuffer` instance. - */ - transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; - /** - * Write a raw 32-bit unsigned integer. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeUint32(value: number): void; - /** - * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeUint64(hi: number, lo: number): void; - /** - * Write a JS `number` value. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeDouble(value: number): void; - /** - * Write raw bytes into the serializer's internal buffer. The deserializer - * will require a way to compute the length of the buffer. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeRawBytes(buffer: NodeJS.TypedArray): void; - } - /** - * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only - * stores the part of their underlying `ArrayBuffer`s that they are referring to. - * @since v8.0.0 - */ - class DefaultSerializer extends Serializer {} - /** - * @since v8.0.0 - */ - class Deserializer { - constructor(data: NodeJS.TypedArray); - /** - * Reads and validates a header (including the format version). - * May, for example, reject an invalid or unsupported wire format. In that case, - * an `Error` is thrown. - */ - readHeader(): boolean; - /** - * Deserializes a JavaScript value from the buffer and returns it. - */ - readValue(): any; - /** - * Marks an `ArrayBuffer` as having its contents transferred out of band. - * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of - * `SharedArrayBuffer`s). - * @param id A 32-bit unsigned integer. - * @param arrayBuffer An `ArrayBuffer` instance. - */ - transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; - /** - * Reads the underlying wire format version. Likely mostly to be useful to - * legacy code reading old wire format versions. May not be called before `.readHeader()`. - */ - getWireFormatVersion(): number; - /** - * Read a raw 32-bit unsigned integer and return it. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readUint32(): number; - /** - * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]` with two 32-bit unsigned integer entries. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readUint64(): [number, number]; - /** - * Read a JS `number` value. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readDouble(): number; - /** - * Read raw bytes from the deserializer's internal buffer. The `length` parameter - * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readRawBytes(length: number): Buffer; - } - /** - * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`. - * @since v8.0.0 - */ - class DefaultDeserializer extends Deserializer {} - /** - * Uses a `DefaultSerializer` to serialize `value` into a buffer. - * - * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to - * serialize a huge object which requires buffer - * larger than `buffer.constants.MAX_LENGTH`. - * @since v8.0.0 - */ - function serialize(value: any): Buffer; - /** - * Uses a `DefaultDeserializer` with default options to read a JS value - * from a buffer. - * @since v8.0.0 - * @param buffer A buffer returned by {@link serialize}. - */ - function deserialize(buffer: NodeJS.TypedArray): any; - /** - * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple - * times during the lifetime of the process. Each time the execution counter will - * be reset and a new coverage report will be written to the directory specified - * by `NODE_V8_COVERAGE`. - * - * When the process is about to exit, one last coverage will still be written to - * disk unless {@link stopCoverage} is invoked before the process exits. - * @since v15.1.0, v14.18.0, v12.22.0 - */ - function takeCoverage(): void; - /** - * The `v8.stopCoverage()` method allows the user to stop the coverage collection - * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count - * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand. - * @since v15.1.0, v14.18.0, v12.22.0 - */ - function stopCoverage(): void; - /** - * The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once. - * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information. - * @experimental - * @since v18.10.0, v16.18.0 - */ - function setHeapSnapshotNearHeapLimit(limit: number): void; - /** - * This API collects GC data in current thread. - * @since v19.6.0, v18.15.0 - */ - class GCProfiler { - /** - * Start collecting GC data. - * @since v19.6.0, v18.15.0 - */ - start(): void; - /** - * Stop collecting GC data and return an object. The content of object - * is as follows. - * - * ```json - * { - * "version": 1, - * "startTime": 1674059033862, - * "statistics": [ - * { - * "gcType": "Scavenge", - * "beforeGC": { - * "heapStatistics": { - * "totalHeapSize": 5005312, - * "totalHeapSizeExecutable": 524288, - * "totalPhysicalSize": 5226496, - * "totalAvailableSize": 4341325216, - * "totalGlobalHandlesSize": 8192, - * "usedGlobalHandlesSize": 2112, - * "usedHeapSize": 4883840, - * "heapSizeLimit": 4345298944, - * "mallocedMemory": 254128, - * "externalMemory": 225138, - * "peakMallocedMemory": 181760 - * }, - * "heapSpaceStatistics": [ - * { - * "spaceName": "read_only_space", - * "spaceSize": 0, - * "spaceUsedSize": 0, - * "spaceAvailableSize": 0, - * "physicalSpaceSize": 0 - * } - * ] - * }, - * "cost": 1574.14, - * "afterGC": { - * "heapStatistics": { - * "totalHeapSize": 6053888, - * "totalHeapSizeExecutable": 524288, - * "totalPhysicalSize": 5500928, - * "totalAvailableSize": 4341101384, - * "totalGlobalHandlesSize": 8192, - * "usedGlobalHandlesSize": 2112, - * "usedHeapSize": 4059096, - * "heapSizeLimit": 4345298944, - * "mallocedMemory": 254128, - * "externalMemory": 225138, - * "peakMallocedMemory": 181760 - * }, - * "heapSpaceStatistics": [ - * { - * "spaceName": "read_only_space", - * "spaceSize": 0, - * "spaceUsedSize": 0, - * "spaceAvailableSize": 0, - * "physicalSpaceSize": 0 - * } - * ] - * } - * } - * ], - * "endTime": 1674059036865 - * } - * ``` - * - * Here's an example. - * - * ```js - * import { GCProfiler } from 'node:v8'; - * const profiler = new GCProfiler(); - * profiler.start(); - * setTimeout(() => { - * console.log(profiler.stop()); - * }, 1000); - * ``` - * @since v19.6.0, v18.15.0 - */ - stop(): GCProfilerResult; - } - interface GCProfilerResult { - version: number; - startTime: number; - endTime: number; - statistics: Array<{ - gcType: string; - cost: number; - beforeGC: { - heapStatistics: HeapStatistics; - heapSpaceStatistics: HeapSpaceStatistics[]; - }; - afterGC: { - heapStatistics: HeapStatistics; - heapSpaceStatistics: HeapSpaceStatistics[]; - }; - }>; - } - interface HeapStatistics { - totalHeapSize: number; - totalHeapSizeExecutable: number; - totalPhysicalSize: number; - totalAvailableSize: number; - totalGlobalHandlesSize: number; - usedGlobalHandlesSize: number; - usedHeapSize: number; - heapSizeLimit: number; - mallocedMemory: number; - externalMemory: number; - peakMallocedMemory: number; - } - interface HeapSpaceStatistics { - spaceName: string; - spaceSize: number; - spaceUsedSize: number; - spaceAvailableSize: number; - physicalSpaceSize: number; - } - /** - * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will - * happen if a promise is created without ever getting a continuation. - * @since v17.1.0, v16.14.0 - * @param promise The promise being created. - * @param parent The promise continued from, if applicable. - */ - interface Init { - (promise: Promise, parent: Promise): void; - } - /** - * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming. - * - * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise. - * The before callback may be called many times in the case where many continuations have been made from the same promise. - * @since v17.1.0, v16.14.0 - */ - interface Before { - (promise: Promise): void; - } - /** - * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await. - * @since v17.1.0, v16.14.0 - */ - interface After { - (promise: Promise): void; - } - /** - * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or - * {@link Promise.reject()}. - * @since v17.1.0, v16.14.0 - */ - interface Settled { - (promise: Promise): void; - } - /** - * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or - * around an await, and when the promise resolves or rejects. - * - * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and - * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop. - * @since v17.1.0, v16.14.0 - */ - interface HookCallbacks { - init?: Init; - before?: Before; - after?: After; - settled?: Settled; - } - interface PromiseHooks { - /** - * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param init The {@link Init | `init` callback} to call when a promise is created. - * @return Call to stop the hook. - */ - onInit: (init: Init) => Function; - /** - * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param settled The {@link Settled | `settled` callback} to call when a promise is created. - * @return Call to stop the hook. - */ - onSettled: (settled: Settled) => Function; - /** - * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param before The {@link Before | `before` callback} to call before a promise continuation executes. - * @return Call to stop the hook. - */ - onBefore: (before: Before) => Function; - /** - * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param after The {@link After | `after` callback} to call after a promise continuation executes. - * @return Call to stop the hook. - */ - onAfter: (after: After) => Function; - /** - * Registers functions to be called for different lifetime events of each promise. - * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime. - * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed. - * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register - * @return Used for disabling hooks - */ - createHook: (callbacks: HookCallbacks) => Function; - } - /** - * The `promiseHooks` interface can be used to track promise lifecycle events. - * @since v17.1.0, v16.14.0 - */ - const promiseHooks: PromiseHooks; - type StartupSnapshotCallbackFn = (args: any) => any; - interface StartupSnapshot { - /** - * Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit. - * This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization. - * @since v18.6.0, v16.17.0 - */ - addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * Add a callback that will be called when the Node.js instance is deserialized from a snapshot. - * The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or - * to re-acquire resources that the application needs when the application is restarted from the snapshot. - * @since v18.6.0, v16.17.0 - */ - addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script. - * If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized - * data (if provided), otherwise an entry point script still needs to be provided to the deserialized application. - * @since v18.6.0, v16.17.0 - */ - setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * Returns true if the Node.js instance is run to build a snapshot. - * @since v18.6.0, v16.17.0 - */ - isBuildingSnapshot(): boolean; - } - /** - * The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots. - * - * ```bash - * $ node --snapshot-blob snapshot.blob --build-snapshot entry.js - * # This launches a process with the snapshot - * $ node --snapshot-blob snapshot.blob - * ``` - * - * In the example above, `entry.js` can use methods from the `v8.startupSnapshot` interface to specify how to save information for custom objects - * in the snapshot during serialization and how the information can be used to synchronize these objects during deserialization of the snapshot. - * For example, if the `entry.js` contains the following script: - * - * ```js - * 'use strict'; - * - * import fs from 'node:fs'; - * import zlib from 'node:zlib'; - * import path from 'node:path'; - * import assert from 'node:assert'; - * - * import v8 from 'node:v8'; - * - * class BookShelf { - * storage = new Map(); - * - * // Reading a series of files from directory and store them into storage. - * constructor(directory, books) { - * for (const book of books) { - * this.storage.set(book, fs.readFileSync(path.join(directory, book))); - * } - * } - * - * static compressAll(shelf) { - * for (const [ book, content ] of shelf.storage) { - * shelf.storage.set(book, zlib.gzipSync(content)); - * } - * } - * - * static decompressAll(shelf) { - * for (const [ book, content ] of shelf.storage) { - * shelf.storage.set(book, zlib.gunzipSync(content)); - * } - * } - * } - * - * // __dirname here is where the snapshot script is placed - * // during snapshot building time. - * const shelf = new BookShelf(__dirname, [ - * 'book1.en_US.txt', - * 'book1.es_ES.txt', - * 'book2.zh_CN.txt', - * ]); - * - * assert(v8.startupSnapshot.isBuildingSnapshot()); - * // On snapshot serialization, compress the books to reduce size. - * v8.startupSnapshot.addSerializeCallback(BookShelf.compressAll, shelf); - * // On snapshot deserialization, decompress the books. - * v8.startupSnapshot.addDeserializeCallback(BookShelf.decompressAll, shelf); - * v8.startupSnapshot.setDeserializeMainFunction((shelf) => { - * // process.env and process.argv are refreshed during snapshot - * // deserialization. - * const lang = process.env.BOOK_LANG || 'en_US'; - * const book = process.argv[1]; - * const name = `${book}.${lang}.txt`; - * console.log(shelf.storage.get(name)); - * }, shelf); - * ``` - * - * The resulted binary will get print the data deserialized from the snapshot during start up, using the refreshed `process.env` and `process.argv` of the launched process: - * - * ```bash - * $ BOOK_LANG=es_ES node --snapshot-blob snapshot.blob book1 - * # Prints content of book1.es_ES.txt deserialized from the snapshot. - * ``` - * - * Currently the application deserialized from a user-land snapshot cannot be snapshotted again, so these APIs are only available to applications that are not deserialized from a user-land snapshot. - * - * @experimental - * @since v18.6.0, v16.17.0 - */ - const startupSnapshot: StartupSnapshot; -} -declare module "node:v8" { - export * from "v8"; -} diff --git a/web/static/node_modules/@types/node/vm.d.ts b/web/static/node_modules/@types/node/vm.d.ts deleted file mode 100644 index 5b2a6028..00000000 --- a/web/static/node_modules/@types/node/vm.d.ts +++ /dev/null @@ -1,976 +0,0 @@ -/** - * The `node:vm` module enables compiling and running code within V8 Virtual - * Machine contexts. - * - * **The `node:vm` module is not a security** - * **mechanism. Do not use it to run untrusted code.** - * - * JavaScript code can be compiled and run immediately or - * compiled, saved, and run later. - * - * A common use case is to run the code in a different V8 Context. This means - * invoked code has a different global object than the invoking code. - * - * One can provide the context by `contextifying` an - * object. The invoked code treats any property in the context like a - * global variable. Any changes to global variables caused by the invoked - * code are reflected in the context object. - * - * ```js - * import vm from 'node:vm'; - * - * const x = 1; - * - * const context = { x: 2 }; - * vm.createContext(context); // Contextify the object. - * - * const code = 'x += 40; var y = 17;'; - * // `x` and `y` are global variables in the context. - * // Initially, x has the value 2 because that is the value of context.x. - * vm.runInContext(code, context); - * - * console.log(context.x); // 42 - * console.log(context.y); // 17 - * - * console.log(x); // 1; y is not defined. - * ``` - * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/vm.js) - */ -declare module "vm" { - import { ImportAttributes } from "node:module"; - interface Context extends NodeJS.Dict {} - interface BaseOptions { - /** - * Specifies the filename used in stack traces produced by this script. - * @default '' - */ - filename?: string | undefined; - /** - * Specifies the line number offset that is displayed in stack traces produced by this script. - * @default 0 - */ - lineOffset?: number | undefined; - /** - * Specifies the column number offset that is displayed in stack traces produced by this script. - * @default 0 - */ - columnOffset?: number | undefined; - } - interface ScriptOptions extends BaseOptions { - /** - * V8's code cache data for the supplied source. - */ - cachedData?: Buffer | NodeJS.ArrayBufferView | undefined; - /** @deprecated in favor of `script.createCachedData()` */ - produceCachedData?: boolean | undefined; - /** - * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is - * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see - * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis). - */ - importModuleDynamically?: - | ((specifier: string, script: Script, importAttributes: ImportAttributes) => Module) - | typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER - | undefined; - } - interface RunningScriptOptions extends BaseOptions { - /** - * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace. - * @default true - */ - displayErrors?: boolean | undefined; - /** - * Specifies the number of milliseconds to execute code before terminating execution. - * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer. - */ - timeout?: number | undefined; - /** - * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received. - * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that. - * If execution is terminated, an `Error` will be thrown. - * @default false - */ - breakOnSigint?: boolean | undefined; - } - interface RunningScriptInNewContextOptions extends RunningScriptOptions { - /** - * Human-readable name of the newly created context. - */ - contextName?: CreateContextOptions["name"]; - /** - * Origin corresponding to the newly created context for display purposes. The origin should be formatted like a URL, - * but with only the scheme, host, and port (if necessary), like the value of the `url.origin` property of a `URL` object. - * Most notably, this string should omit the trailing slash, as that denotes a path. - */ - contextOrigin?: CreateContextOptions["origin"]; - contextCodeGeneration?: CreateContextOptions["codeGeneration"]; - /** - * If set to `afterEvaluate`, microtasks will be run immediately after the script has run. - */ - microtaskMode?: CreateContextOptions["microtaskMode"]; - } - interface RunningCodeOptions extends RunningScriptOptions { - cachedData?: ScriptOptions["cachedData"]; - importModuleDynamically?: ScriptOptions["importModuleDynamically"]; - } - interface RunningCodeInNewContextOptions extends RunningScriptInNewContextOptions { - cachedData?: ScriptOptions["cachedData"]; - importModuleDynamically?: ScriptOptions["importModuleDynamically"]; - } - interface CompileFunctionOptions extends BaseOptions { - /** - * Provides an optional data with V8's code cache data for the supplied source. - */ - cachedData?: Buffer | undefined; - /** - * Specifies whether to produce new cache data. - * @default false - */ - produceCachedData?: boolean | undefined; - /** - * The sandbox/context in which the said function should be compiled in. - */ - parsingContext?: Context | undefined; - /** - * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling - */ - contextExtensions?: Object[] | undefined; - } - interface CreateContextOptions { - /** - * Human-readable name of the newly created context. - * @default 'VM Context i' Where i is an ascending numerical index of the created context. - */ - name?: string | undefined; - /** - * Corresponds to the newly created context for display purposes. - * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary), - * like the value of the `url.origin` property of a URL object. - * Most notably, this string should omit the trailing slash, as that denotes a path. - * @default '' - */ - origin?: string | undefined; - codeGeneration?: - | { - /** - * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc) - * will throw an EvalError. - * @default true - */ - strings?: boolean | undefined; - /** - * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError. - * @default true - */ - wasm?: boolean | undefined; - } - | undefined; - /** - * If set to `afterEvaluate`, microtasks will be run immediately after the script has run. - */ - microtaskMode?: "afterEvaluate" | undefined; - } - type MeasureMemoryMode = "summary" | "detailed"; - interface MeasureMemoryOptions { - /** - * @default 'summary' - */ - mode?: MeasureMemoryMode | undefined; - /** - * @default 'default' - */ - execution?: "default" | "eager" | undefined; - } - interface MemoryMeasurement { - total: { - jsMemoryEstimate: number; - jsMemoryRange: [number, number]; - }; - } - /** - * Instances of the `vm.Script` class contain precompiled scripts that can be - * executed in specific contexts. - * @since v0.3.1 - */ - class Script { - constructor(code: string, options?: ScriptOptions | string); - /** - * Runs the compiled code contained by the `vm.Script` object within the given `contextifiedObject` and returns the result. Running code does not have access - * to local scope. - * - * The following example compiles code that increments a global variable, sets - * the value of another global variable, then execute the code multiple times. - * The globals are contained in the `context` object. - * - * ```js - * import vm from 'node:vm'; - * - * const context = { - * animal: 'cat', - * count: 2, - * }; - * - * const script = new vm.Script('count += 1; name = "kitty";'); - * - * vm.createContext(context); - * for (let i = 0; i < 10; ++i) { - * script.runInContext(context); - * } - * - * console.log(context); - * // Prints: { animal: 'cat', count: 12, name: 'kitty' } - * ``` - * - * Using the `timeout` or `breakOnSigint` options will result in new event loops - * and corresponding threads being started, which have a non-zero performance - * overhead. - * @since v0.3.1 - * @param contextifiedObject A `contextified` object as returned by the `vm.createContext()` method. - * @return the result of the very last statement executed in the script. - */ - runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any; - /** - * This method is a shortcut to `script.runInContext(vm.createContext(options), options)`. - * It does several things at once: - * - * 1. Creates a new context. - * 2. If `contextObject` is an object, contextifies it with the new context. - * If `contextObject` is undefined, creates a new object and contextifies it. - * If `contextObject` is `vm.constants.DONT_CONTEXTIFY`, don't contextify anything. - * 3. Runs the compiled code contained by the `vm.Script` object within the created context. The code - * does not have access to the scope in which this method is called. - * 4. Returns the result. - * - * The following example compiles code that sets a global variable, then executes - * the code multiple times in different contexts. The globals are set on and - * contained within each individual `context`. - * - * ```js - * const vm = require('node:vm'); - * - * const script = new vm.Script('globalVar = "set"'); - * - * const contexts = [{}, {}, {}]; - * contexts.forEach((context) => { - * script.runInNewContext(context); - * }); - * - * console.log(contexts); - * // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }] - * - * // This would throw if the context is created from a contextified object. - * // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary - * // global objects that can be frozen. - * const freezeScript = new vm.Script('Object.freeze(globalThis); globalThis;'); - * const frozenContext = freezeScript.runInNewContext(vm.constants.DONT_CONTEXTIFY); - * ``` - * @since v0.3.1 - * @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified. - * If `undefined`, an empty contextified object will be created for backwards compatibility. - * @return the result of the very last statement executed in the script. - */ - runInNewContext( - contextObject?: Context | typeof constants.DONT_CONTEXTIFY, - options?: RunningScriptInNewContextOptions, - ): any; - /** - * Runs the compiled code contained by the `vm.Script` within the context of the - * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object. - * - * The following example compiles code that increments a `global` variable then - * executes that code multiple times: - * - * ```js - * import vm from 'node:vm'; - * - * global.globalVar = 0; - * - * const script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' }); - * - * for (let i = 0; i < 1000; ++i) { - * script.runInThisContext(); - * } - * - * console.log(globalVar); - * - * // 1000 - * ``` - * @since v0.3.1 - * @return the result of the very last statement executed in the script. - */ - runInThisContext(options?: RunningScriptOptions): any; - /** - * Creates a code cache that can be used with the `Script` constructor's `cachedData` option. Returns a `Buffer`. This method may be called at any - * time and any number of times. - * - * The code cache of the `Script` doesn't contain any JavaScript observable - * states. The code cache is safe to be saved along side the script source and - * used to construct new `Script` instances multiple times. - * - * Functions in the `Script` source can be marked as lazily compiled and they are - * not compiled at construction of the `Script`. These functions are going to be - * compiled when they are invoked the first time. The code cache serializes the - * metadata that V8 currently knows about the `Script` that it can use to speed up - * future compilations. - * - * ```js - * const script = new vm.Script(` - * function add(a, b) { - * return a + b; - * } - * - * const x = add(1, 2); - * `); - * - * const cacheWithoutAdd = script.createCachedData(); - * // In `cacheWithoutAdd` the function `add()` is marked for full compilation - * // upon invocation. - * - * script.runInThisContext(); - * - * const cacheWithAdd = script.createCachedData(); - * // `cacheWithAdd` contains fully compiled function `add()`. - * ``` - * @since v10.6.0 - */ - createCachedData(): Buffer; - /** @deprecated in favor of `script.createCachedData()` */ - cachedDataProduced?: boolean | undefined; - /** - * When `cachedData` is supplied to create the `vm.Script`, this value will be set - * to either `true` or `false` depending on acceptance of the data by V8. - * Otherwise the value is `undefined`. - * @since v5.7.0 - */ - cachedDataRejected?: boolean | undefined; - cachedData?: Buffer | undefined; - /** - * When the script is compiled from a source that contains a source map magic - * comment, this property will be set to the URL of the source map. - * - * ```js - * import vm from 'node:vm'; - * - * const script = new vm.Script(` - * function myFunc() {} - * //# sourceMappingURL=sourcemap.json - * `); - * - * console.log(script.sourceMapURL); - * // Prints: sourcemap.json - * ``` - * @since v19.1.0, v18.13.0 - */ - sourceMapURL?: string | undefined; - } - /** - * If the given `contextObject` is an object, the `vm.createContext()` method will - * [prepare that object](https://nodejs.org/docs/latest-v22.x/api/vm.html#what-does-it-mean-to-contextify-an-object) - * and return a reference to it so that it can be used in calls to {@link runInContext} or - * [`script.runInContext()`](https://nodejs.org/docs/latest-v22.x/api/vm.html#scriptrunincontextcontextifiedobject-options). - * Inside such scripts, the global object will be wrapped by the `contextObject`, retaining all of its - * existing properties but also having the built-in objects and functions any standard - * [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global - * variables will remain unchanged. - * - * ```js - * const vm = require('node:vm'); - * - * global.globalVar = 3; - * - * const context = { globalVar: 1 }; - * vm.createContext(context); - * - * vm.runInContext('globalVar *= 2;', context); - * - * console.log(context); - * // Prints: { globalVar: 2 } - * - * console.log(global.globalVar); - * // Prints: 3 - * ``` - * - * If `contextObject` is omitted (or passed explicitly as `undefined`), a new, - * empty contextified object will be returned. - * - * When the global object in the newly created context is contextified, it has some quirks - * compared to ordinary global objects. For example, it cannot be frozen. To create a context - * without the contextifying quirks, pass `vm.constants.DONT_CONTEXTIFY` as the `contextObject` - * argument. See the documentation of `vm.constants.DONT_CONTEXTIFY` for details. - * - * The `vm.createContext()` method is primarily useful for creating a single - * context that can be used to run multiple scripts. For instance, if emulating a - * web browser, the method can be used to create a single context representing a - * window's global object, then run all ` - - - - - - - -``` - -## Usage - -At its core, Feather is a collection of [SVG](https://svgontheweb.com/#svg) files. This means that you can use Feather icons in all the same ways you can use SVGs (e.g. `img`, `background-image`, `inline`, `object`, `embed`, `iframe`). Here's a helpful article detailing the many ways SVGs can be used on the web: [SVG on the Web – Implementation Options](https://svgontheweb.com/#implementation) - -The following are additional ways you can use Feather. - -### Client-side JavaScript - -#### 1. Install - -> [!NOTE] -> If you intend to use Feather with a CDN, you can skip this installation step. - -Install with [npm](https://docs.npmjs.com/getting-started/what-is-npm). - -```shell -npm install feather-icons --save -``` - -Or just copy [`feather.js`](https://unpkg.com/feather-icons/dist/feather.js) or [`feather.min.js`](https://unpkg.com/feather-icons/dist/feather.min.js) into your project directory. You don't need both `feather.js` and `feather.min.js`. - -#### 2. Include - -Include `feather.js` or `feather.min.js` with a ` -``` - -> [!NOTE] > `feather.js` and `feather.min.js` are located in the `dist` directory of the npm package. - -Or load the script from a CDN provider: - -```html - - - -``` - -After including the script, `feather` will be available as a global variable. - -#### 3. Use - -To use an icon on your page, add a `data-feather` attribute with the icon name to an element: - -```html - -``` - -See the complete list of icons at [feathericons.com](https://feathericons.com). - -#### 4. Replace - -Call the `feather.replace()` method: - -```html - -``` - -All elements that have a `data-feather` attribute will be replaced with SVG markup corresponding to their `data-feather` attribute value. See the [API Reference](#api-reference) for more information about `feather.replace()`. - -### Node - -#### 1. Install - -Install with [npm](https://docs.npmjs.com/getting-started/what-is-npm): - -```shell -npm install feather-icons --save -``` - -#### 2. Require - -```js -const feather = require('feather-icons'); -``` - -#### 3. Use - -```js -feather.icons.x; -// { -// name: 'x', -// contents: '`, -// tags: ['cancel', 'close', 'delete', 'remove'], -// attrs: { -// class: 'feather feather-x', -// xmlns: 'http://www.w3.org/2000/svg', -// width: 24, -// height: 24, -// viewBox: '0 0 24 24', -// fill: 'none', -// stroke: 'currentColor', -// 'stroke-width': 2, -// 'stroke-linecap': 'round', -// 'stroke-linejoin': 'round', -// }, -// toSvg: [Function], -// } - -feather.icons.x.toSvg(); -// - -feather.icons.x.toSvg({ class: 'foo bar', 'stroke-width': 1, color: 'red' }); -// -``` - -See the [API Reference](#api-reference) for more information about the available properties and methods of the `feather` object. - -### SVG sprite - -#### 1. Install - -> [!NOTE] -> If you intend to use Feather with a CDN, you can skip this installation step. - -Install with [npm](https://docs.npmjs.com/getting-started/what-is-npm). - -```shell -npm install feather-icons --save -``` - -Or just copy [`feather-sprite.svg`](https://unpkg.com/feather-icons/dist/feather-sprite.svg) into your project directory. - -#### 2. Use - -Include an icon on your page with the following markup: - -```html - - - -``` - -> [!NOTE] > `circle` in the above example can be replaced with any valid icon name. See the complete list of icon names at [feathericons.com](https://feathericons.com). - -However, this markup can be simplified using a simple CSS class to avoid repetition of SVG attributes between icons: - -```css -.feather { - width: 24px; - height: 24px; - stroke: currentColor; - stroke-width: 2; - stroke-linecap: round; - stroke-linejoin: round; - fill: none; -} -``` - -```html - - - -``` - -### Figma - -Feather is available as a [Figma component library](https://www.figma.com/file/dyJRSFTIajik4cdkcXN8yA3K/Feather-Component-Library). To use the components, log in to your Figma account and **duplicate** the file to your drafts. - -## API reference - -### `feather.icons` - -An object with data about every icon. - -#### Usage - -```js -feather.icons.x; -// { -// name: 'x', -// contents: '', -// tags: ['cancel', 'close', 'delete', 'remove'], -// attrs: { -// class: 'feather feather-x', -// xmlns: 'http://www.w3.org/2000/svg', -// width: 24, -// height: 24, -// viewBox: '0 0 24 24', -// fill: 'none', -// stroke: 'currentColor', -// 'stroke-width': 2, -// 'stroke-linecap': 'round', -// 'stroke-linejoin': 'round', -// }, -// toSvg: [Function], -// } - -feather.icons.x.toString(); -// '' -``` - -> [!NOTE] > `x` in the above example can be replaced with any valid icon name. See the complete list of icon names at [feathericons.com](https://feathericons.com). Icons with multi-word names (e.g. `arrow-right`) **cannot** be accessed using dot notation (e.g. `feather.icons.x`). Instead, use bracket notation (e.g. `feather.icons['arrow-right']`). - -[View Source](https://github.com/feathericons/feather/blob/master/src/icons.js) - ---- - -### `feather.icons[name].toSvg([attrs])` - -Returns an SVG string. - -#### Parameters - -| Name | Type | Description | -| ------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `attrs` (optional) | Object | Key-value pairs in the `attrs` object will be mapped to HTML attributes on the `` tag (e.g. `{ foo: 'bar' }` maps to `foo="bar"`). All default attributes on the `` tag can be overridden with the `attrs` object. | - -> [!NOTE] -> You might find these SVG attributes helpful for manipulating icons: -> -> - [`color`](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/color) -> - [`width`](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/width) -> - [`height`](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/height) -> - [`stroke-width`](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width) -> - [`stroke-linecap`](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap) -> - [`stroke-linejoin`](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linejoin) - -#### Usage - -```js -feather.icons.circle.toSvg(); -// '' - -feather.icons.circle.toSvg({ 'stroke-width': 1 }); -// '' - -feather.icons.circle.toSvg({ class: 'foo bar' }); -// '' -``` - -[View Source](https://github.com/feathericons/feather/blob/master/src/icon.js) - ---- - -### `feather.replace([attrs])` - -Replaces all elements that have a `data-feather` attribute with SVG markup corresponding to the element's `data-feather` attribute value. - -#### Parameters - -| Name | Type | Description | -| ------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `attrs` (optional) | Object | Key-value pairs in the `attrs` object will be mapped to HTML attributes on the `` tag (e.g. `{ foo: 'bar' }` maps to `foo="bar"`). All default attributes on the `` tag can be overridden with the `attrs` object. | - -#### Usage - -> [!IMPORTANT] > `feather.replace()` only works in a browser environment. - -Simple usage: - -```html - - - - -``` - -You can pass `feather.replace()` an `attrs` object: - -```html - - - - -``` - -All attributes on the placeholder element (i.e. ``) will be copied to the `` tag: - -```html - - - - -``` - -[View Source](https://github.com/feathericons/feather/blob/master/src/replace.js) - ---- - -### `feather.toSvg(name, [attrs])` (DEPRECATED) - -> [!WARNING] > `feather.toSvg()` is deprecated. Please use `feather.icons[name].toSvg()` instead. - -Returns an SVG string. - -#### Parameters - -| Name | Type | Description | -| ------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | string | Icon name | -| `attrs` (optional) | Object | Key-value pairs in the `attrs` object will be mapped to HTML attributes on the `` tag (e.g. `{ foo: 'bar' }` maps to `foo="bar"`). All default attributes on the `` tag can be overridden with the `attrs` object. | - -#### Usage - -```js -feather.toSvg('circle'); -// '' - -feather.toSvg('circle', { 'stroke-width': 1 }); -// '' - -feather.toSvg('circle', { class: 'foo bar' }); -// '' -``` - -[View Source](https://github.com/feathericons/feather/blob/master/src/to-svg.js) - -## Contributing - -For more info on how to contribute please see the [contribution guidelines](https://github.com/feathericons/feather/blob/master/CONTRIBUTING.md). - -Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/feathericons/feather/blob/master/README.md) - -## Related projects - -- [feathericons.dev](http://feathericons.dev) - Feather viewer featuring [30+ brand icons](https://feathericons.dev/?iconset=brands) and [40+ payment services icons](https://feathericons.dev/?iconset=payments) -- [angular-feather](https://github.com/michaelbazos/angular-feather) - Feather icons for Angular applications -- [elm-feather](https://github.com/1602/elm-feather) - Feather icons for Elm applications -- [react-feather](https://github.com/carmelopullara/react-feather) - Feather icons as React components -- [sketch-feather](https://github.com/odmln/sketch-feather) - Feather icons as a Sketch library -- [vue-feather-icons](https://github.com/egoist/vue-feather-icons) - Feather icons as Vue components -- [php-feather](https://github.com/Pixelrobin/php-feather) - Feather icons as a PHP Library -- [wp-php-feather](https://github.com/reatlat/wp-php-feather) - Feather icons as a WordPress template tag -- [django-feather](https://pypi.org/project/django-feather/) - Feather icons as Django Template Tag -- [svelte-feather-icons](https://github.com/dylanblokhuis/svelte-feather-icons) - Feather icons as Svelte components -- [gulp-feather](https://github.com/oToToT/gulp-feather) - Feather icons rendering using gulp -- [astro-feather](https://github.com/gabrlyg/astro-feather) - Feather icons as Astro components -- [qwik-feather-icons](https://github.com/yeyon/qwik-feather-icons) - Feather icons for Qwik, the Resumable Framework -- [figma-feather](https://github.com/kevintoepfer/figma-feather) – Feather icons as a Figma component -- [delphi-feather-icons](https://github.com/shaunroselt/Delphi-Feather-Icons) - Feather icons as a Delphi Library -- [eleventy-plugin-feathericons](https://github.com/reatlat/eleventy-plugin-feathericons) - Feather icons as a plugin for [11ty](https://github.com/11ty/eleventy) - -## License - -Feather is licensed under the [MIT License](https://github.com/feathericons/feather/blob/master/LICENSE). diff --git a/web/static/node_modules/feather-icons/dist/feather-sprite.svg b/web/static/node_modules/feather-icons/dist/feather-sprite.svg deleted file mode 100644 index b66f76f3..00000000 --- a/web/static/node_modules/feather-icons/dist/feather-sprite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/static/node_modules/feather-icons/dist/feather.js b/web/static/node_modules/feather-icons/dist/feather.js deleted file mode 100644 index cf6e30f0..00000000 --- a/web/static/node_modules/feather-icons/dist/feather.js +++ /dev/null @@ -1,2418 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["feather"] = factory(); - else - root["feather"] = factory(); -})(typeof self !== 'undefined' ? self : this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 0); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./dist/icons.json": -/*!*************************!*\ - !*** ./dist/icons.json ***! - \*************************/ -/*! exports provided: activity, airplay, alert-circle, alert-octagon, alert-triangle, align-center, align-justify, align-left, align-right, anchor, aperture, archive, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, award, bar-chart-2, bar-chart, battery-charging, battery, bell-off, bell, bluetooth, bold, book-open, book, bookmark, box, briefcase, calendar, camera-off, camera, cast, check-circle, check-square, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, chrome, circle, clipboard, clock, cloud-drizzle, cloud-lightning, cloud-off, cloud-rain, cloud-snow, cloud, code, codepen, codesandbox, coffee, columns, command, compass, copy, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, cpu, credit-card, crop, crosshair, database, delete, disc, divide-circle, divide-square, divide, dollar-sign, download-cloud, download, dribbble, droplet, edit-2, edit-3, edit, external-link, eye-off, eye, facebook, fast-forward, feather, figma, file-minus, file-plus, file-text, file, film, filter, flag, folder-minus, folder-plus, folder, framer, frown, gift, git-branch, git-commit, git-merge, git-pull-request, github, gitlab, globe, grid, hard-drive, hash, headphones, heart, help-circle, hexagon, home, image, inbox, info, instagram, italic, key, layers, layout, life-buoy, link-2, link, linkedin, list, loader, lock, log-in, log-out, mail, map-pin, map, maximize-2, maximize, meh, menu, message-circle, message-square, mic-off, mic, minimize-2, minimize, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, mouse-pointer, move, music, navigation-2, navigation, octagon, package, paperclip, pause-circle, pause, pen-tool, percent, phone-call, phone-forwarded, phone-incoming, phone-missed, phone-off, phone-outgoing, phone, pie-chart, play-circle, play, plus-circle, plus-square, plus, pocket, power, printer, radio, refresh-ccw, refresh-cw, repeat, rewind, rotate-ccw, rotate-cw, rss, save, scissors, search, send, server, settings, share-2, share, shield-off, shield, shopping-bag, shopping-cart, shuffle, sidebar, skip-back, skip-forward, slack, slash, sliders, smartphone, smile, speaker, square, star, stop-circle, sun, sunrise, sunset, table, tablet, tag, target, terminal, thermometer, thumbs-down, thumbs-up, toggle-left, toggle-right, tool, trash-2, trash, trello, trending-down, trending-up, triangle, truck, tv, twitch, twitter, type, umbrella, underline, unlock, upload-cloud, upload, user-check, user-minus, user-plus, user-x, user, users, video-off, video, voicemail, volume-1, volume-2, volume-x, volume, watch, wifi-off, wifi, wind, x-circle, x-octagon, x-square, x, youtube, zap-off, zap, zoom-in, zoom-out, default */ -/***/ (function(module) { - -module.exports = {"activity":"","airplay":"","alert-circle":"","alert-octagon":"","alert-triangle":"","align-center":"","align-justify":"","align-left":"","align-right":"","anchor":"","aperture":"","archive":"","arrow-down-circle":"","arrow-down-left":"","arrow-down-right":"","arrow-down":"","arrow-left-circle":"","arrow-left":"","arrow-right-circle":"","arrow-right":"","arrow-up-circle":"","arrow-up-left":"","arrow-up-right":"","arrow-up":"","at-sign":"","award":"","bar-chart-2":"","bar-chart":"","battery-charging":"","battery":"","bell-off":"","bell":"","bluetooth":"","bold":"","book-open":"","book":"","bookmark":"","box":"","briefcase":"","calendar":"","camera-off":"","camera":"","cast":"","check-circle":"","check-square":"","check":"","chevron-down":"","chevron-left":"","chevron-right":"","chevron-up":"","chevrons-down":"","chevrons-left":"","chevrons-right":"","chevrons-up":"","chrome":"","circle":"","clipboard":"","clock":"","cloud-drizzle":"","cloud-lightning":"","cloud-off":"","cloud-rain":"","cloud-snow":"","cloud":"","code":"","codepen":"","codesandbox":"","coffee":"","columns":"","command":"","compass":"","copy":"","corner-down-left":"","corner-down-right":"","corner-left-down":"","corner-left-up":"","corner-right-down":"","corner-right-up":"","corner-up-left":"","corner-up-right":"","cpu":"","credit-card":"","crop":"","crosshair":"","database":"","delete":"","disc":"","divide-circle":"","divide-square":"","divide":"","dollar-sign":"","download-cloud":"","download":"","dribbble":"","droplet":"","edit-2":"","edit-3":"","edit":"","external-link":"","eye-off":"","eye":"","facebook":"","fast-forward":"","feather":"","figma":"","file-minus":"","file-plus":"","file-text":"","file":"","film":"","filter":"","flag":"","folder-minus":"","folder-plus":"","folder":"","framer":"","frown":"","gift":"","git-branch":"","git-commit":"","git-merge":"","git-pull-request":"","github":"","gitlab":"","globe":"","grid":"","hard-drive":"","hash":"","headphones":"","heart":"","help-circle":"","hexagon":"","home":"","image":"","inbox":"","info":"","instagram":"","italic":"","key":"","layers":"","layout":"","life-buoy":"","link-2":"","link":"","linkedin":"","list":"","loader":"","lock":"","log-in":"","log-out":"","mail":"","map-pin":"","map":"","maximize-2":"","maximize":"","meh":"","menu":"","message-circle":"","message-square":"","mic-off":"","mic":"","minimize-2":"","minimize":"","minus-circle":"","minus-square":"","minus":"","monitor":"","moon":"","more-horizontal":"","more-vertical":"","mouse-pointer":"","move":"","music":"","navigation-2":"","navigation":"","octagon":"","package":"","paperclip":"","pause-circle":"","pause":"","pen-tool":"","percent":"","phone-call":"","phone-forwarded":"","phone-incoming":"","phone-missed":"","phone-off":"","phone-outgoing":"","phone":"","pie-chart":"","play-circle":"","play":"","plus-circle":"","plus-square":"","plus":"","pocket":"","power":"","printer":"","radio":"","refresh-ccw":"","refresh-cw":"","repeat":"","rewind":"","rotate-ccw":"","rotate-cw":"","rss":"","save":"","scissors":"","search":"","send":"","server":"","settings":"","share-2":"","share":"","shield-off":"","shield":"","shopping-bag":"","shopping-cart":"","shuffle":"","sidebar":"","skip-back":"","skip-forward":"","slack":"","slash":"","sliders":"","smartphone":"","smile":"","speaker":"","square":"","star":"","stop-circle":"","sun":"","sunrise":"","sunset":"","table":"","tablet":"","tag":"","target":"","terminal":"","thermometer":"","thumbs-down":"","thumbs-up":"","toggle-left":"","toggle-right":"","tool":"","trash-2":"","trash":"","trello":"","trending-down":"","trending-up":"","triangle":"","truck":"","tv":"","twitch":"","twitter":"","type":"","umbrella":"","underline":"","unlock":"","upload-cloud":"","upload":"","user-check":"","user-minus":"","user-plus":"","user-x":"","user":"","users":"","video-off":"","video":"","voicemail":"","volume-1":"","volume-2":"","volume-x":"","volume":"","watch":"","wifi-off":"","wifi":"","wind":"","x-circle":"","x-octagon":"","x-square":"","x":"","youtube":"","zap-off":"","zap":"","zoom-in":"","zoom-out":""}; - -/***/ }), - -/***/ "./node_modules/classnames/dedupe.js": -/*!*******************************************!*\ - !*** ./node_modules/classnames/dedupe.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2016 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var classNames = (function () { - // don't inherit from Object so we can skip hasOwnProperty check later - // http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232 - function StorageObject() {} - StorageObject.prototype = Object.create(null); - - function _parseArray (resultSet, array) { - var length = array.length; - - for (var i = 0; i < length; ++i) { - _parse(resultSet, array[i]); - } - } - - var hasOwn = {}.hasOwnProperty; - - function _parseNumber (resultSet, num) { - resultSet[num] = true; - } - - function _parseObject (resultSet, object) { - for (var k in object) { - if (hasOwn.call(object, k)) { - // set value to false instead of deleting it to avoid changing object structure - // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions - resultSet[k] = !!object[k]; - } - } - } - - var SPACE = /\s+/; - function _parseString (resultSet, str) { - var array = str.split(SPACE); - var length = array.length; - - for (var i = 0; i < length; ++i) { - resultSet[array[i]] = true; - } - } - - function _parse (resultSet, arg) { - if (!arg) return; - var argType = typeof arg; - - // 'foo bar' - if (argType === 'string') { - _parseString(resultSet, arg); - - // ['foo', 'bar', ...] - } else if (Array.isArray(arg)) { - _parseArray(resultSet, arg); - - // { 'foo': true, ... } - } else if (argType === 'object') { - _parseObject(resultSet, arg); - - // '130' - } else if (argType === 'number') { - _parseNumber(resultSet, arg); - } - } - - function _classNames () { - // don't leak arguments - // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments - var len = arguments.length; - var args = Array(len); - for (var i = 0; i < len; i++) { - args[i] = arguments[i]; - } - - var classSet = new StorageObject(); - _parseArray(classSet, args); - - var list = []; - - for (var k in classSet) { - if (classSet[k]) { - list.push(k) - } - } - - return list.join(' '); - } - - return _classNames; - })(); - - if (typeof module !== 'undefined' && module.exports) { - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - -/***/ }), - -/***/ "./node_modules/core-js/es/array/from.js": -/*!***********************************************!*\ - !*** ./node_modules/core-js/es/array/from.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(/*! ../../modules/es.string.iterator */ "./node_modules/core-js/modules/es.string.iterator.js"); -__webpack_require__(/*! ../../modules/es.array.from */ "./node_modules/core-js/modules/es.array.from.js"); -var path = __webpack_require__(/*! ../../internals/path */ "./node_modules/core-js/internals/path.js"); - -module.exports = path.Array.from; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/a-function.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/internals/a-function.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = function (it) { - if (typeof it != 'function') { - throw TypeError(String(it) + ' is not a function'); - } return it; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/an-object.js": -/*!*****************************************************!*\ - !*** ./node_modules/core-js/internals/an-object.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); - -module.exports = function (it) { - if (!isObject(it)) { - throw TypeError(String(it) + ' is not an object'); - } return it; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/array-from.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/internals/array-from.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var bind = __webpack_require__(/*! ../internals/bind-context */ "./node_modules/core-js/internals/bind-context.js"); -var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js"); -var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js"); -var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js"); -var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js"); -var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js"); -var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js"); - -// `Array.from` method -// https://tc39.github.io/ecma262/#sec-array.from -module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { - var O = toObject(arrayLike); - var C = typeof this == 'function' ? this : Array; - var argumentsLength = arguments.length; - var mapfn = argumentsLength > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var index = 0; - var iteratorMethod = getIteratorMethod(O); - var length, result, step, iterator; - if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2); - // if the target is not iterable or it's an array with the default iterator - use a simple case - if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) { - iterator = iteratorMethod.call(O); - result = new C(); - for (;!(step = iterator.next()).done; index++) { - createProperty(result, index, mapping - ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) - : step.value - ); - } - } else { - length = toLength(O.length); - result = new C(length); - for (;length > index; index++) { - createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); - } - } - result.length = index; - return result; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/array-includes.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/internals/array-includes.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js"); -var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js"); -var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js"); - -// `Array.prototype.{ indexOf, includes }` methods implementation -// false -> Array#indexOf -// https://tc39.github.io/ecma262/#sec-array.prototype.indexof -// true -> Array#includes -// https://tc39.github.io/ecma262/#sec-array.prototype.includes -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIndexedObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/bind-context.js": -/*!********************************************************!*\ - !*** ./node_modules/core-js/internals/bind-context.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js"); - -// optional / simple context binding -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 0: return function () { - return fn.call(that); - }; - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js": -/*!****************************************************************************!*\ - !*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); - -// call something on iterator step with safe closing on error -module.exports = function (iterator, fn, value, ENTRIES) { - try { - return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (error) { - var returnMethod = iterator['return']; - if (returnMethod !== undefined) anObject(returnMethod.call(iterator)); - throw error; - } -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/check-correctness-of-iteration.js": -/*!**************************************************************************!*\ - !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); - -var ITERATOR = wellKnownSymbol('iterator'); -var SAFE_CLOSING = false; - -try { - var called = 0; - var iteratorWithReturn = { - next: function () { - return { done: !!called++ }; - }, - 'return': function () { - SAFE_CLOSING = true; - } - }; - iteratorWithReturn[ITERATOR] = function () { - return this; - }; - // eslint-disable-next-line no-throw-literal - Array.from(iteratorWithReturn, function () { throw 2; }); -} catch (error) { /* empty */ } - -module.exports = function (exec, SKIP_CLOSING) { - if (!SKIP_CLOSING && !SAFE_CLOSING) return false; - var ITERATION_SUPPORT = false; - try { - var object = {}; - object[ITERATOR] = function () { - return { - next: function () { - return { done: ITERATION_SUPPORT = true }; - } - }; - }; - exec(object); - } catch (error) { /* empty */ } - return ITERATION_SUPPORT; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/classof-raw.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/internals/classof-raw.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/classof.js": -/*!***************************************************!*\ - !*** ./node_modules/core-js/internals/classof.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js"); -var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); - -var TO_STRING_TAG = wellKnownSymbol('toStringTag'); -// ES3 wrong here -var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; - -// fallback for IE11 Script Access Denied error -var tryGet = function (it, key) { - try { - return it[key]; - } catch (error) { /* empty */ } -}; - -// getting tag from ES6+ `Object.prototype.toString` -module.exports = function (it) { - var O, tag, result; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag - // builtinTag case - : CORRECT_ARGUMENTS ? classofRaw(O) - // ES3 arguments fallback - : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/copy-constructor-properties.js": -/*!***********************************************************************!*\ - !*** ./node_modules/core-js/internals/copy-constructor-properties.js ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); -var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/core-js/internals/own-keys.js"); -var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js"); -var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js"); - -module.exports = function (target, source) { - var keys = ownKeys(source); - var defineProperty = definePropertyModule.f; - var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); - } -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/correct-prototype-getter.js": -/*!********************************************************************!*\ - !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); - -module.exports = !fails(function () { - function F() { /* empty */ } - F.prototype.constructor = null; - return Object.getPrototypeOf(new F()) !== F.prototype; -}); - - -/***/ }), - -/***/ "./node_modules/core-js/internals/create-iterator-constructor.js": -/*!***********************************************************************!*\ - !*** ./node_modules/core-js/internals/create-iterator-constructor.js ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js").IteratorPrototype; -var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js"); -var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js"); -var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js"); -var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js"); - -var returnThis = function () { return this; }; - -module.exports = function (IteratorConstructor, NAME, next) { - var TO_STRING_TAG = NAME + ' Iterator'; - IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) }); - setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); - Iterators[TO_STRING_TAG] = returnThis; - return IteratorConstructor; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/create-property-descriptor.js": -/*!**********************************************************************!*\ - !*** ./node_modules/core-js/internals/create-property-descriptor.js ***! - \**********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/create-property.js": -/*!***********************************************************!*\ - !*** ./node_modules/core-js/internals/create-property.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js"); -var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js"); -var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js"); - -module.exports = function (object, key, value) { - var propertyKey = toPrimitive(key); - if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value)); - else object[propertyKey] = value; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/define-iterator.js": -/*!***********************************************************!*\ - !*** ./node_modules/core-js/internals/define-iterator.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js"); -var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "./node_modules/core-js/internals/create-iterator-constructor.js"); -var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js"); -var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js"); -var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js"); -var hide = __webpack_require__(/*! ../internals/hide */ "./node_modules/core-js/internals/hide.js"); -var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js"); -var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); -var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js"); -var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js"); -var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js"); - -var IteratorPrototype = IteratorsCore.IteratorPrototype; -var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; -var ITERATOR = wellKnownSymbol('iterator'); -var KEYS = 'keys'; -var VALUES = 'values'; -var ENTRIES = 'entries'; - -var returnThis = function () { return this; }; - -module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { - createIteratorConstructor(IteratorConstructor, NAME, next); - - var getIterationMethod = function (KIND) { - if (KIND === DEFAULT && defaultIterator) return defaultIterator; - if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; - switch (KIND) { - case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; - case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; - case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; - } return function () { return new IteratorConstructor(this); }; - }; - - var TO_STRING_TAG = NAME + ' Iterator'; - var INCORRECT_VALUES_NAME = false; - var IterablePrototype = Iterable.prototype; - var nativeIterator = IterablePrototype[ITERATOR] - || IterablePrototype['@@iterator'] - || DEFAULT && IterablePrototype[DEFAULT]; - var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); - var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; - var CurrentIteratorPrototype, methods, KEY; - - // fix native - if (anyNativeIterator) { - CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); - if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { - if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { - if (setPrototypeOf) { - setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); - } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') { - hide(CurrentIteratorPrototype, ITERATOR, returnThis); - } - } - // Set @@toStringTag to native iterators - setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); - if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis; - } - } - - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { - INCORRECT_VALUES_NAME = true; - defaultIterator = function values() { return nativeIterator.call(this); }; - } - - // define iterator - if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { - hide(IterablePrototype, ITERATOR, defaultIterator); - } - Iterators[NAME] = defaultIterator; - - // export additional methods - if (DEFAULT) { - methods = { - values: getIterationMethod(VALUES), - keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), - entries: getIterationMethod(ENTRIES) - }; - if (FORCED) for (KEY in methods) { - if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { - redefine(IterablePrototype, KEY, methods[KEY]); - } - } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); - } - - return methods; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/descriptors.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/internals/descriptors.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); - -// Thank's IE8 for his funny defineProperty -module.exports = !fails(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), - -/***/ "./node_modules/core-js/internals/document-create-element.js": -/*!*******************************************************************!*\ - !*** ./node_modules/core-js/internals/document-create-element.js ***! - \*******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); -var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); - -var document = global.document; -// typeof document.createElement is 'object' in old IE -var exist = isObject(document) && isObject(document.createElement); - -module.exports = function (it) { - return exist ? document.createElement(it) : {}; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/enum-bug-keys.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/internals/enum-bug-keys.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -// IE8- don't enum bug keys -module.exports = [ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' -]; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/export.js": -/*!**************************************************!*\ - !*** ./node_modules/core-js/internals/export.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); -var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f; -var hide = __webpack_require__(/*! ../internals/hide */ "./node_modules/core-js/internals/hide.js"); -var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js"); -var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js"); -var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/core-js/internals/copy-constructor-properties.js"); -var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js"); - -/* - options.target - name of the target object - options.global - target is the global object - options.stat - export as static methods of target - options.proto - export as prototype methods of target - options.real - real prototype method for the `pure` version - options.forced - export even if the native feature is available - options.bind - bind methods to the target, required for the `pure` version - options.wrap - wrap constructors to preventing global pollution, required for the `pure` version - options.unsafe - use the simple assignment of property instead of delete + defineProperty - options.sham - add a flag to not completely full polyfills - options.enumerable - export as enumerable property - options.noTargetGet - prevent calling a getter on target -*/ -module.exports = function (options, source) { - var TARGET = options.target; - var GLOBAL = options.global; - var STATIC = options.stat; - var FORCED, target, key, targetProperty, sourceProperty, descriptor; - if (GLOBAL) { - target = global; - } else if (STATIC) { - target = global[TARGET] || setGlobal(TARGET, {}); - } else { - target = (global[TARGET] || {}).prototype; - } - if (target) for (key in source) { - sourceProperty = source[key]; - if (options.noTargetGet) { - descriptor = getOwnPropertyDescriptor(target, key); - targetProperty = descriptor && descriptor.value; - } else targetProperty = target[key]; - FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); - // contained in target - if (!FORCED && targetProperty !== undefined) { - if (typeof sourceProperty === typeof targetProperty) continue; - copyConstructorProperties(sourceProperty, targetProperty); - } - // add a flag to not completely full polyfills - if (options.sham || (targetProperty && targetProperty.sham)) { - hide(sourceProperty, 'sham', true); - } - // extend global - redefine(target, key, sourceProperty, options); - } -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/fails.js": -/*!*************************************************!*\ - !*** ./node_modules/core-js/internals/fails.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return !!exec(); - } catch (error) { - return true; - } -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/function-to-string.js": -/*!**************************************************************!*\ - !*** ./node_modules/core-js/internals/function-to-string.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js"); - -module.exports = shared('native-function-to-string', Function.toString); - - -/***/ }), - -/***/ "./node_modules/core-js/internals/get-iterator-method.js": -/*!***************************************************************!*\ - !*** ./node_modules/core-js/internals/get-iterator-method.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/core-js/internals/classof.js"); -var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js"); -var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); - -var ITERATOR = wellKnownSymbol('iterator'); - -module.exports = function (it) { - if (it != undefined) return it[ITERATOR] - || it['@@iterator'] - || Iterators[classof(it)]; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/global.js": -/*!**************************************************!*\ - !*** ./node_modules/core-js/internals/global.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(global) {var O = 'object'; -var check = function (it) { - return it && it.Math == Math && it; -}; - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -module.exports = - // eslint-disable-next-line no-undef - check(typeof globalThis == O && globalThis) || - check(typeof window == O && window) || - check(typeof self == O && self) || - check(typeof global == O && global) || - // eslint-disable-next-line no-new-func - Function('return this')(); - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) - -/***/ }), - -/***/ "./node_modules/core-js/internals/has.js": -/*!***********************************************!*\ - !*** ./node_modules/core-js/internals/has.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; - -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/hidden-keys.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/internals/hidden-keys.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = {}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/hide.js": -/*!************************************************!*\ - !*** ./node_modules/core-js/internals/hide.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js"); -var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js"); -var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js"); - -module.exports = DESCRIPTORS ? function (object, key, value) { - return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/html.js": -/*!************************************************!*\ - !*** ./node_modules/core-js/internals/html.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); - -var document = global.document; - -module.exports = document && document.documentElement; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/ie8-dom-define.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/internals/ie8-dom-define.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js"); -var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); -var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js"); - -// Thank's IE8 for his funny defineProperty -module.exports = !DESCRIPTORS && !fails(function () { - return Object.defineProperty(createElement('div'), 'a', { - get: function () { return 7; } - }).a != 7; -}); - - -/***/ }), - -/***/ "./node_modules/core-js/internals/indexed-object.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/internals/indexed-object.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); -var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js"); - -var split = ''.split; - -module.exports = fails(function () { - // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 - // eslint-disable-next-line no-prototype-builtins - return !Object('z').propertyIsEnumerable(0); -}) ? function (it) { - return classof(it) == 'String' ? split.call(it, '') : Object(it); -} : Object; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/internal-state.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/internals/internal-state.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ "./node_modules/core-js/internals/native-weak-map.js"); -var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); -var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); -var hide = __webpack_require__(/*! ../internals/hide */ "./node_modules/core-js/internals/hide.js"); -var objectHas = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); -var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js"); -var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js"); - -var WeakMap = global.WeakMap; -var set, get, has; - -var enforce = function (it) { - return has(it) ? get(it) : set(it, {}); -}; - -var getterFor = function (TYPE) { - return function (it) { - var state; - if (!isObject(it) || (state = get(it)).type !== TYPE) { - throw TypeError('Incompatible receiver, ' + TYPE + ' required'); - } return state; - }; -}; - -if (NATIVE_WEAK_MAP) { - var store = new WeakMap(); - var wmget = store.get; - var wmhas = store.has; - var wmset = store.set; - set = function (it, metadata) { - wmset.call(store, it, metadata); - return metadata; - }; - get = function (it) { - return wmget.call(store, it) || {}; - }; - has = function (it) { - return wmhas.call(store, it); - }; -} else { - var STATE = sharedKey('state'); - hiddenKeys[STATE] = true; - set = function (it, metadata) { - hide(it, STATE, metadata); - return metadata; - }; - get = function (it) { - return objectHas(it, STATE) ? it[STATE] : {}; - }; - has = function (it) { - return objectHas(it, STATE); - }; -} - -module.exports = { - set: set, - get: get, - has: has, - enforce: enforce, - getterFor: getterFor -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/is-array-iterator-method.js": -/*!********************************************************************!*\ - !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); -var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js"); - -var ITERATOR = wellKnownSymbol('iterator'); -var ArrayPrototype = Array.prototype; - -// check on default Array iterator -module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/is-forced.js": -/*!*****************************************************!*\ - !*** ./node_modules/core-js/internals/is-forced.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); - -var replacement = /#|\.prototype\./; - -var isForced = function (feature, detection) { - var value = data[normalize(feature)]; - return value == POLYFILL ? true - : value == NATIVE ? false - : typeof detection == 'function' ? fails(detection) - : !!detection; -}; - -var normalize = isForced.normalize = function (string) { - return String(string).replace(replacement, '.').toLowerCase(); -}; - -var data = isForced.data = {}; -var NATIVE = isForced.NATIVE = 'N'; -var POLYFILL = isForced.POLYFILL = 'P'; - -module.exports = isForced; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/is-object.js": -/*!*****************************************************!*\ - !*** ./node_modules/core-js/internals/is-object.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/is-pure.js": -/*!***************************************************!*\ - !*** ./node_modules/core-js/internals/is-pure.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = false; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/iterators-core.js": -/*!**********************************************************!*\ - !*** ./node_modules/core-js/internals/iterators-core.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js"); -var hide = __webpack_require__(/*! ../internals/hide */ "./node_modules/core-js/internals/hide.js"); -var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); -var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); -var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js"); - -var ITERATOR = wellKnownSymbol('iterator'); -var BUGGY_SAFARI_ITERATORS = false; - -var returnThis = function () { return this; }; - -// `%IteratorPrototype%` object -// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object -var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; - -if ([].keys) { - arrayIterator = [].keys(); - // Safari 8 has buggy iterators w/o `next` - if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; - else { - PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); - if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; - } -} - -if (IteratorPrototype == undefined) IteratorPrototype = {}; - -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); - -module.exports = { - IteratorPrototype: IteratorPrototype, - BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/iterators.js": -/*!*****************************************************!*\ - !*** ./node_modules/core-js/internals/iterators.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = {}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/native-symbol.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/internals/native-symbol.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); - -module.exports = !!Object.getOwnPropertySymbols && !fails(function () { - // Chrome 38 Symbol has incorrect toString conversion - // eslint-disable-next-line no-undef - return !String(Symbol()); -}); - - -/***/ }), - -/***/ "./node_modules/core-js/internals/native-weak-map.js": -/*!***********************************************************!*\ - !*** ./node_modules/core-js/internals/native-weak-map.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); -var nativeFunctionToString = __webpack_require__(/*! ../internals/function-to-string */ "./node_modules/core-js/internals/function-to-string.js"); - -var WeakMap = global.WeakMap; - -module.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap)); - - -/***/ }), - -/***/ "./node_modules/core-js/internals/object-create.js": -/*!*********************************************************!*\ - !*** ./node_modules/core-js/internals/object-create.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); -var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "./node_modules/core-js/internals/object-define-properties.js"); -var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js"); -var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js"); -var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js"); -var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js"); -var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js"); -var IE_PROTO = sharedKey('IE_PROTO'); - -var PROTOTYPE = 'prototype'; -var Empty = function () { /* empty */ }; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = documentCreateElement('iframe'); - var length = enumBugKeys.length; - var lt = '<'; - var script = 'script'; - var gt = '>'; - var js = 'java' + script + ':'; - var iframeDocument; - iframe.style.display = 'none'; - html.appendChild(iframe); - iframe.src = String(js); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]]; - return createDict(); -}; - -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : defineProperties(result, Properties); -}; - -hiddenKeys[IE_PROTO] = true; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/object-define-properties.js": -/*!********************************************************************!*\ - !*** ./node_modules/core-js/internals/object-define-properties.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js"); -var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js"); -var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); -var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js"); - -module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = objectKeys(Properties); - var length = keys.length; - var i = 0; - var key; - while (length > i) definePropertyModule.f(O, key = keys[i++], Properties[key]); - return O; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/object-define-property.js": -/*!******************************************************************!*\ - !*** ./node_modules/core-js/internals/object-define-property.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js"); -var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/core-js/internals/ie8-dom-define.js"); -var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); -var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js"); - -var nativeDefineProperty = Object.defineProperty; - -exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return nativeDefineProperty(O, P, Attributes); - } catch (error) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/object-get-own-property-descriptor.js": -/*!******************************************************************************!*\ - !*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***! - \******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js"); -var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js"); -var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js"); -var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js"); -var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js"); -var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); -var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/core-js/internals/ie8-dom-define.js"); - -var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - -exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { - O = toIndexedObject(O); - P = toPrimitive(P, true); - if (IE8_DOM_DEFINE) try { - return nativeGetOwnPropertyDescriptor(O, P); - } catch (error) { /* empty */ } - if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/object-get-own-property-names.js": -/*!*************************************************************************!*\ - !*** ./node_modules/core-js/internals/object-get-own-property-names.js ***! - \*************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) -var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/core-js/internals/object-keys-internal.js"); -var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js"); - -var hiddenKeys = enumBugKeys.concat('length', 'prototype'); - -exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return internalObjectKeys(O, hiddenKeys); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/object-get-own-property-symbols.js": -/*!***************************************************************************!*\ - !*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***! - \***************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -exports.f = Object.getOwnPropertySymbols; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/object-get-prototype-of.js": -/*!*******************************************************************!*\ - !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***! - \*******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); -var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js"); -var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js"); -var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js"); - -var IE_PROTO = sharedKey('IE_PROTO'); -var ObjectPrototype = Object.prototype; - -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectPrototype : null; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/object-keys-internal.js": -/*!****************************************************************!*\ - !*** ./node_modules/core-js/internals/object-keys-internal.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); -var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js"); -var arrayIncludes = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js"); -var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js"); - -var arrayIndexOf = arrayIncludes(false); - -module.exports = function (object, names) { - var O = toIndexedObject(object); - var i = 0; - var result = []; - var key; - for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - return result; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/object-keys.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/internals/object-keys.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/core-js/internals/object-keys-internal.js"); -var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js"); - -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -module.exports = Object.keys || function keys(O) { - return internalObjectKeys(O, enumBugKeys); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/object-property-is-enumerable.js": -/*!*************************************************************************!*\ - !*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***! - \*************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var nativePropertyIsEnumerable = {}.propertyIsEnumerable; -var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - -// Nashorn ~ JDK8 bug -var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); - -exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { - var descriptor = getOwnPropertyDescriptor(this, V); - return !!descriptor && descriptor.enumerable; -} : nativePropertyIsEnumerable; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/object-set-prototype-of.js": -/*!*******************************************************************!*\ - !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***! - \*******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var validateSetPrototypeOfArguments = __webpack_require__(/*! ../internals/validate-set-prototype-of-arguments */ "./node_modules/core-js/internals/validate-set-prototype-of-arguments.js"); - -// Works with __proto__ only. Old v8 can't work with null proto objects. -/* eslint-disable no-proto */ -module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { - var correctSetter = false; - var test = {}; - var setter; - try { - setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; - setter.call(test, []); - correctSetter = test instanceof Array; - } catch (error) { /* empty */ } - return function setPrototypeOf(O, proto) { - validateSetPrototypeOfArguments(O, proto); - if (correctSetter) setter.call(O, proto); - else O.__proto__ = proto; - return O; - }; -}() : undefined); - - -/***/ }), - -/***/ "./node_modules/core-js/internals/own-keys.js": -/*!****************************************************!*\ - !*** ./node_modules/core-js/internals/own-keys.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); -var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js"); -var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/core-js/internals/object-get-own-property-symbols.js"); -var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); - -var Reflect = global.Reflect; - -// all object keys, includes non-enumerable and symbols -module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { - var keys = getOwnPropertyNamesModule.f(anObject(it)); - var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; - return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/path.js": -/*!************************************************!*\ - !*** ./node_modules/core-js/internals/path.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); - - -/***/ }), - -/***/ "./node_modules/core-js/internals/redefine.js": -/*!****************************************************!*\ - !*** ./node_modules/core-js/internals/redefine.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); -var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js"); -var hide = __webpack_require__(/*! ../internals/hide */ "./node_modules/core-js/internals/hide.js"); -var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); -var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js"); -var nativeFunctionToString = __webpack_require__(/*! ../internals/function-to-string */ "./node_modules/core-js/internals/function-to-string.js"); -var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js"); - -var getInternalState = InternalStateModule.get; -var enforceInternalState = InternalStateModule.enforce; -var TEMPLATE = String(nativeFunctionToString).split('toString'); - -shared('inspectSource', function (it) { - return nativeFunctionToString.call(it); -}); - -(module.exports = function (O, key, value, options) { - var unsafe = options ? !!options.unsafe : false; - var simple = options ? !!options.enumerable : false; - var noTargetGet = options ? !!options.noTargetGet : false; - if (typeof value == 'function') { - if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key); - enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : ''); - } - if (O === global) { - if (simple) O[key] = value; - else setGlobal(key, value); - return; - } else if (!unsafe) { - delete O[key]; - } else if (!noTargetGet && O[key]) { - simple = true; - } - if (simple) O[key] = value; - else hide(O, key, value); -// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative -})(Function.prototype, 'toString', function toString() { - return typeof this == 'function' && getInternalState(this).source || nativeFunctionToString.call(this); -}); - - -/***/ }), - -/***/ "./node_modules/core-js/internals/require-object-coercible.js": -/*!********************************************************************!*\ - !*** ./node_modules/core-js/internals/require-object-coercible.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -// `RequireObjectCoercible` abstract operation -// https://tc39.github.io/ecma262/#sec-requireobjectcoercible -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/set-global.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/internals/set-global.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); -var hide = __webpack_require__(/*! ../internals/hide */ "./node_modules/core-js/internals/hide.js"); - -module.exports = function (key, value) { - try { - hide(global, key, value); - } catch (error) { - global[key] = value; - } return value; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/set-to-string-tag.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/internals/set-to-string-tag.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f; -var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); -var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); - -var TO_STRING_TAG = wellKnownSymbol('toStringTag'); - -module.exports = function (it, TAG, STATIC) { - if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { - defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG }); - } -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/shared-key.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/internals/shared-key.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js"); -var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js"); - -var keys = shared('keys'); - -module.exports = function (key) { - return keys[key] || (keys[key] = uid(key)); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/shared.js": -/*!**************************************************!*\ - !*** ./node_modules/core-js/internals/shared.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); -var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js"); -var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js"); - -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || setGlobal(SHARED, {}); - -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: '3.1.3', - mode: IS_PURE ? 'pure' : 'global', - copyright: '© 2019 Denis Pushkarev (zloirock.ru)' -}); - - -/***/ }), - -/***/ "./node_modules/core-js/internals/string-at.js": -/*!*****************************************************!*\ - !*** ./node_modules/core-js/internals/string-at.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js"); -var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js"); - -// CONVERT_TO_STRING: true -> String#at -// CONVERT_TO_STRING: false -> String#codePointAt -module.exports = function (that, pos, CONVERT_TO_STRING) { - var S = String(requireObjectCoercible(that)); - var position = toInteger(pos); - var size = S.length; - var first, second; - if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; - first = S.charCodeAt(position); - return first < 0xD800 || first > 0xDBFF || position + 1 === size - || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF - ? CONVERT_TO_STRING ? S.charAt(position) : first - : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/to-absolute-index.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/internals/to-absolute-index.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js"); - -var max = Math.max; -var min = Math.min; - -// Helper for a popular repeating case of the spec: -// Let integer be ? ToInteger(index). -// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length). -module.exports = function (index, length) { - var integer = toInteger(index); - return integer < 0 ? max(integer + length, 0) : min(integer, length); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/to-indexed-object.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/internals/to-indexed-object.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// toObject with fallback for non-array-like ES3 strings -var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js"); -var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js"); - -module.exports = function (it) { - return IndexedObject(requireObjectCoercible(it)); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/to-integer.js": -/*!******************************************************!*\ - !*** ./node_modules/core-js/internals/to-integer.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -var ceil = Math.ceil; -var floor = Math.floor; - -// `ToInteger` abstract operation -// https://tc39.github.io/ecma262/#sec-tointeger -module.exports = function (argument) { - return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/to-length.js": -/*!*****************************************************!*\ - !*** ./node_modules/core-js/internals/to-length.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js"); - -var min = Math.min; - -// `ToLength` abstract operation -// https://tc39.github.io/ecma262/#sec-tolength -module.exports = function (argument) { - return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/to-object.js": -/*!*****************************************************!*\ - !*** ./node_modules/core-js/internals/to-object.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js"); - -// `ToObject` abstract operation -// https://tc39.github.io/ecma262/#sec-toobject -module.exports = function (argument) { - return Object(requireObjectCoercible(argument)); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/to-primitive.js": -/*!********************************************************!*\ - !*** ./node_modules/core-js/internals/to-primitive.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); - -// 7.1.1 ToPrimitive(input [, PreferredType]) -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/uid.js": -/*!***********************************************!*\ - !*** ./node_modules/core-js/internals/uid.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -var id = 0; -var postfix = Math.random(); - -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + postfix).toString(36)); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/validate-set-prototype-of-arguments.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/core-js/internals/validate-set-prototype-of-arguments.js ***! - \*******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); -var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); - -module.exports = function (O, proto) { - anObject(O); - if (!isObject(proto) && proto !== null) { - throw TypeError("Can't set " + String(proto) + ' as a prototype'); - } -}; - - -/***/ }), - -/***/ "./node_modules/core-js/internals/well-known-symbol.js": -/*!*************************************************************!*\ - !*** ./node_modules/core-js/internals/well-known-symbol.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); -var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js"); -var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js"); -var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js"); - -var Symbol = global.Symbol; -var store = shared('wks'); - -module.exports = function (name) { - return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name] - || (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - - -/***/ }), - -/***/ "./node_modules/core-js/modules/es.array.from.js": -/*!*******************************************************!*\ - !*** ./node_modules/core-js/modules/es.array.from.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js"); -var from = __webpack_require__(/*! ../internals/array-from */ "./node_modules/core-js/internals/array-from.js"); -var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js"); - -var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) { - Array.from(iterable); -}); - -// `Array.from` method -// https://tc39.github.io/ecma262/#sec-array.from -$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, { - from: from -}); - - -/***/ }), - -/***/ "./node_modules/core-js/modules/es.string.iterator.js": -/*!************************************************************!*\ - !*** ./node_modules/core-js/modules/es.string.iterator.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var codePointAt = __webpack_require__(/*! ../internals/string-at */ "./node_modules/core-js/internals/string-at.js"); -var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js"); -var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js"); - -var STRING_ITERATOR = 'String Iterator'; -var setInternalState = InternalStateModule.set; -var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); - -// `String.prototype[@@iterator]` method -// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator -defineIterator(String, 'String', function (iterated) { - setInternalState(this, { - type: STRING_ITERATOR, - string: String(iterated), - index: 0 - }); -// `%StringIteratorPrototype%.next` method -// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next -}, function next() { - var state = getInternalState(this); - var string = state.string; - var index = state.index; - var point; - if (index >= string.length) return { value: undefined, done: true }; - point = codePointAt(string, index, true); - state.index += point.length; - return { value: point, done: false }; -}); - - -/***/ }), - -/***/ "./node_modules/webpack/buildin/global.js": -/*!***********************************!*\ - !*** (webpack)/buildin/global.js ***! - \***********************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1, eval)("this"); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), - -/***/ "./src/default-attrs.json": -/*!********************************!*\ - !*** ./src/default-attrs.json ***! - \********************************/ -/*! exports provided: xmlns, width, height, viewBox, fill, stroke, stroke-width, stroke-linecap, stroke-linejoin, default */ -/***/ (function(module) { - -module.exports = {"xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}; - -/***/ }), - -/***/ "./src/icon.js": -/*!*********************!*\ - !*** ./src/icon.js ***! - \*********************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _dedupe = __webpack_require__(/*! classnames/dedupe */ "./node_modules/classnames/dedupe.js"); - -var _dedupe2 = _interopRequireDefault(_dedupe); - -var _defaultAttrs = __webpack_require__(/*! ./default-attrs.json */ "./src/default-attrs.json"); - -var _defaultAttrs2 = _interopRequireDefault(_defaultAttrs); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Icon = function () { - function Icon(name, contents) { - var tags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; - - _classCallCheck(this, Icon); - - this.name = name; - this.contents = contents; - this.tags = tags; - this.attrs = _extends({}, _defaultAttrs2.default, { class: 'feather feather-' + name }); - } - - /** - * Create an SVG string. - * @param {Object} attrs - * @returns {string} - */ - - - _createClass(Icon, [{ - key: 'toSvg', - value: function toSvg() { - var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var combinedAttrs = _extends({}, this.attrs, attrs, { class: (0, _dedupe2.default)(this.attrs.class, attrs.class) }); - - return '' + this.contents + ''; - } - - /** - * Return string representation of an `Icon`. - * - * Added for backward compatibility. If old code expects `feather.icons.` - * to be a string, `toString()` will get implicitly called. - * - * @returns {string} - */ - - }, { - key: 'toString', - value: function toString() { - return this.contents; - } - }]); - - return Icon; -}(); - -/** - * Convert attributes object to string of HTML attributes. - * @param {Object} attrs - * @returns {string} - */ - - -function attrsToString(attrs) { - return Object.keys(attrs).map(function (key) { - return key + '="' + attrs[key] + '"'; - }).join(' '); -} - -exports.default = Icon; - -/***/ }), - -/***/ "./src/icons.js": -/*!**********************!*\ - !*** ./src/icons.js ***! - \**********************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _icon = __webpack_require__(/*! ./icon */ "./src/icon.js"); - -var _icon2 = _interopRequireDefault(_icon); - -var _icons = __webpack_require__(/*! ../dist/icons.json */ "./dist/icons.json"); - -var _icons2 = _interopRequireDefault(_icons); - -var _tags = __webpack_require__(/*! ./tags.json */ "./src/tags.json"); - -var _tags2 = _interopRequireDefault(_tags); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = Object.keys(_icons2.default).map(function (key) { - return new _icon2.default(key, _icons2.default[key], _tags2.default[key]); -}).reduce(function (object, icon) { - object[icon.name] = icon; - return object; -}, {}); - -/***/ }), - -/***/ "./src/index.js": -/*!**********************!*\ - !*** ./src/index.js ***! - \**********************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _icons = __webpack_require__(/*! ./icons */ "./src/icons.js"); - -var _icons2 = _interopRequireDefault(_icons); - -var _toSvg = __webpack_require__(/*! ./to-svg */ "./src/to-svg.js"); - -var _toSvg2 = _interopRequireDefault(_toSvg); - -var _replace = __webpack_require__(/*! ./replace */ "./src/replace.js"); - -var _replace2 = _interopRequireDefault(_replace); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = { icons: _icons2.default, toSvg: _toSvg2.default, replace: _replace2.default }; - -/***/ }), - -/***/ "./src/replace.js": -/*!************************!*\ - !*** ./src/replace.js ***! - \************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /* eslint-env browser */ - - -var _dedupe = __webpack_require__(/*! classnames/dedupe */ "./node_modules/classnames/dedupe.js"); - -var _dedupe2 = _interopRequireDefault(_dedupe); - -var _icons = __webpack_require__(/*! ./icons */ "./src/icons.js"); - -var _icons2 = _interopRequireDefault(_icons); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Replace all HTML elements that have a `data-feather` attribute with SVG markup - * corresponding to the element's `data-feather` attribute value. - * @param {Object} attrs - */ -function replace() { - var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - if (typeof document === 'undefined') { - throw new Error('`feather.replace()` only works in a browser environment.'); - } - - var elementsToReplace = document.querySelectorAll('[data-feather]'); - - Array.from(elementsToReplace).forEach(function (element) { - return replaceElement(element, attrs); - }); -} - -/** - * Replace a single HTML element with SVG markup - * corresponding to the element's `data-feather` attribute value. - * @param {HTMLElement} element - * @param {Object} attrs - */ -function replaceElement(element) { - var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var elementAttrs = getAttrs(element); - var name = elementAttrs['data-feather']; - delete elementAttrs['data-feather']; - - if (_icons2.default[name] === undefined) { - console.warn('feather: \'' + name + '\' is not a valid icon'); - return; - } - - var svgString = _icons2.default[name].toSvg(_extends({}, attrs, elementAttrs, { class: (0, _dedupe2.default)(attrs.class, elementAttrs.class) })); - var svgDocument = new DOMParser().parseFromString(svgString, 'image/svg+xml'); - var svgElement = svgDocument.querySelector('svg'); - - element.parentNode.replaceChild(svgElement, element); -} - -/** - * Get the attributes of an HTML element. - * @param {HTMLElement} element - * @returns {Object} - */ -function getAttrs(element) { - return Array.from(element.attributes).reduce(function (attrs, attr) { - attrs[attr.name] = attr.value; - return attrs; - }, {}); -} - -exports.default = replace; - -/***/ }), - -/***/ "./src/tags.json": -/*!***********************!*\ - !*** ./src/tags.json ***! - \***********************/ -/*! exports provided: activity, airplay, alert-circle, alert-octagon, alert-triangle, align-center, align-justify, align-left, align-right, anchor, archive, at-sign, award, aperture, bar-chart, bar-chart-2, battery, battery-charging, bell, bell-off, bluetooth, book-open, book, bookmark, box, briefcase, calendar, camera, cast, chevron-down, chevron-up, circle, clipboard, clock, cloud-drizzle, cloud-lightning, cloud-rain, cloud-snow, cloud, codepen, codesandbox, code, coffee, columns, command, compass, copy, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, cpu, credit-card, crop, crosshair, database, delete, disc, dollar-sign, droplet, edit, edit-2, edit-3, eye, eye-off, external-link, facebook, fast-forward, figma, file-minus, file-plus, file-text, film, filter, flag, folder-minus, folder-plus, folder, framer, frown, gift, git-branch, git-commit, git-merge, git-pull-request, github, gitlab, globe, hard-drive, hash, headphones, heart, help-circle, hexagon, home, image, inbox, instagram, key, layers, layout, life-buoy, link, link-2, linkedin, list, lock, log-in, log-out, mail, map-pin, map, maximize, maximize-2, meh, menu, message-circle, message-square, mic-off, mic, minimize, minimize-2, minus, monitor, moon, more-horizontal, more-vertical, mouse-pointer, move, music, navigation, navigation-2, octagon, package, paperclip, pause, pause-circle, pen-tool, percent, phone-call, phone-forwarded, phone-incoming, phone-missed, phone-off, phone-outgoing, phone, play, pie-chart, play-circle, plus, plus-circle, plus-square, pocket, power, printer, radio, refresh-cw, refresh-ccw, repeat, rewind, rotate-ccw, rotate-cw, rss, save, scissors, search, send, settings, share-2, shield, shield-off, shopping-bag, shopping-cart, shuffle, skip-back, skip-forward, slack, slash, sliders, smartphone, smile, speaker, star, stop-circle, sun, sunrise, sunset, tablet, tag, target, terminal, thermometer, thumbs-down, thumbs-up, toggle-left, toggle-right, tool, trash, trash-2, triangle, truck, tv, twitch, twitter, type, umbrella, unlock, user-check, user-minus, user-plus, user-x, user, users, video-off, video, voicemail, volume, volume-1, volume-2, volume-x, watch, wifi-off, wifi, wind, x-circle, x-octagon, x-square, x, youtube, zap-off, zap, zoom-in, zoom-out, default */ -/***/ (function(module) { - -module.exports = {"activity":["pulse","health","action","motion"],"airplay":["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],"anchor":[],"archive":["index","box"],"at-sign":["mention","at","email","message"],"award":["achievement","badge"],"aperture":["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],"battery":["power","electricity"],"battery-charging":["power","electricity"],"bell":["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],"bluetooth":["wireless"],"book-open":["read","library"],"book":["read","dictionary","booklet","magazine","library"],"bookmark":["read","clip","marker","tag"],"box":["cube"],"briefcase":["work","bag","baggage","folder"],"calendar":["date"],"camera":["photo"],"cast":["chromecast","airplay"],"chevron-down":["expand"],"chevron-up":["collapse"],"circle":["off","zero","record"],"clipboard":["copy"],"clock":["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],"cloud":["weather"],"codepen":["logo"],"codesandbox":["logo"],"code":["source","programming"],"coffee":["drink","cup","mug","tea","cafe","hot","beverage"],"columns":["layout"],"command":["keyboard","cmd","terminal","prompt"],"compass":["navigation","safari","travel","direction"],"copy":["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],"cpu":["processor","technology"],"credit-card":["purchase","payment","cc"],"crop":["photo","image"],"crosshair":["aim","target"],"database":["storage","memory"],"delete":["remove"],"disc":["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],"droplet":["water"],"edit":["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],"eye":["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],"facebook":["logo","social"],"fast-forward":["music"],"figma":["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],"film":["movie","video"],"filter":["funnel","hopper"],"flag":["report"],"folder-minus":["directory"],"folder-plus":["directory"],"folder":["directory"],"framer":["logo","design","tool"],"frown":["emoji","face","bad","sad","emotion"],"gift":["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],"github":["logo","version control"],"gitlab":["logo","version control"],"globe":["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],"hash":["hashtag","number","pound"],"headphones":["music","audio","sound"],"heart":["like","love","emotion"],"help-circle":["question mark"],"hexagon":["shape","node.js","logo"],"home":["house","living"],"image":["picture"],"inbox":["email"],"instagram":["logo","camera"],"key":["password","login","authentication","secure"],"layers":["stack"],"layout":["window","webpage"],"life-buoy":["help","life ring","support"],"link":["chain","url"],"link-2":["chain","url"],"linkedin":["logo","social media"],"list":["options"],"lock":["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],"mail":["email","message"],"map-pin":["location","navigation","travel","marker"],"map":["location","navigation","travel"],"maximize":["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],"meh":["emoji","face","neutral","emotion"],"menu":["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],"mic":["record","sound","listen"],"minimize":["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],"minus":["subtract"],"monitor":["tv","screen","display"],"moon":["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],"move":["arrows"],"music":["note"],"navigation":["location","travel"],"navigation-2":["location","travel"],"octagon":["stop"],"package":["box","container"],"paperclip":["attachment"],"pause":["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],"percent":["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],"phone":["call"],"play":["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],"plus":["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],"pocket":["logo","save"],"power":["on","off"],"printer":["fax","office","device"],"radio":["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],"repeat":["loop","arrows"],"rewind":["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],"rss":["feed","subscribe"],"save":["floppy disk"],"scissors":["cut"],"search":["find","magnifier","magnifying glass"],"send":["message","mail","email","paper airplane","paper aeroplane"],"settings":["cog","edit","gear","preferences"],"share-2":["network","connections"],"shield":["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],"shuffle":["music"],"skip-back":["music"],"skip-forward":["music"],"slack":["logo"],"slash":["ban","no"],"sliders":["settings","controls"],"smartphone":["cellphone","device"],"smile":["emoji","face","happy","good","emotion"],"speaker":["audio","music"],"star":["bookmark","favorite","like"],"stop-circle":["media","music"],"sun":["brightness","weather","light"],"sunrise":["weather","time","morning","day"],"sunset":["weather","time","evening","night"],"tablet":["device"],"tag":["label"],"target":["logo","bullseye"],"terminal":["code","command line","prompt"],"thermometer":["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],"tool":["settings","spanner"],"trash":["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],"triangle":["delta"],"truck":["delivery","van","shipping","transport","lorry"],"tv":["television","stream"],"twitch":["logo"],"twitter":["logo","social"],"type":["text"],"umbrella":["rain","weather"],"unlock":["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],"user":["person","account"],"users":["group"],"video-off":["camera","movie","film"],"video":["camera","movie","film"],"voicemail":["phone"],"volume":["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],"watch":["clock","time"],"wifi-off":["disabled"],"wifi":["connection","signal","wireless"],"wind":["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],"x":["cancel","close","delete","remove","times","clear"],"youtube":["logo","video","play"],"zap-off":["flash","camera","lightning"],"zap":["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}; - -/***/ }), - -/***/ "./src/to-svg.js": -/*!***********************!*\ - !*** ./src/to-svg.js ***! - \***********************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _icons = __webpack_require__(/*! ./icons */ "./src/icons.js"); - -var _icons2 = _interopRequireDefault(_icons); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Create an SVG string. - * @deprecated - * @param {string} name - * @param {Object} attrs - * @returns {string} - */ -function toSvg(name) { - var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - console.warn('feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead.'); - - if (!name) { - throw new Error('The required `key` (icon name) parameter is missing.'); - } - - if (!_icons2.default[name]) { - throw new Error('No icon matching \'' + name + '\'. See the complete list of icons at https://feathericons.com'); - } - - return _icons2.default[name].toSvg(attrs); -} - -exports.default = toSvg; - -/***/ }), - -/***/ 0: -/*!**************************************************!*\ - !*** multi core-js/es/array/from ./src/index.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(/*! core-js/es/array/from */"./node_modules/core-js/es/array/from.js"); -module.exports = __webpack_require__(/*! /home/runner/work/feather/feather/src/index.js */"./src/index.js"); - - -/***/ }) - -/******/ }); -}); -//# sourceMappingURL=feather.js.map \ No newline at end of file diff --git a/web/static/node_modules/feather-icons/dist/feather.js.map b/web/static/node_modules/feather-icons/dist/feather.js.map deleted file mode 100644 index ea9fa0b1..00000000 --- a/web/static/node_modules/feather-icons/dist/feather.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://feather/webpack/universalModuleDefinition","webpack://feather/webpack/bootstrap","webpack://feather/./node_modules/classnames/dedupe.js","webpack://feather/./node_modules/core-js/es/array/from.js","webpack://feather/./node_modules/core-js/internals/a-function.js","webpack://feather/./node_modules/core-js/internals/an-object.js","webpack://feather/./node_modules/core-js/internals/array-from.js","webpack://feather/./node_modules/core-js/internals/array-includes.js","webpack://feather/./node_modules/core-js/internals/bind-context.js","webpack://feather/./node_modules/core-js/internals/call-with-safe-iteration-closing.js","webpack://feather/./node_modules/core-js/internals/check-correctness-of-iteration.js","webpack://feather/./node_modules/core-js/internals/classof-raw.js","webpack://feather/./node_modules/core-js/internals/classof.js","webpack://feather/./node_modules/core-js/internals/copy-constructor-properties.js","webpack://feather/./node_modules/core-js/internals/correct-prototype-getter.js","webpack://feather/./node_modules/core-js/internals/create-iterator-constructor.js","webpack://feather/./node_modules/core-js/internals/create-property-descriptor.js","webpack://feather/./node_modules/core-js/internals/create-property.js","webpack://feather/./node_modules/core-js/internals/define-iterator.js","webpack://feather/./node_modules/core-js/internals/descriptors.js","webpack://feather/./node_modules/core-js/internals/document-create-element.js","webpack://feather/./node_modules/core-js/internals/enum-bug-keys.js","webpack://feather/./node_modules/core-js/internals/export.js","webpack://feather/./node_modules/core-js/internals/fails.js","webpack://feather/./node_modules/core-js/internals/function-to-string.js","webpack://feather/./node_modules/core-js/internals/get-iterator-method.js","webpack://feather/./node_modules/core-js/internals/global.js","webpack://feather/./node_modules/core-js/internals/has.js","webpack://feather/./node_modules/core-js/internals/hidden-keys.js","webpack://feather/./node_modules/core-js/internals/hide.js","webpack://feather/./node_modules/core-js/internals/html.js","webpack://feather/./node_modules/core-js/internals/ie8-dom-define.js","webpack://feather/./node_modules/core-js/internals/indexed-object.js","webpack://feather/./node_modules/core-js/internals/internal-state.js","webpack://feather/./node_modules/core-js/internals/is-array-iterator-method.js","webpack://feather/./node_modules/core-js/internals/is-forced.js","webpack://feather/./node_modules/core-js/internals/is-object.js","webpack://feather/./node_modules/core-js/internals/is-pure.js","webpack://feather/./node_modules/core-js/internals/iterators-core.js","webpack://feather/./node_modules/core-js/internals/iterators.js","webpack://feather/./node_modules/core-js/internals/native-symbol.js","webpack://feather/./node_modules/core-js/internals/native-weak-map.js","webpack://feather/./node_modules/core-js/internals/object-create.js","webpack://feather/./node_modules/core-js/internals/object-define-properties.js","webpack://feather/./node_modules/core-js/internals/object-define-property.js","webpack://feather/./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack://feather/./node_modules/core-js/internals/object-get-own-property-names.js","webpack://feather/./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack://feather/./node_modules/core-js/internals/object-get-prototype-of.js","webpack://feather/./node_modules/core-js/internals/object-keys-internal.js","webpack://feather/./node_modules/core-js/internals/object-keys.js","webpack://feather/./node_modules/core-js/internals/object-property-is-enumerable.js","webpack://feather/./node_modules/core-js/internals/object-set-prototype-of.js","webpack://feather/./node_modules/core-js/internals/own-keys.js","webpack://feather/./node_modules/core-js/internals/path.js","webpack://feather/./node_modules/core-js/internals/redefine.js","webpack://feather/./node_modules/core-js/internals/require-object-coercible.js","webpack://feather/./node_modules/core-js/internals/set-global.js","webpack://feather/./node_modules/core-js/internals/set-to-string-tag.js","webpack://feather/./node_modules/core-js/internals/shared-key.js","webpack://feather/./node_modules/core-js/internals/shared.js","webpack://feather/./node_modules/core-js/internals/string-at.js","webpack://feather/./node_modules/core-js/internals/to-absolute-index.js","webpack://feather/./node_modules/core-js/internals/to-indexed-object.js","webpack://feather/./node_modules/core-js/internals/to-integer.js","webpack://feather/./node_modules/core-js/internals/to-length.js","webpack://feather/./node_modules/core-js/internals/to-object.js","webpack://feather/./node_modules/core-js/internals/to-primitive.js","webpack://feather/./node_modules/core-js/internals/uid.js","webpack://feather/./node_modules/core-js/internals/validate-set-prototype-of-arguments.js","webpack://feather/./node_modules/core-js/internals/well-known-symbol.js","webpack://feather/./node_modules/core-js/modules/es.array.from.js","webpack://feather/./node_modules/core-js/modules/es.string.iterator.js","webpack://feather/(webpack)/buildin/global.js","webpack://feather/./src/icon.js","webpack://feather/./src/icons.js","webpack://feather/./src/index.js","webpack://feather/./src/replace.js","webpack://feather/./src/to-svg.js"],"names":["Icon","name","contents","tags","attrs","DEFAULT_ATTRS","class","combinedAttrs","attrsToString","Object","keys","map","key","join","icons","reduce","object","icon","module","exports","toSvg","replace","document","Error","elementsToReplace","querySelectorAll","Array","from","forEach","replaceElement","element","elementAttrs","getAttrs","undefined","console","warn","svgString","svgDocument","DOMParser","parseFromString","svgElement","querySelector","parentNode","replaceChild","attributes","attr","value"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;;;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;AACA;AACA;;AAEA,iBAAiB;;AAEjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;;AAEA,OAAO;AACP,IAAI;AACJ;;AAEA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,GAAG;AAAA;AACH,EAAE,QAEF;AACA,CAAC;;;;;;;;;;;;AC5GD;AACA;AACA;;AAEA;;;;;;;;;;;;ACJA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;ACJA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,+BAA+B;AACzC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxCA;AACA;AACA;;AAEA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY,eAAe;AAChC;AACA,KAAK;AACL;AACA;;;;;;;;;;;;AC1BA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvBA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS,EAAE;AACzD,CAAC,gBAAgB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;AACA;;;;;;;;;;;;ACrCA,iBAAiB;;AAEjB;AACA;AACA;;;;;;;;;;;;ACJA;AACA;;AAEA;AACA;AACA,gDAAgD,kBAAkB,EAAE;;AAEpE;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;;;;;;;;;;;;ACbA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA,CAAC;;;;;;;;;;;;;ACND;AACA;AACA;AACA;AACA;AACA;;AAEA,8BAA8B,aAAa;;AAE3C;AACA;AACA,6DAA6D,0CAA0C;AACvG;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8BAA8B,aAAa;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,yCAAyC,4CAA4C;AACrF,6CAA6C,4CAA4C;AACzF,+CAA+C,4CAA4C;AAC3F,KAAK,qBAAqB,sCAAsC;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,mBAAmB;AACnC;AACA;AACA,yCAAyC,kCAAkC;AAC3E;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,SAAS,qFAAqF;AACnG;;AAEA;AACA;;;;;;;;;;;;ACzFA;;AAEA;AACA;AACA,iCAAiC,QAAQ,mBAAmB,UAAU,EAAE,EAAE;AAC1E,CAAC;;;;;;;;;;;;ACLD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,mDAAmD;AACnD,GAAG;AACH,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrDA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;;;;;;;;;;ACNA;;AAEA;;;;;;;;;;;;ACFA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACVA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA,uBAAuB;;AAEvB;AACA;AACA;;;;;;;;;;;;ACJA;;;;;;;;;;;;ACAA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA;AACA;;;;;;;;;;;;ACTA;;AAEA;;AAEA;;;;;;;;;;;;ACJA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,UAAU;AAChC,GAAG;AACH,CAAC;;;;;;;;;;;;ACTD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,CAAC;;;;;;;;;;;;ACZD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,uCAAuC;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACTA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpBA;AACA;AACA;;;;;;;;;;;;ACFA;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,8BAA8B,aAAa;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AClCA;;;;;;;;;;;;ACAA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACND;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACbA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;;;;;;;;;;;ACRA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;ACfA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClBA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA,mCAAmC;AACnC;;AAEA;AACA,gFAAgF,OAAO;;AAEvF;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACVD;;AAEA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,gBAAgB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACnBD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,CAAC;;;;;;;;;;;;ACtCD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;;;;;;;;;;;ACTA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uCAAuC,iCAAiC;AACxE;AACA;;;;;;;;;;;;ACVA;AACA;;AAEA;;AAEA;AACA;AACA;;;;;;;;;;;;ACPA;AACA;AACA;;AAEA;AACA,kDAAkD;;AAElD;AACA,qEAAqE;AACrE,CAAC;AACD;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACbD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;;AAEA;AACA;;AAEA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACNA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;;AAEA;;AAEA;AACA;AACA;AACA,uEAAuE;AACvE;;;;;;;;;;;;ACRA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACRA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,GAAG,2DAA2D;AAC9D;AACA,CAAC;;;;;;;;;;;;;ACZD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,UAAU;AACV,CAAC;;;;;;;;;;;;AC5BD;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACnBA;;;;AAEA;;;;;;;;IAEMA,I;AACJ,gBAAYC,IAAZ,EAAkBC,QAAlB,EAAuC;AAAA,QAAXC,IAAW,uEAAJ,EAAI;;AAAA;;AACrC,SAAKF,IAAL,GAAYA,IAAZ;AACA,SAAKC,QAAL,GAAgBA,QAAhB;AACA,SAAKC,IAAL,GAAYA,IAAZ;AACA,SAAKC,KAAL,gBACKC,sBADL,EAEK,EAAEC,4BAA0BL,IAA5B,EAFL;AAID;;AAED;;;;;;;;;4BAKkB;AAAA,UAAZG,KAAY,uEAAJ,EAAI;;AAChB,UAAMG,6BACD,KAAKH,KADJ,EAEDA,KAFC,EAGD,EAAEE,OAAO,sBAAW,KAAKF,KAAL,CAAWE,KAAtB,EAA6BF,MAAME,KAAnC,CAAT,EAHC,CAAN;;AAMA,uBAAeE,cAAcD,aAAd,CAAf,SAA+C,KAAKL,QAApD;AACD;;AAED;;;;;;;;;;;+BAQW;AACT,aAAO,KAAKA,QAAZ;AACD;;;;;;AAGH;;;;;;;AAKA,SAASM,aAAT,CAAuBJ,KAAvB,EAA8B;AAC5B,SAAOK,OAAOC,IAAP,CAAYN,KAAZ,EACJO,GADI,CACA;AAAA,WAAUC,GAAV,UAAkBR,MAAMQ,GAAN,CAAlB;AAAA,GADA,EAEJC,IAFI,CAEC,GAFD,CAAP;AAGD;;kBAEcb,I;;;;;;;;;;;;;;;;;;ACtDf;;;;AACA;;;;AACA;;;;;;kBAEeS,OAAOC,IAAP,CAAYI,eAAZ,EACZH,GADY,CACR;AAAA,SAAO,IAAIX,cAAJ,CAASY,GAAT,EAAcE,gBAAMF,GAAN,CAAd,EAA0BT,eAAKS,GAAL,CAA1B,CAAP;AAAA,CADQ,EAEZG,MAFY,CAEL,UAACC,MAAD,EAASC,IAAT,EAAkB;AACxBD,SAAOC,KAAKhB,IAAZ,IAAoBgB,IAApB;AACA,SAAOD,MAAP;AACD,CALY,EAKV,EALU,C;;;;;;;;;;;;;;ACJf;;;;AACA;;;;AACA;;;;;;AAEAE,OAAOC,OAAP,GAAiB,EAAEL,sBAAF,EAASM,sBAAT,EAAgBC,0BAAhB,EAAjB,C;;;;;;;;;;;;;;;;;;kQCJA;;;AACA;;;;AAEA;;;;;;AAEA;;;;;AAKA,SAASA,OAAT,GAA6B;AAAA,MAAZjB,KAAY,uEAAJ,EAAI;;AAC3B,MAAI,OAAOkB,QAAP,KAAoB,WAAxB,EAAqC;AACnC,UAAM,IAAIC,KAAJ,CAAU,0DAAV,CAAN;AACD;;AAED,MAAMC,oBAAoBF,SAASG,gBAAT,CAA0B,gBAA1B,CAA1B;;AAEAC,QAAMC,IAAN,CAAWH,iBAAX,EAA8BI,OAA9B,CAAsC;AAAA,WACpCC,eAAeC,OAAf,EAAwB1B,KAAxB,CADoC;AAAA,GAAtC;AAGD;;AAED;;;;;;AAMA,SAASyB,cAAT,CAAwBC,OAAxB,EAA6C;AAAA,MAAZ1B,KAAY,uEAAJ,EAAI;;AAC3C,MAAM2B,eAAeC,SAASF,OAAT,CAArB;AACA,MAAM7B,OAAO8B,aAAa,cAAb,CAAb;AACA,SAAOA,aAAa,cAAb,CAAP;;AAEA,MAAIjB,gBAAMb,IAAN,MAAgBgC,SAApB,EAA+B;AAC7BC,YAAQC,IAAR,iBAA0BlC,IAA1B;AACA;AACD;;AAED,MAAMmC,YAAYtB,gBAAMb,IAAN,EAAYmB,KAAZ,cACbhB,KADa,EAEb2B,YAFa,EAGb,EAAEzB,OAAO,sBAAWF,MAAME,KAAjB,EAAwByB,aAAazB,KAArC,CAAT,EAHa,EAAlB;AAKA,MAAM+B,cAAc,IAAIC,SAAJ,GAAgBC,eAAhB,CAClBH,SADkB,EAElB,eAFkB,CAApB;AAIA,MAAMI,aAAaH,YAAYI,aAAZ,CAA0B,KAA1B,CAAnB;;AAEAX,UAAQY,UAAR,CAAmBC,YAAnB,CAAgCH,UAAhC,EAA4CV,OAA5C;AACD;;AAED;;;;;AAKA,SAASE,QAAT,CAAkBF,OAAlB,EAA2B;AACzB,SAAOJ,MAAMC,IAAN,CAAWG,QAAQc,UAAnB,EAA+B7B,MAA/B,CAAsC,UAACX,KAAD,EAAQyC,IAAR,EAAiB;AAC5DzC,UAAMyC,KAAK5C,IAAX,IAAmB4C,KAAKC,KAAxB;AACA,WAAO1C,KAAP;AACD,GAHM,EAGJ,EAHI,CAAP;AAID;;kBAEciB,O;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChEf;;;;;;AAEA;;;;;;;AAOA,SAASD,KAAT,CAAenB,IAAf,EAAiC;AAAA,MAAZG,KAAY,uEAAJ,EAAI;;AAC/B8B,UAAQC,IAAR,CACE,gFADF;;AAIA,MAAI,CAAClC,IAAL,EAAW;AACT,UAAM,IAAIsB,KAAJ,CAAU,sDAAV,CAAN;AACD;;AAED,MAAI,CAACT,gBAAMb,IAAN,CAAL,EAAkB;AAChB,UAAM,IAAIsB,KAAJ,yBACiBtB,IADjB,oEAAN;AAGD;;AAED,SAAOa,gBAAMb,IAAN,EAAYmB,KAAZ,CAAkBhB,KAAlB,CAAP;AACD;;kBAEcgB,K","file":"feather.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"feather\"] = factory();\n\telse\n\t\troot[\"feather\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/*!\n Copyright (c) 2016 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar classNames = (function () {\n\t\t// don't inherit from Object so we can skip hasOwnProperty check later\n\t\t// http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232\n\t\tfunction StorageObject() {}\n\t\tStorageObject.prototype = Object.create(null);\n\n\t\tfunction _parseArray (resultSet, array) {\n\t\t\tvar length = array.length;\n\n\t\t\tfor (var i = 0; i < length; ++i) {\n\t\t\t\t_parse(resultSet, array[i]);\n\t\t\t}\n\t\t}\n\n\t\tvar hasOwn = {}.hasOwnProperty;\n\n\t\tfunction _parseNumber (resultSet, num) {\n\t\t\tresultSet[num] = true;\n\t\t}\n\n\t\tfunction _parseObject (resultSet, object) {\n\t\t\tfor (var k in object) {\n\t\t\t\tif (hasOwn.call(object, k)) {\n\t\t\t\t\t// set value to false instead of deleting it to avoid changing object structure\n\t\t\t\t\t// https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions\n\t\t\t\t\tresultSet[k] = !!object[k];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar SPACE = /\\s+/;\n\t\tfunction _parseString (resultSet, str) {\n\t\t\tvar array = str.split(SPACE);\n\t\t\tvar length = array.length;\n\n\t\t\tfor (var i = 0; i < length; ++i) {\n\t\t\t\tresultSet[array[i]] = true;\n\t\t\t}\n\t\t}\n\n\t\tfunction _parse (resultSet, arg) {\n\t\t\tif (!arg) return;\n\t\t\tvar argType = typeof arg;\n\n\t\t\t// 'foo bar'\n\t\t\tif (argType === 'string') {\n\t\t\t\t_parseString(resultSet, arg);\n\n\t\t\t// ['foo', 'bar', ...]\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\t_parseArray(resultSet, arg);\n\n\t\t\t// { 'foo': true, ... }\n\t\t\t} else if (argType === 'object') {\n\t\t\t\t_parseObject(resultSet, arg);\n\n\t\t\t// '130'\n\t\t\t} else if (argType === 'number') {\n\t\t\t\t_parseNumber(resultSet, arg);\n\t\t\t}\n\t\t}\n\n\t\tfunction _classNames () {\n\t\t\t// don't leak arguments\n\t\t\t// https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments\n\t\t\tvar len = arguments.length;\n\t\t\tvar args = Array(len);\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\targs[i] = arguments[i];\n\t\t\t}\n\n\t\t\tvar classSet = new StorageObject();\n\t\t\t_parseArray(classSet, args);\n\n\t\t\tvar list = [];\n\n\t\t\tfor (var k in classSet) {\n\t\t\t\tif (classSet[k]) {\n\t\t\t\t\tlist.push(k)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn list.join(' ');\n\t\t}\n\n\t\treturn _classNames;\n\t})();\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","require('../../modules/es.string.iterator');\nrequire('../../modules/es.array.from');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Array.from;\n","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","'use strict';\nvar bind = require('../internals/bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method\n// https://tc39.github.io/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iteratorMethod = getIteratorMethod(O);\n var length, result, step, iterator;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = iteratorMethod.call(O);\n result = new C();\n for (;!(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping\n ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true)\n : step.value\n );\n }\n } else {\n length = toLength(O.length);\n result = new C(length);\n for (;length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\n// false -> Array#indexOf\n// https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n// true -> Array#includes\n// https://tc39.github.io/ecma262/#sec-array.prototype.includes\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var anObject = require('../internals/an-object');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n throw error;\n }\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line no-throw-literal\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar hide = require('../internals/hide');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n hide(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n hide(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n","var fails = require('../internals/fails');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar exist = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return exist ? document.createElement(it) : {};\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar hide = require('../internals/hide');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n hide(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var shared = require('../internals/shared');\n\nmodule.exports = shared('native-function-to-string', Function.toString);\n","var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var O = 'object';\nvar check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == O && globalThis) ||\n check(typeof window == O && window) ||\n check(typeof self == O && self) ||\n check(typeof global == O && global) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","module.exports = {};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var global = require('../internals/global');\n\nvar document = global.document;\n\nmodule.exports = document && document.documentElement;\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar hide = require('../internals/hide');\nvar objectHas = require('../internals/has');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n hide(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","module.exports = false;\n","'use strict';\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar hide = require('../internals/hide');\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nif (IteratorPrototype == undefined) IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nif (!IS_PURE && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","module.exports = {};\n","var fails = require('../internals/fails');\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});\n","var global = require('../internals/global');\nvar nativeFunctionToString = require('../internals/function-to-string');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap));\n","var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar PROTOTYPE = 'prototype';\nvar Empty = function () { /* empty */ };\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var length = enumBugKeys.length;\n var lt = '<';\n var script = 'script';\n var gt = '>';\n var js = 'java' + script + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n iframe.src = String(js);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];\n return createDict();\n};\n\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n\nhiddenKeys[IE_PROTO] = true;\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var i = 0;\n var key;\n while (length > i) definePropertyModule.f(O, key = keys[i++], Properties[key]);\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","var has = require('../internals/has');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar arrayIncludes = require('../internals/array-includes');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar arrayIndexOf = arrayIncludes(false);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n","var validateSetPrototypeOfArguments = require('../internals/validate-set-prototype-of-arguments');\n\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var correctSetter = false;\n var test = {};\n var setter;\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n correctSetter = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n validateSetPrototypeOfArguments(O, proto);\n if (correctSetter) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","var global = require('../internals/global');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\nvar Reflect = global.Reflect;\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","module.exports = require('../internals/global');\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hide = require('../internals/hide');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar nativeFunctionToString = require('../internals/function-to-string');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(nativeFunctionToString).split('toString');\n\nshared('inspectSource', function (it) {\n return nativeFunctionToString.call(it);\n});\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else hide(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || nativeFunctionToString.call(this);\n});\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var global = require('../internals/global');\nvar hide = require('../internals/hide');\n\nmodule.exports = function (key, value) {\n try {\n hide(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\nvar IS_PURE = require('../internals/is-pure');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.1.3',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});\n","var toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// CONVERT_TO_STRING: true -> String#at\n// CONVERT_TO_STRING: false -> String#codePointAt\nmodule.exports = function (that, pos, CONVERT_TO_STRING) {\n var S = String(requireObjectCoercible(that));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var isObject = require('../internals/is-object');\n\n// 7.1.1 ToPrimitive(input [, PreferredType])\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + postfix).toString(36));\n};\n","var isObject = require('../internals/is-object');\nvar anObject = require('../internals/an-object');\n\nmodule.exports = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) {\n throw TypeError(\"Can't set \" + String(proto) + ' as a prototype');\n }\n};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nvar Symbol = global.Symbol;\nvar store = shared('wks');\n\nmodule.exports = function (name) {\n return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name]\n || (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n","var $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.github.io/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n","'use strict';\nvar codePointAt = require('../internals/string-at');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = codePointAt(string, index, true);\n state.index += point.length;\n return { value: point, done: false };\n});\n","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\r\n} catch (e) {\r\n\t// This works if the window reference is available\r\n\tif (typeof window === \"object\") g = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n","import classnames from 'classnames/dedupe';\n\nimport DEFAULT_ATTRS from './default-attrs.json';\n\nclass Icon {\n constructor(name, contents, tags = []) {\n this.name = name;\n this.contents = contents;\n this.tags = tags;\n this.attrs = {\n ...DEFAULT_ATTRS,\n ...{ class: `feather feather-${name}` },\n };\n }\n\n /**\n * Create an SVG string.\n * @param {Object} attrs\n * @returns {string}\n */\n toSvg(attrs = {}) {\n const combinedAttrs = {\n ...this.attrs,\n ...attrs,\n ...{ class: classnames(this.attrs.class, attrs.class) },\n };\n\n return `${this.contents}`;\n }\n\n /**\n * Return string representation of an `Icon`.\n *\n * Added for backward compatibility. If old code expects `feather.icons.`\n * to be a string, `toString()` will get implicitly called.\n *\n * @returns {string}\n */\n toString() {\n return this.contents;\n }\n}\n\n/**\n * Convert attributes object to string of HTML attributes.\n * @param {Object} attrs\n * @returns {string}\n */\nfunction attrsToString(attrs) {\n return Object.keys(attrs)\n .map(key => `${key}=\"${attrs[key]}\"`)\n .join(' ');\n}\n\nexport default Icon;\n","import Icon from './icon';\nimport icons from '../dist/icons.json';\nimport tags from './tags.json';\n\nexport default Object.keys(icons)\n .map(key => new Icon(key, icons[key], tags[key]))\n .reduce((object, icon) => {\n object[icon.name] = icon;\n return object;\n }, {});\n","import icons from './icons';\nimport toSvg from './to-svg';\nimport replace from './replace';\n\nmodule.exports = { icons, toSvg, replace };\n","/* eslint-env browser */\nimport classnames from 'classnames/dedupe';\n\nimport icons from './icons';\n\n/**\n * Replace all HTML elements that have a `data-feather` attribute with SVG markup\n * corresponding to the element's `data-feather` attribute value.\n * @param {Object} attrs\n */\nfunction replace(attrs = {}) {\n if (typeof document === 'undefined') {\n throw new Error('`feather.replace()` only works in a browser environment.');\n }\n\n const elementsToReplace = document.querySelectorAll('[data-feather]');\n\n Array.from(elementsToReplace).forEach(element =>\n replaceElement(element, attrs),\n );\n}\n\n/**\n * Replace a single HTML element with SVG markup\n * corresponding to the element's `data-feather` attribute value.\n * @param {HTMLElement} element\n * @param {Object} attrs\n */\nfunction replaceElement(element, attrs = {}) {\n const elementAttrs = getAttrs(element);\n const name = elementAttrs['data-feather'];\n delete elementAttrs['data-feather'];\n\n if (icons[name] === undefined) {\n console.warn(`feather: '${name}' is not a valid icon`);\n return;\n }\n\n const svgString = icons[name].toSvg({\n ...attrs,\n ...elementAttrs,\n ...{ class: classnames(attrs.class, elementAttrs.class) },\n });\n const svgDocument = new DOMParser().parseFromString(\n svgString,\n 'image/svg+xml',\n );\n const svgElement = svgDocument.querySelector('svg');\n\n element.parentNode.replaceChild(svgElement, element);\n}\n\n/**\n * Get the attributes of an HTML element.\n * @param {HTMLElement} element\n * @returns {Object}\n */\nfunction getAttrs(element) {\n return Array.from(element.attributes).reduce((attrs, attr) => {\n attrs[attr.name] = attr.value;\n return attrs;\n }, {});\n}\n\nexport default replace;\n","import icons from './icons';\n\n/**\n * Create an SVG string.\n * @deprecated\n * @param {string} name\n * @param {Object} attrs\n * @returns {string}\n */\nfunction toSvg(name, attrs = {}) {\n console.warn(\n 'feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead.',\n );\n\n if (!name) {\n throw new Error('The required `key` (icon name) parameter is missing.');\n }\n\n if (!icons[name]) {\n throw new Error(\n `No icon matching '${name}'. See the complete list of icons at https://feathericons.com`,\n );\n }\n\n return icons[name].toSvg(attrs);\n}\n\nexport default toSvg;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/web/static/node_modules/feather-icons/dist/feather.min.js b/web/static/node_modules/feather-icons/dist/feather.min.js deleted file mode 100644 index 1781ad84..00000000 --- a/web/static/node_modules/feather-icons/dist/feather.min.js +++ /dev/null @@ -1,13 +0,0 @@ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.feather=n():e.feather=n()}("undefined"!=typeof self?self:this,function(){return function(e){var n={};function i(t){if(n[t])return n[t].exports;var l=n[t]={i:t,l:!1,exports:{}};return e[t].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=e,i.c=n,i.d=function(e,n,t){i.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(n,"a",n),n},i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},i.p="",i(i.s=80)}([function(e,n,i){(function(n){var i="object",t=function(e){return e&&e.Math==Math&&e};e.exports=t(typeof globalThis==i&&globalThis)||t(typeof window==i&&window)||t(typeof self==i&&self)||t(typeof n==i&&n)||Function("return this")()}).call(this,i(75))},function(e,n){var i={}.hasOwnProperty;e.exports=function(e,n){return i.call(e,n)}},function(e,n,i){var t=i(0),l=i(11),r=i(33),o=i(62),a=t.Symbol,c=l("wks");e.exports=function(e){return c[e]||(c[e]=o&&a[e]||(o?a:r)("Symbol."+e))}},function(e,n,i){var t=i(6);e.exports=function(e){if(!t(e))throw TypeError(String(e)+" is not an object");return e}},function(e,n){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,n,i){var t=i(8),l=i(7),r=i(10);e.exports=t?function(e,n,i){return l.f(e,n,r(1,i))}:function(e,n,i){return e[n]=i,e}},function(e,n){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,n,i){var t=i(8),l=i(35),r=i(3),o=i(18),a=Object.defineProperty;n.f=t?a:function(e,n,i){if(r(e),n=o(n,!0),r(i),l)try{return a(e,n,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[n]=i.value),e}},function(e,n,i){var t=i(4);e.exports=!t(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,n){e.exports={}},function(e,n){e.exports=function(e,n){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:n}}},function(e,n,i){var t=i(0),l=i(19),r=i(17),o=t["__core-js_shared__"]||l("__core-js_shared__",{});(e.exports=function(e,n){return o[e]||(o[e]=void 0!==n?n:{})})("versions",[]).push({version:"3.1.3",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=o(i(43)),l=o(i(41)),r=o(i(40));function o(e){return e&&e.__esModule?e:{default:e}}n.default=Object.keys(l.default).map(function(e){return new t.default(e,l.default[e],r.default[e])}).reduce(function(e,n){return e[n.name]=n,e},{})},function(e,n){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,n,i){var t=i(72),l=i(20);e.exports=function(e){return t(l(e))}},function(e,n){e.exports={}},function(e,n,i){var t=i(11),l=i(33),r=t("keys");e.exports=function(e){return r[e]||(r[e]=l(e))}},function(e,n){e.exports=!1},function(e,n,i){var t=i(6);e.exports=function(e,n){if(!t(e))return e;var i,l;if(n&&"function"==typeof(i=e.toString)&&!t(l=i.call(e)))return l;if("function"==typeof(i=e.valueOf)&&!t(l=i.call(e)))return l;if(!n&&"function"==typeof(i=e.toString)&&!t(l=i.call(e)))return l;throw TypeError("Can't convert object to primitive value")}},function(e,n,i){var t=i(0),l=i(5);e.exports=function(e,n){try{l(t,e,n)}catch(i){t[e]=n}return n}},function(e,n){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,n){var i=Math.ceil,t=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?t:i)(e)}},function(e,n,i){var t; -/*! - Copyright (c) 2016 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/*! - Copyright (c) 2016 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -!function(){"use strict";var i=function(){function e(){}function n(e,n){for(var i=n.length,t=0;t0?l(t(e),9007199254740991):0}},function(e,n,i){var t=i(1),l=i(14),r=i(68),o=i(15),a=r(!1);e.exports=function(e,n){var i,r=l(e),c=0,p=[];for(i in r)!t(o,i)&&t(r,i)&&p.push(i);for(;n.length>c;)t(r,i=n[c++])&&(~a(p,i)||p.push(i));return p}},function(e,n,i){var t=i(0),l=i(11),r=i(5),o=i(1),a=i(19),c=i(36),p=i(37),y=p.get,h=p.enforce,x=String(c).split("toString");l("inspectSource",function(e){return c.call(e)}),(e.exports=function(e,n,i,l){var c=!!l&&!!l.unsafe,p=!!l&&!!l.enumerable,y=!!l&&!!l.noTargetGet;"function"==typeof i&&("string"!=typeof n||o(i,"name")||r(i,"name",n),h(i).source=x.join("string"==typeof n?n:"")),e!==t?(c?!y&&e[n]&&(p=!0):delete e[n],p?e[n]=i:r(e,n,i)):p?e[n]=i:a(n,i)})(Function.prototype,"toString",function(){return"function"==typeof this&&y(this).source||c.call(this)})},function(e,n){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},function(e,n,i){var t=i(8),l=i(73),r=i(10),o=i(14),a=i(18),c=i(1),p=i(35),y=Object.getOwnPropertyDescriptor;n.f=t?y:function(e,n){if(e=o(e),n=a(n,!0),p)try{return y(e,n)}catch(e){}if(c(e,n))return r(!l.f.call(e,n),e[n])}},function(e,n,i){var t=i(0),l=i(31).f,r=i(5),o=i(29),a=i(19),c=i(71),p=i(65);e.exports=function(e,n){var i,y,h,x,s,u=e.target,d=e.global,f=e.stat;if(i=d?t:f?t[u]||a(u,{}):(t[u]||{}).prototype)for(y in n){if(x=n[y],h=e.noTargetGet?(s=l(i,y))&&s.value:i[y],!p(d?y:u+(f?".":"#")+y,e.forced)&&void 0!==h){if(typeof x==typeof h)continue;c(x,h)}(e.sham||h&&h.sham)&&r(x,"sham",!0),o(i,y,x,e)}}},function(e,n){var i=0,t=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++i+t).toString(36))}},function(e,n,i){var t=i(0),l=i(6),r=t.document,o=l(r)&&l(r.createElement);e.exports=function(e){return o?r.createElement(e):{}}},function(e,n,i){var t=i(8),l=i(4),r=i(34);e.exports=!t&&!l(function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})},function(e,n,i){var t=i(11);e.exports=t("native-function-to-string",Function.toString)},function(e,n,i){var t,l,r,o=i(76),a=i(0),c=i(6),p=i(5),y=i(1),h=i(16),x=i(15),s=a.WeakMap;if(o){var u=new s,d=u.get,f=u.has,g=u.set;t=function(e,n){return g.call(u,e,n),n},l=function(e){return d.call(u,e)||{}},r=function(e){return f.call(u,e)}}else{var v=h("state");x[v]=!0,t=function(e,n){return p(e,v,n),n},l=function(e){return y(e,v)?e[v]:{}},r=function(e){return y(e,v)}}e.exports={set:t,get:l,has:r,enforce:function(e){return r(e)?l(e):t(e,{})},getterFor:function(e){return function(n){var i;if(!c(n)||(i=l(n)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return i}}}},function(e,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(e){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"==typeof document)throw new Error("`feather.replace()` only works in a browser environment.");var n=document.querySelectorAll("[data-feather]");Array.from(n).forEach(function(n){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=function(e){return Array.from(e.attributes).reduce(function(e,n){return e[n.name]=n.value,e},{})}(e),o=i["data-feather"];if(delete i["data-feather"],void 0!==r.default[o]){var a=r.default[o].toSvg(t({},n,i,{class:(0,l.default)(n.class,i.class)})),c=(new DOMParser).parseFromString(a,"image/svg+xml").querySelector("svg");e.parentNode.replaceChild(c,e)}else console.warn("feather: '"+o+"' is not a valid icon")}(n,e)})}},function(e,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t,l=i(12),r=(t=l)&&t.__esModule?t:{default:t};n.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!e)throw new Error("The required `key` (icon name) parameter is missing.");if(!r.default[e])throw new Error("No icon matching '"+e+"'. See the complete list of icons at https://feathericons.com");return r.default[e].toSvg(n)}},function(e){e.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],anchor:[],archive:["index","box"],"at-sign":["mention","at","email","message"],award:["achievement","badge"],aperture:["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],battery:["power","electricity"],"battery-charging":["power","electricity"],bell:["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read","library"],book:["read","dictionary","booklet","magazine","library"],bookmark:["read","clip","marker","tag"],box:["cube"],briefcase:["work","bag","baggage","folder"],calendar:["date"],camera:["photo"],cast:["chromecast","airplay"],"chevron-down":["expand"],"chevron-up":["collapse"],circle:["off","zero","record"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],code:["source","programming"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],columns:["layout"],command:["keyboard","cmd","terminal","prompt"],compass:["navigation","safari","travel","direction"],copy:["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],cpu:["processor","technology"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage","memory"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],facebook:["logo","social"],"fast-forward":["music"],figma:["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],film:["movie","video"],filter:["funnel","hopper"],flag:["report"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],globe:["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],hash:["hashtag","number","pound"],headphones:["music","audio","sound"],heart:["like","love","emotion"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house","living"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication","secure"],layers:["stack"],layout:["window","webpage"],"life-buoy":["help","life ring","support"],link:["chain","url"],"link-2":["chain","url"],linkedin:["logo","social media"],list:["options"],lock:["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],mail:["email","message"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],mic:["record","sound","listen"],minimize:["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],minus:["subtract"],monitor:["tv","screen","display"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],music:["note"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box","container"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],percent:["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],phone:["call"],play:["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],printer:["fax","office","device"],radio:["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],repeat:["loop","arrows"],rewind:["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],rss:["feed","subscribe"],save:["floppy disk"],scissors:["cut"],search:["find","magnifier","magnifying glass"],send:["message","mail","email","paper airplane","paper aeroplane"],settings:["cog","edit","gear","preferences"],"share-2":["network","connections"],shield:["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slack:["logo"],slash:["ban","no"],sliders:["settings","controls"],smartphone:["cellphone","device"],smile:["emoji","face","happy","good","emotion"],speaker:["audio","music"],star:["bookmark","favorite","like"],"stop-circle":["media","music"],sun:["brightness","weather","light"],sunrise:["weather","time","morning","day"],sunset:["weather","time","evening","night"],tablet:["device"],tag:["label"],target:["logo","bullseye"],terminal:["code","command line","prompt"],thermometer:["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],tool:["settings","spanner"],trash:["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],triangle:["delta"],truck:["delivery","van","shipping","transport","lorry"],tv:["television","stream"],twitch:["logo"],twitter:["logo","social"],type:["text"],umbrella:["rain","weather"],unlock:["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],user:["person","account"],users:["group"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],"wifi-off":["disabled"],wifi:["connection","signal","wireless"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],x:["cancel","close","delete","remove","times","clear"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}},function(e){e.exports={activity:'',airplay:'',"alert-circle":'',"alert-octagon":'',"alert-triangle":'',"align-center":'',"align-justify":'',"align-left":'',"align-right":'',anchor:'',aperture:'',archive:'',"arrow-down-circle":'',"arrow-down-left":'',"arrow-down-right":'',"arrow-down":'',"arrow-left-circle":'',"arrow-left":'',"arrow-right-circle":'',"arrow-right":'',"arrow-up-circle":'',"arrow-up-left":'',"arrow-up-right":'',"arrow-up":'',"at-sign":'',award:'',"bar-chart-2":'',"bar-chart":'',"battery-charging":'',battery:'',"bell-off":'',bell:'',bluetooth:'',bold:'',"book-open":'',book:'',bookmark:'',box:'',briefcase:'',calendar:'',"camera-off":'',camera:'',cast:'',"check-circle":'',"check-square":'',check:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"chevrons-down":'',"chevrons-left":'',"chevrons-right":'',"chevrons-up":'',chrome:'',circle:'',clipboard:'',clock:'',"cloud-drizzle":'',"cloud-lightning":'',"cloud-off":'',"cloud-rain":'',"cloud-snow":'',cloud:'',code:'',codepen:'',codesandbox:'',coffee:'',columns:'',command:'',compass:'',copy:'',"corner-down-left":'',"corner-down-right":'',"corner-left-down":'',"corner-left-up":'',"corner-right-down":'',"corner-right-up":'',"corner-up-left":'',"corner-up-right":'',cpu:'',"credit-card":'',crop:'',crosshair:'',database:'',delete:'',disc:'',"divide-circle":'',"divide-square":'',divide:'',"dollar-sign":'',"download-cloud":'',download:'',dribbble:'',droplet:'',"edit-2":'',"edit-3":'',edit:'',"external-link":'',"eye-off":'',eye:'',facebook:'',"fast-forward":'',feather:'',figma:'',"file-minus":'',"file-plus":'',"file-text":'',file:'',film:'',filter:'',flag:'',"folder-minus":'',"folder-plus":'',folder:'',framer:'',frown:'',gift:'',"git-branch":'',"git-commit":'',"git-merge":'',"git-pull-request":'',github:'',gitlab:'',globe:'',grid:'',"hard-drive":'',hash:'',headphones:'',heart:'',"help-circle":'',hexagon:'',home:'',image:'',inbox:'',info:'',instagram:'',italic:'',key:'',layers:'',layout:'',"life-buoy":'',"link-2":'',link:'',linkedin:'',list:'',loader:'',lock:'',"log-in":'',"log-out":'',mail:'',"map-pin":'',map:'',"maximize-2":'',maximize:'',meh:'',menu:'',"message-circle":'',"message-square":'',"mic-off":'',mic:'',"minimize-2":'',minimize:'',"minus-circle":'',"minus-square":'',minus:'',monitor:'',moon:'',"more-horizontal":'',"more-vertical":'',"mouse-pointer":'',move:'',music:'',"navigation-2":'',navigation:'',octagon:'',package:'',paperclip:'',"pause-circle":'',pause:'',"pen-tool":'',percent:'',"phone-call":'',"phone-forwarded":'',"phone-incoming":'',"phone-missed":'',"phone-off":'',"phone-outgoing":'',phone:'',"pie-chart":'',"play-circle":'',play:'',"plus-circle":'',"plus-square":'',plus:'',pocket:'',power:'',printer:'',radio:'',"refresh-ccw":'',"refresh-cw":'',repeat:'',rewind:'',"rotate-ccw":'',"rotate-cw":'',rss:'',save:'',scissors:'',search:'',send:'',server:'',settings:'',"share-2":'',share:'',"shield-off":'',shield:'',"shopping-bag":'',"shopping-cart":'',shuffle:'',sidebar:'',"skip-back":'',"skip-forward":'',slack:'',slash:'',sliders:'',smartphone:'',smile:'',speaker:'',square:'',star:'',"stop-circle":'',sun:'',sunrise:'',sunset:'',table:'',tablet:'',tag:'',target:'',terminal:'',thermometer:'',"thumbs-down":'',"thumbs-up":'',"toggle-left":'',"toggle-right":'',tool:'',"trash-2":'',trash:'',trello:'',"trending-down":'',"trending-up":'',triangle:'',truck:'',tv:'',twitch:'',twitter:'',type:'',umbrella:'',underline:'',unlock:'',"upload-cloud":'',upload:'',"user-check":'',"user-minus":'',"user-plus":'',"user-x":'',user:'',users:'',"video-off":'',video:'',voicemail:'',"volume-1":'',"volume-2":'',"volume-x":'',volume:'',watch:'',"wifi-off":'',wifi:'',wind:'',"x-circle":'',"x-octagon":'',"x-square":'',x:'',youtube:'',"zap-off":'',zap:'',"zoom-in":'',"zoom-out":''}},function(e){e.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}},function(e,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(e){for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:[];!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=n,this.contents=i,this.tags=l,this.attrs=t({},o.default,{class:"feather feather-"+n})}return l(e,[{key:"toSvg",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return""+this.contents+""}},{key:"toString",value:function(){return this.contents}}]),e}();n.default=c},function(e,n,i){"use strict";var t=o(i(12)),l=o(i(39)),r=o(i(38));function o(e){return e&&e.__esModule?e:{default:e}}e.exports={icons:t.default,toSvg:l.default,replace:r.default}},function(e,n,i){e.exports=i(0)},function(e,n,i){var t=i(2)("iterator"),l=!1;try{var r=0,o={next:function(){return{done:!!r++}},return:function(){l=!0}};o[t]=function(){return this},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,n){if(!n&&!l)return!1;var i=!1;try{var r={};r[t]=function(){return{next:function(){return{done:i=!0}}}},e(r)}catch(e){}return i}},function(e,n,i){var t=i(30),l=i(2)("toStringTag"),r="Arguments"==t(function(){return arguments}());e.exports=function(e){var n,i,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,n){try{return e[n]}catch(e){}}(n=Object(e),l))?i:r?t(n):"Object"==(o=t(n))&&"function"==typeof n.callee?"Arguments":o}},function(e,n,i){var t=i(47),l=i(9),r=i(2)("iterator");e.exports=function(e){if(void 0!=e)return e[r]||e["@@iterator"]||l[t(e)]}},function(e,n,i){"use strict";var t=i(18),l=i(7),r=i(10);e.exports=function(e,n,i){var o=t(n);o in e?l.f(e,o,r(0,i)):e[o]=i}},function(e,n,i){var t=i(2),l=i(9),r=t("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(l.Array===e||o[r]===e)}},function(e,n,i){var t=i(3);e.exports=function(e,n,i,l){try{return l?n(t(i)[0],i[1]):n(i)}catch(n){var r=e.return;throw void 0!==r&&t(r.call(e)),n}}},function(e,n){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,n,i){var t=i(52);e.exports=function(e,n,i){if(t(e),void 0===n)return e;switch(i){case 0:return function(){return e.call(n)};case 1:return function(i){return e.call(n,i)};case 2:return function(i,t){return e.call(n,i,t)};case 3:return function(i,t,l){return e.call(n,i,t,l)}}return function(){return e.apply(n,arguments)}}},function(e,n,i){"use strict";var t=i(53),l=i(24),r=i(51),o=i(50),a=i(27),c=i(49),p=i(48);e.exports=function(e){var n,i,y,h,x=l(e),s="function"==typeof this?this:Array,u=arguments.length,d=u>1?arguments[1]:void 0,f=void 0!==d,g=0,v=p(x);if(f&&(d=t(d,u>2?arguments[2]:void 0,2)),void 0==v||s==Array&&o(v))for(i=new s(n=a(x.length));n>g;g++)c(i,g,f?d(x[g],g):x[g]);else for(h=v.call(x),i=new s;!(y=h.next()).done;g++)c(i,g,f?r(h,d,[y.value,g],!0):y.value);return i.length=g,i}},function(e,n,i){var t=i(32),l=i(54);t({target:"Array",stat:!0,forced:!i(46)(function(e){Array.from(e)})},{from:l})},function(e,n,i){var t=i(6),l=i(3);e.exports=function(e,n){if(l(e),!t(n)&&null!==n)throw TypeError("Can't set "+String(n)+" as a prototype")}},function(e,n,i){var t=i(56);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,n=!1,i={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),n=i instanceof Array}catch(e){}return function(i,l){return t(i,l),n?e.call(i,l):i.__proto__=l,i}}():void 0)},function(e,n,i){var t=i(0).document;e.exports=t&&t.documentElement},function(e,n,i){var t=i(28),l=i(13);e.exports=Object.keys||function(e){return t(e,l)}},function(e,n,i){var t=i(8),l=i(7),r=i(3),o=i(59);e.exports=t?Object.defineProperties:function(e,n){r(e);for(var i,t=o(n),a=t.length,c=0;a>c;)l.f(e,i=t[c++],n[i]);return e}},function(e,n,i){var t=i(3),l=i(60),r=i(13),o=i(15),a=i(58),c=i(34),p=i(16)("IE_PROTO"),y=function(){},h=function(){var e,n=c("iframe"),i=r.length;for(n.style.display="none",a.appendChild(n),n.src=String("javascript:"),(e=n.contentWindow.document).open(),e.write("Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - - - -
    -Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
    - -
    -Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
    - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 116 | [jonschlinkert](https://github.com/jonschlinkert) | -| 4 | [paulmillr](https://github.com/paulmillr) | -| 2 | [realityking](https://github.com/realityking) | -| 2 | [bluelovers](https://github.com/bluelovers) | -| 1 | [edorivai](https://github.com/edorivai) | -| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)! - - - - - -### License - -Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ \ No newline at end of file diff --git a/web/static/node_modules/fill-range/index.js b/web/static/node_modules/fill-range/index.js deleted file mode 100644 index ddb212ee..00000000 --- a/web/static/node_modules/fill-range/index.js +++ /dev/null @@ -1,248 +0,0 @@ -/*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -const util = require('util'); -const toRegexRange = require('to-regex-range'); - -const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); - -const transform = toNumber => { - return value => toNumber === true ? Number(value) : String(value); -}; - -const isValidValue = value => { - return typeof value === 'number' || (typeof value === 'string' && value !== ''); -}; - -const isNumber = num => Number.isInteger(+num); - -const zeros = input => { - let value = `${input}`; - let index = -1; - if (value[0] === '-') value = value.slice(1); - if (value === '0') return false; - while (value[++index] === '0'); - return index > 0; -}; - -const stringify = (start, end, options) => { - if (typeof start === 'string' || typeof end === 'string') { - return true; - } - return options.stringify === true; -}; - -const pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === '-' ? '-' : ''; - if (dash) input = input.slice(1); - input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); - } - if (toNumber === false) { - return String(input); - } - return input; -}; - -const toMaxLen = (input, maxLength) => { - let negative = input[0] === '-' ? '-' : ''; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = '0' + input; - return negative ? ('-' + input) : input; -}; - -const toSequence = (parts, options, maxLen) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - - let prefix = options.capture ? '' : '?:'; - let positives = ''; - let negatives = ''; - let result; - - if (parts.positives.length) { - positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|'); - } - - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`; - } - - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - - if (options.wrap) { - return `(${prefix}${result})`; - } - - return result; -}; - -const toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - - let start = String.fromCharCode(a); - if (a === b) return start; - - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; -}; - -const toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? '' : '?:'; - return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); - } - return toRegexRange(start, end, options); -}; - -const rangeError = (...args) => { - return new RangeError('Invalid range arguments: ' + util.inspect(...args)); -}; - -const invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; -}; - -const invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; -}; - -const fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - - // fix negative zero - if (a === 0) a = 0; - if (b === 0) b = 0; - - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - - let parts = { negatives: [], positives: [] }; - let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return step > 1 - ? toSequence(parts, options, maxLen) - : toRegex(range, null, { wrap: false, ...options }); - } - - return range; -}; - -const fillLetters = (start, end, step = 1, options = {}) => { - if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { - return invalidRange(start, end, options); - } - - let format = options.transform || (val => String.fromCharCode(val)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - - return range; -}; - -const fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - - if (typeof step === 'function') { - return fill(start, end, 1, { transform: step }); - } - - if (isObject(step)) { - return fill(start, end, 0, step); - } - - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - - if (!isNumber(step)) { - if (step != null && !isObject(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); -}; - -module.exports = fill; diff --git a/web/static/node_modules/fill-range/package.json b/web/static/node_modules/fill-range/package.json deleted file mode 100644 index 582357fb..00000000 --- a/web/static/node_modules/fill-range/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "fill-range", - "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", - "version": "7.1.1", - "homepage": "https://github.com/jonschlinkert/fill-range", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Edo Rivai (edo.rivai.nl)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Paul Miller (paulmillr.com)", - "Rouven Weßling (www.rouvenwessling.de)", - "(https://github.com/wtgtybhertgeghgtwtg)" - ], - "repository": "jonschlinkert/fill-range", - "bugs": { - "url": "https://github.com/jonschlinkert/fill-range/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=8" - }, - "scripts": { - "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", - "mocha": "mocha --reporter dot", - "test": "npm run lint && npm run mocha", - "test:ci": "npm run test:cover", - "test:cover": "nyc npm run mocha" - }, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "devDependencies": { - "gulp-format-md": "^2.0.0", - "mocha": "^6.1.1", - "nyc": "^15.1.0" - }, - "keywords": [ - "alpha", - "alphabetical", - "array", - "bash", - "brace", - "expand", - "expansion", - "fill", - "glob", - "match", - "matches", - "matching", - "number", - "numerical", - "range", - "ranges", - "regex", - "sh" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - } -} diff --git a/web/static/node_modules/glob-to-regexp/.travis.yml b/web/static/node_modules/glob-to-regexp/.travis.yml deleted file mode 100644 index ddc9c4f9..00000000 --- a/web/static/node_modules/glob-to-regexp/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.8 - - "0.10" \ No newline at end of file diff --git a/web/static/node_modules/glob-to-regexp/README.md b/web/static/node_modules/glob-to-regexp/README.md deleted file mode 100644 index afb41142..00000000 --- a/web/static/node_modules/glob-to-regexp/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# Glob To Regular Expression - -[![Build Status](https://travis-ci.org/fitzgen/glob-to-regexp.png?branch=master)](https://travis-ci.org/fitzgen/glob-to-regexp) - -Turn a \*-wildcard style glob (`"*.min.js"`) into a regular expression -(`/^.*\.min\.js$/`)! - -To match bash-like globs, eg. `?` for any single-character match, `[a-z]` for -character ranges, and `{*.html, *.js}` for multiple alternatives, call with -`{ extended: true }`. - -To obey [globstars `**`](https://github.com/isaacs/node-glob#glob-primer) rules set option `{globstar: true}`. -NOTE: This changes the behavior of `*` when `globstar` is `true` as shown below: -When `{globstar: true}`: `/foo/**` will match any string that starts with `/foo/` -like `/foo/index.htm`, `/foo/bar/baz.txt`, etc. Also, `/foo/**/*.txt` will match -any string that starts with `/foo/` and ends with `.txt` like `/foo/bar.txt`, -`/foo/bar/baz.txt`, etc. -Whereas `/foo/*` (single `*`, not a globstar) will match strings that start with -`/foo/` like `/foo/index.htm`, `/foo/baz.txt` but will not match strings that -contain a `/` to the right like `/foo/bar/baz.txt`, `/foo/bar/baz/qux.dat`, etc. - -Set flags on the resulting `RegExp` object by adding the `flags` property to the option object, eg `{ flags: "i" }` for ignoring case. - -## Install - - npm install glob-to-regexp - -## Usage -```js -var globToRegExp = require('glob-to-regexp'); -var re = globToRegExp("p*uck"); -re.test("pot luck"); // true -re.test("pluck"); // true -re.test("puck"); // true - -re = globToRegExp("*.min.js"); -re.test("http://example.com/jquery.min.js"); // true -re.test("http://example.com/jquery.min.js.map"); // false - -re = globToRegExp("*/www/*.js"); -re.test("http://example.com/www/app.js"); // true -re.test("http://example.com/www/lib/factory-proxy-model-observer.js"); // true - -// Extended globs -re = globToRegExp("*/www/{*.js,*.html}", { extended: true }); -re.test("http://example.com/www/app.js"); // true -re.test("http://example.com/www/index.html"); // true -``` - -## License - -Copyright (c) 2013, Nick Fitzgerald - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/web/static/node_modules/glob-to-regexp/index.js b/web/static/node_modules/glob-to-regexp/index.js deleted file mode 100644 index 365cf227..00000000 --- a/web/static/node_modules/glob-to-regexp/index.js +++ /dev/null @@ -1,130 +0,0 @@ -module.exports = function (glob, opts) { - if (typeof glob !== 'string') { - throw new TypeError('Expected a string'); - } - - var str = String(glob); - - // The regexp we are building, as a string. - var reStr = ""; - - // Whether we are matching so called "extended" globs (like bash) and should - // support single character matching, matching ranges of characters, group - // matching, etc. - var extended = opts ? !!opts.extended : false; - - // When globstar is _false_ (default), '/foo/*' is translated a regexp like - // '^\/foo\/.*$' which will match any string beginning with '/foo/' - // When globstar is _true_, '/foo/*' is translated to regexp like - // '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT - // which does not have a '/' to the right of it. - // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but - // these will not '/foo/bar/baz', '/foo/bar/baz.txt' - // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when - // globstar is _false_ - var globstar = opts ? !!opts.globstar : false; - - // If we are doing extended matching, this boolean is true when we are inside - // a group (eg {*.html,*.js}), and false otherwise. - var inGroup = false; - - // RegExp flags (eg "i" ) to pass in to RegExp constructor. - var flags = opts && typeof( opts.flags ) === "string" ? opts.flags : ""; - - var c; - for (var i = 0, len = str.length; i < len; i++) { - c = str[i]; - - switch (c) { - case "/": - case "$": - case "^": - case "+": - case ".": - case "(": - case ")": - case "=": - case "!": - case "|": - reStr += "\\" + c; - break; - - case "?": - if (extended) { - reStr += "."; - break; - } - - case "[": - case "]": - if (extended) { - reStr += c; - break; - } - - case "{": - if (extended) { - inGroup = true; - reStr += "("; - break; - } - - case "}": - if (extended) { - inGroup = false; - reStr += ")"; - break; - } - - case ",": - if (inGroup) { - reStr += "|"; - break; - } - reStr += "\\" + c; - break; - - case "*": - // Move over all consecutive "*"'s. - // Also store the previous and next characters - var prevChar = str[i - 1]; - var starCount = 1; - while(str[i + 1] === "*") { - starCount++; - i++; - } - var nextChar = str[i + 1]; - - if (!globstar) { - // globstar is disabled, so treat any number of "*" as one - reStr += ".*"; - } else { - // globstar is enabled, so determine if this is a globstar segment - var isGlobstar = starCount > 1 // multiple "*"'s - && (prevChar === "/" || prevChar === undefined) // from the start of the segment - && (nextChar === "/" || nextChar === undefined) // to the end of the segment - - if (isGlobstar) { - // it's a globstar, so match zero or more path segments - reStr += "((?:[^/]*(?:\/|$))*)"; - i++; // move over the "/" - } else { - // it's not a globstar, so only match one path segment - reStr += "([^/]*)"; - } - } - break; - - default: - reStr += c; - } - } - - // When regexp 'g' flag is specified don't - // constrain the regular expression with ^ & $ - if (!flags || !~flags.indexOf('g')) { - reStr = "^" + reStr + "$"; - } - - return new RegExp(reStr, flags); -}; diff --git a/web/static/node_modules/glob-to-regexp/package.json b/web/static/node_modules/glob-to-regexp/package.json deleted file mode 100644 index 467daf31..00000000 --- a/web/static/node_modules/glob-to-regexp/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "glob-to-regexp", - "version": "0.4.1", - "description": "Convert globs to regular expressions", - "main": "index.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/fitzgen/glob-to-regexp.git" - }, - "keywords": [ - "regexp", - "glob", - "regexps", - "regular expressions", - "regular expression", - "wildcard" - ], - "author": "Nick Fitzgerald ", - "license": "BSD-2-Clause" -} diff --git a/web/static/node_modules/glob-to-regexp/test.js b/web/static/node_modules/glob-to-regexp/test.js deleted file mode 100644 index 58ee622c..00000000 --- a/web/static/node_modules/glob-to-regexp/test.js +++ /dev/null @@ -1,235 +0,0 @@ -var globToRegexp = require("./index.js"); -var assert = require("assert"); - -function assertMatch(glob, str, opts) { - //console.log(glob, globToRegexp(glob, opts)); - assert.ok(globToRegexp(glob, opts).test(str)); -} - -function assertNotMatch(glob, str, opts) { - //console.log(glob, globToRegexp(glob, opts)); - assert.equal(false, globToRegexp(glob, opts).test(str)); -} - -function test(globstar) { - // Match everything - assertMatch("*", "foo"); - assertMatch("*", "foo", { flags: 'g' }); - - // Match the end - assertMatch("f*", "foo"); - assertMatch("f*", "foo", { flags: 'g' }); - - // Match the start - assertMatch("*o", "foo"); - assertMatch("*o", "foo", { flags: 'g' }); - - // Match the middle - assertMatch("f*uck", "firetruck"); - assertMatch("f*uck", "firetruck", { flags: 'g' }); - - // Don't match without Regexp 'g' - assertNotMatch("uc", "firetruck"); - // Match anywhere with RegExp 'g' - assertMatch("uc", "firetruck", { flags: 'g' }); - - // Match zero characters - assertMatch("f*uck", "fuck"); - assertMatch("f*uck", "fuck", { flags: 'g' }); - - // More complex matches - assertMatch("*.min.js", "http://example.com/jquery.min.js", {globstar: false}); - assertMatch("*.min.*", "http://example.com/jquery.min.js", {globstar: false}); - assertMatch("*/js/*.js", "http://example.com/js/jquery.min.js", {globstar: false}); - - // More complex matches with RegExp 'g' flag (complex regression) - assertMatch("*.min.*", "http://example.com/jquery.min.js", { flags: 'g' }); - assertMatch("*.min.js", "http://example.com/jquery.min.js", { flags: 'g' }); - assertMatch("*/js/*.js", "http://example.com/js/jquery.min.js", { flags: 'g' }); - - // Test string "\\\\/$^+?.()=!|{},[].*" represents \\/$^+?.()=!|{},[].* - // The equivalent regex is: /^\\\/\$\^\+\?\.\(\)\=\!\|\{\}\,\[\]\..*$/ - // Both glob and regex match: \/$^+?.()=!|{},[].* - var testStr = "\\\\/$^+?.()=!|{},[].*"; - var targetStr = "\\/$^+?.()=!|{},[].*"; - assertMatch(testStr, targetStr); - assertMatch(testStr, targetStr, { flags: 'g' }); - - // Equivalent matches without/with using RegExp 'g' - assertNotMatch(".min.", "http://example.com/jquery.min.js"); - assertMatch("*.min.*", "http://example.com/jquery.min.js"); - assertMatch(".min.", "http://example.com/jquery.min.js", { flags: 'g' }); - - assertNotMatch("http:", "http://example.com/jquery.min.js"); - assertMatch("http:*", "http://example.com/jquery.min.js"); - assertMatch("http:", "http://example.com/jquery.min.js", { flags: 'g' }); - - assertNotMatch("min.js", "http://example.com/jquery.min.js"); - assertMatch("*.min.js", "http://example.com/jquery.min.js"); - assertMatch("min.js", "http://example.com/jquery.min.js", { flags: 'g' }); - - // Match anywhere (globally) using RegExp 'g' - assertMatch("min", "http://example.com/jquery.min.js", { flags: 'g' }); - assertMatch("/js/", "http://example.com/js/jquery.min.js", { flags: 'g' }); - - assertNotMatch("/js*jq*.js", "http://example.com/js/jquery.min.js"); - assertMatch("/js*jq*.js", "http://example.com/js/jquery.min.js", { flags: 'g' }); - - // Extended mode - - // ?: Match one character, no more and no less - assertMatch("f?o", "foo", { extended: true }); - assertNotMatch("f?o", "fooo", { extended: true }); - assertNotMatch("f?oo", "foo", { extended: true }); - - // ?: Match one character with RegExp 'g' - assertMatch("f?o", "foo", { extended: true, globstar: globstar, flags: 'g' }); - assertMatch("f?o", "fooo", { extended: true, globstar: globstar, flags: 'g' }); - assertMatch("f?o?", "fooo", { extended: true, globstar: globstar, flags: 'g' }); - assertNotMatch("?fo", "fooo", { extended: true, globstar: globstar, flags: 'g' }); - assertNotMatch("f?oo", "foo", { extended: true, globstar: globstar, flags: 'g' }); - assertNotMatch("foo?", "foo", { extended: true, globstar: globstar, flags: 'g' }); - - // []: Match a character range - assertMatch("fo[oz]", "foo", { extended: true }); - assertMatch("fo[oz]", "foz", { extended: true }); - assertNotMatch("fo[oz]", "fog", { extended: true }); - - // []: Match a character range and RegExp 'g' (regresion) - assertMatch("fo[oz]", "foo", { extended: true, globstar: globstar, flags: 'g' }); - assertMatch("fo[oz]", "foz", { extended: true, globstar: globstar, flags: 'g' }); - assertNotMatch("fo[oz]", "fog", { extended: true, globstar: globstar, flags: 'g' }); - - // {}: Match a choice of different substrings - assertMatch("foo{bar,baaz}", "foobaaz", { extended: true }); - assertMatch("foo{bar,baaz}", "foobar", { extended: true }); - assertNotMatch("foo{bar,baaz}", "foobuzz", { extended: true }); - assertMatch("foo{bar,b*z}", "foobuzz", { extended: true }); - - // {}: Match a choice of different substrings and RegExp 'g' (regression) - assertMatch("foo{bar,baaz}", "foobaaz", { extended: true, globstar: globstar, flags: 'g' }); - assertMatch("foo{bar,baaz}", "foobar", { extended: true, globstar: globstar, flags: 'g' }); - assertNotMatch("foo{bar,baaz}", "foobuzz", { extended: true, globstar: globstar, flags: 'g' }); - assertMatch("foo{bar,b*z}", "foobuzz", { extended: true, globstar: globstar, flags: 'g' }); - - // More complex extended matches - assertMatch("http://?o[oz].b*z.com/{*.js,*.html}", - "http://foo.baaz.com/jquery.min.js", - { extended: true }); - assertMatch("http://?o[oz].b*z.com/{*.js,*.html}", - "http://moz.buzz.com/index.html", - { extended: true }); - assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", - "http://moz.buzz.com/index.htm", - { extended: true }); - assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", - "http://moz.bar.com/index.html", - { extended: true }); - assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", - "http://flozz.buzz.com/index.html", - { extended: true }); - - // More complex extended matches and RegExp 'g' (regresion) - assertMatch("http://?o[oz].b*z.com/{*.js,*.html}", - "http://foo.baaz.com/jquery.min.js", - { extended: true, globstar: globstar, flags: 'g' }); - assertMatch("http://?o[oz].b*z.com/{*.js,*.html}", - "http://moz.buzz.com/index.html", - { extended: true, globstar: globstar, flags: 'g' }); - assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", - "http://moz.buzz.com/index.htm", - { extended: true, globstar: globstar, flags: 'g' }); - assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", - "http://moz.bar.com/index.html", - { extended: true, globstar: globstar, flags: 'g' }); - assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", - "http://flozz.buzz.com/index.html", - { extended: true, globstar: globstar, flags: 'g' }); - - // globstar - assertMatch("http://foo.com/**/{*.js,*.html}", - "http://foo.com/bar/jquery.min.js", - { extended: true, globstar: globstar, flags: 'g' }); - assertMatch("http://foo.com/**/{*.js,*.html}", - "http://foo.com/bar/baz/jquery.min.js", - { extended: true, globstar: globstar, flags: 'g' }); - assertMatch("http://foo.com/**", - "http://foo.com/bar/baz/jquery.min.js", - { extended: true, globstar: globstar, flags: 'g' }); - - // Remaining special chars should still match themselves - // Test string "\\\\/$^+.()=!|,.*" represents \\/$^+.()=!|,.* - // The equivalent regex is: /^\\\/\$\^\+\.\(\)\=\!\|\,\..*$/ - // Both glob and regex match: \/$^+.()=!|,.* - var testExtStr = "\\\\/$^+.()=!|,.*"; - var targetExtStr = "\\/$^+.()=!|,.*"; - assertMatch(testExtStr, targetExtStr, { extended: true }); - assertMatch(testExtStr, targetExtStr, { extended: true, globstar: globstar, flags: 'g' }); -} - -// regression -// globstar false -test(false) -// globstar true -test(true); - -// globstar specific tests -assertMatch("/foo/*", "/foo/bar.txt", {globstar: true }); -assertMatch("/foo/**", "/foo/baz.txt", {globstar: true }); -assertMatch("/foo/**", "/foo/bar/baz.txt", {globstar: true }); -assertMatch("/foo/*/*.txt", "/foo/bar/baz.txt", {globstar: true }); -assertMatch("/foo/**/*.txt", "/foo/bar/baz.txt", {globstar: true }); -assertMatch("/foo/**/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); -assertMatch("/foo/**/bar.txt", "/foo/bar.txt", {globstar: true }); -assertMatch("/foo/**/**/bar.txt", "/foo/bar.txt", {globstar: true }); -assertMatch("/foo/**/*/baz.txt", "/foo/bar/baz.txt", {globstar: true }); -assertMatch("/foo/**/*.txt", "/foo/bar.txt", {globstar: true }); -assertMatch("/foo/**/**/*.txt", "/foo/bar.txt", {globstar: true }); -assertMatch("/foo/**/*/*.txt", "/foo/bar/baz.txt", {globstar: true }); -assertMatch("**/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); -assertMatch("**/foo.txt", "foo.txt", {globstar: true }); -assertMatch("**/*.txt", "foo.txt", {globstar: true }); - -assertNotMatch("/foo/*", "/foo/bar/baz.txt", {globstar: true }); -assertNotMatch("/foo/*.txt", "/foo/bar/baz.txt", {globstar: true }); -assertNotMatch("/foo/*/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); -assertNotMatch("/foo/*/bar.txt", "/foo/bar.txt", {globstar: true }); -assertNotMatch("/foo/*/*/baz.txt", "/foo/bar/baz.txt", {globstar: true }); -assertNotMatch("/foo/**.txt", "/foo/bar/baz/qux.txt", {globstar: true }); -assertNotMatch("/foo/bar**/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); -assertNotMatch("/foo/bar**", "/foo/bar/baz.txt", {globstar: true }); -assertNotMatch("**/.txt", "/foo/bar/baz/qux.txt", {globstar: true }); -assertNotMatch("*/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); -assertNotMatch("*/*.txt", "foo.txt", {globstar: true }); - -assertNotMatch("http://foo.com/*", - "http://foo.com/bar/baz/jquery.min.js", - { extended: true, globstar: true }); -assertNotMatch("http://foo.com/*", - "http://foo.com/bar/baz/jquery.min.js", - { globstar: true }); - -assertMatch("http://foo.com/*", - "http://foo.com/bar/baz/jquery.min.js", - { globstar: false }); -assertMatch("http://foo.com/**", - "http://foo.com/bar/baz/jquery.min.js", - { globstar: true }); - -assertMatch("http://foo.com/*/*/jquery.min.js", - "http://foo.com/bar/baz/jquery.min.js", - { globstar: true }); -assertMatch("http://foo.com/**/jquery.min.js", - "http://foo.com/bar/baz/jquery.min.js", - { globstar: true }); -assertMatch("http://foo.com/*/*/jquery.min.js", - "http://foo.com/bar/baz/jquery.min.js", - { globstar: false }); -assertMatch("http://foo.com/*/jquery.min.js", - "http://foo.com/bar/baz/jquery.min.js", - { globstar: false }); -assertNotMatch("http://foo.com/*/jquery.min.js", - "http://foo.com/bar/baz/jquery.min.js", - { globstar: true }); - -console.log("Ok!"); diff --git a/web/static/node_modules/graceful-fs/LICENSE b/web/static/node_modules/graceful-fs/LICENSE deleted file mode 100644 index e906a25a..00000000 --- a/web/static/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/web/static/node_modules/graceful-fs/README.md b/web/static/node_modules/graceful-fs/README.md deleted file mode 100644 index 82d6e4da..00000000 --- a/web/static/node_modules/graceful-fs/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# graceful-fs - -graceful-fs functions as a drop-in replacement for the fs module, -making various improvements. - -The improvements are meant to normalize behavior across different -platforms and environments, and to make filesystem access more -resilient to errors. - -## Improvements over [fs module](https://nodejs.org/api/fs.html) - -* Queues up `open` and `readdir` calls, and retries them once - something closes if there is an EMFILE error from too many file - descriptors. -* fixes `lchmod` for Node versions prior to 0.6.2. -* implements `fs.lutimes` if possible. Otherwise it becomes a noop. -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or - `lchown` if the user isn't root. -* makes `lchmod` and `lchown` become noops, if not available. -* retries reading a file if `read` results in EAGAIN error. - -On Windows, it retries renaming a file for up to one second if `EACCESS` -or `EPERM` error occurs, likely because antivirus software has locked -the directory. - -## USAGE - -```javascript -// use just like fs -var fs = require('graceful-fs') - -// now go and do stuff with it... -fs.readFile('some-file-or-whatever', (err, data) => { - // Do stuff here. -}) -``` - -## Sync methods - -This module cannot intercept or handle `EMFILE` or `ENFILE` errors from sync -methods. If you use sync methods which open file descriptors then you are -responsible for dealing with any errors. - -This is a known limitation, not a bug. - -## Global Patching - -If you want to patch the global fs module (or any other fs-like -module) you can do this: - -```javascript -// Make sure to read the caveat below. -var realFs = require('fs') -var gracefulFs = require('graceful-fs') -gracefulFs.gracefulify(realFs) -``` - -This should only ever be done at the top-level application layer, in -order to delay on EMFILE errors from any fs-using dependencies. You -should **not** do this in a library, because it can cause unexpected -delays in other parts of the program. - -## Changes - -This module is fairly stable at this point, and used by a lot of -things. That being said, because it implements a subtle behavior -change in a core part of the node API, even modest changes can be -extremely breaking, and the versioning is thus biased towards -bumping the major when in doubt. - -The main change between major versions has been switching between -providing a fully-patched `fs` module vs monkey-patching the node core -builtin, and the approach by which a non-monkey-patched `fs` was -created. - -The goal is to trade `EMFILE` errors for slower fs operations. So, if -you try to open a zillion files, rather than crashing, `open` -operations will be queued up and wait for something else to `close`. - -There are advantages to each approach. Monkey-patching the fs means -that no `EMFILE` errors can possibly occur anywhere in your -application, because everything is using the same core `fs` module, -which is patched. However, it can also obviously cause undesirable -side-effects, especially if the module is loaded multiple times. - -Implementing a separate-but-identical patched `fs` module is more -surgical (and doesn't run the risk of patching multiple times), but -also imposes the challenge of keeping in sync with the core module. - -The current approach loads the `fs` module, and then creates a -lookalike object that has all the same methods, except a few that are -patched. It is safe to use in all versions of Node from 0.8 through -7.0. - -### v4 - -* Do not monkey-patch the fs module. This module may now be used as a - drop-in dep, and users can opt into monkey-patching the fs builtin - if their app requires it. - -### v3 - -* Monkey-patch fs, because the eval approach no longer works on recent - node. -* fixed possible type-error throw if rename fails on windows -* verify that we *never* get EMFILE errors -* Ignore ENOSYS from chmod/chown -* clarify that graceful-fs must be used as a drop-in - -### v2.1.0 - -* Use eval rather than monkey-patching fs. -* readdir: Always sort the results -* win32: requeue a file if error has an OK status - -### v2.0 - -* A return to monkey patching -* wrap process.cwd - -### v1.1 - -* wrap readFile -* Wrap fs.writeFile. -* readdir protection -* Don't clobber the fs builtin -* Handle fs.read EAGAIN errors by trying again -* Expose the curOpen counter -* No-op lchown/lchmod if not implemented -* fs.rename patch only for win32 -* Patch fs.rename to handle AV software on Windows -* Close #4 Chown should not fail on einval or eperm if non-root -* Fix isaacs/fstream#1 Only wrap fs one time -* Fix #3 Start at 1024 max files, then back off on EMFILE -* lutimes that doens't blow up on Linux -* A full on-rewrite using a queue instead of just swallowing the EMFILE error -* Wrap Read/Write streams as well - -### 1.0 - -* Update engines for node 0.6 -* Be lstat-graceful on Windows -* first diff --git a/web/static/node_modules/graceful-fs/clone.js b/web/static/node_modules/graceful-fs/clone.js deleted file mode 100644 index dff3cc8c..00000000 --- a/web/static/node_modules/graceful-fs/clone.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict' - -module.exports = clone - -var getPrototypeOf = Object.getPrototypeOf || function (obj) { - return obj.__proto__ -} - -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj - - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) } - else - var copy = Object.create(null) - - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - - return copy -} diff --git a/web/static/node_modules/graceful-fs/graceful-fs.js b/web/static/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index 8d5b89e4..00000000 --- a/web/static/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,448 +0,0 @@ -var fs = require('fs') -var polyfills = require('./polyfills.js') -var legacy = require('./legacy-streams.js') -var clone = require('./clone.js') - -var util = require('util') - -/* istanbul ignore next - node 0.x polyfill */ -var gracefulQueue -var previousSymbol - -/* istanbul ignore else - node 0.x polyfill */ -if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { - gracefulQueue = Symbol.for('graceful-fs.queue') - // This is used in testing by future versions - previousSymbol = Symbol.for('graceful-fs.previous') -} else { - gracefulQueue = '___graceful-fs.queue' - previousSymbol = '___graceful-fs.previous' -} - -function noop () {} - -function publishQueue(context, queue) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue - } - }) -} - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) - } - -// Once time initialization -if (!fs[gracefulQueue]) { - // This queue can be shared by multiple loaded instances - var queue = global[gracefulQueue] || [] - publishQueue(fs, queue) - - // Patch fs.close/closeSync to shared queue version, because we need - // to retry() whenever a close happens *anywhere* in the program. - // This is essential when multiple graceful-fs instances are - // in play at the same time. - fs.close = (function (fs$close) { - function close (fd, cb) { - return fs$close.call(fs, fd, function (err) { - // This function uses the graceful-fs shared queue - if (!err) { - resetQueue() - } - - if (typeof cb === 'function') - cb.apply(this, arguments) - }) - } - - Object.defineProperty(close, previousSymbol, { - value: fs$close - }) - return close - })(fs.close) - - fs.closeSync = (function (fs$closeSync) { - function closeSync (fd) { - // This function uses the graceful-fs shared queue - fs$closeSync.apply(fs, arguments) - resetQueue() - } - - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }) - return closeSync - })(fs.closeSync) - - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(fs[gracefulQueue]) - require('assert').equal(fs[gracefulQueue].length, 0) - }) - } -} - -if (!global[gracefulQueue]) { - publishQueue(global, fs[gracefulQueue]); -} - -module.exports = patch(clone(fs)) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { - module.exports = patch(fs) - fs.__patched = true; -} - -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch - - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readFile(path, options, cb) - - function go$readFile (path, options, cb, startTime) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$writeFile(path, data, options, cb) - - function go$writeFile (path, data, options, cb, startTime) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$appendFile(path, data, options, cb) - - function go$appendFile (path, data, options, cb, startTime) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$copyFile = fs.copyFile - if (fs$copyFile) - fs.copyFile = copyFile - function copyFile (src, dest, flags, cb) { - if (typeof flags === 'function') { - cb = flags - flags = 0 - } - return go$copyFile(src, dest, flags, cb) - - function go$copyFile (src, dest, flags, cb, startTime) { - return fs$copyFile(src, dest, flags, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$readdir = fs.readdir - fs.readdir = readdir - var noReaddirOptionVersions = /^v[0-5]\./ - function readdir (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - var go$readdir = noReaddirOptionVersions.test(process.version) - ? function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, fs$readdirCallback( - path, options, cb, startTime - )) - } - : function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, options, fs$readdirCallback( - path, options, cb, startTime - )) - } - - return go$readdir(path, options, cb) - - function fs$readdirCallback (path, options, cb, startTime) { - return function (err, files) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([ - go$readdir, - [path, options, cb], - err, - startTime || Date.now(), - Date.now() - ]) - else { - if (files && files.sort) - files.sort() - - if (typeof cb === 'function') - cb.call(this, err, files) - } - } - } - } - - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } - - var fs$ReadStream = fs.ReadStream - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - } - - var fs$WriteStream = fs.WriteStream - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - } - - Object.defineProperty(fs, 'ReadStream', { - get: function () { - return ReadStream - }, - set: function (val) { - ReadStream = val - }, - enumerable: true, - configurable: true - }) - Object.defineProperty(fs, 'WriteStream', { - get: function () { - return WriteStream - }, - set: function (val) { - WriteStream = val - }, - enumerable: true, - configurable: true - }) - - // legacy names - var FileReadStream = ReadStream - Object.defineProperty(fs, 'FileReadStream', { - get: function () { - return FileReadStream - }, - set: function (val) { - FileReadStream = val - }, - enumerable: true, - configurable: true - }) - var FileWriteStream = WriteStream - Object.defineProperty(fs, 'FileWriteStream', { - get: function () { - return FileWriteStream - }, - set: function (val) { - FileWriteStream = val - }, - enumerable: true, - configurable: true - }) - - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } - - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() - - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } - - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } - - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } - - function createReadStream (path, options) { - return new fs.ReadStream(path, options) - } - - function createWriteStream (path, options) { - return new fs.WriteStream(path, options) - } - - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null - - return go$open(path, flags, mode, cb) - - function go$open (path, flags, mode, cb, startTime) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - return fs -} - -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - fs[gracefulQueue].push(elem) - retry() -} - -// keep track of the timeout between retry() calls -var retryTimer - -// reset the startTime and lastTime to now -// this resets the start of the 60 second overall timeout as well as the -// delay between attempts so that we'll retry these jobs sooner -function resetQueue () { - var now = Date.now() - for (var i = 0; i < fs[gracefulQueue].length; ++i) { - // entries that are only a length of 2 are from an older version, don't - // bother modifying those since they'll be retried anyway. - if (fs[gracefulQueue][i].length > 2) { - fs[gracefulQueue][i][3] = now // startTime - fs[gracefulQueue][i][4] = now // lastTime - } - } - // call retry to make sure we're actively processing the queue - retry() -} - -function retry () { - // clear the timer and remove it to help prevent unintended concurrency - clearTimeout(retryTimer) - retryTimer = undefined - - if (fs[gracefulQueue].length === 0) - return - - var elem = fs[gracefulQueue].shift() - var fn = elem[0] - var args = elem[1] - // these items may be unset if they were added by an older graceful-fs - var err = elem[2] - var startTime = elem[3] - var lastTime = elem[4] - - // if we don't have a startTime we have no way of knowing if we've waited - // long enough, so go ahead and retry this item now - if (startTime === undefined) { - debug('RETRY', fn.name, args) - fn.apply(null, args) - } else if (Date.now() - startTime >= 60000) { - // it's been more than 60 seconds total, bail now - debug('TIMEOUT', fn.name, args) - var cb = args.pop() - if (typeof cb === 'function') - cb.call(null, err) - } else { - // the amount of time between the last attempt and right now - var sinceAttempt = Date.now() - lastTime - // the amount of time between when we first tried, and when we last tried - // rounded up to at least 1 - var sinceStart = Math.max(lastTime - startTime, 1) - // backoff. wait longer than the total time we've been retrying, but only - // up to a maximum of 100ms - var desiredDelay = Math.min(sinceStart * 1.2, 100) - // it's been long enough since the last retry, do it again - if (sinceAttempt >= desiredDelay) { - debug('RETRY', fn.name, args) - fn.apply(null, args.concat([startTime])) - } else { - // if we can't do this job yet, push it to the end of the queue - // and let the next iteration check again - fs[gracefulQueue].push(elem) - } - } - - // schedule our next run if one isn't already scheduled - if (retryTimer === undefined) { - retryTimer = setTimeout(retry, 0) - } -} diff --git a/web/static/node_modules/graceful-fs/legacy-streams.js b/web/static/node_modules/graceful-fs/legacy-streams.js deleted file mode 100644 index d617b50f..00000000 --- a/web/static/node_modules/graceful-fs/legacy-streams.js +++ /dev/null @@ -1,118 +0,0 @@ -var Stream = require('stream').Stream - -module.exports = legacy - -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream - } - - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); - - Stream.call(this); - - var self = this; - - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; - - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.encoding) this.setEncoding(this.encoding); - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; - } - - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; - return; - } - - self.fd = fd; - self.emit('open', fd); - self._read(); - }) - } - - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); - - Stream.call(this); - - this.path = path; - this.fd = null; - this.writable = true; - - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - this.busy = false; - this._queue = []; - - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); - } - } -} diff --git a/web/static/node_modules/graceful-fs/package.json b/web/static/node_modules/graceful-fs/package.json deleted file mode 100644 index 87babf02..00000000 --- a/web/static/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "graceful-fs", - "description": "A drop-in replacement for fs, making various improvements.", - "version": "4.2.11", - "repository": { - "type": "git", - "url": "https://github.com/isaacs/node-graceful-fs" - }, - "main": "graceful-fs.js", - "directories": { - "test": "test" - }, - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", - "test": "nyc --silent node test.js | tap -c -", - "posttest": "nyc report" - }, - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "ISC", - "devDependencies": { - "import-fresh": "^2.0.0", - "mkdirp": "^0.5.0", - "rimraf": "^2.2.8", - "tap": "^16.3.4" - }, - "files": [ - "fs.js", - "graceful-fs.js", - "legacy-streams.js", - "polyfills.js", - "clone.js" - ], - "tap": { - "reporter": "classic" - } -} diff --git a/web/static/node_modules/graceful-fs/polyfills.js b/web/static/node_modules/graceful-fs/polyfills.js deleted file mode 100644 index 453f1a9e..00000000 --- a/web/static/node_modules/graceful-fs/polyfills.js +++ /dev/null @@ -1,355 +0,0 @@ -var constants = require('constants') - -var origCwd = process.cwd -var cwd = null - -var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform - -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -try { - process.cwd() -} catch (er) {} - -// This check is needed until node.js 12 is required -if (typeof process.chdir === 'function') { - var chdir = process.chdir - process.chdir = function (d) { - cwd = null - chdir.call(process, d) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) -} - -module.exports = patch - -function patch (fs) { - // (re-)implement some things that are known busted or missing. - - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) - } - - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) - } - - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. - - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) - - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) - - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) - - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) - - fs.stat = statFix(fs.stat) - fs.fstat = statFix(fs.fstat) - fs.lstat = statFix(fs.lstat) - - fs.statSync = statFixSync(fs.statSync) - fs.fstatSync = statFixSync(fs.fstatSync) - fs.lstatSync = statFixSync(fs.lstatSync) - - // if lchmod/lchown do not exist, then make them no-ops - if (fs.chmod && !fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (fs.chown && !fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) - } - fs.lchownSync = function () {} - } - - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 60 seconds. - - // Set the timeout this long because some Windows Anti-Virus, such as Parity - // bit9, may lock files for up to a minute, causing npm package install - // failures. Also, take care to yield the scheduler. Windows scheduling gives - // CPU to a busy looping process, which can cause the program causing the lock - // contention to be starved of CPU by node, so the contention doesn't resolve. - if (platform === "win32") { - fs.rename = typeof fs.rename !== 'function' ? fs.rename - : (function (fs$rename) { - function rename (from, to, cb) { - var start = Date.now() - var backoff = 0; - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") - && Date.now() - start < 60000) { - setTimeout(function() { - fs.stat(to, function (stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er) - }) - }, backoff) - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er) - }) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename) - return rename - })(fs.rename) - } - - // if read() returns EAGAIN, then just try it again. - fs.read = typeof fs.read !== 'function' ? fs.read - : (function (fs$read) { - function read (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - - // This ensures `util.promisify` works as it does for native `fs.read`. - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) - return read - })(fs.read) - - fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync - : (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } - }})(fs.readSync) - - function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - } - - function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - - } else if (fs.futimes) { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } - } - - function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - - function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - function callback (er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - if (cb) cb.apply(this, arguments) - } - return options ? orig.call(fs, target, options, callback) - : orig.call(fs, target, callback) - } - } - - function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options) { - var stats = options ? orig.call(fs, target, options) - : orig.call(fs, target) - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - return stats; - } - } - - // ENOSYS means that the fs doesn't support the op. Just ignore - // that, because it doesn't matter. - // - // if there's no getuid, or if getuid() is something other - // than 0, and the error is EINVAL or EPERM, then just ignore - // it. - // - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // - // When running as root, or if other types of errors are - // encountered, then it's strict. - function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - - return false - } -} diff --git a/web/static/node_modules/has-flag/index.d.ts b/web/static/node_modules/has-flag/index.d.ts deleted file mode 100644 index a0a48c89..00000000 --- a/web/static/node_modules/has-flag/index.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** -Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag. - -@param flag - CLI flag to look for. The `--` prefix is optional. -@param argv - CLI arguments. Default: `process.argv`. -@returns Whether the flag exists. - -@example -``` -// $ ts-node foo.ts -f --unicorn --foo=bar -- --rainbow - -// foo.ts -import hasFlag = require('has-flag'); - -hasFlag('unicorn'); -//=> true - -hasFlag('--unicorn'); -//=> true - -hasFlag('f'); -//=> true - -hasFlag('-f'); -//=> true - -hasFlag('foo=bar'); -//=> true - -hasFlag('foo'); -//=> false - -hasFlag('rainbow'); -//=> false -``` -*/ -declare function hasFlag(flag: string, argv?: string[]): boolean; - -export = hasFlag; diff --git a/web/static/node_modules/has-flag/index.js b/web/static/node_modules/has-flag/index.js deleted file mode 100644 index b6f80b1f..00000000 --- a/web/static/node_modules/has-flag/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -module.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf('--'); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -}; diff --git a/web/static/node_modules/has-flag/license b/web/static/node_modules/has-flag/license deleted file mode 100644 index e7af2f77..00000000 --- a/web/static/node_modules/has-flag/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/web/static/node_modules/has-flag/package.json b/web/static/node_modules/has-flag/package.json deleted file mode 100644 index a9cba4b8..00000000 --- a/web/static/node_modules/has-flag/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "has-flag", - "version": "4.0.0", - "description": "Check if argv has a specific flag", - "license": "MIT", - "repository": "sindresorhus/has-flag", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "has", - "check", - "detect", - "contains", - "find", - "flag", - "cli", - "command-line", - "argv", - "process", - "arg", - "args", - "argument", - "arguments", - "getopt", - "minimist", - "optimist" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/web/static/node_modules/has-flag/readme.md b/web/static/node_modules/has-flag/readme.md deleted file mode 100644 index 3f72dff2..00000000 --- a/web/static/node_modules/has-flag/readme.md +++ /dev/null @@ -1,89 +0,0 @@ -# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag) - -> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag - -Correctly stops looking after an `--` argument terminator. - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    - ---- - - -## Install - -``` -$ npm install has-flag -``` - - -## Usage - -```js -// foo.js -const hasFlag = require('has-flag'); - -hasFlag('unicorn'); -//=> true - -hasFlag('--unicorn'); -//=> true - -hasFlag('f'); -//=> true - -hasFlag('-f'); -//=> true - -hasFlag('foo=bar'); -//=> true - -hasFlag('foo'); -//=> false - -hasFlag('rainbow'); -//=> false -``` - -``` -$ node foo.js -f --unicorn --foo=bar -- --rainbow -``` - - -## API - -### hasFlag(flag, [argv]) - -Returns a boolean for whether the flag exists. - -#### flag - -Type: `string` - -CLI flag to look for. The `--` prefix is optional. - -#### argv - -Type: `string[]`
    -Default: `process.argv` - -CLI arguments. - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/web/static/node_modules/htmx.org/LICENSE b/web/static/node_modules/htmx.org/LICENSE deleted file mode 100644 index d3061a37..00000000 --- a/web/static/node_modules/htmx.org/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Zero-Clause BSD -============= - -Permission to use, copy, modify, and/or distribute this software for -any purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE -FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY -DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN -AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/web/static/node_modules/htmx.org/README.md b/web/static/node_modules/htmx.org/README.md deleted file mode 100644 index 84defa94..00000000 --- a/web/static/node_modules/htmx.org/README.md +++ /dev/null @@ -1,111 +0,0 @@ -[![ htmx](https://raw.githubusercontent.com/bigskysoftware/htmx/master/www/static/img/htmx_logo.1.png "high power tools for HTML")](https://htmx.org) - -*high power tools for HTML* - -[![Discord](https://img.shields.io/discord/725789699527933952)](https://htmx.org/discord) -[![Netlify](https://img.shields.io/netlify/dba3fc85-d9c9-476a-a35a-e52a632cef78)](https://app.netlify.com/sites/htmx/deploys) -[![Bundlephobia](https://badgen.net/bundlephobia/dependency-count/htmx.org)](https://bundlephobia.com/result?p=htmx.org) -[![Bundlephobia](https://badgen.net/bundlephobia/minzip/htmx.org)](https://bundlephobia.com/result?p=htmx.org) - -## introduction - -htmx allows you to access [AJAX](https://htmx.org/docs#ajax), [CSS Transitions](https://htmx.org/docs#css_transitions), -[WebSockets](https://htmx.org/docs#websockets) and [Server Sent Events](https://htmx.org/docs#sse) -directly in HTML, using [attributes](https://htmx.org/reference#attributes), so you can build -[modern user interfaces](https://htmx.org/examples) with the [simplicity](https://en.wikipedia.org/wiki/HATEOAS) and -[power](https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm) of hypertext - -htmx is small ([~14k min.gz'd](https://unpkg.com/htmx.org/dist/)), -[dependency-free](https://github.com/bigskysoftware/htmx/blob/master/package.json), -[extendable](https://htmx.org/extensions) & -IE11 compatible - -## motivation - -* Why should only `` and `
    ` be able to make HTTP requests? -* Why should only `click` & `submit` events trigger them? -* Why should only GET & POST be available? -* Why should you only be able to replace the *entire* screen? - -By removing these arbitrary constraints htmx completes HTML as a -[hypertext](https://en.wikipedia.org/wiki/Hypertext) - -## quick start - -```html - - - -``` - -The [`hx-post`](https://htmx.org/attributes/hx-post) and [`hx-swap`](https://htmx.org/attributes/hx-swap) attributes tell htmx: - -> "When a user clicks on this button, issue an AJAX request to /clicked, and replace the entire button with the response" - -htmx is the successor to [intercooler.js](http://intercoolerjs.org) - -### installing as a node package - -To install using npm: - -``` -npm install htmx.org --save -``` - -Note there is an old broken package called `htmx`. This is `htmx.org`. - -## website & docs - -* -* - -## contributing -Want to contribute? Check out our [contribution guidelines](CONTRIBUTING.md) - -No time? Then [become a sponsor](https://github.com/sponsors/bigskysoftware#sponsors) - -### hacking guide - -To develop htmx locally, you will need to install the development dependencies. - -__Requires Node 15.__ - -Run: - -``` -npm install -``` - -Then, run a web server in the root. - -This is easiest with: - -``` -npx serve -``` - -You can then run the test suite by navigating to: - - - -At this point you can modify `/src/htmx.js` to add features, and then add tests in the appropriate area under `/test`. - -* `/test/index.html` - the root test page from which all other tests are included -* `/test/attributes` - attribute specific tests -* `/test/core` - core functionality tests -* `/test/core/regressions.js` - regression tests -* `/test/ext` - extension tests -* `/test/manual` - manual tests that cannot be automated - -htmx uses the [mocha](https://mochajs.org/) testing framework, the [chai](https://www.chaijs.com/) assertion framework -and [sinon](https://sinonjs.org/releases/v9/fake-xhr-and-server/) to mock out AJAX requests. They are all OK. - -You can also run live tests and demo of the WebSockets and Server-Side Events extensions with `npm run ws-tests` - -## haiku - -*javascript fatigue:
    -longing for a hypertext
    -already in hand* diff --git a/web/static/node_modules/htmx.org/dist/ext/ajax-header.js b/web/static/node_modules/htmx.org/dist/ext/ajax-header.js deleted file mode 100644 index 5c6221bf..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/ajax-header.js +++ /dev/null @@ -1,7 +0,0 @@ -htmx.defineExtension('ajax-header', { - onEvent: function (name, evt) { - if (name === "htmx:configRequest") { - evt.detail.headers['X-Requested-With'] = 'XMLHttpRequest'; - } - } -}); \ No newline at end of file diff --git a/web/static/node_modules/htmx.org/dist/ext/alpine-morph.js b/web/static/node_modules/htmx.org/dist/ext/alpine-morph.js deleted file mode 100644 index 1872daec..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/alpine-morph.js +++ /dev/null @@ -1,16 +0,0 @@ -htmx.defineExtension('alpine-morph', { - isInlineSwap: function (swapStyle) { - return swapStyle === 'morph'; - }, - handleSwap: function (swapStyle, target, fragment) { - if (swapStyle === 'morph') { - if (fragment.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { - Alpine.morph(target, fragment.firstElementChild); - return [target]; - } else { - Alpine.morph(target, fragment.outerHTML); - return [target]; - } - } - } -}); \ No newline at end of file diff --git a/web/static/node_modules/htmx.org/dist/ext/class-tools.js b/web/static/node_modules/htmx.org/dist/ext/class-tools.js deleted file mode 100644 index 1cf4b426..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/class-tools.js +++ /dev/null @@ -1,92 +0,0 @@ -(function () { - - function splitOnWhitespace(trigger) { - return trigger.split(/\s+/); - } - - function parseClassOperation(trimmedValue) { - var split = splitOnWhitespace(trimmedValue); - if (split.length > 1) { - var operation = split[0]; - var classDef = split[1].trim(); - var cssClass; - var delay; - if (classDef.indexOf(":") > 0) { - var splitCssClass = classDef.split(':'); - cssClass = splitCssClass[0]; - delay = htmx.parseInterval(splitCssClass[1]); - } else { - cssClass = classDef; - delay = 100; - } - return { - operation: operation, - cssClass: cssClass, - delay: delay - } - } else { - return null; - } - } - - function performOperation(elt, classOperation, classList, currentRunTime) { - setTimeout(function () { - elt.classList[classOperation.operation].call(elt.classList, classOperation.cssClass); - }, currentRunTime) - } - - function toggleOperation(elt, classOperation, classList, currentRunTime) { - setTimeout(function () { - setInterval(function () { - elt.classList[classOperation.operation].call(elt.classList, classOperation.cssClass); - }, classOperation.delay); - }, currentRunTime) - } - - function processClassList(elt, classList) { - var runs = classList.split("&"); - for (var i = 0; i < runs.length; i++) { - var run = runs[i]; - var currentRunTime = 0; - var classOperations = run.split(","); - for (var j = 0; j < classOperations.length; j++) { - var value = classOperations[j]; - var trimmedValue = value.trim(); - var classOperation = parseClassOperation(trimmedValue); - if (classOperation) { - if (classOperation.operation === "toggle") { - toggleOperation(elt, classOperation, classList, currentRunTime); - currentRunTime = currentRunTime + classOperation.delay; - } else { - currentRunTime = currentRunTime + classOperation.delay; - performOperation(elt, classOperation, classList, currentRunTime); - } - } - } - } - } - - function maybeProcessClasses(elt) { - if (elt.getAttribute) { - var classList = elt.getAttribute("classes") || elt.getAttribute("data-classes"); - if (classList) { - processClassList(elt, classList); - } - } - } - - htmx.defineExtension('class-tools', { - onEvent: function (name, evt) { - if (name === "htmx:afterProcessNode") { - var elt = evt.detail.elt; - maybeProcessClasses(elt); - if (elt.querySelectorAll) { - var children = elt.querySelectorAll("[classes], [data-classes]"); - for (var i = 0; i < children.length; i++) { - maybeProcessClasses(children[i]); - } - } - } - } - }); -})(); \ No newline at end of file diff --git a/web/static/node_modules/htmx.org/dist/ext/client-side-templates.js b/web/static/node_modules/htmx.org/dist/ext/client-side-templates.js deleted file mode 100644 index 2bace419..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/client-side-templates.js +++ /dev/null @@ -1,96 +0,0 @@ -htmx.defineExtension('client-side-templates', { - transformResponse : function(text, xhr, elt) { - - var mustacheTemplate = htmx.closest(elt, "[mustache-template]"); - if (mustacheTemplate) { - var data = JSON.parse(text); - var templateId = mustacheTemplate.getAttribute('mustache-template'); - var template = htmx.find("#" + templateId); - if (template) { - return Mustache.render(template.innerHTML, data); - } else { - throw "Unknown mustache template: " + templateId; - } - } - - var mustacheArrayTemplate = htmx.closest(elt, "[mustache-array-template]"); - if (mustacheArrayTemplate) { - var data = JSON.parse(text); - var templateId = mustacheArrayTemplate.getAttribute('mustache-array-template'); - var template = htmx.find("#" + templateId); - if (template) { - return Mustache.render(template.innerHTML, {"data": data }); - } else { - throw "Unknown mustache template: " + templateId; - } - } - - var handlebarsTemplate = htmx.closest(elt, "[handlebars-template]"); - if (handlebarsTemplate) { - var data = JSON.parse(text); - var templateId = handlebarsTemplate.getAttribute('handlebars-template'); - var templateElement = htmx.find('#' + templateId).innerHTML; - var renderTemplate = Handlebars.compile(templateElement); - if (renderTemplate) { - return renderTemplate(data); - } else { - throw "Unknown handlebars template: " + templateId; - } - } - - var handlebarsArrayTemplate = htmx.closest(elt, "[handlebars-array-template]"); - if (handlebarsArrayTemplate) { - var data = JSON.parse(text); - var templateId = handlebarsArrayTemplate.getAttribute('handlebars-array-template'); - var templateElement = htmx.find('#' + templateId).innerHTML; - var renderTemplate = Handlebars.compile(templateElement); - if (renderTemplate) { - return renderTemplate(data); - } else { - throw "Unknown handlebars template: " + templateId; - } - } - - var nunjucksTemplate = htmx.closest(elt, "[nunjucks-template]"); - if (nunjucksTemplate) { - var data = JSON.parse(text); - var templateName = nunjucksTemplate.getAttribute('nunjucks-template'); - var template = htmx.find('#' + templateName); - if (template) { - return nunjucks.renderString(template.innerHTML, data); - } else { - return nunjucks.render(templateName, data); - } - } - - var xsltTemplate = htmx.closest(elt, "[xslt-template]"); - if (xsltTemplate) { - var templateId = xsltTemplate.getAttribute('xslt-template'); - var template = htmx.find("#" + templateId); - if (template) { - var content = template.innerHTML ? new DOMParser().parseFromString(template.innerHTML, 'application/xml') - : template.contentDocument; - var processor = new XSLTProcessor(); - processor.importStylesheet(content); - var data = new DOMParser().parseFromString(text, "application/xml"); - var frag = processor.transformToFragment(data, document); - return new XMLSerializer().serializeToString(frag); - } else { - throw "Unknown XSLT template: " + templateId; - } - } - - var nunjucksArrayTemplate = htmx.closest(elt, "[nunjucks-array-template]"); - if (nunjucksArrayTemplate) { - var data = JSON.parse(text); - var templateName = nunjucksArrayTemplate.getAttribute('nunjucks-array-template'); - var template = htmx.find('#' + templateName); - if (template) { - return nunjucks.renderString(template.innerHTML, {"data": data}); - } else { - return nunjucks.render(templateName, {"data": data}); - } - } - return text; - } -}); diff --git a/web/static/node_modules/htmx.org/dist/ext/debug.js b/web/static/node_modules/htmx.org/dist/ext/debug.js deleted file mode 100644 index 861ee743..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/debug.js +++ /dev/null @@ -1,11 +0,0 @@ -htmx.defineExtension('debug', { - onEvent: function (name, evt) { - if (console.debug) { - console.debug(name, evt); - } else if (console) { - console.log("DEBUG:", name, evt); - } else { - throw "NO CONSOLE SUPPORTED" - } - } -}); diff --git a/web/static/node_modules/htmx.org/dist/ext/disable-element.js b/web/static/node_modules/htmx.org/dist/ext/disable-element.js deleted file mode 100644 index 07bef62d..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/disable-element.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -// Disable Submit Button -htmx.defineExtension('disable-element', { - onEvent: function (name, evt) { - let elt = evt.detail.elt; - let target = elt.getAttribute("hx-disable-element"); - let targetElements = (target == "self") ? [ elt ] : document.querySelectorAll(target); - - for (var i = 0; i < targetElements.length; i++) { - if (name === "htmx:beforeRequest" && targetElements[i]) { - targetElements[i].disabled = true; - } else if (name == "htmx:afterRequest" && targetElements[i]) { - targetElements[i].disabled = false; - } - } - } -}); \ No newline at end of file diff --git a/web/static/node_modules/htmx.org/dist/ext/event-header.js b/web/static/node_modules/htmx.org/dist/ext/event-header.js deleted file mode 100644 index c7d29334..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/event-header.js +++ /dev/null @@ -1,37 +0,0 @@ -(function(){ - function stringifyEvent(event) { - var obj = {}; - for (var key in event) { - obj[key] = event[key]; - } - return JSON.stringify(obj, function(key, value){ - if(value instanceof Node){ - var nodeRep = value.tagName; - if (nodeRep) { - nodeRep = nodeRep.toLowerCase(); - if(value.id){ - nodeRep += "#" + value.id; - } - if(value.classList && value.classList.length){ - nodeRep += "." + value.classList.toString().replace(" ", ".") - } - return nodeRep; - } else { - return "Node" - } - } - if (value instanceof Window) return 'Window'; - return value; - }); - } - - htmx.defineExtension('event-header', { - onEvent: function (name, evt) { - if (name === "htmx:configRequest") { - if (evt.detail.triggeringEvent) { - evt.detail.headers['Triggering-Event'] = stringifyEvent(evt.detail.triggeringEvent); - } - } - } - }); -})(); diff --git a/web/static/node_modules/htmx.org/dist/ext/head-support.js b/web/static/node_modules/htmx.org/dist/ext/head-support.js deleted file mode 100644 index 67cfc692..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/head-support.js +++ /dev/null @@ -1,141 +0,0 @@ -//========================================================== -// head-support.js -// -// An extension to htmx 1.0 to add head tag merging. -//========================================================== -(function(){ - - var api = null; - - function log() { - //console.log(arguments); - } - - function mergeHead(newContent, defaultMergeStrategy) { - - if (newContent && newContent.indexOf(' -1) { - const htmlDoc = document.createElement("html"); - // remove svgs to avoid conflicts - var contentWithSvgsRemoved = newContent.replace(/]*>|>)([\s\S]*?)<\/svg>/gim, ''); - // extract head tag - var headTag = contentWithSvgsRemoved.match(/(]*>|>)([\s\S]*?)<\/head>)/im); - - // if the head tag exists... - if (headTag) { - - var added = [] - var removed = [] - var preserved = [] - var nodesToAppend = [] - - htmlDoc.innerHTML = headTag; - var newHeadTag = htmlDoc.querySelector("head"); - var currentHead = document.head; - - if (newHeadTag == null) { - return; - } else { - // put all new head elements into a Map, by their outerHTML - var srcToNewHeadNodes = new Map(); - for (const newHeadChild of newHeadTag.children) { - srcToNewHeadNodes.set(newHeadChild.outerHTML, newHeadChild); - } - } - - - - // determine merge strategy - var mergeStrategy = api.getAttributeValue(newHeadTag, "hx-head") || defaultMergeStrategy; - - // get the current head - for (const currentHeadElt of currentHead.children) { - - // If the current head element is in the map - var inNewContent = srcToNewHeadNodes.has(currentHeadElt.outerHTML); - var isReAppended = currentHeadElt.getAttribute("hx-head") === "re-eval"; - var isPreserved = api.getAttributeValue(currentHeadElt, "hx-preserve") === "true"; - if (inNewContent || isPreserved) { - if (isReAppended) { - // remove the current version and let the new version replace it and re-execute - removed.push(currentHeadElt); - } else { - // this element already exists and should not be re-appended, so remove it from - // the new content map, preserving it in the DOM - srcToNewHeadNodes.delete(currentHeadElt.outerHTML); - preserved.push(currentHeadElt); - } - } else { - if (mergeStrategy === "append") { - // we are appending and this existing element is not new content - // so if and only if it is marked for re-append do we do anything - if (isReAppended) { - removed.push(currentHeadElt); - nodesToAppend.push(currentHeadElt); - } - } else { - // if this is a merge, we remove this content since it is not in the new head - if (api.triggerEvent(document.body, "htmx:removingHeadElement", {headElement: currentHeadElt}) !== false) { - removed.push(currentHeadElt); - } - } - } - } - - // Push the tremaining new head elements in the Map into the - // nodes to append to the head tag - nodesToAppend.push(...srcToNewHeadNodes.values()); - log("to append: ", nodesToAppend); - - for (const newNode of nodesToAppend) { - log("adding: ", newNode); - var newElt = document.createRange().createContextualFragment(newNode.outerHTML); - log(newElt); - if (api.triggerEvent(document.body, "htmx:addingHeadElement", {headElement: newElt}) !== false) { - currentHead.appendChild(newElt); - added.push(newElt); - } - } - - // remove all removed elements, after we have appended the new elements to avoid - // additional network requests for things like style sheets - for (const removedElement of removed) { - if (api.triggerEvent(document.body, "htmx:removingHeadElement", {headElement: removedElement}) !== false) { - currentHead.removeChild(removedElement); - } - } - - api.triggerEvent(document.body, "htmx:afterHeadMerge", {added: added, kept: preserved, removed: removed}); - } - } - } - - htmx.defineExtension("head-support", { - init: function(apiRef) { - // store a reference to the internal API. - api = apiRef; - - htmx.on('htmx:afterSwap', function(evt){ - var serverResponse = evt.detail.xhr.response; - if (api.triggerEvent(document.body, "htmx:beforeHeadMerge", evt.detail)) { - mergeHead(serverResponse, evt.detail.boosted ? "merge" : "append"); - } - }) - - htmx.on('htmx:historyRestore', function(evt){ - if (api.triggerEvent(document.body, "htmx:beforeHeadMerge", evt.detail)) { - if (evt.detail.cacheMiss) { - mergeHead(evt.detail.serverResponse, "merge"); - } else { - mergeHead(evt.detail.item.head, "merge"); - } - } - }) - - htmx.on('htmx:historyItemCreated', function(evt){ - var historyItem = evt.detail.item; - historyItem.head = document.head.outerHTML; - }) - } - }); - -})() \ No newline at end of file diff --git a/web/static/node_modules/htmx.org/dist/ext/include-vals.js b/web/static/node_modules/htmx.org/dist/ext/include-vals.js deleted file mode 100644 index d8f5ce4f..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/include-vals.js +++ /dev/null @@ -1,24 +0,0 @@ -(function(){ - - function mergeObjects(obj1, obj2) { - for (var key in obj2) { - if (obj2.hasOwnProperty(key)) { - obj1[key] = obj2[key]; - } - } - return obj1; - } - - htmx.defineExtension('include-vals', { - onEvent: function (name, evt) { - if (name === "htmx:configRequest") { - var includeValsElt = htmx.closest(evt.detail.elt, "[include-vals],[data-include-vals]"); - if (includeValsElt) { - var includeVals = includeValsElt.getAttribute("include-vals") || includeValsElt.getAttribute("data-include-vals"); - var valuesToInclude = eval("({" + includeVals + "})"); - mergeObjects(evt.detail.parameters, valuesToInclude); - } - } - } - }); -})(); diff --git a/web/static/node_modules/htmx.org/dist/ext/json-enc.js b/web/static/node_modules/htmx.org/dist/ext/json-enc.js deleted file mode 100644 index db0aa36f..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/json-enc.js +++ /dev/null @@ -1,12 +0,0 @@ -htmx.defineExtension('json-enc', { - onEvent: function (name, evt) { - if (name === "htmx:configRequest") { - evt.detail.headers['Content-Type'] = "application/json"; - } - }, - - encodeParameters : function(xhr, parameters, elt) { - xhr.overrideMimeType('text/json'); - return (JSON.stringify(parameters)); - } -}); \ No newline at end of file diff --git a/web/static/node_modules/htmx.org/dist/ext/loading-states.js b/web/static/node_modules/htmx.org/dist/ext/loading-states.js deleted file mode 100644 index c8ab51da..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/loading-states.js +++ /dev/null @@ -1,183 +0,0 @@ -;(function () { - let loadingStatesUndoQueue = [] - - function loadingStateContainer(target) { - return htmx.closest(target, '[data-loading-states]') || document.body - } - - function mayProcessUndoCallback(target, callback) { - if (document.body.contains(target)) { - callback() - } - } - - function mayProcessLoadingStateByPath(elt, requestPath) { - const pathElt = htmx.closest(elt, '[data-loading-path]') - if (!pathElt) { - return true - } - - return pathElt.getAttribute('data-loading-path') === requestPath - } - - function queueLoadingState(sourceElt, targetElt, doCallback, undoCallback) { - const delayElt = htmx.closest(sourceElt, '[data-loading-delay]') - if (delayElt) { - const delayInMilliseconds = - delayElt.getAttribute('data-loading-delay') || 200 - const timeout = setTimeout(function () { - doCallback() - - loadingStatesUndoQueue.push(function () { - mayProcessUndoCallback(targetElt, undoCallback) - }) - }, delayInMilliseconds) - - loadingStatesUndoQueue.push(function () { - mayProcessUndoCallback(targetElt, function () { clearTimeout(timeout) }) - }) - } else { - doCallback() - loadingStatesUndoQueue.push(function () { - mayProcessUndoCallback(targetElt, undoCallback) - }) - } - } - - function getLoadingStateElts(loadingScope, type, path) { - return Array.from(htmx.findAll(loadingScope, "[" + type + "]")).filter( - function (elt) { return mayProcessLoadingStateByPath(elt, path) } - ) - } - - function getLoadingTarget(elt) { - if (elt.getAttribute('data-loading-target')) { - return Array.from( - htmx.findAll(elt.getAttribute('data-loading-target')) - ) - } - return [elt] - } - - htmx.defineExtension('loading-states', { - onEvent: function (name, evt) { - if (name === 'htmx:beforeRequest') { - const container = loadingStateContainer(evt.target) - - const loadingStateTypes = [ - 'data-loading', - 'data-loading-class', - 'data-loading-class-remove', - 'data-loading-disable', - 'data-loading-aria-busy', - ] - - let loadingStateEltsByType = {} - - loadingStateTypes.forEach(function (type) { - loadingStateEltsByType[type] = getLoadingStateElts( - container, - type, - evt.detail.pathInfo.requestPath - ) - }) - - loadingStateEltsByType['data-loading'].forEach(function (sourceElt) { - getLoadingTarget(sourceElt).forEach(function (targetElt) { - queueLoadingState( - sourceElt, - targetElt, - function () { - targetElt.style.display = - sourceElt.getAttribute('data-loading') || - 'inline-block' }, - function () { targetElt.style.display = 'none' } - ) - }) - }) - - loadingStateEltsByType['data-loading-class'].forEach( - function (sourceElt) { - const classNames = sourceElt - .getAttribute('data-loading-class') - .split(' ') - - getLoadingTarget(sourceElt).forEach(function (targetElt) { - queueLoadingState( - sourceElt, - targetElt, - function () { - classNames.forEach(function (className) { - targetElt.classList.add(className) - }) - }, - function() { - classNames.forEach(function (className) { - targetElt.classList.remove(className) - }) - } - ) - }) - } - ) - - loadingStateEltsByType['data-loading-class-remove'].forEach( - function (sourceElt) { - const classNames = sourceElt - .getAttribute('data-loading-class-remove') - .split(' ') - - getLoadingTarget(sourceElt).forEach(function (targetElt) { - queueLoadingState( - sourceElt, - targetElt, - function () { - classNames.forEach(function (className) { - targetElt.classList.remove(className) - }) - }, - function() { - classNames.forEach(function (className) { - targetElt.classList.add(className) - }) - } - ) - }) - } - ) - - loadingStateEltsByType['data-loading-disable'].forEach( - function (sourceElt) { - getLoadingTarget(sourceElt).forEach(function (targetElt) { - queueLoadingState( - sourceElt, - targetElt, - function() { targetElt.disabled = true }, - function() { targetElt.disabled = false } - ) - }) - } - ) - - loadingStateEltsByType['data-loading-aria-busy'].forEach( - function (sourceElt) { - getLoadingTarget(sourceElt).forEach(function (targetElt) { - queueLoadingState( - sourceElt, - targetElt, - function () { targetElt.setAttribute("aria-busy", "true") }, - function () { targetElt.removeAttribute("aria-busy") } - ) - }) - } - ) - } - - if (name === 'htmx:beforeOnLoad') { - while (loadingStatesUndoQueue.length > 0) { - loadingStatesUndoQueue.shift()() - } - } - }, - }) -})() diff --git a/web/static/node_modules/htmx.org/dist/ext/method-override.js b/web/static/node_modules/htmx.org/dist/ext/method-override.js deleted file mode 100644 index 2e3504cb..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/method-override.js +++ /dev/null @@ -1,11 +0,0 @@ -htmx.defineExtension('method-override', { - onEvent: function (name, evt) { - if (name === "htmx:configRequest") { - var method = evt.detail.verb; - if (method !== "get" || method !== "post") { - evt.detail.headers['X-HTTP-Method-Override'] = method.toUpperCase(); - evt.detail.verb = "post"; - } - } - } -}); diff --git a/web/static/node_modules/htmx.org/dist/ext/morphdom-swap.js b/web/static/node_modules/htmx.org/dist/ext/morphdom-swap.js deleted file mode 100644 index a1e53ce9..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/morphdom-swap.js +++ /dev/null @@ -1,17 +0,0 @@ -htmx.defineExtension('morphdom-swap', { - isInlineSwap: function(swapStyle) { - return swapStyle === 'morphdom'; - }, - handleSwap: function (swapStyle, target, fragment) { - if (swapStyle === 'morphdom') { - if (fragment.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { - // IE11 doesn't support DocumentFragment.firstElementChild - morphdom(target, fragment.firstElementChild || fragment.firstChild); - return [target]; - } else { - morphdom(target, fragment.outerHTML); - return [target]; - } - } - } -}); diff --git a/web/static/node_modules/htmx.org/dist/ext/multi-swap.js b/web/static/node_modules/htmx.org/dist/ext/multi-swap.js deleted file mode 100644 index f38f5b06..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/multi-swap.js +++ /dev/null @@ -1,45 +0,0 @@ -(function () { - - /** @type {import("../htmx").HtmxInternalApi} */ - var api; - - htmx.defineExtension('multi-swap', { - init: function (apiRef) { - api = apiRef; - }, - isInlineSwap: function (swapStyle) { - return swapStyle.indexOf('multi:') === 0; - }, - handleSwap: function (swapStyle, target, fragment, settleInfo) { - if (swapStyle.indexOf('multi:') === 0) { - var selectorToSwapStyle = {}; - var elements = swapStyle.replace(/^multi\s*:\s*/, '').split(/\s*,\s*/); - - elements.map(function (element) { - var split = element.split(/\s*:\s*/); - var elementSelector = split[0]; - var elementSwapStyle = typeof (split[1]) !== "undefined" ? split[1] : "innerHTML"; - - if (elementSelector.charAt(0) !== '#') { - console.error("HTMX multi-swap: unsupported selector '" + elementSelector + "'. Only ID selectors starting with '#' are supported."); - return; - } - - selectorToSwapStyle[elementSelector] = elementSwapStyle; - }); - - for (var selector in selectorToSwapStyle) { - var swapStyle = selectorToSwapStyle[selector]; - var elementToSwap = fragment.querySelector(selector); - if (elementToSwap) { - api.oobSwap(swapStyle, elementToSwap, settleInfo); - } else { - console.warn("HTMX multi-swap: selector '" + selector + "' not found in source content."); - } - } - - return true; - } - } - }); -})(); \ No newline at end of file diff --git a/web/static/node_modules/htmx.org/dist/ext/path-deps.js b/web/static/node_modules/htmx.org/dist/ext/path-deps.js deleted file mode 100644 index 4987e50e..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/path-deps.js +++ /dev/null @@ -1,60 +0,0 @@ -(function(undefined){ - 'use strict'; - - // Save a reference to the global object (window in the browser) - var _root = this; - - function dependsOn(pathSpec, url) { - if (pathSpec === "ignore") { - return false; - } - var dependencyPath = pathSpec.split("/"); - var urlPath = url.split("/"); - for (var i = 0; i < urlPath.length; i++) { - var dependencyElement = dependencyPath.shift(); - var pathElement = urlPath[i]; - if (dependencyElement !== pathElement && dependencyElement !== "*") { - return false; - } - if (dependencyPath.length === 0 || (dependencyPath.length === 1 && dependencyPath[0] === "")) { - return true; - } - } - return false; - } - - function refreshPath(path) { - var eltsWithDeps = htmx.findAll("[path-deps]"); - for (var i = 0; i < eltsWithDeps.length; i++) { - var elt = eltsWithDeps[i]; - if (dependsOn(elt.getAttribute('path-deps'), path)) { - htmx.trigger(elt, "path-deps"); - } - } - } - - htmx.defineExtension('path-deps', { - onEvent: function (name, evt) { - if (name === "htmx:beforeOnLoad") { - var config = evt.detail.requestConfig; - // mutating call - if (config.verb !== "get" && evt.target.getAttribute('path-deps') !== 'ignore') { - refreshPath(config.path); - } - } - } - }); - - /** - * ******************** - * Expose functionality - * ******************** - */ - - _root.PathDeps = { - refresh: function(path) { - refreshPath(path); - } - }; - -}).call(this); diff --git a/web/static/node_modules/htmx.org/dist/ext/path-params.js b/web/static/node_modules/htmx.org/dist/ext/path-params.js deleted file mode 100644 index e251b892..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/path-params.js +++ /dev/null @@ -1,11 +0,0 @@ -htmx.defineExtension('path-params', { - onEvent: function(name, evt) { - if (name === "htmx:configRequest") { - evt.detail.path = evt.detail.path.replace(/{([^}]+)}/g, function (_, param) { - var val = evt.detail.parameters[param]; - delete evt.detail.parameters[param]; - return val === undefined ? "{" + param + "}" : encodeURIComponent(val); - }) - } - } -}); \ No newline at end of file diff --git a/web/static/node_modules/htmx.org/dist/ext/preload.js b/web/static/node_modules/htmx.org/dist/ext/preload.js deleted file mode 100644 index a7493703..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/preload.js +++ /dev/null @@ -1,147 +0,0 @@ -// This adds the "preload" extension to htmx. By default, this will -// preload the targets of any tags with `href` or `hx-get` attributes -// if they also have a `preload` attribute as well. See documentation -// for more details -htmx.defineExtension("preload", { - - onEvent: function(name, event) { - - // Only take actions on "htmx:afterProcessNode" - if (name !== "htmx:afterProcessNode") { - return; - } - - // SOME HELPER FUNCTIONS WE'LL NEED ALONG THE WAY - - // attr gets the closest non-empty value from the attribute. - var attr = function(node, property) { - if (node == undefined) {return undefined;} - return node.getAttribute(property) || node.getAttribute("data-" + property) || attr(node.parentElement, property) - } - - // load handles the actual HTTP fetch, and uses htmx.ajax in cases where we're - // preloading an htmx resource (this sends the same HTTP headers as a regular htmx request) - var load = function(node) { - - // Called after a successful AJAX request, to mark the - // content as loaded (and prevent additional AJAX calls.) - var done = function(html) { - if (!node.preloadAlways) { - node.preloadState = "DONE" - } - - if (attr(node, "preload-images") == "true") { - document.createElement("div").innerHTML = html // create and populate a node to load linked resources, too. - } - } - - return function() { - - // If this value has already been loaded, then do not try again. - if (node.preloadState !== "READY") { - return; - } - - // Special handling for HX-GET - use built-in htmx.ajax function - // so that headers match other htmx requests, then set - // node.preloadState = TRUE so that requests are not duplicated - // in the future - var hxGet = node.getAttribute("hx-get") || node.getAttribute("data-hx-get") - if (hxGet) { - htmx.ajax("GET", hxGet, { - source: node, - handler:function(elt, info) { - done(info.xhr.responseText); - } - }); - return; - } - - // Otherwise, perform a standard xhr request, then set - // node.preloadState = TRUE so that requests are not duplicated - // in the future. - if (node.getAttribute("href")) { - var r = new XMLHttpRequest(); - r.open("GET", node.getAttribute("href")); - r.onload = function() {done(r.responseText);}; - r.send(); - return; - } - } - } - - // This function processes a specific node and sets up event handlers. - // We'll search for nodes and use it below. - var init = function(node) { - - // If this node DOES NOT include a "GET" transaction, then there's nothing to do here. - if (node.getAttribute("href") + node.getAttribute("hx-get") + node.getAttribute("data-hx-get") == "") { - return; - } - - // Guarantee that we only initialize each node once. - if (node.preloadState !== undefined) { - return; - } - - // Get event name from config. - var on = attr(node, "preload") || "mousedown" - const always = on.indexOf("always") !== -1 - if (always) { - on = on.replace('always', '').trim() - } - - // FALL THROUGH to here means we need to add an EventListener - - // Apply the listener to the node - node.addEventListener(on, function(evt) { - if (node.preloadState === "PAUSE") { // Only add one event listener - node.preloadState = "READY"; // Required for the `load` function to trigger - - // Special handling for "mouseover" events. Wait 100ms before triggering load. - if (on === "mouseover") { - window.setTimeout(load(node), 100); - } else { - load(node)() // all other events trigger immediately. - } - } - }) - - // Special handling for certain built-in event handlers - switch (on) { - - case "mouseover": - // Mirror `touchstart` events (fires immediately) - node.addEventListener("touchstart", load(node)); - - // WHhen the mouse leaves, immediately disable the preload - node.addEventListener("mouseout", function(evt) { - if ((evt.target === node) && (node.preloadState === "READY")) { - node.preloadState = "PAUSE"; - } - }) - break; - - case "mousedown": - // Mirror `touchstart` events (fires immediately) - node.addEventListener("touchstart", load(node)); - break; - } - - // Mark the node as ready to run. - node.preloadState = "PAUSE"; - node.preloadAlways = always; - htmx.trigger(node, "preload:init") // This event can be used to load content immediately. - } - - // Search for all child nodes that have a "preload" attribute - event.target.querySelectorAll("[preload]").forEach(function(node) { - - // Initialize the node with the "preload" attribute - init(node) - - // Initialize all child elements that are anchors or have `hx-get` (use with care) - node.querySelectorAll("a,[hx-get],[data-hx-get]").forEach(init) - }) - } -}) diff --git a/web/static/node_modules/htmx.org/dist/ext/rails-method.js b/web/static/node_modules/htmx.org/dist/ext/rails-method.js deleted file mode 100644 index 5d48eccc..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/rails-method.js +++ /dev/null @@ -1,10 +0,0 @@ -htmx.defineExtension('rails-method', { - onEvent: function (name, evt) { - if (name === "configRequest.htmx") { - var methodOverride = evt.detail.headers['X-HTTP-Method-Override']; - if (methodOverride) { - evt.detail.parameters['_method'] = methodOverride; - } - } - } -}); diff --git a/web/static/node_modules/htmx.org/dist/ext/remove-me.js b/web/static/node_modules/htmx.org/dist/ext/remove-me.js deleted file mode 100644 index 42be9932..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/remove-me.js +++ /dev/null @@ -1,27 +0,0 @@ -(function(){ - function maybeRemoveMe(elt) { - var timing = elt.getAttribute("remove-me") || elt.getAttribute("data-remove-me"); - if (timing) { - setTimeout(function () { - elt.parentElement.removeChild(elt); - }, htmx.parseInterval(timing)); - } - } - - htmx.defineExtension('remove-me', { - onEvent: function (name, evt) { - if (name === "htmx:afterProcessNode") { - var elt = evt.detail.elt; - if (elt.getAttribute) { - maybeRemoveMe(elt); - if (elt.querySelectorAll) { - var children = elt.querySelectorAll("[remove-me], [data-remove-me]"); - for (var i = 0; i < children.length; i++) { - maybeRemoveMe(children[i]); - } - } - } - } - } - }); -})(); diff --git a/web/static/node_modules/htmx.org/dist/ext/response-targets.js b/web/static/node_modules/htmx.org/dist/ext/response-targets.js deleted file mode 100644 index dd6fd418..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/response-targets.js +++ /dev/null @@ -1,130 +0,0 @@ -(function(){ - - /** @type {import("../htmx").HtmxInternalApi} */ - var api; - - var attrPrefix = 'hx-target-'; - - // IE11 doesn't support string.startsWith - function startsWith(str, prefix) { - return str.substring(0, prefix.length) === prefix - } - - /** - * @param {HTMLElement} elt - * @param {number} respCode - * @returns {HTMLElement | null} - */ - function getRespCodeTarget(elt, respCodeNumber) { - if (!elt || !respCodeNumber) return null; - - var respCode = respCodeNumber.toString(); - - // '*' is the original syntax, as the obvious character for a wildcard. - // The 'x' alternative was added for maximum compatibility with HTML - // templating engines, due to ambiguity around which characters are - // supported in HTML attributes. - // - // Start with the most specific possible attribute and generalize from - // there. - var attrPossibilities = [ - respCode, - - respCode.substr(0, 2) + '*', - respCode.substr(0, 2) + 'x', - - respCode.substr(0, 1) + '*', - respCode.substr(0, 1) + 'x', - respCode.substr(0, 1) + '**', - respCode.substr(0, 1) + 'xx', - - '*', - 'x', - '***', - 'xxx', - ]; - if (startsWith(respCode, '4') || startsWith(respCode, '5')) { - attrPossibilities.push('error'); - } - - for (var i = 0; i < attrPossibilities.length; i++) { - var attr = attrPrefix + attrPossibilities[i]; - var attrValue = api.getClosestAttributeValue(elt, attr); - if (attrValue) { - if (attrValue === "this") { - return api.findThisElement(elt, attr); - } else { - return api.querySelectorExt(elt, attrValue); - } - } - } - - return null; - } - - /** @param {Event} evt */ - function handleErrorFlag(evt) { - if (evt.detail.isError) { - if (htmx.config.responseTargetUnsetsError) { - evt.detail.isError = false; - } - } else if (htmx.config.responseTargetSetsError) { - evt.detail.isError = true; - } - } - - htmx.defineExtension('response-targets', { - - /** @param {import("../htmx").HtmxInternalApi} apiRef */ - init: function (apiRef) { - api = apiRef; - - if (htmx.config.responseTargetUnsetsError === undefined) { - htmx.config.responseTargetUnsetsError = true; - } - if (htmx.config.responseTargetSetsError === undefined) { - htmx.config.responseTargetSetsError = false; - } - if (htmx.config.responseTargetPrefersExisting === undefined) { - htmx.config.responseTargetPrefersExisting = false; - } - if (htmx.config.responseTargetPrefersRetargetHeader === undefined) { - htmx.config.responseTargetPrefersRetargetHeader = true; - } - }, - - /** - * @param {string} name - * @param {Event} evt - */ - onEvent: function (name, evt) { - if (name === "htmx:beforeSwap" && - evt.detail.xhr && - evt.detail.xhr.status !== 200) { - if (evt.detail.target) { - if (htmx.config.responseTargetPrefersExisting) { - evt.detail.shouldSwap = true; - handleErrorFlag(evt); - return true; - } - if (htmx.config.responseTargetPrefersRetargetHeader && - evt.detail.xhr.getAllResponseHeaders().match(/HX-Retarget:/i)) { - evt.detail.shouldSwap = true; - handleErrorFlag(evt); - return true; - } - } - if (!evt.detail.requestConfig) { - return true; - } - var target = getRespCodeTarget(evt.detail.requestConfig.elt, evt.detail.xhr.status); - if (target) { - handleErrorFlag(evt); - evt.detail.shouldSwap = true; - evt.detail.target = target; - } - return true; - } - } - }); -})(); diff --git a/web/static/node_modules/htmx.org/dist/ext/restored.js b/web/static/node_modules/htmx.org/dist/ext/restored.js deleted file mode 100644 index 6f65267c..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/restored.js +++ /dev/null @@ -1,15 +0,0 @@ -htmx.defineExtension('restored', { - onEvent : function(name, evt) { - if (name === 'htmx:restored'){ - var restoredElts = evt.detail.document.querySelectorAll( - "[hx-trigger='restored'],[data-hx-trigger='restored']" - ); - // need a better way to do this, would prefer to just trigger from evt.detail.elt - var foundElt = Array.from(restoredElts).find( - (x) => (x.outerHTML === evt.detail.elt.outerHTML) - ); - var restoredEvent = evt.detail.triggerEvent(foundElt, 'restored'); - } - return; - } -}) \ No newline at end of file diff --git a/web/static/node_modules/htmx.org/dist/ext/sse.js b/web/static/node_modules/htmx.org/dist/ext/sse.js deleted file mode 100644 index 28c4dd32..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/sse.js +++ /dev/null @@ -1,369 +0,0 @@ -/* -Server Sent Events Extension -============================ -This extension adds support for Server Sent Events to htmx. See /www/extensions/sse.md for usage instructions. - -*/ - -(function() { - - /** @type {import("../htmx").HtmxInternalApi} */ - var api; - - htmx.defineExtension("sse", { - - /** - * Init saves the provided reference to the internal HTMX API. - * - * @param {import("../htmx").HtmxInternalApi} api - * @returns void - */ - init: function(apiRef) { - // store a reference to the internal API. - api = apiRef; - - // set a function in the public API for creating new EventSource objects - if (htmx.createEventSource == undefined) { - htmx.createEventSource = createEventSource; - } - }, - - /** - * onEvent handles all events passed to this extension. - * - * @param {string} name - * @param {Event} evt - * @returns void - */ - onEvent: function(name, evt) { - - var parent = evt.target || evt.detail.elt; - switch (name) { - - case "htmx:beforeCleanupElement": - var internalData = api.getInternalData(parent) - // Try to remove remove an EventSource when elements are removed - if (internalData.sseEventSource) { - internalData.sseEventSource.close(); - } - - return; - - // Try to create EventSources when elements are processed - case "htmx:afterProcessNode": - ensureEventSourceOnElement(parent); - } - } - }); - - /////////////////////////////////////////////// - // HELPER FUNCTIONS - /////////////////////////////////////////////// - - - /** - * createEventSource is the default method for creating new EventSource objects. - * it is hoisted into htmx.config.createEventSource to be overridden by the user, if needed. - * - * @param {string} url - * @returns EventSource - */ - function createEventSource(url) { - return new EventSource(url, { withCredentials: true }); - } - - function splitOnWhitespace(trigger) { - return trigger.trim().split(/\s+/); - } - - function getLegacySSEURL(elt) { - var legacySSEValue = api.getAttributeValue(elt, "hx-sse"); - if (legacySSEValue) { - var values = splitOnWhitespace(legacySSEValue); - for (var i = 0; i < values.length; i++) { - var value = values[i].split(/:(.+)/); - if (value[0] === "connect") { - return value[1]; - } - } - } - } - - function getLegacySSESwaps(elt) { - var legacySSEValue = api.getAttributeValue(elt, "hx-sse"); - var returnArr = []; - if (legacySSEValue != null) { - var values = splitOnWhitespace(legacySSEValue); - for (var i = 0; i < values.length; i++) { - var value = values[i].split(/:(.+)/); - if (value[0] === "swap") { - returnArr.push(value[1]); - } - } - } - return returnArr; - } - - /** - * registerSSE looks for attributes that can contain sse events, right - * now hx-trigger and sse-swap and adds listeners based on these attributes too - * the closest event source - * - * @param {HTMLElement} elt - */ - function registerSSE(elt) { - // Add message handlers for every `sse-swap` attribute - queryAttributeOnThisOrChildren(elt, "sse-swap").forEach(function (child) { - // Find closest existing event source - var sourceElement = api.getClosestMatch(child, hasEventSource); - if (sourceElement == null) { - // api.triggerErrorEvent(elt, "htmx:noSSESourceError") - return null; // no eventsource in parentage, orphaned element - } - - // Set internalData and source - var internalData = api.getInternalData(sourceElement); - var source = internalData.sseEventSource; - - var sseSwapAttr = api.getAttributeValue(child, "sse-swap"); - if (sseSwapAttr) { - var sseEventNames = sseSwapAttr.split(","); - } else { - var sseEventNames = getLegacySSESwaps(child); - } - - for (var i = 0; i < sseEventNames.length; i++) { - var sseEventName = sseEventNames[i].trim(); - var listener = function(event) { - - // If the source is missing then close SSE - if (maybeCloseSSESource(sourceElement)) { - return; - } - - // If the body no longer contains the element, remove the listener - if (!api.bodyContains(child)) { - source.removeEventListener(sseEventName, listener); - return; - } - - // swap the response into the DOM and trigger a notification - if(!api.triggerEvent(elt, "htmx:sseBeforeMessage", event)) { - return; - } - swap(child, event.data); - api.triggerEvent(elt, "htmx:sseMessage", event); - }; - - // Register the new listener - api.getInternalData(child).sseEventListener = listener; - source.addEventListener(sseEventName, listener); - } - }); - - // Add message handlers for every `hx-trigger="sse:*"` attribute - queryAttributeOnThisOrChildren(elt, "hx-trigger").forEach(function(child) { - // Find closest existing event source - var sourceElement = api.getClosestMatch(child, hasEventSource); - if (sourceElement == null) { - // api.triggerErrorEvent(elt, "htmx:noSSESourceError") - return null; // no eventsource in parentage, orphaned element - } - - // Set internalData and source - var internalData = api.getInternalData(sourceElement); - var source = internalData.sseEventSource; - - var sseEventName = api.getAttributeValue(child, "hx-trigger"); - if (sseEventName == null) { - return; - } - - // Only process hx-triggers for events with the "sse:" prefix - if (sseEventName.slice(0, 4) != "sse:") { - return; - } - - // remove the sse: prefix from here on out - sseEventName = sseEventName.substr(4); - - var listener = function() { - if (maybeCloseSSESource(sourceElement)) { - return - } - - if (!api.bodyContains(child)) { - source.removeEventListener(sseEventName, listener); - } - } - }); - } - - /** - * ensureEventSourceOnElement creates a new EventSource connection on the provided element. - * If a usable EventSource already exists, then it is returned. If not, then a new EventSource - * is created and stored in the element's internalData. - * @param {HTMLElement} elt - * @param {number} retryCount - * @returns {EventSource | null} - */ - function ensureEventSourceOnElement(elt, retryCount) { - - if (elt == null) { - return null; - } - - // handle extension source creation attribute - queryAttributeOnThisOrChildren(elt, "sse-connect").forEach(function(child) { - var sseURL = api.getAttributeValue(child, "sse-connect"); - if (sseURL == null) { - return; - } - - ensureEventSource(child, sseURL, retryCount); - }); - - // handle legacy sse, remove for HTMX2 - queryAttributeOnThisOrChildren(elt, "hx-sse").forEach(function(child) { - var sseURL = getLegacySSEURL(child); - if (sseURL == null) { - return; - } - - ensureEventSource(child, sseURL, retryCount); - }); - - registerSSE(elt); - } - - function ensureEventSource(elt, url, retryCount) { - var source = htmx.createEventSource(url); - - source.onerror = function(err) { - - // Log an error event - api.triggerErrorEvent(elt, "htmx:sseError", { error: err, source: source }); - - // If parent no longer exists in the document, then clean up this EventSource - if (maybeCloseSSESource(elt)) { - return; - } - - // Otherwise, try to reconnect the EventSource - if (source.readyState === EventSource.CLOSED) { - retryCount = retryCount || 0; - var timeout = Math.random() * (2 ^ retryCount) * 500; - window.setTimeout(function() { - ensureEventSourceOnElement(elt, Math.min(7, retryCount + 1)); - }, timeout); - } - }; - - source.onopen = function(evt) { - api.triggerEvent(elt, "htmx:sseOpen", { source: source }); - } - - api.getInternalData(elt).sseEventSource = source; - } - - /** - * maybeCloseSSESource confirms that the parent element still exists. - * If not, then any associated SSE source is closed and the function returns true. - * - * @param {HTMLElement} elt - * @returns boolean - */ - function maybeCloseSSESource(elt) { - if (!api.bodyContains(elt)) { - var source = api.getInternalData(elt).sseEventSource; - if (source != undefined) { - source.close(); - // source = null - return true; - } - } - return false; - } - - /** - * queryAttributeOnThisOrChildren returns all nodes that contain the requested attributeName, INCLUDING THE PROVIDED ROOT ELEMENT. - * - * @param {HTMLElement} elt - * @param {string} attributeName - */ - function queryAttributeOnThisOrChildren(elt, attributeName) { - - var result = []; - - // If the parent element also contains the requested attribute, then add it to the results too. - if (api.hasAttribute(elt, attributeName)) { - result.push(elt); - } - - // Search all child nodes that match the requested attribute - elt.querySelectorAll("[" + attributeName + "], [data-" + attributeName + "]").forEach(function(node) { - result.push(node); - }); - - return result; - } - - /** - * @param {HTMLElement} elt - * @param {string} content - */ - function swap(elt, content) { - - api.withExtensions(elt, function(extension) { - content = extension.transformResponse(content, null, elt); - }); - - var swapSpec = api.getSwapSpecification(elt); - var target = api.getTarget(elt); - var settleInfo = api.makeSettleInfo(elt); - - api.selectAndSwap(swapSpec.swapStyle, target, elt, content, settleInfo); - - settleInfo.elts.forEach(function(elt) { - if (elt.classList) { - elt.classList.add(htmx.config.settlingClass); - } - api.triggerEvent(elt, 'htmx:beforeSettle'); - }); - - // Handle settle tasks (with delay if requested) - if (swapSpec.settleDelay > 0) { - setTimeout(doSettle(settleInfo), swapSpec.settleDelay); - } else { - doSettle(settleInfo)(); - } - } - - /** - * doSettle mirrors much of the functionality in htmx that - * settles elements after their content has been swapped. - * TODO: this should be published by htmx, and not duplicated here - * @param {import("../htmx").HtmxSettleInfo} settleInfo - * @returns () => void - */ - function doSettle(settleInfo) { - - return function() { - settleInfo.tasks.forEach(function(task) { - task.call(); - }); - - settleInfo.elts.forEach(function(elt) { - if (elt.classList) { - elt.classList.remove(htmx.config.settlingClass); - } - api.triggerEvent(elt, 'htmx:afterSettle'); - }); - } - } - - function hasEventSource(node) { - return api.getInternalData(node).sseEventSource != null; - } - -})(); diff --git a/web/static/node_modules/htmx.org/dist/ext/ws.js b/web/static/node_modules/htmx.org/dist/ext/ws.js deleted file mode 100644 index c1e29620..00000000 --- a/web/static/node_modules/htmx.org/dist/ext/ws.js +++ /dev/null @@ -1,476 +0,0 @@ -/* -WebSockets Extension -============================ -This extension adds support for WebSockets to htmx. See /www/extensions/ws.md for usage instructions. -*/ - -(function () { - - /** @type {import("../htmx").HtmxInternalApi} */ - var api; - - htmx.defineExtension("ws", { - - /** - * init is called once, when this extension is first registered. - * @param {import("../htmx").HtmxInternalApi} apiRef - */ - init: function (apiRef) { - - // Store reference to internal API - api = apiRef; - - // Default function for creating new EventSource objects - if (!htmx.createWebSocket) { - htmx.createWebSocket = createWebSocket; - } - - // Default setting for reconnect delay - if (!htmx.config.wsReconnectDelay) { - htmx.config.wsReconnectDelay = "full-jitter"; - } - }, - - /** - * onEvent handles all events passed to this extension. - * - * @param {string} name - * @param {Event} evt - */ - onEvent: function (name, evt) { - var parent = evt.target || evt.detail.elt; - - switch (name) { - - // Try to close the socket when elements are removed - case "htmx:beforeCleanupElement": - - var internalData = api.getInternalData(parent) - - if (internalData.webSocket) { - internalData.webSocket.close(); - } - return; - - // Try to create websockets when elements are processed - case "htmx:beforeProcessNode": - forEach(queryAttributeOnThisOrChildren(parent, "ws-connect"), function (child) { - ensureWebSocket(child) - }); - forEach(queryAttributeOnThisOrChildren(parent, "ws-send"), function (child) { - ensureWebSocketSend(child) - }); - } - } - }); - - function splitOnWhitespace(trigger) { - return trigger.trim().split(/\s+/); - } - - function getLegacyWebsocketURL(elt) { - var legacySSEValue = api.getAttributeValue(elt, "hx-ws"); - if (legacySSEValue) { - var values = splitOnWhitespace(legacySSEValue); - for (var i = 0; i < values.length; i++) { - var value = values[i].split(/:(.+)/); - if (value[0] === "connect") { - return value[1]; - } - } - } - } - - /** - * ensureWebSocket creates a new WebSocket on the designated element, using - * the element's "ws-connect" attribute. - * @param {HTMLElement} socketElt - * @returns - */ - function ensureWebSocket(socketElt) { - - // If the element containing the WebSocket connection no longer exists, then - // do not connect/reconnect the WebSocket. - if (!api.bodyContains(socketElt)) { - return; - } - - // Get the source straight from the element's value - var wssSource = api.getAttributeValue(socketElt, "ws-connect") - - if (wssSource == null || wssSource === "") { - var legacySource = getLegacyWebsocketURL(socketElt); - if (legacySource == null) { - return; - } else { - wssSource = legacySource; - } - } - - // Guarantee that the wssSource value is a fully qualified URL - if (wssSource.indexOf("/") === 0) { - var base_part = location.hostname + (location.port ? ':' + location.port : ''); - if (location.protocol === 'https:') { - wssSource = "wss://" + base_part + wssSource; - } else if (location.protocol === 'http:') { - wssSource = "ws://" + base_part + wssSource; - } - } - - var socketWrapper = createWebsocketWrapper(socketElt, function () { - return htmx.createWebSocket(wssSource) - }); - - socketWrapper.addEventListener('message', function (event) { - if (maybeCloseWebSocketSource(socketElt)) { - return; - } - - var response = event.data; - if (!api.triggerEvent(socketElt, "htmx:wsBeforeMessage", { - message: response, - socketWrapper: socketWrapper.publicInterface - })) { - return; - } - - api.withExtensions(socketElt, function (extension) { - response = extension.transformResponse(response, null, socketElt); - }); - - var settleInfo = api.makeSettleInfo(socketElt); - var fragment = api.makeFragment(response); - - if (fragment.children.length) { - var children = Array.from(fragment.children); - for (var i = 0; i < children.length; i++) { - api.oobSwap(api.getAttributeValue(children[i], "hx-swap-oob") || "true", children[i], settleInfo); - } - } - - api.settleImmediately(settleInfo.tasks); - api.triggerEvent(socketElt, "htmx:wsAfterMessage", { message: response, socketWrapper: socketWrapper.publicInterface }) - }); - - // Put the WebSocket into the HTML Element's custom data. - api.getInternalData(socketElt).webSocket = socketWrapper; - } - - /** - * @typedef {Object} WebSocketWrapper - * @property {WebSocket} socket - * @property {Array<{message: string, sendElt: Element}>} messageQueue - * @property {number} retryCount - * @property {(message: string, sendElt: Element) => void} sendImmediately sendImmediately sends message regardless of websocket connection state - * @property {(message: string, sendElt: Element) => void} send - * @property {(event: string, handler: Function) => void} addEventListener - * @property {() => void} handleQueuedMessages - * @property {() => void} init - * @property {() => void} close - */ - /** - * - * @param socketElt - * @param socketFunc - * @returns {WebSocketWrapper} - */ - function createWebsocketWrapper(socketElt, socketFunc) { - var wrapper = { - socket: null, - messageQueue: [], - retryCount: 0, - - /** @type {Object} */ - events: {}, - - addEventListener: function (event, handler) { - if (this.socket) { - this.socket.addEventListener(event, handler); - } - - if (!this.events[event]) { - this.events[event] = []; - } - - this.events[event].push(handler); - }, - - sendImmediately: function (message, sendElt) { - if (!this.socket) { - api.triggerErrorEvent() - } - if (!sendElt || api.triggerEvent(sendElt, 'htmx:wsBeforeSend', { - message: message, - socketWrapper: this.publicInterface - })) { - this.socket.send(message); - sendElt && api.triggerEvent(sendElt, 'htmx:wsAfterSend', { - message: message, - socketWrapper: this.publicInterface - }) - } - }, - - send: function (message, sendElt) { - if (this.socket.readyState !== this.socket.OPEN) { - this.messageQueue.push({ message: message, sendElt: sendElt }); - } else { - this.sendImmediately(message, sendElt); - } - }, - - handleQueuedMessages: function () { - while (this.messageQueue.length > 0) { - var queuedItem = this.messageQueue[0] - if (this.socket.readyState === this.socket.OPEN) { - this.sendImmediately(queuedItem.message, queuedItem.sendElt); - this.messageQueue.shift(); - } else { - break; - } - } - }, - - init: function () { - if (this.socket && this.socket.readyState === this.socket.OPEN) { - // Close discarded socket - this.socket.close() - } - - // Create a new WebSocket and event handlers - /** @type {WebSocket} */ - var socket = socketFunc(); - - // The event.type detail is added for interface conformance with the - // other two lifecycle events (open and close) so a single handler method - // can handle them polymorphically, if required. - api.triggerEvent(socketElt, "htmx:wsConnecting", { event: { type: 'connecting' } }); - - this.socket = socket; - - socket.onopen = function (e) { - wrapper.retryCount = 0; - api.triggerEvent(socketElt, "htmx:wsOpen", { event: e, socketWrapper: wrapper.publicInterface }); - wrapper.handleQueuedMessages(); - } - - socket.onclose = function (e) { - // If socket should not be connected, stop further attempts to establish connection - // If Abnormal Closure/Service Restart/Try Again Later, then set a timer to reconnect after a pause. - if (!maybeCloseWebSocketSource(socketElt) && [1006, 1012, 1013].indexOf(e.code) >= 0) { - var delay = getWebSocketReconnectDelay(wrapper.retryCount); - setTimeout(function () { - wrapper.retryCount += 1; - wrapper.init(); - }, delay); - } - - // Notify client code that connection has been closed. Client code can inspect `event` field - // to determine whether closure has been valid or abnormal - api.triggerEvent(socketElt, "htmx:wsClose", { event: e, socketWrapper: wrapper.publicInterface }) - }; - - socket.onerror = function (e) { - api.triggerErrorEvent(socketElt, "htmx:wsError", { error: e, socketWrapper: wrapper }); - maybeCloseWebSocketSource(socketElt); - }; - - var events = this.events; - Object.keys(events).forEach(function (k) { - events[k].forEach(function (e) { - socket.addEventListener(k, e); - }) - }); - }, - - close: function () { - this.socket.close() - } - } - - wrapper.init(); - - wrapper.publicInterface = { - send: wrapper.send.bind(wrapper), - sendImmediately: wrapper.sendImmediately.bind(wrapper), - queue: wrapper.messageQueue - }; - - return wrapper; - } - - /** - * ensureWebSocketSend attaches trigger handles to elements with - * "ws-send" attribute - * @param {HTMLElement} elt - */ - function ensureWebSocketSend(elt) { - var legacyAttribute = api.getAttributeValue(elt, "hx-ws"); - if (legacyAttribute && legacyAttribute !== 'send') { - return; - } - - var webSocketParent = api.getClosestMatch(elt, hasWebSocket) - processWebSocketSend(webSocketParent, elt); - } - - /** - * hasWebSocket function checks if a node has webSocket instance attached - * @param {HTMLElement} node - * @returns {boolean} - */ - function hasWebSocket(node) { - return api.getInternalData(node).webSocket != null; - } - - /** - * processWebSocketSend adds event listeners to the element so that - * messages can be sent to the WebSocket server when the form is submitted. - * @param {HTMLElement} socketElt - * @param {HTMLElement} sendElt - */ - function processWebSocketSend(socketElt, sendElt) { - var nodeData = api.getInternalData(sendElt); - var triggerSpecs = api.getTriggerSpecs(sendElt); - triggerSpecs.forEach(function (ts) { - api.addTriggerHandler(sendElt, ts, nodeData, function (elt, evt) { - if (maybeCloseWebSocketSource(socketElt)) { - return; - } - - /** @type {WebSocketWrapper} */ - var socketWrapper = api.getInternalData(socketElt).webSocket; - var headers = api.getHeaders(sendElt, api.getTarget(sendElt)); - var results = api.getInputValues(sendElt, 'post'); - var errors = results.errors; - var rawParameters = results.values; - var expressionVars = api.getExpressionVars(sendElt); - var allParameters = api.mergeObjects(rawParameters, expressionVars); - var filteredParameters = api.filterValues(allParameters, sendElt); - - var sendConfig = { - parameters: filteredParameters, - unfilteredParameters: allParameters, - headers: headers, - errors: errors, - - triggeringEvent: evt, - messageBody: undefined, - socketWrapper: socketWrapper.publicInterface - }; - - if (!api.triggerEvent(elt, 'htmx:wsConfigSend', sendConfig)) { - return; - } - - if (errors && errors.length > 0) { - api.triggerEvent(elt, 'htmx:validation:halted', errors); - return; - } - - var body = sendConfig.messageBody; - if (body === undefined) { - var toSend = Object.assign({}, sendConfig.parameters); - if (sendConfig.headers) - toSend['HEADERS'] = headers; - body = JSON.stringify(toSend); - } - - socketWrapper.send(body, elt); - - if (evt && api.shouldCancel(evt, elt)) { - evt.preventDefault(); - } - }); - }); - } - - /** - * getWebSocketReconnectDelay is the default easing function for WebSocket reconnects. - * @param {number} retryCount // The number of retries that have already taken place - * @returns {number} - */ - function getWebSocketReconnectDelay(retryCount) { - - /** @type {"full-jitter" | ((retryCount:number) => number)} */ - var delay = htmx.config.wsReconnectDelay; - if (typeof delay === 'function') { - return delay(retryCount); - } - if (delay === 'full-jitter') { - var exp = Math.min(retryCount, 6); - var maxDelay = 1000 * Math.pow(2, exp); - return maxDelay * Math.random(); - } - - logError('htmx.config.wsReconnectDelay must either be a function or the string "full-jitter"'); - } - - /** - * maybeCloseWebSocketSource checks to the if the element that created the WebSocket - * still exists in the DOM. If NOT, then the WebSocket is closed and this function - * returns TRUE. If the element DOES EXIST, then no action is taken, and this function - * returns FALSE. - * - * @param {*} elt - * @returns - */ - function maybeCloseWebSocketSource(elt) { - if (!api.bodyContains(elt)) { - api.getInternalData(elt).webSocket.close(); - return true; - } - return false; - } - - /** - * createWebSocket is the default method for creating new WebSocket objects. - * it is hoisted into htmx.createWebSocket to be overridden by the user, if needed. - * - * @param {string} url - * @returns WebSocket - */ - function createWebSocket(url) { - var sock = new WebSocket(url, []); - sock.binaryType = htmx.config.wsBinaryType; - return sock; - } - - /** - * queryAttributeOnThisOrChildren returns all nodes that contain the requested attributeName, INCLUDING THE PROVIDED ROOT ELEMENT. - * - * @param {HTMLElement} elt - * @param {string} attributeName - */ - function queryAttributeOnThisOrChildren(elt, attributeName) { - - var result = [] - - // If the parent element also contains the requested attribute, then add it to the results too. - if (api.hasAttribute(elt, attributeName) || api.hasAttribute(elt, "hx-ws")) { - result.push(elt); - } - - // Search all child nodes that match the requested attribute - elt.querySelectorAll("[" + attributeName + "], [data-" + attributeName + "], [data-hx-ws], [hx-ws]").forEach(function (node) { - result.push(node) - }) - - return result - } - - /** - * @template T - * @param {T[]} arr - * @param {(T) => void} func - */ - function forEach(arr, func) { - if (arr) { - for (var i = 0; i < arr.length; i++) { - func(arr[i]); - } - } - } - -})(); - diff --git a/web/static/node_modules/htmx.org/dist/htmx.d.ts b/web/static/node_modules/htmx.org/dist/htmx.d.ts deleted file mode 100644 index a545692e..00000000 --- a/web/static/node_modules/htmx.org/dist/htmx.d.ts +++ /dev/null @@ -1,487 +0,0 @@ -// https://htmx.org/reference/#api - -/** - * This method adds a class to the given element. - * - * https://htmx.org/api/#addClass - * - * @param elt the element to add the class to - * @param clazz the class to add - * @param delay the delay (in milliseconds before class is added) - */ -export function addClass(elt: Element, clazz: string, delay?: number): void; - -/** - * Issues an htmx-style AJAX request - * - * https://htmx.org/api/#ajax - * - * @param verb 'GET', 'POST', etc. - * @param path the URL path to make the AJAX - * @param element the element to target (defaults to the **body**) - * @returns Promise that resolves immediately if no request is sent, or when the request is complete - */ -export function ajax(verb: string, path: string, element?: Element): Promise; - -/** - * Issues an htmx-style AJAX request - * - * https://htmx.org/api/#ajax - * - * @param verb 'GET', 'POST', etc. - * @param path the URL path to make the AJAX - * @param selector a selector for the target - * @returns Promise that resolves immediately if no request is sent, or when the request is complete - */ -export function ajax(verb: string, path: string, selector: string): Promise; - -/** - * Issues an htmx-style AJAX request - * - * https://htmx.org/api/#ajax - * - * @param verb 'GET', 'POST', etc. - * @param path the URL path to make the AJAX - * @param context a context object that contains any of the following - * @returns Promise that resolves immediately if no request is sent, or when the request is complete - */ -export function ajax( - verb: string, - path: string, - context: Partial<{ source: any; event: any; handler: any; target: any; swap: any; values: any; headers: any; select: any }> -): Promise; - -/** - * Finds the closest matching element in the given elements parentage, inclusive of the element - * - * https://htmx.org/api/#closest - * - * @param elt the element to find the selector from - * @param selector the selector to find - */ -export function closest(elt: Element, selector: string): Element | null; - -/** - * A property holding the configuration htmx uses at runtime. - * - * Note that using a [meta tag](https://htmx.org/docs/#config) is the preferred mechanism for setting these properties. - * - * https://htmx.org/api/#config - */ -export var config: HtmxConfig; - -/** - * A property used to create new [Server Sent Event](https://htmx.org/docs/#sse) sources. This can be updated to provide custom SSE setup. - * - * https://htmx.org/api/#createEventSource - */ -export var createEventSource: (url: string) => EventSource; - -/** - * A property used to create new [WebSocket](https://htmx.org/docs/#websockets). This can be updated to provide custom WebSocket setup. - * - * https://htmx.org/api/#createWebSocket - */ -export var createWebSocket: (url: string) => WebSocket; - -/** - * Defines a new htmx [extension](https://htmx.org/extensions). - * - * https://htmx.org/api/#defineExtension - * - * @param name the extension name - * @param ext the extension definition - */ -export function defineExtension(name: string, ext: HtmxExtension): void; - -/** - * Finds an element matching the selector - * - * https://htmx.org/api/#find - * - * @param selector the selector to match - */ -export function find(selector: string): Element | null; - -/** - * Finds an element matching the selector - * - * https://htmx.org/api/#find - * - * @param elt the root element to find the matching element in, inclusive - * @param selector the selector to match - */ -export function find(elt: Element, selector: string): Element | null; - -/** - * Finds all elements matching the selector - * - * https://htmx.org/api/#findAll - * - * @param selector the selector to match - */ -export function findAll(selector: string): NodeListOf; - -/** - * Finds all elements matching the selector - * - * https://htmx.org/api/#findAll - * - * @param elt the root element to find the matching elements in, inclusive - * @param selector the selector to match - */ -export function findAll(elt: Element, selector: string): NodeListOf; - -/** - * Log all htmx events, useful for debugging. - * - * https://htmx.org/api/#logAll - */ -export function logAll(): void; - -/** - * The logger htmx uses to log with - * - * https://htmx.org/api/#logger - */ -export var logger: (elt: Element, eventName: string, detail: any) => void | null; - -/** - * Removes an event listener from an element - * - * https://htmx.org/api/#off - * - * @param eventName the event name to remove the listener from - * @param listener the listener to remove - */ -export function off(eventName: string, listener: (evt: Event) => void): (evt: Event) => void; - -/** - * Removes an event listener from an element - * - * https://htmx.org/api/#off - * - * @param target the element to remove the listener from - * @param eventName the event name to remove the listener from - * @param listener the listener to remove - */ -export function off(target: string, eventName: string, listener: (evt: Event) => void): (evt: Event) => void; - -/** - * Adds an event listener to an element - * - * https://htmx.org/api/#on - * - * @param eventName the event name to add the listener for - * @param listener the listener to add - */ -export function on(eventName: string, listener: (evt: Event) => void): (evt: Event) => void; - -/** - * Adds an event listener to an element - * - * https://htmx.org/api/#on - * - * @param target the element to add the listener to - * @param eventName the event name to add the listener for - * @param listener the listener to add - */ -export function on(target: string, eventName: string, listener: (evt: Event) => void): (evt: Event) => void; - -/** - * Adds a callback for the **htmx:load** event. This can be used to process new content, for example initializing the content with a javascript library - * - * https://htmx.org/api/#onLoad - * - * @param callback the callback to call on newly loaded content - */ -export function onLoad(callback: (element: Element) => void): void; - -/** - * Parses an interval string consistent with the way htmx does. Useful for plugins that have timing-related attributes. - * - * Caution: Accepts an int followed by either **s** or **ms**. All other values use **parseFloat** - * - * https://htmx.org/api/#parseInterval - * - * @param str timing string - */ -export function parseInterval(str: string): number; - -/** - * Processes new content, enabling htmx behavior. This can be useful if you have content that is added to the DOM outside of the normal htmx request cycle but still want htmx attributes to work. - * - * https://htmx.org/api/#process - * - * @param element element to process - */ -export function process(element: Element): void; - -/** - * Removes an element from the DOM - * - * https://htmx.org/api/#remove - * - * @param elt element to remove - * @param delay the delay (in milliseconds before element is removed) - */ -export function remove(elt: Element, delay?: number): void; - -/** - * Removes a class from the given element - * - * https://htmx.org/api/#removeClass - * - * @param elt element to remove the class from - * @param clazz the class to remove - * @param delay the delay (in milliseconds before class is removed) - */ -export function removeClass(elt: Element, clazz: string, delay?: number): void; - -/** - * Removes the given extension from htmx - * - * https://htmx.org/api/#removeExtension - * - * @param name the name of the extension to remove - */ -export function removeExtension(name: string): void; - -/** - * Takes the given class from its siblings, so that among its siblings, only the given element will have the class. - * - * https://htmx.org/api/#takeClass - * - * @param elt the element that will take the class - * @param clazz the class to take - */ -export function takeClass(elt: Element, clazz: string): void; - -/** - * Toggles the given class on an element - * - * https://htmx.org/api/#toggleClass - * - * @param elt the element to toggle the class on - * @param clazz the class to toggle - */ -export function toggleClass(elt: Element, clazz: string): void; - -/** - * Triggers a given event on an element - * - * https://htmx.org/api/#trigger - * - * @param elt the element to trigger the event on - * @param name the name of the event to trigger - * @param detail details for the event - */ -export function trigger(elt: Element, name: string, detail: any): void; - -/** - * Returns the input values that would resolve for a given element via the htmx value resolution mechanism - * - * https://htmx.org/api/#values - * - * @param elt the element to resolve values on - * @param requestType the request type (e.g. **get** or **post**) non-GET's will include the enclosing form of the element. Defaults to **post** - */ -export function values(elt: Element, requestType?: string): any; - -export const version: string; - -export interface HtmxConfig { - /** - * The attributes to settle during the settling phase. - * @default ["class", "style", "width", "height"] - */ - attributesToSettle?: ["class", "style", "width", "height"] | string[]; - /** - * If the focused element should be scrolled into view. - * @default false - */ - defaultFocusScroll?: boolean; - /** - * The default delay between completing the content swap and settling attributes. - * @default 20 - */ - defaultSettleDelay?: number; - /** - * The default delay between receiving a response from the server and doing the swap. - * @default 0 - */ - defaultSwapDelay?: number; - /** - * The default swap style to use if **[hx-swap](https://htmx.org/attributes/hx-swap)** is omitted. - * @default "innerHTML" - */ - defaultSwapStyle?: "innerHTML" | string; - /** - * The number of pages to keep in **localStorage** for history support. - * @default 10 - */ - historyCacheSize?: number; - /** - * Whether or not to use history. - * @default true - */ - historyEnabled?: boolean; - /** - * If true, htmx will inject a small amount of CSS into the page to make indicators invisible unless the **htmx-indicator** class is present. - * @default true - */ - includeIndicatorStyles?: boolean; - /** - * The class to place on indicators when a request is in flight. - * @default "htmx-indicator" - */ - indicatorClass?: "htmx-indicator" | string; - /** - * The class to place on triggering elements when a request is in flight. - * @default "htmx-request" - */ - requestClass?: "htmx-request" | string; - /** - * The class to temporarily place on elements that htmx has added to the DOM. - * @default "htmx-added" - */ - addedClass?: "htmx-added" | string; - /** - * The class to place on target elements when htmx is in the settling phase. - * @default "htmx-settling" - */ - settlingClass?: "htmx-settling" | string; - /** - * The class to place on target elements when htmx is in the swapping phase. - * @default "htmx-swapping" - */ - swappingClass?: "htmx-swapping" | string; - /** - * Allows the use of eval-like functionality in htmx, to enable **hx-vars**, trigger conditions & script tag evaluation. Can be set to **false** for CSP compatibility. - * @default true - */ - allowEval?: boolean; - /** - * Use HTML template tags for parsing content from the server. This allows you to use Out of Band content when returning things like table rows, but it is *not* IE11 compatible. - * @default false - */ - useTemplateFragments?: boolean; - /** - * Allow cross-site Access-Control requests using credentials such as cookies, authorization headers or TLS client certificates. - * @default false - */ - withCredentials?: boolean; - /** - * The default implementation of **getWebSocketReconnectDelay** for reconnecting after unexpected connection loss by the event code **Abnormal Closure**, **Service Restart** or **Try Again Later**. - * @default "full-jitter" - */ - wsReconnectDelay?: "full-jitter" | string | ((retryCount: number) => number); - // following don't appear in the docs - /** @default false */ - refreshOnHistoryMiss?: boolean; - /** @default 0 */ - timeout?: number; - /** @default "[hx-disable], [data-hx-disable]" */ - disableSelector?: "[hx-disable], [data-hx-disable]" | string; - /** @default "smooth" */ - scrollBehavior?: "smooth" | "auto"; - /** - * If set to false, disables the interpretation of script tags. - * @default true - */ - allowScriptTags?: boolean; - /** - * If set to true, disables htmx-based requests to non-origin hosts. - * @default false - */ - selfRequestsOnly?: boolean; - /** - * Whether or not the target of a boosted element is scrolled into the viewport. - * @default true - */ - scrollIntoViewOnBoost?: boolean; - /** - * If set, the nonce will be added to inline scripts. - * @default '' - */ - inlineScriptNonce?: string; - /** - * The type of binary data being received over the WebSocket connection - * @default 'blob' - */ - wsBinaryType?: 'blob' | 'arraybuffer'; - /** - * If set to true htmx will include a cache-busting parameter in GET requests to avoid caching partial responses by the browser - * @default false - */ - getCacheBusterParam?: boolean; - /** - * If set to true, htmx will use the View Transition API when swapping in new content. - * @default false - */ - globalViewTransitions?: boolean; - /** - * htmx will format requests with these methods by encoding their parameters in the URL, not the request body - * @default ["get"] - */ - methodsThatUseUrlParams?: ('get' | 'head' | 'post' | 'put' | 'delete' | 'connect' | 'options' | 'trace' | 'patch' )[]; - /** - * If set to true htmx will not update the title of the document when a title tag is found in new content - * @default false - */ - ignoreTitle?: boolean; -} - -export type HtmxEvent = "htmx:abort" - | "htmx:afterOnLoad" - | "htmx:afterProcessNode" - | "htmx:afterRequest" - | "htmx:afterSettle" - | "htmx:afterSwap" - | "htmx:beforeCleanupElement" - | "htmx:beforeOnLoad" - | "htmx:beforeProcessNode" - | "htmx:beforeRequest" - | "htmx:beforeSwap" - | "htmx:beforeSend" - | "htmx:configRequest" - | "htmx:confirm" - | "htmx:historyCacheError" - | "htmx:historyCacheMiss" - | "htmx:historyCacheMissError" - | "htmx:historyCacheMissLoad" - | "htmx:historyRestore" - | "htmx:load" - | "htmx:noSSESourceError" - | "htmx:onLoadError" - | "htmx:oobAfterSwap" - | "htmx:oobBeforeSwap" - | "htmx:oobErrorNoTarget" - | "htmx:prompt" - | "htmx:pushedIntoHistory" - | "htmx:responseError" - | "htmx:sendError" - | "htmx:sseError" - | "htmx:sseOpen" - | "htmx:swapError" - | "htmx:targetError" - | "htmx:timeout" - | "htmx:validation:validate" - | "htmx:validation:failed" - | "htmx:validation:halted" - | "htmx:xhr:abort" - | "htmx:xhr:loadend" - | "htmx:xhr:loadstart" - | "htmx:xhr:progress" -; - -/** - * https://htmx.org/extensions/#defining - */ -export interface HtmxExtension { - onEvent?: (name: HtmxEvent, evt: CustomEvent) => any; - transformResponse?: (text: any, xhr: XMLHttpRequest, elt: any) => any; - isInlineSwap?: (swapStyle: any) => any; - handleSwap?: (swapStyle: any, target: any, fragment: any, settleInfo: any) => any; - encodeParameters?: (xhr: XMLHttpRequest, parameters: any, elt: any) => any; -} diff --git a/web/static/node_modules/htmx.org/dist/htmx.js b/web/static/node_modules/htmx.org/dist/htmx.js deleted file mode 100644 index 597c9b3b..00000000 --- a/web/static/node_modules/htmx.org/dist/htmx.js +++ /dev/null @@ -1,3925 +0,0 @@ -// UMD insanity -// This code sets up support for (in order) AMD, ES6 modules, and globals. -(function (root, factory) { - //@ts-ignore - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - //@ts-ignore - define([], factory); - } else if (typeof module === 'object' && module.exports) { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like environments that support module.exports, - // like Node. - module.exports = factory(); - } else { - // Browser globals - root.htmx = root.htmx || factory(); - } -}(typeof self !== 'undefined' ? self : this, function () { -return (function () { - 'use strict'; - - // Public API - //** @type {import("./htmx").HtmxApi} */ - // TODO: list all methods in public API - var htmx = { - onLoad: onLoadHelper, - process: processNode, - on: addEventListenerImpl, - off: removeEventListenerImpl, - trigger : triggerEvent, - ajax : ajaxHelper, - find : find, - findAll : findAll, - closest : closest, - values : function(elt, type){ - var inputValues = getInputValues(elt, type || "post"); - return inputValues.values; - }, - remove : removeElement, - addClass : addClassToElement, - removeClass : removeClassFromElement, - toggleClass : toggleClassOnElement, - takeClass : takeClassForElement, - defineExtension : defineExtension, - removeExtension : removeExtension, - logAll : logAll, - logNone : logNone, - logger : null, - config : { - historyEnabled:true, - historyCacheSize:10, - refreshOnHistoryMiss:false, - defaultSwapStyle:'innerHTML', - defaultSwapDelay:0, - defaultSettleDelay:20, - includeIndicatorStyles:true, - indicatorClass:'htmx-indicator', - requestClass:'htmx-request', - addedClass:'htmx-added', - settlingClass:'htmx-settling', - swappingClass:'htmx-swapping', - allowEval:true, - allowScriptTags:true, - inlineScriptNonce:'', - attributesToSettle:["class", "style", "width", "height"], - withCredentials:false, - timeout:0, - wsReconnectDelay: 'full-jitter', - wsBinaryType: 'blob', - disableSelector: "[hx-disable], [data-hx-disable]", - useTemplateFragments: false, - scrollBehavior: 'smooth', - defaultFocusScroll: false, - getCacheBusterParam: false, - globalViewTransitions: false, - methodsThatUseUrlParams: ["get"], - selfRequestsOnly: false, - ignoreTitle: false, - scrollIntoViewOnBoost: true, - triggerSpecsCache: null, - }, - parseInterval:parseInterval, - _:internalEval, - createEventSource: function(url){ - return new EventSource(url, {withCredentials:true}) - }, - createWebSocket: function(url){ - var sock = new WebSocket(url, []); - sock.binaryType = htmx.config.wsBinaryType; - return sock; - }, - version: "1.9.12" - }; - - /** @type {import("./htmx").HtmxInternalApi} */ - var internalAPI = { - addTriggerHandler: addTriggerHandler, - bodyContains: bodyContains, - canAccessLocalStorage: canAccessLocalStorage, - findThisElement: findThisElement, - filterValues: filterValues, - hasAttribute: hasAttribute, - getAttributeValue: getAttributeValue, - getClosestAttributeValue: getClosestAttributeValue, - getClosestMatch: getClosestMatch, - getExpressionVars: getExpressionVars, - getHeaders: getHeaders, - getInputValues: getInputValues, - getInternalData: getInternalData, - getSwapSpecification: getSwapSpecification, - getTriggerSpecs: getTriggerSpecs, - getTarget: getTarget, - makeFragment: makeFragment, - mergeObjects: mergeObjects, - makeSettleInfo: makeSettleInfo, - oobSwap: oobSwap, - querySelectorExt: querySelectorExt, - selectAndSwap: selectAndSwap, - settleImmediately: settleImmediately, - shouldCancel: shouldCancel, - triggerEvent: triggerEvent, - triggerErrorEvent: triggerErrorEvent, - withExtensions: withExtensions, - } - - var VERBS = ['get', 'post', 'put', 'delete', 'patch']; - var VERB_SELECTOR = VERBS.map(function(verb){ - return "[hx-" + verb + "], [data-hx-" + verb + "]" - }).join(", "); - - var HEAD_TAG_REGEX = makeTagRegEx('head'), - TITLE_TAG_REGEX = makeTagRegEx('title'), - SVG_TAGS_REGEX = makeTagRegEx('svg', true); - - //==================================================================== - // Utilities - //==================================================================== - - /** - * @param {string} tag - * @param {boolean} [global] - * @returns {RegExp} - */ - function makeTagRegEx(tag, global) { - return new RegExp('<' + tag + '(\\s[^>]*>|>)([\\s\\S]*?)<\\/' + tag + '>', - !!global ? 'gim' : 'im') - } - - function parseInterval(str) { - if (str == undefined) { - return undefined; - } - - let interval = NaN; - if (str.slice(-2) == "ms") { - interval = parseFloat(str.slice(0, -2)); - } else if (str.slice(-1) == "s") { - interval = parseFloat(str.slice(0, -1)) * 1000; - } else if (str.slice(-1) == "m") { - interval = parseFloat(str.slice(0, -1)) * 1000 * 60; - } else { - interval = parseFloat(str); - } - return isNaN(interval) ? undefined : interval; - } - - /** - * @param {HTMLElement} elt - * @param {string} name - * @returns {(string | null)} - */ - function getRawAttribute(elt, name) { - return elt.getAttribute && elt.getAttribute(name); - } - - // resolve with both hx and data-hx prefixes - function hasAttribute(elt, qualifiedName) { - return elt.hasAttribute && (elt.hasAttribute(qualifiedName) || - elt.hasAttribute("data-" + qualifiedName)); - } - - /** - * - * @param {HTMLElement} elt - * @param {string} qualifiedName - * @returns {(string | null)} - */ - function getAttributeValue(elt, qualifiedName) { - return getRawAttribute(elt, qualifiedName) || getRawAttribute(elt, "data-" + qualifiedName); - } - - /** - * @param {HTMLElement} elt - * @returns {HTMLElement | null} - */ - function parentElt(elt) { - return elt.parentElement; - } - - /** - * @returns {Document} - */ - function getDocument() { - return document; - } - - /** - * @param {HTMLElement} elt - * @param {(e:HTMLElement) => boolean} condition - * @returns {HTMLElement | null} - */ - function getClosestMatch(elt, condition) { - while (elt && !condition(elt)) { - elt = parentElt(elt); - } - - return elt ? elt : null; - } - - function getAttributeValueWithDisinheritance(initialElement, ancestor, attributeName){ - var attributeValue = getAttributeValue(ancestor, attributeName); - var disinherit = getAttributeValue(ancestor, "hx-disinherit"); - if (initialElement !== ancestor && disinherit && (disinherit === "*" || disinherit.split(" ").indexOf(attributeName) >= 0)) { - return "unset"; - } else { - return attributeValue - } - } - - /** - * @param {HTMLElement} elt - * @param {string} attributeName - * @returns {string | null} - */ - function getClosestAttributeValue(elt, attributeName) { - var closestAttr = null; - getClosestMatch(elt, function (e) { - return closestAttr = getAttributeValueWithDisinheritance(elt, e, attributeName); - }); - if (closestAttr !== "unset") { - return closestAttr; - } - } - - /** - * @param {HTMLElement} elt - * @param {string} selector - * @returns {boolean} - */ - function matches(elt, selector) { - // @ts-ignore: non-standard properties for browser compatibility - // noinspection JSUnresolvedVariable - var matchesFunction = elt.matches || elt.matchesSelector || elt.msMatchesSelector || elt.mozMatchesSelector || elt.webkitMatchesSelector || elt.oMatchesSelector; - return matchesFunction && matchesFunction.call(elt, selector); - } - - /** - * @param {string} str - * @returns {string} - */ - function getStartTag(str) { - var tagMatcher = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i - var match = tagMatcher.exec( str ); - if (match) { - return match[1].toLowerCase(); - } else { - return ""; - } - } - - /** - * - * @param {string} resp - * @param {number} depth - * @returns {Element} - */ - function parseHTML(resp, depth) { - var parser = new DOMParser(); - var responseDoc = parser.parseFromString(resp, "text/html"); - - /** @type {Element} */ - var responseNode = responseDoc.body; - while (depth > 0) { - depth--; - // @ts-ignore - responseNode = responseNode.firstChild; - } - if (responseNode == null) { - // @ts-ignore - responseNode = getDocument().createDocumentFragment(); - } - return responseNode; - } - - function aFullPageResponse(resp) { - return /", 0); - // @ts-ignore type mismatch between DocumentFragment and Element. - // TODO: Are these close enough for htmx to use interchangeably? - var fragmentContent = fragment.querySelector('template').content; - if (htmx.config.allowScriptTags) { - // if there is a nonce set up, set it on the new script tags - forEach(fragmentContent.querySelectorAll("script"), function (script) { - if (htmx.config.inlineScriptNonce) { - script.nonce = htmx.config.inlineScriptNonce; - } - // mark as executed due to template insertion semantics on all browsers except firefox fml - script.htmxExecuted = navigator.userAgent.indexOf("Firefox") === -1; - }) - } else { - forEach(fragmentContent.querySelectorAll("script"), function (script) { - // remove all script tags if scripts are disabled - removeElement(script); - }) - } - return fragmentContent; - } - switch (startTag) { - case "thead": - case "tbody": - case "tfoot": - case "colgroup": - case "caption": - return parseHTML("" + content + "
    ", 1); - case "col": - return parseHTML("" + content + "
    ", 2); - case "tr": - return parseHTML("" + content + "
    ", 2); - case "td": - case "th": - return parseHTML("" + content + "
    ", 3); - case "script": - case "style": - return parseHTML("
    " + content + "
    ", 1); - default: - return parseHTML(content, 0); - } - } - - /** - * @param {Function} func - */ - function maybeCall(func){ - if(func) { - func(); - } - } - - /** - * @param {any} o - * @param {string} type - * @returns - */ - function isType(o, type) { - return Object.prototype.toString.call(o) === "[object " + type + "]"; - } - - /** - * @param {*} o - * @returns {o is Function} - */ - function isFunction(o) { - return isType(o, "Function"); - } - - /** - * @param {*} o - * @returns {o is Object} - */ - function isRawObject(o) { - return isType(o, "Object"); - } - - /** - * getInternalData retrieves "private" data stored by htmx within an element - * @param {HTMLElement} elt - * @returns {*} - */ - function getInternalData(elt) { - var dataProp = 'htmx-internal-data'; - var data = elt[dataProp]; - if (!data) { - data = elt[dataProp] = {}; - } - return data; - } - - /** - * toArray converts an ArrayLike object into a real array. - * @param {ArrayLike} arr - * @returns {any[]} - */ - function toArray(arr) { - var returnArr = []; - if (arr) { - for (var i = 0; i < arr.length; i++) { - returnArr.push(arr[i]); - } - } - return returnArr - } - - function forEach(arr, func) { - if (arr) { - for (var i = 0; i < arr.length; i++) { - func(arr[i]); - } - } - } - - function isScrolledIntoView(el) { - var rect = el.getBoundingClientRect(); - var elemTop = rect.top; - var elemBottom = rect.bottom; - return elemTop < window.innerHeight && elemBottom >= 0; - } - - function bodyContains(elt) { - // IE Fix - if (elt.getRootNode && elt.getRootNode() instanceof window.ShadowRoot) { - return getDocument().body.contains(elt.getRootNode().host); - } else { - return getDocument().body.contains(elt); - } - } - - function splitOnWhitespace(trigger) { - return trigger.trim().split(/\s+/); - } - - /** - * mergeObjects takes all of the keys from - * obj2 and duplicates them into obj1 - * @param {Object} obj1 - * @param {Object} obj2 - * @returns {Object} - */ - function mergeObjects(obj1, obj2) { - for (var key in obj2) { - if (obj2.hasOwnProperty(key)) { - obj1[key] = obj2[key]; - } - } - return obj1; - } - - function parseJSON(jString) { - try { - return JSON.parse(jString); - } catch(error) { - logError(error); - return null; - } - } - - function canAccessLocalStorage() { - var test = 'htmx:localStorageTest'; - try { - localStorage.setItem(test, test); - localStorage.removeItem(test); - return true; - } catch(e) { - return false; - } - } - - function normalizePath(path) { - try { - var url = new URL(path); - if (url) { - path = url.pathname + url.search; - } - // remove trailing slash, unless index page - if (!(/^\/$/.test(path))) { - path = path.replace(/\/+$/, ''); - } - return path; - } catch (e) { - // be kind to IE11, which doesn't support URL() - return path; - } - } - - //========================================================================================== - // public API - //========================================================================================== - - function internalEval(str){ - return maybeEval(getDocument().body, function () { - return eval(str); - }); - } - - function onLoadHelper(callback) { - var value = htmx.on("htmx:load", function(evt) { - callback(evt.detail.elt); - }); - return value; - } - - function logAll(){ - htmx.logger = function(elt, event, data) { - if(console) { - console.log(event, elt, data); - } - } - } - - function logNone() { - htmx.logger = null - } - - function find(eltOrSelector, selector) { - if (selector) { - return eltOrSelector.querySelector(selector); - } else { - return find(getDocument(), eltOrSelector); - } - } - - function findAll(eltOrSelector, selector) { - if (selector) { - return eltOrSelector.querySelectorAll(selector); - } else { - return findAll(getDocument(), eltOrSelector); - } - } - - function removeElement(elt, delay) { - elt = resolveTarget(elt); - if (delay) { - setTimeout(function(){ - removeElement(elt); - elt = null; - }, delay); - } else { - elt.parentElement.removeChild(elt); - } - } - - function addClassToElement(elt, clazz, delay) { - elt = resolveTarget(elt); - if (delay) { - setTimeout(function(){ - addClassToElement(elt, clazz); - elt = null; - }, delay); - } else { - elt.classList && elt.classList.add(clazz); - } - } - - function removeClassFromElement(elt, clazz, delay) { - elt = resolveTarget(elt); - if (delay) { - setTimeout(function(){ - removeClassFromElement(elt, clazz); - elt = null; - }, delay); - } else { - if (elt.classList) { - elt.classList.remove(clazz); - // if there are no classes left, remove the class attribute - if (elt.classList.length === 0) { - elt.removeAttribute("class"); - } - } - } - } - - function toggleClassOnElement(elt, clazz) { - elt = resolveTarget(elt); - elt.classList.toggle(clazz); - } - - function takeClassForElement(elt, clazz) { - elt = resolveTarget(elt); - forEach(elt.parentElement.children, function(child){ - removeClassFromElement(child, clazz); - }) - addClassToElement(elt, clazz); - } - - function closest(elt, selector) { - elt = resolveTarget(elt); - if (elt.closest) { - return elt.closest(selector); - } else { - // TODO remove when IE goes away - do{ - if (elt == null || matches(elt, selector)){ - return elt; - } - } - while (elt = elt && parentElt(elt)); - return null; - } - } - - function startsWith(str, prefix) { - return str.substring(0, prefix.length) === prefix - } - - function endsWith(str, suffix) { - return str.substring(str.length - suffix.length) === suffix - } - - function normalizeSelector(selector) { - var trimmedSelector = selector.trim(); - if (startsWith(trimmedSelector, "<") && endsWith(trimmedSelector, "/>")) { - return trimmedSelector.substring(1, trimmedSelector.length - 2); - } else { - return trimmedSelector; - } - } - - function querySelectorAllExt(elt, selector) { - if (selector.indexOf("closest ") === 0) { - return [closest(elt, normalizeSelector(selector.substr(8)))]; - } else if (selector.indexOf("find ") === 0) { - return [find(elt, normalizeSelector(selector.substr(5)))]; - } else if (selector === "next") { - return [elt.nextElementSibling] - } else if (selector.indexOf("next ") === 0) { - return [scanForwardQuery(elt, normalizeSelector(selector.substr(5)))]; - } else if (selector === "previous") { - return [elt.previousElementSibling] - } else if (selector.indexOf("previous ") === 0) { - return [scanBackwardsQuery(elt, normalizeSelector(selector.substr(9)))]; - } else if (selector === 'document') { - return [document]; - } else if (selector === 'window') { - return [window]; - } else if (selector === 'body') { - return [document.body]; - } else { - return getDocument().querySelectorAll(normalizeSelector(selector)); - } - } - - var scanForwardQuery = function(start, match) { - var results = getDocument().querySelectorAll(match); - for (var i = 0; i < results.length; i++) { - var elt = results[i]; - if (elt.compareDocumentPosition(start) === Node.DOCUMENT_POSITION_PRECEDING) { - return elt; - } - } - } - - var scanBackwardsQuery = function(start, match) { - var results = getDocument().querySelectorAll(match); - for (var i = results.length - 1; i >= 0; i--) { - var elt = results[i]; - if (elt.compareDocumentPosition(start) === Node.DOCUMENT_POSITION_FOLLOWING) { - return elt; - } - } - } - - function querySelectorExt(eltOrSelector, selector) { - if (selector) { - return querySelectorAllExt(eltOrSelector, selector)[0]; - } else { - return querySelectorAllExt(getDocument().body, eltOrSelector)[0]; - } - } - - function resolveTarget(arg2) { - if (isType(arg2, 'String')) { - return find(arg2); - } else { - return arg2; - } - } - - function processEventArgs(arg1, arg2, arg3) { - if (isFunction(arg2)) { - return { - target: getDocument().body, - event: arg1, - listener: arg2 - } - } else { - return { - target: resolveTarget(arg1), - event: arg2, - listener: arg3 - } - } - - } - - function addEventListenerImpl(arg1, arg2, arg3) { - ready(function(){ - var eventArgs = processEventArgs(arg1, arg2, arg3); - eventArgs.target.addEventListener(eventArgs.event, eventArgs.listener); - }) - var b = isFunction(arg2); - return b ? arg2 : arg3; - } - - function removeEventListenerImpl(arg1, arg2, arg3) { - ready(function(){ - var eventArgs = processEventArgs(arg1, arg2, arg3); - eventArgs.target.removeEventListener(eventArgs.event, eventArgs.listener); - }) - return isFunction(arg2) ? arg2 : arg3; - } - - //==================================================================== - // Node processing - //==================================================================== - - var DUMMY_ELT = getDocument().createElement("output"); // dummy element for bad selectors - function findAttributeTargets(elt, attrName) { - var attrTarget = getClosestAttributeValue(elt, attrName); - if (attrTarget) { - if (attrTarget === "this") { - return [findThisElement(elt, attrName)]; - } else { - var result = querySelectorAllExt(elt, attrTarget); - if (result.length === 0) { - logError('The selector "' + attrTarget + '" on ' + attrName + " returned no matches!"); - return [DUMMY_ELT] - } else { - return result; - } - } - } - } - - function findThisElement(elt, attribute){ - return getClosestMatch(elt, function (elt) { - return getAttributeValue(elt, attribute) != null; - }) - } - - function getTarget(elt) { - var targetStr = getClosestAttributeValue(elt, "hx-target"); - if (targetStr) { - if (targetStr === "this") { - return findThisElement(elt,'hx-target'); - } else { - return querySelectorExt(elt, targetStr) - } - } else { - var data = getInternalData(elt); - if (data.boosted) { - return getDocument().body; - } else { - return elt; - } - } - } - - function shouldSettleAttribute(name) { - var attributesToSettle = htmx.config.attributesToSettle; - for (var i = 0; i < attributesToSettle.length; i++) { - if (name === attributesToSettle[i]) { - return true; - } - } - return false; - } - - function cloneAttributes(mergeTo, mergeFrom) { - forEach(mergeTo.attributes, function (attr) { - if (!mergeFrom.hasAttribute(attr.name) && shouldSettleAttribute(attr.name)) { - mergeTo.removeAttribute(attr.name) - } - }); - forEach(mergeFrom.attributes, function (attr) { - if (shouldSettleAttribute(attr.name)) { - mergeTo.setAttribute(attr.name, attr.value); - } - }); - } - - function isInlineSwap(swapStyle, target) { - var extensions = getExtensions(target); - for (var i = 0; i < extensions.length; i++) { - var extension = extensions[i]; - try { - if (extension.isInlineSwap(swapStyle)) { - return true; - } - } catch(e) { - logError(e); - } - } - return swapStyle === "outerHTML"; - } - - /** - * - * @param {string} oobValue - * @param {HTMLElement} oobElement - * @param {*} settleInfo - * @returns - */ - function oobSwap(oobValue, oobElement, settleInfo) { - var selector = "#" + getRawAttribute(oobElement, "id"); - var swapStyle = "outerHTML"; - if (oobValue === "true") { - // do nothing - } else if (oobValue.indexOf(":") > 0) { - swapStyle = oobValue.substr(0, oobValue.indexOf(":")); - selector = oobValue.substr(oobValue.indexOf(":") + 1, oobValue.length); - } else { - swapStyle = oobValue; - } - - var targets = getDocument().querySelectorAll(selector); - if (targets) { - forEach( - targets, - function (target) { - var fragment; - var oobElementClone = oobElement.cloneNode(true); - fragment = getDocument().createDocumentFragment(); - fragment.appendChild(oobElementClone); - if (!isInlineSwap(swapStyle, target)) { - fragment = oobElementClone; // if this is not an inline swap, we use the content of the node, not the node itself - } - - var beforeSwapDetails = {shouldSwap: true, target: target, fragment:fragment }; - if (!triggerEvent(target, 'htmx:oobBeforeSwap', beforeSwapDetails)) return; - - target = beforeSwapDetails.target; // allow re-targeting - if (beforeSwapDetails['shouldSwap']){ - swap(swapStyle, target, target, fragment, settleInfo); - } - forEach(settleInfo.elts, function (elt) { - triggerEvent(elt, 'htmx:oobAfterSwap', beforeSwapDetails); - }); - } - ); - oobElement.parentNode.removeChild(oobElement); - } else { - oobElement.parentNode.removeChild(oobElement); - triggerErrorEvent(getDocument().body, "htmx:oobErrorNoTarget", {content: oobElement}); - } - return oobValue; - } - - function handleOutOfBandSwaps(elt, fragment, settleInfo) { - var oobSelects = getClosestAttributeValue(elt, "hx-select-oob"); - if (oobSelects) { - var oobSelectValues = oobSelects.split(","); - for (var i = 0; i < oobSelectValues.length; i++) { - var oobSelectValue = oobSelectValues[i].split(":", 2); - var id = oobSelectValue[0].trim(); - if (id.indexOf("#") === 0) { - id = id.substring(1); - } - var oobValue = oobSelectValue[1] || "true"; - var oobElement = fragment.querySelector("#" + id); - if (oobElement) { - oobSwap(oobValue, oobElement, settleInfo); - } - } - } - forEach(findAll(fragment, '[hx-swap-oob], [data-hx-swap-oob]'), function (oobElement) { - var oobValue = getAttributeValue(oobElement, "hx-swap-oob"); - if (oobValue != null) { - oobSwap(oobValue, oobElement, settleInfo); - } - }); - } - - function handlePreservedElements(fragment) { - forEach(findAll(fragment, '[hx-preserve], [data-hx-preserve]'), function (preservedElt) { - var id = getAttributeValue(preservedElt, "id"); - var oldElt = getDocument().getElementById(id); - if (oldElt != null) { - preservedElt.parentNode.replaceChild(oldElt, preservedElt); - } - }); - } - - function handleAttributes(parentNode, fragment, settleInfo) { - forEach(fragment.querySelectorAll("[id]"), function (newNode) { - var id = getRawAttribute(newNode, "id") - if (id && id.length > 0) { - var normalizedId = id.replace("'", "\\'"); - var normalizedTag = newNode.tagName.replace(':', '\\:'); - var oldNode = parentNode.querySelector(normalizedTag + "[id='" + normalizedId + "']"); - if (oldNode && oldNode !== parentNode) { - var newAttributes = newNode.cloneNode(); - cloneAttributes(newNode, oldNode); - settleInfo.tasks.push(function () { - cloneAttributes(newNode, newAttributes); - }); - } - } - }); - } - - function makeAjaxLoadTask(child) { - return function () { - removeClassFromElement(child, htmx.config.addedClass); - processNode(child); - processScripts(child); - processFocus(child) - triggerEvent(child, 'htmx:load'); - }; - } - - function processFocus(child) { - var autofocus = "[autofocus]"; - var autoFocusedElt = matches(child, autofocus) ? child : child.querySelector(autofocus) - if (autoFocusedElt != null) { - autoFocusedElt.focus(); - } - } - - function insertNodesBefore(parentNode, insertBefore, fragment, settleInfo) { - handleAttributes(parentNode, fragment, settleInfo); - while(fragment.childNodes.length > 0){ - var child = fragment.firstChild; - addClassToElement(child, htmx.config.addedClass); - parentNode.insertBefore(child, insertBefore); - if (child.nodeType !== Node.TEXT_NODE && child.nodeType !== Node.COMMENT_NODE) { - settleInfo.tasks.push(makeAjaxLoadTask(child)); - } - } - } - - // based on https://gist.github.com/hyamamoto/fd435505d29ebfa3d9716fd2be8d42f0, - // derived from Java's string hashcode implementation - function stringHash(string, hash) { - var char = 0; - while (char < string.length){ - hash = (hash << 5) - hash + string.charCodeAt(char++) | 0; // bitwise or ensures we have a 32-bit int - } - return hash; - } - - function attributeHash(elt) { - var hash = 0; - // IE fix - if (elt.attributes) { - for (var i = 0; i < elt.attributes.length; i++) { - var attribute = elt.attributes[i]; - if(attribute.value){ // only include attributes w/ actual values (empty is same as non-existent) - hash = stringHash(attribute.name, hash); - hash = stringHash(attribute.value, hash); - } - } - } - return hash; - } - - function deInitOnHandlers(elt) { - var internalData = getInternalData(elt); - if (internalData.onHandlers) { - for (var i = 0; i < internalData.onHandlers.length; i++) { - const handlerInfo = internalData.onHandlers[i]; - elt.removeEventListener(handlerInfo.event, handlerInfo.listener); - } - delete internalData.onHandlers - } - } - - function deInitNode(element) { - var internalData = getInternalData(element); - if (internalData.timeout) { - clearTimeout(internalData.timeout); - } - if (internalData.webSocket) { - internalData.webSocket.close(); - } - if (internalData.sseEventSource) { - internalData.sseEventSource.close(); - } - if (internalData.listenerInfos) { - forEach(internalData.listenerInfos, function (info) { - if (info.on) { - info.on.removeEventListener(info.trigger, info.listener); - } - }); - } - deInitOnHandlers(element); - forEach(Object.keys(internalData), function(key) { delete internalData[key] }); - } - - function cleanUpElement(element) { - triggerEvent(element, "htmx:beforeCleanupElement") - deInitNode(element); - if (element.children) { // IE - forEach(element.children, function(child) { cleanUpElement(child) }); - } - } - - function swapOuterHTML(target, fragment, settleInfo) { - if (target.tagName === "BODY") { - return swapInnerHTML(target, fragment, settleInfo); - } else { - // @type {HTMLElement} - var newElt - var eltBeforeNewContent = target.previousSibling; - insertNodesBefore(parentElt(target), target, fragment, settleInfo); - if (eltBeforeNewContent == null) { - newElt = parentElt(target).firstChild; - } else { - newElt = eltBeforeNewContent.nextSibling; - } - settleInfo.elts = settleInfo.elts.filter(function(e) { return e != target }); - while(newElt && newElt !== target) { - if (newElt.nodeType === Node.ELEMENT_NODE) { - settleInfo.elts.push(newElt); - } - newElt = newElt.nextElementSibling; - } - cleanUpElement(target); - parentElt(target).removeChild(target); - } - } - - function swapAfterBegin(target, fragment, settleInfo) { - return insertNodesBefore(target, target.firstChild, fragment, settleInfo); - } - - function swapBeforeBegin(target, fragment, settleInfo) { - return insertNodesBefore(parentElt(target), target, fragment, settleInfo); - } - - function swapBeforeEnd(target, fragment, settleInfo) { - return insertNodesBefore(target, null, fragment, settleInfo); - } - - function swapAfterEnd(target, fragment, settleInfo) { - return insertNodesBefore(parentElt(target), target.nextSibling, fragment, settleInfo); - } - function swapDelete(target, fragment, settleInfo) { - cleanUpElement(target); - return parentElt(target).removeChild(target); - } - - function swapInnerHTML(target, fragment, settleInfo) { - var firstChild = target.firstChild; - insertNodesBefore(target, firstChild, fragment, settleInfo); - if (firstChild) { - while (firstChild.nextSibling) { - cleanUpElement(firstChild.nextSibling) - target.removeChild(firstChild.nextSibling); - } - cleanUpElement(firstChild) - target.removeChild(firstChild); - } - } - - function maybeSelectFromResponse(elt, fragment, selectOverride) { - var selector = selectOverride || getClosestAttributeValue(elt, "hx-select"); - if (selector) { - var newFragment = getDocument().createDocumentFragment(); - forEach(fragment.querySelectorAll(selector), function (node) { - newFragment.appendChild(node); - }); - fragment = newFragment; - } - return fragment; - } - - function swap(swapStyle, elt, target, fragment, settleInfo) { - switch (swapStyle) { - case "none": - return; - case "outerHTML": - swapOuterHTML(target, fragment, settleInfo); - return; - case "afterbegin": - swapAfterBegin(target, fragment, settleInfo); - return; - case "beforebegin": - swapBeforeBegin(target, fragment, settleInfo); - return; - case "beforeend": - swapBeforeEnd(target, fragment, settleInfo); - return; - case "afterend": - swapAfterEnd(target, fragment, settleInfo); - return; - case "delete": - swapDelete(target, fragment, settleInfo); - return; - default: - var extensions = getExtensions(elt); - for (var i = 0; i < extensions.length; i++) { - var ext = extensions[i]; - try { - var newElements = ext.handleSwap(swapStyle, target, fragment, settleInfo); - if (newElements) { - if (typeof newElements.length !== 'undefined') { - // if handleSwap returns an array (like) of elements, we handle them - for (var j = 0; j < newElements.length; j++) { - var child = newElements[j]; - if (child.nodeType !== Node.TEXT_NODE && child.nodeType !== Node.COMMENT_NODE) { - settleInfo.tasks.push(makeAjaxLoadTask(child)); - } - } - } - return; - } - } catch (e) { - logError(e); - } - } - if (swapStyle === "innerHTML") { - swapInnerHTML(target, fragment, settleInfo); - } else { - swap(htmx.config.defaultSwapStyle, elt, target, fragment, settleInfo); - } - } - } - - function findTitle(content) { - if (content.indexOf(' -1) { - var contentWithSvgsRemoved = content.replace(SVG_TAGS_REGEX, ''); - var result = contentWithSvgsRemoved.match(TITLE_TAG_REGEX); - if (result) { - return result[2]; - } - } - } - - function selectAndSwap(swapStyle, target, elt, responseText, settleInfo, selectOverride) { - settleInfo.title = findTitle(responseText); - var fragment = makeFragment(responseText); - if (fragment) { - handleOutOfBandSwaps(elt, fragment, settleInfo); - fragment = maybeSelectFromResponse(elt, fragment, selectOverride); - handlePreservedElements(fragment); - return swap(swapStyle, elt, target, fragment, settleInfo); - } - } - - function handleTrigger(xhr, header, elt) { - var triggerBody = xhr.getResponseHeader(header); - if (triggerBody.indexOf("{") === 0) { - var triggers = parseJSON(triggerBody); - for (var eventName in triggers) { - if (triggers.hasOwnProperty(eventName)) { - var detail = triggers[eventName]; - if (!isRawObject(detail)) { - detail = {"value": detail} - } - triggerEvent(elt, eventName, detail); - } - } - } else { - var eventNames = triggerBody.split(",") - for (var i = 0; i < eventNames.length; i++) { - triggerEvent(elt, eventNames[i].trim(), []); - } - } - } - - var WHITESPACE = /\s/; - var WHITESPACE_OR_COMMA = /[\s,]/; - var SYMBOL_START = /[_$a-zA-Z]/; - var SYMBOL_CONT = /[_$a-zA-Z0-9]/; - var STRINGISH_START = ['"', "'", "/"]; - var NOT_WHITESPACE = /[^\s]/; - var COMBINED_SELECTOR_START = /[{(]/; - var COMBINED_SELECTOR_END = /[})]/; - function tokenizeString(str) { - var tokens = []; - var position = 0; - while (position < str.length) { - if(SYMBOL_START.exec(str.charAt(position))) { - var startPosition = position; - while (SYMBOL_CONT.exec(str.charAt(position + 1))) { - position++; - } - tokens.push(str.substr(startPosition, position - startPosition + 1)); - } else if (STRINGISH_START.indexOf(str.charAt(position)) !== -1) { - var startChar = str.charAt(position); - var startPosition = position; - position++; - while (position < str.length && str.charAt(position) !== startChar ) { - if (str.charAt(position) === "\\") { - position++; - } - position++; - } - tokens.push(str.substr(startPosition, position - startPosition + 1)); - } else { - var symbol = str.charAt(position); - tokens.push(symbol); - } - position++; - } - return tokens; - } - - function isPossibleRelativeReference(token, last, paramName) { - return SYMBOL_START.exec(token.charAt(0)) && - token !== "true" && - token !== "false" && - token !== "this" && - token !== paramName && - last !== "."; - } - - function maybeGenerateConditional(elt, tokens, paramName) { - if (tokens[0] === '[') { - tokens.shift(); - var bracketCount = 1; - var conditionalSource = " return (function(" + paramName + "){ return ("; - var last = null; - while (tokens.length > 0) { - var token = tokens[0]; - if (token === "]") { - bracketCount--; - if (bracketCount === 0) { - if (last === null) { - conditionalSource = conditionalSource + "true"; - } - tokens.shift(); - conditionalSource += ")})"; - try { - var conditionFunction = maybeEval(elt,function () { - return Function(conditionalSource)(); - }, - function(){return true}) - conditionFunction.source = conditionalSource; - return conditionFunction; - } catch (e) { - triggerErrorEvent(getDocument().body, "htmx:syntax:error", {error:e, source:conditionalSource}) - return null; - } - } - } else if (token === "[") { - bracketCount++; - } - if (isPossibleRelativeReference(token, last, paramName)) { - conditionalSource += "((" + paramName + "." + token + ") ? (" + paramName + "." + token + ") : (window." + token + "))"; - } else { - conditionalSource = conditionalSource + token; - } - last = tokens.shift(); - } - } - } - - function consumeUntil(tokens, match) { - var result = ""; - while (tokens.length > 0 && !match.test(tokens[0])) { - result += tokens.shift(); - } - return result; - } - - function consumeCSSSelector(tokens) { - var result; - if (tokens.length > 0 && COMBINED_SELECTOR_START.test(tokens[0])) { - tokens.shift(); - result = consumeUntil(tokens, COMBINED_SELECTOR_END).trim(); - tokens.shift(); - } else { - result = consumeUntil(tokens, WHITESPACE_OR_COMMA); - } - return result; - } - - var INPUT_SELECTOR = 'input, textarea, select'; - - /** - * @param {HTMLElement} elt - * @param {string} explicitTrigger - * @param {cache} cache for trigger specs - * @returns {import("./htmx").HtmxTriggerSpecification[]} - */ - function parseAndCacheTrigger(elt, explicitTrigger, cache) { - var triggerSpecs = []; - var tokens = tokenizeString(explicitTrigger); - do { - consumeUntil(tokens, NOT_WHITESPACE); - var initialLength = tokens.length; - var trigger = consumeUntil(tokens, /[,\[\s]/); - if (trigger !== "") { - if (trigger === "every") { - var every = {trigger: 'every'}; - consumeUntil(tokens, NOT_WHITESPACE); - every.pollInterval = parseInterval(consumeUntil(tokens, /[,\[\s]/)); - consumeUntil(tokens, NOT_WHITESPACE); - var eventFilter = maybeGenerateConditional(elt, tokens, "event"); - if (eventFilter) { - every.eventFilter = eventFilter; - } - triggerSpecs.push(every); - } else if (trigger.indexOf("sse:") === 0) { - triggerSpecs.push({trigger: 'sse', sseEvent: trigger.substr(4)}); - } else { - var triggerSpec = {trigger: trigger}; - var eventFilter = maybeGenerateConditional(elt, tokens, "event"); - if (eventFilter) { - triggerSpec.eventFilter = eventFilter; - } - while (tokens.length > 0 && tokens[0] !== ",") { - consumeUntil(tokens, NOT_WHITESPACE) - var token = tokens.shift(); - if (token === "changed") { - triggerSpec.changed = true; - } else if (token === "once") { - triggerSpec.once = true; - } else if (token === "consume") { - triggerSpec.consume = true; - } else if (token === "delay" && tokens[0] === ":") { - tokens.shift(); - triggerSpec.delay = parseInterval(consumeUntil(tokens, WHITESPACE_OR_COMMA)); - } else if (token === "from" && tokens[0] === ":") { - tokens.shift(); - if (COMBINED_SELECTOR_START.test(tokens[0])) { - var from_arg = consumeCSSSelector(tokens); - } else { - var from_arg = consumeUntil(tokens, WHITESPACE_OR_COMMA); - if (from_arg === "closest" || from_arg === "find" || from_arg === "next" || from_arg === "previous") { - tokens.shift(); - var selector = consumeCSSSelector(tokens); - // `next` and `previous` allow a selector-less syntax - if (selector.length > 0) { - from_arg += " " + selector; - } - } - } - triggerSpec.from = from_arg; - } else if (token === "target" && tokens[0] === ":") { - tokens.shift(); - triggerSpec.target = consumeCSSSelector(tokens); - } else if (token === "throttle" && tokens[0] === ":") { - tokens.shift(); - triggerSpec.throttle = parseInterval(consumeUntil(tokens, WHITESPACE_OR_COMMA)); - } else if (token === "queue" && tokens[0] === ":") { - tokens.shift(); - triggerSpec.queue = consumeUntil(tokens, WHITESPACE_OR_COMMA); - } else if (token === "root" && tokens[0] === ":") { - tokens.shift(); - triggerSpec[token] = consumeCSSSelector(tokens); - } else if (token === "threshold" && tokens[0] === ":") { - tokens.shift(); - triggerSpec[token] = consumeUntil(tokens, WHITESPACE_OR_COMMA); - } else { - triggerErrorEvent(elt, "htmx:syntax:error", {token:tokens.shift()}); - } - } - triggerSpecs.push(triggerSpec); - } - } - if (tokens.length === initialLength) { - triggerErrorEvent(elt, "htmx:syntax:error", {token:tokens.shift()}); - } - consumeUntil(tokens, NOT_WHITESPACE); - } while (tokens[0] === "," && tokens.shift()) - if (cache) { - cache[explicitTrigger] = triggerSpecs - } - return triggerSpecs - } - - /** - * @param {HTMLElement} elt - * @returns {import("./htmx").HtmxTriggerSpecification[]} - */ - function getTriggerSpecs(elt) { - var explicitTrigger = getAttributeValue(elt, 'hx-trigger'); - var triggerSpecs = []; - if (explicitTrigger) { - var cache = htmx.config.triggerSpecsCache - triggerSpecs = (cache && cache[explicitTrigger]) || parseAndCacheTrigger(elt, explicitTrigger, cache) - } - - if (triggerSpecs.length > 0) { - return triggerSpecs; - } else if (matches(elt, 'form')) { - return [{trigger: 'submit'}]; - } else if (matches(elt, 'input[type="button"], input[type="submit"]')){ - return [{trigger: 'click'}]; - } else if (matches(elt, INPUT_SELECTOR)) { - return [{trigger: 'change'}]; - } else { - return [{trigger: 'click'}]; - } - } - - function cancelPolling(elt) { - getInternalData(elt).cancelled = true; - } - - function processPolling(elt, handler, spec) { - var nodeData = getInternalData(elt); - nodeData.timeout = setTimeout(function () { - if (bodyContains(elt) && nodeData.cancelled !== true) { - if (!maybeFilterEvent(spec, elt, makeEvent('hx:poll:trigger', { - triggerSpec: spec, - target: elt - }))) { - handler(elt); - } - processPolling(elt, handler, spec); - } - }, spec.pollInterval); - } - - function isLocalLink(elt) { - return location.hostname === elt.hostname && - getRawAttribute(elt,'href') && - getRawAttribute(elt,'href').indexOf("#") !== 0; - } - - function boostElement(elt, nodeData, triggerSpecs) { - if ((elt.tagName === "A" && isLocalLink(elt) && (elt.target === "" || elt.target === "_self")) || elt.tagName === "FORM") { - nodeData.boosted = true; - var verb, path; - if (elt.tagName === "A") { - verb = "get"; - path = getRawAttribute(elt, 'href') - } else { - var rawAttribute = getRawAttribute(elt, "method"); - verb = rawAttribute ? rawAttribute.toLowerCase() : "get"; - if (verb === "get") { - } - path = getRawAttribute(elt, 'action'); - } - triggerSpecs.forEach(function(triggerSpec) { - addEventListener(elt, function(elt, evt) { - if (closest(elt, htmx.config.disableSelector)) { - cleanUpElement(elt) - return - } - issueAjaxRequest(verb, path, elt, evt) - }, nodeData, triggerSpec, true); - }); - } - } - - /** - * - * @param {Event} evt - * @param {HTMLElement} elt - * @returns - */ - function shouldCancel(evt, elt) { - if (evt.type === "submit" || evt.type === "click") { - if (elt.tagName === "FORM") { - return true; - } - if (matches(elt, 'input[type="submit"], button') && closest(elt, 'form') !== null) { - return true; - } - if (elt.tagName === "A" && elt.href && - (elt.getAttribute('href') === '#' || elt.getAttribute('href').indexOf("#") !== 0)) { - return true; - } - } - return false; - } - - function ignoreBoostedAnchorCtrlClick(elt, evt) { - return getInternalData(elt).boosted && elt.tagName === "A" && evt.type === "click" && (evt.ctrlKey || evt.metaKey); - } - - function maybeFilterEvent(triggerSpec, elt, evt) { - var eventFilter = triggerSpec.eventFilter; - if(eventFilter){ - try { - return eventFilter.call(elt, evt) !== true; - } catch(e) { - triggerErrorEvent(getDocument().body, "htmx:eventFilter:error", {error: e, source:eventFilter.source}); - return true; - } - } - return false; - } - - function addEventListener(elt, handler, nodeData, triggerSpec, explicitCancel) { - var elementData = getInternalData(elt); - var eltsToListenOn; - if (triggerSpec.from) { - eltsToListenOn = querySelectorAllExt(elt, triggerSpec.from); - } else { - eltsToListenOn = [elt]; - } - // store the initial values of the elements, so we can tell if they change - if (triggerSpec.changed) { - eltsToListenOn.forEach(function (eltToListenOn) { - var eltToListenOnData = getInternalData(eltToListenOn); - eltToListenOnData.lastValue = eltToListenOn.value; - }) - } - forEach(eltsToListenOn, function (eltToListenOn) { - var eventListener = function (evt) { - if (!bodyContains(elt)) { - eltToListenOn.removeEventListener(triggerSpec.trigger, eventListener); - return; - } - if (ignoreBoostedAnchorCtrlClick(elt, evt)) { - return; - } - if (explicitCancel || shouldCancel(evt, elt)) { - evt.preventDefault(); - } - if (maybeFilterEvent(triggerSpec, elt, evt)) { - return; - } - var eventData = getInternalData(evt); - eventData.triggerSpec = triggerSpec; - if (eventData.handledFor == null) { - eventData.handledFor = []; - } - if (eventData.handledFor.indexOf(elt) < 0) { - eventData.handledFor.push(elt); - if (triggerSpec.consume) { - evt.stopPropagation(); - } - if (triggerSpec.target && evt.target) { - if (!matches(evt.target, triggerSpec.target)) { - return; - } - } - if (triggerSpec.once) { - if (elementData.triggeredOnce) { - return; - } else { - elementData.triggeredOnce = true; - } - } - if (triggerSpec.changed) { - var eltToListenOnData = getInternalData(eltToListenOn) - if (eltToListenOnData.lastValue === eltToListenOn.value) { - return; - } - eltToListenOnData.lastValue = eltToListenOn.value - } - if (elementData.delayed) { - clearTimeout(elementData.delayed); - } - if (elementData.throttle) { - return; - } - - if (triggerSpec.throttle > 0) { - if (!elementData.throttle) { - handler(elt, evt); - elementData.throttle = setTimeout(function () { - elementData.throttle = null; - }, triggerSpec.throttle); - } - } else if (triggerSpec.delay > 0) { - elementData.delayed = setTimeout(function() { handler(elt, evt) }, triggerSpec.delay); - } else { - triggerEvent(elt, 'htmx:trigger') - handler(elt, evt); - } - } - }; - if (nodeData.listenerInfos == null) { - nodeData.listenerInfos = []; - } - nodeData.listenerInfos.push({ - trigger: triggerSpec.trigger, - listener: eventListener, - on: eltToListenOn - }) - eltToListenOn.addEventListener(triggerSpec.trigger, eventListener); - }); - } - - var windowIsScrolling = false // used by initScrollHandler - var scrollHandler = null; - function initScrollHandler() { - if (!scrollHandler) { - scrollHandler = function() { - windowIsScrolling = true - }; - window.addEventListener("scroll", scrollHandler) - setInterval(function() { - if (windowIsScrolling) { - windowIsScrolling = false; - forEach(getDocument().querySelectorAll("[hx-trigger='revealed'],[data-hx-trigger='revealed']"), function (elt) { - maybeReveal(elt); - }) - } - }, 200); - } - } - - function maybeReveal(elt) { - if (!hasAttribute(elt,'data-hx-revealed') && isScrolledIntoView(elt)) { - elt.setAttribute('data-hx-revealed', 'true'); - var nodeData = getInternalData(elt); - if (nodeData.initHash) { - triggerEvent(elt, 'revealed'); - } else { - // if the node isn't initialized, wait for it before triggering the request - elt.addEventListener("htmx:afterProcessNode", function(evt) { triggerEvent(elt, 'revealed') }, {once: true}); - } - } - } - - //==================================================================== - // Web Sockets - //==================================================================== - - function processWebSocketInfo(elt, nodeData, info) { - var values = splitOnWhitespace(info); - for (var i = 0; i < values.length; i++) { - var value = values[i].split(/:(.+)/); - if (value[0] === "connect") { - ensureWebSocket(elt, value[1], 0); - } - if (value[0] === "send") { - processWebSocketSend(elt); - } - } - } - - function ensureWebSocket(elt, wssSource, retryCount) { - if (!bodyContains(elt)) { - return; // stop ensuring websocket connection when socket bearing element ceases to exist - } - - if (wssSource.indexOf("/") == 0) { // complete absolute paths only - var base_part = location.hostname + (location.port ? ':'+location.port: ''); - if (location.protocol == 'https:') { - wssSource = "wss://" + base_part + wssSource; - } else if (location.protocol == 'http:') { - wssSource = "ws://" + base_part + wssSource; - } - } - var socket = htmx.createWebSocket(wssSource); - socket.onerror = function (e) { - triggerErrorEvent(elt, "htmx:wsError", {error:e, socket:socket}); - maybeCloseWebSocketSource(elt); - }; - - socket.onclose = function (e) { - if ([1006, 1012, 1013].indexOf(e.code) >= 0) { // Abnormal Closure/Service Restart/Try Again Later - var delay = getWebSocketReconnectDelay(retryCount); - setTimeout(function() { - ensureWebSocket(elt, wssSource, retryCount+1); // creates a websocket with a new timeout - }, delay); - } - }; - socket.onopen = function (e) { - retryCount = 0; - } - - getInternalData(elt).webSocket = socket; - socket.addEventListener('message', function (event) { - if (maybeCloseWebSocketSource(elt)) { - return; - } - - var response = event.data; - withExtensions(elt, function(extension){ - response = extension.transformResponse(response, null, elt); - }); - - var settleInfo = makeSettleInfo(elt); - var fragment = makeFragment(response); - var children = toArray(fragment.children); - for (var i = 0; i < children.length; i++) { - var child = children[i]; - oobSwap(getAttributeValue(child, "hx-swap-oob") || "true", child, settleInfo); - } - - settleImmediately(settleInfo.tasks); - }); - } - - function maybeCloseWebSocketSource(elt) { - if (!bodyContains(elt)) { - getInternalData(elt).webSocket.close(); - return true; - } - } - - function processWebSocketSend(elt) { - var webSocketSourceElt = getClosestMatch(elt, function (parent) { - return getInternalData(parent).webSocket != null; - }); - if (webSocketSourceElt) { - elt.addEventListener(getTriggerSpecs(elt)[0].trigger, function (evt) { - var webSocket = getInternalData(webSocketSourceElt).webSocket; - var headers = getHeaders(elt, webSocketSourceElt); - var results = getInputValues(elt, 'post'); - var errors = results.errors; - var rawParameters = results.values; - var expressionVars = getExpressionVars(elt); - var allParameters = mergeObjects(rawParameters, expressionVars); - var filteredParameters = filterValues(allParameters, elt); - filteredParameters['HEADERS'] = headers; - if (errors && errors.length > 0) { - triggerEvent(elt, 'htmx:validation:halted', errors); - return; - } - webSocket.send(JSON.stringify(filteredParameters)); - if(shouldCancel(evt, elt)){ - evt.preventDefault(); - } - }); - } else { - triggerErrorEvent(elt, "htmx:noWebSocketSourceError"); - } - } - - function getWebSocketReconnectDelay(retryCount) { - var delay = htmx.config.wsReconnectDelay; - if (typeof delay === 'function') { - // @ts-ignore - return delay(retryCount); - } - if (delay === 'full-jitter') { - var exp = Math.min(retryCount, 6); - var maxDelay = 1000 * Math.pow(2, exp); - return maxDelay * Math.random(); - } - logError('htmx.config.wsReconnectDelay must either be a function or the string "full-jitter"'); - } - - //==================================================================== - // Server Sent Events - //==================================================================== - - function processSSEInfo(elt, nodeData, info) { - var values = splitOnWhitespace(info); - for (var i = 0; i < values.length; i++) { - var value = values[i].split(/:(.+)/); - if (value[0] === "connect") { - processSSESource(elt, value[1]); - } - - if ((value[0] === "swap")) { - processSSESwap(elt, value[1]) - } - } - } - - function processSSESource(elt, sseSrc) { - var source = htmx.createEventSource(sseSrc); - source.onerror = function (e) { - triggerErrorEvent(elt, "htmx:sseError", {error:e, source:source}); - maybeCloseSSESource(elt); - }; - getInternalData(elt).sseEventSource = source; - } - - function processSSESwap(elt, sseEventName) { - var sseSourceElt = getClosestMatch(elt, hasEventSource); - if (sseSourceElt) { - var sseEventSource = getInternalData(sseSourceElt).sseEventSource; - var sseListener = function (event) { - if (maybeCloseSSESource(sseSourceElt)) { - return; - } - if (!bodyContains(elt)) { - sseEventSource.removeEventListener(sseEventName, sseListener); - return; - } - - /////////////////////////// - // TODO: merge this code with AJAX and WebSockets code in the future. - - var response = event.data; - withExtensions(elt, function(extension){ - response = extension.transformResponse(response, null, elt); - }); - - var swapSpec = getSwapSpecification(elt) - var target = getTarget(elt) - var settleInfo = makeSettleInfo(elt); - - selectAndSwap(swapSpec.swapStyle, target, elt, response, settleInfo) - settleImmediately(settleInfo.tasks) - triggerEvent(elt, "htmx:sseMessage", event) - }; - - getInternalData(elt).sseListener = sseListener; - sseEventSource.addEventListener(sseEventName, sseListener); - } else { - triggerErrorEvent(elt, "htmx:noSSESourceError"); - } - } - - function processSSETrigger(elt, handler, sseEventName) { - var sseSourceElt = getClosestMatch(elt, hasEventSource); - if (sseSourceElt) { - var sseEventSource = getInternalData(sseSourceElt).sseEventSource; - var sseListener = function () { - if (!maybeCloseSSESource(sseSourceElt)) { - if (bodyContains(elt)) { - handler(elt); - } else { - sseEventSource.removeEventListener(sseEventName, sseListener); - } - } - }; - getInternalData(elt).sseListener = sseListener; - sseEventSource.addEventListener(sseEventName, sseListener); - } else { - triggerErrorEvent(elt, "htmx:noSSESourceError"); - } - } - - function maybeCloseSSESource(elt) { - if (!bodyContains(elt)) { - getInternalData(elt).sseEventSource.close(); - return true; - } - } - - function hasEventSource(node) { - return getInternalData(node).sseEventSource != null; - } - - //==================================================================== - - function loadImmediately(elt, handler, nodeData, delay) { - var load = function(){ - if (!nodeData.loaded) { - nodeData.loaded = true; - handler(elt); - } - } - if (delay > 0) { - setTimeout(load, delay); - } else { - load(); - } - } - - function processVerbs(elt, nodeData, triggerSpecs) { - var explicitAction = false; - forEach(VERBS, function (verb) { - if (hasAttribute(elt,'hx-' + verb)) { - var path = getAttributeValue(elt, 'hx-' + verb); - explicitAction = true; - nodeData.path = path; - nodeData.verb = verb; - triggerSpecs.forEach(function(triggerSpec) { - addTriggerHandler(elt, triggerSpec, nodeData, function (elt, evt) { - if (closest(elt, htmx.config.disableSelector)) { - cleanUpElement(elt) - return - } - issueAjaxRequest(verb, path, elt, evt) - }) - }); - } - }); - return explicitAction; - } - - function addTriggerHandler(elt, triggerSpec, nodeData, handler) { - if (triggerSpec.sseEvent) { - processSSETrigger(elt, handler, triggerSpec.sseEvent); - } else if (triggerSpec.trigger === "revealed") { - initScrollHandler(); - addEventListener(elt, handler, nodeData, triggerSpec); - maybeReveal(elt); - } else if (triggerSpec.trigger === "intersect") { - var observerOptions = {}; - if (triggerSpec.root) { - observerOptions.root = querySelectorExt(elt, triggerSpec.root) - } - if (triggerSpec.threshold) { - observerOptions.threshold = parseFloat(triggerSpec.threshold); - } - var observer = new IntersectionObserver(function (entries) { - for (var i = 0; i < entries.length; i++) { - var entry = entries[i]; - if (entry.isIntersecting) { - triggerEvent(elt, "intersect"); - break; - } - } - }, observerOptions); - observer.observe(elt); - addEventListener(elt, handler, nodeData, triggerSpec); - } else if (triggerSpec.trigger === "load") { - if (!maybeFilterEvent(triggerSpec, elt, makeEvent("load", {elt: elt}))) { - loadImmediately(elt, handler, nodeData, triggerSpec.delay); - } - } else if (triggerSpec.pollInterval > 0) { - nodeData.polling = true; - processPolling(elt, handler, triggerSpec); - } else { - addEventListener(elt, handler, nodeData, triggerSpec); - } - } - - function evalScript(script) { - if (!script.htmxExecuted && htmx.config.allowScriptTags && - (script.type === "text/javascript" || script.type === "module" || script.type === "") ) { - var newScript = getDocument().createElement("script"); - forEach(script.attributes, function (attr) { - newScript.setAttribute(attr.name, attr.value); - }); - newScript.textContent = script.textContent; - newScript.async = false; - if (htmx.config.inlineScriptNonce) { - newScript.nonce = htmx.config.inlineScriptNonce; - } - var parent = script.parentElement; - - try { - parent.insertBefore(newScript, script); - } catch (e) { - logError(e); - } finally { - // remove old script element, but only if it is still in DOM - if (script.parentElement) { - script.parentElement.removeChild(script); - } - } - } - } - - function processScripts(elt) { - if (matches(elt, "script")) { - evalScript(elt); - } - forEach(findAll(elt, "script"), function (script) { - evalScript(script); - }); - } - - function shouldProcessHxOn(elt) { - var attributes = elt.attributes - if (!attributes) { - return false - } - for (var j = 0; j < attributes.length; j++) { - var attrName = attributes[j].name - if (startsWith(attrName, "hx-on:") || startsWith(attrName, "data-hx-on:") || - startsWith(attrName, "hx-on-") || startsWith(attrName, "data-hx-on-")) { - return true - } - } - return false - } - - function findHxOnWildcardElements(elt) { - var node = null - var elements = [] - - if (shouldProcessHxOn(elt)) { - elements.push(elt) - } - - if (document.evaluate) { - var iter = document.evaluate('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or' + - ' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]', elt) - while (node = iter.iterateNext()) elements.push(node) - } else if (typeof elt.getElementsByTagName === "function") { - var allElements = elt.getElementsByTagName("*") - for (var i = 0; i < allElements.length; i++) { - if (shouldProcessHxOn(allElements[i])) { - elements.push(allElements[i]) - } - } - } - - return elements - } - - function findElementsToProcess(elt) { - if (elt.querySelectorAll) { - var boostedSelector = ", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]"; - var results = elt.querySelectorAll(VERB_SELECTOR + boostedSelector + ", form, [type='submit'], [hx-sse], [data-hx-sse], [hx-ws]," + - " [data-hx-ws], [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger], [hx-on], [data-hx-on]"); - return results; - } else { - return []; - } - } - - // Handle submit buttons/inputs that have the form attribute set - // see https://developer.mozilla.org/docs/Web/HTML/Element/button - function maybeSetLastButtonClicked(evt) { - var elt = closest(evt.target, "button, input[type='submit']"); - var internalData = getRelatedFormData(evt) - if (internalData) { - internalData.lastButtonClicked = elt; - } - }; - function maybeUnsetLastButtonClicked(evt){ - var internalData = getRelatedFormData(evt) - if (internalData) { - internalData.lastButtonClicked = null; - } - } - function getRelatedFormData(evt) { - var elt = closest(evt.target, "button, input[type='submit']"); - if (!elt) { - return; - } - var form = resolveTarget('#' + getRawAttribute(elt, 'form')) || closest(elt, 'form'); - if (!form) { - return; - } - return getInternalData(form); - } - function initButtonTracking(elt) { - // need to handle both click and focus in: - // focusin - in case someone tabs in to a button and hits the space bar - // click - on OSX buttons do not focus on click see https://bugs.webkit.org/show_bug.cgi?id=13724 - elt.addEventListener('click', maybeSetLastButtonClicked) - elt.addEventListener('focusin', maybeSetLastButtonClicked) - elt.addEventListener('focusout', maybeUnsetLastButtonClicked) - } - - function countCurlies(line) { - var tokens = tokenizeString(line); - var netCurlies = 0; - for (var i = 0; i < tokens.length; i++) { - const token = tokens[i]; - if (token === "{") { - netCurlies++; - } else if (token === "}") { - netCurlies--; - } - } - return netCurlies; - } - - function addHxOnEventHandler(elt, eventName, code) { - var nodeData = getInternalData(elt); - if (!Array.isArray(nodeData.onHandlers)) { - nodeData.onHandlers = []; - } - var func; - var listener = function (e) { - return maybeEval(elt, function() { - if (!func) { - func = new Function("event", code); - } - func.call(elt, e); - }); - }; - elt.addEventListener(eventName, listener); - nodeData.onHandlers.push({event:eventName, listener:listener}); - } - - function processHxOn(elt) { - var hxOnValue = getAttributeValue(elt, 'hx-on'); - if (hxOnValue) { - var handlers = {} - var lines = hxOnValue.split("\n"); - var currentEvent = null; - var curlyCount = 0; - while (lines.length > 0) { - var line = lines.shift(); - var match = line.match(/^\s*([a-zA-Z:\-\.]+:)(.*)/); - if (curlyCount === 0 && match) { - line.split(":") - currentEvent = match[1].slice(0, -1); // strip last colon - handlers[currentEvent] = match[2]; - } else { - handlers[currentEvent] += line; - } - curlyCount += countCurlies(line); - } - - for (var eventName in handlers) { - addHxOnEventHandler(elt, eventName, handlers[eventName]); - } - } - } - - function processHxOnWildcard(elt) { - // wipe any previous on handlers so that this function takes precedence - deInitOnHandlers(elt) - - for (var i = 0; i < elt.attributes.length; i++) { - var name = elt.attributes[i].name - var value = elt.attributes[i].value - if (startsWith(name, "hx-on") || startsWith(name, "data-hx-on")) { - var afterOnPosition = name.indexOf("-on") + 3; - var nextChar = name.slice(afterOnPosition, afterOnPosition + 1); - if (nextChar === "-" || nextChar === ":") { - var eventName = name.slice(afterOnPosition + 1); - // if the eventName starts with a colon or dash, prepend "htmx" for shorthand support - if (startsWith(eventName, ":")) { - eventName = "htmx" + eventName - } else if (startsWith(eventName, "-")) { - eventName = "htmx:" + eventName.slice(1); - } else if (startsWith(eventName, "htmx-")) { - eventName = "htmx:" + eventName.slice(5); - } - - addHxOnEventHandler(elt, eventName, value) - } - } - } - } - - function initNode(elt) { - if (closest(elt, htmx.config.disableSelector)) { - cleanUpElement(elt) - return; - } - var nodeData = getInternalData(elt); - if (nodeData.initHash !== attributeHash(elt)) { - // clean up any previously processed info - deInitNode(elt); - - nodeData.initHash = attributeHash(elt); - - processHxOn(elt); - - triggerEvent(elt, "htmx:beforeProcessNode") - - if (elt.value) { - nodeData.lastValue = elt.value; - } - - var triggerSpecs = getTriggerSpecs(elt); - var hasExplicitHttpAction = processVerbs(elt, nodeData, triggerSpecs); - - if (!hasExplicitHttpAction) { - if (getClosestAttributeValue(elt, "hx-boost") === "true") { - boostElement(elt, nodeData, triggerSpecs); - } else if (hasAttribute(elt, 'hx-trigger')) { - triggerSpecs.forEach(function (triggerSpec) { - // For "naked" triggers, don't do anything at all - addTriggerHandler(elt, triggerSpec, nodeData, function () { - }) - }) - } - } - - // Handle submit buttons/inputs that have the form attribute set - // see https://developer.mozilla.org/docs/Web/HTML/Element/button - if (elt.tagName === "FORM" || (getRawAttribute(elt, "type") === "submit" && hasAttribute(elt, "form"))) { - initButtonTracking(elt) - } - - var sseInfo = getAttributeValue(elt, 'hx-sse'); - if (sseInfo) { - processSSEInfo(elt, nodeData, sseInfo); - } - - var wsInfo = getAttributeValue(elt, 'hx-ws'); - if (wsInfo) { - processWebSocketInfo(elt, nodeData, wsInfo); - } - triggerEvent(elt, "htmx:afterProcessNode"); - } - } - - function processNode(elt) { - elt = resolveTarget(elt); - if (closest(elt, htmx.config.disableSelector)) { - cleanUpElement(elt) - return; - } - initNode(elt); - forEach(findElementsToProcess(elt), function(child) { initNode(child) }); - // Because it happens second, the new way of adding onHandlers superseeds the old one - // i.e. if there are any hx-on:eventName attributes, the hx-on attribute will be ignored - forEach(findHxOnWildcardElements(elt), processHxOnWildcard); - } - - //==================================================================== - // Event/Log Support - //==================================================================== - - function kebabEventName(str) { - return str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase(); - } - - function makeEvent(eventName, detail) { - var evt; - if (window.CustomEvent && typeof window.CustomEvent === 'function') { - evt = new CustomEvent(eventName, {bubbles: true, cancelable: true, detail: detail}); - } else { - evt = getDocument().createEvent('CustomEvent'); - evt.initCustomEvent(eventName, true, true, detail); - } - return evt; - } - - function triggerErrorEvent(elt, eventName, detail) { - triggerEvent(elt, eventName, mergeObjects({error:eventName}, detail)); - } - - function ignoreEventForLogging(eventName) { - return eventName === "htmx:afterProcessNode" - } - - /** - * `withExtensions` locates all active extensions for a provided element, then - * executes the provided function using each of the active extensions. It should - * be called internally at every extendable execution point in htmx. - * - * @param {HTMLElement} elt - * @param {(extension:import("./htmx").HtmxExtension) => void} toDo - * @returns void - */ - function withExtensions(elt, toDo) { - forEach(getExtensions(elt), function(extension){ - try { - toDo(extension); - } catch (e) { - logError(e); - } - }); - } - - function logError(msg) { - if(console.error) { - console.error(msg); - } else if (console.log) { - console.log("ERROR: ", msg); - } - } - - function triggerEvent(elt, eventName, detail) { - elt = resolveTarget(elt); - if (detail == null) { - detail = {}; - } - detail["elt"] = elt; - var event = makeEvent(eventName, detail); - if (htmx.logger && !ignoreEventForLogging(eventName)) { - htmx.logger(elt, eventName, detail); - } - if (detail.error) { - logError(detail.error); - triggerEvent(elt, "htmx:error", {errorInfo:detail}) - } - var eventResult = elt.dispatchEvent(event); - var kebabName = kebabEventName(eventName); - if (eventResult && kebabName !== eventName) { - var kebabedEvent = makeEvent(kebabName, event.detail); - eventResult = eventResult && elt.dispatchEvent(kebabedEvent) - } - withExtensions(elt, function (extension) { - eventResult = eventResult && (extension.onEvent(eventName, event) !== false && !event.defaultPrevented) - }); - return eventResult; - } - - //==================================================================== - // History Support - //==================================================================== - var currentPathForHistory = location.pathname+location.search; - - function getHistoryElement() { - var historyElt = getDocument().querySelector('[hx-history-elt],[data-hx-history-elt]'); - return historyElt || getDocument().body; - } - - function saveToHistoryCache(url, content, title, scroll) { - if (!canAccessLocalStorage()) { - return; - } - - if (htmx.config.historyCacheSize <= 0) { - // make sure that an eventually already existing cache is purged - localStorage.removeItem("htmx-history-cache"); - return; - } - - url = normalizePath(url); - - var historyCache = parseJSON(localStorage.getItem("htmx-history-cache")) || []; - for (var i = 0; i < historyCache.length; i++) { - if (historyCache[i].url === url) { - historyCache.splice(i, 1); - break; - } - } - var newHistoryItem = {url:url, content: content, title:title, scroll:scroll}; - triggerEvent(getDocument().body, "htmx:historyItemCreated", {item:newHistoryItem, cache: historyCache}) - historyCache.push(newHistoryItem) - while (historyCache.length > htmx.config.historyCacheSize) { - historyCache.shift(); - } - while(historyCache.length > 0){ - try { - localStorage.setItem("htmx-history-cache", JSON.stringify(historyCache)); - break; - } catch (e) { - triggerErrorEvent(getDocument().body, "htmx:historyCacheError", {cause:e, cache: historyCache}) - historyCache.shift(); // shrink the cache and retry - } - } - } - - function getCachedHistory(url) { - if (!canAccessLocalStorage()) { - return null; - } - - url = normalizePath(url); - - var historyCache = parseJSON(localStorage.getItem("htmx-history-cache")) || []; - for (var i = 0; i < historyCache.length; i++) { - if (historyCache[i].url === url) { - return historyCache[i]; - } - } - return null; - } - - function cleanInnerHtmlForHistory(elt) { - var className = htmx.config.requestClass; - var clone = elt.cloneNode(true); - forEach(findAll(clone, "." + className), function(child){ - removeClassFromElement(child, className); - }); - return clone.innerHTML; - } - - function saveCurrentPageToHistory() { - var elt = getHistoryElement(); - var path = currentPathForHistory || location.pathname+location.search; - - // Allow history snapshot feature to be disabled where hx-history="false" - // is present *anywhere* in the current document we're about to save, - // so we can prevent privileged data entering the cache. - // The page will still be reachable as a history entry, but htmx will fetch it - // live from the server onpopstate rather than look in the localStorage cache - var disableHistoryCache - try { - disableHistoryCache = getDocument().querySelector('[hx-history="false" i],[data-hx-history="false" i]') - } catch (e) { - // IE11: insensitive modifier not supported so fallback to case sensitive selector - disableHistoryCache = getDocument().querySelector('[hx-history="false"],[data-hx-history="false"]') - } - if (!disableHistoryCache) { - triggerEvent(getDocument().body, "htmx:beforeHistorySave", {path: path, historyElt: elt}); - saveToHistoryCache(path, cleanInnerHtmlForHistory(elt), getDocument().title, window.scrollY); - } - - if (htmx.config.historyEnabled) history.replaceState({htmx: true}, getDocument().title, window.location.href); - } - - function pushUrlIntoHistory(path) { - // remove the cache buster parameter, if any - if (htmx.config.getCacheBusterParam) { - path = path.replace(/org\.htmx\.cache-buster=[^&]*&?/, '') - if (endsWith(path, '&') || endsWith(path, "?")) { - path = path.slice(0, -1); - } - } - if(htmx.config.historyEnabled) { - history.pushState({htmx:true}, "", path); - } - currentPathForHistory = path; - } - - function replaceUrlInHistory(path) { - if(htmx.config.historyEnabled) history.replaceState({htmx:true}, "", path); - currentPathForHistory = path; - } - - function settleImmediately(tasks) { - forEach(tasks, function (task) { - task.call(); - }); - } - - function loadHistoryFromServer(path) { - var request = new XMLHttpRequest(); - var details = {path: path, xhr:request}; - triggerEvent(getDocument().body, "htmx:historyCacheMiss", details); - request.open('GET', path, true); - request.setRequestHeader("HX-Request", "true"); - request.setRequestHeader("HX-History-Restore-Request", "true"); - request.setRequestHeader("HX-Current-URL", getDocument().location.href); - request.onload = function () { - if (this.status >= 200 && this.status < 400) { - triggerEvent(getDocument().body, "htmx:historyCacheMissLoad", details); - var fragment = makeFragment(this.response); - // @ts-ignore - fragment = fragment.querySelector('[hx-history-elt],[data-hx-history-elt]') || fragment; - var historyElement = getHistoryElement(); - var settleInfo = makeSettleInfo(historyElement); - var title = findTitle(this.response); - if (title) { - var titleElt = find("title"); - if (titleElt) { - titleElt.innerHTML = title; - } else { - window.document.title = title; - } - } - // @ts-ignore - swapInnerHTML(historyElement, fragment, settleInfo) - settleImmediately(settleInfo.tasks); - currentPathForHistory = path; - triggerEvent(getDocument().body, "htmx:historyRestore", {path: path, cacheMiss:true, serverResponse:this.response}); - } else { - triggerErrorEvent(getDocument().body, "htmx:historyCacheMissLoadError", details); - } - }; - request.send(); - } - - function restoreHistory(path) { - saveCurrentPageToHistory(); - path = path || location.pathname+location.search; - var cached = getCachedHistory(path); - if (cached) { - var fragment = makeFragment(cached.content); - var historyElement = getHistoryElement(); - var settleInfo = makeSettleInfo(historyElement); - swapInnerHTML(historyElement, fragment, settleInfo) - settleImmediately(settleInfo.tasks); - document.title = cached.title; - setTimeout(function () { - window.scrollTo(0, cached.scroll); - }, 0); // next 'tick', so browser has time to render layout - currentPathForHistory = path; - triggerEvent(getDocument().body, "htmx:historyRestore", {path:path, item:cached}); - } else { - if (htmx.config.refreshOnHistoryMiss) { - - // @ts-ignore: optional parameter in reload() function throws error - window.location.reload(true); - } else { - loadHistoryFromServer(path); - } - } - } - - function addRequestIndicatorClasses(elt) { - var indicators = findAttributeTargets(elt, 'hx-indicator'); - if (indicators == null) { - indicators = [elt]; - } - forEach(indicators, function (ic) { - var internalData = getInternalData(ic); - internalData.requestCount = (internalData.requestCount || 0) + 1; - ic.classList["add"].call(ic.classList, htmx.config.requestClass); - }); - return indicators; - } - - function disableElements(elt) { - var disabledElts = findAttributeTargets(elt, 'hx-disabled-elt'); - if (disabledElts == null) { - disabledElts = []; - } - forEach(disabledElts, function (disabledElement) { - var internalData = getInternalData(disabledElement); - internalData.requestCount = (internalData.requestCount || 0) + 1; - disabledElement.setAttribute("disabled", ""); - }); - return disabledElts; - } - - function removeRequestIndicators(indicators, disabled) { - forEach(indicators, function (ic) { - var internalData = getInternalData(ic); - internalData.requestCount = (internalData.requestCount || 0) - 1; - if (internalData.requestCount === 0) { - ic.classList["remove"].call(ic.classList, htmx.config.requestClass); - } - }); - forEach(disabled, function (disabledElement) { - var internalData = getInternalData(disabledElement); - internalData.requestCount = (internalData.requestCount || 0) - 1; - if (internalData.requestCount === 0) { - disabledElement.removeAttribute('disabled'); - } - }); - } - - //==================================================================== - // Input Value Processing - //==================================================================== - - function haveSeenNode(processed, elt) { - for (var i = 0; i < processed.length; i++) { - var node = processed[i]; - if (node.isSameNode(elt)) { - return true; - } - } - return false; - } - - function shouldInclude(elt) { - if(elt.name === "" || elt.name == null || elt.disabled || closest(elt, "fieldset[disabled]")) { - return false; - } - // ignore "submitter" types (see jQuery src/serialize.js) - if (elt.type === "button" || elt.type === "submit" || elt.tagName === "image" || elt.tagName === "reset" || elt.tagName === "file" ) { - return false; - } - if (elt.type === "checkbox" || elt.type === "radio" ) { - return elt.checked; - } - return true; - } - - function addValueToValues(name, value, values) { - // This is a little ugly because both the current value of the named value in the form - // and the new value could be arrays, so we have to handle all four cases :/ - if (name != null && value != null) { - var current = values[name]; - if (current === undefined) { - values[name] = value; - } else if (Array.isArray(current)) { - if (Array.isArray(value)) { - values[name] = current.concat(value); - } else { - current.push(value); - } - } else { - if (Array.isArray(value)) { - values[name] = [current].concat(value); - } else { - values[name] = [current, value]; - } - } - } - } - - function processInputValue(processed, values, errors, elt, validate) { - if (elt == null || haveSeenNode(processed, elt)) { - return; - } else { - processed.push(elt); - } - if (shouldInclude(elt)) { - var name = getRawAttribute(elt,"name"); - var value = elt.value; - if (elt.multiple && elt.tagName === "SELECT") { - value = toArray(elt.querySelectorAll("option:checked")).map(function (e) { return e.value }); - } - // include file inputs - if (elt.files) { - value = toArray(elt.files); - } - addValueToValues(name, value, values); - if (validate) { - validateElement(elt, errors); - } - } - if (matches(elt, 'form')) { - var inputs = elt.elements; - forEach(inputs, function(input) { - processInputValue(processed, values, errors, input, validate); - }); - } - } - - function validateElement(element, errors) { - if (element.willValidate) { - triggerEvent(element, "htmx:validation:validate") - if (!element.checkValidity()) { - errors.push({elt: element, message:element.validationMessage, validity:element.validity}); - triggerEvent(element, "htmx:validation:failed", {message:element.validationMessage, validity:element.validity}) - } - } - } - - /** - * @param {HTMLElement} elt - * @param {string} verb - */ - function getInputValues(elt, verb) { - var processed = []; - var values = {}; - var formValues = {}; - var errors = []; - var internalData = getInternalData(elt); - if (internalData.lastButtonClicked && !bodyContains(internalData.lastButtonClicked)) { - internalData.lastButtonClicked = null - } - - // only validate when form is directly submitted and novalidate or formnovalidate are not set - // or if the element has an explicit hx-validate="true" on it - var validate = (matches(elt, 'form') && elt.noValidate !== true) || getAttributeValue(elt, "hx-validate") === "true"; - if (internalData.lastButtonClicked) { - validate = validate && internalData.lastButtonClicked.formNoValidate !== true; - } - - // for a non-GET include the closest form - if (verb !== 'get') { - processInputValue(processed, formValues, errors, closest(elt, 'form'), validate); - } - - // include the element itself - processInputValue(processed, values, errors, elt, validate); - - // if a button or submit was clicked last, include its value - if (internalData.lastButtonClicked || elt.tagName === "BUTTON" || - (elt.tagName === "INPUT" && getRawAttribute(elt, "type") === "submit")) { - var button = internalData.lastButtonClicked || elt - var name = getRawAttribute(button, "name") - addValueToValues(name, button.value, formValues) - } - - // include any explicit includes - var includes = findAttributeTargets(elt, "hx-include"); - forEach(includes, function(node) { - processInputValue(processed, values, errors, node, validate); - // if a non-form is included, include any input values within it - if (!matches(node, 'form')) { - forEach(node.querySelectorAll(INPUT_SELECTOR), function (descendant) { - processInputValue(processed, values, errors, descendant, validate); - }) - } - }); - - // form values take precedence, overriding the regular values - values = mergeObjects(values, formValues); - - return {errors:errors, values:values}; - } - - function appendParam(returnStr, name, realValue) { - if (returnStr !== "") { - returnStr += "&"; - } - if (String(realValue) === "[object Object]") { - realValue = JSON.stringify(realValue); - } - var s = encodeURIComponent(realValue); - returnStr += encodeURIComponent(name) + "=" + s; - return returnStr; - } - - function urlEncode(values) { - var returnStr = ""; - for (var name in values) { - if (values.hasOwnProperty(name)) { - var value = values[name]; - if (Array.isArray(value)) { - forEach(value, function(v) { - returnStr = appendParam(returnStr, name, v); - }); - } else { - returnStr = appendParam(returnStr, name, value); - } - } - } - return returnStr; - } - - function makeFormData(values) { - var formData = new FormData(); - for (var name in values) { - if (values.hasOwnProperty(name)) { - var value = values[name]; - if (Array.isArray(value)) { - forEach(value, function(v) { - formData.append(name, v); - }); - } else { - formData.append(name, value); - } - } - } - return formData; - } - - //==================================================================== - // Ajax - //==================================================================== - - /** - * @param {HTMLElement} elt - * @param {HTMLElement} target - * @param {string} prompt - * @returns {Object} // TODO: Define/Improve HtmxHeaderSpecification - */ - function getHeaders(elt, target, prompt) { - var headers = { - "HX-Request" : "true", - "HX-Trigger" : getRawAttribute(elt, "id"), - "HX-Trigger-Name" : getRawAttribute(elt, "name"), - "HX-Target" : getAttributeValue(target, "id"), - "HX-Current-URL" : getDocument().location.href, - } - getValuesForElement(elt, "hx-headers", false, headers) - if (prompt !== undefined) { - headers["HX-Prompt"] = prompt; - } - if (getInternalData(elt).boosted) { - headers["HX-Boosted"] = "true"; - } - return headers; - } - - /** - * filterValues takes an object containing form input values - * and returns a new object that only contains keys that are - * specified by the closest "hx-params" attribute - * @param {Object} inputValues - * @param {HTMLElement} elt - * @returns {Object} - */ - function filterValues(inputValues, elt) { - var paramsValue = getClosestAttributeValue(elt, "hx-params"); - if (paramsValue) { - if (paramsValue === "none") { - return {}; - } else if (paramsValue === "*") { - return inputValues; - } else if(paramsValue.indexOf("not ") === 0) { - forEach(paramsValue.substr(4).split(","), function (name) { - name = name.trim(); - delete inputValues[name]; - }); - return inputValues; - } else { - var newValues = {} - forEach(paramsValue.split(","), function (name) { - name = name.trim(); - newValues[name] = inputValues[name]; - }); - return newValues; - } - } else { - return inputValues; - } - } - - function isAnchorLink(elt) { - return getRawAttribute(elt, 'href') && getRawAttribute(elt, 'href').indexOf("#") >=0 - } - - /** - * - * @param {HTMLElement} elt - * @param {string} swapInfoOverride - * @returns {import("./htmx").HtmxSwapSpecification} - */ - function getSwapSpecification(elt, swapInfoOverride) { - var swapInfo = swapInfoOverride ? swapInfoOverride : getClosestAttributeValue(elt, "hx-swap"); - var swapSpec = { - "swapStyle" : getInternalData(elt).boosted ? 'innerHTML' : htmx.config.defaultSwapStyle, - "swapDelay" : htmx.config.defaultSwapDelay, - "settleDelay" : htmx.config.defaultSettleDelay - } - if (htmx.config.scrollIntoViewOnBoost && getInternalData(elt).boosted && !isAnchorLink(elt)) { - swapSpec["show"] = "top" - } - if (swapInfo) { - var split = splitOnWhitespace(swapInfo); - if (split.length > 0) { - for (var i = 0; i < split.length; i++) { - var value = split[i]; - if (value.indexOf("swap:") === 0) { - swapSpec["swapDelay"] = parseInterval(value.substr(5)); - } else if (value.indexOf("settle:") === 0) { - swapSpec["settleDelay"] = parseInterval(value.substr(7)); - } else if (value.indexOf("transition:") === 0) { - swapSpec["transition"] = value.substr(11) === "true"; - } else if (value.indexOf("ignoreTitle:") === 0) { - swapSpec["ignoreTitle"] = value.substr(12) === "true"; - } else if (value.indexOf("scroll:") === 0) { - var scrollSpec = value.substr(7); - var splitSpec = scrollSpec.split(":"); - var scrollVal = splitSpec.pop(); - var selectorVal = splitSpec.length > 0 ? splitSpec.join(":") : null; - swapSpec["scroll"] = scrollVal; - swapSpec["scrollTarget"] = selectorVal; - } else if (value.indexOf("show:") === 0) { - var showSpec = value.substr(5); - var splitSpec = showSpec.split(":"); - var showVal = splitSpec.pop(); - var selectorVal = splitSpec.length > 0 ? splitSpec.join(":") : null; - swapSpec["show"] = showVal; - swapSpec["showTarget"] = selectorVal; - } else if (value.indexOf("focus-scroll:") === 0) { - var focusScrollVal = value.substr("focus-scroll:".length); - swapSpec["focusScroll"] = focusScrollVal == "true"; - } else if (i == 0) { - swapSpec["swapStyle"] = value; - } else { - logError('Unknown modifier in hx-swap: ' + value); - } - } - } - } - return swapSpec; - } - - function usesFormData(elt) { - return getClosestAttributeValue(elt, "hx-encoding") === "multipart/form-data" || - (matches(elt, "form") && getRawAttribute(elt, 'enctype') === "multipart/form-data"); - } - - function encodeParamsForBody(xhr, elt, filteredParameters) { - var encodedParameters = null; - withExtensions(elt, function (extension) { - if (encodedParameters == null) { - encodedParameters = extension.encodeParameters(xhr, filteredParameters, elt); - } - }); - if (encodedParameters != null) { - return encodedParameters; - } else { - if (usesFormData(elt)) { - return makeFormData(filteredParameters); - } else { - return urlEncode(filteredParameters); - } - } - } - - /** - * - * @param {Element} target - * @returns {import("./htmx").HtmxSettleInfo} - */ - function makeSettleInfo(target) { - return {tasks: [], elts: [target]}; - } - - function updateScrollState(content, swapSpec) { - var first = content[0]; - var last = content[content.length - 1]; - if (swapSpec.scroll) { - var target = null; - if (swapSpec.scrollTarget) { - target = querySelectorExt(first, swapSpec.scrollTarget); - } - if (swapSpec.scroll === "top" && (first || target)) { - target = target || first; - target.scrollTop = 0; - } - if (swapSpec.scroll === "bottom" && (last || target)) { - target = target || last; - target.scrollTop = target.scrollHeight; - } - } - if (swapSpec.show) { - var target = null; - if (swapSpec.showTarget) { - var targetStr = swapSpec.showTarget; - if (swapSpec.showTarget === "window") { - targetStr = "body"; - } - target = querySelectorExt(first, targetStr); - } - if (swapSpec.show === "top" && (first || target)) { - target = target || first; - target.scrollIntoView({block:'start', behavior: htmx.config.scrollBehavior}); - } - if (swapSpec.show === "bottom" && (last || target)) { - target = target || last; - target.scrollIntoView({block:'end', behavior: htmx.config.scrollBehavior}); - } - } - } - - /** - * @param {HTMLElement} elt - * @param {string} attr - * @param {boolean=} evalAsDefault - * @param {Object=} values - * @returns {Object} - */ - function getValuesForElement(elt, attr, evalAsDefault, values) { - if (values == null) { - values = {}; - } - if (elt == null) { - return values; - } - var attributeValue = getAttributeValue(elt, attr); - if (attributeValue) { - var str = attributeValue.trim(); - var evaluateValue = evalAsDefault; - if (str === "unset") { - return null; - } - if (str.indexOf("javascript:") === 0) { - str = str.substr(11); - evaluateValue = true; - } else if (str.indexOf("js:") === 0) { - str = str.substr(3); - evaluateValue = true; - } - if (str.indexOf('{') !== 0) { - str = "{" + str + "}"; - } - var varsValues; - if (evaluateValue) { - varsValues = maybeEval(elt,function () {return Function("return (" + str + ")")();}, {}); - } else { - varsValues = parseJSON(str); - } - for (var key in varsValues) { - if (varsValues.hasOwnProperty(key)) { - if (values[key] == null) { - values[key] = varsValues[key]; - } - } - } - } - return getValuesForElement(parentElt(elt), attr, evalAsDefault, values); - } - - function maybeEval(elt, toEval, defaultVal) { - if (htmx.config.allowEval) { - return toEval(); - } else { - triggerErrorEvent(elt, 'htmx:evalDisallowedError'); - return defaultVal; - } - } - - /** - * @param {HTMLElement} elt - * @param {*} expressionVars - * @returns - */ - function getHXVarsForElement(elt, expressionVars) { - return getValuesForElement(elt, "hx-vars", true, expressionVars); - } - - /** - * @param {HTMLElement} elt - * @param {*} expressionVars - * @returns - */ - function getHXValsForElement(elt, expressionVars) { - return getValuesForElement(elt, "hx-vals", false, expressionVars); - } - - /** - * @param {HTMLElement} elt - * @returns {Object} - */ - function getExpressionVars(elt) { - return mergeObjects(getHXVarsForElement(elt), getHXValsForElement(elt)); - } - - function safelySetHeaderValue(xhr, header, headerValue) { - if (headerValue !== null) { - try { - xhr.setRequestHeader(header, headerValue); - } catch (e) { - // On an exception, try to set the header URI encoded instead - xhr.setRequestHeader(header, encodeURIComponent(headerValue)); - xhr.setRequestHeader(header + "-URI-AutoEncoded", "true"); - } - } - } - - function getPathFromResponse(xhr) { - // NB: IE11 does not support this stuff - if (xhr.responseURL && typeof(URL) !== "undefined") { - try { - var url = new URL(xhr.responseURL); - return url.pathname + url.search; - } catch (e) { - triggerErrorEvent(getDocument().body, "htmx:badResponseUrl", {url: xhr.responseURL}); - } - } - } - - function hasHeader(xhr, regexp) { - return regexp.test(xhr.getAllResponseHeaders()) - } - - function ajaxHelper(verb, path, context) { - verb = verb.toLowerCase(); - if (context) { - if (context instanceof Element || isType(context, 'String')) { - return issueAjaxRequest(verb, path, null, null, { - targetOverride: resolveTarget(context), - returnPromise: true - }); - } else { - return issueAjaxRequest(verb, path, resolveTarget(context.source), context.event, - { - handler : context.handler, - headers : context.headers, - values : context.values, - targetOverride: resolveTarget(context.target), - swapOverride: context.swap, - select: context.select, - returnPromise: true - }); - } - } else { - return issueAjaxRequest(verb, path, null, null, { - returnPromise: true - }); - } - } - - function hierarchyForElt(elt) { - var arr = []; - while (elt) { - arr.push(elt); - elt = elt.parentElement; - } - return arr; - } - - function verifyPath(elt, path, requestConfig) { - var sameHost - var url - if (typeof URL === "function") { - url = new URL(path, document.location.href); - var origin = document.location.origin; - sameHost = origin === url.origin; - } else { - // IE11 doesn't support URL - url = path - sameHost = startsWith(path, document.location.origin) - } - - if (htmx.config.selfRequestsOnly) { - if (!sameHost) { - return false; - } - } - return triggerEvent(elt, "htmx:validateUrl", mergeObjects({url: url, sameHost: sameHost}, requestConfig)); - } - - function issueAjaxRequest(verb, path, elt, event, etc, confirmed) { - var resolve = null; - var reject = null; - etc = etc != null ? etc : {}; - if(etc.returnPromise && typeof Promise !== "undefined"){ - var promise = new Promise(function (_resolve, _reject) { - resolve = _resolve; - reject = _reject; - }); - } - if(elt == null) { - elt = getDocument().body; - } - var responseHandler = etc.handler || handleAjaxResponse; - var select = etc.select || null; - - if (!bodyContains(elt)) { - // do not issue requests for elements removed from the DOM - maybeCall(resolve); - return promise; - } - var target = etc.targetOverride || getTarget(elt); - if (target == null || target == DUMMY_ELT) { - triggerErrorEvent(elt, 'htmx:targetError', {target: getAttributeValue(elt, "hx-target")}); - maybeCall(reject); - return promise; - } - - var eltData = getInternalData(elt); - var submitter = eltData.lastButtonClicked; - - if (submitter) { - var buttonPath = getRawAttribute(submitter, "formaction"); - if (buttonPath != null) { - path = buttonPath; - } - - var buttonVerb = getRawAttribute(submitter, "formmethod") - if (buttonVerb != null) { - // ignore buttons with formmethod="dialog" - if (buttonVerb.toLowerCase() !== "dialog") { - verb = buttonVerb; - } - } - } - - var confirmQuestion = getClosestAttributeValue(elt, "hx-confirm"); - // allow event-based confirmation w/ a callback - if (confirmed === undefined) { - var issueRequest = function(skipConfirmation) { - return issueAjaxRequest(verb, path, elt, event, etc, !!skipConfirmation); - } - var confirmDetails = {target: target, elt: elt, path: path, verb: verb, triggeringEvent: event, etc: etc, issueRequest: issueRequest, question: confirmQuestion}; - if (triggerEvent(elt, 'htmx:confirm', confirmDetails) === false) { - maybeCall(resolve); - return promise; - } - } - - var syncElt = elt; - var syncStrategy = getClosestAttributeValue(elt, "hx-sync"); - var queueStrategy = null; - var abortable = false; - if (syncStrategy) { - var syncStrings = syncStrategy.split(":"); - var selector = syncStrings[0].trim(); - if (selector === "this") { - syncElt = findThisElement(elt, 'hx-sync'); - } else { - syncElt = querySelectorExt(elt, selector); - } - // default to the drop strategy - syncStrategy = (syncStrings[1] || 'drop').trim(); - eltData = getInternalData(syncElt); - if (syncStrategy === "drop" && eltData.xhr && eltData.abortable !== true) { - maybeCall(resolve); - return promise; - } else if (syncStrategy === "abort") { - if (eltData.xhr) { - maybeCall(resolve); - return promise; - } else { - abortable = true; - } - } else if (syncStrategy === "replace") { - triggerEvent(syncElt, 'htmx:abort'); // abort the current request and continue - } else if (syncStrategy.indexOf("queue") === 0) { - var queueStrArray = syncStrategy.split(" "); - queueStrategy = (queueStrArray[1] || "last").trim(); - } - } - - if (eltData.xhr) { - if (eltData.abortable) { - triggerEvent(syncElt, 'htmx:abort'); // abort the current request and continue - } else { - if(queueStrategy == null){ - if (event) { - var eventData = getInternalData(event); - if (eventData && eventData.triggerSpec && eventData.triggerSpec.queue) { - queueStrategy = eventData.triggerSpec.queue; - } - } - if (queueStrategy == null) { - queueStrategy = "last"; - } - } - if (eltData.queuedRequests == null) { - eltData.queuedRequests = []; - } - if (queueStrategy === "first" && eltData.queuedRequests.length === 0) { - eltData.queuedRequests.push(function () { - issueAjaxRequest(verb, path, elt, event, etc) - }); - } else if (queueStrategy === "all") { - eltData.queuedRequests.push(function () { - issueAjaxRequest(verb, path, elt, event, etc) - }); - } else if (queueStrategy === "last") { - eltData.queuedRequests = []; // dump existing queue - eltData.queuedRequests.push(function () { - issueAjaxRequest(verb, path, elt, event, etc) - }); - } - maybeCall(resolve); - return promise; - } - } - - var xhr = new XMLHttpRequest(); - eltData.xhr = xhr; - eltData.abortable = abortable; - var endRequestLock = function(){ - eltData.xhr = null; - eltData.abortable = false; - if (eltData.queuedRequests != null && - eltData.queuedRequests.length > 0) { - var queuedRequest = eltData.queuedRequests.shift(); - queuedRequest(); - } - } - var promptQuestion = getClosestAttributeValue(elt, "hx-prompt"); - if (promptQuestion) { - var promptResponse = prompt(promptQuestion); - // prompt returns null if cancelled and empty string if accepted with no entry - if (promptResponse === null || - !triggerEvent(elt, 'htmx:prompt', {prompt: promptResponse, target:target})) { - maybeCall(resolve); - endRequestLock(); - return promise; - } - } - - if (confirmQuestion && !confirmed) { - if(!confirm(confirmQuestion)) { - maybeCall(resolve); - endRequestLock() - return promise; - } - } - - - var headers = getHeaders(elt, target, promptResponse); - - if (verb !== 'get' && !usesFormData(elt)) { - headers['Content-Type'] = 'application/x-www-form-urlencoded'; - } - - if (etc.headers) { - headers = mergeObjects(headers, etc.headers); - } - var results = getInputValues(elt, verb); - var errors = results.errors; - var rawParameters = results.values; - if (etc.values) { - rawParameters = mergeObjects(rawParameters, etc.values); - } - var expressionVars = getExpressionVars(elt); - var allParameters = mergeObjects(rawParameters, expressionVars); - var filteredParameters = filterValues(allParameters, elt); - - if (htmx.config.getCacheBusterParam && verb === 'get') { - filteredParameters['org.htmx.cache-buster'] = getRawAttribute(target, "id") || "true"; - } - - // behavior of anchors w/ empty href is to use the current URL - if (path == null || path === "") { - path = getDocument().location.href; - } - - - var requestAttrValues = getValuesForElement(elt, 'hx-request'); - - var eltIsBoosted = getInternalData(elt).boosted; - - var useUrlParams = htmx.config.methodsThatUseUrlParams.indexOf(verb) >= 0 - - var requestConfig = { - boosted: eltIsBoosted, - useUrlParams: useUrlParams, - parameters: filteredParameters, - unfilteredParameters: allParameters, - headers:headers, - target:target, - verb:verb, - errors:errors, - withCredentials: etc.credentials || requestAttrValues.credentials || htmx.config.withCredentials, - timeout: etc.timeout || requestAttrValues.timeout || htmx.config.timeout, - path:path, - triggeringEvent:event - }; - - if(!triggerEvent(elt, 'htmx:configRequest', requestConfig)){ - maybeCall(resolve); - endRequestLock(); - return promise; - } - - // copy out in case the object was overwritten - path = requestConfig.path; - verb = requestConfig.verb; - headers = requestConfig.headers; - filteredParameters = requestConfig.parameters; - errors = requestConfig.errors; - useUrlParams = requestConfig.useUrlParams; - - if(errors && errors.length > 0){ - triggerEvent(elt, 'htmx:validation:halted', requestConfig) - maybeCall(resolve); - endRequestLock(); - return promise; - } - - var splitPath = path.split("#"); - var pathNoAnchor = splitPath[0]; - var anchor = splitPath[1]; - - var finalPath = path - if (useUrlParams) { - finalPath = pathNoAnchor; - var values = Object.keys(filteredParameters).length !== 0; - if (values) { - if (finalPath.indexOf("?") < 0) { - finalPath += "?"; - } else { - finalPath += "&"; - } - finalPath += urlEncode(filteredParameters); - if (anchor) { - finalPath += "#" + anchor; - } - } - } - - if (!verifyPath(elt, finalPath, requestConfig)) { - triggerErrorEvent(elt, 'htmx:invalidPath', requestConfig) - maybeCall(reject); - return promise; - }; - - xhr.open(verb.toUpperCase(), finalPath, true); - xhr.overrideMimeType("text/html"); - xhr.withCredentials = requestConfig.withCredentials; - xhr.timeout = requestConfig.timeout; - - // request headers - if (requestAttrValues.noHeaders) { - // ignore all headers - } else { - for (var header in headers) { - if (headers.hasOwnProperty(header)) { - var headerValue = headers[header]; - safelySetHeaderValue(xhr, header, headerValue); - } - } - } - - var responseInfo = { - xhr: xhr, target: target, requestConfig: requestConfig, etc: etc, boosted: eltIsBoosted, select: select, - pathInfo: { - requestPath: path, - finalRequestPath: finalPath, - anchor: anchor - } - }; - - xhr.onload = function () { - try { - var hierarchy = hierarchyForElt(elt); - responseInfo.pathInfo.responsePath = getPathFromResponse(xhr); - responseHandler(elt, responseInfo); - removeRequestIndicators(indicators, disableElts); - triggerEvent(elt, 'htmx:afterRequest', responseInfo); - triggerEvent(elt, 'htmx:afterOnLoad', responseInfo); - // if the body no longer contains the element, trigger the event on the closest parent - // remaining in the DOM - if (!bodyContains(elt)) { - var secondaryTriggerElt = null; - while (hierarchy.length > 0 && secondaryTriggerElt == null) { - var parentEltInHierarchy = hierarchy.shift(); - if (bodyContains(parentEltInHierarchy)) { - secondaryTriggerElt = parentEltInHierarchy; - } - } - if (secondaryTriggerElt) { - triggerEvent(secondaryTriggerElt, 'htmx:afterRequest', responseInfo); - triggerEvent(secondaryTriggerElt, 'htmx:afterOnLoad', responseInfo); - } - } - maybeCall(resolve); - endRequestLock(); - } catch (e) { - triggerErrorEvent(elt, 'htmx:onLoadError', mergeObjects({error:e}, responseInfo)); - throw e; - } - } - xhr.onerror = function () { - removeRequestIndicators(indicators, disableElts); - triggerErrorEvent(elt, 'htmx:afterRequest', responseInfo); - triggerErrorEvent(elt, 'htmx:sendError', responseInfo); - maybeCall(reject); - endRequestLock(); - } - xhr.onabort = function() { - removeRequestIndicators(indicators, disableElts); - triggerErrorEvent(elt, 'htmx:afterRequest', responseInfo); - triggerErrorEvent(elt, 'htmx:sendAbort', responseInfo); - maybeCall(reject); - endRequestLock(); - } - xhr.ontimeout = function() { - removeRequestIndicators(indicators, disableElts); - triggerErrorEvent(elt, 'htmx:afterRequest', responseInfo); - triggerErrorEvent(elt, 'htmx:timeout', responseInfo); - maybeCall(reject); - endRequestLock(); - } - if(!triggerEvent(elt, 'htmx:beforeRequest', responseInfo)){ - maybeCall(resolve); - endRequestLock() - return promise - } - var indicators = addRequestIndicatorClasses(elt); - var disableElts = disableElements(elt); - - forEach(['loadstart', 'loadend', 'progress', 'abort'], function(eventName) { - forEach([xhr, xhr.upload], function (target) { - target.addEventListener(eventName, function(event){ - triggerEvent(elt, "htmx:xhr:" + eventName, { - lengthComputable:event.lengthComputable, - loaded:event.loaded, - total:event.total - }); - }) - }); - }); - triggerEvent(elt, 'htmx:beforeSend', responseInfo); - var params = useUrlParams ? null : encodeParamsForBody(xhr, elt, filteredParameters) - xhr.send(params); - return promise; - } - - function determineHistoryUpdates(elt, responseInfo) { - - var xhr = responseInfo.xhr; - - //=========================================== - // First consult response headers - //=========================================== - var pathFromHeaders = null; - var typeFromHeaders = null; - if (hasHeader(xhr,/HX-Push:/i)) { - pathFromHeaders = xhr.getResponseHeader("HX-Push"); - typeFromHeaders = "push"; - } else if (hasHeader(xhr,/HX-Push-Url:/i)) { - pathFromHeaders = xhr.getResponseHeader("HX-Push-Url"); - typeFromHeaders = "push"; - } else if (hasHeader(xhr,/HX-Replace-Url:/i)) { - pathFromHeaders = xhr.getResponseHeader("HX-Replace-Url"); - typeFromHeaders = "replace"; - } - - // if there was a response header, that has priority - if (pathFromHeaders) { - if (pathFromHeaders === "false") { - return {} - } else { - return { - type: typeFromHeaders, - path : pathFromHeaders - } - } - } - - //=========================================== - // Next resolve via DOM values - //=========================================== - var requestPath = responseInfo.pathInfo.finalRequestPath; - var responsePath = responseInfo.pathInfo.responsePath; - - var pushUrl = getClosestAttributeValue(elt, "hx-push-url"); - var replaceUrl = getClosestAttributeValue(elt, "hx-replace-url"); - var elementIsBoosted = getInternalData(elt).boosted; - - var saveType = null; - var path = null; - - if (pushUrl) { - saveType = "push"; - path = pushUrl; - } else if (replaceUrl) { - saveType = "replace"; - path = replaceUrl; - } else if (elementIsBoosted) { - saveType = "push"; - path = responsePath || requestPath; // if there is no response path, go with the original request path - } - - if (path) { - // false indicates no push, return empty object - if (path === "false") { - return {}; - } - - // true indicates we want to follow wherever the server ended up sending us - if (path === "true") { - path = responsePath || requestPath; // if there is no response path, go with the original request path - } - - // restore any anchor associated with the request - if (responseInfo.pathInfo.anchor && - path.indexOf("#") === -1) { - path = path + "#" + responseInfo.pathInfo.anchor; - } - - return { - type:saveType, - path: path - } - } else { - return {}; - } - } - - function handleAjaxResponse(elt, responseInfo) { - var xhr = responseInfo.xhr; - var target = responseInfo.target; - var etc = responseInfo.etc; - var requestConfig = responseInfo.requestConfig; - var select = responseInfo.select; - - if (!triggerEvent(elt, 'htmx:beforeOnLoad', responseInfo)) return; - - if (hasHeader(xhr, /HX-Trigger:/i)) { - handleTrigger(xhr, "HX-Trigger", elt); - } - - if (hasHeader(xhr, /HX-Location:/i)) { - saveCurrentPageToHistory(); - var redirectPath = xhr.getResponseHeader("HX-Location"); - var swapSpec; - if (redirectPath.indexOf("{") === 0) { - swapSpec = parseJSON(redirectPath); - // what's the best way to throw an error if the user didn't include this - redirectPath = swapSpec['path']; - delete swapSpec['path']; - } - ajaxHelper('GET', redirectPath, swapSpec).then(function(){ - pushUrlIntoHistory(redirectPath); - }); - return; - } - - var shouldRefresh = hasHeader(xhr, /HX-Refresh:/i) && "true" === xhr.getResponseHeader("HX-Refresh"); - - if (hasHeader(xhr, /HX-Redirect:/i)) { - location.href = xhr.getResponseHeader("HX-Redirect"); - shouldRefresh && location.reload(); - return; - } - - if (shouldRefresh) { - location.reload(); - return; - } - - if (hasHeader(xhr,/HX-Retarget:/i)) { - if (xhr.getResponseHeader("HX-Retarget") === "this") { - responseInfo.target = elt; - } else { - responseInfo.target = querySelectorExt(elt, xhr.getResponseHeader("HX-Retarget")); - } - } - - var historyUpdate = determineHistoryUpdates(elt, responseInfo); - - // by default htmx only swaps on 200 return codes and does not swap - // on 204 'No Content' - // this can be ovverriden by responding to the htmx:beforeSwap event and - // overriding the detail.shouldSwap property - var shouldSwap = xhr.status >= 200 && xhr.status < 400 && xhr.status !== 204; - var serverResponse = xhr.response; - var isError = xhr.status >= 400; - var ignoreTitle = htmx.config.ignoreTitle - var beforeSwapDetails = mergeObjects({shouldSwap: shouldSwap, serverResponse:serverResponse, isError:isError, ignoreTitle:ignoreTitle }, responseInfo); - if (!triggerEvent(target, 'htmx:beforeSwap', beforeSwapDetails)) return; - - target = beforeSwapDetails.target; // allow re-targeting - serverResponse = beforeSwapDetails.serverResponse; // allow updating content - isError = beforeSwapDetails.isError; // allow updating error - ignoreTitle = beforeSwapDetails.ignoreTitle; // allow updating ignoring title - - responseInfo.target = target; // Make updated target available to response events - responseInfo.failed = isError; // Make failed property available to response events - responseInfo.successful = !isError; // Make successful property available to response events - - if (beforeSwapDetails.shouldSwap) { - if (xhr.status === 286) { - cancelPolling(elt); - } - - withExtensions(elt, function (extension) { - serverResponse = extension.transformResponse(serverResponse, xhr, elt); - }); - - // Save current page if there will be a history update - if (historyUpdate.type) { - saveCurrentPageToHistory(); - } - - var swapOverride = etc.swapOverride; - if (hasHeader(xhr,/HX-Reswap:/i)) { - swapOverride = xhr.getResponseHeader("HX-Reswap"); - } - var swapSpec = getSwapSpecification(elt, swapOverride); - - if (swapSpec.hasOwnProperty('ignoreTitle')) { - ignoreTitle = swapSpec.ignoreTitle; - } - - target.classList.add(htmx.config.swappingClass); - - // optional transition API promise callbacks - var settleResolve = null; - var settleReject = null; - - var doSwap = function () { - try { - var activeElt = document.activeElement; - var selectionInfo = {}; - try { - selectionInfo = { - elt: activeElt, - // @ts-ignore - start: activeElt ? activeElt.selectionStart : null, - // @ts-ignore - end: activeElt ? activeElt.selectionEnd : null - }; - } catch (e) { - // safari issue - see https://github.com/microsoft/playwright/issues/5894 - } - - var selectOverride; - if (select) { - selectOverride = select; - } - - if (hasHeader(xhr, /HX-Reselect:/i)) { - selectOverride = xhr.getResponseHeader("HX-Reselect"); - } - - // if we need to save history, do so, before swapping so that relative resources have the correct base URL - if (historyUpdate.type) { - triggerEvent(getDocument().body, 'htmx:beforeHistoryUpdate', mergeObjects({ history: historyUpdate }, responseInfo)); - if (historyUpdate.type === "push") { - pushUrlIntoHistory(historyUpdate.path); - triggerEvent(getDocument().body, 'htmx:pushedIntoHistory', {path: historyUpdate.path}); - } else { - replaceUrlInHistory(historyUpdate.path); - triggerEvent(getDocument().body, 'htmx:replacedInHistory', {path: historyUpdate.path}); - } - } - - var settleInfo = makeSettleInfo(target); - selectAndSwap(swapSpec.swapStyle, target, elt, serverResponse, settleInfo, selectOverride); - - if (selectionInfo.elt && - !bodyContains(selectionInfo.elt) && - getRawAttribute(selectionInfo.elt, "id")) { - var newActiveElt = document.getElementById(getRawAttribute(selectionInfo.elt, "id")); - var focusOptions = { preventScroll: swapSpec.focusScroll !== undefined ? !swapSpec.focusScroll : !htmx.config.defaultFocusScroll }; - if (newActiveElt) { - // @ts-ignore - if (selectionInfo.start && newActiveElt.setSelectionRange) { - // @ts-ignore - try { - newActiveElt.setSelectionRange(selectionInfo.start, selectionInfo.end); - } catch (e) { - // the setSelectionRange method is present on fields that don't support it, so just let this fail - } - } - newActiveElt.focus(focusOptions); - } - } - - target.classList.remove(htmx.config.swappingClass); - forEach(settleInfo.elts, function (elt) { - if (elt.classList) { - elt.classList.add(htmx.config.settlingClass); - } - triggerEvent(elt, 'htmx:afterSwap', responseInfo); - }); - - if (hasHeader(xhr, /HX-Trigger-After-Swap:/i)) { - var finalElt = elt; - if (!bodyContains(elt)) { - finalElt = getDocument().body; - } - handleTrigger(xhr, "HX-Trigger-After-Swap", finalElt); - } - - var doSettle = function () { - forEach(settleInfo.tasks, function (task) { - task.call(); - }); - forEach(settleInfo.elts, function (elt) { - if (elt.classList) { - elt.classList.remove(htmx.config.settlingClass); - } - triggerEvent(elt, 'htmx:afterSettle', responseInfo); - }); - - if (responseInfo.pathInfo.anchor) { - var anchorTarget = getDocument().getElementById(responseInfo.pathInfo.anchor); - if(anchorTarget) { - anchorTarget.scrollIntoView({block:'start', behavior: "auto"}); - } - } - - if(settleInfo.title && !ignoreTitle) { - var titleElt = find("title"); - if(titleElt) { - titleElt.innerHTML = settleInfo.title; - } else { - window.document.title = settleInfo.title; - } - } - - updateScrollState(settleInfo.elts, swapSpec); - - if (hasHeader(xhr, /HX-Trigger-After-Settle:/i)) { - var finalElt = elt; - if (!bodyContains(elt)) { - finalElt = getDocument().body; - } - handleTrigger(xhr, "HX-Trigger-After-Settle", finalElt); - } - maybeCall(settleResolve); - } - - if (swapSpec.settleDelay > 0) { - setTimeout(doSettle, swapSpec.settleDelay) - } else { - doSettle(); - } - } catch (e) { - triggerErrorEvent(elt, 'htmx:swapError', responseInfo); - maybeCall(settleReject); - throw e; - } - }; - - var shouldTransition = htmx.config.globalViewTransitions - if(swapSpec.hasOwnProperty('transition')){ - shouldTransition = swapSpec.transition; - } - - if(shouldTransition && - triggerEvent(elt, 'htmx:beforeTransition', responseInfo) && - typeof Promise !== "undefined" && document.startViewTransition){ - var settlePromise = new Promise(function (_resolve, _reject) { - settleResolve = _resolve; - settleReject = _reject; - }); - // wrap the original doSwap() in a call to startViewTransition() - var innerDoSwap = doSwap; - doSwap = function() { - document.startViewTransition(function () { - innerDoSwap(); - return settlePromise; - }); - } - } - - - if (swapSpec.swapDelay > 0) { - setTimeout(doSwap, swapSpec.swapDelay) - } else { - doSwap(); - } - } - if (isError) { - triggerErrorEvent(elt, 'htmx:responseError', mergeObjects({error: "Response Status Error Code " + xhr.status + " from " + responseInfo.pathInfo.requestPath}, responseInfo)); - } - } - - //==================================================================== - // Extensions API - //==================================================================== - - /** @type {Object} */ - var extensions = {}; - - /** - * extensionBase defines the default functions for all extensions. - * @returns {import("./htmx").HtmxExtension} - */ - function extensionBase() { - return { - init: function(api) {return null;}, - onEvent : function(name, evt) {return true;}, - transformResponse : function(text, xhr, elt) {return text;}, - isInlineSwap : function(swapStyle) {return false;}, - handleSwap : function(swapStyle, target, fragment, settleInfo) {return false;}, - encodeParameters : function(xhr, parameters, elt) {return null;} - } - } - - /** - * defineExtension initializes the extension and adds it to the htmx registry - * - * @param {string} name - * @param {import("./htmx").HtmxExtension} extension - */ - function defineExtension(name, extension) { - if(extension.init) { - extension.init(internalAPI) - } - extensions[name] = mergeObjects(extensionBase(), extension); - } - - /** - * removeExtension removes an extension from the htmx registry - * - * @param {string} name - */ - function removeExtension(name) { - delete extensions[name]; - } - - /** - * getExtensions searches up the DOM tree to return all extensions that can be applied to a given element - * - * @param {HTMLElement} elt - * @param {import("./htmx").HtmxExtension[]=} extensionsToReturn - * @param {import("./htmx").HtmxExtension[]=} extensionsToIgnore - */ - function getExtensions(elt, extensionsToReturn, extensionsToIgnore) { - - if (elt == undefined) { - return extensionsToReturn; - } - if (extensionsToReturn == undefined) { - extensionsToReturn = []; - } - if (extensionsToIgnore == undefined) { - extensionsToIgnore = []; - } - var extensionsForElement = getAttributeValue(elt, "hx-ext"); - if (extensionsForElement) { - forEach(extensionsForElement.split(","), function(extensionName){ - extensionName = extensionName.replace(/ /g, ''); - if (extensionName.slice(0, 7) == "ignore:") { - extensionsToIgnore.push(extensionName.slice(7)); - return; - } - if (extensionsToIgnore.indexOf(extensionName) < 0) { - var extension = extensions[extensionName]; - if (extension && extensionsToReturn.indexOf(extension) < 0) { - extensionsToReturn.push(extension); - } - } - }); - } - return getExtensions(parentElt(elt), extensionsToReturn, extensionsToIgnore); - } - - //==================================================================== - // Initialization - //==================================================================== - var isReady = false - getDocument().addEventListener('DOMContentLoaded', function() { - isReady = true - }) - - /** - * Execute a function now if DOMContentLoaded has fired, otherwise listen for it. - * - * This function uses isReady because there is no realiable way to ask the browswer whether - * the DOMContentLoaded event has already been fired; there's a gap between DOMContentLoaded - * firing and readystate=complete. - */ - function ready(fn) { - // Checking readyState here is a failsafe in case the htmx script tag entered the DOM by - // some means other than the initial page load. - if (isReady || getDocument().readyState === 'complete') { - fn(); - } else { - getDocument().addEventListener('DOMContentLoaded', fn); - } - } - - function insertIndicatorStyles() { - if (htmx.config.includeIndicatorStyles !== false) { - getDocument().head.insertAdjacentHTML("beforeend", - ""); - } - } - - function getMetaConfig() { - var element = getDocument().querySelector('meta[name="htmx-config"]'); - if (element) { - // @ts-ignore - return parseJSON(element.content); - } else { - return null; - } - } - - function mergeMetaConfig() { - var metaConfig = getMetaConfig(); - if (metaConfig) { - htmx.config = mergeObjects(htmx.config , metaConfig) - } - } - - // initialize the document - ready(function () { - mergeMetaConfig(); - insertIndicatorStyles(); - var body = getDocument().body; - processNode(body); - var restoredElts = getDocument().querySelectorAll( - "[hx-trigger='restored'],[data-hx-trigger='restored']" - ); - body.addEventListener("htmx:abort", function (evt) { - var target = evt.target; - var internalData = getInternalData(target); - if (internalData && internalData.xhr) { - internalData.xhr.abort(); - } - }); - /** @type {(ev: PopStateEvent) => any} */ - const originalPopstate = window.onpopstate ? window.onpopstate.bind(window) : null; - /** @type {(ev: PopStateEvent) => any} */ - window.onpopstate = function (event) { - if (event.state && event.state.htmx) { - restoreHistory(); - forEach(restoredElts, function(elt){ - triggerEvent(elt, 'htmx:restored', { - 'document': getDocument(), - 'triggerEvent': triggerEvent - }); - }); - } else { - if (originalPopstate) { - originalPopstate(event); - } - } - }; - setTimeout(function () { - triggerEvent(body, 'htmx:load', {}); // give ready handlers a chance to load up before firing this event - body = null; // kill reference for gc - }, 0); - }) - - return htmx; - } -)() -})); diff --git a/web/static/node_modules/htmx.org/dist/htmx.min.js b/web/static/node_modules/htmx.org/dist/htmx.min.js deleted file mode 100644 index de5f0f1a..00000000 --- a/web/static/node_modules/htmx.org/dist/htmx.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(e,t){if(typeof define==="function"&&define.amd){define([],t)}else if(typeof module==="object"&&module.exports){module.exports=t()}else{e.htmx=e.htmx||t()}})(typeof self!=="undefined"?self:this,function(){return function(){"use strict";var Q={onLoad:F,process:zt,on:de,off:ge,trigger:ce,ajax:Nr,find:C,findAll:f,closest:v,values:function(e,t){var r=dr(e,t||"post");return r.values},remove:_,addClass:z,removeClass:n,toggleClass:$,takeClass:W,defineExtension:Ur,removeExtension:Br,logAll:V,logNone:j,logger:null,config:{historyEnabled:true,historyCacheSize:10,refreshOnHistoryMiss:false,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:true,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:true,allowScriptTags:true,inlineScriptNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:false,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",useTemplateFragments:false,scrollBehavior:"smooth",defaultFocusScroll:false,getCacheBusterParam:false,globalViewTransitions:false,methodsThatUseUrlParams:["get"],selfRequestsOnly:false,ignoreTitle:false,scrollIntoViewOnBoost:true,triggerSpecsCache:null},parseInterval:d,_:t,createEventSource:function(e){return new EventSource(e,{withCredentials:true})},createWebSocket:function(e){var t=new WebSocket(e,[]);t.binaryType=Q.config.wsBinaryType;return t},version:"1.9.12"};var r={addTriggerHandler:Lt,bodyContains:se,canAccessLocalStorage:U,findThisElement:xe,filterValues:yr,hasAttribute:o,getAttributeValue:te,getClosestAttributeValue:ne,getClosestMatch:c,getExpressionVars:Hr,getHeaders:xr,getInputValues:dr,getInternalData:ae,getSwapSpecification:wr,getTriggerSpecs:it,getTarget:ye,makeFragment:l,mergeObjects:le,makeSettleInfo:T,oobSwap:Ee,querySelectorExt:ue,selectAndSwap:je,settleImmediately:nr,shouldCancel:ut,triggerEvent:ce,triggerErrorEvent:fe,withExtensions:R};var w=["get","post","put","delete","patch"];var i=w.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");var S=e("head"),q=e("title"),H=e("svg",true);function e(e,t){return new RegExp("<"+e+"(\\s[^>]*>|>)([\\s\\S]*?)<\\/"+e+">",!!t?"gim":"im")}function d(e){if(e==undefined){return undefined}let t=NaN;if(e.slice(-2)=="ms"){t=parseFloat(e.slice(0,-2))}else if(e.slice(-1)=="s"){t=parseFloat(e.slice(0,-1))*1e3}else if(e.slice(-1)=="m"){t=parseFloat(e.slice(0,-1))*1e3*60}else{t=parseFloat(e)}return isNaN(t)?undefined:t}function ee(e,t){return e.getAttribute&&e.getAttribute(t)}function o(e,t){return e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function te(e,t){return ee(e,t)||ee(e,"data-"+t)}function u(e){return e.parentElement}function re(){return document}function c(e,t){while(e&&!t(e)){e=u(e)}return e?e:null}function L(e,t,r){var n=te(t,r);var i=te(t,"hx-disinherit");if(e!==t&&i&&(i==="*"||i.split(" ").indexOf(r)>=0)){return"unset"}else{return n}}function ne(t,r){var n=null;c(t,function(e){return n=L(t,e,r)});if(n!=="unset"){return n}}function h(e,t){var r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return r&&r.call(e,t)}function A(e){var t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;var r=t.exec(e);if(r){return r[1].toLowerCase()}else{return""}}function s(e,t){var r=new DOMParser;var n=r.parseFromString(e,"text/html");var i=n.body;while(t>0){t--;i=i.firstChild}if(i==null){i=re().createDocumentFragment()}return i}function N(e){return/",0);var a=i.querySelector("template").content;if(Q.config.allowScriptTags){oe(a.querySelectorAll("script"),function(e){if(Q.config.inlineScriptNonce){e.nonce=Q.config.inlineScriptNonce}e.htmxExecuted=navigator.userAgent.indexOf("Firefox")===-1})}else{oe(a.querySelectorAll("script"),function(e){_(e)})}return a}switch(r){case"thead":case"tbody":case"tfoot":case"colgroup":case"caption":return s(""+n+"
    ",1);case"col":return s(""+n+"
    ",2);case"tr":return s(""+n+"
    ",2);case"td":case"th":return s(""+n+"
    ",3);case"script":case"style":return s("
    "+n+"
    ",1);default:return s(n,0)}}function ie(e){if(e){e()}}function I(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function k(e){return I(e,"Function")}function P(e){return I(e,"Object")}function ae(e){var t="htmx-internal-data";var r=e[t];if(!r){r=e[t]={}}return r}function M(e){var t=[];if(e){for(var r=0;r=0}function se(e){if(e.getRootNode&&e.getRootNode()instanceof window.ShadowRoot){return re().body.contains(e.getRootNode().host)}else{return re().body.contains(e)}}function D(e){return e.trim().split(/\s+/)}function le(e,t){for(var r in t){if(t.hasOwnProperty(r)){e[r]=t[r]}}return e}function E(e){try{return JSON.parse(e)}catch(e){b(e);return null}}function U(){var e="htmx:localStorageTest";try{localStorage.setItem(e,e);localStorage.removeItem(e);return true}catch(e){return false}}function B(t){try{var e=new URL(t);if(e){t=e.pathname+e.search}if(!/^\/$/.test(t)){t=t.replace(/\/+$/,"")}return t}catch(e){return t}}function t(e){return Tr(re().body,function(){return eval(e)})}function F(t){var e=Q.on("htmx:load",function(e){t(e.detail.elt)});return e}function V(){Q.logger=function(e,t,r){if(console){console.log(t,e,r)}}}function j(){Q.logger=null}function C(e,t){if(t){return e.querySelector(t)}else{return C(re(),e)}}function f(e,t){if(t){return e.querySelectorAll(t)}else{return f(re(),e)}}function _(e,t){e=p(e);if(t){setTimeout(function(){_(e);e=null},t)}else{e.parentElement.removeChild(e)}}function z(e,t,r){e=p(e);if(r){setTimeout(function(){z(e,t);e=null},r)}else{e.classList&&e.classList.add(t)}}function n(e,t,r){e=p(e);if(r){setTimeout(function(){n(e,t);e=null},r)}else{if(e.classList){e.classList.remove(t);if(e.classList.length===0){e.removeAttribute("class")}}}}function $(e,t){e=p(e);e.classList.toggle(t)}function W(e,t){e=p(e);oe(e.parentElement.children,function(e){n(e,t)});z(e,t)}function v(e,t){e=p(e);if(e.closest){return e.closest(t)}else{do{if(e==null||h(e,t)){return e}}while(e=e&&u(e));return null}}function g(e,t){return e.substring(0,t.length)===t}function G(e,t){return e.substring(e.length-t.length)===t}function J(e){var t=e.trim();if(g(t,"<")&&G(t,"/>")){return t.substring(1,t.length-2)}else{return t}}function Z(e,t){if(t.indexOf("closest ")===0){return[v(e,J(t.substr(8)))]}else if(t.indexOf("find ")===0){return[C(e,J(t.substr(5)))]}else if(t==="next"){return[e.nextElementSibling]}else if(t.indexOf("next ")===0){return[K(e,J(t.substr(5)))]}else if(t==="previous"){return[e.previousElementSibling]}else if(t.indexOf("previous ")===0){return[Y(e,J(t.substr(9)))]}else if(t==="document"){return[document]}else if(t==="window"){return[window]}else if(t==="body"){return[document.body]}else{return re().querySelectorAll(J(t))}}var K=function(e,t){var r=re().querySelectorAll(t);for(var n=0;n=0;n--){var i=r[n];if(i.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_FOLLOWING){return i}}};function ue(e,t){if(t){return Z(e,t)[0]}else{return Z(re().body,e)[0]}}function p(e){if(I(e,"String")){return C(e)}else{return e}}function ve(e,t,r){if(k(t)){return{target:re().body,event:e,listener:t}}else{return{target:p(e),event:t,listener:r}}}function de(t,r,n){jr(function(){var e=ve(t,r,n);e.target.addEventListener(e.event,e.listener)});var e=k(r);return e?r:n}function ge(t,r,n){jr(function(){var e=ve(t,r,n);e.target.removeEventListener(e.event,e.listener)});return k(r)?r:n}var pe=re().createElement("output");function me(e,t){var r=ne(e,t);if(r){if(r==="this"){return[xe(e,t)]}else{var n=Z(e,r);if(n.length===0){b('The selector "'+r+'" on '+t+" returned no matches!");return[pe]}else{return n}}}}function xe(e,t){return c(e,function(e){return te(e,t)!=null})}function ye(e){var t=ne(e,"hx-target");if(t){if(t==="this"){return xe(e,"hx-target")}else{return ue(e,t)}}else{var r=ae(e);if(r.boosted){return re().body}else{return e}}}function be(e){var t=Q.config.attributesToSettle;for(var r=0;r0){o=e.substr(0,e.indexOf(":"));t=e.substr(e.indexOf(":")+1,e.length)}else{o=e}var r=re().querySelectorAll(t);if(r){oe(r,function(e){var t;var r=i.cloneNode(true);t=re().createDocumentFragment();t.appendChild(r);if(!Se(o,e)){t=r}var n={shouldSwap:true,target:e,fragment:t};if(!ce(e,"htmx:oobBeforeSwap",n))return;e=n.target;if(n["shouldSwap"]){Fe(o,e,e,t,a)}oe(a.elts,function(e){ce(e,"htmx:oobAfterSwap",n)})});i.parentNode.removeChild(i)}else{i.parentNode.removeChild(i);fe(re().body,"htmx:oobErrorNoTarget",{content:i})}return e}function Ce(e,t,r){var n=ne(e,"hx-select-oob");if(n){var i=n.split(",");for(var a=0;a0){var r=t.replace("'","\\'");var n=e.tagName.replace(":","\\:");var i=o.querySelector(n+"[id='"+r+"']");if(i&&i!==o){var a=e.cloneNode();we(e,i);s.tasks.push(function(){we(e,a)})}}})}function Oe(e){return function(){n(e,Q.config.addedClass);zt(e);Nt(e);qe(e);ce(e,"htmx:load")}}function qe(e){var t="[autofocus]";var r=h(e,t)?e:e.querySelector(t);if(r!=null){r.focus()}}function a(e,t,r,n){Te(e,r,n);while(r.childNodes.length>0){var i=r.firstChild;z(i,Q.config.addedClass);e.insertBefore(i,t);if(i.nodeType!==Node.TEXT_NODE&&i.nodeType!==Node.COMMENT_NODE){n.tasks.push(Oe(i))}}}function He(e,t){var r=0;while(r-1){var t=e.replace(H,"");var r=t.match(q);if(r){return r[2]}}}function je(e,t,r,n,i,a){i.title=Ve(n);var o=l(n);if(o){Ce(r,o,i);o=Be(r,o,a);Re(o);return Fe(e,r,t,o,i)}}function _e(e,t,r){var n=e.getResponseHeader(t);if(n.indexOf("{")===0){var i=E(n);for(var a in i){if(i.hasOwnProperty(a)){var o=i[a];if(!P(o)){o={value:o}}ce(r,a,o)}}}else{var s=n.split(",");for(var l=0;l0){var o=t[0];if(o==="]"){n--;if(n===0){if(a===null){i=i+"true"}t.shift();i+=")})";try{var s=Tr(e,function(){return Function(i)()},function(){return true});s.source=i;return s}catch(e){fe(re().body,"htmx:syntax:error",{error:e,source:i});return null}}}else if(o==="["){n++}if(Qe(o,a,r)){i+="(("+r+"."+o+") ? ("+r+"."+o+") : (window."+o+"))"}else{i=i+o}a=t.shift()}}}function y(e,t){var r="";while(e.length>0&&!t.test(e[0])){r+=e.shift()}return r}function tt(e){var t;if(e.length>0&&Ze.test(e[0])){e.shift();t=y(e,Ke).trim();e.shift()}else{t=y(e,x)}return t}var rt="input, textarea, select";function nt(e,t,r){var n=[];var i=Ye(t);do{y(i,Je);var a=i.length;var o=y(i,/[,\[\s]/);if(o!==""){if(o==="every"){var s={trigger:"every"};y(i,Je);s.pollInterval=d(y(i,/[,\[\s]/));y(i,Je);var l=et(e,i,"event");if(l){s.eventFilter=l}n.push(s)}else if(o.indexOf("sse:")===0){n.push({trigger:"sse",sseEvent:o.substr(4)})}else{var u={trigger:o};var l=et(e,i,"event");if(l){u.eventFilter=l}while(i.length>0&&i[0]!==","){y(i,Je);var f=i.shift();if(f==="changed"){u.changed=true}else if(f==="once"){u.once=true}else if(f==="consume"){u.consume=true}else if(f==="delay"&&i[0]===":"){i.shift();u.delay=d(y(i,x))}else if(f==="from"&&i[0]===":"){i.shift();if(Ze.test(i[0])){var c=tt(i)}else{var c=y(i,x);if(c==="closest"||c==="find"||c==="next"||c==="previous"){i.shift();var h=tt(i);if(h.length>0){c+=" "+h}}}u.from=c}else if(f==="target"&&i[0]===":"){i.shift();u.target=tt(i)}else if(f==="throttle"&&i[0]===":"){i.shift();u.throttle=d(y(i,x))}else if(f==="queue"&&i[0]===":"){i.shift();u.queue=y(i,x)}else if(f==="root"&&i[0]===":"){i.shift();u[f]=tt(i)}else if(f==="threshold"&&i[0]===":"){i.shift();u[f]=y(i,x)}else{fe(e,"htmx:syntax:error",{token:i.shift()})}}n.push(u)}}if(i.length===a){fe(e,"htmx:syntax:error",{token:i.shift()})}y(i,Je)}while(i[0]===","&&i.shift());if(r){r[t]=n}return n}function it(e){var t=te(e,"hx-trigger");var r=[];if(t){var n=Q.config.triggerSpecsCache;r=n&&n[t]||nt(e,t,n)}if(r.length>0){return r}else if(h(e,"form")){return[{trigger:"submit"}]}else if(h(e,'input[type="button"], input[type="submit"]')){return[{trigger:"click"}]}else if(h(e,rt)){return[{trigger:"change"}]}else{return[{trigger:"click"}]}}function at(e){ae(e).cancelled=true}function ot(e,t,r){var n=ae(e);n.timeout=setTimeout(function(){if(se(e)&&n.cancelled!==true){if(!ct(r,e,Wt("hx:poll:trigger",{triggerSpec:r,target:e}))){t(e)}ot(e,t,r)}},r.pollInterval)}function st(e){return location.hostname===e.hostname&&ee(e,"href")&&ee(e,"href").indexOf("#")!==0}function lt(t,r,e){if(t.tagName==="A"&&st(t)&&(t.target===""||t.target==="_self")||t.tagName==="FORM"){r.boosted=true;var n,i;if(t.tagName==="A"){n="get";i=ee(t,"href")}else{var a=ee(t,"method");n=a?a.toLowerCase():"get";if(n==="get"){}i=ee(t,"action")}e.forEach(function(e){ht(t,function(e,t){if(v(e,Q.config.disableSelector)){m(e);return}he(n,i,e,t)},r,e,true)})}}function ut(e,t){if(e.type==="submit"||e.type==="click"){if(t.tagName==="FORM"){return true}if(h(t,'input[type="submit"], button')&&v(t,"form")!==null){return true}if(t.tagName==="A"&&t.href&&(t.getAttribute("href")==="#"||t.getAttribute("href").indexOf("#")!==0)){return true}}return false}function ft(e,t){return ae(e).boosted&&e.tagName==="A"&&t.type==="click"&&(t.ctrlKey||t.metaKey)}function ct(e,t,r){var n=e.eventFilter;if(n){try{return n.call(t,r)!==true}catch(e){fe(re().body,"htmx:eventFilter:error",{error:e,source:n.source});return true}}return false}function ht(a,o,e,s,l){var u=ae(a);var t;if(s.from){t=Z(a,s.from)}else{t=[a]}if(s.changed){t.forEach(function(e){var t=ae(e);t.lastValue=e.value})}oe(t,function(n){var i=function(e){if(!se(a)){n.removeEventListener(s.trigger,i);return}if(ft(a,e)){return}if(l||ut(e,a)){e.preventDefault()}if(ct(s,a,e)){return}var t=ae(e);t.triggerSpec=s;if(t.handledFor==null){t.handledFor=[]}if(t.handledFor.indexOf(a)<0){t.handledFor.push(a);if(s.consume){e.stopPropagation()}if(s.target&&e.target){if(!h(e.target,s.target)){return}}if(s.once){if(u.triggeredOnce){return}else{u.triggeredOnce=true}}if(s.changed){var r=ae(n);if(r.lastValue===n.value){return}r.lastValue=n.value}if(u.delayed){clearTimeout(u.delayed)}if(u.throttle){return}if(s.throttle>0){if(!u.throttle){o(a,e);u.throttle=setTimeout(function(){u.throttle=null},s.throttle)}}else if(s.delay>0){u.delayed=setTimeout(function(){o(a,e)},s.delay)}else{ce(a,"htmx:trigger");o(a,e)}}};if(e.listenerInfos==null){e.listenerInfos=[]}e.listenerInfos.push({trigger:s.trigger,listener:i,on:n});n.addEventListener(s.trigger,i)})}var vt=false;var dt=null;function gt(){if(!dt){dt=function(){vt=true};window.addEventListener("scroll",dt);setInterval(function(){if(vt){vt=false;oe(re().querySelectorAll("[hx-trigger='revealed'],[data-hx-trigger='revealed']"),function(e){pt(e)})}},200)}}function pt(t){if(!o(t,"data-hx-revealed")&&X(t)){t.setAttribute("data-hx-revealed","true");var e=ae(t);if(e.initHash){ce(t,"revealed")}else{t.addEventListener("htmx:afterProcessNode",function(e){ce(t,"revealed")},{once:true})}}}function mt(e,t,r){var n=D(r);for(var i=0;i=0){var t=wt(n);setTimeout(function(){xt(s,r,n+1)},t)}};t.onopen=function(e){n=0};ae(s).webSocket=t;t.addEventListener("message",function(e){if(yt(s)){return}var t=e.data;R(s,function(e){t=e.transformResponse(t,null,s)});var r=T(s);var n=l(t);var i=M(n.children);for(var a=0;a0){ce(u,"htmx:validation:halted",i);return}t.send(JSON.stringify(l));if(ut(e,u)){e.preventDefault()}})}else{fe(u,"htmx:noWebSocketSourceError")}}function wt(e){var t=Q.config.wsReconnectDelay;if(typeof t==="function"){return t(e)}if(t==="full-jitter"){var r=Math.min(e,6);var n=1e3*Math.pow(2,r);return n*Math.random()}b('htmx.config.wsReconnectDelay must either be a function or the string "full-jitter"')}function St(e,t,r){var n=D(r);for(var i=0;i0){setTimeout(i,n)}else{i()}}function Ht(t,i,e){var a=false;oe(w,function(r){if(o(t,"hx-"+r)){var n=te(t,"hx-"+r);a=true;i.path=n;i.verb=r;e.forEach(function(e){Lt(t,e,i,function(e,t){if(v(e,Q.config.disableSelector)){m(e);return}he(r,n,e,t)})})}});return a}function Lt(n,e,t,r){if(e.sseEvent){Rt(n,r,e.sseEvent)}else if(e.trigger==="revealed"){gt();ht(n,r,t,e);pt(n)}else if(e.trigger==="intersect"){var i={};if(e.root){i.root=ue(n,e.root)}if(e.threshold){i.threshold=parseFloat(e.threshold)}var a=new IntersectionObserver(function(e){for(var t=0;t0){t.polling=true;ot(n,r,e)}else{ht(n,r,t,e)}}function At(e){if(!e.htmxExecuted&&Q.config.allowScriptTags&&(e.type==="text/javascript"||e.type==="module"||e.type==="")){var t=re().createElement("script");oe(e.attributes,function(e){t.setAttribute(e.name,e.value)});t.textContent=e.textContent;t.async=false;if(Q.config.inlineScriptNonce){t.nonce=Q.config.inlineScriptNonce}var r=e.parentElement;try{r.insertBefore(t,e)}catch(e){b(e)}finally{if(e.parentElement){e.parentElement.removeChild(e)}}}}function Nt(e){if(h(e,"script")){At(e)}oe(f(e,"script"),function(e){At(e)})}function It(e){var t=e.attributes;if(!t){return false}for(var r=0;r0){var o=n.shift();var s=o.match(/^\s*([a-zA-Z:\-\.]+:)(.*)/);if(a===0&&s){o.split(":");i=s[1].slice(0,-1);r[i]=s[2]}else{r[i]+=o}a+=Bt(o)}for(var l in r){Ft(e,l,r[l])}}}function jt(e){Ae(e);for(var t=0;tQ.config.historyCacheSize){i.shift()}while(i.length>0){try{localStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(e){fe(re().body,"htmx:historyCacheError",{cause:e,cache:i});i.shift()}}}function Yt(e){if(!U()){return null}e=B(e);var t=E(localStorage.getItem("htmx-history-cache"))||[];for(var r=0;r=200&&this.status<400){ce(re().body,"htmx:historyCacheMissLoad",o);var e=l(this.response);e=e.querySelector("[hx-history-elt],[data-hx-history-elt]")||e;var t=Zt();var r=T(t);var n=Ve(this.response);if(n){var i=C("title");if(i){i.innerHTML=n}else{window.document.title=n}}Ue(t,e,r);nr(r.tasks);Jt=a;ce(re().body,"htmx:historyRestore",{path:a,cacheMiss:true,serverResponse:this.response})}else{fe(re().body,"htmx:historyCacheMissLoadError",o)}};e.send()}function ar(e){er();e=e||location.pathname+location.search;var t=Yt(e);if(t){var r=l(t.content);var n=Zt();var i=T(n);Ue(n,r,i);nr(i.tasks);document.title=t.title;setTimeout(function(){window.scrollTo(0,t.scroll)},0);Jt=e;ce(re().body,"htmx:historyRestore",{path:e,item:t})}else{if(Q.config.refreshOnHistoryMiss){window.location.reload(true)}else{ir(e)}}}function or(e){var t=me(e,"hx-indicator");if(t==null){t=[e]}oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)+1;e.classList["add"].call(e.classList,Q.config.requestClass)});return t}function sr(e){var t=me(e,"hx-disabled-elt");if(t==null){t=[]}oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)+1;e.setAttribute("disabled","")});return t}function lr(e,t){oe(e,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.classList["remove"].call(e.classList,Q.config.requestClass)}});oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.removeAttribute("disabled")}})}function ur(e,t){for(var r=0;r=0}function wr(e,t){var r=t?t:ne(e,"hx-swap");var n={swapStyle:ae(e).boosted?"innerHTML":Q.config.defaultSwapStyle,swapDelay:Q.config.defaultSwapDelay,settleDelay:Q.config.defaultSettleDelay};if(Q.config.scrollIntoViewOnBoost&&ae(e).boosted&&!br(e)){n["show"]="top"}if(r){var i=D(r);if(i.length>0){for(var a=0;a0?l.join(":"):null;n["scroll"]=u;n["scrollTarget"]=f}else if(o.indexOf("show:")===0){var c=o.substr(5);var l=c.split(":");var h=l.pop();var f=l.length>0?l.join(":"):null;n["show"]=h;n["showTarget"]=f}else if(o.indexOf("focus-scroll:")===0){var v=o.substr("focus-scroll:".length);n["focusScroll"]=v=="true"}else if(a==0){n["swapStyle"]=o}else{b("Unknown modifier in hx-swap: "+o)}}}}return n}function Sr(e){return ne(e,"hx-encoding")==="multipart/form-data"||h(e,"form")&&ee(e,"enctype")==="multipart/form-data"}function Er(t,r,n){var i=null;R(r,function(e){if(i==null){i=e.encodeParameters(t,n,r)}});if(i!=null){return i}else{if(Sr(r)){return mr(n)}else{return pr(n)}}}function T(e){return{tasks:[],elts:[e]}}function Cr(e,t){var r=e[0];var n=e[e.length-1];if(t.scroll){var i=null;if(t.scrollTarget){i=ue(r,t.scrollTarget)}if(t.scroll==="top"&&(r||i)){i=i||r;i.scrollTop=0}if(t.scroll==="bottom"&&(n||i)){i=i||n;i.scrollTop=i.scrollHeight}}if(t.show){var i=null;if(t.showTarget){var a=t.showTarget;if(t.showTarget==="window"){a="body"}i=ue(r,a)}if(t.show==="top"&&(r||i)){i=i||r;i.scrollIntoView({block:"start",behavior:Q.config.scrollBehavior})}if(t.show==="bottom"&&(n||i)){i=i||n;i.scrollIntoView({block:"end",behavior:Q.config.scrollBehavior})}}}function Rr(e,t,r,n){if(n==null){n={}}if(e==null){return n}var i=te(e,t);if(i){var a=i.trim();var o=r;if(a==="unset"){return null}if(a.indexOf("javascript:")===0){a=a.substr(11);o=true}else if(a.indexOf("js:")===0){a=a.substr(3);o=true}if(a.indexOf("{")!==0){a="{"+a+"}"}var s;if(o){s=Tr(e,function(){return Function("return ("+a+")")()},{})}else{s=E(a)}for(var l in s){if(s.hasOwnProperty(l)){if(n[l]==null){n[l]=s[l]}}}}return Rr(u(e),t,r,n)}function Tr(e,t,r){if(Q.config.allowEval){return t()}else{fe(e,"htmx:evalDisallowedError");return r}}function Or(e,t){return Rr(e,"hx-vars",true,t)}function qr(e,t){return Rr(e,"hx-vals",false,t)}function Hr(e){return le(Or(e),qr(e))}function Lr(t,r,n){if(n!==null){try{t.setRequestHeader(r,n)}catch(e){t.setRequestHeader(r,encodeURIComponent(n));t.setRequestHeader(r+"-URI-AutoEncoded","true")}}}function Ar(t){if(t.responseURL&&typeof URL!=="undefined"){try{var e=new URL(t.responseURL);return e.pathname+e.search}catch(e){fe(re().body,"htmx:badResponseUrl",{url:t.responseURL})}}}function O(e,t){return t.test(e.getAllResponseHeaders())}function Nr(e,t,r){e=e.toLowerCase();if(r){if(r instanceof Element||I(r,"String")){return he(e,t,null,null,{targetOverride:p(r),returnPromise:true})}else{return he(e,t,p(r.source),r.event,{handler:r.handler,headers:r.headers,values:r.values,targetOverride:p(r.target),swapOverride:r.swap,select:r.select,returnPromise:true})}}else{return he(e,t,null,null,{returnPromise:true})}}function Ir(e){var t=[];while(e){t.push(e);e=e.parentElement}return t}function kr(e,t,r){var n;var i;if(typeof URL==="function"){i=new URL(t,document.location.href);var a=document.location.origin;n=a===i.origin}else{i=t;n=g(t,document.location.origin)}if(Q.config.selfRequestsOnly){if(!n){return false}}return ce(e,"htmx:validateUrl",le({url:i,sameHost:n},r))}function he(t,r,n,i,a,e){var o=null;var s=null;a=a!=null?a:{};if(a.returnPromise&&typeof Promise!=="undefined"){var l=new Promise(function(e,t){o=e;s=t})}if(n==null){n=re().body}var M=a.handler||Mr;var X=a.select||null;if(!se(n)){ie(o);return l}var u=a.targetOverride||ye(n);if(u==null||u==pe){fe(n,"htmx:targetError",{target:te(n,"hx-target")});ie(s);return l}var f=ae(n);var c=f.lastButtonClicked;if(c){var h=ee(c,"formaction");if(h!=null){r=h}var v=ee(c,"formmethod");if(v!=null){if(v.toLowerCase()!=="dialog"){t=v}}}var d=ne(n,"hx-confirm");if(e===undefined){var D=function(e){return he(t,r,n,i,a,!!e)};var U={target:u,elt:n,path:r,verb:t,triggeringEvent:i,etc:a,issueRequest:D,question:d};if(ce(n,"htmx:confirm",U)===false){ie(o);return l}}var g=n;var p=ne(n,"hx-sync");var m=null;var x=false;if(p){var B=p.split(":");var F=B[0].trim();if(F==="this"){g=xe(n,"hx-sync")}else{g=ue(n,F)}p=(B[1]||"drop").trim();f=ae(g);if(p==="drop"&&f.xhr&&f.abortable!==true){ie(o);return l}else if(p==="abort"){if(f.xhr){ie(o);return l}else{x=true}}else if(p==="replace"){ce(g,"htmx:abort")}else if(p.indexOf("queue")===0){var V=p.split(" ");m=(V[1]||"last").trim()}}if(f.xhr){if(f.abortable){ce(g,"htmx:abort")}else{if(m==null){if(i){var y=ae(i);if(y&&y.triggerSpec&&y.triggerSpec.queue){m=y.triggerSpec.queue}}if(m==null){m="last"}}if(f.queuedRequests==null){f.queuedRequests=[]}if(m==="first"&&f.queuedRequests.length===0){f.queuedRequests.push(function(){he(t,r,n,i,a)})}else if(m==="all"){f.queuedRequests.push(function(){he(t,r,n,i,a)})}else if(m==="last"){f.queuedRequests=[];f.queuedRequests.push(function(){he(t,r,n,i,a)})}ie(o);return l}}var b=new XMLHttpRequest;f.xhr=b;f.abortable=x;var w=function(){f.xhr=null;f.abortable=false;if(f.queuedRequests!=null&&f.queuedRequests.length>0){var e=f.queuedRequests.shift();e()}};var j=ne(n,"hx-prompt");if(j){var S=prompt(j);if(S===null||!ce(n,"htmx:prompt",{prompt:S,target:u})){ie(o);w();return l}}if(d&&!e){if(!confirm(d)){ie(o);w();return l}}var E=xr(n,u,S);if(t!=="get"&&!Sr(n)){E["Content-Type"]="application/x-www-form-urlencoded"}if(a.headers){E=le(E,a.headers)}var _=dr(n,t);var C=_.errors;var R=_.values;if(a.values){R=le(R,a.values)}var z=Hr(n);var $=le(R,z);var T=yr($,n);if(Q.config.getCacheBusterParam&&t==="get"){T["org.htmx.cache-buster"]=ee(u,"id")||"true"}if(r==null||r===""){r=re().location.href}var O=Rr(n,"hx-request");var W=ae(n).boosted;var q=Q.config.methodsThatUseUrlParams.indexOf(t)>=0;var H={boosted:W,useUrlParams:q,parameters:T,unfilteredParameters:$,headers:E,target:u,verb:t,errors:C,withCredentials:a.credentials||O.credentials||Q.config.withCredentials,timeout:a.timeout||O.timeout||Q.config.timeout,path:r,triggeringEvent:i};if(!ce(n,"htmx:configRequest",H)){ie(o);w();return l}r=H.path;t=H.verb;E=H.headers;T=H.parameters;C=H.errors;q=H.useUrlParams;if(C&&C.length>0){ce(n,"htmx:validation:halted",H);ie(o);w();return l}var G=r.split("#");var J=G[0];var L=G[1];var A=r;if(q){A=J;var Z=Object.keys(T).length!==0;if(Z){if(A.indexOf("?")<0){A+="?"}else{A+="&"}A+=pr(T);if(L){A+="#"+L}}}if(!kr(n,A,H)){fe(n,"htmx:invalidPath",H);ie(s);return l}b.open(t.toUpperCase(),A,true);b.overrideMimeType("text/html");b.withCredentials=H.withCredentials;b.timeout=H.timeout;if(O.noHeaders){}else{for(var N in E){if(E.hasOwnProperty(N)){var K=E[N];Lr(b,N,K)}}}var I={xhr:b,target:u,requestConfig:H,etc:a,boosted:W,select:X,pathInfo:{requestPath:r,finalRequestPath:A,anchor:L}};b.onload=function(){try{var e=Ir(n);I.pathInfo.responsePath=Ar(b);M(n,I);lr(k,P);ce(n,"htmx:afterRequest",I);ce(n,"htmx:afterOnLoad",I);if(!se(n)){var t=null;while(e.length>0&&t==null){var r=e.shift();if(se(r)){t=r}}if(t){ce(t,"htmx:afterRequest",I);ce(t,"htmx:afterOnLoad",I)}}ie(o);w()}catch(e){fe(n,"htmx:onLoadError",le({error:e},I));throw e}};b.onerror=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:sendError",I);ie(s);w()};b.onabort=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:sendAbort",I);ie(s);w()};b.ontimeout=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:timeout",I);ie(s);w()};if(!ce(n,"htmx:beforeRequest",I)){ie(o);w();return l}var k=or(n);var P=sr(n);oe(["loadstart","loadend","progress","abort"],function(t){oe([b,b.upload],function(e){e.addEventListener(t,function(e){ce(n,"htmx:xhr:"+t,{lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total})})})});ce(n,"htmx:beforeSend",I);var Y=q?null:Er(b,n,T);b.send(Y);return l}function Pr(e,t){var r=t.xhr;var n=null;var i=null;if(O(r,/HX-Push:/i)){n=r.getResponseHeader("HX-Push");i="push"}else if(O(r,/HX-Push-Url:/i)){n=r.getResponseHeader("HX-Push-Url");i="push"}else if(O(r,/HX-Replace-Url:/i)){n=r.getResponseHeader("HX-Replace-Url");i="replace"}if(n){if(n==="false"){return{}}else{return{type:i,path:n}}}var a=t.pathInfo.finalRequestPath;var o=t.pathInfo.responsePath;var s=ne(e,"hx-push-url");var l=ne(e,"hx-replace-url");var u=ae(e).boosted;var f=null;var c=null;if(s){f="push";c=s}else if(l){f="replace";c=l}else if(u){f="push";c=o||a}if(c){if(c==="false"){return{}}if(c==="true"){c=o||a}if(t.pathInfo.anchor&&c.indexOf("#")===-1){c=c+"#"+t.pathInfo.anchor}return{type:f,path:c}}else{return{}}}function Mr(l,u){var f=u.xhr;var c=u.target;var e=u.etc;var t=u.requestConfig;var h=u.select;if(!ce(l,"htmx:beforeOnLoad",u))return;if(O(f,/HX-Trigger:/i)){_e(f,"HX-Trigger",l)}if(O(f,/HX-Location:/i)){er();var r=f.getResponseHeader("HX-Location");var v;if(r.indexOf("{")===0){v=E(r);r=v["path"];delete v["path"]}Nr("GET",r,v).then(function(){tr(r)});return}var n=O(f,/HX-Refresh:/i)&&"true"===f.getResponseHeader("HX-Refresh");if(O(f,/HX-Redirect:/i)){location.href=f.getResponseHeader("HX-Redirect");n&&location.reload();return}if(n){location.reload();return}if(O(f,/HX-Retarget:/i)){if(f.getResponseHeader("HX-Retarget")==="this"){u.target=l}else{u.target=ue(l,f.getResponseHeader("HX-Retarget"))}}var d=Pr(l,u);var i=f.status>=200&&f.status<400&&f.status!==204;var g=f.response;var a=f.status>=400;var p=Q.config.ignoreTitle;var o=le({shouldSwap:i,serverResponse:g,isError:a,ignoreTitle:p},u);if(!ce(c,"htmx:beforeSwap",o))return;c=o.target;g=o.serverResponse;a=o.isError;p=o.ignoreTitle;u.target=c;u.failed=a;u.successful=!a;if(o.shouldSwap){if(f.status===286){at(l)}R(l,function(e){g=e.transformResponse(g,f,l)});if(d.type){er()}var s=e.swapOverride;if(O(f,/HX-Reswap:/i)){s=f.getResponseHeader("HX-Reswap")}var v=wr(l,s);if(v.hasOwnProperty("ignoreTitle")){p=v.ignoreTitle}c.classList.add(Q.config.swappingClass);var m=null;var x=null;var y=function(){try{var e=document.activeElement;var t={};try{t={elt:e,start:e?e.selectionStart:null,end:e?e.selectionEnd:null}}catch(e){}var r;if(h){r=h}if(O(f,/HX-Reselect:/i)){r=f.getResponseHeader("HX-Reselect")}if(d.type){ce(re().body,"htmx:beforeHistoryUpdate",le({history:d},u));if(d.type==="push"){tr(d.path);ce(re().body,"htmx:pushedIntoHistory",{path:d.path})}else{rr(d.path);ce(re().body,"htmx:replacedInHistory",{path:d.path})}}var n=T(c);je(v.swapStyle,c,l,g,n,r);if(t.elt&&!se(t.elt)&&ee(t.elt,"id")){var i=document.getElementById(ee(t.elt,"id"));var a={preventScroll:v.focusScroll!==undefined?!v.focusScroll:!Q.config.defaultFocusScroll};if(i){if(t.start&&i.setSelectionRange){try{i.setSelectionRange(t.start,t.end)}catch(e){}}i.focus(a)}}c.classList.remove(Q.config.swappingClass);oe(n.elts,function(e){if(e.classList){e.classList.add(Q.config.settlingClass)}ce(e,"htmx:afterSwap",u)});if(O(f,/HX-Trigger-After-Swap:/i)){var o=l;if(!se(l)){o=re().body}_e(f,"HX-Trigger-After-Swap",o)}var s=function(){oe(n.tasks,function(e){e.call()});oe(n.elts,function(e){if(e.classList){e.classList.remove(Q.config.settlingClass)}ce(e,"htmx:afterSettle",u)});if(u.pathInfo.anchor){var e=re().getElementById(u.pathInfo.anchor);if(e){e.scrollIntoView({block:"start",behavior:"auto"})}}if(n.title&&!p){var t=C("title");if(t){t.innerHTML=n.title}else{window.document.title=n.title}}Cr(n.elts,v);if(O(f,/HX-Trigger-After-Settle:/i)){var r=l;if(!se(l)){r=re().body}_e(f,"HX-Trigger-After-Settle",r)}ie(m)};if(v.settleDelay>0){setTimeout(s,v.settleDelay)}else{s()}}catch(e){fe(l,"htmx:swapError",u);ie(x);throw e}};var b=Q.config.globalViewTransitions;if(v.hasOwnProperty("transition")){b=v.transition}if(b&&ce(l,"htmx:beforeTransition",u)&&typeof Promise!=="undefined"&&document.startViewTransition){var w=new Promise(function(e,t){m=e;x=t});var S=y;y=function(){document.startViewTransition(function(){S();return w})}}if(v.swapDelay>0){setTimeout(y,v.swapDelay)}else{y()}}if(a){fe(l,"htmx:responseError",le({error:"Response Status Error Code "+f.status+" from "+u.pathInfo.requestPath},u))}}var Xr={};function Dr(){return{init:function(e){return null},onEvent:function(e,t){return true},transformResponse:function(e,t,r){return e},isInlineSwap:function(e){return false},handleSwap:function(e,t,r,n){return false},encodeParameters:function(e,t,r){return null}}}function Ur(e,t){if(t.init){t.init(r)}Xr[e]=le(Dr(),t)}function Br(e){delete Xr[e]}function Fr(e,r,n){if(e==undefined){return r}if(r==undefined){r=[]}if(n==undefined){n=[]}var t=te(e,"hx-ext");if(t){oe(t.split(","),function(e){e=e.replace(/ /g,"");if(e.slice(0,7)=="ignore:"){n.push(e.slice(7));return}if(n.indexOf(e)<0){var t=Xr[e];if(t&&r.indexOf(t)<0){r.push(t)}}})}return Fr(u(e),r,n)}var Vr=false;re().addEventListener("DOMContentLoaded",function(){Vr=true});function jr(e){if(Vr||re().readyState==="complete"){e()}else{re().addEventListener("DOMContentLoaded",e)}}function _r(){if(Q.config.includeIndicatorStyles!==false){re().head.insertAdjacentHTML("beforeend","")}}function zr(){var e=re().querySelector('meta[name="htmx-config"]');if(e){return E(e.content)}else{return null}}function $r(){var e=zr();if(e){Q.config=le(Q.config,e)}}jr(function(){$r();_r();var e=re().body;zt(e);var t=re().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){var t=e.target;var r=ae(t);if(r&&r.xhr){r.xhr.abort()}});const r=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(e){if(e.state&&e.state.htmx){ar();oe(t,function(e){ce(e,"htmx:restored",{document:re(),triggerEvent:ce})})}else{if(r){r(e)}}};setTimeout(function(){ce(e,"htmx:load",{});e=null},0)});return Q}()}); \ No newline at end of file diff --git a/web/static/node_modules/htmx.org/dist/htmx.min.js.gz b/web/static/node_modules/htmx.org/dist/htmx.min.js.gz deleted file mode 100644 index 396e9d4c..00000000 Binary files a/web/static/node_modules/htmx.org/dist/htmx.min.js.gz and /dev/null differ diff --git a/web/static/node_modules/htmx.org/editors/jetbrains/htmx.web-types.json b/web/static/node_modules/htmx.org/editors/jetbrains/htmx.web-types.json deleted file mode 100644 index 58245a07..00000000 --- a/web/static/node_modules/htmx.org/editors/jetbrains/htmx.web-types.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json", - "name": "htmx", - "version": "1.0.0", - "js-types-syntax": "typescript", - "description-markup": "markdown", - "contributions": { - "html": { - "attributes": [ - { - "name": "hx-boost", - "description": "The **hx-boost** attribute allows you to \"boost\" normal anchors and form tags to use AJAX instead. This has the [nice fallback](https://en.wikipedia.org/wiki/Progressive_enhancement) that, if the user does not have javascript enabled, the site will continue to work.", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-boost/" - }, - { - "name": "hx-confirm", - "description": "The **hx-confirm** attribute allows you to confirm an action before issuing a request. This can be useful in cases where the action is destructive and you want to ensure that the user really wants to do it.", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-confirm/" - }, - { - "name": "hx-delete", - "description": "The **hx-delete** attribute will cause an element to issue a **DELETE** to the specified URL and swap the HTML into the DOM using a swap strategy.", - "description-sections": { - "Not inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-confirm/" - }, - { - "name": "hx-disable", - "description": "The **hx-disable** attribute disables htmx processing for the given node and any children nodes", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-disable" - }, - { - "name": "hx-encoding", - "description": "The **hx-encoding** attribute changes the request encoding type", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-encoding" - }, - { - "name": "hx-ext", - "description": "The **hx-ext** attribute enables extensions for an element", - "description-sections": { - "Not Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-ext" - }, - { - "name": "hx-get", - "description": "The **hx-get** attribute issues a `GET` to the specified URL", - "description-sections": { - "Not Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-get" - }, - { - "name": "hx-headers", - "description": "The **hx-headers** attribute adds to the headers that will be submitted with the request", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-headers" - }, - { - "name": "hx-history-elt", - "description": "The **hx-history-elt** attribute specifies the element to snapshot and restore during history navigation", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-history-elt" - }, - { - "name": "hx-include", - "description": "The **hx-include** attribute specifies additional values/inputs to include in AJAX requests", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-include" - }, - { - "name": "hx-indicator", - "description": "The **hx-indicator** attribute specifies the element to put the `htmx-request` class on during the AJAX request, displaying it as a request indicator", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-indicator" - }, - { - "name": "hx-disinherit", - "description": "The **hx-disinherit** attribute allows you to control and disable automatic attribute inheritance for child nodes", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-disinherit" - }, - { - "name": "hx-params", - "description": "The **hx-params** attribute allows you filter the parameters that will be submitted with a request", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-params" - }, - { - "name": "hx-patch", - "description": "The **hx-patch** attribute issues a `PATCH` to the specified URL", - "description-sections": { - "Not Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-patch" - }, - { - "name": "hx-post", - "description": "The **hx-post** attribute issues a `POST` to the specified URL", - "description-sections": { - "Not Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-post" - }, - { - "name": "hx-preserve", - "description": "The **hx-preserve** attribute preserves an element between requests (requires the `id` be stable)", - "description-sections": { - "Not Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-preserve" - }, - { - "name": "hx-prompt", - "description": "The **hx-prompt** attribute shows a prompt before submitting a request", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-prompt" - }, - { - "name": "hx-push-url", - "description": "The **hx-push-url** attribute pushes the URL into the location bar, creating a new history entry", - "description-sections": { - "Not Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-push-url" - }, - { - "name": "hx-put", - "description": "The **hx-put** attribute issues a `PUT` to the specified URL", - "description-sections": { - "Not Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-put" - }, - { - "name": "hx-request", - "description": "The **hx-request** attribute configures various aspects of the request", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-request" - }, - { - "name": "hx-select", - "description": "The **hx-select** attribute selects a subset of the server response to process", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-select" - }, - { - "name": "hx-sse", - "description": "The **hx-sse** attribute connects the DOM to a SSE source", - "description-sections": { - "Not Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-sse" - }, - { - "name": "hx-swap-oob", - "description": "The **hx-swap-oob** attribute marks content in a response as being \"Out of Band\", i.e. swapped somewhere other than the target", - "description-sections": { - "Not Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-swap-oob" - }, - { - "name": "hx-swap", - "description": "The **hx-swap** attribute controls how the response content is swapped into the DOM (e.g. 'outerHTML' or 'beforeend')", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-swap" - }, - { - "name": "hx-sync", - "description": "The **hx-sync** attribute controls requests made by different elements are synchronized with one another", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-sync" - }, - { - "name": "hx-target", - "description": "The **hx-target** attribute specifies the target element to be swapped", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-target" - }, - { - "name": "hx-trigger", - "description": "The **hx-trigger** attribute specifies specifies the event that triggers the request", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-trigger" - }, - { - "name": "hx-vals", - "description": "The **hx-vals** attribute specifies values to add to the parameters that will be submitted with the request in JSON form", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-vals" - }, - { - "name": "hx-vars", - "description": "The **hx-vars** attribute specifies computed values to add to the parameters that will be submitted with the request", - "description-sections": { - "Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-vars" - }, - { - "name": "hx-ws", - "description": "The **hx-ws** attribute connects the DOM to a Web Socket source", - "description-sections": { - "Not Inherited": "" - }, - "doc-url": "https://htmx.org/attributes/hx-ws" - } - ] - }, - "css": { - "classes": [ - { - "name": "htmx-added", - "description": "Applied to a new piece of content before it is swapped, removed after it is settled.", - "doc-url": "https://htmx.org/reference/#classes" - }, - { - "name": "htmx-indicator", - "description": "A dynamically generated class that will toggle visible (opacity:1) when a `htmx-request` class is present.", - "doc-url": "https://htmx.org/reference/#classes" - }, - { - "name": "htmx-request", - "description": "Applied to either the element or the element specified with `hx-indicator` while a request is ongoing.", - "doc-url": "https://htmx.org/reference/#classes" - }, - { - "name": "htmx-settling", - "description": "Applied to a target after content is swapped, removed after it is settled. The duration can be modified via `hx-swap`.", - "doc-url": "https://htmx.org/reference/#classes" - }, - { - "name": "htmx-swapping", - "description": "Applied to a target before any content is swapped, removed after it is swapped. The duration can be modified via `hx-swap`.", - "doc-url": "https://htmx.org/reference/#classes" - } - ] - } - } -} diff --git a/web/static/node_modules/htmx.org/package.json b/web/static/node_modules/htmx.org/package.json deleted file mode 100644 index 94ad1104..00000000 --- a/web/static/node_modules/htmx.org/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "htmx.org", - "description": "high power tools for html", - "keywords": [ - "AJAX", - "HTML" - ], - "version": "1.9.12", - "homepage": "https://htmx.org/", - "bugs": { - "url": "https://github.com/bigskysoftware/htmx/issues" - }, - "license": "0BSD", - "files": [ - "LICENSE", - "README.md", - "dist/htmx.d.ts", - "dist/*.js", - "dist/ext/*.js", - "dist/*.js.gz", - "editors/jetbrains/htmx.web-types.json" - ], - "main": "dist/htmx.min.js", - "types": "dist/htmx.d.ts", - "unpkg": "dist/htmx.min.js", - "web-types": "editors/jetbrains/htmx.web-types.json", - "scripts": { - "test": "mocha-chrome test/index.html", - "test-types": "tsc --project ./jsconfig.json", - "dist": "cp -r src/* dist/ && npm run-script uglify && gzip -9 -k -f dist/htmx.min.js > dist/htmx.min.js.gz && exit", - "ws-tests": "cd ./test/ws-sse && node ./server.js", - "www": "bash ./scripts/www.sh", - "uglify": "uglifyjs -m eval -o dist/htmx.min.js dist/htmx.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/bigskysoftware/htmx.git" - }, - "devDependencies": { - "chai": "^4.3.7", - "chai-dom": "^1.11.0", - "fs-extra": "^9.1.0", - "mocha": "^9.2.2", - "mocha-chrome": "^2.2.0", - "mocha-webdriver-runner": "^0.6.4", - "mock-socket": "^9.2.1", - "sinon": "^9.2.4", - "typescript": "^4.9.5", - "uglify-js": "^3.17.4", - "ws": "^8.14.2" - } -} diff --git a/web/static/node_modules/immutable/LICENSE b/web/static/node_modules/immutable/LICENSE deleted file mode 100644 index 1e3c4f39..00000000 --- a/web/static/node_modules/immutable/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2014-present, Lee Byron and other contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/immutable/README.md b/web/static/node_modules/immutable/README.md deleted file mode 100644 index bcb5d0b8..00000000 --- a/web/static/node_modules/immutable/README.md +++ /dev/null @@ -1,761 +0,0 @@ -# Immutable collections for JavaScript - -[![Build Status](https://github.com/immutable-js/immutable-js/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/immutable-js/immutable-js/actions/workflows/ci.yml?query=branch%3Amain) [Chat on slack](https://immutable-js.slack.com) - -[Read the docs](https://immutable-js.com/docs/) and eat your vegetables. - -Docs are automatically generated from [README.md][] and [immutable.d.ts][]. -Please contribute! Also, don't miss the [wiki][] which contains articles on -additional specific topics. Can't find something? Open an [issue][]. - -**Table of contents:** - -- [Introduction](#introduction) -- [Getting started](#getting-started) -- [The case for Immutability](#the-case-for-immutability) -- [JavaScript-first API](#javascript-first-api) -- [Nested Structures](#nested-structures) -- [Equality treats Collections as Values](#equality-treats-collections-as-values) -- [Batching Mutations](#batching-mutations) -- [Lazy Seq](#lazy-seq) -- [Additional Tools and Resources](#additional-tools-and-resources) -- [Contributing](#contributing) - -## Introduction - -[Immutable][] data cannot be changed once created, leading to much simpler -application development, no defensive copying, and enabling advanced memoization -and change detection techniques with simple logic. [Persistent][] data presents -a mutative API which does not update the data in-place, but instead always -yields new updated data. - -Immutable.js provides many Persistent Immutable data structures including: -`List`, `Stack`, `Map`, `OrderedMap`, `Set`, `OrderedSet` and `Record`. - -These data structures are highly efficient on modern JavaScript VMs by using -structural sharing via [hash maps tries][] and [vector tries][] as popularized -by Clojure and Scala, minimizing the need to copy or cache data. - -Immutable.js also provides a lazy `Seq`, allowing efficient -chaining of collection methods like `map` and `filter` without creating -intermediate representations. Create some `Seq` with `Range` and `Repeat`. - -Want to hear more? Watch the presentation about Immutable.js: - -[![Immutable Data and React](website/public/Immutable-Data-and-React-YouTube.png)](https://youtu.be/I7IdS-PbEgI) - -[README.md]: https://github.com/immutable-js/immutable-js/blob/main/README.md -[immutable.d.ts]: https://github.com/immutable-js/immutable-js/blob/main/type-definitions/immutable.d.ts -[wiki]: https://github.com/immutable-js/immutable-js/wiki -[issue]: https://github.com/immutable-js/immutable-js/issues -[Persistent]: https://en.wikipedia.org/wiki/Persistent_data_structure -[Immutable]: https://en.wikipedia.org/wiki/Immutable_object -[hash maps tries]: https://en.wikipedia.org/wiki/Hash_array_mapped_trie -[vector tries]: https://hypirion.com/musings/understanding-persistent-vector-pt-1 - -## Getting started - -Install `immutable` using npm. - -```shell -# using npm -npm install immutable - -# using Yarn -yarn add immutable - -# using pnpm -pnpm add immutable - -# using Bun -bun add immutable -``` - -Then require it into any module. - - - -```js -const { Map } = require('immutable'); -const map1 = Map({ a: 1, b: 2, c: 3 }); -const map2 = map1.set('b', 50); -map1.get('b') + ' vs. ' + map2.get('b'); // 2 vs. 50 -``` - -### Browser - -Immutable.js has no dependencies, which makes it predictable to include in a Browser. - -It's highly recommended to use a module bundler like [webpack](https://webpack.js.org/), -[rollup](https://rollupjs.org/), or -[browserify](https://browserify.org/). The `immutable` npm module works -without any additional consideration. All examples throughout the documentation -will assume use of this kind of tool. - -Alternatively, Immutable.js may be directly included as a script tag. Download -or link to a CDN such as [CDNJS](https://cdnjs.com/libraries/immutable) -or [jsDelivr](https://www.jsdelivr.com/package/npm/immutable). - -Use a script tag to directly add `Immutable` to the global scope: - -```html - - -``` - -Or use an AMD-style loader (such as [RequireJS](https://requirejs.org/)): - -```js -require(['./immutable.min.js'], function (Immutable) { - var map1 = Immutable.Map({ a: 1, b: 2, c: 3 }); - var map2 = map1.set('b', 50); - map1.get('b'); // 2 - map2.get('b'); // 50 -}); -``` - -### Flow & TypeScript - -Use these Immutable collections and sequences as you would use native -collections in your [Flowtype](https://flowtype.org/) or [TypeScript](https://typescriptlang.org) programs while still taking -advantage of type generics, error detection, and auto-complete in your IDE. - -Installing `immutable` via npm brings with it type definitions for Flow (v0.55.0 or higher) -and TypeScript (v2.1.0 or higher), so you shouldn't need to do anything at all! - -#### Using TypeScript with Immutable.js v4 - -Immutable.js type definitions embrace ES2015. While Immutable.js itself supports -legacy browsers and environments, its type definitions require TypeScript's 2015 -lib. Include either `"target": "es2015"` or `"lib": "es2015"` in your -`tsconfig.json`, or provide `--target es2015` or `--lib es2015` to the -`tsc` command. - - - -```js -const { Map } = require('immutable'); -const map1 = Map({ a: 1, b: 2, c: 3 }); -const map2 = map1.set('b', 50); -map1.get('b') + ' vs. ' + map2.get('b'); // 2 vs. 50 -``` - -#### Using TypeScript with Immutable.js v3 and earlier: - -Previous versions of Immutable.js include a reference file which you can include -via relative path to the type definitions at the top of your file. - -```js -/// -import { Map } from 'immutable'; -var map1: Map; -map1 = Map({ a: 1, b: 2, c: 3 }); -var map2 = map1.set('b', 50); -map1.get('b'); // 2 -map2.get('b'); // 50 -``` - -## The case for Immutability - -Much of what makes application development difficult is tracking mutation and -maintaining state. Developing with immutable data encourages you to think -differently about how data flows through your application. - -Subscribing to data events throughout your application creates a huge overhead of -book-keeping which can hurt performance, sometimes dramatically, and creates -opportunities for areas of your application to get out of sync with each other -due to easy to make programmer error. Since immutable data never changes, -subscribing to changes throughout the model is a dead-end and new data can only -ever be passed from above. - -This model of data flow aligns well with the architecture of [React][] -and especially well with an application designed using the ideas of [Flux][]. - -When data is passed from above rather than being subscribed to, and you're only -interested in doing work when something has changed, you can use equality. - -Immutable collections should be treated as _values_ rather than _objects_. While -objects represent some thing which could change over time, a value represents -the state of that thing at a particular instance of time. This principle is most -important to understanding the appropriate use of immutable data. In order to -treat Immutable.js collections as values, it's important to use the -`Immutable.is()` function or `.equals()` method to determine _value equality_ -instead of the `===` operator which determines object _reference identity_. - - - -```js -const { Map } = require('immutable'); -const map1 = Map({ a: 1, b: 2, c: 3 }); -const map2 = Map({ a: 1, b: 2, c: 3 }); -map1.equals(map2); // true -map1 === map2; // false -``` - -Note: As a performance optimization Immutable.js attempts to return the existing -collection when an operation would result in an identical collection, allowing -for using `===` reference equality to determine if something definitely has not -changed. This can be extremely useful when used within a memoization function -which would prefer to re-run the function if a deeper equality check could -potentially be more costly. The `===` equality check is also used internally by -`Immutable.is` and `.equals()` as a performance optimization. - - - -```js -const { Map } = require('immutable'); -const map1 = Map({ a: 1, b: 2, c: 3 }); -const map2 = map1.set('b', 2); // Set to same value -map1 === map2; // true -``` - -If an object is immutable, it can be "copied" simply by making another reference -to it instead of copying the entire object. Because a reference is much smaller -than the object itself, this results in memory savings and a potential boost in -execution speed for programs which rely on copies (such as an undo-stack). - - - -```js -const { Map } = require('immutable'); -const map = Map({ a: 1, b: 2, c: 3 }); -const mapCopy = map; // Look, "copies" are free! -``` - -[React]: https://reactjs.org/ -[Flux]: https://facebook.github.io/flux/docs/in-depth-overview/ - - -## JavaScript-first API - -While Immutable.js is inspired by Clojure, Scala, Haskell and other functional -programming environments, it's designed to bring these powerful concepts to -JavaScript, and therefore has an Object-Oriented API that closely mirrors that -of [ES2015][] [Array][], [Map][], and [Set][]. - -[es2015]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla -[array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array -[map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map -[set]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set - -The difference for the immutable collections is that methods which would mutate -the collection, like `push`, `set`, `unshift` or `splice`, instead return a new -immutable collection. Methods which return new arrays, like `slice` or `concat`, -instead return new immutable collections. - - - -```js -const { List } = require('immutable'); -const list1 = List([1, 2]); -const list2 = list1.push(3, 4, 5); -const list3 = list2.unshift(0); -const list4 = list1.concat(list2, list3); -assert.equal(list1.size, 2); -assert.equal(list2.size, 5); -assert.equal(list3.size, 6); -assert.equal(list4.size, 13); -assert.equal(list4.get(0), 1); -``` - -Almost all of the methods on [Array][] will be found in similar form on -`Immutable.List`, those of [Map][] found on `Immutable.Map`, and those of [Set][] -found on `Immutable.Set`, including collection operations like `forEach()` -and `map()`. - - - -```js -const { Map } = require('immutable'); -const alpha = Map({ a: 1, b: 2, c: 3, d: 4 }); -alpha.map((v, k) => k.toUpperCase()).join(); -// 'A,B,C,D' -``` - -### Convert from raw JavaScript objects and arrays. - -Designed to inter-operate with your existing JavaScript, Immutable.js -accepts plain JavaScript Arrays and Objects anywhere a method expects a -`Collection`. - - - -```js -const { Map, List } = require('immutable'); -const map1 = Map({ a: 1, b: 2, c: 3, d: 4 }); -const map2 = Map({ c: 10, a: 20, t: 30 }); -const obj = { d: 100, o: 200, g: 300 }; -const map3 = map1.merge(map2, obj); -// Map { a: 20, b: 2, c: 10, d: 100, t: 30, o: 200, g: 300 } -const list1 = List([1, 2, 3]); -const list2 = List([4, 5, 6]); -const array = [7, 8, 9]; -const list3 = list1.concat(list2, array); -// List [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] -``` - -This is possible because Immutable.js can treat any JavaScript Array or Object -as a Collection. You can take advantage of this in order to get sophisticated -collection methods on JavaScript Objects, which otherwise have a very sparse -native API. Because Seq evaluates lazily and does not cache intermediate -results, these operations can be extremely efficient. - - - -```js -const { Seq } = require('immutable'); -const myObject = { a: 1, b: 2, c: 3 }; -Seq(myObject) - .map(x => x * x) - .toObject(); -// { a: 1, b: 4, c: 9 } -``` - -Keep in mind, when using JS objects to construct Immutable Maps, that -JavaScript Object properties are always strings, even if written in a quote-less -shorthand, while Immutable Maps accept keys of any type. - - - -```js -const { fromJS } = require('immutable'); - -const obj = { 1: 'one' }; -console.log(Object.keys(obj)); // [ "1" ] -console.log(obj['1'], obj[1]); // "one", "one" - -const map = fromJS(obj); -console.log(map.get('1'), map.get(1)); // "one", undefined -``` - -Property access for JavaScript Objects first converts the key to a string, but -since Immutable Map keys can be of any type the argument to `get()` is -not altered. - -### Converts back to raw JavaScript objects. - -All Immutable.js Collections can be converted to plain JavaScript Arrays and -Objects shallowly with `toArray()` and `toObject()` or deeply with `toJS()`. -All Immutable Collections also implement `toJSON()` allowing them to be passed -to `JSON.stringify` directly. They also respect the custom `toJSON()` methods of -nested objects. - - - -```js -const { Map, List } = require('immutable'); -const deep = Map({ a: 1, b: 2, c: List([3, 4, 5]) }); -console.log(deep.toObject()); // { a: 1, b: 2, c: List [ 3, 4, 5 ] } -console.log(deep.toArray()); // [ 1, 2, List [ 3, 4, 5 ] ] -console.log(deep.toJS()); // { a: 1, b: 2, c: [ 3, 4, 5 ] } -JSON.stringify(deep); // '{"a":1,"b":2,"c":[3,4,5]}' -``` - -### Embraces ES2015 - -Immutable.js supports all JavaScript environments, including legacy -browsers (even IE11). However it also takes advantage of features added to -JavaScript in [ES2015][], the latest standard version of JavaScript, including -[Iterators][], [Arrow Functions][], [Classes][], and [Modules][]. It's inspired -by the native [Map][] and [Set][] collections added to ES2015. - -All examples in the Documentation are presented in ES2015. To run in all -browsers, they need to be translated to ES5. - -```js -// ES2015 -const mapped = foo.map(x => x * x); -// ES5 -var mapped = foo.map(function (x) { - return x * x; -}); -``` - -All Immutable.js collections are [Iterable][iterators], which allows them to be -used anywhere an Iterable is expected, such as when spreading into an Array. - - - -```js -const { List } = require('immutable'); -const aList = List([1, 2, 3]); -const anArray = [0, ...aList, 4, 5]; // [ 0, 1, 2, 3, 4, 5 ] -``` - -Note: A Collection is always iterated in the same order, however that order may -not always be well defined, as is the case for the `Map` and `Set`. - -[Iterators]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol -[Arrow Functions]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions -[Classes]: https://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes -[Modules]: https://www.2ality.com/2014/09/es6-modules-final.html - - -## Nested Structures - -The collections in Immutable.js are intended to be nested, allowing for deep -trees of data, similar to JSON. - - - -```js -const { fromJS } = require('immutable'); -const nested = fromJS({ a: { b: { c: [3, 4, 5] } } }); -// Map { a: Map { b: Map { c: List [ 3, 4, 5 ] } } } -``` - -A few power-tools allow for reading and operating on nested data. The -most useful are `mergeDeep`, `getIn`, `setIn`, and `updateIn`, found on `List`, -`Map` and `OrderedMap`. - - - -```js -const { fromJS } = require('immutable'); -const nested = fromJS({ a: { b: { c: [3, 4, 5] } } }); - -const nested2 = nested.mergeDeep({ a: { b: { d: 6 } } }); -// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 6 } } } - -console.log(nested2.getIn(['a', 'b', 'd'])); // 6 - -const nested3 = nested2.updateIn(['a', 'b', 'd'], value => value + 1); -console.log(nested3); -// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 7 } } } - -const nested4 = nested3.updateIn(['a', 'b', 'c'], list => list.push(6)); -// Map { a: Map { b: Map { c: List [ 3, 4, 5, 6 ], d: 7 } } } -``` - -## Equality treats Collections as Values - -Immutable.js collections are treated as pure data _values_. Two immutable -collections are considered _value equal_ (via `.equals()` or `is()`) if they -represent the same collection of values. This differs from JavaScript's typical -_reference equal_ (via `===` or `==`) for Objects and Arrays which only -determines if two variables represent references to the same object instance. - -Consider the example below where two identical `Map` instances are not -_reference equal_ but are _value equal_. - - - -```js -// First consider: -const obj1 = { a: 1, b: 2, c: 3 }; -const obj2 = { a: 1, b: 2, c: 3 }; -obj1 !== obj2; // two different instances are always not equal with === - -const { Map, is } = require('immutable'); -const map1 = Map({ a: 1, b: 2, c: 3 }); -const map2 = Map({ a: 1, b: 2, c: 3 }); -map1 !== map2; // two different instances are not reference-equal -map1.equals(map2); // but are value-equal if they have the same values -is(map1, map2); // alternatively can use the is() function -``` - -Value equality allows Immutable.js collections to be used as keys in Maps or -values in Sets, and retrieved with different but equivalent collections: - - - -```js -const { Map, Set } = require('immutable'); -const map1 = Map({ a: 1, b: 2, c: 3 }); -const map2 = Map({ a: 1, b: 2, c: 3 }); -const set = Set().add(map1); -set.has(map2); // true because these are value-equal -``` - -Note: `is()` uses the same measure of equality as [Object.is][] for scalar -strings and numbers, but uses value equality for Immutable collections, -determining if both are immutable and all keys and values are equal -using the same measure of equality. - -[object.is]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - -#### Performance tradeoffs - -While value equality is useful in many circumstances, it has different -performance characteristics than reference equality. Understanding these -tradeoffs may help you decide which to use in each case, especially when used -to memoize some operation. - -When comparing two collections, value equality may require considering every -item in each collection, on an `O(N)` time complexity. For large collections of -values, this could become a costly operation. Though if the two are not equal -and hardly similar, the inequality is determined very quickly. In contrast, when -comparing two collections with reference equality, only the initial references -to memory need to be compared which is not based on the size of the collections, -which has an `O(1)` time complexity. Checking reference equality is always very -fast, however just because two collections are not reference-equal does not rule -out the possibility that they may be value-equal. - -#### Return self on no-op optimization - -When possible, Immutable.js avoids creating new objects for updates where no -change in _value_ occurred, to allow for efficient _reference equality_ checking -to quickly determine if no change occurred. - - - -```js -const { Map } = require('immutable'); -const originalMap = Map({ a: 1, b: 2, c: 3 }); -const updatedMap = originalMap.set('b', 2); -updatedMap === originalMap; // No-op .set() returned the original reference. -``` - -However updates which do result in a change will return a new reference. Each -of these operations occur independently, so two similar updates will not return -the same reference: - - - -```js -const { Map } = require('immutable'); -const originalMap = Map({ a: 1, b: 2, c: 3 }); -const updatedMap = originalMap.set('b', 1000); -// New instance, leaving the original immutable. -updatedMap !== originalMap; -const anotherUpdatedMap = originalMap.set('b', 1000); -// Despite both the results of the same operation, each created a new reference. -anotherUpdatedMap !== updatedMap; -// However the two are value equal. -anotherUpdatedMap.equals(updatedMap); -``` - -## Batching Mutations - -> If a tree falls in the woods, does it make a sound? -> -> If a pure function mutates some local data in order to produce an immutable -> return value, is that ok? -> -> — Rich Hickey, Clojure - -Applying a mutation to create a new immutable object results in some overhead, -which can add up to a minor performance penalty. If you need to apply a series -of mutations locally before returning, Immutable.js gives you the ability to -create a temporary mutable (transient) copy of a collection and apply a batch of -mutations in a performant manner by using `withMutations`. In fact, this is -exactly how Immutable.js applies complex mutations itself. - -As an example, building `list2` results in the creation of 1, not 3, new -immutable Lists. - - - -```js -const { List } = require('immutable'); -const list1 = List([1, 2, 3]); -const list2 = list1.withMutations(function (list) { - list.push(4).push(5).push(6); -}); -assert.equal(list1.size, 3); -assert.equal(list2.size, 6); -``` - -Note: Immutable.js also provides `asMutable` and `asImmutable`, but only -encourages their use when `withMutations` will not suffice. Use caution to not -return a mutable copy, which could result in undesired behavior. - -_Important!_: Only a select few methods can be used in `withMutations` including -`set`, `push` and `pop`. These methods can be applied directly against a -persistent data-structure where other methods like `map`, `filter`, `sort`, -and `splice` will always return new immutable data-structures and never mutate -a mutable collection. - -## Lazy Seq - -`Seq` describes a lazy operation, allowing them to efficiently chain -use of all the higher-order collection methods (such as `map` and `filter`) -by not creating intermediate collections. - -**Seq is immutable** — Once a Seq is created, it cannot be -changed, appended to, rearranged or otherwise modified. Instead, any mutative -method called on a `Seq` will return a new `Seq`. - -**Seq is lazy** — `Seq` does as little work as necessary to respond to any -method call. Values are often created during iteration, including implicit -iteration when reducing or converting to a concrete data structure such as -a `List` or JavaScript `Array`. - -For example, the following performs no work, because the resulting -`Seq`'s values are never iterated: - -```js -const { Seq } = require('immutable'); -const oddSquares = Seq([1, 2, 3, 4, 5, 6, 7, 8]) - .filter(x => x % 2 !== 0) - .map(x => x * x); -``` - -Once the `Seq` is used, it performs only the work necessary. In this -example, no intermediate arrays are ever created, filter is called three -times, and map is only called once: - -```js -oddSquares.get(1); // 9 -``` - -Any collection can be converted to a lazy Seq with `Seq()`. - - - -```js -const { Map, Seq } = require('immutable'); -const map = Map({ a: 1, b: 2, c: 3 }); -const lazySeq = Seq(map); -``` - -`Seq` allows for the efficient chaining of operations, allowing for the -expression of logic that can otherwise be very tedious: - -```js -lazySeq - .flip() - .map(key => key.toUpperCase()) - .flip(); -// Seq { A: 1, B: 2, C: 3 } -``` - -As well as expressing logic that would otherwise seem memory or time -limited, for example `Range` is a special kind of Lazy sequence. - - - -```js -const { Range } = require('immutable'); -Range(1, Infinity) - .skip(1000) - .map(n => -n) - .filter(n => n % 2 === 0) - .take(2) - .reduce((r, n) => r * n, 1); -// 1006008 -``` - -## Comparison of filter(), groupBy(), and partition() - -The `filter()`, `groupBy()`, and `partition()` methods are similar in that they -all divide a collection into parts based on applying a function to each element. -All three call the predicate or grouping function once for each item in the -input collection. All three return zero or more collections of the same type as -their input. The returned collections are always distinct from the input -(according to `===`), even if the contents are identical. - -Of these methods, `filter()` is the only one that is lazy and the only one which -discards items from the input collection. It is the simplest to use, and the -fact that it returns exactly one collection makes it easy to combine with other -methods to form a pipeline of operations. - -The `partition()` method is similar to an eager version of `filter()`, but it -returns two collections; the first contains the items that would have been -discarded by `filter()`, and the second contains the items that would have been -kept. It always returns an array of exactly two collections, which can make it -easier to use than `groupBy()`. Compared to making two separate calls to -`filter()`, `partition()` makes half as many calls it the predicate passed to -it. - -The `groupBy()` method is a more generalized version of `partition()` that can -group by an arbitrary function rather than just a predicate. It returns a map -with zero or more entries, where the keys are the values returned by the -grouping function, and the values are nonempty collections of the corresponding -arguments. Although `groupBy()` is more powerful than `partition()`, it can be -harder to use because it is not always possible predict in advance how many -entries the returned map will have and what their keys will be. - -| Summary | `filter` | `partition` | `groupBy` | -|:------------------------------|:---------|:------------|:---------------| -| ease of use | easiest | moderate | hardest | -| generality | least | moderate | most | -| laziness | lazy | eager | eager | -| # of returned sub-collections | 1 | 2 | 0 or more | -| sub-collections may be empty | yes | yes | no | -| can discard items | yes | no | no | -| wrapping container | none | array | Map/OrderedMap | - -## Additional Tools and Resources - -- [Atom-store](https://github.com/jameshopkins/atom-store/) - - A Clojure-inspired atom implementation in Javascript with configurability - for external persistance. - -- [Chai Immutable](https://github.com/astorije/chai-immutable) - - If you are using the [Chai Assertion Library](https://chaijs.com/), this - provides a set of assertions to use against Immutable.js collections. - -- [Fantasy-land](https://github.com/fantasyland/fantasy-land) - - Specification for interoperability of common algebraic structures in JavaScript. - -- [Immutagen](https://github.com/pelotom/immutagen) - - A library for simulating immutable generators in JavaScript. - -- [Immutable-cursor](https://github.com/redbadger/immutable-cursor) - - Immutable cursors incorporating the Immutable.js interface over - Clojure-inspired atom. - -- [Immutable-ext](https://github.com/DrBoolean/immutable-ext) - - Fantasyland extensions for immutablejs - -- [Immutable-js-tools](https://github.com/madeinfree/immutable-js-tools) - - Util tools for immutable.js - -- [Immutable-Redux](https://github.com/gajus/redux-immutable) - - redux-immutable is used to create an equivalent function of Redux - combineReducers that works with Immutable.js state. - -- [Immutable-Treeutils](https://github.com/lukasbuenger/immutable-treeutils) - - Functional tree traversal helpers for ImmutableJS data structures. - -- [Irecord](https://github.com/ericelliott/irecord) - - An immutable store that exposes an RxJS observable. Great for React. - -- [Mudash](https://github.com/brianneisler/mudash) - - Lodash wrapper providing Immutable.JS support. - -- [React-Immutable-PropTypes](https://github.com/HurricaneJames/react-immutable-proptypes) - - PropType validators that work with Immutable.js. - -- [Redux-Immutablejs](https://github.com/indexiatech/redux-immutablejs) - - Redux Immutable facilities. - -- [Rxstate](https://github.com/yamalight/rxstate) - - Simple opinionated state management library based on RxJS and Immutable.js. - -- [Transit-Immutable-js](https://github.com/glenjamin/transit-immutable-js) - - Transit serialisation for Immutable.js. - - See also: [Transit-js](https://github.com/cognitect/transit-js) - -Have an additional tool designed to work with Immutable.js? -Submit a PR to add it to this list in alphabetical order. - -## Contributing - -Use [Github issues](https://github.com/immutable-js/immutable-js/issues) for requests. - -We actively welcome pull requests, learn how to [contribute](https://github.com/immutable-js/immutable-js/blob/main/.github/CONTRIBUTING.md). - -Immutable.js is maintained within the [Contributor Covenant's Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/). - -### Changelog - -Changes are tracked as [Github releases](https://github.com/immutable-js/immutable-js/releases). - -### License - -Immutable.js is [MIT-licensed](./LICENSE). - -### Thanks - -[Phil Bagwell](https://www.youtube.com/watch?v=K2NYwP90bNs), for his inspiration -and research in persistent data structures. - -[Hugh Jackson](https://github.com/hughfdjackson/), for providing the npm package -name. If you're looking for his unsupported package, see [this repository](https://github.com/hughfdjackson/immutable). diff --git a/web/static/node_modules/immutable/dist/immutable.d.ts b/web/static/node_modules/immutable/dist/immutable.d.ts deleted file mode 100644 index b27aac2a..00000000 --- a/web/static/node_modules/immutable/dist/immutable.d.ts +++ /dev/null @@ -1,6105 +0,0 @@ -/** @ignore we should disable this rules, but let's activate it to enable eslint first */ -/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types */ -/** - * Immutable data encourages pure functions (data-in, data-out) and lends itself - * to much simpler application development and enabling techniques from - * functional programming such as lazy evaluation. - * - * While designed to bring these powerful functional concepts to JavaScript, it - * presents an Object-Oriented API familiar to Javascript engineers and closely - * mirroring that of Array, Map, and Set. It is easy and efficient to convert to - * and from plain Javascript types. - * - * ## How to read these docs - * - * In order to better explain what kinds of values the Immutable.js API expects - * and produces, this documentation is presented in a statically typed dialect of - * JavaScript (like [Flow][] or [TypeScript][]). You *don't need* to use these - * type checking tools in order to use Immutable.js, however becoming familiar - * with their syntax will help you get a deeper understanding of this API. - * - * **A few examples and how to read them.** - * - * All methods describe the kinds of data they accept and the kinds of data - * they return. For example a function which accepts two numbers and returns - * a number would look like this: - * - * ```js - * sum(first: number, second: number): number - * ``` - * - * Sometimes, methods can accept different kinds of data or return different - * kinds of data, and this is described with a *type variable*, which is - * typically in all-caps. For example, a function which always returns the same - * kind of data it was provided would look like this: - * - * ```js - * identity(value: T): T - * ``` - * - * Type variables are defined with classes and referred to in methods. For - * example, a class that holds onto a value for you might look like this: - * - * ```js - * class Box { - * constructor(value: T) - * getValue(): T - * } - * ``` - * - * In order to manipulate Immutable data, methods that we're used to affecting - * a Collection instead return a new Collection of the same type. The type - * `this` refers to the same kind of class. For example, a List which returns - * new Lists when you `push` a value onto it might look like: - * - * ```js - * class List { - * push(value: T): this - * } - * ``` - * - * Many methods in Immutable.js accept values which implement the JavaScript - * [Iterable][] protocol, and might appear like `Iterable` for something - * which represents sequence of strings. Typically in JavaScript we use plain - * Arrays (`[]`) when an Iterable is expected, but also all of the Immutable.js - * collections are iterable themselves! - * - * For example, to get a value deep within a structure of data, we might use - * `getIn` which expects an `Iterable` path: - * - * ``` - * getIn(path: Iterable): unknown - * ``` - * - * To use this method, we could pass an array: `data.getIn([ "key", 2 ])`. - * - * - * Note: All examples are presented in the modern [ES2015][] version of - * JavaScript. Use tools like Babel to support older browsers. - * - * For example: - * - * ```js - * // ES2015 - * const mappedFoo = foo.map(x => x * x); - * // ES5 - * var mappedFoo = foo.map(function (x) { return x * x; }); - * ``` - * - * [ES2015]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla - * [TypeScript]: https://www.typescriptlang.org/ - * [Flow]: https://flowtype.org/ - * [Iterable]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols - */ - -declare namespace Immutable { - /** @ignore */ - type OnlyObject = Extract; - - /** @ignore */ - type ContainObject = OnlyObject extends object - ? OnlyObject extends never - ? false - : true - : false; - - /** - * @ignore - * - * Used to convert deeply all immutable types to a plain TS type. - * Using `unknown` on object instead of recursive call as we have a circular reference issue - */ - export type DeepCopy = T extends Record - ? // convert Record to DeepCopy plain JS object - { - [key in keyof R]: ContainObject extends true ? unknown : R[key]; - } - : T extends MapOf - ? // convert MapOf to DeepCopy plain JS object - { - [key in keyof R]: ContainObject extends true ? unknown : R[key]; - } - : T extends Collection.Keyed - ? // convert KeyedCollection to DeepCopy plain JS object - { - [key in KeyedKey extends string | number | symbol - ? KeyedKey - : string]: V extends object ? unknown : V; - } - : // convert IndexedCollection or Immutable.Set to DeepCopy plain JS array - // eslint-disable-next-line @typescript-eslint/no-unused-vars - T extends Collection - ? Array> - : T extends string | number // Iterable scalar types : should be kept as is - ? T - : T extends Iterable // Iterable are converted to plain JS array - ? Array> - : T extends object // plain JS object are converted deeply - ? { - [ObjectKey in keyof T]: ContainObject extends true - ? unknown - : T[ObjectKey]; - } - : // other case : should be kept as is - T; - - /** - * Describes which item in a pair should be placed first when sorting - * - * @ignore - */ - export enum PairSorting { - LeftThenRight = -1, - RightThenLeft = +1, - } - - /** - * Function comparing two items of the same type. It can return: - * - * * a PairSorting value, to indicate whether the left-hand item or the right-hand item should be placed before the other - * - * * the traditional numeric return value - especially -1, 0, or 1 - * - * @ignore - */ - export type Comparator = (left: T, right: T) => PairSorting | number; - - /** - * Lists are ordered indexed dense collections, much like a JavaScript - * Array. - * - * Lists are immutable and fully persistent with O(log32 N) gets and sets, - * and O(1) push and pop. - * - * Lists implement Deque, with efficient addition and removal from both the - * end (`push`, `pop`) and beginning (`unshift`, `shift`). - * - * Unlike a JavaScript Array, there is no distinction between an - * "unset" index and an index set to `undefined`. `List#forEach` visits all - * indices from 0 to size, regardless of whether they were explicitly defined. - */ - namespace List { - /** - * True if the provided value is a List - * - * - * ```js - * const { List } = require('immutable'); - * List.isList([]); // false - * List.isList(List()); // true - * ``` - */ - function isList(maybeList: unknown): maybeList is List; - - /** - * Creates a new List containing `values`. - * - * - * ```js - * const { List } = require('immutable'); - * List.of(1, 2, 3, 4) - * // List [ 1, 2, 3, 4 ] - * ``` - * - * Note: Values are not altered or converted in any way. - * - * - * ```js - * const { List } = require('immutable'); - * List.of({x:1}, 2, [3], 4) - * // List [ { x: 1 }, 2, [ 3 ], 4 ] - * ``` - */ - function of(...values: Array): List; - } - - /** - * Create a new immutable List containing the values of the provided - * collection-like. - * - * Note: `List` is a factory function and not a class, and does not use the - * `new` keyword during construction. - * - * - * ```js - * const { List, Set } = require('immutable') - * - * const emptyList = List() - * // List [] - * - * const plainArray = [ 1, 2, 3, 4 ] - * const listFromPlainArray = List(plainArray) - * // List [ 1, 2, 3, 4 ] - * - * const plainSet = Set([ 1, 2, 3, 4 ]) - * const listFromPlainSet = List(plainSet) - * // List [ 1, 2, 3, 4 ] - * - * const arrayIterator = plainArray[Symbol.iterator]() - * const listFromCollectionArray = List(arrayIterator) - * // List [ 1, 2, 3, 4 ] - * - * listFromPlainArray.equals(listFromCollectionArray) // true - * listFromPlainSet.equals(listFromCollectionArray) // true - * listFromPlainSet.equals(listFromPlainArray) // true - * ``` - */ - function List(collection?: Iterable | ArrayLike): List; - - interface List extends Collection.Indexed { - /** - * The number of items in this List. - */ - readonly size: number; - - // Persistent changes - - /** - * Returns a new List which includes `value` at `index`. If `index` already - * exists in this List, it will be replaced. - * - * `index` may be a negative number, which indexes back from the end of the - * List. `v.set(-1, "value")` sets the last item in the List. - * - * If `index` larger than `size`, the returned List's `size` will be large - * enough to include the `index`. - * - * - * ```js - * const originalList = List([ 0 ]); - * // List [ 0 ] - * originalList.set(1, 1); - * // List [ 0, 1 ] - * originalList.set(0, 'overwritten'); - * // List [ "overwritten" ] - * originalList.set(2, 2); - * // List [ 0, undefined, 2 ] - * - * List().set(50000, 'value').size; - * // 50001 - * ``` - * - * Note: `set` can be used in `withMutations`. - */ - set(index: number, value: T): List; - - /** - * Returns a new List which excludes this `index` and with a size 1 less - * than this List. Values at indices above `index` are shifted down by 1 to - * fill the position. - * - * This is synonymous with `list.splice(index, 1)`. - * - * `index` may be a negative number, which indexes back from the end of the - * List. `v.delete(-1)` deletes the last item in the List. - * - * Note: `delete` cannot be safely used in IE8 - * - * - * ```js - * List([ 0, 1, 2, 3, 4 ]).delete(0); - * // List [ 1, 2, 3, 4 ] - * ``` - * - * Since `delete()` re-indexes values, it produces a complete copy, which - * has `O(N)` complexity. - * - * Note: `delete` *cannot* be used in `withMutations`. - * - * @alias remove - */ - delete(index: number): List; - remove(index: number): List; - - /** - * Returns a new List with `value` at `index` with a size 1 more than this - * List. Values at indices above `index` are shifted over by 1. - * - * This is synonymous with `list.splice(index, 0, value)`. - * - * - * ```js - * List([ 0, 1, 2, 3, 4 ]).insert(6, 5) - * // List [ 0, 1, 2, 3, 4, 5 ] - * ``` - * - * Since `insert()` re-indexes values, it produces a complete copy, which - * has `O(N)` complexity. - * - * Note: `insert` *cannot* be used in `withMutations`. - */ - insert(index: number, value: T): List; - - /** - * Returns a new List with 0 size and no values in constant time. - * - * - * ```js - * List([ 1, 2, 3, 4 ]).clear() - * // List [] - * ``` - * - * Note: `clear` can be used in `withMutations`. - */ - clear(): List; - - /** - * Returns a new List with the provided `values` appended, starting at this - * List's `size`. - * - * - * ```js - * List([ 1, 2, 3, 4 ]).push(5) - * // List [ 1, 2, 3, 4, 5 ] - * ``` - * - * Note: `push` can be used in `withMutations`. - */ - push(...values: Array): List; - - /** - * Returns a new List with a size ones less than this List, excluding - * the last index in this List. - * - * Note: this differs from `Array#pop` because it returns a new - * List rather than the removed value. Use `last()` to get the last value - * in this List. - * - * ```js - * List([ 1, 2, 3, 4 ]).pop() - * // List[ 1, 2, 3 ] - * ``` - * - * Note: `pop` can be used in `withMutations`. - */ - pop(): List; - - /** - * Returns a new List with the provided `values` prepended, shifting other - * values ahead to higher indices. - * - * - * ```js - * List([ 2, 3, 4]).unshift(1); - * // List [ 1, 2, 3, 4 ] - * ``` - * - * Note: `unshift` can be used in `withMutations`. - */ - unshift(...values: Array): List; - - /** - * Returns a new List with a size ones less than this List, excluding - * the first index in this List, shifting all other values to a lower index. - * - * Note: this differs from `Array#shift` because it returns a new - * List rather than the removed value. Use `first()` to get the first - * value in this List. - * - * - * ```js - * List([ 0, 1, 2, 3, 4 ]).shift(); - * // List [ 1, 2, 3, 4 ] - * ``` - * - * Note: `shift` can be used in `withMutations`. - */ - shift(): List; - - /** - * Returns a new List with an updated value at `index` with the return - * value of calling `updater` with the existing value, or `notSetValue` if - * `index` was not set. If called with a single argument, `updater` is - * called with the List itself. - * - * `index` may be a negative number, which indexes back from the end of the - * List. `v.update(-1)` updates the last item in the List. - * - * - * ```js - * const list = List([ 'a', 'b', 'c' ]) - * const result = list.update(2, val => val.toUpperCase()) - * // List [ "a", "b", "C" ] - * ``` - * - * This can be very useful as a way to "chain" a normal function into a - * sequence of methods. RxJS calls this "let" and lodash calls it "thru". - * - * For example, to sum a List after mapping and filtering: - * - * - * ```js - * function sum(collection) { - * return collection.reduce((sum, x) => sum + x, 0) - * } - * - * List([ 1, 2, 3 ]) - * .map(x => x + 1) - * .filter(x => x % 2 === 0) - * .update(sum) - * // 6 - * ``` - * - * Note: `update(index)` can be used in `withMutations`. - * - * @see `Map#update` - */ - update(index: number, notSetValue: T, updater: (value: T) => T): this; - update( - index: number, - updater: (value: T | undefined) => T | undefined - ): this; - update(updater: (value: this) => R): R; - - /** - * Returns a new List with size `size`. If `size` is less than this - * List's size, the new List will exclude values at the higher indices. - * If `size` is greater than this List's size, the new List will have - * undefined values for the newly available indices. - * - * When building a new List and the final size is known up front, `setSize` - * used in conjunction with `withMutations` may result in the more - * performant construction. - */ - setSize(size: number): List; - - // Deep persistent changes - - /** - * Returns a new List having set `value` at this `keyPath`. If any keys in - * `keyPath` do not exist, a new immutable Map will be created at that key. - * - * Index numbers are used as keys to determine the path to follow in - * the List. - * - * - * ```js - * const { List } = require('immutable') - * const list = List([ 0, 1, 2, List([ 3, 4 ])]) - * list.setIn([3, 0], 999); - * // List [ 0, 1, 2, List [ 999, 4 ] ] - * ``` - * - * Plain JavaScript Object or Arrays may be nested within an Immutable.js - * Collection, and setIn() can update those values as well, treating them - * immutably by creating new copies of those values with the changes applied. - * - * - * ```js - * const { List } = require('immutable') - * const list = List([ 0, 1, 2, { plain: 'object' }]) - * list.setIn([3, 'plain'], 'value'); - * // List([ 0, 1, 2, { plain: 'value' }]) - * ``` - * - * Note: `setIn` can be used in `withMutations`. - */ - setIn(keyPath: Iterable, value: unknown): this; - - /** - * Returns a new List having removed the value at this `keyPath`. If any - * keys in `keyPath` do not exist, no change will occur. - * - * - * ```js - * const { List } = require('immutable') - * const list = List([ 0, 1, 2, List([ 3, 4 ])]) - * list.deleteIn([3, 0]); - * // List [ 0, 1, 2, List [ 4 ] ] - * ``` - * - * Plain JavaScript Object or Arrays may be nested within an Immutable.js - * Collection, and removeIn() can update those values as well, treating them - * immutably by creating new copies of those values with the changes applied. - * - * - * ```js - * const { List } = require('immutable') - * const list = List([ 0, 1, 2, { plain: 'object' }]) - * list.removeIn([3, 'plain']); - * // List([ 0, 1, 2, {}]) - * ``` - * - * Note: `deleteIn` *cannot* be safely used in `withMutations`. - * - * @alias removeIn - */ - deleteIn(keyPath: Iterable): this; - removeIn(keyPath: Iterable): this; - - /** - * Note: `updateIn` can be used in `withMutations`. - * - * @see `Map#updateIn` - */ - updateIn( - keyPath: Iterable, - notSetValue: unknown, - updater: (value: unknown) => unknown - ): this; - updateIn( - keyPath: Iterable, - updater: (value: unknown) => unknown - ): this; - - /** - * Note: `mergeIn` can be used in `withMutations`. - * - * @see `Map#mergeIn` - */ - mergeIn(keyPath: Iterable, ...collections: Array): this; - - /** - * Note: `mergeDeepIn` can be used in `withMutations`. - * - * @see `Map#mergeDeepIn` - */ - mergeDeepIn( - keyPath: Iterable, - ...collections: Array - ): this; - - // Transient changes - - /** - * Note: Not all methods can be safely used on a mutable collection or within - * `withMutations`! Check the documentation for each method to see if it - * allows being used in `withMutations`. - * - * @see `Map#withMutations` - */ - withMutations(mutator: (mutable: this) => unknown): this; - - /** - * An alternative API for withMutations() - * - * Note: Not all methods can be safely used on a mutable collection or within - * `withMutations`! Check the documentation for each method to see if it - * allows being used in `withMutations`. - * - * @see `Map#asMutable` - */ - asMutable(): this; - - /** - * @see `Map#wasAltered` - */ - wasAltered(): boolean; - - /** - * @see `Map#asImmutable` - */ - asImmutable(): this; - - // Sequence algorithms - - /** - * Returns a new List with other values or collections concatenated to this one. - * - * Note: `concat` can be used in `withMutations`. - * - * @alias merge - */ - concat(...valuesOrCollections: Array | C>): List; - merge(...collections: Array>): List; - - /** - * Returns a new List with values passed through a - * `mapper` function. - * - * - * ```js - * List([ 1, 2 ]).map(x => 10 * x) - * // List [ 10, 20 ] - * ``` - */ - map( - mapper: (value: T, key: number, iter: this) => M, - context?: unknown - ): List; - - /** - * Flat-maps the List, returning a new List. - * - * Similar to `list.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: T, key: number, iter: this) => Iterable, - context?: unknown - ): List; - - /** - * Returns a new List with only the values for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: T, index: number, iter: this) => value is F, - context?: unknown - ): List; - filter( - predicate: (value: T, index: number, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new List with the values for which the `predicate` - * function returns false and another for which is returns true. - */ - partition( - predicate: (this: C, value: T, index: number, iter: this) => value is F, - context?: C - ): [List, List]; - partition( - predicate: (this: C, value: T, index: number, iter: this) => unknown, - context?: C - ): [this, this]; - - /** - * Returns a List "zipped" with the provided collection. - * - * Like `zipWith`, but using the default `zipper`: creating an `Array`. - * - * - * ```js - * const a = List([ 1, 2, 3 ]); - * const b = List([ 4, 5, 6 ]); - * const c = a.zip(b); // List [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] - * ``` - */ - zip(other: Collection): List<[T, U]>; - zip( - other: Collection, - other2: Collection - ): List<[T, U, V]>; - zip(...collections: Array>): List; - - /** - * Returns a List "zipped" with the provided collections. - * - * Unlike `zip`, `zipAll` continues zipping until the longest collection is - * exhausted. Missing values from shorter collections are filled with `undefined`. - * - * - * ```js - * const a = List([ 1, 2 ]); - * const b = List([ 3, 4, 5 ]); - * const c = a.zipAll(b); // List [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] - * ``` - * - * Note: Since zipAll will return a collection as large as the largest - * input, some results may contain undefined values. TypeScript cannot - * account for these without cases (as of v2.5). - */ - zipAll(other: Collection): List<[T, U]>; - zipAll( - other: Collection, - other2: Collection - ): List<[T, U, V]>; - zipAll(...collections: Array>): List; - - /** - * Returns a List "zipped" with the provided collections by using a - * custom `zipper` function. - * - * - * ```js - * const a = List([ 1, 2, 3 ]); - * const b = List([ 4, 5, 6 ]); - * const c = a.zipWith((a, b) => a + b, b); - * // List [ 5, 7, 9 ] - * ``` - */ - zipWith( - zipper: (value: T, otherValue: U) => Z, - otherCollection: Collection - ): List; - zipWith( - zipper: (value: T, otherValue: U, thirdValue: V) => Z, - otherCollection: Collection, - thirdCollection: Collection - ): List; - zipWith( - zipper: (...values: Array) => Z, - ...collections: Array> - ): List; - } - - /** - * Immutable Map is an unordered Collection.Keyed of (key, value) pairs with - * `O(log32 N)` gets and `O(log32 N)` persistent sets. - * - * Iteration order of a Map is undefined, however is stable. Multiple - * iterations of the same Map will iterate in the same order. - * - * Map's keys can be of any type, and use `Immutable.is` to determine key - * equality. This allows the use of any value (including NaN) as a key. - * - * Because `Immutable.is` returns equality based on value semantics, and - * Immutable collections are treated as values, any Immutable collection may - * be used as a key. - * - * - * ```js - * const { Map, List } = require('immutable'); - * Map().set(List([ 1 ]), 'listofone').get(List([ 1 ])); - * // 'listofone' - * ``` - * - * Any JavaScript object may be used as a key, however strict identity is used - * to evaluate key equality. Two similar looking objects will represent two - * different keys. - * - * Implemented by a hash-array mapped trie. - */ - namespace Map { - /** - * True if the provided value is a Map - * - * - * ```js - * const { Map } = require('immutable') - * Map.isMap({}) // false - * Map.isMap(Map()) // true - * ``` - */ - function isMap(maybeMap: unknown): maybeMap is Map; - } - - /** - * Creates a new Immutable Map. - * - * Created with the same key value pairs as the provided Collection.Keyed or - * JavaScript Object or expects a Collection of [K, V] tuple entries. - * - * Note: `Map` is a factory function and not a class, and does not use the - * `new` keyword during construction. - * - * - * ```js - * const { Map } = require('immutable') - * Map({ key: "value" }) - * Map([ [ "key", "value" ] ]) - * ``` - * - * Keep in mind, when using JS objects to construct Immutable Maps, that - * JavaScript Object properties are always strings, even if written in a - * quote-less shorthand, while Immutable Maps accept keys of any type. - * - * - * ```js - * let obj = { 1: "one" } - * Object.keys(obj) // [ "1" ] - * assert.equal(obj["1"], obj[1]) // "one" === "one" - * - * let map = Map(obj) - * assert.notEqual(map.get("1"), map.get(1)) // "one" !== undefined - * ``` - * - * Property access for JavaScript Objects first converts the key to a string, - * but since Immutable Map keys can be of any type the argument to `get()` is - * not altered. - */ - function Map(collection?: Iterable<[K, V]>): Map; - function Map( - obj: R - ): MapOf; - function Map(obj: { [key: string]: V }): Map; - function Map(obj: { [P in K]?: V }): Map; - - /** - * Represent a Map constructed by an object - * - * @ignore - */ - interface MapOf - extends Map { - /** - * Returns the value associated with the provided key, or notSetValue if - * the Collection does not contain this key. - * - * Note: it is possible a key may be associated with an `undefined` value, - * so if `notSetValue` is not provided and this method returns `undefined`, - * that does not guarantee the key was not found. - */ - get(key: K, notSetValue?: unknown): R[K]; - get(key: any, notSetValue: NSV): NSV; - - // TODO `` can be used after dropping support for TypeScript 4.x - // reference: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#const-type-parameters - // after this change, `as const` assertions can be remove from the type tests - getIn

    >( - searchKeyPath: [...P], - notSetValue?: unknown - ): RetrievePath; - - set(key: K, value: R[K]): this; - - update(updater: (value: this) => this): this; - update(key: K, updater: (value: R[K]) => R[K]): this; - update( - key: K, - notSetValue: NSV, - updater: (value: R[K]) => R[K] - ): this; - - // Possible best type is MapOf> but Omit seems to broke other function calls - // and generate recursion error with other methods (update, merge, etc.) until those functions are defined in MapOf - delete( - key: K - ): Extract extends never ? never : this; - remove( - key: K - ): Extract extends never ? never : this; - - toJS(): { [K in keyof R]: DeepCopy }; - - toJSON(): { [K in keyof R]: R[K] }; - } - - // Loosely based off of this work. - // https://github.com/immutable-js/immutable-js/issues/1462#issuecomment-584123268 - - /** @ignore */ - type GetMapType = S extends MapOf ? T : S; - - /** @ignore */ - type Head> = T extends [ - infer H, - ...Array - ] - ? H - : never; - - /** @ignore */ - type Tail> = T extends [unknown, ...infer I] - ? I - : Array; - - /** @ignore */ - type RetrievePathReducer< - T, - C, - L extends ReadonlyArray - > = C extends keyof GetMapType - ? L extends [] - ? GetMapType[C] - : RetrievePathReducer[C], Head, Tail> - : never; - - /** @ignore */ - type RetrievePath< - R, - P extends ReadonlyArray - > = P extends [] ? P : RetrievePathReducer, Tail

    >; - - interface Map extends Collection.Keyed { - /** - * The number of entries in this Map. - */ - readonly size: number; - - // Persistent changes - - /** - * Returns a new Map also containing the new key, value pair. If an equivalent - * key already exists in this Map, it will be replaced. - * - * - * ```js - * const { Map } = require('immutable') - * const originalMap = Map() - * const newerMap = originalMap.set('key', 'value') - * const newestMap = newerMap.set('key', 'newer value') - * - * originalMap - * // Map {} - * newerMap - * // Map { "key": "value" } - * newestMap - * // Map { "key": "newer value" } - * ``` - * - * Note: `set` can be used in `withMutations`. - */ - set(key: K, value: V): this; - - /** - * Returns a new Map which excludes this `key`. - * - * Note: `delete` cannot be safely used in IE8, but is provided to mirror - * the ES6 collection API. - * - * - * ```js - * const { Map } = require('immutable') - * const originalMap = Map({ - * key: 'value', - * otherKey: 'other value' - * }) - * // Map { "key": "value", "otherKey": "other value" } - * originalMap.delete('otherKey') - * // Map { "key": "value" } - * ``` - * - * Note: `delete` can be used in `withMutations`. - * - * @alias remove - */ - delete(key: K): this; - remove(key: K): this; - - /** - * Returns a new Map which excludes the provided `keys`. - * - * - * ```js - * const { Map } = require('immutable') - * const names = Map({ a: "Aaron", b: "Barry", c: "Connor" }) - * names.deleteAll([ 'a', 'c' ]) - * // Map { "b": "Barry" } - * ``` - * - * Note: `deleteAll` can be used in `withMutations`. - * - * @alias removeAll - */ - deleteAll(keys: Iterable): this; - removeAll(keys: Iterable): this; - - /** - * Returns a new Map containing no keys or values. - * - * - * ```js - * const { Map } = require('immutable') - * Map({ key: 'value' }).clear() - * // Map {} - * ``` - * - * Note: `clear` can be used in `withMutations`. - */ - clear(): this; - - /** - * Returns a new Map having updated the value at this `key` with the return - * value of calling `updater` with the existing value. - * - * Similar to: `map.set(key, updater(map.get(key)))`. - * - * - * ```js - * const { Map } = require('immutable') - * const aMap = Map({ key: 'value' }) - * const newMap = aMap.update('key', value => value + value) - * // Map { "key": "valuevalue" } - * ``` - * - * This is most commonly used to call methods on collections within a - * structure of data. For example, in order to `.push()` onto a nested `List`, - * `update` and `push` can be used together: - * - * - * ```js - * const aMap = Map({ nestedList: List([ 1, 2, 3 ]) }) - * const newMap = aMap.update('nestedList', list => list.push(4)) - * // Map { "nestedList": List [ 1, 2, 3, 4 ] } - * ``` - * - * When a `notSetValue` is provided, it is provided to the `updater` - * function when the value at the key does not exist in the Map. - * - * - * ```js - * const aMap = Map({ key: 'value' }) - * const newMap = aMap.update('noKey', 'no value', value => value + value) - * // Map { "key": "value", "noKey": "no valueno value" } - * ``` - * - * However, if the `updater` function returns the same value it was called - * with, then no change will occur. This is still true if `notSetValue` - * is provided. - * - * - * ```js - * const aMap = Map({ apples: 10 }) - * const newMap = aMap.update('oranges', 0, val => val) - * // Map { "apples": 10 } - * assert.strictEqual(newMap, map); - * ``` - * - * For code using ES2015 or later, using `notSetValue` is discourged in - * favor of function parameter default values. This helps to avoid any - * potential confusion with identify functions as described above. - * - * The previous example behaves differently when written with default values: - * - * - * ```js - * const aMap = Map({ apples: 10 }) - * const newMap = aMap.update('oranges', (val = 0) => val) - * // Map { "apples": 10, "oranges": 0 } - * ``` - * - * If no key is provided, then the `updater` function return value is - * returned as well. - * - * - * ```js - * const aMap = Map({ key: 'value' }) - * const result = aMap.update(aMap => aMap.get('key')) - * // "value" - * ``` - * - * This can be very useful as a way to "chain" a normal function into a - * sequence of methods. RxJS calls this "let" and lodash calls it "thru". - * - * For example, to sum the values in a Map - * - * - * ```js - * function sum(collection) { - * return collection.reduce((sum, x) => sum + x, 0) - * } - * - * Map({ x: 1, y: 2, z: 3 }) - * .map(x => x + 1) - * .filter(x => x % 2 === 0) - * .update(sum) - * // 6 - * ``` - * - * Note: `update(key)` can be used in `withMutations`. - */ - update(key: K, notSetValue: V, updater: (value: V) => V): this; - update(key: K, updater: (value: V | undefined) => V | undefined): this; - update(updater: (value: this) => R): R; - - /** - * Returns a new Map resulting from merging the provided Collections - * (or JS objects) into this Map. In other words, this takes each entry of - * each collection and sets it on this Map. - * - * Note: Values provided to `merge` are shallowly converted before being - * merged. No nested values are altered. - * - * - * ```js - * const { Map } = require('immutable') - * const one = Map({ a: 10, b: 20, c: 30 }) - * const two = Map({ b: 40, a: 50, d: 60 }) - * one.merge(two) // Map { "a": 50, "b": 40, "c": 30, "d": 60 } - * two.merge(one) // Map { "b": 20, "a": 10, "d": 60, "c": 30 } - * ``` - * - * Note: `merge` can be used in `withMutations`. - * - * @alias concat - */ - merge( - ...collections: Array> - ): Map | VC>; - merge( - ...collections: Array<{ [key: string]: C }> - ): Map | C>; - - concat( - ...collections: Array> - ): Map | VC>; - concat( - ...collections: Array<{ [key: string]: C }> - ): Map | C>; - - /** - * Like `merge()`, `mergeWith()` returns a new Map resulting from merging - * the provided Collections (or JS objects) into this Map, but uses the - * `merger` function for dealing with conflicts. - * - * - * ```js - * const { Map } = require('immutable') - * const one = Map({ a: 10, b: 20, c: 30 }) - * const two = Map({ b: 40, a: 50, d: 60 }) - * one.mergeWith((oldVal, newVal) => oldVal / newVal, two) - * // { "a": 0.2, "b": 0.5, "c": 30, "d": 60 } - * two.mergeWith((oldVal, newVal) => oldVal / newVal, one) - * // { "b": 2, "a": 5, "d": 60, "c": 30 } - * ``` - * - * Note: `mergeWith` can be used in `withMutations`. - */ - mergeWith( - merger: (oldVal: V, newVal: VC, key: K) => VCC, - ...collections: Array> - ): Map; - mergeWith( - merger: (oldVal: V, newVal: C, key: string) => CC, - ...collections: Array<{ [key: string]: C }> - ): Map; - - /** - * Like `merge()`, but when two compatible collections are encountered with - * the same key, it merges them as well, recursing deeply through the nested - * data. Two collections are considered to be compatible (and thus will be - * merged together) if they both fall into one of three categories: keyed - * (e.g., `Map`s, `Record`s, and objects), indexed (e.g., `List`s and - * arrays), or set-like (e.g., `Set`s). If they fall into separate - * categories, `mergeDeep` will replace the existing collection with the - * collection being merged in. This behavior can be customized by using - * `mergeDeepWith()`. - * - * Note: Indexed and set-like collections are merged using - * `concat()`/`union()` and therefore do not recurse. - * - * - * ```js - * const { Map } = require('immutable') - * const one = Map({ a: Map({ x: 10, y: 10 }), b: Map({ x: 20, y: 50 }) }) - * const two = Map({ a: Map({ x: 2 }), b: Map({ y: 5 }), c: Map({ z: 3 }) }) - * one.mergeDeep(two) - * // Map { - * // "a": Map { "x": 2, "y": 10 }, - * // "b": Map { "x": 20, "y": 5 }, - * // "c": Map { "z": 3 } - * // } - * ``` - * - * Note: `mergeDeep` can be used in `withMutations`. - */ - mergeDeep( - ...collections: Array> - ): Map; - mergeDeep( - ...collections: Array<{ [key: string]: C }> - ): Map; - - /** - * Like `mergeDeep()`, but when two non-collections or incompatible - * collections are encountered at the same key, it uses the `merger` - * function to determine the resulting value. Collections are considered - * incompatible if they fall into separate categories between keyed, - * indexed, and set-like. - * - * - * ```js - * const { Map } = require('immutable') - * const one = Map({ a: Map({ x: 10, y: 10 }), b: Map({ x: 20, y: 50 }) }) - * const two = Map({ a: Map({ x: 2 }), b: Map({ y: 5 }), c: Map({ z: 3 }) }) - * one.mergeDeepWith((oldVal, newVal) => oldVal / newVal, two) - * // Map { - * // "a": Map { "x": 5, "y": 10 }, - * // "b": Map { "x": 20, "y": 10 }, - * // "c": Map { "z": 3 } - * // } - * ``` - * - * Note: `mergeDeepWith` can be used in `withMutations`. - */ - mergeDeepWith( - merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown, - ...collections: Array | { [key: string]: V }> - ): this; - - // Deep persistent changes - - /** - * Returns a new Map having set `value` at this `keyPath`. If any keys in - * `keyPath` do not exist, a new immutable Map will be created at that key. - * - * - * ```js - * const { Map } = require('immutable') - * const originalMap = Map({ - * subObject: Map({ - * subKey: 'subvalue', - * subSubObject: Map({ - * subSubKey: 'subSubValue' - * }) - * }) - * }) - * - * const newMap = originalMap.setIn(['subObject', 'subKey'], 'ha ha!') - * // Map { - * // "subObject": Map { - * // "subKey": "ha ha!", - * // "subSubObject": Map { "subSubKey": "subSubValue" } - * // } - * // } - * - * const newerMap = originalMap.setIn( - * ['subObject', 'subSubObject', 'subSubKey'], - * 'ha ha ha!' - * ) - * // Map { - * // "subObject": Map { - * // "subKey": "subvalue", - * // "subSubObject": Map { "subSubKey": "ha ha ha!" } - * // } - * // } - * ``` - * - * Plain JavaScript Object or Arrays may be nested within an Immutable.js - * Collection, and setIn() can update those values as well, treating them - * immutably by creating new copies of those values with the changes applied. - * - * - * ```js - * const { Map } = require('immutable') - * const originalMap = Map({ - * subObject: { - * subKey: 'subvalue', - * subSubObject: { - * subSubKey: 'subSubValue' - * } - * } - * }) - * - * originalMap.setIn(['subObject', 'subKey'], 'ha ha!') - * // Map { - * // "subObject": { - * // subKey: "ha ha!", - * // subSubObject: { subSubKey: "subSubValue" } - * // } - * // } - * ``` - * - * If any key in the path exists but cannot be updated (such as a primitive - * like number or a custom Object like Date), an error will be thrown. - * - * Note: `setIn` can be used in `withMutations`. - */ - setIn(keyPath: Iterable, value: unknown): this; - - /** - * Returns a new Map having removed the value at this `keyPath`. If any keys - * in `keyPath` do not exist, no change will occur. - * - * Note: `deleteIn` can be used in `withMutations`. - * - * @alias removeIn - */ - deleteIn(keyPath: Iterable): this; - removeIn(keyPath: Iterable): this; - - /** - * Returns a new Map having applied the `updater` to the entry found at the - * keyPath. - * - * This is most commonly used to call methods on collections nested within a - * structure of data. For example, in order to `.push()` onto a nested `List`, - * `updateIn` and `push` can be used together: - * - * - * ```js - * const { Map, List } = require('immutable') - * const map = Map({ inMap: Map({ inList: List([ 1, 2, 3 ]) }) }) - * const newMap = map.updateIn(['inMap', 'inList'], list => list.push(4)) - * // Map { "inMap": Map { "inList": List [ 1, 2, 3, 4 ] } } - * ``` - * - * If any keys in `keyPath` do not exist, new Immutable `Map`s will - * be created at those keys. If the `keyPath` does not already contain a - * value, the `updater` function will be called with `notSetValue`, if - * provided, otherwise `undefined`. - * - * - * ```js - * const map = Map({ a: Map({ b: Map({ c: 10 }) }) }) - * const newMap = map.updateIn(['a', 'b', 'c'], val => val * 2) - * // Map { "a": Map { "b": Map { "c": 20 } } } - * ``` - * - * If the `updater` function returns the same value it was called with, then - * no change will occur. This is still true if `notSetValue` is provided. - * - * - * ```js - * const map = Map({ a: Map({ b: Map({ c: 10 }) }) }) - * const newMap = map.updateIn(['a', 'b', 'x'], 100, val => val) - * // Map { "a": Map { "b": Map { "c": 10 } } } - * assert.strictEqual(newMap, aMap) - * ``` - * - * For code using ES2015 or later, using `notSetValue` is discourged in - * favor of function parameter default values. This helps to avoid any - * potential confusion with identify functions as described above. - * - * The previous example behaves differently when written with default values: - * - * - * ```js - * const map = Map({ a: Map({ b: Map({ c: 10 }) }) }) - * const newMap = map.updateIn(['a', 'b', 'x'], (val = 100) => val) - * // Map { "a": Map { "b": Map { "c": 10, "x": 100 } } } - * ``` - * - * Plain JavaScript Object or Arrays may be nested within an Immutable.js - * Collection, and updateIn() can update those values as well, treating them - * immutably by creating new copies of those values with the changes applied. - * - * - * ```js - * const map = Map({ a: { b: { c: 10 } } }) - * const newMap = map.updateIn(['a', 'b', 'c'], val => val * 2) - * // Map { "a": { b: { c: 20 } } } - * ``` - * - * If any key in the path exists but cannot be updated (such as a primitive - * like number or a custom Object like Date), an error will be thrown. - * - * Note: `updateIn` can be used in `withMutations`. - */ - updateIn( - keyPath: Iterable, - notSetValue: unknown, - updater: (value: unknown) => unknown - ): this; - updateIn( - keyPath: Iterable, - updater: (value: unknown) => unknown - ): this; - - /** - * A combination of `updateIn` and `merge`, returning a new Map, but - * performing the merge at a point arrived at by following the keyPath. - * In other words, these two lines are equivalent: - * - * ```js - * map.updateIn(['a', 'b', 'c'], abc => abc.merge(y)) - * map.mergeIn(['a', 'b', 'c'], y) - * ``` - * - * Note: `mergeIn` can be used in `withMutations`. - */ - mergeIn(keyPath: Iterable, ...collections: Array): this; - - /** - * A combination of `updateIn` and `mergeDeep`, returning a new Map, but - * performing the deep merge at a point arrived at by following the keyPath. - * In other words, these two lines are equivalent: - * - * ```js - * map.updateIn(['a', 'b', 'c'], abc => abc.mergeDeep(y)) - * map.mergeDeepIn(['a', 'b', 'c'], y) - * ``` - * - * Note: `mergeDeepIn` can be used in `withMutations`. - */ - mergeDeepIn( - keyPath: Iterable, - ...collections: Array - ): this; - - // Transient changes - - /** - * Every time you call one of the above functions, a new immutable Map is - * created. If a pure function calls a number of these to produce a final - * return value, then a penalty on performance and memory has been paid by - * creating all of the intermediate immutable Maps. - * - * If you need to apply a series of mutations to produce a new immutable - * Map, `withMutations()` creates a temporary mutable copy of the Map which - * can apply mutations in a highly performant manner. In fact, this is - * exactly how complex mutations like `merge` are done. - * - * As an example, this results in the creation of 2, not 4, new Maps: - * - * - * ```js - * const { Map } = require('immutable') - * const map1 = Map() - * const map2 = map1.withMutations(map => { - * map.set('a', 1).set('b', 2).set('c', 3) - * }) - * assert.equal(map1.size, 0) - * assert.equal(map2.size, 3) - * ``` - * - * Note: Not all methods can be used on a mutable collection or within - * `withMutations`! Read the documentation for each method to see if it - * is safe to use in `withMutations`. - */ - withMutations(mutator: (mutable: this) => unknown): this; - - /** - * Another way to avoid creation of intermediate Immutable maps is to create - * a mutable copy of this collection. Mutable copies *always* return `this`, - * and thus shouldn't be used for equality. Your function should never return - * a mutable copy of a collection, only use it internally to create a new - * collection. - * - * If possible, use `withMutations` to work with temporary mutable copies as - * it provides an easier to use API and considers many common optimizations. - * - * Note: if the collection is already mutable, `asMutable` returns itself. - * - * Note: Not all methods can be used on a mutable collection or within - * `withMutations`! Read the documentation for each method to see if it - * is safe to use in `withMutations`. - * - * @see `Map#asImmutable` - */ - asMutable(): this; - - /** - * Returns true if this is a mutable copy (see `asMutable()`) and mutative - * alterations have been applied. - * - * @see `Map#asMutable` - */ - wasAltered(): boolean; - - /** - * The yin to `asMutable`'s yang. Because it applies to mutable collections, - * this operation is *mutable* and may return itself (though may not - * return itself, i.e. if the result is an empty collection). Once - * performed, the original mutable copy must no longer be mutated since it - * may be the immutable result. - * - * If possible, use `withMutations` to work with temporary mutable copies as - * it provides an easier to use API and considers many common optimizations. - * - * @see `Map#asMutable` - */ - asImmutable(): this; - - // Sequence algorithms - - /** - * Returns a new Map with values passed through a - * `mapper` function. - * - * Map({ a: 1, b: 2 }).map(x => 10 * x) - * // Map { a: 10, b: 20 } - */ - map( - mapper: (value: V, key: K, iter: this) => M, - context?: unknown - ): Map; - - /** - * @see Collection.Keyed.mapKeys - */ - mapKeys( - mapper: (key: K, value: V, iter: this) => M, - context?: unknown - ): Map; - - /** - * @see Collection.Keyed.mapEntries - */ - mapEntries( - mapper: ( - entry: [K, V], - index: number, - iter: this - ) => [KM, VM] | undefined, - context?: unknown - ): Map; - - /** - * Flat-maps the Map, returning a new Map. - * - * Similar to `data.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, - context?: unknown - ): Map; - - /** - * Returns a new Map with only the entries for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: V, key: K, iter: this) => value is F, - context?: unknown - ): Map; - filter( - predicate: (value: V, key: K, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new Map with the values for which the `predicate` - * function returns false and another for which is returns true. - */ - partition( - predicate: (this: C, value: V, key: K, iter: this) => value is F, - context?: C - ): [Map, Map]; - partition( - predicate: (this: C, value: V, key: K, iter: this) => unknown, - context?: C - ): [this, this]; - - /** - * @see Collection.Keyed.flip - */ - flip(): Map; - - /** - * Returns an OrderedMap of the same type which includes the same entries, - * stably sorted by using a `comparator`. - * - * If a `comparator` is not provided, a default comparator uses `<` and `>`. - * - * `comparator(valueA, valueB)`: - * - * * Returns `0` if the elements should not be swapped. - * * Returns `-1` (or any negative number) if `valueA` comes before `valueB` - * * Returns `1` (or any positive number) if `valueA` comes after `valueB` - * * Alternatively, can return a value of the `PairSorting` enum type - * * Is pure, i.e. it must always return the same value for the same pair - * of values. - * - * - * ```js - * const { Map } = require('immutable') - * Map({ "c": 3, "a": 1, "b": 2 }).sort((a, b) => { - * if (a < b) { return -1; } - * if (a > b) { return 1; } - * if (a === b) { return 0; } - * }); - * // OrderedMap { "a": 1, "b": 2, "c": 3 } - * ``` - * - * Note: `sort()` Always returns a new instance, even if the original was - * already sorted. - * - * Note: This is always an eager operation. - */ - sort(comparator?: Comparator): this & OrderedMap; - - /** - * Like `sort`, but also accepts a `comparatorValueMapper` which allows for - * sorting by more sophisticated means: - * - * - * ```js - * const { Map } = require('immutable') - * const beattles = Map({ - * John: { name: "Lennon" }, - * Paul: { name: "McCartney" }, - * George: { name: "Harrison" }, - * Ringo: { name: "Starr" }, - * }); - * beattles.sortBy(member => member.name); - * ``` - * - * Note: `sortBy()` Always returns a new instance, even if the original was - * already sorted. - * - * Note: This is always an eager operation. - */ - sortBy( - comparatorValueMapper: (value: V, key: K, iter: this) => C, - comparator?: (valueA: C, valueB: C) => number - ): this & OrderedMap; - } - - /** - * A type of Map that has the additional guarantee that the iteration order of - * entries will be the order in which they were set(). - * - * The iteration behavior of OrderedMap is the same as native ES6 Map and - * JavaScript Object. - * - * Note that `OrderedMap` are more expensive than non-ordered `Map` and may - * consume more memory. `OrderedMap#set` is amortized O(log32 N), but not - * stable. - */ - namespace OrderedMap { - /** - * True if the provided value is an OrderedMap. - */ - function isOrderedMap( - maybeOrderedMap: unknown - ): maybeOrderedMap is OrderedMap; - } - - /** - * Creates a new Immutable OrderedMap. - * - * Created with the same key value pairs as the provided Collection.Keyed or - * JavaScript Object or expects a Collection of [K, V] tuple entries. - * - * The iteration order of key-value pairs provided to this constructor will - * be preserved in the OrderedMap. - * - * let newOrderedMap = OrderedMap({key: "value"}) - * let newOrderedMap = OrderedMap([["key", "value"]]) - * - * Note: `OrderedMap` is a factory function and not a class, and does not use - * the `new` keyword during construction. - */ - function OrderedMap(collection?: Iterable<[K, V]>): OrderedMap; - function OrderedMap(obj: { [key: string]: V }): OrderedMap; - - interface OrderedMap extends Map { - /** - * The number of entries in this OrderedMap. - */ - readonly size: number; - - /** - * Returns a new OrderedMap also containing the new key, value pair. If an - * equivalent key already exists in this OrderedMap, it will be replaced - * while maintaining the existing order. - * - * - * ```js - * const { OrderedMap } = require('immutable') - * const originalMap = OrderedMap({a:1, b:1, c:1}) - * const updatedMap = originalMap.set('b', 2) - * - * originalMap - * // OrderedMap {a: 1, b: 1, c: 1} - * updatedMap - * // OrderedMap {a: 1, b: 2, c: 1} - * ``` - * - * Note: `set` can be used in `withMutations`. - */ - set(key: K, value: V): this; - - /** - * Returns a new OrderedMap resulting from merging the provided Collections - * (or JS objects) into this OrderedMap. In other words, this takes each - * entry of each collection and sets it on this OrderedMap. - * - * Note: Values provided to `merge` are shallowly converted before being - * merged. No nested values are altered. - * - * - * ```js - * const { OrderedMap } = require('immutable') - * const one = OrderedMap({ a: 10, b: 20, c: 30 }) - * const two = OrderedMap({ b: 40, a: 50, d: 60 }) - * one.merge(two) // OrderedMap { "a": 50, "b": 40, "c": 30, "d": 60 } - * two.merge(one) // OrderedMap { "b": 20, "a": 10, "d": 60, "c": 30 } - * ``` - * - * Note: `merge` can be used in `withMutations`. - * - * @alias concat - */ - merge( - ...collections: Array> - ): OrderedMap | VC>; - merge( - ...collections: Array<{ [key: string]: C }> - ): OrderedMap | C>; - - concat( - ...collections: Array> - ): OrderedMap | VC>; - concat( - ...collections: Array<{ [key: string]: C }> - ): OrderedMap | C>; - - mergeWith( - merger: (oldVal: V, newVal: VC, key: K) => VCC, - ...collections: Array> - ): OrderedMap; - mergeWith( - merger: (oldVal: V, newVal: C, key: string) => CC, - ...collections: Array<{ [key: string]: C }> - ): OrderedMap; - - mergeDeep( - ...collections: Array> - ): OrderedMap; - mergeDeep( - ...collections: Array<{ [key: string]: C }> - ): OrderedMap; - - // Sequence algorithms - - /** - * Returns a new OrderedMap with values passed through a - * `mapper` function. - * - * OrderedMap({ a: 1, b: 2 }).map(x => 10 * x) - * // OrderedMap { "a": 10, "b": 20 } - * - * Note: `map()` always returns a new instance, even if it produced the same - * value at every step. - */ - map( - mapper: (value: V, key: K, iter: this) => M, - context?: unknown - ): OrderedMap; - - /** - * @see Collection.Keyed.mapKeys - */ - mapKeys( - mapper: (key: K, value: V, iter: this) => M, - context?: unknown - ): OrderedMap; - - /** - * @see Collection.Keyed.mapEntries - */ - mapEntries( - mapper: ( - entry: [K, V], - index: number, - iter: this - ) => [KM, VM] | undefined, - context?: unknown - ): OrderedMap; - - /** - * Flat-maps the OrderedMap, returning a new OrderedMap. - * - * Similar to `data.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, - context?: unknown - ): OrderedMap; - - /** - * Returns a new OrderedMap with only the entries for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: V, key: K, iter: this) => value is F, - context?: unknown - ): OrderedMap; - filter( - predicate: (value: V, key: K, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new OrderedMap with the values for which the `predicate` - * function returns false and another for which is returns true. - */ - partition( - predicate: (this: C, value: V, key: K, iter: this) => value is F, - context?: C - ): [OrderedMap, OrderedMap]; - partition( - predicate: (this: C, value: V, key: K, iter: this) => unknown, - context?: C - ): [this, this]; - - /** - * @see Collection.Keyed.flip - */ - flip(): OrderedMap; - } - - /** - * A Collection of unique values with `O(log32 N)` adds and has. - * - * When iterating a Set, the entries will be (value, value) pairs. Iteration - * order of a Set is undefined, however is stable. Multiple iterations of the - * same Set will iterate in the same order. - * - * Set values, like Map keys, may be of any type. Equality is determined using - * `Immutable.is`, enabling Sets to uniquely include other Immutable - * collections, custom value types, and NaN. - */ - namespace Set { - /** - * True if the provided value is a Set - */ - function isSet(maybeSet: unknown): maybeSet is Set; - - /** - * Creates a new Set containing `values`. - */ - function of(...values: Array): Set; - - /** - * `Set.fromKeys()` creates a new immutable Set containing the keys from - * this Collection or JavaScript Object. - */ - function fromKeys(iter: Collection.Keyed): Set; - function fromKeys(iter: Collection): Set; - function fromKeys(obj: { [key: string]: unknown }): Set; - - /** - * `Set.intersect()` creates a new immutable Set that is the intersection of - * a collection of other sets. - * - * ```js - * const { Set } = require('immutable') - * const intersected = Set.intersect([ - * Set([ 'a', 'b', 'c' ]) - * Set([ 'c', 'a', 't' ]) - * ]) - * // Set [ "a", "c" ] - * ``` - */ - function intersect(sets: Iterable>): Set; - - /** - * `Set.union()` creates a new immutable Set that is the union of a - * collection of other sets. - * - * ```js - * const { Set } = require('immutable') - * const unioned = Set.union([ - * Set([ 'a', 'b', 'c' ]) - * Set([ 'c', 'a', 't' ]) - * ]) - * // Set [ "a", "b", "c", "t" ] - * ``` - */ - function union(sets: Iterable>): Set; - } - - /** - * Create a new immutable Set containing the values of the provided - * collection-like. - * - * Note: `Set` is a factory function and not a class, and does not use the - * `new` keyword during construction. - */ - function Set(collection?: Iterable | ArrayLike): Set; - - interface Set extends Collection.Set { - /** - * The number of items in this Set. - */ - readonly size: number; - - // Persistent changes - - /** - * Returns a new Set which also includes this value. - * - * Note: `add` can be used in `withMutations`. - */ - add(value: T): this; - - /** - * Returns a new Set which excludes this value. - * - * Note: `delete` can be used in `withMutations`. - * - * Note: `delete` **cannot** be safely used in IE8, use `remove` if - * supporting old browsers. - * - * @alias remove - */ - delete(value: T): this; - remove(value: T): this; - - /** - * Returns a new Set containing no values. - * - * Note: `clear` can be used in `withMutations`. - */ - clear(): this; - - /** - * Returns a Set including any value from `collections` that does not already - * exist in this Set. - * - * Note: `union` can be used in `withMutations`. - * @alias merge - * @alias concat - */ - union(...collections: Array>): Set; - merge(...collections: Array>): Set; - concat(...collections: Array>): Set; - - /** - * Returns a Set which has removed any values not also contained - * within `collections`. - * - * Note: `intersect` can be used in `withMutations`. - */ - intersect(...collections: Array>): this; - - /** - * Returns a Set excluding any values contained within `collections`. - * - * - * ```js - * const { OrderedSet } = require('immutable') - * OrderedSet([ 1, 2, 3 ]).subtract([1, 3]) - * // OrderedSet [2] - * ``` - * - * Note: `subtract` can be used in `withMutations`. - */ - subtract(...collections: Array>): this; - - // Transient changes - - /** - * Note: Not all methods can be used on a mutable collection or within - * `withMutations`! Check the documentation for each method to see if it - * mentions being safe to use in `withMutations`. - * - * @see `Map#withMutations` - */ - withMutations(mutator: (mutable: this) => unknown): this; - - /** - * Note: Not all methods can be used on a mutable collection or within - * `withMutations`! Check the documentation for each method to see if it - * mentions being safe to use in `withMutations`. - * - * @see `Map#asMutable` - */ - asMutable(): this; - - /** - * @see `Map#wasAltered` - */ - wasAltered(): boolean; - - /** - * @see `Map#asImmutable` - */ - asImmutable(): this; - - // Sequence algorithms - - /** - * Returns a new Set with values passed through a - * `mapper` function. - * - * Set([1,2]).map(x => 10 * x) - * // Set [10,20] - */ - map( - mapper: (value: T, key: T, iter: this) => M, - context?: unknown - ): Set; - - /** - * Flat-maps the Set, returning a new Set. - * - * Similar to `set.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: T, key: T, iter: this) => Iterable, - context?: unknown - ): Set; - - /** - * Returns a new Set with only the values for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: T, key: T, iter: this) => value is F, - context?: unknown - ): Set; - filter( - predicate: (value: T, key: T, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new Set with the values for which the `predicate` function - * returns false and another for which is returns true. - */ - partition( - predicate: (this: C, value: T, key: T, iter: this) => value is F, - context?: C - ): [Set, Set]; - partition( - predicate: (this: C, value: T, key: T, iter: this) => unknown, - context?: C - ): [this, this]; - - /** - * Returns an OrderedSet of the same type which includes the same entries, - * stably sorted by using a `comparator`. - * - * If a `comparator` is not provided, a default comparator uses `<` and `>`. - * - * `comparator(valueA, valueB)`: - * - * * Returns `0` if the elements should not be swapped. - * * Returns `-1` (or any negative number) if `valueA` comes before `valueB` - * * Returns `1` (or any positive number) if `valueA` comes after `valueB` - * * Alternatively, can return a value of the `PairSorting` enum type - * * Is pure, i.e. it must always return the same value for the same pair - * of values. - * - * - * ```js - * const { Set } = require('immutable') - * Set(['b', 'a', 'c']).sort((a, b) => { - * if (a < b) { return -1; } - * if (a > b) { return 1; } - * if (a === b) { return 0; } - * }); - * // OrderedSet { "a":, "b", "c" } - * ``` - * - * Note: `sort()` Always returns a new instance, even if the original was - * already sorted. - * - * Note: This is always an eager operation. - */ - sort(comparator?: Comparator): this & OrderedSet; - - /** - * Like `sort`, but also accepts a `comparatorValueMapper` which allows for - * sorting by more sophisticated means: - * - * - * ```js - * const { Set } = require('immutable') - * const beattles = Set([ - * { name: "Lennon" }, - * { name: "McCartney" }, - * { name: "Harrison" }, - * { name: "Starr" }, - * ]); - * beattles.sortBy(member => member.name); - * ``` - * - * Note: `sortBy()` Always returns a new instance, even if the original was - * already sorted. - * - * Note: This is always an eager operation. - */ - sortBy( - comparatorValueMapper: (value: T, key: T, iter: this) => C, - comparator?: (valueA: C, valueB: C) => number - ): this & OrderedSet; - } - - /** - * A type of Set that has the additional guarantee that the iteration order of - * values will be the order in which they were `add`ed. - * - * The iteration behavior of OrderedSet is the same as native ES6 Set. - * - * Note that `OrderedSet` are more expensive than non-ordered `Set` and may - * consume more memory. `OrderedSet#add` is amortized O(log32 N), but not - * stable. - */ - namespace OrderedSet { - /** - * True if the provided value is an OrderedSet. - */ - function isOrderedSet( - maybeOrderedSet: unknown - ): maybeOrderedSet is OrderedSet; - - /** - * Creates a new OrderedSet containing `values`. - */ - function of(...values: Array): OrderedSet; - - /** - * `OrderedSet.fromKeys()` creates a new immutable OrderedSet containing - * the keys from this Collection or JavaScript Object. - */ - function fromKeys(iter: Collection.Keyed): OrderedSet; - function fromKeys(iter: Collection): OrderedSet; - function fromKeys(obj: { [key: string]: unknown }): OrderedSet; - } - - /** - * Create a new immutable OrderedSet containing the values of the provided - * collection-like. - * - * Note: `OrderedSet` is a factory function and not a class, and does not use - * the `new` keyword during construction. - */ - function OrderedSet( - collection?: Iterable | ArrayLike - ): OrderedSet; - - interface OrderedSet extends Set { - /** - * The number of items in this OrderedSet. - */ - readonly size: number; - - /** - * Returns an OrderedSet including any value from `collections` that does - * not already exist in this OrderedSet. - * - * Note: `union` can be used in `withMutations`. - * @alias merge - * @alias concat - */ - union(...collections: Array>): OrderedSet; - merge(...collections: Array>): OrderedSet; - concat(...collections: Array>): OrderedSet; - - // Sequence algorithms - - /** - * Returns a new Set with values passed through a - * `mapper` function. - * - * OrderedSet([ 1, 2 ]).map(x => 10 * x) - * // OrderedSet [10, 20] - */ - map( - mapper: (value: T, key: T, iter: this) => M, - context?: unknown - ): OrderedSet; - - /** - * Flat-maps the OrderedSet, returning a new OrderedSet. - * - * Similar to `set.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: T, key: T, iter: this) => Iterable, - context?: unknown - ): OrderedSet; - - /** - * Returns a new OrderedSet with only the values for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: T, key: T, iter: this) => value is F, - context?: unknown - ): OrderedSet; - filter( - predicate: (value: T, key: T, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new OrderedSet with the values for which the `predicate` - * function returns false and another for which is returns true. - */ - partition( - predicate: (this: C, value: T, key: T, iter: this) => value is F, - context?: C - ): [OrderedSet, OrderedSet]; - partition( - predicate: (this: C, value: T, key: T, iter: this) => unknown, - context?: C - ): [this, this]; - - /** - * Returns an OrderedSet of the same type "zipped" with the provided - * collections. - * - * Like `zipWith`, but using the default `zipper`: creating an `Array`. - * - * ```js - * const a = OrderedSet([ 1, 2, 3 ]) - * const b = OrderedSet([ 4, 5, 6 ]) - * const c = a.zip(b) - * // OrderedSet [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] - * ``` - */ - zip(other: Collection): OrderedSet<[T, U]>; - zip( - other1: Collection, - other2: Collection - ): OrderedSet<[T, U, V]>; - zip( - ...collections: Array> - ): OrderedSet; - - /** - * Returns a OrderedSet of the same type "zipped" with the provided - * collections. - * - * Unlike `zip`, `zipAll` continues zipping until the longest collection is - * exhausted. Missing values from shorter collections are filled with `undefined`. - * - * ```js - * const a = OrderedSet([ 1, 2 ]); - * const b = OrderedSet([ 3, 4, 5 ]); - * const c = a.zipAll(b); // OrderedSet [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] - * ``` - * - * Note: Since zipAll will return a collection as large as the largest - * input, some results may contain undefined values. TypeScript cannot - * account for these without cases (as of v2.5). - */ - zipAll(other: Collection): OrderedSet<[T, U]>; - zipAll( - other1: Collection, - other2: Collection - ): OrderedSet<[T, U, V]>; - zipAll( - ...collections: Array> - ): OrderedSet; - - /** - * Returns an OrderedSet of the same type "zipped" with the provided - * collections by using a custom `zipper` function. - * - * @see Seq.Indexed.zipWith - */ - zipWith( - zipper: (value: T, otherValue: U) => Z, - otherCollection: Collection - ): OrderedSet; - zipWith( - zipper: (value: T, otherValue: U, thirdValue: V) => Z, - otherCollection: Collection, - thirdCollection: Collection - ): OrderedSet; - zipWith( - zipper: (...values: Array) => Z, - ...collections: Array> - ): OrderedSet; - } - - /** - * Stacks are indexed collections which support very efficient O(1) addition - * and removal from the front using `unshift(v)` and `shift()`. - * - * For familiarity, Stack also provides `push(v)`, `pop()`, and `peek()`, but - * be aware that they also operate on the front of the list, unlike List or - * a JavaScript Array. - * - * Note: `reverse()` or any inherent reverse traversal (`reduceRight`, - * `lastIndexOf`, etc.) is not efficient with a Stack. - * - * Stack is implemented with a Single-Linked List. - */ - namespace Stack { - /** - * True if the provided value is a Stack - */ - function isStack(maybeStack: unknown): maybeStack is Stack; - - /** - * Creates a new Stack containing `values`. - */ - function of(...values: Array): Stack; - } - - /** - * Create a new immutable Stack containing the values of the provided - * collection-like. - * - * The iteration order of the provided collection is preserved in the - * resulting `Stack`. - * - * Note: `Stack` is a factory function and not a class, and does not use the - * `new` keyword during construction. - */ - function Stack(collection?: Iterable | ArrayLike): Stack; - - interface Stack extends Collection.Indexed { - /** - * The number of items in this Stack. - */ - readonly size: number; - - // Reading values - - /** - * Alias for `Stack.first()`. - */ - peek(): T | undefined; - - // Persistent changes - - /** - * Returns a new Stack with 0 size and no values. - * - * Note: `clear` can be used in `withMutations`. - */ - clear(): Stack; - - /** - * Returns a new Stack with the provided `values` prepended, shifting other - * values ahead to higher indices. - * - * This is very efficient for Stack. - * - * Note: `unshift` can be used in `withMutations`. - */ - unshift(...values: Array): Stack; - - /** - * Like `Stack#unshift`, but accepts a collection rather than varargs. - * - * Note: `unshiftAll` can be used in `withMutations`. - */ - unshiftAll(iter: Iterable): Stack; - - /** - * Returns a new Stack with a size ones less than this Stack, excluding - * the first item in this Stack, shifting all other values to a lower index. - * - * Note: this differs from `Array#shift` because it returns a new - * Stack rather than the removed value. Use `first()` or `peek()` to get the - * first value in this Stack. - * - * Note: `shift` can be used in `withMutations`. - */ - shift(): Stack; - - /** - * Alias for `Stack#unshift` and is not equivalent to `List#push`. - */ - push(...values: Array): Stack; - - /** - * Alias for `Stack#unshiftAll`. - */ - pushAll(iter: Iterable): Stack; - - /** - * Alias for `Stack#shift` and is not equivalent to `List#pop`. - */ - pop(): Stack; - - // Transient changes - - /** - * Note: Not all methods can be used on a mutable collection or within - * `withMutations`! Check the documentation for each method to see if it - * mentions being safe to use in `withMutations`. - * - * @see `Map#withMutations` - */ - withMutations(mutator: (mutable: this) => unknown): this; - - /** - * Note: Not all methods can be used on a mutable collection or within - * `withMutations`! Check the documentation for each method to see if it - * mentions being safe to use in `withMutations`. - * - * @see `Map#asMutable` - */ - asMutable(): this; - - /** - * @see `Map#wasAltered` - */ - wasAltered(): boolean; - - /** - * @see `Map#asImmutable` - */ - asImmutable(): this; - - // Sequence algorithms - - /** - * Returns a new Stack with other collections concatenated to this one. - */ - concat(...valuesOrCollections: Array | C>): Stack; - - /** - * Returns a new Stack with values passed through a - * `mapper` function. - * - * Stack([ 1, 2 ]).map(x => 10 * x) - * // Stack [ 10, 20 ] - * - * Note: `map()` always returns a new instance, even if it produced the same - * value at every step. - */ - map( - mapper: (value: T, key: number, iter: this) => M, - context?: unknown - ): Stack; - - /** - * Flat-maps the Stack, returning a new Stack. - * - * Similar to `stack.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: T, key: number, iter: this) => Iterable, - context?: unknown - ): Stack; - - /** - * Returns a new Set with only the values for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: T, index: number, iter: this) => value is F, - context?: unknown - ): Set; - filter( - predicate: (value: T, index: number, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a Stack "zipped" with the provided collections. - * - * Like `zipWith`, but using the default `zipper`: creating an `Array`. - * - * ```js - * const a = Stack([ 1, 2, 3 ]); - * const b = Stack([ 4, 5, 6 ]); - * const c = a.zip(b); // Stack [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] - * ``` - */ - zip(other: Collection): Stack<[T, U]>; - zip( - other: Collection, - other2: Collection - ): Stack<[T, U, V]>; - zip(...collections: Array>): Stack; - - /** - * Returns a Stack "zipped" with the provided collections. - * - * Unlike `zip`, `zipAll` continues zipping until the longest collection is - * exhausted. Missing values from shorter collections are filled with `undefined`. - * - * ```js - * const a = Stack([ 1, 2 ]); - * const b = Stack([ 3, 4, 5 ]); - * const c = a.zipAll(b); // Stack [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] - * ``` - * - * Note: Since zipAll will return a collection as large as the largest - * input, some results may contain undefined values. TypeScript cannot - * account for these without cases (as of v2.5). - */ - zipAll(other: Collection): Stack<[T, U]>; - zipAll( - other: Collection, - other2: Collection - ): Stack<[T, U, V]>; - zipAll(...collections: Array>): Stack; - - /** - * Returns a Stack "zipped" with the provided collections by using a - * custom `zipper` function. - * - * ```js - * const a = Stack([ 1, 2, 3 ]); - * const b = Stack([ 4, 5, 6 ]); - * const c = a.zipWith((a, b) => a + b, b); - * // Stack [ 5, 7, 9 ] - * ``` - */ - zipWith( - zipper: (value: T, otherValue: U) => Z, - otherCollection: Collection - ): Stack; - zipWith( - zipper: (value: T, otherValue: U, thirdValue: V) => Z, - otherCollection: Collection, - thirdCollection: Collection - ): Stack; - zipWith( - zipper: (...values: Array) => Z, - ...collections: Array> - ): Stack; - } - - /** - * Returns a Seq.Indexed of numbers from `start` (inclusive) to `end` - * (exclusive), by `step`, where `start` defaults to 0, `step` to 1, and `end` to - * infinity. When `start` is equal to `end`, returns empty range. - * - * Note: `Range` is a factory function and not a class, and does not use the - * `new` keyword during construction. - * - * ```js - * const { Range } = require('immutable') - * Range() // [ 0, 1, 2, 3, ... ] - * Range(10) // [ 10, 11, 12, 13, ... ] - * Range(10, 15) // [ 10, 11, 12, 13, 14 ] - * Range(10, 30, 5) // [ 10, 15, 20, 25 ] - * Range(30, 10, 5) // [ 30, 25, 20, 15 ] - * Range(30, 30, 5) // [] - * ``` - */ - function Range( - start: number, - end: number, - step?: number - ): Seq.Indexed; - - /** - * Returns a Seq.Indexed of `value` repeated `times` times. When `times` is - * not defined, returns an infinite `Seq` of `value`. - * - * Note: `Repeat` is a factory function and not a class, and does not use the - * `new` keyword during construction. - * - * ```js - * const { Repeat } = require('immutable') - * Repeat('foo') // [ 'foo', 'foo', 'foo', ... ] - * Repeat('bar', 4) // [ 'bar', 'bar', 'bar', 'bar' ] - * ``` - */ - function Repeat(value: T, times?: number): Seq.Indexed; - - /** - * A record is similar to a JS object, but enforces a specific set of allowed - * string keys, and has default values. - * - * The `Record()` function produces new Record Factories, which when called - * create Record instances. - * - * ```js - * const { Record } = require('immutable') - * const ABRecord = Record({ a: 1, b: 2 }) - * const myRecord = ABRecord({ b: 3 }) - * ``` - * - * Records always have a value for the keys they define. `remove`ing a key - * from a record simply resets it to the default value for that key. - * - * ```js - * myRecord.get('a') // 1 - * myRecord.get('b') // 3 - * const myRecordWithoutB = myRecord.remove('b') - * myRecordWithoutB.get('b') // 2 - * ``` - * - * Values provided to the constructor not found in the Record type will - * be ignored. For example, in this case, ABRecord is provided a key "x" even - * though only "a" and "b" have been defined. The value for "x" will be - * ignored for this record. - * - * ```js - * const myRecord = ABRecord({ b: 3, x: 10 }) - * myRecord.get('x') // undefined - * ``` - * - * Because Records have a known set of string keys, property get access works - * as expected, however property sets will throw an Error. - * - * Note: IE8 does not support property access. Only use `get()` when - * supporting IE8. - * - * ```js - * myRecord.b // 3 - * myRecord.b = 5 // throws Error - * ``` - * - * Record Types can be extended as well, allowing for custom methods on your - * Record. This is not a common pattern in functional environments, but is in - * many JS programs. - * - * However Record Types are more restricted than typical JavaScript classes. - * They do not use a class constructor, which also means they cannot use - * class properties (since those are technically part of a constructor). - * - * While Record Types can be syntactically created with the JavaScript `class` - * form, the resulting Record function is actually a factory function, not a - * class constructor. Even though Record Types are not classes, JavaScript - * currently requires the use of `new` when creating new Record instances if - * they are defined as a `class`. - * - * ``` - * class ABRecord extends Record({ a: 1, b: 2 }) { - * getAB() { - * return this.a + this.b; - * } - * } - * - * var myRecord = new ABRecord({b: 3}) - * myRecord.getAB() // 4 - * ``` - * - * - * **Flow Typing Records:** - * - * Immutable.js exports two Flow types designed to make it easier to use - * Records with flow typed code, `RecordOf` and `RecordFactory`. - * - * When defining a new kind of Record factory function, use a flow type that - * describes the values the record contains along with `RecordFactory`. - * To type instances of the Record (which the factory function returns), - * use `RecordOf`. - * - * Typically, new Record definitions will export both the Record factory - * function as well as the Record instance type for use in other code. - * - * ```js - * import type { RecordFactory, RecordOf } from 'immutable'; - * - * // Use RecordFactory for defining new Record factory functions. - * type Point3DProps = { x: number, y: number, z: number }; - * const defaultValues: Point3DProps = { x: 0, y: 0, z: 0 }; - * const makePoint3D: RecordFactory = Record(defaultValues); - * export makePoint3D; - * - * // Use RecordOf for defining new instances of that Record. - * export type Point3D = RecordOf; - * const some3DPoint: Point3D = makePoint3D({ x: 10, y: 20, z: 30 }); - * ``` - * - * **Flow Typing Record Subclasses:** - * - * Records can be subclassed as a means to add additional methods to Record - * instances. This is generally discouraged in favor of a more functional API, - * since Subclasses have some minor overhead. However the ability to create - * a rich API on Record types can be quite valuable. - * - * When using Flow to type Subclasses, do not use `RecordFactory`, - * instead apply the props type when subclassing: - * - * ```js - * type PersonProps = {name: string, age: number}; - * const defaultValues: PersonProps = {name: 'Aristotle', age: 2400}; - * const PersonRecord = Record(defaultValues); - * class Person extends PersonRecord { - * getName(): string { - * return this.get('name') - * } - * - * setName(name: string): this { - * return this.set('name', name); - * } - * } - * ``` - * - * **Choosing Records vs plain JavaScript objects** - * - * Records offer a persistently immutable alternative to plain JavaScript - * objects, however they're not required to be used within Immutable.js - * collections. In fact, the deep-access and deep-updating functions - * like `getIn()` and `setIn()` work with plain JavaScript Objects as well. - * - * Deciding to use Records or Objects in your application should be informed - * by the tradeoffs and relative benefits of each: - * - * - *Runtime immutability*: plain JS objects may be carefully treated as - * immutable, however Record instances will *throw* if attempted to be - * mutated directly. Records provide this additional guarantee, however at - * some marginal runtime cost. While JS objects are mutable by nature, the - * use of type-checking tools like [Flow](https://medium.com/@gcanti/immutability-with-flow-faa050a1aef4) - * can help gain confidence in code written to favor immutability. - * - * - *Value equality*: Records use value equality when compared with `is()` - * or `record.equals()`. That is, two Records with the same keys and values - * are equal. Plain objects use *reference equality*. Two objects with the - * same keys and values are not equal since they are different objects. - * This is important to consider when using objects as keys in a `Map` or - * values in a `Set`, which use equality when retrieving values. - * - * - *API methods*: Records have a full featured API, with methods like - * `.getIn()`, and `.equals()`. These can make working with these values - * easier, but comes at the cost of not allowing keys with those names. - * - * - *Default values*: Records provide default values for every key, which - * can be useful when constructing Records with often unchanging values. - * However default values can make using Flow and TypeScript more laborious. - * - * - *Serialization*: Records use a custom internal representation to - * efficiently store and update their values. Converting to and from this - * form isn't free. If converting Records to plain objects is common, - * consider sticking with plain objects to begin with. - */ - namespace Record { - /** - * True if `maybeRecord` is an instance of a Record. - */ - function isRecord(maybeRecord: unknown): maybeRecord is Record<{}>; - - /** - * Records allow passing a second parameter to supply a descriptive name - * that appears when converting a Record to a string or in any error - * messages. A descriptive name for any record can be accessed by using this - * method. If one was not provided, the string "Record" is returned. - * - * ```js - * const { Record } = require('immutable') - * const Person = Record({ - * name: null - * }, 'Person') - * - * var me = Person({ name: 'My Name' }) - * me.toString() // "Person { "name": "My Name" }" - * Record.getDescriptiveName(me) // "Person" - * ``` - */ - function getDescriptiveName(record: Record): string; - - /** - * A Record.Factory is created by the `Record()` function. Record instances - * are created by passing it some of the accepted values for that Record - * type: - * - * - * ```js - * // makePerson is a Record Factory function - * const makePerson = Record({ name: null, favoriteColor: 'unknown' }); - * - * // alan is a Record instance - * const alan = makePerson({ name: 'Alan' }); - * ``` - * - * Note that Record Factories return `Record & Readonly`, - * this allows use of both the Record instance API, and direct property - * access on the resulting instances: - * - * - * ```js - * // Use the Record API - * console.log('Record API: ' + alan.get('name')) - * - * // Or direct property access (Readonly) - * console.log('property access: ' + alan.name) - * ``` - * - * **Flow Typing Records:** - * - * Use the `RecordFactory` Flow type to get high quality type checking of - * Records: - * - * ```js - * import type { RecordFactory, RecordOf } from 'immutable'; - * - * // Use RecordFactory for defining new Record factory functions. - * type PersonProps = { name: ?string, favoriteColor: string }; - * const makePerson: RecordFactory = Record({ name: null, favoriteColor: 'unknown' }); - * - * // Use RecordOf for defining new instances of that Record. - * type Person = RecordOf; - * const alan: Person = makePerson({ name: 'Alan' }); - * ``` - */ - namespace Factory {} - - interface Factory { - (values?: Partial | Iterable<[string, unknown]>): Record & - Readonly; - new ( - values?: Partial | Iterable<[string, unknown]> - ): Record & Readonly; - - /** - * The name provided to `Record(values, name)` can be accessed with - * `displayName`. - */ - displayName: string; - } - - function Factory( - values?: Partial | Iterable<[string, unknown]> - ): Record & Readonly; - } - - /** - * Unlike other types in Immutable.js, the `Record()` function creates a new - * Record Factory, which is a function that creates Record instances. - * - * See above for examples of using `Record()`. - * - * Note: `Record` is a factory function and not a class, and does not use the - * `new` keyword during construction. - */ - function Record( - defaultValues: TProps, - name?: string - ): Record.Factory; - - interface Record { - // Reading values - - has(key: string): key is keyof TProps & string; - - /** - * Returns the value associated with the provided key, which may be the - * default value defined when creating the Record factory function. - * - * If the requested key is not defined by this Record type, then - * notSetValue will be returned if provided. Note that this scenario would - * produce an error when using Flow or TypeScript. - */ - get(key: K, notSetValue?: unknown): TProps[K]; - get(key: string, notSetValue: T): T; - - // Reading deep values - - hasIn(keyPath: Iterable): boolean; - getIn(keyPath: Iterable): unknown; - - // Value equality - - equals(other: unknown): boolean; - hashCode(): number; - - // Persistent changes - - set(key: K, value: TProps[K]): this; - update( - key: K, - updater: (value: TProps[K]) => TProps[K] - ): this; - merge( - ...collections: Array | Iterable<[string, unknown]>> - ): this; - mergeDeep( - ...collections: Array | Iterable<[string, unknown]>> - ): this; - - mergeWith( - merger: (oldVal: unknown, newVal: unknown, key: keyof TProps) => unknown, - ...collections: Array | Iterable<[string, unknown]>> - ): this; - mergeDeepWith( - merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown, - ...collections: Array | Iterable<[string, unknown]>> - ): this; - - /** - * Returns a new instance of this Record type with the value for the - * specific key set to its default value. - * - * @alias remove - */ - delete(key: K): this; - remove(key: K): this; - - /** - * Returns a new instance of this Record type with all values set - * to their default values. - */ - clear(): this; - - // Deep persistent changes - - setIn(keyPath: Iterable, value: unknown): this; - updateIn( - keyPath: Iterable, - updater: (value: unknown) => unknown - ): this; - mergeIn(keyPath: Iterable, ...collections: Array): this; - mergeDeepIn( - keyPath: Iterable, - ...collections: Array - ): this; - - /** - * @alias removeIn - */ - deleteIn(keyPath: Iterable): this; - removeIn(keyPath: Iterable): this; - - // Conversion to JavaScript types - - /** - * Deeply converts this Record to equivalent native JavaScript Object. - * - * Note: This method may not be overridden. Objects with custom - * serialization to plain JS may override toJSON() instead. - */ - toJS(): DeepCopy; - - /** - * Shallowly converts this Record to equivalent native JavaScript Object. - */ - toJSON(): TProps; - - /** - * Shallowly converts this Record to equivalent JavaScript Object. - */ - toObject(): TProps; - - // Transient changes - - /** - * Note: Not all methods can be used on a mutable collection or within - * `withMutations`! Only `set` may be used mutatively. - * - * @see `Map#withMutations` - */ - withMutations(mutator: (mutable: this) => unknown): this; - - /** - * @see `Map#asMutable` - */ - asMutable(): this; - - /** - * @see `Map#wasAltered` - */ - wasAltered(): boolean; - - /** - * @see `Map#asImmutable` - */ - asImmutable(): this; - - // Sequence algorithms - - toSeq(): Seq.Keyed; - - [Symbol.iterator](): IterableIterator<[keyof TProps, TProps[keyof TProps]]>; - } - - /** - * RecordOf is used in TypeScript to define interfaces expecting an - * instance of record with type T. - * - * This is equivalent to an instance of a record created by a Record Factory. - */ - type RecordOf = Record & Readonly; - - /** - * `Seq` describes a lazy operation, allowing them to efficiently chain - * use of all the higher-order collection methods (such as `map` and `filter`) - * by not creating intermediate collections. - * - * **Seq is immutable** — Once a Seq is created, it cannot be - * changed, appended to, rearranged or otherwise modified. Instead, any - * mutative method called on a `Seq` will return a new `Seq`. - * - * **Seq is lazy** — `Seq` does as little work as necessary to respond to any - * method call. Values are often created during iteration, including implicit - * iteration when reducing or converting to a concrete data structure such as - * a `List` or JavaScript `Array`. - * - * For example, the following performs no work, because the resulting - * `Seq`'s values are never iterated: - * - * ```js - * const { Seq } = require('immutable') - * const oddSquares = Seq([ 1, 2, 3, 4, 5, 6, 7, 8 ]) - * .filter(x => x % 2 !== 0) - * .map(x => x * x) - * ``` - * - * Once the `Seq` is used, it performs only the work necessary. In this - * example, no intermediate arrays are ever created, filter is called three - * times, and map is only called once: - * - * ```js - * oddSquares.get(1); // 9 - * ``` - * - * Any collection can be converted to a lazy Seq with `Seq()`. - * - * - * ```js - * const { Map } = require('immutable') - * const map = Map({ a: 1, b: 2, c: 3 }) - * const lazySeq = Seq(map) - * ``` - * - * `Seq` allows for the efficient chaining of operations, allowing for the - * expression of logic that can otherwise be very tedious: - * - * ```js - * lazySeq - * .flip() - * .map(key => key.toUpperCase()) - * .flip() - * // Seq { A: 1, B: 1, C: 1 } - * ``` - * - * As well as expressing logic that would otherwise seem memory or time - * limited, for example `Range` is a special kind of Lazy sequence. - * - * - * ```js - * const { Range } = require('immutable') - * Range(1, Infinity) - * .skip(1000) - * .map(n => -n) - * .filter(n => n % 2 === 0) - * .take(2) - * .reduce((r, n) => r * n, 1) - * // 1006008 - * ``` - * - * Seq is often used to provide a rich collection API to JavaScript Object. - * - * ```js - * Seq({ x: 0, y: 1, z: 2 }).map(v => v * 2).toObject(); - * // { x: 0, y: 2, z: 4 } - * ``` - */ - - namespace Seq { - /** - * True if `maybeSeq` is a Seq, it is not backed by a concrete - * structure such as Map, List, or Set. - */ - function isSeq( - maybeSeq: unknown - ): maybeSeq is - | Seq.Indexed - | Seq.Keyed - | Seq.Set; - - /** - * `Seq` which represents key-value pairs. - */ - namespace Keyed {} - - /** - * Always returns a Seq.Keyed, if input is not keyed, expects an - * collection of [K, V] tuples. - * - * Note: `Seq.Keyed` is a conversion function and not a class, and does not - * use the `new` keyword during construction. - */ - function Keyed(collection?: Iterable<[K, V]>): Seq.Keyed; - function Keyed(obj: { [key: string]: V }): Seq.Keyed; - - interface Keyed extends Seq, Collection.Keyed { - /** - * Deeply converts this Keyed Seq to equivalent native JavaScript Object. - * - * Converts keys to Strings. - */ - toJS(): { [key in string | number | symbol]: DeepCopy }; - - /** - * Shallowly converts this Keyed Seq to equivalent native JavaScript Object. - * - * Converts keys to Strings. - */ - toJSON(): { [key in string | number | symbol]: V }; - - /** - * Shallowly converts this collection to an Array. - */ - toArray(): Array<[K, V]>; - - /** - * Returns itself - */ - toSeq(): this; - - /** - * Returns a new Seq with other collections concatenated to this one. - * - * All entries will be present in the resulting Seq, even if they - * have the same key. - */ - concat( - ...collections: Array> - ): Seq.Keyed; - concat( - ...collections: Array<{ [key: string]: C }> - ): Seq.Keyed; - - /** - * Returns a new Seq.Keyed with values passed through a - * `mapper` function. - * - * ```js - * const { Seq } = require('immutable') - * Seq.Keyed({ a: 1, b: 2 }).map(x => 10 * x) - * // Seq { "a": 10, "b": 20 } - * ``` - * - * Note: `map()` always returns a new instance, even if it produced the - * same value at every step. - */ - map( - mapper: (value: V, key: K, iter: this) => M, - context?: unknown - ): Seq.Keyed; - - /** - * @see Collection.Keyed.mapKeys - */ - mapKeys( - mapper: (key: K, value: V, iter: this) => M, - context?: unknown - ): Seq.Keyed; - - /** - * @see Collection.Keyed.mapEntries - */ - mapEntries( - mapper: ( - entry: [K, V], - index: number, - iter: this - ) => [KM, VM] | undefined, - context?: unknown - ): Seq.Keyed; - - /** - * Flat-maps the Seq, returning a Seq of the same type. - * - * Similar to `seq.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, - context?: unknown - ): Seq.Keyed; - - /** - * Returns a new Seq with only the entries for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: V, key: K, iter: this) => value is F, - context?: unknown - ): Seq.Keyed; - filter( - predicate: (value: V, key: K, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new keyed Seq with the values for which the `predicate` - * function returns false and another for which is returns true. - */ - partition( - predicate: (this: C, value: V, key: K, iter: this) => value is F, - context?: C - ): [Seq.Keyed, Seq.Keyed]; - partition( - predicate: (this: C, value: V, key: K, iter: this) => unknown, - context?: C - ): [this, this]; - - /** - * @see Collection.Keyed.flip - */ - flip(): Seq.Keyed; - - [Symbol.iterator](): IterableIterator<[K, V]>; - } - - /** - * `Seq` which represents an ordered indexed list of values. - */ - namespace Indexed { - /** - * Provides an Seq.Indexed of the values provided. - */ - function of(...values: Array): Seq.Indexed; - } - - /** - * Always returns Seq.Indexed, discarding associated keys and - * supplying incrementing indices. - * - * Note: `Seq.Indexed` is a conversion function and not a class, and does - * not use the `new` keyword during construction. - */ - function Indexed( - collection?: Iterable | ArrayLike - ): Seq.Indexed; - - interface Indexed extends Seq, Collection.Indexed { - /** - * Deeply converts this Indexed Seq to equivalent native JavaScript Array. - */ - toJS(): Array>; - - /** - * Shallowly converts this Indexed Seq to equivalent native JavaScript Array. - */ - toJSON(): Array; - - /** - * Shallowly converts this collection to an Array. - */ - toArray(): Array; - - /** - * Returns itself - */ - toSeq(): this; - - /** - * Returns a new Seq with other collections concatenated to this one. - */ - concat( - ...valuesOrCollections: Array | C> - ): Seq.Indexed; - - /** - * Returns a new Seq.Indexed with values passed through a - * `mapper` function. - * - * ```js - * const { Seq } = require('immutable') - * Seq.Indexed([ 1, 2 ]).map(x => 10 * x) - * // Seq [ 10, 20 ] - * ``` - * - * Note: `map()` always returns a new instance, even if it produced the - * same value at every step. - */ - map( - mapper: (value: T, key: number, iter: this) => M, - context?: unknown - ): Seq.Indexed; - - /** - * Flat-maps the Seq, returning a a Seq of the same type. - * - * Similar to `seq.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: T, key: number, iter: this) => Iterable, - context?: unknown - ): Seq.Indexed; - - /** - * Returns a new Seq with only the values for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: T, index: number, iter: this) => value is F, - context?: unknown - ): Seq.Indexed; - filter( - predicate: (value: T, index: number, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new indexed Seq with the values for which the `predicate` - * function returns false and another for which is returns true. - */ - partition( - predicate: (this: C, value: T, index: number, iter: this) => value is F, - context?: C - ): [Seq.Indexed, Seq.Indexed]; - partition( - predicate: (this: C, value: T, index: number, iter: this) => unknown, - context?: C - ): [this, this]; - - /** - * Returns a Seq "zipped" with the provided collections. - * - * Like `zipWith`, but using the default `zipper`: creating an `Array`. - * - * ```js - * const a = Seq([ 1, 2, 3 ]); - * const b = Seq([ 4, 5, 6 ]); - * const c = a.zip(b); // Seq [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] - * ``` - */ - zip(other: Collection): Seq.Indexed<[T, U]>; - zip( - other: Collection, - other2: Collection - ): Seq.Indexed<[T, U, V]>; - zip( - ...collections: Array> - ): Seq.Indexed; - - /** - * Returns a Seq "zipped" with the provided collections. - * - * Unlike `zip`, `zipAll` continues zipping until the longest collection is - * exhausted. Missing values from shorter collections are filled with `undefined`. - * - * ```js - * const a = Seq([ 1, 2 ]); - * const b = Seq([ 3, 4, 5 ]); - * const c = a.zipAll(b); // Seq [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] - * ``` - */ - zipAll(other: Collection): Seq.Indexed<[T, U]>; - zipAll( - other: Collection, - other2: Collection - ): Seq.Indexed<[T, U, V]>; - zipAll( - ...collections: Array> - ): Seq.Indexed; - - /** - * Returns a Seq "zipped" with the provided collections by using a - * custom `zipper` function. - * - * ```js - * const a = Seq([ 1, 2, 3 ]); - * const b = Seq([ 4, 5, 6 ]); - * const c = a.zipWith((a, b) => a + b, b); - * // Seq [ 5, 7, 9 ] - * ``` - */ - zipWith( - zipper: (value: T, otherValue: U) => Z, - otherCollection: Collection - ): Seq.Indexed; - zipWith( - zipper: (value: T, otherValue: U, thirdValue: V) => Z, - otherCollection: Collection, - thirdCollection: Collection - ): Seq.Indexed; - zipWith( - zipper: (...values: Array) => Z, - ...collections: Array> - ): Seq.Indexed; - - [Symbol.iterator](): IterableIterator; - } - - /** - * `Seq` which represents a set of values. - * - * Because `Seq` are often lazy, `Seq.Set` does not provide the same guarantee - * of value uniqueness as the concrete `Set`. - */ - namespace Set { - /** - * Returns a Seq.Set of the provided values - */ - function of(...values: Array): Seq.Set; - } - - /** - * Always returns a Seq.Set, discarding associated indices or keys. - * - * Note: `Seq.Set` is a conversion function and not a class, and does not - * use the `new` keyword during construction. - */ - function Set(collection?: Iterable | ArrayLike): Seq.Set; - - interface Set extends Seq, Collection.Set { - /** - * Deeply converts this Set Seq to equivalent native JavaScript Array. - */ - toJS(): Array>; - - /** - * Shallowly converts this Set Seq to equivalent native JavaScript Array. - */ - toJSON(): Array; - - /** - * Shallowly converts this collection to an Array. - */ - toArray(): Array; - - /** - * Returns itself - */ - toSeq(): this; - - /** - * Returns a new Seq with other collections concatenated to this one. - * - * All entries will be present in the resulting Seq, even if they - * are duplicates. - */ - concat(...collections: Array>): Seq.Set; - - /** - * Returns a new Seq.Set with values passed through a - * `mapper` function. - * - * ```js - * Seq.Set([ 1, 2 ]).map(x => 10 * x) - * // Seq { 10, 20 } - * ``` - * - * Note: `map()` always returns a new instance, even if it produced the - * same value at every step. - */ - map( - mapper: (value: T, key: T, iter: this) => M, - context?: unknown - ): Seq.Set; - - /** - * Flat-maps the Seq, returning a Seq of the same type. - * - * Similar to `seq.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: T, key: T, iter: this) => Iterable, - context?: unknown - ): Seq.Set; - - /** - * Returns a new Seq with only the values for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: T, key: T, iter: this) => value is F, - context?: unknown - ): Seq.Set; - filter( - predicate: (value: T, key: T, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new set Seq with the values for which the `predicate` - * function returns false and another for which is returns true. - */ - partition( - predicate: (this: C, value: T, key: T, iter: this) => value is F, - context?: C - ): [Seq.Set, Seq.Set]; - partition( - predicate: (this: C, value: T, key: T, iter: this) => unknown, - context?: C - ): [this, this]; - - [Symbol.iterator](): IterableIterator; - } - } - - /** - * Creates a Seq. - * - * Returns a particular kind of `Seq` based on the input. - * - * * If a `Seq`, that same `Seq`. - * * If an `Collection`, a `Seq` of the same kind (Keyed, Indexed, or Set). - * * If an Array-like, an `Seq.Indexed`. - * * If an Iterable Object, an `Seq.Indexed`. - * * If an Object, a `Seq.Keyed`. - * - * Note: An Iterator itself will be treated as an object, becoming a `Seq.Keyed`, - * which is usually not what you want. You should turn your Iterator Object into - * an iterable object by defining a Symbol.iterator (or @@iterator) method which - * returns `this`. - * - * Note: `Seq` is a conversion function and not a class, and does not use the - * `new` keyword during construction. - */ - function Seq>(seq: S): S; - function Seq(collection: Collection.Keyed): Seq.Keyed; - function Seq(collection: Collection.Set): Seq.Set; - function Seq( - collection: Collection.Indexed | Iterable | ArrayLike - ): Seq.Indexed; - function Seq(obj: { [key: string]: V }): Seq.Keyed; - function Seq(): Seq; - - interface Seq extends Collection { - /** - * Some Seqs can describe their size lazily. When this is the case, - * size will be an integer. Otherwise it will be undefined. - * - * For example, Seqs returned from `map()` or `reverse()` - * preserve the size of the original `Seq` while `filter()` does not. - * - * Note: `Range`, `Repeat` and `Seq`s made from `Array`s and `Object`s will - * always have a size. - */ - readonly size: number | undefined; - - // Force evaluation - - /** - * Because Sequences are lazy and designed to be chained together, they do - * not cache their results. For example, this map function is called a total - * of 6 times, as each `join` iterates the Seq of three values. - * - * var squares = Seq([ 1, 2, 3 ]).map(x => x * x) - * squares.join() + squares.join() - * - * If you know a `Seq` will be used multiple times, it may be more - * efficient to first cache it in memory. Here, the map function is called - * only 3 times. - * - * var squares = Seq([ 1, 2, 3 ]).map(x => x * x).cacheResult() - * squares.join() + squares.join() - * - * Use this method judiciously, as it must fully evaluate a Seq which can be - * a burden on memory and possibly performance. - * - * Note: after calling `cacheResult`, a Seq will always have a `size`. - */ - cacheResult(): this; - - // Sequence algorithms - - /** - * Returns a new Seq with values passed through a - * `mapper` function. - * - * ```js - * const { Seq } = require('immutable') - * Seq([ 1, 2 ]).map(x => 10 * x) - * // Seq [ 10, 20 ] - * ``` - * - * Note: `map()` always returns a new instance, even if it produced the same - * value at every step. - */ - map( - mapper: (value: V, key: K, iter: this) => M, - context?: unknown - ): Seq; - - /** - * Returns a new Seq with values passed through a - * `mapper` function. - * - * ```js - * const { Seq } = require('immutable') - * Seq([ 1, 2 ]).map(x => 10 * x) - * // Seq [ 10, 20 ] - * ``` - * - * Note: `map()` always returns a new instance, even if it produced the same - * value at every step. - * Note: used only for sets. - */ - map( - mapper: (value: V, key: K, iter: this) => M, - context?: unknown - ): Seq; - - /** - * Flat-maps the Seq, returning a Seq of the same type. - * - * Similar to `seq.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: V, key: K, iter: this) => Iterable, - context?: unknown - ): Seq; - - /** - * Flat-maps the Seq, returning a Seq of the same type. - * - * Similar to `seq.map(...).flatten(true)`. - * Note: Used only for sets. - */ - flatMap( - mapper: (value: V, key: K, iter: this) => Iterable, - context?: unknown - ): Seq; - - /** - * Returns a new Seq with only the values for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: V, key: K, iter: this) => value is F, - context?: unknown - ): Seq; - filter( - predicate: (value: V, key: K, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new Seq with the values for which the `predicate` function - * returns false and another for which is returns true. - */ - partition( - predicate: (this: C, value: V, key: K, iter: this) => value is F, - context?: C - ): [Seq, Seq]; - partition( - predicate: (this: C, value: V, key: K, iter: this) => unknown, - context?: C - ): [this, this]; - } - - /** - * The `Collection` is a set of (key, value) entries which can be iterated, and - * is the base class for all collections in `immutable`, allowing them to - * make use of all the Collection methods (such as `map` and `filter`). - * - * Note: A collection is always iterated in the same order, however that order - * may not always be well defined, as is the case for the `Map` and `Set`. - * - * Collection is the abstract base class for concrete data structures. It - * cannot be constructed directly. - * - * Implementations should extend one of the subclasses, `Collection.Keyed`, - * `Collection.Indexed`, or `Collection.Set`. - */ - namespace Collection { - /** - * Keyed Collections have discrete keys tied to each value. - * - * When iterating `Collection.Keyed`, each iteration will yield a `[K, V]` - * tuple, in other words, `Collection#entries` is the default iterator for - * Keyed Collections. - */ - namespace Keyed {} - - /** - * Creates a Collection.Keyed - * - * Similar to `Collection()`, however it expects collection-likes of [K, V] - * tuples if not constructed from a Collection.Keyed or JS Object. - * - * Note: `Collection.Keyed` is a conversion function and not a class, and - * does not use the `new` keyword during construction. - */ - function Keyed(collection?: Iterable<[K, V]>): Collection.Keyed; - function Keyed(obj: { [key: string]: V }): Collection.Keyed; - - interface Keyed extends Collection { - /** - * Deeply converts this Keyed collection to equivalent native JavaScript Object. - * - * Converts keys to Strings. - */ - toJS(): { [key in string | number | symbol]: DeepCopy }; - - /** - * Shallowly converts this Keyed collection to equivalent native JavaScript Object. - * - * Converts keys to Strings. - */ - toJSON(): { [key in string | number | symbol]: V }; - - /** - * Shallowly converts this collection to an Array. - */ - toArray(): Array<[K, V]>; - - /** - * Returns Seq.Keyed. - * @override - */ - toSeq(): Seq.Keyed; - - // Sequence functions - - /** - * Returns a new Collection.Keyed of the same type where the keys and values - * have been flipped. - * - * - * ```js - * const { Map } = require('immutable') - * Map({ a: 'z', b: 'y' }).flip() - * // Map { "z": "a", "y": "b" } - * ``` - */ - flip(): Collection.Keyed; - - /** - * Returns a new Collection with other collections concatenated to this one. - */ - concat( - ...collections: Array> - ): Collection.Keyed; - concat( - ...collections: Array<{ [key: string]: C }> - ): Collection.Keyed; - - /** - * Returns a new Collection.Keyed with values passed through a - * `mapper` function. - * - * ```js - * const { Collection } = require('immutable') - * Collection.Keyed({ a: 1, b: 2 }).map(x => 10 * x) - * // Seq { "a": 10, "b": 20 } - * ``` - * - * Note: `map()` always returns a new instance, even if it produced the - * same value at every step. - */ - map( - mapper: (value: V, key: K, iter: this) => M, - context?: unknown - ): Collection.Keyed; - - /** - * Returns a new Collection.Keyed of the same type with keys passed through - * a `mapper` function. - * - * - * ```js - * const { Map } = require('immutable') - * Map({ a: 1, b: 2 }).mapKeys(x => x.toUpperCase()) - * // Map { "A": 1, "B": 2 } - * ``` - * - * Note: `mapKeys()` always returns a new instance, even if it produced - * the same key at every step. - */ - mapKeys( - mapper: (key: K, value: V, iter: this) => M, - context?: unknown - ): Collection.Keyed; - - /** - * Returns a new Collection.Keyed of the same type with entries - * ([key, value] tuples) passed through a `mapper` function. - * - * - * ```js - * const { Map } = require('immutable') - * Map({ a: 1, b: 2 }) - * .mapEntries(([ k, v ]) => [ k.toUpperCase(), v * 2 ]) - * // Map { "A": 2, "B": 4 } - * ``` - * - * Note: `mapEntries()` always returns a new instance, even if it produced - * the same entry at every step. - * - * If the mapper function returns `undefined`, then the entry will be filtered - */ - mapEntries( - mapper: ( - entry: [K, V], - index: number, - iter: this - ) => [KM, VM] | undefined, - context?: unknown - ): Collection.Keyed; - - /** - * Flat-maps the Collection, returning a Collection of the same type. - * - * Similar to `collection.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, - context?: unknown - ): Collection.Keyed; - - /** - * Returns a new Collection with only the values for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: V, key: K, iter: this) => value is F, - context?: unknown - ): Collection.Keyed; - filter( - predicate: (value: V, key: K, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new keyed Collection with the values for which the - * `predicate` function returns false and another for which is returns - * true. - */ - partition( - predicate: (this: C, value: V, key: K, iter: this) => value is F, - context?: C - ): [Collection.Keyed, Collection.Keyed]; - partition( - predicate: (this: C, value: V, key: K, iter: this) => unknown, - context?: C - ): [this, this]; - - [Symbol.iterator](): IterableIterator<[K, V]>; - } - - /** - * Indexed Collections have incrementing numeric keys. They exhibit - * slightly different behavior than `Collection.Keyed` for some methods in order - * to better mirror the behavior of JavaScript's `Array`, and add methods - * which do not make sense on non-indexed Collections such as `indexOf`. - * - * Unlike JavaScript arrays, `Collection.Indexed`s are always dense. "Unset" - * indices and `undefined` indices are indistinguishable, and all indices from - * 0 to `size` are visited when iterated. - * - * All Collection.Indexed methods return re-indexed Collections. In other words, - * indices always start at 0 and increment until size. If you wish to - * preserve indices, using them as keys, convert to a Collection.Keyed by - * calling `toKeyedSeq`. - */ - namespace Indexed {} - - /** - * Creates a new Collection.Indexed. - * - * Note: `Collection.Indexed` is a conversion function and not a class, and - * does not use the `new` keyword during construction. - */ - function Indexed( - collection?: Iterable | ArrayLike - ): Collection.Indexed; - - interface Indexed extends Collection { - /** - * Deeply converts this Indexed collection to equivalent native JavaScript Array. - */ - toJS(): Array>; - - /** - * Shallowly converts this Indexed collection to equivalent native JavaScript Array. - */ - toJSON(): Array; - - /** - * Shallowly converts this collection to an Array. - */ - toArray(): Array; - - // Reading values - - /** - * Returns the value associated with the provided index, or notSetValue if - * the index is beyond the bounds of the Collection. - * - * `index` may be a negative number, which indexes back from the end of the - * Collection. `s.get(-1)` gets the last item in the Collection. - */ - get(index: number, notSetValue: NSV): T | NSV; - get(index: number): T | undefined; - - // Conversion to Seq - - /** - * Returns Seq.Indexed. - * @override - */ - toSeq(): Seq.Indexed; - - /** - * If this is a collection of [key, value] entry tuples, it will return a - * Seq.Keyed of those entries. - */ - fromEntrySeq(): Seq.Keyed; - - // Combination - - /** - * Returns a Collection of the same type with `separator` between each item - * in this Collection. - */ - interpose(separator: T): this; - - /** - * Returns a Collection of the same type with the provided `collections` - * interleaved into this collection. - * - * The resulting Collection includes the first item from each, then the - * second from each, etc. - * - * - * ```js - * const { List } = require('immutable') - * List([ 1, 2, 3 ]).interleave(List([ 'A', 'B', 'C' ])) - * // List [ 1, "A", 2, "B", 3, "C" ] - * ``` - * - * The shortest Collection stops interleave. - * - * - * ```js - * List([ 1, 2, 3 ]).interleave( - * List([ 'A', 'B' ]), - * List([ 'X', 'Y', 'Z' ]) - * ) - * // List [ 1, "A", "X", 2, "B", "Y" ] - * ``` - * - * Since `interleave()` re-indexes values, it produces a complete copy, - * which has `O(N)` complexity. - * - * Note: `interleave` *cannot* be used in `withMutations`. - */ - interleave(...collections: Array>): this; - - /** - * Splice returns a new indexed Collection by replacing a region of this - * Collection with new values. If values are not provided, it only skips the - * region to be removed. - * - * `index` may be a negative number, which indexes back from the end of the - * Collection. `s.splice(-2)` splices after the second to last item. - * - * - * ```js - * const { List } = require('immutable') - * List([ 'a', 'b', 'c', 'd' ]).splice(1, 2, 'q', 'r', 's') - * // List [ "a", "q", "r", "s", "d" ] - * ``` - * - * Since `splice()` re-indexes values, it produces a complete copy, which - * has `O(N)` complexity. - * - * Note: `splice` *cannot* be used in `withMutations`. - */ - splice(index: number, removeNum: number, ...values: Array): this; - - /** - * Returns a Collection of the same type "zipped" with the provided - * collections. - * - * Like `zipWith`, but using the default `zipper`: creating an `Array`. - * - * - * - * ```js - * const a = List([ 1, 2, 3 ]); - * const b = List([ 4, 5, 6 ]); - * const c = a.zip(b); // List [ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ] - * ``` - */ - zip(other: Collection): Collection.Indexed<[T, U]>; - zip( - other: Collection, - other2: Collection - ): Collection.Indexed<[T, U, V]>; - zip( - ...collections: Array> - ): Collection.Indexed; - - /** - * Returns a Collection "zipped" with the provided collections. - * - * Unlike `zip`, `zipAll` continues zipping until the longest collection is - * exhausted. Missing values from shorter collections are filled with `undefined`. - * - * ```js - * const a = List([ 1, 2 ]); - * const b = List([ 3, 4, 5 ]); - * const c = a.zipAll(b); // List [ [ 1, 3 ], [ 2, 4 ], [ undefined, 5 ] ] - * ``` - */ - zipAll(other: Collection): Collection.Indexed<[T, U]>; - zipAll( - other: Collection, - other2: Collection - ): Collection.Indexed<[T, U, V]>; - zipAll( - ...collections: Array> - ): Collection.Indexed; - - /** - * Returns a Collection of the same type "zipped" with the provided - * collections by using a custom `zipper` function. - * - * - * ```js - * const a = List([ 1, 2, 3 ]); - * const b = List([ 4, 5, 6 ]); - * const c = a.zipWith((a, b) => a + b, b); - * // List [ 5, 7, 9 ] - * ``` - */ - zipWith( - zipper: (value: T, otherValue: U) => Z, - otherCollection: Collection - ): Collection.Indexed; - zipWith( - zipper: (value: T, otherValue: U, thirdValue: V) => Z, - otherCollection: Collection, - thirdCollection: Collection - ): Collection.Indexed; - zipWith( - zipper: (...values: Array) => Z, - ...collections: Array> - ): Collection.Indexed; - - // Search for value - - /** - * Returns the first index at which a given value can be found in the - * Collection, or -1 if it is not present. - */ - indexOf(searchValue: T): number; - - /** - * Returns the last index at which a given value can be found in the - * Collection, or -1 if it is not present. - */ - lastIndexOf(searchValue: T): number; - - /** - * Returns the first index in the Collection where a value satisfies the - * provided predicate function. Otherwise -1 is returned. - */ - findIndex( - predicate: (value: T, index: number, iter: this) => boolean, - context?: unknown - ): number; - - /** - * Returns the last index in the Collection where a value satisfies the - * provided predicate function. Otherwise -1 is returned. - */ - findLastIndex( - predicate: (value: T, index: number, iter: this) => boolean, - context?: unknown - ): number; - - // Sequence algorithms - - /** - * Returns a new Collection with other collections concatenated to this one. - */ - concat( - ...valuesOrCollections: Array | C> - ): Collection.Indexed; - - /** - * Returns a new Collection.Indexed with values passed through a - * `mapper` function. - * - * ```js - * const { Collection } = require('immutable') - * Collection.Indexed([1,2]).map(x => 10 * x) - * // Seq [ 1, 2 ] - * ``` - * - * Note: `map()` always returns a new instance, even if it produced the - * same value at every step. - */ - map( - mapper: (value: T, key: number, iter: this) => M, - context?: unknown - ): Collection.Indexed; - - /** - * Flat-maps the Collection, returning a Collection of the same type. - * - * Similar to `collection.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: T, key: number, iter: this) => Iterable, - context?: unknown - ): Collection.Indexed; - - /** - * Returns a new Collection with only the values for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: T, index: number, iter: this) => value is F, - context?: unknown - ): Collection.Indexed; - filter( - predicate: (value: T, index: number, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new indexed Collection with the values for which the - * `predicate` function returns false and another for which is returns - * true. - */ - partition( - predicate: (this: C, value: T, index: number, iter: this) => value is F, - context?: C - ): [Collection.Indexed, Collection.Indexed]; - partition( - predicate: (this: C, value: T, index: number, iter: this) => unknown, - context?: C - ): [this, this]; - - [Symbol.iterator](): IterableIterator; - } - - /** - * Set Collections only represent values. They have no associated keys or - * indices. Duplicate values are possible in the lazy `Seq.Set`s, however - * the concrete `Set` Collection does not allow duplicate values. - * - * Collection methods on Collection.Set such as `map` and `forEach` will provide - * the value as both the first and second arguments to the provided function. - * - * ```js - * const { Collection } = require('immutable') - * const seq = Collection.Set([ 'A', 'B', 'C' ]) - * // Seq { "A", "B", "C" } - * seq.forEach((v, k) => - * assert.equal(v, k) - * ) - * ``` - */ - namespace Set {} - - /** - * Similar to `Collection()`, but always returns a Collection.Set. - * - * Note: `Collection.Set` is a factory function and not a class, and does - * not use the `new` keyword during construction. - */ - function Set(collection?: Iterable | ArrayLike): Collection.Set; - - interface Set extends Collection { - /** - * Deeply converts this Set collection to equivalent native JavaScript Array. - */ - toJS(): Array>; - - /** - * Shallowly converts this Set collection to equivalent native JavaScript Array. - */ - toJSON(): Array; - - /** - * Shallowly converts this collection to an Array. - */ - toArray(): Array; - - /** - * Returns Seq.Set. - * @override - */ - toSeq(): Seq.Set; - - // Sequence algorithms - - /** - * Returns a new Collection with other collections concatenated to this one. - */ - concat(...collections: Array>): Collection.Set; - - /** - * Returns a new Collection.Set with values passed through a - * `mapper` function. - * - * ``` - * Collection.Set([ 1, 2 ]).map(x => 10 * x) - * // Seq { 1, 2 } - * ``` - * - * Note: `map()` always returns a new instance, even if it produced the - * same value at every step. - */ - map( - mapper: (value: T, key: T, iter: this) => M, - context?: unknown - ): Collection.Set; - - /** - * Flat-maps the Collection, returning a Collection of the same type. - * - * Similar to `collection.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: T, key: T, iter: this) => Iterable, - context?: unknown - ): Collection.Set; - - /** - * Returns a new Collection with only the values for which the `predicate` - * function returns true. - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: T, key: T, iter: this) => value is F, - context?: unknown - ): Collection.Set; - filter( - predicate: (value: T, key: T, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new set Collection with the values for which the - * `predicate` function returns false and another for which is returns - * true. - */ - partition( - predicate: (this: C, value: T, key: T, iter: this) => value is F, - context?: C - ): [Collection.Set, Collection.Set]; - partition( - predicate: (this: C, value: T, key: T, iter: this) => unknown, - context?: C - ): [this, this]; - - [Symbol.iterator](): IterableIterator; - } - } - - /** - * Creates a Collection. - * - * The type of Collection created is based on the input. - * - * * If an `Collection`, that same `Collection`. - * * If an Array-like, an `Collection.Indexed`. - * * If an Object with an Iterator defined, an `Collection.Indexed`. - * * If an Object, an `Collection.Keyed`. - * - * This methods forces the conversion of Objects and Strings to Collections. - * If you want to ensure that a Collection of one item is returned, use - * `Seq.of`. - * - * Note: An Iterator itself will be treated as an object, becoming a `Seq.Keyed`, - * which is usually not what you want. You should turn your Iterator Object into - * an iterable object by defining a Symbol.iterator (or @@iterator) method which - * returns `this`. - * - * Note: `Collection` is a conversion function and not a class, and does not - * use the `new` keyword during construction. - */ - function Collection>(collection: I): I; - function Collection( - collection: Iterable | ArrayLike - ): Collection.Indexed; - function Collection(obj: { - [key: string]: V; - }): Collection.Keyed; - function Collection(): Collection; - - interface Collection extends ValueObject { - // Value equality - - /** - * True if this and the other Collection have value equality, as defined - * by `Immutable.is()`. - * - * Note: This is equivalent to `Immutable.is(this, other)`, but provided to - * allow for chained expressions. - */ - equals(other: unknown): boolean; - - /** - * Computes and returns the hashed identity for this Collection. - * - * The `hashCode` of a Collection is used to determine potential equality, - * and is used when adding this to a `Set` or as a key in a `Map`, enabling - * lookup via a different instance. - * - * - * ```js - * const a = List([ 1, 2, 3 ]); - * const b = List([ 1, 2, 3 ]); - * assert.notStrictEqual(a, b); // different instances - * const set = Set([ a ]); - * assert.equal(set.has(b), true); - * ``` - * - * If two values have the same `hashCode`, they are [not guaranteed - * to be equal][Hash Collision]. If two values have different `hashCode`s, - * they must not be equal. - * - * [Hash Collision]: https://en.wikipedia.org/wiki/Collision_(computer_science) - */ - hashCode(): number; - - // Reading values - - /** - * Returns the value associated with the provided key, or notSetValue if - * the Collection does not contain this key. - * - * Note: it is possible a key may be associated with an `undefined` value, - * so if `notSetValue` is not provided and this method returns `undefined`, - * that does not guarantee the key was not found. - */ - get(key: K, notSetValue: NSV): V | NSV; - get(key: K): V | undefined; - - /** - * True if a key exists within this `Collection`, using `Immutable.is` - * to determine equality - */ - has(key: K): boolean; - - /** - * True if a value exists within this `Collection`, using `Immutable.is` - * to determine equality - * @alias contains - */ - includes(value: V): boolean; - contains(value: V): boolean; - - /** - * In case the `Collection` is not empty returns the first element of the - * `Collection`. - * In case the `Collection` is empty returns the optional default - * value if provided, if no default value is provided returns undefined. - */ - first(notSetValue: NSV): V | NSV; - first(): V | undefined; - - /** - * In case the `Collection` is not empty returns the last element of the - * `Collection`. - * In case the `Collection` is empty returns the optional default - * value if provided, if no default value is provided returns undefined. - */ - last(notSetValue: NSV): V | NSV; - last(): V | undefined; - - // Reading deep values - - /** - * Returns the value found by following a path of keys or indices through - * nested Collections. - * - * - * ```js - * const { Map, List } = require('immutable') - * const deepData = Map({ x: List([ Map({ y: 123 }) ]) }); - * deepData.getIn(['x', 0, 'y']) // 123 - * ``` - * - * Plain JavaScript Object or Arrays may be nested within an Immutable.js - * Collection, and getIn() can access those values as well: - * - * - * ```js - * const { Map, List } = require('immutable') - * const deepData = Map({ x: [ { y: 123 } ] }); - * deepData.getIn(['x', 0, 'y']) // 123 - * ``` - */ - getIn(searchKeyPath: Iterable, notSetValue?: unknown): unknown; - - /** - * True if the result of following a path of keys or indices through nested - * Collections results in a set value. - */ - hasIn(searchKeyPath: Iterable): boolean; - - // Persistent changes - - /** - * This can be very useful as a way to "chain" a normal function into a - * sequence of methods. RxJS calls this "let" and lodash calls it "thru". - * - * For example, to sum a Seq after mapping and filtering: - * - * - * ```js - * const { Seq } = require('immutable') - * - * function sum(collection) { - * return collection.reduce((sum, x) => sum + x, 0) - * } - * - * Seq([ 1, 2, 3 ]) - * .map(x => x + 1) - * .filter(x => x % 2 === 0) - * .update(sum) - * // 6 - * ``` - */ - update(updater: (value: this) => R): R; - - // Conversion to JavaScript types - - /** - * Deeply converts this Collection to equivalent native JavaScript Array or Object. - * - * `Collection.Indexed`, and `Collection.Set` become `Array`, while - * `Collection.Keyed` become `Object`, converting keys to Strings. - */ - toJS(): - | Array> - | { [key in string | number | symbol]: DeepCopy }; - - /** - * Shallowly converts this Collection to equivalent native JavaScript Array or Object. - * - * `Collection.Indexed`, and `Collection.Set` become `Array`, while - * `Collection.Keyed` become `Object`, converting keys to Strings. - */ - toJSON(): Array | { [key in string | number | symbol]: V }; - - /** - * Shallowly converts this collection to an Array. - * - * `Collection.Indexed`, and `Collection.Set` produce an Array of values. - * `Collection.Keyed` produce an Array of [key, value] tuples. - */ - toArray(): Array | Array<[K, V]>; - - /** - * Shallowly converts this Collection to an Object. - * - * Converts keys to Strings. - */ - toObject(): { [key: string]: V }; - - // Conversion to Collections - - /** - * Converts this Collection to a Map, Throws if keys are not hashable. - * - * Note: This is equivalent to `Map(this.toKeyedSeq())`, but provided - * for convenience and to allow for chained expressions. - */ - toMap(): Map; - - /** - * Converts this Collection to a Map, maintaining the order of iteration. - * - * Note: This is equivalent to `OrderedMap(this.toKeyedSeq())`, but - * provided for convenience and to allow for chained expressions. - */ - toOrderedMap(): OrderedMap; - - /** - * Converts this Collection to a Set, discarding keys. Throws if values - * are not hashable. - * - * Note: This is equivalent to `Set(this)`, but provided to allow for - * chained expressions. - */ - toSet(): Set; - - /** - * Converts this Collection to a Set, maintaining the order of iteration and - * discarding keys. - * - * Note: This is equivalent to `OrderedSet(this.valueSeq())`, but provided - * for convenience and to allow for chained expressions. - */ - toOrderedSet(): OrderedSet; - - /** - * Converts this Collection to a List, discarding keys. - * - * This is similar to `List(collection)`, but provided to allow for chained - * expressions. However, when called on `Map` or other keyed collections, - * `collection.toList()` discards the keys and creates a list of only the - * values, whereas `List(collection)` creates a list of entry tuples. - * - * - * ```js - * const { Map, List } = require('immutable') - * var myMap = Map({ a: 'Apple', b: 'Banana' }) - * List(myMap) // List [ [ "a", "Apple" ], [ "b", "Banana" ] ] - * myMap.toList() // List [ "Apple", "Banana" ] - * ``` - */ - toList(): List; - - /** - * Converts this Collection to a Stack, discarding keys. Throws if values - * are not hashable. - * - * Note: This is equivalent to `Stack(this)`, but provided to allow for - * chained expressions. - */ - toStack(): Stack; - - // Conversion to Seq - - /** - * Converts this Collection to a Seq of the same kind (indexed, - * keyed, or set). - */ - toSeq(): Seq; - - /** - * Returns a Seq.Keyed from this Collection where indices are treated as keys. - * - * This is useful if you want to operate on an - * Collection.Indexed and preserve the [index, value] pairs. - * - * The returned Seq will have identical iteration order as - * this Collection. - * - * - * ```js - * const { Seq } = require('immutable') - * const indexedSeq = Seq([ 'A', 'B', 'C' ]) - * // Seq [ "A", "B", "C" ] - * indexedSeq.filter(v => v === 'B') - * // Seq [ "B" ] - * const keyedSeq = indexedSeq.toKeyedSeq() - * // Seq { 0: "A", 1: "B", 2: "C" } - * keyedSeq.filter(v => v === 'B') - * // Seq { 1: "B" } - * ``` - */ - toKeyedSeq(): Seq.Keyed; - - /** - * Returns an Seq.Indexed of the values of this Collection, discarding keys. - */ - toIndexedSeq(): Seq.Indexed; - - /** - * Returns a Seq.Set of the values of this Collection, discarding keys. - */ - toSetSeq(): Seq.Set; - - // Iterators - - /** - * An iterator of this `Collection`'s keys. - * - * Note: this will return an ES6 iterator which does not support - * Immutable.js sequence algorithms. Use `keySeq` instead, if this is - * what you want. - */ - keys(): IterableIterator; - - /** - * An iterator of this `Collection`'s values. - * - * Note: this will return an ES6 iterator which does not support - * Immutable.js sequence algorithms. Use `valueSeq` instead, if this is - * what you want. - */ - values(): IterableIterator; - - /** - * An iterator of this `Collection`'s entries as `[ key, value ]` tuples. - * - * Note: this will return an ES6 iterator which does not support - * Immutable.js sequence algorithms. Use `entrySeq` instead, if this is - * what you want. - */ - entries(): IterableIterator<[K, V]>; - - [Symbol.iterator](): IterableIterator; - - // Collections (Seq) - - /** - * Returns a new Seq.Indexed of the keys of this Collection, - * discarding values. - */ - keySeq(): Seq.Indexed; - - /** - * Returns an Seq.Indexed of the values of this Collection, discarding keys. - */ - valueSeq(): Seq.Indexed; - - /** - * Returns a new Seq.Indexed of [key, value] tuples. - */ - entrySeq(): Seq.Indexed<[K, V]>; - - // Sequence algorithms - - /** - * Returns a new Collection of the same type with values passed through a - * `mapper` function. - * - * - * ```js - * const { Collection } = require('immutable') - * Collection({ a: 1, b: 2 }).map(x => 10 * x) - * // Seq { "a": 10, "b": 20 } - * ``` - * - * Note: `map()` always returns a new instance, even if it produced the same - * value at every step. - */ - map( - mapper: (value: V, key: K, iter: this) => M, - context?: unknown - ): Collection; - - /** - * Note: used only for sets, which return Collection but are otherwise - * identical to normal `map()`. - * - * @ignore - */ - map(...args: Array): unknown; - - /** - * Returns a new Collection of the same type with only the entries for which - * the `predicate` function returns true. - * - * - * ```js - * const { Map } = require('immutable') - * Map({ a: 1, b: 2, c: 3, d: 4}).filter(x => x % 2 === 0) - * // Map { "b": 2, "d": 4 } - * ``` - * - * Note: `filter()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filter( - predicate: (value: V, key: K, iter: this) => value is F, - context?: unknown - ): Collection; - filter( - predicate: (value: V, key: K, iter: this) => unknown, - context?: unknown - ): this; - - /** - * Returns a new Collection of the same type with only the entries for which - * the `predicate` function returns false. - * - * - * ```js - * const { Map } = require('immutable') - * Map({ a: 1, b: 2, c: 3, d: 4}).filterNot(x => x % 2 === 0) - * // Map { "a": 1, "c": 3 } - * ``` - * - * Note: `filterNot()` always returns a new instance, even if it results in - * not filtering out any values. - */ - filterNot( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown - ): this; - - /** - * Returns a new Collection with the values for which the `predicate` - * function returns false and another for which is returns true. - */ - partition( - predicate: (this: C, value: V, key: K, iter: this) => value is F, - context?: C - ): [Collection, Collection]; - partition( - predicate: (this: C, value: V, key: K, iter: this) => unknown, - context?: C - ): [this, this]; - - /** - * Returns a new Collection of the same type in reverse order. - */ - reverse(): this; - - /** - * Returns a new Collection of the same type which includes the same entries, - * stably sorted by using a `comparator`. - * - * If a `comparator` is not provided, a default comparator uses `<` and `>`. - * - * `comparator(valueA, valueB)`: - * - * * Returns `0` if the elements should not be swapped. - * * Returns `-1` (or any negative number) if `valueA` comes before `valueB` - * * Returns `1` (or any positive number) if `valueA` comes after `valueB` - * * Alternatively, can return a value of the `PairSorting` enum type - * * Is pure, i.e. it must always return the same value for the same pair - * of values. - * - * When sorting collections which have no defined order, their ordered - * equivalents will be returned. e.g. `map.sort()` returns OrderedMap. - * - * - * ```js - * const { Map } = require('immutable') - * Map({ "c": 3, "a": 1, "b": 2 }).sort((a, b) => { - * if (a < b) { return -1; } - * if (a > b) { return 1; } - * if (a === b) { return 0; } - * }); - * // OrderedMap { "a": 1, "b": 2, "c": 3 } - * ``` - * - * Note: `sort()` Always returns a new instance, even if the original was - * already sorted. - * - * Note: This is always an eager operation. - */ - sort(comparator?: Comparator): this; - - /** - * Like `sort`, but also accepts a `comparatorValueMapper` which allows for - * sorting by more sophisticated means: - * - * - * ```js - * const { Map } = require('immutable') - * const beattles = Map({ - * John: { name: "Lennon" }, - * Paul: { name: "McCartney" }, - * George: { name: "Harrison" }, - * Ringo: { name: "Starr" }, - * }); - * beattles.sortBy(member => member.name); - * ``` - * - * Note: `sortBy()` Always returns a new instance, even if the original was - * already sorted. - * - * Note: This is always an eager operation. - */ - sortBy( - comparatorValueMapper: (value: V, key: K, iter: this) => C, - comparator?: Comparator - ): this; - - /** - * Returns a `Map` of `Collection`, grouped by the return - * value of the `grouper` function. - * - * Note: This is always an eager operation. - * - * - * ```js - * const { List, Map } = require('immutable') - * const listOfMaps = List([ - * Map({ v: 0 }), - * Map({ v: 1 }), - * Map({ v: 1 }), - * Map({ v: 0 }), - * Map({ v: 2 }) - * ]) - * const groupsOfMaps = listOfMaps.groupBy(x => x.get('v')) - * // Map { - * // 0: List [ Map{ "v": 0 }, Map { "v": 0 } ], - * // 1: List [ Map{ "v": 1 }, Map { "v": 1 } ], - * // 2: List [ Map{ "v": 2 } ], - * // } - * ``` - */ - groupBy( - grouper: (value: V, key: K, iter: this) => G, - context?: unknown - ): Map; - - // Side effects - - /** - * The `sideEffect` is executed for every entry in the Collection. - * - * Unlike `Array#forEach`, if any call of `sideEffect` returns - * `false`, the iteration will stop. Returns the number of entries iterated - * (including the last iteration which returned false). - */ - forEach( - sideEffect: (value: V, key: K, iter: this) => unknown, - context?: unknown - ): number; - - // Creating subsets - - /** - * Returns a new Collection of the same type representing a portion of this - * Collection from start up to but not including end. - * - * If begin is negative, it is offset from the end of the Collection. e.g. - * `slice(-2)` returns a Collection of the last two entries. If it is not - * provided the new Collection will begin at the beginning of this Collection. - * - * If end is negative, it is offset from the end of the Collection. e.g. - * `slice(0, -1)` returns a Collection of everything but the last entry. If - * it is not provided, the new Collection will continue through the end of - * this Collection. - * - * If the requested slice is equivalent to the current Collection, then it - * will return itself. - */ - slice(begin?: number, end?: number): this; - - /** - * Returns a new Collection of the same type containing all entries except - * the first. - */ - rest(): this; - - /** - * Returns a new Collection of the same type containing all entries except - * the last. - */ - butLast(): this; - - /** - * Returns a new Collection of the same type which excludes the first `amount` - * entries from this Collection. - */ - skip(amount: number): this; - - /** - * Returns a new Collection of the same type which excludes the last `amount` - * entries from this Collection. - */ - skipLast(amount: number): this; - - /** - * Returns a new Collection of the same type which includes entries starting - * from when `predicate` first returns false. - * - * - * ```js - * const { List } = require('immutable') - * List([ 'dog', 'frog', 'cat', 'hat', 'god' ]) - * .skipWhile(x => x.match(/g/)) - * // List [ "cat", "hat", "god" ] - * ``` - */ - skipWhile( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown - ): this; - - /** - * Returns a new Collection of the same type which includes entries starting - * from when `predicate` first returns true. - * - * - * ```js - * const { List } = require('immutable') - * List([ 'dog', 'frog', 'cat', 'hat', 'god' ]) - * .skipUntil(x => x.match(/hat/)) - * // List [ "hat", "god" ] - * ``` - */ - skipUntil( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown - ): this; - - /** - * Returns a new Collection of the same type which includes the first `amount` - * entries from this Collection. - */ - take(amount: number): this; - - /** - * Returns a new Collection of the same type which includes the last `amount` - * entries from this Collection. - */ - takeLast(amount: number): this; - - /** - * Returns a new Collection of the same type which includes entries from this - * Collection as long as the `predicate` returns true. - * - * - * ```js - * const { List } = require('immutable') - * List([ 'dog', 'frog', 'cat', 'hat', 'god' ]) - * .takeWhile(x => x.match(/o/)) - * // List [ "dog", "frog" ] - * ``` - */ - takeWhile( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown - ): this; - - /** - * Returns a new Collection of the same type which includes entries from this - * Collection as long as the `predicate` returns false. - * - * - * ```js - * const { List } = require('immutable') - * List([ 'dog', 'frog', 'cat', 'hat', 'god' ]) - * .takeUntil(x => x.match(/at/)) - * // List [ "dog", "frog" ] - * ``` - */ - takeUntil( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown - ): this; - - // Combination - - /** - * Returns a new Collection of the same type with other values and - * collection-like concatenated to this one. - * - * For Seqs, all entries will be present in the resulting Seq, even if they - * have the same key. - */ - concat( - ...valuesOrCollections: Array - ): Collection; - - /** - * Flattens nested Collections. - * - * Will deeply flatten the Collection by default, returning a Collection of the - * same type, but a `depth` can be provided in the form of a number or - * boolean (where true means to shallowly flatten one level). A depth of 0 - * (or shallow: false) will deeply flatten. - * - * Flattens only others Collection, not Arrays or Objects. - * - * Note: `flatten(true)` operates on Collection> and - * returns Collection - */ - flatten(depth?: number): Collection; - flatten(shallow?: boolean): Collection; - - /** - * Flat-maps the Collection, returning a Collection of the same type. - * - * Similar to `collection.map(...).flatten(true)`. - */ - flatMap( - mapper: (value: V, key: K, iter: this) => Iterable, - context?: unknown - ): Collection; - - /** - * Flat-maps the Collection, returning a Collection of the same type. - * - * Similar to `collection.map(...).flatten(true)`. - * Used for Dictionaries only. - */ - flatMap( - mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, - context?: unknown - ): Collection; - - // Reducing a value - - /** - * Reduces the Collection to a value by calling the `reducer` for every entry - * in the Collection and passing along the reduced value. - * - * If `initialReduction` is not provided, the first item in the - * Collection will be used. - * - * @see `Array#reduce`. - */ - reduce( - reducer: (reduction: R, value: V, key: K, iter: this) => R, - initialReduction: R, - context?: unknown - ): R; - reduce( - reducer: (reduction: V | R, value: V, key: K, iter: this) => R - ): R; - - /** - * Reduces the Collection in reverse (from the right side). - * - * Note: Similar to this.reverse().reduce(), and provided for parity - * with `Array#reduceRight`. - */ - reduceRight( - reducer: (reduction: R, value: V, key: K, iter: this) => R, - initialReduction: R, - context?: unknown - ): R; - reduceRight( - reducer: (reduction: V | R, value: V, key: K, iter: this) => R - ): R; - - /** - * True if `predicate` returns true for all entries in the Collection. - */ - every( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown - ): boolean; - - /** - * True if `predicate` returns true for any entry in the Collection. - */ - some( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown - ): boolean; - - /** - * Joins values together as a string, inserting a separator between each. - * The default separator is `","`. - */ - join(separator?: string): string; - - /** - * Returns true if this Collection includes no values. - * - * For some lazy `Seq`, `isEmpty` might need to iterate to determine - * emptiness. At most one iteration will occur. - */ - isEmpty(): boolean; - - /** - * Returns the size of this Collection. - * - * Regardless of if this Collection can describe its size lazily (some Seqs - * cannot), this method will always return the correct size. E.g. it - * evaluates a lazy `Seq` if necessary. - * - * If `predicate` is provided, then this returns the count of entries in the - * Collection for which the `predicate` returns true. - */ - count(): number; - count( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown - ): number; - - /** - * Returns a `Seq.Keyed` of counts, grouped by the return value of - * the `grouper` function. - * - * Note: This is not a lazy operation. - */ - countBy( - grouper: (value: V, key: K, iter: this) => G, - context?: unknown - ): Map; - - // Search for value - - /** - * Returns the first value for which the `predicate` returns true. - */ - find( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown, - notSetValue?: V - ): V | undefined; - - /** - * Returns the last value for which the `predicate` returns true. - * - * Note: `predicate` will be called for each entry in reverse. - */ - findLast( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown, - notSetValue?: V - ): V | undefined; - - /** - * Returns the first [key, value] entry for which the `predicate` returns true. - */ - findEntry( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown, - notSetValue?: V - ): [K, V] | undefined; - - /** - * Returns the last [key, value] entry for which the `predicate` - * returns true. - * - * Note: `predicate` will be called for each entry in reverse. - */ - findLastEntry( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown, - notSetValue?: V - ): [K, V] | undefined; - - /** - * Returns the key for which the `predicate` returns true. - */ - findKey( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown - ): K | undefined; - - /** - * Returns the last key for which the `predicate` returns true. - * - * Note: `predicate` will be called for each entry in reverse. - */ - findLastKey( - predicate: (value: V, key: K, iter: this) => boolean, - context?: unknown - ): K | undefined; - - /** - * Returns the key associated with the search value, or undefined. - */ - keyOf(searchValue: V): K | undefined; - - /** - * Returns the last key associated with the search value, or undefined. - */ - lastKeyOf(searchValue: V): K | undefined; - - /** - * Returns the maximum value in this collection. If any values are - * comparatively equivalent, the first one found will be returned. - * - * The `comparator` is used in the same way as `Collection#sort`. If it is not - * provided, the default comparator is `>`. - * - * When two values are considered equivalent, the first encountered will be - * returned. Otherwise, `max` will operate independent of the order of input - * as long as the comparator is commutative. The default comparator `>` is - * commutative *only* when types do not differ. - * - * If `comparator` returns 0 and either value is NaN, undefined, or null, - * that value will be returned. - */ - max(comparator?: Comparator): V | undefined; - - /** - * Like `max`, but also accepts a `comparatorValueMapper` which allows for - * comparing by more sophisticated means: - * - * - * ```js - * const { List, } = require('immutable'); - * const l = List([ - * { name: 'Bob', avgHit: 1 }, - * { name: 'Max', avgHit: 3 }, - * { name: 'Lili', avgHit: 2 } , - * ]); - * l.maxBy(i => i.avgHit); // will output { name: 'Max', avgHit: 3 } - * ``` - */ - maxBy( - comparatorValueMapper: (value: V, key: K, iter: this) => C, - comparator?: Comparator - ): V | undefined; - - /** - * Returns the minimum value in this collection. If any values are - * comparatively equivalent, the first one found will be returned. - * - * The `comparator` is used in the same way as `Collection#sort`. If it is not - * provided, the default comparator is `<`. - * - * When two values are considered equivalent, the first encountered will be - * returned. Otherwise, `min` will operate independent of the order of input - * as long as the comparator is commutative. The default comparator `<` is - * commutative *only* when types do not differ. - * - * If `comparator` returns 0 and either value is NaN, undefined, or null, - * that value will be returned. - */ - min(comparator?: Comparator): V | undefined; - - /** - * Like `min`, but also accepts a `comparatorValueMapper` which allows for - * comparing by more sophisticated means: - * - * - * ```js - * const { List, } = require('immutable'); - * const l = List([ - * { name: 'Bob', avgHit: 1 }, - * { name: 'Max', avgHit: 3 }, - * { name: 'Lili', avgHit: 2 } , - * ]); - * l.minBy(i => i.avgHit); // will output { name: 'Bob', avgHit: 1 } - * ``` - */ - minBy( - comparatorValueMapper: (value: V, key: K, iter: this) => C, - comparator?: Comparator - ): V | undefined; - - // Comparison - - /** - * True if `iter` includes every value in this Collection. - */ - isSubset(iter: Iterable): boolean; - - /** - * True if this Collection includes every value in `iter`. - */ - isSuperset(iter: Iterable): boolean; - } - - /** - * The interface to fulfill to qualify as a Value Object. - */ - interface ValueObject { - /** - * True if this and the other Collection have value equality, as defined - * by `Immutable.is()`. - * - * Note: This is equivalent to `Immutable.is(this, other)`, but provided to - * allow for chained expressions. - */ - equals(other: unknown): boolean; - - /** - * Computes and returns the hashed identity for this Collection. - * - * The `hashCode` of a Collection is used to determine potential equality, - * and is used when adding this to a `Set` or as a key in a `Map`, enabling - * lookup via a different instance. - * - * - * ```js - * const { List, Set } = require('immutable'); - * const a = List([ 1, 2, 3 ]); - * const b = List([ 1, 2, 3 ]); - * assert.notStrictEqual(a, b); // different instances - * const set = Set([ a ]); - * assert.equal(set.has(b), true); - * ``` - * - * Note: hashCode() MUST return a Uint32 number. The easiest way to - * guarantee this is to return `myHash | 0` from a custom implementation. - * - * If two values have the same `hashCode`, they are [not guaranteed - * to be equal][Hash Collision]. If two values have different `hashCode`s, - * they must not be equal. - * - * Note: `hashCode()` is not guaranteed to always be called before - * `equals()`. Most but not all Immutable.js collections use hash codes to - * organize their internal data structures, while all Immutable.js - * collections use equality during lookups. - * - * [Hash Collision]: https://en.wikipedia.org/wiki/Collision_(computer_science) - */ - hashCode(): number; - } - - /** - * Deeply converts plain JS objects and arrays to Immutable Maps and Lists. - * - * `fromJS` will convert Arrays and [array-like objects][2] to a List, and - * plain objects (without a custom prototype) to a Map. [Iterable objects][3] - * may be converted to List, Map, or Set. - * - * If a `reviver` is optionally provided, it will be called with every - * collection as a Seq (beginning with the most nested collections - * and proceeding to the top-level collection itself), along with the key - * referring to each collection and the parent JS object provided as `this`. - * For the top level, object, the key will be `""`. This `reviver` is expected - * to return a new Immutable Collection, allowing for custom conversions from - * deep JS objects. Finally, a `path` is provided which is the sequence of - * keys to this value from the starting value. - * - * `reviver` acts similarly to the [same parameter in `JSON.parse`][1]. - * - * If `reviver` is not provided, the default behavior will convert Objects - * into Maps and Arrays into Lists like so: - * - * - * ```js - * const { fromJS, isKeyed } = require('immutable') - * function (key, value) { - * return isKeyed(value) ? value.toMap() : value.toList() - * } - * ``` - * - * Accordingly, this example converts native JS data to OrderedMap and List: - * - * - * ```js - * const { fromJS, isKeyed } = require('immutable') - * fromJS({ a: {b: [10, 20, 30]}, c: 40}, function (key, value, path) { - * console.log(key, value, path) - * return isKeyed(value) ? value.toOrderedMap() : value.toList() - * }) - * - * > "b", [ 10, 20, 30 ], [ "a", "b" ] - * > "a", {b: [10, 20, 30]}, [ "a" ] - * > "", {a: {b: [10, 20, 30]}, c: 40}, [] - * ``` - * - * Keep in mind, when using JS objects to construct Immutable Maps, that - * JavaScript Object properties are always strings, even if written in a - * quote-less shorthand, while Immutable Maps accept keys of any type. - * - * - * ```js - * const { Map } = require('immutable') - * let obj = { 1: "one" }; - * Object.keys(obj); // [ "1" ] - * assert.equal(obj["1"], obj[1]); // "one" === "one" - * - * let map = Map(obj); - * assert.notEqual(map.get("1"), map.get(1)); // "one" !== undefined - * ``` - * - * Property access for JavaScript Objects first converts the key to a string, - * but since Immutable Map keys can be of any type the argument to `get()` is - * not altered. - * - * [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter - * "Using the reviver parameter" - * [2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects - * "Working with array-like objects" - * [3]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol - * "The iterable protocol" - */ - function fromJS( - jsValue: JSValue, - reviver?: undefined - ): FromJS; - function fromJS( - jsValue: unknown, - reviver?: ( - key: string | number, - sequence: Collection.Keyed | Collection.Indexed, - path?: Array - ) => unknown - ): Collection; - - type FromJS = JSValue extends FromJSNoTransform - ? JSValue - : JSValue extends Array - ? FromJSArray - : JSValue extends {} - ? FromJSObject - : any; - - type FromJSNoTransform = - | Collection - | number - | string - | null - | undefined; - - type FromJSArray = JSValue extends Array - ? List> - : never; - - type FromJSObject = JSValue extends {} - ? Map> - : never; - - /** - * Value equality check with semantics similar to `Object.is`, but treats - * Immutable `Collection`s as values, equal if the second `Collection` includes - * equivalent values. - * - * It's used throughout Immutable when checking for equality, including `Map` - * key equality and `Set` membership. - * - * - * ```js - * const { Map, is } = require('immutable') - * const map1 = Map({ a: 1, b: 1, c: 1 }) - * const map2 = Map({ a: 1, b: 1, c: 1 }) - * assert.equal(map1 !== map2, true) - * assert.equal(Object.is(map1, map2), false) - * assert.equal(is(map1, map2), true) - * ``` - * - * `is()` compares primitive types like strings and numbers, Immutable.js - * collections like `Map` and `List`, but also any custom object which - * implements `ValueObject` by providing `equals()` and `hashCode()` methods. - * - * Note: Unlike `Object.is`, `Immutable.is` assumes `0` and `-0` are the same - * value, matching the behavior of ES6 Map key equality. - */ - function is(first: unknown, second: unknown): boolean; - - /** - * The `hash()` function is an important part of how Immutable determines if - * two values are equivalent and is used to determine how to store those - * values. Provided with any value, `hash()` will return a 31-bit integer. - * - * When designing Objects which may be equal, it's important that when a - * `.equals()` method returns true, that both values `.hashCode()` method - * return the same value. `hash()` may be used to produce those values. - * - * For non-Immutable Objects that do not provide a `.hashCode()` functions - * (including plain Objects, plain Arrays, Date objects, etc), a unique hash - * value will be created for each *instance*. That is, the create hash - * represents referential equality, and not value equality for Objects. This - * ensures that if that Object is mutated over time that its hash code will - * remain consistent, allowing Objects to be used as keys and values in - * Immutable.js collections. - * - * Note that `hash()` attempts to balance between speed and avoiding - * collisions, however it makes no attempt to produce secure hashes. - * - * *New in Version 4.0* - */ - function hash(value: unknown): number; - - /** - * True if `maybeImmutable` is an Immutable Collection or Record. - * - * Note: Still returns true even if the collections is within a `withMutations()`. - * - * - * ```js - * const { isImmutable, Map, List, Stack } = require('immutable'); - * isImmutable([]); // false - * isImmutable({}); // false - * isImmutable(Map()); // true - * isImmutable(List()); // true - * isImmutable(Stack()); // true - * isImmutable(Map().asMutable()); // true - * ``` - */ - function isImmutable( - maybeImmutable: unknown - ): maybeImmutable is Collection; - - /** - * True if `maybeCollection` is a Collection, or any of its subclasses. - * - * - * ```js - * const { isCollection, Map, List, Stack } = require('immutable'); - * isCollection([]); // false - * isCollection({}); // false - * isCollection(Map()); // true - * isCollection(List()); // true - * isCollection(Stack()); // true - * ``` - */ - function isCollection( - maybeCollection: unknown - ): maybeCollection is Collection; - - /** - * True if `maybeKeyed` is a Collection.Keyed, or any of its subclasses. - * - * - * ```js - * const { isKeyed, Map, List, Stack } = require('immutable'); - * isKeyed([]); // false - * isKeyed({}); // false - * isKeyed(Map()); // true - * isKeyed(List()); // false - * isKeyed(Stack()); // false - * ``` - */ - function isKeyed( - maybeKeyed: unknown - ): maybeKeyed is Collection.Keyed; - - /** - * True if `maybeIndexed` is a Collection.Indexed, or any of its subclasses. - * - * - * ```js - * const { isIndexed, Map, List, Stack, Set } = require('immutable'); - * isIndexed([]); // false - * isIndexed({}); // false - * isIndexed(Map()); // false - * isIndexed(List()); // true - * isIndexed(Stack()); // true - * isIndexed(Set()); // false - * ``` - */ - function isIndexed( - maybeIndexed: unknown - ): maybeIndexed is Collection.Indexed; - - /** - * True if `maybeAssociative` is either a Keyed or Indexed Collection. - * - * - * ```js - * const { isAssociative, Map, List, Stack, Set } = require('immutable'); - * isAssociative([]); // false - * isAssociative({}); // false - * isAssociative(Map()); // true - * isAssociative(List()); // true - * isAssociative(Stack()); // true - * isAssociative(Set()); // false - * ``` - */ - function isAssociative( - maybeAssociative: unknown - ): maybeAssociative is - | Collection.Keyed - | Collection.Indexed; - - /** - * True if `maybeOrdered` is a Collection where iteration order is well - * defined. True for Collection.Indexed as well as OrderedMap and OrderedSet. - * - * - * ```js - * const { isOrdered, Map, OrderedMap, List, Set } = require('immutable'); - * isOrdered([]); // false - * isOrdered({}); // false - * isOrdered(Map()); // false - * isOrdered(OrderedMap()); // true - * isOrdered(List()); // true - * isOrdered(Set()); // false - * ``` - */ - function isOrdered(maybeOrdered: unknown): boolean; - - /** - * True if `maybeValue` is a JavaScript Object which has *both* `equals()` - * and `hashCode()` methods. - * - * Any two instances of *value objects* can be compared for value equality with - * `Immutable.is()` and can be used as keys in a `Map` or members in a `Set`. - */ - function isValueObject(maybeValue: unknown): maybeValue is ValueObject; - - /** - * True if `maybeSeq` is a Seq. - */ - function isSeq( - maybeSeq: unknown - ): maybeSeq is - | Seq.Indexed - | Seq.Keyed - | Seq.Set; - - /** - * True if `maybeList` is a List. - */ - function isList(maybeList: unknown): maybeList is List; - - /** - * True if `maybeMap` is a Map. - * - * Also true for OrderedMaps. - */ - function isMap(maybeMap: unknown): maybeMap is Map; - - /** - * True if `maybeOrderedMap` is an OrderedMap. - */ - function isOrderedMap( - maybeOrderedMap: unknown - ): maybeOrderedMap is OrderedMap; - - /** - * True if `maybeStack` is a Stack. - */ - function isStack(maybeStack: unknown): maybeStack is Stack; - - /** - * True if `maybeSet` is a Set. - * - * Also true for OrderedSets. - */ - function isSet(maybeSet: unknown): maybeSet is Set; - - /** - * True if `maybeOrderedSet` is an OrderedSet. - */ - function isOrderedSet( - maybeOrderedSet: unknown - ): maybeOrderedSet is OrderedSet; - - /** - * True if `maybeRecord` is a Record. - */ - function isRecord(maybeRecord: unknown): maybeRecord is Record<{}>; - - /** - * Returns the value within the provided collection associated with the - * provided key, or notSetValue if the key is not defined in the collection. - * - * A functional alternative to `collection.get(key)` which will also work on - * plain Objects and Arrays as an alternative for `collection[key]`. - * - * - * ```js - * const { get } = require('immutable') - * get([ 'dog', 'frog', 'cat' ], 2) // 'frog' - * get({ x: 123, y: 456 }, 'x') // 123 - * get({ x: 123, y: 456 }, 'z', 'ifNotSet') // 'ifNotSet' - * ``` - */ - function get(collection: Collection, key: K): V | undefined; - function get( - collection: Collection, - key: K, - notSetValue: NSV - ): V | NSV; - function get( - record: Record, - key: K, - notSetValue: unknown - ): TProps[K]; - function get(collection: Array, key: number): V | undefined; - function get( - collection: Array, - key: number, - notSetValue: NSV - ): V | NSV; - function get( - object: C, - key: K, - notSetValue: unknown - ): C[K]; - function get(collection: { [key: string]: V }, key: string): V | undefined; - function get( - collection: { [key: string]: V }, - key: string, - notSetValue: NSV - ): V | NSV; - - /** - * Returns true if the key is defined in the provided collection. - * - * A functional alternative to `collection.has(key)` which will also work with - * plain Objects and Arrays as an alternative for - * `collection.hasOwnProperty(key)`. - * - * - * ```js - * const { has } = require('immutable') - * has([ 'dog', 'frog', 'cat' ], 2) // true - * has([ 'dog', 'frog', 'cat' ], 5) // false - * has({ x: 123, y: 456 }, 'x') // true - * has({ x: 123, y: 456 }, 'z') // false - * ``` - */ - function has(collection: object, key: unknown): boolean; - - /** - * Returns a copy of the collection with the value at key removed. - * - * A functional alternative to `collection.remove(key)` which will also work - * with plain Objects and Arrays as an alternative for - * `delete collectionCopy[key]`. - * - * - * ```js - * const { remove } = require('immutable') - * const originalArray = [ 'dog', 'frog', 'cat' ] - * remove(originalArray, 1) // [ 'dog', 'cat' ] - * console.log(originalArray) // [ 'dog', 'frog', 'cat' ] - * const originalObject = { x: 123, y: 456 } - * remove(originalObject, 'x') // { y: 456 } - * console.log(originalObject) // { x: 123, y: 456 } - * ``` - */ - function remove>( - collection: C, - key: K - ): C; - function remove< - TProps extends object, - C extends Record, - K extends keyof TProps - >(collection: C, key: K): C; - function remove>(collection: C, key: number): C; - function remove(collection: C, key: K): C; - function remove( - collection: C, - key: K - ): C; - - /** - * Returns a copy of the collection with the value at key set to the provided - * value. - * - * A functional alternative to `collection.set(key, value)` which will also - * work with plain Objects and Arrays as an alternative for - * `collectionCopy[key] = value`. - * - * - * ```js - * const { set } = require('immutable') - * const originalArray = [ 'dog', 'frog', 'cat' ] - * set(originalArray, 1, 'cow') // [ 'dog', 'cow', 'cat' ] - * console.log(originalArray) // [ 'dog', 'frog', 'cat' ] - * const originalObject = { x: 123, y: 456 } - * set(originalObject, 'x', 789) // { x: 789, y: 456 } - * console.log(originalObject) // { x: 123, y: 456 } - * ``` - */ - function set>( - collection: C, - key: K, - value: V - ): C; - function set< - TProps extends object, - C extends Record, - K extends keyof TProps - >(record: C, key: K, value: TProps[K]): C; - function set>(collection: C, key: number, value: V): C; - function set(object: C, key: K, value: C[K]): C; - function set( - collection: C, - key: string, - value: V - ): C; - - /** - * Returns a copy of the collection with the value at key set to the result of - * providing the existing value to the updating function. - * - * A functional alternative to `collection.update(key, fn)` which will also - * work with plain Objects and Arrays as an alternative for - * `collectionCopy[key] = fn(collection[key])`. - * - * - * ```js - * const { update } = require('immutable') - * const originalArray = [ 'dog', 'frog', 'cat' ] - * update(originalArray, 1, val => val.toUpperCase()) // [ 'dog', 'FROG', 'cat' ] - * console.log(originalArray) // [ 'dog', 'frog', 'cat' ] - * const originalObject = { x: 123, y: 456 } - * update(originalObject, 'x', val => val * 6) // { x: 738, y: 456 } - * console.log(originalObject) // { x: 123, y: 456 } - * ``` - */ - function update>( - collection: C, - key: K, - updater: (value: V | undefined) => V | undefined - ): C; - function update, NSV>( - collection: C, - key: K, - notSetValue: NSV, - updater: (value: V | NSV) => V - ): C; - function update< - TProps extends object, - C extends Record, - K extends keyof TProps - >(record: C, key: K, updater: (value: TProps[K]) => TProps[K]): C; - function update< - TProps extends object, - C extends Record, - K extends keyof TProps, - NSV - >( - record: C, - key: K, - notSetValue: NSV, - updater: (value: TProps[K] | NSV) => TProps[K] - ): C; - function update( - collection: Array, - key: number, - updater: (value: V | undefined) => V | undefined - ): Array; - function update( - collection: Array, - key: number, - notSetValue: NSV, - updater: (value: V | NSV) => V - ): Array; - function update( - object: C, - key: K, - updater: (value: C[K]) => C[K] - ): C; - function update( - object: C, - key: K, - notSetValue: NSV, - updater: (value: C[K] | NSV) => C[K] - ): C; - function update( - collection: C, - key: K, - updater: (value: V) => V - ): { [key: string]: V }; - function update( - collection: C, - key: K, - notSetValue: NSV, - updater: (value: V | NSV) => V - ): { [key: string]: V }; - - /** - * Returns the value at the provided key path starting at the provided - * collection, or notSetValue if the key path is not defined. - * - * A functional alternative to `collection.getIn(keypath)` which will also - * work with plain Objects and Arrays. - * - * - * ```js - * const { getIn } = require('immutable') - * getIn({ x: { y: { z: 123 }}}, ['x', 'y', 'z']) // 123 - * getIn({ x: { y: { z: 123 }}}, ['x', 'q', 'p'], 'ifNotSet') // 'ifNotSet' - * ``` - */ - function getIn( - collection: unknown, - keyPath: Iterable, - notSetValue?: unknown - ): unknown; - - /** - * Returns true if the key path is defined in the provided collection. - * - * A functional alternative to `collection.hasIn(keypath)` which will also - * work with plain Objects and Arrays. - * - * - * ```js - * const { hasIn } = require('immutable') - * hasIn({ x: { y: { z: 123 }}}, ['x', 'y', 'z']) // true - * hasIn({ x: { y: { z: 123 }}}, ['x', 'q', 'p']) // false - * ``` - */ - function hasIn(collection: unknown, keyPath: Iterable): boolean; - - /** - * Returns a copy of the collection with the value at the key path removed. - * - * A functional alternative to `collection.removeIn(keypath)` which will also - * work with plain Objects and Arrays. - * - * - * ```js - * const { removeIn } = require('immutable') - * const original = { x: { y: { z: 123 }}} - * removeIn(original, ['x', 'y', 'z']) // { x: { y: {}}} - * console.log(original) // { x: { y: { z: 123 }}} - * ``` - */ - function removeIn(collection: C, keyPath: Iterable): C; - - /** - * Returns a copy of the collection with the value at the key path set to the - * provided value. - * - * A functional alternative to `collection.setIn(keypath)` which will also - * work with plain Objects and Arrays. - * - * - * ```js - * const { setIn } = require('immutable') - * const original = { x: { y: { z: 123 }}} - * setIn(original, ['x', 'y', 'z'], 456) // { x: { y: { z: 456 }}} - * console.log(original) // { x: { y: { z: 123 }}} - * ``` - */ - function setIn( - collection: C, - keyPath: Iterable, - value: unknown - ): C; - - /** - * Returns a copy of the collection with the value at key path set to the - * result of providing the existing value to the updating function. - * - * A functional alternative to `collection.updateIn(keypath)` which will also - * work with plain Objects and Arrays. - * - * - * ```js - * const { updateIn } = require('immutable') - * const original = { x: { y: { z: 123 }}} - * updateIn(original, ['x', 'y', 'z'], val => val * 6) // { x: { y: { z: 738 }}} - * console.log(original) // { x: { y: { z: 123 }}} - * ``` - */ - function updateIn( - collection: C, - keyPath: Iterable, - updater: (value: unknown) => unknown - ): C; - function updateIn( - collection: C, - keyPath: Iterable, - notSetValue: unknown, - updater: (value: unknown) => unknown - ): C; - - /** - * Returns a copy of the collection with the remaining collections merged in. - * - * A functional alternative to `collection.merge()` which will also work with - * plain Objects and Arrays. - * - * - * ```js - * const { merge } = require('immutable') - * const original = { x: 123, y: 456 } - * merge(original, { y: 789, z: 'abc' }) // { x: 123, y: 789, z: 'abc' } - * console.log(original) // { x: 123, y: 456 } - * ``` - */ - function merge( - collection: C, - ...collections: Array< - | Iterable - | Iterable<[unknown, unknown]> - | { [key: string]: unknown } - > - ): C; - - /** - * Returns a copy of the collection with the remaining collections merged in, - * calling the `merger` function whenever an existing value is encountered. - * - * A functional alternative to `collection.mergeWith()` which will also work - * with plain Objects and Arrays. - * - * - * ```js - * const { mergeWith } = require('immutable') - * const original = { x: 123, y: 456 } - * mergeWith( - * (oldVal, newVal) => oldVal + newVal, - * original, - * { y: 789, z: 'abc' } - * ) // { x: 123, y: 1245, z: 'abc' } - * console.log(original) // { x: 123, y: 456 } - * ``` - */ - function mergeWith( - merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown, - collection: C, - ...collections: Array< - | Iterable - | Iterable<[unknown, unknown]> - | { [key: string]: unknown } - > - ): C; - - /** - * Like `merge()`, but when two compatible collections are encountered with - * the same key, it merges them as well, recursing deeply through the nested - * data. Two collections are considered to be compatible (and thus will be - * merged together) if they both fall into one of three categories: keyed - * (e.g., `Map`s, `Record`s, and objects), indexed (e.g., `List`s and - * arrays), or set-like (e.g., `Set`s). If they fall into separate - * categories, `mergeDeep` will replace the existing collection with the - * collection being merged in. This behavior can be customized by using - * `mergeDeepWith()`. - * - * Note: Indexed and set-like collections are merged using - * `concat()`/`union()` and therefore do not recurse. - * - * A functional alternative to `collection.mergeDeep()` which will also work - * with plain Objects and Arrays. - * - * - * ```js - * const { mergeDeep } = require('immutable') - * const original = { x: { y: 123 }} - * mergeDeep(original, { x: { z: 456 }}) // { x: { y: 123, z: 456 }} - * console.log(original) // { x: { y: 123 }} - * ``` - */ - function mergeDeep( - collection: C, - ...collections: Array< - | Iterable - | Iterable<[unknown, unknown]> - | { [key: string]: unknown } - > - ): C; - - /** - * Like `mergeDeep()`, but when two non-collections or incompatible - * collections are encountered at the same key, it uses the `merger` function - * to determine the resulting value. Collections are considered incompatible - * if they fall into separate categories between keyed, indexed, and set-like. - * - * A functional alternative to `collection.mergeDeepWith()` which will also - * work with plain Objects and Arrays. - * - * - * ```js - * const { mergeDeepWith } = require('immutable') - * const original = { x: { y: 123 }} - * mergeDeepWith( - * (oldVal, newVal) => oldVal + newVal, - * original, - * { x: { y: 456 }} - * ) // { x: { y: 579 }} - * console.log(original) // { x: { y: 123 }} - * ``` - */ - function mergeDeepWith( - merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown, - collection: C, - ...collections: Array< - | Iterable - | Iterable<[unknown, unknown]> - | { [key: string]: unknown } - > - ): C; -} - -/** - * Defines the main export of the immutable module to be the Immutable namespace - * This supports many common module import patterns: - * - * const Immutable = require("immutable"); - * const { List } = require("immutable"); - * import Immutable from "immutable"; - * import * as Immutable from "immutable"; - * import { List } from "immutable"; - * - */ -export = Immutable; - -/** - * A global "Immutable" namespace used by UMD modules which allows the use of - * the full Immutable API. - * - * If using Immutable as an imported module, prefer using: - * - * import Immutable from 'immutable' - * - */ -export as namespace Immutable; diff --git a/web/static/node_modules/immutable/dist/immutable.es.js b/web/static/node_modules/immutable/dist/immutable.es.js deleted file mode 100644 index 3a88af83..00000000 --- a/web/static/node_modules/immutable/dist/immutable.es.js +++ /dev/null @@ -1,5936 +0,0 @@ -/** - * @license - * MIT License - * - * Copyright (c) 2014-present, Lee Byron and other contributors. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -// Used for setting prototype methods that IE8 chokes on. -var DELETE = 'delete'; - -// Constants describing the size of trie nodes. -var SHIFT = 5; // Resulted in best performance after ______? -var SIZE = 1 << SHIFT; -var MASK = SIZE - 1; - -// A consistent shared value representing "not set" which equals nothing other -// than itself, and nothing that could be provided externally. -var NOT_SET = {}; - -// Boolean references, Rough equivalent of `bool &`. -function MakeRef() { - return { value: false }; -} - -function SetRef(ref) { - if (ref) { - ref.value = true; - } -} - -// A function which returns a value representing an "owner" for transient writes -// to tries. The return value will only ever equal itself, and will not equal -// the return of any subsequent call of this function. -function OwnerID() {} - -function ensureSize(iter) { - if (iter.size === undefined) { - iter.size = iter.__iterate(returnTrue); - } - return iter.size; -} - -function wrapIndex(iter, index) { - // This implements "is array index" which the ECMAString spec defines as: - // - // A String property name P is an array index if and only if - // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal - // to 2^32−1. - // - // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects - if (typeof index !== 'number') { - var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32 - if ('' + uint32Index !== index || uint32Index === 4294967295) { - return NaN; - } - index = uint32Index; - } - return index < 0 ? ensureSize(iter) + index : index; -} - -function returnTrue() { - return true; -} - -function wholeSlice(begin, end, size) { - return ( - ((begin === 0 && !isNeg(begin)) || - (size !== undefined && begin <= -size)) && - (end === undefined || (size !== undefined && end >= size)) - ); -} - -function resolveBegin(begin, size) { - return resolveIndex(begin, size, 0); -} - -function resolveEnd(end, size) { - return resolveIndex(end, size, size); -} - -function resolveIndex(index, size, defaultIndex) { - // Sanitize indices using this shorthand for ToInt32(argument) - // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 - return index === undefined - ? defaultIndex - : isNeg(index) - ? size === Infinity - ? size - : Math.max(0, size + index) | 0 - : size === undefined || size === index - ? index - : Math.min(size, index) | 0; -} - -function isNeg(value) { - // Account for -0 which is negative, but not less than 0. - return value < 0 || (value === 0 && 1 / value === -Infinity); -} - -// Note: value is unchanged to not break immutable-devtools. -var IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@'; - -function isCollection(maybeCollection) { - return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]); -} - -var IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@'; - -function isKeyed(maybeKeyed) { - return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]); -} - -var IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@'; - -function isIndexed(maybeIndexed) { - return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]); -} - -function isAssociative(maybeAssociative) { - return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); -} - -var Collection = function Collection(value) { - // eslint-disable-next-line no-constructor-return - return isCollection(value) ? value : Seq(value); -}; - -var KeyedCollection = /*@__PURE__*/(function (Collection) { - function KeyedCollection(value) { - // eslint-disable-next-line no-constructor-return - return isKeyed(value) ? value : KeyedSeq(value); - } - - if ( Collection ) KeyedCollection.__proto__ = Collection; - KeyedCollection.prototype = Object.create( Collection && Collection.prototype ); - KeyedCollection.prototype.constructor = KeyedCollection; - - return KeyedCollection; -}(Collection)); - -var IndexedCollection = /*@__PURE__*/(function (Collection) { - function IndexedCollection(value) { - // eslint-disable-next-line no-constructor-return - return isIndexed(value) ? value : IndexedSeq(value); - } - - if ( Collection ) IndexedCollection.__proto__ = Collection; - IndexedCollection.prototype = Object.create( Collection && Collection.prototype ); - IndexedCollection.prototype.constructor = IndexedCollection; - - return IndexedCollection; -}(Collection)); - -var SetCollection = /*@__PURE__*/(function (Collection) { - function SetCollection(value) { - // eslint-disable-next-line no-constructor-return - return isCollection(value) && !isAssociative(value) ? value : SetSeq(value); - } - - if ( Collection ) SetCollection.__proto__ = Collection; - SetCollection.prototype = Object.create( Collection && Collection.prototype ); - SetCollection.prototype.constructor = SetCollection; - - return SetCollection; -}(Collection)); - -Collection.Keyed = KeyedCollection; -Collection.Indexed = IndexedCollection; -Collection.Set = SetCollection; - -var IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@'; - -function isSeq(maybeSeq) { - return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]); -} - -var IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@'; - -function isRecord(maybeRecord) { - return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]); -} - -function isImmutable(maybeImmutable) { - return isCollection(maybeImmutable) || isRecord(maybeImmutable); -} - -var IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@'; - -function isOrdered(maybeOrdered) { - return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]); -} - -var ITERATE_KEYS = 0; -var ITERATE_VALUES = 1; -var ITERATE_ENTRIES = 2; - -var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; -var FAUX_ITERATOR_SYMBOL = '@@iterator'; - -var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; - -var Iterator = function Iterator(next) { - this.next = next; -}; - -Iterator.prototype.toString = function toString () { - return '[Iterator]'; -}; - -Iterator.KEYS = ITERATE_KEYS; -Iterator.VALUES = ITERATE_VALUES; -Iterator.ENTRIES = ITERATE_ENTRIES; - -Iterator.prototype.inspect = Iterator.prototype.toSource = function () { - return this.toString(); -}; -Iterator.prototype[ITERATOR_SYMBOL] = function () { - return this; -}; - -function iteratorValue(type, k, v, iteratorResult) { - var value = type === 0 ? k : type === 1 ? v : [k, v]; - iteratorResult - ? (iteratorResult.value = value) - : (iteratorResult = { - value: value, - done: false, - }); - return iteratorResult; -} - -function iteratorDone() { - return { value: undefined, done: true }; -} - -function hasIterator(maybeIterable) { - if (Array.isArray(maybeIterable)) { - // IE11 trick as it does not support `Symbol.iterator` - return true; - } - - return !!getIteratorFn(maybeIterable); -} - -function isIterator(maybeIterator) { - return maybeIterator && typeof maybeIterator.next === 'function'; -} - -function getIterator(iterable) { - var iteratorFn = getIteratorFn(iterable); - return iteratorFn && iteratorFn.call(iterable); -} - -function getIteratorFn(iterable) { - var iteratorFn = - iterable && - ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || - iterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; - } -} - -function isEntriesIterable(maybeIterable) { - var iteratorFn = getIteratorFn(maybeIterable); - return iteratorFn && iteratorFn === maybeIterable.entries; -} - -function isKeysIterable(maybeIterable) { - var iteratorFn = getIteratorFn(maybeIterable); - return iteratorFn && iteratorFn === maybeIterable.keys; -} - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function isArrayLike(value) { - if (Array.isArray(value) || typeof value === 'string') { - return true; - } - - return ( - value && - typeof value === 'object' && - Number.isInteger(value.length) && - value.length >= 0 && - (value.length === 0 - ? // Only {length: 0} is considered Array-like. - Object.keys(value).length === 1 - : // An object is only Array-like if it has a property where the last value - // in the array-like may be found (which could be undefined). - value.hasOwnProperty(value.length - 1)) - ); -} - -var Seq = /*@__PURE__*/(function (Collection) { - function Seq(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptySequence() - : isImmutable(value) - ? value.toSeq() - : seqFromValue(value); - } - - if ( Collection ) Seq.__proto__ = Collection; - Seq.prototype = Object.create( Collection && Collection.prototype ); - Seq.prototype.constructor = Seq; - - Seq.prototype.toSeq = function toSeq () { - return this; - }; - - Seq.prototype.toString = function toString () { - return this.__toString('Seq {', '}'); - }; - - Seq.prototype.cacheResult = function cacheResult () { - if (!this._cache && this.__iterateUncached) { - this._cache = this.entrySeq().toArray(); - this.size = this._cache.length; - } - return this; - }; - - // abstract __iterateUncached(fn, reverse) - - Seq.prototype.__iterate = function __iterate (fn, reverse) { - var cache = this._cache; - if (cache) { - var size = cache.length; - var i = 0; - while (i !== size) { - var entry = cache[reverse ? size - ++i : i++]; - if (fn(entry[1], entry[0], this) === false) { - break; - } - } - return i; - } - return this.__iterateUncached(fn, reverse); - }; - - // abstract __iteratorUncached(type, reverse) - - Seq.prototype.__iterator = function __iterator (type, reverse) { - var cache = this._cache; - if (cache) { - var size = cache.length; - var i = 0; - return new Iterator(function () { - if (i === size) { - return iteratorDone(); - } - var entry = cache[reverse ? size - ++i : i++]; - return iteratorValue(type, entry[0], entry[1]); - }); - } - return this.__iteratorUncached(type, reverse); - }; - - return Seq; -}(Collection)); - -var KeyedSeq = /*@__PURE__*/(function (Seq) { - function KeyedSeq(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptySequence().toKeyedSeq() - : isCollection(value) - ? isKeyed(value) - ? value.toSeq() - : value.fromEntrySeq() - : isRecord(value) - ? value.toSeq() - : keyedSeqFromValue(value); - } - - if ( Seq ) KeyedSeq.__proto__ = Seq; - KeyedSeq.prototype = Object.create( Seq && Seq.prototype ); - KeyedSeq.prototype.constructor = KeyedSeq; - - KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq () { - return this; - }; - - return KeyedSeq; -}(Seq)); - -var IndexedSeq = /*@__PURE__*/(function (Seq) { - function IndexedSeq(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptySequence() - : isCollection(value) - ? isKeyed(value) - ? value.entrySeq() - : value.toIndexedSeq() - : isRecord(value) - ? value.toSeq().entrySeq() - : indexedSeqFromValue(value); - } - - if ( Seq ) IndexedSeq.__proto__ = Seq; - IndexedSeq.prototype = Object.create( Seq && Seq.prototype ); - IndexedSeq.prototype.constructor = IndexedSeq; - - IndexedSeq.of = function of (/*...values*/) { - return IndexedSeq(arguments); - }; - - IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq () { - return this; - }; - - IndexedSeq.prototype.toString = function toString () { - return this.__toString('Seq [', ']'); - }; - - return IndexedSeq; -}(Seq)); - -var SetSeq = /*@__PURE__*/(function (Seq) { - function SetSeq(value) { - // eslint-disable-next-line no-constructor-return - return ( - isCollection(value) && !isAssociative(value) ? value : IndexedSeq(value) - ).toSetSeq(); - } - - if ( Seq ) SetSeq.__proto__ = Seq; - SetSeq.prototype = Object.create( Seq && Seq.prototype ); - SetSeq.prototype.constructor = SetSeq; - - SetSeq.of = function of (/*...values*/) { - return SetSeq(arguments); - }; - - SetSeq.prototype.toSetSeq = function toSetSeq () { - return this; - }; - - return SetSeq; -}(Seq)); - -Seq.isSeq = isSeq; -Seq.Keyed = KeyedSeq; -Seq.Set = SetSeq; -Seq.Indexed = IndexedSeq; - -Seq.prototype[IS_SEQ_SYMBOL] = true; - -// #pragma Root Sequences - -var ArraySeq = /*@__PURE__*/(function (IndexedSeq) { - function ArraySeq(array) { - this._array = array; - this.size = array.length; - } - - if ( IndexedSeq ) ArraySeq.__proto__ = IndexedSeq; - ArraySeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); - ArraySeq.prototype.constructor = ArraySeq; - - ArraySeq.prototype.get = function get (index, notSetValue) { - return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; - }; - - ArraySeq.prototype.__iterate = function __iterate (fn, reverse) { - var array = this._array; - var size = array.length; - var i = 0; - while (i !== size) { - var ii = reverse ? size - ++i : i++; - if (fn(array[ii], ii, this) === false) { - break; - } - } - return i; - }; - - ArraySeq.prototype.__iterator = function __iterator (type, reverse) { - var array = this._array; - var size = array.length; - var i = 0; - return new Iterator(function () { - if (i === size) { - return iteratorDone(); - } - var ii = reverse ? size - ++i : i++; - return iteratorValue(type, ii, array[ii]); - }); - }; - - return ArraySeq; -}(IndexedSeq)); - -var ObjectSeq = /*@__PURE__*/(function (KeyedSeq) { - function ObjectSeq(object) { - var keys = Object.keys(object).concat( - Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [] - ); - this._object = object; - this._keys = keys; - this.size = keys.length; - } - - if ( KeyedSeq ) ObjectSeq.__proto__ = KeyedSeq; - ObjectSeq.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); - ObjectSeq.prototype.constructor = ObjectSeq; - - ObjectSeq.prototype.get = function get (key, notSetValue) { - if (notSetValue !== undefined && !this.has(key)) { - return notSetValue; - } - return this._object[key]; - }; - - ObjectSeq.prototype.has = function has (key) { - return hasOwnProperty.call(this._object, key); - }; - - ObjectSeq.prototype.__iterate = function __iterate (fn, reverse) { - var object = this._object; - var keys = this._keys; - var size = keys.length; - var i = 0; - while (i !== size) { - var key = keys[reverse ? size - ++i : i++]; - if (fn(object[key], key, this) === false) { - break; - } - } - return i; - }; - - ObjectSeq.prototype.__iterator = function __iterator (type, reverse) { - var object = this._object; - var keys = this._keys; - var size = keys.length; - var i = 0; - return new Iterator(function () { - if (i === size) { - return iteratorDone(); - } - var key = keys[reverse ? size - ++i : i++]; - return iteratorValue(type, key, object[key]); - }); - }; - - return ObjectSeq; -}(KeyedSeq)); -ObjectSeq.prototype[IS_ORDERED_SYMBOL] = true; - -var CollectionSeq = /*@__PURE__*/(function (IndexedSeq) { - function CollectionSeq(collection) { - this._collection = collection; - this.size = collection.length || collection.size; - } - - if ( IndexedSeq ) CollectionSeq.__proto__ = IndexedSeq; - CollectionSeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); - CollectionSeq.prototype.constructor = CollectionSeq; - - CollectionSeq.prototype.__iterateUncached = function __iterateUncached (fn, reverse) { - if (reverse) { - return this.cacheResult().__iterate(fn, reverse); - } - var collection = this._collection; - var iterator = getIterator(collection); - var iterations = 0; - if (isIterator(iterator)) { - var step; - while (!(step = iterator.next()).done) { - if (fn(step.value, iterations++, this) === false) { - break; - } - } - } - return iterations; - }; - - CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached (type, reverse) { - if (reverse) { - return this.cacheResult().__iterator(type, reverse); - } - var collection = this._collection; - var iterator = getIterator(collection); - if (!isIterator(iterator)) { - return new Iterator(iteratorDone); - } - var iterations = 0; - return new Iterator(function () { - var step = iterator.next(); - return step.done ? step : iteratorValue(type, iterations++, step.value); - }); - }; - - return CollectionSeq; -}(IndexedSeq)); - -// # pragma Helper functions - -var EMPTY_SEQ; - -function emptySequence() { - return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); -} - -function keyedSeqFromValue(value) { - var seq = maybeIndexedSeqFromValue(value); - if (seq) { - return seq.fromEntrySeq(); - } - if (typeof value === 'object') { - return new ObjectSeq(value); - } - throw new TypeError( - 'Expected Array or collection object of [k, v] entries, or keyed object: ' + - value - ); -} - -function indexedSeqFromValue(value) { - var seq = maybeIndexedSeqFromValue(value); - if (seq) { - return seq; - } - throw new TypeError( - 'Expected Array or collection object of values: ' + value - ); -} - -function seqFromValue(value) { - var seq = maybeIndexedSeqFromValue(value); - if (seq) { - return isEntriesIterable(value) - ? seq.fromEntrySeq() - : isKeysIterable(value) - ? seq.toSetSeq() - : seq; - } - if (typeof value === 'object') { - return new ObjectSeq(value); - } - throw new TypeError( - 'Expected Array or collection object of values, or keyed object: ' + value - ); -} - -function maybeIndexedSeqFromValue(value) { - return isArrayLike(value) - ? new ArraySeq(value) - : hasIterator(value) - ? new CollectionSeq(value) - : undefined; -} - -var IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@'; - -function isMap(maybeMap) { - return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]); -} - -function isOrderedMap(maybeOrderedMap) { - return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); -} - -function isValueObject(maybeValue) { - return Boolean( - maybeValue && - typeof maybeValue.equals === 'function' && - typeof maybeValue.hashCode === 'function' - ); -} - -/** - * An extension of the "same-value" algorithm as [described for use by ES6 Map - * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality) - * - * NaN is considered the same as NaN, however -0 and 0 are considered the same - * value, which is different from the algorithm described by - * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). - * - * This is extended further to allow Objects to describe the values they - * represent, by way of `valueOf` or `equals` (and `hashCode`). - * - * Note: because of this extension, the key equality of Immutable.Map and the - * value equality of Immutable.Set will differ from ES6 Map and Set. - * - * ### Defining custom values - * - * The easiest way to describe the value an object represents is by implementing - * `valueOf`. For example, `Date` represents a value by returning a unix - * timestamp for `valueOf`: - * - * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ... - * var date2 = new Date(1234567890000); - * date1.valueOf(); // 1234567890000 - * assert( date1 !== date2 ); - * assert( Immutable.is( date1, date2 ) ); - * - * Note: overriding `valueOf` may have other implications if you use this object - * where JavaScript expects a primitive, such as implicit string coercion. - * - * For more complex types, especially collections, implementing `valueOf` may - * not be performant. An alternative is to implement `equals` and `hashCode`. - * - * `equals` takes another object, presumably of similar type, and returns true - * if it is equal. Equality is symmetrical, so the same result should be - * returned if this and the argument are flipped. - * - * assert( a.equals(b) === b.equals(a) ); - * - * `hashCode` returns a 32bit integer number representing the object which will - * be used to determine how to store the value object in a Map or Set. You must - * provide both or neither methods, one must not exist without the other. - * - * Also, an important relationship between these methods must be upheld: if two - * values are equal, they *must* return the same hashCode. If the values are not - * equal, they might have the same hashCode; this is called a hash collision, - * and while undesirable for performance reasons, it is acceptable. - * - * if (a.equals(b)) { - * assert( a.hashCode() === b.hashCode() ); - * } - * - * All Immutable collections are Value Objects: they implement `equals()` - * and `hashCode()`. - */ -function is(valueA, valueB) { - if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { - return true; - } - if (!valueA || !valueB) { - return false; - } - if ( - typeof valueA.valueOf === 'function' && - typeof valueB.valueOf === 'function' - ) { - valueA = valueA.valueOf(); - valueB = valueB.valueOf(); - if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { - return true; - } - if (!valueA || !valueB) { - return false; - } - } - return !!( - isValueObject(valueA) && - isValueObject(valueB) && - valueA.equals(valueB) - ); -} - -var imul = - typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 - ? Math.imul - : function imul(a, b) { - a |= 0; // int - b |= 0; // int - var c = a & 0xffff; - var d = b & 0xffff; - // Shift by 0 fixes the sign on the high part. - return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int - }; - -// v8 has an optimization for storing 31-bit signed numbers. -// Values which have either 00 or 11 as the high order bits qualify. -// This function drops the highest order bit in a signed number, maintaining -// the sign bit. -function smi(i32) { - return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff); -} - -var defaultValueOf = Object.prototype.valueOf; - -function hash(o) { - if (o == null) { - return hashNullish(o); - } - - if (typeof o.hashCode === 'function') { - // Drop any high bits from accidentally long hash codes. - return smi(o.hashCode(o)); - } - - var v = valueOf(o); - - if (v == null) { - return hashNullish(v); - } - - switch (typeof v) { - case 'boolean': - // The hash values for built-in constants are a 1 value for each 5-byte - // shift region expect for the first, which encodes the value. This - // reduces the odds of a hash collision for these common values. - return v ? 0x42108421 : 0x42108420; - case 'number': - return hashNumber(v); - case 'string': - return v.length > STRING_HASH_CACHE_MIN_STRLEN - ? cachedHashString(v) - : hashString(v); - case 'object': - case 'function': - return hashJSObj(v); - case 'symbol': - return hashSymbol(v); - default: - if (typeof v.toString === 'function') { - return hashString(v.toString()); - } - throw new Error('Value type ' + typeof v + ' cannot be hashed.'); - } -} - -function hashNullish(nullish) { - return nullish === null ? 0x42108422 : /* undefined */ 0x42108423; -} - -// Compress arbitrarily large numbers into smi hashes. -function hashNumber(n) { - if (n !== n || n === Infinity) { - return 0; - } - var hash = n | 0; - if (hash !== n) { - hash ^= n * 0xffffffff; - } - while (n > 0xffffffff) { - n /= 0xffffffff; - hash ^= n; - } - return smi(hash); -} - -function cachedHashString(string) { - var hashed = stringHashCache[string]; - if (hashed === undefined) { - hashed = hashString(string); - if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) { - STRING_HASH_CACHE_SIZE = 0; - stringHashCache = {}; - } - STRING_HASH_CACHE_SIZE++; - stringHashCache[string] = hashed; - } - return hashed; -} - -// http://jsperf.com/hashing-strings -function hashString(string) { - // This is the hash from JVM - // The hash code for a string is computed as - // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1], - // where s[i] is the ith character of the string and n is the length of - // the string. We "mod" the result to make it between 0 (inclusive) and 2^31 - // (exclusive) by dropping high bits. - var hashed = 0; - for (var ii = 0; ii < string.length; ii++) { - hashed = (31 * hashed + string.charCodeAt(ii)) | 0; - } - return smi(hashed); -} - -function hashSymbol(sym) { - var hashed = symbolMap[sym]; - if (hashed !== undefined) { - return hashed; - } - - hashed = nextHash(); - - symbolMap[sym] = hashed; - - return hashed; -} - -function hashJSObj(obj) { - var hashed; - if (usingWeakMap) { - hashed = weakMap.get(obj); - if (hashed !== undefined) { - return hashed; - } - } - - hashed = obj[UID_HASH_KEY]; - if (hashed !== undefined) { - return hashed; - } - - if (!canDefineProperty) { - hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY]; - if (hashed !== undefined) { - return hashed; - } - - hashed = getIENodeHash(obj); - if (hashed !== undefined) { - return hashed; - } - } - - hashed = nextHash(); - - if (usingWeakMap) { - weakMap.set(obj, hashed); - } else if (isExtensible !== undefined && isExtensible(obj) === false) { - throw new Error('Non-extensible objects are not allowed as keys.'); - } else if (canDefineProperty) { - Object.defineProperty(obj, UID_HASH_KEY, { - enumerable: false, - configurable: false, - writable: false, - value: hashed, - }); - } else if ( - obj.propertyIsEnumerable !== undefined && - obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable - ) { - // Since we can't define a non-enumerable property on the object - // we'll hijack one of the less-used non-enumerable properties to - // save our hash on it. Since this is a function it will not show up in - // `JSON.stringify` which is what we want. - obj.propertyIsEnumerable = function () { - return this.constructor.prototype.propertyIsEnumerable.apply( - this, - arguments - ); - }; - obj.propertyIsEnumerable[UID_HASH_KEY] = hashed; - } else if (obj.nodeType !== undefined) { - // At this point we couldn't get the IE `uniqueID` to use as a hash - // and we couldn't use a non-enumerable property to exploit the - // dontEnum bug so we simply add the `UID_HASH_KEY` on the node - // itself. - obj[UID_HASH_KEY] = hashed; - } else { - throw new Error('Unable to set a non-enumerable property on object.'); - } - - return hashed; -} - -// Get references to ES5 object methods. -var isExtensible = Object.isExtensible; - -// True if Object.defineProperty works as expected. IE8 fails this test. -var canDefineProperty = (function () { - try { - Object.defineProperty({}, '@', {}); - return true; - } catch (e) { - return false; - } -})(); - -// IE has a `uniqueID` property on DOM nodes. We can construct the hash from it -// and avoid memory leaks from the IE cloneNode bug. -function getIENodeHash(node) { - if (node && node.nodeType > 0) { - switch (node.nodeType) { - case 1: // Element - return node.uniqueID; - case 9: // Document - return node.documentElement && node.documentElement.uniqueID; - } - } -} - -function valueOf(obj) { - return obj.valueOf !== defaultValueOf && typeof obj.valueOf === 'function' - ? obj.valueOf(obj) - : obj; -} - -function nextHash() { - var nextHash = ++_objHashUID; - if (_objHashUID & 0x40000000) { - _objHashUID = 0; - } - return nextHash; -} - -// If possible, use a WeakMap. -var usingWeakMap = typeof WeakMap === 'function'; -var weakMap; -if (usingWeakMap) { - weakMap = new WeakMap(); -} - -var symbolMap = Object.create(null); - -var _objHashUID = 0; - -var UID_HASH_KEY = '__immutablehash__'; -if (typeof Symbol === 'function') { - UID_HASH_KEY = Symbol(UID_HASH_KEY); -} - -var STRING_HASH_CACHE_MIN_STRLEN = 16; -var STRING_HASH_CACHE_MAX_SIZE = 255; -var STRING_HASH_CACHE_SIZE = 0; -var stringHashCache = {}; - -var ToKeyedSequence = /*@__PURE__*/(function (KeyedSeq) { - function ToKeyedSequence(indexed, useKeys) { - this._iter = indexed; - this._useKeys = useKeys; - this.size = indexed.size; - } - - if ( KeyedSeq ) ToKeyedSequence.__proto__ = KeyedSeq; - ToKeyedSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); - ToKeyedSequence.prototype.constructor = ToKeyedSequence; - - ToKeyedSequence.prototype.get = function get (key, notSetValue) { - return this._iter.get(key, notSetValue); - }; - - ToKeyedSequence.prototype.has = function has (key) { - return this._iter.has(key); - }; - - ToKeyedSequence.prototype.valueSeq = function valueSeq () { - return this._iter.valueSeq(); - }; - - ToKeyedSequence.prototype.reverse = function reverse () { - var this$1$1 = this; - - var reversedSequence = reverseFactory(this, true); - if (!this._useKeys) { - reversedSequence.valueSeq = function () { return this$1$1._iter.toSeq().reverse(); }; - } - return reversedSequence; - }; - - ToKeyedSequence.prototype.map = function map (mapper, context) { - var this$1$1 = this; - - var mappedSequence = mapFactory(this, mapper, context); - if (!this._useKeys) { - mappedSequence.valueSeq = function () { return this$1$1._iter.toSeq().map(mapper, context); }; - } - return mappedSequence; - }; - - ToKeyedSequence.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - return this._iter.__iterate(function (v, k) { return fn(v, k, this$1$1); }, reverse); - }; - - ToKeyedSequence.prototype.__iterator = function __iterator (type, reverse) { - return this._iter.__iterator(type, reverse); - }; - - return ToKeyedSequence; -}(KeyedSeq)); -ToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true; - -var ToIndexedSequence = /*@__PURE__*/(function (IndexedSeq) { - function ToIndexedSequence(iter) { - this._iter = iter; - this.size = iter.size; - } - - if ( IndexedSeq ) ToIndexedSequence.__proto__ = IndexedSeq; - ToIndexedSequence.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); - ToIndexedSequence.prototype.constructor = ToIndexedSequence; - - ToIndexedSequence.prototype.includes = function includes (value) { - return this._iter.includes(value); - }; - - ToIndexedSequence.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - var i = 0; - reverse && ensureSize(this); - return this._iter.__iterate( - function (v) { return fn(v, reverse ? this$1$1.size - ++i : i++, this$1$1); }, - reverse - ); - }; - - ToIndexedSequence.prototype.__iterator = function __iterator (type, reverse) { - var this$1$1 = this; - - var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); - var i = 0; - reverse && ensureSize(this); - return new Iterator(function () { - var step = iterator.next(); - return step.done - ? step - : iteratorValue( - type, - reverse ? this$1$1.size - ++i : i++, - step.value, - step - ); - }); - }; - - return ToIndexedSequence; -}(IndexedSeq)); - -var ToSetSequence = /*@__PURE__*/(function (SetSeq) { - function ToSetSequence(iter) { - this._iter = iter; - this.size = iter.size; - } - - if ( SetSeq ) ToSetSequence.__proto__ = SetSeq; - ToSetSequence.prototype = Object.create( SetSeq && SetSeq.prototype ); - ToSetSequence.prototype.constructor = ToSetSequence; - - ToSetSequence.prototype.has = function has (key) { - return this._iter.includes(key); - }; - - ToSetSequence.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - return this._iter.__iterate(function (v) { return fn(v, v, this$1$1); }, reverse); - }; - - ToSetSequence.prototype.__iterator = function __iterator (type, reverse) { - var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); - return new Iterator(function () { - var step = iterator.next(); - return step.done - ? step - : iteratorValue(type, step.value, step.value, step); - }); - }; - - return ToSetSequence; -}(SetSeq)); - -var FromEntriesSequence = /*@__PURE__*/(function (KeyedSeq) { - function FromEntriesSequence(entries) { - this._iter = entries; - this.size = entries.size; - } - - if ( KeyedSeq ) FromEntriesSequence.__proto__ = KeyedSeq; - FromEntriesSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); - FromEntriesSequence.prototype.constructor = FromEntriesSequence; - - FromEntriesSequence.prototype.entrySeq = function entrySeq () { - return this._iter.toSeq(); - }; - - FromEntriesSequence.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - return this._iter.__iterate(function (entry) { - // Check if entry exists first so array access doesn't throw for holes - // in the parent iteration. - if (entry) { - validateEntry(entry); - var indexedCollection = isCollection(entry); - return fn( - indexedCollection ? entry.get(1) : entry[1], - indexedCollection ? entry.get(0) : entry[0], - this$1$1 - ); - } - }, reverse); - }; - - FromEntriesSequence.prototype.__iterator = function __iterator (type, reverse) { - var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); - return new Iterator(function () { - while (true) { - var step = iterator.next(); - if (step.done) { - return step; - } - var entry = step.value; - // Check if entry exists first so array access doesn't throw for holes - // in the parent iteration. - if (entry) { - validateEntry(entry); - var indexedCollection = isCollection(entry); - return iteratorValue( - type, - indexedCollection ? entry.get(0) : entry[0], - indexedCollection ? entry.get(1) : entry[1], - step - ); - } - } - }); - }; - - return FromEntriesSequence; -}(KeyedSeq)); - -ToIndexedSequence.prototype.cacheResult = - ToKeyedSequence.prototype.cacheResult = - ToSetSequence.prototype.cacheResult = - FromEntriesSequence.prototype.cacheResult = - cacheResultThrough; - -function flipFactory(collection) { - var flipSequence = makeSequence(collection); - flipSequence._iter = collection; - flipSequence.size = collection.size; - flipSequence.flip = function () { return collection; }; - flipSequence.reverse = function () { - var reversedSequence = collection.reverse.apply(this); // super.reverse() - reversedSequence.flip = function () { return collection.reverse(); }; - return reversedSequence; - }; - flipSequence.has = function (key) { return collection.includes(key); }; - flipSequence.includes = function (key) { return collection.has(key); }; - flipSequence.cacheResult = cacheResultThrough; - flipSequence.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - return collection.__iterate(function (v, k) { return fn(k, v, this$1$1) !== false; }, reverse); - }; - flipSequence.__iteratorUncached = function (type, reverse) { - if (type === ITERATE_ENTRIES) { - var iterator = collection.__iterator(type, reverse); - return new Iterator(function () { - var step = iterator.next(); - if (!step.done) { - var k = step.value[0]; - step.value[0] = step.value[1]; - step.value[1] = k; - } - return step; - }); - } - return collection.__iterator( - type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, - reverse - ); - }; - return flipSequence; -} - -function mapFactory(collection, mapper, context) { - var mappedSequence = makeSequence(collection); - mappedSequence.size = collection.size; - mappedSequence.has = function (key) { return collection.has(key); }; - mappedSequence.get = function (key, notSetValue) { - var v = collection.get(key, NOT_SET); - return v === NOT_SET - ? notSetValue - : mapper.call(context, v, key, collection); - }; - mappedSequence.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - return collection.__iterate( - function (v, k, c) { return fn(mapper.call(context, v, k, c), k, this$1$1) !== false; }, - reverse - ); - }; - mappedSequence.__iteratorUncached = function (type, reverse) { - var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); - return new Iterator(function () { - var step = iterator.next(); - if (step.done) { - return step; - } - var entry = step.value; - var key = entry[0]; - return iteratorValue( - type, - key, - mapper.call(context, entry[1], key, collection), - step - ); - }); - }; - return mappedSequence; -} - -function reverseFactory(collection, useKeys) { - var this$1$1 = this; - - var reversedSequence = makeSequence(collection); - reversedSequence._iter = collection; - reversedSequence.size = collection.size; - reversedSequence.reverse = function () { return collection; }; - if (collection.flip) { - reversedSequence.flip = function () { - var flipSequence = flipFactory(collection); - flipSequence.reverse = function () { return collection.flip(); }; - return flipSequence; - }; - } - reversedSequence.get = function (key, notSetValue) { return collection.get(useKeys ? key : -1 - key, notSetValue); }; - reversedSequence.has = function (key) { return collection.has(useKeys ? key : -1 - key); }; - reversedSequence.includes = function (value) { return collection.includes(value); }; - reversedSequence.cacheResult = cacheResultThrough; - reversedSequence.__iterate = function (fn, reverse) { - var this$1$1 = this; - - var i = 0; - reverse && ensureSize(collection); - return collection.__iterate( - function (v, k) { return fn(v, useKeys ? k : reverse ? this$1$1.size - ++i : i++, this$1$1); }, - !reverse - ); - }; - reversedSequence.__iterator = function (type, reverse) { - var i = 0; - reverse && ensureSize(collection); - var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse); - return new Iterator(function () { - var step = iterator.next(); - if (step.done) { - return step; - } - var entry = step.value; - return iteratorValue( - type, - useKeys ? entry[0] : reverse ? this$1$1.size - ++i : i++, - entry[1], - step - ); - }); - }; - return reversedSequence; -} - -function filterFactory(collection, predicate, context, useKeys) { - var filterSequence = makeSequence(collection); - if (useKeys) { - filterSequence.has = function (key) { - var v = collection.get(key, NOT_SET); - return v !== NOT_SET && !!predicate.call(context, v, key, collection); - }; - filterSequence.get = function (key, notSetValue) { - var v = collection.get(key, NOT_SET); - return v !== NOT_SET && predicate.call(context, v, key, collection) - ? v - : notSetValue; - }; - } - filterSequence.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - var iterations = 0; - collection.__iterate(function (v, k, c) { - if (predicate.call(context, v, k, c)) { - iterations++; - return fn(v, useKeys ? k : iterations - 1, this$1$1); - } - }, reverse); - return iterations; - }; - filterSequence.__iteratorUncached = function (type, reverse) { - var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); - var iterations = 0; - return new Iterator(function () { - while (true) { - var step = iterator.next(); - if (step.done) { - return step; - } - var entry = step.value; - var key = entry[0]; - var value = entry[1]; - if (predicate.call(context, value, key, collection)) { - return iteratorValue(type, useKeys ? key : iterations++, value, step); - } - } - }); - }; - return filterSequence; -} - -function countByFactory(collection, grouper, context) { - var groups = Map().asMutable(); - collection.__iterate(function (v, k) { - groups.update(grouper.call(context, v, k, collection), 0, function (a) { return a + 1; }); - }); - return groups.asImmutable(); -} - -function groupByFactory(collection, grouper, context) { - var isKeyedIter = isKeyed(collection); - var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable(); - collection.__iterate(function (v, k) { - groups.update( - grouper.call(context, v, k, collection), - function (a) { return ((a = a || []), a.push(isKeyedIter ? [k, v] : v), a); } - ); - }); - var coerce = collectionClass(collection); - return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable(); -} - -function partitionFactory(collection, predicate, context) { - var isKeyedIter = isKeyed(collection); - var groups = [[], []]; - collection.__iterate(function (v, k) { - groups[predicate.call(context, v, k, collection) ? 1 : 0].push( - isKeyedIter ? [k, v] : v - ); - }); - var coerce = collectionClass(collection); - return groups.map(function (arr) { return reify(collection, coerce(arr)); }); -} - -function sliceFactory(collection, begin, end, useKeys) { - var originalSize = collection.size; - - if (wholeSlice(begin, end, originalSize)) { - return collection; - } - - // begin or end can not be resolved if they were provided as negative numbers and - // this collection's size is unknown. In that case, cache first so there is - // a known size and these do not resolve to NaN. - if (typeof originalSize === 'undefined' && (begin < 0 || end < 0)) { - return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys); - } - - var resolvedBegin = resolveBegin(begin, originalSize); - var resolvedEnd = resolveEnd(end, originalSize); - - // Note: resolvedEnd is undefined when the original sequence's length is - // unknown and this slice did not supply an end and should contain all - // elements after resolvedBegin. - // In that case, resolvedSize will be NaN and sliceSize will remain undefined. - var resolvedSize = resolvedEnd - resolvedBegin; - var sliceSize; - if (resolvedSize === resolvedSize) { - sliceSize = resolvedSize < 0 ? 0 : resolvedSize; - } - - var sliceSeq = makeSequence(collection); - - // If collection.size is undefined, the size of the realized sliceSeq is - // unknown at this point unless the number of items to slice is 0 - sliceSeq.size = - sliceSize === 0 ? sliceSize : (collection.size && sliceSize) || undefined; - - if (!useKeys && isSeq(collection) && sliceSize >= 0) { - sliceSeq.get = function (index, notSetValue) { - index = wrapIndex(this, index); - return index >= 0 && index < sliceSize - ? collection.get(index + resolvedBegin, notSetValue) - : notSetValue; - }; - } - - sliceSeq.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - if (sliceSize === 0) { - return 0; - } - if (reverse) { - return this.cacheResult().__iterate(fn, reverse); - } - var skipped = 0; - var isSkipping = true; - var iterations = 0; - collection.__iterate(function (v, k) { - if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) { - iterations++; - return ( - fn(v, useKeys ? k : iterations - 1, this$1$1) !== false && - iterations !== sliceSize - ); - } - }); - return iterations; - }; - - sliceSeq.__iteratorUncached = function (type, reverse) { - if (sliceSize !== 0 && reverse) { - return this.cacheResult().__iterator(type, reverse); - } - // Don't bother instantiating parent iterator if taking 0. - if (sliceSize === 0) { - return new Iterator(iteratorDone); - } - var iterator = collection.__iterator(type, reverse); - var skipped = 0; - var iterations = 0; - return new Iterator(function () { - while (skipped++ < resolvedBegin) { - iterator.next(); - } - if (++iterations > sliceSize) { - return iteratorDone(); - } - var step = iterator.next(); - if (useKeys || type === ITERATE_VALUES || step.done) { - return step; - } - if (type === ITERATE_KEYS) { - return iteratorValue(type, iterations - 1, undefined, step); - } - return iteratorValue(type, iterations - 1, step.value[1], step); - }); - }; - - return sliceSeq; -} - -function takeWhileFactory(collection, predicate, context) { - var takeSequence = makeSequence(collection); - takeSequence.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - if (reverse) { - return this.cacheResult().__iterate(fn, reverse); - } - var iterations = 0; - collection.__iterate( - function (v, k, c) { return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1$1); } - ); - return iterations; - }; - takeSequence.__iteratorUncached = function (type, reverse) { - var this$1$1 = this; - - if (reverse) { - return this.cacheResult().__iterator(type, reverse); - } - var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); - var iterating = true; - return new Iterator(function () { - if (!iterating) { - return iteratorDone(); - } - var step = iterator.next(); - if (step.done) { - return step; - } - var entry = step.value; - var k = entry[0]; - var v = entry[1]; - if (!predicate.call(context, v, k, this$1$1)) { - iterating = false; - return iteratorDone(); - } - return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); - }); - }; - return takeSequence; -} - -function skipWhileFactory(collection, predicate, context, useKeys) { - var skipSequence = makeSequence(collection); - skipSequence.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - if (reverse) { - return this.cacheResult().__iterate(fn, reverse); - } - var isSkipping = true; - var iterations = 0; - collection.__iterate(function (v, k, c) { - if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) { - iterations++; - return fn(v, useKeys ? k : iterations - 1, this$1$1); - } - }); - return iterations; - }; - skipSequence.__iteratorUncached = function (type, reverse) { - var this$1$1 = this; - - if (reverse) { - return this.cacheResult().__iterator(type, reverse); - } - var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); - var skipping = true; - var iterations = 0; - return new Iterator(function () { - var step; - var k; - var v; - do { - step = iterator.next(); - if (step.done) { - if (useKeys || type === ITERATE_VALUES) { - return step; - } - if (type === ITERATE_KEYS) { - return iteratorValue(type, iterations++, undefined, step); - } - return iteratorValue(type, iterations++, step.value[1], step); - } - var entry = step.value; - k = entry[0]; - v = entry[1]; - skipping && (skipping = predicate.call(context, v, k, this$1$1)); - } while (skipping); - return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); - }); - }; - return skipSequence; -} - -function concatFactory(collection, values) { - var isKeyedCollection = isKeyed(collection); - var iters = [collection] - .concat(values) - .map(function (v) { - if (!isCollection(v)) { - v = isKeyedCollection - ? keyedSeqFromValue(v) - : indexedSeqFromValue(Array.isArray(v) ? v : [v]); - } else if (isKeyedCollection) { - v = KeyedCollection(v); - } - return v; - }) - .filter(function (v) { return v.size !== 0; }); - - if (iters.length === 0) { - return collection; - } - - if (iters.length === 1) { - var singleton = iters[0]; - if ( - singleton === collection || - (isKeyedCollection && isKeyed(singleton)) || - (isIndexed(collection) && isIndexed(singleton)) - ) { - return singleton; - } - } - - var concatSeq = new ArraySeq(iters); - if (isKeyedCollection) { - concatSeq = concatSeq.toKeyedSeq(); - } else if (!isIndexed(collection)) { - concatSeq = concatSeq.toSetSeq(); - } - concatSeq = concatSeq.flatten(true); - concatSeq.size = iters.reduce(function (sum, seq) { - if (sum !== undefined) { - var size = seq.size; - if (size !== undefined) { - return sum + size; - } - } - }, 0); - return concatSeq; -} - -function flattenFactory(collection, depth, useKeys) { - var flatSequence = makeSequence(collection); - flatSequence.__iterateUncached = function (fn, reverse) { - if (reverse) { - return this.cacheResult().__iterate(fn, reverse); - } - var iterations = 0; - var stopped = false; - function flatDeep(iter, currentDepth) { - iter.__iterate(function (v, k) { - if ((!depth || currentDepth < depth) && isCollection(v)) { - flatDeep(v, currentDepth + 1); - } else { - iterations++; - if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) { - stopped = true; - } - } - return !stopped; - }, reverse); - } - flatDeep(collection, 0); - return iterations; - }; - flatSequence.__iteratorUncached = function (type, reverse) { - if (reverse) { - return this.cacheResult().__iterator(type, reverse); - } - var iterator = collection.__iterator(type, reverse); - var stack = []; - var iterations = 0; - return new Iterator(function () { - while (iterator) { - var step = iterator.next(); - if (step.done !== false) { - iterator = stack.pop(); - continue; - } - var v = step.value; - if (type === ITERATE_ENTRIES) { - v = v[1]; - } - if ((!depth || stack.length < depth) && isCollection(v)) { - stack.push(iterator); - iterator = v.__iterator(type, reverse); - } else { - return useKeys ? step : iteratorValue(type, iterations++, v, step); - } - } - return iteratorDone(); - }); - }; - return flatSequence; -} - -function flatMapFactory(collection, mapper, context) { - var coerce = collectionClass(collection); - return collection - .toSeq() - .map(function (v, k) { return coerce(mapper.call(context, v, k, collection)); }) - .flatten(true); -} - -function interposeFactory(collection, separator) { - var interposedSequence = makeSequence(collection); - interposedSequence.size = collection.size && collection.size * 2 - 1; - interposedSequence.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - var iterations = 0; - collection.__iterate( - function (v) { return (!iterations || fn(separator, iterations++, this$1$1) !== false) && - fn(v, iterations++, this$1$1) !== false; }, - reverse - ); - return iterations; - }; - interposedSequence.__iteratorUncached = function (type, reverse) { - var iterator = collection.__iterator(ITERATE_VALUES, reverse); - var iterations = 0; - var step; - return new Iterator(function () { - if (!step || iterations % 2) { - step = iterator.next(); - if (step.done) { - return step; - } - } - return iterations % 2 - ? iteratorValue(type, iterations++, separator) - : iteratorValue(type, iterations++, step.value, step); - }); - }; - return interposedSequence; -} - -function sortFactory(collection, comparator, mapper) { - if (!comparator) { - comparator = defaultComparator; - } - var isKeyedCollection = isKeyed(collection); - var index = 0; - var entries = collection - .toSeq() - .map(function (v, k) { return [k, v, index++, mapper ? mapper(v, k, collection) : v]; }) - .valueSeq() - .toArray(); - entries - .sort(function (a, b) { return comparator(a[3], b[3]) || a[2] - b[2]; }) - .forEach( - isKeyedCollection - ? function (v, i) { - entries[i].length = 2; - } - : function (v, i) { - entries[i] = v[1]; - } - ); - return isKeyedCollection - ? KeyedSeq(entries) - : isIndexed(collection) - ? IndexedSeq(entries) - : SetSeq(entries); -} - -function maxFactory(collection, comparator, mapper) { - if (!comparator) { - comparator = defaultComparator; - } - if (mapper) { - var entry = collection - .toSeq() - .map(function (v, k) { return [v, mapper(v, k, collection)]; }) - .reduce(function (a, b) { return (maxCompare(comparator, a[1], b[1]) ? b : a); }); - return entry && entry[0]; - } - return collection.reduce(function (a, b) { return (maxCompare(comparator, a, b) ? b : a); }); -} - -function maxCompare(comparator, a, b) { - var comp = comparator(b, a); - // b is considered the new max if the comparator declares them equal, but - // they are not equal and b is in fact a nullish value. - return ( - (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || - comp > 0 - ); -} - -function zipWithFactory(keyIter, zipper, iters, zipAll) { - var zipSequence = makeSequence(keyIter); - var sizes = new ArraySeq(iters).map(function (i) { return i.size; }); - zipSequence.size = zipAll ? sizes.max() : sizes.min(); - // Note: this a generic base implementation of __iterate in terms of - // __iterator which may be more generically useful in the future. - zipSequence.__iterate = function (fn, reverse) { - /* generic: - var iterator = this.__iterator(ITERATE_ENTRIES, reverse); - var step; - var iterations = 0; - while (!(step = iterator.next()).done) { - iterations++; - if (fn(step.value[1], step.value[0], this) === false) { - break; - } - } - return iterations; - */ - // indexed: - var iterator = this.__iterator(ITERATE_VALUES, reverse); - var step; - var iterations = 0; - while (!(step = iterator.next()).done) { - if (fn(step.value, iterations++, this) === false) { - break; - } - } - return iterations; - }; - zipSequence.__iteratorUncached = function (type, reverse) { - var iterators = iters.map( - function (i) { return ((i = Collection(i)), getIterator(reverse ? i.reverse() : i)); } - ); - var iterations = 0; - var isDone = false; - return new Iterator(function () { - var steps; - if (!isDone) { - steps = iterators.map(function (i) { return i.next(); }); - isDone = zipAll ? steps.every(function (s) { return s.done; }) : steps.some(function (s) { return s.done; }); - } - if (isDone) { - return iteratorDone(); - } - return iteratorValue( - type, - iterations++, - zipper.apply( - null, - steps.map(function (s) { return s.value; }) - ) - ); - }); - }; - return zipSequence; -} - -// #pragma Helper Functions - -function reify(iter, seq) { - return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq); -} - -function validateEntry(entry) { - if (entry !== Object(entry)) { - throw new TypeError('Expected [K, V] tuple: ' + entry); - } -} - -function collectionClass(collection) { - return isKeyed(collection) - ? KeyedCollection - : isIndexed(collection) - ? IndexedCollection - : SetCollection; -} - -function makeSequence(collection) { - return Object.create( - (isKeyed(collection) - ? KeyedSeq - : isIndexed(collection) - ? IndexedSeq - : SetSeq - ).prototype - ); -} - -function cacheResultThrough() { - if (this._iter.cacheResult) { - this._iter.cacheResult(); - this.size = this._iter.size; - return this; - } - return Seq.prototype.cacheResult.call(this); -} - -function defaultComparator(a, b) { - if (a === undefined && b === undefined) { - return 0; - } - - if (a === undefined) { - return 1; - } - - if (b === undefined) { - return -1; - } - - return a > b ? 1 : a < b ? -1 : 0; -} - -// http://jsperf.com/copy-array-inline -function arrCopy(arr, offset) { - offset = offset || 0; - var len = Math.max(0, arr.length - offset); - var newArr = new Array(len); - for (var ii = 0; ii < len; ii++) { - newArr[ii] = arr[ii + offset]; - } - return newArr; -} - -function invariant(condition, error) { - if (!condition) { throw new Error(error); } -} - -function assertNotInfinite(size) { - invariant( - size !== Infinity, - 'Cannot perform this action with an infinite size.' - ); -} - -function coerceKeyPath(keyPath) { - if (isArrayLike(keyPath) && typeof keyPath !== 'string') { - return keyPath; - } - if (isOrdered(keyPath)) { - return keyPath.toArray(); - } - throw new TypeError( - 'Invalid keyPath: expected Ordered Collection or Array: ' + keyPath - ); -} - -var toString = Object.prototype.toString; - -function isPlainObject(value) { - // The base prototype's toString deals with Argument objects and native namespaces like Math - if ( - !value || - typeof value !== 'object' || - toString.call(value) !== '[object Object]' - ) { - return false; - } - - var proto = Object.getPrototypeOf(value); - if (proto === null) { - return true; - } - - // Iteratively going up the prototype chain is needed for cross-realm environments (differing contexts, iframes, etc) - var parentProto = proto; - var nextProto = Object.getPrototypeOf(proto); - while (nextProto !== null) { - parentProto = nextProto; - nextProto = Object.getPrototypeOf(parentProto); - } - return parentProto === proto; -} - -/** - * Returns true if the value is a potentially-persistent data structure, either - * provided by Immutable.js or a plain Array or Object. - */ -function isDataStructure(value) { - return ( - typeof value === 'object' && - (isImmutable(value) || Array.isArray(value) || isPlainObject(value)) - ); -} - -/** - * Converts a value to a string, adding quotes if a string was provided. - */ -function quoteString(value) { - try { - return typeof value === 'string' ? JSON.stringify(value) : String(value); - } catch (_ignoreError) { - return JSON.stringify(value); - } -} - -function has(collection, key) { - return isImmutable(collection) - ? collection.has(key) - : isDataStructure(collection) && hasOwnProperty.call(collection, key); -} - -function get(collection, key, notSetValue) { - return isImmutable(collection) - ? collection.get(key, notSetValue) - : !has(collection, key) - ? notSetValue - : typeof collection.get === 'function' - ? collection.get(key) - : collection[key]; -} - -function shallowCopy(from) { - if (Array.isArray(from)) { - return arrCopy(from); - } - var to = {}; - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - return to; -} - -function remove(collection, key) { - if (!isDataStructure(collection)) { - throw new TypeError( - 'Cannot update non-data-structure value: ' + collection - ); - } - if (isImmutable(collection)) { - if (!collection.remove) { - throw new TypeError( - 'Cannot update immutable value without .remove() method: ' + collection - ); - } - return collection.remove(key); - } - if (!hasOwnProperty.call(collection, key)) { - return collection; - } - var collectionCopy = shallowCopy(collection); - if (Array.isArray(collectionCopy)) { - collectionCopy.splice(key, 1); - } else { - delete collectionCopy[key]; - } - return collectionCopy; -} - -function set(collection, key, value) { - if (!isDataStructure(collection)) { - throw new TypeError( - 'Cannot update non-data-structure value: ' + collection - ); - } - if (isImmutable(collection)) { - if (!collection.set) { - throw new TypeError( - 'Cannot update immutable value without .set() method: ' + collection - ); - } - return collection.set(key, value); - } - if (hasOwnProperty.call(collection, key) && value === collection[key]) { - return collection; - } - var collectionCopy = shallowCopy(collection); - collectionCopy[key] = value; - return collectionCopy; -} - -function updateIn$1(collection, keyPath, notSetValue, updater) { - if (!updater) { - updater = notSetValue; - notSetValue = undefined; - } - var updatedValue = updateInDeeply( - isImmutable(collection), - collection, - coerceKeyPath(keyPath), - 0, - notSetValue, - updater - ); - return updatedValue === NOT_SET ? notSetValue : updatedValue; -} - -function updateInDeeply( - inImmutable, - existing, - keyPath, - i, - notSetValue, - updater -) { - var wasNotSet = existing === NOT_SET; - if (i === keyPath.length) { - var existingValue = wasNotSet ? notSetValue : existing; - var newValue = updater(existingValue); - return newValue === existingValue ? existing : newValue; - } - if (!wasNotSet && !isDataStructure(existing)) { - throw new TypeError( - 'Cannot update within non-data-structure value in path [' + - keyPath.slice(0, i).map(quoteString) + - ']: ' + - existing - ); - } - var key = keyPath[i]; - var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET); - var nextUpdated = updateInDeeply( - nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting), - nextExisting, - keyPath, - i + 1, - notSetValue, - updater - ); - return nextUpdated === nextExisting - ? existing - : nextUpdated === NOT_SET - ? remove(existing, key) - : set( - wasNotSet ? (inImmutable ? emptyMap() : {}) : existing, - key, - nextUpdated - ); -} - -function setIn$1(collection, keyPath, value) { - return updateIn$1(collection, keyPath, NOT_SET, function () { return value; }); -} - -function setIn(keyPath, v) { - return setIn$1(this, keyPath, v); -} - -function removeIn(collection, keyPath) { - return updateIn$1(collection, keyPath, function () { return NOT_SET; }); -} - -function deleteIn(keyPath) { - return removeIn(this, keyPath); -} - -function update$1(collection, key, notSetValue, updater) { - return updateIn$1(collection, [key], notSetValue, updater); -} - -function update(key, notSetValue, updater) { - return arguments.length === 1 - ? key(this) - : update$1(this, key, notSetValue, updater); -} - -function updateIn(keyPath, notSetValue, updater) { - return updateIn$1(this, keyPath, notSetValue, updater); -} - -function merge$1() { - var iters = [], len = arguments.length; - while ( len-- ) iters[ len ] = arguments[ len ]; - - return mergeIntoKeyedWith(this, iters); -} - -function mergeWith$1(merger) { - var iters = [], len = arguments.length - 1; - while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; - - if (typeof merger !== 'function') { - throw new TypeError('Invalid merger function: ' + merger); - } - return mergeIntoKeyedWith(this, iters, merger); -} - -function mergeIntoKeyedWith(collection, collections, merger) { - var iters = []; - for (var ii = 0; ii < collections.length; ii++) { - var collection$1 = KeyedCollection(collections[ii]); - if (collection$1.size !== 0) { - iters.push(collection$1); - } - } - if (iters.length === 0) { - return collection; - } - if ( - collection.toSeq().size === 0 && - !collection.__ownerID && - iters.length === 1 - ) { - return collection.constructor(iters[0]); - } - return collection.withMutations(function (collection) { - var mergeIntoCollection = merger - ? function (value, key) { - update$1(collection, key, NOT_SET, function (oldVal) { return oldVal === NOT_SET ? value : merger(oldVal, value, key); } - ); - } - : function (value, key) { - collection.set(key, value); - }; - for (var ii = 0; ii < iters.length; ii++) { - iters[ii].forEach(mergeIntoCollection); - } - }); -} - -function merge(collection) { - var sources = [], len = arguments.length - 1; - while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; - - return mergeWithSources(collection, sources); -} - -function mergeWith(merger, collection) { - var sources = [], len = arguments.length - 2; - while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ]; - - return mergeWithSources(collection, sources, merger); -} - -function mergeDeep$1(collection) { - var sources = [], len = arguments.length - 1; - while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; - - return mergeDeepWithSources(collection, sources); -} - -function mergeDeepWith$1(merger, collection) { - var sources = [], len = arguments.length - 2; - while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ]; - - return mergeDeepWithSources(collection, sources, merger); -} - -function mergeDeepWithSources(collection, sources, merger) { - return mergeWithSources(collection, sources, deepMergerWith(merger)); -} - -function mergeWithSources(collection, sources, merger) { - if (!isDataStructure(collection)) { - throw new TypeError( - 'Cannot merge into non-data-structure value: ' + collection - ); - } - if (isImmutable(collection)) { - return typeof merger === 'function' && collection.mergeWith - ? collection.mergeWith.apply(collection, [ merger ].concat( sources )) - : collection.merge - ? collection.merge.apply(collection, sources) - : collection.concat.apply(collection, sources); - } - var isArray = Array.isArray(collection); - var merged = collection; - var Collection = isArray ? IndexedCollection : KeyedCollection; - var mergeItem = isArray - ? function (value) { - // Copy on write - if (merged === collection) { - merged = shallowCopy(merged); - } - merged.push(value); - } - : function (value, key) { - var hasVal = hasOwnProperty.call(merged, key); - var nextVal = - hasVal && merger ? merger(merged[key], value, key) : value; - if (!hasVal || nextVal !== merged[key]) { - // Copy on write - if (merged === collection) { - merged = shallowCopy(merged); - } - merged[key] = nextVal; - } - }; - for (var i = 0; i < sources.length; i++) { - Collection(sources[i]).forEach(mergeItem); - } - return merged; -} - -function deepMergerWith(merger) { - function deepMerger(oldValue, newValue, key) { - return isDataStructure(oldValue) && - isDataStructure(newValue) && - areMergeable(oldValue, newValue) - ? mergeWithSources(oldValue, [newValue], deepMerger) - : merger - ? merger(oldValue, newValue, key) - : newValue; - } - return deepMerger; -} - -/** - * It's unclear what the desired behavior is for merging two collections that - * fall into separate categories between keyed, indexed, or set-like, so we only - * consider them mergeable if they fall into the same category. - */ -function areMergeable(oldDataStructure, newDataStructure) { - var oldSeq = Seq(oldDataStructure); - var newSeq = Seq(newDataStructure); - // This logic assumes that a sequence can only fall into one of the three - // categories mentioned above (since there's no `isSetLike()` method). - return ( - isIndexed(oldSeq) === isIndexed(newSeq) && - isKeyed(oldSeq) === isKeyed(newSeq) - ); -} - -function mergeDeep() { - var iters = [], len = arguments.length; - while ( len-- ) iters[ len ] = arguments[ len ]; - - return mergeDeepWithSources(this, iters); -} - -function mergeDeepWith(merger) { - var iters = [], len = arguments.length - 1; - while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; - - return mergeDeepWithSources(this, iters, merger); -} - -function mergeIn(keyPath) { - var iters = [], len = arguments.length - 1; - while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; - - return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); }); -} - -function mergeDeepIn(keyPath) { - var iters = [], len = arguments.length - 1; - while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; - - return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); } - ); -} - -function withMutations(fn) { - var mutable = this.asMutable(); - fn(mutable); - return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; -} - -function asMutable() { - return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); -} - -function asImmutable() { - return this.__ensureOwner(); -} - -function wasAltered() { - return this.__altered; -} - -var Map = /*@__PURE__*/(function (KeyedCollection) { - function Map(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptyMap() - : isMap(value) && !isOrdered(value) - ? value - : emptyMap().withMutations(function (map) { - var iter = KeyedCollection(value); - assertNotInfinite(iter.size); - iter.forEach(function (v, k) { return map.set(k, v); }); - }); - } - - if ( KeyedCollection ) Map.__proto__ = KeyedCollection; - Map.prototype = Object.create( KeyedCollection && KeyedCollection.prototype ); - Map.prototype.constructor = Map; - - Map.prototype.toString = function toString () { - return this.__toString('Map {', '}'); - }; - - // @pragma Access - - Map.prototype.get = function get (k, notSetValue) { - return this._root - ? this._root.get(0, undefined, k, notSetValue) - : notSetValue; - }; - - // @pragma Modification - - Map.prototype.set = function set (k, v) { - return updateMap(this, k, v); - }; - - Map.prototype.remove = function remove (k) { - return updateMap(this, k, NOT_SET); - }; - - Map.prototype.deleteAll = function deleteAll (keys) { - var collection = Collection(keys); - - if (collection.size === 0) { - return this; - } - - return this.withMutations(function (map) { - collection.forEach(function (key) { return map.remove(key); }); - }); - }; - - Map.prototype.clear = function clear () { - if (this.size === 0) { - return this; - } - if (this.__ownerID) { - this.size = 0; - this._root = null; - this.__hash = undefined; - this.__altered = true; - return this; - } - return emptyMap(); - }; - - // @pragma Composition - - Map.prototype.sort = function sort (comparator) { - // Late binding - return OrderedMap(sortFactory(this, comparator)); - }; - - Map.prototype.sortBy = function sortBy (mapper, comparator) { - // Late binding - return OrderedMap(sortFactory(this, comparator, mapper)); - }; - - Map.prototype.map = function map (mapper, context) { - var this$1$1 = this; - - return this.withMutations(function (map) { - map.forEach(function (value, key) { - map.set(key, mapper.call(context, value, key, this$1$1)); - }); - }); - }; - - // @pragma Mutability - - Map.prototype.__iterator = function __iterator (type, reverse) { - return new MapIterator(this, type, reverse); - }; - - Map.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - var iterations = 0; - this._root && - this._root.iterate(function (entry) { - iterations++; - return fn(entry[1], entry[0], this$1$1); - }, reverse); - return iterations; - }; - - Map.prototype.__ensureOwner = function __ensureOwner (ownerID) { - if (ownerID === this.__ownerID) { - return this; - } - if (!ownerID) { - if (this.size === 0) { - return emptyMap(); - } - this.__ownerID = ownerID; - this.__altered = false; - return this; - } - return makeMap(this.size, this._root, ownerID, this.__hash); - }; - - return Map; -}(KeyedCollection)); - -Map.isMap = isMap; - -var MapPrototype = Map.prototype; -MapPrototype[IS_MAP_SYMBOL] = true; -MapPrototype[DELETE] = MapPrototype.remove; -MapPrototype.removeAll = MapPrototype.deleteAll; -MapPrototype.setIn = setIn; -MapPrototype.removeIn = MapPrototype.deleteIn = deleteIn; -MapPrototype.update = update; -MapPrototype.updateIn = updateIn; -MapPrototype.merge = MapPrototype.concat = merge$1; -MapPrototype.mergeWith = mergeWith$1; -MapPrototype.mergeDeep = mergeDeep; -MapPrototype.mergeDeepWith = mergeDeepWith; -MapPrototype.mergeIn = mergeIn; -MapPrototype.mergeDeepIn = mergeDeepIn; -MapPrototype.withMutations = withMutations; -MapPrototype.wasAltered = wasAltered; -MapPrototype.asImmutable = asImmutable; -MapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable; -MapPrototype['@@transducer/step'] = function (result, arr) { - return result.set(arr[0], arr[1]); -}; -MapPrototype['@@transducer/result'] = function (obj) { - return obj.asImmutable(); -}; - -// #pragma Trie Nodes - -var ArrayMapNode = function ArrayMapNode(ownerID, entries) { - this.ownerID = ownerID; - this.entries = entries; -}; - -ArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) { - var entries = this.entries; - for (var ii = 0, len = entries.length; ii < len; ii++) { - if (is(key, entries[ii][0])) { - return entries[ii][1]; - } - } - return notSetValue; -}; - -ArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { - var removed = value === NOT_SET; - - var entries = this.entries; - var idx = 0; - var len = entries.length; - for (; idx < len; idx++) { - if (is(key, entries[idx][0])) { - break; - } - } - var exists = idx < len; - - if (exists ? entries[idx][1] === value : removed) { - return this; - } - - SetRef(didAlter); - (removed || !exists) && SetRef(didChangeSize); - - if (removed && entries.length === 1) { - return; // undefined - } - - if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) { - return createNodes(ownerID, entries, key, value); - } - - var isEditable = ownerID && ownerID === this.ownerID; - var newEntries = isEditable ? entries : arrCopy(entries); - - if (exists) { - if (removed) { - idx === len - 1 - ? newEntries.pop() - : (newEntries[idx] = newEntries.pop()); - } else { - newEntries[idx] = [key, value]; - } - } else { - newEntries.push([key, value]); - } - - if (isEditable) { - this.entries = newEntries; - return this; - } - - return new ArrayMapNode(ownerID, newEntries); -}; - -var BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) { - this.ownerID = ownerID; - this.bitmap = bitmap; - this.nodes = nodes; -}; - -BitmapIndexedNode.prototype.get = function get (shift, keyHash, key, notSetValue) { - if (keyHash === undefined) { - keyHash = hash(key); - } - var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK); - var bitmap = this.bitmap; - return (bitmap & bit) === 0 - ? notSetValue - : this.nodes[popCount(bitmap & (bit - 1))].get( - shift + SHIFT, - keyHash, - key, - notSetValue - ); -}; - -BitmapIndexedNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { - if (keyHash === undefined) { - keyHash = hash(key); - } - var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; - var bit = 1 << keyHashFrag; - var bitmap = this.bitmap; - var exists = (bitmap & bit) !== 0; - - if (!exists && value === NOT_SET) { - return this; - } - - var idx = popCount(bitmap & (bit - 1)); - var nodes = this.nodes; - var node = exists ? nodes[idx] : undefined; - var newNode = updateNode( - node, - ownerID, - shift + SHIFT, - keyHash, - key, - value, - didChangeSize, - didAlter - ); - - if (newNode === node) { - return this; - } - - if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { - return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); - } - - if ( - exists && - !newNode && - nodes.length === 2 && - isLeafNode(nodes[idx ^ 1]) - ) { - return nodes[idx ^ 1]; - } - - if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) { - return newNode; - } - - var isEditable = ownerID && ownerID === this.ownerID; - var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit; - var newNodes = exists - ? newNode - ? setAt(nodes, idx, newNode, isEditable) - : spliceOut(nodes, idx, isEditable) - : spliceIn(nodes, idx, newNode, isEditable); - - if (isEditable) { - this.bitmap = newBitmap; - this.nodes = newNodes; - return this; - } - - return new BitmapIndexedNode(ownerID, newBitmap, newNodes); -}; - -var HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) { - this.ownerID = ownerID; - this.count = count; - this.nodes = nodes; -}; - -HashArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) { - if (keyHash === undefined) { - keyHash = hash(key); - } - var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; - var node = this.nodes[idx]; - return node - ? node.get(shift + SHIFT, keyHash, key, notSetValue) - : notSetValue; -}; - -HashArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { - if (keyHash === undefined) { - keyHash = hash(key); - } - var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; - var removed = value === NOT_SET; - var nodes = this.nodes; - var node = nodes[idx]; - - if (removed && !node) { - return this; - } - - var newNode = updateNode( - node, - ownerID, - shift + SHIFT, - keyHash, - key, - value, - didChangeSize, - didAlter - ); - if (newNode === node) { - return this; - } - - var newCount = this.count; - if (!node) { - newCount++; - } else if (!newNode) { - newCount--; - if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { - return packNodes(ownerID, nodes, newCount, idx); - } - } - - var isEditable = ownerID && ownerID === this.ownerID; - var newNodes = setAt(nodes, idx, newNode, isEditable); - - if (isEditable) { - this.count = newCount; - this.nodes = newNodes; - return this; - } - - return new HashArrayMapNode(ownerID, newCount, newNodes); -}; - -var HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) { - this.ownerID = ownerID; - this.keyHash = keyHash; - this.entries = entries; -}; - -HashCollisionNode.prototype.get = function get (shift, keyHash, key, notSetValue) { - var entries = this.entries; - for (var ii = 0, len = entries.length; ii < len; ii++) { - if (is(key, entries[ii][0])) { - return entries[ii][1]; - } - } - return notSetValue; -}; - -HashCollisionNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { - if (keyHash === undefined) { - keyHash = hash(key); - } - - var removed = value === NOT_SET; - - if (keyHash !== this.keyHash) { - if (removed) { - return this; - } - SetRef(didAlter); - SetRef(didChangeSize); - return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]); - } - - var entries = this.entries; - var idx = 0; - var len = entries.length; - for (; idx < len; idx++) { - if (is(key, entries[idx][0])) { - break; - } - } - var exists = idx < len; - - if (exists ? entries[idx][1] === value : removed) { - return this; - } - - SetRef(didAlter); - (removed || !exists) && SetRef(didChangeSize); - - if (removed && len === 2) { - return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]); - } - - var isEditable = ownerID && ownerID === this.ownerID; - var newEntries = isEditable ? entries : arrCopy(entries); - - if (exists) { - if (removed) { - idx === len - 1 - ? newEntries.pop() - : (newEntries[idx] = newEntries.pop()); - } else { - newEntries[idx] = [key, value]; - } - } else { - newEntries.push([key, value]); - } - - if (isEditable) { - this.entries = newEntries; - return this; - } - - return new HashCollisionNode(ownerID, this.keyHash, newEntries); -}; - -var ValueNode = function ValueNode(ownerID, keyHash, entry) { - this.ownerID = ownerID; - this.keyHash = keyHash; - this.entry = entry; -}; - -ValueNode.prototype.get = function get (shift, keyHash, key, notSetValue) { - return is(key, this.entry[0]) ? this.entry[1] : notSetValue; -}; - -ValueNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { - var removed = value === NOT_SET; - var keyMatch = is(key, this.entry[0]); - if (keyMatch ? value === this.entry[1] : removed) { - return this; - } - - SetRef(didAlter); - - if (removed) { - SetRef(didChangeSize); - return; // undefined - } - - if (keyMatch) { - if (ownerID && ownerID === this.ownerID) { - this.entry[1] = value; - return this; - } - return new ValueNode(ownerID, this.keyHash, [key, value]); - } - - SetRef(didChangeSize); - return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]); -}; - -// #pragma Iterators - -ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = - function (fn, reverse) { - var entries = this.entries; - for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) { - if (fn(entries[reverse ? maxIndex - ii : ii]) === false) { - return false; - } - } - }; - -BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = - function (fn, reverse) { - var nodes = this.nodes; - for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { - var node = nodes[reverse ? maxIndex - ii : ii]; - if (node && node.iterate(fn, reverse) === false) { - return false; - } - } - }; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -ValueNode.prototype.iterate = function (fn, reverse) { - return fn(this.entry); -}; - -var MapIterator = /*@__PURE__*/(function (Iterator) { - function MapIterator(map, type, reverse) { - this._type = type; - this._reverse = reverse; - this._stack = map._root && mapIteratorFrame(map._root); - } - - if ( Iterator ) MapIterator.__proto__ = Iterator; - MapIterator.prototype = Object.create( Iterator && Iterator.prototype ); - MapIterator.prototype.constructor = MapIterator; - - MapIterator.prototype.next = function next () { - var type = this._type; - var stack = this._stack; - while (stack) { - var node = stack.node; - var index = stack.index++; - var maxIndex = (void 0); - if (node.entry) { - if (index === 0) { - return mapIteratorValue(type, node.entry); - } - } else if (node.entries) { - maxIndex = node.entries.length - 1; - if (index <= maxIndex) { - return mapIteratorValue( - type, - node.entries[this._reverse ? maxIndex - index : index] - ); - } - } else { - maxIndex = node.nodes.length - 1; - if (index <= maxIndex) { - var subNode = node.nodes[this._reverse ? maxIndex - index : index]; - if (subNode) { - if (subNode.entry) { - return mapIteratorValue(type, subNode.entry); - } - stack = this._stack = mapIteratorFrame(subNode, stack); - } - continue; - } - } - stack = this._stack = this._stack.__prev; - } - return iteratorDone(); - }; - - return MapIterator; -}(Iterator)); - -function mapIteratorValue(type, entry) { - return iteratorValue(type, entry[0], entry[1]); -} - -function mapIteratorFrame(node, prev) { - return { - node: node, - index: 0, - __prev: prev, - }; -} - -function makeMap(size, root, ownerID, hash) { - var map = Object.create(MapPrototype); - map.size = size; - map._root = root; - map.__ownerID = ownerID; - map.__hash = hash; - map.__altered = false; - return map; -} - -var EMPTY_MAP; -function emptyMap() { - return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); -} - -function updateMap(map, k, v) { - var newRoot; - var newSize; - if (!map._root) { - if (v === NOT_SET) { - return map; - } - newSize = 1; - newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]); - } else { - var didChangeSize = MakeRef(); - var didAlter = MakeRef(); - newRoot = updateNode( - map._root, - map.__ownerID, - 0, - undefined, - k, - v, - didChangeSize, - didAlter - ); - if (!didAlter.value) { - return map; - } - newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0); - } - if (map.__ownerID) { - map.size = newSize; - map._root = newRoot; - map.__hash = undefined; - map.__altered = true; - return map; - } - return newRoot ? makeMap(newSize, newRoot) : emptyMap(); -} - -function updateNode( - node, - ownerID, - shift, - keyHash, - key, - value, - didChangeSize, - didAlter -) { - if (!node) { - if (value === NOT_SET) { - return node; - } - SetRef(didAlter); - SetRef(didChangeSize); - return new ValueNode(ownerID, keyHash, [key, value]); - } - return node.update( - ownerID, - shift, - keyHash, - key, - value, - didChangeSize, - didAlter - ); -} - -function isLeafNode(node) { - return ( - node.constructor === ValueNode || node.constructor === HashCollisionNode - ); -} - -function mergeIntoNode(node, ownerID, shift, keyHash, entry) { - if (node.keyHash === keyHash) { - return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]); - } - - var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK; - var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; - - var newNode; - var nodes = - idx1 === idx2 - ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] - : ((newNode = new ValueNode(ownerID, keyHash, entry)), - idx1 < idx2 ? [node, newNode] : [newNode, node]); - - return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes); -} - -function createNodes(ownerID, entries, key, value) { - if (!ownerID) { - ownerID = new OwnerID(); - } - var node = new ValueNode(ownerID, hash(key), [key, value]); - for (var ii = 0; ii < entries.length; ii++) { - var entry = entries[ii]; - node = node.update(ownerID, 0, undefined, entry[0], entry[1]); - } - return node; -} - -function packNodes(ownerID, nodes, count, excluding) { - var bitmap = 0; - var packedII = 0; - var packedNodes = new Array(count); - for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) { - var node = nodes[ii]; - if (node !== undefined && ii !== excluding) { - bitmap |= bit; - packedNodes[packedII++] = node; - } - } - return new BitmapIndexedNode(ownerID, bitmap, packedNodes); -} - -function expandNodes(ownerID, nodes, bitmap, including, node) { - var count = 0; - var expandedNodes = new Array(SIZE); - for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { - expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; - } - expandedNodes[including] = node; - return new HashArrayMapNode(ownerID, count + 1, expandedNodes); -} - -function popCount(x) { - x -= (x >> 1) & 0x55555555; - x = (x & 0x33333333) + ((x >> 2) & 0x33333333); - x = (x + (x >> 4)) & 0x0f0f0f0f; - x += x >> 8; - x += x >> 16; - return x & 0x7f; -} - -function setAt(array, idx, val, canEdit) { - var newArray = canEdit ? array : arrCopy(array); - newArray[idx] = val; - return newArray; -} - -function spliceIn(array, idx, val, canEdit) { - var newLen = array.length + 1; - if (canEdit && idx + 1 === newLen) { - array[idx] = val; - return array; - } - var newArray = new Array(newLen); - var after = 0; - for (var ii = 0; ii < newLen; ii++) { - if (ii === idx) { - newArray[ii] = val; - after = -1; - } else { - newArray[ii] = array[ii + after]; - } - } - return newArray; -} - -function spliceOut(array, idx, canEdit) { - var newLen = array.length - 1; - if (canEdit && idx === newLen) { - array.pop(); - return array; - } - var newArray = new Array(newLen); - var after = 0; - for (var ii = 0; ii < newLen; ii++) { - if (ii === idx) { - after = 1; - } - newArray[ii] = array[ii + after]; - } - return newArray; -} - -var MAX_ARRAY_MAP_SIZE = SIZE / 4; -var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; -var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; - -var IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@'; - -function isList(maybeList) { - return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]); -} - -var List = /*@__PURE__*/(function (IndexedCollection) { - function List(value) { - var empty = emptyList(); - if (value === undefined || value === null) { - // eslint-disable-next-line no-constructor-return - return empty; - } - if (isList(value)) { - // eslint-disable-next-line no-constructor-return - return value; - } - var iter = IndexedCollection(value); - var size = iter.size; - if (size === 0) { - // eslint-disable-next-line no-constructor-return - return empty; - } - assertNotInfinite(size); - if (size > 0 && size < SIZE) { - // eslint-disable-next-line no-constructor-return - return makeList(0, size, SHIFT, null, new VNode(iter.toArray())); - } - // eslint-disable-next-line no-constructor-return - return empty.withMutations(function (list) { - list.setSize(size); - iter.forEach(function (v, i) { return list.set(i, v); }); - }); - } - - if ( IndexedCollection ) List.__proto__ = IndexedCollection; - List.prototype = Object.create( IndexedCollection && IndexedCollection.prototype ); - List.prototype.constructor = List; - - List.of = function of (/*...values*/) { - return this(arguments); - }; - - List.prototype.toString = function toString () { - return this.__toString('List [', ']'); - }; - - // @pragma Access - - List.prototype.get = function get (index, notSetValue) { - index = wrapIndex(this, index); - if (index >= 0 && index < this.size) { - index += this._origin; - var node = listNodeFor(this, index); - return node && node.array[index & MASK]; - } - return notSetValue; - }; - - // @pragma Modification - - List.prototype.set = function set (index, value) { - return updateList(this, index, value); - }; - - List.prototype.remove = function remove (index) { - return !this.has(index) - ? this - : index === 0 - ? this.shift() - : index === this.size - 1 - ? this.pop() - : this.splice(index, 1); - }; - - List.prototype.insert = function insert (index, value) { - return this.splice(index, 0, value); - }; - - List.prototype.clear = function clear () { - if (this.size === 0) { - return this; - } - if (this.__ownerID) { - this.size = this._origin = this._capacity = 0; - this._level = SHIFT; - this._root = this._tail = this.__hash = undefined; - this.__altered = true; - return this; - } - return emptyList(); - }; - - List.prototype.push = function push (/*...values*/) { - var values = arguments; - var oldSize = this.size; - return this.withMutations(function (list) { - setListBounds(list, 0, oldSize + values.length); - for (var ii = 0; ii < values.length; ii++) { - list.set(oldSize + ii, values[ii]); - } - }); - }; - - List.prototype.pop = function pop () { - return setListBounds(this, 0, -1); - }; - - List.prototype.unshift = function unshift (/*...values*/) { - var values = arguments; - return this.withMutations(function (list) { - setListBounds(list, -values.length); - for (var ii = 0; ii < values.length; ii++) { - list.set(ii, values[ii]); - } - }); - }; - - List.prototype.shift = function shift () { - return setListBounds(this, 1); - }; - - // @pragma Composition - - List.prototype.concat = function concat (/*...collections*/) { - var arguments$1 = arguments; - - var seqs = []; - for (var i = 0; i < arguments.length; i++) { - var argument = arguments$1[i]; - var seq = IndexedCollection( - typeof argument !== 'string' && hasIterator(argument) - ? argument - : [argument] - ); - if (seq.size !== 0) { - seqs.push(seq); - } - } - if (seqs.length === 0) { - return this; - } - if (this.size === 0 && !this.__ownerID && seqs.length === 1) { - return this.constructor(seqs[0]); - } - return this.withMutations(function (list) { - seqs.forEach(function (seq) { return seq.forEach(function (value) { return list.push(value); }); }); - }); - }; - - List.prototype.setSize = function setSize (size) { - return setListBounds(this, 0, size); - }; - - List.prototype.map = function map (mapper, context) { - var this$1$1 = this; - - return this.withMutations(function (list) { - for (var i = 0; i < this$1$1.size; i++) { - list.set(i, mapper.call(context, list.get(i), i, this$1$1)); - } - }); - }; - - // @pragma Iteration - - List.prototype.slice = function slice (begin, end) { - var size = this.size; - if (wholeSlice(begin, end, size)) { - return this; - } - return setListBounds( - this, - resolveBegin(begin, size), - resolveEnd(end, size) - ); - }; - - List.prototype.__iterator = function __iterator (type, reverse) { - var index = reverse ? this.size : 0; - var values = iterateList(this, reverse); - return new Iterator(function () { - var value = values(); - return value === DONE - ? iteratorDone() - : iteratorValue(type, reverse ? --index : index++, value); - }); - }; - - List.prototype.__iterate = function __iterate (fn, reverse) { - var index = reverse ? this.size : 0; - var values = iterateList(this, reverse); - var value; - while ((value = values()) !== DONE) { - if (fn(value, reverse ? --index : index++, this) === false) { - break; - } - } - return index; - }; - - List.prototype.__ensureOwner = function __ensureOwner (ownerID) { - if (ownerID === this.__ownerID) { - return this; - } - if (!ownerID) { - if (this.size === 0) { - return emptyList(); - } - this.__ownerID = ownerID; - this.__altered = false; - return this; - } - return makeList( - this._origin, - this._capacity, - this._level, - this._root, - this._tail, - ownerID, - this.__hash - ); - }; - - return List; -}(IndexedCollection)); - -List.isList = isList; - -var ListPrototype = List.prototype; -ListPrototype[IS_LIST_SYMBOL] = true; -ListPrototype[DELETE] = ListPrototype.remove; -ListPrototype.merge = ListPrototype.concat; -ListPrototype.setIn = setIn; -ListPrototype.deleteIn = ListPrototype.removeIn = deleteIn; -ListPrototype.update = update; -ListPrototype.updateIn = updateIn; -ListPrototype.mergeIn = mergeIn; -ListPrototype.mergeDeepIn = mergeDeepIn; -ListPrototype.withMutations = withMutations; -ListPrototype.wasAltered = wasAltered; -ListPrototype.asImmutable = asImmutable; -ListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable; -ListPrototype['@@transducer/step'] = function (result, arr) { - return result.push(arr); -}; -ListPrototype['@@transducer/result'] = function (obj) { - return obj.asImmutable(); -}; - -var VNode = function VNode(array, ownerID) { - this.array = array; - this.ownerID = ownerID; -}; - -// TODO: seems like these methods are very similar - -VNode.prototype.removeBefore = function removeBefore (ownerID, level, index) { - if ( - (index & ((1 << (level + SHIFT)) - 1)) === 0 || - this.array.length === 0 - ) { - return this; - } - var originIndex = (index >>> level) & MASK; - if (originIndex >= this.array.length) { - return new VNode([], ownerID); - } - var removingFirst = originIndex === 0; - var newChild; - if (level > 0) { - var oldChild = this.array[originIndex]; - newChild = - oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index); - if (newChild === oldChild && removingFirst) { - return this; - } - } - if (removingFirst && !newChild) { - return this; - } - var editable = editableVNode(this, ownerID); - if (!removingFirst) { - for (var ii = 0; ii < originIndex; ii++) { - editable.array[ii] = undefined; - } - } - if (newChild) { - editable.array[originIndex] = newChild; - } - return editable; -}; - -VNode.prototype.removeAfter = function removeAfter (ownerID, level, index) { - if ( - index === (level ? 1 << (level + SHIFT) : SIZE) || - this.array.length === 0 - ) { - return this; - } - var sizeIndex = ((index - 1) >>> level) & MASK; - if (sizeIndex >= this.array.length) { - return this; - } - - var newChild; - if (level > 0) { - var oldChild = this.array[sizeIndex]; - newChild = - oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); - if (newChild === oldChild && sizeIndex === this.array.length - 1) { - return this; - } - } - - var editable = editableVNode(this, ownerID); - editable.array.splice(sizeIndex + 1); - if (newChild) { - editable.array[sizeIndex] = newChild; - } - return editable; -}; - -var DONE = {}; - -function iterateList(list, reverse) { - var left = list._origin; - var right = list._capacity; - var tailPos = getTailOffset(right); - var tail = list._tail; - - return iterateNodeOrLeaf(list._root, list._level, 0); - - function iterateNodeOrLeaf(node, level, offset) { - return level === 0 - ? iterateLeaf(node, offset) - : iterateNode(node, level, offset); - } - - function iterateLeaf(node, offset) { - var array = offset === tailPos ? tail && tail.array : node && node.array; - var from = offset > left ? 0 : left - offset; - var to = right - offset; - if (to > SIZE) { - to = SIZE; - } - return function () { - if (from === to) { - return DONE; - } - var idx = reverse ? --to : from++; - return array && array[idx]; - }; - } - - function iterateNode(node, level, offset) { - var values; - var array = node && node.array; - var from = offset > left ? 0 : (left - offset) >> level; - var to = ((right - offset) >> level) + 1; - if (to > SIZE) { - to = SIZE; - } - return function () { - while (true) { - if (values) { - var value = values(); - if (value !== DONE) { - return value; - } - values = null; - } - if (from === to) { - return DONE; - } - var idx = reverse ? --to : from++; - values = iterateNodeOrLeaf( - array && array[idx], - level - SHIFT, - offset + (idx << level) - ); - } - }; - } -} - -function makeList(origin, capacity, level, root, tail, ownerID, hash) { - var list = Object.create(ListPrototype); - list.size = capacity - origin; - list._origin = origin; - list._capacity = capacity; - list._level = level; - list._root = root; - list._tail = tail; - list.__ownerID = ownerID; - list.__hash = hash; - list.__altered = false; - return list; -} - -function emptyList() { - return makeList(0, 0, SHIFT); -} - -function updateList(list, index, value) { - index = wrapIndex(list, index); - - if (index !== index) { - return list; - } - - if (index >= list.size || index < 0) { - return list.withMutations(function (list) { - index < 0 - ? setListBounds(list, index).set(0, value) - : setListBounds(list, 0, index + 1).set(index, value); - }); - } - - index += list._origin; - - var newTail = list._tail; - var newRoot = list._root; - var didAlter = MakeRef(); - if (index >= getTailOffset(list._capacity)) { - newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter); - } else { - newRoot = updateVNode( - newRoot, - list.__ownerID, - list._level, - index, - value, - didAlter - ); - } - - if (!didAlter.value) { - return list; - } - - if (list.__ownerID) { - list._root = newRoot; - list._tail = newTail; - list.__hash = undefined; - list.__altered = true; - return list; - } - return makeList(list._origin, list._capacity, list._level, newRoot, newTail); -} - -function updateVNode(node, ownerID, level, index, value, didAlter) { - var idx = (index >>> level) & MASK; - var nodeHas = node && idx < node.array.length; - if (!nodeHas && value === undefined) { - return node; - } - - var newNode; - - if (level > 0) { - var lowerNode = node && node.array[idx]; - var newLowerNode = updateVNode( - lowerNode, - ownerID, - level - SHIFT, - index, - value, - didAlter - ); - if (newLowerNode === lowerNode) { - return node; - } - newNode = editableVNode(node, ownerID); - newNode.array[idx] = newLowerNode; - return newNode; - } - - if (nodeHas && node.array[idx] === value) { - return node; - } - - if (didAlter) { - SetRef(didAlter); - } - - newNode = editableVNode(node, ownerID); - if (value === undefined && idx === newNode.array.length - 1) { - newNode.array.pop(); - } else { - newNode.array[idx] = value; - } - return newNode; -} - -function editableVNode(node, ownerID) { - if (ownerID && node && ownerID === node.ownerID) { - return node; - } - return new VNode(node ? node.array.slice() : [], ownerID); -} - -function listNodeFor(list, rawIndex) { - if (rawIndex >= getTailOffset(list._capacity)) { - return list._tail; - } - if (rawIndex < 1 << (list._level + SHIFT)) { - var node = list._root; - var level = list._level; - while (node && level > 0) { - node = node.array[(rawIndex >>> level) & MASK]; - level -= SHIFT; - } - return node; - } -} - -function setListBounds(list, begin, end) { - // Sanitize begin & end using this shorthand for ToInt32(argument) - // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 - if (begin !== undefined) { - begin |= 0; - } - if (end !== undefined) { - end |= 0; - } - var owner = list.__ownerID || new OwnerID(); - var oldOrigin = list._origin; - var oldCapacity = list._capacity; - var newOrigin = oldOrigin + begin; - var newCapacity = - end === undefined - ? oldCapacity - : end < 0 - ? oldCapacity + end - : oldOrigin + end; - if (newOrigin === oldOrigin && newCapacity === oldCapacity) { - return list; - } - - // If it's going to end after it starts, it's empty. - if (newOrigin >= newCapacity) { - return list.clear(); - } - - var newLevel = list._level; - var newRoot = list._root; - - // New origin might need creating a higher root. - var offsetShift = 0; - while (newOrigin + offsetShift < 0) { - newRoot = new VNode( - newRoot && newRoot.array.length ? [undefined, newRoot] : [], - owner - ); - newLevel += SHIFT; - offsetShift += 1 << newLevel; - } - if (offsetShift) { - newOrigin += offsetShift; - oldOrigin += offsetShift; - newCapacity += offsetShift; - oldCapacity += offsetShift; - } - - var oldTailOffset = getTailOffset(oldCapacity); - var newTailOffset = getTailOffset(newCapacity); - - // New size might need creating a higher root. - while (newTailOffset >= 1 << (newLevel + SHIFT)) { - newRoot = new VNode( - newRoot && newRoot.array.length ? [newRoot] : [], - owner - ); - newLevel += SHIFT; - } - - // Locate or create the new tail. - var oldTail = list._tail; - var newTail = - newTailOffset < oldTailOffset - ? listNodeFor(list, newCapacity - 1) - : newTailOffset > oldTailOffset - ? new VNode([], owner) - : oldTail; - - // Merge Tail into tree. - if ( - oldTail && - newTailOffset > oldTailOffset && - newOrigin < oldCapacity && - oldTail.array.length - ) { - newRoot = editableVNode(newRoot, owner); - var node = newRoot; - for (var level = newLevel; level > SHIFT; level -= SHIFT) { - var idx = (oldTailOffset >>> level) & MASK; - node = node.array[idx] = editableVNode(node.array[idx], owner); - } - node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail; - } - - // If the size has been reduced, there's a chance the tail needs to be trimmed. - if (newCapacity < oldCapacity) { - newTail = newTail && newTail.removeAfter(owner, 0, newCapacity); - } - - // If the new origin is within the tail, then we do not need a root. - if (newOrigin >= newTailOffset) { - newOrigin -= newTailOffset; - newCapacity -= newTailOffset; - newLevel = SHIFT; - newRoot = null; - newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); - - // Otherwise, if the root has been trimmed, garbage collect. - } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { - offsetShift = 0; - - // Identify the new top root node of the subtree of the old root. - while (newRoot) { - var beginIndex = (newOrigin >>> newLevel) & MASK; - if ((beginIndex !== newTailOffset >>> newLevel) & MASK) { - break; - } - if (beginIndex) { - offsetShift += (1 << newLevel) * beginIndex; - } - newLevel -= SHIFT; - newRoot = newRoot.array[beginIndex]; - } - - // Trim the new sides of the new root. - if (newRoot && newOrigin > oldOrigin) { - newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift); - } - if (newRoot && newTailOffset < oldTailOffset) { - newRoot = newRoot.removeAfter( - owner, - newLevel, - newTailOffset - offsetShift - ); - } - if (offsetShift) { - newOrigin -= offsetShift; - newCapacity -= offsetShift; - } - } - - if (list.__ownerID) { - list.size = newCapacity - newOrigin; - list._origin = newOrigin; - list._capacity = newCapacity; - list._level = newLevel; - list._root = newRoot; - list._tail = newTail; - list.__hash = undefined; - list.__altered = true; - return list; - } - return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); -} - -function getTailOffset(size) { - return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT; -} - -var OrderedMap = /*@__PURE__*/(function (Map) { - function OrderedMap(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptyOrderedMap() - : isOrderedMap(value) - ? value - : emptyOrderedMap().withMutations(function (map) { - var iter = KeyedCollection(value); - assertNotInfinite(iter.size); - iter.forEach(function (v, k) { return map.set(k, v); }); - }); - } - - if ( Map ) OrderedMap.__proto__ = Map; - OrderedMap.prototype = Object.create( Map && Map.prototype ); - OrderedMap.prototype.constructor = OrderedMap; - - OrderedMap.of = function of (/*...values*/) { - return this(arguments); - }; - - OrderedMap.prototype.toString = function toString () { - return this.__toString('OrderedMap {', '}'); - }; - - // @pragma Access - - OrderedMap.prototype.get = function get (k, notSetValue) { - var index = this._map.get(k); - return index !== undefined ? this._list.get(index)[1] : notSetValue; - }; - - // @pragma Modification - - OrderedMap.prototype.clear = function clear () { - if (this.size === 0) { - return this; - } - if (this.__ownerID) { - this.size = 0; - this._map.clear(); - this._list.clear(); - this.__altered = true; - return this; - } - return emptyOrderedMap(); - }; - - OrderedMap.prototype.set = function set (k, v) { - return updateOrderedMap(this, k, v); - }; - - OrderedMap.prototype.remove = function remove (k) { - return updateOrderedMap(this, k, NOT_SET); - }; - - OrderedMap.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - return this._list.__iterate( - function (entry) { return entry && fn(entry[1], entry[0], this$1$1); }, - reverse - ); - }; - - OrderedMap.prototype.__iterator = function __iterator (type, reverse) { - return this._list.fromEntrySeq().__iterator(type, reverse); - }; - - OrderedMap.prototype.__ensureOwner = function __ensureOwner (ownerID) { - if (ownerID === this.__ownerID) { - return this; - } - var newMap = this._map.__ensureOwner(ownerID); - var newList = this._list.__ensureOwner(ownerID); - if (!ownerID) { - if (this.size === 0) { - return emptyOrderedMap(); - } - this.__ownerID = ownerID; - this.__altered = false; - this._map = newMap; - this._list = newList; - return this; - } - return makeOrderedMap(newMap, newList, ownerID, this.__hash); - }; - - return OrderedMap; -}(Map)); - -OrderedMap.isOrderedMap = isOrderedMap; - -OrderedMap.prototype[IS_ORDERED_SYMBOL] = true; -OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; - -function makeOrderedMap(map, list, ownerID, hash) { - var omap = Object.create(OrderedMap.prototype); - omap.size = map ? map.size : 0; - omap._map = map; - omap._list = list; - omap.__ownerID = ownerID; - omap.__hash = hash; - omap.__altered = false; - return omap; -} - -var EMPTY_ORDERED_MAP; -function emptyOrderedMap() { - return ( - EMPTY_ORDERED_MAP || - (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())) - ); -} - -function updateOrderedMap(omap, k, v) { - var map = omap._map; - var list = omap._list; - var i = map.get(k); - var has = i !== undefined; - var newMap; - var newList; - if (v === NOT_SET) { - // removed - if (!has) { - return omap; - } - if (list.size >= SIZE && list.size >= map.size * 2) { - newList = list.filter(function (entry, idx) { return entry !== undefined && i !== idx; }); - newMap = newList - .toKeyedSeq() - .map(function (entry) { return entry[0]; }) - .flip() - .toMap(); - if (omap.__ownerID) { - newMap.__ownerID = newList.__ownerID = omap.__ownerID; - } - } else { - newMap = map.remove(k); - newList = i === list.size - 1 ? list.pop() : list.set(i, undefined); - } - } else if (has) { - if (v === list.get(i)[1]) { - return omap; - } - newMap = map; - newList = list.set(i, [k, v]); - } else { - newMap = map.set(k, list.size); - newList = list.set(list.size, [k, v]); - } - if (omap.__ownerID) { - omap.size = newMap.size; - omap._map = newMap; - omap._list = newList; - omap.__hash = undefined; - omap.__altered = true; - return omap; - } - return makeOrderedMap(newMap, newList); -} - -var IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@'; - -function isStack(maybeStack) { - return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]); -} - -var Stack = /*@__PURE__*/(function (IndexedCollection) { - function Stack(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptyStack() - : isStack(value) - ? value - : emptyStack().pushAll(value); - } - - if ( IndexedCollection ) Stack.__proto__ = IndexedCollection; - Stack.prototype = Object.create( IndexedCollection && IndexedCollection.prototype ); - Stack.prototype.constructor = Stack; - - Stack.of = function of (/*...values*/) { - return this(arguments); - }; - - Stack.prototype.toString = function toString () { - return this.__toString('Stack [', ']'); - }; - - // @pragma Access - - Stack.prototype.get = function get (index, notSetValue) { - var head = this._head; - index = wrapIndex(this, index); - while (head && index--) { - head = head.next; - } - return head ? head.value : notSetValue; - }; - - Stack.prototype.peek = function peek () { - return this._head && this._head.value; - }; - - // @pragma Modification - - Stack.prototype.push = function push (/*...values*/) { - var arguments$1 = arguments; - - if (arguments.length === 0) { - return this; - } - var newSize = this.size + arguments.length; - var head = this._head; - for (var ii = arguments.length - 1; ii >= 0; ii--) { - head = { - value: arguments$1[ii], - next: head, - }; - } - if (this.__ownerID) { - this.size = newSize; - this._head = head; - this.__hash = undefined; - this.__altered = true; - return this; - } - return makeStack(newSize, head); - }; - - Stack.prototype.pushAll = function pushAll (iter) { - iter = IndexedCollection(iter); - if (iter.size === 0) { - return this; - } - if (this.size === 0 && isStack(iter)) { - return iter; - } - assertNotInfinite(iter.size); - var newSize = this.size; - var head = this._head; - iter.__iterate(function (value) { - newSize++; - head = { - value: value, - next: head, - }; - }, /* reverse */ true); - if (this.__ownerID) { - this.size = newSize; - this._head = head; - this.__hash = undefined; - this.__altered = true; - return this; - } - return makeStack(newSize, head); - }; - - Stack.prototype.pop = function pop () { - return this.slice(1); - }; - - Stack.prototype.clear = function clear () { - if (this.size === 0) { - return this; - } - if (this.__ownerID) { - this.size = 0; - this._head = undefined; - this.__hash = undefined; - this.__altered = true; - return this; - } - return emptyStack(); - }; - - Stack.prototype.slice = function slice (begin, end) { - if (wholeSlice(begin, end, this.size)) { - return this; - } - var resolvedBegin = resolveBegin(begin, this.size); - var resolvedEnd = resolveEnd(end, this.size); - if (resolvedEnd !== this.size) { - // super.slice(begin, end); - return IndexedCollection.prototype.slice.call(this, begin, end); - } - var newSize = this.size - resolvedBegin; - var head = this._head; - while (resolvedBegin--) { - head = head.next; - } - if (this.__ownerID) { - this.size = newSize; - this._head = head; - this.__hash = undefined; - this.__altered = true; - return this; - } - return makeStack(newSize, head); - }; - - // @pragma Mutability - - Stack.prototype.__ensureOwner = function __ensureOwner (ownerID) { - if (ownerID === this.__ownerID) { - return this; - } - if (!ownerID) { - if (this.size === 0) { - return emptyStack(); - } - this.__ownerID = ownerID; - this.__altered = false; - return this; - } - return makeStack(this.size, this._head, ownerID, this.__hash); - }; - - // @pragma Iteration - - Stack.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - if (reverse) { - return new ArraySeq(this.toArray()).__iterate( - function (v, k) { return fn(v, k, this$1$1); }, - reverse - ); - } - var iterations = 0; - var node = this._head; - while (node) { - if (fn(node.value, iterations++, this) === false) { - break; - } - node = node.next; - } - return iterations; - }; - - Stack.prototype.__iterator = function __iterator (type, reverse) { - if (reverse) { - return new ArraySeq(this.toArray()).__iterator(type, reverse); - } - var iterations = 0; - var node = this._head; - return new Iterator(function () { - if (node) { - var value = node.value; - node = node.next; - return iteratorValue(type, iterations++, value); - } - return iteratorDone(); - }); - }; - - return Stack; -}(IndexedCollection)); - -Stack.isStack = isStack; - -var StackPrototype = Stack.prototype; -StackPrototype[IS_STACK_SYMBOL] = true; -StackPrototype.shift = StackPrototype.pop; -StackPrototype.unshift = StackPrototype.push; -StackPrototype.unshiftAll = StackPrototype.pushAll; -StackPrototype.withMutations = withMutations; -StackPrototype.wasAltered = wasAltered; -StackPrototype.asImmutable = asImmutable; -StackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable; -StackPrototype['@@transducer/step'] = function (result, arr) { - return result.unshift(arr); -}; -StackPrototype['@@transducer/result'] = function (obj) { - return obj.asImmutable(); -}; - -function makeStack(size, head, ownerID, hash) { - var map = Object.create(StackPrototype); - map.size = size; - map._head = head; - map.__ownerID = ownerID; - map.__hash = hash; - map.__altered = false; - return map; -} - -var EMPTY_STACK; -function emptyStack() { - return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); -} - -var IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@'; - -function isSet(maybeSet) { - return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]); -} - -function isOrderedSet(maybeOrderedSet) { - return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); -} - -function deepEqual(a, b) { - if (a === b) { - return true; - } - - if ( - !isCollection(b) || - (a.size !== undefined && b.size !== undefined && a.size !== b.size) || - (a.__hash !== undefined && - b.__hash !== undefined && - a.__hash !== b.__hash) || - isKeyed(a) !== isKeyed(b) || - isIndexed(a) !== isIndexed(b) || - isOrdered(a) !== isOrdered(b) - ) { - return false; - } - - if (a.size === 0 && b.size === 0) { - return true; - } - - var notAssociative = !isAssociative(a); - - if (isOrdered(a)) { - var entries = a.entries(); - return ( - b.every(function (v, k) { - var entry = entries.next().value; - return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); - }) && entries.next().done - ); - } - - var flipped = false; - - if (a.size === undefined) { - if (b.size === undefined) { - if (typeof a.cacheResult === 'function') { - a.cacheResult(); - } - } else { - flipped = true; - var _ = a; - a = b; - b = _; - } - } - - var allEqual = true; - var bSize = b.__iterate(function (v, k) { - if ( - notAssociative - ? !a.has(v) - : flipped - ? !is(v, a.get(k, NOT_SET)) - : !is(a.get(k, NOT_SET), v) - ) { - allEqual = false; - return false; - } - }); - - return allEqual && a.size === bSize; -} - -/** - * Contributes additional methods to a constructor - */ -function mixin(ctor, methods) { - var keyCopier = function (key) { - ctor.prototype[key] = methods[key]; - }; - Object.keys(methods).forEach(keyCopier); - Object.getOwnPropertySymbols && - Object.getOwnPropertySymbols(methods).forEach(keyCopier); - return ctor; -} - -function toJS(value) { - if (!value || typeof value !== 'object') { - return value; - } - if (!isCollection(value)) { - if (!isDataStructure(value)) { - return value; - } - value = Seq(value); - } - if (isKeyed(value)) { - var result$1 = {}; - value.__iterate(function (v, k) { - result$1[k] = toJS(v); - }); - return result$1; - } - var result = []; - value.__iterate(function (v) { - result.push(toJS(v)); - }); - return result; -} - -var Set = /*@__PURE__*/(function (SetCollection) { - function Set(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptySet() - : isSet(value) && !isOrdered(value) - ? value - : emptySet().withMutations(function (set) { - var iter = SetCollection(value); - assertNotInfinite(iter.size); - iter.forEach(function (v) { return set.add(v); }); - }); - } - - if ( SetCollection ) Set.__proto__ = SetCollection; - Set.prototype = Object.create( SetCollection && SetCollection.prototype ); - Set.prototype.constructor = Set; - - Set.of = function of (/*...values*/) { - return this(arguments); - }; - - Set.fromKeys = function fromKeys (value) { - return this(KeyedCollection(value).keySeq()); - }; - - Set.intersect = function intersect (sets) { - sets = Collection(sets).toArray(); - return sets.length - ? SetPrototype.intersect.apply(Set(sets.pop()), sets) - : emptySet(); - }; - - Set.union = function union (sets) { - sets = Collection(sets).toArray(); - return sets.length - ? SetPrototype.union.apply(Set(sets.pop()), sets) - : emptySet(); - }; - - Set.prototype.toString = function toString () { - return this.__toString('Set {', '}'); - }; - - // @pragma Access - - Set.prototype.has = function has (value) { - return this._map.has(value); - }; - - // @pragma Modification - - Set.prototype.add = function add (value) { - return updateSet(this, this._map.set(value, value)); - }; - - Set.prototype.remove = function remove (value) { - return updateSet(this, this._map.remove(value)); - }; - - Set.prototype.clear = function clear () { - return updateSet(this, this._map.clear()); - }; - - // @pragma Composition - - Set.prototype.map = function map (mapper, context) { - var this$1$1 = this; - - // keep track if the set is altered by the map function - var didChanges = false; - - var newMap = updateSet( - this, - this._map.mapEntries(function (ref) { - var v = ref[1]; - - var mapped = mapper.call(context, v, v, this$1$1); - - if (mapped !== v) { - didChanges = true; - } - - return [mapped, mapped]; - }, context) - ); - - return didChanges ? newMap : this; - }; - - Set.prototype.union = function union () { - var iters = [], len = arguments.length; - while ( len-- ) iters[ len ] = arguments[ len ]; - - iters = iters.filter(function (x) { return x.size !== 0; }); - if (iters.length === 0) { - return this; - } - if (this.size === 0 && !this.__ownerID && iters.length === 1) { - return this.constructor(iters[0]); - } - return this.withMutations(function (set) { - for (var ii = 0; ii < iters.length; ii++) { - if (typeof iters[ii] === 'string') { - set.add(iters[ii]); - } else { - SetCollection(iters[ii]).forEach(function (value) { return set.add(value); }); - } - } - }); - }; - - Set.prototype.intersect = function intersect () { - var iters = [], len = arguments.length; - while ( len-- ) iters[ len ] = arguments[ len ]; - - if (iters.length === 0) { - return this; - } - iters = iters.map(function (iter) { return SetCollection(iter); }); - var toRemove = []; - this.forEach(function (value) { - if (!iters.every(function (iter) { return iter.includes(value); })) { - toRemove.push(value); - } - }); - return this.withMutations(function (set) { - toRemove.forEach(function (value) { - set.remove(value); - }); - }); - }; - - Set.prototype.subtract = function subtract () { - var iters = [], len = arguments.length; - while ( len-- ) iters[ len ] = arguments[ len ]; - - if (iters.length === 0) { - return this; - } - iters = iters.map(function (iter) { return SetCollection(iter); }); - var toRemove = []; - this.forEach(function (value) { - if (iters.some(function (iter) { return iter.includes(value); })) { - toRemove.push(value); - } - }); - return this.withMutations(function (set) { - toRemove.forEach(function (value) { - set.remove(value); - }); - }); - }; - - Set.prototype.sort = function sort (comparator) { - // Late binding - return OrderedSet(sortFactory(this, comparator)); - }; - - Set.prototype.sortBy = function sortBy (mapper, comparator) { - // Late binding - return OrderedSet(sortFactory(this, comparator, mapper)); - }; - - Set.prototype.wasAltered = function wasAltered () { - return this._map.wasAltered(); - }; - - Set.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - return this._map.__iterate(function (k) { return fn(k, k, this$1$1); }, reverse); - }; - - Set.prototype.__iterator = function __iterator (type, reverse) { - return this._map.__iterator(type, reverse); - }; - - Set.prototype.__ensureOwner = function __ensureOwner (ownerID) { - if (ownerID === this.__ownerID) { - return this; - } - var newMap = this._map.__ensureOwner(ownerID); - if (!ownerID) { - if (this.size === 0) { - return this.__empty(); - } - this.__ownerID = ownerID; - this._map = newMap; - return this; - } - return this.__make(newMap, ownerID); - }; - - return Set; -}(SetCollection)); - -Set.isSet = isSet; - -var SetPrototype = Set.prototype; -SetPrototype[IS_SET_SYMBOL] = true; -SetPrototype[DELETE] = SetPrototype.remove; -SetPrototype.merge = SetPrototype.concat = SetPrototype.union; -SetPrototype.withMutations = withMutations; -SetPrototype.asImmutable = asImmutable; -SetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable; -SetPrototype['@@transducer/step'] = function (result, arr) { - return result.add(arr); -}; -SetPrototype['@@transducer/result'] = function (obj) { - return obj.asImmutable(); -}; - -SetPrototype.__empty = emptySet; -SetPrototype.__make = makeSet; - -function updateSet(set, newMap) { - if (set.__ownerID) { - set.size = newMap.size; - set._map = newMap; - return set; - } - return newMap === set._map - ? set - : newMap.size === 0 - ? set.__empty() - : set.__make(newMap); -} - -function makeSet(map, ownerID) { - var set = Object.create(SetPrototype); - set.size = map ? map.size : 0; - set._map = map; - set.__ownerID = ownerID; - return set; -} - -var EMPTY_SET; -function emptySet() { - return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); -} - -/** - * Returns a lazy seq of nums from start (inclusive) to end - * (exclusive), by step, where start defaults to 0, step to 1, and end to - * infinity. When start is equal to end, returns empty list. - */ -var Range = /*@__PURE__*/(function (IndexedSeq) { - function Range(start, end, step) { - if ( step === void 0 ) step = 1; - - if (!(this instanceof Range)) { - // eslint-disable-next-line no-constructor-return - return new Range(start, end, step); - } - invariant(step !== 0, 'Cannot step a Range by 0'); - invariant( - start !== undefined, - 'You must define a start value when using Range' - ); - invariant( - end !== undefined, - 'You must define an end value when using Range' - ); - - step = Math.abs(step); - if (end < start) { - step = -step; - } - this._start = start; - this._end = end; - this._step = step; - this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1); - if (this.size === 0) { - if (EMPTY_RANGE) { - // eslint-disable-next-line no-constructor-return - return EMPTY_RANGE; - } - // eslint-disable-next-line @typescript-eslint/no-this-alias - EMPTY_RANGE = this; - } - } - - if ( IndexedSeq ) Range.__proto__ = IndexedSeq; - Range.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); - Range.prototype.constructor = Range; - - Range.prototype.toString = function toString () { - if (this.size === 0) { - return 'Range []'; - } - return ( - 'Range [ ' + - this._start + - '...' + - this._end + - (this._step !== 1 ? ' by ' + this._step : '') + - ' ]' - ); - }; - - Range.prototype.get = function get (index, notSetValue) { - return this.has(index) - ? this._start + wrapIndex(this, index) * this._step - : notSetValue; - }; - - Range.prototype.includes = function includes (searchValue) { - var possibleIndex = (searchValue - this._start) / this._step; - return ( - possibleIndex >= 0 && - possibleIndex < this.size && - possibleIndex === Math.floor(possibleIndex) - ); - }; - - Range.prototype.slice = function slice (begin, end) { - if (wholeSlice(begin, end, this.size)) { - return this; - } - begin = resolveBegin(begin, this.size); - end = resolveEnd(end, this.size); - if (end <= begin) { - return new Range(0, 0); - } - return new Range( - this.get(begin, this._end), - this.get(end, this._end), - this._step - ); - }; - - Range.prototype.indexOf = function indexOf (searchValue) { - var offsetValue = searchValue - this._start; - if (offsetValue % this._step === 0) { - var index = offsetValue / this._step; - if (index >= 0 && index < this.size) { - return index; - } - } - return -1; - }; - - Range.prototype.lastIndexOf = function lastIndexOf (searchValue) { - return this.indexOf(searchValue); - }; - - Range.prototype.__iterate = function __iterate (fn, reverse) { - var size = this.size; - var step = this._step; - var value = reverse ? this._start + (size - 1) * step : this._start; - var i = 0; - while (i !== size) { - if (fn(value, reverse ? size - ++i : i++, this) === false) { - break; - } - value += reverse ? -step : step; - } - return i; - }; - - Range.prototype.__iterator = function __iterator (type, reverse) { - var size = this.size; - var step = this._step; - var value = reverse ? this._start + (size - 1) * step : this._start; - var i = 0; - return new Iterator(function () { - if (i === size) { - return iteratorDone(); - } - var v = value; - value += reverse ? -step : step; - return iteratorValue(type, reverse ? size - ++i : i++, v); - }); - }; - - Range.prototype.equals = function equals (other) { - return other instanceof Range - ? this._start === other._start && - this._end === other._end && - this._step === other._step - : deepEqual(this, other); - }; - - return Range; -}(IndexedSeq)); - -var EMPTY_RANGE; - -function getIn$1(collection, searchKeyPath, notSetValue) { - var keyPath = coerceKeyPath(searchKeyPath); - var i = 0; - while (i !== keyPath.length) { - collection = get(collection, keyPath[i++], NOT_SET); - if (collection === NOT_SET) { - return notSetValue; - } - } - return collection; -} - -function getIn(searchKeyPath, notSetValue) { - return getIn$1(this, searchKeyPath, notSetValue); -} - -function hasIn$1(collection, keyPath) { - return getIn$1(collection, keyPath, NOT_SET) !== NOT_SET; -} - -function hasIn(searchKeyPath) { - return hasIn$1(this, searchKeyPath); -} - -function toObject() { - assertNotInfinite(this.size); - var object = {}; - this.__iterate(function (v, k) { - object[k] = v; - }); - return object; -} - -Collection.Iterator = Iterator; - -mixin(Collection, { - // ### Conversion to other types - - toArray: function toArray() { - assertNotInfinite(this.size); - var array = new Array(this.size || 0); - var useTuples = isKeyed(this); - var i = 0; - this.__iterate(function (v, k) { - // Keyed collections produce an array of tuples. - array[i++] = useTuples ? [k, v] : v; - }); - return array; - }, - - toIndexedSeq: function toIndexedSeq() { - return new ToIndexedSequence(this); - }, - - toJS: function toJS$1() { - return toJS(this); - }, - - toKeyedSeq: function toKeyedSeq() { - return new ToKeyedSequence(this, true); - }, - - toMap: function toMap() { - // Use Late Binding here to solve the circular dependency. - return Map(this.toKeyedSeq()); - }, - - toObject: toObject, - - toOrderedMap: function toOrderedMap() { - // Use Late Binding here to solve the circular dependency. - return OrderedMap(this.toKeyedSeq()); - }, - - toOrderedSet: function toOrderedSet() { - // Use Late Binding here to solve the circular dependency. - return OrderedSet(isKeyed(this) ? this.valueSeq() : this); - }, - - toSet: function toSet() { - // Use Late Binding here to solve the circular dependency. - return Set(isKeyed(this) ? this.valueSeq() : this); - }, - - toSetSeq: function toSetSeq() { - return new ToSetSequence(this); - }, - - toSeq: function toSeq() { - return isIndexed(this) - ? this.toIndexedSeq() - : isKeyed(this) - ? this.toKeyedSeq() - : this.toSetSeq(); - }, - - toStack: function toStack() { - // Use Late Binding here to solve the circular dependency. - return Stack(isKeyed(this) ? this.valueSeq() : this); - }, - - toList: function toList() { - // Use Late Binding here to solve the circular dependency. - return List(isKeyed(this) ? this.valueSeq() : this); - }, - - // ### Common JavaScript methods and properties - - toString: function toString() { - return '[Collection]'; - }, - - __toString: function __toString(head, tail) { - if (this.size === 0) { - return head + tail; - } - return ( - head + - ' ' + - this.toSeq().map(this.__toStringMapper).join(', ') + - ' ' + - tail - ); - }, - - // ### ES6 Collection methods (ES6 Array and Map) - - concat: function concat() { - var values = [], len = arguments.length; - while ( len-- ) values[ len ] = arguments[ len ]; - - return reify(this, concatFactory(this, values)); - }, - - includes: function includes(searchValue) { - return this.some(function (value) { return is(value, searchValue); }); - }, - - entries: function entries() { - return this.__iterator(ITERATE_ENTRIES); - }, - - every: function every(predicate, context) { - assertNotInfinite(this.size); - var returnValue = true; - this.__iterate(function (v, k, c) { - if (!predicate.call(context, v, k, c)) { - returnValue = false; - return false; - } - }); - return returnValue; - }, - - filter: function filter(predicate, context) { - return reify(this, filterFactory(this, predicate, context, true)); - }, - - partition: function partition(predicate, context) { - return partitionFactory(this, predicate, context); - }, - - find: function find(predicate, context, notSetValue) { - var entry = this.findEntry(predicate, context); - return entry ? entry[1] : notSetValue; - }, - - forEach: function forEach(sideEffect, context) { - assertNotInfinite(this.size); - return this.__iterate(context ? sideEffect.bind(context) : sideEffect); - }, - - join: function join(separator) { - assertNotInfinite(this.size); - separator = separator !== undefined ? '' + separator : ','; - var joined = ''; - var isFirst = true; - this.__iterate(function (v) { - isFirst ? (isFirst = false) : (joined += separator); - joined += v !== null && v !== undefined ? v.toString() : ''; - }); - return joined; - }, - - keys: function keys() { - return this.__iterator(ITERATE_KEYS); - }, - - map: function map(mapper, context) { - return reify(this, mapFactory(this, mapper, context)); - }, - - reduce: function reduce$1(reducer, initialReduction, context) { - return reduce( - this, - reducer, - initialReduction, - context, - arguments.length < 2, - false - ); - }, - - reduceRight: function reduceRight(reducer, initialReduction, context) { - return reduce( - this, - reducer, - initialReduction, - context, - arguments.length < 2, - true - ); - }, - - reverse: function reverse() { - return reify(this, reverseFactory(this, true)); - }, - - slice: function slice(begin, end) { - return reify(this, sliceFactory(this, begin, end, true)); - }, - - some: function some(predicate, context) { - assertNotInfinite(this.size); - var returnValue = false; - this.__iterate(function (v, k, c) { - if (predicate.call(context, v, k, c)) { - returnValue = true; - return false; - } - }); - return returnValue; - }, - - sort: function sort(comparator) { - return reify(this, sortFactory(this, comparator)); - }, - - values: function values() { - return this.__iterator(ITERATE_VALUES); - }, - - // ### More sequential methods - - butLast: function butLast() { - return this.slice(0, -1); - }, - - isEmpty: function isEmpty() { - return this.size !== undefined ? this.size === 0 : !this.some(function () { return true; }); - }, - - count: function count(predicate, context) { - return ensureSize( - predicate ? this.toSeq().filter(predicate, context) : this - ); - }, - - countBy: function countBy(grouper, context) { - return countByFactory(this, grouper, context); - }, - - equals: function equals(other) { - return deepEqual(this, other); - }, - - entrySeq: function entrySeq() { - // eslint-disable-next-line @typescript-eslint/no-this-alias - var collection = this; - if (collection._cache) { - // We cache as an entries array, so we can just return the cache! - return new ArraySeq(collection._cache); - } - var entriesSequence = collection.toSeq().map(entryMapper).toIndexedSeq(); - entriesSequence.fromEntrySeq = function () { return collection.toSeq(); }; - return entriesSequence; - }, - - filterNot: function filterNot(predicate, context) { - return this.filter(not(predicate), context); - }, - - findEntry: function findEntry(predicate, context, notSetValue) { - var found = notSetValue; - this.__iterate(function (v, k, c) { - if (predicate.call(context, v, k, c)) { - found = [k, v]; - return false; - } - }); - return found; - }, - - findKey: function findKey(predicate, context) { - var entry = this.findEntry(predicate, context); - return entry && entry[0]; - }, - - findLast: function findLast(predicate, context, notSetValue) { - return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); - }, - - findLastEntry: function findLastEntry(predicate, context, notSetValue) { - return this.toKeyedSeq() - .reverse() - .findEntry(predicate, context, notSetValue); - }, - - findLastKey: function findLastKey(predicate, context) { - return this.toKeyedSeq().reverse().findKey(predicate, context); - }, - - first: function first(notSetValue) { - return this.find(returnTrue, null, notSetValue); - }, - - flatMap: function flatMap(mapper, context) { - return reify(this, flatMapFactory(this, mapper, context)); - }, - - flatten: function flatten(depth) { - return reify(this, flattenFactory(this, depth, true)); - }, - - fromEntrySeq: function fromEntrySeq() { - return new FromEntriesSequence(this); - }, - - get: function get(searchKey, notSetValue) { - return this.find(function (_, key) { return is(key, searchKey); }, undefined, notSetValue); - }, - - getIn: getIn, - - groupBy: function groupBy(grouper, context) { - return groupByFactory(this, grouper, context); - }, - - has: function has(searchKey) { - return this.get(searchKey, NOT_SET) !== NOT_SET; - }, - - hasIn: hasIn, - - isSubset: function isSubset(iter) { - iter = typeof iter.includes === 'function' ? iter : Collection(iter); - return this.every(function (value) { return iter.includes(value); }); - }, - - isSuperset: function isSuperset(iter) { - iter = typeof iter.isSubset === 'function' ? iter : Collection(iter); - return iter.isSubset(this); - }, - - keyOf: function keyOf(searchValue) { - return this.findKey(function (value) { return is(value, searchValue); }); - }, - - keySeq: function keySeq() { - return this.toSeq().map(keyMapper).toIndexedSeq(); - }, - - last: function last(notSetValue) { - return this.toSeq().reverse().first(notSetValue); - }, - - lastKeyOf: function lastKeyOf(searchValue) { - return this.toKeyedSeq().reverse().keyOf(searchValue); - }, - - max: function max(comparator) { - return maxFactory(this, comparator); - }, - - maxBy: function maxBy(mapper, comparator) { - return maxFactory(this, comparator, mapper); - }, - - min: function min(comparator) { - return maxFactory( - this, - comparator ? neg(comparator) : defaultNegComparator - ); - }, - - minBy: function minBy(mapper, comparator) { - return maxFactory( - this, - comparator ? neg(comparator) : defaultNegComparator, - mapper - ); - }, - - rest: function rest() { - return this.slice(1); - }, - - skip: function skip(amount) { - return amount === 0 ? this : this.slice(Math.max(0, amount)); - }, - - skipLast: function skipLast(amount) { - return amount === 0 ? this : this.slice(0, -Math.max(0, amount)); - }, - - skipWhile: function skipWhile(predicate, context) { - return reify(this, skipWhileFactory(this, predicate, context, true)); - }, - - skipUntil: function skipUntil(predicate, context) { - return this.skipWhile(not(predicate), context); - }, - - sortBy: function sortBy(mapper, comparator) { - return reify(this, sortFactory(this, comparator, mapper)); - }, - - take: function take(amount) { - return this.slice(0, Math.max(0, amount)); - }, - - takeLast: function takeLast(amount) { - return this.slice(-Math.max(0, amount)); - }, - - takeWhile: function takeWhile(predicate, context) { - return reify(this, takeWhileFactory(this, predicate, context)); - }, - - takeUntil: function takeUntil(predicate, context) { - return this.takeWhile(not(predicate), context); - }, - - update: function update(fn) { - return fn(this); - }, - - valueSeq: function valueSeq() { - return this.toIndexedSeq(); - }, - - // ### Hashable Object - - hashCode: function hashCode() { - return this.__hash || (this.__hash = hashCollection(this)); - }, - - // ### Internal - - // abstract __iterate(fn, reverse) - - // abstract __iterator(type, reverse) -}); - -var CollectionPrototype = Collection.prototype; -CollectionPrototype[IS_COLLECTION_SYMBOL] = true; -CollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values; -CollectionPrototype.toJSON = CollectionPrototype.toArray; -CollectionPrototype.__toStringMapper = quoteString; -CollectionPrototype.inspect = CollectionPrototype.toSource = function () { - return this.toString(); -}; -CollectionPrototype.chain = CollectionPrototype.flatMap; -CollectionPrototype.contains = CollectionPrototype.includes; - -mixin(KeyedCollection, { - // ### More sequential methods - - flip: function flip() { - return reify(this, flipFactory(this)); - }, - - mapEntries: function mapEntries(mapper, context) { - var this$1$1 = this; - - var iterations = 0; - return reify( - this, - this.toSeq() - .map(function (v, k) { return mapper.call(context, [k, v], iterations++, this$1$1); }) - .fromEntrySeq() - ); - }, - - mapKeys: function mapKeys(mapper, context) { - var this$1$1 = this; - - return reify( - this, - this.toSeq() - .flip() - .map(function (k, v) { return mapper.call(context, k, v, this$1$1); }) - .flip() - ); - }, -}); - -var KeyedCollectionPrototype = KeyedCollection.prototype; -KeyedCollectionPrototype[IS_KEYED_SYMBOL] = true; -KeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries; -KeyedCollectionPrototype.toJSON = toObject; -KeyedCollectionPrototype.__toStringMapper = function (v, k) { return quoteString(k) + ': ' + quoteString(v); }; - -mixin(IndexedCollection, { - // ### Conversion to other types - - toKeyedSeq: function toKeyedSeq() { - return new ToKeyedSequence(this, false); - }, - - // ### ES6 Collection methods (ES6 Array and Map) - - filter: function filter(predicate, context) { - return reify(this, filterFactory(this, predicate, context, false)); - }, - - findIndex: function findIndex(predicate, context) { - var entry = this.findEntry(predicate, context); - return entry ? entry[0] : -1; - }, - - indexOf: function indexOf(searchValue) { - var key = this.keyOf(searchValue); - return key === undefined ? -1 : key; - }, - - lastIndexOf: function lastIndexOf(searchValue) { - var key = this.lastKeyOf(searchValue); - return key === undefined ? -1 : key; - }, - - reverse: function reverse() { - return reify(this, reverseFactory(this, false)); - }, - - slice: function slice(begin, end) { - return reify(this, sliceFactory(this, begin, end, false)); - }, - - splice: function splice(index, removeNum /*, ...values*/) { - var numArgs = arguments.length; - removeNum = Math.max(removeNum || 0, 0); - if (numArgs === 0 || (numArgs === 2 && !removeNum)) { - return this; - } - // If index is negative, it should resolve relative to the size of the - // collection. However size may be expensive to compute if not cached, so - // only call count() if the number is in fact negative. - index = resolveBegin(index, index < 0 ? this.count() : this.size); - var spliced = this.slice(0, index); - return reify( - this, - numArgs === 1 - ? spliced - : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)) - ); - }, - - // ### More collection methods - - findLastIndex: function findLastIndex(predicate, context) { - var entry = this.findLastEntry(predicate, context); - return entry ? entry[0] : -1; - }, - - first: function first(notSetValue) { - return this.get(0, notSetValue); - }, - - flatten: function flatten(depth) { - return reify(this, flattenFactory(this, depth, false)); - }, - - get: function get(index, notSetValue) { - index = wrapIndex(this, index); - return index < 0 || - this.size === Infinity || - (this.size !== undefined && index > this.size) - ? notSetValue - : this.find(function (_, key) { return key === index; }, undefined, notSetValue); - }, - - has: function has(index) { - index = wrapIndex(this, index); - return ( - index >= 0 && - (this.size !== undefined - ? this.size === Infinity || index < this.size - : this.indexOf(index) !== -1) - ); - }, - - interpose: function interpose(separator) { - return reify(this, interposeFactory(this, separator)); - }, - - interleave: function interleave(/*...collections*/) { - var collections = [this].concat(arrCopy(arguments)); - var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections); - var interleaved = zipped.flatten(true); - if (zipped.size) { - interleaved.size = zipped.size * collections.length; - } - return reify(this, interleaved); - }, - - keySeq: function keySeq() { - return Range(0, this.size); - }, - - last: function last(notSetValue) { - return this.get(-1, notSetValue); - }, - - skipWhile: function skipWhile(predicate, context) { - return reify(this, skipWhileFactory(this, predicate, context, false)); - }, - - zip: function zip(/*, ...collections */) { - var collections = [this].concat(arrCopy(arguments)); - return reify(this, zipWithFactory(this, defaultZipper, collections)); - }, - - zipAll: function zipAll(/*, ...collections */) { - var collections = [this].concat(arrCopy(arguments)); - return reify(this, zipWithFactory(this, defaultZipper, collections, true)); - }, - - zipWith: function zipWith(zipper /*, ...collections */) { - var collections = arrCopy(arguments); - collections[0] = this; - return reify(this, zipWithFactory(this, zipper, collections)); - }, -}); - -var IndexedCollectionPrototype = IndexedCollection.prototype; -IndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true; -IndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true; - -mixin(SetCollection, { - // ### ES6 Collection methods (ES6 Array and Map) - - get: function get(value, notSetValue) { - return this.has(value) ? value : notSetValue; - }, - - includes: function includes(value) { - return this.has(value); - }, - - // ### More sequential methods - - keySeq: function keySeq() { - return this.valueSeq(); - }, -}); - -var SetCollectionPrototype = SetCollection.prototype; -SetCollectionPrototype.has = CollectionPrototype.includes; -SetCollectionPrototype.contains = SetCollectionPrototype.includes; -SetCollectionPrototype.keys = SetCollectionPrototype.values; - -// Mixin subclasses - -mixin(KeyedSeq, KeyedCollectionPrototype); -mixin(IndexedSeq, IndexedCollectionPrototype); -mixin(SetSeq, SetCollectionPrototype); - -// #pragma Helper functions - -function reduce(collection, reducer, reduction, context, useFirst, reverse) { - assertNotInfinite(collection.size); - collection.__iterate(function (v, k, c) { - if (useFirst) { - useFirst = false; - reduction = v; - } else { - reduction = reducer.call(context, reduction, v, k, c); - } - }, reverse); - return reduction; -} - -function keyMapper(v, k) { - return k; -} - -function entryMapper(v, k) { - return [k, v]; -} - -function not(predicate) { - return function () { - return !predicate.apply(this, arguments); - }; -} - -function neg(predicate) { - return function () { - return -predicate.apply(this, arguments); - }; -} - -function defaultZipper() { - return arrCopy(arguments); -} - -function defaultNegComparator(a, b) { - return a < b ? 1 : a > b ? -1 : 0; -} - -function hashCollection(collection) { - if (collection.size === Infinity) { - return 0; - } - var ordered = isOrdered(collection); - var keyed = isKeyed(collection); - var h = ordered ? 1 : 0; - - collection.__iterate( - keyed - ? ordered - ? function (v, k) { - h = (31 * h + hashMerge(hash(v), hash(k))) | 0; - } - : function (v, k) { - h = (h + hashMerge(hash(v), hash(k))) | 0; - } - : ordered - ? function (v) { - h = (31 * h + hash(v)) | 0; - } - : function (v) { - h = (h + hash(v)) | 0; - } - ); - - return murmurHashOfSize(collection.size, h); -} - -function murmurHashOfSize(size, h) { - h = imul(h, 0xcc9e2d51); - h = imul((h << 15) | (h >>> -15), 0x1b873593); - h = imul((h << 13) | (h >>> -13), 5); - h = ((h + 0xe6546b64) | 0) ^ size; - h = imul(h ^ (h >>> 16), 0x85ebca6b); - h = imul(h ^ (h >>> 13), 0xc2b2ae35); - h = smi(h ^ (h >>> 16)); - return h; -} - -function hashMerge(a, b) { - return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int -} - -var OrderedSet = /*@__PURE__*/(function (Set) { - function OrderedSet(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptyOrderedSet() - : isOrderedSet(value) - ? value - : emptyOrderedSet().withMutations(function (set) { - var iter = SetCollection(value); - assertNotInfinite(iter.size); - iter.forEach(function (v) { return set.add(v); }); - }); - } - - if ( Set ) OrderedSet.__proto__ = Set; - OrderedSet.prototype = Object.create( Set && Set.prototype ); - OrderedSet.prototype.constructor = OrderedSet; - - OrderedSet.of = function of (/*...values*/) { - return this(arguments); - }; - - OrderedSet.fromKeys = function fromKeys (value) { - return this(KeyedCollection(value).keySeq()); - }; - - OrderedSet.prototype.toString = function toString () { - return this.__toString('OrderedSet {', '}'); - }; - - return OrderedSet; -}(Set)); - -OrderedSet.isOrderedSet = isOrderedSet; - -var OrderedSetPrototype = OrderedSet.prototype; -OrderedSetPrototype[IS_ORDERED_SYMBOL] = true; -OrderedSetPrototype.zip = IndexedCollectionPrototype.zip; -OrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith; -OrderedSetPrototype.zipAll = IndexedCollectionPrototype.zipAll; - -OrderedSetPrototype.__empty = emptyOrderedSet; -OrderedSetPrototype.__make = makeOrderedSet; - -function makeOrderedSet(map, ownerID) { - var set = Object.create(OrderedSetPrototype); - set.size = map ? map.size : 0; - set._map = map; - set.__ownerID = ownerID; - return set; -} - -var EMPTY_ORDERED_SET; -function emptyOrderedSet() { - return ( - EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())) - ); -} - -var PairSorting = { - LeftThenRight: -1, - RightThenLeft: +1, -}; - -function throwOnInvalidDefaultValues(defaultValues) { - if (isRecord(defaultValues)) { - throw new Error( - 'Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.' - ); - } - - if (isImmutable(defaultValues)) { - throw new Error( - 'Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.' - ); - } - - if (defaultValues === null || typeof defaultValues !== 'object') { - throw new Error( - 'Can not call `Record` with a non-object as default values. Use a plain javascript object instead.' - ); - } -} - -var Record = function Record(defaultValues, name) { - var hasInitialized; - - throwOnInvalidDefaultValues(defaultValues); - - var RecordType = function Record(values) { - var this$1$1 = this; - - if (values instanceof RecordType) { - return values; - } - if (!(this instanceof RecordType)) { - return new RecordType(values); - } - if (!hasInitialized) { - hasInitialized = true; - var keys = Object.keys(defaultValues); - var indices = (RecordTypePrototype._indices = {}); - // Deprecated: left to attempt not to break any external code which - // relies on a ._name property existing on record instances. - // Use Record.getDescriptiveName() instead - RecordTypePrototype._name = name; - RecordTypePrototype._keys = keys; - RecordTypePrototype._defaultValues = defaultValues; - for (var i = 0; i < keys.length; i++) { - var propName = keys[i]; - indices[propName] = i; - if (RecordTypePrototype[propName]) { - /* eslint-disable no-console */ - typeof console === 'object' && - console.warn && - console.warn( - 'Cannot define ' + - recordName(this) + - ' with property "' + - propName + - '" since that property name is part of the Record API.' - ); - /* eslint-enable no-console */ - } else { - setProp(RecordTypePrototype, propName); - } - } - } - this.__ownerID = undefined; - this._values = List().withMutations(function (l) { - l.setSize(this$1$1._keys.length); - KeyedCollection(values).forEach(function (v, k) { - l.set(this$1$1._indices[k], v === this$1$1._defaultValues[k] ? undefined : v); - }); - }); - return this; - }; - - var RecordTypePrototype = (RecordType.prototype = - Object.create(RecordPrototype)); - RecordTypePrototype.constructor = RecordType; - - if (name) { - RecordType.displayName = name; - } - - // eslint-disable-next-line no-constructor-return - return RecordType; -}; - -Record.prototype.toString = function toString () { - var str = recordName(this) + ' { '; - var keys = this._keys; - var k; - for (var i = 0, l = keys.length; i !== l; i++) { - k = keys[i]; - str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k)); - } - return str + ' }'; -}; - -Record.prototype.equals = function equals (other) { - return ( - this === other || - (isRecord(other) && recordSeq(this).equals(recordSeq(other))) - ); -}; - -Record.prototype.hashCode = function hashCode () { - return recordSeq(this).hashCode(); -}; - -// @pragma Access - -Record.prototype.has = function has (k) { - return this._indices.hasOwnProperty(k); -}; - -Record.prototype.get = function get (k, notSetValue) { - if (!this.has(k)) { - return notSetValue; - } - var index = this._indices[k]; - var value = this._values.get(index); - return value === undefined ? this._defaultValues[k] : value; -}; - -// @pragma Modification - -Record.prototype.set = function set (k, v) { - if (this.has(k)) { - var newValues = this._values.set( - this._indices[k], - v === this._defaultValues[k] ? undefined : v - ); - if (newValues !== this._values && !this.__ownerID) { - return makeRecord(this, newValues); - } - } - return this; -}; - -Record.prototype.remove = function remove (k) { - return this.set(k); -}; - -Record.prototype.clear = function clear () { - var newValues = this._values.clear().setSize(this._keys.length); - - return this.__ownerID ? this : makeRecord(this, newValues); -}; - -Record.prototype.wasAltered = function wasAltered () { - return this._values.wasAltered(); -}; - -Record.prototype.toSeq = function toSeq () { - return recordSeq(this); -}; - -Record.prototype.toJS = function toJS$1 () { - return toJS(this); -}; - -Record.prototype.entries = function entries () { - return this.__iterator(ITERATE_ENTRIES); -}; - -Record.prototype.__iterator = function __iterator (type, reverse) { - return recordSeq(this).__iterator(type, reverse); -}; - -Record.prototype.__iterate = function __iterate (fn, reverse) { - return recordSeq(this).__iterate(fn, reverse); -}; - -Record.prototype.__ensureOwner = function __ensureOwner (ownerID) { - if (ownerID === this.__ownerID) { - return this; - } - var newValues = this._values.__ensureOwner(ownerID); - if (!ownerID) { - this.__ownerID = ownerID; - this._values = newValues; - return this; - } - return makeRecord(this, newValues, ownerID); -}; - -Record.isRecord = isRecord; -Record.getDescriptiveName = recordName; -var RecordPrototype = Record.prototype; -RecordPrototype[IS_RECORD_SYMBOL] = true; -RecordPrototype[DELETE] = RecordPrototype.remove; -RecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn; -RecordPrototype.getIn = getIn; -RecordPrototype.hasIn = CollectionPrototype.hasIn; -RecordPrototype.merge = merge$1; -RecordPrototype.mergeWith = mergeWith$1; -RecordPrototype.mergeIn = mergeIn; -RecordPrototype.mergeDeep = mergeDeep; -RecordPrototype.mergeDeepWith = mergeDeepWith; -RecordPrototype.mergeDeepIn = mergeDeepIn; -RecordPrototype.setIn = setIn; -RecordPrototype.update = update; -RecordPrototype.updateIn = updateIn; -RecordPrototype.withMutations = withMutations; -RecordPrototype.asMutable = asMutable; -RecordPrototype.asImmutable = asImmutable; -RecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries; -RecordPrototype.toJSON = RecordPrototype.toObject = - CollectionPrototype.toObject; -RecordPrototype.inspect = RecordPrototype.toSource = function () { - return this.toString(); -}; - -function makeRecord(likeRecord, values, ownerID) { - var record = Object.create(Object.getPrototypeOf(likeRecord)); - record._values = values; - record.__ownerID = ownerID; - return record; -} - -function recordName(record) { - return record.constructor.displayName || record.constructor.name || 'Record'; -} - -function recordSeq(record) { - return keyedSeqFromValue(record._keys.map(function (k) { return [k, record.get(k)]; })); -} - -function setProp(prototype, name) { - try { - Object.defineProperty(prototype, name, { - get: function () { - return this.get(name); - }, - set: function (value) { - invariant(this.__ownerID, 'Cannot set on an immutable record.'); - this.set(name, value); - }, - }); - } catch (error) { - // Object.defineProperty failed. Probably IE8. - } -} - -/** - * Returns a lazy Seq of `value` repeated `times` times. When `times` is - * undefined, returns an infinite sequence of `value`. - */ -var Repeat = /*@__PURE__*/(function (IndexedSeq) { - function Repeat(value, times) { - if (!(this instanceof Repeat)) { - // eslint-disable-next-line no-constructor-return - return new Repeat(value, times); - } - this._value = value; - this.size = times === undefined ? Infinity : Math.max(0, times); - if (this.size === 0) { - if (EMPTY_REPEAT) { - // eslint-disable-next-line no-constructor-return - return EMPTY_REPEAT; - } - // eslint-disable-next-line @typescript-eslint/no-this-alias - EMPTY_REPEAT = this; - } - } - - if ( IndexedSeq ) Repeat.__proto__ = IndexedSeq; - Repeat.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); - Repeat.prototype.constructor = Repeat; - - Repeat.prototype.toString = function toString () { - if (this.size === 0) { - return 'Repeat []'; - } - return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]'; - }; - - Repeat.prototype.get = function get (index, notSetValue) { - return this.has(index) ? this._value : notSetValue; - }; - - Repeat.prototype.includes = function includes (searchValue) { - return is(this._value, searchValue); - }; - - Repeat.prototype.slice = function slice (begin, end) { - var size = this.size; - return wholeSlice(begin, end, size) - ? this - : new Repeat( - this._value, - resolveEnd(end, size) - resolveBegin(begin, size) - ); - }; - - Repeat.prototype.reverse = function reverse () { - return this; - }; - - Repeat.prototype.indexOf = function indexOf (searchValue) { - if (is(this._value, searchValue)) { - return 0; - } - return -1; - }; - - Repeat.prototype.lastIndexOf = function lastIndexOf (searchValue) { - if (is(this._value, searchValue)) { - return this.size; - } - return -1; - }; - - Repeat.prototype.__iterate = function __iterate (fn, reverse) { - var size = this.size; - var i = 0; - while (i !== size) { - if (fn(this._value, reverse ? size - ++i : i++, this) === false) { - break; - } - } - return i; - }; - - Repeat.prototype.__iterator = function __iterator (type, reverse) { - var this$1$1 = this; - - var size = this.size; - var i = 0; - return new Iterator(function () { return i === size - ? iteratorDone() - : iteratorValue(type, reverse ? size - ++i : i++, this$1$1._value); } - ); - }; - - Repeat.prototype.equals = function equals (other) { - return other instanceof Repeat - ? is(this._value, other._value) - : deepEqual(this, other); - }; - - return Repeat; -}(IndexedSeq)); - -var EMPTY_REPEAT; - -function fromJS(value, converter) { - return fromJSWith( - [], - converter || defaultConverter, - value, - '', - converter && converter.length > 2 ? [] : undefined, - { '': value } - ); -} - -function fromJSWith(stack, converter, value, key, keyPath, parentValue) { - if ( - typeof value !== 'string' && - !isImmutable(value) && - (isArrayLike(value) || hasIterator(value) || isPlainObject(value)) - ) { - if (~stack.indexOf(value)) { - throw new TypeError('Cannot convert circular structure to Immutable'); - } - stack.push(value); - keyPath && key !== '' && keyPath.push(key); - var converted = converter.call( - parentValue, - key, - Seq(value).map(function (v, k) { return fromJSWith(stack, converter, v, k, keyPath, value); } - ), - keyPath && keyPath.slice() - ); - stack.pop(); - keyPath && keyPath.pop(); - return converted; - } - return value; -} - -function defaultConverter(k, v) { - // Effectively the opposite of "Collection.toSeq()" - return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet(); -} - -var version = "5.0.3"; - -// Note: Iterable is deprecated -var Iterable = Collection; - -export { Collection, Iterable, List, Map, OrderedMap, OrderedSet, PairSorting, Range, Record, Repeat, Seq, Set, Stack, fromJS, get, getIn$1 as getIn, has, hasIn$1 as hasIn, hash, is, isAssociative, isCollection, isImmutable, isIndexed, isKeyed, isList, isMap, isOrdered, isOrderedMap, isOrderedSet, isPlainObject, isRecord, isSeq, isSet, isStack, isValueObject, merge, mergeDeep$1 as mergeDeep, mergeDeepWith$1 as mergeDeepWith, mergeWith, remove, removeIn, set, setIn$1 as setIn, update$1 as update, updateIn$1 as updateIn, version }; diff --git a/web/static/node_modules/immutable/dist/immutable.js b/web/static/node_modules/immutable/dist/immutable.js deleted file mode 100644 index 9e473258..00000000 --- a/web/static/node_modules/immutable/dist/immutable.js +++ /dev/null @@ -1,5990 +0,0 @@ -/** - * @license - * MIT License - * - * Copyright (c) 2014-present, Lee Byron and other contributors. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Immutable = {})); -})(this, (function (exports) { 'use strict'; - - // Used for setting prototype methods that IE8 chokes on. - var DELETE = 'delete'; - - // Constants describing the size of trie nodes. - var SHIFT = 5; // Resulted in best performance after ______? - var SIZE = 1 << SHIFT; - var MASK = SIZE - 1; - - // A consistent shared value representing "not set" which equals nothing other - // than itself, and nothing that could be provided externally. - var NOT_SET = {}; - - // Boolean references, Rough equivalent of `bool &`. - function MakeRef() { - return { value: false }; - } - - function SetRef(ref) { - if (ref) { - ref.value = true; - } - } - - // A function which returns a value representing an "owner" for transient writes - // to tries. The return value will only ever equal itself, and will not equal - // the return of any subsequent call of this function. - function OwnerID() {} - - function ensureSize(iter) { - if (iter.size === undefined) { - iter.size = iter.__iterate(returnTrue); - } - return iter.size; - } - - function wrapIndex(iter, index) { - // This implements "is array index" which the ECMAString spec defines as: - // - // A String property name P is an array index if and only if - // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal - // to 2^32−1. - // - // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects - if (typeof index !== 'number') { - var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32 - if ('' + uint32Index !== index || uint32Index === 4294967295) { - return NaN; - } - index = uint32Index; - } - return index < 0 ? ensureSize(iter) + index : index; - } - - function returnTrue() { - return true; - } - - function wholeSlice(begin, end, size) { - return ( - ((begin === 0 && !isNeg(begin)) || - (size !== undefined && begin <= -size)) && - (end === undefined || (size !== undefined && end >= size)) - ); - } - - function resolveBegin(begin, size) { - return resolveIndex(begin, size, 0); - } - - function resolveEnd(end, size) { - return resolveIndex(end, size, size); - } - - function resolveIndex(index, size, defaultIndex) { - // Sanitize indices using this shorthand for ToInt32(argument) - // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 - return index === undefined - ? defaultIndex - : isNeg(index) - ? size === Infinity - ? size - : Math.max(0, size + index) | 0 - : size === undefined || size === index - ? index - : Math.min(size, index) | 0; - } - - function isNeg(value) { - // Account for -0 which is negative, but not less than 0. - return value < 0 || (value === 0 && 1 / value === -Infinity); - } - - // Note: value is unchanged to not break immutable-devtools. - var IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@'; - - function isCollection(maybeCollection) { - return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]); - } - - var IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@'; - - function isKeyed(maybeKeyed) { - return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]); - } - - var IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@'; - - function isIndexed(maybeIndexed) { - return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]); - } - - function isAssociative(maybeAssociative) { - return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); - } - - var Collection = function Collection(value) { - // eslint-disable-next-line no-constructor-return - return isCollection(value) ? value : Seq(value); - }; - - var KeyedCollection = /*@__PURE__*/(function (Collection) { - function KeyedCollection(value) { - // eslint-disable-next-line no-constructor-return - return isKeyed(value) ? value : KeyedSeq(value); - } - - if ( Collection ) KeyedCollection.__proto__ = Collection; - KeyedCollection.prototype = Object.create( Collection && Collection.prototype ); - KeyedCollection.prototype.constructor = KeyedCollection; - - return KeyedCollection; - }(Collection)); - - var IndexedCollection = /*@__PURE__*/(function (Collection) { - function IndexedCollection(value) { - // eslint-disable-next-line no-constructor-return - return isIndexed(value) ? value : IndexedSeq(value); - } - - if ( Collection ) IndexedCollection.__proto__ = Collection; - IndexedCollection.prototype = Object.create( Collection && Collection.prototype ); - IndexedCollection.prototype.constructor = IndexedCollection; - - return IndexedCollection; - }(Collection)); - - var SetCollection = /*@__PURE__*/(function (Collection) { - function SetCollection(value) { - // eslint-disable-next-line no-constructor-return - return isCollection(value) && !isAssociative(value) ? value : SetSeq(value); - } - - if ( Collection ) SetCollection.__proto__ = Collection; - SetCollection.prototype = Object.create( Collection && Collection.prototype ); - SetCollection.prototype.constructor = SetCollection; - - return SetCollection; - }(Collection)); - - Collection.Keyed = KeyedCollection; - Collection.Indexed = IndexedCollection; - Collection.Set = SetCollection; - - var IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@'; - - function isSeq(maybeSeq) { - return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]); - } - - var IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@'; - - function isRecord(maybeRecord) { - return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]); - } - - function isImmutable(maybeImmutable) { - return isCollection(maybeImmutable) || isRecord(maybeImmutable); - } - - var IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@'; - - function isOrdered(maybeOrdered) { - return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]); - } - - var ITERATE_KEYS = 0; - var ITERATE_VALUES = 1; - var ITERATE_ENTRIES = 2; - - var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; - - var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; - - var Iterator = function Iterator(next) { - this.next = next; - }; - - Iterator.prototype.toString = function toString () { - return '[Iterator]'; - }; - - Iterator.KEYS = ITERATE_KEYS; - Iterator.VALUES = ITERATE_VALUES; - Iterator.ENTRIES = ITERATE_ENTRIES; - - Iterator.prototype.inspect = Iterator.prototype.toSource = function () { - return this.toString(); - }; - Iterator.prototype[ITERATOR_SYMBOL] = function () { - return this; - }; - - function iteratorValue(type, k, v, iteratorResult) { - var value = type === 0 ? k : type === 1 ? v : [k, v]; - iteratorResult - ? (iteratorResult.value = value) - : (iteratorResult = { - value: value, - done: false, - }); - return iteratorResult; - } - - function iteratorDone() { - return { value: undefined, done: true }; - } - - function hasIterator(maybeIterable) { - if (Array.isArray(maybeIterable)) { - // IE11 trick as it does not support `Symbol.iterator` - return true; - } - - return !!getIteratorFn(maybeIterable); - } - - function isIterator(maybeIterator) { - return maybeIterator && typeof maybeIterator.next === 'function'; - } - - function getIterator(iterable) { - var iteratorFn = getIteratorFn(iterable); - return iteratorFn && iteratorFn.call(iterable); - } - - function getIteratorFn(iterable) { - var iteratorFn = - iterable && - ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || - iterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; - } - } - - function isEntriesIterable(maybeIterable) { - var iteratorFn = getIteratorFn(maybeIterable); - return iteratorFn && iteratorFn === maybeIterable.entries; - } - - function isKeysIterable(maybeIterable) { - var iteratorFn = getIteratorFn(maybeIterable); - return iteratorFn && iteratorFn === maybeIterable.keys; - } - - var hasOwnProperty = Object.prototype.hasOwnProperty; - - function isArrayLike(value) { - if (Array.isArray(value) || typeof value === 'string') { - return true; - } - - return ( - value && - typeof value === 'object' && - Number.isInteger(value.length) && - value.length >= 0 && - (value.length === 0 - ? // Only {length: 0} is considered Array-like. - Object.keys(value).length === 1 - : // An object is only Array-like if it has a property where the last value - // in the array-like may be found (which could be undefined). - value.hasOwnProperty(value.length - 1)) - ); - } - - var Seq = /*@__PURE__*/(function (Collection) { - function Seq(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptySequence() - : isImmutable(value) - ? value.toSeq() - : seqFromValue(value); - } - - if ( Collection ) Seq.__proto__ = Collection; - Seq.prototype = Object.create( Collection && Collection.prototype ); - Seq.prototype.constructor = Seq; - - Seq.prototype.toSeq = function toSeq () { - return this; - }; - - Seq.prototype.toString = function toString () { - return this.__toString('Seq {', '}'); - }; - - Seq.prototype.cacheResult = function cacheResult () { - if (!this._cache && this.__iterateUncached) { - this._cache = this.entrySeq().toArray(); - this.size = this._cache.length; - } - return this; - }; - - // abstract __iterateUncached(fn, reverse) - - Seq.prototype.__iterate = function __iterate (fn, reverse) { - var cache = this._cache; - if (cache) { - var size = cache.length; - var i = 0; - while (i !== size) { - var entry = cache[reverse ? size - ++i : i++]; - if (fn(entry[1], entry[0], this) === false) { - break; - } - } - return i; - } - return this.__iterateUncached(fn, reverse); - }; - - // abstract __iteratorUncached(type, reverse) - - Seq.prototype.__iterator = function __iterator (type, reverse) { - var cache = this._cache; - if (cache) { - var size = cache.length; - var i = 0; - return new Iterator(function () { - if (i === size) { - return iteratorDone(); - } - var entry = cache[reverse ? size - ++i : i++]; - return iteratorValue(type, entry[0], entry[1]); - }); - } - return this.__iteratorUncached(type, reverse); - }; - - return Seq; - }(Collection)); - - var KeyedSeq = /*@__PURE__*/(function (Seq) { - function KeyedSeq(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptySequence().toKeyedSeq() - : isCollection(value) - ? isKeyed(value) - ? value.toSeq() - : value.fromEntrySeq() - : isRecord(value) - ? value.toSeq() - : keyedSeqFromValue(value); - } - - if ( Seq ) KeyedSeq.__proto__ = Seq; - KeyedSeq.prototype = Object.create( Seq && Seq.prototype ); - KeyedSeq.prototype.constructor = KeyedSeq; - - KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq () { - return this; - }; - - return KeyedSeq; - }(Seq)); - - var IndexedSeq = /*@__PURE__*/(function (Seq) { - function IndexedSeq(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptySequence() - : isCollection(value) - ? isKeyed(value) - ? value.entrySeq() - : value.toIndexedSeq() - : isRecord(value) - ? value.toSeq().entrySeq() - : indexedSeqFromValue(value); - } - - if ( Seq ) IndexedSeq.__proto__ = Seq; - IndexedSeq.prototype = Object.create( Seq && Seq.prototype ); - IndexedSeq.prototype.constructor = IndexedSeq; - - IndexedSeq.of = function of (/*...values*/) { - return IndexedSeq(arguments); - }; - - IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq () { - return this; - }; - - IndexedSeq.prototype.toString = function toString () { - return this.__toString('Seq [', ']'); - }; - - return IndexedSeq; - }(Seq)); - - var SetSeq = /*@__PURE__*/(function (Seq) { - function SetSeq(value) { - // eslint-disable-next-line no-constructor-return - return ( - isCollection(value) && !isAssociative(value) ? value : IndexedSeq(value) - ).toSetSeq(); - } - - if ( Seq ) SetSeq.__proto__ = Seq; - SetSeq.prototype = Object.create( Seq && Seq.prototype ); - SetSeq.prototype.constructor = SetSeq; - - SetSeq.of = function of (/*...values*/) { - return SetSeq(arguments); - }; - - SetSeq.prototype.toSetSeq = function toSetSeq () { - return this; - }; - - return SetSeq; - }(Seq)); - - Seq.isSeq = isSeq; - Seq.Keyed = KeyedSeq; - Seq.Set = SetSeq; - Seq.Indexed = IndexedSeq; - - Seq.prototype[IS_SEQ_SYMBOL] = true; - - // #pragma Root Sequences - - var ArraySeq = /*@__PURE__*/(function (IndexedSeq) { - function ArraySeq(array) { - this._array = array; - this.size = array.length; - } - - if ( IndexedSeq ) ArraySeq.__proto__ = IndexedSeq; - ArraySeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); - ArraySeq.prototype.constructor = ArraySeq; - - ArraySeq.prototype.get = function get (index, notSetValue) { - return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; - }; - - ArraySeq.prototype.__iterate = function __iterate (fn, reverse) { - var array = this._array; - var size = array.length; - var i = 0; - while (i !== size) { - var ii = reverse ? size - ++i : i++; - if (fn(array[ii], ii, this) === false) { - break; - } - } - return i; - }; - - ArraySeq.prototype.__iterator = function __iterator (type, reverse) { - var array = this._array; - var size = array.length; - var i = 0; - return new Iterator(function () { - if (i === size) { - return iteratorDone(); - } - var ii = reverse ? size - ++i : i++; - return iteratorValue(type, ii, array[ii]); - }); - }; - - return ArraySeq; - }(IndexedSeq)); - - var ObjectSeq = /*@__PURE__*/(function (KeyedSeq) { - function ObjectSeq(object) { - var keys = Object.keys(object).concat( - Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [] - ); - this._object = object; - this._keys = keys; - this.size = keys.length; - } - - if ( KeyedSeq ) ObjectSeq.__proto__ = KeyedSeq; - ObjectSeq.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); - ObjectSeq.prototype.constructor = ObjectSeq; - - ObjectSeq.prototype.get = function get (key, notSetValue) { - if (notSetValue !== undefined && !this.has(key)) { - return notSetValue; - } - return this._object[key]; - }; - - ObjectSeq.prototype.has = function has (key) { - return hasOwnProperty.call(this._object, key); - }; - - ObjectSeq.prototype.__iterate = function __iterate (fn, reverse) { - var object = this._object; - var keys = this._keys; - var size = keys.length; - var i = 0; - while (i !== size) { - var key = keys[reverse ? size - ++i : i++]; - if (fn(object[key], key, this) === false) { - break; - } - } - return i; - }; - - ObjectSeq.prototype.__iterator = function __iterator (type, reverse) { - var object = this._object; - var keys = this._keys; - var size = keys.length; - var i = 0; - return new Iterator(function () { - if (i === size) { - return iteratorDone(); - } - var key = keys[reverse ? size - ++i : i++]; - return iteratorValue(type, key, object[key]); - }); - }; - - return ObjectSeq; - }(KeyedSeq)); - ObjectSeq.prototype[IS_ORDERED_SYMBOL] = true; - - var CollectionSeq = /*@__PURE__*/(function (IndexedSeq) { - function CollectionSeq(collection) { - this._collection = collection; - this.size = collection.length || collection.size; - } - - if ( IndexedSeq ) CollectionSeq.__proto__ = IndexedSeq; - CollectionSeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); - CollectionSeq.prototype.constructor = CollectionSeq; - - CollectionSeq.prototype.__iterateUncached = function __iterateUncached (fn, reverse) { - if (reverse) { - return this.cacheResult().__iterate(fn, reverse); - } - var collection = this._collection; - var iterator = getIterator(collection); - var iterations = 0; - if (isIterator(iterator)) { - var step; - while (!(step = iterator.next()).done) { - if (fn(step.value, iterations++, this) === false) { - break; - } - } - } - return iterations; - }; - - CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached (type, reverse) { - if (reverse) { - return this.cacheResult().__iterator(type, reverse); - } - var collection = this._collection; - var iterator = getIterator(collection); - if (!isIterator(iterator)) { - return new Iterator(iteratorDone); - } - var iterations = 0; - return new Iterator(function () { - var step = iterator.next(); - return step.done ? step : iteratorValue(type, iterations++, step.value); - }); - }; - - return CollectionSeq; - }(IndexedSeq)); - - // # pragma Helper functions - - var EMPTY_SEQ; - - function emptySequence() { - return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); - } - - function keyedSeqFromValue(value) { - var seq = maybeIndexedSeqFromValue(value); - if (seq) { - return seq.fromEntrySeq(); - } - if (typeof value === 'object') { - return new ObjectSeq(value); - } - throw new TypeError( - 'Expected Array or collection object of [k, v] entries, or keyed object: ' + - value - ); - } - - function indexedSeqFromValue(value) { - var seq = maybeIndexedSeqFromValue(value); - if (seq) { - return seq; - } - throw new TypeError( - 'Expected Array or collection object of values: ' + value - ); - } - - function seqFromValue(value) { - var seq = maybeIndexedSeqFromValue(value); - if (seq) { - return isEntriesIterable(value) - ? seq.fromEntrySeq() - : isKeysIterable(value) - ? seq.toSetSeq() - : seq; - } - if (typeof value === 'object') { - return new ObjectSeq(value); - } - throw new TypeError( - 'Expected Array or collection object of values, or keyed object: ' + value - ); - } - - function maybeIndexedSeqFromValue(value) { - return isArrayLike(value) - ? new ArraySeq(value) - : hasIterator(value) - ? new CollectionSeq(value) - : undefined; - } - - var IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@'; - - function isMap(maybeMap) { - return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]); - } - - function isOrderedMap(maybeOrderedMap) { - return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); - } - - function isValueObject(maybeValue) { - return Boolean( - maybeValue && - typeof maybeValue.equals === 'function' && - typeof maybeValue.hashCode === 'function' - ); - } - - /** - * An extension of the "same-value" algorithm as [described for use by ES6 Map - * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality) - * - * NaN is considered the same as NaN, however -0 and 0 are considered the same - * value, which is different from the algorithm described by - * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). - * - * This is extended further to allow Objects to describe the values they - * represent, by way of `valueOf` or `equals` (and `hashCode`). - * - * Note: because of this extension, the key equality of Immutable.Map and the - * value equality of Immutable.Set will differ from ES6 Map and Set. - * - * ### Defining custom values - * - * The easiest way to describe the value an object represents is by implementing - * `valueOf`. For example, `Date` represents a value by returning a unix - * timestamp for `valueOf`: - * - * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ... - * var date2 = new Date(1234567890000); - * date1.valueOf(); // 1234567890000 - * assert( date1 !== date2 ); - * assert( Immutable.is( date1, date2 ) ); - * - * Note: overriding `valueOf` may have other implications if you use this object - * where JavaScript expects a primitive, such as implicit string coercion. - * - * For more complex types, especially collections, implementing `valueOf` may - * not be performant. An alternative is to implement `equals` and `hashCode`. - * - * `equals` takes another object, presumably of similar type, and returns true - * if it is equal. Equality is symmetrical, so the same result should be - * returned if this and the argument are flipped. - * - * assert( a.equals(b) === b.equals(a) ); - * - * `hashCode` returns a 32bit integer number representing the object which will - * be used to determine how to store the value object in a Map or Set. You must - * provide both or neither methods, one must not exist without the other. - * - * Also, an important relationship between these methods must be upheld: if two - * values are equal, they *must* return the same hashCode. If the values are not - * equal, they might have the same hashCode; this is called a hash collision, - * and while undesirable for performance reasons, it is acceptable. - * - * if (a.equals(b)) { - * assert( a.hashCode() === b.hashCode() ); - * } - * - * All Immutable collections are Value Objects: they implement `equals()` - * and `hashCode()`. - */ - function is(valueA, valueB) { - if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { - return true; - } - if (!valueA || !valueB) { - return false; - } - if ( - typeof valueA.valueOf === 'function' && - typeof valueB.valueOf === 'function' - ) { - valueA = valueA.valueOf(); - valueB = valueB.valueOf(); - if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { - return true; - } - if (!valueA || !valueB) { - return false; - } - } - return !!( - isValueObject(valueA) && - isValueObject(valueB) && - valueA.equals(valueB) - ); - } - - var imul = - typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 - ? Math.imul - : function imul(a, b) { - a |= 0; // int - b |= 0; // int - var c = a & 0xffff; - var d = b & 0xffff; - // Shift by 0 fixes the sign on the high part. - return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int - }; - - // v8 has an optimization for storing 31-bit signed numbers. - // Values which have either 00 or 11 as the high order bits qualify. - // This function drops the highest order bit in a signed number, maintaining - // the sign bit. - function smi(i32) { - return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff); - } - - var defaultValueOf = Object.prototype.valueOf; - - function hash(o) { - if (o == null) { - return hashNullish(o); - } - - if (typeof o.hashCode === 'function') { - // Drop any high bits from accidentally long hash codes. - return smi(o.hashCode(o)); - } - - var v = valueOf(o); - - if (v == null) { - return hashNullish(v); - } - - switch (typeof v) { - case 'boolean': - // The hash values for built-in constants are a 1 value for each 5-byte - // shift region expect for the first, which encodes the value. This - // reduces the odds of a hash collision for these common values. - return v ? 0x42108421 : 0x42108420; - case 'number': - return hashNumber(v); - case 'string': - return v.length > STRING_HASH_CACHE_MIN_STRLEN - ? cachedHashString(v) - : hashString(v); - case 'object': - case 'function': - return hashJSObj(v); - case 'symbol': - return hashSymbol(v); - default: - if (typeof v.toString === 'function') { - return hashString(v.toString()); - } - throw new Error('Value type ' + typeof v + ' cannot be hashed.'); - } - } - - function hashNullish(nullish) { - return nullish === null ? 0x42108422 : /* undefined */ 0x42108423; - } - - // Compress arbitrarily large numbers into smi hashes. - function hashNumber(n) { - if (n !== n || n === Infinity) { - return 0; - } - var hash = n | 0; - if (hash !== n) { - hash ^= n * 0xffffffff; - } - while (n > 0xffffffff) { - n /= 0xffffffff; - hash ^= n; - } - return smi(hash); - } - - function cachedHashString(string) { - var hashed = stringHashCache[string]; - if (hashed === undefined) { - hashed = hashString(string); - if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) { - STRING_HASH_CACHE_SIZE = 0; - stringHashCache = {}; - } - STRING_HASH_CACHE_SIZE++; - stringHashCache[string] = hashed; - } - return hashed; - } - - // http://jsperf.com/hashing-strings - function hashString(string) { - // This is the hash from JVM - // The hash code for a string is computed as - // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1], - // where s[i] is the ith character of the string and n is the length of - // the string. We "mod" the result to make it between 0 (inclusive) and 2^31 - // (exclusive) by dropping high bits. - var hashed = 0; - for (var ii = 0; ii < string.length; ii++) { - hashed = (31 * hashed + string.charCodeAt(ii)) | 0; - } - return smi(hashed); - } - - function hashSymbol(sym) { - var hashed = symbolMap[sym]; - if (hashed !== undefined) { - return hashed; - } - - hashed = nextHash(); - - symbolMap[sym] = hashed; - - return hashed; - } - - function hashJSObj(obj) { - var hashed; - if (usingWeakMap) { - hashed = weakMap.get(obj); - if (hashed !== undefined) { - return hashed; - } - } - - hashed = obj[UID_HASH_KEY]; - if (hashed !== undefined) { - return hashed; - } - - if (!canDefineProperty) { - hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY]; - if (hashed !== undefined) { - return hashed; - } - - hashed = getIENodeHash(obj); - if (hashed !== undefined) { - return hashed; - } - } - - hashed = nextHash(); - - if (usingWeakMap) { - weakMap.set(obj, hashed); - } else if (isExtensible !== undefined && isExtensible(obj) === false) { - throw new Error('Non-extensible objects are not allowed as keys.'); - } else if (canDefineProperty) { - Object.defineProperty(obj, UID_HASH_KEY, { - enumerable: false, - configurable: false, - writable: false, - value: hashed, - }); - } else if ( - obj.propertyIsEnumerable !== undefined && - obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable - ) { - // Since we can't define a non-enumerable property on the object - // we'll hijack one of the less-used non-enumerable properties to - // save our hash on it. Since this is a function it will not show up in - // `JSON.stringify` which is what we want. - obj.propertyIsEnumerable = function () { - return this.constructor.prototype.propertyIsEnumerable.apply( - this, - arguments - ); - }; - obj.propertyIsEnumerable[UID_HASH_KEY] = hashed; - } else if (obj.nodeType !== undefined) { - // At this point we couldn't get the IE `uniqueID` to use as a hash - // and we couldn't use a non-enumerable property to exploit the - // dontEnum bug so we simply add the `UID_HASH_KEY` on the node - // itself. - obj[UID_HASH_KEY] = hashed; - } else { - throw new Error('Unable to set a non-enumerable property on object.'); - } - - return hashed; - } - - // Get references to ES5 object methods. - var isExtensible = Object.isExtensible; - - // True if Object.defineProperty works as expected. IE8 fails this test. - var canDefineProperty = (function () { - try { - Object.defineProperty({}, '@', {}); - return true; - } catch (e) { - return false; - } - })(); - - // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it - // and avoid memory leaks from the IE cloneNode bug. - function getIENodeHash(node) { - if (node && node.nodeType > 0) { - switch (node.nodeType) { - case 1: // Element - return node.uniqueID; - case 9: // Document - return node.documentElement && node.documentElement.uniqueID; - } - } - } - - function valueOf(obj) { - return obj.valueOf !== defaultValueOf && typeof obj.valueOf === 'function' - ? obj.valueOf(obj) - : obj; - } - - function nextHash() { - var nextHash = ++_objHashUID; - if (_objHashUID & 0x40000000) { - _objHashUID = 0; - } - return nextHash; - } - - // If possible, use a WeakMap. - var usingWeakMap = typeof WeakMap === 'function'; - var weakMap; - if (usingWeakMap) { - weakMap = new WeakMap(); - } - - var symbolMap = Object.create(null); - - var _objHashUID = 0; - - var UID_HASH_KEY = '__immutablehash__'; - if (typeof Symbol === 'function') { - UID_HASH_KEY = Symbol(UID_HASH_KEY); - } - - var STRING_HASH_CACHE_MIN_STRLEN = 16; - var STRING_HASH_CACHE_MAX_SIZE = 255; - var STRING_HASH_CACHE_SIZE = 0; - var stringHashCache = {}; - - var ToKeyedSequence = /*@__PURE__*/(function (KeyedSeq) { - function ToKeyedSequence(indexed, useKeys) { - this._iter = indexed; - this._useKeys = useKeys; - this.size = indexed.size; - } - - if ( KeyedSeq ) ToKeyedSequence.__proto__ = KeyedSeq; - ToKeyedSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); - ToKeyedSequence.prototype.constructor = ToKeyedSequence; - - ToKeyedSequence.prototype.get = function get (key, notSetValue) { - return this._iter.get(key, notSetValue); - }; - - ToKeyedSequence.prototype.has = function has (key) { - return this._iter.has(key); - }; - - ToKeyedSequence.prototype.valueSeq = function valueSeq () { - return this._iter.valueSeq(); - }; - - ToKeyedSequence.prototype.reverse = function reverse () { - var this$1$1 = this; - - var reversedSequence = reverseFactory(this, true); - if (!this._useKeys) { - reversedSequence.valueSeq = function () { return this$1$1._iter.toSeq().reverse(); }; - } - return reversedSequence; - }; - - ToKeyedSequence.prototype.map = function map (mapper, context) { - var this$1$1 = this; - - var mappedSequence = mapFactory(this, mapper, context); - if (!this._useKeys) { - mappedSequence.valueSeq = function () { return this$1$1._iter.toSeq().map(mapper, context); }; - } - return mappedSequence; - }; - - ToKeyedSequence.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - return this._iter.__iterate(function (v, k) { return fn(v, k, this$1$1); }, reverse); - }; - - ToKeyedSequence.prototype.__iterator = function __iterator (type, reverse) { - return this._iter.__iterator(type, reverse); - }; - - return ToKeyedSequence; - }(KeyedSeq)); - ToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true; - - var ToIndexedSequence = /*@__PURE__*/(function (IndexedSeq) { - function ToIndexedSequence(iter) { - this._iter = iter; - this.size = iter.size; - } - - if ( IndexedSeq ) ToIndexedSequence.__proto__ = IndexedSeq; - ToIndexedSequence.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); - ToIndexedSequence.prototype.constructor = ToIndexedSequence; - - ToIndexedSequence.prototype.includes = function includes (value) { - return this._iter.includes(value); - }; - - ToIndexedSequence.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - var i = 0; - reverse && ensureSize(this); - return this._iter.__iterate( - function (v) { return fn(v, reverse ? this$1$1.size - ++i : i++, this$1$1); }, - reverse - ); - }; - - ToIndexedSequence.prototype.__iterator = function __iterator (type, reverse) { - var this$1$1 = this; - - var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); - var i = 0; - reverse && ensureSize(this); - return new Iterator(function () { - var step = iterator.next(); - return step.done - ? step - : iteratorValue( - type, - reverse ? this$1$1.size - ++i : i++, - step.value, - step - ); - }); - }; - - return ToIndexedSequence; - }(IndexedSeq)); - - var ToSetSequence = /*@__PURE__*/(function (SetSeq) { - function ToSetSequence(iter) { - this._iter = iter; - this.size = iter.size; - } - - if ( SetSeq ) ToSetSequence.__proto__ = SetSeq; - ToSetSequence.prototype = Object.create( SetSeq && SetSeq.prototype ); - ToSetSequence.prototype.constructor = ToSetSequence; - - ToSetSequence.prototype.has = function has (key) { - return this._iter.includes(key); - }; - - ToSetSequence.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - return this._iter.__iterate(function (v) { return fn(v, v, this$1$1); }, reverse); - }; - - ToSetSequence.prototype.__iterator = function __iterator (type, reverse) { - var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); - return new Iterator(function () { - var step = iterator.next(); - return step.done - ? step - : iteratorValue(type, step.value, step.value, step); - }); - }; - - return ToSetSequence; - }(SetSeq)); - - var FromEntriesSequence = /*@__PURE__*/(function (KeyedSeq) { - function FromEntriesSequence(entries) { - this._iter = entries; - this.size = entries.size; - } - - if ( KeyedSeq ) FromEntriesSequence.__proto__ = KeyedSeq; - FromEntriesSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype ); - FromEntriesSequence.prototype.constructor = FromEntriesSequence; - - FromEntriesSequence.prototype.entrySeq = function entrySeq () { - return this._iter.toSeq(); - }; - - FromEntriesSequence.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - return this._iter.__iterate(function (entry) { - // Check if entry exists first so array access doesn't throw for holes - // in the parent iteration. - if (entry) { - validateEntry(entry); - var indexedCollection = isCollection(entry); - return fn( - indexedCollection ? entry.get(1) : entry[1], - indexedCollection ? entry.get(0) : entry[0], - this$1$1 - ); - } - }, reverse); - }; - - FromEntriesSequence.prototype.__iterator = function __iterator (type, reverse) { - var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); - return new Iterator(function () { - while (true) { - var step = iterator.next(); - if (step.done) { - return step; - } - var entry = step.value; - // Check if entry exists first so array access doesn't throw for holes - // in the parent iteration. - if (entry) { - validateEntry(entry); - var indexedCollection = isCollection(entry); - return iteratorValue( - type, - indexedCollection ? entry.get(0) : entry[0], - indexedCollection ? entry.get(1) : entry[1], - step - ); - } - } - }); - }; - - return FromEntriesSequence; - }(KeyedSeq)); - - ToIndexedSequence.prototype.cacheResult = - ToKeyedSequence.prototype.cacheResult = - ToSetSequence.prototype.cacheResult = - FromEntriesSequence.prototype.cacheResult = - cacheResultThrough; - - function flipFactory(collection) { - var flipSequence = makeSequence(collection); - flipSequence._iter = collection; - flipSequence.size = collection.size; - flipSequence.flip = function () { return collection; }; - flipSequence.reverse = function () { - var reversedSequence = collection.reverse.apply(this); // super.reverse() - reversedSequence.flip = function () { return collection.reverse(); }; - return reversedSequence; - }; - flipSequence.has = function (key) { return collection.includes(key); }; - flipSequence.includes = function (key) { return collection.has(key); }; - flipSequence.cacheResult = cacheResultThrough; - flipSequence.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - return collection.__iterate(function (v, k) { return fn(k, v, this$1$1) !== false; }, reverse); - }; - flipSequence.__iteratorUncached = function (type, reverse) { - if (type === ITERATE_ENTRIES) { - var iterator = collection.__iterator(type, reverse); - return new Iterator(function () { - var step = iterator.next(); - if (!step.done) { - var k = step.value[0]; - step.value[0] = step.value[1]; - step.value[1] = k; - } - return step; - }); - } - return collection.__iterator( - type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, - reverse - ); - }; - return flipSequence; - } - - function mapFactory(collection, mapper, context) { - var mappedSequence = makeSequence(collection); - mappedSequence.size = collection.size; - mappedSequence.has = function (key) { return collection.has(key); }; - mappedSequence.get = function (key, notSetValue) { - var v = collection.get(key, NOT_SET); - return v === NOT_SET - ? notSetValue - : mapper.call(context, v, key, collection); - }; - mappedSequence.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - return collection.__iterate( - function (v, k, c) { return fn(mapper.call(context, v, k, c), k, this$1$1) !== false; }, - reverse - ); - }; - mappedSequence.__iteratorUncached = function (type, reverse) { - var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); - return new Iterator(function () { - var step = iterator.next(); - if (step.done) { - return step; - } - var entry = step.value; - var key = entry[0]; - return iteratorValue( - type, - key, - mapper.call(context, entry[1], key, collection), - step - ); - }); - }; - return mappedSequence; - } - - function reverseFactory(collection, useKeys) { - var this$1$1 = this; - - var reversedSequence = makeSequence(collection); - reversedSequence._iter = collection; - reversedSequence.size = collection.size; - reversedSequence.reverse = function () { return collection; }; - if (collection.flip) { - reversedSequence.flip = function () { - var flipSequence = flipFactory(collection); - flipSequence.reverse = function () { return collection.flip(); }; - return flipSequence; - }; - } - reversedSequence.get = function (key, notSetValue) { return collection.get(useKeys ? key : -1 - key, notSetValue); }; - reversedSequence.has = function (key) { return collection.has(useKeys ? key : -1 - key); }; - reversedSequence.includes = function (value) { return collection.includes(value); }; - reversedSequence.cacheResult = cacheResultThrough; - reversedSequence.__iterate = function (fn, reverse) { - var this$1$1 = this; - - var i = 0; - reverse && ensureSize(collection); - return collection.__iterate( - function (v, k) { return fn(v, useKeys ? k : reverse ? this$1$1.size - ++i : i++, this$1$1); }, - !reverse - ); - }; - reversedSequence.__iterator = function (type, reverse) { - var i = 0; - reverse && ensureSize(collection); - var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse); - return new Iterator(function () { - var step = iterator.next(); - if (step.done) { - return step; - } - var entry = step.value; - return iteratorValue( - type, - useKeys ? entry[0] : reverse ? this$1$1.size - ++i : i++, - entry[1], - step - ); - }); - }; - return reversedSequence; - } - - function filterFactory(collection, predicate, context, useKeys) { - var filterSequence = makeSequence(collection); - if (useKeys) { - filterSequence.has = function (key) { - var v = collection.get(key, NOT_SET); - return v !== NOT_SET && !!predicate.call(context, v, key, collection); - }; - filterSequence.get = function (key, notSetValue) { - var v = collection.get(key, NOT_SET); - return v !== NOT_SET && predicate.call(context, v, key, collection) - ? v - : notSetValue; - }; - } - filterSequence.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - var iterations = 0; - collection.__iterate(function (v, k, c) { - if (predicate.call(context, v, k, c)) { - iterations++; - return fn(v, useKeys ? k : iterations - 1, this$1$1); - } - }, reverse); - return iterations; - }; - filterSequence.__iteratorUncached = function (type, reverse) { - var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); - var iterations = 0; - return new Iterator(function () { - while (true) { - var step = iterator.next(); - if (step.done) { - return step; - } - var entry = step.value; - var key = entry[0]; - var value = entry[1]; - if (predicate.call(context, value, key, collection)) { - return iteratorValue(type, useKeys ? key : iterations++, value, step); - } - } - }); - }; - return filterSequence; - } - - function countByFactory(collection, grouper, context) { - var groups = Map().asMutable(); - collection.__iterate(function (v, k) { - groups.update(grouper.call(context, v, k, collection), 0, function (a) { return a + 1; }); - }); - return groups.asImmutable(); - } - - function groupByFactory(collection, grouper, context) { - var isKeyedIter = isKeyed(collection); - var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable(); - collection.__iterate(function (v, k) { - groups.update( - grouper.call(context, v, k, collection), - function (a) { return ((a = a || []), a.push(isKeyedIter ? [k, v] : v), a); } - ); - }); - var coerce = collectionClass(collection); - return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable(); - } - - function partitionFactory(collection, predicate, context) { - var isKeyedIter = isKeyed(collection); - var groups = [[], []]; - collection.__iterate(function (v, k) { - groups[predicate.call(context, v, k, collection) ? 1 : 0].push( - isKeyedIter ? [k, v] : v - ); - }); - var coerce = collectionClass(collection); - return groups.map(function (arr) { return reify(collection, coerce(arr)); }); - } - - function sliceFactory(collection, begin, end, useKeys) { - var originalSize = collection.size; - - if (wholeSlice(begin, end, originalSize)) { - return collection; - } - - // begin or end can not be resolved if they were provided as negative numbers and - // this collection's size is unknown. In that case, cache first so there is - // a known size and these do not resolve to NaN. - if (typeof originalSize === 'undefined' && (begin < 0 || end < 0)) { - return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys); - } - - var resolvedBegin = resolveBegin(begin, originalSize); - var resolvedEnd = resolveEnd(end, originalSize); - - // Note: resolvedEnd is undefined when the original sequence's length is - // unknown and this slice did not supply an end and should contain all - // elements after resolvedBegin. - // In that case, resolvedSize will be NaN and sliceSize will remain undefined. - var resolvedSize = resolvedEnd - resolvedBegin; - var sliceSize; - if (resolvedSize === resolvedSize) { - sliceSize = resolvedSize < 0 ? 0 : resolvedSize; - } - - var sliceSeq = makeSequence(collection); - - // If collection.size is undefined, the size of the realized sliceSeq is - // unknown at this point unless the number of items to slice is 0 - sliceSeq.size = - sliceSize === 0 ? sliceSize : (collection.size && sliceSize) || undefined; - - if (!useKeys && isSeq(collection) && sliceSize >= 0) { - sliceSeq.get = function (index, notSetValue) { - index = wrapIndex(this, index); - return index >= 0 && index < sliceSize - ? collection.get(index + resolvedBegin, notSetValue) - : notSetValue; - }; - } - - sliceSeq.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - if (sliceSize === 0) { - return 0; - } - if (reverse) { - return this.cacheResult().__iterate(fn, reverse); - } - var skipped = 0; - var isSkipping = true; - var iterations = 0; - collection.__iterate(function (v, k) { - if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) { - iterations++; - return ( - fn(v, useKeys ? k : iterations - 1, this$1$1) !== false && - iterations !== sliceSize - ); - } - }); - return iterations; - }; - - sliceSeq.__iteratorUncached = function (type, reverse) { - if (sliceSize !== 0 && reverse) { - return this.cacheResult().__iterator(type, reverse); - } - // Don't bother instantiating parent iterator if taking 0. - if (sliceSize === 0) { - return new Iterator(iteratorDone); - } - var iterator = collection.__iterator(type, reverse); - var skipped = 0; - var iterations = 0; - return new Iterator(function () { - while (skipped++ < resolvedBegin) { - iterator.next(); - } - if (++iterations > sliceSize) { - return iteratorDone(); - } - var step = iterator.next(); - if (useKeys || type === ITERATE_VALUES || step.done) { - return step; - } - if (type === ITERATE_KEYS) { - return iteratorValue(type, iterations - 1, undefined, step); - } - return iteratorValue(type, iterations - 1, step.value[1], step); - }); - }; - - return sliceSeq; - } - - function takeWhileFactory(collection, predicate, context) { - var takeSequence = makeSequence(collection); - takeSequence.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - if (reverse) { - return this.cacheResult().__iterate(fn, reverse); - } - var iterations = 0; - collection.__iterate( - function (v, k, c) { return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1$1); } - ); - return iterations; - }; - takeSequence.__iteratorUncached = function (type, reverse) { - var this$1$1 = this; - - if (reverse) { - return this.cacheResult().__iterator(type, reverse); - } - var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); - var iterating = true; - return new Iterator(function () { - if (!iterating) { - return iteratorDone(); - } - var step = iterator.next(); - if (step.done) { - return step; - } - var entry = step.value; - var k = entry[0]; - var v = entry[1]; - if (!predicate.call(context, v, k, this$1$1)) { - iterating = false; - return iteratorDone(); - } - return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); - }); - }; - return takeSequence; - } - - function skipWhileFactory(collection, predicate, context, useKeys) { - var skipSequence = makeSequence(collection); - skipSequence.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - if (reverse) { - return this.cacheResult().__iterate(fn, reverse); - } - var isSkipping = true; - var iterations = 0; - collection.__iterate(function (v, k, c) { - if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) { - iterations++; - return fn(v, useKeys ? k : iterations - 1, this$1$1); - } - }); - return iterations; - }; - skipSequence.__iteratorUncached = function (type, reverse) { - var this$1$1 = this; - - if (reverse) { - return this.cacheResult().__iterator(type, reverse); - } - var iterator = collection.__iterator(ITERATE_ENTRIES, reverse); - var skipping = true; - var iterations = 0; - return new Iterator(function () { - var step; - var k; - var v; - do { - step = iterator.next(); - if (step.done) { - if (useKeys || type === ITERATE_VALUES) { - return step; - } - if (type === ITERATE_KEYS) { - return iteratorValue(type, iterations++, undefined, step); - } - return iteratorValue(type, iterations++, step.value[1], step); - } - var entry = step.value; - k = entry[0]; - v = entry[1]; - skipping && (skipping = predicate.call(context, v, k, this$1$1)); - } while (skipping); - return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); - }); - }; - return skipSequence; - } - - function concatFactory(collection, values) { - var isKeyedCollection = isKeyed(collection); - var iters = [collection] - .concat(values) - .map(function (v) { - if (!isCollection(v)) { - v = isKeyedCollection - ? keyedSeqFromValue(v) - : indexedSeqFromValue(Array.isArray(v) ? v : [v]); - } else if (isKeyedCollection) { - v = KeyedCollection(v); - } - return v; - }) - .filter(function (v) { return v.size !== 0; }); - - if (iters.length === 0) { - return collection; - } - - if (iters.length === 1) { - var singleton = iters[0]; - if ( - singleton === collection || - (isKeyedCollection && isKeyed(singleton)) || - (isIndexed(collection) && isIndexed(singleton)) - ) { - return singleton; - } - } - - var concatSeq = new ArraySeq(iters); - if (isKeyedCollection) { - concatSeq = concatSeq.toKeyedSeq(); - } else if (!isIndexed(collection)) { - concatSeq = concatSeq.toSetSeq(); - } - concatSeq = concatSeq.flatten(true); - concatSeq.size = iters.reduce(function (sum, seq) { - if (sum !== undefined) { - var size = seq.size; - if (size !== undefined) { - return sum + size; - } - } - }, 0); - return concatSeq; - } - - function flattenFactory(collection, depth, useKeys) { - var flatSequence = makeSequence(collection); - flatSequence.__iterateUncached = function (fn, reverse) { - if (reverse) { - return this.cacheResult().__iterate(fn, reverse); - } - var iterations = 0; - var stopped = false; - function flatDeep(iter, currentDepth) { - iter.__iterate(function (v, k) { - if ((!depth || currentDepth < depth) && isCollection(v)) { - flatDeep(v, currentDepth + 1); - } else { - iterations++; - if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) { - stopped = true; - } - } - return !stopped; - }, reverse); - } - flatDeep(collection, 0); - return iterations; - }; - flatSequence.__iteratorUncached = function (type, reverse) { - if (reverse) { - return this.cacheResult().__iterator(type, reverse); - } - var iterator = collection.__iterator(type, reverse); - var stack = []; - var iterations = 0; - return new Iterator(function () { - while (iterator) { - var step = iterator.next(); - if (step.done !== false) { - iterator = stack.pop(); - continue; - } - var v = step.value; - if (type === ITERATE_ENTRIES) { - v = v[1]; - } - if ((!depth || stack.length < depth) && isCollection(v)) { - stack.push(iterator); - iterator = v.__iterator(type, reverse); - } else { - return useKeys ? step : iteratorValue(type, iterations++, v, step); - } - } - return iteratorDone(); - }); - }; - return flatSequence; - } - - function flatMapFactory(collection, mapper, context) { - var coerce = collectionClass(collection); - return collection - .toSeq() - .map(function (v, k) { return coerce(mapper.call(context, v, k, collection)); }) - .flatten(true); - } - - function interposeFactory(collection, separator) { - var interposedSequence = makeSequence(collection); - interposedSequence.size = collection.size && collection.size * 2 - 1; - interposedSequence.__iterateUncached = function (fn, reverse) { - var this$1$1 = this; - - var iterations = 0; - collection.__iterate( - function (v) { return (!iterations || fn(separator, iterations++, this$1$1) !== false) && - fn(v, iterations++, this$1$1) !== false; }, - reverse - ); - return iterations; - }; - interposedSequence.__iteratorUncached = function (type, reverse) { - var iterator = collection.__iterator(ITERATE_VALUES, reverse); - var iterations = 0; - var step; - return new Iterator(function () { - if (!step || iterations % 2) { - step = iterator.next(); - if (step.done) { - return step; - } - } - return iterations % 2 - ? iteratorValue(type, iterations++, separator) - : iteratorValue(type, iterations++, step.value, step); - }); - }; - return interposedSequence; - } - - function sortFactory(collection, comparator, mapper) { - if (!comparator) { - comparator = defaultComparator; - } - var isKeyedCollection = isKeyed(collection); - var index = 0; - var entries = collection - .toSeq() - .map(function (v, k) { return [k, v, index++, mapper ? mapper(v, k, collection) : v]; }) - .valueSeq() - .toArray(); - entries - .sort(function (a, b) { return comparator(a[3], b[3]) || a[2] - b[2]; }) - .forEach( - isKeyedCollection - ? function (v, i) { - entries[i].length = 2; - } - : function (v, i) { - entries[i] = v[1]; - } - ); - return isKeyedCollection - ? KeyedSeq(entries) - : isIndexed(collection) - ? IndexedSeq(entries) - : SetSeq(entries); - } - - function maxFactory(collection, comparator, mapper) { - if (!comparator) { - comparator = defaultComparator; - } - if (mapper) { - var entry = collection - .toSeq() - .map(function (v, k) { return [v, mapper(v, k, collection)]; }) - .reduce(function (a, b) { return (maxCompare(comparator, a[1], b[1]) ? b : a); }); - return entry && entry[0]; - } - return collection.reduce(function (a, b) { return (maxCompare(comparator, a, b) ? b : a); }); - } - - function maxCompare(comparator, a, b) { - var comp = comparator(b, a); - // b is considered the new max if the comparator declares them equal, but - // they are not equal and b is in fact a nullish value. - return ( - (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || - comp > 0 - ); - } - - function zipWithFactory(keyIter, zipper, iters, zipAll) { - var zipSequence = makeSequence(keyIter); - var sizes = new ArraySeq(iters).map(function (i) { return i.size; }); - zipSequence.size = zipAll ? sizes.max() : sizes.min(); - // Note: this a generic base implementation of __iterate in terms of - // __iterator which may be more generically useful in the future. - zipSequence.__iterate = function (fn, reverse) { - /* generic: - var iterator = this.__iterator(ITERATE_ENTRIES, reverse); - var step; - var iterations = 0; - while (!(step = iterator.next()).done) { - iterations++; - if (fn(step.value[1], step.value[0], this) === false) { - break; - } - } - return iterations; - */ - // indexed: - var iterator = this.__iterator(ITERATE_VALUES, reverse); - var step; - var iterations = 0; - while (!(step = iterator.next()).done) { - if (fn(step.value, iterations++, this) === false) { - break; - } - } - return iterations; - }; - zipSequence.__iteratorUncached = function (type, reverse) { - var iterators = iters.map( - function (i) { return ((i = Collection(i)), getIterator(reverse ? i.reverse() : i)); } - ); - var iterations = 0; - var isDone = false; - return new Iterator(function () { - var steps; - if (!isDone) { - steps = iterators.map(function (i) { return i.next(); }); - isDone = zipAll ? steps.every(function (s) { return s.done; }) : steps.some(function (s) { return s.done; }); - } - if (isDone) { - return iteratorDone(); - } - return iteratorValue( - type, - iterations++, - zipper.apply( - null, - steps.map(function (s) { return s.value; }) - ) - ); - }); - }; - return zipSequence; - } - - // #pragma Helper Functions - - function reify(iter, seq) { - return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq); - } - - function validateEntry(entry) { - if (entry !== Object(entry)) { - throw new TypeError('Expected [K, V] tuple: ' + entry); - } - } - - function collectionClass(collection) { - return isKeyed(collection) - ? KeyedCollection - : isIndexed(collection) - ? IndexedCollection - : SetCollection; - } - - function makeSequence(collection) { - return Object.create( - (isKeyed(collection) - ? KeyedSeq - : isIndexed(collection) - ? IndexedSeq - : SetSeq - ).prototype - ); - } - - function cacheResultThrough() { - if (this._iter.cacheResult) { - this._iter.cacheResult(); - this.size = this._iter.size; - return this; - } - return Seq.prototype.cacheResult.call(this); - } - - function defaultComparator(a, b) { - if (a === undefined && b === undefined) { - return 0; - } - - if (a === undefined) { - return 1; - } - - if (b === undefined) { - return -1; - } - - return a > b ? 1 : a < b ? -1 : 0; - } - - // http://jsperf.com/copy-array-inline - function arrCopy(arr, offset) { - offset = offset || 0; - var len = Math.max(0, arr.length - offset); - var newArr = new Array(len); - for (var ii = 0; ii < len; ii++) { - newArr[ii] = arr[ii + offset]; - } - return newArr; - } - - function invariant(condition, error) { - if (!condition) { throw new Error(error); } - } - - function assertNotInfinite(size) { - invariant( - size !== Infinity, - 'Cannot perform this action with an infinite size.' - ); - } - - function coerceKeyPath(keyPath) { - if (isArrayLike(keyPath) && typeof keyPath !== 'string') { - return keyPath; - } - if (isOrdered(keyPath)) { - return keyPath.toArray(); - } - throw new TypeError( - 'Invalid keyPath: expected Ordered Collection or Array: ' + keyPath - ); - } - - var toString = Object.prototype.toString; - - function isPlainObject(value) { - // The base prototype's toString deals with Argument objects and native namespaces like Math - if ( - !value || - typeof value !== 'object' || - toString.call(value) !== '[object Object]' - ) { - return false; - } - - var proto = Object.getPrototypeOf(value); - if (proto === null) { - return true; - } - - // Iteratively going up the prototype chain is needed for cross-realm environments (differing contexts, iframes, etc) - var parentProto = proto; - var nextProto = Object.getPrototypeOf(proto); - while (nextProto !== null) { - parentProto = nextProto; - nextProto = Object.getPrototypeOf(parentProto); - } - return parentProto === proto; - } - - /** - * Returns true if the value is a potentially-persistent data structure, either - * provided by Immutable.js or a plain Array or Object. - */ - function isDataStructure(value) { - return ( - typeof value === 'object' && - (isImmutable(value) || Array.isArray(value) || isPlainObject(value)) - ); - } - - /** - * Converts a value to a string, adding quotes if a string was provided. - */ - function quoteString(value) { - try { - return typeof value === 'string' ? JSON.stringify(value) : String(value); - } catch (_ignoreError) { - return JSON.stringify(value); - } - } - - function has(collection, key) { - return isImmutable(collection) - ? collection.has(key) - : isDataStructure(collection) && hasOwnProperty.call(collection, key); - } - - function get(collection, key, notSetValue) { - return isImmutable(collection) - ? collection.get(key, notSetValue) - : !has(collection, key) - ? notSetValue - : typeof collection.get === 'function' - ? collection.get(key) - : collection[key]; - } - - function shallowCopy(from) { - if (Array.isArray(from)) { - return arrCopy(from); - } - var to = {}; - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - return to; - } - - function remove(collection, key) { - if (!isDataStructure(collection)) { - throw new TypeError( - 'Cannot update non-data-structure value: ' + collection - ); - } - if (isImmutable(collection)) { - if (!collection.remove) { - throw new TypeError( - 'Cannot update immutable value without .remove() method: ' + collection - ); - } - return collection.remove(key); - } - if (!hasOwnProperty.call(collection, key)) { - return collection; - } - var collectionCopy = shallowCopy(collection); - if (Array.isArray(collectionCopy)) { - collectionCopy.splice(key, 1); - } else { - delete collectionCopy[key]; - } - return collectionCopy; - } - - function set(collection, key, value) { - if (!isDataStructure(collection)) { - throw new TypeError( - 'Cannot update non-data-structure value: ' + collection - ); - } - if (isImmutable(collection)) { - if (!collection.set) { - throw new TypeError( - 'Cannot update immutable value without .set() method: ' + collection - ); - } - return collection.set(key, value); - } - if (hasOwnProperty.call(collection, key) && value === collection[key]) { - return collection; - } - var collectionCopy = shallowCopy(collection); - collectionCopy[key] = value; - return collectionCopy; - } - - function updateIn$1(collection, keyPath, notSetValue, updater) { - if (!updater) { - updater = notSetValue; - notSetValue = undefined; - } - var updatedValue = updateInDeeply( - isImmutable(collection), - collection, - coerceKeyPath(keyPath), - 0, - notSetValue, - updater - ); - return updatedValue === NOT_SET ? notSetValue : updatedValue; - } - - function updateInDeeply( - inImmutable, - existing, - keyPath, - i, - notSetValue, - updater - ) { - var wasNotSet = existing === NOT_SET; - if (i === keyPath.length) { - var existingValue = wasNotSet ? notSetValue : existing; - var newValue = updater(existingValue); - return newValue === existingValue ? existing : newValue; - } - if (!wasNotSet && !isDataStructure(existing)) { - throw new TypeError( - 'Cannot update within non-data-structure value in path [' + - keyPath.slice(0, i).map(quoteString) + - ']: ' + - existing - ); - } - var key = keyPath[i]; - var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET); - var nextUpdated = updateInDeeply( - nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting), - nextExisting, - keyPath, - i + 1, - notSetValue, - updater - ); - return nextUpdated === nextExisting - ? existing - : nextUpdated === NOT_SET - ? remove(existing, key) - : set( - wasNotSet ? (inImmutable ? emptyMap() : {}) : existing, - key, - nextUpdated - ); - } - - function setIn$1(collection, keyPath, value) { - return updateIn$1(collection, keyPath, NOT_SET, function () { return value; }); - } - - function setIn(keyPath, v) { - return setIn$1(this, keyPath, v); - } - - function removeIn(collection, keyPath) { - return updateIn$1(collection, keyPath, function () { return NOT_SET; }); - } - - function deleteIn(keyPath) { - return removeIn(this, keyPath); - } - - function update$1(collection, key, notSetValue, updater) { - return updateIn$1(collection, [key], notSetValue, updater); - } - - function update(key, notSetValue, updater) { - return arguments.length === 1 - ? key(this) - : update$1(this, key, notSetValue, updater); - } - - function updateIn(keyPath, notSetValue, updater) { - return updateIn$1(this, keyPath, notSetValue, updater); - } - - function merge$1() { - var iters = [], len = arguments.length; - while ( len-- ) iters[ len ] = arguments[ len ]; - - return mergeIntoKeyedWith(this, iters); - } - - function mergeWith$1(merger) { - var iters = [], len = arguments.length - 1; - while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; - - if (typeof merger !== 'function') { - throw new TypeError('Invalid merger function: ' + merger); - } - return mergeIntoKeyedWith(this, iters, merger); - } - - function mergeIntoKeyedWith(collection, collections, merger) { - var iters = []; - for (var ii = 0; ii < collections.length; ii++) { - var collection$1 = KeyedCollection(collections[ii]); - if (collection$1.size !== 0) { - iters.push(collection$1); - } - } - if (iters.length === 0) { - return collection; - } - if ( - collection.toSeq().size === 0 && - !collection.__ownerID && - iters.length === 1 - ) { - return collection.constructor(iters[0]); - } - return collection.withMutations(function (collection) { - var mergeIntoCollection = merger - ? function (value, key) { - update$1(collection, key, NOT_SET, function (oldVal) { return oldVal === NOT_SET ? value : merger(oldVal, value, key); } - ); - } - : function (value, key) { - collection.set(key, value); - }; - for (var ii = 0; ii < iters.length; ii++) { - iters[ii].forEach(mergeIntoCollection); - } - }); - } - - function merge(collection) { - var sources = [], len = arguments.length - 1; - while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; - - return mergeWithSources(collection, sources); - } - - function mergeWith(merger, collection) { - var sources = [], len = arguments.length - 2; - while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ]; - - return mergeWithSources(collection, sources, merger); - } - - function mergeDeep$1(collection) { - var sources = [], len = arguments.length - 1; - while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; - - return mergeDeepWithSources(collection, sources); - } - - function mergeDeepWith$1(merger, collection) { - var sources = [], len = arguments.length - 2; - while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ]; - - return mergeDeepWithSources(collection, sources, merger); - } - - function mergeDeepWithSources(collection, sources, merger) { - return mergeWithSources(collection, sources, deepMergerWith(merger)); - } - - function mergeWithSources(collection, sources, merger) { - if (!isDataStructure(collection)) { - throw new TypeError( - 'Cannot merge into non-data-structure value: ' + collection - ); - } - if (isImmutable(collection)) { - return typeof merger === 'function' && collection.mergeWith - ? collection.mergeWith.apply(collection, [ merger ].concat( sources )) - : collection.merge - ? collection.merge.apply(collection, sources) - : collection.concat.apply(collection, sources); - } - var isArray = Array.isArray(collection); - var merged = collection; - var Collection = isArray ? IndexedCollection : KeyedCollection; - var mergeItem = isArray - ? function (value) { - // Copy on write - if (merged === collection) { - merged = shallowCopy(merged); - } - merged.push(value); - } - : function (value, key) { - var hasVal = hasOwnProperty.call(merged, key); - var nextVal = - hasVal && merger ? merger(merged[key], value, key) : value; - if (!hasVal || nextVal !== merged[key]) { - // Copy on write - if (merged === collection) { - merged = shallowCopy(merged); - } - merged[key] = nextVal; - } - }; - for (var i = 0; i < sources.length; i++) { - Collection(sources[i]).forEach(mergeItem); - } - return merged; - } - - function deepMergerWith(merger) { - function deepMerger(oldValue, newValue, key) { - return isDataStructure(oldValue) && - isDataStructure(newValue) && - areMergeable(oldValue, newValue) - ? mergeWithSources(oldValue, [newValue], deepMerger) - : merger - ? merger(oldValue, newValue, key) - : newValue; - } - return deepMerger; - } - - /** - * It's unclear what the desired behavior is for merging two collections that - * fall into separate categories between keyed, indexed, or set-like, so we only - * consider them mergeable if they fall into the same category. - */ - function areMergeable(oldDataStructure, newDataStructure) { - var oldSeq = Seq(oldDataStructure); - var newSeq = Seq(newDataStructure); - // This logic assumes that a sequence can only fall into one of the three - // categories mentioned above (since there's no `isSetLike()` method). - return ( - isIndexed(oldSeq) === isIndexed(newSeq) && - isKeyed(oldSeq) === isKeyed(newSeq) - ); - } - - function mergeDeep() { - var iters = [], len = arguments.length; - while ( len-- ) iters[ len ] = arguments[ len ]; - - return mergeDeepWithSources(this, iters); - } - - function mergeDeepWith(merger) { - var iters = [], len = arguments.length - 1; - while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; - - return mergeDeepWithSources(this, iters, merger); - } - - function mergeIn(keyPath) { - var iters = [], len = arguments.length - 1; - while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; - - return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); }); - } - - function mergeDeepIn(keyPath) { - var iters = [], len = arguments.length - 1; - while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ]; - - return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); } - ); - } - - function withMutations(fn) { - var mutable = this.asMutable(); - fn(mutable); - return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; - } - - function asMutable() { - return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); - } - - function asImmutable() { - return this.__ensureOwner(); - } - - function wasAltered() { - return this.__altered; - } - - var Map = /*@__PURE__*/(function (KeyedCollection) { - function Map(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptyMap() - : isMap(value) && !isOrdered(value) - ? value - : emptyMap().withMutations(function (map) { - var iter = KeyedCollection(value); - assertNotInfinite(iter.size); - iter.forEach(function (v, k) { return map.set(k, v); }); - }); - } - - if ( KeyedCollection ) Map.__proto__ = KeyedCollection; - Map.prototype = Object.create( KeyedCollection && KeyedCollection.prototype ); - Map.prototype.constructor = Map; - - Map.prototype.toString = function toString () { - return this.__toString('Map {', '}'); - }; - - // @pragma Access - - Map.prototype.get = function get (k, notSetValue) { - return this._root - ? this._root.get(0, undefined, k, notSetValue) - : notSetValue; - }; - - // @pragma Modification - - Map.prototype.set = function set (k, v) { - return updateMap(this, k, v); - }; - - Map.prototype.remove = function remove (k) { - return updateMap(this, k, NOT_SET); - }; - - Map.prototype.deleteAll = function deleteAll (keys) { - var collection = Collection(keys); - - if (collection.size === 0) { - return this; - } - - return this.withMutations(function (map) { - collection.forEach(function (key) { return map.remove(key); }); - }); - }; - - Map.prototype.clear = function clear () { - if (this.size === 0) { - return this; - } - if (this.__ownerID) { - this.size = 0; - this._root = null; - this.__hash = undefined; - this.__altered = true; - return this; - } - return emptyMap(); - }; - - // @pragma Composition - - Map.prototype.sort = function sort (comparator) { - // Late binding - return OrderedMap(sortFactory(this, comparator)); - }; - - Map.prototype.sortBy = function sortBy (mapper, comparator) { - // Late binding - return OrderedMap(sortFactory(this, comparator, mapper)); - }; - - Map.prototype.map = function map (mapper, context) { - var this$1$1 = this; - - return this.withMutations(function (map) { - map.forEach(function (value, key) { - map.set(key, mapper.call(context, value, key, this$1$1)); - }); - }); - }; - - // @pragma Mutability - - Map.prototype.__iterator = function __iterator (type, reverse) { - return new MapIterator(this, type, reverse); - }; - - Map.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - var iterations = 0; - this._root && - this._root.iterate(function (entry) { - iterations++; - return fn(entry[1], entry[0], this$1$1); - }, reverse); - return iterations; - }; - - Map.prototype.__ensureOwner = function __ensureOwner (ownerID) { - if (ownerID === this.__ownerID) { - return this; - } - if (!ownerID) { - if (this.size === 0) { - return emptyMap(); - } - this.__ownerID = ownerID; - this.__altered = false; - return this; - } - return makeMap(this.size, this._root, ownerID, this.__hash); - }; - - return Map; - }(KeyedCollection)); - - Map.isMap = isMap; - - var MapPrototype = Map.prototype; - MapPrototype[IS_MAP_SYMBOL] = true; - MapPrototype[DELETE] = MapPrototype.remove; - MapPrototype.removeAll = MapPrototype.deleteAll; - MapPrototype.setIn = setIn; - MapPrototype.removeIn = MapPrototype.deleteIn = deleteIn; - MapPrototype.update = update; - MapPrototype.updateIn = updateIn; - MapPrototype.merge = MapPrototype.concat = merge$1; - MapPrototype.mergeWith = mergeWith$1; - MapPrototype.mergeDeep = mergeDeep; - MapPrototype.mergeDeepWith = mergeDeepWith; - MapPrototype.mergeIn = mergeIn; - MapPrototype.mergeDeepIn = mergeDeepIn; - MapPrototype.withMutations = withMutations; - MapPrototype.wasAltered = wasAltered; - MapPrototype.asImmutable = asImmutable; - MapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable; - MapPrototype['@@transducer/step'] = function (result, arr) { - return result.set(arr[0], arr[1]); - }; - MapPrototype['@@transducer/result'] = function (obj) { - return obj.asImmutable(); - }; - - // #pragma Trie Nodes - - var ArrayMapNode = function ArrayMapNode(ownerID, entries) { - this.ownerID = ownerID; - this.entries = entries; - }; - - ArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) { - var entries = this.entries; - for (var ii = 0, len = entries.length; ii < len; ii++) { - if (is(key, entries[ii][0])) { - return entries[ii][1]; - } - } - return notSetValue; - }; - - ArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { - var removed = value === NOT_SET; - - var entries = this.entries; - var idx = 0; - var len = entries.length; - for (; idx < len; idx++) { - if (is(key, entries[idx][0])) { - break; - } - } - var exists = idx < len; - - if (exists ? entries[idx][1] === value : removed) { - return this; - } - - SetRef(didAlter); - (removed || !exists) && SetRef(didChangeSize); - - if (removed && entries.length === 1) { - return; // undefined - } - - if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) { - return createNodes(ownerID, entries, key, value); - } - - var isEditable = ownerID && ownerID === this.ownerID; - var newEntries = isEditable ? entries : arrCopy(entries); - - if (exists) { - if (removed) { - idx === len - 1 - ? newEntries.pop() - : (newEntries[idx] = newEntries.pop()); - } else { - newEntries[idx] = [key, value]; - } - } else { - newEntries.push([key, value]); - } - - if (isEditable) { - this.entries = newEntries; - return this; - } - - return new ArrayMapNode(ownerID, newEntries); - }; - - var BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) { - this.ownerID = ownerID; - this.bitmap = bitmap; - this.nodes = nodes; - }; - - BitmapIndexedNode.prototype.get = function get (shift, keyHash, key, notSetValue) { - if (keyHash === undefined) { - keyHash = hash(key); - } - var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK); - var bitmap = this.bitmap; - return (bitmap & bit) === 0 - ? notSetValue - : this.nodes[popCount(bitmap & (bit - 1))].get( - shift + SHIFT, - keyHash, - key, - notSetValue - ); - }; - - BitmapIndexedNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { - if (keyHash === undefined) { - keyHash = hash(key); - } - var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; - var bit = 1 << keyHashFrag; - var bitmap = this.bitmap; - var exists = (bitmap & bit) !== 0; - - if (!exists && value === NOT_SET) { - return this; - } - - var idx = popCount(bitmap & (bit - 1)); - var nodes = this.nodes; - var node = exists ? nodes[idx] : undefined; - var newNode = updateNode( - node, - ownerID, - shift + SHIFT, - keyHash, - key, - value, - didChangeSize, - didAlter - ); - - if (newNode === node) { - return this; - } - - if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { - return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); - } - - if ( - exists && - !newNode && - nodes.length === 2 && - isLeafNode(nodes[idx ^ 1]) - ) { - return nodes[idx ^ 1]; - } - - if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) { - return newNode; - } - - var isEditable = ownerID && ownerID === this.ownerID; - var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit; - var newNodes = exists - ? newNode - ? setAt(nodes, idx, newNode, isEditable) - : spliceOut(nodes, idx, isEditable) - : spliceIn(nodes, idx, newNode, isEditable); - - if (isEditable) { - this.bitmap = newBitmap; - this.nodes = newNodes; - return this; - } - - return new BitmapIndexedNode(ownerID, newBitmap, newNodes); - }; - - var HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) { - this.ownerID = ownerID; - this.count = count; - this.nodes = nodes; - }; - - HashArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) { - if (keyHash === undefined) { - keyHash = hash(key); - } - var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; - var node = this.nodes[idx]; - return node - ? node.get(shift + SHIFT, keyHash, key, notSetValue) - : notSetValue; - }; - - HashArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { - if (keyHash === undefined) { - keyHash = hash(key); - } - var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; - var removed = value === NOT_SET; - var nodes = this.nodes; - var node = nodes[idx]; - - if (removed && !node) { - return this; - } - - var newNode = updateNode( - node, - ownerID, - shift + SHIFT, - keyHash, - key, - value, - didChangeSize, - didAlter - ); - if (newNode === node) { - return this; - } - - var newCount = this.count; - if (!node) { - newCount++; - } else if (!newNode) { - newCount--; - if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { - return packNodes(ownerID, nodes, newCount, idx); - } - } - - var isEditable = ownerID && ownerID === this.ownerID; - var newNodes = setAt(nodes, idx, newNode, isEditable); - - if (isEditable) { - this.count = newCount; - this.nodes = newNodes; - return this; - } - - return new HashArrayMapNode(ownerID, newCount, newNodes); - }; - - var HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) { - this.ownerID = ownerID; - this.keyHash = keyHash; - this.entries = entries; - }; - - HashCollisionNode.prototype.get = function get (shift, keyHash, key, notSetValue) { - var entries = this.entries; - for (var ii = 0, len = entries.length; ii < len; ii++) { - if (is(key, entries[ii][0])) { - return entries[ii][1]; - } - } - return notSetValue; - }; - - HashCollisionNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { - if (keyHash === undefined) { - keyHash = hash(key); - } - - var removed = value === NOT_SET; - - if (keyHash !== this.keyHash) { - if (removed) { - return this; - } - SetRef(didAlter); - SetRef(didChangeSize); - return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]); - } - - var entries = this.entries; - var idx = 0; - var len = entries.length; - for (; idx < len; idx++) { - if (is(key, entries[idx][0])) { - break; - } - } - var exists = idx < len; - - if (exists ? entries[idx][1] === value : removed) { - return this; - } - - SetRef(didAlter); - (removed || !exists) && SetRef(didChangeSize); - - if (removed && len === 2) { - return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]); - } - - var isEditable = ownerID && ownerID === this.ownerID; - var newEntries = isEditable ? entries : arrCopy(entries); - - if (exists) { - if (removed) { - idx === len - 1 - ? newEntries.pop() - : (newEntries[idx] = newEntries.pop()); - } else { - newEntries[idx] = [key, value]; - } - } else { - newEntries.push([key, value]); - } - - if (isEditable) { - this.entries = newEntries; - return this; - } - - return new HashCollisionNode(ownerID, this.keyHash, newEntries); - }; - - var ValueNode = function ValueNode(ownerID, keyHash, entry) { - this.ownerID = ownerID; - this.keyHash = keyHash; - this.entry = entry; - }; - - ValueNode.prototype.get = function get (shift, keyHash, key, notSetValue) { - return is(key, this.entry[0]) ? this.entry[1] : notSetValue; - }; - - ValueNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { - var removed = value === NOT_SET; - var keyMatch = is(key, this.entry[0]); - if (keyMatch ? value === this.entry[1] : removed) { - return this; - } - - SetRef(didAlter); - - if (removed) { - SetRef(didChangeSize); - return; // undefined - } - - if (keyMatch) { - if (ownerID && ownerID === this.ownerID) { - this.entry[1] = value; - return this; - } - return new ValueNode(ownerID, this.keyHash, [key, value]); - } - - SetRef(didChangeSize); - return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]); - }; - - // #pragma Iterators - - ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = - function (fn, reverse) { - var entries = this.entries; - for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) { - if (fn(entries[reverse ? maxIndex - ii : ii]) === false) { - return false; - } - } - }; - - BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = - function (fn, reverse) { - var nodes = this.nodes; - for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { - var node = nodes[reverse ? maxIndex - ii : ii]; - if (node && node.iterate(fn, reverse) === false) { - return false; - } - } - }; - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - ValueNode.prototype.iterate = function (fn, reverse) { - return fn(this.entry); - }; - - var MapIterator = /*@__PURE__*/(function (Iterator) { - function MapIterator(map, type, reverse) { - this._type = type; - this._reverse = reverse; - this._stack = map._root && mapIteratorFrame(map._root); - } - - if ( Iterator ) MapIterator.__proto__ = Iterator; - MapIterator.prototype = Object.create( Iterator && Iterator.prototype ); - MapIterator.prototype.constructor = MapIterator; - - MapIterator.prototype.next = function next () { - var type = this._type; - var stack = this._stack; - while (stack) { - var node = stack.node; - var index = stack.index++; - var maxIndex = (void 0); - if (node.entry) { - if (index === 0) { - return mapIteratorValue(type, node.entry); - } - } else if (node.entries) { - maxIndex = node.entries.length - 1; - if (index <= maxIndex) { - return mapIteratorValue( - type, - node.entries[this._reverse ? maxIndex - index : index] - ); - } - } else { - maxIndex = node.nodes.length - 1; - if (index <= maxIndex) { - var subNode = node.nodes[this._reverse ? maxIndex - index : index]; - if (subNode) { - if (subNode.entry) { - return mapIteratorValue(type, subNode.entry); - } - stack = this._stack = mapIteratorFrame(subNode, stack); - } - continue; - } - } - stack = this._stack = this._stack.__prev; - } - return iteratorDone(); - }; - - return MapIterator; - }(Iterator)); - - function mapIteratorValue(type, entry) { - return iteratorValue(type, entry[0], entry[1]); - } - - function mapIteratorFrame(node, prev) { - return { - node: node, - index: 0, - __prev: prev, - }; - } - - function makeMap(size, root, ownerID, hash) { - var map = Object.create(MapPrototype); - map.size = size; - map._root = root; - map.__ownerID = ownerID; - map.__hash = hash; - map.__altered = false; - return map; - } - - var EMPTY_MAP; - function emptyMap() { - return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); - } - - function updateMap(map, k, v) { - var newRoot; - var newSize; - if (!map._root) { - if (v === NOT_SET) { - return map; - } - newSize = 1; - newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]); - } else { - var didChangeSize = MakeRef(); - var didAlter = MakeRef(); - newRoot = updateNode( - map._root, - map.__ownerID, - 0, - undefined, - k, - v, - didChangeSize, - didAlter - ); - if (!didAlter.value) { - return map; - } - newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0); - } - if (map.__ownerID) { - map.size = newSize; - map._root = newRoot; - map.__hash = undefined; - map.__altered = true; - return map; - } - return newRoot ? makeMap(newSize, newRoot) : emptyMap(); - } - - function updateNode( - node, - ownerID, - shift, - keyHash, - key, - value, - didChangeSize, - didAlter - ) { - if (!node) { - if (value === NOT_SET) { - return node; - } - SetRef(didAlter); - SetRef(didChangeSize); - return new ValueNode(ownerID, keyHash, [key, value]); - } - return node.update( - ownerID, - shift, - keyHash, - key, - value, - didChangeSize, - didAlter - ); - } - - function isLeafNode(node) { - return ( - node.constructor === ValueNode || node.constructor === HashCollisionNode - ); - } - - function mergeIntoNode(node, ownerID, shift, keyHash, entry) { - if (node.keyHash === keyHash) { - return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]); - } - - var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK; - var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; - - var newNode; - var nodes = - idx1 === idx2 - ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] - : ((newNode = new ValueNode(ownerID, keyHash, entry)), - idx1 < idx2 ? [node, newNode] : [newNode, node]); - - return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes); - } - - function createNodes(ownerID, entries, key, value) { - if (!ownerID) { - ownerID = new OwnerID(); - } - var node = new ValueNode(ownerID, hash(key), [key, value]); - for (var ii = 0; ii < entries.length; ii++) { - var entry = entries[ii]; - node = node.update(ownerID, 0, undefined, entry[0], entry[1]); - } - return node; - } - - function packNodes(ownerID, nodes, count, excluding) { - var bitmap = 0; - var packedII = 0; - var packedNodes = new Array(count); - for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) { - var node = nodes[ii]; - if (node !== undefined && ii !== excluding) { - bitmap |= bit; - packedNodes[packedII++] = node; - } - } - return new BitmapIndexedNode(ownerID, bitmap, packedNodes); - } - - function expandNodes(ownerID, nodes, bitmap, including, node) { - var count = 0; - var expandedNodes = new Array(SIZE); - for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { - expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; - } - expandedNodes[including] = node; - return new HashArrayMapNode(ownerID, count + 1, expandedNodes); - } - - function popCount(x) { - x -= (x >> 1) & 0x55555555; - x = (x & 0x33333333) + ((x >> 2) & 0x33333333); - x = (x + (x >> 4)) & 0x0f0f0f0f; - x += x >> 8; - x += x >> 16; - return x & 0x7f; - } - - function setAt(array, idx, val, canEdit) { - var newArray = canEdit ? array : arrCopy(array); - newArray[idx] = val; - return newArray; - } - - function spliceIn(array, idx, val, canEdit) { - var newLen = array.length + 1; - if (canEdit && idx + 1 === newLen) { - array[idx] = val; - return array; - } - var newArray = new Array(newLen); - var after = 0; - for (var ii = 0; ii < newLen; ii++) { - if (ii === idx) { - newArray[ii] = val; - after = -1; - } else { - newArray[ii] = array[ii + after]; - } - } - return newArray; - } - - function spliceOut(array, idx, canEdit) { - var newLen = array.length - 1; - if (canEdit && idx === newLen) { - array.pop(); - return array; - } - var newArray = new Array(newLen); - var after = 0; - for (var ii = 0; ii < newLen; ii++) { - if (ii === idx) { - after = 1; - } - newArray[ii] = array[ii + after]; - } - return newArray; - } - - var MAX_ARRAY_MAP_SIZE = SIZE / 4; - var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; - var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; - - var IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@'; - - function isList(maybeList) { - return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]); - } - - var List = /*@__PURE__*/(function (IndexedCollection) { - function List(value) { - var empty = emptyList(); - if (value === undefined || value === null) { - // eslint-disable-next-line no-constructor-return - return empty; - } - if (isList(value)) { - // eslint-disable-next-line no-constructor-return - return value; - } - var iter = IndexedCollection(value); - var size = iter.size; - if (size === 0) { - // eslint-disable-next-line no-constructor-return - return empty; - } - assertNotInfinite(size); - if (size > 0 && size < SIZE) { - // eslint-disable-next-line no-constructor-return - return makeList(0, size, SHIFT, null, new VNode(iter.toArray())); - } - // eslint-disable-next-line no-constructor-return - return empty.withMutations(function (list) { - list.setSize(size); - iter.forEach(function (v, i) { return list.set(i, v); }); - }); - } - - if ( IndexedCollection ) List.__proto__ = IndexedCollection; - List.prototype = Object.create( IndexedCollection && IndexedCollection.prototype ); - List.prototype.constructor = List; - - List.of = function of (/*...values*/) { - return this(arguments); - }; - - List.prototype.toString = function toString () { - return this.__toString('List [', ']'); - }; - - // @pragma Access - - List.prototype.get = function get (index, notSetValue) { - index = wrapIndex(this, index); - if (index >= 0 && index < this.size) { - index += this._origin; - var node = listNodeFor(this, index); - return node && node.array[index & MASK]; - } - return notSetValue; - }; - - // @pragma Modification - - List.prototype.set = function set (index, value) { - return updateList(this, index, value); - }; - - List.prototype.remove = function remove (index) { - return !this.has(index) - ? this - : index === 0 - ? this.shift() - : index === this.size - 1 - ? this.pop() - : this.splice(index, 1); - }; - - List.prototype.insert = function insert (index, value) { - return this.splice(index, 0, value); - }; - - List.prototype.clear = function clear () { - if (this.size === 0) { - return this; - } - if (this.__ownerID) { - this.size = this._origin = this._capacity = 0; - this._level = SHIFT; - this._root = this._tail = this.__hash = undefined; - this.__altered = true; - return this; - } - return emptyList(); - }; - - List.prototype.push = function push (/*...values*/) { - var values = arguments; - var oldSize = this.size; - return this.withMutations(function (list) { - setListBounds(list, 0, oldSize + values.length); - for (var ii = 0; ii < values.length; ii++) { - list.set(oldSize + ii, values[ii]); - } - }); - }; - - List.prototype.pop = function pop () { - return setListBounds(this, 0, -1); - }; - - List.prototype.unshift = function unshift (/*...values*/) { - var values = arguments; - return this.withMutations(function (list) { - setListBounds(list, -values.length); - for (var ii = 0; ii < values.length; ii++) { - list.set(ii, values[ii]); - } - }); - }; - - List.prototype.shift = function shift () { - return setListBounds(this, 1); - }; - - // @pragma Composition - - List.prototype.concat = function concat (/*...collections*/) { - var arguments$1 = arguments; - - var seqs = []; - for (var i = 0; i < arguments.length; i++) { - var argument = arguments$1[i]; - var seq = IndexedCollection( - typeof argument !== 'string' && hasIterator(argument) - ? argument - : [argument] - ); - if (seq.size !== 0) { - seqs.push(seq); - } - } - if (seqs.length === 0) { - return this; - } - if (this.size === 0 && !this.__ownerID && seqs.length === 1) { - return this.constructor(seqs[0]); - } - return this.withMutations(function (list) { - seqs.forEach(function (seq) { return seq.forEach(function (value) { return list.push(value); }); }); - }); - }; - - List.prototype.setSize = function setSize (size) { - return setListBounds(this, 0, size); - }; - - List.prototype.map = function map (mapper, context) { - var this$1$1 = this; - - return this.withMutations(function (list) { - for (var i = 0; i < this$1$1.size; i++) { - list.set(i, mapper.call(context, list.get(i), i, this$1$1)); - } - }); - }; - - // @pragma Iteration - - List.prototype.slice = function slice (begin, end) { - var size = this.size; - if (wholeSlice(begin, end, size)) { - return this; - } - return setListBounds( - this, - resolveBegin(begin, size), - resolveEnd(end, size) - ); - }; - - List.prototype.__iterator = function __iterator (type, reverse) { - var index = reverse ? this.size : 0; - var values = iterateList(this, reverse); - return new Iterator(function () { - var value = values(); - return value === DONE - ? iteratorDone() - : iteratorValue(type, reverse ? --index : index++, value); - }); - }; - - List.prototype.__iterate = function __iterate (fn, reverse) { - var index = reverse ? this.size : 0; - var values = iterateList(this, reverse); - var value; - while ((value = values()) !== DONE) { - if (fn(value, reverse ? --index : index++, this) === false) { - break; - } - } - return index; - }; - - List.prototype.__ensureOwner = function __ensureOwner (ownerID) { - if (ownerID === this.__ownerID) { - return this; - } - if (!ownerID) { - if (this.size === 0) { - return emptyList(); - } - this.__ownerID = ownerID; - this.__altered = false; - return this; - } - return makeList( - this._origin, - this._capacity, - this._level, - this._root, - this._tail, - ownerID, - this.__hash - ); - }; - - return List; - }(IndexedCollection)); - - List.isList = isList; - - var ListPrototype = List.prototype; - ListPrototype[IS_LIST_SYMBOL] = true; - ListPrototype[DELETE] = ListPrototype.remove; - ListPrototype.merge = ListPrototype.concat; - ListPrototype.setIn = setIn; - ListPrototype.deleteIn = ListPrototype.removeIn = deleteIn; - ListPrototype.update = update; - ListPrototype.updateIn = updateIn; - ListPrototype.mergeIn = mergeIn; - ListPrototype.mergeDeepIn = mergeDeepIn; - ListPrototype.withMutations = withMutations; - ListPrototype.wasAltered = wasAltered; - ListPrototype.asImmutable = asImmutable; - ListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable; - ListPrototype['@@transducer/step'] = function (result, arr) { - return result.push(arr); - }; - ListPrototype['@@transducer/result'] = function (obj) { - return obj.asImmutable(); - }; - - var VNode = function VNode(array, ownerID) { - this.array = array; - this.ownerID = ownerID; - }; - - // TODO: seems like these methods are very similar - - VNode.prototype.removeBefore = function removeBefore (ownerID, level, index) { - if ( - (index & ((1 << (level + SHIFT)) - 1)) === 0 || - this.array.length === 0 - ) { - return this; - } - var originIndex = (index >>> level) & MASK; - if (originIndex >= this.array.length) { - return new VNode([], ownerID); - } - var removingFirst = originIndex === 0; - var newChild; - if (level > 0) { - var oldChild = this.array[originIndex]; - newChild = - oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index); - if (newChild === oldChild && removingFirst) { - return this; - } - } - if (removingFirst && !newChild) { - return this; - } - var editable = editableVNode(this, ownerID); - if (!removingFirst) { - for (var ii = 0; ii < originIndex; ii++) { - editable.array[ii] = undefined; - } - } - if (newChild) { - editable.array[originIndex] = newChild; - } - return editable; - }; - - VNode.prototype.removeAfter = function removeAfter (ownerID, level, index) { - if ( - index === (level ? 1 << (level + SHIFT) : SIZE) || - this.array.length === 0 - ) { - return this; - } - var sizeIndex = ((index - 1) >>> level) & MASK; - if (sizeIndex >= this.array.length) { - return this; - } - - var newChild; - if (level > 0) { - var oldChild = this.array[sizeIndex]; - newChild = - oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); - if (newChild === oldChild && sizeIndex === this.array.length - 1) { - return this; - } - } - - var editable = editableVNode(this, ownerID); - editable.array.splice(sizeIndex + 1); - if (newChild) { - editable.array[sizeIndex] = newChild; - } - return editable; - }; - - var DONE = {}; - - function iterateList(list, reverse) { - var left = list._origin; - var right = list._capacity; - var tailPos = getTailOffset(right); - var tail = list._tail; - - return iterateNodeOrLeaf(list._root, list._level, 0); - - function iterateNodeOrLeaf(node, level, offset) { - return level === 0 - ? iterateLeaf(node, offset) - : iterateNode(node, level, offset); - } - - function iterateLeaf(node, offset) { - var array = offset === tailPos ? tail && tail.array : node && node.array; - var from = offset > left ? 0 : left - offset; - var to = right - offset; - if (to > SIZE) { - to = SIZE; - } - return function () { - if (from === to) { - return DONE; - } - var idx = reverse ? --to : from++; - return array && array[idx]; - }; - } - - function iterateNode(node, level, offset) { - var values; - var array = node && node.array; - var from = offset > left ? 0 : (left - offset) >> level; - var to = ((right - offset) >> level) + 1; - if (to > SIZE) { - to = SIZE; - } - return function () { - while (true) { - if (values) { - var value = values(); - if (value !== DONE) { - return value; - } - values = null; - } - if (from === to) { - return DONE; - } - var idx = reverse ? --to : from++; - values = iterateNodeOrLeaf( - array && array[idx], - level - SHIFT, - offset + (idx << level) - ); - } - }; - } - } - - function makeList(origin, capacity, level, root, tail, ownerID, hash) { - var list = Object.create(ListPrototype); - list.size = capacity - origin; - list._origin = origin; - list._capacity = capacity; - list._level = level; - list._root = root; - list._tail = tail; - list.__ownerID = ownerID; - list.__hash = hash; - list.__altered = false; - return list; - } - - function emptyList() { - return makeList(0, 0, SHIFT); - } - - function updateList(list, index, value) { - index = wrapIndex(list, index); - - if (index !== index) { - return list; - } - - if (index >= list.size || index < 0) { - return list.withMutations(function (list) { - index < 0 - ? setListBounds(list, index).set(0, value) - : setListBounds(list, 0, index + 1).set(index, value); - }); - } - - index += list._origin; - - var newTail = list._tail; - var newRoot = list._root; - var didAlter = MakeRef(); - if (index >= getTailOffset(list._capacity)) { - newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter); - } else { - newRoot = updateVNode( - newRoot, - list.__ownerID, - list._level, - index, - value, - didAlter - ); - } - - if (!didAlter.value) { - return list; - } - - if (list.__ownerID) { - list._root = newRoot; - list._tail = newTail; - list.__hash = undefined; - list.__altered = true; - return list; - } - return makeList(list._origin, list._capacity, list._level, newRoot, newTail); - } - - function updateVNode(node, ownerID, level, index, value, didAlter) { - var idx = (index >>> level) & MASK; - var nodeHas = node && idx < node.array.length; - if (!nodeHas && value === undefined) { - return node; - } - - var newNode; - - if (level > 0) { - var lowerNode = node && node.array[idx]; - var newLowerNode = updateVNode( - lowerNode, - ownerID, - level - SHIFT, - index, - value, - didAlter - ); - if (newLowerNode === lowerNode) { - return node; - } - newNode = editableVNode(node, ownerID); - newNode.array[idx] = newLowerNode; - return newNode; - } - - if (nodeHas && node.array[idx] === value) { - return node; - } - - if (didAlter) { - SetRef(didAlter); - } - - newNode = editableVNode(node, ownerID); - if (value === undefined && idx === newNode.array.length - 1) { - newNode.array.pop(); - } else { - newNode.array[idx] = value; - } - return newNode; - } - - function editableVNode(node, ownerID) { - if (ownerID && node && ownerID === node.ownerID) { - return node; - } - return new VNode(node ? node.array.slice() : [], ownerID); - } - - function listNodeFor(list, rawIndex) { - if (rawIndex >= getTailOffset(list._capacity)) { - return list._tail; - } - if (rawIndex < 1 << (list._level + SHIFT)) { - var node = list._root; - var level = list._level; - while (node && level > 0) { - node = node.array[(rawIndex >>> level) & MASK]; - level -= SHIFT; - } - return node; - } - } - - function setListBounds(list, begin, end) { - // Sanitize begin & end using this shorthand for ToInt32(argument) - // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 - if (begin !== undefined) { - begin |= 0; - } - if (end !== undefined) { - end |= 0; - } - var owner = list.__ownerID || new OwnerID(); - var oldOrigin = list._origin; - var oldCapacity = list._capacity; - var newOrigin = oldOrigin + begin; - var newCapacity = - end === undefined - ? oldCapacity - : end < 0 - ? oldCapacity + end - : oldOrigin + end; - if (newOrigin === oldOrigin && newCapacity === oldCapacity) { - return list; - } - - // If it's going to end after it starts, it's empty. - if (newOrigin >= newCapacity) { - return list.clear(); - } - - var newLevel = list._level; - var newRoot = list._root; - - // New origin might need creating a higher root. - var offsetShift = 0; - while (newOrigin + offsetShift < 0) { - newRoot = new VNode( - newRoot && newRoot.array.length ? [undefined, newRoot] : [], - owner - ); - newLevel += SHIFT; - offsetShift += 1 << newLevel; - } - if (offsetShift) { - newOrigin += offsetShift; - oldOrigin += offsetShift; - newCapacity += offsetShift; - oldCapacity += offsetShift; - } - - var oldTailOffset = getTailOffset(oldCapacity); - var newTailOffset = getTailOffset(newCapacity); - - // New size might need creating a higher root. - while (newTailOffset >= 1 << (newLevel + SHIFT)) { - newRoot = new VNode( - newRoot && newRoot.array.length ? [newRoot] : [], - owner - ); - newLevel += SHIFT; - } - - // Locate or create the new tail. - var oldTail = list._tail; - var newTail = - newTailOffset < oldTailOffset - ? listNodeFor(list, newCapacity - 1) - : newTailOffset > oldTailOffset - ? new VNode([], owner) - : oldTail; - - // Merge Tail into tree. - if ( - oldTail && - newTailOffset > oldTailOffset && - newOrigin < oldCapacity && - oldTail.array.length - ) { - newRoot = editableVNode(newRoot, owner); - var node = newRoot; - for (var level = newLevel; level > SHIFT; level -= SHIFT) { - var idx = (oldTailOffset >>> level) & MASK; - node = node.array[idx] = editableVNode(node.array[idx], owner); - } - node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail; - } - - // If the size has been reduced, there's a chance the tail needs to be trimmed. - if (newCapacity < oldCapacity) { - newTail = newTail && newTail.removeAfter(owner, 0, newCapacity); - } - - // If the new origin is within the tail, then we do not need a root. - if (newOrigin >= newTailOffset) { - newOrigin -= newTailOffset; - newCapacity -= newTailOffset; - newLevel = SHIFT; - newRoot = null; - newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); - - // Otherwise, if the root has been trimmed, garbage collect. - } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { - offsetShift = 0; - - // Identify the new top root node of the subtree of the old root. - while (newRoot) { - var beginIndex = (newOrigin >>> newLevel) & MASK; - if ((beginIndex !== newTailOffset >>> newLevel) & MASK) { - break; - } - if (beginIndex) { - offsetShift += (1 << newLevel) * beginIndex; - } - newLevel -= SHIFT; - newRoot = newRoot.array[beginIndex]; - } - - // Trim the new sides of the new root. - if (newRoot && newOrigin > oldOrigin) { - newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift); - } - if (newRoot && newTailOffset < oldTailOffset) { - newRoot = newRoot.removeAfter( - owner, - newLevel, - newTailOffset - offsetShift - ); - } - if (offsetShift) { - newOrigin -= offsetShift; - newCapacity -= offsetShift; - } - } - - if (list.__ownerID) { - list.size = newCapacity - newOrigin; - list._origin = newOrigin; - list._capacity = newCapacity; - list._level = newLevel; - list._root = newRoot; - list._tail = newTail; - list.__hash = undefined; - list.__altered = true; - return list; - } - return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); - } - - function getTailOffset(size) { - return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT; - } - - var OrderedMap = /*@__PURE__*/(function (Map) { - function OrderedMap(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptyOrderedMap() - : isOrderedMap(value) - ? value - : emptyOrderedMap().withMutations(function (map) { - var iter = KeyedCollection(value); - assertNotInfinite(iter.size); - iter.forEach(function (v, k) { return map.set(k, v); }); - }); - } - - if ( Map ) OrderedMap.__proto__ = Map; - OrderedMap.prototype = Object.create( Map && Map.prototype ); - OrderedMap.prototype.constructor = OrderedMap; - - OrderedMap.of = function of (/*...values*/) { - return this(arguments); - }; - - OrderedMap.prototype.toString = function toString () { - return this.__toString('OrderedMap {', '}'); - }; - - // @pragma Access - - OrderedMap.prototype.get = function get (k, notSetValue) { - var index = this._map.get(k); - return index !== undefined ? this._list.get(index)[1] : notSetValue; - }; - - // @pragma Modification - - OrderedMap.prototype.clear = function clear () { - if (this.size === 0) { - return this; - } - if (this.__ownerID) { - this.size = 0; - this._map.clear(); - this._list.clear(); - this.__altered = true; - return this; - } - return emptyOrderedMap(); - }; - - OrderedMap.prototype.set = function set (k, v) { - return updateOrderedMap(this, k, v); - }; - - OrderedMap.prototype.remove = function remove (k) { - return updateOrderedMap(this, k, NOT_SET); - }; - - OrderedMap.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - return this._list.__iterate( - function (entry) { return entry && fn(entry[1], entry[0], this$1$1); }, - reverse - ); - }; - - OrderedMap.prototype.__iterator = function __iterator (type, reverse) { - return this._list.fromEntrySeq().__iterator(type, reverse); - }; - - OrderedMap.prototype.__ensureOwner = function __ensureOwner (ownerID) { - if (ownerID === this.__ownerID) { - return this; - } - var newMap = this._map.__ensureOwner(ownerID); - var newList = this._list.__ensureOwner(ownerID); - if (!ownerID) { - if (this.size === 0) { - return emptyOrderedMap(); - } - this.__ownerID = ownerID; - this.__altered = false; - this._map = newMap; - this._list = newList; - return this; - } - return makeOrderedMap(newMap, newList, ownerID, this.__hash); - }; - - return OrderedMap; - }(Map)); - - OrderedMap.isOrderedMap = isOrderedMap; - - OrderedMap.prototype[IS_ORDERED_SYMBOL] = true; - OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; - - function makeOrderedMap(map, list, ownerID, hash) { - var omap = Object.create(OrderedMap.prototype); - omap.size = map ? map.size : 0; - omap._map = map; - omap._list = list; - omap.__ownerID = ownerID; - omap.__hash = hash; - omap.__altered = false; - return omap; - } - - var EMPTY_ORDERED_MAP; - function emptyOrderedMap() { - return ( - EMPTY_ORDERED_MAP || - (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())) - ); - } - - function updateOrderedMap(omap, k, v) { - var map = omap._map; - var list = omap._list; - var i = map.get(k); - var has = i !== undefined; - var newMap; - var newList; - if (v === NOT_SET) { - // removed - if (!has) { - return omap; - } - if (list.size >= SIZE && list.size >= map.size * 2) { - newList = list.filter(function (entry, idx) { return entry !== undefined && i !== idx; }); - newMap = newList - .toKeyedSeq() - .map(function (entry) { return entry[0]; }) - .flip() - .toMap(); - if (omap.__ownerID) { - newMap.__ownerID = newList.__ownerID = omap.__ownerID; - } - } else { - newMap = map.remove(k); - newList = i === list.size - 1 ? list.pop() : list.set(i, undefined); - } - } else if (has) { - if (v === list.get(i)[1]) { - return omap; - } - newMap = map; - newList = list.set(i, [k, v]); - } else { - newMap = map.set(k, list.size); - newList = list.set(list.size, [k, v]); - } - if (omap.__ownerID) { - omap.size = newMap.size; - omap._map = newMap; - omap._list = newList; - omap.__hash = undefined; - omap.__altered = true; - return omap; - } - return makeOrderedMap(newMap, newList); - } - - var IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@'; - - function isStack(maybeStack) { - return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]); - } - - var Stack = /*@__PURE__*/(function (IndexedCollection) { - function Stack(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptyStack() - : isStack(value) - ? value - : emptyStack().pushAll(value); - } - - if ( IndexedCollection ) Stack.__proto__ = IndexedCollection; - Stack.prototype = Object.create( IndexedCollection && IndexedCollection.prototype ); - Stack.prototype.constructor = Stack; - - Stack.of = function of (/*...values*/) { - return this(arguments); - }; - - Stack.prototype.toString = function toString () { - return this.__toString('Stack [', ']'); - }; - - // @pragma Access - - Stack.prototype.get = function get (index, notSetValue) { - var head = this._head; - index = wrapIndex(this, index); - while (head && index--) { - head = head.next; - } - return head ? head.value : notSetValue; - }; - - Stack.prototype.peek = function peek () { - return this._head && this._head.value; - }; - - // @pragma Modification - - Stack.prototype.push = function push (/*...values*/) { - var arguments$1 = arguments; - - if (arguments.length === 0) { - return this; - } - var newSize = this.size + arguments.length; - var head = this._head; - for (var ii = arguments.length - 1; ii >= 0; ii--) { - head = { - value: arguments$1[ii], - next: head, - }; - } - if (this.__ownerID) { - this.size = newSize; - this._head = head; - this.__hash = undefined; - this.__altered = true; - return this; - } - return makeStack(newSize, head); - }; - - Stack.prototype.pushAll = function pushAll (iter) { - iter = IndexedCollection(iter); - if (iter.size === 0) { - return this; - } - if (this.size === 0 && isStack(iter)) { - return iter; - } - assertNotInfinite(iter.size); - var newSize = this.size; - var head = this._head; - iter.__iterate(function (value) { - newSize++; - head = { - value: value, - next: head, - }; - }, /* reverse */ true); - if (this.__ownerID) { - this.size = newSize; - this._head = head; - this.__hash = undefined; - this.__altered = true; - return this; - } - return makeStack(newSize, head); - }; - - Stack.prototype.pop = function pop () { - return this.slice(1); - }; - - Stack.prototype.clear = function clear () { - if (this.size === 0) { - return this; - } - if (this.__ownerID) { - this.size = 0; - this._head = undefined; - this.__hash = undefined; - this.__altered = true; - return this; - } - return emptyStack(); - }; - - Stack.prototype.slice = function slice (begin, end) { - if (wholeSlice(begin, end, this.size)) { - return this; - } - var resolvedBegin = resolveBegin(begin, this.size); - var resolvedEnd = resolveEnd(end, this.size); - if (resolvedEnd !== this.size) { - // super.slice(begin, end); - return IndexedCollection.prototype.slice.call(this, begin, end); - } - var newSize = this.size - resolvedBegin; - var head = this._head; - while (resolvedBegin--) { - head = head.next; - } - if (this.__ownerID) { - this.size = newSize; - this._head = head; - this.__hash = undefined; - this.__altered = true; - return this; - } - return makeStack(newSize, head); - }; - - // @pragma Mutability - - Stack.prototype.__ensureOwner = function __ensureOwner (ownerID) { - if (ownerID === this.__ownerID) { - return this; - } - if (!ownerID) { - if (this.size === 0) { - return emptyStack(); - } - this.__ownerID = ownerID; - this.__altered = false; - return this; - } - return makeStack(this.size, this._head, ownerID, this.__hash); - }; - - // @pragma Iteration - - Stack.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - if (reverse) { - return new ArraySeq(this.toArray()).__iterate( - function (v, k) { return fn(v, k, this$1$1); }, - reverse - ); - } - var iterations = 0; - var node = this._head; - while (node) { - if (fn(node.value, iterations++, this) === false) { - break; - } - node = node.next; - } - return iterations; - }; - - Stack.prototype.__iterator = function __iterator (type, reverse) { - if (reverse) { - return new ArraySeq(this.toArray()).__iterator(type, reverse); - } - var iterations = 0; - var node = this._head; - return new Iterator(function () { - if (node) { - var value = node.value; - node = node.next; - return iteratorValue(type, iterations++, value); - } - return iteratorDone(); - }); - }; - - return Stack; - }(IndexedCollection)); - - Stack.isStack = isStack; - - var StackPrototype = Stack.prototype; - StackPrototype[IS_STACK_SYMBOL] = true; - StackPrototype.shift = StackPrototype.pop; - StackPrototype.unshift = StackPrototype.push; - StackPrototype.unshiftAll = StackPrototype.pushAll; - StackPrototype.withMutations = withMutations; - StackPrototype.wasAltered = wasAltered; - StackPrototype.asImmutable = asImmutable; - StackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable; - StackPrototype['@@transducer/step'] = function (result, arr) { - return result.unshift(arr); - }; - StackPrototype['@@transducer/result'] = function (obj) { - return obj.asImmutable(); - }; - - function makeStack(size, head, ownerID, hash) { - var map = Object.create(StackPrototype); - map.size = size; - map._head = head; - map.__ownerID = ownerID; - map.__hash = hash; - map.__altered = false; - return map; - } - - var EMPTY_STACK; - function emptyStack() { - return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); - } - - var IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@'; - - function isSet(maybeSet) { - return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]); - } - - function isOrderedSet(maybeOrderedSet) { - return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); - } - - function deepEqual(a, b) { - if (a === b) { - return true; - } - - if ( - !isCollection(b) || - (a.size !== undefined && b.size !== undefined && a.size !== b.size) || - (a.__hash !== undefined && - b.__hash !== undefined && - a.__hash !== b.__hash) || - isKeyed(a) !== isKeyed(b) || - isIndexed(a) !== isIndexed(b) || - isOrdered(a) !== isOrdered(b) - ) { - return false; - } - - if (a.size === 0 && b.size === 0) { - return true; - } - - var notAssociative = !isAssociative(a); - - if (isOrdered(a)) { - var entries = a.entries(); - return ( - b.every(function (v, k) { - var entry = entries.next().value; - return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); - }) && entries.next().done - ); - } - - var flipped = false; - - if (a.size === undefined) { - if (b.size === undefined) { - if (typeof a.cacheResult === 'function') { - a.cacheResult(); - } - } else { - flipped = true; - var _ = a; - a = b; - b = _; - } - } - - var allEqual = true; - var bSize = b.__iterate(function (v, k) { - if ( - notAssociative - ? !a.has(v) - : flipped - ? !is(v, a.get(k, NOT_SET)) - : !is(a.get(k, NOT_SET), v) - ) { - allEqual = false; - return false; - } - }); - - return allEqual && a.size === bSize; - } - - /** - * Contributes additional methods to a constructor - */ - function mixin(ctor, methods) { - var keyCopier = function (key) { - ctor.prototype[key] = methods[key]; - }; - Object.keys(methods).forEach(keyCopier); - Object.getOwnPropertySymbols && - Object.getOwnPropertySymbols(methods).forEach(keyCopier); - return ctor; - } - - function toJS(value) { - if (!value || typeof value !== 'object') { - return value; - } - if (!isCollection(value)) { - if (!isDataStructure(value)) { - return value; - } - value = Seq(value); - } - if (isKeyed(value)) { - var result$1 = {}; - value.__iterate(function (v, k) { - result$1[k] = toJS(v); - }); - return result$1; - } - var result = []; - value.__iterate(function (v) { - result.push(toJS(v)); - }); - return result; - } - - var Set = /*@__PURE__*/(function (SetCollection) { - function Set(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptySet() - : isSet(value) && !isOrdered(value) - ? value - : emptySet().withMutations(function (set) { - var iter = SetCollection(value); - assertNotInfinite(iter.size); - iter.forEach(function (v) { return set.add(v); }); - }); - } - - if ( SetCollection ) Set.__proto__ = SetCollection; - Set.prototype = Object.create( SetCollection && SetCollection.prototype ); - Set.prototype.constructor = Set; - - Set.of = function of (/*...values*/) { - return this(arguments); - }; - - Set.fromKeys = function fromKeys (value) { - return this(KeyedCollection(value).keySeq()); - }; - - Set.intersect = function intersect (sets) { - sets = Collection(sets).toArray(); - return sets.length - ? SetPrototype.intersect.apply(Set(sets.pop()), sets) - : emptySet(); - }; - - Set.union = function union (sets) { - sets = Collection(sets).toArray(); - return sets.length - ? SetPrototype.union.apply(Set(sets.pop()), sets) - : emptySet(); - }; - - Set.prototype.toString = function toString () { - return this.__toString('Set {', '}'); - }; - - // @pragma Access - - Set.prototype.has = function has (value) { - return this._map.has(value); - }; - - // @pragma Modification - - Set.prototype.add = function add (value) { - return updateSet(this, this._map.set(value, value)); - }; - - Set.prototype.remove = function remove (value) { - return updateSet(this, this._map.remove(value)); - }; - - Set.prototype.clear = function clear () { - return updateSet(this, this._map.clear()); - }; - - // @pragma Composition - - Set.prototype.map = function map (mapper, context) { - var this$1$1 = this; - - // keep track if the set is altered by the map function - var didChanges = false; - - var newMap = updateSet( - this, - this._map.mapEntries(function (ref) { - var v = ref[1]; - - var mapped = mapper.call(context, v, v, this$1$1); - - if (mapped !== v) { - didChanges = true; - } - - return [mapped, mapped]; - }, context) - ); - - return didChanges ? newMap : this; - }; - - Set.prototype.union = function union () { - var iters = [], len = arguments.length; - while ( len-- ) iters[ len ] = arguments[ len ]; - - iters = iters.filter(function (x) { return x.size !== 0; }); - if (iters.length === 0) { - return this; - } - if (this.size === 0 && !this.__ownerID && iters.length === 1) { - return this.constructor(iters[0]); - } - return this.withMutations(function (set) { - for (var ii = 0; ii < iters.length; ii++) { - if (typeof iters[ii] === 'string') { - set.add(iters[ii]); - } else { - SetCollection(iters[ii]).forEach(function (value) { return set.add(value); }); - } - } - }); - }; - - Set.prototype.intersect = function intersect () { - var iters = [], len = arguments.length; - while ( len-- ) iters[ len ] = arguments[ len ]; - - if (iters.length === 0) { - return this; - } - iters = iters.map(function (iter) { return SetCollection(iter); }); - var toRemove = []; - this.forEach(function (value) { - if (!iters.every(function (iter) { return iter.includes(value); })) { - toRemove.push(value); - } - }); - return this.withMutations(function (set) { - toRemove.forEach(function (value) { - set.remove(value); - }); - }); - }; - - Set.prototype.subtract = function subtract () { - var iters = [], len = arguments.length; - while ( len-- ) iters[ len ] = arguments[ len ]; - - if (iters.length === 0) { - return this; - } - iters = iters.map(function (iter) { return SetCollection(iter); }); - var toRemove = []; - this.forEach(function (value) { - if (iters.some(function (iter) { return iter.includes(value); })) { - toRemove.push(value); - } - }); - return this.withMutations(function (set) { - toRemove.forEach(function (value) { - set.remove(value); - }); - }); - }; - - Set.prototype.sort = function sort (comparator) { - // Late binding - return OrderedSet(sortFactory(this, comparator)); - }; - - Set.prototype.sortBy = function sortBy (mapper, comparator) { - // Late binding - return OrderedSet(sortFactory(this, comparator, mapper)); - }; - - Set.prototype.wasAltered = function wasAltered () { - return this._map.wasAltered(); - }; - - Set.prototype.__iterate = function __iterate (fn, reverse) { - var this$1$1 = this; - - return this._map.__iterate(function (k) { return fn(k, k, this$1$1); }, reverse); - }; - - Set.prototype.__iterator = function __iterator (type, reverse) { - return this._map.__iterator(type, reverse); - }; - - Set.prototype.__ensureOwner = function __ensureOwner (ownerID) { - if (ownerID === this.__ownerID) { - return this; - } - var newMap = this._map.__ensureOwner(ownerID); - if (!ownerID) { - if (this.size === 0) { - return this.__empty(); - } - this.__ownerID = ownerID; - this._map = newMap; - return this; - } - return this.__make(newMap, ownerID); - }; - - return Set; - }(SetCollection)); - - Set.isSet = isSet; - - var SetPrototype = Set.prototype; - SetPrototype[IS_SET_SYMBOL] = true; - SetPrototype[DELETE] = SetPrototype.remove; - SetPrototype.merge = SetPrototype.concat = SetPrototype.union; - SetPrototype.withMutations = withMutations; - SetPrototype.asImmutable = asImmutable; - SetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable; - SetPrototype['@@transducer/step'] = function (result, arr) { - return result.add(arr); - }; - SetPrototype['@@transducer/result'] = function (obj) { - return obj.asImmutable(); - }; - - SetPrototype.__empty = emptySet; - SetPrototype.__make = makeSet; - - function updateSet(set, newMap) { - if (set.__ownerID) { - set.size = newMap.size; - set._map = newMap; - return set; - } - return newMap === set._map - ? set - : newMap.size === 0 - ? set.__empty() - : set.__make(newMap); - } - - function makeSet(map, ownerID) { - var set = Object.create(SetPrototype); - set.size = map ? map.size : 0; - set._map = map; - set.__ownerID = ownerID; - return set; - } - - var EMPTY_SET; - function emptySet() { - return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); - } - - /** - * Returns a lazy seq of nums from start (inclusive) to end - * (exclusive), by step, where start defaults to 0, step to 1, and end to - * infinity. When start is equal to end, returns empty list. - */ - var Range = /*@__PURE__*/(function (IndexedSeq) { - function Range(start, end, step) { - if ( step === void 0 ) step = 1; - - if (!(this instanceof Range)) { - // eslint-disable-next-line no-constructor-return - return new Range(start, end, step); - } - invariant(step !== 0, 'Cannot step a Range by 0'); - invariant( - start !== undefined, - 'You must define a start value when using Range' - ); - invariant( - end !== undefined, - 'You must define an end value when using Range' - ); - - step = Math.abs(step); - if (end < start) { - step = -step; - } - this._start = start; - this._end = end; - this._step = step; - this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1); - if (this.size === 0) { - if (EMPTY_RANGE) { - // eslint-disable-next-line no-constructor-return - return EMPTY_RANGE; - } - // eslint-disable-next-line @typescript-eslint/no-this-alias - EMPTY_RANGE = this; - } - } - - if ( IndexedSeq ) Range.__proto__ = IndexedSeq; - Range.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); - Range.prototype.constructor = Range; - - Range.prototype.toString = function toString () { - if (this.size === 0) { - return 'Range []'; - } - return ( - 'Range [ ' + - this._start + - '...' + - this._end + - (this._step !== 1 ? ' by ' + this._step : '') + - ' ]' - ); - }; - - Range.prototype.get = function get (index, notSetValue) { - return this.has(index) - ? this._start + wrapIndex(this, index) * this._step - : notSetValue; - }; - - Range.prototype.includes = function includes (searchValue) { - var possibleIndex = (searchValue - this._start) / this._step; - return ( - possibleIndex >= 0 && - possibleIndex < this.size && - possibleIndex === Math.floor(possibleIndex) - ); - }; - - Range.prototype.slice = function slice (begin, end) { - if (wholeSlice(begin, end, this.size)) { - return this; - } - begin = resolveBegin(begin, this.size); - end = resolveEnd(end, this.size); - if (end <= begin) { - return new Range(0, 0); - } - return new Range( - this.get(begin, this._end), - this.get(end, this._end), - this._step - ); - }; - - Range.prototype.indexOf = function indexOf (searchValue) { - var offsetValue = searchValue - this._start; - if (offsetValue % this._step === 0) { - var index = offsetValue / this._step; - if (index >= 0 && index < this.size) { - return index; - } - } - return -1; - }; - - Range.prototype.lastIndexOf = function lastIndexOf (searchValue) { - return this.indexOf(searchValue); - }; - - Range.prototype.__iterate = function __iterate (fn, reverse) { - var size = this.size; - var step = this._step; - var value = reverse ? this._start + (size - 1) * step : this._start; - var i = 0; - while (i !== size) { - if (fn(value, reverse ? size - ++i : i++, this) === false) { - break; - } - value += reverse ? -step : step; - } - return i; - }; - - Range.prototype.__iterator = function __iterator (type, reverse) { - var size = this.size; - var step = this._step; - var value = reverse ? this._start + (size - 1) * step : this._start; - var i = 0; - return new Iterator(function () { - if (i === size) { - return iteratorDone(); - } - var v = value; - value += reverse ? -step : step; - return iteratorValue(type, reverse ? size - ++i : i++, v); - }); - }; - - Range.prototype.equals = function equals (other) { - return other instanceof Range - ? this._start === other._start && - this._end === other._end && - this._step === other._step - : deepEqual(this, other); - }; - - return Range; - }(IndexedSeq)); - - var EMPTY_RANGE; - - function getIn$1(collection, searchKeyPath, notSetValue) { - var keyPath = coerceKeyPath(searchKeyPath); - var i = 0; - while (i !== keyPath.length) { - collection = get(collection, keyPath[i++], NOT_SET); - if (collection === NOT_SET) { - return notSetValue; - } - } - return collection; - } - - function getIn(searchKeyPath, notSetValue) { - return getIn$1(this, searchKeyPath, notSetValue); - } - - function hasIn$1(collection, keyPath) { - return getIn$1(collection, keyPath, NOT_SET) !== NOT_SET; - } - - function hasIn(searchKeyPath) { - return hasIn$1(this, searchKeyPath); - } - - function toObject() { - assertNotInfinite(this.size); - var object = {}; - this.__iterate(function (v, k) { - object[k] = v; - }); - return object; - } - - Collection.Iterator = Iterator; - - mixin(Collection, { - // ### Conversion to other types - - toArray: function toArray() { - assertNotInfinite(this.size); - var array = new Array(this.size || 0); - var useTuples = isKeyed(this); - var i = 0; - this.__iterate(function (v, k) { - // Keyed collections produce an array of tuples. - array[i++] = useTuples ? [k, v] : v; - }); - return array; - }, - - toIndexedSeq: function toIndexedSeq() { - return new ToIndexedSequence(this); - }, - - toJS: function toJS$1() { - return toJS(this); - }, - - toKeyedSeq: function toKeyedSeq() { - return new ToKeyedSequence(this, true); - }, - - toMap: function toMap() { - // Use Late Binding here to solve the circular dependency. - return Map(this.toKeyedSeq()); - }, - - toObject: toObject, - - toOrderedMap: function toOrderedMap() { - // Use Late Binding here to solve the circular dependency. - return OrderedMap(this.toKeyedSeq()); - }, - - toOrderedSet: function toOrderedSet() { - // Use Late Binding here to solve the circular dependency. - return OrderedSet(isKeyed(this) ? this.valueSeq() : this); - }, - - toSet: function toSet() { - // Use Late Binding here to solve the circular dependency. - return Set(isKeyed(this) ? this.valueSeq() : this); - }, - - toSetSeq: function toSetSeq() { - return new ToSetSequence(this); - }, - - toSeq: function toSeq() { - return isIndexed(this) - ? this.toIndexedSeq() - : isKeyed(this) - ? this.toKeyedSeq() - : this.toSetSeq(); - }, - - toStack: function toStack() { - // Use Late Binding here to solve the circular dependency. - return Stack(isKeyed(this) ? this.valueSeq() : this); - }, - - toList: function toList() { - // Use Late Binding here to solve the circular dependency. - return List(isKeyed(this) ? this.valueSeq() : this); - }, - - // ### Common JavaScript methods and properties - - toString: function toString() { - return '[Collection]'; - }, - - __toString: function __toString(head, tail) { - if (this.size === 0) { - return head + tail; - } - return ( - head + - ' ' + - this.toSeq().map(this.__toStringMapper).join(', ') + - ' ' + - tail - ); - }, - - // ### ES6 Collection methods (ES6 Array and Map) - - concat: function concat() { - var values = [], len = arguments.length; - while ( len-- ) values[ len ] = arguments[ len ]; - - return reify(this, concatFactory(this, values)); - }, - - includes: function includes(searchValue) { - return this.some(function (value) { return is(value, searchValue); }); - }, - - entries: function entries() { - return this.__iterator(ITERATE_ENTRIES); - }, - - every: function every(predicate, context) { - assertNotInfinite(this.size); - var returnValue = true; - this.__iterate(function (v, k, c) { - if (!predicate.call(context, v, k, c)) { - returnValue = false; - return false; - } - }); - return returnValue; - }, - - filter: function filter(predicate, context) { - return reify(this, filterFactory(this, predicate, context, true)); - }, - - partition: function partition(predicate, context) { - return partitionFactory(this, predicate, context); - }, - - find: function find(predicate, context, notSetValue) { - var entry = this.findEntry(predicate, context); - return entry ? entry[1] : notSetValue; - }, - - forEach: function forEach(sideEffect, context) { - assertNotInfinite(this.size); - return this.__iterate(context ? sideEffect.bind(context) : sideEffect); - }, - - join: function join(separator) { - assertNotInfinite(this.size); - separator = separator !== undefined ? '' + separator : ','; - var joined = ''; - var isFirst = true; - this.__iterate(function (v) { - isFirst ? (isFirst = false) : (joined += separator); - joined += v !== null && v !== undefined ? v.toString() : ''; - }); - return joined; - }, - - keys: function keys() { - return this.__iterator(ITERATE_KEYS); - }, - - map: function map(mapper, context) { - return reify(this, mapFactory(this, mapper, context)); - }, - - reduce: function reduce$1(reducer, initialReduction, context) { - return reduce( - this, - reducer, - initialReduction, - context, - arguments.length < 2, - false - ); - }, - - reduceRight: function reduceRight(reducer, initialReduction, context) { - return reduce( - this, - reducer, - initialReduction, - context, - arguments.length < 2, - true - ); - }, - - reverse: function reverse() { - return reify(this, reverseFactory(this, true)); - }, - - slice: function slice(begin, end) { - return reify(this, sliceFactory(this, begin, end, true)); - }, - - some: function some(predicate, context) { - assertNotInfinite(this.size); - var returnValue = false; - this.__iterate(function (v, k, c) { - if (predicate.call(context, v, k, c)) { - returnValue = true; - return false; - } - }); - return returnValue; - }, - - sort: function sort(comparator) { - return reify(this, sortFactory(this, comparator)); - }, - - values: function values() { - return this.__iterator(ITERATE_VALUES); - }, - - // ### More sequential methods - - butLast: function butLast() { - return this.slice(0, -1); - }, - - isEmpty: function isEmpty() { - return this.size !== undefined ? this.size === 0 : !this.some(function () { return true; }); - }, - - count: function count(predicate, context) { - return ensureSize( - predicate ? this.toSeq().filter(predicate, context) : this - ); - }, - - countBy: function countBy(grouper, context) { - return countByFactory(this, grouper, context); - }, - - equals: function equals(other) { - return deepEqual(this, other); - }, - - entrySeq: function entrySeq() { - // eslint-disable-next-line @typescript-eslint/no-this-alias - var collection = this; - if (collection._cache) { - // We cache as an entries array, so we can just return the cache! - return new ArraySeq(collection._cache); - } - var entriesSequence = collection.toSeq().map(entryMapper).toIndexedSeq(); - entriesSequence.fromEntrySeq = function () { return collection.toSeq(); }; - return entriesSequence; - }, - - filterNot: function filterNot(predicate, context) { - return this.filter(not(predicate), context); - }, - - findEntry: function findEntry(predicate, context, notSetValue) { - var found = notSetValue; - this.__iterate(function (v, k, c) { - if (predicate.call(context, v, k, c)) { - found = [k, v]; - return false; - } - }); - return found; - }, - - findKey: function findKey(predicate, context) { - var entry = this.findEntry(predicate, context); - return entry && entry[0]; - }, - - findLast: function findLast(predicate, context, notSetValue) { - return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); - }, - - findLastEntry: function findLastEntry(predicate, context, notSetValue) { - return this.toKeyedSeq() - .reverse() - .findEntry(predicate, context, notSetValue); - }, - - findLastKey: function findLastKey(predicate, context) { - return this.toKeyedSeq().reverse().findKey(predicate, context); - }, - - first: function first(notSetValue) { - return this.find(returnTrue, null, notSetValue); - }, - - flatMap: function flatMap(mapper, context) { - return reify(this, flatMapFactory(this, mapper, context)); - }, - - flatten: function flatten(depth) { - return reify(this, flattenFactory(this, depth, true)); - }, - - fromEntrySeq: function fromEntrySeq() { - return new FromEntriesSequence(this); - }, - - get: function get(searchKey, notSetValue) { - return this.find(function (_, key) { return is(key, searchKey); }, undefined, notSetValue); - }, - - getIn: getIn, - - groupBy: function groupBy(grouper, context) { - return groupByFactory(this, grouper, context); - }, - - has: function has(searchKey) { - return this.get(searchKey, NOT_SET) !== NOT_SET; - }, - - hasIn: hasIn, - - isSubset: function isSubset(iter) { - iter = typeof iter.includes === 'function' ? iter : Collection(iter); - return this.every(function (value) { return iter.includes(value); }); - }, - - isSuperset: function isSuperset(iter) { - iter = typeof iter.isSubset === 'function' ? iter : Collection(iter); - return iter.isSubset(this); - }, - - keyOf: function keyOf(searchValue) { - return this.findKey(function (value) { return is(value, searchValue); }); - }, - - keySeq: function keySeq() { - return this.toSeq().map(keyMapper).toIndexedSeq(); - }, - - last: function last(notSetValue) { - return this.toSeq().reverse().first(notSetValue); - }, - - lastKeyOf: function lastKeyOf(searchValue) { - return this.toKeyedSeq().reverse().keyOf(searchValue); - }, - - max: function max(comparator) { - return maxFactory(this, comparator); - }, - - maxBy: function maxBy(mapper, comparator) { - return maxFactory(this, comparator, mapper); - }, - - min: function min(comparator) { - return maxFactory( - this, - comparator ? neg(comparator) : defaultNegComparator - ); - }, - - minBy: function minBy(mapper, comparator) { - return maxFactory( - this, - comparator ? neg(comparator) : defaultNegComparator, - mapper - ); - }, - - rest: function rest() { - return this.slice(1); - }, - - skip: function skip(amount) { - return amount === 0 ? this : this.slice(Math.max(0, amount)); - }, - - skipLast: function skipLast(amount) { - return amount === 0 ? this : this.slice(0, -Math.max(0, amount)); - }, - - skipWhile: function skipWhile(predicate, context) { - return reify(this, skipWhileFactory(this, predicate, context, true)); - }, - - skipUntil: function skipUntil(predicate, context) { - return this.skipWhile(not(predicate), context); - }, - - sortBy: function sortBy(mapper, comparator) { - return reify(this, sortFactory(this, comparator, mapper)); - }, - - take: function take(amount) { - return this.slice(0, Math.max(0, amount)); - }, - - takeLast: function takeLast(amount) { - return this.slice(-Math.max(0, amount)); - }, - - takeWhile: function takeWhile(predicate, context) { - return reify(this, takeWhileFactory(this, predicate, context)); - }, - - takeUntil: function takeUntil(predicate, context) { - return this.takeWhile(not(predicate), context); - }, - - update: function update(fn) { - return fn(this); - }, - - valueSeq: function valueSeq() { - return this.toIndexedSeq(); - }, - - // ### Hashable Object - - hashCode: function hashCode() { - return this.__hash || (this.__hash = hashCollection(this)); - }, - - // ### Internal - - // abstract __iterate(fn, reverse) - - // abstract __iterator(type, reverse) - }); - - var CollectionPrototype = Collection.prototype; - CollectionPrototype[IS_COLLECTION_SYMBOL] = true; - CollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values; - CollectionPrototype.toJSON = CollectionPrototype.toArray; - CollectionPrototype.__toStringMapper = quoteString; - CollectionPrototype.inspect = CollectionPrototype.toSource = function () { - return this.toString(); - }; - CollectionPrototype.chain = CollectionPrototype.flatMap; - CollectionPrototype.contains = CollectionPrototype.includes; - - mixin(KeyedCollection, { - // ### More sequential methods - - flip: function flip() { - return reify(this, flipFactory(this)); - }, - - mapEntries: function mapEntries(mapper, context) { - var this$1$1 = this; - - var iterations = 0; - return reify( - this, - this.toSeq() - .map(function (v, k) { return mapper.call(context, [k, v], iterations++, this$1$1); }) - .fromEntrySeq() - ); - }, - - mapKeys: function mapKeys(mapper, context) { - var this$1$1 = this; - - return reify( - this, - this.toSeq() - .flip() - .map(function (k, v) { return mapper.call(context, k, v, this$1$1); }) - .flip() - ); - }, - }); - - var KeyedCollectionPrototype = KeyedCollection.prototype; - KeyedCollectionPrototype[IS_KEYED_SYMBOL] = true; - KeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries; - KeyedCollectionPrototype.toJSON = toObject; - KeyedCollectionPrototype.__toStringMapper = function (v, k) { return quoteString(k) + ': ' + quoteString(v); }; - - mixin(IndexedCollection, { - // ### Conversion to other types - - toKeyedSeq: function toKeyedSeq() { - return new ToKeyedSequence(this, false); - }, - - // ### ES6 Collection methods (ES6 Array and Map) - - filter: function filter(predicate, context) { - return reify(this, filterFactory(this, predicate, context, false)); - }, - - findIndex: function findIndex(predicate, context) { - var entry = this.findEntry(predicate, context); - return entry ? entry[0] : -1; - }, - - indexOf: function indexOf(searchValue) { - var key = this.keyOf(searchValue); - return key === undefined ? -1 : key; - }, - - lastIndexOf: function lastIndexOf(searchValue) { - var key = this.lastKeyOf(searchValue); - return key === undefined ? -1 : key; - }, - - reverse: function reverse() { - return reify(this, reverseFactory(this, false)); - }, - - slice: function slice(begin, end) { - return reify(this, sliceFactory(this, begin, end, false)); - }, - - splice: function splice(index, removeNum /*, ...values*/) { - var numArgs = arguments.length; - removeNum = Math.max(removeNum || 0, 0); - if (numArgs === 0 || (numArgs === 2 && !removeNum)) { - return this; - } - // If index is negative, it should resolve relative to the size of the - // collection. However size may be expensive to compute if not cached, so - // only call count() if the number is in fact negative. - index = resolveBegin(index, index < 0 ? this.count() : this.size); - var spliced = this.slice(0, index); - return reify( - this, - numArgs === 1 - ? spliced - : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)) - ); - }, - - // ### More collection methods - - findLastIndex: function findLastIndex(predicate, context) { - var entry = this.findLastEntry(predicate, context); - return entry ? entry[0] : -1; - }, - - first: function first(notSetValue) { - return this.get(0, notSetValue); - }, - - flatten: function flatten(depth) { - return reify(this, flattenFactory(this, depth, false)); - }, - - get: function get(index, notSetValue) { - index = wrapIndex(this, index); - return index < 0 || - this.size === Infinity || - (this.size !== undefined && index > this.size) - ? notSetValue - : this.find(function (_, key) { return key === index; }, undefined, notSetValue); - }, - - has: function has(index) { - index = wrapIndex(this, index); - return ( - index >= 0 && - (this.size !== undefined - ? this.size === Infinity || index < this.size - : this.indexOf(index) !== -1) - ); - }, - - interpose: function interpose(separator) { - return reify(this, interposeFactory(this, separator)); - }, - - interleave: function interleave(/*...collections*/) { - var collections = [this].concat(arrCopy(arguments)); - var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections); - var interleaved = zipped.flatten(true); - if (zipped.size) { - interleaved.size = zipped.size * collections.length; - } - return reify(this, interleaved); - }, - - keySeq: function keySeq() { - return Range(0, this.size); - }, - - last: function last(notSetValue) { - return this.get(-1, notSetValue); - }, - - skipWhile: function skipWhile(predicate, context) { - return reify(this, skipWhileFactory(this, predicate, context, false)); - }, - - zip: function zip(/*, ...collections */) { - var collections = [this].concat(arrCopy(arguments)); - return reify(this, zipWithFactory(this, defaultZipper, collections)); - }, - - zipAll: function zipAll(/*, ...collections */) { - var collections = [this].concat(arrCopy(arguments)); - return reify(this, zipWithFactory(this, defaultZipper, collections, true)); - }, - - zipWith: function zipWith(zipper /*, ...collections */) { - var collections = arrCopy(arguments); - collections[0] = this; - return reify(this, zipWithFactory(this, zipper, collections)); - }, - }); - - var IndexedCollectionPrototype = IndexedCollection.prototype; - IndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true; - IndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true; - - mixin(SetCollection, { - // ### ES6 Collection methods (ES6 Array and Map) - - get: function get(value, notSetValue) { - return this.has(value) ? value : notSetValue; - }, - - includes: function includes(value) { - return this.has(value); - }, - - // ### More sequential methods - - keySeq: function keySeq() { - return this.valueSeq(); - }, - }); - - var SetCollectionPrototype = SetCollection.prototype; - SetCollectionPrototype.has = CollectionPrototype.includes; - SetCollectionPrototype.contains = SetCollectionPrototype.includes; - SetCollectionPrototype.keys = SetCollectionPrototype.values; - - // Mixin subclasses - - mixin(KeyedSeq, KeyedCollectionPrototype); - mixin(IndexedSeq, IndexedCollectionPrototype); - mixin(SetSeq, SetCollectionPrototype); - - // #pragma Helper functions - - function reduce(collection, reducer, reduction, context, useFirst, reverse) { - assertNotInfinite(collection.size); - collection.__iterate(function (v, k, c) { - if (useFirst) { - useFirst = false; - reduction = v; - } else { - reduction = reducer.call(context, reduction, v, k, c); - } - }, reverse); - return reduction; - } - - function keyMapper(v, k) { - return k; - } - - function entryMapper(v, k) { - return [k, v]; - } - - function not(predicate) { - return function () { - return !predicate.apply(this, arguments); - }; - } - - function neg(predicate) { - return function () { - return -predicate.apply(this, arguments); - }; - } - - function defaultZipper() { - return arrCopy(arguments); - } - - function defaultNegComparator(a, b) { - return a < b ? 1 : a > b ? -1 : 0; - } - - function hashCollection(collection) { - if (collection.size === Infinity) { - return 0; - } - var ordered = isOrdered(collection); - var keyed = isKeyed(collection); - var h = ordered ? 1 : 0; - - collection.__iterate( - keyed - ? ordered - ? function (v, k) { - h = (31 * h + hashMerge(hash(v), hash(k))) | 0; - } - : function (v, k) { - h = (h + hashMerge(hash(v), hash(k))) | 0; - } - : ordered - ? function (v) { - h = (31 * h + hash(v)) | 0; - } - : function (v) { - h = (h + hash(v)) | 0; - } - ); - - return murmurHashOfSize(collection.size, h); - } - - function murmurHashOfSize(size, h) { - h = imul(h, 0xcc9e2d51); - h = imul((h << 15) | (h >>> -15), 0x1b873593); - h = imul((h << 13) | (h >>> -13), 5); - h = ((h + 0xe6546b64) | 0) ^ size; - h = imul(h ^ (h >>> 16), 0x85ebca6b); - h = imul(h ^ (h >>> 13), 0xc2b2ae35); - h = smi(h ^ (h >>> 16)); - return h; - } - - function hashMerge(a, b) { - return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int - } - - var OrderedSet = /*@__PURE__*/(function (Set) { - function OrderedSet(value) { - // eslint-disable-next-line no-constructor-return - return value === undefined || value === null - ? emptyOrderedSet() - : isOrderedSet(value) - ? value - : emptyOrderedSet().withMutations(function (set) { - var iter = SetCollection(value); - assertNotInfinite(iter.size); - iter.forEach(function (v) { return set.add(v); }); - }); - } - - if ( Set ) OrderedSet.__proto__ = Set; - OrderedSet.prototype = Object.create( Set && Set.prototype ); - OrderedSet.prototype.constructor = OrderedSet; - - OrderedSet.of = function of (/*...values*/) { - return this(arguments); - }; - - OrderedSet.fromKeys = function fromKeys (value) { - return this(KeyedCollection(value).keySeq()); - }; - - OrderedSet.prototype.toString = function toString () { - return this.__toString('OrderedSet {', '}'); - }; - - return OrderedSet; - }(Set)); - - OrderedSet.isOrderedSet = isOrderedSet; - - var OrderedSetPrototype = OrderedSet.prototype; - OrderedSetPrototype[IS_ORDERED_SYMBOL] = true; - OrderedSetPrototype.zip = IndexedCollectionPrototype.zip; - OrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith; - OrderedSetPrototype.zipAll = IndexedCollectionPrototype.zipAll; - - OrderedSetPrototype.__empty = emptyOrderedSet; - OrderedSetPrototype.__make = makeOrderedSet; - - function makeOrderedSet(map, ownerID) { - var set = Object.create(OrderedSetPrototype); - set.size = map ? map.size : 0; - set._map = map; - set.__ownerID = ownerID; - return set; - } - - var EMPTY_ORDERED_SET; - function emptyOrderedSet() { - return ( - EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())) - ); - } - - var PairSorting = { - LeftThenRight: -1, - RightThenLeft: +1, - }; - - function throwOnInvalidDefaultValues(defaultValues) { - if (isRecord(defaultValues)) { - throw new Error( - 'Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.' - ); - } - - if (isImmutable(defaultValues)) { - throw new Error( - 'Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.' - ); - } - - if (defaultValues === null || typeof defaultValues !== 'object') { - throw new Error( - 'Can not call `Record` with a non-object as default values. Use a plain javascript object instead.' - ); - } - } - - var Record = function Record(defaultValues, name) { - var hasInitialized; - - throwOnInvalidDefaultValues(defaultValues); - - var RecordType = function Record(values) { - var this$1$1 = this; - - if (values instanceof RecordType) { - return values; - } - if (!(this instanceof RecordType)) { - return new RecordType(values); - } - if (!hasInitialized) { - hasInitialized = true; - var keys = Object.keys(defaultValues); - var indices = (RecordTypePrototype._indices = {}); - // Deprecated: left to attempt not to break any external code which - // relies on a ._name property existing on record instances. - // Use Record.getDescriptiveName() instead - RecordTypePrototype._name = name; - RecordTypePrototype._keys = keys; - RecordTypePrototype._defaultValues = defaultValues; - for (var i = 0; i < keys.length; i++) { - var propName = keys[i]; - indices[propName] = i; - if (RecordTypePrototype[propName]) { - /* eslint-disable no-console */ - typeof console === 'object' && - console.warn && - console.warn( - 'Cannot define ' + - recordName(this) + - ' with property "' + - propName + - '" since that property name is part of the Record API.' - ); - /* eslint-enable no-console */ - } else { - setProp(RecordTypePrototype, propName); - } - } - } - this.__ownerID = undefined; - this._values = List().withMutations(function (l) { - l.setSize(this$1$1._keys.length); - KeyedCollection(values).forEach(function (v, k) { - l.set(this$1$1._indices[k], v === this$1$1._defaultValues[k] ? undefined : v); - }); - }); - return this; - }; - - var RecordTypePrototype = (RecordType.prototype = - Object.create(RecordPrototype)); - RecordTypePrototype.constructor = RecordType; - - if (name) { - RecordType.displayName = name; - } - - // eslint-disable-next-line no-constructor-return - return RecordType; - }; - - Record.prototype.toString = function toString () { - var str = recordName(this) + ' { '; - var keys = this._keys; - var k; - for (var i = 0, l = keys.length; i !== l; i++) { - k = keys[i]; - str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k)); - } - return str + ' }'; - }; - - Record.prototype.equals = function equals (other) { - return ( - this === other || - (isRecord(other) && recordSeq(this).equals(recordSeq(other))) - ); - }; - - Record.prototype.hashCode = function hashCode () { - return recordSeq(this).hashCode(); - }; - - // @pragma Access - - Record.prototype.has = function has (k) { - return this._indices.hasOwnProperty(k); - }; - - Record.prototype.get = function get (k, notSetValue) { - if (!this.has(k)) { - return notSetValue; - } - var index = this._indices[k]; - var value = this._values.get(index); - return value === undefined ? this._defaultValues[k] : value; - }; - - // @pragma Modification - - Record.prototype.set = function set (k, v) { - if (this.has(k)) { - var newValues = this._values.set( - this._indices[k], - v === this._defaultValues[k] ? undefined : v - ); - if (newValues !== this._values && !this.__ownerID) { - return makeRecord(this, newValues); - } - } - return this; - }; - - Record.prototype.remove = function remove (k) { - return this.set(k); - }; - - Record.prototype.clear = function clear () { - var newValues = this._values.clear().setSize(this._keys.length); - - return this.__ownerID ? this : makeRecord(this, newValues); - }; - - Record.prototype.wasAltered = function wasAltered () { - return this._values.wasAltered(); - }; - - Record.prototype.toSeq = function toSeq () { - return recordSeq(this); - }; - - Record.prototype.toJS = function toJS$1 () { - return toJS(this); - }; - - Record.prototype.entries = function entries () { - return this.__iterator(ITERATE_ENTRIES); - }; - - Record.prototype.__iterator = function __iterator (type, reverse) { - return recordSeq(this).__iterator(type, reverse); - }; - - Record.prototype.__iterate = function __iterate (fn, reverse) { - return recordSeq(this).__iterate(fn, reverse); - }; - - Record.prototype.__ensureOwner = function __ensureOwner (ownerID) { - if (ownerID === this.__ownerID) { - return this; - } - var newValues = this._values.__ensureOwner(ownerID); - if (!ownerID) { - this.__ownerID = ownerID; - this._values = newValues; - return this; - } - return makeRecord(this, newValues, ownerID); - }; - - Record.isRecord = isRecord; - Record.getDescriptiveName = recordName; - var RecordPrototype = Record.prototype; - RecordPrototype[IS_RECORD_SYMBOL] = true; - RecordPrototype[DELETE] = RecordPrototype.remove; - RecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn; - RecordPrototype.getIn = getIn; - RecordPrototype.hasIn = CollectionPrototype.hasIn; - RecordPrototype.merge = merge$1; - RecordPrototype.mergeWith = mergeWith$1; - RecordPrototype.mergeIn = mergeIn; - RecordPrototype.mergeDeep = mergeDeep; - RecordPrototype.mergeDeepWith = mergeDeepWith; - RecordPrototype.mergeDeepIn = mergeDeepIn; - RecordPrototype.setIn = setIn; - RecordPrototype.update = update; - RecordPrototype.updateIn = updateIn; - RecordPrototype.withMutations = withMutations; - RecordPrototype.asMutable = asMutable; - RecordPrototype.asImmutable = asImmutable; - RecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries; - RecordPrototype.toJSON = RecordPrototype.toObject = - CollectionPrototype.toObject; - RecordPrototype.inspect = RecordPrototype.toSource = function () { - return this.toString(); - }; - - function makeRecord(likeRecord, values, ownerID) { - var record = Object.create(Object.getPrototypeOf(likeRecord)); - record._values = values; - record.__ownerID = ownerID; - return record; - } - - function recordName(record) { - return record.constructor.displayName || record.constructor.name || 'Record'; - } - - function recordSeq(record) { - return keyedSeqFromValue(record._keys.map(function (k) { return [k, record.get(k)]; })); - } - - function setProp(prototype, name) { - try { - Object.defineProperty(prototype, name, { - get: function () { - return this.get(name); - }, - set: function (value) { - invariant(this.__ownerID, 'Cannot set on an immutable record.'); - this.set(name, value); - }, - }); - } catch (error) { - // Object.defineProperty failed. Probably IE8. - } - } - - /** - * Returns a lazy Seq of `value` repeated `times` times. When `times` is - * undefined, returns an infinite sequence of `value`. - */ - var Repeat = /*@__PURE__*/(function (IndexedSeq) { - function Repeat(value, times) { - if (!(this instanceof Repeat)) { - // eslint-disable-next-line no-constructor-return - return new Repeat(value, times); - } - this._value = value; - this.size = times === undefined ? Infinity : Math.max(0, times); - if (this.size === 0) { - if (EMPTY_REPEAT) { - // eslint-disable-next-line no-constructor-return - return EMPTY_REPEAT; - } - // eslint-disable-next-line @typescript-eslint/no-this-alias - EMPTY_REPEAT = this; - } - } - - if ( IndexedSeq ) Repeat.__proto__ = IndexedSeq; - Repeat.prototype = Object.create( IndexedSeq && IndexedSeq.prototype ); - Repeat.prototype.constructor = Repeat; - - Repeat.prototype.toString = function toString () { - if (this.size === 0) { - return 'Repeat []'; - } - return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]'; - }; - - Repeat.prototype.get = function get (index, notSetValue) { - return this.has(index) ? this._value : notSetValue; - }; - - Repeat.prototype.includes = function includes (searchValue) { - return is(this._value, searchValue); - }; - - Repeat.prototype.slice = function slice (begin, end) { - var size = this.size; - return wholeSlice(begin, end, size) - ? this - : new Repeat( - this._value, - resolveEnd(end, size) - resolveBegin(begin, size) - ); - }; - - Repeat.prototype.reverse = function reverse () { - return this; - }; - - Repeat.prototype.indexOf = function indexOf (searchValue) { - if (is(this._value, searchValue)) { - return 0; - } - return -1; - }; - - Repeat.prototype.lastIndexOf = function lastIndexOf (searchValue) { - if (is(this._value, searchValue)) { - return this.size; - } - return -1; - }; - - Repeat.prototype.__iterate = function __iterate (fn, reverse) { - var size = this.size; - var i = 0; - while (i !== size) { - if (fn(this._value, reverse ? size - ++i : i++, this) === false) { - break; - } - } - return i; - }; - - Repeat.prototype.__iterator = function __iterator (type, reverse) { - var this$1$1 = this; - - var size = this.size; - var i = 0; - return new Iterator(function () { return i === size - ? iteratorDone() - : iteratorValue(type, reverse ? size - ++i : i++, this$1$1._value); } - ); - }; - - Repeat.prototype.equals = function equals (other) { - return other instanceof Repeat - ? is(this._value, other._value) - : deepEqual(this, other); - }; - - return Repeat; - }(IndexedSeq)); - - var EMPTY_REPEAT; - - function fromJS(value, converter) { - return fromJSWith( - [], - converter || defaultConverter, - value, - '', - converter && converter.length > 2 ? [] : undefined, - { '': value } - ); - } - - function fromJSWith(stack, converter, value, key, keyPath, parentValue) { - if ( - typeof value !== 'string' && - !isImmutable(value) && - (isArrayLike(value) || hasIterator(value) || isPlainObject(value)) - ) { - if (~stack.indexOf(value)) { - throw new TypeError('Cannot convert circular structure to Immutable'); - } - stack.push(value); - keyPath && key !== '' && keyPath.push(key); - var converted = converter.call( - parentValue, - key, - Seq(value).map(function (v, k) { return fromJSWith(stack, converter, v, k, keyPath, value); } - ), - keyPath && keyPath.slice() - ); - stack.pop(); - keyPath && keyPath.pop(); - return converted; - } - return value; - } - - function defaultConverter(k, v) { - // Effectively the opposite of "Collection.toSeq()" - return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet(); - } - - var version = "5.0.3"; - - // Note: Iterable is deprecated - var Iterable = Collection; - - exports.Collection = Collection; - exports.Iterable = Iterable; - exports.List = List; - exports.Map = Map; - exports.OrderedMap = OrderedMap; - exports.OrderedSet = OrderedSet; - exports.PairSorting = PairSorting; - exports.Range = Range; - exports.Record = Record; - exports.Repeat = Repeat; - exports.Seq = Seq; - exports.Set = Set; - exports.Stack = Stack; - exports.fromJS = fromJS; - exports.get = get; - exports.getIn = getIn$1; - exports.has = has; - exports.hasIn = hasIn$1; - exports.hash = hash; - exports.is = is; - exports.isAssociative = isAssociative; - exports.isCollection = isCollection; - exports.isImmutable = isImmutable; - exports.isIndexed = isIndexed; - exports.isKeyed = isKeyed; - exports.isList = isList; - exports.isMap = isMap; - exports.isOrdered = isOrdered; - exports.isOrderedMap = isOrderedMap; - exports.isOrderedSet = isOrderedSet; - exports.isPlainObject = isPlainObject; - exports.isRecord = isRecord; - exports.isSeq = isSeq; - exports.isSet = isSet; - exports.isStack = isStack; - exports.isValueObject = isValueObject; - exports.merge = merge; - exports.mergeDeep = mergeDeep$1; - exports.mergeDeepWith = mergeDeepWith$1; - exports.mergeWith = mergeWith; - exports.remove = remove; - exports.removeIn = removeIn; - exports.set = set; - exports.setIn = setIn$1; - exports.update = update$1; - exports.updateIn = updateIn$1; - exports.version = version; - -})); diff --git a/web/static/node_modules/immutable/dist/immutable.js.flow b/web/static/node_modules/immutable/dist/immutable.js.flow deleted file mode 100644 index afb87e0d..00000000 --- a/web/static/node_modules/immutable/dist/immutable.js.flow +++ /dev/null @@ -1,2414 +0,0 @@ -/** - * This file provides type definitions for use with the Flow type checker. - * - * An important caveat when using these definitions is that the types for - * `Collection.Keyed`, `Collection.Indexed`, `Seq.Keyed`, and so on are stubs. - * When referring to those types, you can get the proper definitions by - * importing the types `KeyedCollection`, `IndexedCollection`, `KeyedSeq`, etc. - * For example, - * - * import { Seq } from 'immutable' - * import type { IndexedCollection, IndexedSeq } from 'immutable' - * - * const someSeq: IndexedSeq = Seq.Indexed.of(1, 2, 3) - * - * function takesASeq>(iter: TS): TS { - * return iter.butLast() - * } - * - * takesASeq(someSeq) - * - * @flow strict - */ - -// Helper type that represents plain objects allowed as arguments to -// some constructors and functions. -type PlainObjInput = { +[key: K]: V, __proto__: null }; - -type K = $Keys; - -// Helper types to extract the "keys" and "values" use by the *In() methods. -type $KeyOf = $Call< - ((?_Collection) => K) & - ((?$ReadOnlyArray) => number) & - ((?RecordInstance | T) => $Keys) & - ((T) => $Keys), - C ->; - -type $ValOf> = $Call< - ((?_Collection) => V) & - ((?$ReadOnlyArray) => T) & - (>(?RecordInstance | T, K) => $ElementType) & - ((T) => $Values), - C, - K ->; - -type $IterableOf = $Call< - ( | IndexedCollection | SetCollection>( - V - ) => Iterable<$ValOf>) & - (< - V: - | KeyedCollection - | RecordInstance - | PlainObjInput - >( - V - ) => Iterable<[$KeyOf, $ValOf]>), - C ->; - -const PairSorting: $ReadOnly<{ LeftThenRight: number, RightThenLeft: number }> = - { - LeftThenRight: -1, - RightThenLeft: +1, - }; - -type Comparator = (left: T, right: T) => number; - -declare class _Collection implements ValueObject { - equals(other: mixed): boolean; - hashCode(): number; - get(key: K, ..._: []): V | void; - get(key: K, notSetValue: NSV): V | NSV; - has(key: K): boolean; - includes(value: V): boolean; - contains(value: V): boolean; - first(): V | void; - first(notSetValue: NSV): V | NSV; - last(): V | void; - last(notSetValue: NSV): V | NSV; - - hasIn(keyPath: Iterable): boolean; - - getIn(keyPath: [], notSetValue?: mixed): this; - getIn(keyPath: [K], notSetValue: NSV): V | NSV; - getIn>( - keyPath: [K, K2], - notSetValue: NSV - ): $ValOf | NSV; - getIn, K3: $KeyOf<$ValOf>>( - keyPath: [K, K2, K3], - notSetValue: NSV - ): $ValOf<$ValOf, K3> | NSV; - getIn< - NSV, - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - K4: $KeyOf<$ValOf<$ValOf, K3>> - >( - keyPath: [K, K2, K3, K4], - notSetValue: NSV - ): $ValOf<$ValOf<$ValOf, K3>, K4> | NSV; - getIn< - NSV, - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - K4: $KeyOf<$ValOf<$ValOf, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>> - >( - keyPath: [K, K2, K3, K4, K5], - notSetValue: NSV - ): $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> | NSV; - - update(updater: (value: this) => U): U; - - toJS(): Array | { [key: string]: mixed }; - toJSON(): Array | { [key: string]: V }; - toArray(): Array | Array<[K, V]>; - toObject(): { [key: string]: V }; - toMap(): Map; - toOrderedMap(): OrderedMap; - toSet(): Set; - toOrderedSet(): OrderedSet; - toList(): List; - toStack(): Stack; - toSeq(): Seq; - toKeyedSeq(): KeyedSeq; - toIndexedSeq(): IndexedSeq; - toSetSeq(): SetSeq; - - keys(): Iterator; - values(): Iterator; - entries(): Iterator<[K, V]>; - - keySeq(): IndexedSeq; - valueSeq(): IndexedSeq; - entrySeq(): IndexedSeq<[K, V]>; - - reverse(): this; - sort(comparator?: Comparator): this; - - sortBy( - comparatorValueMapper: (value: V, key: K, iter: this) => C, - comparator?: Comparator - ): this; - - groupBy( - grouper: (value: V, key: K, iter: this) => G, - context?: mixed - ): KeyedSeq; - - forEach( - sideEffect: (value: V, key: K, iter: this) => any, - context?: mixed - ): number; - - slice(begin?: number, end?: number): this; - rest(): this; - butLast(): this; - skip(amount: number): this; - skipLast(amount: number): this; - skipWhile( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): this; - skipUntil( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): this; - take(amount: number): this; - takeLast(amount: number): this; - takeWhile( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): this; - takeUntil( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): this; - - filterNot( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): this; - - reduce( - reducer: (reduction: R, value: V, key: K, iter: this) => R, - initialReduction: R, - context?: mixed - ): R; - reduce(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; - - reduceRight( - reducer: (reduction: R, value: V, key: K, iter: this) => R, - initialReduction: R, - context?: mixed - ): R; - reduceRight( - reducer: (reduction: V | R, value: V, key: K, iter: this) => R - ): R; - - every( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): boolean; - some( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): boolean; - join(separator?: string): string; - isEmpty(): boolean; - count( - predicate?: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): number; - countBy( - grouper: (value: V, key: K, iter: this) => G, - context?: mixed - ): Map; - - find( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed, - notSetValue?: V - ): V | void; - findLast( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed, - notSetValue?: V - ): V | void; - - findEntry(predicate: (value: V, key: K, iter: this) => mixed): [K, V] | void; - findLastEntry( - predicate: (value: V, key: K, iter: this) => mixed - ): [K, V] | void; - - findKey( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): K | void; - findLastKey( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): K | void; - - keyOf(searchValue: V): K | void; - lastKeyOf(searchValue: V): K | void; - - max(comparator?: Comparator): V; - maxBy( - comparatorValueMapper: (value: V, key: K, iter: this) => C, - comparator?: Comparator - ): V; - min(comparator?: Comparator): V; - minBy( - comparatorValueMapper: (value: V, key: K, iter: this) => C, - comparator?: Comparator - ): V; - - isSubset(iter: Iterable): boolean; - isSuperset(iter: Iterable): boolean; -} - -declare function isImmutable( - maybeImmutable: mixed -): boolean %checks(maybeImmutable instanceof Collection); -declare function isCollection( - maybeCollection: mixed -): boolean %checks(maybeCollection instanceof Collection); -declare function isKeyed( - maybeKeyed: mixed -): boolean %checks(maybeKeyed instanceof KeyedCollection); -declare function isIndexed( - maybeIndexed: mixed -): boolean %checks(maybeIndexed instanceof IndexedCollection); -declare function isAssociative( - maybeAssociative: mixed -): boolean %checks(maybeAssociative instanceof KeyedCollection || - maybeAssociative instanceof IndexedCollection); -declare function isOrdered( - maybeOrdered: mixed -): boolean %checks(maybeOrdered instanceof IndexedCollection || - maybeOrdered instanceof OrderedMap || - maybeOrdered instanceof OrderedSet); -declare function isValueObject(maybeValue: mixed): boolean; - -declare function isSeq(maybeSeq: any): boolean %checks(maybeSeq instanceof Seq); -declare function isList(maybeList: any): boolean %checks(maybeList instanceof - List); -declare function isMap(maybeMap: any): boolean %checks(maybeMap instanceof Map); -declare function isOrderedMap( - maybeOrderedMap: any -): boolean %checks(maybeOrderedMap instanceof OrderedMap); -declare function isStack(maybeStack: any): boolean %checks(maybeStack instanceof - Stack); -declare function isSet(maybeSet: any): boolean %checks(maybeSet instanceof Set); -declare function isOrderedSet( - maybeOrderedSet: any -): boolean %checks(maybeOrderedSet instanceof OrderedSet); -declare function isRecord( - maybeRecord: any -): boolean %checks(maybeRecord instanceof Record); - -declare interface ValueObject { - equals(other: mixed): boolean; - hashCode(): number; -} - -declare class Collection extends _Collection { - static Keyed: typeof KeyedCollection; - static Indexed: typeof IndexedCollection; - static Set: typeof SetCollection; - - static isCollection: typeof isCollection; - static isKeyed: typeof isKeyed; - static isIndexed: typeof isIndexed; - static isAssociative: typeof isAssociative; - static isOrdered: typeof isOrdered; -} - -declare class KeyedCollection extends Collection { - static ( - values?: Iterable<[K, V]> | PlainObjInput - ): KeyedCollection; - - toJS(): { [key: string]: mixed }; - toJSON(): { [key: string]: V }; - toArray(): Array<[K, V]>; - @@iterator(): Iterator<[K, V]>; - toSeq(): KeyedSeq; - flip(): KeyedCollection; - - concat( - ...iters: Array | PlainObjInput> - ): KeyedCollection; - - filter(predicate: typeof Boolean): KeyedCollection>; - filter( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): KeyedCollection; - - partition( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): [this, this]; - - map( - mapper: (value: V, key: K, iter: this) => M, - context?: mixed - ): KeyedCollection; - - mapKeys( - mapper: (key: K, value: V, iter: this) => M, - context?: mixed - ): KeyedCollection; - - mapEntries( - mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], - context?: mixed - ): KeyedCollection; - - flatMap( - mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, - context?: mixed - ): KeyedCollection; - - flatten(depth?: number): KeyedCollection; - flatten(shallow?: boolean): KeyedCollection; -} - -Collection.Keyed = KeyedCollection; - -declare class IndexedCollection<+T> extends Collection { - static (iter?: Iterable): IndexedCollection; - - toJS(): Array; - toJSON(): Array; - toArray(): Array; - @@iterator(): Iterator; - toSeq(): IndexedSeq; - fromEntrySeq(): KeyedSeq; - interpose(separator: T): this; - interleave(...collections: Iterable[]): this; - splice(index: number, removeNum: number, ...values: T[]): this; - - zip(a: Iterable, ..._: []): IndexedCollection<[T, A]>; - zip( - a: Iterable, - b: Iterable, - ..._: [] - ): IndexedCollection<[T, A, B]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): IndexedCollection<[T, A, B, C]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): IndexedCollection<[T, A, B, C, D]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): IndexedCollection<[T, A, B, C, D, E]>; - - zipAll(a: Iterable, ..._: []): IndexedCollection<[T | void, A | void]>; - zipAll( - a: Iterable, - b: Iterable, - ..._: [] - ): IndexedCollection<[T | void, A | void, B | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): IndexedCollection<[T | void, A | void, B | void, C | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): IndexedCollection<[T | void, A | void, B | void, C | void, D | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): IndexedCollection< - [T | void, A | void, B | void, C | void, D | void, E | void] - >; - - zipWith( - zipper: (value: T, a: A) => R, - a: Iterable, - ..._: [] - ): IndexedCollection; - zipWith( - zipper: (value: T, a: A, b: B) => R, - a: Iterable, - b: Iterable, - ..._: [] - ): IndexedCollection; - zipWith( - zipper: (value: T, a: A, b: B, c: C) => R, - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): IndexedCollection; - zipWith( - zipper: (value: T, a: A, b: B, c: C, d: D) => R, - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): IndexedCollection; - zipWith( - zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): IndexedCollection; - - indexOf(searchValue: T): number; - lastIndexOf(searchValue: T): number; - findIndex( - predicate: (value: T, index: number, iter: this) => mixed, - context?: mixed - ): number; - findLastIndex( - predicate: (value: T, index: number, iter: this) => mixed, - context?: mixed - ): number; - - concat(...iters: Array | C>): IndexedCollection; - - filter(predicate: typeof Boolean): IndexedCollection<$NonMaybeType>; - filter( - predicate: (value: T, index: number, iter: this) => mixed, - context?: mixed - ): IndexedCollection; - - partition( - predicate: (value: T, index: number, iter: this) => mixed, - context?: mixed - ): [this, this]; - - map( - mapper: (value: T, index: number, iter: this) => M, - context?: mixed - ): IndexedCollection; - - flatMap( - mapper: (value: T, index: number, iter: this) => Iterable, - context?: mixed - ): IndexedCollection; - - flatten(depth?: number): IndexedCollection; - flatten(shallow?: boolean): IndexedCollection; -} - -declare class SetCollection<+T> extends Collection { - static (iter?: Iterable): SetCollection; - - toJS(): Array; - toJSON(): Array; - toArray(): Array; - @@iterator(): Iterator; - toSeq(): SetSeq; - - concat(...collections: Iterable[]): SetCollection; - - // `filter`, `map` and `flatMap` cannot be defined further up the hierarchy, - // because the implementation for `KeyedCollection` allows the value type to - // change without constraining the key type. That does not work for - // `SetCollection` - the value and key types *must* match. - filter(predicate: typeof Boolean): SetCollection<$NonMaybeType>; - filter( - predicate: (value: T, value: T, iter: this) => mixed, - context?: mixed - ): SetCollection; - - partition( - predicate: (value: T, value: T, iter: this) => mixed, - context?: mixed - ): [this, this]; - - map( - mapper: (value: T, value: T, iter: this) => M, - context?: mixed - ): SetCollection; - - flatMap( - mapper: (value: T, value: T, iter: this) => Iterable, - context?: mixed - ): SetCollection; - - flatten(depth?: number): SetCollection; - flatten(shallow?: boolean): SetCollection; -} - -declare function isSeq(maybeSeq: mixed): boolean %checks(maybeSeq instanceof - Seq); -declare class Seq extends _Collection { - static Keyed: typeof KeyedSeq; - static Indexed: typeof IndexedSeq; - static Set: typeof SetSeq; - - static (values: KeyedSeq): KeyedSeq; - static (values: SetSeq): SetSeq; - static (values: Iterable): IndexedSeq; - static (values?: PlainObjInput): KeyedSeq; - - static isSeq: typeof isSeq; - - size: number | void; - cacheResult(): this; - toSeq(): this; -} - -declare class KeyedSeq extends Seq mixins KeyedCollection { - static ( - values?: Iterable<[K, V]> | PlainObjInput - ): KeyedSeq; - - // Override specialized return types - flip(): KeyedSeq; - - concat( - ...iters: Array | PlainObjInput> - ): KeyedSeq; - - filter(predicate: typeof Boolean): KeyedSeq>; - filter( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): KeyedSeq; - - partition( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): [this, this]; - - map( - mapper: (value: V, key: K, iter: this) => M, - context?: mixed - ): KeyedSeq; - - mapKeys( - mapper: (key: K, value: V, iter: this) => M, - context?: mixed - ): KeyedSeq; - - mapEntries( - mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], - context?: mixed - ): KeyedSeq; - - flatMap( - mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, - context?: mixed - ): KeyedSeq; - - flatten(depth?: number): KeyedSeq; - flatten(shallow?: boolean): KeyedSeq; -} - -declare class IndexedSeq<+T> - extends Seq - mixins IndexedCollection -{ - static (values?: Iterable): IndexedSeq; - - static of(...values: T[]): IndexedSeq; - - // Override specialized return types - - concat(...iters: Array | C>): IndexedSeq; - - filter(predicate: typeof Boolean): IndexedSeq<$NonMaybeType>; - filter( - predicate: (value: T, index: number, iter: this) => mixed, - context?: mixed - ): IndexedSeq; - - partition( - predicate: (value: T, index: number, iter: this) => mixed, - context?: mixed - ): [this, this]; - - map( - mapper: (value: T, index: number, iter: this) => M, - context?: mixed - ): IndexedSeq; - - flatMap( - mapper: (value: T, index: number, iter: this) => Iterable, - context?: mixed - ): IndexedSeq; - - flatten(depth?: number): IndexedSeq; - flatten(shallow?: boolean): IndexedSeq; - - zip(a: Iterable, ..._: []): IndexedSeq<[T, A]>; - zip(a: Iterable, b: Iterable, ..._: []): IndexedSeq<[T, A, B]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): IndexedSeq<[T, A, B, C]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): IndexedSeq<[T, A, B, C, D]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): IndexedSeq<[T, A, B, C, D, E]>; - - zipAll(a: Iterable, ..._: []): IndexedSeq<[T | void, A | void]>; - zipAll( - a: Iterable, - b: Iterable, - ..._: [] - ): IndexedSeq<[T | void, A | void, B | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): IndexedSeq<[T | void, A | void, B | void, C | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): IndexedSeq<[T | void, A | void, B | void, C | void, D | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): IndexedSeq<[T | void, A | void, B | void, C | void, D | void, E | void]>; - - zipWith( - zipper: (value: T, a: A) => R, - a: Iterable, - ..._: [] - ): IndexedSeq; - zipWith( - zipper: (value: T, a: A, b: B) => R, - a: Iterable, - b: Iterable, - ..._: [] - ): IndexedSeq; - zipWith( - zipper: (value: T, a: A, b: B, c: C) => R, - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): IndexedSeq; - zipWith( - zipper: (value: T, a: A, b: B, c: C, d: D) => R, - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): IndexedSeq; - zipWith( - zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): IndexedSeq; -} - -declare class SetSeq<+T> extends Seq mixins SetCollection { - static (values?: Iterable): SetSeq; - - static of(...values: T[]): SetSeq; - - // Override specialized return types - - concat(...collections: Iterable[]): SetSeq; - - filter(predicate: typeof Boolean): SetSeq<$NonMaybeType>; - filter( - predicate: (value: T, value: T, iter: this) => mixed, - context?: mixed - ): SetSeq; - - partition( - predicate: (value: T, value: T, iter: this) => mixed, - context?: mixed - ): [this, this]; - - map( - mapper: (value: T, value: T, iter: this) => M, - context?: mixed - ): SetSeq; - - flatMap( - mapper: (value: T, value: T, iter: this) => Iterable, - context?: mixed - ): SetSeq; - - flatten(depth?: number): SetSeq; - flatten(shallow?: boolean): SetSeq; -} - -declare class UpdatableInCollection { - setIn(keyPath: [], value: S): S; - setIn(keyPath: [K], value: V): this; - setIn, S: $ValOf>(keyPath: [K, K2], value: S): this; - setIn, K3: $KeyOf<$ValOf>, S: $ValOf<$ValOf, K3>>( - keyPath: [K, K2, K3], - value: S - ): this; - setIn< - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - K4: $KeyOf<$ValOf<$ValOf, K3>>, - S: $ValOf<$ValOf<$ValOf, K3>, K4> - >( - keyPath: [K, K2, K3, K4], - value: S - ): this; - setIn< - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - K4: $KeyOf<$ValOf<$ValOf, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>>, - S: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> - >( - keyPath: [K, K2, K3, K4, K5], - value: S - ): this; - - deleteIn(keyPath: []): void; - deleteIn(keyPath: [K]): this; - deleteIn>(keyPath: [K, K2]): this; - deleteIn, K3: $KeyOf<$ValOf>>( - keyPath: [K, K2, K3] - ): this; - deleteIn< - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - K4: $KeyOf<$ValOf<$ValOf, K3>> - >( - keyPath: [K, K2, K3, K4] - ): this; - deleteIn< - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - K4: $KeyOf<$ValOf<$ValOf, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>> - >( - keyPath: [K, K2, K3, K4, K5] - ): this; - - removeIn(keyPath: []): void; - removeIn(keyPath: [K]): this; - removeIn>(keyPath: [K, K2]): this; - removeIn, K3: $KeyOf<$ValOf>>( - keyPath: [K, K2, K3] - ): this; - removeIn< - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - K4: $KeyOf<$ValOf<$ValOf, K3>> - >( - keyPath: [K, K2, K3, K4] - ): this; - removeIn< - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - K4: $KeyOf<$ValOf<$ValOf, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>> - >( - keyPath: [K, K2, K3, K4, K5] - ): this; - - updateIn(keyPath: [], notSetValue: mixed, updater: (value: this) => U): U; - updateIn(keyPath: [], updater: (value: this) => U): U; - updateIn(keyPath: [K], notSetValue: NSV, updater: (value: V) => V): this; - updateIn(keyPath: [K], updater: (value: V) => V): this; - updateIn, S: $ValOf>( - keyPath: [K, K2], - notSetValue: NSV, - updater: (value: $ValOf | NSV) => S - ): this; - updateIn, S: $ValOf>( - keyPath: [K, K2], - updater: (value: $ValOf) => S - ): this; - updateIn< - NSV, - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - S: $ValOf<$ValOf, K3> - >( - keyPath: [K, K2, K3], - notSetValue: NSV, - updater: (value: $ValOf<$ValOf, K3> | NSV) => S - ): this; - updateIn< - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - S: $ValOf<$ValOf, K3> - >( - keyPath: [K, K2, K3], - updater: (value: $ValOf<$ValOf, K3>) => S - ): this; - updateIn< - NSV, - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - K4: $KeyOf<$ValOf<$ValOf, K3>>, - S: $ValOf<$ValOf<$ValOf, K3>, K4> - >( - keyPath: [K, K2, K3, K4], - notSetValue: NSV, - updater: (value: $ValOf<$ValOf<$ValOf, K3>, K4> | NSV) => S - ): this; - updateIn< - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - K4: $KeyOf<$ValOf<$ValOf, K3>>, - S: $ValOf<$ValOf<$ValOf, K3>, K4> - >( - keyPath: [K, K2, K3, K4], - updater: (value: $ValOf<$ValOf<$ValOf, K3>, K4>) => S - ): this; - updateIn< - NSV, - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - K4: $KeyOf<$ValOf<$ValOf, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>>, - S: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> - >( - keyPath: [K, K2, K3, K4, K5], - notSetValue: NSV, - updater: ( - value: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> | NSV - ) => S - ): this; - updateIn< - K2: $KeyOf, - K3: $KeyOf<$ValOf>, - K4: $KeyOf<$ValOf<$ValOf, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf, K3>, K4>>, - S: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5> - >( - keyPath: [K, K2, K3, K4, K5], - updater: (value: $ValOf<$ValOf<$ValOf<$ValOf, K3>, K4>, K5>) => S - ): this; -} - -declare function isList(maybeList: mixed): boolean %checks(maybeList instanceof - List); -declare class List<+T> - extends IndexedCollection - mixins UpdatableInCollection -{ - static (collection?: Iterable): List; - - static of(...values: T[]): List; - - static isList: typeof isList; - - size: number; - - set(index: number, value: U): List; - delete(index: number): this; - remove(index: number): this; - insert(index: number, value: U): List; - clear(): this; - push(...values: U[]): List; - pop(): this; - unshift(...values: U[]): List; - shift(): this; - - update(updater: (value: this) => U): U; - update(index: number, updater: (value: T) => U): List; - update( - index: number, - notSetValue: U, - updater: (value: T) => U - ): List; - - merge(...collections: Iterable[]): List; - - setSize(size: number): this; - - mergeIn(keyPath: Iterable, ...collections: Iterable[]): this; - mergeDeepIn( - keyPath: Iterable, - ...collections: Iterable[] - ): this; - - withMutations(mutator: (mutable: this) => mixed): this; - asMutable(): this; - wasAltered(): boolean; - asImmutable(): this; - - // Override specialized return types - - concat(...iters: Array | C>): List; - - filter(predicate: typeof Boolean): List<$NonMaybeType>; - filter( - predicate: (value: T, index: number, iter: this) => mixed, - context?: mixed - ): List; - - partition( - predicate: (value: T, index: number, iter: this) => mixed, - context?: mixed - ): [this, this]; - - map( - mapper: (value: T, index: number, iter: this) => M, - context?: mixed - ): List; - - flatMap( - mapper: (value: T, index: number, iter: this) => Iterable, - context?: mixed - ): List; - - flatten(depth?: number): List; - flatten(shallow?: boolean): List; - - zip(a: Iterable, ..._: []): List<[T, A]>; - zip(a: Iterable, b: Iterable, ..._: []): List<[T, A, B]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): List<[T, A, B, C]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): List<[T, A, B, C, D]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): List<[T, A, B, C, D, E]>; - - zipAll(a: Iterable, ..._: []): List<[T | void, A | void]>; - zipAll( - a: Iterable, - b: Iterable, - ..._: [] - ): List<[T | void, A | void, B | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): List<[T | void, A | void, B | void, C | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): List<[T | void, A | void, B | void, C | void, D | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): List<[T | void, A | void, B | void, C | void, D | void, E | void]>; - - zipWith( - zipper: (value: T, a: A) => R, - a: Iterable, - ..._: [] - ): List; - zipWith( - zipper: (value: T, a: A, b: B) => R, - a: Iterable, - b: Iterable, - ..._: [] - ): List; - zipWith( - zipper: (value: T, a: A, b: B, c: C) => R, - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): List; - zipWith( - zipper: (value: T, a: A, b: B, c: C, d: D) => R, - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): List; - zipWith( - zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): List; -} - -declare function isMap(maybeMap: mixed): boolean %checks(maybeMap instanceof - Map); -declare class Map - extends KeyedCollection - mixins UpdatableInCollection -{ - static (values?: Iterable<[K, V]> | PlainObjInput): Map; - - static isMap: typeof isMap; - - size: number; - - set(key: K_, value: V_): Map; - delete(key: K): this; - remove(key: K): this; - clear(): this; - - deleteAll(keys: Iterable): Map; - removeAll(keys: Iterable): Map; - - update(updater: (value: this) => U): U; - update(key: K, updater: (value: V) => V_): Map; - update( - key: K, - notSetValue: V_, - updater: (value: V) => V_ - ): Map; - - merge( - ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] - ): Map; - concat( - ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] - ): Map; - - mergeWith( - merger: (oldVal: V, newVal: W, key: K) => X, - ...collections: (Iterable<[K_, W]> | PlainObjInput)[] - ): Map; - - mergeDeep( - ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] - ): Map; - - mergeDeepWith( - merger: (oldVal: any, newVal: any, key: any) => mixed, - ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] - ): Map; - - mergeIn( - keyPath: Iterable, - ...collections: (Iterable | PlainObjInput)[] - ): this; - mergeDeepIn( - keyPath: Iterable, - ...collections: (Iterable | PlainObjInput)[] - ): this; - - withMutations(mutator: (mutable: this) => mixed): this; - asMutable(): this; - wasAltered(): boolean; - asImmutable(): this; - - // Override specialized return types - - flip(): Map; - - filter(predicate: typeof Boolean): Map>; - filter( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): Map; - - partition( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): [this, this]; - - map( - mapper: (value: V, key: K, iter: this) => M, - context?: mixed - ): Map; - - mapKeys( - mapper: (key: K, value: V, iter: this) => M, - context?: mixed - ): Map; - - mapEntries( - mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], - context?: mixed - ): Map; - - flatMap( - mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, - context?: mixed - ): Map; - - flatten(depth?: number): Map; - flatten(shallow?: boolean): Map; -} - -declare function isOrderedMap( - maybeOrderedMap: mixed -): boolean %checks(maybeOrderedMap instanceof OrderedMap); -declare class OrderedMap - extends Map - mixins UpdatableInCollection -{ - static ( - values?: Iterable<[K, V]> | PlainObjInput - ): OrderedMap; - - static isOrderedMap: typeof isOrderedMap; - - size: number; - - set(key: K_, value: V_): OrderedMap; - delete(key: K): this; - remove(key: K): this; - clear(): this; - - update(updater: (value: this) => U): U; - update(key: K, updater: (value: V) => V_): OrderedMap; - update( - key: K, - notSetValue: V_, - updater: (value: V) => V_ - ): OrderedMap; - - merge( - ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] - ): OrderedMap; - concat( - ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] - ): OrderedMap; - - mergeWith( - merger: (oldVal: V, newVal: W, key: K) => X, - ...collections: (Iterable<[K_, W]> | PlainObjInput)[] - ): OrderedMap; - - mergeDeep( - ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] - ): OrderedMap; - - mergeDeepWith( - merger: (oldVal: any, newVal: any, key: any) => mixed, - ...collections: (Iterable<[K_, V_]> | PlainObjInput)[] - ): OrderedMap; - - mergeIn( - keyPath: Iterable, - ...collections: (Iterable | PlainObjInput)[] - ): this; - mergeDeepIn( - keyPath: Iterable, - ...collections: (Iterable | PlainObjInput)[] - ): this; - - withMutations(mutator: (mutable: this) => mixed): this; - asMutable(): this; - wasAltered(): boolean; - asImmutable(): this; - - // Override specialized return types - - flip(): OrderedMap; - - filter(predicate: typeof Boolean): OrderedMap>; - filter( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): OrderedMap; - - partition( - predicate: (value: V, key: K, iter: this) => mixed, - context?: mixed - ): [this, this]; - - map( - mapper: (value: V, key: K, iter: this) => M, - context?: mixed - ): OrderedMap; - - mapKeys( - mapper: (key: K, value: V, iter: this) => M, - context?: mixed - ): OrderedMap; - - mapEntries( - mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], - context?: mixed - ): OrderedMap; - - flatMap( - mapper: (value: V, key: K, iter: this) => Iterable<[KM, VM]>, - context?: mixed - ): OrderedMap; - - flatten(depth?: number): OrderedMap; - flatten(shallow?: boolean): OrderedMap; -} - -declare function isSet(maybeSet: mixed): boolean %checks(maybeSet instanceof - Set); -declare class Set<+T> extends SetCollection { - static (values?: Iterable): Set; - - static of(...values: T[]): Set; - static fromKeys( - values: Iterable<[T, mixed]> | PlainObjInput - ): Set; - - static intersect(sets: Iterable>): Set; - static union(sets: Iterable>): Set; - - static isSet: typeof isSet; - - size: number; - - add(value: U): Set; - delete(value: T): this; - remove(value: T): this; - clear(): this; - union(...collections: Iterable[]): Set; - merge(...collections: Iterable[]): Set; - concat(...collections: Iterable[]): Set; - intersect(...collections: Iterable[]): Set; - subtract(...collections: Iterable[]): this; - - withMutations(mutator: (mutable: this) => mixed): this; - asMutable(): this; - wasAltered(): boolean; - asImmutable(): this; - - // Override specialized return types - - filter(predicate: typeof Boolean): Set<$NonMaybeType>; - filter( - predicate: (value: T, value: T, iter: this) => mixed, - context?: mixed - ): Set; - - partition( - predicate: (value: T, value: T, iter: this) => mixed, - context?: mixed - ): [this, this]; - - map( - mapper: (value: T, value: T, iter: this) => M, - context?: mixed - ): Set; - - flatMap( - mapper: (value: T, value: T, iter: this) => Iterable, - context?: mixed - ): Set; - - flatten(depth?: number): Set; - flatten(shallow?: boolean): Set; -} - -// Overrides except for `isOrderedSet` are for specialized return types -declare function isOrderedSet( - maybeOrderedSet: mixed -): boolean %checks(maybeOrderedSet instanceof OrderedSet); -declare class OrderedSet<+T> extends Set { - static (values?: Iterable): OrderedSet; - - static of(...values: T[]): OrderedSet; - static fromKeys( - values: Iterable<[T, mixed]> | PlainObjInput - ): OrderedSet; - - static isOrderedSet: typeof isOrderedSet; - - size: number; - - add(value: U): OrderedSet; - union(...collections: Iterable[]): OrderedSet; - merge(...collections: Iterable[]): OrderedSet; - concat(...collections: Iterable[]): OrderedSet; - intersect(...collections: Iterable[]): OrderedSet; - - filter(predicate: typeof Boolean): OrderedSet<$NonMaybeType>; - filter( - predicate: (value: T, value: T, iter: this) => mixed, - context?: mixed - ): OrderedSet; - - partition( - predicate: (value: T, value: T, iter: this) => mixed, - context?: mixed - ): [this, this]; - - map( - mapper: (value: T, value: T, iter: this) => M, - context?: mixed - ): OrderedSet; - - flatMap( - mapper: (value: T, value: T, iter: this) => Iterable, - context?: mixed - ): OrderedSet; - - flatten(depth?: number): OrderedSet; - flatten(shallow?: boolean): OrderedSet; - - zip(a: Iterable, ..._: []): OrderedSet<[T, A]>; - zip(a: Iterable, b: Iterable, ..._: []): OrderedSet<[T, A, B]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): OrderedSet<[T, A, B, C]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): OrderedSet<[T, A, B, C, D]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): OrderedSet<[T, A, B, C, D, E]>; - - zipAll(a: Iterable, ..._: []): OrderedSet<[T | void, A | void]>; - zipAll( - a: Iterable, - b: Iterable, - ..._: [] - ): OrderedSet<[T | void, A | void, B | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): OrderedSet<[T | void, A | void, B | void, C | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): OrderedSet<[T | void, A | void, B | void, C | void, D | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): OrderedSet<[T | void, A | void, B | void, C | void, D | void, E | void]>; - - zipWith( - zipper: (value: T, a: A) => R, - a: Iterable, - ..._: [] - ): OrderedSet; - zipWith( - zipper: (value: T, a: A, b: B) => R, - a: Iterable, - b: Iterable, - ..._: [] - ): OrderedSet; - zipWith( - zipper: (value: T, a: A, b: B, c: C) => R, - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): OrderedSet; - zipWith( - zipper: (value: T, a: A, b: B, c: C, d: D) => R, - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): OrderedSet; - zipWith( - zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): OrderedSet; -} - -declare function isStack( - maybeStack: mixed -): boolean %checks(maybeStack instanceof Stack); -declare class Stack<+T> extends IndexedCollection { - static (collection?: Iterable): Stack; - - static isStack(maybeStack: mixed): boolean; - static of(...values: T[]): Stack; - - static isStack: typeof isStack; - - size: number; - - peek(): T; - clear(): this; - unshift(...values: U[]): Stack; - unshiftAll(iter: Iterable): Stack; - shift(): this; - push(...values: U[]): Stack; - pushAll(iter: Iterable): Stack; - pop(): this; - - withMutations(mutator: (mutable: this) => mixed): this; - asMutable(): this; - wasAltered(): boolean; - asImmutable(): this; - - // Override specialized return types - - concat(...iters: Array | C>): Stack; - - filter(predicate: typeof Boolean): Stack<$NonMaybeType>; - filter( - predicate: (value: T, index: number, iter: this) => mixed, - context?: mixed - ): Stack; - - map( - mapper: (value: T, index: number, iter: this) => M, - context?: mixed - ): Stack; - - flatMap( - mapper: (value: T, index: number, iter: this) => Iterable, - context?: mixed - ): Stack; - - flatten(depth?: number): Stack; - flatten(shallow?: boolean): Stack; - - zip(a: Iterable, ..._: []): Stack<[T, A]>; - zip(a: Iterable, b: Iterable, ..._: []): Stack<[T, A, B]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): Stack<[T, A, B, C]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): Stack<[T, A, B, C, D]>; - zip( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): Stack<[T, A, B, C, D, E]>; - - zipAll(a: Iterable, ..._: []): Stack<[T | void, A | void]>; - zipAll( - a: Iterable, - b: Iterable, - ..._: [] - ): Stack<[T | void, A | void, B | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): Stack<[T | void, A | void, B | void, C | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): Stack<[T | void, A | void, B | void, C | void, D | void]>; - zipAll( - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): Stack<[T | void, A | void, B | void, C | void, D | void, E | void]>; - - zipWith( - zipper: (value: T, a: A) => R, - a: Iterable, - ..._: [] - ): Stack; - zipWith( - zipper: (value: T, a: A, b: B) => R, - a: Iterable, - b: Iterable, - ..._: [] - ): Stack; - zipWith( - zipper: (value: T, a: A, b: B, c: C) => R, - a: Iterable, - b: Iterable, - c: Iterable, - ..._: [] - ): Stack; - zipWith( - zipper: (value: T, a: A, b: B, c: C, d: D) => R, - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - ..._: [] - ): Stack; - zipWith( - zipper: (value: T, a: A, b: B, c: C, d: D, e: E) => R, - a: Iterable, - b: Iterable, - c: Iterable, - d: Iterable, - e: Iterable, - ..._: [] - ): Stack; -} - -declare function Range( - start?: number, - end?: number, - step?: number -): IndexedSeq; -declare function Repeat(value: T, times?: number): IndexedSeq; - -// The type of a Record factory function. -type RecordFactory = Class>; - -// The type of runtime Record instances. -type RecordOf = RecordInstance & $ReadOnly; - -// The values of a Record instance. -type _RecordValues | T> = R; -type RecordValues = _RecordValues<*, R>; - -declare function isRecord( - maybeRecord: any -): boolean %checks(maybeRecord instanceof RecordInstance); -declare class Record { - static (spec: Values, name?: string): typeof RecordInstance; - constructor( - spec: Values, - name?: string - ): typeof RecordInstance; - - static isRecord: typeof isRecord; - - static getDescriptiveName(record: RecordInstance): string; -} - -declare class RecordInstance { - static (values?: Iterable<[$Keys, $ValOf]> | $Shape): RecordOf; - // Note: a constructor can only create an instance of RecordInstance, - // it's encouraged to not use `new` when creating Records. - constructor(values?: Iterable<[$Keys, $ValOf]> | $Shape): void; - - size: number; - - has(key: string): boolean; - - get>(key: K, ..._: []): $ElementType; - get, NSV>(key: K, notSetValue: NSV): $ElementType | NSV; - - hasIn(keyPath: Iterable): boolean; - - getIn(keyPath: [], notSetValue?: mixed): this & $ReadOnly; - getIn>(keyPath: [K], notSetValue?: mixed): $ElementType; - getIn, K2: $KeyOf<$ValOf>>( - keyPath: [K, K2], - notSetValue: NSV - ): $ValOf<$ValOf, K2> | NSV; - getIn< - NSV, - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>> - >( - keyPath: [K, K2, K3], - notSetValue: NSV - ): $ValOf<$ValOf<$ValOf, K2>, K3> | NSV; - getIn< - NSV, - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>> - >( - keyPath: [K, K2, K3, K4], - notSetValue: NSV - ): $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> | NSV; - getIn< - NSV, - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>> - >( - keyPath: [K, K2, K3, K4, K5], - notSetValue: NSV - ): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> | NSV; - - equals(other: any): boolean; - hashCode(): number; - - set>(key: K, value: $ElementType): this & $ReadOnly; - update>( - key: K, - updater: (value: $ElementType) => $ElementType - ): this & $ReadOnly; - merge( - ...collections: Array, $ValOf]> | $Shape> - ): this & $ReadOnly; - mergeDeep( - ...collections: Array, $ValOf]> | $Shape> - ): this & $ReadOnly; - - mergeWith( - merger: (oldVal: $ValOf, newVal: $ValOf, key: $Keys) => $ValOf, - ...collections: Array, $ValOf]> | $Shape> - ): this & $ReadOnly; - mergeDeepWith( - merger: (oldVal: any, newVal: any, key: any) => any, - ...collections: Array, $ValOf]> | $Shape> - ): this & $ReadOnly; - - delete>(key: K): this & $ReadOnly; - remove>(key: K): this & $ReadOnly; - clear(): this & $ReadOnly; - - setIn(keyPath: [], value: S): S; - setIn, S: $ValOf>( - keyPath: [K], - value: S - ): this & $ReadOnly; - setIn, K2: $KeyOf<$ValOf>, S: $ValOf<$ValOf, K2>>( - keyPath: [K, K2], - value: S - ): this & $ReadOnly; - setIn< - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - S: $ValOf<$ValOf<$ValOf, K2>, K3> - >( - keyPath: [K, K2, K3], - value: S - ): this & $ReadOnly; - setIn< - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> - >( - keyPath: [K, K2, K3, K4], - value: S - ): this & $ReadOnly; - setIn< - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, - S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> - >( - keyPath: [K, K2, K3, K4, K5], - value: S - ): this & $ReadOnly; - - deleteIn(keyPath: []): void; - deleteIn>(keyPath: [K]): this & $ReadOnly; - deleteIn, K2: $KeyOf<$ValOf>>( - keyPath: [K, K2] - ): this & $ReadOnly; - deleteIn< - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>> - >( - keyPath: [K, K2, K3] - ): this & $ReadOnly; - deleteIn< - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>> - >( - keyPath: [K, K2, K3, K4] - ): this & $ReadOnly; - deleteIn< - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>> - >( - keyPath: [K, K2, K3, K4, K5] - ): this & $ReadOnly; - - removeIn(keyPath: []): void; - removeIn>(keyPath: [K]): this & $ReadOnly; - removeIn, K2: $KeyOf<$ValOf>>( - keyPath: [K, K2] - ): this & $ReadOnly; - removeIn< - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>> - >( - keyPath: [K, K2, K3] - ): this & $ReadOnly; - removeIn< - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>> - >( - keyPath: [K, K2, K3, K4] - ): this & $ReadOnly; - removeIn< - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>> - >( - keyPath: [K, K2, K3, K4, K5] - ): this & $ReadOnly; - - updateIn( - keyPath: [], - notSetValue: mixed, - updater: (value: this & T) => U - ): U; - updateIn(keyPath: [], updater: (value: this & T) => U): U; - updateIn, S: $ValOf>( - keyPath: [K], - notSetValue: NSV, - updater: (value: $ValOf) => S - ): this & $ReadOnly; - updateIn, S: $ValOf>( - keyPath: [K], - updater: (value: $ValOf) => S - ): this & $ReadOnly; - updateIn< - NSV, - K: $Keys, - K2: $KeyOf<$ValOf>, - S: $ValOf<$ValOf, K2> - >( - keyPath: [K, K2], - notSetValue: NSV, - updater: (value: $ValOf<$ValOf, K2> | NSV) => S - ): this & $ReadOnly; - updateIn, K2: $KeyOf<$ValOf>, S: $ValOf<$ValOf, K2>>( - keyPath: [K, K2], - updater: (value: $ValOf<$ValOf, K2>) => S - ): this & $ReadOnly; - updateIn< - NSV, - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - S: $ValOf<$ValOf<$ValOf, K2>, K3> - >( - keyPath: [K, K2, K3], - notSetValue: NSV, - updater: (value: $ValOf<$ValOf<$ValOf, K2>, K3> | NSV) => S - ): this & $ReadOnly; - updateIn< - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - S: $ValOf<$ValOf<$ValOf, K2>, K3> - >( - keyPath: [K, K2, K3], - updater: (value: $ValOf<$ValOf<$ValOf, K2>, K3>) => S - ): this & $ReadOnly; - updateIn< - NSV, - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> - >( - keyPath: [K, K2, K3, K4], - notSetValue: NSV, - updater: ( - value: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> | NSV - ) => S - ): this & $ReadOnly; - updateIn< - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> - >( - keyPath: [K, K2, K3, K4], - updater: (value: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>) => S - ): this & $ReadOnly; - updateIn< - NSV, - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, - S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> - >( - keyPath: [K, K2, K3, K4, K5], - notSetValue: NSV, - updater: ( - value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> | NSV - ) => S - ): this & $ReadOnly; - updateIn< - K: $Keys, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, - S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> - >( - keyPath: [K, K2, K3, K4, K5], - updater: ( - value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> - ) => S - ): this & $ReadOnly; - - mergeIn( - keyPath: Iterable, - ...collections: Array - ): this & $ReadOnly; - mergeDeepIn( - keyPath: Iterable, - ...collections: Array - ): this & $ReadOnly; - - toSeq(): KeyedSeq<$Keys, any>; - - toJS(): { [key: $Keys]: mixed }; - toJSON(): T; - toObject(): T; - - withMutations(mutator: (mutable: this & T) => mixed): this & $ReadOnly; - asMutable(): this & $ReadOnly; - wasAltered(): boolean; - asImmutable(): this & $ReadOnly; - - @@iterator(): Iterator<[$Keys, $ValOf]>; -} - -declare function fromJS( - jsValue: mixed, - reviver?: ( - key: string | number, - sequence: KeyedCollection | IndexedCollection, - path?: Array - ) => mixed -): Collection; - -declare function is(first: mixed, second: mixed): boolean; -declare function hash(value: mixed): number; - -declare function get>( - collection: C, - key: K, - notSetValue: mixed -): $ValOf; -declare function get, NSV>( - collection: C, - key: K, - notSetValue: NSV -): $ValOf | NSV; - -declare function has(collection: Object, key: mixed): boolean; -declare function remove(collection: C, key: $KeyOf): C; -declare function set, V: $ValOf>( - collection: C, - key: K, - value: V -): C; -declare function update, V: $ValOf, NSV>( - collection: C, - key: K, - notSetValue: NSV, - updater: ($ValOf | NSV) => V -): C; -declare function update, V: $ValOf>( - collection: C, - key: K, - updater: ($ValOf) => V -): C; - -declare function getIn(collection: C, keyPath: [], notSetValue?: mixed): C; -declare function getIn, NSV>( - collection: C, - keyPath: [K], - notSetValue: NSV -): $ValOf | NSV; -declare function getIn, K2: $KeyOf<$ValOf>, NSV>( - collection: C, - keyPath: [K, K2], - notSetValue: NSV -): $ValOf<$ValOf, K2> | NSV; -declare function getIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - NSV ->( - collection: C, - keyPath: [K, K2, K3], - notSetValue: NSV -): $ValOf<$ValOf<$ValOf, K2>, K3> | NSV; -declare function getIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - NSV ->( - collection: C, - keyPath: [K, K2, K3, K4], - notSetValue: NSV -): $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> | NSV; -declare function getIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, - NSV ->( - collection: C, - keyPath: [K, K2, K3, K4, K5], - notSetValue: NSV -): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> | NSV; - -declare function hasIn(collection: Object, keyPath: Iterable): boolean; - -declare function removeIn(collection: C, keyPath: []): void; -declare function removeIn>(collection: C, keyPath: [K]): C; -declare function removeIn, K2: $KeyOf<$ValOf>>( - collection: C, - keyPath: [K, K2] -): C; -declare function removeIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>> ->( - collection: C, - keyPath: [K, K2, K3] -): C; -declare function removeIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>> ->( - collection: C, - keyPath: [K, K2, K3, K4] -): C; -declare function removeIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>> ->( - collection: C, - keyPath: [K, K2, K3, K4, K5] -): C; - -declare function setIn(collection: Object, keyPath: [], value: S): S; -declare function setIn, S: $ValOf>( - collection: C, - keyPath: [K], - value: S -): C; -declare function setIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - S: $ValOf<$ValOf, K2> ->( - collection: C, - keyPath: [K, K2], - value: S -): C; -declare function setIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - S: $ValOf<$ValOf<$ValOf, K2>, K3> ->( - collection: C, - keyPath: [K, K2, K3], - value: S -): C; -declare function setIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> ->( - collection: C, - keyPath: [K, K2, K3, K4], - value: S -): C; -declare function setIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, - S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> ->( - collection: C, - keyPath: [K, K2, K3, K4, K5], - value: S -): C; - -declare function updateIn( - collection: C, - keyPath: [], - notSetValue: mixed, - updater: (value: C) => S -): S; -declare function updateIn( - collection: C, - keyPath: [], - updater: (value: C) => S -): S; -declare function updateIn, S: $ValOf, NSV>( - collection: C, - keyPath: [K], - notSetValue: NSV, - updater: (value: $ValOf | NSV) => S -): C; -declare function updateIn, S: $ValOf>( - collection: C, - keyPath: [K], - updater: (value: $ValOf) => S -): C; -declare function updateIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - S: $ValOf<$ValOf, K2>, - NSV ->( - collection: C, - keyPath: [K, K2], - notSetValue: NSV, - updater: (value: $ValOf<$ValOf, K2> | NSV) => S -): C; -declare function updateIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - S: $ValOf<$ValOf, K2> ->( - collection: C, - keyPath: [K, K2], - updater: (value: $ValOf<$ValOf, K2>) => S -): C; -declare function updateIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - S: $ValOf<$ValOf<$ValOf, K2>, K3>, - NSV ->( - collection: C, - keyPath: [K, K2, K3], - notSetValue: NSV, - updater: (value: $ValOf<$ValOf<$ValOf, K2>, K3> | NSV) => S -): C; -declare function updateIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - S: $ValOf<$ValOf<$ValOf, K2>, K3> ->( - collection: C, - keyPath: [K, K2, K3], - updater: (value: $ValOf<$ValOf<$ValOf, K2>, K3>) => S -): C; -declare function updateIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, - NSV ->( - collection: C, - keyPath: [K, K2, K3, K4], - notSetValue: NSV, - updater: (value: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> | NSV) => S -): C; -declare function updateIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - S: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4> ->( - collection: C, - keyPath: [K, K2, K3, K4], - updater: (value: $ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>) => S -): C; -declare function updateIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, - S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5>, - NSV ->( - collection: C, - keyPath: [K, K2, K3, K4, K5], - notSetValue: NSV, - updater: ( - value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> | NSV - ) => S -): C; -declare function updateIn< - C, - K: $KeyOf, - K2: $KeyOf<$ValOf>, - K3: $KeyOf<$ValOf<$ValOf, K2>>, - K4: $KeyOf<$ValOf<$ValOf<$ValOf, K2>, K3>>, - K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>>, - S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> ->( - collection: C, - keyPath: [K, K2, K3, K4, K5], - updater: ( - value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf, K2>, K3>, K4>, K5> - ) => S -): C; - -declare function merge( - collection: C, - ...collections: Array< - | $IterableOf - | $Shape> - | PlainObjInput<$KeyOf, $ValOf> - > -): C; -declare function mergeWith( - merger: (oldVal: $ValOf, newVal: $ValOf, key: $KeyOf) => $ValOf, - collection: C, - ...collections: Array< - | $IterableOf - | $Shape> - | PlainObjInput<$KeyOf, $ValOf> - > -): C; -declare function mergeDeep( - collection: C, - ...collections: Array< - | $IterableOf - | $Shape> - | PlainObjInput<$KeyOf, $ValOf> - > -): C; -declare function mergeDeepWith( - merger: (oldVal: any, newVal: any, key: any) => mixed, - collection: C, - ...collections: Array< - | $IterableOf - | $Shape> - | PlainObjInput<$KeyOf, $ValOf> - > -): C; - -export { - Collection, - Seq, - List, - Map, - OrderedMap, - OrderedSet, - Range, - Repeat, - Record, - Set, - Stack, - fromJS, - is, - hash, - isImmutable, - isCollection, - isKeyed, - isIndexed, - isAssociative, - isOrdered, - isRecord, - isValueObject, - get, - has, - remove, - set, - update, - getIn, - hasIn, - removeIn, - setIn, - updateIn, - merge, - mergeWith, - mergeDeep, - mergeDeepWith, -}; - -export default { - Collection, - Seq, - - List, - Map, - OrderedMap, - OrderedSet, - PairSorting, - Range, - Repeat, - Record, - Set, - Stack, - - fromJS, - is, - hash, - - isImmutable, - isCollection, - isKeyed, - isIndexed, - isAssociative, - isOrdered, - isRecord, - isValueObject, - - get, - has, - remove, - set, - update, - getIn, - hasIn, - removeIn, - setIn, - updateIn, - merge, - mergeWith, - mergeDeep, - mergeDeepWith, -}; - -export type { - Comparator, - KeyedCollection, - IndexedCollection, - SetCollection, - KeyedSeq, - IndexedSeq, - SetSeq, - RecordFactory, - RecordOf, - RecordInstance, - ValueObject, - $KeyOf, - $ValOf, -}; diff --git a/web/static/node_modules/immutable/dist/immutable.min.js b/web/static/node_modules/immutable/dist/immutable.min.js deleted file mode 100644 index 291efde4..00000000 --- a/web/static/node_modules/immutable/dist/immutable.min.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @license - * MIT License - * - * Copyright (c) 2014-present, Lee Byron and other contributors. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Immutable={})}(this,(function(t){"use strict";var e="delete",r=5,n=1<>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?a(t)+e:e}function f(){return!0}function h(t,e,r){return(0===t&&!v(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function p(t,e){return l(t,e,0)}function _(t,e){return l(t,e,e)}function l(t,e,r){return void 0===t?r:v(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function v(t){return t<0||0===t&&1/t==-1/0}var y="@@__IMMUTABLE_ITERABLE__@@";function d(t){return Boolean(t&&t[y])}var g="@@__IMMUTABLE_KEYED__@@";function w(t){return Boolean(t&&t[g])}var m="@@__IMMUTABLE_INDEXED__@@";function z(t){return Boolean(t&&t[m])}function S(t){return w(t)||z(t)}var b=function(t){return d(t)?t:X(t)},I=function(t){function e(t){return w(t)?t:F(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(b),O=function(t){function e(t){return z(t)?t:G(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(b),E=function(t){function e(t){return d(t)&&!S(t)?t:Z(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(b);b.Keyed=I,b.Indexed=O,b.Set=E;var q="@@__IMMUTABLE_SEQ__@@";function j(t){return Boolean(t&&t[q])}var M="@@__IMMUTABLE_RECORD__@@";function D(t){return Boolean(t&&t[M])}function x(t){return d(t)||D(t)}var A="@@__IMMUTABLE_ORDERED__@@";function k(t){return Boolean(t&&t[A])}var R=0,U=1,T=2,B="function"==typeof Symbol&&Symbol.iterator,K="@@iterator",L=B||K,C=function(t){this.next=t};function P(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function W(){return{value:void 0,done:!0}}function N(t){return!!Array.isArray(t)||!!V(t)}function H(t){return t&&"function"==typeof t.next}function J(t){var e=V(t);return e&&e.call(t)}function V(t){var e=t&&(B&&t[B]||t[K]);if("function"==typeof e)return e}C.prototype.toString=function(){return"[Iterator]"},C.KEYS=R,C.VALUES=U,C.ENTRIES=T,C.prototype.inspect=C.prototype.toSource=function(){return this.toString()},C.prototype[L]=function(){return this};var Y=Object.prototype.hasOwnProperty;function Q(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var X=function(t){function e(t){return null==t?nt():x(t)?t.toSeq():function(t){var e=ut(t);if(e)return(n=V(r=t))&&n===r.entries?e.fromEntrySeq():function(t){var e=V(t);return e&&e===t.keys}(t)?e.toSetSeq():e;var r,n;if("object"==typeof t)return new tt(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[e?n-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,i=0;return new C((function(){if(i===n)return{value:void 0,done:!0};var o=r[e?n-++i:i++];return P(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},e}(b),F=function(t){function e(t){return null==t?nt().toKeyedSeq():d(t)?w(t)?t.toSeq():t.fromEntrySeq():D(t)?t.toSeq():it(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(X),G=function(t){function e(t){return null==t?nt():d(t)?w(t)?t.entrySeq():t.toIndexedSeq():D(t)?t.toSeq().entrySeq():ot(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(X),Z=function(t){function e(t){return(d(t)&&!S(t)?t:G(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(X);X.isSeq=j,X.Keyed=F,X.Set=Z,X.Indexed=G,X.prototype[q]=!0;var $=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[c(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,i=0;i!==n;){var o=e?n-++i:i++;if(!1===t(r[o],o,this))break}return i},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,i=0;return new C((function(){if(i===n)return{value:void 0,done:!0};var o=e?n-++i:i++;return P(t,o,r[o])}))},e}(G),tt=function(t){function e(t){var e=Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return Y.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var u=n[e?i-++o:o++];if(!1===t(r[u],u,this))break}return o},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length,o=0;return new C((function(){if(o===i)return{value:void 0,done:!0};var u=n[e?i-++o:o++];return P(t,u,r[u])}))},e}(F);tt.prototype[A]=!0;var et,rt=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=J(this._collection),n=0;if(H(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,n++,this););return n},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=J(this._collection);if(!H(r))return new C(W);var n=0;return new C((function(){var e=r.next();return e.done?e:P(t,n++,e.value)}))},e}(G);function nt(){return et||(et=new $([]))}function it(t){var e=ut(t);if(e)return e.fromEntrySeq();if("object"==typeof t)return new tt(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function ot(t){var e=ut(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function ut(t){return Q(t)?new $(t):N(t)?new rt(t):void 0}var st="@@__IMMUTABLE_MAP__@@";function at(t){return Boolean(t&&t[st])}function ct(t){return at(t)&&k(t)}function ft(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function ht(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(ft(t)&&ft(e)&&t.equals(e))}var pt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function _t(t){return t>>>1&1073741824|3221225471&t}var lt=Object.prototype.valueOf;function vt(t){if(null==t)return yt(t);if("function"==typeof t.hashCode)return _t(t.hashCode(t));var e,r=(e=t).valueOf!==lt&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==r)return yt(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;t>4294967295;)e^=t/=4294967295;return _t(e)}(r);case"string":return r.length>Et?function(t){var e=Mt[t];void 0===e&&(e=dt(t),jt===qt&&(jt=0,Mt={}),jt++,Mt[t]=e);return e}(r):dt(r);case"object":case"function":return function(t){var e;if(St&&void 0!==(e=zt.get(t)))return e;if(e=t[Ot],void 0!==e)return e;if(!wt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Ot]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=mt(),St)zt.set(t,e);else{if(void 0!==gt&&!1===gt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(wt)Object.defineProperty(t,Ot,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Ot]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Ot]=e}}return e}(r);case"symbol":return function(t){var e=bt[t];if(void 0!==e)return e;return e=mt(),bt[t]=e,e}(r);default:if("function"==typeof r.toString)return dt(r.toString());throw new Error("Value type "+typeof r+" cannot be hashed.")}}function yt(t){return null===t?1108378658:1108378659}function dt(t){for(var e=0,r=0;r=0&&(a.get=function(e,r){return(e=c(this,e))>=0&&eo)return{value:void 0,done:!0};var t=i.next();return n||e===U||t.done?t:P(e,a-1,e===R?void 0:t.value[1],t)}))},a}function Lt(t,e,r,n){var i=Qt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,a=0;return t.__iterate((function(t,o,c){if(!s||!(s=e.call(r,t,o,c)))return a++,i(t,n?o:a-1,u)})),a},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(T,o),a=!0,c=0;return new C((function(){var t,o,f;do{if((t=s.next()).done)return n||i===U?t:P(i,c++,i===R?void 0:t.value[1],t);var h=t.value;o=h[0],f=h[1],a&&(a=e.call(r,f,o,u))}while(a);return i===T?t:P(i,o,f,t)}))},i}function Ct(t,e,r){var n=Qt(t);return n.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var u=0,s=!1;return function t(a,c){a.__iterate((function(o,a){return(!e||c0}function Ht(t,e,r,n){var i=Qt(t),o=new $(r).map((function(t){return t.size}));return i.size=n?o.max():o.min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(U,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map((function(t){return t=b(t),J(i?t.reverse():t)})),u=0,s=!1;return new C((function(){var r;return s||(r=o.map((function(t){return t.next()})),s=n?r.every((function(t){return t.done})):r.some((function(t){return t.done}))),s?{value:void 0,done:!0}:P(t,u++,e.apply(null,r.map((function(t){return t.value}))))}))},i}function Jt(t,e){return t===e?t:j(t)?e:t.constructor(e)}function Vt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Yt(t){return w(t)?I:z(t)?O:E}function Qt(t){return Object.create((w(t)?F:z(t)?G:Z).prototype)}function Xt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):X.prototype.cacheResult.call(this)}function Ft(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t0;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return ze(this,e,t)}function ze(t,e,r){for(var n=[],i=0;i0;)e[r]=arguments[r+1];return Se(this,e,t)}function Ee(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return fe(this,t,He(),(function(t){return be(t,e)}))}function qe(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return fe(this,t,He(),(function(t){return Se(t,e)}))}function je(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Me(){return this.__ownerID?this:this.__ensureOwner(new s)}function De(){return this.__ensureOwner()}function xe(){return this.__altered}var Ae=function(t){function e(e){return null==e?He():at(e)&&!k(e)?e:He().withMutations((function(r){var n=t(e);$t(n.size),n.forEach((function(t,e){return r.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return Je(this,t,e)},e.prototype.remove=function(t){return Je(this,t,o)},e.prototype.deleteAll=function(t){var e=b(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):He()},e.prototype.sort=function(t){return vr(Pt(this,t))},e.prototype.sortBy=function(t,e){return vr(Pt(this,e,t))},e.prototype.map=function(t,e){var r=this;return this.withMutations((function(n){n.forEach((function(i,o){n.set(o,t.call(e,i,o,r))}))}))},e.prototype.__iterator=function(t,e){return new Ce(this,t,e)},e.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ne(this.size,this._root,t,this.__hash):0===this.size?He():(this.__ownerID=t,this.__altered=!1,this)},e}(I);Ae.isMap=at;var ke=Ae.prototype;ke[st]=!0,ke[e]=ke.remove,ke.removeAll=ke.deleteAll,ke.setIn=_e,ke.removeIn=ke.deleteIn=ve,ke.update=de,ke.updateIn=ge,ke.merge=ke.concat=we,ke.mergeWith=me,ke.mergeDeep=Ie,ke.mergeDeepWith=Oe,ke.mergeIn=Ee,ke.mergeDeepIn=qe,ke.withMutations=je,ke.wasAltered=xe,ke.asImmutable=De,ke["@@transducer/init"]=ke.asMutable=Me,ke["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},ke["@@transducer/result"]=function(t){return t.asImmutable()};var Re=function(t,e){this.ownerID=t,this.entries=e};Re.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;o=Ge)return function(t,e,r,n){t||(t=new s);for(var i=new Ke(t,vt(r),[r,n]),o=0;o>>t)&i),s=this.bitmap;return 0==(s&u)?o:this.nodes[Xe(s&u-1)].get(t+r,e,n,o)},Ue.prototype.update=function(t,e,u,s,a,c,f){void 0===u&&(u=vt(s));var h=(0===e?u:u>>>e)&i,p=1<=Ze)return function(t,e,r,i,o){for(var u=0,s=new Array(n),a=0;0!==r;a++,r>>>=1)s[a]=1&r?e[u++]:void 0;return s[i]=o,new Te(t,u+1,s)}(t,y,_,h,g);if(l&&!g&&2===y.length&&Ye(y[1^v]))return y[1^v];if(l&&g&&1===y.length&&Ye(g))return g;var w=t&&t===this.ownerID,m=l?g?_:_^p:_|p,z=l?g?Fe(y,v,g,w):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,u=0;u>>t)&i,s=this.nodes[u];return s?s.get(t+r,e,n,o):o},Te.prototype.update=function(t,e,n,u,s,a,c){void 0===n&&(n=vt(u));var f=(0===e?n:n>>>e)&i,h=s===o,p=this.nodes,_=p[f];if(h&&!_)return this;var l=Ve(_,t,e+r,n,u,s,a,c);if(l===_)return this;var v=this.count;if(_){if(!l&&--v<$e)return function(t,e,r,n){for(var i=0,o=0,u=new Array(r),s=0,a=1,c=e.length;s>>n)&i,c=(0===n?o:o>>>n)&i,f=a===c?[Qe(t,e,n+r,o,u)]:(s=new Ke(e,o,u),a>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Fe(t,e,r,n){var i=n?t:Gt(t);return i[e]=r,i}var Ge=n/4,Ze=n/2,$e=n/4,tr="@@__IMMUTABLE_LIST__@@";function er(t){return Boolean(t&&t[tr])}var rr=function(t){function e(e){var i=ar();if(null==e)return i;if(er(e))return e;var o=t(e),u=o.size;return 0===u?i:($t(u),u>0&&u=0&&t=t.size||e<0)return t.withMutations((function(t){e<0?pr(t,e).set(0,r):pr(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,i=t._root,o={value:!1};e>=_r(t._capacity)?n=cr(n,t.__ownerID,0,e,r,o):i=cr(i,t.__ownerID,t._level,e,r,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return sr(t._origin,t._capacity,t._level,i,n)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=r,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):ar()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){pr(r,0,e+t.length);for(var n=0;n>>e&i;if(o>=this.array.length)return new ir([],t);var u,s=0===o;if(e>0){var a=this.array[o];if((u=a&&a.removeBefore(t,e-r,n))===a&&s)return this}if(s&&!u)return this;var c=fr(this,t);if(!s)for(var f=0;f>>e&i;if(s>=this.array.length)return this;if(e>0){var a=this.array[s];if((u=a&&a.removeAfter(t,e-r,o))===a&&s===this.array.length-1)return this}var c=fr(this,t);return c.array.splice(s+1),u&&(c.array[s]=u),c};var or={};function ur(t,e){var i=t._origin,o=t._capacity,u=_r(o),s=t._tail;return a(t._root,t._level,0);function a(t,c,f){return 0===c?function(t,r){var a=r===u?s&&s.array:t&&t.array,c=r>i?0:i-r,f=o-r;f>n&&(f=n);return function(){if(c===f)return or;var t=e?--f:c++;return a&&a[t]}}(t,f):function(t,u,s){var c,f=t&&t.array,h=s>i?0:i-s>>u,p=1+(o-s>>u);p>n&&(p=n);return function(){for(;;){if(c){var t=c();if(t!==or)return t;c=null}if(h===p)return or;var n=e?--p:h++;c=a(f&&f[n],u-r,s+(n<>>n&i,h=t&&f0){var p=t&&t.array[f],_=cr(p,e,n-r,o,s,a);return _===p?t:((c=fr(t,e)).array[f]=_,c)}return h&&t.array[f]===s?t:(a&&u(a),c=fr(t,e),void 0===s&&f===c.array.length-1?c.array.pop():c.array[f]=s,c)}function fr(t,e){return e&&t&&e===t.ownerID?t:new ir(t?t.array.slice():[],e)}function hr(t,e){if(e>=_r(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>o&i],o-=r;return n}}function pr(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var o=t.__ownerID||new s,u=t._origin,a=t._capacity,c=u+e,f=void 0===n?a:n<0?a+n:u+n;if(c===u&&f===a)return t;if(c>=f)return t.clear();for(var h=t._level,p=t._root,_=0;c+_<0;)p=new ir(p&&p.array.length?[void 0,p]:[],o),_+=1<<(h+=r);_&&(c+=_,u+=_,f+=_,a+=_);for(var l=_r(a),v=_r(f);v>=1<l?new ir([],o):y;if(y&&v>l&&cr;w-=r){var m=l>>>w&i;g=g.array[m]=fr(g.array[m],o)}g.array[l>>>r&i]=y}if(f=v)c-=v,f-=v,h=r,p=null,d=d&&d.removeBefore(o,0,c);else if(c>u||v>>h&i;if(z!==v>>>h&i)break;z&&(_+=(1<u&&(p=p.removeBefore(o,h,c-_)),p&&v>>r<=n&&a.size>=2*s.size?(i=(u=a.filter((function(t,e){return void 0!==t&&c!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(i.__ownerID=u.__ownerID=t.__ownerID)):(i=s.remove(e),u=c===a.size-1?a.pop():a.set(c,void 0))}else if(f){if(r===a.get(c)[1])return t;i=s,u=a.set(c,[e,r])}else i=s.set(e,a.size),u=a.set(a.size,[e,r]);return t.__ownerID?(t.size=i.size,t._map=i,t._list=u,t.__hash=void 0,t.__altered=!0,t):yr(i,u)}vr.isOrderedMap=ct,vr.prototype[A]=!0,vr.prototype[e]=vr.prototype.remove;var wr="@@__IMMUTABLE_STACK__@@";function mr(t){return Boolean(t&&t[wr])}var zr=function(t){function e(t){return null==t?Or():mr(t)?t:Or().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var r=this._head;for(t=c(this,t);r&&t--;)r=r.next;return r?r.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Ir(e,r)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&mr(e))return e;$t(e.size);var r=this.size,n=this._head;return e.__iterate((function(t){r++,n={value:t,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):Ir(r,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Or()},e.prototype.slice=function(e,r){if(h(e,r,this.size))return this;var n=p(e,this.size);if(_(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Ir(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ir(this.size,this._head,t,this.__hash):0===this.size?Or():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var r=this;if(e)return new $(this.toArray()).__iterate((function(e,n){return t(e,n,r)}),e);for(var n=0,i=this._head;i&&!1!==t(i.value,n++,this);)i=i.next;return n},e.prototype.__iterator=function(t,e){if(e)return new $(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new C((function(){if(n){var e=n.value;return n=n.next,P(t,r++,e)}return{value:void 0,done:!0}}))},e}(O);zr.isStack=mr;var Sr,br=zr.prototype;function Ir(t,e,r,n){var i=Object.create(br);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Or(){return Sr||(Sr=Ir(0))}br[wr]=!0,br.shift=br.pop,br.unshift=br.push,br.unshiftAll=br.pushAll,br.withMutations=je,br.wasAltered=xe,br.asImmutable=De,br["@@transducer/init"]=br.asMutable=Me,br["@@transducer/step"]=function(t,e){return t.unshift(e)},br["@@transducer/result"]=function(t){return t.asImmutable()};var Er="@@__IMMUTABLE_SET__@@";function qr(t){return Boolean(t&&t[Er])}function jr(t){return qr(t)&&k(t)}function Mr(t,e){if(t===e)return!0;if(!d(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||w(t)!==w(e)||z(t)!==z(e)||k(t)!==k(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!S(t);if(k(t)){var n=t.entries();return e.every((function(t,e){var i=n.next().value;return i&&ht(i[1],t)&&(r||ht(i[0],e))}))&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var u=t;t=e,e=u}var s=!0,a=e.__iterate((function(e,n){if(r?!t.has(e):i?!ht(e,t.get(n,o)):!ht(t.get(n,o),e))return s=!1,!1}));return s&&t.size===a}function Dr(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function xr(t){if(!t||"object"!=typeof t)return t;if(!d(t)){if(!ne(t))return t;t=X(t)}if(w(t)){var e={};return t.__iterate((function(t,r){e[r]=xr(t)})),e}var r=[];return t.__iterate((function(t){r.push(xr(t))})),r}var Ar=function(t){function e(e){return null==e?Br():qr(e)&&!k(e)?e:Br().withMutations((function(r){var n=t(e);$t(n.size),n.forEach((function(t){return r.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(I(t).keySeq())},e.intersect=function(t){return(t=b(t).toArray()).length?Rr.intersect.apply(e(t.pop()),t):Br()},e.union=function(t){return(t=b(t).toArray()).length?Rr.union.apply(e(t.pop()),t):Br()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Ur(this,this._map.set(t,t))},e.prototype.remove=function(t){return Ur(this,this._map.remove(t))},e.prototype.clear=function(){return Ur(this,this._map.clear())},e.prototype.map=function(t,e){var r=this,n=!1,i=Ur(this,this._map.mapEntries((function(i){var o=i[1],u=t.call(e,o,o,r);return u!==o&&(n=!0),[u,u]}),e));return n?i:this},e.prototype.union=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(r){for(var n=0;n=0&&e=0&&r>>-15,461845907),e=pt(e<<13|e>>>-13,5),e=pt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=_t((e=pt(e^e>>>13,3266489909))^e>>>16)}(t.size,n)}(this))}});var Hr=b.prototype;Hr[y]=!0,Hr[L]=Hr.values,Hr.toJSON=Hr.toArray,Hr.__toStringMapper=ie,Hr.inspect=Hr.toSource=function(){return this.toString()},Hr.chain=Hr.flatMap,Hr.contains=Hr.includes,Dr(I,{flip:function(){return Jt(this,Rt(this))},mapEntries:function(t,e){var r=this,n=0;return Jt(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Jt(this,this.toSeq().flip().map((function(n,i){return t.call(e,n,i,r)})).flip())}});var Jr=I.prototype;Jr[g]=!0,Jr[L]=Hr.entries,Jr.toJSON=Nr,Jr.__toStringMapper=function(t,e){return ie(e)+": "+ie(t)},Dr(O,{toKeyedSeq:function(){return new Dt(this,!1)},filter:function(t,e){return Jt(this,Bt(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Jt(this,Tt(this,!1))},slice:function(t,e){return Jt(this,Kt(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=p(t,t<0?this.count():this.size);var n=this.slice(0,t);return Jt(this,1===r?n:n.concat(Gt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Jt(this,Ct(this,t,!1))},get:function(t,e){return(t=c(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=c(this,t))>=0&&(void 0!==this.size?this.size===1/0||te?-1:0}function en(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Yr.has=Hr.includes,Yr.contains=Yr.includes,Yr.keys=Yr.values,Dr(F,Jr),Dr(G,Vr),Dr(Z,Yr);var rn=function(t){function e(t){return null==t?sn():jr(t)?t:sn().withMutations((function(e){var r=E(t);$t(r.size),r.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(I(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Ar);rn.isOrderedSet=jr;var nn,on=rn.prototype;function un(t,e){var r=Object.create(on);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function sn(){return nn||(nn=un(dr()))}on[A]=!0,on.zip=Vr.zip,on.zipWith=Vr.zipWith,on.zipAll=Vr.zipAll,on.__empty=sn,on.__make=un;var an=function(t,e){var r;!function(t){if(D(t))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(x(t))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===t||"object"!=typeof t)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(t);var n=function(o){var u=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(t),a=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var c=0;c2?[]:void 0,{"":t})},t.get=ue,t.getIn=Cr,t.has=oe,t.hasIn=Wr,t.hash=vt,t.is=ht,t.isAssociative=S,t.isCollection=d,t.isImmutable=x,t.isIndexed=z,t.isKeyed=w,t.isList=er,t.isMap=at,t.isOrdered=k,t.isOrderedMap=ct,t.isOrderedSet=jr,t.isPlainObject=re,t.isRecord=D,t.isSeq=j,t.isSet=qr,t.isStack=mr,t.isValueObject=ft,t.merge=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return be(t,e)},t.mergeDeep=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Se(t,e)},t.mergeDeepWith=function(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Se(e,r,t)},t.mergeWith=function(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return be(e,r,t)},t.remove=ae,t.removeIn=le,t.set=ce,t.setIn=pe,t.update=ye,t.updateIn=fe,t.version="5.0.3"})); diff --git a/web/static/node_modules/immutable/package.json b/web/static/node_modules/immutable/package.json deleted file mode 100644 index 0eda1b7f..00000000 --- a/web/static/node_modules/immutable/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "immutable", - "version": "5.0.3", - "description": "Immutable Data Collections", - "license": "MIT", - "homepage": "https://immutable-js.com", - "author": { - "name": "Lee Byron", - "url": "https://github.com/leebyron" - }, - "repository": { - "type": "git", - "url": "git://github.com/immutable-js/immutable-js.git" - }, - "bugs": { - "url": "https://github.com/immutable-js/immutable-js/issues" - }, - "main": "dist/immutable.js", - "module": "dist/immutable.es.js", - "types": "dist/immutable.d.ts", - "files": [ - "dist", - "README.md", - "LICENSE" - ], - "keywords": [ - "immutable", - "persistent", - "lazy", - "data", - "datastructure", - "functional", - "collection", - "stateless", - "sequence", - "iteration" - ] -} \ No newline at end of file diff --git a/web/static/node_modules/is-extglob/LICENSE b/web/static/node_modules/is-extglob/LICENSE deleted file mode 100644 index 842218cf..00000000 --- a/web/static/node_modules/is-extglob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/web/static/node_modules/is-extglob/README.md b/web/static/node_modules/is-extglob/README.md deleted file mode 100644 index 0416af5c..00000000 --- a/web/static/node_modules/is-extglob/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob) - -> Returns true if a string has an extglob. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-extglob -``` - -## Usage - -```js -var isExtglob = require('is-extglob'); -``` - -**True** - -```js -isExtglob('?(abc)'); -isExtglob('@(abc)'); -isExtglob('!(abc)'); -isExtglob('*(abc)'); -isExtglob('+(abc)'); -``` - -**False** - -Escaped extglobs: - -```js -isExtglob('\\?(abc)'); -isExtglob('\\@(abc)'); -isExtglob('\\!(abc)'); -isExtglob('\\*(abc)'); -isExtglob('\\+(abc)'); -``` - -Everything else... - -```js -isExtglob('foo.js'); -isExtglob('!foo.js'); -isExtglob('*.js'); -isExtglob('**/abc.js'); -isExtglob('abc/*.js'); -isExtglob('abc/(aaa|bbb).js'); -isExtglob('abc/[a-z].js'); -isExtglob('abc/{a,b}.js'); -isExtglob('abc/?.js'); -isExtglob('abc.js'); -isExtglob('abc/def/ghi.js'); -``` - -## History - -**v2.0** - -Adds support for escaping. Escaped exglobs no longer return true. - -## About - -### Related projects - -* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/web/static/node_modules/is-extglob/index.js b/web/static/node_modules/is-extglob/index.js deleted file mode 100644 index c1d986fc..00000000 --- a/web/static/node_modules/is-extglob/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -module.exports = function isExtglob(str) { - if (typeof str !== 'string' || str === '') { - return false; - } - - var match; - while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { - if (match[2]) return true; - str = str.slice(match.index + match[0].length); - } - - return false; -}; diff --git a/web/static/node_modules/is-extglob/package.json b/web/static/node_modules/is-extglob/package.json deleted file mode 100644 index 7a908369..00000000 --- a/web/static/node_modules/is-extglob/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "is-extglob", - "description": "Returns true if a string has an extglob.", - "version": "2.1.1", - "homepage": "https://github.com/jonschlinkert/is-extglob", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "repository": "jonschlinkert/is-extglob", - "bugs": { - "url": "https://github.com/jonschlinkert/is-extglob/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "gulp-format-md": "^0.1.10", - "mocha": "^3.0.2" - }, - "keywords": [ - "bash", - "braces", - "check", - "exec", - "expression", - "extglob", - "glob", - "globbing", - "globstar", - "is", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "has-glob", - "is-glob", - "micromatch" - ] - }, - "reflinks": [ - "verb", - "verb-generate-readme" - ], - "lint": { - "reflinks": true - } - } -} diff --git a/web/static/node_modules/is-glob/LICENSE b/web/static/node_modules/is-glob/LICENSE deleted file mode 100644 index 3f2eca18..00000000 --- a/web/static/node_modules/is-glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/web/static/node_modules/is-glob/README.md b/web/static/node_modules/is-glob/README.md deleted file mode 100644 index 740724b2..00000000 --- a/web/static/node_modules/is-glob/README.md +++ /dev/null @@ -1,206 +0,0 @@ -# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/github/workflow/status/micromatch/is-glob/dev)](https://github.com/micromatch/is-glob/actions) - -> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-glob -``` - -You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). - -## Usage - -```js -var isGlob = require('is-glob'); -``` - -### Default behavior - -**True** - -Patterns that have glob characters or regex patterns will return `true`: - -```js -isGlob('!foo.js'); -isGlob('*.js'); -isGlob('**/abc.js'); -isGlob('abc/*.js'); -isGlob('abc/(aaa|bbb).js'); -isGlob('abc/[a-z].js'); -isGlob('abc/{a,b}.js'); -//=> true -``` - -Extglobs - -```js -isGlob('abc/@(a).js'); -isGlob('abc/!(a).js'); -isGlob('abc/+(a).js'); -isGlob('abc/*(a).js'); -isGlob('abc/?(a).js'); -//=> true -``` - -**False** - -Escaped globs or extglobs return `false`: - -```js -isGlob('abc/\\@(a).js'); -isGlob('abc/\\!(a).js'); -isGlob('abc/\\+(a).js'); -isGlob('abc/\\*(a).js'); -isGlob('abc/\\?(a).js'); -isGlob('\\!foo.js'); -isGlob('\\*.js'); -isGlob('\\*\\*/abc.js'); -isGlob('abc/\\*.js'); -isGlob('abc/\\(aaa|bbb).js'); -isGlob('abc/\\[a-z].js'); -isGlob('abc/\\{a,b}.js'); -//=> false -``` - -Patterns that do not have glob patterns return `false`: - -```js -isGlob('abc.js'); -isGlob('abc/def/ghi.js'); -isGlob('foo.js'); -isGlob('abc/@.js'); -isGlob('abc/+.js'); -isGlob('abc/?.js'); -isGlob(); -isGlob(null); -//=> false -``` - -Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): - -```js -isGlob(['**/*.js']); -isGlob(['foo.js']); -//=> false -``` - -### Option strict - -When `options.strict === false` the behavior is less strict in determining if a pattern is a glob. Meaning that -some patterns that would return `false` may return `true`. This is done so that matching libraries like [micromatch](https://github.com/micromatch/micromatch) have a chance at determining if the pattern is a glob or not. - -**True** - -Patterns that have glob characters or regex patterns will return `true`: - -```js -isGlob('!foo.js', {strict: false}); -isGlob('*.js', {strict: false}); -isGlob('**/abc.js', {strict: false}); -isGlob('abc/*.js', {strict: false}); -isGlob('abc/(aaa|bbb).js', {strict: false}); -isGlob('abc/[a-z].js', {strict: false}); -isGlob('abc/{a,b}.js', {strict: false}); -//=> true -``` - -Extglobs - -```js -isGlob('abc/@(a).js', {strict: false}); -isGlob('abc/!(a).js', {strict: false}); -isGlob('abc/+(a).js', {strict: false}); -isGlob('abc/*(a).js', {strict: false}); -isGlob('abc/?(a).js', {strict: false}); -//=> true -``` - -**False** - -Escaped globs or extglobs return `false`: - -```js -isGlob('\\!foo.js', {strict: false}); -isGlob('\\*.js', {strict: false}); -isGlob('\\*\\*/abc.js', {strict: false}); -isGlob('abc/\\*.js', {strict: false}); -isGlob('abc/\\(aaa|bbb).js', {strict: false}); -isGlob('abc/\\[a-z].js', {strict: false}); -isGlob('abc/\\{a,b}.js', {strict: false}); -//=> false -``` - -## About - -

    -Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
    - -
    -Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
    - -
    -Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
    - -### Related projects - -You might also be interested in these projects: - -* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") -* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks") -* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") -* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 47 | [jonschlinkert](https://github.com/jonschlinkert) | -| 5 | [doowb](https://github.com/doowb) | -| 1 | [phated](https://github.com/phated) | -| 1 | [danhper](https://github.com/danhper) | -| 1 | [paulmillr](https://github.com/paulmillr) | - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -### License - -Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 27, 2019._ \ No newline at end of file diff --git a/web/static/node_modules/is-glob/index.js b/web/static/node_modules/is-glob/index.js deleted file mode 100644 index 620f563e..00000000 --- a/web/static/node_modules/is-glob/index.js +++ /dev/null @@ -1,150 +0,0 @@ -/*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -var isExtglob = require('is-extglob'); -var chars = { '{': '}', '(': ')', '[': ']'}; -var strictCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str.length) { - if (str[index] === '*') { - return true; - } - - if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { - return true; - } - - if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { - if (closeSquareIndex < index) { - closeSquareIndex = str.indexOf(']', index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - - if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { - closeCurlyIndex = str.indexOf('}', index); - if (closeCurlyIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - - if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { - closeParenIndex = str.indexOf(')', index); - if (closeParenIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - - if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { - if (pipeIndex < index) { - pipeIndex = str.indexOf('|', index); - } - if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { - closeParenIndex = str.indexOf(')', pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str.indexOf('\\', pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -var relaxedCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - while (index < str.length) { - if (/[*?{}()[\]]/.test(str[index])) { - return true; - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -module.exports = function isGlob(str, options) { - if (typeof str !== 'string' || str === '') { - return false; - } - - if (isExtglob(str)) { - return true; - } - - var check = strictCheck; - - // optionally relax check - if (options && options.strict === false) { - check = relaxedCheck; - } - - return check(str); -}; diff --git a/web/static/node_modules/is-glob/package.json b/web/static/node_modules/is-glob/package.json deleted file mode 100644 index 858af037..00000000 --- a/web/static/node_modules/is-glob/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "is-glob", - "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", - "version": "4.0.3", - "homepage": "https://github.com/micromatch/is-glob", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Brian Woodward (https://twitter.com/doowb)", - "Daniel Perez (https://tuvistavie.com)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)" - ], - "repository": "micromatch/is-glob", - "bugs": { - "url": "https://github.com/micromatch/is-glob/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha && node benchmark.js" - }, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "devDependencies": { - "gulp-format-md": "^0.1.10", - "mocha": "^3.0.2" - }, - "keywords": [ - "bash", - "braces", - "check", - "exec", - "expression", - "extglob", - "glob", - "globbing", - "globstar", - "is", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "verb": { - "layout": "default", - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "assemble", - "base", - "update", - "verb" - ] - }, - "reflinks": [ - "assemble", - "bach", - "base", - "composer", - "gulp", - "has-glob", - "is-valid-glob", - "micromatch", - "npm", - "scaffold", - "verb", - "vinyl" - ] - } -} diff --git a/web/static/node_modules/is-number/LICENSE b/web/static/node_modules/is-number/LICENSE deleted file mode 100644 index 9af4a67d..00000000 --- a/web/static/node_modules/is-number/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-present, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/web/static/node_modules/is-number/README.md b/web/static/node_modules/is-number/README.md deleted file mode 100644 index eb8149e8..00000000 --- a/web/static/node_modules/is-number/README.md +++ /dev/null @@ -1,187 +0,0 @@ -# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number) - -> Returns true if the value is a finite number. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-number -``` - -## Why is this needed? - -In JavaScript, it's not always as straightforward as it should be to reliably check if a value is a number. It's common for devs to use `+`, `-`, or `Number()` to cast a string value to a number (for example, when values are returned from user input, regex matches, parsers, etc). But there are many non-intuitive edge cases that yield unexpected results: - -```js -console.log(+[]); //=> 0 -console.log(+''); //=> 0 -console.log(+' '); //=> 0 -console.log(typeof NaN); //=> 'number' -``` - -This library offers a performant way to smooth out edge cases like these. - -## Usage - -```js -const isNumber = require('is-number'); -``` - -See the [tests](./test.js) for more examples. - -### true - -```js -isNumber(5e3); // true -isNumber(0xff); // true -isNumber(-1.1); // true -isNumber(0); // true -isNumber(1); // true -isNumber(1.1); // true -isNumber(10); // true -isNumber(10.10); // true -isNumber(100); // true -isNumber('-1.1'); // true -isNumber('0'); // true -isNumber('012'); // true -isNumber('0xff'); // true -isNumber('1'); // true -isNumber('1.1'); // true -isNumber('10'); // true -isNumber('10.10'); // true -isNumber('100'); // true -isNumber('5e3'); // true -isNumber(parseInt('012')); // true -isNumber(parseFloat('012')); // true -``` - -### False - -Everything else is false, as you would expect: - -```js -isNumber(Infinity); // false -isNumber(NaN); // false -isNumber(null); // false -isNumber(undefined); // false -isNumber(''); // false -isNumber(' '); // false -isNumber('foo'); // false -isNumber([1]); // false -isNumber([]); // false -isNumber(function () {}); // false -isNumber({}); // false -``` - -## Release history - -### 7.0.0 - -* Refactor. Now uses `.isFinite` if it exists. -* Performance is about the same as v6.0 when the value is a string or number. But it's now 3x-4x faster when the value is not a string or number. - -### 6.0.0 - -* Optimizations, thanks to @benaadams. - -### 5.0.0 - -**Breaking changes** - -* removed support for `instanceof Number` and `instanceof String` - -## Benchmarks - -As with all benchmarks, take these with a grain of salt. See the [benchmarks](./benchmark/index.js) for more detail. - -``` -# all -v7.0 x 413,222 ops/sec ±2.02% (86 runs sampled) -v6.0 x 111,061 ops/sec ±1.29% (85 runs sampled) -parseFloat x 317,596 ops/sec ±1.36% (86 runs sampled) -fastest is 'v7.0' - -# string -v7.0 x 3,054,496 ops/sec ±1.05% (89 runs sampled) -v6.0 x 2,957,781 ops/sec ±0.98% (88 runs sampled) -parseFloat x 3,071,060 ops/sec ±1.13% (88 runs sampled) -fastest is 'parseFloat,v7.0' - -# number -v7.0 x 3,146,895 ops/sec ±0.89% (89 runs sampled) -v6.0 x 3,214,038 ops/sec ±1.07% (89 runs sampled) -parseFloat x 3,077,588 ops/sec ±1.07% (87 runs sampled) -fastest is 'v6.0' -``` - -## About - -
    -Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
    - -
    -Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
    - -
    -Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
    - -### Related projects - -You might also be interested in these projects: - -* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") -* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") -* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") -* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 49 | [jonschlinkert](https://github.com/jonschlinkert) | -| 5 | [charlike-old](https://github.com/charlike-old) | -| 1 | [benaadams](https://github.com/benaadams) | -| 1 | [realityking](https://github.com/realityking) | - -### Author - -**Jon Schlinkert** - -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 15, 2018._ \ No newline at end of file diff --git a/web/static/node_modules/is-number/index.js b/web/static/node_modules/is-number/index.js deleted file mode 100644 index 27f19b75..00000000 --- a/web/static/node_modules/is-number/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -module.exports = function(num) { - if (typeof num === 'number') { - return num - num === 0; - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; -}; diff --git a/web/static/node_modules/is-number/package.json b/web/static/node_modules/is-number/package.json deleted file mode 100644 index 37150726..00000000 --- a/web/static/node_modules/is-number/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "is-number", - "description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.", - "version": "7.0.0", - "homepage": "https://github.com/jonschlinkert/is-number", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Olsten Larck (https://i.am.charlike.online)", - "Rouven Weßling (www.rouvenwessling.de)" - ], - "repository": "jonschlinkert/is-number", - "bugs": { - "url": "https://github.com/jonschlinkert/is-number/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.12.0" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "ansi": "^0.3.1", - "benchmark": "^2.1.4", - "gulp-format-md": "^1.0.0", - "mocha": "^3.5.3" - }, - "keywords": [ - "cast", - "check", - "coerce", - "coercion", - "finite", - "integer", - "is", - "isnan", - "is-nan", - "is-num", - "is-number", - "isnumber", - "isfinite", - "istype", - "kind", - "math", - "nan", - "num", - "number", - "numeric", - "parseFloat", - "parseInt", - "test", - "type", - "typeof", - "value" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "related": { - "list": [ - "is-plain-object", - "is-primitive", - "isobject", - "kind-of" - ] - }, - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - } -} diff --git a/web/static/node_modules/jest-worker/LICENSE b/web/static/node_modules/jest-worker/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/web/static/node_modules/jest-worker/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/jest-worker/README.md b/web/static/node_modules/jest-worker/README.md deleted file mode 100644 index 0727a04b..00000000 --- a/web/static/node_modules/jest-worker/README.md +++ /dev/null @@ -1,247 +0,0 @@ -# jest-worker - -Module for executing heavy tasks under forked processes in parallel, by providing a `Promise` based interface, minimum overhead, and bound workers. - -The module works by providing an absolute path of the module to be loaded in all forked processes. Files relative to a node module are also accepted. All methods are exposed on the parent process as promises, so they can be `await`'ed. Child (worker) methods can either be synchronous or asynchronous. - -The module also implements support for bound workers. Binding a worker means that, based on certain parameters, the same task will always be executed by the same worker. The way bound workers work is by using the returned string of the `computeWorkerKey` method. If the string was used before for a task, the call will be queued to the related worker that processed the task earlier; if not, it will be executed by the first available worker, then sticked to the worker that executed it; so the next time it will be processed by the same worker. If you have no preference on the worker executing the task, but you have defined a `computeWorkerKey` method because you want _some_ of the tasks to be sticked, you can return `null` from it. - -The list of exposed methods can be explicitly provided via the `exposedMethods` option. If it is not provided, it will be obtained by requiring the child module into the main process, and analyzed via reflection. Check the "minimal example" section for a valid one. - -## Install - -```sh -$ yarn add jest-worker -``` - -## Example - -This example covers the minimal usage: - -### File `parent.js` - -```javascript -import {Worker as JestWorker} from 'jest-worker'; - -async function main() { - const worker = new JestWorker(require.resolve('./Worker')); - const result = await worker.hello('Alice'); // "Hello, Alice" -} - -main(); -``` - -### File `worker.js` - -```javascript -export function hello(param) { - return 'Hello, ' + param; -} -``` - -## Experimental worker - -Node 10 shipped with [worker-threads](https://nodejs.org/api/worker_threads.html), a "threading API" that uses SharedArrayBuffers to communicate between the main process and its child threads. This experimental Node feature can significantly improve the communication time between parent and child processes in `jest-worker`. - -Since `worker_threads` are considered experimental in Node, you have to opt-in to this behavior by passing `enableWorkerThreads: true` when instantiating the worker. While the feature was unflagged in Node 11.7.0, you'll need to run the Node process with the `--experimental-worker` flag for Node 10. - -## API - -The `Worker` export is a constructor that is initialized by passing the worker path, plus an options object. - -### `workerPath: string` (required) - -Node module name or absolute path of the file to be loaded in the child processes. Use `require.resolve` to transform a relative path into an absolute one. - -### `options: Object` (optional) - -#### `exposedMethods: $ReadOnlyArray` (optional) - -List of method names that can be called on the child processes from the parent process. You cannot expose any method named like a public `Worker` method, or starting with `_`. If you use method auto-discovery, then these methods will not be exposed, even if they exist. - -#### `numWorkers: number` (optional) - -Amount of workers to spawn. Defaults to the number of CPUs minus 1. - -#### `maxRetries: number` (optional) - -Maximum amount of times that a dead child can be re-spawned, per call. Defaults to `3`, pass `Infinity` to allow endless retries. - -#### `forkOptions: Object` (optional) - -Allow customizing all options passed to `childProcess.fork`. By default, some values are set (`cwd`, `env` and `execArgv`), but you can override them and customize the rest. For a list of valid values, check [the Node documentation](https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options). - -#### `computeWorkerKey: (method: string, ...args: Array) => ?string` (optional) - -Every time a method exposed via the API is called, `computeWorkerKey` is also called in order to bound the call to a worker. This is useful for workers that are able to cache the result or part of it. You bound calls to a worker by making `computeWorkerKey` return the same identifier for all different calls. If you do not want to bind the call to any worker, return `null`. - -The callback you provide is called with the method name, plus all the rest of the arguments of the call. Thus, you have full control to decide what to return. Check a practical example on bound workers under the "bound worker usage" section. - -By default, no process is bound to any worker. - -#### `setupArgs: Array` (optional) - -The arguments that will be passed to the `setup` method during initialization. - -#### `WorkerPool: (workerPath: string, options?: WorkerPoolOptions) => WorkerPoolInterface` (optional) - -Provide a custom worker pool to be used for spawning child processes. By default, Jest will use a node thread pool if available and fall back to child process threads. - -#### `enableWorkerThreads: boolean` (optional) - -`jest-worker` will automatically detect if `worker_threads` are available, but will not use them unless passed `enableWorkerThreads: true`. - -### `workerSchedulingPolicy: 'round-robin' | 'in-order'` (optional) - -Specifies the policy how tasks are assigned to workers if multiple workers are _idle_: - -- `round-robin` (default): The task will be sequentially distributed onto the workers. The first task is assigned to the worker 1, the second to the worker 2, to ensure that the work is distributed across workers. -- `in-order`: The task will be assigned to the first free worker starting with worker 1 and only assign the work to worker 2 if the worker 1 is busy. - -Tasks are always assigned to the first free worker as soon as tasks start to queue up. The scheduling policy does not define the task scheduling which is always first-in, first-out. - -### `taskQueue`: TaskQueue` (optional) - -The task queue defines in which order tasks (method calls) are processed by the workers. `jest-worker` ships with a `FifoQueue` and `PriorityQueue`: - -- `FifoQueue` (default): Processes the method calls (tasks) in the call order. -- `PriorityQueue`: Processes the method calls by a computed priority in natural ordering (lower priorities first). Tasks with the same priority are processed in any order (FIFO not guaranteed). The constructor accepts a single argument, the function that is passed the name of the called function and the arguments and returns a numerical value for the priority: `new require('jest-worker').PriorityQueue((method, filename) => filename.length)`. - -## JestWorker - -### Methods - -The returned `JestWorker` instance has all the exposed methods, plus some additional ones to interact with the workers itself: - -#### `getStdout(): Readable` - -Returns a `ReadableStream` where the standard output of all workers is piped. Note that the `silent` option of the child workers must be set to `true` to make it work. This is the default set by `jest-worker`, but keep it in mind when overriding options through `forkOptions`. - -#### `getStderr(): Readable` - -Returns a `ReadableStream` where the standard error of all workers is piped. Note that the `silent` option of the child workers must be set to `true` to make it work. This is the default set by `jest-worker`, but keep it in mind when overriding options through `forkOptions`. - -#### `end()` - -Finishes the workers by killing all workers. No further calls can be done to the `Worker` instance. - -Returns a Promise that resolves with `{ forceExited: boolean }` once all workers are dead. If `forceExited` is `true`, at least one of the workers did not exit gracefully, which likely happened because it executed a leaky task that left handles open. This should be avoided, force exiting workers is a last resort to prevent creating lots of orphans. - -**Note:** - -`await`ing the `end()` Promise immediately after the workers are no longer needed before proceeding to do other useful things in your program may not be a good idea. If workers have to be force exited, `jest-worker` may go through multiple stages of force exiting (e.g. SIGTERM, later SIGKILL) and give the worker overall around 1 second time to exit on its own. During this time, your program will wait, even though it may not be necessary that all workers are dead before continuing execution. - -Consider deliberately leaving this Promise floating (unhandled resolution). After your program has done the rest of its work and is about to exit, the Node process will wait for the Promise to resolve after all workers are dead as the last event loop task. That way you parallelized computation time of your program and waiting time and you didn't delay the outputs of your program unnecessarily. - -### Worker IDs - -Each worker has a unique id (index that starts with `1`), which is available inside the worker as `process.env.JEST_WORKER_ID`. - -## Setting up and tearing down the child process - -The child process can define two special methods (both of them can be asynchronous): - -- `setup()`: If defined, it's executed before the first call to any method in the child. -- `teardown()`: If defined, it's executed when the farm ends. - -# More examples - -## Standard usage - -This example covers the standard usage: - -### File `parent.js` - -```javascript -import {Worker as JestWorker} from 'jest-worker'; - -async function main() { - const myWorker = new JestWorker(require.resolve('./Worker'), { - exposedMethods: ['foo', 'bar', 'getWorkerId'], - numWorkers: 4, - }); - - console.log(await myWorker.foo('Alice')); // "Hello from foo: Alice" - console.log(await myWorker.bar('Bob')); // "Hello from bar: Bob" - console.log(await myWorker.getWorkerId()); // "3" -> this message has sent from the 3rd worker - - const {forceExited} = await myWorker.end(); - if (forceExited) { - console.error('Workers failed to exit gracefully'); - } -} - -main(); -``` - -### File `worker.js` - -```javascript -export function foo(param) { - return 'Hello from foo: ' + param; -} - -export function bar(param) { - return 'Hello from bar: ' + param; -} - -export function getWorkerId() { - return process.env.JEST_WORKER_ID; -} -``` - -## Bound worker usage: - -This example covers the usage with a `computeWorkerKey` method: - -### File `parent.js` - -```javascript -import {Worker as JestWorker} from 'jest-worker'; - -async function main() { - const myWorker = new JestWorker(require.resolve('./Worker'), { - computeWorkerKey: (method, filename) => filename, - }); - - // Transform the given file, within the first available worker. - console.log(await myWorker.transform('/tmp/foo.js')); - - // Wait a bit. - await sleep(10000); - - // Transform the same file again. Will immediately return because the - // transformed file is cached in the worker, and `computeWorkerKey` ensures - // the same worker that processed the file the first time will process it now. - console.log(await myWorker.transform('/tmp/foo.js')); - - const {forceExited} = await myWorker.end(); - if (forceExited) { - console.error('Workers failed to exit gracefully'); - } -} - -main(); -``` - -### File `worker.js` - -```javascript -import babel from '@babel/core'; - -const cache = Object.create(null); - -export function transform(filename) { - if (cache[filename]) { - return cache[filename]; - } - - // jest-worker can handle both immediate results and thenables. If a - // thenable is returned, it will be await'ed until it resolves. - return babel.transformFileAsync(filename).then(result => { - cache[filename] = result; - - return result; - }); -} -``` diff --git a/web/static/node_modules/jest-worker/build/Farm.d.ts b/web/static/node_modules/jest-worker/build/Farm.d.ts deleted file mode 100644 index 3fe79d01..00000000 --- a/web/static/node_modules/jest-worker/build/Farm.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { FarmOptions, PromiseWithCustomMessage, TaskQueue } from './types'; -export default class Farm { - private _numOfWorkers; - private _callback; - private readonly _computeWorkerKey; - private readonly _workerSchedulingPolicy; - private readonly _cacheKeys; - private readonly _locks; - private _offset; - private readonly _taskQueue; - constructor(_numOfWorkers: number, _callback: Function, options?: { - computeWorkerKey?: FarmOptions['computeWorkerKey']; - workerSchedulingPolicy?: FarmOptions['workerSchedulingPolicy']; - taskQueue?: TaskQueue; - }); - doWork(method: string, ...args: Array): PromiseWithCustomMessage; - private _process; - private _push; - private _getNextWorkerOffset; - private _lock; - private _unlock; - private _isLocked; -} diff --git a/web/static/node_modules/jest-worker/build/Farm.js b/web/static/node_modules/jest-worker/build/Farm.js deleted file mode 100644 index e29daf5e..00000000 --- a/web/static/node_modules/jest-worker/build/Farm.js +++ /dev/null @@ -1,206 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _FifoQueue = _interopRequireDefault(require('./FifoQueue')); - -var _types = require('./types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class Farm { - constructor(_numOfWorkers, _callback, options = {}) { - var _options$workerSchedu, _options$taskQueue; - - _defineProperty(this, '_computeWorkerKey', void 0); - - _defineProperty(this, '_workerSchedulingPolicy', void 0); - - _defineProperty(this, '_cacheKeys', Object.create(null)); - - _defineProperty(this, '_locks', []); - - _defineProperty(this, '_offset', 0); - - _defineProperty(this, '_taskQueue', void 0); - - this._numOfWorkers = _numOfWorkers; - this._callback = _callback; - this._computeWorkerKey = options.computeWorkerKey; - this._workerSchedulingPolicy = - (_options$workerSchedu = options.workerSchedulingPolicy) !== null && - _options$workerSchedu !== void 0 - ? _options$workerSchedu - : 'round-robin'; - this._taskQueue = - (_options$taskQueue = options.taskQueue) !== null && - _options$taskQueue !== void 0 - ? _options$taskQueue - : new _FifoQueue.default(); - } - - doWork(method, ...args) { - const customMessageListeners = new Set(); - - const addCustomMessageListener = listener => { - customMessageListeners.add(listener); - return () => { - customMessageListeners.delete(listener); - }; - }; - - const onCustomMessage = message => { - customMessageListeners.forEach(listener => listener(message)); - }; - - const promise = new Promise( // Bind args to this function so it won't reference to the parent scope. - // This prevents a memory leak in v8, because otherwise the function will - // retaine args for the closure. - ((args, resolve, reject) => { - const computeWorkerKey = this._computeWorkerKey; - const request = [_types.CHILD_MESSAGE_CALL, false, method, args]; - let worker = null; - let hash = null; - - if (computeWorkerKey) { - hash = computeWorkerKey.call(this, method, ...args); - worker = hash == null ? null : this._cacheKeys[hash]; - } - - const onStart = worker => { - if (hash != null) { - this._cacheKeys[hash] = worker; - } - }; - - const onEnd = (error, result) => { - customMessageListeners.clear(); - - if (error) { - reject(error); - } else { - resolve(result); - } - }; - - const task = { - onCustomMessage, - onEnd, - onStart, - request - }; - - if (worker) { - this._taskQueue.enqueue(task, worker.getWorkerId()); - - this._process(worker.getWorkerId()); - } else { - this._push(task); - } - }).bind(null, args) - ); - promise.UNSTABLE_onCustomMessage = addCustomMessageListener; - return promise; - } - - _process(workerId) { - if (this._isLocked(workerId)) { - return this; - } - - const task = this._taskQueue.dequeue(workerId); - - if (!task) { - return this; - } - - if (task.request[1]) { - throw new Error('Queue implementation returned processed task'); - } // Reference the task object outside so it won't be retained by onEnd, - // and other properties of the task object, such as task.request can be - // garbage collected. - - const taskOnEnd = task.onEnd; - - const onEnd = (error, result) => { - taskOnEnd(error, result); - - this._unlock(workerId); - - this._process(workerId); - }; - - task.request[1] = true; - - this._lock(workerId); - - this._callback( - workerId, - task.request, - task.onStart, - onEnd, - task.onCustomMessage - ); - - return this; - } - - _push(task) { - this._taskQueue.enqueue(task); - - const offset = this._getNextWorkerOffset(); - - for (let i = 0; i < this._numOfWorkers; i++) { - this._process((offset + i) % this._numOfWorkers); - - if (task.request[1]) { - break; - } - } - - return this; - } - - _getNextWorkerOffset() { - switch (this._workerSchedulingPolicy) { - case 'in-order': - return 0; - - case 'round-robin': - return this._offset++; - } - } - - _lock(workerId) { - this._locks[workerId] = true; - } - - _unlock(workerId) { - this._locks[workerId] = false; - } - - _isLocked(workerId) { - return this._locks[workerId]; - } -} - -exports.default = Farm; diff --git a/web/static/node_modules/jest-worker/build/FifoQueue.d.ts b/web/static/node_modules/jest-worker/build/FifoQueue.d.ts deleted file mode 100644 index d78e9e2c..00000000 --- a/web/static/node_modules/jest-worker/build/FifoQueue.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import type { QueueChildMessage, TaskQueue } from './types'; -/** - * First-in, First-out task queue that manages a dedicated pool - * for each worker as well as a shared queue. The FIFO ordering is guaranteed - * across the worker specific and shared queue. - */ -export default class FifoQueue implements TaskQueue { - private _workerQueues; - private _sharedQueue; - enqueue(task: QueueChildMessage, workerId?: number): void; - dequeue(workerId: number): QueueChildMessage | null; -} diff --git a/web/static/node_modules/jest-worker/build/FifoQueue.js b/web/static/node_modules/jest-worker/build/FifoQueue.js deleted file mode 100644 index bb52e077..00000000 --- a/web/static/node_modules/jest-worker/build/FifoQueue.js +++ /dev/null @@ -1,171 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/** - * First-in, First-out task queue that manages a dedicated pool - * for each worker as well as a shared queue. The FIFO ordering is guaranteed - * across the worker specific and shared queue. - */ -class FifoQueue { - constructor() { - _defineProperty(this, '_workerQueues', []); - - _defineProperty(this, '_sharedQueue', new InternalQueue()); - } - - enqueue(task, workerId) { - if (workerId == null) { - this._sharedQueue.enqueue(task); - - return; - } - - let workerQueue = this._workerQueues[workerId]; - - if (workerQueue == null) { - workerQueue = this._workerQueues[workerId] = new InternalQueue(); - } - - const sharedTop = this._sharedQueue.peekLast(); - - const item = { - previousSharedTask: sharedTop, - task - }; - workerQueue.enqueue(item); - } - - dequeue(workerId) { - var _this$_workerQueues$w, _workerTop$previousSh, _workerTop$previousSh2; - - const workerTop = - (_this$_workerQueues$w = this._workerQueues[workerId]) === null || - _this$_workerQueues$w === void 0 - ? void 0 - : _this$_workerQueues$w.peek(); - const sharedTaskIsProcessed = - (_workerTop$previousSh = - workerTop === null || workerTop === void 0 - ? void 0 - : (_workerTop$previousSh2 = workerTop.previousSharedTask) === null || - _workerTop$previousSh2 === void 0 - ? void 0 - : _workerTop$previousSh2.request[1]) !== null && - _workerTop$previousSh !== void 0 - ? _workerTop$previousSh - : true; // Process the top task from the shared queue if - // - there's no task in the worker specific queue or - // - if the non-worker-specific task after which this worker specifif task - // hasn been queued wasn't processed yet - - if (workerTop != null && sharedTaskIsProcessed) { - var _this$_workerQueues$w2, - _this$_workerQueues$w3, - _this$_workerQueues$w4; - - return (_this$_workerQueues$w2 = - (_this$_workerQueues$w3 = this._workerQueues[workerId]) === null || - _this$_workerQueues$w3 === void 0 - ? void 0 - : (_this$_workerQueues$w4 = _this$_workerQueues$w3.dequeue()) === - null || _this$_workerQueues$w4 === void 0 - ? void 0 - : _this$_workerQueues$w4.task) !== null && - _this$_workerQueues$w2 !== void 0 - ? _this$_workerQueues$w2 - : null; - } - - return this._sharedQueue.dequeue(); - } -} - -exports.default = FifoQueue; - -/** - * FIFO queue for a single worker / shared queue. - */ -class InternalQueue { - constructor() { - _defineProperty(this, '_head', null); - - _defineProperty(this, '_last', null); - } - - enqueue(value) { - const item = { - next: null, - value - }; - - if (this._last == null) { - this._head = item; - } else { - this._last.next = item; - } - - this._last = item; - } - - dequeue() { - if (this._head == null) { - return null; - } - - const item = this._head; - this._head = item.next; - - if (this._head == null) { - this._last = null; - } - - return item.value; - } - - peek() { - var _this$_head$value, _this$_head; - - return (_this$_head$value = - (_this$_head = this._head) === null || _this$_head === void 0 - ? void 0 - : _this$_head.value) !== null && _this$_head$value !== void 0 - ? _this$_head$value - : null; - } - - peekLast() { - var _this$_last$value, _this$_last; - - return (_this$_last$value = - (_this$_last = this._last) === null || _this$_last === void 0 - ? void 0 - : _this$_last.value) !== null && _this$_last$value !== void 0 - ? _this$_last$value - : null; - } -} diff --git a/web/static/node_modules/jest-worker/build/PriorityQueue.d.ts b/web/static/node_modules/jest-worker/build/PriorityQueue.d.ts deleted file mode 100644 index d6bcf4cf..00000000 --- a/web/static/node_modules/jest-worker/build/PriorityQueue.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import type { QueueChildMessage, TaskQueue } from './types'; -export declare type ComputeTaskPriorityCallback = (method: string, ...args: Array) => number; -declare type QueueItem = { - task: QueueChildMessage; - priority: number; -}; -/** - * Priority queue that processes tasks in natural ordering (lower priority first) - * accoridng to the priority computed by the function passed in the constructor. - * - * FIFO ordering isn't guaranteed for tasks with the same priority. - * - * Worker specific tasks with the same priority as a non-worker specific task - * are always processed first. - */ -export default class PriorityQueue implements TaskQueue { - private _computePriority; - private _queue; - private _sharedQueue; - constructor(_computePriority: ComputeTaskPriorityCallback); - enqueue(task: QueueChildMessage, workerId?: number): void; - _enqueue(task: QueueChildMessage, queue: MinHeap): void; - dequeue(workerId: number): QueueChildMessage | null; - _getWorkerQueue(workerId: number): MinHeap; -} -declare type HeapItem = { - priority: number; -}; -declare class MinHeap { - private _heap; - peek(): TItem | null; - add(item: TItem): void; - poll(): TItem | null; -} -export {}; diff --git a/web/static/node_modules/jest-worker/build/PriorityQueue.js b/web/static/node_modules/jest-worker/build/PriorityQueue.js deleted file mode 100644 index 6a55b598..00000000 --- a/web/static/node_modules/jest-worker/build/PriorityQueue.js +++ /dev/null @@ -1,188 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/** - * Priority queue that processes tasks in natural ordering (lower priority first) - * accoridng to the priority computed by the function passed in the constructor. - * - * FIFO ordering isn't guaranteed for tasks with the same priority. - * - * Worker specific tasks with the same priority as a non-worker specific task - * are always processed first. - */ -class PriorityQueue { - constructor(_computePriority) { - _defineProperty(this, '_queue', []); - - _defineProperty(this, '_sharedQueue', new MinHeap()); - - this._computePriority = _computePriority; - } - - enqueue(task, workerId) { - if (workerId == null) { - this._enqueue(task, this._sharedQueue); - } else { - const queue = this._getWorkerQueue(workerId); - - this._enqueue(task, queue); - } - } - - _enqueue(task, queue) { - const item = { - priority: this._computePriority(task.request[2], ...task.request[3]), - task - }; - queue.add(item); - } - - dequeue(workerId) { - const workerQueue = this._getWorkerQueue(workerId); - - const workerTop = workerQueue.peek(); - - const sharedTop = this._sharedQueue.peek(); // use the task from the worker queue if there's no task in the shared queue - // or if the priority of the worker queue is smaller or equal to the - // priority of the top task in the shared queue. The tasks of the - // worker specific queue are preferred because no other worker can pick this - // specific task up. - - if ( - sharedTop == null || - (workerTop != null && workerTop.priority <= sharedTop.priority) - ) { - var _workerQueue$poll$tas, _workerQueue$poll; - - return (_workerQueue$poll$tas = - (_workerQueue$poll = workerQueue.poll()) === null || - _workerQueue$poll === void 0 - ? void 0 - : _workerQueue$poll.task) !== null && _workerQueue$poll$tas !== void 0 - ? _workerQueue$poll$tas - : null; - } - - return this._sharedQueue.poll().task; - } - - _getWorkerQueue(workerId) { - let queue = this._queue[workerId]; - - if (queue == null) { - queue = this._queue[workerId] = new MinHeap(); - } - - return queue; - } -} - -exports.default = PriorityQueue; - -class MinHeap { - constructor() { - _defineProperty(this, '_heap', []); - } - - peek() { - var _this$_heap$; - - return (_this$_heap$ = this._heap[0]) !== null && _this$_heap$ !== void 0 - ? _this$_heap$ - : null; - } - - add(item) { - const nodes = this._heap; - nodes.push(item); - - if (nodes.length === 1) { - return; - } - - let currentIndex = nodes.length - 1; // Bubble up the added node as long as the parent is bigger - - while (currentIndex > 0) { - const parentIndex = Math.floor((currentIndex + 1) / 2) - 1; - const parent = nodes[parentIndex]; - - if (parent.priority <= item.priority) { - break; - } - - nodes[currentIndex] = parent; - nodes[parentIndex] = item; - currentIndex = parentIndex; - } - } - - poll() { - const nodes = this._heap; - const result = nodes[0]; - const lastElement = nodes.pop(); // heap was empty or removed the last element - - if (result == null || nodes.length === 0) { - return result !== null && result !== void 0 ? result : null; - } - - let index = 0; - nodes[0] = - lastElement !== null && lastElement !== void 0 ? lastElement : null; - const element = nodes[0]; - - while (true) { - let swapIndex = null; - const rightChildIndex = (index + 1) * 2; - const leftChildIndex = rightChildIndex - 1; - const rightChild = nodes[rightChildIndex]; - const leftChild = nodes[leftChildIndex]; // if the left child is smaller, swap with the left - - if (leftChild != null && leftChild.priority < element.priority) { - swapIndex = leftChildIndex; - } // If the right child is smaller or the right child is smaller than the left - // then swap with the right child - - if ( - rightChild != null && - rightChild.priority < (swapIndex == null ? element : leftChild).priority - ) { - swapIndex = rightChildIndex; - } - - if (swapIndex == null) { - break; - } - - nodes[index] = nodes[swapIndex]; - nodes[swapIndex] = element; - index = swapIndex; - } - - return result; - } -} diff --git a/web/static/node_modules/jest-worker/build/WorkerPool.d.ts b/web/static/node_modules/jest-worker/build/WorkerPool.d.ts deleted file mode 100644 index 9f13ff7d..00000000 --- a/web/static/node_modules/jest-worker/build/WorkerPool.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import BaseWorkerPool from './base/BaseWorkerPool'; -import type { ChildMessage, OnCustomMessage, OnEnd, OnStart, WorkerInterface, WorkerOptions, WorkerPoolInterface } from './types'; -declare class WorkerPool extends BaseWorkerPool implements WorkerPoolInterface { - send(workerId: number, request: ChildMessage, onStart: OnStart, onEnd: OnEnd, onCustomMessage: OnCustomMessage): void; - createWorker(workerOptions: WorkerOptions): WorkerInterface; -} -export default WorkerPool; diff --git a/web/static/node_modules/jest-worker/build/WorkerPool.js b/web/static/node_modules/jest-worker/build/WorkerPool.js deleted file mode 100644 index b19a679e..00000000 --- a/web/static/node_modules/jest-worker/build/WorkerPool.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _BaseWorkerPool = _interopRequireDefault(require('./base/BaseWorkerPool')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const canUseWorkerThreads = () => { - try { - require('worker_threads'); - - return true; - } catch { - return false; - } -}; - -class WorkerPool extends _BaseWorkerPool.default { - send(workerId, request, onStart, onEnd, onCustomMessage) { - this.getWorkerById(workerId).send(request, onStart, onEnd, onCustomMessage); - } - - createWorker(workerOptions) { - let Worker; - - if (this._options.enableWorkerThreads && canUseWorkerThreads()) { - Worker = require('./workers/NodeThreadsWorker').default; - } else { - Worker = require('./workers/ChildProcessWorker').default; - } - - return new Worker(workerOptions); - } -} - -var _default = WorkerPool; -exports.default = _default; diff --git a/web/static/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts b/web/static/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts deleted file mode 100644 index 311309e6..00000000 --- a/web/static/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { PoolExitResult, WorkerInterface, WorkerOptions, WorkerPoolOptions } from '../types'; -export default class BaseWorkerPool { - private readonly _stderr; - private readonly _stdout; - protected readonly _options: WorkerPoolOptions; - private readonly _workers; - constructor(workerPath: string, options: WorkerPoolOptions); - getStderr(): NodeJS.ReadableStream; - getStdout(): NodeJS.ReadableStream; - getWorkers(): Array; - getWorkerById(workerId: number): WorkerInterface; - createWorker(_workerOptions: WorkerOptions): WorkerInterface; - end(): Promise; -} diff --git a/web/static/node_modules/jest-worker/build/base/BaseWorkerPool.js b/web/static/node_modules/jest-worker/build/base/BaseWorkerPool.js deleted file mode 100644 index 491deb8b..00000000 --- a/web/static/node_modules/jest-worker/build/base/BaseWorkerPool.js +++ /dev/null @@ -1,201 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function path() { - const data = _interopRequireWildcard(require('path')); - - path = function () { - return data; - }; - - return data; -} - -function _mergeStream() { - const data = _interopRequireDefault(require('merge-stream')); - - _mergeStream = function () { - return data; - }; - - return data; -} - -var _types = require('../types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _getRequireWildcardCache(nodeInterop) { - if (typeof WeakMap !== 'function') return null; - var cacheBabelInterop = new WeakMap(); - var cacheNodeInterop = new WeakMap(); - return (_getRequireWildcardCache = function (nodeInterop) { - return nodeInterop ? cacheNodeInterop : cacheBabelInterop; - })(nodeInterop); -} - -function _interopRequireWildcard(obj, nodeInterop) { - if (!nodeInterop && obj && obj.__esModule) { - return obj; - } - if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) { - return {default: obj}; - } - var cache = _getRequireWildcardCache(nodeInterop); - if (cache && cache.has(obj)) { - return cache.get(obj); - } - var newObj = {}; - var hasPropertyDescriptor = - Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var key in obj) { - if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = hasPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : null; - if (desc && (desc.get || desc.set)) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - newObj.default = obj; - if (cache) { - cache.set(obj, newObj); - } - return newObj; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -// How long to wait for the child process to terminate -// after CHILD_MESSAGE_END before sending force exiting. -const FORCE_EXIT_DELAY = 500; -/* istanbul ignore next */ - -const emptyMethod = () => {}; - -class BaseWorkerPool { - constructor(workerPath, options) { - _defineProperty(this, '_stderr', void 0); - - _defineProperty(this, '_stdout', void 0); - - _defineProperty(this, '_options', void 0); - - _defineProperty(this, '_workers', void 0); - - this._options = options; - this._workers = new Array(options.numWorkers); - - if (!path().isAbsolute(workerPath)) { - workerPath = require.resolve(workerPath); - } - - const stdout = (0, _mergeStream().default)(); - const stderr = (0, _mergeStream().default)(); - const {forkOptions, maxRetries, resourceLimits, setupArgs} = options; - - for (let i = 0; i < options.numWorkers; i++) { - const workerOptions = { - forkOptions, - maxRetries, - resourceLimits, - setupArgs, - workerId: i, - workerPath - }; - const worker = this.createWorker(workerOptions); - const workerStdout = worker.getStdout(); - const workerStderr = worker.getStderr(); - - if (workerStdout) { - stdout.add(workerStdout); - } - - if (workerStderr) { - stderr.add(workerStderr); - } - - this._workers[i] = worker; - } - - this._stdout = stdout; - this._stderr = stderr; - } - - getStderr() { - return this._stderr; - } - - getStdout() { - return this._stdout; - } - - getWorkers() { - return this._workers; - } - - getWorkerById(workerId) { - return this._workers[workerId]; - } - - createWorker(_workerOptions) { - throw Error('Missing method createWorker in WorkerPool'); - } - - async end() { - // We do not cache the request object here. If so, it would only be only - // processed by one of the workers, and we want them all to close. - const workerExitPromises = this._workers.map(async worker => { - worker.send( - [_types.CHILD_MESSAGE_END, false], - emptyMethod, - emptyMethod, - emptyMethod - ); // Schedule a force exit in case worker fails to exit gracefully so - // await worker.waitForExit() never takes longer than FORCE_EXIT_DELAY - - let forceExited = false; - const forceExitTimeout = setTimeout(() => { - worker.forceExit(); - forceExited = true; - }, FORCE_EXIT_DELAY); - await worker.waitForExit(); // Worker ideally exited gracefully, don't send force exit then - - clearTimeout(forceExitTimeout); - return forceExited; - }); - - const workerExits = await Promise.all(workerExitPromises); - return workerExits.reduce( - (result, forceExited) => ({ - forceExited: result.forceExited || forceExited - }), - { - forceExited: false - } - ); - } -} - -exports.default = BaseWorkerPool; diff --git a/web/static/node_modules/jest-worker/build/index.d.ts b/web/static/node_modules/jest-worker/build/index.d.ts deleted file mode 100644 index 5908dbbd..00000000 --- a/web/static/node_modules/jest-worker/build/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import type { FarmOptions, PoolExitResult, PromiseWithCustomMessage, TaskQueue } from './types'; -export { default as PriorityQueue } from './PriorityQueue'; -export { default as FifoQueue } from './FifoQueue'; -export { default as messageParent } from './workers/messageParent'; -/** - * The Jest farm (publicly called "Worker") is a class that allows you to queue - * methods across multiple child processes, in order to parallelize work. This - * is done by providing an absolute path to a module that will be loaded on each - * of the child processes, and bridged to the main process. - * - * Bridged methods are specified by using the "exposedMethods" property of the - * "options" object. This is an array of strings, where each of them corresponds - * to the exported name in the loaded module. - * - * You can also control the amount of workers by using the "numWorkers" property - * of the "options" object, and the settings passed to fork the process through - * the "forkOptions" property. The amount of workers defaults to the amount of - * CPUS minus one. - * - * Queueing calls can be done in two ways: - * - Standard method: calls will be redirected to the first available worker, - * so they will get executed as soon as they can. - * - * - Sticky method: if a "computeWorkerKey" method is provided within the - * config, the resulting string of this method will be used as a key. - * Every time this key is returned, it is guaranteed that your job will be - * processed by the same worker. This is specially useful if your workers - * are caching results. - */ -export declare class Worker { - private _ending; - private _farm; - private _options; - private _workerPool; - constructor(workerPath: string, options?: FarmOptions); - private _bindExposedWorkerMethods; - private _callFunctionWithArgs; - getStderr(): NodeJS.ReadableStream; - getStdout(): NodeJS.ReadableStream; - end(): Promise; -} -export type { PromiseWithCustomMessage, TaskQueue }; diff --git a/web/static/node_modules/jest-worker/build/index.js b/web/static/node_modules/jest-worker/build/index.js deleted file mode 100644 index 5dac1836..00000000 --- a/web/static/node_modules/jest-worker/build/index.js +++ /dev/null @@ -1,223 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'FifoQueue', { - enumerable: true, - get: function () { - return _FifoQueue.default; - } -}); -Object.defineProperty(exports, 'PriorityQueue', { - enumerable: true, - get: function () { - return _PriorityQueue.default; - } -}); -exports.Worker = void 0; -Object.defineProperty(exports, 'messageParent', { - enumerable: true, - get: function () { - return _messageParent.default; - } -}); - -function _os() { - const data = require('os'); - - _os = function () { - return data; - }; - - return data; -} - -var _Farm = _interopRequireDefault(require('./Farm')); - -var _WorkerPool = _interopRequireDefault(require('./WorkerPool')); - -var _PriorityQueue = _interopRequireDefault(require('./PriorityQueue')); - -var _FifoQueue = _interopRequireDefault(require('./FifoQueue')); - -var _messageParent = _interopRequireDefault(require('./workers/messageParent')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function getExposedMethods(workerPath, options) { - let exposedMethods = options.exposedMethods; // If no methods list is given, try getting it by auto-requiring the module. - - if (!exposedMethods) { - const module = require(workerPath); - - exposedMethods = Object.keys(module).filter( - // @ts-expect-error: no index - name => typeof module[name] === 'function' - ); - - if (typeof module === 'function') { - exposedMethods = [...exposedMethods, 'default']; - } - } - - return exposedMethods; -} -/** - * The Jest farm (publicly called "Worker") is a class that allows you to queue - * methods across multiple child processes, in order to parallelize work. This - * is done by providing an absolute path to a module that will be loaded on each - * of the child processes, and bridged to the main process. - * - * Bridged methods are specified by using the "exposedMethods" property of the - * "options" object. This is an array of strings, where each of them corresponds - * to the exported name in the loaded module. - * - * You can also control the amount of workers by using the "numWorkers" property - * of the "options" object, and the settings passed to fork the process through - * the "forkOptions" property. The amount of workers defaults to the amount of - * CPUS minus one. - * - * Queueing calls can be done in two ways: - * - Standard method: calls will be redirected to the first available worker, - * so they will get executed as soon as they can. - * - * - Sticky method: if a "computeWorkerKey" method is provided within the - * config, the resulting string of this method will be used as a key. - * Every time this key is returned, it is guaranteed that your job will be - * processed by the same worker. This is specially useful if your workers - * are caching results. - */ - -class Worker { - constructor(workerPath, options) { - var _this$_options$enable, - _this$_options$forkOp, - _this$_options$maxRet, - _this$_options$numWor, - _this$_options$resour, - _this$_options$setupA; - - _defineProperty(this, '_ending', void 0); - - _defineProperty(this, '_farm', void 0); - - _defineProperty(this, '_options', void 0); - - _defineProperty(this, '_workerPool', void 0); - - this._options = {...options}; - this._ending = false; - const workerPoolOptions = { - enableWorkerThreads: - (_this$_options$enable = this._options.enableWorkerThreads) !== null && - _this$_options$enable !== void 0 - ? _this$_options$enable - : false, - forkOptions: - (_this$_options$forkOp = this._options.forkOptions) !== null && - _this$_options$forkOp !== void 0 - ? _this$_options$forkOp - : {}, - maxRetries: - (_this$_options$maxRet = this._options.maxRetries) !== null && - _this$_options$maxRet !== void 0 - ? _this$_options$maxRet - : 3, - numWorkers: - (_this$_options$numWor = this._options.numWorkers) !== null && - _this$_options$numWor !== void 0 - ? _this$_options$numWor - : Math.max((0, _os().cpus)().length - 1, 1), - resourceLimits: - (_this$_options$resour = this._options.resourceLimits) !== null && - _this$_options$resour !== void 0 - ? _this$_options$resour - : {}, - setupArgs: - (_this$_options$setupA = this._options.setupArgs) !== null && - _this$_options$setupA !== void 0 - ? _this$_options$setupA - : [] - }; - - if (this._options.WorkerPool) { - // @ts-expect-error: constructor target any? - this._workerPool = new this._options.WorkerPool( - workerPath, - workerPoolOptions - ); - } else { - this._workerPool = new _WorkerPool.default(workerPath, workerPoolOptions); - } - - this._farm = new _Farm.default( - workerPoolOptions.numWorkers, - this._workerPool.send.bind(this._workerPool), - { - computeWorkerKey: this._options.computeWorkerKey, - taskQueue: this._options.taskQueue, - workerSchedulingPolicy: this._options.workerSchedulingPolicy - } - ); - - this._bindExposedWorkerMethods(workerPath, this._options); - } - - _bindExposedWorkerMethods(workerPath, options) { - getExposedMethods(workerPath, options).forEach(name => { - if (name.startsWith('_')) { - return; - } - - if (this.constructor.prototype.hasOwnProperty(name)) { - throw new TypeError('Cannot define a method called ' + name); - } // @ts-expect-error: dynamic extension of the class instance is expected. - - this[name] = this._callFunctionWithArgs.bind(this, name); - }); - } - - _callFunctionWithArgs(method, ...args) { - if (this._ending) { - throw new Error('Farm is ended, no more calls can be done to it'); - } - - return this._farm.doWork(method, ...args); - } - - getStderr() { - return this._workerPool.getStderr(); - } - - getStdout() { - return this._workerPool.getStdout(); - } - - async end() { - if (this._ending) { - throw new Error('Farm is ended, no more calls can be done to it'); - } - - this._ending = true; - return this._workerPool.end(); - } -} - -exports.Worker = Worker; diff --git a/web/static/node_modules/jest-worker/build/types.d.ts b/web/static/node_modules/jest-worker/build/types.d.ts deleted file mode 100644 index be160f6f..00000000 --- a/web/static/node_modules/jest-worker/build/types.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import type { ForkOptions } from 'child_process'; -import type { EventEmitter } from 'events'; -export interface ResourceLimits { - maxYoungGenerationSizeMb?: number; - maxOldGenerationSizeMb?: number; - codeRangeSizeMb?: number; - stackSizeMb?: number; -} -export declare const CHILD_MESSAGE_INITIALIZE: 0; -export declare const CHILD_MESSAGE_CALL: 1; -export declare const CHILD_MESSAGE_END: 2; -export declare const PARENT_MESSAGE_OK: 0; -export declare const PARENT_MESSAGE_CLIENT_ERROR: 1; -export declare const PARENT_MESSAGE_SETUP_ERROR: 2; -export declare const PARENT_MESSAGE_CUSTOM: 3; -export declare type PARENT_MESSAGE_ERROR = typeof PARENT_MESSAGE_CLIENT_ERROR | typeof PARENT_MESSAGE_SETUP_ERROR; -export interface WorkerPoolInterface { - getStderr(): NodeJS.ReadableStream; - getStdout(): NodeJS.ReadableStream; - getWorkers(): Array; - createWorker(options: WorkerOptions): WorkerInterface; - send(workerId: number, request: ChildMessage, onStart: OnStart, onEnd: OnEnd, onCustomMessage: OnCustomMessage): void; - end(): Promise; -} -export interface WorkerInterface { - send(request: ChildMessage, onProcessStart: OnStart, onProcessEnd: OnEnd, onCustomMessage: OnCustomMessage): void; - waitForExit(): Promise; - forceExit(): void; - getWorkerId(): number; - getStderr(): NodeJS.ReadableStream | null; - getStdout(): NodeJS.ReadableStream | null; -} -export declare type PoolExitResult = { - forceExited: boolean; -}; -export interface PromiseWithCustomMessage extends Promise { - UNSTABLE_onCustomMessage?: (listener: OnCustomMessage) => () => void; -} -export type { ForkOptions }; -export interface TaskQueue { - /** - * Enqueues the task in the queue for the specified worker or adds it to the - * queue shared by all workers - * @param task the task to queue - * @param workerId the id of the worker that should process this task or undefined - * if there's no preference. - */ - enqueue(task: QueueChildMessage, workerId?: number): void; - /** - * Dequeues the next item from the queue for the speified worker - * @param workerId the id of the worker for which the next task should be retrieved - */ - dequeue(workerId: number): QueueChildMessage | null; -} -export declare type FarmOptions = { - computeWorkerKey?: (method: string, ...args: Array) => string | null; - exposedMethods?: ReadonlyArray; - forkOptions?: ForkOptions; - workerSchedulingPolicy?: 'round-robin' | 'in-order'; - resourceLimits?: ResourceLimits; - setupArgs?: Array; - maxRetries?: number; - numWorkers?: number; - taskQueue?: TaskQueue; - WorkerPool?: (workerPath: string, options?: WorkerPoolOptions) => WorkerPoolInterface; - enableWorkerThreads?: boolean; -}; -export declare type WorkerPoolOptions = { - setupArgs: Array; - forkOptions: ForkOptions; - resourceLimits: ResourceLimits; - maxRetries: number; - numWorkers: number; - enableWorkerThreads: boolean; -}; -export declare type WorkerOptions = { - forkOptions: ForkOptions; - resourceLimits: ResourceLimits; - setupArgs: Array; - maxRetries: number; - workerId: number; - workerData?: unknown; - workerPath: string; -}; -export declare type MessagePort = typeof EventEmitter & { - postMessage(message: unknown): void; -}; -export declare type MessageChannel = { - port1: MessagePort; - port2: MessagePort; -}; -export declare type ChildMessageInitialize = [ - typeof CHILD_MESSAGE_INITIALIZE, - boolean, - string, - // file - Array | undefined, - // setupArgs - MessagePort | undefined -]; -export declare type ChildMessageCall = [ - typeof CHILD_MESSAGE_CALL, - boolean, - string, - Array -]; -export declare type ChildMessageEnd = [ - typeof CHILD_MESSAGE_END, - boolean -]; -export declare type ChildMessage = ChildMessageInitialize | ChildMessageCall | ChildMessageEnd; -export declare type ParentMessageCustom = [ - typeof PARENT_MESSAGE_CUSTOM, - unknown -]; -export declare type ParentMessageOk = [ - typeof PARENT_MESSAGE_OK, - unknown -]; -export declare type ParentMessageError = [ - PARENT_MESSAGE_ERROR, - string, - string, - string, - unknown -]; -export declare type ParentMessage = ParentMessageOk | ParentMessageError | ParentMessageCustom; -export declare type OnStart = (worker: WorkerInterface) => void; -export declare type OnEnd = (err: Error | null, result: unknown) => void; -export declare type OnCustomMessage = (message: Array | unknown) => void; -export declare type QueueChildMessage = { - request: ChildMessageCall; - onStart: OnStart; - onEnd: OnEnd; - onCustomMessage: OnCustomMessage; -}; diff --git a/web/static/node_modules/jest-worker/build/types.js b/web/static/node_modules/jest-worker/build/types.js deleted file mode 100644 index 92b358ba..00000000 --- a/web/static/node_modules/jest-worker/build/types.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.PARENT_MESSAGE_SETUP_ERROR = - exports.PARENT_MESSAGE_OK = - exports.PARENT_MESSAGE_CUSTOM = - exports.PARENT_MESSAGE_CLIENT_ERROR = - exports.CHILD_MESSAGE_INITIALIZE = - exports.CHILD_MESSAGE_END = - exports.CHILD_MESSAGE_CALL = - void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// import type {ResourceLimits} from 'worker_threads'; -// This is not present in the Node 12 typings -// Because of the dynamic nature of a worker communication process, all messages -// coming from any of the other processes cannot be typed. Thus, many types -// include "unknown" as a TS type, which is (unfortunately) correct here. -const CHILD_MESSAGE_INITIALIZE = 0; -exports.CHILD_MESSAGE_INITIALIZE = CHILD_MESSAGE_INITIALIZE; -const CHILD_MESSAGE_CALL = 1; -exports.CHILD_MESSAGE_CALL = CHILD_MESSAGE_CALL; -const CHILD_MESSAGE_END = 2; -exports.CHILD_MESSAGE_END = CHILD_MESSAGE_END; -const PARENT_MESSAGE_OK = 0; -exports.PARENT_MESSAGE_OK = PARENT_MESSAGE_OK; -const PARENT_MESSAGE_CLIENT_ERROR = 1; -exports.PARENT_MESSAGE_CLIENT_ERROR = PARENT_MESSAGE_CLIENT_ERROR; -const PARENT_MESSAGE_SETUP_ERROR = 2; -exports.PARENT_MESSAGE_SETUP_ERROR = PARENT_MESSAGE_SETUP_ERROR; -const PARENT_MESSAGE_CUSTOM = 3; -exports.PARENT_MESSAGE_CUSTOM = PARENT_MESSAGE_CUSTOM; diff --git a/web/static/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts b/web/static/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts deleted file mode 100644 index 4a8dcf12..00000000 --- a/web/static/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { ChildMessage, OnCustomMessage, OnEnd, OnStart, WorkerInterface, WorkerOptions } from '../types'; -/** - * This class wraps the child process and provides a nice interface to - * communicate with. It takes care of: - * - * - Re-spawning the process if it dies. - * - Queues calls while the worker is busy. - * - Re-sends the requests if the worker blew up. - * - * The reason for queueing them here (since childProcess.send also has an - * internal queue) is because the worker could be doing asynchronous work, and - * this would lead to the child process to read its receiving buffer and start a - * second call. By queueing calls here, we don't send the next call to the - * children until we receive the result of the previous one. - * - * As soon as a request starts to be processed by a worker, its "processed" - * field is changed to "true", so that other workers which might encounter the - * same call skip it. - */ -export default class ChildProcessWorker implements WorkerInterface { - private _child; - private _options; - private _request; - private _retries; - private _onProcessEnd; - private _onCustomMessage; - private _fakeStream; - private _stdout; - private _stderr; - private _exitPromise; - private _resolveExitPromise; - constructor(options: WorkerOptions); - initialize(): void; - private _shutdown; - private _onMessage; - private _onExit; - send(request: ChildMessage, onProcessStart: OnStart, onProcessEnd: OnEnd, onCustomMessage: OnCustomMessage): void; - waitForExit(): Promise; - forceExit(): void; - getWorkerId(): number; - getStdout(): NodeJS.ReadableStream | null; - getStderr(): NodeJS.ReadableStream | null; - private _getFakeStream; -} diff --git a/web/static/node_modules/jest-worker/build/workers/ChildProcessWorker.js b/web/static/node_modules/jest-worker/build/workers/ChildProcessWorker.js deleted file mode 100644 index f8a42c96..00000000 --- a/web/static/node_modules/jest-worker/build/workers/ChildProcessWorker.js +++ /dev/null @@ -1,333 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _child_process() { - const data = require('child_process'); - - _child_process = function () { - return data; - }; - - return data; -} - -function _stream() { - const data = require('stream'); - - _stream = function () { - return data; - }; - - return data; -} - -function _mergeStream() { - const data = _interopRequireDefault(require('merge-stream')); - - _mergeStream = function () { - return data; - }; - - return data; -} - -function _supportsColor() { - const data = require('supports-color'); - - _supportsColor = function () { - return data; - }; - - return data; -} - -var _types = require('../types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const SIGNAL_BASE_EXIT_CODE = 128; -const SIGKILL_EXIT_CODE = SIGNAL_BASE_EXIT_CODE + 9; -const SIGTERM_EXIT_CODE = SIGNAL_BASE_EXIT_CODE + 15; // How long to wait after SIGTERM before sending SIGKILL - -const SIGKILL_DELAY = 500; -/** - * This class wraps the child process and provides a nice interface to - * communicate with. It takes care of: - * - * - Re-spawning the process if it dies. - * - Queues calls while the worker is busy. - * - Re-sends the requests if the worker blew up. - * - * The reason for queueing them here (since childProcess.send also has an - * internal queue) is because the worker could be doing asynchronous work, and - * this would lead to the child process to read its receiving buffer and start a - * second call. By queueing calls here, we don't send the next call to the - * children until we receive the result of the previous one. - * - * As soon as a request starts to be processed by a worker, its "processed" - * field is changed to "true", so that other workers which might encounter the - * same call skip it. - */ - -class ChildProcessWorker { - constructor(options) { - _defineProperty(this, '_child', void 0); - - _defineProperty(this, '_options', void 0); - - _defineProperty(this, '_request', void 0); - - _defineProperty(this, '_retries', void 0); - - _defineProperty(this, '_onProcessEnd', void 0); - - _defineProperty(this, '_onCustomMessage', void 0); - - _defineProperty(this, '_fakeStream', void 0); - - _defineProperty(this, '_stdout', void 0); - - _defineProperty(this, '_stderr', void 0); - - _defineProperty(this, '_exitPromise', void 0); - - _defineProperty(this, '_resolveExitPromise', void 0); - - this._options = options; - this._request = null; - this._fakeStream = null; - this._stdout = null; - this._stderr = null; - this._exitPromise = new Promise(resolve => { - this._resolveExitPromise = resolve; - }); - this.initialize(); - } - - initialize() { - const forceColor = _supportsColor().stdout - ? { - FORCE_COLOR: '1' - } - : {}; - const child = (0, _child_process().fork)( - require.resolve('./processChild'), - [], - { - cwd: process.cwd(), - env: { - ...process.env, - JEST_WORKER_ID: String(this._options.workerId + 1), - // 0-indexed workerId, 1-indexed JEST_WORKER_ID - ...forceColor - }, - // Suppress --debug / --inspect flags while preserving others (like --harmony). - execArgv: process.execArgv.filter(v => !/^--(debug|inspect)/.test(v)), - silent: true, - ...this._options.forkOptions - } - ); - - if (child.stdout) { - if (!this._stdout) { - // We need to add a permanent stream to the merged stream to prevent it - // from ending when the subprocess stream ends - this._stdout = (0, _mergeStream().default)(this._getFakeStream()); - } - - this._stdout.add(child.stdout); - } - - if (child.stderr) { - if (!this._stderr) { - // We need to add a permanent stream to the merged stream to prevent it - // from ending when the subprocess stream ends - this._stderr = (0, _mergeStream().default)(this._getFakeStream()); - } - - this._stderr.add(child.stderr); - } - - child.on('message', this._onMessage.bind(this)); - child.on('exit', this._onExit.bind(this)); - child.send([ - _types.CHILD_MESSAGE_INITIALIZE, - false, - this._options.workerPath, - this._options.setupArgs - ]); - this._child = child; - this._retries++; // If we exceeded the amount of retries, we will emulate an error reply - // coming from the child. This avoids code duplication related with cleaning - // the queue, and scheduling the next call. - - if (this._retries > this._options.maxRetries) { - const error = new Error( - `Jest worker encountered ${this._retries} child process exceptions, exceeding retry limit` - ); - - this._onMessage([ - _types.PARENT_MESSAGE_CLIENT_ERROR, - error.name, - error.message, - error.stack, - { - type: 'WorkerError' - } - ]); - } - } - - _shutdown() { - // End the temporary streams so the merged streams end too - if (this._fakeStream) { - this._fakeStream.end(); - - this._fakeStream = null; - } - - this._resolveExitPromise(); - } - - _onMessage(response) { - // TODO: Add appropriate type check - let error; - - switch (response[0]) { - case _types.PARENT_MESSAGE_OK: - this._onProcessEnd(null, response[1]); - - break; - - case _types.PARENT_MESSAGE_CLIENT_ERROR: - error = response[4]; - - if (error != null && typeof error === 'object') { - const extra = error; // @ts-expect-error: no index - - const NativeCtor = global[response[1]]; - const Ctor = typeof NativeCtor === 'function' ? NativeCtor : Error; - error = new Ctor(response[2]); - error.type = response[1]; - error.stack = response[3]; - - for (const key in extra) { - error[key] = extra[key]; - } - } - - this._onProcessEnd(error, null); - - break; - - case _types.PARENT_MESSAGE_SETUP_ERROR: - error = new Error('Error when calling setup: ' + response[2]); - error.type = response[1]; - error.stack = response[3]; - - this._onProcessEnd(error, null); - - break; - - case _types.PARENT_MESSAGE_CUSTOM: - this._onCustomMessage(response[1]); - - break; - - default: - throw new TypeError('Unexpected response from worker: ' + response[0]); - } - } - - _onExit(exitCode) { - if ( - exitCode !== 0 && - exitCode !== null && - exitCode !== SIGTERM_EXIT_CODE && - exitCode !== SIGKILL_EXIT_CODE - ) { - this.initialize(); - - if (this._request) { - this._child.send(this._request); - } - } else { - this._shutdown(); - } - } - - send(request, onProcessStart, onProcessEnd, onCustomMessage) { - onProcessStart(this); - - this._onProcessEnd = (...args) => { - // Clean the request to avoid sending past requests to workers that fail - // while waiting for a new request (timers, unhandled rejections...) - this._request = null; - return onProcessEnd(...args); - }; - - this._onCustomMessage = (...arg) => onCustomMessage(...arg); - - this._request = request; - this._retries = 0; - - this._child.send(request, () => {}); - } - - waitForExit() { - return this._exitPromise; - } - - forceExit() { - this._child.kill('SIGTERM'); - - const sigkillTimeout = setTimeout( - () => this._child.kill('SIGKILL'), - SIGKILL_DELAY - ); - - this._exitPromise.then(() => clearTimeout(sigkillTimeout)); - } - - getWorkerId() { - return this._options.workerId; - } - - getStdout() { - return this._stdout; - } - - getStderr() { - return this._stderr; - } - - _getFakeStream() { - if (!this._fakeStream) { - this._fakeStream = new (_stream().PassThrough)(); - } - - return this._fakeStream; - } -} - -exports.default = ChildProcessWorker; diff --git a/web/static/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts b/web/static/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts deleted file mode 100644 index 4696ecc3..00000000 --- a/web/static/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { ChildMessage, OnCustomMessage, OnEnd, OnStart, WorkerInterface, WorkerOptions } from '../types'; -export default class ExperimentalWorker implements WorkerInterface { - private _worker; - private _options; - private _request; - private _retries; - private _onProcessEnd; - private _onCustomMessage; - private _fakeStream; - private _stdout; - private _stderr; - private _exitPromise; - private _resolveExitPromise; - private _forceExited; - constructor(options: WorkerOptions); - initialize(): void; - private _shutdown; - private _onMessage; - private _onExit; - waitForExit(): Promise; - forceExit(): void; - send(request: ChildMessage, onProcessStart: OnStart, onProcessEnd: OnEnd | null, onCustomMessage: OnCustomMessage): void; - getWorkerId(): number; - getStdout(): NodeJS.ReadableStream | null; - getStderr(): NodeJS.ReadableStream | null; - private _getFakeStream; -} diff --git a/web/static/node_modules/jest-worker/build/workers/NodeThreadsWorker.js b/web/static/node_modules/jest-worker/build/workers/NodeThreadsWorker.js deleted file mode 100644 index 21b7dd2a..00000000 --- a/web/static/node_modules/jest-worker/build/workers/NodeThreadsWorker.js +++ /dev/null @@ -1,344 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function path() { - const data = _interopRequireWildcard(require('path')); - - path = function () { - return data; - }; - - return data; -} - -function _stream() { - const data = require('stream'); - - _stream = function () { - return data; - }; - - return data; -} - -function _worker_threads() { - const data = require('worker_threads'); - - _worker_threads = function () { - return data; - }; - - return data; -} - -function _mergeStream() { - const data = _interopRequireDefault(require('merge-stream')); - - _mergeStream = function () { - return data; - }; - - return data; -} - -var _types = require('../types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _getRequireWildcardCache(nodeInterop) { - if (typeof WeakMap !== 'function') return null; - var cacheBabelInterop = new WeakMap(); - var cacheNodeInterop = new WeakMap(); - return (_getRequireWildcardCache = function (nodeInterop) { - return nodeInterop ? cacheNodeInterop : cacheBabelInterop; - })(nodeInterop); -} - -function _interopRequireWildcard(obj, nodeInterop) { - if (!nodeInterop && obj && obj.__esModule) { - return obj; - } - if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) { - return {default: obj}; - } - var cache = _getRequireWildcardCache(nodeInterop); - if (cache && cache.has(obj)) { - return cache.get(obj); - } - var newObj = {}; - var hasPropertyDescriptor = - Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var key in obj) { - if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = hasPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : null; - if (desc && (desc.get || desc.set)) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - newObj.default = obj; - if (cache) { - cache.set(obj, newObj); - } - return newObj; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class ExperimentalWorker { - constructor(options) { - _defineProperty(this, '_worker', void 0); - - _defineProperty(this, '_options', void 0); - - _defineProperty(this, '_request', void 0); - - _defineProperty(this, '_retries', void 0); - - _defineProperty(this, '_onProcessEnd', void 0); - - _defineProperty(this, '_onCustomMessage', void 0); - - _defineProperty(this, '_fakeStream', void 0); - - _defineProperty(this, '_stdout', void 0); - - _defineProperty(this, '_stderr', void 0); - - _defineProperty(this, '_exitPromise', void 0); - - _defineProperty(this, '_resolveExitPromise', void 0); - - _defineProperty(this, '_forceExited', void 0); - - this._options = options; - this._request = null; - this._fakeStream = null; - this._stdout = null; - this._stderr = null; - this._exitPromise = new Promise(resolve => { - this._resolveExitPromise = resolve; - }); - this._forceExited = false; - this.initialize(); - } - - initialize() { - this._worker = new (_worker_threads().Worker)( - path().resolve(__dirname, './threadChild.js'), - { - eval: false, - // @ts-expect-error: added in newer versions - resourceLimits: this._options.resourceLimits, - stderr: true, - stdout: true, - workerData: this._options.workerData, - ...this._options.forkOptions - } - ); - - if (this._worker.stdout) { - if (!this._stdout) { - // We need to add a permanent stream to the merged stream to prevent it - // from ending when the subprocess stream ends - this._stdout = (0, _mergeStream().default)(this._getFakeStream()); - } - - this._stdout.add(this._worker.stdout); - } - - if (this._worker.stderr) { - if (!this._stderr) { - // We need to add a permanent stream to the merged stream to prevent it - // from ending when the subprocess stream ends - this._stderr = (0, _mergeStream().default)(this._getFakeStream()); - } - - this._stderr.add(this._worker.stderr); - } - - this._worker.on('message', this._onMessage.bind(this)); - - this._worker.on('exit', this._onExit.bind(this)); - - this._worker.postMessage([ - _types.CHILD_MESSAGE_INITIALIZE, - false, - this._options.workerPath, - this._options.setupArgs, - String(this._options.workerId + 1) // 0-indexed workerId, 1-indexed JEST_WORKER_ID - ]); - - this._retries++; // If we exceeded the amount of retries, we will emulate an error reply - // coming from the child. This avoids code duplication related with cleaning - // the queue, and scheduling the next call. - - if (this._retries > this._options.maxRetries) { - const error = new Error('Call retries were exceeded'); - - this._onMessage([ - _types.PARENT_MESSAGE_CLIENT_ERROR, - error.name, - error.message, - error.stack, - { - type: 'WorkerError' - } - ]); - } - } - - _shutdown() { - // End the permanent stream so the merged stream end too - if (this._fakeStream) { - this._fakeStream.end(); - - this._fakeStream = null; - } - - this._resolveExitPromise(); - } - - _onMessage(response) { - let error; - - switch (response[0]) { - case _types.PARENT_MESSAGE_OK: - this._onProcessEnd(null, response[1]); - - break; - - case _types.PARENT_MESSAGE_CLIENT_ERROR: - error = response[4]; - - if (error != null && typeof error === 'object') { - const extra = error; // @ts-expect-error: no index - - const NativeCtor = global[response[1]]; - const Ctor = typeof NativeCtor === 'function' ? NativeCtor : Error; - error = new Ctor(response[2]); - error.type = response[1]; - error.stack = response[3]; - - for (const key in extra) { - // @ts-expect-error: no index - error[key] = extra[key]; - } - } - - this._onProcessEnd(error, null); - - break; - - case _types.PARENT_MESSAGE_SETUP_ERROR: - error = new Error('Error when calling setup: ' + response[2]); // @ts-expect-error: adding custom properties to errors. - - error.type = response[1]; - error.stack = response[3]; - - this._onProcessEnd(error, null); - - break; - - case _types.PARENT_MESSAGE_CUSTOM: - this._onCustomMessage(response[1]); - - break; - - default: - throw new TypeError('Unexpected response from worker: ' + response[0]); - } - } - - _onExit(exitCode) { - if (exitCode !== 0 && !this._forceExited) { - this.initialize(); - - if (this._request) { - this._worker.postMessage(this._request); - } - } else { - this._shutdown(); - } - } - - waitForExit() { - return this._exitPromise; - } - - forceExit() { - this._forceExited = true; - - this._worker.terminate(); - } - - send(request, onProcessStart, onProcessEnd, onCustomMessage) { - onProcessStart(this); - - this._onProcessEnd = (...args) => { - var _onProcessEnd; - - // Clean the request to avoid sending past requests to workers that fail - // while waiting for a new request (timers, unhandled rejections...) - this._request = null; - const res = - (_onProcessEnd = onProcessEnd) === null || _onProcessEnd === void 0 - ? void 0 - : _onProcessEnd(...args); // Clean up the reference so related closures can be garbage collected. - - onProcessEnd = null; - return res; - }; - - this._onCustomMessage = (...arg) => onCustomMessage(...arg); - - this._request = request; - this._retries = 0; - - this._worker.postMessage(request); - } - - getWorkerId() { - return this._options.workerId; - } - - getStdout() { - return this._stdout; - } - - getStderr() { - return this._stderr; - } - - _getFakeStream() { - if (!this._fakeStream) { - this._fakeStream = new (_stream().PassThrough)(); - } - - return this._fakeStream; - } -} - -exports.default = ExperimentalWorker; diff --git a/web/static/node_modules/jest-worker/build/workers/messageParent.d.ts b/web/static/node_modules/jest-worker/build/workers/messageParent.d.ts deleted file mode 100644 index 795bb351..00000000 --- a/web/static/node_modules/jest-worker/build/workers/messageParent.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -export default function messageParent(message: unknown, parentProcess?: NodeJS.Process): void; diff --git a/web/static/node_modules/jest-worker/build/workers/messageParent.js b/web/static/node_modules/jest-worker/build/workers/messageParent.js deleted file mode 100644 index 51765ff3..00000000 --- a/web/static/node_modules/jest-worker/build/workers/messageParent.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = messageParent; - -var _types = require('../types'); - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const isWorkerThread = (() => { - try { - // `Require` here to support Node v10 - const {isMainThread, parentPort} = require('worker_threads'); - - return !isMainThread && parentPort != null; - } catch { - return false; - } -})(); - -function messageParent(message, parentProcess = process) { - if (isWorkerThread) { - // `Require` here to support Node v10 - const {parentPort} = require('worker_threads'); // ! is safe due to `null` check in `isWorkerThread` - - parentPort.postMessage([_types.PARENT_MESSAGE_CUSTOM, message]); - } else if (typeof parentProcess.send === 'function') { - parentProcess.send([_types.PARENT_MESSAGE_CUSTOM, message]); - } else { - throw new Error('"messageParent" can only be used inside a worker'); - } -} diff --git a/web/static/node_modules/jest-worker/build/workers/processChild.d.ts b/web/static/node_modules/jest-worker/build/workers/processChild.d.ts deleted file mode 100644 index fac0c7e3..00000000 --- a/web/static/node_modules/jest-worker/build/workers/processChild.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export {}; diff --git a/web/static/node_modules/jest-worker/build/workers/processChild.js b/web/static/node_modules/jest-worker/build/workers/processChild.js deleted file mode 100644 index fdf766ec..00000000 --- a/web/static/node_modules/jest-worker/build/workers/processChild.js +++ /dev/null @@ -1,148 +0,0 @@ -'use strict'; - -var _types = require('../types'); - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -let file = null; -let setupArgs = []; -let initialized = false; -/** - * This file is a small bootstrapper for workers. It sets up the communication - * between the worker and the parent process, interpreting parent messages and - * sending results back. - * - * The file loaded will be lazily initialized the first time any of the workers - * is called. This is done for optimal performance: if the farm is initialized, - * but no call is made to it, child Node processes will be consuming the least - * possible amount of memory. - * - * If an invalid message is detected, the child will exit (by throwing) with a - * non-zero exit code. - */ - -const messageListener = request => { - switch (request[0]) { - case _types.CHILD_MESSAGE_INITIALIZE: - const init = request; - file = init[2]; - setupArgs = request[3]; - break; - - case _types.CHILD_MESSAGE_CALL: - const call = request; - execMethod(call[2], call[3]); - break; - - case _types.CHILD_MESSAGE_END: - end(); - break; - - default: - throw new TypeError( - 'Unexpected request from parent process: ' + request[0] - ); - } -}; - -process.on('message', messageListener); - -function reportSuccess(result) { - if (!process || !process.send) { - throw new Error('Child can only be used on a forked process'); - } - - process.send([_types.PARENT_MESSAGE_OK, result]); -} - -function reportClientError(error) { - return reportError(error, _types.PARENT_MESSAGE_CLIENT_ERROR); -} - -function reportInitializeError(error) { - return reportError(error, _types.PARENT_MESSAGE_SETUP_ERROR); -} - -function reportError(error, type) { - if (!process || !process.send) { - throw new Error('Child can only be used on a forked process'); - } - - if (error == null) { - error = new Error('"null" or "undefined" thrown'); - } - - process.send([ - type, - error.constructor && error.constructor.name, - error.message, - error.stack, - typeof error === 'object' ? {...error} : error - ]); -} - -function end() { - const main = require(file); - - if (!main.teardown) { - exitProcess(); - return; - } - - execFunction(main.teardown, main, [], exitProcess, exitProcess); -} - -function exitProcess() { - // Clean up open handles so the process ideally exits gracefully - process.removeListener('message', messageListener); -} - -function execMethod(method, args) { - const main = require(file); - - let fn; - - if (method === 'default') { - fn = main.__esModule ? main['default'] : main; - } else { - fn = main[method]; - } - - function execHelper() { - execFunction(fn, main, args, reportSuccess, reportClientError); - } - - if (initialized || !main.setup) { - execHelper(); - return; - } - - initialized = true; - execFunction(main.setup, main, setupArgs, execHelper, reportInitializeError); -} - -const isPromise = obj => - !!obj && - (typeof obj === 'object' || typeof obj === 'function') && - typeof obj.then === 'function'; - -function execFunction(fn, ctx, args, onResult, onError) { - let result; - - try { - result = fn.apply(ctx, args); - } catch (err) { - onError(err); - return; - } - - if (isPromise(result)) { - result.then(onResult, onError); - } else { - onResult(result); - } -} diff --git a/web/static/node_modules/jest-worker/build/workers/threadChild.d.ts b/web/static/node_modules/jest-worker/build/workers/threadChild.d.ts deleted file mode 100644 index fac0c7e3..00000000 --- a/web/static/node_modules/jest-worker/build/workers/threadChild.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export {}; diff --git a/web/static/node_modules/jest-worker/build/workers/threadChild.js b/web/static/node_modules/jest-worker/build/workers/threadChild.js deleted file mode 100644 index dae1e649..00000000 --- a/web/static/node_modules/jest-worker/build/workers/threadChild.js +++ /dev/null @@ -1,159 +0,0 @@ -'use strict'; - -function _worker_threads() { - const data = require('worker_threads'); - - _worker_threads = function () { - return data; - }; - - return data; -} - -var _types = require('../types'); - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -let file = null; -let setupArgs = []; -let initialized = false; -/** - * This file is a small bootstrapper for workers. It sets up the communication - * between the worker and the parent process, interpreting parent messages and - * sending results back. - * - * The file loaded will be lazily initialized the first time any of the workers - * is called. This is done for optimal performance: if the farm is initialized, - * but no call is made to it, child Node processes will be consuming the least - * possible amount of memory. - * - * If an invalid message is detected, the child will exit (by throwing) with a - * non-zero exit code. - */ - -const messageListener = request => { - switch (request[0]) { - case _types.CHILD_MESSAGE_INITIALIZE: - const init = request; - file = init[2]; - setupArgs = request[3]; - process.env.JEST_WORKER_ID = request[4]; - break; - - case _types.CHILD_MESSAGE_CALL: - const call = request; - execMethod(call[2], call[3]); - break; - - case _types.CHILD_MESSAGE_END: - end(); - break; - - default: - throw new TypeError( - 'Unexpected request from parent process: ' + request[0] - ); - } -}; - -_worker_threads().parentPort.on('message', messageListener); - -function reportSuccess(result) { - if (_worker_threads().isMainThread) { - throw new Error('Child can only be used on a forked process'); - } - - _worker_threads().parentPort.postMessage([_types.PARENT_MESSAGE_OK, result]); -} - -function reportClientError(error) { - return reportError(error, _types.PARENT_MESSAGE_CLIENT_ERROR); -} - -function reportInitializeError(error) { - return reportError(error, _types.PARENT_MESSAGE_SETUP_ERROR); -} - -function reportError(error, type) { - if (_worker_threads().isMainThread) { - throw new Error('Child can only be used on a forked process'); - } - - if (error == null) { - error = new Error('"null" or "undefined" thrown'); - } - - _worker_threads().parentPort.postMessage([ - type, - error.constructor && error.constructor.name, - error.message, - error.stack, - typeof error === 'object' ? {...error} : error - ]); -} - -function end() { - const main = require(file); - - if (!main.teardown) { - exitProcess(); - return; - } - - execFunction(main.teardown, main, [], exitProcess, exitProcess); -} - -function exitProcess() { - // Clean up open handles so the worker ideally exits gracefully - _worker_threads().parentPort.removeListener('message', messageListener); -} - -function execMethod(method, args) { - const main = require(file); - - let fn; - - if (method === 'default') { - fn = main.__esModule ? main['default'] : main; - } else { - fn = main[method]; - } - - function execHelper() { - execFunction(fn, main, args, reportSuccess, reportClientError); - } - - if (initialized || !main.setup) { - execHelper(); - return; - } - - initialized = true; - execFunction(main.setup, main, setupArgs, execHelper, reportInitializeError); -} - -const isPromise = obj => - !!obj && - (typeof obj === 'object' || typeof obj === 'function') && - typeof obj.then === 'function'; - -function execFunction(fn, ctx, args, onResult, onError) { - let result; - - try { - result = fn.apply(ctx, args); - } catch (err) { - onError(err); - return; - } - - if (isPromise(result)) { - result.then(onResult, onError); - } else { - onResult(result); - } -} diff --git a/web/static/node_modules/jest-worker/package.json b/web/static/node_modules/jest-worker/package.json deleted file mode 100644 index 06280d1c..00000000 --- a/web/static/node_modules/jest-worker/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "jest-worker", - "version": "27.5.1", - "repository": { - "type": "git", - "url": "https://github.com/facebook/jest.git", - "directory": "packages/jest-worker" - }, - "license": "MIT", - "main": "./build/index.js", - "types": "./build/index.d.ts", - "exports": { - ".": { - "types": "./build/index.d.ts", - "default": "./build/index.js" - }, - "./package.json": "./package.json" - }, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "devDependencies": { - "@types/merge-stream": "^1.1.2", - "@types/supports-color": "^8.1.0", - "get-stream": "^6.0.0", - "jest-leak-detector": "^27.5.1", - "worker-farm": "^1.6.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "67c1aa20c5fec31366d733e901fee2b981cb1850" -} diff --git a/web/static/node_modules/json-parse-even-better-errors/CHANGELOG.md b/web/static/node_modules/json-parse-even-better-errors/CHANGELOG.md deleted file mode 100644 index dfd67330..00000000 --- a/web/static/node_modules/json-parse-even-better-errors/CHANGELOG.md +++ /dev/null @@ -1,50 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -## 2.0.0 - -* Add custom error classes - -
    -## [1.0.2](https://github.com/npm/json-parse-even-better-errors/compare/v1.0.1...v1.0.2) (2018-03-30) - - -### Bug Fixes - -* **messages:** More friendly messages for non-string ([#1](https://github.com/npm/json-parse-even-better-errors/issues/1)) ([a476d42](https://github.com/npm/json-parse-even-better-errors/commit/a476d42)) - - - - -## [1.0.1](https://github.com/npm/json-parse-even-better-errors/compare/v1.0.0...v1.0.1) (2017-08-16) - - -### Bug Fixes - -* **license:** oops. Forgot to update license.md ([efe2958](https://github.com/npm/json-parse-even-better-errors/commit/efe2958)) - - - - -# 1.0.0 (2017-08-15) - - -### Features - -* **init:** Initial Commit ([562c977](https://github.com/npm/json-parse-even-better-errors/commit/562c977)) - - -### BREAKING CHANGES - -* **init:** This is the first commit! - - - - -# 0.1.0 (2017-08-15) - - -### Features - -* **init:** Initial Commit ([9dd1a19](https://github.com/npm/json-parse-even-better-errors/commit/9dd1a19)) diff --git a/web/static/node_modules/json-parse-even-better-errors/LICENSE.md b/web/static/node_modules/json-parse-even-better-errors/LICENSE.md deleted file mode 100644 index 6991b7cb..00000000 --- a/web/static/node_modules/json-parse-even-better-errors/LICENSE.md +++ /dev/null @@ -1,25 +0,0 @@ -Copyright 2017 Kat Marchán -Copyright npm, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - ---- - -This library is a fork of 'better-json-errors' by Kat Marchán, extended and -distributed under the terms of the MIT license above. diff --git a/web/static/node_modules/json-parse-even-better-errors/README.md b/web/static/node_modules/json-parse-even-better-errors/README.md deleted file mode 100644 index 2799efe6..00000000 --- a/web/static/node_modules/json-parse-even-better-errors/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# json-parse-even-better-errors - -[`json-parse-even-better-errors`](https://github.com/npm/json-parse-even-better-errors) -is a Node.js library for getting nicer errors out of `JSON.parse()`, -including context and position of the parse errors. - -It also preserves the newline and indentation styles of the JSON data, by -putting them in the object or array in the `Symbol.for('indent')` and -`Symbol.for('newline')` properties. - -## Install - -`$ npm install --save json-parse-even-better-errors` - -## Table of Contents - -* [Example](#example) -* [Features](#features) -* [Contributing](#contributing) -* [API](#api) - * [`parse`](#parse) - -### Example - -```javascript -const parseJson = require('json-parse-even-better-errors') - -parseJson('"foo"') // returns the string 'foo' -parseJson('garbage') // more useful error message -parseJson.noExceptions('garbage') // returns undefined -``` - -### Features - -* Like JSON.parse, but the errors are better. -* Strips a leading byte-order-mark that you sometimes get reading files. -* Has a `noExceptions` method that returns undefined rather than throwing. -* Attaches the newline character(s) used to the `Symbol.for('newline')` - property on objects and arrays. -* Attaches the indentation character(s) used to the `Symbol.for('indent')` - property on objects and arrays. - -## Indentation - -To preserve indentation when the file is saved back to disk, use -`data[Symbol.for('indent')]` as the third argument to `JSON.stringify`, and -if you want to preserve windows `\r\n` newlines, replace the `\n` chars in -the string with `data[Symbol.for('newline')]`. - -For example: - -```js -const txt = await readFile('./package.json', 'utf8') -const data = parseJsonEvenBetterErrors(txt) -const indent = Symbol.for('indent') -const newline = Symbol.for('newline') -// .. do some stuff to the data .. -const string = JSON.stringify(data, null, data[indent]) + '\n' -const eolFixed = data[newline] === '\n' ? string - : string.replace(/\n/g, data[newline]) -await writeFile('./package.json', eolFixed) -``` - -Indentation is determined by looking at the whitespace between the initial -`{` and `[` and the character that follows it. If you have lots of weird -inconsistent indentation, then it won't track that or give you any way to -preserve it. Whether this is a bug or a feature is debatable ;) - -### API - -#### `parse(txt, reviver = null, context = 20)` - -Works just like `JSON.parse`, but will include a bit more information when -an error happens, and attaches a `Symbol.for('indent')` and -`Symbol.for('newline')` on objects and arrays. This throws a -`JSONParseError`. - -#### `parse.noExceptions(txt, reviver = null)` - -Works just like `JSON.parse`, but will return `undefined` rather than -throwing an error. - -#### `class JSONParseError(er, text, context = 20, caller = null)` - -Extends the JavaScript `SyntaxError` class to parse the message and provide -better metadata. - -Pass in the error thrown by the built-in `JSON.parse`, and the text being -parsed, and it'll parse out the bits needed to be helpful. - -`context` defaults to 20. - -Set a `caller` function to trim internal implementation details out of the -stack trace. When calling `parseJson`, this is set to the `parseJson` -function. If not set, then the constructor defaults to itself, so the -stack trace will point to the spot where you call `new JSONParseError`. diff --git a/web/static/node_modules/json-parse-even-better-errors/index.js b/web/static/node_modules/json-parse-even-better-errors/index.js deleted file mode 100644 index 86a1fdc1..00000000 --- a/web/static/node_modules/json-parse-even-better-errors/index.js +++ /dev/null @@ -1,121 +0,0 @@ -'use strict' - -const hexify = char => { - const h = char.charCodeAt(0).toString(16).toUpperCase() - return '0x' + (h.length % 2 ? '0' : '') + h -} - -const parseError = (e, txt, context) => { - if (!txt) { - return { - message: e.message + ' while parsing empty string', - position: 0, - } - } - const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i) - const errIdx = badToken ? +badToken[2] - : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 - : null - - const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${ - JSON.stringify(badToken[1]) - } (${hexify(badToken[1])})`) - : e.message - - if (errIdx !== null && errIdx !== undefined) { - const start = errIdx <= context ? 0 - : errIdx - context - - const end = errIdx + context >= txt.length ? txt.length - : errIdx + context - - const slice = (start === 0 ? '' : '...') + - txt.slice(start, end) + - (end === txt.length ? '' : '...') - - const near = txt === slice ? '' : 'near ' - - return { - message: msg + ` while parsing ${near}${JSON.stringify(slice)}`, - position: errIdx, - } - } else { - return { - message: msg + ` while parsing '${txt.slice(0, context * 2)}'`, - position: 0, - } - } -} - -class JSONParseError extends SyntaxError { - constructor (er, txt, context, caller) { - context = context || 20 - const metadata = parseError(er, txt, context) - super(metadata.message) - Object.assign(this, metadata) - this.code = 'EJSONPARSE' - this.systemError = er - Error.captureStackTrace(this, caller || this.constructor) - } - get name () { return this.constructor.name } - set name (n) {} - get [Symbol.toStringTag] () { return this.constructor.name } -} - -const kIndent = Symbol.for('indent') -const kNewline = Symbol.for('newline') -// only respect indentation if we got a line break, otherwise squash it -// things other than objects and arrays aren't indented, so ignore those -// Important: in both of these regexps, the $1 capture group is the newline -// or undefined, and the $2 capture group is the indent, or undefined. -const formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/ -const emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/ - -const parseJson = (txt, reviver, context) => { - const parseText = stripBOM(txt) - context = context || 20 - try { - // get the indentation so that we can save it back nicely - // if the file starts with {" then we have an indent of '', ie, none - // otherwise, pick the indentation of the next line after the first \n - // If the pattern doesn't match, then it means no indentation. - // JSON.stringify ignores symbols, so this is reasonably safe. - // if the string is '{}' or '[]', then use the default 2-space indent. - const [, newline = '\n', indent = ' '] = parseText.match(emptyRE) || - parseText.match(formatRE) || - [, '', ''] - - const result = JSON.parse(parseText, reviver) - if (result && typeof result === 'object') { - result[kNewline] = newline - result[kIndent] = indent - } - return result - } catch (e) { - if (typeof txt !== 'string' && !Buffer.isBuffer(txt)) { - const isEmptyArray = Array.isArray(txt) && txt.length === 0 - throw Object.assign(new TypeError( - `Cannot parse ${isEmptyArray ? 'an empty array' : String(txt)}` - ), { - code: 'EJSONPARSE', - systemError: e, - }) - } - - throw new JSONParseError(e, parseText, context, parseJson) - } -} - -// Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) -// because the buffer-to-string conversion in `fs.readFileSync()` -// translates it to FEFF, the UTF-16 BOM. -const stripBOM = txt => String(txt).replace(/^\uFEFF/, '') - -module.exports = parseJson -parseJson.JSONParseError = JSONParseError - -parseJson.noExceptions = (txt, reviver) => { - try { - return JSON.parse(stripBOM(txt), reviver) - } catch (e) {} -} diff --git a/web/static/node_modules/json-parse-even-better-errors/package.json b/web/static/node_modules/json-parse-even-better-errors/package.json deleted file mode 100644 index ed0fdaf2..00000000 --- a/web/static/node_modules/json-parse-even-better-errors/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "json-parse-even-better-errors", - "version": "2.3.1", - "description": "JSON.parse with context information on error", - "main": "index.js", - "files": [ - "*.js" - ], - "scripts": { - "preversion": "npm t", - "postversion": "npm publish", - "prepublishOnly": "git push --follow-tags", - "test": "tap", - "snap": "tap" - }, - "repository": "https://github.com/npm/json-parse-even-better-errors", - "keywords": [ - "JSON", - "parser" - ], - "author": { - "name": "Kat Marchán", - "email": "kzm@zkat.tech", - "twitter": "maybekatz" - }, - "license": "MIT", - "devDependencies": { - "tap": "^14.6.5" - }, - "tap": { - "check-coverage": true - } -} diff --git a/web/static/node_modules/json-schema-traverse/.eslintrc.yml b/web/static/node_modules/json-schema-traverse/.eslintrc.yml deleted file mode 100644 index ab1762da..00000000 --- a/web/static/node_modules/json-schema-traverse/.eslintrc.yml +++ /dev/null @@ -1,27 +0,0 @@ -extends: eslint:recommended -env: - node: true - browser: true -rules: - block-scoped-var: 2 - complexity: [2, 13] - curly: [2, multi-or-nest, consistent] - dot-location: [2, property] - dot-notation: 2 - indent: [2, 2, SwitchCase: 1] - linebreak-style: [2, unix] - new-cap: 2 - no-console: [2, allow: [warn, error]] - no-else-return: 2 - no-eq-null: 2 - no-fallthrough: 2 - no-invalid-this: 2 - no-return-assign: 2 - no-shadow: 1 - no-trailing-spaces: 2 - no-use-before-define: [2, nofunc] - quotes: [2, single, avoid-escape] - semi: [2, always] - strict: [2, global] - valid-jsdoc: [2, requireReturn: false] - no-control-regex: 0 diff --git a/web/static/node_modules/json-schema-traverse/.travis.yml b/web/static/node_modules/json-schema-traverse/.travis.yml deleted file mode 100644 index 7ddce74b..00000000 --- a/web/static/node_modules/json-schema-traverse/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "4" - - "6" - - "7" - - "8" -after_script: - - coveralls < coverage/lcov.info diff --git a/web/static/node_modules/json-schema-traverse/LICENSE b/web/static/node_modules/json-schema-traverse/LICENSE deleted file mode 100644 index 7f154356..00000000 --- a/web/static/node_modules/json-schema-traverse/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/json-schema-traverse/README.md b/web/static/node_modules/json-schema-traverse/README.md deleted file mode 100644 index d5ccaf45..00000000 --- a/web/static/node_modules/json-schema-traverse/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# json-schema-traverse -Traverse JSON Schema passing each schema object to callback - -[![Build Status](https://travis-ci.org/epoberezkin/json-schema-traverse.svg?branch=master)](https://travis-ci.org/epoberezkin/json-schema-traverse) -[![npm version](https://badge.fury.io/js/json-schema-traverse.svg)](https://www.npmjs.com/package/json-schema-traverse) -[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/json-schema-traverse/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master) - - -## Install - -``` -npm install json-schema-traverse -``` - - -## Usage - -```javascript -const traverse = require('json-schema-traverse'); -const schema = { - properties: { - foo: {type: 'string'}, - bar: {type: 'integer'} - } -}; - -traverse(schema, {cb}); -// cb is called 3 times with: -// 1. root schema -// 2. {type: 'string'} -// 3. {type: 'integer'} - -// Or: - -traverse(schema, {cb: {pre, post}}); -// pre is called 3 times with: -// 1. root schema -// 2. {type: 'string'} -// 3. {type: 'integer'} -// -// post is called 3 times with: -// 1. {type: 'string'} -// 2. {type: 'integer'} -// 3. root schema - -``` - -Callback function `cb` is called for each schema object (not including draft-06 boolean schemas), including the root schema, in pre-order traversal. Schema references ($ref) are not resolved, they are passed as is. Alternatively, you can pass a `{pre, post}` object as `cb`, and then `pre` will be called before traversing child elements, and `post` will be called after all child elements have been traversed. - -Callback is passed these parameters: - -- _schema_: the current schema object -- _JSON pointer_: from the root schema to the current schema object -- _root schema_: the schema passed to `traverse` object -- _parent JSON pointer_: from the root schema to the parent schema object (see below) -- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.) -- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema -- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'` - - -## Traverse objects in all unknown keywords - -```javascript -const traverse = require('json-schema-traverse'); -const schema = { - mySchema: { - minimum: 1, - maximum: 2 - } -}; - -traverse(schema, {allKeys: true, cb}); -// cb is called 2 times with: -// 1. root schema -// 2. mySchema -``` - -Without option `allKeys: true` callback will be called only with root schema. - - -## License - -[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE) diff --git a/web/static/node_modules/json-schema-traverse/index.js b/web/static/node_modules/json-schema-traverse/index.js deleted file mode 100644 index d4a18dfc..00000000 --- a/web/static/node_modules/json-schema-traverse/index.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -var traverse = module.exports = function (schema, opts, cb) { - // Legacy support for v0.3.1 and earlier. - if (typeof opts == 'function') { - cb = opts; - opts = {}; - } - - cb = opts.cb || cb; - var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; - var post = cb.post || function() {}; - - _traverse(opts, pre, post, schema, '', schema); -}; - - -traverse.keywords = { - additionalItems: true, - items: true, - contains: true, - additionalProperties: true, - propertyNames: true, - not: true -}; - -traverse.arrayKeywords = { - items: true, - allOf: true, - anyOf: true, - oneOf: true -}; - -traverse.propsKeywords = { - definitions: true, - properties: true, - patternProperties: true, - dependencies: true -}; - -traverse.skipKeywords = { - default: true, - enum: true, - const: true, - required: true, - maximum: true, - minimum: true, - exclusiveMaximum: true, - exclusiveMinimum: true, - multipleOf: true, - maxLength: true, - minLength: true, - pattern: true, - format: true, - maxItems: true, - minItems: true, - uniqueItems: true, - maxProperties: true, - minProperties: true -}; - - -function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (schema && typeof schema == 'object' && !Array.isArray(schema)) { - pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); - for (var key in schema) { - var sch = schema[key]; - if (Array.isArray(sch)) { - if (key in traverse.arrayKeywords) { - for (var i=0; i { ... }, - // Optional: A function to process the resource - // Must have signature function(context, path, function(err, buffer)) - // By default readResource is used and the resource is added a fileDependency - - readResource: fs.readFile.bind(fs) - // Optional: A function to read the resource - // Only used when 'processResource' is not provided - // Must have signature function(path, function(err, buffer)) - // By default fs.readFile is used -}, function(err, result) { - // err: Error? - - // result.result: Buffer | String - // The result - // only available when no error occured - - // result.resourceBuffer: Buffer - // The raw resource as Buffer (useful for SourceMaps) - // only available when no error occured - - // result.cacheable: Bool - // Is the result cacheable or do it require reexecution? - - // result.fileDependencies: String[] - // An array of paths (existing files) on which the result depends on - - // result.missingDependencies: String[] - // An array of paths (not existing files) on which the result depends on - - // result.contextDependencies: String[] - // An array of paths (directories) on which the result depends on -}) -``` - -More documentation following... - diff --git a/web/static/node_modules/loader-runner/lib/LoaderLoadingError.js b/web/static/node_modules/loader-runner/lib/LoaderLoadingError.js deleted file mode 100644 index fa1e54df..00000000 --- a/web/static/node_modules/loader-runner/lib/LoaderLoadingError.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -class LoadingLoaderError extends Error { - constructor(message) { - super(message); - this.name = "LoaderRunnerError"; - Error.captureStackTrace(this, this.constructor); - } -} - -module.exports = LoadingLoaderError; diff --git a/web/static/node_modules/loader-runner/lib/LoaderRunner.js b/web/static/node_modules/loader-runner/lib/LoaderRunner.js deleted file mode 100644 index 5909261c..00000000 --- a/web/static/node_modules/loader-runner/lib/LoaderRunner.js +++ /dev/null @@ -1,416 +0,0 @@ -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -var fs = require("fs"); -var readFile = fs.readFile.bind(fs); -var loadLoader = require("./loadLoader"); - -function utf8BufferToString(buf) { - var str = buf.toString("utf-8"); - if(str.charCodeAt(0) === 0xFEFF) { - return str.substr(1); - } else { - return str; - } -} - -const PATH_QUERY_FRAGMENT_REGEXP = /^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/; - -/** - * @param {string} str the path with query and fragment - * @returns {{ path: string, query: string, fragment: string }} parsed parts - */ -function parsePathQueryFragment(str) { - var match = PATH_QUERY_FRAGMENT_REGEXP.exec(str); - return { - path: match[1].replace(/\0(.)/g, "$1"), - query: match[2] ? match[2].replace(/\0(.)/g, "$1") : "", - fragment: match[3] || "" - }; -} - -function dirname(path) { - if(path === "/") return "/"; - var i = path.lastIndexOf("/"); - var j = path.lastIndexOf("\\"); - var i2 = path.indexOf("/"); - var j2 = path.indexOf("\\"); - var idx = i > j ? i : j; - var idx2 = i > j ? i2 : j2; - if(idx < 0) return path; - if(idx === idx2) return path.substr(0, idx + 1); - return path.substr(0, idx); -} - -function createLoaderObject(loader) { - var obj = { - path: null, - query: null, - fragment: null, - options: null, - ident: null, - normal: null, - pitch: null, - raw: null, - data: null, - pitchExecuted: false, - normalExecuted: false - }; - Object.defineProperty(obj, "request", { - enumerable: true, - get: function() { - return obj.path.replace(/#/g, "\0#") + obj.query.replace(/#/g, "\0#") + obj.fragment; - }, - set: function(value) { - if(typeof value === "string") { - var splittedRequest = parsePathQueryFragment(value); - obj.path = splittedRequest.path; - obj.query = splittedRequest.query; - obj.fragment = splittedRequest.fragment; - obj.options = undefined; - obj.ident = undefined; - } else { - if(!value.loader) - throw new Error("request should be a string or object with loader and options (" + JSON.stringify(value) + ")"); - obj.path = value.loader; - obj.fragment = value.fragment || ""; - obj.type = value.type; - obj.options = value.options; - obj.ident = value.ident; - if(obj.options === null) - obj.query = ""; - else if(obj.options === undefined) - obj.query = ""; - else if(typeof obj.options === "string") - obj.query = "?" + obj.options; - else if(obj.ident) - obj.query = "??" + obj.ident; - else if(typeof obj.options === "object" && obj.options.ident) - obj.query = "??" + obj.options.ident; - else - obj.query = "?" + JSON.stringify(obj.options); - } - } - }); - obj.request = loader; - if(Object.preventExtensions) { - Object.preventExtensions(obj); - } - return obj; -} - -function runSyncOrAsync(fn, context, args, callback) { - var isSync = true; - var isDone = false; - var isError = false; // internal error - var reportedError = false; - context.async = function async() { - if(isDone) { - if(reportedError) return; // ignore - throw new Error("async(): The callback was already called."); - } - isSync = false; - return innerCallback; - }; - var innerCallback = context.callback = function() { - if(isDone) { - if(reportedError) return; // ignore - throw new Error("callback(): The callback was already called."); - } - isDone = true; - isSync = false; - try { - callback.apply(null, arguments); - } catch(e) { - isError = true; - throw e; - } - }; - try { - var result = (function LOADER_EXECUTION() { - return fn.apply(context, args); - }()); - if(isSync) { - isDone = true; - if(result === undefined) - return callback(); - if(result && typeof result === "object" && typeof result.then === "function") { - return result.then(function(r) { - callback(null, r); - }, callback); - } - return callback(null, result); - } - } catch(e) { - if(isError) throw e; - if(isDone) { - // loader is already "done", so we cannot use the callback function - // for better debugging we print the error on the console - if(typeof e === "object" && e.stack) console.error(e.stack); - else console.error(e); - return; - } - isDone = true; - reportedError = true; - callback(e); - } - -} - -function convertArgs(args, raw) { - if(!raw && Buffer.isBuffer(args[0])) - args[0] = utf8BufferToString(args[0]); - else if(raw && typeof args[0] === "string") - args[0] = Buffer.from(args[0], "utf-8"); -} - -function iteratePitchingLoaders(options, loaderContext, callback) { - // abort after last loader - if(loaderContext.loaderIndex >= loaderContext.loaders.length) - return processResource(options, loaderContext, callback); - - var currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex]; - - // iterate - if(currentLoaderObject.pitchExecuted) { - loaderContext.loaderIndex++; - return iteratePitchingLoaders(options, loaderContext, callback); - } - - // load loader module - loadLoader(currentLoaderObject, function(err) { - if(err) { - loaderContext.cacheable(false); - return callback(err); - } - var fn = currentLoaderObject.pitch; - currentLoaderObject.pitchExecuted = true; - if(!fn) return iteratePitchingLoaders(options, loaderContext, callback); - - runSyncOrAsync( - fn, - loaderContext, [loaderContext.remainingRequest, loaderContext.previousRequest, currentLoaderObject.data = {}], - function(err) { - if(err) return callback(err); - var args = Array.prototype.slice.call(arguments, 1); - // Determine whether to continue the pitching process based on - // argument values (as opposed to argument presence) in order - // to support synchronous and asynchronous usages. - var hasArg = args.some(function(value) { - return value !== undefined; - }); - if(hasArg) { - loaderContext.loaderIndex--; - iterateNormalLoaders(options, loaderContext, args, callback); - } else { - iteratePitchingLoaders(options, loaderContext, callback); - } - } - ); - }); -} - -function processResource(options, loaderContext, callback) { - // set loader index to last loader - loaderContext.loaderIndex = loaderContext.loaders.length - 1; - - var resourcePath = loaderContext.resourcePath; - if(resourcePath) { - options.processResource(loaderContext, resourcePath, function(err) { - if(err) return callback(err); - var args = Array.prototype.slice.call(arguments, 1); - options.resourceBuffer = args[0]; - iterateNormalLoaders(options, loaderContext, args, callback); - }); - } else { - iterateNormalLoaders(options, loaderContext, [null], callback); - } -} - -function iterateNormalLoaders(options, loaderContext, args, callback) { - if(loaderContext.loaderIndex < 0) - return callback(null, args); - - var currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex]; - - // iterate - if(currentLoaderObject.normalExecuted) { - loaderContext.loaderIndex--; - return iterateNormalLoaders(options, loaderContext, args, callback); - } - - var fn = currentLoaderObject.normal; - currentLoaderObject.normalExecuted = true; - if(!fn) { - return iterateNormalLoaders(options, loaderContext, args, callback); - } - - convertArgs(args, currentLoaderObject.raw); - - runSyncOrAsync(fn, loaderContext, args, function(err) { - if(err) return callback(err); - - var args = Array.prototype.slice.call(arguments, 1); - iterateNormalLoaders(options, loaderContext, args, callback); - }); -} - -exports.getContext = function getContext(resource) { - var path = parsePathQueryFragment(resource).path; - return dirname(path); -}; - -exports.runLoaders = function runLoaders(options, callback) { - // read options - var resource = options.resource || ""; - var loaders = options.loaders || []; - var loaderContext = options.context || {}; - var processResource = options.processResource || ((readResource, context, resource, callback) => { - context.addDependency(resource); - readResource(resource, callback); - }).bind(null, options.readResource || readFile); - - // - var splittedResource = resource && parsePathQueryFragment(resource); - var resourcePath = splittedResource ? splittedResource.path : undefined; - var resourceQuery = splittedResource ? splittedResource.query : undefined; - var resourceFragment = splittedResource ? splittedResource.fragment : undefined; - var contextDirectory = resourcePath ? dirname(resourcePath) : null; - - // execution state - var requestCacheable = true; - var fileDependencies = []; - var contextDependencies = []; - var missingDependencies = []; - - // prepare loader objects - loaders = loaders.map(createLoaderObject); - - loaderContext.context = contextDirectory; - loaderContext.loaderIndex = 0; - loaderContext.loaders = loaders; - loaderContext.resourcePath = resourcePath; - loaderContext.resourceQuery = resourceQuery; - loaderContext.resourceFragment = resourceFragment; - loaderContext.async = null; - loaderContext.callback = null; - loaderContext.cacheable = function cacheable(flag) { - if(flag === false) { - requestCacheable = false; - } - }; - loaderContext.dependency = loaderContext.addDependency = function addDependency(file) { - fileDependencies.push(file); - }; - loaderContext.addContextDependency = function addContextDependency(context) { - contextDependencies.push(context); - }; - loaderContext.addMissingDependency = function addMissingDependency(context) { - missingDependencies.push(context); - }; - loaderContext.getDependencies = function getDependencies() { - return fileDependencies.slice(); - }; - loaderContext.getContextDependencies = function getContextDependencies() { - return contextDependencies.slice(); - }; - loaderContext.getMissingDependencies = function getMissingDependencies() { - return missingDependencies.slice(); - }; - loaderContext.clearDependencies = function clearDependencies() { - fileDependencies.length = 0; - contextDependencies.length = 0; - missingDependencies.length = 0; - requestCacheable = true; - }; - Object.defineProperty(loaderContext, "resource", { - enumerable: true, - get: function() { - if(loaderContext.resourcePath === undefined) - return undefined; - return loaderContext.resourcePath.replace(/#/g, "\0#") + loaderContext.resourceQuery.replace(/#/g, "\0#") + loaderContext.resourceFragment; - }, - set: function(value) { - var splittedResource = value && parsePathQueryFragment(value); - loaderContext.resourcePath = splittedResource ? splittedResource.path : undefined; - loaderContext.resourceQuery = splittedResource ? splittedResource.query : undefined; - loaderContext.resourceFragment = splittedResource ? splittedResource.fragment : undefined; - } - }); - Object.defineProperty(loaderContext, "request", { - enumerable: true, - get: function() { - return loaderContext.loaders.map(function(o) { - return o.request; - }).concat(loaderContext.resource || "").join("!"); - } - }); - Object.defineProperty(loaderContext, "remainingRequest", { - enumerable: true, - get: function() { - if(loaderContext.loaderIndex >= loaderContext.loaders.length - 1 && !loaderContext.resource) - return ""; - return loaderContext.loaders.slice(loaderContext.loaderIndex + 1).map(function(o) { - return o.request; - }).concat(loaderContext.resource || "").join("!"); - } - }); - Object.defineProperty(loaderContext, "currentRequest", { - enumerable: true, - get: function() { - return loaderContext.loaders.slice(loaderContext.loaderIndex).map(function(o) { - return o.request; - }).concat(loaderContext.resource || "").join("!"); - } - }); - Object.defineProperty(loaderContext, "previousRequest", { - enumerable: true, - get: function() { - return loaderContext.loaders.slice(0, loaderContext.loaderIndex).map(function(o) { - return o.request; - }).join("!"); - } - }); - Object.defineProperty(loaderContext, "query", { - enumerable: true, - get: function() { - var entry = loaderContext.loaders[loaderContext.loaderIndex]; - return entry.options && typeof entry.options === "object" ? entry.options : entry.query; - } - }); - Object.defineProperty(loaderContext, "data", { - enumerable: true, - get: function() { - return loaderContext.loaders[loaderContext.loaderIndex].data; - } - }); - - // finish loader context - if(Object.preventExtensions) { - Object.preventExtensions(loaderContext); - } - - var processOptions = { - resourceBuffer: null, - processResource: processResource - }; - iteratePitchingLoaders(processOptions, loaderContext, function(err, result) { - if(err) { - return callback(err, { - cacheable: requestCacheable, - fileDependencies: fileDependencies, - contextDependencies: contextDependencies, - missingDependencies: missingDependencies - }); - } - callback(null, { - result: result, - resourceBuffer: processOptions.resourceBuffer, - cacheable: requestCacheable, - fileDependencies: fileDependencies, - contextDependencies: contextDependencies, - missingDependencies: missingDependencies - }); - }); -}; diff --git a/web/static/node_modules/loader-runner/lib/loadLoader.js b/web/static/node_modules/loader-runner/lib/loadLoader.js deleted file mode 100644 index 12103534..00000000 --- a/web/static/node_modules/loader-runner/lib/loadLoader.js +++ /dev/null @@ -1,54 +0,0 @@ -var LoaderLoadingError = require("./LoaderLoadingError"); -var url; - -module.exports = function loadLoader(loader, callback) { - if(loader.type === "module") { - try { - if(url === undefined) url = require("url"); - var loaderUrl = url.pathToFileURL(loader.path); - var modulePromise = eval("import(" + JSON.stringify(loaderUrl.toString()) + ")"); - modulePromise.then(function(module) { - handleResult(loader, module, callback); - }, callback); - return; - } catch(e) { - callback(e); - } - } else { - try { - var module = require(loader.path); - } catch(e) { - // it is possible for node to choke on a require if the FD descriptor - // limit has been reached. give it a chance to recover. - if(e instanceof Error && e.code === "EMFILE") { - var retry = loadLoader.bind(null, loader, callback); - if(typeof setImmediate === "function") { - // node >= 0.9.0 - return setImmediate(retry); - } else { - // node < 0.9.0 - return process.nextTick(retry); - } - } - return callback(e); - } - return handleResult(loader, module, callback); - } -}; - -function handleResult(loader, module, callback) { - if(typeof module !== "function" && typeof module !== "object") { - return callback(new LoaderLoadingError( - "Module '" + loader.path + "' is not a loader (export function or es6 module)" - )); - } - loader.normal = typeof module === "function" ? module : module.default; - loader.pitch = module.pitch; - loader.raw = module.raw; - if(typeof loader.normal !== "function" && typeof loader.pitch !== "function") { - return callback(new LoaderLoadingError( - "Module '" + loader.path + "' is not a loader (must have normal or pitch function)" - )); - } - callback(); -} diff --git a/web/static/node_modules/loader-runner/package.json b/web/static/node_modules/loader-runner/package.json deleted file mode 100644 index f8db868c..00000000 --- a/web/static/node_modules/loader-runner/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "loader-runner", - "version": "4.3.0", - "description": "Runs (webpack) loaders", - "main": "lib/LoaderRunner.js", - "scripts": { - "lint": "eslint lib test", - "pretest": "npm run lint", - "test": "mocha --reporter spec", - "precover": "npm run lint", - "cover": "istanbul cover node_modules/mocha/bin/_mocha" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/webpack/loader-runner.git" - }, - "keywords": [ - "webpack", - "loader" - ], - "author": "Tobias Koppers @sokra", - "license": "MIT", - "bugs": { - "url": "https://github.com/webpack/loader-runner/issues" - }, - "homepage": "https://github.com/webpack/loader-runner#readme", - "engines": { - "node": ">=6.11.5" - }, - "files": [ - "lib/", - "bin/", - "hot/", - "web_modules/", - "schemas/" - ], - "devDependencies": { - "eslint": "^3.12.2", - "eslint-plugin-node": "^3.0.5", - "eslint-plugin-nodeca": "^1.0.3", - "istanbul": "^0.4.1", - "mocha": "^3.2.0", - "should": "^8.0.2" - } -} diff --git a/web/static/node_modules/merge-stream/LICENSE b/web/static/node_modules/merge-stream/LICENSE deleted file mode 100644 index 94a4c0a0..00000000 --- a/web/static/node_modules/merge-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Stephen Sugden (stephensugden.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/web/static/node_modules/merge-stream/README.md b/web/static/node_modules/merge-stream/README.md deleted file mode 100644 index 0d548411..00000000 --- a/web/static/node_modules/merge-stream/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# merge-stream - -Merge (interleave) a bunch of streams. - -[![build status](https://secure.travis-ci.org/grncdr/merge-stream.svg?branch=master)](http://travis-ci.org/grncdr/merge-stream) - -## Synopsis - -```javascript -var stream1 = new Stream(); -var stream2 = new Stream(); - -var merged = mergeStream(stream1, stream2); - -var stream3 = new Stream(); -merged.add(stream3); -merged.isEmpty(); -//=> false -``` - -## Description - -This is adapted from [event-stream](https://github.com/dominictarr/event-stream) separated into a new module, using Streams3. - -## API - -### `mergeStream` - -Type: `function` - -Merges an arbitrary number of streams. Returns a merged stream. - -#### `merged.add` - -A method to dynamically add more sources to the stream. The argument supplied to `add` can be either a source or an array of sources. - -#### `merged.isEmpty` - -A method that tells you if the merged stream is empty. - -When a stream is "empty" (aka. no sources were added), it could not be returned to a gulp task. - -So, we could do something like this: - -```js -stream = require('merge-stream')(); -// Something like a loop to add some streams to the merge stream -// stream.add(streamA); -// stream.add(streamB); -return stream.isEmpty() ? null : stream; -``` - -## Gulp example - -An example use case for **merge-stream** is to combine parts of a task in a project's **gulpfile.js** like this: - -```js -const gulp = require('gulp'); -const htmlValidator = require('gulp-w3c-html-validator'); -const jsHint = require('gulp-jshint'); -const mergeStream = require('merge-stream'); - -function lint() { - return mergeStream( - gulp.src('src/*.html') - .pipe(htmlValidator()) - .pipe(htmlValidator.reporter()), - gulp.src('src/*.js') - .pipe(jsHint()) - .pipe(jsHint.reporter()) - ); -} -gulp.task('lint', lint); -``` - -## License - -MIT diff --git a/web/static/node_modules/merge-stream/index.js b/web/static/node_modules/merge-stream/index.js deleted file mode 100644 index b1a9e1a0..00000000 --- a/web/static/node_modules/merge-stream/index.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -const { PassThrough } = require('stream'); - -module.exports = function (/*streams...*/) { - var sources = [] - var output = new PassThrough({objectMode: true}) - - output.setMaxListeners(0) - - output.add = add - output.isEmpty = isEmpty - - output.on('unpipe', remove) - - Array.prototype.slice.call(arguments).forEach(add) - - return output - - function add (source) { - if (Array.isArray(source)) { - source.forEach(add) - return this - } - - sources.push(source); - source.once('end', remove.bind(null, source)) - source.once('error', output.emit.bind(output, 'error')) - source.pipe(output, {end: false}) - return this - } - - function isEmpty () { - return sources.length == 0; - } - - function remove (source) { - sources = sources.filter(function (it) { return it !== source }) - if (!sources.length && output.readable) { output.end() } - } -} diff --git a/web/static/node_modules/merge-stream/package.json b/web/static/node_modules/merge-stream/package.json deleted file mode 100644 index 1a4c54ca..00000000 --- a/web/static/node_modules/merge-stream/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "merge-stream", - "version": "2.0.0", - "description": "Create a stream that emits events from multiple other streams", - "files": [ - "index.js" - ], - "scripts": { - "test": "istanbul cover test.js && istanbul check-cover --statements 100 --branches 100" - }, - "repository": "grncdr/merge-stream", - "author": "Stephen Sugden ", - "license": "MIT", - "dependencies": {}, - "devDependencies": { - "from2": "^2.0.3", - "istanbul": "^0.4.5" - } -} diff --git a/web/static/node_modules/micromatch/LICENSE b/web/static/node_modules/micromatch/LICENSE deleted file mode 100755 index 9af4a67d..00000000 --- a/web/static/node_modules/micromatch/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-present, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/web/static/node_modules/micromatch/README.md b/web/static/node_modules/micromatch/README.md deleted file mode 100644 index d72a059a..00000000 --- a/web/static/node_modules/micromatch/README.md +++ /dev/null @@ -1,1024 +0,0 @@ -# micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![NPM total downloads](https://img.shields.io/npm/dt/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Tests](https://github.com/micromatch/micromatch/actions/workflows/test.yml/badge.svg)](https://github.com/micromatch/micromatch/actions/workflows/test.yml) - -> Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Table of Contents - -
    -Details - - * [Install](#install) -- [Sponsors](#sponsors) - * [Gold Sponsors](#gold-sponsors) - * [Quickstart](#quickstart) - * [Why use micromatch?](#why-use-micromatch) - + [Matching features](#matching-features) - * [Switching to micromatch](#switching-to-micromatch) - + [From minimatch](#from-minimatch) - + [From multimatch](#from-multimatch) - * [API](#api) - * [Options](#options) - * [Options Examples](#options-examples) - + [options.basename](#optionsbasename) - + [options.bash](#optionsbash) - + [options.expandRange](#optionsexpandrange) - + [options.format](#optionsformat) - + [options.ignore](#optionsignore) - + [options.matchBase](#optionsmatchbase) - + [options.noextglob](#optionsnoextglob) - + [options.nonegate](#optionsnonegate) - + [options.noglobstar](#optionsnoglobstar) - + [options.nonull](#optionsnonull) - + [options.nullglob](#optionsnullglob) - + [options.onIgnore](#optionsonignore) - + [options.onMatch](#optionsonmatch) - + [options.onResult](#optionsonresult) - + [options.posixSlashes](#optionsposixslashes) - + [options.unescape](#optionsunescape) - * [Extended globbing](#extended-globbing) - + [Extglobs](#extglobs) - + [Braces](#braces) - + [Regex character classes](#regex-character-classes) - + [Regex groups](#regex-groups) - + [POSIX bracket expressions](#posix-bracket-expressions) - * [Notes](#notes) - + [Bash 4.3 parity](#bash-43-parity) - + [Backslashes](#backslashes) - * [Benchmarks](#benchmarks) - + [Running benchmarks](#running-benchmarks) - + [Latest results](#latest-results) - * [Contributing](#contributing) - * [About](#about) - -
    - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save micromatch -``` - -
    - -# Sponsors - -[Become a Sponsor](https://github.com/sponsors/jonschlinkert) to add your logo to this README, or any of [my other projects](https://github.com/jonschlinkert?tab=repositories&q=&type=&language=&sort=stargazers) - -
    - -## Quickstart - -```js -const micromatch = require('micromatch'); -// micromatch(list, patterns[, options]); -``` - -The [main export](#micromatch) takes a list of strings and one or more glob patterns: - -```js -console.log(micromatch(['foo', 'bar', 'baz', 'qux'], ['f*', 'b*'])) //=> ['foo', 'bar', 'baz'] -console.log(micromatch(['foo', 'bar', 'baz', 'qux'], ['*', '!b*'])) //=> ['foo', 'qux'] -``` - -Use [.isMatch()](#ismatch) to for boolean matching: - -```js -console.log(micromatch.isMatch('foo', 'f*')) //=> true -console.log(micromatch.isMatch('foo', ['b*', 'f*'])) //=> true -``` - -[Switching](#switching-to-micromatch) from minimatch and multimatch is easy! - -
    - -## Why use micromatch? - -> micromatch is a [replacement](#switching-to-micromatch) for minimatch and multimatch - -* Supports all of the same matching features as [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) -* More complete support for the Bash 4.3 specification than minimatch and multimatch. Micromatch passes _all of the spec tests_ from bash, including some that bash still fails. -* **Fast & Performant** - Loads in about 5ms and performs [fast matches](#benchmarks). -* **Glob matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories -* **[Advanced globbing](#extended-globbing)** - Supports [extglobs](#extglobs), [braces](#braces-1), and [POSIX brackets](#posix-bracket-expressions), and support for escaping special characters with `\` or quotes. -* **Accurate** - Covers more scenarios [than minimatch](https://github.com/yarnpkg/yarn/pull/3339) -* **Well tested** - More than 5,000 [test assertions](./test) -* **Windows support** - More reliable windows support than minimatch and multimatch. -* **[Safe](https://github.com/micromatch/braces#braces-is-safe)** - Micromatch is not subject to DoS with brace patterns like minimatch and multimatch. - -### Matching features - -* Support for multiple glob patterns (no need for wrappers like multimatch) -* Wildcards (`**`, `*.js`) -* Negation (`'!a/*.js'`, `'*!(b).js'`) -* [extglobs](#extglobs) (`+(x|y)`, `!(a|b)`) -* [POSIX character classes](#posix-bracket-expressions) (`[[:alpha:][:digit:]]`) -* [brace expansion](https://github.com/micromatch/braces) (`foo/{1..5}.md`, `bar/{a,b,c}.js`) -* regex character classes (`foo-[1-5].js`) -* regex logical "or" (`foo/(abc|xyz).js`) - -You can mix and match these features to create whatever patterns you need! - -## Switching to micromatch - -_(There is one notable difference between micromatch and minimatch in regards to how backslashes are handled. See [the notes about backslashes](#backslashes) for more information.)_ - -### From minimatch - -Use [micromatch.isMatch()](#ismatch) instead of `minimatch()`: - -```js -console.log(micromatch.isMatch('foo', 'b*')); //=> false -``` - -Use [micromatch.match()](#match) instead of `minimatch.match()`: - -```js -console.log(micromatch.match(['foo', 'bar'], 'b*')); //=> 'bar' -``` - -### From multimatch - -Same signature: - -```js -console.log(micromatch(['foo', 'bar', 'baz'], ['f*', '*z'])); //=> ['foo', 'baz'] -``` - -## API - -**Params** - -* `list` **{String|Array}**: List of strings to match. -* `patterns` **{String|Array}**: One or more glob patterns to use for matching. -* `options` **{Object}**: See available [options](#options) -* `returns` **{Array}**: Returns an array of matches - -**Example** - -```js -const mm = require('micromatch'); -// mm(list, patterns[, options]); - -console.log(mm(['a.js', 'a.txt'], ['*.js'])); -//=> [ 'a.js' ] -``` - -### [.matcher](index.js#L109) - -Returns a matcher function from the given glob `pattern` and `options`. The returned function takes a string to match as its only argument and returns true if the string is a match. - -**Params** - -* `pattern` **{String}**: Glob pattern -* `options` **{Object}** -* `returns` **{Function}**: Returns a matcher function. - -**Example** - -```js -const mm = require('micromatch'); -// mm.matcher(pattern[, options]); - -const isMatch = mm.matcher('*.!(*a)'); -console.log(isMatch('a.a')); //=> false -console.log(isMatch('a.b')); //=> true -``` - -### [.isMatch](index.js#L128) - -Returns true if **any** of the given glob `patterns` match the specified `string`. - -**Params** - -* `str` **{String}**: The string to test. -* `patterns` **{String|Array}**: One or more glob patterns to use for matching. -* `[options]` **{Object}**: See available [options](#options). -* `returns` **{Boolean}**: Returns true if any patterns match `str` - -**Example** - -```js -const mm = require('micromatch'); -// mm.isMatch(string, patterns[, options]); - -console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true -console.log(mm.isMatch('a.a', 'b.*')); //=> false -``` - -### [.not](index.js#L153) - -Returns a list of strings that _**do not match any**_ of the given `patterns`. - -**Params** - -* `list` **{Array}**: Array of strings to match. -* `patterns` **{String|Array}**: One or more glob pattern to use for matching. -* `options` **{Object}**: See available [options](#options) for changing how matches are performed -* `returns` **{Array}**: Returns an array of strings that **do not match** the given patterns. - -**Example** - -```js -const mm = require('micromatch'); -// mm.not(list, patterns[, options]); - -console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); -//=> ['b.b', 'c.c'] -``` - -### [.contains](index.js#L193) - -Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string. - -**Params** - -* `str` **{String}**: The string to match. -* `patterns` **{String|Array}**: Glob pattern to use for matching. -* `options` **{Object}**: See available [options](#options) for changing how matches are performed -* `returns` **{Boolean}**: Returns true if any of the patterns matches any part of `str`. - -**Example** - -```js -var mm = require('micromatch'); -// mm.contains(string, pattern[, options]); - -console.log(mm.contains('aa/bb/cc', '*b')); -//=> true -console.log(mm.contains('aa/bb/cc', '*d')); -//=> false -``` - -### [.matchKeys](index.js#L235) - -Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys. If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead. - -**Params** - -* `object` **{Object}**: The object with keys to filter. -* `patterns` **{String|Array}**: One or more glob patterns to use for matching. -* `options` **{Object}**: See available [options](#options) for changing how matches are performed -* `returns` **{Object}**: Returns an object with only keys that match the given patterns. - -**Example** - -```js -const mm = require('micromatch'); -// mm.matchKeys(object, patterns[, options]); - -const obj = { aa: 'a', ab: 'b', ac: 'c' }; -console.log(mm.matchKeys(obj, '*b')); -//=> { ab: 'b' } -``` - -### [.some](index.js#L264) - -Returns true if some of the strings in the given `list` match any of the given glob `patterns`. - -**Params** - -* `list` **{String|Array}**: The string or array of strings to test. Returns as soon as the first match is found. -* `patterns` **{String|Array}**: One or more glob patterns to use for matching. -* `options` **{Object}**: See available [options](#options) for changing how matches are performed -* `returns` **{Boolean}**: Returns true if any `patterns` matches any of the strings in `list` - -**Example** - -```js -const mm = require('micromatch'); -// mm.some(list, patterns[, options]); - -console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); -// true -console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); -// false -``` - -### [.every](index.js#L300) - -Returns true if every string in the given `list` matches any of the given glob `patterns`. - -**Params** - -* `list` **{String|Array}**: The string or array of strings to test. -* `patterns` **{String|Array}**: One or more glob patterns to use for matching. -* `options` **{Object}**: See available [options](#options) for changing how matches are performed -* `returns` **{Boolean}**: Returns true if all `patterns` matches all of the strings in `list` - -**Example** - -```js -const mm = require('micromatch'); -// mm.every(list, patterns[, options]); - -console.log(mm.every('foo.js', ['foo.js'])); -// true -console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); -// true -console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); -// false -console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); -// false -``` - -### [.all](index.js#L339) - -Returns true if **all** of the given `patterns` match the specified string. - -**Params** - -* `str` **{String|Array}**: The string to test. -* `patterns` **{String|Array}**: One or more glob patterns to use for matching. -* `options` **{Object}**: See available [options](#options) for changing how matches are performed -* `returns` **{Boolean}**: Returns true if any patterns match `str` - -**Example** - -```js -const mm = require('micromatch'); -// mm.all(string, patterns[, options]); - -console.log(mm.all('foo.js', ['foo.js'])); -// true - -console.log(mm.all('foo.js', ['*.js', '!foo.js'])); -// false - -console.log(mm.all('foo.js', ['*.js', 'foo.js'])); -// true - -console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); -// true -``` - -### [.capture](index.js#L366) - -Returns an array of matches captured by `pattern` in `string, or`null` if the pattern did not match. - -**Params** - -* `glob` **{String}**: Glob pattern to use for matching. -* `input` **{String}**: String to match -* `options` **{Object}**: See available [options](#options) for changing how matches are performed -* `returns` **{Array|null}**: Returns an array of captures if the input matches the glob pattern, otherwise `null`. - -**Example** - -```js -const mm = require('micromatch'); -// mm.capture(pattern, string[, options]); - -console.log(mm.capture('test/*.js', 'test/foo.js')); -//=> ['foo'] -console.log(mm.capture('test/*.js', 'foo/bar.css')); -//=> null -``` - -### [.makeRe](index.js#L392) - -Create a regular expression from the given glob `pattern`. - -**Params** - -* `pattern` **{String}**: A glob pattern to convert to regex. -* `options` **{Object}** -* `returns` **{RegExp}**: Returns a regex created from the given pattern. - -**Example** - -```js -const mm = require('micromatch'); -// mm.makeRe(pattern[, options]); - -console.log(mm.makeRe('*.js')); -//=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ -``` - -### [.scan](index.js#L408) - -Scan a glob pattern to separate the pattern into segments. Used by the [split](#split) method. - -**Params** - -* `pattern` **{String}** -* `options` **{Object}** -* `returns` **{Object}**: Returns an object with - -**Example** - -```js -const mm = require('micromatch'); -const state = mm.scan(pattern[, options]); -``` - -### [.parse](index.js#L424) - -Parse a glob pattern to create the source string for a regular expression. - -**Params** - -* `glob` **{String}** -* `options` **{Object}** -* `returns` **{Object}**: Returns an object with useful properties and output to be used as regex source string. - -**Example** - -```js -const mm = require('micromatch'); -const state = mm.parse(pattern[, options]); -``` - -### [.braces](index.js#L451) - -Process the given brace `pattern`. - -**Params** - -* `pattern` **{String}**: String with brace pattern to process. -* `options` **{Object}**: Any [options](#options) to change how expansion is performed. See the [braces](https://github.com/micromatch/braces) library for all available options. -* `returns` **{Array}** - -**Example** - -```js -const { braces } = require('micromatch'); -console.log(braces('foo/{a,b,c}/bar')); -//=> [ 'foo/(a|b|c)/bar' ] - -console.log(braces('foo/{a,b,c}/bar', { expand: true })); -//=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] -``` - -## Options - -| **Option** | **Type** | **Default value** | **Description** | -| --- | --- | --- | --- | -| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. | -| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). | -| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. | -| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). | -| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` | -| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. | -| `dot` | `boolean` | `false` | Match dotfiles. Otherwise dotfiles are ignored unless a `.` is explicitly defined in the pattern. | -| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. This option is overridden by the `expandBrace` option. | -| `failglob` | `boolean` | `false` | Similar to the `failglob` behavior in Bash, throws an error when no matches are found. Based on the bash option of the same name. | -| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. | -| `flags` | `boolean` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. | -| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. | -| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. | -| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. | -| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. | -| `lookbehinds` | `boolean` | `true` | Support regex positive and negative lookbehinds. Note that you must be using Node 8.1.10 or higher to enable regex lookbehinds. | -| `matchBase` | `boolean` | `false` | Alias for `basename` | -| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. | -| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. | -| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. | -| `nocase` | `boolean` | `false` | Perform case-insensitive matching. Equivalent to the regex `i` flag. Note that this option is ignored when the `flags` option is defined. | -| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. | -| `noext` | `boolean` | `false` | Alias for `noextglob` | -| `noextglob` | `boolean` | `false` | Disable support for matching with [extglobs](#extglobs) (like `+(a\|b)`) | -| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) | -| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` | -| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. | -| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. | -| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. | -| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. | -| `posix` | `boolean` | `false` | Support [POSIX character classes](#posix-bracket-expressions) ("posix brackets"). | -| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself | -| `prepend` | `string` | `undefined` | String to prepend to the generated regex used for matching. | -| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). | -| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. | -| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. | -| `unescape` | `boolean` | `undefined` | Remove preceding backslashes from escaped glob characters before creating the regular expression to perform matches. | -| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatitibility. | - -## Options Examples - -### options.basename - -Allow glob patterns without slashes to match a file path based on its basename. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `matchBase`. - -**Type**: `Boolean` - -**Default**: `false` - -**Example** - -```js -micromatch(['a/b.js', 'a/c.md'], '*.js'); -//=> [] - -micromatch(['a/b.js', 'a/c.md'], '*.js', { basename: true }); -//=> ['a/b.js'] -``` - -### options.bash - -Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. Instead, the star is treated the same as any other star. - -**Type**: `Boolean` - -**Default**: `true` - -**Example** - -```js -const files = ['abc', 'ajz']; -console.log(micromatch(files, '[a-c]*')); -//=> ['abc', 'ajz'] - -console.log(micromatch(files, '[a-c]*', { bash: false })); -``` - -### options.expandRange - -**Type**: `function` - -**Default**: `undefined` - -Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need. - -**Example** - -The following example shows how to create a glob that matches a numeric folder name between `01` and `25`, with leading zeros. - -```js -const fill = require('fill-range'); -const regex = micromatch.makeRe('foo/{01..25}/bar', { - expandRange(a, b) { - return `(${fill(a, b, { toRegex: true })})`; - } -}); - -console.log(regex) -//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/ - -console.log(regex.test('foo/00/bar')) // false -console.log(regex.test('foo/01/bar')) // true -console.log(regex.test('foo/10/bar')) // true -console.log(regex.test('foo/22/bar')) // true -console.log(regex.test('foo/25/bar')) // true -console.log(regex.test('foo/26/bar')) // false -``` - -### options.format - -**Type**: `function` - -**Default**: `undefined` - -Custom function for formatting strings before they're matched. - -**Example** - -```js -// strip leading './' from strings -const format = str => str.replace(/^\.\//, ''); -const isMatch = picomatch('foo/*.js', { format }); -console.log(isMatch('./foo/bar.js')) //=> true -``` - -### options.ignore - -String or array of glob patterns to match files to ignore. - -**Type**: `String|Array` - -**Default**: `undefined` - -```js -const isMatch = micromatch.matcher('*', { ignore: 'f*' }); -console.log(isMatch('foo')) //=> false -console.log(isMatch('bar')) //=> true -console.log(isMatch('baz')) //=> true -``` - -### options.matchBase - -Alias for [options.basename](#options-basename). - -### options.noextglob - -Disable extglob support, so that [extglobs](#extglobs) are regarded as literal characters. - -**Type**: `Boolean` - -**Default**: `undefined` - -**Examples** - -```js -console.log(micromatch(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)')); -//=> ['a/b', 'a/!(z)'] - -console.log(micromatch(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)', { noextglob: true })); -//=> ['a/!(z)'] (matches only as literal characters) -``` - -### options.nonegate - -Disallow negation (`!`) patterns, and treat leading `!` as a literal character to match. - -**Type**: `Boolean` - -**Default**: `undefined` - -### options.noglobstar - -Disable matching with globstars (`**`). - -**Type**: `Boolean` - -**Default**: `undefined` - -```js -micromatch(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**'); -//=> ['a/b', 'a/b/c', 'a/b/c/d'] - -micromatch(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**', {noglobstar: true}); -//=> ['a/b'] -``` - -### options.nonull - -Alias for [options.nullglob](#options-nullglob). - -### options.nullglob - -If `true`, when no matches are found the actual (arrayified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `nonull`. - -**Type**: `Boolean` - -**Default**: `undefined` - -### options.onIgnore - -```js -const onIgnore = ({ glob, regex, input, output }) => { - console.log({ glob, regex, input, output }); - // { glob: '*', regex: /^(?:(?!\.)(?=.)[^\/]*?\/?)$/, input: 'foo', output: 'foo' } -}; - -const isMatch = micromatch.matcher('*', { onIgnore, ignore: 'f*' }); -isMatch('foo'); -isMatch('bar'); -isMatch('baz'); -``` - -### options.onMatch - -```js -const onMatch = ({ glob, regex, input, output }) => { - console.log({ input, output }); - // { input: 'some\\path', output: 'some/path' } - // { input: 'some\\path', output: 'some/path' } - // { input: 'some\\path', output: 'some/path' } -}; - -const isMatch = micromatch.matcher('**', { onMatch, posixSlashes: true }); -isMatch('some\\path'); -isMatch('some\\path'); -isMatch('some\\path'); -``` - -### options.onResult - -```js -const onResult = ({ glob, regex, input, output }) => { - console.log({ glob, regex, input, output }); -}; - -const isMatch = micromatch('*', { onResult, ignore: 'f*' }); -isMatch('foo'); -isMatch('bar'); -isMatch('baz'); -``` - -### options.posixSlashes - -Convert path separators on returned files to posix/unix-style forward slashes. Aliased as `unixify` for backwards compatibility. - -**Type**: `Boolean` - -**Default**: `true` on windows, `false` everywhere else. - -**Example** - -```js -console.log(micromatch.match(['a\\b\\c'], 'a/**')); -//=> ['a/b/c'] - -console.log(micromatch.match(['a\\b\\c'], { posixSlashes: false })); -//=> ['a\\b\\c'] -``` - -### options.unescape - -Remove backslashes from escaped glob characters before creating the regular expression to perform matches. - -**Type**: `Boolean` - -**Default**: `undefined` - -**Example** - -In this example we want to match a literal `*`: - -```js -console.log(micromatch.match(['abc', 'a\\*c'], 'a\\*c')); -//=> ['a\\*c'] - -console.log(micromatch.match(['abc', 'a\\*c'], 'a\\*c', { unescape: true })); -//=> ['a*c'] -``` - -
    -
    - -## Extended globbing - -Micromatch supports the following extended globbing features. - -### Extglobs - -Extended globbing, as described by the bash man page: - -| **pattern** | **regex equivalent** | **description** | -| --- | --- | --- | -| `?(pattern)` | `(pattern)?` | Matches zero or one occurrence of the given patterns | -| `*(pattern)` | `(pattern)*` | Matches zero or more occurrences of the given patterns | -| `+(pattern)` | `(pattern)+` | Matches one or more occurrences of the given patterns | -| `@(pattern)` | `(pattern)` * | Matches one of the given patterns | -| `!(pattern)` | N/A (equivalent regex is much more complicated) | Matches anything except one of the given patterns | - -* Note that `@` isn't a regex character. - -### Braces - -Brace patterns can be used to match specific ranges or sets of characters. - -**Example** - -The pattern `{f,b}*/{1..3}/{b,q}*` would match any of following strings: - -``` -foo/1/bar -foo/2/bar -foo/3/bar -baz/1/qux -baz/2/qux -baz/3/qux -``` - -Visit [braces](https://github.com/micromatch/braces) to see the full range of features and options related to brace expansion, or to create brace matching or expansion related issues. - -### Regex character classes - -Given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: - -* `[ac].js`: matches both `a` and `c`, returning `['a.js', 'c.js']` -* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` -* `a/[A-Z].js`: matches and uppercase letter, returning `['a/E.md']` - -Learn about [regex character classes](http://www.regular-expressions.info/charclass.html). - -### Regex groups - -Given `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: - -* `(a|c).js`: would match either `a` or `c`, returning `['a.js', 'c.js']` -* `(b|d).js`: would match either `b` or `d`, returning `['b.js', 'd.js']` -* `(b|[A-Z]).js`: would match either `b` or an uppercase letter, returning `['b.js', 'E.js']` - -As with regex, parens can be nested, so patterns like `((a|b)|c)/b` will work. Although brace expansion might be friendlier to use, depending on preference. - -### POSIX bracket expressions - -POSIX brackets are intended to be more user-friendly than regex character classes. This of course is in the eye of the beholder. - -**Example** - -```js -console.log(micromatch.isMatch('a1', '[[:alpha:][:digit:]]')) //=> true -console.log(micromatch.isMatch('a1', '[[:alpha:][:alpha:]]')) //=> false -``` - -*** - -## Notes - -### Bash 4.3 parity - -Whenever possible matching behavior is based on behavior Bash 4.3, which is mostly consistent with minimatch. - -However, it's suprising how many edge cases and rabbit holes there are with glob matching, and since there is no real glob specification, and micromatch is more accurate than both Bash and minimatch, there are cases where best-guesses were made for behavior. In a few cases where Bash had no answers, we used wildmatch (used by git) as a fallback. - -### Backslashes - -There is an important, notable difference between minimatch and micromatch _in regards to how backslashes are handled_ in glob patterns. - -* Micromatch exclusively and explicitly reserves backslashes for escaping characters in a glob pattern, even on windows, which is consistent with bash behavior. _More importantly, unescaping globs can result in unsafe regular expressions_. -* Minimatch converts all backslashes to forward slashes, which means you can't use backslashes to escape any characters in your glob patterns. - -We made this decision for micromatch for a couple of reasons: - -* Consistency with bash conventions. -* Glob patterns are not filepaths. They are a type of [regular language](https://en.wikipedia.org/wiki/Regular_language) that is converted to a JavaScript regular expression. Thus, when forward slashes are defined in a glob pattern, the resulting regular expression will match windows or POSIX path separators just fine. - -**A note about joining paths to globs** - -Note that when you pass something like `path.join('foo', '*')` to micromatch, you are creating a filepath and expecting it to still work as a glob pattern. This causes problems on windows, since the `path.sep` is `\\`. - -In other words, since `\\` is reserved as an escape character in globs, on windows `path.join('foo', '*')` would result in `foo\\*`, which tells micromatch to match `*` as a literal character. This is the same behavior as bash. - -To solve this, you might be inspired to do something like `'foo\\*'.replace(/\\/g, '/')`, but this causes another, potentially much more serious, problem. - -## Benchmarks - -### Running benchmarks - -Install dependencies for running benchmarks: - -```sh -$ cd bench && npm install -``` - -Run the benchmarks: - -```sh -$ npm run bench -``` - -### Latest results - -As of August 23, 2024 (longer bars are better): - -```sh -# .makeRe star - micromatch x 2,232,802 ops/sec ±2.34% (89 runs sampled)) - minimatch x 781,018 ops/sec ±6.74% (92 runs sampled)) - -# .makeRe star; dot=true - micromatch x 1,863,453 ops/sec ±0.74% (93 runs sampled) - minimatch x 723,105 ops/sec ±0.75% (93 runs sampled) - -# .makeRe globstar - micromatch x 1,624,179 ops/sec ±2.22% (91 runs sampled) - minimatch x 1,117,230 ops/sec ±2.78% (86 runs sampled)) - -# .makeRe globstars - micromatch x 1,658,642 ops/sec ±0.86% (92 runs sampled) - minimatch x 741,224 ops/sec ±1.24% (89 runs sampled)) - -# .makeRe with leading star - micromatch x 1,525,014 ops/sec ±1.63% (90 runs sampled) - minimatch x 561,074 ops/sec ±3.07% (89 runs sampled) - -# .makeRe - braces - micromatch x 172,478 ops/sec ±2.37% (78 runs sampled) - minimatch x 96,087 ops/sec ±2.34% (88 runs sampled))) - -# .makeRe braces - range (expanded) - micromatch x 26,973 ops/sec ±0.84% (89 runs sampled) - minimatch x 3,023 ops/sec ±0.99% (90 runs sampled)) - -# .makeRe braces - range (compiled) - micromatch x 152,892 ops/sec ±1.67% (83 runs sampled) - minimatch x 992 ops/sec ±3.50% (89 runs sampled)d)) - -# .makeRe braces - nested ranges (expanded) - micromatch x 15,816 ops/sec ±13.05% (80 runs sampled) - minimatch x 2,953 ops/sec ±1.64% (91 runs sampled) - -# .makeRe braces - nested ranges (compiled) - micromatch x 110,881 ops/sec ±1.85% (82 runs sampled) - minimatch x 1,008 ops/sec ±1.51% (91 runs sampled) - -# .makeRe braces - set (compiled) - micromatch x 134,930 ops/sec ±3.54% (63 runs sampled)) - minimatch x 43,242 ops/sec ±0.60% (93 runs sampled) - -# .makeRe braces - nested sets (compiled) - micromatch x 94,455 ops/sec ±1.74% (69 runs sampled)) - minimatch x 27,720 ops/sec ±1.84% (93 runs sampled)) -``` - -## Contributing - -All contributions are welcome! Please read [the contributing guide](.github/contributing.md) to get started. - -**Bug reports** - -Please create an issue if you encounter a bug or matching behavior that doesn't seem correct. If you find a matching-related issue, please: - -* [research existing issues first](../../issues) (open and closed) -* visit the [GNU Bash documentation](https://www.gnu.org/software/bash/manual/) to see how Bash deals with the pattern -* visit the [minimatch](https://github.com/isaacs/minimatch) documentation to cross-check expected behavior in node.js -* if all else fails, since there is no real specification for globs we will probably need to discuss expected behavior and decide how to resolve it. which means any detail you can provide to help with this discussion would be greatly appreciated. - -**Platform issues** - -It's important to us that micromatch work consistently on all platforms. If you encounter any platform-specific matching or path related issues, please let us know (pull requests are also greatly appreciated). - -## About - -
    -Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. - -
    - -
    -Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
    - -
    -Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
    - -### Related projects - -You might also be interested in these projects: - -* [braces](https://www.npmjs.com/package/braces): Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support… [more](https://github.com/micromatch/braces) | [homepage](https://github.com/micromatch/braces "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.") -* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/micromatch/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") -* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") -* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") -* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/micromatch/nanomatch) | [homepage](https://github.com/micromatch/nanomatch "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 523 | [jonschlinkert](https://github.com/jonschlinkert) | -| 12 | [es128](https://github.com/es128) | -| 9 | [danez](https://github.com/danez) | -| 8 | [doowb](https://github.com/doowb) | -| 6 | [paulmillr](https://github.com/paulmillr) | -| 5 | [mrmlnc](https://github.com/mrmlnc) | -| 3 | [DrPizza](https://github.com/DrPizza) | -| 2 | [Tvrqvoise](https://github.com/Tvrqvoise) | -| 2 | [antonyk](https://github.com/antonyk) | -| 2 | [MartinKolarik](https://github.com/MartinKolarik) | -| 2 | [Glazy](https://github.com/Glazy) | -| 2 | [mceIdo](https://github.com/mceIdo) | -| 2 | [TrySound](https://github.com/TrySound) | -| 1 | [yvele](https://github.com/yvele) | -| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | -| 1 | [simlu](https://github.com/simlu) | -| 1 | [curbengh](https://github.com/curbengh) | -| 1 | [fidian](https://github.com/fidian) | -| 1 | [tomByrer](https://github.com/tomByrer) | -| 1 | [ZoomerTedJackson](https://github.com/ZoomerTedJackson) | -| 1 | [styfle](https://github.com/styfle) | -| 1 | [sebdeckers](https://github.com/sebdeckers) | -| 1 | [muescha](https://github.com/muescha) | -| 1 | [juszczykjakub](https://github.com/juszczykjakub) | -| 1 | [joyceerhl](https://github.com/joyceerhl) | -| 1 | [donatj](https://github.com/donatj) | -| 1 | [frangio](https://github.com/frangio) | -| 1 | [UltCombo](https://github.com/UltCombo) | -| 1 | [DianeLooney](https://github.com/DianeLooney) | -| 1 | [devongovett](https://github.com/devongovett) | -| 1 | [Cslove](https://github.com/Cslove) | -| 1 | [amilajack](https://github.com/amilajack) | - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -### License - -Copyright © 2024, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on August 23, 2024._ \ No newline at end of file diff --git a/web/static/node_modules/micromatch/index.js b/web/static/node_modules/micromatch/index.js deleted file mode 100644 index cb9d9ef3..00000000 --- a/web/static/node_modules/micromatch/index.js +++ /dev/null @@ -1,474 +0,0 @@ -'use strict'; - -const util = require('util'); -const braces = require('braces'); -const picomatch = require('picomatch'); -const utils = require('picomatch/lib/utils'); - -const isEmptyString = v => v === '' || v === './'; -const hasBraces = v => { - const index = v.indexOf('{'); - return index > -1 && v.indexOf('}', index) > -1; -}; - -/** - * Returns an array of strings that match one or more glob patterns. - * - * ```js - * const mm = require('micromatch'); - * // mm(list, patterns[, options]); - * - * console.log(mm(['a.js', 'a.txt'], ['*.js'])); - * //=> [ 'a.js' ] - * ``` - * @param {String|Array} `list` List of strings to match. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) - * @return {Array} Returns an array of matches - * @summary false - * @api public - */ - -const micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - - let omit = new Set(); - let keep = new Set(); - let items = new Set(); - let negatives = 0; - - let onResult = state => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) negatives++; - - for (let item of list) { - let matched = isMatch(item, true); - - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) continue; - - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter(item => !omit.has(item)); - - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(', ')}"`); - } - - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns; - } - } - - return matches; -}; - -/** - * Backwards compatibility - */ - -micromatch.match = micromatch; - -/** - * Returns a matcher function from the given glob `pattern` and `options`. - * The returned function takes a string to match as its only argument and returns - * true if the string is a match. - * - * ```js - * const mm = require('micromatch'); - * // mm.matcher(pattern[, options]); - * - * const isMatch = mm.matcher('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @param {String} `pattern` Glob pattern - * @param {Object} `options` - * @return {Function} Returns a matcher function. - * @api public - */ - -micromatch.matcher = (pattern, options) => picomatch(pattern, options); - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const mm = require('micromatch'); - * // mm.isMatch(string, patterns[, options]); - * - * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(mm.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String} `str` The string to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `[options]` See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Backwards compatibility - */ - -micromatch.any = micromatch.isMatch; - -/** - * Returns a list of strings that _**do not match any**_ of the given `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.not(list, patterns[, options]); - * - * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); - * //=> ['b.b', 'c.c'] - * ``` - * @param {Array} `list` Array of strings to match. - * @param {String|Array} `patterns` One or more glob pattern to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Array} Returns an array of strings that **do not match** the given patterns. - * @api public - */ - -micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = new Set(); - let items = []; - - let onResult = state => { - if (options.onResult) options.onResult(state); - items.push(state.output); - }; - - let matches = new Set(micromatch(list, patterns, { ...options, onResult })); - - for (let item of items) { - if (!matches.has(item)) { - result.add(item); - } - } - return [...result]; -}; - -/** - * Returns true if the given `string` contains the given pattern. Similar - * to [.isMatch](#isMatch) but the pattern can match any part of the string. - * - * ```js - * var mm = require('micromatch'); - * // mm.contains(string, pattern[, options]); - * - * console.log(mm.contains('aa/bb/cc', '*b')); - * //=> true - * console.log(mm.contains('aa/bb/cc', '*d')); - * //=> false - * ``` - * @param {String} `str` The string to match. - * @param {String|Array} `patterns` Glob pattern to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any of the patterns matches any part of `str`. - * @api public - */ - -micromatch.contains = (str, pattern, options) => { - if (typeof str !== 'string') { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - - if (Array.isArray(pattern)) { - return pattern.some(p => micromatch.contains(str, p, options)); - } - - if (typeof pattern === 'string') { - if (isEmptyString(str) || isEmptyString(pattern)) { - return false; - } - - if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) { - return true; - } - } - - return micromatch.isMatch(str, pattern, { ...options, contains: true }); -}; - -/** - * Filter the keys of the given object with the given `glob` pattern - * and `options`. Does not attempt to match nested keys. If you need this feature, - * use [glob-object][] instead. - * - * ```js - * const mm = require('micromatch'); - * // mm.matchKeys(object, patterns[, options]); - * - * const obj = { aa: 'a', ab: 'b', ac: 'c' }; - * console.log(mm.matchKeys(obj, '*b')); - * //=> { ab: 'b' } - * ``` - * @param {Object} `object` The object with keys to filter. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Object} Returns an object with only keys that match the given patterns. - * @api public - */ - -micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError('Expected the first argument to be an object'); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) res[key] = obj[key]; - return res; -}; - -/** - * Returns true if some of the strings in the given `list` match any of the given glob `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.some(list, patterns[, options]); - * - * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); - * // true - * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); - * // false - * ``` - * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list` - * @api public - */ - -micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some(item => isMatch(item))) { - return true; - } - } - return false; -}; - -/** - * Returns true if every string in the given `list` matches - * any of the given glob `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.every(list, patterns[, options]); - * - * console.log(mm.every('foo.js', ['foo.js'])); - * // true - * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); - * // true - * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); - * // false - * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); - * // false - * ``` - * @param {String|Array} `list` The string or array of strings to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list` - * @api public - */ - -micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every(item => isMatch(item))) { - return false; - } - } - return true; -}; - -/** - * Returns true if **all** of the given `patterns` match - * the specified string. - * - * ```js - * const mm = require('micromatch'); - * // mm.all(string, patterns[, options]); - * - * console.log(mm.all('foo.js', ['foo.js'])); - * // true - * - * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); - * // false - * - * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); - * // true - * - * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); - * // true - * ``` - * @param {String|Array} `str` The string to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.all = (str, patterns, options) => { - if (typeof str !== 'string') { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - - return [].concat(patterns).every(p => picomatch(p, options)(str)); -}; - -/** - * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. - * - * ```js - * const mm = require('micromatch'); - * // mm.capture(pattern, string[, options]); - * - * console.log(mm.capture('test/*.js', 'test/foo.js')); - * //=> ['foo'] - * console.log(mm.capture('test/*.js', 'foo/bar.css')); - * //=> null - * ``` - * @param {String} `glob` Glob pattern to use for matching. - * @param {String} `input` String to match - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`. - * @api public - */ - -micromatch.capture = (glob, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - - if (match) { - return match.slice(1).map(v => v === void 0 ? '' : v); - } -}; - -/** - * Create a regular expression from the given glob `pattern`. - * - * ```js - * const mm = require('micromatch'); - * // mm.makeRe(pattern[, options]); - * - * console.log(mm.makeRe('*.js')); - * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ - * ``` - * @param {String} `pattern` A glob pattern to convert to regex. - * @param {Object} `options` - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -micromatch.makeRe = (...args) => picomatch.makeRe(...args); - -/** - * Scan a glob pattern to separate the pattern into segments. Used - * by the [split](#split) method. - * - * ```js - * const mm = require('micromatch'); - * const state = mm.scan(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -micromatch.scan = (...args) => picomatch.scan(...args); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const mm = require('micromatch'); - * const state = mm.parse(pattern[, options]); - * ``` - * @param {String} `glob` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as regex source string. - * @api public - */ - -micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str of braces(String(pattern), options)) { - res.push(picomatch.parse(str, options)); - } - } - return res; -}; - -/** - * Process the given brace `pattern`. - * - * ```js - * const { braces } = require('micromatch'); - * console.log(braces('foo/{a,b,c}/bar')); - * //=> [ 'foo/(a|b|c)/bar' ] - * - * console.log(braces('foo/{a,b,c}/bar', { expand: true })); - * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] - * ``` - * @param {String} `pattern` String with brace pattern to process. - * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. - * @return {Array} - * @api public - */ - -micromatch.braces = (pattern, options) => { - if (typeof pattern !== 'string') throw new TypeError('Expected a string'); - if ((options && options.nobrace === true) || !hasBraces(pattern)) { - return [pattern]; - } - return braces(pattern, options); -}; - -/** - * Expand braces - */ - -micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== 'string') throw new TypeError('Expected a string'); - return micromatch.braces(pattern, { ...options, expand: true }); -}; - -/** - * Expose micromatch - */ - -// exposed for tests -micromatch.hasBraces = hasBraces; -module.exports = micromatch; diff --git a/web/static/node_modules/micromatch/package.json b/web/static/node_modules/micromatch/package.json deleted file mode 100644 index d5558bb9..00000000 --- a/web/static/node_modules/micromatch/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "name": "micromatch", - "description": "Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.", - "version": "4.0.8", - "homepage": "https://github.com/micromatch/micromatch", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "(https://github.com/DianeLooney)", - "Amila Welihinda (amilajack.com)", - "Bogdan Chadkin (https://github.com/TrySound)", - "Brian Woodward (https://twitter.com/doowb)", - "Devon Govett (http://badassjs.com)", - "Elan Shanker (https://github.com/es128)", - "Fabrício Matté (https://ultcombo.js.org)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Martin Kolárik (https://kolarik.sk)", - "Olsten Larck (https://i.am.charlike.online)", - "Paul Miller (paulmillr.com)", - "Tom Byrer (https://github.com/tomByrer)", - "Tyler Akins (http://rumkin.com)", - "Peter Bright (https://github.com/drpizza)", - "Kuba Juszczyk (https://github.com/ku8ar)" - ], - "repository": "micromatch/micromatch", - "bugs": { - "url": "https://github.com/micromatch/micromatch/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=8.6" - }, - "scripts": { - "test": "mocha" - }, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "devDependencies": { - "fill-range": "^7.0.1", - "gulp-format-md": "^2.0.0", - "minimatch": "^5.0.1", - "mocha": "^9.2.2", - "time-require": "github:jonschlinkert/time-require" - }, - "keywords": [ - "bash", - "bracket", - "character-class", - "expand", - "expansion", - "expression", - "extglob", - "extglobs", - "file", - "files", - "filter", - "find", - "glob", - "globbing", - "globs", - "globstar", - "lookahead", - "lookaround", - "lookbehind", - "match", - "matcher", - "matches", - "matching", - "micromatch", - "minimatch", - "multimatch", - "negate", - "negation", - "path", - "pattern", - "patterns", - "posix", - "regex", - "regexp", - "regular", - "shell", - "star", - "wildcard" - ], - "verb": { - "toc": "collapsible", - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "related": { - "list": [ - "braces", - "expand-brackets", - "extglob", - "fill-range", - "nanomatch" - ] - }, - "reflinks": [ - "extglob", - "fill-range", - "glob-object", - "minimatch", - "multimatch" - ] - } -} diff --git a/web/static/node_modules/mime-db/HISTORY.md b/web/static/node_modules/mime-db/HISTORY.md deleted file mode 100644 index 7436f641..00000000 --- a/web/static/node_modules/mime-db/HISTORY.md +++ /dev/null @@ -1,507 +0,0 @@ -1.52.0 / 2022-02-21 -=================== - - * Add extensions from IANA for more `image/*` types - * Add extension `.asc` to `application/pgp-keys` - * Add extensions to various XML types - * Add new upstream MIME types - -1.51.0 / 2021-11-08 -=================== - - * Add new upstream MIME types - * Mark `image/vnd.microsoft.icon` as compressible - * Mark `image/vnd.ms-dds` as compressible - -1.50.0 / 2021-09-15 -=================== - - * Add deprecated iWorks mime types and extensions - * Add new upstream MIME types - -1.49.0 / 2021-07-26 -=================== - - * Add extension `.trig` to `application/trig` - * Add new upstream MIME types - -1.48.0 / 2021-05-30 -=================== - - * Add extension `.mvt` to `application/vnd.mapbox-vector-tile` - * Add new upstream MIME types - * Mark `text/yaml` as compressible - -1.47.0 / 2021-04-01 -=================== - - * Add new upstream MIME types - * Remove ambigious extensions from IANA for `application/*+xml` types - * Update primary extension to `.es` for `application/ecmascript` - -1.46.0 / 2021-02-13 -=================== - - * Add extension `.amr` to `audio/amr` - * Add extension `.m4s` to `video/iso.segment` - * Add extension `.opus` to `audio/ogg` - * Add new upstream MIME types - -1.45.0 / 2020-09-22 -=================== - - * Add `application/ubjson` with extension `.ubj` - * Add `image/avif` with extension `.avif` - * Add `image/ktx2` with extension `.ktx2` - * Add extension `.dbf` to `application/vnd.dbf` - * Add extension `.rar` to `application/vnd.rar` - * Add extension `.td` to `application/urc-targetdesc+xml` - * Add new upstream MIME types - * Fix extension of `application/vnd.apple.keynote` to be `.key` - -1.44.0 / 2020-04-22 -=================== - - * Add charsets from IANA - * Add extension `.cjs` to `application/node` - * Add new upstream MIME types - -1.43.0 / 2020-01-05 -=================== - - * Add `application/x-keepass2` with extension `.kdbx` - * Add extension `.mxmf` to `audio/mobile-xmf` - * Add extensions from IANA for `application/*+xml` types - * Add new upstream MIME types - -1.42.0 / 2019-09-25 -=================== - - * Add `image/vnd.ms-dds` with extension `.dds` - * Add new upstream MIME types - * Remove compressible from `multipart/mixed` - -1.41.0 / 2019-08-30 -=================== - - * Add new upstream MIME types - * Add `application/toml` with extension `.toml` - * Mark `font/ttf` as compressible - -1.40.0 / 2019-04-20 -=================== - - * Add extensions from IANA for `model/*` types - * Add `text/mdx` with extension `.mdx` - -1.39.0 / 2019-04-04 -=================== - - * Add extensions `.siv` and `.sieve` to `application/sieve` - * Add new upstream MIME types - -1.38.0 / 2019-02-04 -=================== - - * Add extension `.nq` to `application/n-quads` - * Add extension `.nt` to `application/n-triples` - * Add new upstream MIME types - * Mark `text/less` as compressible - -1.37.0 / 2018-10-19 -=================== - - * Add extensions to HEIC image types - * Add new upstream MIME types - -1.36.0 / 2018-08-20 -=================== - - * Add Apple file extensions from IANA - * Add extensions from IANA for `image/*` types - * Add new upstream MIME types - -1.35.0 / 2018-07-15 -=================== - - * Add extension `.owl` to `application/rdf+xml` - * Add new upstream MIME types - - Removes extension `.woff` from `application/font-woff` - -1.34.0 / 2018-06-03 -=================== - - * Add extension `.csl` to `application/vnd.citationstyles.style+xml` - * Add extension `.es` to `application/ecmascript` - * Add new upstream MIME types - * Add `UTF-8` as default charset for `text/turtle` - * Mark all XML-derived types as compressible - -1.33.0 / 2018-02-15 -=================== - - * Add extensions from IANA for `message/*` types - * Add new upstream MIME types - * Fix some incorrect OOXML types - * Remove `application/font-woff2` - -1.32.0 / 2017-11-29 -=================== - - * Add new upstream MIME types - * Update `text/hjson` to registered `application/hjson` - * Add `text/shex` with extension `.shex` - -1.31.0 / 2017-10-25 -=================== - - * Add `application/raml+yaml` with extension `.raml` - * Add `application/wasm` with extension `.wasm` - * Add new `font` type from IANA - * Add new upstream font extensions - * Add new upstream MIME types - * Add extensions for JPEG-2000 images - -1.30.0 / 2017-08-27 -=================== - - * Add `application/vnd.ms-outlook` - * Add `application/x-arj` - * Add extension `.mjs` to `application/javascript` - * Add glTF types and extensions - * Add new upstream MIME types - * Add `text/x-org` - * Add VirtualBox MIME types - * Fix `source` records for `video/*` types that are IANA - * Update `font/opentype` to registered `font/otf` - -1.29.0 / 2017-07-10 -=================== - - * Add `application/fido.trusted-apps+json` - * Add extension `.wadl` to `application/vnd.sun.wadl+xml` - * Add new upstream MIME types - * Add `UTF-8` as default charset for `text/css` - -1.28.0 / 2017-05-14 -=================== - - * Add new upstream MIME types - * Add extension `.gz` to `application/gzip` - * Update extensions `.md` and `.markdown` to be `text/markdown` - -1.27.0 / 2017-03-16 -=================== - - * Add new upstream MIME types - * Add `image/apng` with extension `.apng` - -1.26.0 / 2017-01-14 -=================== - - * Add new upstream MIME types - * Add extension `.geojson` to `application/geo+json` - -1.25.0 / 2016-11-11 -=================== - - * Add new upstream MIME types - -1.24.0 / 2016-09-18 -=================== - - * Add `audio/mp3` - * Add new upstream MIME types - -1.23.0 / 2016-05-01 -=================== - - * Add new upstream MIME types - * Add extension `.3gpp` to `audio/3gpp` - -1.22.0 / 2016-02-15 -=================== - - * Add `text/slim` - * Add extension `.rng` to `application/xml` - * Add new upstream MIME types - * Fix extension of `application/dash+xml` to be `.mpd` - * Update primary extension to `.m4a` for `audio/mp4` - -1.21.0 / 2016-01-06 -=================== - - * Add Google document types - * Add new upstream MIME types - -1.20.0 / 2015-11-10 -=================== - - * Add `text/x-suse-ymp` - * Add new upstream MIME types - -1.19.0 / 2015-09-17 -=================== - - * Add `application/vnd.apple.pkpass` - * Add new upstream MIME types - -1.18.0 / 2015-09-03 -=================== - - * Add new upstream MIME types - -1.17.0 / 2015-08-13 -=================== - - * Add `application/x-msdos-program` - * Add `audio/g711-0` - * Add `image/vnd.mozilla.apng` - * Add extension `.exe` to `application/x-msdos-program` - -1.16.0 / 2015-07-29 -=================== - - * Add `application/vnd.uri-map` - -1.15.0 / 2015-07-13 -=================== - - * Add `application/x-httpd-php` - -1.14.0 / 2015-06-25 -=================== - - * Add `application/scim+json` - * Add `application/vnd.3gpp.ussd+xml` - * Add `application/vnd.biopax.rdf+xml` - * Add `text/x-processing` - -1.13.0 / 2015-06-07 -=================== - - * Add nginx as a source - * Add `application/x-cocoa` - * Add `application/x-java-archive-diff` - * Add `application/x-makeself` - * Add `application/x-perl` - * Add `application/x-pilot` - * Add `application/x-redhat-package-manager` - * Add `application/x-sea` - * Add `audio/x-m4a` - * Add `audio/x-realaudio` - * Add `image/x-jng` - * Add `text/mathml` - -1.12.0 / 2015-06-05 -=================== - - * Add `application/bdoc` - * Add `application/vnd.hyperdrive+json` - * Add `application/x-bdoc` - * Add extension `.rtf` to `text/rtf` - -1.11.0 / 2015-05-31 -=================== - - * Add `audio/wav` - * Add `audio/wave` - * Add extension `.litcoffee` to `text/coffeescript` - * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` - * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` - -1.10.0 / 2015-05-19 -=================== - - * Add `application/vnd.balsamiq.bmpr` - * Add `application/vnd.microsoft.portable-executable` - * Add `application/x-ns-proxy-autoconfig` - -1.9.1 / 2015-04-19 -================== - - * Remove `.json` extension from `application/manifest+json` - - This is causing bugs downstream - -1.9.0 / 2015-04-19 -================== - - * Add `application/manifest+json` - * Add `application/vnd.micro+json` - * Add `image/vnd.zbrush.pcx` - * Add `image/x-ms-bmp` - -1.8.0 / 2015-03-13 -================== - - * Add `application/vnd.citationstyles.style+xml` - * Add `application/vnd.fastcopy-disk-image` - * Add `application/vnd.gov.sk.xmldatacontainer+xml` - * Add extension `.jsonld` to `application/ld+json` - -1.7.0 / 2015-02-08 -================== - - * Add `application/vnd.gerber` - * Add `application/vnd.msa-disk-image` - -1.6.1 / 2015-02-05 -================== - - * Community extensions ownership transferred from `node-mime` - -1.6.0 / 2015-01-29 -================== - - * Add `application/jose` - * Add `application/jose+json` - * Add `application/json-seq` - * Add `application/jwk+json` - * Add `application/jwk-set+json` - * Add `application/jwt` - * Add `application/rdap+json` - * Add `application/vnd.gov.sk.e-form+xml` - * Add `application/vnd.ims.imsccv1p3` - -1.5.0 / 2014-12-30 -================== - - * Add `application/vnd.oracle.resource+json` - * Fix various invalid MIME type entries - - `application/mbox+xml` - - `application/oscp-response` - - `application/vwg-multiplexed` - - `audio/g721` - -1.4.0 / 2014-12-21 -================== - - * Add `application/vnd.ims.imsccv1p2` - * Fix various invalid MIME type entries - - `application/vnd-acucobol` - - `application/vnd-curl` - - `application/vnd-dart` - - `application/vnd-dxr` - - `application/vnd-fdf` - - `application/vnd-mif` - - `application/vnd-sema` - - `application/vnd-wap-wmlc` - - `application/vnd.adobe.flash-movie` - - `application/vnd.dece-zip` - - `application/vnd.dvb_service` - - `application/vnd.micrografx-igx` - - `application/vnd.sealed-doc` - - `application/vnd.sealed-eml` - - `application/vnd.sealed-mht` - - `application/vnd.sealed-ppt` - - `application/vnd.sealed-tiff` - - `application/vnd.sealed-xls` - - `application/vnd.sealedmedia.softseal-html` - - `application/vnd.sealedmedia.softseal-pdf` - - `application/vnd.wap-slc` - - `application/vnd.wap-wbxml` - - `audio/vnd.sealedmedia.softseal-mpeg` - - `image/vnd-djvu` - - `image/vnd-svf` - - `image/vnd-wap-wbmp` - - `image/vnd.sealed-png` - - `image/vnd.sealedmedia.softseal-gif` - - `image/vnd.sealedmedia.softseal-jpg` - - `model/vnd-dwf` - - `model/vnd.parasolid.transmit-binary` - - `model/vnd.parasolid.transmit-text` - - `text/vnd-a` - - `text/vnd-curl` - - `text/vnd.wap-wml` - * Remove example template MIME types - - `application/example` - - `audio/example` - - `image/example` - - `message/example` - - `model/example` - - `multipart/example` - - `text/example` - - `video/example` - -1.3.1 / 2014-12-16 -================== - - * Fix missing extensions - - `application/json5` - - `text/hjson` - -1.3.0 / 2014-12-07 -================== - - * Add `application/a2l` - * Add `application/aml` - * Add `application/atfx` - * Add `application/atxml` - * Add `application/cdfx+xml` - * Add `application/dii` - * Add `application/json5` - * Add `application/lxf` - * Add `application/mf4` - * Add `application/vnd.apache.thrift.compact` - * Add `application/vnd.apache.thrift.json` - * Add `application/vnd.coffeescript` - * Add `application/vnd.enphase.envoy` - * Add `application/vnd.ims.imsccv1p1` - * Add `text/csv-schema` - * Add `text/hjson` - * Add `text/markdown` - * Add `text/yaml` - -1.2.0 / 2014-11-09 -================== - - * Add `application/cea` - * Add `application/dit` - * Add `application/vnd.gov.sk.e-form+zip` - * Add `application/vnd.tmd.mediaflex.api+xml` - * Type `application/epub+zip` is now IANA-registered - -1.1.2 / 2014-10-23 -================== - - * Rebuild database for `application/x-www-form-urlencoded` change - -1.1.1 / 2014-10-20 -================== - - * Mark `application/x-www-form-urlencoded` as compressible. - -1.1.0 / 2014-09-28 -================== - - * Add `application/font-woff2` - -1.0.3 / 2014-09-25 -================== - - * Fix engine requirement in package - -1.0.2 / 2014-09-25 -================== - - * Add `application/coap-group+json` - * Add `application/dcd` - * Add `application/vnd.apache.thrift.binary` - * Add `image/vnd.tencent.tap` - * Mark all JSON-derived types as compressible - * Update `text/vtt` data - -1.0.1 / 2014-08-30 -================== - - * Fix extension ordering - -1.0.0 / 2014-08-30 -================== - - * Add `application/atf` - * Add `application/merge-patch+json` - * Add `multipart/x-mixed-replace` - * Add `source: 'apache'` metadata - * Add `source: 'iana'` metadata - * Remove badly-assumed charset data diff --git a/web/static/node_modules/mime-db/LICENSE b/web/static/node_modules/mime-db/LICENSE deleted file mode 100644 index 0751cb10..00000000 --- a/web/static/node_modules/mime-db/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/web/static/node_modules/mime-db/README.md b/web/static/node_modules/mime-db/README.md deleted file mode 100644 index 5a8fcfe4..00000000 --- a/web/static/node_modules/mime-db/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# mime-db - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][ci-image]][ci-url] -[![Coverage Status][coveralls-image]][coveralls-url] - -This is a large database of mime types and information about them. -It consists of a single, public JSON file and does not include any logic, -allowing it to remain as un-opinionated as possible with an API. -It aggregates data from the following sources: - -- http://www.iana.org/assignments/media-types/media-types.xhtml -- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types - -## Installation - -```bash -npm install mime-db -``` - -### Database Download - -If you're crazy enough to use this in the browser, you can just grab the -JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to -replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags) -as the JSON format may change in the future. - -``` -https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json -``` - -## Usage - -```js -var db = require('mime-db') - -// grab data on .js files -var data = db['application/javascript'] -``` - -## Data Structure - -The JSON file is a map lookup for lowercased mime types. -Each mime type has the following properties: - -- `.source` - where the mime type is defined. - If not set, it's probably a custom media type. - - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) - - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) - - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) -- `.extensions[]` - known extensions associated with this mime type. -- `.compressible` - whether a file of this type can be gzipped. -- `.charset` - the default charset associated with this type, if any. - -If unknown, every property could be `undefined`. - -## Contributing - -To edit the database, only make PRs against `src/custom-types.json` or -`src/custom-suffix.json`. - -The `src/custom-types.json` file is a JSON object with the MIME type as the -keys and the values being an object with the following keys: - -- `compressible` - leave out if you don't know, otherwise `true`/`false` to - indicate whether the data represented by the type is typically compressible. -- `extensions` - include an array of file extensions that are associated with - the type. -- `notes` - human-readable notes about the type, typically what the type is. -- `sources` - include an array of URLs of where the MIME type and the associated - extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); - links to type aggregating sites and Wikipedia are _not acceptable_. - -To update the build, run `npm run build`. - -### Adding Custom Media Types - -The best way to get new media types included in this library is to register -them with the IANA. The community registration procedure is outlined in -[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types -registered with the IANA are automatically pulled into this library. - -If that is not possible / feasible, they can be added directly here as a -"custom" type. To do this, it is required to have a primary source that -definitively lists the media type. If an extension is going to be listed as -associateed with this media type, the source must definitively link the -media type and extension as well. - -[ci-image]: https://badgen.net/github/checks/jshttp/mime-db/master?label=ci -[ci-url]: https://github.com/jshttp/mime-db/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master -[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master -[node-image]: https://badgen.net/npm/node/mime-db -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/mime-db -[npm-url]: https://npmjs.org/package/mime-db -[npm-version-image]: https://badgen.net/npm/v/mime-db diff --git a/web/static/node_modules/mime-db/db.json b/web/static/node_modules/mime-db/db.json deleted file mode 100644 index eb9c42c4..00000000 --- a/web/static/node_modules/mime-db/db.json +++ /dev/null @@ -1,8519 +0,0 @@ -{ - "application/1d-interleaved-parityfec": { - "source": "iana" - }, - "application/3gpdash-qoe-report+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/3gpp-ims+xml": { - "source": "iana", - "compressible": true - }, - "application/3gpphal+json": { - "source": "iana", - "compressible": true - }, - "application/3gpphalforms+json": { - "source": "iana", - "compressible": true - }, - "application/a2l": { - "source": "iana" - }, - "application/ace+cbor": { - "source": "iana" - }, - "application/activemessage": { - "source": "iana" - }, - "application/activity+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-directory+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcost+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcostparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointprop+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointpropparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-error+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-updatestreamcontrol+json": { - "source": "iana", - "compressible": true - }, - "application/alto-updatestreamparams+json": { - "source": "iana", - "compressible": true - }, - "application/aml": { - "source": "iana" - }, - "application/andrew-inset": { - "source": "iana", - "extensions": ["ez"] - }, - "application/applefile": { - "source": "iana" - }, - "application/applixware": { - "source": "apache", - "extensions": ["aw"] - }, - "application/at+jwt": { - "source": "iana" - }, - "application/atf": { - "source": "iana" - }, - "application/atfx": { - "source": "iana" - }, - "application/atom+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atom"] - }, - "application/atomcat+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomcat"] - }, - "application/atomdeleted+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomdeleted"] - }, - "application/atomicmail": { - "source": "iana" - }, - "application/atomsvc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomsvc"] - }, - "application/atsc-dwd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dwd"] - }, - "application/atsc-dynamic-event-message": { - "source": "iana" - }, - "application/atsc-held+xml": { - "source": "iana", - "compressible": true, - "extensions": ["held"] - }, - "application/atsc-rdt+json": { - "source": "iana", - "compressible": true - }, - "application/atsc-rsat+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rsat"] - }, - "application/atxml": { - "source": "iana" - }, - "application/auth-policy+xml": { - "source": "iana", - "compressible": true - }, - "application/bacnet-xdd+zip": { - "source": "iana", - "compressible": false - }, - "application/batch-smtp": { - "source": "iana" - }, - "application/bdoc": { - "compressible": false, - "extensions": ["bdoc"] - }, - "application/beep+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/calendar+json": { - "source": "iana", - "compressible": true - }, - "application/calendar+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xcs"] - }, - "application/call-completion": { - "source": "iana" - }, - "application/cals-1840": { - "source": "iana" - }, - "application/captive+json": { - "source": "iana", - "compressible": true - }, - "application/cbor": { - "source": "iana" - }, - "application/cbor-seq": { - "source": "iana" - }, - "application/cccex": { - "source": "iana" - }, - "application/ccmp+xml": { - "source": "iana", - "compressible": true - }, - "application/ccxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ccxml"] - }, - "application/cdfx+xml": { - "source": "iana", - "compressible": true, - "extensions": ["cdfx"] - }, - "application/cdmi-capability": { - "source": "iana", - "extensions": ["cdmia"] - }, - "application/cdmi-container": { - "source": "iana", - "extensions": ["cdmic"] - }, - "application/cdmi-domain": { - "source": "iana", - "extensions": ["cdmid"] - }, - "application/cdmi-object": { - "source": "iana", - "extensions": ["cdmio"] - }, - "application/cdmi-queue": { - "source": "iana", - "extensions": ["cdmiq"] - }, - "application/cdni": { - "source": "iana" - }, - "application/cea": { - "source": "iana" - }, - "application/cea-2018+xml": { - "source": "iana", - "compressible": true - }, - "application/cellml+xml": { - "source": "iana", - "compressible": true - }, - "application/cfw": { - "source": "iana" - }, - "application/city+json": { - "source": "iana", - "compressible": true - }, - "application/clr": { - "source": "iana" - }, - "application/clue+xml": { - "source": "iana", - "compressible": true - }, - "application/clue_info+xml": { - "source": "iana", - "compressible": true - }, - "application/cms": { - "source": "iana" - }, - "application/cnrp+xml": { - "source": "iana", - "compressible": true - }, - "application/coap-group+json": { - "source": "iana", - "compressible": true - }, - "application/coap-payload": { - "source": "iana" - }, - "application/commonground": { - "source": "iana" - }, - "application/conference-info+xml": { - "source": "iana", - "compressible": true - }, - "application/cose": { - "source": "iana" - }, - "application/cose-key": { - "source": "iana" - }, - "application/cose-key-set": { - "source": "iana" - }, - "application/cpl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["cpl"] - }, - "application/csrattrs": { - "source": "iana" - }, - "application/csta+xml": { - "source": "iana", - "compressible": true - }, - "application/cstadata+xml": { - "source": "iana", - "compressible": true - }, - "application/csvm+json": { - "source": "iana", - "compressible": true - }, - "application/cu-seeme": { - "source": "apache", - "extensions": ["cu"] - }, - "application/cwt": { - "source": "iana" - }, - "application/cybercash": { - "source": "iana" - }, - "application/dart": { - "compressible": true - }, - "application/dash+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpd"] - }, - "application/dash-patch+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpp"] - }, - "application/dashdelta": { - "source": "iana" - }, - "application/davmount+xml": { - "source": "iana", - "compressible": true, - "extensions": ["davmount"] - }, - "application/dca-rft": { - "source": "iana" - }, - "application/dcd": { - "source": "iana" - }, - "application/dec-dx": { - "source": "iana" - }, - "application/dialog-info+xml": { - "source": "iana", - "compressible": true - }, - "application/dicom": { - "source": "iana" - }, - "application/dicom+json": { - "source": "iana", - "compressible": true - }, - "application/dicom+xml": { - "source": "iana", - "compressible": true - }, - "application/dii": { - "source": "iana" - }, - "application/dit": { - "source": "iana" - }, - "application/dns": { - "source": "iana" - }, - "application/dns+json": { - "source": "iana", - "compressible": true - }, - "application/dns-message": { - "source": "iana" - }, - "application/docbook+xml": { - "source": "apache", - "compressible": true, - "extensions": ["dbk"] - }, - "application/dots+cbor": { - "source": "iana" - }, - "application/dskpp+xml": { - "source": "iana", - "compressible": true - }, - "application/dssc+der": { - "source": "iana", - "extensions": ["dssc"] - }, - "application/dssc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdssc"] - }, - "application/dvcs": { - "source": "iana" - }, - "application/ecmascript": { - "source": "iana", - "compressible": true, - "extensions": ["es","ecma"] - }, - "application/edi-consent": { - "source": "iana" - }, - "application/edi-x12": { - "source": "iana", - "compressible": false - }, - "application/edifact": { - "source": "iana", - "compressible": false - }, - "application/efi": { - "source": "iana" - }, - "application/elm+json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/elm+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.cap+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/emergencycalldata.comment+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.control+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.deviceinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.ecall.msd": { - "source": "iana" - }, - "application/emergencycalldata.providerinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.serviceinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.subscriberinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.veds+xml": { - "source": "iana", - "compressible": true - }, - "application/emma+xml": { - "source": "iana", - "compressible": true, - "extensions": ["emma"] - }, - "application/emotionml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["emotionml"] - }, - "application/encaprtp": { - "source": "iana" - }, - "application/epp+xml": { - "source": "iana", - "compressible": true - }, - "application/epub+zip": { - "source": "iana", - "compressible": false, - "extensions": ["epub"] - }, - "application/eshop": { - "source": "iana" - }, - "application/exi": { - "source": "iana", - "extensions": ["exi"] - }, - "application/expect-ct-report+json": { - "source": "iana", - "compressible": true - }, - "application/express": { - "source": "iana", - "extensions": ["exp"] - }, - "application/fastinfoset": { - "source": "iana" - }, - "application/fastsoap": { - "source": "iana" - }, - "application/fdt+xml": { - "source": "iana", - "compressible": true, - "extensions": ["fdt"] - }, - "application/fhir+json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/fhir+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/fido.trusted-apps+json": { - "compressible": true - }, - "application/fits": { - "source": "iana" - }, - "application/flexfec": { - "source": "iana" - }, - "application/font-sfnt": { - "source": "iana" - }, - "application/font-tdpfr": { - "source": "iana", - "extensions": ["pfr"] - }, - "application/font-woff": { - "source": "iana", - "compressible": false - }, - "application/framework-attributes+xml": { - "source": "iana", - "compressible": true - }, - "application/geo+json": { - "source": "iana", - "compressible": true, - "extensions": ["geojson"] - }, - "application/geo+json-seq": { - "source": "iana" - }, - "application/geopackage+sqlite3": { - "source": "iana" - }, - "application/geoxacml+xml": { - "source": "iana", - "compressible": true - }, - "application/gltf-buffer": { - "source": "iana" - }, - "application/gml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["gml"] - }, - "application/gpx+xml": { - "source": "apache", - "compressible": true, - "extensions": ["gpx"] - }, - "application/gxf": { - "source": "apache", - "extensions": ["gxf"] - }, - "application/gzip": { - "source": "iana", - "compressible": false, - "extensions": ["gz"] - }, - "application/h224": { - "source": "iana" - }, - "application/held+xml": { - "source": "iana", - "compressible": true - }, - "application/hjson": { - "extensions": ["hjson"] - }, - "application/http": { - "source": "iana" - }, - "application/hyperstudio": { - "source": "iana", - "extensions": ["stk"] - }, - "application/ibe-key-request+xml": { - "source": "iana", - "compressible": true - }, - "application/ibe-pkg-reply+xml": { - "source": "iana", - "compressible": true - }, - "application/ibe-pp-data": { - "source": "iana" - }, - "application/iges": { - "source": "iana" - }, - "application/im-iscomposing+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/index": { - "source": "iana" - }, - "application/index.cmd": { - "source": "iana" - }, - "application/index.obj": { - "source": "iana" - }, - "application/index.response": { - "source": "iana" - }, - "application/index.vnd": { - "source": "iana" - }, - "application/inkml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ink","inkml"] - }, - "application/iotp": { - "source": "iana" - }, - "application/ipfix": { - "source": "iana", - "extensions": ["ipfix"] - }, - "application/ipp": { - "source": "iana" - }, - "application/isup": { - "source": "iana" - }, - "application/its+xml": { - "source": "iana", - "compressible": true, - "extensions": ["its"] - }, - "application/java-archive": { - "source": "apache", - "compressible": false, - "extensions": ["jar","war","ear"] - }, - "application/java-serialized-object": { - "source": "apache", - "compressible": false, - "extensions": ["ser"] - }, - "application/java-vm": { - "source": "apache", - "compressible": false, - "extensions": ["class"] - }, - "application/javascript": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["js","mjs"] - }, - "application/jf2feed+json": { - "source": "iana", - "compressible": true - }, - "application/jose": { - "source": "iana" - }, - "application/jose+json": { - "source": "iana", - "compressible": true - }, - "application/jrd+json": { - "source": "iana", - "compressible": true - }, - "application/jscalendar+json": { - "source": "iana", - "compressible": true - }, - "application/json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["json","map"] - }, - "application/json-patch+json": { - "source": "iana", - "compressible": true - }, - "application/json-seq": { - "source": "iana" - }, - "application/json5": { - "extensions": ["json5"] - }, - "application/jsonml+json": { - "source": "apache", - "compressible": true, - "extensions": ["jsonml"] - }, - "application/jwk+json": { - "source": "iana", - "compressible": true - }, - "application/jwk-set+json": { - "source": "iana", - "compressible": true - }, - "application/jwt": { - "source": "iana" - }, - "application/kpml-request+xml": { - "source": "iana", - "compressible": true - }, - "application/kpml-response+xml": { - "source": "iana", - "compressible": true - }, - "application/ld+json": { - "source": "iana", - "compressible": true, - "extensions": ["jsonld"] - }, - "application/lgr+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lgr"] - }, - "application/link-format": { - "source": "iana" - }, - "application/load-control+xml": { - "source": "iana", - "compressible": true - }, - "application/lost+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lostxml"] - }, - "application/lostsync+xml": { - "source": "iana", - "compressible": true - }, - "application/lpf+zip": { - "source": "iana", - "compressible": false - }, - "application/lxf": { - "source": "iana" - }, - "application/mac-binhex40": { - "source": "iana", - "extensions": ["hqx"] - }, - "application/mac-compactpro": { - "source": "apache", - "extensions": ["cpt"] - }, - "application/macwriteii": { - "source": "iana" - }, - "application/mads+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mads"] - }, - "application/manifest+json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["webmanifest"] - }, - "application/marc": { - "source": "iana", - "extensions": ["mrc"] - }, - "application/marcxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mrcx"] - }, - "application/mathematica": { - "source": "iana", - "extensions": ["ma","nb","mb"] - }, - "application/mathml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mathml"] - }, - "application/mathml-content+xml": { - "source": "iana", - "compressible": true - }, - "application/mathml-presentation+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-associated-procedure-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-deregister+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-envelope+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-msk+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-msk-response+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-protection-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-reception-report+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-register+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-register-response+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-schedule+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-user-service-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbox": { - "source": "iana", - "extensions": ["mbox"] - }, - "application/media-policy-dataset+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpf"] - }, - "application/media_control+xml": { - "source": "iana", - "compressible": true - }, - "application/mediaservercontrol+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mscml"] - }, - "application/merge-patch+json": { - "source": "iana", - "compressible": true - }, - "application/metalink+xml": { - "source": "apache", - "compressible": true, - "extensions": ["metalink"] - }, - "application/metalink4+xml": { - "source": "iana", - "compressible": true, - "extensions": ["meta4"] - }, - "application/mets+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mets"] - }, - "application/mf4": { - "source": "iana" - }, - "application/mikey": { - "source": "iana" - }, - "application/mipc": { - "source": "iana" - }, - "application/missing-blocks+cbor-seq": { - "source": "iana" - }, - "application/mmt-aei+xml": { - "source": "iana", - "compressible": true, - "extensions": ["maei"] - }, - "application/mmt-usd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["musd"] - }, - "application/mods+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mods"] - }, - "application/moss-keys": { - "source": "iana" - }, - "application/moss-signature": { - "source": "iana" - }, - "application/mosskey-data": { - "source": "iana" - }, - "application/mosskey-request": { - "source": "iana" - }, - "application/mp21": { - "source": "iana", - "extensions": ["m21","mp21"] - }, - "application/mp4": { - "source": "iana", - "extensions": ["mp4s","m4p"] - }, - "application/mpeg4-generic": { - "source": "iana" - }, - "application/mpeg4-iod": { - "source": "iana" - }, - "application/mpeg4-iod-xmt": { - "source": "iana" - }, - "application/mrb-consumer+xml": { - "source": "iana", - "compressible": true - }, - "application/mrb-publish+xml": { - "source": "iana", - "compressible": true - }, - "application/msc-ivr+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/msc-mixer+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/msword": { - "source": "iana", - "compressible": false, - "extensions": ["doc","dot"] - }, - "application/mud+json": { - "source": "iana", - "compressible": true - }, - "application/multipart-core": { - "source": "iana" - }, - "application/mxf": { - "source": "iana", - "extensions": ["mxf"] - }, - "application/n-quads": { - "source": "iana", - "extensions": ["nq"] - }, - "application/n-triples": { - "source": "iana", - "extensions": ["nt"] - }, - "application/nasdata": { - "source": "iana" - }, - "application/news-checkgroups": { - "source": "iana", - "charset": "US-ASCII" - }, - "application/news-groupinfo": { - "source": "iana", - "charset": "US-ASCII" - }, - "application/news-transmission": { - "source": "iana" - }, - "application/nlsml+xml": { - "source": "iana", - "compressible": true - }, - "application/node": { - "source": "iana", - "extensions": ["cjs"] - }, - "application/nss": { - "source": "iana" - }, - "application/oauth-authz-req+jwt": { - "source": "iana" - }, - "application/oblivious-dns-message": { - "source": "iana" - }, - "application/ocsp-request": { - "source": "iana" - }, - "application/ocsp-response": { - "source": "iana" - }, - "application/octet-stream": { - "source": "iana", - "compressible": false, - "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] - }, - "application/oda": { - "source": "iana", - "extensions": ["oda"] - }, - "application/odm+xml": { - "source": "iana", - "compressible": true - }, - "application/odx": { - "source": "iana" - }, - "application/oebps-package+xml": { - "source": "iana", - "compressible": true, - "extensions": ["opf"] - }, - "application/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogx"] - }, - "application/omdoc+xml": { - "source": "apache", - "compressible": true, - "extensions": ["omdoc"] - }, - "application/onenote": { - "source": "apache", - "extensions": ["onetoc","onetoc2","onetmp","onepkg"] - }, - "application/opc-nodeset+xml": { - "source": "iana", - "compressible": true - }, - "application/oscore": { - "source": "iana" - }, - "application/oxps": { - "source": "iana", - "extensions": ["oxps"] - }, - "application/p21": { - "source": "iana" - }, - "application/p21+zip": { - "source": "iana", - "compressible": false - }, - "application/p2p-overlay+xml": { - "source": "iana", - "compressible": true, - "extensions": ["relo"] - }, - "application/parityfec": { - "source": "iana" - }, - "application/passport": { - "source": "iana" - }, - "application/patch-ops-error+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xer"] - }, - "application/pdf": { - "source": "iana", - "compressible": false, - "extensions": ["pdf"] - }, - "application/pdx": { - "source": "iana" - }, - "application/pem-certificate-chain": { - "source": "iana" - }, - "application/pgp-encrypted": { - "source": "iana", - "compressible": false, - "extensions": ["pgp"] - }, - "application/pgp-keys": { - "source": "iana", - "extensions": ["asc"] - }, - "application/pgp-signature": { - "source": "iana", - "extensions": ["asc","sig"] - }, - "application/pics-rules": { - "source": "apache", - "extensions": ["prf"] - }, - "application/pidf+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/pidf-diff+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/pkcs10": { - "source": "iana", - "extensions": ["p10"] - }, - "application/pkcs12": { - "source": "iana" - }, - "application/pkcs7-mime": { - "source": "iana", - "extensions": ["p7m","p7c"] - }, - "application/pkcs7-signature": { - "source": "iana", - "extensions": ["p7s"] - }, - "application/pkcs8": { - "source": "iana", - "extensions": ["p8"] - }, - "application/pkcs8-encrypted": { - "source": "iana" - }, - "application/pkix-attr-cert": { - "source": "iana", - "extensions": ["ac"] - }, - "application/pkix-cert": { - "source": "iana", - "extensions": ["cer"] - }, - "application/pkix-crl": { - "source": "iana", - "extensions": ["crl"] - }, - "application/pkix-pkipath": { - "source": "iana", - "extensions": ["pkipath"] - }, - "application/pkixcmp": { - "source": "iana", - "extensions": ["pki"] - }, - "application/pls+xml": { - "source": "iana", - "compressible": true, - "extensions": ["pls"] - }, - "application/poc-settings+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/postscript": { - "source": "iana", - "compressible": true, - "extensions": ["ai","eps","ps"] - }, - "application/ppsp-tracker+json": { - "source": "iana", - "compressible": true - }, - "application/problem+json": { - "source": "iana", - "compressible": true - }, - "application/problem+xml": { - "source": "iana", - "compressible": true - }, - "application/provenance+xml": { - "source": "iana", - "compressible": true, - "extensions": ["provx"] - }, - "application/prs.alvestrand.titrax-sheet": { - "source": "iana" - }, - "application/prs.cww": { - "source": "iana", - "extensions": ["cww"] - }, - "application/prs.cyn": { - "source": "iana", - "charset": "7-BIT" - }, - "application/prs.hpub+zip": { - "source": "iana", - "compressible": false - }, - "application/prs.nprend": { - "source": "iana" - }, - "application/prs.plucker": { - "source": "iana" - }, - "application/prs.rdf-xml-crypt": { - "source": "iana" - }, - "application/prs.xsf+xml": { - "source": "iana", - "compressible": true - }, - "application/pskc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["pskcxml"] - }, - "application/pvd+json": { - "source": "iana", - "compressible": true - }, - "application/qsig": { - "source": "iana" - }, - "application/raml+yaml": { - "compressible": true, - "extensions": ["raml"] - }, - "application/raptorfec": { - "source": "iana" - }, - "application/rdap+json": { - "source": "iana", - "compressible": true - }, - "application/rdf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rdf","owl"] - }, - "application/reginfo+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rif"] - }, - "application/relax-ng-compact-syntax": { - "source": "iana", - "extensions": ["rnc"] - }, - "application/remote-printing": { - "source": "iana" - }, - "application/reputon+json": { - "source": "iana", - "compressible": true - }, - "application/resource-lists+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rl"] - }, - "application/resource-lists-diff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rld"] - }, - "application/rfc+xml": { - "source": "iana", - "compressible": true - }, - "application/riscos": { - "source": "iana" - }, - "application/rlmi+xml": { - "source": "iana", - "compressible": true - }, - "application/rls-services+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rs"] - }, - "application/route-apd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rapd"] - }, - "application/route-s-tsid+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sls"] - }, - "application/route-usd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rusd"] - }, - "application/rpki-ghostbusters": { - "source": "iana", - "extensions": ["gbr"] - }, - "application/rpki-manifest": { - "source": "iana", - "extensions": ["mft"] - }, - "application/rpki-publication": { - "source": "iana" - }, - "application/rpki-roa": { - "source": "iana", - "extensions": ["roa"] - }, - "application/rpki-updown": { - "source": "iana" - }, - "application/rsd+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rsd"] - }, - "application/rss+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rss"] - }, - "application/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "application/rtploopback": { - "source": "iana" - }, - "application/rtx": { - "source": "iana" - }, - "application/samlassertion+xml": { - "source": "iana", - "compressible": true - }, - "application/samlmetadata+xml": { - "source": "iana", - "compressible": true - }, - "application/sarif+json": { - "source": "iana", - "compressible": true - }, - "application/sarif-external-properties+json": { - "source": "iana", - "compressible": true - }, - "application/sbe": { - "source": "iana" - }, - "application/sbml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sbml"] - }, - "application/scaip+xml": { - "source": "iana", - "compressible": true - }, - "application/scim+json": { - "source": "iana", - "compressible": true - }, - "application/scvp-cv-request": { - "source": "iana", - "extensions": ["scq"] - }, - "application/scvp-cv-response": { - "source": "iana", - "extensions": ["scs"] - }, - "application/scvp-vp-request": { - "source": "iana", - "extensions": ["spq"] - }, - "application/scvp-vp-response": { - "source": "iana", - "extensions": ["spp"] - }, - "application/sdp": { - "source": "iana", - "extensions": ["sdp"] - }, - "application/secevent+jwt": { - "source": "iana" - }, - "application/senml+cbor": { - "source": "iana" - }, - "application/senml+json": { - "source": "iana", - "compressible": true - }, - "application/senml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["senmlx"] - }, - "application/senml-etch+cbor": { - "source": "iana" - }, - "application/senml-etch+json": { - "source": "iana", - "compressible": true - }, - "application/senml-exi": { - "source": "iana" - }, - "application/sensml+cbor": { - "source": "iana" - }, - "application/sensml+json": { - "source": "iana", - "compressible": true - }, - "application/sensml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sensmlx"] - }, - "application/sensml-exi": { - "source": "iana" - }, - "application/sep+xml": { - "source": "iana", - "compressible": true - }, - "application/sep-exi": { - "source": "iana" - }, - "application/session-info": { - "source": "iana" - }, - "application/set-payment": { - "source": "iana" - }, - "application/set-payment-initiation": { - "source": "iana", - "extensions": ["setpay"] - }, - "application/set-registration": { - "source": "iana" - }, - "application/set-registration-initiation": { - "source": "iana", - "extensions": ["setreg"] - }, - "application/sgml": { - "source": "iana" - }, - "application/sgml-open-catalog": { - "source": "iana" - }, - "application/shf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["shf"] - }, - "application/sieve": { - "source": "iana", - "extensions": ["siv","sieve"] - }, - "application/simple-filter+xml": { - "source": "iana", - "compressible": true - }, - "application/simple-message-summary": { - "source": "iana" - }, - "application/simplesymbolcontainer": { - "source": "iana" - }, - "application/sipc": { - "source": "iana" - }, - "application/slate": { - "source": "iana" - }, - "application/smil": { - "source": "iana" - }, - "application/smil+xml": { - "source": "iana", - "compressible": true, - "extensions": ["smi","smil"] - }, - "application/smpte336m": { - "source": "iana" - }, - "application/soap+fastinfoset": { - "source": "iana" - }, - "application/soap+xml": { - "source": "iana", - "compressible": true - }, - "application/sparql-query": { - "source": "iana", - "extensions": ["rq"] - }, - "application/sparql-results+xml": { - "source": "iana", - "compressible": true, - "extensions": ["srx"] - }, - "application/spdx+json": { - "source": "iana", - "compressible": true - }, - "application/spirits-event+xml": { - "source": "iana", - "compressible": true - }, - "application/sql": { - "source": "iana" - }, - "application/srgs": { - "source": "iana", - "extensions": ["gram"] - }, - "application/srgs+xml": { - "source": "iana", - "compressible": true, - "extensions": ["grxml"] - }, - "application/sru+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sru"] - }, - "application/ssdl+xml": { - "source": "apache", - "compressible": true, - "extensions": ["ssdl"] - }, - "application/ssml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ssml"] - }, - "application/stix+json": { - "source": "iana", - "compressible": true - }, - "application/swid+xml": { - "source": "iana", - "compressible": true, - "extensions": ["swidtag"] - }, - "application/tamp-apex-update": { - "source": "iana" - }, - "application/tamp-apex-update-confirm": { - "source": "iana" - }, - "application/tamp-community-update": { - "source": "iana" - }, - "application/tamp-community-update-confirm": { - "source": "iana" - }, - "application/tamp-error": { - "source": "iana" - }, - "application/tamp-sequence-adjust": { - "source": "iana" - }, - "application/tamp-sequence-adjust-confirm": { - "source": "iana" - }, - "application/tamp-status-query": { - "source": "iana" - }, - "application/tamp-status-response": { - "source": "iana" - }, - "application/tamp-update": { - "source": "iana" - }, - "application/tamp-update-confirm": { - "source": "iana" - }, - "application/tar": { - "compressible": true - }, - "application/taxii+json": { - "source": "iana", - "compressible": true - }, - "application/td+json": { - "source": "iana", - "compressible": true - }, - "application/tei+xml": { - "source": "iana", - "compressible": true, - "extensions": ["tei","teicorpus"] - }, - "application/tetra_isi": { - "source": "iana" - }, - "application/thraud+xml": { - "source": "iana", - "compressible": true, - "extensions": ["tfi"] - }, - "application/timestamp-query": { - "source": "iana" - }, - "application/timestamp-reply": { - "source": "iana" - }, - "application/timestamped-data": { - "source": "iana", - "extensions": ["tsd"] - }, - "application/tlsrpt+gzip": { - "source": "iana" - }, - "application/tlsrpt+json": { - "source": "iana", - "compressible": true - }, - "application/tnauthlist": { - "source": "iana" - }, - "application/token-introspection+jwt": { - "source": "iana" - }, - "application/toml": { - "compressible": true, - "extensions": ["toml"] - }, - "application/trickle-ice-sdpfrag": { - "source": "iana" - }, - "application/trig": { - "source": "iana", - "extensions": ["trig"] - }, - "application/ttml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ttml"] - }, - "application/tve-trigger": { - "source": "iana" - }, - "application/tzif": { - "source": "iana" - }, - "application/tzif-leap": { - "source": "iana" - }, - "application/ubjson": { - "compressible": false, - "extensions": ["ubj"] - }, - "application/ulpfec": { - "source": "iana" - }, - "application/urc-grpsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/urc-ressheet+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rsheet"] - }, - "application/urc-targetdesc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["td"] - }, - "application/urc-uisocketdesc+xml": { - "source": "iana", - "compressible": true - }, - "application/vcard+json": { - "source": "iana", - "compressible": true - }, - "application/vcard+xml": { - "source": "iana", - "compressible": true - }, - "application/vemmi": { - "source": "iana" - }, - "application/vividence.scriptfile": { - "source": "apache" - }, - "application/vnd.1000minds.decision-model+xml": { - "source": "iana", - "compressible": true, - "extensions": ["1km"] - }, - "application/vnd.3gpp-prose+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-prose-pc3ch+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-v2x-local-service-information": { - "source": "iana" - }, - "application/vnd.3gpp.5gnas": { - "source": "iana" - }, - "application/vnd.3gpp.access-transfer-events+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.bsf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.gmop+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.gtpc": { - "source": "iana" - }, - "application/vnd.3gpp.interworking-data": { - "source": "iana" - }, - "application/vnd.3gpp.lpp": { - "source": "iana" - }, - "application/vnd.3gpp.mc-signalling-ear": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-payload": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-signalling": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-floor-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-location-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-signed+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-ue-init-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-affiliation-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-location-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-transmission-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mid-call+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.ngap": { - "source": "iana" - }, - "application/vnd.3gpp.pfcp": { - "source": "iana" - }, - "application/vnd.3gpp.pic-bw-large": { - "source": "iana", - "extensions": ["plb"] - }, - "application/vnd.3gpp.pic-bw-small": { - "source": "iana", - "extensions": ["psb"] - }, - "application/vnd.3gpp.pic-bw-var": { - "source": "iana", - "extensions": ["pvb"] - }, - "application/vnd.3gpp.s1ap": { - "source": "iana" - }, - "application/vnd.3gpp.sms": { - "source": "iana" - }, - "application/vnd.3gpp.sms+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.srvcc-ext+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.srvcc-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.state-and-event-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.ussd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp2.bcmcsinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp2.sms": { - "source": "iana" - }, - "application/vnd.3gpp2.tcap": { - "source": "iana", - "extensions": ["tcap"] - }, - "application/vnd.3lightssoftware.imagescal": { - "source": "iana" - }, - "application/vnd.3m.post-it-notes": { - "source": "iana", - "extensions": ["pwn"] - }, - "application/vnd.accpac.simply.aso": { - "source": "iana", - "extensions": ["aso"] - }, - "application/vnd.accpac.simply.imp": { - "source": "iana", - "extensions": ["imp"] - }, - "application/vnd.acucobol": { - "source": "iana", - "extensions": ["acu"] - }, - "application/vnd.acucorp": { - "source": "iana", - "extensions": ["atc","acutc"] - }, - "application/vnd.adobe.air-application-installer-package+zip": { - "source": "apache", - "compressible": false, - "extensions": ["air"] - }, - "application/vnd.adobe.flash.movie": { - "source": "iana" - }, - "application/vnd.adobe.formscentral.fcdt": { - "source": "iana", - "extensions": ["fcdt"] - }, - "application/vnd.adobe.fxp": { - "source": "iana", - "extensions": ["fxp","fxpl"] - }, - "application/vnd.adobe.partial-upload": { - "source": "iana" - }, - "application/vnd.adobe.xdp+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdp"] - }, - "application/vnd.adobe.xfdf": { - "source": "iana", - "extensions": ["xfdf"] - }, - "application/vnd.aether.imp": { - "source": "iana" - }, - "application/vnd.afpc.afplinedata": { - "source": "iana" - }, - "application/vnd.afpc.afplinedata-pagedef": { - "source": "iana" - }, - "application/vnd.afpc.cmoca-cmresource": { - "source": "iana" - }, - "application/vnd.afpc.foca-charset": { - "source": "iana" - }, - "application/vnd.afpc.foca-codedfont": { - "source": "iana" - }, - "application/vnd.afpc.foca-codepage": { - "source": "iana" - }, - "application/vnd.afpc.modca": { - "source": "iana" - }, - "application/vnd.afpc.modca-cmtable": { - "source": "iana" - }, - "application/vnd.afpc.modca-formdef": { - "source": "iana" - }, - "application/vnd.afpc.modca-mediummap": { - "source": "iana" - }, - "application/vnd.afpc.modca-objectcontainer": { - "source": "iana" - }, - "application/vnd.afpc.modca-overlay": { - "source": "iana" - }, - "application/vnd.afpc.modca-pagesegment": { - "source": "iana" - }, - "application/vnd.age": { - "source": "iana", - "extensions": ["age"] - }, - "application/vnd.ah-barcode": { - "source": "iana" - }, - "application/vnd.ahead.space": { - "source": "iana", - "extensions": ["ahead"] - }, - "application/vnd.airzip.filesecure.azf": { - "source": "iana", - "extensions": ["azf"] - }, - "application/vnd.airzip.filesecure.azs": { - "source": "iana", - "extensions": ["azs"] - }, - "application/vnd.amadeus+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.amazon.ebook": { - "source": "apache", - "extensions": ["azw"] - }, - "application/vnd.amazon.mobi8-ebook": { - "source": "iana" - }, - "application/vnd.americandynamics.acc": { - "source": "iana", - "extensions": ["acc"] - }, - "application/vnd.amiga.ami": { - "source": "iana", - "extensions": ["ami"] - }, - "application/vnd.amundsen.maze+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.android.ota": { - "source": "iana" - }, - "application/vnd.android.package-archive": { - "source": "apache", - "compressible": false, - "extensions": ["apk"] - }, - "application/vnd.anki": { - "source": "iana" - }, - "application/vnd.anser-web-certificate-issue-initiation": { - "source": "iana", - "extensions": ["cii"] - }, - "application/vnd.anser-web-funds-transfer-initiation": { - "source": "apache", - "extensions": ["fti"] - }, - "application/vnd.antix.game-component": { - "source": "iana", - "extensions": ["atx"] - }, - "application/vnd.apache.arrow.file": { - "source": "iana" - }, - "application/vnd.apache.arrow.stream": { - "source": "iana" - }, - "application/vnd.apache.thrift.binary": { - "source": "iana" - }, - "application/vnd.apache.thrift.compact": { - "source": "iana" - }, - "application/vnd.apache.thrift.json": { - "source": "iana" - }, - "application/vnd.api+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.aplextor.warrp+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apothekende.reservation+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apple.installer+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpkg"] - }, - "application/vnd.apple.keynote": { - "source": "iana", - "extensions": ["key"] - }, - "application/vnd.apple.mpegurl": { - "source": "iana", - "extensions": ["m3u8"] - }, - "application/vnd.apple.numbers": { - "source": "iana", - "extensions": ["numbers"] - }, - "application/vnd.apple.pages": { - "source": "iana", - "extensions": ["pages"] - }, - "application/vnd.apple.pkpass": { - "compressible": false, - "extensions": ["pkpass"] - }, - "application/vnd.arastra.swi": { - "source": "iana" - }, - "application/vnd.aristanetworks.swi": { - "source": "iana", - "extensions": ["swi"] - }, - "application/vnd.artisan+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.artsquare": { - "source": "iana" - }, - "application/vnd.astraea-software.iota": { - "source": "iana", - "extensions": ["iota"] - }, - "application/vnd.audiograph": { - "source": "iana", - "extensions": ["aep"] - }, - "application/vnd.autopackage": { - "source": "iana" - }, - "application/vnd.avalon+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.avistar+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.balsamiq.bmml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["bmml"] - }, - "application/vnd.balsamiq.bmpr": { - "source": "iana" - }, - "application/vnd.banana-accounting": { - "source": "iana" - }, - "application/vnd.bbf.usp.error": { - "source": "iana" - }, - "application/vnd.bbf.usp.msg": { - "source": "iana" - }, - "application/vnd.bbf.usp.msg+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.bekitzur-stech+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.bint.med-content": { - "source": "iana" - }, - "application/vnd.biopax.rdf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.blink-idb-value-wrapper": { - "source": "iana" - }, - "application/vnd.blueice.multipass": { - "source": "iana", - "extensions": ["mpm"] - }, - "application/vnd.bluetooth.ep.oob": { - "source": "iana" - }, - "application/vnd.bluetooth.le.oob": { - "source": "iana" - }, - "application/vnd.bmi": { - "source": "iana", - "extensions": ["bmi"] - }, - "application/vnd.bpf": { - "source": "iana" - }, - "application/vnd.bpf3": { - "source": "iana" - }, - "application/vnd.businessobjects": { - "source": "iana", - "extensions": ["rep"] - }, - "application/vnd.byu.uapi+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cab-jscript": { - "source": "iana" - }, - "application/vnd.canon-cpdl": { - "source": "iana" - }, - "application/vnd.canon-lips": { - "source": "iana" - }, - "application/vnd.capasystems-pg+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cendio.thinlinc.clientconf": { - "source": "iana" - }, - "application/vnd.century-systems.tcp_stream": { - "source": "iana" - }, - "application/vnd.chemdraw+xml": { - "source": "iana", - "compressible": true, - "extensions": ["cdxml"] - }, - "application/vnd.chess-pgn": { - "source": "iana" - }, - "application/vnd.chipnuts.karaoke-mmd": { - "source": "iana", - "extensions": ["mmd"] - }, - "application/vnd.ciedi": { - "source": "iana" - }, - "application/vnd.cinderella": { - "source": "iana", - "extensions": ["cdy"] - }, - "application/vnd.cirpack.isdn-ext": { - "source": "iana" - }, - "application/vnd.citationstyles.style+xml": { - "source": "iana", - "compressible": true, - "extensions": ["csl"] - }, - "application/vnd.claymore": { - "source": "iana", - "extensions": ["cla"] - }, - "application/vnd.cloanto.rp9": { - "source": "iana", - "extensions": ["rp9"] - }, - "application/vnd.clonk.c4group": { - "source": "iana", - "extensions": ["c4g","c4d","c4f","c4p","c4u"] - }, - "application/vnd.cluetrust.cartomobile-config": { - "source": "iana", - "extensions": ["c11amc"] - }, - "application/vnd.cluetrust.cartomobile-config-pkg": { - "source": "iana", - "extensions": ["c11amz"] - }, - "application/vnd.coffeescript": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.document": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.document-template": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.presentation": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.presentation-template": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.spreadsheet": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.spreadsheet-template": { - "source": "iana" - }, - "application/vnd.collection+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.doc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.next+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.comicbook+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.comicbook-rar": { - "source": "iana" - }, - "application/vnd.commerce-battelle": { - "source": "iana" - }, - "application/vnd.commonspace": { - "source": "iana", - "extensions": ["csp"] - }, - "application/vnd.contact.cmsg": { - "source": "iana", - "extensions": ["cdbcmsg"] - }, - "application/vnd.coreos.ignition+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cosmocaller": { - "source": "iana", - "extensions": ["cmc"] - }, - "application/vnd.crick.clicker": { - "source": "iana", - "extensions": ["clkx"] - }, - "application/vnd.crick.clicker.keyboard": { - "source": "iana", - "extensions": ["clkk"] - }, - "application/vnd.crick.clicker.palette": { - "source": "iana", - "extensions": ["clkp"] - }, - "application/vnd.crick.clicker.template": { - "source": "iana", - "extensions": ["clkt"] - }, - "application/vnd.crick.clicker.wordbank": { - "source": "iana", - "extensions": ["clkw"] - }, - "application/vnd.criticaltools.wbs+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wbs"] - }, - "application/vnd.cryptii.pipe+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.crypto-shade-file": { - "source": "iana" - }, - "application/vnd.cryptomator.encrypted": { - "source": "iana" - }, - "application/vnd.cryptomator.vault": { - "source": "iana" - }, - "application/vnd.ctc-posml": { - "source": "iana", - "extensions": ["pml"] - }, - "application/vnd.ctct.ws+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.cups-pdf": { - "source": "iana" - }, - "application/vnd.cups-postscript": { - "source": "iana" - }, - "application/vnd.cups-ppd": { - "source": "iana", - "extensions": ["ppd"] - }, - "application/vnd.cups-raster": { - "source": "iana" - }, - "application/vnd.cups-raw": { - "source": "iana" - }, - "application/vnd.curl": { - "source": "iana" - }, - "application/vnd.curl.car": { - "source": "apache", - "extensions": ["car"] - }, - "application/vnd.curl.pcurl": { - "source": "apache", - "extensions": ["pcurl"] - }, - "application/vnd.cyan.dean.root+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.cybank": { - "source": "iana" - }, - "application/vnd.cyclonedx+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cyclonedx+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.d2l.coursepackage1p0+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.d3m-dataset": { - "source": "iana" - }, - "application/vnd.d3m-problem": { - "source": "iana" - }, - "application/vnd.dart": { - "source": "iana", - "compressible": true, - "extensions": ["dart"] - }, - "application/vnd.data-vision.rdz": { - "source": "iana", - "extensions": ["rdz"] - }, - "application/vnd.datapackage+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dataresource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dbf": { - "source": "iana", - "extensions": ["dbf"] - }, - "application/vnd.debian.binary-package": { - "source": "iana" - }, - "application/vnd.dece.data": { - "source": "iana", - "extensions": ["uvf","uvvf","uvd","uvvd"] - }, - "application/vnd.dece.ttml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["uvt","uvvt"] - }, - "application/vnd.dece.unspecified": { - "source": "iana", - "extensions": ["uvx","uvvx"] - }, - "application/vnd.dece.zip": { - "source": "iana", - "extensions": ["uvz","uvvz"] - }, - "application/vnd.denovo.fcselayout-link": { - "source": "iana", - "extensions": ["fe_launch"] - }, - "application/vnd.desmume.movie": { - "source": "iana" - }, - "application/vnd.dir-bi.plate-dl-nosuffix": { - "source": "iana" - }, - "application/vnd.dm.delegation+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dna": { - "source": "iana", - "extensions": ["dna"] - }, - "application/vnd.document+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dolby.mlp": { - "source": "apache", - "extensions": ["mlp"] - }, - "application/vnd.dolby.mobile.1": { - "source": "iana" - }, - "application/vnd.dolby.mobile.2": { - "source": "iana" - }, - "application/vnd.doremir.scorecloud-binary-document": { - "source": "iana" - }, - "application/vnd.dpgraph": { - "source": "iana", - "extensions": ["dpg"] - }, - "application/vnd.dreamfactory": { - "source": "iana", - "extensions": ["dfac"] - }, - "application/vnd.drive+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ds-keypoint": { - "source": "apache", - "extensions": ["kpxx"] - }, - "application/vnd.dtg.local": { - "source": "iana" - }, - "application/vnd.dtg.local.flash": { - "source": "iana" - }, - "application/vnd.dtg.local.html": { - "source": "iana" - }, - "application/vnd.dvb.ait": { - "source": "iana", - "extensions": ["ait"] - }, - "application/vnd.dvb.dvbisl+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.dvbj": { - "source": "iana" - }, - "application/vnd.dvb.esgcontainer": { - "source": "iana" - }, - "application/vnd.dvb.ipdcdftnotifaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess2": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgpdd": { - "source": "iana" - }, - "application/vnd.dvb.ipdcroaming": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-base": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-enhancement": { - "source": "iana" - }, - "application/vnd.dvb.notif-aggregate-root+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-container+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-generic+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-msglist+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-registration-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-registration-response+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-init+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.pfr": { - "source": "iana" - }, - "application/vnd.dvb.service": { - "source": "iana", - "extensions": ["svc"] - }, - "application/vnd.dxr": { - "source": "iana" - }, - "application/vnd.dynageo": { - "source": "iana", - "extensions": ["geo"] - }, - "application/vnd.dzr": { - "source": "iana" - }, - "application/vnd.easykaraoke.cdgdownload": { - "source": "iana" - }, - "application/vnd.ecdis-update": { - "source": "iana" - }, - "application/vnd.ecip.rlp": { - "source": "iana" - }, - "application/vnd.eclipse.ditto+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ecowin.chart": { - "source": "iana", - "extensions": ["mag"] - }, - "application/vnd.ecowin.filerequest": { - "source": "iana" - }, - "application/vnd.ecowin.fileupdate": { - "source": "iana" - }, - "application/vnd.ecowin.series": { - "source": "iana" - }, - "application/vnd.ecowin.seriesrequest": { - "source": "iana" - }, - "application/vnd.ecowin.seriesupdate": { - "source": "iana" - }, - "application/vnd.efi.img": { - "source": "iana" - }, - "application/vnd.efi.iso": { - "source": "iana" - }, - "application/vnd.emclient.accessrequest+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.enliven": { - "source": "iana", - "extensions": ["nml"] - }, - "application/vnd.enphase.envoy": { - "source": "iana" - }, - "application/vnd.eprints.data+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.epson.esf": { - "source": "iana", - "extensions": ["esf"] - }, - "application/vnd.epson.msf": { - "source": "iana", - "extensions": ["msf"] - }, - "application/vnd.epson.quickanime": { - "source": "iana", - "extensions": ["qam"] - }, - "application/vnd.epson.salt": { - "source": "iana", - "extensions": ["slt"] - }, - "application/vnd.epson.ssf": { - "source": "iana", - "extensions": ["ssf"] - }, - "application/vnd.ericsson.quickcall": { - "source": "iana" - }, - "application/vnd.espass-espass+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.eszigno3+xml": { - "source": "iana", - "compressible": true, - "extensions": ["es3","et3"] - }, - "application/vnd.etsi.aoc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.asic-e+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.etsi.asic-s+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.etsi.cug+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvcommand+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvdiscovery+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-bc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-cod+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-npvr+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvservice+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsync+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvueprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.mcid+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.mheg5": { - "source": "iana" - }, - "application/vnd.etsi.overload-control-policy-dataset+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.pstn+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.sci+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.simservs+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.timestamp-token": { - "source": "iana" - }, - "application/vnd.etsi.tsl+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.tsl.der": { - "source": "iana" - }, - "application/vnd.eu.kasparian.car+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.eudora.data": { - "source": "iana" - }, - "application/vnd.evolv.ecig.profile": { - "source": "iana" - }, - "application/vnd.evolv.ecig.settings": { - "source": "iana" - }, - "application/vnd.evolv.ecig.theme": { - "source": "iana" - }, - "application/vnd.exstream-empower+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.exstream-package": { - "source": "iana" - }, - "application/vnd.ezpix-album": { - "source": "iana", - "extensions": ["ez2"] - }, - "application/vnd.ezpix-package": { - "source": "iana", - "extensions": ["ez3"] - }, - "application/vnd.f-secure.mobile": { - "source": "iana" - }, - "application/vnd.familysearch.gedcom+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.fastcopy-disk-image": { - "source": "iana" - }, - "application/vnd.fdf": { - "source": "iana", - "extensions": ["fdf"] - }, - "application/vnd.fdsn.mseed": { - "source": "iana", - "extensions": ["mseed"] - }, - "application/vnd.fdsn.seed": { - "source": "iana", - "extensions": ["seed","dataless"] - }, - "application/vnd.ffsns": { - "source": "iana" - }, - "application/vnd.ficlab.flb+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.filmit.zfc": { - "source": "iana" - }, - "application/vnd.fints": { - "source": "iana" - }, - "application/vnd.firemonkeys.cloudcell": { - "source": "iana" - }, - "application/vnd.flographit": { - "source": "iana", - "extensions": ["gph"] - }, - "application/vnd.fluxtime.clip": { - "source": "iana", - "extensions": ["ftc"] - }, - "application/vnd.font-fontforge-sfd": { - "source": "iana" - }, - "application/vnd.framemaker": { - "source": "iana", - "extensions": ["fm","frame","maker","book"] - }, - "application/vnd.frogans.fnc": { - "source": "iana", - "extensions": ["fnc"] - }, - "application/vnd.frogans.ltf": { - "source": "iana", - "extensions": ["ltf"] - }, - "application/vnd.fsc.weblaunch": { - "source": "iana", - "extensions": ["fsc"] - }, - "application/vnd.fujifilm.fb.docuworks": { - "source": "iana" - }, - "application/vnd.fujifilm.fb.docuworks.binder": { - "source": "iana" - }, - "application/vnd.fujifilm.fb.docuworks.container": { - "source": "iana" - }, - "application/vnd.fujifilm.fb.jfi+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.fujitsu.oasys": { - "source": "iana", - "extensions": ["oas"] - }, - "application/vnd.fujitsu.oasys2": { - "source": "iana", - "extensions": ["oa2"] - }, - "application/vnd.fujitsu.oasys3": { - "source": "iana", - "extensions": ["oa3"] - }, - "application/vnd.fujitsu.oasysgp": { - "source": "iana", - "extensions": ["fg5"] - }, - "application/vnd.fujitsu.oasysprs": { - "source": "iana", - "extensions": ["bh2"] - }, - "application/vnd.fujixerox.art-ex": { - "source": "iana" - }, - "application/vnd.fujixerox.art4": { - "source": "iana" - }, - "application/vnd.fujixerox.ddd": { - "source": "iana", - "extensions": ["ddd"] - }, - "application/vnd.fujixerox.docuworks": { - "source": "iana", - "extensions": ["xdw"] - }, - "application/vnd.fujixerox.docuworks.binder": { - "source": "iana", - "extensions": ["xbd"] - }, - "application/vnd.fujixerox.docuworks.container": { - "source": "iana" - }, - "application/vnd.fujixerox.hbpl": { - "source": "iana" - }, - "application/vnd.fut-misnet": { - "source": "iana" - }, - "application/vnd.futoin+cbor": { - "source": "iana" - }, - "application/vnd.futoin+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.fuzzysheet": { - "source": "iana", - "extensions": ["fzs"] - }, - "application/vnd.genomatix.tuxedo": { - "source": "iana", - "extensions": ["txd"] - }, - "application/vnd.gentics.grd+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.geo+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.geocube+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.geogebra.file": { - "source": "iana", - "extensions": ["ggb"] - }, - "application/vnd.geogebra.slides": { - "source": "iana" - }, - "application/vnd.geogebra.tool": { - "source": "iana", - "extensions": ["ggt"] - }, - "application/vnd.geometry-explorer": { - "source": "iana", - "extensions": ["gex","gre"] - }, - "application/vnd.geonext": { - "source": "iana", - "extensions": ["gxt"] - }, - "application/vnd.geoplan": { - "source": "iana", - "extensions": ["g2w"] - }, - "application/vnd.geospace": { - "source": "iana", - "extensions": ["g3w"] - }, - "application/vnd.gerber": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt-response": { - "source": "iana" - }, - "application/vnd.gmx": { - "source": "iana", - "extensions": ["gmx"] - }, - "application/vnd.google-apps.document": { - "compressible": false, - "extensions": ["gdoc"] - }, - "application/vnd.google-apps.presentation": { - "compressible": false, - "extensions": ["gslides"] - }, - "application/vnd.google-apps.spreadsheet": { - "compressible": false, - "extensions": ["gsheet"] - }, - "application/vnd.google-earth.kml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["kml"] - }, - "application/vnd.google-earth.kmz": { - "source": "iana", - "compressible": false, - "extensions": ["kmz"] - }, - "application/vnd.gov.sk.e-form+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.gov.sk.e-form+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.gov.sk.xmldatacontainer+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.grafeq": { - "source": "iana", - "extensions": ["gqf","gqs"] - }, - "application/vnd.gridmp": { - "source": "iana" - }, - "application/vnd.groove-account": { - "source": "iana", - "extensions": ["gac"] - }, - "application/vnd.groove-help": { - "source": "iana", - "extensions": ["ghf"] - }, - "application/vnd.groove-identity-message": { - "source": "iana", - "extensions": ["gim"] - }, - "application/vnd.groove-injector": { - "source": "iana", - "extensions": ["grv"] - }, - "application/vnd.groove-tool-message": { - "source": "iana", - "extensions": ["gtm"] - }, - "application/vnd.groove-tool-template": { - "source": "iana", - "extensions": ["tpl"] - }, - "application/vnd.groove-vcard": { - "source": "iana", - "extensions": ["vcg"] - }, - "application/vnd.hal+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hal+xml": { - "source": "iana", - "compressible": true, - "extensions": ["hal"] - }, - "application/vnd.handheld-entertainment+xml": { - "source": "iana", - "compressible": true, - "extensions": ["zmm"] - }, - "application/vnd.hbci": { - "source": "iana", - "extensions": ["hbci"] - }, - "application/vnd.hc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hcl-bireports": { - "source": "iana" - }, - "application/vnd.hdt": { - "source": "iana" - }, - "application/vnd.heroku+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hhe.lesson-player": { - "source": "iana", - "extensions": ["les"] - }, - "application/vnd.hl7cda+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.hl7v2+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.hp-hpgl": { - "source": "iana", - "extensions": ["hpgl"] - }, - "application/vnd.hp-hpid": { - "source": "iana", - "extensions": ["hpid"] - }, - "application/vnd.hp-hps": { - "source": "iana", - "extensions": ["hps"] - }, - "application/vnd.hp-jlyt": { - "source": "iana", - "extensions": ["jlt"] - }, - "application/vnd.hp-pcl": { - "source": "iana", - "extensions": ["pcl"] - }, - "application/vnd.hp-pclxl": { - "source": "iana", - "extensions": ["pclxl"] - }, - "application/vnd.httphone": { - "source": "iana" - }, - "application/vnd.hydrostatix.sof-data": { - "source": "iana", - "extensions": ["sfd-hdstx"] - }, - "application/vnd.hyper+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hyper-item+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hyperdrive+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hzn-3d-crossword": { - "source": "iana" - }, - "application/vnd.ibm.afplinedata": { - "source": "iana" - }, - "application/vnd.ibm.electronic-media": { - "source": "iana" - }, - "application/vnd.ibm.minipay": { - "source": "iana", - "extensions": ["mpy"] - }, - "application/vnd.ibm.modcap": { - "source": "iana", - "extensions": ["afp","listafp","list3820"] - }, - "application/vnd.ibm.rights-management": { - "source": "iana", - "extensions": ["irm"] - }, - "application/vnd.ibm.secure-container": { - "source": "iana", - "extensions": ["sc"] - }, - "application/vnd.iccprofile": { - "source": "iana", - "extensions": ["icc","icm"] - }, - "application/vnd.ieee.1905": { - "source": "iana" - }, - "application/vnd.igloader": { - "source": "iana", - "extensions": ["igl"] - }, - "application/vnd.imagemeter.folder+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.imagemeter.image+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.immervision-ivp": { - "source": "iana", - "extensions": ["ivp"] - }, - "application/vnd.immervision-ivu": { - "source": "iana", - "extensions": ["ivu"] - }, - "application/vnd.ims.imsccv1p1": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p2": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p3": { - "source": "iana" - }, - "application/vnd.ims.lis.v2.result+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolconsumerprofile+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy.id+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings.simple+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.informedcontrol.rms+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.informix-visionary": { - "source": "iana" - }, - "application/vnd.infotech.project": { - "source": "iana" - }, - "application/vnd.infotech.project+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.innopath.wamp.notification": { - "source": "iana" - }, - "application/vnd.insors.igm": { - "source": "iana", - "extensions": ["igm"] - }, - "application/vnd.intercon.formnet": { - "source": "iana", - "extensions": ["xpw","xpx"] - }, - "application/vnd.intergeo": { - "source": "iana", - "extensions": ["i2g"] - }, - "application/vnd.intertrust.digibox": { - "source": "iana" - }, - "application/vnd.intertrust.nncp": { - "source": "iana" - }, - "application/vnd.intu.qbo": { - "source": "iana", - "extensions": ["qbo"] - }, - "application/vnd.intu.qfx": { - "source": "iana", - "extensions": ["qfx"] - }, - "application/vnd.iptc.g2.catalogitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.conceptitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.knowledgeitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.newsitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.newsmessage+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.packageitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.planningitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ipunplugged.rcprofile": { - "source": "iana", - "extensions": ["rcprofile"] - }, - "application/vnd.irepository.package+xml": { - "source": "iana", - "compressible": true, - "extensions": ["irp"] - }, - "application/vnd.is-xpr": { - "source": "iana", - "extensions": ["xpr"] - }, - "application/vnd.isac.fcs": { - "source": "iana", - "extensions": ["fcs"] - }, - "application/vnd.iso11783-10+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.jam": { - "source": "iana", - "extensions": ["jam"] - }, - "application/vnd.japannet-directory-service": { - "source": "iana" - }, - "application/vnd.japannet-jpnstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-payment-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-registration": { - "source": "iana" - }, - "application/vnd.japannet-registration-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-setstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-verification": { - "source": "iana" - }, - "application/vnd.japannet-verification-wakeup": { - "source": "iana" - }, - "application/vnd.jcp.javame.midlet-rms": { - "source": "iana", - "extensions": ["rms"] - }, - "application/vnd.jisp": { - "source": "iana", - "extensions": ["jisp"] - }, - "application/vnd.joost.joda-archive": { - "source": "iana", - "extensions": ["joda"] - }, - "application/vnd.jsk.isdn-ngn": { - "source": "iana" - }, - "application/vnd.kahootz": { - "source": "iana", - "extensions": ["ktz","ktr"] - }, - "application/vnd.kde.karbon": { - "source": "iana", - "extensions": ["karbon"] - }, - "application/vnd.kde.kchart": { - "source": "iana", - "extensions": ["chrt"] - }, - "application/vnd.kde.kformula": { - "source": "iana", - "extensions": ["kfo"] - }, - "application/vnd.kde.kivio": { - "source": "iana", - "extensions": ["flw"] - }, - "application/vnd.kde.kontour": { - "source": "iana", - "extensions": ["kon"] - }, - "application/vnd.kde.kpresenter": { - "source": "iana", - "extensions": ["kpr","kpt"] - }, - "application/vnd.kde.kspread": { - "source": "iana", - "extensions": ["ksp"] - }, - "application/vnd.kde.kword": { - "source": "iana", - "extensions": ["kwd","kwt"] - }, - "application/vnd.kenameaapp": { - "source": "iana", - "extensions": ["htke"] - }, - "application/vnd.kidspiration": { - "source": "iana", - "extensions": ["kia"] - }, - "application/vnd.kinar": { - "source": "iana", - "extensions": ["kne","knp"] - }, - "application/vnd.koan": { - "source": "iana", - "extensions": ["skp","skd","skt","skm"] - }, - "application/vnd.kodak-descriptor": { - "source": "iana", - "extensions": ["sse"] - }, - "application/vnd.las": { - "source": "iana" - }, - "application/vnd.las.las+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.las.las+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lasxml"] - }, - "application/vnd.laszip": { - "source": "iana" - }, - "application/vnd.leap+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.liberty-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.llamagraphics.life-balance.desktop": { - "source": "iana", - "extensions": ["lbd"] - }, - "application/vnd.llamagraphics.life-balance.exchange+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lbe"] - }, - "application/vnd.logipipe.circuit+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.loom": { - "source": "iana" - }, - "application/vnd.lotus-1-2-3": { - "source": "iana", - "extensions": ["123"] - }, - "application/vnd.lotus-approach": { - "source": "iana", - "extensions": ["apr"] - }, - "application/vnd.lotus-freelance": { - "source": "iana", - "extensions": ["pre"] - }, - "application/vnd.lotus-notes": { - "source": "iana", - "extensions": ["nsf"] - }, - "application/vnd.lotus-organizer": { - "source": "iana", - "extensions": ["org"] - }, - "application/vnd.lotus-screencam": { - "source": "iana", - "extensions": ["scm"] - }, - "application/vnd.lotus-wordpro": { - "source": "iana", - "extensions": ["lwp"] - }, - "application/vnd.macports.portpkg": { - "source": "iana", - "extensions": ["portpkg"] - }, - "application/vnd.mapbox-vector-tile": { - "source": "iana", - "extensions": ["mvt"] - }, - "application/vnd.marlin.drm.actiontoken+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.conftoken+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.license+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.mdcf": { - "source": "iana" - }, - "application/vnd.mason+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.maxar.archive.3tz+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.maxmind.maxmind-db": { - "source": "iana" - }, - "application/vnd.mcd": { - "source": "iana", - "extensions": ["mcd"] - }, - "application/vnd.medcalcdata": { - "source": "iana", - "extensions": ["mc1"] - }, - "application/vnd.mediastation.cdkey": { - "source": "iana", - "extensions": ["cdkey"] - }, - "application/vnd.meridian-slingshot": { - "source": "iana" - }, - "application/vnd.mfer": { - "source": "iana", - "extensions": ["mwf"] - }, - "application/vnd.mfmp": { - "source": "iana", - "extensions": ["mfm"] - }, - "application/vnd.micro+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.micrografx.flo": { - "source": "iana", - "extensions": ["flo"] - }, - "application/vnd.micrografx.igx": { - "source": "iana", - "extensions": ["igx"] - }, - "application/vnd.microsoft.portable-executable": { - "source": "iana" - }, - "application/vnd.microsoft.windows.thumbnail-cache": { - "source": "iana" - }, - "application/vnd.miele+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.mif": { - "source": "iana", - "extensions": ["mif"] - }, - "application/vnd.minisoft-hp3000-save": { - "source": "iana" - }, - "application/vnd.mitsubishi.misty-guard.trustweb": { - "source": "iana" - }, - "application/vnd.mobius.daf": { - "source": "iana", - "extensions": ["daf"] - }, - "application/vnd.mobius.dis": { - "source": "iana", - "extensions": ["dis"] - }, - "application/vnd.mobius.mbk": { - "source": "iana", - "extensions": ["mbk"] - }, - "application/vnd.mobius.mqy": { - "source": "iana", - "extensions": ["mqy"] - }, - "application/vnd.mobius.msl": { - "source": "iana", - "extensions": ["msl"] - }, - "application/vnd.mobius.plc": { - "source": "iana", - "extensions": ["plc"] - }, - "application/vnd.mobius.txf": { - "source": "iana", - "extensions": ["txf"] - }, - "application/vnd.mophun.application": { - "source": "iana", - "extensions": ["mpn"] - }, - "application/vnd.mophun.certificate": { - "source": "iana", - "extensions": ["mpc"] - }, - "application/vnd.motorola.flexsuite": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.adsi": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.fis": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.gotap": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.kmr": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.ttc": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.wem": { - "source": "iana" - }, - "application/vnd.motorola.iprm": { - "source": "iana" - }, - "application/vnd.mozilla.xul+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xul"] - }, - "application/vnd.ms-3mfdocument": { - "source": "iana" - }, - "application/vnd.ms-artgalry": { - "source": "iana", - "extensions": ["cil"] - }, - "application/vnd.ms-asf": { - "source": "iana" - }, - "application/vnd.ms-cab-compressed": { - "source": "iana", - "extensions": ["cab"] - }, - "application/vnd.ms-color.iccprofile": { - "source": "apache" - }, - "application/vnd.ms-excel": { - "source": "iana", - "compressible": false, - "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] - }, - "application/vnd.ms-excel.addin.macroenabled.12": { - "source": "iana", - "extensions": ["xlam"] - }, - "application/vnd.ms-excel.sheet.binary.macroenabled.12": { - "source": "iana", - "extensions": ["xlsb"] - }, - "application/vnd.ms-excel.sheet.macroenabled.12": { - "source": "iana", - "extensions": ["xlsm"] - }, - "application/vnd.ms-excel.template.macroenabled.12": { - "source": "iana", - "extensions": ["xltm"] - }, - "application/vnd.ms-fontobject": { - "source": "iana", - "compressible": true, - "extensions": ["eot"] - }, - "application/vnd.ms-htmlhelp": { - "source": "iana", - "extensions": ["chm"] - }, - "application/vnd.ms-ims": { - "source": "iana", - "extensions": ["ims"] - }, - "application/vnd.ms-lrm": { - "source": "iana", - "extensions": ["lrm"] - }, - "application/vnd.ms-office.activex+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-officetheme": { - "source": "iana", - "extensions": ["thmx"] - }, - "application/vnd.ms-opentype": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-outlook": { - "compressible": false, - "extensions": ["msg"] - }, - "application/vnd.ms-package.obfuscated-opentype": { - "source": "apache" - }, - "application/vnd.ms-pki.seccat": { - "source": "apache", - "extensions": ["cat"] - }, - "application/vnd.ms-pki.stl": { - "source": "apache", - "extensions": ["stl"] - }, - "application/vnd.ms-playready.initiator+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-powerpoint": { - "source": "iana", - "compressible": false, - "extensions": ["ppt","pps","pot"] - }, - "application/vnd.ms-powerpoint.addin.macroenabled.12": { - "source": "iana", - "extensions": ["ppam"] - }, - "application/vnd.ms-powerpoint.presentation.macroenabled.12": { - "source": "iana", - "extensions": ["pptm"] - }, - "application/vnd.ms-powerpoint.slide.macroenabled.12": { - "source": "iana", - "extensions": ["sldm"] - }, - "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { - "source": "iana", - "extensions": ["ppsm"] - }, - "application/vnd.ms-powerpoint.template.macroenabled.12": { - "source": "iana", - "extensions": ["potm"] - }, - "application/vnd.ms-printdevicecapabilities+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-printing.printticket+xml": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-printschematicket+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-project": { - "source": "iana", - "extensions": ["mpp","mpt"] - }, - "application/vnd.ms-tnef": { - "source": "iana" - }, - "application/vnd.ms-windows.devicepairing": { - "source": "iana" - }, - "application/vnd.ms-windows.nwprinting.oob": { - "source": "iana" - }, - "application/vnd.ms-windows.printerpairing": { - "source": "iana" - }, - "application/vnd.ms-windows.wsd.oob": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-resp": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-resp": { - "source": "iana" - }, - "application/vnd.ms-word.document.macroenabled.12": { - "source": "iana", - "extensions": ["docm"] - }, - "application/vnd.ms-word.template.macroenabled.12": { - "source": "iana", - "extensions": ["dotm"] - }, - "application/vnd.ms-works": { - "source": "iana", - "extensions": ["wps","wks","wcm","wdb"] - }, - "application/vnd.ms-wpl": { - "source": "iana", - "extensions": ["wpl"] - }, - "application/vnd.ms-xpsdocument": { - "source": "iana", - "compressible": false, - "extensions": ["xps"] - }, - "application/vnd.msa-disk-image": { - "source": "iana" - }, - "application/vnd.mseq": { - "source": "iana", - "extensions": ["mseq"] - }, - "application/vnd.msign": { - "source": "iana" - }, - "application/vnd.multiad.creator": { - "source": "iana" - }, - "application/vnd.multiad.creator.cif": { - "source": "iana" - }, - "application/vnd.music-niff": { - "source": "iana" - }, - "application/vnd.musician": { - "source": "iana", - "extensions": ["mus"] - }, - "application/vnd.muvee.style": { - "source": "iana", - "extensions": ["msty"] - }, - "application/vnd.mynfc": { - "source": "iana", - "extensions": ["taglet"] - }, - "application/vnd.nacamar.ybrid+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ncd.control": { - "source": "iana" - }, - "application/vnd.ncd.reference": { - "source": "iana" - }, - "application/vnd.nearst.inv+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.nebumind.line": { - "source": "iana" - }, - "application/vnd.nervana": { - "source": "iana" - }, - "application/vnd.netfpx": { - "source": "iana" - }, - "application/vnd.neurolanguage.nlu": { - "source": "iana", - "extensions": ["nlu"] - }, - "application/vnd.nimn": { - "source": "iana" - }, - "application/vnd.nintendo.nitro.rom": { - "source": "iana" - }, - "application/vnd.nintendo.snes.rom": { - "source": "iana" - }, - "application/vnd.nitf": { - "source": "iana", - "extensions": ["ntf","nitf"] - }, - "application/vnd.noblenet-directory": { - "source": "iana", - "extensions": ["nnd"] - }, - "application/vnd.noblenet-sealer": { - "source": "iana", - "extensions": ["nns"] - }, - "application/vnd.noblenet-web": { - "source": "iana", - "extensions": ["nnw"] - }, - "application/vnd.nokia.catalogs": { - "source": "iana" - }, - "application/vnd.nokia.conml+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.conml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.iptv.config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.isds-radio-presets": { - "source": "iana" - }, - "application/vnd.nokia.landmark+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.landmark+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.landmarkcollection+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.n-gage.ac+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ac"] - }, - "application/vnd.nokia.n-gage.data": { - "source": "iana", - "extensions": ["ngdat"] - }, - "application/vnd.nokia.n-gage.symbian.install": { - "source": "iana", - "extensions": ["n-gage"] - }, - "application/vnd.nokia.ncd": { - "source": "iana" - }, - "application/vnd.nokia.pcd+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.pcd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.radio-preset": { - "source": "iana", - "extensions": ["rpst"] - }, - "application/vnd.nokia.radio-presets": { - "source": "iana", - "extensions": ["rpss"] - }, - "application/vnd.novadigm.edm": { - "source": "iana", - "extensions": ["edm"] - }, - "application/vnd.novadigm.edx": { - "source": "iana", - "extensions": ["edx"] - }, - "application/vnd.novadigm.ext": { - "source": "iana", - "extensions": ["ext"] - }, - "application/vnd.ntt-local.content-share": { - "source": "iana" - }, - "application/vnd.ntt-local.file-transfer": { - "source": "iana" - }, - "application/vnd.ntt-local.ogw_remote-access": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_remote": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_tcp_stream": { - "source": "iana" - }, - "application/vnd.oasis.opendocument.chart": { - "source": "iana", - "extensions": ["odc"] - }, - "application/vnd.oasis.opendocument.chart-template": { - "source": "iana", - "extensions": ["otc"] - }, - "application/vnd.oasis.opendocument.database": { - "source": "iana", - "extensions": ["odb"] - }, - "application/vnd.oasis.opendocument.formula": { - "source": "iana", - "extensions": ["odf"] - }, - "application/vnd.oasis.opendocument.formula-template": { - "source": "iana", - "extensions": ["odft"] - }, - "application/vnd.oasis.opendocument.graphics": { - "source": "iana", - "compressible": false, - "extensions": ["odg"] - }, - "application/vnd.oasis.opendocument.graphics-template": { - "source": "iana", - "extensions": ["otg"] - }, - "application/vnd.oasis.opendocument.image": { - "source": "iana", - "extensions": ["odi"] - }, - "application/vnd.oasis.opendocument.image-template": { - "source": "iana", - "extensions": ["oti"] - }, - "application/vnd.oasis.opendocument.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["odp"] - }, - "application/vnd.oasis.opendocument.presentation-template": { - "source": "iana", - "extensions": ["otp"] - }, - "application/vnd.oasis.opendocument.spreadsheet": { - "source": "iana", - "compressible": false, - "extensions": ["ods"] - }, - "application/vnd.oasis.opendocument.spreadsheet-template": { - "source": "iana", - "extensions": ["ots"] - }, - "application/vnd.oasis.opendocument.text": { - "source": "iana", - "compressible": false, - "extensions": ["odt"] - }, - "application/vnd.oasis.opendocument.text-master": { - "source": "iana", - "extensions": ["odm"] - }, - "application/vnd.oasis.opendocument.text-template": { - "source": "iana", - "extensions": ["ott"] - }, - "application/vnd.oasis.opendocument.text-web": { - "source": "iana", - "extensions": ["oth"] - }, - "application/vnd.obn": { - "source": "iana" - }, - "application/vnd.ocf+cbor": { - "source": "iana" - }, - "application/vnd.oci.image.manifest.v1+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oftn.l10n+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessdownload+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessstreaming+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.cspg-hexbinary": { - "source": "iana" - }, - "application/vnd.oipf.dae.svg+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.dae.xhtml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.mippvcontrolmessage+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.pae.gem": { - "source": "iana" - }, - "application/vnd.oipf.spdiscovery+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.spdlist+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.ueprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.userprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.olpc-sugar": { - "source": "iana", - "extensions": ["xo"] - }, - "application/vnd.oma-scws-config": { - "source": "iana" - }, - "application/vnd.oma-scws-http-request": { - "source": "iana" - }, - "application/vnd.oma-scws-http-response": { - "source": "iana" - }, - "application/vnd.oma.bcast.associated-procedure-parameter+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.drm-trigger+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.imd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.ltkm": { - "source": "iana" - }, - "application/vnd.oma.bcast.notification+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.provisioningtrigger": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgboot": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgdd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.sgdu": { - "source": "iana" - }, - "application/vnd.oma.bcast.simple-symbol-container": { - "source": "iana" - }, - "application/vnd.oma.bcast.smartcard-trigger+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.sprov+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.stkm": { - "source": "iana" - }, - "application/vnd.oma.cab-address-book+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-feature-handler+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-pcc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-subs-invite+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-user-prefs+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.dcd": { - "source": "iana" - }, - "application/vnd.oma.dcdc": { - "source": "iana" - }, - "application/vnd.oma.dd2+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dd2"] - }, - "application/vnd.oma.drm.risd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.group-usage-list+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.lwm2m+cbor": { - "source": "iana" - }, - "application/vnd.oma.lwm2m+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.lwm2m+tlv": { - "source": "iana" - }, - "application/vnd.oma.pal+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.detailed-progress-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.final-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.groups+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.invocation-descriptor+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.optimized-progress-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.push": { - "source": "iana" - }, - "application/vnd.oma.scidm.messages+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.xcap-directory+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.omads-email+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.omads-file+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.omads-folder+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.omaloc-supl-init": { - "source": "iana" - }, - "application/vnd.onepager": { - "source": "iana" - }, - "application/vnd.onepagertamp": { - "source": "iana" - }, - "application/vnd.onepagertamx": { - "source": "iana" - }, - "application/vnd.onepagertat": { - "source": "iana" - }, - "application/vnd.onepagertatp": { - "source": "iana" - }, - "application/vnd.onepagertatx": { - "source": "iana" - }, - "application/vnd.openblox.game+xml": { - "source": "iana", - "compressible": true, - "extensions": ["obgx"] - }, - "application/vnd.openblox.game-binary": { - "source": "iana" - }, - "application/vnd.openeye.oeb": { - "source": "iana" - }, - "application/vnd.openofficeorg.extension": { - "source": "apache", - "extensions": ["oxt"] - }, - "application/vnd.openstreetmap.data+xml": { - "source": "iana", - "compressible": true, - "extensions": ["osm"] - }, - "application/vnd.opentimestamps.ots": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.custom-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawing+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.extended-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["pptx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide": { - "source": "iana", - "extensions": ["sldx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { - "source": "iana", - "extensions": ["ppsx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.template": { - "source": "iana", - "extensions": ["potx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { - "source": "iana", - "compressible": false, - "extensions": ["xlsx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { - "source": "iana", - "extensions": ["xltx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.theme+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.themeoverride+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.vmldrawing": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { - "source": "iana", - "compressible": false, - "extensions": ["docx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { - "source": "iana", - "extensions": ["dotx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.core-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.relationships+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oracle.resource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.orange.indata": { - "source": "iana" - }, - "application/vnd.osa.netdeploy": { - "source": "iana" - }, - "application/vnd.osgeo.mapguide.package": { - "source": "iana", - "extensions": ["mgp"] - }, - "application/vnd.osgi.bundle": { - "source": "iana" - }, - "application/vnd.osgi.dp": { - "source": "iana", - "extensions": ["dp"] - }, - "application/vnd.osgi.subsystem": { - "source": "iana", - "extensions": ["esa"] - }, - "application/vnd.otps.ct-kip+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oxli.countgraph": { - "source": "iana" - }, - "application/vnd.pagerduty+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.palm": { - "source": "iana", - "extensions": ["pdb","pqa","oprc"] - }, - "application/vnd.panoply": { - "source": "iana" - }, - "application/vnd.paos.xml": { - "source": "iana" - }, - "application/vnd.patentdive": { - "source": "iana" - }, - "application/vnd.patientecommsdoc": { - "source": "iana" - }, - "application/vnd.pawaafile": { - "source": "iana", - "extensions": ["paw"] - }, - "application/vnd.pcos": { - "source": "iana" - }, - "application/vnd.pg.format": { - "source": "iana", - "extensions": ["str"] - }, - "application/vnd.pg.osasli": { - "source": "iana", - "extensions": ["ei6"] - }, - "application/vnd.piaccess.application-licence": { - "source": "iana" - }, - "application/vnd.picsel": { - "source": "iana", - "extensions": ["efif"] - }, - "application/vnd.pmi.widget": { - "source": "iana", - "extensions": ["wg"] - }, - "application/vnd.poc.group-advertisement+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.pocketlearn": { - "source": "iana", - "extensions": ["plf"] - }, - "application/vnd.powerbuilder6": { - "source": "iana", - "extensions": ["pbd"] - }, - "application/vnd.powerbuilder6-s": { - "source": "iana" - }, - "application/vnd.powerbuilder7": { - "source": "iana" - }, - "application/vnd.powerbuilder7-s": { - "source": "iana" - }, - "application/vnd.powerbuilder75": { - "source": "iana" - }, - "application/vnd.powerbuilder75-s": { - "source": "iana" - }, - "application/vnd.preminet": { - "source": "iana" - }, - "application/vnd.previewsystems.box": { - "source": "iana", - "extensions": ["box"] - }, - "application/vnd.proteus.magazine": { - "source": "iana", - "extensions": ["mgz"] - }, - "application/vnd.psfs": { - "source": "iana" - }, - "application/vnd.publishare-delta-tree": { - "source": "iana", - "extensions": ["qps"] - }, - "application/vnd.pvi.ptid1": { - "source": "iana", - "extensions": ["ptid"] - }, - "application/vnd.pwg-multiplexed": { - "source": "iana" - }, - "application/vnd.pwg-xhtml-print+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.qualcomm.brew-app-res": { - "source": "iana" - }, - "application/vnd.quarantainenet": { - "source": "iana" - }, - "application/vnd.quark.quarkxpress": { - "source": "iana", - "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] - }, - "application/vnd.quobject-quoxdocument": { - "source": "iana" - }, - "application/vnd.radisys.moml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-conf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-conn+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-dialog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-stream+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-conf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-base+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-fax-detect+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-group+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-speech+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-transform+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.rainstor.data": { - "source": "iana" - }, - "application/vnd.rapid": { - "source": "iana" - }, - "application/vnd.rar": { - "source": "iana", - "extensions": ["rar"] - }, - "application/vnd.realvnc.bed": { - "source": "iana", - "extensions": ["bed"] - }, - "application/vnd.recordare.musicxml": { - "source": "iana", - "extensions": ["mxl"] - }, - "application/vnd.recordare.musicxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["musicxml"] - }, - "application/vnd.renlearn.rlprint": { - "source": "iana" - }, - "application/vnd.resilient.logic": { - "source": "iana" - }, - "application/vnd.restful+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.rig.cryptonote": { - "source": "iana", - "extensions": ["cryptonote"] - }, - "application/vnd.rim.cod": { - "source": "apache", - "extensions": ["cod"] - }, - "application/vnd.rn-realmedia": { - "source": "apache", - "extensions": ["rm"] - }, - "application/vnd.rn-realmedia-vbr": { - "source": "apache", - "extensions": ["rmvb"] - }, - "application/vnd.route66.link66+xml": { - "source": "iana", - "compressible": true, - "extensions": ["link66"] - }, - "application/vnd.rs-274x": { - "source": "iana" - }, - "application/vnd.ruckus.download": { - "source": "iana" - }, - "application/vnd.s3sms": { - "source": "iana" - }, - "application/vnd.sailingtracker.track": { - "source": "iana", - "extensions": ["st"] - }, - "application/vnd.sar": { - "source": "iana" - }, - "application/vnd.sbm.cid": { - "source": "iana" - }, - "application/vnd.sbm.mid2": { - "source": "iana" - }, - "application/vnd.scribus": { - "source": "iana" - }, - "application/vnd.sealed.3df": { - "source": "iana" - }, - "application/vnd.sealed.csf": { - "source": "iana" - }, - "application/vnd.sealed.doc": { - "source": "iana" - }, - "application/vnd.sealed.eml": { - "source": "iana" - }, - "application/vnd.sealed.mht": { - "source": "iana" - }, - "application/vnd.sealed.net": { - "source": "iana" - }, - "application/vnd.sealed.ppt": { - "source": "iana" - }, - "application/vnd.sealed.tiff": { - "source": "iana" - }, - "application/vnd.sealed.xls": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.html": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.pdf": { - "source": "iana" - }, - "application/vnd.seemail": { - "source": "iana", - "extensions": ["see"] - }, - "application/vnd.seis+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.sema": { - "source": "iana", - "extensions": ["sema"] - }, - "application/vnd.semd": { - "source": "iana", - "extensions": ["semd"] - }, - "application/vnd.semf": { - "source": "iana", - "extensions": ["semf"] - }, - "application/vnd.shade-save-file": { - "source": "iana" - }, - "application/vnd.shana.informed.formdata": { - "source": "iana", - "extensions": ["ifm"] - }, - "application/vnd.shana.informed.formtemplate": { - "source": "iana", - "extensions": ["itp"] - }, - "application/vnd.shana.informed.interchange": { - "source": "iana", - "extensions": ["iif"] - }, - "application/vnd.shana.informed.package": { - "source": "iana", - "extensions": ["ipk"] - }, - "application/vnd.shootproof+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.shopkick+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.shp": { - "source": "iana" - }, - "application/vnd.shx": { - "source": "iana" - }, - "application/vnd.sigrok.session": { - "source": "iana" - }, - "application/vnd.simtech-mindmapper": { - "source": "iana", - "extensions": ["twd","twds"] - }, - "application/vnd.siren+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.smaf": { - "source": "iana", - "extensions": ["mmf"] - }, - "application/vnd.smart.notebook": { - "source": "iana" - }, - "application/vnd.smart.teacher": { - "source": "iana", - "extensions": ["teacher"] - }, - "application/vnd.snesdev-page-table": { - "source": "iana" - }, - "application/vnd.software602.filler.form+xml": { - "source": "iana", - "compressible": true, - "extensions": ["fo"] - }, - "application/vnd.software602.filler.form-xml-zip": { - "source": "iana" - }, - "application/vnd.solent.sdkm+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sdkm","sdkd"] - }, - "application/vnd.spotfire.dxp": { - "source": "iana", - "extensions": ["dxp"] - }, - "application/vnd.spotfire.sfs": { - "source": "iana", - "extensions": ["sfs"] - }, - "application/vnd.sqlite3": { - "source": "iana" - }, - "application/vnd.sss-cod": { - "source": "iana" - }, - "application/vnd.sss-dtf": { - "source": "iana" - }, - "application/vnd.sss-ntf": { - "source": "iana" - }, - "application/vnd.stardivision.calc": { - "source": "apache", - "extensions": ["sdc"] - }, - "application/vnd.stardivision.draw": { - "source": "apache", - "extensions": ["sda"] - }, - "application/vnd.stardivision.impress": { - "source": "apache", - "extensions": ["sdd"] - }, - "application/vnd.stardivision.math": { - "source": "apache", - "extensions": ["smf"] - }, - "application/vnd.stardivision.writer": { - "source": "apache", - "extensions": ["sdw","vor"] - }, - "application/vnd.stardivision.writer-global": { - "source": "apache", - "extensions": ["sgl"] - }, - "application/vnd.stepmania.package": { - "source": "iana", - "extensions": ["smzip"] - }, - "application/vnd.stepmania.stepchart": { - "source": "iana", - "extensions": ["sm"] - }, - "application/vnd.street-stream": { - "source": "iana" - }, - "application/vnd.sun.wadl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wadl"] - }, - "application/vnd.sun.xml.calc": { - "source": "apache", - "extensions": ["sxc"] - }, - "application/vnd.sun.xml.calc.template": { - "source": "apache", - "extensions": ["stc"] - }, - "application/vnd.sun.xml.draw": { - "source": "apache", - "extensions": ["sxd"] - }, - "application/vnd.sun.xml.draw.template": { - "source": "apache", - "extensions": ["std"] - }, - "application/vnd.sun.xml.impress": { - "source": "apache", - "extensions": ["sxi"] - }, - "application/vnd.sun.xml.impress.template": { - "source": "apache", - "extensions": ["sti"] - }, - "application/vnd.sun.xml.math": { - "source": "apache", - "extensions": ["sxm"] - }, - "application/vnd.sun.xml.writer": { - "source": "apache", - "extensions": ["sxw"] - }, - "application/vnd.sun.xml.writer.global": { - "source": "apache", - "extensions": ["sxg"] - }, - "application/vnd.sun.xml.writer.template": { - "source": "apache", - "extensions": ["stw"] - }, - "application/vnd.sus-calendar": { - "source": "iana", - "extensions": ["sus","susp"] - }, - "application/vnd.svd": { - "source": "iana", - "extensions": ["svd"] - }, - "application/vnd.swiftview-ics": { - "source": "iana" - }, - "application/vnd.sycle+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.syft+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.symbian.install": { - "source": "apache", - "extensions": ["sis","sisx"] - }, - "application/vnd.syncml+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["xsm"] - }, - "application/vnd.syncml.dm+wbxml": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["bdm"] - }, - "application/vnd.syncml.dm+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["xdm"] - }, - "application/vnd.syncml.dm.notification": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["ddf"] - }, - "application/vnd.syncml.dmtnds+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmtnds+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.syncml.ds.notification": { - "source": "iana" - }, - "application/vnd.tableschema+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.tao.intent-module-archive": { - "source": "iana", - "extensions": ["tao"] - }, - "application/vnd.tcpdump.pcap": { - "source": "iana", - "extensions": ["pcap","cap","dmp"] - }, - "application/vnd.think-cell.ppttc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.tmd.mediaflex.api+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.tml": { - "source": "iana" - }, - "application/vnd.tmobile-livetv": { - "source": "iana", - "extensions": ["tmo"] - }, - "application/vnd.tri.onesource": { - "source": "iana" - }, - "application/vnd.trid.tpt": { - "source": "iana", - "extensions": ["tpt"] - }, - "application/vnd.triscape.mxs": { - "source": "iana", - "extensions": ["mxs"] - }, - "application/vnd.trueapp": { - "source": "iana", - "extensions": ["tra"] - }, - "application/vnd.truedoc": { - "source": "iana" - }, - "application/vnd.ubisoft.webplayer": { - "source": "iana" - }, - "application/vnd.ufdl": { - "source": "iana", - "extensions": ["ufd","ufdl"] - }, - "application/vnd.uiq.theme": { - "source": "iana", - "extensions": ["utz"] - }, - "application/vnd.umajin": { - "source": "iana", - "extensions": ["umj"] - }, - "application/vnd.unity": { - "source": "iana", - "extensions": ["unityweb"] - }, - "application/vnd.uoml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["uoml"] - }, - "application/vnd.uplanet.alert": { - "source": "iana" - }, - "application/vnd.uplanet.alert-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.channel": { - "source": "iana" - }, - "application/vnd.uplanet.channel-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.list": { - "source": "iana" - }, - "application/vnd.uplanet.list-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.signal": { - "source": "iana" - }, - "application/vnd.uri-map": { - "source": "iana" - }, - "application/vnd.valve.source.material": { - "source": "iana" - }, - "application/vnd.vcx": { - "source": "iana", - "extensions": ["vcx"] - }, - "application/vnd.vd-study": { - "source": "iana" - }, - "application/vnd.vectorworks": { - "source": "iana" - }, - "application/vnd.vel+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.verimatrix.vcas": { - "source": "iana" - }, - "application/vnd.veritone.aion+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.veryant.thin": { - "source": "iana" - }, - "application/vnd.ves.encrypted": { - "source": "iana" - }, - "application/vnd.vidsoft.vidconference": { - "source": "iana" - }, - "application/vnd.visio": { - "source": "iana", - "extensions": ["vsd","vst","vss","vsw"] - }, - "application/vnd.visionary": { - "source": "iana", - "extensions": ["vis"] - }, - "application/vnd.vividence.scriptfile": { - "source": "iana" - }, - "application/vnd.vsf": { - "source": "iana", - "extensions": ["vsf"] - }, - "application/vnd.wap.sic": { - "source": "iana" - }, - "application/vnd.wap.slc": { - "source": "iana" - }, - "application/vnd.wap.wbxml": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["wbxml"] - }, - "application/vnd.wap.wmlc": { - "source": "iana", - "extensions": ["wmlc"] - }, - "application/vnd.wap.wmlscriptc": { - "source": "iana", - "extensions": ["wmlsc"] - }, - "application/vnd.webturbo": { - "source": "iana", - "extensions": ["wtb"] - }, - "application/vnd.wfa.dpp": { - "source": "iana" - }, - "application/vnd.wfa.p2p": { - "source": "iana" - }, - "application/vnd.wfa.wsc": { - "source": "iana" - }, - "application/vnd.windows.devicepairing": { - "source": "iana" - }, - "application/vnd.wmc": { - "source": "iana" - }, - "application/vnd.wmf.bootstrap": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica.package": { - "source": "iana" - }, - "application/vnd.wolfram.player": { - "source": "iana", - "extensions": ["nbp"] - }, - "application/vnd.wordperfect": { - "source": "iana", - "extensions": ["wpd"] - }, - "application/vnd.wqd": { - "source": "iana", - "extensions": ["wqd"] - }, - "application/vnd.wrq-hp3000-labelled": { - "source": "iana" - }, - "application/vnd.wt.stf": { - "source": "iana", - "extensions": ["stf"] - }, - "application/vnd.wv.csp+wbxml": { - "source": "iana" - }, - "application/vnd.wv.csp+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.wv.ssp+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.xacml+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.xara": { - "source": "iana", - "extensions": ["xar"] - }, - "application/vnd.xfdl": { - "source": "iana", - "extensions": ["xfdl"] - }, - "application/vnd.xfdl.webform": { - "source": "iana" - }, - "application/vnd.xmi+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.xmpie.cpkg": { - "source": "iana" - }, - "application/vnd.xmpie.dpkg": { - "source": "iana" - }, - "application/vnd.xmpie.plan": { - "source": "iana" - }, - "application/vnd.xmpie.ppkg": { - "source": "iana" - }, - "application/vnd.xmpie.xlim": { - "source": "iana" - }, - "application/vnd.yamaha.hv-dic": { - "source": "iana", - "extensions": ["hvd"] - }, - "application/vnd.yamaha.hv-script": { - "source": "iana", - "extensions": ["hvs"] - }, - "application/vnd.yamaha.hv-voice": { - "source": "iana", - "extensions": ["hvp"] - }, - "application/vnd.yamaha.openscoreformat": { - "source": "iana", - "extensions": ["osf"] - }, - "application/vnd.yamaha.openscoreformat.osfpvg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["osfpvg"] - }, - "application/vnd.yamaha.remote-setup": { - "source": "iana" - }, - "application/vnd.yamaha.smaf-audio": { - "source": "iana", - "extensions": ["saf"] - }, - "application/vnd.yamaha.smaf-phrase": { - "source": "iana", - "extensions": ["spf"] - }, - "application/vnd.yamaha.through-ngn": { - "source": "iana" - }, - "application/vnd.yamaha.tunnel-udpencap": { - "source": "iana" - }, - "application/vnd.yaoweme": { - "source": "iana" - }, - "application/vnd.yellowriver-custom-menu": { - "source": "iana", - "extensions": ["cmp"] - }, - "application/vnd.youtube.yt": { - "source": "iana" - }, - "application/vnd.zul": { - "source": "iana", - "extensions": ["zir","zirz"] - }, - "application/vnd.zzazz.deck+xml": { - "source": "iana", - "compressible": true, - "extensions": ["zaz"] - }, - "application/voicexml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["vxml"] - }, - "application/voucher-cms+json": { - "source": "iana", - "compressible": true - }, - "application/vq-rtcpxr": { - "source": "iana" - }, - "application/wasm": { - "source": "iana", - "compressible": true, - "extensions": ["wasm"] - }, - "application/watcherinfo+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wif"] - }, - "application/webpush-options+json": { - "source": "iana", - "compressible": true - }, - "application/whoispp-query": { - "source": "iana" - }, - "application/whoispp-response": { - "source": "iana" - }, - "application/widget": { - "source": "iana", - "extensions": ["wgt"] - }, - "application/winhlp": { - "source": "apache", - "extensions": ["hlp"] - }, - "application/wita": { - "source": "iana" - }, - "application/wordperfect5.1": { - "source": "iana" - }, - "application/wsdl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wsdl"] - }, - "application/wspolicy+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wspolicy"] - }, - "application/x-7z-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["7z"] - }, - "application/x-abiword": { - "source": "apache", - "extensions": ["abw"] - }, - "application/x-ace-compressed": { - "source": "apache", - "extensions": ["ace"] - }, - "application/x-amf": { - "source": "apache" - }, - "application/x-apple-diskimage": { - "source": "apache", - "extensions": ["dmg"] - }, - "application/x-arj": { - "compressible": false, - "extensions": ["arj"] - }, - "application/x-authorware-bin": { - "source": "apache", - "extensions": ["aab","x32","u32","vox"] - }, - "application/x-authorware-map": { - "source": "apache", - "extensions": ["aam"] - }, - "application/x-authorware-seg": { - "source": "apache", - "extensions": ["aas"] - }, - "application/x-bcpio": { - "source": "apache", - "extensions": ["bcpio"] - }, - "application/x-bdoc": { - "compressible": false, - "extensions": ["bdoc"] - }, - "application/x-bittorrent": { - "source": "apache", - "extensions": ["torrent"] - }, - "application/x-blorb": { - "source": "apache", - "extensions": ["blb","blorb"] - }, - "application/x-bzip": { - "source": "apache", - "compressible": false, - "extensions": ["bz"] - }, - "application/x-bzip2": { - "source": "apache", - "compressible": false, - "extensions": ["bz2","boz"] - }, - "application/x-cbr": { - "source": "apache", - "extensions": ["cbr","cba","cbt","cbz","cb7"] - }, - "application/x-cdlink": { - "source": "apache", - "extensions": ["vcd"] - }, - "application/x-cfs-compressed": { - "source": "apache", - "extensions": ["cfs"] - }, - "application/x-chat": { - "source": "apache", - "extensions": ["chat"] - }, - "application/x-chess-pgn": { - "source": "apache", - "extensions": ["pgn"] - }, - "application/x-chrome-extension": { - "extensions": ["crx"] - }, - "application/x-cocoa": { - "source": "nginx", - "extensions": ["cco"] - }, - "application/x-compress": { - "source": "apache" - }, - "application/x-conference": { - "source": "apache", - "extensions": ["nsc"] - }, - "application/x-cpio": { - "source": "apache", - "extensions": ["cpio"] - }, - "application/x-csh": { - "source": "apache", - "extensions": ["csh"] - }, - "application/x-deb": { - "compressible": false - }, - "application/x-debian-package": { - "source": "apache", - "extensions": ["deb","udeb"] - }, - "application/x-dgc-compressed": { - "source": "apache", - "extensions": ["dgc"] - }, - "application/x-director": { - "source": "apache", - "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] - }, - "application/x-doom": { - "source": "apache", - "extensions": ["wad"] - }, - "application/x-dtbncx+xml": { - "source": "apache", - "compressible": true, - "extensions": ["ncx"] - }, - "application/x-dtbook+xml": { - "source": "apache", - "compressible": true, - "extensions": ["dtb"] - }, - "application/x-dtbresource+xml": { - "source": "apache", - "compressible": true, - "extensions": ["res"] - }, - "application/x-dvi": { - "source": "apache", - "compressible": false, - "extensions": ["dvi"] - }, - "application/x-envoy": { - "source": "apache", - "extensions": ["evy"] - }, - "application/x-eva": { - "source": "apache", - "extensions": ["eva"] - }, - "application/x-font-bdf": { - "source": "apache", - "extensions": ["bdf"] - }, - "application/x-font-dos": { - "source": "apache" - }, - "application/x-font-framemaker": { - "source": "apache" - }, - "application/x-font-ghostscript": { - "source": "apache", - "extensions": ["gsf"] - }, - "application/x-font-libgrx": { - "source": "apache" - }, - "application/x-font-linux-psf": { - "source": "apache", - "extensions": ["psf"] - }, - "application/x-font-pcf": { - "source": "apache", - "extensions": ["pcf"] - }, - "application/x-font-snf": { - "source": "apache", - "extensions": ["snf"] - }, - "application/x-font-speedo": { - "source": "apache" - }, - "application/x-font-sunos-news": { - "source": "apache" - }, - "application/x-font-type1": { - "source": "apache", - "extensions": ["pfa","pfb","pfm","afm"] - }, - "application/x-font-vfont": { - "source": "apache" - }, - "application/x-freearc": { - "source": "apache", - "extensions": ["arc"] - }, - "application/x-futuresplash": { - "source": "apache", - "extensions": ["spl"] - }, - "application/x-gca-compressed": { - "source": "apache", - "extensions": ["gca"] - }, - "application/x-glulx": { - "source": "apache", - "extensions": ["ulx"] - }, - "application/x-gnumeric": { - "source": "apache", - "extensions": ["gnumeric"] - }, - "application/x-gramps-xml": { - "source": "apache", - "extensions": ["gramps"] - }, - "application/x-gtar": { - "source": "apache", - "extensions": ["gtar"] - }, - "application/x-gzip": { - "source": "apache" - }, - "application/x-hdf": { - "source": "apache", - "extensions": ["hdf"] - }, - "application/x-httpd-php": { - "compressible": true, - "extensions": ["php"] - }, - "application/x-install-instructions": { - "source": "apache", - "extensions": ["install"] - }, - "application/x-iso9660-image": { - "source": "apache", - "extensions": ["iso"] - }, - "application/x-iwork-keynote-sffkey": { - "extensions": ["key"] - }, - "application/x-iwork-numbers-sffnumbers": { - "extensions": ["numbers"] - }, - "application/x-iwork-pages-sffpages": { - "extensions": ["pages"] - }, - "application/x-java-archive-diff": { - "source": "nginx", - "extensions": ["jardiff"] - }, - "application/x-java-jnlp-file": { - "source": "apache", - "compressible": false, - "extensions": ["jnlp"] - }, - "application/x-javascript": { - "compressible": true - }, - "application/x-keepass2": { - "extensions": ["kdbx"] - }, - "application/x-latex": { - "source": "apache", - "compressible": false, - "extensions": ["latex"] - }, - "application/x-lua-bytecode": { - "extensions": ["luac"] - }, - "application/x-lzh-compressed": { - "source": "apache", - "extensions": ["lzh","lha"] - }, - "application/x-makeself": { - "source": "nginx", - "extensions": ["run"] - }, - "application/x-mie": { - "source": "apache", - "extensions": ["mie"] - }, - "application/x-mobipocket-ebook": { - "source": "apache", - "extensions": ["prc","mobi"] - }, - "application/x-mpegurl": { - "compressible": false - }, - "application/x-ms-application": { - "source": "apache", - "extensions": ["application"] - }, - "application/x-ms-shortcut": { - "source": "apache", - "extensions": ["lnk"] - }, - "application/x-ms-wmd": { - "source": "apache", - "extensions": ["wmd"] - }, - "application/x-ms-wmz": { - "source": "apache", - "extensions": ["wmz"] - }, - "application/x-ms-xbap": { - "source": "apache", - "extensions": ["xbap"] - }, - "application/x-msaccess": { - "source": "apache", - "extensions": ["mdb"] - }, - "application/x-msbinder": { - "source": "apache", - "extensions": ["obd"] - }, - "application/x-mscardfile": { - "source": "apache", - "extensions": ["crd"] - }, - "application/x-msclip": { - "source": "apache", - "extensions": ["clp"] - }, - "application/x-msdos-program": { - "extensions": ["exe"] - }, - "application/x-msdownload": { - "source": "apache", - "extensions": ["exe","dll","com","bat","msi"] - }, - "application/x-msmediaview": { - "source": "apache", - "extensions": ["mvb","m13","m14"] - }, - "application/x-msmetafile": { - "source": "apache", - "extensions": ["wmf","wmz","emf","emz"] - }, - "application/x-msmoney": { - "source": "apache", - "extensions": ["mny"] - }, - "application/x-mspublisher": { - "source": "apache", - "extensions": ["pub"] - }, - "application/x-msschedule": { - "source": "apache", - "extensions": ["scd"] - }, - "application/x-msterminal": { - "source": "apache", - "extensions": ["trm"] - }, - "application/x-mswrite": { - "source": "apache", - "extensions": ["wri"] - }, - "application/x-netcdf": { - "source": "apache", - "extensions": ["nc","cdf"] - }, - "application/x-ns-proxy-autoconfig": { - "compressible": true, - "extensions": ["pac"] - }, - "application/x-nzb": { - "source": "apache", - "extensions": ["nzb"] - }, - "application/x-perl": { - "source": "nginx", - "extensions": ["pl","pm"] - }, - "application/x-pilot": { - "source": "nginx", - "extensions": ["prc","pdb"] - }, - "application/x-pkcs12": { - "source": "apache", - "compressible": false, - "extensions": ["p12","pfx"] - }, - "application/x-pkcs7-certificates": { - "source": "apache", - "extensions": ["p7b","spc"] - }, - "application/x-pkcs7-certreqresp": { - "source": "apache", - "extensions": ["p7r"] - }, - "application/x-pki-message": { - "source": "iana" - }, - "application/x-rar-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["rar"] - }, - "application/x-redhat-package-manager": { - "source": "nginx", - "extensions": ["rpm"] - }, - "application/x-research-info-systems": { - "source": "apache", - "extensions": ["ris"] - }, - "application/x-sea": { - "source": "nginx", - "extensions": ["sea"] - }, - "application/x-sh": { - "source": "apache", - "compressible": true, - "extensions": ["sh"] - }, - "application/x-shar": { - "source": "apache", - "extensions": ["shar"] - }, - "application/x-shockwave-flash": { - "source": "apache", - "compressible": false, - "extensions": ["swf"] - }, - "application/x-silverlight-app": { - "source": "apache", - "extensions": ["xap"] - }, - "application/x-sql": { - "source": "apache", - "extensions": ["sql"] - }, - "application/x-stuffit": { - "source": "apache", - "compressible": false, - "extensions": ["sit"] - }, - "application/x-stuffitx": { - "source": "apache", - "extensions": ["sitx"] - }, - "application/x-subrip": { - "source": "apache", - "extensions": ["srt"] - }, - "application/x-sv4cpio": { - "source": "apache", - "extensions": ["sv4cpio"] - }, - "application/x-sv4crc": { - "source": "apache", - "extensions": ["sv4crc"] - }, - "application/x-t3vm-image": { - "source": "apache", - "extensions": ["t3"] - }, - "application/x-tads": { - "source": "apache", - "extensions": ["gam"] - }, - "application/x-tar": { - "source": "apache", - "compressible": true, - "extensions": ["tar"] - }, - "application/x-tcl": { - "source": "apache", - "extensions": ["tcl","tk"] - }, - "application/x-tex": { - "source": "apache", - "extensions": ["tex"] - }, - "application/x-tex-tfm": { - "source": "apache", - "extensions": ["tfm"] - }, - "application/x-texinfo": { - "source": "apache", - "extensions": ["texinfo","texi"] - }, - "application/x-tgif": { - "source": "apache", - "extensions": ["obj"] - }, - "application/x-ustar": { - "source": "apache", - "extensions": ["ustar"] - }, - "application/x-virtualbox-hdd": { - "compressible": true, - "extensions": ["hdd"] - }, - "application/x-virtualbox-ova": { - "compressible": true, - "extensions": ["ova"] - }, - "application/x-virtualbox-ovf": { - "compressible": true, - "extensions": ["ovf"] - }, - "application/x-virtualbox-vbox": { - "compressible": true, - "extensions": ["vbox"] - }, - "application/x-virtualbox-vbox-extpack": { - "compressible": false, - "extensions": ["vbox-extpack"] - }, - "application/x-virtualbox-vdi": { - "compressible": true, - "extensions": ["vdi"] - }, - "application/x-virtualbox-vhd": { - "compressible": true, - "extensions": ["vhd"] - }, - "application/x-virtualbox-vmdk": { - "compressible": true, - "extensions": ["vmdk"] - }, - "application/x-wais-source": { - "source": "apache", - "extensions": ["src"] - }, - "application/x-web-app-manifest+json": { - "compressible": true, - "extensions": ["webapp"] - }, - "application/x-www-form-urlencoded": { - "source": "iana", - "compressible": true - }, - "application/x-x509-ca-cert": { - "source": "iana", - "extensions": ["der","crt","pem"] - }, - "application/x-x509-ca-ra-cert": { - "source": "iana" - }, - "application/x-x509-next-ca-cert": { - "source": "iana" - }, - "application/x-xfig": { - "source": "apache", - "extensions": ["fig"] - }, - "application/x-xliff+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xlf"] - }, - "application/x-xpinstall": { - "source": "apache", - "compressible": false, - "extensions": ["xpi"] - }, - "application/x-xz": { - "source": "apache", - "extensions": ["xz"] - }, - "application/x-zmachine": { - "source": "apache", - "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] - }, - "application/x400-bp": { - "source": "iana" - }, - "application/xacml+xml": { - "source": "iana", - "compressible": true - }, - "application/xaml+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xaml"] - }, - "application/xcap-att+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xav"] - }, - "application/xcap-caps+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xca"] - }, - "application/xcap-diff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdf"] - }, - "application/xcap-el+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xel"] - }, - "application/xcap-error+xml": { - "source": "iana", - "compressible": true - }, - "application/xcap-ns+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xns"] - }, - "application/xcon-conference-info+xml": { - "source": "iana", - "compressible": true - }, - "application/xcon-conference-info-diff+xml": { - "source": "iana", - "compressible": true - }, - "application/xenc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xenc"] - }, - "application/xhtml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xhtml","xht"] - }, - "application/xhtml-voice+xml": { - "source": "apache", - "compressible": true - }, - "application/xliff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xlf"] - }, - "application/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml","xsl","xsd","rng"] - }, - "application/xml-dtd": { - "source": "iana", - "compressible": true, - "extensions": ["dtd"] - }, - "application/xml-external-parsed-entity": { - "source": "iana" - }, - "application/xml-patch+xml": { - "source": "iana", - "compressible": true - }, - "application/xmpp+xml": { - "source": "iana", - "compressible": true - }, - "application/xop+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xop"] - }, - "application/xproc+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xpl"] - }, - "application/xslt+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xsl","xslt"] - }, - "application/xspf+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xspf"] - }, - "application/xv+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mxml","xhvml","xvml","xvm"] - }, - "application/yang": { - "source": "iana", - "extensions": ["yang"] - }, - "application/yang-data+json": { - "source": "iana", - "compressible": true - }, - "application/yang-data+xml": { - "source": "iana", - "compressible": true - }, - "application/yang-patch+json": { - "source": "iana", - "compressible": true - }, - "application/yang-patch+xml": { - "source": "iana", - "compressible": true - }, - "application/yin+xml": { - "source": "iana", - "compressible": true, - "extensions": ["yin"] - }, - "application/zip": { - "source": "iana", - "compressible": false, - "extensions": ["zip"] - }, - "application/zlib": { - "source": "iana" - }, - "application/zstd": { - "source": "iana" - }, - "audio/1d-interleaved-parityfec": { - "source": "iana" - }, - "audio/32kadpcm": { - "source": "iana" - }, - "audio/3gpp": { - "source": "iana", - "compressible": false, - "extensions": ["3gpp"] - }, - "audio/3gpp2": { - "source": "iana" - }, - "audio/aac": { - "source": "iana" - }, - "audio/ac3": { - "source": "iana" - }, - "audio/adpcm": { - "source": "apache", - "extensions": ["adp"] - }, - "audio/amr": { - "source": "iana", - "extensions": ["amr"] - }, - "audio/amr-wb": { - "source": "iana" - }, - "audio/amr-wb+": { - "source": "iana" - }, - "audio/aptx": { - "source": "iana" - }, - "audio/asc": { - "source": "iana" - }, - "audio/atrac-advanced-lossless": { - "source": "iana" - }, - "audio/atrac-x": { - "source": "iana" - }, - "audio/atrac3": { - "source": "iana" - }, - "audio/basic": { - "source": "iana", - "compressible": false, - "extensions": ["au","snd"] - }, - "audio/bv16": { - "source": "iana" - }, - "audio/bv32": { - "source": "iana" - }, - "audio/clearmode": { - "source": "iana" - }, - "audio/cn": { - "source": "iana" - }, - "audio/dat12": { - "source": "iana" - }, - "audio/dls": { - "source": "iana" - }, - "audio/dsr-es201108": { - "source": "iana" - }, - "audio/dsr-es202050": { - "source": "iana" - }, - "audio/dsr-es202211": { - "source": "iana" - }, - "audio/dsr-es202212": { - "source": "iana" - }, - "audio/dv": { - "source": "iana" - }, - "audio/dvi4": { - "source": "iana" - }, - "audio/eac3": { - "source": "iana" - }, - "audio/encaprtp": { - "source": "iana" - }, - "audio/evrc": { - "source": "iana" - }, - "audio/evrc-qcp": { - "source": "iana" - }, - "audio/evrc0": { - "source": "iana" - }, - "audio/evrc1": { - "source": "iana" - }, - "audio/evrcb": { - "source": "iana" - }, - "audio/evrcb0": { - "source": "iana" - }, - "audio/evrcb1": { - "source": "iana" - }, - "audio/evrcnw": { - "source": "iana" - }, - "audio/evrcnw0": { - "source": "iana" - }, - "audio/evrcnw1": { - "source": "iana" - }, - "audio/evrcwb": { - "source": "iana" - }, - "audio/evrcwb0": { - "source": "iana" - }, - "audio/evrcwb1": { - "source": "iana" - }, - "audio/evs": { - "source": "iana" - }, - "audio/flexfec": { - "source": "iana" - }, - "audio/fwdred": { - "source": "iana" - }, - "audio/g711-0": { - "source": "iana" - }, - "audio/g719": { - "source": "iana" - }, - "audio/g722": { - "source": "iana" - }, - "audio/g7221": { - "source": "iana" - }, - "audio/g723": { - "source": "iana" - }, - "audio/g726-16": { - "source": "iana" - }, - "audio/g726-24": { - "source": "iana" - }, - "audio/g726-32": { - "source": "iana" - }, - "audio/g726-40": { - "source": "iana" - }, - "audio/g728": { - "source": "iana" - }, - "audio/g729": { - "source": "iana" - }, - "audio/g7291": { - "source": "iana" - }, - "audio/g729d": { - "source": "iana" - }, - "audio/g729e": { - "source": "iana" - }, - "audio/gsm": { - "source": "iana" - }, - "audio/gsm-efr": { - "source": "iana" - }, - "audio/gsm-hr-08": { - "source": "iana" - }, - "audio/ilbc": { - "source": "iana" - }, - "audio/ip-mr_v2.5": { - "source": "iana" - }, - "audio/isac": { - "source": "apache" - }, - "audio/l16": { - "source": "iana" - }, - "audio/l20": { - "source": "iana" - }, - "audio/l24": { - "source": "iana", - "compressible": false - }, - "audio/l8": { - "source": "iana" - }, - "audio/lpc": { - "source": "iana" - }, - "audio/melp": { - "source": "iana" - }, - "audio/melp1200": { - "source": "iana" - }, - "audio/melp2400": { - "source": "iana" - }, - "audio/melp600": { - "source": "iana" - }, - "audio/mhas": { - "source": "iana" - }, - "audio/midi": { - "source": "apache", - "extensions": ["mid","midi","kar","rmi"] - }, - "audio/mobile-xmf": { - "source": "iana", - "extensions": ["mxmf"] - }, - "audio/mp3": { - "compressible": false, - "extensions": ["mp3"] - }, - "audio/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["m4a","mp4a"] - }, - "audio/mp4a-latm": { - "source": "iana" - }, - "audio/mpa": { - "source": "iana" - }, - "audio/mpa-robust": { - "source": "iana" - }, - "audio/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] - }, - "audio/mpeg4-generic": { - "source": "iana" - }, - "audio/musepack": { - "source": "apache" - }, - "audio/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["oga","ogg","spx","opus"] - }, - "audio/opus": { - "source": "iana" - }, - "audio/parityfec": { - "source": "iana" - }, - "audio/pcma": { - "source": "iana" - }, - "audio/pcma-wb": { - "source": "iana" - }, - "audio/pcmu": { - "source": "iana" - }, - "audio/pcmu-wb": { - "source": "iana" - }, - "audio/prs.sid": { - "source": "iana" - }, - "audio/qcelp": { - "source": "iana" - }, - "audio/raptorfec": { - "source": "iana" - }, - "audio/red": { - "source": "iana" - }, - "audio/rtp-enc-aescm128": { - "source": "iana" - }, - "audio/rtp-midi": { - "source": "iana" - }, - "audio/rtploopback": { - "source": "iana" - }, - "audio/rtx": { - "source": "iana" - }, - "audio/s3m": { - "source": "apache", - "extensions": ["s3m"] - }, - "audio/scip": { - "source": "iana" - }, - "audio/silk": { - "source": "apache", - "extensions": ["sil"] - }, - "audio/smv": { - "source": "iana" - }, - "audio/smv-qcp": { - "source": "iana" - }, - "audio/smv0": { - "source": "iana" - }, - "audio/sofa": { - "source": "iana" - }, - "audio/sp-midi": { - "source": "iana" - }, - "audio/speex": { - "source": "iana" - }, - "audio/t140c": { - "source": "iana" - }, - "audio/t38": { - "source": "iana" - }, - "audio/telephone-event": { - "source": "iana" - }, - "audio/tetra_acelp": { - "source": "iana" - }, - "audio/tetra_acelp_bb": { - "source": "iana" - }, - "audio/tone": { - "source": "iana" - }, - "audio/tsvcis": { - "source": "iana" - }, - "audio/uemclip": { - "source": "iana" - }, - "audio/ulpfec": { - "source": "iana" - }, - "audio/usac": { - "source": "iana" - }, - "audio/vdvi": { - "source": "iana" - }, - "audio/vmr-wb": { - "source": "iana" - }, - "audio/vnd.3gpp.iufp": { - "source": "iana" - }, - "audio/vnd.4sb": { - "source": "iana" - }, - "audio/vnd.audiokoz": { - "source": "iana" - }, - "audio/vnd.celp": { - "source": "iana" - }, - "audio/vnd.cisco.nse": { - "source": "iana" - }, - "audio/vnd.cmles.radio-events": { - "source": "iana" - }, - "audio/vnd.cns.anp1": { - "source": "iana" - }, - "audio/vnd.cns.inf1": { - "source": "iana" - }, - "audio/vnd.dece.audio": { - "source": "iana", - "extensions": ["uva","uvva"] - }, - "audio/vnd.digital-winds": { - "source": "iana", - "extensions": ["eol"] - }, - "audio/vnd.dlna.adts": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.1": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.2": { - "source": "iana" - }, - "audio/vnd.dolby.mlp": { - "source": "iana" - }, - "audio/vnd.dolby.mps": { - "source": "iana" - }, - "audio/vnd.dolby.pl2": { - "source": "iana" - }, - "audio/vnd.dolby.pl2x": { - "source": "iana" - }, - "audio/vnd.dolby.pl2z": { - "source": "iana" - }, - "audio/vnd.dolby.pulse.1": { - "source": "iana" - }, - "audio/vnd.dra": { - "source": "iana", - "extensions": ["dra"] - }, - "audio/vnd.dts": { - "source": "iana", - "extensions": ["dts"] - }, - "audio/vnd.dts.hd": { - "source": "iana", - "extensions": ["dtshd"] - }, - "audio/vnd.dts.uhd": { - "source": "iana" - }, - "audio/vnd.dvb.file": { - "source": "iana" - }, - "audio/vnd.everad.plj": { - "source": "iana" - }, - "audio/vnd.hns.audio": { - "source": "iana" - }, - "audio/vnd.lucent.voice": { - "source": "iana", - "extensions": ["lvp"] - }, - "audio/vnd.ms-playready.media.pya": { - "source": "iana", - "extensions": ["pya"] - }, - "audio/vnd.nokia.mobile-xmf": { - "source": "iana" - }, - "audio/vnd.nortel.vbk": { - "source": "iana" - }, - "audio/vnd.nuera.ecelp4800": { - "source": "iana", - "extensions": ["ecelp4800"] - }, - "audio/vnd.nuera.ecelp7470": { - "source": "iana", - "extensions": ["ecelp7470"] - }, - "audio/vnd.nuera.ecelp9600": { - "source": "iana", - "extensions": ["ecelp9600"] - }, - "audio/vnd.octel.sbc": { - "source": "iana" - }, - "audio/vnd.presonus.multitrack": { - "source": "iana" - }, - "audio/vnd.qcelp": { - "source": "iana" - }, - "audio/vnd.rhetorex.32kadpcm": { - "source": "iana" - }, - "audio/vnd.rip": { - "source": "iana", - "extensions": ["rip"] - }, - "audio/vnd.rn-realaudio": { - "compressible": false - }, - "audio/vnd.sealedmedia.softseal.mpeg": { - "source": "iana" - }, - "audio/vnd.vmx.cvsd": { - "source": "iana" - }, - "audio/vnd.wave": { - "compressible": false - }, - "audio/vorbis": { - "source": "iana", - "compressible": false - }, - "audio/vorbis-config": { - "source": "iana" - }, - "audio/wav": { - "compressible": false, - "extensions": ["wav"] - }, - "audio/wave": { - "compressible": false, - "extensions": ["wav"] - }, - "audio/webm": { - "source": "apache", - "compressible": false, - "extensions": ["weba"] - }, - "audio/x-aac": { - "source": "apache", - "compressible": false, - "extensions": ["aac"] - }, - "audio/x-aiff": { - "source": "apache", - "extensions": ["aif","aiff","aifc"] - }, - "audio/x-caf": { - "source": "apache", - "compressible": false, - "extensions": ["caf"] - }, - "audio/x-flac": { - "source": "apache", - "extensions": ["flac"] - }, - "audio/x-m4a": { - "source": "nginx", - "extensions": ["m4a"] - }, - "audio/x-matroska": { - "source": "apache", - "extensions": ["mka"] - }, - "audio/x-mpegurl": { - "source": "apache", - "extensions": ["m3u"] - }, - "audio/x-ms-wax": { - "source": "apache", - "extensions": ["wax"] - }, - "audio/x-ms-wma": { - "source": "apache", - "extensions": ["wma"] - }, - "audio/x-pn-realaudio": { - "source": "apache", - "extensions": ["ram","ra"] - }, - "audio/x-pn-realaudio-plugin": { - "source": "apache", - "extensions": ["rmp"] - }, - "audio/x-realaudio": { - "source": "nginx", - "extensions": ["ra"] - }, - "audio/x-tta": { - "source": "apache" - }, - "audio/x-wav": { - "source": "apache", - "extensions": ["wav"] - }, - "audio/xm": { - "source": "apache", - "extensions": ["xm"] - }, - "chemical/x-cdx": { - "source": "apache", - "extensions": ["cdx"] - }, - "chemical/x-cif": { - "source": "apache", - "extensions": ["cif"] - }, - "chemical/x-cmdf": { - "source": "apache", - "extensions": ["cmdf"] - }, - "chemical/x-cml": { - "source": "apache", - "extensions": ["cml"] - }, - "chemical/x-csml": { - "source": "apache", - "extensions": ["csml"] - }, - "chemical/x-pdb": { - "source": "apache" - }, - "chemical/x-xyz": { - "source": "apache", - "extensions": ["xyz"] - }, - "font/collection": { - "source": "iana", - "extensions": ["ttc"] - }, - "font/otf": { - "source": "iana", - "compressible": true, - "extensions": ["otf"] - }, - "font/sfnt": { - "source": "iana" - }, - "font/ttf": { - "source": "iana", - "compressible": true, - "extensions": ["ttf"] - }, - "font/woff": { - "source": "iana", - "extensions": ["woff"] - }, - "font/woff2": { - "source": "iana", - "extensions": ["woff2"] - }, - "image/aces": { - "source": "iana", - "extensions": ["exr"] - }, - "image/apng": { - "compressible": false, - "extensions": ["apng"] - }, - "image/avci": { - "source": "iana", - "extensions": ["avci"] - }, - "image/avcs": { - "source": "iana", - "extensions": ["avcs"] - }, - "image/avif": { - "source": "iana", - "compressible": false, - "extensions": ["avif"] - }, - "image/bmp": { - "source": "iana", - "compressible": true, - "extensions": ["bmp"] - }, - "image/cgm": { - "source": "iana", - "extensions": ["cgm"] - }, - "image/dicom-rle": { - "source": "iana", - "extensions": ["drle"] - }, - "image/emf": { - "source": "iana", - "extensions": ["emf"] - }, - "image/fits": { - "source": "iana", - "extensions": ["fits"] - }, - "image/g3fax": { - "source": "iana", - "extensions": ["g3"] - }, - "image/gif": { - "source": "iana", - "compressible": false, - "extensions": ["gif"] - }, - "image/heic": { - "source": "iana", - "extensions": ["heic"] - }, - "image/heic-sequence": { - "source": "iana", - "extensions": ["heics"] - }, - "image/heif": { - "source": "iana", - "extensions": ["heif"] - }, - "image/heif-sequence": { - "source": "iana", - "extensions": ["heifs"] - }, - "image/hej2k": { - "source": "iana", - "extensions": ["hej2"] - }, - "image/hsj2": { - "source": "iana", - "extensions": ["hsj2"] - }, - "image/ief": { - "source": "iana", - "extensions": ["ief"] - }, - "image/jls": { - "source": "iana", - "extensions": ["jls"] - }, - "image/jp2": { - "source": "iana", - "compressible": false, - "extensions": ["jp2","jpg2"] - }, - "image/jpeg": { - "source": "iana", - "compressible": false, - "extensions": ["jpeg","jpg","jpe"] - }, - "image/jph": { - "source": "iana", - "extensions": ["jph"] - }, - "image/jphc": { - "source": "iana", - "extensions": ["jhc"] - }, - "image/jpm": { - "source": "iana", - "compressible": false, - "extensions": ["jpm"] - }, - "image/jpx": { - "source": "iana", - "compressible": false, - "extensions": ["jpx","jpf"] - }, - "image/jxr": { - "source": "iana", - "extensions": ["jxr"] - }, - "image/jxra": { - "source": "iana", - "extensions": ["jxra"] - }, - "image/jxrs": { - "source": "iana", - "extensions": ["jxrs"] - }, - "image/jxs": { - "source": "iana", - "extensions": ["jxs"] - }, - "image/jxsc": { - "source": "iana", - "extensions": ["jxsc"] - }, - "image/jxsi": { - "source": "iana", - "extensions": ["jxsi"] - }, - "image/jxss": { - "source": "iana", - "extensions": ["jxss"] - }, - "image/ktx": { - "source": "iana", - "extensions": ["ktx"] - }, - "image/ktx2": { - "source": "iana", - "extensions": ["ktx2"] - }, - "image/naplps": { - "source": "iana" - }, - "image/pjpeg": { - "compressible": false - }, - "image/png": { - "source": "iana", - "compressible": false, - "extensions": ["png"] - }, - "image/prs.btif": { - "source": "iana", - "extensions": ["btif"] - }, - "image/prs.pti": { - "source": "iana", - "extensions": ["pti"] - }, - "image/pwg-raster": { - "source": "iana" - }, - "image/sgi": { - "source": "apache", - "extensions": ["sgi"] - }, - "image/svg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["svg","svgz"] - }, - "image/t38": { - "source": "iana", - "extensions": ["t38"] - }, - "image/tiff": { - "source": "iana", - "compressible": false, - "extensions": ["tif","tiff"] - }, - "image/tiff-fx": { - "source": "iana", - "extensions": ["tfx"] - }, - "image/vnd.adobe.photoshop": { - "source": "iana", - "compressible": true, - "extensions": ["psd"] - }, - "image/vnd.airzip.accelerator.azv": { - "source": "iana", - "extensions": ["azv"] - }, - "image/vnd.cns.inf2": { - "source": "iana" - }, - "image/vnd.dece.graphic": { - "source": "iana", - "extensions": ["uvi","uvvi","uvg","uvvg"] - }, - "image/vnd.djvu": { - "source": "iana", - "extensions": ["djvu","djv"] - }, - "image/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "image/vnd.dwg": { - "source": "iana", - "extensions": ["dwg"] - }, - "image/vnd.dxf": { - "source": "iana", - "extensions": ["dxf"] - }, - "image/vnd.fastbidsheet": { - "source": "iana", - "extensions": ["fbs"] - }, - "image/vnd.fpx": { - "source": "iana", - "extensions": ["fpx"] - }, - "image/vnd.fst": { - "source": "iana", - "extensions": ["fst"] - }, - "image/vnd.fujixerox.edmics-mmr": { - "source": "iana", - "extensions": ["mmr"] - }, - "image/vnd.fujixerox.edmics-rlc": { - "source": "iana", - "extensions": ["rlc"] - }, - "image/vnd.globalgraphics.pgb": { - "source": "iana" - }, - "image/vnd.microsoft.icon": { - "source": "iana", - "compressible": true, - "extensions": ["ico"] - }, - "image/vnd.mix": { - "source": "iana" - }, - "image/vnd.mozilla.apng": { - "source": "iana" - }, - "image/vnd.ms-dds": { - "compressible": true, - "extensions": ["dds"] - }, - "image/vnd.ms-modi": { - "source": "iana", - "extensions": ["mdi"] - }, - "image/vnd.ms-photo": { - "source": "apache", - "extensions": ["wdp"] - }, - "image/vnd.net-fpx": { - "source": "iana", - "extensions": ["npx"] - }, - "image/vnd.pco.b16": { - "source": "iana", - "extensions": ["b16"] - }, - "image/vnd.radiance": { - "source": "iana" - }, - "image/vnd.sealed.png": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.gif": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.jpg": { - "source": "iana" - }, - "image/vnd.svf": { - "source": "iana" - }, - "image/vnd.tencent.tap": { - "source": "iana", - "extensions": ["tap"] - }, - "image/vnd.valve.source.texture": { - "source": "iana", - "extensions": ["vtf"] - }, - "image/vnd.wap.wbmp": { - "source": "iana", - "extensions": ["wbmp"] - }, - "image/vnd.xiff": { - "source": "iana", - "extensions": ["xif"] - }, - "image/vnd.zbrush.pcx": { - "source": "iana", - "extensions": ["pcx"] - }, - "image/webp": { - "source": "apache", - "extensions": ["webp"] - }, - "image/wmf": { - "source": "iana", - "extensions": ["wmf"] - }, - "image/x-3ds": { - "source": "apache", - "extensions": ["3ds"] - }, - "image/x-cmu-raster": { - "source": "apache", - "extensions": ["ras"] - }, - "image/x-cmx": { - "source": "apache", - "extensions": ["cmx"] - }, - "image/x-freehand": { - "source": "apache", - "extensions": ["fh","fhc","fh4","fh5","fh7"] - }, - "image/x-icon": { - "source": "apache", - "compressible": true, - "extensions": ["ico"] - }, - "image/x-jng": { - "source": "nginx", - "extensions": ["jng"] - }, - "image/x-mrsid-image": { - "source": "apache", - "extensions": ["sid"] - }, - "image/x-ms-bmp": { - "source": "nginx", - "compressible": true, - "extensions": ["bmp"] - }, - "image/x-pcx": { - "source": "apache", - "extensions": ["pcx"] - }, - "image/x-pict": { - "source": "apache", - "extensions": ["pic","pct"] - }, - "image/x-portable-anymap": { - "source": "apache", - "extensions": ["pnm"] - }, - "image/x-portable-bitmap": { - "source": "apache", - "extensions": ["pbm"] - }, - "image/x-portable-graymap": { - "source": "apache", - "extensions": ["pgm"] - }, - "image/x-portable-pixmap": { - "source": "apache", - "extensions": ["ppm"] - }, - "image/x-rgb": { - "source": "apache", - "extensions": ["rgb"] - }, - "image/x-tga": { - "source": "apache", - "extensions": ["tga"] - }, - "image/x-xbitmap": { - "source": "apache", - "extensions": ["xbm"] - }, - "image/x-xcf": { - "compressible": false - }, - "image/x-xpixmap": { - "source": "apache", - "extensions": ["xpm"] - }, - "image/x-xwindowdump": { - "source": "apache", - "extensions": ["xwd"] - }, - "message/cpim": { - "source": "iana" - }, - "message/delivery-status": { - "source": "iana" - }, - "message/disposition-notification": { - "source": "iana", - "extensions": [ - "disposition-notification" - ] - }, - "message/external-body": { - "source": "iana" - }, - "message/feedback-report": { - "source": "iana" - }, - "message/global": { - "source": "iana", - "extensions": ["u8msg"] - }, - "message/global-delivery-status": { - "source": "iana", - "extensions": ["u8dsn"] - }, - "message/global-disposition-notification": { - "source": "iana", - "extensions": ["u8mdn"] - }, - "message/global-headers": { - "source": "iana", - "extensions": ["u8hdr"] - }, - "message/http": { - "source": "iana", - "compressible": false - }, - "message/imdn+xml": { - "source": "iana", - "compressible": true - }, - "message/news": { - "source": "iana" - }, - "message/partial": { - "source": "iana", - "compressible": false - }, - "message/rfc822": { - "source": "iana", - "compressible": true, - "extensions": ["eml","mime"] - }, - "message/s-http": { - "source": "iana" - }, - "message/sip": { - "source": "iana" - }, - "message/sipfrag": { - "source": "iana" - }, - "message/tracking-status": { - "source": "iana" - }, - "message/vnd.si.simp": { - "source": "iana" - }, - "message/vnd.wfa.wsc": { - "source": "iana", - "extensions": ["wsc"] - }, - "model/3mf": { - "source": "iana", - "extensions": ["3mf"] - }, - "model/e57": { - "source": "iana" - }, - "model/gltf+json": { - "source": "iana", - "compressible": true, - "extensions": ["gltf"] - }, - "model/gltf-binary": { - "source": "iana", - "compressible": true, - "extensions": ["glb"] - }, - "model/iges": { - "source": "iana", - "compressible": false, - "extensions": ["igs","iges"] - }, - "model/mesh": { - "source": "iana", - "compressible": false, - "extensions": ["msh","mesh","silo"] - }, - "model/mtl": { - "source": "iana", - "extensions": ["mtl"] - }, - "model/obj": { - "source": "iana", - "extensions": ["obj"] - }, - "model/step": { - "source": "iana" - }, - "model/step+xml": { - "source": "iana", - "compressible": true, - "extensions": ["stpx"] - }, - "model/step+zip": { - "source": "iana", - "compressible": false, - "extensions": ["stpz"] - }, - "model/step-xml+zip": { - "source": "iana", - "compressible": false, - "extensions": ["stpxz"] - }, - "model/stl": { - "source": "iana", - "extensions": ["stl"] - }, - "model/vnd.collada+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dae"] - }, - "model/vnd.dwf": { - "source": "iana", - "extensions": ["dwf"] - }, - "model/vnd.flatland.3dml": { - "source": "iana" - }, - "model/vnd.gdl": { - "source": "iana", - "extensions": ["gdl"] - }, - "model/vnd.gs-gdl": { - "source": "apache" - }, - "model/vnd.gs.gdl": { - "source": "iana" - }, - "model/vnd.gtw": { - "source": "iana", - "extensions": ["gtw"] - }, - "model/vnd.moml+xml": { - "source": "iana", - "compressible": true - }, - "model/vnd.mts": { - "source": "iana", - "extensions": ["mts"] - }, - "model/vnd.opengex": { - "source": "iana", - "extensions": ["ogex"] - }, - "model/vnd.parasolid.transmit.binary": { - "source": "iana", - "extensions": ["x_b"] - }, - "model/vnd.parasolid.transmit.text": { - "source": "iana", - "extensions": ["x_t"] - }, - "model/vnd.pytha.pyox": { - "source": "iana" - }, - "model/vnd.rosette.annotated-data-model": { - "source": "iana" - }, - "model/vnd.sap.vds": { - "source": "iana", - "extensions": ["vds"] - }, - "model/vnd.usdz+zip": { - "source": "iana", - "compressible": false, - "extensions": ["usdz"] - }, - "model/vnd.valve.source.compiled-map": { - "source": "iana", - "extensions": ["bsp"] - }, - "model/vnd.vtu": { - "source": "iana", - "extensions": ["vtu"] - }, - "model/vrml": { - "source": "iana", - "compressible": false, - "extensions": ["wrl","vrml"] - }, - "model/x3d+binary": { - "source": "apache", - "compressible": false, - "extensions": ["x3db","x3dbz"] - }, - "model/x3d+fastinfoset": { - "source": "iana", - "extensions": ["x3db"] - }, - "model/x3d+vrml": { - "source": "apache", - "compressible": false, - "extensions": ["x3dv","x3dvz"] - }, - "model/x3d+xml": { - "source": "iana", - "compressible": true, - "extensions": ["x3d","x3dz"] - }, - "model/x3d-vrml": { - "source": "iana", - "extensions": ["x3dv"] - }, - "multipart/alternative": { - "source": "iana", - "compressible": false - }, - "multipart/appledouble": { - "source": "iana" - }, - "multipart/byteranges": { - "source": "iana" - }, - "multipart/digest": { - "source": "iana" - }, - "multipart/encrypted": { - "source": "iana", - "compressible": false - }, - "multipart/form-data": { - "source": "iana", - "compressible": false - }, - "multipart/header-set": { - "source": "iana" - }, - "multipart/mixed": { - "source": "iana" - }, - "multipart/multilingual": { - "source": "iana" - }, - "multipart/parallel": { - "source": "iana" - }, - "multipart/related": { - "source": "iana", - "compressible": false - }, - "multipart/report": { - "source": "iana" - }, - "multipart/signed": { - "source": "iana", - "compressible": false - }, - "multipart/vnd.bint.med-plus": { - "source": "iana" - }, - "multipart/voice-message": { - "source": "iana" - }, - "multipart/x-mixed-replace": { - "source": "iana" - }, - "text/1d-interleaved-parityfec": { - "source": "iana" - }, - "text/cache-manifest": { - "source": "iana", - "compressible": true, - "extensions": ["appcache","manifest"] - }, - "text/calendar": { - "source": "iana", - "extensions": ["ics","ifb"] - }, - "text/calender": { - "compressible": true - }, - "text/cmd": { - "compressible": true - }, - "text/coffeescript": { - "extensions": ["coffee","litcoffee"] - }, - "text/cql": { - "source": "iana" - }, - "text/cql-expression": { - "source": "iana" - }, - "text/cql-identifier": { - "source": "iana" - }, - "text/css": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["css"] - }, - "text/csv": { - "source": "iana", - "compressible": true, - "extensions": ["csv"] - }, - "text/csv-schema": { - "source": "iana" - }, - "text/directory": { - "source": "iana" - }, - "text/dns": { - "source": "iana" - }, - "text/ecmascript": { - "source": "iana" - }, - "text/encaprtp": { - "source": "iana" - }, - "text/enriched": { - "source": "iana" - }, - "text/fhirpath": { - "source": "iana" - }, - "text/flexfec": { - "source": "iana" - }, - "text/fwdred": { - "source": "iana" - }, - "text/gff3": { - "source": "iana" - }, - "text/grammar-ref-list": { - "source": "iana" - }, - "text/html": { - "source": "iana", - "compressible": true, - "extensions": ["html","htm","shtml"] - }, - "text/jade": { - "extensions": ["jade"] - }, - "text/javascript": { - "source": "iana", - "compressible": true - }, - "text/jcr-cnd": { - "source": "iana" - }, - "text/jsx": { - "compressible": true, - "extensions": ["jsx"] - }, - "text/less": { - "compressible": true, - "extensions": ["less"] - }, - "text/markdown": { - "source": "iana", - "compressible": true, - "extensions": ["markdown","md"] - }, - "text/mathml": { - "source": "nginx", - "extensions": ["mml"] - }, - "text/mdx": { - "compressible": true, - "extensions": ["mdx"] - }, - "text/mizar": { - "source": "iana" - }, - "text/n3": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["n3"] - }, - "text/parameters": { - "source": "iana", - "charset": "UTF-8" - }, - "text/parityfec": { - "source": "iana" - }, - "text/plain": { - "source": "iana", - "compressible": true, - "extensions": ["txt","text","conf","def","list","log","in","ini"] - }, - "text/provenance-notation": { - "source": "iana", - "charset": "UTF-8" - }, - "text/prs.fallenstein.rst": { - "source": "iana" - }, - "text/prs.lines.tag": { - "source": "iana", - "extensions": ["dsc"] - }, - "text/prs.prop.logic": { - "source": "iana" - }, - "text/raptorfec": { - "source": "iana" - }, - "text/red": { - "source": "iana" - }, - "text/rfc822-headers": { - "source": "iana" - }, - "text/richtext": { - "source": "iana", - "compressible": true, - "extensions": ["rtx"] - }, - "text/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "text/rtp-enc-aescm128": { - "source": "iana" - }, - "text/rtploopback": { - "source": "iana" - }, - "text/rtx": { - "source": "iana" - }, - "text/sgml": { - "source": "iana", - "extensions": ["sgml","sgm"] - }, - "text/shaclc": { - "source": "iana" - }, - "text/shex": { - "source": "iana", - "extensions": ["shex"] - }, - "text/slim": { - "extensions": ["slim","slm"] - }, - "text/spdx": { - "source": "iana", - "extensions": ["spdx"] - }, - "text/strings": { - "source": "iana" - }, - "text/stylus": { - "extensions": ["stylus","styl"] - }, - "text/t140": { - "source": "iana" - }, - "text/tab-separated-values": { - "source": "iana", - "compressible": true, - "extensions": ["tsv"] - }, - "text/troff": { - "source": "iana", - "extensions": ["t","tr","roff","man","me","ms"] - }, - "text/turtle": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["ttl"] - }, - "text/ulpfec": { - "source": "iana" - }, - "text/uri-list": { - "source": "iana", - "compressible": true, - "extensions": ["uri","uris","urls"] - }, - "text/vcard": { - "source": "iana", - "compressible": true, - "extensions": ["vcard"] - }, - "text/vnd.a": { - "source": "iana" - }, - "text/vnd.abc": { - "source": "iana" - }, - "text/vnd.ascii-art": { - "source": "iana" - }, - "text/vnd.curl": { - "source": "iana", - "extensions": ["curl"] - }, - "text/vnd.curl.dcurl": { - "source": "apache", - "extensions": ["dcurl"] - }, - "text/vnd.curl.mcurl": { - "source": "apache", - "extensions": ["mcurl"] - }, - "text/vnd.curl.scurl": { - "source": "apache", - "extensions": ["scurl"] - }, - "text/vnd.debian.copyright": { - "source": "iana", - "charset": "UTF-8" - }, - "text/vnd.dmclientscript": { - "source": "iana" - }, - "text/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "text/vnd.esmertec.theme-descriptor": { - "source": "iana", - "charset": "UTF-8" - }, - "text/vnd.familysearch.gedcom": { - "source": "iana", - "extensions": ["ged"] - }, - "text/vnd.ficlab.flt": { - "source": "iana" - }, - "text/vnd.fly": { - "source": "iana", - "extensions": ["fly"] - }, - "text/vnd.fmi.flexstor": { - "source": "iana", - "extensions": ["flx"] - }, - "text/vnd.gml": { - "source": "iana" - }, - "text/vnd.graphviz": { - "source": "iana", - "extensions": ["gv"] - }, - "text/vnd.hans": { - "source": "iana" - }, - "text/vnd.hgl": { - "source": "iana" - }, - "text/vnd.in3d.3dml": { - "source": "iana", - "extensions": ["3dml"] - }, - "text/vnd.in3d.spot": { - "source": "iana", - "extensions": ["spot"] - }, - "text/vnd.iptc.newsml": { - "source": "iana" - }, - "text/vnd.iptc.nitf": { - "source": "iana" - }, - "text/vnd.latex-z": { - "source": "iana" - }, - "text/vnd.motorola.reflex": { - "source": "iana" - }, - "text/vnd.ms-mediapackage": { - "source": "iana" - }, - "text/vnd.net2phone.commcenter.command": { - "source": "iana" - }, - "text/vnd.radisys.msml-basic-layout": { - "source": "iana" - }, - "text/vnd.senx.warpscript": { - "source": "iana" - }, - "text/vnd.si.uricatalogue": { - "source": "iana" - }, - "text/vnd.sosi": { - "source": "iana" - }, - "text/vnd.sun.j2me.app-descriptor": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["jad"] - }, - "text/vnd.trolltech.linguist": { - "source": "iana", - "charset": "UTF-8" - }, - "text/vnd.wap.si": { - "source": "iana" - }, - "text/vnd.wap.sl": { - "source": "iana" - }, - "text/vnd.wap.wml": { - "source": "iana", - "extensions": ["wml"] - }, - "text/vnd.wap.wmlscript": { - "source": "iana", - "extensions": ["wmls"] - }, - "text/vtt": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["vtt"] - }, - "text/x-asm": { - "source": "apache", - "extensions": ["s","asm"] - }, - "text/x-c": { - "source": "apache", - "extensions": ["c","cc","cxx","cpp","h","hh","dic"] - }, - "text/x-component": { - "source": "nginx", - "extensions": ["htc"] - }, - "text/x-fortran": { - "source": "apache", - "extensions": ["f","for","f77","f90"] - }, - "text/x-gwt-rpc": { - "compressible": true - }, - "text/x-handlebars-template": { - "extensions": ["hbs"] - }, - "text/x-java-source": { - "source": "apache", - "extensions": ["java"] - }, - "text/x-jquery-tmpl": { - "compressible": true - }, - "text/x-lua": { - "extensions": ["lua"] - }, - "text/x-markdown": { - "compressible": true, - "extensions": ["mkd"] - }, - "text/x-nfo": { - "source": "apache", - "extensions": ["nfo"] - }, - "text/x-opml": { - "source": "apache", - "extensions": ["opml"] - }, - "text/x-org": { - "compressible": true, - "extensions": ["org"] - }, - "text/x-pascal": { - "source": "apache", - "extensions": ["p","pas"] - }, - "text/x-processing": { - "compressible": true, - "extensions": ["pde"] - }, - "text/x-sass": { - "extensions": ["sass"] - }, - "text/x-scss": { - "extensions": ["scss"] - }, - "text/x-setext": { - "source": "apache", - "extensions": ["etx"] - }, - "text/x-sfv": { - "source": "apache", - "extensions": ["sfv"] - }, - "text/x-suse-ymp": { - "compressible": true, - "extensions": ["ymp"] - }, - "text/x-uuencode": { - "source": "apache", - "extensions": ["uu"] - }, - "text/x-vcalendar": { - "source": "apache", - "extensions": ["vcs"] - }, - "text/x-vcard": { - "source": "apache", - "extensions": ["vcf"] - }, - "text/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml"] - }, - "text/xml-external-parsed-entity": { - "source": "iana" - }, - "text/yaml": { - "compressible": true, - "extensions": ["yaml","yml"] - }, - "video/1d-interleaved-parityfec": { - "source": "iana" - }, - "video/3gpp": { - "source": "iana", - "extensions": ["3gp","3gpp"] - }, - "video/3gpp-tt": { - "source": "iana" - }, - "video/3gpp2": { - "source": "iana", - "extensions": ["3g2"] - }, - "video/av1": { - "source": "iana" - }, - "video/bmpeg": { - "source": "iana" - }, - "video/bt656": { - "source": "iana" - }, - "video/celb": { - "source": "iana" - }, - "video/dv": { - "source": "iana" - }, - "video/encaprtp": { - "source": "iana" - }, - "video/ffv1": { - "source": "iana" - }, - "video/flexfec": { - "source": "iana" - }, - "video/h261": { - "source": "iana", - "extensions": ["h261"] - }, - "video/h263": { - "source": "iana", - "extensions": ["h263"] - }, - "video/h263-1998": { - "source": "iana" - }, - "video/h263-2000": { - "source": "iana" - }, - "video/h264": { - "source": "iana", - "extensions": ["h264"] - }, - "video/h264-rcdo": { - "source": "iana" - }, - "video/h264-svc": { - "source": "iana" - }, - "video/h265": { - "source": "iana" - }, - "video/iso.segment": { - "source": "iana", - "extensions": ["m4s"] - }, - "video/jpeg": { - "source": "iana", - "extensions": ["jpgv"] - }, - "video/jpeg2000": { - "source": "iana" - }, - "video/jpm": { - "source": "apache", - "extensions": ["jpm","jpgm"] - }, - "video/jxsv": { - "source": "iana" - }, - "video/mj2": { - "source": "iana", - "extensions": ["mj2","mjp2"] - }, - "video/mp1s": { - "source": "iana" - }, - "video/mp2p": { - "source": "iana" - }, - "video/mp2t": { - "source": "iana", - "extensions": ["ts"] - }, - "video/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["mp4","mp4v","mpg4"] - }, - "video/mp4v-es": { - "source": "iana" - }, - "video/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpeg","mpg","mpe","m1v","m2v"] - }, - "video/mpeg4-generic": { - "source": "iana" - }, - "video/mpv": { - "source": "iana" - }, - "video/nv": { - "source": "iana" - }, - "video/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogv"] - }, - "video/parityfec": { - "source": "iana" - }, - "video/pointer": { - "source": "iana" - }, - "video/quicktime": { - "source": "iana", - "compressible": false, - "extensions": ["qt","mov"] - }, - "video/raptorfec": { - "source": "iana" - }, - "video/raw": { - "source": "iana" - }, - "video/rtp-enc-aescm128": { - "source": "iana" - }, - "video/rtploopback": { - "source": "iana" - }, - "video/rtx": { - "source": "iana" - }, - "video/scip": { - "source": "iana" - }, - "video/smpte291": { - "source": "iana" - }, - "video/smpte292m": { - "source": "iana" - }, - "video/ulpfec": { - "source": "iana" - }, - "video/vc1": { - "source": "iana" - }, - "video/vc2": { - "source": "iana" - }, - "video/vnd.cctv": { - "source": "iana" - }, - "video/vnd.dece.hd": { - "source": "iana", - "extensions": ["uvh","uvvh"] - }, - "video/vnd.dece.mobile": { - "source": "iana", - "extensions": ["uvm","uvvm"] - }, - "video/vnd.dece.mp4": { - "source": "iana" - }, - "video/vnd.dece.pd": { - "source": "iana", - "extensions": ["uvp","uvvp"] - }, - "video/vnd.dece.sd": { - "source": "iana", - "extensions": ["uvs","uvvs"] - }, - "video/vnd.dece.video": { - "source": "iana", - "extensions": ["uvv","uvvv"] - }, - "video/vnd.directv.mpeg": { - "source": "iana" - }, - "video/vnd.directv.mpeg-tts": { - "source": "iana" - }, - "video/vnd.dlna.mpeg-tts": { - "source": "iana" - }, - "video/vnd.dvb.file": { - "source": "iana", - "extensions": ["dvb"] - }, - "video/vnd.fvt": { - "source": "iana", - "extensions": ["fvt"] - }, - "video/vnd.hns.video": { - "source": "iana" - }, - "video/vnd.iptvforum.1dparityfec-1010": { - "source": "iana" - }, - "video/vnd.iptvforum.1dparityfec-2005": { - "source": "iana" - }, - "video/vnd.iptvforum.2dparityfec-1010": { - "source": "iana" - }, - "video/vnd.iptvforum.2dparityfec-2005": { - "source": "iana" - }, - "video/vnd.iptvforum.ttsavc": { - "source": "iana" - }, - "video/vnd.iptvforum.ttsmpeg2": { - "source": "iana" - }, - "video/vnd.motorola.video": { - "source": "iana" - }, - "video/vnd.motorola.videop": { - "source": "iana" - }, - "video/vnd.mpegurl": { - "source": "iana", - "extensions": ["mxu","m4u"] - }, - "video/vnd.ms-playready.media.pyv": { - "source": "iana", - "extensions": ["pyv"] - }, - "video/vnd.nokia.interleaved-multimedia": { - "source": "iana" - }, - "video/vnd.nokia.mp4vr": { - "source": "iana" - }, - "video/vnd.nokia.videovoip": { - "source": "iana" - }, - "video/vnd.objectvideo": { - "source": "iana" - }, - "video/vnd.radgamettools.bink": { - "source": "iana" - }, - "video/vnd.radgamettools.smacker": { - "source": "iana" - }, - "video/vnd.sealed.mpeg1": { - "source": "iana" - }, - "video/vnd.sealed.mpeg4": { - "source": "iana" - }, - "video/vnd.sealed.swf": { - "source": "iana" - }, - "video/vnd.sealedmedia.softseal.mov": { - "source": "iana" - }, - "video/vnd.uvvu.mp4": { - "source": "iana", - "extensions": ["uvu","uvvu"] - }, - "video/vnd.vivo": { - "source": "iana", - "extensions": ["viv"] - }, - "video/vnd.youtube.yt": { - "source": "iana" - }, - "video/vp8": { - "source": "iana" - }, - "video/vp9": { - "source": "iana" - }, - "video/webm": { - "source": "apache", - "compressible": false, - "extensions": ["webm"] - }, - "video/x-f4v": { - "source": "apache", - "extensions": ["f4v"] - }, - "video/x-fli": { - "source": "apache", - "extensions": ["fli"] - }, - "video/x-flv": { - "source": "apache", - "compressible": false, - "extensions": ["flv"] - }, - "video/x-m4v": { - "source": "apache", - "extensions": ["m4v"] - }, - "video/x-matroska": { - "source": "apache", - "compressible": false, - "extensions": ["mkv","mk3d","mks"] - }, - "video/x-mng": { - "source": "apache", - "extensions": ["mng"] - }, - "video/x-ms-asf": { - "source": "apache", - "extensions": ["asf","asx"] - }, - "video/x-ms-vob": { - "source": "apache", - "extensions": ["vob"] - }, - "video/x-ms-wm": { - "source": "apache", - "extensions": ["wm"] - }, - "video/x-ms-wmv": { - "source": "apache", - "compressible": false, - "extensions": ["wmv"] - }, - "video/x-ms-wmx": { - "source": "apache", - "extensions": ["wmx"] - }, - "video/x-ms-wvx": { - "source": "apache", - "extensions": ["wvx"] - }, - "video/x-msvideo": { - "source": "apache", - "extensions": ["avi"] - }, - "video/x-sgi-movie": { - "source": "apache", - "extensions": ["movie"] - }, - "video/x-smv": { - "source": "apache", - "extensions": ["smv"] - }, - "x-conference/x-cooltalk": { - "source": "apache", - "extensions": ["ice"] - }, - "x-shader/x-fragment": { - "compressible": true - }, - "x-shader/x-vertex": { - "compressible": true - } -} diff --git a/web/static/node_modules/mime-db/index.js b/web/static/node_modules/mime-db/index.js deleted file mode 100644 index ec2be30d..00000000 --- a/web/static/node_modules/mime-db/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = require('./db.json') diff --git a/web/static/node_modules/mime-db/package.json b/web/static/node_modules/mime-db/package.json deleted file mode 100644 index 32c14b84..00000000 --- a/web/static/node_modules/mime-db/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "mime-db", - "description": "Media Type Database", - "version": "1.52.0", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)", - "Robert Kieffer (http://github.com/broofa)" - ], - "license": "MIT", - "keywords": [ - "mime", - "db", - "type", - "types", - "database", - "charset", - "charsets" - ], - "repository": "jshttp/mime-db", - "devDependencies": { - "bluebird": "3.7.2", - "co": "4.6.0", - "cogent": "1.0.1", - "csv-parse": "4.16.3", - "eslint": "7.32.0", - "eslint-config-standard": "15.0.1", - "eslint-plugin-import": "2.25.4", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.1.1", - "eslint-plugin-standard": "4.1.0", - "gnode": "0.1.2", - "media-typer": "1.1.0", - "mocha": "9.2.1", - "nyc": "15.1.0", - "raw-body": "2.5.0", - "stream-to-array": "2.3.0" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "db.json", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "build": "node scripts/build", - "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx", - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "update": "npm run fetch && npm run build", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/web/static/node_modules/mime-types/HISTORY.md b/web/static/node_modules/mime-types/HISTORY.md deleted file mode 100644 index c5043b75..00000000 --- a/web/static/node_modules/mime-types/HISTORY.md +++ /dev/null @@ -1,397 +0,0 @@ -2.1.35 / 2022-03-12 -=================== - - * deps: mime-db@1.52.0 - - Add extensions from IANA for more `image/*` types - - Add extension `.asc` to `application/pgp-keys` - - Add extensions to various XML types - - Add new upstream MIME types - -2.1.34 / 2021-11-08 -=================== - - * deps: mime-db@1.51.0 - - Add new upstream MIME types - -2.1.33 / 2021-10-01 -=================== - - * deps: mime-db@1.50.0 - - Add deprecated iWorks mime types and extensions - - Add new upstream MIME types - -2.1.32 / 2021-07-27 -=================== - - * deps: mime-db@1.49.0 - - Add extension `.trig` to `application/trig` - - Add new upstream MIME types - -2.1.31 / 2021-06-01 -=================== - - * deps: mime-db@1.48.0 - - Add extension `.mvt` to `application/vnd.mapbox-vector-tile` - - Add new upstream MIME types - -2.1.30 / 2021-04-02 -=================== - - * deps: mime-db@1.47.0 - - Add extension `.amr` to `audio/amr` - - Remove ambigious extensions from IANA for `application/*+xml` types - - Update primary extension to `.es` for `application/ecmascript` - -2.1.29 / 2021-02-17 -=================== - - * deps: mime-db@1.46.0 - - Add extension `.amr` to `audio/amr` - - Add extension `.m4s` to `video/iso.segment` - - Add extension `.opus` to `audio/ogg` - - Add new upstream MIME types - -2.1.28 / 2021-01-01 -=================== - - * deps: mime-db@1.45.0 - - Add `application/ubjson` with extension `.ubj` - - Add `image/avif` with extension `.avif` - - Add `image/ktx2` with extension `.ktx2` - - Add extension `.dbf` to `application/vnd.dbf` - - Add extension `.rar` to `application/vnd.rar` - - Add extension `.td` to `application/urc-targetdesc+xml` - - Add new upstream MIME types - - Fix extension of `application/vnd.apple.keynote` to be `.key` - -2.1.27 / 2020-04-23 -=================== - - * deps: mime-db@1.44.0 - - Add charsets from IANA - - Add extension `.cjs` to `application/node` - - Add new upstream MIME types - -2.1.26 / 2020-01-05 -=================== - - * deps: mime-db@1.43.0 - - Add `application/x-keepass2` with extension `.kdbx` - - Add extension `.mxmf` to `audio/mobile-xmf` - - Add extensions from IANA for `application/*+xml` types - - Add new upstream MIME types - -2.1.25 / 2019-11-12 -=================== - - * deps: mime-db@1.42.0 - - Add new upstream MIME types - - Add `application/toml` with extension `.toml` - - Add `image/vnd.ms-dds` with extension `.dds` - -2.1.24 / 2019-04-20 -=================== - - * deps: mime-db@1.40.0 - - Add extensions from IANA for `model/*` types - - Add `text/mdx` with extension `.mdx` - -2.1.23 / 2019-04-17 -=================== - - * deps: mime-db@~1.39.0 - - Add extensions `.siv` and `.sieve` to `application/sieve` - - Add new upstream MIME types - -2.1.22 / 2019-02-14 -=================== - - * deps: mime-db@~1.38.0 - - Add extension `.nq` to `application/n-quads` - - Add extension `.nt` to `application/n-triples` - - Add new upstream MIME types - -2.1.21 / 2018-10-19 -=================== - - * deps: mime-db@~1.37.0 - - Add extensions to HEIC image types - - Add new upstream MIME types - -2.1.20 / 2018-08-26 -=================== - - * deps: mime-db@~1.36.0 - - Add Apple file extensions from IANA - - Add extensions from IANA for `image/*` types - - Add new upstream MIME types - -2.1.19 / 2018-07-17 -=================== - - * deps: mime-db@~1.35.0 - - Add extension `.csl` to `application/vnd.citationstyles.style+xml` - - Add extension `.es` to `application/ecmascript` - - Add extension `.owl` to `application/rdf+xml` - - Add new upstream MIME types - - Add UTF-8 as default charset for `text/turtle` - -2.1.18 / 2018-02-16 -=================== - - * deps: mime-db@~1.33.0 - - Add `application/raml+yaml` with extension `.raml` - - Add `application/wasm` with extension `.wasm` - - Add `text/shex` with extension `.shex` - - Add extensions for JPEG-2000 images - - Add extensions from IANA for `message/*` types - - Add new upstream MIME types - - Update font MIME types - - Update `text/hjson` to registered `application/hjson` - -2.1.17 / 2017-09-01 -=================== - - * deps: mime-db@~1.30.0 - - Add `application/vnd.ms-outlook` - - Add `application/x-arj` - - Add extension `.mjs` to `application/javascript` - - Add glTF types and extensions - - Add new upstream MIME types - - Add `text/x-org` - - Add VirtualBox MIME types - - Fix `source` records for `video/*` types that are IANA - - Update `font/opentype` to registered `font/otf` - -2.1.16 / 2017-07-24 -=================== - - * deps: mime-db@~1.29.0 - - Add `application/fido.trusted-apps+json` - - Add extension `.wadl` to `application/vnd.sun.wadl+xml` - - Add extension `.gz` to `application/gzip` - - Add new upstream MIME types - - Update extensions `.md` and `.markdown` to be `text/markdown` - -2.1.15 / 2017-03-23 -=================== - - * deps: mime-db@~1.27.0 - - Add new mime types - - Add `image/apng` - -2.1.14 / 2017-01-14 -=================== - - * deps: mime-db@~1.26.0 - - Add new mime types - -2.1.13 / 2016-11-18 -=================== - - * deps: mime-db@~1.25.0 - - Add new mime types - -2.1.12 / 2016-09-18 -=================== - - * deps: mime-db@~1.24.0 - - Add new mime types - - Add `audio/mp3` - -2.1.11 / 2016-05-01 -=================== - - * deps: mime-db@~1.23.0 - - Add new mime types - -2.1.10 / 2016-02-15 -=================== - - * deps: mime-db@~1.22.0 - - Add new mime types - - Fix extension of `application/dash+xml` - - Update primary extension for `audio/mp4` - -2.1.9 / 2016-01-06 -================== - - * deps: mime-db@~1.21.0 - - Add new mime types - -2.1.8 / 2015-11-30 -================== - - * deps: mime-db@~1.20.0 - - Add new mime types - -2.1.7 / 2015-09-20 -================== - - * deps: mime-db@~1.19.0 - - Add new mime types - -2.1.6 / 2015-09-03 -================== - - * deps: mime-db@~1.18.0 - - Add new mime types - -2.1.5 / 2015-08-20 -================== - - * deps: mime-db@~1.17.0 - - Add new mime types - -2.1.4 / 2015-07-30 -================== - - * deps: mime-db@~1.16.0 - - Add new mime types - -2.1.3 / 2015-07-13 -================== - - * deps: mime-db@~1.15.0 - - Add new mime types - -2.1.2 / 2015-06-25 -================== - - * deps: mime-db@~1.14.0 - - Add new mime types - -2.1.1 / 2015-06-08 -================== - - * perf: fix deopt during mapping - -2.1.0 / 2015-06-07 -================== - - * Fix incorrectly treating extension-less file name as extension - - i.e. `'path/to/json'` will no longer return `application/json` - * Fix `.charset(type)` to accept parameters - * Fix `.charset(type)` to match case-insensitive - * Improve generation of extension to MIME mapping - * Refactor internals for readability and no argument reassignment - * Prefer `application/*` MIME types from the same source - * Prefer any type over `application/octet-stream` - * deps: mime-db@~1.13.0 - - Add nginx as a source - - Add new mime types - -2.0.14 / 2015-06-06 -=================== - - * deps: mime-db@~1.12.0 - - Add new mime types - -2.0.13 / 2015-05-31 -=================== - - * deps: mime-db@~1.11.0 - - Add new mime types - -2.0.12 / 2015-05-19 -=================== - - * deps: mime-db@~1.10.0 - - Add new mime types - -2.0.11 / 2015-05-05 -=================== - - * deps: mime-db@~1.9.1 - - Add new mime types - -2.0.10 / 2015-03-13 -=================== - - * deps: mime-db@~1.8.0 - - Add new mime types - -2.0.9 / 2015-02-09 -================== - - * deps: mime-db@~1.7.0 - - Add new mime types - - Community extensions ownership transferred from `node-mime` - -2.0.8 / 2015-01-29 -================== - - * deps: mime-db@~1.6.0 - - Add new mime types - -2.0.7 / 2014-12-30 -================== - - * deps: mime-db@~1.5.0 - - Add new mime types - - Fix various invalid MIME type entries - -2.0.6 / 2014-12-30 -================== - - * deps: mime-db@~1.4.0 - - Add new mime types - - Fix various invalid MIME type entries - - Remove example template MIME types - -2.0.5 / 2014-12-29 -================== - - * deps: mime-db@~1.3.1 - - Fix missing extensions - -2.0.4 / 2014-12-10 -================== - - * deps: mime-db@~1.3.0 - - Add new mime types - -2.0.3 / 2014-11-09 -================== - - * deps: mime-db@~1.2.0 - - Add new mime types - -2.0.2 / 2014-09-28 -================== - - * deps: mime-db@~1.1.0 - - Add new mime types - - Update charsets - -2.0.1 / 2014-09-07 -================== - - * Support Node.js 0.6 - -2.0.0 / 2014-09-02 -================== - - * Use `mime-db` - * Remove `.define()` - -1.0.2 / 2014-08-04 -================== - - * Set charset=utf-8 for `text/javascript` - -1.0.1 / 2014-06-24 -================== - - * Add `text/jsx` type - -1.0.0 / 2014-05-12 -================== - - * Return `false` for unknown types - * Set charset=utf-8 for `application/json` - -0.1.0 / 2014-05-02 -================== - - * Initial release diff --git a/web/static/node_modules/mime-types/LICENSE b/web/static/node_modules/mime-types/LICENSE deleted file mode 100644 index 06166077..00000000 --- a/web/static/node_modules/mime-types/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/web/static/node_modules/mime-types/README.md b/web/static/node_modules/mime-types/README.md deleted file mode 100644 index 48d2fb47..00000000 --- a/web/static/node_modules/mime-types/README.md +++ /dev/null @@ -1,113 +0,0 @@ -# mime-types - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -The ultimate javascript content-type utility. - -Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: - -- __No fallbacks.__ Instead of naively returning the first available type, - `mime-types` simply returns `false`, so do - `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. -- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. -- No `.define()` functionality -- Bug fixes for `.lookup(path)` - -Otherwise, the API is compatible with `mime` 1.x. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install mime-types -``` - -## Adding Types - -All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), -so open a PR there if you'd like to add mime types. - -## API - -```js -var mime = require('mime-types') -``` - -All functions return `false` if input is invalid or not found. - -### mime.lookup(path) - -Lookup the content-type associated with a file. - -```js -mime.lookup('json') // 'application/json' -mime.lookup('.md') // 'text/markdown' -mime.lookup('file.html') // 'text/html' -mime.lookup('folder/file.js') // 'application/javascript' -mime.lookup('folder/.htaccess') // false - -mime.lookup('cats') // false -``` - -### mime.contentType(type) - -Create a full content-type header given a content-type or extension. -When given an extension, `mime.lookup` is used to get the matching -content-type, otherwise the given content-type is used. Then if the -content-type does not already have a `charset` parameter, `mime.charset` -is used to get the default charset and add to the returned content-type. - -```js -mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' -mime.contentType('file.json') // 'application/json; charset=utf-8' -mime.contentType('text/html') // 'text/html; charset=utf-8' -mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' - -// from a full path -mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' -``` - -### mime.extension(type) - -Get the default extension for a content-type. - -```js -mime.extension('application/octet-stream') // 'bin' -``` - -### mime.charset(type) - -Lookup the implied default charset of a content-type. - -```js -mime.charset('text/markdown') // 'UTF-8' -``` - -### var type = mime.types[extension] - -A map of content-types by extension. - -### [extensions...] = mime.extensions[type] - -A map of extensions by content-type. - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci -[ci-url]: https://github.com/jshttp/mime-types/actions/workflows/ci.yml -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master -[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master -[node-version-image]: https://badgen.net/npm/node/mime-types -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/mime-types -[npm-url]: https://npmjs.org/package/mime-types -[npm-version-image]: https://badgen.net/npm/v/mime-types diff --git a/web/static/node_modules/mime-types/index.js b/web/static/node_modules/mime-types/index.js deleted file mode 100644 index b9f34d59..00000000 --- a/web/static/node_modules/mime-types/index.js +++ /dev/null @@ -1,188 +0,0 @@ -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var db = require('mime-db') -var extname = require('path').extname - -/** - * Module variables. - * @private - */ - -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ - -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function extension (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ - -function lookup (path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps (extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] - - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) - - if (types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { - // skip the remapping - continue - } - } - - // set the extension -> mime - types[extension] = type - } - }) -} diff --git a/web/static/node_modules/mime-types/package.json b/web/static/node_modules/mime-types/package.json deleted file mode 100644 index bbef6964..00000000 --- a/web/static/node_modules/mime-types/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "mime-types", - "description": "The ultimate javascript content-type utility.", - "version": "2.1.35", - "contributors": [ - "Douglas Christopher Wilson ", - "Jeremiah Senkpiel (https://searchbeam.jit.su)", - "Jonathan Ong (http://jongleberry.com)" - ], - "license": "MIT", - "keywords": [ - "mime", - "types" - ], - "repository": "jshttp/mime-types", - "dependencies": { - "mime-db": "1.52.0" - }, - "devDependencies": { - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.25.4", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.2.2", - "nyc": "15.1.0" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec test/test.js", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/web/static/node_modules/neo-async/LICENSE b/web/static/node_modules/neo-async/LICENSE deleted file mode 100644 index 4ec13d1f..00000000 --- a/web/static/node_modules/neo-async/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-2018 Suguru Motegi -Based on Async.js, Copyright Caolan McMahon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/neo-async/README.md b/web/static/node_modules/neo-async/README.md deleted file mode 100644 index d49e93cf..00000000 --- a/web/static/node_modules/neo-async/README.md +++ /dev/null @@ -1,273 +0,0 @@ -

    Neo-Async

    - -

    - -

    - -

    - npm - Travis Status - Coverage Status - download - Code Quality: Javascript - Total Alerts - FOSSA -

    - -Neo-Async is thought to be used as a drop-in replacement for [Async](https://github.com/caolan/async), it almost fully covers its functionality and runs [faster](#benchmark). - -Benchmark is [here](#benchmark)! - -Bluebird's benchmark is [here](https://github.com/suguru03/bluebird/tree/aigle/benchmark)! - -## Code Coverage -![coverage](https://raw.githubusercontent.com/wiki/suguru03/neo-async/images/coverage.png) - -## Installation - -### In a browser -```html - -``` - -### In an AMD loader -```js -require(['async'], function(async) {}); -``` - -### Promise and async/await - -I recommend to use [`Aigle`](https://github.com/suguru03/aigle). - -It is optimized for Promise handling and has almost the same functionality as `neo-async`. - -### Node.js - -#### standard - -```bash -$ npm install neo-async -``` -```js -var async = require('neo-async'); -``` - -#### replacement -```bash -$ npm install neo-async -$ ln -s ./node_modules/neo-async ./node_modules/async -``` -```js -var async = require('async'); -``` - -### Bower - -```bash -bower install neo-async -``` - -## Feature - -[JSDoc](http://suguru03.github.io/neo-async/doc/async.html) - -\* not in Async - -### Collections - -- [`each`](http://suguru03.github.io/neo-async/doc/async.each.html) -- [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -- [`eachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -- [`forEach`](http://suguru03.github.io/neo-async/doc/async.each.html) -> [`each`](http://suguru03.github.io/neo-async/doc/async.each.html) -- [`forEachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -> [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -- [`forEachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -> [`eachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -- [`eachOf`](http://suguru03.github.io/neo-async/doc/async.each.html) -> [`each`](http://suguru03.github.io/neo-async/doc/async.each.html) -- [`eachOfSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -> [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -- [`eachOfLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -> [`eachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -- [`forEachOf`](http://suguru03.github.io/neo-async/doc/async.each.html) -> [`each`](http://suguru03.github.io/neo-async/doc/async.each.html) -- [`forEachOfSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -> [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -- [`eachOfLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -> [`forEachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -- [`map`](http://suguru03.github.io/neo-async/doc/async.map.html) -- [`mapSeries`](http://suguru03.github.io/neo-async/doc/async.mapSeries.html) -- [`mapLimit`](http://suguru03.github.io/neo-async/doc/async.mapLimit.html) -- [`mapValues`](http://suguru03.github.io/neo-async/doc/async.mapValues.html) -- [`mapValuesSeries`](http://suguru03.github.io/neo-async/doc/async.mapValuesSeries.html) -- [`mapValuesLimit`](http://suguru03.github.io/neo-async/doc/async.mapValuesLimit.html) -- [`filter`](http://suguru03.github.io/neo-async/doc/async.filter.html) -- [`filterSeries`](http://suguru03.github.io/neo-async/doc/async.filterSeries.html) -- [`filterLimit`](http://suguru03.github.io/neo-async/doc/async.filterLimit.html) -- [`select`](http://suguru03.github.io/neo-async/doc/async.filter.html) -> [`filter`](http://suguru03.github.io/neo-async/doc/async.filter.html) -- [`selectSeries`](http://suguru03.github.io/neo-async/doc/async.filterSeries.html) -> [`filterSeries`](http://suguru03.github.io/neo-async/doc/async.filterSeries.html) -- [`selectLimit`](http://suguru03.github.io/neo-async/doc/async.filterLimit.html) -> [`filterLimit`](http://suguru03.github.io/neo-async/doc/async.filterLimit.html) -- [`reject`](http://suguru03.github.io/neo-async/doc/async.reject.html) -- [`rejectSeries`](http://suguru03.github.io/neo-async/doc/async.rejectSeries.html) -- [`rejectLimit`](http://suguru03.github.io/neo-async/doc/async.rejectLimit.html) -- [`detect`](http://suguru03.github.io/neo-async/doc/async.detect.html) -- [`detectSeries`](http://suguru03.github.io/neo-async/doc/async.detectSeries.html) -- [`detectLimit`](http://suguru03.github.io/neo-async/doc/async.detectLimit.html) -- [`find`](http://suguru03.github.io/neo-async/doc/async.detect.html) -> [`detect`](http://suguru03.github.io/neo-async/doc/async.detect.html) -- [`findSeries`](http://suguru03.github.io/neo-async/doc/async.detectSeries.html) -> [`detectSeries`](http://suguru03.github.io/neo-async/doc/async.detectSeries.html) -- [`findLimit`](http://suguru03.github.io/neo-async/doc/async.detectLimit.html) -> [`detectLimit`](http://suguru03.github.io/neo-async/doc/async.detectLimit.html) -- [`pick`](http://suguru03.github.io/neo-async/doc/async.pick.html) * -- [`pickSeries`](http://suguru03.github.io/neo-async/doc/async.pickSeries.html) * -- [`pickLimit`](http://suguru03.github.io/neo-async/doc/async.pickLimit.html) * -- [`omit`](http://suguru03.github.io/neo-async/doc/async.omit.html) * -- [`omitSeries`](http://suguru03.github.io/neo-async/doc/async.omitSeries.html) * -- [`omitLimit`](http://suguru03.github.io/neo-async/doc/async.omitLimit.html) * -- [`reduce`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -- [`inject`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -> [`reduce`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -- [`foldl`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -> [`reduce`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -- [`reduceRight`](http://suguru03.github.io/neo-async/doc/async.reduceRight.html) -- [`foldr`](http://suguru03.github.io/neo-async/doc/async.reduceRight.html) -> [`reduceRight`](http://suguru03.github.io/neo-async/doc/async.reduceRight.html) -- [`transform`](http://suguru03.github.io/neo-async/doc/async.transform.html) -- [`transformSeries`](http://suguru03.github.io/neo-async/doc/async.transformSeries.html) * -- [`transformLimit`](http://suguru03.github.io/neo-async/doc/async.transformLimit.html) * -- [`sortBy`](http://suguru03.github.io/neo-async/doc/async.sortBy.html) -- [`sortBySeries`](http://suguru03.github.io/neo-async/doc/async.sortBySeries.html) * -- [`sortByLimit`](http://suguru03.github.io/neo-async/doc/async.sortByLimit.html) * -- [`some`](http://suguru03.github.io/neo-async/doc/async.some.html) -- [`someSeries`](http://suguru03.github.io/neo-async/doc/async.someSeries.html) -- [`someLimit`](http://suguru03.github.io/neo-async/doc/async.someLimit.html) -- [`any`](http://suguru03.github.io/neo-async/doc/async.some.html) -> [`some`](http://suguru03.github.io/neo-async/doc/async.some.html) -- [`anySeries`](http://suguru03.github.io/neo-async/doc/async.someSeries.html) -> [`someSeries`](http://suguru03.github.io/neo-async/doc/async.someSeries.html) -- [`anyLimit`](http://suguru03.github.io/neo-async/doc/async.someLimit.html) -> [`someLimit`](http://suguru03.github.io/neo-async/doc/async.someLimit.html) -- [`every`](http://suguru03.github.io/neo-async/doc/async.every.html) -- [`everySeries`](http://suguru03.github.io/neo-async/doc/async.everySeries.html) -- [`everyLimit`](http://suguru03.github.io/neo-async/doc/async.everyLimit.html) -- [`all`](http://suguru03.github.io/neo-async/doc/async.every.html) -> [`every`](http://suguru03.github.io/neo-async/doc/async.every.html) -- [`allSeries`](http://suguru03.github.io/neo-async/doc/async.everySeries.html) -> [`every`](http://suguru03.github.io/neo-async/doc/async.everySeries.html) -- [`allLimit`](http://suguru03.github.io/neo-async/doc/async.everyLimit.html) -> [`every`](http://suguru03.github.io/neo-async/doc/async.everyLimit.html) -- [`concat`](http://suguru03.github.io/neo-async/doc/async.concat.html) -- [`concatSeries`](http://suguru03.github.io/neo-async/doc/async.concatSeries.html) -- [`concatLimit`](http://suguru03.github.io/neo-async/doc/async.concatLimit.html) * - -### Control Flow - -- [`parallel`](http://suguru03.github.io/neo-async/doc/async.parallel.html) -- [`series`](http://suguru03.github.io/neo-async/doc/async.series.html) -- [`parallelLimit`](http://suguru03.github.io/neo-async/doc/async.series.html) -- [`tryEach`](http://suguru03.github.io/neo-async/doc/async.tryEach.html) -- [`waterfall`](http://suguru03.github.io/neo-async/doc/async.waterfall.html) -- [`angelFall`](http://suguru03.github.io/neo-async/doc/async.angelFall.html) * -- [`angelfall`](http://suguru03.github.io/neo-async/doc/async.angelFall.html) -> [`angelFall`](http://suguru03.github.io/neo-async/doc/async.angelFall.html) * -- [`whilst`](#whilst) -- [`doWhilst`](#doWhilst) -- [`until`](#until) -- [`doUntil`](#doUntil) -- [`during`](#during) -- [`doDuring`](#doDuring) -- [`forever`](#forever) -- [`compose`](#compose) -- [`seq`](#seq) -- [`applyEach`](#applyEach) -- [`applyEachSeries`](#applyEachSeries) -- [`queue`](#queue) -- [`priorityQueue`](#priorityQueue) -- [`cargo`](#cargo) -- [`auto`](#auto) -- [`autoInject`](#autoInject) -- [`retry`](#retry) -- [`retryable`](#retryable) -- [`iterator`](#iterator) -- [`times`](http://suguru03.github.io/neo-async/doc/async.times.html) -- [`timesSeries`](http://suguru03.github.io/neo-async/doc/async.timesSeries.html) -- [`timesLimit`](http://suguru03.github.io/neo-async/doc/async.timesLimit.html) -- [`race`](#race) - -### Utils -- [`apply`](#apply) -- [`setImmediate`](#setImmediate) -- [`nextTick`](#nextTick) -- [`memoize`](#memoize) -- [`unmemoize`](#unmemoize) -- [`ensureAsync`](#ensureAsync) -- [`constant`](#constant) -- [`asyncify`](#asyncify) -- [`wrapSync`](#asyncify) -> [`asyncify`](#asyncify) -- [`log`](#log) -- [`dir`](#dir) -- [`timeout`](http://suguru03.github.io/neo-async/doc/async.timeout.html) -- [`reflect`](#reflect) -- [`reflectAll`](#reflectAll) -- [`createLogger`](#createLogger) - -## Mode -- [`safe`](#safe) * -- [`fast`](#fast) * - -## Benchmark - -[Benchmark: Async vs Neo-Async](http://suguru03.hatenablog.com/entry/2016/06/10/135559) - -### How to check - -```bash -$ node perf -``` - -### Environment - -* Darwin 17.3.0 x64 -* Node.js v8.9.4 -* async v2.6.0 -* neo-async v2.5.0 -* benchmark v2.1.4 - -### Result - -The value is the ratio (Neo-Async/Async) of the average speed. - -#### Collections -|function|benchmark| -|---|--:| -|each/forEach|2.43| -|eachSeries/forEachSeries|1.75| -|eachLimit/forEachLimit|1.68| -|eachOf|3.29| -|eachOfSeries|1.50| -|eachOfLimit|1.59| -|map|3.95| -|mapSeries|1.81| -|mapLimit|1.27| -|mapValues|2.73| -|mapValuesSeries|1.59| -|mapValuesLimit|1.23| -|filter|3.00| -|filterSeries|1.74| -|filterLimit|1.17| -|reject|4.59| -|rejectSeries|2.31| -|rejectLimit|1.58| -|detect|4.30| -|detectSeries|1.86| -|detectLimit|1.32| -|reduce|1.82| -|transform|2.46| -|sortBy|4.08| -|some|2.19| -|someSeries|1.83| -|someLimit|1.32| -|every|2.09| -|everySeries|1.84| -|everyLimit|1.35| -|concat|3.79| -|concatSeries|4.45| - -#### Control Flow -|funciton|benchmark| -|---|--:| -|parallel|2.93| -|series|1.96| -|waterfall|1.29| -|whilst|1.00| -|doWhilst|1.12| -|until|1.12| -|doUntil|1.12| -|during|1.18| -|doDuring|2.42| -|times|4.25| -|auto|1.97| - - -## License -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsuguru03%2Fneo-async.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsuguru03%2Fneo-async?ref=badge_large) diff --git a/web/static/node_modules/neo-async/all.js b/web/static/node_modules/neo-async/all.js deleted file mode 100644 index dad54e7f..00000000 --- a/web/static/node_modules/neo-async/all.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').all; diff --git a/web/static/node_modules/neo-async/allLimit.js b/web/static/node_modules/neo-async/allLimit.js deleted file mode 100644 index d9d7aaa1..00000000 --- a/web/static/node_modules/neo-async/allLimit.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').allLimit; diff --git a/web/static/node_modules/neo-async/allSeries.js b/web/static/node_modules/neo-async/allSeries.js deleted file mode 100644 index 2a7a8ba8..00000000 --- a/web/static/node_modules/neo-async/allSeries.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').allSeries; diff --git a/web/static/node_modules/neo-async/angelFall.js b/web/static/node_modules/neo-async/angelFall.js deleted file mode 100644 index 476c23ec..00000000 --- a/web/static/node_modules/neo-async/angelFall.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').angelfall; diff --git a/web/static/node_modules/neo-async/any.js b/web/static/node_modules/neo-async/any.js deleted file mode 100644 index d6b07bb5..00000000 --- a/web/static/node_modules/neo-async/any.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').any; diff --git a/web/static/node_modules/neo-async/anyLimit.js b/web/static/node_modules/neo-async/anyLimit.js deleted file mode 100644 index 34114f88..00000000 --- a/web/static/node_modules/neo-async/anyLimit.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').anyLimit; diff --git a/web/static/node_modules/neo-async/anySeries.js b/web/static/node_modules/neo-async/anySeries.js deleted file mode 100644 index bb3781fd..00000000 --- a/web/static/node_modules/neo-async/anySeries.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').anySeries; diff --git a/web/static/node_modules/neo-async/apply.js b/web/static/node_modules/neo-async/apply.js deleted file mode 100644 index 41135e21..00000000 --- a/web/static/node_modules/neo-async/apply.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').apply; diff --git a/web/static/node_modules/neo-async/applyEach.js b/web/static/node_modules/neo-async/applyEach.js deleted file mode 100644 index 292bd1c0..00000000 --- a/web/static/node_modules/neo-async/applyEach.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').applyEach; diff --git a/web/static/node_modules/neo-async/applyEachSeries.js b/web/static/node_modules/neo-async/applyEachSeries.js deleted file mode 100644 index 0aece7cd..00000000 --- a/web/static/node_modules/neo-async/applyEachSeries.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').applyEachSeries; diff --git a/web/static/node_modules/neo-async/async.js b/web/static/node_modules/neo-async/async.js deleted file mode 100644 index e78eb168..00000000 --- a/web/static/node_modules/neo-async/async.js +++ /dev/null @@ -1,9184 +0,0 @@ -(function(global, factory) { - /*jshint -W030 */ - 'use strict'; - typeof exports === 'object' && typeof module !== 'undefined' - ? factory(exports) - : typeof define === 'function' && define.amd - ? define(['exports'], factory) - : global.async - ? factory((global.neo_async = global.neo_async || {})) - : factory((global.async = global.async || {})); -})(this, function(exports) { - 'use strict'; - - var noop = function noop() {}; - var throwError = function throwError() { - throw new Error('Callback was already called.'); - }; - - var DEFAULT_TIMES = 5; - var DEFAULT_INTERVAL = 0; - - var obj = 'object'; - var func = 'function'; - var isArray = Array.isArray; - var nativeKeys = Object.keys; - var nativePush = Array.prototype.push; - var iteratorSymbol = typeof Symbol === func && Symbol.iterator; - - var nextTick, asyncNextTick, asyncSetImmediate; - createImmediate(); - - /** - * @memberof async - * @namespace each - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.each(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(); - * }, num * 10); - * }; - * async.each(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.each(object, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(); - * }, num * 10); - * }; - * async.each(object, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - * @example - * - * // break - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num !== 2); - * }, num * 10); - * }; - * async.each(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 2] - * }); - * - */ - var each = createEach(arrayEach, baseEach, symbolEach); - - /** - * @memberof async - * @namespace map - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.map(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.map(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.map(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.map(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var map = createMap(arrayEachIndex, baseEachIndex, symbolEachIndex, true); - - /** - * @memberof async - * @namespace mapValues - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValues(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2 } - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValues(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2 } - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValues(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2 } - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValues(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2 } - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var mapValues = createMap(arrayEachIndex, baseEachKey, symbolEachKey, false); - - /** - * @memberof async - * @namespace filter - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filter(array, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filter(array, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filter(object, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filter(object, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var filter = createFilter(arrayEachIndexValue, baseEachIndexValue, symbolEachIndexValue, true); - - /** - * @memberof async - * @namespace filterSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3] - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3] - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3] - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - var filterSeries = createFilterSeries(true); - - /** - * @memberof async - * @namespace filterLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - var filterLimit = createFilterLimit(true); - - /** - * @memberof async - * @namespace reject - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.reject(array, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.reject(array, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.reject(object, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.reject(object, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var reject = createFilter(arrayEachIndexValue, baseEachIndexValue, symbolEachIndexValue, false); - - /** - * @memberof async - * @namespace rejectSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectSeries(array, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectSeries(object, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectSeries(object, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - var rejectSeries = createFilterSeries(false); - - /** - * @memberof async - * @namespace rejectLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [4, 2] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [4, 2] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [4, 2] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [4, 2] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - var rejectLimit = createFilterLimit(false); - - /** - * @memberof async - * @namespace detect - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detect(array, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detect(array, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detect(object, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detect(object, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 'a']] - * }); - * - */ - var detect = createDetect(arrayEachValue, baseEachValue, symbolEachValue, true); - - /** - * @memberof async - * @namespace detectSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectSeries(array, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectSeries(array, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectSeries(object, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectSeries(object, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 'a']] - * }); - * - */ - var detectSeries = createDetectSeries(true); - - /** - * @memberof async - * @namespace detectLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectLimit(array, 2, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectLimit(array, 2, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectLimit(object, 2, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectLimit(object, 2, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 'a']] - * }); - * - */ - var detectLimit = createDetectLimit(true); - - /** - * @memberof async - * @namespace every - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.every(array, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.every(array, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 0], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.every(object, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.every(object, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 'a'], [2, 'c']] - * }); - * - */ - var every = createEvery(arrayEachValue, baseEachValue, symbolEachValue); - - /** - * @memberof async - * @namespace everySeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everySeries(array, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everySeries(array, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everySeries(object, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everySeries(object, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 'a'], [3, 'b'] [2, 'c']] - * }); - * - */ - var everySeries = createEverySeries(); - - /** - * @memberof async - * @namespace everyLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everyLimit(array, 2, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 3, 5, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everyLimit(array, 2, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everyLimit(object, 2, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 3, 5, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everyLimit(object, 2, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e']] - * }); - * - */ - var everyLimit = createEveryLimit(); - - /** - * @memberof async - * @namespace pick - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pick(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3 } - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pick(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3 } - * console.log(order); // [[0, 1], [2, 2], [3, 1], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pick(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3 } - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pick(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3 } - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b'], [4, 'd']] - * }); - * - */ - var pick = createPick(arrayEachIndexValue, baseEachKeyValue, symbolEachKeyValue, true); - - /** - * @memberof async - * @namespace pickSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickSeries(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickSeries(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3 } - * console.log(order); // [[0, 1], [3, 1], [2, 2], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickSeries(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickSeries(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3 } - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c'], [4, 'd']] - * }); - * - */ - var pickSeries = createPickSeries(true); - - /** - * @memberof async - * @namespace pickLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3 } - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3 } - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - var pickLimit = createPickLimit(true); - - /** - * @memberof async - * @namespace omit - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omit(array, iterator, function(err, res) { - * console.log(res); // { '2': 2, '3': 4 } - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omit(array, iterator, function(err, res) { - * console.log(res); // { '2': 2, '3': 4 } - * console.log(order); // [[0, 1], [2, 2], [3, 1], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omit(object, iterator, function(err, res) { - * console.log(res); // { c: 2, d: 4 } - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omit(object, iterator, function(err, res) { - * console.log(res); // { c: 2, d: 4 } - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b'], [4, 'd']] - * }); - * - */ - var omit = createPick(arrayEachIndexValue, baseEachKeyValue, symbolEachKeyValue, false); - - /** - * @memberof async - * @namespace omitSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitSeries(array, iterator, function(err, res) { - * console.log(res); // { '2': 2, '3': 4 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitSeries(array, iterator, function(err, res) { - * console.log(res); // { '2': 2, '3': 4 } - * console.log(order); // [[0, 1], [3, 1], [2, 2], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitSeries(object, iterator, function(err, res) { - * console.log(res); // { c: 2, d: 4 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitSeries(object, iterator, function(err, res) { - * console.log(res); // { c: 2, d: 4 } - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c'], [4, 'd']] - * }); - * - */ - var omitSeries = createPickSeries(false); - - /** - * @memberof async - * @namespace omitLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '3': 4, '4': 2 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '3': 4, '4': 2 } - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { d: 4, e: 2 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { d: 4, e: 2 } - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - var omitLimit = createPickLimit(false); - - /** - * @memberof async - * @namespace transform - * @param {Array|Object} collection - * @param {Array|Object|Function} [accumulator] - * @param {Function} [iterator] - * @param {Function} [callback] - * @example - * - * // array - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num) - * done(); - * }, num * 10); - * }; - * async.transform(collection, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4] - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // array with index and accumulator - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * result[index] = num; - * done(); - * }, num * 10); - * }; - * async.transform(collection, {}, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2, '3': 4 } - * console.log(order); // [[1, 0], [2, 2], [3, 1], [4, 3]] - * }); - * - * @example - * - * // object with accumulator - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num); - * done(); - * }, num * 10); - * }; - * async.transform(collection, [], iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4] - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * result[key] = num; - * done(); - * }, num * 10); - * }; - * async.transform(collection, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2, d: 4 } - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b'], [4, 'd']] - * }); - * - */ - var transform = createTransform(arrayEachResult, baseEachResult, symbolEachResult); - - /** - * @memberof async - * @namespace sortBy - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortBy(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.sortBy(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortBy(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.sortBy(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var sortBy = createSortBy(arrayEachIndexValue, baseEachIndexValue, symbolEachIndexValue); - - /** - * @memberof async - * @namespace concat - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concat(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, [num]); - * }, num * 10); - * }; - * async.concat(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concat(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, [num]); - * }, num * 10); - * }; - * async.concat(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var concat = createConcat(arrayEachIndex, baseEachIndex, symbolEachIndex); - - /** - * @memberof async - * @namespace groupBy - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [4.2, 6.4, 6.1]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBy(array, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.1, 6.4] } - * console.log(order); // [4.2, 6.1, 6.4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [4.2, 6.4, 6.1]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBy(array, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.1, 6.4] } - * console.log(order); // [[4.2, 0], [6.1, 2], [6.4, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 4.2, b: 6.4, c: 6.1 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBy(object, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.1, 6.4] } - * console.log(order); // [4.2, 6.1, 6.4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 4.2, b: 6.4, c: 6.1 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBy(object, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.1, 6.4] } - * console.log(order); // [[4.2, 'a'], [6.1, 'c'], [6.4, 'b']] - * }); - * - */ - var groupBy = createGroupBy(arrayEachValue, baseEachValue, symbolEachValue); - - /** - * @memberof async - * @namespace parallel - * @param {Array|Object} tasks - functions - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 30); - * }, - * function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 40); - * }, - * function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 20); - * } - * ]; - * async.parallel(tasks, function(err, res) { - * console.log(res); // [1, 2, 3, 4]; - * console.log(order); // [1, 4, 2, 3] - * }); - * - * @example - * - * var order = []; - * var tasks = { - * 'a': function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * 'b': function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 30); - * }, - * 'c': function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 40); - * }, - * 'd': function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 20); - * } - * }; - * async.parallel(tasks, function(err, res) { - * console.log(res); // { a: 1, b: 2, c: 3, d:4 } - * console.log(order); // [1, 4, 2, 3] - * }); - * - */ - var parallel = createParallel(arrayEachFunc, baseEachFunc); - - /** - * @memberof async - * @namespace applyEach - */ - var applyEach = createApplyEach(map); - - /** - * @memberof async - * @namespace applyEachSeries - */ - var applyEachSeries = createApplyEach(mapSeries); - - /** - * @memberof async - * @namespace log - */ - var log = createLogger('log'); - - /** - * @memberof async - * @namespace dir - */ - var dir = createLogger('dir'); - - /** - * @version 2.6.2 - * @namespace async - */ - var index = { - VERSION: '2.6.2', - - // Collections - each: each, - eachSeries: eachSeries, - eachLimit: eachLimit, - forEach: each, - forEachSeries: eachSeries, - forEachLimit: eachLimit, - eachOf: each, - eachOfSeries: eachSeries, - eachOfLimit: eachLimit, - forEachOf: each, - forEachOfSeries: eachSeries, - forEachOfLimit: eachLimit, - map: map, - mapSeries: mapSeries, - mapLimit: mapLimit, - mapValues: mapValues, - mapValuesSeries: mapValuesSeries, - mapValuesLimit: mapValuesLimit, - filter: filter, - filterSeries: filterSeries, - filterLimit: filterLimit, - select: filter, - selectSeries: filterSeries, - selectLimit: filterLimit, - reject: reject, - rejectSeries: rejectSeries, - rejectLimit: rejectLimit, - detect: detect, - detectSeries: detectSeries, - detectLimit: detectLimit, - find: detect, - findSeries: detectSeries, - findLimit: detectLimit, - pick: pick, - pickSeries: pickSeries, - pickLimit: pickLimit, - omit: omit, - omitSeries: omitSeries, - omitLimit: omitLimit, - reduce: reduce, - inject: reduce, - foldl: reduce, - reduceRight: reduceRight, - foldr: reduceRight, - transform: transform, - transformSeries: transformSeries, - transformLimit: transformLimit, - sortBy: sortBy, - sortBySeries: sortBySeries, - sortByLimit: sortByLimit, - some: some, - someSeries: someSeries, - someLimit: someLimit, - any: some, - anySeries: someSeries, - anyLimit: someLimit, - every: every, - everySeries: everySeries, - everyLimit: everyLimit, - all: every, - allSeries: everySeries, - allLimit: everyLimit, - concat: concat, - concatSeries: concatSeries, - concatLimit: concatLimit, - groupBy: groupBy, - groupBySeries: groupBySeries, - groupByLimit: groupByLimit, - - // Control Flow - parallel: parallel, - series: series, - parallelLimit: parallelLimit, - tryEach: tryEach, - waterfall: waterfall, - angelFall: angelFall, - angelfall: angelFall, - whilst: whilst, - doWhilst: doWhilst, - until: until, - doUntil: doUntil, - during: during, - doDuring: doDuring, - forever: forever, - compose: compose, - seq: seq, - applyEach: applyEach, - applyEachSeries: applyEachSeries, - queue: queue, - priorityQueue: priorityQueue, - cargo: cargo, - auto: auto, - autoInject: autoInject, - retry: retry, - retryable: retryable, - iterator: iterator, - times: times, - timesSeries: timesSeries, - timesLimit: timesLimit, - race: race, - - // Utils - apply: apply, - nextTick: asyncNextTick, - setImmediate: asyncSetImmediate, - memoize: memoize, - unmemoize: unmemoize, - ensureAsync: ensureAsync, - constant: constant, - asyncify: asyncify, - wrapSync: asyncify, - log: log, - dir: dir, - reflect: reflect, - reflectAll: reflectAll, - timeout: timeout, - createLogger: createLogger, - - // Mode - safe: safe, - fast: fast - }; - - exports['default'] = index; - baseEachSync( - index, - function(func, key) { - exports[key] = func; - }, - nativeKeys(index) - ); - - /** - * @private - */ - function createImmediate(safeMode) { - var delay = function delay(fn) { - var args = slice(arguments, 1); - setTimeout(function() { - fn.apply(null, args); - }); - }; - asyncSetImmediate = typeof setImmediate === func ? setImmediate : delay; - if (typeof process === obj && typeof process.nextTick === func) { - nextTick = /^v0.10/.test(process.version) ? asyncSetImmediate : process.nextTick; - asyncNextTick = /^v0/.test(process.version) ? asyncSetImmediate : process.nextTick; - } else { - asyncNextTick = nextTick = asyncSetImmediate; - } - if (safeMode === false) { - nextTick = function(cb) { - cb(); - }; - } - } - - /* sync functions based on lodash */ - - /** - * Converts `arguments` to an array. - * - * @private - * @param {Array} array = The array to slice. - */ - function createArray(array) { - var index = -1; - var size = array.length; - var result = Array(size); - - while (++index < size) { - result[index] = array[index]; - } - return result; - } - - /** - * Create an array from `start` - * - * @private - * @param {Array} array - The array to slice. - * @param {number} start - The start position. - */ - function slice(array, start) { - var end = array.length; - var index = -1; - var size = end - start; - if (size <= 0) { - return []; - } - var result = Array(size); - - while (++index < size) { - result[index] = array[index + start]; - } - return result; - } - - /** - * @private - * @param {Object} object - */ - function objectClone(object) { - var keys = nativeKeys(object); - var size = keys.length; - var index = -1; - var result = {}; - - while (++index < size) { - var key = keys[index]; - result[key] = object[key]; - } - return result; - } - - /** - * Create an array with all falsey values removed. - * - * @private - * @param {Array} array - The array to compact. - */ - function compact(array) { - var index = -1; - var size = array.length; - var result = []; - - while (++index < size) { - var value = array[index]; - if (value) { - result[result.length] = value; - } - } - return result; - } - - /** - * Create an array of reverse sequence. - * - * @private - * @param {Array} array - The array to reverse. - */ - function reverse(array) { - var index = -1; - var size = array.length; - var result = Array(size); - var resIndex = size; - - while (++index < size) { - result[--resIndex] = array[index]; - } - return result; - } - - /** - * Checks if key exists in object property. - * - * @private - * @param {Object} object - The object to inspect. - * @param {string} key - The key to check. - */ - function has(object, key) { - return object.hasOwnProperty(key); - } - - /** - * Check if target exists in array. - * @private - * @param {Array} array - * @param {*} target - */ - function notInclude(array, target) { - var index = -1; - var size = array.length; - - while (++index < size) { - if (array[index] === target) { - return false; - } - } - return true; - } - - /** - * @private - * @param {Array} array - The array to iterate over. - * @param {Function} iterator - The function invoked per iteration. - */ - function arrayEachSync(array, iterator) { - var index = -1; - var size = array.length; - - while (++index < size) { - iterator(array[index], index); - } - return array; - } - - /** - * @private - * @param {Object} object - The object to iterate over. - * @param {Function} iterator - The function invoked per iteration. - * @param {Array} keys - */ - function baseEachSync(object, iterator, keys) { - var index = -1; - var size = keys.length; - - while (++index < size) { - var key = keys[index]; - iterator(object[key], key); - } - return object; - } - - /** - * @private - * @param {number} n - * @param {Function} iterator - */ - function timesSync(n, iterator) { - var index = -1; - while (++index < n) { - iterator(index); - } - } - - /** - * @private - * @param {Array} array - * @param {number[]} criteria - */ - function sortByCriteria(array, criteria) { - var l = array.length; - var indices = Array(l); - var i; - for (i = 0; i < l; i++) { - indices[i] = i; - } - quickSort(criteria, 0, l - 1, indices); - var result = Array(l); - for (var n = 0; n < l; n++) { - i = indices[n]; - result[n] = i === undefined ? array[n] : array[i]; - } - return result; - } - - function partition(array, i, j, mid, indices) { - var l = i; - var r = j; - while (l <= r) { - i = l; - while (l < r && array[l] < mid) { - l++; - } - while (r >= i && array[r] >= mid) { - r--; - } - if (l > r) { - break; - } - swap(array, indices, l++, r--); - } - return l; - } - - function swap(array, indices, l, r) { - var n = array[l]; - array[l] = array[r]; - array[r] = n; - var i = indices[l]; - indices[l] = indices[r]; - indices[r] = i; - } - - function quickSort(array, i, j, indices) { - if (i === j) { - return; - } - var k = i; - while (++k <= j && array[i] === array[k]) { - var l = k - 1; - if (indices[l] > indices[k]) { - var index = indices[l]; - indices[l] = indices[k]; - indices[k] = index; - } - } - if (k > j) { - return; - } - var p = array[i] > array[k] ? i : k; - k = partition(array, i, j, array[p], indices); - quickSort(array, i, k - 1, indices); - quickSort(array, k, j, indices); - } - - /** - * @Private - */ - function makeConcatResult(array) { - var result = []; - arrayEachSync(array, function(value) { - if (value === noop) { - return; - } - if (isArray(value)) { - nativePush.apply(result, value); - } else { - result.push(value); - } - }); - return result; - } - - /* async functions */ - - /** - * @private - */ - function arrayEach(array, iterator, callback) { - var index = -1; - var size = array.length; - - if (iterator.length === 3) { - while (++index < size) { - iterator(array[index], index, onlyOnce(callback)); - } - } else { - while (++index < size) { - iterator(array[index], onlyOnce(callback)); - } - } - } - - /** - * @private - */ - function baseEach(object, iterator, callback, keys) { - var key; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - iterator(object[key], key, onlyOnce(callback)); - } - } else { - while (++index < size) { - iterator(object[keys[index]], onlyOnce(callback)); - } - } - } - - /** - * @private - */ - function symbolEach(collection, iterator, callback) { - var iter = collection[iteratorSymbol](); - var index = 0; - var item; - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - iterator(item.value, index++, onlyOnce(callback)); - } - } else { - while ((item = iter.next()).done === false) { - index++; - iterator(item.value, onlyOnce(callback)); - } - } - return index; - } - - /** - * @private - */ - function arrayEachResult(array, result, iterator, callback) { - var index = -1; - var size = array.length; - - if (iterator.length === 4) { - while (++index < size) { - iterator(result, array[index], index, onlyOnce(callback)); - } - } else { - while (++index < size) { - iterator(result, array[index], onlyOnce(callback)); - } - } - } - - /** - * @private - */ - function baseEachResult(object, result, iterator, callback, keys) { - var key; - var index = -1; - var size = keys.length; - - if (iterator.length === 4) { - while (++index < size) { - key = keys[index]; - iterator(result, object[key], key, onlyOnce(callback)); - } - } else { - while (++index < size) { - iterator(result, object[keys[index]], onlyOnce(callback)); - } - } - } - - /** - * @private - */ - function symbolEachResult(collection, result, iterator, callback) { - var item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 4) { - while ((item = iter.next()).done === false) { - iterator(result, item.value, index++, onlyOnce(callback)); - } - } else { - while ((item = iter.next()).done === false) { - index++; - iterator(result, item.value, onlyOnce(callback)); - } - } - return index; - } - - /** - * @private - */ - function arrayEachFunc(array, createCallback) { - var index = -1; - var size = array.length; - - while (++index < size) { - array[index](createCallback(index)); - } - } - - /** - * @private - */ - function baseEachFunc(object, createCallback, keys) { - var key; - var index = -1; - var size = keys.length; - - while (++index < size) { - key = keys[index]; - object[key](createCallback(key)); - } - } - - /** - * @private - */ - function arrayEachIndex(array, iterator, createCallback) { - var index = -1; - var size = array.length; - - if (iterator.length === 3) { - while (++index < size) { - iterator(array[index], index, createCallback(index)); - } - } else { - while (++index < size) { - iterator(array[index], createCallback(index)); - } - } - } - - /** - * @private - */ - function baseEachIndex(object, iterator, createCallback, keys) { - var key; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - iterator(object[key], key, createCallback(index)); - } - } else { - while (++index < size) { - iterator(object[keys[index]], createCallback(index)); - } - } - } - - /** - * @private - */ - function symbolEachIndex(collection, iterator, createCallback) { - var item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - iterator(item.value, index, createCallback(index++)); - } - } else { - while ((item = iter.next()).done === false) { - iterator(item.value, createCallback(index++)); - } - } - return index; - } - - /** - * @private - */ - function baseEachKey(object, iterator, createCallback, keys) { - var key; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - iterator(object[key], key, createCallback(key)); - } - } else { - while (++index < size) { - key = keys[index]; - iterator(object[key], createCallback(key)); - } - } - } - - /** - * @private - */ - function symbolEachKey(collection, iterator, createCallback) { - var item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - iterator(item.value, index, createCallback(index++)); - } - } else { - while ((item = iter.next()).done === false) { - iterator(item.value, createCallback(index++)); - } - } - return index; - } - - /** - * @private - */ - function arrayEachValue(array, iterator, createCallback) { - var value; - var index = -1; - var size = array.length; - - if (iterator.length === 3) { - while (++index < size) { - value = array[index]; - iterator(value, index, createCallback(value)); - } - } else { - while (++index < size) { - value = array[index]; - iterator(value, createCallback(value)); - } - } - } - - /** - * @private - */ - function baseEachValue(object, iterator, createCallback, keys) { - var key, value; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - value = object[key]; - iterator(value, key, createCallback(value)); - } - } else { - while (++index < size) { - value = object[keys[index]]; - iterator(value, createCallback(value)); - } - } - } - - /** - * @private - */ - function symbolEachValue(collection, iterator, createCallback) { - var value, item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, index++, createCallback(value)); - } - } else { - while ((item = iter.next()).done === false) { - index++; - value = item.value; - iterator(value, createCallback(value)); - } - } - return index; - } - - /** - * @private - */ - function arrayEachIndexValue(array, iterator, createCallback) { - var value; - var index = -1; - var size = array.length; - - if (iterator.length === 3) { - while (++index < size) { - value = array[index]; - iterator(value, index, createCallback(index, value)); - } - } else { - while (++index < size) { - value = array[index]; - iterator(value, createCallback(index, value)); - } - } - } - - /** - * @private - */ - function baseEachIndexValue(object, iterator, createCallback, keys) { - var key, value; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - value = object[key]; - iterator(value, key, createCallback(index, value)); - } - } else { - while (++index < size) { - value = object[keys[index]]; - iterator(value, createCallback(index, value)); - } - } - } - - /** - * @private - */ - function symbolEachIndexValue(collection, iterator, createCallback) { - var value, item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, index, createCallback(index++, value)); - } - } else { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, createCallback(index++, value)); - } - } - return index; - } - - /** - * @private - */ - function baseEachKeyValue(object, iterator, createCallback, keys) { - var key, value; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - value = object[key]; - iterator(value, key, createCallback(key, value)); - } - } else { - while (++index < size) { - key = keys[index]; - value = object[key]; - iterator(value, createCallback(key, value)); - } - } - } - - /** - * @private - */ - function symbolEachKeyValue(collection, iterator, createCallback) { - var value, item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, index, createCallback(index++, value)); - } - } else { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, createCallback(index++, value)); - } - } - return index; - } - - /** - * @private - * @param {Function} func - */ - function onlyOnce(func) { - return function(err, res) { - var fn = func; - func = throwError; - fn(err, res); - }; - } - - /** - * @private - * @param {Function} func - */ - function once(func) { - return function(err, res) { - var fn = func; - func = noop; - fn(err, res); - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - */ - function createEach(arrayEach, baseEach, symbolEach) { - return function each(collection, iterator, callback) { - callback = once(callback || noop); - var size, keys; - var completed = 0; - if (isArray(collection)) { - size = collection.length; - arrayEach(collection, iterator, done); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = symbolEach(collection, iterator, done); - size && size === completed && callback(null); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - baseEach(collection, iterator, done, keys); - } - if (!size) { - callback(null); - } - - function done(err, bool) { - if (err) { - callback = once(callback); - callback(err); - } else if (++completed === size) { - callback(null); - } else if (bool === false) { - callback = once(callback); - callback(null); - } - } - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createMap(arrayEach, baseEach, symbolEach, useArray) { - var init, clone; - if (useArray) { - init = Array; - clone = createArray; - } else { - init = function() { - return {}; - }; - clone = objectClone; - } - - return function(collection, iterator, callback) { - callback = callback || noop; - var size, keys, result; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = init(size); - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - // TODO: size could be changed - result = init(0); - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = init(size); - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null, init()); - } - - function createCallback(key) { - return function done(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - callback = once(callback); - callback(err, clone(result)); - return; - } - result[key] = res; - key = null; - if (++completed === size) { - callback(null, result); - } - }; - } - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - * @param {boolean} bool - */ - function createFilter(arrayEach, baseEach, symbolEach, bool) { - return function(collection, iterator, callback) { - callback = callback || noop; - var size, keys, result; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = Array(size); - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - result = []; - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, compact(result)); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = Array(size); - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - return callback(null, []); - } - - function createCallback(index, value) { - return function done(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - callback = once(callback); - callback(err); - return; - } - if (!!res === bool) { - result[index] = value; - } - index = null; - if (++completed === size) { - callback(null, compact(result)); - } - }; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createFilterSeries(bool) { - return function(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, iterate; - var sync = false; - var completed = 0; - var result = []; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, []); - } - iterate(); - - function arrayIterator() { - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, completed, done); - } - - function objectIterator() { - key = keys[completed]; - value = collection[key]; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - iterator(value, key, done); - } - - function done(err, res) { - if (err) { - callback(err); - return; - } - if (!!res === bool) { - result[result.length] = value; - } - if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createFilterLimit(bool) { - return function(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, keys, iter, item, iterate, result; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - result = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, []); - } - result = result || Array(size); - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, createCallback(value, index)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value, index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, compact(result)); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, started, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, compact(result)); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - value = collection[keys[index]]; - iterator(value, createCallback(value, index)); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - value = collection[key]; - iterator(value, key, createCallback(value, index)); - } - } - - function createCallback(value, index) { - return function(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - iterate = noop; - callback = once(callback); - callback(err); - return; - } - if (!!res === bool) { - result[index] = value; - } - index = null; - if (++completed === size) { - callback = onlyOnce(callback); - callback(null, compact(result)); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - }; - } - - /** - * @memberof async - * @namespace eachSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.eachSeries(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(); - * }, num * 10); - * }; - * async.eachSeries(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.eachSeries(object, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(); - * }, num * 10); - * }; - * async.eachSeries(object, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'b']] - * }); - * - * @example - * - * // break - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num !== 3); - * }, num * 10); - * }; - * async.eachSeries(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3] - * }); - */ - function eachSeries(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, keys, iter, item, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null); - } - iterate(); - - function arrayIterator() { - iterator(collection[completed], done); - } - - function arrayIteratorWithIndex() { - iterator(collection[completed], completed, done); - } - - function symbolIterator() { - item = iter.next(); - item.done ? callback(null) : iterator(item.value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - item.done ? callback(null) : iterator(item.value, completed, done); - } - - function objectIterator() { - iterator(collection[keys[completed]], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(collection[key], key, done); - } - - function done(err, bool) { - if (err) { - callback(err); - } else if (++completed === size || bool === false) { - iterate = throwError; - callback(null); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace eachLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.eachLimit(array, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(); - * }, num * 10); - * }; - * async.eachLimit(array, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.eachLimit(object, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(); - * }, num * 10); - * }; - * async.eachLimit(object, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - * @example - * - * // break - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num !== 5); - * }, num * 10); - * }; - * async.eachLimit(array, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 5] - * }); - * - */ - function eachLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, keys, iter, item, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } else { - return callback(null); - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - if (started < size) { - iterator(collection[started++], done); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - iterator(collection[index], index, done); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - started++; - iterator(item.value, done); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, started++, done); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null); - } - } - - function objectIterator() { - if (started < size) { - iterator(collection[keys[started++]], done); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(collection[key], key, done); - } - } - - function done(err, bool) { - if (err || bool === false) { - iterate = noop; - callback = once(callback); - callback(err); - } else if (++completed === size) { - iterator = noop; - iterate = throwError; - callback = onlyOnce(callback); - callback(null); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace mapSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - function mapSeries(collection, iterator, callback) { - callback = callback || noop; - var size, key, keys, iter, item, result, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - result = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, []); - } - result = result || Array(size); - iterate(); - - function arrayIterator() { - iterator(collection[completed], done); - } - - function arrayIteratorWithIndex() { - iterator(collection[completed], completed, done); - } - - function symbolIterator() { - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, completed, done); - } - - function objectIterator() { - iterator(collection[keys[completed]], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(collection[key], key, done); - } - - function done(err, res) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err, createArray(result)); - return; - } - result[completed] = res; - if (++completed === size) { - iterate = throwError; - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace mapLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3, 4, 2] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3, 4, 2] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3, 4, 2] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3, 4, 2] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function mapLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, keys, iter, item, result, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - result = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, []); - } - result = result || Array(size); - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - iterator(collection[index], createCallback(index)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - iterator(collection[index], index, createCallback(index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, started, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - iterator(collection[keys[index]], createCallback(index)); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(collection[key], key, createCallback(index)); - } - } - - function createCallback(index) { - return function(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - iterate = noop; - callback = once(callback); - callback(err, createArray(result)); - return; - } - result[index] = res; - index = null; - if (++completed === size) { - iterate = throwError; - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @memberof async - * @namespace mapValuesSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesSeries(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2 } - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesSeries(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2 } - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesSeries(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2 } - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesSeries(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2 } - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - function mapValuesSeries(collection, iterator, callback) { - callback = callback || noop; - var size, key, keys, iter, item, iterate; - var sync = false; - var result = {}; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, result); - } - iterate(); - - function arrayIterator() { - key = completed; - iterator(collection[completed], done); - } - - function arrayIteratorWithIndex() { - key = completed; - iterator(collection[completed], completed, done); - } - - function symbolIterator() { - key = completed; - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, done); - } - - function symbolIteratorWithKey() { - key = completed; - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, completed, done); - } - - function objectIterator() { - key = keys[completed]; - iterator(collection[key], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(collection[key], key, done); - } - - function done(err, res) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err, objectClone(result)); - return; - } - result[key] = res; - if (++completed === size) { - iterate = throwError; - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace mapValuesLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3, '3': 4, '4': 2 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3, '3': 4, '4': 2 } - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3, d: 4, e: 2 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3, d: 4, e: 2 } - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function mapValuesLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, keys, iter, item, iterate; - var sync = false; - var result = {}; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, result); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - iterator(collection[index], createCallback(index)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - iterator(collection[index], index, createCallback(index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, started, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(collection[key], createCallback(key)); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(collection[key], key, createCallback(key)); - } - } - - function createCallback(key) { - return function(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - iterate = noop; - callback = once(callback); - callback(err, objectClone(result)); - return; - } - result[key] = res; - key = null; - if (++completed === size) { - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - * @param {boolean} bool - */ - function createDetect(arrayEach, baseEach, symbolEach, bool) { - return function(collection, iterator, callback) { - callback = callback || noop; - var size, keys; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null); - } - - function createCallback(value) { - var called = false; - return function done(err, res) { - if (called) { - throwError(); - } - called = true; - if (err) { - callback = once(callback); - callback(err); - } else if (!!res === bool) { - callback = once(callback); - callback(null, value); - } else if (++completed === size) { - callback(null); - } - }; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createDetectSeries(bool) { - return function(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null); - } - iterate(); - - function arrayIterator() { - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - item = iter.next(); - value = item.value; - item.done ? callback(null) : iterator(value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - value = item.value; - item.done ? callback(null) : iterator(value, completed, done); - } - - function objectIterator() { - value = collection[keys[completed]]; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - iterator(value, key, done); - } - - function done(err, res) { - if (err) { - callback(err); - } else if (!!res === bool) { - iterate = throwError; - callback(null, value); - } else if (++completed === size) { - iterate = throwError; - callback(null); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createDetectLimit(bool) { - return function(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, keys, iter, item, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, createCallback(value)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - started++; - value = item.value; - iterator(value, createCallback(value)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, started++, createCallback(value)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - value = collection[keys[index]]; - iterator(value, createCallback(value)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started++]; - value = collection[key]; - iterator(value, key, createCallback(value)); - } - } - - function createCallback(value) { - var called = false; - return function(err, res) { - if (called) { - throwError(); - } - called = true; - if (err) { - iterate = noop; - callback = once(callback); - callback(err); - } else if (!!res === bool) { - iterate = noop; - callback = once(callback); - callback(null, value); - } else if (++completed === size) { - callback(null); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - * @param {boolean} bool - */ - function createPick(arrayEach, baseEach, symbolEach, bool) { - return function(collection, iterator, callback) { - callback = callback || noop; - var size, keys; - var completed = 0; - var result = {}; - - if (isArray(collection)) { - size = collection.length; - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - return callback(null, {}); - } - - function createCallback(key, value) { - return function done(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - callback = once(callback); - callback(err, objectClone(result)); - return; - } - if (!!res === bool) { - result[key] = value; - } - key = null; - if (++completed === size) { - callback(null, result); - } - }; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createPickSeries(bool) { - return function(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, iterate; - var sync = false; - var result = {}; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, {}); - } - iterate(); - - function arrayIterator() { - key = completed; - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - key = completed; - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - key = completed; - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, done); - } - - function symbolIteratorWithKey() { - key = completed; - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, key, done); - } - - function objectIterator() { - key = keys[completed]; - value = collection[key]; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - iterator(value, key, done); - } - - function done(err, res) { - if (err) { - callback(err, result); - return; - } - if (!!res === bool) { - result[key] = value; - } - if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createPickLimit(bool) { - return function(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, keys, iter, item, iterate; - var sync = false; - var result = {}; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, {}); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, createCallback(value, index)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value, index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, started, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - if (started < size) { - key = keys[started++]; - value = collection[key]; - iterator(value, createCallback(value, key)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started++]; - value = collection[key]; - iterator(value, key, createCallback(value, key)); - } - } - - function createCallback(value, key) { - return function(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - iterate = noop; - callback = once(callback); - callback(err, objectClone(result)); - return; - } - if (!!res === bool) { - result[key] = value; - } - key = null; - if (++completed === size) { - iterate = throwError; - callback = onlyOnce(callback); - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - }; - } - - /** - * @memberof async - * @namespace reduce - * @param {Array|Object} collection - * @param {*} result - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduce(collection, 0, iterator, function(err, res) { - * console.log(res); // 10 - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduce(collection, '', iterator, function(err, res) { - * console.log(res); // '1324' - * console.log(order); // [[1, 0], [3, 1], [2, 2], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduce(collection, '', iterator, function(err, res) { - * console.log(res); // '1324' - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduce(collection, 0, iterator, function(err, res) { - * console.log(res); // 10 - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'b'], [4, 'd']] - * }); - * - */ - function reduce(collection, result, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, keys, iter, item, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 4 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 4 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, result); - } - iterate(result); - - function arrayIterator(result) { - iterator(result, collection[completed], done); - } - - function arrayIteratorWithIndex(result) { - iterator(result, collection[completed], completed, done); - } - - function symbolIterator(result) { - item = iter.next(); - item.done ? callback(null, result) : iterator(result, item.value, done); - } - - function symbolIteratorWithKey(result) { - item = iter.next(); - item.done ? callback(null, result) : iterator(result, item.value, completed, done); - } - - function objectIterator(result) { - iterator(result, collection[keys[completed]], done); - } - - function objectIteratorWithKey(result) { - key = keys[completed]; - iterator(result, collection[key], key, done); - } - - function done(err, result) { - if (err) { - callback(err, result); - } else if (++completed === size) { - iterator = throwError; - callback(null, result); - } else if (sync) { - nextTick(function() { - iterate(result); - }); - } else { - sync = true; - iterate(result); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace reduceRight - * @param {Array|Object} collection - * @param {*} result - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduceRight(collection, 0, iterator, function(err, res) { - * console.log(res); // 10 - * console.log(order); // [4, 2, 3, 1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduceRight(collection, '', iterator, function(err, res) { - * console.log(res); // '4231' - * console.log(order); // [[4, 3], [2, 2], [3, 1], [1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduceRight(collection, '', iterator, function(err, res) { - * console.log(res); // '4231' - * console.log(order); // [4, 2, 3, 1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduceRight(collection, 0, iterator, function(err, res) { - * console.log(res); // 10 - * console.log(order); // [[4, 3], [2, 2], [3, 1], [1, 0]] - * }); - * - */ - function reduceRight(collection, result, iterator, callback) { - callback = onlyOnce(callback || noop); - var resIndex, index, key, keys, iter, item, col, iterate; - var sync = false; - - if (isArray(collection)) { - resIndex = collection.length; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - col = []; - iter = collection[iteratorSymbol](); - index = -1; - while ((item = iter.next()).done === false) { - col[++index] = item.value; - } - collection = col; - resIndex = col.length; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - resIndex = keys.length; - iterate = iterator.length === 4 ? objectIteratorWithKey : objectIterator; - } - if (!resIndex) { - return callback(null, result); - } - iterate(result); - - function arrayIterator(result) { - iterator(result, collection[--resIndex], done); - } - - function arrayIteratorWithIndex(result) { - iterator(result, collection[--resIndex], resIndex, done); - } - - function objectIterator(result) { - iterator(result, collection[keys[--resIndex]], done); - } - - function objectIteratorWithKey(result) { - key = keys[--resIndex]; - iterator(result, collection[key], key, done); - } - - function done(err, result) { - if (err) { - callback(err, result); - } else if (resIndex === 0) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(function() { - iterate(result); - }); - } else { - sync = true; - iterate(result); - } - sync = false; - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createTransform(arrayEach, baseEach, symbolEach) { - return function transform(collection, accumulator, iterator, callback) { - if (arguments.length === 3) { - callback = iterator; - iterator = accumulator; - accumulator = undefined; - } - callback = callback || noop; - var size, keys, result; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = accumulator !== undefined ? accumulator : []; - arrayEach(collection, result, iterator, done); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - result = accumulator !== undefined ? accumulator : {}; - size = symbolEach(collection, result, iterator, done); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = accumulator !== undefined ? accumulator : {}; - baseEach(collection, result, iterator, done, keys); - } - if (!size) { - callback(null, accumulator !== undefined ? accumulator : result || {}); - } - - function done(err, bool) { - if (err) { - callback = once(callback); - callback(err, isArray(result) ? createArray(result) : objectClone(result)); - } else if (++completed === size) { - callback(null, result); - } else if (bool === false) { - callback = once(callback); - callback(null, isArray(result) ? createArray(result) : objectClone(result)); - } - } - }; - } - - /** - * @memberof async - * @namespace transformSeries - * @param {Array|Object} collection - * @param {Array|Object|Function} [accumulator] - * @param {Function} [iterator] - * @param {Function} [callback] - * @example - * - * // array - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num) - * done(); - * }, num * 10); - * }; - * async.transformSeries(collection, iterator, function(err, res) { - * console.log(res); // [1, 3, 2, 4] - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // array with index and accumulator - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * result[index] = num; - * done(); - * }, num * 10); - * }; - * async.transformSeries(collection, {}, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2, '3': 4 } - * console.log(order); // [[1, 0], [3, 1], [2, 2], [4, 3]] - * }); - * - * @example - * - * // object with accumulator - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num); - * done(); - * }, num * 10); - * }; - * async.transformSeries(collection, [], iterator, function(err, res) { - * console.log(res); // [1, 3, 2, 4] - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * result[key] = num; - * done(); - * }, num * 10); - * }; - * async.transformSeries(collection, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2, d: 4 } - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'b'], [4, 'd']] - * }); - * - */ - function transformSeries(collection, accumulator, iterator, callback) { - if (arguments.length === 3) { - callback = iterator; - iterator = accumulator; - accumulator = undefined; - } - callback = onlyOnce(callback || noop); - var size, key, keys, iter, item, iterate, result; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = accumulator !== undefined ? accumulator : []; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - result = accumulator !== undefined ? accumulator : {}; - iterate = iterator.length === 4 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = accumulator !== undefined ? accumulator : {}; - iterate = iterator.length === 4 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, accumulator !== undefined ? accumulator : result || {}); - } - iterate(); - - function arrayIterator() { - iterator(result, collection[completed], done); - } - - function arrayIteratorWithIndex() { - iterator(result, collection[completed], completed, done); - } - - function symbolIterator() { - item = iter.next(); - item.done ? callback(null, result) : iterator(result, item.value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - item.done ? callback(null, result) : iterator(result, item.value, completed, done); - } - - function objectIterator() { - iterator(result, collection[keys[completed]], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(result, collection[key], key, done); - } - - function done(err, bool) { - if (err) { - callback(err, result); - } else if (++completed === size || bool === false) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace transformLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Array|Object|Function} [accumulator] - * @param {Function} [iterator] - * @param {Function} [callback] - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num); - * done(); - * }, num * 10); - * }; - * async.transformLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index and accumulator - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * result[index] = key; - * done(); - * }, num * 10); - * }; - * async.transformLimit(array, 2, {}, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3, '3': 4, '4': 2 } - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object with accumulator - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num); - * done(); - * }, num * 10); - * }; - * async.transformLimit(object, 2, [], iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * result[key] = num; - * done(); - * }, num * 10); - * }; - * async.transformLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function transformLimit(collection, limit, accumulator, iterator, callback) { - if (arguments.length === 4) { - callback = iterator; - iterator = accumulator; - accumulator = undefined; - } - callback = callback || noop; - var size, index, key, keys, iter, item, iterate, result; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = accumulator !== undefined ? accumulator : []; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - result = accumulator !== undefined ? accumulator : {}; - iterate = iterator.length === 4 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = accumulator !== undefined ? accumulator : {}; - iterate = iterator.length === 4 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, accumulator !== undefined ? accumulator : result || {}); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - iterator(result, collection[index], onlyOnce(done)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - iterator(result, collection[index], index, onlyOnce(done)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - started++; - iterator(result, item.value, onlyOnce(done)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(result, item.value, started++, onlyOnce(done)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - iterator(result, collection[keys[index]], onlyOnce(done)); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(result, collection[key], key, onlyOnce(done)); - } - } - - function done(err, bool) { - if (err || bool === false) { - iterate = noop; - callback(err || null, isArray(result) ? createArray(result) : objectClone(result)); - callback = noop; - } else if (++completed === size) { - iterator = noop; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @private - * @param {function} arrayEach - * @param {function} baseEach - * @param {function} symbolEach - */ - function createSortBy(arrayEach, baseEach, symbolEach) { - return function sortBy(collection, iterator, callback) { - callback = callback || noop; - var size, array, criteria; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - array = Array(size); - criteria = Array(size); - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - array = []; - criteria = []; - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, sortByCriteria(array, criteria)); - } else if (typeof collection === obj) { - var keys = nativeKeys(collection); - size = keys.length; - array = Array(size); - criteria = Array(size); - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null, []); - } - - function createCallback(index, value) { - var called = false; - array[index] = value; - return function done(err, criterion) { - if (called) { - throwError(); - } - called = true; - criteria[index] = criterion; - if (err) { - callback = once(callback); - callback(err); - } else if (++completed === size) { - callback(null, sortByCriteria(array, criteria)); - } - }; - } - }; - } - - /** - * @memberof async - * @namespace sortBySeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortBySeries(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.sortBySeries(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortBySeries(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.sortBySeries(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - function sortBySeries(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, array, criteria, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - array = collection; - criteria = Array(size); - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - array = []; - criteria = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - array = Array(size); - criteria = Array(size); - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, []); - } - iterate(); - - function arrayIterator() { - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - item = iter.next(); - if (item.done) { - return callback(null, sortByCriteria(array, criteria)); - } - value = item.value; - array[completed] = value; - iterator(value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done) { - return callback(null, sortByCriteria(array, criteria)); - } - value = item.value; - array[completed] = value; - iterator(value, completed, done); - } - - function objectIterator() { - value = collection[keys[completed]]; - array[completed] = value; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - array[completed] = value; - iterator(value, key, done); - } - - function done(err, criterion) { - criteria[completed] = criterion; - if (err) { - callback(err); - } else if (++completed === size) { - iterate = throwError; - callback(null, sortByCriteria(array, criteria)); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace sortByLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortByLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4, 5] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.sortByLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4, 5] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortByLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4, 5] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.sortByLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4, 5] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function sortByLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, array, keys, iter, item, criteria, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - array = collection; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - array = []; - criteria = []; - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - array = Array(size); - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, []); - } - criteria = criteria || Array(size); - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - if (started < size) { - value = collection[started]; - iterator(value, createCallback(value, started++)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value, index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - value = item.value; - array[started] = value; - iterator(value, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, sortByCriteria(array, criteria)); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - array[started] = value; - iterator(value, started, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, sortByCriteria(array, criteria)); - } - } - - function objectIterator() { - if (started < size) { - value = collection[keys[started]]; - array[started] = value; - iterator(value, createCallback(value, started++)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started]; - value = collection[key]; - array[started] = value; - iterator(value, key, createCallback(value, started++)); - } - } - - function createCallback(value, index) { - var called = false; - return function(err, criterion) { - if (called) { - throwError(); - } - called = true; - criteria[index] = criterion; - if (err) { - iterate = noop; - callback(err); - callback = noop; - } else if (++completed === size) { - callback(null, sortByCriteria(array, criteria)); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @memberof async - * @namespace some - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.some(array, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.some(array, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.some(object, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.some(object, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 'a']] - * }); - * - */ - function some(collection, iterator, callback) { - callback = callback || noop; - detect(collection, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !!res); - } - } - - /** - * @memberof async - * @namespace someSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someSeries(array, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someSeries(array, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someSeries(object, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someSeries(object, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 'a']] - * }); - * - */ - function someSeries(collection, iterator, callback) { - callback = callback || noop; - detectSeries(collection, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !!res); - } - } - - /** - * @memberof async - * @namespace someLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someLimit(array, 2, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someLimit(array, 2, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someLimit(object, 2, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someLimit(object, 2, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 'a']] - * }); - * - */ - function someLimit(collection, limit, iterator, callback) { - callback = callback || noop; - detectLimit(collection, limit, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !!res); - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createEvery(arrayEach, baseEach, symbolEach) { - var deny = createDetect(arrayEach, baseEach, symbolEach, false); - - return function every(collection, iterator, callback) { - callback = callback || noop; - deny(collection, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !res); - } - }; - } - - /** - * @private - */ - function createEverySeries() { - var denySeries = createDetectSeries(false); - - return function everySeries(collection, iterator, callback) { - callback = callback || noop; - denySeries(collection, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !res); - } - }; - } - - /** - * @private - */ - function createEveryLimit() { - var denyLimit = createDetectLimit(false); - - return function everyLimit(collection, limit, iterator, callback) { - callback = callback || noop; - denyLimit(collection, limit, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !res); - } - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createConcat(arrayEach, baseEach, symbolEach) { - return function concat(collection, iterator, callback) { - callback = callback || noop; - var size, result; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = Array(size); - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - result = []; - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - var keys = nativeKeys(collection); - size = keys.length; - result = Array(size); - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null, []); - } - - function createCallback(index) { - return function done(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - callback = once(callback); - arrayEachSync(result, function(array, index) { - if (array === undefined) { - result[index] = noop; - } - }); - callback(err, makeConcatResult(result)); - return; - } - switch (arguments.length) { - case 0: - case 1: - result[index] = noop; - break; - case 2: - result[index] = res; - break; - default: - result[index] = slice(arguments, 1); - break; - } - index = null; - if (++completed === size) { - callback(null, makeConcatResult(result)); - } - }; - } - }; - } - - /** - * @memberof async - * @namespace concatSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - function concatSeries(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, keys, iter, item, iterate; - var sync = false; - var result = []; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, result); - } - iterate(); - - function arrayIterator() { - iterator(collection[completed], done); - } - - function arrayIteratorWithIndex() { - iterator(collection[completed], completed, done); - } - - function symbolIterator() { - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, completed, done); - } - - function objectIterator() { - iterator(collection[keys[completed]], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(collection[key], key, done); - } - - function done(err, array) { - if (isArray(array)) { - nativePush.apply(result, array); - } else if (arguments.length >= 2) { - nativePush.apply(result, slice(arguments, 1)); - } - if (err) { - callback(err, result); - } else if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace concatLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, [num]); - * }, num * 10); - * }; - * async.cocnatLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.cocnatLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function concatLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, key, iter, item, iterate, result; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - result = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - var keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, []); - } - result = result || Array(size); - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - if (started < size) { - iterator(collection[started], createCallback(started++)); - } - } - - function arrayIteratorWithIndex() { - if (started < size) { - iterator(collection[started], started, createCallback(started++)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, makeConcatResult(result)); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, started, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, makeConcatResult(result)); - } - } - - function objectIterator() { - if (started < size) { - iterator(collection[keys[started]], createCallback(started++)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started]; - iterator(collection[key], key, createCallback(started++)); - } - } - - function createCallback(index) { - return function(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - iterate = noop; - callback = once(callback); - arrayEachSync(result, function(array, index) { - if (array === undefined) { - result[index] = noop; - } - }); - callback(err, makeConcatResult(result)); - return; - } - switch (arguments.length) { - case 0: - case 1: - result[index] = noop; - break; - case 2: - result[index] = res; - break; - default: - result[index] = slice(arguments, 1); - break; - } - index = null; - if (++completed === size) { - iterate = throwError; - callback(null, makeConcatResult(result)); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createGroupBy(arrayEach, baseEach, symbolEach) { - return function groupBy(collection, iterator, callback) { - callback = callback || noop; - var size; - var completed = 0; - var result = {}; - - if (isArray(collection)) { - size = collection.length; - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - var keys = nativeKeys(collection); - size = keys.length; - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null, {}); - } - - function createCallback(value) { - var called = false; - return function done(err, key) { - if (called) { - throwError(); - } - called = true; - if (err) { - callback = once(callback); - callback(err, objectClone(result)); - return; - } - var array = result[key]; - if (!array) { - result[key] = [value]; - } else { - array.push(value); - } - if (++completed === size) { - callback(null, result); - } - }; - } - }; - } - - /** - * @memberof async - * @namespace groupBySeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [4.2, 6.4, 6.1]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBySeries(array, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.4, 6.1] } - * console.log(order); // [4.2, 6.4, 6.1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [4.2, 6.4, 6.1]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBySeries(array, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.4, 6.1] } - * console.log(order); // [[4.2, 0], [6.4, 1], [6.1, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 4.2, b: 6.4, c: 6.1 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBySeries(object, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.4, 6.1] } - * console.log(order); // [4.2, 6.4, 6.1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 4.2, b: 6.4, c: 6.1 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBySeries(object, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.4, 6.1] } - * console.log(order); // [[4.2, 'a'], [6.4, 'b'], [6.1, 'c']] - * }); - * - */ - function groupBySeries(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, iterate; - var sync = false; - var completed = 0; - var result = {}; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, result); - } - iterate(); - - function arrayIterator() { - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, completed, done); - } - - function objectIterator() { - value = collection[keys[completed]]; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - iterator(value, key, done); - } - - function done(err, key) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err, objectClone(result)); - return; - } - var array = result[key]; - if (!array) { - result[key] = [value]; - } else { - array.push(value); - } - if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace groupByLimit - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1.1, 5.9, 3.2, 3.9, 2.1]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupByLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '1': [1.1], '3': [3.2, 3.9], '5': [5.9], '2': [2.1] } - * console.log(order); // [1.1, 3.2, 5.9, 2.1, 3.9] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1.1, 5.9, 3.2, 3.9, 2.1]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupByLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '1': [1.1], '3': [3.2, 3.9], '5': [5.9], '2': [2.1] } - * console.log(order); // [[1.1, 0], [3.2, 2], [5.9, 1], [2.1, 4], [3.9, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1.1, b: 5.9, c: 3.2, d: 3.9, e: 2.1 } - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupByLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { '1': [1.1], '3': [3.2, 3.9], '5': [5.9], '2': [2.1] } - * console.log(order); // [1.1, 3.2, 5.9, 2.1, 3.9] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1.1, b: 5.9, c: 3.2, d: 3.9, e: 2.1 } - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupByLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { '1': [1.1], '3': [3.2, 3.9], '5': [5.9], '2': [2.1] } - * console.log(order); // [[1.1, 'a'], [3.2, 'c'], [5.9, 'b'], [2.1, 'e'], [3.9, 'd']] - * }); - * - */ - function groupByLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, keys, iter, item, iterate; - var sync = false; - var started = 0; - var completed = 0; - var result = {}; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, result); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - if (started < size) { - value = collection[started++]; - iterator(value, createCallback(value)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - started++; - value = item.value; - iterator(value, createCallback(value)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, started++, createCallback(value)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - if (started < size) { - value = collection[keys[started++]]; - iterator(value, createCallback(value)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started++]; - value = collection[key]; - iterator(value, key, createCallback(value)); - } - } - - function createCallback(value) { - var called = false; - return function(err, key) { - if (called) { - throwError(); - } - called = true; - if (err) { - iterate = noop; - callback = once(callback); - callback(err, objectClone(result)); - return; - } - var array = result[key]; - if (!array) { - result[key] = [value]; - } else { - array.push(value); - } - if (++completed === size) { - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - */ - function createParallel(arrayEach, baseEach) { - return function parallel(tasks, callback) { - callback = callback || noop; - var size, keys, result; - var completed = 0; - - if (isArray(tasks)) { - size = tasks.length; - result = Array(size); - arrayEach(tasks, createCallback); - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - result = {}; - baseEach(tasks, createCallback, keys); - } - if (!size) { - callback(null, result); - } - - function createCallback(key) { - return function(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - callback = once(callback); - callback(err, result); - return; - } - result[key] = arguments.length <= 2 ? res : slice(arguments, 1); - key = null; - if (++completed === size) { - callback(null, result); - } - }; - } - }; - } - - /** - * @memberof async - * @namespace series - * @param {Array|Object} tasks - functions - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 30); - * }, - * function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 40); - * }, - * function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 20); - * } - * ]; - * async.series(tasks, function(err, res) { - * console.log(res); // [1, 2, 3, 4]; - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * var order = []; - * var tasks = { - * 'a': function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * 'b': function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 30); - * }, - * 'c': function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 40); - * }, - * 'd': function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 20); - * } - * }; - * async.series(tasks, function(err, res) { - * console.log(res); // { a: 1, b: 2, c: 3, d:4 } - * console.log(order); // [1, 4, 2, 3] - * }); - * - */ - function series(tasks, callback) { - callback = callback || noop; - var size, key, keys, result, iterate; - var sync = false; - var completed = 0; - - if (isArray(tasks)) { - size = tasks.length; - result = Array(size); - iterate = arrayIterator; - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - result = {}; - iterate = objectIterator; - } else { - return callback(null); - } - if (!size) { - return callback(null, result); - } - iterate(); - - function arrayIterator() { - key = completed; - tasks[completed](done); - } - - function objectIterator() { - key = keys[completed]; - tasks[key](done); - } - - function done(err, res) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err, result); - return; - } - result[key] = arguments.length <= 2 ? res : slice(arguments, 1); - if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace parallelLimit - * @param {Array|Object} tasks - functions - * @param {number} limit - limit >= 1 - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 50); - * }, - * function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 30); - * }, - * function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 40); - * } - * ]; - * async.parallelLimit(tasks, 2, function(err, res) { - * console.log(res); // [1, 2, 3, 4]; - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * var order = []; - * var tasks = { - * 'a': function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * 'b': function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 50); - * }, - * 'c': function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 20); - * }, - * 'd': function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 40); - * } - * }; - * async.parallelLimit(tasks, 2, function(err, res) { - * console.log(res); // { a: 1, b: 2, c: 3, d:4 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - */ - function parallelLimit(tasks, limit, callback) { - callback = callback || noop; - var size, index, key, keys, result, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(tasks)) { - size = tasks.length; - result = Array(size); - iterate = arrayIterator; - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - result = {}; - iterate = objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, result); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - tasks[index](createCallback(index)); - } - } - - function objectIterator() { - if (started < size) { - key = keys[started++]; - tasks[key](createCallback(key)); - } - } - - function createCallback(key) { - return function(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - iterate = noop; - callback = once(callback); - callback(err, result); - return; - } - result[key] = arguments.length <= 2 ? res : slice(arguments, 1); - key = null; - if (++completed === size) { - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @memberof async - * @namespace tryEach - * @param {Array|Object} tasks - functions - * @param {Function} callback - * @example - * - * var tasks = [ - * function(done) { - * setTimeout(function() { - * done(new Error('error')); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * done(null, 2); - * }, 10); - * } - * ]; - * async.tryEach(tasks, function(err, res) { - * console.log(res); // 2 - * }); - * - * @example - * - * var tasks = [ - * function(done) { - * setTimeout(function() { - * done(new Error('error1')); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * done(new Error('error2'); - * }, 10); - * } - * ]; - * async.tryEach(tasks, function(err, res) { - * console.log(err); // error2 - * console.log(res); // undefined - * }); - * - */ - function tryEach(tasks, callback) { - callback = callback || noop; - var size, keys, iterate; - var sync = false; - var completed = 0; - - if (isArray(tasks)) { - size = tasks.length; - iterate = arrayIterator; - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - iterate = objectIterator; - } - if (!size) { - return callback(null); - } - iterate(); - - function arrayIterator() { - tasks[completed](done); - } - - function objectIterator() { - tasks[keys[completed]](done); - } - - function done(err, res) { - if (!err) { - if (arguments.length <= 2) { - callback(null, res); - } else { - callback(null, slice(arguments, 1)); - } - } else if (++completed === size) { - callback(err); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * check for waterfall tasks - * @private - * @param {Array} tasks - * @param {Function} callback - * @return {boolean} - */ - function checkWaterfallTasks(tasks, callback) { - if (!isArray(tasks)) { - callback(new Error('First argument to waterfall must be an array of functions')); - return false; - } - if (tasks.length === 0) { - callback(null); - return false; - } - return true; - } - - /** - * check for waterfall tasks - * @private - * @param {function} func - * @param {Array|Object} args - arguments - * @return {function} next - */ - function waterfallIterator(func, args, next) { - switch (args.length) { - case 0: - case 1: - return func(next); - case 2: - return func(args[1], next); - case 3: - return func(args[1], args[2], next); - case 4: - return func(args[1], args[2], args[3], next); - case 5: - return func(args[1], args[2], args[3], args[4], next); - case 6: - return func(args[1], args[2], args[3], args[4], args[5], next); - default: - args = slice(args, 1); - args.push(next); - return func.apply(null, args); - } - } - - /** - * @memberof async - * @namespace waterfall - * @param {Array} tasks - functions - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(next) { - * setTimeout(function() { - * order.push(1); - * next(null, 1); - * }, 10); - * }, - * function(arg1, next) { - * setTimeout(function() { - * order.push(2); - * next(null, 1, 2); - * }, 30); - * }, - * function(arg1, arg2, next) { - * setTimeout(function() { - * order.push(3); - * next(null, 3); - * }, 20); - * }, - * function(arg1, next) { - * setTimeout(function() { - * order.push(4); - * next(null, 1, 2, 3, 4); - * }, 40); - * } - * ]; - * async.waterfall(tasks, function(err, arg1, arg2, arg3, arg4) { - * console.log(arg1, arg2, arg3, arg4); // 1 2 3 4 - * }); - * - */ - function waterfall(tasks, callback) { - callback = callback || noop; - if (!checkWaterfallTasks(tasks, callback)) { - return; - } - var func, args, done, sync; - var completed = 0; - var size = tasks.length; - waterfallIterator(tasks[0], [], createCallback(0)); - - function iterate() { - waterfallIterator(func, args, createCallback(func)); - } - - function createCallback(index) { - return function next(err, res) { - if (index === undefined) { - callback = noop; - throwError(); - } - index = undefined; - if (err) { - done = callback; - callback = throwError; - done(err); - return; - } - if (++completed === size) { - done = callback; - callback = throwError; - if (arguments.length <= 2) { - done(err, res); - } else { - done.apply(null, createArray(arguments)); - } - return; - } - if (sync) { - args = arguments; - func = tasks[completed] || throwError; - nextTick(iterate); - } else { - sync = true; - waterfallIterator(tasks[completed] || throwError, arguments, createCallback(completed)); - } - sync = false; - }; - } - } - - /** - * `angelFall` is like `waterfall` and inject callback to last argument of next task. - * - * @memberof async - * @namespace angelFall - * @param {Array} tasks - functions - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(next) { - * setTimeout(function() { - * order.push(1); - * next(null, 1); - * }, 10); - * }, - * function(arg1, empty, next) { - * setTimeout(function() { - * order.push(2); - * next(null, 1, 2); - * }, 30); - * }, - * function(next) { - * setTimeout(function() { - * order.push(3); - * next(null, 3); - * }, 20); - * }, - * function(arg1, empty1, empty2, empty3, next) { - * setTimeout(function() { - * order.push(4); - * next(null, 1, 2, 3, 4); - * }, 40); - * } - * ]; - * async.angelFall(tasks, function(err, arg1, arg2, arg3, arg4) { - * console.log(arg1, arg2, arg3, arg4); // 1 2 3 4 - * }); - * - */ - function angelFall(tasks, callback) { - callback = callback || noop; - if (!checkWaterfallTasks(tasks, callback)) { - return; - } - var completed = 0; - var sync = false; - var size = tasks.length; - var func = tasks[completed]; - var args = []; - var iterate = function() { - switch (func.length) { - case 0: - try { - next(null, func()); - } catch (e) { - next(e); - } - return; - case 1: - return func(next); - case 2: - return func(args[1], next); - case 3: - return func(args[1], args[2], next); - case 4: - return func(args[1], args[2], args[3], next); - case 5: - return func(args[1], args[2], args[3], args[4], next); - default: - args = slice(args, 1); - args[func.length - 1] = next; - return func.apply(null, args); - } - }; - iterate(); - - function next(err, res) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err); - return; - } - if (++completed === size) { - iterate = throwError; - var done = callback; - callback = throwError; - if (arguments.length === 2) { - done(err, res); - } else { - done.apply(null, createArray(arguments)); - } - return; - } - func = tasks[completed]; - args = arguments; - if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace whilst - * @param {Function} test - * @param {Function} iterator - * @param {Function} callback - */ - function whilst(test, iterator, callback) { - callback = callback || noop; - var sync = false; - if (test()) { - iterate(); - } else { - callback(null); - } - - function iterate() { - if (sync) { - nextTick(next); - } else { - sync = true; - iterator(done); - } - sync = false; - } - - function next() { - iterator(done); - } - - function done(err, arg) { - if (err) { - return callback(err); - } - if (arguments.length <= 2) { - if (test(arg)) { - iterate(); - } else { - callback(null, arg); - } - return; - } - arg = slice(arguments, 1); - if (test.apply(null, arg)) { - iterate(); - } else { - callback.apply(null, [null].concat(arg)); - } - } - } - - /** - * @memberof async - * @namespace doWhilst - * @param {Function} iterator - * @param {Function} test - * @param {Function} callback - */ - function doWhilst(iterator, test, callback) { - callback = callback || noop; - var sync = false; - next(); - - function iterate() { - if (sync) { - nextTick(next); - } else { - sync = true; - iterator(done); - } - sync = false; - } - - function next() { - iterator(done); - } - - function done(err, arg) { - if (err) { - return callback(err); - } - if (arguments.length <= 2) { - if (test(arg)) { - iterate(); - } else { - callback(null, arg); - } - return; - } - arg = slice(arguments, 1); - if (test.apply(null, arg)) { - iterate(); - } else { - callback.apply(null, [null].concat(arg)); - } - } - } - - /** - * @memberof async - * @namespace until - * @param {Function} test - * @param {Function} iterator - * @param {Function} callback - */ - function until(test, iterator, callback) { - callback = callback || noop; - var sync = false; - if (!test()) { - iterate(); - } else { - callback(null); - } - - function iterate() { - if (sync) { - nextTick(next); - } else { - sync = true; - iterator(done); - } - sync = false; - } - - function next() { - iterator(done); - } - - function done(err, arg) { - if (err) { - return callback(err); - } - if (arguments.length <= 2) { - if (!test(arg)) { - iterate(); - } else { - callback(null, arg); - } - return; - } - arg = slice(arguments, 1); - if (!test.apply(null, arg)) { - iterate(); - } else { - callback.apply(null, [null].concat(arg)); - } - } - } - - /** - * @memberof async - * @namespace doUntil - * @param {Function} iterator - * @param {Function} test - * @param {Function} callback - */ - function doUntil(iterator, test, callback) { - callback = callback || noop; - var sync = false; - next(); - - function iterate() { - if (sync) { - nextTick(next); - } else { - sync = true; - iterator(done); - } - sync = false; - } - - function next() { - iterator(done); - } - - function done(err, arg) { - if (err) { - return callback(err); - } - if (arguments.length <= 2) { - if (!test(arg)) { - iterate(); - } else { - callback(null, arg); - } - return; - } - arg = slice(arguments, 1); - if (!test.apply(null, arg)) { - iterate(); - } else { - callback.apply(null, [null].concat(arg)); - } - } - } - - /** - * @memberof async - * @namespace during - * @param {Function} test - * @param {Function} iterator - * @param {Function} callback - */ - function during(test, iterator, callback) { - callback = callback || noop; - _test(); - - function _test() { - test(iterate); - } - - function iterate(err, truth) { - if (err) { - return callback(err); - } - if (truth) { - iterator(done); - } else { - callback(null); - } - } - - function done(err) { - if (err) { - return callback(err); - } - _test(); - } - } - - /** - * @memberof async - * @namespace doDuring - * @param {Function} test - * @param {Function} iterator - * @param {Function} callback - */ - function doDuring(iterator, test, callback) { - callback = callback || noop; - iterate(null, true); - - function iterate(err, truth) { - if (err) { - return callback(err); - } - if (truth) { - iterator(done); - } else { - callback(null); - } - } - - function done(err, res) { - if (err) { - return callback(err); - } - switch (arguments.length) { - case 0: - case 1: - test(iterate); - break; - case 2: - test(res, iterate); - break; - default: - var args = slice(arguments, 1); - args.push(iterate); - test.apply(null, args); - break; - } - } - } - - /** - * @memberof async - * @namespace forever - */ - function forever(iterator, callback) { - var sync = false; - iterate(); - - function iterate() { - iterator(next); - } - - function next(err) { - if (err) { - if (callback) { - return callback(err); - } - throw err; - } - if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace compose - */ - function compose() { - return seq.apply(null, reverse(arguments)); - } - - /** - * @memberof async - * @namespace seq - */ - function seq(/* functions... */) { - var fns = createArray(arguments); - - return function() { - var self = this; - var args = createArray(arguments); - var callback = args[args.length - 1]; - if (typeof callback === func) { - args.pop(); - } else { - callback = noop; - } - reduce(fns, args, iterator, done); - - function iterator(newargs, fn, callback) { - var func = function(err) { - var nextargs = slice(arguments, 1); - callback(err, nextargs); - }; - newargs.push(func); - fn.apply(self, newargs); - } - - function done(err, res) { - res = isArray(res) ? res : [res]; - res.unshift(err); - callback.apply(self, res); - } - }; - } - - function createApplyEach(func) { - return function applyEach(fns /* arguments */) { - var go = function() { - var self = this; - var args = createArray(arguments); - var callback = args.pop() || noop; - return func(fns, iterator, callback); - - function iterator(fn, done) { - fn.apply(self, args.concat([done])); - } - }; - if (arguments.length > 1) { - var args = slice(arguments, 1); - return go.apply(this, args); - } else { - return go; - } - }; - } - - /** - * @see https://github.com/caolan/async/blob/master/lib/internal/DoublyLinkedList.js - */ - function DLL() { - this.head = null; - this.tail = null; - this.length = 0; - } - - DLL.prototype._removeLink = function(node) { - var prev = node.prev; - var next = node.next; - if (prev) { - prev.next = next; - } else { - this.head = next; - } - if (next) { - next.prev = prev; - } else { - this.tail = prev; - } - node.prev = null; - node.next = null; - this.length--; - return node; - }; - - DLL.prototype.empty = DLL; - - DLL.prototype._setInitial = function(node) { - this.length = 1; - this.head = this.tail = node; - }; - - DLL.prototype.insertBefore = function(node, newNode) { - newNode.prev = node.prev; - newNode.next = node; - if (node.prev) { - node.prev.next = newNode; - } else { - this.head = newNode; - } - node.prev = newNode; - this.length++; - }; - - DLL.prototype.unshift = function(node) { - if (this.head) { - this.insertBefore(this.head, node); - } else { - this._setInitial(node); - } - }; - - DLL.prototype.push = function(node) { - var tail = this.tail; - if (tail) { - node.prev = tail; - node.next = tail.next; - this.tail = node; - tail.next = node; - this.length++; - } else { - this._setInitial(node); - } - }; - - DLL.prototype.shift = function() { - return this.head && this._removeLink(this.head); - }; - - DLL.prototype.splice = function(end) { - var task; - var tasks = []; - while (end-- && (task = this.shift())) { - tasks.push(task); - } - return tasks; - }; - - DLL.prototype.remove = function(test) { - var node = this.head; - while (node) { - if (test(node)) { - this._removeLink(node); - } - node = node.next; - } - return this; - }; - - /** - * @private - */ - function baseQueue(isQueue, worker, concurrency, payload) { - if (concurrency === undefined) { - concurrency = 1; - } else if (isNaN(concurrency) || concurrency < 1) { - throw new Error('Concurrency must not be zero'); - } - - var workers = 0; - var workersList = []; - var _callback, _unshift; - - var q = { - _tasks: new DLL(), - concurrency: concurrency, - payload: payload, - saturated: noop, - unsaturated: noop, - buffer: concurrency / 4, - empty: noop, - drain: noop, - error: noop, - started: false, - paused: false, - push: push, - kill: kill, - unshift: unshift, - remove: remove, - process: isQueue ? runQueue : runCargo, - length: getLength, - running: running, - workersList: getWorkersList, - idle: idle, - pause: pause, - resume: resume, - _worker: worker - }; - return q; - - function push(tasks, callback) { - _insert(tasks, callback); - } - - function unshift(tasks, callback) { - _insert(tasks, callback, true); - } - - function _exec(task) { - var item = { - data: task, - callback: _callback - }; - if (_unshift) { - q._tasks.unshift(item); - } else { - q._tasks.push(item); - } - nextTick(q.process); - } - - function _insert(tasks, callback, unshift) { - if (callback == null) { - callback = noop; - } else if (typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - var _tasks = isArray(tasks) ? tasks : [tasks]; - - if (tasks === undefined || !_tasks.length) { - if (q.idle()) { - nextTick(q.drain); - } - return; - } - - _unshift = unshift; - _callback = callback; - arrayEachSync(_tasks, _exec); - // Avoid leaking the callback - _callback = undefined; - } - - function kill() { - q.drain = noop; - q._tasks.empty(); - } - - function _next(q, tasks) { - var called = false; - return function done(err, res) { - if (called) { - throwError(); - } - called = true; - - workers--; - var task; - var index = -1; - var size = workersList.length; - var taskIndex = -1; - var taskSize = tasks.length; - var useApply = arguments.length > 2; - var args = useApply && createArray(arguments); - while (++taskIndex < taskSize) { - task = tasks[taskIndex]; - while (++index < size) { - if (workersList[index] === task) { - if (index === 0) { - workersList.shift(); - } else { - workersList.splice(index, 1); - } - index = size; - size--; - } - } - index = -1; - if (useApply) { - task.callback.apply(task, args); - } else { - task.callback(err, res); - } - if (err) { - q.error(err, task.data); - } - } - - if (workers <= q.concurrency - q.buffer) { - q.unsaturated(); - } - - if (q._tasks.length + workers === 0) { - q.drain(); - } - q.process(); - }; - } - - function runQueue() { - while (!q.paused && workers < q.concurrency && q._tasks.length) { - var task = q._tasks.shift(); - workers++; - workersList.push(task); - if (q._tasks.length === 0) { - q.empty(); - } - if (workers === q.concurrency) { - q.saturated(); - } - var done = _next(q, [task]); - worker(task.data, done); - } - } - - function runCargo() { - while (!q.paused && workers < q.concurrency && q._tasks.length) { - var tasks = q._tasks.splice(q.payload || q._tasks.length); - var index = -1; - var size = tasks.length; - var data = Array(size); - while (++index < size) { - data[index] = tasks[index].data; - } - workers++; - nativePush.apply(workersList, tasks); - if (q._tasks.length === 0) { - q.empty(); - } - if (workers === q.concurrency) { - q.saturated(); - } - var done = _next(q, tasks); - worker(data, done); - } - } - - function getLength() { - return q._tasks.length; - } - - function running() { - return workers; - } - - function getWorkersList() { - return workersList; - } - - function idle() { - return q.length() + workers === 0; - } - - function pause() { - q.paused = true; - } - - function _resume() { - nextTick(q.process); - } - - function resume() { - if (q.paused === false) { - return; - } - q.paused = false; - var count = q.concurrency < q._tasks.length ? q.concurrency : q._tasks.length; - timesSync(count, _resume); - } - - /** - * @param {Function} test - */ - function remove(test) { - q._tasks.remove(test); - } - } - - /** - * @memberof async - * @namespace queue - */ - function queue(worker, concurrency) { - return baseQueue(true, worker, concurrency); - } - - /** - * @memberof async - * @namespace priorityQueue - */ - function priorityQueue(worker, concurrency) { - var q = baseQueue(true, worker, concurrency); - q.push = push; - delete q.unshift; - return q; - - function push(tasks, priority, callback) { - q.started = true; - priority = priority || 0; - var _tasks = isArray(tasks) ? tasks : [tasks]; - var taskSize = _tasks.length; - - if (tasks === undefined || taskSize === 0) { - if (q.idle()) { - nextTick(q.drain); - } - return; - } - - callback = typeof callback === func ? callback : noop; - var nextNode = q._tasks.head; - while (nextNode && priority >= nextNode.priority) { - nextNode = nextNode.next; - } - while (taskSize--) { - var item = { - data: _tasks[taskSize], - priority: priority, - callback: callback - }; - if (nextNode) { - q._tasks.insertBefore(nextNode, item); - } else { - q._tasks.push(item); - } - nextTick(q.process); - } - } - } - - /** - * @memberof async - * @namespace cargo - */ - function cargo(worker, payload) { - return baseQueue(false, worker, 1, payload); - } - - /** - * @memberof async - * @namespace auto - * @param {Object} tasks - * @param {number} [concurrency] - * @param {Function} [callback] - */ - function auto(tasks, concurrency, callback) { - if (typeof concurrency === func) { - callback = concurrency; - concurrency = null; - } - var keys = nativeKeys(tasks); - var rest = keys.length; - var results = {}; - if (rest === 0) { - return callback(null, results); - } - var runningTasks = 0; - var readyTasks = new DLL(); - var listeners = Object.create(null); - callback = onlyOnce(callback || noop); - concurrency = concurrency || rest; - - baseEachSync(tasks, iterator, keys); - proceedQueue(); - - function iterator(task, key) { - // no dependencies - var _task, _taskSize; - if (!isArray(task)) { - _task = task; - _taskSize = 0; - readyTasks.push([_task, _taskSize, done]); - return; - } - var dependencySize = task.length - 1; - _task = task[dependencySize]; - _taskSize = dependencySize; - if (dependencySize === 0) { - readyTasks.push([_task, _taskSize, done]); - return; - } - // dependencies - var index = -1; - while (++index < dependencySize) { - var dependencyName = task[index]; - if (notInclude(keys, dependencyName)) { - var msg = - 'async.auto task `' + - key + - '` has non-existent dependency `' + - dependencyName + - '` in ' + - task.join(', '); - throw new Error(msg); - } - var taskListeners = listeners[dependencyName]; - if (!taskListeners) { - taskListeners = listeners[dependencyName] = []; - } - taskListeners.push(taskListener); - } - - function done(err, arg) { - if (key === null) { - throwError(); - } - arg = arguments.length <= 2 ? arg : slice(arguments, 1); - if (err) { - rest = 0; - runningTasks = 0; - readyTasks.length = 0; - var safeResults = objectClone(results); - safeResults[key] = arg; - key = null; - var _callback = callback; - callback = noop; - _callback(err, safeResults); - return; - } - runningTasks--; - rest--; - results[key] = arg; - taskComplete(key); - key = null; - } - - function taskListener() { - if (--dependencySize === 0) { - readyTasks.push([_task, _taskSize, done]); - } - } - } - - function proceedQueue() { - if (readyTasks.length === 0 && runningTasks === 0) { - if (rest !== 0) { - throw new Error('async.auto task has cyclic dependencies'); - } - return callback(null, results); - } - while (readyTasks.length && runningTasks < concurrency && callback !== noop) { - runningTasks++; - var array = readyTasks.shift(); - if (array[1] === 0) { - array[0](array[2]); - } else { - array[0](results, array[2]); - } - } - } - - function taskComplete(key) { - var taskListeners = listeners[key] || []; - arrayEachSync(taskListeners, function(task) { - task(); - }); - proceedQueue(); - } - } - - var FN_ARGS = /^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m; - var FN_ARG_SPLIT = /,/; - var FN_ARG = /(=.+)?(\s*)$/; - var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm; - - /** - * parse function arguments for `autoInject` - * - * @private - */ - function parseParams(func) { - func = func.toString().replace(STRIP_COMMENTS, ''); - func = func.match(FN_ARGS)[2].replace(' ', ''); - func = func ? func.split(FN_ARG_SPLIT) : []; - func = func.map(function(arg) { - return arg.replace(FN_ARG, '').trim(); - }); - return func; - } - - /** - * @memberof async - * @namespace autoInject - * @param {Object} tasks - * @param {number} [concurrency] - * @param {Function} [callback] - */ - function autoInject(tasks, concurrency, callback) { - var newTasks = {}; - baseEachSync(tasks, iterator, nativeKeys(tasks)); - auto(newTasks, concurrency, callback); - - function iterator(task, key) { - var params; - var taskLength = task.length; - - if (isArray(task)) { - if (taskLength === 0) { - throw new Error('autoInject task functions require explicit parameters.'); - } - params = createArray(task); - taskLength = params.length - 1; - task = params[taskLength]; - if (taskLength === 0) { - newTasks[key] = task; - return; - } - } else if (taskLength === 1) { - newTasks[key] = task; - return; - } else { - params = parseParams(task); - if (taskLength === 0 && params.length === 0) { - throw new Error('autoInject task functions require explicit parameters.'); - } - taskLength = params.length - 1; - } - params[taskLength] = newTask; - newTasks[key] = params; - - function newTask(results, done) { - switch (taskLength) { - case 1: - task(results[params[0]], done); - break; - case 2: - task(results[params[0]], results[params[1]], done); - break; - case 3: - task(results[params[0]], results[params[1]], results[params[2]], done); - break; - default: - var i = -1; - while (++i < taskLength) { - params[i] = results[params[i]]; - } - params[i] = done; - task.apply(null, params); - break; - } - } - } - } - - /** - * @memberof async - * @namespace retry - * @param {integer|Object|Function} opts - * @param {Function} [task] - * @param {Function} [callback] - */ - function retry(opts, task, callback) { - var times, intervalFunc, errorFilter; - var count = 0; - if (arguments.length < 3 && typeof opts === func) { - callback = task || noop; - task = opts; - opts = null; - times = DEFAULT_TIMES; - } else { - callback = callback || noop; - switch (typeof opts) { - case 'object': - if (typeof opts.errorFilter === func) { - errorFilter = opts.errorFilter; - } - var interval = opts.interval; - switch (typeof interval) { - case func: - intervalFunc = interval; - break; - case 'string': - case 'number': - interval = +interval; - intervalFunc = interval - ? function() { - return interval; - } - : function() { - return DEFAULT_INTERVAL; - }; - break; - } - times = +opts.times || DEFAULT_TIMES; - break; - case 'number': - times = opts || DEFAULT_TIMES; - break; - case 'string': - times = +opts || DEFAULT_TIMES; - break; - default: - throw new Error('Invalid arguments for async.retry'); - } - } - if (typeof task !== 'function') { - throw new Error('Invalid arguments for async.retry'); - } - - if (intervalFunc) { - task(intervalCallback); - } else { - task(simpleCallback); - } - - function simpleIterator() { - task(simpleCallback); - } - - function simpleCallback(err, res) { - if (++count === times || !err || (errorFilter && !errorFilter(err))) { - if (arguments.length <= 2) { - return callback(err, res); - } - var args = createArray(arguments); - return callback.apply(null, args); - } - simpleIterator(); - } - - function intervalIterator() { - task(intervalCallback); - } - - function intervalCallback(err, res) { - if (++count === times || !err || (errorFilter && !errorFilter(err))) { - if (arguments.length <= 2) { - return callback(err, res); - } - var args = createArray(arguments); - return callback.apply(null, args); - } - setTimeout(intervalIterator, intervalFunc(count)); - } - } - - function retryable(opts, task) { - if (!task) { - task = opts; - opts = null; - } - return done; - - function done() { - var taskFn; - var args = createArray(arguments); - var lastIndex = args.length - 1; - var callback = args[lastIndex]; - switch (task.length) { - case 1: - taskFn = task1; - break; - case 2: - taskFn = task2; - break; - case 3: - taskFn = task3; - break; - default: - taskFn = task4; - } - if (opts) { - retry(opts, taskFn, callback); - } else { - retry(taskFn, callback); - } - - function task1(done) { - task(done); - } - - function task2(done) { - task(args[0], done); - } - - function task3(done) { - task(args[0], args[1], done); - } - - function task4(callback) { - args[lastIndex] = callback; - task.apply(null, args); - } - } - } - - /** - * @memberof async - * @namespace iterator - */ - function iterator(tasks) { - var size = 0; - var keys = []; - if (isArray(tasks)) { - size = tasks.length; - } else { - keys = nativeKeys(tasks); - size = keys.length; - } - return makeCallback(0); - - function makeCallback(index) { - var fn = function() { - if (size) { - var key = keys[index] || index; - tasks[key].apply(null, createArray(arguments)); - } - return fn.next(); - }; - fn.next = function() { - return index < size - 1 ? makeCallback(index + 1) : null; - }; - return fn; - } - } - - /** - * @memberof async - * @namespace apply - */ - function apply(func) { - switch (arguments.length) { - case 0: - case 1: - return func; - case 2: - return func.bind(null, arguments[1]); - case 3: - return func.bind(null, arguments[1], arguments[2]); - case 4: - return func.bind(null, arguments[1], arguments[2], arguments[3]); - case 5: - return func.bind(null, arguments[1], arguments[2], arguments[3], arguments[4]); - default: - var size = arguments.length; - var index = 0; - var args = Array(size); - args[index] = null; - while (++index < size) { - args[index] = arguments[index]; - } - return func.bind.apply(func, args); - } - } - - /** - * @memberof async - * @namespace timeout - * @param {Function} func - * @param {number} millisec - * @param {*} info - */ - function timeout(func, millisec, info) { - var callback, timer; - return wrappedFunc; - - function wrappedFunc() { - timer = setTimeout(timeoutCallback, millisec); - var args = createArray(arguments); - var lastIndex = args.length - 1; - callback = args[lastIndex]; - args[lastIndex] = injectedCallback; - simpleApply(func, args); - } - - function timeoutCallback() { - var name = func.name || 'anonymous'; - var err = new Error('Callback function "' + name + '" timed out.'); - err.code = 'ETIMEDOUT'; - if (info) { - err.info = info; - } - timer = null; - callback(err); - } - - function injectedCallback() { - if (timer !== null) { - simpleApply(callback, createArray(arguments)); - clearTimeout(timer); - } - } - - function simpleApply(func, args) { - switch (args.length) { - case 0: - func(); - break; - case 1: - func(args[0]); - break; - case 2: - func(args[0], args[1]); - break; - default: - func.apply(null, args); - break; - } - } - } - - /** - * @memberof async - * @namespace times - * @param {number} n - n >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * var iterator = function(n, done) { - * done(null, n); - * }; - * async.times(4, iterator, function(err, res) { - * console.log(res); // [0, 1, 2, 3]; - * }); - * - */ - function times(n, iterator, callback) { - callback = callback || noop; - n = +n; - if (isNaN(n) || n < 1) { - return callback(null, []); - } - var result = Array(n); - timesSync(n, iterate); - - function iterate(num) { - iterator(num, createCallback(num)); - } - - function createCallback(index) { - return function(err, res) { - if (index === null) { - throwError(); - } - result[index] = res; - index = null; - if (err) { - callback(err); - callback = noop; - } else if (--n === 0) { - callback(null, result); - } - }; - } - } - - /** - * @memberof async - * @namespace timesSeries - * @param {number} n - n >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * var iterator = function(n, done) { - * done(null, n); - * }; - * async.timesSeries(4, iterator, function(err, res) { - * console.log(res); // [0, 1, 2, 3]; - * }); - * - */ - function timesSeries(n, iterator, callback) { - callback = callback || noop; - n = +n; - if (isNaN(n) || n < 1) { - return callback(null, []); - } - var result = Array(n); - var sync = false; - var completed = 0; - iterate(); - - function iterate() { - iterator(completed, done); - } - - function done(err, res) { - result[completed] = res; - if (err) { - callback(err); - callback = throwError; - } else if (++completed >= n) { - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace timesLimit - * @param {number} n - n >= 1 - * @param {number} limit - n >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * var iterator = function(n, done) { - * done(null, n); - * }; - * async.timesLimit(4, 2, iterator, function(err, res) { - * console.log(res); // [0, 1, 2, 3]; - * }); - * - */ - function timesLimit(n, limit, iterator, callback) { - callback = callback || noop; - n = +n; - if (isNaN(n) || n < 1 || isNaN(limit) || limit < 1) { - return callback(null, []); - } - var result = Array(n); - var sync = false; - var started = 0; - var completed = 0; - timesSync(limit > n ? n : limit, iterate); - - function iterate() { - var index = started++; - if (index < n) { - iterator(index, createCallback(index)); - } - } - - function createCallback(index) { - return function(err, res) { - if (index === null) { - throwError(); - } - result[index] = res; - index = null; - if (err) { - callback(err); - callback = noop; - } else if (++completed >= n) { - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @memberof async - * @namespace race - * @param {Array|Object} tasks - functions - * @param {Function} callback - * @example - * - * // array - * var called = 0; - * var tasks = [ - * function(done) { - * setTimeout(function() { - * called++; - * done(null, '1'); - * }, 30); - * }, - * function(done) { - * setTimeout(function() { - * called++; - * done(null, '2'); - * }, 20); - * }, - * function(done) { - * setTimeout(function() { - * called++; - * done(null, '3'); - * }, 10); - * } - * ]; - * async.race(tasks, function(err, res) { - * console.log(res); // '3' - * console.log(called); // 1 - * setTimeout(function() { - * console.log(called); // 3 - * }, 50); - * }); - * - * @example - * - * // object - * var called = 0; - * var tasks = { - * 'test1': function(done) { - * setTimeout(function() { - * called++; - * done(null, '1'); - * }, 30); - * }, - * 'test2': function(done) { - * setTimeout(function() { - * called++; - * done(null, '2'); - * }, 20); - * }, - * 'test3': function(done) { - * setTimeout(function() { - * called++; - * done(null, '3'); - * }, 10); - * } - * }; - * async.race(tasks, function(err, res) { - * console.log(res); // '3' - * console.log(called); // 1 - * setTimeout(function() { - * console.log(called); // 3 - * done(); - * }, 50); - * }); - * - */ - function race(tasks, callback) { - callback = once(callback || noop); - var size, keys; - var index = -1; - if (isArray(tasks)) { - size = tasks.length; - while (++index < size) { - tasks[index](callback); - } - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - while (++index < size) { - tasks[keys[index]](callback); - } - } else { - return callback(new TypeError('First argument to race must be a collection of functions')); - } - if (!size) { - callback(null); - } - } - - /** - * @memberof async - * @namespace memoize - */ - function memoize(fn, hasher) { - hasher = - hasher || - function(hash) { - return hash; - }; - - var memo = {}; - var queues = {}; - var memoized = function() { - var args = createArray(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (has(memo, key)) { - nextTick(function() { - callback.apply(null, memo[key]); - }); - return; - } - if (has(queues, key)) { - return queues[key].push(callback); - } - - queues[key] = [callback]; - args.push(done); - fn.apply(null, args); - - function done(err) { - var args = createArray(arguments); - if (!err) { - memo[key] = args; - } - var q = queues[key]; - delete queues[key]; - - var i = -1; - var size = q.length; - while (++i < size) { - q[i].apply(null, args); - } - } - }; - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - } - - /** - * @memberof async - * @namespace unmemoize - */ - function unmemoize(fn) { - return function() { - return (fn.unmemoized || fn).apply(null, arguments); - }; - } - - /** - * @memberof async - * @namespace ensureAsync - */ - function ensureAsync(fn) { - return function(/* ...args, callback */) { - var args = createArray(arguments); - var lastIndex = args.length - 1; - var callback = args[lastIndex]; - var sync = true; - args[lastIndex] = done; - fn.apply(this, args); - sync = false; - - function done() { - var innerArgs = createArray(arguments); - if (sync) { - nextTick(function() { - callback.apply(null, innerArgs); - }); - } else { - callback.apply(null, innerArgs); - } - } - }; - } - - /** - * @memberof async - * @namespace constant - */ - function constant(/* values... */) { - var args = [null].concat(createArray(arguments)); - return function(callback) { - callback = arguments[arguments.length - 1]; - callback.apply(this, args); - }; - } - - function asyncify(fn) { - return function(/* args..., callback */) { - var args = createArray(arguments); - var callback = args.pop(); - var result; - try { - result = fn.apply(this, args); - } catch (e) { - return callback(e); - } - if (result && typeof result.then === func) { - result.then( - function(value) { - invokeCallback(callback, null, value); - }, - function(err) { - invokeCallback(callback, err && err.message ? err : new Error(err)); - } - ); - } else { - callback(null, result); - } - }; - } - - function invokeCallback(callback, err, value) { - try { - callback(err, value); - } catch (e) { - nextTick(rethrow, e); - } - } - - function rethrow(error) { - throw error; - } - - /** - * @memberof async - * @namespace reflect - * @param {Function} func - * @return {Function} - */ - function reflect(func) { - return function(/* args..., callback */) { - var callback; - switch (arguments.length) { - case 1: - callback = arguments[0]; - return func(done); - case 2: - callback = arguments[1]; - return func(arguments[0], done); - default: - var args = createArray(arguments); - var lastIndex = args.length - 1; - callback = args[lastIndex]; - args[lastIndex] = done; - func.apply(this, args); - } - - function done(err, res) { - if (err) { - return callback(null, { - error: err - }); - } - if (arguments.length > 2) { - res = slice(arguments, 1); - } - callback(null, { - value: res - }); - } - }; - } - - /** - * @memberof async - * @namespace reflectAll - * @param {Array[]|Object} tasks - * @return {Function} - */ - function reflectAll(tasks) { - var newTasks, keys; - if (isArray(tasks)) { - newTasks = Array(tasks.length); - arrayEachSync(tasks, iterate); - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - newTasks = {}; - baseEachSync(tasks, iterate, keys); - } - return newTasks; - - function iterate(func, key) { - newTasks[key] = reflect(func); - } - } - - /** - * @memberof async - * @namespace createLogger - */ - function createLogger(name) { - return function(fn) { - var args = slice(arguments, 1); - args.push(done); - fn.apply(null, args); - }; - - function done(err) { - if (typeof console === obj) { - if (err) { - if (console.error) { - console.error(err); - } - return; - } - if (console[name]) { - var args = slice(arguments, 1); - arrayEachSync(args, function(arg) { - console[name](arg); - }); - } - } - } - } - - /** - * @memberof async - * @namespace safe - */ - function safe() { - createImmediate(); - return exports; - } - - /** - * @memberof async - * @namespace fast - */ - function fast() { - createImmediate(false); - return exports; - } -}); diff --git a/web/static/node_modules/neo-async/async.min.js b/web/static/node_modules/neo-async/async.min.js deleted file mode 100644 index 4161a3f6..00000000 --- a/web/static/node_modules/neo-async/async.min.js +++ /dev/null @@ -1,80 +0,0 @@ -(function(N,O){"object"===typeof exports&&"undefined"!==typeof module?O(exports):"function"===typeof define&&define.amd?define(["exports"],O):N.async?O(N.neo_async=N.neo_async||{}):O(N.async=N.async||{})})(this,function(N){function O(a){var c=function(a){var d=J(arguments,1);setTimeout(function(){a.apply(null,d)})};T="function"===typeof setImmediate?setImmediate:c;"object"===typeof process&&"function"===typeof process.nextTick?(D=/^v0.10/.test(process.version)?T:process.nextTick,ba=/^v0/.test(process.version)? -T:process.nextTick):ba=D=T;!1===a&&(D=function(a){a()})}function H(a){for(var c=-1,b=a.length,d=Array(b);++c=d)return[];for(var e=Array(d);++bd[e]){var g=d[f]; -d[f]=d[e];d[e]=g}}if(!(e>b)){for(var l,e=a[a[c]>a[e]?c:e],f=c,g=b;f<=g;){for(l=f;f=l&&a[g]>=e;)g--;if(f>g)break;var q=a;l=d;var s=f++,h=g--,k=q[s];q[s]=q[h];q[h]=k;q=l[s];l[s]=l[h];l[h]=q}e=f;ca(a,c,e-1,d);ca(a,e,b,d)}}}function S(a){var c=[];Q(a,function(a){a!==w&&(C(a)?X.apply(c,a):c.push(a))});return c}function da(a,c,b){var d=-1,e=a.length;if(3===c.length)for(;++db)return e(null,[]);y=y||Array(m);K(b>m?m:b,x)}}function Y(a,c,b){function d(){c(a[v],s)}function e(){c(a[v],v,s)}function f(){n=r.next();n.done?b(null):c(n.value,s)}function g(){n=r.next();n.done?b(null):c(n.value,v,s)}function l(){c(a[m[v]],s)}function q(){k=m[v];c(a[k],k,s)}function s(a,d){a?b(a):++v===h||!1===d?(p=A,b(null)):u?D(p): -(u=!0,p());u=!1}b=E(b||w);var h,k,m,r,n,p,u=!1,v=0;C(a)?(h=a.length,p=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,r=a[z](),p=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,p=3===c.length?q:l));if(!h)return b(null);p()}function Z(a,c,b,d){function e(){xc)return d(null);K(c>k?k:c,v)}function za(a,c,b){function d(){c(a[t],s)}function e(){c(a[t],t,s)}function f(){n=r.next(); -n.done?b(null,p):c(n.value,s)}function g(){n=r.next();n.done?b(null,p):c(n.value,t,s)}function l(){c(a[m[t]],s)}function q(){k=m[t];c(a[k],k,s)}function s(a,d){a?(u=A,b=E(b),b(a,H(p))):(p[t]=d,++t===h?(u=A,b(null,p),b=A):v?D(u):(v=!0,u()),v=!1)}b=b||w;var h,k,m,r,n,p,u,v=!1,t=0;C(a)?(h=a.length,u=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,p=[],r=a[z](),u=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,u=3===c.length?q:l));if(!h)return b(null,[]);p=p||Array(h);u()}function Aa(a,c,b,d){return function(e, -f,g){function l(a){var b=!1;return function(c,e){b&&A();b=!0;c?(g=I(g),g(c)):!!e===d?(g=I(g),g(null,a)):++h===q&&g(null)}}g=g||w;var q,s,h=0;C(e)?(q=e.length,a(e,f,l)):e&&(z&&e[z]?(q=b(e,f,l))&&q===h&&g(null):"object"===typeof e&&(s=F(e),q=s.length,c(e,f,l,s)));q||g(null)}}function Ba(a){return function(c,b,d){function e(){r=c[x];b(r,h)}function f(){r=c[x];b(r,x,h)}function g(){u=p.next();r=u.value;u.done?d(null):b(r,h)}function l(){u=p.next();r=u.value;u.done?d(null):b(r,x,h)}function q(){r=c[n[x]]; -b(r,h)}function s(){m=n[x];r=c[m];b(r,m,h)}function h(b,c){b?d(b):!!c===a?(v=A,d(null,r)):++x===k?(v=A,d(null)):t?D(v):(t=!0,v());t=!1}d=E(d||w);var k,m,r,n,p,u,v,t=!1,x=0;C(c)?(k=c.length,v=3===b.length?f:e):c&&(z&&c[z]?(k=Infinity,p=c[z](),v=3===b.length?l:g):"object"===typeof c&&(n=F(c),k=n.length,v=3===b.length?s:q));if(!k)return d(null);v()}}function Ca(a){return function(c,b,d,e){function f(){r=G++;rb)return e(null);K(b>m?m:b,x)}}function Da(a,c,b,d){return function(e,f,g){function l(a,b){return function(c,e){null===a&&A();c?(a=null,g=I(g),g(c,L(k))):(!!e===d&&(k[a]=b),a=null,++h===q&&g(null,k))}}g=g||w;var q,s,h=0,k={};C(e)?(q=e.length,a(e,f,l)):e&&(z&&e[z]?(q=b(e,f,l))&&q===h&&g(null,k):"object"===typeof e&&(s=F(e),q=s.length,c(e,f,l,s)));if(!q)return g(null,{})}}function Ea(a){return function(c, -b,d){function e(){m=y;r=c[y];b(r,h)}function f(){m=y;r=c[y];b(r,y,h)}function g(){m=y;u=p.next();r=u.value;u.done?d(null,x):b(r,h)}function l(){m=y;u=p.next();r=u.value;u.done?d(null,x):b(r,m,h)}function q(){m=n[y];r=c[m];b(r,h)}function s(){m=n[y];r=c[m];b(r,m,h)}function h(b,c){b?d(b,x):(!!c===a&&(x[m]=r),++y===k?(v=A,d(null,x)):t?D(v):(t=!0,v()),t=!1)}d=E(d||w);var k,m,r,n,p,u,v,t=!1,x={},y=0;C(c)?(k=c.length,v=3===b.length?f:e):c&&(z&&c[z]?(k=Infinity,p=c[z](),v=3===b.length?l:g):"object"===typeof c&& -(n=F(c),k=n.length,v=3===b.length?s:q));if(!k)return d(null,{});v()}}function Fa(a){return function(c,b,d,e){function f(){r=B++;rb)return e(null,{});K(b>m?m:b,x)}}function $(a,c,b,d){function e(d){b(d,a[t],h)}function f(d){b(d,a[t],t,h)}function g(a){p=n.next();p.done?d(null,a):b(a,p.value, -h)}function l(a){p=n.next();p.done?d(null,a):b(a,p.value,t,h)}function q(d){b(d,a[r[t]],h)}function s(d){m=r[t];b(d,a[m],m,h)}function h(a,c){a?d(a,c):++t===k?(b=A,d(null,c)):v?D(function(){u(c)}):(v=!0,u(c));v=!1}d=E(d||w);var k,m,r,n,p,u,v=!1,t=0;C(a)?(k=a.length,u=4===b.length?f:e):a&&(z&&a[z]?(k=Infinity,n=a[z](),u=4===b.length?l:g):"object"===typeof a&&(r=F(a),k=r.length,u=4===b.length?s:q));if(!k)return d(null,c);u(c)}function Ga(a,c,b,d){function e(d){b(d,a[--s],q)}function f(d){b(d,a[--s], -s,q)}function g(d){b(d,a[m[--s]],q)}function l(d){k=m[--s];b(d,a[k],k,q)}function q(a,b){a?d(a,b):0===s?(u=A,d(null,b)):v?D(function(){u(b)}):(v=!0,u(b));v=!1}d=E(d||w);var s,h,k,m,r,n,p,u,v=!1;if(C(a))s=a.length,u=4===b.length?f:e;else if(a)if(z&&a[z]){p=[];r=a[z]();for(h=-1;!1===(n=r.next()).done;)p[++h]=n.value;a=p;s=p.length;u=4===b.length?f:e}else"object"===typeof a&&(m=F(a),s=m.length,u=4===b.length?l:g);if(!s)return d(null,c);u(c)}function Ha(a,c,b){b=b||w;ja(a,c,function(a,c){if(a)return b(a); -b(null,!!c)})}function Ia(a,c,b){b=b||w;ka(a,c,function(a,c){if(a)return b(a);b(null,!!c)})}function Ja(a,c,b,d){d=d||w;la(a,c,b,function(a,b){if(a)return d(a);d(null,!!b)})}function Ka(a,c){return C(a)?0===a.length?(c(null),!1):!0:(c(Error("First argument to waterfall must be an array of functions")),!1)}function ma(a,c,b){switch(c.length){case 0:case 1:return a(b);case 2:return a(c[1],b);case 3:return a(c[1],c[2],b);case 4:return a(c[1],c[2],c[3],b);case 5:return a(c[1],c[2],c[3],c[4],b);case 6:return a(c[1], -c[2],c[3],c[4],c[5],b);default:return c=J(c,1),c.push(b),a.apply(null,c)}}function La(a,c){function b(b,h){if(b)q=A,c=E(c),c(b);else if(++d===f){q=A;var k=c;c=A;2===arguments.length?k(b,h):k.apply(null,H(arguments))}else g=a[d],l=arguments,e?D(q):(e=!0,q()),e=!1}c=c||w;if(Ka(a,c)){var d=0,e=!1,f=a.length,g=a[d],l=[],q=function(){switch(g.length){case 0:try{b(null,g())}catch(a){b(a)}break;case 1:return g(b);case 2:return g(l[1],b);case 3:return g(l[1],l[2],b);case 4:return g(l[1],l[2],l[3],b);case 5:return g(l[1], -l[2],l[3],l[4],b);default:return l=J(l,1),l[g.length-1]=b,g.apply(null,l)}};q()}}function Ma(){var a=H(arguments);return function(){var c=this,b=H(arguments),d=b[b.length-1];"function"===typeof d?b.pop():d=w;$(a,b,function(a,b,d){a.push(function(a){var b=J(arguments,1);d(a,b)});b.apply(c,a)},function(a,b){b=C(b)?b:[b];b.unshift(a);d.apply(c,b)})}}function Na(a){return function(c){var b=function(){var b=this,d=H(arguments),g=d.pop()||w;return a(c,function(a,c){a.apply(b,d.concat([c]))},g)};if(1b)throw Error("Concurrency must not be zero");var h=0,k=[],m,r,n={_tasks:new M,concurrency:b,payload:d,saturated:w,unsaturated:w,buffer:b/4,empty:w,drain:w,error:w,started:!1,paused:!1,push:function(a, -b){f(a,b)},kill:function(){n.drain=w;n._tasks.empty()},unshift:function(a,b){f(a,b,!0)},remove:function(a){n._tasks.remove(a)},process:a?l:q,length:function(){return n._tasks.length},running:function(){return h},workersList:function(){return k},idle:function(){return 0===n.length()+h},pause:function(){n.paused=!0},resume:function(){!1!==n.paused&&(n.paused=!1,K(n.concurrency=arguments.length?f:J(arguments,1);if(a){q=g=0;s.length=0;var k=L(l);k[d]=f;d=null;var h= -b;b=w;h(a,k)}else q--,g--,l[d]=f,e(d),d=null}function n(){0===--v&&s.push([p,u,c])}var p,u;if(C(a)){var v=a.length-1;p=a[v];u=v;if(0===v)s.push([p,u,c]);else for(var t=-1;++t=arguments.length)return b(a,e);var f=H(arguments);return b.apply(null,f)}c(d)}function e(){c(f)}function f(a,d){if(++s===g||!a||q&&!q(a)){if(2>=arguments.length)return b(a,d);var c=H(arguments);return b.apply(null,c)}setTimeout(e,l(s))}var g,l,q,s=0;if(3>arguments.length&&"function"===typeof a)b=c||w,c=a,a=null,g=5;else switch(b=b||w,typeof a){case "object":"function"===typeof a.errorFilter&&(q=a.errorFilter);var h=a.interval; -switch(typeof h){case "function":l=h;break;case "string":case "number":l=(h=+h)?function(){return h}:function(){return 0}}g=+a.times||5;break;case "number":g=a||5;break;case "string":g=+a||5;break;default:throw Error("Invalid arguments for async.retry");}if("function"!==typeof c)throw Error("Invalid arguments for async.retry");l?c(f):c(d)}function Pa(a){return function(){var c=H(arguments),b=c.pop(),d;try{d=a.apply(this,c)}catch(e){return b(e)}d&&"function"===typeof d.then?d.then(function(a){try{b(null, -a)}catch(d){D(Qa,d)}},function(a){a=a&&a.message?a:Error(a);try{b(a,void 0)}catch(d){D(Qa,d)}}):b(null,d)}}function Qa(a){throw a;}function Ra(a){return function(){function c(a,d){if(a)return b(null,{error:a});2=arguments.length?c:J(arguments,1),a=null,++q===f&&d(null,l))}}d=d||w;var f,g,l,q=0;C(b)?(f=b.length,l=Array(f),a(b,e)):b&&"object"===typeof b&&(g=F(b),f=g.length,l={},c(b,e,g));f||d(null,l)}}(function(a,c){for(var b=-1,d=a.length;++bc)return d(null,[]);v=v||Array(k);K(c>k?k:c,t)},mapValues:fb,mapValuesSeries:function(a,c,b){function d(){k=t;c(a[t], -s)}function e(){k=t;c(a[t],t,s)}function f(){k=t;n=r.next();n.done?b(null,v):c(n.value,s)}function g(){k=t;n=r.next();n.done?b(null,v):c(n.value,t,s)}function l(){k=m[t];c(a[k],s)}function q(){k=m[t];c(a[k],k,s)}function s(a,d){a?(p=A,b=E(b),b(a,L(v))):(v[k]=d,++t===h?(p=A,b(null,v),b=A):u?D(p):(u=!0,p()),u=!1)}b=b||w;var h,k,m,r,n,p,u=!1,v={},t=0;C(a)?(h=a.length,p=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,r=a[z](),p=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,p=3===c.length?q:l)); -if(!h)return b(null,v);p()},mapValuesLimit:function(a,c,b,d){function e(){m=y++;mc)return d(null,x);K(c>k?k:c,v)},filter:Ta,filterSeries:Ua,filterLimit:Va,select:Ta,selectSeries:Ua,selectLimit:Va,reject:gb,rejectSeries:hb,rejectLimit:ib,detect:ja,detectSeries:ka,detectLimit:la,find:ja,findSeries:ka,findLimit:la,pick:jb,pickSeries:kb, -pickLimit:lb,omit:mb,omitSeries:nb,omitLimit:ob,reduce:$,inject:$,foldl:$,reduceRight:Ga,foldr:Ga,transform:pb,transformSeries:function(a,c,b,d){function e(){b(v,a[x],h)}function f(){b(v,a[x],x,h)}function g(){p=n.next();p.done?d(null,v):b(v,p.value,h)}function l(){p=n.next();p.done?d(null,v):b(v,p.value,x,h)}function q(){b(v,a[r[x]],h)}function s(){m=r[x];b(v,a[m],m,h)}function h(a,b){a?d(a,v):++x===k||!1===b?(u=A,d(null,v)):t?D(u):(t=!0,u());t=!1}3===arguments.length&&(d=b,b=c,c=void 0);d=E(d|| -w);var k,m,r,n,p,u,v,t=!1,x=0;C(a)?(k=a.length,v=void 0!==c?c:[],u=4===b.length?f:e):a&&(z&&a[z]?(k=Infinity,n=a[z](),v=void 0!==c?c:{},u=4===b.length?l:g):"object"===typeof a&&(r=F(a),k=r.length,v=void 0!==c?c:{},u=4===b.length?s:q));if(!k)return d(null,void 0!==c?c:v||{});u()},transformLimit:function(a,c,b,d,e){function f(){r=A++;rc)return e(null,void 0!==b?b:x||{});K(c>m?m:c,t)},sortBy:qb,sortBySeries:function(a,c,b){function d(){m=a[y];c(m,s)}function e(){m=a[y];c(m,y,s)}function f(){p=n.next();if(p.done)return b(null,P(u,v));m=p.value;u[y]=m;c(m,s)}function g(){p=n.next();if(p.done)return b(null,P(u,v));m=p.value;u[y]=m;c(m,y,s)}function l(){m=a[r[y]];u[y]=m;c(m,s)}function q(){k=r[y];m=a[k];u[y]=m;c(m,k,s)}function s(a,d){v[y]=d;a?b(a):++y===h?(t=A,b(null, -P(u,v))):x?D(t):(x=!0,t());x=!1}b=E(b||w);var h,k,m,r,n,p,u,v,t,x=!1,y=0;C(a)?(h=a.length,u=a,v=Array(h),t=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,u=[],v=[],n=a[z](),t=3===c.length?g:f):"object"===typeof a&&(r=F(a),h=r.length,u=Array(h),v=Array(h),t=3===c.length?q:l));if(!h)return b(null,[]);t()},sortByLimit:function(a,c,b,d){function e(){Bc)return d(null,[]);x=x||Array(k);K(c>k?k:c,y)},some:Ha,someSeries:Ia,someLimit:Ja,any:Ha,anySeries:Ia,anyLimit:Ja,every:Wa,everySeries:Xa,everyLimit:Ya,all:Wa,allSeries:Xa,allLimit:Ya,concat:rb,concatSeries:function(a,c,b){function d(){c(a[t],s)}function e(){c(a[t],t,s)}function f(){n=r.next();n.done?b(null,v):c(n.value,s)}function g(){n=r.next();n.done?b(null,v):c(n.value,t,s)}function l(){c(a[m[t]], -s)}function q(){k=m[t];c(a[k],k,s)}function s(a,d){C(d)?X.apply(v,d):2<=arguments.length&&X.apply(v,J(arguments,1));a?b(a,v):++t===h?(p=A,b(null,v)):u?D(p):(u=!0,p());u=!1}b=E(b||w);var h,k,m,r,n,p,u=!1,v=[],t=0;C(a)?(h=a.length,p=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,r=a[z](),p=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,p=3===c.length?q:l));if(!h)return b(null,v);p()},concatLimit:function(a,c,b,d){function e(){tc)return d(null,[]);u=u||Array(k);K(c>k?k:c,p)},groupBy:sb,groupBySeries:function(a,c,b){function d(){m=a[t];c(m,s)}function e(){m=a[t];c(m,t,s)}function f(){p=n.next();m=p.value;p.done?b(null,x):c(m,s)}function g(){p=n.next();m=p.value;p.done? -b(null,x):c(m,t,s)}function l(){m=a[r[t]];c(m,s)}function q(){k=r[t];m=a[k];c(m,k,s)}function s(a,d){if(a)u=A,b=E(b),b(a,L(x));else{var c=x[d];c?c.push(m):x[d]=[m];++t===h?(u=A,b(null,x)):v?D(u):(v=!0,u());v=!1}}b=E(b||w);var h,k,m,r,n,p,u,v=!1,t=0,x={};C(a)?(h=a.length,u=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,n=a[z](),u=3===c.length?g:f):"object"===typeof a&&(r=F(a),h=r.length,u=3===c.length?q:l));if(!h)return b(null,x);u()},groupByLimit:function(a,c,b,d){function e(){yc)return d(null,B);K(c>k?k:c,t)},parallel:tb,series:function(a,c){function b(){g=k;a[k](e)}function d(){g=l[k];a[g](e)}function e(a,b){a?(s=A,c=E(c),c(a,q)):(q[g]=2>=arguments.length?b:J(arguments,1),++k===f?(s=A,c(null,q)):h?D(s):(h=!0,s()),h=!1)}c=c||w;var f,g,l,q,s,h=!1,k=0;if(C(a))f=a.length,q=Array(f), -s=b;else if(a&&"object"===typeof a)l=F(a),f=l.length,q={},s=d;else return c(null);if(!f)return c(null,q);s()},parallelLimit:function(a,c,b){function d(){l=r++;if(l=arguments.length?c:J(arguments,1),a=null,++n===g?b(null,h):m?D(k):(m=!0,k()),m=!1)}}b=b||w;var g,l,q,s,h,k,m=!1,r=0,n=0;C(a)?(g=a.length,h=Array(g),k=d):a&&"object"===typeof a&&(s=F(a),g=s.length,h= -{},k=e);if(!g||isNaN(c)||1>c)return b(null,h);K(c>g?g:c,k)},tryEach:function(a,c){function b(){a[q](e)}function d(){a[g[q]](e)}function e(a,b){a?++q===f?c(a):l():2>=arguments.length?c(null,b):c(null,J(arguments,1))}c=c||w;var f,g,l,q=0;C(a)?(f=a.length,l=b):a&&"object"===typeof a&&(g=F(a),f=g.length,l=d);if(!f)return c(null);l()},waterfall:function(a,c){function b(){ma(e,f,d(e))}function d(h){return function(k,m){void 0===h&&(c=w,A());h=void 0;k?(g=c,c=A,g(k)):++q===s?(g=c,c=A,2>=arguments.length? -g(k,m):g.apply(null,H(arguments))):(l?(f=arguments,e=a[q]||A,D(b)):(l=!0,ma(a[q]||A,arguments,d(q))),l=!1)}}c=c||w;if(Ka(a,c)){var e,f,g,l,q=0,s=a.length;ma(a[0],[],d(0))}},angelFall:La,angelfall:La,whilst:function(a,c,b){function d(){g?D(e):(g=!0,c(f));g=!1}function e(){c(f)}function f(c,e){if(c)return b(c);2>=arguments.length?a(e)?d():b(null,e):(e=J(arguments,1),a.apply(null,e)?d():b.apply(null,[null].concat(e)))}b=b||w;var g=!1;a()?d():b(null)},doWhilst:function(a,c,b){function d(){g?D(e):(g=!0, -a(f));g=!1}function e(){a(f)}function f(a,e){if(a)return b(a);2>=arguments.length?c(e)?d():b(null,e):(e=J(arguments,1),c.apply(null,e)?d():b.apply(null,[null].concat(e)))}b=b||w;var g=!1;e()},until:function(a,c,b){function d(){g?D(e):(g=!0,c(f));g=!1}function e(){c(f)}function f(c,e){if(c)return b(c);2>=arguments.length?a(e)?b(null,e):d():(e=J(arguments,1),a.apply(null,e)?b.apply(null,[null].concat(e)):d())}b=b||w;var g=!1;a()?b(null):d()},doUntil:function(a,c,b){function d(){g?D(e):(g=!0,a(f));g= -!1}function e(){a(f)}function f(a,e){if(a)return b(a);2>=arguments.length?c(e)?b(null,e):d():(e=J(arguments,1),c.apply(null,e)?b.apply(null,[null].concat(e)):d())}b=b||w;var g=!1;e()},during:function(a,c,b){function d(a,d){if(a)return b(a);d?c(e):b(null)}function e(c){if(c)return b(c);a(d)}b=b||w;a(d)},doDuring:function(a,c,b){function d(d,c){if(d)return b(d);c?a(e):b(null)}function e(a,e){if(a)return b(a);switch(arguments.length){case 0:case 1:c(d);break;case 2:c(e,d);break;default:var l=J(arguments, -1);l.push(d);c.apply(null,l)}}b=b||w;d(null,!0)},forever:function(a,c){function b(){a(d)}function d(a){if(a){if(c)return c(a);throw a;}e?D(b):(e=!0,b());e=!1}var e=!1;b()},compose:function(){return Ma.apply(null,Za(arguments))},seq:Ma,applyEach:ub,applyEachSeries:vb,queue:function(a,c){return na(!0,a,c)},priorityQueue:function(a,c){var b=na(!0,a,c);b.push=function(a,c,f){b.started=!0;c=c||0;var g=C(a)?a:[a],l=g.length;if(void 0===a||0===l)b.idle()&&D(b.drain);else{f="function"===typeof f?f:w;for(a= -b._tasks.head;a&&c>=a.priority;)a=a.next;for(;l--;){var q={data:g[l],priority:c,callback:f};a?b._tasks.insertBefore(a,q):b._tasks.push(q);D(b.process)}}};delete b.unshift;return b},cargo:function(a,c){return na(!1,a,1,c)},auto:Oa,autoInject:function(a,c,b){var d={};W(a,function(a,b){var c,l=a.length;if(C(a)){if(0===l)throw Error("autoInject task functions require explicit parameters.");c=H(a);l=c.length-1;a=c[l];if(0===l){d[b]=a;return}}else{if(1===l){d[b]=a;return}c=ab(a);if(0===l&&0===c.length)throw Error("autoInject task functions require explicit parameters."); -l=c.length-1}c[l]=function(b,d){switch(l){case 1:a(b[c[0]],d);break;case 2:a(b[c[0]],b[c[1]],d);break;case 3:a(b[c[0]],b[c[1]],b[c[2]],d);break;default:for(var f=-1;++fa)return b(null,[]);var e=Array(a);K(a,function(a){c(a,d(a))})},timesSeries:function(a,c,b){function d(){c(l, -e)}function e(c,e){f[l]=e;c?(b(c),b=A):++l>=a?(b(null,f),b=A):g?D(d):(g=!0,d());g=!1}b=b||w;a=+a;if(isNaN(a)||1>a)return b(null,[]);var f=Array(a),g=!1,l=0;d()},timesLimit:function(a,c,b,d){function e(){var c=q++;c=a?(d(null,g),d=A):l?D(e):(l=!0,e());l=!1}}d=d||w;a=+a;if(isNaN(a)||1>a||isNaN(c)||1>c)return d(null,[]);var g=Array(a),l=!1,q=0,s=0;K(c>a?a:c,e)},race:function(a,c){c=I(c||w);var b,d,e=-1;if(C(a))for(b= -a.length;++e`) are not ABI-stable across -Node.js major versions. Thus, an addon must use Node-API and/or `node-addon-api` -exclusively and build against a version of Node.js that includes an -implementation of Node-API (meaning an active LTS version of Node.js) in -order to benefit from ABI stability across Node.js major versions. Node.js -provides an [ABI stability guide][] containing a detailed explanation of ABI -stability in general, and the Node-API ABI stability guarantee in particular. - -As new APIs are added to Node-API, node-addon-api must be updated to provide -wrappers for those new APIs. For this reason, node-addon-api provides -methods that allow callers to obtain the underlying Node-API handles so -direct calls to Node-API and the use of the objects/methods provided by -node-addon-api can be used together. For example, in order to be able -to use an API for which the node-addon-api does not yet provide a wrapper. - -APIs exposed by node-addon-api are generally used to create and -manipulate JavaScript values. Concepts and operations generally map -to ideas specified in the **ECMA262 Language Specification**. - -The [Node-API Resource](https://nodejs.github.io/node-addon-examples/) offers an -excellent orientation and tips for developers just getting started with Node-API -and node-addon-api. - -- **[Setup](#setup)** -- **[API Documentation](#api)** -- **[Examples](#examples)** -- **[Tests](#tests)** -- **[More resource and info about native Addons](#resources)** -- **[Badges](#badges)** -- **[Code of Conduct](CODE_OF_CONDUCT.md)** -- **[Contributors](#contributors)** -- **[License](#license)** - -## **Current version: 7.1.1** - -(See [CHANGELOG.md](CHANGELOG.md) for complete Changelog) - -[![NPM](https://nodei.co/npm/node-addon-api.png?downloads=true&downloadRank=true)](https://nodei.co/npm/node-addon-api/) [![NPM](https://nodei.co/npm-dl/node-addon-api.png?months=6&height=1)](https://nodei.co/npm/node-addon-api/) - - - -node-addon-api is based on [Node-API](https://nodejs.org/api/n-api.html) and supports using different Node-API versions. -This allows addons built with it to run with Node.js versions which support the targeted Node-API version. -**However** the node-addon-api support model is to support only the active LTS Node.js versions. This means that -every year there will be a new major which drops support for the Node.js LTS version which has gone out of service. - -The oldest Node.js version supported by the current version of node-addon-api is Node.js 16.x. - -## Setup - - [Installation and usage](doc/setup.md) - - [node-gyp](doc/node-gyp.md) - - [cmake-js](doc/cmake-js.md) - - [Conversion tool](doc/conversion-tool.md) - - [Checker tool](doc/checker-tool.md) - - [Generator](doc/generator.md) - - [Prebuild tools](doc/prebuild_tools.md) - - - -### **API Documentation** - -The following is the documentation for node-addon-api. - - - [Full Class Hierarchy](doc/hierarchy.md) - - [Addon Structure](doc/addon.md) - - Data Types: - - [Env](doc/env.md) - - [CallbackInfo](doc/callbackinfo.md) - - [Reference](doc/reference.md) - - [Value](doc/value.md) - - [Name](doc/name.md) - - [Symbol](doc/symbol.md) - - [String](doc/string.md) - - [Number](doc/number.md) - - [Date](doc/date.md) - - [BigInt](doc/bigint.md) - - [Boolean](doc/boolean.md) - - [External](doc/external.md) - - [Object](doc/object.md) - - [Array](doc/array.md) - - [ObjectReference](doc/object_reference.md) - - [PropertyDescriptor](doc/property_descriptor.md) - - [Function](doc/function.md) - - [FunctionReference](doc/function_reference.md) - - [ObjectWrap](doc/object_wrap.md) - - [ClassPropertyDescriptor](doc/class_property_descriptor.md) - - [Buffer](doc/buffer.md) - - [ArrayBuffer](doc/array_buffer.md) - - [TypedArray](doc/typed_array.md) - - [TypedArrayOf](doc/typed_array_of.md) - - [DataView](doc/dataview.md) - - [Error Handling](doc/error_handling.md) - - [Error](doc/error.md) - - [TypeError](doc/type_error.md) - - [RangeError](doc/range_error.md) - - [SyntaxError](doc/syntax_error.md) - - [Object Lifetime Management](doc/object_lifetime_management.md) - - [HandleScope](doc/handle_scope.md) - - [EscapableHandleScope](doc/escapable_handle_scope.md) - - [Memory Management](doc/memory_management.md) - - [Async Operations](doc/async_operations.md) - - [AsyncWorker](doc/async_worker.md) - - [AsyncContext](doc/async_context.md) - - [AsyncWorker Variants](doc/async_worker_variants.md) - - [Thread-safe Functions](doc/threadsafe.md) - - [ThreadSafeFunction](doc/threadsafe_function.md) - - [TypedThreadSafeFunction](doc/typed_threadsafe_function.md) - - [Promises](doc/promises.md) - - [Version management](doc/version_management.md) - - - -### **Examples** - -Are you new to **node-addon-api**? Take a look at our **[examples](https://github.com/nodejs/node-addon-examples)** - -- **[Hello World](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/1_hello_world)** -- **[Pass arguments to a function](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/2_function_arguments/node-addon-api)** -- **[Callbacks](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/3_callbacks/node-addon-api)** -- **[Object factory](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/4_object_factory/node-addon-api)** -- **[Function factory](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/5_function_factory/node-addon-api)** -- **[Wrapping C++ Object](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/6_object_wrap/node-addon-api)** -- **[Factory of wrapped object](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/7_factory_wrap/node-addon-api)** -- **[Passing wrapped object around](https://github.com/nodejs/node-addon-examples/tree/main/src/2-js-to-native-conversion/8_passing_wrapped/node-addon-api)** - - - -### **Tests** - -To run the **node-addon-api** tests do: - -``` -npm install -npm test -``` - -To avoid testing the deprecated portions of the API run -``` -npm install -npm test --disable-deprecated -``` - -To run the tests targeting a specific version of Node-API run -``` -npm install -export NAPI_VERSION=X -npm test --NAPI_VERSION=X -``` - -where X is the version of Node-API you want to target. - -To run a specific unit test, filter conditions are available - -**Example:** - compile and run only tests on objectwrap.cc and objectwrap.js - ``` - npm run unit --filter=objectwrap - ``` - -Multiple unit tests cane be selected with wildcards - -**Example:** -compile and run all test files ending with "reference" -> function_reference.cc, object_reference.cc, reference.cc - ``` - npm run unit --filter=*reference - ``` - -Multiple filter conditions can be joined to broaden the test selection - -**Example:** - compile and run all tests under folders threadsafe_function and typed_threadsafe_function and also the objectwrap.cc file - npm run unit --filter='*function objectwrap' - -### **Debug** - -To run the **node-addon-api** tests with `--debug` option: - -``` -npm run-script dev -``` - -If you want a faster build, you might use the following option: - -``` -npm run-script dev:incremental -``` - -Take a look and get inspired by our **[test suite](https://github.com/nodejs/node-addon-api/tree/HEAD/test)** - -### **Benchmarks** - -You can run the available benchmarks using the following command: - -``` -npm run-script benchmark -``` - -See [benchmark/README.md](benchmark/README.md) for more details about running and adding benchmarks. - - - -### **More resource and info about native Addons** -- **[C++ Addons](https://nodejs.org/dist/latest/docs/api/addons.html)** -- **[Node-API](https://nodejs.org/dist/latest/docs/api/n-api.html)** -- **[Node-API - Next Generation Node API for Native Modules](https://youtu.be/-Oniup60Afs)** -- **[How We Migrated Realm JavaScript From NAN to Node-API](https://developer.mongodb.com/article/realm-javascript-nan-to-n-api)** - -As node-addon-api's core mission is to expose the plain C Node-API as C++ -wrappers, tools that facilitate n-api/node-addon-api providing more -convenient patterns for developing a Node.js add-on with n-api/node-addon-api -can be published to NPM as standalone packages. It is also recommended to tag -such packages with `node-addon-api` to provide more visibility to the community. - -Quick links to NPM searches: [keywords:node-addon-api](https://www.npmjs.com/search?q=keywords%3Anode-addon-api). - - - -### **Other bindings** - -- **[napi-rs](https://napi.rs)** - (`Rust`) - - - -### **Badges** - -The use of badges is recommended to indicate the minimum version of Node-API -required for the module. This helps to determine which Node.js major versions are -supported. Addon maintainers can consult the [Node-API support matrix][] to determine -which Node.js versions provide a given Node-API version. The following badges are -available: - -![Node-API v1 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v1%20Badge.svg) -![Node-API v2 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v2%20Badge.svg) -![Node-API v3 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v3%20Badge.svg) -![Node-API v4 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v4%20Badge.svg) -![Node-API v5 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v5%20Badge.svg) -![Node-API v6 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v6%20Badge.svg) -![Node-API v7 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v7%20Badge.svg) -![Node-API v8 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v8%20Badge.svg) -![Node-API v9 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v9%20Badge.svg) -![Node-API Experimental Version Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20Experimental%20Version%20Badge.svg) - -## **Contributing** - -We love contributions from the community to **node-addon-api**! -See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on our philosophy around extending this module. - - - -## Team members - -### Active -| Name | GitHub Link | -| ------------------- | ----------------------------------------------------- | -| Anna Henningsen | [addaleax](https://github.com/addaleax) | -| Chengzhong Wu | [legendecas](https://github.com/legendecas) | -| Jack Xia | [JckXia](https://github.com/JckXia) | -| Kevin Eady | [KevinEady](https://github.com/KevinEady) | -| Michael Dawson | [mhdawson](https://github.com/mhdawson) | -| Nicola Del Gobbo | [NickNaso](https://github.com/NickNaso) | -| Vladimir Morozov | [vmoroz](https://github.com/vmoroz) | - -### Emeritus -| Name | GitHub Link | -| ------------------- | ----------------------------------------------------- | -| Arunesh Chandra | [aruneshchandra](https://github.com/aruneshchandra) | -| Benjamin Byholm | [kkoopa](https://github.com/kkoopa) | -| Gabriel Schulhof | [gabrielschulhof](https://github.com/gabrielschulhof) | -| Hitesh Kanwathirtha | [digitalinfinity](https://github.com/digitalinfinity) | -| Jason Ginchereau | [jasongin](https://github.com/jasongin) | -| Jim Schlight | [jschlight](https://github.com/jschlight) | -| Sampson Gao | [sampsongao](https://github.com/sampsongao) | -| Taylor Woll | [boingoing](https://github.com/boingoing) | - - - -Licensed under [MIT](./LICENSE.md) - -[ABI stability guide]: https://nodejs.org/en/docs/guides/abi-stability/ -[Node-API support matrix]: https://nodejs.org/dist/latest/docs/api/n-api.html#n_api_n_api_version_matrix diff --git a/web/static/node_modules/node-addon-api/common.gypi b/web/static/node_modules/node-addon-api/common.gypi deleted file mode 100644 index 06c0176b..00000000 --- a/web/static/node_modules/node-addon-api/common.gypi +++ /dev/null @@ -1,20 +0,0 @@ -{ - 'variables': { - 'NAPI_VERSION%': " -inline PropertyDescriptor PropertyDescriptor::Accessor( - const char* utf8name, - Getter getter, - napi_property_attributes attributes, - void* /*data*/) { - using CbData = details::CallbackData; - // TODO: Delete when the function is destroyed - auto callbackData = new CbData({getter, nullptr}); - - return PropertyDescriptor({utf8name, - nullptr, - nullptr, - CbData::Wrapper, - nullptr, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - const std::string& utf8name, - Getter getter, - napi_property_attributes attributes, - void* data) { - return Accessor(utf8name.c_str(), getter, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - napi_value name, - Getter getter, - napi_property_attributes attributes, - void* /*data*/) { - using CbData = details::CallbackData; - // TODO: Delete when the function is destroyed - auto callbackData = new CbData({getter, nullptr}); - - return PropertyDescriptor({nullptr, - name, - nullptr, - CbData::Wrapper, - nullptr, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Name name, Getter getter, napi_property_attributes attributes, void* data) { - napi_value nameValue = name; - return PropertyDescriptor::Accessor(nameValue, getter, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - const char* utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* /*data*/) { - using CbData = details::AccessorCallbackData; - // TODO: Delete when the function is destroyed - auto callbackData = new CbData({getter, setter, nullptr}); - - return PropertyDescriptor({utf8name, - nullptr, - nullptr, - CbData::GetterWrapper, - CbData::SetterWrapper, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - const std::string& utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* data) { - return Accessor(utf8name.c_str(), getter, setter, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - napi_value name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* /*data*/) { - using CbData = details::AccessorCallbackData; - // TODO: Delete when the function is destroyed - auto callbackData = new CbData({getter, setter, nullptr}); - - return PropertyDescriptor({nullptr, - name, - nullptr, - CbData::GetterWrapper, - CbData::SetterWrapper, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Name name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* data) { - napi_value nameValue = name; - return PropertyDescriptor::Accessor( - nameValue, getter, setter, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - const char* utf8name, - Callable cb, - napi_property_attributes attributes, - void* /*data*/) { - using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr))); - using CbData = details::CallbackData; - // TODO: Delete when the function is destroyed - auto callbackData = new CbData({cb, nullptr}); - - return PropertyDescriptor({utf8name, - nullptr, - CbData::Wrapper, - nullptr, - nullptr, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - const std::string& utf8name, - Callable cb, - napi_property_attributes attributes, - void* data) { - return Function(utf8name.c_str(), cb, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - napi_value name, - Callable cb, - napi_property_attributes attributes, - void* /*data*/) { - using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr))); - using CbData = details::CallbackData; - // TODO: Delete when the function is destroyed - auto callbackData = new CbData({cb, nullptr}); - - return PropertyDescriptor({nullptr, - name, - CbData::Wrapper, - nullptr, - nullptr, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - Name name, Callable cb, napi_property_attributes attributes, void* data) { - napi_value nameValue = name; - return PropertyDescriptor::Function(nameValue, cb, attributes, data); -} - -#endif // !SRC_NAPI_INL_DEPRECATED_H_ diff --git a/web/static/node_modules/node-addon-api/napi-inl.h b/web/static/node_modules/node-addon-api/napi-inl.h deleted file mode 100644 index a5ae7af7..00000000 --- a/web/static/node_modules/node-addon-api/napi-inl.h +++ /dev/null @@ -1,6607 +0,0 @@ -#ifndef SRC_NAPI_INL_H_ -#define SRC_NAPI_INL_H_ - -//////////////////////////////////////////////////////////////////////////////// -// Node-API C++ Wrapper Classes -// -// Inline header-only implementations for "Node-API" ABI-stable C APIs for -// Node.js. -//////////////////////////////////////////////////////////////////////////////// - -// Note: Do not include this file directly! Include "napi.h" instead. - -#include -#include -#if NAPI_HAS_THREADS -#include -#endif // NAPI_HAS_THREADS -#include -#include - -namespace Napi { - -#ifdef NAPI_CPP_CUSTOM_NAMESPACE -namespace NAPI_CPP_CUSTOM_NAMESPACE { -#endif - -// Helpers to handle functions exposed from C++ and internal constants. -namespace details { - -// New napi_status constants not yet available in all supported versions of -// Node.js releases. Only necessary when they are used in napi.h and napi-inl.h. -constexpr int napi_no_external_buffers_allowed = 22; - -template -inline void default_finalizer(napi_env /*env*/, void* data, void* /*hint*/) { - delete static_cast(data); -} - -// Attach a data item to an object and delete it when the object gets -// garbage-collected. -// TODO: Replace this code with `napi_add_finalizer()` whenever it becomes -// available on all supported versions of Node.js. -template > -inline napi_status AttachData(napi_env env, - napi_value obj, - FreeType* data, - void* hint = nullptr) { - napi_status status; -#if (NAPI_VERSION < 5) - napi_value symbol, external; - status = napi_create_symbol(env, nullptr, &symbol); - if (status == napi_ok) { - status = napi_create_external(env, data, finalizer, hint, &external); - if (status == napi_ok) { - napi_property_descriptor desc = {nullptr, - symbol, - nullptr, - nullptr, - nullptr, - external, - napi_default, - nullptr}; - status = napi_define_properties(env, obj, 1, &desc); - } - } -#else // NAPI_VERSION >= 5 - status = napi_add_finalizer(env, obj, data, finalizer, hint, nullptr); -#endif - return status; -} - -// For use in JS to C++ callback wrappers to catch any Napi::Error exceptions -// and rethrow them as JavaScript exceptions before returning from the callback. -template -inline napi_value WrapCallback(Callable callback) { -#ifdef NAPI_CPP_EXCEPTIONS - try { - return callback(); - } catch (const Error& e) { - e.ThrowAsJavaScriptException(); - return nullptr; - } -#else // NAPI_CPP_EXCEPTIONS - // When C++ exceptions are disabled, errors are immediately thrown as JS - // exceptions, so there is no need to catch and rethrow them here. - return callback(); -#endif // NAPI_CPP_EXCEPTIONS -} - -// For use in JS to C++ void callback wrappers to catch any Napi::Error -// exceptions and rethrow them as JavaScript exceptions before returning from -// the callback. -template -inline void WrapVoidCallback(Callable callback) { -#ifdef NAPI_CPP_EXCEPTIONS - try { - callback(); - } catch (const Error& e) { - e.ThrowAsJavaScriptException(); - } -#else // NAPI_CPP_EXCEPTIONS - // When C++ exceptions are disabled, errors are immediately thrown as JS - // exceptions, so there is no need to catch and rethrow them here. - callback(); -#endif // NAPI_CPP_EXCEPTIONS -} - -template -struct CallbackData { - static inline napi_value Wrapper(napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - CallbackData* callbackData = - static_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - return callbackData->callback(callbackInfo); - }); - } - - Callable callback; - void* data; -}; - -template -struct CallbackData { - static inline napi_value Wrapper(napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - CallbackData* callbackData = - static_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - callbackData->callback(callbackInfo); - return nullptr; - }); - } - - Callable callback; - void* data; -}; - -template -napi_value TemplatedVoidCallback(napi_env env, - napi_callback_info info) NAPI_NOEXCEPT { - return details::WrapCallback([&] { - CallbackInfo cbInfo(env, info); - Callback(cbInfo); - return nullptr; - }); -} - -template -napi_value TemplatedCallback(napi_env env, - napi_callback_info info) NAPI_NOEXCEPT { - return details::WrapCallback([&] { - CallbackInfo cbInfo(env, info); - return Callback(cbInfo); - }); -} - -template -napi_value TemplatedInstanceCallback(napi_env env, - napi_callback_info info) NAPI_NOEXCEPT { - return details::WrapCallback([&] { - CallbackInfo cbInfo(env, info); - T* instance = T::Unwrap(cbInfo.This().As()); - return instance ? (instance->*UnwrapCallback)(cbInfo) : Napi::Value(); - }); -} - -template -napi_value TemplatedInstanceVoidCallback(napi_env env, napi_callback_info info) - NAPI_NOEXCEPT { - return details::WrapCallback([&] { - CallbackInfo cbInfo(env, info); - T* instance = T::Unwrap(cbInfo.This().As()); - if (instance) (instance->*UnwrapCallback)(cbInfo); - return nullptr; - }); -} - -template -struct FinalizeData { - static inline void Wrapper(napi_env env, - void* data, - void* finalizeHint) NAPI_NOEXCEPT { - WrapVoidCallback([&] { - FinalizeData* finalizeData = static_cast(finalizeHint); - finalizeData->callback(Env(env), static_cast(data)); - delete finalizeData; - }); - } - - static inline void WrapperWithHint(napi_env env, - void* data, - void* finalizeHint) NAPI_NOEXCEPT { - WrapVoidCallback([&] { - FinalizeData* finalizeData = static_cast(finalizeHint); - finalizeData->callback( - Env(env), static_cast(data), finalizeData->hint); - delete finalizeData; - }); - } - - Finalizer callback; - Hint* hint; -}; - -#if (NAPI_VERSION > 3 && NAPI_HAS_THREADS) -template , - typename FinalizerDataType = void> -struct ThreadSafeFinalize { - static inline void Wrapper(napi_env env, - void* rawFinalizeData, - void* /* rawContext */) { - if (rawFinalizeData == nullptr) return; - - ThreadSafeFinalize* finalizeData = - static_cast(rawFinalizeData); - finalizeData->callback(Env(env)); - delete finalizeData; - } - - static inline void FinalizeWrapperWithData(napi_env env, - void* rawFinalizeData, - void* /* rawContext */) { - if (rawFinalizeData == nullptr) return; - - ThreadSafeFinalize* finalizeData = - static_cast(rawFinalizeData); - finalizeData->callback(Env(env), finalizeData->data); - delete finalizeData; - } - - static inline void FinalizeWrapperWithContext(napi_env env, - void* rawFinalizeData, - void* rawContext) { - if (rawFinalizeData == nullptr) return; - - ThreadSafeFinalize* finalizeData = - static_cast(rawFinalizeData); - finalizeData->callback(Env(env), static_cast(rawContext)); - delete finalizeData; - } - - static inline void FinalizeFinalizeWrapperWithDataAndContext( - napi_env env, void* rawFinalizeData, void* rawContext) { - if (rawFinalizeData == nullptr) return; - - ThreadSafeFinalize* finalizeData = - static_cast(rawFinalizeData); - finalizeData->callback( - Env(env), finalizeData->data, static_cast(rawContext)); - delete finalizeData; - } - - FinalizerDataType* data; - Finalizer callback; -}; - -template -inline typename std::enable_if(nullptr)>::type -CallJsWrapper(napi_env env, napi_value jsCallback, void* context, void* data) { - details::WrapVoidCallback([&]() { - call(env, - Function(env, jsCallback), - static_cast(context), - static_cast(data)); - }); -} - -template -inline typename std::enable_if(nullptr)>::type -CallJsWrapper(napi_env env, - napi_value jsCallback, - void* /*context*/, - void* /*data*/) { - details::WrapVoidCallback([&]() { - if (jsCallback != nullptr) { - Function(env, jsCallback).Call(0, nullptr); - } - }); -} - -#if NAPI_VERSION > 4 - -template -napi_value DefaultCallbackWrapper(napi_env /*env*/, std::nullptr_t /*cb*/) { - return nullptr; -} - -template -napi_value DefaultCallbackWrapper(napi_env /*env*/, Napi::Function cb) { - return cb; -} - -#else -template -napi_value DefaultCallbackWrapper(napi_env env, Napi::Function cb) { - if (cb.IsEmpty()) { - return TSFN::EmptyFunctionFactory(env); - } - return cb; -} -#endif // NAPI_VERSION > 4 -#endif // NAPI_VERSION > 3 && NAPI_HAS_THREADS - -template -struct AccessorCallbackData { - static inline napi_value GetterWrapper(napi_env env, - napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - AccessorCallbackData* callbackData = - static_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - return callbackData->getterCallback(callbackInfo); - }); - } - - static inline napi_value SetterWrapper(napi_env env, - napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - AccessorCallbackData* callbackData = - static_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - callbackData->setterCallback(callbackInfo); - return nullptr; - }); - } - - Getter getterCallback; - Setter setterCallback; - void* data; -}; - -} // namespace details - -#ifndef NODE_ADDON_API_DISABLE_DEPRECATED -#include "napi-inl.deprecated.h" -#endif // !NODE_ADDON_API_DISABLE_DEPRECATED - -//////////////////////////////////////////////////////////////////////////////// -// Module registration -//////////////////////////////////////////////////////////////////////////////// - -// Register an add-on based on an initializer function. -#define NODE_API_MODULE(modname, regfunc) \ - static napi_value __napi_##regfunc(napi_env env, napi_value exports) { \ - return Napi::RegisterModule(env, exports, regfunc); \ - } \ - NAPI_MODULE(modname, __napi_##regfunc) - -// Register an add-on based on a subclass of `Addon` with a custom Node.js -// module name. -#define NODE_API_NAMED_ADDON(modname, classname) \ - static napi_value __napi_##classname(napi_env env, napi_value exports) { \ - return Napi::RegisterModule(env, exports, &classname::Init); \ - } \ - NAPI_MODULE(modname, __napi_##classname) - -// Register an add-on based on a subclass of `Addon` with the Node.js module -// name given by node-gyp from the `target_name` in binding.gyp. -#define NODE_API_ADDON(classname) \ - NODE_API_NAMED_ADDON(NODE_GYP_MODULE_NAME, classname) - -// Adapt the NAPI_MODULE registration function: -// - Wrap the arguments in NAPI wrappers. -// - Catch any NAPI errors and rethrow as JS exceptions. -inline napi_value RegisterModule(napi_env env, - napi_value exports, - ModuleRegisterCallback registerCallback) { - return details::WrapCallback([&] { - return napi_value( - registerCallback(Napi::Env(env), Napi::Object(env, exports))); - }); -} - -//////////////////////////////////////////////////////////////////////////////// -// Maybe class -//////////////////////////////////////////////////////////////////////////////// - -template -bool Maybe::IsNothing() const { - return !_has_value; -} - -template -bool Maybe::IsJust() const { - return _has_value; -} - -template -void Maybe::Check() const { - NAPI_CHECK(IsJust(), "Napi::Maybe::Check", "Maybe value is Nothing."); -} - -template -T Maybe::Unwrap() const { - NAPI_CHECK(IsJust(), "Napi::Maybe::Unwrap", "Maybe value is Nothing."); - return _value; -} - -template -T Maybe::UnwrapOr(const T& default_value) const { - return _has_value ? _value : default_value; -} - -template -bool Maybe::UnwrapTo(T* out) const { - if (IsJust()) { - *out = _value; - return true; - }; - return false; -} - -template -bool Maybe::operator==(const Maybe& other) const { - return (IsJust() == other.IsJust()) && - (!IsJust() || Unwrap() == other.Unwrap()); -} - -template -bool Maybe::operator!=(const Maybe& other) const { - return !operator==(other); -} - -template -Maybe::Maybe() : _has_value(false) {} - -template -Maybe::Maybe(const T& t) : _has_value(true), _value(t) {} - -template -inline Maybe Nothing() { - return Maybe(); -} - -template -inline Maybe Just(const T& t) { - return Maybe(t); -} - -//////////////////////////////////////////////////////////////////////////////// -// Env class -//////////////////////////////////////////////////////////////////////////////// - -inline Env::Env(napi_env env) : _env(env) {} - -inline Env::operator napi_env() const { - return _env; -} - -inline Object Env::Global() const { - napi_value value; - napi_status status = napi_get_global(*this, &value); - NAPI_THROW_IF_FAILED(*this, status, Object()); - return Object(*this, value); -} - -inline Value Env::Undefined() const { - napi_value value; - napi_status status = napi_get_undefined(*this, &value); - NAPI_THROW_IF_FAILED(*this, status, Value()); - return Value(*this, value); -} - -inline Value Env::Null() const { - napi_value value; - napi_status status = napi_get_null(*this, &value); - NAPI_THROW_IF_FAILED(*this, status, Value()); - return Value(*this, value); -} - -inline bool Env::IsExceptionPending() const { - bool result; - napi_status status = napi_is_exception_pending(_env, &result); - if (status != napi_ok) - result = false; // Checking for a pending exception shouldn't throw. - return result; -} - -inline Error Env::GetAndClearPendingException() const { - napi_value value; - napi_status status = napi_get_and_clear_last_exception(_env, &value); - if (status != napi_ok) { - // Don't throw another exception when failing to get the exception! - return Error(); - } - return Error(_env, value); -} - -inline MaybeOrValue Env::RunScript(const char* utf8script) const { - String script = String::New(_env, utf8script); - return RunScript(script); -} - -inline MaybeOrValue Env::RunScript(const std::string& utf8script) const { - return RunScript(utf8script.c_str()); -} - -inline MaybeOrValue Env::RunScript(String script) const { - napi_value result; - napi_status status = napi_run_script(_env, script, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Value(_env, result), Napi::Value); -} - -#if NAPI_VERSION > 2 -template -void Env::CleanupHook::Wrapper(void* data) NAPI_NOEXCEPT { - auto* cleanupData = - static_cast::CleanupData*>( - data); - cleanupData->hook(); - delete cleanupData; -} - -template -void Env::CleanupHook::WrapperWithArg(void* data) NAPI_NOEXCEPT { - auto* cleanupData = - static_cast::CleanupData*>( - data); - cleanupData->hook(static_cast(cleanupData->arg)); - delete cleanupData; -} -#endif // NAPI_VERSION > 2 - -#if NAPI_VERSION > 5 -template fini> -inline void Env::SetInstanceData(T* data) const { - napi_status status = napi_set_instance_data( - _env, - data, - [](napi_env env, void* data, void*) { fini(env, static_cast(data)); }, - nullptr); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -template fini> -inline void Env::SetInstanceData(DataType* data, HintType* hint) const { - napi_status status = napi_set_instance_data( - _env, - data, - [](napi_env env, void* data, void* hint) { - fini(env, static_cast(data), static_cast(hint)); - }, - hint); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -template -inline T* Env::GetInstanceData() const { - void* data = nullptr; - - napi_status status = napi_get_instance_data(_env, &data); - NAPI_THROW_IF_FAILED(_env, status, nullptr); - - return static_cast(data); -} - -template -void Env::DefaultFini(Env, T* data) { - delete data; -} - -template -void Env::DefaultFiniWithHint(Env, DataType* data, HintType*) { - delete data; -} -#endif // NAPI_VERSION > 5 - -#if NAPI_VERSION > 8 -inline const char* Env::GetModuleFileName() const { - const char* result; - napi_status status = node_api_get_module_file_name(_env, &result); - NAPI_THROW_IF_FAILED(*this, status, nullptr); - return result; -} -#endif // NAPI_VERSION > 8 -//////////////////////////////////////////////////////////////////////////////// -// Value class -//////////////////////////////////////////////////////////////////////////////// - -inline Value::Value() : _env(nullptr), _value(nullptr) {} - -inline Value::Value(napi_env env, napi_value value) - : _env(env), _value(value) {} - -inline Value::operator napi_value() const { - return _value; -} - -inline bool Value::operator==(const Value& other) const { - return StrictEquals(other); -} - -inline bool Value::operator!=(const Value& other) const { - return !this->operator==(other); -} - -inline bool Value::StrictEquals(const Value& other) const { - bool result; - napi_status status = napi_strict_equals(_env, *this, other, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline Napi::Env Value::Env() const { - return Napi::Env(_env); -} - -inline bool Value::IsEmpty() const { - return _value == nullptr; -} - -inline napi_valuetype Value::Type() const { - if (IsEmpty()) { - return napi_undefined; - } - - napi_valuetype type; - napi_status status = napi_typeof(_env, _value, &type); - NAPI_THROW_IF_FAILED(_env, status, napi_undefined); - return type; -} - -inline bool Value::IsUndefined() const { - return Type() == napi_undefined; -} - -inline bool Value::IsNull() const { - return Type() == napi_null; -} - -inline bool Value::IsBoolean() const { - return Type() == napi_boolean; -} - -inline bool Value::IsNumber() const { - return Type() == napi_number; -} - -#if NAPI_VERSION > 5 -inline bool Value::IsBigInt() const { - return Type() == napi_bigint; -} -#endif // NAPI_VERSION > 5 - -#if (NAPI_VERSION > 4) -inline bool Value::IsDate() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_date(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} -#endif - -inline bool Value::IsString() const { - return Type() == napi_string; -} - -inline bool Value::IsSymbol() const { - return Type() == napi_symbol; -} - -inline bool Value::IsArray() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_array(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline bool Value::IsArrayBuffer() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_arraybuffer(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline bool Value::IsTypedArray() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_typedarray(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline bool Value::IsObject() const { - return Type() == napi_object || IsFunction(); -} - -inline bool Value::IsFunction() const { - return Type() == napi_function; -} - -inline bool Value::IsPromise() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_promise(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline bool Value::IsDataView() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_dataview(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline bool Value::IsBuffer() const { - if (IsEmpty()) { - return false; - } - - bool result; - napi_status status = napi_is_buffer(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -inline bool Value::IsExternal() const { - return Type() == napi_external; -} - -template -inline T Value::As() const { -#ifdef NODE_ADDON_API_ENABLE_TYPE_CHECK_ON_AS - T::CheckCast(_env, _value); -#endif - return T(_env, _value); -} - -inline MaybeOrValue Value::ToBoolean() const { - napi_value result; - napi_status status = napi_coerce_to_bool(_env, _value, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Boolean(_env, result), Napi::Boolean); -} - -inline MaybeOrValue Value::ToNumber() const { - napi_value result; - napi_status status = napi_coerce_to_number(_env, _value, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Number(_env, result), Napi::Number); -} - -inline MaybeOrValue Value::ToString() const { - napi_value result; - napi_status status = napi_coerce_to_string(_env, _value, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::String(_env, result), Napi::String); -} - -inline MaybeOrValue Value::ToObject() const { - napi_value result; - napi_status status = napi_coerce_to_object(_env, _value, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Object(_env, result), Napi::Object); -} - -//////////////////////////////////////////////////////////////////////////////// -// Boolean class -//////////////////////////////////////////////////////////////////////////////// - -inline Boolean Boolean::New(napi_env env, bool val) { - napi_value value; - napi_status status = napi_get_boolean(env, val, &value); - NAPI_THROW_IF_FAILED(env, status, Boolean()); - return Boolean(env, value); -} - -inline void Boolean::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Boolean::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "Boolean::CheckCast", "napi_typeof failed"); - NAPI_CHECK( - type == napi_boolean, "Boolean::CheckCast", "value is not napi_boolean"); -} - -inline Boolean::Boolean() : Napi::Value() {} - -inline Boolean::Boolean(napi_env env, napi_value value) - : Napi::Value(env, value) {} - -inline Boolean::operator bool() const { - return Value(); -} - -inline bool Boolean::Value() const { - bool result; - napi_status status = napi_get_value_bool(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -//////////////////////////////////////////////////////////////////////////////// -// Number class -//////////////////////////////////////////////////////////////////////////////// - -inline Number Number::New(napi_env env, double val) { - napi_value value; - napi_status status = napi_create_double(env, val, &value); - NAPI_THROW_IF_FAILED(env, status, Number()); - return Number(env, value); -} - -inline void Number::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Number::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "Number::CheckCast", "napi_typeof failed"); - NAPI_CHECK( - type == napi_number, "Number::CheckCast", "value is not napi_number"); -} - -inline Number::Number() : Value() {} - -inline Number::Number(napi_env env, napi_value value) : Value(env, value) {} - -inline Number::operator int32_t() const { - return Int32Value(); -} - -inline Number::operator uint32_t() const { - return Uint32Value(); -} - -inline Number::operator int64_t() const { - return Int64Value(); -} - -inline Number::operator float() const { - return FloatValue(); -} - -inline Number::operator double() const { - return DoubleValue(); -} - -inline int32_t Number::Int32Value() const { - int32_t result; - napi_status status = napi_get_value_int32(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -inline uint32_t Number::Uint32Value() const { - uint32_t result; - napi_status status = napi_get_value_uint32(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -inline int64_t Number::Int64Value() const { - int64_t result; - napi_status status = napi_get_value_int64(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -inline float Number::FloatValue() const { - return static_cast(DoubleValue()); -} - -inline double Number::DoubleValue() const { - double result; - napi_status status = napi_get_value_double(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -#if NAPI_VERSION > 5 -//////////////////////////////////////////////////////////////////////////////// -// BigInt Class -//////////////////////////////////////////////////////////////////////////////// - -inline BigInt BigInt::New(napi_env env, int64_t val) { - napi_value value; - napi_status status = napi_create_bigint_int64(env, val, &value); - NAPI_THROW_IF_FAILED(env, status, BigInt()); - return BigInt(env, value); -} - -inline BigInt BigInt::New(napi_env env, uint64_t val) { - napi_value value; - napi_status status = napi_create_bigint_uint64(env, val, &value); - NAPI_THROW_IF_FAILED(env, status, BigInt()); - return BigInt(env, value); -} - -inline BigInt BigInt::New(napi_env env, - int sign_bit, - size_t word_count, - const uint64_t* words) { - napi_value value; - napi_status status = - napi_create_bigint_words(env, sign_bit, word_count, words, &value); - NAPI_THROW_IF_FAILED(env, status, BigInt()); - return BigInt(env, value); -} - -inline void BigInt::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "BigInt::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "BigInt::CheckCast", "napi_typeof failed"); - NAPI_CHECK( - type == napi_bigint, "BigInt::CheckCast", "value is not napi_bigint"); -} - -inline BigInt::BigInt() : Value() {} - -inline BigInt::BigInt(napi_env env, napi_value value) : Value(env, value) {} - -inline int64_t BigInt::Int64Value(bool* lossless) const { - int64_t result; - napi_status status = - napi_get_value_bigint_int64(_env, _value, &result, lossless); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -inline uint64_t BigInt::Uint64Value(bool* lossless) const { - uint64_t result; - napi_status status = - napi_get_value_bigint_uint64(_env, _value, &result, lossless); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -inline size_t BigInt::WordCount() const { - size_t word_count; - napi_status status = - napi_get_value_bigint_words(_env, _value, nullptr, &word_count, nullptr); - NAPI_THROW_IF_FAILED(_env, status, 0); - return word_count; -} - -inline void BigInt::ToWords(int* sign_bit, - size_t* word_count, - uint64_t* words) { - napi_status status = - napi_get_value_bigint_words(_env, _value, sign_bit, word_count, words); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} -#endif // NAPI_VERSION > 5 - -#if (NAPI_VERSION > 4) -//////////////////////////////////////////////////////////////////////////////// -// Date Class -//////////////////////////////////////////////////////////////////////////////// - -inline Date Date::New(napi_env env, double val) { - napi_value value; - napi_status status = napi_create_date(env, val, &value); - NAPI_THROW_IF_FAILED(env, status, Date()); - return Date(env, value); -} - -inline void Date::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Date::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_date(env, value, &result); - NAPI_CHECK(status == napi_ok, "Date::CheckCast", "napi_is_date failed"); - NAPI_CHECK(result, "Date::CheckCast", "value is not date"); -} - -inline Date::Date() : Value() {} - -inline Date::Date(napi_env env, napi_value value) : Value(env, value) {} - -inline Date::operator double() const { - return ValueOf(); -} - -inline double Date::ValueOf() const { - double result; - napi_status status = napi_get_date_value(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Name class -//////////////////////////////////////////////////////////////////////////////// -inline void Name::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Name::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "Name::CheckCast", "napi_typeof failed"); - NAPI_CHECK(type == napi_string || type == napi_symbol, - "Name::CheckCast", - "value is not napi_string or napi_symbol"); -} - -inline Name::Name() : Value() {} - -inline Name::Name(napi_env env, napi_value value) : Value(env, value) {} - -//////////////////////////////////////////////////////////////////////////////// -// String class -//////////////////////////////////////////////////////////////////////////////// - -inline String String::New(napi_env env, const std::string& val) { - return String::New(env, val.c_str(), val.size()); -} - -inline String String::New(napi_env env, const std::u16string& val) { - return String::New(env, val.c_str(), val.size()); -} - -inline String String::New(napi_env env, const char* val) { - // TODO(@gabrielschulhof) Remove if-statement when core's error handling is - // available in all supported versions. - if (val == nullptr) { - // Throw an error that looks like it came from core. - NAPI_THROW_IF_FAILED(env, napi_invalid_arg, String()); - } - napi_value value; - napi_status status = - napi_create_string_utf8(env, val, std::strlen(val), &value); - NAPI_THROW_IF_FAILED(env, status, String()); - return String(env, value); -} - -inline String String::New(napi_env env, const char16_t* val) { - napi_value value; - // TODO(@gabrielschulhof) Remove if-statement when core's error handling is - // available in all supported versions. - if (val == nullptr) { - // Throw an error that looks like it came from core. - NAPI_THROW_IF_FAILED(env, napi_invalid_arg, String()); - } - napi_status status = - napi_create_string_utf16(env, val, std::u16string(val).size(), &value); - NAPI_THROW_IF_FAILED(env, status, String()); - return String(env, value); -} - -inline String String::New(napi_env env, const char* val, size_t length) { - napi_value value; - napi_status status = napi_create_string_utf8(env, val, length, &value); - NAPI_THROW_IF_FAILED(env, status, String()); - return String(env, value); -} - -inline String String::New(napi_env env, const char16_t* val, size_t length) { - napi_value value; - napi_status status = napi_create_string_utf16(env, val, length, &value); - NAPI_THROW_IF_FAILED(env, status, String()); - return String(env, value); -} - -inline void String::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "String::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "String::CheckCast", "napi_typeof failed"); - NAPI_CHECK( - type == napi_string, "String::CheckCast", "value is not napi_string"); -} - -inline String::String() : Name() {} - -inline String::String(napi_env env, napi_value value) : Name(env, value) {} - -inline String::operator std::string() const { - return Utf8Value(); -} - -inline String::operator std::u16string() const { - return Utf16Value(); -} - -inline std::string String::Utf8Value() const { - size_t length; - napi_status status = - napi_get_value_string_utf8(_env, _value, nullptr, 0, &length); - NAPI_THROW_IF_FAILED(_env, status, ""); - - std::string value; - value.reserve(length + 1); - value.resize(length); - status = napi_get_value_string_utf8( - _env, _value, &value[0], value.capacity(), nullptr); - NAPI_THROW_IF_FAILED(_env, status, ""); - return value; -} - -inline std::u16string String::Utf16Value() const { - size_t length; - napi_status status = - napi_get_value_string_utf16(_env, _value, nullptr, 0, &length); - NAPI_THROW_IF_FAILED(_env, status, NAPI_WIDE_TEXT("")); - - std::u16string value; - value.reserve(length + 1); - value.resize(length); - status = napi_get_value_string_utf16( - _env, _value, &value[0], value.capacity(), nullptr); - NAPI_THROW_IF_FAILED(_env, status, NAPI_WIDE_TEXT("")); - return value; -} - -//////////////////////////////////////////////////////////////////////////////// -// Symbol class -//////////////////////////////////////////////////////////////////////////////// - -inline Symbol Symbol::New(napi_env env, const char* description) { - napi_value descriptionValue = description != nullptr - ? String::New(env, description) - : static_cast(nullptr); - return Symbol::New(env, descriptionValue); -} - -inline Symbol Symbol::New(napi_env env, const std::string& description) { - napi_value descriptionValue = String::New(env, description); - return Symbol::New(env, descriptionValue); -} - -inline Symbol Symbol::New(napi_env env, String description) { - napi_value descriptionValue = description; - return Symbol::New(env, descriptionValue); -} - -inline Symbol Symbol::New(napi_env env, napi_value description) { - napi_value value; - napi_status status = napi_create_symbol(env, description, &value); - NAPI_THROW_IF_FAILED(env, status, Symbol()); - return Symbol(env, value); -} - -inline MaybeOrValue Symbol::WellKnown(napi_env env, - const std::string& name) { -#if defined(NODE_ADDON_API_ENABLE_MAYBE) - Value symbol_obj; - Value symbol_value; - if (Napi::Env(env).Global().Get("Symbol").UnwrapTo(&symbol_obj) && - symbol_obj.As().Get(name).UnwrapTo(&symbol_value)) { - return Just(symbol_value.As()); - } - return Nothing(); -#else - return Napi::Env(env) - .Global() - .Get("Symbol") - .As() - .Get(name) - .As(); -#endif -} - -inline MaybeOrValue Symbol::For(napi_env env, - const std::string& description) { - napi_value descriptionValue = String::New(env, description); - return Symbol::For(env, descriptionValue); -} - -inline MaybeOrValue Symbol::For(napi_env env, const char* description) { - napi_value descriptionValue = String::New(env, description); - return Symbol::For(env, descriptionValue); -} - -inline MaybeOrValue Symbol::For(napi_env env, String description) { - return Symbol::For(env, static_cast(description)); -} - -inline MaybeOrValue Symbol::For(napi_env env, napi_value description) { -#if defined(NODE_ADDON_API_ENABLE_MAYBE) - Value symbol_obj; - Value symbol_for_value; - Value symbol_value; - if (Napi::Env(env).Global().Get("Symbol").UnwrapTo(&symbol_obj) && - symbol_obj.As().Get("for").UnwrapTo(&symbol_for_value) && - symbol_for_value.As() - .Call(symbol_obj, {description}) - .UnwrapTo(&symbol_value)) { - return Just(symbol_value.As()); - } - return Nothing(); -#else - Object symbol_obj = Napi::Env(env).Global().Get("Symbol").As(); - return symbol_obj.Get("for") - .As() - .Call(symbol_obj, {description}) - .As(); -#endif -} - -inline void Symbol::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Symbol::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "Symbol::CheckCast", "napi_typeof failed"); - NAPI_CHECK( - type == napi_symbol, "Symbol::CheckCast", "value is not napi_symbol"); -} - -inline Symbol::Symbol() : Name() {} - -inline Symbol::Symbol(napi_env env, napi_value value) : Name(env, value) {} - -//////////////////////////////////////////////////////////////////////////////// -// Automagic value creation -//////////////////////////////////////////////////////////////////////////////// - -namespace details { -template -struct vf_number { - static Number From(napi_env env, T value) { - return Number::New(env, static_cast(value)); - } -}; - -template <> -struct vf_number { - static Boolean From(napi_env env, bool value) { - return Boolean::New(env, value); - } -}; - -struct vf_utf8_charp { - static String From(napi_env env, const char* value) { - return String::New(env, value); - } -}; - -struct vf_utf16_charp { - static String From(napi_env env, const char16_t* value) { - return String::New(env, value); - } -}; -struct vf_utf8_string { - static String From(napi_env env, const std::string& value) { - return String::New(env, value); - } -}; - -struct vf_utf16_string { - static String From(napi_env env, const std::u16string& value) { - return String::New(env, value); - } -}; - -template -struct vf_fallback { - static Value From(napi_env env, const T& value) { return Value(env, value); } -}; - -template -struct disjunction : std::false_type {}; -template -struct disjunction : B {}; -template -struct disjunction - : std::conditional>::type {}; - -template -struct can_make_string - : disjunction::type, - typename std::is_convertible::type, - typename std::is_convertible::type, - typename std::is_convertible::type> {}; -} // namespace details - -template -Value Value::From(napi_env env, const T& value) { - using Helper = typename std::conditional< - std::is_integral::value || std::is_floating_point::value, - details::vf_number, - typename std::conditional::value, - String, - details::vf_fallback>::type>::type; - return Helper::From(env, value); -} - -template -String String::From(napi_env env, const T& value) { - struct Dummy {}; - using Helper = typename std::conditional< - std::is_convertible::value, - details::vf_utf8_charp, - typename std::conditional< - std::is_convertible::value, - details::vf_utf16_charp, - typename std::conditional< - std::is_convertible::value, - details::vf_utf8_string, - typename std::conditional< - std::is_convertible::value, - details::vf_utf16_string, - Dummy>::type>::type>::type>::type; - return Helper::From(env, value); -} - -//////////////////////////////////////////////////////////////////////////////// -// TypeTaggable class -//////////////////////////////////////////////////////////////////////////////// - -inline TypeTaggable::TypeTaggable() : Value() {} - -inline TypeTaggable::TypeTaggable(napi_env _env, napi_value _value) - : Value(_env, _value) {} - -#if NAPI_VERSION >= 8 - -inline void TypeTaggable::TypeTag(const napi_type_tag* type_tag) const { - napi_status status = napi_type_tag_object(_env, _value, type_tag); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline bool TypeTaggable::CheckTypeTag(const napi_type_tag* type_tag) const { - bool result; - napi_status status = - napi_check_object_type_tag(_env, _value, type_tag, &result); - NAPI_THROW_IF_FAILED(_env, status, false); - return result; -} - -#endif // NAPI_VERSION >= 8 - -//////////////////////////////////////////////////////////////////////////////// -// Object class -//////////////////////////////////////////////////////////////////////////////// - -template -inline Object::PropertyLValue::operator Value() const { - MaybeOrValue val = Object(_env, _object).Get(_key); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - return val.Unwrap(); -#else - return val; -#endif -} - -template -template -inline Object::PropertyLValue& Object::PropertyLValue::operator=( - ValueType value) { -#ifdef NODE_ADDON_API_ENABLE_MAYBE - MaybeOrValue result = -#endif - Object(_env, _object).Set(_key, value); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - result.Unwrap(); -#endif - return *this; -} - -template -inline Object::PropertyLValue::PropertyLValue(Object object, Key key) - : _env(object.Env()), _object(object), _key(key) {} - -inline Object Object::New(napi_env env) { - napi_value value; - napi_status status = napi_create_object(env, &value); - NAPI_THROW_IF_FAILED(env, status, Object()); - return Object(env, value); -} - -inline void Object::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Object::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "Object::CheckCast", "napi_typeof failed"); - NAPI_CHECK( - type == napi_object, "Object::CheckCast", "value is not napi_object"); -} - -inline Object::Object() : TypeTaggable() {} - -inline Object::Object(napi_env env, napi_value value) - : TypeTaggable(env, value) {} - -inline Object::PropertyLValue Object::operator[]( - const char* utf8name) { - return PropertyLValue(*this, utf8name); -} - -inline Object::PropertyLValue Object::operator[]( - const std::string& utf8name) { - return PropertyLValue(*this, utf8name); -} - -inline Object::PropertyLValue Object::operator[](uint32_t index) { - return PropertyLValue(*this, index); -} - -inline Object::PropertyLValue Object::operator[](Value index) const { - return PropertyLValue(*this, index); -} - -inline MaybeOrValue Object::operator[](const char* utf8name) const { - return Get(utf8name); -} - -inline MaybeOrValue Object::operator[]( - const std::string& utf8name) const { - return Get(utf8name); -} - -inline MaybeOrValue Object::operator[](uint32_t index) const { - return Get(index); -} - -inline MaybeOrValue Object::Has(napi_value key) const { - bool result; - napi_status status = napi_has_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::Has(Value key) const { - bool result; - napi_status status = napi_has_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::Has(const char* utf8name) const { - bool result; - napi_status status = napi_has_named_property(_env, _value, utf8name, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::Has(const std::string& utf8name) const { - return Has(utf8name.c_str()); -} - -inline MaybeOrValue Object::HasOwnProperty(napi_value key) const { - bool result; - napi_status status = napi_has_own_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::HasOwnProperty(Value key) const { - bool result; - napi_status status = napi_has_own_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::HasOwnProperty(const char* utf8name) const { - napi_value key; - napi_status status = - napi_create_string_utf8(_env, utf8name, std::strlen(utf8name), &key); - NAPI_MAYBE_THROW_IF_FAILED(_env, status, bool); - return HasOwnProperty(key); -} - -inline MaybeOrValue Object::HasOwnProperty( - const std::string& utf8name) const { - return HasOwnProperty(utf8name.c_str()); -} - -inline MaybeOrValue Object::Get(napi_value key) const { - napi_value result; - napi_status status = napi_get_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, Value(_env, result), Value); -} - -inline MaybeOrValue Object::Get(Value key) const { - napi_value result; - napi_status status = napi_get_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, Value(_env, result), Value); -} - -inline MaybeOrValue Object::Get(const char* utf8name) const { - napi_value result; - napi_status status = napi_get_named_property(_env, _value, utf8name, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, Value(_env, result), Value); -} - -inline MaybeOrValue Object::Get(const std::string& utf8name) const { - return Get(utf8name.c_str()); -} - -template -inline MaybeOrValue Object::Set(napi_value key, - const ValueType& value) const { - napi_status status = - napi_set_property(_env, _value, key, Value::From(_env, value)); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -template -inline MaybeOrValue Object::Set(Value key, const ValueType& value) const { - napi_status status = - napi_set_property(_env, _value, key, Value::From(_env, value)); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -template -inline MaybeOrValue Object::Set(const char* utf8name, - const ValueType& value) const { - napi_status status = - napi_set_named_property(_env, _value, utf8name, Value::From(_env, value)); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -template -inline MaybeOrValue Object::Set(const std::string& utf8name, - const ValueType& value) const { - return Set(utf8name.c_str(), value); -} - -inline MaybeOrValue Object::Delete(napi_value key) const { - bool result; - napi_status status = napi_delete_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::Delete(Value key) const { - bool result; - napi_status status = napi_delete_property(_env, _value, key, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::Delete(const char* utf8name) const { - return Delete(String::New(_env, utf8name)); -} - -inline MaybeOrValue Object::Delete(const std::string& utf8name) const { - return Delete(String::New(_env, utf8name)); -} - -inline MaybeOrValue Object::Has(uint32_t index) const { - bool result; - napi_status status = napi_has_element(_env, _value, index, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::Get(uint32_t index) const { - napi_value value; - napi_status status = napi_get_element(_env, _value, index, &value); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, Value(_env, value), Value); -} - -template -inline MaybeOrValue Object::Set(uint32_t index, - const ValueType& value) const { - napi_status status = - napi_set_element(_env, _value, index, Value::From(_env, value)); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -inline MaybeOrValue Object::Delete(uint32_t index) const { - bool result; - napi_status status = napi_delete_element(_env, _value, index, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -inline MaybeOrValue Object::GetPropertyNames() const { - napi_value result; - napi_status status = napi_get_property_names(_env, _value, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, Array(_env, result), Array); -} - -inline MaybeOrValue Object::DefineProperty( - const PropertyDescriptor& property) const { - napi_status status = napi_define_properties( - _env, - _value, - 1, - reinterpret_cast(&property)); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -inline MaybeOrValue Object::DefineProperties( - const std::initializer_list& properties) const { - napi_status status = napi_define_properties( - _env, - _value, - properties.size(), - reinterpret_cast(properties.begin())); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -inline MaybeOrValue Object::DefineProperties( - const std::vector& properties) const { - napi_status status = napi_define_properties( - _env, - _value, - properties.size(), - reinterpret_cast(properties.data())); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -inline MaybeOrValue Object::InstanceOf( - const Function& constructor) const { - bool result; - napi_status status = napi_instanceof(_env, _value, constructor, &result); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, result, bool); -} - -template -inline void Object::AddFinalizer(Finalizer finalizeCallback, T* data) const { - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), nullptr}); - napi_status status = - details::AttachData::Wrapper>( - _env, *this, data, finalizeData); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED_VOID(_env, status); - } -} - -template -inline void Object::AddFinalizer(Finalizer finalizeCallback, - T* data, - Hint* finalizeHint) const { - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), finalizeHint}); - napi_status status = details:: - AttachData::WrapperWithHint>( - _env, *this, data, finalizeData); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED_VOID(_env, status); - } -} - -#ifdef NAPI_CPP_EXCEPTIONS -inline Object::const_iterator::const_iterator(const Object* object, - const Type type) { - _object = object; - _keys = object->GetPropertyNames(); - _index = type == Type::BEGIN ? 0 : _keys.Length(); -} - -inline Object::const_iterator Napi::Object::begin() const { - const_iterator it(this, Object::const_iterator::Type::BEGIN); - return it; -} - -inline Object::const_iterator Napi::Object::end() const { - const_iterator it(this, Object::const_iterator::Type::END); - return it; -} - -inline Object::const_iterator& Object::const_iterator::operator++() { - ++_index; - return *this; -} - -inline bool Object::const_iterator::operator==( - const const_iterator& other) const { - return _index == other._index; -} - -inline bool Object::const_iterator::operator!=( - const const_iterator& other) const { - return _index != other._index; -} - -inline const std::pair> -Object::const_iterator::operator*() const { - const Value key = _keys[_index]; - const PropertyLValue value = (*_object)[key]; - return {key, value}; -} - -inline Object::iterator::iterator(Object* object, const Type type) { - _object = object; - _keys = object->GetPropertyNames(); - _index = type == Type::BEGIN ? 0 : _keys.Length(); -} - -inline Object::iterator Napi::Object::begin() { - iterator it(this, Object::iterator::Type::BEGIN); - return it; -} - -inline Object::iterator Napi::Object::end() { - iterator it(this, Object::iterator::Type::END); - return it; -} - -inline Object::iterator& Object::iterator::operator++() { - ++_index; - return *this; -} - -inline bool Object::iterator::operator==(const iterator& other) const { - return _index == other._index; -} - -inline bool Object::iterator::operator!=(const iterator& other) const { - return _index != other._index; -} - -inline std::pair> -Object::iterator::operator*() { - Value key = _keys[_index]; - PropertyLValue value = (*_object)[key]; - return {key, value}; -} -#endif // NAPI_CPP_EXCEPTIONS - -#if NAPI_VERSION >= 8 -inline MaybeOrValue Object::Freeze() const { - napi_status status = napi_object_freeze(_env, _value); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} - -inline MaybeOrValue Object::Seal() const { - napi_status status = napi_object_seal(_env, _value); - NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool); -} -#endif // NAPI_VERSION >= 8 - -//////////////////////////////////////////////////////////////////////////////// -// External class -//////////////////////////////////////////////////////////////////////////////// - -template -inline External External::New(napi_env env, T* data) { - napi_value value; - napi_status status = - napi_create_external(env, data, nullptr, nullptr, &value); - NAPI_THROW_IF_FAILED(env, status, External()); - return External(env, value); -} - -template -template -inline External External::New(napi_env env, - T* data, - Finalizer finalizeCallback) { - napi_value value; - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), nullptr}); - napi_status status = - napi_create_external(env, - data, - details::FinalizeData::Wrapper, - finalizeData, - &value); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, External()); - } - return External(env, value); -} - -template -template -inline External External::New(napi_env env, - T* data, - Finalizer finalizeCallback, - Hint* finalizeHint) { - napi_value value; - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), finalizeHint}); - napi_status status = napi_create_external( - env, - data, - details::FinalizeData::WrapperWithHint, - finalizeData, - &value); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, External()); - } - return External(env, value); -} - -template -inline void External::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "External::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "External::CheckCast", "napi_typeof failed"); - NAPI_CHECK(type == napi_external, - "External::CheckCast", - "value is not napi_external"); -} - -template -inline External::External() : TypeTaggable() {} - -template -inline External::External(napi_env env, napi_value value) - : TypeTaggable(env, value) {} - -template -inline T* External::Data() const { - void* data; - napi_status status = napi_get_value_external(_env, _value, &data); - NAPI_THROW_IF_FAILED(_env, status, nullptr); - return reinterpret_cast(data); -} - -//////////////////////////////////////////////////////////////////////////////// -// Array class -//////////////////////////////////////////////////////////////////////////////// - -inline Array Array::New(napi_env env) { - napi_value value; - napi_status status = napi_create_array(env, &value); - NAPI_THROW_IF_FAILED(env, status, Array()); - return Array(env, value); -} - -inline Array Array::New(napi_env env, size_t length) { - napi_value value; - napi_status status = napi_create_array_with_length(env, length, &value); - NAPI_THROW_IF_FAILED(env, status, Array()); - return Array(env, value); -} - -inline void Array::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Array::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_array(env, value, &result); - NAPI_CHECK(status == napi_ok, "Array::CheckCast", "napi_is_array failed"); - NAPI_CHECK(result, "Array::CheckCast", "value is not array"); -} - -inline Array::Array() : Object() {} - -inline Array::Array(napi_env env, napi_value value) : Object(env, value) {} - -inline uint32_t Array::Length() const { - uint32_t result; - napi_status status = napi_get_array_length(_env, _value, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -//////////////////////////////////////////////////////////////////////////////// -// ArrayBuffer class -//////////////////////////////////////////////////////////////////////////////// - -inline ArrayBuffer ArrayBuffer::New(napi_env env, size_t byteLength) { - napi_value value; - void* data; - napi_status status = napi_create_arraybuffer(env, byteLength, &data, &value); - NAPI_THROW_IF_FAILED(env, status, ArrayBuffer()); - - return ArrayBuffer(env, value); -} - -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED -inline ArrayBuffer ArrayBuffer::New(napi_env env, - void* externalData, - size_t byteLength) { - napi_value value; - napi_status status = napi_create_external_arraybuffer( - env, externalData, byteLength, nullptr, nullptr, &value); - NAPI_THROW_IF_FAILED(env, status, ArrayBuffer()); - - return ArrayBuffer(env, value); -} - -template -inline ArrayBuffer ArrayBuffer::New(napi_env env, - void* externalData, - size_t byteLength, - Finalizer finalizeCallback) { - napi_value value; - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), nullptr}); - napi_status status = napi_create_external_arraybuffer( - env, - externalData, - byteLength, - details::FinalizeData::Wrapper, - finalizeData, - &value); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, ArrayBuffer()); - } - - return ArrayBuffer(env, value); -} - -template -inline ArrayBuffer ArrayBuffer::New(napi_env env, - void* externalData, - size_t byteLength, - Finalizer finalizeCallback, - Hint* finalizeHint) { - napi_value value; - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), finalizeHint}); - napi_status status = napi_create_external_arraybuffer( - env, - externalData, - byteLength, - details::FinalizeData::WrapperWithHint, - finalizeData, - &value); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, ArrayBuffer()); - } - - return ArrayBuffer(env, value); -} -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - -inline void ArrayBuffer::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "ArrayBuffer::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_arraybuffer(env, value, &result); - NAPI_CHECK(status == napi_ok, - "ArrayBuffer::CheckCast", - "napi_is_arraybuffer failed"); - NAPI_CHECK(result, "ArrayBuffer::CheckCast", "value is not arraybuffer"); -} - -inline ArrayBuffer::ArrayBuffer() : Object() {} - -inline ArrayBuffer::ArrayBuffer(napi_env env, napi_value value) - : Object(env, value) {} - -inline void* ArrayBuffer::Data() { - void* data; - napi_status status = napi_get_arraybuffer_info(_env, _value, &data, nullptr); - NAPI_THROW_IF_FAILED(_env, status, nullptr); - return data; -} - -inline size_t ArrayBuffer::ByteLength() { - size_t length; - napi_status status = - napi_get_arraybuffer_info(_env, _value, nullptr, &length); - NAPI_THROW_IF_FAILED(_env, status, 0); - return length; -} - -#if NAPI_VERSION >= 7 -inline bool ArrayBuffer::IsDetached() const { - bool detached; - napi_status status = napi_is_detached_arraybuffer(_env, _value, &detached); - NAPI_THROW_IF_FAILED(_env, status, false); - return detached; -} - -inline void ArrayBuffer::Detach() { - napi_status status = napi_detach_arraybuffer(_env, _value); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} -#endif // NAPI_VERSION >= 7 - -//////////////////////////////////////////////////////////////////////////////// -// DataView class -//////////////////////////////////////////////////////////////////////////////// -inline DataView DataView::New(napi_env env, Napi::ArrayBuffer arrayBuffer) { - return New(env, arrayBuffer, 0, arrayBuffer.ByteLength()); -} - -inline DataView DataView::New(napi_env env, - Napi::ArrayBuffer arrayBuffer, - size_t byteOffset) { - if (byteOffset > arrayBuffer.ByteLength()) { - NAPI_THROW(RangeError::New( - env, "Start offset is outside the bounds of the buffer"), - DataView()); - } - return New( - env, arrayBuffer, byteOffset, arrayBuffer.ByteLength() - byteOffset); -} - -inline DataView DataView::New(napi_env env, - Napi::ArrayBuffer arrayBuffer, - size_t byteOffset, - size_t byteLength) { - if (byteOffset + byteLength > arrayBuffer.ByteLength()) { - NAPI_THROW(RangeError::New(env, "Invalid DataView length"), DataView()); - } - napi_value value; - napi_status status = - napi_create_dataview(env, byteLength, arrayBuffer, byteOffset, &value); - NAPI_THROW_IF_FAILED(env, status, DataView()); - return DataView(env, value); -} - -inline void DataView::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "DataView::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_dataview(env, value, &result); - NAPI_CHECK( - status == napi_ok, "DataView::CheckCast", "napi_is_dataview failed"); - NAPI_CHECK(result, "DataView::CheckCast", "value is not dataview"); -} - -inline DataView::DataView() : Object() {} - -inline DataView::DataView(napi_env env, napi_value value) : Object(env, value) { - napi_status status = napi_get_dataview_info(_env, - _value /* dataView */, - &_length /* byteLength */, - &_data /* data */, - nullptr /* arrayBuffer */, - nullptr /* byteOffset */); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline Napi::ArrayBuffer DataView::ArrayBuffer() const { - napi_value arrayBuffer; - napi_status status = napi_get_dataview_info(_env, - _value /* dataView */, - nullptr /* byteLength */, - nullptr /* data */, - &arrayBuffer /* arrayBuffer */, - nullptr /* byteOffset */); - NAPI_THROW_IF_FAILED(_env, status, Napi::ArrayBuffer()); - return Napi::ArrayBuffer(_env, arrayBuffer); -} - -inline size_t DataView::ByteOffset() const { - size_t byteOffset; - napi_status status = napi_get_dataview_info(_env, - _value /* dataView */, - nullptr /* byteLength */, - nullptr /* data */, - nullptr /* arrayBuffer */, - &byteOffset /* byteOffset */); - NAPI_THROW_IF_FAILED(_env, status, 0); - return byteOffset; -} - -inline size_t DataView::ByteLength() const { - return _length; -} - -inline void* DataView::Data() const { - return _data; -} - -inline float DataView::GetFloat32(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline double DataView::GetFloat64(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline int8_t DataView::GetInt8(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline int16_t DataView::GetInt16(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline int32_t DataView::GetInt32(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline uint8_t DataView::GetUint8(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline uint16_t DataView::GetUint16(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline uint32_t DataView::GetUint32(size_t byteOffset) const { - return ReadData(byteOffset); -} - -inline void DataView::SetFloat32(size_t byteOffset, float value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetFloat64(size_t byteOffset, double value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetInt8(size_t byteOffset, int8_t value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetInt16(size_t byteOffset, int16_t value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetInt32(size_t byteOffset, int32_t value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetUint8(size_t byteOffset, uint8_t value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetUint16(size_t byteOffset, uint16_t value) const { - WriteData(byteOffset, value); -} - -inline void DataView::SetUint32(size_t byteOffset, uint32_t value) const { - WriteData(byteOffset, value); -} - -template -inline T DataView::ReadData(size_t byteOffset) const { - if (byteOffset + sizeof(T) > _length || - byteOffset + sizeof(T) < byteOffset) { // overflow - NAPI_THROW( - RangeError::New(_env, "Offset is outside the bounds of the DataView"), - 0); - } - - return *reinterpret_cast(static_cast(_data) + byteOffset); -} - -template -inline void DataView::WriteData(size_t byteOffset, T value) const { - if (byteOffset + sizeof(T) > _length || - byteOffset + sizeof(T) < byteOffset) { // overflow - NAPI_THROW_VOID( - RangeError::New(_env, "Offset is outside the bounds of the DataView")); - } - - *reinterpret_cast(static_cast(_data) + byteOffset) = value; -} - -//////////////////////////////////////////////////////////////////////////////// -// TypedArray class -//////////////////////////////////////////////////////////////////////////////// -inline void TypedArray::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "TypedArray::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_typedarray(env, value, &result); - NAPI_CHECK( - status == napi_ok, "TypedArray::CheckCast", "napi_is_typedarray failed"); - NAPI_CHECK(result, "TypedArray::CheckCast", "value is not typedarray"); -} - -inline TypedArray::TypedArray() - : Object(), _type(napi_typedarray_type::napi_int8_array), _length(0) {} - -inline TypedArray::TypedArray(napi_env env, napi_value value) - : Object(env, value), - _type(napi_typedarray_type::napi_int8_array), - _length(0) { - if (value != nullptr) { - napi_status status = - napi_get_typedarray_info(_env, - _value, - &const_cast(this)->_type, - &const_cast(this)->_length, - nullptr, - nullptr, - nullptr); - NAPI_THROW_IF_FAILED_VOID(_env, status); - } -} - -inline TypedArray::TypedArray(napi_env env, - napi_value value, - napi_typedarray_type type, - size_t length) - : Object(env, value), _type(type), _length(length) {} - -inline napi_typedarray_type TypedArray::TypedArrayType() const { - return _type; -} - -inline uint8_t TypedArray::ElementSize() const { - switch (_type) { - case napi_int8_array: - case napi_uint8_array: - case napi_uint8_clamped_array: - return 1; - case napi_int16_array: - case napi_uint16_array: - return 2; - case napi_int32_array: - case napi_uint32_array: - case napi_float32_array: - return 4; - case napi_float64_array: -#if (NAPI_VERSION > 5) - case napi_bigint64_array: - case napi_biguint64_array: -#endif // (NAPI_VERSION > 5) - return 8; - default: - return 0; - } -} - -inline size_t TypedArray::ElementLength() const { - return _length; -} - -inline size_t TypedArray::ByteOffset() const { - size_t byteOffset; - napi_status status = napi_get_typedarray_info( - _env, _value, nullptr, nullptr, nullptr, nullptr, &byteOffset); - NAPI_THROW_IF_FAILED(_env, status, 0); - return byteOffset; -} - -inline size_t TypedArray::ByteLength() const { - return ElementSize() * ElementLength(); -} - -inline Napi::ArrayBuffer TypedArray::ArrayBuffer() const { - napi_value arrayBuffer; - napi_status status = napi_get_typedarray_info( - _env, _value, nullptr, nullptr, nullptr, &arrayBuffer, nullptr); - NAPI_THROW_IF_FAILED(_env, status, Napi::ArrayBuffer()); - return Napi::ArrayBuffer(_env, arrayBuffer); -} - -//////////////////////////////////////////////////////////////////////////////// -// TypedArrayOf class -//////////////////////////////////////////////////////////////////////////////// -template -inline void TypedArrayOf::CheckCast(napi_env env, napi_value value) { - TypedArray::CheckCast(env, value); - napi_typedarray_type type; - napi_status status = napi_get_typedarray_info( - env, value, &type, nullptr, nullptr, nullptr, nullptr); - NAPI_CHECK(status == napi_ok, - "TypedArrayOf::CheckCast", - "napi_is_typedarray failed"); - - NAPI_CHECK( - (type == TypedArrayTypeForPrimitiveType() || - (type == napi_uint8_clamped_array && std::is_same::value)), - "TypedArrayOf::CheckCast", - "Array type must match the template parameter. (Uint8 arrays may " - "optionally have the \"clamped\" array type.)"); -} - -template -inline TypedArrayOf TypedArrayOf::New(napi_env env, - size_t elementLength, - napi_typedarray_type type) { - Napi::ArrayBuffer arrayBuffer = - Napi::ArrayBuffer::New(env, elementLength * sizeof(T)); - return New(env, elementLength, arrayBuffer, 0, type); -} - -template -inline TypedArrayOf TypedArrayOf::New(napi_env env, - size_t elementLength, - Napi::ArrayBuffer arrayBuffer, - size_t bufferOffset, - napi_typedarray_type type) { - napi_value value; - napi_status status = napi_create_typedarray( - env, type, elementLength, arrayBuffer, bufferOffset, &value); - NAPI_THROW_IF_FAILED(env, status, TypedArrayOf()); - - return TypedArrayOf( - env, - value, - type, - elementLength, - reinterpret_cast(reinterpret_cast(arrayBuffer.Data()) + - bufferOffset)); -} - -template -inline TypedArrayOf::TypedArrayOf() : TypedArray(), _data(nullptr) {} - -template -inline TypedArrayOf::TypedArrayOf(napi_env env, napi_value value) - : TypedArray(env, value), _data(nullptr) { - napi_status status = napi_ok; - if (value != nullptr) { - void* data = nullptr; - status = napi_get_typedarray_info( - _env, _value, &_type, &_length, &data, nullptr, nullptr); - _data = static_cast(data); - } else { - _type = TypedArrayTypeForPrimitiveType(); - _length = 0; - } - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -template -inline TypedArrayOf::TypedArrayOf(napi_env env, - napi_value value, - napi_typedarray_type type, - size_t length, - T* data) - : TypedArray(env, value, type, length), _data(data) { - if (!(type == TypedArrayTypeForPrimitiveType() || - (type == napi_uint8_clamped_array && - std::is_same::value))) { - NAPI_THROW_VOID(TypeError::New( - env, - "Array type must match the template parameter. " - "(Uint8 arrays may optionally have the \"clamped\" array type.)")); - } -} - -template -inline T& TypedArrayOf::operator[](size_t index) { - return _data[index]; -} - -template -inline const T& TypedArrayOf::operator[](size_t index) const { - return _data[index]; -} - -template -inline T* TypedArrayOf::Data() { - return _data; -} - -template -inline const T* TypedArrayOf::Data() const { - return _data; -} - -//////////////////////////////////////////////////////////////////////////////// -// Function class -//////////////////////////////////////////////////////////////////////////////// - -template -inline napi_status CreateFunction(napi_env env, - const char* utf8name, - napi_callback cb, - CbData* data, - napi_value* result) { - napi_status status = - napi_create_function(env, utf8name, NAPI_AUTO_LENGTH, cb, data, result); - if (status == napi_ok) { - status = Napi::details::AttachData(env, *result, data); - } - - return status; -} - -template -inline Function Function::New(napi_env env, const char* utf8name, void* data) { - napi_value result = nullptr; - napi_status status = napi_create_function(env, - utf8name, - NAPI_AUTO_LENGTH, - details::TemplatedVoidCallback, - data, - &result); - NAPI_THROW_IF_FAILED(env, status, Function()); - return Function(env, result); -} - -template -inline Function Function::New(napi_env env, const char* utf8name, void* data) { - napi_value result = nullptr; - napi_status status = napi_create_function(env, - utf8name, - NAPI_AUTO_LENGTH, - details::TemplatedCallback, - data, - &result); - NAPI_THROW_IF_FAILED(env, status, Function()); - return Function(env, result); -} - -template -inline Function Function::New(napi_env env, - const std::string& utf8name, - void* data) { - return Function::New(env, utf8name.c_str(), data); -} - -template -inline Function Function::New(napi_env env, - const std::string& utf8name, - void* data) { - return Function::New(env, utf8name.c_str(), data); -} - -template -inline Function Function::New(napi_env env, - Callable cb, - const char* utf8name, - void* data) { - using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr))); - using CbData = details::CallbackData; - auto callbackData = new CbData{std::move(cb), data}; - - napi_value value; - napi_status status = - CreateFunction(env, utf8name, CbData::Wrapper, callbackData, &value); - if (status != napi_ok) { - delete callbackData; - NAPI_THROW_IF_FAILED(env, status, Function()); - } - - return Function(env, value); -} - -template -inline Function Function::New(napi_env env, - Callable cb, - const std::string& utf8name, - void* data) { - return New(env, cb, utf8name.c_str(), data); -} - -inline void Function::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Function::CheckCast", "empty value"); - - napi_valuetype type; - napi_status status = napi_typeof(env, value, &type); - NAPI_CHECK(status == napi_ok, "Function::CheckCast", "napi_typeof failed"); - NAPI_CHECK(type == napi_function, - "Function::CheckCast", - "value is not napi_function"); -} - -inline Function::Function() : Object() {} - -inline Function::Function(napi_env env, napi_value value) - : Object(env, value) {} - -inline MaybeOrValue Function::operator()( - const std::initializer_list& args) const { - return Call(Env().Undefined(), args); -} - -inline MaybeOrValue Function::Call( - const std::initializer_list& args) const { - return Call(Env().Undefined(), args); -} - -inline MaybeOrValue Function::Call( - const std::vector& args) const { - return Call(Env().Undefined(), args); -} - -inline MaybeOrValue Function::Call( - const std::vector& args) const { - return Call(Env().Undefined(), args); -} - -inline MaybeOrValue Function::Call(size_t argc, - const napi_value* args) const { - return Call(Env().Undefined(), argc, args); -} - -inline MaybeOrValue Function::Call( - napi_value recv, const std::initializer_list& args) const { - return Call(recv, args.size(), args.begin()); -} - -inline MaybeOrValue Function::Call( - napi_value recv, const std::vector& args) const { - return Call(recv, args.size(), args.data()); -} - -inline MaybeOrValue Function::Call( - napi_value recv, const std::vector& args) const { - const size_t argc = args.size(); - const size_t stackArgsCount = 6; - napi_value stackArgs[stackArgsCount]; - std::vector heapArgs; - napi_value* argv; - if (argc <= stackArgsCount) { - argv = stackArgs; - } else { - heapArgs.resize(argc); - argv = heapArgs.data(); - } - - for (size_t index = 0; index < argc; index++) { - argv[index] = static_cast(args[index]); - } - - return Call(recv, argc, argv); -} - -inline MaybeOrValue Function::Call(napi_value recv, - size_t argc, - const napi_value* args) const { - napi_value result; - napi_status status = - napi_call_function(_env, recv, _value, argc, args, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Value(_env, result), Napi::Value); -} - -inline MaybeOrValue Function::MakeCallback( - napi_value recv, - const std::initializer_list& args, - napi_async_context context) const { - return MakeCallback(recv, args.size(), args.begin(), context); -} - -inline MaybeOrValue Function::MakeCallback( - napi_value recv, - const std::vector& args, - napi_async_context context) const { - return MakeCallback(recv, args.size(), args.data(), context); -} - -inline MaybeOrValue Function::MakeCallback( - napi_value recv, - size_t argc, - const napi_value* args, - napi_async_context context) const { - napi_value result; - napi_status status = - napi_make_callback(_env, context, recv, _value, argc, args, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Value(_env, result), Napi::Value); -} - -inline MaybeOrValue Function::New( - const std::initializer_list& args) const { - return New(args.size(), args.begin()); -} - -inline MaybeOrValue Function::New( - const std::vector& args) const { - return New(args.size(), args.data()); -} - -inline MaybeOrValue Function::New(size_t argc, - const napi_value* args) const { - napi_value result; - napi_status status = napi_new_instance(_env, _value, argc, args, &result); - NAPI_RETURN_OR_THROW_IF_FAILED( - _env, status, Napi::Object(_env, result), Napi::Object); -} - -//////////////////////////////////////////////////////////////////////////////// -// Promise class -//////////////////////////////////////////////////////////////////////////////// - -inline Promise::Deferred Promise::Deferred::New(napi_env env) { - return Promise::Deferred(env); -} - -inline Promise::Deferred::Deferred(napi_env env) : _env(env) { - napi_status status = napi_create_promise(_env, &_deferred, &_promise); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline Promise Promise::Deferred::Promise() const { - return Napi::Promise(_env, _promise); -} - -inline Napi::Env Promise::Deferred::Env() const { - return Napi::Env(_env); -} - -inline void Promise::Deferred::Resolve(napi_value value) const { - napi_status status = napi_resolve_deferred(_env, _deferred, value); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline void Promise::Deferred::Reject(napi_value value) const { - napi_status status = napi_reject_deferred(_env, _deferred, value); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline void Promise::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Promise::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_promise(env, value, &result); - NAPI_CHECK(status == napi_ok, "Promise::CheckCast", "napi_is_promise failed"); - NAPI_CHECK(result, "Promise::CheckCast", "value is not promise"); -} - -inline Promise::Promise(napi_env env, napi_value value) : Object(env, value) {} - -//////////////////////////////////////////////////////////////////////////////// -// Buffer class -//////////////////////////////////////////////////////////////////////////////// - -template -inline Buffer Buffer::New(napi_env env, size_t length) { - napi_value value; - void* data; - napi_status status = - napi_create_buffer(env, length * sizeof(T), &data, &value); - NAPI_THROW_IF_FAILED(env, status, Buffer()); - return Buffer(env, value); -} - -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED -template -inline Buffer Buffer::New(napi_env env, T* data, size_t length) { - napi_value value; - napi_status status = napi_create_external_buffer( - env, length * sizeof(T), data, nullptr, nullptr, &value); - NAPI_THROW_IF_FAILED(env, status, Buffer()); - return Buffer(env, value); -} - -template -template -inline Buffer Buffer::New(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback) { - napi_value value; - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), nullptr}); - napi_status status = - napi_create_external_buffer(env, - length * sizeof(T), - data, - details::FinalizeData::Wrapper, - finalizeData, - &value); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, Buffer()); - } - return Buffer(env, value); -} - -template -template -inline Buffer Buffer::New(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback, - Hint* finalizeHint) { - napi_value value; - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), finalizeHint}); - napi_status status = napi_create_external_buffer( - env, - length * sizeof(T), - data, - details::FinalizeData::WrapperWithHint, - finalizeData, - &value); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, Buffer()); - } - return Buffer(env, value); -} -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - -template -inline Buffer Buffer::NewOrCopy(napi_env env, T* data, size_t length) { -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - napi_value value; - napi_status status = napi_create_external_buffer( - env, length * sizeof(T), data, nullptr, nullptr, &value); - if (status == details::napi_no_external_buffers_allowed) { -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - // If we can't create an external buffer, we'll just copy the data. - return Buffer::Copy(env, data, length); -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - } - NAPI_THROW_IF_FAILED(env, status, Buffer()); - return Buffer(env, value); -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED -} - -template -template -inline Buffer Buffer::NewOrCopy(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback) { - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), nullptr}); -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - napi_value value; - napi_status status = - napi_create_external_buffer(env, - length * sizeof(T), - data, - details::FinalizeData::Wrapper, - finalizeData, - &value); - if (status == details::napi_no_external_buffers_allowed) { -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - // If we can't create an external buffer, we'll just copy the data. - Buffer ret = Buffer::Copy(env, data, length); - details::FinalizeData::Wrapper(env, data, finalizeData); - return ret; -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - } - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, Buffer()); - } - return Buffer(env, value); -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED -} - -template -template -inline Buffer Buffer::NewOrCopy(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback, - Hint* finalizeHint) { - details::FinalizeData* finalizeData = - new details::FinalizeData( - {std::move(finalizeCallback), finalizeHint}); -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - napi_value value; - napi_status status = napi_create_external_buffer( - env, - length * sizeof(T), - data, - details::FinalizeData::WrapperWithHint, - finalizeData, - &value); - if (status == details::napi_no_external_buffers_allowed) { -#endif - // If we can't create an external buffer, we'll just copy the data. - Buffer ret = Buffer::Copy(env, data, length); - details::FinalizeData::WrapperWithHint( - env, data, finalizeData); - return ret; -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - } - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, Buffer()); - } - return Buffer(env, value); -#endif -} - -template -inline Buffer Buffer::Copy(napi_env env, const T* data, size_t length) { - napi_value value; - napi_status status = - napi_create_buffer_copy(env, length * sizeof(T), data, nullptr, &value); - NAPI_THROW_IF_FAILED(env, status, Buffer()); - return Buffer(env, value); -} - -template -inline void Buffer::CheckCast(napi_env env, napi_value value) { - NAPI_CHECK(value != nullptr, "Buffer::CheckCast", "empty value"); - - bool result; - napi_status status = napi_is_buffer(env, value, &result); - NAPI_CHECK(status == napi_ok, "Buffer::CheckCast", "napi_is_buffer failed"); - NAPI_CHECK(result, "Buffer::CheckCast", "value is not buffer"); -} - -template -inline Buffer::Buffer() : Uint8Array() {} - -template -inline Buffer::Buffer(napi_env env, napi_value value) - : Uint8Array(env, value) {} - -template -inline size_t Buffer::Length() const { - return ByteLength() / sizeof(T); -} - -template -inline T* Buffer::Data() const { - return reinterpret_cast(const_cast(Uint8Array::Data())); -} - -//////////////////////////////////////////////////////////////////////////////// -// Error class -//////////////////////////////////////////////////////////////////////////////// - -inline Error Error::New(napi_env env) { - napi_status status; - napi_value error = nullptr; - bool is_exception_pending; - napi_extended_error_info last_error_info_copy; - - { - // We must retrieve the last error info before doing anything else because - // doing anything else will replace the last error info. - const napi_extended_error_info* last_error_info; - status = napi_get_last_error_info(env, &last_error_info); - NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_get_last_error_info"); - - // All fields of the `napi_extended_error_info` structure gets reset in - // subsequent Node-API function calls on the same `env`. This includes a - // call to `napi_is_exception_pending()`. So here it is necessary to make a - // copy of the information as the `error_code` field is used later on. - memcpy(&last_error_info_copy, - last_error_info, - sizeof(napi_extended_error_info)); - } - - status = napi_is_exception_pending(env, &is_exception_pending); - NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_is_exception_pending"); - - // A pending exception takes precedence over any internal error status. - if (is_exception_pending) { - status = napi_get_and_clear_last_exception(env, &error); - NAPI_FATAL_IF_FAILED( - status, "Error::New", "napi_get_and_clear_last_exception"); - } else { - const char* error_message = last_error_info_copy.error_message != nullptr - ? last_error_info_copy.error_message - : "Error in native callback"; - - napi_value message; - status = napi_create_string_utf8( - env, error_message, std::strlen(error_message), &message); - NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_create_string_utf8"); - - switch (last_error_info_copy.error_code) { - case napi_object_expected: - case napi_string_expected: - case napi_boolean_expected: - case napi_number_expected: - status = napi_create_type_error(env, nullptr, message, &error); - break; - default: - status = napi_create_error(env, nullptr, message, &error); - break; - } - NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_create_error"); - } - - return Error(env, error); -} - -inline Error Error::New(napi_env env, const char* message) { - return Error::New( - env, message, std::strlen(message), napi_create_error); -} - -inline Error Error::New(napi_env env, const std::string& message) { - return Error::New( - env, message.c_str(), message.size(), napi_create_error); -} - -inline NAPI_NO_RETURN void Error::Fatal(const char* location, - const char* message) { - napi_fatal_error(location, NAPI_AUTO_LENGTH, message, NAPI_AUTO_LENGTH); -} - -inline Error::Error() : ObjectReference() {} - -inline Error::Error(napi_env env, napi_value value) - : ObjectReference(env, nullptr) { - if (value != nullptr) { - // Attempting to create a reference on the error object. - // If it's not a Object/Function/Symbol, this call will return an error - // status. - napi_status status = napi_create_reference(env, value, 1, &_ref); - - if (status != napi_ok) { - napi_value wrappedErrorObj; - - // Create an error object - status = napi_create_object(env, &wrappedErrorObj); - NAPI_FATAL_IF_FAILED(status, "Error::Error", "napi_create_object"); - - // property flag that we attach to show the error object is wrapped - napi_property_descriptor wrapObjFlag = { - ERROR_WRAP_VALUE(), // Unique GUID identifier since Symbol isn't a - // viable option - nullptr, - nullptr, - nullptr, - nullptr, - Value::From(env, value), - napi_enumerable, - nullptr}; - - status = napi_define_properties(env, wrappedErrorObj, 1, &wrapObjFlag); -#ifdef NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS - if (status == napi_pending_exception) { - // Test if the pending exception was reported because the environment is - // shutting down. We assume that a status of napi_pending_exception - // coupled with the absence of an actual pending exception means that - // the environment is shutting down. If so, we replace the - // napi_pending_exception status with napi_ok. - bool is_exception_pending = false; - status = napi_is_exception_pending(env, &is_exception_pending); - if (status == napi_ok && !is_exception_pending) { - status = napi_ok; - } else { - status = napi_pending_exception; - } - } -#endif // NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS - NAPI_FATAL_IF_FAILED(status, "Error::Error", "napi_define_properties"); - - // Create a reference on the newly wrapped object - status = napi_create_reference(env, wrappedErrorObj, 1, &_ref); - } - - // Avoid infinite recursion in the failure case. - NAPI_FATAL_IF_FAILED(status, "Error::Error", "napi_create_reference"); - } -} - -inline Object Error::Value() const { - if (_ref == nullptr) { - return Object(_env, nullptr); - } - - napi_value refValue; - napi_status status = napi_get_reference_value(_env, _ref, &refValue); - NAPI_THROW_IF_FAILED(_env, status, Object()); - - napi_valuetype type; - status = napi_typeof(_env, refValue, &type); - NAPI_THROW_IF_FAILED(_env, status, Object()); - - // If refValue isn't a symbol, then we proceed to whether the refValue has the - // wrapped error flag - if (type != napi_symbol) { - // We are checking if the object is wrapped - bool isWrappedObject = false; - - status = napi_has_property(_env, - refValue, - String::From(_env, ERROR_WRAP_VALUE()), - &isWrappedObject); - - // Don't care about status - if (isWrappedObject) { - napi_value unwrappedValue; - status = napi_get_property(_env, - refValue, - String::From(_env, ERROR_WRAP_VALUE()), - &unwrappedValue); - NAPI_THROW_IF_FAILED(_env, status, Object()); - - return Object(_env, unwrappedValue); - } - } - - return Object(_env, refValue); -} - -inline Error::Error(Error&& other) : ObjectReference(std::move(other)) {} - -inline Error& Error::operator=(Error&& other) { - static_cast*>(this)->operator=(std::move(other)); - return *this; -} - -inline Error::Error(const Error& other) : ObjectReference(other) {} - -inline Error& Error::operator=(const Error& other) { - Reset(); - - _env = other.Env(); - HandleScope scope(_env); - - napi_value value = other.Value(); - if (value != nullptr) { - napi_status status = napi_create_reference(_env, value, 1, &_ref); - NAPI_THROW_IF_FAILED(_env, status, *this); - } - - return *this; -} - -inline const std::string& Error::Message() const NAPI_NOEXCEPT { - if (_message.size() == 0 && _env != nullptr) { -#ifdef NAPI_CPP_EXCEPTIONS - try { - _message = Get("message").As(); - } catch (...) { - // Catch all errors here, to include e.g. a std::bad_alloc from - // the std::string::operator=, because this method may not throw. - } -#else // NAPI_CPP_EXCEPTIONS -#if defined(NODE_ADDON_API_ENABLE_MAYBE) - Napi::Value message_val; - if (Get("message").UnwrapTo(&message_val)) { - _message = message_val.As(); - } -#else - _message = Get("message").As(); -#endif -#endif // NAPI_CPP_EXCEPTIONS - } - return _message; -} - -// we created an object on the &_ref -inline void Error::ThrowAsJavaScriptException() const { - HandleScope scope(_env); - if (!IsEmpty()) { -#ifdef NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS - bool pendingException = false; - - // check if there is already a pending exception. If so don't try to throw a - // new one as that is not allowed/possible - napi_status status = napi_is_exception_pending(_env, &pendingException); - - if ((status != napi_ok) || - ((status == napi_ok) && (pendingException == false))) { - // We intentionally don't use `NAPI_THROW_*` macros here to ensure - // that there is no possible recursion as `ThrowAsJavaScriptException` - // is part of `NAPI_THROW_*` macro definition for noexcept. - - status = napi_throw(_env, Value()); - - if (status == napi_pending_exception) { - // The environment must be terminating as we checked earlier and there - // was no pending exception. In this case continuing will result - // in a fatal error and there is nothing the author has done incorrectly - // in their code that is worth flagging through a fatal error - return; - } - } else { - status = napi_pending_exception; - } -#else - // We intentionally don't use `NAPI_THROW_*` macros here to ensure - // that there is no possible recursion as `ThrowAsJavaScriptException` - // is part of `NAPI_THROW_*` macro definition for noexcept. - - napi_status status = napi_throw(_env, Value()); -#endif - -#ifdef NAPI_CPP_EXCEPTIONS - if (status != napi_ok) { - throw Error::New(_env); - } -#else // NAPI_CPP_EXCEPTIONS - NAPI_FATAL_IF_FAILED( - status, "Error::ThrowAsJavaScriptException", "napi_throw"); -#endif // NAPI_CPP_EXCEPTIONS - } -} - -#ifdef NAPI_CPP_EXCEPTIONS - -inline const char* Error::what() const NAPI_NOEXCEPT { - return Message().c_str(); -} - -#endif // NAPI_CPP_EXCEPTIONS - -inline const char* Error::ERROR_WRAP_VALUE() NAPI_NOEXCEPT { - return "4bda9e7e-4913-4dbc-95de-891cbf66598e-errorVal"; -} - -template -inline TError Error::New(napi_env env, - const char* message, - size_t length, - create_error_fn create_error) { - napi_value str; - napi_status status = napi_create_string_utf8(env, message, length, &str); - NAPI_THROW_IF_FAILED(env, status, TError()); - - napi_value error; - status = create_error(env, nullptr, str, &error); - NAPI_THROW_IF_FAILED(env, status, TError()); - - return TError(env, error); -} - -inline TypeError TypeError::New(napi_env env, const char* message) { - return Error::New( - env, message, std::strlen(message), napi_create_type_error); -} - -inline TypeError TypeError::New(napi_env env, const std::string& message) { - return Error::New( - env, message.c_str(), message.size(), napi_create_type_error); -} - -inline TypeError::TypeError() : Error() {} - -inline TypeError::TypeError(napi_env env, napi_value value) - : Error(env, value) {} - -inline RangeError RangeError::New(napi_env env, const char* message) { - return Error::New( - env, message, std::strlen(message), napi_create_range_error); -} - -inline RangeError RangeError::New(napi_env env, const std::string& message) { - return Error::New( - env, message.c_str(), message.size(), napi_create_range_error); -} - -inline RangeError::RangeError() : Error() {} - -inline RangeError::RangeError(napi_env env, napi_value value) - : Error(env, value) {} - -#if NAPI_VERSION > 8 -inline SyntaxError SyntaxError::New(napi_env env, const char* message) { - return Error::New( - env, message, std::strlen(message), node_api_create_syntax_error); -} - -inline SyntaxError SyntaxError::New(napi_env env, const std::string& message) { - return Error::New( - env, message.c_str(), message.size(), node_api_create_syntax_error); -} - -inline SyntaxError::SyntaxError() : Error() {} - -inline SyntaxError::SyntaxError(napi_env env, napi_value value) - : Error(env, value) {} -#endif // NAPI_VERSION > 8 - -//////////////////////////////////////////////////////////////////////////////// -// Reference class -//////////////////////////////////////////////////////////////////////////////// - -template -inline Reference Reference::New(const T& value, - uint32_t initialRefcount) { - napi_env env = value.Env(); - napi_value val = value; - - if (val == nullptr) { - return Reference(env, nullptr); - } - - napi_ref ref; - napi_status status = napi_create_reference(env, value, initialRefcount, &ref); - NAPI_THROW_IF_FAILED(env, status, Reference()); - - return Reference(env, ref); -} - -template -inline Reference::Reference() - : _env(nullptr), _ref(nullptr), _suppressDestruct(false) {} - -template -inline Reference::Reference(napi_env env, napi_ref ref) - : _env(env), _ref(ref), _suppressDestruct(false) {} - -template -inline Reference::~Reference() { - if (_ref != nullptr) { - if (!_suppressDestruct) { - napi_delete_reference(_env, _ref); - } - - _ref = nullptr; - } -} - -template -inline Reference::Reference(Reference&& other) - : _env(other._env), - _ref(other._ref), - _suppressDestruct(other._suppressDestruct) { - other._env = nullptr; - other._ref = nullptr; - other._suppressDestruct = false; -} - -template -inline Reference& Reference::operator=(Reference&& other) { - Reset(); - _env = other._env; - _ref = other._ref; - _suppressDestruct = other._suppressDestruct; - other._env = nullptr; - other._ref = nullptr; - other._suppressDestruct = false; - return *this; -} - -template -inline Reference::Reference(const Reference& other) - : _env(other._env), _ref(nullptr), _suppressDestruct(false) { - HandleScope scope(_env); - - napi_value value = other.Value(); - if (value != nullptr) { - // Copying is a limited scenario (currently only used for Error object) and - // always creates a strong reference to the given value even if the incoming - // reference is weak. - napi_status status = napi_create_reference(_env, value, 1, &_ref); - NAPI_FATAL_IF_FAILED( - status, "Reference::Reference", "napi_create_reference"); - } -} - -template -inline Reference::operator napi_ref() const { - return _ref; -} - -template -inline bool Reference::operator==(const Reference& other) const { - HandleScope scope(_env); - return this->Value().StrictEquals(other.Value()); -} - -template -inline bool Reference::operator!=(const Reference& other) const { - return !this->operator==(other); -} - -template -inline Napi::Env Reference::Env() const { - return Napi::Env(_env); -} - -template -inline bool Reference::IsEmpty() const { - return _ref == nullptr; -} - -template -inline T Reference::Value() const { - if (_ref == nullptr) { - return T(_env, nullptr); - } - - napi_value value; - napi_status status = napi_get_reference_value(_env, _ref, &value); - NAPI_THROW_IF_FAILED(_env, status, T()); - return T(_env, value); -} - -template -inline uint32_t Reference::Ref() const { - uint32_t result; - napi_status status = napi_reference_ref(_env, _ref, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -template -inline uint32_t Reference::Unref() const { - uint32_t result; - napi_status status = napi_reference_unref(_env, _ref, &result); - NAPI_THROW_IF_FAILED(_env, status, 0); - return result; -} - -template -inline void Reference::Reset() { - if (_ref != nullptr) { - napi_status status = napi_delete_reference(_env, _ref); - NAPI_THROW_IF_FAILED_VOID(_env, status); - _ref = nullptr; - } -} - -template -inline void Reference::Reset(const T& value, uint32_t refcount) { - Reset(); - _env = value.Env(); - - napi_value val = value; - if (val != nullptr) { - napi_status status = napi_create_reference(_env, value, refcount, &_ref); - NAPI_THROW_IF_FAILED_VOID(_env, status); - } -} - -template -inline void Reference::SuppressDestruct() { - _suppressDestruct = true; -} - -template -inline Reference Weak(T value) { - return Reference::New(value, 0); -} - -inline ObjectReference Weak(Object value) { - return Reference::New(value, 0); -} - -inline FunctionReference Weak(Function value) { - return Reference::New(value, 0); -} - -template -inline Reference Persistent(T value) { - return Reference::New(value, 1); -} - -inline ObjectReference Persistent(Object value) { - return Reference::New(value, 1); -} - -inline FunctionReference Persistent(Function value) { - return Reference::New(value, 1); -} - -//////////////////////////////////////////////////////////////////////////////// -// ObjectReference class -//////////////////////////////////////////////////////////////////////////////// - -inline ObjectReference::ObjectReference() : Reference() {} - -inline ObjectReference::ObjectReference(napi_env env, napi_ref ref) - : Reference(env, ref) {} - -inline ObjectReference::ObjectReference(Reference&& other) - : Reference(std::move(other)) {} - -inline ObjectReference& ObjectReference::operator=(Reference&& other) { - static_cast*>(this)->operator=(std::move(other)); - return *this; -} - -inline ObjectReference::ObjectReference(ObjectReference&& other) - : Reference(std::move(other)) {} - -inline ObjectReference& ObjectReference::operator=(ObjectReference&& other) { - static_cast*>(this)->operator=(std::move(other)); - return *this; -} - -inline ObjectReference::ObjectReference(const ObjectReference& other) - : Reference(other) {} - -inline MaybeOrValue ObjectReference::Get( - const char* utf8name) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Get(utf8name); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue ObjectReference::Get( - const std::string& utf8name) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Get(utf8name); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue ObjectReference::Set(const char* utf8name, - napi_value value) const { - HandleScope scope(_env); - return Value().Set(utf8name, value); -} - -inline MaybeOrValue ObjectReference::Set(const char* utf8name, - Napi::Value value) const { - HandleScope scope(_env); - return Value().Set(utf8name, value); -} - -inline MaybeOrValue ObjectReference::Set(const char* utf8name, - const char* utf8value) const { - HandleScope scope(_env); - return Value().Set(utf8name, utf8value); -} - -inline MaybeOrValue ObjectReference::Set(const char* utf8name, - bool boolValue) const { - HandleScope scope(_env); - return Value().Set(utf8name, boolValue); -} - -inline MaybeOrValue ObjectReference::Set(const char* utf8name, - double numberValue) const { - HandleScope scope(_env); - return Value().Set(utf8name, numberValue); -} - -inline MaybeOrValue ObjectReference::Set(const std::string& utf8name, - napi_value value) const { - HandleScope scope(_env); - return Value().Set(utf8name, value); -} - -inline MaybeOrValue ObjectReference::Set(const std::string& utf8name, - Napi::Value value) const { - HandleScope scope(_env); - return Value().Set(utf8name, value); -} - -inline MaybeOrValue ObjectReference::Set(const std::string& utf8name, - std::string& utf8value) const { - HandleScope scope(_env); - return Value().Set(utf8name, utf8value); -} - -inline MaybeOrValue ObjectReference::Set(const std::string& utf8name, - bool boolValue) const { - HandleScope scope(_env); - return Value().Set(utf8name, boolValue); -} - -inline MaybeOrValue ObjectReference::Set(const std::string& utf8name, - double numberValue) const { - HandleScope scope(_env); - return Value().Set(utf8name, numberValue); -} - -inline MaybeOrValue ObjectReference::Get(uint32_t index) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Get(index); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue ObjectReference::Set(uint32_t index, - napi_value value) const { - HandleScope scope(_env); - return Value().Set(index, value); -} - -inline MaybeOrValue ObjectReference::Set(uint32_t index, - Napi::Value value) const { - HandleScope scope(_env); - return Value().Set(index, value); -} - -inline MaybeOrValue ObjectReference::Set(uint32_t index, - const char* utf8value) const { - HandleScope scope(_env); - return Value().Set(index, utf8value); -} - -inline MaybeOrValue ObjectReference::Set( - uint32_t index, const std::string& utf8value) const { - HandleScope scope(_env); - return Value().Set(index, utf8value); -} - -inline MaybeOrValue ObjectReference::Set(uint32_t index, - bool boolValue) const { - HandleScope scope(_env); - return Value().Set(index, boolValue); -} - -inline MaybeOrValue ObjectReference::Set(uint32_t index, - double numberValue) const { - HandleScope scope(_env); - return Value().Set(index, numberValue); -} - -//////////////////////////////////////////////////////////////////////////////// -// FunctionReference class -//////////////////////////////////////////////////////////////////////////////// - -inline FunctionReference::FunctionReference() : Reference() {} - -inline FunctionReference::FunctionReference(napi_env env, napi_ref ref) - : Reference(env, ref) {} - -inline FunctionReference::FunctionReference(Reference&& other) - : Reference(std::move(other)) {} - -inline FunctionReference& FunctionReference::operator=( - Reference&& other) { - static_cast*>(this)->operator=(std::move(other)); - return *this; -} - -inline FunctionReference::FunctionReference(FunctionReference&& other) - : Reference(std::move(other)) {} - -inline FunctionReference& FunctionReference::operator=( - FunctionReference&& other) { - static_cast*>(this)->operator=(std::move(other)); - return *this; -} - -inline MaybeOrValue FunctionReference::operator()( - const std::initializer_list& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value()(args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::Call( - const std::initializer_list& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Call(args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::Call( - const std::vector& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Call(args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::Call( - napi_value recv, const std::initializer_list& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Call(recv, args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::Call( - napi_value recv, const std::vector& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Call(recv, args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::Call( - napi_value recv, size_t argc, const napi_value* args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().Call(recv, argc, args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::MakeCallback( - napi_value recv, - const std::initializer_list& args, - napi_async_context context) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().MakeCallback(recv, args, context); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::MakeCallback( - napi_value recv, - const std::vector& args, - napi_async_context context) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().MakeCallback(recv, args, context); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::MakeCallback( - napi_value recv, - size_t argc, - const napi_value* args, - napi_async_context context) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = - Value().MakeCallback(recv, argc, args, context); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap())); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Value(); - } - return scope.Escape(result); -#endif -} - -inline MaybeOrValue FunctionReference::New( - const std::initializer_list& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().New(args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap()).As()); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Object(); - } - return scope.Escape(result).As(); -#endif -} - -inline MaybeOrValue FunctionReference::New( - const std::vector& args) const { - EscapableHandleScope scope(_env); - MaybeOrValue result = Value().New(args); -#ifdef NODE_ADDON_API_ENABLE_MAYBE - if (result.IsJust()) { - return Just(scope.Escape(result.Unwrap()).As()); - } - return result; -#else - if (scope.Env().IsExceptionPending()) { - return Object(); - } - return scope.Escape(result).As(); -#endif -} - -//////////////////////////////////////////////////////////////////////////////// -// CallbackInfo class -//////////////////////////////////////////////////////////////////////////////// - -inline CallbackInfo::CallbackInfo(napi_env env, napi_callback_info info) - : _env(env), - _info(info), - _this(nullptr), - _dynamicArgs(nullptr), - _data(nullptr) { - _argc = _staticArgCount; - _argv = _staticArgs; - napi_status status = - napi_get_cb_info(env, info, &_argc, _argv, &_this, &_data); - NAPI_THROW_IF_FAILED_VOID(_env, status); - - if (_argc > _staticArgCount) { - // Use either a fixed-size array (on the stack) or a dynamically-allocated - // array (on the heap) depending on the number of args. - _dynamicArgs = new napi_value[_argc]; - _argv = _dynamicArgs; - - status = napi_get_cb_info(env, info, &_argc, _argv, nullptr, nullptr); - NAPI_THROW_IF_FAILED_VOID(_env, status); - } -} - -inline CallbackInfo::~CallbackInfo() { - if (_dynamicArgs != nullptr) { - delete[] _dynamicArgs; - } -} - -inline CallbackInfo::operator napi_callback_info() const { - return _info; -} - -inline Value CallbackInfo::NewTarget() const { - napi_value newTarget; - napi_status status = napi_get_new_target(_env, _info, &newTarget); - NAPI_THROW_IF_FAILED(_env, status, Value()); - return Value(_env, newTarget); -} - -inline bool CallbackInfo::IsConstructCall() const { - return !NewTarget().IsEmpty(); -} - -inline Napi::Env CallbackInfo::Env() const { - return Napi::Env(_env); -} - -inline size_t CallbackInfo::Length() const { - return _argc; -} - -inline const Value CallbackInfo::operator[](size_t index) const { - return index < _argc ? Value(_env, _argv[index]) : Env().Undefined(); -} - -inline Value CallbackInfo::This() const { - if (_this == nullptr) { - return Env().Undefined(); - } - return Object(_env, _this); -} - -inline void* CallbackInfo::Data() const { - return _data; -} - -inline void CallbackInfo::SetData(void* data) { - _data = data; -} - -//////////////////////////////////////////////////////////////////////////////// -// PropertyDescriptor class -//////////////////////////////////////////////////////////////////////////////// - -template -PropertyDescriptor PropertyDescriptor::Accessor( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - - desc.utf8name = utf8name; - desc.getter = details::TemplatedCallback; - desc.attributes = attributes; - desc.data = data; - - return desc; -} - -template -PropertyDescriptor PropertyDescriptor::Accessor( - const std::string& utf8name, - napi_property_attributes attributes, - void* data) { - return Accessor(utf8name.c_str(), attributes, data); -} - -template -PropertyDescriptor PropertyDescriptor::Accessor( - Name name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - - desc.name = name; - desc.getter = details::TemplatedCallback; - desc.attributes = attributes; - desc.data = data; - - return desc; -} - -template -PropertyDescriptor PropertyDescriptor::Accessor( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - - desc.utf8name = utf8name; - desc.getter = details::TemplatedCallback; - desc.setter = details::TemplatedVoidCallback; - desc.attributes = attributes; - desc.data = data; - - return desc; -} - -template -PropertyDescriptor PropertyDescriptor::Accessor( - const std::string& utf8name, - napi_property_attributes attributes, - void* data) { - return Accessor(utf8name.c_str(), attributes, data); -} - -template -PropertyDescriptor PropertyDescriptor::Accessor( - Name name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - - desc.name = name; - desc.getter = details::TemplatedCallback; - desc.setter = details::TemplatedVoidCallback; - desc.attributes = attributes; - desc.data = data; - - return desc; -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Napi::Env env, - Napi::Object object, - const char* utf8name, - Getter getter, - napi_property_attributes attributes, - void* data) { - using CbData = details::CallbackData; - auto callbackData = new CbData({getter, data}); - - napi_status status = AttachData(env, object, callbackData); - if (status != napi_ok) { - delete callbackData; - NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor()); - } - - return PropertyDescriptor({utf8name, - nullptr, - nullptr, - CbData::Wrapper, - nullptr, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Napi::Env env, - Napi::Object object, - const std::string& utf8name, - Getter getter, - napi_property_attributes attributes, - void* data) { - return Accessor(env, object, utf8name.c_str(), getter, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Napi::Env env, - Napi::Object object, - Name name, - Getter getter, - napi_property_attributes attributes, - void* data) { - using CbData = details::CallbackData; - auto callbackData = new CbData({getter, data}); - - napi_status status = AttachData(env, object, callbackData); - if (status != napi_ok) { - delete callbackData; - NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor()); - } - - return PropertyDescriptor({nullptr, - name, - nullptr, - CbData::Wrapper, - nullptr, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Napi::Env env, - Napi::Object object, - const char* utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* data) { - using CbData = details::AccessorCallbackData; - auto callbackData = new CbData({getter, setter, data}); - - napi_status status = AttachData(env, object, callbackData); - if (status != napi_ok) { - delete callbackData; - NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor()); - } - - return PropertyDescriptor({utf8name, - nullptr, - nullptr, - CbData::GetterWrapper, - CbData::SetterWrapper, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Napi::Env env, - Napi::Object object, - const std::string& utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* data) { - return Accessor( - env, object, utf8name.c_str(), getter, setter, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Accessor( - Napi::Env env, - Napi::Object object, - Name name, - Getter getter, - Setter setter, - napi_property_attributes attributes, - void* data) { - using CbData = details::AccessorCallbackData; - auto callbackData = new CbData({getter, setter, data}); - - napi_status status = AttachData(env, object, callbackData); - if (status != napi_ok) { - delete callbackData; - NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor()); - } - - return PropertyDescriptor({nullptr, - name, - nullptr, - CbData::GetterWrapper, - CbData::SetterWrapper, - nullptr, - attributes, - callbackData}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - Napi::Env env, - Napi::Object /*object*/, - const char* utf8name, - Callable cb, - napi_property_attributes attributes, - void* data) { - return PropertyDescriptor({utf8name, - nullptr, - nullptr, - nullptr, - nullptr, - Napi::Function::New(env, cb, utf8name, data), - attributes, - nullptr}); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - Napi::Env env, - Napi::Object object, - const std::string& utf8name, - Callable cb, - napi_property_attributes attributes, - void* data) { - return Function(env, object, utf8name.c_str(), cb, attributes, data); -} - -template -inline PropertyDescriptor PropertyDescriptor::Function( - Napi::Env env, - Napi::Object /*object*/, - Name name, - Callable cb, - napi_property_attributes attributes, - void* data) { - return PropertyDescriptor({nullptr, - name, - nullptr, - nullptr, - nullptr, - Napi::Function::New(env, cb, nullptr, data), - attributes, - nullptr}); -} - -inline PropertyDescriptor PropertyDescriptor::Value( - const char* utf8name, - napi_value value, - napi_property_attributes attributes) { - return PropertyDescriptor({utf8name, - nullptr, - nullptr, - nullptr, - nullptr, - value, - attributes, - nullptr}); -} - -inline PropertyDescriptor PropertyDescriptor::Value( - const std::string& utf8name, - napi_value value, - napi_property_attributes attributes) { - return Value(utf8name.c_str(), value, attributes); -} - -inline PropertyDescriptor PropertyDescriptor::Value( - napi_value name, napi_value value, napi_property_attributes attributes) { - return PropertyDescriptor( - {nullptr, name, nullptr, nullptr, nullptr, value, attributes, nullptr}); -} - -inline PropertyDescriptor PropertyDescriptor::Value( - Name name, Napi::Value value, napi_property_attributes attributes) { - napi_value nameValue = name; - napi_value valueValue = value; - return PropertyDescriptor::Value(nameValue, valueValue, attributes); -} - -inline PropertyDescriptor::PropertyDescriptor(napi_property_descriptor desc) - : _desc(desc) {} - -inline PropertyDescriptor::operator napi_property_descriptor&() { - return _desc; -} - -inline PropertyDescriptor::operator const napi_property_descriptor&() const { - return _desc; -} - -//////////////////////////////////////////////////////////////////////////////// -// InstanceWrap class -//////////////////////////////////////////////////////////////////////////////// - -template -inline void InstanceWrap::AttachPropData( - napi_env env, napi_value value, const napi_property_descriptor* prop) { - napi_status status; - if (!(prop->attributes & napi_static)) { - if (prop->method == T::InstanceVoidMethodCallbackWrapper) { - status = Napi::details::AttachData( - env, value, static_cast(prop->data)); - NAPI_THROW_IF_FAILED_VOID(env, status); - } else if (prop->method == T::InstanceMethodCallbackWrapper) { - status = Napi::details::AttachData( - env, value, static_cast(prop->data)); - NAPI_THROW_IF_FAILED_VOID(env, status); - } else if (prop->getter == T::InstanceGetterCallbackWrapper || - prop->setter == T::InstanceSetterCallbackWrapper) { - status = Napi::details::AttachData( - env, value, static_cast(prop->data)); - NAPI_THROW_IF_FAILED_VOID(env, status); - } - } -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - const char* utf8name, - InstanceVoidMethodCallback method, - napi_property_attributes attributes, - void* data) { - InstanceVoidMethodCallbackData* callbackData = - new InstanceVoidMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = T::InstanceVoidMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - const char* utf8name, - InstanceMethodCallback method, - napi_property_attributes attributes, - void* data) { - InstanceMethodCallbackData* callbackData = - new InstanceMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = T::InstanceMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - Symbol name, - InstanceVoidMethodCallback method, - napi_property_attributes attributes, - void* data) { - InstanceVoidMethodCallbackData* callbackData = - new InstanceVoidMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = T::InstanceVoidMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - Symbol name, - InstanceMethodCallback method, - napi_property_attributes attributes, - void* data) { - InstanceMethodCallbackData* callbackData = - new InstanceMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = T::InstanceMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = attributes; - return desc; -} - -template -template ::InstanceVoidMethodCallback method> -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = details::TemplatedInstanceVoidCallback; - desc.data = data; - desc.attributes = attributes; - return desc; -} - -template -template ::InstanceMethodCallback method> -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = details::TemplatedInstanceCallback; - desc.data = data; - desc.attributes = attributes; - return desc; -} - -template -template ::InstanceVoidMethodCallback method> -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - Symbol name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = details::TemplatedInstanceVoidCallback; - desc.data = data; - desc.attributes = attributes; - return desc; -} - -template -template ::InstanceMethodCallback method> -inline ClassPropertyDescriptor InstanceWrap::InstanceMethod( - Symbol name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = details::TemplatedInstanceCallback; - desc.data = data; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceAccessor( - const char* utf8name, - InstanceGetterCallback getter, - InstanceSetterCallback setter, - napi_property_attributes attributes, - void* data) { - InstanceAccessorCallbackData* callbackData = - new InstanceAccessorCallbackData({getter, setter, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.getter = getter != nullptr ? T::InstanceGetterCallbackWrapper : nullptr; - desc.setter = setter != nullptr ? T::InstanceSetterCallbackWrapper : nullptr; - desc.data = callbackData; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceAccessor( - Symbol name, - InstanceGetterCallback getter, - InstanceSetterCallback setter, - napi_property_attributes attributes, - void* data) { - InstanceAccessorCallbackData* callbackData = - new InstanceAccessorCallbackData({getter, setter, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.getter = getter != nullptr ? T::InstanceGetterCallbackWrapper : nullptr; - desc.setter = setter != nullptr ? T::InstanceSetterCallbackWrapper : nullptr; - desc.data = callbackData; - desc.attributes = attributes; - return desc; -} - -template -template ::InstanceGetterCallback getter, - typename InstanceWrap::InstanceSetterCallback setter> -inline ClassPropertyDescriptor InstanceWrap::InstanceAccessor( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.getter = details::TemplatedInstanceCallback; - desc.setter = This::WrapSetter(This::SetterTag()); - desc.data = data; - desc.attributes = attributes; - return desc; -} - -template -template ::InstanceGetterCallback getter, - typename InstanceWrap::InstanceSetterCallback setter> -inline ClassPropertyDescriptor InstanceWrap::InstanceAccessor( - Symbol name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.getter = details::TemplatedInstanceCallback; - desc.setter = This::WrapSetter(This::SetterTag()); - desc.data = data; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceValue( - const char* utf8name, - Napi::Value value, - napi_property_attributes attributes) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.value = value; - desc.attributes = attributes; - return desc; -} - -template -inline ClassPropertyDescriptor InstanceWrap::InstanceValue( - Symbol name, Napi::Value value, napi_property_attributes attributes) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.value = value; - desc.attributes = attributes; - return desc; -} - -template -inline napi_value InstanceWrap::InstanceVoidMethodCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - InstanceVoidMethodCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - T* instance = T::Unwrap(callbackInfo.This().As()); - auto cb = callbackData->callback; - if (instance) (instance->*cb)(callbackInfo); - return nullptr; - }); -} - -template -inline napi_value InstanceWrap::InstanceMethodCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - InstanceMethodCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - T* instance = T::Unwrap(callbackInfo.This().As()); - auto cb = callbackData->callback; - return instance ? (instance->*cb)(callbackInfo) : Napi::Value(); - }); -} - -template -inline napi_value InstanceWrap::InstanceGetterCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - InstanceAccessorCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - T* instance = T::Unwrap(callbackInfo.This().As()); - auto cb = callbackData->getterCallback; - return instance ? (instance->*cb)(callbackInfo) : Napi::Value(); - }); -} - -template -inline napi_value InstanceWrap::InstanceSetterCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - InstanceAccessorCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - T* instance = T::Unwrap(callbackInfo.This().As()); - auto cb = callbackData->setterCallback; - if (instance) (instance->*cb)(callbackInfo, callbackInfo[0]); - return nullptr; - }); -} - -template -template ::InstanceSetterCallback method> -inline napi_value InstanceWrap::WrappedMethod( - napi_env env, napi_callback_info info) NAPI_NOEXCEPT { - return details::WrapCallback([&] { - const CallbackInfo cbInfo(env, info); - T* instance = T::Unwrap(cbInfo.This().As()); - if (instance) (instance->*method)(cbInfo, cbInfo[0]); - return nullptr; - }); -} - -//////////////////////////////////////////////////////////////////////////////// -// ObjectWrap class -//////////////////////////////////////////////////////////////////////////////// - -template -inline ObjectWrap::ObjectWrap(const Napi::CallbackInfo& callbackInfo) { - napi_env env = callbackInfo.Env(); - napi_value wrapper = callbackInfo.This(); - napi_status status; - napi_ref ref; - T* instance = static_cast(this); - status = napi_wrap(env, wrapper, instance, FinalizeCallback, nullptr, &ref); - NAPI_THROW_IF_FAILED_VOID(env, status); - - Reference* instanceRef = instance; - *instanceRef = Reference(env, ref); -} - -template -inline ObjectWrap::~ObjectWrap() { - // If the JS object still exists at this point, remove the finalizer added - // through `napi_wrap()`. - if (!IsEmpty()) { - Object object = Value(); - // It is not valid to call `napi_remove_wrap()` with an empty `object`. - // This happens e.g. during garbage collection. - if (!object.IsEmpty() && _construction_failed) { - napi_remove_wrap(Env(), object, nullptr); - } - } -} - -template -inline T* ObjectWrap::Unwrap(Object wrapper) { - void* unwrapped; - napi_status status = napi_unwrap(wrapper.Env(), wrapper, &unwrapped); - NAPI_THROW_IF_FAILED(wrapper.Env(), status, nullptr); - return static_cast(unwrapped); -} - -template -inline Function ObjectWrap::DefineClass( - Napi::Env env, - const char* utf8name, - const size_t props_count, - const napi_property_descriptor* descriptors, - void* data) { - napi_status status; - std::vector props(props_count); - - // We copy the descriptors to a local array because before defining the class - // we must replace static method property descriptors with value property - // descriptors such that the value is a function-valued `napi_value` created - // with `CreateFunction()`. - // - // This replacement could be made for instance methods as well, but V8 aborts - // if we do that, because it expects methods defined on the prototype template - // to have `FunctionTemplate`s. - for (size_t index = 0; index < props_count; index++) { - props[index] = descriptors[index]; - napi_property_descriptor* prop = &props[index]; - if (prop->method == T::StaticMethodCallbackWrapper) { - status = - CreateFunction(env, - utf8name, - prop->method, - static_cast(prop->data), - &(prop->value)); - NAPI_THROW_IF_FAILED(env, status, Function()); - prop->method = nullptr; - prop->data = nullptr; - } else if (prop->method == T::StaticVoidMethodCallbackWrapper) { - status = - CreateFunction(env, - utf8name, - prop->method, - static_cast(prop->data), - &(prop->value)); - NAPI_THROW_IF_FAILED(env, status, Function()); - prop->method = nullptr; - prop->data = nullptr; - } - } - - napi_value value; - status = napi_define_class(env, - utf8name, - NAPI_AUTO_LENGTH, - T::ConstructorCallbackWrapper, - data, - props_count, - props.data(), - &value); - NAPI_THROW_IF_FAILED(env, status, Function()); - - // After defining the class we iterate once more over the property descriptors - // and attach the data associated with accessors and instance methods to the - // newly created JavaScript class. - for (size_t idx = 0; idx < props_count; idx++) { - const napi_property_descriptor* prop = &props[idx]; - - if (prop->getter == T::StaticGetterCallbackWrapper || - prop->setter == T::StaticSetterCallbackWrapper) { - status = Napi::details::AttachData( - env, value, static_cast(prop->data)); - NAPI_THROW_IF_FAILED(env, status, Function()); - } else { - // InstanceWrap::AttachPropData is responsible for attaching the data - // of instance methods and accessors. - T::AttachPropData(env, value, prop); - } - } - - return Function(env, value); -} - -template -inline Function ObjectWrap::DefineClass( - Napi::Env env, - const char* utf8name, - const std::initializer_list>& properties, - void* data) { - return DefineClass( - env, - utf8name, - properties.size(), - reinterpret_cast(properties.begin()), - data); -} - -template -inline Function ObjectWrap::DefineClass( - Napi::Env env, - const char* utf8name, - const std::vector>& properties, - void* data) { - return DefineClass( - env, - utf8name, - properties.size(), - reinterpret_cast(properties.data()), - data); -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - const char* utf8name, - StaticVoidMethodCallback method, - napi_property_attributes attributes, - void* data) { - StaticVoidMethodCallbackData* callbackData = - new StaticVoidMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = T::StaticVoidMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - const char* utf8name, - StaticMethodCallback method, - napi_property_attributes attributes, - void* data) { - StaticMethodCallbackData* callbackData = - new StaticMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = T::StaticMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - Symbol name, - StaticVoidMethodCallback method, - napi_property_attributes attributes, - void* data) { - StaticVoidMethodCallbackData* callbackData = - new StaticVoidMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = T::StaticVoidMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - Symbol name, - StaticMethodCallback method, - napi_property_attributes attributes, - void* data) { - StaticMethodCallbackData* callbackData = - new StaticMethodCallbackData({method, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = T::StaticMethodCallbackWrapper; - desc.data = callbackData; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -template ::StaticVoidMethodCallback method> -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = details::TemplatedVoidCallback; - desc.data = data; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -template ::StaticVoidMethodCallback method> -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - Symbol name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = details::TemplatedVoidCallback; - desc.data = data; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -template ::StaticMethodCallback method> -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.method = details::TemplatedCallback; - desc.data = data; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -template ::StaticMethodCallback method> -inline ClassPropertyDescriptor ObjectWrap::StaticMethod( - Symbol name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.method = details::TemplatedCallback; - desc.data = data; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticAccessor( - const char* utf8name, - StaticGetterCallback getter, - StaticSetterCallback setter, - napi_property_attributes attributes, - void* data) { - StaticAccessorCallbackData* callbackData = - new StaticAccessorCallbackData({getter, setter, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.getter = getter != nullptr ? T::StaticGetterCallbackWrapper : nullptr; - desc.setter = setter != nullptr ? T::StaticSetterCallbackWrapper : nullptr; - desc.data = callbackData; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticAccessor( - Symbol name, - StaticGetterCallback getter, - StaticSetterCallback setter, - napi_property_attributes attributes, - void* data) { - StaticAccessorCallbackData* callbackData = - new StaticAccessorCallbackData({getter, setter, data}); - - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.getter = getter != nullptr ? T::StaticGetterCallbackWrapper : nullptr; - desc.setter = setter != nullptr ? T::StaticSetterCallbackWrapper : nullptr; - desc.data = callbackData; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -template ::StaticGetterCallback getter, - typename ObjectWrap::StaticSetterCallback setter> -inline ClassPropertyDescriptor ObjectWrap::StaticAccessor( - const char* utf8name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.getter = details::TemplatedCallback; - desc.setter = This::WrapStaticSetter(This::StaticSetterTag()); - desc.data = data; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -template ::StaticGetterCallback getter, - typename ObjectWrap::StaticSetterCallback setter> -inline ClassPropertyDescriptor ObjectWrap::StaticAccessor( - Symbol name, napi_property_attributes attributes, void* data) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.getter = details::TemplatedCallback; - desc.setter = This::WrapStaticSetter(This::StaticSetterTag()); - desc.data = data; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticValue( - const char* utf8name, - Napi::Value value, - napi_property_attributes attributes) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.utf8name = utf8name; - desc.value = value; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline ClassPropertyDescriptor ObjectWrap::StaticValue( - Symbol name, Napi::Value value, napi_property_attributes attributes) { - napi_property_descriptor desc = napi_property_descriptor(); - desc.name = name; - desc.value = value; - desc.attributes = - static_cast(attributes | napi_static); - return desc; -} - -template -inline Value ObjectWrap::OnCalledAsFunction( - const Napi::CallbackInfo& callbackInfo) { - NAPI_THROW( - TypeError::New(callbackInfo.Env(), - "Class constructors cannot be invoked without 'new'"), - Napi::Value()); -} - -template -inline void ObjectWrap::Finalize(Napi::Env /*env*/) {} - -template -inline napi_value ObjectWrap::ConstructorCallbackWrapper( - napi_env env, napi_callback_info info) { - napi_value new_target; - napi_status status = napi_get_new_target(env, info, &new_target); - if (status != napi_ok) return nullptr; - - bool isConstructCall = (new_target != nullptr); - if (!isConstructCall) { - return details::WrapCallback( - [&] { return T::OnCalledAsFunction(CallbackInfo(env, info)); }); - } - - napi_value wrapper = details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - T* instance = new T(callbackInfo); -#ifdef NAPI_CPP_EXCEPTIONS - instance->_construction_failed = false; -#else - if (callbackInfo.Env().IsExceptionPending()) { - // We need to clear the exception so that removing the wrap might work. - Error e = callbackInfo.Env().GetAndClearPendingException(); - delete instance; - e.ThrowAsJavaScriptException(); - } else { - instance->_construction_failed = false; - } -#endif // NAPI_CPP_EXCEPTIONS - return callbackInfo.This(); - }); - - return wrapper; -} - -template -inline napi_value ObjectWrap::StaticVoidMethodCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - StaticVoidMethodCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - callbackData->callback(callbackInfo); - return nullptr; - }); -} - -template -inline napi_value ObjectWrap::StaticMethodCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - StaticMethodCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - return callbackData->callback(callbackInfo); - }); -} - -template -inline napi_value ObjectWrap::StaticGetterCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - StaticAccessorCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - return callbackData->getterCallback(callbackInfo); - }); -} - -template -inline napi_value ObjectWrap::StaticSetterCallbackWrapper( - napi_env env, napi_callback_info info) { - return details::WrapCallback([&] { - CallbackInfo callbackInfo(env, info); - StaticAccessorCallbackData* callbackData = - reinterpret_cast(callbackInfo.Data()); - callbackInfo.SetData(callbackData->data); - callbackData->setterCallback(callbackInfo, callbackInfo[0]); - return nullptr; - }); -} - -template -inline void ObjectWrap::FinalizeCallback(napi_env env, - void* data, - void* /*hint*/) { - HandleScope scope(env); - T* instance = static_cast(data); - instance->Finalize(Napi::Env(env)); - delete instance; -} - -template -template ::StaticSetterCallback method> -inline napi_value ObjectWrap::WrappedMethod( - napi_env env, napi_callback_info info) NAPI_NOEXCEPT { - return details::WrapCallback([&] { - const CallbackInfo cbInfo(env, info); - method(cbInfo, cbInfo[0]); - return nullptr; - }); -} - -//////////////////////////////////////////////////////////////////////////////// -// HandleScope class -//////////////////////////////////////////////////////////////////////////////// - -inline HandleScope::HandleScope(napi_env env, napi_handle_scope scope) - : _env(env), _scope(scope) {} - -inline HandleScope::HandleScope(Napi::Env env) : _env(env) { - napi_status status = napi_open_handle_scope(_env, &_scope); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline HandleScope::~HandleScope() { - napi_status status = napi_close_handle_scope(_env, _scope); - NAPI_FATAL_IF_FAILED( - status, "HandleScope::~HandleScope", "napi_close_handle_scope"); -} - -inline HandleScope::operator napi_handle_scope() const { - return _scope; -} - -inline Napi::Env HandleScope::Env() const { - return Napi::Env(_env); -} - -//////////////////////////////////////////////////////////////////////////////// -// EscapableHandleScope class -//////////////////////////////////////////////////////////////////////////////// - -inline EscapableHandleScope::EscapableHandleScope( - napi_env env, napi_escapable_handle_scope scope) - : _env(env), _scope(scope) {} - -inline EscapableHandleScope::EscapableHandleScope(Napi::Env env) : _env(env) { - napi_status status = napi_open_escapable_handle_scope(_env, &_scope); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline EscapableHandleScope::~EscapableHandleScope() { - napi_status status = napi_close_escapable_handle_scope(_env, _scope); - NAPI_FATAL_IF_FAILED(status, - "EscapableHandleScope::~EscapableHandleScope", - "napi_close_escapable_handle_scope"); -} - -inline EscapableHandleScope::operator napi_escapable_handle_scope() const { - return _scope; -} - -inline Napi::Env EscapableHandleScope::Env() const { - return Napi::Env(_env); -} - -inline Value EscapableHandleScope::Escape(napi_value escapee) { - napi_value result; - napi_status status = napi_escape_handle(_env, _scope, escapee, &result); - NAPI_THROW_IF_FAILED(_env, status, Value()); - return Value(_env, result); -} - -#if (NAPI_VERSION > 2) -//////////////////////////////////////////////////////////////////////////////// -// CallbackScope class -//////////////////////////////////////////////////////////////////////////////// - -inline CallbackScope::CallbackScope(napi_env env, napi_callback_scope scope) - : _env(env), _scope(scope) {} - -inline CallbackScope::CallbackScope(napi_env env, napi_async_context context) - : _env(env) { - napi_status status = - napi_open_callback_scope(_env, Object::New(env), context, &_scope); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline CallbackScope::~CallbackScope() { - napi_status status = napi_close_callback_scope(_env, _scope); - NAPI_FATAL_IF_FAILED( - status, "CallbackScope::~CallbackScope", "napi_close_callback_scope"); -} - -inline CallbackScope::operator napi_callback_scope() const { - return _scope; -} - -inline Napi::Env CallbackScope::Env() const { - return Napi::Env(_env); -} -#endif - -//////////////////////////////////////////////////////////////////////////////// -// AsyncContext class -//////////////////////////////////////////////////////////////////////////////// - -inline AsyncContext::AsyncContext(napi_env env, const char* resource_name) - : AsyncContext(env, resource_name, Object::New(env)) {} - -inline AsyncContext::AsyncContext(napi_env env, - const char* resource_name, - const Object& resource) - : _env(env), _context(nullptr) { - napi_value resource_id; - napi_status status = napi_create_string_utf8( - _env, resource_name, NAPI_AUTO_LENGTH, &resource_id); - NAPI_THROW_IF_FAILED_VOID(_env, status); - - status = napi_async_init(_env, resource, resource_id, &_context); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline AsyncContext::~AsyncContext() { - if (_context != nullptr) { - napi_async_destroy(_env, _context); - _context = nullptr; - } -} - -inline AsyncContext::AsyncContext(AsyncContext&& other) { - _env = other._env; - other._env = nullptr; - _context = other._context; - other._context = nullptr; -} - -inline AsyncContext& AsyncContext::operator=(AsyncContext&& other) { - _env = other._env; - other._env = nullptr; - _context = other._context; - other._context = nullptr; - return *this; -} - -inline AsyncContext::operator napi_async_context() const { - return _context; -} - -inline Napi::Env AsyncContext::Env() const { - return Napi::Env(_env); -} - -//////////////////////////////////////////////////////////////////////////////// -// AsyncWorker class -//////////////////////////////////////////////////////////////////////////////// - -#if NAPI_HAS_THREADS - -inline AsyncWorker::AsyncWorker(const Function& callback) - : AsyncWorker(callback, "generic") {} - -inline AsyncWorker::AsyncWorker(const Function& callback, - const char* resource_name) - : AsyncWorker(callback, resource_name, Object::New(callback.Env())) {} - -inline AsyncWorker::AsyncWorker(const Function& callback, - const char* resource_name, - const Object& resource) - : AsyncWorker( - Object::New(callback.Env()), callback, resource_name, resource) {} - -inline AsyncWorker::AsyncWorker(const Object& receiver, - const Function& callback) - : AsyncWorker(receiver, callback, "generic") {} - -inline AsyncWorker::AsyncWorker(const Object& receiver, - const Function& callback, - const char* resource_name) - : AsyncWorker( - receiver, callback, resource_name, Object::New(callback.Env())) {} - -inline AsyncWorker::AsyncWorker(const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource) - : _env(callback.Env()), - _receiver(Napi::Persistent(receiver)), - _callback(Napi::Persistent(callback)), - _suppress_destruct(false) { - napi_value resource_id; - napi_status status = napi_create_string_latin1( - _env, resource_name, NAPI_AUTO_LENGTH, &resource_id); - NAPI_THROW_IF_FAILED_VOID(_env, status); - - status = napi_create_async_work(_env, - resource, - resource_id, - OnAsyncWorkExecute, - OnAsyncWorkComplete, - this, - &_work); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline AsyncWorker::AsyncWorker(Napi::Env env) : AsyncWorker(env, "generic") {} - -inline AsyncWorker::AsyncWorker(Napi::Env env, const char* resource_name) - : AsyncWorker(env, resource_name, Object::New(env)) {} - -inline AsyncWorker::AsyncWorker(Napi::Env env, - const char* resource_name, - const Object& resource) - : _env(env), _receiver(), _callback(), _suppress_destruct(false) { - napi_value resource_id; - napi_status status = napi_create_string_latin1( - _env, resource_name, NAPI_AUTO_LENGTH, &resource_id); - NAPI_THROW_IF_FAILED_VOID(_env, status); - - status = napi_create_async_work(_env, - resource, - resource_id, - OnAsyncWorkExecute, - OnAsyncWorkComplete, - this, - &_work); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline AsyncWorker::~AsyncWorker() { - if (_work != nullptr) { - napi_delete_async_work(_env, _work); - _work = nullptr; - } -} - -inline void AsyncWorker::Destroy() { - delete this; -} - -inline AsyncWorker::operator napi_async_work() const { - return _work; -} - -inline Napi::Env AsyncWorker::Env() const { - return Napi::Env(_env); -} - -inline void AsyncWorker::Queue() { - napi_status status = napi_queue_async_work(_env, _work); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline void AsyncWorker::Cancel() { - napi_status status = napi_cancel_async_work(_env, _work); - NAPI_THROW_IF_FAILED_VOID(_env, status); -} - -inline ObjectReference& AsyncWorker::Receiver() { - return _receiver; -} - -inline FunctionReference& AsyncWorker::Callback() { - return _callback; -} - -inline void AsyncWorker::SuppressDestruct() { - _suppress_destruct = true; -} - -inline void AsyncWorker::OnOK() { - if (!_callback.IsEmpty()) { - _callback.Call(_receiver.Value(), GetResult(_callback.Env())); - } -} - -inline void AsyncWorker::OnError(const Error& e) { - if (!_callback.IsEmpty()) { - _callback.Call(_receiver.Value(), - std::initializer_list{e.Value()}); - } -} - -inline void AsyncWorker::SetError(const std::string& error) { - _error = error; -} - -inline std::vector AsyncWorker::GetResult(Napi::Env /*env*/) { - return {}; -} -// The OnAsyncWorkExecute method receives an napi_env argument. However, do NOT -// use it within this method, as it does not run on the JavaScript thread and -// must not run any method that would cause JavaScript to run. In practice, -// this means that almost any use of napi_env will be incorrect. -inline void AsyncWorker::OnAsyncWorkExecute(napi_env env, void* asyncworker) { - AsyncWorker* self = static_cast(asyncworker); - self->OnExecute(env); -} -// The OnExecute method receives an napi_env argument. However, do NOT -// use it within this method, as it does not run on the JavaScript thread and -// must not run any method that would cause JavaScript to run. In practice, -// this means that almost any use of napi_env will be incorrect. -inline void AsyncWorker::OnExecute(Napi::Env /*DO_NOT_USE*/) { -#ifdef NAPI_CPP_EXCEPTIONS - try { - Execute(); - } catch (const std::exception& e) { - SetError(e.what()); - } -#else // NAPI_CPP_EXCEPTIONS - Execute(); -#endif // NAPI_CPP_EXCEPTIONS -} - -inline void AsyncWorker::OnAsyncWorkComplete(napi_env env, - napi_status status, - void* asyncworker) { - AsyncWorker* self = static_cast(asyncworker); - self->OnWorkComplete(env, status); -} -inline void AsyncWorker::OnWorkComplete(Napi::Env /*env*/, napi_status status) { - if (status != napi_cancelled) { - HandleScope scope(_env); - details::WrapCallback([&] { - if (_error.size() == 0) { - OnOK(); - } else { - OnError(Error::New(_env, _error)); - } - return nullptr; - }); - } - if (!_suppress_destruct) { - Destroy(); - } -} - -#endif // NAPI_HAS_THREADS - -#if (NAPI_VERSION > 3 && NAPI_HAS_THREADS) -//////////////////////////////////////////////////////////////////////////////// -// TypedThreadSafeFunction class -//////////////////////////////////////////////////////////////////////////////// - -// Starting with NAPI 5, the JavaScript function `func` parameter of -// `napi_create_threadsafe_function` is optional. -#if NAPI_VERSION > 4 -// static, with Callback [missing] Resource [missing] Finalizer [missing] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context) { - TypedThreadSafeFunction tsfn; - - napi_status status = - napi_create_threadsafe_function(env, - nullptr, - nullptr, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - nullptr, - nullptr, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -// static, with Callback [missing] Resource [passed] Finalizer [missing] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context) { - TypedThreadSafeFunction tsfn; - - napi_status status = - napi_create_threadsafe_function(env, - nullptr, - resource, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - nullptr, - nullptr, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -// static, with Callback [missing] Resource [missing] Finalizer [passed] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data) { - TypedThreadSafeFunction tsfn; - - auto* finalizeData = new details:: - ThreadSafeFinalize( - {data, finalizeCallback}); - napi_status status = napi_create_threadsafe_function( - env, - nullptr, - nullptr, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - finalizeData, - details::ThreadSafeFinalize:: - FinalizeFinalizeWrapperWithDataAndContext, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -// static, with Callback [missing] Resource [passed] Finalizer [passed] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data) { - TypedThreadSafeFunction tsfn; - - auto* finalizeData = new details:: - ThreadSafeFinalize( - {data, finalizeCallback}); - napi_status status = napi_create_threadsafe_function( - env, - nullptr, - resource, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - finalizeData, - details::ThreadSafeFinalize:: - FinalizeFinalizeWrapperWithDataAndContext, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} -#endif - -// static, with Callback [passed] Resource [missing] Finalizer [missing] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context) { - TypedThreadSafeFunction tsfn; - - napi_status status = - napi_create_threadsafe_function(env, - callback, - nullptr, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - nullptr, - nullptr, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -// static, with Callback [passed] Resource [passed] Finalizer [missing] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context) { - TypedThreadSafeFunction tsfn; - - napi_status status = - napi_create_threadsafe_function(env, - callback, - resource, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - nullptr, - nullptr, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -// static, with Callback [passed] Resource [missing] Finalizer [passed] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data) { - TypedThreadSafeFunction tsfn; - - auto* finalizeData = new details:: - ThreadSafeFinalize( - {data, finalizeCallback}); - napi_status status = napi_create_threadsafe_function( - env, - callback, - nullptr, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - finalizeData, - details::ThreadSafeFinalize:: - FinalizeFinalizeWrapperWithDataAndContext, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -// static, with: Callback [passed] Resource [passed] Finalizer [passed] -template -template -inline TypedThreadSafeFunction -TypedThreadSafeFunction::New( - napi_env env, - CallbackType callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data) { - TypedThreadSafeFunction tsfn; - - auto* finalizeData = new details:: - ThreadSafeFinalize( - {data, finalizeCallback}); - napi_status status = napi_create_threadsafe_function( - env, - details::DefaultCallbackWrapper< - CallbackType, - TypedThreadSafeFunction>(env, - callback), - resource, - String::From(env, resourceName), - maxQueueSize, - initialThreadCount, - finalizeData, - details::ThreadSafeFinalize:: - FinalizeFinalizeWrapperWithDataAndContext, - context, - CallJsInternal, - &tsfn._tsfn); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED( - env, status, TypedThreadSafeFunction()); - } - - return tsfn; -} - -template -inline TypedThreadSafeFunction:: - TypedThreadSafeFunction() - : _tsfn() {} - -template -inline TypedThreadSafeFunction:: - TypedThreadSafeFunction(napi_threadsafe_function tsfn) - : _tsfn(tsfn) {} - -template -inline TypedThreadSafeFunction:: -operator napi_threadsafe_function() const { - return _tsfn; -} - -template -inline napi_status -TypedThreadSafeFunction::BlockingCall( - DataType* data) const { - return napi_call_threadsafe_function(_tsfn, data, napi_tsfn_blocking); -} - -template -inline napi_status -TypedThreadSafeFunction::NonBlockingCall( - DataType* data) const { - return napi_call_threadsafe_function(_tsfn, data, napi_tsfn_nonblocking); -} - -template -inline void TypedThreadSafeFunction::Ref( - napi_env env) const { - if (_tsfn != nullptr) { - napi_status status = napi_ref_threadsafe_function(env, _tsfn); - NAPI_THROW_IF_FAILED_VOID(env, status); - } -} - -template -inline void TypedThreadSafeFunction::Unref( - napi_env env) const { - if (_tsfn != nullptr) { - napi_status status = napi_unref_threadsafe_function(env, _tsfn); - NAPI_THROW_IF_FAILED_VOID(env, status); - } -} - -template -inline napi_status -TypedThreadSafeFunction::Acquire() const { - return napi_acquire_threadsafe_function(_tsfn); -} - -template -inline napi_status -TypedThreadSafeFunction::Release() const { - return napi_release_threadsafe_function(_tsfn, napi_tsfn_release); -} - -template -inline napi_status -TypedThreadSafeFunction::Abort() const { - return napi_release_threadsafe_function(_tsfn, napi_tsfn_abort); -} - -template -inline ContextType* -TypedThreadSafeFunction::GetContext() const { - void* context; - napi_status status = napi_get_threadsafe_function_context(_tsfn, &context); - NAPI_FATAL_IF_FAILED(status, - "TypedThreadSafeFunction::GetContext", - "napi_get_threadsafe_function_context"); - return static_cast(context); -} - -// static -template -void TypedThreadSafeFunction::CallJsInternal( - napi_env env, napi_value jsCallback, void* context, void* data) { - details::CallJsWrapper( - env, jsCallback, context, data); -} - -#if NAPI_VERSION == 4 -// static -template -Napi::Function -TypedThreadSafeFunction::EmptyFunctionFactory( - Napi::Env env) { - return Napi::Function::New(env, [](const CallbackInfo& cb) {}); -} - -// static -template -Napi::Function -TypedThreadSafeFunction::FunctionOrEmpty( - Napi::Env env, Napi::Function& callback) { - if (callback.IsEmpty()) { - return EmptyFunctionFactory(env); - } - return callback; -} - -#else -// static -template -std::nullptr_t -TypedThreadSafeFunction::EmptyFunctionFactory( - Napi::Env /*env*/) { - return nullptr; -} - -// static -template -Napi::Function -TypedThreadSafeFunction::FunctionOrEmpty( - Napi::Env /*env*/, Napi::Function& callback) { - return callback; -} - -#endif - -//////////////////////////////////////////////////////////////////////////////// -// ThreadSafeFunction class -//////////////////////////////////////////////////////////////////////////////// - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount) { - return New( - env, callback, Object(), resourceName, maxQueueSize, initialThreadCount); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context) { - return New(env, - callback, - Object(), - resourceName, - maxQueueSize, - initialThreadCount, - context); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback) { - return New(env, - callback, - Object(), - resourceName, - maxQueueSize, - initialThreadCount, - finalizeCallback); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback, - FinalizerDataType* data) { - return New(env, - callback, - Object(), - resourceName, - maxQueueSize, - initialThreadCount, - finalizeCallback, - data); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback) { - return New(env, - callback, - Object(), - resourceName, - maxQueueSize, - initialThreadCount, - context, - finalizeCallback); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data) { - return New(env, - callback, - Object(), - resourceName, - maxQueueSize, - initialThreadCount, - context, - finalizeCallback, - data); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount) { - return New(env, - callback, - resource, - resourceName, - maxQueueSize, - initialThreadCount, - static_cast(nullptr) /* context */); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context) { - return New(env, - callback, - resource, - resourceName, - maxQueueSize, - initialThreadCount, - context, - [](Env, ContextType*) {} /* empty finalizer */); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback) { - return New(env, - callback, - resource, - resourceName, - maxQueueSize, - initialThreadCount, - static_cast(nullptr) /* context */, - finalizeCallback, - static_cast(nullptr) /* data */, - details::ThreadSafeFinalize::Wrapper); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback, - FinalizerDataType* data) { - return New(env, - callback, - resource, - resourceName, - maxQueueSize, - initialThreadCount, - static_cast(nullptr) /* context */, - finalizeCallback, - data, - details::ThreadSafeFinalize:: - FinalizeWrapperWithData); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback) { - return New( - env, - callback, - resource, - resourceName, - maxQueueSize, - initialThreadCount, - context, - finalizeCallback, - static_cast(nullptr) /* data */, - details::ThreadSafeFinalize::FinalizeWrapperWithContext); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data) { - return New( - env, - callback, - resource, - resourceName, - maxQueueSize, - initialThreadCount, - context, - finalizeCallback, - data, - details::ThreadSafeFinalize:: - FinalizeFinalizeWrapperWithDataAndContext); -} - -inline ThreadSafeFunction::ThreadSafeFunction() : _tsfn() {} - -inline ThreadSafeFunction::ThreadSafeFunction(napi_threadsafe_function tsfn) - : _tsfn(tsfn) {} - -inline ThreadSafeFunction::operator napi_threadsafe_function() const { - return _tsfn; -} - -inline napi_status ThreadSafeFunction::BlockingCall() const { - return CallInternal(nullptr, napi_tsfn_blocking); -} - -template <> -inline napi_status ThreadSafeFunction::BlockingCall(void* data) const { - return napi_call_threadsafe_function(_tsfn, data, napi_tsfn_blocking); -} - -template -inline napi_status ThreadSafeFunction::BlockingCall(Callback callback) const { - return CallInternal(new CallbackWrapper(callback), napi_tsfn_blocking); -} - -template -inline napi_status ThreadSafeFunction::BlockingCall(DataType* data, - Callback callback) const { - auto wrapper = [data, callback](Env env, Function jsCallback) { - callback(env, jsCallback, data); - }; - return CallInternal(new CallbackWrapper(wrapper), napi_tsfn_blocking); -} - -inline napi_status ThreadSafeFunction::NonBlockingCall() const { - return CallInternal(nullptr, napi_tsfn_nonblocking); -} - -template <> -inline napi_status ThreadSafeFunction::NonBlockingCall(void* data) const { - return napi_call_threadsafe_function(_tsfn, data, napi_tsfn_nonblocking); -} - -template -inline napi_status ThreadSafeFunction::NonBlockingCall( - Callback callback) const { - return CallInternal(new CallbackWrapper(callback), napi_tsfn_nonblocking); -} - -template -inline napi_status ThreadSafeFunction::NonBlockingCall( - DataType* data, Callback callback) const { - auto wrapper = [data, callback](Env env, Function jsCallback) { - callback(env, jsCallback, data); - }; - return CallInternal(new CallbackWrapper(wrapper), napi_tsfn_nonblocking); -} - -inline void ThreadSafeFunction::Ref(napi_env env) const { - if (_tsfn != nullptr) { - napi_status status = napi_ref_threadsafe_function(env, _tsfn); - NAPI_THROW_IF_FAILED_VOID(env, status); - } -} - -inline void ThreadSafeFunction::Unref(napi_env env) const { - if (_tsfn != nullptr) { - napi_status status = napi_unref_threadsafe_function(env, _tsfn); - NAPI_THROW_IF_FAILED_VOID(env, status); - } -} - -inline napi_status ThreadSafeFunction::Acquire() const { - return napi_acquire_threadsafe_function(_tsfn); -} - -inline napi_status ThreadSafeFunction::Release() const { - return napi_release_threadsafe_function(_tsfn, napi_tsfn_release); -} - -inline napi_status ThreadSafeFunction::Abort() const { - return napi_release_threadsafe_function(_tsfn, napi_tsfn_abort); -} - -inline ThreadSafeFunction::ConvertibleContext ThreadSafeFunction::GetContext() - const { - void* context; - napi_status status = napi_get_threadsafe_function_context(_tsfn, &context); - NAPI_FATAL_IF_FAILED(status, - "ThreadSafeFunction::GetContext", - "napi_get_threadsafe_function_context"); - return ConvertibleContext({context}); -} - -// static -template -inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data, - napi_finalize wrapper) { - static_assert(details::can_make_string::value || - std::is_convertible::value, - "Resource name should be convertible to the string type"); - - ThreadSafeFunction tsfn; - auto* finalizeData = new details:: - ThreadSafeFinalize( - {data, finalizeCallback}); - napi_status status = - napi_create_threadsafe_function(env, - callback, - resource, - Value::From(env, resourceName), - maxQueueSize, - initialThreadCount, - finalizeData, - wrapper, - context, - CallJS, - &tsfn._tsfn); - if (status != napi_ok) { - delete finalizeData; - NAPI_THROW_IF_FAILED(env, status, ThreadSafeFunction()); - } - - return tsfn; -} - -inline napi_status ThreadSafeFunction::CallInternal( - CallbackWrapper* callbackWrapper, - napi_threadsafe_function_call_mode mode) const { - napi_status status = - napi_call_threadsafe_function(_tsfn, callbackWrapper, mode); - if (status != napi_ok && callbackWrapper != nullptr) { - delete callbackWrapper; - } - - return status; -} - -// static -inline void ThreadSafeFunction::CallJS(napi_env env, - napi_value jsCallback, - void* /* context */, - void* data) { - if (env == nullptr && jsCallback == nullptr) { - return; - } - - details::WrapVoidCallback([&]() { - if (data != nullptr) { - auto* callbackWrapper = static_cast(data); - (*callbackWrapper)(env, Function(env, jsCallback)); - delete callbackWrapper; - } else if (jsCallback != nullptr) { - Function(env, jsCallback).Call({}); - } - }); -} - -//////////////////////////////////////////////////////////////////////////////// -// Async Progress Worker Base class -//////////////////////////////////////////////////////////////////////////////// -template -inline AsyncProgressWorkerBase::AsyncProgressWorkerBase( - const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource, - size_t queue_size) - : AsyncWorker(receiver, callback, resource_name, resource) { - // Fill all possible arguments to work around ambiguous - // ThreadSafeFunction::New signatures. - _tsfn = ThreadSafeFunction::New(callback.Env(), - callback, - resource, - resource_name, - queue_size, - /** initialThreadCount */ 1, - /** context */ this, - OnThreadSafeFunctionFinalize, - /** finalizeData */ this); -} - -#if NAPI_VERSION > 4 -template -inline AsyncProgressWorkerBase::AsyncProgressWorkerBase( - Napi::Env env, - const char* resource_name, - const Object& resource, - size_t queue_size) - : AsyncWorker(env, resource_name, resource) { - // TODO: Once the changes to make the callback optional for threadsafe - // functions are available on all versions we can remove the dummy Function - // here. - Function callback; - // Fill all possible arguments to work around ambiguous - // ThreadSafeFunction::New signatures. - _tsfn = ThreadSafeFunction::New(env, - callback, - resource, - resource_name, - queue_size, - /** initialThreadCount */ 1, - /** context */ this, - OnThreadSafeFunctionFinalize, - /** finalizeData */ this); -} -#endif - -template -inline AsyncProgressWorkerBase::~AsyncProgressWorkerBase() { - // Abort pending tsfn call. - // Don't send progress events after we've already completed. - // It's ok to call ThreadSafeFunction::Abort and ThreadSafeFunction::Release - // duplicated. - _tsfn.Abort(); -} - -template -inline void AsyncProgressWorkerBase::OnAsyncWorkProgress( - Napi::Env /* env */, Napi::Function /* jsCallback */, void* data) { - ThreadSafeData* tsd = static_cast(data); - tsd->asyncprogressworker()->OnWorkProgress(tsd->data()); - delete tsd; -} - -template -inline napi_status AsyncProgressWorkerBase::NonBlockingCall( - DataType* data) { - auto tsd = new AsyncProgressWorkerBase::ThreadSafeData(this, data); - auto ret = _tsfn.NonBlockingCall(tsd, OnAsyncWorkProgress); - if (ret != napi_ok) { - delete tsd; - } - return ret; -} - -template -inline void AsyncProgressWorkerBase::OnWorkComplete( - Napi::Env /* env */, napi_status status) { - _work_completed = true; - _complete_status = status; - _tsfn.Release(); -} - -template -inline void AsyncProgressWorkerBase::OnThreadSafeFunctionFinalize( - Napi::Env env, void* /* data */, AsyncProgressWorkerBase* context) { - if (context->_work_completed) { - context->AsyncWorker::OnWorkComplete(env, context->_complete_status); - } -} - -//////////////////////////////////////////////////////////////////////////////// -// Async Progress Worker class -//////////////////////////////////////////////////////////////////////////////// -template -inline AsyncProgressWorker::AsyncProgressWorker(const Function& callback) - : AsyncProgressWorker(callback, "generic") {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(const Function& callback, - const char* resource_name) - : AsyncProgressWorker( - callback, resource_name, Object::New(callback.Env())) {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(const Function& callback, - const char* resource_name, - const Object& resource) - : AsyncProgressWorker( - Object::New(callback.Env()), callback, resource_name, resource) {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(const Object& receiver, - const Function& callback) - : AsyncProgressWorker(receiver, callback, "generic") {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(const Object& receiver, - const Function& callback, - const char* resource_name) - : AsyncProgressWorker( - receiver, callback, resource_name, Object::New(callback.Env())) {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource) - : AsyncProgressWorkerBase(receiver, callback, resource_name, resource), - _asyncdata(nullptr), - _asyncsize(0), - _signaled(false) {} - -#if NAPI_VERSION > 4 -template -inline AsyncProgressWorker::AsyncProgressWorker(Napi::Env env) - : AsyncProgressWorker(env, "generic") {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(Napi::Env env, - const char* resource_name) - : AsyncProgressWorker(env, resource_name, Object::New(env)) {} - -template -inline AsyncProgressWorker::AsyncProgressWorker(Napi::Env env, - const char* resource_name, - const Object& resource) - : AsyncProgressWorkerBase(env, resource_name, resource), - _asyncdata(nullptr), - _asyncsize(0) {} -#endif - -template -inline AsyncProgressWorker::~AsyncProgressWorker() { - { - std::lock_guard lock(this->_mutex); - _asyncdata = nullptr; - _asyncsize = 0; - } -} - -template -inline void AsyncProgressWorker::Execute() { - ExecutionProgress progress(this); - Execute(progress); -} - -template -inline void AsyncProgressWorker::OnWorkProgress(void*) { - T* data; - size_t size; - bool signaled; - { - std::lock_guard lock(this->_mutex); - data = this->_asyncdata; - size = this->_asyncsize; - signaled = this->_signaled; - this->_asyncdata = nullptr; - this->_asyncsize = 0; - this->_signaled = false; - } - - /** - * The callback of ThreadSafeFunction is not been invoked immediately on the - * callback of uv_async_t (uv io poll), rather the callback of TSFN is - * invoked on the right next uv idle callback. There are chances that during - * the deferring the signal of uv_async_t is been sent again, i.e. potential - * not coalesced two calls of the TSFN callback. - */ - if (data == nullptr && !signaled) { - return; - } - - this->OnProgress(data, size); - delete[] data; -} - -template -inline void AsyncProgressWorker::SendProgress_(const T* data, size_t count) { - T* new_data = new T[count]; - std::copy(data, data + count, new_data); - - T* old_data; - { - std::lock_guard lock(this->_mutex); - old_data = _asyncdata; - _asyncdata = new_data; - _asyncsize = count; - _signaled = false; - } - this->NonBlockingCall(nullptr); - - delete[] old_data; -} - -template -inline void AsyncProgressWorker::Signal() { - { - std::lock_guard lock(this->_mutex); - _signaled = true; - } - this->NonBlockingCall(static_cast(nullptr)); -} - -template -inline void AsyncProgressWorker::ExecutionProgress::Signal() const { - this->_worker->Signal(); -} - -template -inline void AsyncProgressWorker::ExecutionProgress::Send( - const T* data, size_t count) const { - _worker->SendProgress_(data, count); -} - -//////////////////////////////////////////////////////////////////////////////// -// Async Progress Queue Worker class -//////////////////////////////////////////////////////////////////////////////// -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - const Function& callback) - : AsyncProgressQueueWorker(callback, "generic") {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - const Function& callback, const char* resource_name) - : AsyncProgressQueueWorker( - callback, resource_name, Object::New(callback.Env())) {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - const Function& callback, const char* resource_name, const Object& resource) - : AsyncProgressQueueWorker( - Object::New(callback.Env()), callback, resource_name, resource) {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - const Object& receiver, const Function& callback) - : AsyncProgressQueueWorker(receiver, callback, "generic") {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - const Object& receiver, const Function& callback, const char* resource_name) - : AsyncProgressQueueWorker( - receiver, callback, resource_name, Object::New(callback.Env())) {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource) - : AsyncProgressWorkerBase>( - receiver, - callback, - resource_name, - resource, - /** unlimited queue size */ 0) {} - -#if NAPI_VERSION > 4 -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker(Napi::Env env) - : AsyncProgressQueueWorker(env, "generic") {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - Napi::Env env, const char* resource_name) - : AsyncProgressQueueWorker(env, resource_name, Object::New(env)) {} - -template -inline AsyncProgressQueueWorker::AsyncProgressQueueWorker( - Napi::Env env, const char* resource_name, const Object& resource) - : AsyncProgressWorkerBase>( - env, resource_name, resource, /** unlimited queue size */ 0) {} -#endif - -template -inline void AsyncProgressQueueWorker::Execute() { - ExecutionProgress progress(this); - Execute(progress); -} - -template -inline void AsyncProgressQueueWorker::OnWorkProgress( - std::pair* datapair) { - if (datapair == nullptr) { - return; - } - - T* data = datapair->first; - size_t size = datapair->second; - - this->OnProgress(data, size); - delete datapair; - delete[] data; -} - -template -inline void AsyncProgressQueueWorker::SendProgress_(const T* data, - size_t count) { - T* new_data = new T[count]; - std::copy(data, data + count, new_data); - - auto pair = new std::pair(new_data, count); - this->NonBlockingCall(pair); -} - -template -inline void AsyncProgressQueueWorker::Signal() const { - this->SendProgress_(static_cast(nullptr), 0); -} - -template -inline void AsyncProgressQueueWorker::OnWorkComplete(Napi::Env env, - napi_status status) { - // Draining queued items in TSFN. - AsyncProgressWorkerBase>::OnWorkComplete(env, status); -} - -template -inline void AsyncProgressQueueWorker::ExecutionProgress::Signal() const { - _worker->SendProgress_(static_cast(nullptr), 0); -} - -template -inline void AsyncProgressQueueWorker::ExecutionProgress::Send( - const T* data, size_t count) const { - _worker->SendProgress_(data, count); -} -#endif // NAPI_VERSION > 3 && NAPI_HAS_THREADS - -//////////////////////////////////////////////////////////////////////////////// -// Memory Management class -//////////////////////////////////////////////////////////////////////////////// - -inline int64_t MemoryManagement::AdjustExternalMemory(Env env, - int64_t change_in_bytes) { - int64_t result; - napi_status status = - napi_adjust_external_memory(env, change_in_bytes, &result); - NAPI_THROW_IF_FAILED(env, status, 0); - return result; -} - -//////////////////////////////////////////////////////////////////////////////// -// Version Management class -//////////////////////////////////////////////////////////////////////////////// - -inline uint32_t VersionManagement::GetNapiVersion(Env env) { - uint32_t result; - napi_status status = napi_get_version(env, &result); - NAPI_THROW_IF_FAILED(env, status, 0); - return result; -} - -inline const napi_node_version* VersionManagement::GetNodeVersion(Env env) { - const napi_node_version* result; - napi_status status = napi_get_node_version(env, &result); - NAPI_THROW_IF_FAILED(env, status, 0); - return result; -} - -#if NAPI_VERSION > 5 -//////////////////////////////////////////////////////////////////////////////// -// Addon class -//////////////////////////////////////////////////////////////////////////////// - -template -inline Object Addon::Init(Env env, Object exports) { - T* addon = new T(env, exports); - env.SetInstanceData(addon); - return addon->entry_point_; -} - -template -inline T* Addon::Unwrap(Object wrapper) { - return wrapper.Env().GetInstanceData(); -} - -template -inline void Addon::DefineAddon( - Object exports, const std::initializer_list& props) { - DefineProperties(exports, props); - entry_point_ = exports; -} - -template -inline Napi::Object Addon::DefineProperties( - Object object, const std::initializer_list& props) { - const napi_property_descriptor* properties = - reinterpret_cast(props.begin()); - size_t size = props.size(); - napi_status status = - napi_define_properties(object.Env(), object, size, properties); - NAPI_THROW_IF_FAILED(object.Env(), status, object); - for (size_t idx = 0; idx < size; idx++) - T::AttachPropData(object.Env(), object, &properties[idx]); - return object; -} -#endif // NAPI_VERSION > 5 - -#if NAPI_VERSION > 2 -template -Env::CleanupHook Env::AddCleanupHook(Hook hook, Arg* arg) { - return CleanupHook(*this, hook, arg); -} - -template -Env::CleanupHook Env::AddCleanupHook(Hook hook) { - return CleanupHook(*this, hook); -} - -template -Env::CleanupHook::CleanupHook() { - data = nullptr; -} - -template -Env::CleanupHook::CleanupHook(Napi::Env env, Hook hook) - : wrapper(Env::CleanupHook::Wrapper) { - data = new CleanupData{std::move(hook), nullptr}; - napi_status status = napi_add_env_cleanup_hook(env, wrapper, data); - if (status != napi_ok) { - delete data; - data = nullptr; - } -} - -template -Env::CleanupHook::CleanupHook(Napi::Env env, Hook hook, Arg* arg) - : wrapper(Env::CleanupHook::WrapperWithArg) { - data = new CleanupData{std::move(hook), arg}; - napi_status status = napi_add_env_cleanup_hook(env, wrapper, data); - if (status != napi_ok) { - delete data; - data = nullptr; - } -} - -template -bool Env::CleanupHook::Remove(Env env) { - napi_status status = napi_remove_env_cleanup_hook(env, wrapper, data); - delete data; - data = nullptr; - return status == napi_ok; -} - -template -bool Env::CleanupHook::IsEmpty() const { - return data == nullptr; -} -#endif // NAPI_VERSION > 2 - -#ifdef NAPI_CPP_CUSTOM_NAMESPACE -} // namespace NAPI_CPP_CUSTOM_NAMESPACE -#endif - -} // namespace Napi - -#endif // SRC_NAPI_INL_H_ diff --git a/web/static/node_modules/node-addon-api/napi.h b/web/static/node_modules/node-addon-api/napi.h deleted file mode 100644 index 9f20cb88..00000000 --- a/web/static/node_modules/node-addon-api/napi.h +++ /dev/null @@ -1,3201 +0,0 @@ -#ifndef SRC_NAPI_H_ -#define SRC_NAPI_H_ - -#ifndef NAPI_HAS_THREADS -#if !defined(__wasm__) || (defined(__EMSCRIPTEN_PTHREADS__) || \ - (defined(__wasi__) && defined(_REENTRANT))) -#define NAPI_HAS_THREADS 1 -#else -#define NAPI_HAS_THREADS 0 -#endif -#endif - -#include -#include -#include -#include -#if NAPI_HAS_THREADS -#include -#endif // NAPI_HAS_THREADS -#include -#include - -// VS2015 RTM has bugs with constexpr, so require min of VS2015 Update 3 (known -// good version) -#if !defined(_MSC_VER) || _MSC_FULL_VER >= 190024210 -#define NAPI_HAS_CONSTEXPR 1 -#endif - -// VS2013 does not support char16_t literal strings, so we'll work around it -// using wchar_t strings and casting them. This is safe as long as the character -// sizes are the same. -#if defined(_MSC_VER) && _MSC_VER <= 1800 -static_assert(sizeof(char16_t) == sizeof(wchar_t), - "Size mismatch between char16_t and wchar_t"); -#define NAPI_WIDE_TEXT(x) reinterpret_cast(L##x) -#else -#define NAPI_WIDE_TEXT(x) u##x -#endif - -// If C++ exceptions are not explicitly enabled or disabled, enable them -// if exceptions were enabled in the compiler settings. -#if !defined(NAPI_CPP_EXCEPTIONS) && !defined(NAPI_DISABLE_CPP_EXCEPTIONS) -#if defined(_CPPUNWIND) || defined(__EXCEPTIONS) -#define NAPI_CPP_EXCEPTIONS -#else -#error Exception support not detected. \ - Define either NAPI_CPP_EXCEPTIONS or NAPI_DISABLE_CPP_EXCEPTIONS. -#endif -#endif - -// If C++ NAPI_CPP_EXCEPTIONS are enabled, NODE_ADDON_API_ENABLE_MAYBE should -// not be set -#if defined(NAPI_CPP_EXCEPTIONS) && defined(NODE_ADDON_API_ENABLE_MAYBE) -#error NODE_ADDON_API_ENABLE_MAYBE should not be set when \ - NAPI_CPP_EXCEPTIONS is defined. -#endif - -#ifdef _NOEXCEPT -#define NAPI_NOEXCEPT _NOEXCEPT -#else -#define NAPI_NOEXCEPT noexcept -#endif - -#ifdef NAPI_CPP_EXCEPTIONS - -// When C++ exceptions are enabled, Errors are thrown directly. There is no need -// to return anything after the throw statements. The variadic parameter is an -// optional return value that is ignored. -// We need _VOID versions of the macros to avoid warnings resulting from -// leaving the NAPI_THROW_* `...` argument empty. - -#define NAPI_THROW(e, ...) throw e -#define NAPI_THROW_VOID(e) throw e - -#define NAPI_THROW_IF_FAILED(env, status, ...) \ - if ((status) != napi_ok) throw Napi::Error::New(env); - -#define NAPI_THROW_IF_FAILED_VOID(env, status) \ - if ((status) != napi_ok) throw Napi::Error::New(env); - -#else // NAPI_CPP_EXCEPTIONS - -// When C++ exceptions are disabled, Errors are thrown as JavaScript exceptions, -// which are pending until the callback returns to JS. The variadic parameter -// is an optional return value; usually it is an empty result. -// We need _VOID versions of the macros to avoid warnings resulting from -// leaving the NAPI_THROW_* `...` argument empty. - -#define NAPI_THROW(e, ...) \ - do { \ - (e).ThrowAsJavaScriptException(); \ - return __VA_ARGS__; \ - } while (0) - -#define NAPI_THROW_VOID(e) \ - do { \ - (e).ThrowAsJavaScriptException(); \ - return; \ - } while (0) - -#define NAPI_THROW_IF_FAILED(env, status, ...) \ - if ((status) != napi_ok) { \ - Napi::Error::New(env).ThrowAsJavaScriptException(); \ - return __VA_ARGS__; \ - } - -#define NAPI_THROW_IF_FAILED_VOID(env, status) \ - if ((status) != napi_ok) { \ - Napi::Error::New(env).ThrowAsJavaScriptException(); \ - return; \ - } - -#endif // NAPI_CPP_EXCEPTIONS - -#ifdef NODE_ADDON_API_ENABLE_MAYBE -#define NAPI_MAYBE_THROW_IF_FAILED(env, status, type) \ - NAPI_THROW_IF_FAILED(env, status, Napi::Nothing()) - -#define NAPI_RETURN_OR_THROW_IF_FAILED(env, status, result, type) \ - NAPI_MAYBE_THROW_IF_FAILED(env, status, type); \ - return Napi::Just(result); -#else -#define NAPI_MAYBE_THROW_IF_FAILED(env, status, type) \ - NAPI_THROW_IF_FAILED(env, status, type()) - -#define NAPI_RETURN_OR_THROW_IF_FAILED(env, status, result, type) \ - NAPI_MAYBE_THROW_IF_FAILED(env, status, type); \ - return result; -#endif - -#define NAPI_DISALLOW_ASSIGN(CLASS) void operator=(const CLASS&) = delete; -#define NAPI_DISALLOW_COPY(CLASS) CLASS(const CLASS&) = delete; - -#define NAPI_DISALLOW_ASSIGN_COPY(CLASS) \ - NAPI_DISALLOW_ASSIGN(CLASS) \ - NAPI_DISALLOW_COPY(CLASS) - -#define NAPI_CHECK(condition, location, message) \ - do { \ - if (!(condition)) { \ - Napi::Error::Fatal((location), (message)); \ - } \ - } while (0) - -#define NAPI_FATAL_IF_FAILED(status, location, message) \ - NAPI_CHECK((status) == napi_ok, location, message) - -//////////////////////////////////////////////////////////////////////////////// -/// Node-API C++ Wrapper Classes -/// -/// These classes wrap the "Node-API" ABI-stable C APIs for Node.js, providing a -/// C++ object model and C++ exception-handling semantics with low overhead. -/// The wrappers are all header-only so that they do not affect the ABI. -//////////////////////////////////////////////////////////////////////////////// -namespace Napi { - -#ifdef NAPI_CPP_CUSTOM_NAMESPACE -// NAPI_CPP_CUSTOM_NAMESPACE can be #define'd per-addon to avoid symbol -// conflicts between different instances of node-addon-api - -// First dummy definition of the namespace to make sure that Napi::(name) still -// refers to the right things inside this file. -namespace NAPI_CPP_CUSTOM_NAMESPACE {} -using namespace NAPI_CPP_CUSTOM_NAMESPACE; - -namespace NAPI_CPP_CUSTOM_NAMESPACE { -#endif - -// Forward declarations -class Env; -class Value; -class Boolean; -class Number; -#if NAPI_VERSION > 5 -class BigInt; -#endif // NAPI_VERSION > 5 -#if (NAPI_VERSION > 4) -class Date; -#endif -class String; -class Object; -class Array; -class ArrayBuffer; -class Function; -class Error; -class PropertyDescriptor; -class CallbackInfo; -class TypedArray; -template -class TypedArrayOf; - -using Int8Array = - TypedArrayOf; ///< Typed-array of signed 8-bit integers -using Uint8Array = - TypedArrayOf; ///< Typed-array of unsigned 8-bit integers -using Int16Array = - TypedArrayOf; ///< Typed-array of signed 16-bit integers -using Uint16Array = - TypedArrayOf; ///< Typed-array of unsigned 16-bit integers -using Int32Array = - TypedArrayOf; ///< Typed-array of signed 32-bit integers -using Uint32Array = - TypedArrayOf; ///< Typed-array of unsigned 32-bit integers -using Float32Array = - TypedArrayOf; ///< Typed-array of 32-bit floating-point values -using Float64Array = - TypedArrayOf; ///< Typed-array of 64-bit floating-point values -#if NAPI_VERSION > 5 -using BigInt64Array = - TypedArrayOf; ///< Typed array of signed 64-bit integers -using BigUint64Array = - TypedArrayOf; ///< Typed array of unsigned 64-bit integers -#endif // NAPI_VERSION > 5 - -/// Defines the signature of a Node-API C++ module's registration callback -/// (init) function. -using ModuleRegisterCallback = Object (*)(Env env, Object exports); - -class MemoryManagement; - -/// A simple Maybe type, representing an object which may or may not have a -/// value. -/// -/// If an API method returns a Maybe<>, the API method can potentially fail -/// either because an exception is thrown, or because an exception is pending, -/// e.g. because a previous API call threw an exception that hasn't been -/// caught yet. In that case, a "Nothing" value is returned. -template -class Maybe { - public: - bool IsNothing() const; - bool IsJust() const; - - /// Short-hand for Unwrap(), which doesn't return a value. Could be used - /// where the actual value of the Maybe is not needed like Object::Set. - /// If this Maybe is nothing (empty), node-addon-api will crash the - /// process. - void Check() const; - - /// Return the value of type T contained in the Maybe. If this Maybe is - /// nothing (empty), node-addon-api will crash the process. - T Unwrap() const; - - /// Return the value of type T contained in the Maybe, or using a default - /// value if this Maybe is nothing (empty). - T UnwrapOr(const T& default_value) const; - - /// Converts this Maybe to a value of type T in the out. If this Maybe is - /// nothing (empty), `false` is returned and `out` is left untouched. - bool UnwrapTo(T* out) const; - - bool operator==(const Maybe& other) const; - bool operator!=(const Maybe& other) const; - - private: - Maybe(); - explicit Maybe(const T& t); - - bool _has_value; - T _value; - - template - friend Maybe Nothing(); - template - friend Maybe Just(const U& u); -}; - -template -inline Maybe Nothing(); - -template -inline Maybe Just(const T& t); - -#if defined(NODE_ADDON_API_ENABLE_MAYBE) -template -using MaybeOrValue = Maybe; -#else -template -using MaybeOrValue = T; -#endif - -/// Environment for Node-API values and operations. -/// -/// All Node-API values and operations must be associated with an environment. -/// An environment instance is always provided to callback functions; that -/// environment must then be used for any creation of Node-API values or other -/// Node-API operations within the callback. (Many methods infer the -/// environment from the `this` instance that the method is called on.) -/// -/// In the future, multiple environments per process may be supported, -/// although current implementations only support one environment per process. -/// -/// In the V8 JavaScript engine, a Node-API environment approximately -/// corresponds to an Isolate. -class Env { - private: - napi_env _env; -#if NAPI_VERSION > 5 - template - static void DefaultFini(Env, T* data); - template - static void DefaultFiniWithHint(Env, DataType* data, HintType* hint); -#endif // NAPI_VERSION > 5 - public: - Env(napi_env env); - - operator napi_env() const; - - Object Global() const; - Value Undefined() const; - Value Null() const; - - bool IsExceptionPending() const; - Error GetAndClearPendingException() const; - - MaybeOrValue RunScript(const char* utf8script) const; - MaybeOrValue RunScript(const std::string& utf8script) const; - MaybeOrValue RunScript(String script) const; - -#if NAPI_VERSION > 2 - template - class CleanupHook; - - template - CleanupHook AddCleanupHook(Hook hook); - - template - CleanupHook AddCleanupHook(Hook hook, Arg* arg); -#endif // NAPI_VERSION > 2 - -#if NAPI_VERSION > 5 - template - T* GetInstanceData() const; - - template - using Finalizer = void (*)(Env, T*); - template fini = Env::DefaultFini> - void SetInstanceData(T* data) const; - - template - using FinalizerWithHint = void (*)(Env, DataType*, HintType*); - template fini = - Env::DefaultFiniWithHint> - void SetInstanceData(DataType* data, HintType* hint) const; -#endif // NAPI_VERSION > 5 - -#if NAPI_VERSION > 2 - template - class CleanupHook { - public: - CleanupHook(); - CleanupHook(Env env, Hook hook, Arg* arg); - CleanupHook(Env env, Hook hook); - bool Remove(Env env); - bool IsEmpty() const; - - private: - static inline void Wrapper(void* data) NAPI_NOEXCEPT; - static inline void WrapperWithArg(void* data) NAPI_NOEXCEPT; - - void (*wrapper)(void* arg); - struct CleanupData { - Hook hook; - Arg* arg; - } * data; - }; -#endif // NAPI_VERSION > 2 - -#if NAPI_VERSION > 8 - const char* GetModuleFileName() const; -#endif // NAPI_VERSION > 8 -}; - -/// A JavaScript value of unknown type. -/// -/// For type-specific operations, convert to one of the Value subclasses using a -/// `To*` or `As()` method. The `To*` methods do type coercion; the `As()` -/// method does not. -/// -/// Napi::Value value = ... -/// if (!value.IsString()) throw Napi::TypeError::New(env, "Invalid -/// arg..."); Napi::String str = value.As(); // Cast to a -/// string value -/// -/// Napi::Value anotherValue = ... -/// bool isTruthy = anotherValue.ToBoolean(); // Coerce to a boolean value -class Value { - public: - Value(); ///< Creates a new _empty_ Value instance. - Value(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - /// Creates a JS value from a C++ primitive. - /// - /// `value` may be any of: - /// - bool - /// - Any integer type - /// - Any floating point type - /// - const char* (encoded using UTF-8, null-terminated) - /// - const char16_t* (encoded using UTF-16-LE, null-terminated) - /// - std::string (encoded using UTF-8) - /// - std::u16string - /// - napi::Value - /// - napi_value - template - static Value From(napi_env env, const T& value); - - /// Converts to a Node-API value primitive. - /// - /// If the instance is _empty_, this returns `nullptr`. - operator napi_value() const; - - /// Tests if this value strictly equals another value. - bool operator==(const Value& other) const; - - /// Tests if this value does not strictly equal another value. - bool operator!=(const Value& other) const; - - /// Tests if this value strictly equals another value. - bool StrictEquals(const Value& other) const; - - /// Gets the environment the value is associated with. - Napi::Env Env() const; - - /// Checks if the value is empty (uninitialized). - /// - /// An empty value is invalid, and most attempts to perform an operation on an - /// empty value will result in an exception. Note an empty value is distinct - /// from JavaScript `null` or `undefined`, which are valid values. - /// - /// When C++ exceptions are disabled at compile time, a method with a `Value` - /// return type may return an empty value to indicate a pending exception. So - /// when not using C++ exceptions, callers should check whether the value is - /// empty before attempting to use it. - bool IsEmpty() const; - - napi_valuetype Type() const; ///< Gets the type of the value. - - bool IsUndefined() - const; ///< Tests if a value is an undefined JavaScript value. - bool IsNull() const; ///< Tests if a value is a null JavaScript value. - bool IsBoolean() const; ///< Tests if a value is a JavaScript boolean. - bool IsNumber() const; ///< Tests if a value is a JavaScript number. -#if NAPI_VERSION > 5 - bool IsBigInt() const; ///< Tests if a value is a JavaScript bigint. -#endif // NAPI_VERSION > 5 -#if (NAPI_VERSION > 4) - bool IsDate() const; ///< Tests if a value is a JavaScript date. -#endif - bool IsString() const; ///< Tests if a value is a JavaScript string. - bool IsSymbol() const; ///< Tests if a value is a JavaScript symbol. - bool IsArray() const; ///< Tests if a value is a JavaScript array. - bool IsArrayBuffer() - const; ///< Tests if a value is a JavaScript array buffer. - bool IsTypedArray() const; ///< Tests if a value is a JavaScript typed array. - bool IsObject() const; ///< Tests if a value is a JavaScript object. - bool IsFunction() const; ///< Tests if a value is a JavaScript function. - bool IsPromise() const; ///< Tests if a value is a JavaScript promise. - bool IsDataView() const; ///< Tests if a value is a JavaScript data view. - bool IsBuffer() const; ///< Tests if a value is a Node buffer. - bool IsExternal() const; ///< Tests if a value is a pointer to external data. - - /// Casts to another type of `Napi::Value`, when the actual type is known or - /// assumed. - /// - /// This conversion does NOT coerce the type. Calling any methods - /// inappropriate for the actual value type will throw `Napi::Error`. - /// - /// If `NODE_ADDON_API_ENABLE_TYPE_CHECK_ON_AS` is defined, this method - /// asserts that the actual type is the expected type. - template - T As() const; - - MaybeOrValue ToBoolean() - const; ///< Coerces a value to a JavaScript boolean. - MaybeOrValue ToNumber() - const; ///< Coerces a value to a JavaScript number. - MaybeOrValue ToString() - const; ///< Coerces a value to a JavaScript string. - MaybeOrValue ToObject() - const; ///< Coerces a value to a JavaScript object. - - protected: - /// !cond INTERNAL - napi_env _env; - napi_value _value; - /// !endcond -}; - -/// A JavaScript boolean value. -class Boolean : public Value { - public: - static Boolean New(napi_env env, ///< Node-API environment - bool value ///< Boolean value - ); - - static void CheckCast(napi_env env, napi_value value); - - Boolean(); ///< Creates a new _empty_ Boolean instance. - Boolean(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - operator bool() const; ///< Converts a Boolean value to a boolean primitive. - bool Value() const; ///< Converts a Boolean value to a boolean primitive. -}; - -/// A JavaScript number value. -class Number : public Value { - public: - static Number New(napi_env env, ///< Node-API environment - double value ///< Number value - ); - - static void CheckCast(napi_env env, napi_value value); - - Number(); ///< Creates a new _empty_ Number instance. - Number(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - operator int32_t() - const; ///< Converts a Number value to a 32-bit signed integer value. - operator uint32_t() - const; ///< Converts a Number value to a 32-bit unsigned integer value. - operator int64_t() - const; ///< Converts a Number value to a 64-bit signed integer value. - operator float() - const; ///< Converts a Number value to a 32-bit floating-point value. - operator double() - const; ///< Converts a Number value to a 64-bit floating-point value. - - int32_t Int32Value() - const; ///< Converts a Number value to a 32-bit signed integer value. - uint32_t Uint32Value() - const; ///< Converts a Number value to a 32-bit unsigned integer value. - int64_t Int64Value() - const; ///< Converts a Number value to a 64-bit signed integer value. - float FloatValue() - const; ///< Converts a Number value to a 32-bit floating-point value. - double DoubleValue() - const; ///< Converts a Number value to a 64-bit floating-point value. -}; - -#if NAPI_VERSION > 5 -/// A JavaScript bigint value. -class BigInt : public Value { - public: - static BigInt New(napi_env env, ///< Node-API environment - int64_t value ///< Number value - ); - static BigInt New(napi_env env, ///< Node-API environment - uint64_t value ///< Number value - ); - - /// Creates a new BigInt object using a specified sign bit and a - /// specified list of digits/words. - /// The resulting number is calculated as: - /// (-1)^sign_bit * (words[0] * (2^64)^0 + words[1] * (2^64)^1 + ...) - static BigInt New(napi_env env, ///< Node-API environment - int sign_bit, ///< Sign bit. 1 if negative. - size_t word_count, ///< Number of words in array - const uint64_t* words ///< Array of words - ); - - static void CheckCast(napi_env env, napi_value value); - - BigInt(); ///< Creates a new _empty_ BigInt instance. - BigInt(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - int64_t Int64Value(bool* lossless) - const; ///< Converts a BigInt value to a 64-bit signed integer value. - uint64_t Uint64Value(bool* lossless) - const; ///< Converts a BigInt value to a 64-bit unsigned integer value. - - size_t WordCount() const; ///< The number of 64-bit words needed to store - ///< the result of ToWords(). - - /// Writes the contents of this BigInt to a specified memory location. - /// `sign_bit` must be provided and will be set to 1 if this BigInt is - /// negative. - /// `*word_count` has to be initialized to the length of the `words` array. - /// Upon return, it will be set to the actual number of words that would - /// be needed to store this BigInt (i.e. the return value of `WordCount()`). - void ToWords(int* sign_bit, size_t* word_count, uint64_t* words); -}; -#endif // NAPI_VERSION > 5 - -#if (NAPI_VERSION > 4) -/// A JavaScript date value. -class Date : public Value { - public: - /// Creates a new Date value from a double primitive. - static Date New(napi_env env, ///< Node-API environment - double value ///< Number value - ); - - static void CheckCast(napi_env env, napi_value value); - - Date(); ///< Creates a new _empty_ Date instance. - Date(napi_env env, napi_value value); ///< Wraps a Node-API value primitive. - operator double() const; ///< Converts a Date value to double primitive - - double ValueOf() const; ///< Converts a Date value to a double primitive. -}; -#endif - -/// A JavaScript string or symbol value (that can be used as a property name). -class Name : public Value { - public: - static void CheckCast(napi_env env, napi_value value); - - Name(); ///< Creates a new _empty_ Name instance. - Name(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. -}; - -/// A JavaScript string value. -class String : public Name { - public: - /// Creates a new String value from a UTF-8 encoded C++ string. - static String New(napi_env env, ///< Node-API environment - const std::string& value ///< UTF-8 encoded C++ string - ); - - /// Creates a new String value from a UTF-16 encoded C++ string. - static String New(napi_env env, ///< Node-API environment - const std::u16string& value ///< UTF-16 encoded C++ string - ); - - /// Creates a new String value from a UTF-8 encoded C string. - static String New( - napi_env env, ///< Node-API environment - const char* value ///< UTF-8 encoded null-terminated C string - ); - - /// Creates a new String value from a UTF-16 encoded C string. - static String New( - napi_env env, ///< Node-API environment - const char16_t* value ///< UTF-16 encoded null-terminated C string - ); - - /// Creates a new String value from a UTF-8 encoded C string with specified - /// length. - static String New(napi_env env, ///< Node-API environment - const char* value, ///< UTF-8 encoded C string (not - ///< necessarily null-terminated) - size_t length ///< length of the string in bytes - ); - - /// Creates a new String value from a UTF-16 encoded C string with specified - /// length. - static String New( - napi_env env, ///< Node-API environment - const char16_t* value, ///< UTF-16 encoded C string (not necessarily - ///< null-terminated) - size_t length ///< Length of the string in 2-byte code units - ); - - /// Creates a new String based on the original object's type. - /// - /// `value` may be any of: - /// - const char* (encoded using UTF-8, null-terminated) - /// - const char16_t* (encoded using UTF-16-LE, null-terminated) - /// - std::string (encoded using UTF-8) - /// - std::u16string - template - static String From(napi_env env, const T& value); - - static void CheckCast(napi_env env, napi_value value); - - String(); ///< Creates a new _empty_ String instance. - String(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - operator std::string() - const; ///< Converts a String value to a UTF-8 encoded C++ string. - operator std::u16string() - const; ///< Converts a String value to a UTF-16 encoded C++ string. - std::string Utf8Value() - const; ///< Converts a String value to a UTF-8 encoded C++ string. - std::u16string Utf16Value() - const; ///< Converts a String value to a UTF-16 encoded C++ string. -}; - -/// A JavaScript symbol value. -class Symbol : public Name { - public: - /// Creates a new Symbol value with an optional description. - static Symbol New( - napi_env env, ///< Node-API environment - const char* description = - nullptr ///< Optional UTF-8 encoded null-terminated C string - /// describing the symbol - ); - - /// Creates a new Symbol value with a description. - static Symbol New( - napi_env env, ///< Node-API environment - const std::string& - description ///< UTF-8 encoded C++ string describing the symbol - ); - - /// Creates a new Symbol value with a description. - static Symbol New(napi_env env, ///< Node-API environment - String description ///< String value describing the symbol - ); - - /// Creates a new Symbol value with a description. - static Symbol New( - napi_env env, ///< Node-API environment - napi_value description ///< String value describing the symbol - ); - - /// Get a public Symbol (e.g. Symbol.iterator). - static MaybeOrValue WellKnown(napi_env, const std::string& name); - - // Create a symbol in the global registry, UTF-8 Encoded cpp string - static MaybeOrValue For(napi_env env, const std::string& description); - - // Create a symbol in the global registry, C style string (null terminated) - static MaybeOrValue For(napi_env env, const char* description); - - // Create a symbol in the global registry, String value describing the symbol - static MaybeOrValue For(napi_env env, String description); - - // Create a symbol in the global registry, napi_value describing the symbol - static MaybeOrValue For(napi_env env, napi_value description); - - static void CheckCast(napi_env env, napi_value value); - - Symbol(); ///< Creates a new _empty_ Symbol instance. - Symbol(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. -}; - -class TypeTaggable : public Value { - public: -#if NAPI_VERSION >= 8 - void TypeTag(const napi_type_tag* type_tag) const; - bool CheckTypeTag(const napi_type_tag* type_tag) const; -#endif // NAPI_VERSION >= 8 - protected: - TypeTaggable(); - TypeTaggable(napi_env env, napi_value value); -}; - -/// A JavaScript object value. -class Object : public TypeTaggable { - public: - /// Enables property and element assignments using indexing syntax. - /// - /// This is a convenient helper to get and set object properties. As - /// getting and setting object properties may throw with JavaScript - /// exceptions, it is notable that these operations may fail. - /// When NODE_ADDON_API_ENABLE_MAYBE is defined, the process will abort - /// on JavaScript exceptions. - /// - /// Example: - /// - /// Napi::Value propertyValue = object1['A']; - /// object2['A'] = propertyValue; - /// Napi::Value elementValue = array[0]; - /// array[1] = elementValue; - template - class PropertyLValue { - public: - /// Converts an L-value to a value. - operator Value() const; - - /// Assigns a value to the property. The type of value can be - /// anything supported by `Object::Set`. - template - PropertyLValue& operator=(ValueType value); - - private: - PropertyLValue() = delete; - PropertyLValue(Object object, Key key); - napi_env _env; - napi_value _object; - Key _key; - - friend class Napi::Object; - }; - - /// Creates a new Object value. - static Object New(napi_env env ///< Node-API environment - ); - - static void CheckCast(napi_env env, napi_value value); - - Object(); ///< Creates a new _empty_ Object instance. - Object(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - /// Gets or sets a named property. - PropertyLValue operator[]( - const char* utf8name ///< UTF-8 encoded null-terminated property name - ); - - /// Gets or sets a named property. - PropertyLValue operator[]( - const std::string& utf8name ///< UTF-8 encoded property name - ); - - /// Gets or sets an indexed property or array element. - PropertyLValue operator[]( - uint32_t index /// Property / element index - ); - - /// Gets or sets an indexed property or array element. - PropertyLValue operator[](Value index /// Property / element index - ) const; - - /// Gets a named property. - MaybeOrValue operator[]( - const char* utf8name ///< UTF-8 encoded null-terminated property name - ) const; - - /// Gets a named property. - MaybeOrValue operator[]( - const std::string& utf8name ///< UTF-8 encoded property name - ) const; - - /// Gets an indexed property or array element. - MaybeOrValue operator[](uint32_t index ///< Property / element index - ) const; - - /// Checks whether a property is present. - MaybeOrValue Has(napi_value key ///< Property key primitive - ) const; - - /// Checks whether a property is present. - MaybeOrValue Has(Value key ///< Property key - ) const; - - /// Checks whether a named property is present. - MaybeOrValue Has( - const char* utf8name ///< UTF-8 encoded null-terminated property name - ) const; - - /// Checks whether a named property is present. - MaybeOrValue Has( - const std::string& utf8name ///< UTF-8 encoded property name - ) const; - - /// Checks whether a own property is present. - MaybeOrValue HasOwnProperty(napi_value key ///< Property key primitive - ) const; - - /// Checks whether a own property is present. - MaybeOrValue HasOwnProperty(Value key ///< Property key - ) const; - - /// Checks whether a own property is present. - MaybeOrValue HasOwnProperty( - const char* utf8name ///< UTF-8 encoded null-terminated property name - ) const; - - /// Checks whether a own property is present. - MaybeOrValue HasOwnProperty( - const std::string& utf8name ///< UTF-8 encoded property name - ) const; - - /// Gets a property. - MaybeOrValue Get(napi_value key ///< Property key primitive - ) const; - - /// Gets a property. - MaybeOrValue Get(Value key ///< Property key - ) const; - - /// Gets a named property. - MaybeOrValue Get( - const char* utf8name ///< UTF-8 encoded null-terminated property name - ) const; - - /// Gets a named property. - MaybeOrValue Get( - const std::string& utf8name ///< UTF-8 encoded property name - ) const; - - /// Sets a property. - template - MaybeOrValue Set(napi_value key, ///< Property key primitive - const ValueType& value ///< Property value primitive - ) const; - - /// Sets a property. - template - MaybeOrValue Set(Value key, ///< Property key - const ValueType& value ///< Property value - ) const; - - /// Sets a named property. - template - MaybeOrValue Set( - const char* utf8name, ///< UTF-8 encoded null-terminated property name - const ValueType& value) const; - - /// Sets a named property. - template - MaybeOrValue Set( - const std::string& utf8name, ///< UTF-8 encoded property name - const ValueType& value ///< Property value primitive - ) const; - - /// Delete property. - MaybeOrValue Delete(napi_value key ///< Property key primitive - ) const; - - /// Delete property. - MaybeOrValue Delete(Value key ///< Property key - ) const; - - /// Delete property. - MaybeOrValue Delete( - const char* utf8name ///< UTF-8 encoded null-terminated property name - ) const; - - /// Delete property. - MaybeOrValue Delete( - const std::string& utf8name ///< UTF-8 encoded property name - ) const; - - /// Checks whether an indexed property is present. - MaybeOrValue Has(uint32_t index ///< Property / element index - ) const; - - /// Gets an indexed property or array element. - MaybeOrValue Get(uint32_t index ///< Property / element index - ) const; - - /// Sets an indexed property or array element. - template - MaybeOrValue Set(uint32_t index, ///< Property / element index - const ValueType& value ///< Property value primitive - ) const; - - /// Deletes an indexed property or array element. - MaybeOrValue Delete(uint32_t index ///< Property / element index - ) const; - - /// This operation can fail in case of Proxy.[[OwnPropertyKeys]] and - /// Proxy.[[GetOwnProperty]] calling into JavaScript. See: - /// - - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys - /// - - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getownproperty-p - MaybeOrValue GetPropertyNames() const; ///< Get all property names - - /// Defines a property on the object. - /// - /// This operation can fail in case of Proxy.[[DefineOwnProperty]] calling - /// into JavaScript. See - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc - MaybeOrValue DefineProperty( - const PropertyDescriptor& - property ///< Descriptor for the property to be defined - ) const; - - /// Defines properties on the object. - /// - /// This operation can fail in case of Proxy.[[DefineOwnProperty]] calling - /// into JavaScript. See - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc - MaybeOrValue DefineProperties( - const std::initializer_list& properties - ///< List of descriptors for the properties to be defined - ) const; - - /// Defines properties on the object. - /// - /// This operation can fail in case of Proxy.[[DefineOwnProperty]] calling - /// into JavaScript. See - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc - MaybeOrValue DefineProperties( - const std::vector& properties - ///< Vector of descriptors for the properties to be defined - ) const; - - /// Checks if an object is an instance created by a constructor function. - /// - /// This is equivalent to the JavaScript `instanceof` operator. - /// - /// This operation can fail in case of Proxy.[[GetPrototypeOf]] calling into - /// JavaScript. - /// See - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getprototypeof - MaybeOrValue InstanceOf( - const Function& constructor ///< Constructor function - ) const; - - template - inline void AddFinalizer(Finalizer finalizeCallback, T* data) const; - - template - inline void AddFinalizer(Finalizer finalizeCallback, - T* data, - Hint* finalizeHint) const; - -#ifdef NAPI_CPP_EXCEPTIONS - class const_iterator; - - inline const_iterator begin() const; - - inline const_iterator end() const; - - class iterator; - - inline iterator begin(); - - inline iterator end(); -#endif // NAPI_CPP_EXCEPTIONS - -#if NAPI_VERSION >= 8 - /// This operation can fail in case of Proxy.[[GetPrototypeOf]] calling into - /// JavaScript. - /// See - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getprototypeof - MaybeOrValue Freeze() const; - /// This operation can fail in case of Proxy.[[GetPrototypeOf]] calling into - /// JavaScript. - /// See - /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getprototypeof - MaybeOrValue Seal() const; -#endif // NAPI_VERSION >= 8 -}; - -template -class External : public TypeTaggable { - public: - static External New(napi_env env, T* data); - - // Finalizer must implement `void operator()(Env env, T* data)`. - template - static External New(napi_env env, T* data, Finalizer finalizeCallback); - // Finalizer must implement `void operator()(Env env, T* data, Hint* hint)`. - template - static External New(napi_env env, - T* data, - Finalizer finalizeCallback, - Hint* finalizeHint); - - static void CheckCast(napi_env env, napi_value value); - - External(); - External(napi_env env, napi_value value); - - T* Data() const; -}; - -class Array : public Object { - public: - static Array New(napi_env env); - static Array New(napi_env env, size_t length); - - static void CheckCast(napi_env env, napi_value value); - - Array(); - Array(napi_env env, napi_value value); - - uint32_t Length() const; -}; - -#ifdef NAPI_CPP_EXCEPTIONS -class Object::const_iterator { - private: - enum class Type { BEGIN, END }; - - inline const_iterator(const Object* object, const Type type); - - public: - inline const_iterator& operator++(); - - inline bool operator==(const const_iterator& other) const; - - inline bool operator!=(const const_iterator& other) const; - - inline const std::pair> operator*() - const; - - private: - const Napi::Object* _object; - Array _keys; - uint32_t _index; - - friend class Object; -}; - -class Object::iterator { - private: - enum class Type { BEGIN, END }; - - inline iterator(Object* object, const Type type); - - public: - inline iterator& operator++(); - - inline bool operator==(const iterator& other) const; - - inline bool operator!=(const iterator& other) const; - - inline std::pair> operator*(); - - private: - Napi::Object* _object; - Array _keys; - uint32_t _index; - - friend class Object; -}; -#endif // NAPI_CPP_EXCEPTIONS - -/// A JavaScript array buffer value. -class ArrayBuffer : public Object { - public: - /// Creates a new ArrayBuffer instance over a new automatically-allocated - /// buffer. - static ArrayBuffer New( - napi_env env, ///< Node-API environment - size_t byteLength ///< Length of the buffer to be allocated, in bytes - ); - -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - /// Creates a new ArrayBuffer instance, using an external buffer with - /// specified byte length. - static ArrayBuffer New( - napi_env env, ///< Node-API environment - void* externalData, ///< Pointer to the external buffer to be used by - ///< the array - size_t byteLength ///< Length of the external buffer to be used by the - ///< array, in bytes - ); - - /// Creates a new ArrayBuffer instance, using an external buffer with - /// specified byte length. - template - static ArrayBuffer New( - napi_env env, ///< Node-API environment - void* externalData, ///< Pointer to the external buffer to be used by - ///< the array - size_t byteLength, ///< Length of the external buffer to be used by the - ///< array, - /// in bytes - Finalizer finalizeCallback ///< Function to be called when the array - ///< buffer is destroyed; - /// must implement `void operator()(Env env, - /// void* externalData)` - ); - - /// Creates a new ArrayBuffer instance, using an external buffer with - /// specified byte length. - template - static ArrayBuffer New( - napi_env env, ///< Node-API environment - void* externalData, ///< Pointer to the external buffer to be used by - ///< the array - size_t byteLength, ///< Length of the external buffer to be used by the - ///< array, - /// in bytes - Finalizer finalizeCallback, ///< Function to be called when the array - ///< buffer is destroyed; - /// must implement `void operator()(Env - /// env, void* externalData, Hint* hint)` - Hint* finalizeHint ///< Hint (second parameter) to be passed to the - ///< finalize callback - ); -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - - static void CheckCast(napi_env env, napi_value value); - - ArrayBuffer(); ///< Creates a new _empty_ ArrayBuffer instance. - ArrayBuffer(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - void* Data(); ///< Gets a pointer to the data buffer. - size_t ByteLength(); ///< Gets the length of the array buffer in bytes. - -#if NAPI_VERSION >= 7 - bool IsDetached() const; - void Detach(); -#endif // NAPI_VERSION >= 7 -}; - -/// A JavaScript typed-array value with unknown array type. -/// -/// For type-specific operations, cast to a `TypedArrayOf` instance using the -/// `As()` method: -/// -/// Napi::TypedArray array = ... -/// if (t.TypedArrayType() == napi_int32_array) { -/// Napi::Int32Array int32Array = t.As(); -/// } -class TypedArray : public Object { - public: - static void CheckCast(napi_env env, napi_value value); - - TypedArray(); ///< Creates a new _empty_ TypedArray instance. - TypedArray(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - napi_typedarray_type TypedArrayType() - const; ///< Gets the type of this typed-array. - Napi::ArrayBuffer ArrayBuffer() const; ///< Gets the backing array buffer. - - uint8_t ElementSize() - const; ///< Gets the size in bytes of one element in the array. - size_t ElementLength() const; ///< Gets the number of elements in the array. - size_t ByteOffset() - const; ///< Gets the offset into the buffer where the array starts. - size_t ByteLength() const; ///< Gets the length of the array in bytes. - - protected: - /// !cond INTERNAL - napi_typedarray_type _type; - size_t _length; - - TypedArray(napi_env env, - napi_value value, - napi_typedarray_type type, - size_t length); - - template - static -#if defined(NAPI_HAS_CONSTEXPR) - constexpr -#endif - napi_typedarray_type - TypedArrayTypeForPrimitiveType() { - return std::is_same::value ? napi_int8_array - : std::is_same::value ? napi_uint8_array - : std::is_same::value ? napi_int16_array - : std::is_same::value ? napi_uint16_array - : std::is_same::value ? napi_int32_array - : std::is_same::value ? napi_uint32_array - : std::is_same::value ? napi_float32_array - : std::is_same::value ? napi_float64_array -#if NAPI_VERSION > 5 - : std::is_same::value ? napi_bigint64_array - : std::is_same::value ? napi_biguint64_array -#endif // NAPI_VERSION > 5 - : napi_int8_array; - } - /// !endcond -}; - -/// A JavaScript typed-array value with known array type. -/// -/// Note while it is possible to create and access Uint8 "clamped" arrays using -/// this class, the _clamping_ behavior is only applied in JavaScript. -template -class TypedArrayOf : public TypedArray { - public: - /// Creates a new TypedArray instance over a new automatically-allocated array - /// buffer. - /// - /// The array type parameter can normally be omitted (because it is inferred - /// from the template parameter T), except when creating a "clamped" array: - /// - /// Uint8Array::New(env, length, napi_uint8_clamped_array) - static TypedArrayOf New( - napi_env env, ///< Node-API environment - size_t elementLength, ///< Length of the created array, as a number of - ///< elements -#if defined(NAPI_HAS_CONSTEXPR) - napi_typedarray_type type = - TypedArray::TypedArrayTypeForPrimitiveType() -#else - napi_typedarray_type type -#endif - ///< Type of array, if different from the default array type for the - ///< template parameter T. - ); - - /// Creates a new TypedArray instance over a provided array buffer. - /// - /// The array type parameter can normally be omitted (because it is inferred - /// from the template parameter T), except when creating a "clamped" array: - /// - /// Uint8Array::New(env, length, buffer, 0, napi_uint8_clamped_array) - static TypedArrayOf New( - napi_env env, ///< Node-API environment - size_t elementLength, ///< Length of the created array, as a number of - ///< elements - Napi::ArrayBuffer arrayBuffer, ///< Backing array buffer instance to use - size_t bufferOffset, ///< Offset into the array buffer where the - ///< typed-array starts -#if defined(NAPI_HAS_CONSTEXPR) - napi_typedarray_type type = - TypedArray::TypedArrayTypeForPrimitiveType() -#else - napi_typedarray_type type -#endif - ///< Type of array, if different from the default array type for the - ///< template parameter T. - ); - - static void CheckCast(napi_env env, napi_value value); - - TypedArrayOf(); ///< Creates a new _empty_ TypedArrayOf instance. - TypedArrayOf(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - T& operator[](size_t index); ///< Gets or sets an element in the array. - const T& operator[](size_t index) const; ///< Gets an element in the array. - - /// Gets a pointer to the array's backing buffer. - /// - /// This is not necessarily the same as the `ArrayBuffer::Data()` pointer, - /// because the typed-array may have a non-zero `ByteOffset()` into the - /// `ArrayBuffer`. - T* Data(); - - /// Gets a pointer to the array's backing buffer. - /// - /// This is not necessarily the same as the `ArrayBuffer::Data()` pointer, - /// because the typed-array may have a non-zero `ByteOffset()` into the - /// `ArrayBuffer`. - const T* Data() const; - - private: - T* _data; - - TypedArrayOf(napi_env env, - napi_value value, - napi_typedarray_type type, - size_t length, - T* data); -}; - -/// The DataView provides a low-level interface for reading/writing multiple -/// number types in an ArrayBuffer irrespective of the platform's endianness. -class DataView : public Object { - public: - static DataView New(napi_env env, Napi::ArrayBuffer arrayBuffer); - static DataView New(napi_env env, - Napi::ArrayBuffer arrayBuffer, - size_t byteOffset); - static DataView New(napi_env env, - Napi::ArrayBuffer arrayBuffer, - size_t byteOffset, - size_t byteLength); - - static void CheckCast(napi_env env, napi_value value); - - DataView(); ///< Creates a new _empty_ DataView instance. - DataView(napi_env env, - napi_value value); ///< Wraps a Node-API value primitive. - - Napi::ArrayBuffer ArrayBuffer() const; ///< Gets the backing array buffer. - size_t ByteOffset() - const; ///< Gets the offset into the buffer where the array starts. - size_t ByteLength() const; ///< Gets the length of the array in bytes. - - void* Data() const; - - float GetFloat32(size_t byteOffset) const; - double GetFloat64(size_t byteOffset) const; - int8_t GetInt8(size_t byteOffset) const; - int16_t GetInt16(size_t byteOffset) const; - int32_t GetInt32(size_t byteOffset) const; - uint8_t GetUint8(size_t byteOffset) const; - uint16_t GetUint16(size_t byteOffset) const; - uint32_t GetUint32(size_t byteOffset) const; - - void SetFloat32(size_t byteOffset, float value) const; - void SetFloat64(size_t byteOffset, double value) const; - void SetInt8(size_t byteOffset, int8_t value) const; - void SetInt16(size_t byteOffset, int16_t value) const; - void SetInt32(size_t byteOffset, int32_t value) const; - void SetUint8(size_t byteOffset, uint8_t value) const; - void SetUint16(size_t byteOffset, uint16_t value) const; - void SetUint32(size_t byteOffset, uint32_t value) const; - - private: - template - T ReadData(size_t byteOffset) const; - - template - void WriteData(size_t byteOffset, T value) const; - - void* _data; - size_t _length; -}; - -class Function : public Object { - public: - using VoidCallback = void (*)(const CallbackInfo& info); - using Callback = Value (*)(const CallbackInfo& info); - - template - static Function New(napi_env env, - const char* utf8name = nullptr, - void* data = nullptr); - - template - static Function New(napi_env env, - const char* utf8name = nullptr, - void* data = nullptr); - - template - static Function New(napi_env env, - const std::string& utf8name, - void* data = nullptr); - - template - static Function New(napi_env env, - const std::string& utf8name, - void* data = nullptr); - - /// Callable must implement operator() accepting a const CallbackInfo& - /// and return either void or Value. - template - static Function New(napi_env env, - Callable cb, - const char* utf8name = nullptr, - void* data = nullptr); - /// Callable must implement operator() accepting a const CallbackInfo& - /// and return either void or Value. - template - static Function New(napi_env env, - Callable cb, - const std::string& utf8name, - void* data = nullptr); - - static void CheckCast(napi_env env, napi_value value); - - Function(); - Function(napi_env env, napi_value value); - - MaybeOrValue operator()( - const std::initializer_list& args) const; - - MaybeOrValue Call(const std::initializer_list& args) const; - MaybeOrValue Call(const std::vector& args) const; - MaybeOrValue Call(const std::vector& args) const; - MaybeOrValue Call(size_t argc, const napi_value* args) const; - MaybeOrValue Call(napi_value recv, - const std::initializer_list& args) const; - MaybeOrValue Call(napi_value recv, - const std::vector& args) const; - MaybeOrValue Call(napi_value recv, - const std::vector& args) const; - MaybeOrValue Call(napi_value recv, - size_t argc, - const napi_value* args) const; - - MaybeOrValue MakeCallback( - napi_value recv, - const std::initializer_list& args, - napi_async_context context = nullptr) const; - MaybeOrValue MakeCallback(napi_value recv, - const std::vector& args, - napi_async_context context = nullptr) const; - MaybeOrValue MakeCallback(napi_value recv, - size_t argc, - const napi_value* args, - napi_async_context context = nullptr) const; - - MaybeOrValue New(const std::initializer_list& args) const; - MaybeOrValue New(const std::vector& args) const; - MaybeOrValue New(size_t argc, const napi_value* args) const; -}; - -class Promise : public Object { - public: - class Deferred { - public: - static Deferred New(napi_env env); - Deferred(napi_env env); - - Napi::Promise Promise() const; - Napi::Env Env() const; - - void Resolve(napi_value value) const; - void Reject(napi_value value) const; - - private: - napi_env _env; - napi_deferred _deferred; - napi_value _promise; - }; - - static void CheckCast(napi_env env, napi_value value); - - Promise(napi_env env, napi_value value); -}; - -template -class Buffer : public Uint8Array { - public: - static Buffer New(napi_env env, size_t length); -#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - static Buffer New(napi_env env, T* data, size_t length); - - // Finalizer must implement `void operator()(Env env, T* data)`. - template - static Buffer New(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback); - // Finalizer must implement `void operator()(Env env, T* data, Hint* hint)`. - template - static Buffer New(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback, - Hint* finalizeHint); -#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED - - static Buffer NewOrCopy(napi_env env, T* data, size_t length); - // Finalizer must implement `void operator()(Env env, T* data)`. - template - static Buffer NewOrCopy(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback); - // Finalizer must implement `void operator()(Env env, T* data, Hint* hint)`. - template - static Buffer NewOrCopy(napi_env env, - T* data, - size_t length, - Finalizer finalizeCallback, - Hint* finalizeHint); - - static Buffer Copy(napi_env env, const T* data, size_t length); - - static void CheckCast(napi_env env, napi_value value); - - Buffer(); - Buffer(napi_env env, napi_value value); - size_t Length() const; - T* Data() const; - - private: -}; - -/// Holds a counted reference to a value; initially a weak reference unless -/// otherwise specified, may be changed to/from a strong reference by adjusting -/// the refcount. -/// -/// The referenced value is not immediately destroyed when the reference count -/// is zero; it is merely then eligible for garbage-collection if there are no -/// other references to the value. -template -class Reference { - public: - static Reference New(const T& value, uint32_t initialRefcount = 0); - - Reference(); - Reference(napi_env env, napi_ref ref); - ~Reference(); - - // A reference can be moved but cannot be copied. - Reference(Reference&& other); - Reference& operator=(Reference&& other); - NAPI_DISALLOW_ASSIGN(Reference) - - operator napi_ref() const; - bool operator==(const Reference& other) const; - bool operator!=(const Reference& other) const; - - Napi::Env Env() const; - bool IsEmpty() const; - - // Note when getting the value of a Reference it is usually correct to do so - // within a HandleScope so that the value handle gets cleaned up efficiently. - T Value() const; - - uint32_t Ref() const; - uint32_t Unref() const; - void Reset(); - void Reset(const T& value, uint32_t refcount = 0); - - // Call this on a reference that is declared as static data, to prevent its - // destructor from running at program shutdown time, which would attempt to - // reset the reference when the environment is no longer valid. Avoid using - // this if at all possible. If you do need to use static data, MAKE SURE to - // warn your users that your addon is NOT threadsafe. - void SuppressDestruct(); - - protected: - Reference(const Reference&); - - /// !cond INTERNAL - napi_env _env; - napi_ref _ref; - /// !endcond - - private: - bool _suppressDestruct; -}; - -class ObjectReference : public Reference { - public: - ObjectReference(); - ObjectReference(napi_env env, napi_ref ref); - - // A reference can be moved but cannot be copied. - ObjectReference(Reference&& other); - ObjectReference& operator=(Reference&& other); - ObjectReference(ObjectReference&& other); - ObjectReference& operator=(ObjectReference&& other); - NAPI_DISALLOW_ASSIGN(ObjectReference) - - MaybeOrValue Get(const char* utf8name) const; - MaybeOrValue Get(const std::string& utf8name) const; - MaybeOrValue Set(const char* utf8name, napi_value value) const; - MaybeOrValue Set(const char* utf8name, Napi::Value value) const; - MaybeOrValue Set(const char* utf8name, const char* utf8value) const; - MaybeOrValue Set(const char* utf8name, bool boolValue) const; - MaybeOrValue Set(const char* utf8name, double numberValue) const; - MaybeOrValue Set(const std::string& utf8name, napi_value value) const; - MaybeOrValue Set(const std::string& utf8name, Napi::Value value) const; - MaybeOrValue Set(const std::string& utf8name, - std::string& utf8value) const; - MaybeOrValue Set(const std::string& utf8name, bool boolValue) const; - MaybeOrValue Set(const std::string& utf8name, double numberValue) const; - - MaybeOrValue Get(uint32_t index) const; - MaybeOrValue Set(uint32_t index, const napi_value value) const; - MaybeOrValue Set(uint32_t index, const Napi::Value value) const; - MaybeOrValue Set(uint32_t index, const char* utf8value) const; - MaybeOrValue Set(uint32_t index, const std::string& utf8value) const; - MaybeOrValue Set(uint32_t index, bool boolValue) const; - MaybeOrValue Set(uint32_t index, double numberValue) const; - - protected: - ObjectReference(const ObjectReference&); -}; - -class FunctionReference : public Reference { - public: - FunctionReference(); - FunctionReference(napi_env env, napi_ref ref); - - // A reference can be moved but cannot be copied. - FunctionReference(Reference&& other); - FunctionReference& operator=(Reference&& other); - FunctionReference(FunctionReference&& other); - FunctionReference& operator=(FunctionReference&& other); - NAPI_DISALLOW_ASSIGN_COPY(FunctionReference) - - MaybeOrValue operator()( - const std::initializer_list& args) const; - - MaybeOrValue Call( - const std::initializer_list& args) const; - MaybeOrValue Call(const std::vector& args) const; - MaybeOrValue Call( - napi_value recv, const std::initializer_list& args) const; - MaybeOrValue Call(napi_value recv, - const std::vector& args) const; - MaybeOrValue Call(napi_value recv, - size_t argc, - const napi_value* args) const; - - MaybeOrValue MakeCallback( - napi_value recv, - const std::initializer_list& args, - napi_async_context context = nullptr) const; - MaybeOrValue MakeCallback( - napi_value recv, - const std::vector& args, - napi_async_context context = nullptr) const; - MaybeOrValue MakeCallback( - napi_value recv, - size_t argc, - const napi_value* args, - napi_async_context context = nullptr) const; - - MaybeOrValue New(const std::initializer_list& args) const; - MaybeOrValue New(const std::vector& args) const; -}; - -// Shortcuts to creating a new reference with inferred type and refcount = 0. -template -Reference Weak(T value); -ObjectReference Weak(Object value); -FunctionReference Weak(Function value); - -// Shortcuts to creating a new reference with inferred type and refcount = 1. -template -Reference Persistent(T value); -ObjectReference Persistent(Object value); -FunctionReference Persistent(Function value); - -/// A persistent reference to a JavaScript error object. Use of this class -/// depends somewhat on whether C++ exceptions are enabled at compile time. -/// -/// ### Handling Errors With C++ Exceptions -/// -/// If C++ exceptions are enabled, then the `Error` class extends -/// `std::exception` and enables integrated error-handling for C++ exceptions -/// and JavaScript exceptions. -/// -/// If a Node-API call fails without executing any JavaScript code (for -/// example due to an invalid argument), then the Node-API wrapper -/// automatically converts and throws the error as a C++ exception of type -/// `Napi::Error`. Or if a JavaScript function called by C++ code via Node-API -/// throws a JavaScript exception, then the Node-API wrapper automatically -/// converts and throws it as a C++ exception of type `Napi::Error`. -/// -/// If a C++ exception of type `Napi::Error` escapes from a Node-API C++ -/// callback, then the Node-API wrapper automatically converts and throws it -/// as a JavaScript exception. Therefore, catching a C++ exception of type -/// `Napi::Error` prevents a JavaScript exception from being thrown. -/// -/// #### Example 1A - Throwing a C++ exception: -/// -/// Napi::Env env = ... -/// throw Napi::Error::New(env, "Example exception"); -/// -/// Following C++ statements will not be executed. The exception will bubble -/// up as a C++ exception of type `Napi::Error`, until it is either caught -/// while still in C++, or else automatically propataged as a JavaScript -/// exception when the callback returns to JavaScript. -/// -/// #### Example 2A - Propagating a Node-API C++ exception: -/// -/// Napi::Function jsFunctionThatThrows = someObj.As(); -/// Napi::Value result = jsFunctionThatThrows({ arg1, arg2 }); -/// -/// Following C++ statements will not be executed. The exception will bubble -/// up as a C++ exception of type `Napi::Error`, until it is either caught -/// while still in C++, or else automatically propagated as a JavaScript -/// exception when the callback returns to JavaScript. -/// -/// #### Example 3A - Handling a Node-API C++ exception: -/// -/// Napi::Function jsFunctionThatThrows = someObj.As(); -/// Napi::Value result; -/// try { -/// result = jsFunctionThatThrows({ arg1, arg2 }); -/// } catch (const Napi::Error& e) { -/// cerr << "Caught JavaScript exception: " + e.what(); -/// } -/// -/// Since the exception was caught here, it will not be propagated as a -/// JavaScript exception. -/// -/// ### Handling Errors Without C++ Exceptions -/// -/// If C++ exceptions are disabled (by defining `NAPI_DISABLE_CPP_EXCEPTIONS`) -/// then this class does not extend `std::exception`, and APIs in the `Napi` -/// namespace do not throw C++ exceptions when they fail. Instead, they raise -/// _pending_ JavaScript exceptions and return _empty_ `Value`s. Calling code -/// should check `Value::IsEmpty()` before attempting to use a returned value, -/// and may use methods on the `Env` class to check for, get, and clear a -/// pending JavaScript exception. If the pending exception is not cleared, it -/// will be thrown when the native callback returns to JavaScript. -/// -/// #### Example 1B - Throwing a JS exception -/// -/// Napi::Env env = ... -/// Napi::Error::New(env, "Example -/// exception").ThrowAsJavaScriptException(); return; -/// -/// After throwing a JS exception, the code should generally return -/// immediately from the native callback, after performing any necessary -/// cleanup. -/// -/// #### Example 2B - Propagating a Node-API JS exception: -/// -/// Napi::Function jsFunctionThatThrows = someObj.As(); -/// Napi::Value result = jsFunctionThatThrows({ arg1, arg2 }); -/// if (result.IsEmpty()) return; -/// -/// An empty value result from a Node-API call indicates an error occurred, -/// and a JavaScript exception is pending. To let the exception propagate, the -/// code should generally return immediately from the native callback, after -/// performing any necessary cleanup. -/// -/// #### Example 3B - Handling a Node-API JS exception: -/// -/// Napi::Function jsFunctionThatThrows = someObj.As(); -/// Napi::Value result = jsFunctionThatThrows({ arg1, arg2 }); -/// if (result.IsEmpty()) { -/// Napi::Error e = env.GetAndClearPendingException(); -/// cerr << "Caught JavaScript exception: " + e.Message(); -/// } -/// -/// Since the exception was cleared here, it will not be propagated as a -/// JavaScript exception after the native callback returns. -class Error : public ObjectReference -#ifdef NAPI_CPP_EXCEPTIONS - , - public std::exception -#endif // NAPI_CPP_EXCEPTIONS -{ - public: - static Error New(napi_env env); - static Error New(napi_env env, const char* message); - static Error New(napi_env env, const std::string& message); - - static NAPI_NO_RETURN void Fatal(const char* location, const char* message); - - Error(); - Error(napi_env env, napi_value value); - - // An error can be moved or copied. - Error(Error&& other); - Error& operator=(Error&& other); - Error(const Error&); - Error& operator=(const Error&); - - const std::string& Message() const NAPI_NOEXCEPT; - void ThrowAsJavaScriptException() const; - - Object Value() const; - -#ifdef NAPI_CPP_EXCEPTIONS - const char* what() const NAPI_NOEXCEPT override; -#endif // NAPI_CPP_EXCEPTIONS - - protected: - /// !cond INTERNAL - using create_error_fn = napi_status (*)(napi_env envb, - napi_value code, - napi_value msg, - napi_value* result); - - template - static TError New(napi_env env, - const char* message, - size_t length, - create_error_fn create_error); - /// !endcond - - private: - static inline const char* ERROR_WRAP_VALUE() NAPI_NOEXCEPT; - mutable std::string _message; -}; - -class TypeError : public Error { - public: - static TypeError New(napi_env env, const char* message); - static TypeError New(napi_env env, const std::string& message); - - TypeError(); - TypeError(napi_env env, napi_value value); -}; - -class RangeError : public Error { - public: - static RangeError New(napi_env env, const char* message); - static RangeError New(napi_env env, const std::string& message); - - RangeError(); - RangeError(napi_env env, napi_value value); -}; - -#if NAPI_VERSION > 8 -class SyntaxError : public Error { - public: - static SyntaxError New(napi_env env, const char* message); - static SyntaxError New(napi_env env, const std::string& message); - - SyntaxError(); - SyntaxError(napi_env env, napi_value value); -}; -#endif // NAPI_VERSION > 8 - -class CallbackInfo { - public: - CallbackInfo(napi_env env, napi_callback_info info); - ~CallbackInfo(); - - // Disallow copying to prevent multiple free of _dynamicArgs - NAPI_DISALLOW_ASSIGN_COPY(CallbackInfo) - - Napi::Env Env() const; - Value NewTarget() const; - bool IsConstructCall() const; - size_t Length() const; - const Value operator[](size_t index) const; - Value This() const; - void* Data() const; - void SetData(void* data); - explicit operator napi_callback_info() const; - - private: - const size_t _staticArgCount = 6; - napi_env _env; - napi_callback_info _info; - napi_value _this; - size_t _argc; - napi_value* _argv; - napi_value _staticArgs[6]; - napi_value* _dynamicArgs; - void* _data; -}; - -class PropertyDescriptor { - public: - using GetterCallback = Napi::Value (*)(const Napi::CallbackInfo& info); - using SetterCallback = void (*)(const Napi::CallbackInfo& info); - -#ifndef NODE_ADDON_API_DISABLE_DEPRECATED - template - static PropertyDescriptor Accessor( - const char* utf8name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - const std::string& utf8name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - napi_value name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Name name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - const char* utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - const std::string& utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - napi_value name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Name name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - const char* utf8name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - const std::string& utf8name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - napi_value name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - Name name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); -#endif // !NODE_ADDON_API_DISABLE_DEPRECATED - - template - static PropertyDescriptor Accessor( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - - template - static PropertyDescriptor Accessor( - const std::string& utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - - template - static PropertyDescriptor Accessor( - Name name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - - template - static PropertyDescriptor Accessor( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - - template - static PropertyDescriptor Accessor( - const std::string& utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - - template - static PropertyDescriptor Accessor( - Name name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - - template - static PropertyDescriptor Accessor( - Napi::Env env, - Napi::Object object, - const char* utf8name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Napi::Env env, - Napi::Object object, - const std::string& utf8name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Napi::Env env, - Napi::Object object, - Name name, - Getter getter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Napi::Env env, - Napi::Object object, - const char* utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Napi::Env env, - Napi::Object object, - const std::string& utf8name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Accessor( - Napi::Env env, - Napi::Object object, - Name name, - Getter getter, - Setter setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - Napi::Env env, - Napi::Object object, - const char* utf8name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - Napi::Env env, - Napi::Object object, - const std::string& utf8name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor Function( - Napi::Env env, - Napi::Object object, - Name name, - Callable cb, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor Value( - const char* utf8name, - napi_value value, - napi_property_attributes attributes = napi_default); - static PropertyDescriptor Value( - const std::string& utf8name, - napi_value value, - napi_property_attributes attributes = napi_default); - static PropertyDescriptor Value( - napi_value name, - napi_value value, - napi_property_attributes attributes = napi_default); - static PropertyDescriptor Value( - Name name, - Napi::Value value, - napi_property_attributes attributes = napi_default); - - PropertyDescriptor(napi_property_descriptor desc); - - operator napi_property_descriptor&(); - operator const napi_property_descriptor&() const; - - private: - napi_property_descriptor _desc; -}; - -/// Property descriptor for use with `ObjectWrap::DefineClass()`. -/// -/// This is different from the standalone `PropertyDescriptor` because it is -/// specific to each `ObjectWrap` subclass. This prevents using descriptors -/// from a different class when defining a new class (preventing the callbacks -/// from having incorrect `this` pointers). -template -class ClassPropertyDescriptor { - public: - ClassPropertyDescriptor(napi_property_descriptor desc) : _desc(desc) {} - - operator napi_property_descriptor&() { return _desc; } - operator const napi_property_descriptor&() const { return _desc; } - - private: - napi_property_descriptor _desc; -}; - -template -struct MethodCallbackData { - TCallback callback; - void* data; -}; - -template -struct AccessorCallbackData { - TGetterCallback getterCallback; - TSetterCallback setterCallback; - void* data; -}; - -template -class InstanceWrap { - public: - using InstanceVoidMethodCallback = void (T::*)(const CallbackInfo& info); - using InstanceMethodCallback = Napi::Value (T::*)(const CallbackInfo& info); - using InstanceGetterCallback = Napi::Value (T::*)(const CallbackInfo& info); - using InstanceSetterCallback = void (T::*)(const CallbackInfo& info, - const Napi::Value& value); - - using PropertyDescriptor = ClassPropertyDescriptor; - - static PropertyDescriptor InstanceMethod( - const char* utf8name, - InstanceVoidMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor InstanceMethod( - const char* utf8name, - InstanceMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor InstanceMethod( - Symbol name, - InstanceVoidMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor InstanceMethod( - Symbol name, - InstanceMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor InstanceMethod( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor InstanceMethod( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor InstanceMethod( - Symbol name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor InstanceMethod( - Symbol name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor InstanceAccessor( - const char* utf8name, - InstanceGetterCallback getter, - InstanceSetterCallback setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor InstanceAccessor( - Symbol name, - InstanceGetterCallback getter, - InstanceSetterCallback setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor InstanceAccessor( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor InstanceAccessor( - Symbol name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor InstanceValue( - const char* utf8name, - Napi::Value value, - napi_property_attributes attributes = napi_default); - static PropertyDescriptor InstanceValue( - Symbol name, - Napi::Value value, - napi_property_attributes attributes = napi_default); - - protected: - static void AttachPropData(napi_env env, - napi_value value, - const napi_property_descriptor* prop); - - private: - using This = InstanceWrap; - - using InstanceVoidMethodCallbackData = - MethodCallbackData; - using InstanceMethodCallbackData = - MethodCallbackData; - using InstanceAccessorCallbackData = - AccessorCallbackData; - - static napi_value InstanceVoidMethodCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value InstanceMethodCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value InstanceGetterCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value InstanceSetterCallbackWrapper(napi_env env, - napi_callback_info info); - - template - static napi_value WrappedMethod(napi_env env, - napi_callback_info info) NAPI_NOEXCEPT; - - template - struct SetterTag {}; - - template - static napi_callback WrapSetter(SetterTag) NAPI_NOEXCEPT { - return &This::WrappedMethod; - } - static napi_callback WrapSetter(SetterTag) NAPI_NOEXCEPT { - return nullptr; - } -}; - -/// Base class to be extended by C++ classes exposed to JavaScript; each C++ -/// class instance gets "wrapped" by a JavaScript object that is managed by this -/// class. -/// -/// At initialization time, the `DefineClass()` method must be used to -/// hook up the accessor and method callbacks. It takes a list of -/// property descriptors, which can be constructed via the various -/// static methods on the base class. -/// -/// #### Example: -/// -/// class Example: public Napi::ObjectWrap { -/// public: -/// static void Initialize(Napi::Env& env, Napi::Object& target) { -/// Napi::Function constructor = DefineClass(env, "Example", { -/// InstanceAccessor<&Example::GetSomething, -/// &Example::SetSomething>("value"), -/// InstanceMethod<&Example::DoSomething>("doSomething"), -/// }); -/// target.Set("Example", constructor); -/// } -/// -/// Example(const Napi::CallbackInfo& info); // Constructor -/// Napi::Value GetSomething(const Napi::CallbackInfo& info); -/// void SetSomething(const Napi::CallbackInfo& info, const Napi::Value& -/// value); Napi::Value DoSomething(const Napi::CallbackInfo& info); -/// } -template -class ObjectWrap : public InstanceWrap, public Reference { - public: - ObjectWrap(const CallbackInfo& callbackInfo); - virtual ~ObjectWrap(); - - static T* Unwrap(Object wrapper); - - // Methods exposed to JavaScript must conform to one of these callback - // signatures. - using StaticVoidMethodCallback = void (*)(const CallbackInfo& info); - using StaticMethodCallback = Napi::Value (*)(const CallbackInfo& info); - using StaticGetterCallback = Napi::Value (*)(const CallbackInfo& info); - using StaticSetterCallback = void (*)(const CallbackInfo& info, - const Napi::Value& value); - - using PropertyDescriptor = ClassPropertyDescriptor; - - static Function DefineClass( - Napi::Env env, - const char* utf8name, - const std::initializer_list& properties, - void* data = nullptr); - static Function DefineClass(Napi::Env env, - const char* utf8name, - const std::vector& properties, - void* data = nullptr); - static PropertyDescriptor StaticMethod( - const char* utf8name, - StaticVoidMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor StaticMethod( - const char* utf8name, - StaticMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor StaticMethod( - Symbol name, - StaticVoidMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor StaticMethod( - Symbol name, - StaticMethodCallback method, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor StaticMethod( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor StaticMethod( - Symbol name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor StaticMethod( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor StaticMethod( - Symbol name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor StaticAccessor( - const char* utf8name, - StaticGetterCallback getter, - StaticSetterCallback setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor StaticAccessor( - Symbol name, - StaticGetterCallback getter, - StaticSetterCallback setter, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor StaticAccessor( - const char* utf8name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - template - static PropertyDescriptor StaticAccessor( - Symbol name, - napi_property_attributes attributes = napi_default, - void* data = nullptr); - static PropertyDescriptor StaticValue( - const char* utf8name, - Napi::Value value, - napi_property_attributes attributes = napi_default); - static PropertyDescriptor StaticValue( - Symbol name, - Napi::Value value, - napi_property_attributes attributes = napi_default); - static Napi::Value OnCalledAsFunction(const Napi::CallbackInfo& callbackInfo); - virtual void Finalize(Napi::Env env); - - private: - using This = ObjectWrap; - - static napi_value ConstructorCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value StaticVoidMethodCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value StaticMethodCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value StaticGetterCallbackWrapper(napi_env env, - napi_callback_info info); - static napi_value StaticSetterCallbackWrapper(napi_env env, - napi_callback_info info); - static void FinalizeCallback(napi_env env, void* data, void* hint); - static Function DefineClass(Napi::Env env, - const char* utf8name, - const size_t props_count, - const napi_property_descriptor* props, - void* data = nullptr); - - using StaticVoidMethodCallbackData = - MethodCallbackData; - using StaticMethodCallbackData = MethodCallbackData; - - using StaticAccessorCallbackData = - AccessorCallbackData; - - template - static napi_value WrappedMethod(napi_env env, - napi_callback_info info) NAPI_NOEXCEPT; - - template - struct StaticSetterTag {}; - - template - static napi_callback WrapStaticSetter(StaticSetterTag) NAPI_NOEXCEPT { - return &This::WrappedMethod; - } - static napi_callback WrapStaticSetter(StaticSetterTag) - NAPI_NOEXCEPT { - return nullptr; - } - - bool _construction_failed = true; -}; - -class HandleScope { - public: - HandleScope(napi_env env, napi_handle_scope scope); - explicit HandleScope(Napi::Env env); - ~HandleScope(); - - // Disallow copying to prevent double close of napi_handle_scope - NAPI_DISALLOW_ASSIGN_COPY(HandleScope) - - operator napi_handle_scope() const; - - Napi::Env Env() const; - - private: - napi_env _env; - napi_handle_scope _scope; -}; - -class EscapableHandleScope { - public: - EscapableHandleScope(napi_env env, napi_escapable_handle_scope scope); - explicit EscapableHandleScope(Napi::Env env); - ~EscapableHandleScope(); - - // Disallow copying to prevent double close of napi_escapable_handle_scope - NAPI_DISALLOW_ASSIGN_COPY(EscapableHandleScope) - - operator napi_escapable_handle_scope() const; - - Napi::Env Env() const; - Value Escape(napi_value escapee); - - private: - napi_env _env; - napi_escapable_handle_scope _scope; -}; - -#if (NAPI_VERSION > 2) -class CallbackScope { - public: - CallbackScope(napi_env env, napi_callback_scope scope); - CallbackScope(napi_env env, napi_async_context context); - virtual ~CallbackScope(); - - // Disallow copying to prevent double close of napi_callback_scope - NAPI_DISALLOW_ASSIGN_COPY(CallbackScope) - - operator napi_callback_scope() const; - - Napi::Env Env() const; - - private: - napi_env _env; - napi_callback_scope _scope; -}; -#endif - -class AsyncContext { - public: - explicit AsyncContext(napi_env env, const char* resource_name); - explicit AsyncContext(napi_env env, - const char* resource_name, - const Object& resource); - virtual ~AsyncContext(); - - AsyncContext(AsyncContext&& other); - AsyncContext& operator=(AsyncContext&& other); - NAPI_DISALLOW_ASSIGN_COPY(AsyncContext) - - operator napi_async_context() const; - - Napi::Env Env() const; - - private: - napi_env _env; - napi_async_context _context; -}; - -#if NAPI_HAS_THREADS -class AsyncWorker { - public: - virtual ~AsyncWorker(); - - NAPI_DISALLOW_ASSIGN_COPY(AsyncWorker) - - operator napi_async_work() const; - - Napi::Env Env() const; - - void Queue(); - void Cancel(); - void SuppressDestruct(); - - ObjectReference& Receiver(); - FunctionReference& Callback(); - - virtual void OnExecute(Napi::Env env); - virtual void OnWorkComplete(Napi::Env env, napi_status status); - - protected: - explicit AsyncWorker(const Function& callback); - explicit AsyncWorker(const Function& callback, const char* resource_name); - explicit AsyncWorker(const Function& callback, - const char* resource_name, - const Object& resource); - explicit AsyncWorker(const Object& receiver, const Function& callback); - explicit AsyncWorker(const Object& receiver, - const Function& callback, - const char* resource_name); - explicit AsyncWorker(const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource); - - explicit AsyncWorker(Napi::Env env); - explicit AsyncWorker(Napi::Env env, const char* resource_name); - explicit AsyncWorker(Napi::Env env, - const char* resource_name, - const Object& resource); - - virtual void Execute() = 0; - virtual void OnOK(); - virtual void OnError(const Error& e); - virtual void Destroy(); - virtual std::vector GetResult(Napi::Env env); - - void SetError(const std::string& error); - - private: - static inline void OnAsyncWorkExecute(napi_env env, void* asyncworker); - static inline void OnAsyncWorkComplete(napi_env env, - napi_status status, - void* asyncworker); - - napi_env _env; - napi_async_work _work; - ObjectReference _receiver; - FunctionReference _callback; - std::string _error; - bool _suppress_destruct; -}; -#endif // NAPI_HAS_THREADS - -#if (NAPI_VERSION > 3 && NAPI_HAS_THREADS) -class ThreadSafeFunction { - public: - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback, - FinalizerDataType* data); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - Finalizer finalizeCallback, - FinalizerDataType* data); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback); - - // This API may only be called from the main thread. - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data); - - ThreadSafeFunction(); - ThreadSafeFunction(napi_threadsafe_function tsFunctionValue); - - operator napi_threadsafe_function() const; - - // This API may be called from any thread. - napi_status BlockingCall() const; - - // This API may be called from any thread. - template - napi_status BlockingCall(Callback callback) const; - - // This API may be called from any thread. - template - napi_status BlockingCall(DataType* data, Callback callback) const; - - // This API may be called from any thread. - napi_status NonBlockingCall() const; - - // This API may be called from any thread. - template - napi_status NonBlockingCall(Callback callback) const; - - // This API may be called from any thread. - template - napi_status NonBlockingCall(DataType* data, Callback callback) const; - - // This API may only be called from the main thread. - void Ref(napi_env env) const; - - // This API may only be called from the main thread. - void Unref(napi_env env) const; - - // This API may be called from any thread. - napi_status Acquire() const; - - // This API may be called from any thread. - napi_status Release() const; - - // This API may be called from any thread. - napi_status Abort() const; - - struct ConvertibleContext { - template - operator T*() { - return static_cast(context); - } - void* context; - }; - - // This API may be called from any thread. - ConvertibleContext GetContext() const; - - private: - using CallbackWrapper = std::function; - - template - static ThreadSafeFunction New(napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data, - napi_finalize wrapper); - - napi_status CallInternal(CallbackWrapper* callbackWrapper, - napi_threadsafe_function_call_mode mode) const; - - static void CallJS(napi_env env, - napi_value jsCallback, - void* context, - void* data); - - napi_threadsafe_function _tsfn; -}; - -// A TypedThreadSafeFunction by default has no context (nullptr) and can -// accept any type (void) to its CallJs. -template -class TypedThreadSafeFunction { - public: - // This API may only be called from the main thread. - // Helper function that returns nullptr if running Node-API 5+, otherwise a - // non-empty, no-op Function. This provides the ability to specify at - // compile-time a callback parameter to `New` that safely does no action - // when targeting _any_ Node-API version. -#if NAPI_VERSION > 4 - static std::nullptr_t EmptyFunctionFactory(Napi::Env env); -#else - static Napi::Function EmptyFunctionFactory(Napi::Env env); -#endif - static Napi::Function FunctionOrEmpty(Napi::Env env, - Napi::Function& callback); - -#if NAPI_VERSION > 4 - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [missing] Resource [missing] Finalizer [missing] - template - static TypedThreadSafeFunction New( - napi_env env, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context = nullptr); - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [missing] Resource [passed] Finalizer [missing] - template - static TypedThreadSafeFunction New( - napi_env env, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context = nullptr); - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [missing] Resource [missing] Finalizer [passed] - template - static TypedThreadSafeFunction New( - napi_env env, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data = nullptr); - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [missing] Resource [passed] Finalizer [passed] - template - static TypedThreadSafeFunction New( - napi_env env, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data = nullptr); -#endif - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [passed] Resource [missing] Finalizer [missing] - template - static TypedThreadSafeFunction New( - napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context = nullptr); - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [passed] Resource [passed] Finalizer [missing] - template - static TypedThreadSafeFunction New( - napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context = nullptr); - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [passed] Resource [missing] Finalizer [passed] - template - static TypedThreadSafeFunction New( - napi_env env, - const Function& callback, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data = nullptr); - - // This API may only be called from the main thread. - // Creates a new threadsafe function with: - // Callback [passed] Resource [passed] Finalizer [passed] - template - static TypedThreadSafeFunction New( - napi_env env, - CallbackType callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data = nullptr); - - TypedThreadSafeFunction(); - TypedThreadSafeFunction(napi_threadsafe_function tsFunctionValue); - - operator napi_threadsafe_function() const; - - // This API may be called from any thread. - napi_status BlockingCall(DataType* data = nullptr) const; - - // This API may be called from any thread. - napi_status NonBlockingCall(DataType* data = nullptr) const; - - // This API may only be called from the main thread. - void Ref(napi_env env) const; - - // This API may only be called from the main thread. - void Unref(napi_env env) const; - - // This API may be called from any thread. - napi_status Acquire() const; - - // This API may be called from any thread. - napi_status Release() const; - - // This API may be called from any thread. - napi_status Abort() const; - - // This API may be called from any thread. - ContextType* GetContext() const; - - private: - template - static TypedThreadSafeFunction New( - napi_env env, - const Function& callback, - const Object& resource, - ResourceString resourceName, - size_t maxQueueSize, - size_t initialThreadCount, - ContextType* context, - Finalizer finalizeCallback, - FinalizerDataType* data, - napi_finalize wrapper); - - static void CallJsInternal(napi_env env, - napi_value jsCallback, - void* context, - void* data); - - protected: - napi_threadsafe_function _tsfn; -}; -template -class AsyncProgressWorkerBase : public AsyncWorker { - public: - virtual void OnWorkProgress(DataType* data) = 0; - class ThreadSafeData { - public: - ThreadSafeData(AsyncProgressWorkerBase* asyncprogressworker, DataType* data) - : _asyncprogressworker(asyncprogressworker), _data(data) {} - - AsyncProgressWorkerBase* asyncprogressworker() { - return _asyncprogressworker; - }; - DataType* data() { return _data; }; - - private: - AsyncProgressWorkerBase* _asyncprogressworker; - DataType* _data; - }; - void OnWorkComplete(Napi::Env env, napi_status status) override; - - protected: - explicit AsyncProgressWorkerBase(const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource, - size_t queue_size = 1); - virtual ~AsyncProgressWorkerBase(); - -// Optional callback of Napi::ThreadSafeFunction only available after -// NAPI_VERSION 4. Refs: https://github.com/nodejs/node/pull/27791 -#if NAPI_VERSION > 4 - explicit AsyncProgressWorkerBase(Napi::Env env, - const char* resource_name, - const Object& resource, - size_t queue_size = 1); -#endif - - static inline void OnAsyncWorkProgress(Napi::Env env, - Napi::Function jsCallback, - void* data); - - napi_status NonBlockingCall(DataType* data); - - private: - ThreadSafeFunction _tsfn; - bool _work_completed = false; - napi_status _complete_status; - static inline void OnThreadSafeFunctionFinalize( - Napi::Env env, void* data, AsyncProgressWorkerBase* context); -}; - -template -class AsyncProgressWorker : public AsyncProgressWorkerBase { - public: - virtual ~AsyncProgressWorker(); - - class ExecutionProgress { - friend class AsyncProgressWorker; - - public: - void Signal() const; - void Send(const T* data, size_t count) const; - - private: - explicit ExecutionProgress(AsyncProgressWorker* worker) : _worker(worker) {} - AsyncProgressWorker* const _worker; - }; - - void OnWorkProgress(void*) override; - - protected: - explicit AsyncProgressWorker(const Function& callback); - explicit AsyncProgressWorker(const Function& callback, - const char* resource_name); - explicit AsyncProgressWorker(const Function& callback, - const char* resource_name, - const Object& resource); - explicit AsyncProgressWorker(const Object& receiver, - const Function& callback); - explicit AsyncProgressWorker(const Object& receiver, - const Function& callback, - const char* resource_name); - explicit AsyncProgressWorker(const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource); - -// Optional callback of Napi::ThreadSafeFunction only available after -// NAPI_VERSION 4. Refs: https://github.com/nodejs/node/pull/27791 -#if NAPI_VERSION > 4 - explicit AsyncProgressWorker(Napi::Env env); - explicit AsyncProgressWorker(Napi::Env env, const char* resource_name); - explicit AsyncProgressWorker(Napi::Env env, - const char* resource_name, - const Object& resource); -#endif - virtual void Execute(const ExecutionProgress& progress) = 0; - virtual void OnProgress(const T* data, size_t count) = 0; - - private: - void Execute() override; - void Signal(); - void SendProgress_(const T* data, size_t count); - - std::mutex _mutex; - T* _asyncdata; - size_t _asyncsize; - bool _signaled; -}; - -template -class AsyncProgressQueueWorker - : public AsyncProgressWorkerBase> { - public: - virtual ~AsyncProgressQueueWorker(){}; - - class ExecutionProgress { - friend class AsyncProgressQueueWorker; - - public: - void Signal() const; - void Send(const T* data, size_t count) const; - - private: - explicit ExecutionProgress(AsyncProgressQueueWorker* worker) - : _worker(worker) {} - AsyncProgressQueueWorker* const _worker; - }; - - void OnWorkComplete(Napi::Env env, napi_status status) override; - void OnWorkProgress(std::pair*) override; - - protected: - explicit AsyncProgressQueueWorker(const Function& callback); - explicit AsyncProgressQueueWorker(const Function& callback, - const char* resource_name); - explicit AsyncProgressQueueWorker(const Function& callback, - const char* resource_name, - const Object& resource); - explicit AsyncProgressQueueWorker(const Object& receiver, - const Function& callback); - explicit AsyncProgressQueueWorker(const Object& receiver, - const Function& callback, - const char* resource_name); - explicit AsyncProgressQueueWorker(const Object& receiver, - const Function& callback, - const char* resource_name, - const Object& resource); - -// Optional callback of Napi::ThreadSafeFunction only available after -// NAPI_VERSION 4. Refs: https://github.com/nodejs/node/pull/27791 -#if NAPI_VERSION > 4 - explicit AsyncProgressQueueWorker(Napi::Env env); - explicit AsyncProgressQueueWorker(Napi::Env env, const char* resource_name); - explicit AsyncProgressQueueWorker(Napi::Env env, - const char* resource_name, - const Object& resource); -#endif - virtual void Execute(const ExecutionProgress& progress) = 0; - virtual void OnProgress(const T* data, size_t count) = 0; - - private: - void Execute() override; - void Signal() const; - void SendProgress_(const T* data, size_t count); -}; -#endif // NAPI_VERSION > 3 && NAPI_HAS_THREADS - -// Memory management. -class MemoryManagement { - public: - static int64_t AdjustExternalMemory(Env env, int64_t change_in_bytes); -}; - -// Version management -class VersionManagement { - public: - static uint32_t GetNapiVersion(Env env); - static const napi_node_version* GetNodeVersion(Env env); -}; - -#if NAPI_VERSION > 5 -template -class Addon : public InstanceWrap { - public: - static inline Object Init(Env env, Object exports); - static T* Unwrap(Object wrapper); - - protected: - using AddonProp = ClassPropertyDescriptor; - void DefineAddon(Object exports, - const std::initializer_list& props); - Napi::Object DefineProperties(Object object, - const std::initializer_list& props); - - private: - Object entry_point_; -}; -#endif // NAPI_VERSION > 5 - -#ifdef NAPI_CPP_CUSTOM_NAMESPACE -} // namespace NAPI_CPP_CUSTOM_NAMESPACE -#endif - -} // namespace Napi - -// Inline implementations of all the above class methods are included here. -#include "napi-inl.h" - -#endif // SRC_NAPI_H_ diff --git a/web/static/node_modules/node-addon-api/node_addon_api.gyp b/web/static/node_modules/node-addon-api/node_addon_api.gyp deleted file mode 100644 index 29905ed4..00000000 --- a/web/static/node_modules/node-addon-api/node_addon_api.gyp +++ /dev/null @@ -1,32 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'node_addon_api', - 'type': 'none', - 'sources': [ 'napi.h', 'napi-inl.h' ], - 'direct_dependent_settings': { - 'include_dirs': [ '.' ], - 'includes': ['noexcept.gypi'], - } - }, - { - 'target_name': 'node_addon_api_except', - 'type': 'none', - 'sources': [ 'napi.h', 'napi-inl.h' ], - 'direct_dependent_settings': { - 'include_dirs': [ '.' ], - 'includes': ['except.gypi'], - } - }, - { - 'target_name': 'node_addon_api_maybe', - 'type': 'none', - 'sources': [ 'napi.h', 'napi-inl.h' ], - 'direct_dependent_settings': { - 'include_dirs': [ '.' ], - 'includes': ['noexcept.gypi'], - 'defines': ['NODE_ADDON_API_ENABLE_MAYBE'] - } - }, - ] -} diff --git a/web/static/node_modules/node-addon-api/node_api.gyp b/web/static/node_modules/node-addon-api/node_api.gyp deleted file mode 100644 index 4ff0ae7d..00000000 --- a/web/static/node_modules/node-addon-api/node_api.gyp +++ /dev/null @@ -1,9 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'nothing', - 'type': 'static_library', - 'sources': [ 'nothing.c' ] - } - ] -} diff --git a/web/static/node_modules/node-addon-api/noexcept.gypi b/web/static/node_modules/node-addon-api/noexcept.gypi deleted file mode 100644 index 404a05f3..00000000 --- a/web/static/node_modules/node-addon-api/noexcept.gypi +++ /dev/null @@ -1,26 +0,0 @@ -{ - 'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ], - 'cflags': [ '-fno-exceptions' ], - 'cflags_cc': [ '-fno-exceptions' ], - 'conditions': [ - ["OS=='win'", { - # _HAS_EXCEPTIONS is already defined and set to 0 in common.gypi - #"defines": [ - # "_HAS_EXCEPTIONS=0" - #], - "msvs_settings": { - "VCCLCompilerTool": { - 'ExceptionHandling': 0, - 'EnablePREfast': 'true', - }, - }, - }], - ["OS=='mac'", { - 'xcode_settings': { - 'CLANG_CXX_LIBRARY': 'libc++', - 'MACOSX_DEPLOYMENT_TARGET': '10.7', - 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', - }, - }], - ], -} diff --git a/web/static/node_modules/node-addon-api/nothing.c b/web/static/node_modules/node-addon-api/nothing.c deleted file mode 100644 index e69de29b..00000000 diff --git a/web/static/node_modules/node-addon-api/package-support.json b/web/static/node_modules/node-addon-api/package-support.json deleted file mode 100644 index 10d3607a..00000000 --- a/web/static/node_modules/node-addon-api/package-support.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "versions": [ - { - "version": "*", - "target": { - "node": "active" - }, - "response": { - "type": "time-permitting", - "paid": false, - "contact": { - "name": "node-addon-api team", - "url": "https://github.com/nodejs/node-addon-api/issues" - } - }, - "backing": [ { "project": "https://github.com/nodejs" }, - { "foundation": "https://openjsf.org/" } - ] - } - ] -} diff --git a/web/static/node_modules/node-addon-api/package.json b/web/static/node_modules/node-addon-api/package.json deleted file mode 100644 index d772ddc9..00000000 --- a/web/static/node_modules/node-addon-api/package.json +++ /dev/null @@ -1,480 +0,0 @@ -{ - "bugs": { - "url": "https://github.com/nodejs/node-addon-api/issues" - }, - "contributors": [ - { - "name": "Abhishek Kumar Singh", - "url": "https://github.com/abhi11210646" - }, - { - "name": "Alba Mendez", - "url": "https://github.com/jmendeth" - }, - { - "name": "Alexander Floh", - "url": "https://github.com/alexanderfloh" - }, - { - "name": "Ammar Faizi", - "url": "https://github.com/ammarfaizi2" - }, - { - "name": "András Timár, Dr", - "url": "https://github.com/timarandras" - }, - { - "name": "Andrew Petersen", - "url": "https://github.com/kirbysayshi" - }, - { - "name": "Anisha Rohra", - "url": "https://github.com/anisha-rohra" - }, - { - "name": "Anna Henningsen", - "url": "https://github.com/addaleax" - }, - { - "name": "Arnaud Botella", - "url": "https://github.com/BotellaA" - }, - { - "name": "Arunesh Chandra", - "url": "https://github.com/aruneshchandra" - }, - { - "name": "Azlan Mukhtar", - "url": "https://github.com/azlan" - }, - { - "name": "Ben Berman", - "url": "https://github.com/rivertam" - }, - { - "name": "Benjamin Byholm", - "url": "https://github.com/kkoopa" - }, - { - "name": "Bill Gallafent", - "url": "https://github.com/gallafent" - }, - { - "name": "blagoev", - "url": "https://github.com/blagoev" - }, - { - "name": "Bruce A. MacNaughton", - "url": "https://github.com/bmacnaughton" - }, - { - "name": "Cory Mickelson", - "url": "https://github.com/corymickelson" - }, - { - "name": "Daniel Bevenius", - "url": "https://github.com/danbev" - }, - { - "name": "Dante Calderón", - "url": "https://github.com/dantehemerson" - }, - { - "name": "Darshan Sen", - "url": "https://github.com/RaisinTen" - }, - { - "name": "David Halls", - "url": "https://github.com/davedoesdev" - }, - { - "name": "Deepak Rajamohan", - "url": "https://github.com/deepakrkris" - }, - { - "name": "Dmitry Ashkadov", - "url": "https://github.com/dmitryash" - }, - { - "name": "Dongjin Na", - "url": "https://github.com/nadongguri" - }, - { - "name": "Doni Rubiagatra", - "url": "https://github.com/rubiagatra" - }, - { - "name": "Eric Bickle", - "url": "https://github.com/ebickle" - }, - { - "name": "extremeheat", - "url": "https://github.com/extremeheat" - }, - { - "name": "Feng Yu", - "url": "https://github.com/F3n67u" - }, - { - "name": "Ferdinand Holzer", - "url": "https://github.com/fholzer" - }, - { - "name": "Gabriel Schulhof", - "url": "https://github.com/gabrielschulhof" - }, - { - "name": "Guenter Sandner", - "url": "https://github.com/gms1" - }, - { - "name": "Gus Caplan", - "url": "https://github.com/devsnek" - }, - { - "name": "Helio Frota", - "url": "https://github.com/helio-frota" - }, - { - "name": "Hitesh Kanwathirtha", - "url": "https://github.com/digitalinfinity" - }, - { - "name": "ikokostya", - "url": "https://github.com/ikokostya" - }, - { - "name": "Jack Xia", - "url": "https://github.com/JckXia" - }, - { - "name": "Jake Barnes", - "url": "https://github.com/DuBistKomisch" - }, - { - "name": "Jake Yoon", - "url": "https://github.com/yjaeseok" - }, - { - "name": "Jason Ginchereau", - "url": "https://github.com/jasongin" - }, - { - "name": "Jenny", - "url": "https://github.com/egg-bread" - }, - { - "name": "Jeroen Janssen", - "url": "https://github.com/japj" - }, - { - "name": "Jim Schlight", - "url": "https://github.com/jschlight" - }, - { - "name": "Jinho Bang", - "url": "https://github.com/romandev" - }, - { - "name": "José Expósito", - "url": "https://github.com/JoseExposito" - }, - { - "name": "joshgarde", - "url": "https://github.com/joshgarde" - }, - { - "name": "Julian Mesa", - "url": "https://github.com/julianmesa-gitkraken" - }, - { - "name": "Kasumi Hanazuki", - "url": "https://github.com/hanazuki" - }, - { - "name": "Kelvin", - "url": "https://github.com/kelvinhammond" - }, - { - "name": "Kevin Eady", - "url": "https://github.com/KevinEady" - }, - { - "name": "Kévin VOYER", - "url": "https://github.com/kecsou" - }, - { - "name": "kidneysolo", - "url": "https://github.com/kidneysolo" - }, - { - "name": "Koki Nishihara", - "url": "https://github.com/Nishikoh" - }, - { - "name": "Konstantin Tarkus", - "url": "https://github.com/koistya" - }, - { - "name": "Kyle Farnung", - "url": "https://github.com/kfarnung" - }, - { - "name": "Kyle Kovacs", - "url": "https://github.com/nullromo" - }, - { - "name": "legendecas", - "url": "https://github.com/legendecas" - }, - { - "name": "LongYinan", - "url": "https://github.com/Brooooooklyn" - }, - { - "name": "Lovell Fuller", - "url": "https://github.com/lovell" - }, - { - "name": "Luciano Martorella", - "url": "https://github.com/lmartorella" - }, - { - "name": "mastergberry", - "url": "https://github.com/mastergberry" - }, - { - "name": "Mathias Küsel", - "url": "https://github.com/mathiask88" - }, - { - "name": "Mathias Stearn", - "url": "https://github.com/RedBeard0531" - }, - { - "name": "Matteo Collina", - "url": "https://github.com/mcollina" - }, - { - "name": "Michael Dawson", - "url": "https://github.com/mhdawson" - }, - { - "name": "Michael Price", - "url": "https://github.com/mikepricedev" - }, - { - "name": "Michele Campus", - "url": "https://github.com/kYroL01" - }, - { - "name": "Mikhail Cheshkov", - "url": "https://github.com/mcheshkov" - }, - { - "name": "nempoBu4", - "url": "https://github.com/nempoBu4" - }, - { - "name": "Nicola Del Gobbo", - "url": "https://github.com/NickNaso" - }, - { - "name": "Nick Soggin", - "url": "https://github.com/iSkore" - }, - { - "name": "Nikolai Vavilov", - "url": "https://github.com/seishun" - }, - { - "name": "Nurbol Alpysbayev", - "url": "https://github.com/anurbol" - }, - { - "name": "pacop", - "url": "https://github.com/pacop" - }, - { - "name": "Peter Šándor", - "url": "https://github.com/petersandor" - }, - { - "name": "Philipp Renoth", - "url": "https://github.com/DaAitch" - }, - { - "name": "rgerd", - "url": "https://github.com/rgerd" - }, - { - "name": "Richard Lau", - "url": "https://github.com/richardlau" - }, - { - "name": "Rolf Timmermans", - "url": "https://github.com/rolftimmermans" - }, - { - "name": "Ross Weir", - "url": "https://github.com/ross-weir" - }, - { - "name": "Ryuichi Okumura", - "url": "https://github.com/okuryu" - }, - { - "name": "Saint Gabriel", - "url": "https://github.com/chineduG" - }, - { - "name": "Sampson Gao", - "url": "https://github.com/sampsongao" - }, - { - "name": "Sam Roberts", - "url": "https://github.com/sam-github" - }, - { - "name": "strager", - "url": "https://github.com/strager" - }, - { - "name": "Taylor Woll", - "url": "https://github.com/boingoing" - }, - { - "name": "Thomas Gentilhomme", - "url": "https://github.com/fraxken" - }, - { - "name": "Tim Rach", - "url": "https://github.com/timrach" - }, - { - "name": "Tobias Nießen", - "url": "https://github.com/tniessen" - }, - { - "name": "todoroff", - "url": "https://github.com/todoroff" - }, - { - "name": "Toyo Li", - "url": "https://github.com/toyobayashi" - }, - { - "name": "Tux3", - "url": "https://github.com/tux3" - }, - { - "name": "Vlad Velmisov", - "url": "https://github.com/Velmisov" - }, - { - "name": "Vladimir Morozov", - "url": "https://github.com/vmoroz" - - }, - { - "name": "WenheLI", - "url": "https://github.com/WenheLI" - }, - { - "name": "Xuguang Mei", - "url": "https://github.com/meixg" - }, - { - "name": "Yohei Kishimoto", - "url": "https://github.com/morokosi" - }, - { - "name": "Yulong Wang", - "url": "https://github.com/fs-eire" - }, - { - "name": "Ziqiu Zhao", - "url": "https://github.com/ZzqiZQute" - }, - { - "name": "Feng Yu", - "url": "https://github.com/F3n67u" - }, - { - "name": "wanlu wang", - "url": "https://github.com/wanlu" - }, - { - "name": "Caleb Hearon", - "url": "https://github.com/chearon" - }, - { - "name": "Marx", - "url": "https://github.com/MarxJiao" - }, - { - "name": "Ömer AKGÜL", - "url": "https://github.com/tuhalf" - } - ], - "description": "Node.js API (Node-API)", - "devDependencies": { - "benchmark": "^2.1.4", - "bindings": "^1.5.0", - "clang-format": "^1.4.0", - "eslint": "^7.32.0", - "eslint-config-semistandard": "^16.0.0", - "eslint-config-standard": "^16.0.3", - "eslint-plugin-import": "^2.24.2", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^5.1.0", - "fs-extra": "^11.1.1", - "path": "^0.12.7", - "pre-commit": "^1.2.2", - "safe-buffer": "^5.1.1" - }, - "directories": {}, - "gypfile": false, - "homepage": "https://github.com/nodejs/node-addon-api", - "keywords": [ - "n-api", - "napi", - "addon", - "native", - "bindings", - "c", - "c++", - "nan", - "node-addon-api" - ], - "license": "MIT", - "main": "index.js", - "name": "node-addon-api", - "readme": "README.md", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/node-addon-api.git" - }, - "files": [ - "*.{c,h,gyp,gypi}", - "package-support.json", - "tools/" - ], - "scripts": { - "prebenchmark": "node-gyp rebuild -C benchmark", - "benchmark": "node benchmark", - "pretest": "node-gyp rebuild -C test", - "test": "node test", - "test:debug": "node-gyp rebuild -C test --debug && NODE_API_BUILD_CONFIG=Debug node ./test/index.js", - "predev": "node-gyp rebuild -C test --debug", - "dev": "node test", - "predev:incremental": "node-gyp configure build -C test --debug", - "dev:incremental": "node test", - "doc": "doxygen doc/Doxyfile", - "lint": "node tools/eslint-format && node tools/clang-format", - "lint:fix": "node tools/clang-format --fix && node tools/eslint-format --fix" - }, - "pre-commit": "lint", - "version": "7.1.1", - "support": true -} diff --git a/web/static/node_modules/node-addon-api/tools/README.md b/web/static/node_modules/node-addon-api/tools/README.md deleted file mode 100644 index 6b80e94f..00000000 --- a/web/static/node_modules/node-addon-api/tools/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# Tools - -## clang-format - -The clang-format checking tools is designed to check changed lines of code compared to given git-refs. - -## Migration Script - -The migration tool is designed to reduce repetitive work in the migration process. However, the script is not aiming to convert every thing for you. There are usually some small fixes and major reconstruction required. - -### How To Use - -To run the conversion script, first make sure you have the latest `node-addon-api` in your `node_modules` directory. -``` -npm install node-addon-api -``` - -Then run the script passing your project directory -``` -node ./node_modules/node-addon-api/tools/conversion.js ./ -``` - -After finish, recompile and debug things that are missed by the script. - - -### Quick Fixes -Here is the list of things that can be fixed easily. - 1. Change your methods' return value to void if it doesn't return value to JavaScript. - 2. Use `.` to access attribute or to invoke member function in Napi::Object instead of `->`. - 3. `Napi::New(env, value);` to `Napi::[Type]::New(env, value); - - -### Major Reconstructions -The implementation of `Napi::ObjectWrap` is significantly different from NAN's. `Napi::ObjectWrap` takes a pointer to the wrapped object and creates a reference to the wrapped object inside ObjectWrap constructor. `Napi::ObjectWrap` also associates wrapped object's instance methods to Javascript module instead of static methods like NAN. - -So if you use Nan::ObjectWrap in your module, you will need to execute the following steps. - - 1. Convert your [ClassName]::New function to a constructor function that takes a `Napi::CallbackInfo`. Declare it as -``` -[ClassName](const Napi::CallbackInfo& info); -``` -and define it as -``` -[ClassName]::[ClassName](const Napi::CallbackInfo& info) : Napi::ObjectWrap<[ClassName]>(info){ - ... -} -``` -This way, the `Napi::ObjectWrap` constructor will be invoked after the object has been instantiated and `Napi::ObjectWrap` can use the `this` pointer to create a reference to the wrapped object. - - 2. Move your original constructor code into the new constructor. Delete your original constructor. - 3. In your class initialization function, associate native methods in the following way. -``` -Napi::FunctionReference constructor; - -void [ClassName]::Init(Napi::Env env, Napi::Object exports, Napi::Object module) { - Napi::HandleScope scope(env); - Napi::Function ctor = DefineClass(env, "Canvas", { - InstanceMethod<&[ClassName]::Func1>("Func1"), - InstanceMethod<&[ClassName]::Func2>("Func2"), - InstanceAccessor<&[ClassName]::ValueGetter>("Value"), - StaticMethod<&[ClassName]::StaticMethod>("MethodName"), - InstanceValue("Value", Napi::[Type]::New(env, value)), - }); - - constructor = Napi::Persistent(ctor); - constructor .SuppressDestruct(); - exports.Set("[ClassName]", ctor); -} -``` - 4. In function where you need to Unwrap the ObjectWrap in NAN like `[ClassName]* native = Nan::ObjectWrap::Unwrap<[ClassName]>(info.This());`, use `this` pointer directly as the unwrapped object as each ObjectWrap instance is associated with a unique object instance. - - -If you still find issues after following this guide, please leave us an issue describing your problem and we will try to resolve it. diff --git a/web/static/node_modules/node-addon-api/tools/check-napi.js b/web/static/node_modules/node-addon-api/tools/check-napi.js deleted file mode 100644 index 9199af33..00000000 --- a/web/static/node_modules/node-addon-api/tools/check-napi.js +++ /dev/null @@ -1,99 +0,0 @@ -'use strict'; -// Descend into a directory structure and, for each file matching *.node, output -// based on the imports found in the file whether it's an N-API module or not. - -const fs = require('fs'); -const path = require('path'); - -// Read the output of the command, break it into lines, and use the reducer to -// decide whether the file is an N-API module or not. -function checkFile (file, command, argv, reducer) { - const child = require('child_process').spawn(command, argv, { - stdio: ['inherit', 'pipe', 'inherit'] - }); - let leftover = ''; - let isNapi; - child.stdout.on('data', (chunk) => { - if (isNapi === undefined) { - chunk = (leftover + chunk.toString()).split(/[\r\n]+/); - leftover = chunk.pop(); - isNapi = chunk.reduce(reducer, isNapi); - if (isNapi !== undefined) { - child.kill(); - } - } - }); - child.on('close', (code, signal) => { - if ((code === null && signal !== null) || (code !== 0)) { - console.log( - command + ' exited with code: ' + code + ' and signal: ' + signal); - } else { - // Green if it's a N-API module, red otherwise. - console.log( - '\x1b[' + (isNapi ? '42' : '41') + 'm' + - (isNapi ? ' N-API' : 'Not N-API') + - '\x1b[0m: ' + file); - } - }); -} - -// Use nm -a to list symbols. -function checkFileUNIX (file) { - checkFile(file, 'nm', ['-a', file], (soFar, line) => { - if (soFar === undefined) { - line = line.match(/([0-9a-f]*)? ([a-zA-Z]) (.*$)/); - if (line[2] === 'U') { - if (/^napi/.test(line[3])) { - soFar = true; - } - } - } - return soFar; - }); -} - -// Use dumpbin /imports to list symbols. -function checkFileWin32 (file) { - checkFile(file, 'dumpbin', ['/imports', file], (soFar, line) => { - if (soFar === undefined) { - line = line.match(/([0-9a-f]*)? +([a-zA-Z0-9]) (.*$)/); - if (line && /^napi/.test(line[line.length - 1])) { - soFar = true; - } - } - return soFar; - }); -} - -// Descend into a directory structure and pass each file ending in '.node' to -// one of the above checks, depending on the OS. -function recurse (top) { - fs.readdir(top, (error, items) => { - if (error) { - throw new Error('error reading directory ' + top + ': ' + error); - } - items.forEach((item) => { - item = path.join(top, item); - fs.stat(item, ((item) => (error, stats) => { - if (error) { - throw new Error('error about ' + item + ': ' + error); - } - if (stats.isDirectory()) { - recurse(item); - } else if (/[.]node$/.test(item) && - // Explicitly ignore files called 'nothing.node' because they are - // artefacts of node-addon-api having identified a version of - // Node.js that ships with a correct implementation of N-API. - path.basename(item) !== 'nothing.node') { - process.platform === 'win32' - ? checkFileWin32(item) - : checkFileUNIX(item); - } - })(item)); - }); - }); -} - -// Start with the directory given on the command line or the current directory -// if nothing was given. -recurse(process.argv.length > 3 ? process.argv[2] : '.'); diff --git a/web/static/node_modules/node-addon-api/tools/clang-format.js b/web/static/node_modules/node-addon-api/tools/clang-format.js deleted file mode 100644 index e4bb4f52..00000000 --- a/web/static/node_modules/node-addon-api/tools/clang-format.js +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env node - -const spawn = require('child_process').spawnSync; -const path = require('path'); - -const filesToCheck = ['*.h', '*.cc']; -const FORMAT_START = process.env.FORMAT_START || 'main'; - -function main (args) { - let fix = false; - while (args.length > 0) { - switch (args[0]) { - case '-f': - case '--fix': - fix = true; - break; - default: - } - args.shift(); - } - - const clangFormatPath = path.dirname(require.resolve('clang-format')); - const binary = process.platform === 'win32' - ? 'node_modules\\.bin\\clang-format.cmd' - : 'node_modules/.bin/clang-format'; - const options = ['--binary=' + binary, '--style=file']; - if (fix) { - options.push(FORMAT_START); - } else { - options.push('--diff', FORMAT_START); - } - - const gitClangFormatPath = path.join(clangFormatPath, 'bin/git-clang-format'); - const result = spawn( - 'python', - [gitClangFormatPath, ...options, '--', ...filesToCheck], - { encoding: 'utf-8' } - ); - - if (result.stderr) { - console.error('Error running git-clang-format:', result.stderr); - return 2; - } - - const clangFormatOutput = result.stdout.trim(); - // Bail fast if in fix mode. - if (fix) { - console.log(clangFormatOutput); - return 0; - } - // Detect if there is any complains from clang-format - if ( - clangFormatOutput !== '' && - clangFormatOutput !== 'no modified files to format' && - clangFormatOutput !== 'clang-format did not modify any files' - ) { - console.error(clangFormatOutput); - const fixCmd = 'npm run lint:fix'; - console.error(` - ERROR: please run "${fixCmd}" to format changes in your commit - Note that when running the command locally, please keep your local - main branch and working branch up to date with nodejs/node-addon-api - to exclude un-related complains. - Or you can run "env FORMAT_START=upstream/main ${fixCmd}".`); - return 1; - } -} - -if (require.main === module) { - process.exitCode = main(process.argv.slice(2)); -} diff --git a/web/static/node_modules/node-addon-api/tools/conversion.js b/web/static/node_modules/node-addon-api/tools/conversion.js deleted file mode 100755 index f89245ac..00000000 --- a/web/static/node_modules/node-addon-api/tools/conversion.js +++ /dev/null @@ -1,301 +0,0 @@ -#! /usr/bin/env node - -'use strict'; - -const fs = require('fs'); -const path = require('path'); - -const args = process.argv.slice(2); -const dir = args[0]; -if (!dir) { - console.log('Usage: node ' + path.basename(__filename) + ' '); - process.exit(1); -} - -const NodeApiVersion = require('../package.json').version; - -const disable = args[1]; -let ConfigFileOperations; -if (disable !== '--disable' && dir !== '--disable') { - ConfigFileOperations = { - 'package.json': [ - [/([ ]*)"dependencies": {/g, '$1"dependencies": {\n$1 "node-addon-api": "' + NodeApiVersion + '",'], - [/[ ]*"nan": *"[^"]+"(,|)[\n\r]/g, ''] - ], - 'binding.gyp': [ - [/([ ]*)'include_dirs': \[/g, '$1\'include_dirs\': [\n$1 \'\s+(\w+)\s*=\s*Nan::New\([\w\d:]+\);(?:\w+->Reset\(\1\))?\s+\1->SetClassName\(Nan::String::New\("(\w+)"\)\);/g, 'Napi::Function $1 = DefineClass(env, "$2", {'], - [/Local\s+(\w+)\s*=\s*Nan::New\([\w\d:]+\);\s+(\w+)\.Reset\((\1)\);\s+\1->SetClassName\((Nan::String::New|Nan::New<(v8::)*String>)\("(.+?)"\)\);/g, 'Napi::Function $1 = DefineClass(env, "$6", {'], - [/Local\s+(\w+)\s*=\s*Nan::New\([\w\d:]+\);(?:\w+->Reset\(\1\))?\s+\1->SetClassName\(Nan::String::New\("(\w+)"\)\);/g, 'Napi::Function $1 = DefineClass(env, "$2", {'], - [/Nan::New\(([\w\d:]+)\)->GetFunction\(\)/g, 'Napi::Function::New(env, $1)'], - [/Nan::New\(([\w\d:]+)\)->GetFunction()/g, 'Napi::Function::New(env, $1);'], - [/Nan::New\(([\w\d:]+)\)/g, 'Napi::Function::New(env, $1)'], - [/Nan::New\(([\w\d:]+)\)/g, 'Napi::Function::New(env, $1)'], - - // FunctionTemplate to FunctionReference - [/Nan::Persistent<(v8::)*FunctionTemplate>/g, 'Napi::FunctionReference'], - [/Nan::Persistent<(v8::)*Function>/g, 'Napi::FunctionReference'], - [/v8::Local/g, 'Napi::FunctionReference'], - [/Local/g, 'Napi::FunctionReference'], - [/v8::FunctionTemplate/g, 'Napi::FunctionReference'], - [/FunctionTemplate/g, 'Napi::FunctionReference'], - - [/([ ]*)Nan::SetPrototypeMethod\(\w+, "(\w+)", (\w+)\);/g, '$1InstanceMethod("$2", &$3),'], - [/([ ]*)(?:\w+\.Reset\(\w+\);\s+)?\(target\)\.Set\("(\w+)",\s*Nan::GetFunction\((\w+)\)\);/gm, - '});\n\n' + - '$1constructor = Napi::Persistent($3);\n' + - '$1constructor.SuppressDestruct();\n' + - '$1target.Set("$2", $3);'], - - // TODO: Other attribute combinations - [/static_cast\(ReadOnly\s*\|\s*DontDelete\)/gm, - 'static_cast(napi_enumerable | napi_configurable)'], - - [/([\w\d:<>]+?)::Cast\((.+?)\)/g, '$2.As<$1>()'], - - [/\*Nan::Utf8String\(([^)]+)\)/g, '$1->As().Utf8Value().c_str()'], - [/Nan::Utf8String +(\w+)\(([^)]+)\)/g, 'std::string $1 = $2.As()'], - [/Nan::Utf8String/g, 'std::string'], - - [/v8::String::Utf8Value (.+?)\((.+?)\)/g, 'Napi::String $1(env, $2)'], - [/String::Utf8Value (.+?)\((.+?)\)/g, 'Napi::String $1(env, $2)'], - [/\.length\(\)/g, '.Length()'], - - [/Nan::MakeCallback\(([^,]+),[\s\\]+([^,]+),/gm, '$2.MakeCallback($1,'], - - [/class\s+(\w+)\s*:\s*public\s+Nan::ObjectWrap/g, 'class $1 : public Napi::ObjectWrap<$1>'], - [/(\w+)\(([^)]*)\)\s*:\s*Nan::ObjectWrap\(\)\s*(,)?/gm, '$1($2) : Napi::ObjectWrap<$1>()$3'], - - // HandleOKCallback to OnOK - [/HandleOKCallback/g, 'OnOK'], - // HandleErrorCallback to OnError - [/HandleErrorCallback/g, 'OnError'], - - // ex. .As() to .As() - [/\.As\(\)/g, '.As()'], - [/\.As<(Value|Boolean|String|Number|Object|Array|Symbol|External|Function)>\(\)/g, '.As()'], - - // ex. Nan::New(info[0]) to Napi::Number::New(info[0]) - [/Nan::New<(v8::)*Integer>\((.+?)\)/g, 'Napi::Number::New(env, $2)'], - [/Nan::New\(([0-9.]+)\)/g, 'Napi::Number::New(env, $1)'], - [/Nan::New<(v8::)*String>\("(.+?)"\)/g, 'Napi::String::New(env, "$2")'], - [/Nan::New\("(.+?)"\)/g, 'Napi::String::New(env, "$1")'], - [/Nan::New<(v8::)*(.+?)>\(\)/g, 'Napi::$2::New(env)'], - [/Nan::New<(.+?)>\(\)/g, 'Napi::$1::New(env)'], - [/Nan::New<(v8::)*(.+?)>\(/g, 'Napi::$2::New(env, '], - [/Nan::New<(.+?)>\(/g, 'Napi::$1::New(env, '], - [/Nan::NewBuffer\(/g, 'Napi::Buffer::New(env, '], - // TODO: Properly handle this - [/Nan::New\(/g, 'Napi::New(env, '], - - [/\.IsInt32\(\)/g, '.IsNumber()'], - [/->IsInt32\(\)/g, '.IsNumber()'], - - [/(.+?)->BooleanValue\(\)/g, '$1.As().Value()'], - [/(.+?)->Int32Value\(\)/g, '$1.As().Int32Value()'], - [/(.+?)->Uint32Value\(\)/g, '$1.As().Uint32Value()'], - [/(.+?)->IntegerValue\(\)/g, '$1.As().Int64Value()'], - [/(.+?)->NumberValue\(\)/g, '$1.As().DoubleValue()'], - - // ex. Nan::To(info[0]) to info[0].Value() - [/Nan::To\((.+?)\)/g, '$2.To()'], - [/Nan::To<(Boolean|String|Number|Object|Array|Symbol|Function)>\((.+?)\)/g, '$2.To()'], - // ex. Nan::To(info[0]) to info[0].As().Value() - [/Nan::To\((.+?)\)/g, '$1.As().Value()'], - // ex. Nan::To(info[0]) to info[0].As().Int32Value() - [/Nan::To\((.+?)\)/g, '$1.As().Int32Value()'], - // ex. Nan::To(info[0]) to info[0].As().Int32Value() - [/Nan::To\((.+?)\)/g, '$1.As().Int32Value()'], - // ex. Nan::To(info[0]) to info[0].As().Uint32Value() - [/Nan::To\((.+?)\)/g, '$1.As().Uint32Value()'], - // ex. Nan::To(info[0]) to info[0].As().Int64Value() - [/Nan::To\((.+?)\)/g, '$1.As().Int64Value()'], - // ex. Nan::To(info[0]) to info[0].As().FloatValue() - [/Nan::To\((.+?)\)/g, '$1.As().FloatValue()'], - // ex. Nan::To(info[0]) to info[0].As().DoubleValue() - [/Nan::To\((.+?)\)/g, '$1.As().DoubleValue()'], - - [/Nan::New\((\w+)\)->HasInstance\((\w+)\)/g, '$2.InstanceOf($1.Value())'], - - [/Nan::Has\(([^,]+),\s*/gm, '($1).Has('], - [/\.Has\([\s|\\]*Nan::New<(v8::)*String>\(([^)]+)\)\)/gm, '.Has($1)'], - [/\.Has\([\s|\\]*Nan::New\(([^)]+)\)\)/gm, '.Has($1)'], - - [/Nan::Get\(([^,]+),\s*/gm, '($1).Get('], - [/\.Get\([\s|\\]*Nan::New<(v8::)*String>\(([^)]+)\)\)/gm, '.Get($1)'], - [/\.Get\([\s|\\]*Nan::New\(([^)]+)\)\)/gm, '.Get($1)'], - - [/Nan::Set\(([^,]+),\s*/gm, '($1).Set('], - [/\.Set\([\s|\\]*Nan::New<(v8::)*String>\(([^)]+)\)\s*,/gm, '.Set($1,'], - [/\.Set\([\s|\\]*Nan::New\(([^)]+)\)\s*,/gm, '.Set($1,'], - - // ex. node::Buffer::HasInstance(info[0]) to info[0].IsBuffer() - [/node::Buffer::HasInstance\((.+?)\)/g, '$1.IsBuffer()'], - // ex. node::Buffer::Length(info[0]) to info[0].Length() - [/node::Buffer::Length\((.+?)\)/g, '$1.As>().Length()'], - // ex. node::Buffer::Data(info[0]) to info[0].Data() - [/node::Buffer::Data\((.+?)\)/g, '$1.As>().Data()'], - [/Nan::CopyBuffer\(/g, 'Napi::Buffer::Copy(env, '], - - // Nan::AsyncQueueWorker(worker) - [/Nan::AsyncQueueWorker\((.+)\);/g, '$1.Queue();'], - [/Nan::(Undefined|Null|True|False)\(\)/g, 'env.$1()'], - - // Nan::ThrowError(error) to Napi::Error::New(env, error).ThrowAsJavaScriptException() - [/([ ]*)return Nan::Throw(\w*?)Error\((.+?)\);/g, '$1Napi::$2Error::New(env, $3).ThrowAsJavaScriptException();\n$1return env.Null();'], - [/Nan::Throw(\w*?)Error\((.+?)\);\n(\s*)return;/g, 'Napi::$1Error::New(env, $2).ThrowAsJavaScriptException();\n$3return env.Null();'], - [/Nan::Throw(\w*?)Error\((.+?)\);/g, 'Napi::$1Error::New(env, $2).ThrowAsJavaScriptException();\n'], - // Nan::RangeError(error) to Napi::RangeError::New(env, error) - [/Nan::(\w*?)Error\((.+)\)/g, 'Napi::$1Error::New(env, $2)'], - - [/Nan::Set\((.+?),\n* *(.+?),\n* *(.+?),\n* *(.+?)\)/g, '$1.Set($2, $3, $4)'], - - [/Nan::(Escapable)?HandleScope\s+(\w+)\s*;/g, 'Napi::$1HandleScope $2(env);'], - [/Nan::(Escapable)?HandleScope/g, 'Napi::$1HandleScope'], - [/Nan::ForceSet\(([^,]+), ?/g, '$1->DefineProperty('], - [/\.ForceSet\(Napi::String::New\(env, "(\w+)"\),\s*?/g, '.DefineProperty("$1", '], - // [ /Nan::GetPropertyNames\(([^,]+)\)/, '$1->GetPropertyNames()' ], - [/Nan::Equals\(([^,]+),/g, '$1.StrictEquals('], - - [/(.+)->Set\(/g, '$1.Set('], - - [/Nan::Callback/g, 'Napi::FunctionReference'], - - [/Nan::Persistent/g, 'Napi::ObjectReference'], - [/Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target/g, 'Napi::Env& env, Napi::Object& target'], - - [/(\w+)\*\s+(\w+)\s*=\s*Nan::ObjectWrap::Unwrap<\w+>\(info\.This\(\)\);/g, '$1* $2 = this;'], - [/Nan::ObjectWrap::Unwrap<(\w+)>\((.*)\);/g, '$2.Unwrap<$1>();'], - - [/Nan::NAN_METHOD_RETURN_TYPE/g, 'void'], - [/NAN_INLINE/g, 'inline'], - - [/Nan::NAN_METHOD_ARGS_TYPE/g, 'const Napi::CallbackInfo&'], - [/NAN_METHOD\(([\w\d:]+?)\)/g, 'Napi::Value $1(const Napi::CallbackInfo& info)'], - [/static\s*NAN_GETTER\(([\w\d:]+?)\)/g, 'Napi::Value $1(const Napi::CallbackInfo& info)'], - [/NAN_GETTER\(([\w\d:]+?)\)/g, 'Napi::Value $1(const Napi::CallbackInfo& info)'], - [/static\s*NAN_SETTER\(([\w\d:]+?)\)/g, 'void $1(const Napi::CallbackInfo& info, const Napi::Value& value)'], - [/NAN_SETTER\(([\w\d:]+?)\)/g, 'void $1(const Napi::CallbackInfo& info, const Napi::Value& value)'], - [/void Init\((v8::)*Local<(v8::)*Object> exports\)/g, 'Napi::Object Init(Napi::Env env, Napi::Object exports)'], - [/NAN_MODULE_INIT\(([\w\d:]+?)\);/g, 'Napi::Object $1(Napi::Env env, Napi::Object exports);'], - [/NAN_MODULE_INIT\(([\w\d:]+?)\)/g, 'Napi::Object $1(Napi::Env env, Napi::Object exports)'], - - [/::(Init(?:ialize)?)\(target\)/g, '::$1(env, target, module)'], - [/constructor_template/g, 'constructor'], - - [/Nan::FunctionCallbackInfo<(v8::)?Value>[ ]*& [ ]*info\)[ ]*{\n*([ ]*)/gm, 'Napi::CallbackInfo& info) {\n$2Napi::Env env = info.Env();\n$2'], - [/Nan::FunctionCallbackInfo<(v8::)*Value>\s*&\s*info\);/g, 'Napi::CallbackInfo& info);'], - [/Nan::FunctionCallbackInfo<(v8::)*Value>\s*&/g, 'Napi::CallbackInfo&'], - - [/Buffer::HasInstance\(([^)]+)\)/g, '$1.IsBuffer()'], - - [/info\[(\d+)\]->/g, 'info[$1].'], - [/info\[([\w\d]+)\]->/g, 'info[$1].'], - [/info\.This\(\)->/g, 'info.This().'], - [/->Is(Object|String|Int32|Number)\(\)/g, '.Is$1()'], - [/info.GetReturnValue\(\).SetUndefined\(\)/g, 'return env.Undefined()'], - [/info\.GetReturnValue\(\)\.Set\(((\n|.)+?)\);/g, 'return $1;'], - - // ex. Local to Napi::Value - [/v8::Local/g, 'Napi::$1'], - [/Local<(Value|Boolean|String|Number|Object|Array|Symbol|External|Function)>/g, 'Napi::$1'], - - // Declare an env in helper functions that take a Napi::Value - [/(\w+)\(Napi::Value (\w+)(,\s*[^()]+)?\)\s*{\n*([ ]*)/gm, '$1(Napi::Value $2$3) {\n$4Napi::Env env = $2.Env();\n$4'], - - // delete #include and/or - [/#include +(<|")(?:node|nan).h("|>)/g, '#include $1napi.h$2\n#include $1uv.h$2'], - // NODE_MODULE to NODE_API_MODULE - [/NODE_MODULE/g, 'NODE_API_MODULE'], - [/Nan::/g, 'Napi::'], - [/nan.h/g, 'napi.h'], - - // delete .FromJust() - [/\.FromJust\(\)/g, ''], - // delete .ToLocalCheck() - [/\.ToLocalChecked\(\)/g, ''], - [/^.*->SetInternalFieldCount\(.*$/gm, ''], - - // replace using node; and/or using v8; to using Napi; - [/using (node|v8);/g, 'using Napi;'], - [/using namespace (node|Nan|v8);/g, 'using namespace Napi;'], - // delete using v8::Local; - [/using v8::Local;\n/g, ''], - // replace using v8::XXX; with using Napi::XXX - [/using v8::([A-Za-z]+);/g, 'using Napi::$1;'] - -]; - -const paths = listFiles(dir); -paths.forEach(function (dirEntry) { - const filename = dirEntry.split('\\').pop().split('/').pop(); - - // Check whether the file is a source file or a config file - // then execute function accordingly - const sourcePattern = /.+\.h|.+\.cc|.+\.cpp/; - if (sourcePattern.test(filename)) { - convertFile(dirEntry, SourceFileOperations); - } else if (ConfigFileOperations[filename] != null) { - convertFile(dirEntry, ConfigFileOperations[filename]); - } -}); - -function listFiles (dir, filelist) { - const files = fs.readdirSync(dir); - filelist = filelist || []; - files.forEach(function (file) { - if (file === 'node_modules') { - return; - } - - if (fs.statSync(path.join(dir, file)).isDirectory()) { - filelist = listFiles(path.join(dir, file), filelist); - } else { - filelist.push(path.join(dir, file)); - } - }); - return filelist; -} - -function convert (content, operations) { - for (let i = 0; i < operations.length; i++) { - const operation = operations[i]; - content = content.replace(operation[0], operation[1]); - } - return content; -} - -function convertFile (fileName, operations) { - fs.readFile(fileName, 'utf-8', function (err, file) { - if (err) throw err; - - file = convert(file, operations); - - fs.writeFile(fileName, file, function (err) { - if (err) throw err; - }); - }); -} diff --git a/web/static/node_modules/node-addon-api/tools/eslint-format.js b/web/static/node_modules/node-addon-api/tools/eslint-format.js deleted file mode 100644 index 6923ab7b..00000000 --- a/web/static/node_modules/node-addon-api/tools/eslint-format.js +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env node - -const spawn = require('child_process').spawnSync; - -const filesToCheck = '*.js'; -const FORMAT_START = process.env.FORMAT_START || 'main'; -const IS_WIN = process.platform === 'win32'; -const ESLINT_PATH = IS_WIN ? 'node_modules\\.bin\\eslint.cmd' : 'node_modules/.bin/eslint'; - -function main (args) { - let fix = false; - while (args.length > 0) { - switch (args[0]) { - case '-f': - case '--fix': - fix = true; - break; - default: - } - args.shift(); - } - - // Check js files that change on unstaged file - const fileUnStaged = spawn( - 'git', - ['diff', '--name-only', '--diff-filter=d', FORMAT_START, filesToCheck], - { - encoding: 'utf-8' - } - ); - - // Check js files that change on staged file - const fileStaged = spawn( - 'git', - ['diff', '--name-only', '--cached', '--diff-filter=d', FORMAT_START, filesToCheck], - { - encoding: 'utf-8' - } - ); - - const options = [ - ...fileStaged.stdout.split('\n').filter((f) => f !== ''), - ...fileUnStaged.stdout.split('\n').filter((f) => f !== '') - ]; - - if (fix) { - options.push('--fix'); - } - - const result = spawn(ESLINT_PATH, [...options], { - encoding: 'utf-8' - }); - - if (result.error && result.error.errno === 'ENOENT') { - console.error('Eslint not found! Eslint is supposed to be found at ', ESLINT_PATH); - return 2; - } - - if (result.status === 1) { - console.error('Eslint error:', result.stdout); - const fixCmd = 'npm run lint:fix'; - console.error(`ERROR: please run "${fixCmd}" to format changes in your commit - Note that when running the command locally, please keep your local - main branch and working branch up to date with nodejs/node-addon-api - to exclude un-related complains. - Or you can run "env FORMAT_START=upstream/main ${fixCmd}". - Also fix JS files by yourself if necessary.`); - return 1; - } - - if (result.stderr) { - console.error('Error running eslint:', result.stderr); - return 2; - } -} - -if (require.main === module) { - process.exitCode = main(process.argv.slice(2)); -} diff --git a/web/static/node_modules/node-releases/LICENSE b/web/static/node_modules/node-releases/LICENSE deleted file mode 100644 index ea39e4f9..00000000 --- a/web/static/node_modules/node-releases/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2017 Sergey Rubanov (https://github.com/chicoxyzzy) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/web/static/node_modules/node-releases/README.md b/web/static/node_modules/node-releases/README.md deleted file mode 100644 index d30d2003..00000000 --- a/web/static/node_modules/node-releases/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Node.js releases data - -All data is located in `data` directory. - -`data/processed` contains `envs.json` with node.js releases data preprocessed to be used by [Browserslist](https://github.com/ai/browserslist) and other projects. Each version in this file contains only necessary info: version, release date, LTS flag/name, and security flag. - -`data/release-schedule` contains `release-schedule.json` with node.js releases date and end of life date. - -## Installation -```bash -npm install node-releases -``` diff --git a/web/static/node_modules/node-releases/data/processed/envs.json b/web/static/node_modules/node-releases/data/processed/envs.json deleted file mode 100644 index 8f6cd4ed..00000000 --- a/web/static/node_modules/node-releases/data/processed/envs.json +++ /dev/null @@ -1 +0,0 @@ -[{"name":"nodejs","version":"0.2.0","date":"2011-08-26","lts":false,"security":false,"v8":"2.3.8.0"},{"name":"nodejs","version":"0.3.0","date":"2011-08-26","lts":false,"security":false,"v8":"2.5.1.0"},{"name":"nodejs","version":"0.4.0","date":"2011-08-26","lts":false,"security":false,"v8":"3.1.2.0"},{"name":"nodejs","version":"0.5.0","date":"2011-08-26","lts":false,"security":false,"v8":"3.1.8.25"},{"name":"nodejs","version":"0.6.0","date":"2011-11-04","lts":false,"security":false,"v8":"3.6.6.6"},{"name":"nodejs","version":"0.7.0","date":"2012-01-17","lts":false,"security":false,"v8":"3.8.6.0"},{"name":"nodejs","version":"0.8.0","date":"2012-06-22","lts":false,"security":false,"v8":"3.11.10.10"},{"name":"nodejs","version":"0.9.0","date":"2012-07-20","lts":false,"security":false,"v8":"3.11.10.15"},{"name":"nodejs","version":"0.10.0","date":"2013-03-11","lts":false,"security":false,"v8":"3.14.5.8"},{"name":"nodejs","version":"0.11.0","date":"2013-03-28","lts":false,"security":false,"v8":"3.17.13.0"},{"name":"nodejs","version":"0.12.0","date":"2015-02-06","lts":false,"security":false,"v8":"3.28.73.0"},{"name":"nodejs","version":"4.0.0","date":"2015-09-08","lts":false,"security":false,"v8":"4.5.103.30"},{"name":"nodejs","version":"4.1.0","date":"2015-09-17","lts":false,"security":false,"v8":"4.5.103.33"},{"name":"nodejs","version":"4.2.0","date":"2015-10-12","lts":"Argon","security":false,"v8":"4.5.103.35"},{"name":"nodejs","version":"4.3.0","date":"2016-02-09","lts":"Argon","security":false,"v8":"4.5.103.35"},{"name":"nodejs","version":"4.4.0","date":"2016-03-08","lts":"Argon","security":false,"v8":"4.5.103.35"},{"name":"nodejs","version":"4.5.0","date":"2016-08-16","lts":"Argon","security":false,"v8":"4.5.103.37"},{"name":"nodejs","version":"4.6.0","date":"2016-09-27","lts":"Argon","security":true,"v8":"4.5.103.37"},{"name":"nodejs","version":"4.7.0","date":"2016-12-06","lts":"Argon","security":false,"v8":"4.5.103.43"},{"name":"nodejs","version":"4.8.0","date":"2017-02-21","lts":"Argon","security":false,"v8":"4.5.103.45"},{"name":"nodejs","version":"4.9.0","date":"2018-03-28","lts":"Argon","security":true,"v8":"4.5.103.53"},{"name":"nodejs","version":"5.0.0","date":"2015-10-29","lts":false,"security":false,"v8":"4.6.85.28"},{"name":"nodejs","version":"5.1.0","date":"2015-11-17","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.2.0","date":"2015-12-09","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.3.0","date":"2015-12-15","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.4.0","date":"2016-01-06","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.5.0","date":"2016-01-21","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.6.0","date":"2016-02-09","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.7.0","date":"2016-02-23","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.8.0","date":"2016-03-09","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.9.0","date":"2016-03-16","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.10.0","date":"2016-04-01","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.11.0","date":"2016-04-21","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.12.0","date":"2016-06-23","lts":false,"security":false,"v8":"4.6.85.32"},{"name":"nodejs","version":"6.0.0","date":"2016-04-26","lts":false,"security":false,"v8":"5.0.71.35"},{"name":"nodejs","version":"6.1.0","date":"2016-05-05","lts":false,"security":false,"v8":"5.0.71.35"},{"name":"nodejs","version":"6.2.0","date":"2016-05-17","lts":false,"security":false,"v8":"5.0.71.47"},{"name":"nodejs","version":"6.3.0","date":"2016-07-06","lts":false,"security":false,"v8":"5.0.71.52"},{"name":"nodejs","version":"6.4.0","date":"2016-08-12","lts":false,"security":false,"v8":"5.0.71.60"},{"name":"nodejs","version":"6.5.0","date":"2016-08-26","lts":false,"security":false,"v8":"5.1.281.81"},{"name":"nodejs","version":"6.6.0","date":"2016-09-14","lts":false,"security":false,"v8":"5.1.281.83"},{"name":"nodejs","version":"6.7.0","date":"2016-09-27","lts":false,"security":true,"v8":"5.1.281.83"},{"name":"nodejs","version":"6.8.0","date":"2016-10-12","lts":false,"security":false,"v8":"5.1.281.84"},{"name":"nodejs","version":"6.9.0","date":"2016-10-18","lts":"Boron","security":false,"v8":"5.1.281.84"},{"name":"nodejs","version":"6.10.0","date":"2017-02-21","lts":"Boron","security":false,"v8":"5.1.281.93"},{"name":"nodejs","version":"6.11.0","date":"2017-06-06","lts":"Boron","security":false,"v8":"5.1.281.102"},{"name":"nodejs","version":"6.12.0","date":"2017-11-06","lts":"Boron","security":false,"v8":"5.1.281.108"},{"name":"nodejs","version":"6.13.0","date":"2018-02-10","lts":"Boron","security":false,"v8":"5.1.281.111"},{"name":"nodejs","version":"6.14.0","date":"2018-03-28","lts":"Boron","security":true,"v8":"5.1.281.111"},{"name":"nodejs","version":"6.15.0","date":"2018-11-27","lts":"Boron","security":true,"v8":"5.1.281.111"},{"name":"nodejs","version":"6.16.0","date":"2018-12-26","lts":"Boron","security":false,"v8":"5.1.281.111"},{"name":"nodejs","version":"6.17.0","date":"2019-02-28","lts":"Boron","security":true,"v8":"5.1.281.111"},{"name":"nodejs","version":"7.0.0","date":"2016-10-25","lts":false,"security":false,"v8":"5.4.500.36"},{"name":"nodejs","version":"7.1.0","date":"2016-11-08","lts":false,"security":false,"v8":"5.4.500.36"},{"name":"nodejs","version":"7.2.0","date":"2016-11-22","lts":false,"security":false,"v8":"5.4.500.43"},{"name":"nodejs","version":"7.3.0","date":"2016-12-20","lts":false,"security":false,"v8":"5.4.500.45"},{"name":"nodejs","version":"7.4.0","date":"2017-01-04","lts":false,"security":false,"v8":"5.4.500.45"},{"name":"nodejs","version":"7.5.0","date":"2017-01-31","lts":false,"security":false,"v8":"5.4.500.48"},{"name":"nodejs","version":"7.6.0","date":"2017-02-21","lts":false,"security":false,"v8":"5.5.372.40"},{"name":"nodejs","version":"7.7.0","date":"2017-02-28","lts":false,"security":false,"v8":"5.5.372.41"},{"name":"nodejs","version":"7.8.0","date":"2017-03-29","lts":false,"security":false,"v8":"5.5.372.43"},{"name":"nodejs","version":"7.9.0","date":"2017-04-11","lts":false,"security":false,"v8":"5.5.372.43"},{"name":"nodejs","version":"7.10.0","date":"2017-05-02","lts":false,"security":false,"v8":"5.5.372.43"},{"name":"nodejs","version":"8.0.0","date":"2017-05-30","lts":false,"security":false,"v8":"5.8.283.41"},{"name":"nodejs","version":"8.1.0","date":"2017-06-08","lts":false,"security":false,"v8":"5.8.283.41"},{"name":"nodejs","version":"8.2.0","date":"2017-07-19","lts":false,"security":false,"v8":"5.8.283.41"},{"name":"nodejs","version":"8.3.0","date":"2017-08-08","lts":false,"security":false,"v8":"6.0.286.52"},{"name":"nodejs","version":"8.4.0","date":"2017-08-15","lts":false,"security":false,"v8":"6.0.286.52"},{"name":"nodejs","version":"8.5.0","date":"2017-09-12","lts":false,"security":false,"v8":"6.0.287.53"},{"name":"nodejs","version":"8.6.0","date":"2017-09-26","lts":false,"security":false,"v8":"6.0.287.53"},{"name":"nodejs","version":"8.7.0","date":"2017-10-11","lts":false,"security":false,"v8":"6.1.534.42"},{"name":"nodejs","version":"8.8.0","date":"2017-10-24","lts":false,"security":false,"v8":"6.1.534.42"},{"name":"nodejs","version":"8.9.0","date":"2017-10-31","lts":"Carbon","security":false,"v8":"6.1.534.46"},{"name":"nodejs","version":"8.10.0","date":"2018-03-06","lts":"Carbon","security":false,"v8":"6.2.414.50"},{"name":"nodejs","version":"8.11.0","date":"2018-03-28","lts":"Carbon","security":true,"v8":"6.2.414.50"},{"name":"nodejs","version":"8.12.0","date":"2018-09-10","lts":"Carbon","security":false,"v8":"6.2.414.66"},{"name":"nodejs","version":"8.13.0","date":"2018-11-20","lts":"Carbon","security":false,"v8":"6.2.414.72"},{"name":"nodejs","version":"8.14.0","date":"2018-11-27","lts":"Carbon","security":true,"v8":"6.2.414.72"},{"name":"nodejs","version":"8.15.0","date":"2018-12-26","lts":"Carbon","security":false,"v8":"6.2.414.75"},{"name":"nodejs","version":"8.16.0","date":"2019-04-16","lts":"Carbon","security":false,"v8":"6.2.414.77"},{"name":"nodejs","version":"8.17.0","date":"2019-12-17","lts":"Carbon","security":true,"v8":"6.2.414.78"},{"name":"nodejs","version":"9.0.0","date":"2017-10-31","lts":false,"security":false,"v8":"6.2.414.32"},{"name":"nodejs","version":"9.1.0","date":"2017-11-07","lts":false,"security":false,"v8":"6.2.414.32"},{"name":"nodejs","version":"9.2.0","date":"2017-11-14","lts":false,"security":false,"v8":"6.2.414.44"},{"name":"nodejs","version":"9.3.0","date":"2017-12-12","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.4.0","date":"2018-01-10","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.5.0","date":"2018-01-31","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.6.0","date":"2018-02-21","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.7.0","date":"2018-03-01","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.8.0","date":"2018-03-07","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.9.0","date":"2018-03-21","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.10.0","date":"2018-03-28","lts":false,"security":true,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.11.0","date":"2018-04-04","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"10.0.0","date":"2018-04-24","lts":false,"security":false,"v8":"6.6.346.24"},{"name":"nodejs","version":"10.1.0","date":"2018-05-08","lts":false,"security":false,"v8":"6.6.346.27"},{"name":"nodejs","version":"10.2.0","date":"2018-05-23","lts":false,"security":false,"v8":"6.6.346.32"},{"name":"nodejs","version":"10.3.0","date":"2018-05-29","lts":false,"security":false,"v8":"6.6.346.32"},{"name":"nodejs","version":"10.4.0","date":"2018-06-06","lts":false,"security":false,"v8":"6.7.288.43"},{"name":"nodejs","version":"10.5.0","date":"2018-06-20","lts":false,"security":false,"v8":"6.7.288.46"},{"name":"nodejs","version":"10.6.0","date":"2018-07-04","lts":false,"security":false,"v8":"6.7.288.46"},{"name":"nodejs","version":"10.7.0","date":"2018-07-18","lts":false,"security":false,"v8":"6.7.288.49"},{"name":"nodejs","version":"10.8.0","date":"2018-08-01","lts":false,"security":false,"v8":"6.7.288.49"},{"name":"nodejs","version":"10.9.0","date":"2018-08-15","lts":false,"security":false,"v8":"6.8.275.24"},{"name":"nodejs","version":"10.10.0","date":"2018-09-06","lts":false,"security":false,"v8":"6.8.275.30"},{"name":"nodejs","version":"10.11.0","date":"2018-09-19","lts":false,"security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.12.0","date":"2018-10-10","lts":false,"security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.13.0","date":"2018-10-30","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.14.0","date":"2018-11-27","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.15.0","date":"2018-12-26","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.16.0","date":"2019-05-28","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.17.0","date":"2019-10-22","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.18.0","date":"2019-12-17","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.19.0","date":"2020-02-05","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.20.0","date":"2020-03-26","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.21.0","date":"2020-06-02","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.22.0","date":"2020-07-21","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.23.0","date":"2020-10-27","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.24.0","date":"2021-02-23","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"11.0.0","date":"2018-10-23","lts":false,"security":false,"v8":"7.0.276.28"},{"name":"nodejs","version":"11.1.0","date":"2018-10-30","lts":false,"security":false,"v8":"7.0.276.32"},{"name":"nodejs","version":"11.2.0","date":"2018-11-15","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.3.0","date":"2018-11-27","lts":false,"security":true,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.4.0","date":"2018-12-07","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.5.0","date":"2018-12-18","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.6.0","date":"2018-12-26","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.7.0","date":"2019-01-17","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.8.0","date":"2019-01-24","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.9.0","date":"2019-01-30","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.10.0","date":"2019-02-14","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.11.0","date":"2019-03-05","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.12.0","date":"2019-03-14","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.13.0","date":"2019-03-28","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.14.0","date":"2019-04-10","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.15.0","date":"2019-04-30","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"12.0.0","date":"2019-04-23","lts":false,"security":false,"v8":"7.4.288.21"},{"name":"nodejs","version":"12.1.0","date":"2019-04-29","lts":false,"security":false,"v8":"7.4.288.21"},{"name":"nodejs","version":"12.2.0","date":"2019-05-07","lts":false,"security":false,"v8":"7.4.288.21"},{"name":"nodejs","version":"12.3.0","date":"2019-05-21","lts":false,"security":false,"v8":"7.4.288.27"},{"name":"nodejs","version":"12.4.0","date":"2019-06-04","lts":false,"security":false,"v8":"7.4.288.27"},{"name":"nodejs","version":"12.5.0","date":"2019-06-26","lts":false,"security":false,"v8":"7.5.288.22"},{"name":"nodejs","version":"12.6.0","date":"2019-07-03","lts":false,"security":false,"v8":"7.5.288.22"},{"name":"nodejs","version":"12.7.0","date":"2019-07-23","lts":false,"security":false,"v8":"7.5.288.22"},{"name":"nodejs","version":"12.8.0","date":"2019-08-06","lts":false,"security":false,"v8":"7.5.288.22"},{"name":"nodejs","version":"12.9.0","date":"2019-08-20","lts":false,"security":false,"v8":"7.6.303.29"},{"name":"nodejs","version":"12.10.0","date":"2019-09-04","lts":false,"security":false,"v8":"7.6.303.29"},{"name":"nodejs","version":"12.11.0","date":"2019-09-25","lts":false,"security":false,"v8":"7.7.299.11"},{"name":"nodejs","version":"12.12.0","date":"2019-10-11","lts":false,"security":false,"v8":"7.7.299.13"},{"name":"nodejs","version":"12.13.0","date":"2019-10-21","lts":"Erbium","security":false,"v8":"7.7.299.13"},{"name":"nodejs","version":"12.14.0","date":"2019-12-17","lts":"Erbium","security":true,"v8":"7.7.299.13"},{"name":"nodejs","version":"12.15.0","date":"2020-02-05","lts":"Erbium","security":true,"v8":"7.7.299.13"},{"name":"nodejs","version":"12.16.0","date":"2020-02-11","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.17.0","date":"2020-05-26","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.18.0","date":"2020-06-02","lts":"Erbium","security":true,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.19.0","date":"2020-10-06","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.20.0","date":"2020-11-24","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.21.0","date":"2021-02-23","lts":"Erbium","security":true,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.22.0","date":"2021-03-30","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"13.0.0","date":"2019-10-22","lts":false,"security":false,"v8":"7.8.279.17"},{"name":"nodejs","version":"13.1.0","date":"2019-11-05","lts":false,"security":false,"v8":"7.8.279.17"},{"name":"nodejs","version":"13.2.0","date":"2019-11-21","lts":false,"security":false,"v8":"7.9.317.23"},{"name":"nodejs","version":"13.3.0","date":"2019-12-03","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.4.0","date":"2019-12-17","lts":false,"security":true,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.5.0","date":"2019-12-18","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.6.0","date":"2020-01-07","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.7.0","date":"2020-01-21","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.8.0","date":"2020-02-05","lts":false,"security":true,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.9.0","date":"2020-02-18","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.10.0","date":"2020-03-04","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.11.0","date":"2020-03-12","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.12.0","date":"2020-03-26","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.13.0","date":"2020-04-14","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.14.0","date":"2020-04-29","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"14.0.0","date":"2020-04-21","lts":false,"security":false,"v8":"8.1.307.30"},{"name":"nodejs","version":"14.1.0","date":"2020-04-29","lts":false,"security":false,"v8":"8.1.307.31"},{"name":"nodejs","version":"14.2.0","date":"2020-05-05","lts":false,"security":false,"v8":"8.1.307.31"},{"name":"nodejs","version":"14.3.0","date":"2020-05-19","lts":false,"security":false,"v8":"8.1.307.31"},{"name":"nodejs","version":"14.4.0","date":"2020-06-02","lts":false,"security":true,"v8":"8.1.307.31"},{"name":"nodejs","version":"14.5.0","date":"2020-06-30","lts":false,"security":false,"v8":"8.3.110.9"},{"name":"nodejs","version":"14.6.0","date":"2020-07-20","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.7.0","date":"2020-07-29","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.8.0","date":"2020-08-11","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.9.0","date":"2020-08-27","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.10.0","date":"2020-09-08","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.11.0","date":"2020-09-15","lts":false,"security":true,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.12.0","date":"2020-09-22","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.13.0","date":"2020-09-29","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.14.0","date":"2020-10-15","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.15.0","date":"2020-10-27","lts":"Fermium","security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.16.0","date":"2021-02-23","lts":"Fermium","security":true,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.17.0","date":"2021-05-11","lts":"Fermium","security":false,"v8":"8.4.371.23"},{"name":"nodejs","version":"14.18.0","date":"2021-09-28","lts":"Fermium","security":false,"v8":"8.4.371.23"},{"name":"nodejs","version":"14.19.0","date":"2022-02-01","lts":"Fermium","security":false,"v8":"8.4.371.23"},{"name":"nodejs","version":"14.20.0","date":"2022-07-07","lts":"Fermium","security":true,"v8":"8.4.371.23"},{"name":"nodejs","version":"14.21.0","date":"2022-11-01","lts":"Fermium","security":false,"v8":"8.4.371.23"},{"name":"nodejs","version":"15.0.0","date":"2020-10-20","lts":false,"security":false,"v8":"8.6.395.16"},{"name":"nodejs","version":"15.1.0","date":"2020-11-04","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.2.0","date":"2020-11-10","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.3.0","date":"2020-11-24","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.4.0","date":"2020-12-09","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.5.0","date":"2020-12-22","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.6.0","date":"2021-01-14","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.7.0","date":"2021-01-25","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.8.0","date":"2021-02-02","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.9.0","date":"2021-02-18","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.10.0","date":"2021-02-23","lts":false,"security":true,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.11.0","date":"2021-03-03","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.12.0","date":"2021-03-17","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.13.0","date":"2021-03-31","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.14.0","date":"2021-04-06","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"16.0.0","date":"2021-04-20","lts":false,"security":false,"v8":"9.0.257.17"},{"name":"nodejs","version":"16.1.0","date":"2021-05-04","lts":false,"security":false,"v8":"9.0.257.24"},{"name":"nodejs","version":"16.2.0","date":"2021-05-19","lts":false,"security":false,"v8":"9.0.257.25"},{"name":"nodejs","version":"16.3.0","date":"2021-06-03","lts":false,"security":false,"v8":"9.0.257.25"},{"name":"nodejs","version":"16.4.0","date":"2021-06-23","lts":false,"security":false,"v8":"9.1.269.36"},{"name":"nodejs","version":"16.5.0","date":"2021-07-14","lts":false,"security":false,"v8":"9.1.269.38"},{"name":"nodejs","version":"16.6.0","date":"2021-07-29","lts":false,"security":true,"v8":"9.2.230.21"},{"name":"nodejs","version":"16.7.0","date":"2021-08-18","lts":false,"security":false,"v8":"9.2.230.21"},{"name":"nodejs","version":"16.8.0","date":"2021-08-25","lts":false,"security":false,"v8":"9.2.230.21"},{"name":"nodejs","version":"16.9.0","date":"2021-09-07","lts":false,"security":false,"v8":"9.3.345.16"},{"name":"nodejs","version":"16.10.0","date":"2021-09-22","lts":false,"security":false,"v8":"9.3.345.19"},{"name":"nodejs","version":"16.11.0","date":"2021-10-08","lts":false,"security":false,"v8":"9.4.146.19"},{"name":"nodejs","version":"16.12.0","date":"2021-10-20","lts":false,"security":false,"v8":"9.4.146.19"},{"name":"nodejs","version":"16.13.0","date":"2021-10-26","lts":"Gallium","security":false,"v8":"9.4.146.19"},{"name":"nodejs","version":"16.14.0","date":"2022-02-08","lts":"Gallium","security":false,"v8":"9.4.146.24"},{"name":"nodejs","version":"16.15.0","date":"2022-04-26","lts":"Gallium","security":false,"v8":"9.4.146.24"},{"name":"nodejs","version":"16.16.0","date":"2022-07-07","lts":"Gallium","security":true,"v8":"9.4.146.24"},{"name":"nodejs","version":"16.17.0","date":"2022-08-16","lts":"Gallium","security":false,"v8":"9.4.146.26"},{"name":"nodejs","version":"16.18.0","date":"2022-10-12","lts":"Gallium","security":false,"v8":"9.4.146.26"},{"name":"nodejs","version":"16.19.0","date":"2022-12-13","lts":"Gallium","security":false,"v8":"9.4.146.26"},{"name":"nodejs","version":"16.20.0","date":"2023-03-28","lts":"Gallium","security":false,"v8":"9.4.146.26"},{"name":"nodejs","version":"17.0.0","date":"2021-10-19","lts":false,"security":false,"v8":"9.5.172.21"},{"name":"nodejs","version":"17.1.0","date":"2021-11-09","lts":false,"security":false,"v8":"9.5.172.25"},{"name":"nodejs","version":"17.2.0","date":"2021-11-30","lts":false,"security":false,"v8":"9.6.180.14"},{"name":"nodejs","version":"17.3.0","date":"2021-12-17","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.4.0","date":"2022-01-18","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.5.0","date":"2022-02-10","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.6.0","date":"2022-02-22","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.7.0","date":"2022-03-09","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.8.0","date":"2022-03-22","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.9.0","date":"2022-04-07","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"18.0.0","date":"2022-04-18","lts":false,"security":false,"v8":"10.1.124.8"},{"name":"nodejs","version":"18.1.0","date":"2022-05-03","lts":false,"security":false,"v8":"10.1.124.8"},{"name":"nodejs","version":"18.2.0","date":"2022-05-17","lts":false,"security":false,"v8":"10.1.124.8"},{"name":"nodejs","version":"18.3.0","date":"2022-06-02","lts":false,"security":false,"v8":"10.2.154.4"},{"name":"nodejs","version":"18.4.0","date":"2022-06-16","lts":false,"security":false,"v8":"10.2.154.4"},{"name":"nodejs","version":"18.5.0","date":"2022-07-06","lts":false,"security":true,"v8":"10.2.154.4"},{"name":"nodejs","version":"18.6.0","date":"2022-07-13","lts":false,"security":false,"v8":"10.2.154.13"},{"name":"nodejs","version":"18.7.0","date":"2022-07-26","lts":false,"security":false,"v8":"10.2.154.13"},{"name":"nodejs","version":"18.8.0","date":"2022-08-24","lts":false,"security":false,"v8":"10.2.154.13"},{"name":"nodejs","version":"18.9.0","date":"2022-09-07","lts":false,"security":false,"v8":"10.2.154.15"},{"name":"nodejs","version":"18.10.0","date":"2022-09-28","lts":false,"security":false,"v8":"10.2.154.15"},{"name":"nodejs","version":"18.11.0","date":"2022-10-13","lts":false,"security":false,"v8":"10.2.154.15"},{"name":"nodejs","version":"18.12.0","date":"2022-10-25","lts":"Hydrogen","security":false,"v8":"10.2.154.15"},{"name":"nodejs","version":"18.13.0","date":"2023-01-05","lts":"Hydrogen","security":false,"v8":"10.2.154.23"},{"name":"nodejs","version":"18.14.0","date":"2023-02-01","lts":"Hydrogen","security":false,"v8":"10.2.154.23"},{"name":"nodejs","version":"18.15.0","date":"2023-03-05","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"18.16.0","date":"2023-04-12","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"18.17.0","date":"2023-07-18","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"18.18.0","date":"2023-09-18","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"18.19.0","date":"2023-11-29","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"18.20.0","date":"2024-03-26","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"19.0.0","date":"2022-10-17","lts":false,"security":false,"v8":"10.7.193.13"},{"name":"nodejs","version":"19.1.0","date":"2022-11-14","lts":false,"security":false,"v8":"10.7.193.20"},{"name":"nodejs","version":"19.2.0","date":"2022-11-29","lts":false,"security":false,"v8":"10.8.168.20"},{"name":"nodejs","version":"19.3.0","date":"2022-12-14","lts":false,"security":false,"v8":"10.8.168.21"},{"name":"nodejs","version":"19.4.0","date":"2023-01-05","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.5.0","date":"2023-01-24","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.6.0","date":"2023-02-01","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.7.0","date":"2023-02-21","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.8.0","date":"2023-03-14","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.9.0","date":"2023-04-10","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"20.0.0","date":"2023-04-17","lts":false,"security":false,"v8":"11.3.244.4"},{"name":"nodejs","version":"20.1.0","date":"2023-05-03","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.2.0","date":"2023-05-16","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.3.0","date":"2023-06-08","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.4.0","date":"2023-07-04","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.5.0","date":"2023-07-19","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.6.0","date":"2023-08-23","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.7.0","date":"2023-09-18","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.8.0","date":"2023-09-28","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.9.0","date":"2023-10-24","lts":"Iron","security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.10.0","date":"2023-11-22","lts":"Iron","security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.11.0","date":"2024-01-09","lts":"Iron","security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.12.0","date":"2024-03-26","lts":"Iron","security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.13.0","date":"2024-05-07","lts":"Iron","security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.14.0","date":"2024-05-28","lts":"Iron","security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.15.0","date":"2024-06-20","lts":"Iron","security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"21.0.0","date":"2023-10-17","lts":false,"security":false,"v8":"11.8.172.13"},{"name":"nodejs","version":"21.1.0","date":"2023-10-24","lts":false,"security":false,"v8":"11.8.172.15"},{"name":"nodejs","version":"21.2.0","date":"2023-11-14","lts":false,"security":false,"v8":"11.8.172.17"},{"name":"nodejs","version":"21.3.0","date":"2023-11-30","lts":false,"security":false,"v8":"11.8.172.17"},{"name":"nodejs","version":"21.4.0","date":"2023-12-05","lts":false,"security":false,"v8":"11.8.172.17"},{"name":"nodejs","version":"21.5.0","date":"2023-12-19","lts":false,"security":false,"v8":"11.8.172.17"},{"name":"nodejs","version":"21.6.0","date":"2024-01-14","lts":false,"security":false,"v8":"11.8.172.17"},{"name":"nodejs","version":"21.7.0","date":"2024-03-06","lts":false,"security":false,"v8":"11.8.172.17"},{"name":"nodejs","version":"22.0.0","date":"2024-04-24","lts":false,"security":false,"v8":"12.4.254.14"},{"name":"nodejs","version":"22.1.0","date":"2024-05-02","lts":false,"security":false,"v8":"12.4.254.14"},{"name":"nodejs","version":"22.2.0","date":"2024-05-15","lts":false,"security":false,"v8":"12.4.254.14"},{"name":"nodejs","version":"22.3.0","date":"2024-06-11","lts":false,"security":false,"v8":"12.4.254.20"},{"name":"nodejs","version":"22.4.0","date":"2024-07-02","lts":false,"security":false,"v8":"12.4.254.21"},{"name":"nodejs","version":"22.5.0","date":"2024-07-17","lts":false,"security":false,"v8":"12.4.254.21"}] \ No newline at end of file diff --git a/web/static/node_modules/node-releases/data/release-schedule/release-schedule.json b/web/static/node_modules/node-releases/data/release-schedule/release-schedule.json deleted file mode 100644 index 633bd3c3..00000000 --- a/web/static/node_modules/node-releases/data/release-schedule/release-schedule.json +++ /dev/null @@ -1 +0,0 @@ -{"v0.8":{"start":"2012-06-25","end":"2014-07-31"},"v0.10":{"start":"2013-03-11","end":"2016-10-31"},"v0.12":{"start":"2015-02-06","end":"2016-12-31"},"v4":{"start":"2015-09-08","lts":"2015-10-12","maintenance":"2017-04-01","end":"2018-04-30","codename":"Argon"},"v5":{"start":"2015-10-29","maintenance":"2016-04-30","end":"2016-06-30"},"v6":{"start":"2016-04-26","lts":"2016-10-18","maintenance":"2018-04-30","end":"2019-04-30","codename":"Boron"},"v7":{"start":"2016-10-25","maintenance":"2017-04-30","end":"2017-06-30"},"v8":{"start":"2017-05-30","lts":"2017-10-31","maintenance":"2019-01-01","end":"2019-12-31","codename":"Carbon"},"v9":{"start":"2017-10-01","maintenance":"2018-04-01","end":"2018-06-30"},"v10":{"start":"2018-04-24","lts":"2018-10-30","maintenance":"2020-05-19","end":"2021-04-30","codename":"Dubnium"},"v11":{"start":"2018-10-23","maintenance":"2019-04-22","end":"2019-06-01"},"v12":{"start":"2019-04-23","lts":"2019-10-21","maintenance":"2020-11-30","end":"2022-04-30","codename":"Erbium"},"v13":{"start":"2019-10-22","maintenance":"2020-04-01","end":"2020-06-01"},"v14":{"start":"2020-04-21","lts":"2020-10-27","maintenance":"2021-10-19","end":"2023-04-30","codename":"Fermium"},"v15":{"start":"2020-10-20","maintenance":"2021-04-01","end":"2021-06-01"},"v16":{"start":"2021-04-20","lts":"2021-10-26","maintenance":"2022-10-18","end":"2023-09-11","codename":"Gallium"},"v17":{"start":"2021-10-19","maintenance":"2022-04-01","end":"2022-06-01"},"v18":{"start":"2022-04-19","lts":"2022-10-25","maintenance":"2023-10-18","end":"2025-04-30","codename":"Hydrogen"},"v19":{"start":"2022-10-18","maintenance":"2023-04-01","end":"2023-06-01"},"v20":{"start":"2023-04-18","lts":"2023-10-24","maintenance":"2024-10-22","end":"2026-04-30","codename":"Iron"},"v21":{"start":"2023-10-17","maintenance":"2024-04-01","end":"2024-06-01"},"v22":{"start":"2024-04-24","lts":"2024-10-29","maintenance":"2025-10-21","end":"2027-04-30","codename":""},"v23":{"start":"2024-10-15","maintenance":"2025-04-01","end":"2025-06-01"},"v24":{"start":"2025-04-22","lts":"2025-10-28","maintenance":"2026-10-20","end":"2028-04-30","codename":""}} \ No newline at end of file diff --git a/web/static/node_modules/node-releases/package.json b/web/static/node_modules/node-releases/package.json deleted file mode 100644 index 2d7d9b24..00000000 --- a/web/static/node_modules/node-releases/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "node-releases", - "version": "2.0.18", - "description": "Node.js releases data", - "type": "module", - "scripts": { - "build": "node scripts/build.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/chicoxyzzy/node-releases.git" - }, - "keywords": [ - "nodejs", - "releases" - ], - "author": "Sergey Rubanov ", - "license": "MIT", - "devDependencies": { - "semver": "^7.3.5" - } -} diff --git a/web/static/node_modules/picocolors/LICENSE b/web/static/node_modules/picocolors/LICENSE deleted file mode 100644 index 46c9b95d..00000000 --- a/web/static/node_modules/picocolors/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/web/static/node_modules/picocolors/README.md b/web/static/node_modules/picocolors/README.md deleted file mode 100644 index 8e47aa8e..00000000 --- a/web/static/node_modules/picocolors/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# picocolors - -The tiniest and the fastest library for terminal output formatting with ANSI colors. - -```javascript -import pc from "picocolors" - -console.log( - pc.green(`How are ${pc.italic(`you`)} doing?`) -) -``` - -- **No dependencies.** -- **14 times** smaller and **2 times** faster than chalk. -- Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist. -- Node.js v6+ & browsers support. Support for both CJS and ESM projects. -- TypeScript type declarations included. -- [`NO_COLOR`](https://no-color.org/) friendly. - -## Docs -Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub. diff --git a/web/static/node_modules/picocolors/package.json b/web/static/node_modules/picocolors/package.json deleted file mode 100644 index 372d4b64..00000000 --- a/web/static/node_modules/picocolors/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "picocolors", - "version": "1.1.1", - "main": "./picocolors.js", - "types": "./picocolors.d.ts", - "browser": { - "./picocolors.js": "./picocolors.browser.js" - }, - "sideEffects": false, - "description": "The tiniest and the fastest library for terminal output formatting with ANSI colors", - "files": [ - "picocolors.*", - "types.d.ts" - ], - "keywords": [ - "terminal", - "colors", - "formatting", - "cli", - "console" - ], - "author": "Alexey Raspopov", - "repository": "alexeyraspopov/picocolors", - "license": "ISC" -} diff --git a/web/static/node_modules/picocolors/picocolors.browser.js b/web/static/node_modules/picocolors/picocolors.browser.js deleted file mode 100644 index 9dcf637c..00000000 --- a/web/static/node_modules/picocolors/picocolors.browser.js +++ /dev/null @@ -1,4 +0,0 @@ -var x=String; -var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}}; -module.exports=create(); -module.exports.createColors = create; diff --git a/web/static/node_modules/picocolors/picocolors.d.ts b/web/static/node_modules/picocolors/picocolors.d.ts deleted file mode 100644 index 94e146a8..00000000 --- a/web/static/node_modules/picocolors/picocolors.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Colors } from "./types" - -declare const picocolors: Colors & { createColors: (enabled?: boolean) => Colors } - -export = picocolors diff --git a/web/static/node_modules/picocolors/picocolors.js b/web/static/node_modules/picocolors/picocolors.js deleted file mode 100644 index e32df854..00000000 --- a/web/static/node_modules/picocolors/picocolors.js +++ /dev/null @@ -1,75 +0,0 @@ -let p = process || {}, argv = p.argv || [], env = p.env || {} -let isColorSupported = - !(!!env.NO_COLOR || argv.includes("--no-color")) && - (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI) - -let formatter = (open, close, replace = open) => - input => { - let string = "" + input, index = string.indexOf(close, open.length) - return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close - } - -let replaceClose = (string, close, replace, index) => { - let result = "", cursor = 0 - do { - result += string.substring(cursor, index) + replace - cursor = index + close.length - index = string.indexOf(close, cursor) - } while (~index) - return result + string.substring(cursor) -} - -let createColors = (enabled = isColorSupported) => { - let f = enabled ? formatter : () => String - return { - isColorSupported: enabled, - reset: f("\x1b[0m", "\x1b[0m"), - bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), - dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), - italic: f("\x1b[3m", "\x1b[23m"), - underline: f("\x1b[4m", "\x1b[24m"), - inverse: f("\x1b[7m", "\x1b[27m"), - hidden: f("\x1b[8m", "\x1b[28m"), - strikethrough: f("\x1b[9m", "\x1b[29m"), - - black: f("\x1b[30m", "\x1b[39m"), - red: f("\x1b[31m", "\x1b[39m"), - green: f("\x1b[32m", "\x1b[39m"), - yellow: f("\x1b[33m", "\x1b[39m"), - blue: f("\x1b[34m", "\x1b[39m"), - magenta: f("\x1b[35m", "\x1b[39m"), - cyan: f("\x1b[36m", "\x1b[39m"), - white: f("\x1b[37m", "\x1b[39m"), - gray: f("\x1b[90m", "\x1b[39m"), - - bgBlack: f("\x1b[40m", "\x1b[49m"), - bgRed: f("\x1b[41m", "\x1b[49m"), - bgGreen: f("\x1b[42m", "\x1b[49m"), - bgYellow: f("\x1b[43m", "\x1b[49m"), - bgBlue: f("\x1b[44m", "\x1b[49m"), - bgMagenta: f("\x1b[45m", "\x1b[49m"), - bgCyan: f("\x1b[46m", "\x1b[49m"), - bgWhite: f("\x1b[47m", "\x1b[49m"), - - blackBright: f("\x1b[90m", "\x1b[39m"), - redBright: f("\x1b[91m", "\x1b[39m"), - greenBright: f("\x1b[92m", "\x1b[39m"), - yellowBright: f("\x1b[93m", "\x1b[39m"), - blueBright: f("\x1b[94m", "\x1b[39m"), - magentaBright: f("\x1b[95m", "\x1b[39m"), - cyanBright: f("\x1b[96m", "\x1b[39m"), - whiteBright: f("\x1b[97m", "\x1b[39m"), - - bgBlackBright: f("\x1b[100m", "\x1b[49m"), - bgRedBright: f("\x1b[101m", "\x1b[49m"), - bgGreenBright: f("\x1b[102m", "\x1b[49m"), - bgYellowBright: f("\x1b[103m", "\x1b[49m"), - bgBlueBright: f("\x1b[104m", "\x1b[49m"), - bgMagentaBright: f("\x1b[105m", "\x1b[49m"), - bgCyanBright: f("\x1b[106m", "\x1b[49m"), - bgWhiteBright: f("\x1b[107m", "\x1b[49m"), - } -} - -module.exports = createColors() -module.exports.createColors = createColors diff --git a/web/static/node_modules/picocolors/types.d.ts b/web/static/node_modules/picocolors/types.d.ts deleted file mode 100644 index cd1aec46..00000000 --- a/web/static/node_modules/picocolors/types.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -export type Formatter = (input: string | number | null | undefined) => string - -export interface Colors { - isColorSupported: boolean - - reset: Formatter - bold: Formatter - dim: Formatter - italic: Formatter - underline: Formatter - inverse: Formatter - hidden: Formatter - strikethrough: Formatter - - black: Formatter - red: Formatter - green: Formatter - yellow: Formatter - blue: Formatter - magenta: Formatter - cyan: Formatter - white: Formatter - gray: Formatter - - bgBlack: Formatter - bgRed: Formatter - bgGreen: Formatter - bgYellow: Formatter - bgBlue: Formatter - bgMagenta: Formatter - bgCyan: Formatter - bgWhite: Formatter - - blackBright: Formatter - redBright: Formatter - greenBright: Formatter - yellowBright: Formatter - blueBright: Formatter - magentaBright: Formatter - cyanBright: Formatter - whiteBright: Formatter - - bgBlackBright: Formatter - bgRedBright: Formatter - bgGreenBright: Formatter - bgYellowBright: Formatter - bgBlueBright: Formatter - bgMagentaBright: Formatter - bgCyanBright: Formatter - bgWhiteBright: Formatter -} diff --git a/web/static/node_modules/picomatch/CHANGELOG.md b/web/static/node_modules/picomatch/CHANGELOG.md deleted file mode 100644 index 8ccc6c1b..00000000 --- a/web/static/node_modules/picomatch/CHANGELOG.md +++ /dev/null @@ -1,136 +0,0 @@ -# Release history - -**All notable changes to this project will be documented in this file.** - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -
    - Guiding Principles - -- Changelogs are for humans, not machines. -- There should be an entry for every single version. -- The same types of changes should be grouped. -- Versions and sections should be linkable. -- The latest version comes first. -- The release date of each versions is displayed. -- Mention whether you follow Semantic Versioning. - -
    - -
    - Types of changes - -Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): - -- `Added` for new features. -- `Changed` for changes in existing functionality. -- `Deprecated` for soon-to-be removed features. -- `Removed` for now removed features. -- `Fixed` for any bug fixes. -- `Security` in case of vulnerabilities. - -
    - -## 2.3.1 (2022-01-02) - -### Fixed - -* Fixes bug when a pattern containing an expression after the closing parenthesis (`/!(*.d).{ts,tsx}`) was incorrectly converted to regexp ([9f241ef](https://github.com/micromatch/picomatch/commit/9f241ef)). - -### Changed - -* Some documentation improvements ([f81d236](https://github.com/micromatch/picomatch/commit/f81d236), [421e0e7](https://github.com/micromatch/picomatch/commit/421e0e7)). - -## 2.3.0 (2021-05-21) - -### Fixed - -* Fixes bug where file names with two dots were not being matched consistently with negation extglobs containing a star ([56083ef](https://github.com/micromatch/picomatch/commit/56083ef)) - -## 2.2.3 (2021-04-10) - -### Fixed - -* Do not skip pattern seperator for square brackets ([fb08a30](https://github.com/micromatch/picomatch/commit/fb08a30)). -* Set negatedExtGlob also if it does not span the whole pattern ([032e3f5](https://github.com/micromatch/picomatch/commit/032e3f5)). - -## 2.2.2 (2020-03-21) - -### Fixed - -* Correctly handle parts of the pattern after parentheses in the `scan` method ([e15b920](https://github.com/micromatch/picomatch/commit/e15b920)). - -## 2.2.1 (2020-01-04) - -* Fixes [#49](https://github.com/micromatch/picomatch/issues/49), so that braces with no sets or ranges are now propertly treated as literals. - -## 2.2.0 (2020-01-04) - -* Disable fastpaths mode for the parse method ([5b8d33f](https://github.com/micromatch/picomatch/commit/5b8d33f)) -* Add `tokens`, `slashes`, and `parts` to the object returned by `picomatch.scan()`. - -## 2.1.0 (2019-10-31) - -* add benchmarks for scan ([4793b92](https://github.com/micromatch/picomatch/commit/4793b92)) -* Add eslint object-curly-spacing rule ([707c650](https://github.com/micromatch/picomatch/commit/707c650)) -* Add prefer-const eslint rule ([5c7501c](https://github.com/micromatch/picomatch/commit/5c7501c)) -* Add support for nonegate in scan API ([275c9b9](https://github.com/micromatch/picomatch/commit/275c9b9)) -* Change lets to consts. Move root import up. ([4840625](https://github.com/micromatch/picomatch/commit/4840625)) -* closes https://github.com/micromatch/picomatch/issues/21 ([766bcb0](https://github.com/micromatch/picomatch/commit/766bcb0)) -* Fix "Extglobs" table in readme ([eb19da8](https://github.com/micromatch/picomatch/commit/eb19da8)) -* fixes https://github.com/micromatch/picomatch/issues/20 ([9caca07](https://github.com/micromatch/picomatch/commit/9caca07)) -* fixes https://github.com/micromatch/picomatch/issues/26 ([fa58f45](https://github.com/micromatch/picomatch/commit/fa58f45)) -* Lint test ([d433a34](https://github.com/micromatch/picomatch/commit/d433a34)) -* lint unit tests ([0159b55](https://github.com/micromatch/picomatch/commit/0159b55)) -* Make scan work with noext ([6c02e03](https://github.com/micromatch/picomatch/commit/6c02e03)) -* minor linting ([c2a2b87](https://github.com/micromatch/picomatch/commit/c2a2b87)) -* minor parser improvements ([197671d](https://github.com/micromatch/picomatch/commit/197671d)) -* remove eslint since it... ([07876fa](https://github.com/micromatch/picomatch/commit/07876fa)) -* remove funding file ([8ebe96d](https://github.com/micromatch/picomatch/commit/8ebe96d)) -* Remove unused funks ([cbc6d54](https://github.com/micromatch/picomatch/commit/cbc6d54)) -* Run eslint during pretest, fix existing eslint findings ([0682367](https://github.com/micromatch/picomatch/commit/0682367)) -* support `noparen` in scan ([3d37569](https://github.com/micromatch/picomatch/commit/3d37569)) -* update changelog ([7b34e77](https://github.com/micromatch/picomatch/commit/7b34e77)) -* update travis ([777f038](https://github.com/micromatch/picomatch/commit/777f038)) -* Use eslint-disable-next-line instead of eslint-disable ([4e7c1fd](https://github.com/micromatch/picomatch/commit/4e7c1fd)) - -## 2.0.7 (2019-05-14) - -* 2.0.7 ([9eb9a71](https://github.com/micromatch/picomatch/commit/9eb9a71)) -* supports lookbehinds ([1f63f7e](https://github.com/micromatch/picomatch/commit/1f63f7e)) -* update .verb.md file with typo change ([2741279](https://github.com/micromatch/picomatch/commit/2741279)) -* fix: typo in README ([0753e44](https://github.com/micromatch/picomatch/commit/0753e44)) - -## 2.0.4 (2019-04-10) - -### Fixed - -- Readme link [fixed](https://github.com/micromatch/picomatch/pull/13/commits/a96ab3aa2b11b6861c23289964613d85563b05df) by @danez. -- `options.capture` now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza. - -## 2.0.0 (2019-04-10) - -### Added - -- Adds support for `options.onIgnore`. See the readme for details -- Adds support for `options.onResult`. See the readme for details - -### Breaking changes - -- The unixify option was renamed to `windows` -- caching and all related options and methods have been removed - -## 1.0.0 (2018-11-05) - -- adds `.onMatch` option -- improvements to `.scan` method -- numerous improvements and optimizations for matching and parsing -- better windows path handling - -## 0.1.0 - 2017-04-13 - -First release. - - -[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/web/static/node_modules/picomatch/LICENSE b/web/static/node_modules/picomatch/LICENSE deleted file mode 100644 index 3608dca2..00000000 --- a/web/static/node_modules/picomatch/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017-present, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/web/static/node_modules/picomatch/README.md b/web/static/node_modules/picomatch/README.md deleted file mode 100644 index b0526e28..00000000 --- a/web/static/node_modules/picomatch/README.md +++ /dev/null @@ -1,708 +0,0 @@ -

    Picomatch

    - -

    - -version - - -test status - - -coverage status - - -downloads - -

    - -
    -
    - -

    -Blazing fast and accurate glob matcher written in JavaScript.
    -No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions. -

    - -
    -
    - -## Why picomatch? - -* **Lightweight** - No dependencies -* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function. -* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps) -* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files) -* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes. -* **Well tested** - Thousands of unit tests - -See the [library comparison](#library-comparisons) to other libraries. - -
    -
    - -## Table of Contents - -
    Click to expand - -- [Install](#install) -- [Usage](#usage) -- [API](#api) - * [picomatch](#picomatch) - * [.test](#test) - * [.matchBase](#matchbase) - * [.isMatch](#ismatch) - * [.parse](#parse) - * [.scan](#scan) - * [.compileRe](#compilere) - * [.makeRe](#makere) - * [.toRegex](#toregex) -- [Options](#options) - * [Picomatch options](#picomatch-options) - * [Scan Options](#scan-options) - * [Options Examples](#options-examples) -- [Globbing features](#globbing-features) - * [Basic globbing](#basic-globbing) - * [Advanced globbing](#advanced-globbing) - * [Braces](#braces) - * [Matching special characters as literals](#matching-special-characters-as-literals) -- [Library Comparisons](#library-comparisons) -- [Benchmarks](#benchmarks) -- [Philosophies](#philosophies) -- [About](#about) - * [Author](#author) - * [License](#license) - -_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ - -
    - -
    -
    - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -npm install --save picomatch -``` - -
    - -## Usage - -The main export is a function that takes a glob pattern and an options object and returns a function for matching strings. - -```js -const pm = require('picomatch'); -const isMatch = pm('*.js'); - -console.log(isMatch('abcd')); //=> false -console.log(isMatch('a.js')); //=> true -console.log(isMatch('a.md')); //=> false -console.log(isMatch('a/b.js')); //=> false -``` - -
    - -## API - -### [picomatch](lib/picomatch.js#L32) - -Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information. - -**Params** - -* `globs` **{String|Array}**: One or more glob patterns. -* `options` **{Object=}** -* `returns` **{Function=}**: Returns a matcher function. - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch(glob[, options]); - -const isMatch = picomatch('*.!(*a)'); -console.log(isMatch('a.a')); //=> false -console.log(isMatch('a.b')); //=> true -``` - -### [.test](lib/picomatch.js#L117) - -Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string. - -**Params** - -* `input` **{String}**: String to test. -* `regex` **{RegExp}** -* `returns` **{Object}**: Returns an object with matching info. - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.test(input, regex[, options]); - -console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); -// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } -``` - -### [.matchBase](lib/picomatch.js#L161) - -Match the basename of a filepath. - -**Params** - -* `input` **{String}**: String to test. -* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe). -* `returns` **{Boolean}** - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.matchBase(input, glob[, options]); -console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true -``` - -### [.isMatch](lib/picomatch.js#L183) - -Returns true if **any** of the given glob `patterns` match the specified `string`. - -**Params** - -* **{String|Array}**: str The string to test. -* **{String|Array}**: patterns One or more glob patterns to use for matching. -* **{Object}**: See available [options](#options). -* `returns` **{Boolean}**: Returns true if any patterns match `str` - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.isMatch(string, patterns[, options]); - -console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true -console.log(picomatch.isMatch('a.a', 'b.*')); //=> false -``` - -### [.parse](lib/picomatch.js#L199) - -Parse a glob pattern to create the source string for a regular expression. - -**Params** - -* `pattern` **{String}** -* `options` **{Object}** -* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string. - -**Example** - -```js -const picomatch = require('picomatch'); -const result = picomatch.parse(pattern[, options]); -``` - -### [.scan](lib/picomatch.js#L231) - -Scan a glob pattern to separate the pattern into segments. - -**Params** - -* `input` **{String}**: Glob pattern to scan. -* `options` **{Object}** -* `returns` **{Object}**: Returns an object with - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.scan(input[, options]); - -const result = picomatch.scan('!./foo/*.js'); -console.log(result); -{ prefix: '!./', - input: '!./foo/*.js', - start: 3, - base: 'foo', - glob: '*.js', - isBrace: false, - isBracket: false, - isGlob: true, - isExtglob: false, - isGlobstar: false, - negated: true } -``` - -### [.compileRe](lib/picomatch.js#L245) - -Compile a regular expression from the `state` object returned by the -[parse()](#parse) method. - -**Params** - -* `state` **{Object}** -* `options` **{Object}** -* `returnOutput` **{Boolean}**: Intended for implementors, this argument allows you to return the raw output from the parser. -* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. -* `returns` **{RegExp}** - -### [.makeRe](lib/picomatch.js#L286) - -Create a regular expression from a parsed glob pattern. - -**Params** - -* `state` **{String}**: The object returned from the `.parse` method. -* `options` **{Object}** -* `returnOutput` **{Boolean}**: Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. -* `returnState` **{Boolean}**: Implementors may use this argument to return the state from the parsed glob with the returned regular expression. -* `returns` **{RegExp}**: Returns a regex created from the given pattern. - -**Example** - -```js -const picomatch = require('picomatch'); -const state = picomatch.parse('*.js'); -// picomatch.compileRe(state[, options]); - -console.log(picomatch.compileRe(state)); -//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ -``` - -### [.toRegex](lib/picomatch.js#L321) - -Create a regular expression from the given regex source string. - -**Params** - -* `source` **{String}**: Regular expression source string. -* `options` **{Object}** -* `returns` **{RegExp}** - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.toRegex(source[, options]); - -const { output } = picomatch.parse('*.js'); -console.log(picomatch.toRegex(output)); -//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ -``` - -
    - -## Options - -### Picomatch options - -The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API. - -| **Option** | **Type** | **Default value** | **Description** | -| --- | --- | --- | --- | -| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. | -| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). | -| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. | -| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). | -| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` | -| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. | -| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true | -| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. | -| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. | -| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. | -| `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. | -| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. | -| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. | -| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. | -| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. | -| `matchBase` | `boolean` | `false` | Alias for `basename` | -| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. | -| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. | -| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. | -| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. | -| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. | -| `noext` | `boolean` | `false` | Alias for `noextglob` | -| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) | -| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) | -| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` | -| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. | -| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. | -| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. | -| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. | -| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). | -| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself | -| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. | -| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). | -| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. | -| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. | -| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. | -| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. | - -picomatch has automatic detection for regex positive and negative lookbehinds. If the pattern contains a negative lookbehind, you must be using Node.js >= 8.10 or else picomatch will throw an error. - -### Scan Options - -In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method. - -| **Option** | **Type** | **Default value** | **Description** | -| --- | --- | --- | --- | -| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern | -| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true | - -**Example** - -```js -const picomatch = require('picomatch'); -const result = picomatch.scan('!./foo/*.js', { tokens: true }); -console.log(result); -// { -// prefix: '!./', -// input: '!./foo/*.js', -// start: 3, -// base: 'foo', -// glob: '*.js', -// isBrace: false, -// isBracket: false, -// isGlob: true, -// isExtglob: false, -// isGlobstar: false, -// negated: true, -// maxDepth: 2, -// tokens: [ -// { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true }, -// { value: 'foo', depth: 1, isGlob: false }, -// { value: '*.js', depth: 1, isGlob: true } -// ], -// slashes: [ 2, 6 ], -// parts: [ 'foo', '*.js' ] -// } -``` - -
    - -### Options Examples - -#### options.expandRange - -**Type**: `function` - -**Default**: `undefined` - -Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need. - -**Example** - -The following example shows how to create a glob that matches a folder - -```js -const fill = require('fill-range'); -const regex = pm.makeRe('foo/{01..25}/bar', { - expandRange(a, b) { - return `(${fill(a, b, { toRegex: true })})`; - } -}); - -console.log(regex); -//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/ - -console.log(regex.test('foo/00/bar')) // false -console.log(regex.test('foo/01/bar')) // true -console.log(regex.test('foo/10/bar')) // true -console.log(regex.test('foo/22/bar')) // true -console.log(regex.test('foo/25/bar')) // true -console.log(regex.test('foo/26/bar')) // false -``` - -#### options.format - -**Type**: `function` - -**Default**: `undefined` - -Custom function for formatting strings before they're matched. - -**Example** - -```js -// strip leading './' from strings -const format = str => str.replace(/^\.\//, ''); -const isMatch = picomatch('foo/*.js', { format }); -console.log(isMatch('./foo/bar.js')); //=> true -``` - -#### options.onMatch - -```js -const onMatch = ({ glob, regex, input, output }) => { - console.log({ glob, regex, input, output }); -}; - -const isMatch = picomatch('*', { onMatch }); -isMatch('foo'); -isMatch('bar'); -isMatch('baz'); -``` - -#### options.onIgnore - -```js -const onIgnore = ({ glob, regex, input, output }) => { - console.log({ glob, regex, input, output }); -}; - -const isMatch = picomatch('*', { onIgnore, ignore: 'f*' }); -isMatch('foo'); -isMatch('bar'); -isMatch('baz'); -``` - -#### options.onResult - -```js -const onResult = ({ glob, regex, input, output }) => { - console.log({ glob, regex, input, output }); -}; - -const isMatch = picomatch('*', { onResult, ignore: 'f*' }); -isMatch('foo'); -isMatch('bar'); -isMatch('baz'); -``` - -
    -
    - -## Globbing features - -* [Basic globbing](#basic-globbing) (Wildcard matching) -* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching) - -### Basic globbing - -| **Character** | **Description** | -| --- | --- | -| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. | -| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` on Windows) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. | -| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. | -| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. | - -#### Matching behavior vs. Bash - -Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions: - -* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`. -* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`. - -
    - -### Advanced globbing - -* [extglobs](#extglobs) -* [POSIX brackets](#posix-brackets) -* [Braces](#brace-expansion) - -#### Extglobs - -| **Pattern** | **Description** | -| --- | --- | -| `@(pattern)` | Match _only one_ consecutive occurrence of `pattern` | -| `*(pattern)` | Match _zero or more_ consecutive occurrences of `pattern` | -| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` | -| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` | -| `!(pattern)` | Match _anything but_ `pattern` | - -**Examples** - -```js -const pm = require('picomatch'); - -// *(pattern) matches ZERO or more of "pattern" -console.log(pm.isMatch('a', 'a*(z)')); // true -console.log(pm.isMatch('az', 'a*(z)')); // true -console.log(pm.isMatch('azzz', 'a*(z)')); // true - -// +(pattern) matches ONE or more of "pattern" -console.log(pm.isMatch('a', 'a*(z)')); // true -console.log(pm.isMatch('az', 'a*(z)')); // true -console.log(pm.isMatch('azzz', 'a*(z)')); // true - -// supports multiple extglobs -console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false - -// supports nested extglobs -console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true -``` - -#### POSIX brackets - -POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true. - -**Enable POSIX bracket support** - -```js -console.log(pm.makeRe('[[:word:]]+', { posix: true })); -//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/ -``` - -**Supported POSIX classes** - -The following named POSIX bracket expressions are supported: - -* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]` -* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`. -* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`. -* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`. -* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`. -* `[:digit:]` - Numerical digits, equivalent to `[0-9]`. -* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`. -* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`. -* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`. -* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`. -* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`. -* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`. -* `[:word:]` - Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`. -* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`. - -See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information. - -### Braces - -Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces. - -### Matching special characters as literals - -If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes: - -**Special Characters** - -Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms. - -To match any of the following characters as literals: `$^*+?()[] - -Examples: - -```js -console.log(pm.makeRe('foo/bar \\(1\\)')); -console.log(pm.makeRe('foo/bar \\(1\\)')); -``` - -
    -
    - -## Library Comparisons - -The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackets](https://github.com/micromatch/expand-brackets). - -| **Feature** | `minimatch` | `micromatch` | `picomatch` | `nanomatch` | `extglob` | `braces` | `expand-brackets` | -| --- | --- | --- | --- | --- | --- | --- | --- | -| Wildcard matching (`*?+`) | ✔ | ✔ | ✔ | ✔ | - | - | - | -| Advancing globbing | ✔ | ✔ | ✔ | - | - | - | - | -| Brace _matching_ | ✔ | ✔ | ✔ | - | - | ✔ | - | -| Brace _expansion_ | ✔ | ✔ | - | - | - | ✔ | - | -| Extglobs | partial | ✔ | ✔ | - | ✔ | - | - | -| Posix brackets | - | ✔ | ✔ | - | - | - | ✔ | -| Regular expression syntax | - | ✔ | ✔ | ✔ | ✔ | - | ✔ | -| File system operations | - | - | - | - | - | - | - | - -
    -
    - -## Benchmarks - -Performance comparison of picomatch and minimatch. - -``` -# .makeRe star - picomatch x 1,993,050 ops/sec ±0.51% (91 runs sampled) - minimatch x 627,206 ops/sec ±1.96% (87 runs sampled)) - -# .makeRe star; dot=true - picomatch x 1,436,640 ops/sec ±0.62% (91 runs sampled) - minimatch x 525,876 ops/sec ±0.60% (88 runs sampled) - -# .makeRe globstar - picomatch x 1,592,742 ops/sec ±0.42% (90 runs sampled) - minimatch x 962,043 ops/sec ±1.76% (91 runs sampled)d) - -# .makeRe globstars - picomatch x 1,615,199 ops/sec ±0.35% (94 runs sampled) - minimatch x 477,179 ops/sec ±1.33% (91 runs sampled) - -# .makeRe with leading star - picomatch x 1,220,856 ops/sec ±0.40% (92 runs sampled) - minimatch x 453,564 ops/sec ±1.43% (94 runs sampled) - -# .makeRe - basic braces - picomatch x 392,067 ops/sec ±0.70% (90 runs sampled) - minimatch x 99,532 ops/sec ±2.03% (87 runs sampled)) -``` - -
    -
    - -## Philosophies - -The goal of this library is to be blazing fast, without compromising on accuracy. - -**Accuracy** - -The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`. - -Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements. - -**Performance** - -Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer. - -
    -
    - -## About - -
    -Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. - -
    - -
    -Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -npm install && npm test -``` - -
    - -
    -Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
    - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -### License - -Copyright © 2017-present, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). diff --git a/web/static/node_modules/picomatch/index.js b/web/static/node_modules/picomatch/index.js deleted file mode 100644 index d2f2bc59..00000000 --- a/web/static/node_modules/picomatch/index.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./lib/picomatch'); diff --git a/web/static/node_modules/picomatch/lib/constants.js b/web/static/node_modules/picomatch/lib/constants.js deleted file mode 100644 index a62ef387..00000000 --- a/web/static/node_modules/picomatch/lib/constants.js +++ /dev/null @@ -1,179 +0,0 @@ -'use strict'; - -const path = require('path'); -const WIN_SLASH = '\\\\/'; -const WIN_NO_SLASH = `[^${WIN_SLASH}]`; - -/** - * Posix glob regex - */ - -const DOT_LITERAL = '\\.'; -const PLUS_LITERAL = '\\+'; -const QMARK_LITERAL = '\\?'; -const SLASH_LITERAL = '\\/'; -const ONE_CHAR = '(?=.)'; -const QMARK = '[^/]'; -const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; -const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; -const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; -const NO_DOT = `(?!${DOT_LITERAL})`; -const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; -const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; -const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; -const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; -const STAR = `${QMARK}*?`; - -const POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR -}; - -/** - * Windows glob regex - */ - -const WINDOWS_CHARS = { - ...POSIX_CHARS, - - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` -}; - -/** - * POSIX Bracket Regex - */ - -const POSIX_REGEX_SOURCE = { - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - ascii: '\\x00-\\x7F', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E ', - punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9' -}; - -module.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - '***': '*', - '**/**': '**', - '**/**/**': '**' - }, - - // Digits - CHAR_0: 48, /* 0 */ - CHAR_9: 57, /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 65, /* A */ - CHAR_LOWERCASE_A: 97, /* a */ - CHAR_UPPERCASE_Z: 90, /* Z */ - CHAR_LOWERCASE_Z: 122, /* z */ - - CHAR_LEFT_PARENTHESES: 40, /* ( */ - CHAR_RIGHT_PARENTHESES: 41, /* ) */ - - CHAR_ASTERISK: 42, /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, /* & */ - CHAR_AT: 64, /* @ */ - CHAR_BACKWARD_SLASH: 92, /* \ */ - CHAR_CARRIAGE_RETURN: 13, /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ - CHAR_COLON: 58, /* : */ - CHAR_COMMA: 44, /* , */ - CHAR_DOT: 46, /* . */ - CHAR_DOUBLE_QUOTE: 34, /* " */ - CHAR_EQUAL: 61, /* = */ - CHAR_EXCLAMATION_MARK: 33, /* ! */ - CHAR_FORM_FEED: 12, /* \f */ - CHAR_FORWARD_SLASH: 47, /* / */ - CHAR_GRAVE_ACCENT: 96, /* ` */ - CHAR_HASH: 35, /* # */ - CHAR_HYPHEN_MINUS: 45, /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ - CHAR_LEFT_CURLY_BRACE: 123, /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ - CHAR_LINE_FEED: 10, /* \n */ - CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ - CHAR_PERCENT: 37, /* % */ - CHAR_PLUS: 43, /* + */ - CHAR_QUESTION_MARK: 63, /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ - CHAR_SEMICOLON: 59, /* ; */ - CHAR_SINGLE_QUOTE: 39, /* ' */ - CHAR_SPACE: 32, /* */ - CHAR_TAB: 9, /* \t */ - CHAR_UNDERSCORE: 95, /* _ */ - CHAR_VERTICAL_LINE: 124, /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - - SEP: path.sep, - - /** - * Create EXTGLOB_CHARS - */ - - extglobChars(chars) { - return { - '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, - '?': { type: 'qmark', open: '(?:', close: ')?' }, - '+': { type: 'plus', open: '(?:', close: ')+' }, - '*': { type: 'star', open: '(?:', close: ')*' }, - '@': { type: 'at', open: '(?:', close: ')' } - }; - }, - - /** - * Create GLOB_CHARS - */ - - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } -}; diff --git a/web/static/node_modules/picomatch/lib/parse.js b/web/static/node_modules/picomatch/lib/parse.js deleted file mode 100644 index 58269d01..00000000 --- a/web/static/node_modules/picomatch/lib/parse.js +++ /dev/null @@ -1,1091 +0,0 @@ -'use strict'; - -const constants = require('./constants'); -const utils = require('./utils'); - -/** - * Constants - */ - -const { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS -} = constants; - -/** - * Helpers - */ - -const expandRange = (args, options) => { - if (typeof options.expandRange === 'function') { - return options.expandRange(...args, options); - } - - args.sort(); - const value = `[${args.join('-')}]`; - - try { - /* eslint-disable-next-line no-new */ - new RegExp(value); - } catch (ex) { - return args.map(v => utils.escapeRegex(v)).join('..'); - } - - return value; -}; - -/** - * Create the message for a syntax error - */ - -const syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; -}; - -/** - * Parse the given input string. - * @param {String} input - * @param {Object} options - * @return {Object} - */ - -const parse = (input, options) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - input = REPLACEMENTS[input] || input; - - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - const bos = { type: 'bos', value: '', output: opts.prepend || '' }; - const tokens = [bos]; - - const capture = opts.capture ? '' : '?:'; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - - const globstar = opts => { - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const nodot = opts.dot ? '' : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - // minimatch options support - if (typeof opts.noext === 'boolean') { - opts.noextglob = opts.noext; - } - - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: '', - output: '', - prefix: '', - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - - input = utils.removePrefix(input, state); - len = input.length; - - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - - /** - * Tokenizing helpers - */ - - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ''; - const remaining = () => input.slice(state.index + 1); - const consume = (value = '', num = 0) => { - state.consumed += value; - state.index += num; - }; - - const append = token => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - - const negate = () => { - let count = 1; - - while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { - advance(); - state.start++; - count++; - } - - if (count % 2 === 0) { - return false; - } - - state.negated = true; - state.start++; - return true; - }; - - const increment = type => { - state[type]++; - stack.push(type); - }; - - const decrement = type => { - state[type]--; - stack.pop(); - }; - - /** - * Push tokens onto the tokens array. This helper speeds up - * tokenizing by 1) helping us avoid backtracking as much as possible, - * and 2) helping us avoid creating extra tokens when consecutive - * characters are plain text. This improves performance and simplifies - * lookbehinds. - */ - - const push = tok => { - if (prev.type === 'globstar') { - const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); - const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); - - if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = 'star'; - prev.value = '*'; - prev.output = star; - state.output += prev.output; - } - } - - if (extglobs.length && tok.type !== 'paren') { - extglobs[extglobs.length - 1].inner += tok.value; - } - - if (tok.value || tok.output) append(tok); - if (prev && prev.type === 'text' && tok.type === 'text') { - prev.value += tok.value; - prev.output = (prev.output || '') + tok.value; - return; - } - - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - - const extglobOpen = (type, value) => { - const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; - - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? '(' : '') + token.open; - - increment('parens'); - push({ type, value, output: state.output ? '' : ONE_CHAR }); - push({ type: 'paren', extglob: true, value: advance(), output }); - extglobs.push(token); - }; - - const extglobClose = token => { - let output = token.close + (opts.capture ? ')' : ''); - let rest; - - if (token.type === 'negate') { - let extglobStar = star; - - if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { - extglobStar = globstar(opts); - } - - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - - if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. - // In this case, we need to parse the string and use it in the output of the original pattern. - // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. - // - // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. - const expression = parse(rest, { ...options, fastpaths: false }).output; - - output = token.close = `)${expression})${extglobStar})`; - } - - if (token.prev.type === 'bos') { - state.negatedExtglob = true; - } - } - - push({ type: 'paren', extglob: true, value, output }); - decrement('parens'); - }; - - /** - * Fast paths - */ - - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === '\\') { - backslashes = true; - return m; - } - - if (first === '?') { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ''); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); - } - return QMARK.repeat(chars.length); - } - - if (first === '.') { - return DOT_LITERAL.repeat(chars.length); - } - - if (first === '*') { - if (esc) { - return esc + first + (rest ? star : ''); - } - return star; - } - return esc ? m : `\\${m}`; - }); - - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ''); - } else { - output = output.replace(/\\+/g, m => { - return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); - }); - } - } - - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - - state.output = utils.wrapOutput(output, state, options); - return state; - } - - /** - * Tokenize input until we reach end-of-string - */ - - while (!eos()) { - value = advance(); - - if (value === '\u0000') { - continue; - } - - /** - * Escaped characters - */ - - if (value === '\\') { - const next = peek(); - - if (next === '/' && opts.bash !== true) { - continue; - } - - if (next === '.' || next === ';') { - continue; - } - - if (!next) { - value += '\\'; - push({ type: 'text', value }); - continue; - } - - // collapse slashes to reduce potential for exploits - const match = /^\\+/.exec(remaining()); - let slashes = 0; - - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += '\\'; - } - } - - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - - if (state.brackets === 0) { - push({ type: 'text', value }); - continue; - } - } - - /** - * If we're inside a regex character class, continue - * until we reach the closing bracket. - */ - - if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { - if (opts.posix !== false && value === ':') { - const inner = prev.value.slice(1); - if (inner.includes('[')) { - prev.posix = true; - - if (inner.includes(':')) { - const idx = prev.value.lastIndexOf('['); - const pre = prev.value.slice(0, idx); - const rest = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - - if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { - value = `\\${value}`; - } - - if (value === ']' && (prev.value === '[' || prev.value === '[^')) { - value = `\\${value}`; - } - - if (opts.posix === true && value === '!' && prev.value === '[') { - value = '^'; - } - - prev.value += value; - append({ value }); - continue; - } - - /** - * If we're inside a quoted string, continue - * until we reach the closing double quote. - */ - - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - - /** - * Double quotes - */ - - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: 'text', value }); - } - continue; - } - - /** - * Parentheses - */ - - if (value === '(') { - increment('parens'); - push({ type: 'paren', value }); - continue; - } - - if (value === ')') { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '(')); - } - - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - - push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); - decrement('parens'); - continue; - } - - /** - * Square brackets - */ - - if (value === '[') { - if (opts.nobracket === true || !remaining().includes(']')) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('closing', ']')); - } - - value = `\\${value}`; - } else { - increment('brackets'); - } - - push({ type: 'bracket', value }); - continue; - } - - if (value === ']') { - if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '[')); - } - - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - decrement('brackets'); - - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { - value = `/${value}`; - } - - prev.value += value; - append({ value }); - - // when literal brackets are explicitly disabled - // assume we should match with a regex character class - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - - // when literal brackets are explicitly enabled - // assume we should escape the brackets to match literal characters - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - - // when the user specifies nothing, try to match both - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - - /** - * Braces - */ - - if (value === '{' && opts.nobrace !== true) { - increment('braces'); - - const open = { - type: 'brace', - value, - output: '(', - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - - braces.push(open); - push(open); - continue; - } - - if (value === '}') { - const brace = braces[braces.length - 1]; - - if (opts.nobrace === true || !brace) { - push({ type: 'text', value, output: value }); - continue; - } - - let output = ')'; - - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === 'brace') { - break; - } - if (arr[i].type !== 'dots') { - range.unshift(arr[i].value); - } - } - - output = expandRange(range, opts); - state.backtrack = true; - } - - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = '\\{'; - value = output = '\\}'; - state.output = out; - for (const t of toks) { - state.output += (t.output || t.value); - } - } - - push({ type: 'brace', value, output }); - decrement('braces'); - braces.pop(); - continue; - } - - /** - * Pipes - */ - - if (value === '|') { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: 'text', value }); - continue; - } - - /** - * Commas - */ - - if (value === ',') { - let output = value; - - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === 'braces') { - brace.comma = true; - output = '|'; - } - - push({ type: 'comma', value, output }); - continue; - } - - /** - * Slashes - */ - - if (value === '/') { - // if the beginning of the glob is "./", advance the start - // to the current index, and don't add the "./" characters - // to the state. This greatly simplifies lookbehinds when - // checking for BOS characters like "!" and "." (not "./") - if (prev.type === 'dot' && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ''; - state.output = ''; - tokens.pop(); - prev = bos; // reset "prev" to the first token - continue; - } - - push({ type: 'slash', value, output: SLASH_LITERAL }); - continue; - } - - /** - * Dots - */ - - if (value === '.') { - if (state.braces > 0 && prev.type === 'dot') { - if (prev.value === '.') prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = 'dots'; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - - if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { - push({ type: 'text', value, output: DOT_LITERAL }); - continue; - } - - push({ type: 'dot', value, output: DOT_LITERAL }); - continue; - } - - /** - * Question marks - */ - - if (value === '?') { - const isGroup = prev && prev.value === '('; - if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('qmark', value); - continue; - } - - if (prev && prev.type === 'paren') { - const next = peek(); - let output = value; - - if (next === '<' && !utils.supportsLookbehinds()) { - throw new Error('Node.js v10 or higher is required for regex lookbehinds'); - } - - if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { - output = `\\${value}`; - } - - push({ type: 'text', value, output }); - continue; - } - - if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { - push({ type: 'qmark', value, output: QMARK_NO_DOT }); - continue; - } - - push({ type: 'qmark', value, output: QMARK }); - continue; - } - - /** - * Exclamation - */ - - if (value === '!') { - if (opts.noextglob !== true && peek() === '(') { - if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { - extglobOpen('negate', value); - continue; - } - } - - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - - /** - * Plus - */ - - if (value === '+') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('plus', value); - continue; - } - - if ((prev && prev.value === '(') || opts.regex === false) { - push({ type: 'plus', value, output: PLUS_LITERAL }); - continue; - } - - if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { - push({ type: 'plus', value }); - continue; - } - - push({ type: 'plus', value: PLUS_LITERAL }); - continue; - } - - /** - * Plain text - */ - - if (value === '@') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - push({ type: 'at', extglob: true, value, output: '' }); - continue; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Plain text - */ - - if (value !== '*') { - if (value === '$' || value === '^') { - value = `\\${value}`; - } - - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Stars - */ - - if (prev && (prev.type === 'globstar' || prev.star === true)) { - prev.type = 'star'; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen('star', value); - continue; - } - - if (prev.type === 'star') { - if (opts.noglobstar === true) { - consume(value); - continue; - } - - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === 'slash' || prior.type === 'bos'; - const afterStar = before && (before.type === 'star' || before.type === 'globstar'); - - if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { - push({ type: 'star', value, output: '' }); - continue; - } - - const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); - const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); - if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { - push({ type: 'star', value, output: '' }); - continue; - } - - // strip consecutive `/**/` - while (rest.slice(0, 3) === '/**') { - const after = input[state.index + 4]; - if (after && after !== '/') { - break; - } - rest = rest.slice(3); - consume('/**', 3); - } - - if (prior.type === 'bos' && eos()) { - prev.type = 'globstar'; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { - const end = rest[1] !== void 0 ? '|$' : ''; - - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - - state.output += prior.output + prev.output; - state.globstar = true; - - consume(value + advance()); - - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - if (prior.type === 'bos' && rest[0] === '/') { - prev.type = 'globstar'; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - // remove single star from output - state.output = state.output.slice(0, -prev.output.length); - - // reset previous token to globstar - prev.type = 'globstar'; - prev.output = globstar(opts); - prev.value += value; - - // reset output with globstar - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - - const token = { type: 'star', value, output: star }; - - if (opts.bash === true) { - token.output = '.*?'; - if (prev.type === 'bos' || prev.type === 'slash') { - token.output = nodot + token.output; - } - push(token); - continue; - } - - if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { - token.output = value; - push(token); - continue; - } - - if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { - if (prev.type === 'dot') { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - - } else { - state.output += nodot; - prev.output += nodot; - } - - if (peek() !== '*') { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - - push(token); - } - - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); - state.output = utils.escapeLast(state.output, '['); - decrement('brackets'); - } - - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); - state.output = utils.escapeLast(state.output, '('); - decrement('parens'); - } - - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); - state.output = utils.escapeLast(state.output, '{'); - decrement('braces'); - } - - if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { - push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); - } - - // rebuild the output if we had to backtrack at any point - if (state.backtrack === true) { - state.output = ''; - - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - - if (token.suffix) { - state.output += token.suffix; - } - } - } - - return state; -}; - -/** - * Fast paths for creating regular expressions for common glob patterns. - * This can significantly speed up processing and has very little downside - * impact when none of the fast paths match. - */ - -parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? '' : '?:'; - const state = { negated: false, prefix: '' }; - let star = opts.bash === true ? '.*?' : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - const globstar = opts => { - if (opts.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const create = str => { - switch (str) { - case '*': - return `${nodot}${ONE_CHAR}${star}`; - - case '.*': - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*.*': - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*/*': - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - - case '**': - return nodot + globstar(opts); - - case '**/*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - - case '**/*.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '**/.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - - default: { - const match = /^(.*?)\.(\w+)$/.exec(str); - if (!match) return; - - const source = create(match[1]); - if (!source) return; - - return source + DOT_LITERAL + match[2]; - } - } - }; - - const output = utils.removePrefix(input, state); - let source = create(output); - - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - - return source; -}; - -module.exports = parse; diff --git a/web/static/node_modules/picomatch/lib/picomatch.js b/web/static/node_modules/picomatch/lib/picomatch.js deleted file mode 100644 index 782d8094..00000000 --- a/web/static/node_modules/picomatch/lib/picomatch.js +++ /dev/null @@ -1,342 +0,0 @@ -'use strict'; - -const path = require('path'); -const scan = require('./scan'); -const parse = require('./parse'); -const utils = require('./utils'); -const constants = require('./constants'); -const isObject = val => val && typeof val === 'object' && !Array.isArray(val); - -/** - * Creates a matcher function from one or more glob patterns. The - * returned function takes a string to match as its first argument, - * and returns true if the string is a match. The returned matcher - * function also takes a boolean as the second argument that, when true, - * returns an object with additional information. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch(glob[, options]); - * - * const isMatch = picomatch('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @name picomatch - * @param {String|Array} `globs` One or more glob patterns. - * @param {Object=} `options` - * @return {Function=} Returns a matcher function. - * @api public - */ - -const picomatch = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map(input => picomatch(input, options, returnState)); - const arrayMatcher = str => { - for (const isMatch of fns) { - const state = isMatch(str); - if (state) return state; - } - return false; - }; - return arrayMatcher; - } - - const isState = isObject(glob) && glob.tokens && glob.input; - - if (glob === '' || (typeof glob !== 'string' && !isState)) { - throw new TypeError('Expected pattern to be a non-empty string'); - } - - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState - ? picomatch.compileRe(glob, options) - : picomatch.makeRe(glob, options, false, true); - - const state = regex.state; - delete regex.state; - - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - - if (typeof opts.onResult === 'function') { - opts.onResult(result); - } - - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - - if (isIgnored(input)) { - if (typeof opts.onIgnore === 'function') { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - - if (typeof opts.onMatch === 'function') { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - - if (returnState) { - matcher.state = state; - } - - return matcher; -}; - -/** - * Test `input` with the given `regex`. This is used by the main - * `picomatch()` function to test the input string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.test(input, regex[, options]); - * - * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); - * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } - * ``` - * @param {String} `input` String to test. - * @param {RegExp} `regex` - * @return {Object} Returns an object with matching info. - * @api public - */ - -picomatch.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected input to be a string'); - } - - if (input === '') { - return { isMatch: false, output: '' }; - } - - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = (match && format) ? format(input) : input; - - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - - return { isMatch: Boolean(match), match, output }; -}; - -/** - * Match the basename of a filepath. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.matchBase(input, glob[, options]); - * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true - * ``` - * @param {String} `input` String to test. - * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). - * @return {Boolean} - * @api public - */ - -picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path.basename(input)); -}; - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.isMatch(string, patterns[, options]); - * - * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String|Array} str The string to test. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} [options] See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const picomatch = require('picomatch'); - * const result = picomatch.parse(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as a regex source string. - * @api public - */ - -picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); -}; - -/** - * Scan a glob pattern to separate the pattern into segments. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.scan(input[, options]); - * - * const result = picomatch.scan('!./foo/*.js'); - * console.log(result); - * { prefix: '!./', - * input: '!./foo/*.js', - * start: 3, - * base: 'foo', - * glob: '*.js', - * isBrace: false, - * isBracket: false, - * isGlob: true, - * isExtglob: false, - * isGlobstar: false, - * negated: true } - * ``` - * @param {String} `input` Glob pattern to scan. - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -picomatch.scan = (input, options) => scan(input, options); - -/** - * Compile a regular expression from the `state` object returned by the - * [parse()](#parse) method. - * - * @param {Object} `state` - * @param {Object} `options` - * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. - * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. - * @return {RegExp} - * @api public - */ - -picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - - return regex; -}; - -/** - * Create a regular expression from a parsed glob pattern. - * - * ```js - * const picomatch = require('picomatch'); - * const state = picomatch.parse('*.js'); - * // picomatch.compileRe(state[, options]); - * - * console.log(picomatch.compileRe(state)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `state` The object returned from the `.parse` method. - * @param {Object} `options` - * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. - * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== 'string') { - throw new TypeError('Expected a non-empty string'); - } - - let parsed = { negated: false, fastpaths: true }; - - if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - parsed.output = parse.fastpaths(input, options); - } - - if (!parsed.output) { - parsed = parse(input, options); - } - - return picomatch.compileRe(parsed, options, returnOutput, returnState); -}; - -/** - * Create a regular expression from the given regex source string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.toRegex(source[, options]); - * - * const { output } = picomatch.parse('*.js'); - * console.log(picomatch.toRegex(output)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `source` Regular expression source string. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } -}; - -/** - * Picomatch constants. - * @return {Object} - */ - -picomatch.constants = constants; - -/** - * Expose "picomatch" - */ - -module.exports = picomatch; diff --git a/web/static/node_modules/picomatch/lib/scan.js b/web/static/node_modules/picomatch/lib/scan.js deleted file mode 100644 index e59cd7a1..00000000 --- a/web/static/node_modules/picomatch/lib/scan.js +++ /dev/null @@ -1,391 +0,0 @@ -'use strict'; - -const utils = require('./utils'); -const { - CHAR_ASTERISK, /* * */ - CHAR_AT, /* @ */ - CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_EXCLAMATION_MARK, /* ! */ - CHAR_FORWARD_SLASH, /* / */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_PLUS, /* + */ - CHAR_QUESTION_MARK, /* ? */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = require('./constants'); - -const isPathSeparator = code => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -}; - -const depth = token => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } -}; - -/** - * Quickly scans a glob pattern and returns an object with a handful of - * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), - * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not - * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). - * - * ```js - * const pm = require('picomatch'); - * console.log(pm.scan('foo/bar/*.js')); - * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {Object} Returns an object with tokens and regex source string. - * @api public - */ - -const scan = (input, options) => { - const opts = options || {}; - - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - - let str = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: '', depth: 0, isGlob: false }; - - const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str.charCodeAt(++index); - }; - - while (index < length) { - code = advance(); - let next; - - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: '', depth: 0, isGlob: false }; - - if (finished === true) continue; - if (prev === CHAR_DOT && index === (start + 1)) { - start += 2; - continue; - } - - lastIndex = index + 1; - continue; - } - - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS - || code === CHAR_AT - || code === CHAR_ASTERISK - || code === CHAR_QUESTION_MARK - || code === CHAR_EXCLAMATION_MARK; - - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - - if (code === CHAR_ASTERISK) { - if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_LEFT_SQUARE_BRACKET) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - - if (isGlob === true) { - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - } - - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - - let base = str; - let prefix = ''; - let glob = ''; - - if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); - lastIndex -= start; - } - - if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); - } else if (isGlob === true) { - base = ''; - glob = str; - } else { - base = str; - } - - if (base && base !== '' && base !== '/' && base !== str) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== '') { - parts.push(value); - } - prevIndex = i; - } - - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - - state.slashes = slashes; - state.parts = parts; - } - - return state; -}; - -module.exports = scan; diff --git a/web/static/node_modules/picomatch/lib/utils.js b/web/static/node_modules/picomatch/lib/utils.js deleted file mode 100644 index c3ca766a..00000000 --- a/web/static/node_modules/picomatch/lib/utils.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -const path = require('path'); -const win32 = process.platform === 'win32'; -const { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL -} = require('./constants'); - -exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); -exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); -exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); -exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); -exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); - -exports.removeBackslashes = str => { - return str.replace(REGEX_REMOVE_BACKSLASH, match => { - return match === '\\' ? '' : match; - }); -}; - -exports.supportsLookbehinds = () => { - const segs = process.version.slice(1).split('.').map(Number); - if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { - return true; - } - return false; -}; - -exports.isWindows = options => { - if (options && typeof options.windows === 'boolean') { - return options.windows; - } - return win32 === true || path.sep === '\\'; -}; - -exports.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; -}; - -exports.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith('./')) { - output = output.slice(2); - state.prefix = './'; - } - return output; -}; - -exports.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? '' : '^'; - const append = options.contains ? '' : '$'; - - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; -}; diff --git a/web/static/node_modules/picomatch/package.json b/web/static/node_modules/picomatch/package.json deleted file mode 100644 index 3db22d40..00000000 --- a/web/static/node_modules/picomatch/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "picomatch", - "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.", - "version": "2.3.1", - "homepage": "https://github.com/micromatch/picomatch", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "funding": "https://github.com/sponsors/jonschlinkert", - "repository": "micromatch/picomatch", - "bugs": { - "url": "https://github.com/micromatch/picomatch/issues" - }, - "license": "MIT", - "files": [ - "index.js", - "lib" - ], - "main": "index.js", - "engines": { - "node": ">=8.6" - }, - "scripts": { - "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", - "mocha": "mocha --reporter dot", - "test": "npm run lint && npm run mocha", - "test:ci": "npm run test:cover", - "test:cover": "nyc npm run mocha" - }, - "devDependencies": { - "eslint": "^6.8.0", - "fill-range": "^7.0.1", - "gulp-format-md": "^2.0.0", - "mocha": "^6.2.2", - "nyc": "^15.0.0", - "time-require": "github:jonschlinkert/time-require" - }, - "keywords": [ - "glob", - "match", - "picomatch" - ], - "nyc": { - "reporter": [ - "html", - "lcov", - "text-summary" - ] - }, - "verb": { - "toc": { - "render": true, - "method": "preWrite", - "maxdepth": 3 - }, - "layout": "empty", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "related": { - "list": [ - "braces", - "micromatch" - ] - }, - "reflinks": [ - "braces", - "expand-brackets", - "extglob", - "fill-range", - "micromatch", - "minimatch", - "nanomatch", - "picomatch" - ] - } -} diff --git a/web/static/node_modules/punycode/LICENSE-MIT.txt b/web/static/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7e..00000000 --- a/web/static/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/web/static/node_modules/punycode/README.md b/web/static/node_modules/punycode/README.md deleted file mode 100644 index f611016b..00000000 --- a/web/static/node_modules/punycode/README.md +++ /dev/null @@ -1,148 +0,0 @@ -# Punycode.js [![punycode on npm](https://img.shields.io/npm/v/punycode)](https://www.npmjs.com/package/punycode) [![](https://data.jsdelivr.com/v1/package/npm/punycode/badge)](https://www.jsdelivr.com/package/npm/punycode) - -Punycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891). - -This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: - -* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) -* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) -* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) -* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) -* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) - -This project was [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with Node.js from [v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) until [v7](https://github.com/nodejs/node/pull/7941) (soft-deprecated). - -This project provides a CommonJS module that uses ES2015+ features and JavaScript module, which work in modern Node.js versions and browsers. For the old Punycode.js version that offers the same functionality in a UMD build with support for older pre-ES2015 runtimes, including Rhino, Ringo, and Narwhal, see [v1.4.1](https://github.com/mathiasbynens/punycode.js/releases/tag/v1.4.1). - -## Installation - -Via [npm](https://www.npmjs.com/): - -```bash -npm install punycode --save -``` - -In [Node.js](https://nodejs.org/): - -> ⚠️ Note that userland modules don't hide core modules. -> For example, `require('punycode')` still imports the deprecated core module even if you executed `npm install punycode`. -> Use `require('punycode/')` to import userland modules rather than core modules. - -```js -const punycode = require('punycode/'); -``` - -## API - -### `punycode.decode(string)` - -Converts a Punycode string of ASCII symbols to a string of Unicode symbols. - -```js -// decode domain name parts -punycode.decode('maana-pta'); // 'mañana' -punycode.decode('--dqo34k'); // '☃-⌘' -``` - -### `punycode.encode(string)` - -Converts a string of Unicode symbols to a Punycode string of ASCII symbols. - -```js -// encode domain name parts -punycode.encode('mañana'); // 'maana-pta' -punycode.encode('☃-⌘'); // '--dqo34k' -``` - -### `punycode.toUnicode(input)` - -Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. - -```js -// decode domain names -punycode.toUnicode('xn--maana-pta.com'); -// → 'mañana.com' -punycode.toUnicode('xn----dqo34k.com'); -// → '☃-⌘.com' - -// decode email addresses -punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); -// → 'джумла@джpумлатест.bрфa' -``` - -### `punycode.toASCII(input)` - -Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. - -```js -// encode domain names -punycode.toASCII('mañana.com'); -// → 'xn--maana-pta.com' -punycode.toASCII('☃-⌘.com'); -// → 'xn----dqo34k.com' - -// encode email addresses -punycode.toASCII('джумла@джpумлатест.bрфa'); -// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' -``` - -### `punycode.ucs2` - -#### `punycode.ucs2.decode(string)` - -Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. - -```js -punycode.ucs2.decode('abc'); -// → [0x61, 0x62, 0x63] -// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: -punycode.ucs2.decode('\uD834\uDF06'); -// → [0x1D306] -``` - -#### `punycode.ucs2.encode(codePoints)` - -Creates a string based on an array of numeric code point values. - -```js -punycode.ucs2.encode([0x61, 0x62, 0x63]); -// → 'abc' -punycode.ucs2.encode([0x1D306]); -// → '\uD834\uDF06' -``` - -### `punycode.version` - -A string representing the current Punycode.js version number. - -## For maintainers - -### How to publish a new release - -1. On the `main` branch, bump the version number in `package.json`: - - ```sh - npm version patch -m 'Release v%s' - ``` - - Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). - - Note that this produces a Git commit + tag. - -1. Push the release commit and tag: - - ```sh - git push && git push --tags - ``` - - Our CI then automatically publishes the new release to npm, under both the [`punycode`](https://www.npmjs.com/package/punycode) and [`punycode.js`](https://www.npmjs.com/package/punycode.js) names. - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## License - -Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/web/static/node_modules/punycode/package.json b/web/static/node_modules/punycode/package.json deleted file mode 100644 index b8b76fc7..00000000 --- a/web/static/node_modules/punycode/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "punycode", - "version": "2.3.1", - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "homepage": "https://mths.be/punycode", - "main": "punycode.js", - "jsnext:main": "punycode.es6.js", - "module": "punycode.es6.js", - "engines": { - "node": ">=6" - }, - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/punycode.js.git" - }, - "bugs": "https://github.com/mathiasbynens/punycode.js/issues", - "files": [ - "LICENSE-MIT.txt", - "punycode.js", - "punycode.es6.js" - ], - "scripts": { - "test": "mocha tests", - "build": "node scripts/prepublish.js" - }, - "devDependencies": { - "codecov": "^3.8.3", - "nyc": "^15.1.0", - "mocha": "^10.2.0" - }, - "jspm": { - "map": { - "./punycode.js": { - "node": "@node/punycode" - } - } - } -} diff --git a/web/static/node_modules/punycode/punycode.es6.js b/web/static/node_modules/punycode/punycode.es6.js deleted file mode 100644 index dadece25..00000000 --- a/web/static/node_modules/punycode/punycode.es6.js +++ /dev/null @@ -1,444 +0,0 @@ -'use strict'; - -/** Highest positive signed 32-bit float value */ -const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -const base = 36; -const tMin = 1; -const tMax = 26; -const skew = 38; -const damp = 700; -const initialBias = 72; -const initialN = 128; // 0x80 -const delimiter = '-'; // '\x2D' - -/** Regular expressions */ -const regexPunycode = /^xn--/; -const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. -const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -const errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -const baseMinusTMin = base - tMin; -const floor = Math.floor; -const stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, callback) { - const result = []; - let length = array.length; - while (length--) { - result[length] = callback(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {String} A new string of characters returned by the callback - * function. - */ -function mapDomain(domain, callback) { - const parts = domain.split('@'); - let result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - domain = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - domain = domain.replace(regexSeparators, '\x2E'); - const labels = domain.split('.'); - const encoded = map(labels, callback).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - const output = []; - let counter = 0; - const length = string.length; - while (counter < length) { - const value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - const extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -const ucs2encode = codePoints => String.fromCodePoint(...codePoints); - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -const basicToDigit = function(codePoint) { - if (codePoint >= 0x30 && codePoint < 0x3A) { - return 26 + (codePoint - 0x30); - } - if (codePoint >= 0x41 && codePoint < 0x5B) { - return codePoint - 0x41; - } - if (codePoint >= 0x61 && codePoint < 0x7B) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -const digitToBasic = function(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -const adapt = function(delta, numPoints, firstTime) { - let k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -const decode = function(input) { - // Don't use UCS-2. - const output = []; - const inputLength = input.length; - let i = 0; - let n = initialN; - let bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - let basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (let j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - const oldi = i; - for (let w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - const digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base) { - error('invalid-input'); - } - if (digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - const baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - const out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - - } - - return String.fromCodePoint(...output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -const encode = function(input) { - const output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - const inputLength = input.length; - - // Initialize the state. - let n = initialN; - let delta = 0; - let bias = initialBias; - - // Handle the basic code points. - for (const currentValue of input) { - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - const basicLength = output.length; - let handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - let m = maxInt; - for (const currentValue of input) { - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - const handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (const currentValue of input) { - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - if (currentValue === n) { - // Represent delta as a generalized variable-length integer. - let q = delta; - for (let k = base; /* no condition */; k += base) { - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - const qMinusT = q - t; - const baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -const toUnicode = function(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -const toASCII = function(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -const punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.3.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -export { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode }; -export default punycode; diff --git a/web/static/node_modules/punycode/punycode.js b/web/static/node_modules/punycode/punycode.js deleted file mode 100644 index a1ef2519..00000000 --- a/web/static/node_modules/punycode/punycode.js +++ /dev/null @@ -1,443 +0,0 @@ -'use strict'; - -/** Highest positive signed 32-bit float value */ -const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -const base = 36; -const tMin = 1; -const tMax = 26; -const skew = 38; -const damp = 700; -const initialBias = 72; -const initialN = 128; // 0x80 -const delimiter = '-'; // '\x2D' - -/** Regular expressions */ -const regexPunycode = /^xn--/; -const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. -const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -const errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -const baseMinusTMin = base - tMin; -const floor = Math.floor; -const stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, callback) { - const result = []; - let length = array.length; - while (length--) { - result[length] = callback(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {String} A new string of characters returned by the callback - * function. - */ -function mapDomain(domain, callback) { - const parts = domain.split('@'); - let result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - domain = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - domain = domain.replace(regexSeparators, '\x2E'); - const labels = domain.split('.'); - const encoded = map(labels, callback).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - const output = []; - let counter = 0; - const length = string.length; - while (counter < length) { - const value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - const extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -const ucs2encode = codePoints => String.fromCodePoint(...codePoints); - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -const basicToDigit = function(codePoint) { - if (codePoint >= 0x30 && codePoint < 0x3A) { - return 26 + (codePoint - 0x30); - } - if (codePoint >= 0x41 && codePoint < 0x5B) { - return codePoint - 0x41; - } - if (codePoint >= 0x61 && codePoint < 0x7B) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -const digitToBasic = function(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -const adapt = function(delta, numPoints, firstTime) { - let k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -const decode = function(input) { - // Don't use UCS-2. - const output = []; - const inputLength = input.length; - let i = 0; - let n = initialN; - let bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - let basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (let j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - const oldi = i; - for (let w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - const digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base) { - error('invalid-input'); - } - if (digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - const baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - const out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - - } - - return String.fromCodePoint(...output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -const encode = function(input) { - const output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - const inputLength = input.length; - - // Initialize the state. - let n = initialN; - let delta = 0; - let bias = initialBias; - - // Handle the basic code points. - for (const currentValue of input) { - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - const basicLength = output.length; - let handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - let m = maxInt; - for (const currentValue of input) { - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - const handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (const currentValue of input) { - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - if (currentValue === n) { - // Represent delta as a generalized variable-length integer. - let q = delta; - for (let k = base; /* no condition */; k += base) { - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - const qMinusT = q - t; - const baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -const toUnicode = function(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -const toASCII = function(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -const punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.3.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -module.exports = punycode; diff --git a/web/static/node_modules/randombytes/.travis.yml b/web/static/node_modules/randombytes/.travis.yml deleted file mode 100644 index 69fdf713..00000000 --- a/web/static/node_modules/randombytes/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false -language: node_js -matrix: - include: - - node_js: '7' - env: TEST_SUITE=test - - node_js: '6' - env: TEST_SUITE=test - - node_js: '5' - env: TEST_SUITE=test - - node_js: '4' - env: TEST_SUITE=test - - node_js: '4' - env: TEST_SUITE=phantom -script: "npm run-script $TEST_SUITE" diff --git a/web/static/node_modules/randombytes/.zuul.yml b/web/static/node_modules/randombytes/.zuul.yml deleted file mode 100644 index 96d9cfbd..00000000 --- a/web/static/node_modules/randombytes/.zuul.yml +++ /dev/null @@ -1 +0,0 @@ -ui: tape diff --git a/web/static/node_modules/randombytes/LICENSE b/web/static/node_modules/randombytes/LICENSE deleted file mode 100644 index fea9d48a..00000000 --- a/web/static/node_modules/randombytes/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 crypto-browserify - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/randombytes/README.md b/web/static/node_modules/randombytes/README.md deleted file mode 100644 index 3bacba4d..00000000 --- a/web/static/node_modules/randombytes/README.md +++ /dev/null @@ -1,14 +0,0 @@ -randombytes -=== - -[![Version](http://img.shields.io/npm/v/randombytes.svg)](https://www.npmjs.org/package/randombytes) [![Build Status](https://travis-ci.org/crypto-browserify/randombytes.svg?branch=master)](https://travis-ci.org/crypto-browserify/randombytes) - -randombytes from node that works in the browser. In node you just get crypto.randomBytes, but in the browser it uses .crypto/msCrypto.getRandomValues - -```js -var randomBytes = require('randombytes'); -randomBytes(16);//get 16 random bytes -randomBytes(16, function (err, resp) { - // resp is 16 random bytes -}); -``` diff --git a/web/static/node_modules/randombytes/browser.js b/web/static/node_modules/randombytes/browser.js deleted file mode 100644 index 0fb0b715..00000000 --- a/web/static/node_modules/randombytes/browser.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict' - -// limit of Crypto.getRandomValues() -// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues -var MAX_BYTES = 65536 - -// Node supports requesting up to this number of bytes -// https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48 -var MAX_UINT32 = 4294967295 - -function oldBrowser () { - throw new Error('Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11') -} - -var Buffer = require('safe-buffer').Buffer -var crypto = global.crypto || global.msCrypto - -if (crypto && crypto.getRandomValues) { - module.exports = randomBytes -} else { - module.exports = oldBrowser -} - -function randomBytes (size, cb) { - // phantomjs needs to throw - if (size > MAX_UINT32) throw new RangeError('requested too many random bytes') - - var bytes = Buffer.allocUnsafe(size) - - if (size > 0) { // getRandomValues fails on IE if size == 0 - if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues - // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues - for (var generated = 0; generated < size; generated += MAX_BYTES) { - // buffer.slice automatically checks if the end is past the end of - // the buffer so we don't have to here - crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES)) - } - } else { - crypto.getRandomValues(bytes) - } - } - - if (typeof cb === 'function') { - return process.nextTick(function () { - cb(null, bytes) - }) - } - - return bytes -} diff --git a/web/static/node_modules/randombytes/index.js b/web/static/node_modules/randombytes/index.js deleted file mode 100644 index a2d9e391..00000000 --- a/web/static/node_modules/randombytes/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('crypto').randomBytes diff --git a/web/static/node_modules/randombytes/package.json b/web/static/node_modules/randombytes/package.json deleted file mode 100644 index 36236526..00000000 --- a/web/static/node_modules/randombytes/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "randombytes", - "version": "2.1.0", - "description": "random bytes from browserify stand alone", - "main": "index.js", - "scripts": { - "test": "standard && node test.js | tspec", - "phantom": "zuul --phantom -- test.js", - "local": "zuul --local --no-coverage -- test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:crypto-browserify/randombytes.git" - }, - "keywords": [ - "crypto", - "random" - ], - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/crypto-browserify/randombytes/issues" - }, - "homepage": "https://github.com/crypto-browserify/randombytes", - "browser": "browser.js", - "devDependencies": { - "phantomjs": "^1.9.9", - "standard": "^10.0.2", - "tap-spec": "^2.1.2", - "tape": "^4.6.3", - "zuul": "^3.7.2" - }, - "dependencies": { - "safe-buffer": "^5.1.0" - } -} diff --git a/web/static/node_modules/randombytes/test.js b/web/static/node_modules/randombytes/test.js deleted file mode 100644 index f2669769..00000000 --- a/web/static/node_modules/randombytes/test.js +++ /dev/null @@ -1,81 +0,0 @@ -var test = require('tape') -var randomBytes = require('./') -var MAX_BYTES = 65536 -var MAX_UINT32 = 4294967295 - -test('sync', function (t) { - t.plan(9) - t.equals(randomBytes(0).length, 0, 'len: ' + 0) - t.equals(randomBytes(3).length, 3, 'len: ' + 3) - t.equals(randomBytes(30).length, 30, 'len: ' + 30) - t.equals(randomBytes(300).length, 300, 'len: ' + 300) - t.equals(randomBytes(17 + MAX_BYTES).length, 17 + MAX_BYTES, 'len: ' + 17 + MAX_BYTES) - t.equals(randomBytes(MAX_BYTES * 100).length, MAX_BYTES * 100, 'len: ' + MAX_BYTES * 100) - t.throws(function () { - randomBytes(MAX_UINT32 + 1) - }) - t.throws(function () { - t.equals(randomBytes(-1)) - }) - t.throws(function () { - t.equals(randomBytes('hello')) - }) -}) - -test('async', function (t) { - t.plan(9) - - randomBytes(0, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 0, 'len: ' + 0) - }) - - randomBytes(3, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 3, 'len: ' + 3) - }) - - randomBytes(30, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 30, 'len: ' + 30) - }) - - randomBytes(300, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 300, 'len: ' + 300) - }) - - randomBytes(17 + MAX_BYTES, function (err, resp) { - if (err) throw err - - t.equals(resp.length, 17 + MAX_BYTES, 'len: ' + 17 + MAX_BYTES) - }) - - randomBytes(MAX_BYTES * 100, function (err, resp) { - if (err) throw err - - t.equals(resp.length, MAX_BYTES * 100, 'len: ' + MAX_BYTES * 100) - }) - - t.throws(function () { - randomBytes(MAX_UINT32 + 1, function () { - t.ok(false, 'should not get here') - }) - }) - - t.throws(function () { - randomBytes(-1, function () { - t.ok(false, 'should not get here') - }) - }) - - t.throws(function () { - randomBytes('hello', function () { - t.ok(false, 'should not get here') - }) - }) -}) diff --git a/web/static/node_modules/readdirp/LICENSE b/web/static/node_modules/readdirp/LICENSE deleted file mode 100644 index 037cbb4e..00000000 --- a/web/static/node_modules/readdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/readdirp/README.md b/web/static/node_modules/readdirp/README.md deleted file mode 100644 index 21437d04..00000000 --- a/web/static/node_modules/readdirp/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# readdirp [![Weekly downloads](https://img.shields.io/npm/dw/readdirp.svg)](https://github.com/paulmillr/readdirp) - -Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**. - -Supports both ESM and common.js. - -```sh -npm install readdirp -``` - -```javascript -// Use streams to achieve small RAM & CPU footprint. -// 1) Streams example with for-await. -import readdirp from 'readdirp'; -for await (const entry of readdirp('.')) { - const {path} = entry; - console.log(`${JSON.stringify({path})}`); -} - -// 2) Streams example, non for-await. -// Print out all JS files along with their size within the current folder & subfolders. -import readdirp from 'readdirp'; -readdirp('.', {alwaysStat: true, fileFilter: (f) => f.basename.endsWith('.js')}) - .on('data', (entry) => { - const {path, stats: {size}} = entry; - console.log(`${JSON.stringify({path, size})}`); - }) - // Optionally call stream.destroy() in `warn()` in order to abort and cause 'close' to be emitted - .on('warn', error => console.error('non-fatal error', error)) - .on('error', error => console.error('fatal error', error)) - .on('end', () => console.log('done')); - -// 3) Promise example. More RAM and CPU than streams / for-await. -import { readdirpPromise } from 'readdirp'; -const files = await readdirpPromise('.'); -console.log(files.map(file => file.path)); - -// Other options. -import readdirp from 'readdirp'; -readdirp('test', { - fileFilter: (f) => f.basename.endsWith('.js'), - directoryFilter: (d) => d.basename !== '.git', - // directoryFilter: (di) => di.basename.length === 9 - type: 'files_directories', - depth: 1 -}); -``` - -## API - -`const stream = readdirp(root[, options])` — **Stream API** - -- Reads given root recursively and returns a `stream` of [entry infos](#entryinfo) -- Optionally can be used like `for await (const entry of stream)` with node.js 10+ (`asyncIterator`). -- `on('data', (entry) => {})` [entry info](#entryinfo) for every file / dir. -- `on('warn', (error) => {})` non-fatal `Error` that prevents a file / dir from being processed. Example: inaccessible to the user. -- `on('error', (error) => {})` fatal `Error` which also ends the stream. Example: illegal options where passed. -- `on('end')` — we are done. Called when all entries were found and no more will be emitted. -- `on('close')` — stream is destroyed via `stream.destroy()`. - Could be useful if you want to manually abort even on a non fatal error. - At that point the stream is no longer `readable` and no more entries, warning or errors are emitted -- To learn more about streams, consult the very detailed [nodejs streams documentation](https://nodejs.org/api/stream.html) - or the [stream-handbook](https://github.com/substack/stream-handbook) - -`const entries = await readdirp.promise(root[, options])` — **Promise API**. Returns a list of [entry infos](#entryinfo). - -First argument is awalys `root`, path in which to start reading and recursing into subdirectories. - -### options - -- `fileFilter`: filter to include or exclude files - - **Function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry -- `directoryFilter`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into. -- `depth: 5`: depth at which to stop recursing even if more subdirectories are found -- `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes. -- `alwaysStat: false`: always return `stats` property for every file. Default is `false`, readdirp will return `Dirent` entries. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0. -- `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat` - -### `EntryInfo` - -Has the following properties: - -- `path: 'assets/javascripts/react.js'`: path to the file/directory (relative to given root) -- `fullPath: '/Users/dev/projects/app/assets/javascripts/react.js'`: full path to the file/directory found -- `basename: 'react.js'`: name of the file/directory -- `dirent: fs.Dirent`: built-in [dir entry object](https://nodejs.org/api/fs.html#fs_class_fs_dirent) - only with `alwaysStat: false` -- `stats: fs.Stats`: built in [stat object](https://nodejs.org/api/fs.html#fs_class_fs_stats) - only with `alwaysStat: true` - -## Changelog - -- 4.0 (Aug 25, 2024) rewritten in typescript, producing hybrid common.js / esm module. - - Remove glob support and all dependencies - - Make sure you're using `let {readdirp} = require('readdirp')` in common.js -- 3.5 (Oct 13, 2020) disallows recursive directory-based symlinks. - Before, it could have entered infinite loop. -- 3.4 (Mar 19, 2020) adds support for directory-based symlinks. -- 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping. -- 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic. -- 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions". -- 3.0 brings huge performance improvements and stream backpressure support. -- Upgrading 2.x to 3.x: - - Signature changed from `readdirp(options)` to `readdirp(root, options)` - - Replaced callback API with promise API. - - Renamed `entryType` option to `type` - - Renamed `entryType: 'both'` to `'files_directories'` - - `EntryInfo` - - Renamed `stat` to `stats` - - Emitted only when `alwaysStat: true` - - `dirent` is emitted instead of `stats` by default with `alwaysStat: false` - - Renamed `name` to `basename` - - Removed `parentDir` and `fullParentDir` properties -- Supported node.js versions: - - 4.x: node 14+ - - 3.x: node 8+ - - 2.x: node 0.6+ - -## License - -Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller () - -MIT License, see [LICENSE](LICENSE) file. diff --git a/web/static/node_modules/readdirp/esm/index.d.ts b/web/static/node_modules/readdirp/esm/index.d.ts deleted file mode 100644 index 89d28ed0..00000000 --- a/web/static/node_modules/readdirp/esm/index.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { Stats, Dirent } from 'fs'; -import { Readable } from 'stream'; -export type Path = string; -export interface EntryInfo { - path: string; - fullPath: string; - stats?: Stats; - dirent?: Dirent; - basename: string; -} -export type PathOrDirent = Dirent | Path; -export type Tester = (path: EntryInfo) => boolean; -export type Predicate = string[] | string | Tester; -declare function defaultOptions(): { - root: string; - fileFilter: (_path: EntryInfo) => boolean; - directoryFilter: (_path: EntryInfo) => boolean; - type: string; - lstat: boolean; - depth: number; - alwaysStat: boolean; - highWaterMark: number; -}; -export type ReaddirpOptions = ReturnType; -export interface DirEntry { - files: PathOrDirent[]; - depth: number; - path: Path; -} -export declare class ReaddirpStream extends Readable { - parents: any[]; - reading: boolean; - parent?: DirEntry; - _stat: Function; - _maxDepth: number; - _wantsDir: boolean; - _wantsFile: boolean; - _wantsEverything: boolean; - _root: Path; - _isDirent: boolean; - _statsProp: 'dirent' | 'stats'; - _rdOptions: { - encoding: 'utf8'; - withFileTypes: boolean; - }; - _fileFilter: Tester; - _directoryFilter: Tester; - constructor(options?: Partial); - _read(batch: number): Promise; - _exploreDir(path: Path, depth: number): Promise<{ - files: string[] | undefined; - depth: number; - path: string; - }>; - _formatEntry(dirent: PathOrDirent, path: Path): Promise; - _onError(err: Error): void; - _getEntryType(entry: EntryInfo): Promise; - _includeAsFile(entry: EntryInfo): boolean | undefined; -} -/** - * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. - * @param root Root directory - * @param options Options to specify root (start directory), filters and recursion depth - */ -export declare const readdirp: (root: Path, options?: Partial) => ReaddirpStream; -export declare const readdirpPromise: (root: Path, options?: Partial) => Promise; -export default readdirp; diff --git a/web/static/node_modules/readdirp/esm/index.js b/web/static/node_modules/readdirp/esm/index.js deleted file mode 100644 index 819dc3a2..00000000 --- a/web/static/node_modules/readdirp/esm/index.js +++ /dev/null @@ -1,238 +0,0 @@ -import { stat, lstat, readdir, realpath } from 'fs/promises'; -import { Readable } from 'stream'; -import { resolve as pathResolve, relative as pathRelative, join as pathJoin, sep as pathSep, } from 'path'; -function defaultOptions() { - return { - root: '.', - fileFilter: (_path) => true, - directoryFilter: (_path) => true, - type: FILE_TYPE, - lstat: false, - depth: 2147483648, - alwaysStat: false, - highWaterMark: 4096, - }; -} -const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR'; -const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]); -const FILE_TYPE = 'files'; -const DIR_TYPE = 'directories'; -const FILE_DIR_TYPE = 'files_directories'; -const EVERYTHING_TYPE = 'all'; -const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]; -const DIR_TYPES = new Set([DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]); -const FILE_TYPES = new Set([FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]); -const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code); -const wantBigintFsStats = process.platform === 'win32'; -const emptyFn = (_path) => true; -const normalizeFilter = (filter) => { - if (filter === undefined) - return emptyFn; - if (typeof filter === 'function') - return filter; - if (typeof filter === 'string') { - const fl = filter.trim(); - return (entry) => entry.basename === fl; - } - if (Array.isArray(filter)) { - const trItems = filter.map((item) => item.trim()); - return (entry) => trItems.some((f) => entry.basename === f); - } - return emptyFn; -}; -export class ReaddirpStream extends Readable { - constructor(options = {}) { - super({ - objectMode: true, - autoDestroy: true, - highWaterMark: options.highWaterMark, - }); - const opts = { ...defaultOptions(), ...options }; - const { root, type } = opts; - this._fileFilter = normalizeFilter(opts.fileFilter); - this._directoryFilter = normalizeFilter(opts.directoryFilter); - const statMethod = opts.lstat ? lstat : stat; - // Use bigint stats if it's windows and stat() supports options (node 10+). - if (wantBigintFsStats) { - this._stat = (path) => statMethod(path, { bigint: true }); - } - else { - this._stat = statMethod; - } - this._maxDepth = opts.depth; - this._wantsDir = DIR_TYPES.has(type); - this._wantsFile = FILE_TYPES.has(type); - this._wantsEverything = type === EVERYTHING_TYPE; - this._root = pathResolve(root); - this._isDirent = !opts.alwaysStat; - this._statsProp = this._isDirent ? 'dirent' : 'stats'; - this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; - // Launch stream with one parent, the root dir. - this.parents = [this._exploreDir(root, 1)]; - this.reading = false; - this.parent = undefined; - } - async _read(batch) { - if (this.reading) - return; - this.reading = true; - try { - while (!this.destroyed && batch > 0) { - const par = this.parent; - const fil = par && par.files; - if (fil && fil.length > 0) { - const { path, depth } = par; - const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path)); - const awaited = await Promise.all(slice); - for (const entry of awaited) { - if (!entry) { - batch--; - return; - } - if (this.destroyed) - return; - const entryType = await this._getEntryType(entry); - if (entryType === 'directory' && this._directoryFilter(entry)) { - if (depth <= this._maxDepth) { - this.parents.push(this._exploreDir(entry.fullPath, depth + 1)); - } - if (this._wantsDir) { - this.push(entry); - batch--; - } - } - else if ((entryType === 'file' || this._includeAsFile(entry)) && - this._fileFilter(entry)) { - if (this._wantsFile) { - this.push(entry); - batch--; - } - } - } - } - else { - const parent = this.parents.pop(); - if (!parent) { - this.push(null); - break; - } - this.parent = await parent; - if (this.destroyed) - return; - } - } - } - catch (error) { - this.destroy(error); - } - finally { - this.reading = false; - } - } - async _exploreDir(path, depth) { - let files; - try { - files = await readdir(path, this._rdOptions); - } - catch (error) { - this._onError(error); - } - return { files, depth, path }; - } - async _formatEntry(dirent, path) { - let entry; - const basename = this._isDirent ? dirent.name : dirent; - try { - const fullPath = pathResolve(pathJoin(path, basename)); - entry = { path: pathRelative(this._root, fullPath), fullPath, basename }; - entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath); - } - catch (err) { - this._onError(err); - return; - } - return entry; - } - _onError(err) { - if (isNormalFlowError(err) && !this.destroyed) { - this.emit('warn', err); - } - else { - this.destroy(err); - } - } - async _getEntryType(entry) { - // entry may be undefined, because a warning or an error were emitted - // and the statsProp is undefined - if (!entry && this._statsProp in entry) { - return ''; - } - const stats = entry[this._statsProp]; - if (stats.isFile()) - return 'file'; - if (stats.isDirectory()) - return 'directory'; - if (stats && stats.isSymbolicLink()) { - const full = entry.fullPath; - try { - const entryRealPath = await realpath(full); - const entryRealPathStats = await lstat(entryRealPath); - if (entryRealPathStats.isFile()) { - return 'file'; - } - if (entryRealPathStats.isDirectory()) { - const len = entryRealPath.length; - if (full.startsWith(entryRealPath) && full.substr(len, 1) === pathSep) { - const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`); - // @ts-ignore - recursiveError.code = RECURSIVE_ERROR_CODE; - return this._onError(recursiveError); - } - return 'directory'; - } - } - catch (error) { - this._onError(error); - return ''; - } - } - } - _includeAsFile(entry) { - const stats = entry && entry[this._statsProp]; - return stats && this._wantsEverything && !stats.isDirectory(); - } -} -/** - * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. - * @param root Root directory - * @param options Options to specify root (start directory), filters and recursion depth - */ -export const readdirp = (root, options = {}) => { - // @ts-ignore - let type = options.entryType || options.type; - if (type === 'both') - type = FILE_DIR_TYPE; // backwards-compatibility - if (type) - options.type = type; - if (!root) { - throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)'); - } - else if (typeof root !== 'string') { - throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)'); - } - else if (type && !ALL_TYPES.includes(type)) { - throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`); - } - options.root = root; - return new ReaddirpStream(options); -}; -export const readdirpPromise = (root, options = {}) => { - return new Promise((resolve, reject) => { - const files = []; - readdirp(root, options) - .on('data', (entry) => files.push(entry)) - .on('end', () => resolve(files)) - .on('error', (error) => reject(error)); - }); -}; -export default readdirp; diff --git a/web/static/node_modules/readdirp/esm/package.json b/web/static/node_modules/readdirp/esm/package.json deleted file mode 100644 index 87696418..00000000 --- a/web/static/node_modules/readdirp/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{ "type": "module", "sideEffects": false } diff --git a/web/static/node_modules/readdirp/index.d.ts b/web/static/node_modules/readdirp/index.d.ts deleted file mode 100644 index 89d28ed0..00000000 --- a/web/static/node_modules/readdirp/index.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { Stats, Dirent } from 'fs'; -import { Readable } from 'stream'; -export type Path = string; -export interface EntryInfo { - path: string; - fullPath: string; - stats?: Stats; - dirent?: Dirent; - basename: string; -} -export type PathOrDirent = Dirent | Path; -export type Tester = (path: EntryInfo) => boolean; -export type Predicate = string[] | string | Tester; -declare function defaultOptions(): { - root: string; - fileFilter: (_path: EntryInfo) => boolean; - directoryFilter: (_path: EntryInfo) => boolean; - type: string; - lstat: boolean; - depth: number; - alwaysStat: boolean; - highWaterMark: number; -}; -export type ReaddirpOptions = ReturnType; -export interface DirEntry { - files: PathOrDirent[]; - depth: number; - path: Path; -} -export declare class ReaddirpStream extends Readable { - parents: any[]; - reading: boolean; - parent?: DirEntry; - _stat: Function; - _maxDepth: number; - _wantsDir: boolean; - _wantsFile: boolean; - _wantsEverything: boolean; - _root: Path; - _isDirent: boolean; - _statsProp: 'dirent' | 'stats'; - _rdOptions: { - encoding: 'utf8'; - withFileTypes: boolean; - }; - _fileFilter: Tester; - _directoryFilter: Tester; - constructor(options?: Partial); - _read(batch: number): Promise; - _exploreDir(path: Path, depth: number): Promise<{ - files: string[] | undefined; - depth: number; - path: string; - }>; - _formatEntry(dirent: PathOrDirent, path: Path): Promise; - _onError(err: Error): void; - _getEntryType(entry: EntryInfo): Promise; - _includeAsFile(entry: EntryInfo): boolean | undefined; -} -/** - * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. - * @param root Root directory - * @param options Options to specify root (start directory), filters and recursion depth - */ -export declare const readdirp: (root: Path, options?: Partial) => ReaddirpStream; -export declare const readdirpPromise: (root: Path, options?: Partial) => Promise; -export default readdirp; diff --git a/web/static/node_modules/readdirp/index.js b/web/static/node_modules/readdirp/index.js deleted file mode 100644 index 0e21bbd4..00000000 --- a/web/static/node_modules/readdirp/index.js +++ /dev/null @@ -1,244 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readdirpPromise = exports.readdirp = exports.ReaddirpStream = void 0; -const promises_1 = require("fs/promises"); -const stream_1 = require("stream"); -const path_1 = require("path"); -function defaultOptions() { - return { - root: '.', - fileFilter: (_path) => true, - directoryFilter: (_path) => true, - type: FILE_TYPE, - lstat: false, - depth: 2147483648, - alwaysStat: false, - highWaterMark: 4096, - }; -} -const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR'; -const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]); -const FILE_TYPE = 'files'; -const DIR_TYPE = 'directories'; -const FILE_DIR_TYPE = 'files_directories'; -const EVERYTHING_TYPE = 'all'; -const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]; -const DIR_TYPES = new Set([DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]); -const FILE_TYPES = new Set([FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]); -const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code); -const wantBigintFsStats = process.platform === 'win32'; -const emptyFn = (_path) => true; -const normalizeFilter = (filter) => { - if (filter === undefined) - return emptyFn; - if (typeof filter === 'function') - return filter; - if (typeof filter === 'string') { - const fl = filter.trim(); - return (entry) => entry.basename === fl; - } - if (Array.isArray(filter)) { - const trItems = filter.map((item) => item.trim()); - return (entry) => trItems.some((f) => entry.basename === f); - } - return emptyFn; -}; -class ReaddirpStream extends stream_1.Readable { - constructor(options = {}) { - super({ - objectMode: true, - autoDestroy: true, - highWaterMark: options.highWaterMark, - }); - const opts = { ...defaultOptions(), ...options }; - const { root, type } = opts; - this._fileFilter = normalizeFilter(opts.fileFilter); - this._directoryFilter = normalizeFilter(opts.directoryFilter); - const statMethod = opts.lstat ? promises_1.lstat : promises_1.stat; - // Use bigint stats if it's windows and stat() supports options (node 10+). - if (wantBigintFsStats) { - this._stat = (path) => statMethod(path, { bigint: true }); - } - else { - this._stat = statMethod; - } - this._maxDepth = opts.depth; - this._wantsDir = DIR_TYPES.has(type); - this._wantsFile = FILE_TYPES.has(type); - this._wantsEverything = type === EVERYTHING_TYPE; - this._root = (0, path_1.resolve)(root); - this._isDirent = !opts.alwaysStat; - this._statsProp = this._isDirent ? 'dirent' : 'stats'; - this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; - // Launch stream with one parent, the root dir. - this.parents = [this._exploreDir(root, 1)]; - this.reading = false; - this.parent = undefined; - } - async _read(batch) { - if (this.reading) - return; - this.reading = true; - try { - while (!this.destroyed && batch > 0) { - const par = this.parent; - const fil = par && par.files; - if (fil && fil.length > 0) { - const { path, depth } = par; - const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path)); - const awaited = await Promise.all(slice); - for (const entry of awaited) { - if (!entry) { - batch--; - return; - } - if (this.destroyed) - return; - const entryType = await this._getEntryType(entry); - if (entryType === 'directory' && this._directoryFilter(entry)) { - if (depth <= this._maxDepth) { - this.parents.push(this._exploreDir(entry.fullPath, depth + 1)); - } - if (this._wantsDir) { - this.push(entry); - batch--; - } - } - else if ((entryType === 'file' || this._includeAsFile(entry)) && - this._fileFilter(entry)) { - if (this._wantsFile) { - this.push(entry); - batch--; - } - } - } - } - else { - const parent = this.parents.pop(); - if (!parent) { - this.push(null); - break; - } - this.parent = await parent; - if (this.destroyed) - return; - } - } - } - catch (error) { - this.destroy(error); - } - finally { - this.reading = false; - } - } - async _exploreDir(path, depth) { - let files; - try { - files = await (0, promises_1.readdir)(path, this._rdOptions); - } - catch (error) { - this._onError(error); - } - return { files, depth, path }; - } - async _formatEntry(dirent, path) { - let entry; - const basename = this._isDirent ? dirent.name : dirent; - try { - const fullPath = (0, path_1.resolve)((0, path_1.join)(path, basename)); - entry = { path: (0, path_1.relative)(this._root, fullPath), fullPath, basename }; - entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath); - } - catch (err) { - this._onError(err); - return; - } - return entry; - } - _onError(err) { - if (isNormalFlowError(err) && !this.destroyed) { - this.emit('warn', err); - } - else { - this.destroy(err); - } - } - async _getEntryType(entry) { - // entry may be undefined, because a warning or an error were emitted - // and the statsProp is undefined - if (!entry && this._statsProp in entry) { - return ''; - } - const stats = entry[this._statsProp]; - if (stats.isFile()) - return 'file'; - if (stats.isDirectory()) - return 'directory'; - if (stats && stats.isSymbolicLink()) { - const full = entry.fullPath; - try { - const entryRealPath = await (0, promises_1.realpath)(full); - const entryRealPathStats = await (0, promises_1.lstat)(entryRealPath); - if (entryRealPathStats.isFile()) { - return 'file'; - } - if (entryRealPathStats.isDirectory()) { - const len = entryRealPath.length; - if (full.startsWith(entryRealPath) && full.substr(len, 1) === path_1.sep) { - const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`); - // @ts-ignore - recursiveError.code = RECURSIVE_ERROR_CODE; - return this._onError(recursiveError); - } - return 'directory'; - } - } - catch (error) { - this._onError(error); - return ''; - } - } - } - _includeAsFile(entry) { - const stats = entry && entry[this._statsProp]; - return stats && this._wantsEverything && !stats.isDirectory(); - } -} -exports.ReaddirpStream = ReaddirpStream; -/** - * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. - * @param root Root directory - * @param options Options to specify root (start directory), filters and recursion depth - */ -const readdirp = (root, options = {}) => { - // @ts-ignore - let type = options.entryType || options.type; - if (type === 'both') - type = FILE_DIR_TYPE; // backwards-compatibility - if (type) - options.type = type; - if (!root) { - throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)'); - } - else if (typeof root !== 'string') { - throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)'); - } - else if (type && !ALL_TYPES.includes(type)) { - throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`); - } - options.root = root; - return new ReaddirpStream(options); -}; -exports.readdirp = readdirp; -const readdirpPromise = (root, options = {}) => { - return new Promise((resolve, reject) => { - const files = []; - (0, exports.readdirp)(root, options) - .on('data', (entry) => files.push(entry)) - .on('end', () => resolve(files)) - .on('error', (error) => reject(error)); - }); -}; -exports.readdirpPromise = readdirpPromise; -exports.default = exports.readdirp; diff --git a/web/static/node_modules/readdirp/package.json b/web/static/node_modules/readdirp/package.json deleted file mode 100644 index 1ad725bd..00000000 --- a/web/static/node_modules/readdirp/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "readdirp", - "description": "Recursive version of fs.readdir with streaming API.", - "version": "4.0.2", - "homepage": "https://github.com/paulmillr/readdirp", - "repository": { - "type": "git", - "url": "git://github.com/paulmillr/readdirp.git" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/paulmillr/readdirp/issues" - }, - "author": "Thorsten Lorenz (thlorenz.com)", - "contributors": [ - "Thorsten Lorenz (thlorenz.com)", - "Paul Miller (https://paulmillr.com)" - ], - "engines": { - "node": ">= 14.16.0" - }, - "files": [ - "index.js", - "index.d.ts", - "index.d.ts.map", - "index.js.map", - "esm" - ], - "main": "./index.js", - "module": "./esm/index.js", - "types": "./index.d.ts", - "exports": { - ".": { - "import": "./esm/index.js", - "require": "./index.js" - } - }, - "sideEffects": false, - "keywords": [ - "recursive", - "fs", - "stream", - "streams", - "readdir", - "filesystem", - "find", - "filter" - ], - "scripts": { - "build": "tsc && tsc -p tsconfig.esm.json", - "nyc": "nyc", - "mocha": "mocha --exit", - "lint": "prettier --check index.ts", - "format": "prettier --write index.ts", - "test": "nyc npm run mocha" - }, - "devDependencies": { - "@paulmillr/jsbt": "0.2.1", - "@types/node": "20.14.8", - "chai": "4.3.4", - "chai-subset": "1.6.0", - "mocha": "10.7.3", - "nyc": "15.0.1", - "prettier": "3.1.1", - "rimraf": "6.0.1", - "typescript": "5.5.2" - }, - "nyc": { - "reporter": [ - "html", - "text" - ] - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } -} diff --git a/web/static/node_modules/safe-buffer/LICENSE b/web/static/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/web/static/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/web/static/node_modules/safe-buffer/README.md b/web/static/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81afd..00000000 --- a/web/static/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/web/static/node_modules/safe-buffer/index.d.ts b/web/static/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed809..00000000 --- a/web/static/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/web/static/node_modules/safe-buffer/index.js b/web/static/node_modules/safe-buffer/index.js deleted file mode 100644 index f8d3ec98..00000000 --- a/web/static/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,65 +0,0 @@ -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.prototype = Object.create(Buffer.prototype) - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/web/static/node_modules/safe-buffer/package.json b/web/static/node_modules/safe-buffer/package.json deleted file mode 100644 index f2869e25..00000000 --- a/web/static/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "safe-buffer", - "description": "Safer Node.js Buffer API", - "version": "5.2.1", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "devDependencies": { - "standard": "*", - "tape": "^5.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/web/static/node_modules/sass/LICENSE b/web/static/node_modules/sass/LICENSE deleted file mode 100644 index be5cee61..00000000 --- a/web/static/node_modules/sass/LICENSE +++ /dev/null @@ -1,1726 +0,0 @@ -Dart Sass license: - -Copyright (c) 2016, Google Inc. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------------------------------------------------------------------- - -Dart SDK license: - -Copyright 2012, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -_fe_analyzer_shared license: - -Copyright 2019, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -_macros and macros license: - -Copyright 2024, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -analyzer, protobuf and protoc_plugin license: - -Copyright 2013, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -archive license: - -The MIT License - -Copyright (c) 2013-2021 Brendan Duncan. -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - --------------------------------------------------------------------------------- - -args, csslib and logging license: - -Copyright 2013, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -async, cli_util, collection, mime, stream_channel and typed_data license: - -Copyright 2015, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -boolean_selector, meta and shelf_packages_handler license: - -Copyright 2016, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -charcode license: - -Copyright 2014, the Dart project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -checked_yaml license: - -Copyright 2019, the Dart project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -cli_pkg license: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - --------------------------------------------------------------------------------- - -cli_repl license: - -Copyright (c) 2018, Jennifer Thakar. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the project nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -convert, crypto, shelf_static, source_map_stack_trace and vm_service license: - -Copyright 2015, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -coverage, dart_style, dartdoc, glob, http, http_parser, matcher, path, pool, -pub_semver, source_span, string_scanner, test and watcher license: - -Copyright 2014, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -dart_mappable and type_plus license: - -MIT License - -Copyright (c) 2021 Kilian Schulte - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- - -ffi and package_config license: - -Copyright 2019, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -file license: - -Copyright 2017, the Dart project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------------- - -fixnum, http_multi_server, oauth2, shelf, shelf_web_socket, source_maps and -stack_trace license: - -Copyright 2014, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -frontend_server_client license: - -Copyright 2020, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -grinder and webkit_inspection_protocol license: - -Copyright 2013, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -html license: - -Copyright (c) 2006-2012 The Authors - -Contributors: -James Graham - jg307@cam.ac.uk -Anne van Kesteren - annevankesteren@gmail.com -Lachlan Hunt - lachlan.hunt@lachy.id.au -Matt McDonald - kanashii@kanashii.ca -Sam Ruby - rubys@intertwingly.net -Ian Hickson (Google) - ian@hixie.ch -Thomas Broyer - t.broyer@ltgt.net -Jacques Distler - distler@golem.ph.utexas.edu -Henri Sivonen - hsivonen@iki.fi -Adam Barth - abarth@webkit.org -Eric Seidel - eric@webkit.org -The Mozilla Foundation (contributions from Henri Sivonen since 2008) -David Flanagan (Mozilla) - dflanagan@mozilla.com -Google LLC (contributed the Dart port) - misc@dartlang.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------------------------------------------------------------------- - -io, stream_transform and term_glyph license: - -Copyright 2017, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -js license: - -Copyright 2012, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -json_annotation license: - -Copyright 2017, the Dart project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -lints license: - -Copyright 2021, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -markdown license: - -Copyright 2012, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -native_stack_traces license: - -Copyright 2020, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -native_synchronization license: - -Copyright 2023, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -node_interop license: - -Copyright (c) 2017, Anatoly Pulyaevskiy. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -node_preamble license: - -The MIT License (MIT) - -Copyright (c) 2015 Michael Bullington - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -=== - -Copyright 2012, the Dart project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -petitparser and xml license: - -The MIT License - -Copyright (c) 2006-2023 Lukas Renggli. -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - --------------------------------------------------------------------------------- - -pub_api_client license: - -MIT License - -Copyright (c) 2020 Leo Farias - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - --------------------------------------------------------------------------------- - -pubspec license: - -Copyright (c) 2015, Anders Holmgren. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -pubspec_parse license: - -Copyright 2018, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -quiver and retry license: - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --------------------------------------------------------------------------------- - -test_api and test_core license: - -Copyright 2018, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -test_descriptor and web_socket_channel license: - -Copyright 2016, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -test_process license: - -Copyright 2017, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -uri license: - -Copyright 2013, the Dart project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -web license: - -Copyright 2023, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -web_socket license: - -Copyright 2024, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------------------------------------------------------------------- - -yaml license: - -Copyright (c) 2014, the Dart project authors. -Copyright (c) 2006, Kirill Simonov. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web/static/node_modules/sass/README.md b/web/static/node_modules/sass/README.md deleted file mode 100644 index c7ad5914..00000000 --- a/web/static/node_modules/sass/README.md +++ /dev/null @@ -1,173 +0,0 @@ -A pure JavaScript implementation of [Sass][sass]. **Sass makes CSS fun again**. - - - - - - - -
    - Sass logo - - npm statistics - - GitHub actions build status -
    - Appveyor build status -
    - -[sass]: https://sass-lang.com/ - -This package is a distribution of [Dart Sass][], compiled to pure JavaScript -with no native code or external dependencies. It provides a command-line `sass` -executable and a Node.js API. - -[Dart Sass]: https://github.com/sass/dart-sass - -* [Usage](#usage) -* [See Also](#see-also) -* [Behavioral Differences from Ruby Sass](#behavioral-differences-from-ruby-sass) - -## Usage - -You can install Sass globally using `npm install -g sass` which will provide -access to the `sass` executable. You can also add it to your project using -`npm install --save-dev sass`. This provides the executable as well as a -library: - -[npm]: https://www.npmjs.com/package/sass - -```js -const sass = require('sass'); - -const result = sass.compile(scssFilename); - -// OR - -// Note that `compileAsync()` is substantially slower than `compile()`. -const result = await sass.compileAsync(scssFilename); -``` - -See [the Sass website][js api] for full API documentation. - -[js api]: https://sass-lang.com/documentation/js-api - -### Legacy API - -Dart Sass also supports an older JavaScript API that's fully compatible with -[Node Sass] (with a few exceptions listed below), with support for both the -[`render()`] and [`renderSync()`] functions. This API is considered deprecated -and will be removed in Dart Sass 2.0.0, so it should be avoided in new projects. - -[Node Sass]: https://github.com/sass/node-sass -[`render()`]: https://sass-lang.com/documentation/js-api/functions/render -[`renderSync()`]: https://sass-lang.com/documentation/js-api/functions/renderSync - -Sass's support for the legacy JavaScript API has the following limitations: - -* Only the `"expanded"` and `"compressed"` values of [`outputStyle`] are - supported. - -* Dart Sass doesn't support the [`precision`] option. Dart Sass defaults to a - sufficiently high precision for all existing browsers, and making this - customizable would make the code substantially less efficient. - -* Dart Sass doesn't support the [`sourceComments`] option. Source maps are the - recommended way of locating the origin of generated selectors. - -[`outputStyle`]: https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions#outputStyle -[`precision`]: https://github.com/sass/node-sass#precision -[`sourceComments`]: https://github.com/sass/node-sass#sourcecomments - -## See Also - -* [Dart Sass][], from which this package is compiled, can be used either as a - stand-alone executable or as a Dart library. Running Dart Sass on the Dart VM - is substantially faster than running the pure JavaScript version, so this may - be appropriate for performance-sensitive applications. The Dart API is also - (currently) more user-friendly than the JavaScript API. See - [the Dart Sass README][Using Dart Sass] for details on how to use it. - -* [Node Sass][], which is a wrapper around [LibSass][], the C++ implementation - of Sass. Node Sass supports the same API as this package and is also faster - (although it's usually a little slower than Dart Sass). However, it requires a - native library which may be difficult to install, and it's generally slower to - add features and fix bugs. - -[Using Dart Sass]: https://github.com/sass/dart-sass#using-dart-sass -[Node Sass]: https://www.npmjs.com/package/node-sass -[LibSass]: https://sass-lang.com/libsass - -## Behavioral Differences from Ruby Sass - -There are a few intentional behavioral differences between Dart Sass and Ruby -Sass. These are generally places where Ruby Sass has an undesired behavior, and -it's substantially easier to implement the correct behavior than it would be to -implement compatible behavior. These should all have tracking bugs against Ruby -Sass to update the reference behavior. - -1. `@extend` only accepts simple selectors, as does the second argument of - `selector-extend()`. See [issue 1599][]. - -2. Subject selectors are not supported. See [issue 1126][]. - -3. Pseudo selector arguments are parsed as ``s rather than - having a more limited custom parsing. See [issue 2120][]. - -4. The numeric precision is set to 10. See [issue 1122][]. - -5. The indented syntax parser is more flexible: it doesn't require consistent - indentation across the whole document. See [issue 2176][]. - -6. Colors do not support channel-by-channel arithmetic. See [issue 2144][]. - -7. Unitless numbers aren't `==` to unit numbers with the same value. In - addition, map keys follow the same logic as `==`-equality. See - [issue 1496][]. - -8. `rgba()` and `hsla()` alpha values with percentage units are interpreted as - percentages. Other units are forbidden. See [issue 1525][]. - -9. Too many variable arguments passed to a function is an error. See - [issue 1408][]. - -10. Allow `@extend` to reach outside a media query if there's an identical - `@extend` defined outside that query. This isn't tracked explicitly, because - it'll be irrelevant when [issue 1050][] is fixed. - -11. Some selector pseudos containing placeholder selectors will be compiled - where they wouldn't be in Ruby Sass. This better matches the semantics of - the selectors in question, and is more efficient. See [issue 2228][]. - -12. The old-style `:property value` syntax is not supported in the indented - syntax. See [issue 2245][]. - -13. The reference combinator is not supported. See [issue 303][]. - -14. Universal selector unification is symmetrical. See [issue 2247][]. - -15. `@extend` doesn't produce an error if it matches but fails to unify. See - [issue 2250][]. - -16. Dart Sass currently only supports UTF-8 documents. We'd like to support - more, but Dart currently doesn't support them. See [dart-lang/sdk#11744][], - for example. - -[issue 1599]: https://github.com/sass/sass/issues/1599 -[issue 1126]: https://github.com/sass/sass/issues/1126 -[issue 2120]: https://github.com/sass/sass/issues/2120 -[issue 1122]: https://github.com/sass/sass/issues/1122 -[issue 2176]: https://github.com/sass/sass/issues/2176 -[issue 2144]: https://github.com/sass/sass/issues/2144 -[issue 1496]: https://github.com/sass/sass/issues/1496 -[issue 1525]: https://github.com/sass/sass/issues/1525 -[issue 1408]: https://github.com/sass/sass/issues/1408 -[issue 1050]: https://github.com/sass/sass/issues/1050 -[issue 2228]: https://github.com/sass/sass/issues/2228 -[issue 2245]: https://github.com/sass/sass/issues/2245 -[issue 303]: https://github.com/sass/sass/issues/303 -[issue 2247]: https://github.com/sass/sass/issues/2247 -[issue 2250]: https://github.com/sass/sass/issues/2250 -[dart-lang/sdk#11744]: https://github.com/dart-lang/sdk/issues/11744 - -Disclaimer: this is not an official Google product. diff --git a/web/static/node_modules/sass/package.json b/web/static/node_modules/sass/package.json deleted file mode 100644 index 75b3570f..00000000 --- a/web/static/node_modules/sass/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"sass","description":"A pure JavaScript implementation of Sass.","license":"MIT","bugs":"https://github.com/sass/dart-sass/issues","homepage":"https://github.com/sass/dart-sass","repository":{"type":"git","url":"https://github.com/sass/dart-sass"},"author":{"name":"Natalie Weizenbaum","email":"nweiz@google.com","url":"https://github.com/nex3"},"engines":{"node":">=14.0.0"},"dependencies":{"chokidar":"^4.0.0","immutable":"^5.0.2","source-map-js":">=0.6.2 <2.0.0"},"optionalDependencies":{"@parcel/watcher":"^2.4.1"},"keywords":["style","scss","sass","preprocessor","css"],"types":"types/index.d.ts","exports":{"types":"./types/index.d.ts","node":{"require":"./sass.node.js","default":"./sass.node.mjs"},"default":{"require":"./sass.default.cjs","default":"./sass.default.js"}},"version":"1.81.0","bin":{"sass":"sass.js"},"main":"sass.node.js"} \ No newline at end of file diff --git a/web/static/node_modules/sass/sass.dart.js b/web/static/node_modules/sass/sass.dart.js deleted file mode 100644 index 190dc851..00000000 --- a/web/static/node_modules/sass/sass.dart.js +++ /dev/null @@ -1,127021 +0,0 @@ -// Because of vitejs/vite#12340, there's no way to reliably detect whether we're -// running as a (possibly bundled/polyfilled) ESM module or as a CommonJS -// module. In order to work everywhere, we have to provide the load function via -// a side channel on the global object. We write it as a stack so that multiple -// cli_pkg packages can depend on one another without clobbering their exports. -if (!globalThis._cliPkgExports) { - globalThis._cliPkgExports = []; -} -let _cliPkgExports = {}; -globalThis._cliPkgExports.push(_cliPkgExports); - -_cliPkgExports.load = function(_cliPkgRequires, _cliPkgExportParam) { -var dartNodeIsActuallyNode = typeof process !== "undefined" && (process.versions || {}).hasOwnProperty('node'); - -// make sure to keep this as 'var' -// we don't want block scoping -var self = dartNodeIsActuallyNode ? Object.create(globalThis) : globalThis; - -self.scheduleImmediate = typeof setImmediate !== "undefined" - ? function (cb) { - setImmediate(cb); - } - : function(cb) { - setTimeout(cb, 0); - }; - -// CommonJS globals. -if (typeof require !== "undefined") { - self.require = require; -} -self.exports = _cliPkgExportParam || _cliPkgExports; - -// Node.js specific exports, check to see if they exist & or polyfilled - -if (typeof process !== "undefined") { - self.process = process; -} - -if (typeof __dirname !== "undefined") { - self.__dirname = __dirname; -} - -if (typeof __filename !== "undefined") { - self.__filename = __filename; -} - -if (typeof Buffer !== "undefined") { - self.Buffer = Buffer; -} - -// if we're running in a browser, Dart supports most of this out of box -// make sure we only run these in Node.js environment - -if (dartNodeIsActuallyNode) { - // This line is to: - // 1) Prevent Webpack from bundling. - // 2) In Webpack on Node.js, make sure we're using the native Node.js require, which is available via __non_webpack_require__ - // https://github.com/mbullington/node_preamble.dart/issues/18#issuecomment-527305561 - var url = ("undefined" !== typeof __webpack_require__ ? __non_webpack_require__ : require)("url"); - - // Setting `self.location=` in Electron throws a `TypeError`, so we define it - // as a property instead to be safe. - Object.defineProperty(self, "location", { - value: { - get href() { - if (url.pathToFileURL) { - return url.pathToFileURL(process.cwd()).href + "/"; - } else { - // This isn't really a correct transformation, but it's the best we have - // for versions of Node <10.12.0 which introduced `url.pathToFileURL()`. - // For example, it will fail for paths that contain characters that need - // to be escaped in URLs. - return "file://" + (function() { - var cwd = process.cwd(); - if (process.platform != "win32") return cwd; - return "/" + cwd.replace(/\\/g, "/"); - })() + "/" - } - } - } - }); - - (function() { - function computeCurrentScript() { - try { - throw new Error(); - } catch(e) { - var stack = e.stack; - var re = new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "mg"); - var lastMatch = null; - do { - var match = re.exec(stack); - if (match != null) lastMatch = match; - } while (match != null); - return lastMatch[1]; - } - } - - // Setting `self.document=` isn't known to throw an error anywhere like - // `self.location=` does on Electron, but it's better to be future-proof - // just in case.. - var cachedCurrentScript = null; - Object.defineProperty(self, "document", { - value: { - get currentScript() { - if (cachedCurrentScript == null) { - cachedCurrentScript = {src: computeCurrentScript()}; - } - return cachedCurrentScript; - } - } - }); - })(); - - self.dartDeferredLibraryLoader = function(uri, successCallback, errorCallback) { - try { - load(uri); - successCallback(); - } catch (error) { - errorCallback(error); - } - }; -} - -Object.defineProperty(self, 'parcel_watcher', { get: _cliPkgRequires.parcel_watcher }); -self.immutable = _cliPkgRequires.immutable; -self.chokidar = _cliPkgRequires.chokidar; -self.readline = _cliPkgRequires.readline; -self.fs = _cliPkgRequires.fs; -self.nodeModule = _cliPkgRequires.nodeModule; -self.stream = _cliPkgRequires.stream; -self.util = _cliPkgRequires.util; -// Generated by dart2js (NullSafetyMode.sound, trust primitives, omit checks, lax runtime type, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.5.4. -// The code supports the following hooks: -// dartPrint(message): -// if this function is defined it is called instead of the Dart [print] -// method. -// -// dartMainRunner(main, args): -// if this function is defined, the Dart [main] method will not be invoked -// directly. Instead, a closure that will invoke [main], and its arguments -// [args] is passed to [dartMainRunner]. -// -// dartDeferredLibraryLoader(uri, successCallback, errorCallback, loadId, loadPriority): -// if this function is defined, it will be called when a deferred library -// is loaded. It should load and eval the javascript of `uri`, and call -// successCallback. If it fails to do so, it should call errorCallback with -// an error. The loadId argument is the deferred import that resulted in -// this uri being loaded. The loadPriority argument is the priority the -// library should be loaded with as specified in the code via the -// load-priority annotation (0: normal, 1: high). -// dartDeferredLibraryMultiLoader(uris, successCallback, errorCallback, loadId, loadPriority): -// if this function is defined, it will be called when a deferred library -// is loaded. It should load and eval the javascript of every URI in `uris`, -// and call successCallback. If it fails to do so, it should call -// errorCallback with an error. The loadId argument is the deferred import -// that resulted in this uri being loaded. The loadPriority argument is the -// priority the library should be loaded with as specified in the code via -// the load-priority annotation (0: normal, 1: high). -// -// dartCallInstrumentation(id, qualifiedName): -// if this function is defined, it will be called at each entry of a -// method or constructor. Used only when compiling programs with -// --experiment-call-instrumentation. -(function dartProgram() { - function copyProperties(from, to) { - var keys = Object.keys(from); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - to[key] = from[key]; - } - } - function mixinPropertiesHard(from, to) { - var keys = Object.keys(from); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!to.hasOwnProperty(key)) { - to[key] = from[key]; - } - } - } - function mixinPropertiesEasy(from, to) { - Object.assign(to, from); - } - var supportsDirectProtoAccess = function() { - var cls = function() { - }; - cls.prototype = {p: {}}; - var object = new cls(); - if (!(Object.getPrototypeOf(object) && Object.getPrototypeOf(object).p === cls.prototype.p)) - return false; - try { - if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0) - return true; - if (typeof version == "function" && version.length == 0) { - var v = version(); - if (/^\d+\.\d+\.\d+\.\d+$/.test(v)) - return true; - } - } catch (_) { - } - return false; - }(); - function inherit(cls, sup) { - cls.prototype.constructor = cls; - cls.prototype["$is" + cls.name] = cls; - if (sup != null) { - if (supportsDirectProtoAccess) { - Object.setPrototypeOf(cls.prototype, sup.prototype); - return; - } - var clsPrototype = Object.create(sup.prototype); - copyProperties(cls.prototype, clsPrototype); - cls.prototype = clsPrototype; - } - } - function inheritMany(sup, classes) { - for (var i = 0; i < classes.length; i++) { - inherit(classes[i], sup); - } - } - function mixinEasy(cls, mixin) { - mixinPropertiesEasy(mixin.prototype, cls.prototype); - cls.prototype.constructor = cls; - } - function mixinHard(cls, mixin) { - mixinPropertiesHard(mixin.prototype, cls.prototype); - cls.prototype.constructor = cls; - } - function lazy(holder, name, getterName, initializer) { - var uninitializedSentinel = holder; - holder[name] = uninitializedSentinel; - holder[getterName] = function() { - if (holder[name] === uninitializedSentinel) { - holder[name] = initializer(); - } - holder[getterName] = function() { - return this[name]; - }; - return holder[name]; - }; - } - function lazyFinal(holder, name, getterName, initializer) { - var uninitializedSentinel = holder; - holder[name] = uninitializedSentinel; - holder[getterName] = function() { - if (holder[name] === uninitializedSentinel) { - var value = initializer(); - if (holder[name] !== uninitializedSentinel) { - A.throwLateFieldADI(name); - } - holder[name] = value; - } - var finalValue = holder[name]; - holder[getterName] = function() { - return finalValue; - }; - return finalValue; - }; - } - function makeConstList(list) { - list.immutable$list = Array; - list.fixed$length = Array; - return list; - } - function convertToFastObject(properties) { - function t() { - } - t.prototype = properties; - new t(); - return properties; - } - function convertAllToFastObject(arrayOfObjects) { - for (var i = 0; i < arrayOfObjects.length; ++i) { - convertToFastObject(arrayOfObjects[i]); - } - } - var functionCounter = 0; - function instanceTearOffGetter(isIntercepted, parameters) { - var cache = null; - return isIntercepted ? function(receiver) { - if (cache === null) - cache = A.closureFromTearOff(parameters); - return new cache(receiver, this); - } : function() { - if (cache === null) - cache = A.closureFromTearOff(parameters); - return new cache(this, null); - }; - } - function staticTearOffGetter(parameters) { - var cache = null; - return function() { - if (cache === null) - cache = A.closureFromTearOff(parameters).prototype; - return cache; - }; - } - var typesOffset = 0; - function tearOffParameters(container, isStatic, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { - if (typeof funType == "number") { - funType += typesOffset; - } - return {co: container, iS: isStatic, iI: isIntercepted, rC: requiredParameterCount, dV: optionalParameterDefaultValues, cs: callNames, fs: funsOrNames, fT: funType, aI: applyIndex || 0, nDA: needsDirectAccess}; - } - function installStaticTearOff(holder, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { - var parameters = tearOffParameters(holder, true, false, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, false); - var getterFunction = staticTearOffGetter(parameters); - holder[getterName] = getterFunction; - } - function installInstanceTearOff(prototype, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { - isIntercepted = !!isIntercepted; - var parameters = tearOffParameters(prototype, false, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, !!needsDirectAccess); - var getterFunction = instanceTearOffGetter(isIntercepted, parameters); - prototype[getterName] = getterFunction; - } - function setOrUpdateInterceptorsByTag(newTags) { - var tags = init.interceptorsByTag; - if (!tags) { - init.interceptorsByTag = newTags; - return; - } - copyProperties(newTags, tags); - } - function setOrUpdateLeafTags(newTags) { - var tags = init.leafTags; - if (!tags) { - init.leafTags = newTags; - return; - } - copyProperties(newTags, tags); - } - function updateTypes(newTypes) { - var types = init.types; - var length = types.length; - types.push.apply(types, newTypes); - return length; - } - function updateHolder(holder, newHolder) { - copyProperties(newHolder, holder); - return holder; - } - var hunkHelpers = function() { - var mkInstance = function(isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { - return function(container, getterName, name, funType) { - return installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex, false); - }; - }, - mkStatic = function(requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { - return function(container, getterName, name, funType) { - return installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex); - }; - }; - return {inherit: inherit, inheritMany: inheritMany, mixin: mixinEasy, mixinHard: mixinHard, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, lazyFinal: lazyFinal, updateHolder: updateHolder, convertToFastObject: convertToFastObject, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; - }(); - function initializeDeferredHunk(hunk) { - typesOffset = init.types.length; - hunk(hunkHelpers, init, holders, $); - } - var J = { - makeDispatchRecord(interceptor, proto, extension, indexability) { - return {i: interceptor, p: proto, e: extension, x: indexability}; - }, - getNativeInterceptor(object) { - var proto, objectProto, $constructor, interceptor, t1, - record = object[init.dispatchPropertyName]; - if (record == null) - if ($.initNativeDispatchFlag == null) { - A.initNativeDispatch(); - record = object[init.dispatchPropertyName]; - } - if (record != null) { - proto = record.p; - if (false === proto) - return record.i; - if (true === proto) - return object; - objectProto = Object.getPrototypeOf(object); - if (proto === objectProto) - return record.i; - if (record.e === objectProto) - throw A.wrapException(A.UnimplementedError$("Return interceptor for " + A.S(proto(object, record)))); - } - $constructor = object.constructor; - if ($constructor == null) - interceptor = null; - else { - t1 = $._JS_INTEROP_INTERCEPTOR_TAG; - if (t1 == null) - t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); - interceptor = $constructor[t1]; - } - if (interceptor != null) - return interceptor; - interceptor = A.lookupAndCacheInterceptor(object); - if (interceptor != null) - return interceptor; - if (typeof object == "function") - return B.JavaScriptFunction_methods; - proto = Object.getPrototypeOf(object); - if (proto == null) - return B.PlainJavaScriptObject_methods; - if (proto === Object.prototype) - return B.PlainJavaScriptObject_methods; - if (typeof $constructor == "function") { - t1 = $._JS_INTEROP_INTERCEPTOR_TAG; - if (t1 == null) - t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); - Object.defineProperty($constructor, t1, {value: B.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); - return B.UnknownJavaScriptObject_methods; - } - return B.UnknownJavaScriptObject_methods; - }, - JSArray_JSArray$fixed($length, $E) { - if ($length < 0 || $length > 4294967295) - throw A.wrapException(A.RangeError$range($length, 0, 4294967295, "length", null)); - return J.JSArray_JSArray$markFixed(new Array($length), $E); - }, - JSArray_JSArray$allocateFixed($length, $E) { - if ($length > 4294967295) - throw A.wrapException(A.RangeError$range($length, 0, 4294967295, "length", null)); - return J.JSArray_JSArray$markFixed(new Array($length), $E); - }, - JSArray_JSArray$growable($length, $E) { - if ($length < 0) - throw A.wrapException(A.ArgumentError$("Length must be a non-negative integer: " + $length, null)); - return A._setArrayType(new Array($length), $E._eval$1("JSArray<0>")); - }, - JSArray_JSArray$allocateGrowable($length, $E) { - if ($length < 0) - throw A.wrapException(A.ArgumentError$("Length must be a non-negative integer: " + $length, null)); - return A._setArrayType(new Array($length), $E._eval$1("JSArray<0>")); - }, - JSArray_JSArray$markFixed(allocation, $E) { - return J.JSArray_markFixedList(A._setArrayType(allocation, $E._eval$1("JSArray<0>"))); - }, - JSArray_markFixedList(list) { - list.fixed$length = Array; - return list; - }, - JSArray_markUnmodifiableList(list) { - list.fixed$length = Array; - list.immutable$list = Array; - return list; - }, - JSArray__compareAny(a, b) { - return J.compareTo$1$ns(a, b); - }, - JSString__isWhitespace(codeUnit) { - if (codeUnit < 256) - switch (codeUnit) { - case 9: - case 10: - case 11: - case 12: - case 13: - case 32: - case 133: - case 160: - return true; - default: - return false; - } - switch (codeUnit) { - case 5760: - case 8192: - case 8193: - case 8194: - case 8195: - case 8196: - case 8197: - case 8198: - case 8199: - case 8200: - case 8201: - case 8202: - case 8232: - case 8233: - case 8239: - case 8287: - case 12288: - case 65279: - return true; - default: - return false; - } - }, - JSString__skipLeadingWhitespace(string, index) { - var t1, codeUnit; - for (t1 = string.length; index < t1;) { - codeUnit = string.charCodeAt(index); - if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) - break; - ++index; - } - return index; - }, - JSString__skipTrailingWhitespace(string, index) { - var index0, codeUnit; - for (; index > 0; index = index0) { - index0 = index - 1; - codeUnit = string.charCodeAt(index0); - if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) - break; - } - return index; - }, - getInterceptor$(receiver) { - if (typeof receiver == "number") { - if (Math.floor(receiver) == receiver) - return J.JSInt.prototype; - return J.JSNumNotInt.prototype; - } - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return J.JSNull.prototype; - if (typeof receiver == "boolean") - return J.JSBool.prototype; - if (Array.isArray(receiver)) - return J.JSArray.prototype; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - if (typeof receiver == "symbol") - return J.JavaScriptSymbol.prototype; - if (typeof receiver == "bigint") - return J.JavaScriptBigInt.prototype; - return receiver; - } - if (receiver instanceof A.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, - getInterceptor$ansx(receiver) { - if (typeof receiver == "number") - return J.JSNumber.prototype; - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return receiver; - if (Array.isArray(receiver)) - return J.JSArray.prototype; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - if (typeof receiver == "symbol") - return J.JavaScriptSymbol.prototype; - if (typeof receiver == "bigint") - return J.JavaScriptBigInt.prototype; - return receiver; - } - if (receiver instanceof A.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, - getInterceptor$asx(receiver) { - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return receiver; - if (Array.isArray(receiver)) - return J.JSArray.prototype; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - if (typeof receiver == "symbol") - return J.JavaScriptSymbol.prototype; - if (typeof receiver == "bigint") - return J.JavaScriptBigInt.prototype; - return receiver; - } - if (receiver instanceof A.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, - getInterceptor$ax(receiver) { - if (receiver == null) - return receiver; - if (Array.isArray(receiver)) - return J.JSArray.prototype; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - if (typeof receiver == "symbol") - return J.JavaScriptSymbol.prototype; - if (typeof receiver == "bigint") - return J.JavaScriptBigInt.prototype; - return receiver; - } - if (receiver instanceof A.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, - getInterceptor$in(receiver) { - if (typeof receiver == "number") { - if (Math.floor(receiver) == receiver) - return J.JSInt.prototype; - return J.JSNumNotInt.prototype; - } - if (receiver == null) - return receiver; - if (!(receiver instanceof A.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; - }, - getInterceptor$n(receiver) { - if (typeof receiver == "number") - return J.JSNumber.prototype; - if (receiver == null) - return receiver; - if (!(receiver instanceof A.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; - }, - getInterceptor$ns(receiver) { - if (typeof receiver == "number") - return J.JSNumber.prototype; - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return receiver; - if (!(receiver instanceof A.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; - }, - getInterceptor$s(receiver) { - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return receiver; - if (!(receiver instanceof A.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; - }, - getInterceptor$x(receiver) { - if (receiver == null) - return receiver; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - if (typeof receiver == "symbol") - return J.JavaScriptSymbol.prototype; - if (typeof receiver == "bigint") - return J.JavaScriptBigInt.prototype; - return receiver; - } - if (receiver instanceof A.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, - getInterceptor$z(receiver) { - if (receiver == null) - return receiver; - if (!(receiver instanceof A.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; - }, - set$AsyncCompiler$x(receiver, value) { - return J.getInterceptor$x(receiver).set$AsyncCompiler(receiver, value); - }, - set$CalculationInterpolation$x(receiver, value) { - return J.getInterceptor$x(receiver).set$CalculationInterpolation(receiver, value); - }, - set$CalculationOperation$x(receiver, value) { - return J.getInterceptor$x(receiver).set$CalculationOperation(receiver, value); - }, - set$Compiler$x(receiver, value) { - return J.getInterceptor$x(receiver).set$Compiler(receiver, value); - }, - set$Exception$x(receiver, value) { - return J.getInterceptor$x(receiver).set$Exception(receiver, value); - }, - set$FALSE$x(receiver, value) { - return J.getInterceptor$x(receiver).set$FALSE(receiver, value); - }, - set$Logger$x(receiver, value) { - return J.getInterceptor$x(receiver).set$Logger(receiver, value); - }, - set$NULL$x(receiver, value) { - return J.getInterceptor$x(receiver).set$NULL(receiver, value); - }, - set$NodePackageImporter$x(receiver, value) { - return J.getInterceptor$x(receiver).set$NodePackageImporter(receiver, value); - }, - set$SassArgumentList$x(receiver, value) { - return J.getInterceptor$x(receiver).set$SassArgumentList(receiver, value); - }, - set$SassBoolean$x(receiver, value) { - return J.getInterceptor$x(receiver).set$SassBoolean(receiver, value); - }, - set$SassCalculation$x(receiver, value) { - return J.getInterceptor$x(receiver).set$SassCalculation(receiver, value); - }, - set$SassColor$x(receiver, value) { - return J.getInterceptor$x(receiver).set$SassColor(receiver, value); - }, - set$SassFunction$x(receiver, value) { - return J.getInterceptor$x(receiver).set$SassFunction(receiver, value); - }, - set$SassList$x(receiver, value) { - return J.getInterceptor$x(receiver).set$SassList(receiver, value); - }, - set$SassMap$x(receiver, value) { - return J.getInterceptor$x(receiver).set$SassMap(receiver, value); - }, - set$SassMixin$x(receiver, value) { - return J.getInterceptor$x(receiver).set$SassMixin(receiver, value); - }, - set$SassNumber$x(receiver, value) { - return J.getInterceptor$x(receiver).set$SassNumber(receiver, value); - }, - set$SassString$x(receiver, value) { - return J.getInterceptor$x(receiver).set$SassString(receiver, value); - }, - set$TRUE$x(receiver, value) { - return J.getInterceptor$x(receiver).set$TRUE(receiver, value); - }, - set$Value$x(receiver, value) { - return J.getInterceptor$x(receiver).set$Value(receiver, value); - }, - set$Version$x(receiver, value) { - return J.getInterceptor$x(receiver).set$Version(receiver, value); - }, - set$cli_pkg_main_0_$x(receiver, value) { - return J.getInterceptor$x(receiver).set$cli_pkg_main_0_(receiver, value); - }, - set$compile$x(receiver, value) { - return J.getInterceptor$x(receiver).set$compile(receiver, value); - }, - set$compileAsync$x(receiver, value) { - return J.getInterceptor$x(receiver).set$compileAsync(receiver, value); - }, - set$compileString$x(receiver, value) { - return J.getInterceptor$x(receiver).set$compileString(receiver, value); - }, - set$compileStringAsync$x(receiver, value) { - return J.getInterceptor$x(receiver).set$compileStringAsync(receiver, value); - }, - set$context$x(receiver, value) { - return J.getInterceptor$x(receiver).set$context(receiver, value); - }, - set$dartValue$x(receiver, value) { - return J.getInterceptor$x(receiver).set$dartValue(receiver, value); - }, - set$deprecations$x(receiver, value) { - return J.getInterceptor$x(receiver).set$deprecations(receiver, value); - }, - set$exitCode$x(receiver, value) { - return J.getInterceptor$x(receiver).set$exitCode(receiver, value); - }, - set$info$x(receiver, value) { - return J.getInterceptor$x(receiver).set$info(receiver, value); - }, - set$initAsyncCompiler$x(receiver, value) { - return J.getInterceptor$x(receiver).set$initAsyncCompiler(receiver, value); - }, - set$initCompiler$x(receiver, value) { - return J.getInterceptor$x(receiver).set$initCompiler(receiver, value); - }, - set$length$asx(receiver, value) { - return J.getInterceptor$asx(receiver).set$length(receiver, value); - }, - set$loadParserExports_$x(receiver, value) { - return J.getInterceptor$x(receiver).set$loadParserExports_(receiver, value); - }, - set$render$x(receiver, value) { - return J.getInterceptor$x(receiver).set$render(receiver, value); - }, - set$renderSync$x(receiver, value) { - return J.getInterceptor$x(receiver).set$renderSync(receiver, value); - }, - set$sassFalse$x(receiver, value) { - return J.getInterceptor$x(receiver).set$sassFalse(receiver, value); - }, - set$sassNull$x(receiver, value) { - return J.getInterceptor$x(receiver).set$sassNull(receiver, value); - }, - set$sassTrue$x(receiver, value) { - return J.getInterceptor$x(receiver).set$sassTrue(receiver, value); - }, - set$types$x(receiver, value) { - return J.getInterceptor$x(receiver).set$types(receiver, value); - }, - get$$prototype$x(receiver) { - return J.getInterceptor$x(receiver).get$$prototype(receiver); - }, - get$_dartException$x(receiver) { - return J.getInterceptor$x(receiver).get$_dartException(receiver); - }, - get$alertAscii$x(receiver) { - return J.getInterceptor$x(receiver).get$alertAscii(receiver); - }, - get$alertColor$x(receiver) { - return J.getInterceptor$x(receiver).get$alertColor(receiver); - }, - get$argv$x(receiver) { - return J.getInterceptor$x(receiver).get$argv(receiver); - }, - get$brackets$x(receiver) { - return J.getInterceptor$x(receiver).get$brackets(receiver); - }, - get$charset$x(receiver) { - return J.getInterceptor$x(receiver).get$charset(receiver); - }, - get$code$x(receiver) { - return J.getInterceptor$x(receiver).get$code(receiver); - }, - get$current$x(receiver) { - return J.getInterceptor$x(receiver).get$current(receiver); - }, - get$dartValue$x(receiver) { - return J.getInterceptor$x(receiver).get$dartValue(receiver); - }, - get$debug$x(receiver) { - return J.getInterceptor$x(receiver).get$debug(receiver); - }, - get$denominatorUnits$x(receiver) { - return J.getInterceptor$x(receiver).get$denominatorUnits(receiver); - }, - get$end$z(receiver) { - return J.getInterceptor$z(receiver).get$end(receiver); - }, - get$env$x(receiver) { - return J.getInterceptor$x(receiver).get$env(receiver); - }, - get$exitCode$x(receiver) { - return J.getInterceptor$x(receiver).get$exitCode(receiver); - }, - get$fatalDeprecations$x(receiver) { - return J.getInterceptor$x(receiver).get$fatalDeprecations(receiver); - }, - get$fiber$x(receiver) { - return J.getInterceptor$x(receiver).get$fiber(receiver); - }, - get$file$x(receiver) { - return J.getInterceptor$x(receiver).get$file(receiver); - }, - get$filename$x(receiver) { - return J.getInterceptor$x(receiver).get$filename(receiver); - }, - get$first$ax(receiver) { - return J.getInterceptor$ax(receiver).get$first(receiver); - }, - get$functions$x(receiver) { - return J.getInterceptor$x(receiver).get$functions(receiver); - }, - get$futureDeprecations$x(receiver) { - return J.getInterceptor$x(receiver).get$futureDeprecations(receiver); - }, - get$hashCode$(receiver) { - return J.getInterceptor$(receiver).get$hashCode(receiver); - }, - get$id$x(receiver) { - return J.getInterceptor$x(receiver).get$id(receiver); - }, - get$importer$x(receiver) { - return J.getInterceptor$x(receiver).get$importer(receiver); - }, - get$importers$x(receiver) { - return J.getInterceptor$x(receiver).get$importers(receiver); - }, - get$isEmpty$asx(receiver) { - return J.getInterceptor$asx(receiver).get$isEmpty(receiver); - }, - get$isNotEmpty$asx(receiver) { - return J.getInterceptor$asx(receiver).get$isNotEmpty(receiver); - }, - get$isTTY$x(receiver) { - return J.getInterceptor$x(receiver).get$isTTY(receiver); - }, - get$iterator$ax(receiver) { - return J.getInterceptor$ax(receiver).get$iterator(receiver); - }, - get$keys$z(receiver) { - return J.getInterceptor$z(receiver).get$keys(receiver); - }, - get$last$ax(receiver) { - return J.getInterceptor$ax(receiver).get$last(receiver); - }, - get$length$asx(receiver) { - return J.getInterceptor$asx(receiver).get$length(receiver); - }, - get$loadPaths$x(receiver) { - return J.getInterceptor$x(receiver).get$loadPaths(receiver); - }, - get$logger$x(receiver) { - return J.getInterceptor$x(receiver).get$logger(receiver); - }, - get$message$x(receiver) { - return J.getInterceptor$x(receiver).get$message(receiver); - }, - get$method$x(receiver) { - return J.getInterceptor$x(receiver).get$method(receiver); - }, - get$mtime$x(receiver) { - return J.getInterceptor$x(receiver).get$mtime(receiver); - }, - get$name$x(receiver) { - return J.getInterceptor$x(receiver).get$name(receiver); - }, - get$numeratorUnits$x(receiver) { - return J.getInterceptor$x(receiver).get$numeratorUnits(receiver); - }, - get$options$x(receiver) { - return J.getInterceptor$x(receiver).get$options(receiver); - }, - get$parent$z(receiver) { - return J.getInterceptor$z(receiver).get$parent(receiver); - }, - get$path$x(receiver) { - return J.getInterceptor$x(receiver).get$path(receiver); - }, - get$platform$x(receiver) { - return J.getInterceptor$x(receiver).get$platform(receiver); - }, - get$quietDeps$x(receiver) { - return J.getInterceptor$x(receiver).get$quietDeps(receiver); - }, - get$quotes$x(receiver) { - return J.getInterceptor$x(receiver).get$quotes(receiver); - }, - get$release$x(receiver) { - return J.getInterceptor$x(receiver).get$release(receiver); - }, - get$reversed$ax(receiver) { - return J.getInterceptor$ax(receiver).get$reversed(receiver); - }, - get$runtimeType$(receiver) { - return J.getInterceptor$(receiver).get$runtimeType(receiver); - }, - get$separator$x(receiver) { - return J.getInterceptor$x(receiver).get$separator(receiver); - }, - get$sign$in(receiver) { - if (typeof receiver === "number") - return receiver > 0 ? 1 : receiver < 0 ? -1 : receiver; - return J.getInterceptor$in(receiver).get$sign(receiver); - }, - get$silenceDeprecations$x(receiver) { - return J.getInterceptor$x(receiver).get$silenceDeprecations(receiver); - }, - get$single$ax(receiver) { - return J.getInterceptor$ax(receiver).get$single(receiver); - }, - get$sourceMap$x(receiver) { - return J.getInterceptor$x(receiver).get$sourceMap(receiver); - }, - get$sourceMapIncludeSources$x(receiver) { - return J.getInterceptor$x(receiver).get$sourceMapIncludeSources(receiver); - }, - get$space$x(receiver) { - return J.getInterceptor$x(receiver).get$space(receiver); - }, - get$span$z(receiver) { - return J.getInterceptor$z(receiver).get$span(receiver); - }, - get$start$z(receiver) { - return J.getInterceptor$z(receiver).get$start(receiver); - }, - get$stderr$x(receiver) { - return J.getInterceptor$x(receiver).get$stderr(receiver); - }, - get$stdout$x(receiver) { - return J.getInterceptor$x(receiver).get$stdout(receiver); - }, - get$style$x(receiver) { - return J.getInterceptor$x(receiver).get$style(receiver); - }, - get$syntax$x(receiver) { - return J.getInterceptor$x(receiver).get$syntax(receiver); - }, - get$trace$z(receiver) { - return J.getInterceptor$z(receiver).get$trace(receiver); - }, - get$url$x(receiver) { - return J.getInterceptor$x(receiver).get$url(receiver); - }, - get$verbose$x(receiver) { - return J.getInterceptor$x(receiver).get$verbose(receiver); - }, - get$warn$x(receiver) { - return J.getInterceptor$x(receiver).get$warn(receiver); - }, - get$weight$x(receiver) { - return J.getInterceptor$x(receiver).get$weight(receiver); - }, - $add$ansx(receiver, a0) { - if (typeof receiver == "number" && typeof a0 == "number") - return receiver + a0; - return J.getInterceptor$ansx(receiver).$add(receiver, a0); - }, - $eq$(receiver, a0) { - if (receiver == null) - return a0 == null; - if (typeof receiver != "object") - return a0 != null && receiver === a0; - return J.getInterceptor$(receiver).$eq(receiver, a0); - }, - $index$asx(receiver, a0) { - if (typeof a0 === "number") - if (Array.isArray(receiver) || typeof receiver == "string" || A.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) - if (a0 >>> 0 === a0 && a0 < receiver.length) - return receiver[a0]; - return J.getInterceptor$asx(receiver).$index(receiver, a0); - }, - $indexSet$ax(receiver, a0, a1) { - if (typeof a0 === "number") - if ((Array.isArray(receiver) || A.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) && !receiver.immutable$list && a0 >>> 0 === a0 && a0 < receiver.length) - return receiver[a0] = a1; - return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); - }, - $set$2$x(receiver, a0, a1) { - return J.getInterceptor$x(receiver).$set$2(receiver, a0, a1); - }, - add$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).add$1(receiver, a0); - }, - addAll$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).addAll$1(receiver, a0); - }, - allMatches$1$s(receiver, a0) { - return J.getInterceptor$s(receiver).allMatches$1(receiver, a0); - }, - allMatches$2$s(receiver, a0, a1) { - return J.getInterceptor$s(receiver).allMatches$2(receiver, a0, a1); - }, - any$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).any$1(receiver, a0); - }, - apply$2$x(receiver, a0, a1) { - return J.getInterceptor$x(receiver).apply$2(receiver, a0, a1); - }, - asImmutable$0$x(receiver) { - return J.getInterceptor$x(receiver).asImmutable$0(receiver); - }, - asMutable$0$x(receiver) { - return J.getInterceptor$x(receiver).asMutable$0(receiver); - }, - canonicalize$4$baseImporter$baseUrl$forImport$x(receiver, a0, a1, a2, a3) { - return J.getInterceptor$x(receiver).canonicalize$4$baseImporter$baseUrl$forImport(receiver, a0, a1, a2, a3); - }, - cast$1$0$ax(receiver, $T1) { - return J.getInterceptor$ax(receiver).cast$1$0(receiver, $T1); - }, - close$0$x(receiver) { - return J.getInterceptor$x(receiver).close$0(receiver); - }, - codeUnitAt$1$s(receiver, a0) { - return J.getInterceptor$s(receiver).codeUnitAt$1(receiver, a0); - }, - compareTo$1$ns(receiver, a0) { - return J.getInterceptor$ns(receiver).compareTo$1(receiver, a0); - }, - contains$1$asx(receiver, a0) { - return J.getInterceptor$asx(receiver).contains$1(receiver, a0); - }, - createInterface$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).createInterface$1(receiver, a0); - }, - createRequire$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).createRequire$1(receiver, a0); - }, - elementAt$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).elementAt$1(receiver, a0); - }, - endsWith$1$s(receiver, a0) { - return J.getInterceptor$s(receiver).endsWith$1(receiver, a0); - }, - error$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).error$1(receiver, a0); - }, - every$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).every$1(receiver, a0); - }, - existsSync$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).existsSync$1(receiver, a0); - }, - expand$1$1$ax(receiver, a0, $T1) { - return J.getInterceptor$ax(receiver).expand$1$1(receiver, a0, $T1); - }, - fillRange$3$ax(receiver, a0, a1, a2) { - return J.getInterceptor$ax(receiver).fillRange$3(receiver, a0, a1, a2); - }, - fold$2$ax(receiver, a0, a1) { - return J.getInterceptor$ax(receiver).fold$2(receiver, a0, a1); - }, - forEach$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); - }, - getRange$2$ax(receiver, a0, a1) { - return J.getInterceptor$ax(receiver).getRange$2(receiver, a0, a1); - }, - getTime$0$x(receiver) { - return J.getInterceptor$x(receiver).getTime$0(receiver); - }, - isDirectory$0$x(receiver) { - return J.getInterceptor$x(receiver).isDirectory$0(receiver); - }, - isFile$0$x(receiver) { - return J.getInterceptor$x(receiver).isFile$0(receiver); - }, - join$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).join$1(receiver, a0); - }, - listen$1$z(receiver, a0) { - return J.getInterceptor$z(receiver).listen$1(receiver, a0); - }, - log$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).log$1(receiver, a0); - }, - map$1$1$ax(receiver, a0, $T1) { - return J.getInterceptor$ax(receiver).map$1$1(receiver, a0, $T1); - }, - matchAsPrefix$2$s(receiver, a0, a1) { - return J.getInterceptor$s(receiver).matchAsPrefix$2(receiver, a0, a1); - }, - mkdirSync$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).mkdirSync$1(receiver, a0); - }, - noSuchMethod$1$(receiver, a0) { - return J.getInterceptor$(receiver).noSuchMethod$1(receiver, a0); - }, - on$2$x(receiver, a0, a1) { - return J.getInterceptor$x(receiver).on$2(receiver, a0, a1); - }, - parse$0$z(receiver) { - return J.getInterceptor$z(receiver).parse$0(receiver); - }, - readFileSync$2$x(receiver, a0, a1) { - return J.getInterceptor$x(receiver).readFileSync$2(receiver, a0, a1); - }, - readdirSync$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).readdirSync$1(receiver, a0); - }, - remove$1$z(receiver, a0) { - return J.getInterceptor$z(receiver).remove$1(receiver, a0); - }, - removeRange$2$ax(receiver, a0, a1) { - return J.getInterceptor$ax(receiver).removeRange$2(receiver, a0, a1); - }, - replaceFirst$2$s(receiver, a0, a1) { - return J.getInterceptor$s(receiver).replaceFirst$2(receiver, a0, a1); - }, - resolve$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).resolve$1(receiver, a0); - }, - run$0$x(receiver) { - return J.getInterceptor$x(receiver).run$0(receiver); - }, - run$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).run$1(receiver, a0); - }, - setRange$4$ax(receiver, a0, a1, a2, a3) { - return J.getInterceptor$ax(receiver).setRange$4(receiver, a0, a1, a2, a3); - }, - skip$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).skip$1(receiver, a0); - }, - sort$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).sort$1(receiver, a0); - }, - startsWith$1$s(receiver, a0) { - return J.getInterceptor$s(receiver).startsWith$1(receiver, a0); - }, - statSync$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).statSync$1(receiver, a0); - }, - sublist$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).sublist$1(receiver, a0); - }, - substring$1$s(receiver, a0) { - return J.getInterceptor$s(receiver).substring$1(receiver, a0); - }, - substring$2$s(receiver, a0, a1) { - return J.getInterceptor$s(receiver).substring$2(receiver, a0, a1); - }, - take$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).take$1(receiver, a0); - }, - then$1$1$x(receiver, a0, $T1) { - return J.getInterceptor$x(receiver).then$1$1(receiver, a0, $T1); - }, - then$1$2$onError$x(receiver, a0, a1, $T1) { - return J.getInterceptor$x(receiver).then$1$2$onError(receiver, a0, a1, $T1); - }, - then$2$x(receiver, a0, a1) { - return J.getInterceptor$x(receiver).then$2(receiver, a0, a1); - }, - toArray$0$x(receiver) { - return J.getInterceptor$x(receiver).toArray$0(receiver); - }, - toList$0$ax(receiver) { - return J.getInterceptor$ax(receiver).toList$0(receiver); - }, - toList$1$growable$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).toList$1$growable(receiver, a0); - }, - toRadixString$1$n(receiver, a0) { - return J.getInterceptor$n(receiver).toRadixString$1(receiver, a0); - }, - toSet$0$ax(receiver) { - return J.getInterceptor$ax(receiver).toSet$0(receiver); - }, - toString$0$(receiver) { - return J.getInterceptor$(receiver).toString$0(receiver); - }, - toString$1$color$(receiver, a0) { - return J.getInterceptor$(receiver).toString$1$color(receiver, a0); - }, - trim$0$s(receiver) { - return J.getInterceptor$s(receiver).trim$0(receiver); - }, - unlinkSync$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).unlinkSync$1(receiver, a0); - }, - visitAtRootRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitAtRootRule$1(receiver, a0); - }, - visitAtRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitAtRule$1(receiver, a0); - }, - visitBinaryOperationExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitBinaryOperationExpression$1(receiver, a0); - }, - visitBooleanExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitBooleanExpression$1(receiver, a0); - }, - visitColorExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitColorExpression$1(receiver, a0); - }, - visitContentBlock$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitContentBlock$1(receiver, a0); - }, - visitContentRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitContentRule$1(receiver, a0); - }, - visitDebugRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitDebugRule$1(receiver, a0); - }, - visitDeclaration$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitDeclaration$1(receiver, a0); - }, - visitEachRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitEachRule$1(receiver, a0); - }, - visitErrorRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitErrorRule$1(receiver, a0); - }, - visitExtendRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitExtendRule$1(receiver, a0); - }, - visitForRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitForRule$1(receiver, a0); - }, - visitForwardRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitForwardRule$1(receiver, a0); - }, - visitFunctionExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitFunctionExpression$1(receiver, a0); - }, - visitFunctionRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitFunctionRule$1(receiver, a0); - }, - visitIfExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitIfExpression$1(receiver, a0); - }, - visitIfRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitIfRule$1(receiver, a0); - }, - visitImportRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitImportRule$1(receiver, a0); - }, - visitIncludeRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitIncludeRule$1(receiver, a0); - }, - visitInterpolatedFunctionExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitInterpolatedFunctionExpression$1(receiver, a0); - }, - visitListExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitListExpression$1(receiver, a0); - }, - visitLoudComment$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitLoudComment$1(receiver, a0); - }, - visitMapExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitMapExpression$1(receiver, a0); - }, - visitMediaRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitMediaRule$1(receiver, a0); - }, - visitMixinRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitMixinRule$1(receiver, a0); - }, - visitNullExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitNullExpression$1(receiver, a0); - }, - visitNumberExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitNumberExpression$1(receiver, a0); - }, - visitParenthesizedExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitParenthesizedExpression$1(receiver, a0); - }, - visitReturnRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitReturnRule$1(receiver, a0); - }, - visitSelectorExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitSelectorExpression$1(receiver, a0); - }, - visitSilentComment$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitSilentComment$1(receiver, a0); - }, - visitStringExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitStringExpression$1(receiver, a0); - }, - visitStyleRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitStyleRule$1(receiver, a0); - }, - visitStylesheet$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitStylesheet$1(receiver, a0); - }, - visitSupportsExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitSupportsExpression$1(receiver, a0); - }, - visitSupportsRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitSupportsRule$1(receiver, a0); - }, - visitUnaryOperationExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitUnaryOperationExpression$1(receiver, a0); - }, - visitUseRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitUseRule$1(receiver, a0); - }, - visitValueExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitValueExpression$1(receiver, a0); - }, - visitVariableDeclaration$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitVariableDeclaration$1(receiver, a0); - }, - visitVariableExpression$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitVariableExpression$1(receiver, a0); - }, - visitWarnRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitWarnRule$1(receiver, a0); - }, - visitWhileRule$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).visitWhileRule$1(receiver, a0); - }, - watch$2$x(receiver, a0, a1) { - return J.getInterceptor$x(receiver).watch$2(receiver, a0, a1); - }, - where$1$ax(receiver, a0) { - return J.getInterceptor$ax(receiver).where$1(receiver, a0); - }, - write$1$x(receiver, a0) { - return J.getInterceptor$x(receiver).write$1(receiver, a0); - }, - writeFileSync$2$x(receiver, a0, a1) { - return J.getInterceptor$x(receiver).writeFileSync$2(receiver, a0, a1); - }, - yield$0$x(receiver) { - return J.getInterceptor$x(receiver).yield$0(receiver); - }, - Interceptor: function Interceptor() { - }, - JSBool: function JSBool() { - }, - JSNull: function JSNull() { - }, - JavaScriptObject: function JavaScriptObject() { - }, - LegacyJavaScriptObject: function LegacyJavaScriptObject() { - }, - PlainJavaScriptObject: function PlainJavaScriptObject() { - }, - UnknownJavaScriptObject: function UnknownJavaScriptObject() { - }, - JavaScriptFunction: function JavaScriptFunction() { - }, - JavaScriptBigInt: function JavaScriptBigInt() { - }, - JavaScriptSymbol: function JavaScriptSymbol() { - }, - JSArray: function JSArray(t0) { - this.$ti = t0; - }, - JSUnmodifiableArray: function JSUnmodifiableArray(t0) { - this.$ti = t0; - }, - ArrayIterator: function ArrayIterator(t0, t1, t2) { - var _ = this; - _._iterable = t0; - _._length = t1; - _._index = 0; - _._current = null; - _.$ti = t2; - }, - JSNumber: function JSNumber() { - }, - JSInt: function JSInt() { - }, - JSNumNotInt: function JSNumNotInt() { - }, - JSString: function JSString() { - } - }, - A = {JS_CONST: function JS_CONST() { - }, - CastIterable_CastIterable(source, $S, $T) { - if ($S._eval$1("EfficientLengthIterable<0>")._is(source)) - return new A._EfficientLengthCastIterable(source, $S._eval$1("@<0>")._bind$1($T)._eval$1("_EfficientLengthCastIterable<1,2>")); - return new A.CastIterable(source, $S._eval$1("@<0>")._bind$1($T)._eval$1("CastIterable<1,2>")); - }, - LateError$localNI(localName) { - return new A.LateError("Local '" + localName + "' has not been initialized."); - }, - hexDigitValue(char) { - var letter, - digit = char ^ 48; - if (digit <= 9) - return digit; - letter = char | 32; - if (97 <= letter && letter <= 102) - return letter - 87; - return -1; - }, - SystemHash_combine(hash, value) { - hash = hash + value & 536870911; - hash = hash + ((hash & 524287) << 10) & 536870911; - return hash ^ hash >>> 6; - }, - SystemHash_finish(hash) { - hash = hash + ((hash & 67108863) << 3) & 536870911; - hash ^= hash >>> 11; - return hash + ((hash & 16383) << 15) & 536870911; - }, - checkNotNullable(value, $name, $T) { - return value; - }, - isToStringVisiting(object) { - var t1, i; - for (t1 = $.toStringVisiting.length, i = 0; i < t1; ++i) - if (object === $.toStringVisiting[i]) - return true; - return false; - }, - SubListIterable$(_iterable, _start, _endOrLength, $E) { - A.RangeError_checkNotNegative(_start, "start"); - if (_endOrLength != null) { - A.RangeError_checkNotNegative(_endOrLength, "end"); - if (_start > _endOrLength) - A.throwExpression(A.RangeError$range(_start, 0, _endOrLength, "start", null)); - } - return new A.SubListIterable(_iterable, _start, _endOrLength, $E._eval$1("SubListIterable<0>")); - }, - MappedIterable_MappedIterable(iterable, $function, $S, $T) { - if (type$.EfficientLengthIterable_dynamic._is(iterable)) - return new A.EfficientLengthMappedIterable(iterable, $function, $S._eval$1("@<0>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); - return new A.MappedIterable(iterable, $function, $S._eval$1("@<0>")._bind$1($T)._eval$1("MappedIterable<1,2>")); - }, - TakeIterable_TakeIterable(iterable, takeCount, $E) { - var _s9_ = "takeCount"; - A.ArgumentError_checkNotNull(takeCount, _s9_); - A.RangeError_checkNotNegative(takeCount, _s9_); - if (type$.EfficientLengthIterable_dynamic._is(iterable)) - return new A.EfficientLengthTakeIterable(iterable, takeCount, $E._eval$1("EfficientLengthTakeIterable<0>")); - return new A.TakeIterable(iterable, takeCount, $E._eval$1("TakeIterable<0>")); - }, - SkipIterable_SkipIterable(iterable, count, $E) { - var _s5_ = "count"; - if (type$.EfficientLengthIterable_dynamic._is(iterable)) { - A.ArgumentError_checkNotNull(count, _s5_); - A.RangeError_checkNotNegative(count, _s5_); - return new A.EfficientLengthSkipIterable(iterable, count, $E._eval$1("EfficientLengthSkipIterable<0>")); - } - A.ArgumentError_checkNotNull(count, _s5_); - A.RangeError_checkNotNegative(count, _s5_); - return new A.SkipIterable(iterable, count, $E._eval$1("SkipIterable<0>")); - }, - FollowedByIterable_FollowedByIterable$firstEfficient(first, second, $E) { - if ($E._eval$1("EfficientLengthIterable<0>")._is(second)) - return new A.EfficientLengthFollowedByIterable(first, second, $E._eval$1("EfficientLengthFollowedByIterable<0>")); - return new A.FollowedByIterable(first, second, $E._eval$1("FollowedByIterable<0>")); - }, - IterableElementError_noElement() { - return new A.StateError("No element"); - }, - IterableElementError_tooMany() { - return new A.StateError("Too many elements"); - }, - IterableElementError_tooFew() { - return new A.StateError("Too few elements"); - }, - Sort__doSort(a, left, right, compare) { - if (right - left <= 32) - A.Sort__insertionSort(a, left, right, compare); - else - A.Sort__dualPivotQuicksort(a, left, right, compare); - }, - Sort__insertionSort(a, left, right, compare) { - var i, t1, el, j, j0; - for (i = left + 1, t1 = J.getInterceptor$asx(a); i <= right; ++i) { - el = t1.$index(a, i); - j = i; - while (true) { - if (!(j > left && compare.call$2(t1.$index(a, j - 1), el) > 0)) - break; - j0 = j - 1; - t1.$indexSet(a, j, t1.$index(a, j0)); - j = j0; - } - t1.$indexSet(a, j, el); - } - }, - Sort__dualPivotQuicksort(a, left, right, compare) { - var t0, less, great, pivots_are_equal, k, ak, comp, great0, less0, t2, - sixth = B.JSInt_methods._tdivFast$1(right - left + 1, 6), - index1 = left + sixth, - index5 = right - sixth, - index3 = B.JSInt_methods._tdivFast$1(left + right, 2), - index2 = index3 - sixth, - index4 = index3 + sixth, - t1 = J.getInterceptor$asx(a), - el1 = t1.$index(a, index1), - el2 = t1.$index(a, index2), - el3 = t1.$index(a, index3), - el4 = t1.$index(a, index4), - el5 = t1.$index(a, index5); - if (compare.call$2(el1, el2) > 0) { - t0 = el2; - el2 = el1; - el1 = t0; - } - if (compare.call$2(el4, el5) > 0) { - t0 = el5; - el5 = el4; - el4 = t0; - } - if (compare.call$2(el1, el3) > 0) { - t0 = el3; - el3 = el1; - el1 = t0; - } - if (compare.call$2(el2, el3) > 0) { - t0 = el3; - el3 = el2; - el2 = t0; - } - if (compare.call$2(el1, el4) > 0) { - t0 = el4; - el4 = el1; - el1 = t0; - } - if (compare.call$2(el3, el4) > 0) { - t0 = el4; - el4 = el3; - el3 = t0; - } - if (compare.call$2(el2, el5) > 0) { - t0 = el5; - el5 = el2; - el2 = t0; - } - if (compare.call$2(el2, el3) > 0) { - t0 = el3; - el3 = el2; - el2 = t0; - } - if (compare.call$2(el4, el5) > 0) { - t0 = el5; - el5 = el4; - el4 = t0; - } - t1.$indexSet(a, index1, el1); - t1.$indexSet(a, index3, el3); - t1.$indexSet(a, index5, el5); - t1.$indexSet(a, index2, t1.$index(a, left)); - t1.$indexSet(a, index4, t1.$index(a, right)); - less = left + 1; - great = right - 1; - pivots_are_equal = J.$eq$(compare.call$2(el2, el4), 0); - if (pivots_are_equal) - for (k = less; k <= great; ++k) { - ak = t1.$index(a, k); - comp = compare.call$2(ak, el2); - if (comp === 0) - continue; - if (comp < 0) { - if (k !== less) { - t1.$indexSet(a, k, t1.$index(a, less)); - t1.$indexSet(a, less, ak); - } - ++less; - } else - for (; true;) { - comp = compare.call$2(t1.$index(a, great), el2); - if (comp > 0) { - --great; - continue; - } else { - great0 = great - 1; - if (comp < 0) { - t1.$indexSet(a, k, t1.$index(a, less)); - less0 = less + 1; - t1.$indexSet(a, less, t1.$index(a, great)); - t1.$indexSet(a, great, ak); - great = great0; - less = less0; - break; - } else { - t1.$indexSet(a, k, t1.$index(a, great)); - t1.$indexSet(a, great, ak); - great = great0; - break; - } - } - } - } - else - for (k = less; k <= great; ++k) { - ak = t1.$index(a, k); - if (compare.call$2(ak, el2) < 0) { - if (k !== less) { - t1.$indexSet(a, k, t1.$index(a, less)); - t1.$indexSet(a, less, ak); - } - ++less; - } else if (compare.call$2(ak, el4) > 0) - for (; true;) - if (compare.call$2(t1.$index(a, great), el4) > 0) { - --great; - if (great < k) - break; - continue; - } else { - great0 = great - 1; - if (compare.call$2(t1.$index(a, great), el2) < 0) { - t1.$indexSet(a, k, t1.$index(a, less)); - less0 = less + 1; - t1.$indexSet(a, less, t1.$index(a, great)); - t1.$indexSet(a, great, ak); - less = less0; - } else { - t1.$indexSet(a, k, t1.$index(a, great)); - t1.$indexSet(a, great, ak); - } - great = great0; - break; - } - } - t2 = less - 1; - t1.$indexSet(a, left, t1.$index(a, t2)); - t1.$indexSet(a, t2, el2); - t2 = great + 1; - t1.$indexSet(a, right, t1.$index(a, t2)); - t1.$indexSet(a, t2, el4); - A.Sort__doSort(a, left, less - 2, compare); - A.Sort__doSort(a, great + 2, right, compare); - if (pivots_are_equal) - return; - if (less < index1 && great > index5) { - for (; J.$eq$(compare.call$2(t1.$index(a, less), el2), 0);) - ++less; - for (; J.$eq$(compare.call$2(t1.$index(a, great), el4), 0);) - --great; - for (k = less; k <= great; ++k) { - ak = t1.$index(a, k); - if (compare.call$2(ak, el2) === 0) { - if (k !== less) { - t1.$indexSet(a, k, t1.$index(a, less)); - t1.$indexSet(a, less, ak); - } - ++less; - } else if (compare.call$2(ak, el4) === 0) - for (; true;) - if (compare.call$2(t1.$index(a, great), el4) === 0) { - --great; - if (great < k) - break; - continue; - } else { - great0 = great - 1; - if (compare.call$2(t1.$index(a, great), el2) < 0) { - t1.$indexSet(a, k, t1.$index(a, less)); - less0 = less + 1; - t1.$indexSet(a, less, t1.$index(a, great)); - t1.$indexSet(a, great, ak); - less = less0; - } else { - t1.$indexSet(a, k, t1.$index(a, great)); - t1.$indexSet(a, great, ak); - } - great = great0; - break; - } - } - A.Sort__doSort(a, less, great, compare); - } else - A.Sort__doSort(a, less, great, compare); - }, - _CastIterableBase: function _CastIterableBase() { - }, - CastIterator: function CastIterator(t0, t1) { - this._source = t0; - this.$ti = t1; - }, - CastIterable: function CastIterable(t0, t1) { - this._source = t0; - this.$ti = t1; - }, - _EfficientLengthCastIterable: function _EfficientLengthCastIterable(t0, t1) { - this._source = t0; - this.$ti = t1; - }, - _CastListBase: function _CastListBase() { - }, - _CastListBase_sort_closure: function _CastListBase_sort_closure(t0, t1) { - this.$this = t0; - this.compare = t1; - }, - CastList: function CastList(t0, t1) { - this._source = t0; - this.$ti = t1; - }, - CastSet: function CastSet(t0, t1, t2) { - this._source = t0; - this._emptySet = t1; - this.$ti = t2; - }, - CastMap: function CastMap(t0, t1) { - this._source = t0; - this.$ti = t1; - }, - CastMap_forEach_closure: function CastMap_forEach_closure(t0, t1) { - this.$this = t0; - this.f = t1; - }, - CastMap_entries_closure: function CastMap_entries_closure(t0) { - this.$this = t0; - }, - LateError: function LateError(t0) { - this._message = t0; - }, - CodeUnits: function CodeUnits(t0) { - this._string = t0; - }, - nullFuture_closure: function nullFuture_closure() { - }, - SentinelValue: function SentinelValue() { - }, - EfficientLengthIterable: function EfficientLengthIterable() { - }, - ListIterable: function ListIterable() { - }, - SubListIterable: function SubListIterable(t0, t1, t2, t3) { - var _ = this; - _.__internal$_iterable = t0; - _._start = t1; - _._endOrLength = t2; - _.$ti = t3; - }, - ListIterator: function ListIterator(t0, t1, t2) { - var _ = this; - _.__internal$_iterable = t0; - _.__internal$_length = t1; - _.__internal$_index = 0; - _.__internal$_current = null; - _.$ti = t2; - }, - MappedIterable: function MappedIterable(t0, t1, t2) { - this.__internal$_iterable = t0; - this._f = t1; - this.$ti = t2; - }, - EfficientLengthMappedIterable: function EfficientLengthMappedIterable(t0, t1, t2) { - this.__internal$_iterable = t0; - this._f = t1; - this.$ti = t2; - }, - MappedIterator: function MappedIterator(t0, t1, t2) { - var _ = this; - _.__internal$_current = null; - _._iterator = t0; - _._f = t1; - _.$ti = t2; - }, - MappedListIterable: function MappedListIterable(t0, t1, t2) { - this._source = t0; - this._f = t1; - this.$ti = t2; - }, - WhereIterable: function WhereIterable(t0, t1, t2) { - this.__internal$_iterable = t0; - this._f = t1; - this.$ti = t2; - }, - WhereIterator: function WhereIterator(t0, t1) { - this._iterator = t0; - this._f = t1; - }, - ExpandIterable: function ExpandIterable(t0, t1, t2) { - this.__internal$_iterable = t0; - this._f = t1; - this.$ti = t2; - }, - ExpandIterator: function ExpandIterator(t0, t1, t2, t3) { - var _ = this; - _._iterator = t0; - _._f = t1; - _._currentExpansion = t2; - _.__internal$_current = null; - _.$ti = t3; - }, - TakeIterable: function TakeIterable(t0, t1, t2) { - this.__internal$_iterable = t0; - this._takeCount = t1; - this.$ti = t2; - }, - EfficientLengthTakeIterable: function EfficientLengthTakeIterable(t0, t1, t2) { - this.__internal$_iterable = t0; - this._takeCount = t1; - this.$ti = t2; - }, - TakeIterator: function TakeIterator(t0, t1, t2) { - this._iterator = t0; - this._remaining = t1; - this.$ti = t2; - }, - SkipIterable: function SkipIterable(t0, t1, t2) { - this.__internal$_iterable = t0; - this._skipCount = t1; - this.$ti = t2; - }, - EfficientLengthSkipIterable: function EfficientLengthSkipIterable(t0, t1, t2) { - this.__internal$_iterable = t0; - this._skipCount = t1; - this.$ti = t2; - }, - SkipIterator: function SkipIterator(t0, t1) { - this._iterator = t0; - this._skipCount = t1; - }, - SkipWhileIterable: function SkipWhileIterable(t0, t1, t2) { - this.__internal$_iterable = t0; - this._f = t1; - this.$ti = t2; - }, - SkipWhileIterator: function SkipWhileIterator(t0, t1) { - this._iterator = t0; - this._f = t1; - this._hasSkipped = false; - }, - EmptyIterable: function EmptyIterable(t0) { - this.$ti = t0; - }, - EmptyIterator: function EmptyIterator() { - }, - FollowedByIterable: function FollowedByIterable(t0, t1, t2) { - this.__internal$_first = t0; - this._second = t1; - this.$ti = t2; - }, - EfficientLengthFollowedByIterable: function EfficientLengthFollowedByIterable(t0, t1, t2) { - this.__internal$_first = t0; - this._second = t1; - this.$ti = t2; - }, - FollowedByIterator: function FollowedByIterator(t0, t1) { - this._currentIterator = t0; - this._nextIterable = t1; - }, - WhereTypeIterable: function WhereTypeIterable(t0, t1) { - this._source = t0; - this.$ti = t1; - }, - WhereTypeIterator: function WhereTypeIterator(t0, t1) { - this._source = t0; - this.$ti = t1; - }, - NonNullsIterable: function NonNullsIterable(t0, t1) { - this._source = t0; - this.$ti = t1; - }, - NonNullsIterator: function NonNullsIterator(t0) { - this._source = t0; - this.__internal$_current = null; - }, - FixedLengthListMixin: function FixedLengthListMixin() { - }, - UnmodifiableListMixin: function UnmodifiableListMixin() { - }, - UnmodifiableListBase: function UnmodifiableListBase() { - }, - ReversedListIterable: function ReversedListIterable(t0, t1) { - this._source = t0; - this.$ti = t1; - }, - Symbol: function Symbol(t0) { - this.__internal$_name = t0; - }, - __CastListBase__CastIterableBase_ListMixin: function __CastListBase__CastIterableBase_ListMixin() { - }, - ConstantMap_ConstantMap$from(other, $K, $V) { - var allStrings, k, object, index, index0, map, - keys = A.List_List$from(other.get$keys(other), true, $K), - t1 = keys.length, - _i = 0; - while (true) { - if (!(_i < t1)) { - allStrings = true; - break; - } - k = keys[_i]; - if (typeof k != "string" || "__proto__" === k) { - allStrings = false; - break; - } - ++_i; - } - if (allStrings) { - object = {}; - for (index = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i, index = index0) { - k = keys[_i]; - other.$index(0, k); - index0 = index + 1; - object[k] = index; - } - map = new A.ConstantStringMap(object, A.List_List$from(other.get$values(other), true, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("ConstantStringMap<1,2>")); - map.$keys = keys; - return map; - } - return new A.ConstantMapView(A.LinkedHashMap_LinkedHashMap$from(other, $K, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("ConstantMapView<1,2>")); - }, - ConstantMap__throwUnmodifiable() { - throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable Map")); - }, - ConstantSet__throwUnmodifiable() { - throw A.wrapException(A.UnsupportedError$("Cannot modify constant Set")); - }, - instantiate1(f, T1) { - var t1 = new A.Instantiation1(f, T1._eval$1("Instantiation1<0>")); - t1.Instantiation$1(f); - return t1; - }, - unminifyOrTag(rawClassName) { - var preserved = init.mangledGlobalNames[rawClassName]; - if (preserved != null) - return preserved; - return rawClassName; - }, - isJsIndexable(object, record) { - var result; - if (record != null) { - result = record.x; - if (result != null) - return result; - } - return type$.JavaScriptIndexingBehavior_dynamic._is(object); - }, - S(value) { - var result; - if (typeof value == "string") - return value; - if (typeof value == "number") { - if (value !== 0) - return "" + value; - } else if (true === value) - return "true"; - else if (false === value) - return "false"; - else if (value == null) - return "null"; - result = J.toString$0$(value); - return result; - }, - JSInvocationMirror$(_memberName, _internalName, _kind, _arguments, _namedArgumentNames, _typeArgumentCount) { - return new A.JSInvocationMirror(_memberName, _kind, _arguments, _namedArgumentNames, _typeArgumentCount); - }, - Primitives_objectHashCode(object) { - var hash, - property = $.Primitives__identityHashCodeProperty; - if (property == null) - property = $.Primitives__identityHashCodeProperty = Symbol("identityHashCode"); - hash = object[property]; - if (hash == null) { - hash = Math.random() * 0x3fffffff | 0; - object[property] = hash; - } - return hash; - }, - Primitives_parseInt(source, radix) { - var decimalMatch, maxCharCode, digitsPart, t1, i, _null = null, - match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); - if (match == null) - return _null; - decimalMatch = match[3]; - if (radix == null) { - if (decimalMatch != null) - return parseInt(source, 10); - if (match[2] != null) - return parseInt(source, 16); - return _null; - } - if (radix < 2 || radix > 36) - throw A.wrapException(A.RangeError$range(radix, 2, 36, "radix", _null)); - if (radix === 10 && decimalMatch != null) - return parseInt(source, 10); - if (radix < 10 || decimalMatch == null) { - maxCharCode = radix <= 10 ? 47 + radix : 86 + radix; - digitsPart = match[1]; - for (t1 = digitsPart.length, i = 0; i < t1; ++i) - if ((digitsPart.charCodeAt(i) | 32) > maxCharCode) - return _null; - } - return parseInt(source, radix); - }, - Primitives_parseDouble(source) { - var result, trimmed; - if (!/^\s*[+-]?(?:Infinity|NaN|(?:\.\d+|\d+(?:\.\d*)?)(?:[eE][+-]?\d+)?)\s*$/.test(source)) - return null; - result = parseFloat(source); - if (isNaN(result)) { - trimmed = B.JSString_methods.trim$0(source); - if (trimmed === "NaN" || trimmed === "+NaN" || trimmed === "-NaN") - return result; - return null; - } - return result; - }, - Primitives_objectTypeName(object) { - return A.Primitives__objectTypeNameNewRti(object); - }, - Primitives__objectTypeNameNewRti(object) { - var interceptor, dispatchName, $constructor, constructorName; - if (object instanceof A.Object) - return A._rtiToString(A.instanceType(object), null); - interceptor = J.getInterceptor$(object); - if (interceptor === B.Interceptor_methods || interceptor === B.JavaScriptObject_methods || type$.UnknownJavaScriptObject._is(object)) { - dispatchName = B.C_JS_CONST(object); - if (dispatchName !== "Object" && dispatchName !== "") - return dispatchName; - $constructor = object.constructor; - if (typeof $constructor == "function") { - constructorName = $constructor.name; - if (typeof constructorName == "string" && constructorName !== "Object" && constructorName !== "") - return constructorName; - } - } - return A._rtiToString(A.instanceType(object), null); - }, - Primitives_safeToString(object) { - if (object == null || typeof object == "number" || A._isBool(object)) - return J.toString$0$(object); - if (typeof object == "string") - return JSON.stringify(object); - if (object instanceof A.Closure) - return object.toString$0(0); - if (object instanceof A._Record) - return object._toString$1(true); - return "Instance of '" + A.Primitives_objectTypeName(object) + "'"; - }, - Primitives_currentUri() { - if (!!self.location) - return self.location.href; - return null; - }, - Primitives__fromCharCodeApply(array) { - var result, i, i0, chunkEnd, - end = array.length; - if (end <= 500) - return String.fromCharCode.apply(null, array); - for (result = "", i = 0; i < end; i = i0) { - i0 = i + 500; - chunkEnd = i0 < end ? i0 : end; - result += String.fromCharCode.apply(null, array.slice(i, chunkEnd)); - } - return result; - }, - Primitives_stringFromCodePoints(codePoints) { - var t1, _i, i, - a = A._setArrayType([], type$.JSArray_int); - for (t1 = codePoints.length, _i = 0; _i < codePoints.length; codePoints.length === t1 || (0, A.throwConcurrentModificationError)(codePoints), ++_i) { - i = codePoints[_i]; - if (!A._isInt(i)) - throw A.wrapException(A.argumentErrorValue(i)); - if (i <= 65535) - a.push(i); - else if (i <= 1114111) { - a.push(55296 + (B.JSInt_methods._shrOtherPositive$1(i - 65536, 10) & 1023)); - a.push(56320 + (i & 1023)); - } else - throw A.wrapException(A.argumentErrorValue(i)); - } - return A.Primitives__fromCharCodeApply(a); - }, - Primitives_stringFromCharCodes(charCodes) { - var t1, _i, i; - for (t1 = charCodes.length, _i = 0; _i < t1; ++_i) { - i = charCodes[_i]; - if (!A._isInt(i)) - throw A.wrapException(A.argumentErrorValue(i)); - if (i < 0) - throw A.wrapException(A.argumentErrorValue(i)); - if (i > 65535) - return A.Primitives_stringFromCodePoints(charCodes); - } - return A.Primitives__fromCharCodeApply(charCodes); - }, - Primitives_stringFromNativeUint8List(charCodes, start, end) { - var i, result, i0, chunkEnd; - if (end <= 500 && start === 0 && end === charCodes.length) - return String.fromCharCode.apply(null, charCodes); - for (i = start, result = ""; i < end; i = i0) { - i0 = i + 500; - chunkEnd = i0 < end ? i0 : end; - result += String.fromCharCode.apply(null, charCodes.subarray(i, chunkEnd)); - } - return result; - }, - Primitives_stringFromCharCode(charCode) { - var bits; - if (0 <= charCode) { - if (charCode <= 65535) - return String.fromCharCode(charCode); - if (charCode <= 1114111) { - bits = charCode - 65536; - return String.fromCharCode((B.JSInt_methods._shrOtherPositive$1(bits, 10) | 55296) >>> 0, bits & 1023 | 56320); - } - } - throw A.wrapException(A.RangeError$range(charCode, 0, 1114111, null, null)); - }, - Primitives_lazyAsJsDate(receiver) { - if (receiver.date === void 0) - receiver.date = new Date(receiver._value); - return receiver.date; - }, - Primitives_getYear(receiver) { - var t1 = A.Primitives_lazyAsJsDate(receiver).getFullYear() + 0; - return t1; - }, - Primitives_getMonth(receiver) { - var t1 = A.Primitives_lazyAsJsDate(receiver).getMonth() + 1; - return t1; - }, - Primitives_getDay(receiver) { - var t1 = A.Primitives_lazyAsJsDate(receiver).getDate() + 0; - return t1; - }, - Primitives_getHours(receiver) { - var t1 = A.Primitives_lazyAsJsDate(receiver).getHours() + 0; - return t1; - }, - Primitives_getMinutes(receiver) { - var t1 = A.Primitives_lazyAsJsDate(receiver).getMinutes() + 0; - return t1; - }, - Primitives_getSeconds(receiver) { - var t1 = A.Primitives_lazyAsJsDate(receiver).getSeconds() + 0; - return t1; - }, - Primitives_getMilliseconds(receiver) { - var t1 = A.Primitives_lazyAsJsDate(receiver).getMilliseconds() + 0; - return t1; - }, - Primitives_functionNoSuchMethod($function, positionalArguments, namedArguments) { - var $arguments, namedArgumentList, t1 = {}; - t1.argumentCount = 0; - $arguments = []; - namedArgumentList = []; - t1.argumentCount = positionalArguments.length; - B.JSArray_methods.addAll$1($arguments, positionalArguments); - t1.names = ""; - if (namedArguments != null && namedArguments.__js_helper$_length !== 0) - namedArguments.forEach$1(0, new A.Primitives_functionNoSuchMethod_closure(t1, namedArgumentList, $arguments)); - return J.noSuchMethod$1$($function, new A.JSInvocationMirror(B.Symbol_call, 0, $arguments, namedArgumentList, 0)); - }, - Primitives_applyFunction($function, positionalArguments, namedArguments) { - var t1, argumentCount, jsStub; - if (Array.isArray(positionalArguments)) - t1 = namedArguments == null || namedArguments.__js_helper$_length === 0; - else - t1 = false; - if (t1) { - argumentCount = positionalArguments.length; - if (argumentCount === 0) { - if (!!$function.call$0) - return $function.call$0(); - } else if (argumentCount === 1) { - if (!!$function.call$1) - return $function.call$1(positionalArguments[0]); - } else if (argumentCount === 2) { - if (!!$function.call$2) - return $function.call$2(positionalArguments[0], positionalArguments[1]); - } else if (argumentCount === 3) { - if (!!$function.call$3) - return $function.call$3(positionalArguments[0], positionalArguments[1], positionalArguments[2]); - } else if (argumentCount === 4) { - if (!!$function.call$4) - return $function.call$4(positionalArguments[0], positionalArguments[1], positionalArguments[2], positionalArguments[3]); - } else if (argumentCount === 5) - if (!!$function.call$5) - return $function.call$5(positionalArguments[0], positionalArguments[1], positionalArguments[2], positionalArguments[3], positionalArguments[4]); - jsStub = $function["call" + "$" + argumentCount]; - if (jsStub != null) - return jsStub.apply($function, positionalArguments); - } - return A.Primitives__generalApplyFunction($function, positionalArguments, namedArguments); - }, - Primitives__generalApplyFunction($function, positionalArguments, namedArguments) { - var defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, maxArguments, missingDefaults, keys, _i, defaultValue, used, t2, - $arguments = Array.isArray(positionalArguments) ? positionalArguments : A.List_List$of(positionalArguments, true, type$.dynamic), - argumentCount = $arguments.length, - requiredParameterCount = $function.$requiredArgCount; - if (argumentCount < requiredParameterCount) - return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - defaultValuesClosure = $function.$defaultValues; - t1 = defaultValuesClosure == null; - defaultValues = !t1 ? defaultValuesClosure() : null; - interceptor = J.getInterceptor$($function); - jsFunction = interceptor["call*"]; - if (typeof jsFunction == "string") - jsFunction = interceptor[jsFunction]; - if (t1) { - if (namedArguments != null && namedArguments.__js_helper$_length !== 0) - return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - if (argumentCount === requiredParameterCount) - return jsFunction.apply($function, $arguments); - return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - } - if (Array.isArray(defaultValues)) { - if (namedArguments != null && namedArguments.__js_helper$_length !== 0) - return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - maxArguments = requiredParameterCount + defaultValues.length; - if (argumentCount > maxArguments) - return A.Primitives_functionNoSuchMethod($function, $arguments, null); - if (argumentCount < maxArguments) { - missingDefaults = defaultValues.slice(argumentCount - requiredParameterCount); - if ($arguments === positionalArguments) - $arguments = A.List_List$of($arguments, true, type$.dynamic); - B.JSArray_methods.addAll$1($arguments, missingDefaults); - } - return jsFunction.apply($function, $arguments); - } else { - if (argumentCount > requiredParameterCount) - return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - if ($arguments === positionalArguments) - $arguments = A.List_List$of($arguments, true, type$.dynamic); - keys = Object.keys(defaultValues); - if (namedArguments == null) - for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { - defaultValue = defaultValues[keys[_i]]; - if (B.C__Required === defaultValue) - return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - B.JSArray_methods.add$1($arguments, defaultValue); - } - else { - for (t1 = keys.length, used = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { - t2 = keys[_i]; - if (namedArguments.containsKey$1(t2)) { - ++used; - B.JSArray_methods.add$1($arguments, namedArguments.$index(0, t2)); - } else { - defaultValue = defaultValues[t2]; - if (B.C__Required === defaultValue) - return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - B.JSArray_methods.add$1($arguments, defaultValue); - } - } - if (used !== namedArguments.__js_helper$_length) - return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - } - return jsFunction.apply($function, $arguments); - } - }, - Primitives_extractStackTrace(error) { - var jsError = error.$thrownJsError; - if (jsError == null) - return null; - return A.getTraceFromException(jsError); - }, - diagnoseIndexError(indexable, index) { - var $length, _s5_ = "index"; - if (!A._isInt(index)) - return new A.ArgumentError(true, index, _s5_, null); - $length = J.get$length$asx(indexable); - if (index < 0 || index >= $length) - return A.IndexError$withLength(index, $length, indexable, null, _s5_); - return A.RangeError$value(index, _s5_, null); - }, - diagnoseRangeError(start, end, $length) { - if (start < 0 || start > $length) - return A.RangeError$range(start, 0, $length, "start", null); - if (end != null) - if (end < start || end > $length) - return A.RangeError$range(end, start, $length, "end", null); - return new A.ArgumentError(true, end, "end", null); - }, - argumentErrorValue(object) { - return new A.ArgumentError(true, object, null, null); - }, - checkNum(value) { - return value; - }, - wrapException(ex) { - return A.initializeExceptionWrapper(new Error(), ex); - }, - initializeExceptionWrapper(wrapper, ex) { - var t1; - if (ex == null) - ex = new A.TypeError(); - wrapper.dartException = ex; - t1 = A.toStringWrapper; - if ("defineProperty" in Object) { - Object.defineProperty(wrapper, "message", {get: t1}); - wrapper.name = ""; - } else - wrapper.toString = t1; - return wrapper; - }, - toStringWrapper() { - return J.toString$0$(this.dartException); - }, - throwExpression(ex) { - throw A.wrapException(ex); - }, - throwExpressionWithWrapper(ex, wrapper) { - throw A.initializeExceptionWrapper(wrapper, ex); - }, - throwConcurrentModificationError(collection) { - throw A.wrapException(A.ConcurrentModificationError$(collection)); - }, - TypeErrorDecoder_extractPattern(message) { - var match, $arguments, argumentsExpr, expr, method, receiver; - message = A.quoteStringForRegExp(message.replace(String({}), "$receiver$")); - match = message.match(/\\\$[a-zA-Z]+\\\$/g); - if (match == null) - match = A._setArrayType([], type$.JSArray_String); - $arguments = match.indexOf("\\$arguments\\$"); - argumentsExpr = match.indexOf("\\$argumentsExpr\\$"); - expr = match.indexOf("\\$expr\\$"); - method = match.indexOf("\\$method\\$"); - receiver = match.indexOf("\\$receiver\\$"); - return new A.TypeErrorDecoder(message.replace(new RegExp("\\\\\\$arguments\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$", "g"), "((?:x|[^x])*)"), $arguments, argumentsExpr, expr, method, receiver); - }, - TypeErrorDecoder_provokeCallErrorOn(expression) { - return function($expr$) { - var $argumentsExpr$ = "$arguments$"; - try { - $expr$.$method$($argumentsExpr$); - } catch (e) { - return e.message; - } - }(expression); - }, - TypeErrorDecoder_provokePropertyErrorOn(expression) { - return function($expr$) { - try { - $expr$.$method$; - } catch (e) { - return e.message; - } - }(expression); - }, - JsNoSuchMethodError$(_message, match) { - var t1 = match == null, - t2 = t1 ? null : match.method; - return new A.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver); - }, - unwrapException(ex) { - if (ex == null) - return new A.NullThrownFromJavaScriptException(ex); - if (ex instanceof A.ExceptionAndStackTrace) - return A.saveStackTrace(ex, ex.dartException); - if (typeof ex !== "object") - return ex; - if ("dartException" in ex) - return A.saveStackTrace(ex, ex.dartException); - return A._unwrapNonDartException(ex); - }, - saveStackTrace(ex, error) { - if (type$.Error._is(error)) - if (error.$thrownJsError == null) - error.$thrownJsError = ex; - return error; - }, - _unwrapNonDartException(ex) { - var message, number, ieErrorCode, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match; - if (!("message" in ex)) - return ex; - message = ex.message; - if ("number" in ex && typeof ex.number == "number") { - number = ex.number; - ieErrorCode = number & 65535; - if ((B.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) - switch (ieErrorCode) { - case 438: - return A.saveStackTrace(ex, A.JsNoSuchMethodError$(A.S(message) + " (Error " + ieErrorCode + ")", null)); - case 445: - case 5007: - A.S(message); - return A.saveStackTrace(ex, new A.NullError()); - } - } - if (ex instanceof TypeError) { - nsme = $.$get$TypeErrorDecoder_noSuchMethodPattern(); - notClosure = $.$get$TypeErrorDecoder_notClosurePattern(); - nullCall = $.$get$TypeErrorDecoder_nullCallPattern(); - nullLiteralCall = $.$get$TypeErrorDecoder_nullLiteralCallPattern(); - undefCall = $.$get$TypeErrorDecoder_undefinedCallPattern(); - undefLiteralCall = $.$get$TypeErrorDecoder_undefinedLiteralCallPattern(); - nullProperty = $.$get$TypeErrorDecoder_nullPropertyPattern(); - $.$get$TypeErrorDecoder_nullLiteralPropertyPattern(); - undefProperty = $.$get$TypeErrorDecoder_undefinedPropertyPattern(); - undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); - match = nsme.matchTypeError$1(message); - if (match != null) - return A.saveStackTrace(ex, A.JsNoSuchMethodError$(message, match)); - else { - match = notClosure.matchTypeError$1(message); - if (match != null) { - match.method = "call"; - return A.saveStackTrace(ex, A.JsNoSuchMethodError$(message, match)); - } else if (nullCall.matchTypeError$1(message) != null || nullLiteralCall.matchTypeError$1(message) != null || undefCall.matchTypeError$1(message) != null || undefLiteralCall.matchTypeError$1(message) != null || nullProperty.matchTypeError$1(message) != null || nullLiteralCall.matchTypeError$1(message) != null || undefProperty.matchTypeError$1(message) != null || undefLiteralProperty.matchTypeError$1(message) != null) - return A.saveStackTrace(ex, new A.NullError()); - } - return A.saveStackTrace(ex, new A.UnknownJsTypeError(typeof message == "string" ? message : "")); - } - if (ex instanceof RangeError) { - if (typeof message == "string" && message.indexOf("call stack") !== -1) - return new A.StackOverflowError(); - message = function(ex) { - try { - return String(ex); - } catch (e) { - } - return null; - }(ex); - return A.saveStackTrace(ex, new A.ArgumentError(false, null, null, typeof message == "string" ? message.replace(/^RangeError:\s*/, "") : message)); - } - if (typeof InternalError == "function" && ex instanceof InternalError) - if (typeof message == "string" && message === "too much recursion") - return new A.StackOverflowError(); - return ex; - }, - getTraceFromException(exception) { - var trace; - if (exception instanceof A.ExceptionAndStackTrace) - return exception.stackTrace; - if (exception == null) - return new A._StackTrace(exception); - trace = exception.$cachedTrace; - if (trace != null) - return trace; - trace = new A._StackTrace(exception); - if (typeof exception === "object") - exception.$cachedTrace = trace; - return trace; - }, - objectHashCode(object) { - if (object == null) - return J.get$hashCode$(object); - if (typeof object == "object") - return A.Primitives_objectHashCode(object); - return J.get$hashCode$(object); - }, - constantHashCode(key) { - if (typeof key == "number") - return B.JSNumber_methods.get$hashCode(key); - if (key instanceof A._Type) - return A.Primitives_objectHashCode(key); - if (key instanceof A._Record) - return key.get$hashCode(key); - if (key instanceof A.Symbol) - return key.get$hashCode(0); - return A.objectHashCode(key); - }, - fillLiteralMap(keyValuePairs, result) { - var index, index0, index1, - $length = keyValuePairs.length; - for (index = 0; index < $length; index = index1) { - index0 = index + 1; - index1 = index0 + 1; - result.$indexSet(0, keyValuePairs[index], keyValuePairs[index0]); - } - return result; - }, - fillLiteralSet(values, result) { - var index, - $length = values.length; - for (index = 0; index < $length; ++index) - result.add$1(0, values[index]); - return result; - }, - _invokeClosure(closure, numberOfArguments, arg1, arg2, arg3, arg4) { - switch (numberOfArguments) { - case 0: - return closure.call$0(); - case 1: - return closure.call$1(arg1); - case 2: - return closure.call$2(arg1, arg2); - case 3: - return closure.call$3(arg1, arg2, arg3); - case 4: - return closure.call$4(arg1, arg2, arg3, arg4); - } - throw A.wrapException(new A._Exception("Unsupported number of arguments for wrapped closure")); - }, - convertDartClosureToJS(closure, arity) { - var $function; - if (closure == null) - return null; - $function = closure.$identity; - if (!!$function) - return $function; - $function = A.convertDartClosureToJSUncached(closure, arity); - closure.$identity = $function; - return $function; - }, - convertDartClosureToJSUncached(closure, arity) { - var entry; - switch (arity) { - case 0: - entry = closure.call$0; - break; - case 1: - entry = closure.call$1; - break; - case 2: - entry = closure.call$2; - break; - case 3: - entry = closure.call$3; - break; - case 4: - entry = closure.call$4; - break; - default: - entry = null; - } - if (entry != null) - return entry.bind(closure); - return function(closure, arity, invoke) { - return function(a1, a2, a3, a4) { - return invoke(closure, arity, a1, a2, a3, a4); - }; - }(closure, arity, A._invokeClosure); - }, - Closure_fromTearOff(parameters) { - var $prototype, $constructor, t2, trampoline, applyTrampoline, i, stub, stub0, stubName, stubCallName, - container = parameters.co, - isStatic = parameters.iS, - isIntercepted = parameters.iI, - needsDirectAccess = parameters.nDA, - applyTrampolineIndex = parameters.aI, - funsOrNames = parameters.fs, - callNames = parameters.cs, - $name = funsOrNames[0], - callName = callNames[0], - $function = container[$name], - t1 = parameters.fT; - t1.toString; - $prototype = isStatic ? Object.create(new A.StaticClosure().constructor.prototype) : Object.create(new A.BoundClosure(null, null).constructor.prototype); - $prototype.$initialize = $prototype.constructor; - $constructor = isStatic ? function static_tear_off() { - this.$initialize(); - } : function tear_off(a, b) { - this.$initialize(a, b); - }; - $prototype.constructor = $constructor; - $constructor.prototype = $prototype; - $prototype.$_name = $name; - $prototype.$_target = $function; - t2 = !isStatic; - if (t2) - trampoline = A.Closure_forwardCallTo($name, $function, isIntercepted, needsDirectAccess); - else { - $prototype.$static_name = $name; - trampoline = $function; - } - $prototype.$signature = A.Closure__computeSignatureFunctionNewRti(t1, isStatic, isIntercepted); - $prototype[callName] = trampoline; - for (applyTrampoline = trampoline, i = 1; i < funsOrNames.length; ++i) { - stub = funsOrNames[i]; - if (typeof stub == "string") { - stub0 = container[stub]; - stubName = stub; - stub = stub0; - } else - stubName = ""; - stubCallName = callNames[i]; - if (stubCallName != null) { - if (t2) - stub = A.Closure_forwardCallTo(stubName, stub, isIntercepted, needsDirectAccess); - $prototype[stubCallName] = stub; - } - if (i === applyTrampolineIndex) - applyTrampoline = stub; - } - $prototype["call*"] = applyTrampoline; - $prototype.$requiredArgCount = parameters.rC; - $prototype.$defaultValues = parameters.dV; - return $constructor; - }, - Closure__computeSignatureFunctionNewRti(functionType, isStatic, isIntercepted) { - if (typeof functionType == "number") - return functionType; - if (typeof functionType == "string") { - if (isStatic) - throw A.wrapException("Cannot compute signature for static tearoff."); - return function(recipe, evalOnReceiver) { - return function() { - return evalOnReceiver(this, recipe); - }; - }(functionType, A.BoundClosure_evalRecipe); - } - throw A.wrapException("Error in functionType of tearoff"); - }, - Closure_cspForwardCall(arity, needsDirectAccess, stubName, $function) { - var getReceiver = A.BoundClosure_receiverOf; - switch (needsDirectAccess ? -1 : arity) { - case 0: - return function(entry, receiverOf) { - return function() { - return receiverOf(this)[entry](); - }; - }(stubName, getReceiver); - case 1: - return function(entry, receiverOf) { - return function(a) { - return receiverOf(this)[entry](a); - }; - }(stubName, getReceiver); - case 2: - return function(entry, receiverOf) { - return function(a, b) { - return receiverOf(this)[entry](a, b); - }; - }(stubName, getReceiver); - case 3: - return function(entry, receiverOf) { - return function(a, b, c) { - return receiverOf(this)[entry](a, b, c); - }; - }(stubName, getReceiver); - case 4: - return function(entry, receiverOf) { - return function(a, b, c, d) { - return receiverOf(this)[entry](a, b, c, d); - }; - }(stubName, getReceiver); - case 5: - return function(entry, receiverOf) { - return function(a, b, c, d, e) { - return receiverOf(this)[entry](a, b, c, d, e); - }; - }(stubName, getReceiver); - default: - return function(f, receiverOf) { - return function() { - return f.apply(receiverOf(this), arguments); - }; - }($function, getReceiver); - } - }, - Closure_forwardCallTo(stubName, $function, isIntercepted, needsDirectAccess) { - if (isIntercepted) - return A.Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess); - return A.Closure_cspForwardCall($function.length, needsDirectAccess, stubName, $function); - }, - Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function) { - var getReceiver = A.BoundClosure_receiverOf, - getInterceptor = A.BoundClosure_interceptorOf; - switch (needsDirectAccess ? -1 : arity) { - case 0: - throw A.wrapException(new A.RuntimeError("Intercepted function with no arguments.")); - case 1: - return function(entry, interceptorOf, receiverOf) { - return function() { - return interceptorOf(this)[entry](receiverOf(this)); - }; - }(stubName, getInterceptor, getReceiver); - case 2: - return function(entry, interceptorOf, receiverOf) { - return function(a) { - return interceptorOf(this)[entry](receiverOf(this), a); - }; - }(stubName, getInterceptor, getReceiver); - case 3: - return function(entry, interceptorOf, receiverOf) { - return function(a, b) { - return interceptorOf(this)[entry](receiverOf(this), a, b); - }; - }(stubName, getInterceptor, getReceiver); - case 4: - return function(entry, interceptorOf, receiverOf) { - return function(a, b, c) { - return interceptorOf(this)[entry](receiverOf(this), a, b, c); - }; - }(stubName, getInterceptor, getReceiver); - case 5: - return function(entry, interceptorOf, receiverOf) { - return function(a, b, c, d) { - return interceptorOf(this)[entry](receiverOf(this), a, b, c, d); - }; - }(stubName, getInterceptor, getReceiver); - case 6: - return function(entry, interceptorOf, receiverOf) { - return function(a, b, c, d, e) { - return interceptorOf(this)[entry](receiverOf(this), a, b, c, d, e); - }; - }(stubName, getInterceptor, getReceiver); - default: - return function(f, interceptorOf, receiverOf) { - return function() { - var a = [receiverOf(this)]; - Array.prototype.push.apply(a, arguments); - return f.apply(interceptorOf(this), a); - }; - }($function, getInterceptor, getReceiver); - } - }, - Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess) { - var arity, t1; - if ($.BoundClosure__interceptorFieldNameCache == null) - $.BoundClosure__interceptorFieldNameCache = A.BoundClosure__computeFieldNamed("interceptor"); - if ($.BoundClosure__receiverFieldNameCache == null) - $.BoundClosure__receiverFieldNameCache = A.BoundClosure__computeFieldNamed("receiver"); - arity = $function.length; - t1 = A.Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function); - return t1; - }, - closureFromTearOff(parameters) { - return A.Closure_fromTearOff(parameters); - }, - BoundClosure_evalRecipe(closure, recipe) { - return A._Universe_evalInEnvironment(init.typeUniverse, A.instanceType(closure._receiver), recipe); - }, - BoundClosure_receiverOf(closure) { - return closure._receiver; - }, - BoundClosure_interceptorOf(closure) { - return closure._interceptor; - }, - BoundClosure__computeFieldNamed(fieldName) { - var t1, i, $name, - template = new A.BoundClosure("receiver", "interceptor"), - names = J.JSArray_markFixedList(Object.getOwnPropertyNames(template)); - for (t1 = names.length, i = 0; i < t1; ++i) { - $name = names[i]; - if (template[$name] === fieldName) - return $name; - } - throw A.wrapException(A.ArgumentError$("Field name " + fieldName + " not found.", null)); - }, - throwCyclicInit(staticName) { - throw A.wrapException(new A._CyclicInitializationError(staticName)); - }, - getIsolateAffinityTag($name) { - return init.getIsolateTag($name); - }, - LinkedHashMapKeyIterator$(_map, _modifications) { - var t1 = new A.LinkedHashMapKeyIterator(_map, _modifications); - t1.__js_helper$_cell = _map.__js_helper$_first; - return t1; - }, - defineProperty(obj, property, value) { - Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true}); - }, - lookupAndCacheInterceptor(obj) { - var interceptor, interceptorClass, altTag, mark, t1, - tag = $.getTagFunction.call$1(obj), - record = $.dispatchRecordsForInstanceTags[tag]; - if (record != null) { - Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); - return record.i; - } - interceptor = $.interceptorsForUncacheableTags[tag]; - if (interceptor != null) - return interceptor; - interceptorClass = init.interceptorsByTag[tag]; - if (interceptorClass == null) { - altTag = $.alternateTagFunction.call$2(obj, tag); - if (altTag != null) { - record = $.dispatchRecordsForInstanceTags[altTag]; - if (record != null) { - Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); - return record.i; - } - interceptor = $.interceptorsForUncacheableTags[altTag]; - if (interceptor != null) - return interceptor; - interceptorClass = init.interceptorsByTag[altTag]; - tag = altTag; - } - } - if (interceptorClass == null) - return null; - interceptor = interceptorClass.prototype; - mark = tag[0]; - if (mark === "!") { - record = A.makeLeafDispatchRecord(interceptor); - $.dispatchRecordsForInstanceTags[tag] = record; - Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); - return record.i; - } - if (mark === "~") { - $.interceptorsForUncacheableTags[tag] = interceptor; - return interceptor; - } - if (mark === "-") { - t1 = A.makeLeafDispatchRecord(interceptor); - Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); - return t1.i; - } - if (mark === "+") - return A.patchInteriorProto(obj, interceptor); - if (mark === "*") - throw A.wrapException(A.UnimplementedError$(tag)); - if (init.leafTags[tag] === true) { - t1 = A.makeLeafDispatchRecord(interceptor); - Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); - return t1.i; - } else - return A.patchInteriorProto(obj, interceptor); - }, - patchInteriorProto(obj, interceptor) { - var proto = Object.getPrototypeOf(obj); - Object.defineProperty(proto, init.dispatchPropertyName, {value: J.makeDispatchRecord(interceptor, proto, null, null), enumerable: false, writable: true, configurable: true}); - return interceptor; - }, - makeLeafDispatchRecord(interceptor) { - return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior); - }, - makeDefaultDispatchRecord(tag, interceptorClass, proto) { - var interceptor = interceptorClass.prototype; - if (init.leafTags[tag] === true) - return A.makeLeafDispatchRecord(interceptor); - else - return J.makeDispatchRecord(interceptor, proto, null, null); - }, - initNativeDispatch() { - if (true === $.initNativeDispatchFlag) - return; - $.initNativeDispatchFlag = true; - A.initNativeDispatchContinue(); - }, - initNativeDispatchContinue() { - var map, tags, fun, i, tag, proto, record, interceptorClass; - $.dispatchRecordsForInstanceTags = Object.create(null); - $.interceptorsForUncacheableTags = Object.create(null); - A.initHooks(); - map = init.interceptorsByTag; - tags = Object.getOwnPropertyNames(map); - if (typeof window != "undefined") { - window; - fun = function() { - }; - for (i = 0; i < tags.length; ++i) { - tag = tags[i]; - proto = $.prototypeForTagFunction.call$1(tag); - if (proto != null) { - record = A.makeDefaultDispatchRecord(tag, map[tag], proto); - if (record != null) { - Object.defineProperty(proto, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); - fun.prototype = proto; - } - } - } - } - for (i = 0; i < tags.length; ++i) { - tag = tags[i]; - if (/^[A-Za-z_]/.test(tag)) { - interceptorClass = map[tag]; - map["!" + tag] = interceptorClass; - map["~" + tag] = interceptorClass; - map["-" + tag] = interceptorClass; - map["+" + tag] = interceptorClass; - map["*" + tag] = interceptorClass; - } - } - }, - initHooks() { - var transformers, i, transformer, getTag, getUnknownTag, prototypeForTag, - hooks = B.C_JS_CONST0(); - hooks = A.applyHooksTransformer(B.C_JS_CONST1, A.applyHooksTransformer(B.C_JS_CONST2, A.applyHooksTransformer(B.C_JS_CONST3, A.applyHooksTransformer(B.C_JS_CONST3, A.applyHooksTransformer(B.C_JS_CONST4, A.applyHooksTransformer(B.C_JS_CONST5, A.applyHooksTransformer(B.C_JS_CONST6(B.C_JS_CONST), hooks))))))); - if (typeof dartNativeDispatchHooksTransformer != "undefined") { - transformers = dartNativeDispatchHooksTransformer; - if (typeof transformers == "function") - transformers = [transformers]; - if (Array.isArray(transformers)) - for (i = 0; i < transformers.length; ++i) { - transformer = transformers[i]; - if (typeof transformer == "function") - hooks = transformer(hooks) || hooks; - } - } - getTag = hooks.getTag; - getUnknownTag = hooks.getUnknownTag; - prototypeForTag = hooks.prototypeForTag; - $.getTagFunction = new A.initHooks_closure(getTag); - $.alternateTagFunction = new A.initHooks_closure0(getUnknownTag); - $.prototypeForTagFunction = new A.initHooks_closure1(prototypeForTag); - }, - applyHooksTransformer(transformer, hooks) { - return transformer(hooks) || hooks; - }, - _RecordN__equalValues(a, b) { - var i; - for (i = 0; i < a.length; ++i) - if (!J.$eq$(a[i], b[i])) - return false; - return true; - }, - createRecordTypePredicate(shape, fieldRtis) { - var $length = fieldRtis.length, - $function = init.rttc["" + $length + ";" + shape]; - if ($function == null) - return null; - if ($length === 0) - return $function; - if ($length === $function.length) - return $function.apply(null, fieldRtis); - return $function(fieldRtis); - }, - JSSyntaxRegExp_makeNative(source, multiLine, caseSensitive, unicode, dotAll, global) { - var m = multiLine ? "m" : "", - i = caseSensitive ? "" : "i", - u = unicode ? "u" : "", - s = dotAll ? "s" : "", - g = global ? "g" : "", - regexp = function(source, modifiers) { - try { - return new RegExp(source, modifiers); - } catch (e) { - return e; - } - }(source, m + i + u + s + g); - if (regexp instanceof RegExp) - return regexp; - throw A.wrapException(A.FormatException$("Illegal RegExp pattern (" + String(regexp) + ")", source, null)); - }, - stringContainsUnchecked(receiver, other, startIndex) { - var t1; - if (typeof other == "string") - return receiver.indexOf(other, startIndex) >= 0; - else if (other instanceof A.JSSyntaxRegExp) { - t1 = B.JSString_methods.substring$1(receiver, startIndex); - return other._nativeRegExp.test(t1); - } else - return !J.allMatches$1$s(other, B.JSString_methods.substring$1(receiver, startIndex)).get$isEmpty(0); - }, - escapeReplacement(replacement) { - if (replacement.indexOf("$", 0) >= 0) - return replacement.replace(/\$/g, "$$$$"); - return replacement; - }, - stringReplaceFirstRE(receiver, regexp, replacement, startIndex) { - var match = regexp._execGlobal$2(receiver, startIndex); - if (match == null) - return receiver; - return A.stringReplaceRangeUnchecked(receiver, match._match.index, match.get$end(0), replacement); - }, - quoteStringForRegExp(string) { - if (/[[\]{}()*+?.\\^$|]/.test(string)) - return string.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"); - return string; - }, - stringReplaceAllUnchecked(receiver, pattern, replacement) { - var nativeRegexp; - if (typeof pattern == "string") - return A.stringReplaceAllUncheckedString(receiver, pattern, replacement); - if (pattern instanceof A.JSSyntaxRegExp) { - nativeRegexp = pattern.get$_nativeGlobalVersion(); - nativeRegexp.lastIndex = 0; - return receiver.replace(nativeRegexp, A.escapeReplacement(replacement)); - } - return A.stringReplaceAllGeneral(receiver, pattern, replacement); - }, - stringReplaceAllGeneral(receiver, pattern, replacement) { - var t1, startIndex, t2, match; - for (t1 = J.allMatches$1$s(pattern, receiver), t1 = t1.get$iterator(t1), startIndex = 0, t2 = ""; t1.moveNext$0();) { - match = t1.get$current(t1); - t2 = t2 + receiver.substring(startIndex, match.get$start(match)) + replacement; - startIndex = match.get$end(match); - } - t1 = t2 + receiver.substring(startIndex); - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - stringReplaceAllUncheckedString(receiver, pattern, replacement) { - var $length, t1, i; - if (pattern === "") { - if (receiver === "") - return replacement; - $length = receiver.length; - t1 = "" + replacement; - for (i = 0; i < $length; ++i) - t1 = t1 + receiver[i] + replacement; - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - if (receiver.indexOf(pattern, 0) < 0) - return receiver; - if (receiver.length < 500 || replacement.indexOf("$", 0) >= 0) - return receiver.split(pattern).join(replacement); - return receiver.replace(new RegExp(A.quoteStringForRegExp(pattern), "g"), A.escapeReplacement(replacement)); - }, - stringReplaceFirstUnchecked(receiver, pattern, replacement, startIndex) { - var index, t1, matches, match; - if (typeof pattern == "string") { - index = receiver.indexOf(pattern, startIndex); - if (index < 0) - return receiver; - return A.stringReplaceRangeUnchecked(receiver, index, index + pattern.length, replacement); - } - if (pattern instanceof A.JSSyntaxRegExp) - return startIndex === 0 ? receiver.replace(pattern._nativeRegExp, A.escapeReplacement(replacement)) : A.stringReplaceFirstRE(receiver, pattern, replacement, startIndex); - t1 = J.allMatches$2$s(pattern, receiver, startIndex); - matches = t1.get$iterator(t1); - if (!matches.moveNext$0()) - return receiver; - match = matches.get$current(matches); - return B.JSString_methods.replaceRange$3(receiver, match.get$start(match), match.get$end(match), replacement); - }, - stringReplaceRangeUnchecked(receiver, start, end, replacement) { - return receiver.substring(0, start) + replacement + receiver.substring(end); - }, - _Record_1: function _Record_1(t0) { - this._0 = t0; - }, - _Record_2: function _Record_2(t0, t1) { - this._0 = t0; - this._1 = t1; - }, - _Record_2_forImport: function _Record_2_forImport(t0, t1) { - this._0 = t0; - this._1 = t1; - }, - _Record_2_imports_modules: function _Record_2_imports_modules(t0, t1) { - this._0 = t0; - this._1 = t1; - }, - _Record_2_loadedUrls_stylesheet: function _Record_2_loadedUrls_stylesheet(t0, t1) { - this._0 = t0; - this._1 = t1; - }, - _Record_2_sourceMap: function _Record_2_sourceMap(t0, t1) { - this._0 = t0; - this._1 = t1; - }, - _Record_3: function _Record_3(t0, t1, t2) { - this._0 = t0; - this._1 = t1; - this._2 = t2; - }, - _Record_3_deprecation_message_span: function _Record_3_deprecation_message_span(t0, t1, t2) { - this._0 = t0; - this._1 = t1; - this._2 = t2; - }, - _Record_3_forImport: function _Record_3_forImport(t0, t1, t2) { - this._0 = t0; - this._1 = t1; - this._2 = t2; - }, - _Record_3_importer_isDependency: function _Record_3_importer_isDependency(t0, t1, t2) { - this._0 = t0; - this._1 = t1; - this._2 = t2; - }, - _Record_3_originalUrl: function _Record_3_originalUrl(t0, t1, t2) { - this._0 = t0; - this._1 = t1; - this._2 = t2; - }, - _Record_5_named_namedNodes_positional_positionalNodes_separator: function _Record_5_named_namedNodes_positional_positionalNodes_separator(t0) { - this._values = t0; - }, - ConstantMapView: function ConstantMapView(t0, t1) { - this._map = t0; - this.$ti = t1; - }, - ConstantMap: function ConstantMap() { - }, - ConstantStringMap: function ConstantStringMap(t0, t1, t2) { - this._jsIndex = t0; - this._values = t1; - this.$ti = t2; - }, - _KeysOrValues: function _KeysOrValues(t0, t1) { - this._elements = t0; - this.$ti = t1; - }, - _KeysOrValuesOrElementsIterator: function _KeysOrValuesOrElementsIterator(t0, t1, t2) { - var _ = this; - _._elements = t0; - _.__js_helper$_length = t1; - _.__js_helper$_index = 0; - _.__js_helper$_current = null; - _.$ti = t2; - }, - ConstantSet: function ConstantSet() { - }, - ConstantStringSet: function ConstantStringSet(t0, t1, t2) { - this._jsIndex = t0; - this.__js_helper$_length = t1; - this.$ti = t2; - }, - GeneralConstantSet: function GeneralConstantSet(t0, t1) { - this._elements = t0; - this.$ti = t1; - }, - Instantiation: function Instantiation() { - }, - Instantiation1: function Instantiation1(t0, t1) { - this._genericClosure = t0; - this.$ti = t1; - }, - JSInvocationMirror: function JSInvocationMirror(t0, t1, t2, t3, t4) { - var _ = this; - _.__js_helper$_memberName = t0; - _.__js_helper$_kind = t1; - _._arguments = t2; - _._namedArgumentNames = t3; - _._typeArgumentCount = t4; - }, - Primitives_functionNoSuchMethod_closure: function Primitives_functionNoSuchMethod_closure(t0, t1, t2) { - this._box_0 = t0; - this.namedArgumentList = t1; - this.$arguments = t2; - }, - TypeErrorDecoder: function TypeErrorDecoder(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._pattern = t0; - _._arguments = t1; - _._argumentsExpr = t2; - _._expr = t3; - _._method = t4; - _._receiver = t5; - }, - NullError: function NullError() { - }, - JsNoSuchMethodError: function JsNoSuchMethodError(t0, t1, t2) { - this.__js_helper$_message = t0; - this._method = t1; - this._receiver = t2; - }, - UnknownJsTypeError: function UnknownJsTypeError(t0) { - this.__js_helper$_message = t0; - }, - NullThrownFromJavaScriptException: function NullThrownFromJavaScriptException(t0) { - this._irritant = t0; - }, - ExceptionAndStackTrace: function ExceptionAndStackTrace(t0, t1) { - this.dartException = t0; - this.stackTrace = t1; - }, - _StackTrace: function _StackTrace(t0) { - this._exception = t0; - this._trace = null; - }, - Closure: function Closure() { - }, - Closure0Args: function Closure0Args() { - }, - Closure2Args: function Closure2Args() { - }, - TearOffClosure: function TearOffClosure() { - }, - StaticClosure: function StaticClosure() { - }, - BoundClosure: function BoundClosure(t0, t1) { - this._receiver = t0; - this._interceptor = t1; - }, - _CyclicInitializationError: function _CyclicInitializationError(t0) { - this.variableName = t0; - }, - RuntimeError: function RuntimeError(t0) { - this.message = t0; - }, - _Required: function _Required() { - }, - JsLinkedHashMap: function JsLinkedHashMap(t0) { - var _ = this; - _.__js_helper$_length = 0; - _.__js_helper$_last = _.__js_helper$_first = _.__js_helper$_rest = _.__js_helper$_nums = _.__js_helper$_strings = null; - _.__js_helper$_modifications = 0; - _.$ti = t0; - }, - JsLinkedHashMap_values_closure: function JsLinkedHashMap_values_closure(t0) { - this.$this = t0; - }, - JsLinkedHashMap_addAll_closure: function JsLinkedHashMap_addAll_closure(t0) { - this.$this = t0; - }, - LinkedHashMapCell: function LinkedHashMapCell(t0, t1) { - var _ = this; - _.hashMapCellKey = t0; - _.hashMapCellValue = t1; - _.__js_helper$_previous = _.__js_helper$_next = null; - }, - LinkedHashMapKeyIterable: function LinkedHashMapKeyIterable(t0, t1) { - this.__js_helper$_map = t0; - this.$ti = t1; - }, - LinkedHashMapKeyIterator: function LinkedHashMapKeyIterator(t0, t1) { - var _ = this; - _.__js_helper$_map = t0; - _.__js_helper$_modifications = t1; - _.__js_helper$_current = _.__js_helper$_cell = null; - }, - JsIdentityLinkedHashMap: function JsIdentityLinkedHashMap(t0) { - var _ = this; - _.__js_helper$_length = 0; - _.__js_helper$_last = _.__js_helper$_first = _.__js_helper$_rest = _.__js_helper$_nums = _.__js_helper$_strings = null; - _.__js_helper$_modifications = 0; - _.$ti = t0; - }, - JsConstantLinkedHashMap: function JsConstantLinkedHashMap(t0) { - var _ = this; - _.__js_helper$_length = 0; - _.__js_helper$_last = _.__js_helper$_first = _.__js_helper$_rest = _.__js_helper$_nums = _.__js_helper$_strings = null; - _.__js_helper$_modifications = 0; - _.$ti = t0; - }, - initHooks_closure: function initHooks_closure(t0) { - this.getTag = t0; - }, - initHooks_closure0: function initHooks_closure0(t0) { - this.getUnknownTag = t0; - }, - initHooks_closure1: function initHooks_closure1(t0) { - this.prototypeForTag = t0; - }, - _Record: function _Record() { - }, - _Record2: function _Record2() { - }, - _Record1: function _Record1() { - }, - _Record3: function _Record3() { - }, - _RecordN: function _RecordN() { - }, - JSSyntaxRegExp: function JSSyntaxRegExp(t0, t1) { - var _ = this; - _.pattern = t0; - _._nativeRegExp = t1; - _._nativeAnchoredRegExp = _._nativeGlobalRegExp = null; - }, - _MatchImplementation: function _MatchImplementation(t0) { - this._match = t0; - }, - _AllMatchesIterable: function _AllMatchesIterable(t0, t1, t2) { - this._re = t0; - this.__js_helper$_string = t1; - this.__js_helper$_start = t2; - }, - _AllMatchesIterator: function _AllMatchesIterator(t0, t1, t2) { - var _ = this; - _._regExp = t0; - _.__js_helper$_string = t1; - _._nextIndex = t2; - _.__js_helper$_current = null; - }, - StringMatch: function StringMatch(t0, t1) { - this.start = t0; - this.pattern = t1; - }, - _StringAllMatchesIterable: function _StringAllMatchesIterable(t0, t1, t2) { - this._input = t0; - this._pattern = t1; - this.__js_helper$_index = t2; - }, - _StringAllMatchesIterator: function _StringAllMatchesIterator(t0, t1, t2) { - var _ = this; - _._input = t0; - _._pattern = t1; - _.__js_helper$_index = t2; - _.__js_helper$_current = null; - }, - throwLateFieldADI(fieldName) { - A.throwExpressionWithWrapper(new A.LateError("Field '" + fieldName + "' has been assigned during initialization."), new Error()); - }, - throwUnnamedLateFieldNI() { - A.throwExpressionWithWrapper(new A.LateError("Field '' has not been initialized."), new Error()); - }, - throwUnnamedLateFieldAI() { - A.throwExpressionWithWrapper(new A.LateError("Field '' has already been initialized."), new Error()); - }, - throwUnnamedLateFieldADI() { - A.throwExpressionWithWrapper(new A.LateError("Field '' has been assigned during initialization."), new Error()); - }, - _Cell$() { - var t1 = new A._Cell(); - return t1.__late_helper$_value = t1; - }, - _Cell: function _Cell() { - this.__late_helper$_value = null; - }, - _ensureNativeList(list) { - return list; - }, - NativeFloat64List_NativeFloat64List$fromList(elements) { - return new Float64Array(A._ensureNativeList(elements)); - }, - NativeInt8List__create1(arg) { - return new Int8Array(arg); - }, - NativeUint8List_NativeUint8List($length) { - return new Uint8Array($length); - }, - _checkValidIndex(index, list, $length) { - if (index >>> 0 !== index || index >= $length) - throw A.wrapException(A.diagnoseIndexError(list, index)); - }, - _checkValidRange(start, end, $length) { - var t1; - if (!(start >>> 0 !== start)) - if (end == null) - t1 = start > $length; - else - t1 = end >>> 0 !== end || start > end || end > $length; - else - t1 = true; - if (t1) - throw A.wrapException(A.diagnoseRangeError(start, end, $length)); - if (end == null) - return $length; - return end; - }, - NativeByteBuffer: function NativeByteBuffer() { - }, - NativeTypedData: function NativeTypedData() { - }, - NativeByteData: function NativeByteData() { - }, - NativeTypedArray: function NativeTypedArray() { - }, - NativeTypedArrayOfDouble: function NativeTypedArrayOfDouble() { - }, - NativeTypedArrayOfInt: function NativeTypedArrayOfInt() { - }, - NativeFloat32List: function NativeFloat32List() { - }, - NativeFloat64List: function NativeFloat64List() { - }, - NativeInt16List: function NativeInt16List() { - }, - NativeInt32List: function NativeInt32List() { - }, - NativeInt8List: function NativeInt8List() { - }, - NativeUint16List: function NativeUint16List() { - }, - NativeUint32List: function NativeUint32List() { - }, - NativeUint8ClampedList: function NativeUint8ClampedList() { - }, - NativeUint8List: function NativeUint8List() { - }, - _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin() { - }, - _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin() { - }, - _NativeTypedArrayOfInt_NativeTypedArray_ListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin() { - }, - _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin() { - }, - Rti__getQuestionFromStar(universe, rti) { - var question = rti._precomputed1; - return question == null ? rti._precomputed1 = A._Universe__lookupQuestionRti(universe, rti._primary, true) : question; - }, - Rti__getFutureFromFutureOr(universe, rti) { - var future = rti._precomputed1; - return future == null ? rti._precomputed1 = A._Universe__lookupInterfaceRti(universe, "Future", [rti._primary]) : future; - }, - Rti__isUnionOfFunctionType(rti) { - var kind = rti._kind; - if (kind === 6 || kind === 7 || kind === 8) - return A.Rti__isUnionOfFunctionType(rti._primary); - return kind === 12 || kind === 13; - }, - Rti__getCanonicalRecipe(rti) { - return rti._canonicalRecipe; - }, - pairwiseIsTest(fieldRtis, values) { - var i, - $length = values.length; - for (i = 0; i < $length; ++i) - if (!fieldRtis[i]._is(values[i])) - return false; - return true; - }, - findType(recipe) { - return A._Universe_eval(init.typeUniverse, recipe, false); - }, - instantiatedGenericFunctionType(genericFunctionRti, instantiationRti) { - var t1, cache, key, probe, rti; - if (genericFunctionRti == null) - return null; - t1 = instantiationRti._rest; - cache = genericFunctionRti._bindCache; - if (cache == null) - cache = genericFunctionRti._bindCache = new Map(); - key = instantiationRti._canonicalRecipe; - probe = cache.get(key); - if (probe != null) - return probe; - rti = A._substitute(init.typeUniverse, genericFunctionRti._primary, t1, 0); - cache.set(key, rti); - return rti; - }, - _substitute(universe, rti, typeArguments, depth) { - var baseType, substitutedBaseType, interfaceTypeArguments, substitutedInterfaceTypeArguments, base, substitutedBase, $arguments, substitutedArguments, t1, fields, substitutedFields, returnType, substitutedReturnType, functionParameters, substitutedFunctionParameters, bounds, substitutedBounds, index, argument, - kind = rti._kind; - switch (kind) { - case 5: - case 1: - case 2: - case 3: - case 4: - return rti; - case 6: - baseType = rti._primary; - substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); - if (substitutedBaseType === baseType) - return rti; - return A._Universe__lookupStarRti(universe, substitutedBaseType, true); - case 7: - baseType = rti._primary; - substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); - if (substitutedBaseType === baseType) - return rti; - return A._Universe__lookupQuestionRti(universe, substitutedBaseType, true); - case 8: - baseType = rti._primary; - substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); - if (substitutedBaseType === baseType) - return rti; - return A._Universe__lookupFutureOrRti(universe, substitutedBaseType, true); - case 9: - interfaceTypeArguments = rti._rest; - substitutedInterfaceTypeArguments = A._substituteArray(universe, interfaceTypeArguments, typeArguments, depth); - if (substitutedInterfaceTypeArguments === interfaceTypeArguments) - return rti; - return A._Universe__lookupInterfaceRti(universe, rti._primary, substitutedInterfaceTypeArguments); - case 10: - base = rti._primary; - substitutedBase = A._substitute(universe, base, typeArguments, depth); - $arguments = rti._rest; - substitutedArguments = A._substituteArray(universe, $arguments, typeArguments, depth); - if (substitutedBase === base && substitutedArguments === $arguments) - return rti; - return A._Universe__lookupBindingRti(universe, substitutedBase, substitutedArguments); - case 11: - t1 = rti._primary; - fields = rti._rest; - substitutedFields = A._substituteArray(universe, fields, typeArguments, depth); - if (substitutedFields === fields) - return rti; - return A._Universe__lookupRecordRti(universe, t1, substitutedFields); - case 12: - returnType = rti._primary; - substitutedReturnType = A._substitute(universe, returnType, typeArguments, depth); - functionParameters = rti._rest; - substitutedFunctionParameters = A._substituteFunctionParameters(universe, functionParameters, typeArguments, depth); - if (substitutedReturnType === returnType && substitutedFunctionParameters === functionParameters) - return rti; - return A._Universe__lookupFunctionRti(universe, substitutedReturnType, substitutedFunctionParameters); - case 13: - bounds = rti._rest; - depth += bounds.length; - substitutedBounds = A._substituteArray(universe, bounds, typeArguments, depth); - base = rti._primary; - substitutedBase = A._substitute(universe, base, typeArguments, depth); - if (substitutedBounds === bounds && substitutedBase === base) - return rti; - return A._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, true); - case 14: - index = rti._primary; - if (index < depth) - return rti; - argument = typeArguments[index - depth]; - if (argument == null) - return rti; - return argument; - default: - throw A.wrapException(A.AssertionError$("Attempted to substitute unexpected RTI kind " + kind)); - } - }, - _substituteArray(universe, rtiArray, typeArguments, depth) { - var changed, i, rti, substitutedRti, - $length = rtiArray.length, - result = A._Utils_newArrayOrEmpty($length); - for (changed = false, i = 0; i < $length; ++i) { - rti = rtiArray[i]; - substitutedRti = A._substitute(universe, rti, typeArguments, depth); - if (substitutedRti !== rti) - changed = true; - result[i] = substitutedRti; - } - return changed ? result : rtiArray; - }, - _substituteNamed(universe, namedArray, typeArguments, depth) { - var changed, i, t1, t2, rti, substitutedRti, - $length = namedArray.length, - result = A._Utils_newArrayOrEmpty($length); - for (changed = false, i = 0; i < $length; i += 3) { - t1 = namedArray[i]; - t2 = namedArray[i + 1]; - rti = namedArray[i + 2]; - substitutedRti = A._substitute(universe, rti, typeArguments, depth); - if (substitutedRti !== rti) - changed = true; - result.splice(i, 3, t1, t2, substitutedRti); - } - return changed ? result : namedArray; - }, - _substituteFunctionParameters(universe, functionParameters, typeArguments, depth) { - var result, - requiredPositional = functionParameters._requiredPositional, - substitutedRequiredPositional = A._substituteArray(universe, requiredPositional, typeArguments, depth), - optionalPositional = functionParameters._optionalPositional, - substitutedOptionalPositional = A._substituteArray(universe, optionalPositional, typeArguments, depth), - named = functionParameters._named, - substitutedNamed = A._substituteNamed(universe, named, typeArguments, depth); - if (substitutedRequiredPositional === requiredPositional && substitutedOptionalPositional === optionalPositional && substitutedNamed === named) - return functionParameters; - result = new A._FunctionParameters(); - result._requiredPositional = substitutedRequiredPositional; - result._optionalPositional = substitutedOptionalPositional; - result._named = substitutedNamed; - return result; - }, - _setArrayType(target, rti) { - target[init.arrayRti] = rti; - return target; - }, - closureFunctionType(closure) { - var signature = closure.$signature; - if (signature != null) { - if (typeof signature == "number") - return A.getTypeFromTypesTable(signature); - return closure.$signature(); - } - return null; - }, - instanceOrFunctionType(object, testRti) { - var rti; - if (A.Rti__isUnionOfFunctionType(testRti)) - if (object instanceof A.Closure) { - rti = A.closureFunctionType(object); - if (rti != null) - return rti; - } - return A.instanceType(object); - }, - instanceType(object) { - if (object instanceof A.Object) - return A._instanceType(object); - if (Array.isArray(object)) - return A._arrayInstanceType(object); - return A._instanceTypeFromConstructor(J.getInterceptor$(object)); - }, - _arrayInstanceType(object) { - var rti = object[init.arrayRti], - defaultRti = type$.JSArray_dynamic; - if (rti == null) - return defaultRti; - if (rti.constructor !== defaultRti.constructor) - return defaultRti; - return rti; - }, - _instanceType(object) { - var rti = object.$ti; - return rti != null ? rti : A._instanceTypeFromConstructor(object); - }, - _instanceTypeFromConstructor(instance) { - var $constructor = instance.constructor, - probe = $constructor.$ccache; - if (probe != null) - return probe; - return A._instanceTypeFromConstructorMiss(instance, $constructor); - }, - _instanceTypeFromConstructorMiss(instance, $constructor) { - var effectiveConstructor = instance instanceof A.Closure ? Object.getPrototypeOf(Object.getPrototypeOf(instance)).constructor : $constructor, - rti = A._Universe_findErasedType(init.typeUniverse, effectiveConstructor.name); - $constructor.$ccache = rti; - return rti; - }, - getTypeFromTypesTable(index) { - var rti, - table = init.types, - type = table[index]; - if (typeof type == "string") { - rti = A._Universe_eval(init.typeUniverse, type, false); - table[index] = rti; - return rti; - } - return type; - }, - getRuntimeTypeOfDartObject(object) { - return A.createRuntimeType(A._instanceType(object)); - }, - getRuntimeTypeOfClosure(closure) { - var rti = A.closureFunctionType(closure); - return A.createRuntimeType(rti == null ? A.instanceType(closure) : rti); - }, - _structuralTypeOf(object) { - var functionRti; - if (object instanceof A._Record) - return A.evaluateRtiForRecord(object.$recipe, object._getFieldValues$0()); - functionRti = object instanceof A.Closure ? A.closureFunctionType(object) : null; - if (functionRti != null) - return functionRti; - if (type$.TrustedGetRuntimeType._is(object)) - return J.get$runtimeType$(object)._rti; - if (Array.isArray(object)) - return A._arrayInstanceType(object); - return A.instanceType(object); - }, - createRuntimeType(rti) { - var t1 = rti._cachedRuntimeType; - return t1 == null ? rti._cachedRuntimeType = A._createRuntimeType(rti) : t1; - }, - _createRuntimeType(rti) { - var starErasedRti, t1, - s = rti._canonicalRecipe, - starErasedRecipe = s.replace(/\*/g, ""); - if (starErasedRecipe === s) - return rti._cachedRuntimeType = new A._Type(rti); - starErasedRti = A._Universe_eval(init.typeUniverse, starErasedRecipe, true); - t1 = starErasedRti._cachedRuntimeType; - return t1 == null ? starErasedRti._cachedRuntimeType = A._createRuntimeType(starErasedRti) : t1; - }, - evaluateRtiForRecord(recordRecipe, valuesList) { - var bindings, i, - values = valuesList, - $length = values.length; - if ($length === 0) - return type$.Record_0; - bindings = A._Universe_evalInEnvironment(init.typeUniverse, A._structuralTypeOf(values[0]), "@<0>"); - for (i = 1; i < $length; ++i) - bindings = A._Universe_bind(init.typeUniverse, bindings, A._structuralTypeOf(values[i])); - return A._Universe_evalInEnvironment(init.typeUniverse, bindings, recordRecipe); - }, - typeLiteral(recipe) { - return A.createRuntimeType(A._Universe_eval(init.typeUniverse, recipe, false)); - }, - _installSpecializedIsTest(object) { - var t1, unstarred, unstarredKind, isFn, $name, predicate, testRti = this; - if (testRti === type$.Object) - return A._finishIsFn(testRti, object, A._isObject); - if (!A.isSoundTopType(testRti)) - t1 = testRti === type$.legacy_Object; - else - t1 = true; - if (t1) - return A._finishIsFn(testRti, object, A._isTop); - t1 = testRti._kind; - if (t1 === 7) - return A._finishIsFn(testRti, object, A._generalNullableIsTestImplementation); - if (t1 === 1) - return A._finishIsFn(testRti, object, A._isNever); - unstarred = t1 === 6 ? testRti._primary : testRti; - unstarredKind = unstarred._kind; - if (unstarredKind === 8) - return A._finishIsFn(testRti, object, A._isFutureOr); - if (unstarred === type$.int) - isFn = A._isInt; - else if (unstarred === type$.double || unstarred === type$.num) - isFn = A._isNum; - else if (unstarred === type$.String) - isFn = A._isString; - else - isFn = unstarred === type$.bool ? A._isBool : null; - if (isFn != null) - return A._finishIsFn(testRti, object, isFn); - if (unstarredKind === 9) { - $name = unstarred._primary; - if (unstarred._rest.every(A.isDefinitelyTopType)) { - testRti._specializedTestResource = "$is" + $name; - if ($name === "List") - return A._finishIsFn(testRti, object, A._isListTestViaProperty); - return A._finishIsFn(testRti, object, A._isTestViaProperty); - } - } else if (unstarredKind === 11) { - predicate = A.createRecordTypePredicate(unstarred._primary, unstarred._rest); - return A._finishIsFn(testRti, object, predicate == null ? A._isNever : predicate); - } - return A._finishIsFn(testRti, object, A._generalIsTestImplementation); - }, - _finishIsFn(testRti, object, isFn) { - testRti._is = isFn; - return testRti._is(object); - }, - _installSpecializedAsCheck(object) { - var t1, testRti = this, - asFn = A._generalAsCheckImplementation; - if (!A.isSoundTopType(testRti)) - t1 = testRti === type$.legacy_Object; - else - t1 = true; - if (t1) - asFn = A._asTop; - else if (testRti === type$.Object) - asFn = A._asObject; - else { - t1 = A.isNullable(testRti); - if (t1) - asFn = A._generalNullableAsCheckImplementation; - } - testRti._as = asFn; - return testRti._as(object); - }, - _nullIs(testRti) { - var kind = testRti._kind, - t1 = true; - if (!A.isSoundTopType(testRti)) - if (!(testRti === type$.legacy_Object)) - if (!(testRti === type$.legacy_Never)) - if (kind !== 7) - if (!(kind === 6 && A._nullIs(testRti._primary))) - t1 = kind === 8 && A._nullIs(testRti._primary) || testRti === type$.Null || testRti === type$.JSNull; - return t1; - }, - _generalIsTestImplementation(object) { - var testRti = this; - if (object == null) - return A._nullIs(testRti); - return A.isSubtype(init.typeUniverse, A.instanceOrFunctionType(object, testRti), testRti); - }, - _generalNullableIsTestImplementation(object) { - if (object == null) - return true; - return this._primary._is(object); - }, - _isTestViaProperty(object) { - var tag, testRti = this; - if (object == null) - return A._nullIs(testRti); - tag = testRti._specializedTestResource; - if (object instanceof A.Object) - return !!object[tag]; - return !!J.getInterceptor$(object)[tag]; - }, - _isListTestViaProperty(object) { - var tag, testRti = this; - if (object == null) - return A._nullIs(testRti); - if (typeof object != "object") - return false; - if (Array.isArray(object)) - return true; - tag = testRti._specializedTestResource; - if (object instanceof A.Object) - return !!object[tag]; - return !!J.getInterceptor$(object)[tag]; - }, - _generalAsCheckImplementation(object) { - var testRti = this; - if (object == null) { - if (A.isNullable(testRti)) - return object; - } else if (testRti._is(object)) - return object; - A._failedAsCheck(object, testRti); - }, - _generalNullableAsCheckImplementation(object) { - var testRti = this; - if (object == null) - return object; - else if (testRti._is(object)) - return object; - A._failedAsCheck(object, testRti); - }, - _failedAsCheck(object, testRti) { - throw A.wrapException(A._TypeError$fromMessage(A._Error_compose(object, A._rtiToString(testRti, null)))); - }, - _Error_compose(object, checkedTypeDescription) { - return A.Error_safeToString(object) + ": type '" + A._rtiToString(A._structuralTypeOf(object), null) + "' is not a subtype of type '" + checkedTypeDescription + "'"; - }, - _TypeError$fromMessage(message) { - return new A._TypeError("TypeError: " + message); - }, - _TypeError__TypeError$forType(object, type) { - return new A._TypeError("TypeError: " + A._Error_compose(object, type)); - }, - _isFutureOr(object) { - var testRti = this, - unstarred = testRti._kind === 6 ? testRti._primary : testRti; - return unstarred._primary._is(object) || A.Rti__getFutureFromFutureOr(init.typeUniverse, unstarred)._is(object); - }, - _isObject(object) { - return object != null; - }, - _asObject(object) { - if (object != null) - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "Object")); - }, - _isTop(object) { - return true; - }, - _asTop(object) { - return object; - }, - _isNever(object) { - return false; - }, - _isBool(object) { - return true === object || false === object; - }, - _asBool(object) { - if (true === object) - return true; - if (false === object) - return false; - throw A.wrapException(A._TypeError__TypeError$forType(object, "bool")); - }, - _asBoolS(object) { - if (true === object) - return true; - if (false === object) - return false; - if (object == null) - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "bool")); - }, - _asBoolQ(object) { - if (true === object) - return true; - if (false === object) - return false; - if (object == null) - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "bool?")); - }, - _asDouble(object) { - if (typeof object == "number") - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "double")); - }, - _asDoubleS(object) { - if (typeof object == "number") - return object; - if (object == null) - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "double")); - }, - _asDoubleQ(object) { - if (typeof object == "number") - return object; - if (object == null) - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "double?")); - }, - _isInt(object) { - return typeof object == "number" && Math.floor(object) === object; - }, - _asInt(object) { - if (typeof object == "number" && Math.floor(object) === object) - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "int")); - }, - _asIntS(object) { - if (typeof object == "number" && Math.floor(object) === object) - return object; - if (object == null) - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "int")); - }, - _asIntQ(object) { - if (typeof object == "number" && Math.floor(object) === object) - return object; - if (object == null) - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "int?")); - }, - _isNum(object) { - return typeof object == "number"; - }, - _asNum(object) { - if (typeof object == "number") - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "num")); - }, - _asNumS(object) { - if (typeof object == "number") - return object; - if (object == null) - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "num")); - }, - _asNumQ(object) { - if (typeof object == "number") - return object; - if (object == null) - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "num?")); - }, - _isString(object) { - return typeof object == "string"; - }, - _asString(object) { - if (typeof object == "string") - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "String")); - }, - _asStringS(object) { - if (typeof object == "string") - return object; - if (object == null) - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "String")); - }, - _asStringQ(object) { - if (typeof object == "string") - return object; - if (object == null) - return object; - throw A.wrapException(A._TypeError__TypeError$forType(object, "String?")); - }, - _rtiArrayToString(array, genericContext) { - var s, sep, i; - for (s = "", sep = "", i = 0; i < array.length; ++i, sep = ", ") - s += sep + A._rtiToString(array[i], genericContext); - return s; - }, - _recordRtiToString(recordType, genericContext) { - var fieldCount, names, namesIndex, s, comma, i, - partialShape = recordType._primary, - fields = recordType._rest; - if ("" === partialShape) - return "(" + A._rtiArrayToString(fields, genericContext) + ")"; - fieldCount = fields.length; - names = partialShape.split(","); - namesIndex = names.length - fieldCount; - for (s = "(", comma = "", i = 0; i < fieldCount; ++i, comma = ", ") { - s += comma; - if (namesIndex === 0) - s += "{"; - s += A._rtiToString(fields[i], genericContext); - if (namesIndex >= 0) - s += " " + names[namesIndex]; - ++namesIndex; - } - return s + "})"; - }, - _functionRtiToString(functionType, genericContext, bounds) { - var boundsLength, offset, i, t1, t2, typeParametersText, typeSep, boundRti, kind, t3, parameters, requiredPositional, requiredPositionalLength, optionalPositional, optionalPositionalLength, named, namedLength, returnTypeText, argumentsText, sep, _s2_ = ", ", outerContextLength = null; - if (bounds != null) { - boundsLength = bounds.length; - if (genericContext == null) - genericContext = A._setArrayType([], type$.JSArray_String); - else - outerContextLength = genericContext.length; - offset = genericContext.length; - for (i = boundsLength; i > 0; --i) - genericContext.push("T" + (offset + i)); - for (t1 = type$.nullable_Object, t2 = type$.legacy_Object, typeParametersText = "<", typeSep = "", i = 0; i < boundsLength; ++i, typeSep = _s2_) { - typeParametersText = B.JSString_methods.$add(typeParametersText + typeSep, genericContext[genericContext.length - 1 - i]); - boundRti = bounds[i]; - kind = boundRti._kind; - if (!(kind === 2 || kind === 3 || kind === 4 || kind === 5 || boundRti === t1)) - t3 = boundRti === t2; - else - t3 = true; - if (!t3) - typeParametersText += " extends " + A._rtiToString(boundRti, genericContext); - } - typeParametersText += ">"; - } else - typeParametersText = ""; - t1 = functionType._primary; - parameters = functionType._rest; - requiredPositional = parameters._requiredPositional; - requiredPositionalLength = requiredPositional.length; - optionalPositional = parameters._optionalPositional; - optionalPositionalLength = optionalPositional.length; - named = parameters._named; - namedLength = named.length; - returnTypeText = A._rtiToString(t1, genericContext); - for (argumentsText = "", sep = "", i = 0; i < requiredPositionalLength; ++i, sep = _s2_) - argumentsText += sep + A._rtiToString(requiredPositional[i], genericContext); - if (optionalPositionalLength > 0) { - argumentsText += sep + "["; - for (sep = "", i = 0; i < optionalPositionalLength; ++i, sep = _s2_) - argumentsText += sep + A._rtiToString(optionalPositional[i], genericContext); - argumentsText += "]"; - } - if (namedLength > 0) { - argumentsText += sep + "{"; - for (sep = "", i = 0; i < namedLength; i += 3, sep = _s2_) { - argumentsText += sep; - if (named[i + 1]) - argumentsText += "required "; - argumentsText += A._rtiToString(named[i + 2], genericContext) + " " + named[i]; - } - argumentsText += "}"; - } - if (outerContextLength != null) { - genericContext.toString; - genericContext.length = outerContextLength; - } - return typeParametersText + "(" + argumentsText + ") => " + returnTypeText; - }, - _rtiToString(rti, genericContext) { - var questionArgument, s, argumentKind, $name, $arguments, t1, - kind = rti._kind; - if (kind === 5) - return "erased"; - if (kind === 2) - return "dynamic"; - if (kind === 3) - return "void"; - if (kind === 1) - return "Never"; - if (kind === 4) - return "any"; - if (kind === 6) - return A._rtiToString(rti._primary, genericContext); - if (kind === 7) { - questionArgument = rti._primary; - s = A._rtiToString(questionArgument, genericContext); - argumentKind = questionArgument._kind; - return (argumentKind === 12 || argumentKind === 13 ? "(" + s + ")" : s) + "?"; - } - if (kind === 8) - return "FutureOr<" + A._rtiToString(rti._primary, genericContext) + ">"; - if (kind === 9) { - $name = A._unminifyOrTag(rti._primary); - $arguments = rti._rest; - return $arguments.length > 0 ? $name + ("<" + A._rtiArrayToString($arguments, genericContext) + ">") : $name; - } - if (kind === 11) - return A._recordRtiToString(rti, genericContext); - if (kind === 12) - return A._functionRtiToString(rti, genericContext, null); - if (kind === 13) - return A._functionRtiToString(rti._primary, genericContext, rti._rest); - if (kind === 14) { - t1 = rti._primary; - return genericContext[genericContext.length - 1 - t1]; - } - return "?"; - }, - _unminifyOrTag(rawClassName) { - var preserved = init.mangledGlobalNames[rawClassName]; - if (preserved != null) - return preserved; - return rawClassName; - }, - _Universe_findRule(universe, targetType) { - var rule = universe.tR[targetType]; - for (; typeof rule == "string";) - rule = universe.tR[rule]; - return rule; - }, - _Universe_findErasedType(universe, cls) { - var $length, erased, $arguments, i, $interface, - t1 = universe.eT, - probe = t1[cls]; - if (probe == null) - return A._Universe_eval(universe, cls, false); - else if (typeof probe == "number") { - $length = probe; - erased = A._Universe__lookupTerminalRti(universe, 5, "#"); - $arguments = A._Utils_newArrayOrEmpty($length); - for (i = 0; i < $length; ++i) - $arguments[i] = erased; - $interface = A._Universe__lookupInterfaceRti(universe, cls, $arguments); - t1[cls] = $interface; - return $interface; - } else - return probe; - }, - _Universe_addRules(universe, rules) { - return A._Utils_objectAssign(universe.tR, rules); - }, - _Universe_addErasedTypes(universe, types) { - return A._Utils_objectAssign(universe.eT, types); - }, - _Universe_eval(universe, recipe, normalize) { - var rti, - t1 = universe.eC, - probe = t1.get(recipe); - if (probe != null) - return probe; - rti = A._Parser_parse(A._Parser_create(universe, null, recipe, normalize)); - t1.set(recipe, rti); - return rti; - }, - _Universe_evalInEnvironment(universe, environment, recipe) { - var probe, rti, - cache = environment._evalCache; - if (cache == null) - cache = environment._evalCache = new Map(); - probe = cache.get(recipe); - if (probe != null) - return probe; - rti = A._Parser_parse(A._Parser_create(universe, environment, recipe, true)); - cache.set(recipe, rti); - return rti; - }, - _Universe_bind(universe, environment, argumentsRti) { - var argumentsRecipe, probe, rti, - cache = environment._bindCache; - if (cache == null) - cache = environment._bindCache = new Map(); - argumentsRecipe = argumentsRti._canonicalRecipe; - probe = cache.get(argumentsRecipe); - if (probe != null) - return probe; - rti = A._Universe__lookupBindingRti(universe, environment, argumentsRti._kind === 10 ? argumentsRti._rest : [argumentsRti]); - cache.set(argumentsRecipe, rti); - return rti; - }, - _Universe__installTypeTests(universe, rti) { - rti._as = A._installSpecializedAsCheck; - rti._is = A._installSpecializedIsTest; - return rti; - }, - _Universe__lookupTerminalRti(universe, kind, key) { - var rti, t1, - probe = universe.eC.get(key); - if (probe != null) - return probe; - rti = new A.Rti(null, null); - rti._kind = kind; - rti._canonicalRecipe = key; - t1 = A._Universe__installTypeTests(universe, rti); - universe.eC.set(key, t1); - return t1; - }, - _Universe__lookupStarRti(universe, baseType, normalize) { - var t1, - key = baseType._canonicalRecipe + "*", - probe = universe.eC.get(key); - if (probe != null) - return probe; - t1 = A._Universe__createStarRti(universe, baseType, key, normalize); - universe.eC.set(key, t1); - return t1; - }, - _Universe__createStarRti(universe, baseType, key, normalize) { - var baseKind, t1, rti; - if (normalize) { - baseKind = baseType._kind; - if (!A.isSoundTopType(baseType)) - t1 = baseType === type$.Null || baseType === type$.JSNull || baseKind === 7 || baseKind === 6; - else - t1 = true; - if (t1) - return baseType; - } - rti = new A.Rti(null, null); - rti._kind = 6; - rti._primary = baseType; - rti._canonicalRecipe = key; - return A._Universe__installTypeTests(universe, rti); - }, - _Universe__lookupQuestionRti(universe, baseType, normalize) { - var t1, - key = baseType._canonicalRecipe + "?", - probe = universe.eC.get(key); - if (probe != null) - return probe; - t1 = A._Universe__createQuestionRti(universe, baseType, key, normalize); - universe.eC.set(key, t1); - return t1; - }, - _Universe__createQuestionRti(universe, baseType, key, normalize) { - var baseKind, t1, starArgument, rti; - if (normalize) { - baseKind = baseType._kind; - t1 = true; - if (!A.isSoundTopType(baseType)) - if (!(baseType === type$.Null || baseType === type$.JSNull)) - if (baseKind !== 7) - t1 = baseKind === 8 && A.isNullable(baseType._primary); - if (t1) - return baseType; - else if (baseKind === 1 || baseType === type$.legacy_Never) - return type$.Null; - else if (baseKind === 6) { - starArgument = baseType._primary; - if (starArgument._kind === 8 && A.isNullable(starArgument._primary)) - return starArgument; - else - return A.Rti__getQuestionFromStar(universe, baseType); - } - } - rti = new A.Rti(null, null); - rti._kind = 7; - rti._primary = baseType; - rti._canonicalRecipe = key; - return A._Universe__installTypeTests(universe, rti); - }, - _Universe__lookupFutureOrRti(universe, baseType, normalize) { - var t1, - key = baseType._canonicalRecipe + "/", - probe = universe.eC.get(key); - if (probe != null) - return probe; - t1 = A._Universe__createFutureOrRti(universe, baseType, key, normalize); - universe.eC.set(key, t1); - return t1; - }, - _Universe__createFutureOrRti(universe, baseType, key, normalize) { - var t1, rti; - if (normalize) { - t1 = baseType._kind; - if (A.isSoundTopType(baseType) || baseType === type$.Object || baseType === type$.legacy_Object) - return baseType; - else if (t1 === 1) - return A._Universe__lookupInterfaceRti(universe, "Future", [baseType]); - else if (baseType === type$.Null || baseType === type$.JSNull) - return type$.nullable_Future_Null; - } - rti = new A.Rti(null, null); - rti._kind = 8; - rti._primary = baseType; - rti._canonicalRecipe = key; - return A._Universe__installTypeTests(universe, rti); - }, - _Universe__lookupGenericFunctionParameterRti(universe, index) { - var rti, t1, - key = "" + index + "^", - probe = universe.eC.get(key); - if (probe != null) - return probe; - rti = new A.Rti(null, null); - rti._kind = 14; - rti._primary = index; - rti._canonicalRecipe = key; - t1 = A._Universe__installTypeTests(universe, rti); - universe.eC.set(key, t1); - return t1; - }, - _Universe__canonicalRecipeJoin($arguments) { - var s, sep, i, - $length = $arguments.length; - for (s = "", sep = "", i = 0; i < $length; ++i, sep = ",") - s += sep + $arguments[i]._canonicalRecipe; - return s; - }, - _Universe__canonicalRecipeJoinNamed($arguments) { - var s, sep, i, t1, nameSep, - $length = $arguments.length; - for (s = "", sep = "", i = 0; i < $length; i += 3, sep = ",") { - t1 = $arguments[i]; - nameSep = $arguments[i + 1] ? "!" : ":"; - s += sep + t1 + nameSep + $arguments[i + 2]._canonicalRecipe; - } - return s; - }, - _Universe__lookupInterfaceRti(universe, $name, $arguments) { - var probe, rti, t1, - s = $name; - if ($arguments.length > 0) - s += "<" + A._Universe__canonicalRecipeJoin($arguments) + ">"; - probe = universe.eC.get(s); - if (probe != null) - return probe; - rti = new A.Rti(null, null); - rti._kind = 9; - rti._primary = $name; - rti._rest = $arguments; - if ($arguments.length > 0) - rti._precomputed1 = $arguments[0]; - rti._canonicalRecipe = s; - t1 = A._Universe__installTypeTests(universe, rti); - universe.eC.set(s, t1); - return t1; - }, - _Universe__lookupBindingRti(universe, base, $arguments) { - var newBase, newArguments, key, probe, rti, t1; - if (base._kind === 10) { - newBase = base._primary; - newArguments = base._rest.concat($arguments); - } else { - newArguments = $arguments; - newBase = base; - } - key = newBase._canonicalRecipe + (";<" + A._Universe__canonicalRecipeJoin(newArguments) + ">"); - probe = universe.eC.get(key); - if (probe != null) - return probe; - rti = new A.Rti(null, null); - rti._kind = 10; - rti._primary = newBase; - rti._rest = newArguments; - rti._canonicalRecipe = key; - t1 = A._Universe__installTypeTests(universe, rti); - universe.eC.set(key, t1); - return t1; - }, - _Universe__lookupRecordRti(universe, partialShapeTag, fields) { - var rti, t1, - key = "+" + (partialShapeTag + "(" + A._Universe__canonicalRecipeJoin(fields) + ")"), - probe = universe.eC.get(key); - if (probe != null) - return probe; - rti = new A.Rti(null, null); - rti._kind = 11; - rti._primary = partialShapeTag; - rti._rest = fields; - rti._canonicalRecipe = key; - t1 = A._Universe__installTypeTests(universe, rti); - universe.eC.set(key, t1); - return t1; - }, - _Universe__lookupFunctionRti(universe, returnType, parameters) { - var sep, key, probe, rti, t1, - s = returnType._canonicalRecipe, - requiredPositional = parameters._requiredPositional, - requiredPositionalLength = requiredPositional.length, - optionalPositional = parameters._optionalPositional, - optionalPositionalLength = optionalPositional.length, - named = parameters._named, - namedLength = named.length, - recipe = "(" + A._Universe__canonicalRecipeJoin(requiredPositional); - if (optionalPositionalLength > 0) { - sep = requiredPositionalLength > 0 ? "," : ""; - recipe += sep + "[" + A._Universe__canonicalRecipeJoin(optionalPositional) + "]"; - } - if (namedLength > 0) { - sep = requiredPositionalLength > 0 ? "," : ""; - recipe += sep + "{" + A._Universe__canonicalRecipeJoinNamed(named) + "}"; - } - key = s + (recipe + ")"); - probe = universe.eC.get(key); - if (probe != null) - return probe; - rti = new A.Rti(null, null); - rti._kind = 12; - rti._primary = returnType; - rti._rest = parameters; - rti._canonicalRecipe = key; - t1 = A._Universe__installTypeTests(universe, rti); - universe.eC.set(key, t1); - return t1; - }, - _Universe__lookupGenericFunctionRti(universe, baseFunctionType, bounds, normalize) { - var t1, - key = baseFunctionType._canonicalRecipe + ("<" + A._Universe__canonicalRecipeJoin(bounds) + ">"), - probe = universe.eC.get(key); - if (probe != null) - return probe; - t1 = A._Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize); - universe.eC.set(key, t1); - return t1; - }, - _Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize) { - var $length, typeArguments, count, i, bound, substitutedBase, substitutedBounds, rti; - if (normalize) { - $length = bounds.length; - typeArguments = A._Utils_newArrayOrEmpty($length); - for (count = 0, i = 0; i < $length; ++i) { - bound = bounds[i]; - if (bound._kind === 1) { - typeArguments[i] = bound; - ++count; - } - } - if (count > 0) { - substitutedBase = A._substitute(universe, baseFunctionType, typeArguments, 0); - substitutedBounds = A._substituteArray(universe, bounds, typeArguments, 0); - return A._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, bounds !== substitutedBounds); - } - } - rti = new A.Rti(null, null); - rti._kind = 13; - rti._primary = baseFunctionType; - rti._rest = bounds; - rti._canonicalRecipe = key; - return A._Universe__installTypeTests(universe, rti); - }, - _Parser_create(universe, environment, recipe, normalize) { - return {u: universe, e: environment, r: recipe, s: [], p: 0, n: normalize}; - }, - _Parser_parse(parser) { - var t2, i, ch, t3, array, end, item, - source = parser.r, - t1 = parser.s; - for (t2 = source.length, i = 0; i < t2;) { - ch = source.charCodeAt(i); - if (ch >= 48 && ch <= 57) - i = A._Parser_handleDigit(i + 1, ch, source, t1); - else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36 || ch === 124) - i = A._Parser_handleIdentifier(parser, i, source, t1, false); - else if (ch === 46) - i = A._Parser_handleIdentifier(parser, i, source, t1, true); - else { - ++i; - switch (ch) { - case 44: - break; - case 58: - t1.push(false); - break; - case 33: - t1.push(true); - break; - case 59: - t1.push(A._Parser_toType(parser.u, parser.e, t1.pop())); - break; - case 94: - t1.push(A._Universe__lookupGenericFunctionParameterRti(parser.u, t1.pop())); - break; - case 35: - t1.push(A._Universe__lookupTerminalRti(parser.u, 5, "#")); - break; - case 64: - t1.push(A._Universe__lookupTerminalRti(parser.u, 2, "@")); - break; - case 126: - t1.push(A._Universe__lookupTerminalRti(parser.u, 3, "~")); - break; - case 60: - t1.push(parser.p); - parser.p = t1.length; - break; - case 62: - A._Parser_handleTypeArguments(parser, t1); - break; - case 38: - A._Parser_handleExtendedOperations(parser, t1); - break; - case 42: - t3 = parser.u; - t1.push(A._Universe__lookupStarRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); - break; - case 63: - t3 = parser.u; - t1.push(A._Universe__lookupQuestionRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); - break; - case 47: - t3 = parser.u; - t1.push(A._Universe__lookupFutureOrRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); - break; - case 40: - t1.push(-3); - t1.push(parser.p); - parser.p = t1.length; - break; - case 41: - A._Parser_handleArguments(parser, t1); - break; - case 91: - t1.push(parser.p); - parser.p = t1.length; - break; - case 93: - array = t1.splice(parser.p); - A._Parser_toTypes(parser.u, parser.e, array); - parser.p = t1.pop(); - t1.push(array); - t1.push(-1); - break; - case 123: - t1.push(parser.p); - parser.p = t1.length; - break; - case 125: - array = t1.splice(parser.p); - A._Parser_toTypesNamed(parser.u, parser.e, array); - parser.p = t1.pop(); - t1.push(array); - t1.push(-2); - break; - case 43: - end = source.indexOf("(", i); - t1.push(source.substring(i, end)); - t1.push(-4); - t1.push(parser.p); - parser.p = t1.length; - i = end + 1; - break; - default: - throw "Bad character " + ch; - } - } - } - item = t1.pop(); - return A._Parser_toType(parser.u, parser.e, item); - }, - _Parser_handleDigit(i, digit, source, stack) { - var t1, ch, - value = digit - 48; - for (t1 = source.length; i < t1; ++i) { - ch = source.charCodeAt(i); - if (!(ch >= 48 && ch <= 57)) - break; - value = value * 10 + (ch - 48); - } - stack.push(value); - return i; - }, - _Parser_handleIdentifier(parser, start, source, stack, hasPeriod) { - var t1, ch, t2, string, environment, recipe, - i = start + 1; - for (t1 = source.length; i < t1; ++i) { - ch = source.charCodeAt(i); - if (ch === 46) { - if (hasPeriod) - break; - hasPeriod = true; - } else { - if (!((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36 || ch === 124)) - t2 = ch >= 48 && ch <= 57; - else - t2 = true; - if (!t2) - break; - } - } - string = source.substring(start, i); - if (hasPeriod) { - t1 = parser.u; - environment = parser.e; - if (environment._kind === 10) - environment = environment._primary; - recipe = A._Universe_findRule(t1, environment._primary)[string]; - if (recipe == null) - A.throwExpression('No "' + string + '" in "' + A.Rti__getCanonicalRecipe(environment) + '"'); - stack.push(A._Universe_evalInEnvironment(t1, environment, recipe)); - } else - stack.push(string); - return i; - }, - _Parser_handleTypeArguments(parser, stack) { - var base, - t1 = parser.u, - $arguments = A._Parser_collectArray(parser, stack), - head = stack.pop(); - if (typeof head == "string") - stack.push(A._Universe__lookupInterfaceRti(t1, head, $arguments)); - else { - base = A._Parser_toType(t1, parser.e, head); - switch (base._kind) { - case 12: - stack.push(A._Universe__lookupGenericFunctionRti(t1, base, $arguments, parser.n)); - break; - default: - stack.push(A._Universe__lookupBindingRti(t1, base, $arguments)); - break; - } - } - }, - _Parser_handleArguments(parser, stack) { - var requiredPositional, returnType, parameters, - t1 = parser.u, - head = stack.pop(), - optionalPositional = null, named = null; - if (typeof head == "number") - switch (head) { - case -1: - optionalPositional = stack.pop(); - break; - case -2: - named = stack.pop(); - break; - default: - stack.push(head); - break; - } - else - stack.push(head); - requiredPositional = A._Parser_collectArray(parser, stack); - head = stack.pop(); - switch (head) { - case -3: - head = stack.pop(); - if (optionalPositional == null) - optionalPositional = t1.sEA; - if (named == null) - named = t1.sEA; - returnType = A._Parser_toType(t1, parser.e, head); - parameters = new A._FunctionParameters(); - parameters._requiredPositional = requiredPositional; - parameters._optionalPositional = optionalPositional; - parameters._named = named; - stack.push(A._Universe__lookupFunctionRti(t1, returnType, parameters)); - return; - case -4: - stack.push(A._Universe__lookupRecordRti(t1, stack.pop(), requiredPositional)); - return; - default: - throw A.wrapException(A.AssertionError$("Unexpected state under `()`: " + A.S(head))); - } - }, - _Parser_handleExtendedOperations(parser, stack) { - var $top = stack.pop(); - if (0 === $top) { - stack.push(A._Universe__lookupTerminalRti(parser.u, 1, "0&")); - return; - } - if (1 === $top) { - stack.push(A._Universe__lookupTerminalRti(parser.u, 4, "1&")); - return; - } - throw A.wrapException(A.AssertionError$("Unexpected extended operation " + A.S($top))); - }, - _Parser_collectArray(parser, stack) { - var array = stack.splice(parser.p); - A._Parser_toTypes(parser.u, parser.e, array); - parser.p = stack.pop(); - return array; - }, - _Parser_toType(universe, environment, item) { - if (typeof item == "string") - return A._Universe__lookupInterfaceRti(universe, item, universe.sEA); - else if (typeof item == "number") { - environment.toString; - return A._Parser_indexToType(universe, environment, item); - } else - return item; - }, - _Parser_toTypes(universe, environment, items) { - var i, - $length = items.length; - for (i = 0; i < $length; ++i) - items[i] = A._Parser_toType(universe, environment, items[i]); - }, - _Parser_toTypesNamed(universe, environment, items) { - var i, - $length = items.length; - for (i = 2; i < $length; i += 3) - items[i] = A._Parser_toType(universe, environment, items[i]); - }, - _Parser_indexToType(universe, environment, index) { - var typeArguments, len, - kind = environment._kind; - if (kind === 10) { - if (index === 0) - return environment._primary; - typeArguments = environment._rest; - len = typeArguments.length; - if (index <= len) - return typeArguments[index - 1]; - index -= len; - environment = environment._primary; - kind = environment._kind; - } else if (index === 0) - return environment; - if (kind !== 9) - throw A.wrapException(A.AssertionError$("Indexed base must be an interface type")); - typeArguments = environment._rest; - if (index <= typeArguments.length) - return typeArguments[index - 1]; - throw A.wrapException(A.AssertionError$("Bad index " + index + " for " + environment.toString$0(0))); - }, - isSubtype(universe, s, t) { - var result, - sCache = s._isSubtypeCache; - if (sCache == null) - sCache = s._isSubtypeCache = new Map(); - result = sCache.get(t); - if (result == null) { - result = A._isSubtype(universe, s, null, t, null, false) ? 1 : 0; - sCache.set(t, result); - } - if (0 === result) - return false; - if (1 === result) - return true; - return true; - }, - _isSubtype(universe, s, sEnv, t, tEnv, isLegacy) { - var t1, sKind, leftTypeVariable, tKind, t2, sBounds, tBounds, sLength, i, sBound, tBound; - if (s === t) - return true; - if (!A.isSoundTopType(t)) - t1 = t === type$.legacy_Object; - else - t1 = true; - if (t1) - return true; - sKind = s._kind; - if (sKind === 4) - return true; - if (A.isSoundTopType(s)) - return false; - t1 = s._kind; - if (t1 === 1) - return true; - leftTypeVariable = sKind === 14; - if (leftTypeVariable) - if (A._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv, false)) - return true; - tKind = t._kind; - t1 = s === type$.Null || s === type$.JSNull; - if (t1) { - if (tKind === 8) - return A._isSubtype(universe, s, sEnv, t._primary, tEnv, false); - return t === type$.Null || t === type$.JSNull || tKind === 7 || tKind === 6; - } - if (t === type$.Object) { - if (sKind === 8) - return A._isSubtype(universe, s._primary, sEnv, t, tEnv, false); - if (sKind === 6) - return A._isSubtype(universe, s._primary, sEnv, t, tEnv, false); - return sKind !== 7; - } - if (sKind === 6) - return A._isSubtype(universe, s._primary, sEnv, t, tEnv, false); - if (tKind === 6) { - t1 = A.Rti__getQuestionFromStar(universe, t); - return A._isSubtype(universe, s, sEnv, t1, tEnv, false); - } - if (sKind === 8) { - if (!A._isSubtype(universe, s._primary, sEnv, t, tEnv, false)) - return false; - return A._isSubtype(universe, A.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv, false); - } - if (sKind === 7) { - t1 = A._isSubtype(universe, type$.Null, sEnv, t, tEnv, false); - return t1 && A._isSubtype(universe, s._primary, sEnv, t, tEnv, false); - } - if (tKind === 8) { - if (A._isSubtype(universe, s, sEnv, t._primary, tEnv, false)) - return true; - return A._isSubtype(universe, s, sEnv, A.Rti__getFutureFromFutureOr(universe, t), tEnv, false); - } - if (tKind === 7) { - t1 = A._isSubtype(universe, s, sEnv, type$.Null, tEnv, false); - return t1 || A._isSubtype(universe, s, sEnv, t._primary, tEnv, false); - } - if (leftTypeVariable) - return false; - t1 = sKind !== 12; - if ((!t1 || sKind === 13) && t === type$.Function) - return true; - t2 = sKind === 11; - if (t2 && t === type$.Record) - return true; - if (tKind === 13) { - if (s === type$.JavaScriptFunction) - return true; - if (sKind !== 13) - return false; - sBounds = s._rest; - tBounds = t._rest; - sLength = sBounds.length; - if (sLength !== tBounds.length) - return false; - sEnv = sEnv == null ? sBounds : sBounds.concat(sEnv); - tEnv = tEnv == null ? tBounds : tBounds.concat(tEnv); - for (i = 0; i < sLength; ++i) { - sBound = sBounds[i]; - tBound = tBounds[i]; - if (!A._isSubtype(universe, sBound, sEnv, tBound, tEnv, false) || !A._isSubtype(universe, tBound, tEnv, sBound, sEnv, false)) - return false; - } - return A._isFunctionSubtype(universe, s._primary, sEnv, t._primary, tEnv, false); - } - if (tKind === 12) { - if (s === type$.JavaScriptFunction) - return true; - if (t1) - return false; - return A._isFunctionSubtype(universe, s, sEnv, t, tEnv, false); - } - if (sKind === 9) { - if (tKind !== 9) - return false; - return A._isInterfaceSubtype(universe, s, sEnv, t, tEnv, false); - } - if (t2 && tKind === 11) - return A._isRecordSubtype(universe, s, sEnv, t, tEnv, false); - return false; - }, - _isFunctionSubtype(universe, s, sEnv, t, tEnv, isLegacy) { - var sParameters, tParameters, sRequiredPositional, tRequiredPositional, sRequiredPositionalLength, tRequiredPositionalLength, requiredPositionalDelta, sOptionalPositional, tOptionalPositional, sOptionalPositionalLength, tOptionalPositionalLength, i, t1, sNamed, tNamed, sNamedLength, tNamedLength, sIndex, tIndex, tName, sName, sIsRequired; - if (!A._isSubtype(universe, s._primary, sEnv, t._primary, tEnv, false)) - return false; - sParameters = s._rest; - tParameters = t._rest; - sRequiredPositional = sParameters._requiredPositional; - tRequiredPositional = tParameters._requiredPositional; - sRequiredPositionalLength = sRequiredPositional.length; - tRequiredPositionalLength = tRequiredPositional.length; - if (sRequiredPositionalLength > tRequiredPositionalLength) - return false; - requiredPositionalDelta = tRequiredPositionalLength - sRequiredPositionalLength; - sOptionalPositional = sParameters._optionalPositional; - tOptionalPositional = tParameters._optionalPositional; - sOptionalPositionalLength = sOptionalPositional.length; - tOptionalPositionalLength = tOptionalPositional.length; - if (sRequiredPositionalLength + sOptionalPositionalLength < tRequiredPositionalLength + tOptionalPositionalLength) - return false; - for (i = 0; i < sRequiredPositionalLength; ++i) { - t1 = sRequiredPositional[i]; - if (!A._isSubtype(universe, tRequiredPositional[i], tEnv, t1, sEnv, false)) - return false; - } - for (i = 0; i < requiredPositionalDelta; ++i) { - t1 = sOptionalPositional[i]; - if (!A._isSubtype(universe, tRequiredPositional[sRequiredPositionalLength + i], tEnv, t1, sEnv, false)) - return false; - } - for (i = 0; i < tOptionalPositionalLength; ++i) { - t1 = sOptionalPositional[requiredPositionalDelta + i]; - if (!A._isSubtype(universe, tOptionalPositional[i], tEnv, t1, sEnv, false)) - return false; - } - sNamed = sParameters._named; - tNamed = tParameters._named; - sNamedLength = sNamed.length; - tNamedLength = tNamed.length; - for (sIndex = 0, tIndex = 0; tIndex < tNamedLength; tIndex += 3) { - tName = tNamed[tIndex]; - for (; true;) { - if (sIndex >= sNamedLength) - return false; - sName = sNamed[sIndex]; - sIndex += 3; - if (tName < sName) - return false; - sIsRequired = sNamed[sIndex - 2]; - if (sName < tName) { - if (sIsRequired) - return false; - continue; - } - t1 = tNamed[tIndex + 1]; - if (sIsRequired && !t1) - return false; - t1 = sNamed[sIndex - 1]; - if (!A._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv, false)) - return false; - break; - } - } - for (; sIndex < sNamedLength;) { - if (sNamed[sIndex + 1]) - return false; - sIndex += 3; - } - return true; - }, - _isInterfaceSubtype(universe, s, sEnv, t, tEnv, isLegacy) { - var rule, recipes, $length, supertypeArgs, i, - sName = s._primary, - tName = t._primary; - for (; sName !== tName;) { - rule = universe.tR[sName]; - if (rule == null) - return false; - if (typeof rule == "string") { - sName = rule; - continue; - } - recipes = rule[tName]; - if (recipes == null) - return false; - $length = recipes.length; - supertypeArgs = $length > 0 ? new Array($length) : init.typeUniverse.sEA; - for (i = 0; i < $length; ++i) - supertypeArgs[i] = A._Universe_evalInEnvironment(universe, s, recipes[i]); - return A._areArgumentsSubtypes(universe, supertypeArgs, null, sEnv, t._rest, tEnv, false); - } - return A._areArgumentsSubtypes(universe, s._rest, null, sEnv, t._rest, tEnv, false); - }, - _areArgumentsSubtypes(universe, sArgs, sVariances, sEnv, tArgs, tEnv, isLegacy) { - var i, - $length = sArgs.length; - for (i = 0; i < $length; ++i) - if (!A._isSubtype(universe, sArgs[i], sEnv, tArgs[i], tEnv, false)) - return false; - return true; - }, - _isRecordSubtype(universe, s, sEnv, t, tEnv, isLegacy) { - var i, - sFields = s._rest, - tFields = t._rest, - sCount = sFields.length; - if (sCount !== tFields.length) - return false; - if (s._primary !== t._primary) - return false; - for (i = 0; i < sCount; ++i) - if (!A._isSubtype(universe, sFields[i], sEnv, tFields[i], tEnv, false)) - return false; - return true; - }, - isNullable(t) { - var kind = t._kind, - t1 = true; - if (!(t === type$.Null || t === type$.JSNull)) - if (!A.isSoundTopType(t)) - if (kind !== 7) - if (!(kind === 6 && A.isNullable(t._primary))) - t1 = kind === 8 && A.isNullable(t._primary); - return t1; - }, - isDefinitelyTopType(t) { - var t1; - if (!A.isSoundTopType(t)) - t1 = t === type$.legacy_Object; - else - t1 = true; - return t1; - }, - isSoundTopType(t) { - var kind = t._kind; - return kind === 2 || kind === 3 || kind === 4 || kind === 5 || t === type$.nullable_Object; - }, - _Utils_objectAssign(o, other) { - var i, key, - keys = Object.keys(other), - $length = keys.length; - for (i = 0; i < $length; ++i) { - key = keys[i]; - o[key] = other[key]; - } - }, - _Utils_newArrayOrEmpty($length) { - return $length > 0 ? new Array($length) : init.typeUniverse.sEA; - }, - Rti: function Rti(t0, t1) { - var _ = this; - _._as = t0; - _._is = t1; - _._cachedRuntimeType = _._specializedTestResource = _._isSubtypeCache = _._precomputed1 = null; - _._kind = 0; - _._canonicalRecipe = _._bindCache = _._evalCache = _._rest = _._primary = null; - }, - _FunctionParameters: function _FunctionParameters() { - this._named = this._optionalPositional = this._requiredPositional = null; - }, - _Type: function _Type(t0) { - this._rti = t0; - }, - _Error: function _Error() { - }, - _TypeError: function _TypeError(t0) { - this.__rti$_message = t0; - }, - _AsyncRun__initializeScheduleImmediate() { - var div, span, t1 = {}; - if (self.scheduleImmediate != null) - return A.async__AsyncRun__scheduleImmediateJsOverride$closure(); - if (self.MutationObserver != null && self.document != null) { - div = self.document.createElement("div"); - span = self.document.createElement("span"); - t1.storedCallback = null; - new self.MutationObserver(A.convertDartClosureToJS(new A._AsyncRun__initializeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true}); - return new A._AsyncRun__initializeScheduleImmediate_closure(t1, div, span); - } else if (self.setImmediate != null) - return A.async__AsyncRun__scheduleImmediateWithSetImmediate$closure(); - return A.async__AsyncRun__scheduleImmediateWithTimer$closure(); - }, - _AsyncRun__scheduleImmediateJsOverride(callback) { - self.scheduleImmediate(A.convertDartClosureToJS(new A._AsyncRun__scheduleImmediateJsOverride_internalCallback(callback), 0)); - }, - _AsyncRun__scheduleImmediateWithSetImmediate(callback) { - self.setImmediate(A.convertDartClosureToJS(new A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(callback), 0)); - }, - _AsyncRun__scheduleImmediateWithTimer(callback) { - A.Timer__createTimer(B.Duration_0, callback); - }, - Timer__createTimer(duration, callback) { - var milliseconds = B.JSInt_methods._tdivFast$1(duration._duration, 1000); - return A._TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback); - }, - _TimerImpl$(milliseconds, callback) { - var t1 = new A._TimerImpl(true); - t1._TimerImpl$2(milliseconds, callback); - return t1; - }, - _TimerImpl$periodic(milliseconds, callback) { - var t1 = new A._TimerImpl(false); - t1._TimerImpl$periodic$2(milliseconds, callback); - return t1; - }, - _makeAsyncAwaitCompleter($T) { - return new A._AsyncAwaitCompleter(new A._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncAwaitCompleter<0>")); - }, - _asyncStartSync(bodyFunction, completer) { - bodyFunction.call$2(0, null); - completer.isSync = true; - return completer._future; - }, - _asyncAwait(object, bodyFunction) { - A._awaitOnObject(object, bodyFunction); - }, - _asyncReturn(object, completer) { - completer.complete$1(object); - }, - _asyncRethrow(object, completer) { - completer.completeError$2(A.unwrapException(object), A.getTraceFromException(object)); - }, - _awaitOnObject(object, bodyFunction) { - var t1, future, - thenCallback = new A._awaitOnObject_closure(bodyFunction), - errorCallback = new A._awaitOnObject_closure0(bodyFunction); - if (object instanceof A._Future) - object._thenAwait$1$2(thenCallback, errorCallback, type$.dynamic); - else { - t1 = type$.dynamic; - if (object instanceof A._Future) - object.then$1$2$onError(0, thenCallback, errorCallback, t1); - else { - future = new A._Future($.Zone__current, type$._Future_dynamic); - future._state = 8; - future._resultOrListeners = object; - future._thenAwait$1$2(thenCallback, errorCallback, t1); - } - } - }, - _wrapJsFunctionForAsync($function) { - var $protected = function(fn, ERROR) { - return function(errorCode, result) { - while (true) { - try { - fn(errorCode, result); - break; - } catch (error) { - result = error; - errorCode = ERROR; - } - } - }; - }($function, 1); - return $.Zone__current.registerBinaryCallback$3$1(new A._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic); - }, - _SyncStarIterator__terminatedBody(_1, _2, _3) { - return 0; - }, - AsyncError$(error, stackTrace) { - var t1 = A.checkNotNullable(error, "error", type$.Object); - return new A.AsyncError(t1, stackTrace == null ? A.AsyncError_defaultStackTrace(error) : stackTrace); - }, - AsyncError_defaultStackTrace(error) { - var stackTrace; - if (type$.Error._is(error)) { - stackTrace = error.get$stackTrace(); - if (stackTrace != null) - return stackTrace; - } - return B._StringStackTrace_uwd; - }, - Future_Future$value(value, $T) { - var t1; - $T._as(value); - t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); - t1._asyncComplete$1(value); - return t1; - }, - Future_Future$error(error, stackTrace, $T) { - var t1, replacement; - A.checkNotNullable(error, "error", type$.Object); - t1 = $.Zone__current; - if (t1 !== B.C__RootZone) { - replacement = t1.errorCallback$2(error, stackTrace); - if (replacement != null) { - error = replacement.error; - stackTrace = replacement.stackTrace; - } - } - if (stackTrace == null) - stackTrace = A.AsyncError_defaultStackTrace(error); - t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); - t1._asyncCompleteError$2(error, stackTrace); - return t1; - }, - Future_wait(futures, eagerError, $T) { - var handleError, future, pos, e, st, t1, t2, exception, _box_0 = {}, cleanUp = null, - _future = new A._Future($.Zone__current, $T._eval$1("_Future>")); - _box_0.values = null; - _box_0.remaining = 0; - _box_0.stackTrace = _box_0.error = null; - handleError = new A.Future_wait_handleError(_box_0, cleanUp, eagerError, _future); - try { - for (t1 = J.get$iterator$ax(futures), t2 = type$.Null; t1.moveNext$0();) { - future = t1.get$current(t1); - pos = _box_0.remaining; - J.then$1$2$onError$x(future, new A.Future_wait_closure(_box_0, pos, _future, $T, cleanUp, eagerError), handleError, t2); - ++_box_0.remaining; - } - t1 = _box_0.remaining; - if (t1 === 0) { - t1 = _future; - t1._completeWithValue$1(A._setArrayType([], $T._eval$1("JSArray<0>"))); - return t1; - } - _box_0.values = A.List_List$filled(t1, null, false, $T._eval$1("0?")); - } catch (exception) { - e = A.unwrapException(exception); - st = A.getTraceFromException(exception); - if (_box_0.remaining === 0 || eagerError) - return A.Future_Future$error(e, st, $T._eval$1("List<0>")); - else { - _box_0.error = e; - _box_0.stackTrace = st; - } - } - return _future; - }, - _Future$zoneValue(value, _zone, $T) { - var t1 = new A._Future(_zone, $T._eval$1("_Future<0>")); - t1._state = 8; - t1._resultOrListeners = value; - return t1; - }, - _Future$value(value, $T) { - var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); - t1._state = 8; - t1._resultOrListeners = value; - return t1; - }, - _Future__chainCoreFutureSync(source, target) { - var t1, listeners; - for (; t1 = source._state, (t1 & 4) !== 0;) - source = source._resultOrListeners; - if (source === target) { - target._asyncCompleteError$2(new A.ArgumentError(true, source, null, "Cannot complete a future with itself"), A.StackTrace_current()); - return; - } - t1 |= target._state & 1; - source._state = t1; - if ((t1 & 24) !== 0) { - listeners = target._removeListeners$0(); - target._cloneResult$1(source); - A._Future__propagateToListeners(target, listeners); - } else { - listeners = target._resultOrListeners; - target._setChained$1(source); - source._prependListeners$1(listeners); - } - }, - _Future__chainCoreFutureAsync(source, target) { - var t2, listeners, _box_0 = {}, - t1 = _box_0.source = source; - for (; t2 = t1._state, (t2 & 4) !== 0;) { - t1 = t1._resultOrListeners; - _box_0.source = t1; - } - if (t1 === target) { - target._asyncCompleteError$2(new A.ArgumentError(true, t1, null, "Cannot complete a future with itself"), A.StackTrace_current()); - return; - } - if ((t2 & 24) === 0) { - listeners = target._resultOrListeners; - target._setChained$1(t1); - _box_0.source._prependListeners$1(listeners); - return; - } - if ((t2 & 16) === 0 && target._resultOrListeners == null) { - target._cloneResult$1(t1); - return; - } - target._state ^= 2; - target._zone.scheduleMicrotask$1(new A._Future__chainCoreFutureAsync_closure(_box_0, target)); - }, - _Future__propagateToListeners(source, listeners) { - var _box_0, t2, t3, hasError, nextListener, nextListener0, sourceResult, t4, zone, oldZone, result, current, _box_1 = {}, - t1 = _box_1.source = source; - for (; true;) { - _box_0 = {}; - t2 = t1._state; - t3 = (t2 & 16) === 0; - hasError = !t3; - if (listeners == null) { - if (hasError && (t2 & 1) === 0) { - t2 = t1._resultOrListeners; - t1._zone.handleUncaughtError$2(t2.error, t2.stackTrace); - } - return; - } - _box_0.listener = listeners; - nextListener = listeners._nextListener; - for (t1 = listeners; nextListener != null; t1 = nextListener, nextListener = nextListener0) { - t1._nextListener = null; - A._Future__propagateToListeners(_box_1.source, t1); - _box_0.listener = nextListener; - nextListener0 = nextListener._nextListener; - } - t2 = _box_1.source; - sourceResult = t2._resultOrListeners; - _box_0.listenerHasError = hasError; - _box_0.listenerValueOrError = sourceResult; - if (t3) { - t4 = t1.state; - t4 = (t4 & 1) !== 0 || (t4 & 15) === 8; - } else - t4 = true; - if (t4) { - zone = t1.result._zone; - if (hasError) { - t1 = t2._zone; - t1 = !(t1 === zone || t1.get$errorZone() === zone.get$errorZone()); - } else - t1 = false; - if (t1) { - t1 = _box_1.source; - t2 = t1._resultOrListeners; - t1._zone.handleUncaughtError$2(t2.error, t2.stackTrace); - return; - } - oldZone = $.Zone__current; - if (oldZone !== zone) - $.Zone__current = zone; - else - oldZone = null; - t1 = _box_0.listener.state; - if ((t1 & 15) === 8) - new A._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call$0(); - else if (t3) { - if ((t1 & 1) !== 0) - new A._Future__propagateToListeners_handleValueCallback(_box_0, sourceResult).call$0(); - } else if ((t1 & 2) !== 0) - new A._Future__propagateToListeners_handleError(_box_1, _box_0).call$0(); - if (oldZone != null) - $.Zone__current = oldZone; - t1 = _box_0.listenerValueOrError; - if (t1 instanceof A._Future) { - t2 = _box_0.listener.$ti; - t2 = t2._eval$1("Future<2>")._is(t1) || !t2._rest[1]._is(t1); - } else - t2 = false; - if (t2) { - result = _box_0.listener.result; - if ((t1._state & 24) !== 0) { - current = result._resultOrListeners; - result._resultOrListeners = null; - listeners = result._reverseListeners$1(current); - result._state = t1._state & 30 | result._state & 1; - result._resultOrListeners = t1._resultOrListeners; - _box_1.source = t1; - continue; - } else - A._Future__chainCoreFutureSync(t1, result); - return; - } - } - result = _box_0.listener.result; - current = result._resultOrListeners; - result._resultOrListeners = null; - listeners = result._reverseListeners$1(current); - t1 = _box_0.listenerHasError; - t2 = _box_0.listenerValueOrError; - if (!t1) { - result._state = 8; - result._resultOrListeners = t2; - } else { - result._state = result._state & 1 | 16; - result._resultOrListeners = t2; - } - _box_1.source = result; - t1 = result; - } - }, - _registerErrorHandler(errorHandler, zone) { - if (type$.dynamic_Function_Object_StackTrace._is(errorHandler)) - return zone.registerBinaryCallback$3$1(errorHandler, type$.dynamic, type$.Object, type$.StackTrace); - if (type$.dynamic_Function_Object._is(errorHandler)) - return zone.registerUnaryCallback$2$1(errorHandler, type$.dynamic, type$.Object); - throw A.wrapException(A.ArgumentError$value(errorHandler, "onError", string$.Error_)); - }, - _microtaskLoop() { - var entry, next; - for (entry = $._nextCallback; entry != null; entry = $._nextCallback) { - $._lastPriorityCallback = null; - next = entry.next; - $._nextCallback = next; - if (next == null) - $._lastCallback = null; - entry.callback.call$0(); - } - }, - _startMicrotaskLoop() { - $._isInCallbackLoop = true; - try { - A._microtaskLoop(); - } finally { - $._lastPriorityCallback = null; - $._isInCallbackLoop = false; - if ($._nextCallback != null) - $.$get$_AsyncRun__scheduleImmediateClosure().call$1(A.async___startMicrotaskLoop$closure()); - } - }, - _scheduleAsyncCallback(callback) { - var newEntry = new A._AsyncCallbackEntry(callback), - lastCallback = $._lastCallback; - if (lastCallback == null) { - $._nextCallback = $._lastCallback = newEntry; - if (!$._isInCallbackLoop) - $.$get$_AsyncRun__scheduleImmediateClosure().call$1(A.async___startMicrotaskLoop$closure()); - } else - $._lastCallback = lastCallback.next = newEntry; - }, - _schedulePriorityAsyncCallback(callback) { - var entry, lastPriorityCallback, next, - t1 = $._nextCallback; - if (t1 == null) { - A._scheduleAsyncCallback(callback); - $._lastPriorityCallback = $._lastCallback; - return; - } - entry = new A._AsyncCallbackEntry(callback); - lastPriorityCallback = $._lastPriorityCallback; - if (lastPriorityCallback == null) { - entry.next = t1; - $._nextCallback = $._lastPriorityCallback = entry; - } else { - next = lastPriorityCallback.next; - entry.next = next; - $._lastPriorityCallback = lastPriorityCallback.next = entry; - if (next == null) - $._lastCallback = entry; - } - }, - scheduleMicrotask(callback) { - var t1, _null = null, - currentZone = $.Zone__current; - if (B.C__RootZone === currentZone) { - A._rootScheduleMicrotask(_null, _null, B.C__RootZone, callback); - return; - } - if (B.C__RootZone === currentZone.get$_scheduleMicrotask().zone) - t1 = B.C__RootZone.get$errorZone() === currentZone.get$errorZone(); - else - t1 = false; - if (t1) { - A._rootScheduleMicrotask(_null, _null, currentZone, currentZone.registerCallback$1$1(callback, type$.void)); - return; - } - t1 = $.Zone__current; - t1.scheduleMicrotask$1(t1.bindCallbackGuarded$1(callback)); - }, - Stream_Stream$fromFuture(future, $T) { - var _null = null, - t1 = $T._eval$1("_SyncStreamController<0>"), - controller = new A._SyncStreamController(_null, _null, _null, _null, t1); - future.then$1$2$onError(0, new A.Stream_Stream$fromFuture_closure(controller, $T), new A.Stream_Stream$fromFuture_closure0(controller), type$.Null); - return new A._ControllerStream(controller, t1._eval$1("_ControllerStream<1>")); - }, - StreamIterator_StreamIterator(stream) { - return new A._StreamIterator(A.checkNotNullable(stream, "stream", type$.Object)); - }, - StreamController_StreamController(onCancel, onListen, onPause, onResume, sync, $T) { - return sync ? new A._SyncStreamController(onListen, onPause, onResume, onCancel, $T._eval$1("_SyncStreamController<0>")) : new A._AsyncStreamController(onListen, onPause, onResume, onCancel, $T._eval$1("_AsyncStreamController<0>")); - }, - _runGuarded(notificationHandler) { - var e, s, exception; - if (notificationHandler == null) - return; - try { - notificationHandler.call$0(); - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - $.Zone__current.handleUncaughtError$2(e, s); - } - }, - _ControllerSubscription$(_controller, onData, onError, onDone, cancelOnError, $T) { - var t1 = $.Zone__current, - t2 = cancelOnError ? 1 : 0, - t3 = onError != null ? 32 : 0, - t4 = A._BufferingStreamSubscription__registerDataHandler(t1, onData, $T), - t5 = A._BufferingStreamSubscription__registerErrorHandler(t1, onError), - t6 = onDone == null ? A.async___nullDoneHandler$closure() : onDone; - return new A._ControllerSubscription(_controller, t4, t5, t1.registerCallback$1$1(t6, type$.void), t1, t2 | t3, $T._eval$1("_ControllerSubscription<0>")); - }, - _AddStreamState_makeErrorHandler(controller) { - return new A._AddStreamState_makeErrorHandler_closure(controller); - }, - _BufferingStreamSubscription__registerDataHandler(zone, handleData, $T) { - var t1 = handleData == null ? A.async___nullDataHandler$closure() : handleData; - return zone.registerUnaryCallback$2$1(t1, type$.void, $T); - }, - _BufferingStreamSubscription__registerErrorHandler(zone, handleError) { - if (handleError == null) - handleError = A.async___nullErrorHandler$closure(); - if (type$.void_Function_Object_StackTrace._is(handleError)) - return zone.registerBinaryCallback$3$1(handleError, type$.dynamic, type$.Object, type$.StackTrace); - if (type$.void_Function_Object._is(handleError)) - return zone.registerUnaryCallback$2$1(handleError, type$.dynamic, type$.Object); - throw A.wrapException(A.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.", null)); - }, - _nullDataHandler(value) { - }, - _nullErrorHandler(error, stackTrace) { - $.Zone__current.handleUncaughtError$2(error, stackTrace); - }, - _nullDoneHandler() { - }, - Timer_Timer(duration, callback) { - var t1 = $.Zone__current; - if (t1 === B.C__RootZone) - return t1.createTimer$2(duration, callback); - return t1.createTimer$2(duration, t1.bindCallbackGuarded$1(callback)); - }, - _rootHandleUncaughtError($self, $parent, zone, error, stackTrace) { - A._rootHandleError(error, stackTrace); - }, - _rootHandleError(error, stackTrace) { - A._schedulePriorityAsyncCallback(new A._rootHandleError_closure(error, stackTrace)); - }, - _rootRun($self, $parent, zone, f) { - var old, - t1 = $.Zone__current; - if (t1 === zone) - return f.call$0(); - $.Zone__current = zone; - old = t1; - try { - t1 = f.call$0(); - return t1; - } finally { - $.Zone__current = old; - } - }, - _rootRunUnary($self, $parent, zone, f, arg) { - var old, - t1 = $.Zone__current; - if (t1 === zone) - return f.call$1(arg); - $.Zone__current = zone; - old = t1; - try { - t1 = f.call$1(arg); - return t1; - } finally { - $.Zone__current = old; - } - }, - _rootRunBinary($self, $parent, zone, f, arg1, arg2) { - var old, - t1 = $.Zone__current; - if (t1 === zone) - return f.call$2(arg1, arg2); - $.Zone__current = zone; - old = t1; - try { - t1 = f.call$2(arg1, arg2); - return t1; - } finally { - $.Zone__current = old; - } - }, - _rootRegisterCallback($self, $parent, zone, f) { - return f; - }, - _rootRegisterUnaryCallback($self, $parent, zone, f) { - return f; - }, - _rootRegisterBinaryCallback($self, $parent, zone, f) { - return f; - }, - _rootErrorCallback($self, $parent, zone, error, stackTrace) { - return null; - }, - _rootScheduleMicrotask($self, $parent, zone, f) { - var t1, t2; - if (B.C__RootZone !== zone) { - t1 = B.C__RootZone.get$errorZone(); - t2 = zone.get$errorZone(); - f = t1 !== t2 ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, type$.void); - } - A._scheduleAsyncCallback(f); - }, - _rootCreateTimer($self, $parent, zone, duration, callback) { - return A.Timer__createTimer(duration, B.C__RootZone !== zone ? zone.bindCallback$1$1(callback, type$.void) : callback); - }, - _rootCreatePeriodicTimer($self, $parent, zone, duration, callback) { - var milliseconds; - if (B.C__RootZone !== zone) - callback = zone.bindUnaryCallback$2$1(callback, type$.void, type$.Timer); - milliseconds = B.JSInt_methods._tdivFast$1(duration._duration, 1000); - return A._TimerImpl$periodic(milliseconds < 0 ? 0 : milliseconds, callback); - }, - _rootPrint($self, $parent, zone, line) { - A.printString(line); - }, - _printToZone(line) { - $.Zone__current.print$1(line); - }, - _rootFork($self, $parent, zone, specification, zoneValues) { - var valueMap, t1, handleUncaughtError; - $.printToZone = A.async___printToZone$closure(); - if (specification == null) - specification = B._ZoneSpecification_48t; - if (zoneValues == null) - valueMap = zone.get$_async$_map(); - else { - t1 = type$.nullable_Object; - valueMap = A.HashMap_HashMap$from(zoneValues, t1, t1); - } - t1 = new A._CustomZone(zone.get$_run(), zone.get$_runUnary(), zone.get$_runBinary(), zone.get$_registerCallback(), zone.get$_registerUnaryCallback(), zone.get$_registerBinaryCallback(), zone.get$_errorCallback(), zone.get$_scheduleMicrotask(), zone.get$_createTimer(), zone.get$_createPeriodicTimer(), zone.get$_print(), zone.get$_fork(), zone.get$_handleUncaughtError(), zone, valueMap); - handleUncaughtError = specification.handleUncaughtError; - if (handleUncaughtError != null) - t1._handleUncaughtError = new A._ZoneFunction(t1, handleUncaughtError); - return t1; - }, - runZoned(body, zoneValues, $R) { - A.checkNotNullable(body, "body", $R._eval$1("0()")); - return A._runZoned(body, zoneValues, null, $R); - }, - _runZoned(body, zoneValues, specification, $R) { - return $.Zone__current.fork$2$specification$zoneValues(specification, zoneValues).run$1$1(0, body, $R); - }, - _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) { - this._box_0 = t0; - }, - _AsyncRun__initializeScheduleImmediate_closure: function _AsyncRun__initializeScheduleImmediate_closure(t0, t1, t2) { - this._box_0 = t0; - this.div = t1; - this.span = t2; - }, - _AsyncRun__scheduleImmediateJsOverride_internalCallback: function _AsyncRun__scheduleImmediateJsOverride_internalCallback(t0) { - this.callback = t0; - }, - _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: function _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(t0) { - this.callback = t0; - }, - _TimerImpl: function _TimerImpl(t0) { - this._once = t0; - this._handle = null; - this._tick = 0; - }, - _TimerImpl_internalCallback: function _TimerImpl_internalCallback(t0, t1) { - this.$this = t0; - this.callback = t1; - }, - _TimerImpl$periodic_closure: function _TimerImpl$periodic_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.milliseconds = t1; - _.start = t2; - _.callback = t3; - }, - _AsyncAwaitCompleter: function _AsyncAwaitCompleter(t0, t1) { - this._future = t0; - this.isSync = false; - this.$ti = t1; - }, - _awaitOnObject_closure: function _awaitOnObject_closure(t0) { - this.bodyFunction = t0; - }, - _awaitOnObject_closure0: function _awaitOnObject_closure0(t0) { - this.bodyFunction = t0; - }, - _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) { - this.$protected = t0; - }, - _SyncStarIterator: function _SyncStarIterator(t0) { - var _ = this; - _._body = t0; - _._suspendedBodies = _._nestedIterator = _._datum = _._async$_current = null; - }, - _SyncStarIterable: function _SyncStarIterable(t0, t1) { - this._outerHelper = t0; - this.$ti = t1; - }, - AsyncError: function AsyncError(t0, t1) { - this.error = t0; - this.stackTrace = t1; - }, - Future_wait_handleError: function Future_wait_handleError(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.cleanUp = t1; - _.eagerError = t2; - _._future = t3; - }, - Future_wait_closure: function Future_wait_closure(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._box_0 = t0; - _.pos = t1; - _._future = t2; - _.T = t3; - _.cleanUp = t4; - _.eagerError = t5; - }, - _Completer: function _Completer() { - }, - _AsyncCompleter: function _AsyncCompleter(t0, t1) { - this.future = t0; - this.$ti = t1; - }, - _SyncCompleter: function _SyncCompleter(t0, t1) { - this.future = t0; - this.$ti = t1; - }, - _FutureListener: function _FutureListener(t0, t1, t2, t3, t4) { - var _ = this; - _._nextListener = null; - _.result = t0; - _.state = t1; - _.callback = t2; - _.errorCallback = t3; - _.$ti = t4; - }, - _Future: function _Future(t0, t1) { - var _ = this; - _._state = 0; - _._zone = t0; - _._resultOrListeners = null; - _.$ti = t1; - }, - _Future__addListener_closure: function _Future__addListener_closure(t0, t1) { - this.$this = t0; - this.listener = t1; - }, - _Future__prependListeners_closure: function _Future__prependListeners_closure(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - _Future__chainForeignFuture_closure: function _Future__chainForeignFuture_closure(t0) { - this.$this = t0; - }, - _Future__chainForeignFuture_closure0: function _Future__chainForeignFuture_closure0(t0) { - this.$this = t0; - }, - _Future__chainForeignFuture_closure1: function _Future__chainForeignFuture_closure1(t0, t1, t2) { - this.$this = t0; - this.e = t1; - this.s = t2; - }, - _Future__chainCoreFutureAsync_closure: function _Future__chainCoreFutureAsync_closure(t0, t1) { - this._box_0 = t0; - this.target = t1; - }, - _Future__asyncCompleteWithValue_closure: function _Future__asyncCompleteWithValue_closure(t0, t1) { - this.$this = t0; - this.value = t1; - }, - _Future__asyncCompleteError_closure: function _Future__asyncCompleteError_closure(t0, t1, t2) { - this.$this = t0; - this.error = t1; - this.stackTrace = t2; - }, - _Future__propagateToListeners_handleWhenCompleteCallback: function _Future__propagateToListeners_handleWhenCompleteCallback(t0, t1, t2) { - this._box_0 = t0; - this._box_1 = t1; - this.hasError = t2; - }, - _Future__propagateToListeners_handleWhenCompleteCallback_closure: function _Future__propagateToListeners_handleWhenCompleteCallback_closure(t0) { - this.originalSource = t0; - }, - _Future__propagateToListeners_handleValueCallback: function _Future__propagateToListeners_handleValueCallback(t0, t1) { - this._box_0 = t0; - this.sourceResult = t1; - }, - _Future__propagateToListeners_handleError: function _Future__propagateToListeners_handleError(t0, t1) { - this._box_1 = t0; - this._box_0 = t1; - }, - _AsyncCallbackEntry: function _AsyncCallbackEntry(t0) { - this.callback = t0; - this.next = null; - }, - Stream: function Stream() { - }, - Stream_Stream$fromFuture_closure: function Stream_Stream$fromFuture_closure(t0, t1) { - this.controller = t0; - this.T = t1; - }, - Stream_Stream$fromFuture_closure0: function Stream_Stream$fromFuture_closure0(t0) { - this.controller = t0; - }, - Stream_length_closure: function Stream_length_closure(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - Stream_length_closure0: function Stream_length_closure0(t0, t1) { - this._box_0 = t0; - this.future = t1; - }, - _StreamController: function _StreamController() { - }, - _StreamController__subscribe_closure: function _StreamController__subscribe_closure(t0) { - this.$this = t0; - }, - _StreamController__recordCancel_complete: function _StreamController__recordCancel_complete(t0) { - this.$this = t0; - }, - _SyncStreamControllerDispatch: function _SyncStreamControllerDispatch() { - }, - _AsyncStreamControllerDispatch: function _AsyncStreamControllerDispatch() { - }, - _AsyncStreamController: function _AsyncStreamController(t0, t1, t2, t3, t4) { - var _ = this; - _._varData = null; - _._state = 0; - _._doneFuture = null; - _.onListen = t0; - _.onPause = t1; - _.onResume = t2; - _.onCancel = t3; - _.$ti = t4; - }, - _SyncStreamController: function _SyncStreamController(t0, t1, t2, t3, t4) { - var _ = this; - _._varData = null; - _._state = 0; - _._doneFuture = null; - _.onListen = t0; - _.onPause = t1; - _.onResume = t2; - _.onCancel = t3; - _.$ti = t4; - }, - _ControllerStream: function _ControllerStream(t0, t1) { - this._controller = t0; - this.$ti = t1; - }, - _ControllerSubscription: function _ControllerSubscription(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _._controller = t0; - _._onData = t1; - _._onError = t2; - _._onDone = t3; - _._zone = t4; - _._state = t5; - _._pending = _._cancelFuture = null; - _.$ti = t6; - }, - _AddStreamState: function _AddStreamState() { - }, - _AddStreamState_makeErrorHandler_closure: function _AddStreamState_makeErrorHandler_closure(t0) { - this.controller = t0; - }, - _AddStreamState_cancel_closure: function _AddStreamState_cancel_closure(t0) { - this.$this = t0; - }, - _StreamControllerAddStreamState: function _StreamControllerAddStreamState(t0, t1, t2) { - this._varData = t0; - this.addStreamFuture = t1; - this.addSubscription = t2; - }, - _BufferingStreamSubscription: function _BufferingStreamSubscription() { - }, - _BufferingStreamSubscription__sendError_sendError: function _BufferingStreamSubscription__sendError_sendError(t0, t1, t2) { - this.$this = t0; - this.error = t1; - this.stackTrace = t2; - }, - _BufferingStreamSubscription__sendDone_sendDone: function _BufferingStreamSubscription__sendDone_sendDone(t0) { - this.$this = t0; - }, - _StreamImpl: function _StreamImpl() { - }, - _DelayedEvent: function _DelayedEvent() { - }, - _DelayedData: function _DelayedData(t0) { - this.value = t0; - this.next = null; - }, - _DelayedError: function _DelayedError(t0, t1) { - this.error = t0; - this.stackTrace = t1; - this.next = null; - }, - _DelayedDone: function _DelayedDone() { - }, - _PendingEvents: function _PendingEvents() { - this._state = 0; - this.lastPendingEvent = this.firstPendingEvent = null; - }, - _PendingEvents_schedule_closure: function _PendingEvents_schedule_closure(t0, t1) { - this.$this = t0; - this.dispatch = t1; - }, - _StreamIterator: function _StreamIterator(t0) { - this._subscription = null; - this._stateData = t0; - this._async$_hasValue = false; - }, - _ForwardingStream: function _ForwardingStream() { - }, - _ForwardingStreamSubscription: function _ForwardingStreamSubscription(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _._stream = t0; - _._subscription = null; - _._onData = t1; - _._onError = t2; - _._onDone = t3; - _._zone = t4; - _._state = t5; - _._pending = _._cancelFuture = null; - _.$ti = t6; - }, - _ExpandStream: function _ExpandStream(t0, t1, t2) { - this._expand = t0; - this._async$_source = t1; - this.$ti = t2; - }, - _ZoneFunction: function _ZoneFunction(t0, t1) { - this.zone = t0; - this.$function = t1; - }, - _ZoneSpecification: function _ZoneSpecification(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) { - var _ = this; - _.handleUncaughtError = t0; - _.run = t1; - _.runUnary = t2; - _.runBinary = t3; - _.registerCallback = t4; - _.registerUnaryCallback = t5; - _.registerBinaryCallback = t6; - _.errorCallback = t7; - _.scheduleMicrotask = t8; - _.createTimer = t9; - _.createPeriodicTimer = t10; - _.print = t11; - _.fork = t12; - }, - _ZoneDelegate: function _ZoneDelegate(t0) { - this._delegationTarget = t0; - }, - _Zone: function _Zone() { - }, - _CustomZone: function _CustomZone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { - var _ = this; - _._run = t0; - _._runUnary = t1; - _._runBinary = t2; - _._registerCallback = t3; - _._registerUnaryCallback = t4; - _._registerBinaryCallback = t5; - _._errorCallback = t6; - _._scheduleMicrotask = t7; - _._createTimer = t8; - _._createPeriodicTimer = t9; - _._print = t10; - _._fork = t11; - _._handleUncaughtError = t12; - _._delegateCache = null; - _.parent = t13; - _._async$_map = t14; - }, - _CustomZone_bindCallback_closure: function _CustomZone_bindCallback_closure(t0, t1, t2) { - this.$this = t0; - this.registered = t1; - this.R = t2; - }, - _CustomZone_bindUnaryCallback_closure: function _CustomZone_bindUnaryCallback_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.registered = t1; - _.T = t2; - _.R = t3; - }, - _CustomZone_bindCallbackGuarded_closure: function _CustomZone_bindCallbackGuarded_closure(t0, t1) { - this.$this = t0; - this.registered = t1; - }, - _rootHandleError_closure: function _rootHandleError_closure(t0, t1) { - this.error = t0; - this.stackTrace = t1; - }, - _RootZone: function _RootZone() { - }, - _RootZone_bindCallback_closure: function _RootZone_bindCallback_closure(t0, t1, t2) { - this.$this = t0; - this.f = t1; - this.R = t2; - }, - _RootZone_bindUnaryCallback_closure: function _RootZone_bindUnaryCallback_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.f = t1; - _.T = t2; - _.R = t3; - }, - _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) { - this.$this = t0; - this.f = t1; - }, - HashMap_HashMap($K, $V) { - return new A._HashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("_HashMap<1,2>")); - }, - _HashMap__getTableEntry(table, key) { - var entry = table[key]; - return entry === table ? null : entry; - }, - _HashMap__setTableEntry(table, key, value) { - if (value == null) - table[key] = table; - else - table[key] = value; - }, - _HashMap__newHashTable() { - var table = Object.create(null); - A._HashMap__setTableEntry(table, "", table); - delete table[""]; - return table; - }, - LinkedHashMap_LinkedHashMap(equals, hashCode, isValidKey, $K, $V) { - if (isValidKey == null) - if (hashCode == null) { - if (equals == null) - return new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); - hashCode = A.collection___defaultHashCode$closure(); - } else { - if (A.core__identityHashCode$closure() === hashCode && A.core__identical$closure() === equals) - return new A.JsIdentityLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsIdentityLinkedHashMap<1,2>")); - if (equals == null) - equals = A.collection___defaultEquals$closure(); - } - else { - if (hashCode == null) - hashCode = A.collection___defaultHashCode$closure(); - if (equals == null) - equals = A.collection___defaultEquals$closure(); - } - return A._LinkedCustomHashMap$(equals, hashCode, isValidKey, $K, $V); - }, - LinkedHashMap_LinkedHashMap$_literal(keyValuePairs, $K, $V) { - return A.fillLiteralMap(keyValuePairs, new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>"))); - }, - LinkedHashMap_LinkedHashMap$_empty($K, $V) { - return new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); - }, - _LinkedCustomHashMap$(_equals, _hashCode, validKey, $K, $V) { - var t1 = validKey != null ? validKey : new A._LinkedCustomHashMap_closure($K); - return new A._LinkedCustomHashMap(_equals, _hashCode, t1, $K._eval$1("@<0>")._bind$1($V)._eval$1("_LinkedCustomHashMap<1,2>")); - }, - LinkedHashSet_LinkedHashSet($E) { - return new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>")); - }, - LinkedHashSet_LinkedHashSet$_empty($E) { - return new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>")); - }, - LinkedHashSet_LinkedHashSet$_literal(values, $E) { - return A.fillLiteralSet(values, new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>"))); - }, - _LinkedHashSet__newHashTable() { - var table = Object.create(null); - table[""] = table; - delete table[""]; - return table; - }, - _LinkedHashSetIterator$(_set, _modifications, $E) { - var t1 = new A._LinkedHashSetIterator(_set, _modifications, $E._eval$1("_LinkedHashSetIterator<0>")); - t1._cell = _set._first; - return t1; - }, - UnmodifiableListView$(source, $E) { - return new A.UnmodifiableListView(source, $E._eval$1("UnmodifiableListView<0>")); - }, - _defaultEquals(a, b) { - return J.$eq$(a, b); - }, - _defaultHashCode(a) { - return J.get$hashCode$(a); - }, - HashMap_HashMap$from(other, $K, $V) { - var result = A.HashMap_HashMap($K, $V); - other.forEach$1(0, new A.HashMap_HashMap$from_closure(result, $K, $V)); - return result; - }, - IterableExtensions_get_firstOrNull(_this) { - var t2, - t1 = A._arrayInstanceType(_this), - iterator = new J.ArrayIterator(_this, _this.length, t1._eval$1("ArrayIterator<1>")); - if (iterator.moveNext$0()) { - t2 = iterator._current; - return t2 == null ? t1._precomputed1._as(t2) : t2; - } - return null; - }, - LinkedHashMap_LinkedHashMap$from(other, $K, $V) { - var result = A.LinkedHashMap_LinkedHashMap(null, null, null, $K, $V); - other.forEach$1(0, new A.LinkedHashMap_LinkedHashMap$from_closure(result, $K, $V)); - return result; - }, - LinkedHashMap_LinkedHashMap$of(other, $K, $V) { - var t1 = A.LinkedHashMap_LinkedHashMap(null, null, null, $K, $V); - t1.addAll$1(0, other); - return t1; - }, - LinkedHashSet_LinkedHashSet$from(elements, $E) { - var t1, _i, - result = A.LinkedHashSet_LinkedHashSet($E); - for (t1 = elements.length, _i = 0; _i < elements.length; elements.length === t1 || (0, A.throwConcurrentModificationError)(elements), ++_i) - result.add$1(0, $E._as(elements[_i])); - return result; - }, - LinkedHashSet_LinkedHashSet$of(elements, $E) { - var t1 = A.LinkedHashSet_LinkedHashSet($E); - t1.addAll$1(0, elements); - return t1; - }, - ListBase__compareAny(a, b) { - var t1 = type$.Comparable_dynamic; - return J.compareTo$1$ns(t1._as(a), t1._as(b)); - }, - MapBase_mapToString(m) { - var result, t1 = {}; - if (A.isToStringVisiting(m)) - return "{...}"; - result = new A.StringBuffer(""); - try { - $.toStringVisiting.push(m); - result._contents += "{"; - t1.first = true; - m.forEach$1(0, new A.MapBase_mapToString_closure(t1, result)); - result._contents += "}"; - } finally { - $.toStringVisiting.pop(); - } - t1 = result._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - MapBase__fillMapWithIterables(map, keys, values) { - var keyIterator = keys.get$iterator(keys), - valueIterator = values.get$iterator(values), - hasNextKey = keyIterator.moveNext$0(), - hasNextValue = valueIterator.moveNext$0(); - while (true) { - if (!(hasNextKey && hasNextValue)) - break; - map.$indexSet(0, keyIterator.get$current(keyIterator), valueIterator.get$current(valueIterator)); - hasNextKey = keyIterator.moveNext$0(); - hasNextValue = valueIterator.moveNext$0(); - } - if (hasNextKey || hasNextValue) - throw A.wrapException(A.ArgumentError$("Iterables do not have same length.", null)); - }, - ListQueue$($E) { - return new A.ListQueue(A.List_List$filled(A.ListQueue__calculateCapacity(null), null, false, $E._eval$1("0?")), $E._eval$1("ListQueue<0>")); - }, - ListQueue__calculateCapacity(initialCapacity) { - return 8; - }, - ListQueue__nextPowerOf2(number) { - var nextNumber; - number = (number << 1 >>> 0) - 1; - for (; true; number = nextNumber) { - nextNumber = (number & number - 1) >>> 0; - if (nextNumber === 0) - return number; - } - }, - _ListQueueIterator$(queue, $E) { - return new A._ListQueueIterator(queue, queue._tail, queue._modificationCount, queue._head, $E._eval$1("_ListQueueIterator<0>")); - }, - _UnmodifiableSetMixin__throwUnmodifiable() { - throw A.wrapException(A.UnsupportedError$("Cannot change an unmodifiable set")); - }, - _HashMap: function _HashMap(t0) { - var _ = this; - _._collection$_length = 0; - _._collection$_keys = _._collection$_rest = _._nums = _._strings = null; - _.$ti = t0; - }, - _HashMap_values_closure: function _HashMap_values_closure(t0) { - this.$this = t0; - }, - _HashMap_addAll_closure: function _HashMap_addAll_closure(t0) { - this.$this = t0; - }, - _IdentityHashMap: function _IdentityHashMap(t0) { - var _ = this; - _._collection$_length = 0; - _._collection$_keys = _._collection$_rest = _._nums = _._strings = null; - _.$ti = t0; - }, - _HashMapKeyIterable: function _HashMapKeyIterable(t0, t1) { - this._map = t0; - this.$ti = t1; - }, - _HashMapKeyIterator: function _HashMapKeyIterator(t0, t1, t2) { - var _ = this; - _._map = t0; - _._collection$_keys = t1; - _._offset = 0; - _._collection$_current = null; - _.$ti = t2; - }, - _LinkedCustomHashMap: function _LinkedCustomHashMap(t0, t1, t2, t3) { - var _ = this; - _._equals = t0; - _._hashCode = t1; - _._validKey = t2; - _.__js_helper$_length = 0; - _.__js_helper$_last = _.__js_helper$_first = _.__js_helper$_rest = _.__js_helper$_nums = _.__js_helper$_strings = null; - _.__js_helper$_modifications = 0; - _.$ti = t3; - }, - _LinkedCustomHashMap_closure: function _LinkedCustomHashMap_closure(t0) { - this.K = t0; - }, - _LinkedHashSet: function _LinkedHashSet(t0) { - var _ = this; - _._collection$_length = 0; - _._last = _._first = _._collection$_rest = _._nums = _._strings = null; - _._modifications = 0; - _.$ti = t0; - }, - _LinkedIdentityHashSet: function _LinkedIdentityHashSet(t0) { - var _ = this; - _._collection$_length = 0; - _._last = _._first = _._collection$_rest = _._nums = _._strings = null; - _._modifications = 0; - _.$ti = t0; - }, - _LinkedHashSetCell: function _LinkedHashSetCell(t0) { - this._element = t0; - this._previous = this._next = null; - }, - _LinkedHashSetIterator: function _LinkedHashSetIterator(t0, t1, t2) { - var _ = this; - _._set = t0; - _._modifications = t1; - _._collection$_current = _._cell = null; - _.$ti = t2; - }, - UnmodifiableListView: function UnmodifiableListView(t0, t1) { - this._collection$_source = t0; - this.$ti = t1; - }, - HashMap_HashMap$from_closure: function HashMap_HashMap$from_closure(t0, t1, t2) { - this.result = t0; - this.K = t1; - this.V = t2; - }, - LinkedHashMap_LinkedHashMap$from_closure: function LinkedHashMap_LinkedHashMap$from_closure(t0, t1, t2) { - this.result = t0; - this.K = t1; - this.V = t2; - }, - ListBase: function ListBase() { - }, - MapBase: function MapBase() { - }, - MapBase_addAll_closure: function MapBase_addAll_closure(t0) { - this.$this = t0; - }, - MapBase_entries_closure: function MapBase_entries_closure(t0) { - this.$this = t0; - }, - MapBase_mapToString_closure: function MapBase_mapToString_closure(t0, t1) { - this._box_0 = t0; - this.result = t1; - }, - UnmodifiableMapBase: function UnmodifiableMapBase() { - }, - _MapBaseValueIterable: function _MapBaseValueIterable(t0, t1) { - this._map = t0; - this.$ti = t1; - }, - _MapBaseValueIterator: function _MapBaseValueIterator(t0, t1, t2) { - var _ = this; - _._collection$_keys = t0; - _._map = t1; - _._collection$_current = null; - _.$ti = t2; - }, - _UnmodifiableMapMixin: function _UnmodifiableMapMixin() { - }, - MapView: function MapView() { - }, - UnmodifiableMapView: function UnmodifiableMapView(t0, t1) { - this._map = t0; - this.$ti = t1; - }, - ListQueue: function ListQueue(t0, t1) { - var _ = this; - _._table = t0; - _._modificationCount = _._tail = _._head = 0; - _.$ti = t1; - }, - _ListQueueIterator: function _ListQueueIterator(t0, t1, t2, t3, t4) { - var _ = this; - _._queue = t0; - _._collection$_end = t1; - _._modificationCount = t2; - _._collection$_position = t3; - _._collection$_current = null; - _.$ti = t4; - }, - SetBase: function SetBase() { - }, - _SetBase: function _SetBase() { - }, - _UnmodifiableSetMixin: function _UnmodifiableSetMixin() { - }, - UnmodifiableSetView: function UnmodifiableSetView(t0, t1) { - this._collection$_source = t0; - this.$ti = t1; - }, - _UnmodifiableMapView_MapView__UnmodifiableMapMixin: function _UnmodifiableMapView_MapView__UnmodifiableMapMixin() { - }, - _UnmodifiableSetView_SetBase__UnmodifiableSetMixin: function _UnmodifiableSetView_SetBase__UnmodifiableSetMixin() { - }, - _parseJson(source, reviver) { - var e, exception, t1, parsed = null; - try { - parsed = JSON.parse(source); - } catch (exception) { - e = A.unwrapException(exception); - t1 = A.FormatException$(String(e), null, null); - throw A.wrapException(t1); - } - t1 = A._convertJsonToDartLazy(parsed); - return t1; - }, - _convertJsonToDartLazy(object) { - var i; - if (object == null) - return null; - if (typeof object != "object") - return object; - if (!Array.isArray(object)) - return new A._JsonMap(object, Object.create(null)); - for (i = 0; i < object.length; ++i) - object[i] = A._convertJsonToDartLazy(object[i]); - return object; - }, - _Utf8Decoder__makeNativeUint8List(codeUnits, start, end) { - var bytes, t1, i, b, - $length = end - start; - if ($length <= 4096) - bytes = $.$get$_Utf8Decoder__reusableBuffer(); - else - bytes = new Uint8Array($length); - for (t1 = J.getInterceptor$asx(codeUnits), i = 0; i < $length; ++i) { - b = t1.$index(codeUnits, start + i); - if ((b & 255) !== b) - b = 255; - bytes[i] = b; - } - return bytes; - }, - _Utf8Decoder__convertInterceptedUint8List(allowMalformed, codeUnits, start, end) { - var decoder = allowMalformed ? $.$get$_Utf8Decoder__decoderNonfatal() : $.$get$_Utf8Decoder__decoder(); - if (decoder == null) - return null; - if (0 === start && end === codeUnits.length) - return A._Utf8Decoder__useTextDecoder(decoder, codeUnits); - return A._Utf8Decoder__useTextDecoder(decoder, codeUnits.subarray(start, end)); - }, - _Utf8Decoder__useTextDecoder(decoder, codeUnits) { - var t1, exception; - try { - t1 = decoder.decode(codeUnits); - return t1; - } catch (exception) { - } - return null; - }, - Base64Codec__checkPadding(source, sourceIndex, sourceEnd, firstPadding, paddingCount, $length) { - if (B.JSInt_methods.$mod($length, 4) !== 0) - throw A.wrapException(A.FormatException$("Invalid base64 padding, padded length must be multiple of four, is " + $length, source, sourceEnd)); - if (firstPadding + paddingCount !== $length) - throw A.wrapException(A.FormatException$("Invalid base64 padding, '=' not at the end", source, sourceIndex)); - if (paddingCount > 2) - throw A.wrapException(A.FormatException$("Invalid base64 padding, more than two '=' characters", source, sourceIndex)); - }, - _Base64Encoder_encodeChunk(alphabet, bytes, start, end, isLast, output, outputIndex, state) { - var t1, i, byteOr, byte, outputIndex0, outputIndex1, - bits = state >>> 2, - expectedChars = 3 - (state & 3); - for (t1 = J.getInterceptor$asx(bytes), i = start, byteOr = 0; i < end; ++i) { - byte = t1.$index(bytes, i); - byteOr = (byteOr | byte) >>> 0; - bits = (bits << 8 | byte) & 16777215; - --expectedChars; - if (expectedChars === 0) { - outputIndex0 = outputIndex + 1; - output[outputIndex] = alphabet.charCodeAt(bits >>> 18 & 63); - outputIndex = outputIndex0 + 1; - output[outputIndex0] = alphabet.charCodeAt(bits >>> 12 & 63); - outputIndex0 = outputIndex + 1; - output[outputIndex] = alphabet.charCodeAt(bits >>> 6 & 63); - outputIndex = outputIndex0 + 1; - output[outputIndex0] = alphabet.charCodeAt(bits & 63); - bits = 0; - expectedChars = 3; - } - } - if (byteOr >= 0 && byteOr <= 255) { - if (isLast && expectedChars < 3) { - outputIndex0 = outputIndex + 1; - outputIndex1 = outputIndex0 + 1; - if (3 - expectedChars === 1) { - output[outputIndex] = alphabet.charCodeAt(bits >>> 2 & 63); - output[outputIndex0] = alphabet.charCodeAt(bits << 4 & 63); - output[outputIndex1] = 61; - output[outputIndex1 + 1] = 61; - } else { - output[outputIndex] = alphabet.charCodeAt(bits >>> 10 & 63); - output[outputIndex0] = alphabet.charCodeAt(bits >>> 4 & 63); - output[outputIndex1] = alphabet.charCodeAt(bits << 2 & 63); - output[outputIndex1 + 1] = 61; - } - return 0; - } - return (bits << 2 | 3 - expectedChars) >>> 0; - } - for (i = start; i < end;) { - byte = t1.$index(bytes, i); - if (byte < 0 || byte > 255) - break; - ++i; - } - throw A.wrapException(A.ArgumentError$value(bytes, "Not a byte value at index " + i + ": 0x" + J.toRadixString$1$n(t1.$index(bytes, i), 16), null)); - }, - JsonUnsupportedObjectError$(unsupportedObject, cause, partialResult) { - return new A.JsonUnsupportedObjectError(unsupportedObject, cause); - }, - _defaultToEncodable(object) { - return object.toJson$0(); - }, - _JsonStringStringifier$(_sink, _toEncodable) { - return new A._JsonStringStringifier(_sink, [], A.convert___defaultToEncodable$closure()); - }, - _JsonStringStringifier_stringify(object, toEncodable, indent) { - var t1, - output = new A.StringBuffer(""), - stringifier = A._JsonStringStringifier$(output, toEncodable); - stringifier.writeObject$1(object); - t1 = output._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _Utf8Decoder_errorDescription(state) { - switch (state) { - case 65: - return "Missing extension byte"; - case 67: - return "Unexpected extension byte"; - case 69: - return "Invalid UTF-8 byte"; - case 71: - return "Overlong encoding"; - case 73: - return "Out of unicode range"; - case 75: - return "Encoded surrogate"; - case 77: - return "Unfinished UTF-8 octet sequence"; - default: - return ""; - } - }, - _JsonMap: function _JsonMap(t0, t1) { - this._original = t0; - this._processed = t1; - this._data = null; - }, - _JsonMap_values_closure: function _JsonMap_values_closure(t0) { - this.$this = t0; - }, - _JsonMap_addAll_closure: function _JsonMap_addAll_closure(t0) { - this.$this = t0; - }, - _JsonMapKeyIterable: function _JsonMapKeyIterable(t0) { - this._convert$_parent = t0; - }, - _Utf8Decoder__decoder_closure: function _Utf8Decoder__decoder_closure() { - }, - _Utf8Decoder__decoderNonfatal_closure: function _Utf8Decoder__decoderNonfatal_closure() { - }, - AsciiCodec: function AsciiCodec() { - }, - _UnicodeSubsetEncoder: function _UnicodeSubsetEncoder() { - }, - AsciiEncoder: function AsciiEncoder(t0) { - this._subsetMask = t0; - }, - Base64Codec: function Base64Codec() { - }, - Base64Encoder: function Base64Encoder() { - }, - _Base64Encoder: function _Base64Encoder(t0) { - this._convert$_state = 0; - this._alphabet = t0; - }, - _Base64EncoderSink: function _Base64EncoderSink() { - }, - _Utf8Base64EncoderSink: function _Utf8Base64EncoderSink(t0, t1) { - this._sink = t0; - this._encoder = t1; - }, - ByteConversionSink: function ByteConversionSink() { - }, - Codec: function Codec() { - }, - Converter: function Converter() { - }, - Encoding: function Encoding() { - }, - JsonUnsupportedObjectError: function JsonUnsupportedObjectError(t0, t1) { - this.unsupportedObject = t0; - this.cause = t1; - }, - JsonCyclicError: function JsonCyclicError(t0, t1) { - this.unsupportedObject = t0; - this.cause = t1; - }, - JsonCodec: function JsonCodec() { - }, - JsonEncoder: function JsonEncoder(t0) { - this._toEncodable = t0; - }, - JsonDecoder: function JsonDecoder(t0) { - this._reviver = t0; - }, - _JsonStringifier: function _JsonStringifier() { - }, - _JsonStringifier_writeMap_closure: function _JsonStringifier_writeMap_closure(t0, t1) { - this._box_0 = t0; - this.keyValueList = t1; - }, - _JsonStringStringifier: function _JsonStringStringifier(t0, t1, t2) { - this._sink = t0; - this._seen = t1; - this._toEncodable = t2; - }, - StringConversionSink: function StringConversionSink() { - }, - _StringSinkConversionSink: function _StringSinkConversionSink(t0) { - this._stringSink = t0; - }, - _StringCallbackSink: function _StringCallbackSink(t0, t1) { - this._convert$_callback = t0; - this._stringSink = t1; - }, - _Utf8StringSinkAdapter: function _Utf8StringSinkAdapter(t0, t1, t2) { - this._decoder = t0; - this._sink = t1; - this._stringSink = t2; - }, - Utf8Codec: function Utf8Codec() { - }, - Utf8Encoder: function Utf8Encoder() { - }, - _Utf8Encoder: function _Utf8Encoder(t0) { - this._bufferIndex = 0; - this._buffer = t0; - }, - Utf8Decoder: function Utf8Decoder(t0) { - this._allowMalformed = t0; - }, - _Utf8Decoder: function _Utf8Decoder(t0) { - this.allowMalformed = t0; - this._convert$_state = 16; - this._charOrIndex = 0; - }, - identityHashCode(object) { - return A.objectHashCode(object); - }, - Function_apply($function, positionalArguments) { - return A.Primitives_applyFunction($function, positionalArguments, null); - }, - Expando$() { - return new A.Expando(new WeakMap()); - }, - Expando__checkType(object) { - if (A._isBool(object) || typeof object == "number" || typeof object == "string" || object instanceof A._Record) - A.Expando__badExpandoKey(object); - }, - Expando__badExpandoKey(object) { - throw A.wrapException(A.ArgumentError$value(object, "object", "Expandos are not allowed on strings, numbers, bools, records or null")); - }, - int_parse(source, radix) { - var value = A.Primitives_parseInt(source, radix); - if (value != null) - return value; - throw A.wrapException(A.FormatException$(source, null, null)); - }, - double_parse(source) { - var value = A.Primitives_parseDouble(source); - if (value != null) - return value; - throw A.wrapException(A.FormatException$("Invalid double", source, null)); - }, - Error__throw(error, stackTrace) { - error = A.wrapException(error); - error.stack = stackTrace.toString$0(0); - throw error; - throw A.wrapException("unreachable"); - }, - List_List$filled($length, fill, growable, $E) { - var i, - result = growable ? J.JSArray_JSArray$growable($length, $E) : J.JSArray_JSArray$fixed($length, $E); - if ($length !== 0 && fill != null) - for (i = 0; i < result.length; ++i) - result[i] = fill; - return result; - }, - List_List$from(elements, growable, $E) { - var t1, - list = A._setArrayType([], $E._eval$1("JSArray<0>")); - for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) - list.push(t1.get$current(t1)); - if (growable) - return list; - return J.JSArray_markFixedList(list); - }, - List_List$of(elements, growable, $E) { - var t1; - if (growable) - return A.List_List$_of(elements, $E); - t1 = J.JSArray_markFixedList(A.List_List$_of(elements, $E)); - return t1; - }, - List_List$_of(elements, $E) { - var list, t1; - if (Array.isArray(elements)) - return A._setArrayType(elements.slice(0), $E._eval$1("JSArray<0>")); - list = A._setArrayType([], $E._eval$1("JSArray<0>")); - for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) - list.push(t1.get$current(t1)); - return list; - }, - List_List$unmodifiable(elements, $E) { - return J.JSArray_markUnmodifiableList(A.List_List$from(elements, false, $E)); - }, - String_String$fromCharCodes(charCodes, start, end) { - var t1, t2, maxLength, array, len; - A.RangeError_checkNotNegative(start, "start"); - t1 = end == null; - t2 = !t1; - if (t2) { - maxLength = end - start; - if (maxLength < 0) - throw A.wrapException(A.RangeError$range(end, start, null, "end", null)); - if (maxLength === 0) - return ""; - } - if (Array.isArray(charCodes)) { - array = charCodes; - len = array.length; - if (t1) - end = len; - return A.Primitives_stringFromCharCodes(start > 0 || end < len ? array.slice(start, end) : array); - } - if (type$.NativeUint8List._is(charCodes)) - return A.String__stringFromUint8List(charCodes, start, end); - if (t2) - charCodes = J.take$1$ax(charCodes, end); - if (start > 0) - charCodes = J.skip$1$ax(charCodes, start); - return A.Primitives_stringFromCharCodes(A.List_List$of(charCodes, true, type$.int)); - }, - String_String$fromCharCode(charCode) { - return A.Primitives_stringFromCharCode(charCode); - }, - String__stringFromUint8List(charCodes, start, endOrNull) { - var len = charCodes.length; - if (start >= len) - return ""; - return A.Primitives_stringFromNativeUint8List(charCodes, start, endOrNull == null || endOrNull > len ? len : endOrNull); - }, - RegExp_RegExp(source, multiLine) { - return new A.JSSyntaxRegExp(source, A.JSSyntaxRegExp_makeNative(source, multiLine, true, false, false, false)); - }, - identical(a, b) { - return a == null ? b == null : a === b; - }, - StringBuffer__writeAll(string, objects, separator) { - var iterator = J.get$iterator$ax(objects); - if (!iterator.moveNext$0()) - return string; - if (separator.length === 0) { - do - string += A.S(iterator.get$current(iterator)); - while (iterator.moveNext$0()); - } else { - string += A.S(iterator.get$current(iterator)); - for (; iterator.moveNext$0();) - string = string + separator + A.S(iterator.get$current(iterator)); - } - return string; - }, - NoSuchMethodError_NoSuchMethodError$withInvocation(receiver, invocation) { - return new A.NoSuchMethodError(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments()); - }, - Uri_base() { - var cachedUri, uri, - current = A.Primitives_currentUri(); - if (current == null) - throw A.wrapException(A.UnsupportedError$("'Uri.base' is not supported")); - cachedUri = $.Uri__cachedBaseUri; - if (cachedUri != null && current === $.Uri__cachedBaseString) - return cachedUri; - uri = A.Uri_parse(current); - $.Uri__cachedBaseUri = uri; - $.Uri__cachedBaseString = current; - return uri; - }, - _Uri__uriEncode(canonicalTable, text, encoding, spaceToPlus) { - var t1, bytes, i, t2, byte, - _s16_ = "0123456789ABCDEF"; - if (encoding === B.C_Utf8Codec) { - t1 = $.$get$_Uri__needsNoEncoding(); - t1 = t1._nativeRegExp.test(text); - } else - t1 = false; - if (t1) - return text; - bytes = B.C_Utf8Encoder.convert$1(text); - for (t1 = bytes.length, i = 0, t2 = ""; i < t1; ++i) { - byte = bytes[i]; - if (byte < 128 && (canonicalTable[byte >>> 4] & 1 << (byte & 15)) !== 0) - t2 += A.Primitives_stringFromCharCode(byte); - else - t2 = spaceToPlus && byte === 32 ? t2 + "+" : t2 + "%" + _s16_[byte >>> 4 & 15] + _s16_[byte & 15]; - } - return t2.charCodeAt(0) == 0 ? t2 : t2; - }, - StackTrace_current() { - return A.getTraceFromException(new Error()); - }, - DateTime__fourDigits(n) { - var absN = Math.abs(n), - sign = n < 0 ? "-" : ""; - if (absN >= 1000) - return "" + n; - if (absN >= 100) - return sign + "0" + absN; - if (absN >= 10) - return sign + "00" + absN; - return sign + "000" + absN; - }, - DateTime__threeDigits(n) { - if (n >= 100) - return "" + n; - if (n >= 10) - return "0" + n; - return "00" + n; - }, - DateTime__twoDigits(n) { - if (n >= 10) - return "" + n; - return "0" + n; - }, - Duration$(microseconds, milliseconds) { - return new A.Duration(microseconds + 1000 * milliseconds); - }, - EnumByName_byName(_this, $name) { - var _i, value; - for (_i = 0; _i < 4; ++_i) { - value = _this[_i]; - if (value._name === $name) - return value; - } - throw A.wrapException(A.ArgumentError$value($name, "name", "No enum value with that name")); - }, - Error_safeToString(object) { - if (typeof object == "number" || A._isBool(object) || object == null) - return J.toString$0$(object); - if (typeof object == "string") - return JSON.stringify(object); - return A.Primitives_safeToString(object); - }, - Error_throwWithStackTrace(error, stackTrace) { - A.checkNotNullable(error, "error", type$.Object); - A.checkNotNullable(stackTrace, "stackTrace", type$.StackTrace); - A.Error__throw(error, stackTrace); - }, - AssertionError$(message) { - return new A.AssertionError(message); - }, - ArgumentError$(message, $name) { - return new A.ArgumentError(false, null, $name, message); - }, - ArgumentError$value(value, $name, message) { - return new A.ArgumentError(true, value, $name, message); - }, - ArgumentError_checkNotNull(argument, $name) { - return argument; - }, - RangeError$(message) { - var _null = null; - return new A.RangeError(_null, _null, false, _null, _null, message); - }, - RangeError$value(value, $name, message) { - return new A.RangeError(null, null, true, value, $name, message == null ? "Value not in range" : message); - }, - RangeError$range(invalidValue, minValue, maxValue, $name, message) { - return new A.RangeError(minValue, maxValue, true, invalidValue, $name, message == null ? "Invalid value" : message); - }, - RangeError_checkValueInInterval(value, minValue, maxValue, $name) { - if (value < minValue || value > maxValue) - throw A.wrapException(A.RangeError$range(value, minValue, maxValue, $name, null)); - return value; - }, - RangeError_checkValidRange(start, end, $length) { - if (0 > start || start > $length) - throw A.wrapException(A.RangeError$range(start, 0, $length, "start", null)); - if (end != null) { - if (start > end || end > $length) - throw A.wrapException(A.RangeError$range(end, start, $length, "end", null)); - return end; - } - return $length; - }, - RangeError_checkNotNegative(value, $name) { - if (value < 0) - throw A.wrapException(A.RangeError$range(value, 0, null, $name, null)); - return value; - }, - IndexError$withLength(invalidValue, $length, indexable, message, $name) { - return new A.IndexError($length, true, invalidValue, $name, "Index out of range"); - }, - IndexError_check(index, $length, indexable, message, $name) { - if (0 > index || index >= $length) - throw A.wrapException(A.IndexError$withLength(index, $length, indexable, message, $name == null ? "index" : $name)); - return index; - }, - UnsupportedError$(message) { - return new A.UnsupportedError(message); - }, - UnimplementedError$(message) { - return new A.UnimplementedError(message); - }, - StateError$(message) { - return new A.StateError(message); - }, - ConcurrentModificationError$(modifiedObject) { - return new A.ConcurrentModificationError(modifiedObject); - }, - FormatException$(message, source, offset) { - return new A.FormatException(message, source, offset); - }, - Iterable_Iterable$generate(count, generator, $E) { - if (count <= 0) - return new A.EmptyIterable($E._eval$1("EmptyIterable<0>")); - return new A._GeneratorIterable(count, generator, $E._eval$1("_GeneratorIterable<0>")); - }, - Iterable_iterableToShortString(iterable, leftDelimiter, rightDelimiter) { - var parts, t1; - if (A.isToStringVisiting(iterable)) { - if (leftDelimiter === "(" && rightDelimiter === ")") - return "(...)"; - return leftDelimiter + "..." + rightDelimiter; - } - parts = A._setArrayType([], type$.JSArray_String); - $.toStringVisiting.push(iterable); - try { - A._iterablePartsToStrings(iterable, parts); - } finally { - $.toStringVisiting.pop(); - } - t1 = A.StringBuffer__writeAll(leftDelimiter, parts, ", ") + rightDelimiter; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - Iterable_iterableToFullString(iterable, leftDelimiter, rightDelimiter) { - var buffer, t1; - if (A.isToStringVisiting(iterable)) - return leftDelimiter + "..." + rightDelimiter; - buffer = new A.StringBuffer(leftDelimiter); - $.toStringVisiting.push(iterable); - try { - t1 = buffer; - t1._contents = A.StringBuffer__writeAll(t1._contents, iterable, ", "); - } finally { - $.toStringVisiting.pop(); - } - buffer._contents += rightDelimiter; - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _iterablePartsToStrings(iterable, parts) { - var next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision, - it = iterable.get$iterator(iterable), - $length = 0, count = 0; - while (true) { - if (!($length < 80 || count < 3)) - break; - if (!it.moveNext$0()) - return; - next = A.S(it.get$current(it)); - parts.push(next); - $length += next.length + 2; - ++count; - } - if (!it.moveNext$0()) { - if (count <= 5) - return; - ultimateString = parts.pop(); - penultimateString = parts.pop(); - } else { - penultimate = it.get$current(it); - ++count; - if (!it.moveNext$0()) { - if (count <= 4) { - parts.push(A.S(penultimate)); - return; - } - ultimateString = A.S(penultimate); - penultimateString = parts.pop(); - $length += ultimateString.length + 2; - } else { - ultimate = it.get$current(it); - ++count; - for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) { - ultimate0 = it.get$current(it); - ++count; - if (count > 100) { - while (true) { - if (!($length > 75 && count > 3)) - break; - $length -= parts.pop().length + 2; - --count; - } - parts.push("..."); - return; - } - } - penultimateString = A.S(penultimate); - ultimateString = A.S(ultimate); - $length += ultimateString.length + penultimateString.length + 4; - } - } - if (count > parts.length + 2) { - $length += 5; - elision = "..."; - } else - elision = null; - while (true) { - if (!($length > 80 && parts.length > 3)) - break; - $length -= parts.pop().length + 2; - if (elision == null) { - $length += 5; - elision = "..."; - } - } - if (elision != null) - parts.push(elision); - parts.push(penultimateString); - parts.push(ultimateString); - }, - Map_castFrom(source, $K, $V, K2, V2) { - return new A.CastMap(source, $K._eval$1("@<0>")._bind$1($V)._bind$1(K2)._bind$1(V2)._eval$1("CastMap<1,2,3,4>")); - }, - Object_hash(object1, object2, object3, object4) { - var t1; - if (B.C_SentinelValue === object3) { - t1 = J.get$hashCode$(object1); - object2 = J.get$hashCode$(object2); - return A.SystemHash_finish(A.SystemHash_combine(A.SystemHash_combine($.$get$_hashSeed(), t1), object2)); - } - if (B.C_SentinelValue === object4) { - t1 = J.get$hashCode$(object1); - object2 = J.get$hashCode$(object2); - object3 = J.get$hashCode$(object3); - return A.SystemHash_finish(A.SystemHash_combine(A.SystemHash_combine(A.SystemHash_combine($.$get$_hashSeed(), t1), object2), object3)); - } - t1 = J.get$hashCode$(object1); - object2 = J.get$hashCode$(object2); - object3 = J.get$hashCode$(object3); - object4 = J.get$hashCode$(object4); - object4 = A.SystemHash_finish(A.SystemHash_combine(A.SystemHash_combine(A.SystemHash_combine(A.SystemHash_combine($.$get$_hashSeed(), t1), object2), object3), object4)); - return object4; - }, - Object_hashAll(objects) { - var t1, _i, - hash = $.$get$_hashSeed(); - for (t1 = objects.length, _i = 0; _i < objects.length; objects.length === t1 || (0, A.throwConcurrentModificationError)(objects), ++_i) - hash = A.SystemHash_combine(hash, J.get$hashCode$(objects[_i])); - return A.SystemHash_finish(hash); - }, - print(object) { - var line = A.S(object), - toZone = $.printToZone; - if (toZone == null) - A.printString(line); - else - toZone.call$1(line); - }, - Set_Set$unmodifiable(elements, $E) { - return new A.UnmodifiableSetView(A.LinkedHashSet_LinkedHashSet$of(elements, $E), $E._eval$1("UnmodifiableSetView<0>")); - }, - Set_castFrom(source, newSet, $S, $T) { - return new A.CastSet(source, newSet, $S._eval$1("@<0>")._bind$1($T)._eval$1("CastSet<1,2>")); - }, - _combineSurrogatePair(start, end) { - return 65536 + ((start & 1023) << 10) + (end & 1023); - }, - Uri_Uri$dataFromString($content, encoding, mimeType) { - var encodingName, t1, - buffer = new A.StringBuffer(""), - indices = A._setArrayType([-1], type$.JSArray_int); - if (encoding == null) - encodingName = null; - else - encodingName = "utf-8"; - if (encoding == null) - encoding = B.C_AsciiCodec; - A.UriData__writeUri(mimeType, encodingName, null, buffer, indices); - indices.push(buffer._contents.length); - buffer._contents += ","; - A.UriData__uriEncodeBytes(B.List_42A, encoding.encode$1($content), buffer); - t1 = buffer._contents; - return new A.UriData(t1.charCodeAt(0) == 0 ? t1 : t1, indices, null).get$uri(); - }, - Uri_parse(uri) { - var delta, indices, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, isSimple, scheme, t1, t2, schemeAuth, queryStart0, pathStart0, port, userInfoStart, userInfo, host, portNumber, path, query, _null = null, - end = uri.length; - if (end >= 5) { - delta = ((uri.charCodeAt(4) ^ 58) * 3 | uri.charCodeAt(0) ^ 100 | uri.charCodeAt(1) ^ 97 | uri.charCodeAt(2) ^ 116 | uri.charCodeAt(3) ^ 97) >>> 0; - if (delta === 0) - return A.UriData__parse(end < end ? B.JSString_methods.substring$2(uri, 0, end) : uri, 5, _null).get$uri(); - else if (delta === 32) - return A.UriData__parse(B.JSString_methods.substring$2(uri, 5, end), 0, _null).get$uri(); - } - indices = A.List_List$filled(8, 0, false, type$.int); - indices[0] = 0; - indices[1] = -1; - indices[2] = -1; - indices[7] = -1; - indices[3] = 0; - indices[4] = 0; - indices[5] = end; - indices[6] = end; - if (A._scan(uri, 0, end, 0, indices) >= 14) - indices[7] = end; - schemeEnd = indices[1]; - if (schemeEnd >= 0) - if (A._scan(uri, 0, schemeEnd, 20, indices) === 20) - indices[7] = schemeEnd; - hostStart = indices[2] + 1; - portStart = indices[3]; - pathStart = indices[4]; - queryStart = indices[5]; - fragmentStart = indices[6]; - if (fragmentStart < queryStart) - queryStart = fragmentStart; - if (pathStart < hostStart) - pathStart = queryStart; - else if (pathStart <= schemeEnd) - pathStart = schemeEnd + 1; - if (portStart < hostStart) - portStart = pathStart; - isSimple = indices[7] < 0; - scheme = _null; - if (isSimple) { - isSimple = false; - if (!(hostStart > schemeEnd + 3)) { - t1 = portStart > 0; - if (!(t1 && portStart + 1 === pathStart)) { - if (!B.JSString_methods.startsWith$2(uri, "\\", pathStart)) - if (hostStart > 0) - t2 = B.JSString_methods.startsWith$2(uri, "\\", hostStart - 1) || B.JSString_methods.startsWith$2(uri, "\\", hostStart - 2); - else - t2 = false; - else - t2 = true; - if (!t2) { - if (!(queryStart < end && queryStart === pathStart + 2 && B.JSString_methods.startsWith$2(uri, "..", pathStart))) - t2 = queryStart > pathStart + 2 && B.JSString_methods.startsWith$2(uri, "/..", queryStart - 3); - else - t2 = true; - if (!t2) - if (schemeEnd === 4) { - if (B.JSString_methods.startsWith$2(uri, "file", 0)) { - if (hostStart <= 0) { - if (!B.JSString_methods.startsWith$2(uri, "/", pathStart)) { - schemeAuth = "file:///"; - delta = 3; - } else { - schemeAuth = "file://"; - delta = 2; - } - uri = schemeAuth + B.JSString_methods.substring$2(uri, pathStart, end); - queryStart += delta; - fragmentStart += delta; - end = uri.length; - hostStart = 7; - portStart = 7; - pathStart = 7; - } else if (pathStart === queryStart) { - ++fragmentStart; - queryStart0 = queryStart + 1; - uri = B.JSString_methods.replaceRange$3(uri, pathStart, queryStart, "/"); - ++end; - queryStart = queryStart0; - } - scheme = "file"; - } else if (B.JSString_methods.startsWith$2(uri, "http", 0)) { - if (t1 && portStart + 3 === pathStart && B.JSString_methods.startsWith$2(uri, "80", portStart + 1)) { - fragmentStart -= 3; - pathStart0 = pathStart - 3; - queryStart -= 3; - uri = B.JSString_methods.replaceRange$3(uri, portStart, pathStart, ""); - end -= 3; - pathStart = pathStart0; - } - scheme = "http"; - } - } else if (schemeEnd === 5 && B.JSString_methods.startsWith$2(uri, "https", 0)) { - if (t1 && portStart + 4 === pathStart && B.JSString_methods.startsWith$2(uri, "443", portStart + 1)) { - fragmentStart -= 4; - pathStart0 = pathStart - 4; - queryStart -= 4; - uri = B.JSString_methods.replaceRange$3(uri, portStart, pathStart, ""); - end -= 3; - pathStart = pathStart0; - } - scheme = "https"; - } - isSimple = !t2; - } - } - } - } - if (isSimple) - return new A._SimpleUri(end < uri.length ? B.JSString_methods.substring$2(uri, 0, end) : uri, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, scheme); - if (scheme == null) - if (schemeEnd > 0) - scheme = A._Uri__makeScheme(uri, 0, schemeEnd); - else { - if (schemeEnd === 0) - A._Uri__fail(uri, 0, "Invalid empty scheme"); - scheme = ""; - } - port = _null; - if (hostStart > 0) { - userInfoStart = schemeEnd + 3; - userInfo = userInfoStart < hostStart ? A._Uri__makeUserInfo(uri, userInfoStart, hostStart - 1) : ""; - host = A._Uri__makeHost(uri, hostStart, portStart, false); - t1 = portStart + 1; - if (t1 < pathStart) { - portNumber = A.Primitives_parseInt(B.JSString_methods.substring$2(uri, t1, pathStart), _null); - port = A._Uri__makePort(portNumber == null ? A.throwExpression(A.FormatException$("Invalid port", uri, t1)) : portNumber, scheme); - } - } else { - host = _null; - userInfo = ""; - } - path = A._Uri__makePath(uri, pathStart, queryStart, _null, scheme, host != null); - query = queryStart < fragmentStart ? A._Uri__makeQuery(uri, queryStart + 1, fragmentStart, _null) : _null; - return A._Uri$_internal(scheme, userInfo, host, port, path, query, fragmentStart < end ? A._Uri__makeFragment(uri, fragmentStart + 1, end) : _null); - }, - Uri_decodeComponent(encodedComponent) { - return A._Uri__uriDecode(encodedComponent, 0, encodedComponent.length, B.C_Utf8Codec, false); - }, - Uri__parseIPv4Address(host, start, end) { - var i, partStart, partIndex, char, part, partIndex0, - _s43_ = "IPv4 address should contain exactly 4 parts", - _s37_ = "each part must be in the range 0..255", - error = new A.Uri__parseIPv4Address_error(host), - result = new Uint8Array(4); - for (i = start, partStart = i, partIndex = 0; i < end; ++i) { - char = host.charCodeAt(i); - if (char !== 46) { - if ((char ^ 48) > 9) - error.call$2("invalid character", i); - } else { - if (partIndex === 3) - error.call$2(_s43_, i); - part = A.int_parse(B.JSString_methods.substring$2(host, partStart, i), null); - if (part > 255) - error.call$2(_s37_, partStart); - partIndex0 = partIndex + 1; - result[partIndex] = part; - partStart = i + 1; - partIndex = partIndex0; - } - } - if (partIndex !== 3) - error.call$2(_s43_, end); - part = A.int_parse(B.JSString_methods.substring$2(host, partStart, end), null); - if (part > 255) - error.call$2(_s37_, partStart); - result[partIndex] = part; - return result; - }, - Uri_parseIPv6Address(host, start, end) { - var parts, i, partStart, wildcardSeen, seenDot, char, atEnd, t1, last, bytes, wildCardLength, index, value, j, _null = null, - error = new A.Uri_parseIPv6Address_error(host), - parseHex = new A.Uri_parseIPv6Address_parseHex(error, host); - if (host.length < 2) - error.call$2("address is too short", _null); - parts = A._setArrayType([], type$.JSArray_int); - for (i = start, partStart = i, wildcardSeen = false, seenDot = false; i < end; ++i) { - char = host.charCodeAt(i); - if (char === 58) { - if (i === start) { - ++i; - if (host.charCodeAt(i) !== 58) - error.call$2("invalid start colon.", i); - partStart = i; - } - if (i === partStart) { - if (wildcardSeen) - error.call$2("only one wildcard `::` is allowed", i); - parts.push(-1); - wildcardSeen = true; - } else - parts.push(parseHex.call$2(partStart, i)); - partStart = i + 1; - } else if (char === 46) - seenDot = true; - } - if (parts.length === 0) - error.call$2("too few parts", _null); - atEnd = partStart === end; - t1 = B.JSArray_methods.get$last(parts); - if (atEnd && t1 !== -1) - error.call$2("expected a part after last `:`", end); - if (!atEnd) - if (!seenDot) - parts.push(parseHex.call$2(partStart, end)); - else { - last = A.Uri__parseIPv4Address(host, partStart, end); - parts.push((last[0] << 8 | last[1]) >>> 0); - parts.push((last[2] << 8 | last[3]) >>> 0); - } - if (wildcardSeen) { - if (parts.length > 7) - error.call$2("an address with a wildcard must have less than 7 parts", _null); - } else if (parts.length !== 8) - error.call$2("an address without a wildcard must contain exactly 8 parts", _null); - bytes = new Uint8Array(16); - for (t1 = parts.length, wildCardLength = 9 - t1, i = 0, index = 0; i < t1; ++i) { - value = parts[i]; - if (value === -1) - for (j = 0; j < wildCardLength; ++j) { - bytes[index] = 0; - bytes[index + 1] = 0; - index += 2; - } - else { - bytes[index] = B.JSInt_methods._shrOtherPositive$1(value, 8); - bytes[index + 1] = value & 255; - index += 2; - } - } - return bytes; - }, - _Uri$_internal(scheme, _userInfo, _host, _port, path, _query, _fragment) { - return new A._Uri(scheme, _userInfo, _host, _port, path, _query, _fragment); - }, - _Uri__Uri(host, path, pathSegments, scheme) { - var userInfo, query, fragment, port, isFile, t1, hasAuthority, t2, _null = null; - scheme = scheme == null ? "" : A._Uri__makeScheme(scheme, 0, scheme.length); - userInfo = A._Uri__makeUserInfo(_null, 0, 0); - host = A._Uri__makeHost(host, 0, host == null ? 0 : host.length, false); - query = A._Uri__makeQuery(_null, 0, 0, _null); - fragment = A._Uri__makeFragment(_null, 0, 0); - port = A._Uri__makePort(_null, scheme); - isFile = scheme === "file"; - if (host == null) - t1 = userInfo.length !== 0 || port != null || isFile; - else - t1 = false; - if (t1) - host = ""; - t1 = host == null; - hasAuthority = !t1; - path = A._Uri__makePath(path, 0, path == null ? 0 : path.length, pathSegments, scheme, hasAuthority); - t2 = scheme.length === 0; - if (t2 && t1 && !B.JSString_methods.startsWith$1(path, "/")) - path = A._Uri__normalizeRelativePath(path, !t2 || hasAuthority); - else - path = A._Uri__removeDotSegments(path); - return A._Uri$_internal(scheme, userInfo, t1 && B.JSString_methods.startsWith$1(path, "//") ? "" : host, port, path, query, fragment); - }, - _Uri__defaultPort(scheme) { - if (scheme === "http") - return 80; - if (scheme === "https") - return 443; - return 0; - }, - _Uri__fail(uri, index, message) { - throw A.wrapException(A.FormatException$(message, uri, index)); - }, - _Uri__Uri$file(path, windows) { - return windows ? A._Uri__makeWindowsFileUrl(path, false) : A._Uri__makeFileUri(path, false); - }, - _Uri__checkNonWindowsPathReservedCharacters(segments, argumentError) { - var t1, _i, segment, t2, t3; - for (t1 = segments.length, _i = 0; _i < t1; ++_i) { - segment = segments[_i]; - t2 = J.getInterceptor$asx(segment); - t3 = t2.get$length(segment); - if (0 > t3) - A.throwExpression(A.RangeError$range(0, 0, t2.get$length(segment), null, null)); - if (A.stringContainsUnchecked(segment, "/", 0)) { - t1 = A.UnsupportedError$("Illegal path character " + A.S(segment)); - throw A.wrapException(t1); - } - } - }, - _Uri__checkWindowsPathReservedCharacters(segments, argumentError, firstSegment) { - var t1, t2, t3, t4; - for (t1 = A.SubListIterable$(segments, firstSegment, null, A._arrayInstanceType(segments)._precomputed1), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { - t3 = t1.__internal$_current; - if (t3 == null) - t3 = t2._as(t3); - t4 = A.RegExp_RegExp('["*/:<>?\\\\|]', false); - if (A.stringContainsUnchecked(t3, t4, 0)) - if (argumentError) - throw A.wrapException(A.ArgumentError$("Illegal character in path", null)); - else - throw A.wrapException(A.UnsupportedError$("Illegal character in path: " + t3)); - } - }, - _Uri__checkWindowsDriveLetter(charCode, argumentError) { - var t1, - _s21_ = "Illegal drive letter "; - if (!(65 <= charCode && charCode <= 90)) - t1 = 97 <= charCode && charCode <= 122; - else - t1 = true; - if (t1) - return; - if (argumentError) - throw A.wrapException(A.ArgumentError$(_s21_ + A.String_String$fromCharCode(charCode), null)); - else - throw A.wrapException(A.UnsupportedError$(_s21_ + A.String_String$fromCharCode(charCode))); - }, - _Uri__makeFileUri(path, slashTerminated) { - var _null = null, - segments = A._setArrayType(path.split("/"), type$.JSArray_String); - if (B.JSString_methods.startsWith$1(path, "/")) - return A._Uri__Uri(_null, _null, segments, "file"); - else - return A._Uri__Uri(_null, _null, segments, _null); - }, - _Uri__makeWindowsFileUrl(path, slashTerminated) { - var t1, pathSegments, pathStart, hostPart, _s1_ = "\\", _null = null, _s4_ = "file"; - if (B.JSString_methods.startsWith$1(path, "\\\\?\\")) - if (B.JSString_methods.startsWith$2(path, "UNC\\", 4)) - path = B.JSString_methods.replaceRange$3(path, 0, 7, _s1_); - else { - path = B.JSString_methods.substring$1(path, 4); - if (path.length < 3 || path.charCodeAt(1) !== 58 || path.charCodeAt(2) !== 92) - throw A.wrapException(A.ArgumentError$value(path, "path", "Windows paths with \\\\?\\ prefix must be absolute")); - } - else - path = A.stringReplaceAllUnchecked(path, "/", _s1_); - t1 = path.length; - if (t1 > 1 && path.charCodeAt(1) === 58) { - A._Uri__checkWindowsDriveLetter(path.charCodeAt(0), true); - if (t1 === 2 || path.charCodeAt(2) !== 92) - throw A.wrapException(A.ArgumentError$value(path, "path", "Windows paths with drive letter must be absolute")); - pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); - A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 1); - return A._Uri__Uri(_null, _null, pathSegments, _s4_); - } - if (B.JSString_methods.startsWith$1(path, _s1_)) - if (B.JSString_methods.startsWith$2(path, _s1_, 1)) { - pathStart = B.JSString_methods.indexOf$2(path, _s1_, 2); - t1 = pathStart < 0; - hostPart = t1 ? B.JSString_methods.substring$1(path, 2) : B.JSString_methods.substring$2(path, 2, pathStart); - pathSegments = A._setArrayType((t1 ? "" : B.JSString_methods.substring$1(path, pathStart + 1)).split(_s1_), type$.JSArray_String); - A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); - return A._Uri__Uri(hostPart, _null, pathSegments, _s4_); - } else { - pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); - A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); - return A._Uri__Uri(_null, _null, pathSegments, _s4_); - } - else { - pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); - A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); - return A._Uri__Uri(_null, _null, pathSegments, _null); - } - }, - _Uri__makePort(port, scheme) { - if (port != null && port === A._Uri__defaultPort(scheme)) - return null; - return port; - }, - _Uri__makeHost(host, start, end, strictIPv6) { - var t1, t2, index, zoneIDstart, zoneID, i; - if (host == null) - return null; - if (start === end) - return ""; - if (host.charCodeAt(start) === 91) { - t1 = end - 1; - if (host.charCodeAt(t1) !== 93) - A._Uri__fail(host, start, "Missing end `]` to match `[` in host"); - t2 = start + 1; - index = A._Uri__checkZoneID(host, t2, t1); - if (index < t1) { - zoneIDstart = index + 1; - zoneID = A._Uri__normalizeZoneID(host, B.JSString_methods.startsWith$2(host, "25", zoneIDstart) ? index + 3 : zoneIDstart, t1, "%25"); - } else - zoneID = ""; - A.Uri_parseIPv6Address(host, t2, index); - return B.JSString_methods.substring$2(host, start, index).toLowerCase() + zoneID + "]"; - } - for (i = start; i < end; ++i) - if (host.charCodeAt(i) === 58) { - index = B.JSString_methods.indexOf$2(host, "%", start); - index = index >= start && index < end ? index : end; - if (index < end) { - zoneIDstart = index + 1; - zoneID = A._Uri__normalizeZoneID(host, B.JSString_methods.startsWith$2(host, "25", zoneIDstart) ? index + 3 : zoneIDstart, end, "%25"); - } else - zoneID = ""; - A.Uri_parseIPv6Address(host, start, index); - return "[" + B.JSString_methods.substring$2(host, start, index) + zoneID + "]"; - } - return A._Uri__normalizeRegName(host, start, end); - }, - _Uri__checkZoneID(host, start, end) { - var index = B.JSString_methods.indexOf$2(host, "%", start); - return index >= start && index < end ? index : end; - }, - _Uri__normalizeZoneID(host, start, end, prefix) { - var index, sectionStart, isNormalized, char, replacement, t1, t2, sourceLength, tail, slice, - buffer = prefix !== "" ? new A.StringBuffer(prefix) : null; - for (index = start, sectionStart = index, isNormalized = true; index < end;) { - char = host.charCodeAt(index); - if (char === 37) { - replacement = A._Uri__normalizeEscape(host, index, true); - t1 = replacement == null; - if (t1 && isNormalized) { - index += 3; - continue; - } - if (buffer == null) - buffer = new A.StringBuffer(""); - t2 = buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); - if (t1) - replacement = B.JSString_methods.substring$2(host, index, index + 3); - else if (replacement === "%") - A._Uri__fail(host, index, "ZoneID should not contain % anymore"); - buffer._contents = t2 + replacement; - index += 3; - sectionStart = index; - isNormalized = true; - } else if (char < 127 && (B.List_piR[char >>> 4] & 1 << (char & 15)) !== 0) { - if (isNormalized && 65 <= char && 90 >= char) { - if (buffer == null) - buffer = new A.StringBuffer(""); - if (sectionStart < index) { - buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); - sectionStart = index; - } - isNormalized = false; - } - ++index; - } else { - sourceLength = 1; - if ((char & 64512) === 55296 && index + 1 < end) { - tail = host.charCodeAt(index + 1); - if ((tail & 64512) === 56320) { - char = (char & 1023) << 10 | tail & 1023 | 65536; - sourceLength = 2; - } - } - slice = B.JSString_methods.substring$2(host, sectionStart, index); - if (buffer == null) { - buffer = new A.StringBuffer(""); - t1 = buffer; - } else - t1 = buffer; - t1._contents += slice; - t2 = A._Uri__escapeChar(char); - t1._contents += t2; - index += sourceLength; - sectionStart = index; - } - } - if (buffer == null) - return B.JSString_methods.substring$2(host, start, end); - if (sectionStart < end) { - slice = B.JSString_methods.substring$2(host, sectionStart, end); - buffer._contents += slice; - } - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _Uri__normalizeRegName(host, start, end) { - var index, sectionStart, buffer, isNormalized, char, replacement, t1, slice, t2, sourceLength, tail; - for (index = start, sectionStart = index, buffer = null, isNormalized = true; index < end;) { - char = host.charCodeAt(index); - if (char === 37) { - replacement = A._Uri__normalizeEscape(host, index, true); - t1 = replacement == null; - if (t1 && isNormalized) { - index += 3; - continue; - } - if (buffer == null) - buffer = new A.StringBuffer(""); - slice = B.JSString_methods.substring$2(host, sectionStart, index); - if (!isNormalized) - slice = slice.toLowerCase(); - t2 = buffer._contents += slice; - sourceLength = 3; - if (t1) - replacement = B.JSString_methods.substring$2(host, index, index + 3); - else if (replacement === "%") { - replacement = "%25"; - sourceLength = 1; - } - buffer._contents = t2 + replacement; - index += sourceLength; - sectionStart = index; - isNormalized = true; - } else if (char < 127 && (B.List_4AN[char >>> 4] & 1 << (char & 15)) !== 0) { - if (isNormalized && 65 <= char && 90 >= char) { - if (buffer == null) - buffer = new A.StringBuffer(""); - if (sectionStart < index) { - buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); - sectionStart = index; - } - isNormalized = false; - } - ++index; - } else if (char <= 93 && (B.List_VOY[char >>> 4] & 1 << (char & 15)) !== 0) - A._Uri__fail(host, index, "Invalid character"); - else { - sourceLength = 1; - if ((char & 64512) === 55296 && index + 1 < end) { - tail = host.charCodeAt(index + 1); - if ((tail & 64512) === 56320) { - char = (char & 1023) << 10 | tail & 1023 | 65536; - sourceLength = 2; - } - } - slice = B.JSString_methods.substring$2(host, sectionStart, index); - if (!isNormalized) - slice = slice.toLowerCase(); - if (buffer == null) { - buffer = new A.StringBuffer(""); - t1 = buffer; - } else - t1 = buffer; - t1._contents += slice; - t2 = A._Uri__escapeChar(char); - t1._contents += t2; - index += sourceLength; - sectionStart = index; - } - } - if (buffer == null) - return B.JSString_methods.substring$2(host, start, end); - if (sectionStart < end) { - slice = B.JSString_methods.substring$2(host, sectionStart, end); - if (!isNormalized) - slice = slice.toLowerCase(); - buffer._contents += slice; - } - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _Uri__makeScheme(scheme, start, end) { - var i, containsUpperCase, codeUnit; - if (start === end) - return ""; - if (!A._Uri__isAlphabeticCharacter(scheme.charCodeAt(start))) - A._Uri__fail(scheme, start, "Scheme not starting with alphabetic character"); - for (i = start, containsUpperCase = false; i < end; ++i) { - codeUnit = scheme.charCodeAt(i); - if (!(codeUnit < 128 && (B.List_GVy[codeUnit >>> 4] & 1 << (codeUnit & 15)) !== 0)) - A._Uri__fail(scheme, i, "Illegal scheme character"); - if (65 <= codeUnit && codeUnit <= 90) - containsUpperCase = true; - } - scheme = B.JSString_methods.substring$2(scheme, start, end); - return A._Uri__canonicalizeScheme(containsUpperCase ? scheme.toLowerCase() : scheme); - }, - _Uri__canonicalizeScheme(scheme) { - if (scheme === "http") - return "http"; - if (scheme === "file") - return "file"; - if (scheme === "https") - return "https"; - if (scheme === "package") - return "package"; - return scheme; - }, - _Uri__makeUserInfo(userInfo, start, end) { - if (userInfo == null) - return ""; - return A._Uri__normalizeOrSubstring(userInfo, start, end, B.List_2jN, false, false); - }, - _Uri__makePath(path, start, end, pathSegments, scheme, hasAuthority) { - var result, - isFile = scheme === "file", - ensureLeadingSlash = isFile || hasAuthority; - if (path == null) { - if (pathSegments == null) - return isFile ? "/" : ""; - result = new A.MappedListIterable(pathSegments, new A._Uri__makePath_closure(), A._arrayInstanceType(pathSegments)._eval$1("MappedListIterable<1,String>")).join$1(0, "/"); - } else if (pathSegments != null) - throw A.wrapException(A.ArgumentError$("Both path and pathSegments specified", null)); - else - result = A._Uri__normalizeOrSubstring(path, start, end, B.List_M2I, true, true); - if (result.length === 0) { - if (isFile) - return "/"; - } else if (ensureLeadingSlash && !B.JSString_methods.startsWith$1(result, "/")) - result = "/" + result; - return A._Uri__normalizePath(result, scheme, hasAuthority); - }, - _Uri__normalizePath(path, scheme, hasAuthority) { - var t1 = scheme.length === 0; - if (t1 && !hasAuthority && !B.JSString_methods.startsWith$1(path, "/") && !B.JSString_methods.startsWith$1(path, "\\")) - return A._Uri__normalizeRelativePath(path, !t1 || hasAuthority); - return A._Uri__removeDotSegments(path); - }, - _Uri__makeQuery(query, start, end, queryParameters) { - if (query != null) - return A._Uri__normalizeOrSubstring(query, start, end, B.List_42A, true, false); - return null; - }, - _Uri__makeFragment(fragment, start, end) { - if (fragment == null) - return null; - return A._Uri__normalizeOrSubstring(fragment, start, end, B.List_42A, true, false); - }, - _Uri__normalizeEscape(source, index, lowerCase) { - var firstDigit, secondDigit, firstDigitValue, secondDigitValue, value, - t1 = index + 2; - if (t1 >= source.length) - return "%"; - firstDigit = source.charCodeAt(index + 1); - secondDigit = source.charCodeAt(t1); - firstDigitValue = A.hexDigitValue(firstDigit); - secondDigitValue = A.hexDigitValue(secondDigit); - if (firstDigitValue < 0 || secondDigitValue < 0) - return "%"; - value = firstDigitValue * 16 + secondDigitValue; - if (value < 127 && (B.List_piR[B.JSInt_methods._shrOtherPositive$1(value, 4)] & 1 << (value & 15)) !== 0) - return A.Primitives_stringFromCharCode(lowerCase && 65 <= value && 90 >= value ? (value | 32) >>> 0 : value); - if (firstDigit >= 97 || secondDigit >= 97) - return B.JSString_methods.substring$2(source, index, index + 3).toUpperCase(); - return null; - }, - _Uri__escapeChar(char) { - var codeUnits, flag, encodedBytes, index, byte, - _s16_ = "0123456789ABCDEF"; - if (char < 128) { - codeUnits = new Uint8Array(3); - codeUnits[0] = 37; - codeUnits[1] = _s16_.charCodeAt(char >>> 4); - codeUnits[2] = _s16_.charCodeAt(char & 15); - } else { - if (char > 2047) - if (char > 65535) { - flag = 240; - encodedBytes = 4; - } else { - flag = 224; - encodedBytes = 3; - } - else { - flag = 192; - encodedBytes = 2; - } - codeUnits = new Uint8Array(3 * encodedBytes); - for (index = 0; --encodedBytes, encodedBytes >= 0; flag = 128) { - byte = B.JSInt_methods._shrReceiverPositive$1(char, 6 * encodedBytes) & 63 | flag; - codeUnits[index] = 37; - codeUnits[index + 1] = _s16_.charCodeAt(byte >>> 4); - codeUnits[index + 2] = _s16_.charCodeAt(byte & 15); - index += 3; - } - } - return A.String_String$fromCharCodes(codeUnits, 0, null); - }, - _Uri__normalizeOrSubstring(component, start, end, charTable, escapeDelimiters, replaceBackslash) { - var t1 = A._Uri__normalize(component, start, end, charTable, escapeDelimiters, replaceBackslash); - return t1 == null ? B.JSString_methods.substring$2(component, start, end) : t1; - }, - _Uri__normalize(component, start, end, charTable, escapeDelimiters, replaceBackslash) { - var t1, index, sectionStart, buffer, char, sourceLength, replacement, t2, tail, t3, _null = null; - for (t1 = !escapeDelimiters, index = start, sectionStart = index, buffer = _null; index < end;) { - char = component.charCodeAt(index); - if (char < 127 && (charTable[char >>> 4] & 1 << (char & 15)) !== 0) - ++index; - else { - sourceLength = 1; - if (char === 37) { - replacement = A._Uri__normalizeEscape(component, index, false); - if (replacement == null) { - index += 3; - continue; - } - if ("%" === replacement) - replacement = "%25"; - else - sourceLength = 3; - } else if (char === 92 && replaceBackslash) - replacement = "/"; - else if (t1 && char <= 93 && (B.List_VOY[char >>> 4] & 1 << (char & 15)) !== 0) { - A._Uri__fail(component, index, "Invalid character"); - sourceLength = _null; - replacement = sourceLength; - } else { - if ((char & 64512) === 55296) { - t2 = index + 1; - if (t2 < end) { - tail = component.charCodeAt(t2); - if ((tail & 64512) === 56320) { - char = (char & 1023) << 10 | tail & 1023 | 65536; - sourceLength = 2; - } - } - } - replacement = A._Uri__escapeChar(char); - } - if (buffer == null) { - buffer = new A.StringBuffer(""); - t2 = buffer; - } else - t2 = buffer; - t3 = t2._contents += B.JSString_methods.substring$2(component, sectionStart, index); - t2._contents = t3 + A.S(replacement); - index += sourceLength; - sectionStart = index; - } - } - if (buffer == null) - return _null; - if (sectionStart < end) { - t1 = B.JSString_methods.substring$2(component, sectionStart, end); - buffer._contents += t1; - } - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _Uri__mayContainDotSegments(path) { - if (B.JSString_methods.startsWith$1(path, ".")) - return true; - return B.JSString_methods.indexOf$1(path, "/.") !== -1; - }, - _Uri__removeDotSegments(path) { - var output, t1, t2, appendSlash, _i, segment; - if (!A._Uri__mayContainDotSegments(path)) - return path; - output = A._setArrayType([], type$.JSArray_String); - for (t1 = path.split("/"), t2 = t1.length, appendSlash = false, _i = 0; _i < t2; ++_i) { - segment = t1[_i]; - if (J.$eq$(segment, "..")) { - if (output.length !== 0) { - output.pop(); - if (output.length === 0) - output.push(""); - } - appendSlash = true; - } else { - appendSlash = "." === segment; - if (!appendSlash) - output.push(segment); - } - } - if (appendSlash) - output.push(""); - return B.JSArray_methods.join$1(output, "/"); - }, - _Uri__normalizeRelativePath(path, allowScheme) { - var output, t1, t2, appendSlash, _i, segment; - if (!A._Uri__mayContainDotSegments(path)) - return !allowScheme ? A._Uri__escapeScheme(path) : path; - output = A._setArrayType([], type$.JSArray_String); - for (t1 = path.split("/"), t2 = t1.length, appendSlash = false, _i = 0; _i < t2; ++_i) { - segment = t1[_i]; - if (".." === segment) { - appendSlash = output.length !== 0 && B.JSArray_methods.get$last(output) !== ".."; - if (appendSlash) - output.pop(); - else - output.push(".."); - } else { - appendSlash = "." === segment; - if (!appendSlash) - output.push(segment); - } - } - t1 = output.length; - if (t1 !== 0) - t1 = t1 === 1 && output[0].length === 0; - else - t1 = true; - if (t1) - return "./"; - if (appendSlash || B.JSArray_methods.get$last(output) === "..") - output.push(""); - if (!allowScheme) - output[0] = A._Uri__escapeScheme(output[0]); - return B.JSArray_methods.join$1(output, "/"); - }, - _Uri__escapeScheme(path) { - var i, char, - t1 = path.length; - if (t1 >= 2 && A._Uri__isAlphabeticCharacter(path.charCodeAt(0))) - for (i = 1; i < t1; ++i) { - char = path.charCodeAt(i); - if (char === 58) - return B.JSString_methods.substring$2(path, 0, i) + "%3A" + B.JSString_methods.substring$1(path, i + 1); - if (char > 127 || (B.List_GVy[char >>> 4] & 1 << (char & 15)) === 0) - break; - } - return path; - }, - _Uri__packageNameEnd(uri, path) { - if (uri.isScheme$1("package") && uri._host == null) - return A._skipPackageNameChars(path, 0, path.length); - return -1; - }, - _Uri__toWindowsFilePath(uri) { - var t2, host, - segments = uri.get$pathSegments(), - t1 = segments.length, - hasDriveLetter = t1 > 0 && J.get$length$asx(segments[0]) === 2 && J.codeUnitAt$1$s(segments[0], 1) === 58; - if (hasDriveLetter) { - A._Uri__checkWindowsDriveLetter(J.codeUnitAt$1$s(segments[0], 0), false); - A._Uri__checkWindowsPathReservedCharacters(segments, false, 1); - } else - A._Uri__checkWindowsPathReservedCharacters(segments, false, 0); - t2 = uri.get$hasAbsolutePath() && !hasDriveLetter ? "" + "\\" : ""; - if (uri.get$hasAuthority()) { - host = uri.get$host(); - if (host.length !== 0) - t2 = t2 + "\\" + host + "\\"; - } - t2 = A.StringBuffer__writeAll(t2, segments, "\\"); - t1 = hasDriveLetter && t1 === 1 ? t2 + "\\" : t2; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _Uri__hexCharPairToByte(s, pos) { - var byte, i, charCode; - for (byte = 0, i = 0; i < 2; ++i) { - charCode = s.charCodeAt(pos + i); - if (48 <= charCode && charCode <= 57) - byte = byte * 16 + charCode - 48; - else { - charCode |= 32; - if (97 <= charCode && charCode <= 102) - byte = byte * 16 + charCode - 87; - else - throw A.wrapException(A.ArgumentError$("Invalid URL encoding", null)); - } - } - return byte; - }, - _Uri__uriDecode(text, start, end, encoding, plusToSpace) { - var simple, codeUnit, t1, bytes, - i = start; - while (true) { - if (!(i < end)) { - simple = true; - break; - } - codeUnit = text.charCodeAt(i); - if (codeUnit <= 127) - t1 = codeUnit === 37; - else - t1 = true; - if (t1) { - simple = false; - break; - } - ++i; - } - if (simple) - if (B.C_Utf8Codec === encoding) - return B.JSString_methods.substring$2(text, start, end); - else - bytes = new A.CodeUnits(B.JSString_methods.substring$2(text, start, end)); - else { - bytes = A._setArrayType([], type$.JSArray_int); - for (t1 = text.length, i = start; i < end; ++i) { - codeUnit = text.charCodeAt(i); - if (codeUnit > 127) - throw A.wrapException(A.ArgumentError$("Illegal percent encoding in URI", null)); - if (codeUnit === 37) { - if (i + 3 > t1) - throw A.wrapException(A.ArgumentError$("Truncated URI", null)); - bytes.push(A._Uri__hexCharPairToByte(text, i + 1)); - i += 2; - } else - bytes.push(codeUnit); - } - } - return B.Utf8Decoder_false.convert$1(bytes); - }, - _Uri__isAlphabeticCharacter(codeUnit) { - var lowerCase = codeUnit | 32; - return 97 <= lowerCase && lowerCase <= 122; - }, - UriData__writeUri(mimeType, charsetName, parameters, buffer, indices) { - var t1, slashIndex; - if (mimeType != null) - t1 = 10 === mimeType.length && A._caseInsensitiveCompareStart("text/plain", mimeType, 0) >= 0; - else - t1 = true; - if (t1) - mimeType = ""; - if (mimeType.length === 0 || mimeType === "application/octet-stream") - t1 = buffer._contents += mimeType; - else { - slashIndex = A.UriData__validateMimeType(mimeType); - if (slashIndex < 0) - throw A.wrapException(A.ArgumentError$value(mimeType, "mimeType", "Invalid MIME type")); - t1 = A._Uri__uriEncode(B.List_oyU, B.JSString_methods.substring$2(mimeType, 0, slashIndex), B.C_Utf8Codec, false); - t1 = buffer._contents += t1; - buffer._contents = t1 + "/"; - t1 = A._Uri__uriEncode(B.List_oyU, B.JSString_methods.substring$1(mimeType, slashIndex + 1), B.C_Utf8Codec, false); - t1 = buffer._contents += t1; - } - if (charsetName != null) { - indices.push(t1.length); - indices.push(buffer._contents.length + 8); - buffer._contents += ";charset="; - t1 = A._Uri__uriEncode(B.List_oyU, charsetName, B.C_Utf8Codec, false); - buffer._contents += t1; - } - }, - UriData__validateMimeType(mimeType) { - var t1, slashIndex, i; - for (t1 = mimeType.length, slashIndex = -1, i = 0; i < t1; ++i) { - if (mimeType.charCodeAt(i) !== 47) - continue; - if (slashIndex < 0) { - slashIndex = i; - continue; - } - return -1; - } - return slashIndex; - }, - UriData__parse(text, start, sourceUri) { - var t1, i, slashIndex, char, equalsIndex, lastSeparator, t2, data, - _s17_ = "Invalid MIME type", - indices = A._setArrayType([start - 1], type$.JSArray_int); - for (t1 = text.length, i = start, slashIndex = -1, char = null; i < t1; ++i) { - char = text.charCodeAt(i); - if (char === 44 || char === 59) - break; - if (char === 47) { - if (slashIndex < 0) { - slashIndex = i; - continue; - } - throw A.wrapException(A.FormatException$(_s17_, text, i)); - } - } - if (slashIndex < 0 && i > start) - throw A.wrapException(A.FormatException$(_s17_, text, i)); - for (; char !== 44;) { - indices.push(i); - ++i; - for (equalsIndex = -1; i < t1; ++i) { - char = text.charCodeAt(i); - if (char === 61) { - if (equalsIndex < 0) - equalsIndex = i; - } else if (char === 59 || char === 44) - break; - } - if (equalsIndex >= 0) - indices.push(equalsIndex); - else { - lastSeparator = B.JSArray_methods.get$last(indices); - if (char !== 44 || i !== lastSeparator + 7 || !B.JSString_methods.startsWith$2(text, "base64", lastSeparator + 1)) - throw A.wrapException(A.FormatException$("Expecting '='", text, i)); - break; - } - } - indices.push(i); - t2 = i + 1; - if ((indices.length & 1) === 1) - text = B.C_Base64Codec.normalize$3(text, t2, t1); - else { - data = A._Uri__normalize(text, t2, t1, B.List_42A, true, false); - if (data != null) - text = B.JSString_methods.replaceRange$3(text, t2, t1, data); - } - return new A.UriData(text, indices, sourceUri); - }, - UriData__uriEncodeBytes(canonicalTable, bytes, buffer) { - var t1, byteOr, i, byte, t2, - _s16_ = "0123456789ABCDEF"; - for (t1 = bytes.length, byteOr = 0, i = 0; i < t1; ++i) { - byte = bytes[i]; - byteOr |= byte; - if (byte < 128 && (canonicalTable[byte >>> 4] & 1 << (byte & 15)) !== 0) { - t2 = A.Primitives_stringFromCharCode(byte); - buffer._contents += t2; - } else { - t2 = A.Primitives_stringFromCharCode(37); - buffer._contents += t2; - t2 = A.Primitives_stringFromCharCode(_s16_.charCodeAt(byte >>> 4)); - buffer._contents += t2; - t2 = A.Primitives_stringFromCharCode(_s16_.charCodeAt(byte & 15)); - buffer._contents += t2; - } - } - if ((byteOr & 4294967040) !== 0) - for (i = 0; i < t1; ++i) { - byte = bytes[i]; - if (byte > 255) - throw A.wrapException(A.ArgumentError$value(byte, "non-byte value", null)); - } - }, - _createTables() { - var _i, t1, t2, t3, b, - _s77_ = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", - _s1_ = ".", _s1_0 = ":", _s1_1 = "/", _s1_2 = "\\", _s1_3 = "?", _s1_4 = "#", _s2_ = "/\\", - tables = J.JSArray_JSArray$allocateGrowable(22, type$.Uint8List); - for (_i = 0; _i < 22; ++_i) - tables[_i] = new Uint8Array(96); - t1 = new A._createTables_build(tables); - t2 = new A._createTables_setChars(); - t3 = new A._createTables_setRange(); - b = t1.call$2(0, 225); - t2.call$3(b, _s77_, 1); - t2.call$3(b, _s1_, 14); - t2.call$3(b, _s1_0, 34); - t2.call$3(b, _s1_1, 3); - t2.call$3(b, _s1_2, 227); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(14, 225); - t2.call$3(b, _s77_, 1); - t2.call$3(b, _s1_, 15); - t2.call$3(b, _s1_0, 34); - t2.call$3(b, _s2_, 234); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(15, 225); - t2.call$3(b, _s77_, 1); - t2.call$3(b, "%", 225); - t2.call$3(b, _s1_0, 34); - t2.call$3(b, _s1_1, 9); - t2.call$3(b, _s1_2, 233); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(1, 225); - t2.call$3(b, _s77_, 1); - t2.call$3(b, _s1_0, 34); - t2.call$3(b, _s1_1, 10); - t2.call$3(b, _s1_2, 234); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(2, 235); - t2.call$3(b, _s77_, 139); - t2.call$3(b, _s1_1, 131); - t2.call$3(b, _s1_2, 131); - t2.call$3(b, _s1_, 146); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(3, 235); - t2.call$3(b, _s77_, 11); - t2.call$3(b, _s1_1, 68); - t2.call$3(b, _s1_2, 68); - t2.call$3(b, _s1_, 18); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(4, 229); - t2.call$3(b, _s77_, 5); - t3.call$3(b, "AZ", 229); - t2.call$3(b, _s1_0, 102); - t2.call$3(b, "@", 68); - t2.call$3(b, "[", 232); - t2.call$3(b, _s1_1, 138); - t2.call$3(b, _s1_2, 138); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(5, 229); - t2.call$3(b, _s77_, 5); - t3.call$3(b, "AZ", 229); - t2.call$3(b, _s1_0, 102); - t2.call$3(b, "@", 68); - t2.call$3(b, _s1_1, 138); - t2.call$3(b, _s1_2, 138); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(6, 231); - t3.call$3(b, "19", 7); - t2.call$3(b, "@", 68); - t2.call$3(b, _s1_1, 138); - t2.call$3(b, _s1_2, 138); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(7, 231); - t3.call$3(b, "09", 7); - t2.call$3(b, "@", 68); - t2.call$3(b, _s1_1, 138); - t2.call$3(b, _s1_2, 138); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - t2.call$3(t1.call$2(8, 8), "]", 5); - b = t1.call$2(9, 235); - t2.call$3(b, _s77_, 11); - t2.call$3(b, _s1_, 16); - t2.call$3(b, _s2_, 234); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(16, 235); - t2.call$3(b, _s77_, 11); - t2.call$3(b, _s1_, 17); - t2.call$3(b, _s2_, 234); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(17, 235); - t2.call$3(b, _s77_, 11); - t2.call$3(b, _s1_1, 9); - t2.call$3(b, _s1_2, 233); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(10, 235); - t2.call$3(b, _s77_, 11); - t2.call$3(b, _s1_, 18); - t2.call$3(b, _s1_1, 10); - t2.call$3(b, _s1_2, 234); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(18, 235); - t2.call$3(b, _s77_, 11); - t2.call$3(b, _s1_, 19); - t2.call$3(b, _s2_, 234); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(19, 235); - t2.call$3(b, _s77_, 11); - t2.call$3(b, _s2_, 234); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(11, 235); - t2.call$3(b, _s77_, 11); - t2.call$3(b, _s1_1, 10); - t2.call$3(b, _s1_2, 234); - t2.call$3(b, _s1_3, 172); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(12, 236); - t2.call$3(b, _s77_, 12); - t2.call$3(b, _s1_3, 12); - t2.call$3(b, _s1_4, 205); - b = t1.call$2(13, 237); - t2.call$3(b, _s77_, 13); - t2.call$3(b, _s1_3, 13); - t3.call$3(t1.call$2(20, 245), "az", 21); - b = t1.call$2(21, 245); - t3.call$3(b, "az", 21); - t3.call$3(b, "09", 21); - t2.call$3(b, "+-.", 21); - return tables; - }, - _scan(uri, start, end, state, indices) { - var i, table, char, transition, - tables = $.$get$_scannerTables(); - for (i = start; i < end; ++i) { - table = tables[state]; - char = uri.charCodeAt(i) ^ 96; - transition = table[char > 95 ? 31 : char]; - state = transition & 31; - indices[transition >>> 5] = i; - } - return state; - }, - _SimpleUri__packageNameEnd(uri) { - if (uri._schemeEnd === 7 && B.JSString_methods.startsWith$1(uri._uri, "package") && uri._hostStart <= 0) - return A._skipPackageNameChars(uri._uri, uri._pathStart, uri._queryStart); - return -1; - }, - _skipPackageNameChars(source, start, end) { - var i, dots, char; - for (i = start, dots = 0; i < end; ++i) { - char = source.charCodeAt(i); - if (char === 47) - return dots !== 0 ? i : -1; - if (char === 37 || char === 58) - return -1; - dots |= char ^ 46; - } - return -1; - }, - _caseInsensitiveCompareStart(prefix, string, start) { - var t1, result, i, stringChar, delta, lowerChar; - for (t1 = prefix.length, result = 0, i = 0; i < t1; ++i) { - stringChar = string.charCodeAt(start + i); - delta = prefix.charCodeAt(i) ^ stringChar; - if (delta !== 0) { - if (delta === 32) { - lowerChar = stringChar | delta; - if (97 <= lowerChar && lowerChar <= 122) { - result = 32; - continue; - } - } - return -1; - } - } - return result; - }, - NoSuchMethodError_toString_closure: function NoSuchMethodError_toString_closure(t0, t1) { - this._box_0 = t0; - this.sb = t1; - }, - DateTime: function DateTime(t0, t1, t2) { - this._value = t0; - this._microsecond = t1; - this.isUtc = t2; - }, - Duration: function Duration(t0) { - this._duration = t0; - }, - _Enum: function _Enum() { - }, - Error: function Error() { - }, - AssertionError: function AssertionError(t0) { - this.message = t0; - }, - TypeError: function TypeError() { - }, - ArgumentError: function ArgumentError(t0, t1, t2, t3) { - var _ = this; - _._hasValue = t0; - _.invalidValue = t1; - _.name = t2; - _.message = t3; - }, - RangeError: function RangeError(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.start = t0; - _.end = t1; - _._hasValue = t2; - _.invalidValue = t3; - _.name = t4; - _.message = t5; - }, - IndexError: function IndexError(t0, t1, t2, t3, t4) { - var _ = this; - _.length = t0; - _._hasValue = t1; - _.invalidValue = t2; - _.name = t3; - _.message = t4; - }, - NoSuchMethodError: function NoSuchMethodError(t0, t1, t2, t3) { - var _ = this; - _._core$_receiver = t0; - _._memberName = t1; - _._core$_arguments = t2; - _._namedArguments = t3; - }, - UnsupportedError: function UnsupportedError(t0) { - this.message = t0; - }, - UnimplementedError: function UnimplementedError(t0) { - this.message = t0; - }, - StateError: function StateError(t0) { - this.message = t0; - }, - ConcurrentModificationError: function ConcurrentModificationError(t0) { - this.modifiedObject = t0; - }, - OutOfMemoryError: function OutOfMemoryError() { - }, - StackOverflowError: function StackOverflowError() { - }, - _Exception: function _Exception(t0) { - this.message = t0; - }, - FormatException: function FormatException(t0, t1, t2) { - this.message = t0; - this.source = t1; - this.offset = t2; - }, - Iterable: function Iterable() { - }, - _GeneratorIterable: function _GeneratorIterable(t0, t1, t2) { - this.length = t0; - this._generator = t1; - this.$ti = t2; - }, - MapEntry: function MapEntry(t0, t1, t2) { - this.key = t0; - this.value = t1; - this.$ti = t2; - }, - Null: function Null() { - }, - Object: function Object() { - }, - _StringStackTrace: function _StringStackTrace(t0) { - this._stackTrace = t0; - }, - Runes: function Runes(t0) { - this.string = t0; - }, - RuneIterator: function RuneIterator(t0) { - var _ = this; - _.string = t0; - _._nextPosition = _._position = 0; - _._currentCodePoint = -1; - }, - StringBuffer: function StringBuffer(t0) { - this._contents = t0; - }, - Uri__parseIPv4Address_error: function Uri__parseIPv4Address_error(t0) { - this.host = t0; - }, - Uri_parseIPv6Address_error: function Uri_parseIPv6Address_error(t0) { - this.host = t0; - }, - Uri_parseIPv6Address_parseHex: function Uri_parseIPv6Address_parseHex(t0, t1) { - this.error = t0; - this.host = t1; - }, - _Uri: function _Uri(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.scheme = t0; - _._userInfo = t1; - _._host = t2; - _._port = t3; - _.path = t4; - _._query = t5; - _._fragment = t6; - _.___Uri_hashCode_FI = _.___Uri_pathSegments_FI = _.___Uri__text_FI = $; - }, - _Uri__makePath_closure: function _Uri__makePath_closure() { - }, - UriData: function UriData(t0, t1, t2) { - this._text = t0; - this._separatorIndices = t1; - this._uriCache = t2; - }, - _createTables_build: function _createTables_build(t0) { - this.tables = t0; - }, - _createTables_setChars: function _createTables_setChars() { - }, - _createTables_setRange: function _createTables_setRange() { - }, - _SimpleUri: function _SimpleUri(t0, t1, t2, t3, t4, t5, t6, t7) { - var _ = this; - _._uri = t0; - _._schemeEnd = t1; - _._hostStart = t2; - _._portStart = t3; - _._pathStart = t4; - _._queryStart = t5; - _._fragmentStart = t6; - _._schemeCache = t7; - _._hashCodeCache = null; - }, - _DataUri: function _DataUri(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.scheme = t0; - _._userInfo = t1; - _._host = t2; - _._port = t3; - _.path = t4; - _._query = t5; - _._fragment = t6; - _.___Uri_hashCode_FI = _.___Uri_pathSegments_FI = _.___Uri__text_FI = $; - }, - Expando: function Expando(t0) { - this._jsWeakMap = t0; - }, - _convertDartFunctionFast(f) { - var ret, - existing = f.$dart_jsFunction; - if (existing != null) - return existing; - ret = function(_call, f) { - return function() { - return _call(f, Array.prototype.slice.apply(arguments)); - }; - }(A._callDartFunctionFast, f); - ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; - f.$dart_jsFunction = ret; - return ret; - }, - _convertDartFunctionFastCaptureThis(f) { - var ret, - existing = f._$dart_jsFunctionCaptureThis; - if (existing != null) - return existing; - ret = function(_call, f) { - return function() { - return _call(f, this, Array.prototype.slice.apply(arguments)); - }; - }(A._callDartFunctionFastCaptureThis, f); - ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; - f._$dart_jsFunctionCaptureThis = ret; - return ret; - }, - _callDartFunctionFast(callback, $arguments) { - return A.Function_apply(callback, $arguments); - }, - _callDartFunctionFastCaptureThis(callback, $self, $arguments) { - var t1 = [$self]; - B.JSArray_methods.addAll$1(t1, $arguments); - return A.Function_apply(callback, t1); - }, - allowInterop(f) { - if (typeof f == "function") - return f; - else - return A._convertDartFunctionFast(f); - }, - allowInteropCaptureThis(f) { - if (typeof f == "function") - throw A.wrapException(A.ArgumentError$("Function is already a JS function so cannot capture this.", null)); - else - return A._convertDartFunctionFastCaptureThis(f); - }, - _callDartFunctionFast2(callback, arg1, arg2, $length) { - if ($length >= 2) - return callback.call$2(arg1, arg2); - if ($length === 1) - return callback.call$1(arg1); - return callback.call$0(); - }, - _noJsifyRequired(o) { - return o == null || A._isBool(o) || typeof o == "number" || typeof o == "string" || type$.Int8List._is(o) || type$.Uint8List._is(o) || type$.Uint8ClampedList._is(o) || type$.Int16List._is(o) || type$.Uint16List._is(o) || type$.Int32List._is(o) || type$.Uint32List._is(o) || type$.Float32List._is(o) || type$.Float64List._is(o) || type$.ByteBuffer._is(o) || type$.ByteData._is(o); - }, - jsify(object) { - if (A._noJsifyRequired(object)) - return object; - return new A.jsify__convert(new A._IdentityHashMap(type$._IdentityHashMap_of_nullable_Object_and_nullable_Object)).call$1(object); - }, - _callMethodUnchecked0(o, method) { - return o[method](); - }, - callConstructor(constr, $arguments) { - var args, factoryFunction; - if ($arguments instanceof Array) - switch ($arguments.length) { - case 0: - return new constr(); - case 1: - return new constr($arguments[0]); - case 2: - return new constr($arguments[0], $arguments[1]); - case 3: - return new constr($arguments[0], $arguments[1], $arguments[2]); - case 4: - return new constr($arguments[0], $arguments[1], $arguments[2], $arguments[3]); - } - args = [null]; - B.JSArray_methods.addAll$1(args, $arguments); - factoryFunction = constr.bind.apply(constr, args); - String(factoryFunction); - return new factoryFunction(); - }, - promiseToFuture(jsPromise, $T) { - var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")), - completer = new A._AsyncCompleter(t1, $T._eval$1("_AsyncCompleter<0>")); - jsPromise.then(A.convertDartClosureToJS(new A.promiseToFuture_closure(completer), 1), A.convertDartClosureToJS(new A.promiseToFuture_closure0(completer), 1)); - return t1; - }, - jsify__convert: function jsify__convert(t0) { - this._convertedObjects = t0; - }, - promiseToFuture_closure: function promiseToFuture_closure(t0) { - this.completer = t0; - }, - promiseToFuture_closure0: function promiseToFuture_closure0(t0) { - this.completer = t0; - }, - NullRejectionException: function NullRejectionException(t0) { - this.isUndefined = t0; - }, - max(a, b) { - return Math.max(a, b); - }, - pow(x, exponent) { - return Math.pow(x, exponent); - }, - Random_Random() { - return B.C__JSRandom; - }, - _JSRandom: function _JSRandom() { - }, - ArgParser: function ArgParser(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _._arg_parser$_options = t0; - _._aliases = t1; - _.options = t2; - _.commands = t3; - _._optionsAndSeparators = t4; - _.allowTrailingOptions = t5; - _.usageLineLength = t6; - }, - ArgParser__addOption_closure: function ArgParser__addOption_closure(t0) { - this.$this = t0; - }, - ArgParserException$(message, commands, argumentName, source, offset) { - return new A.ArgParserException(commands == null ? B.List_empty : A.List_List$unmodifiable(commands, type$.String), argumentName, message, source, offset); - }, - ArgParserException: function ArgParserException(t0, t1, t2, t3, t4) { - var _ = this; - _.commands = t0; - _.argumentName = t1; - _.message = t2; - _.source = t3; - _.offset = t4; - }, - ArgResults: function ArgResults(t0, t1, t2, t3) { - var _ = this; - _._parser = t0; - _._parsed = t1; - _.name = t2; - _.rest = t3; - }, - Option: function Option(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) { - var _ = this; - _.name = t0; - _.abbr = t1; - _.help = t2; - _.valueHelp = t3; - _.allowed = t4; - _.allowedHelp = t5; - _.defaultsTo = t6; - _.negatable = t7; - _.callback = t8; - _.type = t9; - _.splitCommas = t10; - _.mandatory = t11; - _.hide = t12; - }, - OptionType: function OptionType(t0) { - this.name = t0; - }, - Parser$(_commandName, _grammar, _args, _parent, rest) { - var t1 = A._setArrayType([], type$.JSArray_String); - if (rest != null) - B.JSArray_methods.addAll$1(t1, rest); - return new A.Parser0(_commandName, _parent, _grammar, _args, t1, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic)); - }, - _isLetterOrDigit(codeUnit) { - var t1 = true; - if (!(codeUnit >= 65 && codeUnit <= 90)) - if (!(codeUnit >= 97 && codeUnit <= 122)) - t1 = codeUnit >= 48 && codeUnit <= 57; - return t1; - }, - Parser0: function Parser0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._commandName = t0; - _._parser$_parent = t1; - _._grammar = t2; - _._args = t3; - _._parser$_rest = t4; - _._results = t5; - }, - Parser_parse_closure: function Parser_parse_closure(t0) { - this.$this = t0; - }, - Parser__setOption_closure: function Parser__setOption_closure() { - }, - _Usage: function _Usage(t0, t1, t2) { - var _ = this; - _._usage$_optionsAndSeparators = t0; - _._usage$_buffer = t1; - _._currentColumn = 0; - _.___Usage__columnWidths_FI = $; - _._newlinesNeeded = 0; - _.lineLength = t2; - }, - _Usage__writeOption_closure: function _Usage__writeOption_closure() { - }, - _Usage__buildAllowedList_closure: function _Usage__buildAllowedList_closure(t0) { - this.option = t0; - }, - FutureGroup: function FutureGroup(t0, t1, t2) { - var _ = this; - _._future_group$_pending = 0; - _._future_group$_closed = false; - _._future_group$_completer = t0; - _._future_group$_values = t1; - _.$ti = t2; - }, - FutureGroup_add_closure: function FutureGroup_add_closure(t0, t1) { - this.$this = t0; - this.index = t1; - }, - FutureGroup_add_closure0: function FutureGroup_add_closure0(t0) { - this.$this = t0; - }, - ErrorResult: function ErrorResult(t0, t1) { - this.error = t0; - this.stackTrace = t1; - }, - ValueResult: function ValueResult(t0, t1) { - this.value = t0; - this.$ti = t1; - }, - StreamCompleter: function StreamCompleter(t0, t1) { - this._stream_completer$_stream = t0; - this.$ti = t1; - }, - _CompleterStream: function _CompleterStream(t0) { - this._sourceStream = this._stream_completer$_controller = null; - this.$ti = t0; - }, - StreamGroup: function StreamGroup(t0, t1, t2) { - var _ = this; - _.__StreamGroup__controller_A = $; - _._closed = false; - _._stream_group$_state = t0; - _._subscriptions = t1; - _.$ti = t2; - }, - StreamGroup_add_closure: function StreamGroup_add_closure() { - }, - StreamGroup_add_closure0: function StreamGroup_add_closure0(t0, t1) { - this.$this = t0; - this.stream = t1; - }, - StreamGroup__onListen_closure: function StreamGroup__onListen_closure() { - }, - StreamGroup__onCancel_closure: function StreamGroup__onCancel_closure(t0) { - this.$this = t0; - }, - StreamGroup__listenToStream_closure: function StreamGroup__listenToStream_closure(t0, t1) { - this.$this = t0; - this.stream = t1; - }, - _StreamGroupState: function _StreamGroupState(t0) { - this.name = t0; - }, - StreamQueue: function StreamQueue(t0, t1, t2, t3) { - var _ = this; - _._stream_queue$_source = t0; - _._stream_queue$_subscription = null; - _._isDone = false; - _._eventsReceived = 0; - _._eventQueue = t1; - _._requestQueue = t2; - _.$ti = t3; - }, - StreamQueue__ensureListening_closure: function StreamQueue__ensureListening_closure(t0) { - this.$this = t0; - }, - StreamQueue__ensureListening_closure1: function StreamQueue__ensureListening_closure1(t0) { - this.$this = t0; - }, - StreamQueue__ensureListening_closure0: function StreamQueue__ensureListening_closure0(t0) { - this.$this = t0; - }, - _NextRequest: function _NextRequest(t0, t1) { - this._completer = t0; - this.$ti = t1; - }, - isNodeJs() { - var t1 = self.process; - if (t1 == null) - t1 = null; - else { - t1 = J.get$release$x(t1); - t1 = t1 == null ? null : J.get$name$x(t1); - } - return J.$eq$(t1, "node"); - }, - isBrowser() { - return !A.isNodeJs() && self.document != null && typeof self.document.querySelector == "function"; - }, - wrapJSExceptions(callback) { - var error, error0, error1, error2, t1, exception; - if (!$.$get$_isStrictMode()) - return callback.call$0(); - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (typeof t1 == "string") { - error = t1; - throw A.wrapException(error); - } else if (A._isBool(t1)) { - error0 = t1; - throw A.wrapException(error0); - } else if (typeof t1 == "number") { - error1 = t1; - throw A.wrapException(error1); - } else { - error2 = t1; - if (typeof error2 == "symbol" || typeof error2 == "bigint" || error2 == null) - throw A.wrapException(A._callMethodUnchecked0(error2, "toString")); - throw exception; - } - } - }, - _isStrictMode_closure: function _isStrictMode_closure() { - }, - Repl: function Repl(t0, t1, t2, t3) { - var _ = this; - _.prompt = t0; - _.continuation = t1; - _.validator = t2; - _.__Repl__adapter_A = $; - _.history = t3; - }, - alwaysValid_closure: function alwaysValid_closure() { - }, - ReplAdapter: function ReplAdapter(t0) { - this.repl = t0; - this.rl = null; - }, - ReplAdapter_runAsync_closure: function ReplAdapter_runAsync_closure(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.rl = t2; - _.runController = t3; - }, - ReplAdapter_runAsync__closure: function ReplAdapter_runAsync__closure(t0) { - this.lineController = t0; - }, - Stdin: function Stdin() { - }, - Stdout: function Stdout() { - }, - ReadlineModule: function ReadlineModule() { - }, - ReadlineOptions: function ReadlineOptions() { - }, - ReadlineInterface: function ReadlineInterface() { - }, - EmptyUnmodifiableSet: function EmptyUnmodifiableSet(t0) { - this.$ti = t0; - }, - _EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin: function _EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin() { - }, - DefaultEquality: function DefaultEquality() { - }, - IterableEquality: function IterableEquality() { - }, - ListEquality: function ListEquality() { - }, - _MapEntry: function _MapEntry(t0, t1, t2) { - this.equality = t0; - this.key = t1; - this.value = t2; - }, - MapEquality: function MapEquality(t0) { - this.$ti = t0; - }, - QueueList$(initialCapacity, $E) { - return new A.QueueList(A.List_List$filled(A.QueueList__computeInitialCapacity(initialCapacity), null, false, $E._eval$1("0?")), 0, 0, $E._eval$1("QueueList<0>")); - }, - QueueList_QueueList$from(source, $E) { - var $length, queue, t1; - if (type$.List_dynamic._is(source)) { - $length = J.get$length$asx(source); - queue = A.QueueList$($length + 1, $E); - J.setRange$4$ax(queue._queue_list$_table, 0, $length, source, 0); - queue._queue_list$_tail = $length; - return queue; - } else { - t1 = A.QueueList$(null, $E); - t1.addAll$1(0, source); - return t1; - } - }, - QueueList__computeInitialCapacity(initialCapacity) { - if (initialCapacity == null || initialCapacity < 8) - return 8; - ++initialCapacity; - if ((initialCapacity & initialCapacity - 1) >>> 0 === 0) - return initialCapacity; - return A.QueueList__nextPowerOf2(initialCapacity); - }, - QueueList__nextPowerOf2(number) { - var nextNumber; - number = (number << 1 >>> 0) - 1; - for (; true; number = nextNumber) { - nextNumber = (number & number - 1) >>> 0; - if (nextNumber === 0) - return number; - } - }, - QueueList: function QueueList(t0, t1, t2, t3) { - var _ = this; - _._queue_list$_table = t0; - _._queue_list$_head = t1; - _._queue_list$_tail = t2; - _.$ti = t3; - }, - _CastQueueList: function _CastQueueList(t0, t1, t2, t3, t4) { - var _ = this; - _._queue_list$_delegate = t0; - _._queue_list$_table = t1; - _._queue_list$_head = t2; - _._queue_list$_tail = t3; - _.$ti = t4; - }, - _QueueList_Object_ListMixin: function _QueueList_Object_ListMixin() { - }, - UnionSet: function UnionSet(t0, t1) { - this._sets = t0; - this.$ti = t1; - }, - UnionSet__iterable_closure: function UnionSet__iterable_closure(t0) { - this.$this = t0; - }, - UnionSet_contains_closure: function UnionSet_contains_closure(t0, t1) { - this.$this = t0; - this.element = t1; - }, - _UnionSet_SetBase_UnmodifiableSetMixin: function _UnionSet_SetBase_UnmodifiableSetMixin() { - }, - UnmodifiableSetMixin__throw() { - throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable Set")); - }, - UnmodifiableSetView0: function UnmodifiableSetView0(t0, t1) { - this._base = t0; - this.$ti = t1; - }, - UnmodifiableSetMixin: function UnmodifiableSetMixin() { - }, - _UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin: function _UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin() { - }, - _DelegatingIterableBase: function _DelegatingIterableBase() { - }, - DelegatingSet: function DelegatingSet(t0, t1) { - this._base = t0; - this.$ti = t1; - }, - MapKeySet: function MapKeySet(t0, t1) { - this._baseMap = t0; - this.$ti = t1; - }, - MapKeySet_difference_closure: function MapKeySet_difference_closure(t0, t1) { - this.$this = t0; - this.other = t1; - }, - _MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin: function _MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin() { - }, - BufferModule: function BufferModule() { - }, - BufferConstants: function BufferConstants() { - }, - Buffer: function Buffer() { - }, - ConsoleModule: function ConsoleModule() { - }, - Console: function Console() { - }, - EventEmitter: function EventEmitter() { - }, - fs() { - var t1 = $._fs; - return t1 == null ? $._fs = self.fs : t1; - }, - FS: function FS() { - }, - FSConstants: function FSConstants() { - }, - FSWatcher: function FSWatcher() { - }, - ReadStream: function ReadStream() { - }, - ReadStreamOptions: function ReadStreamOptions() { - }, - WriteStream: function WriteStream() { - }, - WriteStreamOptions: function WriteStreamOptions() { - }, - FileOptions: function FileOptions() { - }, - StatOptions: function StatOptions() { - }, - MkdirOptions: function MkdirOptions() { - }, - RmdirOptions: function RmdirOptions() { - }, - WatchOptions: function WatchOptions() { - }, - WatchFileOptions: function WatchFileOptions() { - }, - Stats: function Stats() { - }, - Promise: function Promise() { - }, - Date: function Date() { - }, - JsError: function JsError() { - }, - Atomics: function Atomics() { - }, - Modules: function Modules() { - }, - Module: function Module() { - }, - Net: function Net() { - }, - Socket: function Socket() { - }, - NetAddress: function NetAddress() { - }, - NetServer: function NetServer() { - }, - NodeJsError: function NodeJsError() { - }, - JsAssertionError: function JsAssertionError() { - }, - JsRangeError: function JsRangeError() { - }, - JsReferenceError: function JsReferenceError() { - }, - JsSyntaxError: function JsSyntaxError() { - }, - JsTypeError: function JsTypeError() { - }, - JsSystemError: function JsSystemError() { - }, - Process: function Process() { - }, - CPUUsage: function CPUUsage() { - }, - Release: function Release() { - }, - StreamModule: function StreamModule() { - }, - Readable: function Readable() { - }, - Writable: function Writable() { - }, - Duplex: function Duplex() { - }, - Transform: function Transform() { - }, - WritableOptions: function WritableOptions() { - }, - ReadableOptions: function ReadableOptions() { - }, - Immediate: function Immediate() { - }, - Timeout: function Timeout() { - }, - TTY: function TTY() { - }, - TTYReadStream: function TTYReadStream() { - }, - TTYWriteStream: function TTYWriteStream() { - }, - jsify0(dartObject) { - if (A._isBasicType(dartObject)) - return dartObject; - return A.jsify(dartObject); - }, - _isBasicType(value) { - return false; - }, - promiseToFuture0(promise, $T) { - var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")), - completer = new A._SyncCompleter(t1, $T._eval$1("_SyncCompleter<0>")); - J.then$2$x(promise, A.allowInterop(new A.promiseToFuture_closure1(completer)), A.allowInterop(new A.promiseToFuture_closure2(completer))); - return t1; - }, - futureToPromise(future, $T) { - return new self.Promise(A.allowInterop(new A.futureToPromise_closure(future, $T))); - }, - Util: function Util() { - }, - promiseToFuture_closure1: function promiseToFuture_closure1(t0) { - this.completer = t0; - }, - promiseToFuture_closure2: function promiseToFuture_closure2(t0) { - this.completer = t0; - }, - futureToPromise_closure: function futureToPromise_closure(t0, t1) { - this.future = t0; - this.T = t1; - }, - futureToPromise__closure: function futureToPromise__closure(t0, t1) { - this.resolve = t0; - this.T = t1; - }, - Context_Context(style) { - return new A.Context(style, "."); - }, - _parseUri(uri) { - if (typeof uri == "string") - return A.Uri_parse(uri); - if (type$.Uri._is(uri)) - return uri; - throw A.wrapException(A.ArgumentError$value(uri, "uri", "Value must be a String or a Uri")); - }, - _validateArgList(method, args) { - var numArgs, i, numArgs0, message, t1, t2, t3, t4; - for (numArgs = args.length, i = 1; i < numArgs; ++i) { - if (args[i] == null || args[i - 1] != null) - continue; - for (; numArgs >= 1; numArgs = numArgs0) { - numArgs0 = numArgs - 1; - if (args[numArgs0] != null) - break; - } - message = new A.StringBuffer(""); - t1 = "" + (method + "("); - message._contents = t1; - t2 = A._arrayInstanceType(args); - t3 = t2._eval$1("SubListIterable<1>"); - t4 = new A.SubListIterable(args, 0, numArgs, t3); - t4.SubListIterable$3(args, 0, numArgs, t2._precomputed1); - t3 = t1 + new A.MappedListIterable(t4, new A._validateArgList_closure(), t3._eval$1("MappedListIterable")).join$1(0, ", "); - message._contents = t3; - message._contents = t3 + ("): part " + (i - 1) + " was null, but part " + i + " was not."); - throw A.wrapException(A.ArgumentError$(message.toString$0(0), null)); - } - }, - Context: function Context(t0, t1) { - this.style = t0; - this._context$_current = t1; - }, - Context_joinAll_closure: function Context_joinAll_closure() { - }, - Context_split_closure: function Context_split_closure() { - }, - _validateArgList_closure: function _validateArgList_closure() { - }, - _PathDirection: function _PathDirection(t0) { - this.name = t0; - }, - _PathRelation: function _PathRelation(t0) { - this.name = t0; - }, - InternalStyle: function InternalStyle() { - }, - ParsedPath_ParsedPath$parse(path, style) { - var t1, parts, separators, start, i, - root = style.getRoot$1(path), - isRootRelative = style.isRootRelative$1(path); - if (root != null) - path = B.JSString_methods.substring$1(path, root.length); - t1 = type$.JSArray_String; - parts = A._setArrayType([], t1); - separators = A._setArrayType([], t1); - t1 = path.length; - if (t1 !== 0 && style.isSeparator$1(path.charCodeAt(0))) { - separators.push(path[0]); - start = 1; - } else { - separators.push(""); - start = 0; - } - for (i = start; i < t1; ++i) - if (style.isSeparator$1(path.charCodeAt(i))) { - parts.push(B.JSString_methods.substring$2(path, start, i)); - separators.push(path[i]); - start = i + 1; - } - if (start < t1) { - parts.push(B.JSString_methods.substring$1(path, start)); - separators.push(""); - } - return new A.ParsedPath(style, root, isRootRelative, parts, separators); - }, - ParsedPath: function ParsedPath(t0, t1, t2, t3, t4) { - var _ = this; - _.style = t0; - _.root = t1; - _.isRootRelative = t2; - _.parts = t3; - _.separators = t4; - }, - ParsedPath__splitExtension_closure: function ParsedPath__splitExtension_closure() { - }, - ParsedPath__splitExtension_closure0: function ParsedPath__splitExtension_closure0() { - }, - PathException$(message) { - return new A.PathException(message); - }, - PathException: function PathException(t0) { - this.message = t0; - }, - PathMap__create(context, $V) { - var t1 = {}; - t1.context = context; - t1.context = $.$get$context(); - return A.LinkedHashMap_LinkedHashMap(new A.PathMap__create_closure(t1), new A.PathMap__create_closure0(t1), new A.PathMap__create_closure1(), type$.nullable_String, $V); - }, - PathMap: function PathMap(t0, t1) { - this._map = t0; - this.$ti = t1; - }, - PathMap__create_closure: function PathMap__create_closure(t0) { - this._box_0 = t0; - }, - PathMap__create_closure0: function PathMap__create_closure0(t0) { - this._box_0 = t0; - }, - PathMap__create_closure1: function PathMap__create_closure1() { - }, - Style__getPlatformStyle() { - if (A.Uri_base().get$scheme() !== "file") - return $.$get$Style_url(); - var t1 = A.Uri_base(); - if (!B.JSString_methods.endsWith$1(t1.get$path(t1), "/")) - return $.$get$Style_url(); - if (A._Uri__Uri(null, "a/b", null, null).toFilePath$0() === "a\\b") - return $.$get$Style_windows(); - return $.$get$Style_posix(); - }, - Style: function Style() { - }, - PosixStyle: function PosixStyle(t0, t1, t2) { - this.separatorPattern = t0; - this.needsSeparatorPattern = t1; - this.rootPattern = t2; - }, - UrlStyle: function UrlStyle(t0, t1, t2, t3) { - var _ = this; - _.separatorPattern = t0; - _.needsSeparatorPattern = t1; - _.rootPattern = t2; - _.relativeRootPattern = t3; - }, - WindowsStyle: function WindowsStyle(t0, t1, t2, t3) { - var _ = this; - _.separatorPattern = t0; - _.needsSeparatorPattern = t1; - _.rootPattern = t2; - _.relativeRootPattern = t3; - }, - WindowsStyle_absolutePathToUri_closure: function WindowsStyle_absolutePathToUri_closure() { - }, - Version$_(major, minor, patch, preRelease, build, _text) { - var t1 = preRelease == null ? A._setArrayType([], type$.JSArray_Object) : A.Version__splitParts(preRelease), - t2 = build == null ? A._setArrayType([], type$.JSArray_Object) : A.Version__splitParts(build); - if (major < 0) - A.throwExpression(A.ArgumentError$("Major version must be non-negative.", null)); - if (minor < 0) - A.throwExpression(A.ArgumentError$("Minor version must be non-negative.", null)); - if (patch < 0) - A.throwExpression(A.ArgumentError$("Patch version must be non-negative.", null)); - return new A.Version(major, minor, patch, t1, t2, _text); - }, - Version_Version(major, minor, patch, pre) { - var text = "" + major + "." + minor + "." + patch; - if (pre != null) - text += "-" + pre; - return A.Version$_(major, minor, patch, pre, null, text); - }, - Version___parse_tearOff(text) { - return A.Version_Version$parse(text); - }, - Version_Version$parse(text) { - var major, minor, patch, preRelease, build, t1, exception, _null = null, - _s17_ = 'Could not parse "', - match = $.$get$completeVersion().firstMatch$1(text); - if (match == null) - throw A.wrapException(A.FormatException$(_s17_ + text + '".', _null, _null)); - try { - t1 = match._match[1]; - t1.toString; - major = A.int_parse(t1, _null); - t1 = match._match[2]; - t1.toString; - minor = A.int_parse(t1, _null); - t1 = match._match[3]; - t1.toString; - patch = A.int_parse(t1, _null); - preRelease = match._match[5]; - build = match._match[8]; - t1 = A.Version$_(major, minor, patch, preRelease, build, text); - return t1; - } catch (exception) { - if (type$.FormatException._is(A.unwrapException(exception))) - throw A.wrapException(A.FormatException$(_s17_ + text + '".', _null, _null)); - else - throw exception; - } - }, - Version__splitParts(text) { - var t1 = type$.MappedListIterable_String_Object; - return A.List_List$of(new A.MappedListIterable(A._setArrayType(text.split("."), type$.JSArray_String), new A.Version__splitParts_closure(), t1), true, t1._eval$1("ListIterable.E")); - }, - Version: function Version(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.major = t0; - _.minor = t1; - _.patch = t2; - _.preRelease = t3; - _.build = t4; - _._version$_text = t5; - }, - Version__splitParts_closure: function Version__splitParts_closure() { - }, - VersionRange_VersionRange(includeMax, max) { - return new A.VersionRange(null, max, false, true); - }, - VersionRange: function VersionRange(t0, t1, t2, t3) { - var _ = this; - _.min = t0; - _.max = t1; - _.includeMin = t2; - _.includeMax = t3; - }, - CssMediaQuery$type(type, conditions, modifier) { - return new A.CssMediaQuery(modifier, type, true, conditions == null ? B.List_empty : A.List_List$unmodifiable(conditions, type$.String)); - }, - CssMediaQuery$condition(conditions, conjunction) { - var t1 = A.List_List$unmodifiable(conditions, type$.String); - if (t1.length > 1 && conjunction == null) - A.throwExpression(A.ArgumentError$(string$.If_con, null)); - return new A.CssMediaQuery(null, null, conjunction !== false, t1); - }, - CssMediaQuery: function CssMediaQuery(t0, t1, t2, t3) { - var _ = this; - _.modifier = t0; - _.type = t1; - _.conjunction = t2; - _.conditions = t3; - }, - _SingletonCssMediaQueryMergeResult: function _SingletonCssMediaQueryMergeResult(t0) { - this._name = t0; - }, - MediaQuerySuccessfulMergeResult: function MediaQuerySuccessfulMergeResult(t0) { - this.query = t0; - }, - ModifiableCssAtRule$($name, span, childless, value) { - var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); - return new A.ModifiableCssAtRule($name, value, childless, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); - }, - ModifiableCssAtRule: function ModifiableCssAtRule(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.name = t0; - _.value = t1; - _.isChildless = t2; - _.span = t3; - _.children = t4; - _._children = t5; - _._indexInParent = _._parent = null; - _.isGroupEnd = false; - }, - ModifiableCssComment: function ModifiableCssComment(t0, t1) { - var _ = this; - _.text = t0; - _.span = t1; - _._indexInParent = _._parent = null; - _.isGroupEnd = false; - }, - ModifiableCssDeclaration$($name, value, span, interleavedRules, parsedAsCustomProperty, trace, valueSpanForMap) { - var t3, - t1 = interleavedRules == null ? B.List_empty11 : A.List_List$unmodifiable(interleavedRules, type$.CssStyleRule), - t2 = valueSpanForMap == null ? value.span : valueSpanForMap; - if (parsedAsCustomProperty) - if (!J.startsWith$1$s($name.value, "--")) - A.throwExpression(A.ArgumentError$(string$.parsed, null)); - else { - t3 = value.value; - if (!(t3 instanceof A.SassString)) - A.throwExpression(A.ArgumentError$(string$.If_par + value.toString$0(0) + "` of type " + A.getRuntimeTypeOfDartObject(t3).toString$0(0) + ").", null)); - } - return new A.ModifiableCssDeclaration($name, value, parsedAsCustomProperty, t1, trace, t2, span); - }, - ModifiableCssDeclaration: function ModifiableCssDeclaration(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.name = t0; - _.value = t1; - _.parsedAsCustomProperty = t2; - _.interleavedRules = t3; - _.trace = t4; - _.valueSpanForMap = t5; - _.span = t6; - _._indexInParent = _._parent = null; - _.isGroupEnd = false; - }, - ModifiableCssImport: function ModifiableCssImport(t0, t1, t2) { - var _ = this; - _.url = t0; - _.modifiers = t1; - _.span = t2; - _._indexInParent = _._parent = null; - _.isGroupEnd = false; - }, - ModifiableCssKeyframeBlock$(selector, span) { - var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); - return new A.ModifiableCssKeyframeBlock(selector, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); - }, - ModifiableCssKeyframeBlock: function ModifiableCssKeyframeBlock(t0, t1, t2, t3) { - var _ = this; - _.selector = t0; - _.span = t1; - _.children = t2; - _._children = t3; - _._indexInParent = _._parent = null; - _.isGroupEnd = false; - }, - ModifiableCssMediaRule$(queries, span) { - var t1 = A.List_List$unmodifiable(queries, type$.CssMediaQuery), - t2 = A._setArrayType([], type$.JSArray_ModifiableCssNode); - if (J.get$isEmpty$asx(queries)) - A.throwExpression(A.ArgumentError$value(queries, "queries", "may not be empty.")); - return new A.ModifiableCssMediaRule(t1, span, new A.UnmodifiableListView(t2, type$.UnmodifiableListView_ModifiableCssNode), t2); - }, - ModifiableCssMediaRule: function ModifiableCssMediaRule(t0, t1, t2, t3) { - var _ = this; - _.queries = t0; - _.span = t1; - _.children = t2; - _._children = t3; - _._indexInParent = _._parent = null; - _.isGroupEnd = false; - }, - ModifiableCssNode: function ModifiableCssNode() { - }, - ModifiableCssNode_hasFollowingSibling_closure: function ModifiableCssNode_hasFollowingSibling_closure() { - }, - ModifiableCssParentNode: function ModifiableCssParentNode() { - }, - ModifiableCssStyleRule$(_selector, span, fromPlainCss, originalSelector) { - var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); - return new A.ModifiableCssStyleRule(_selector, originalSelector, span, fromPlainCss, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); - }, - ModifiableCssStyleRule: function ModifiableCssStyleRule(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._style_rule$_selector = t0; - _.originalSelector = t1; - _.span = t2; - _.fromPlainCss = t3; - _.children = t4; - _._children = t5; - _._indexInParent = _._parent = null; - _.isGroupEnd = false; - }, - ModifiableCssStylesheet$(span) { - var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); - return new A.ModifiableCssStylesheet(span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); - }, - ModifiableCssStylesheet: function ModifiableCssStylesheet(t0, t1, t2) { - var _ = this; - _.span = t0; - _.children = t1; - _._children = t2; - _._indexInParent = _._parent = null; - _.isGroupEnd = false; - }, - ModifiableCssSupportsRule$(condition, span) { - var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); - return new A.ModifiableCssSupportsRule(condition, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); - }, - ModifiableCssSupportsRule: function ModifiableCssSupportsRule(t0, t1, t2, t3) { - var _ = this; - _.condition = t0; - _.span = t1; - _.children = t2; - _._children = t3; - _._indexInParent = _._parent = null; - _.isGroupEnd = false; - }, - CssNode: function CssNode() { - }, - CssParentNode: function CssParentNode() { - }, - _IsInvisibleVisitor: function _IsInvisibleVisitor(t0, t1) { - this.includeBogus = t0; - this.includeComments = t1; - }, - __IsInvisibleVisitor_Object_EveryCssVisitor: function __IsInvisibleVisitor_Object_EveryCssVisitor() { - }, - CssStylesheet: function CssStylesheet(t0, t1) { - this.children = t0; - this.span = t1; - }, - CssValue: function CssValue(t0, t1, t2) { - this.value = t0; - this.span = t1; - this.$ti = t2; - }, - _FakeAstNode: function _FakeAstNode(t0) { - this._callback = t0; - }, - Argument: function Argument(t0, t1, t2) { - this.name = t0; - this.defaultValue = t1; - this.span = t2; - }, - ArgumentDeclaration_ArgumentDeclaration$parse(contents, url) { - return A.ScssParser$(contents, url).parseArgumentDeclaration$0(); - }, - ArgumentDeclaration: function ArgumentDeclaration(t0, t1, t2) { - this.$arguments = t0; - this.restArgument = t1; - this.span = t2; - }, - ArgumentDeclaration_verify_closure: function ArgumentDeclaration_verify_closure() { - }, - ArgumentDeclaration_verify_closure0: function ArgumentDeclaration_verify_closure0() { - }, - ArgumentInvocation$empty(span) { - return new A.ArgumentInvocation(B.List_empty9, B.Map_empty5, null, null, span); - }, - ArgumentInvocation: function ArgumentInvocation(t0, t1, t2, t3, t4) { - var _ = this; - _.positional = t0; - _.named = t1; - _.rest = t2; - _.keywordRest = t3; - _.span = t4; - }, - AtRootQuery: function AtRootQuery(t0, t1, t2, t3) { - var _ = this; - _.include = t0; - _.names = t1; - _._all = t2; - _._at_root_query$_rule = t3; - }, - ConfiguredVariable: function ConfiguredVariable(t0, t1, t2, t3) { - var _ = this; - _.name = t0; - _.expression = t1; - _.isGuarded = t2; - _.span = t3; - }, - Expression: function Expression() { - }, - BinaryOperationExpression: function BinaryOperationExpression(t0, t1, t2, t3) { - var _ = this; - _.operator = t0; - _.left = t1; - _.right = t2; - _.allowsSlash = t3; - }, - BinaryOperator: function BinaryOperator(t0, t1, t2, t3, t4) { - var _ = this; - _.name = t0; - _.operator = t1; - _.precedence = t2; - _.isAssociative = t3; - _._name = t4; - }, - BooleanExpression: function BooleanExpression(t0, t1) { - this.value = t0; - this.span = t1; - }, - ColorExpression: function ColorExpression(t0, t1) { - this.value = t0; - this.span = t1; - }, - FunctionExpression: function FunctionExpression(t0, t1, t2, t3, t4) { - var _ = this; - _.namespace = t0; - _.name = t1; - _.originalName = t2; - _.$arguments = t3; - _.span = t4; - }, - IfExpression: function IfExpression(t0, t1) { - this.$arguments = t0; - this.span = t1; - }, - InterpolatedFunctionExpression: function InterpolatedFunctionExpression(t0, t1, t2) { - this.name = t0; - this.$arguments = t1; - this.span = t2; - }, - ListExpression: function ListExpression(t0, t1, t2, t3) { - var _ = this; - _.contents = t0; - _.separator = t1; - _.hasBrackets = t2; - _.span = t3; - }, - ListExpression_toString_closure: function ListExpression_toString_closure(t0) { - this.$this = t0; - }, - MapExpression: function MapExpression(t0, t1) { - this.pairs = t0; - this.span = t1; - }, - NullExpression: function NullExpression(t0) { - this.span = t0; - }, - NumberExpression: function NumberExpression(t0, t1, t2) { - this.value = t0; - this.unit = t1; - this.span = t2; - }, - ParenthesizedExpression: function ParenthesizedExpression(t0, t1) { - this.expression = t0; - this.span = t1; - }, - SelectorExpression: function SelectorExpression(t0) { - this.span = t0; - }, - StringExpression_quoteText(text) { - var t1, - quote = A.StringExpression__bestQuote(A._setArrayType([text], type$.JSArray_String)), - buffer = new A.StringBuffer(""); - buffer._contents = "" + A.Primitives_stringFromCharCode(quote); - A.StringExpression__quoteInnerText(text, quote, buffer, true); - t1 = A.Primitives_stringFromCharCode(quote); - t1 = buffer._contents += t1; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - StringExpression__quoteInnerText(text, quote, buffer, $static) { - var t1, t2, i, _1_0, _0_0, t3, t4, t5, t0; - for (t1 = text.length, t2 = t1 - 1, i = 0; i < t1; ++i) { - _1_0 = text.charCodeAt(i); - if (_1_0 === 10 || _1_0 === 13 || _1_0 === 12) { - buffer.writeCharCode$1(92); - buffer.writeCharCode$1(97); - if (i !== t2) { - _0_0 = text.charCodeAt(i + 1); - t3 = true; - if (!(_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12)) - if (!(_0_0 >= 48 && _0_0 <= 57)) - if (!(_0_0 >= 97 && _0_0 <= 102)) - t3 = _0_0 >= 65 && _0_0 <= 70; - if (t3) - buffer.writeCharCode$1(32); - } - continue; - } - t3 = 92 === _1_0; - if (t3) - t4 = _1_0; - else - t4 = null; - if (!t3) { - t3 = false; - t5 = _1_0 === quote; - if (t5) - t4 = _1_0; - if (!t5) - if (35 === _1_0) - if ($static) - if (i < t2) { - t3 = text.charCodeAt(i + 1) === 123; - if (t3) - t4 = _1_0; - t0 = t4; - t4 = t3; - t3 = t0; - } else { - t0 = t4; - t4 = t3; - t3 = t0; - } - else { - t0 = t4; - t4 = t3; - t3 = t0; - } - else { - t0 = t4; - t4 = t3; - t3 = t0; - } - else { - t3 = t4; - t4 = true; - } - } else { - t3 = t4; - t4 = true; - } - if (t4) { - buffer.writeCharCode$1(92); - buffer.writeCharCode$1(t3); - continue; - } - buffer.writeCharCode$1(_1_0); - } - }, - StringExpression__bestQuote(strings) { - var t1, t2, t3, containsDoubleQuote, t4, t5; - for (t1 = J.get$iterator$ax(strings), t2 = type$.CodeUnits, t3 = t2._eval$1("ListIterator"), t2 = t2._eval$1("ListBase.E"), containsDoubleQuote = false; t1.moveNext$0();) - for (t4 = new A.CodeUnits(t1.get$current(t1)), t4 = new A.ListIterator(t4, t4.get$length(0), t3); t4.moveNext$0();) { - t5 = t4.__internal$_current; - if (t5 == null) - t5 = t2._as(t5); - if (t5 === 39) - return 34; - if (t5 === 34) - containsDoubleQuote = true; - } - return containsDoubleQuote ? 39 : 34; - }, - StringExpression: function StringExpression(t0, t1) { - this.text = t0; - this.hasQuotes = t1; - }, - SupportsExpression: function SupportsExpression(t0) { - this.condition = t0; - }, - UnaryOperationExpression: function UnaryOperationExpression(t0, t1, t2) { - this.operator = t0; - this.operand = t1; - this.span = t2; - }, - UnaryOperator: function UnaryOperator(t0, t1, t2) { - this.name = t0; - this.operator = t1; - this._name = t2; - }, - ValueExpression: function ValueExpression(t0, t1) { - this.value = t0; - this.span = t1; - }, - VariableExpression: function VariableExpression(t0, t1, t2) { - this.namespace = t0; - this.name = t1; - this.span = t2; - }, - DynamicImport: function DynamicImport(t0, t1) { - this.urlString = t0; - this.span = t1; - }, - StaticImport: function StaticImport(t0, t1, t2) { - this.url = t0; - this.modifiers = t1; - this.span = t2; - }, - Interpolation$(contents, spans, span) { - var t1 = new A.Interpolation(A.List_List$unmodifiable(contents, type$.Object), A.List_List$unmodifiable(spans, type$.nullable_FileSpan), span); - t1.Interpolation$3(contents, spans, span); - return t1; - }, - Interpolation: function Interpolation(t0, t1, t2) { - this.contents = t0; - this.spans = t1; - this.span = t2; - }, - Interpolation_toString_closure: function Interpolation_toString_closure() { - }, - Statement: function Statement() { - }, - AtRootRule$(children, span, query) { - var t1 = A.List_List$unmodifiable(children, type$.Statement), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); - return new A.AtRootRule(query, span, t1, t2); - }, - AtRootRule: function AtRootRule(t0, t1, t2, t3) { - var _ = this; - _.query = t0; - _.span = t1; - _.children = t2; - _.hasDeclarations = t3; - }, - AtRule$($name, span, children, value) { - var t1 = children == null ? null : A.List_List$unmodifiable(children, type$.Statement), - t2 = t1 == null ? null : B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); - return new A.AtRule($name, value, span, t1, t2 === true); - }, - AtRule: function AtRule(t0, t1, t2, t3, t4) { - var _ = this; - _.name = t0; - _.value = t1; - _.span = t2; - _.children = t3; - _.hasDeclarations = t4; - }, - CallableDeclaration: function CallableDeclaration() { - }, - ContentBlock$($arguments, children, span) { - var _s8_ = "@content", - t1 = A.stringReplaceAllUnchecked(_s8_, "_", "-"), - t2 = A.List_List$unmodifiable(children, type$.Statement), - t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); - return new A.ContentBlock(t1, _s8_, $arguments, span, t2, t3); - }, - ContentBlock: function ContentBlock(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.name = t0; - _.originalName = t1; - _.$arguments = t2; - _.span = t3; - _.children = t4; - _.hasDeclarations = t5; - }, - ContentRule: function ContentRule(t0, t1) { - this.$arguments = t0; - this.span = t1; - }, - DebugRule: function DebugRule(t0, t1) { - this.expression = t0; - this.span = t1; - }, - Declaration$($name, value, span) { - return new A.Declaration($name, value, span, null, false); - }, - Declaration$nested($name, children, span, value) { - var t1 = A.List_List$unmodifiable(children, type$.Statement), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); - return new A.Declaration($name, value, span, t1, t2); - }, - Declaration: function Declaration(t0, t1, t2, t3, t4) { - var _ = this; - _.name = t0; - _.value = t1; - _.span = t2; - _.children = t3; - _.hasDeclarations = t4; - }, - EachRule$(variables, list, children, span) { - var t1 = A.List_List$unmodifiable(variables, type$.String), - t2 = A.List_List$unmodifiable(children, type$.Statement), - t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); - return new A.EachRule(t1, list, span, t2, t3); - }, - EachRule: function EachRule(t0, t1, t2, t3, t4) { - var _ = this; - _.variables = t0; - _.list = t1; - _.span = t2; - _.children = t3; - _.hasDeclarations = t4; - }, - EachRule_toString_closure: function EachRule_toString_closure() { - }, - ErrorRule: function ErrorRule(t0, t1) { - this.expression = t0; - this.span = t1; - }, - ExtendRule: function ExtendRule(t0, t1, t2) { - this.selector = t0; - this.isOptional = t1; - this.span = t2; - }, - ForRule$(variable, from, to, children, span, exclusive) { - var t1 = A.List_List$unmodifiable(children, type$.Statement), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); - return new A.ForRule(variable, from, to, exclusive, span, t1, t2); - }, - ForRule: function ForRule(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.variable = t0; - _.from = t1; - _.to = t2; - _.isExclusive = t3; - _.span = t4; - _.children = t5; - _.hasDeclarations = t6; - }, - ForwardRule: function ForwardRule(t0, t1, t2, t3, t4, t5, t6, t7) { - var _ = this; - _.url = t0; - _.shownMixinsAndFunctions = t1; - _.shownVariables = t2; - _.hiddenMixinsAndFunctions = t3; - _.hiddenVariables = t4; - _.prefix = t5; - _.configuration = t6; - _.span = t7; - }, - FunctionRule$($name, $arguments, children, span, comment) { - var t1 = A.stringReplaceAllUnchecked($name, "_", "-"), - t2 = A.List_List$unmodifiable(children, type$.Statement), - t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); - return new A.FunctionRule(t1, $name, $arguments, span, t2, t3); - }, - FunctionRule: function FunctionRule(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.name = t0; - _.originalName = t1; - _.$arguments = t2; - _.span = t3; - _.children = t4; - _.hasDeclarations = t5; - }, - IfClause$(expression, children) { - var t1 = A.List_List$unmodifiable(children, type$.Statement); - return new A.IfClause(expression, t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure())); - }, - ElseClause$(children) { - var t1 = A.List_List$unmodifiable(children, type$.Statement); - return new A.ElseClause(t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure())); - }, - IfRule: function IfRule(t0, t1, t2) { - this.clauses = t0; - this.lastClause = t1; - this.span = t2; - }, - IfRule_toString_closure: function IfRule_toString_closure() { - }, - IfRuleClause: function IfRuleClause() { - }, - IfRuleClause$__closure: function IfRuleClause$__closure() { - }, - IfRuleClause$___closure: function IfRuleClause$___closure() { - }, - IfClause: function IfClause(t0, t1, t2) { - this.expression = t0; - this.children = t1; - this.hasDeclarations = t2; - }, - ElseClause: function ElseClause(t0, t1) { - this.children = t0; - this.hasDeclarations = t1; - }, - ImportRule: function ImportRule(t0, t1) { - this.imports = t0; - this.span = t1; - }, - IncludeRule: function IncludeRule(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.namespace = t0; - _.name = t1; - _.originalName = t2; - _.$arguments = t3; - _.content = t4; - _.span = t5; - }, - LoudComment: function LoudComment(t0) { - this.text = t0; - }, - MediaRule$(query, children, span) { - var t1 = A.List_List$unmodifiable(children, type$.Statement), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); - return new A.MediaRule(query, span, t1, t2); - }, - MediaRule: function MediaRule(t0, t1, t2, t3) { - var _ = this; - _.query = t0; - _.span = t1; - _.children = t2; - _.hasDeclarations = t3; - }, - MixinRule$($name, $arguments, children, span, comment) { - var t1 = A.stringReplaceAllUnchecked($name, "_", "-"), - t2 = A.List_List$unmodifiable(children, type$.Statement), - t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); - return new A.MixinRule(t1, $name, $arguments, span, t2, t3); - }, - MixinRule: function MixinRule(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.__MixinRule_hasContent_FI = $; - _.name = t0; - _.originalName = t1; - _.$arguments = t2; - _.span = t3; - _.children = t4; - _.hasDeclarations = t5; - }, - _HasContentVisitor: function _HasContentVisitor() { - }, - __HasContentVisitor_Object_StatementSearchVisitor: function __HasContentVisitor_Object_StatementSearchVisitor() { - }, - ParentStatement: function ParentStatement() { - }, - ParentStatement_closure: function ParentStatement_closure() { - }, - ParentStatement__closure: function ParentStatement__closure() { - }, - ReturnRule: function ReturnRule(t0, t1) { - this.expression = t0; - this.span = t1; - }, - SilentComment: function SilentComment(t0, t1) { - this.text = t0; - this.span = t1; - }, - StyleRule$(selector, children, span) { - var t1 = A.List_List$unmodifiable(children, type$.Statement), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); - return new A.StyleRule(selector, span, t1, t2); - }, - StyleRule: function StyleRule(t0, t1, t2, t3) { - var _ = this; - _.selector = t0; - _.span = t1; - _.children = t2; - _.hasDeclarations = t3; - }, - Stylesheet$(children, span) { - var t1 = A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span), - t2 = A._setArrayType([], type$.JSArray_UseRule), - t3 = A._setArrayType([], type$.JSArray_ForwardRule), - t4 = A.List_List$unmodifiable(children, type$.Statement), - t5 = B.JSArray_methods.any$1(t4, new A.ParentStatement_closure()); - t2 = new A.Stylesheet(span, false, t2, t3, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span), B.Map_empty7, t4, t5); - t2.Stylesheet$internal$5$globalVariables$plainCss(children, span, t1, null, false); - return t2; - }, - Stylesheet$internal(children, span, parseTimeWarnings, globalVariables, plainCss) { - var t1 = A._setArrayType([], type$.JSArray_UseRule), - t2 = A._setArrayType([], type$.JSArray_ForwardRule), - t3 = globalVariables == null ? B.Map_empty7 : A.ConstantMap_ConstantMap$from(globalVariables, type$.String, type$.FileSpan), - t4 = A.List_List$unmodifiable(children, type$.Statement), - t5 = B.JSArray_methods.any$1(t4, new A.ParentStatement_closure()); - t1 = new A.Stylesheet(span, plainCss, t1, t2, new A.UnmodifiableListView(parseTimeWarnings, type$.UnmodifiableListView_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span), t3, t4, t5); - t1.Stylesheet$internal$5$globalVariables$plainCss(children, span, parseTimeWarnings, globalVariables, plainCss); - return t1; - }, - Stylesheet_Stylesheet$parse(contents, syntax, url) { - var error, stackTrace, url0, t1, exception, t2; - try { - switch (syntax) { - case B.Syntax_Sass_sass: - t1 = new A.SassParser(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.FileSpan), A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span), A.SpanScanner$(contents, url), null).parse$0(0); - return t1; - case B.Syntax_SCSS_scss: - t1 = A.ScssParser$(contents, url).parse$0(0); - return t1; - case B.Syntax_CSS_css: - t1 = new A.CssParser(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.FileSpan), A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span), A.SpanScanner$(contents, url), null).parse$0(0); - return t1; - } - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = error; - t2 = J.getInterceptor$z(t1); - t1 = A.SourceSpanException.prototype.get$span.call(t2, t1); - url0 = t1.get$sourceUrl(t1); - if (url0 == null || J.toString$0$(url0) === "stdin") - throw exception; - t1 = type$.Uri; - throw A.wrapException(A.throwWithTrace(error.withLoadedUrls$1(A.Set_Set$unmodifiable(A.LinkedHashSet_LinkedHashSet$_literal([url0], t1), t1)), error, stackTrace)); - } else - throw exception; - } - }, - Stylesheet: function Stylesheet(t0, t1, t2, t3, t4, t5, t6, t7) { - var _ = this; - _.span = t0; - _.plainCss = t1; - _._uses = t2; - _._forwards = t3; - _.parseTimeWarnings = t4; - _.globalVariables = t5; - _.children = t6; - _.hasDeclarations = t7; - }, - SupportsRule$(condition, children, span) { - var t1 = A.List_List$unmodifiable(children, type$.Statement), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); - return new A.SupportsRule(condition, span, t1, t2); - }, - SupportsRule: function SupportsRule(t0, t1, t2, t3) { - var _ = this; - _.condition = t0; - _.span = t1; - _.children = t2; - _.hasDeclarations = t3; - }, - UseRule: function UseRule(t0, t1, t2, t3) { - var _ = this; - _.url = t0; - _.namespace = t1; - _.configuration = t2; - _.span = t3; - }, - VariableDeclaration$($name, expression, span, comment, global, guarded, namespace) { - if (namespace != null && global) - A.throwExpression(A.ArgumentError$(string$.Other_, null)); - return new A.VariableDeclaration(namespace, $name, expression, guarded, global, span); - }, - VariableDeclaration: function VariableDeclaration(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.namespace = t0; - _.name = t1; - _.expression = t2; - _.isGuarded = t3; - _.isGlobal = t4; - _.span = t5; - }, - WarnRule: function WarnRule(t0, t1) { - this.expression = t0; - this.span = t1; - }, - WhileRule$(condition, children, span) { - var t1 = A.List_List$unmodifiable(children, type$.Statement), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); - return new A.WhileRule(condition, span, t1, t2); - }, - WhileRule: function WhileRule(t0, t1, t2, t3) { - var _ = this; - _.condition = t0; - _.span = t1; - _.children = t2; - _.hasDeclarations = t3; - }, - SupportsAnything: function SupportsAnything(t0, t1) { - this.contents = t0; - this.span = t1; - }, - SupportsDeclaration: function SupportsDeclaration(t0, t1, t2) { - this.name = t0; - this.value = t1; - this.span = t2; - }, - SupportsFunction: function SupportsFunction(t0, t1, t2) { - this.name = t0; - this.$arguments = t1; - this.span = t2; - }, - SupportsInterpolation: function SupportsInterpolation(t0, t1) { - this.expression = t0; - this.span = t1; - }, - SupportsNegation: function SupportsNegation(t0, t1) { - this.condition = t0; - this.span = t1; - }, - SupportsOperation$(left, right, operator, span) { - var lowerOperator = operator.toLowerCase(); - if (lowerOperator !== "and" && lowerOperator !== "or") - A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); - return new A.SupportsOperation(left, right, operator, span); - }, - SupportsOperation: function SupportsOperation(t0, t1, t2, t3) { - var _ = this; - _.left = t0; - _.right = t1; - _.operator = t2; - _.span = t3; - }, - Selector: function Selector() { - }, - _IsInvisibleVisitor0: function _IsInvisibleVisitor0(t0) { - this.includeBogus = t0; - }, - _IsBogusVisitor: function _IsBogusVisitor(t0) { - this.includeLeadingCombinator = t0; - }, - _IsBogusVisitor_visitComplexSelector_closure: function _IsBogusVisitor_visitComplexSelector_closure(t0) { - this.$this = t0; - }, - _IsUselessVisitor: function _IsUselessVisitor() { - }, - _IsUselessVisitor_visitComplexSelector_closure: function _IsUselessVisitor_visitComplexSelector_closure(t0) { - this.$this = t0; - }, - __IsBogusVisitor_Object_AnySelectorVisitor: function __IsBogusVisitor_Object_AnySelectorVisitor() { - }, - __IsInvisibleVisitor_Object_AnySelectorVisitor: function __IsInvisibleVisitor_Object_AnySelectorVisitor() { - }, - __IsUselessVisitor_Object_AnySelectorVisitor: function __IsUselessVisitor_Object_AnySelectorVisitor() { - }, - AttributeSelector: function AttributeSelector(t0, t1, t2, t3, t4) { - var _ = this; - _.name = t0; - _.op = t1; - _.value = t2; - _.modifier = t3; - _.span = t4; - }, - AttributeOperator: function AttributeOperator(t0, t1) { - this._attribute$_text = t0; - this._name = t1; - }, - ClassSelector: function ClassSelector(t0, t1) { - this.name = t0; - this.span = t1; - }, - Combinator: function Combinator(t0, t1) { - this._combinator$_text = t0; - this._name = t1; - }, - ComplexSelector$(leadingCombinators, components, span, lineBreak) { - var t1 = A.List_List$unmodifiable(leadingCombinators, type$.CssValue_Combinator), - t2 = A.List_List$unmodifiable(components, type$.ComplexSelectorComponent); - if (t1.length === 0 && t2.length === 0) - A.throwExpression(A.ArgumentError$(string$.leadin, null)); - return new A.ComplexSelector(t1, t2, lineBreak, span); - }, - ComplexSelector: function ComplexSelector(t0, t1, t2, t3) { - var _ = this; - _.leadingCombinators = t0; - _.components = t1; - _.lineBreak = t2; - _.__ComplexSelector_specificity_FI = $; - _.span = t3; - }, - ComplexSelector_specificity_closure: function ComplexSelector_specificity_closure() { - }, - ComplexSelectorComponent: function ComplexSelectorComponent(t0, t1, t2) { - this.selector = t0; - this.combinators = t1; - this.span = t2; - }, - ComplexSelectorComponent_toString_closure: function ComplexSelectorComponent_toString_closure() { - }, - CompoundSelector$(components, span) { - var t1 = A.List_List$unmodifiable(components, type$.SimpleSelector); - if (t1.length === 0) - A.throwExpression(A.ArgumentError$("components may not be empty.", null)); - return new A.CompoundSelector(t1, span); - }, - CompoundSelector: function CompoundSelector(t0, t1) { - var _ = this; - _.components = t0; - _.__CompoundSelector_hasComplicatedSuperselectorSemantics_FI = _.__CompoundSelector_specificity_FI = $; - _.span = t1; - }, - CompoundSelector_specificity_closure: function CompoundSelector_specificity_closure() { - }, - CompoundSelector_hasComplicatedSuperselectorSemantics_closure: function CompoundSelector_hasComplicatedSuperselectorSemantics_closure() { - }, - IDSelector: function IDSelector(t0, t1) { - this.name = t0; - this.span = t1; - }, - IDSelector_unify_closure: function IDSelector_unify_closure(t0) { - this.$this = t0; - }, - SelectorList$(components, span) { - var t1 = A.List_List$unmodifiable(components, type$.ComplexSelector); - if (t1.length === 0) - A.throwExpression(A.ArgumentError$("components may not be empty.", null)); - return new A.SelectorList(t1, span); - }, - SelectorList_SelectorList$parse(contents, allowParent, interpolationMap, plainCss) { - return new A.SelectorParser(allowParent, plainCss, A.SpanScanner$(contents, null), interpolationMap).parse$0(0); - }, - SelectorList: function SelectorList(t0, t1) { - this.components = t0; - this.span = t1; - }, - SelectorList_asSassList_closure: function SelectorList_asSassList_closure() { - }, - SelectorList_nestWithin_closure: function SelectorList_nestWithin_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.preserveParentSelectors = t1; - _.implicitParent = t2; - _.parent = t3; - }, - SelectorList_nestWithin__closure: function SelectorList_nestWithin__closure(t0) { - this.complex = t0; - }, - SelectorList_nestWithin__closure0: function SelectorList_nestWithin__closure0(t0) { - this.complex = t0; - }, - SelectorList__nestWithinCompound_closure: function SelectorList__nestWithinCompound_closure() { - }, - SelectorList__nestWithinCompound_closure0: function SelectorList__nestWithinCompound_closure0(t0) { - this.parent = t0; - }, - SelectorList__nestWithinCompound_closure1: function SelectorList__nestWithinCompound_closure1(t0, t1, t2) { - this.parentSelector = t0; - this.resolvedSimples = t1; - this.component = t2; - }, - SelectorList_withAdditionalCombinators_closure: function SelectorList_withAdditionalCombinators_closure(t0) { - this.combinators = t0; - }, - _ParentSelectorVisitor: function _ParentSelectorVisitor() { - }, - __ParentSelectorVisitor_Object_SelectorSearchVisitor: function __ParentSelectorVisitor_Object_SelectorSearchVisitor() { - }, - ParentSelector: function ParentSelector(t0, t1) { - this.suffix = t0; - this.span = t1; - }, - PlaceholderSelector: function PlaceholderSelector(t0, t1) { - this.name = t0; - this.span = t1; - }, - PseudoSelector$($name, span, argument, element, selector) { - var t1 = !element, - t2 = t1 && !A.PseudoSelector__isFakePseudoElement($name); - return new A.PseudoSelector($name, A.unvendor($name), t2, t1, argument, selector, span); - }, - PseudoSelector__isFakePseudoElement($name) { - switch ($name.charCodeAt(0)) { - case 97: - case 65: - return A.equalsIgnoreCase($name, "after"); - case 98: - case 66: - return A.equalsIgnoreCase($name, "before"); - case 102: - case 70: - return A.equalsIgnoreCase($name, "first-line") || A.equalsIgnoreCase($name, "first-letter"); - default: - return false; - } - }, - PseudoSelector: function PseudoSelector(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.name = t0; - _.normalizedName = t1; - _.isClass = t2; - _.isSyntacticClass = t3; - _.argument = t4; - _.selector = t5; - _.__PseudoSelector_specificity_FI = $; - _.span = t6; - }, - PseudoSelector_specificity_closure: function PseudoSelector_specificity_closure(t0) { - this.$this = t0; - }, - PseudoSelector_specificity__closure: function PseudoSelector_specificity__closure() { - }, - PseudoSelector_specificity__closure0: function PseudoSelector_specificity__closure0() { - }, - PseudoSelector_unify_closure: function PseudoSelector_unify_closure() { - }, - QualifiedName: function QualifiedName(t0, t1) { - this.name = t0; - this.namespace = t1; - }, - SimpleSelector: function SimpleSelector() { - }, - SimpleSelector_isSuperselector_closure: function SimpleSelector_isSuperselector_closure(t0) { - this.$this = t0; - }, - SimpleSelector_isSuperselector__closure: function SimpleSelector_isSuperselector__closure(t0) { - this.$this = t0; - }, - TypeSelector: function TypeSelector(t0, t1) { - this.name = t0; - this.span = t1; - }, - UniversalSelector: function UniversalSelector(t0, t1) { - this.namespace = t0; - this.span = t1; - }, - compileAsync(path, charset, fatalDeprecations, futureDeprecations, importCache, logger, quietDeps, silenceDeprecations, sourceMap, style, syntax, verbose) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult), - $async$returnValue, t3, t4, t0, stylesheet, result, t1, t2; - var $async$compileAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = type$.Deprecation; - t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - t2.addAll$1(0, silenceDeprecations); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - t3.addAll$1(0, fatalDeprecations); - t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - t4.addAll$1(0, futureDeprecations); - logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); - logger.validate$0(); - t1 = syntax === A.Syntax_forPath(path); - $async$goto = t1 ? 3 : 5; - break; - case 3: - // then - t1 = $.$get$FilesystemImporter_cwd(); - t2 = A.isNodeJs() ? self.process : null; - if (!J.$eq$(t2 == null ? null : J.get$platform$x(t2), "win32")) { - t2 = A.isNodeJs() ? self.process : null; - t2 = J.$eq$(t2 == null ? null : J.get$platform$x(t2), "darwin"); - } else - t2 = true; - if (t2) { - t2 = $.$get$context(); - t3 = A._realCasePath(A.absolute(t2.normalize$1(path), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); - t0 = t3; - t3 = t2; - t2 = t0; - } else { - t2 = $.$get$context(); - t3 = t2.canonicalize$1(0, path); - t0 = t3; - t3 = t2; - t2 = t0; - } - $async$goto = 6; - return A._asyncAwait(importCache.importCanonical$3$originalUrl(t1, t3.toUri$1(t2), t3.toUri$1(path)), $async$compileAsync); - case 6: - // returning from await. - t3 = $async$result; - t3.toString; - stylesheet = t3; - // goto join - $async$goto = 4; - break; - case 5: - // else - t1 = A.readFile(path); - stylesheet = A.Stylesheet_Stylesheet$parse(t1, syntax, $.$get$context().toUri$1(path)); - case 4: - // join - $async$goto = 7; - return A._asyncAwait(A._compileStylesheet0(stylesheet, logger, importCache, null, $.$get$FilesystemImporter_cwd(), null, style, true, null, null, quietDeps, sourceMap, charset), $async$compileAsync); - case 7: - // returning from await. - result = $async$result; - logger.summarize$1$js(false); - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$compileAsync, $async$completer); - }, - compileStringAsync(source, charset, fatalDeprecations, futureDeprecations, importCache, importer, logger, quietDeps, silenceDeprecations, sourceMap, style, syntax, verbose) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult), - $async$returnValue, t3, t4, stylesheet, result, t1, t2; - var $async$compileStringAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = type$.Deprecation; - t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - t2.addAll$1(0, silenceDeprecations); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - t3.addAll$1(0, fatalDeprecations); - t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - t4.addAll$1(0, futureDeprecations); - logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); - logger.validate$0(); - stylesheet = A.Stylesheet_Stylesheet$parse(source, syntax, null); - $async$goto = 3; - return A._asyncAwait(A._compileStylesheet0(stylesheet, logger, importCache, null, importer, null, style, true, null, null, quietDeps, sourceMap, charset), $async$compileStringAsync); - case 3: - // returning from await. - result = $async$result; - logger.summarize$1$js(false); - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$compileStringAsync, $async$completer); - }, - _compileStylesheet0(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult), - $async$returnValue, serializeResult, resultSourceMap, $async$temp1; - var $async$_compileStylesheet0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$temp1 = A; - $async$goto = 3; - return A._asyncAwait(A._EvaluateVisitor$0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet), $async$_compileStylesheet0); - case 3: - // returning from await. - serializeResult = $async$temp1.serialize($async$result._1, charset, indentWidth, false, lineFeed, logger, sourceMap, style, true); - resultSourceMap = serializeResult._1; - if (resultSourceMap != null) - A.mapInPlace(resultSourceMap.urls, new A._compileStylesheet_closure0(stylesheet, importCache)); - $async$returnValue = new A.CompileResult(serializeResult); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_compileStylesheet0, $async$completer); - }, - _compileStylesheet_closure0: function _compileStylesheet_closure0(t0, t1) { - this.stylesheet = t0; - this.importCache = t1; - }, - AsyncEnvironment$() { - var t1 = type$.String, - t2 = type$.Module_AsyncCallable, - t3 = type$.AstNode, - t4 = type$.int, - t5 = type$.AsyncCallable, - t6 = type$.JSArray_Map_String_AsyncCallable; - return new A.AsyncEnvironment(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_AsyncCallable), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value)], type$.JSArray_Map_String_Value), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null); - }, - AsyncEnvironment$_(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content) { - var t1 = type$.String, - t2 = type$.int; - return new A.AsyncEnvironment(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content); - }, - _EnvironmentModule__EnvironmentModule0(environment, css, preModuleComments, extensionStore, forwarded) { - var t1, t2, t3, t4, t5, t6, module, result, t7; - if (forwarded == null) - forwarded = B.Set_empty2; - t1 = type$.dynamic; - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t2 = type$.Module_AsyncCallable, t3 = type$.List_CssComment, t4 = A.MapExtensions_get_pairs(preModuleComments, t2, t3), t4 = t4.get$iterator(t4), t5 = type$.CssComment; t4.moveNext$0();) { - t6 = t4.get$current(t4); - module = t6._0; - result = A.List_List$from(t6._1, false, t5); - result.fixed$length = Array; - result.immutable$list = Array; - t1.$indexSet(0, module, result); - } - t1 = A.ConstantMap_ConstantMap$from(t1, t2, t3); - t2 = A._EnvironmentModule__makeModulesByVariable0(forwarded); - t3 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure5(), type$.Map_String_Value), type$.Value); - t4 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure6(), type$.Map_String_AstNode), type$.AstNode); - t5 = type$.Map_String_AsyncCallable; - t6 = type$.AsyncCallable; - t7 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure7(), t5), t6); - t6 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure8(), t5), t6); - t5 = J.get$isNotEmpty$asx(css.get$children(css)) || preModuleComments.get$isNotEmpty(preModuleComments) || B.JSArray_methods.any$1(environment._async_environment$_allModules, new A._EnvironmentModule__EnvironmentModule_closure9()); - return A._EnvironmentModule$_0(environment, css, t1, extensionStore, t2, t3, t4, t7, t6, t5, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._async_environment$_allModules, new A._EnvironmentModule__EnvironmentModule_closure10())); - }, - _EnvironmentModule__makeModulesByVariable0(forwarded) { - var modulesByVariable, t1, t2, t3, t4, t5; - if (forwarded.get$isEmpty(forwarded)) - return B.Map_empty9; - modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_AsyncCallable); - for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { - t2 = t1.get$current(t1); - if (t2 instanceof A._EnvironmentModule0) { - for (t3 = t2._async_environment$_modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t5 = t4.get$variables(); - A.setAll(modulesByVariable, t5.get$keys(t5), t4); - } - A.setAll(modulesByVariable, J.get$keys$z(B.JSArray_methods.get$first(t2._async_environment$_environment._async_environment$_variables)), t2); - } else { - t3 = t2.get$variables(); - A.setAll(modulesByVariable, t3.get$keys(t3), t2); - } - } - return modulesByVariable; - }, - _EnvironmentModule__memberMap0(localMap, otherMaps, $V) { - var t1, t2, t3; - localMap = new A.PublicMemberMapView(localMap, $V._eval$1("PublicMemberMapView<0>")); - if (otherMaps.get$isEmpty(otherMaps)) - return localMap; - t1 = A._setArrayType([], $V._eval$1("JSArray>")); - for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { - t3 = t2.get$current(t2); - if (t3.get$isNotEmpty(t3)) - t1.push(t3); - } - t1.push(localMap); - if (t1.length === 1) - return localMap; - return A.MergedMapView$(t1, type$.String, $V); - }, - _EnvironmentModule$_0(_environment, css, preModuleComments, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { - return new A._EnvironmentModule0(_environment._async_environment$_allModules, variables, variableNodes, functions, mixins, extensionStore, css, preModuleComments, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); - }, - AsyncEnvironment: function AsyncEnvironment(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { - var _ = this; - _._async_environment$_modules = t0; - _._async_environment$_namespaceNodes = t1; - _._async_environment$_globalModules = t2; - _._async_environment$_importedModules = t3; - _._async_environment$_forwardedModules = t4; - _._async_environment$_nestedForwardedModules = t5; - _._async_environment$_allModules = t6; - _._async_environment$_variables = t7; - _._async_environment$_variableNodes = t8; - _._async_environment$_variableIndices = t9; - _._async_environment$_functions = t10; - _._async_environment$_functionIndices = t11; - _._async_environment$_mixins = t12; - _._async_environment$_mixinIndices = t13; - _._async_environment$_content = t14; - _._async_environment$_inMixin = false; - _._async_environment$_inSemiGlobalScope = true; - _._async_environment$_lastVariableIndex = _._async_environment$_lastVariableName = null; - }, - AsyncEnvironment__getVariableFromGlobalModule_closure: function AsyncEnvironment__getVariableFromGlobalModule_closure(t0) { - this.name = t0; - }, - AsyncEnvironment_setVariable_closure: function AsyncEnvironment_setVariable_closure(t0, t1) { - this.$this = t0; - this.name = t1; - }, - AsyncEnvironment_setVariable_closure0: function AsyncEnvironment_setVariable_closure0(t0) { - this.name = t0; - }, - AsyncEnvironment_setVariable_closure1: function AsyncEnvironment_setVariable_closure1(t0, t1) { - this.$this = t0; - this.name = t1; - }, - AsyncEnvironment__getFunctionFromGlobalModule_closure: function AsyncEnvironment__getFunctionFromGlobalModule_closure(t0) { - this.name = t0; - }, - AsyncEnvironment__getMixinFromGlobalModule_closure: function AsyncEnvironment__getMixinFromGlobalModule_closure(t0) { - this.name = t0; - }, - AsyncEnvironment_toModule_closure: function AsyncEnvironment_toModule_closure() { - }, - AsyncEnvironment_toDummyModule_closure: function AsyncEnvironment_toDummyModule_closure() { - }, - _EnvironmentModule0: function _EnvironmentModule0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) { - var _ = this; - _.upstream = t0; - _.variables = t1; - _.variableNodes = t2; - _.functions = t3; - _.mixins = t4; - _.extensionStore = t5; - _.css = t6; - _.preModuleComments = t7; - _.transitivelyContainsCss = t8; - _.transitivelyContainsExtensions = t9; - _._async_environment$_environment = t10; - _._async_environment$_modulesByVariable = t11; - }, - _EnvironmentModule__EnvironmentModule_closure5: function _EnvironmentModule__EnvironmentModule_closure5() { - }, - _EnvironmentModule__EnvironmentModule_closure6: function _EnvironmentModule__EnvironmentModule_closure6() { - }, - _EnvironmentModule__EnvironmentModule_closure7: function _EnvironmentModule__EnvironmentModule_closure7() { - }, - _EnvironmentModule__EnvironmentModule_closure8: function _EnvironmentModule__EnvironmentModule_closure8() { - }, - _EnvironmentModule__EnvironmentModule_closure9: function _EnvironmentModule__EnvironmentModule_closure9() { - }, - _EnvironmentModule__EnvironmentModule_closure10: function _EnvironmentModule__EnvironmentModule_closure10() { - }, - AsyncImportCache__toImporters(importers, loadPaths, packageConfig) { - var t1, t2, t3, t4, _i, path, _null = null, - sassPath = A.getEnvironmentVariable("SASS_PATH"); - if (A.isBrowser()) { - t1 = A._setArrayType([], type$.JSArray_AsyncImporter_2); - B.JSArray_methods.addAll$1(t1, importers); - return t1; - } - t1 = A._setArrayType([], type$.JSArray_AsyncImporter_2); - B.JSArray_methods.addAll$1(t1, importers); - for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { - t3 = t2.get$current(t2); - t1.push(new A.FilesystemImporter($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); - } - if (sassPath != null) { - t2 = A.isNodeJs() ? self.process : _null; - t3 = sassPath.split(J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32") ? ";" : ":"); - t4 = t3.length; - _i = 0; - for (; _i < t4; ++_i) { - path = t3[_i]; - t1.push(new A.FilesystemImporter($.$get$context().absolute$15(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); - } - } - return t1; - }, - AsyncImportCache: function AsyncImportCache(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._async_import_cache$_importers = t0; - _._async_import_cache$_canonicalizeCache = t1; - _._async_import_cache$_perImporterCanonicalizeCache = t2; - _._async_import_cache$_nonCanonicalRelativeUrls = t3; - _._async_import_cache$_importCache = t4; - _._async_import_cache$_resultsCache = t5; - }, - AsyncImportCache_canonicalize_closure: function AsyncImportCache_canonicalize_closure(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.baseImporter = t1; - _.resolvedUrl = t2; - _.baseUrl = t3; - _.forImport = t4; - _.key = t5; - _.url = t6; - }, - AsyncImportCache__canonicalize_closure: function AsyncImportCache__canonicalize_closure(t0, t1) { - this.importer = t0; - this.url = t1; - }, - AsyncImportCache_importCanonical_closure: function AsyncImportCache_importCanonical_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.importer = t1; - _.canonicalUrl = t2; - _.originalUrl = t3; - }, - AsyncImportCache_humanize_closure: function AsyncImportCache_humanize_closure(t0) { - this.canonicalUrl = t0; - }, - AsyncImportCache_humanize_closure0: function AsyncImportCache_humanize_closure0() { - }, - AsyncImportCache_humanize_closure1: function AsyncImportCache_humanize_closure1() { - }, - AsyncImportCache_humanize_closure2: function AsyncImportCache_humanize_closure2(t0) { - this.canonicalUrl = t0; - }, - AsyncBuiltInCallable$mixin($name, $arguments, callback, acceptsContent, url) { - return new A.AsyncBuiltInCallable($name, A.ScssParser$("@mixin " + $name + "(" + $arguments + ") {", url).parseArgumentDeclaration$0(), new A.AsyncBuiltInCallable$mixin_closure(callback), false); - }, - AsyncBuiltInCallable: function AsyncBuiltInCallable(t0, t1, t2, t3) { - var _ = this; - _.name = t0; - _._async_built_in$_arguments = t1; - _._async_built_in$_callback = t2; - _.acceptsContent = t3; - }, - AsyncBuiltInCallable$mixin_closure: function AsyncBuiltInCallable$mixin_closure(t0) { - this.callback = t0; - }, - AsyncBuiltInCallable_withDeprecationWarning_closure: function AsyncBuiltInCallable_withDeprecationWarning_closure(t0, t1, t2) { - this.$this = t0; - this.module = t1; - this.newName = t2; - }, - BuiltInCallable$function($name, $arguments, callback, url) { - return new A.BuiltInCallable($name, A._setArrayType([new A._Record_2(A.ScssParser$("@function " + $name + "(" + $arguments + ") {", url).parseArgumentDeclaration$0(), callback)], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value), false); - }, - BuiltInCallable$mixin($name, $arguments, callback, acceptsContent, url) { - return new A.BuiltInCallable($name, A._setArrayType([new A._Record_2(A.ScssParser$("@mixin " + $name + "(" + $arguments + ") {", url).parseArgumentDeclaration$0(), new A.BuiltInCallable$mixin_closure(callback))], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value), acceptsContent); - }, - BuiltInCallable$overloadedFunction($name, overloads) { - var t2, t3, t4, t5, t6, t7, args, callback, - t1 = A._setArrayType([], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value); - for (t2 = type$.String, t3 = A.MapExtensions_get_pairs(overloads, t2, type$.Value_Function_List_Value), t3 = t3.get$iterator(t3), t4 = "@function " + $name + "(", t5 = type$.FileSpan, t6 = type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span; t3.moveNext$0();) { - t7 = t3.get$current(t3); - args = t7._0; - callback = t7._1; - t1.push(new A._Record_2(new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(t2, t5), A._setArrayType([], t6), A.SpanScanner$(t4 + args + ") {", null), null).parseArgumentDeclaration$0(), callback)); - } - return new A.BuiltInCallable($name, t1, false); - }, - BuiltInCallable: function BuiltInCallable(t0, t1, t2) { - this.name = t0; - this._overloads = t1; - this.acceptsContent = t2; - }, - BuiltInCallable$mixin_closure: function BuiltInCallable$mixin_closure(t0) { - this.callback = t0; - }, - BuiltInCallable_withDeprecationWarning_closure: function BuiltInCallable_withDeprecationWarning_closure(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.module = t2; - _.newName = t3; - }, - PlainCssCallable: function PlainCssCallable(t0) { - this.name = t0; - }, - UserDefinedCallable: function UserDefinedCallable(t0, t1, t2, t3) { - var _ = this; - _.declaration = t0; - _.environment = t1; - _.inDependency = t2; - _.$ti = t3; - }, - _compileStylesheet(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { - var serializeResult = A.serialize(A._EvaluateVisitor$(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet)._1, charset, indentWidth, false, lineFeed, logger, sourceMap, style, true), - resultSourceMap = serializeResult._1; - if (resultSourceMap != null) - A.mapInPlace(resultSourceMap.urls, new A._compileStylesheet_closure(stylesheet, importCache)); - return new A.CompileResult(serializeResult); - }, - _compileStylesheet_closure: function _compileStylesheet_closure(t0, t1) { - this.stylesheet = t0; - this.importCache = t1; - }, - CompileResult: function CompileResult(t0) { - this._serialize = t0; - }, - Configuration: function Configuration(t0, t1) { - this._configuration$_values = t0; - this.__originalConfiguration = t1; - }, - ExplicitConfiguration: function ExplicitConfiguration(t0, t1, t2) { - this.nodeWithSpan = t0; - this._configuration$_values = t1; - this.__originalConfiguration = t2; - }, - ConfiguredValue: function ConfiguredValue(t0, t1, t2) { - this.value = t0; - this.configurationSpan = t1; - this.assignmentNode = t2; - }, - Deprecation_fromId(id) { - return A.IterableExtension_firstWhereOrNull(B.List_Hx4, new A.Deprecation_fromId_closure(id)); - }, - Deprecation_forVersion(version) { - var t2, _i, deprecation, $self, t3, - t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation); - for (t2 = A.VersionRange_VersionRange(true, version).get$allows(), _i = 0; _i < 24; ++_i) { - deprecation = B.List_Hx4[_i]; - $self = deprecation._deprecatedIn; - t3 = $self == null ? null : A.Version___parse_tearOff($self); - t3 = t3 == null ? null : t2.call$1(t3); - if (t3 == null ? false : t3) - t1.add$1(0, deprecation); - } - return t1; - }, - Deprecation: function Deprecation(t0, t1, t2) { - this.id = t0; - this._deprecatedIn = t1; - this._name = t2; - }, - Deprecation_fromId_closure: function Deprecation_fromId_closure(t0) { - this.id = t0; - }, - Environment$() { - var t1 = type$.String, - t2 = type$.Module_Callable, - t3 = type$.AstNode, - t4 = type$.int, - t5 = type$.Callable, - t6 = type$.JSArray_Map_String_Callable; - return new A.Environment(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_Callable), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value)], type$.JSArray_Map_String_Value), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null); - }, - Environment$_(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content) { - var t1 = type$.String, - t2 = type$.int; - return new A.Environment(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content); - }, - _EnvironmentModule__EnvironmentModule(environment, css, preModuleComments, extensionStore, forwarded) { - var t1, t2, t3, t4, t5, t6, module, result, t7; - if (forwarded == null) - forwarded = B.Set_empty0; - t1 = type$.dynamic; - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t2 = type$.Module_Callable, t3 = type$.List_CssComment, t4 = A.MapExtensions_get_pairs(preModuleComments, t2, t3), t4 = t4.get$iterator(t4), t5 = type$.CssComment; t4.moveNext$0();) { - t6 = t4.get$current(t4); - module = t6._0; - result = A.List_List$from(t6._1, false, t5); - result.fixed$length = Array; - result.immutable$list = Array; - t1.$indexSet(0, module, result); - } - t1 = A.ConstantMap_ConstantMap$from(t1, t2, t3); - t2 = A._EnvironmentModule__makeModulesByVariable(forwarded); - t3 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure(), type$.Map_String_Value), type$.Value); - t4 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure0(), type$.Map_String_AstNode), type$.AstNode); - t5 = type$.Map_String_Callable; - t6 = type$.Callable; - t7 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure1(), t5), t6); - t6 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure2(), t5), t6); - t5 = J.get$isNotEmpty$asx(css.get$children(css)) || preModuleComments.get$isNotEmpty(preModuleComments) || B.JSArray_methods.any$1(environment._allModules, new A._EnvironmentModule__EnvironmentModule_closure3()); - return A._EnvironmentModule$_(environment, css, t1, extensionStore, t2, t3, t4, t7, t6, t5, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._allModules, new A._EnvironmentModule__EnvironmentModule_closure4())); - }, - _EnvironmentModule__makeModulesByVariable(forwarded) { - var modulesByVariable, t1, t2, t3, t4, t5; - if (forwarded.get$isEmpty(forwarded)) - return B.Map_empty1; - modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_Callable); - for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { - t2 = t1.get$current(t1); - if (t2 instanceof A._EnvironmentModule) { - for (t3 = t2._modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t5 = t4.get$variables(); - A.setAll(modulesByVariable, t5.get$keys(t5), t4); - } - A.setAll(modulesByVariable, J.get$keys$z(B.JSArray_methods.get$first(t2._environment$_environment._variables)), t2); - } else { - t3 = t2.get$variables(); - A.setAll(modulesByVariable, t3.get$keys(t3), t2); - } - } - return modulesByVariable; - }, - _EnvironmentModule__memberMap(localMap, otherMaps, $V) { - var t1, t2, t3; - localMap = new A.PublicMemberMapView(localMap, $V._eval$1("PublicMemberMapView<0>")); - if (otherMaps.get$isEmpty(otherMaps)) - return localMap; - t1 = A._setArrayType([], $V._eval$1("JSArray>")); - for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { - t3 = t2.get$current(t2); - if (t3.get$isNotEmpty(t3)) - t1.push(t3); - } - t1.push(localMap); - if (t1.length === 1) - return localMap; - return A.MergedMapView$(t1, type$.String, $V); - }, - _EnvironmentModule$_(_environment, css, preModuleComments, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { - return new A._EnvironmentModule(_environment._allModules, variables, variableNodes, functions, mixins, extensionStore, css, preModuleComments, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); - }, - Environment: function Environment(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { - var _ = this; - _._environment$_modules = t0; - _._namespaceNodes = t1; - _._globalModules = t2; - _._importedModules = t3; - _._forwardedModules = t4; - _._nestedForwardedModules = t5; - _._allModules = t6; - _._variables = t7; - _._variableNodes = t8; - _._variableIndices = t9; - _._functions = t10; - _._functionIndices = t11; - _._mixins = t12; - _._mixinIndices = t13; - _._content = t14; - _._inMixin = false; - _._inSemiGlobalScope = true; - _._lastVariableIndex = _._lastVariableName = null; - }, - Environment__getVariableFromGlobalModule_closure: function Environment__getVariableFromGlobalModule_closure(t0) { - this.name = t0; - }, - Environment_setVariable_closure: function Environment_setVariable_closure(t0, t1) { - this.$this = t0; - this.name = t1; - }, - Environment_setVariable_closure0: function Environment_setVariable_closure0(t0) { - this.name = t0; - }, - Environment_setVariable_closure1: function Environment_setVariable_closure1(t0, t1) { - this.$this = t0; - this.name = t1; - }, - Environment__getFunctionFromGlobalModule_closure: function Environment__getFunctionFromGlobalModule_closure(t0) { - this.name = t0; - }, - Environment__getMixinFromGlobalModule_closure: function Environment__getMixinFromGlobalModule_closure(t0) { - this.name = t0; - }, - Environment_toModule_closure: function Environment_toModule_closure() { - }, - Environment_toDummyModule_closure: function Environment_toDummyModule_closure() { - }, - _EnvironmentModule: function _EnvironmentModule(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) { - var _ = this; - _.upstream = t0; - _.variables = t1; - _.variableNodes = t2; - _.functions = t3; - _.mixins = t4; - _.extensionStore = t5; - _.css = t6; - _.preModuleComments = t7; - _.transitivelyContainsCss = t8; - _.transitivelyContainsExtensions = t9; - _._environment$_environment = t10; - _._modulesByVariable = t11; - }, - _EnvironmentModule__EnvironmentModule_closure: function _EnvironmentModule__EnvironmentModule_closure() { - }, - _EnvironmentModule__EnvironmentModule_closure0: function _EnvironmentModule__EnvironmentModule_closure0() { - }, - _EnvironmentModule__EnvironmentModule_closure1: function _EnvironmentModule__EnvironmentModule_closure1() { - }, - _EnvironmentModule__EnvironmentModule_closure2: function _EnvironmentModule__EnvironmentModule_closure2() { - }, - _EnvironmentModule__EnvironmentModule_closure3: function _EnvironmentModule__EnvironmentModule_closure3() { - }, - _EnvironmentModule__EnvironmentModule_closure4: function _EnvironmentModule__EnvironmentModule_closure4() { - }, - SassException$(message, span, loadedUrls) { - return new A.SassException(loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); - }, - MultiSpanSassException$(message, span, primaryLabel, secondarySpans, loadedUrls) { - var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); - return new A.MultiSpanSassException(primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); - }, - SassRuntimeException$(message, span, trace, loadedUrls) { - return new A.SassRuntimeException(trace, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); - }, - MultiSpanSassRuntimeException$(message, span, primaryLabel, secondarySpans, trace, loadedUrls) { - var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); - return new A.MultiSpanSassRuntimeException(trace, primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); - }, - SassFormatException$(message, span, loadedUrls) { - return new A.SassFormatException(loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); - }, - MultiSpanSassFormatException$(message, span, primaryLabel, secondarySpans, loadedUrls) { - var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); - return new A.MultiSpanSassFormatException(primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); - }, - SassScriptException$(message, argumentName) { - return new A.SassScriptException(argumentName == null ? message : "$" + argumentName + ": " + message); - }, - MultiSpanSassScriptException$(message, primaryLabel, secondarySpans) { - var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); - return new A.MultiSpanSassScriptException(primaryLabel, t1, message); - }, - SassException: function SassException(t0, t1, t2) { - this.loadedUrls = t0; - this._span_exception$_message = t1; - this._span = t2; - }, - MultiSpanSassException: function MultiSpanSassException(t0, t1, t2, t3, t4) { - var _ = this; - _.primaryLabel = t0; - _.secondarySpans = t1; - _.loadedUrls = t2; - _._span_exception$_message = t3; - _._span = t4; - }, - SassRuntimeException: function SassRuntimeException(t0, t1, t2, t3) { - var _ = this; - _.trace = t0; - _.loadedUrls = t1; - _._span_exception$_message = t2; - _._span = t3; - }, - MultiSpanSassRuntimeException: function MultiSpanSassRuntimeException(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.trace = t0; - _.primaryLabel = t1; - _.secondarySpans = t2; - _.loadedUrls = t3; - _._span_exception$_message = t4; - _._span = t5; - }, - SassFormatException: function SassFormatException(t0, t1, t2) { - this.loadedUrls = t0; - this._span_exception$_message = t1; - this._span = t2; - }, - MultiSpanSassFormatException: function MultiSpanSassFormatException(t0, t1, t2, t3, t4) { - var _ = this; - _.primaryLabel = t0; - _.secondarySpans = t1; - _.loadedUrls = t2; - _._span_exception$_message = t3; - _._span = t4; - }, - SassScriptException: function SassScriptException(t0) { - this.message = t0; - }, - MultiSpanSassScriptException: function MultiSpanSassScriptException(t0, t1, t2) { - this.primaryLabel = t0; - this.secondarySpans = t1; - this.message = t2; - }, - compileStylesheet(options, graph, source, destination, ifModified) { - return A.compileStylesheet$body(options, graph, source, destination, ifModified); - }, - compileStylesheet$body(options, graph, source, destination, ifModified) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_int_and_String_and_nullable_String), - $async$returnValue, $async$handler = 2, $async$currentError, error, stackTrace, message, error0, stackTrace0, path, message0, exception, t1, $async$exception; - var $async$compileStylesheet = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$handler = 4; - $async$goto = 7; - return A._asyncAwait(A._compileStylesheetWithoutErrorHandling(options, graph, source, destination, ifModified), $async$compileStylesheet); - case 7: - // returning from await. - $async$handler = 2; - // goto after finally - $async$goto = 6; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (t1 instanceof A.SassException) { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - if (destination != null && !options.get$emitErrorCss()) - A._tryDelete(destination); - message = J.toString$1$color$(error, options.get$color()); - if (A._asBool(options._options.$index(0, "trace"))) { - t1 = A.getTrace(error); - if (t1 == null) - t1 = stackTrace; - } else - t1 = null; - $async$returnValue = A._getErrorWithStackTrace(65, message, t1); - // goto return - $async$goto = 1; - break; - } else if (t1 instanceof A.FileSystemException) { - error0 = t1; - stackTrace0 = A.getTraceFromException($async$exception); - path = error0.path; - message0 = path == null ? error0.message : "Error reading " + $.$get$context().relative$2$from(path, null) + ": " + error0.message + "."; - if (A._asBool(options._options.$index(0, "trace"))) { - t1 = A.getTrace(error0); - if (t1 == null) - t1 = stackTrace0; - } else - t1 = null; - $async$returnValue = A._getErrorWithStackTrace(66, message0, t1); - // goto return - $async$goto = 1; - break; - } else - throw $async$exception; - // goto after finally - $async$goto = 6; - break; - case 3: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 6: - // after finally - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$compileStylesheet, $async$completer); - }, - _compileStylesheetWithoutErrorHandling(options, graph, source, destination, ifModified) { - return A._compileStylesheetWithoutErrorHandling$body(options, graph, source, destination, ifModified); - }, - _compileStylesheetWithoutErrorHandling$body(options, graph, source, destination, ifModified) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$returnValue, $async$handler = 2, $async$currentError, syntax, result, importCache, error, t1, exception, t2, t3, t4, t5, t6, t7, t8, t9, t10, result0, t11, t12, t13, t14, logger, stylesheet, t0, css, buffer, sourceName, destinationName, nowStr, timestamp, importer, $async$exception; - var $async$_compileStylesheetWithoutErrorHandling = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - importer = $.$get$FilesystemImporter_cwd(); - if (ifModified) - try { - t1 = false; - if (source != null) - if (destination != null) { - t1 = A.absolute(source, null, null, null, null, null, null, null, null, null, null, null, null, null, null); - t1 = !graph.modifiedSince$3($.$get$context().toUri$1(t1), A.modificationTime(destination), importer); - } - if (t1) { - // goto return - $async$goto = 1; - break; - } - } catch (exception) { - if (!(A.unwrapException(exception) instanceof A.FileSystemException)) - throw exception; - } - syntax = null; - if (A._asBoolQ(options._ifParsed$1("indented")) === true) - syntax = B.Syntax_Sass_sass; - else if (source != null) - syntax = A.Syntax_forPath(source); - else - syntax = B.Syntax_SCSS_scss; - result = null; - $async$handler = 4; - t1 = options._options; - $async$goto = A._asBool(t1.$index(0, "async")) ? 7 : 9; - break; - case 7: - // then - t2 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl; - t3 = type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport; - t4 = type$.Uri; - importCache = new A.AsyncImportCache(A.AsyncImportCache__toImporters(options.get$pkgImporters(), type$.List_String._as(t1.$index(0, "load-path")), null), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.nullable_Stylesheet), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.ImporterResult)); - $async$goto = source == null ? 10 : 12; - break; - case 10: - // then - $async$goto = 13; - return A._asyncAwait(A.readStdin(), $async$_compileStylesheetWithoutErrorHandling); - case 13: - // returning from await. - t2 = $async$result; - t3 = syntax; - t4 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); - t5 = $.$get$FilesystemImporter_cwd(); - t6 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; - t7 = A._asBool(t1.$index(0, "quiet-deps")); - t8 = A._asBool(t1.$index(0, "verbose")); - t9 = options.get$emitSourceMap(); - t1 = A._asBool(t1.$index(0, "charset")); - t10 = options.get$silenceDeprecations(0); - $async$goto = 14; - return A._asyncAwait(A.compileStringAsync(t2, t1, options.get$fatalDeprecations(0), options.get$futureDeprecations(0), importCache, t5, t4, t7, t10, t9, t6, t3, t8), $async$_compileStylesheetWithoutErrorHandling); - case 14: - // returning from await. - result0 = $async$result; - // goto join - $async$goto = 11; - break; - case 12: - // else - t2 = syntax; - t3 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); - t4 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; - t5 = A._asBool(t1.$index(0, "quiet-deps")); - t6 = A._asBool(t1.$index(0, "verbose")); - t7 = options.get$emitSourceMap(); - t1 = A._asBool(t1.$index(0, "charset")); - t8 = options.get$silenceDeprecations(0); - $async$goto = 15; - return A._asyncAwait(A.compileAsync(source, t1, options.get$fatalDeprecations(0), options.get$futureDeprecations(0), importCache, t3, t5, t8, t7, t4, t2, t6), $async$_compileStylesheetWithoutErrorHandling); - case 15: - // returning from await. - result0 = $async$result; - case 11: - // join - result = result0; - // goto join - $async$goto = 8; - break; - case 9: - // else - $async$goto = source == null ? 16 : 18; - break; - case 16: - // then - $async$goto = 19; - return A._asyncAwait(A.readStdin(), $async$_compileStylesheetWithoutErrorHandling); - case 19: - // returning from await. - t2 = $async$result; - t3 = syntax; - t4 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); - t5 = $.$get$FilesystemImporter_cwd(); - t6 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; - t7 = A._asBool(t1.$index(0, "quiet-deps")); - t8 = A._asBool(t1.$index(0, "verbose")); - t9 = options.get$emitSourceMap(); - t1 = A._asBool(t1.$index(0, "charset")); - t10 = options.get$silenceDeprecations(0); - t11 = options.get$fatalDeprecations(0); - t12 = options.get$futureDeprecations(0); - t13 = type$.Deprecation; - t14 = A.LinkedHashSet_LinkedHashSet$_empty(t13); - t14.addAll$1(0, t10); - t10 = A.LinkedHashSet_LinkedHashSet$_empty(t13); - t10.addAll$1(0, t11); - t11 = A.LinkedHashSet_LinkedHashSet$_empty(t13); - t11.addAll$1(0, t12); - logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t13, type$.int), t4, t14, t10, t11, !t8); - logger.validate$0(); - stylesheet = A.Stylesheet_Stylesheet$parse(t2, t3 == null ? B.Syntax_SCSS_scss : t3, null); - result0 = A._compileStylesheet(stylesheet, logger, graph.importCache, null, t5, null, t6, true, null, null, t7, t9, t1); - logger.summarize$1$js(false); - // goto join - $async$goto = 17; - break; - case 18: - // else - t2 = syntax; - t3 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); - importCache = graph.importCache; - t4 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; - t5 = A._asBool(t1.$index(0, "quiet-deps")); - t6 = A._asBool(t1.$index(0, "verbose")); - t7 = options.get$emitSourceMap(); - t1 = A._asBool(t1.$index(0, "charset")); - t8 = options.get$silenceDeprecations(0); - t9 = options.get$fatalDeprecations(0); - t10 = options.get$futureDeprecations(0); - t11 = type$.Deprecation; - t12 = A.LinkedHashSet_LinkedHashSet$_empty(t11); - t12.addAll$1(0, t8); - t8 = A.LinkedHashSet_LinkedHashSet$_empty(t11); - t8.addAll$1(0, t9); - t9 = A.LinkedHashSet_LinkedHashSet$_empty(t11); - t9.addAll$1(0, t10); - logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t11, type$.int), t3, t12, t8, t9, !t6); - logger.validate$0(); - t3 = t2 == null || t2 === A.Syntax_forPath(source); - if (t3) { - t2 = $.$get$FilesystemImporter_cwd(); - t3 = A.isNodeJs() ? self.process : null; - if (!J.$eq$(t3 == null ? null : J.get$platform$x(t3), "win32")) { - t3 = A.isNodeJs() ? self.process : null; - t3 = J.$eq$(t3 == null ? null : J.get$platform$x(t3), "darwin"); - } else - t3 = true; - if (t3) { - t3 = $.$get$context(); - t6 = A._realCasePath(A.absolute(t3.normalize$1(source), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); - t0 = t6; - t6 = t3; - t3 = t0; - } else { - t3 = $.$get$context(); - t6 = t3.canonicalize$1(0, source); - t0 = t6; - t6 = t3; - t3 = t0; - } - t6 = importCache.importCanonical$3$originalUrl(t2, t6.toUri$1(t3), t6.toUri$1(source)); - t6.toString; - stylesheet = t6; - } else { - t3 = A.readFile(source); - if (t2 == null) - t2 = A.Syntax_forPath(source); - stylesheet = A.Stylesheet_Stylesheet$parse(t3, t2, $.$get$context().toUri$1(source)); - } - result0 = A._compileStylesheet(stylesheet, logger, importCache, null, $.$get$FilesystemImporter_cwd(), null, t4, true, null, null, t5, t7, t1); - logger.summarize$1$js(false); - case 17: - // join - result = result0; - case 8: - // join - $async$handler = 2; - // goto after finally - $async$goto = 6; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (t1 instanceof A.SassException) { - error = t1; - if (options.get$emitErrorCss()) - if (destination == null) - A.print(error.toCssString$0()); - else { - A.ensureDir($.$get$context().dirname$1(destination)); - A.writeFile(destination, error.toCssString$0() + "\n"); - } - throw $async$exception; - } else - throw $async$exception; - // goto after finally - $async$goto = 6; - break; - case 3: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 6: - // after finally - css = result._serialize._0 + A._writeSourceMap(options, result._serialize._1, destination); - if (destination == null) { - if (css.length !== 0) - A.print(css); - } else { - A.ensureDir($.$get$context().dirname$1(destination)); - A.writeFile(destination, css + "\n"); - } - t1 = options._options; - if (!A._asBool(t1.$index(0, "quiet"))) - t1 = !A._asBool(t1.$index(0, "update")) && !A._asBool(t1.$index(0, "watch")); - else - t1 = true; - if (t1) { - // goto return - $async$goto = 1; - break; - } - buffer = new A.StringBuffer(""); - if (source == null) - sourceName = "stdin"; - else { - t1 = $.$get$context(); - sourceName = t1.prettyUri$1(t1.toUri$1(source)); - } - destination.toString; - t1 = $.$get$context(); - destinationName = t1.prettyUri$1(t1.toUri$1(destination)); - nowStr = new A.DateTime(Date.now(), 0, false).toString$0(0); - timestamp = B.JSString_methods.substring$2(nowStr, 0, nowStr.length - 7); - t1 = options.get$color() ? buffer._contents = "" + "\x1b[90m" : ""; - t1 = buffer._contents = t1 + ("[" + timestamp + "] "); - if (options.get$color()) - t1 = buffer._contents = t1 + "\x1b[32m"; - t1 += "Compiled " + sourceName + " to " + destinationName + "."; - buffer._contents = t1; - if (options.get$color()) - buffer._contents = t1 + "\x1b[0m"; - t1 = A.isNodeJs() ? self.process : null; - if (t1 != null) { - t1 = J.get$stdout$x(t1); - J.write$1$x(t1, buffer.toString$0(0) + "\n"); - } else { - t1 = self.console; - J.log$1$x(t1, buffer); - } - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_compileStylesheetWithoutErrorHandling, $async$completer); - }, - _writeSourceMap(options, sourceMap, destination) { - var t1, sourceMapText, url, sourceMapPath, t2, escapedUrl; - if (sourceMap == null) - return ""; - if (destination != null) { - t1 = $.$get$context(); - sourceMap.targetUrl = t1.toUri$1(A.ParsedPath_ParsedPath$parse(destination, t1.style).get$basename()).toString$0(0); - } - A.mapInPlace(sourceMap.urls, new A._writeSourceMap_closure(options, destination)); - t1 = options._options; - sourceMapText = B.C_JsonCodec.encode$2$toEncodable(sourceMap.toJson$1$includeSourceContents(A._asBool(t1.$index(0, "embed-sources"))), null); - if (A._asBool(t1.$index(0, "embed-source-map"))) - url = A.Uri_Uri$dataFromString(sourceMapText, B.C_Utf8Codec, "application/json"); - else { - destination.toString; - sourceMapPath = destination + ".map"; - t2 = $.$get$context(); - A.ensureDir(t2.dirname$1(sourceMapPath)); - A.writeFile(sourceMapPath, sourceMapText); - url = t2.toUri$1(t2.relative$2$from(sourceMapPath, t2.dirname$1(destination))); - } - t2 = url.toString$0(0); - escapedUrl = A.stringReplaceAllUnchecked(t2, "*/", "%2A/"); - t1 = (J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0) === B.OutputStyle_1 ? "" : "\n\n"; - return t1 + ("/*# sourceMappingURL=" + escapedUrl + " */"); - }, - _tryDelete(path) { - var exception; - try { - A.deleteFile(path); - } catch (exception) { - if (!(A.unwrapException(exception) instanceof A.FileSystemException)) - throw exception; - } - }, - _getErrorWithStackTrace(exitCode, error, stackTrace) { - return new A._Record_3(exitCode, error, stackTrace != null ? B.JSString_methods.trimRight$0(A.Trace_Trace$from(stackTrace).get$terse().toString$0(0)) : null); - }, - _writeSourceMap_closure: function _writeSourceMap_closure(t0, t1) { - this.options = t0; - this.destination = t1; - }, - ExecutableOptions__separator(text) { - var t1 = $.$get$ExecutableOptions__separatorBar(), - t2 = B.JSString_methods.$mul(t1, 3), - t3 = A.hasTerminal() ? "\x1b[1m" : "", - t4 = A.hasTerminal() ? "\x1b[0m" : ""; - return t2 + " " + t3 + text + t4 + " " + B.JSString_methods.$mul(t1, 35 - text.length); - }, - ExecutableOptions__fail(message) { - return A.throwExpression(A.UsageException$(message)); - }, - ExecutableOptions_ExecutableOptions$parse(args) { - var options, error, t1, t2, exception; - try { - t1 = $.$get$ExecutableOptions__parser(); - t2 = A.ListQueue$(type$.String); - t2.addAll$1(0, args); - t2 = A.Parser$(null, t1, t2, null, null).parse$0(0); - if (t2.wasParsed$1("poll") && !A._asBool(t2.$index(0, "watch"))) - A.ExecutableOptions__fail("--poll may not be passed without --watch."); - options = new A.ExecutableOptions(t2); - if (A._asBool(options._options.$index(0, "help"))) - A.ExecutableOptions__fail("Compile Sass to CSS."); - return options; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.FormatException._is(t1)) { - error = t1; - A.ExecutableOptions__fail(J.get$message$x(error)); - } else - throw exception; - } - }, - UsageException$(message) { - return new A.UsageException(message); - }, - ExecutableOptions: function ExecutableOptions(t0) { - var _ = this; - _._options = t0; - _.__ExecutableOptions_interactive_FI = $; - _._sourcesToDestinations = null; - _.__ExecutableOptions__sourceDirectoriesToDestinations_F = $; - _._fatalDeprecations = null; - }, - ExecutableOptions__parser_closure: function ExecutableOptions__parser_closure() { - }, - ExecutableOptions_interactive_closure: function ExecutableOptions_interactive_closure(t0) { - this.$this = t0; - }, - ExecutableOptions_emitErrorCss_closure: function ExecutableOptions_emitErrorCss_closure() { - }, - ExecutableOptions_fatalDeprecations_closure: function ExecutableOptions_fatalDeprecations_closure(t0) { - this.$this = t0; - }, - UsageException: function UsageException(t0) { - this.message = t0; - }, - repl(options) { - return A.repl$body(options); - }, - repl$body(options) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$handler = 1, $async$currentError, $async$next = [], repl, trackingLogger, warn, evaluator, line, node, warnings, _1_0, node0, warnings0, _2_0, node1, warnings1, _3_0, error, stackTrace, logger, t4, t5, t6, t7, t8, t9, line0, toZone, exception, t1, t2, t3, repl0; - var $async$repl = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = A._setArrayType([], type$.JSArray_String); - t2 = B.JSString_methods.$mul(" ", 3); - t3 = $.$get$alwaysValid(); - repl0 = new A.Repl(">> ", t2, t3, t1); - repl0.__Repl__adapter_A = new A.ReplAdapter(repl0); - repl = repl0; - t1 = options._options; - trackingLogger = new A.TrackingLogger(A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color())); - logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(type$.Deprecation, type$.int), trackingLogger, options.get$silenceDeprecations(0), options.get$fatalDeprecations(0), options.get$futureDeprecations(0), !A._asBool(t1.$index(0, "verbose"))); - logger.validate$0(); - warn = new A.repl_warn(logger); - t2 = $.$get$FilesystemImporter_cwd(); - evaluator = new A.Evaluator(A._EvaluateVisitor$(null, A.ImportCache$(options.get$pkgImporters(), type$.List_String._as(t1.$index(0, "load-path"))), logger, null, false, false), t2); - t2 = repl.__Repl__adapter_A; - t2 === $ && A.throwUnnamedLateFieldNI(); - t2 = new A._StreamIterator(A.checkNotNullable(t2.runAsync$0(), "stream", type$.Object)); - $async$handler = 2; - t1 = type$.String, t3 = type$.FileSpan, t4 = type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span, t5 = type$.Expression; - case 5: - // for condition - $async$goto = 7; - return A._asyncAwait(t2.moveNext$0(), $async$repl); - case 7: - // returning from await. - if (!$async$result) { - // goto after for - $async$goto = 6; - break; - } - line = t2.get$current(0); - if (J.trim$0$s(line).length === 0) { - // goto for condition - $async$goto = 5; - break; - } - try { - if (J.startsWith$1$s(line, "@")) { - node = null; - warnings = null; - _1_0 = new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A._setArrayType([], t4), A.SpanScanner$(line, null), null).parseUseRule$0(); - node = _1_0._0; - warnings = _1_0._1; - J.forEach$1$ax(warnings, warn); - t6 = evaluator; - t7 = node; - t6._visitor.runStatement$2(t6._importer, t7); - // goto for condition - $async$goto = 5; - break; - } - if (new A.Parser(A.SpanScanner$(line, null), null)._isVariableDeclarationLike$0()) { - node0 = null; - warnings0 = null; - _2_0 = new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A._setArrayType([], t4), A.SpanScanner$(line, null), null).parseVariableDeclaration$0(); - node0 = _2_0._0; - warnings0 = _2_0._1; - J.forEach$1$ax(warnings0, warn); - t6 = evaluator; - t7 = node0; - t6._visitor.runStatement$2(t6._importer, t7); - t7 = evaluator; - t6 = node0.name; - t8 = node0.span; - t9 = node0.namespace; - line0 = t7._visitor.runExpression$2(t7._importer, new A.VariableExpression(t9, t6, t8)).toString$0(0); - toZone = $.printToZone; - if (toZone == null) - A.printString(line0); - else - toZone.call$1(line0); - } else { - node1 = null; - warnings1 = null; - t6 = A._setArrayType([], t4); - t7 = new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), t6, A.SpanScanner$(line, null), null); - _3_0 = new A._Record_2(t7._parseSingleProduction$1$1(t7.get$_expression(), t5), t6); - node1 = _3_0._0; - warnings1 = _3_0._1; - J.forEach$1$ax(warnings1, warn); - t6 = evaluator; - t7 = node1; - line0 = t6._visitor.runExpression$2(t6._importer, t7).toString$0(0); - toZone = $.printToZone; - if (toZone == null) - A.printString(line0); - else - toZone.call$1(line0); - } - } catch (exception) { - t6 = A.unwrapException(exception); - if (t6 instanceof A.SassException) { - error = t6; - stackTrace = A.getTraceFromException(exception); - t6 = error; - t7 = typeof t6 != "string"; - if (!t7 || typeof t6 == "number" || A._isBool(t6)) - t6 = null; - else { - t8 = $.$get$_traces(); - if (A._isBool(t6) || typeof t6 == "number" || !t7 || t6 instanceof A._Record) - A.Expando__badExpandoKey(t6); - t6 = t8._jsWeakMap.get(t6); - } - if (t6 == null) - t6 = stackTrace; - A._logError(error, t6, line, repl, options, trackingLogger); - } else - throw exception; - } - // goto for condition - $async$goto = 5; - break; - case 6: - // after for - $async$next.push(4); - // goto finally - $async$goto = 3; - break; - case 2: - // uncaught - $async$next = [1]; - case 3: - // finally - $async$handler = 1; - $async$goto = 8; - return A._asyncAwait(t2.cancel$0(), $async$repl); - case 8: - // returning from await. - // goto the next finally handler - $async$goto = $async$next.pop(); - break; - case 4: - // after finally - // implicit return - return A._asyncReturn(null, $async$completer); - case 1: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$repl, $async$completer); - }, - _logError(error, stackTrace, line, repl, options, logger) { - var t2, spacesBeforeError, t3, - t1 = A.SourceSpanException.prototype.get$span.call(error, 0); - if (t1.get$sourceUrl(t1) == null) - if (!A._asBool(options._options.$index(0, "quiet"))) - t1 = logger._emittedDebug || logger._emittedWarning; - else - t1 = false; - else - t1 = true; - if (t1) { - A.print(error.toString$1$color(0, options.get$color())); - return; - } - t1 = options.get$color() ? "" + "\x1b[31m" : ""; - t2 = A.SourceSpanException.prototype.get$span.call(error, 0); - t2 = t2.get$start(t2); - spacesBeforeError = repl.prompt.length + t2.file.getColumn$1(t2.offset); - if (options.get$color()) { - t2 = A.SourceSpanException.prototype.get$span.call(error, 0); - t2 = t2.get$start(t2); - t2 = t2.file.getColumn$1(t2.offset) < line.length; - } else - t2 = false; - if (t2) - t1 = t1 + ("\x1b[1F\x1b[" + spacesBeforeError + "C") + (A.SourceSpanException.prototype.get$span.call(error, 0).get$text() + "\n"); - t2 = B.JSString_methods.$mul(" ", spacesBeforeError); - t3 = A.SourceSpanException.prototype.get$span.call(error, 0); - t3 = t1 + t2 + (B.JSString_methods.$mul("^", Math.max(1, t3.get$length(t3))) + "\n"); - t1 = options.get$color() ? t3 + "\x1b[0m" : t3; - t1 += "Error: " + error._span_exception$_message + "\n"; - if (A._asBool(options._options.$index(0, "trace"))) - t1 += A.Trace_Trace$from(stackTrace).get$terse().toString$0(0); - A.print(B.JSString_methods.trimRight$0(t1.charCodeAt(0) == 0 ? t1 : t1)); - }, - repl_warn: function repl_warn(t0) { - this.logger = t0; - }, - watch(options, graph) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$returnValue, t1, t2, t3, t4, t5, t6, dirWatcher, sourcesToDestinations, t0; - var $async$watch = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - options._ensureSources$0(); - t1 = options.__ExecutableOptions__sourceDirectoriesToDestinations_F; - t1 === $ && A.throwUnnamedLateFieldNI(); - t2 = type$.String; - t1 = t1.cast$2$0(0, t2, t2); - t1 = A.List_List$of(t1.get$keys(t1), true, t2); - for (options._ensureSources$0(), t3 = options._sourcesToDestinations.cast$2$0(0, t2, t2), t3 = J.get$iterator$ax(t3.get$keys(t3)); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t1.push($.$get$context().dirname$1(t4)); - } - t3 = options._options; - B.JSArray_methods.addAll$1(t1, type$.List_String._as(t3.$index(0, "load-path"))); - t4 = A._asBool(t3.$index(0, "poll")); - t5 = type$.Stream_WatchEvent; - t6 = A.PathMap__create(null, t5); - t5 = new A.StreamGroup(B._StreamGroupState_dormant, A.LinkedHashMap_LinkedHashMap$_empty(t5, type$.nullable_StreamSubscription_WatchEvent), type$.StreamGroup_WatchEvent); - t5.__StreamGroup__controller_A = A.StreamController_StreamController(t5.get$_onCancel(), t5.get$_onListen(), t5.get$_onPause(), t5.get$_onResume(), true, type$.WatchEvent); - dirWatcher = new A.MultiDirWatcher(new A.PathMap(t6, type$.PathMap_Stream_WatchEvent), t5, t4); - $async$goto = 3; - return A._asyncAwait(A.Future_wait(new A.MappedListIterable(t1, new A.watch_closure(dirWatcher), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Future<~>>")), false, type$.void), $async$watch); - case 3: - // returning from await. - options._ensureSources$0(); - sourcesToDestinations = options._sourcesToDestinations.cast$2$0(0, t2, t2); - for (t1 = J.get$iterator$ax(sourcesToDestinations.get$keys(sourcesToDestinations)); t1.moveNext$0();) { - t2 = t1.get$current(t1); - t4 = $.$get$FilesystemImporter_cwd(); - t5 = self.process; - if (t5 == null) - t5 = null; - else { - t5 = J.get$release$x(t5); - t5 = t5 == null ? null : J.get$name$x(t5); - } - t5 = J.$eq$(t5, "node") ? self.process : null; - if (!J.$eq$(t5 == null ? null : J.get$platform$x(t5), "win32")) { - t5 = self.process; - if (t5 == null) - t5 = null; - else { - t5 = J.get$release$x(t5); - t5 = t5 == null ? null : J.get$name$x(t5); - } - t5 = J.$eq$(t5, "node") ? self.process : null; - t5 = J.$eq$(t5 == null ? null : J.get$platform$x(t5), "darwin"); - } else - t5 = true; - if (t5) { - t5 = $.$get$context(); - t6 = A._realCasePath(t5.absolute$15(t5.normalize$1(t2), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); - t0 = t6; - t6 = t5; - t5 = t0; - } else { - t5 = $.$get$context(); - t6 = t5.canonicalize$1(0, t2); - t0 = t6; - t6 = t5; - t5 = t0; - } - graph.addCanonical$4$recanonicalize(t4, t6.toUri$1(t5), t6.toUri$1(t2), false); - } - $async$goto = 4; - return A._asyncAwait(A.compileStylesheets(options, graph, sourcesToDestinations, true), $async$watch); - case 4: - // returning from await. - if (!$async$result && A._asBool(t3.$index(0, "stop-on-error"))) { - t1 = dirWatcher._group.__StreamGroup__controller_A; - t1 === $ && A.throwUnnamedLateFieldNI(); - new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$1(0, null).cancel$0(); - // goto return - $async$goto = 1; - break; - } - A.print("Sass is watching for changes. Press Ctrl-C to stop.\n"); - $async$goto = 5; - return A._asyncAwait(new A._Watcher(options, graph).watch$1(0, dirWatcher), $async$watch); - case 5: - // returning from await. - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$watch, $async$completer); - }, - watch_closure: function watch_closure(t0) { - this.dirWatcher = t0; - }, - _Watcher: function _Watcher(t0, t1) { - this._watch$_options = t0; - this._graph = t1; - }, - _Watcher__debounceEvents_closure: function _Watcher__debounceEvents_closure() { - }, - EmptyExtensionStore: function EmptyExtensionStore() { - }, - Extension: function Extension(t0, t1, t2, t3, t4) { - var _ = this; - _.extender = t0; - _.target = t1; - _.mediaContext = t2; - _.isOptional = t3; - _.span = t4; - }, - Extender: function Extender(t0, t1) { - this.selector = t0; - this.isOriginal = t1; - this._extension = null; - }, - ExtensionStore__extendOrReplace(selector, source, targets, mode, span) { - var t1, t2, t3, t4, t5, t6, t7, t8, _i, complex, compound, t9, t10, t11, _i0, simple, t12, _i1, t13, t14, - extender = A.ExtensionStore$_mode(mode); - if (!selector.accept$1(B._IsInvisibleVisitor_true)) - extender._originals.addAll$1(0, selector.components); - for (t1 = targets.components, t2 = t1.length, t3 = source.components, t4 = t3.length, t5 = type$.ComplexSelector, t6 = type$.Extension, t7 = type$.SimpleSelector, t8 = type$.Map_ComplexSelector_Extension, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - compound = complex.get$singleCompound(); - if (compound == null) - throw A.wrapException(A.SassScriptException$("Can't extend complex selector " + A.S(complex) + ".", null)); - t9 = A.LinkedHashMap_LinkedHashMap$_empty(t7, t8); - for (t10 = compound.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) { - simple = t10[_i0]; - t12 = A.LinkedHashMap_LinkedHashMap$_empty(t5, t6); - for (_i1 = 0; _i1 < t4; ++_i1) { - complex = t3[_i1]; - complex.get$specificity(); - t13 = new A.Extender(complex, false); - t14 = new A.Extension(t13, simple, null, true, span); - t13._extension = t14; - t12.$indexSet(0, complex, t14); - } - t9.$indexSet(0, simple, t12); - } - selector = extender._extendList$2(selector, t9); - } - return selector; - }, - ExtensionStore$() { - var t1 = type$.SimpleSelector; - return new A.ExtensionStore(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList, type$.List_CssMediaQuery), new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector), B.ExtendMode_normal_normal); - }, - ExtensionStore$_mode(_mode) { - var t1 = type$.SimpleSelector; - return new A.ExtensionStore(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList, type$.List_CssMediaQuery), new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector), _mode); - }, - ExtensionStore: function ExtensionStore(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _._selectors = t0; - _._extensions = t1; - _._extensionsByExtender = t2; - _._mediaContexts = t3; - _._sourceSpecificity = t4; - _._originals = t5; - _._mode = t6; - }, - ExtensionStore_extensionsWhereTarget_closure: function ExtensionStore_extensionsWhereTarget_closure() { - }, - ExtensionStore__registerSelector_closure: function ExtensionStore__registerSelector_closure() { - }, - ExtensionStore_addExtension_closure: function ExtensionStore_addExtension_closure() { - }, - ExtensionStore_addExtension_closure0: function ExtensionStore_addExtension_closure0() { - }, - ExtensionStore_addExtension_closure1: function ExtensionStore_addExtension_closure1(t0) { - this.complex = t0; - }, - ExtensionStore__extendExistingExtensions_closure: function ExtensionStore__extendExistingExtensions_closure() { - }, - ExtensionStore__extendExistingExtensions_closure0: function ExtensionStore__extendExistingExtensions_closure0() { - }, - ExtensionStore_addExtensions_closure: function ExtensionStore_addExtensions_closure() { - }, - ExtensionStore__extendComplex_closure: function ExtensionStore__extendComplex_closure(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.complex = t2; - }, - ExtensionStore__extendComplex__closure: function ExtensionStore__extendComplex__closure(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.complex = t2; - }, - ExtensionStore__extendCompound_closure: function ExtensionStore__extendCompound_closure() { - }, - ExtensionStore__extendCompound_closure0: function ExtensionStore__extendCompound_closure0() { - }, - ExtensionStore__extendCompound_closure1: function ExtensionStore__extendCompound_closure1(t0) { - this.original = t0; - }, - ExtensionStore__extendSimple_withoutPseudo: function ExtensionStore__extendSimple_withoutPseudo(t0, t1, t2) { - this.$this = t0; - this.extensions = t1; - this.targetsUsed = t2; - }, - ExtensionStore__extendSimple_closure: function ExtensionStore__extendSimple_closure(t0, t1) { - this.$this = t0; - this.withoutPseudo = t1; - }, - ExtensionStore__extendSimple_closure0: function ExtensionStore__extendSimple_closure0() { - }, - ExtensionStore__extendPseudo_closure: function ExtensionStore__extendPseudo_closure() { - }, - ExtensionStore__extendPseudo_closure0: function ExtensionStore__extendPseudo_closure0() { - }, - ExtensionStore__extendPseudo_closure1: function ExtensionStore__extendPseudo_closure1() { - }, - ExtensionStore__extendPseudo_closure2: function ExtensionStore__extendPseudo_closure2(t0) { - this.pseudo = t0; - }, - ExtensionStore__extendPseudo_closure3: function ExtensionStore__extendPseudo_closure3(t0, t1) { - this.pseudo = t0; - this.selector = t1; - }, - ExtensionStore__trim_closure: function ExtensionStore__trim_closure(t0, t1) { - this._box_0 = t0; - this.complex1 = t1; - }, - ExtensionStore__trim_closure0: function ExtensionStore__trim_closure0(t0, t1) { - this._box_0 = t0; - this.complex1 = t1; - }, - ExtensionStore_clone_closure: function ExtensionStore_clone_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.newSelectors = t1; - _.oldToNewSelectors = t2; - _.newMediaContexts = t3; - }, - unifyComplex(complexes, span) { - var t2, trailingCombinator, leadingCombinator, unifiedBase, t3, t4, _0_6_isSet, _0_6, t5, newLeadingCombinator, base, _1_1, newTrailingCombinator, unifiedBase0, t6, t7, t8, _null = null, - t1 = J.getInterceptor$asx(complexes); - if (t1.get$length(complexes) === 1) - return complexes; - for (t2 = t1.get$iterator(complexes), trailingCombinator = _null, leadingCombinator = trailingCombinator, unifiedBase = leadingCombinator; t2.moveNext$0();) { - t3 = t2.get$current(t2); - if (t3.accept$1(B.C__IsUselessVisitor)) - return _null; - t4 = t3.components; - _0_6_isSet = t4.length === 1; - if (_0_6_isSet) { - _0_6 = t3.leadingCombinators; - t5 = _0_6.length === 1; - } else { - _0_6 = _null; - t5 = false; - } - if (t5) { - newLeadingCombinator = (_0_6_isSet ? _0_6 : t3.leadingCombinators)[0]; - if (leadingCombinator == null) - leadingCombinator = newLeadingCombinator; - else if (!(leadingCombinator.$ti._is(newLeadingCombinator) && J.$eq$(newLeadingCombinator.value, leadingCombinator.value))) - return _null; - } - base = B.JSArray_methods.get$last(t4); - _1_1 = base.combinators; - if (_1_1.length === 1) { - newTrailingCombinator = _1_1[0]; - if (trailingCombinator != null) - t3 = !(trailingCombinator.$ti._is(newTrailingCombinator) && J.$eq$(newTrailingCombinator.value, trailingCombinator.value)); - else - t3 = false; - if (t3) - return _null; - trailingCombinator = newTrailingCombinator; - } - unifiedBase0 = base.selector; - if (unifiedBase == null) - unifiedBase = unifiedBase0; - else { - unifiedBase = A.unifyCompound(unifiedBase, unifiedBase0); - if (unifiedBase == null) - return _null; - } - } - t2 = type$.JSArray_ComplexSelector; - t3 = A._setArrayType([], t2); - for (t4 = t1.get$iterator(complexes); t4.moveNext$0();) { - t5 = t4.get$current(t4); - t6 = t5.components; - t7 = t6.length; - if (t7 > 1) { - t8 = t5.leadingCombinators; - t3.push(A.ComplexSelector$(t8, B.JSArray_methods.take$1(t6, t7 - 1), t5.span, t5.lineBreak)); - } - } - t4 = leadingCombinator == null ? B.List_empty0 : A._setArrayType([leadingCombinator], type$.JSArray_CssValue_Combinator); - unifiedBase.toString; - t5 = trailingCombinator == null ? B.List_empty0 : A._setArrayType([trailingCombinator], type$.JSArray_CssValue_Combinator); - base = A.ComplexSelector$(t4, A._setArrayType([new A.ComplexSelectorComponent(unifiedBase, A.List_List$unmodifiable(t5, type$.CssValue_Combinator), span)], type$.JSArray_ComplexSelectorComponent), span, t1.any$1(complexes, new A.unifyComplex_closure())); - if (t3.length === 0) - t1 = A._setArrayType([base], t2); - else { - t1 = A.List_List$of(A.IterableExtension_get_exceptLast(t3), true, type$.ComplexSelector); - t1.push(B.JSArray_methods.get$last(t3).concatenate$2(base, span)); - } - return A.weave(t1, span, false); - }, - unifyCompound(compound1, compound2) { - var t1, t2, pseudoElementFound, _i, simple, unified, - result = compound1.components, - pseudoResult = A._setArrayType([], type$.JSArray_SimpleSelector); - for (t1 = compound2.components, t2 = t1.length, pseudoElementFound = false, _i = 0; _i < t2; ++_i) { - simple = t1[_i]; - if (pseudoElementFound && simple instanceof A.PseudoSelector) { - unified = simple.unify$1(pseudoResult); - if (unified == null) - return null; - pseudoResult = unified; - } else { - pseudoElementFound = B.JSBool_methods.$or(pseudoElementFound, simple instanceof A.PseudoSelector && !simple.isClass); - unified = simple.unify$1(result); - if (unified == null) - return null; - result = unified; - } - } - t1 = A.List_List$of(result, true, type$.SimpleSelector); - B.JSArray_methods.addAll$1(t1, pseudoResult); - return A.CompoundSelector$(t1, compound1.span); - }, - unifyUniversalAndElement(selector1, selector2) { - var namespace, $name, t1, - _0_0 = A._namespaceAndName(selector1, "selector1"), - namespace1 = _0_0._0, - name1 = _0_0._1, - _1_0 = A._namespaceAndName(selector2, "selector2"), - namespace2 = _1_0._0, - name2 = _1_0._1; - if (namespace1 == namespace2 || namespace2 === "*") - namespace = namespace1; - else { - if (namespace1 !== "*") - return null; - namespace = namespace2; - } - if (name1 == name2 || name2 == null) - $name = name1; - else { - if (!(name1 == null || name1 === "*")) - return null; - $name = name2; - } - t1 = selector1.span; - return $name == null ? new A.UniversalSelector(namespace, t1) : new A.TypeSelector(new A.QualifiedName($name, namespace), t1); - }, - _namespaceAndName(selector, $name) { - var t1, _0_4; - $label0$0: { - if (selector instanceof A.UniversalSelector) { - t1 = new A._Record_2(selector.namespace, null); - break $label0$0; - } - if (selector instanceof A.TypeSelector) { - _0_4 = selector.name; - t1 = new A._Record_2(_0_4.namespace, _0_4.name); - break $label0$0; - } - t1 = A.throwExpression(A.ArgumentError$value(selector, $name, string$.must_b)); - } - return t1; - }, - weave(complexes, span, forceLineBreak) { - var complex, t2, prefixes, t3, t4, t5, t6, i, t7, t8, _i, t9, t10, _i0, parentPrefix, t11, t12, - t1 = J.getInterceptor$asx(complexes); - if (t1.get$length(complexes) === 1) { - complex = t1.$index(complexes, 0); - if (!forceLineBreak || complex.lineBreak) - return complexes; - return A._setArrayType([A.ComplexSelector$(complex.leadingCombinators, complex.components, complex.span, true)], type$.JSArray_ComplexSelector); - } - t2 = type$.JSArray_ComplexSelector; - prefixes = A._setArrayType([t1.get$first(complexes)], t2); - for (t1 = t1.skip$1(complexes, 1), t3 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t3._eval$1("ListIterator")), t4 = type$.ComplexSelectorComponent, t3 = t3._eval$1("ListIterable.E"); t1.moveNext$0();) { - t5 = t1.__internal$_current; - if (t5 == null) - t5 = t3._as(t5); - t6 = t5.components; - if (t6.length === 1) { - for (i = 0; i < prefixes.length; ++i) - prefixes[i] = prefixes[i].concatenate$3$forceLineBreak(t5, span, forceLineBreak); - continue; - } - t7 = A._setArrayType([], t2); - for (t8 = prefixes.length, _i = 0; _i < prefixes.length; prefixes.length === t8 || (0, A.throwConcurrentModificationError)(prefixes), ++_i) { - t9 = A._weaveParents(prefixes[_i], t5, span); - if (t9 == null) - t9 = B.List_empty1; - t10 = t9.length; - _i0 = 0; - for (; _i0 < t9.length; t9.length === t10 || (0, A.throwConcurrentModificationError)(t9), ++_i0) { - parentPrefix = t9[_i0]; - t11 = B.JSArray_methods.get$last(t6); - t12 = A.List_List$of(parentPrefix.components, true, t4); - t12.push(t11); - t11 = parentPrefix.lineBreak || forceLineBreak; - t7.push(A.ComplexSelector$(parentPrefix.leadingCombinators, t12, span, t11)); - } - } - prefixes = t7; - } - return prefixes; - }, - _weaveParents(prefix, base, span) { - var t1, queue1, queue2, trailingCombinators, _0_1, _0_3, _0_3_isSet, _0_30, rootish2, t2, rootish1, rootish, t3, rootish_case_0, t0, rootish_case_1, groups1, groups2, lcs, choices, t4, _i, group, t5, t6, t7, _i0, chunk, t8, t9, _null = null, - leadingCombinators = A._mergeLeadingCombinators(prefix.leadingCombinators, base.leadingCombinators); - if (leadingCombinators == null) - return _null; - t1 = type$.ComplexSelectorComponent; - queue1 = A.QueueList_QueueList$from(prefix.components, t1); - queue2 = A.QueueList_QueueList$from(A.IterableExtension_get_exceptLast(base.components), t1); - trailingCombinators = A._mergeTrailingCombinators(queue1, queue2, span, _null); - if (trailingCombinators == null) - return _null; - $label0$0: { - _0_1 = A._firstIfRootish(queue1); - _0_3 = A._firstIfRootish(queue2); - _0_3_isSet = _0_1 != null; - _0_30 = _null; - rootish2 = _null; - t2 = false; - if (_0_3_isSet) { - rootish1 = _0_1 == null ? t1._as(_0_1) : _0_1; - t2 = _0_3 != null; - if (t2) - rootish2 = _0_3 == null ? t1._as(_0_3) : _0_3; - _0_30 = _0_3; - } else - rootish1 = _null; - if (t2) { - rootish = A.unifyCompound(rootish1.selector, rootish2.selector); - if (rootish == null) - return _null; - t1 = rootish1.combinators; - t2 = rootish1.span; - t3 = type$.CssValue_Combinator; - queue1.addFirst$1(new A.ComplexSelectorComponent(rootish, A.List_List$unmodifiable(t1, t3), t2)); - queue2.addFirst$1(new A.ComplexSelectorComponent(rootish, A.List_List$unmodifiable(rootish2.combinators, t3), t2)); - break $label0$0; - } - t2 = _null; - t3 = false; - if (_0_1 != null) { - rootish_case_0 = _0_1; - if (_0_3_isSet) - t2 = _0_30; - else { - t2 = _0_3; - _0_30 = t2; - _0_3_isSet = true; - } - t2 = t2 == null; - t3 = t2 ? rootish_case_0 : _null; - t0 = t3; - t3 = t2; - t2 = t0; - } - if (!t3) - if (_0_1 == null) { - if (_0_3_isSet) - t3 = _0_30; - else { - t3 = _0_3; - _0_30 = t3; - _0_3_isSet = true; - } - t3 = t3 != null; - if (t3) { - rootish_case_1 = _0_3_isSet ? _0_30 : _0_3; - if (rootish_case_1 == null) - rootish_case_1 = t1._as(rootish_case_1); - t1 = rootish_case_1; - } else - t1 = t2; - t2 = t3; - } else { - t1 = t2; - t2 = false; - } - else { - t1 = t2; - t2 = true; - } - if (t2) { - queue1.addFirst$1(t1); - queue2.addFirst$1(t1); - } - } - groups1 = A._groupSelectors(queue1); - groups2 = A._groupSelectors(queue2); - t1 = type$.List_ComplexSelectorComponent; - lcs = A.longestCommonSubsequence(groups2, groups1, new A._weaveParents_closure(span), t1); - choices = A._setArrayType([], type$.JSArray_List_Iterable_ComplexSelectorComponent); - for (t2 = lcs.length, t3 = type$.JSArray_Iterable_ComplexSelectorComponent, t4 = type$.JSArray_ComplexSelectorComponent, _i = 0; _i < lcs.length; lcs.length === t2 || (0, A.throwConcurrentModificationError)(lcs), ++_i) { - group = lcs[_i]; - t5 = A._setArrayType([], t3); - for (t6 = A._chunks(groups1, groups2, new A._weaveParents_closure0(group), t1), t7 = t6.length, _i0 = 0; _i0 < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i0) { - chunk = t6[_i0]; - t8 = A._setArrayType([], t4); - for (t9 = B.JSArray_methods.get$iterator(chunk); t9.moveNext$0();) - B.JSArray_methods.addAll$1(t8, t9.get$current(0)); - t5.push(t8); - } - choices.push(t5); - choices.push(A._setArrayType([group], t3)); - groups1.removeFirst$0(); - groups2.removeFirst$0(); - } - t2 = A._setArrayType([], t3); - for (t1 = A._chunks(groups1, groups2, new A._weaveParents_closure1(), t1), t3 = t1.length, _i = 0; _i < t1.length; t1.length === t3 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - chunk = t1[_i]; - t5 = A._setArrayType([], t4); - for (t6 = B.JSArray_methods.get$iterator(chunk); t6.moveNext$0();) - B.JSArray_methods.addAll$1(t5, t6.get$current(0)); - t2.push(t5); - } - choices.push(t2); - B.JSArray_methods.addAll$1(choices, trailingCombinators); - t1 = A._setArrayType([], type$.JSArray_ComplexSelector); - for (t2 = J.get$iterator$ax(A.paths(new A.WhereIterable(choices, new A._weaveParents_closure2(), type$.WhereIterable_List_Iterable_ComplexSelectorComponent), type$.Iterable_ComplexSelectorComponent)), t3 = !prefix.lineBreak, t5 = base.lineBreak; t2.moveNext$0();) { - t6 = t2.get$current(t2); - t7 = A._setArrayType([], t4); - for (t6 = J.get$iterator$ax(t6); t6.moveNext$0();) - B.JSArray_methods.addAll$1(t7, t6.get$current(t6)); - t1.push(A.ComplexSelector$(leadingCombinators, t7, span, !t3 || t5)); - } - return t1; - }, - _firstIfRootish(queue) { - var first, t1, t2, _i, simple, t3; - if (queue.get$length(0) >= 1) { - first = queue.$index(0, 0); - for (t1 = first.selector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { - simple = t1[_i]; - t3 = false; - if (simple instanceof A.PseudoSelector) - if (simple.isClass) - t3 = $._rootishPseudoClasses.contains$1(0, simple.normalizedName); - if (t3) { - queue.removeFirst$0(); - return first; - } - } - } - return null; - }, - _mergeLeadingCombinators(combinators1, combinators2) { - var _0_4, t1, t2, _0_7_isSet, _0_7, t3, _0_4_isSet, _0_11, _0_11_isSet, combinators, _null = null; - $label0$0: { - _0_4 = combinators2; - t1 = _null; - t2 = type$.List_CssValue_Combinator; - _0_7_isSet = t2._is(combinators1); - _0_7 = _null; - if (_0_7_isSet) { - _0_7 = combinators1.length; - t3 = _0_7; - t3 = t3 > 1; - } else - t3 = false; - _0_4_isSet = true; - _0_11 = _null; - if (!t3) { - t3 = _0_4; - _0_11_isSet = t2._is(t3); - if (_0_11_isSet) { - t3 = _0_4; - _0_11 = (t3 == null ? t2._as(t3) : t3).length; - t3 = _0_11; - t3 = t3 > 1; - } else - t3 = false; - } else { - _0_11_isSet = false; - t3 = true; - } - if (t3) - break $label0$0; - if (t2._is(combinators1)) { - if (_0_7_isSet) - t3 = _0_7; - else { - _0_7 = combinators1.length; - t3 = _0_7; - } - t3 = t3 <= 0; - if (t3) - if (_0_4_isSet) - combinators = _0_4; - else { - combinators = combinators2; - _0_4 = combinators; - _0_4_isSet = true; - } - else - combinators = t1; - t1 = t3; - } else { - combinators = t1; - t1 = false; - } - if (!t1) { - t1 = false; - if (_0_4_isSet) - t3 = _0_4; - else { - t3 = combinators2; - _0_4 = t3; - _0_4_isSet = true; - } - if (t2._is(t3)) { - if (_0_11_isSet) - t1 = _0_11; - else { - t1 = _0_4_isSet ? _0_4 : combinators2; - _0_11 = (t1 == null ? t2._as(t1) : t1).length; - t1 = _0_11; - } - t1 = t1 <= 0; - } - combinators = combinators1; - } else - t1 = true; - if (t1) { - t1 = combinators; - break $label0$0; - } - t1 = B.C_ListEquality.equals$2(0, combinators1, combinators2) ? combinators1 : _null; - break $label0$0; - } - return t1; - }, - _mergeTrailingCombinators(components1, components2, span, result) { - var _0_1, t1, _1_1, t2, t3, _4_1, _4_3, _4_4_isSet, _4_5, _4_4, component1, component2, t4, t5, choices, _2_0, _4_9, _4_6, _4_7, followingComponents, nextComponents, _4_4_isSet0, _4_6_isSet, _4_7_isSet, _4_10_isSet, _4_10, _4_5_isSet, next, following, _3_0, siblingComponents_case_0, siblingComponents_case_1, combinator1, t6, combinator2, unified, t7, combinator_case_0, combinatorComponents_case_0, descendantComponents_case_0, t0, combinator_case_1, descendantComponents_case_1, combinatorComponents_case_1, _null = null; - if (result == null) - result = A.QueueList$(_null, type$.List_List_ComplexSelectorComponent); - $label0$0: { - _0_1 = components1.get$length(0); - if (_0_1 >= 1) { - t1 = components1.$index(0, _0_1 - 1).combinators; - break $label0$0; - } - t1 = B.List_empty0; - break $label0$0; - } - $label1$1: { - _1_1 = components2.get$length(0); - if (_1_1 >= 1) { - t2 = components2.$index(0, _1_1 - 1).combinators; - break $label1$1; - } - t2 = B.List_empty0; - break $label1$1; - } - t3 = t1.length; - if (t3 === 0 && t2.length === 0) - return result; - if (t3 > 1 || t2.length > 1) - return _null; - $label2$2: { - t3 = A.IterableExtension_get_firstOrNull(t1); - t3 = t3 == null ? _null : t3.value; - t2 = A.IterableExtension_get_firstOrNull(t2); - t2 = [t3, t2 == null ? _null : t2.value, components1, components2]; - _4_1 = t2[0]; - _4_3 = B.Combinator_y18 === _4_1; - _4_4_isSet = _4_3; - _4_5 = _null; - _4_4 = _null; - if (_4_4_isSet) { - _4_4 = t2[1]; - _4_5 = B.Combinator_y18 === _4_4; - t3 = _4_5; - } else - t3 = false; - if (t3) { - component1 = components1.removeLast$0(0); - component2 = components2.removeLast$0(0); - t2 = component1.selector; - t3 = component2.selector; - if (A.compoundIsSuperselector(t2, t3, _null)) - result.addFirst$1(A._setArrayType([A._setArrayType([component2], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); - else { - t4 = type$.JSArray_ComplexSelectorComponent; - t5 = type$.JSArray_List_ComplexSelectorComponent; - if (A.compoundIsSuperselector(t3, t2, _null)) - result.addFirst$1(A._setArrayType([A._setArrayType([component1], t4)], t5)); - else { - choices = A._setArrayType([A._setArrayType([component1, component2], t4), A._setArrayType([component2, component1], t4)], t5); - _2_0 = A.unifyCompound(t2, t3); - if (_2_0 != null) - choices.push(A._setArrayType([new A.ComplexSelectorComponent(_2_0, A.List_List$unmodifiable(A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_CssValue_Combinator), type$.CssValue_Combinator), span)], t4)); - result.addFirst$1(choices); - } - } - break $label2$2; - } - _4_9 = _null; - _4_6 = _null; - _4_7 = _null; - followingComponents = _null; - nextComponents = _null; - if (_4_3) { - if (_4_4_isSet) { - t3 = _4_4; - _4_4_isSet0 = _4_4_isSet; - } else { - _4_4 = t2[1]; - t3 = _4_4; - _4_4_isSet0 = true; - } - _4_9 = B.Combinator_gRV === t3; - _4_6_isSet = _4_9; - if (_4_6_isSet) { - _4_6 = t2[2]; - _4_7 = t2[3]; - nextComponents = _4_7; - followingComponents = _4_6; - } - t3 = _4_6_isSet; - _4_7_isSet = t3; - } else { - _4_4_isSet0 = _4_4_isSet; - _4_6_isSet = false; - _4_7_isSet = false; - t3 = false; - } - _4_10_isSet = !t3; - _4_10 = _null; - if (_4_10_isSet) { - _4_10 = B.Combinator_gRV === _4_1; - t3 = _4_10; - if (t3) { - if (_4_4_isSet) { - t3 = _4_5; - _4_5_isSet = _4_4_isSet; - _4_4_isSet = _4_4_isSet0; - } else { - if (_4_4_isSet0) { - t3 = _4_4; - _4_4_isSet = _4_4_isSet0; - } else { - _4_4 = t2[1]; - t3 = _4_4; - _4_4_isSet = true; - } - _4_5 = B.Combinator_y18 === t3; - t3 = _4_5; - _4_5_isSet = true; - } - if (t3) { - if (_4_6_isSet) - nextComponents = _4_6; - else { - _4_6 = t2[2]; - nextComponents = _4_6; - _4_6_isSet = true; - } - if (_4_7_isSet) - followingComponents = _4_7; - else { - _4_7 = t2[3]; - followingComponents = _4_7; - _4_7_isSet = true; - } - } - } else { - _4_5_isSet = _4_4_isSet; - _4_4_isSet = _4_4_isSet0; - t3 = false; - } - } else { - _4_5_isSet = _4_4_isSet; - _4_4_isSet = _4_4_isSet0; - t3 = true; - } - if (t3) { - next = nextComponents.removeLast$0(0); - following = followingComponents.removeLast$0(0); - t1 = following.selector; - t2 = next.selector; - t3 = type$.JSArray_ComplexSelectorComponent; - t4 = type$.JSArray_List_ComplexSelectorComponent; - if (A.compoundIsSuperselector(t1, t2, _null)) - result.addFirst$1(A._setArrayType([A._setArrayType([next], t3)], t4)); - else { - t4 = A._setArrayType([A._setArrayType([following, next], t3)], t4); - _3_0 = A.unifyCompound(t1, t2); - if (_3_0 != null) - t4.push(A._setArrayType([new A.ComplexSelectorComponent(_3_0, A.List_List$unmodifiable(next.combinators, type$.CssValue_Combinator), span)], t3)); - result.addFirst$1(t4); - } - break $label2$2; - } - t3 = _null; - if (B.Combinator_8I8 === _4_1) { - _4_4_isSet0 = true; - if (_4_3) - t4 = _4_9; - else { - if (_4_4_isSet) - t4 = _4_4; - else { - _4_4 = t2[1]; - t4 = _4_4; - _4_4_isSet = _4_4_isSet0; - } - _4_9 = B.Combinator_gRV === t4; - t4 = _4_9; - } - if (!t4) - if (_4_5_isSet) - t4 = _4_5; - else { - if (_4_4_isSet) - t4 = _4_4; - else { - _4_4 = t2[1]; - t4 = _4_4; - _4_4_isSet = _4_4_isSet0; - } - _4_5 = B.Combinator_y18 === t4; - t4 = _4_5; - } - else - t4 = true; - if (t4) { - if (_4_7_isSet) - siblingComponents_case_0 = _4_7; - else { - _4_7 = t2[3]; - siblingComponents_case_0 = _4_7; - _4_7_isSet = true; - } - t3 = siblingComponents_case_0; - } - } else - t4 = false; - if (!t4) { - if (_4_10_isSet) - t4 = _4_10; - else { - _4_10 = B.Combinator_gRV === _4_1; - t4 = _4_10; - } - if (!t4) - t4 = _4_3; - else - t4 = true; - if (t4) { - if (_4_4_isSet) - t4 = _4_4; - else { - _4_4 = t2[1]; - t4 = _4_4; - _4_4_isSet = true; - } - t4 = B.Combinator_8I8 === t4; - if (t4) { - if (_4_6_isSet) - siblingComponents_case_1 = _4_6; - else { - _4_6 = t2[2]; - siblingComponents_case_1 = _4_6; - _4_6_isSet = true; - } - t3 = siblingComponents_case_1; - } - } else - t4 = false; - } else - t4 = true; - if (t4) { - result.addFirst$1(A._setArrayType([A._setArrayType([t3.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); - break $label2$2; - } - t3 = _4_1 == null; - t4 = !t3; - t5 = false; - if (t4) { - _4_4_isSet0 = true; - combinator1 = _4_1; - if (_4_4_isSet) - t6 = _4_4; - else { - _4_4 = t2[1]; - t6 = _4_4; - _4_4_isSet = _4_4_isSet0; - } - if (t6 != null) { - if (_4_4_isSet) - combinator2 = _4_4; - else { - _4_4 = t2[1]; - combinator2 = _4_4; - _4_4_isSet = _4_4_isSet0; - } - t5 = combinator1 === (combinator2 == null ? type$.Combinator._as(combinator2) : combinator2); - } - } - if (t5) { - unified = A.unifyCompound(components1.removeLast$0(0).selector, components2.removeLast$0(0).selector); - if (unified == null) - return _null; - result.addFirst$1(A._setArrayType([A._setArrayType([new A.ComplexSelectorComponent(unified, A.List_List$unmodifiable(A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_CssValue_Combinator), type$.CssValue_Combinator), span)], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); - break $label2$2; - } - t1 = _null; - t5 = _null; - t6 = _null; - t7 = false; - if (t4) { - combinator_case_0 = _4_1; - if (_4_4_isSet) - t4 = _4_4; - else { - _4_4 = t2[1]; - t4 = _4_4; - _4_4_isSet = true; - } - t4 = t4 == null; - if (t4) { - if (_4_6_isSet) - combinatorComponents_case_0 = _4_6; - else { - _4_6 = t2[2]; - combinatorComponents_case_0 = _4_6; - _4_6_isSet = true; - } - if (_4_7_isSet) - descendantComponents_case_0 = _4_7; - else { - _4_7 = t2[3]; - descendantComponents_case_0 = _4_7; - _4_7_isSet = true; - } - t1 = descendantComponents_case_0; - t6 = t1; - t1 = combinator_case_0; - t5 = combinatorComponents_case_0; - } - t0 = t6; - t6 = t4; - t4 = t5; - t5 = t0; - } else { - t4 = t5; - t5 = t6; - t6 = t7; - } - if (!t6) - if (t3) { - if (_4_4_isSet) - t3 = _4_4; - else { - _4_4 = t2[1]; - t3 = _4_4; - _4_4_isSet = true; - } - t3 = t3 != null; - if (t3) { - combinator_case_1 = _4_4_isSet ? _4_4 : t2[1]; - if (combinator_case_1 == null) - combinator_case_1 = type$.Combinator._as(combinator_case_1); - descendantComponents_case_1 = _4_6_isSet ? _4_6 : t2[2]; - combinatorComponents_case_1 = _4_7_isSet ? _4_7 : t2[3]; - t1 = combinatorComponents_case_1; - t2 = descendantComponents_case_1; - t4 = t2; - t2 = t1; - t1 = combinator_case_1; - } else { - t2 = t4; - t4 = t5; - } - t0 = t4; - t4 = t3; - t3 = t0; - } else { - t3 = t5; - t2 = t4; - t4 = false; - } - else { - t3 = t5; - t2 = t4; - t4 = true; - } - if (t4) { - if (t1 === B.Combinator_8I8) { - t1 = A.IterableExtension_get_lastOrNull(t3); - t1 = t1 == null ? _null : A.compoundIsSuperselector(t1.selector, t2.get$last(t2).selector, _null); - t1 = t1 === true; - } else - t1 = false; - if (t1) - t3.removeLast$0(0); - result.addFirst$1(A._setArrayType([A._setArrayType([t2.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); - break $label2$2; - } - return _null; - } - return A._mergeTrailingCombinators(components1, components2, span, result); - }, - _mustUnify(complex1, complex2) { - var t2, t3, t4, - t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector); - for (t2 = J.get$iterator$ax(complex1); t2.moveNext$0();) - for (t3 = B.JSArray_methods.get$iterator(t2.get$current(t2).selector.components), t4 = new A.WhereIterator(t3, A.functions___isUnique$closure()); t4.moveNext$0();) - t1.add$1(0, t3.get$current(0)); - if (t1._collection$_length === 0) - return false; - return J.any$1$ax(complex2, new A._mustUnify_closure(t1)); - }, - _isUnique(simple) { - var t1; - if (!(simple instanceof A.IDSelector)) - t1 = simple instanceof A.PseudoSelector && !simple.isClass; - else - t1 = true; - return t1; - }, - _chunks(queue1, queue2, done, $T) { - var chunk2, _0_4, _0_5_isSet, _0_1, _0_7, _0_5, chunk, _0_5_isSet0, t2, _null = null, - t1 = $T._eval$1("JSArray<0>"), - chunk1 = A._setArrayType([], t1); - for (; !done.call$1(queue1);) - chunk1.push(queue1.removeFirst$0()); - chunk2 = A._setArrayType([], t1); - for (; !done.call$1(queue2);) - chunk2.push(queue2.removeFirst$0()); - $label0$0: { - _0_4 = chunk1.length <= 0; - _0_5_isSet = _0_4; - _0_1 = chunk1; - _0_7 = _null; - _0_5 = _null; - if (_0_5_isSet) { - _0_7 = chunk2.length <= 0; - t1 = _0_7; - _0_5 = chunk2; - } else - t1 = false; - if (t1) { - t1 = A._setArrayType([], $T._eval$1("JSArray>")); - break $label0$0; - } - if (_0_4) - if (_0_5_isSet) { - chunk = _0_5; - _0_5_isSet0 = _0_5_isSet; - } else { - chunk = chunk2; - _0_5 = chunk; - _0_5_isSet0 = true; - } - else { - chunk = _null; - _0_5_isSet0 = _0_5_isSet; - } - if (!_0_4) { - if (_0_5_isSet) - t1 = _0_7; - else { - _0_7 = (_0_5_isSet0 ? _0_5 : chunk2).length <= 0; - t1 = _0_7; - } - chunk = _0_1; - } else - t1 = true; - if (t1) { - t1 = A._setArrayType([chunk], $T._eval$1("JSArray>")); - break $label0$0; - } - t1 = A.List_List$of(chunk1, true, $T); - B.JSArray_methods.addAll$1(t1, chunk2); - t2 = A.List_List$of(chunk2, true, $T); - B.JSArray_methods.addAll$1(t2, chunk1); - t2 = A._setArrayType([t1, t2], $T._eval$1("JSArray>")); - t1 = t2; - break $label0$0; - } - return t1; - }, - paths(choices, $T) { - return J.fold$2$ax(choices, A._setArrayType([A._setArrayType([], $T._eval$1("JSArray<0>"))], $T._eval$1("JSArray>")), new A.paths_closure($T)); - }, - _groupSelectors(complex) { - var t2, t3, t4, - groups = A.QueueList$(null, type$.List_ComplexSelectorComponent), - t1 = type$.JSArray_ComplexSelectorComponent, - group = A._setArrayType([], t1); - for (t2 = complex.$ti, t3 = new A.ListIterator(complex, complex.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t3.moveNext$0();) { - t4 = t3.__internal$_current; - if (t4 == null) - t4 = t2._as(t4); - group.push(t4); - if (t4.combinators.length === 0) { - groups._queue_list$_add$1(group); - group = A._setArrayType([], t1); - } - } - if (group.length !== 0) - groups._queue_list$_add$1(group); - return groups; - }, - listIsSuperselector(list1, list2) { - return B.JSArray_methods.every$1(list2, new A.listIsSuperselector_closure(list1)); - }, - _complexIsParentSuperselector(complex1, complex2) { - var t1, base, t2; - if (J.get$length$asx(complex1) > J.get$length$asx(complex2)) - return false; - t1 = $.$get$bogusSpan(); - base = new A.ComplexSelectorComponent(A.CompoundSelector$(A._setArrayType([new A.PlaceholderSelector("", t1)], type$.JSArray_SimpleSelector), t1), A.List_List$unmodifiable(B.List_empty0, type$.CssValue_Combinator), t1); - t1 = type$.ComplexSelectorComponent; - t2 = A.List_List$of(complex1, true, t1); - t2.push(base); - t1 = A.List_List$of(complex2, true, t1); - t1.push(base); - return A.complexIsSuperselector(t2, t1); - }, - complexIsSuperselector(complex1, complex2) { - var t1, t2, previousCombinator, i1, i2, remaining1, remaining2, component1, t3, t4, endOfSubselector, component2, t5, combinator1, _null = null; - if (B.JSArray_methods.get$last(complex1).combinators.length !== 0) - return false; - if (B.JSArray_methods.get$last(complex2).combinators.length !== 0) - return false; - for (t1 = A._arrayInstanceType(complex2), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), previousCombinator = _null, i1 = 0, i2 = 0; true; previousCombinator = combinator1) { - remaining1 = complex1.length - i1; - remaining2 = complex2.length - i2; - if (remaining1 === 0 || remaining2 === 0) - return false; - if (remaining1 > remaining2) - return false; - component1 = complex1[i1]; - t3 = component1.combinators; - if (t3.length > 1) - return false; - if (remaining1 === 1) - if (B.JSArray_methods.any$1(complex2, new A.complexIsSuperselector_closure())) - return false; - else { - t1 = component1.selector; - t2 = B.JSArray_methods.get$last(complex2).selector; - return A.compoundIsSuperselector(t1, t2, t1.get$hasComplicatedSuperselectorSemantics() ? B.JSArray_methods.sublist$2(complex2, i2, complex2.length - 1) : _null); - } - for (t4 = component1.selector, endOfSubselector = i2; true;) { - component2 = complex2[endOfSubselector]; - if (component2.combinators.length > 1) - return false; - t5 = component2.selector; - if (A.compoundIsSuperselector(t4, t5, t4.get$hasComplicatedSuperselectorSemantics() ? B.JSArray_methods.sublist$2(complex2, i2, endOfSubselector) : _null)) - break; - ++endOfSubselector; - if (endOfSubselector === complex2.length - 1) - return false; - } - t4 = new A.SubListIterable(complex2, 0, endOfSubselector, t1); - t4.SubListIterable$3(complex2, 0, endOfSubselector, t2); - if (!A._compatibleWithPreviousCombinator(previousCombinator, t4.skip$1(0, i2))) - return false; - component2 = complex2[endOfSubselector]; - combinator1 = A.IterableExtension_get_firstOrNull(t3); - if (!A._isSupercombinator(combinator1, A.IterableExtension_get_firstOrNull(component2.combinators))) - return false; - ++i1; - i2 = endOfSubselector + 1; - if (complex1.length - i1 === 1) { - t3 = combinator1 == null; - if (J.$eq$(t3 ? _null : combinator1.value, B.Combinator_y18)) { - t3 = complex2.length - 1; - t4 = new A.SubListIterable(complex2, 0, t3, t1); - t4.SubListIterable$3(complex2, 0, t3, t2); - if (!t4.skip$1(0, i2).every$1(0, new A.complexIsSuperselector_closure0(combinator1))) - return false; - } else if (!t3) - if (complex2.length - i2 > 1) - return false; - } - } - }, - _compatibleWithPreviousCombinator(previous, parents) { - if (parents.get$isEmpty(parents)) - return true; - if (previous == null) - return true; - if (previous.value !== B.Combinator_y18) - return false; - return parents.every$1(0, new A._compatibleWithPreviousCombinator_closure()); - }, - _isSupercombinator(combinator1, combinator2) { - var t2, t3, - t1 = true; - if (!J.$eq$(combinator1, combinator2)) { - t2 = combinator1 == null; - if (t2) - t3 = J.$eq$(combinator2 == null ? null : combinator2.value, B.Combinator_8I8); - else - t3 = false; - if (!t3) - if (J.$eq$(t2 ? null : combinator1.value, B.Combinator_y18)) - t1 = J.$eq$(combinator2 == null ? null : combinator2.value, B.Combinator_gRV); - else - t1 = false; - } - return t1; - }, - compoundIsSuperselector(compound1, compound2, parents) { - var t1, _0_1, _0_5, _0_5_isSet, _0_50, index1, pseudo2, index2, t2, t3, pseudo1, t4, t5, _i, simple1, _null = null; - if (!compound1.get$hasComplicatedSuperselectorSemantics() && !compound2.get$hasComplicatedSuperselectorSemantics()) { - t1 = compound1.components; - if (t1.length > compound2.components.length) - return false; - return B.JSArray_methods.every$1(t1, new A.compoundIsSuperselector_closure(compound2)); - } - _0_1 = A._findPseudoElementIndexed(compound1); - _0_5 = A._findPseudoElementIndexed(compound2); - t1 = type$.Record_2_nullable_Object_and_nullable_Object; - _0_5_isSet = t1._is(_0_1); - _0_50 = _null; - index1 = _null; - pseudo2 = _null; - index2 = _null; - t2 = false; - if (_0_5_isSet) { - t3 = _0_1 == null; - pseudo1 = (t3 ? t1._as(_0_1) : _0_1)._0; - index1 = (t3 ? t1._as(_0_1) : _0_1)._1; - t2 = t1._is(_0_5); - if (t2) { - t3 = _0_5 == null; - pseudo2 = (t3 ? t1._as(_0_5) : _0_5)._0; - index2 = (t3 ? t1._as(_0_5) : _0_5)._1; - } - t1 = t2; - _0_50 = _0_5; - } else { - t1 = t2; - pseudo1 = _null; - } - if (t1) { - if (pseudo1.isSuperselector$1(pseudo2)) { - t1 = compound1.components; - t2 = type$.int; - t3 = A._arrayInstanceType(t1)._precomputed1; - t4 = compound2.components; - t5 = A._arrayInstanceType(t4)._precomputed1; - t1 = A._compoundComponentsIsSuperselector(A.SubListIterable$(t1, 0, A.checkNotNullable(index1, "count", t2), t3), A.SubListIterable$(t4, 0, A.checkNotNullable(index2, "count", t2), t5), parents) && A._compoundComponentsIsSuperselector(A.SubListIterable$(t1, index1 + 1, _null, t3), A.SubListIterable$(t4, index2 + 1, _null, t5), parents); - } else - t1 = false; - return t1; - } - if (_0_1 == null) - t1 = (_0_5_isSet ? _0_50 : _0_5) != null; - else - t1 = true; - if (t1) - return false; - for (t1 = compound1.components, t2 = t1.length, t3 = compound2.components, _i = 0; _i < t2; ++_i) { - simple1 = t1[_i]; - if (simple1 instanceof A.PseudoSelector) - t4 = simple1.selector != null; - else - t4 = false; - if (t4) { - if (!A._selectorPseudoIsSuperselector(simple1, compound2, parents)) - return false; - } else if (!B.JSArray_methods.any$1(t3, simple1.get$isSuperselector())) - return false; - } - return true; - }, - _findPseudoElementIndexed(compound) { - var t1, t2, i, simple; - for (t1 = compound.components, t2 = t1.length, i = 0; i < t2; ++i) { - simple = t1[i]; - if (simple instanceof A.PseudoSelector && !simple.isClass) - return new A._Record_2(simple, i); - } - return null; - }, - _compoundComponentsIsSuperselector(compound1, compound2, parents) { - var t1; - if (compound1.get$length(0) === 0) - return true; - if (compound2.get$length(0) === 0) - compound2 = A._setArrayType([new A.UniversalSelector("*", $.$get$bogusSpan())], type$.JSArray_SimpleSelector); - t1 = $.$get$bogusSpan(); - return A.compoundIsSuperselector(A.CompoundSelector$(compound1, t1), A.CompoundSelector$(compound2, t1), parents); - }, - _selectorPseudoIsSuperselector(pseudo1, compound2, parents) { - var selector1 = pseudo1.selector; - if (selector1 == null) - throw A.wrapException(A.ArgumentError$("Selector " + pseudo1.toString$0(0) + " must have a selector argument.", null)); - switch (pseudo1.normalizedName) { - case "is": - case "matches": - case "any": - case "where": - return A._selectorPseudoArgs(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure(selector1)) || B.JSArray_methods.any$1(selector1.components, new A._selectorPseudoIsSuperselector_closure0(parents, compound2)); - case "has": - case "host": - case "host-context": - return A._selectorPseudoArgs(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure1(selector1)); - case "slotted": - return A._selectorPseudoArgs(compound2, pseudo1.name, false).any$1(0, new A._selectorPseudoIsSuperselector_closure2(selector1)); - case "not": - return B.JSArray_methods.every$1(selector1.components, new A._selectorPseudoIsSuperselector_closure3(compound2, pseudo1)); - case "current": - return A._selectorPseudoArgs(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure4(selector1)); - case "nth-child": - case "nth-last-child": - return B.JSArray_methods.any$1(compound2.components, new A._selectorPseudoIsSuperselector_closure5(pseudo1, selector1)); - default: - throw A.wrapException("unreachable"); - } - }, - _selectorPseudoArgs(compound, $name, isClass) { - var t1 = type$.WhereTypeIterable_PseudoSelector; - return new A.NonNullsIterable(new A.MappedIterable(new A.WhereIterable(new A.WhereTypeIterable(compound.components, t1), new A._selectorPseudoArgs_closure(isClass, $name), t1._eval$1("WhereIterable")), new A._selectorPseudoArgs_closure0(), t1._eval$1("MappedIterable")), type$.NonNullsIterable_SelectorList); - }, - unifyComplex_closure: function unifyComplex_closure() { - }, - _weaveParents_closure: function _weaveParents_closure(t0) { - this.span = t0; - }, - _weaveParents_closure0: function _weaveParents_closure0(t0) { - this.group = t0; - }, - _weaveParents_closure1: function _weaveParents_closure1() { - }, - _weaveParents_closure2: function _weaveParents_closure2() { - }, - _mustUnify_closure: function _mustUnify_closure(t0) { - this.uniqueSelectors = t0; - }, - _mustUnify__closure: function _mustUnify__closure(t0) { - this.uniqueSelectors = t0; - }, - paths_closure: function paths_closure(t0) { - this.T = t0; - }, - paths__closure: function paths__closure(t0, t1) { - this.paths = t0; - this.T = t1; - }, - paths___closure: function paths___closure(t0, t1) { - this.option = t0; - this.T = t1; - }, - listIsSuperselector_closure: function listIsSuperselector_closure(t0) { - this.list1 = t0; - }, - listIsSuperselector__closure: function listIsSuperselector__closure(t0) { - this.complex1 = t0; - }, - complexIsSuperselector_closure: function complexIsSuperselector_closure() { - }, - complexIsSuperselector_closure0: function complexIsSuperselector_closure0(t0) { - this.combinator1 = t0; - }, - _compatibleWithPreviousCombinator_closure: function _compatibleWithPreviousCombinator_closure() { - }, - compoundIsSuperselector_closure: function compoundIsSuperselector_closure(t0) { - this.compound2 = t0; - }, - _selectorPseudoIsSuperselector_closure: function _selectorPseudoIsSuperselector_closure(t0) { - this.selector1 = t0; - }, - _selectorPseudoIsSuperselector_closure0: function _selectorPseudoIsSuperselector_closure0(t0, t1) { - this.parents = t0; - this.compound2 = t1; - }, - _selectorPseudoIsSuperselector_closure1: function _selectorPseudoIsSuperselector_closure1(t0) { - this.selector1 = t0; - }, - _selectorPseudoIsSuperselector_closure2: function _selectorPseudoIsSuperselector_closure2(t0) { - this.selector1 = t0; - }, - _selectorPseudoIsSuperselector_closure3: function _selectorPseudoIsSuperselector_closure3(t0, t1) { - this.compound2 = t0; - this.pseudo1 = t1; - }, - _selectorPseudoIsSuperselector__closure: function _selectorPseudoIsSuperselector__closure(t0, t1) { - this.complex = t0; - this.pseudo1 = t1; - }, - _selectorPseudoIsSuperselector___closure: function _selectorPseudoIsSuperselector___closure(t0) { - this.simple2 = t0; - }, - _selectorPseudoIsSuperselector___closure0: function _selectorPseudoIsSuperselector___closure0(t0) { - this.simple2 = t0; - }, - _selectorPseudoIsSuperselector_closure4: function _selectorPseudoIsSuperselector_closure4(t0) { - this.selector1 = t0; - }, - _selectorPseudoIsSuperselector_closure5: function _selectorPseudoIsSuperselector_closure5(t0, t1) { - this.pseudo1 = t0; - this.selector1 = t1; - }, - _selectorPseudoArgs_closure: function _selectorPseudoArgs_closure(t0, t1) { - this.isClass = t0; - this.name = t1; - }, - _selectorPseudoArgs_closure0: function _selectorPseudoArgs_closure0() { - }, - MergedExtension_merge(left, right) { - var t2, t3, t4, - t1 = left.extender.selector; - if (!t1.$eq(0, right.extender.selector) || !left.target.$eq(0, right.target)) - throw A.wrapException(A.ArgumentError$(left.toString$0(0) + " and " + right.toString$0(0) + " aren't the same extension.", null)); - t2 = left.mediaContext; - t3 = t2 == null; - if (!t3) { - t4 = right.mediaContext; - t4 = t4 != null && !B.C_ListEquality.equals$2(0, t2, t4); - } else - t4 = false; - if (t4) - throw A.wrapException(A.SassException$("From " + left.span.message$1(0, "") + string$.x0aYou_m, right.span, null)); - if (right.isOptional && right.mediaContext == null) - return left; - if (left.isOptional && t3) - return right; - if (t3) - t2 = right.mediaContext; - t1.get$specificity(); - t1 = new A.Extender(t1, false); - return t1._extension = new A.MergedExtension(left, right, t1, left.target, t2, true, left.span); - }, - MergedExtension: function MergedExtension(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.left = t0; - _.right = t1; - _.extender = t2; - _.target = t3; - _.mediaContext = t4; - _.isOptional = t5; - _.span = t6; - }, - ExtendMode: function ExtendMode(t0, t1) { - this.name = t0; - this._name = t1; - }, - globalFunctions_closure: function globalFunctions_closure() { - }, - _invert($arguments, global) { - var t2, color, rgb, channel2, space, weight, inSpace, t3, _1_9, channel0, channel1, t4, _s6_ = "weight", _s5_ = "space", - t1 = J.getInterceptor$asx($arguments), - weightNumber = t1.$index($arguments, 1).assertNumber$1(_s6_); - if (!(t1.$index($arguments, 0) instanceof A.SassNumber)) - t2 = global && t1.$index($arguments, 0).get$isSpecialNumber(); - else - t2 = true; - if (t2) { - if (weightNumber._number$_value !== 100 || !weightNumber.hasUnit$1("%")) - throw A.wrapException(string$.Only_oa); - return A._functionString("invert", t1.take$1($arguments, 1)); - } - color = t1.$index($arguments, 0).assertColor$1("color"); - if (J.$eq$(t1.$index($arguments, 2), B.C__SassNull)) { - t1 = color._space; - if (!t1.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$(string$.To_usei + color.toString$0(0) + ", you must provide a $space.", "color")); - A._checkPercent(weightNumber, _s6_); - rgb = color.toSpace$1(B.RgbColorSpace_mlz); - channel2 = B.LinearChannel_Npb; - return A._mixLegacy(A.SassColor_SassColor$rgbInternal(A._invertChannel(rgb, B.LinearChannel_bdu, rgb.channel0OrNull), A._invertChannel(rgb, B.LinearChannel_kUZ, rgb.channel1OrNull), A._invertChannel(rgb, channel2, rgb.channel2OrNull), color.alphaOrNull, null), color, weightNumber).toSpace$1(t1); - } - t1 = t1.$index($arguments, 2).assertString$1(_s5_); - t1.assertUnquoted$1(_s5_); - space = A.ColorSpace_fromName(t1._string$_text, _s5_); - weight = weightNumber.valueInRangeWithUnit$4(0, 100, _s6_, "%") / 100; - if (A.fuzzyEquals(weight, 0)) - return color; - inSpace = color.toSpace$1(space); - $label0$0: { - if (B.HwbColorSpace_06z === space) { - t1 = A._invertChannel(inSpace, space._channels[0], inSpace.channel0OrNull); - t2 = inSpace.alphaOrNull; - if (t2 == null) - t2 = 0; - t2 = A.SassColor_SassColor$hwb(t1, inSpace.channel2OrNull, inSpace.channel1OrNull, t2); - t1 = t2; - break $label0$0; - } - if (B.HslColorSpace_gsm === space || B.LchColorSpace_wv8 === space || B.OklchColorSpace_li8 === space) { - t1 = space._channels; - t2 = A._invertChannel(inSpace, t1[0], inSpace.channel0OrNull); - t1 = A._invertChannel(inSpace, t1[2], inSpace.channel2OrNull); - t3 = inSpace.alphaOrNull; - if (t3 == null) - t3 = 0; - t3 = A.SassColor_SassColor$forSpaceInternal(space, t2, inSpace.channel1OrNull, t1, t3); - t1 = t3; - break $label0$0; - } - _1_9 = space._channels; - channel0 = _1_9[0]; - channel1 = _1_9[1]; - channel2 = _1_9[2]; - t1 = A._invertChannel(inSpace, channel0, inSpace.channel0OrNull); - t2 = A._invertChannel(inSpace, channel1, inSpace.channel1OrNull); - t3 = A._invertChannel(inSpace, channel2, inSpace.channel2OrNull); - t4 = inSpace.alphaOrNull; - t1 = A.SassColor_SassColor$forSpaceInternal(space, t1, t2, t3, t4 == null ? 0 : t4); - break $label0$0; - } - return A.fuzzyEquals(weight, 1) ? t1.toSpace$2$legacyMissing(color._space, false) : color.interpolate$4$legacyMissing$weight(t1, A.InterpolationMethod$(space, null), false, 1 - weight); - }, - _invertChannel(color, channel, value) { - var _0_2_isSet, _0_2, t1; - if (value == null) - A._missingChannelError(color, channel.name); - $label0$0: { - _0_2_isSet = channel instanceof A.LinearChannel; - if (_0_2_isSet) { - _0_2 = channel.min; - t1 = _0_2 < 0; - } else { - _0_2 = null; - t1 = false; - } - if (t1) { - t1 = -value; - break $label0$0; - } - if (_0_2_isSet) - t1 = 0 === _0_2; - else - t1 = false; - if (t1) { - t1 = channel.max - value; - break $label0$0; - } - if (channel.isPolarAngle) { - t1 = B.JSNumber_methods.$mod(value + 180, 360); - break $label0$0; - } - t1 = A.throwExpression(A.UnsupportedError$("Unknown channel " + channel.toString$0(0) + ".")); - } - return t1; - }, - _grayscale(colorArg) { - var hsl, t2, oklch, - color = colorArg.assertColor$1("color"), - t1 = color._space; - if (t1.get$isLegacyInternal()) { - hsl = color.toSpace$1(B.HslColorSpace_gsm); - t2 = hsl.alphaOrNull; - if (t2 == null) - t2 = 0; - return A.SassColor_SassColor$hsl(hsl.channel0OrNull, 0, hsl.channel2OrNull, t2).toSpace$2$legacyMissing(t1, false); - } else { - oklch = color.toSpace$1(B.OklchColorSpace_li8); - t2 = oklch.alphaOrNull; - if (t2 == null) - t2 = 0; - return A.SassColor_SassColor$forSpaceInternal(B.OklchColorSpace_li8, oklch.channel0OrNull, 0, oklch.channel2OrNull, t2).toSpace$1(t1); - } - }, - _updateComponents($arguments, adjust, change, scale) { - var t2, t3, keywords, originalColor, spaceKeyword, alphaArg, color, channelArgs, channelInfo, t4, value, channelIndex, result, i, alphaNumber, _null = null, _s5_ = "space", - t1 = J.getInterceptor$asx($arguments), - argumentList = type$.SassArgumentList._as(t1.$index($arguments, 1)); - if (argumentList._list$_contents.length !== 0) - throw A.wrapException(A.SassScriptException$(string$.Only_op, _null)); - argumentList._wereKeywordsAccessed = true; - t2 = type$.String; - t3 = type$.Value; - keywords = A.LinkedHashMap_LinkedHashMap$of(argumentList._keywords, t2, t3); - originalColor = t1.$index($arguments, 0).assertColor$1("color"); - t1 = keywords.remove$1(0, _s5_); - spaceKeyword = t1 == null ? _null : t1.assertString$1(_s5_); - if (spaceKeyword == null) - spaceKeyword = _null; - else - spaceKeyword.assertUnquoted$1(_s5_); - alphaArg = keywords.remove$1(0, "alpha"); - t1 = spaceKeyword == null; - if (t1 && originalColor._space.get$isLegacyInternal() && keywords.__js_helper$_length !== 0) { - t1 = A.NullableExtension_andThen(A._sniffLegacyColorSpace(keywords), new A._updateComponents_closure(originalColor)); - color = t1 == null ? originalColor : t1; - } else - color = A._colorInSpace(originalColor, t1 ? B.C__SassNull : spaceKeyword, true); - channelArgs = A.List_List$filled(color.get$channels().length, _null, false, type$.nullable_Value); - t1 = color._space; - channelInfo = t1._channels; - for (t2 = A.MapExtensions_get_pairs(keywords, t2, t3), t2 = t2.get$iterator(t2); t2.moveNext$0();) { - t3 = {}; - t4 = t2.get$current(t2); - t3.name = null; - t3.name = t4._0; - value = t4._1; - channelIndex = B.JSArray_methods.indexWhere$1(channelInfo, new A._updateComponents_closure0(t3)); - if (channelIndex === -1) - throw A.wrapException(A.SassScriptException$("Color space " + t1.toString$0(0) + " doesn't have a channel with this name.", t3.name)); - channelArgs[channelIndex] = value; - } - if (change) - result = A._changeColor(color, channelArgs, alphaArg); - else { - t2 = A._setArrayType([], type$.JSArray_nullable_SassNumber); - for (i = 0; i < 3; ++i) { - t3 = channelArgs[i]; - t2.push(t3 == null ? _null : t3.assertNumber$1(channelInfo[i].name)); - } - alphaNumber = alphaArg == null ? _null : alphaArg.assertNumber$1("alpha"); - result = scale ? A.SassColor_SassColor$forSpaceInternal(t1, A._scaleChannel(color, channelInfo[0], color.channel0OrNull, t2[0]), A._scaleChannel(color, channelInfo[1], color.channel1OrNull, t2[1]), A._scaleChannel(color, channelInfo[2], color.channel2OrNull, t2[2]), A._scaleChannel(color, B.LinearChannel_omH, color.alphaOrNull, alphaNumber)) : A._adjustColor(color, t2, alphaNumber); - } - return result.toSpace$2$legacyMissing(originalColor._space, false); - }, - _changeColor(color, channelArgs, alphaArg) { - var t4, _s5_ = "alpha", - t1 = A._channelForChange(channelArgs[0], color, 0), - t2 = A._channelForChange(channelArgs[1], color, 1), - t3 = A._channelForChange(channelArgs[2], color, 2); - $label0$0: { - if (alphaArg == null) { - t4 = color.alphaOrNull; - if (t4 == null) - t4 = 0; - break $label0$0; - } - t4 = A._isNone(alphaArg); - if (t4) { - t4 = null; - break $label0$0; - } - t4 = alphaArg instanceof A.SassNumber; - if (t4 && !alphaArg.get$hasUnits()) { - t4 = alphaArg.valueInRange$3(0, 1, _s5_); - break $label0$0; - } - if (t4 && alphaArg.hasUnit$1("%")) { - t4 = alphaArg.valueInRangeWithUnit$4(0, 100, _s5_, "%") / 100; - break $label0$0; - } - if (t4) { - t4 = new A._changeColor_closure(alphaArg).call$0(); - break $label0$0; - } - t4 = A.throwExpression(A.SassScriptException$(alphaArg.toString$0(0) + ' is not a number or unquoted "none".', _s5_)); - } - return A._colorFromChannels(color._space, t1, t2, t3, t4, false, false); - }, - _channelForChange(channelArg, color, channel) { - var _0_0, t1, t2; - if (channelArg == null) { - _0_0 = color.get$channelsOrNull()[channel]; - $label0$0: { - if (_0_0 != null) { - t1 = color._space; - t2 = A.SassNumber_SassNumber(_0_0, (t1 === B.HslColorSpace_gsm || t1 === B.HwbColorSpace_06z) && channel > 0 ? "%" : null); - t1 = t2; - break $label0$0; - } - t1 = null; - break $label0$0; - } - return t1; - } - if (A._isNone(channelArg)) - return null; - if (channelArg instanceof A.SassNumber) - return channelArg; - throw A.wrapException(A.SassScriptException$(channelArg.toString$0(0) + ' is not a number or unquoted "none".', color._space._channels[channel].name)); - }, - _scaleChannel(color, channel, oldValue, factorArg) { - var t1, factor; - if (factorArg == null) - return oldValue; - if (!(channel instanceof A.LinearChannel)) - throw A.wrapException(A.SassScriptException$("Channel isn't scalable.", channel.name)); - if (oldValue == null) - A._missingChannelError(color, channel.name); - t1 = channel.name; - factorArg.assertUnit$2("%", t1); - factor = factorArg.valueInRangeWithUnit$4(-100, 100, t1, "%") / 100; - $label0$0: { - if (0 === factor) { - t1 = oldValue; - break $label0$0; - } - if (factor > 0) { - t1 = channel.max; - t1 = oldValue >= t1 ? oldValue : oldValue + (t1 - oldValue) * factor; - break $label0$0; - } - t1 = channel.min; - t1 = oldValue <= t1 ? oldValue : oldValue + (oldValue - t1) * factor; - break $label0$0; - } - return t1; - }, - _adjustColor(color, channelArgs, alphaArg) { - var t1 = color._space, - t2 = t1._channels; - return A.SassColor_SassColor$forSpaceInternal(t1, A._adjustChannel(color, t2[0], color.channel0OrNull, channelArgs[0]), A._adjustChannel(color, t2[1], color.channel1OrNull, channelArgs[1]), A._adjustChannel(color, t2[2], color.channel2OrNull, channelArgs[2]), A.NullableExtension_andThen(A._adjustChannel(color, B.LinearChannel_omH, color.alphaOrNull, alphaArg), new A._adjustColor_closure())); - }, - _adjustChannel(color, channel, oldValue, adjustmentArg) { - var _0_1, _0_3, t1, _0_6_isSet, _0_6, _0_6_isSet0, t2, _0_11, result, min, max, _null = null; - if (adjustmentArg == null) - return oldValue; - if (oldValue == null) - A._missingChannelError(color, channel.name); - $label0$0: { - _0_1 = color._space; - _0_3 = B.HslColorSpace_gsm === _0_1; - t1 = _0_3; - if (!t1) - _0_6_isSet = B.HwbColorSpace_06z === _0_1; - else - _0_6_isSet = true; - if (_0_6_isSet) { - t1 = channel.isPolarAngle; - _0_6 = channel; - } else { - _0_6 = _null; - t1 = false; - } - if (t1) { - adjustmentArg = A.SassNumber_SassNumber(A._angleValue(adjustmentArg, "hue"), _null); - break $label0$0; - } - t1 = false; - if (_0_3) { - _0_6_isSet0 = true; - if (_0_6_isSet) - t2 = _0_6; - else { - t2 = channel; - _0_6_isSet = _0_6_isSet0; - _0_6 = t2; - } - if (t2 instanceof A.LinearChannel) { - if (_0_6_isSet) - t1 = _0_6; - else { - t1 = channel; - _0_6_isSet = _0_6_isSet0; - _0_6 = t1; - } - _0_11 = type$.LinearChannel._as(t1).name; - t1 = _0_11; - if ("saturation" !== t1) - t1 = "lightness" === _0_11; - else - t1 = true; - } - } - if (t1) { - A._checkPercent(adjustmentArg, channel.name); - adjustmentArg = A.SassNumber_SassNumber(adjustmentArg._number$_value, "%"); - break $label0$0; - } - if (B.LinearChannel_omH === (_0_6_isSet ? _0_6 : channel) && adjustmentArg.get$hasUnits()) { - A.warnForDeprecation("$alpha: Passing a number with unit " + adjustmentArg.get$unitString() + string$.x20is_de + adjustmentArg.unitSuggestion$1("alpha") + string$.x0a_Morex3af, B.Deprecation_int); - adjustmentArg = A.SassNumber_SassNumber(adjustmentArg._number$_value, _null); - } - } - t1 = A._channelFromValue(channel, adjustmentArg, false); - t1.toString; - result = oldValue + t1; - $label1$1: { - t1 = channel instanceof A.LinearChannel; - min = _null; - t2 = false; - if (t1) - if (channel.lowerClamped) { - min = channel.min; - t2 = result < min; - } - if (t2) { - t1 = oldValue < min ? Math.max(oldValue, result) : min; - break $label1$1; - } - max = _null; - t2 = false; - if (t1) - if (channel.upperClamped) { - max = channel.max; - t1 = result > max; - } else - t1 = t2; - else - t1 = t2; - if (t1) { - t1 = oldValue > max ? Math.min(oldValue, result) : max; - break $label1$1; - } - t1 = result; - break $label1$1; - } - return t1; - }, - _sniffLegacyColorSpace(keywords) { - var t1, t2; - for (t1 = A.LinkedHashMapKeyIterator$(keywords, keywords.__js_helper$_modifications); t1.moveNext$0();) { - t2 = t1.__js_helper$_current; - if ("red" === t2 || "green" === t2 || "blue" === t2) - return B.RgbColorSpace_mlz; - if ("saturation" === t2 || "lightness" === t2) - return B.HslColorSpace_gsm; - if ("whiteness" === t2 || "blackness" === t2) - return B.HwbColorSpace_06z; - } - return keywords.containsKey$1("hue") ? B.HslColorSpace_gsm : null; - }, - _functionString($name, $arguments) { - return new A.SassString($name + "(" + J.map$1$1$ax($arguments, new A._functionString_closure(), type$.String).join$1(0, ", ") + ")", false); - }, - _removedColorFunction($name, argument, negative) { - return A.BuiltInCallable$function($name, "$color, $amount", new A._removedColorFunction_closure($name, argument, negative), "sass:color"); - }, - _rgb($name, $arguments) { - var t3, t4, - t1 = J.getInterceptor$asx($arguments), - alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, - t2 = true; - if (!t1.$index($arguments, 0).get$isSpecialNumber()) - if (!t1.$index($arguments, 1).get$isSpecialNumber()) - if (!t1.$index($arguments, 2).get$isSpecialNumber()) { - t2 = alpha == null ? null : alpha.get$isSpecialNumber(); - t2 = t2 === true; - } - if (t2) - return A._functionString($name, $arguments); - t2 = t1.$index($arguments, 0).assertNumber$1("red"); - t3 = t1.$index($arguments, 1).assertNumber$1("green"); - t1 = t1.$index($arguments, 2).assertNumber$1("blue"); - t4 = A.NullableExtension_andThen(alpha, new A._rgb_closure()); - return A._colorFromChannels(B.RgbColorSpace_mlz, t2, t3, t1, t4 == null ? 1 : t4, true, true); - }, - _rgbTwoArg($name, $arguments) { - var t2, color, - t1 = J.getInterceptor$asx($arguments), - first = t1.$index($arguments, 0), - second = t1.$index($arguments, 1); - if (!first.get$isVar()) - t2 = !(first instanceof A.SassColor) && second.get$isVar(); - else - t2 = true; - if (t2) - return A._functionString($name, $arguments); - color = first.assertColor$1("color"); - if (!color._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$("Expected " + color.toString$0(0) + string$.x20to_be_ + color.toString$0(0) + ", $alpha: " + second.toString$0(0) + ")", $name)); - color.assertLegacy$1("color"); - color = color.toSpace$1(B.RgbColorSpace_mlz); - if (second.get$isSpecialNumber()) - return A._functionString($name, A._setArrayType([A.SassNumber_SassNumber(color.channel$1(0, "red"), null), A.SassNumber_SassNumber(color.channel$1(0, "green"), null), A.SassNumber_SassNumber(color.channel$1(0, "blue"), null), t1.$index($arguments, 1)], type$.JSArray_Value)); - t1 = A._percentageOrUnitless(t1.$index($arguments, 1).assertNumber$1("alpha"), 1, "alpha"); - return color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); - }, - _hsl($name, $arguments) { - var t3, t4, - t1 = J.getInterceptor$asx($arguments), - alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, - t2 = true; - if (!t1.$index($arguments, 0).get$isSpecialNumber()) - if (!t1.$index($arguments, 1).get$isSpecialNumber()) - if (!t1.$index($arguments, 2).get$isSpecialNumber()) { - t2 = alpha == null ? null : alpha.get$isSpecialNumber(); - t2 = t2 === true; - } - if (t2) - return A._functionString($name, $arguments); - t2 = t1.$index($arguments, 0).assertNumber$1("hue"); - t3 = t1.$index($arguments, 1).assertNumber$1("saturation"); - t1 = t1.$index($arguments, 2).assertNumber$1("lightness"); - t4 = A.NullableExtension_andThen(alpha, new A._hsl_closure()); - return A._colorFromChannels(B.HslColorSpace_gsm, t2, t3, t1, t4 == null ? 1 : t4, true, false); - }, - _angleValue(angleValue, $name) { - var angle = angleValue.assertNumber$1($name); - if (angle.compatibleWithUnit$1("deg")) - return angle.coerceValueToUnit$1("deg"); - A.warnForDeprecation("$" + $name + ": Passing a unit other than deg (" + angle.toString$0(0) + string$.x29x20is_d + angle.unitSuggestion$1($name) + string$.x0a_See_, B.Deprecation_int); - return angle._number$_value; - }, - _checkPercent(number, $name) { - if (number.hasUnit$1("%")) - return; - A.warnForDeprecation("$" + $name + ": Passing a number without unit % (" + number.toString$0(0) + string$.x29x20is_d + number.unitSuggestion$2($name, "%") + string$.x0a_Morex3af, B.Deprecation_int); - }, - _percentageOrUnitless(number, max, $name) { - var value; - if (!number.get$hasUnits()) - value = number._number$_value; - else if (number.hasUnit$1("%")) - value = max * number._number$_value / 100; - else - throw A.wrapException(A.SassScriptException$("Expected " + number.toString$0(0) + ' to have unit "%" or no units.', $name)); - return value; - }, - _mixLegacy(color1, color2, weight) { - var t2, alphaDistance, weight1, weight2, t3, t4, t5, t6, t7, t8, - rgb1 = color1.toSpace$1(B.RgbColorSpace_mlz), - rgb2 = color2.toSpace$1(B.RgbColorSpace_mlz), - weightScale = weight.valueInRange$3(0, 100, "weight") / 100, - normalizedWeight = weightScale * 2 - 1, - t1 = color1.alphaOrNull; - if (t1 == null) - t1 = 0; - t2 = color2.alphaOrNull; - alphaDistance = t1 - (t2 == null ? 0 : t2); - t1 = normalizedWeight * alphaDistance; - weight1 = ((t1 === -1 ? normalizedWeight : (normalizedWeight + alphaDistance) / (1 + t1)) + 1) / 2; - weight2 = 1 - weight1; - t1 = rgb1.channel0OrNull; - if (t1 == null) - t1 = 0; - t2 = rgb2.channel0OrNull; - if (t2 == null) - t2 = 0; - t3 = rgb1.channel1OrNull; - if (t3 == null) - t3 = 0; - t4 = rgb2.channel1OrNull; - if (t4 == null) - t4 = 0; - t5 = rgb1.channel2OrNull; - if (t5 == null) - t5 = 0; - t6 = rgb2.channel2OrNull; - if (t6 == null) - t6 = 0; - t7 = rgb1.alphaOrNull; - if (t7 == null) - t7 = 0; - t8 = rgb2.alphaOrNull; - if (t8 == null) - t8 = 0; - return A.SassColor_SassColor$rgbInternal(t1 * weight1 + t2 * weight2, t3 * weight1 + t4 * weight2, t5 * weight1 + t6 * weight2, t7 * weightScale + t8 * (1 - weightScale), null); - }, - _opacify($name, $arguments) { - var result, - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - amount = t1.$index($arguments, 1).assertNumber$1("amount"); - if (!color._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$($name + string$.x28__is_oa, null)); - t1 = color.alphaOrNull; - if (t1 == null) - t1 = 0; - t1 += amount.valueInRangeWithUnit$4(0, 1, "amount", ""); - result = color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); - A.warnForDeprecation($name + "() is deprecated. " + A._suggestScaleAndAdjust(color, amount._number$_value, "alpha") + string$.x0a_Morex3ac, B.Deprecation_izR); - return result; - }, - _transparentize($name, $arguments) { - var result, - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - amount = t1.$index($arguments, 1).assertNumber$1("amount"); - if (!color._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$($name + string$.x28__is_oa, null)); - t1 = color.alphaOrNull; - if (t1 == null) - t1 = 0; - t1 -= amount.valueInRangeWithUnit$4(0, 1, "amount", ""); - result = color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); - A.warnForDeprecation($name + "() is deprecated. " + A._suggestScaleAndAdjust(color, -amount._number$_value, "alpha") + string$.x0a_Morex3ac, B.Deprecation_izR); - return result; - }, - _colorInSpace(colorUntyped, spaceUntyped, legacyMissing) { - var t1, _s5_ = "space", - color = colorUntyped.assertColor$1("color"); - if (spaceUntyped.$eq(0, B.C__SassNull)) - return color; - t1 = spaceUntyped.assertString$1(_s5_); - t1.assertUnquoted$1(_s5_); - return color.toSpace$2$legacyMissing(A.ColorSpace_fromName(t1._string$_text, _s5_), legacyMissing); - }, - _parseChannels(functionName, input, $name, space) { - var parsedSlash, components, alphaValue, _2_0, _2_1, _2_5, t1, _2_6, t2, _2_60, t3, channels, first, rest, componentList, spaceName, i, channel, channelName, t4, _null = null; - if (input.get$isVar()) - return A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); - parsedSlash = A._parseSlashChannels(input, $name); - if (parsedSlash == null) - return A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); - components = parsedSlash._0; - alphaValue = parsedSlash._1; - $label0$0: { - _2_0 = components.assertCommonListStyle$2$allowSlash($name, false); - _2_1 = _2_0.length; - if (_2_1 <= 0) - throw A.wrapException(A.SassScriptException$("Color component list may not be empty.", $name)); - _2_5 = _2_1 >= 1; - t1 = _2_5; - _2_6 = _null; - t2 = false; - if (t1) { - _2_60 = _2_0[0]; - t3 = _2_60; - _2_6 = t3; - if (t3 instanceof A.SassString) { - type$.SassString._as(_2_6); - t2 = !_2_6._hasQuotes && _2_6._string$_text.toLowerCase() === "from"; - } - } - if (t2) - return A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); - t2 = components.get$isVar(); - if (t2) { - channels = A._setArrayType([components], type$.JSArray_Value); - break $label0$0; - } - channels = _null; - if (_2_5) { - first = t1 ? _2_6 : _2_0[0]; - rest = B.JSArray_methods.sublist$1(_2_0, 1); - componentList = _2_0; - } else { - componentList = channels; - rest = componentList; - first = _null; - } - if (_2_5) { - if (space == null) { - spaceName = first.assertString$1($name); - spaceName.assertUnquoted$1($name); - space = spaceName.get$isVar() ? _null : A.ColorSpace_fromName(spaceName._string$_text, $name); - if (B.RgbColorSpace_mlz === space || B.HslColorSpace_gsm === space || B.HwbColorSpace_06z === space || B.LabColorSpace_IF2 === space || B.LchColorSpace_wv8 === space || B.OklabColorSpace_yrt === space || B.OklchColorSpace_li8 === space) - throw A.wrapException(A.SassScriptException$(string$.The_co + A.S(space) + ". Use the " + A.S(space) + "() function instead.", $name)); - channels = rest; - } else - channels = componentList; - for (i = 0; i < channels.length; ++i) { - channel = channels[i]; - t1 = false; - if (!channel.get$isSpecialNumber()) - if (!(channel instanceof A.SassNumber)) - t1 = !(channel instanceof A.SassString && !channel._hasQuotes && channel._string$_text.toLowerCase() === "none"); - if (t1) { - t1 = _null; - if (space == null) - channelName = t1; - else { - t2 = space._channels; - t2 = i < 3 ? t2[i] : _null; - if (!(t2 == null)) - t1 = new A._parseChannels_closure().call$1(t2.name); - channelName = t1; - } - if (channelName == null) - channelName = "channel " + (i + 1); - throw A.wrapException(A.SassScriptException$("Expected " + channelName + " to be a number, was " + channel.toString$0(0) + ".", $name)); - } - } - break $label0$0; - } - throw A.wrapException("unreachable"); - } - t1 = alphaValue == null; - t2 = t1 ? _null : alphaValue.get$isSpecialNumber(); - if (t2 === true) { - if (channels.length === 3 && B.Set_2Dcfy.contains$1(0, space)) { - t1 = A.List_List$of(channels, true, type$.Value); - alphaValue.toString; - t1.push(alphaValue); - t1 = A._functionString(functionName, t1); - } else - t1 = A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); - return t1; - } - $label1$1: { - if (t1) { - t2 = 1; - break $label1$1; - } - if (alphaValue instanceof A.SassString && !alphaValue._hasQuotes && "none" === alphaValue._string$_text) { - t2 = _null; - break $label1$1; - } - t2 = A._percentageOrUnitless(alphaValue.assertNumber$1($name), 1, "alpha"); - t2 = isNaN(t2) ? 0 : B.JSNumber_methods.clamp$2(t2, 0, 1); - break $label1$1; - } - if (space == null) - return A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); - if (B.JSArray_methods.any$1(channels, new A._parseChannels_closure0())) { - if (channels.length === 3 && B.Set_2Dcfy.contains$1(0, space)) { - t2 = A.List_List$of(channels, true, type$.Value); - if (!t1) - t2.push(alphaValue); - t1 = A._functionString(functionName, t2); - } else - t1 = A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); - return t1; - } - if (channels.length !== 3) - throw A.wrapException(A.SassScriptException$("The " + space.toString$0(0) + " color space has 3 channels but " + input.toString$0(0) + " has " + channels.length + ".", $name)); - t1 = channels[0]; - t1 = t1 instanceof A.SassNumber ? t1 : _null; - t3 = channels[1]; - t3 = t3 instanceof A.SassNumber ? t3 : _null; - t4 = channels[2]; - t4 = t4 instanceof A.SassNumber ? t4 : _null; - return A._colorFromChannels(space, t1, t3, t4, t2, true, space === B.RgbColorSpace_mlz); - }, - _parseSlashChannels(input, $name) { - var _1_1, alphaValue, t1, components, _1_7, _1_9_isSet, _1_8, _1_9, initial, t2, _0_0, _0_1, channel3, alpha, _1_16, _1_16_isSet, _1_9_isSet0, t3, _null = null, - _1_0 = input.assertCommonListStyle$2$allowSlash($name, true); - $label0$0: { - _1_1 = _1_0.length; - alphaValue = _null; - t1 = false; - if (_1_1 === 2) { - components = _1_0[0]; - alphaValue = _1_0[1]; - t1 = input.get$separator(input) === B.ListSeparator_cQA; - } else - components = _null; - if (t1) { - t1 = new A._Record_2(components, alphaValue); - break $label0$0; - } - t1 = input.get$separator(input); - if (t1 === B.ListSeparator_cQA) { - t1 = _1_0.length; - A.throwExpression(A.SassScriptException$(string$.Only_2 + t1 + " " + A.pluralize("was", t1, "were") + " passed.", $name)); - } - _1_7 = _1_1 >= 1; - _1_9_isSet = _1_7; - _1_8 = _null; - _1_9 = _null; - initial = _null; - t1 = false; - if (_1_9_isSet) { - _1_8 = B.JSArray_methods.sublist$2(_1_0, 0, _1_1 - 1); - initial = _1_8; - _1_9 = _1_0[_1_1 - 1]; - t2 = _1_9; - if (t2 instanceof A.SassString) { - type$.SassString._as(_1_9); - t1 = !_1_9._hasQuotes; - } - } - if (t1) { - if (_1_9_isSet) - t1 = _1_9; - else { - _1_9 = _1_0[_1_1 - 1]; - t1 = _1_9; - } - _0_0 = type$.SassString._as(t1)._string$_text.split("/"); - $label1$1: { - _0_1 = _0_0.length; - if (_0_1 === 1) { - t1 = new A._Record_2(input, _null); - break $label1$1; - } - if (_0_1 === 2) { - channel3 = _0_0[0]; - alpha = _0_0[1]; - t1 = A.List_List$of(initial, true, type$.Value); - t1.push(A._parseNumberOrString(channel3)); - t1 = new A._Record_2(A.SassList$(t1, B.ListSeparator_nbm, false), A._parseNumberOrString(alpha)); - break $label1$1; - } - t1 = _null; - break $label1$1; - } - break $label0$0; - } - _1_16 = _null; - _1_16_isSet = false; - t1 = false; - if (_1_7) { - _1_9_isSet0 = true; - if (_1_9_isSet) - initial = _1_8; - else { - _1_8 = B.JSArray_methods.sublist$2(_1_0, 0, _1_1 - 1); - initial = _1_8; - } - if (_1_9_isSet) - t2 = _1_9; - else { - _1_9 = _1_0[_1_1 - 1]; - t2 = _1_9; - _1_9_isSet = _1_9_isSet0; - } - _1_16_isSet = t2 instanceof A.SassNumber; - if (_1_16_isSet) { - if (_1_9_isSet) - t1 = _1_9; - else { - _1_9 = _1_0[_1_1 - 1]; - t1 = _1_9; - _1_9_isSet = _1_9_isSet0; - } - _1_16 = type$.SassNumber._as(t1).asSlash; - t1 = _1_16; - t1 = type$.Record_2_nullable_Object_and_nullable_Object._is(t1); - } - } else - initial = _null; - if (t1) { - if (_1_16_isSet) - t1 = _1_16; - else { - if (_1_9_isSet) - t1 = _1_9; - else { - _1_9 = _1_0[_1_1 - 1]; - t1 = _1_9; - _1_9_isSet = true; - } - _1_16 = type$.SassNumber._as(t1).asSlash; - t1 = _1_16; - _1_16_isSet = true; - } - if (t1 == null) - t1 = type$.Record_2_nullable_Object_and_nullable_Object._as(t1); - if (_1_16_isSet) - t2 = _1_16; - else { - if (_1_9_isSet) - t2 = _1_9; - else { - _1_9 = _1_0[_1_1 - 1]; - t2 = _1_9; - } - _1_16 = type$.SassNumber._as(t2).asSlash; - t2 = _1_16; - } - if (t2 == null) - t2 = type$.Record_2_nullable_Object_and_nullable_Object._as(t2); - t3 = A.List_List$of(initial, true, type$.Value); - t3.push(t1._0); - t2 = new A._Record_2(A.SassList$(t3, B.ListSeparator_nbm, false), t2._1); - t1 = t2; - break $label0$0; - } - t1 = new A._Record_2(input, _null); - break $label0$0; - } - return t1; - }, - _parseNumberOrString(text) { - var t1, expression, exception; - try { - t1 = A.ScssParser$(text, null); - expression = t1._parseSingleProduction$1$1(t1.get$_number(), type$.NumberExpression); - t1 = A.SassNumber_SassNumber(expression.value, expression.unit); - return t1; - } catch (exception) { - if (type$.SassFormatException._is(A.unwrapException(exception))) - return new A.SassString(text, false); - else - throw exception; - } - }, - _colorFromChannels(space, channel0, channel1, channel2, alpha, clamp, fromRgbFunction) { - var t1, t2, whiteness, blackness, t3; - switch (space) { - case B.HslColorSpace_gsm: - if (channel1 != null) - A._checkPercent(channel1, "saturation"); - if (channel2 != null) - A._checkPercent(channel2, "lightness"); - t1 = space._channels; - return A.SassColor_SassColor$hsl(A.NullableExtension_andThen(channel0, new A._colorFromChannels_closure()), A._channelFromValue(t1[1], A._forcePercent(channel1), clamp), A._channelFromValue(t1[2], A._forcePercent(channel2), clamp), alpha); - case B.HwbColorSpace_06z: - t1 = channel1 == null; - if (!t1) - channel1.assertUnit$2("%", "whiteness"); - t2 = channel2 == null; - if (!t2) - channel2.assertUnit$2("%", "blackness"); - whiteness = t1 ? null : channel1._number$_value; - blackness = t2 ? null : channel2._number$_value; - if (whiteness != null && blackness != null && whiteness + blackness > 100) { - t1 = whiteness + blackness; - whiteness = whiteness / t1 * 100; - blackness = blackness / t1 * 100; - } - return A.SassColor_SassColor$hwb(A.NullableExtension_andThen(channel0, new A._colorFromChannels_closure0()), whiteness, blackness, alpha); - case B.RgbColorSpace_mlz: - t1 = space._channels; - t2 = A._channelFromValue(t1[0], channel0, clamp); - t3 = A._channelFromValue(t1[1], channel1, clamp); - t1 = A._channelFromValue(t1[2], channel2, clamp); - return A.SassColor_SassColor$rgbInternal(t2, t3, t1, alpha, fromRgbFunction ? B.C__ColorFormatEnum : null); - default: - t1 = space._channels; - return A.SassColor_SassColor$forSpaceInternal(space, A._channelFromValue(t1[0], channel0, clamp), A._channelFromValue(t1[1], channel1, clamp), A._channelFromValue(t1[2], channel2, clamp), alpha); - } - }, - _forcePercent(number) { - var t1, _0_3; - $label0$0: { - if (number == null) { - t1 = null; - break $label0$0; - } - _0_3 = number.get$numeratorUnits(number); - if (_0_3.length === 1) - t1 = "%" === _0_3[0] && number.get$denominatorUnits(number).length <= 0; - else - t1 = false; - if (t1) { - t1 = number; - break $label0$0; - } - t1 = A.SassNumber_SassNumber(number._number$_value, "%"); - break $label0$0; - } - return t1; - }, - _channelFromValue(channel, value, clamp) { - return A.NullableExtension_andThen(value, new A._channelFromValue_closure(channel, clamp)); - }, - _isNone(value) { - return value instanceof A.SassString && !value._hasQuotes && value._string$_text.toLowerCase() === "none"; - }, - _channelFunction($name, space, getter, global, unit) { - return A.BuiltInCallable$function($name, "$color", new A._channelFunction_closure(getter, unit, global, $name, space), "sass:color"); - }, - _suggestScaleAndAdjust(original, adjustment, channelName) { - var t2, oldValue, newValue, factor, t3, suggestion, - channel = channelName === "alpha" ? B.LinearChannel_omH : type$.LinearChannel._as(B.JSArray_methods.firstWhere$1(B.List_8aB, new A._suggestScaleAndAdjust_closure(channelName))), - t1 = channel === B.LinearChannel_omH; - if (t1) { - t2 = original.alphaOrNull; - oldValue = t2 == null ? 0 : t2; - } else - oldValue = original.toSpace$1(B.HslColorSpace_gsm).channel$1(0, channelName); - newValue = oldValue + adjustment; - if (adjustment !== 0) { - factor = A._Cell$(); - t2 = channel.max; - if (newValue > t2) - factor.__late_helper$_value = 1; - else { - t3 = channel.min; - if (newValue < t3) - factor.__late_helper$_value = -1; - else if (adjustment > 0) - factor.__late_helper$_value = adjustment / (t2 - oldValue); - else - factor.__late_helper$_value = (newValue - oldValue) / (oldValue - t3); - } - suggestion = "Suggestion" + ("s:\n\ncolor.scale($color, $" + channelName + ": " + A.SassNumber_SassNumber(factor._readLocal$0() * 100, "%").toString$0(0) + ")\n"); - } else - suggestion = "Suggestion:\n\n"; - return suggestion + ("color.adjust($color, $" + channelName + ": " + A.SassNumber_SassNumber(adjustment, t1 ? null : "%").toString$0(0) + ")"); - }, - _missingChannelError(color, channel) { - return A.throwExpression(A.SassScriptException$(string$.Becaus + color.toString$0(0) + ").", channel)); - }, - _channelName(value) { - var t1 = value.assertString$1("channel"); - t1.assertQuoted$1("channel"); - return t1._string$_text; - }, - _function5($name, $arguments, callback) { - return A.BuiltInCallable$function($name, $arguments, callback, "sass:color"); - }, - global_closure0: function global_closure0() { - }, - global_closure1: function global_closure1() { - }, - global_closure2: function global_closure2() { - }, - global_closure3: function global_closure3() { - }, - global_closure4: function global_closure4() { - }, - global_closure5: function global_closure5() { - }, - global_closure6: function global_closure6() { - }, - global_closure7: function global_closure7() { - }, - global_closure8: function global_closure8() { - }, - global_closure9: function global_closure9() { - }, - global_closure10: function global_closure10() { - }, - global_closure11: function global_closure11() { - }, - global_closure12: function global_closure12() { - }, - global_closure13: function global_closure13() { - }, - global_closure14: function global_closure14() { - }, - global_closure15: function global_closure15() { - }, - global_closure16: function global_closure16() { - }, - global_closure17: function global_closure17() { - }, - global_closure18: function global_closure18() { - }, - global_closure19: function global_closure19() { - }, - global_closure20: function global_closure20() { - }, - global_closure21: function global_closure21() { - }, - global_closure22: function global_closure22() { - }, - global_closure23: function global_closure23() { - }, - global_closure24: function global_closure24() { - }, - global_closure25: function global_closure25() { - }, - global_closure26: function global_closure26() { - }, - global_closure27: function global_closure27() { - }, - global_closure28: function global_closure28() { - }, - global_closure29: function global_closure29() { - }, - global_closure30: function global_closure30() { - }, - global_closure31: function global_closure31() { - }, - global_closure32: function global_closure32() { - }, - global_closure33: function global_closure33() { - }, - global_closure34: function global_closure34() { - }, - global_closure35: function global_closure35() { - }, - global__closure: function global__closure() { - }, - global_closure36: function global_closure36() { - }, - global_closure37: function global_closure37() { - }, - global_closure38: function global_closure38() { - }, - global_closure39: function global_closure39() { - }, - global_closure40: function global_closure40() { - }, - global_closure41: function global_closure41() { - }, - global_closure42: function global_closure42() { - }, - module_closure1: function module_closure1() { - }, - module_closure2: function module_closure2() { - }, - module_closure3: function module_closure3() { - }, - module_closure4: function module_closure4() { - }, - module_closure5: function module_closure5() { - }, - module_closure6: function module_closure6() { - }, - module_closure7: function module_closure7() { - }, - module_closure8: function module_closure8() { - }, - module_closure9: function module_closure9() { - }, - module_closure10: function module_closure10() { - }, - module_closure11: function module_closure11() { - }, - module_closure12: function module_closure12() { - }, - module_closure13: function module_closure13() { - }, - module_closure14: function module_closure14() { - }, - module__closure2: function module__closure2() { - }, - module_closure15: function module_closure15() { - }, - module_closure16: function module_closure16() { - }, - module_closure17: function module_closure17() { - }, - module_closure18: function module_closure18() { - }, - module_closure19: function module_closure19() { - }, - module_closure20: function module_closure20() { - }, - module_closure21: function module_closure21() { - }, - module_closure22: function module_closure22() { - }, - module__closure1: function module__closure1(t0) { - this.channelName = t0; - }, - module_closure23: function module_closure23() { - }, - module_closure_toXyzNoMissing: function module_closure_toXyzNoMissing() { - }, - module_closure24: function module_closure24() { - }, - _mix_closure: function _mix_closure() { - }, - _complement_closure: function _complement_closure() { - }, - _adjust_closure: function _adjust_closure() { - }, - _scale_closure: function _scale_closure() { - }, - _change_closure: function _change_closure() { - }, - _ieHexStr_closure: function _ieHexStr_closure() { - }, - _ieHexStr_closure_hexString: function _ieHexStr_closure_hexString() { - }, - _updateComponents_closure: function _updateComponents_closure(t0) { - this.originalColor = t0; - }, - _updateComponents_closure0: function _updateComponents_closure0(t0) { - this._box_0 = t0; - }, - _changeColor_closure: function _changeColor_closure(t0) { - this.alphaArg = t0; - }, - _adjustColor_closure: function _adjustColor_closure() { - }, - _functionString_closure: function _functionString_closure() { - }, - _removedColorFunction_closure: function _removedColorFunction_closure(t0, t1, t2) { - this.name = t0; - this.argument = t1; - this.negative = t2; - }, - _rgb_closure: function _rgb_closure() { - }, - _hsl_closure: function _hsl_closure() { - }, - _parseChannels_closure: function _parseChannels_closure() { - }, - _parseChannels_closure0: function _parseChannels_closure0() { - }, - _colorFromChannels_closure: function _colorFromChannels_closure() { - }, - _colorFromChannels_closure0: function _colorFromChannels_closure0() { - }, - _channelFromValue_closure: function _channelFromValue_closure(t0, t1) { - this.channel = t0; - this.clamp = t1; - }, - _channelFunction_closure: function _channelFunction_closure(t0, t1, t2, t3, t4) { - var _ = this; - _.getter = t0; - _.unit = t1; - _.global = t2; - _.name = t3; - _.space = t4; - }, - _suggestScaleAndAdjust_closure: function _suggestScaleAndAdjust_closure(t0) { - this.channelName = t0; - }, - _function4($name, $arguments, callback) { - return A.BuiltInCallable$function($name, $arguments, callback, "sass:list"); - }, - _length_closure0: function _length_closure0() { - }, - _nth_closure: function _nth_closure() { - }, - _setNth_closure: function _setNth_closure() { - }, - _join_closure: function _join_closure() { - }, - _append_closure0: function _append_closure0() { - }, - _zip_closure: function _zip_closure() { - }, - _zip__closure: function _zip__closure() { - }, - _zip__closure0: function _zip__closure0(t0) { - this._box_0 = t0; - }, - _zip__closure1: function _zip__closure1(t0) { - this._box_0 = t0; - }, - _index_closure0: function _index_closure0() { - }, - _separator_closure: function _separator_closure() { - }, - _isBracketed_closure: function _isBracketed_closure() { - }, - _slash_closure: function _slash_closure() { - }, - _modify(map, keys, modify, addNesting) { - var keyIterator = J.get$iterator$ax(keys); - return keyIterator.moveNext$0() ? new A._modify_modifyNestedMap(keyIterator, modify, addNesting).call$1(map) : modify.call$1(map); - }, - _deepMergeImpl(map1, map2) { - var t2, t3, result, t4, key, value, _1_1, _1_3, _1_3_isSet, _1_30, resultMap, valueMap, merged, - t1 = map1._map$_contents; - if (t1.get$isEmpty(t1)) - return map2; - t2 = map2._map$_contents; - if (t2.get$isEmpty(t2)) - return map1; - t3 = type$.Value; - result = A.LinkedHashMap_LinkedHashMap$of(t1, t3, t3); - for (t1 = A.MapExtensions_get_pairs(t2, t3, t3), t1 = t1.get$iterator(t1), t2 = type$.SassMap; t1.moveNext$0();) { - t4 = t1.get$current(t1); - key = t4._0; - value = t4._1; - t4 = result.$index(0, key); - _1_1 = t4 == null ? null : t4.tryMap$0(); - _1_3 = value.tryMap$0(); - _1_3_isSet = _1_1 != null; - _1_30 = null; - t4 = false; - if (_1_3_isSet) { - resultMap = _1_1 == null ? t2._as(_1_1) : _1_1; - t4 = _1_3 != null; - _1_30 = _1_3; - } else - resultMap = null; - if (t4) { - valueMap = _1_3_isSet ? _1_30 : _1_3; - merged = A._deepMergeImpl(resultMap, valueMap == null ? t2._as(valueMap) : valueMap); - if (merged === resultMap) - continue; - result.$indexSet(0, key, merged); - } else - result.$indexSet(0, key, value); - } - return new A.SassMap(A.ConstantMap_ConstantMap$from(result, t3, t3)); - }, - _function3($name, $arguments, callback) { - return A.BuiltInCallable$function($name, $arguments, callback, "sass:map"); - }, - _get_closure: function _get_closure() { - }, - _set_closure: function _set_closure() { - }, - _set__closure0: function _set__closure0(t0) { - this.$arguments = t0; - }, - _set_closure0: function _set_closure0() { - }, - _set__closure: function _set__closure(t0) { - this._box_0 = t0; - }, - _merge_closure: function _merge_closure() { - }, - _merge_closure0: function _merge_closure0() { - }, - _merge__closure: function _merge__closure(t0) { - this.map2 = t0; - }, - _deepMerge_closure: function _deepMerge_closure() { - }, - _deepRemove_closure: function _deepRemove_closure() { - }, - _deepRemove__closure: function _deepRemove__closure(t0) { - this.keys = t0; - }, - _remove_closure: function _remove_closure() { - }, - _remove_closure0: function _remove_closure0() { - }, - _keys_closure: function _keys_closure() { - }, - _values_closure: function _values_closure() { - }, - _hasKey_closure: function _hasKey_closure() { - }, - _modify_modifyNestedMap: function _modify_modifyNestedMap(t0, t1, t2) { - this.keyIterator = t0; - this.modify = t1; - this.addNesting = t2; - }, - _singleArgumentMathFunc($name, mathFunc) { - return A.BuiltInCallable$function($name, "$number", new A._singleArgumentMathFunc_closure(mathFunc), "sass:math"); - }, - _numberFunction($name, transform) { - return A.BuiltInCallable$function($name, "$number", new A._numberFunction_closure(transform), "sass:math"); - }, - _function2($name, $arguments, callback) { - return A.BuiltInCallable$function($name, $arguments, callback, "sass:math"); - }, - global_closure: function global_closure() { - }, - module_closure0: function module_closure0() { - }, - _ceil_closure: function _ceil_closure() { - }, - _clamp_closure: function _clamp_closure() { - }, - _floor_closure: function _floor_closure() { - }, - _max_closure: function _max_closure() { - }, - _min_closure: function _min_closure() { - }, - _round_closure: function _round_closure() { - }, - _hypot_closure: function _hypot_closure() { - }, - _hypot__closure: function _hypot__closure() { - }, - _log_closure: function _log_closure() { - }, - _pow_closure: function _pow_closure() { - }, - _atan2_closure: function _atan2_closure() { - }, - _compatible_closure: function _compatible_closure() { - }, - _isUnitless_closure: function _isUnitless_closure() { - }, - _unit_closure: function _unit_closure() { - }, - _percentage_closure: function _percentage_closure() { - }, - _randomFunction_closure: function _randomFunction_closure() { - }, - _div_closure: function _div_closure() { - }, - _singleArgumentMathFunc_closure: function _singleArgumentMathFunc_closure(t0) { - this.mathFunc = t0; - }, - _numberFunction_closure: function _numberFunction_closure(t0) { - this.transform = t0; - }, - _function($name, $arguments, callback) { - return A.BuiltInCallable$function($name, $arguments, callback, "sass:meta"); - }, - _shared_closure: function _shared_closure() { - }, - _shared_closure0: function _shared_closure0() { - }, - _shared_closure1: function _shared_closure1() { - }, - _shared_closure2: function _shared_closure2() { - }, - moduleFunctions_closure: function moduleFunctions_closure() { - }, - moduleFunctions_closure0: function moduleFunctions_closure0() { - }, - moduleFunctions__closure: function moduleFunctions__closure() { - }, - moduleFunctions_closure1: function moduleFunctions_closure1() { - }, - _prependParent(compound) { - var _0_3, _0_4, _0_40, t2, _0_4_isSet, t3, rest, _null = null, - t1 = A.EvaluationContext_currentOrNull(), - span = (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan(), - _0_0 = compound.components; - $label0$0: { - _0_3 = _0_0.length >= 1; - _0_4 = _null; - if (_0_3) { - _0_40 = _0_0[0]; - t1 = _0_40; - _0_4 = t1; - t1 = t1 instanceof A.UniversalSelector; - } else - t1 = false; - t2 = _null; - if (t1) { - t1 = t2; - break $label0$0; - } - t1 = false; - if (_0_3) { - _0_4_isSet = true; - t3 = _0_4; - if (t3 instanceof A.TypeSelector) { - t1 = _0_4; - t1 = type$.TypeSelector._as(t1).name.namespace != null; - } - } else - _0_4_isSet = _0_3; - if (t1) { - t1 = t2; - break $label0$0; - } - if (_0_3) { - if (_0_4_isSet) - t1 = _0_4; - else { - _0_4 = _0_0[0]; - t1 = _0_4; - _0_4_isSet = true; - } - t1 = t1 instanceof A.TypeSelector; - } else - t1 = false; - if (t1) { - t1 = _0_4_isSet ? _0_4 : _0_0[0]; - type$.TypeSelector._as(t1); - rest = B.JSArray_methods.sublist$1(_0_0, 1); - t1 = A._setArrayType([new A.ParentSelector(t1.name.name, span)], type$.JSArray_SimpleSelector); - B.JSArray_methods.addAll$1(t1, rest); - t1 = A.CompoundSelector$(t1, span); - break $label0$0; - } - t1 = A._setArrayType([new A.ParentSelector(_null, span)], type$.JSArray_SimpleSelector); - B.JSArray_methods.addAll$1(t1, _0_0); - t1 = A.CompoundSelector$(t1, span); - break $label0$0; - } - return t1; - }, - _function1($name, $arguments, callback) { - return A.BuiltInCallable$function($name, $arguments, callback, "sass:selector"); - }, - _nest_closure: function _nest_closure() { - }, - _nest__closure: function _nest__closure(t0) { - this._box_0 = t0; - }, - _nest__closure0: function _nest__closure0() { - }, - _append_closure: function _append_closure() { - }, - _append__closure: function _append__closure() { - }, - _append__closure0: function _append__closure0(t0) { - this.span = t0; - }, - _append___closure: function _append___closure(t0, t1) { - this.parent = t0; - this.span = t1; - }, - _extend_closure: function _extend_closure() { - }, - _replace_closure: function _replace_closure() { - }, - _unify_closure: function _unify_closure() { - }, - _isSuperselector_closure: function _isSuperselector_closure() { - }, - _simpleSelectors_closure: function _simpleSelectors_closure() { - }, - _simpleSelectors__closure: function _simpleSelectors__closure() { - }, - _parse_closure: function _parse_closure() { - }, - _codepointForIndex(index, lengthInCodepoints, allowNegative) { - var result; - if (index === 0) - return 0; - if (index > 0) - return Math.min(index - 1, lengthInCodepoints); - result = lengthInCodepoints + index; - if (result < 0 && !allowNegative) - return 0; - return result; - }, - _function0($name, $arguments, callback) { - return A.BuiltInCallable$function($name, $arguments, callback, "sass:string"); - }, - module_closure: function module_closure() { - }, - module__closure: function module__closure(t0) { - this.string = t0; - }, - module__closure0: function module__closure0(t0) { - this.string = t0; - }, - _unquote_closure: function _unquote_closure() { - }, - _quote_closure: function _quote_closure() { - }, - _length_closure: function _length_closure() { - }, - _insert_closure: function _insert_closure() { - }, - _index_closure: function _index_closure() { - }, - _slice_closure: function _slice_closure() { - }, - _toUpperCase_closure: function _toUpperCase_closure() { - }, - _toLowerCase_closure: function _toLowerCase_closure() { - }, - _uniqueId_closure: function _uniqueId_closure() { - }, - ImportCache$(importers, loadPaths) { - var t1 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl, - t2 = type$.Record_3_Importer_and_Uri_and_bool_forImport, - t3 = type$.Uri; - return new A.ImportCache(A.ImportCache__toImporters(importers, loadPaths, null), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult)); - }, - ImportCache__toImporters(importers, loadPaths, packageConfig) { - var t1, t2, t3, t4, _i, path, _null = null, - sassPath = A.getEnvironmentVariable("SASS_PATH"); - if (A.isBrowser()) { - t1 = A._setArrayType([], type$.JSArray_Importer); - B.JSArray_methods.addAll$1(t1, importers); - return t1; - } - t1 = A._setArrayType([], type$.JSArray_Importer); - B.JSArray_methods.addAll$1(t1, importers); - for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { - t3 = t2.get$current(t2); - t1.push(new A.FilesystemImporter($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); - } - if (sassPath != null) { - t2 = A.isNodeJs() ? self.process : _null; - t3 = sassPath.split(J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32") ? ";" : ":"); - t4 = t3.length; - _i = 0; - for (; _i < t4; ++_i) { - path = t3[_i]; - t1.push(new A.FilesystemImporter($.$get$context().absolute$15(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); - } - } - return t1; - }, - ImportCache: function ImportCache(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._importers = t0; - _._canonicalizeCache = t1; - _._perImporterCanonicalizeCache = t2; - _._nonCanonicalRelativeUrls = t3; - _._importCache = t4; - _._resultsCache = t5; - }, - ImportCache_canonicalize_closure: function ImportCache_canonicalize_closure(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.baseImporter = t1; - _.resolvedUrl = t2; - _.baseUrl = t3; - _.forImport = t4; - _.key = t5; - _.url = t6; - }, - ImportCache__canonicalize_closure: function ImportCache__canonicalize_closure(t0, t1) { - this.importer = t0; - this.url = t1; - }, - ImportCache_importCanonical_closure: function ImportCache_importCanonical_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.importer = t1; - _.canonicalUrl = t2; - _.originalUrl = t3; - }, - ImportCache_humanize_closure: function ImportCache_humanize_closure(t0) { - this.canonicalUrl = t0; - }, - ImportCache_humanize_closure0: function ImportCache_humanize_closure0() { - }, - ImportCache_humanize_closure1: function ImportCache_humanize_closure1() { - }, - ImportCache_humanize_closure2: function ImportCache_humanize_closure2(t0) { - this.canonicalUrl = t0; - }, - ImportCache_clearCanonicalize_closure: function ImportCache_clearCanonicalize_closure(t0, t1) { - this.$this = t0; - this.url = t1; - }, - Importer: function Importer() { - }, - AsyncImporter: function AsyncImporter() { - }, - CanonicalizeContext: function CanonicalizeContext(t0, t1) { - this._fromImport = t0; - this._containingUrl = t1; - this._wasContainingUrlAccessed = false; - }, - FilesystemImporter: function FilesystemImporter(t0, t1) { - this._loadPath = t0; - this._loadPathDeprecated = t1; - }, - FilesystemImporter_canonicalize_closure: function FilesystemImporter_canonicalize_closure() { - }, - NoOpImporter: function NoOpImporter() { - }, - NodePackageImporter: function NodePackageImporter() { - this.__NodePackageImporter__entryPointDirectory_F = $; - }, - NodePackageImporter__nodePackageExportsResolve_closure: function NodePackageImporter__nodePackageExportsResolve_closure() { - }, - NodePackageImporter__nodePackageExportsResolve_closure0: function NodePackageImporter__nodePackageExportsResolve_closure0() { - }, - NodePackageImporter__nodePackageExportsResolve_closure1: function NodePackageImporter__nodePackageExportsResolve_closure1() { - }, - NodePackageImporter__nodePackageExportsResolve_closure2: function NodePackageImporter__nodePackageExportsResolve_closure2(t0, t1, t2) { - this.$this = t0; - this.exports = t1; - this.packageRoot = t2; - }, - NodePackageImporter__nodePackageExportsResolve__closure: function NodePackageImporter__nodePackageExportsResolve__closure(t0, t1, t2) { - this.$this = t0; - this.variant = t1; - this.packageRoot = t2; - }, - NodePackageImporter__nodePackageExportsResolve__closure0: function NodePackageImporter__nodePackageExportsResolve__closure0() { - }, - NodePackageImporter__getMainExport_closure: function NodePackageImporter__getMainExport_closure() { - }, - ImporterResult: function ImporterResult(t0, t1, t2) { - this.contents = t0; - this._sourceMapUrl = t1; - this.syntax = t2; - }, - fromImport() { - var t1 = type$.nullable_CanonicalizeContext._as($.Zone__current.$index(0, B.Symbol__canonicalizeContext)); - t1 = t1 == null ? null : t1._fromImport; - return t1 === true; - }, - canonicalizeContext() { - var t1, - _0_0 = $.Zone__current.$index(0, B.Symbol__canonicalizeContext); - $label0$0: { - if (_0_0 == null) - A.throwExpression(A.StateError$(string$.canoni)); - if (_0_0 instanceof A.CanonicalizeContext) { - t1 = _0_0; - break $label0$0; - } - t1 = A.throwExpression(A.StateError$(string$.Unexpe + A.S(_0_0) + ".")); - } - return t1; - }, - resolveImportPath(path) { - var t1, - extension = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; - if (extension === ".sass" || extension === ".scss" || extension === ".css") { - t1 = A.fromImport() ? new A.resolveImportPath_closure(path, extension).call$0() : null; - return t1 == null ? A._exactlyOne(A._tryPath(path)) : t1; - } - t1 = A.fromImport() ? new A.resolveImportPath_closure0(path).call$0() : null; - if (t1 == null) - t1 = A._exactlyOne(A._tryPathWithExtensions(path)); - return t1 == null ? A._tryPathAsDirectory(path) : t1; - }, - _tryPathWithExtensions(path) { - var result = A._tryPath(path + ".sass"); - B.JSArray_methods.addAll$1(result, A._tryPath(path + ".scss")); - return result.length !== 0 ? result : A._tryPath(path + ".css"); - }, - _tryPath(path) { - var t1 = $.$get$context(), - partial = A.join(t1.dirname$1(path), "_" + A.ParsedPath_ParsedPath$parse(path, t1.style).get$basename(), null); - t1 = A._setArrayType([], type$.JSArray_String); - if (A.fileExists(partial)) - t1.push(partial); - if (A.fileExists(path)) - t1.push(path); - return t1; - }, - _tryPathAsDirectory(path) { - var t1; - if (!A.dirExists(path)) - return null; - t1 = A.fromImport() ? new A._tryPathAsDirectory_closure(path).call$0() : null; - return t1 == null ? A._exactlyOne(A._tryPathWithExtensions(A.join(path, "index", null))) : t1; - }, - _exactlyOne(paths) { - var _0_1, t1, path; - $label0$0: { - _0_1 = paths.length; - if (_0_1 <= 0) { - t1 = null; - break $label0$0; - } - if (_0_1 === 1) { - path = paths[0]; - t1 = path; - break $label0$0; - } - t1 = A.throwExpression(string$.It_s_n + B.JSArray_methods.map$1$1(paths, new A._exactlyOne_closure(), type$.String).join$1(0, "\n")); - } - return t1; - }, - resolveImportPath_closure: function resolveImportPath_closure(t0, t1) { - this.path = t0; - this.extension = t1; - }, - resolveImportPath_closure0: function resolveImportPath_closure0(t0) { - this.path = t0; - }, - _tryPathAsDirectory_closure: function _tryPathAsDirectory_closure(t0) { - this.path = t0; - }, - _exactlyOne_closure: function _exactlyOne_closure() { - }, - InterpolationBuffer: function InterpolationBuffer(t0, t1, t2) { - this._interpolation_buffer$_text = t0; - this._interpolation_buffer$_contents = t1; - this._spans = t2; - }, - InterpolationMap$(_interpolation, targetLocations) { - var t1 = A.List_List$unmodifiable(targetLocations, type$.SourceLocation), - t2 = _interpolation.contents.length, - expectedLocations = Math.max(0, t2 - 1); - if (t1.length !== expectedLocations) - A.throwExpression(A.ArgumentError$("InterpolationMap must have " + A.S(expectedLocations) + string$.x20targe + t2 + " components.", null)); - return new A.InterpolationMap(_interpolation, t1); - }, - InterpolationMap: function InterpolationMap(t0, t1) { - this._interpolation = t0; - this._targetLocations = t1; - }, - InterpolationMap_mapException_closure: function InterpolationMap_mapException_closure() { - }, - _realCasePath(path) { - var prefix, _null = null, - t1 = A.isNodeJs() ? self.process : _null; - if (!J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { - t1 = A.isNodeJs() ? self.process : _null; - t1 = J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "darwin"); - } else - t1 = true; - if (!t1) - return path; - t1 = A.isNodeJs() ? self.process : _null; - if (J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { - prefix = B.JSString_methods.substring$2(path, 0, $.$get$context().style.rootLength$1(path)); - t1 = prefix.length; - if (t1 !== 0 && A.CharacterExtension_get_isAlphabetic(prefix.charCodeAt(0))) - path = prefix.toUpperCase() + B.JSString_methods.substring$1(path, t1); - } - return new A._realCasePath_helper().call$1(path); - }, - _realCasePath_helper: function _realCasePath_helper() { - }, - _realCasePath_helper_closure: function _realCasePath_helper_closure(t0, t1, t2) { - this.helper = t0; - this.dirname = t1; - this.path = t2; - }, - _realCasePath_helper__closure: function _realCasePath_helper__closure(t0) { - this.basename = t0; - }, - printError(message) { - var t1 = A.isNodeJs() ? self.process : null; - if (t1 != null) { - t1 = J.get$stderr$x(t1); - J.write$1$x(t1, A.S(message == null ? "" : message) + "\n"); - } else { - t1 = self.console; - J.error$1$x(t1, message == null ? "" : message); - } - }, - readFile(path) { - var contents, sourceFile, t1, i; - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$("readFile() is only supported on Node.js")); - contents = A._asString(A._readFile(path, "utf8")); - if (!B.JSString_methods.contains$1(contents, "\ufffd")) - return contents; - sourceFile = A.SourceFile$fromString(contents, $.$get$context().toUri$1(path)); - for (t1 = contents.length, i = 0; i < t1; ++i) { - if (contents.charCodeAt(i) !== 65533) - continue; - throw A.wrapException(A.SassException$("Invalid UTF-8.", A.FileLocation$_(sourceFile, i).pointSpan$0(), null)); - } - return contents; - }, - _readFile(path, encoding) { - return A._systemErrorToFileSystemException(new A._readFile_closure(path, encoding)); - }, - writeFile(path, contents) { - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$("writeFile() is only supported on Node.js")); - return A._systemErrorToFileSystemException(new A.writeFile_closure(path, contents)); - }, - deleteFile(path) { - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$("deleteFile() is only supported on Node.js")); - return A._systemErrorToFileSystemException(new A.deleteFile_closure(path)); - }, - readStdin() { - return A.readStdin$body(); - }, - readStdin$body() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.String), - $async$returnValue, t3, completer, sink, t1, t2; - var $async$readStdin = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = {}; - t2 = A.isNodeJs() ? self.process : null; - if (t2 == null) - throw A.wrapException(A.UnsupportedError$("readStdin() is only supported on Node.js")); - t3 = new A._Future($.Zone__current, type$._Future_String); - completer = new A._AsyncCompleter(t3, type$._AsyncCompleter_String); - t1.contents = null; - sink = new A._StringCallbackSink(new A.readStdin_closure(t1, completer), new A.StringBuffer("")).asUtf8Sink$1(false); - t1 = J.getInterceptor$x(t2); - J.on$2$x(t1.get$stdin(t2), "data", A.allowInterop(new A.readStdin_closure0(sink))); - J.on$2$x(t1.get$stdin(t2), "end", A.allowInterop(new A.readStdin_closure1(sink))); - J.on$2$x(t1.get$stdin(t2), "error", A.allowInterop(new A.readStdin_closure2(completer))); - $async$returnValue = t3; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$readStdin, $async$completer); - }, - fileExists(path) { - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$(string$.fileEx)); - return A._systemErrorToFileSystemException(new A.fileExists_closure(path)); - }, - dirExists(path) { - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$("dirExists() is only supported on Node.js")); - return A._systemErrorToFileSystemException(new A.dirExists_closure(path)); - }, - ensureDir(path) { - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$("ensureDir() is only supported on Node.js")); - return A._systemErrorToFileSystemException(new A.ensureDir_closure(path)); - }, - listDir(path, recursive) { - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$("listDir() is only supported on Node.js")); - return A._systemErrorToFileSystemException(new A.listDir_closure(recursive, path)); - }, - modificationTime(path) { - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$("modificationTime() is only supported on Node.js")); - return A._systemErrorToFileSystemException(new A.modificationTime_closure(path)); - }, - getEnvironmentVariable($name) { - var t1 = A.isNodeJs() ? self.process : null, - env = t1 == null ? null : J.get$env$x(t1); - if (env == null) - t1 = null; - else - t1 = A._asStringQ(env[$name]); - return t1; - }, - _systemErrorToFileSystemException(callback) { - var error, t1, exception, t2; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - error = A.unwrapException(exception); - if (!type$.JsSystemError._is(error)) - throw exception; - t1 = error; - t2 = J.getInterceptor$x(t1); - throw A.wrapException(new A.FileSystemException(J.substring$2$s(t2.get$message(t1), (A.S(t2.get$code(t1)) + ": ").length, J.get$length$asx(t2.get$message(t1)) - (", " + A.S(t2.get$syscall(t1)) + " '" + A.S(t2.get$path(t1)) + "'").length), J.get$path$x(error))); - } - }, - hasTerminal() { - var t1 = A.isNodeJs() ? self.process : null; - return J.$eq$(t1 == null ? null : J.get$isTTY$x(J.get$stdout$x(t1)), true); - }, - isWindows() { - var t1 = A.isNodeJs() ? self.process : null; - return J.$eq$(t1 == null ? null : J.get$platform$x(t1), "win32"); - }, - watchDir(path, poll) { - return A.watchDir$body(path, poll); - }, - watchDir$body(path, poll) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Stream_WatchEvent), - $async$returnValue, _0_0, t2, parcel, controller, watcher, t3, t1, $async$temp1, $async$temp2, $async$temp3; - var $async$watchDir = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = {}; - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$("watchDir() is only supported on Node.js")); - t1.controller = null; - _0_0 = self.parcel_watcher; - if (_0_0 != null) { - t2 = !poll; - parcel = _0_0; - } else { - parcel = null; - t2 = false; - } - $async$goto = t2 ? 3 : 5; - break; - case 3: - // then - $async$temp1 = t1; - $async$temp2 = A; - $async$temp3 = A; - $async$goto = 6; - return A._asyncAwait(A.ParcelWatcher_subscribe(parcel, path, new A.watchDir_closure0(t1)), $async$watchDir); - case 6: - // returning from await. - controller = $async$temp1.controller = $async$temp2.StreamController_StreamController(new $async$temp3.watchDir_closure($async$result), null, null, null, false, type$.WatchEvent); - $async$returnValue = new A._ControllerStream(controller, A._instanceType(controller)._eval$1("_ControllerStream<1>")); - // goto return - $async$goto = 1; - break; - // goto join - $async$goto = 4; - break; - case 5: - // else - watcher = J.watch$2$x(self.chokidar, path, {usePolling: poll}); - t2 = J.getInterceptor$x(watcher); - t2.on$2(watcher, "add", A.allowInterop(new A.watchDir_closure1(t1))); - t2.on$2(watcher, "change", A.allowInterop(new A.watchDir_closure2(t1))); - t2.on$2(watcher, "unlink", A.allowInterop(new A.watchDir_closure3(t1))); - t2.on$2(watcher, "error", A.allowInterop(new A.watchDir_closure4(t1))); - t3 = new A._Future($.Zone__current, type$._Future_Stream_WatchEvent); - t2.on$2(watcher, "ready", A.allowInterop(new A.watchDir_closure5(t1, watcher, new A._AsyncCompleter(t3, type$._AsyncCompleter_Stream_WatchEvent)))); - $async$returnValue = t3; - // goto return - $async$goto = 1; - break; - case 4: - // join - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$watchDir, $async$completer); - }, - FileSystemException: function FileSystemException(t0, t1) { - this.message = t0; - this.path = t1; - }, - _readFile_closure: function _readFile_closure(t0, t1) { - this.path = t0; - this.encoding = t1; - }, - writeFile_closure: function writeFile_closure(t0, t1) { - this.path = t0; - this.contents = t1; - }, - deleteFile_closure: function deleteFile_closure(t0) { - this.path = t0; - }, - readStdin_closure: function readStdin_closure(t0, t1) { - this._box_0 = t0; - this.completer = t1; - }, - readStdin_closure0: function readStdin_closure0(t0) { - this.sink = t0; - }, - readStdin_closure1: function readStdin_closure1(t0) { - this.sink = t0; - }, - readStdin_closure2: function readStdin_closure2(t0) { - this.completer = t0; - }, - fileExists_closure: function fileExists_closure(t0) { - this.path = t0; - }, - dirExists_closure: function dirExists_closure(t0) { - this.path = t0; - }, - ensureDir_closure: function ensureDir_closure(t0) { - this.path = t0; - }, - listDir_closure: function listDir_closure(t0, t1) { - this.recursive = t0; - this.path = t1; - }, - listDir__closure: function listDir__closure(t0) { - this.path = t0; - }, - listDir__closure0: function listDir__closure0() { - }, - listDir_closure_list: function listDir_closure_list() { - }, - listDir__list_closure: function listDir__list_closure(t0, t1) { - this.parent = t0; - this.list = t1; - }, - modificationTime_closure: function modificationTime_closure(t0) { - this.path = t0; - }, - watchDir_closure0: function watchDir_closure0(t0) { - this._box_0 = t0; - }, - watchDir_closure: function watchDir_closure(t0) { - this.subscription = t0; - }, - watchDir_closure1: function watchDir_closure1(t0) { - this._box_0 = t0; - }, - watchDir_closure2: function watchDir_closure2(t0) { - this._box_0 = t0; - }, - watchDir_closure3: function watchDir_closure3(t0) { - this._box_0 = t0; - }, - watchDir_closure4: function watchDir_closure4(t0) { - this._box_0 = t0; - }, - watchDir_closure5: function watchDir_closure5(t0, t1, t2) { - this._box_0 = t0; - this.watcher = t1; - this.completer = t2; - }, - watchDir__closure: function watchDir__closure(t0) { - this.watcher = t0; - }, - JSArray0: function JSArray0() { - }, - Chokidar: function Chokidar() { - }, - ChokidarOptions: function ChokidarOptions() { - }, - ChokidarWatcher: function ChokidarWatcher() { - }, - JSFunction: function JSFunction() { - }, - ImmutableList: function ImmutableList() { - }, - ImmutableMap: function ImmutableMap() { - }, - NodeImporterResult: function NodeImporterResult() { - }, - RenderContext: function RenderContext() { - }, - RenderContextOptions: function RenderContextOptions() { - }, - RenderContextResult: function RenderContextResult() { - }, - RenderContextResultStats: function RenderContextResultStats() { - }, - JSModule: function JSModule() { - }, - JSModuleRequire: function JSModuleRequire() { - }, - ParcelWatcher_subscribe(_this, path, callback) { - var result, - t1 = new A.ParcelWatcher_subscribe_closure(callback); - if (typeof t1 == "function") - A.throwExpression(A.ArgumentError$("Attempting to rewrap a JS function.", null)); - result = function(_call, f) { - return function(arg1, arg2) { - return _call(f, arg1, arg2, arguments.length); - }; - }(A._callDartFunctionFast2, t1); - result[$.$get$DART_CLOSURE_PROPERTY_NAME()] = t1; - return A.promiseToFuture(_this.subscribe(path, result), type$.JSObject); - }, - ParcelWatcher_subscribe_closure: function ParcelWatcher_subscribe_closure(t0) { - this.callback = t0; - }, - JSClass: function JSClass() { - }, - JSUrl: function JSUrl() { - }, - jsThrow0(error) { - return type$.Never._as($.$get$_jsThrow0().call$1(error)); - }, - _PropertyDescriptor: function _PropertyDescriptor() { - }, - _RequireMain: function _RequireMain() { - }, - WarnForDeprecation_warnForDeprecation(_this, deprecation, message, span, trace) { - if (_this instanceof A.DeprecationProcessingLogger) - _this.internalWarn$4$deprecation$span$trace(message, deprecation, span, trace); - else - _this.warn$4$deprecation$span$trace(0, message, true, span, trace); - }, - LoggerWithDeprecationType0: function LoggerWithDeprecationType0() { - }, - _QuietLogger: function _QuietLogger() { - }, - DeprecationProcessingLogger: function DeprecationProcessingLogger(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._warningCounts = t0; - _._inner = t1; - _.silenceDeprecations = t2; - _.fatalDeprecations = t3; - _.futureDeprecations = t4; - _.limitRepetition = t5; - }, - DeprecationProcessingLogger_summarize_closure: function DeprecationProcessingLogger_summarize_closure() { - }, - DeprecationProcessingLogger_summarize_closure0: function DeprecationProcessingLogger_summarize_closure0() { - }, - StderrLogger: function StderrLogger(t0) { - this.color = t0; - }, - TrackingLogger: function TrackingLogger(t0) { - this._tracking$_logger = t0; - this._emittedDebug = this._emittedWarning = false; - }, - BuiltInModule$($name, functions, mixins, variables, $T) { - var t1 = A._Uri__Uri(null, $name, null, "sass"), - t2 = A.BuiltInModule__callableMap(functions, $T), - t3 = A.BuiltInModule__callableMap(mixins, $T), - t4 = variables == null ? B.Map_empty6 : new A.UnmodifiableMapView(variables, type$.UnmodifiableMapView_String_Value); - return new A.BuiltInModule(t1, t2, t3, t4, $T._eval$1("BuiltInModule<0>")); - }, - BuiltInModule__callableMap(callables, $T) { - var t2, _i, callable, - t1 = type$.String; - if (callables == null) - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); - else { - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); - for (t2 = callables.length, _i = 0; _i < callables.length; callables.length === t2 || (0, A.throwConcurrentModificationError)(callables), ++_i) { - callable = callables[_i]; - t1.$indexSet(0, J.get$name$x(callable), callable); - } - t1 = new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); - } - return new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); - }, - BuiltInModule: function BuiltInModule(t0, t1, t2, t3, t4) { - var _ = this; - _.url = t0; - _.functions = t1; - _.mixins = t2; - _.variables = t3; - _.$ti = t4; - }, - ForwardedModuleView_ifNecessary(inner, rule, $T) { - var t2, - t1 = false; - if (rule.prefix == null) - if (rule.shownMixinsAndFunctions == null) - if (rule.shownVariables == null) { - t2 = rule.hiddenMixinsAndFunctions; - t2 = t2 == null ? null : t2._base.get$isEmpty(0); - if (t2 === true) { - t1 = rule.hiddenVariables; - t1 = t1 == null ? null : t1._base.get$isEmpty(0); - t1 = t1 === true; - } - } - if (t1) - return inner; - else - return A.ForwardedModuleView$(inner, rule, $T); - }, - ForwardedModuleView$(_inner, _rule, $T) { - var t1 = _rule.prefix, - t2 = _rule.shownVariables, - t3 = _rule.hiddenVariables, - t4 = _rule.shownMixinsAndFunctions, - t5 = _rule.hiddenMixinsAndFunctions; - return new A.ForwardedModuleView(_inner, _rule, A.ForwardedModuleView__forwardedMap(_inner.get$variables(), t1, t2, t3, type$.Value), A.ForwardedModuleView__forwardedMap(_inner.get$variableNodes(), t1, t2, t3, type$.AstNode), A.ForwardedModuleView__forwardedMap(_inner.get$functions(_inner), t1, t4, t5, $T), A.ForwardedModuleView__forwardedMap(_inner.get$mixins(), t1, t4, t5, $T), $T._eval$1("ForwardedModuleView<0>")); - }, - ForwardedModuleView__forwardedMap(map, prefix, safelist, blocklist, $V) { - var t1 = prefix == null, - t2 = false; - if (t1) - if (safelist == null) - t2 = blocklist == null || blocklist._base.get$isEmpty(0); - if (t2) - return map; - if (!t1) - map = new A.PrefixedMapView(map, prefix, $V._eval$1("PrefixedMapView<0>")); - if (safelist != null) - map = new A.LimitedMapView(map, safelist._base.intersection$1(new A.MapKeySet(map, type$.MapKeySet_nullable_Object)), type$.$env_1_1_String._bind$1($V)._eval$1("LimitedMapView<1,2>")); - else if (blocklist != null && blocklist._base.get$isNotEmpty(0)) - map = A.LimitedMapView$blocklist(map, blocklist, type$.String, $V); - return map; - }, - ForwardedModuleView: function ForwardedModuleView(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _._forwarded_view$_inner = t0; - _._rule = t1; - _.variables = t2; - _.variableNodes = t3; - _.functions = t4; - _.mixins = t5; - _.$ti = t6; - }, - ShadowedModuleView_ifNecessary(inner, functions, mixins, variables, $T) { - return A.ShadowedModuleView__needsBlocklist(inner.get$variables(), variables) || A.ShadowedModuleView__needsBlocklist(inner.get$functions(inner), functions) || A.ShadowedModuleView__needsBlocklist(inner.get$mixins(), mixins) ? new A.ShadowedModuleView(inner, A.ShadowedModuleView__shadowedMap(inner.get$variables(), variables, type$.Value), A.ShadowedModuleView__shadowedMap(inner.get$variableNodes(), variables, type$.AstNode), A.ShadowedModuleView__shadowedMap(inner.get$functions(inner), functions, $T), A.ShadowedModuleView__shadowedMap(inner.get$mixins(), mixins, $T), $T._eval$1("ShadowedModuleView<0>")) : null; - }, - ShadowedModuleView__shadowedMap(map, blocklist, $V) { - var t1 = A.ShadowedModuleView__needsBlocklist(map, blocklist); - return !t1 ? map : A.LimitedMapView$blocklist(map, blocklist, type$.String, $V); - }, - ShadowedModuleView__needsBlocklist(map, blocklist) { - return map.get$isNotEmpty(map) && blocklist.any$1(0, map.get$containsKey()); - }, - ShadowedModuleView: function ShadowedModuleView(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._shadowed_view$_inner = t0; - _.variables = t1; - _.variableNodes = t2; - _.functions = t3; - _.mixins = t4; - _.$ti = t5; - }, - AtRootQueryParser: function AtRootQueryParser(t0, t1) { - this.scanner = t0; - this._interpolationMap = t1; - }, - AtRootQueryParser_parse_closure: function AtRootQueryParser_parse_closure(t0) { - this.$this = t0; - }, - _disallowedFunctionNames_closure: function _disallowedFunctionNames_closure() { - }, - CssParser: function CssParser(t0, t1, t2, t3) { - var _ = this; - _._isUseAllowed = true; - _._inExpression = _._inParentheses = _._inStyleRule = _._stylesheet$_inUnknownAtRule = _._inControlDirective = _._inContentBlock = _._stylesheet$_inMixin = false; - _._globalVariables = t0; - _.warnings = t1; - _.lastSilentComment = null; - _.scanner = t2; - _._interpolationMap = t3; - }, - KeyframeSelectorParser: function KeyframeSelectorParser(t0, t1) { - this.scanner = t0; - this._interpolationMap = t1; - }, - KeyframeSelectorParser_parse_closure: function KeyframeSelectorParser_parse_closure(t0) { - this.$this = t0; - }, - MediaQueryParser: function MediaQueryParser(t0, t1) { - this.scanner = t0; - this._interpolationMap = t1; - }, - MediaQueryParser_parse_closure: function MediaQueryParser_parse_closure(t0) { - this.$this = t0; - }, - Parser_isIdentifier(text) { - var exception; - try { - new A.Parser(A.SpanScanner$(text, null), null)._parseIdentifier$0(); - return true; - } catch (exception) { - if (type$.SassFormatException._is(A.unwrapException(exception))) - return false; - else - throw exception; - } - }, - Parser: function Parser(t0, t1) { - this.scanner = t0; - this._interpolationMap = t1; - }, - Parser__parseIdentifier_closure: function Parser__parseIdentifier_closure(t0) { - this.$this = t0; - }, - Parser_escape_closure: function Parser_escape_closure() { - }, - Parser_scanIdentChar_matches: function Parser_scanIdentChar_matches(t0, t1) { - this.caseSensitive = t0; - this.char = t1; - }, - Parser_spanFrom_closure: function Parser_spanFrom_closure(t0, t1) { - this.$this = t0; - this.span = t1; - }, - SassParser: function SassParser(t0, t1, t2, t3) { - var _ = this; - _._currentIndentation = 0; - _._spaces = _._nextIndentationEnd = _._nextIndentation = null; - _._isUseAllowed = true; - _._inExpression = _._inParentheses = _._inStyleRule = _._stylesheet$_inUnknownAtRule = _._inControlDirective = _._inContentBlock = _._stylesheet$_inMixin = false; - _._globalVariables = t0; - _.warnings = t1; - _.lastSilentComment = null; - _.scanner = t2; - _._interpolationMap = t3; - }, - SassParser_styleRuleSelector_closure: function SassParser_styleRuleSelector_closure() { - }, - SassParser_children_closure: function SassParser_children_closure(t0, t1, t2) { - this.$this = t0; - this.child = t1; - this.children = t2; - }, - SassParser__peekIndentation_closure: function SassParser__peekIndentation_closure() { - }, - SassParser__peekIndentation_closure0: function SassParser__peekIndentation_closure0() { - }, - ScssParser$(contents, url) { - return new A.ScssParser(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.FileSpan), A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span), A.SpanScanner$(contents, url), null); - }, - ScssParser: function ScssParser(t0, t1, t2, t3) { - var _ = this; - _._isUseAllowed = true; - _._inExpression = _._inParentheses = _._inStyleRule = _._stylesheet$_inUnknownAtRule = _._inControlDirective = _._inContentBlock = _._stylesheet$_inMixin = false; - _._globalVariables = t0; - _.warnings = t1; - _.lastSilentComment = null; - _.scanner = t2; - _._interpolationMap = t3; - }, - SelectorParser: function SelectorParser(t0, t1, t2, t3) { - var _ = this; - _._allowParent = t0; - _._plainCss = t1; - _.scanner = t2; - _._interpolationMap = t3; - }, - SelectorParser_parse_closure: function SelectorParser_parse_closure(t0) { - this.$this = t0; - }, - SelectorParser_parseCompoundSelector_closure: function SelectorParser_parseCompoundSelector_closure(t0) { - this.$this = t0; - }, - StylesheetParser: function StylesheetParser() { - }, - StylesheetParser_parse_closure: function StylesheetParser_parse_closure(t0) { - this.$this = t0; - }, - StylesheetParser_parse__closure: function StylesheetParser_parse__closure(t0) { - this.$this = t0; - }, - StylesheetParser_parseArgumentDeclaration_closure: function StylesheetParser_parseArgumentDeclaration_closure(t0) { - this.$this = t0; - }, - StylesheetParser_parseVariableDeclaration_closure: function StylesheetParser_parseVariableDeclaration_closure(t0) { - this.$this = t0; - }, - StylesheetParser_parseUseRule_closure: function StylesheetParser_parseUseRule_closure(t0) { - this.$this = t0; - }, - StylesheetParser__parseSingleProduction_closure: function StylesheetParser__parseSingleProduction_closure(t0, t1, t2) { - this.$this = t0; - this.production = t1; - this.T = t2; - }, - StylesheetParser__statement_closure: function StylesheetParser__statement_closure(t0) { - this.$this = t0; - }, - StylesheetParser_variableDeclarationWithoutNamespace_closure: function StylesheetParser_variableDeclarationWithoutNamespace_closure(t0, t1) { - this.$this = t0; - this.start = t1; - }, - StylesheetParser_variableDeclarationWithoutNamespace_closure0: function StylesheetParser_variableDeclarationWithoutNamespace_closure0(t0) { - this.declaration = t0; - }, - StylesheetParser__styleRule_closure: function StylesheetParser__styleRule_closure(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.wasInStyleRule = t2; - _.start = t3; - }, - StylesheetParser__tryDeclarationChildren_closure: function StylesheetParser__tryDeclarationChildren_closure(t0, t1) { - this.name = t0; - this.value = t1; - }, - StylesheetParser__atRootRule_closure: function StylesheetParser__atRootRule_closure(t0) { - this.query = t0; - }, - StylesheetParser__atRootRule_closure0: function StylesheetParser__atRootRule_closure0() { - }, - StylesheetParser__eachRule_closure: function StylesheetParser__eachRule_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.wasInControlDirective = t1; - _.variables = t2; - _.list = t3; - }, - StylesheetParser__functionRule_closure: function StylesheetParser__functionRule_closure(t0, t1, t2) { - this.name = t0; - this.$arguments = t1; - this.precedingComment = t2; - }, - StylesheetParser__forRule_closure: function StylesheetParser__forRule_closure(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - StylesheetParser__forRule_closure0: function StylesheetParser__forRule_closure0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.wasInControlDirective = t2; - _.variable = t3; - _.from = t4; - _.to = t5; - }, - StylesheetParser__memberList_closure: function StylesheetParser__memberList_closure(t0, t1, t2) { - this.$this = t0; - this.variables = t1; - this.identifiers = t2; - }, - StylesheetParser__includeRule_closure: function StylesheetParser__includeRule_closure(t0) { - this.contentArguments_ = t0; - }, - StylesheetParser_mediaRule_closure: function StylesheetParser_mediaRule_closure(t0) { - this.query = t0; - }, - StylesheetParser__mixinRule_closure: function StylesheetParser__mixinRule_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.name = t1; - _.$arguments = t2; - _.precedingComment = t3; - }, - StylesheetParser_mozDocumentRule_closure: function StylesheetParser_mozDocumentRule_closure(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.name = t2; - _.value = t3; - }, - StylesheetParser_supportsRule_closure: function StylesheetParser_supportsRule_closure(t0) { - this.condition = t0; - }, - StylesheetParser__whileRule_closure: function StylesheetParser__whileRule_closure(t0, t1, t2) { - this.$this = t0; - this.wasInControlDirective = t1; - this.condition = t2; - }, - StylesheetParser_unknownAtRule_closure: function StylesheetParser_unknownAtRule_closure(t0, t1) { - this._box_0 = t0; - this.name = t1; - }, - StylesheetParser__expression_resetState: function StylesheetParser__expression_resetState(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.start = t2; - }, - StylesheetParser__expression_resolveOneOperation: function StylesheetParser__expression_resolveOneOperation(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - StylesheetParser__expression_resolveOperations: function StylesheetParser__expression_resolveOperations(t0, t1) { - this._box_0 = t0; - this.resolveOneOperation = t1; - }, - StylesheetParser__expression_addSingleExpression: function StylesheetParser__expression_addSingleExpression(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.resetState = t2; - _.resolveOperations = t3; - }, - StylesheetParser__expression_addOperator: function StylesheetParser__expression_addOperator(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.resolveOneOperation = t2; - }, - StylesheetParser__expression_resolveSpaceExpressions: function StylesheetParser__expression_resolveSpaceExpressions(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.resolveOperations = t2; - }, - StylesheetParser_expressionUntilComma_closure: function StylesheetParser_expressionUntilComma_closure(t0) { - this.$this = t0; - }, - StylesheetParser__isHexColor_closure: function StylesheetParser__isHexColor_closure() { - }, - StylesheetParser__unicodeRange_closure: function StylesheetParser__unicodeRange_closure() { - }, - StylesheetParser__unicodeRange_closure0: function StylesheetParser__unicodeRange_closure0() { - }, - StylesheetParser_namespacedExpression_closure: function StylesheetParser_namespacedExpression_closure(t0, t1) { - this.$this = t0; - this.start = t1; - }, - StylesheetParser_trySpecialFunction_closure: function StylesheetParser_trySpecialFunction_closure() { - }, - StylesheetParser__expressionUntilComparison_closure: function StylesheetParser__expressionUntilComparison_closure(t0) { - this.$this = t0; - }, - StylesheetParser__publicIdentifier_closure: function StylesheetParser__publicIdentifier_closure(t0, t1) { - this.$this = t0; - this.start = t1; - }, - StylesheetNode$_(_stylesheet, importer, canonicalUrl, allUpstream) { - var t1 = new A.StylesheetNode(_stylesheet, importer, canonicalUrl, allUpstream._1, allUpstream._0, A.LinkedHashSet_LinkedHashSet$_empty(type$.StylesheetNode)); - t1.StylesheetNode$_$4(_stylesheet, importer, canonicalUrl, allUpstream); - return t1; - }, - StylesheetGraph: function StylesheetGraph(t0, t1, t2) { - this._nodes = t0; - this.importCache = t1; - this._transitiveModificationTimes = t2; - }, - StylesheetGraph_modifiedSince_transitiveModificationTime: function StylesheetGraph_modifiedSince_transitiveModificationTime(t0) { - this.$this = t0; - }, - StylesheetGraph_modifiedSince_transitiveModificationTime_closure: function StylesheetGraph_modifiedSince_transitiveModificationTime_closure(t0, t1) { - this.node = t0; - this.transitiveModificationTime = t1; - }, - StylesheetGraph__add_closure: function StylesheetGraph__add_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.url = t1; - _.baseImporter = t2; - _.baseUrl = t3; - }, - StylesheetGraph_addCanonical_closure: function StylesheetGraph_addCanonical_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.importer = t1; - _.canonicalUrl = t2; - _.originalUrl = t3; - }, - StylesheetGraph_reload_closure: function StylesheetGraph_reload_closure(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.canonicalUrl = t2; - }, - StylesheetGraph__nodeFor_closure: function StylesheetGraph__nodeFor_closure(t0, t1, t2, t3, t4) { - var _ = this; - _.$this = t0; - _.url = t1; - _.baseImporter = t2; - _.baseUrl = t3; - _.forImport = t4; - }, - StylesheetGraph__nodeFor_closure0: function StylesheetGraph__nodeFor_closure0(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - StylesheetNode: function StylesheetNode(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._stylesheet = t0; - _.importer = t1; - _.canonicalUrl = t2; - _._upstream = t3; - _._upstreamImports = t4; - _._downstream = t5; - }, - Syntax_forPath(path) { - var t1, - _0_0 = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; - $label0$0: { - if (".sass" === _0_0) { - t1 = B.Syntax_Sass_sass; - break $label0$0; - } - if (".css" === _0_0) { - t1 = B.Syntax_CSS_css; - break $label0$0; - } - t1 = B.Syntax_SCSS_scss; - break $label0$0; - } - return t1; - }, - Syntax: function Syntax(t0, t1) { - this._syntax$_name = t0; - this._name = t1; - }, - Box: function Box(t0, t1) { - this._box$_inner = t0; - this.$ti = t1; - }, - ModifiableBox: function ModifiableBox(t0, t1) { - this.value = t0; - this.$ti = t1; - }, - LazyFileSpan: function LazyFileSpan(t0) { - this._builder = t0; - this._lazy_file_span$_span = null; - }, - LimitedMapView$blocklist(_map, blocklist, $K, $V) { - var t2, key, - t1 = A.LinkedHashSet_LinkedHashSet$_empty($K); - for (t2 = J.get$iterator$ax(_map.get$keys(_map)); t2.moveNext$0();) { - key = t2.get$current(t2); - if (!blocklist.contains$1(0, key)) - t1.add$1(0, key); - } - return new A.LimitedMapView(_map, t1, $K._eval$1("@<0>")._bind$1($V)._eval$1("LimitedMapView<1,2>")); - }, - LimitedMapView: function LimitedMapView(t0, t1, t2) { - this._limited_map_view$_map = t0; - this._limited_map_view$_keys = t1; - this.$ti = t2; - }, - MapExtensions_get_pairs(_this, $K, $V) { - return _this.get$entries(_this).map$1$1(0, new A.MapExtensions_get_pairs_closure($K, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("+(1,2)")); - }, - MapExtensions_get_pairs_closure: function MapExtensions_get_pairs_closure(t0, t1) { - this.K = t0; - this.V = t1; - }, - MergedMapView$(maps, $K, $V) { - var t1 = $K._eval$1("@<0>")._bind$1($V); - t1 = new A.MergedMapView(A.LinkedHashMap_LinkedHashMap$_empty($K, t1._eval$1("Map<1,2>")), t1._eval$1("MergedMapView<1,2>")); - t1.MergedMapView$1(maps, $K, $V); - return t1; - }, - MergedMapView: function MergedMapView(t0, t1) { - this._mapsByKey = t0; - this.$ti = t1; - }, - MultiDirWatcher: function MultiDirWatcher(t0, t1, t2) { - this._watchers = t0; - this._group = t1; - this._poll = t2; - }, - MultiSpan: function MultiSpan(t0, t1, t2) { - this._multi_span$_primary = t0; - this.primaryLabel = t1; - this.secondarySpans = t2; - }, - NoSourceMapBuffer: function NoSourceMapBuffer(t0) { - this._no_source_map_buffer$_buffer = t0; - }, - PrefixedMapView: function PrefixedMapView(t0, t1, t2) { - this._prefixed_map_view$_map = t0; - this._prefix = t1; - this.$ti = t2; - }, - _PrefixedKeys: function _PrefixedKeys(t0) { - this._view = t0; - }, - _PrefixedKeys_iterator_closure: function _PrefixedKeys_iterator_closure(t0) { - this.$this = t0; - }, - PublicMemberMapView: function PublicMemberMapView(t0, t1) { - this._public_member_map_view$_inner = t0; - this.$ti = t1; - }, - SourceMapBuffer: function SourceMapBuffer(t0, t1) { - var _ = this; - _._source_map_buffer$_buffer = t0; - _._entries = t1; - _._column = _._line = 0; - _._inSpan = false; - }, - SourceMapBuffer_buildSourceMap_closure: function SourceMapBuffer_buildSourceMap_closure(t0, t1) { - this._box_0 = t0; - this.prefixLength = t1; - }, - UnprefixedMapView: function UnprefixedMapView(t0, t1, t2) { - this._unprefixed_map_view$_map = t0; - this._unprefixed_map_view$_prefix = t1; - this.$ti = t2; - }, - _UnprefixedKeys: function _UnprefixedKeys(t0) { - this._unprefixed_map_view$_view = t0; - }, - _UnprefixedKeys_iterator_closure: function _UnprefixedKeys_iterator_closure(t0) { - this.$this = t0; - }, - _UnprefixedKeys_iterator_closure0: function _UnprefixedKeys_iterator_closure0(t0) { - this.$this = t0; - }, - toSentence(iter, conjunction) { - if (iter.get$length(iter) === 1) - return J.toString$0$(iter.get$first(iter)); - return A.IterableExtension_get_exceptLast(iter).join$1(0, ", ") + (" " + conjunction + " " + A.S(iter.get$last(iter))); - }, - indent(string, indentation) { - return new A.MappedListIterable(A._setArrayType(string.split("\n"), type$.JSArray_String), new A.indent_closure(indentation), type$.MappedListIterable_String_String).join$1(0, "\n"); - }, - pluralize($name, number, plural) { - if (number === 1) - return $name; - if (plural != null) - return plural; - return $name + "s"; - }, - trimAscii(string, excludeEscape) { - var t1, - start = A._firstNonWhitespace(string); - if (start == null) - t1 = ""; - else { - t1 = A._lastNonWhitespace(string, true); - t1.toString; - t1 = B.JSString_methods.substring$2(string, start, t1 + 1); - } - return t1; - }, - trimAsciiRight(string, excludeEscape) { - var end = A._lastNonWhitespace(string, excludeEscape); - return end == null ? "" : B.JSString_methods.substring$2(string, 0, end + 1); - }, - _firstNonWhitespace(string) { - var t1, i, t2; - for (t1 = string.length, i = 0; i < t1; ++i) { - t2 = string.charCodeAt(i); - if (!(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12)) - return i; - } - return null; - }, - _lastNonWhitespace(string, excludeEscape) { - var i, i0, codeUnit; - for (i = string.length - 1, i0 = i; i0 >= 0; --i0) { - codeUnit = string.charCodeAt(i0); - if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) - if (excludeEscape && i0 !== 0 && i0 !== i && codeUnit === 92) - return i0 + 1; - else - return i0; - } - return null; - }, - isPublic(member) { - var start = member.charCodeAt(0); - return start !== 45 && start !== 95; - }, - flattenVertically(iterable, $T) { - var result, - t1 = iterable.$ti._eval$1("@")._bind$1($T._eval$1("QueueList<0>"))._eval$1("MappedListIterable<1,2>"), - queues = A.List_List$of(new A.MappedListIterable(iterable, new A.flattenVertically_closure($T), t1), true, t1._eval$1("ListIterable.E")); - if (queues.length === 1) - return B.JSArray_methods.get$first(queues); - result = A._setArrayType([], $T._eval$1("JSArray<0>")); - for (; queues.length !== 0;) { - if (!!queues.fixed$length) - A.throwExpression(A.UnsupportedError$("removeWhere")); - B.JSArray_methods._removeWhere$2(queues, new A.flattenVertically_closure0(result, $T), true); - } - return result; - }, - codepointIndexToCodeUnitIndex(string, codepointIndex) { - var codeUnitIndex, i, codeUnitIndex0; - for (codeUnitIndex = 0, i = 0; i < codepointIndex; ++i) { - codeUnitIndex0 = codeUnitIndex + 1; - codeUnitIndex = string.charCodeAt(codeUnitIndex) >>> 10 === 54 ? codeUnitIndex0 + 1 : codeUnitIndex0; - } - return codeUnitIndex; - }, - codeUnitIndexToCodepointIndex(string, codeUnitIndex) { - var codepointIndex, i; - for (codepointIndex = 0, i = 0; i < codeUnitIndex; i = (string.charCodeAt(i) >>> 10 === 54 ? i + 1 : i) + 1) - ++codepointIndex; - return codepointIndex; - }, - frameForSpan(span, member, url) { - var t2, t3, - t1 = url == null ? span.get$sourceUrl(span) : url; - if (t1 == null) - t1 = $.$get$_noSourceUrl(); - t2 = span.get$start(span); - t2 = t2.file.getLine$1(t2.offset); - t3 = span.get$start(span); - return new A.Frame(t1, t2 + 1, t3.file.getColumn$1(t3.offset) + 1, member); - }, - declarationName(span) { - var text = span.get$text(); - return A.trimAsciiRight(B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")), false); - }, - unvendor($name) { - var i, - t1 = $name.length; - if (t1 < 2) - return $name; - if ($name.charCodeAt(0) !== 45) - return $name; - if ($name.charCodeAt(1) === 45) - return $name; - for (i = 2; i < t1; ++i) - if ($name.charCodeAt(i) === 45) - return B.JSString_methods.substring$1($name, i + 1); - return $name; - }, - equalsIgnoreCase(string1, string2) { - var t1, i; - if (string1 === string2) - return true; - if (string1 == null) - return false; - t1 = string1.length; - if (t1 !== string2.length) - return false; - for (i = 0; i < t1; ++i) - if (!A.characterEqualsIgnoreCase(string1.charCodeAt(i), string2.charCodeAt(i))) - return false; - return true; - }, - startsWithIgnoreCase(string, prefix) { - var i, - t1 = prefix.length; - if (string.length < t1) - return false; - for (i = 0; i < t1; ++i) - if (!A.characterEqualsIgnoreCase(string.charCodeAt(i), prefix.charCodeAt(i))) - return false; - return true; - }, - mapInPlace(list, $function) { - var i; - for (i = 0; i < list.length; ++i) - list[i] = $function.call$1(list[i]); - }, - longestCommonSubsequence(list1, list2, select, $T) { - var t1, _i, selections, i, i0, j, selection, j0, - _length = list1.get$length(0) + 1, - lengths = J.JSArray_JSArray$allocateFixed(_length, type$.List_int); - for (t1 = type$.int, _i = 0; _i < _length; ++_i) - lengths[_i] = A.List_List$filled(((list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0) + 1, 0, false, t1); - _length = list1.get$length(0); - selections = J.JSArray_JSArray$allocateFixed(_length, $T._eval$1("List<0?>")); - for (t1 = $T._eval$1("0?"), _i = 0; _i < _length; ++_i) - selections[_i] = A.List_List$filled((list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0, null, false, t1); - for (i = 0; i < (list1._queue_list$_tail - list1._queue_list$_head & J.get$length$asx(list1._queue_list$_table) - 1) >>> 0; i = i0) - for (i0 = i + 1, j = 0; j < (list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0; j = j0) { - selection = select.call$2(list1.$index(0, i), list2.$index(0, j)); - selections[i][j] = selection; - t1 = lengths[i0]; - j0 = j + 1; - t1[j0] = selection == null ? Math.max(t1[j], lengths[i][j0]) : lengths[i][j] + 1; - } - return new A.longestCommonSubsequence_backtrack(selections, lengths, $T).call$2(list1.get$length(0) - 1, list2.get$length(0) - 1); - }, - removeFirstWhere(list, test, orElse) { - var i; - for (i = 0; i < list.length; ++i) { - if (!test.call$1(list[i])) - continue; - B.JSArray_methods.removeAt$1(list, i); - return; - } - orElse.call$0(); - }, - mapAddAll2(destination, source, K1, K2, $V) { - source.forEach$1(0, new A.mapAddAll2_closure(destination, K1, K2, $V)); - }, - setAll(map, keys, value) { - var t1; - for (t1 = J.get$iterator$ax(keys); t1.moveNext$0();) - map.$indexSet(0, t1.get$current(t1), value); - }, - rotateSlice(list, start, end) { - var i, next, - element = list.$index(0, end - 1); - for (i = start; i < end; ++i, element = next) { - next = list.$index(0, i); - list.$indexSet(0, i, element); - } - }, - mapAsync(iterable, callback, $E, $F) { - return A.mapAsync$body(iterable, callback, $E, $F, $F._eval$1("Iterable<0>")); - }, - mapAsync$body(iterable, callback, $E, $F, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, t2, _i, t1, $async$temp1; - var $async$mapAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = A._setArrayType([], $F._eval$1("JSArray<0>")); - t2 = iterable.length, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - $async$temp1 = t1; - $async$goto = 6; - return A._asyncAwait(callback.call$1(iterable[_i]), $async$mapAsync); - case 6: - // returning from await. - $async$temp1.push($async$result); - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$mapAsync, $async$completer); - }, - putIfAbsentAsync(map, key, ifAbsent, $K, $V) { - return A.putIfAbsentAsync$body(map, key, ifAbsent, $K, $V, $V); - }, - putIfAbsentAsync$body(map, key, ifAbsent, $K, $V, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, t1, value; - var $async$putIfAbsentAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if (map.containsKey$1(key)) { - t1 = map.$index(0, key); - $async$returnValue = t1 == null ? $V._as(t1) : t1; - // goto return - $async$goto = 1; - break; - } - $async$goto = 3; - return A._asyncAwait(ifAbsent.call$0(), $async$putIfAbsentAsync); - case 3: - // returning from await. - value = $async$result; - map.$indexSet(0, key, value); - $async$returnValue = value; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$putIfAbsentAsync, $async$completer); - }, - copyMapOfMap(map, K1, K2, $V) { - var t3, key, child, - t1 = K2._eval$1("@<0>")._bind$1($V)._eval$1("Map<1,2>"), - t2 = A.LinkedHashMap_LinkedHashMap$_empty(K1, t1); - for (t1 = A.MapExtensions_get_pairs(map, K1, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t3 = t1.get$current(t1); - key = t3._0; - child = t3._1; - t3 = A.LinkedHashMap_LinkedHashMap(null, null, null, K2, $V); - t3.addAll$1(0, child); - t2.$indexSet(0, key, t3); - } - return t2; - }, - copyMapOfList(map, $K, $E) { - var t3, - t1 = $E._eval$1("List<0>"), - t2 = A.LinkedHashMap_LinkedHashMap$_empty($K, t1); - for (t1 = A.MapExtensions_get_pairs(map, $K, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t3 = t1.get$current(t1); - t2.$indexSet(0, t3._0, J.toList$0$ax(t3._1)); - } - return t2; - }, - consumeEscapedCharacter(scanner) { - var _1_0, value, i, next, t1; - scanner.expectChar$1(92); - _1_0 = scanner.peekChar$0(); - if (_1_0 == null) - return 65533; - if (_1_0 === 10 || _1_0 === 13 || _1_0 === 12) - scanner.error$1(0, "Expected escape sequence."); - if (A.CharacterExtension_get_isHex(_1_0)) { - for (value = 0, i = 0; i < 6; ++i) { - next = scanner.peekChar$0(); - if (next != null) { - t1 = true; - if (!(next >= 48 && next <= 57)) - if (!(next >= 97 && next <= 102)) - t1 = next >= 65 && next <= 70; - t1 = !t1; - } else - t1 = true; - if (t1) - break; - value = (value << 4 >>> 0) + A.asHex(scanner.readChar$0()); - } - t1 = scanner.peekChar$0(); - if (t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12) - scanner.readChar$0(); - $label0$1: { - if (0 !== value) - t1 = value >= 55296 && value <= 57343 || value >= 1114111; - else - t1 = true; - if (t1) { - t1 = 65533; - break $label0$1; - } - t1 = value; - break $label0$1; - } - return t1; - } - return scanner.readChar$0(); - }, - throwWithTrace(error, originalError, trace) { - var t1 = A.getTrace(originalError); - A.attachTrace(error, t1 == null ? trace : t1); - throw A.wrapException(error); - }, - attachTrace(error, trace) { - var t1; - if (trace.toString$0(0).length === 0) - return; - t1 = $.$get$_traces(); - A.Expando__checkType(error); - if (t1._jsWeakMap.get(error) == null) - t1.$indexSet(0, error, trace); - }, - getTrace(error) { - var t1; - if (typeof error == "string" || typeof error == "number" || A._isBool(error)) - t1 = null; - else { - t1 = $.$get$_traces(); - A.Expando__checkType(error); - t1 = t1._jsWeakMap.get(error); - } - return t1; - }, - indent_closure: function indent_closure(t0) { - this.indentation = t0; - }, - flattenVertically_closure: function flattenVertically_closure(t0) { - this.T = t0; - }, - flattenVertically_closure0: function flattenVertically_closure0(t0, t1) { - this.result = t0; - this.T = t1; - }, - longestCommonSubsequence_backtrack: function longestCommonSubsequence_backtrack(t0, t1, t2) { - this.selections = t0; - this.lengths = t1; - this.T = t2; - }, - mapAddAll2_closure: function mapAddAll2_closure(t0, t1, t2, t3) { - var _ = this; - _.destination = t0; - _.K1 = t1; - _.K2 = t2; - _.V = t3; - }, - SassApiValue_assertSelector(_this, allowParent, $name) { - var error, stackTrace, t1, exception, - string = _this._selectorString$1($name); - try { - t1 = A.SelectorList_SelectorList$parse(string, allowParent, null, false); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SassFormatException._is(t1)) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); - A.throwWithTrace(new A.SassScriptException($name == null ? t1 : "$" + $name + ": " + t1), error, stackTrace); - } else - throw exception; - } - }, - SassApiValue_assertCompoundSelector(_this, $name) { - var error, stackTrace, t1, exception, - allowParent = false, - string = _this._selectorString$1($name); - try { - t1 = new A.SelectorParser(allowParent, false, A.SpanScanner$(string, null), null).parseCompoundSelector$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SassFormatException._is(t1)) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); - A.throwWithTrace(new A.SassScriptException("$" + $name + ": " + t1), error, stackTrace); - } else - throw exception; - } - }, - Value: function Value() { - }, - SassArgumentList$(contents, keywords, separator) { - var t1 = type$.Value; - t1 = new A.SassArgumentList(A.ConstantMap_ConstantMap$from(keywords, type$.String, t1), A.List_List$unmodifiable(contents, t1), separator, false); - t1.SassList$3$brackets(contents, separator, false); - return t1; - }, - SassArgumentList: function SassArgumentList(t0, t1, t2, t3) { - var _ = this; - _._keywords = t0; - _._wereKeywordsAccessed = false; - _._list$_contents = t1; - _._separator = t2; - _._hasBrackets = t3; - }, - SassBoolean: function SassBoolean(t0) { - this.value = t0; - }, - SassCalculation_calc(argument) { - var t1, - _0_0 = A.SassCalculation__simplify(argument); - $label0$0: { - if (_0_0 instanceof A.SassNumber) { - t1 = _0_0; - break $label0$0; - } - if (_0_0 instanceof A.SassCalculation) { - t1 = _0_0; - break $label0$0; - } - t1 = new A.SassCalculation("calc", A.List_List$unmodifiable([_0_0], type$.Object)); - break $label0$0; - } - return t1; - }, - SassCalculation_min($arguments) { - var minimum, _i, arg, t2, - args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), - t1 = args.length; - if (t1 === 0) - throw A.wrapException(A.ArgumentError$("min() must have at least one argument.", null)); - for (minimum = null, _i = 0; _i < t1; ++_i) { - arg = args[_i]; - if (arg instanceof A.SassNumber) - t2 = minimum != null && !minimum.isComparableTo$1(arg); - else - t2 = true; - if (t2) { - minimum = null; - break; - } else if (minimum == null || minimum.greaterThan$1(arg).value) - minimum = arg; - } - if (minimum != null) - return minimum; - A.SassCalculation__verifyCompatibleNumbers(args); - return new A.SassCalculation("min", args); - }, - SassCalculation_max($arguments) { - var maximum, _i, arg, t2, - args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), - t1 = args.length; - if (t1 === 0) - throw A.wrapException(A.ArgumentError$("max() must have at least one argument.", null)); - for (maximum = null, _i = 0; _i < t1; ++_i) { - arg = args[_i]; - if (arg instanceof A.SassNumber) - t2 = maximum != null && !maximum.isComparableTo$1(arg); - else - t2 = true; - if (t2) { - maximum = null; - break; - } else if (maximum == null || maximum.lessThan$1(arg).value) - maximum = arg; - } - if (maximum != null) - return maximum; - A.SassCalculation__verifyCompatibleNumbers(args); - return new A.SassCalculation("max", args); - }, - SassCalculation_hypot($arguments) { - var first, subtotal, i, number, value, t2, t3, - args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), - t1 = args.length; - if (t1 === 0) - throw A.wrapException(A.ArgumentError$("hypot() must have at least one argument.", null)); - A.SassCalculation__verifyCompatibleNumbers(args); - first = B.JSArray_methods.get$first(args); - if (!(first instanceof A.SassNumber) || first.hasUnit$1("%")) - return new A.SassCalculation("hypot", args); - for (subtotal = 0, i = 0; i < t1;) { - number = args[i]; - if (!(number instanceof A.SassNumber) || !number.hasCompatibleUnits$1(first)) - return new A.SassCalculation("hypot", args); - ++i; - value = number.convertValueToMatch$3(first, "numbers[" + i + "]", "numbers[1]"); - subtotal += value * value; - } - t1 = Math.sqrt(subtotal); - t2 = J.getInterceptor$x(first); - t3 = t2.get$numeratorUnits(first); - return A.SassNumber_SassNumber$withUnits(t1, t2.get$denominatorUnits(first), t3); - }, - SassCalculation_abs(argument) { - argument = A.SassCalculation__simplify(argument); - if (!(argument instanceof A.SassNumber)) - return new A.SassCalculation("abs", A._setArrayType([argument], type$.JSArray_Object)); - if (argument.hasUnit$1("%")) - A.warnForDeprecation(string$.Passinp + argument.toString$0(0) + ")\nTo emit a CSS abs() now: abs(#{" + argument.toString$0(0) + string$.x7d__Mor, B.Deprecation_Zk6); - return A.SassNumber_SassNumber(Math.abs(argument._number$_value), null).coerceToMatch$1(argument); - }, - SassCalculation_exp(argument) { - argument = A.SassCalculation__simplify(argument); - if (!(argument instanceof A.SassNumber)) - return new A.SassCalculation("exp", A._setArrayType([argument], type$.JSArray_Object)); - argument.assertNoUnits$0(); - return A.pow0(A.SassNumber_SassNumber(2.718281828459045, null), argument); - }, - SassCalculation_sign(argument) { - var t1, _0_2, t2, arg; - argument = A.SassCalculation__simplify(argument); - $label0$0: { - t1 = argument instanceof A.SassNumber; - if (t1) { - _0_2 = argument._number$_value; - if (!isNaN(_0_2)) - t2 = 0 === _0_2; - else - t2 = true; - } else - t2 = false; - if (t2) { - t1 = argument; - break $label0$0; - } - if (t1) { - t1 = !argument.hasUnit$1("%"); - arg = argument; - } else { - arg = null; - t1 = false; - } - if (t1) { - t1 = A.SassNumber_SassNumber(J.get$sign$in(arg._number$_value), null).coerceToMatch$1(argument); - break $label0$0; - } - t1 = new A.SassCalculation("sign", A._setArrayType([argument], type$.JSArray_Object)); - break $label0$0; - } - return t1; - }, - SassCalculation_clamp(min, value, max) { - var t1, args; - if (value == null && max != null) - throw A.wrapException(A.ArgumentError$("If value is null, max must also be null.", null)); - min = A.SassCalculation__simplify(min); - value = A.NullableExtension_andThen(value, A.calculation_SassCalculation__simplify$closure()); - max = A.NullableExtension_andThen(max, A.calculation_SassCalculation__simplify$closure()); - if (min instanceof A.SassNumber && value instanceof A.SassNumber && max instanceof A.SassNumber && min.hasCompatibleUnits$1(value) && min.hasCompatibleUnits$1(max)) { - if (value.lessThanOrEquals$1(min).value) - return min; - if (value.greaterThanOrEquals$1(max).value) - return max; - return value; - } - t1 = [min]; - if (value != null) - t1.push(value); - if (max != null) - t1.push(max); - args = A.List_List$unmodifiable(t1, type$.Object); - A.SassCalculation__verifyCompatibleNumbers(args); - A.SassCalculation__verifyLength(args, 3); - return new A.SassCalculation("clamp", args); - }, - SassCalculation_pow(base, exponent) { - var t1 = A._setArrayType([base], type$.JSArray_Object); - if (exponent != null) - t1.push(exponent); - A.SassCalculation__verifyLength(t1, 2); - base = A.SassCalculation__simplify(base); - exponent = A.NullableExtension_andThen(exponent, A.calculation_SassCalculation__simplify$closure()); - if (!(base instanceof A.SassNumber) || !(exponent instanceof A.SassNumber)) - return new A.SassCalculation("pow", t1); - base.assertNoUnits$0(); - exponent.assertNoUnits$0(); - return A.pow0(base, exponent); - }, - SassCalculation_log(number, base) { - var t1, t2; - number = A.SassCalculation__simplify(number); - base = A.NullableExtension_andThen(base, A.calculation_SassCalculation__simplify$closure()); - t1 = A._setArrayType([number], type$.JSArray_Object); - t2 = base != null; - if (t2) - t1.push(base); - if (number instanceof A.SassNumber) - t2 = t2 && !(base instanceof A.SassNumber); - else - t2 = true; - if (t2) - return new A.SassCalculation("log", t1); - number.assertNoUnits$0(); - if (base instanceof A.SassNumber) { - base.assertNoUnits$0(); - return A.log(number, base); - } - return A.log(number, null); - }, - SassCalculation_atan2(y, x) { - var t1; - y = A.SassCalculation__simplify(y); - x = A.NullableExtension_andThen(x, A.calculation_SassCalculation__simplify$closure()); - t1 = A._setArrayType([y], type$.JSArray_Object); - if (x != null) - t1.push(x); - A.SassCalculation__verifyLength(t1, 2); - A.SassCalculation__verifyCompatibleNumbers(t1); - if (!(y instanceof A.SassNumber) || !(x instanceof A.SassNumber) || y.hasUnit$1("%") || x.hasUnit$1("%") || !y.hasCompatibleUnits$1(x)) - return new A.SassCalculation("atan2", t1); - return A.SassNumber_SassNumber$withUnits(Math.atan2(y._number$_value, x.convertValueToMatch$3(y, "x", "y")) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); - }, - SassCalculation_rem(dividend, modulus) { - var t1, result; - dividend = A.SassCalculation__simplify(dividend); - modulus = A.NullableExtension_andThen(modulus, A.calculation_SassCalculation__simplify$closure()); - t1 = A._setArrayType([dividend], type$.JSArray_Object); - if (modulus != null) - t1.push(modulus); - A.SassCalculation__verifyLength(t1, 2); - A.SassCalculation__verifyCompatibleNumbers(t1); - if (!(dividend instanceof A.SassNumber) || !(modulus instanceof A.SassNumber) || !dividend.hasCompatibleUnits$1(modulus)) - return new A.SassCalculation("rem", t1); - result = dividend.modulo$1(modulus); - t1 = modulus._number$_value; - if (A.DoubleWithSignedZero_get_signIncludingZero(t1) !== A.DoubleWithSignedZero_get_signIncludingZero(dividend._number$_value)) { - if (t1 == 1 / 0 || t1 == -1 / 0) - return dividend; - if (result._number$_value === 0) - return result.unaryMinus$0(); - return result.minus$1(modulus); - } - return result; - }, - SassCalculation_mod(dividend, modulus) { - var t1; - dividend = A.SassCalculation__simplify(dividend); - modulus = A.NullableExtension_andThen(modulus, A.calculation_SassCalculation__simplify$closure()); - t1 = A._setArrayType([dividend], type$.JSArray_Object); - if (modulus != null) - t1.push(modulus); - A.SassCalculation__verifyLength(t1, 2); - A.SassCalculation__verifyCompatibleNumbers(t1); - if (!(dividend instanceof A.SassNumber) || !(modulus instanceof A.SassNumber) || !dividend.hasCompatibleUnits$1(modulus)) - return new A.SassCalculation("mod", t1); - return dividend.modulo$1(modulus); - }, - SassCalculation_roundInternal(strategyOrNumber, numberOrStep, step, inLegacySassFunction, span, warn) { - var _0_8_isSet, _0_6_isSet, t2, _0_6_isSet0, _0_14_isSet, _0_14, _0_12, _0_16, _0_18, _0_18_isSet, _0_20, _0_20_isSet, strategy, _0_9_isSet0, _0_16_isSet, t3, t4, _0_12_isSet, _0_12_isSet0, rest, _null = null, _s5_ = "round", - _0_1 = A.SassCalculation__simplify(strategyOrNumber), - _0_6 = A.NullableExtension_andThen(numberOrStep, A.calculation_SassCalculation__simplify$closure()), - _0_9 = A.NullableExtension_andThen(step, A.calculation_SassCalculation__simplify$closure()), - _0_10 = _0_1, - _0_8 = _null, - _0_60 = _null, - _0_100 = _null, - _0_10_isSet = false, - _0_90 = _null, - _0_9_isSet = false, - number = _null, - t1 = false; - if (_0_1 instanceof A.SassNumber) { - type$.SassNumber._as(_0_10); - _0_8_isSet = !_0_10.get$hasUnits(); - if (_0_8_isSet) { - _0_8 = _0_6 == null; - _0_9_isSet = _0_8; - _0_60 = _0_6; - if (_0_9_isSet) { - _0_100 = _0_9 == null; - t1 = _0_100; - _0_90 = _0_9; - } - _0_10_isSet = _0_9_isSet; - number = _0_10; - } - _0_6_isSet = _0_8_isSet; - _0_1 = _0_10; - _0_10 = _0_100; - } else { - _0_1 = _0_10; - _0_10 = _0_100; - _0_8_isSet = false; - _0_6_isSet = false; - } - if (t1) - return A.SassNumber_SassNumber(B.JSNumber_methods.round$0(number._number$_value), _null); - t1 = false; - if (_0_1 instanceof A.SassNumber) { - if (_0_8_isSet) - t2 = _0_8; - else { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_60 = t2; - _0_6_isSet = true; - } - _0_8 = t2 == null; - t2 = _0_8; - _0_8_isSet = true; - } - if (t2) { - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - t1 = t1 && inLegacySassFunction != null; - } - number = _0_1; - } else - number = _null; - if (t1) { - warn.call$2(string$.In_fut, B.Deprecation_0Gh); - t1 = B.JSNumber_methods.round$0(number._number$_value); - t2 = number.get$numeratorUnits(number); - return A.SassNumber_SassNumber$withUnits(t1, number.get$denominatorUnits(number), t2); - } - step = _null; - t1 = false; - if (_0_1 instanceof A.SassNumber) { - _0_6_isSet0 = true; - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - if (t2 instanceof A.SassNumber) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - type$.SassNumber._as(t2); - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - t1 = t1 && !_0_1.hasCompatibleUnits$1(t2); - step = t2; - } - number = _0_1; - } else - number = _null; - if (t1) { - t1 = type$.JSArray_Object; - A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([number, step], t1)); - return new A.SassCalculation(_s5_, A._setArrayType([number, step], t1)); - } - step = _null; - t1 = false; - if (_0_1 instanceof A.SassNumber) { - _0_6_isSet0 = true; - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - if (t2 instanceof A.SassNumber) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - type$.SassNumber._as(t2); - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - step = t2; - } - number = _0_1; - } else - number = _null; - if (t1) { - A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([number, step], type$.JSArray_Object)); - return A.SassCalculation__roundWithStep("nearest", number, step); - } - _0_14_isSet = _0_1 instanceof A.SassString; - _0_14 = _null; - _0_12 = _null; - _0_16 = _null; - _0_18 = _null; - _0_18_isSet = false; - _0_20 = _null; - _0_20_isSet = false; - strategy = _null; - number = _null; - step = _null; - t1 = false; - if (_0_14_isSet) { - _0_6_isSet0 = true; - _0_9_isSet0 = true; - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_14 = "nearest" === t2; - t2 = _0_14; - _0_16_isSet = !t2; - t2 = true; - if (_0_16_isSet) { - _0_16 = "up" === _0_12; - t3 = _0_16; - _0_18_isSet = !t3; - if (_0_18_isSet) { - _0_18 = "down" === _0_12; - t3 = _0_18; - _0_20_isSet = !t3; - if (_0_20_isSet) { - _0_20 = "to-zero" === _0_12; - t2 = _0_20; - } - } - } - if (t2) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - if (t2 instanceof A.SassNumber) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - t3 = type$.SassNumber; - t3._as(t2); - if (_0_9_isSet) - t4 = _0_90; - else { - t4 = _0_9; - _0_9_isSet = _0_9_isSet0; - _0_90 = t4; - } - if (t4 instanceof A.SassNumber) { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_9_isSet = _0_9_isSet0; - _0_90 = t1; - } - t3._as(t1); - t3 = !t2.hasCompatibleUnits$1(t1); - step = t1; - t1 = t3; - } - number = t2; - } - strategy = _0_1; - } - } else - _0_16_isSet = false; - if (t1) { - t1 = type$.JSArray_Object; - A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([number, step], t1)); - return new A.SassCalculation(_s5_, A._setArrayType([strategy, number, step], t1)); - } - strategy = _null; - number = _null; - step = _null; - t1 = false; - if (_0_1 instanceof A.SassString) { - _0_6_isSet0 = true; - _0_9_isSet0 = true; - _0_12_isSet = true; - if (_0_14_isSet) { - t2 = _0_14; - _0_12_isSet0 = _0_14_isSet; - } else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_14 = "nearest" === t2; - t2 = _0_14; - _0_12_isSet0 = _0_12_isSet; - _0_14_isSet = true; - } - t3 = true; - if (!t2) { - if (_0_16_isSet) - t2 = _0_16; - else { - if (_0_12_isSet0) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet0 = _0_12_isSet; - } - _0_16 = "up" === t2; - t2 = _0_16; - _0_16_isSet = true; - } - if (!t2) { - if (_0_18_isSet) - t2 = _0_18; - else { - if (_0_12_isSet0) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet0 = _0_12_isSet; - } - _0_18 = "down" === t2; - t2 = _0_18; - _0_18_isSet = true; - } - if (!t2) - if (_0_20_isSet) { - t2 = _0_20; - _0_12_isSet = _0_12_isSet0; - } else { - if (_0_12_isSet0) { - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - } - _0_20 = "to-zero" === t2; - t2 = _0_20; - _0_20_isSet = true; - } - else { - t2 = t3; - _0_12_isSet = _0_12_isSet0; - } - } else { - t2 = t3; - _0_12_isSet = _0_12_isSet0; - } - } else { - t2 = t3; - _0_12_isSet = _0_12_isSet0; - } - if (t2) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - if (t2 instanceof A.SassNumber) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - t3 = type$.SassNumber; - t3._as(t2); - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_9_isSet = _0_9_isSet0; - _0_90 = t1; - } - t1 = t1 instanceof A.SassNumber; - if (t1) { - if (_0_9_isSet) - t4 = _0_90; - else { - t4 = _0_9; - _0_9_isSet = _0_9_isSet0; - _0_90 = t4; - } - t3._as(t4); - step = t4; - } - number = t2; - } - strategy = _0_1; - } - } else - _0_12_isSet = _0_14_isSet; - if (t1) { - A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([number, step], type$.JSArray_Object)); - return A.SassCalculation__roundWithStep(strategy._string$_text, number, step); - } - strategy = _null; - rest = _null; - t1 = false; - if (_0_1 instanceof A.SassString) { - _0_6_isSet0 = true; - _0_12_isSet0 = true; - if (_0_14_isSet) - t2 = _0_14; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_14 = "nearest" === t2; - t2 = _0_14; - _0_14_isSet = true; - } - t3 = true; - if (!t2) { - if (_0_16_isSet) - t2 = _0_16; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_16 = "up" === t2; - t2 = _0_16; - _0_16_isSet = true; - } - if (!t2) { - if (_0_18_isSet) - t2 = _0_18; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_18 = "down" === t2; - t2 = _0_18; - _0_18_isSet = true; - } - if (!t2) - if (_0_20_isSet) - t2 = _0_20; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_20 = "to-zero" === t2; - t2 = _0_20; - _0_20_isSet = true; - } - else - t2 = t3; - } else - t2 = t3; - } else - t2 = t3; - if (t2) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - if (t2 instanceof A.SassString) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - type$.SassString._as(t2); - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - rest = t2; - } - strategy = _0_1; - } - } - if (t1) - return new A.SassCalculation(_s5_, A._setArrayType([strategy, rest], type$.JSArray_Object)); - t1 = false; - if (_0_1 instanceof A.SassString) { - _0_12_isSet0 = true; - if (_0_14_isSet) - t2 = _0_14; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_14 = "nearest" === t2; - t2 = _0_14; - _0_14_isSet = true; - } - t3 = true; - if (!t2) { - if (_0_16_isSet) - t2 = _0_16; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_16 = "up" === t2; - t2 = _0_16; - _0_16_isSet = true; - } - if (!t2) { - if (_0_18_isSet) - t2 = _0_18; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_18 = "down" === t2; - t2 = _0_18; - _0_18_isSet = true; - } - if (!t2) - if (_0_20_isSet) - t2 = _0_20; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_20 = "to-zero" === t2; - t2 = _0_20; - _0_20_isSet = true; - } - else - t2 = t3; - } else - t2 = t3; - } else - t2 = t3; - if (t2) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_60 = t2; - _0_6_isSet = true; - } - if (t2 != null) - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - } - } - if (t1) - throw A.wrapException(A.SassScriptException$(string$.If_str, _null)); - t1 = false; - if (_0_1 instanceof A.SassString) { - _0_12_isSet0 = true; - if (_0_14_isSet) - t2 = _0_14; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_14 = "nearest" === t2; - t2 = _0_14; - _0_14_isSet = true; - } - t3 = true; - if (!t2) { - if (_0_16_isSet) - t2 = _0_16; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_16 = "up" === t2; - t2 = _0_16; - _0_16_isSet = true; - } - if (!t2) { - if (_0_18_isSet) - t2 = _0_18; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_18 = "down" === t2; - t2 = _0_18; - _0_18_isSet = true; - } - if (!t2) - if (_0_20_isSet) - t2 = _0_20; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_20 = "to-zero" === t2; - t2 = _0_20; - _0_20_isSet = true; - } - else - t2 = t3; - } else - t2 = t3; - } else - t2 = t3; - if (t2) { - if (_0_8_isSet) - t2 = _0_8; - else { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_60 = t2; - _0_6_isSet = true; - } - _0_8 = t2 == null; - t2 = _0_8; - _0_8_isSet = true; - } - if (t2) - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - } - } - if (t1) - throw A.wrapException(A.SassScriptException$(string$.Number, _null)); - t1 = false; - if (_0_8_isSet) - t2 = _0_8; - else { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_60 = t2; - _0_6_isSet = true; - } - _0_8 = t2 == null; - t2 = _0_8; - } - if (t2) - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - if (t1) - return new A.SassCalculation(_s5_, A._setArrayType([_0_1], type$.JSArray_Object)); - step = _null; - t1 = false; - _0_6_isSet0 = true; - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - if (t2 != null) { - if (_0_6_isSet) - step = _0_60; - else { - step = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = step; - } - if (step == null) - step = type$.Object._as(step); - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - } - } - if (t1) - return new A.SassCalculation(_s5_, A._setArrayType([_0_1, step], type$.JSArray_Object)); - if (_0_1 instanceof A.SassString) { - t1 = true; - if (_0_14_isSet) - t2 = _0_14; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = true; - } - _0_14 = "nearest" === t2; - t2 = _0_14; - } - if (!t2) { - if (_0_16_isSet) - t2 = _0_16; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = true; - } - _0_16 = "up" === t2; - t2 = _0_16; - } - if (!t2) { - if (_0_18_isSet) - t2 = _0_18; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string$_text; - t2 = _0_12; - _0_12_isSet = true; - } - _0_18 = "down" === t2; - t2 = _0_18; - } - if (!t2) - if (_0_20_isSet) - t1 = _0_20; - else { - if (_0_12_isSet) - t1 = _0_12; - else { - _0_12 = _0_1._string$_text; - t1 = _0_12; - } - _0_20 = "to-zero" === t1; - t1 = _0_20; - } - } - } - } else - t1 = false; - if (!t1) - if (_0_1 instanceof A.SassString) - t1 = _0_1.get$isVar(); - else - t1 = false; - else - t1 = true; - number = _null; - step = _null; - t2 = false; - if (t1) { - _0_6_isSet0 = true; - _0_9_isSet0 = true; - type$.SassString._as(_0_1); - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - if (t1 != null) { - if (_0_6_isSet) - number = _0_60; - else { - number = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = number; - } - if (number == null) - number = type$.Object._as(number); - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_9_isSet = _0_9_isSet0; - _0_90 = t1; - } - t1 = t1 != null; - if (t1) { - if (_0_9_isSet) - step = _0_90; - else { - step = _0_9; - _0_9_isSet = _0_9_isSet0; - _0_90 = step; - } - if (step == null) - step = type$.Object._as(step); - } - } else - t1 = t2; - strategy = _0_1; - } else { - t1 = t2; - strategy = _null; - } - if (t1) - return new A.SassCalculation(_s5_, A._setArrayType([strategy, number, step], type$.JSArray_Object)); - t1 = false; - if ((_0_6_isSet ? _0_60 : _0_6) != null) - t1 = (_0_9_isSet ? _0_90 : _0_9) != null; - if (t1) - throw A.wrapException(A.SassScriptException$(A.S(strategyOrNumber) + string$.x20must_b, _null)); - t1 = A.SassScriptException$("Invalid parameters.", _null); - throw A.wrapException(t1); - }, - SassCalculation_operateInternal(operator, left, right, inLegacySassFunction, simplify, warn) { - var compatible, t1; - if (!simplify) - return new A.CalculationOperation(operator, left, right); - left = A.SassCalculation__simplify(left); - right = A.SassCalculation__simplify(right); - if (B.CalculationOperator_g2q === operator || B.CalculationOperator_CxF === operator) { - if (left instanceof A.SassNumber && right instanceof A.SassNumber) { - compatible = left.hasCompatibleUnits$1(right); - if (!compatible && inLegacySassFunction != null && left.isComparableTo$1(right)) { - t1 = A.S(inLegacySassFunction); - warn.call$2("In future versions of Sass, " + t1 + "() will be interpreted as the CSS " + t1 + string$.x28__cal + t1 + string$.x28__ins, B.Deprecation_0Gh); - compatible = true; - } - if (compatible) - return operator === B.CalculationOperator_g2q ? left.plus$1(right) : left.minus$1(right); - } - A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([left, right], type$.JSArray_Object)); - if (right instanceof A.SassNumber) { - t1 = right._number$_value; - t1 = t1 < 0 && !A.fuzzyEquals(t1, 0); - } else - t1 = false; - if (t1) { - right = right.times$1(A.SassNumber_SassNumber(-1, null)); - operator = operator === B.CalculationOperator_g2q ? B.CalculationOperator_CxF : B.CalculationOperator_g2q; - } - return new A.CalculationOperation(operator, left, right); - } else if (left instanceof A.SassNumber && right instanceof A.SassNumber) - return operator === B.CalculationOperator_171 ? left.times$1(right) : left.dividedBy$1(right); - else - return new A.CalculationOperation(operator, left, right); - }, - SassCalculation__roundWithStep(strategy, number, step) { - var _0_2, t1, _0_6, _0_8_isSet, _0_8, _0_9_isSet, _0_9, _0_11, _0_13, stepWithNumberUnit, t2, _null = null; - if (!A.LinkedHashSet_LinkedHashSet$_literal(["nearest", "up", "down", "to-zero"], type$.String).contains$1(0, strategy)) - throw A.wrapException(A.ArgumentError$(strategy + string$.x20must_b, _null)); - _0_2 = number._number$_value; - if (_0_2 == 1 / 0 || _0_2 == -1 / 0) { - t1 = step._number$_value; - t1 = t1 == 1 / 0 || t1 == -1 / 0; - } else - t1 = false; - if (!t1) { - t1 = step._number$_value; - t1 = t1 === 0 || isNaN(_0_2) || isNaN(t1); - } else - t1 = true; - if (t1) { - t1 = number.get$numeratorUnits(number); - return A.SassNumber_SassNumber$withUnits(0 / 0, number.get$denominatorUnits(number), t1); - } - if (_0_2 == 1 / 0 || _0_2 == -1 / 0) - return number; - t1 = step._number$_value; - if (t1 == 1 / 0 || t1 == -1 / 0) { - $label0$0: { - if (0 === _0_2) { - t1 = number; - break $label0$0; - } - _0_6 = "nearest" === strategy; - t1 = _0_6; - _0_8_isSet = !t1; - _0_8 = _null; - if (_0_8_isSet) { - _0_8 = "to-zero" === strategy; - _0_9_isSet = _0_8; - } else - _0_9_isSet = true; - _0_9 = _null; - if (_0_9_isSet) { - _0_9 = _0_2 > 0; - t1 = _0_9; - } else - t1 = false; - if (t1) { - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits(0, number.get$denominatorUnits(number), t1); - break $label0$0; - } - if (!_0_6) - if (_0_8_isSet) - t1 = _0_8; - else { - _0_8 = "to-zero" === strategy; - t1 = _0_8; - } - else - t1 = true; - if (t1) { - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits(-0.0, number.get$denominatorUnits(number), t1); - break $label0$0; - } - _0_11 = "up" === strategy; - t1 = _0_11; - if (t1) - if (_0_9_isSet) - t1 = _0_9; - else { - _0_9 = _0_2 > 0; - t1 = _0_9; - } - else - t1 = false; - if (t1) { - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits(1 / 0, number.get$denominatorUnits(number), t1); - break $label0$0; - } - if (_0_11) { - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits(-0.0, number.get$denominatorUnits(number), t1); - break $label0$0; - } - _0_13 = "down" === strategy; - t1 = _0_13; - if (t1) - t1 = _0_2 < 0; - else - t1 = false; - if (t1) { - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits(-1 / 0, number.get$denominatorUnits(number), t1); - break $label0$0; - } - if (_0_13) { - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits(0, number.get$denominatorUnits(number), t1); - break $label0$0; - } - t1 = A.throwExpression(A.UnsupportedError$("Invalid argument: " + strategy + ".")); - } - return t1; - } - stepWithNumberUnit = step.convertValueToMatch$1(number); - $label1$1: { - if ("nearest" === strategy) { - t1 = B.JSNumber_methods.round$0(_0_2 / stepWithNumberUnit); - t2 = number.get$numeratorUnits(number); - t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); - t1 = t2; - break $label1$1; - } - if ("up" === strategy) { - t2 = _0_2 / stepWithNumberUnit; - t1 = t1 < 0 ? B.JSNumber_methods.floor$0(t2) : B.JSNumber_methods.ceil$0(t2); - t2 = number.get$numeratorUnits(number); - t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); - t1 = t2; - break $label1$1; - } - if ("down" === strategy) { - t2 = _0_2 / stepWithNumberUnit; - t1 = t1 < 0 ? B.JSNumber_methods.ceil$0(t2) : B.JSNumber_methods.floor$0(t2); - t2 = number.get$numeratorUnits(number); - t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); - t1 = t2; - break $label1$1; - } - if ("to-zero" === strategy) { - t1 = _0_2 / stepWithNumberUnit; - if (_0_2 < 0) { - t1 = B.JSNumber_methods.ceil$0(t1); - t2 = number.get$numeratorUnits(number); - t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); - t1 = t2; - } else { - t1 = B.JSNumber_methods.floor$0(t1); - t2 = number.get$numeratorUnits(number); - t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); - t1 = t2; - } - break $label1$1; - } - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits(0 / 0, number.get$denominatorUnits(number), t1); - break $label1$1; - } - return t1; - }, - SassCalculation__simplify(arg) { - var t1, t2, _0_11_isSet, _0_15, _0_12, _0_16_isSet, text, _0_11, _0_16, _0_12_isSet, _0_15_isSet, value, _null = null, - _s32_ = " can't be used in a calculation."; - $label0$0: { - if (arg instanceof A.SassNumber || arg instanceof A.CalculationOperation) { - t1 = arg; - break $label0$0; - } - t1 = arg instanceof A.SassString; - t2 = _null; - if (t1 && !arg._hasQuotes) { - t1 = arg; - break $label0$0; - } - if (t1) - A.throwExpression(A.SassScriptException$("Quoted string " + arg.toString$0(0) + _s32_, _null)); - _0_11_isSet = arg instanceof A.SassCalculation; - _0_15 = _null; - _0_12 = _null; - _0_16_isSet = false; - text = _null; - t1 = false; - if (_0_11_isSet) { - _0_11 = "calc" === arg.name; - if (_0_11) { - _0_12 = arg.$arguments; - _0_15 = _0_12.length === 1; - _0_16_isSet = _0_15; - if (_0_16_isSet) { - _0_16 = _0_12[0]; - t2 = _0_16; - if (t2 instanceof A.SassString) { - type$.SassString._as(_0_16); - if (!_0_16._hasQuotes) { - text = _0_16._string$_text; - t1 = A.SassCalculation__needsParentheses(text); - } - } - } else - _0_16 = t2; - } else - _0_16 = t2; - _0_12_isSet = _0_11; - _0_15_isSet = _0_12_isSet; - } else { - _0_16 = t2; - _0_11 = _null; - _0_15_isSet = false; - _0_12_isSet = false; - } - if (t1) { - t1 = new A.SassString("(" + A.S(text) + ")", false); - break $label0$0; - } - t1 = false; - if (_0_11_isSet) - if (_0_11) - if (_0_15_isSet) - t1 = _0_15; - else { - if (_0_12_isSet) - t1 = _0_12; - else { - _0_12 = arg.$arguments; - t1 = _0_12; - _0_12_isSet = true; - } - _0_15 = t1.length === 1; - t1 = _0_15; - } - if (t1) { - if (_0_16_isSet) - value = _0_16; - else { - _0_16 = (_0_12_isSet ? _0_12 : arg.$arguments)[0]; - value = _0_16; - } - t1 = value; - break $label0$0; - } - if (_0_11_isSet) { - t1 = arg; - break $label0$0; - } - if (arg instanceof A.Value) - A.throwExpression(A.SassScriptException$("Value " + arg.toString$0(0) + _s32_, _null)); - t1 = A.throwExpression(A.ArgumentError$("Unexpected calculation argument " + A.S(arg) + ".", _null)); - } - return t1; - }, - SassCalculation__needsParentheses(text) { - var t1, couldBeVar, second, third, fourth, i, t2, - first = text.charCodeAt(0); - if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47 || first === 42) - return true; - t1 = text.length; - couldBeVar = t1 >= 4 && A.characterEqualsIgnoreCase(first, 118); - if (t1 < 2) - return false; - second = text.charCodeAt(1); - if (second === 32 || second === 9 || second === 10 || second === 13 || second === 12 || second === 47 || second === 42) - return true; - couldBeVar = couldBeVar && A.characterEqualsIgnoreCase(second, 97); - if (t1 < 3) - return false; - third = text.charCodeAt(2); - if (third === 32 || third === 9 || third === 10 || third === 13 || third === 12 || third === 47 || third === 42) - return true; - couldBeVar = couldBeVar && A.characterEqualsIgnoreCase(third, 114); - if (t1 < 4) - return false; - fourth = text.charCodeAt(3); - if (couldBeVar && fourth === 40) - return true; - if (fourth === 32 || fourth === 9 || fourth === 10 || fourth === 13 || fourth === 12 || fourth === 47 || fourth === 42) - return true; - for (i = 4; i < t1; ++i) { - t2 = text.charCodeAt(i); - if (t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || t2 === 47 || t2 === 42) - return true; - } - return false; - }, - SassCalculation__verifyCompatibleNumbers(args) { - var t1, _i, t2, arg, i, number1, j, number2; - for (t1 = args.length, _i = 0; t2 = args.length, _i < t2; args.length === t1 || (0, A.throwConcurrentModificationError)(args), ++_i) { - arg = args[_i]; - if (arg instanceof A.SassNumber && arg.get$hasComplexUnits()) - throw A.wrapException(A.SassScriptException$("Number " + A.S(arg) + " isn't compatible with CSS calculations.", null)); - } - for (t1 = t2, i = 0; i < t1 - 1; ++i) { - number1 = args[i]; - if (!(number1 instanceof A.SassNumber)) - continue; - for (j = i + 1; t1 = args.length, j < t1; ++j) { - number2 = args[j]; - if (!(number2 instanceof A.SassNumber)) - continue; - if (number1.hasPossiblyCompatibleUnits$1(number2)) - continue; - throw A.wrapException(A.SassScriptException$(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", null)); - } - } - }, - SassCalculation__verifyLength(args, expectedLength) { - var t1; - if (args.length === expectedLength) - return; - if (B.JSArray_methods.any$1(args, new A.SassCalculation__verifyLength_closure())) - return; - t1 = args.length; - throw A.wrapException(A.SassScriptException$("" + expectedLength + " arguments required, but only " + t1 + " " + A.pluralize("was", t1, "were") + " passed.", null)); - }, - SassCalculation__singleArgument($name, argument, mathFunc, forbidUnits) { - argument = A.SassCalculation__simplify(argument); - if (!(argument instanceof A.SassNumber)) - return new A.SassCalculation($name, A._setArrayType([argument], type$.JSArray_Object)); - if (forbidUnits) - argument.assertNoUnits$0(); - return mathFunc.call$1(argument); - }, - SassCalculation: function SassCalculation(t0, t1) { - this.name = t0; - this.$arguments = t1; - }, - SassCalculation__verifyLength_closure: function SassCalculation__verifyLength_closure() { - }, - CalculationOperation: function CalculationOperation(t0, t1, t2) { - this._operator = t0; - this._left = t1; - this._right = t2; - }, - CalculationOperator: function CalculationOperator(t0, t1, t2, t3) { - var _ = this; - _.name = t0; - _.operator = t1; - _.precedence = t2; - _._name = t3; - }, - SassColor_SassColor$rgb(red, green, blue, alpha) { - return A.SassColor_SassColor$rgbInternal(red, green, blue, alpha, null); - }, - SassColor_SassColor$rgbInternal(red, green, blue, alpha, format) { - var _null = null, - t1 = red == null ? _null : red, - t2 = green == null ? _null : green, - t3 = blue == null ? _null : blue; - return A.SassColor$_forSpace(B.RgbColorSpace_mlz, t1, t2, t3, alpha == null ? _null : alpha, format); - }, - SassColor_SassColor$hsl(hue, saturation, lightness, alpha) { - var _null = null, - t1 = hue == null ? _null : hue, - t2 = saturation == null ? _null : saturation, - t3 = lightness == null ? _null : lightness; - return A.SassColor_SassColor$forSpaceInternal(B.HslColorSpace_gsm, t1, t2, t3, alpha == null ? _null : alpha); - }, - SassColor_SassColor$hwb(hue, whiteness, blackness, alpha) { - var _null = null, - t1 = hue == null ? _null : hue, - t2 = whiteness == null ? _null : whiteness, - t3 = blackness == null ? _null : blackness; - return A.SassColor_SassColor$forSpaceInternal(B.HwbColorSpace_06z, t1, t2, t3, alpha == null ? _null : alpha); - }, - SassColor_SassColor$forSpaceInternal(space, channel0, channel1, channel2, alpha) { - var t1, t2, _null = null; - $label0$0: { - if (B.HslColorSpace_gsm === space) { - t1 = channel1 == null; - t2 = A.SassColor__normalizeHue(channel0, !t1 && channel1 < 0 && !A.fuzzyEquals(channel1, 0)); - t2 = A.SassColor$_forSpace(space, t2, t1 ? _null : Math.abs(channel1), channel2, alpha, _null); - t1 = t2; - break $label0$0; - } - if (B.HwbColorSpace_06z === space) { - t1 = A.SassColor$_forSpace(space, A.SassColor__normalizeHue(channel0, false), channel1, channel2, alpha, _null); - break $label0$0; - } - if (B.LchColorSpace_wv8 === space || B.OklchColorSpace_li8 === space) { - t1 = channel1 == null; - t2 = t1 ? _null : Math.abs(channel1); - t2 = A.SassColor$_forSpace(space, channel0, t2, A.SassColor__normalizeHue(channel2, !t1 && channel1 < 0 && !A.fuzzyEquals(channel1, 0)), alpha, _null); - t1 = t2; - break $label0$0; - } - t1 = A.SassColor$_forSpace(space, channel0, channel1, channel2, alpha, _null); - break $label0$0; - } - return t1; - }, - SassColor$_forSpace(_space, channel0OrNull, channel1OrNull, channel2OrNull, alpha, format) { - return new A.SassColor(_space, channel0OrNull, channel1OrNull, channel2OrNull, format, A.NullableExtension_andThen(alpha, new A.SassColor$_forSpace_closure())); - }, - SassColor__normalizeHue(hue, invert) { - var t1, t2; - if (hue == null) - return hue; - t1 = B.JSNumber_methods.$mod(hue, 360); - t2 = invert ? 180 : 0; - return B.JSNumber_methods.$mod(t1 + 360 + t2, 360); - }, - SassColor: function SassColor(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._space = t0; - _.channel0OrNull = t1; - _.channel1OrNull = t2; - _.channel2OrNull = t3; - _.format = t4; - _.alphaOrNull = t5; - }, - SassColor$_forSpace_closure: function SassColor$_forSpace_closure() { - }, - _ColorFormatEnum: function _ColorFormatEnum() { - }, - SpanColorFormat: function SpanColorFormat(t0) { - this._color$_span = t0; - }, - ColorChannel: function ColorChannel(t0, t1, t2) { - this.name = t0; - this.isPolarAngle = t1; - this.associatedUnit = t2; - }, - LinearChannel: function LinearChannel(t0, t1, t2, t3, t4, t5, t6, t7) { - var _ = this; - _.min = t0; - _.max = t1; - _.requiresPercent = t2; - _.lowerClamped = t3; - _.upperClamped = t4; - _.name = t5; - _.isPolarAngle = t6; - _.associatedUnit = t7; - }, - GamutMapMethod_GamutMapMethod$fromName($name) { - var t1; - $label0$0: { - if ("clip" === $name) { - t1 = B.ClipGamutMap_clip; - break $label0$0; - } - if ("local-minde" === $name) { - t1 = B.LocalMindeGamutMap_Q7f; - break $label0$0; - } - t1 = A.throwExpression(A.SassScriptException$('Unknown gamut map method "' + $name + '".', null)); - } - return t1; - }, - GamutMapMethod: function GamutMapMethod() { - }, - ClipGamutMap: function ClipGamutMap(t0) { - this.name = t0; - }, - LocalMindeGamutMap: function LocalMindeGamutMap(t0) { - this.name = t0; - }, - InterpolationMethod$(space, hue) { - var t1; - if (space.get$isPolarInternal()) - t1 = hue == null ? B.HueInterpolationMethod_0 : hue; - else - t1 = null; - if (!space.get$isPolarInternal() && hue != null) - A.throwExpression(A.ArgumentError$(string$.Hue_in + space.toString$0(0) + ".", null)); - return new A.InterpolationMethod(space, t1); - }, - InterpolationMethod_InterpolationMethod$fromValue(value, $name) { - var t1, space, hueMethod, - list = value.assertCommonListStyle$2$allowSlash($name, false); - if (list.length === 0) - throw A.wrapException(A.SassScriptException$(string$.Expecta, $name)); - t1 = B.JSArray_methods.get$first(list).assertString$1($name); - t1.assertUnquoted$1($name); - space = A.ColorSpace_fromName(t1._string$_text, $name); - if (list.length === 1) - return A.InterpolationMethod$(space, null); - hueMethod = A.HueInterpolationMethod_HueInterpolationMethod$_fromValue(list[1], $name); - if (list.length === 2) - throw A.wrapException(A.SassScriptException$('Expected unquoted string "hue" after ' + value.toString$0(0) + ".", $name)); - else { - t1 = list[2].assertString$1($name); - t1.assertUnquoted$1($name); - if (t1._string$_text.toLowerCase() !== "hue") - throw A.wrapException(A.SassScriptException$(string$.Expectu + value.toString$0(0) + ", was " + A.S(list[2]) + ".", $name)); - else if (list.length > 3) - throw A.wrapException(A.SassScriptException$('Expected nothing after "hue" in ' + value.toString$0(0) + ".", $name)); - else if (!space.get$isPolarInternal()) - throw A.wrapException(A.SassScriptException$('Hue interpolation method "' + hueMethod.toString$0(0) + string$.x20hue__ + space.toString$0(0) + ".", $name)); - } - return A.InterpolationMethod$(space, hueMethod); - }, - HueInterpolationMethod_HueInterpolationMethod$_fromValue(value, $name) { - var _0_0, - t1 = value.assertString$1($name); - t1.assertUnquoted$0(); - _0_0 = t1._string$_text.toLowerCase(); - $label0$0: { - if ("shorter" === _0_0) { - t1 = B.HueInterpolationMethod_0; - break $label0$0; - } - if ("longer" === _0_0) { - t1 = B.HueInterpolationMethod_1; - break $label0$0; - } - if ("increasing" === _0_0) { - t1 = B.HueInterpolationMethod_2; - break $label0$0; - } - if ("decreasing" === _0_0) { - t1 = B.HueInterpolationMethod_3; - break $label0$0; - } - t1 = A.throwExpression(A.SassScriptException$("Unknown hue interpolation method " + value.toString$0(0) + ".", $name)); - } - return t1; - }, - InterpolationMethod: function InterpolationMethod(t0, t1) { - this.space = t0; - this.hue = t1; - }, - HueInterpolationMethod: function HueInterpolationMethod(t0) { - this._name = t0; - }, - ColorSpace_fromName($name, argumentName) { - var t1, - _0_0 = $name.toLowerCase(); - $label0$0: { - if ("rgb" === _0_0) { - t1 = B.RgbColorSpace_mlz; - break $label0$0; - } - if ("hwb" === _0_0) { - t1 = B.HwbColorSpace_06z; - break $label0$0; - } - if ("hsl" === _0_0) { - t1 = B.HslColorSpace_gsm; - break $label0$0; - } - if ("srgb" === _0_0) { - t1 = B.SrgbColorSpace_AD4; - break $label0$0; - } - if ("srgb-linear" === _0_0) { - t1 = B.SrgbLinearColorSpace_sEs; - break $label0$0; - } - if ("display-p3" === _0_0) { - t1 = B.DisplayP3ColorSpace_NQk; - break $label0$0; - } - if ("a98-rgb" === _0_0) { - t1 = B.A98RgbColorSpace_bdu; - break $label0$0; - } - if ("prophoto-rgb" === _0_0) { - t1 = B.ProphotoRgbColorSpace_KiG; - break $label0$0; - } - if ("rec2020" === _0_0) { - t1 = B.Rec2020ColorSpace_2jN; - break $label0$0; - } - if ("xyz" === _0_0 || "xyz-d65" === _0_0) { - t1 = B.XyzD65ColorSpace_4CA; - break $label0$0; - } - if ("xyz-d50" === _0_0) { - t1 = B.XyzD50ColorSpace_2No; - break $label0$0; - } - if ("lab" === _0_0) { - t1 = B.LabColorSpace_IF2; - break $label0$0; - } - if ("lch" === _0_0) { - t1 = B.LchColorSpace_wv8; - break $label0$0; - } - if ("oklab" === _0_0) { - t1 = B.OklabColorSpace_yrt; - break $label0$0; - } - if ("oklch" === _0_0) { - t1 = B.OklchColorSpace_li8; - break $label0$0; - } - t1 = A.throwExpression(A.SassScriptException$('Unknown color space "' + $name + '".', argumentName)); - } - return t1; - }, - ColorSpace: function ColorSpace() { - }, - A98RgbColorSpace: function A98RgbColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - DisplayP3ColorSpace: function DisplayP3ColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - HslColorSpace: function HslColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - HwbColorSpace: function HwbColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - HwbColorSpace_convert_toRgb: function HwbColorSpace_convert_toRgb(t0, t1) { - this._box_0 = t0; - this.factor = t1; - }, - LabColorSpace: function LabColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - LchColorSpace: function LchColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - LmsColorSpace: function LmsColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - OklabColorSpace: function OklabColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - OklchColorSpace: function OklchColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - ProphotoRgbColorSpace: function ProphotoRgbColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - Rec2020ColorSpace: function Rec2020ColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - RgbColorSpace: function RgbColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - SrgbColorSpace: function SrgbColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - SrgbLinearColorSpace: function SrgbLinearColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - XyzD50ColorSpace: function XyzD50ColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - XyzD65ColorSpace: function XyzD65ColorSpace(t0, t1) { - this.name = t0; - this._channels = t1; - }, - SassFunction: function SassFunction(t0) { - this.callable = t0; - }, - SassList$(contents, _separator, brackets) { - var t1 = new A.SassList(A.List_List$unmodifiable(contents, type$.Value), _separator, brackets); - t1.SassList$3$brackets(contents, _separator, brackets); - return t1; - }, - SassList: function SassList(t0, t1, t2) { - this._list$_contents = t0; - this._separator = t1; - this._hasBrackets = t2; - }, - SassList_isBlank_closure: function SassList_isBlank_closure() { - }, - ListSeparator: function ListSeparator(t0, t1, t2) { - this._list$_name = t0; - this.separator = t1; - this._name = t2; - }, - SassMap: function SassMap(t0) { - this._map$_contents = t0; - }, - SassMixin: function SassMixin(t0) { - this.callable = t0; - }, - _SassNull: function _SassNull() { - }, - conversionFactor(unit1, unit2) { - var _0_0; - if (unit1 === unit2) - return 1; - _0_0 = B.Map_gQqJO.$index(0, unit1); - if (_0_0 != null) - return _0_0.$index(0, unit2); - return null; - }, - SassNumber_SassNumber(value, unit) { - return unit == null ? new A.UnitlessSassNumber(value, null) : new A.SingleUnitSassNumber(unit, value, null); - }, - SassNumber_SassNumber$withUnits(value, denominatorUnits, numeratorUnits) { - var t1, _0_8_isSet, _0_8, _0_10, _0_10_isSet, _0_7, unit, t2, _0_7_isSet, t3, _0_4_isSet, _0_7_isSet0, numerators, denominators, unsimplifiedDenominators, valueDouble, _i, denominator, simplifiedAway, i, factor, _1_2, _1_7_isSet, _1_7, _null = null, - _0_6_isSet = !false, - _0_6 = _null, - _0_4 = _null; - if (_0_6_isSet) { - _0_4 = (numeratorUnits === null ? type$.List_String._as(numeratorUnits) : numeratorUnits).length; - t1 = _0_4; - _0_6 = t1 <= 0; - _0_8_isSet = _0_6; - } else - _0_8_isSet = true; - _0_8 = _null; - _0_10 = _null; - if (_0_8_isSet) { - _0_8 = denominatorUnits == null; - t1 = _0_8; - _0_10_isSet = !t1; - if (_0_10_isSet) { - _0_10 = (denominatorUnits == null ? type$.List_String._as(denominatorUnits) : denominatorUnits).length <= 0; - t1 = _0_10; - } else - t1 = true; - _0_7 = denominatorUnits; - } else { - _0_7 = _null; - _0_10_isSet = false; - t1 = false; - } - if (t1) - return new A.UnitlessSassNumber(value, _null); - t1 = type$.List_String; - unit = _null; - t2 = false; - if (t1._is(numeratorUnits)) { - _0_7_isSet = true; - if (_0_6_isSet) { - t3 = _0_4; - _0_4_isSet = _0_6_isSet; - } else { - _0_4 = numeratorUnits.length; - t3 = _0_4; - _0_4_isSet = true; - } - if (t3 === 1) { - unit = numeratorUnits[0]; - if (_0_8_isSet) { - t2 = _0_8; - _0_7_isSet0 = _0_8_isSet; - } else { - _0_8 = denominatorUnits == null; - t2 = _0_8; - _0_7_isSet0 = _0_7_isSet; - _0_7 = denominatorUnits; - _0_8_isSet = true; - } - if (!t2) - if (_0_10_isSet) { - t2 = _0_10; - _0_7_isSet = _0_7_isSet0; - } else { - if (_0_7_isSet0) { - t2 = _0_7; - _0_7_isSet = _0_7_isSet0; - } else { - t2 = denominatorUnits; - _0_7 = t2; - } - _0_10 = (t2 == null ? t1._as(t2) : t2).length <= 0; - t2 = _0_10; - _0_10_isSet = true; - } - else { - _0_7_isSet = _0_7_isSet0; - t2 = true; - } - } else - _0_7_isSet = _0_8_isSet; - } else { - _0_7_isSet = _0_8_isSet; - _0_4_isSet = _0_6_isSet; - } - if (t2) - return new A.SingleUnitSassNumber(unit, value, _null); - t2 = numeratorUnits === null; - t3 = false; - if (!t2) { - _0_7_isSet0 = true; - numerators = numeratorUnits; - if (_0_8_isSet) - t3 = _0_8; - else { - if (_0_7_isSet) - t3 = _0_7; - else { - t3 = denominatorUnits; - _0_7_isSet = _0_7_isSet0; - _0_7 = t3; - } - _0_8 = t3 == null; - t3 = _0_8; - } - if (!t3) - if (_0_10_isSet) - t3 = _0_10; - else { - if (_0_7_isSet) - t3 = _0_7; - else { - t3 = denominatorUnits; - _0_7_isSet = _0_7_isSet0; - _0_7 = t3; - } - _0_10 = (t3 == null ? t1._as(t3) : t3).length <= 0; - t3 = _0_10; - } - else - t3 = true; - } else - numerators = _null; - if (t3) - return new A.ComplexSassNumber(A.List_List$unmodifiable(numerators, type$.String), B.List_empty, value, _null); - if (!false) - if (_0_6_isSet) - t2 = _0_6; - else { - if (_0_4_isSet) - t2 = _0_4; - else { - _0_4 = (t2 ? t1._as(numeratorUnits) : numeratorUnits).length; - t2 = _0_4; - } - _0_6 = t2 <= 0; - t2 = _0_6; - } - else - t2 = true; - denominators = _null; - if (t2) { - if (_0_7_isSet) - t2 = _0_7; - else { - t2 = denominatorUnits; - _0_7 = t2; - _0_7_isSet = true; - } - t2 = t2 != null; - if (t2) { - denominators = _0_7_isSet ? _0_7 : denominatorUnits; - if (denominators == null) - denominators = t1._as(denominators); - } - t1 = t2; - } else - t1 = false; - if (t1) - return new A.ComplexSassNumber(B.List_empty, A.List_List$unmodifiable(denominators, type$.String), value, _null); - numerators = A._setArrayType(numeratorUnits.slice(0), A._arrayInstanceType(numeratorUnits)); - unsimplifiedDenominators = A._setArrayType(denominatorUnits.slice(0), A.instanceType(denominatorUnits)); - denominators = A._setArrayType([], type$.JSArray_String); - for (t1 = unsimplifiedDenominators.length, valueDouble = value, _i = 0; _i < unsimplifiedDenominators.length; unsimplifiedDenominators.length === t1 || (0, A.throwConcurrentModificationError)(unsimplifiedDenominators), ++_i) { - denominator = unsimplifiedDenominators[_i]; - i = 0; - while (true) { - if (!(i < numerators.length)) { - simplifiedAway = false; - break; - } - c$0: { - factor = A.conversionFactor(denominator, numerators[i]); - if (factor == null) - break c$0; - valueDouble *= factor; - B.JSArray_methods.removeAt$1(numerators, i); - simplifiedAway = true; - break; - } - ++i; - } - if (!simplifiedAway) - denominators.push(denominator); - } - $label0$1: { - _1_2 = numerators.length; - t1 = _1_2; - _1_7_isSet = t1 <= 0; - if (_1_7_isSet) { - _1_7 = denominators.length <= 0; - t1 = _1_7; - } else { - _1_7 = _null; - t1 = false; - } - if (t1) { - t1 = new A.UnitlessSassNumber(valueDouble, _null); - break $label0$1; - } - t1 = false; - if (_1_2 === 1) { - unit = numerators[0]; - t1 = _1_7_isSet ? _1_7 : denominators.length <= 0; - } else - unit = _null; - if (t1) { - t1 = new A.SingleUnitSassNumber(unit, valueDouble, _null); - break $label0$1; - } - t1 = type$.String; - t1 = new A.ComplexSassNumber(A.List_List$unmodifiable(numerators, t1), A.List_List$unmodifiable(denominators, t1), valueDouble, _null); - break $label0$1; - } - return t1; - }, - SassNumber: function SassNumber() { - }, - SassNumber__coerceOrConvertValue_compatibilityException: function SassNumber__coerceOrConvertValue_compatibilityException(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.other = t1; - _.otherName = t2; - _.otherHasUnits = t3; - _.name = t4; - _.newNumerators = t5; - _.newDenominators = t6; - }, - SassNumber__coerceOrConvertValue_closure: function SassNumber__coerceOrConvertValue_closure(t0, t1) { - this._box_0 = t0; - this.newNumerator = t1; - }, - SassNumber__coerceOrConvertValue_closure0: function SassNumber__coerceOrConvertValue_closure0(t0) { - this.compatibilityException = t0; - }, - SassNumber__coerceOrConvertValue_closure1: function SassNumber__coerceOrConvertValue_closure1(t0, t1) { - this._box_0 = t0; - this.newDenominator = t1; - }, - SassNumber__coerceOrConvertValue_closure2: function SassNumber__coerceOrConvertValue_closure2(t0) { - this.compatibilityException = t0; - }, - SassNumber_plus_closure: function SassNumber_plus_closure() { - }, - SassNumber_minus_closure: function SassNumber_minus_closure() { - }, - SassNumber_multiplyUnits_closure: function SassNumber_multiplyUnits_closure(t0, t1) { - this._box_0 = t0; - this.numerator = t1; - }, - SassNumber_multiplyUnits_closure0: function SassNumber_multiplyUnits_closure0(t0, t1) { - this.newNumerators = t0; - this.numerator = t1; - }, - SassNumber_multiplyUnits_closure1: function SassNumber_multiplyUnits_closure1(t0, t1) { - this._box_0 = t0; - this.numerator = t1; - }, - SassNumber_multiplyUnits_closure2: function SassNumber_multiplyUnits_closure2(t0, t1) { - this.newNumerators = t0; - this.numerator = t1; - }, - SassNumber__areAnyConvertible_closure: function SassNumber__areAnyConvertible_closure(t0) { - this.units2 = t0; - }, - SassNumber__canonicalizeUnitList_closure: function SassNumber__canonicalizeUnitList_closure() { - }, - SassNumber__canonicalMultiplier_closure: function SassNumber__canonicalMultiplier_closure(t0) { - this.$this = t0; - }, - SassNumber_unitSuggestion_closure: function SassNumber_unitSuggestion_closure() { - }, - SassNumber_unitSuggestion_closure0: function SassNumber_unitSuggestion_closure0() { - }, - ComplexSassNumber: function ComplexSassNumber(t0, t1, t2, t3) { - var _ = this; - _._numeratorUnits = t0; - _._denominatorUnits = t1; - _._number$_value = t2; - _.hashCache = null; - _.asSlash = t3; - }, - SingleUnitSassNumber: function SingleUnitSassNumber(t0, t1, t2) { - var _ = this; - _._unit = t0; - _._number$_value = t1; - _.hashCache = null; - _.asSlash = t2; - }, - SingleUnitSassNumber__coerceToUnit_closure: function SingleUnitSassNumber__coerceToUnit_closure(t0, t1) { - this.$this = t0; - this.unit = t1; - }, - SingleUnitSassNumber__coerceValueToUnit_closure: function SingleUnitSassNumber__coerceValueToUnit_closure(t0) { - this.$this = t0; - }, - SingleUnitSassNumber_multiplyUnits_closure: function SingleUnitSassNumber_multiplyUnits_closure(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - SingleUnitSassNumber_multiplyUnits_closure0: function SingleUnitSassNumber_multiplyUnits_closure0(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - UnitlessSassNumber: function UnitlessSassNumber(t0, t1) { - this._number$_value = t0; - this.hashCache = null; - this.asSlash = t1; - }, - SassString$(_text, quotes) { - return new A.SassString(_text, quotes); - }, - SassString: function SassString(t0, t1) { - var _ = this; - _._string$_text = t0; - _._hasQuotes = t1; - _.__SassString__sassLength_FI = $; - _._hashCache = null; - }, - AnySelectorVisitor: function AnySelectorVisitor() { - }, - AnySelectorVisitor_visitComplexSelector_closure: function AnySelectorVisitor_visitComplexSelector_closure(t0) { - this.$this = t0; - }, - AnySelectorVisitor_visitCompoundSelector_closure: function AnySelectorVisitor_visitCompoundSelector_closure(t0) { - this.$this = t0; - }, - _EvaluateVisitor$0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { - var t1 = type$.Uri, - t2 = type$.Module_AsyncCallable, - t3 = A._setArrayType([], type$.JSArray_Record_2_String_and_AstNode); - t1 = new A._EvaluateVisitor0(importCache, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.AsyncCallable), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Record_2_String_and_SourceSpan), quietDeps, sourceMap, A.AsyncEnvironment$(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode), t3, B.Configuration_Map_empty_null); - t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); - return t1; - }, - _EvaluateVisitor0: function _EvaluateVisitor0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { - var _ = this; - _._async_evaluate$_importCache = t0; - _._async_evaluate$_nodeImporter = t1; - _._async_evaluate$_builtInFunctions = t2; - _._async_evaluate$_builtInModules = t3; - _._async_evaluate$_modules = t4; - _._async_evaluate$_moduleConfigurations = t5; - _._async_evaluate$_moduleNodes = t6; - _._async_evaluate$_logger = t7; - _._async_evaluate$_warningsEmitted = t8; - _._async_evaluate$_quietDeps = t9; - _._async_evaluate$_sourceMap = t10; - _._async_evaluate$_environment = t11; - _._async_evaluate$_declarationName = _._async_evaluate$__parent = _._async_evaluate$_mediaQuerySources = _._async_evaluate$_mediaQueries = _._async_evaluate$_styleRuleIgnoringAtRoot = null; - _._async_evaluate$_member = "root stylesheet"; - _._async_evaluate$_importSpan = _._async_evaluate$_callableNode = _._async_evaluate$_currentCallable = null; - _._async_evaluate$_inSupportsDeclaration = _._async_evaluate$_inKeyframes = _._async_evaluate$_atRootExcludingStyleRule = _._async_evaluate$_inUnknownAtRule = _._async_evaluate$_inFunction = false; - _._async_evaluate$_loadedUrls = t12; - _._async_evaluate$_activeModules = t13; - _._async_evaluate$_stack = t14; - _._async_evaluate$_importer = null; - _._async_evaluate$_inDependency = false; - _._async_evaluate$__extensionStore = _._async_evaluate$_preModuleComments = _._async_evaluate$_outOfOrderImports = _._async_evaluate$__endOfImports = _._async_evaluate$__root = _._async_evaluate$__stylesheet = null; - _._async_evaluate$_configuration = t15; - }, - _EvaluateVisitor_closure12: function _EvaluateVisitor_closure12(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure13: function _EvaluateVisitor_closure13(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure14: function _EvaluateVisitor_closure14(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure15: function _EvaluateVisitor_closure15(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure16: function _EvaluateVisitor_closure16(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure17: function _EvaluateVisitor_closure17(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure18: function _EvaluateVisitor_closure18(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure19: function _EvaluateVisitor_closure19(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure20: function _EvaluateVisitor_closure20(t0) { - this.$this = t0; - }, - _EvaluateVisitor__closure6: function _EvaluateVisitor__closure6(t0, t1, t2) { - this.$this = t0; - this.name = t1; - this.module = t2; - }, - _EvaluateVisitor_closure21: function _EvaluateVisitor_closure21(t0) { - this.$this = t0; - }, - _EvaluateVisitor__closure5: function _EvaluateVisitor__closure5(t0, t1, t2) { - this.$this = t0; - this.name = t1; - this.module = t2; - }, - _EvaluateVisitor_closure22: function _EvaluateVisitor_closure22(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure23: function _EvaluateVisitor_closure23(t0) { - this.$this = t0; - }, - _EvaluateVisitor__closure3: function _EvaluateVisitor__closure3(t0, t1, t2) { - this.values = t0; - this.span = t1; - this.callableNode = t2; - }, - _EvaluateVisitor__closure4: function _EvaluateVisitor__closure4(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure24: function _EvaluateVisitor_closure24(t0) { - this.$this = t0; - }, - _EvaluateVisitor_run_closure0: function _EvaluateVisitor_run_closure0(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.importer = t2; - }, - _EvaluateVisitor_run__closure0: function _EvaluateVisitor_run__closure0(t0, t1, t2) { - this.$this = t0; - this.importer = t1; - this.node = t2; - }, - _EvaluateVisitor__loadModule_closure1: function _EvaluateVisitor__loadModule_closure1(t0, t1) { - this._box_1 = t0; - this.callback = t1; - }, - _EvaluateVisitor__loadModule_closure2: function _EvaluateVisitor__loadModule_closure2(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.url = t1; - _.nodeWithSpan = t2; - _.baseUrl = t3; - _.namesInErrors = t4; - _.configuration = t5; - _.callback = t6; - }, - _EvaluateVisitor__loadModule__closure1: function _EvaluateVisitor__loadModule__closure1(t0, t1) { - this.$this = t0; - this.message = t1; - }, - _EvaluateVisitor__loadModule__closure2: function _EvaluateVisitor__loadModule__closure2(t0, t1, t2) { - this._box_0 = t0; - this.callback = t1; - this.firstLoad = t2; - }, - _EvaluateVisitor__execute_closure0: function _EvaluateVisitor__execute_closure0(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.importer = t1; - _.stylesheet = t2; - _.extensionStore = t3; - _.configuration = t4; - _.css = t5; - _.preModuleComments = t6; - }, - _EvaluateVisitor__combineCss_closure1: function _EvaluateVisitor__combineCss_closure1() { - }, - _EvaluateVisitor__combineCss_closure2: function _EvaluateVisitor__combineCss_closure2(t0) { - this.selectors = t0; - }, - _EvaluateVisitor__combineCss_visitModule0: function _EvaluateVisitor__combineCss_visitModule0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.seen = t1; - _.clone = t2; - _.css = t3; - _.imports = t4; - _.sorted = t5; - }, - _EvaluateVisitor__extendModules_closure1: function _EvaluateVisitor__extendModules_closure1(t0) { - this.originalSelectors = t0; - }, - _EvaluateVisitor__extendModules_closure2: function _EvaluateVisitor__extendModules_closure2() { - }, - _EvaluateVisitor_visitAtRootRule_closure1: function _EvaluateVisitor_visitAtRootRule_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitAtRootRule_closure2: function _EvaluateVisitor_visitAtRootRule_closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure5: function _EvaluateVisitor__scopeForAtRoot_closure5(t0, t1, t2) { - this.$this = t0; - this.newParent = t1; - this.node = t2; - }, - _EvaluateVisitor__scopeForAtRoot_closure6: function _EvaluateVisitor__scopeForAtRoot_closure6(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure7: function _EvaluateVisitor__scopeForAtRoot_closure7(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor__scopeForAtRoot__closure0: function _EvaluateVisitor__scopeForAtRoot__closure0(t0, t1) { - this.innerScope = t0; - this.callback = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure8: function _EvaluateVisitor__scopeForAtRoot_closure8(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure9: function _EvaluateVisitor__scopeForAtRoot_closure9() { - }, - _EvaluateVisitor__scopeForAtRoot_closure10: function _EvaluateVisitor__scopeForAtRoot_closure10(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor_visitContentRule_closure0: function _EvaluateVisitor_visitContentRule_closure0(t0, t1) { - this.$this = t0; - this.content = t1; - }, - _EvaluateVisitor_visitDeclaration_closure0: function _EvaluateVisitor_visitDeclaration_closure0(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - _EvaluateVisitor_visitEachRule_closure2: function _EvaluateVisitor_visitEachRule_closure2(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.nodeWithSpan = t2; - }, - _EvaluateVisitor_visitEachRule_closure3: function _EvaluateVisitor_visitEachRule_closure3(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.nodeWithSpan = t2; - }, - _EvaluateVisitor_visitEachRule_closure4: function _EvaluateVisitor_visitEachRule_closure4(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.list = t1; - _.setVariables = t2; - _.node = t3; - }, - _EvaluateVisitor_visitEachRule__closure0: function _EvaluateVisitor_visitEachRule__closure0(t0, t1, t2) { - this.$this = t0; - this.setVariables = t1; - this.node = t2; - }, - _EvaluateVisitor_visitEachRule___closure0: function _EvaluateVisitor_visitEachRule___closure0(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitAtRule_closure2: function _EvaluateVisitor_visitAtRule_closure2(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitAtRule_closure3: function _EvaluateVisitor_visitAtRule_closure3(t0, t1, t2) { - this.$this = t0; - this.name = t1; - this.children = t2; - }, - _EvaluateVisitor_visitAtRule__closure0: function _EvaluateVisitor_visitAtRule__closure0(t0, t1) { - this.$this = t0; - this.children = t1; - }, - _EvaluateVisitor_visitAtRule_closure4: function _EvaluateVisitor_visitAtRule_closure4() { - }, - _EvaluateVisitor_visitForRule_closure4: function _EvaluateVisitor_visitForRule_closure4(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitForRule_closure5: function _EvaluateVisitor_visitForRule_closure5(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitForRule_closure6: function _EvaluateVisitor_visitForRule_closure6(t0) { - this.fromNumber = t0; - }, - _EvaluateVisitor_visitForRule_closure7: function _EvaluateVisitor_visitForRule_closure7(t0, t1) { - this.toNumber = t0; - this.fromNumber = t1; - }, - _EvaluateVisitor_visitForRule_closure8: function _EvaluateVisitor_visitForRule_closure8(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.node = t2; - _.from = t3; - _.direction = t4; - _.fromNumber = t5; - }, - _EvaluateVisitor_visitForRule__closure0: function _EvaluateVisitor_visitForRule__closure0(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitForwardRule_closure1: function _EvaluateVisitor_visitForwardRule_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitForwardRule_closure2: function _EvaluateVisitor_visitForwardRule_closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__registerCommentsForModule_closure0: function _EvaluateVisitor__registerCommentsForModule_closure0() { - }, - _EvaluateVisitor_visitIfRule_closure0: function _EvaluateVisitor_visitIfRule_closure0(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitIfRule__closure0: function _EvaluateVisitor_visitIfRule__closure0(t0, t1) { - this.$this = t0; - this.clause = t1; - }, - _EvaluateVisitor_visitIfRule___closure0: function _EvaluateVisitor_visitIfRule___closure0(t0) { - this.$this = t0; - }, - _EvaluateVisitor__visitDynamicImport_closure0: function _EvaluateVisitor__visitDynamicImport_closure0(t0, t1) { - this.$this = t0; - this.$import = t1; - }, - _EvaluateVisitor__visitDynamicImport__closure3: function _EvaluateVisitor__visitDynamicImport__closure3(t0) { - this.$this = t0; - }, - _EvaluateVisitor__visitDynamicImport__closure4: function _EvaluateVisitor__visitDynamicImport__closure4() { - }, - _EvaluateVisitor__visitDynamicImport__closure5: function _EvaluateVisitor__visitDynamicImport__closure5() { - }, - _EvaluateVisitor__visitDynamicImport__closure6: function _EvaluateVisitor__visitDynamicImport__closure6(t0, t1, t2, t3, t4) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.loadsUserDefinedModules = t2; - _.environment = t3; - _.children = t4; - }, - _EvaluateVisitor__applyMixin_closure1: function _EvaluateVisitor__applyMixin_closure1(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.$arguments = t1; - _.mixin = t2; - _.nodeWithSpanWithoutContent = t3; - }, - _EvaluateVisitor__applyMixin__closure2: function _EvaluateVisitor__applyMixin__closure2(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.$arguments = t1; - _.mixin = t2; - _.nodeWithSpanWithoutContent = t3; - }, - _EvaluateVisitor__applyMixin_closure2: function _EvaluateVisitor__applyMixin_closure2(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.contentCallable = t1; - _.mixin = t2; - _.nodeWithSpanWithoutContent = t3; - }, - _EvaluateVisitor__applyMixin__closure1: function _EvaluateVisitor__applyMixin__closure1(t0, t1, t2) { - this.$this = t0; - this.mixin = t1; - this.nodeWithSpanWithoutContent = t2; - }, - _EvaluateVisitor__applyMixin___closure0: function _EvaluateVisitor__applyMixin___closure0(t0, t1, t2) { - this.$this = t0; - this.mixin = t1; - this.nodeWithSpanWithoutContent = t2; - }, - _EvaluateVisitor__applyMixin____closure0: function _EvaluateVisitor__applyMixin____closure0(t0, t1) { - this.$this = t0; - this.statement = t1; - }, - _EvaluateVisitor_visitIncludeRule_closure2: function _EvaluateVisitor_visitIncludeRule_closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitIncludeRule_closure3: function _EvaluateVisitor_visitIncludeRule_closure3(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitIncludeRule_closure4: function _EvaluateVisitor_visitIncludeRule_closure4(t0) { - this.node = t0; - }, - _EvaluateVisitor_visitMediaRule_closure2: function _EvaluateVisitor_visitMediaRule_closure2(t0, t1) { - this.$this = t0; - this.queries = t1; - }, - _EvaluateVisitor_visitMediaRule_closure3: function _EvaluateVisitor_visitMediaRule_closure3(t0, t1, t2, t3, t4) { - var _ = this; - _.$this = t0; - _.mergedQueries = t1; - _.queries = t2; - _.mergedSources = t3; - _.node = t4; - }, - _EvaluateVisitor_visitMediaRule__closure0: function _EvaluateVisitor_visitMediaRule__closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitMediaRule___closure0: function _EvaluateVisitor_visitMediaRule___closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitMediaRule_closure4: function _EvaluateVisitor_visitMediaRule_closure4(t0) { - this.mergedSources = t0; - }, - _EvaluateVisitor_visitStyleRule_closure3: function _EvaluateVisitor_visitStyleRule_closure3(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitStyleRule_closure4: function _EvaluateVisitor_visitStyleRule_closure4() { - }, - _EvaluateVisitor_visitStyleRule_closure6: function _EvaluateVisitor_visitStyleRule_closure6(t0, t1, t2) { - this.$this = t0; - this.rule = t1; - this.node = t2; - }, - _EvaluateVisitor_visitStyleRule__closure0: function _EvaluateVisitor_visitStyleRule__closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitStyleRule_closure5: function _EvaluateVisitor_visitStyleRule_closure5() { - }, - _EvaluateVisitor__warnForBogusCombinators_closure0: function _EvaluateVisitor__warnForBogusCombinators_closure0() { - }, - _EvaluateVisitor_visitSupportsRule_closure1: function _EvaluateVisitor_visitSupportsRule_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitSupportsRule__closure0: function _EvaluateVisitor_visitSupportsRule__closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitSupportsRule_closure2: function _EvaluateVisitor_visitSupportsRule_closure2() { - }, - _EvaluateVisitor__visitSupportsCondition_closure0: function _EvaluateVisitor__visitSupportsCondition_closure0(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - _EvaluateVisitor_visitVariableDeclaration_closure2: function _EvaluateVisitor_visitVariableDeclaration_closure2(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.node = t2; - }, - _EvaluateVisitor_visitVariableDeclaration_closure3: function _EvaluateVisitor_visitVariableDeclaration_closure3(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitVariableDeclaration_closure4: function _EvaluateVisitor_visitVariableDeclaration_closure4(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.value = t2; - }, - _EvaluateVisitor_visitUseRule_closure0: function _EvaluateVisitor_visitUseRule_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitWarnRule_closure0: function _EvaluateVisitor_visitWarnRule_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitWhileRule_closure0: function _EvaluateVisitor_visitWhileRule_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitWhileRule__closure0: function _EvaluateVisitor_visitWhileRule__closure0(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitBinaryOperationExpression_closure0: function _EvaluateVisitor_visitBinaryOperationExpression_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__slash_recommendation0: function _EvaluateVisitor__slash_recommendation0() { - }, - _EvaluateVisitor_visitVariableExpression_closure0: function _EvaluateVisitor_visitVariableExpression_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitUnaryOperationExpression_closure0: function _EvaluateVisitor_visitUnaryOperationExpression_closure0(t0, t1) { - this.node = t0; - this.operand = t1; - }, - _EvaluateVisitor_visitListExpression_closure0: function _EvaluateVisitor_visitListExpression_closure0(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitFunctionExpression_closure2: function _EvaluateVisitor_visitFunctionExpression_closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitFunctionExpression_closure3: function _EvaluateVisitor_visitFunctionExpression_closure3() { - }, - _EvaluateVisitor_visitFunctionExpression_closure4: function _EvaluateVisitor_visitFunctionExpression_closure4(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.node = t2; - }, - _EvaluateVisitor__visitCalculation_closure0: function _EvaluateVisitor__visitCalculation_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__checkCalculationArguments_check0: function _EvaluateVisitor__checkCalculationArguments_check0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__visitCalculationExpression_closure0: function _EvaluateVisitor__visitCalculationExpression_closure0(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.node = t2; - _.inLegacySassFunction = t3; - }, - _EvaluateVisitor__visitCalculationExpression__closure0: function _EvaluateVisitor__visitCalculationExpression__closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitInterpolatedFunctionExpression_closure0: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure0(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.$function = t2; - }, - _EvaluateVisitor__runUserDefinedCallable_closure0: function _EvaluateVisitor__runUserDefinedCallable_closure0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.callable = t1; - _.evaluated = t2; - _.nodeWithSpan = t3; - _.run = t4; - _.V = t5; - }, - _EvaluateVisitor__runUserDefinedCallable__closure0: function _EvaluateVisitor__runUserDefinedCallable__closure0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.evaluated = t1; - _.callable = t2; - _.nodeWithSpan = t3; - _.run = t4; - _.V = t5; - }, - _EvaluateVisitor__runUserDefinedCallable___closure0: function _EvaluateVisitor__runUserDefinedCallable___closure0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.evaluated = t1; - _.callable = t2; - _.nodeWithSpan = t3; - _.run = t4; - _.V = t5; - }, - _EvaluateVisitor__runUserDefinedCallable____closure0: function _EvaluateVisitor__runUserDefinedCallable____closure0() { - }, - _EvaluateVisitor__runFunctionCallable_closure0: function _EvaluateVisitor__runFunctionCallable_closure0(t0, t1) { - this.$this = t0; - this.callable = t1; - }, - _EvaluateVisitor__runBuiltInCallable_closure2: function _EvaluateVisitor__runBuiltInCallable_closure2(t0, t1, t2) { - this._box_0 = t0; - this.evaluated = t1; - this.namedSet = t2; - }, - _EvaluateVisitor__runBuiltInCallable_closure3: function _EvaluateVisitor__runBuiltInCallable_closure3(t0, t1) { - this._box_0 = t0; - this.evaluated = t1; - }, - _EvaluateVisitor__runBuiltInCallable_closure4: function _EvaluateVisitor__runBuiltInCallable_closure4() { - }, - _EvaluateVisitor__evaluateArguments_closure3: function _EvaluateVisitor__evaluateArguments_closure3() { - }, - _EvaluateVisitor__evaluateArguments_closure4: function _EvaluateVisitor__evaluateArguments_closure4(t0, t1) { - this.$this = t0; - this.restNodeForSpan = t1; - }, - _EvaluateVisitor__evaluateArguments_closure5: function _EvaluateVisitor__evaluateArguments_closure5(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.named = t1; - _.restNodeForSpan = t2; - _.namedNodes = t3; - }, - _EvaluateVisitor__evaluateArguments_closure6: function _EvaluateVisitor__evaluateArguments_closure6() { - }, - _EvaluateVisitor__evaluateMacroArguments_closure3: function _EvaluateVisitor__evaluateMacroArguments_closure3(t0) { - this.restArgs = t0; - }, - _EvaluateVisitor__evaluateMacroArguments_closure4: function _EvaluateVisitor__evaluateMacroArguments_closure4(t0, t1, t2) { - this.$this = t0; - this.restNodeForSpan = t1; - this.restArgs = t2; - }, - _EvaluateVisitor__evaluateMacroArguments_closure5: function _EvaluateVisitor__evaluateMacroArguments_closure5(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.named = t1; - _.restNodeForSpan = t2; - _.restArgs = t3; - }, - _EvaluateVisitor__evaluateMacroArguments_closure6: function _EvaluateVisitor__evaluateMacroArguments_closure6(t0, t1, t2) { - this.$this = t0; - this.keywordRestNodeForSpan = t1; - this.keywordRestArgs = t2; - }, - _EvaluateVisitor__addRestMap_closure0: function _EvaluateVisitor__addRestMap_closure0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.values = t1; - _.convert = t2; - _.expressionNode = t3; - _.map = t4; - _.nodeWithSpan = t5; - }, - _EvaluateVisitor__verifyArguments_closure0: function _EvaluateVisitor__verifyArguments_closure0(t0, t1, t2) { - this.$arguments = t0; - this.positional = t1; - this.named = t2; - }, - _EvaluateVisitor_visitCssAtRule_closure1: function _EvaluateVisitor_visitCssAtRule_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssAtRule_closure2: function _EvaluateVisitor_visitCssAtRule_closure2() { - }, - _EvaluateVisitor_visitCssKeyframeBlock_closure1: function _EvaluateVisitor_visitCssKeyframeBlock_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssKeyframeBlock_closure2: function _EvaluateVisitor_visitCssKeyframeBlock_closure2() { - }, - _EvaluateVisitor_visitCssMediaRule_closure2: function _EvaluateVisitor_visitCssMediaRule_closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssMediaRule_closure3: function _EvaluateVisitor_visitCssMediaRule_closure3(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.mergedQueries = t1; - _.node = t2; - _.mergedSources = t3; - }, - _EvaluateVisitor_visitCssMediaRule__closure0: function _EvaluateVisitor_visitCssMediaRule__closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssMediaRule___closure0: function _EvaluateVisitor_visitCssMediaRule___closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssMediaRule_closure4: function _EvaluateVisitor_visitCssMediaRule_closure4(t0) { - this.mergedSources = t0; - }, - _EvaluateVisitor_visitCssStyleRule_closure2: function _EvaluateVisitor_visitCssStyleRule_closure2(t0, t1, t2) { - this.$this = t0; - this.rule = t1; - this.node = t2; - }, - _EvaluateVisitor_visitCssStyleRule__closure0: function _EvaluateVisitor_visitCssStyleRule__closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssStyleRule_closure1: function _EvaluateVisitor_visitCssStyleRule_closure1() { - }, - _EvaluateVisitor_visitCssSupportsRule_closure1: function _EvaluateVisitor_visitCssSupportsRule_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssSupportsRule__closure0: function _EvaluateVisitor_visitCssSupportsRule__closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssSupportsRule_closure2: function _EvaluateVisitor_visitCssSupportsRule_closure2() { - }, - _EvaluateVisitor__performInterpolationHelper_closure0: function _EvaluateVisitor__performInterpolationHelper_closure0(t0) { - this.interpolation = t0; - }, - _EvaluateVisitor__serialize_closure0: function _EvaluateVisitor__serialize_closure0(t0, t1) { - this.value = t0; - this.quote = t1; - }, - _EvaluateVisitor__expressionNode_closure0: function _EvaluateVisitor__expressionNode_closure0(t0, t1) { - this.$this = t0; - this.expression = t1; - }, - _EvaluateVisitor__withoutSlash_recommendation0: function _EvaluateVisitor__withoutSlash_recommendation0() { - }, - _EvaluateVisitor__stackFrame_closure0: function _EvaluateVisitor__stackFrame_closure0(t0) { - this.$this = t0; - }, - _ImportedCssVisitor0: function _ImportedCssVisitor0(t0) { - this._async_evaluate$_visitor = t0; - }, - _ImportedCssVisitor_visitCssAtRule_closure0: function _ImportedCssVisitor_visitCssAtRule_closure0() { - }, - _ImportedCssVisitor_visitCssMediaRule_closure0: function _ImportedCssVisitor_visitCssMediaRule_closure0(t0) { - this.hasBeenMerged = t0; - }, - _ImportedCssVisitor_visitCssStyleRule_closure0: function _ImportedCssVisitor_visitCssStyleRule_closure0() { - }, - _ImportedCssVisitor_visitCssSupportsRule_closure0: function _ImportedCssVisitor_visitCssSupportsRule_closure0() { - }, - _EvaluationContext0: function _EvaluationContext0(t0, t1) { - this._async_evaluate$_visitor = t0; - this._async_evaluate$_defaultWarnNodeWithSpan = t1; - }, - cloneCssStylesheet(stylesheet, extensionStore) { - var _0_0 = extensionStore.clone$0(); - return new A._Record_2(new A._CloneCssVisitor(_0_0._1)._visitChildren$2(A.ModifiableCssStylesheet$(stylesheet.get$span(stylesheet)), stylesheet), _0_0._0); - }, - _CloneCssVisitor: function _CloneCssVisitor(t0) { - this._oldToNewSelectors = t0; - }, - _EvaluateVisitor$(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { - var t1 = type$.Uri, - t2 = type$.Module_Callable, - t3 = A._setArrayType([], type$.JSArray_Record_2_String_and_AstNode); - t1 = new A._EvaluateVisitor(importCache, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Callable), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Record_2_String_and_SourceSpan), quietDeps, sourceMap, A.Environment$(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode), t3, B.Configuration_Map_empty_null); - t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); - return t1; - }, - Evaluator: function Evaluator(t0, t1) { - this._visitor = t0; - this._importer = t1; - }, - _EvaluateVisitor: function _EvaluateVisitor(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { - var _ = this; - _._evaluate$_importCache = t0; - _._evaluate$_nodeImporter = t1; - _._builtInFunctions = t2; - _._builtInModules = t3; - _._modules = t4; - _._moduleConfigurations = t5; - _._moduleNodes = t6; - _._logger = t7; - _._warningsEmitted = t8; - _._quietDeps = t9; - _._sourceMap = t10; - _._environment = t11; - _._declarationName = _.__parent = _._mediaQuerySources = _._mediaQueries = _._styleRuleIgnoringAtRoot = null; - _._member = "root stylesheet"; - _._importSpan = _._callableNode = _._currentCallable = null; - _._inSupportsDeclaration = _._inKeyframes = _._atRootExcludingStyleRule = _._inUnknownAtRule = _._inFunction = false; - _._loadedUrls = t12; - _._activeModules = t13; - _._stack = t14; - _._importer = null; - _._inDependency = false; - _.__extensionStore = _._preModuleComments = _._outOfOrderImports = _.__endOfImports = _.__root = _.__stylesheet = null; - _._configuration = t15; - }, - _EvaluateVisitor_closure: function _EvaluateVisitor_closure(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure0: function _EvaluateVisitor_closure0(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure1: function _EvaluateVisitor_closure1(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure2: function _EvaluateVisitor_closure2(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure3: function _EvaluateVisitor_closure3(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure4: function _EvaluateVisitor_closure4(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure5: function _EvaluateVisitor_closure5(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure6: function _EvaluateVisitor_closure6(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure7: function _EvaluateVisitor_closure7(t0) { - this.$this = t0; - }, - _EvaluateVisitor__closure2: function _EvaluateVisitor__closure2(t0, t1, t2) { - this.$this = t0; - this.name = t1; - this.module = t2; - }, - _EvaluateVisitor_closure8: function _EvaluateVisitor_closure8(t0) { - this.$this = t0; - }, - _EvaluateVisitor__closure1: function _EvaluateVisitor__closure1(t0, t1, t2) { - this.$this = t0; - this.name = t1; - this.module = t2; - }, - _EvaluateVisitor_closure9: function _EvaluateVisitor_closure9(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure10: function _EvaluateVisitor_closure10(t0) { - this.$this = t0; - }, - _EvaluateVisitor__closure: function _EvaluateVisitor__closure(t0, t1, t2) { - this.values = t0; - this.span = t1; - this.callableNode = t2; - }, - _EvaluateVisitor__closure0: function _EvaluateVisitor__closure0(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure11: function _EvaluateVisitor_closure11(t0) { - this.$this = t0; - }, - _EvaluateVisitor_run_closure: function _EvaluateVisitor_run_closure(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.importer = t2; - }, - _EvaluateVisitor_run__closure: function _EvaluateVisitor_run__closure(t0, t1, t2) { - this.$this = t0; - this.importer = t1; - this.node = t2; - }, - _EvaluateVisitor_runExpression_closure: function _EvaluateVisitor_runExpression_closure(t0, t1, t2) { - this.$this = t0; - this.importer = t1; - this.expression = t2; - }, - _EvaluateVisitor_runExpression__closure: function _EvaluateVisitor_runExpression__closure(t0, t1) { - this.$this = t0; - this.expression = t1; - }, - _EvaluateVisitor_runExpression___closure: function _EvaluateVisitor_runExpression___closure(t0, t1) { - this.$this = t0; - this.expression = t1; - }, - _EvaluateVisitor_runStatement_closure: function _EvaluateVisitor_runStatement_closure(t0, t1, t2) { - this.$this = t0; - this.importer = t1; - this.statement = t2; - }, - _EvaluateVisitor_runStatement__closure: function _EvaluateVisitor_runStatement__closure(t0, t1) { - this.$this = t0; - this.statement = t1; - }, - _EvaluateVisitor_runStatement___closure: function _EvaluateVisitor_runStatement___closure(t0, t1) { - this.$this = t0; - this.statement = t1; - }, - _EvaluateVisitor__loadModule_closure: function _EvaluateVisitor__loadModule_closure(t0, t1) { - this._box_1 = t0; - this.callback = t1; - }, - _EvaluateVisitor__loadModule_closure0: function _EvaluateVisitor__loadModule_closure0(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.url = t1; - _.nodeWithSpan = t2; - _.baseUrl = t3; - _.namesInErrors = t4; - _.configuration = t5; - _.callback = t6; - }, - _EvaluateVisitor__loadModule__closure: function _EvaluateVisitor__loadModule__closure(t0, t1) { - this.$this = t0; - this.message = t1; - }, - _EvaluateVisitor__loadModule__closure0: function _EvaluateVisitor__loadModule__closure0(t0, t1, t2) { - this._box_0 = t0; - this.callback = t1; - this.firstLoad = t2; - }, - _EvaluateVisitor__execute_closure: function _EvaluateVisitor__execute_closure(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.importer = t1; - _.stylesheet = t2; - _.extensionStore = t3; - _.configuration = t4; - _.css = t5; - _.preModuleComments = t6; - }, - _EvaluateVisitor__combineCss_closure: function _EvaluateVisitor__combineCss_closure() { - }, - _EvaluateVisitor__combineCss_closure0: function _EvaluateVisitor__combineCss_closure0(t0) { - this.selectors = t0; - }, - _EvaluateVisitor__combineCss_visitModule: function _EvaluateVisitor__combineCss_visitModule(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.seen = t1; - _.clone = t2; - _.css = t3; - _.imports = t4; - _.sorted = t5; - }, - _EvaluateVisitor__extendModules_closure: function _EvaluateVisitor__extendModules_closure(t0) { - this.originalSelectors = t0; - }, - _EvaluateVisitor__extendModules_closure0: function _EvaluateVisitor__extendModules_closure0() { - }, - _EvaluateVisitor_visitAtRootRule_closure: function _EvaluateVisitor_visitAtRootRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitAtRootRule_closure0: function _EvaluateVisitor_visitAtRootRule_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure: function _EvaluateVisitor__scopeForAtRoot_closure(t0, t1, t2) { - this.$this = t0; - this.newParent = t1; - this.node = t2; - }, - _EvaluateVisitor__scopeForAtRoot_closure0: function _EvaluateVisitor__scopeForAtRoot_closure0(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure1: function _EvaluateVisitor__scopeForAtRoot_closure1(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor__scopeForAtRoot__closure: function _EvaluateVisitor__scopeForAtRoot__closure(t0, t1) { - this.innerScope = t0; - this.callback = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure2: function _EvaluateVisitor__scopeForAtRoot_closure2(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure3: function _EvaluateVisitor__scopeForAtRoot_closure3() { - }, - _EvaluateVisitor__scopeForAtRoot_closure4: function _EvaluateVisitor__scopeForAtRoot_closure4(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor_visitContentRule_closure: function _EvaluateVisitor_visitContentRule_closure(t0, t1) { - this.$this = t0; - this.content = t1; - }, - _EvaluateVisitor_visitDeclaration_closure: function _EvaluateVisitor_visitDeclaration_closure(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - _EvaluateVisitor_visitEachRule_closure: function _EvaluateVisitor_visitEachRule_closure(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.nodeWithSpan = t2; - }, - _EvaluateVisitor_visitEachRule_closure0: function _EvaluateVisitor_visitEachRule_closure0(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.nodeWithSpan = t2; - }, - _EvaluateVisitor_visitEachRule_closure1: function _EvaluateVisitor_visitEachRule_closure1(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.list = t1; - _.setVariables = t2; - _.node = t3; - }, - _EvaluateVisitor_visitEachRule__closure: function _EvaluateVisitor_visitEachRule__closure(t0, t1, t2) { - this.$this = t0; - this.setVariables = t1; - this.node = t2; - }, - _EvaluateVisitor_visitEachRule___closure: function _EvaluateVisitor_visitEachRule___closure(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitAtRule_closure: function _EvaluateVisitor_visitAtRule_closure(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitAtRule_closure0: function _EvaluateVisitor_visitAtRule_closure0(t0, t1, t2) { - this.$this = t0; - this.name = t1; - this.children = t2; - }, - _EvaluateVisitor_visitAtRule__closure: function _EvaluateVisitor_visitAtRule__closure(t0, t1) { - this.$this = t0; - this.children = t1; - }, - _EvaluateVisitor_visitAtRule_closure1: function _EvaluateVisitor_visitAtRule_closure1() { - }, - _EvaluateVisitor_visitForRule_closure: function _EvaluateVisitor_visitForRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitForRule_closure0: function _EvaluateVisitor_visitForRule_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitForRule_closure1: function _EvaluateVisitor_visitForRule_closure1(t0) { - this.fromNumber = t0; - }, - _EvaluateVisitor_visitForRule_closure2: function _EvaluateVisitor_visitForRule_closure2(t0, t1) { - this.toNumber = t0; - this.fromNumber = t1; - }, - _EvaluateVisitor_visitForRule_closure3: function _EvaluateVisitor_visitForRule_closure3(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.node = t2; - _.from = t3; - _.direction = t4; - _.fromNumber = t5; - }, - _EvaluateVisitor_visitForRule__closure: function _EvaluateVisitor_visitForRule__closure(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitForwardRule_closure: function _EvaluateVisitor_visitForwardRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitForwardRule_closure0: function _EvaluateVisitor_visitForwardRule_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__registerCommentsForModule_closure: function _EvaluateVisitor__registerCommentsForModule_closure() { - }, - _EvaluateVisitor_visitIfRule_closure: function _EvaluateVisitor_visitIfRule_closure(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitIfRule__closure: function _EvaluateVisitor_visitIfRule__closure(t0, t1) { - this.$this = t0; - this.clause = t1; - }, - _EvaluateVisitor_visitIfRule___closure: function _EvaluateVisitor_visitIfRule___closure(t0) { - this.$this = t0; - }, - _EvaluateVisitor__visitDynamicImport_closure: function _EvaluateVisitor__visitDynamicImport_closure(t0, t1) { - this.$this = t0; - this.$import = t1; - }, - _EvaluateVisitor__visitDynamicImport__closure: function _EvaluateVisitor__visitDynamicImport__closure(t0) { - this.$this = t0; - }, - _EvaluateVisitor__visitDynamicImport__closure0: function _EvaluateVisitor__visitDynamicImport__closure0() { - }, - _EvaluateVisitor__visitDynamicImport__closure1: function _EvaluateVisitor__visitDynamicImport__closure1() { - }, - _EvaluateVisitor__visitDynamicImport__closure2: function _EvaluateVisitor__visitDynamicImport__closure2(t0, t1, t2, t3, t4) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.loadsUserDefinedModules = t2; - _.environment = t3; - _.children = t4; - }, - _EvaluateVisitor__applyMixin_closure: function _EvaluateVisitor__applyMixin_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.$arguments = t1; - _.mixin = t2; - _.nodeWithSpanWithoutContent = t3; - }, - _EvaluateVisitor__applyMixin__closure0: function _EvaluateVisitor__applyMixin__closure0(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.$arguments = t1; - _.mixin = t2; - _.nodeWithSpanWithoutContent = t3; - }, - _EvaluateVisitor__applyMixin_closure0: function _EvaluateVisitor__applyMixin_closure0(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.contentCallable = t1; - _.mixin = t2; - _.nodeWithSpanWithoutContent = t3; - }, - _EvaluateVisitor__applyMixin__closure: function _EvaluateVisitor__applyMixin__closure(t0, t1, t2) { - this.$this = t0; - this.mixin = t1; - this.nodeWithSpanWithoutContent = t2; - }, - _EvaluateVisitor__applyMixin___closure: function _EvaluateVisitor__applyMixin___closure(t0, t1, t2) { - this.$this = t0; - this.mixin = t1; - this.nodeWithSpanWithoutContent = t2; - }, - _EvaluateVisitor__applyMixin____closure: function _EvaluateVisitor__applyMixin____closure(t0, t1) { - this.$this = t0; - this.statement = t1; - }, - _EvaluateVisitor_visitIncludeRule_closure: function _EvaluateVisitor_visitIncludeRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitIncludeRule_closure0: function _EvaluateVisitor_visitIncludeRule_closure0(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitIncludeRule_closure1: function _EvaluateVisitor_visitIncludeRule_closure1(t0) { - this.node = t0; - }, - _EvaluateVisitor_visitMediaRule_closure: function _EvaluateVisitor_visitMediaRule_closure(t0, t1) { - this.$this = t0; - this.queries = t1; - }, - _EvaluateVisitor_visitMediaRule_closure0: function _EvaluateVisitor_visitMediaRule_closure0(t0, t1, t2, t3, t4) { - var _ = this; - _.$this = t0; - _.mergedQueries = t1; - _.queries = t2; - _.mergedSources = t3; - _.node = t4; - }, - _EvaluateVisitor_visitMediaRule__closure: function _EvaluateVisitor_visitMediaRule__closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitMediaRule___closure: function _EvaluateVisitor_visitMediaRule___closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitMediaRule_closure1: function _EvaluateVisitor_visitMediaRule_closure1(t0) { - this.mergedSources = t0; - }, - _EvaluateVisitor_visitStyleRule_closure: function _EvaluateVisitor_visitStyleRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitStyleRule_closure0: function _EvaluateVisitor_visitStyleRule_closure0() { - }, - _EvaluateVisitor_visitStyleRule_closure2: function _EvaluateVisitor_visitStyleRule_closure2(t0, t1, t2) { - this.$this = t0; - this.rule = t1; - this.node = t2; - }, - _EvaluateVisitor_visitStyleRule__closure: function _EvaluateVisitor_visitStyleRule__closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitStyleRule_closure1: function _EvaluateVisitor_visitStyleRule_closure1() { - }, - _EvaluateVisitor__warnForBogusCombinators_closure: function _EvaluateVisitor__warnForBogusCombinators_closure() { - }, - _EvaluateVisitor_visitSupportsRule_closure: function _EvaluateVisitor_visitSupportsRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitSupportsRule__closure: function _EvaluateVisitor_visitSupportsRule__closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitSupportsRule_closure0: function _EvaluateVisitor_visitSupportsRule_closure0() { - }, - _EvaluateVisitor__visitSupportsCondition_closure: function _EvaluateVisitor__visitSupportsCondition_closure(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - _EvaluateVisitor_visitVariableDeclaration_closure: function _EvaluateVisitor_visitVariableDeclaration_closure(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.node = t2; - }, - _EvaluateVisitor_visitVariableDeclaration_closure0: function _EvaluateVisitor_visitVariableDeclaration_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitVariableDeclaration_closure1: function _EvaluateVisitor_visitVariableDeclaration_closure1(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.value = t2; - }, - _EvaluateVisitor_visitUseRule_closure: function _EvaluateVisitor_visitUseRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitWarnRule_closure: function _EvaluateVisitor_visitWarnRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitWhileRule_closure: function _EvaluateVisitor_visitWhileRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitWhileRule__closure: function _EvaluateVisitor_visitWhileRule__closure(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitBinaryOperationExpression_closure: function _EvaluateVisitor_visitBinaryOperationExpression_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__slash_recommendation: function _EvaluateVisitor__slash_recommendation() { - }, - _EvaluateVisitor_visitVariableExpression_closure: function _EvaluateVisitor_visitVariableExpression_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitUnaryOperationExpression_closure: function _EvaluateVisitor_visitUnaryOperationExpression_closure(t0, t1) { - this.node = t0; - this.operand = t1; - }, - _EvaluateVisitor_visitListExpression_closure: function _EvaluateVisitor_visitListExpression_closure(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitFunctionExpression_closure: function _EvaluateVisitor_visitFunctionExpression_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitFunctionExpression_closure0: function _EvaluateVisitor_visitFunctionExpression_closure0() { - }, - _EvaluateVisitor_visitFunctionExpression_closure1: function _EvaluateVisitor_visitFunctionExpression_closure1(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.node = t2; - }, - _EvaluateVisitor__visitCalculation_closure: function _EvaluateVisitor__visitCalculation_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__checkCalculationArguments_check: function _EvaluateVisitor__checkCalculationArguments_check(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__visitCalculationExpression_closure: function _EvaluateVisitor__visitCalculationExpression_closure(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.node = t2; - _.inLegacySassFunction = t3; - }, - _EvaluateVisitor__visitCalculationExpression__closure: function _EvaluateVisitor__visitCalculationExpression__closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitInterpolatedFunctionExpression_closure: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.$function = t2; - }, - _EvaluateVisitor__runUserDefinedCallable_closure: function _EvaluateVisitor__runUserDefinedCallable_closure(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.callable = t1; - _.evaluated = t2; - _.nodeWithSpan = t3; - _.run = t4; - _.V = t5; - }, - _EvaluateVisitor__runUserDefinedCallable__closure: function _EvaluateVisitor__runUserDefinedCallable__closure(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.evaluated = t1; - _.callable = t2; - _.nodeWithSpan = t3; - _.run = t4; - _.V = t5; - }, - _EvaluateVisitor__runUserDefinedCallable___closure: function _EvaluateVisitor__runUserDefinedCallable___closure(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.evaluated = t1; - _.callable = t2; - _.nodeWithSpan = t3; - _.run = t4; - _.V = t5; - }, - _EvaluateVisitor__runUserDefinedCallable____closure: function _EvaluateVisitor__runUserDefinedCallable____closure() { - }, - _EvaluateVisitor__runFunctionCallable_closure: function _EvaluateVisitor__runFunctionCallable_closure(t0, t1) { - this.$this = t0; - this.callable = t1; - }, - _EvaluateVisitor__runBuiltInCallable_closure: function _EvaluateVisitor__runBuiltInCallable_closure(t0, t1, t2) { - this._box_0 = t0; - this.evaluated = t1; - this.namedSet = t2; - }, - _EvaluateVisitor__runBuiltInCallable_closure0: function _EvaluateVisitor__runBuiltInCallable_closure0(t0, t1) { - this._box_0 = t0; - this.evaluated = t1; - }, - _EvaluateVisitor__runBuiltInCallable_closure1: function _EvaluateVisitor__runBuiltInCallable_closure1() { - }, - _EvaluateVisitor__evaluateArguments_closure: function _EvaluateVisitor__evaluateArguments_closure() { - }, - _EvaluateVisitor__evaluateArguments_closure0: function _EvaluateVisitor__evaluateArguments_closure0(t0, t1) { - this.$this = t0; - this.restNodeForSpan = t1; - }, - _EvaluateVisitor__evaluateArguments_closure1: function _EvaluateVisitor__evaluateArguments_closure1(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.named = t1; - _.restNodeForSpan = t2; - _.namedNodes = t3; - }, - _EvaluateVisitor__evaluateArguments_closure2: function _EvaluateVisitor__evaluateArguments_closure2() { - }, - _EvaluateVisitor__evaluateMacroArguments_closure: function _EvaluateVisitor__evaluateMacroArguments_closure(t0) { - this.restArgs = t0; - }, - _EvaluateVisitor__evaluateMacroArguments_closure0: function _EvaluateVisitor__evaluateMacroArguments_closure0(t0, t1, t2) { - this.$this = t0; - this.restNodeForSpan = t1; - this.restArgs = t2; - }, - _EvaluateVisitor__evaluateMacroArguments_closure1: function _EvaluateVisitor__evaluateMacroArguments_closure1(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.named = t1; - _.restNodeForSpan = t2; - _.restArgs = t3; - }, - _EvaluateVisitor__evaluateMacroArguments_closure2: function _EvaluateVisitor__evaluateMacroArguments_closure2(t0, t1, t2) { - this.$this = t0; - this.keywordRestNodeForSpan = t1; - this.keywordRestArgs = t2; - }, - _EvaluateVisitor__addRestMap_closure: function _EvaluateVisitor__addRestMap_closure(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.values = t1; - _.convert = t2; - _.expressionNode = t3; - _.map = t4; - _.nodeWithSpan = t5; - }, - _EvaluateVisitor__verifyArguments_closure: function _EvaluateVisitor__verifyArguments_closure(t0, t1, t2) { - this.$arguments = t0; - this.positional = t1; - this.named = t2; - }, - _EvaluateVisitor_visitCssAtRule_closure: function _EvaluateVisitor_visitCssAtRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssAtRule_closure0: function _EvaluateVisitor_visitCssAtRule_closure0() { - }, - _EvaluateVisitor_visitCssKeyframeBlock_closure: function _EvaluateVisitor_visitCssKeyframeBlock_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssKeyframeBlock_closure0: function _EvaluateVisitor_visitCssKeyframeBlock_closure0() { - }, - _EvaluateVisitor_visitCssMediaRule_closure: function _EvaluateVisitor_visitCssMediaRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssMediaRule_closure0: function _EvaluateVisitor_visitCssMediaRule_closure0(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.mergedQueries = t1; - _.node = t2; - _.mergedSources = t3; - }, - _EvaluateVisitor_visitCssMediaRule__closure: function _EvaluateVisitor_visitCssMediaRule__closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssMediaRule___closure: function _EvaluateVisitor_visitCssMediaRule___closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssMediaRule_closure1: function _EvaluateVisitor_visitCssMediaRule_closure1(t0) { - this.mergedSources = t0; - }, - _EvaluateVisitor_visitCssStyleRule_closure0: function _EvaluateVisitor_visitCssStyleRule_closure0(t0, t1, t2) { - this.$this = t0; - this.rule = t1; - this.node = t2; - }, - _EvaluateVisitor_visitCssStyleRule__closure: function _EvaluateVisitor_visitCssStyleRule__closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssStyleRule_closure: function _EvaluateVisitor_visitCssStyleRule_closure() { - }, - _EvaluateVisitor_visitCssSupportsRule_closure: function _EvaluateVisitor_visitCssSupportsRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssSupportsRule__closure: function _EvaluateVisitor_visitCssSupportsRule__closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssSupportsRule_closure0: function _EvaluateVisitor_visitCssSupportsRule_closure0() { - }, - _EvaluateVisitor__performInterpolationHelper_closure: function _EvaluateVisitor__performInterpolationHelper_closure(t0) { - this.interpolation = t0; - }, - _EvaluateVisitor__serialize_closure: function _EvaluateVisitor__serialize_closure(t0, t1) { - this.value = t0; - this.quote = t1; - }, - _EvaluateVisitor__expressionNode_closure: function _EvaluateVisitor__expressionNode_closure(t0, t1) { - this.$this = t0; - this.expression = t1; - }, - _EvaluateVisitor__withoutSlash_recommendation: function _EvaluateVisitor__withoutSlash_recommendation() { - }, - _EvaluateVisitor__stackFrame_closure: function _EvaluateVisitor__stackFrame_closure(t0) { - this.$this = t0; - }, - _ImportedCssVisitor: function _ImportedCssVisitor(t0) { - this._visitor = t0; - }, - _ImportedCssVisitor_visitCssAtRule_closure: function _ImportedCssVisitor_visitCssAtRule_closure() { - }, - _ImportedCssVisitor_visitCssMediaRule_closure: function _ImportedCssVisitor_visitCssMediaRule_closure(t0) { - this.hasBeenMerged = t0; - }, - _ImportedCssVisitor_visitCssStyleRule_closure: function _ImportedCssVisitor_visitCssStyleRule_closure() { - }, - _ImportedCssVisitor_visitCssSupportsRule_closure: function _ImportedCssVisitor_visitCssSupportsRule_closure() { - }, - _EvaluationContext: function _EvaluationContext(t0, t1) { - this._visitor = t0; - this._defaultWarnNodeWithSpan = t1; - }, - EveryCssVisitor: function EveryCssVisitor() { - }, - EveryCssVisitor_visitCssAtRule_closure: function EveryCssVisitor_visitCssAtRule_closure(t0) { - this.$this = t0; - }, - EveryCssVisitor_visitCssKeyframeBlock_closure: function EveryCssVisitor_visitCssKeyframeBlock_closure(t0) { - this.$this = t0; - }, - EveryCssVisitor_visitCssMediaRule_closure: function EveryCssVisitor_visitCssMediaRule_closure(t0) { - this.$this = t0; - }, - EveryCssVisitor_visitCssStyleRule_closure: function EveryCssVisitor_visitCssStyleRule_closure(t0) { - this.$this = t0; - }, - EveryCssVisitor_visitCssStylesheet_closure: function EveryCssVisitor_visitCssStylesheet_closure(t0) { - this.$this = t0; - }, - EveryCssVisitor_visitCssSupportsRule_closure: function EveryCssVisitor_visitCssSupportsRule_closure(t0) { - this.$this = t0; - }, - expressionToCalc(expression) { - var t4, - t1 = A._setArrayType([B.C__MakeExpressionCalculationSafe.visitBinaryOperationExpression$1(0, expression)], type$.JSArray_Expression), - t2 = expression.get$span(0), - t3 = type$.Expression; - t1 = A.List_List$unmodifiable(t1, t3); - t3 = A.ConstantMap_ConstantMap$from(B.Map_empty5, type$.String, t3); - t4 = expression.get$span(0); - return new A.FunctionExpression(null, A.stringReplaceAllUnchecked("calc", "_", "-"), "calc", new A.ArgumentInvocation(t1, t3, null, null, t2), t4); - }, - _MakeExpressionCalculationSafe: function _MakeExpressionCalculationSafe() { - }, - __MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor: function __MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor() { - }, - _FindDependenciesVisitor: function _FindDependenciesVisitor(t0, t1, t2, t3, t4) { - var _ = this; - _._find_dependencies$_uses = t0; - _._find_dependencies$_forwards = t1; - _._metaLoadCss = t2; - _._imports = t3; - _._metaNamespaces = t4; - }, - DependencyReport: function DependencyReport(t0, t1, t2, t3) { - var _ = this; - _.uses = t0; - _.forwards = t1; - _.metaLoadCss = t2; - _.imports = t3; - }, - __FindDependenciesVisitor_Object_RecursiveStatementVisitor: function __FindDependenciesVisitor_Object_RecursiveStatementVisitor() { - }, - IsCalculationSafeVisitor: function IsCalculationSafeVisitor() { - }, - IsCalculationSafeVisitor_visitListExpression_closure: function IsCalculationSafeVisitor_visitListExpression_closure(t0) { - this.$this = t0; - }, - RecursiveStatementVisitor: function RecursiveStatementVisitor() { - }, - ReplaceExpressionVisitor: function ReplaceExpressionVisitor() { - }, - ReplaceExpressionVisitor_visitListExpression_closure: function ReplaceExpressionVisitor_visitListExpression_closure(t0) { - this.$this = t0; - }, - ReplaceExpressionVisitor_visitArgumentInvocation_closure: function ReplaceExpressionVisitor_visitArgumentInvocation_closure(t0) { - this.$this = t0; - }, - ReplaceExpressionVisitor_visitInterpolation_closure: function ReplaceExpressionVisitor_visitInterpolation_closure(t0) { - this.$this = t0; - }, - SelectorSearchVisitor: function SelectorSearchVisitor() { - }, - SelectorSearchVisitor_visitComplexSelector_closure: function SelectorSearchVisitor_visitComplexSelector_closure(t0) { - this.$this = t0; - }, - SelectorSearchVisitor_visitCompoundSelector_closure: function SelectorSearchVisitor_visitCompoundSelector_closure(t0) { - this.$this = t0; - }, - serialize(node, charset, indentWidth, inspect, lineFeed, logger, sourceMap, style, useSpaces) { - var t1, css, t2, prefix, - visitor = A._SerializeVisitor$(2, inspect, lineFeed, logger, true, sourceMap, style, true); - node.accept$1(visitor); - t1 = visitor._serialize$_buffer; - css = t1.toString$0(0); - if (charset) { - t2 = new A.CodeUnits(css); - t2 = t2.any$1(t2, new A.serialize_closure()); - } else - t2 = false; - if (t2) - prefix = style === B.OutputStyle_1 ? "\ufeff" : '@charset "UTF-8";\n'; - else - prefix = ""; - t1 = sourceMap ? t1.buildSourceMap$1$prefix(prefix) : null; - return new A._Record_2_sourceMap(prefix + css, t1); - }, - serializeValue(value, inspect, quote) { - var _null = null, - visitor = A._SerializeVisitor$(_null, inspect, _null, _null, quote, false, _null, true); - value.accept$1(visitor); - return visitor._serialize$_buffer.toString$0(0); - }, - serializeSelector(selector, inspect) { - var _null = null, - visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); - selector.accept$1(visitor); - return visitor._serialize$_buffer.toString$0(0); - }, - _SerializeVisitor$(indentWidth, inspect, lineFeed, logger, quote, sourceMap, style, useSpaces) { - var t1 = sourceMap ? new A.SourceMapBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Entry)) : new A.NoSourceMapBuffer(new A.StringBuffer("")), - t2 = style == null ? B.OutputStyle_0 : style, - t3 = indentWidth == null ? 2 : indentWidth, - t4 = logger == null ? B.StderrLogger_false : logger; - A.RangeError_checkValueInInterval(t3, 0, 10, "indentWidth"); - return new A._SerializeVisitor(t1, t2, inspect, quote, 32, t3, B.LineFeed_lf, t4); - }, - serialize_closure: function serialize_closure() { - }, - _SerializeVisitor: function _SerializeVisitor(t0, t1, t2, t3, t4, t5, t6, t7) { - var _ = this; - _._serialize$_buffer = t0; - _._indentation = 0; - _._style = t1; - _._inspect = t2; - _._quote = t3; - _._indentCharacter = t4; - _._indentWidth = t5; - _._serialize$_lineFeed = t6; - _._serialize$_logger = t7; - }, - _SerializeVisitor_visitCssComment_closure: function _SerializeVisitor_visitCssComment_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssAtRule_closure: function _SerializeVisitor_visitCssAtRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssMediaRule_closure: function _SerializeVisitor_visitCssMediaRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssImport_closure: function _SerializeVisitor_visitCssImport_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssImport__closure: function _SerializeVisitor_visitCssImport__closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssKeyframeBlock_closure: function _SerializeVisitor_visitCssKeyframeBlock_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssStyleRule_closure: function _SerializeVisitor_visitCssStyleRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssSupportsRule_closure: function _SerializeVisitor_visitCssSupportsRule_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssDeclaration_closure: function _SerializeVisitor_visitCssDeclaration_closure(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssDeclaration_closure0: function _SerializeVisitor_visitCssDeclaration_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitList_closure: function _SerializeVisitor_visitList_closure() { - }, - _SerializeVisitor_visitList_closure0: function _SerializeVisitor_visitList_closure0(t0, t1) { - this.$this = t0; - this.value = t1; - }, - _SerializeVisitor_visitList_closure1: function _SerializeVisitor_visitList_closure1(t0) { - this.$this = t0; - }, - _SerializeVisitor_visitMap_closure: function _SerializeVisitor_visitMap_closure(t0) { - this.$this = t0; - }, - _SerializeVisitor_visitSelectorList_closure: function _SerializeVisitor_visitSelectorList_closure() { - }, - _SerializeVisitor__write_closure: function _SerializeVisitor__write_closure(t0, t1) { - this.$this = t0; - this.value = t1; - }, - _SerializeVisitor__visitChildren_closure: function _SerializeVisitor__visitChildren_closure(t0, t1) { - this.$this = t0; - this.child = t1; - }, - _SerializeVisitor__visitChildren_closure0: function _SerializeVisitor__visitChildren_closure0(t0, t1) { - this.$this = t0; - this.child = t1; - }, - OutputStyle: function OutputStyle(t0) { - this._name = t0; - }, - LineFeed: function LineFeed(t0) { - this._name = t0; - }, - StatementSearchVisitor: function StatementSearchVisitor() { - }, - StatementSearchVisitor_visitIfRule_closure: function StatementSearchVisitor_visitIfRule_closure(t0) { - this.$this = t0; - }, - StatementSearchVisitor_visitIfRule__closure0: function StatementSearchVisitor_visitIfRule__closure0(t0) { - this.$this = t0; - }, - StatementSearchVisitor_visitIfRule_closure0: function StatementSearchVisitor_visitIfRule_closure0(t0) { - this.$this = t0; - }, - StatementSearchVisitor_visitIfRule__closure: function StatementSearchVisitor_visitIfRule__closure(t0) { - this.$this = t0; - }, - StatementSearchVisitor_visitChildren_closure: function StatementSearchVisitor_visitChildren_closure(t0) { - this.$this = t0; - }, - Entry: function Entry(t0, t1, t2) { - this.source = t0; - this.target = t1; - this.identifierName = t2; - }, - SingleMapping_SingleMapping$fromEntries(entries) { - var lines, t1, t2, urls, names, files, targetEntries, t3, lineNum, _i, sourceEntry, t4, t5, sourceUrl, t6, urlId, - sourceEntries = J.toList$0$ax(entries); - B.JSArray_methods.sort$0(sourceEntries); - lines = A._setArrayType([], type$.JSArray_TargetLineEntry); - t1 = type$.String; - t2 = type$.int; - urls = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - names = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - files = A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.SourceFile); - targetEntries = A._Cell$(); - for (t2 = sourceEntries.length, t3 = type$.JSArray_TargetEntry, lineNum = null, _i = 0; _i < sourceEntries.length; sourceEntries.length === t2 || (0, A.throwConcurrentModificationError)(sourceEntries), ++_i) { - sourceEntry = sourceEntries[_i]; - if (lineNum == null || sourceEntry.target.line > lineNum) { - lineNum = sourceEntry.target.line; - t4 = A._setArrayType([], t3); - targetEntries.__late_helper$_value = t4; - lines.push(new A.TargetLineEntry(lineNum, t4)); - } - t4 = sourceEntry.source; - t5 = t4.file; - sourceUrl = t5.url; - t6 = sourceUrl == null ? "" : sourceUrl.toString$0(0); - urlId = urls.putIfAbsent$2(t6, new A.SingleMapping_SingleMapping$fromEntries_closure(urls)); - files.putIfAbsent$2(urlId, new A.SingleMapping_SingleMapping$fromEntries_closure0(sourceEntry)); - t6 = targetEntries.__late_helper$_value; - if (t6 === targetEntries) - A.throwExpression(A.LateError$localNI("")); - t4 = t4.offset; - J.add$1$ax(t6, new A.TargetEntry(sourceEntry.target.column, urlId, t5.getLine$1(t4), t5.getColumn$1(t4), null)); - } - t2 = urls.get$values(0); - t2 = A.MappedIterable_MappedIterable(t2, new A.SingleMapping_SingleMapping$fromEntries_closure1(files), A._instanceType(t2)._eval$1("Iterable.E"), type$.nullable_SourceFile); - t2 = A.List_List$of(t2, true, A._instanceType(t2)._eval$1("Iterable.E")); - t3 = urls.$ti._eval$1("LinkedHashMapKeyIterable<1>"); - t4 = names.$ti._eval$1("LinkedHashMapKeyIterable<1>"); - return new A.SingleMapping(A.List_List$of(new A.LinkedHashMapKeyIterable(urls, t3), true, t3._eval$1("Iterable.E")), A.List_List$of(new A.LinkedHashMapKeyIterable(names, t4), true, t4._eval$1("Iterable.E")), t2, lines, null, A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.dynamic)); - }, - Mapping: function Mapping() { - }, - SingleMapping: function SingleMapping(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.urls = t0; - _.names = t1; - _.files = t2; - _.lines = t3; - _.targetUrl = t4; - _.sourceRoot = null; - _.extensions = t5; - }, - SingleMapping_SingleMapping$fromEntries_closure: function SingleMapping_SingleMapping$fromEntries_closure(t0) { - this.urls = t0; - }, - SingleMapping_SingleMapping$fromEntries_closure0: function SingleMapping_SingleMapping$fromEntries_closure0(t0) { - this.sourceEntry = t0; - }, - SingleMapping_SingleMapping$fromEntries_closure1: function SingleMapping_SingleMapping$fromEntries_closure1(t0) { - this.files = t0; - }, - SingleMapping_toJson_closure: function SingleMapping_toJson_closure() { - }, - SingleMapping_toJson_closure0: function SingleMapping_toJson_closure0(t0) { - this.result = t0; - }, - TargetLineEntry: function TargetLineEntry(t0, t1) { - this.line = t0; - this.entries = t1; - }, - TargetEntry: function TargetEntry(t0, t1, t2, t3, t4) { - var _ = this; - _.column = t0; - _.sourceUrlId = t1; - _.sourceLine = t2; - _.sourceColumn = t3; - _.sourceNameId = t4; - }, - SourceFile$fromString(text, url) { - var t1 = new A.CodeUnits(text), - t2 = A._setArrayType([0], type$.JSArray_int), - t3 = typeof url == "string" ? A.Uri_parse(url) : type$.nullable_Uri._as(url); - t2 = new A.SourceFile(t3, t2, new Uint32Array(A._ensureNativeList(t1.toList$0(t1)))); - t2.SourceFile$decoded$2$url(t1, url); - return t2; - }, - SourceFile$decoded(decodedChars, url) { - var t1 = A._setArrayType([0], type$.JSArray_int), - t2 = typeof url == "string" ? A.Uri_parse(url) : type$.nullable_Uri._as(url); - t1 = new A.SourceFile(t2, t1, new Uint32Array(A._ensureNativeList(J.toList$0$ax(decodedChars)))); - t1.SourceFile$decoded$2$url(decodedChars, url); - return t1; - }, - FileLocation$_(file, offset) { - if (offset < 0) - A.throwExpression(A.RangeError$("Offset may not be negative, was " + offset + ".")); - else if (offset > file._decodedChars.length) - A.throwExpression(A.RangeError$("Offset " + offset + string$.x20must_n + file.get$length(0) + ".")); - return new A.FileLocation(file, offset); - }, - _FileSpan$(file, _start, _end) { - if (_end < _start) - A.throwExpression(A.ArgumentError$("End " + _end + " must come after start " + _start + ".", null)); - else if (_end > file._decodedChars.length) - A.throwExpression(A.RangeError$("End " + _end + string$.x20must_n + file.get$length(0) + ".")); - else if (_start < 0) - A.throwExpression(A.RangeError$("Start may not be negative, was " + _start + ".")); - return new A._FileSpan(file, _start, _end); - }, - FileSpanExtension_subspan(_this, start, end) { - var t1, startOffset, t2; - A.RangeError_checkValidRange(start, end, _this.get$length(_this)); - if (start === 0) - t1 = end == null || end === _this.get$length(_this); - else - t1 = false; - if (t1) - return _this; - startOffset = _this.get$start(_this).offset; - t1 = _this.get$file(_this); - t2 = end == null ? _this.get$end(_this).offset : startOffset + end; - return t1.span$2(0, startOffset + start, t2); - }, - SourceFile: function SourceFile(t0, t1, t2) { - var _ = this; - _.url = t0; - _._lineStarts = t1; - _._decodedChars = t2; - _._cachedLine = null; - }, - FileLocation: function FileLocation(t0, t1) { - this.file = t0; - this.offset = t1; - }, - _FileSpan: function _FileSpan(t0, t1, t2) { - this.file = t0; - this._file$_start = t1; - this._end = t2; - }, - Highlighter$(span, color) { - var t1 = A.Highlighter__collateLines(A._setArrayType([A._Highlight$(span, null, true)], type$.JSArray__Highlight)), - t2 = new A.Highlighter_closure(color).call$0(), - t3 = B.JSInt_methods.toString$0(B.JSArray_methods.get$last(t1).number + 1), - t4 = A.Highlighter__contiguous(t1) ? 0 : 3, - t5 = A._arrayInstanceType(t1); - return new A.Highlighter(t1, t2, null, 1 + Math.max(t3.length, t4), new A.MappedListIterable(t1, new A.Highlighter$__closure(), t5._eval$1("MappedListIterable<1,int>")).reduce$1(0, B.CONSTANT), !A.isAllTheSame(new A.MappedListIterable(t1, new A.Highlighter$__closure0(), t5._eval$1("MappedListIterable<1,Object?>"))), new A.StringBuffer("")); - }, - Highlighter$multiple(primarySpan, primaryLabel, secondarySpans, color, primaryColor, secondaryColor) { - var t2, t3, t4, t5, t6, - t1 = A._setArrayType([A._Highlight$(primarySpan, primaryLabel, true)], type$.JSArray__Highlight); - for (t2 = secondarySpans.get$entries(secondarySpans), t2 = t2.get$iterator(t2); t2.moveNext$0();) { - t3 = t2.get$current(t2); - t1.push(A._Highlight$(t3.key, t3.value, false)); - } - t1 = A.Highlighter__collateLines(t1); - if (color) - t2 = primaryColor == null ? "\x1b[31m" : primaryColor; - else - t2 = null; - if (color) - t3 = "\x1b[34m"; - else - t3 = null; - t4 = B.JSInt_methods.toString$0(B.JSArray_methods.get$last(t1).number + 1); - t5 = A.Highlighter__contiguous(t1) ? 0 : 3; - t6 = A._arrayInstanceType(t1); - return new A.Highlighter(t1, t2, t3, 1 + Math.max(t4.length, t5), new A.MappedListIterable(t1, new A.Highlighter$__closure(), t6._eval$1("MappedListIterable<1,int>")).reduce$1(0, B.CONSTANT), !A.isAllTheSame(new A.MappedListIterable(t1, new A.Highlighter$__closure0(), t6._eval$1("MappedListIterable<1,Object?>"))), new A.StringBuffer("")); - }, - Highlighter__contiguous(lines) { - var i, thisLine, nextLine; - for (i = 0; i < lines.length - 1;) { - thisLine = lines[i]; - ++i; - nextLine = lines[i]; - if (thisLine.number + 1 !== nextLine.number && J.$eq$(thisLine.url, nextLine.url)) - return false; - } - return true; - }, - Highlighter__collateLines(highlights) { - var t1, t2, t3, - highlightsByUrl = A.groupBy(highlights, new A.Highlighter__collateLines_closure(), type$._Highlight, type$.Object); - for (t1 = highlightsByUrl.get$values(0), t2 = A._instanceType(t1), t1 = new A.MappedIterator(J.get$iterator$ax(t1.__internal$_iterable), t1._f, t2._eval$1("MappedIterator<1,2>")), t2 = t2._rest[1]; t1.moveNext$0();) { - t3 = t1.__internal$_current; - if (t3 == null) - t3 = t2._as(t3); - J.sort$1$ax(t3, new A.Highlighter__collateLines_closure0()); - } - t1 = highlightsByUrl.get$entries(0); - t2 = A._instanceType(t1)._eval$1("ExpandIterable"); - return A.List_List$of(new A.ExpandIterable(t1, new A.Highlighter__collateLines_closure1(), t2), true, t2._eval$1("Iterable.E")); - }, - _Highlight$(span, label, primary) { - var t2, - t1 = new A._Highlight_closure(span).call$0(); - if (label == null) - t2 = null; - else - t2 = A.stringReplaceAllUnchecked(label, "\r\n", "\n"); - return new A._Highlight(t1, primary, t2); - }, - _Highlight__normalizeNewlines(span) { - var endOffset, t1, i, t2, t3, t4, - text = span.get$text(); - if (!B.JSString_methods.contains$1(text, "\r\n")) - return span; - endOffset = span.get$end(span).get$offset(); - for (t1 = text.length - 1, i = 0; i < t1; ++i) - if (text.charCodeAt(i) === 13 && text.charCodeAt(i + 1) === 10) - --endOffset; - t1 = span.get$start(span); - t2 = span.get$sourceUrl(span); - t3 = span.get$end(span).get$line(); - t2 = A.SourceLocation$(endOffset, span.get$end(span).get$column(), t3, t2); - t3 = A.stringReplaceAllUnchecked(text, "\r\n", "\n"); - t4 = span.get$context(span); - return A.SourceSpanWithContext$(t1, t2, t3, A.stringReplaceAllUnchecked(t4, "\r\n", "\n")); - }, - _Highlight__normalizeTrailingNewline(span) { - var context, text, start, end, t1, t2, t3; - if (!B.JSString_methods.endsWith$1(span.get$context(span), "\n")) - return span; - if (B.JSString_methods.endsWith$1(span.get$text(), "\n\n")) - return span; - context = B.JSString_methods.substring$2(span.get$context(span), 0, span.get$context(span).length - 1); - text = span.get$text(); - start = span.get$start(span); - end = span.get$end(span); - if (B.JSString_methods.endsWith$1(span.get$text(), "\n")) { - t1 = A.findLineStart(span.get$context(span), span.get$text(), span.get$start(span).get$column()); - t1.toString; - t1 = t1 + span.get$start(span).get$column() + span.get$length(span) === span.get$context(span).length; - } else - t1 = false; - if (t1) { - text = B.JSString_methods.substring$2(span.get$text(), 0, span.get$text().length - 1); - if (text.length === 0) - end = start; - else { - t1 = span.get$end(span).get$offset(); - t2 = span.get$sourceUrl(span); - t3 = span.get$end(span).get$line(); - end = A.SourceLocation$(t1 - 1, A._Highlight__lastLineLength(context), t3 - 1, t2); - start = span.get$start(span).get$offset() === span.get$end(span).get$offset() ? end : span.get$start(span); - } - } - return A.SourceSpanWithContext$(start, end, text, context); - }, - _Highlight__normalizeEndOfLine(span) { - var text, t1, t2, t3, t4; - if (span.get$end(span).get$column() !== 0) - return span; - if (span.get$end(span).get$line() === span.get$start(span).get$line()) - return span; - text = B.JSString_methods.substring$2(span.get$text(), 0, span.get$text().length - 1); - t1 = span.get$start(span); - t2 = span.get$end(span).get$offset(); - t3 = span.get$sourceUrl(span); - t4 = span.get$end(span).get$line(); - t3 = A.SourceLocation$(t2 - 1, text.length - B.JSString_methods.lastIndexOf$1(text, "\n") - 1, t4 - 1, t3); - return A.SourceSpanWithContext$(t1, t3, text, B.JSString_methods.endsWith$1(span.get$context(span), "\n") ? B.JSString_methods.substring$2(span.get$context(span), 0, span.get$context(span).length - 1) : span.get$context(span)); - }, - _Highlight__lastLineLength(text) { - var t1 = text.length; - if (t1 === 0) - return 0; - else if (text.charCodeAt(t1 - 1) === 10) - return t1 === 1 ? 0 : t1 - B.JSString_methods.lastIndexOf$2(text, "\n", t1 - 2) - 1; - else - return t1 - B.JSString_methods.lastIndexOf$1(text, "\n") - 1; - }, - Highlighter: function Highlighter(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _._lines = t0; - _._primaryColor = t1; - _._secondaryColor = t2; - _._paddingBeforeSidebar = t3; - _._maxMultilineSpans = t4; - _._multipleFiles = t5; - _._highlighter$_buffer = t6; - }, - Highlighter_closure: function Highlighter_closure(t0) { - this.color = t0; - }, - Highlighter$__closure: function Highlighter$__closure() { - }, - Highlighter$___closure: function Highlighter$___closure() { - }, - Highlighter$__closure0: function Highlighter$__closure0() { - }, - Highlighter__collateLines_closure: function Highlighter__collateLines_closure() { - }, - Highlighter__collateLines_closure0: function Highlighter__collateLines_closure0() { - }, - Highlighter__collateLines_closure1: function Highlighter__collateLines_closure1() { - }, - Highlighter__collateLines__closure: function Highlighter__collateLines__closure(t0) { - this.line = t0; - }, - Highlighter_highlight_closure: function Highlighter_highlight_closure() { - }, - Highlighter__writeFileStart_closure: function Highlighter__writeFileStart_closure(t0) { - this.$this = t0; - }, - Highlighter__writeMultilineHighlights_closure: function Highlighter__writeMultilineHighlights_closure(t0, t1, t2) { - this.$this = t0; - this.startLine = t1; - this.line = t2; - }, - Highlighter__writeMultilineHighlights_closure0: function Highlighter__writeMultilineHighlights_closure0(t0, t1) { - this.$this = t0; - this.highlight = t1; - }, - Highlighter__writeMultilineHighlights_closure1: function Highlighter__writeMultilineHighlights_closure1(t0) { - this.$this = t0; - }, - Highlighter__writeMultilineHighlights_closure2: function Highlighter__writeMultilineHighlights_closure2(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.current = t2; - _.startLine = t3; - _.line = t4; - _.highlight = t5; - _.endLine = t6; - }, - Highlighter__writeMultilineHighlights__closure: function Highlighter__writeMultilineHighlights__closure(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - Highlighter__writeMultilineHighlights__closure0: function Highlighter__writeMultilineHighlights__closure0(t0, t1) { - this.$this = t0; - this.vertical = t1; - }, - Highlighter__writeHighlightedText_closure: function Highlighter__writeHighlightedText_closure(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.text = t1; - _.startColumn = t2; - _.endColumn = t3; - }, - Highlighter__writeIndicator_closure: function Highlighter__writeIndicator_closure(t0, t1, t2) { - this.$this = t0; - this.line = t1; - this.highlight = t2; - }, - Highlighter__writeIndicator_closure0: function Highlighter__writeIndicator_closure0(t0, t1, t2) { - this.$this = t0; - this.line = t1; - this.highlight = t2; - }, - Highlighter__writeIndicator_closure1: function Highlighter__writeIndicator_closure1(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.coversWholeLine = t1; - _.line = t2; - _.highlight = t3; - }, - Highlighter__writeLabel_closure: function Highlighter__writeLabel_closure(t0, t1) { - this.$this = t0; - this.lines = t1; - }, - Highlighter__writeLabel_closure0: function Highlighter__writeLabel_closure0(t0, t1) { - this.$this = t0; - this.text = t1; - }, - Highlighter__writeSidebar_closure: function Highlighter__writeSidebar_closure(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.end = t2; - }, - _Highlight: function _Highlight(t0, t1, t2) { - this.span = t0; - this.isPrimary = t1; - this.label = t2; - }, - _Highlight_closure: function _Highlight_closure(t0) { - this.span = t0; - }, - _Line: function _Line(t0, t1, t2, t3) { - var _ = this; - _.text = t0; - _.number = t1; - _.url = t2; - _.highlights = t3; - }, - SourceLocation$(offset, column, line, sourceUrl) { - var t1 = line == null, - t2 = t1 ? 0 : line, - t3 = column == null, - t4 = t3 ? offset : column; - if (offset < 0) - A.throwExpression(A.RangeError$("Offset may not be negative, was " + offset + ".")); - else if (!t1 && line < 0) - A.throwExpression(A.RangeError$("Line may not be negative, was " + A.S(line) + ".")); - else if (!t3 && column < 0) - A.throwExpression(A.RangeError$("Column may not be negative, was " + A.S(column) + ".")); - return new A.SourceLocation(sourceUrl, offset, t2, t4); - }, - SourceLocation: function SourceLocation(t0, t1, t2, t3) { - var _ = this; - _.sourceUrl = t0; - _.offset = t1; - _.line = t2; - _.column = t3; - }, - SourceLocationMixin: function SourceLocationMixin() { - }, - SourceSpanExtension_messageMultiple(_this, message, label, secondarySpans, color, primaryColor, secondaryColor) { - var t2, t3, - t1 = _this.get$start(_this); - t1 = t1.file.getLine$1(t1.offset); - t2 = _this.get$start(_this); - t2 = "" + ("line " + (t1 + 1) + ", column " + (t2.file.getColumn$1(t2.offset) + 1)); - if (_this.get$sourceUrl(_this) != null) { - t1 = _this.get$sourceUrl(_this); - t3 = $.$get$context(); - t1.toString; - t1 = t2 + (" of " + t3.prettyUri$1(t1)); - } else - t1 = t2; - t1 = t1 + (": " + message + "\n") + A.Highlighter$multiple(_this, label, secondarySpans, color, primaryColor, secondaryColor).highlight$0(); - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - SourceSpanBase: function SourceSpanBase() { - }, - SourceSpanException: function SourceSpanException() { - }, - SourceSpanFormatException: function SourceSpanFormatException(t0, t1, t2) { - this.source = t0; - this._span_exception$_message = t1; - this._span = t2; - }, - MultiSourceSpanException: function MultiSourceSpanException() { - }, - MultiSourceSpanFormatException: function MultiSourceSpanFormatException(t0, t1, t2, t3, t4) { - var _ = this; - _.source = t0; - _.primaryLabel = t1; - _.secondarySpans = t2; - _._span_exception$_message = t3; - _._span = t4; - }, - SourceSpanMixin: function SourceSpanMixin() { - }, - SourceSpanWithContext$(start, end, text, _context) { - var t1 = new A.SourceSpanWithContext(_context, start, end, text); - t1.SourceSpanBase$3(start, end, text); - if (!B.JSString_methods.contains$1(_context, text)) - A.throwExpression(A.ArgumentError$('The context line "' + _context + '" must contain "' + text + '".', null)); - if (A.findLineStart(_context, text, start.get$column()) == null) - A.throwExpression(A.ArgumentError$('The span text "' + text + '" must start at column ' + (start.get$column() + 1) + ' in a line within "' + _context + '".', null)); - return t1; - }, - SourceSpanWithContext: function SourceSpanWithContext(t0, t1, t2, t3) { - var _ = this; - _._context = t0; - _.start = t1; - _.end = t2; - _.text = t3; - }, - Chain_Chain$parse(chain) { - var t1, t2, - _s51_ = string$.x3d_____; - if (chain.length === 0) - return new A.Chain(A.List_List$unmodifiable(A._setArrayType([], type$.JSArray_Trace), type$.Trace)); - t1 = $.$get$vmChainGap(); - if (B.JSString_methods.contains$1(chain, t1)) { - t1 = B.JSString_methods.split$1(chain, t1); - t2 = A._arrayInstanceType(t1); - return new A.Chain(A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(t1, new A.Chain_Chain$parse_closure(), t2._eval$1("WhereIterable<1>")), A.trace_Trace___parseVM_tearOff$closure(), t2._eval$1("MappedIterable<1,Trace>")), type$.Trace)); - } - if (!B.JSString_methods.contains$1(chain, _s51_)) - return new A.Chain(A.List_List$unmodifiable(A._setArrayType([A.Trace_Trace$parse(chain)], type$.JSArray_Trace), type$.Trace)); - return new A.Chain(A.List_List$unmodifiable(new A.MappedListIterable(A._setArrayType(chain.split(_s51_), type$.JSArray_String), A.trace_Trace___parseFriendly_tearOff$closure(), type$.MappedListIterable_String_Trace), type$.Trace)); - }, - Chain: function Chain(t0) { - this.traces = t0; - }, - Chain_Chain$parse_closure: function Chain_Chain$parse_closure() { - }, - Chain_toTrace_closure: function Chain_toTrace_closure() { - }, - Chain_toString_closure0: function Chain_toString_closure0() { - }, - Chain_toString__closure0: function Chain_toString__closure0() { - }, - Chain_toString_closure: function Chain_toString_closure(t0) { - this.longest = t0; - }, - Chain_toString__closure: function Chain_toString__closure(t0) { - this.longest = t0; - }, - Frame___parseVM_tearOff(frame) { - return A.Frame_Frame$parseVM(frame); - }, - Frame_Frame$parseVM(frame) { - return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseVM_closure(frame)); - }, - Frame___parseV8_tearOff(frame) { - return A.Frame_Frame$parseV8(frame); - }, - Frame_Frame$parseV8(frame) { - return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseV8_closure(frame)); - }, - Frame_Frame$_parseFirefoxEval(frame) { - return A.Frame__catchFormatException(frame, new A.Frame_Frame$_parseFirefoxEval_closure(frame)); - }, - Frame___parseFirefox_tearOff(frame) { - return A.Frame_Frame$parseFirefox(frame); - }, - Frame_Frame$parseFirefox(frame) { - return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseFirefox_closure(frame)); - }, - Frame___parseFriendly_tearOff(frame) { - return A.Frame_Frame$parseFriendly(frame); - }, - Frame_Frame$parseFriendly(frame) { - return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseFriendly_closure(frame)); - }, - Frame__uriOrPathToUri(uriOrPath) { - if (B.JSString_methods.contains$1(uriOrPath, $.$get$Frame__uriRegExp())) - return A.Uri_parse(uriOrPath); - else if (B.JSString_methods.contains$1(uriOrPath, $.$get$Frame__windowsRegExp())) - return A._Uri__Uri$file(uriOrPath, true); - else if (B.JSString_methods.startsWith$1(uriOrPath, "/")) - return A._Uri__Uri$file(uriOrPath, false); - if (B.JSString_methods.contains$1(uriOrPath, "\\")) - return $.$get$windows().toUri$1(uriOrPath); - return A.Uri_parse(uriOrPath); - }, - Frame__catchFormatException(text, body) { - var t1, exception; - try { - t1 = body.call$0(); - return t1; - } catch (exception) { - if (type$.FormatException._is(A.unwrapException(exception))) - return new A.UnparsedFrame(A._Uri__Uri(null, "unparsed", null, null), text); - else - throw exception; - } - }, - Frame: function Frame(t0, t1, t2, t3) { - var _ = this; - _.uri = t0; - _.line = t1; - _.column = t2; - _.member = t3; - }, - Frame_Frame$parseVM_closure: function Frame_Frame$parseVM_closure(t0) { - this.frame = t0; - }, - Frame_Frame$parseV8_closure: function Frame_Frame$parseV8_closure(t0) { - this.frame = t0; - }, - Frame_Frame$parseV8_closure_parseJsLocation: function Frame_Frame$parseV8_closure_parseJsLocation(t0) { - this.frame = t0; - }, - Frame_Frame$_parseFirefoxEval_closure: function Frame_Frame$_parseFirefoxEval_closure(t0) { - this.frame = t0; - }, - Frame_Frame$parseFirefox_closure: function Frame_Frame$parseFirefox_closure(t0) { - this.frame = t0; - }, - Frame_Frame$parseFriendly_closure: function Frame_Frame$parseFriendly_closure(t0) { - this.frame = t0; - }, - LazyTrace: function LazyTrace(t0) { - this._thunk = t0; - this.__LazyTrace__trace_FI = $; - }, - LazyTrace_terse_closure: function LazyTrace_terse_closure(t0) { - this.$this = t0; - }, - Trace_Trace$from(trace) { - if (type$.Trace._is(trace)) - return trace; - if (trace instanceof A.Chain) - return trace.toTrace$0(); - return new A.LazyTrace(new A.Trace_Trace$from_closure(trace)); - }, - Trace_Trace$parse(trace) { - var error, t1, exception; - try { - if (trace.length === 0) { - t1 = A.Trace$(A._setArrayType([], type$.JSArray_Frame), null); - return t1; - } - if (B.JSString_methods.contains$1(trace, $.$get$_v8Trace())) { - t1 = A.Trace$parseV8(trace); - return t1; - } - if (B.JSString_methods.contains$1(trace, "\tat ")) { - t1 = A.Trace$parseJSCore(trace); - return t1; - } - if (B.JSString_methods.contains$1(trace, $.$get$_firefoxSafariTrace()) || B.JSString_methods.contains$1(trace, $.$get$_firefoxEvalTrace())) { - t1 = A.Trace$parseFirefox(trace); - return t1; - } - if (B.JSString_methods.contains$1(trace, string$.x3d_____)) { - t1 = A.Chain_Chain$parse(trace).toTrace$0(); - return t1; - } - if (B.JSString_methods.contains$1(trace, $.$get$_friendlyTrace())) { - t1 = A.Trace$parseFriendly(trace); - return t1; - } - t1 = A.Trace$parseVM(trace); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.FormatException._is(t1)) { - error = t1; - throw A.wrapException(A.FormatException$(J.get$message$x(error) + "\nStack trace:\n" + trace, null, null)); - } else - throw exception; - } - }, - Trace___parseVM_tearOff(trace) { - return A.Trace$parseVM(trace); - }, - Trace$parseVM(trace) { - var t1 = A.List_List$unmodifiable(A.Trace__parseVM(trace), type$.Frame); - return new A.Trace(t1, new A._StringStackTrace(trace)); - }, - Trace__parseVM(trace) { - var $frames, - t1 = B.JSString_methods.trim$0(trace), - t2 = $.$get$vmChainGap(), - t3 = type$.WhereIterable_String, - lines = new A.WhereIterable(A._setArrayType(A.stringReplaceAllUnchecked(t1, t2, "").split("\n"), type$.JSArray_String), new A.Trace__parseVM_closure(), t3); - if (!lines.get$iterator(0).moveNext$0()) - return A._setArrayType([], type$.JSArray_Frame); - t1 = A.TakeIterable_TakeIterable(lines, lines.get$length(0) - 1, t3._eval$1("Iterable.E")); - t1 = A.MappedIterable_MappedIterable(t1, A.frame_Frame___parseVM_tearOff$closure(), A._instanceType(t1)._eval$1("Iterable.E"), type$.Frame); - $frames = A.List_List$of(t1, true, A._instanceType(t1)._eval$1("Iterable.E")); - if (!J.endsWith$1$s(lines.get$last(0), ".da")) - B.JSArray_methods.add$1($frames, A.Frame_Frame$parseVM(lines.get$last(0))); - return $frames; - }, - Trace$parseV8(trace) { - var t1 = A.SubListIterable$(A._setArrayType(trace.split("\n"), type$.JSArray_String), 1, null, type$.String).super$Iterable$skipWhile(0, new A.Trace$parseV8_closure()), - t2 = type$.Frame; - t2 = A.List_List$unmodifiable(A.MappedIterable_MappedIterable(t1, A.frame_Frame___parseV8_tearOff$closure(), t1.$ti._eval$1("Iterable.E"), t2), t2); - return new A.Trace(t2, new A._StringStackTrace(trace)); - }, - Trace$parseJSCore(trace) { - var t1 = A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(A._setArrayType(trace.split("\n"), type$.JSArray_String), new A.Trace$parseJSCore_closure(), type$.WhereIterable_String), A.frame_Frame___parseV8_tearOff$closure(), type$.MappedIterable_String_Frame), type$.Frame); - return new A.Trace(t1, new A._StringStackTrace(trace)); - }, - Trace$parseFirefox(trace) { - var t1 = A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(A._setArrayType(B.JSString_methods.trim$0(trace).split("\n"), type$.JSArray_String), new A.Trace$parseFirefox_closure(), type$.WhereIterable_String), A.frame_Frame___parseFirefox_tearOff$closure(), type$.MappedIterable_String_Frame), type$.Frame); - return new A.Trace(t1, new A._StringStackTrace(trace)); - }, - Trace___parseFriendly_tearOff(trace) { - return A.Trace$parseFriendly(trace); - }, - Trace$parseFriendly(trace) { - var t1 = trace.length === 0 ? A._setArrayType([], type$.JSArray_Frame) : new A.MappedIterable(new A.WhereIterable(A._setArrayType(B.JSString_methods.trim$0(trace).split("\n"), type$.JSArray_String), new A.Trace$parseFriendly_closure(), type$.WhereIterable_String), A.frame_Frame___parseFriendly_tearOff$closure(), type$.MappedIterable_String_Frame); - t1 = A.List_List$unmodifiable(t1, type$.Frame); - return new A.Trace(t1, new A._StringStackTrace(trace)); - }, - Trace$($frames, original) { - var t1 = A.List_List$unmodifiable($frames, type$.Frame); - return new A.Trace(t1, new A._StringStackTrace(original == null ? "" : original)); - }, - Trace: function Trace(t0, t1) { - this.frames = t0; - this.original = t1; - }, - Trace_Trace$from_closure: function Trace_Trace$from_closure(t0) { - this.trace = t0; - }, - Trace__parseVM_closure: function Trace__parseVM_closure() { - }, - Trace$parseV8_closure: function Trace$parseV8_closure() { - }, - Trace$parseJSCore_closure: function Trace$parseJSCore_closure() { - }, - Trace$parseFirefox_closure: function Trace$parseFirefox_closure() { - }, - Trace$parseFriendly_closure: function Trace$parseFriendly_closure() { - }, - Trace_terse_closure: function Trace_terse_closure() { - }, - Trace_foldFrames_closure: function Trace_foldFrames_closure(t0) { - this.oldPredicate = t0; - }, - Trace_foldFrames_closure0: function Trace_foldFrames_closure0(t0) { - this._box_0 = t0; - }, - Trace_toString_closure0: function Trace_toString_closure0() { - }, - Trace_toString_closure: function Trace_toString_closure(t0) { - this.longest = t0; - }, - UnparsedFrame: function UnparsedFrame(t0, t1) { - this.uri = t0; - this.member = t1; - }, - TransformByHandlers_transformByHandlers(_this, onData, onDone, $S, $T) { - var _null = null, t1 = {}, - controller = A.StreamController_StreamController(_null, _null, _null, _null, true, $T); - t1.subscription = null; - controller.onListen = new A.TransformByHandlers_transformByHandlers_closure(t1, _this, onData, controller, A.instantiate1(A.from_handlers__TransformByHandlers__defaultHandleError$closure(), $T), onDone, $S); - return controller.get$stream(); - }, - TransformByHandlers__defaultHandleError(error, stackTrace, sink) { - sink.addError$2(error, stackTrace); - }, - TransformByHandlers_transformByHandlers_closure: function TransformByHandlers_transformByHandlers_closure(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _._box_1 = t0; - _._this = t1; - _.handleData = t2; - _.controller = t3; - _.handleError = t4; - _.handleDone = t5; - _.S = t6; - }, - TransformByHandlers_transformByHandlers__closure: function TransformByHandlers_transformByHandlers__closure(t0, t1, t2) { - this.handleData = t0; - this.controller = t1; - this.S = t2; - }, - TransformByHandlers_transformByHandlers__closure1: function TransformByHandlers_transformByHandlers__closure1(t0, t1) { - this.handleError = t0; - this.controller = t1; - }, - TransformByHandlers_transformByHandlers__closure0: function TransformByHandlers_transformByHandlers__closure0(t0, t1, t2) { - this._box_0 = t0; - this.handleDone = t1; - this.controller = t2; - }, - TransformByHandlers_transformByHandlers__closure2: function TransformByHandlers_transformByHandlers__closure2(t0, t1) { - this._box_1 = t0; - this._box_0 = t1; - }, - RateLimit__debounceAggregate(_this, duration, collect, leading, trailing, $T, $S) { - var t1 = {}; - t1.soFar = t1.timer = null; - t1.emittedLatestAsLeading = t1.shouldClose = t1.hasPending = false; - return A.TransformByHandlers_transformByHandlers(_this, new A.RateLimit__debounceAggregate_closure(t1, $S, collect, false, duration, true, $T), new A.RateLimit__debounceAggregate_closure0(t1, true, $S), $T, $S); - }, - _collect($event, soFar, $T) { - var t1 = soFar == null ? A._setArrayType([], $T._eval$1("JSArray<0>")) : soFar; - J.add$1$ax(t1, $event); - return t1; - }, - RateLimit__debounceAggregate_closure: function RateLimit__debounceAggregate_closure(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _._box_0 = t0; - _.S = t1; - _.collect = t2; - _.leading = t3; - _.duration = t4; - _.trailing = t5; - _.T = t6; - }, - RateLimit__debounceAggregate_closure_emit: function RateLimit__debounceAggregate_closure_emit(t0, t1, t2) { - this._box_0 = t0; - this.sink = t1; - this.S = t2; - }, - RateLimit__debounceAggregate__closure: function RateLimit__debounceAggregate__closure(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.trailing = t1; - _.emit = t2; - _.sink = t3; - }, - RateLimit__debounceAggregate_closure0: function RateLimit__debounceAggregate_closure0(t0, t1, t2) { - this._box_0 = t0; - this.trailing = t1; - this.S = t2; - }, - StringScannerException$(message, span, source) { - return new A.StringScannerException(source, message, span); - }, - StringScannerException: function StringScannerException(t0, t1, t2) { - this.source = t0; - this._span_exception$_message = t1; - this._span = t2; - }, - LineScanner$(string) { - return new A.LineScanner(null, string); - }, - LineScanner: function LineScanner(t0, t1) { - var _ = this; - _._line_scanner$_column = _._line_scanner$_line = 0; - _.sourceUrl = t0; - _.string = t1; - _._string_scanner$_position = 0; - _._lastMatchPosition = _._lastMatch = null; - }, - SpanScanner$(string, sourceUrl) { - var t2, - t1 = A.SourceFile$fromString(string, sourceUrl); - if (sourceUrl == null) - t2 = null; - else - t2 = typeof sourceUrl == "string" ? A.Uri_parse(sourceUrl) : type$.Uri._as(sourceUrl); - return new A.SpanScanner(t1, t2, string); - }, - SpanScanner: function SpanScanner(t0, t1, t2) { - var _ = this; - _._sourceFile = t0; - _.sourceUrl = t1; - _.string = t2; - _._string_scanner$_position = 0; - _._lastMatchPosition = _._lastMatch = null; - }, - _SpanScannerState: function _SpanScannerState(t0, t1) { - this._scanner = t0; - this.position = t1; - }, - StringScanner$(string, position, sourceUrl) { - var t1; - if (sourceUrl == null) - t1 = null; - else - t1 = typeof sourceUrl == "string" ? A.Uri_parse(sourceUrl) : type$.Uri._as(sourceUrl); - return new A.StringScanner(t1, string); - }, - StringScanner: function StringScanner(t0, t1) { - var _ = this; - _.sourceUrl = t0; - _.string = t1; - _._string_scanner$_position = 0; - _._lastMatchPosition = _._lastMatch = null; - }, - AsciiGlyphSet: function AsciiGlyphSet() { - }, - UnicodeGlyphSet: function UnicodeGlyphSet() { - }, - WatchEvent: function WatchEvent(t0, t1) { - this.type = t0; - this.path = t1; - }, - ChangeType: function ChangeType(t0) { - this._watch_event$_name = t0; - }, - A98RgbColorSpace0: function A98RgbColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - AnySelectorVisitor0: function AnySelectorVisitor0() { - }, - AnySelectorVisitor_visitComplexSelector_closure0: function AnySelectorVisitor_visitComplexSelector_closure0(t0) { - this.$this = t0; - }, - AnySelectorVisitor_visitCompoundSelector_closure0: function AnySelectorVisitor_visitCompoundSelector_closure0(t0) { - this.$this = t0; - }, - SupportsAnything0: function SupportsAnything0(t0, t1) { - this.contents = t0; - this.span = t1; - }, - Argument0: function Argument0(t0, t1, t2) { - this.name = t0; - this.defaultValue = t1; - this.span = t2; - }, - ArgumentDeclaration_ArgumentDeclaration$parse0(contents, url) { - return A.ScssParser$0(contents, url).parseArgumentDeclaration$0(); - }, - ArgumentDeclaration0: function ArgumentDeclaration0(t0, t1, t2) { - this.$arguments = t0; - this.restArgument = t1; - this.span = t2; - }, - ArgumentDeclaration_verify_closure1: function ArgumentDeclaration_verify_closure1() { - }, - ArgumentDeclaration_verify_closure2: function ArgumentDeclaration_verify_closure2() { - }, - ArgumentInvocation$empty0(span) { - return new A.ArgumentInvocation0(B.List_empty21, B.Map_empty14, null, null, span); - }, - ArgumentInvocation0: function ArgumentInvocation0(t0, t1, t2, t3, t4) { - var _ = this; - _.positional = t0; - _.named = t1; - _.rest = t2; - _.keywordRest = t3; - _.span = t4; - }, - argumentListClass_closure: function argumentListClass_closure() { - }, - argumentListClass__closure: function argumentListClass__closure() { - }, - argumentListClass__closure0: function argumentListClass__closure0() { - }, - SassArgumentList$0(contents, keywords, separator) { - var t1 = type$.Value_2; - t1 = new A.SassArgumentList0(A.ConstantMap_ConstantMap$from(keywords, type$.String, t1), A.List_List$unmodifiable(contents, t1), separator, false); - t1.SassList$3$brackets0(contents, separator, false); - return t1; - }, - SassArgumentList0: function SassArgumentList0(t0, t1, t2, t3) { - var _ = this; - _._argument_list$_keywords = t0; - _._argument_list$_wereKeywordsAccessed = false; - _._list1$_contents = t1; - _._list1$_separator = t2; - _._list1$_hasBrackets = t3; - }, - JSArray1: function JSArray1() { - }, - AsyncImporter0: function AsyncImporter0() { - }, - JSToDartAsyncImporter: function JSToDartAsyncImporter(t0, t1, t2) { - this._async0$_canonicalize = t0; - this._load = t1; - this._nonCanonicalSchemes = t2; - }, - JSToDartAsyncImporter_canonicalize_closure: function JSToDartAsyncImporter_canonicalize_closure(t0, t1) { - this.$this = t0; - this.url = t1; - }, - JSToDartAsyncImporter_load_closure: function JSToDartAsyncImporter_load_closure(t0, t1) { - this.$this = t0; - this.url = t1; - }, - AsyncBuiltInCallable$mixin0($name, $arguments, callback, acceptsContent, url) { - return new A.AsyncBuiltInCallable0($name, A.ScssParser$0("@mixin " + $name + "(" + $arguments + ") {", url).parseArgumentDeclaration$0(), new A.AsyncBuiltInCallable$mixin_closure0(callback), false); - }, - AsyncBuiltInCallable0: function AsyncBuiltInCallable0(t0, t1, t2, t3) { - var _ = this; - _.name = t0; - _._async_built_in0$_arguments = t1; - _._async_built_in0$_callback = t2; - _.acceptsContent = t3; - }, - AsyncBuiltInCallable$mixin_closure0: function AsyncBuiltInCallable$mixin_closure0(t0) { - this.callback = t0; - }, - AsyncBuiltInCallable_withDeprecationWarning_closure0: function AsyncBuiltInCallable_withDeprecationWarning_closure0(t0, t1, t2) { - this.$this = t0; - this.module = t1; - this.newName = t2; - }, - compileAsync0(path, charset, fatalDeprecations, functions, futureDeprecations, importCache, indentWidth, lineFeed, logger, nodeImporter, quietDeps, silenceDeprecations, sourceMap, style, syntax, useSpaces, verbose) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult_2), - $async$returnValue, t3, t4, t0, stylesheet, result, t1, t2; - var $async$compileAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = type$.Deprecation_3; - t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - if (silenceDeprecations != null) - t2.addAll$1(0, silenceDeprecations); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - if (fatalDeprecations != null) - t3.addAll$1(0, fatalDeprecations); - t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - if (futureDeprecations != null) - t4.addAll$1(0, futureDeprecations); - logger = new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); - logger.validate$0(); - t1 = nodeImporter == null; - if (t1) - t2 = syntax == null || syntax === A.Syntax_forPath0(path); - else - t2 = false; - $async$goto = t2 ? 3 : 5; - break; - case 3: - // then - if (importCache == null) - importCache = A.AsyncImportCache$none(); - t2 = $.$get$FilesystemImporter_cwd0(); - t3 = A.isNodeJs() ? self.process : null; - if (!J.$eq$(t3 == null ? null : J.get$platform$x(t3), "win32")) { - t3 = A.isNodeJs() ? self.process : null; - t3 = J.$eq$(t3 == null ? null : J.get$platform$x(t3), "darwin"); - } else - t3 = true; - if (t3) { - t3 = $.$get$context(); - t4 = A._realCasePath0(A.absolute(t3.normalize$1(path), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); - t0 = t4; - t4 = t3; - t3 = t0; - } else { - t3 = $.$get$context(); - t4 = t3.canonicalize$1(0, path); - t0 = t4; - t4 = t3; - t3 = t0; - } - $async$goto = 6; - return A._asyncAwait(importCache.importCanonical$3$originalUrl(t2, t4.toUri$1(t3), t4.toUri$1(path)), $async$compileAsync0); - case 6: - // returning from await. - t4 = $async$result; - t4.toString; - stylesheet = t4; - // goto join - $async$goto = 4; - break; - case 5: - // else - t2 = A.readFile0(path); - t3 = syntax == null ? A.Syntax_forPath0(path) : syntax; - stylesheet = A.Stylesheet_Stylesheet$parse0(t2, t3, $.$get$context().toUri$1(path)); - case 4: - // join - $async$goto = 7; - return A._asyncAwait(A._compileStylesheet2(stylesheet, logger, importCache, nodeImporter, $.$get$FilesystemImporter_cwd0(), functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset), $async$compileAsync0); - case 7: - // returning from await. - result = $async$result; - logger.summarize$1$js(!t1); - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$compileAsync0, $async$completer); - }, - compileStringAsync0(source, charset, fatalDeprecations, functions, futureDeprecations, importCache, importer, indentWidth, lineFeed, logger, nodeImporter, quietDeps, silenceDeprecations, sourceMap, style, syntax, url, useSpaces, verbose) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult_2), - $async$returnValue, t3, t4, stylesheet, result, t1, t2; - var $async$compileStringAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = type$.Deprecation_3; - t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - if (silenceDeprecations != null) - t2.addAll$1(0, silenceDeprecations); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - if (fatalDeprecations != null) - t3.addAll$1(0, fatalDeprecations); - t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - if (futureDeprecations != null) - t4.addAll$1(0, futureDeprecations); - logger = new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); - logger.validate$0(); - stylesheet = A.Stylesheet_Stylesheet$parse0(source, syntax == null ? B.Syntax_SCSS_scss0 : syntax, url); - if (importer == null) - t1 = A.isBrowser() ? new A.NoOpImporter0() : $.$get$FilesystemImporter_cwd0(); - else - t1 = importer; - $async$goto = 3; - return A._asyncAwait(A._compileStylesheet2(stylesheet, logger, importCache, nodeImporter, t1, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset), $async$compileStringAsync0); - case 3: - // returning from await. - result = $async$result; - logger.summarize$1$js(nodeImporter != null); - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$compileStringAsync0, $async$completer); - }, - _compileStylesheet2(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult_2), - $async$returnValue, evaluateResult, serializeResult, resultSourceMap; - var $async$_compileStylesheet2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if (nodeImporter != null) - A.WarnForDeprecation_warnForDeprecation0(logger, B.Deprecation_2No, string$.The_le, null, null); - $async$goto = 3; - return A._asyncAwait(A._EvaluateVisitor$2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet), $async$_compileStylesheet2); - case 3: - // returning from await. - evaluateResult = $async$result; - serializeResult = A.serialize0(evaluateResult._1, charset, indentWidth, false, lineFeed, logger, sourceMap, style, useSpaces); - resultSourceMap = serializeResult._1; - if (resultSourceMap != null && importCache != null) - A.mapInPlace0(resultSourceMap.urls, new A._compileStylesheet_closure2(stylesheet, importCache)); - $async$returnValue = new A.CompileResult0(evaluateResult, serializeResult); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_compileStylesheet2, $async$completer); - }, - _compileStylesheet_closure2: function _compileStylesheet_closure2(t0, t1) { - this.stylesheet = t0; - this.importCache = t1; - }, - AsyncEnvironment$0() { - var t1 = type$.String, - t2 = type$.Module_AsyncCallable_2, - t3 = type$.AstNode_2, - t4 = type$.int, - t5 = type$.AsyncCallable_2, - t6 = type$.JSArray_Map_String_AsyncCallable_2; - return new A.AsyncEnvironment0(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_AsyncCallable_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2)], type$.JSArray_Map_String_Value_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null); - }, - AsyncEnvironment$_0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content) { - var t1 = type$.String, - t2 = type$.int; - return new A.AsyncEnvironment0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content); - }, - _EnvironmentModule__EnvironmentModule2(environment, css, preModuleComments, extensionStore, forwarded) { - var t1, t2, t3, t4, t5, t6, module, result, t7; - if (forwarded == null) - forwarded = B.Set_empty6; - t1 = type$.dynamic; - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t2 = type$.Module_AsyncCallable_2, t3 = type$.List_CssComment_2, t4 = A.MapExtensions_get_pairs0(preModuleComments, t2, t3), t4 = t4.get$iterator(t4), t5 = type$.CssComment_2; t4.moveNext$0();) { - t6 = t4.get$current(t4); - module = t6._0; - result = A.List_List$from(t6._1, false, t5); - result.fixed$length = Array; - result.immutable$list = Array; - t1.$indexSet(0, module, result); - } - t1 = A.ConstantMap_ConstantMap$from(t1, t2, t3); - t2 = A._EnvironmentModule__makeModulesByVariable2(forwarded); - t3 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure17(), type$.Map_String_Value_2), type$.Value_2); - t4 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure18(), type$.Map_String_AstNode_2), type$.AstNode_2); - t5 = type$.Map_String_AsyncCallable_2; - t6 = type$.AsyncCallable_2; - t7 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure19(), t5), t6); - t6 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure20(), t5), t6); - t5 = J.get$isNotEmpty$asx(css.get$children(css)) || preModuleComments.get$isNotEmpty(preModuleComments) || B.JSArray_methods.any$1(environment._async_environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure21()); - return A._EnvironmentModule$_2(environment, css, t1, extensionStore, t2, t3, t4, t7, t6, t5, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._async_environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure22())); - }, - _EnvironmentModule__makeModulesByVariable2(forwarded) { - var modulesByVariable, t1, t2, t3, t4, t5; - if (forwarded.get$isEmpty(forwarded)) - return B.Map_empty17; - modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_AsyncCallable_2); - for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { - t2 = t1.get$current(t1); - if (t2 instanceof A._EnvironmentModule2) { - for (t3 = t2._async_environment0$_modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t5 = t4.get$variables(); - A.setAll0(modulesByVariable, t5.get$keys(t5), t4); - } - A.setAll0(modulesByVariable, J.get$keys$z(B.JSArray_methods.get$first(t2._async_environment0$_environment._async_environment0$_variables)), t2); - } else { - t3 = t2.get$variables(); - A.setAll0(modulesByVariable, t3.get$keys(t3), t2); - } - } - return modulesByVariable; - }, - _EnvironmentModule__memberMap2(localMap, otherMaps, $V) { - var t1, t2, t3; - localMap = new A.PublicMemberMapView0(localMap, $V._eval$1("PublicMemberMapView0<0>")); - if (otherMaps.get$isEmpty(otherMaps)) - return localMap; - t1 = A._setArrayType([], $V._eval$1("JSArray>")); - for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { - t3 = t2.get$current(t2); - if (t3.get$isNotEmpty(t3)) - t1.push(t3); - } - t1.push(localMap); - if (t1.length === 1) - return localMap; - return A.MergedMapView$0(t1, type$.String, $V); - }, - _EnvironmentModule$_2(_environment, css, preModuleComments, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { - return new A._EnvironmentModule2(_environment._async_environment0$_allModules, variables, variableNodes, functions, mixins, extensionStore, css, preModuleComments, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); - }, - AsyncEnvironment0: function AsyncEnvironment0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { - var _ = this; - _._async_environment0$_modules = t0; - _._async_environment0$_namespaceNodes = t1; - _._async_environment0$_globalModules = t2; - _._async_environment0$_importedModules = t3; - _._async_environment0$_forwardedModules = t4; - _._async_environment0$_nestedForwardedModules = t5; - _._async_environment0$_allModules = t6; - _._async_environment0$_variables = t7; - _._async_environment0$_variableNodes = t8; - _._async_environment0$_variableIndices = t9; - _._async_environment0$_functions = t10; - _._async_environment0$_functionIndices = t11; - _._async_environment0$_mixins = t12; - _._async_environment0$_mixinIndices = t13; - _._async_environment0$_content = t14; - _._async_environment0$_inMixin = false; - _._async_environment0$_inSemiGlobalScope = true; - _._async_environment0$_lastVariableIndex = _._async_environment0$_lastVariableName = null; - }, - AsyncEnvironment__getVariableFromGlobalModule_closure0: function AsyncEnvironment__getVariableFromGlobalModule_closure0(t0) { - this.name = t0; - }, - AsyncEnvironment_setVariable_closure2: function AsyncEnvironment_setVariable_closure2(t0, t1) { - this.$this = t0; - this.name = t1; - }, - AsyncEnvironment_setVariable_closure3: function AsyncEnvironment_setVariable_closure3(t0) { - this.name = t0; - }, - AsyncEnvironment_setVariable_closure4: function AsyncEnvironment_setVariable_closure4(t0, t1) { - this.$this = t0; - this.name = t1; - }, - AsyncEnvironment__getFunctionFromGlobalModule_closure0: function AsyncEnvironment__getFunctionFromGlobalModule_closure0(t0) { - this.name = t0; - }, - AsyncEnvironment__getMixinFromGlobalModule_closure0: function AsyncEnvironment__getMixinFromGlobalModule_closure0(t0) { - this.name = t0; - }, - AsyncEnvironment_toModule_closure0: function AsyncEnvironment_toModule_closure0() { - }, - AsyncEnvironment_toDummyModule_closure0: function AsyncEnvironment_toDummyModule_closure0() { - }, - _EnvironmentModule2: function _EnvironmentModule2(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) { - var _ = this; - _.upstream = t0; - _.variables = t1; - _.variableNodes = t2; - _.functions = t3; - _.mixins = t4; - _.extensionStore = t5; - _.css = t6; - _.preModuleComments = t7; - _.transitivelyContainsCss = t8; - _.transitivelyContainsExtensions = t9; - _._async_environment0$_environment = t10; - _._async_environment0$_modulesByVariable = t11; - }, - _EnvironmentModule__EnvironmentModule_closure17: function _EnvironmentModule__EnvironmentModule_closure17() { - }, - _EnvironmentModule__EnvironmentModule_closure18: function _EnvironmentModule__EnvironmentModule_closure18() { - }, - _EnvironmentModule__EnvironmentModule_closure19: function _EnvironmentModule__EnvironmentModule_closure19() { - }, - _EnvironmentModule__EnvironmentModule_closure20: function _EnvironmentModule__EnvironmentModule_closure20() { - }, - _EnvironmentModule__EnvironmentModule_closure21: function _EnvironmentModule__EnvironmentModule_closure21() { - }, - _EnvironmentModule__EnvironmentModule_closure22: function _EnvironmentModule__EnvironmentModule_closure22() { - }, - _EvaluateVisitor$2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { - var t4, - t1 = type$.Uri, - t2 = type$.Module_AsyncCallable_2, - t3 = A._setArrayType([], type$.JSArray_Record_2_String_and_AstNode_2); - if (importCache == null) - t4 = nodeImporter == null ? A.AsyncImportCache$none() : null; - else - t4 = importCache; - t1 = new A._EvaluateVisitor2(t4, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.AsyncCallable_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Record_2_String_and_SourceSpan), quietDeps, sourceMap, A.AsyncEnvironment$0(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode_2), t3, B.Configuration_Map_empty_null0); - t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); - return t1; - }, - _EvaluateVisitor2: function _EvaluateVisitor2(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { - var _ = this; - _._async_evaluate0$_importCache = t0; - _._async_evaluate0$_nodeImporter = t1; - _._async_evaluate0$_builtInFunctions = t2; - _._async_evaluate0$_builtInModules = t3; - _._async_evaluate0$_modules = t4; - _._async_evaluate0$_moduleConfigurations = t5; - _._async_evaluate0$_moduleNodes = t6; - _._async_evaluate0$_logger = t7; - _._async_evaluate0$_warningsEmitted = t8; - _._async_evaluate0$_quietDeps = t9; - _._async_evaluate0$_sourceMap = t10; - _._async_evaluate0$_environment = t11; - _._async_evaluate0$_declarationName = _._async_evaluate0$__parent = _._async_evaluate0$_mediaQuerySources = _._async_evaluate0$_mediaQueries = _._async_evaluate0$_styleRuleIgnoringAtRoot = null; - _._async_evaluate0$_member = "root stylesheet"; - _._async_evaluate0$_importSpan = _._async_evaluate0$_callableNode = _._async_evaluate0$_currentCallable = null; - _._async_evaluate0$_inSupportsDeclaration = _._async_evaluate0$_inKeyframes = _._async_evaluate0$_atRootExcludingStyleRule = _._async_evaluate0$_inUnknownAtRule = _._async_evaluate0$_inFunction = false; - _._async_evaluate0$_loadedUrls = t12; - _._async_evaluate0$_activeModules = t13; - _._async_evaluate0$_stack = t14; - _._async_evaluate0$_importer = null; - _._async_evaluate0$_inDependency = false; - _._async_evaluate0$__extensionStore = _._async_evaluate0$_preModuleComments = _._async_evaluate0$_outOfOrderImports = _._async_evaluate0$__endOfImports = _._async_evaluate0$__root = _._async_evaluate0$__stylesheet = null; - _._async_evaluate0$_configuration = t15; - }, - _EvaluateVisitor_closure38: function _EvaluateVisitor_closure38(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure39: function _EvaluateVisitor_closure39(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure40: function _EvaluateVisitor_closure40(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure41: function _EvaluateVisitor_closure41(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure42: function _EvaluateVisitor_closure42(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure43: function _EvaluateVisitor_closure43(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure44: function _EvaluateVisitor_closure44(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure45: function _EvaluateVisitor_closure45(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure46: function _EvaluateVisitor_closure46(t0) { - this.$this = t0; - }, - _EvaluateVisitor__closure14: function _EvaluateVisitor__closure14(t0, t1, t2) { - this.$this = t0; - this.name = t1; - this.module = t2; - }, - _EvaluateVisitor_closure47: function _EvaluateVisitor_closure47(t0) { - this.$this = t0; - }, - _EvaluateVisitor__closure13: function _EvaluateVisitor__closure13(t0, t1, t2) { - this.$this = t0; - this.name = t1; - this.module = t2; - }, - _EvaluateVisitor_closure48: function _EvaluateVisitor_closure48(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure49: function _EvaluateVisitor_closure49(t0) { - this.$this = t0; - }, - _EvaluateVisitor__closure11: function _EvaluateVisitor__closure11(t0, t1, t2) { - this.values = t0; - this.span = t1; - this.callableNode = t2; - }, - _EvaluateVisitor__closure12: function _EvaluateVisitor__closure12(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure50: function _EvaluateVisitor_closure50(t0) { - this.$this = t0; - }, - _EvaluateVisitor_run_closure2: function _EvaluateVisitor_run_closure2(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.importer = t2; - }, - _EvaluateVisitor_run__closure2: function _EvaluateVisitor_run__closure2(t0, t1, t2) { - this.$this = t0; - this.importer = t1; - this.node = t2; - }, - _EvaluateVisitor__loadModule_closure5: function _EvaluateVisitor__loadModule_closure5(t0, t1) { - this._box_1 = t0; - this.callback = t1; - }, - _EvaluateVisitor__loadModule_closure6: function _EvaluateVisitor__loadModule_closure6(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.url = t1; - _.nodeWithSpan = t2; - _.baseUrl = t3; - _.namesInErrors = t4; - _.configuration = t5; - _.callback = t6; - }, - _EvaluateVisitor__loadModule__closure5: function _EvaluateVisitor__loadModule__closure5(t0, t1) { - this.$this = t0; - this.message = t1; - }, - _EvaluateVisitor__loadModule__closure6: function _EvaluateVisitor__loadModule__closure6(t0, t1, t2) { - this._box_0 = t0; - this.callback = t1; - this.firstLoad = t2; - }, - _EvaluateVisitor__execute_closure2: function _EvaluateVisitor__execute_closure2(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.importer = t1; - _.stylesheet = t2; - _.extensionStore = t3; - _.configuration = t4; - _.css = t5; - _.preModuleComments = t6; - }, - _EvaluateVisitor__combineCss_closure5: function _EvaluateVisitor__combineCss_closure5() { - }, - _EvaluateVisitor__combineCss_closure6: function _EvaluateVisitor__combineCss_closure6(t0) { - this.selectors = t0; - }, - _EvaluateVisitor__combineCss_visitModule2: function _EvaluateVisitor__combineCss_visitModule2(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.seen = t1; - _.clone = t2; - _.css = t3; - _.imports = t4; - _.sorted = t5; - }, - _EvaluateVisitor__extendModules_closure5: function _EvaluateVisitor__extendModules_closure5(t0) { - this.originalSelectors = t0; - }, - _EvaluateVisitor__extendModules_closure6: function _EvaluateVisitor__extendModules_closure6() { - }, - _EvaluateVisitor_visitAtRootRule_closure5: function _EvaluateVisitor_visitAtRootRule_closure5(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitAtRootRule_closure6: function _EvaluateVisitor_visitAtRootRule_closure6(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure17: function _EvaluateVisitor__scopeForAtRoot_closure17(t0, t1, t2) { - this.$this = t0; - this.newParent = t1; - this.node = t2; - }, - _EvaluateVisitor__scopeForAtRoot_closure18: function _EvaluateVisitor__scopeForAtRoot_closure18(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure19: function _EvaluateVisitor__scopeForAtRoot_closure19(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor__scopeForAtRoot__closure2: function _EvaluateVisitor__scopeForAtRoot__closure2(t0, t1) { - this.innerScope = t0; - this.callback = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure20: function _EvaluateVisitor__scopeForAtRoot_closure20(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure21: function _EvaluateVisitor__scopeForAtRoot_closure21() { - }, - _EvaluateVisitor__scopeForAtRoot_closure22: function _EvaluateVisitor__scopeForAtRoot_closure22(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor_visitContentRule_closure2: function _EvaluateVisitor_visitContentRule_closure2(t0, t1) { - this.$this = t0; - this.content = t1; - }, - _EvaluateVisitor_visitDeclaration_closure2: function _EvaluateVisitor_visitDeclaration_closure2(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - _EvaluateVisitor_visitEachRule_closure8: function _EvaluateVisitor_visitEachRule_closure8(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.nodeWithSpan = t2; - }, - _EvaluateVisitor_visitEachRule_closure9: function _EvaluateVisitor_visitEachRule_closure9(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.nodeWithSpan = t2; - }, - _EvaluateVisitor_visitEachRule_closure10: function _EvaluateVisitor_visitEachRule_closure10(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.list = t1; - _.setVariables = t2; - _.node = t3; - }, - _EvaluateVisitor_visitEachRule__closure2: function _EvaluateVisitor_visitEachRule__closure2(t0, t1, t2) { - this.$this = t0; - this.setVariables = t1; - this.node = t2; - }, - _EvaluateVisitor_visitEachRule___closure2: function _EvaluateVisitor_visitEachRule___closure2(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitAtRule_closure8: function _EvaluateVisitor_visitAtRule_closure8(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitAtRule_closure9: function _EvaluateVisitor_visitAtRule_closure9(t0, t1, t2) { - this.$this = t0; - this.name = t1; - this.children = t2; - }, - _EvaluateVisitor_visitAtRule__closure2: function _EvaluateVisitor_visitAtRule__closure2(t0, t1) { - this.$this = t0; - this.children = t1; - }, - _EvaluateVisitor_visitAtRule_closure10: function _EvaluateVisitor_visitAtRule_closure10() { - }, - _EvaluateVisitor_visitForRule_closure14: function _EvaluateVisitor_visitForRule_closure14(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitForRule_closure15: function _EvaluateVisitor_visitForRule_closure15(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitForRule_closure16: function _EvaluateVisitor_visitForRule_closure16(t0) { - this.fromNumber = t0; - }, - _EvaluateVisitor_visitForRule_closure17: function _EvaluateVisitor_visitForRule_closure17(t0, t1) { - this.toNumber = t0; - this.fromNumber = t1; - }, - _EvaluateVisitor_visitForRule_closure18: function _EvaluateVisitor_visitForRule_closure18(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.node = t2; - _.from = t3; - _.direction = t4; - _.fromNumber = t5; - }, - _EvaluateVisitor_visitForRule__closure2: function _EvaluateVisitor_visitForRule__closure2(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitForwardRule_closure5: function _EvaluateVisitor_visitForwardRule_closure5(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitForwardRule_closure6: function _EvaluateVisitor_visitForwardRule_closure6(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__registerCommentsForModule_closure2: function _EvaluateVisitor__registerCommentsForModule_closure2() { - }, - _EvaluateVisitor_visitIfRule_closure2: function _EvaluateVisitor_visitIfRule_closure2(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitIfRule__closure2: function _EvaluateVisitor_visitIfRule__closure2(t0, t1) { - this.$this = t0; - this.clause = t1; - }, - _EvaluateVisitor_visitIfRule___closure2: function _EvaluateVisitor_visitIfRule___closure2(t0) { - this.$this = t0; - }, - _EvaluateVisitor__visitDynamicImport_closure2: function _EvaluateVisitor__visitDynamicImport_closure2(t0, t1) { - this.$this = t0; - this.$import = t1; - }, - _EvaluateVisitor__visitDynamicImport__closure11: function _EvaluateVisitor__visitDynamicImport__closure11(t0) { - this.$this = t0; - }, - _EvaluateVisitor__visitDynamicImport__closure12: function _EvaluateVisitor__visitDynamicImport__closure12() { - }, - _EvaluateVisitor__visitDynamicImport__closure13: function _EvaluateVisitor__visitDynamicImport__closure13() { - }, - _EvaluateVisitor__visitDynamicImport__closure14: function _EvaluateVisitor__visitDynamicImport__closure14(t0, t1, t2, t3, t4) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.loadsUserDefinedModules = t2; - _.environment = t3; - _.children = t4; - }, - _EvaluateVisitor__applyMixin_closure5: function _EvaluateVisitor__applyMixin_closure5(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.$arguments = t1; - _.mixin = t2; - _.nodeWithSpanWithoutContent = t3; - }, - _EvaluateVisitor__applyMixin__closure6: function _EvaluateVisitor__applyMixin__closure6(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.$arguments = t1; - _.mixin = t2; - _.nodeWithSpanWithoutContent = t3; - }, - _EvaluateVisitor__applyMixin_closure6: function _EvaluateVisitor__applyMixin_closure6(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.contentCallable = t1; - _.mixin = t2; - _.nodeWithSpanWithoutContent = t3; - }, - _EvaluateVisitor__applyMixin__closure5: function _EvaluateVisitor__applyMixin__closure5(t0, t1, t2) { - this.$this = t0; - this.mixin = t1; - this.nodeWithSpanWithoutContent = t2; - }, - _EvaluateVisitor__applyMixin___closure2: function _EvaluateVisitor__applyMixin___closure2(t0, t1, t2) { - this.$this = t0; - this.mixin = t1; - this.nodeWithSpanWithoutContent = t2; - }, - _EvaluateVisitor__applyMixin____closure2: function _EvaluateVisitor__applyMixin____closure2(t0, t1) { - this.$this = t0; - this.statement = t1; - }, - _EvaluateVisitor_visitIncludeRule_closure8: function _EvaluateVisitor_visitIncludeRule_closure8(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitIncludeRule_closure9: function _EvaluateVisitor_visitIncludeRule_closure9(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitIncludeRule_closure10: function _EvaluateVisitor_visitIncludeRule_closure10(t0) { - this.node = t0; - }, - _EvaluateVisitor_visitMediaRule_closure8: function _EvaluateVisitor_visitMediaRule_closure8(t0, t1) { - this.$this = t0; - this.queries = t1; - }, - _EvaluateVisitor_visitMediaRule_closure9: function _EvaluateVisitor_visitMediaRule_closure9(t0, t1, t2, t3, t4) { - var _ = this; - _.$this = t0; - _.mergedQueries = t1; - _.queries = t2; - _.mergedSources = t3; - _.node = t4; - }, - _EvaluateVisitor_visitMediaRule__closure2: function _EvaluateVisitor_visitMediaRule__closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitMediaRule___closure2: function _EvaluateVisitor_visitMediaRule___closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitMediaRule_closure10: function _EvaluateVisitor_visitMediaRule_closure10(t0) { - this.mergedSources = t0; - }, - _EvaluateVisitor_visitStyleRule_closure11: function _EvaluateVisitor_visitStyleRule_closure11(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitStyleRule_closure12: function _EvaluateVisitor_visitStyleRule_closure12() { - }, - _EvaluateVisitor_visitStyleRule_closure14: function _EvaluateVisitor_visitStyleRule_closure14(t0, t1, t2) { - this.$this = t0; - this.rule = t1; - this.node = t2; - }, - _EvaluateVisitor_visitStyleRule__closure2: function _EvaluateVisitor_visitStyleRule__closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitStyleRule_closure13: function _EvaluateVisitor_visitStyleRule_closure13() { - }, - _EvaluateVisitor__warnForBogusCombinators_closure2: function _EvaluateVisitor__warnForBogusCombinators_closure2() { - }, - _EvaluateVisitor_visitSupportsRule_closure5: function _EvaluateVisitor_visitSupportsRule_closure5(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitSupportsRule__closure2: function _EvaluateVisitor_visitSupportsRule__closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitSupportsRule_closure6: function _EvaluateVisitor_visitSupportsRule_closure6() { - }, - _EvaluateVisitor__visitSupportsCondition_closure2: function _EvaluateVisitor__visitSupportsCondition_closure2(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - _EvaluateVisitor_visitVariableDeclaration_closure8: function _EvaluateVisitor_visitVariableDeclaration_closure8(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.node = t2; - }, - _EvaluateVisitor_visitVariableDeclaration_closure9: function _EvaluateVisitor_visitVariableDeclaration_closure9(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitVariableDeclaration_closure10: function _EvaluateVisitor_visitVariableDeclaration_closure10(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.value = t2; - }, - _EvaluateVisitor_visitUseRule_closure2: function _EvaluateVisitor_visitUseRule_closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitWarnRule_closure2: function _EvaluateVisitor_visitWarnRule_closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitWhileRule_closure2: function _EvaluateVisitor_visitWhileRule_closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitWhileRule__closure2: function _EvaluateVisitor_visitWhileRule__closure2(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitBinaryOperationExpression_closure2: function _EvaluateVisitor_visitBinaryOperationExpression_closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__slash_recommendation2: function _EvaluateVisitor__slash_recommendation2() { - }, - _EvaluateVisitor_visitVariableExpression_closure2: function _EvaluateVisitor_visitVariableExpression_closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitUnaryOperationExpression_closure2: function _EvaluateVisitor_visitUnaryOperationExpression_closure2(t0, t1) { - this.node = t0; - this.operand = t1; - }, - _EvaluateVisitor_visitListExpression_closure2: function _EvaluateVisitor_visitListExpression_closure2(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitFunctionExpression_closure8: function _EvaluateVisitor_visitFunctionExpression_closure8(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitFunctionExpression_closure9: function _EvaluateVisitor_visitFunctionExpression_closure9() { - }, - _EvaluateVisitor_visitFunctionExpression_closure10: function _EvaluateVisitor_visitFunctionExpression_closure10(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.node = t2; - }, - _EvaluateVisitor__visitCalculation_closure2: function _EvaluateVisitor__visitCalculation_closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__checkCalculationArguments_check2: function _EvaluateVisitor__checkCalculationArguments_check2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__visitCalculationExpression_closure2: function _EvaluateVisitor__visitCalculationExpression_closure2(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.node = t2; - _.inLegacySassFunction = t3; - }, - _EvaluateVisitor__visitCalculationExpression__closure2: function _EvaluateVisitor__visitCalculationExpression__closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitInterpolatedFunctionExpression_closure2: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure2(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.$function = t2; - }, - _EvaluateVisitor__runUserDefinedCallable_closure2: function _EvaluateVisitor__runUserDefinedCallable_closure2(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.callable = t1; - _.evaluated = t2; - _.nodeWithSpan = t3; - _.run = t4; - _.V = t5; - }, - _EvaluateVisitor__runUserDefinedCallable__closure2: function _EvaluateVisitor__runUserDefinedCallable__closure2(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.evaluated = t1; - _.callable = t2; - _.nodeWithSpan = t3; - _.run = t4; - _.V = t5; - }, - _EvaluateVisitor__runUserDefinedCallable___closure2: function _EvaluateVisitor__runUserDefinedCallable___closure2(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.evaluated = t1; - _.callable = t2; - _.nodeWithSpan = t3; - _.run = t4; - _.V = t5; - }, - _EvaluateVisitor__runUserDefinedCallable____closure2: function _EvaluateVisitor__runUserDefinedCallable____closure2() { - }, - _EvaluateVisitor__runFunctionCallable_closure2: function _EvaluateVisitor__runFunctionCallable_closure2(t0, t1) { - this.$this = t0; - this.callable = t1; - }, - _EvaluateVisitor__runBuiltInCallable_closure8: function _EvaluateVisitor__runBuiltInCallable_closure8(t0, t1, t2) { - this._box_0 = t0; - this.evaluated = t1; - this.namedSet = t2; - }, - _EvaluateVisitor__runBuiltInCallable_closure9: function _EvaluateVisitor__runBuiltInCallable_closure9(t0, t1) { - this._box_0 = t0; - this.evaluated = t1; - }, - _EvaluateVisitor__runBuiltInCallable_closure10: function _EvaluateVisitor__runBuiltInCallable_closure10() { - }, - _EvaluateVisitor__evaluateArguments_closure11: function _EvaluateVisitor__evaluateArguments_closure11() { - }, - _EvaluateVisitor__evaluateArguments_closure12: function _EvaluateVisitor__evaluateArguments_closure12(t0, t1) { - this.$this = t0; - this.restNodeForSpan = t1; - }, - _EvaluateVisitor__evaluateArguments_closure13: function _EvaluateVisitor__evaluateArguments_closure13(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.named = t1; - _.restNodeForSpan = t2; - _.namedNodes = t3; - }, - _EvaluateVisitor__evaluateArguments_closure14: function _EvaluateVisitor__evaluateArguments_closure14() { - }, - _EvaluateVisitor__evaluateMacroArguments_closure11: function _EvaluateVisitor__evaluateMacroArguments_closure11(t0) { - this.restArgs = t0; - }, - _EvaluateVisitor__evaluateMacroArguments_closure12: function _EvaluateVisitor__evaluateMacroArguments_closure12(t0, t1, t2) { - this.$this = t0; - this.restNodeForSpan = t1; - this.restArgs = t2; - }, - _EvaluateVisitor__evaluateMacroArguments_closure13: function _EvaluateVisitor__evaluateMacroArguments_closure13(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.named = t1; - _.restNodeForSpan = t2; - _.restArgs = t3; - }, - _EvaluateVisitor__evaluateMacroArguments_closure14: function _EvaluateVisitor__evaluateMacroArguments_closure14(t0, t1, t2) { - this.$this = t0; - this.keywordRestNodeForSpan = t1; - this.keywordRestArgs = t2; - }, - _EvaluateVisitor__addRestMap_closure2: function _EvaluateVisitor__addRestMap_closure2(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.values = t1; - _.convert = t2; - _.expressionNode = t3; - _.map = t4; - _.nodeWithSpan = t5; - }, - _EvaluateVisitor__verifyArguments_closure2: function _EvaluateVisitor__verifyArguments_closure2(t0, t1, t2) { - this.$arguments = t0; - this.positional = t1; - this.named = t2; - }, - _EvaluateVisitor_visitCssAtRule_closure5: function _EvaluateVisitor_visitCssAtRule_closure5(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssAtRule_closure6: function _EvaluateVisitor_visitCssAtRule_closure6() { - }, - _EvaluateVisitor_visitCssKeyframeBlock_closure5: function _EvaluateVisitor_visitCssKeyframeBlock_closure5(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssKeyframeBlock_closure6: function _EvaluateVisitor_visitCssKeyframeBlock_closure6() { - }, - _EvaluateVisitor_visitCssMediaRule_closure8: function _EvaluateVisitor_visitCssMediaRule_closure8(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssMediaRule_closure9: function _EvaluateVisitor_visitCssMediaRule_closure9(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.mergedQueries = t1; - _.node = t2; - _.mergedSources = t3; - }, - _EvaluateVisitor_visitCssMediaRule__closure2: function _EvaluateVisitor_visitCssMediaRule__closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssMediaRule___closure2: function _EvaluateVisitor_visitCssMediaRule___closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssMediaRule_closure10: function _EvaluateVisitor_visitCssMediaRule_closure10(t0) { - this.mergedSources = t0; - }, - _EvaluateVisitor_visitCssStyleRule_closure6: function _EvaluateVisitor_visitCssStyleRule_closure6(t0, t1, t2) { - this.$this = t0; - this.rule = t1; - this.node = t2; - }, - _EvaluateVisitor_visitCssStyleRule__closure2: function _EvaluateVisitor_visitCssStyleRule__closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssStyleRule_closure5: function _EvaluateVisitor_visitCssStyleRule_closure5() { - }, - _EvaluateVisitor_visitCssSupportsRule_closure5: function _EvaluateVisitor_visitCssSupportsRule_closure5(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssSupportsRule__closure2: function _EvaluateVisitor_visitCssSupportsRule__closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssSupportsRule_closure6: function _EvaluateVisitor_visitCssSupportsRule_closure6() { - }, - _EvaluateVisitor__performInterpolationHelper_closure2: function _EvaluateVisitor__performInterpolationHelper_closure2(t0) { - this.interpolation = t0; - }, - _EvaluateVisitor__serialize_closure2: function _EvaluateVisitor__serialize_closure2(t0, t1) { - this.value = t0; - this.quote = t1; - }, - _EvaluateVisitor__expressionNode_closure2: function _EvaluateVisitor__expressionNode_closure2(t0, t1) { - this.$this = t0; - this.expression = t1; - }, - _EvaluateVisitor__withoutSlash_recommendation2: function _EvaluateVisitor__withoutSlash_recommendation2() { - }, - _EvaluateVisitor__stackFrame_closure2: function _EvaluateVisitor__stackFrame_closure2(t0) { - this.$this = t0; - }, - _ImportedCssVisitor2: function _ImportedCssVisitor2(t0) { - this._async_evaluate0$_visitor = t0; - }, - _ImportedCssVisitor_visitCssAtRule_closure2: function _ImportedCssVisitor_visitCssAtRule_closure2() { - }, - _ImportedCssVisitor_visitCssMediaRule_closure2: function _ImportedCssVisitor_visitCssMediaRule_closure2(t0) { - this.hasBeenMerged = t0; - }, - _ImportedCssVisitor_visitCssStyleRule_closure2: function _ImportedCssVisitor_visitCssStyleRule_closure2() { - }, - _ImportedCssVisitor_visitCssSupportsRule_closure2: function _ImportedCssVisitor_visitCssSupportsRule_closure2() { - }, - _EvaluationContext2: function _EvaluationContext2(t0, t1) { - this._async_evaluate0$_visitor = t0; - this._async_evaluate0$_defaultWarnNodeWithSpan = t1; - }, - JSToDartAsyncFileImporter: function JSToDartAsyncFileImporter(t0) { - this._findFileUrl = t0; - }, - JSToDartAsyncFileImporter_canonicalize_closure: function JSToDartAsyncFileImporter_canonicalize_closure(t0, t1) { - this.$this = t0; - this.url = t1; - }, - AsyncImportCache$(importers, loadPaths, packageConfig) { - var t1 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2, - t2 = type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport_2, - t3 = type$.Uri; - return new A.AsyncImportCache0(A.AsyncImportCache__toImporters0(importers, loadPaths, packageConfig), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult_2)); - }, - AsyncImportCache$none() { - var t1 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2, - t2 = type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport_2, - t3 = type$.Uri; - return new A.AsyncImportCache0(B.List_empty27, A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult_2)); - }, - AsyncImportCache__toImporters0(importers, loadPaths, packageConfig) { - var t1, t2, t3, t4, _i, path, _null = null, - sassPath = A.getEnvironmentVariable0("SASS_PATH"); - if (A.isBrowser()) { - t1 = A._setArrayType([], type$.JSArray_AsyncImporter); - if (importers != null) - B.JSArray_methods.addAll$1(t1, importers); - return t1; - } - t1 = A._setArrayType([], type$.JSArray_AsyncImporter); - if (importers != null) - B.JSArray_methods.addAll$1(t1, importers); - if (loadPaths != null) - for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { - t3 = t2.get$current(t2); - t1.push(new A.FilesystemImporter0($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); - } - if (sassPath != null) { - t2 = A.isNodeJs() ? self.process : _null; - t3 = sassPath.split(J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32") ? ";" : ":"); - t4 = t3.length; - _i = 0; - for (; _i < t4; ++_i) { - path = t3[_i]; - t1.push(new A.FilesystemImporter0($.$get$context().absolute$15(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); - } - } - return t1; - }, - AsyncImportCache0: function AsyncImportCache0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._async_import_cache0$_importers = t0; - _._async_import_cache0$_canonicalizeCache = t1; - _._async_import_cache0$_perImporterCanonicalizeCache = t2; - _._async_import_cache0$_nonCanonicalRelativeUrls = t3; - _._async_import_cache0$_importCache = t4; - _._async_import_cache0$_resultsCache = t5; - }, - AsyncImportCache_canonicalize_closure0: function AsyncImportCache_canonicalize_closure0(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.baseImporter = t1; - _.resolvedUrl = t2; - _.baseUrl = t3; - _.forImport = t4; - _.key = t5; - _.url = t6; - }, - AsyncImportCache__canonicalize_closure0: function AsyncImportCache__canonicalize_closure0(t0, t1) { - this.importer = t0; - this.url = t1; - }, - AsyncImportCache_importCanonical_closure0: function AsyncImportCache_importCanonical_closure0(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.importer = t1; - _.canonicalUrl = t2; - _.originalUrl = t3; - }, - AsyncImportCache_humanize_closure3: function AsyncImportCache_humanize_closure3(t0) { - this.canonicalUrl = t0; - }, - AsyncImportCache_humanize_closure4: function AsyncImportCache_humanize_closure4() { - }, - AsyncImportCache_humanize_closure5: function AsyncImportCache_humanize_closure5() { - }, - AsyncImportCache_humanize_closure6: function AsyncImportCache_humanize_closure6(t0) { - this.canonicalUrl = t0; - }, - AtRootQueryParser0: function AtRootQueryParser0(t0, t1) { - this.scanner = t0; - this._parser1$_interpolationMap = t1; - }, - AtRootQueryParser_parse_closure0: function AtRootQueryParser_parse_closure0(t0) { - this.$this = t0; - }, - AtRootQuery0: function AtRootQuery0(t0, t1, t2, t3) { - var _ = this; - _.include = t0; - _.names = t1; - _._at_root_query0$_all = t2; - _._at_root_query0$_rule = t3; - }, - AtRootRule$0(children, span, query) { - var t1 = A.List_List$unmodifiable(children, type$.Statement_2), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); - return new A.AtRootRule0(query, span, t1, t2); - }, - AtRootRule0: function AtRootRule0(t0, t1, t2, t3) { - var _ = this; - _.query = t0; - _.span = t1; - _.children = t2; - _.hasDeclarations = t3; - }, - ModifiableCssAtRule$0($name, span, childless, value) { - var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); - return new A.ModifiableCssAtRule0($name, value, childless, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); - }, - ModifiableCssAtRule0: function ModifiableCssAtRule0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.name = t0; - _.value = t1; - _.isChildless = t2; - _.span = t3; - _.children = t4; - _._node$_children = t5; - _._node$_indexInParent = _._node$_parent = null; - _.isGroupEnd = false; - }, - AtRule$0($name, span, children, value) { - var t1 = children == null ? null : A.List_List$unmodifiable(children, type$.Statement_2), - t2 = t1 == null ? null : B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); - return new A.AtRule0($name, value, span, t1, t2 === true); - }, - AtRule0: function AtRule0(t0, t1, t2, t3, t4) { - var _ = this; - _.name = t0; - _.value = t1; - _.span = t2; - _.children = t3; - _.hasDeclarations = t4; - }, - AttributeSelector0: function AttributeSelector0(t0, t1, t2, t3, t4) { - var _ = this; - _.name = t0; - _.op = t1; - _.value = t2; - _.modifier = t3; - _.span = t4; - }, - AttributeOperator0: function AttributeOperator0(t0, t1) { - this._attribute0$_text = t0; - this._name = t1; - }, - BinaryOperationExpression0: function BinaryOperationExpression0(t0, t1, t2, t3) { - var _ = this; - _.operator = t0; - _.left = t1; - _.right = t2; - _.allowsSlash = t3; - }, - BinaryOperator0: function BinaryOperator0(t0, t1, t2, t3, t4) { - var _ = this; - _.name = t0; - _.operator = t1; - _.precedence = t2; - _.isAssociative = t3; - _._name = t4; - }, - BooleanExpression0: function BooleanExpression0(t0, t1) { - this.value = t0; - this.span = t1; - }, - booleanClass_closure: function booleanClass_closure() { - }, - booleanClass__closure: function booleanClass__closure() { - }, - legacyBooleanClass_closure: function legacyBooleanClass_closure() { - }, - legacyBooleanClass__closure: function legacyBooleanClass__closure() { - }, - legacyBooleanClass__closure0: function legacyBooleanClass__closure0() { - }, - SassBoolean0: function SassBoolean0(t0) { - this.value = t0; - }, - Box0: function Box0(t0, t1) { - this._box0$_inner = t0; - this.$ti = t1; - }, - ModifiableBox0: function ModifiableBox0(t0, t1) { - this.value = t0; - this.$ti = t1; - }, - BuiltInCallable$function0($name, $arguments, callback, url) { - return new A.BuiltInCallable0($name, A._setArrayType([new A._Record_2(A.ScssParser$0("@function " + $name + "(" + $arguments + ") {", url).parseArgumentDeclaration$0(), callback)], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value_2), false); - }, - BuiltInCallable$mixin0($name, $arguments, callback, acceptsContent, url) { - return new A.BuiltInCallable0($name, A._setArrayType([new A._Record_2(A.ScssParser$0("@mixin " + $name + "(" + $arguments + ") {", url).parseArgumentDeclaration$0(), new A.BuiltInCallable$mixin_closure0(callback))], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value_2), acceptsContent); - }, - BuiltInCallable$overloadedFunction0($name, overloads) { - var t2, t3, t4, t5, t6, t7, args, callback, - t1 = A._setArrayType([], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value_2); - for (t2 = type$.String, t3 = A.MapExtensions_get_pairs0(overloads, t2, type$.Value_Function_List_Value_2), t3 = t3.get$iterator(t3), t4 = "@function " + $name + "(", t5 = type$.FileSpan, t6 = type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2; t3.moveNext$0();) { - t7 = t3.get$current(t3); - args = t7._0; - callback = t7._1; - t1.push(new A._Record_2(new A.ScssParser0(A.LinkedHashMap_LinkedHashMap$_empty(t2, t5), A._setArrayType([], t6), A.SpanScanner$(t4 + args + ") {", null), null).parseArgumentDeclaration$0(), callback)); - } - return new A.BuiltInCallable0($name, t1, false); - }, - BuiltInCallable0: function BuiltInCallable0(t0, t1, t2) { - this.name = t0; - this._built_in$_overloads = t1; - this.acceptsContent = t2; - }, - BuiltInCallable$mixin_closure0: function BuiltInCallable$mixin_closure0(t0) { - this.callback = t0; - }, - BuiltInCallable_withDeprecationWarning_closure0: function BuiltInCallable_withDeprecationWarning_closure0(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.module = t2; - _.newName = t3; - }, - BuiltInModule$0($name, functions, mixins, variables, $T) { - var t1 = A._Uri__Uri(null, $name, null, "sass"), - t2 = A.BuiltInModule__callableMap0(functions, $T), - t3 = A.BuiltInModule__callableMap0(mixins, $T), - t4 = variables == null ? B.Map_empty15 : new A.UnmodifiableMapView(variables, type$.UnmodifiableMapView_String_Value_2); - return new A.BuiltInModule0(t1, t2, t3, t4, $T._eval$1("BuiltInModule0<0>")); - }, - BuiltInModule__callableMap0(callables, $T) { - var t2, _i, callable, - t1 = type$.String; - if (callables == null) - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); - else { - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); - for (t2 = callables.length, _i = 0; _i < callables.length; callables.length === t2 || (0, A.throwConcurrentModificationError)(callables), ++_i) { - callable = callables[_i]; - t1.$indexSet(0, J.get$name$x(callable), callable); - } - t1 = new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); - } - return new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); - }, - BuiltInModule0: function BuiltInModule0(t0, t1, t2, t3, t4) { - var _ = this; - _.url = t0; - _.functions = t1; - _.mixins = t2; - _.variables = t3; - _.$ti = t4; - }, - _assertCalculationValue(arg) { - var t1; - $label0$0: { - if (!(arg instanceof A.SassNumber0)) - t1 = arg instanceof A.SassString0 && !arg._string0$_hasQuotes || arg instanceof A.SassCalculation0 || arg instanceof A.CalculationOperation0 || arg instanceof A.CalculationInterpolation; - else - t1 = true; - if (t1) { - t1 = null; - break $label0$0; - } - t1 = A.jsThrow0(new self.Error("Argument `" + A.S(arg) + "` must be one of SassNumber, unquoted SassString, SassCalculation, CalculationOperation, CalculationInterpolation")); - } - return t1; - }, - _isValidClampArg(arg) { - var t1; - $label0$0: { - if (!(arg instanceof A.CalculationInterpolation)) - t1 = arg instanceof A.SassString0 && !arg._string0$_hasQuotes; - else - t1 = true; - if (t1) - break $label0$0; - break $label0$0; - } - return t1; - }, - calculationClass_closure: function calculationClass_closure() { - }, - calculationClass__closure: function calculationClass__closure() { - }, - calculationClass__closure0: function calculationClass__closure0() { - }, - calculationClass__closure1: function calculationClass__closure1() { - }, - calculationClass__closure2: function calculationClass__closure2() { - }, - calculationClass__closure3: function calculationClass__closure3() { - }, - calculationClass__closure4: function calculationClass__closure4() { - }, - calculationClass__closure5: function calculationClass__closure5() { - }, - calculationOperationClass_closure: function calculationOperationClass_closure() { - }, - calculationOperationClass__closure: function calculationOperationClass__closure() { - }, - calculationOperationClass___closure: function calculationOperationClass___closure(t0) { - this.strOperator = t0; - }, - calculationOperationClass__closure0: function calculationOperationClass__closure0() { - }, - calculationOperationClass__closure1: function calculationOperationClass__closure1() { - }, - calculationOperationClass__closure2: function calculationOperationClass__closure2() { - }, - calculationOperationClass__closure3: function calculationOperationClass__closure3() { - }, - calculationOperationClass__closure4: function calculationOperationClass__closure4() { - }, - calculationInterpolationClass_closure: function calculationInterpolationClass_closure() { - }, - calculationInterpolationClass__closure: function calculationInterpolationClass__closure() { - }, - calculationInterpolationClass__closure0: function calculationInterpolationClass__closure0() { - }, - calculationInterpolationClass__closure1: function calculationInterpolationClass__closure1() { - }, - calculationInterpolationClass__closure2: function calculationInterpolationClass__closure2() { - }, - SassCalculation_calc0(argument) { - var t1, - _0_0 = A.SassCalculation__simplify0(argument); - $label0$0: { - if (_0_0 instanceof A.SassNumber0) { - t1 = _0_0; - break $label0$0; - } - if (_0_0 instanceof A.SassCalculation0) { - t1 = _0_0; - break $label0$0; - } - t1 = new A.SassCalculation0("calc", A.List_List$unmodifiable([_0_0], type$.Object)); - break $label0$0; - } - return t1; - }, - SassCalculation_min0($arguments) { - var minimum, _i, arg, t2, - args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation0_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), - t1 = args.length; - if (t1 === 0) - throw A.wrapException(A.ArgumentError$("min() must have at least one argument.", null)); - for (minimum = null, _i = 0; _i < t1; ++_i) { - arg = args[_i]; - if (arg instanceof A.SassNumber0) - t2 = minimum != null && !minimum.isComparableTo$1(arg); - else - t2 = true; - if (t2) { - minimum = null; - break; - } else if (minimum == null || minimum.greaterThan$1(arg).value) - minimum = arg; - } - if (minimum != null) - return minimum; - A.SassCalculation__verifyCompatibleNumbers0(args); - return new A.SassCalculation0("min", args); - }, - SassCalculation_max0($arguments) { - var maximum, _i, arg, t2, - args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation0_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), - t1 = args.length; - if (t1 === 0) - throw A.wrapException(A.ArgumentError$("max() must have at least one argument.", null)); - for (maximum = null, _i = 0; _i < t1; ++_i) { - arg = args[_i]; - if (arg instanceof A.SassNumber0) - t2 = maximum != null && !maximum.isComparableTo$1(arg); - else - t2 = true; - if (t2) { - maximum = null; - break; - } else if (maximum == null || maximum.lessThan$1(arg).value) - maximum = arg; - } - if (maximum != null) - return maximum; - A.SassCalculation__verifyCompatibleNumbers0(args); - return new A.SassCalculation0("max", args); - }, - SassCalculation_hypot0($arguments) { - var first, subtotal, i, number, value, t2, t3, - args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation0_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), - t1 = args.length; - if (t1 === 0) - throw A.wrapException(A.ArgumentError$("hypot() must have at least one argument.", null)); - A.SassCalculation__verifyCompatibleNumbers0(args); - first = B.JSArray_methods.get$first(args); - if (!(first instanceof A.SassNumber0) || first.hasUnit$1("%")) - return new A.SassCalculation0("hypot", args); - for (subtotal = 0, i = 0; i < t1;) { - number = args[i]; - if (!(number instanceof A.SassNumber0) || !number.hasCompatibleUnits$1(first)) - return new A.SassCalculation0("hypot", args); - ++i; - value = number.convertValueToMatch$3(first, "numbers[" + i + "]", "numbers[1]"); - subtotal += value * value; - } - t1 = Math.sqrt(subtotal); - t2 = J.getInterceptor$x(first); - t3 = t2.get$numeratorUnits(first); - return A.SassNumber_SassNumber$withUnits0(t1, t2.get$denominatorUnits(first), t3); - }, - SassCalculation_abs0(argument) { - argument = A.SassCalculation__simplify0(argument); - if (!(argument instanceof A.SassNumber0)) - return new A.SassCalculation0("abs", A._setArrayType([argument], type$.JSArray_Object)); - if (argument.hasUnit$1("%")) - A.warnForDeprecation0(string$.Passinp + argument.toString$0(0) + ")\nTo emit a CSS abs() now: abs(#{" + argument.toString$0(0) + string$.x7d__Mor, B.Deprecation_qgq); - return A.SassNumber_SassNumber0(Math.abs(argument._number1$_value), null).coerceToMatch$1(argument); - }, - SassCalculation_exp0(argument) { - argument = A.SassCalculation__simplify0(argument); - if (!(argument instanceof A.SassNumber0)) - return new A.SassCalculation0("exp", A._setArrayType([argument], type$.JSArray_Object)); - argument.assertNoUnits$0(); - return A.pow1(A.SassNumber_SassNumber0(2.718281828459045, null), argument); - }, - SassCalculation_sign0(argument) { - var t1, _0_2, t2, arg; - argument = A.SassCalculation__simplify0(argument); - $label0$0: { - t1 = argument instanceof A.SassNumber0; - if (t1) { - _0_2 = argument._number1$_value; - if (!isNaN(_0_2)) - t2 = 0 === _0_2; - else - t2 = true; - } else - t2 = false; - if (t2) { - t1 = argument; - break $label0$0; - } - if (t1) { - t1 = !argument.hasUnit$1("%"); - arg = argument; - } else { - arg = null; - t1 = false; - } - if (t1) { - t1 = A.SassNumber_SassNumber0(J.get$sign$in(arg._number1$_value), null).coerceToMatch$1(argument); - break $label0$0; - } - t1 = new A.SassCalculation0("sign", A._setArrayType([argument], type$.JSArray_Object)); - break $label0$0; - } - return t1; - }, - SassCalculation_clamp0(min, value, max) { - var t1, args; - if (value == null && max != null) - throw A.wrapException(A.ArgumentError$("If value is null, max must also be null.", null)); - min = A.SassCalculation__simplify0(min); - value = A.NullableExtension_andThen0(value, A.calculation0_SassCalculation__simplify$closure()); - max = A.NullableExtension_andThen0(max, A.calculation0_SassCalculation__simplify$closure()); - if (min instanceof A.SassNumber0 && value instanceof A.SassNumber0 && max instanceof A.SassNumber0 && min.hasCompatibleUnits$1(value) && min.hasCompatibleUnits$1(max)) { - if (value.lessThanOrEquals$1(min).value) - return min; - if (value.greaterThanOrEquals$1(max).value) - return max; - return value; - } - t1 = [min]; - if (value != null) - t1.push(value); - if (max != null) - t1.push(max); - args = A.List_List$unmodifiable(t1, type$.Object); - A.SassCalculation__verifyCompatibleNumbers0(args); - A.SassCalculation__verifyLength0(args, 3); - return new A.SassCalculation0("clamp", args); - }, - SassCalculation_pow0(base, exponent) { - var t1 = A._setArrayType([base], type$.JSArray_Object); - if (exponent != null) - t1.push(exponent); - A.SassCalculation__verifyLength0(t1, 2); - base = A.SassCalculation__simplify0(base); - exponent = A.NullableExtension_andThen0(exponent, A.calculation0_SassCalculation__simplify$closure()); - if (!(base instanceof A.SassNumber0) || !(exponent instanceof A.SassNumber0)) - return new A.SassCalculation0("pow", t1); - base.assertNoUnits$0(); - exponent.assertNoUnits$0(); - return A.pow1(base, exponent); - }, - SassCalculation_log0(number, base) { - var t1, t2; - number = A.SassCalculation__simplify0(number); - base = A.NullableExtension_andThen0(base, A.calculation0_SassCalculation__simplify$closure()); - t1 = A._setArrayType([number], type$.JSArray_Object); - t2 = base != null; - if (t2) - t1.push(base); - if (number instanceof A.SassNumber0) - t2 = t2 && !(base instanceof A.SassNumber0); - else - t2 = true; - if (t2) - return new A.SassCalculation0("log", t1); - number.assertNoUnits$0(); - if (base instanceof A.SassNumber0) { - base.assertNoUnits$0(); - return A.log0(number, base); - } - return A.log0(number, null); - }, - SassCalculation_atan20(y, x) { - var t1; - y = A.SassCalculation__simplify0(y); - x = A.NullableExtension_andThen0(x, A.calculation0_SassCalculation__simplify$closure()); - t1 = A._setArrayType([y], type$.JSArray_Object); - if (x != null) - t1.push(x); - A.SassCalculation__verifyLength0(t1, 2); - A.SassCalculation__verifyCompatibleNumbers0(t1); - if (!(y instanceof A.SassNumber0) || !(x instanceof A.SassNumber0) || y.hasUnit$1("%") || x.hasUnit$1("%") || !y.hasCompatibleUnits$1(x)) - return new A.SassCalculation0("atan2", t1); - return A.SassNumber_SassNumber$withUnits0(Math.atan2(y._number1$_value, x.convertValueToMatch$3(y, "x", "y")) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); - }, - SassCalculation_rem0(dividend, modulus) { - var t1, result; - dividend = A.SassCalculation__simplify0(dividend); - modulus = A.NullableExtension_andThen0(modulus, A.calculation0_SassCalculation__simplify$closure()); - t1 = A._setArrayType([dividend], type$.JSArray_Object); - if (modulus != null) - t1.push(modulus); - A.SassCalculation__verifyLength0(t1, 2); - A.SassCalculation__verifyCompatibleNumbers0(t1); - if (!(dividend instanceof A.SassNumber0) || !(modulus instanceof A.SassNumber0) || !dividend.hasCompatibleUnits$1(modulus)) - return new A.SassCalculation0("rem", t1); - result = dividend.modulo$1(modulus); - t1 = modulus._number1$_value; - if (A.DoubleWithSignedZero_get_signIncludingZero0(t1) !== A.DoubleWithSignedZero_get_signIncludingZero0(dividend._number1$_value)) { - if (t1 == 1 / 0 || t1 == -1 / 0) - return dividend; - if (result._number1$_value === 0) - return result.unaryMinus$0(); - return result.minus$1(modulus); - } - return result; - }, - SassCalculation_mod0(dividend, modulus) { - var t1; - dividend = A.SassCalculation__simplify0(dividend); - modulus = A.NullableExtension_andThen0(modulus, A.calculation0_SassCalculation__simplify$closure()); - t1 = A._setArrayType([dividend], type$.JSArray_Object); - if (modulus != null) - t1.push(modulus); - A.SassCalculation__verifyLength0(t1, 2); - A.SassCalculation__verifyCompatibleNumbers0(t1); - if (!(dividend instanceof A.SassNumber0) || !(modulus instanceof A.SassNumber0) || !dividend.hasCompatibleUnits$1(modulus)) - return new A.SassCalculation0("mod", t1); - return dividend.modulo$1(modulus); - }, - SassCalculation_roundInternal0(strategyOrNumber, numberOrStep, step, inLegacySassFunction, span, warn) { - var _0_8_isSet, _0_6_isSet, t2, _0_6_isSet0, _0_14_isSet, _0_14, _0_12, _0_16, _0_18, _0_18_isSet, _0_20, _0_20_isSet, strategy, _0_9_isSet0, _0_16_isSet, t3, t4, _0_12_isSet, _0_12_isSet0, rest, _null = null, _s5_ = "round", - _0_1 = A.SassCalculation__simplify0(strategyOrNumber), - _0_6 = A.NullableExtension_andThen0(numberOrStep, A.calculation0_SassCalculation__simplify$closure()), - _0_9 = A.NullableExtension_andThen0(step, A.calculation0_SassCalculation__simplify$closure()), - _0_10 = _0_1, - _0_8 = _null, - _0_60 = _null, - _0_100 = _null, - _0_10_isSet = false, - _0_90 = _null, - _0_9_isSet = false, - number = _null, - t1 = false; - if (_0_1 instanceof A.SassNumber0) { - type$.SassNumber_2._as(_0_10); - _0_8_isSet = !_0_10.get$hasUnits(); - if (_0_8_isSet) { - _0_8 = _0_6 == null; - _0_9_isSet = _0_8; - _0_60 = _0_6; - if (_0_9_isSet) { - _0_100 = _0_9 == null; - t1 = _0_100; - _0_90 = _0_9; - } - _0_10_isSet = _0_9_isSet; - number = _0_10; - } - _0_6_isSet = _0_8_isSet; - _0_1 = _0_10; - _0_10 = _0_100; - } else { - _0_1 = _0_10; - _0_10 = _0_100; - _0_8_isSet = false; - _0_6_isSet = false; - } - if (t1) - return A.SassNumber_SassNumber0(B.JSNumber_methods.round$0(number._number1$_value), _null); - t1 = false; - if (_0_1 instanceof A.SassNumber0) { - if (_0_8_isSet) - t2 = _0_8; - else { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_60 = t2; - _0_6_isSet = true; - } - _0_8 = t2 == null; - t2 = _0_8; - _0_8_isSet = true; - } - if (t2) { - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - t1 = t1 && inLegacySassFunction != null; - } - number = _0_1; - } else - number = _null; - if (t1) { - warn.call$2(string$.In_fut, B.Deprecation_Q5r); - t1 = B.JSNumber_methods.round$0(number._number1$_value); - t2 = number.get$numeratorUnits(number); - return A.SassNumber_SassNumber$withUnits0(t1, number.get$denominatorUnits(number), t2); - } - step = _null; - t1 = false; - if (_0_1 instanceof A.SassNumber0) { - _0_6_isSet0 = true; - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - if (t2 instanceof A.SassNumber0) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - type$.SassNumber_2._as(t2); - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - t1 = t1 && !_0_1.hasCompatibleUnits$1(t2); - step = t2; - } - number = _0_1; - } else - number = _null; - if (t1) { - t1 = type$.JSArray_Object; - A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([number, step], t1)); - return new A.SassCalculation0(_s5_, A._setArrayType([number, step], t1)); - } - step = _null; - t1 = false; - if (_0_1 instanceof A.SassNumber0) { - _0_6_isSet0 = true; - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - if (t2 instanceof A.SassNumber0) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - type$.SassNumber_2._as(t2); - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - step = t2; - } - number = _0_1; - } else - number = _null; - if (t1) { - A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([number, step], type$.JSArray_Object)); - return A.SassCalculation__roundWithStep0("nearest", number, step); - } - _0_14_isSet = _0_1 instanceof A.SassString0; - _0_14 = _null; - _0_12 = _null; - _0_16 = _null; - _0_18 = _null; - _0_18_isSet = false; - _0_20 = _null; - _0_20_isSet = false; - strategy = _null; - number = _null; - step = _null; - t1 = false; - if (_0_14_isSet) { - _0_6_isSet0 = true; - _0_9_isSet0 = true; - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_14 = "nearest" === t2; - t2 = _0_14; - _0_16_isSet = !t2; - t2 = true; - if (_0_16_isSet) { - _0_16 = "up" === _0_12; - t3 = _0_16; - _0_18_isSet = !t3; - if (_0_18_isSet) { - _0_18 = "down" === _0_12; - t3 = _0_18; - _0_20_isSet = !t3; - if (_0_20_isSet) { - _0_20 = "to-zero" === _0_12; - t2 = _0_20; - } - } - } - if (t2) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - if (t2 instanceof A.SassNumber0) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - t3 = type$.SassNumber_2; - t3._as(t2); - if (_0_9_isSet) - t4 = _0_90; - else { - t4 = _0_9; - _0_9_isSet = _0_9_isSet0; - _0_90 = t4; - } - if (t4 instanceof A.SassNumber0) { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_9_isSet = _0_9_isSet0; - _0_90 = t1; - } - t3._as(t1); - t3 = !t2.hasCompatibleUnits$1(t1); - step = t1; - t1 = t3; - } - number = t2; - } - strategy = _0_1; - } - } else - _0_16_isSet = false; - if (t1) { - t1 = type$.JSArray_Object; - A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([number, step], t1)); - return new A.SassCalculation0(_s5_, A._setArrayType([strategy, number, step], t1)); - } - strategy = _null; - number = _null; - step = _null; - t1 = false; - if (_0_1 instanceof A.SassString0) { - _0_6_isSet0 = true; - _0_9_isSet0 = true; - _0_12_isSet = true; - if (_0_14_isSet) { - t2 = _0_14; - _0_12_isSet0 = _0_14_isSet; - } else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_14 = "nearest" === t2; - t2 = _0_14; - _0_12_isSet0 = _0_12_isSet; - _0_14_isSet = true; - } - t3 = true; - if (!t2) { - if (_0_16_isSet) - t2 = _0_16; - else { - if (_0_12_isSet0) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet0 = _0_12_isSet; - } - _0_16 = "up" === t2; - t2 = _0_16; - _0_16_isSet = true; - } - if (!t2) { - if (_0_18_isSet) - t2 = _0_18; - else { - if (_0_12_isSet0) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet0 = _0_12_isSet; - } - _0_18 = "down" === t2; - t2 = _0_18; - _0_18_isSet = true; - } - if (!t2) - if (_0_20_isSet) { - t2 = _0_20; - _0_12_isSet = _0_12_isSet0; - } else { - if (_0_12_isSet0) { - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - } - _0_20 = "to-zero" === t2; - t2 = _0_20; - _0_20_isSet = true; - } - else { - t2 = t3; - _0_12_isSet = _0_12_isSet0; - } - } else { - t2 = t3; - _0_12_isSet = _0_12_isSet0; - } - } else { - t2 = t3; - _0_12_isSet = _0_12_isSet0; - } - if (t2) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - if (t2 instanceof A.SassNumber0) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - t3 = type$.SassNumber_2; - t3._as(t2); - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_9_isSet = _0_9_isSet0; - _0_90 = t1; - } - t1 = t1 instanceof A.SassNumber0; - if (t1) { - if (_0_9_isSet) - t4 = _0_90; - else { - t4 = _0_9; - _0_9_isSet = _0_9_isSet0; - _0_90 = t4; - } - t3._as(t4); - step = t4; - } - number = t2; - } - strategy = _0_1; - } - } else - _0_12_isSet = _0_14_isSet; - if (t1) { - A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([number, step], type$.JSArray_Object)); - return A.SassCalculation__roundWithStep0(strategy._string0$_text, number, step); - } - strategy = _null; - rest = _null; - t1 = false; - if (_0_1 instanceof A.SassString0) { - _0_6_isSet0 = true; - _0_12_isSet0 = true; - if (_0_14_isSet) - t2 = _0_14; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_14 = "nearest" === t2; - t2 = _0_14; - _0_14_isSet = true; - } - t3 = true; - if (!t2) { - if (_0_16_isSet) - t2 = _0_16; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_16 = "up" === t2; - t2 = _0_16; - _0_16_isSet = true; - } - if (!t2) { - if (_0_18_isSet) - t2 = _0_18; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_18 = "down" === t2; - t2 = _0_18; - _0_18_isSet = true; - } - if (!t2) - if (_0_20_isSet) - t2 = _0_20; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_20 = "to-zero" === t2; - t2 = _0_20; - _0_20_isSet = true; - } - else - t2 = t3; - } else - t2 = t3; - } else - t2 = t3; - if (t2) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - if (t2 instanceof A.SassString0) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - type$.SassString_2._as(t2); - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - rest = t2; - } - strategy = _0_1; - } - } - if (t1) - return new A.SassCalculation0(_s5_, A._setArrayType([strategy, rest], type$.JSArray_Object)); - t1 = false; - if (_0_1 instanceof A.SassString0) { - _0_12_isSet0 = true; - if (_0_14_isSet) - t2 = _0_14; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_14 = "nearest" === t2; - t2 = _0_14; - _0_14_isSet = true; - } - t3 = true; - if (!t2) { - if (_0_16_isSet) - t2 = _0_16; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_16 = "up" === t2; - t2 = _0_16; - _0_16_isSet = true; - } - if (!t2) { - if (_0_18_isSet) - t2 = _0_18; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_18 = "down" === t2; - t2 = _0_18; - _0_18_isSet = true; - } - if (!t2) - if (_0_20_isSet) - t2 = _0_20; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_20 = "to-zero" === t2; - t2 = _0_20; - _0_20_isSet = true; - } - else - t2 = t3; - } else - t2 = t3; - } else - t2 = t3; - if (t2) { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_60 = t2; - _0_6_isSet = true; - } - if (t2 != null) - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - } - } - if (t1) - throw A.wrapException(A.SassScriptException$0(string$.If_str, _null)); - t1 = false; - if (_0_1 instanceof A.SassString0) { - _0_12_isSet0 = true; - if (_0_14_isSet) - t2 = _0_14; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_14 = "nearest" === t2; - t2 = _0_14; - _0_14_isSet = true; - } - t3 = true; - if (!t2) { - if (_0_16_isSet) - t2 = _0_16; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_16 = "up" === t2; - t2 = _0_16; - _0_16_isSet = true; - } - if (!t2) { - if (_0_18_isSet) - t2 = _0_18; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_18 = "down" === t2; - t2 = _0_18; - _0_18_isSet = true; - } - if (!t2) - if (_0_20_isSet) - t2 = _0_20; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = _0_12_isSet0; - } - _0_20 = "to-zero" === t2; - t2 = _0_20; - _0_20_isSet = true; - } - else - t2 = t3; - } else - t2 = t3; - } else - t2 = t3; - if (t2) { - if (_0_8_isSet) - t2 = _0_8; - else { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_60 = t2; - _0_6_isSet = true; - } - _0_8 = t2 == null; - t2 = _0_8; - _0_8_isSet = true; - } - if (t2) - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - } - } - if (t1) - throw A.wrapException(A.SassScriptException$0(string$.Number, _null)); - t1 = false; - if (_0_8_isSet) - t2 = _0_8; - else { - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_60 = t2; - _0_6_isSet = true; - } - _0_8 = t2 == null; - t2 = _0_8; - } - if (t2) - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - _0_10_isSet = true; - } - if (t1) - return new A.SassCalculation0(_s5_, A._setArrayType([_0_1], type$.JSArray_Object)); - step = _null; - t1 = false; - _0_6_isSet0 = true; - if (_0_6_isSet) - t2 = _0_60; - else { - t2 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t2; - } - if (t2 != null) { - if (_0_6_isSet) - step = _0_60; - else { - step = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = step; - } - if (step == null) - step = type$.Object._as(step); - if (_0_10_isSet) - t1 = _0_10; - else { - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_90 = t1; - _0_9_isSet = true; - } - _0_10 = t1 == null; - t1 = _0_10; - } - } - if (t1) - return new A.SassCalculation0(_s5_, A._setArrayType([_0_1, step], type$.JSArray_Object)); - if (_0_1 instanceof A.SassString0) { - t1 = true; - if (_0_14_isSet) - t2 = _0_14; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = true; - } - _0_14 = "nearest" === t2; - t2 = _0_14; - } - if (!t2) { - if (_0_16_isSet) - t2 = _0_16; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = true; - } - _0_16 = "up" === t2; - t2 = _0_16; - } - if (!t2) { - if (_0_18_isSet) - t2 = _0_18; - else { - if (_0_12_isSet) - t2 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t2 = _0_12; - _0_12_isSet = true; - } - _0_18 = "down" === t2; - t2 = _0_18; - } - if (!t2) - if (_0_20_isSet) - t1 = _0_20; - else { - if (_0_12_isSet) - t1 = _0_12; - else { - _0_12 = _0_1._string0$_text; - t1 = _0_12; - } - _0_20 = "to-zero" === t1; - t1 = _0_20; - } - } - } - } else - t1 = false; - if (!t1) - if (_0_1 instanceof A.SassString0) - t1 = _0_1.get$isVar(); - else - t1 = false; - else - t1 = true; - number = _null; - step = _null; - t2 = false; - if (t1) { - _0_6_isSet0 = true; - _0_9_isSet0 = true; - type$.SassString_2._as(_0_1); - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - if (t1 != null) { - if (_0_6_isSet) - number = _0_60; - else { - number = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = number; - } - if (number == null) - number = type$.Object._as(number); - if (_0_9_isSet) - t1 = _0_90; - else { - t1 = _0_9; - _0_9_isSet = _0_9_isSet0; - _0_90 = t1; - } - t1 = t1 != null; - if (t1) { - if (_0_9_isSet) - step = _0_90; - else { - step = _0_9; - _0_9_isSet = _0_9_isSet0; - _0_90 = step; - } - if (step == null) - step = type$.Object._as(step); - } - } else - t1 = t2; - strategy = _0_1; - } else { - t1 = t2; - strategy = _null; - } - if (t1) - return new A.SassCalculation0(_s5_, A._setArrayType([strategy, number, step], type$.JSArray_Object)); - t1 = false; - if ((_0_6_isSet ? _0_60 : _0_6) != null) - t1 = (_0_9_isSet ? _0_90 : _0_9) != null; - if (t1) - throw A.wrapException(A.SassScriptException$0(A.S(strategyOrNumber) + string$.x20must_b, _null)); - t1 = A.SassScriptException$0("Invalid parameters.", _null); - throw A.wrapException(t1); - }, - SassCalculation_operateInternal0(operator, left, right, inLegacySassFunction, simplify, warn) { - var compatible, t1; - if (!simplify) - return new A.CalculationOperation0(operator, left, right); - left = A.SassCalculation__simplify0(left); - right = A.SassCalculation__simplify0(right); - if (B.CalculationOperator_g2q0 === operator || B.CalculationOperator_CxF0 === operator) { - if (left instanceof A.SassNumber0 && right instanceof A.SassNumber0) { - compatible = left.hasCompatibleUnits$1(right); - if (!compatible && inLegacySassFunction != null && left.isComparableTo$1(right)) { - t1 = A.S(inLegacySassFunction); - warn.call$2("In future versions of Sass, " + t1 + "() will be interpreted as the CSS " + t1 + string$.x28__cal + t1 + string$.x28__ins, B.Deprecation_Q5r); - compatible = true; - } - if (compatible) - return operator === B.CalculationOperator_g2q0 ? left.plus$1(right) : left.minus$1(right); - } - A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([left, right], type$.JSArray_Object)); - if (right instanceof A.SassNumber0) { - t1 = right._number1$_value; - t1 = t1 < 0 && !A.fuzzyEquals0(t1, 0); - } else - t1 = false; - if (t1) { - right = right.times$1(A.SassNumber_SassNumber0(-1, null)); - operator = operator === B.CalculationOperator_g2q0 ? B.CalculationOperator_CxF0 : B.CalculationOperator_g2q0; - } - return new A.CalculationOperation0(operator, left, right); - } else if (left instanceof A.SassNumber0 && right instanceof A.SassNumber0) - return operator === B.CalculationOperator_1710 ? left.times$1(right) : left.dividedBy$1(right); - else - return new A.CalculationOperation0(operator, left, right); - }, - SassCalculation__roundWithStep0(strategy, number, step) { - var _0_2, t1, _0_6, _0_8_isSet, _0_8, _0_9_isSet, _0_9, _0_11, _0_13, stepWithNumberUnit, t2, _null = null; - if (!A.LinkedHashSet_LinkedHashSet$_literal(["nearest", "up", "down", "to-zero"], type$.String).contains$1(0, strategy)) - throw A.wrapException(A.ArgumentError$(strategy + string$.x20must_b, _null)); - _0_2 = number._number1$_value; - if (_0_2 == 1 / 0 || _0_2 == -1 / 0) { - t1 = step._number1$_value; - t1 = t1 == 1 / 0 || t1 == -1 / 0; - } else - t1 = false; - if (!t1) { - t1 = step._number1$_value; - t1 = t1 === 0 || isNaN(_0_2) || isNaN(t1); - } else - t1 = true; - if (t1) { - t1 = number.get$numeratorUnits(number); - return A.SassNumber_SassNumber$withUnits0(0 / 0, number.get$denominatorUnits(number), t1); - } - if (_0_2 == 1 / 0 || _0_2 == -1 / 0) - return number; - t1 = step._number1$_value; - if (t1 == 1 / 0 || t1 == -1 / 0) { - $label0$0: { - if (0 === _0_2) { - t1 = number; - break $label0$0; - } - _0_6 = "nearest" === strategy; - t1 = _0_6; - _0_8_isSet = !t1; - _0_8 = _null; - if (_0_8_isSet) { - _0_8 = "to-zero" === strategy; - _0_9_isSet = _0_8; - } else - _0_9_isSet = true; - _0_9 = _null; - if (_0_9_isSet) { - _0_9 = _0_2 > 0; - t1 = _0_9; - } else - t1 = false; - if (t1) { - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits0(0, number.get$denominatorUnits(number), t1); - break $label0$0; - } - if (!_0_6) - if (_0_8_isSet) - t1 = _0_8; - else { - _0_8 = "to-zero" === strategy; - t1 = _0_8; - } - else - t1 = true; - if (t1) { - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits0(-0.0, number.get$denominatorUnits(number), t1); - break $label0$0; - } - _0_11 = "up" === strategy; - t1 = _0_11; - if (t1) - if (_0_9_isSet) - t1 = _0_9; - else { - _0_9 = _0_2 > 0; - t1 = _0_9; - } - else - t1 = false; - if (t1) { - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits0(1 / 0, number.get$denominatorUnits(number), t1); - break $label0$0; - } - if (_0_11) { - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits0(-0.0, number.get$denominatorUnits(number), t1); - break $label0$0; - } - _0_13 = "down" === strategy; - t1 = _0_13; - if (t1) - t1 = _0_2 < 0; - else - t1 = false; - if (t1) { - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits0(-1 / 0, number.get$denominatorUnits(number), t1); - break $label0$0; - } - if (_0_13) { - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits0(0, number.get$denominatorUnits(number), t1); - break $label0$0; - } - t1 = A.throwExpression(A.UnsupportedError$("Invalid argument: " + strategy + ".")); - } - return t1; - } - stepWithNumberUnit = step.convertValueToMatch$1(number); - $label1$1: { - if ("nearest" === strategy) { - t1 = B.JSNumber_methods.round$0(_0_2 / stepWithNumberUnit); - t2 = number.get$numeratorUnits(number); - t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); - t1 = t2; - break $label1$1; - } - if ("up" === strategy) { - t2 = _0_2 / stepWithNumberUnit; - t1 = t1 < 0 ? B.JSNumber_methods.floor$0(t2) : B.JSNumber_methods.ceil$0(t2); - t2 = number.get$numeratorUnits(number); - t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); - t1 = t2; - break $label1$1; - } - if ("down" === strategy) { - t2 = _0_2 / stepWithNumberUnit; - t1 = t1 < 0 ? B.JSNumber_methods.ceil$0(t2) : B.JSNumber_methods.floor$0(t2); - t2 = number.get$numeratorUnits(number); - t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); - t1 = t2; - break $label1$1; - } - if ("to-zero" === strategy) { - t1 = _0_2 / stepWithNumberUnit; - if (_0_2 < 0) { - t1 = B.JSNumber_methods.ceil$0(t1); - t2 = number.get$numeratorUnits(number); - t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); - t1 = t2; - } else { - t1 = B.JSNumber_methods.floor$0(t1); - t2 = number.get$numeratorUnits(number); - t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); - t1 = t2; - } - break $label1$1; - } - t1 = number.get$numeratorUnits(number); - t1 = A.SassNumber_SassNumber$withUnits0(0 / 0, number.get$denominatorUnits(number), t1); - break $label1$1; - } - return t1; - }, - SassCalculation__simplify0(arg) { - var t1, t2, _0_11_isSet, _0_15, _0_12, _0_16_isSet, text, _0_11, _0_16, _0_12_isSet, _0_15_isSet, value, _null = null, - _s32_ = " can't be used in a calculation."; - $label0$0: { - if (arg instanceof A.SassNumber0 || arg instanceof A.CalculationOperation0) { - t1 = arg; - break $label0$0; - } - if (arg instanceof A.CalculationInterpolation) { - t1 = new A.SassString0("(" + arg._calculation0$_value + ")", false); - break $label0$0; - } - t1 = arg instanceof A.SassString0; - t2 = _null; - if (t1 && !arg._string0$_hasQuotes) { - t1 = arg; - break $label0$0; - } - if (t1) - A.throwExpression(A.SassScriptException$0("Quoted string " + arg.toString$0(0) + _s32_, _null)); - _0_11_isSet = arg instanceof A.SassCalculation0; - _0_15 = _null; - _0_12 = _null; - _0_16_isSet = false; - text = _null; - t1 = false; - if (_0_11_isSet) { - _0_11 = "calc" === arg.name; - if (_0_11) { - _0_12 = arg.$arguments; - _0_15 = _0_12.length === 1; - _0_16_isSet = _0_15; - if (_0_16_isSet) { - _0_16 = _0_12[0]; - t2 = _0_16; - if (t2 instanceof A.SassString0) { - type$.SassString_2._as(_0_16); - if (!_0_16._string0$_hasQuotes) { - text = _0_16._string0$_text; - t1 = A.SassCalculation__needsParentheses0(text); - } - } - } else - _0_16 = t2; - } else - _0_16 = t2; - _0_12_isSet = _0_11; - _0_15_isSet = _0_12_isSet; - } else { - _0_16 = t2; - _0_11 = _null; - _0_15_isSet = false; - _0_12_isSet = false; - } - if (t1) { - t1 = new A.SassString0("(" + A.S(text) + ")", false); - break $label0$0; - } - t1 = false; - if (_0_11_isSet) - if (_0_11) - if (_0_15_isSet) - t1 = _0_15; - else { - if (_0_12_isSet) - t1 = _0_12; - else { - _0_12 = arg.$arguments; - t1 = _0_12; - _0_12_isSet = true; - } - _0_15 = t1.length === 1; - t1 = _0_15; - } - if (t1) { - if (_0_16_isSet) - value = _0_16; - else { - _0_16 = (_0_12_isSet ? _0_12 : arg.$arguments)[0]; - value = _0_16; - } - t1 = value; - break $label0$0; - } - if (_0_11_isSet) { - t1 = arg; - break $label0$0; - } - if (arg instanceof A.Value0) - A.throwExpression(A.SassScriptException$0("Value " + arg.toString$0(0) + _s32_, _null)); - t1 = A.throwExpression(A.ArgumentError$("Unexpected calculation argument " + A.S(arg) + ".", _null)); - } - return t1; - }, - SassCalculation__needsParentheses0(text) { - var t1, couldBeVar, second, third, fourth, i, t2, - first = text.charCodeAt(0); - if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47 || first === 42) - return true; - t1 = text.length; - couldBeVar = t1 >= 4 && A.characterEqualsIgnoreCase0(first, 118); - if (t1 < 2) - return false; - second = text.charCodeAt(1); - if (second === 32 || second === 9 || second === 10 || second === 13 || second === 12 || second === 47 || second === 42) - return true; - couldBeVar = couldBeVar && A.characterEqualsIgnoreCase0(second, 97); - if (t1 < 3) - return false; - third = text.charCodeAt(2); - if (third === 32 || third === 9 || third === 10 || third === 13 || third === 12 || third === 47 || third === 42) - return true; - couldBeVar = couldBeVar && A.characterEqualsIgnoreCase0(third, 114); - if (t1 < 4) - return false; - fourth = text.charCodeAt(3); - if (couldBeVar && fourth === 40) - return true; - if (fourth === 32 || fourth === 9 || fourth === 10 || fourth === 13 || fourth === 12 || fourth === 47 || fourth === 42) - return true; - for (i = 4; i < t1; ++i) { - t2 = text.charCodeAt(i); - if (t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || t2 === 47 || t2 === 42) - return true; - } - return false; - }, - SassCalculation__verifyCompatibleNumbers0(args) { - var t1, _i, t2, arg, i, number1, j, number2; - for (t1 = args.length, _i = 0; t2 = args.length, _i < t2; args.length === t1 || (0, A.throwConcurrentModificationError)(args), ++_i) { - arg = args[_i]; - if (arg instanceof A.SassNumber0 && arg.get$hasComplexUnits()) - throw A.wrapException(A.SassScriptException$0("Number " + A.S(arg) + " isn't compatible with CSS calculations.", null)); - } - for (t1 = t2, i = 0; i < t1 - 1; ++i) { - number1 = args[i]; - if (!(number1 instanceof A.SassNumber0)) - continue; - for (j = i + 1; t1 = args.length, j < t1; ++j) { - number2 = args[j]; - if (!(number2 instanceof A.SassNumber0)) - continue; - if (number1.hasPossiblyCompatibleUnits$1(number2)) - continue; - throw A.wrapException(A.SassScriptException$0(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", null)); - } - } - }, - SassCalculation__verifyLength0(args, expectedLength) { - var t1; - if (args.length === expectedLength) - return; - if (B.JSArray_methods.any$1(args, new A.SassCalculation__verifyLength_closure0())) - return; - t1 = args.length; - throw A.wrapException(A.SassScriptException$0("" + expectedLength + " arguments required, but only " + t1 + " " + A.pluralize0("was", t1, "were") + " passed.", null)); - }, - SassCalculation__singleArgument0($name, argument, mathFunc, forbidUnits) { - argument = A.SassCalculation__simplify0(argument); - if (!(argument instanceof A.SassNumber0)) - return new A.SassCalculation0($name, A._setArrayType([argument], type$.JSArray_Object)); - if (forbidUnits) - argument.assertNoUnits$0(); - return mathFunc.call$1(argument); - }, - SassCalculation0: function SassCalculation0(t0, t1) { - this.name = t0; - this.$arguments = t1; - }, - SassCalculation__verifyLength_closure0: function SassCalculation__verifyLength_closure0() { - }, - CalculationOperation0: function CalculationOperation0(t0, t1, t2) { - this._calculation0$_operator = t0; - this._calculation0$_left = t1; - this._calculation0$_right = t2; - }, - CalculationOperator0: function CalculationOperator0(t0, t1, t2, t3) { - var _ = this; - _.name = t0; - _.operator = t1; - _.precedence = t2; - _._name = t3; - }, - CalculationInterpolation: function CalculationInterpolation(t0) { - this._calculation0$_value = t0; - }, - CallableDeclaration0: function CallableDeclaration0() { - }, - updateCanonicalizeContextPrototype() { - var t1 = type$.JSClass._as(new A.CanonicalizeContext0(false, null).constructor); - A.LinkedHashMap_LinkedHashMap$_literal(["fromImport", new A.updateCanonicalizeContextPrototype_closure(), "containingUrl", new A.updateCanonicalizeContextPrototype_closure0()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(t1)); - return null; - }, - updateCanonicalizeContextPrototype_closure: function updateCanonicalizeContextPrototype_closure() { - }, - updateCanonicalizeContextPrototype_closure0: function updateCanonicalizeContextPrototype_closure0() { - }, - CanonicalizeContext0: function CanonicalizeContext0(t0, t1) { - this._canonicalize_context$_fromImport = t0; - this._canonicalize_context$_containingUrl = t1; - this._canonicalize_context$_wasContainingUrlAccessed = false; - }, - ColorChannel0: function ColorChannel0(t0, t1, t2) { - this.name = t0; - this.isPolarAngle = t1; - this.associatedUnit = t2; - }, - LinearChannel0: function LinearChannel0(t0, t1, t2, t3, t4, t5, t6, t7) { - var _ = this; - _.min = t0; - _.max = t1; - _.requiresPercent = t2; - _.lowerClamped = t3; - _.upperClamped = t4; - _.name = t5; - _.isPolarAngle = t6; - _.associatedUnit = t7; - }, - Chokidar0: function Chokidar0() { - }, - ChokidarOptions0: function ChokidarOptions0() { - }, - ChokidarWatcher0: function ChokidarWatcher0() { - }, - ClassSelector0: function ClassSelector0(t0, t1) { - this.name = t0; - this.span = t1; - }, - ClipGamutMap0: function ClipGamutMap0(t0) { - this.name = t0; - }, - cloneCssStylesheet0(stylesheet, extensionStore) { - var _0_0 = extensionStore.clone$0(); - return new A._Record_2(new A._CloneCssVisitor0(_0_0._1)._clone_css$_visitChildren$2(A.ModifiableCssStylesheet$0(stylesheet.get$span(stylesheet)), stylesheet), _0_0._0); - }, - _CloneCssVisitor0: function _CloneCssVisitor0(t0) { - this._clone_css$_oldToNewSelectors = t0; - }, - ColorExpression0: function ColorExpression0(t0, t1) { - this.value = t0; - this.span = t1; - }, - _invert0($arguments, global) { - var t2, color, rgb, channel2, space, weight, inSpace, t3, _1_9, channel0, channel1, t4, _s6_ = "weight", _s5_ = "space", - t1 = J.getInterceptor$asx($arguments), - weightNumber = t1.$index($arguments, 1).assertNumber$1(_s6_); - if (!(t1.$index($arguments, 0) instanceof A.SassNumber0)) - t2 = global && t1.$index($arguments, 0).get$isSpecialNumber(); - else - t2 = true; - if (t2) { - if (weightNumber._number1$_value !== 100 || !weightNumber.hasUnit$1("%")) - throw A.wrapException(string$.Only_oa); - return A._functionString0("invert", t1.take$1($arguments, 1)); - } - color = t1.$index($arguments, 0).assertColor$1("color"); - if (J.$eq$(t1.$index($arguments, 2), B.C__SassNull0)) { - t1 = color._color0$_space; - if (!t1.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0(string$.To_usei + color.toString$0(0) + ", you must provide a $space.", "color")); - A._checkPercent0(weightNumber, _s6_); - rgb = color.toSpace$1(B.RgbColorSpace_mlz0); - channel2 = B.LinearChannel_Npb0; - return A._mixLegacy0(A.SassColor_SassColor$rgbInternal0(A._invertChannel0(rgb, B.LinearChannel_bdu0, rgb.channel0OrNull), A._invertChannel0(rgb, B.LinearChannel_kUZ0, rgb.channel1OrNull), A._invertChannel0(rgb, channel2, rgb.channel2OrNull), color.alphaOrNull, null), color, weightNumber).toSpace$1(t1); - } - t1 = t1.$index($arguments, 2).assertString$1(_s5_); - t1.assertUnquoted$1(_s5_); - space = A.ColorSpace_fromName0(t1._string0$_text, _s5_); - weight = weightNumber.valueInRangeWithUnit$4(0, 100, _s6_, "%") / 100; - if (A.fuzzyEquals0(weight, 0)) - return color; - inSpace = color.toSpace$1(space); - $label0$0: { - if (B.HwbColorSpace_06z0 === space) { - t1 = A._invertChannel0(inSpace, space._space$_channels[0], inSpace.channel0OrNull); - t2 = inSpace.alphaOrNull; - if (t2 == null) - t2 = 0; - t2 = A.SassColor_SassColor$hwb0(t1, inSpace.channel2OrNull, inSpace.channel1OrNull, t2); - t1 = t2; - break $label0$0; - } - if (B.HslColorSpace_gsm0 === space || B.LchColorSpace_wv80 === space || B.OklchColorSpace_li80 === space) { - t1 = space._space$_channels; - t2 = A._invertChannel0(inSpace, t1[0], inSpace.channel0OrNull); - t1 = A._invertChannel0(inSpace, t1[2], inSpace.channel2OrNull); - t3 = inSpace.alphaOrNull; - if (t3 == null) - t3 = 0; - t3 = A.SassColor_SassColor$forSpaceInternal0(space, t2, inSpace.channel1OrNull, t1, t3); - t1 = t3; - break $label0$0; - } - _1_9 = space._space$_channels; - channel0 = _1_9[0]; - channel1 = _1_9[1]; - channel2 = _1_9[2]; - t1 = A._invertChannel0(inSpace, channel0, inSpace.channel0OrNull); - t2 = A._invertChannel0(inSpace, channel1, inSpace.channel1OrNull); - t3 = A._invertChannel0(inSpace, channel2, inSpace.channel2OrNull); - t4 = inSpace.alphaOrNull; - t1 = A.SassColor_SassColor$forSpaceInternal0(space, t1, t2, t3, t4 == null ? 0 : t4); - break $label0$0; - } - return A.fuzzyEquals0(weight, 1) ? t1.toSpace$2$legacyMissing(color._color0$_space, false) : color.interpolate$4$legacyMissing$weight(t1, A.InterpolationMethod$0(space, null), false, 1 - weight); - }, - _invertChannel0(color, channel, value) { - var _0_2_isSet, _0_2, t1; - if (value == null) - A._missingChannelError0(color, channel.name); - $label0$0: { - _0_2_isSet = channel instanceof A.LinearChannel0; - if (_0_2_isSet) { - _0_2 = channel.min; - t1 = _0_2 < 0; - } else { - _0_2 = null; - t1 = false; - } - if (t1) { - t1 = -value; - break $label0$0; - } - if (_0_2_isSet) - t1 = 0 === _0_2; - else - t1 = false; - if (t1) { - t1 = channel.max - value; - break $label0$0; - } - if (channel.isPolarAngle) { - t1 = B.JSNumber_methods.$mod(value + 180, 360); - break $label0$0; - } - t1 = A.throwExpression(A.UnsupportedError$("Unknown channel " + channel.toString$0(0) + ".")); - } - return t1; - }, - _grayscale0(colorArg) { - var hsl, t2, oklch, - color = colorArg.assertColor$1("color"), - t1 = color._color0$_space; - if (t1.get$isLegacyInternal()) { - hsl = color.toSpace$1(B.HslColorSpace_gsm0); - t2 = hsl.alphaOrNull; - if (t2 == null) - t2 = 0; - return A.SassColor_SassColor$hsl0(hsl.channel0OrNull, 0, hsl.channel2OrNull, t2).toSpace$2$legacyMissing(t1, false); - } else { - oklch = color.toSpace$1(B.OklchColorSpace_li80); - t2 = oklch.alphaOrNull; - if (t2 == null) - t2 = 0; - return A.SassColor_SassColor$forSpaceInternal0(B.OklchColorSpace_li80, oklch.channel0OrNull, 0, oklch.channel2OrNull, t2).toSpace$1(t1); - } - }, - _updateComponents0($arguments, adjust, change, scale) { - var t2, t3, keywords, originalColor, spaceKeyword, alphaArg, color, channelArgs, channelInfo, t4, value, channelIndex, result, i, alphaNumber, _null = null, _s5_ = "space", - t1 = J.getInterceptor$asx($arguments), - argumentList = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); - if (argumentList._list1$_contents.length !== 0) - throw A.wrapException(A.SassScriptException$0(string$.Only_op, _null)); - argumentList._argument_list$_wereKeywordsAccessed = true; - t2 = type$.String; - t3 = type$.Value_2; - keywords = A.LinkedHashMap_LinkedHashMap$of(argumentList._argument_list$_keywords, t2, t3); - originalColor = t1.$index($arguments, 0).assertColor$1("color"); - t1 = keywords.remove$1(0, _s5_); - spaceKeyword = t1 == null ? _null : t1.assertString$1(_s5_); - if (spaceKeyword == null) - spaceKeyword = _null; - else - spaceKeyword.assertUnquoted$1(_s5_); - alphaArg = keywords.remove$1(0, "alpha"); - t1 = spaceKeyword == null; - if (t1 && originalColor._color0$_space.get$isLegacyInternal() && keywords.__js_helper$_length !== 0) { - t1 = A.NullableExtension_andThen0(A._sniffLegacyColorSpace0(keywords), new A._updateComponents_closure1(originalColor)); - color = t1 == null ? originalColor : t1; - } else - color = A._colorInSpace0(originalColor, t1 ? B.C__SassNull0 : spaceKeyword, true); - channelArgs = A.List_List$filled(color.get$channels().length, _null, false, type$.nullable_Value_2); - t1 = color._color0$_space; - channelInfo = t1._space$_channels; - for (t2 = A.MapExtensions_get_pairs0(keywords, t2, t3), t2 = t2.get$iterator(t2); t2.moveNext$0();) { - t3 = {}; - t4 = t2.get$current(t2); - t3.name = null; - t3.name = t4._0; - value = t4._1; - channelIndex = B.JSArray_methods.indexWhere$1(channelInfo, new A._updateComponents_closure2(t3)); - if (channelIndex === -1) - throw A.wrapException(A.SassScriptException$0("Color space " + t1.toString$0(0) + " doesn't have a channel with this name.", t3.name)); - channelArgs[channelIndex] = value; - } - if (change) - result = A._changeColor0(color, channelArgs, alphaArg); - else { - t2 = A._setArrayType([], type$.JSArray_nullable_SassNumber_2); - for (i = 0; i < 3; ++i) { - t3 = channelArgs[i]; - t2.push(t3 == null ? _null : t3.assertNumber$1(channelInfo[i].name)); - } - alphaNumber = alphaArg == null ? _null : alphaArg.assertNumber$1("alpha"); - result = scale ? A.SassColor_SassColor$forSpaceInternal0(t1, A._scaleChannel0(color, channelInfo[0], color.channel0OrNull, t2[0]), A._scaleChannel0(color, channelInfo[1], color.channel1OrNull, t2[1]), A._scaleChannel0(color, channelInfo[2], color.channel2OrNull, t2[2]), A._scaleChannel0(color, B.LinearChannel_omH0, color.alphaOrNull, alphaNumber)) : A._adjustColor0(color, t2, alphaNumber); - } - return result.toSpace$2$legacyMissing(originalColor._color0$_space, false); - }, - _changeColor0(color, channelArgs, alphaArg) { - var t4, _s5_ = "alpha", - t1 = A._channelForChange0(channelArgs[0], color, 0), - t2 = A._channelForChange0(channelArgs[1], color, 1), - t3 = A._channelForChange0(channelArgs[2], color, 2); - $label0$0: { - if (alphaArg == null) { - t4 = color.alphaOrNull; - if (t4 == null) - t4 = 0; - break $label0$0; - } - t4 = A._isNone0(alphaArg); - if (t4) { - t4 = null; - break $label0$0; - } - t4 = alphaArg instanceof A.SassNumber0; - if (t4 && !alphaArg.get$hasUnits()) { - t4 = alphaArg.valueInRange$3(0, 1, _s5_); - break $label0$0; - } - if (t4 && alphaArg.hasUnit$1("%")) { - t4 = alphaArg.valueInRangeWithUnit$4(0, 100, _s5_, "%") / 100; - break $label0$0; - } - if (t4) { - t4 = new A._changeColor_closure0(alphaArg).call$0(); - break $label0$0; - } - t4 = A.throwExpression(A.SassScriptException$0(alphaArg.toString$0(0) + ' is not a number or unquoted "none".', _s5_)); - } - return A._colorFromChannels0(color._color0$_space, t1, t2, t3, t4, false, false); - }, - _channelForChange0(channelArg, color, channel) { - var _0_0, t1, t2; - if (channelArg == null) { - _0_0 = color.get$channelsOrNull()[channel]; - $label0$0: { - if (_0_0 != null) { - t1 = color._color0$_space; - t2 = A.SassNumber_SassNumber0(_0_0, (t1 === B.HslColorSpace_gsm0 || t1 === B.HwbColorSpace_06z0) && channel > 0 ? "%" : null); - t1 = t2; - break $label0$0; - } - t1 = null; - break $label0$0; - } - return t1; - } - if (A._isNone0(channelArg)) - return null; - if (channelArg instanceof A.SassNumber0) - return channelArg; - throw A.wrapException(A.SassScriptException$0(channelArg.toString$0(0) + ' is not a number or unquoted "none".', color._color0$_space._space$_channels[channel].name)); - }, - _scaleChannel0(color, channel, oldValue, factorArg) { - var t1, factor; - if (factorArg == null) - return oldValue; - if (!(channel instanceof A.LinearChannel0)) - throw A.wrapException(A.SassScriptException$0("Channel isn't scalable.", channel.name)); - if (oldValue == null) - A._missingChannelError0(color, channel.name); - t1 = channel.name; - factorArg.assertUnit$2("%", t1); - factor = factorArg.valueInRangeWithUnit$4(-100, 100, t1, "%") / 100; - $label0$0: { - if (0 === factor) { - t1 = oldValue; - break $label0$0; - } - if (factor > 0) { - t1 = channel.max; - t1 = oldValue >= t1 ? oldValue : oldValue + (t1 - oldValue) * factor; - break $label0$0; - } - t1 = channel.min; - t1 = oldValue <= t1 ? oldValue : oldValue + (oldValue - t1) * factor; - break $label0$0; - } - return t1; - }, - _adjustColor0(color, channelArgs, alphaArg) { - var t1 = color._color0$_space, - t2 = t1._space$_channels; - return A.SassColor_SassColor$forSpaceInternal0(t1, A._adjustChannel0(color, t2[0], color.channel0OrNull, channelArgs[0]), A._adjustChannel0(color, t2[1], color.channel1OrNull, channelArgs[1]), A._adjustChannel0(color, t2[2], color.channel2OrNull, channelArgs[2]), A.NullableExtension_andThen0(A._adjustChannel0(color, B.LinearChannel_omH0, color.alphaOrNull, alphaArg), new A._adjustColor_closure0())); - }, - _adjustChannel0(color, channel, oldValue, adjustmentArg) { - var _0_1, _0_3, t1, _0_6_isSet, _0_6, _0_6_isSet0, t2, _0_11, result, min, max, _null = null; - if (adjustmentArg == null) - return oldValue; - if (oldValue == null) - A._missingChannelError0(color, channel.name); - $label0$0: { - _0_1 = color._color0$_space; - _0_3 = B.HslColorSpace_gsm0 === _0_1; - t1 = _0_3; - if (!t1) - _0_6_isSet = B.HwbColorSpace_06z0 === _0_1; - else - _0_6_isSet = true; - if (_0_6_isSet) { - t1 = channel.isPolarAngle; - _0_6 = channel; - } else { - _0_6 = _null; - t1 = false; - } - if (t1) { - adjustmentArg = A.SassNumber_SassNumber0(A._angleValue0(adjustmentArg, "hue"), _null); - break $label0$0; - } - t1 = false; - if (_0_3) { - _0_6_isSet0 = true; - if (_0_6_isSet) - t2 = _0_6; - else { - t2 = channel; - _0_6_isSet = _0_6_isSet0; - _0_6 = t2; - } - if (t2 instanceof A.LinearChannel0) { - if (_0_6_isSet) - t1 = _0_6; - else { - t1 = channel; - _0_6_isSet = _0_6_isSet0; - _0_6 = t1; - } - _0_11 = type$.LinearChannel_2._as(t1).name; - t1 = _0_11; - if ("saturation" !== t1) - t1 = "lightness" === _0_11; - else - t1 = true; - } - } - if (t1) { - A._checkPercent0(adjustmentArg, channel.name); - adjustmentArg = A.SassNumber_SassNumber0(adjustmentArg._number1$_value, "%"); - break $label0$0; - } - if (B.LinearChannel_omH0 === (_0_6_isSet ? _0_6 : channel) && adjustmentArg.get$hasUnits()) { - A.warnForDeprecation0("$alpha: Passing a number with unit " + adjustmentArg.get$unitString() + string$.x20is_de + adjustmentArg.unitSuggestion$1("alpha") + string$.x0a_Morex3af, B.Deprecation_jV0); - adjustmentArg = A.SassNumber_SassNumber0(adjustmentArg._number1$_value, _null); - } - } - t1 = A._channelFromValue0(channel, adjustmentArg, false); - t1.toString; - result = oldValue + t1; - $label1$1: { - t1 = channel instanceof A.LinearChannel0; - min = _null; - t2 = false; - if (t1) - if (channel.lowerClamped) { - min = channel.min; - t2 = result < min; - } - if (t2) { - t1 = oldValue < min ? Math.max(oldValue, result) : min; - break $label1$1; - } - max = _null; - t2 = false; - if (t1) - if (channel.upperClamped) { - max = channel.max; - t1 = result > max; - } else - t1 = t2; - else - t1 = t2; - if (t1) { - t1 = oldValue > max ? Math.min(oldValue, result) : max; - break $label1$1; - } - t1 = result; - break $label1$1; - } - return t1; - }, - _sniffLegacyColorSpace0(keywords) { - var t1, t2; - for (t1 = A.LinkedHashMapKeyIterator$(keywords, keywords.__js_helper$_modifications); t1.moveNext$0();) { - t2 = t1.__js_helper$_current; - if ("red" === t2 || "green" === t2 || "blue" === t2) - return B.RgbColorSpace_mlz0; - if ("saturation" === t2 || "lightness" === t2) - return B.HslColorSpace_gsm0; - if ("whiteness" === t2 || "blackness" === t2) - return B.HwbColorSpace_06z0; - } - return keywords.containsKey$1("hue") ? B.HslColorSpace_gsm0 : null; - }, - _functionString0($name, $arguments) { - return new A.SassString0($name + "(" + J.map$1$1$ax($arguments, new A._functionString_closure0(), type$.String).join$1(0, ", ") + ")", false); - }, - _removedColorFunction0($name, argument, negative) { - return A.BuiltInCallable$function0($name, "$color, $amount", new A._removedColorFunction_closure0($name, argument, negative), "sass:color"); - }, - _rgb0($name, $arguments) { - var t3, t4, - t1 = J.getInterceptor$asx($arguments), - alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, - t2 = true; - if (!t1.$index($arguments, 0).get$isSpecialNumber()) - if (!t1.$index($arguments, 1).get$isSpecialNumber()) - if (!t1.$index($arguments, 2).get$isSpecialNumber()) { - t2 = alpha == null ? null : alpha.get$isSpecialNumber(); - t2 = t2 === true; - } - if (t2) - return A._functionString0($name, $arguments); - t2 = t1.$index($arguments, 0).assertNumber$1("red"); - t3 = t1.$index($arguments, 1).assertNumber$1("green"); - t1 = t1.$index($arguments, 2).assertNumber$1("blue"); - t4 = A.NullableExtension_andThen0(alpha, new A._rgb_closure0()); - return A._colorFromChannels0(B.RgbColorSpace_mlz0, t2, t3, t1, t4 == null ? 1 : t4, true, true); - }, - _rgbTwoArg0($name, $arguments) { - var t2, color, - t1 = J.getInterceptor$asx($arguments), - first = t1.$index($arguments, 0), - second = t1.$index($arguments, 1); - if (!first.get$isVar()) - t2 = !(first instanceof A.SassColor0) && second.get$isVar(); - else - t2 = true; - if (t2) - return A._functionString0($name, $arguments); - color = first.assertColor$1("color"); - if (!color._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0("Expected " + color.toString$0(0) + string$.x20to_be_ + color.toString$0(0) + ", $alpha: " + second.toString$0(0) + ")", $name)); - color.assertLegacy$1("color"); - color = color.toSpace$1(B.RgbColorSpace_mlz0); - if (second.get$isSpecialNumber()) - return A._functionString0($name, A._setArrayType([A.SassNumber_SassNumber0(color.channel$1(0, "red"), null), A.SassNumber_SassNumber0(color.channel$1(0, "green"), null), A.SassNumber_SassNumber0(color.channel$1(0, "blue"), null), t1.$index($arguments, 1)], type$.JSArray_Value_2)); - t1 = A._percentageOrUnitless0(t1.$index($arguments, 1).assertNumber$1("alpha"), 1, "alpha"); - return color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); - }, - _hsl0($name, $arguments) { - var t3, t4, - t1 = J.getInterceptor$asx($arguments), - alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, - t2 = true; - if (!t1.$index($arguments, 0).get$isSpecialNumber()) - if (!t1.$index($arguments, 1).get$isSpecialNumber()) - if (!t1.$index($arguments, 2).get$isSpecialNumber()) { - t2 = alpha == null ? null : alpha.get$isSpecialNumber(); - t2 = t2 === true; - } - if (t2) - return A._functionString0($name, $arguments); - t2 = t1.$index($arguments, 0).assertNumber$1("hue"); - t3 = t1.$index($arguments, 1).assertNumber$1("saturation"); - t1 = t1.$index($arguments, 2).assertNumber$1("lightness"); - t4 = A.NullableExtension_andThen0(alpha, new A._hsl_closure0()); - return A._colorFromChannels0(B.HslColorSpace_gsm0, t2, t3, t1, t4 == null ? 1 : t4, true, false); - }, - _angleValue0(angleValue, $name) { - var angle = angleValue.assertNumber$1($name); - if (angle.compatibleWithUnit$1("deg")) - return angle.coerceValueToUnit$1("deg"); - A.warnForDeprecation0("$" + $name + ": Passing a unit other than deg (" + angle.toString$0(0) + string$.x29x20is_d + angle.unitSuggestion$1($name) + string$.x0a_See_, B.Deprecation_jV0); - return angle._number1$_value; - }, - _checkPercent0(number, $name) { - if (number.hasUnit$1("%")) - return; - A.warnForDeprecation0("$" + $name + ": Passing a number without unit % (" + number.toString$0(0) + string$.x29x20is_d + number.unitSuggestion$2($name, "%") + string$.x0a_Morex3af, B.Deprecation_jV0); - }, - _percentageOrUnitless0(number, max, $name) { - var value; - if (!number.get$hasUnits()) - value = number._number1$_value; - else if (number.hasUnit$1("%")) - value = max * number._number1$_value / 100; - else - throw A.wrapException(A.SassScriptException$0("Expected " + number.toString$0(0) + ' to have unit "%" or no units.', $name)); - return value; - }, - _mixLegacy0(color1, color2, weight) { - var t2, alphaDistance, weight1, weight2, t3, t4, t5, t6, t7, t8, - rgb1 = color1.toSpace$1(B.RgbColorSpace_mlz0), - rgb2 = color2.toSpace$1(B.RgbColorSpace_mlz0), - weightScale = weight.valueInRange$3(0, 100, "weight") / 100, - normalizedWeight = weightScale * 2 - 1, - t1 = color1.alphaOrNull; - if (t1 == null) - t1 = 0; - t2 = color2.alphaOrNull; - alphaDistance = t1 - (t2 == null ? 0 : t2); - t1 = normalizedWeight * alphaDistance; - weight1 = ((t1 === -1 ? normalizedWeight : (normalizedWeight + alphaDistance) / (1 + t1)) + 1) / 2; - weight2 = 1 - weight1; - t1 = rgb1.channel0OrNull; - if (t1 == null) - t1 = 0; - t2 = rgb2.channel0OrNull; - if (t2 == null) - t2 = 0; - t3 = rgb1.channel1OrNull; - if (t3 == null) - t3 = 0; - t4 = rgb2.channel1OrNull; - if (t4 == null) - t4 = 0; - t5 = rgb1.channel2OrNull; - if (t5 == null) - t5 = 0; - t6 = rgb2.channel2OrNull; - if (t6 == null) - t6 = 0; - t7 = rgb1.alphaOrNull; - if (t7 == null) - t7 = 0; - t8 = rgb2.alphaOrNull; - if (t8 == null) - t8 = 0; - return A.SassColor_SassColor$rgbInternal0(t1 * weight1 + t2 * weight2, t3 * weight1 + t4 * weight2, t5 * weight1 + t6 * weight2, t7 * weightScale + t8 * (1 - weightScale), null); - }, - _opacify0($name, $arguments) { - var result, - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - amount = t1.$index($arguments, 1).assertNumber$1("amount"); - if (!color._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0($name + string$.x28__is_oa, null)); - t1 = color.alphaOrNull; - if (t1 == null) - t1 = 0; - t1 += amount.valueInRangeWithUnit$4(0, 1, "amount", ""); - result = color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); - A.warnForDeprecation0($name + "() is deprecated. " + A._suggestScaleAndAdjust0(color, amount._number1$_value, "alpha") + string$.x0a_Morex3ac, B.Deprecation_rb9); - return result; - }, - _transparentize0($name, $arguments) { - var result, - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - amount = t1.$index($arguments, 1).assertNumber$1("amount"); - if (!color._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0($name + string$.x28__is_oa, null)); - t1 = color.alphaOrNull; - if (t1 == null) - t1 = 0; - t1 -= amount.valueInRangeWithUnit$4(0, 1, "amount", ""); - result = color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); - A.warnForDeprecation0($name + "() is deprecated. " + A._suggestScaleAndAdjust0(color, -amount._number1$_value, "alpha") + string$.x0a_Morex3ac, B.Deprecation_rb9); - return result; - }, - _colorInSpace0(colorUntyped, spaceUntyped, legacyMissing) { - var t1, _s5_ = "space", - color = colorUntyped.assertColor$1("color"); - if (spaceUntyped.$eq(0, B.C__SassNull0)) - return color; - t1 = spaceUntyped.assertString$1(_s5_); - t1.assertUnquoted$1(_s5_); - return color.toSpace$2$legacyMissing(A.ColorSpace_fromName0(t1._string0$_text, _s5_), legacyMissing); - }, - _parseChannels0(functionName, input, $name, space) { - var parsedSlash, components, alphaValue, _2_0, _2_1, _2_5, t1, _2_6, t2, _2_60, t3, channels, first, rest, componentList, spaceName, i, channel, channelName, t4, _null = null; - if (input.get$isVar()) - return A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); - parsedSlash = A._parseSlashChannels0(input, $name); - if (parsedSlash == null) - return A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); - components = parsedSlash._0; - alphaValue = parsedSlash._1; - $label0$0: { - _2_0 = components.assertCommonListStyle$2$allowSlash($name, false); - _2_1 = _2_0.length; - if (_2_1 <= 0) - throw A.wrapException(A.SassScriptException$0("Color component list may not be empty.", $name)); - _2_5 = _2_1 >= 1; - t1 = _2_5; - _2_6 = _null; - t2 = false; - if (t1) { - _2_60 = _2_0[0]; - t3 = _2_60; - _2_6 = t3; - if (t3 instanceof A.SassString0) { - type$.SassString_2._as(_2_6); - t2 = !_2_6._string0$_hasQuotes && _2_6._string0$_text.toLowerCase() === "from"; - } - } - if (t2) - return A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); - t2 = components.get$isVar(); - if (t2) { - channels = A._setArrayType([components], type$.JSArray_Value_2); - break $label0$0; - } - channels = _null; - if (_2_5) { - first = t1 ? _2_6 : _2_0[0]; - rest = B.JSArray_methods.sublist$1(_2_0, 1); - componentList = _2_0; - } else { - componentList = channels; - rest = componentList; - first = _null; - } - if (_2_5) { - if (space == null) { - spaceName = first.assertString$1($name); - spaceName.assertUnquoted$1($name); - space = spaceName.get$isVar() ? _null : A.ColorSpace_fromName0(spaceName._string0$_text, $name); - if (B.RgbColorSpace_mlz0 === space || B.HslColorSpace_gsm0 === space || B.HwbColorSpace_06z0 === space || B.LabColorSpace_IF20 === space || B.LchColorSpace_wv80 === space || B.OklabColorSpace_yrt0 === space || B.OklchColorSpace_li80 === space) - throw A.wrapException(A.SassScriptException$0(string$.The_co + A.S(space) + ". Use the " + A.S(space) + "() function instead.", $name)); - channels = rest; - } else - channels = componentList; - for (i = 0; i < channels.length; ++i) { - channel = channels[i]; - t1 = false; - if (!channel.get$isSpecialNumber()) - if (!(channel instanceof A.SassNumber0)) - t1 = !(channel instanceof A.SassString0 && !channel._string0$_hasQuotes && channel._string0$_text.toLowerCase() === "none"); - if (t1) { - t1 = _null; - if (space == null) - channelName = t1; - else { - t2 = space._space$_channels; - t2 = i < 3 ? t2[i] : _null; - if (!(t2 == null)) - t1 = new A._parseChannels_closure1().call$1(t2.name); - channelName = t1; - } - if (channelName == null) - channelName = "channel " + (i + 1); - throw A.wrapException(A.SassScriptException$0("Expected " + channelName + " to be a number, was " + channel.toString$0(0) + ".", $name)); - } - } - break $label0$0; - } - throw A.wrapException("unreachable"); - } - t1 = alphaValue == null; - t2 = t1 ? _null : alphaValue.get$isSpecialNumber(); - if (t2 === true) { - if (channels.length === 3 && B.Set_2Dcfy0.contains$1(0, space)) { - t1 = A.List_List$of(channels, true, type$.Value_2); - alphaValue.toString; - t1.push(alphaValue); - t1 = A._functionString0(functionName, t1); - } else - t1 = A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); - return t1; - } - $label1$1: { - if (t1) { - t2 = 1; - break $label1$1; - } - if (alphaValue instanceof A.SassString0 && !alphaValue._string0$_hasQuotes && "none" === alphaValue._string0$_text) { - t2 = _null; - break $label1$1; - } - t2 = A._percentageOrUnitless0(alphaValue.assertNumber$1($name), 1, "alpha"); - t2 = isNaN(t2) ? 0 : B.JSNumber_methods.clamp$2(t2, 0, 1); - break $label1$1; - } - if (space == null) - return A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); - if (B.JSArray_methods.any$1(channels, new A._parseChannels_closure2())) { - if (channels.length === 3 && B.Set_2Dcfy0.contains$1(0, space)) { - t2 = A.List_List$of(channels, true, type$.Value_2); - if (!t1) - t2.push(alphaValue); - t1 = A._functionString0(functionName, t2); - } else - t1 = A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); - return t1; - } - if (channels.length !== 3) - throw A.wrapException(A.SassScriptException$0("The " + space.toString$0(0) + " color space has 3 channels but " + input.toString$0(0) + " has " + channels.length + ".", $name)); - t1 = channels[0]; - t1 = t1 instanceof A.SassNumber0 ? t1 : _null; - t3 = channels[1]; - t3 = t3 instanceof A.SassNumber0 ? t3 : _null; - t4 = channels[2]; - t4 = t4 instanceof A.SassNumber0 ? t4 : _null; - return A._colorFromChannels0(space, t1, t3, t4, t2, true, space === B.RgbColorSpace_mlz0); - }, - _parseSlashChannels0(input, $name) { - var _1_1, alphaValue, t1, components, _1_7, _1_9_isSet, _1_8, _1_9, initial, t2, _0_0, _0_1, channel3, alpha, _1_16, _1_16_isSet, _1_9_isSet0, t3, _null = null, - _1_0 = input.assertCommonListStyle$2$allowSlash($name, true); - $label0$0: { - _1_1 = _1_0.length; - alphaValue = _null; - t1 = false; - if (_1_1 === 2) { - components = _1_0[0]; - alphaValue = _1_0[1]; - t1 = input.get$separator(input) === B.ListSeparator_cQA0; - } else - components = _null; - if (t1) { - t1 = new A._Record_2(components, alphaValue); - break $label0$0; - } - t1 = input.get$separator(input); - if (t1 === B.ListSeparator_cQA0) { - t1 = _1_0.length; - A.throwExpression(A.SassScriptException$0(string$.Only_2 + t1 + " " + A.pluralize0("was", t1, "were") + " passed.", $name)); - } - _1_7 = _1_1 >= 1; - _1_9_isSet = _1_7; - _1_8 = _null; - _1_9 = _null; - initial = _null; - t1 = false; - if (_1_9_isSet) { - _1_8 = B.JSArray_methods.sublist$2(_1_0, 0, _1_1 - 1); - initial = _1_8; - _1_9 = _1_0[_1_1 - 1]; - t2 = _1_9; - if (t2 instanceof A.SassString0) { - type$.SassString_2._as(_1_9); - t1 = !_1_9._string0$_hasQuotes; - } - } - if (t1) { - if (_1_9_isSet) - t1 = _1_9; - else { - _1_9 = _1_0[_1_1 - 1]; - t1 = _1_9; - } - _0_0 = type$.SassString_2._as(t1)._string0$_text.split("/"); - $label1$1: { - _0_1 = _0_0.length; - if (_0_1 === 1) { - t1 = new A._Record_2(input, _null); - break $label1$1; - } - if (_0_1 === 2) { - channel3 = _0_0[0]; - alpha = _0_0[1]; - t1 = A.List_List$of(initial, true, type$.Value_2); - t1.push(A._parseNumberOrString0(channel3)); - t1 = new A._Record_2(A.SassList$0(t1, B.ListSeparator_nbm0, false), A._parseNumberOrString0(alpha)); - break $label1$1; - } - t1 = _null; - break $label1$1; - } - break $label0$0; - } - _1_16 = _null; - _1_16_isSet = false; - t1 = false; - if (_1_7) { - _1_9_isSet0 = true; - if (_1_9_isSet) - initial = _1_8; - else { - _1_8 = B.JSArray_methods.sublist$2(_1_0, 0, _1_1 - 1); - initial = _1_8; - } - if (_1_9_isSet) - t2 = _1_9; - else { - _1_9 = _1_0[_1_1 - 1]; - t2 = _1_9; - _1_9_isSet = _1_9_isSet0; - } - _1_16_isSet = t2 instanceof A.SassNumber0; - if (_1_16_isSet) { - if (_1_9_isSet) - t1 = _1_9; - else { - _1_9 = _1_0[_1_1 - 1]; - t1 = _1_9; - _1_9_isSet = _1_9_isSet0; - } - _1_16 = type$.SassNumber_2._as(t1).asSlash; - t1 = _1_16; - t1 = type$.Record_2_nullable_Object_and_nullable_Object._is(t1); - } - } else - initial = _null; - if (t1) { - if (_1_16_isSet) - t1 = _1_16; - else { - if (_1_9_isSet) - t1 = _1_9; - else { - _1_9 = _1_0[_1_1 - 1]; - t1 = _1_9; - _1_9_isSet = true; - } - _1_16 = type$.SassNumber_2._as(t1).asSlash; - t1 = _1_16; - _1_16_isSet = true; - } - if (t1 == null) - t1 = type$.Record_2_nullable_Object_and_nullable_Object._as(t1); - if (_1_16_isSet) - t2 = _1_16; - else { - if (_1_9_isSet) - t2 = _1_9; - else { - _1_9 = _1_0[_1_1 - 1]; - t2 = _1_9; - } - _1_16 = type$.SassNumber_2._as(t2).asSlash; - t2 = _1_16; - } - if (t2 == null) - t2 = type$.Record_2_nullable_Object_and_nullable_Object._as(t2); - t3 = A.List_List$of(initial, true, type$.Value_2); - t3.push(t1._0); - t2 = new A._Record_2(A.SassList$0(t3, B.ListSeparator_nbm0, false), t2._1); - t1 = t2; - break $label0$0; - } - t1 = new A._Record_2(input, _null); - break $label0$0; - } - return t1; - }, - _parseNumberOrString0(text) { - var t1, expression, exception; - try { - t1 = A.ScssParser$0(text, null); - expression = t1._stylesheet0$_parseSingleProduction$1$1(t1.get$_stylesheet0$_number(), type$.NumberExpression_2); - t1 = A.SassNumber_SassNumber0(expression.value, expression.unit); - return t1; - } catch (exception) { - if (type$.SassFormatException_2._is(A.unwrapException(exception))) - return new A.SassString0(text, false); - else - throw exception; - } - }, - _colorFromChannels0(space, channel0, channel1, channel2, alpha, clamp, fromRgbFunction) { - var t1, t2, whiteness, blackness, t3; - switch (space) { - case B.HslColorSpace_gsm0: - if (channel1 != null) - A._checkPercent0(channel1, "saturation"); - if (channel2 != null) - A._checkPercent0(channel2, "lightness"); - t1 = space._space$_channels; - return A.SassColor_SassColor$hsl0(A.NullableExtension_andThen0(channel0, new A._colorFromChannels_closure1()), A._channelFromValue0(t1[1], A._forcePercent0(channel1), clamp), A._channelFromValue0(t1[2], A._forcePercent0(channel2), clamp), alpha); - case B.HwbColorSpace_06z0: - t1 = channel1 == null; - if (!t1) - channel1.assertUnit$2("%", "whiteness"); - t2 = channel2 == null; - if (!t2) - channel2.assertUnit$2("%", "blackness"); - whiteness = t1 ? null : channel1._number1$_value; - blackness = t2 ? null : channel2._number1$_value; - if (whiteness != null && blackness != null && whiteness + blackness > 100) { - t1 = whiteness + blackness; - whiteness = whiteness / t1 * 100; - blackness = blackness / t1 * 100; - } - return A.SassColor_SassColor$hwb0(A.NullableExtension_andThen0(channel0, new A._colorFromChannels_closure2()), whiteness, blackness, alpha); - case B.RgbColorSpace_mlz0: - t1 = space._space$_channels; - t2 = A._channelFromValue0(t1[0], channel0, clamp); - t3 = A._channelFromValue0(t1[1], channel1, clamp); - t1 = A._channelFromValue0(t1[2], channel2, clamp); - return A.SassColor_SassColor$rgbInternal0(t2, t3, t1, alpha, fromRgbFunction ? B.C__ColorFormatEnum0 : null); - default: - t1 = space._space$_channels; - return A.SassColor_SassColor$forSpaceInternal0(space, A._channelFromValue0(t1[0], channel0, clamp), A._channelFromValue0(t1[1], channel1, clamp), A._channelFromValue0(t1[2], channel2, clamp), alpha); - } - }, - _forcePercent0(number) { - var t1, _0_3; - $label0$0: { - if (number == null) { - t1 = null; - break $label0$0; - } - _0_3 = number.get$numeratorUnits(number); - if (_0_3.length === 1) - t1 = "%" === _0_3[0] && number.get$denominatorUnits(number).length <= 0; - else - t1 = false; - if (t1) { - t1 = number; - break $label0$0; - } - t1 = A.SassNumber_SassNumber0(number._number1$_value, "%"); - break $label0$0; - } - return t1; - }, - _channelFromValue0(channel, value, clamp) { - return A.NullableExtension_andThen0(value, new A._channelFromValue_closure0(channel, clamp)); - }, - _isNone0(value) { - return value instanceof A.SassString0 && !value._string0$_hasQuotes && value._string0$_text.toLowerCase() === "none"; - }, - _channelFunction0($name, space, getter, global, unit) { - return A.BuiltInCallable$function0($name, "$color", new A._channelFunction_closure0(getter, unit, global, $name, space), "sass:color"); - }, - _suggestScaleAndAdjust0(original, adjustment, channelName) { - var t2, oldValue, newValue, factor, t3, suggestion, - channel = channelName === "alpha" ? B.LinearChannel_omH0 : type$.LinearChannel_2._as(B.JSArray_methods.firstWhere$1(B.List_8aB0, new A._suggestScaleAndAdjust_closure0(channelName))), - t1 = channel === B.LinearChannel_omH0; - if (t1) { - t2 = original.alphaOrNull; - oldValue = t2 == null ? 0 : t2; - } else - oldValue = original.toSpace$1(B.HslColorSpace_gsm0).channel$1(0, channelName); - newValue = oldValue + adjustment; - if (adjustment !== 0) { - factor = A._Cell$(); - t2 = channel.max; - if (newValue > t2) - factor.__late_helper$_value = 1; - else { - t3 = channel.min; - if (newValue < t3) - factor.__late_helper$_value = -1; - else if (adjustment > 0) - factor.__late_helper$_value = adjustment / (t2 - oldValue); - else - factor.__late_helper$_value = (newValue - oldValue) / (oldValue - t3); - } - suggestion = "Suggestion" + ("s:\n\ncolor.scale($color, $" + channelName + ": " + A.SassNumber_SassNumber0(factor._readLocal$0() * 100, "%").toString$0(0) + ")\n"); - } else - suggestion = "Suggestion:\n\n"; - return suggestion + ("color.adjust($color, $" + channelName + ": " + A.SassNumber_SassNumber0(adjustment, t1 ? null : "%").toString$0(0) + ")"); - }, - _missingChannelError0(color, channel) { - return A.throwExpression(A.SassScriptException$0(string$.Becaus + color.toString$0(0) + ").", channel)); - }, - _channelName0(value) { - var t1 = value.assertString$1("channel"); - t1.assertQuoted$1("channel"); - return t1._string0$_text; - }, - _function12($name, $arguments, callback) { - return A.BuiltInCallable$function0($name, $arguments, callback, "sass:color"); - }, - global_closure44: function global_closure44() { - }, - global_closure45: function global_closure45() { - }, - global_closure46: function global_closure46() { - }, - global_closure47: function global_closure47() { - }, - global_closure48: function global_closure48() { - }, - global_closure49: function global_closure49() { - }, - global_closure50: function global_closure50() { - }, - global_closure51: function global_closure51() { - }, - global_closure52: function global_closure52() { - }, - global_closure53: function global_closure53() { - }, - global_closure54: function global_closure54() { - }, - global_closure55: function global_closure55() { - }, - global_closure56: function global_closure56() { - }, - global_closure57: function global_closure57() { - }, - global_closure58: function global_closure58() { - }, - global_closure59: function global_closure59() { - }, - global_closure60: function global_closure60() { - }, - global_closure61: function global_closure61() { - }, - global_closure62: function global_closure62() { - }, - global_closure63: function global_closure63() { - }, - global_closure64: function global_closure64() { - }, - global_closure65: function global_closure65() { - }, - global_closure66: function global_closure66() { - }, - global_closure67: function global_closure67() { - }, - global_closure68: function global_closure68() { - }, - global_closure69: function global_closure69() { - }, - global_closure70: function global_closure70() { - }, - global_closure71: function global_closure71() { - }, - global_closure72: function global_closure72() { - }, - global_closure73: function global_closure73() { - }, - global_closure74: function global_closure74() { - }, - global_closure75: function global_closure75() { - }, - global_closure76: function global_closure76() { - }, - global_closure77: function global_closure77() { - }, - global_closure78: function global_closure78() { - }, - global_closure79: function global_closure79() { - }, - global__closure0: function global__closure0() { - }, - global_closure80: function global_closure80() { - }, - global_closure81: function global_closure81() { - }, - global_closure82: function global_closure82() { - }, - global_closure83: function global_closure83() { - }, - global_closure84: function global_closure84() { - }, - global_closure85: function global_closure85() { - }, - global_closure86: function global_closure86() { - }, - module_closure27: function module_closure27() { - }, - module_closure28: function module_closure28() { - }, - module_closure29: function module_closure29() { - }, - module_closure30: function module_closure30() { - }, - module_closure31: function module_closure31() { - }, - module_closure32: function module_closure32() { - }, - module_closure33: function module_closure33() { - }, - module_closure34: function module_closure34() { - }, - module_closure35: function module_closure35() { - }, - module_closure36: function module_closure36() { - }, - module_closure37: function module_closure37() { - }, - module_closure38: function module_closure38() { - }, - module_closure39: function module_closure39() { - }, - module_closure40: function module_closure40() { - }, - module__closure6: function module__closure6() { - }, - module_closure41: function module_closure41() { - }, - module_closure42: function module_closure42() { - }, - module_closure43: function module_closure43() { - }, - module_closure44: function module_closure44() { - }, - module_closure45: function module_closure45() { - }, - module_closure46: function module_closure46() { - }, - module_closure47: function module_closure47() { - }, - module_closure48: function module_closure48() { - }, - module__closure5: function module__closure5(t0) { - this.channelName = t0; - }, - module_closure49: function module_closure49() { - }, - module_closure_toXyzNoMissing0: function module_closure_toXyzNoMissing0() { - }, - module_closure50: function module_closure50() { - }, - _mix_closure0: function _mix_closure0() { - }, - _complement_closure0: function _complement_closure0() { - }, - _adjust_closure0: function _adjust_closure0() { - }, - _scale_closure0: function _scale_closure0() { - }, - _change_closure0: function _change_closure0() { - }, - _ieHexStr_closure0: function _ieHexStr_closure0() { - }, - _ieHexStr_closure_hexString0: function _ieHexStr_closure_hexString0() { - }, - _updateComponents_closure1: function _updateComponents_closure1(t0) { - this.originalColor = t0; - }, - _updateComponents_closure2: function _updateComponents_closure2(t0) { - this._box_0 = t0; - }, - _changeColor_closure0: function _changeColor_closure0(t0) { - this.alphaArg = t0; - }, - _adjustColor_closure0: function _adjustColor_closure0() { - }, - _functionString_closure0: function _functionString_closure0() { - }, - _removedColorFunction_closure0: function _removedColorFunction_closure0(t0, t1, t2) { - this.name = t0; - this.argument = t1; - this.negative = t2; - }, - _rgb_closure0: function _rgb_closure0() { - }, - _hsl_closure0: function _hsl_closure0() { - }, - _parseChannels_closure1: function _parseChannels_closure1() { - }, - _parseChannels_closure2: function _parseChannels_closure2() { - }, - _colorFromChannels_closure1: function _colorFromChannels_closure1() { - }, - _colorFromChannels_closure2: function _colorFromChannels_closure2() { - }, - _channelFromValue_closure0: function _channelFromValue_closure0(t0, t1) { - this.channel = t0; - this.clamp = t1; - }, - _channelFunction_closure0: function _channelFunction_closure0(t0, t1, t2, t3, t4) { - var _ = this; - _.getter = t0; - _.unit = t1; - _.global = t2; - _.name = t3; - _.space = t4; - }, - _suggestScaleAndAdjust_closure0: function _suggestScaleAndAdjust_closure0(t0) { - this.channelName = t0; - }, - _constructionSpace(options) { - var t1 = J.getInterceptor$x(options); - if (t1.get$space(options) != null) { - t1 = t1.get$space(options); - t1.toString; - return A.ColorSpace_fromName0(t1, null); - } - if (t1.get$red(options) != null) - return B.RgbColorSpace_mlz0; - if (t1.get$saturation(options) != null) - return B.HslColorSpace_gsm0; - if (t1.get$whiteness(options) != null) - return B.HwbColorSpace_06z0; - throw A.wrapException("No color space found"); - }, - _toSpace($self, space) { - return $self.toSpace$1(A.ColorSpace_fromName0(space == null ? $self._color0$_space.name : space, null)); - }, - _checkNullAlphaDeprecation(options) { - var t1 = J.getInterceptor$x(options), - t2 = t1.get$alpha(options); - if (!A._asBool($.$get$_isUndefined().call$1(t2)) && t1.get$alpha(options) == null && t1.get$space(options) == null) - A.warnForDeprecationFromApi(string$.Passin_, B.Deprecation_mBb); - }, - colorClass_closure: function colorClass_closure() { - }, - colorClass__closure: function colorClass__closure() { - }, - colorClass__closure0: function colorClass__closure0() { - }, - colorClass__closure1: function colorClass__closure1() { - }, - colorClass__closure2: function colorClass__closure2() { - }, - colorClass__closure3: function colorClass__closure3() { - }, - colorClass__closure4: function colorClass__closure4() { - }, - colorClass__closure5: function colorClass__closure5() { - }, - colorClass__closure6: function colorClass__closure6() { - }, - colorClass__closure7: function colorClass__closure7() { - }, - colorClass__closure8: function colorClass__closure8() { - }, - colorClass___closure: function colorClass___closure(t0) { - this.key = t0; - }, - colorClass__closure_changedValue: function colorClass__closure_changedValue(t0, t1) { - this.color = t0; - this.options = t1; - }, - colorClass__closure9: function colorClass__closure9() { - }, - colorClass__closure10: function colorClass__closure10() { - }, - colorClass__closure11: function colorClass__closure11() { - }, - colorClass__closure12: function colorClass__closure12() { - }, - colorClass__closure13: function colorClass__closure13() { - }, - colorClass__closure14: function colorClass__closure14() { - }, - colorClass__closure15: function colorClass__closure15() { - }, - colorClass__closure16: function colorClass__closure16() { - }, - colorClass__closure17: function colorClass__closure17() { - }, - colorClass__closure18: function colorClass__closure18() { - }, - colorClass__closure19: function colorClass__closure19() { - }, - colorClass__closure20: function colorClass__closure20() { - }, - colorClass__closure21: function colorClass__closure21() { - }, - colorClass__closure22: function colorClass__closure22() { - }, - _Channels: function _Channels() { - }, - _ConstructionOptions: function _ConstructionOptions() { - }, - _ChannelOptions: function _ChannelOptions() { - }, - _ToGamutOptions: function _ToGamutOptions() { - }, - _InterpolationOptions: function _InterpolationOptions() { - }, - _NodeSassColor: function _NodeSassColor() { - }, - legacyColorClass_closure: function legacyColorClass_closure() { - }, - legacyColorClass__closure: function legacyColorClass__closure() { - }, - legacyColorClass_closure0: function legacyColorClass_closure0() { - }, - legacyColorClass_closure1: function legacyColorClass_closure1() { - }, - legacyColorClass_closure2: function legacyColorClass_closure2() { - }, - legacyColorClass_closure3: function legacyColorClass_closure3() { - }, - legacyColorClass_closure4: function legacyColorClass_closure4() { - }, - legacyColorClass_closure5: function legacyColorClass_closure5() { - }, - legacyColorClass_closure6: function legacyColorClass_closure6() { - }, - legacyColorClass_closure7: function legacyColorClass_closure7() { - }, - SassColor_SassColor$rgb0(red, green, blue, alpha) { - return A.SassColor_SassColor$rgbInternal0(red, green, blue, alpha, null); - }, - SassColor_SassColor$rgbInternal0(red, green, blue, alpha, format) { - var _null = null, - t1 = red == null ? _null : red, - t2 = green == null ? _null : green, - t3 = blue == null ? _null : blue; - return A.SassColor$_forSpace0(B.RgbColorSpace_mlz0, t1, t2, t3, alpha == null ? _null : alpha, format); - }, - SassColor_SassColor$hsl0(hue, saturation, lightness, alpha) { - var _null = null, - t1 = hue == null ? _null : hue, - t2 = saturation == null ? _null : saturation, - t3 = lightness == null ? _null : lightness; - return A.SassColor_SassColor$forSpaceInternal0(B.HslColorSpace_gsm0, t1, t2, t3, alpha == null ? _null : alpha); - }, - SassColor_SassColor$hwb0(hue, whiteness, blackness, alpha) { - var _null = null, - t1 = hue == null ? _null : hue, - t2 = whiteness == null ? _null : whiteness, - t3 = blackness == null ? _null : blackness; - return A.SassColor_SassColor$forSpaceInternal0(B.HwbColorSpace_06z0, t1, t2, t3, alpha == null ? _null : alpha); - }, - SassColor_SassColor$forSpaceInternal0(space, channel0, channel1, channel2, alpha) { - var t1, t2, _null = null; - $label0$0: { - if (B.HslColorSpace_gsm0 === space) { - t1 = channel1 == null; - t2 = A.SassColor__normalizeHue0(channel0, !t1 && channel1 < 0 && !A.fuzzyEquals0(channel1, 0)); - t2 = A.SassColor$_forSpace0(space, t2, t1 ? _null : Math.abs(channel1), channel2, alpha, _null); - t1 = t2; - break $label0$0; - } - if (B.HwbColorSpace_06z0 === space) { - t1 = A.SassColor$_forSpace0(space, A.SassColor__normalizeHue0(channel0, false), channel1, channel2, alpha, _null); - break $label0$0; - } - if (B.LchColorSpace_wv80 === space || B.OklchColorSpace_li80 === space) { - t1 = channel1 == null; - t2 = t1 ? _null : Math.abs(channel1); - t2 = A.SassColor$_forSpace0(space, channel0, t2, A.SassColor__normalizeHue0(channel2, !t1 && channel1 < 0 && !A.fuzzyEquals0(channel1, 0)), alpha, _null); - t1 = t2; - break $label0$0; - } - t1 = A.SassColor$_forSpace0(space, channel0, channel1, channel2, alpha, _null); - break $label0$0; - } - return t1; - }, - SassColor$_forSpace0(_space, channel0OrNull, channel1OrNull, channel2OrNull, alpha, format) { - return new A.SassColor0(_space, channel0OrNull, channel1OrNull, channel2OrNull, format, A.NullableExtension_andThen0(alpha, new A.SassColor$_forSpace_closure0())); - }, - SassColor__normalizeHue0(hue, invert) { - var t1, t2; - if (hue == null) - return hue; - t1 = B.JSNumber_methods.$mod(hue, 360); - t2 = invert ? 180 : 0; - return B.JSNumber_methods.$mod(t1 + 360 + t2, 360); - }, - SassColor0: function SassColor0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._color0$_space = t0; - _.channel0OrNull = t1; - _.channel1OrNull = t2; - _.channel2OrNull = t3; - _.format = t4; - _.alphaOrNull = t5; - }, - SassColor$_forSpace_closure0: function SassColor$_forSpace_closure0() { - }, - _ColorFormatEnum0: function _ColorFormatEnum0() { - }, - SpanColorFormat0: function SpanColorFormat0(t0) { - this._color0$_span = t0; - }, - Combinator0: function Combinator0(t0, t1) { - this._combinator0$_text = t0; - this._name = t1; - }, - ModifiableCssComment0: function ModifiableCssComment0(t0, t1) { - var _ = this; - _.text = t0; - _.span = t1; - _._node$_indexInParent = _._node$_parent = null; - _.isGroupEnd = false; - }, - compile0(path, options) { - var color, ascii, logger, result, error, stackTrace, t1, color0, ascii0, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, exception, _null = null; - if (!A.isNodeJs()) - A.jsThrow(new self.Error("The compile() method is only available in Node.js.")); - t1 = options == null; - color0 = t1 ? _null : J.get$alertColor$x(options); - color = color0 == null ? A.hasTerminal0() : color0; - ascii0 = t1 ? _null : J.get$alertAscii$x(options); - ascii = ascii0 == null ? $._glyphs === B.C_AsciiGlyphSet : ascii0; - t2 = t1 ? _null : J.get$logger$x(options); - t3 = ascii; - if (t3 == null) - t3 = $._glyphs === B.C_AsciiGlyphSet; - logger = new A.JSToDartLogger(t2, new A.StderrLogger0(color), t3); - try { - t2 = t1 ? _null : J.get$loadPaths$x(options); - t3 = t1 ? _null : J.get$quietDeps$x(options); - if (t3 == null) - t3 = false; - t4 = A._parseOutputStyle0(t1 ? _null : J.get$style$x(options)); - t5 = t1 ? _null : J.get$verbose$x(options); - if (t5 == null) - t5 = false; - t6 = t1 ? _null : J.get$charset$x(options); - if (t6 == null) - t6 = true; - t7 = t1 ? _null : J.get$sourceMap$x(options); - if (t7 == null) - t7 = false; - if (t1) - t8 = _null; - else { - t8 = J.get$importers$x(options); - t8 = t8 == null ? _null : J.map$1$1$ax(t8, A.compile___parseImporter$closure(), type$.Importer); - } - t9 = A._parseFunctions0(t1 ? _null : J.get$functions$x(options), false); - t10 = t1 ? _null : J.get$fatalDeprecations$x(options); - t10 = A.parseDeprecations(logger, t10, true); - t11 = t1 ? _null : J.get$silenceDeprecations$x(options); - t11 = A.parseDeprecations(logger, t11, false); - t12 = t1 ? _null : J.get$futureDeprecations$x(options); - result = A.compile(path, t6, t10, new A.CastList(t9, A._arrayInstanceType(t9)._eval$1("CastList<1,Callable>")), A.parseDeprecations(logger, t12, false), A.ImportCache$0(t8, t2, _null), _null, _null, logger, _null, t3, t11, t7, t4, _null, true, t5); - t1 = t1 ? _null : J.get$sourceMapIncludeSources$x(options); - if (t1 == null) - t1 = false; - t1 = A._convertResult(result, t1); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwNodeException(error, ascii, color, stackTrace); - } else - throw exception; - } - }, - compileString0(text, options) { - var logger, result, error, stackTrace, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, exception, _null = null, - t1 = options == null, - color0 = t1 ? _null : J.get$alertColor$x(options), - color = color0 == null ? A.hasTerminal0() : color0, - ascii0 = t1 ? _null : J.get$alertAscii$x(options), - ascii = ascii0 == null ? $._glyphs === B.C_AsciiGlyphSet : ascii0, - t2 = t1 ? _null : J.get$logger$x(options), - t3 = ascii; - if (t3 == null) - t3 = $._glyphs === B.C_AsciiGlyphSet; - logger = new A.JSToDartLogger(t2, new A.StderrLogger0(color), t3); - try { - t2 = A.parseSyntax(t1 ? _null : J.get$syntax$x(options)); - t3 = t1 ? _null : A.NullableExtension_andThen0(J.get$url$x(options), A.utils3__jsToDartUrl$closure()); - t4 = t1 ? _null : J.get$loadPaths$x(options); - t5 = t1 ? _null : J.get$quietDeps$x(options); - if (t5 == null) - t5 = false; - t6 = A._parseOutputStyle0(t1 ? _null : J.get$style$x(options)); - t7 = t1 ? _null : J.get$verbose$x(options); - if (t7 == null) - t7 = false; - t8 = t1 ? _null : J.get$charset$x(options); - if (t8 == null) - t8 = true; - t9 = t1 ? _null : J.get$sourceMap$x(options); - if (t9 == null) - t9 = false; - if (t1) - t10 = _null; - else { - t10 = J.get$importers$x(options); - t10 = t10 == null ? _null : J.map$1$1$ax(t10, A.compile___parseImporter$closure(), type$.Importer); - } - t11 = t1 ? _null : A.NullableExtension_andThen0(J.get$importer$x(options), A.compile___parseImporter$closure()); - if (t11 == null) - t11 = (t1 ? _null : J.get$url$x(options)) == null ? new A.NoOpImporter0() : _null; - t12 = A._parseFunctions0(t1 ? _null : J.get$functions$x(options), false); - t13 = t1 ? _null : J.get$fatalDeprecations$x(options); - t13 = A.parseDeprecations(logger, t13, true); - t14 = t1 ? _null : J.get$silenceDeprecations$x(options); - t14 = A.parseDeprecations(logger, t14, false); - t15 = t1 ? _null : J.get$futureDeprecations$x(options); - result = A.compileString(text, t8, t13, new A.CastList(t12, A._arrayInstanceType(t12)._eval$1("CastList<1,Callable>")), A.parseDeprecations(logger, t15, false), A.ImportCache$0(t10, t4, _null), t11, _null, _null, logger, _null, t5, t14, t9, t6, t2, t3, true, t7); - t1 = t1 ? _null : J.get$sourceMapIncludeSources$x(options); - if (t1 == null) - t1 = false; - t1 = A._convertResult(result, t1); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwNodeException(error, ascii, color, stackTrace); - } else - throw exception; - } - }, - compileAsync1(path, options) { - var t1, color, ascii; - if (!A.isNodeJs()) - A.jsThrow(new self.Error("The compileAsync() method is only available in Node.js.")); - t1 = options == null; - color = t1 ? null : J.get$alertColor$x(options); - if (color == null) - color = A.hasTerminal0(); - ascii = t1 ? null : J.get$alertAscii$x(options); - if (ascii == null) - ascii = $._glyphs === B.C_AsciiGlyphSet; - t1 = t1 ? null : J.get$logger$x(options); - return A._wrapAsyncSassExceptions(A.futureToPromise0(new A.compileAsync_closure(path, color, options, new A.JSToDartLogger(t1, new A.StderrLogger0(color), ascii)).call$0()), ascii, color); - }, - compileStringAsync1(text, options) { - var ascii, - t1 = options == null, - color = t1 ? null : J.get$alertColor$x(options); - if (color == null) - color = A.hasTerminal0(); - ascii = t1 ? null : J.get$alertAscii$x(options); - if (ascii == null) - ascii = $._glyphs === B.C_AsciiGlyphSet; - t1 = t1 ? null : J.get$logger$x(options); - return A._wrapAsyncSassExceptions(A.futureToPromise0(new A.compileStringAsync_closure(text, options, color, new A.JSToDartLogger(t1, new A.StderrLogger0(color), ascii)).call$0()), ascii, color); - }, - _convertResult(result, includeSourceContents) { - var loadedUrls, - t1 = result._compile_result$_serialize, - t2 = t1._1, - sourceMap = t2 == null ? null : t2.toJson$1$includeSourceContents(includeSourceContents); - if (type$.Map_String_dynamic._is(sourceMap) && !sourceMap.containsKey$1("sources")) - sourceMap.$indexSet(0, "sources", A._setArrayType([], type$.JSArray_String)); - loadedUrls = A.toJSArray(result._evaluate._0.map$1$1(0, A.utils3__dartToJSUrl$closure(), type$.nullable_Object)); - t1 = t1._0; - return sourceMap == null ? {css: t1, loadedUrls: loadedUrls} : {css: t1, sourceMap: A.jsify0(sourceMap), loadedUrls: loadedUrls}; - }, - _wrapAsyncSassExceptions(promise, ascii, color) { - return J.then$2$x(promise, null, A.allowInterop(new A._wrapAsyncSassExceptions_closure(color, ascii))); - }, - _parseOutputStyle0(style) { - var t1; - $label0$0: { - if (style == null || "expanded" === style) { - t1 = B.OutputStyle_00; - break $label0$0; - } - if ("compressed" === style) { - t1 = B.OutputStyle_10; - break $label0$0; - } - t1 = A.jsThrow(new self.Error('Unknown output style "' + A.S(style) + '".')); - } - return t1; - }, - _parseAsyncImporter(importer) { - var t1, canonicalize, load, _0_0; - if (importer instanceof A.NodePackageImporter0) - return importer; - if (importer == null) - A.jsThrow(new self.Error("Importers may not be null.")); - type$.JSImporter._as(importer); - t1 = J.getInterceptor$x(importer); - canonicalize = t1.get$canonicalize(importer); - load = t1.get$load(importer); - _0_0 = t1.get$findFileUrl(importer); - if (_0_0 != null) - if (canonicalize != null || load != null) - A.jsThrow(new self.Error(string$.An_impa)); - else - return new A.JSToDartAsyncFileImporter(_0_0); - else if (canonicalize == null || load == null) - A.jsThrow(new self.Error(string$.An_impu)); - else { - t1 = A._normalizeNonCanonicalSchemes(t1.get$nonCanonicalScheme(importer)); - t1 = t1 == null ? B.Set_empty7 : A.Set_Set$unmodifiable(t1, type$.String); - t1.forEach$1(0, A.utils4__validateUrlScheme$closure()); - return new A.JSToDartAsyncImporter(canonicalize, load, t1); - } - }, - _parseImporter0(importer) { - var t1, canonicalize, load, _0_0; - if (importer instanceof A.NodePackageImporter0) - return importer; - if (importer == null) - A.jsThrow(new self.Error("Importers may not be null.")); - type$.JSImporter._as(importer); - t1 = J.getInterceptor$x(importer); - canonicalize = t1.get$canonicalize(importer); - load = t1.get$load(importer); - _0_0 = t1.get$findFileUrl(importer); - if (_0_0 != null) - if (canonicalize != null || load != null) - A.jsThrow(new self.Error(string$.An_impa)); - else - return new A.JSToDartFileImporter(_0_0); - else if (canonicalize == null || load == null) - A.jsThrow(new self.Error(string$.An_impu)); - else { - t1 = A._normalizeNonCanonicalSchemes(t1.get$nonCanonicalScheme(importer)); - t1 = t1 == null ? B.Set_empty7 : A.Set_Set$unmodifiable(t1, type$.String); - t1.forEach$1(0, A.utils4__validateUrlScheme$closure()); - return new A.JSToDartImporter(canonicalize, load, t1); - } - }, - _normalizeNonCanonicalSchemes(schemes) { - var t1; - $label0$0: { - if (typeof schemes == "string") { - t1 = A._setArrayType([schemes], type$.JSArray_String); - break $label0$0; - } - if (type$.List_dynamic._is(schemes)) { - t1 = J.cast$1$0$ax(schemes, type$.String); - break $label0$0; - } - if (schemes == null) { - t1 = null; - break $label0$0; - } - t1 = A.jsThrow(new self.Error('nonCanonicalScheme must be a string or list of strings, was "' + A.S(schemes) + '"')); - } - return t1; - }, - _simplifyValue(value) { - var _0_1, t1, t2, _0_4, _0_3, _0_4_isSet, _0_5, _0_40, _0_8, first, _0_10, min, _null = null; - $label1$1: { - if (value instanceof A.SassCalculation0) { - _0_1 = value.name; - t1 = value.$arguments; - t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object>"); - _0_4 = A.List_List$of(new A.MappedListIterable(t1, A.compile___simplifyCalcArg$closure(), t2), true, t2._eval$1("ListIterable.E")); - $label0$0: { - _0_3 = "calc" === _0_1; - _0_4_isSet = _0_3; - _0_5 = _null; - _0_40 = _null; - if (_0_4_isSet) { - _0_5 = _0_4.length; - t1 = _0_5; - _0_40 = _0_4; - t1 = t1 === 1; - } else - t1 = false; - if (t1) { - _0_8 = (_0_4_isSet ? _0_40 : _0_4)[0]; - first = _0_8; - type$.Value_2._as(first); - t1 = first; - break $label0$0; - } - if (_0_3) - A.throwExpression(A.ArgumentError$("calc() requires exactly one argument.", _null)); - _0_10 = "clamp" === _0_1; - t1 = _0_10; - if (t1) { - if (_0_4_isSet) - t1 = _0_5; - else { - _0_5 = _0_4.length; - t1 = _0_5; - _0_40 = _0_4; - _0_4_isSet = true; - } - t1 = t1 === 3; - } else - t1 = false; - if (t1) { - if (_0_4_isSet) - t1 = _0_40; - else { - t1 = _0_4; - _0_40 = t1; - _0_4_isSet = true; - } - _0_8 = t1[0]; - min = _0_8; - if (_0_4_isSet) - t1 = _0_40; - else { - t1 = _0_4; - _0_40 = t1; - _0_4_isSet = true; - } - value = t1[1]; - t1 = A.SassCalculation_clamp0(min, value, (_0_4_isSet ? _0_40 : _0_4)[2]); - break $label0$0; - } - if (_0_10) - A.throwExpression(A.ArgumentError$("clamp() requires exactly 3 arguments.", _null)); - if ("min" === _0_1) { - t1 = A.SassCalculation_min0(_0_4_isSet ? _0_40 : _0_4); - break $label0$0; - } - if ("max" === _0_1) { - t1 = A.SassCalculation_max0(_0_4_isSet ? _0_40 : _0_4); - break $label0$0; - } - t1 = A.throwExpression(A.ArgumentError$('"' + _0_1 + '" is not a recognized calculation type.', _null)); - } - break $label1$1; - } - t1 = value; - break $label1$1; - } - return t1; - }, - _simplifyCalcArg(value) { - var t1; - $label0$0: { - if (value instanceof A.SassCalculation0) { - t1 = A._simplifyValue(value); - break $label0$0; - } - if (value instanceof A.CalculationOperation0) { - t1 = A.SassCalculation_operateInternal0(value._calculation0$_operator, A._simplifyCalcArg(value._calculation0$_left), A._simplifyCalcArg(value._calculation0$_right), null, true, null); - break $label0$0; - } - t1 = value; - break $label0$0; - } - return t1; - }, - _parseFunctions0(functions, asynch) { - var result; - if (functions == null) - return B.List_empty26; - result = A._setArrayType([], type$.JSArray_AsyncCallable_2); - A.jsForEach(functions, new A._parseFunctions_closure0(asynch, result)); - return result; - }, - compileAsync_closure: function compileAsync_closure(t0, t1, t2, t3) { - var _ = this; - _.path = t0; - _.color = t1; - _.options = t2; - _.logger = t3; - }, - compileAsync__closure: function compileAsync__closure() { - }, - compileStringAsync_closure: function compileStringAsync_closure(t0, t1, t2, t3) { - var _ = this; - _.text = t0; - _.options = t1; - _.color = t2; - _.logger = t3; - }, - compileStringAsync__closure: function compileStringAsync__closure() { - }, - compileStringAsync__closure0: function compileStringAsync__closure0() { - }, - _wrapAsyncSassExceptions_closure: function _wrapAsyncSassExceptions_closure(t0, t1) { - this.color = t0; - this.ascii = t1; - }, - _parseFunctions_closure0: function _parseFunctions_closure0(t0, t1) { - this.asynch = t0; - this.result = t1; - }, - _parseFunctions__closure2: function _parseFunctions__closure2(t0, t1) { - this.callback = t0; - this.callable = t1; - }, - _parseFunctions___closure6: function _parseFunctions___closure6(t0, t1) { - this.callback = t0; - this.$arguments = t1; - }, - _parseFunctions__closure3: function _parseFunctions__closure3(t0, t1) { - this.callback = t0; - this.callable = t1; - }, - _parseFunctions___closure5: function _parseFunctions___closure5(t0, t1) { - this.callback = t0; - this.$arguments = t1; - }, - nodePackageImporterClass_closure: function nodePackageImporterClass_closure() { - }, - nodePackageImporterClass__closure: function nodePackageImporterClass__closure() { - }, - compile(path, charset, fatalDeprecations, functions, futureDeprecations, importCache, indentWidth, lineFeed, logger, nodeImporter, quietDeps, silenceDeprecations, sourceMap, style, syntax, useSpaces, verbose) { - var t3, t4, t0, stylesheet, result, _null = null, - t1 = type$.Deprecation_3, - t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - if (silenceDeprecations != null) - t2.addAll$1(0, silenceDeprecations); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - if (fatalDeprecations != null) - t3.addAll$1(0, fatalDeprecations); - t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - if (futureDeprecations != null) - t4.addAll$1(0, futureDeprecations); - logger = new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); - logger.validate$0(); - t1 = nodeImporter == null; - if (t1) - t2 = syntax == null || syntax === A.Syntax_forPath0(path); - else - t2 = false; - if (t2) { - if (importCache == null) - importCache = A.ImportCache$none(); - t2 = $.$get$FilesystemImporter_cwd0(); - t3 = A.isNodeJs() ? self.process : _null; - if (!J.$eq$(t3 == null ? _null : J.get$platform$x(t3), "win32")) { - t3 = A.isNodeJs() ? self.process : _null; - t3 = J.$eq$(t3 == null ? _null : J.get$platform$x(t3), "darwin"); - } else - t3 = true; - if (t3) { - t3 = $.$get$context(); - t4 = A._realCasePath0(A.absolute(t3.normalize$1(path), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null)); - t0 = t4; - t4 = t3; - t3 = t0; - } else { - t3 = $.$get$context(); - t4 = t3.canonicalize$1(0, path); - t0 = t4; - t4 = t3; - t3 = t0; - } - t4 = importCache.importCanonical$3$originalUrl(t2, t4.toUri$1(t3), t4.toUri$1(path)); - t4.toString; - stylesheet = t4; - } else { - t2 = A.readFile0(path); - t3 = syntax == null ? A.Syntax_forPath0(path) : syntax; - stylesheet = A.Stylesheet_Stylesheet$parse0(t2, t3, $.$get$context().toUri$1(path)); - } - result = A._compileStylesheet1(stylesheet, logger, importCache, nodeImporter, $.$get$FilesystemImporter_cwd0(), functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset); - logger.summarize$1$js(!t1); - return result; - }, - compileString(source, charset, fatalDeprecations, functions, futureDeprecations, importCache, importer, indentWidth, lineFeed, logger, nodeImporter, quietDeps, silenceDeprecations, sourceMap, style, syntax, url, useSpaces, verbose) { - var t3, t4, stylesheet, result, - t1 = type$.Deprecation_3, - t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - if (silenceDeprecations != null) - t2.addAll$1(0, silenceDeprecations); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - if (fatalDeprecations != null) - t3.addAll$1(0, fatalDeprecations); - t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - if (futureDeprecations != null) - t4.addAll$1(0, futureDeprecations); - logger = new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); - logger.validate$0(); - stylesheet = A.Stylesheet_Stylesheet$parse0(source, syntax == null ? B.Syntax_SCSS_scss0 : syntax, url); - if (importer == null) - t1 = A.isBrowser() ? new A.NoOpImporter0() : $.$get$FilesystemImporter_cwd0(); - else - t1 = importer; - result = A._compileStylesheet1(stylesheet, logger, importCache, nodeImporter, t1, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset); - logger.summarize$1$js(nodeImporter != null); - return result; - }, - _compileStylesheet1(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { - var evaluateResult, serializeResult, resultSourceMap; - if (nodeImporter != null) - A.WarnForDeprecation_warnForDeprecation0(logger, B.Deprecation_2No, string$.The_le, null, null); - evaluateResult = A._EvaluateVisitor$1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet); - serializeResult = A.serialize0(evaluateResult._1, charset, indentWidth, false, lineFeed, logger, sourceMap, style, useSpaces); - resultSourceMap = serializeResult._1; - if (resultSourceMap != null && importCache != null) - A.mapInPlace0(resultSourceMap.urls, new A._compileStylesheet_closure1(stylesheet, importCache)); - return new A.CompileResult0(evaluateResult, serializeResult); - }, - _compileStylesheet_closure1: function _compileStylesheet_closure1(t0, t1) { - this.stylesheet = t0; - this.importCache = t1; - }, - CompileOptions: function CompileOptions() { - }, - CompileStringOptions: function CompileStringOptions() { - }, - NodeCompileResult: function NodeCompileResult() { - }, - CompileResult0: function CompileResult0(t0, t1) { - this._evaluate = t0; - this._compile_result$_serialize = t1; - }, - initCompiler() { - return new A.Compiler(); - }, - initAsyncCompiler() { - return A.futureToPromise0(new A.initAsyncCompiler_closure().call$0()); - }, - Compiler: function Compiler() { - this._disposed = false; - }, - AsyncCompiler: function AsyncCompiler(t0) { - this.compilations = t0; - this._disposed = false; - }, - AsyncCompiler_addCompilation_closure: function AsyncCompiler_addCompilation_closure() { - }, - compilerClass_closure: function compilerClass_closure() { - }, - compilerClass__closure: function compilerClass__closure() { - }, - compilerClass__closure0: function compilerClass__closure0() { - }, - compilerClass__closure1: function compilerClass__closure1() { - }, - compilerClass__closure2: function compilerClass__closure2() { - }, - asyncCompilerClass_closure: function asyncCompilerClass_closure() { - }, - asyncCompilerClass__closure: function asyncCompilerClass__closure() { - }, - asyncCompilerClass__closure0: function asyncCompilerClass__closure0() { - }, - asyncCompilerClass__closure1: function asyncCompilerClass__closure1() { - }, - asyncCompilerClass__closure2: function asyncCompilerClass__closure2() { - }, - asyncCompilerClass___closure: function asyncCompilerClass___closure(t0) { - this.self = t0; - }, - initAsyncCompiler_closure: function initAsyncCompiler_closure() { - }, - ComplexSassNumber0: function ComplexSassNumber0(t0, t1, t2, t3) { - var _ = this; - _._complex0$_numeratorUnits = t0; - _._complex0$_denominatorUnits = t1; - _._number1$_value = t2; - _.hashCache = null; - _.asSlash = t3; - }, - ComplexSelector$0(leadingCombinators, components, span, lineBreak) { - var t1 = A.List_List$unmodifiable(leadingCombinators, type$.CssValue_Combinator_2), - t2 = A.List_List$unmodifiable(components, type$.ComplexSelectorComponent_2); - if (t1.length === 0 && t2.length === 0) - A.throwExpression(A.ArgumentError$(string$.leadin, null)); - return new A.ComplexSelector0(t1, t2, lineBreak, span); - }, - ComplexSelector0: function ComplexSelector0(t0, t1, t2, t3) { - var _ = this; - _.leadingCombinators = t0; - _.components = t1; - _.lineBreak = t2; - _._complex$__ComplexSelector_specificity_FI = $; - _.span = t3; - }, - ComplexSelector_specificity_closure0: function ComplexSelector_specificity_closure0() { - }, - ComplexSelectorComponent0: function ComplexSelectorComponent0(t0, t1, t2) { - this.selector = t0; - this.combinators = t1; - this.span = t2; - }, - ComplexSelectorComponent_toString_closure0: function ComplexSelectorComponent_toString_closure0() { - }, - CompoundSelector$0(components, span) { - var t1 = A.List_List$unmodifiable(components, type$.SimpleSelector_2); - if (t1.length === 0) - A.throwExpression(A.ArgumentError$("components may not be empty.", null)); - return new A.CompoundSelector0(t1, span); - }, - CompoundSelector0: function CompoundSelector0(t0, t1) { - var _ = this; - _.components = t0; - _._compound$__CompoundSelector_hasComplicatedSuperselectorSemantics_FI = _._compound$__CompoundSelector_specificity_FI = $; - _.span = t1; - }, - CompoundSelector_specificity_closure0: function CompoundSelector_specificity_closure0() { - }, - CompoundSelector_hasComplicatedSuperselectorSemantics_closure0: function CompoundSelector_hasComplicatedSuperselectorSemantics_closure0() { - }, - Configuration0: function Configuration0(t0, t1) { - this._configuration0$_values = t0; - this._configuration0$__originalConfiguration = t1; - }, - ExplicitConfiguration0: function ExplicitConfiguration0(t0, t1, t2) { - this.nodeWithSpan = t0; - this._configuration0$_values = t1; - this._configuration0$__originalConfiguration = t2; - }, - ConfiguredValue0: function ConfiguredValue0(t0, t1, t2) { - this.value = t0; - this.configurationSpan = t1; - this.assignmentNode = t2; - }, - ConfiguredVariable0: function ConfiguredVariable0(t0, t1, t2, t3) { - var _ = this; - _.name = t0; - _.expression = t1; - _.isGuarded = t2; - _.span = t3; - }, - ContentBlock$0($arguments, children, span) { - var _s8_ = "@content", - t1 = A.stringReplaceAllUnchecked(_s8_, "_", "-"), - t2 = A.List_List$unmodifiable(children, type$.Statement_2), - t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); - return new A.ContentBlock0(t1, _s8_, $arguments, span, t2, t3); - }, - ContentBlock0: function ContentBlock0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.name = t0; - _.originalName = t1; - _.$arguments = t2; - _.span = t3; - _.children = t4; - _.hasDeclarations = t5; - }, - ContentRule0: function ContentRule0(t0, t1) { - this.$arguments = t0; - this.span = t1; - }, - _disallowedFunctionNames_closure0: function _disallowedFunctionNames_closure0() { - }, - CssParser0: function CssParser0(t0, t1, t2, t3) { - var _ = this; - _._stylesheet0$_isUseAllowed = true; - _._stylesheet0$_inExpression = _._stylesheet0$_inParentheses = _._stylesheet0$_inStyleRule = _._stylesheet0$_inUnknownAtRule = _._stylesheet0$_inControlDirective = _._stylesheet0$_inContentBlock = _._stylesheet0$_inMixin = false; - _._stylesheet0$_globalVariables = t0; - _.warnings = t1; - _.lastSilentComment = null; - _.scanner = t2; - _._parser1$_interpolationMap = t3; - }, - DebugRule0: function DebugRule0(t0, t1) { - this.expression = t0; - this.span = t1; - }, - ModifiableCssDeclaration$0($name, value, span, interleavedRules, parsedAsCustomProperty, trace, valueSpanForMap) { - var t3, - t1 = interleavedRules == null ? B.List_empty23 : A.List_List$unmodifiable(interleavedRules, type$.CssStyleRule_2), - t2 = valueSpanForMap == null ? value.span : valueSpanForMap; - if (parsedAsCustomProperty) - if (!J.startsWith$1$s($name.value, "--")) - A.throwExpression(A.ArgumentError$(string$.parsed, null)); - else { - t3 = value.value; - if (!(t3 instanceof A.SassString0)) - A.throwExpression(A.ArgumentError$(string$.If_par + value.toString$0(0) + "` of type " + A.getRuntimeTypeOfDartObject(t3).toString$0(0) + ").", null)); - } - return new A.ModifiableCssDeclaration0($name, value, parsedAsCustomProperty, t1, trace, t2, span); - }, - ModifiableCssDeclaration0: function ModifiableCssDeclaration0(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.name = t0; - _.value = t1; - _.parsedAsCustomProperty = t2; - _.interleavedRules = t3; - _.trace = t4; - _.valueSpanForMap = t5; - _.span = t6; - _._node$_indexInParent = _._node$_parent = null; - _.isGroupEnd = false; - }, - Declaration$0($name, value, span) { - return new A.Declaration0($name, value, span, null, false); - }, - Declaration$nested0($name, children, span, value) { - var t1 = A.List_List$unmodifiable(children, type$.Statement_2), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); - return new A.Declaration0($name, value, span, t1, t2); - }, - Declaration0: function Declaration0(t0, t1, t2, t3, t4) { - var _ = this; - _.name = t0; - _.value = t1; - _.span = t2; - _.children = t3; - _.hasDeclarations = t4; - }, - SupportsDeclaration0: function SupportsDeclaration0(t0, t1, t2) { - this.name = t0; - this.value = t1; - this.span = t2; - }, - Deprecation_fromId0(id) { - return A.IterableExtension_firstWhereOrNull(B.List_31K, new A.Deprecation_fromId_closure0(id)); - }, - Deprecation_forVersion0(version) { - var t2, _i, deprecation, $self, t3, - t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation_3); - for (t2 = A.VersionRange_VersionRange(true, version).get$allows(), _i = 0; _i < 24; ++_i) { - deprecation = B.List_31K[_i]; - $self = deprecation._deprecation$_deprecatedIn; - t3 = $self == null ? null : A.Version___parse_tearOff($self); - t3 = t3 == null ? null : t2.call$1(t3); - if (t3 == null ? false : t3) - t1.add$1(0, deprecation); - } - return t1; - }, - Deprecation0: function Deprecation0(t0, t1, t2, t3) { - var _ = this; - _.id = t0; - _._deprecation$_deprecatedIn = t1; - _.description = t2; - _._name = t3; - }, - Deprecation_fromId_closure0: function Deprecation_fromId_closure0(t0) { - this.id = t0; - }, - DeprecationProcessingLogger0: function DeprecationProcessingLogger0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._deprecation_processing$_warningCounts = t0; - _._deprecation_processing$_inner = t1; - _.silenceDeprecations = t2; - _.fatalDeprecations = t3; - _.futureDeprecations = t4; - _.limitRepetition = t5; - }, - DeprecationProcessingLogger_summarize_closure1: function DeprecationProcessingLogger_summarize_closure1() { - }, - DeprecationProcessingLogger_summarize_closure2: function DeprecationProcessingLogger_summarize_closure2() { - }, - parseDeprecations(logger, deprecations, supportVersions) { - if (deprecations == null) - return null; - return new A.parseDeprecations_closure(deprecations, logger, supportVersions).call$0(); - }, - Deprecation1: function Deprecation1() { - }, - deprecations_closure: function deprecations_closure(t0) { - this.deprecation = t0; - }, - parseDeprecations_closure: function parseDeprecations_closure(t0, t1, t2) { - this.deprecations = t0; - this.logger = t1; - this.supportVersions = t2; - }, - versionClass_closure: function versionClass_closure() { - }, - versionClass__closure: function versionClass__closure() { - }, - versionClass__closure0: function versionClass__closure0() { - }, - DisplayP3ColorSpace0: function DisplayP3ColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - DynamicImport0: function DynamicImport0(t0, t1) { - this.urlString = t0; - this.span = t1; - }, - EachRule$0(variables, list, children, span) { - var t1 = A.List_List$unmodifiable(variables, type$.String), - t2 = A.List_List$unmodifiable(children, type$.Statement_2), - t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); - return new A.EachRule0(t1, list, span, t2, t3); - }, - EachRule0: function EachRule0(t0, t1, t2, t3, t4) { - var _ = this; - _.variables = t0; - _.list = t1; - _.span = t2; - _.children = t3; - _.hasDeclarations = t4; - }, - EachRule_toString_closure0: function EachRule_toString_closure0() { - }, - EmptyExtensionStore0: function EmptyExtensionStore0() { - }, - Environment$0() { - var t1 = type$.String, - t2 = type$.Module_Callable_2, - t3 = type$.AstNode_2, - t4 = type$.int, - t5 = type$.Callable_2, - t6 = type$.JSArray_Map_String_Callable_2; - return new A.Environment0(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_Callable_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2)], type$.JSArray_Map_String_Value_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null); - }, - Environment$_0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content) { - var t1 = type$.String, - t2 = type$.int; - return new A.Environment0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content); - }, - _EnvironmentModule__EnvironmentModule1(environment, css, preModuleComments, extensionStore, forwarded) { - var t1, t2, t3, t4, t5, t6, module, result, t7; - if (forwarded == null) - forwarded = B.Set_empty4; - t1 = type$.dynamic; - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t2 = type$.Module_Callable_2, t3 = type$.List_CssComment_2, t4 = A.MapExtensions_get_pairs0(preModuleComments, t2, t3), t4 = t4.get$iterator(t4), t5 = type$.CssComment_2; t4.moveNext$0();) { - t6 = t4.get$current(t4); - module = t6._0; - result = A.List_List$from(t6._1, false, t5); - result.fixed$length = Array; - result.immutable$list = Array; - t1.$indexSet(0, module, result); - } - t1 = A.ConstantMap_ConstantMap$from(t1, t2, t3); - t2 = A._EnvironmentModule__makeModulesByVariable1(forwarded); - t3 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure11(), type$.Map_String_Value_2), type$.Value_2); - t4 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure12(), type$.Map_String_AstNode_2), type$.AstNode_2); - t5 = type$.Map_String_Callable_2; - t6 = type$.Callable_2; - t7 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure13(), t5), t6); - t6 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure14(), t5), t6); - t5 = J.get$isNotEmpty$asx(css.get$children(css)) || preModuleComments.get$isNotEmpty(preModuleComments) || B.JSArray_methods.any$1(environment._environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure15()); - return A._EnvironmentModule$_1(environment, css, t1, extensionStore, t2, t3, t4, t7, t6, t5, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure16())); - }, - _EnvironmentModule__makeModulesByVariable1(forwarded) { - var modulesByVariable, t1, t2, t3, t4, t5; - if (forwarded.get$isEmpty(forwarded)) - return B.Map_empty11; - modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_Callable_2); - for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { - t2 = t1.get$current(t1); - if (t2 instanceof A._EnvironmentModule1) { - for (t3 = t2._environment0$_modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t5 = t4.get$variables(); - A.setAll0(modulesByVariable, t5.get$keys(t5), t4); - } - A.setAll0(modulesByVariable, J.get$keys$z(B.JSArray_methods.get$first(t2._environment0$_environment._environment0$_variables)), t2); - } else { - t3 = t2.get$variables(); - A.setAll0(modulesByVariable, t3.get$keys(t3), t2); - } - } - return modulesByVariable; - }, - _EnvironmentModule__memberMap1(localMap, otherMaps, $V) { - var t1, t2, t3; - localMap = new A.PublicMemberMapView0(localMap, $V._eval$1("PublicMemberMapView0<0>")); - if (otherMaps.get$isEmpty(otherMaps)) - return localMap; - t1 = A._setArrayType([], $V._eval$1("JSArray>")); - for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { - t3 = t2.get$current(t2); - if (t3.get$isNotEmpty(t3)) - t1.push(t3); - } - t1.push(localMap); - if (t1.length === 1) - return localMap; - return A.MergedMapView$0(t1, type$.String, $V); - }, - _EnvironmentModule$_1(_environment, css, preModuleComments, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { - return new A._EnvironmentModule1(_environment._environment0$_allModules, variables, variableNodes, functions, mixins, extensionStore, css, preModuleComments, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); - }, - Environment0: function Environment0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { - var _ = this; - _._environment0$_modules = t0; - _._environment0$_namespaceNodes = t1; - _._environment0$_globalModules = t2; - _._environment0$_importedModules = t3; - _._environment0$_forwardedModules = t4; - _._environment0$_nestedForwardedModules = t5; - _._environment0$_allModules = t6; - _._environment0$_variables = t7; - _._environment0$_variableNodes = t8; - _._environment0$_variableIndices = t9; - _._environment0$_functions = t10; - _._environment0$_functionIndices = t11; - _._environment0$_mixins = t12; - _._environment0$_mixinIndices = t13; - _._environment0$_content = t14; - _._environment0$_inMixin = false; - _._environment0$_inSemiGlobalScope = true; - _._environment0$_lastVariableIndex = _._environment0$_lastVariableName = null; - }, - Environment__getVariableFromGlobalModule_closure0: function Environment__getVariableFromGlobalModule_closure0(t0) { - this.name = t0; - }, - Environment_setVariable_closure2: function Environment_setVariable_closure2(t0, t1) { - this.$this = t0; - this.name = t1; - }, - Environment_setVariable_closure3: function Environment_setVariable_closure3(t0) { - this.name = t0; - }, - Environment_setVariable_closure4: function Environment_setVariable_closure4(t0, t1) { - this.$this = t0; - this.name = t1; - }, - Environment__getFunctionFromGlobalModule_closure0: function Environment__getFunctionFromGlobalModule_closure0(t0) { - this.name = t0; - }, - Environment__getMixinFromGlobalModule_closure0: function Environment__getMixinFromGlobalModule_closure0(t0) { - this.name = t0; - }, - Environment_toModule_closure0: function Environment_toModule_closure0() { - }, - Environment_toDummyModule_closure0: function Environment_toDummyModule_closure0() { - }, - _EnvironmentModule1: function _EnvironmentModule1(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) { - var _ = this; - _.upstream = t0; - _.variables = t1; - _.variableNodes = t2; - _.functions = t3; - _.mixins = t4; - _.extensionStore = t5; - _.css = t6; - _.preModuleComments = t7; - _.transitivelyContainsCss = t8; - _.transitivelyContainsExtensions = t9; - _._environment0$_environment = t10; - _._environment0$_modulesByVariable = t11; - }, - _EnvironmentModule__EnvironmentModule_closure11: function _EnvironmentModule__EnvironmentModule_closure11() { - }, - _EnvironmentModule__EnvironmentModule_closure12: function _EnvironmentModule__EnvironmentModule_closure12() { - }, - _EnvironmentModule__EnvironmentModule_closure13: function _EnvironmentModule__EnvironmentModule_closure13() { - }, - _EnvironmentModule__EnvironmentModule_closure14: function _EnvironmentModule__EnvironmentModule_closure14() { - }, - _EnvironmentModule__EnvironmentModule_closure15: function _EnvironmentModule__EnvironmentModule_closure15() { - }, - _EnvironmentModule__EnvironmentModule_closure16: function _EnvironmentModule__EnvironmentModule_closure16() { - }, - ErrorRule0: function ErrorRule0(t0, t1) { - this.expression = t0; - this.span = t1; - }, - _EvaluateVisitor$1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { - var t4, - t1 = type$.Uri, - t2 = type$.Module_Callable_2, - t3 = A._setArrayType([], type$.JSArray_Record_2_String_and_AstNode_2); - if (importCache == null) - t4 = nodeImporter == null ? A.ImportCache$none() : null; - else - t4 = importCache; - t1 = new A._EvaluateVisitor1(t4, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Callable_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Record_2_String_and_SourceSpan), quietDeps, sourceMap, A.Environment$0(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode_2), t3, B.Configuration_Map_empty_null0); - t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); - return t1; - }, - _EvaluateVisitor1: function _EvaluateVisitor1(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { - var _ = this; - _._evaluate0$_importCache = t0; - _._nodeImporter = t1; - _._evaluate0$_builtInFunctions = t2; - _._evaluate0$_builtInModules = t3; - _._evaluate0$_modules = t4; - _._evaluate0$_moduleConfigurations = t5; - _._evaluate0$_moduleNodes = t6; - _._evaluate0$_logger = t7; - _._evaluate0$_warningsEmitted = t8; - _._evaluate0$_quietDeps = t9; - _._evaluate0$_sourceMap = t10; - _._evaluate0$_environment = t11; - _._evaluate0$_declarationName = _._evaluate0$__parent = _._evaluate0$_mediaQuerySources = _._evaluate0$_mediaQueries = _._evaluate0$_styleRuleIgnoringAtRoot = null; - _._evaluate0$_member = "root stylesheet"; - _._evaluate0$_importSpan = _._evaluate0$_callableNode = _._evaluate0$_currentCallable = null; - _._evaluate0$_inSupportsDeclaration = _._evaluate0$_inKeyframes = _._evaluate0$_atRootExcludingStyleRule = _._evaluate0$_inUnknownAtRule = _._evaluate0$_inFunction = false; - _._evaluate0$_loadedUrls = t12; - _._evaluate0$_activeModules = t13; - _._evaluate0$_stack = t14; - _._evaluate0$_importer = null; - _._evaluate0$_inDependency = false; - _._evaluate0$__extensionStore = _._evaluate0$_preModuleComments = _._evaluate0$_outOfOrderImports = _._evaluate0$__endOfImports = _._evaluate0$__root = _._evaluate0$__stylesheet = null; - _._evaluate0$_configuration = t15; - }, - _EvaluateVisitor_closure25: function _EvaluateVisitor_closure25(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure26: function _EvaluateVisitor_closure26(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure27: function _EvaluateVisitor_closure27(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure28: function _EvaluateVisitor_closure28(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure29: function _EvaluateVisitor_closure29(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure30: function _EvaluateVisitor_closure30(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure31: function _EvaluateVisitor_closure31(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure32: function _EvaluateVisitor_closure32(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure33: function _EvaluateVisitor_closure33(t0) { - this.$this = t0; - }, - _EvaluateVisitor__closure10: function _EvaluateVisitor__closure10(t0, t1, t2) { - this.$this = t0; - this.name = t1; - this.module = t2; - }, - _EvaluateVisitor_closure34: function _EvaluateVisitor_closure34(t0) { - this.$this = t0; - }, - _EvaluateVisitor__closure9: function _EvaluateVisitor__closure9(t0, t1, t2) { - this.$this = t0; - this.name = t1; - this.module = t2; - }, - _EvaluateVisitor_closure35: function _EvaluateVisitor_closure35(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure36: function _EvaluateVisitor_closure36(t0) { - this.$this = t0; - }, - _EvaluateVisitor__closure7: function _EvaluateVisitor__closure7(t0, t1, t2) { - this.values = t0; - this.span = t1; - this.callableNode = t2; - }, - _EvaluateVisitor__closure8: function _EvaluateVisitor__closure8(t0) { - this.$this = t0; - }, - _EvaluateVisitor_closure37: function _EvaluateVisitor_closure37(t0) { - this.$this = t0; - }, - _EvaluateVisitor_run_closure1: function _EvaluateVisitor_run_closure1(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.importer = t2; - }, - _EvaluateVisitor_run__closure1: function _EvaluateVisitor_run__closure1(t0, t1, t2) { - this.$this = t0; - this.importer = t1; - this.node = t2; - }, - _EvaluateVisitor__loadModule_closure3: function _EvaluateVisitor__loadModule_closure3(t0, t1) { - this._box_1 = t0; - this.callback = t1; - }, - _EvaluateVisitor__loadModule_closure4: function _EvaluateVisitor__loadModule_closure4(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.url = t1; - _.nodeWithSpan = t2; - _.baseUrl = t3; - _.namesInErrors = t4; - _.configuration = t5; - _.callback = t6; - }, - _EvaluateVisitor__loadModule__closure3: function _EvaluateVisitor__loadModule__closure3(t0, t1) { - this.$this = t0; - this.message = t1; - }, - _EvaluateVisitor__loadModule__closure4: function _EvaluateVisitor__loadModule__closure4(t0, t1, t2) { - this._box_0 = t0; - this.callback = t1; - this.firstLoad = t2; - }, - _EvaluateVisitor__execute_closure1: function _EvaluateVisitor__execute_closure1(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.importer = t1; - _.stylesheet = t2; - _.extensionStore = t3; - _.configuration = t4; - _.css = t5; - _.preModuleComments = t6; - }, - _EvaluateVisitor__combineCss_closure3: function _EvaluateVisitor__combineCss_closure3() { - }, - _EvaluateVisitor__combineCss_closure4: function _EvaluateVisitor__combineCss_closure4(t0) { - this.selectors = t0; - }, - _EvaluateVisitor__combineCss_visitModule1: function _EvaluateVisitor__combineCss_visitModule1(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.seen = t1; - _.clone = t2; - _.css = t3; - _.imports = t4; - _.sorted = t5; - }, - _EvaluateVisitor__extendModules_closure3: function _EvaluateVisitor__extendModules_closure3(t0) { - this.originalSelectors = t0; - }, - _EvaluateVisitor__extendModules_closure4: function _EvaluateVisitor__extendModules_closure4() { - }, - _EvaluateVisitor_visitAtRootRule_closure3: function _EvaluateVisitor_visitAtRootRule_closure3(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitAtRootRule_closure4: function _EvaluateVisitor_visitAtRootRule_closure4(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure11: function _EvaluateVisitor__scopeForAtRoot_closure11(t0, t1, t2) { - this.$this = t0; - this.newParent = t1; - this.node = t2; - }, - _EvaluateVisitor__scopeForAtRoot_closure12: function _EvaluateVisitor__scopeForAtRoot_closure12(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure13: function _EvaluateVisitor__scopeForAtRoot_closure13(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor__scopeForAtRoot__closure1: function _EvaluateVisitor__scopeForAtRoot__closure1(t0, t1) { - this.innerScope = t0; - this.callback = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure14: function _EvaluateVisitor__scopeForAtRoot_closure14(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor__scopeForAtRoot_closure15: function _EvaluateVisitor__scopeForAtRoot_closure15() { - }, - _EvaluateVisitor__scopeForAtRoot_closure16: function _EvaluateVisitor__scopeForAtRoot_closure16(t0, t1) { - this.$this = t0; - this.innerScope = t1; - }, - _EvaluateVisitor_visitContentRule_closure1: function _EvaluateVisitor_visitContentRule_closure1(t0, t1) { - this.$this = t0; - this.content = t1; - }, - _EvaluateVisitor_visitDeclaration_closure1: function _EvaluateVisitor_visitDeclaration_closure1(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - _EvaluateVisitor_visitEachRule_closure5: function _EvaluateVisitor_visitEachRule_closure5(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.nodeWithSpan = t2; - }, - _EvaluateVisitor_visitEachRule_closure6: function _EvaluateVisitor_visitEachRule_closure6(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.nodeWithSpan = t2; - }, - _EvaluateVisitor_visitEachRule_closure7: function _EvaluateVisitor_visitEachRule_closure7(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.list = t1; - _.setVariables = t2; - _.node = t3; - }, - _EvaluateVisitor_visitEachRule__closure1: function _EvaluateVisitor_visitEachRule__closure1(t0, t1, t2) { - this.$this = t0; - this.setVariables = t1; - this.node = t2; - }, - _EvaluateVisitor_visitEachRule___closure1: function _EvaluateVisitor_visitEachRule___closure1(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitAtRule_closure5: function _EvaluateVisitor_visitAtRule_closure5(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitAtRule_closure6: function _EvaluateVisitor_visitAtRule_closure6(t0, t1, t2) { - this.$this = t0; - this.name = t1; - this.children = t2; - }, - _EvaluateVisitor_visitAtRule__closure1: function _EvaluateVisitor_visitAtRule__closure1(t0, t1) { - this.$this = t0; - this.children = t1; - }, - _EvaluateVisitor_visitAtRule_closure7: function _EvaluateVisitor_visitAtRule_closure7() { - }, - _EvaluateVisitor_visitForRule_closure9: function _EvaluateVisitor_visitForRule_closure9(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitForRule_closure10: function _EvaluateVisitor_visitForRule_closure10(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitForRule_closure11: function _EvaluateVisitor_visitForRule_closure11(t0) { - this.fromNumber = t0; - }, - _EvaluateVisitor_visitForRule_closure12: function _EvaluateVisitor_visitForRule_closure12(t0, t1) { - this.toNumber = t0; - this.fromNumber = t1; - }, - _EvaluateVisitor_visitForRule_closure13: function _EvaluateVisitor_visitForRule_closure13(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.node = t2; - _.from = t3; - _.direction = t4; - _.fromNumber = t5; - }, - _EvaluateVisitor_visitForRule__closure1: function _EvaluateVisitor_visitForRule__closure1(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitForwardRule_closure3: function _EvaluateVisitor_visitForwardRule_closure3(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitForwardRule_closure4: function _EvaluateVisitor_visitForwardRule_closure4(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__registerCommentsForModule_closure1: function _EvaluateVisitor__registerCommentsForModule_closure1() { - }, - _EvaluateVisitor_visitIfRule_closure1: function _EvaluateVisitor_visitIfRule_closure1(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitIfRule__closure1: function _EvaluateVisitor_visitIfRule__closure1(t0, t1) { - this.$this = t0; - this.clause = t1; - }, - _EvaluateVisitor_visitIfRule___closure1: function _EvaluateVisitor_visitIfRule___closure1(t0) { - this.$this = t0; - }, - _EvaluateVisitor__visitDynamicImport_closure1: function _EvaluateVisitor__visitDynamicImport_closure1(t0, t1) { - this.$this = t0; - this.$import = t1; - }, - _EvaluateVisitor__visitDynamicImport__closure7: function _EvaluateVisitor__visitDynamicImport__closure7(t0) { - this.$this = t0; - }, - _EvaluateVisitor__visitDynamicImport__closure8: function _EvaluateVisitor__visitDynamicImport__closure8() { - }, - _EvaluateVisitor__visitDynamicImport__closure9: function _EvaluateVisitor__visitDynamicImport__closure9() { - }, - _EvaluateVisitor__visitDynamicImport__closure10: function _EvaluateVisitor__visitDynamicImport__closure10(t0, t1, t2, t3, t4) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.loadsUserDefinedModules = t2; - _.environment = t3; - _.children = t4; - }, - _EvaluateVisitor__applyMixin_closure3: function _EvaluateVisitor__applyMixin_closure3(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.$arguments = t1; - _.mixin = t2; - _.nodeWithSpanWithoutContent = t3; - }, - _EvaluateVisitor__applyMixin__closure4: function _EvaluateVisitor__applyMixin__closure4(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.$arguments = t1; - _.mixin = t2; - _.nodeWithSpanWithoutContent = t3; - }, - _EvaluateVisitor__applyMixin_closure4: function _EvaluateVisitor__applyMixin_closure4(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.contentCallable = t1; - _.mixin = t2; - _.nodeWithSpanWithoutContent = t3; - }, - _EvaluateVisitor__applyMixin__closure3: function _EvaluateVisitor__applyMixin__closure3(t0, t1, t2) { - this.$this = t0; - this.mixin = t1; - this.nodeWithSpanWithoutContent = t2; - }, - _EvaluateVisitor__applyMixin___closure1: function _EvaluateVisitor__applyMixin___closure1(t0, t1, t2) { - this.$this = t0; - this.mixin = t1; - this.nodeWithSpanWithoutContent = t2; - }, - _EvaluateVisitor__applyMixin____closure1: function _EvaluateVisitor__applyMixin____closure1(t0, t1) { - this.$this = t0; - this.statement = t1; - }, - _EvaluateVisitor_visitIncludeRule_closure5: function _EvaluateVisitor_visitIncludeRule_closure5(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitIncludeRule_closure6: function _EvaluateVisitor_visitIncludeRule_closure6(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitIncludeRule_closure7: function _EvaluateVisitor_visitIncludeRule_closure7(t0) { - this.node = t0; - }, - _EvaluateVisitor_visitMediaRule_closure5: function _EvaluateVisitor_visitMediaRule_closure5(t0, t1) { - this.$this = t0; - this.queries = t1; - }, - _EvaluateVisitor_visitMediaRule_closure6: function _EvaluateVisitor_visitMediaRule_closure6(t0, t1, t2, t3, t4) { - var _ = this; - _.$this = t0; - _.mergedQueries = t1; - _.queries = t2; - _.mergedSources = t3; - _.node = t4; - }, - _EvaluateVisitor_visitMediaRule__closure1: function _EvaluateVisitor_visitMediaRule__closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitMediaRule___closure1: function _EvaluateVisitor_visitMediaRule___closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitMediaRule_closure7: function _EvaluateVisitor_visitMediaRule_closure7(t0) { - this.mergedSources = t0; - }, - _EvaluateVisitor_visitStyleRule_closure7: function _EvaluateVisitor_visitStyleRule_closure7(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitStyleRule_closure8: function _EvaluateVisitor_visitStyleRule_closure8() { - }, - _EvaluateVisitor_visitStyleRule_closure10: function _EvaluateVisitor_visitStyleRule_closure10(t0, t1, t2) { - this.$this = t0; - this.rule = t1; - this.node = t2; - }, - _EvaluateVisitor_visitStyleRule__closure1: function _EvaluateVisitor_visitStyleRule__closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitStyleRule_closure9: function _EvaluateVisitor_visitStyleRule_closure9() { - }, - _EvaluateVisitor__warnForBogusCombinators_closure1: function _EvaluateVisitor__warnForBogusCombinators_closure1() { - }, - _EvaluateVisitor_visitSupportsRule_closure3: function _EvaluateVisitor_visitSupportsRule_closure3(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitSupportsRule__closure1: function _EvaluateVisitor_visitSupportsRule__closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitSupportsRule_closure4: function _EvaluateVisitor_visitSupportsRule_closure4() { - }, - _EvaluateVisitor__visitSupportsCondition_closure1: function _EvaluateVisitor__visitSupportsCondition_closure1(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - _EvaluateVisitor_visitVariableDeclaration_closure5: function _EvaluateVisitor_visitVariableDeclaration_closure5(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.node = t2; - }, - _EvaluateVisitor_visitVariableDeclaration_closure6: function _EvaluateVisitor_visitVariableDeclaration_closure6(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitVariableDeclaration_closure7: function _EvaluateVisitor_visitVariableDeclaration_closure7(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.value = t2; - }, - _EvaluateVisitor_visitUseRule_closure1: function _EvaluateVisitor_visitUseRule_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitWarnRule_closure1: function _EvaluateVisitor_visitWarnRule_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitWhileRule_closure1: function _EvaluateVisitor_visitWhileRule_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitWhileRule__closure1: function _EvaluateVisitor_visitWhileRule__closure1(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitBinaryOperationExpression_closure1: function _EvaluateVisitor_visitBinaryOperationExpression_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__slash_recommendation1: function _EvaluateVisitor__slash_recommendation1() { - }, - _EvaluateVisitor_visitVariableExpression_closure1: function _EvaluateVisitor_visitVariableExpression_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitUnaryOperationExpression_closure1: function _EvaluateVisitor_visitUnaryOperationExpression_closure1(t0, t1) { - this.node = t0; - this.operand = t1; - }, - _EvaluateVisitor_visitListExpression_closure1: function _EvaluateVisitor_visitListExpression_closure1(t0) { - this.$this = t0; - }, - _EvaluateVisitor_visitFunctionExpression_closure5: function _EvaluateVisitor_visitFunctionExpression_closure5(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitFunctionExpression_closure6: function _EvaluateVisitor_visitFunctionExpression_closure6() { - }, - _EvaluateVisitor_visitFunctionExpression_closure7: function _EvaluateVisitor_visitFunctionExpression_closure7(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.node = t2; - }, - _EvaluateVisitor__visitCalculation_closure1: function _EvaluateVisitor__visitCalculation_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__checkCalculationArguments_check1: function _EvaluateVisitor__checkCalculationArguments_check1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor__visitCalculationExpression_closure1: function _EvaluateVisitor__visitCalculationExpression_closure1(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.node = t2; - _.inLegacySassFunction = t3; - }, - _EvaluateVisitor__visitCalculationExpression__closure1: function _EvaluateVisitor__visitCalculationExpression__closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitInterpolatedFunctionExpression_closure1: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure1(t0, t1, t2) { - this.$this = t0; - this.node = t1; - this.$function = t2; - }, - _EvaluateVisitor__runUserDefinedCallable_closure1: function _EvaluateVisitor__runUserDefinedCallable_closure1(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.callable = t1; - _.evaluated = t2; - _.nodeWithSpan = t3; - _.run = t4; - _.V = t5; - }, - _EvaluateVisitor__runUserDefinedCallable__closure1: function _EvaluateVisitor__runUserDefinedCallable__closure1(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.evaluated = t1; - _.callable = t2; - _.nodeWithSpan = t3; - _.run = t4; - _.V = t5; - }, - _EvaluateVisitor__runUserDefinedCallable___closure1: function _EvaluateVisitor__runUserDefinedCallable___closure1(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.evaluated = t1; - _.callable = t2; - _.nodeWithSpan = t3; - _.run = t4; - _.V = t5; - }, - _EvaluateVisitor__runUserDefinedCallable____closure1: function _EvaluateVisitor__runUserDefinedCallable____closure1() { - }, - _EvaluateVisitor__runFunctionCallable_closure1: function _EvaluateVisitor__runFunctionCallable_closure1(t0, t1) { - this.$this = t0; - this.callable = t1; - }, - _EvaluateVisitor__runBuiltInCallable_closure5: function _EvaluateVisitor__runBuiltInCallable_closure5(t0, t1, t2) { - this._box_0 = t0; - this.evaluated = t1; - this.namedSet = t2; - }, - _EvaluateVisitor__runBuiltInCallable_closure6: function _EvaluateVisitor__runBuiltInCallable_closure6(t0, t1) { - this._box_0 = t0; - this.evaluated = t1; - }, - _EvaluateVisitor__runBuiltInCallable_closure7: function _EvaluateVisitor__runBuiltInCallable_closure7() { - }, - _EvaluateVisitor__evaluateArguments_closure7: function _EvaluateVisitor__evaluateArguments_closure7() { - }, - _EvaluateVisitor__evaluateArguments_closure8: function _EvaluateVisitor__evaluateArguments_closure8(t0, t1) { - this.$this = t0; - this.restNodeForSpan = t1; - }, - _EvaluateVisitor__evaluateArguments_closure9: function _EvaluateVisitor__evaluateArguments_closure9(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.named = t1; - _.restNodeForSpan = t2; - _.namedNodes = t3; - }, - _EvaluateVisitor__evaluateArguments_closure10: function _EvaluateVisitor__evaluateArguments_closure10() { - }, - _EvaluateVisitor__evaluateMacroArguments_closure7: function _EvaluateVisitor__evaluateMacroArguments_closure7(t0) { - this.restArgs = t0; - }, - _EvaluateVisitor__evaluateMacroArguments_closure8: function _EvaluateVisitor__evaluateMacroArguments_closure8(t0, t1, t2) { - this.$this = t0; - this.restNodeForSpan = t1; - this.restArgs = t2; - }, - _EvaluateVisitor__evaluateMacroArguments_closure9: function _EvaluateVisitor__evaluateMacroArguments_closure9(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.named = t1; - _.restNodeForSpan = t2; - _.restArgs = t3; - }, - _EvaluateVisitor__evaluateMacroArguments_closure10: function _EvaluateVisitor__evaluateMacroArguments_closure10(t0, t1, t2) { - this.$this = t0; - this.keywordRestNodeForSpan = t1; - this.keywordRestArgs = t2; - }, - _EvaluateVisitor__addRestMap_closure1: function _EvaluateVisitor__addRestMap_closure1(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.values = t1; - _.convert = t2; - _.expressionNode = t3; - _.map = t4; - _.nodeWithSpan = t5; - }, - _EvaluateVisitor__verifyArguments_closure1: function _EvaluateVisitor__verifyArguments_closure1(t0, t1, t2) { - this.$arguments = t0; - this.positional = t1; - this.named = t2; - }, - _EvaluateVisitor_visitCssAtRule_closure3: function _EvaluateVisitor_visitCssAtRule_closure3(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssAtRule_closure4: function _EvaluateVisitor_visitCssAtRule_closure4() { - }, - _EvaluateVisitor_visitCssKeyframeBlock_closure3: function _EvaluateVisitor_visitCssKeyframeBlock_closure3(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssKeyframeBlock_closure4: function _EvaluateVisitor_visitCssKeyframeBlock_closure4() { - }, - _EvaluateVisitor_visitCssMediaRule_closure5: function _EvaluateVisitor_visitCssMediaRule_closure5(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssMediaRule_closure6: function _EvaluateVisitor_visitCssMediaRule_closure6(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.mergedQueries = t1; - _.node = t2; - _.mergedSources = t3; - }, - _EvaluateVisitor_visitCssMediaRule__closure1: function _EvaluateVisitor_visitCssMediaRule__closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssMediaRule___closure1: function _EvaluateVisitor_visitCssMediaRule___closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssMediaRule_closure7: function _EvaluateVisitor_visitCssMediaRule_closure7(t0) { - this.mergedSources = t0; - }, - _EvaluateVisitor_visitCssStyleRule_closure4: function _EvaluateVisitor_visitCssStyleRule_closure4(t0, t1, t2) { - this.$this = t0; - this.rule = t1; - this.node = t2; - }, - _EvaluateVisitor_visitCssStyleRule__closure1: function _EvaluateVisitor_visitCssStyleRule__closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssStyleRule_closure3: function _EvaluateVisitor_visitCssStyleRule_closure3() { - }, - _EvaluateVisitor_visitCssSupportsRule_closure3: function _EvaluateVisitor_visitCssSupportsRule_closure3(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssSupportsRule__closure1: function _EvaluateVisitor_visitCssSupportsRule__closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _EvaluateVisitor_visitCssSupportsRule_closure4: function _EvaluateVisitor_visitCssSupportsRule_closure4() { - }, - _EvaluateVisitor__performInterpolationHelper_closure1: function _EvaluateVisitor__performInterpolationHelper_closure1(t0) { - this.interpolation = t0; - }, - _EvaluateVisitor__serialize_closure1: function _EvaluateVisitor__serialize_closure1(t0, t1) { - this.value = t0; - this.quote = t1; - }, - _EvaluateVisitor__expressionNode_closure1: function _EvaluateVisitor__expressionNode_closure1(t0, t1) { - this.$this = t0; - this.expression = t1; - }, - _EvaluateVisitor__withoutSlash_recommendation1: function _EvaluateVisitor__withoutSlash_recommendation1() { - }, - _EvaluateVisitor__stackFrame_closure1: function _EvaluateVisitor__stackFrame_closure1(t0) { - this.$this = t0; - }, - _ImportedCssVisitor1: function _ImportedCssVisitor1(t0) { - this._evaluate0$_visitor = t0; - }, - _ImportedCssVisitor_visitCssAtRule_closure1: function _ImportedCssVisitor_visitCssAtRule_closure1() { - }, - _ImportedCssVisitor_visitCssMediaRule_closure1: function _ImportedCssVisitor_visitCssMediaRule_closure1(t0) { - this.hasBeenMerged = t0; - }, - _ImportedCssVisitor_visitCssStyleRule_closure1: function _ImportedCssVisitor_visitCssStyleRule_closure1() { - }, - _ImportedCssVisitor_visitCssSupportsRule_closure1: function _ImportedCssVisitor_visitCssSupportsRule_closure1() { - }, - _EvaluationContext1: function _EvaluationContext1(t0, t1) { - this._evaluate0$_visitor = t0; - this._evaluate0$_defaultWarnNodeWithSpan = t1; - }, - EveryCssVisitor0: function EveryCssVisitor0() { - }, - EveryCssVisitor_visitCssAtRule_closure0: function EveryCssVisitor_visitCssAtRule_closure0(t0) { - this.$this = t0; - }, - EveryCssVisitor_visitCssKeyframeBlock_closure0: function EveryCssVisitor_visitCssKeyframeBlock_closure0(t0) { - this.$this = t0; - }, - EveryCssVisitor_visitCssMediaRule_closure0: function EveryCssVisitor_visitCssMediaRule_closure0(t0) { - this.$this = t0; - }, - EveryCssVisitor_visitCssStyleRule_closure0: function EveryCssVisitor_visitCssStyleRule_closure0(t0) { - this.$this = t0; - }, - EveryCssVisitor_visitCssStylesheet_closure0: function EveryCssVisitor_visitCssStylesheet_closure0(t0) { - this.$this = t0; - }, - EveryCssVisitor_visitCssSupportsRule_closure0: function EveryCssVisitor_visitCssSupportsRule_closure0(t0) { - this.$this = t0; - }, - throwNodeException(exception, ascii, color, trace) { - var wasAscii, jsException, t1, trace0; - trace = trace; - wasAscii = $._glyphs === B.C_AsciiGlyphSet; - $._glyphs = ascii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; - try { - t1 = A.callConstructor($.$get$exceptionClass(), [exception, B.JSString_methods.replaceFirst$2(exception.toString$1$color(0, color), "Error: ", "")]); - jsException = type$._NodeException._as(t1); - trace0 = A.getTrace0(exception); - trace = trace0 == null ? trace : trace0; - if (trace != null) - A.attachJsStack(jsException, trace); - A.jsThrow(jsException); - } finally { - $._glyphs = wasAscii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; - } - }, - _NodeException: function _NodeException() { - }, - exceptionClass_closure: function exceptionClass_closure() { - }, - exceptionClass__closure: function exceptionClass__closure() { - }, - exceptionClass__closure0: function exceptionClass__closure0() { - }, - exceptionClass__closure1: function exceptionClass__closure1() { - }, - SassException$0(message, span, loadedUrls) { - return new A.SassException0(loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); - }, - MultiSpanSassException$0(message, span, primaryLabel, secondarySpans, loadedUrls) { - var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); - return new A.MultiSpanSassException0(primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); - }, - SassRuntimeException$0(message, span, trace, loadedUrls) { - return new A.SassRuntimeException0(trace, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); - }, - MultiSpanSassRuntimeException$0(message, span, primaryLabel, secondarySpans, trace, loadedUrls) { - var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); - return new A.MultiSpanSassRuntimeException0(trace, primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); - }, - SassFormatException$0(message, span, loadedUrls) { - return new A.SassFormatException0(loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); - }, - MultiSpanSassFormatException$0(message, span, primaryLabel, secondarySpans, loadedUrls) { - var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); - return new A.MultiSpanSassFormatException0(primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); - }, - SassScriptException$0(message, argumentName) { - return new A.SassScriptException0(argumentName == null ? message : "$" + argumentName + ": " + message); - }, - MultiSpanSassScriptException$0(message, primaryLabel, secondarySpans) { - var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); - return new A.MultiSpanSassScriptException0(primaryLabel, t1, message); - }, - SassException0: function SassException0(t0, t1, t2) { - this.loadedUrls = t0; - this._span_exception$_message = t1; - this._span = t2; - }, - MultiSpanSassException0: function MultiSpanSassException0(t0, t1, t2, t3, t4) { - var _ = this; - _.primaryLabel = t0; - _.secondarySpans = t1; - _.loadedUrls = t2; - _._span_exception$_message = t3; - _._span = t4; - }, - SassRuntimeException0: function SassRuntimeException0(t0, t1, t2, t3) { - var _ = this; - _.trace = t0; - _.loadedUrls = t1; - _._span_exception$_message = t2; - _._span = t3; - }, - MultiSpanSassRuntimeException0: function MultiSpanSassRuntimeException0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.trace = t0; - _.primaryLabel = t1; - _.secondarySpans = t2; - _.loadedUrls = t3; - _._span_exception$_message = t4; - _._span = t5; - }, - SassFormatException0: function SassFormatException0(t0, t1, t2) { - this.loadedUrls = t0; - this._span_exception$_message = t1; - this._span = t2; - }, - MultiSpanSassFormatException0: function MultiSpanSassFormatException0(t0, t1, t2, t3, t4) { - var _ = this; - _.primaryLabel = t0; - _.secondarySpans = t1; - _.loadedUrls = t2; - _._span_exception$_message = t3; - _._span = t4; - }, - SassScriptException0: function SassScriptException0(t0) { - this.message = t0; - }, - MultiSpanSassScriptException0: function MultiSpanSassScriptException0(t0, t1, t2) { - this.primaryLabel = t0; - this.secondarySpans = t1; - this.message = t2; - }, - Exports: function Exports() { - }, - LoggerNamespace: function LoggerNamespace() { - }, - Expression0: function Expression0() { - }, - JSExpressionVisitor: function JSExpressionVisitor(t0) { - this._expression$_inner = t0; - }, - JSExpressionVisitorObject: function JSExpressionVisitorObject() { - }, - expressionToCalc0(expression) { - var t4, - t1 = A._setArrayType([B.C__MakeExpressionCalculationSafe0.visitBinaryOperationExpression$1(0, expression)], type$.JSArray_Expression_2), - t2 = expression.get$span(0), - t3 = type$.Expression_2; - t1 = A.List_List$unmodifiable(t1, t3); - t3 = A.ConstantMap_ConstantMap$from(B.Map_empty14, type$.String, t3); - t4 = expression.get$span(0); - return new A.FunctionExpression0(null, A.stringReplaceAllUnchecked("calc", "_", "-"), "calc", new A.ArgumentInvocation0(t1, t3, null, null, t2), t4); - }, - _MakeExpressionCalculationSafe0: function _MakeExpressionCalculationSafe0() { - }, - __MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0: function __MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0() { - }, - ExtendRule0: function ExtendRule0(t0, t1, t2) { - this.selector = t0; - this.isOptional = t1; - this.span = t2; - }, - Extension0: function Extension0(t0, t1, t2, t3, t4) { - var _ = this; - _.extender = t0; - _.target = t1; - _.mediaContext = t2; - _.isOptional = t3; - _.span = t4; - }, - Extender0: function Extender0(t0, t1) { - this.selector = t0; - this.isOriginal = t1; - this._extension$_extension = null; - }, - ExtensionStore__extendOrReplace0(selector, source, targets, mode, span) { - var t1, t2, t3, t4, t5, t6, t7, t8, _i, complex, compound, t9, t10, t11, _i0, simple, t12, _i1, t13, t14, - extender = A.ExtensionStore$_mode0(mode); - if (!selector.accept$1(B._IsInvisibleVisitor_true0)) - extender._extension_store$_originals.addAll$1(0, selector.components); - for (t1 = targets.components, t2 = t1.length, t3 = source.components, t4 = t3.length, t5 = type$.ComplexSelector_2, t6 = type$.Extension_2, t7 = type$.SimpleSelector_2, t8 = type$.Map_ComplexSelector_Extension_2, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - compound = complex.get$singleCompound(); - if (compound == null) - throw A.wrapException(A.SassScriptException$0("Can't extend complex selector " + A.S(complex) + ".", null)); - t9 = A.LinkedHashMap_LinkedHashMap$_empty(t7, t8); - for (t10 = compound.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) { - simple = t10[_i0]; - t12 = A.LinkedHashMap_LinkedHashMap$_empty(t5, t6); - for (_i1 = 0; _i1 < t4; ++_i1) { - complex = t3[_i1]; - complex.get$specificity(); - t13 = new A.Extender0(complex, false); - t14 = new A.Extension0(t13, simple, null, true, span); - t13._extension$_extension = t14; - t12.$indexSet(0, complex, t14); - } - t9.$indexSet(0, simple, t12); - } - selector = extender._extension_store$_extendList$2(selector, t9); - } - return selector; - }, - ExtensionStore$0() { - var t1 = type$.SimpleSelector_2; - return new A.ExtensionStore0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList_2, type$.List_CssMediaQuery_2), new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int_2), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector_2), B.ExtendMode_normal_normal0); - }, - ExtensionStore$_mode0(_mode) { - var t1 = type$.SimpleSelector_2; - return new A.ExtensionStore0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList_2, type$.List_CssMediaQuery_2), new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int_2), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector_2), _mode); - }, - ExtensionStore0: function ExtensionStore0(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _._extension_store$_selectors = t0; - _._extension_store$_extensions = t1; - _._extension_store$_extensionsByExtender = t2; - _._extension_store$_mediaContexts = t3; - _._extension_store$_sourceSpecificity = t4; - _._extension_store$_originals = t5; - _._extension_store$_mode = t6; - }, - ExtensionStore_extensionsWhereTarget_closure0: function ExtensionStore_extensionsWhereTarget_closure0() { - }, - ExtensionStore__registerSelector_closure0: function ExtensionStore__registerSelector_closure0() { - }, - ExtensionStore_addExtension_closure2: function ExtensionStore_addExtension_closure2() { - }, - ExtensionStore_addExtension_closure3: function ExtensionStore_addExtension_closure3() { - }, - ExtensionStore_addExtension_closure4: function ExtensionStore_addExtension_closure4(t0) { - this.complex = t0; - }, - ExtensionStore__extendExistingExtensions_closure1: function ExtensionStore__extendExistingExtensions_closure1() { - }, - ExtensionStore__extendExistingExtensions_closure2: function ExtensionStore__extendExistingExtensions_closure2() { - }, - ExtensionStore_addExtensions_closure0: function ExtensionStore_addExtensions_closure0() { - }, - ExtensionStore__extendComplex_closure0: function ExtensionStore__extendComplex_closure0(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.complex = t2; - }, - ExtensionStore__extendComplex__closure0: function ExtensionStore__extendComplex__closure0(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.complex = t2; - }, - ExtensionStore__extendCompound_closure2: function ExtensionStore__extendCompound_closure2() { - }, - ExtensionStore__extendCompound_closure3: function ExtensionStore__extendCompound_closure3() { - }, - ExtensionStore__extendCompound_closure4: function ExtensionStore__extendCompound_closure4(t0) { - this.original = t0; - }, - ExtensionStore__extendSimple_withoutPseudo0: function ExtensionStore__extendSimple_withoutPseudo0(t0, t1, t2) { - this.$this = t0; - this.extensions = t1; - this.targetsUsed = t2; - }, - ExtensionStore__extendSimple_closure1: function ExtensionStore__extendSimple_closure1(t0, t1) { - this.$this = t0; - this.withoutPseudo = t1; - }, - ExtensionStore__extendSimple_closure2: function ExtensionStore__extendSimple_closure2() { - }, - ExtensionStore__extendPseudo_closure4: function ExtensionStore__extendPseudo_closure4() { - }, - ExtensionStore__extendPseudo_closure5: function ExtensionStore__extendPseudo_closure5() { - }, - ExtensionStore__extendPseudo_closure6: function ExtensionStore__extendPseudo_closure6() { - }, - ExtensionStore__extendPseudo_closure7: function ExtensionStore__extendPseudo_closure7(t0) { - this.pseudo = t0; - }, - ExtensionStore__extendPseudo_closure8: function ExtensionStore__extendPseudo_closure8(t0, t1) { - this.pseudo = t0; - this.selector = t1; - }, - ExtensionStore__trim_closure1: function ExtensionStore__trim_closure1(t0, t1) { - this._box_0 = t0; - this.complex1 = t1; - }, - ExtensionStore__trim_closure2: function ExtensionStore__trim_closure2(t0, t1) { - this._box_0 = t0; - this.complex1 = t1; - }, - ExtensionStore_clone_closure0: function ExtensionStore_clone_closure0(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.newSelectors = t1; - _.oldToNewSelectors = t2; - _.newMediaContexts = t3; - }, - FiberClass: function FiberClass() { - }, - Fiber: function Fiber() { - }, - JSToDartFileImporter: function JSToDartFileImporter(t0) { - this._file0$_findFileUrl = t0; - }, - JSToDartFileImporter_canonicalize_closure: function JSToDartFileImporter_canonicalize_closure(t0, t1) { - this.$this = t0; - this.url = t1; - }, - FilesystemImporter0: function FilesystemImporter0(t0, t1) { - this._filesystem$_loadPath = t0; - this._filesystem$_loadPathDeprecated = t1; - }, - FilesystemImporter_canonicalize_closure0: function FilesystemImporter_canonicalize_closure0() { - }, - ForRule$0(variable, from, to, children, span, exclusive) { - var t1 = A.List_List$unmodifiable(children, type$.Statement_2), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); - return new A.ForRule0(variable, from, to, exclusive, span, t1, t2); - }, - ForRule0: function ForRule0(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.variable = t0; - _.from = t1; - _.to = t2; - _.isExclusive = t3; - _.span = t4; - _.children = t5; - _.hasDeclarations = t6; - }, - ForwardRule0: function ForwardRule0(t0, t1, t2, t3, t4, t5, t6, t7) { - var _ = this; - _.url = t0; - _.shownMixinsAndFunctions = t1; - _.shownVariables = t2; - _.hiddenMixinsAndFunctions = t3; - _.hiddenVariables = t4; - _.prefix = t5; - _.configuration = t6; - _.span = t7; - }, - ForwardedModuleView_ifNecessary0(inner, rule, $T) { - var t2, - t1 = false; - if (rule.prefix == null) - if (rule.shownMixinsAndFunctions == null) - if (rule.shownVariables == null) { - t2 = rule.hiddenMixinsAndFunctions; - t2 = t2 == null ? null : t2._base.get$isEmpty(0); - if (t2 === true) { - t1 = rule.hiddenVariables; - t1 = t1 == null ? null : t1._base.get$isEmpty(0); - t1 = t1 === true; - } - } - if (t1) - return inner; - else - return A.ForwardedModuleView$0(inner, rule, $T); - }, - ForwardedModuleView$0(_inner, _rule, $T) { - var t1 = _rule.prefix, - t2 = _rule.shownVariables, - t3 = _rule.hiddenVariables, - t4 = _rule.shownMixinsAndFunctions, - t5 = _rule.hiddenMixinsAndFunctions; - return new A.ForwardedModuleView0(_inner, _rule, A.ForwardedModuleView__forwardedMap0(_inner.get$variables(), t1, t2, t3, type$.Value_2), A.ForwardedModuleView__forwardedMap0(_inner.get$variableNodes(), t1, t2, t3, type$.AstNode_2), A.ForwardedModuleView__forwardedMap0(_inner.get$functions(_inner), t1, t4, t5, $T), A.ForwardedModuleView__forwardedMap0(_inner.get$mixins(), t1, t4, t5, $T), $T._eval$1("ForwardedModuleView0<0>")); - }, - ForwardedModuleView__forwardedMap0(map, prefix, safelist, blocklist, $V) { - var t1 = prefix == null, - t2 = false; - if (t1) - if (safelist == null) - t2 = blocklist == null || blocklist._base.get$isEmpty(0); - if (t2) - return map; - if (!t1) - map = new A.PrefixedMapView0(map, prefix, $V._eval$1("PrefixedMapView0<0>")); - if (safelist != null) - map = new A.LimitedMapView0(map, safelist._base.intersection$1(new A.MapKeySet(map, type$.MapKeySet_nullable_Object)), type$.$env_1_1_String._bind$1($V)._eval$1("LimitedMapView0<1,2>")); - else if (blocklist != null && blocklist._base.get$isNotEmpty(0)) - map = A.LimitedMapView$blocklist0(map, blocklist, type$.String, $V); - return map; - }, - ForwardedModuleView0: function ForwardedModuleView0(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _._forwarded_view0$_inner = t0; - _._forwarded_view0$_rule = t1; - _.variables = t2; - _.variableNodes = t3; - _.functions = t4; - _.mixins = t5; - _.$ti = t6; - }, - FunctionExpression0: function FunctionExpression0(t0, t1, t2, t3, t4) { - var _ = this; - _.namespace = t0; - _.name = t1; - _.originalName = t2; - _.$arguments = t3; - _.span = t4; - }, - JSFunction0: function JSFunction0() { - }, - SupportsFunction0: function SupportsFunction0(t0, t1, t2) { - this.name = t0; - this.$arguments = t1; - this.span = t2; - }, - functionClass_closure: function functionClass_closure() { - }, - functionClass__closure: function functionClass__closure() { - }, - functionClass__closure0: function functionClass__closure0() { - }, - SassFunction0: function SassFunction0(t0) { - this.callable = t0; - }, - FunctionRule$0($name, $arguments, children, span, comment) { - var t1 = A.stringReplaceAllUnchecked($name, "_", "-"), - t2 = A.List_List$unmodifiable(children, type$.Statement_2), - t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); - return new A.FunctionRule0(t1, $name, $arguments, span, t2, t3); - }, - FunctionRule0: function FunctionRule0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.name = t0; - _.originalName = t1; - _.$arguments = t2; - _.span = t3; - _.children = t4; - _.hasDeclarations = t5; - }, - unifyComplex0(complexes, span) { - var t2, trailingCombinator, leadingCombinator, unifiedBase, t3, t4, _0_6_isSet, _0_6, t5, newLeadingCombinator, base, _1_1, newTrailingCombinator, unifiedBase0, t6, t7, t8, _null = null, - t1 = J.getInterceptor$asx(complexes); - if (t1.get$length(complexes) === 1) - return complexes; - for (t2 = t1.get$iterator(complexes), trailingCombinator = _null, leadingCombinator = trailingCombinator, unifiedBase = leadingCombinator; t2.moveNext$0();) { - t3 = t2.get$current(t2); - if (t3.accept$1(B.C__IsUselessVisitor0)) - return _null; - t4 = t3.components; - _0_6_isSet = t4.length === 1; - if (_0_6_isSet) { - _0_6 = t3.leadingCombinators; - t5 = _0_6.length === 1; - } else { - _0_6 = _null; - t5 = false; - } - if (t5) { - newLeadingCombinator = (_0_6_isSet ? _0_6 : t3.leadingCombinators)[0]; - if (leadingCombinator == null) - leadingCombinator = newLeadingCombinator; - else if (!(leadingCombinator.$ti._is(newLeadingCombinator) && J.$eq$(newLeadingCombinator.value, leadingCombinator.value))) - return _null; - } - base = B.JSArray_methods.get$last(t4); - _1_1 = base.combinators; - if (_1_1.length === 1) { - newTrailingCombinator = _1_1[0]; - if (trailingCombinator != null) - t3 = !(trailingCombinator.$ti._is(newTrailingCombinator) && J.$eq$(newTrailingCombinator.value, trailingCombinator.value)); - else - t3 = false; - if (t3) - return _null; - trailingCombinator = newTrailingCombinator; - } - unifiedBase0 = base.selector; - if (unifiedBase == null) - unifiedBase = unifiedBase0; - else { - unifiedBase = A.unifyCompound0(unifiedBase, unifiedBase0); - if (unifiedBase == null) - return _null; - } - } - t2 = type$.JSArray_ComplexSelector_2; - t3 = A._setArrayType([], t2); - for (t4 = t1.get$iterator(complexes); t4.moveNext$0();) { - t5 = t4.get$current(t4); - t6 = t5.components; - t7 = t6.length; - if (t7 > 1) { - t8 = t5.leadingCombinators; - t3.push(A.ComplexSelector$0(t8, B.JSArray_methods.take$1(t6, t7 - 1), t5.span, t5.lineBreak)); - } - } - t4 = leadingCombinator == null ? B.List_empty14 : A._setArrayType([leadingCombinator], type$.JSArray_CssValue_Combinator_2); - unifiedBase.toString; - t5 = trailingCombinator == null ? B.List_empty14 : A._setArrayType([trailingCombinator], type$.JSArray_CssValue_Combinator_2); - base = A.ComplexSelector$0(t4, A._setArrayType([new A.ComplexSelectorComponent0(unifiedBase, A.List_List$unmodifiable(t5, type$.CssValue_Combinator_2), span)], type$.JSArray_ComplexSelectorComponent_2), span, t1.any$1(complexes, new A.unifyComplex_closure0())); - if (t3.length === 0) - t1 = A._setArrayType([base], t2); - else { - t1 = A.List_List$of(A.IterableExtension_get_exceptLast0(t3), true, type$.ComplexSelector_2); - t1.push(B.JSArray_methods.get$last(t3).concatenate$2(base, span)); - } - return A.weave0(t1, span, false); - }, - unifyCompound0(compound1, compound2) { - var t1, t2, pseudoElementFound, _i, simple, unified, - result = compound1.components, - pseudoResult = A._setArrayType([], type$.JSArray_SimpleSelector_2); - for (t1 = compound2.components, t2 = t1.length, pseudoElementFound = false, _i = 0; _i < t2; ++_i) { - simple = t1[_i]; - if (pseudoElementFound && simple instanceof A.PseudoSelector0) { - unified = simple.unify$1(pseudoResult); - if (unified == null) - return null; - pseudoResult = unified; - } else { - pseudoElementFound = B.JSBool_methods.$or(pseudoElementFound, simple instanceof A.PseudoSelector0 && !simple.isClass); - unified = simple.unify$1(result); - if (unified == null) - return null; - result = unified; - } - } - t1 = A.List_List$of(result, true, type$.SimpleSelector_2); - B.JSArray_methods.addAll$1(t1, pseudoResult); - return A.CompoundSelector$0(t1, compound1.span); - }, - unifyUniversalAndElement0(selector1, selector2) { - var namespace, $name, t1, - _0_0 = A._namespaceAndName0(selector1, "selector1"), - namespace1 = _0_0._0, - name1 = _0_0._1, - _1_0 = A._namespaceAndName0(selector2, "selector2"), - namespace2 = _1_0._0, - name2 = _1_0._1; - if (namespace1 == namespace2 || namespace2 === "*") - namespace = namespace1; - else { - if (namespace1 !== "*") - return null; - namespace = namespace2; - } - if (name1 == name2 || name2 == null) - $name = name1; - else { - if (!(name1 == null || name1 === "*")) - return null; - $name = name2; - } - t1 = selector1.span; - return $name == null ? new A.UniversalSelector0(namespace, t1) : new A.TypeSelector0(new A.QualifiedName0($name, namespace), t1); - }, - _namespaceAndName0(selector, $name) { - var t1, _0_4; - $label0$0: { - if (selector instanceof A.UniversalSelector0) { - t1 = new A._Record_2(selector.namespace, null); - break $label0$0; - } - if (selector instanceof A.TypeSelector0) { - _0_4 = selector.name; - t1 = new A._Record_2(_0_4.namespace, _0_4.name); - break $label0$0; - } - t1 = A.throwExpression(A.ArgumentError$value(selector, $name, string$.must_b)); - } - return t1; - }, - weave0(complexes, span, forceLineBreak) { - var complex, t2, prefixes, t3, t4, t5, t6, i, t7, t8, _i, t9, t10, _i0, parentPrefix, t11, t12, - t1 = J.getInterceptor$asx(complexes); - if (t1.get$length(complexes) === 1) { - complex = t1.$index(complexes, 0); - if (!forceLineBreak || complex.lineBreak) - return complexes; - return A._setArrayType([A.ComplexSelector$0(complex.leadingCombinators, complex.components, complex.span, true)], type$.JSArray_ComplexSelector_2); - } - t2 = type$.JSArray_ComplexSelector_2; - prefixes = A._setArrayType([t1.get$first(complexes)], t2); - for (t1 = t1.skip$1(complexes, 1), t3 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t3._eval$1("ListIterator")), t4 = type$.ComplexSelectorComponent_2, t3 = t3._eval$1("ListIterable.E"); t1.moveNext$0();) { - t5 = t1.__internal$_current; - if (t5 == null) - t5 = t3._as(t5); - t6 = t5.components; - if (t6.length === 1) { - for (i = 0; i < prefixes.length; ++i) - prefixes[i] = prefixes[i].concatenate$3$forceLineBreak(t5, span, forceLineBreak); - continue; - } - t7 = A._setArrayType([], t2); - for (t8 = prefixes.length, _i = 0; _i < prefixes.length; prefixes.length === t8 || (0, A.throwConcurrentModificationError)(prefixes), ++_i) { - t9 = A._weaveParents0(prefixes[_i], t5, span); - if (t9 == null) - t9 = B.List_empty15; - t10 = t9.length; - _i0 = 0; - for (; _i0 < t9.length; t9.length === t10 || (0, A.throwConcurrentModificationError)(t9), ++_i0) { - parentPrefix = t9[_i0]; - t11 = B.JSArray_methods.get$last(t6); - t12 = A.List_List$of(parentPrefix.components, true, t4); - t12.push(t11); - t11 = parentPrefix.lineBreak || forceLineBreak; - t7.push(A.ComplexSelector$0(parentPrefix.leadingCombinators, t12, span, t11)); - } - } - prefixes = t7; - } - return prefixes; - }, - _weaveParents0(prefix, base, span) { - var t1, queue1, queue2, trailingCombinators, _0_1, _0_3, _0_3_isSet, _0_30, rootish2, t2, rootish1, rootish, t3, rootish_case_0, t0, rootish_case_1, groups1, groups2, lcs, choices, t4, _i, group, t5, t6, t7, _i0, chunk, t8, t9, _null = null, - leadingCombinators = A._mergeLeadingCombinators0(prefix.leadingCombinators, base.leadingCombinators); - if (leadingCombinators == null) - return _null; - t1 = type$.ComplexSelectorComponent_2; - queue1 = A.QueueList_QueueList$from(prefix.components, t1); - queue2 = A.QueueList_QueueList$from(A.IterableExtension_get_exceptLast0(base.components), t1); - trailingCombinators = A._mergeTrailingCombinators0(queue1, queue2, span, _null); - if (trailingCombinators == null) - return _null; - $label0$0: { - _0_1 = A._firstIfRootish0(queue1); - _0_3 = A._firstIfRootish0(queue2); - _0_3_isSet = _0_1 != null; - _0_30 = _null; - rootish2 = _null; - t2 = false; - if (_0_3_isSet) { - rootish1 = _0_1 == null ? t1._as(_0_1) : _0_1; - t2 = _0_3 != null; - if (t2) - rootish2 = _0_3 == null ? t1._as(_0_3) : _0_3; - _0_30 = _0_3; - } else - rootish1 = _null; - if (t2) { - rootish = A.unifyCompound0(rootish1.selector, rootish2.selector); - if (rootish == null) - return _null; - t1 = rootish1.combinators; - t2 = rootish1.span; - t3 = type$.CssValue_Combinator_2; - queue1.addFirst$1(new A.ComplexSelectorComponent0(rootish, A.List_List$unmodifiable(t1, t3), t2)); - queue2.addFirst$1(new A.ComplexSelectorComponent0(rootish, A.List_List$unmodifiable(rootish2.combinators, t3), t2)); - break $label0$0; - } - t2 = _null; - t3 = false; - if (_0_1 != null) { - rootish_case_0 = _0_1; - if (_0_3_isSet) - t2 = _0_30; - else { - t2 = _0_3; - _0_30 = t2; - _0_3_isSet = true; - } - t2 = t2 == null; - t3 = t2 ? rootish_case_0 : _null; - t0 = t3; - t3 = t2; - t2 = t0; - } - if (!t3) - if (_0_1 == null) { - if (_0_3_isSet) - t3 = _0_30; - else { - t3 = _0_3; - _0_30 = t3; - _0_3_isSet = true; - } - t3 = t3 != null; - if (t3) { - rootish_case_1 = _0_3_isSet ? _0_30 : _0_3; - if (rootish_case_1 == null) - rootish_case_1 = t1._as(rootish_case_1); - t1 = rootish_case_1; - } else - t1 = t2; - t2 = t3; - } else { - t1 = t2; - t2 = false; - } - else { - t1 = t2; - t2 = true; - } - if (t2) { - queue1.addFirst$1(t1); - queue2.addFirst$1(t1); - } - } - groups1 = A._groupSelectors0(queue1); - groups2 = A._groupSelectors0(queue2); - t1 = type$.List_ComplexSelectorComponent_2; - lcs = A.longestCommonSubsequence0(groups2, groups1, new A._weaveParents_closure3(span), t1); - choices = A._setArrayType([], type$.JSArray_List_Iterable_ComplexSelectorComponent_2); - for (t2 = lcs.length, t3 = type$.JSArray_Iterable_ComplexSelectorComponent_2, t4 = type$.JSArray_ComplexSelectorComponent_2, _i = 0; _i < lcs.length; lcs.length === t2 || (0, A.throwConcurrentModificationError)(lcs), ++_i) { - group = lcs[_i]; - t5 = A._setArrayType([], t3); - for (t6 = A._chunks0(groups1, groups2, new A._weaveParents_closure4(group), t1), t7 = t6.length, _i0 = 0; _i0 < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i0) { - chunk = t6[_i0]; - t8 = A._setArrayType([], t4); - for (t9 = B.JSArray_methods.get$iterator(chunk); t9.moveNext$0();) - B.JSArray_methods.addAll$1(t8, t9.get$current(0)); - t5.push(t8); - } - choices.push(t5); - choices.push(A._setArrayType([group], t3)); - groups1.removeFirst$0(); - groups2.removeFirst$0(); - } - t2 = A._setArrayType([], t3); - for (t1 = A._chunks0(groups1, groups2, new A._weaveParents_closure5(), t1), t3 = t1.length, _i = 0; _i < t1.length; t1.length === t3 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - chunk = t1[_i]; - t5 = A._setArrayType([], t4); - for (t6 = B.JSArray_methods.get$iterator(chunk); t6.moveNext$0();) - B.JSArray_methods.addAll$1(t5, t6.get$current(0)); - t2.push(t5); - } - choices.push(t2); - B.JSArray_methods.addAll$1(choices, trailingCombinators); - t1 = A._setArrayType([], type$.JSArray_ComplexSelector_2); - for (t2 = J.get$iterator$ax(A.paths0(new A.WhereIterable(choices, new A._weaveParents_closure6(), type$.WhereIterable_List_Iterable_ComplexSelectorComponent_2), type$.Iterable_ComplexSelectorComponent_2)), t3 = !prefix.lineBreak, t5 = base.lineBreak; t2.moveNext$0();) { - t6 = t2.get$current(t2); - t7 = A._setArrayType([], t4); - for (t6 = J.get$iterator$ax(t6); t6.moveNext$0();) - B.JSArray_methods.addAll$1(t7, t6.get$current(t6)); - t1.push(A.ComplexSelector$0(leadingCombinators, t7, span, !t3 || t5)); - } - return t1; - }, - _firstIfRootish0(queue) { - var first, t1, t2, _i, simple, t3; - if (queue.get$length(0) >= 1) { - first = queue.$index(0, 0); - for (t1 = first.selector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { - simple = t1[_i]; - t3 = false; - if (simple instanceof A.PseudoSelector0) - if (simple.isClass) - t3 = $._rootishPseudoClasses0.contains$1(0, simple.normalizedName); - if (t3) { - queue.removeFirst$0(); - return first; - } - } - } - return null; - }, - _mergeLeadingCombinators0(combinators1, combinators2) { - var _0_4, t1, t2, _0_7_isSet, _0_7, t3, _0_4_isSet, _0_11, _0_11_isSet, combinators, _null = null; - $label0$0: { - _0_4 = combinators2; - t1 = _null; - t2 = type$.List_CssValue_Combinator_2; - _0_7_isSet = t2._is(combinators1); - _0_7 = _null; - if (_0_7_isSet) { - _0_7 = combinators1.length; - t3 = _0_7; - t3 = t3 > 1; - } else - t3 = false; - _0_4_isSet = true; - _0_11 = _null; - if (!t3) { - t3 = _0_4; - _0_11_isSet = t2._is(t3); - if (_0_11_isSet) { - t3 = _0_4; - _0_11 = (t3 == null ? t2._as(t3) : t3).length; - t3 = _0_11; - t3 = t3 > 1; - } else - t3 = false; - } else { - _0_11_isSet = false; - t3 = true; - } - if (t3) - break $label0$0; - if (t2._is(combinators1)) { - if (_0_7_isSet) - t3 = _0_7; - else { - _0_7 = combinators1.length; - t3 = _0_7; - } - t3 = t3 <= 0; - if (t3) - if (_0_4_isSet) - combinators = _0_4; - else { - combinators = combinators2; - _0_4 = combinators; - _0_4_isSet = true; - } - else - combinators = t1; - t1 = t3; - } else { - combinators = t1; - t1 = false; - } - if (!t1) { - t1 = false; - if (_0_4_isSet) - t3 = _0_4; - else { - t3 = combinators2; - _0_4 = t3; - _0_4_isSet = true; - } - if (t2._is(t3)) { - if (_0_11_isSet) - t1 = _0_11; - else { - t1 = _0_4_isSet ? _0_4 : combinators2; - _0_11 = (t1 == null ? t2._as(t1) : t1).length; - t1 = _0_11; - } - t1 = t1 <= 0; - } - combinators = combinators1; - } else - t1 = true; - if (t1) { - t1 = combinators; - break $label0$0; - } - t1 = B.C_ListEquality.equals$2(0, combinators1, combinators2) ? combinators1 : _null; - break $label0$0; - } - return t1; - }, - _mergeTrailingCombinators0(components1, components2, span, result) { - var _0_1, t1, _1_1, t2, t3, _4_1, _4_3, _4_4_isSet, _4_5, _4_4, component1, component2, t4, t5, choices, _2_0, _4_9, _4_6, _4_7, followingComponents, nextComponents, _4_4_isSet0, _4_6_isSet, _4_7_isSet, _4_10_isSet, _4_10, _4_5_isSet, next, following, _3_0, siblingComponents_case_0, siblingComponents_case_1, combinator1, t6, combinator2, unified, t7, combinator_case_0, combinatorComponents_case_0, descendantComponents_case_0, t0, combinator_case_1, descendantComponents_case_1, combinatorComponents_case_1, _null = null; - if (result == null) - result = A.QueueList$(_null, type$.List_List_ComplexSelectorComponent_2); - $label0$0: { - _0_1 = components1.get$length(0); - if (_0_1 >= 1) { - t1 = components1.$index(0, _0_1 - 1).combinators; - break $label0$0; - } - t1 = B.List_empty14; - break $label0$0; - } - $label1$1: { - _1_1 = components2.get$length(0); - if (_1_1 >= 1) { - t2 = components2.$index(0, _1_1 - 1).combinators; - break $label1$1; - } - t2 = B.List_empty14; - break $label1$1; - } - t3 = t1.length; - if (t3 === 0 && t2.length === 0) - return result; - if (t3 > 1 || t2.length > 1) - return _null; - $label2$2: { - t3 = A.IterableExtension_get_firstOrNull(t1); - t3 = t3 == null ? _null : t3.value; - t2 = A.IterableExtension_get_firstOrNull(t2); - t2 = [t3, t2 == null ? _null : t2.value, components1, components2]; - _4_1 = t2[0]; - _4_3 = B.Combinator_y180 === _4_1; - _4_4_isSet = _4_3; - _4_5 = _null; - _4_4 = _null; - if (_4_4_isSet) { - _4_4 = t2[1]; - _4_5 = B.Combinator_y180 === _4_4; - t3 = _4_5; - } else - t3 = false; - if (t3) { - component1 = components1.removeLast$0(0); - component2 = components2.removeLast$0(0); - t2 = component1.selector; - t3 = component2.selector; - if (A.compoundIsSuperselector0(t2, t3, _null)) - result.addFirst$1(A._setArrayType([A._setArrayType([component2], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); - else { - t4 = type$.JSArray_ComplexSelectorComponent_2; - t5 = type$.JSArray_List_ComplexSelectorComponent_2; - if (A.compoundIsSuperselector0(t3, t2, _null)) - result.addFirst$1(A._setArrayType([A._setArrayType([component1], t4)], t5)); - else { - choices = A._setArrayType([A._setArrayType([component1, component2], t4), A._setArrayType([component2, component1], t4)], t5); - _2_0 = A.unifyCompound0(t2, t3); - if (_2_0 != null) - choices.push(A._setArrayType([new A.ComplexSelectorComponent0(_2_0, A.List_List$unmodifiable(A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_CssValue_Combinator_2), type$.CssValue_Combinator_2), span)], t4)); - result.addFirst$1(choices); - } - } - break $label2$2; - } - _4_9 = _null; - _4_6 = _null; - _4_7 = _null; - followingComponents = _null; - nextComponents = _null; - if (_4_3) { - if (_4_4_isSet) { - t3 = _4_4; - _4_4_isSet0 = _4_4_isSet; - } else { - _4_4 = t2[1]; - t3 = _4_4; - _4_4_isSet0 = true; - } - _4_9 = B.Combinator_gRV0 === t3; - _4_6_isSet = _4_9; - if (_4_6_isSet) { - _4_6 = t2[2]; - _4_7 = t2[3]; - nextComponents = _4_7; - followingComponents = _4_6; - } - t3 = _4_6_isSet; - _4_7_isSet = t3; - } else { - _4_4_isSet0 = _4_4_isSet; - _4_6_isSet = false; - _4_7_isSet = false; - t3 = false; - } - _4_10_isSet = !t3; - _4_10 = _null; - if (_4_10_isSet) { - _4_10 = B.Combinator_gRV0 === _4_1; - t3 = _4_10; - if (t3) { - if (_4_4_isSet) { - t3 = _4_5; - _4_5_isSet = _4_4_isSet; - _4_4_isSet = _4_4_isSet0; - } else { - if (_4_4_isSet0) { - t3 = _4_4; - _4_4_isSet = _4_4_isSet0; - } else { - _4_4 = t2[1]; - t3 = _4_4; - _4_4_isSet = true; - } - _4_5 = B.Combinator_y180 === t3; - t3 = _4_5; - _4_5_isSet = true; - } - if (t3) { - if (_4_6_isSet) - nextComponents = _4_6; - else { - _4_6 = t2[2]; - nextComponents = _4_6; - _4_6_isSet = true; - } - if (_4_7_isSet) - followingComponents = _4_7; - else { - _4_7 = t2[3]; - followingComponents = _4_7; - _4_7_isSet = true; - } - } - } else { - _4_5_isSet = _4_4_isSet; - _4_4_isSet = _4_4_isSet0; - t3 = false; - } - } else { - _4_5_isSet = _4_4_isSet; - _4_4_isSet = _4_4_isSet0; - t3 = true; - } - if (t3) { - next = nextComponents.removeLast$0(0); - following = followingComponents.removeLast$0(0); - t1 = following.selector; - t2 = next.selector; - t3 = type$.JSArray_ComplexSelectorComponent_2; - t4 = type$.JSArray_List_ComplexSelectorComponent_2; - if (A.compoundIsSuperselector0(t1, t2, _null)) - result.addFirst$1(A._setArrayType([A._setArrayType([next], t3)], t4)); - else { - t4 = A._setArrayType([A._setArrayType([following, next], t3)], t4); - _3_0 = A.unifyCompound0(t1, t2); - if (_3_0 != null) - t4.push(A._setArrayType([new A.ComplexSelectorComponent0(_3_0, A.List_List$unmodifiable(next.combinators, type$.CssValue_Combinator_2), span)], t3)); - result.addFirst$1(t4); - } - break $label2$2; - } - t3 = _null; - if (B.Combinator_8I80 === _4_1) { - _4_4_isSet0 = true; - if (_4_3) - t4 = _4_9; - else { - if (_4_4_isSet) - t4 = _4_4; - else { - _4_4 = t2[1]; - t4 = _4_4; - _4_4_isSet = _4_4_isSet0; - } - _4_9 = B.Combinator_gRV0 === t4; - t4 = _4_9; - } - if (!t4) - if (_4_5_isSet) - t4 = _4_5; - else { - if (_4_4_isSet) - t4 = _4_4; - else { - _4_4 = t2[1]; - t4 = _4_4; - _4_4_isSet = _4_4_isSet0; - } - _4_5 = B.Combinator_y180 === t4; - t4 = _4_5; - } - else - t4 = true; - if (t4) { - if (_4_7_isSet) - siblingComponents_case_0 = _4_7; - else { - _4_7 = t2[3]; - siblingComponents_case_0 = _4_7; - _4_7_isSet = true; - } - t3 = siblingComponents_case_0; - } - } else - t4 = false; - if (!t4) { - if (_4_10_isSet) - t4 = _4_10; - else { - _4_10 = B.Combinator_gRV0 === _4_1; - t4 = _4_10; - } - if (!t4) - t4 = _4_3; - else - t4 = true; - if (t4) { - if (_4_4_isSet) - t4 = _4_4; - else { - _4_4 = t2[1]; - t4 = _4_4; - _4_4_isSet = true; - } - t4 = B.Combinator_8I80 === t4; - if (t4) { - if (_4_6_isSet) - siblingComponents_case_1 = _4_6; - else { - _4_6 = t2[2]; - siblingComponents_case_1 = _4_6; - _4_6_isSet = true; - } - t3 = siblingComponents_case_1; - } - } else - t4 = false; - } else - t4 = true; - if (t4) { - result.addFirst$1(A._setArrayType([A._setArrayType([t3.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); - break $label2$2; - } - t3 = _4_1 == null; - t4 = !t3; - t5 = false; - if (t4) { - _4_4_isSet0 = true; - combinator1 = _4_1; - if (_4_4_isSet) - t6 = _4_4; - else { - _4_4 = t2[1]; - t6 = _4_4; - _4_4_isSet = _4_4_isSet0; - } - if (t6 != null) { - if (_4_4_isSet) - combinator2 = _4_4; - else { - _4_4 = t2[1]; - combinator2 = _4_4; - _4_4_isSet = _4_4_isSet0; - } - t5 = combinator1 === (combinator2 == null ? type$.Combinator_2._as(combinator2) : combinator2); - } - } - if (t5) { - unified = A.unifyCompound0(components1.removeLast$0(0).selector, components2.removeLast$0(0).selector); - if (unified == null) - return _null; - result.addFirst$1(A._setArrayType([A._setArrayType([new A.ComplexSelectorComponent0(unified, A.List_List$unmodifiable(A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_CssValue_Combinator_2), type$.CssValue_Combinator_2), span)], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); - break $label2$2; - } - t1 = _null; - t5 = _null; - t6 = _null; - t7 = false; - if (t4) { - combinator_case_0 = _4_1; - if (_4_4_isSet) - t4 = _4_4; - else { - _4_4 = t2[1]; - t4 = _4_4; - _4_4_isSet = true; - } - t4 = t4 == null; - if (t4) { - if (_4_6_isSet) - combinatorComponents_case_0 = _4_6; - else { - _4_6 = t2[2]; - combinatorComponents_case_0 = _4_6; - _4_6_isSet = true; - } - if (_4_7_isSet) - descendantComponents_case_0 = _4_7; - else { - _4_7 = t2[3]; - descendantComponents_case_0 = _4_7; - _4_7_isSet = true; - } - t1 = descendantComponents_case_0; - t6 = t1; - t1 = combinator_case_0; - t5 = combinatorComponents_case_0; - } - t0 = t6; - t6 = t4; - t4 = t5; - t5 = t0; - } else { - t4 = t5; - t5 = t6; - t6 = t7; - } - if (!t6) - if (t3) { - if (_4_4_isSet) - t3 = _4_4; - else { - _4_4 = t2[1]; - t3 = _4_4; - _4_4_isSet = true; - } - t3 = t3 != null; - if (t3) { - combinator_case_1 = _4_4_isSet ? _4_4 : t2[1]; - if (combinator_case_1 == null) - combinator_case_1 = type$.Combinator_2._as(combinator_case_1); - descendantComponents_case_1 = _4_6_isSet ? _4_6 : t2[2]; - combinatorComponents_case_1 = _4_7_isSet ? _4_7 : t2[3]; - t1 = combinatorComponents_case_1; - t2 = descendantComponents_case_1; - t4 = t2; - t2 = t1; - t1 = combinator_case_1; - } else { - t2 = t4; - t4 = t5; - } - t0 = t4; - t4 = t3; - t3 = t0; - } else { - t3 = t5; - t2 = t4; - t4 = false; - } - else { - t3 = t5; - t2 = t4; - t4 = true; - } - if (t4) { - if (t1 === B.Combinator_8I80) { - t1 = A.IterableExtension_get_lastOrNull(t3); - t1 = t1 == null ? _null : A.compoundIsSuperselector0(t1.selector, t2.get$last(t2).selector, _null); - t1 = t1 === true; - } else - t1 = false; - if (t1) - t3.removeLast$0(0); - result.addFirst$1(A._setArrayType([A._setArrayType([t2.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); - break $label2$2; - } - return _null; - } - return A._mergeTrailingCombinators0(components1, components2, span, result); - }, - _mustUnify0(complex1, complex2) { - var t2, t3, t4, - t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector_2); - for (t2 = J.get$iterator$ax(complex1); t2.moveNext$0();) - for (t3 = B.JSArray_methods.get$iterator(t2.get$current(t2).selector.components), t4 = new A.WhereIterator(t3, A.functions0___isUnique$closure()); t4.moveNext$0();) - t1.add$1(0, t3.get$current(0)); - if (t1._collection$_length === 0) - return false; - return J.any$1$ax(complex2, new A._mustUnify_closure0(t1)); - }, - _isUnique0(simple) { - var t1; - if (!(simple instanceof A.IDSelector0)) - t1 = simple instanceof A.PseudoSelector0 && !simple.isClass; - else - t1 = true; - return t1; - }, - _chunks0(queue1, queue2, done, $T) { - var chunk2, _0_4, _0_5_isSet, _0_1, _0_7, _0_5, chunk, _0_5_isSet0, t2, _null = null, - t1 = $T._eval$1("JSArray<0>"), - chunk1 = A._setArrayType([], t1); - for (; !done.call$1(queue1);) - chunk1.push(queue1.removeFirst$0()); - chunk2 = A._setArrayType([], t1); - for (; !done.call$1(queue2);) - chunk2.push(queue2.removeFirst$0()); - $label0$0: { - _0_4 = chunk1.length <= 0; - _0_5_isSet = _0_4; - _0_1 = chunk1; - _0_7 = _null; - _0_5 = _null; - if (_0_5_isSet) { - _0_7 = chunk2.length <= 0; - t1 = _0_7; - _0_5 = chunk2; - } else - t1 = false; - if (t1) { - t1 = A._setArrayType([], $T._eval$1("JSArray>")); - break $label0$0; - } - if (_0_4) - if (_0_5_isSet) { - chunk = _0_5; - _0_5_isSet0 = _0_5_isSet; - } else { - chunk = chunk2; - _0_5 = chunk; - _0_5_isSet0 = true; - } - else { - chunk = _null; - _0_5_isSet0 = _0_5_isSet; - } - if (!_0_4) { - if (_0_5_isSet) - t1 = _0_7; - else { - _0_7 = (_0_5_isSet0 ? _0_5 : chunk2).length <= 0; - t1 = _0_7; - } - chunk = _0_1; - } else - t1 = true; - if (t1) { - t1 = A._setArrayType([chunk], $T._eval$1("JSArray>")); - break $label0$0; - } - t1 = A.List_List$of(chunk1, true, $T); - B.JSArray_methods.addAll$1(t1, chunk2); - t2 = A.List_List$of(chunk2, true, $T); - B.JSArray_methods.addAll$1(t2, chunk1); - t2 = A._setArrayType([t1, t2], $T._eval$1("JSArray>")); - t1 = t2; - break $label0$0; - } - return t1; - }, - paths0(choices, $T) { - return J.fold$2$ax(choices, A._setArrayType([A._setArrayType([], $T._eval$1("JSArray<0>"))], $T._eval$1("JSArray>")), new A.paths_closure0($T)); - }, - _groupSelectors0(complex) { - var t2, t3, t4, - groups = A.QueueList$(null, type$.List_ComplexSelectorComponent_2), - t1 = type$.JSArray_ComplexSelectorComponent_2, - group = A._setArrayType([], t1); - for (t2 = complex.$ti, t3 = new A.ListIterator(complex, complex.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t3.moveNext$0();) { - t4 = t3.__internal$_current; - if (t4 == null) - t4 = t2._as(t4); - group.push(t4); - if (t4.combinators.length === 0) { - groups._queue_list$_add$1(group); - group = A._setArrayType([], t1); - } - } - if (group.length !== 0) - groups._queue_list$_add$1(group); - return groups; - }, - listIsSuperselector0(list1, list2) { - return B.JSArray_methods.every$1(list2, new A.listIsSuperselector_closure0(list1)); - }, - _complexIsParentSuperselector0(complex1, complex2) { - var t1, base, t2; - if (J.get$length$asx(complex1) > J.get$length$asx(complex2)) - return false; - t1 = $.$get$bogusSpan0(); - base = new A.ComplexSelectorComponent0(A.CompoundSelector$0(A._setArrayType([new A.PlaceholderSelector0("", t1)], type$.JSArray_SimpleSelector_2), t1), A.List_List$unmodifiable(B.List_empty14, type$.CssValue_Combinator_2), t1); - t1 = type$.ComplexSelectorComponent_2; - t2 = A.List_List$of(complex1, true, t1); - t2.push(base); - t1 = A.List_List$of(complex2, true, t1); - t1.push(base); - return A.complexIsSuperselector0(t2, t1); - }, - complexIsSuperselector0(complex1, complex2) { - var t1, t2, previousCombinator, i1, i2, remaining1, remaining2, component1, t3, t4, endOfSubselector, component2, t5, combinator1, _null = null; - if (B.JSArray_methods.get$last(complex1).combinators.length !== 0) - return false; - if (B.JSArray_methods.get$last(complex2).combinators.length !== 0) - return false; - for (t1 = A._arrayInstanceType(complex2), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), previousCombinator = _null, i1 = 0, i2 = 0; true; previousCombinator = combinator1) { - remaining1 = complex1.length - i1; - remaining2 = complex2.length - i2; - if (remaining1 === 0 || remaining2 === 0) - return false; - if (remaining1 > remaining2) - return false; - component1 = complex1[i1]; - t3 = component1.combinators; - if (t3.length > 1) - return false; - if (remaining1 === 1) - if (B.JSArray_methods.any$1(complex2, new A.complexIsSuperselector_closure1())) - return false; - else { - t1 = component1.selector; - t2 = B.JSArray_methods.get$last(complex2).selector; - return A.compoundIsSuperselector0(t1, t2, t1.get$hasComplicatedSuperselectorSemantics() ? B.JSArray_methods.sublist$2(complex2, i2, complex2.length - 1) : _null); - } - for (t4 = component1.selector, endOfSubselector = i2; true;) { - component2 = complex2[endOfSubselector]; - if (component2.combinators.length > 1) - return false; - t5 = component2.selector; - if (A.compoundIsSuperselector0(t4, t5, t4.get$hasComplicatedSuperselectorSemantics() ? B.JSArray_methods.sublist$2(complex2, i2, endOfSubselector) : _null)) - break; - ++endOfSubselector; - if (endOfSubselector === complex2.length - 1) - return false; - } - t4 = new A.SubListIterable(complex2, 0, endOfSubselector, t1); - t4.SubListIterable$3(complex2, 0, endOfSubselector, t2); - if (!A._compatibleWithPreviousCombinator0(previousCombinator, t4.skip$1(0, i2))) - return false; - component2 = complex2[endOfSubselector]; - combinator1 = A.IterableExtension_get_firstOrNull(t3); - if (!A._isSupercombinator0(combinator1, A.IterableExtension_get_firstOrNull(component2.combinators))) - return false; - ++i1; - i2 = endOfSubselector + 1; - if (complex1.length - i1 === 1) { - t3 = combinator1 == null; - if (J.$eq$(t3 ? _null : combinator1.value, B.Combinator_y180)) { - t3 = complex2.length - 1; - t4 = new A.SubListIterable(complex2, 0, t3, t1); - t4.SubListIterable$3(complex2, 0, t3, t2); - if (!t4.skip$1(0, i2).every$1(0, new A.complexIsSuperselector_closure2(combinator1))) - return false; - } else if (!t3) - if (complex2.length - i2 > 1) - return false; - } - } - }, - _compatibleWithPreviousCombinator0(previous, parents) { - if (parents.get$isEmpty(parents)) - return true; - if (previous == null) - return true; - if (previous.value !== B.Combinator_y180) - return false; - return parents.every$1(0, new A._compatibleWithPreviousCombinator_closure0()); - }, - _isSupercombinator0(combinator1, combinator2) { - var t2, t3, - t1 = true; - if (!J.$eq$(combinator1, combinator2)) { - t2 = combinator1 == null; - if (t2) - t3 = J.$eq$(combinator2 == null ? null : combinator2.value, B.Combinator_8I80); - else - t3 = false; - if (!t3) - if (J.$eq$(t2 ? null : combinator1.value, B.Combinator_y180)) - t1 = J.$eq$(combinator2 == null ? null : combinator2.value, B.Combinator_gRV0); - else - t1 = false; - } - return t1; - }, - compoundIsSuperselector0(compound1, compound2, parents) { - var t1, _0_1, _0_5, _0_5_isSet, _0_50, index1, pseudo2, index2, t2, t3, pseudo1, t4, t5, _i, simple1, _null = null; - if (!compound1.get$hasComplicatedSuperselectorSemantics() && !compound2.get$hasComplicatedSuperselectorSemantics()) { - t1 = compound1.components; - if (t1.length > compound2.components.length) - return false; - return B.JSArray_methods.every$1(t1, new A.compoundIsSuperselector_closure0(compound2)); - } - _0_1 = A._findPseudoElementIndexed0(compound1); - _0_5 = A._findPseudoElementIndexed0(compound2); - t1 = type$.Record_2_nullable_Object_and_nullable_Object; - _0_5_isSet = t1._is(_0_1); - _0_50 = _null; - index1 = _null; - pseudo2 = _null; - index2 = _null; - t2 = false; - if (_0_5_isSet) { - t3 = _0_1 == null; - pseudo1 = (t3 ? t1._as(_0_1) : _0_1)._0; - index1 = (t3 ? t1._as(_0_1) : _0_1)._1; - t2 = t1._is(_0_5); - if (t2) { - t3 = _0_5 == null; - pseudo2 = (t3 ? t1._as(_0_5) : _0_5)._0; - index2 = (t3 ? t1._as(_0_5) : _0_5)._1; - } - t1 = t2; - _0_50 = _0_5; - } else { - t1 = t2; - pseudo1 = _null; - } - if (t1) { - if (pseudo1.isSuperselector$1(pseudo2)) { - t1 = compound1.components; - t2 = type$.int; - t3 = A._arrayInstanceType(t1)._precomputed1; - t4 = compound2.components; - t5 = A._arrayInstanceType(t4)._precomputed1; - t1 = A._compoundComponentsIsSuperselector0(A.SubListIterable$(t1, 0, A.checkNotNullable(index1, "count", t2), t3), A.SubListIterable$(t4, 0, A.checkNotNullable(index2, "count", t2), t5), parents) && A._compoundComponentsIsSuperselector0(A.SubListIterable$(t1, index1 + 1, _null, t3), A.SubListIterable$(t4, index2 + 1, _null, t5), parents); - } else - t1 = false; - return t1; - } - if (_0_1 == null) - t1 = (_0_5_isSet ? _0_50 : _0_5) != null; - else - t1 = true; - if (t1) - return false; - for (t1 = compound1.components, t2 = t1.length, t3 = compound2.components, _i = 0; _i < t2; ++_i) { - simple1 = t1[_i]; - if (simple1 instanceof A.PseudoSelector0) - t4 = simple1.selector != null; - else - t4 = false; - if (t4) { - if (!A._selectorPseudoIsSuperselector0(simple1, compound2, parents)) - return false; - } else if (!B.JSArray_methods.any$1(t3, simple1.get$isSuperselector())) - return false; - } - return true; - }, - _findPseudoElementIndexed0(compound) { - var t1, t2, i, simple; - for (t1 = compound.components, t2 = t1.length, i = 0; i < t2; ++i) { - simple = t1[i]; - if (simple instanceof A.PseudoSelector0 && !simple.isClass) - return new A._Record_2(simple, i); - } - return null; - }, - _compoundComponentsIsSuperselector0(compound1, compound2, parents) { - var t1; - if (compound1.get$length(0) === 0) - return true; - if (compound2.get$length(0) === 0) - compound2 = A._setArrayType([new A.UniversalSelector0("*", $.$get$bogusSpan0())], type$.JSArray_SimpleSelector_2); - t1 = $.$get$bogusSpan0(); - return A.compoundIsSuperselector0(A.CompoundSelector$0(compound1, t1), A.CompoundSelector$0(compound2, t1), parents); - }, - _selectorPseudoIsSuperselector0(pseudo1, compound2, parents) { - var selector1 = pseudo1.selector; - if (selector1 == null) - throw A.wrapException(A.ArgumentError$("Selector " + pseudo1.toString$0(0) + " must have a selector argument.", null)); - switch (pseudo1.normalizedName) { - case "is": - case "matches": - case "any": - case "where": - return A._selectorPseudoArgs0(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure6(selector1)) || B.JSArray_methods.any$1(selector1.components, new A._selectorPseudoIsSuperselector_closure7(parents, compound2)); - case "has": - case "host": - case "host-context": - return A._selectorPseudoArgs0(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure8(selector1)); - case "slotted": - return A._selectorPseudoArgs0(compound2, pseudo1.name, false).any$1(0, new A._selectorPseudoIsSuperselector_closure9(selector1)); - case "not": - return B.JSArray_methods.every$1(selector1.components, new A._selectorPseudoIsSuperselector_closure10(compound2, pseudo1)); - case "current": - return A._selectorPseudoArgs0(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure11(selector1)); - case "nth-child": - case "nth-last-child": - return B.JSArray_methods.any$1(compound2.components, new A._selectorPseudoIsSuperselector_closure12(pseudo1, selector1)); - default: - throw A.wrapException("unreachable"); - } - }, - _selectorPseudoArgs0(compound, $name, isClass) { - var t1 = type$.WhereTypeIterable_PseudoSelector_2; - return new A.NonNullsIterable(new A.MappedIterable(new A.WhereIterable(new A.WhereTypeIterable(compound.components, t1), new A._selectorPseudoArgs_closure1(isClass, $name), t1._eval$1("WhereIterable")), new A._selectorPseudoArgs_closure2(), t1._eval$1("MappedIterable")), type$.NonNullsIterable_SelectorList_2); - }, - unifyComplex_closure0: function unifyComplex_closure0() { - }, - _weaveParents_closure3: function _weaveParents_closure3(t0) { - this.span = t0; - }, - _weaveParents_closure4: function _weaveParents_closure4(t0) { - this.group = t0; - }, - _weaveParents_closure5: function _weaveParents_closure5() { - }, - _weaveParents_closure6: function _weaveParents_closure6() { - }, - _mustUnify_closure0: function _mustUnify_closure0(t0) { - this.uniqueSelectors = t0; - }, - _mustUnify__closure0: function _mustUnify__closure0(t0) { - this.uniqueSelectors = t0; - }, - paths_closure0: function paths_closure0(t0) { - this.T = t0; - }, - paths__closure0: function paths__closure0(t0, t1) { - this.paths = t0; - this.T = t1; - }, - paths___closure0: function paths___closure0(t0, t1) { - this.option = t0; - this.T = t1; - }, - listIsSuperselector_closure0: function listIsSuperselector_closure0(t0) { - this.list1 = t0; - }, - listIsSuperselector__closure0: function listIsSuperselector__closure0(t0) { - this.complex1 = t0; - }, - complexIsSuperselector_closure1: function complexIsSuperselector_closure1() { - }, - complexIsSuperselector_closure2: function complexIsSuperselector_closure2(t0) { - this.combinator1 = t0; - }, - _compatibleWithPreviousCombinator_closure0: function _compatibleWithPreviousCombinator_closure0() { - }, - compoundIsSuperselector_closure0: function compoundIsSuperselector_closure0(t0) { - this.compound2 = t0; - }, - _selectorPseudoIsSuperselector_closure6: function _selectorPseudoIsSuperselector_closure6(t0) { - this.selector1 = t0; - }, - _selectorPseudoIsSuperselector_closure7: function _selectorPseudoIsSuperselector_closure7(t0, t1) { - this.parents = t0; - this.compound2 = t1; - }, - _selectorPseudoIsSuperselector_closure8: function _selectorPseudoIsSuperselector_closure8(t0) { - this.selector1 = t0; - }, - _selectorPseudoIsSuperselector_closure9: function _selectorPseudoIsSuperselector_closure9(t0) { - this.selector1 = t0; - }, - _selectorPseudoIsSuperselector_closure10: function _selectorPseudoIsSuperselector_closure10(t0, t1) { - this.compound2 = t0; - this.pseudo1 = t1; - }, - _selectorPseudoIsSuperselector__closure0: function _selectorPseudoIsSuperselector__closure0(t0, t1) { - this.complex = t0; - this.pseudo1 = t1; - }, - _selectorPseudoIsSuperselector___closure1: function _selectorPseudoIsSuperselector___closure1(t0) { - this.simple2 = t0; - }, - _selectorPseudoIsSuperselector___closure2: function _selectorPseudoIsSuperselector___closure2(t0) { - this.simple2 = t0; - }, - _selectorPseudoIsSuperselector_closure11: function _selectorPseudoIsSuperselector_closure11(t0) { - this.selector1 = t0; - }, - _selectorPseudoIsSuperselector_closure12: function _selectorPseudoIsSuperselector_closure12(t0, t1) { - this.pseudo1 = t0; - this.selector1 = t1; - }, - _selectorPseudoArgs_closure1: function _selectorPseudoArgs_closure1(t0, t1) { - this.isClass = t0; - this.name = t1; - }, - _selectorPseudoArgs_closure2: function _selectorPseudoArgs_closure2() { - }, - globalFunctions_closure0: function globalFunctions_closure0() { - }, - GamutMapMethod_GamutMapMethod$fromName0($name) { - var t1; - $label0$0: { - if ("clip" === $name) { - t1 = B.ClipGamutMap_clip0; - break $label0$0; - } - if ("local-minde" === $name) { - t1 = B.LocalMindeGamutMap_Q7f0; - break $label0$0; - } - t1 = A.throwExpression(A.SassScriptException$0('Unknown gamut map method "' + $name + '".', null)); - } - return t1; - }, - GamutMapMethod0: function GamutMapMethod0() { - }, - HslColorSpace0: function HslColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - HwbColorSpace0: function HwbColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - HwbColorSpace_convert_toRgb0: function HwbColorSpace_convert_toRgb0(t0, t1) { - this._box_0 = t0; - this.factor = t1; - }, - IDSelector0: function IDSelector0(t0, t1) { - this.name = t0; - this.span = t1; - }, - IDSelector_unify_closure0: function IDSelector_unify_closure0(t0) { - this.$this = t0; - }, - IfExpression0: function IfExpression0(t0, t1) { - this.$arguments = t0; - this.span = t1; - }, - IfClause$0(expression, children) { - var t1 = A.List_List$unmodifiable(children, type$.Statement_2); - return new A.IfClause0(expression, t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure0())); - }, - ElseClause$0(children) { - var t1 = A.List_List$unmodifiable(children, type$.Statement_2); - return new A.ElseClause0(t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure0())); - }, - IfRule0: function IfRule0(t0, t1, t2) { - this.clauses = t0; - this.lastClause = t1; - this.span = t2; - }, - IfRule_toString_closure0: function IfRule_toString_closure0() { - }, - IfRuleClause0: function IfRuleClause0() { - }, - IfRuleClause$__closure0: function IfRuleClause$__closure0() { - }, - IfRuleClause$___closure0: function IfRuleClause$___closure0() { - }, - IfClause0: function IfClause0(t0, t1, t2) { - this.expression = t0; - this.children = t1; - this.hasDeclarations = t2; - }, - ElseClause0: function ElseClause0(t0, t1) { - this.children = t0; - this.hasDeclarations = t1; - }, - jsToDartList(list) { - return self.immutable.isOrderedMap(list) ? J.toArray$0$x(type$.ImmutableList._as(list)) : type$.List_dynamic._as(list); - }, - dartMapToImmutableMap(dartMap) { - var t1, t2, - immutableMap = J.asMutable$0$x(new self.immutable.OrderedMap()); - for (t1 = A.MapExtensions_get_pairs0(dartMap, type$.Object, type$.nullable_Object), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t2 = t1.get$current(t1); - immutableMap = J.$set$2$x(immutableMap, t2._0, t2._1); - } - return J.asImmutable$0$x(immutableMap); - }, - immutableMapToDartMap(immutableMap) { - var dartMap = A.LinkedHashMap_LinkedHashMap$_empty(type$.Object, type$.nullable_Object); - J.forEach$1$ax(immutableMap, A.allowInterop(new A.immutableMapToDartMap_closure(dartMap))); - return dartMap; - }, - ImmutableList0: function ImmutableList0() { - }, - ImmutableMap0: function ImmutableMap0() { - }, - immutableMapToDartMap_closure: function immutableMapToDartMap_closure(t0) { - this.dartMap = t0; - }, - NodeImporter__addSassPath(includePaths) { - return new A._SyncStarIterable(A.NodeImporter__addSassPath$body(includePaths), type$._SyncStarIterable_String); - }, - NodeImporter__addSassPath$body($async$includePaths) { - return function() { - var includePaths = $async$includePaths; - var $async$goto = 0, $async$handler = 2, $async$currentError, sassPath, t1; - return function $async$NodeImporter__addSassPath($async$iterator, $async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return $async$iterator._yieldStar$1(includePaths); - case 3: - // after yield - sassPath = A.getEnvironmentVariable0("SASS_PATH"); - if (sassPath == null) { - // goto return - $async$goto = 1; - break; - } - t1 = A.isNodeJs() ? self.process : null; - $async$goto = 4; - return $async$iterator._yieldStar$1(A._setArrayType(sassPath.split(J.$eq$(t1 == null ? null : J.get$platform$x(t1), "win32") ? ";" : ":"), type$.JSArray_String)); - case 4: - // after yield - case 1: - // return - return 0; - case 2: - // rethrow - return $async$iterator._datum = $async$currentError, 3; - } - }; - }; - }, - NodeImporter: function NodeImporter(t0, t1, t2) { - this._implementation$_options = t0; - this._includePaths = t1; - this._implementation$_importers = t2; - }, - NodeImporter_load_closure: function NodeImporter_load_closure(t0, t1, t2, t3, t4) { - var _ = this; - _.$this = t0; - _.importer = t1; - _.forImport = t2; - _.url = t3; - _.previousString = t4; - }, - NodeImporter__tryPath_closure: function NodeImporter__tryPath_closure(t0) { - this.path = t0; - }, - NodeImporter__tryPath_closure0: function NodeImporter__tryPath_closure0() { - }, - NodeImporter__callImporterAsync_closure: function NodeImporter__callImporterAsync_closure(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.$this = t0; - _.importer = t1; - _.forImport = t2; - _.url = t3; - _.previousString = t4; - _.completer = t5; - }, - ModifiableCssImport0: function ModifiableCssImport0(t0, t1, t2) { - var _ = this; - _.url = t0; - _.modifiers = t1; - _.span = t2; - _._node$_indexInParent = _._node$_parent = null; - _.isGroupEnd = false; - }, - ImportCache$0(importers, loadPaths, packageConfig) { - var t1 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2, - t2 = type$.Record_3_Importer_and_Uri_and_bool_forImport_2, - t3 = type$.Uri; - return new A.ImportCache0(A.ImportCache__toImporters0(importers, loadPaths, packageConfig), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult_2)); - }, - ImportCache$none() { - var t1 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2, - t2 = type$.Record_3_Importer_and_Uri_and_bool_forImport_2, - t3 = type$.Uri; - return new A.ImportCache0(B.List_empty25, A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult_2)); - }, - ImportCache__toImporters0(importers, loadPaths, packageConfig) { - var t1, t2, t3, t4, _i, path, _null = null, - sassPath = A.getEnvironmentVariable0("SASS_PATH"); - if (A.isBrowser()) { - t1 = A._setArrayType([], type$.JSArray_Importer_2); - if (importers != null) - B.JSArray_methods.addAll$1(t1, importers); - return t1; - } - t1 = A._setArrayType([], type$.JSArray_Importer_2); - if (importers != null) - B.JSArray_methods.addAll$1(t1, importers); - if (loadPaths != null) - for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { - t3 = t2.get$current(t2); - t1.push(new A.FilesystemImporter0($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); - } - if (sassPath != null) { - t2 = A.isNodeJs() ? self.process : _null; - t3 = sassPath.split(J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32") ? ";" : ":"); - t4 = t3.length; - _i = 0; - for (; _i < t4; ++_i) { - path = t3[_i]; - t1.push(new A.FilesystemImporter0($.$get$context().absolute$15(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); - } - } - return t1; - }, - ImportCache0: function ImportCache0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._import_cache$_importers = t0; - _._import_cache$_canonicalizeCache = t1; - _._import_cache$_perImporterCanonicalizeCache = t2; - _._import_cache$_nonCanonicalRelativeUrls = t3; - _._import_cache$_importCache = t4; - _._import_cache$_resultsCache = t5; - }, - ImportCache_canonicalize_closure0: function ImportCache_canonicalize_closure0(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.baseImporter = t1; - _.resolvedUrl = t2; - _.baseUrl = t3; - _.forImport = t4; - _.key = t5; - _.url = t6; - }, - ImportCache__canonicalize_closure0: function ImportCache__canonicalize_closure0(t0, t1) { - this.importer = t0; - this.url = t1; - }, - ImportCache_importCanonical_closure0: function ImportCache_importCanonical_closure0(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.importer = t1; - _.canonicalUrl = t2; - _.originalUrl = t3; - }, - ImportCache_humanize_closure3: function ImportCache_humanize_closure3(t0) { - this.canonicalUrl = t0; - }, - ImportCache_humanize_closure4: function ImportCache_humanize_closure4() { - }, - ImportCache_humanize_closure5: function ImportCache_humanize_closure5() { - }, - ImportCache_humanize_closure6: function ImportCache_humanize_closure6(t0) { - this.canonicalUrl = t0; - }, - ImportRule0: function ImportRule0(t0, t1) { - this.imports = t0; - this.span = t1; - }, - JSImporter: function JSImporter() { - }, - JSImporterResult: function JSImporterResult() { - }, - Importer0: function Importer0() { - }, - NodeImporterResult0: function NodeImporterResult0() { - }, - IncludeRule0: function IncludeRule0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.namespace = t0; - _.name = t1; - _.originalName = t2; - _.$arguments = t3; - _.content = t4; - _.span = t5; - }, - InterpolatedFunctionExpression0: function InterpolatedFunctionExpression0(t0, t1, t2) { - this.name = t0; - this.$arguments = t1; - this.span = t2; - }, - Interpolation$0(contents, spans, span) { - var t1 = new A.Interpolation0(A.List_List$unmodifiable(contents, type$.Object), A.List_List$unmodifiable(spans, type$.nullable_FileSpan), span); - t1.Interpolation$30(contents, spans, span); - return t1; - }, - Interpolation0: function Interpolation0(t0, t1, t2) { - this.contents = t0; - this.spans = t1; - this.span = t2; - }, - Interpolation_toString_closure0: function Interpolation_toString_closure0() { - }, - SupportsInterpolation0: function SupportsInterpolation0(t0, t1) { - this.expression = t0; - this.span = t1; - }, - InterpolationBuffer0: function InterpolationBuffer0(t0, t1, t2) { - this._interpolation_buffer0$_text = t0; - this._interpolation_buffer0$_contents = t1; - this._interpolation_buffer0$_spans = t2; - }, - InterpolationMap$0(_interpolation, targetLocations) { - var t1 = A.List_List$unmodifiable(targetLocations, type$.SourceLocation), - t2 = _interpolation.contents.length, - expectedLocations = Math.max(0, t2 - 1); - if (t1.length !== expectedLocations) - A.throwExpression(A.ArgumentError$("InterpolationMap must have " + A.S(expectedLocations) + string$.x20targe + t2 + " components.", null)); - return new A.InterpolationMap0(_interpolation, t1); - }, - InterpolationMap0: function InterpolationMap0(t0, t1) { - this._interpolation_map$_interpolation = t0; - this._interpolation_map$_targetLocations = t1; - }, - InterpolationMap_mapException_closure0: function InterpolationMap_mapException_closure0() { - }, - InterpolationMethod$0(space, hue) { - var t1; - if (space.get$isPolarInternal()) - t1 = hue == null ? B.HueInterpolationMethod_00 : hue; - else - t1 = null; - if (!space.get$isPolarInternal() && hue != null) - A.throwExpression(A.ArgumentError$(string$.Hue_in + space.toString$0(0) + ".", null)); - return new A.InterpolationMethod0(space, t1); - }, - InterpolationMethod_InterpolationMethod$fromValue0(value, $name) { - var t1, space, hueMethod, - list = value.assertCommonListStyle$2$allowSlash($name, false); - if (list.length === 0) - throw A.wrapException(A.SassScriptException$0(string$.Expecta, $name)); - t1 = B.JSArray_methods.get$first(list).assertString$1($name); - t1.assertUnquoted$1($name); - space = A.ColorSpace_fromName0(t1._string0$_text, $name); - if (list.length === 1) - return A.InterpolationMethod$0(space, null); - hueMethod = A.HueInterpolationMethod_HueInterpolationMethod$_fromValue0(list[1], $name); - if (list.length === 2) - throw A.wrapException(A.SassScriptException$0('Expected unquoted string "hue" after ' + value.toString$0(0) + ".", $name)); - else { - t1 = list[2].assertString$1($name); - t1.assertUnquoted$1($name); - if (t1._string0$_text.toLowerCase() !== "hue") - throw A.wrapException(A.SassScriptException$0(string$.Expectu + value.toString$0(0) + ", was " + A.S(list[2]) + ".", $name)); - else if (list.length > 3) - throw A.wrapException(A.SassScriptException$0('Expected nothing after "hue" in ' + value.toString$0(0) + ".", $name)); - else if (!space.get$isPolarInternal()) - throw A.wrapException(A.SassScriptException$0('Hue interpolation method "' + hueMethod.toString$0(0) + string$.x20hue__ + space.toString$0(0) + ".", $name)); - } - return A.InterpolationMethod$0(space, hueMethod); - }, - HueInterpolationMethod_HueInterpolationMethod$_fromValue0(value, $name) { - var _0_0, - t1 = value.assertString$1($name); - t1.assertUnquoted$0(); - _0_0 = t1._string0$_text.toLowerCase(); - $label0$0: { - if ("shorter" === _0_0) { - t1 = B.HueInterpolationMethod_00; - break $label0$0; - } - if ("longer" === _0_0) { - t1 = B.HueInterpolationMethod_10; - break $label0$0; - } - if ("increasing" === _0_0) { - t1 = B.HueInterpolationMethod_20; - break $label0$0; - } - if ("decreasing" === _0_0) { - t1 = B.HueInterpolationMethod_30; - break $label0$0; - } - t1 = A.throwExpression(A.SassScriptException$0("Unknown hue interpolation method " + value.toString$0(0) + ".", $name)); - } - return t1; - }, - InterpolationMethod0: function InterpolationMethod0(t0, t1) { - this.space = t0; - this.hue = t1; - }, - HueInterpolationMethod0: function HueInterpolationMethod0(t0) { - this._name = t0; - }, - _realCasePath0(path) { - var prefix, _null = null, - t1 = A.isNodeJs() ? self.process : _null; - if (!J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { - t1 = A.isNodeJs() ? self.process : _null; - t1 = J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "darwin"); - } else - t1 = true; - if (!t1) - return path; - t1 = A.isNodeJs() ? self.process : _null; - if (J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { - prefix = B.JSString_methods.substring$2(path, 0, $.$get$context().style.rootLength$1(path)); - t1 = prefix.length; - if (t1 !== 0 && A.CharacterExtension_get_isAlphabetic0(prefix.charCodeAt(0))) - path = prefix.toUpperCase() + B.JSString_methods.substring$1(path, t1); - } - return new A._realCasePath_helper0().call$1(path); - }, - _realCasePath_helper0: function _realCasePath_helper0() { - }, - _realCasePath_helper_closure0: function _realCasePath_helper_closure0(t0, t1, t2) { - this.helper = t0; - this.dirname = t1; - this.path = t2; - }, - _realCasePath_helper__closure0: function _realCasePath_helper__closure0(t0) { - this.basename = t0; - }, - IsCalculationSafeVisitor0: function IsCalculationSafeVisitor0() { - }, - IsCalculationSafeVisitor_visitListExpression_closure0: function IsCalculationSafeVisitor_visitListExpression_closure0(t0) { - this.$this = t0; - }, - printError0(message) { - var t1 = A.isNodeJs() ? self.process : null; - if (t1 != null) { - t1 = J.get$stderr$x(t1); - J.write$1$x(t1, A.S(message) + "\n"); - } else { - t1 = self.console; - J.error$1$x(t1, message); - } - }, - readFile0(path) { - var contents, sourceFile, t1, i; - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$("readFile() is only supported on Node.js")); - contents = A._asString(A._readFile0(path, "utf8")); - if (!B.JSString_methods.contains$1(contents, "\ufffd")) - return contents; - sourceFile = A.SourceFile$fromString(contents, $.$get$context().toUri$1(path)); - for (t1 = contents.length, i = 0; i < t1; ++i) { - if (contents.charCodeAt(i) !== 65533) - continue; - throw A.wrapException(A.SassException$0("Invalid UTF-8.", A.FileLocation$_(sourceFile, i).pointSpan$0(), null)); - } - return contents; - }, - _readFile0(path, encoding) { - return A._systemErrorToFileSystemException0(new A._readFile_closure0(path, encoding)); - }, - fileExists0(path) { - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$(string$.fileEx)); - return A._systemErrorToFileSystemException0(new A.fileExists_closure0(path)); - }, - dirExists0(path) { - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$("dirExists() is only supported on Node.js")); - return A._systemErrorToFileSystemException0(new A.dirExists_closure0(path)); - }, - listDir0(path) { - if (!A.isNodeJs()) - throw A.wrapException(A.UnsupportedError$("listDir() is only supported on Node.js")); - return A._systemErrorToFileSystemException0(new A.listDir_closure0(false, path)); - }, - getEnvironmentVariable0($name) { - var t1 = A.isNodeJs() ? self.process : null, - env = t1 == null ? null : J.get$env$x(t1); - if (env == null) - t1 = null; - else - t1 = A._asStringQ(env[$name]); - return t1; - }, - _systemErrorToFileSystemException0(callback) { - var error, t1, exception, t2; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - error = A.unwrapException(exception); - if (!type$.JsSystemError._is(error)) - throw exception; - t1 = error; - t2 = J.getInterceptor$x(t1); - throw A.wrapException(new A.FileSystemException0(J.substring$2$s(t2.get$message(t1), (A.S(t2.get$code(t1)) + ": ").length, J.get$length$asx(t2.get$message(t1)) - (", " + A.S(t2.get$syscall(t1)) + " '" + A.S(t2.get$path(t1)) + "'").length), J.get$path$x(error))); - } - }, - hasTerminal0() { - var t1 = A.isNodeJs() ? self.process : null; - return J.$eq$(t1 == null ? null : J.get$isTTY$x(J.get$stdout$x(t1)), true); - }, - FileSystemException0: function FileSystemException0(t0, t1) { - this.message = t0; - this.path = t1; - }, - _readFile_closure0: function _readFile_closure0(t0, t1) { - this.path = t0; - this.encoding = t1; - }, - fileExists_closure0: function fileExists_closure0(t0) { - this.path = t0; - }, - dirExists_closure0: function dirExists_closure0(t0) { - this.path = t0; - }, - listDir_closure0: function listDir_closure0(t0, t1) { - this.recursive = t0; - this.path = t1; - }, - listDir__closure1: function listDir__closure1(t0) { - this.path = t0; - }, - listDir__closure2: function listDir__closure2() { - }, - listDir_closure_list0: function listDir_closure_list0() { - }, - listDir__list_closure0: function listDir__list_closure0(t0, t1) { - this.parent = t0; - this.list = t1; - }, - main() { - J.set$compile$x(self.exports, A.allowInteropNamed("sass.compile", A.compile__compile$closure())); - J.set$compileString$x(self.exports, A.allowInteropNamed("sass.compileString", A.compile__compileString$closure())); - J.set$compileAsync$x(self.exports, A.allowInteropNamed("sass.compileAsync", A.compile__compileAsync$closure())); - J.set$compileStringAsync$x(self.exports, A.allowInteropNamed("sass.compileStringAsync", A.compile__compileStringAsync$closure())); - J.set$initCompiler$x(self.exports, A.allowInteropNamed("sass.initCompiler", A.compiler__initCompiler$closure())); - J.set$initAsyncCompiler$x(self.exports, A.allowInteropNamed("sass.initAsyncCompiler", A.compiler__initAsyncCompiler$closure())); - J.set$Compiler$x(self.exports, $.$get$compilerClass()); - J.set$AsyncCompiler$x(self.exports, $.$get$asyncCompilerClass()); - J.set$Value$x(self.exports, $.$get$valueClass()); - J.set$SassBoolean$x(self.exports, $.$get$booleanClass()); - J.set$SassArgumentList$x(self.exports, $.$get$argumentListClass()); - J.set$SassCalculation$x(self.exports, $.$get$calculationClass()); - J.set$CalculationOperation$x(self.exports, $.$get$calculationOperationClass()); - J.set$CalculationInterpolation$x(self.exports, $.$get$calculationInterpolationClass()); - J.set$SassColor$x(self.exports, $.$get$colorClass()); - J.set$SassFunction$x(self.exports, $.$get$functionClass()); - J.set$SassMixin$x(self.exports, $.$get$mixinClass()); - J.set$SassList$x(self.exports, $.$get$listClass()); - J.set$SassMap$x(self.exports, $.$get$mapClass()); - J.set$SassNumber$x(self.exports, $.$get$numberClass()); - J.set$SassString$x(self.exports, $.$get$stringClass()); - J.set$sassNull$x(self.exports, B.C__SassNull0); - J.set$sassTrue$x(self.exports, B.SassBoolean_true0); - J.set$sassFalse$x(self.exports, B.SassBoolean_false0); - J.set$Exception$x(self.exports, $.$get$exceptionClass()); - J.set$Logger$x(self.exports, {silent: {warn: A.allowInteropNamed("sass.Logger.silent.warn", new A.main_closure()), debug: A.allowInteropNamed("sass.Logger.silent.debug", new A.main_closure0())}}); - J.set$NodePackageImporter$x(self.exports, $.$get$nodePackageImporterClass()); - J.set$deprecations$x(self.exports, A.jsify($.$get$deprecations())); - J.set$Version$x(self.exports, $.$get$versionClass()); - J.set$loadParserExports_$x(self.exports, A.allowInterop(A.parser0__loadParserExports$closure())); - J.set$info$x(self.exports, "dart-sass\t1.81.0\t(Sass Compiler)\t[Dart]\ndart2js\t3.5.4\t(Dart Compiler)\t[Dart]"); - A.updateCanonicalizeContextPrototype(); - A.updateSourceSpanPrototype(); - J.set$render$x(self.exports, A.allowInteropNamed("sass.render", A.legacy__render$closure())); - J.set$renderSync$x(self.exports, A.allowInteropNamed("sass.renderSync", A.legacy__renderSync$closure())); - J.set$types$x(self.exports, {Boolean: $.$get$legacyBooleanClass(), Color: $.$get$legacyColorClass(), List: $.$get$legacyListClass(), Map: $.$get$legacyMapClass(), Null: $.$get$legacyNullClass(), Number: $.$get$legacyNumberClass(), String: $.$get$legacyStringClass(), Error: self.Error}); - J.set$NULL$x(self.exports, B.C__SassNull0); - J.set$TRUE$x(self.exports, B.SassBoolean_true0); - J.set$FALSE$x(self.exports, B.SassBoolean_false0); - }, - main_closure: function main_closure() { - }, - main_closure0: function main_closure0() { - }, - JSToDartLogger: function JSToDartLogger(t0, t1, t2) { - this._node = t0; - this._fallback = t1; - this._ascii = t2; - }, - JSToDartLogger_internalWarn_closure: function JSToDartLogger_internalWarn_closure(t0, t1, t2, t3, t4) { - var _ = this; - _.$this = t0; - _.message = t1; - _.span = t2; - _.trace = t3; - _.deprecation = t4; - }, - JSToDartLogger_debug_closure: function JSToDartLogger_debug_closure(t0, t1, t2) { - this.$this = t0; - this.message = t1; - this.span = t2; - }, - ModifiableCssKeyframeBlock$0(selector, span) { - var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); - return new A.ModifiableCssKeyframeBlock0(selector, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); - }, - ModifiableCssKeyframeBlock0: function ModifiableCssKeyframeBlock0(t0, t1, t2, t3) { - var _ = this; - _.selector = t0; - _.span = t1; - _.children = t2; - _._node$_children = t3; - _._node$_indexInParent = _._node$_parent = null; - _.isGroupEnd = false; - }, - KeyframeSelectorParser0: function KeyframeSelectorParser0(t0, t1) { - this.scanner = t0; - this._parser1$_interpolationMap = t1; - }, - KeyframeSelectorParser_parse_closure0: function KeyframeSelectorParser_parse_closure0(t0) { - this.$this = t0; - }, - LabColorSpace0: function LabColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - LazyFileSpan0: function LazyFileSpan0(t0) { - this._lazy_file_span0$_builder = t0; - this._lazy_file_span0$_span = null; - }, - LchColorSpace0: function LchColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - render(options, callback) { - var _0_0; - if (!A.isNodeJs()) - A.jsThrow(new self.Error("The render() method is only available in Node.js.")); - _0_0 = J.get$fiber$x(options); - if (_0_0 != null) - J.run$0$x(_0_0.call$1(A.allowInterop(new A.render_closure(callback, options)))); - else - A._renderAsync(options).then$1$2$onError(0, new A.render_closure0(callback), new A.render_closure1(callback), type$.Null); - }, - _renderAsync(options) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.RenderResult), - $async$returnValue, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, result, start, t1, file, t2, t3, t4, logger, _0_0; - var $async$_renderAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - start = new A.DateTime(Date.now(), 0, false); - t1 = J.getInterceptor$x(options); - file = A.NullableExtension_andThen0(t1.get$file(options), A.path__absolute$closure()); - t2 = t1.get$logger(options); - t3 = A.hasTerminal0(); - t4 = $._glyphs; - logger = new A.JSToDartLogger(t2, new A.StderrLogger0(t3), t4 === B.C_AsciiGlyphSet); - _0_0 = t1.get$data(options); - $async$goto = _0_0 != null ? 3 : 5; - break; - case 3: - // then - t2 = A._parseImporter(options, start); - t3 = A._parsePackageImportersAsync(options, start); - t4 = A._parseFunctions(options, start, true); - t5 = t1.get$indentedSyntax(options); - t5 = !J.$eq$(t5, false) && t5 != null ? B.Syntax_Sass_sass0 : null; - t6 = A._parseOutputStyle(t1.get$outputStyle(options)); - t7 = J.$eq$(t1.get$indentType(options), "tab"); - t8 = A._parseIndentWidth(t1.get$indentWidth(options)); - t9 = A._parseLineFeed(t1.get$linefeed(options)); - t10 = file == null ? "stdin" : $.$get$context().toUri$1(file).toString$0(0); - t11 = t1.get$quietDeps(options); - if (t11 == null) - t11 = false; - t12 = A.parseDeprecations(logger, t1.get$fatalDeprecations(options), true); - t13 = A.parseDeprecations(logger, t1.get$futureDeprecations(options), false); - t14 = A.parseDeprecations(logger, t1.get$silenceDeprecations(options), false); - t15 = t1.get$verbose(options); - if (t15 == null) - t15 = false; - t1 = t1.get$charset(options); - if (t1 == null) - t1 = true; - $async$goto = 6; - return A._asyncAwait(A.compileStringAsync0(_0_0, t1, t12, t4, t13, t3, null, t8, t9, logger, t2, t11, t14, A._enableSourceMaps(options), t6, t5, t10, !t7, t15), $async$_renderAsync); - case 6: - // returning from await. - result = $async$result; - // goto join - $async$goto = 4; - break; - case 5: - // else - $async$goto = file != null ? 7 : 9; - break; - case 7: - // then - t2 = A._parseImporter(options, start); - t3 = A._parsePackageImportersAsync(options, start); - t4 = A._parseFunctions(options, start, true); - t5 = t1.get$indentedSyntax(options); - t5 = !J.$eq$(t5, false) && t5 != null ? B.Syntax_Sass_sass0 : null; - t6 = A._parseOutputStyle(t1.get$outputStyle(options)); - t7 = J.$eq$(t1.get$indentType(options), "tab"); - t8 = A._parseIndentWidth(t1.get$indentWidth(options)); - t9 = A._parseLineFeed(t1.get$linefeed(options)); - t10 = t1.get$quietDeps(options); - if (t10 == null) - t10 = false; - t11 = A.parseDeprecations(logger, t1.get$fatalDeprecations(options), true); - t12 = A.parseDeprecations(logger, t1.get$futureDeprecations(options), false); - t13 = A.parseDeprecations(logger, t1.get$silenceDeprecations(options), false); - t14 = t1.get$verbose(options); - if (t14 == null) - t14 = false; - t1 = t1.get$charset(options); - if (t1 == null) - t1 = true; - $async$goto = 10; - return A._asyncAwait(A.compileAsync0(file, t1, t11, t4, t12, t3, t8, t9, logger, t2, t10, t13, A._enableSourceMaps(options), t6, t5, !t7, t14), $async$_renderAsync); - case 10: - // returning from await. - result = $async$result; - // goto join - $async$goto = 8; - break; - case 9: - // else - throw A.wrapException(A.ArgumentError$(string$.Either, null)); - case 8: - // join - case 4: - // join - $async$returnValue = A._newRenderResult(options, result, start); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_renderAsync, $async$completer); - }, - renderSync(options) { - var start, result, file, logger, _0_0, data, error, stackTrace, error0, stackTrace0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, exception, _null = null; - if (!A.isNodeJs()) - A.jsThrow(new self.Error("The renderSync() method is only available in Node.js.")); - try { - start = new A.DateTime(Date.now(), 0, false); - result = null; - t1 = J.getInterceptor$x(options); - file = A.NullableExtension_andThen0(t1.get$file(options), A.path__absolute$closure()); - t2 = t1.get$logger(options); - t3 = A.hasTerminal0(); - t4 = $._glyphs; - logger = new A.JSToDartLogger(t2, new A.StderrLogger0(t3), t4 === B.C_AsciiGlyphSet); - _0_0 = t1.get$data(options); - data = null; - if (_0_0 != null) { - data = _0_0; - t2 = data; - t3 = A._parseImporter(options, start); - t4 = A._parsePackageImporters(options, start); - t5 = A._parseFunctions(options, start, false); - t6 = t1.get$indentedSyntax(options); - t6 = !J.$eq$(t6, false) && t6 != null ? B.Syntax_Sass_sass0 : _null; - t7 = A._parseOutputStyle(t1.get$outputStyle(options)); - t8 = J.$eq$(t1.get$indentType(options), "tab"); - t9 = A._parseIndentWidth(t1.get$indentWidth(options)); - t10 = A._parseLineFeed(t1.get$linefeed(options)); - t11 = file == null ? "stdin" : $.$get$context().toUri$1(file).toString$0(0); - t12 = t1.get$quietDeps(options); - if (t12 == null) - t12 = false; - t13 = A.parseDeprecations(logger, t1.get$fatalDeprecations(options), true); - t14 = A.parseDeprecations(logger, t1.get$futureDeprecations(options), false); - t15 = A.parseDeprecations(logger, t1.get$silenceDeprecations(options), false); - t16 = t1.get$verbose(options); - if (t16 == null) - t16 = false; - t1 = t1.get$charset(options); - if (t1 == null) - t1 = true; - result = A.compileString(t2, t1, t13, new A.CastList(t5, A._arrayInstanceType(t5)._eval$1("CastList<1,Callable>")), t14, t4, _null, t9, t10, logger, t3, t12, t15, A._enableSourceMaps(options), t7, t6, t11, !t8, t16); - } else if (file != null) { - t2 = A._parseImporter(options, start); - t3 = A._parsePackageImporters(options, start); - t4 = A._parseFunctions(options, start, false); - t5 = t1.get$indentedSyntax(options); - t5 = !J.$eq$(t5, false) && t5 != null ? B.Syntax_Sass_sass0 : _null; - t6 = A._parseOutputStyle(t1.get$outputStyle(options)); - t7 = J.$eq$(t1.get$indentType(options), "tab"); - t8 = A._parseIndentWidth(t1.get$indentWidth(options)); - t9 = A._parseLineFeed(t1.get$linefeed(options)); - t10 = t1.get$quietDeps(options); - if (t10 == null) - t10 = false; - t11 = A.parseDeprecations(logger, t1.get$fatalDeprecations(options), true); - t12 = A.parseDeprecations(logger, t1.get$futureDeprecations(options), false); - t13 = A.parseDeprecations(logger, t1.get$silenceDeprecations(options), false); - t14 = t1.get$verbose(options); - if (t14 == null) - t14 = false; - t1 = t1.get$charset(options); - if (t1 == null) - t1 = true; - result = A.compile(file, t1, t11, new A.CastList(t4, A._arrayInstanceType(t4)._eval$1("CastList<1,Callable>")), t12, t3, t8, t9, logger, t2, t10, t13, A._enableSourceMaps(options), t6, t5, !t7, t14); - } else { - t1 = A.ArgumentError$(string$.Either, _null); - throw A.wrapException(t1); - } - t1 = A._newRenderResult(options, result, start); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.jsThrow(A._wrapException(error, stackTrace)); - } else { - error0 = t1; - stackTrace0 = A.getTraceFromException(exception); - t1 = J.toString$0$(error0); - t2 = A.getTrace0(error0); - A.jsThrow(A._newRenderError(t1, t2 == null ? stackTrace0 : t2, _null, _null, _null, 3)); - } - } - }, - _wrapException(exception, stackTrace) { - var t2, t3, t4, t5, - t1 = A.SourceSpanException.prototype.get$span.call(exception, 0), - _0_0 = t1.get$sourceUrl(t1); - $label0$0: { - if (_0_0 == null) { - t1 = "stdin"; - break $label0$0; - } - if ("file" === _0_0.get$scheme()) { - t1 = $.$get$context().style.pathFromUri$1(A._parseUri(_0_0)); - break $label0$0; - } - t1 = _0_0.toString$0(0); - break $label0$0; - } - t2 = B.JSString_methods.replaceFirst$2(exception.toString$0(0), "Error: ", ""); - t3 = A.getTrace0(exception); - if (t3 == null) - t3 = stackTrace; - t4 = A.SourceSpanException.prototype.get$span.call(exception, 0); - t4 = t4.get$start(t4); - t4 = t4.file.getLine$1(t4.offset); - t5 = A.SourceSpanException.prototype.get$span.call(exception, 0); - t5 = t5.get$start(t5); - return A._newRenderError(t2, t3, t5.file.getColumn$1(t5.offset) + 1, t1, t4 + 1, 1); - }, - _parseFunctions(options, start, asynch) { - var result, - functions = J.get$functions$x(options); - if (functions == null) - return B.List_empty26; - result = A._setArrayType([], type$.JSArray_AsyncCallable_2); - A.jsForEach(functions, new A._parseFunctions_closure(options, start, result, asynch)); - return result; - }, - _parseImporter(options, start) { - var t2, t3, contextOptions, _1_0, importers, _box_0 = {}, - t1 = J.getInterceptor$x(options), - _0_0 = t1.get$importer(options); - $label0$0: { - if (_0_0 == null) { - t2 = A._setArrayType([], type$.JSArray_JSFunction); - break $label0$0; - } - if (type$.List_nullable_Object._is(_0_0)) { - t2 = J.cast$1$0$ax(_0_0, type$.JSFunction); - break $label0$0; - } - t2 = A._setArrayType([type$.JSFunction._as(_0_0)], type$.JSArray_JSFunction); - break $label0$0; - } - t3 = J.getInterceptor$asx(t2); - contextOptions = t3.get$isNotEmpty(t2) ? A._contextOptions(options, start) : new A.Object(); - _1_0 = t1.get$fiber(options); - _box_0.fiber = null; - if (_1_0 != null) { - _box_0.fiber = _1_0; - t2 = t3.map$1$1(t2, new A._parseImporter_closure(_box_0), type$.JSFunction); - importers = A.List_List$of(t2, true, t2.$ti._eval$1("ListIterable.E")); - } else - importers = t2; - t1 = t1.get$includePaths(options); - if (t1 == null) - t1 = []; - t2 = type$.String; - return new A.NodeImporter(contextOptions, A.List_List$unmodifiable(A.NodeImporter__addSassPath(A.List_List$from(t1, true, t2)), t2), A.List_List$unmodifiable(J.cast$1$0$ax(importers, type$.dynamic), type$.JSFunction)); - }, - _parsePackageImportersAsync(options, start) { - var t2, t3, t4, - t1 = J.getInterceptor$x(options); - if (t1.get$pkgImporter(options) instanceof A.NodePackageImporter0) { - t1 = t1.get$pkgImporter(options); - t1.toString; - t2 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2; - t3 = type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport_2; - t4 = type$.Uri; - return new A.AsyncImportCache0(A.List_List$unmodifiable(A._setArrayType([t1], type$.JSArray_AsyncImporter), type$.AsyncImporter), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.ImporterResult_2)); - } - return null; - }, - _parsePackageImporters(options, start) { - var t2, t3, t4, - t1 = J.getInterceptor$x(options); - if (t1.get$pkgImporter(options) instanceof A.NodePackageImporter0) { - t1 = t1.get$pkgImporter(options); - t1.toString; - t2 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2; - t3 = type$.Record_3_Importer_and_Uri_and_bool_forImport_2; - t4 = type$.Uri; - return new A.ImportCache0(A.List_List$unmodifiable(A._setArrayType([t1], type$.JSArray_Importer_2), type$.Importer), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.ImporterResult_2)); - } - return null; - }, - _contextOptions(options, start) { - var includePaths, t3, t4, t5, t6, t7, - t1 = J.getInterceptor$x(options), - t2 = t1.get$includePaths(options); - if (t2 == null) - t2 = []; - includePaths = A.List_List$from(t2, true, type$.String); - t2 = t1.get$file(options); - t3 = t1.get$data(options); - t4 = A._setArrayType([A.current()], type$.JSArray_String); - B.JSArray_methods.addAll$1(t4, includePaths); - t5 = A.isNodeJs() ? self.process : null; - t4 = B.JSArray_methods.join$1(t4, J.$eq$(t5 == null ? null : J.get$platform$x(t5), "win32") ? ";" : ":"); - t5 = J.$eq$(t1.get$indentType(options), "tab") ? 1 : 0; - t6 = A._parseIndentWidth(t1.get$indentWidth(options)); - if (t6 == null) - t6 = 2; - t7 = A._parseLineFeed(t1.get$linefeed(options)); - t1 = t1.get$file(options); - if (t1 == null) - t1 = "data"; - return {file: t2, data: t3, includePaths: t4, precision: 10, style: 1, indentType: t5, indentWidth: t6, linefeed: t7.text, result: {stats: {start: start._value, entry: t1}}}; - }, - _parseOutputStyle(style) { - var t1; - $label0$0: { - if (style == null || "expanded" === style) { - t1 = B.OutputStyle_00; - break $label0$0; - } - if ("compressed" === style) { - t1 = B.OutputStyle_10; - break $label0$0; - } - t1 = A.jsThrow(new self.Error('Unknown output style "' + A.S(style) + '".')); - } - return t1; - }, - _parseIndentWidth(width) { - var t1; - $label0$0: { - if (width == null) { - t1 = null; - break $label0$0; - } - if (A._isInt(width)) { - t1 = width; - break $label0$0; - } - t1 = A.int_parse(J.toString$0$(width), null); - break $label0$0; - } - return t1; - }, - _parseLineFeed(str) { - var t1; - $label0$0: { - if ("cr" === str) { - t1 = B.LineFeed_89t; - break $label0$0; - } - if ("crlf" === str) { - t1 = B.LineFeed_A4L; - break $label0$0; - } - if ("lfcr" === str) { - t1 = B.LineFeed_75j; - break $label0$0; - } - t1 = B.LineFeed_LvD; - break $label0$0; - } - return t1; - }, - _newRenderResult(options, result, start) { - var t2, sourceMapOption, sourceMapPath, t3, sourceMapDir, outFile, _0_0, t4, sourceMapDirUrl, i, source, t5, buffer, indices, url, t6, t7, t8, _null = null, - end = new A.DateTime(Date.now(), 0, false), - t1 = result._compile_result$_serialize, - css = t1._0, - sourceMapBytes = type$.Null._as(self.undefined); - if (A._enableSourceMaps(options)) { - t2 = J.getInterceptor$x(options); - sourceMapOption = t2.get$sourceMap(options); - if (typeof sourceMapOption == "string") - sourceMapPath = sourceMapOption; - else { - t3 = t2.get$outFile(options); - t3.toString; - sourceMapPath = J.$add$ansx(t3, ".map"); - } - t3 = $.$get$context(); - sourceMapDir = t3.dirname$1(sourceMapPath); - t1 = t1._1; - t1.toString; - t1.sourceRoot = t2.get$sourceMapRoot(options); - outFile = t2.get$outFile(options); - if (outFile == null) { - _0_0 = t2.get$file(options); - $label0$0: { - if (_0_0 != null) { - t4 = t3.toUri$1(t3.withoutExtension$1(_0_0) + ".css").toString$0(0); - break $label0$0; - } - t4 = t1.targetUrl = "stdin.css"; - break $label0$0; - } - t1.targetUrl = t4; - } else - t1.targetUrl = t3.toUri$1(t3.relative$2$from(outFile, sourceMapDir)).toString$0(0); - sourceMapDirUrl = t3.toUri$1(sourceMapDir).toString$0(0); - for (t3 = t1.urls, i = 0; i < t3.length; ++i) { - source = t3[i]; - if (source === "stdin") - continue; - t4 = $.$get$url(); - t5 = t4.style; - if (t5.rootLength$1(source) <= 0 || t5.isRootRelative$1(source)) - continue; - t3[i] = t4.relative$2$from(source, sourceMapDirUrl); - } - t3 = t2.get$sourceMapContents(options); - sourceMapBytes = self.Buffer.from(B.C_JsonCodec.encode$2$toEncodable(t1.toJson$1$includeSourceContents(!J.$eq$(t3, false) && t3 != null), _null), "utf8"); - t1 = t2.get$omitSourceMapUrl(options); - if (!(!J.$eq$(t1, false) && t1 != null)) { - t1 = t2.get$sourceMapEmbed(options); - if (!J.$eq$(t1, false) && t1 != null) { - buffer = new A.StringBuffer(""); - indices = A._setArrayType([-1], type$.JSArray_int); - A.UriData__writeUri("application/json", _null, _null, buffer, indices); - indices.push(buffer._contents.length); - t1 = buffer._contents += ";base64,"; - indices.push(t1.length - 1); - t1 = B.C_Base64Encoder.startChunkedConversion$1(new A._StringSinkConversionSink(buffer)); - t2 = sourceMapBytes.length; - A.RangeError_checkValidRange(0, t2, t2); - t1._convert$_add$4(sourceMapBytes, 0, t2, true); - t1 = buffer._contents; - url = new A.UriData(t1.charCodeAt(0) == 0 ? t1 : t1, indices, _null).get$uri(); - } else { - if (outFile == null) - t1 = sourceMapPath; - else { - t1 = $.$get$context(); - t1 = t1.relative$2$from(sourceMapPath, t1.dirname$1(outFile)); - } - url = $.$get$context().toUri$1(t1); - } - t1 = url.toString$0(0); - css += "\n\n/*# sourceMappingURL=" + A.stringReplaceAllUnchecked(t1, "*/", "%2A/") + " */"; - } - } - t1 = self.Buffer.from(css, "utf8"); - t2 = J.get$file$x(options); - if (t2 == null) - t2 = "data"; - t3 = start._value; - t4 = end._value; - t5 = B.JSInt_methods._tdivFast$1(A.Duration$(end._microsecond - start._microsecond, t4 - t3)._duration, 1000); - t6 = A._setArrayType([], type$.JSArray_String); - for (t7 = result._evaluate._0, t7 = t7.get$iterator(t7); t7.moveNext$0();) { - t8 = t7.get$current(t7); - t6.push(t8.get$scheme() === "file" ? $.$get$context().style.pathFromUri$1(A._parseUri(t8)) : t8.toString$0(0)); - } - return {css: t1, map: sourceMapBytes, stats: {entry: t2, start: t3, end: t4, duration: t5, includedFiles: t6}}; - }, - _enableSourceMaps(options) { - var t2, - t1 = J.getInterceptor$x(options); - if (typeof t1.get$sourceMap(options) != "string") { - t2 = t1.get$sourceMap(options); - t1 = !J.$eq$(t2, false) && t2 != null && t1.get$outFile(options) != null; - } else - t1 = true; - return t1; - }, - _newRenderError(message, stackTrace, column, file, line, $status) { - var error = new self.Error(message); - error.formatted = "Error: " + message; - if (line != null) - error.line = line; - if (column != null) - error.column = column; - if (file != null) - error.file = file; - error.status = $status; - A.attachJsStack(error, stackTrace); - return error; - }, - render_closure: function render_closure(t0, t1) { - this.callback = t0; - this.options = t1; - }, - render_closure0: function render_closure0(t0) { - this.callback = t0; - }, - render_closure1: function render_closure1(t0) { - this.callback = t0; - }, - _parseFunctions_closure: function _parseFunctions_closure(t0, t1, t2, t3) { - var _ = this; - _.options = t0; - _.start = t1; - _.result = t2; - _.asynch = t3; - }, - _parseFunctions__closure: function _parseFunctions__closure(t0, t1, t2) { - this._box_0 = t0; - this.callback = t1; - this.context = t2; - }, - _parseFunctions___closure2: function _parseFunctions___closure2(t0) { - this.currentFiber = t0; - }, - _parseFunctions____closure: function _parseFunctions____closure(t0, t1) { - this.currentFiber = t0; - this.result = t1; - }, - _parseFunctions___closure3: function _parseFunctions___closure3(t0, t1, t2) { - this.callback = t0; - this.context = t1; - this.jsArguments = t2; - }, - _parseFunctions___closure4: function _parseFunctions___closure4(t0) { - this._box_0 = t0; - }, - _parseFunctions__closure0: function _parseFunctions__closure0(t0, t1) { - this.callback = t0; - this.context = t1; - }, - _parseFunctions___closure1: function _parseFunctions___closure1(t0, t1, t2) { - this.callback = t0; - this.context = t1; - this.$arguments = t2; - }, - _parseFunctions__closure1: function _parseFunctions__closure1(t0, t1) { - this.callback = t0; - this.context = t1; - }, - _parseFunctions___closure: function _parseFunctions___closure(t0) { - this.completer = t0; - }, - _parseFunctions___closure0: function _parseFunctions___closure0(t0, t1, t2) { - this.callback = t0; - this.context = t1; - this.jsArguments = t2; - }, - _parseImporter_closure: function _parseImporter_closure(t0) { - this._box_0 = t0; - }, - _parseImporter__closure: function _parseImporter__closure(t0, t1) { - this._box_0 = t0; - this.importer = t1; - }, - _parseImporter___closure: function _parseImporter___closure(t0) { - this.currentFiber = t0; - }, - _parseImporter____closure: function _parseImporter____closure(t0, t1) { - this.currentFiber = t0; - this.result = t1; - }, - _parseImporter___closure0: function _parseImporter___closure0(t0) { - this._box_0 = t0; - }, - LimitedMapView$blocklist0(_map, blocklist, $K, $V) { - var t2, key, - t1 = A.LinkedHashSet_LinkedHashSet$_empty($K); - for (t2 = J.get$iterator$ax(_map.get$keys(_map)); t2.moveNext$0();) { - key = t2.get$current(t2); - if (!blocklist.contains$1(0, key)) - t1.add$1(0, key); - } - return new A.LimitedMapView0(_map, t1, $K._eval$1("@<0>")._bind$1($V)._eval$1("LimitedMapView0<1,2>")); - }, - LimitedMapView0: function LimitedMapView0(t0, t1, t2) { - this._limited_map_view0$_map = t0; - this._limited_map_view0$_keys = t1; - this.$ti = t2; - }, - ListExpression0: function ListExpression0(t0, t1, t2, t3) { - var _ = this; - _.contents = t0; - _.separator = t1; - _.hasBrackets = t2; - _.span = t3; - }, - ListExpression_toString_closure0: function ListExpression_toString_closure0(t0) { - this.$this = t0; - }, - _function11($name, $arguments, callback) { - return A.BuiltInCallable$function0($name, $arguments, callback, "sass:list"); - }, - _length_closure2: function _length_closure2() { - }, - _nth_closure0: function _nth_closure0() { - }, - _setNth_closure0: function _setNth_closure0() { - }, - _join_closure0: function _join_closure0() { - }, - _append_closure2: function _append_closure2() { - }, - _zip_closure0: function _zip_closure0() { - }, - _zip__closure2: function _zip__closure2() { - }, - _zip__closure3: function _zip__closure3(t0) { - this._box_0 = t0; - }, - _zip__closure4: function _zip__closure4(t0) { - this._box_0 = t0; - }, - _index_closure2: function _index_closure2() { - }, - _separator_closure0: function _separator_closure0() { - }, - _isBracketed_closure0: function _isBracketed_closure0() { - }, - _slash_closure0: function _slash_closure0() { - }, - SelectorList$0(components, span) { - var t1 = A.List_List$unmodifiable(components, type$.ComplexSelector_2); - if (t1.length === 0) - A.throwExpression(A.ArgumentError$("components may not be empty.", null)); - return new A.SelectorList0(t1, span); - }, - SelectorList_SelectorList$parse0(contents, allowParent, interpolationMap, plainCss) { - return new A.SelectorParser0(allowParent, plainCss, A.SpanScanner$(contents, null), interpolationMap).parse$0(0); - }, - SelectorList0: function SelectorList0(t0, t1) { - this.components = t0; - this.span = t1; - }, - SelectorList_asSassList_closure0: function SelectorList_asSassList_closure0() { - }, - SelectorList_nestWithin_closure0: function SelectorList_nestWithin_closure0(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.preserveParentSelectors = t1; - _.implicitParent = t2; - _.parent = t3; - }, - SelectorList_nestWithin__closure1: function SelectorList_nestWithin__closure1(t0) { - this.complex = t0; - }, - SelectorList_nestWithin__closure2: function SelectorList_nestWithin__closure2(t0) { - this.complex = t0; - }, - SelectorList__nestWithinCompound_closure2: function SelectorList__nestWithinCompound_closure2() { - }, - SelectorList__nestWithinCompound_closure3: function SelectorList__nestWithinCompound_closure3(t0) { - this.parent = t0; - }, - SelectorList__nestWithinCompound_closure4: function SelectorList__nestWithinCompound_closure4(t0, t1, t2) { - this.parentSelector = t0; - this.resolvedSimples = t1; - this.component = t2; - }, - SelectorList_withAdditionalCombinators_closure0: function SelectorList_withAdditionalCombinators_closure0(t0) { - this.combinators = t0; - }, - _ParentSelectorVisitor0: function _ParentSelectorVisitor0() { - }, - __ParentSelectorVisitor_Object_SelectorSearchVisitor0: function __ParentSelectorVisitor_Object_SelectorSearchVisitor0() { - }, - listClass_closure: function listClass_closure() { - }, - listClass__closure: function listClass__closure() { - }, - listClass__closure0: function listClass__closure0() { - }, - _ConstructorOptions: function _ConstructorOptions() { - }, - _NodeSassList: function _NodeSassList() { - }, - legacyListClass_closure: function legacyListClass_closure() { - }, - legacyListClass__closure: function legacyListClass__closure() { - }, - legacyListClass_closure0: function legacyListClass_closure0() { - }, - legacyListClass_closure1: function legacyListClass_closure1() { - }, - legacyListClass_closure2: function legacyListClass_closure2() { - }, - legacyListClass_closure3: function legacyListClass_closure3() { - }, - legacyListClass_closure4: function legacyListClass_closure4() { - }, - SassList$0(contents, _separator, brackets) { - var t1 = new A.SassList0(A.List_List$unmodifiable(contents, type$.Value_2), _separator, brackets); - t1.SassList$3$brackets0(contents, _separator, brackets); - return t1; - }, - SassList0: function SassList0(t0, t1, t2) { - this._list1$_contents = t0; - this._list1$_separator = t1; - this._list1$_hasBrackets = t2; - }, - SassList_isBlank_closure0: function SassList_isBlank_closure0() { - }, - ListSeparator0: function ListSeparator0(t0, t1, t2) { - this._list1$_name = t0; - this.separator = t1; - this._name = t2; - }, - LmsColorSpace0: function LmsColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - LocalMindeGamutMap0: function LocalMindeGamutMap0(t0) { - this.name = t0; - }, - JSLogger: function JSLogger() { - }, - WarnOptions: function WarnOptions() { - }, - DebugOptions: function DebugOptions() { - }, - WarnForDeprecation_warnForDeprecation0(_this, deprecation, message, span, trace) { - if (_this instanceof A.LoggerWithDeprecationType) - _this.internalWarn$4$deprecation$span$trace(message, deprecation, span, trace); - else - _this.warn$4$deprecation$span$trace(0, message, true, span, trace); - }, - LoggerWithDeprecationType: function LoggerWithDeprecationType() { - }, - LoudComment0: function LoudComment0(t0) { - this.text = t0; - }, - MapExpression0: function MapExpression0(t0, t1) { - this.pairs = t0; - this.span = t1; - }, - _modify0(map, keys, modify, addNesting) { - var keyIterator = J.get$iterator$ax(keys); - return keyIterator.moveNext$0() ? new A._modify_modifyNestedMap0(keyIterator, modify, addNesting).call$1(map) : modify.call$1(map); - }, - _deepMergeImpl0(map1, map2) { - var t2, t3, result, t4, key, value, _1_1, _1_3, _1_3_isSet, _1_30, resultMap, valueMap, merged, - t1 = map1._map0$_contents; - if (t1.get$isEmpty(t1)) - return map2; - t2 = map2._map0$_contents; - if (t2.get$isEmpty(t2)) - return map1; - t3 = type$.Value_2; - result = A.LinkedHashMap_LinkedHashMap$of(t1, t3, t3); - for (t1 = A.MapExtensions_get_pairs0(t2, t3, t3), t1 = t1.get$iterator(t1), t2 = type$.SassMap_2; t1.moveNext$0();) { - t4 = t1.get$current(t1); - key = t4._0; - value = t4._1; - t4 = result.$index(0, key); - _1_1 = t4 == null ? null : t4.tryMap$0(); - _1_3 = value.tryMap$0(); - _1_3_isSet = _1_1 != null; - _1_30 = null; - t4 = false; - if (_1_3_isSet) { - resultMap = _1_1 == null ? t2._as(_1_1) : _1_1; - t4 = _1_3 != null; - _1_30 = _1_3; - } else - resultMap = null; - if (t4) { - valueMap = _1_3_isSet ? _1_30 : _1_3; - merged = A._deepMergeImpl0(resultMap, valueMap == null ? t2._as(valueMap) : valueMap); - if (merged === resultMap) - continue; - result.$indexSet(0, key, merged); - } else - result.$indexSet(0, key, value); - } - return new A.SassMap0(A.ConstantMap_ConstantMap$from(result, t3, t3)); - }, - _function10($name, $arguments, callback) { - return A.BuiltInCallable$function0($name, $arguments, callback, "sass:map"); - }, - _get_closure0: function _get_closure0() { - }, - _set_closure1: function _set_closure1() { - }, - _set__closure2: function _set__closure2(t0) { - this.$arguments = t0; - }, - _set_closure2: function _set_closure2() { - }, - _set__closure1: function _set__closure1(t0) { - this._box_0 = t0; - }, - _merge_closure1: function _merge_closure1() { - }, - _merge_closure2: function _merge_closure2() { - }, - _merge__closure0: function _merge__closure0(t0) { - this.map2 = t0; - }, - _deepMerge_closure0: function _deepMerge_closure0() { - }, - _deepRemove_closure0: function _deepRemove_closure0() { - }, - _deepRemove__closure0: function _deepRemove__closure0(t0) { - this.keys = t0; - }, - _remove_closure1: function _remove_closure1() { - }, - _remove_closure2: function _remove_closure2() { - }, - _keys_closure0: function _keys_closure0() { - }, - _values_closure0: function _values_closure0() { - }, - _hasKey_closure0: function _hasKey_closure0() { - }, - _modify_modifyNestedMap0: function _modify_modifyNestedMap0(t0, t1, t2) { - this.keyIterator = t0; - this.modify = t1; - this.addNesting = t2; - }, - MapExtensions_get_pairs0(_this, $K, $V) { - return _this.get$entries(_this).map$1$1(0, new A.MapExtensions_get_pairs_closure0($K, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("+(1,2)")); - }, - MapExtensions_get_pairs_closure0: function MapExtensions_get_pairs_closure0(t0, t1) { - this.K = t0; - this.V = t1; - }, - mapClass_closure: function mapClass_closure() { - }, - mapClass__closure: function mapClass__closure() { - }, - mapClass__closure0: function mapClass__closure0() { - }, - mapClass__closure1: function mapClass__closure1() { - }, - _NodeSassMap: function _NodeSassMap() { - }, - legacyMapClass_closure: function legacyMapClass_closure() { - }, - legacyMapClass__closure: function legacyMapClass__closure() { - }, - legacyMapClass__closure0: function legacyMapClass__closure0() { - }, - legacyMapClass_closure0: function legacyMapClass_closure0() { - }, - legacyMapClass_closure1: function legacyMapClass_closure1() { - }, - legacyMapClass_closure2: function legacyMapClass_closure2() { - }, - legacyMapClass_closure3: function legacyMapClass_closure3() { - }, - legacyMapClass_closure4: function legacyMapClass_closure4() { - }, - SassMap0: function SassMap0(t0) { - this._map0$_contents = t0; - }, - _singleArgumentMathFunc0($name, mathFunc) { - return A.BuiltInCallable$function0($name, "$number", new A._singleArgumentMathFunc_closure0(mathFunc), "sass:math"); - }, - _numberFunction0($name, transform) { - return A.BuiltInCallable$function0($name, "$number", new A._numberFunction_closure0(transform), "sass:math"); - }, - _function9($name, $arguments, callback) { - return A.BuiltInCallable$function0($name, $arguments, callback, "sass:math"); - }, - global_closure43: function global_closure43() { - }, - module_closure26: function module_closure26() { - }, - _ceil_closure0: function _ceil_closure0() { - }, - _clamp_closure0: function _clamp_closure0() { - }, - _floor_closure0: function _floor_closure0() { - }, - _max_closure0: function _max_closure0() { - }, - _min_closure0: function _min_closure0() { - }, - _round_closure0: function _round_closure0() { - }, - _hypot_closure0: function _hypot_closure0() { - }, - _hypot__closure0: function _hypot__closure0() { - }, - _log_closure0: function _log_closure0() { - }, - _pow_closure0: function _pow_closure0() { - }, - _atan2_closure0: function _atan2_closure0() { - }, - _compatible_closure0: function _compatible_closure0() { - }, - _isUnitless_closure0: function _isUnitless_closure0() { - }, - _unit_closure0: function _unit_closure0() { - }, - _percentage_closure0: function _percentage_closure0() { - }, - _randomFunction_closure0: function _randomFunction_closure0() { - }, - _div_closure0: function _div_closure0() { - }, - _singleArgumentMathFunc_closure0: function _singleArgumentMathFunc_closure0(t0) { - this.mathFunc = t0; - }, - _numberFunction_closure0: function _numberFunction_closure0(t0) { - this.transform = t0; - }, - CssMediaQuery$type0(type, conditions, modifier) { - return new A.CssMediaQuery0(modifier, type, true, conditions == null ? B.List_empty : A.List_List$unmodifiable(conditions, type$.String)); - }, - CssMediaQuery$condition0(conditions, conjunction) { - var t1 = A.List_List$unmodifiable(conditions, type$.String); - if (t1.length > 1 && conjunction == null) - A.throwExpression(A.ArgumentError$(string$.If_con, null)); - return new A.CssMediaQuery0(null, null, conjunction !== false, t1); - }, - CssMediaQuery0: function CssMediaQuery0(t0, t1, t2, t3) { - var _ = this; - _.modifier = t0; - _.type = t1; - _.conjunction = t2; - _.conditions = t3; - }, - _SingletonCssMediaQueryMergeResult0: function _SingletonCssMediaQueryMergeResult0(t0) { - this._name = t0; - }, - MediaQuerySuccessfulMergeResult0: function MediaQuerySuccessfulMergeResult0(t0) { - this.query = t0; - }, - MediaQueryParser0: function MediaQueryParser0(t0, t1) { - this.scanner = t0; - this._parser1$_interpolationMap = t1; - }, - MediaQueryParser_parse_closure0: function MediaQueryParser_parse_closure0(t0) { - this.$this = t0; - }, - ModifiableCssMediaRule$0(queries, span) { - var t1 = A.List_List$unmodifiable(queries, type$.CssMediaQuery_2), - t2 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); - if (J.get$isEmpty$asx(queries)) - A.throwExpression(A.ArgumentError$value(queries, "queries", "may not be empty.")); - return new A.ModifiableCssMediaRule0(t1, span, new A.UnmodifiableListView(t2, type$.UnmodifiableListView_ModifiableCssNode_2), t2); - }, - ModifiableCssMediaRule0: function ModifiableCssMediaRule0(t0, t1, t2, t3) { - var _ = this; - _.queries = t0; - _.span = t1; - _.children = t2; - _._node$_children = t3; - _._node$_indexInParent = _._node$_parent = null; - _.isGroupEnd = false; - }, - MediaRule$0(query, children, span) { - var t1 = A.List_List$unmodifiable(children, type$.Statement_2), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); - return new A.MediaRule0(query, span, t1, t2); - }, - MediaRule0: function MediaRule0(t0, t1, t2, t3) { - var _ = this; - _.query = t0; - _.span = t1; - _.children = t2; - _.hasDeclarations = t3; - }, - MergedExtension_merge0(left, right) { - var t2, t3, t4, - t1 = left.extender.selector; - if (!t1.$eq(0, right.extender.selector) || !left.target.$eq(0, right.target)) - throw A.wrapException(A.ArgumentError$(left.toString$0(0) + " and " + right.toString$0(0) + " aren't the same extension.", null)); - t2 = left.mediaContext; - t3 = t2 == null; - if (!t3) { - t4 = right.mediaContext; - t4 = t4 != null && !B.C_ListEquality.equals$2(0, t2, t4); - } else - t4 = false; - if (t4) - throw A.wrapException(A.SassException$0("From " + left.span.message$1(0, "") + string$.x0aYou_m, right.span, null)); - if (right.isOptional && right.mediaContext == null) - return left; - if (left.isOptional && t3) - return right; - if (t3) - t2 = right.mediaContext; - t1.get$specificity(); - t1 = new A.Extender0(t1, false); - return t1._extension$_extension = new A.MergedExtension0(left, right, t1, left.target, t2, true, left.span); - }, - MergedExtension0: function MergedExtension0(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.left = t0; - _.right = t1; - _.extender = t2; - _.target = t3; - _.mediaContext = t4; - _.isOptional = t5; - _.span = t6; - }, - MergedMapView$0(maps, $K, $V) { - var t1 = $K._eval$1("@<0>")._bind$1($V); - t1 = new A.MergedMapView0(A.LinkedHashMap_LinkedHashMap$_empty($K, t1._eval$1("Map<1,2>")), t1._eval$1("MergedMapView0<1,2>")); - t1.MergedMapView$10(maps, $K, $V); - return t1; - }, - MergedMapView0: function MergedMapView0(t0, t1) { - this._merged_map_view$_mapsByKey = t0; - this.$ti = t1; - }, - _function6($name, $arguments, callback) { - return A.BuiltInCallable$function0($name, $arguments, callback, "sass:meta"); - }, - _shared_closure3: function _shared_closure3() { - }, - _shared_closure4: function _shared_closure4() { - }, - _shared_closure5: function _shared_closure5() { - }, - _shared_closure6: function _shared_closure6() { - }, - moduleFunctions_closure2: function moduleFunctions_closure2() { - }, - moduleFunctions_closure3: function moduleFunctions_closure3() { - }, - moduleFunctions__closure0: function moduleFunctions__closure0() { - }, - moduleFunctions_closure4: function moduleFunctions_closure4() { - }, - mixinClass_closure: function mixinClass_closure() { - }, - mixinClass__closure: function mixinClass__closure() { - }, - mixinClass__closure0: function mixinClass__closure0() { - }, - SassMixin0: function SassMixin0(t0) { - this.callable = t0; - }, - MixinRule$0($name, $arguments, children, span, comment) { - var t1 = A.stringReplaceAllUnchecked($name, "_", "-"), - t2 = A.List_List$unmodifiable(children, type$.Statement_2), - t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); - return new A.MixinRule0(t1, $name, $arguments, span, t2, t3); - }, - MixinRule0: function MixinRule0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._mixin_rule$__MixinRule_hasContent_FI = $; - _.name = t0; - _.originalName = t1; - _.$arguments = t2; - _.span = t3; - _.children = t4; - _.hasDeclarations = t5; - }, - _HasContentVisitor0: function _HasContentVisitor0() { - }, - __HasContentVisitor_Object_StatementSearchVisitor0: function __HasContentVisitor_Object_StatementSearchVisitor0() { - }, - ExtendMode0: function ExtendMode0(t0, t1) { - this.name = t0; - this._name = t1; - }, - JSModule0: function JSModule0() { - }, - JSModuleRequire0: function JSModuleRequire0() { - }, - MultiSpan0: function MultiSpan0(t0, t1, t2) { - this._multi_span0$_primary = t0; - this.primaryLabel = t1; - this.secondarySpans = t2; - }, - SupportsNegation0: function SupportsNegation0(t0, t1) { - this.condition = t0; - this.span = t1; - }, - NoOpImporter0: function NoOpImporter0() { - }, - NoSourceMapBuffer0: function NoSourceMapBuffer0(t0) { - this._no_source_map_buffer0$_buffer = t0; - }, - _FakeAstNode0: function _FakeAstNode0(t0) { - this._node0$_callback = t0; - }, - CssNode0: function CssNode0() { - }, - CssParentNode0: function CssParentNode0() { - }, - _IsInvisibleVisitor1: function _IsInvisibleVisitor1(t0, t1) { - this.includeBogus = t0; - this.includeComments = t1; - }, - __IsInvisibleVisitor_Object_EveryCssVisitor0: function __IsInvisibleVisitor_Object_EveryCssVisitor0() { - }, - ModifiableCssNode0: function ModifiableCssNode0() { - }, - ModifiableCssNode_hasFollowingSibling_closure0: function ModifiableCssNode_hasFollowingSibling_closure0() { - }, - ModifiableCssParentNode0: function ModifiableCssParentNode0() { - }, - NodePackageImporter0: function NodePackageImporter0() { - this._node_package$__NodePackageImporter__entryPointDirectory_F = $; - }, - NodePackageImporter__nodePackageExportsResolve_closure3: function NodePackageImporter__nodePackageExportsResolve_closure3() { - }, - NodePackageImporter__nodePackageExportsResolve_closure4: function NodePackageImporter__nodePackageExportsResolve_closure4() { - }, - NodePackageImporter__nodePackageExportsResolve_closure5: function NodePackageImporter__nodePackageExportsResolve_closure5() { - }, - NodePackageImporter__nodePackageExportsResolve_closure6: function NodePackageImporter__nodePackageExportsResolve_closure6(t0, t1, t2) { - this.$this = t0; - this.exports = t1; - this.packageRoot = t2; - }, - NodePackageImporter__nodePackageExportsResolve__closure1: function NodePackageImporter__nodePackageExportsResolve__closure1(t0, t1, t2) { - this.$this = t0; - this.variant = t1; - this.packageRoot = t2; - }, - NodePackageImporter__nodePackageExportsResolve__closure2: function NodePackageImporter__nodePackageExportsResolve__closure2() { - }, - NodePackageImporter__getMainExport_closure0: function NodePackageImporter__getMainExport_closure0() { - }, - NullExpression$(span) { - return new A.NullExpression0(span); - }, - NullExpression0: function NullExpression0(t0) { - this.span = t0; - }, - legacyNullClass_closure: function legacyNullClass_closure() { - }, - legacyNullClass__closure: function legacyNullClass__closure() { - }, - _SassNull0: function _SassNull0() { - }, - NumberExpression0: function NumberExpression0(t0, t1, t2) { - this.value = t0; - this.unit = t1; - this.span = t2; - }, - numberClass_closure: function numberClass_closure() { - }, - numberClass__closure: function numberClass__closure() { - }, - numberClass__closure0: function numberClass__closure0() { - }, - numberClass__closure1: function numberClass__closure1() { - }, - numberClass__closure2: function numberClass__closure2() { - }, - numberClass__closure3: function numberClass__closure3() { - }, - numberClass__closure4: function numberClass__closure4() { - }, - numberClass__closure5: function numberClass__closure5() { - }, - numberClass__closure6: function numberClass__closure6() { - }, - numberClass__closure7: function numberClass__closure7() { - }, - numberClass__closure8: function numberClass__closure8() { - }, - numberClass__closure9: function numberClass__closure9() { - }, - numberClass__closure10: function numberClass__closure10() { - }, - numberClass__closure11: function numberClass__closure11() { - }, - numberClass__closure12: function numberClass__closure12() { - }, - numberClass__closure13: function numberClass__closure13() { - }, - numberClass__closure14: function numberClass__closure14() { - }, - numberClass__closure15: function numberClass__closure15() { - }, - numberClass__closure16: function numberClass__closure16() { - }, - numberClass__closure17: function numberClass__closure17() { - }, - numberClass__closure18: function numberClass__closure18() { - }, - numberClass__closure19: function numberClass__closure19() { - }, - _ConstructorOptions0: function _ConstructorOptions0() { - }, - _parseNumber(value, unit) { - var invalidUnit, operands, t1, numerator, denominator, numeratorUnits, denominatorUnits; - if (unit == null || unit.length === 0) - return A.SassNumber_SassNumber0(value, null); - if (!J.contains$1$asx(unit, "*") && !B.JSString_methods.contains$1(unit, "/")) - return A.SassNumber_SassNumber0(value, unit); - invalidUnit = new A.ArgumentError(true, unit, "unit", "is invalid."); - operands = unit.split("/"); - t1 = operands.length; - if (t1 > 2) - throw A.wrapException(invalidUnit); - numerator = operands[0]; - denominator = t1 === 1 ? null : operands[1]; - t1 = type$.JSArray_String; - numeratorUnits = numerator.length === 0 ? A._setArrayType([], t1) : A._setArrayType(numerator.split("*"), t1); - if (B.JSArray_methods.any$1(numeratorUnits, new A._parseNumber_closure())) - throw A.wrapException(invalidUnit); - denominatorUnits = denominator == null ? A._setArrayType([], t1) : A._setArrayType(denominator.split("*"), t1); - if (B.JSArray_methods.any$1(denominatorUnits, new A._parseNumber_closure0())) - throw A.wrapException(invalidUnit); - return A.SassNumber_SassNumber$withUnits0(value, denominatorUnits, numeratorUnits); - }, - _NodeSassNumber: function _NodeSassNumber() { - }, - legacyNumberClass_closure: function legacyNumberClass_closure() { - }, - legacyNumberClass_closure0: function legacyNumberClass_closure0() { - }, - legacyNumberClass_closure1: function legacyNumberClass_closure1() { - }, - legacyNumberClass_closure2: function legacyNumberClass_closure2() { - }, - legacyNumberClass_closure3: function legacyNumberClass_closure3() { - }, - _parseNumber_closure: function _parseNumber_closure() { - }, - _parseNumber_closure0: function _parseNumber_closure0() { - }, - conversionFactor0(unit1, unit2) { - var _0_0; - if (unit1 === unit2) - return 1; - _0_0 = B.Map_gQqJO.$index(0, unit1); - if (_0_0 != null) - return _0_0.$index(0, unit2); - return null; - }, - SassNumber_SassNumber0(value, unit) { - return unit == null ? new A.UnitlessSassNumber0(value, null) : new A.SingleUnitSassNumber0(unit, value, null); - }, - SassNumber_SassNumber$withUnits0(value, denominatorUnits, numeratorUnits) { - var _0_8_isSet, _0_8, _0_10, _0_10_isSet, _0_7, unit, t2, _0_7_isSet, t3, _0_4_isSet, _0_7_isSet0, numerators, denominators, unsimplifiedDenominators, valueDouble, _i, denominator, simplifiedAway, i, factor, _1_2, _1_7_isSet, _1_7, _null = null, - _0_3 = numeratorUnits == null, - t1 = _0_3, - _0_6_isSet = !t1, - _0_6 = _null, - _0_4 = _null; - if (_0_6_isSet) { - _0_4 = J.get$length$asx(numeratorUnits == null ? type$.List_String._as(numeratorUnits) : numeratorUnits); - t1 = _0_4; - _0_6 = t1 <= 0; - _0_8_isSet = _0_6; - } else - _0_8_isSet = true; - _0_8 = _null; - _0_10 = _null; - if (_0_8_isSet) { - _0_8 = denominatorUnits == null; - t1 = _0_8; - _0_10_isSet = !t1; - if (_0_10_isSet) { - _0_10 = J.get$length$asx(denominatorUnits == null ? type$.List_String._as(denominatorUnits) : denominatorUnits) <= 0; - t1 = _0_10; - } else - t1 = true; - _0_7 = denominatorUnits; - } else { - _0_7 = _null; - _0_10_isSet = false; - t1 = false; - } - if (t1) - return new A.UnitlessSassNumber0(value, _null); - t1 = type$.List_String; - unit = _null; - t2 = false; - if (t1._is(numeratorUnits)) { - _0_7_isSet = true; - if (_0_6_isSet) { - t3 = _0_4; - _0_4_isSet = _0_6_isSet; - } else { - _0_4 = J.get$length$asx(numeratorUnits); - t3 = _0_4; - _0_4_isSet = true; - } - if (t3 === 1) { - unit = J.$index$asx(numeratorUnits, 0); - if (_0_8_isSet) { - t2 = _0_8; - _0_7_isSet0 = _0_8_isSet; - } else { - _0_8 = denominatorUnits == null; - t2 = _0_8; - _0_7_isSet0 = _0_7_isSet; - _0_7 = denominatorUnits; - _0_8_isSet = true; - } - if (!t2) - if (_0_10_isSet) { - t2 = _0_10; - _0_7_isSet = _0_7_isSet0; - } else { - if (_0_7_isSet0) { - t2 = _0_7; - _0_7_isSet = _0_7_isSet0; - } else { - t2 = denominatorUnits; - _0_7 = t2; - } - _0_10 = J.get$length$asx(t2 == null ? t1._as(t2) : t2) <= 0; - t2 = _0_10; - _0_10_isSet = true; - } - else { - _0_7_isSet = _0_7_isSet0; - t2 = true; - } - } else - _0_7_isSet = _0_8_isSet; - } else { - _0_7_isSet = _0_8_isSet; - _0_4_isSet = _0_6_isSet; - } - if (t2) - return new A.SingleUnitSassNumber0(unit, value, _null); - t2 = numeratorUnits == null; - t3 = false; - if (!t2) { - _0_7_isSet0 = true; - numerators = numeratorUnits; - if (_0_8_isSet) - t3 = _0_8; - else { - if (_0_7_isSet) - t3 = _0_7; - else { - t3 = denominatorUnits; - _0_7_isSet = _0_7_isSet0; - _0_7 = t3; - } - _0_8 = t3 == null; - t3 = _0_8; - } - if (!t3) - if (_0_10_isSet) - t3 = _0_10; - else { - if (_0_7_isSet) - t3 = _0_7; - else { - t3 = denominatorUnits; - _0_7_isSet = _0_7_isSet0; - _0_7 = t3; - } - _0_10 = J.get$length$asx(t3 == null ? t1._as(t3) : t3) <= 0; - t3 = _0_10; - } - else - t3 = true; - } else - numerators = _null; - if (t3) - return new A.ComplexSassNumber0(A.List_List$unmodifiable(numerators, type$.String), B.List_empty, value, _null); - if (!_0_3) - if (_0_6_isSet) - t2 = _0_6; - else { - if (_0_4_isSet) - t2 = _0_4; - else { - _0_4 = J.get$length$asx(t2 ? t1._as(numeratorUnits) : numeratorUnits); - t2 = _0_4; - } - _0_6 = t2 <= 0; - t2 = _0_6; - } - else - t2 = true; - denominators = _null; - if (t2) { - if (_0_7_isSet) - t2 = _0_7; - else { - t2 = denominatorUnits; - _0_7 = t2; - _0_7_isSet = true; - } - t2 = t2 != null; - if (t2) { - denominators = _0_7_isSet ? _0_7 : denominatorUnits; - if (denominators == null) - denominators = t1._as(denominators); - } - t1 = t2; - } else - t1 = false; - if (t1) - return new A.ComplexSassNumber0(B.List_empty, A.List_List$unmodifiable(denominators, type$.String), value, _null); - numeratorUnits.toString; - numerators = J.toList$0$ax(numeratorUnits); - denominatorUnits.toString; - unsimplifiedDenominators = J.toList$0$ax(denominatorUnits); - denominators = A._setArrayType([], type$.JSArray_String); - for (t1 = unsimplifiedDenominators.length, valueDouble = value, _i = 0; _i < unsimplifiedDenominators.length; unsimplifiedDenominators.length === t1 || (0, A.throwConcurrentModificationError)(unsimplifiedDenominators), ++_i) { - denominator = unsimplifiedDenominators[_i]; - i = 0; - while (true) { - if (!(i < numerators.length)) { - simplifiedAway = false; - break; - } - c$0: { - factor = A.conversionFactor0(denominator, numerators[i]); - if (factor == null) - break c$0; - valueDouble *= factor; - B.JSArray_methods.removeAt$1(numerators, i); - simplifiedAway = true; - break; - } - ++i; - } - if (!simplifiedAway) - denominators.push(denominator); - } - $label0$1: { - _1_2 = numerators.length; - t1 = _1_2; - _1_7_isSet = t1 <= 0; - if (_1_7_isSet) { - _1_7 = denominators.length <= 0; - t1 = _1_7; - } else { - _1_7 = _null; - t1 = false; - } - if (t1) { - t1 = new A.UnitlessSassNumber0(valueDouble, _null); - break $label0$1; - } - t1 = false; - if (_1_2 === 1) { - unit = numerators[0]; - t1 = _1_7_isSet ? _1_7 : denominators.length <= 0; - } else - unit = _null; - if (t1) { - t1 = new A.SingleUnitSassNumber0(unit, valueDouble, _null); - break $label0$1; - } - t1 = type$.String; - t1 = new A.ComplexSassNumber0(A.List_List$unmodifiable(numerators, t1), A.List_List$unmodifiable(denominators, t1), valueDouble, _null); - break $label0$1; - } - return t1; - }, - SassNumber0: function SassNumber0() { - }, - SassNumber__coerceOrConvertValue_compatibilityException0: function SassNumber__coerceOrConvertValue_compatibilityException0(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.$this = t0; - _.other = t1; - _.otherName = t2; - _.otherHasUnits = t3; - _.name = t4; - _.newNumerators = t5; - _.newDenominators = t6; - }, - SassNumber__coerceOrConvertValue_closure3: function SassNumber__coerceOrConvertValue_closure3(t0, t1) { - this._box_0 = t0; - this.newNumerator = t1; - }, - SassNumber__coerceOrConvertValue_closure4: function SassNumber__coerceOrConvertValue_closure4(t0) { - this.compatibilityException = t0; - }, - SassNumber__coerceOrConvertValue_closure5: function SassNumber__coerceOrConvertValue_closure5(t0, t1) { - this._box_0 = t0; - this.newDenominator = t1; - }, - SassNumber__coerceOrConvertValue_closure6: function SassNumber__coerceOrConvertValue_closure6(t0) { - this.compatibilityException = t0; - }, - SassNumber_plus_closure0: function SassNumber_plus_closure0() { - }, - SassNumber_minus_closure0: function SassNumber_minus_closure0() { - }, - SassNumber_multiplyUnits_closure3: function SassNumber_multiplyUnits_closure3(t0, t1) { - this._box_0 = t0; - this.numerator = t1; - }, - SassNumber_multiplyUnits_closure4: function SassNumber_multiplyUnits_closure4(t0, t1) { - this.newNumerators = t0; - this.numerator = t1; - }, - SassNumber_multiplyUnits_closure5: function SassNumber_multiplyUnits_closure5(t0, t1) { - this._box_0 = t0; - this.numerator = t1; - }, - SassNumber_multiplyUnits_closure6: function SassNumber_multiplyUnits_closure6(t0, t1) { - this.newNumerators = t0; - this.numerator = t1; - }, - SassNumber__areAnyConvertible_closure0: function SassNumber__areAnyConvertible_closure0(t0) { - this.units2 = t0; - }, - SassNumber__canonicalizeUnitList_closure0: function SassNumber__canonicalizeUnitList_closure0() { - }, - SassNumber__canonicalMultiplier_closure0: function SassNumber__canonicalMultiplier_closure0(t0) { - this.$this = t0; - }, - SassNumber_unitSuggestion_closure1: function SassNumber_unitSuggestion_closure1() { - }, - SassNumber_unitSuggestion_closure2: function SassNumber_unitSuggestion_closure2() { - }, - OklabColorSpace0: function OklabColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - OklchColorSpace0: function OklchColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - SupportsOperation$0(left, right, operator, span) { - var lowerOperator = operator.toLowerCase(); - if (lowerOperator !== "and" && lowerOperator !== "or") - A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); - return new A.SupportsOperation0(left, right, operator, span); - }, - SupportsOperation0: function SupportsOperation0(t0, t1, t2, t3) { - var _ = this; - _.left = t0; - _.right = t1; - _.operator = t2; - _.span = t3; - }, - ParentSelector0: function ParentSelector0(t0, t1) { - this.suffix = t0; - this.span = t1; - }, - ParentStatement0: function ParentStatement0() { - }, - ParentStatement_closure0: function ParentStatement_closure0() { - }, - ParentStatement__closure0: function ParentStatement__closure0() { - }, - ParenthesizedExpression0: function ParenthesizedExpression0(t0, t1) { - this.expression = t0; - this.span = t1; - }, - loadParserExports() { - A._updateAstPrototypes(); - return {parse: A.allowInterop(A.parser0___parse$closure()), parseIdentifier: A.allowInterop(A.parser0___parseIdentifier$closure()), toCssIdentifier: A.allowInterop(A.parser0___toCssIdentifier$closure()), createExpressionVisitor: A.allowInterop(new A.loadParserExports_closure()), createStatementVisitor: A.allowInterop(new A.loadParserExports_closure0()), setToJS: A.allowInterop(new A.loadParserExports_closure1())}; - }, - _updateAstPrototypes() { - var t2, t3, string, _i, t4, - file = A.SourceFile$fromString("", null), - t1 = type$.JSClass; - J.get$$prototype$x(t1._as(file.constructor)).getText = A.allowInteropCaptureThisNamed("getText", new A._updateAstPrototypes_closure()); - A.defineGetter(J.get$$prototype$x(t1._as(file.constructor)), "codeUnits", new A._updateAstPrototypes_closure0(), null); - t2 = $.$get$_interpolation(); - A.defineGetter(J.get$$prototype$x(t1._as(t2.constructor)), "asPlain", new A._updateAstPrototypes_closure1(), null); - t3 = $.$get$bogusSpan0(); - J.get$$prototype$x(t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(new A.ExtendRule0(t2, false, t3).constructor))).constructor)).accept = A.allowInteropCaptureThisNamed("accept", new A._updateAstPrototypes_closure2()); - string = new A.StringExpression0(t2, false); - J.get$$prototype$x(t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(string.constructor))).constructor)).accept = A.allowInteropCaptureThisNamed("accept", new A._updateAstPrototypes_closure3()); - A._addSupportsConditionToInterpolation(); - for (t2 = [string, new A.BinaryOperationExpression0(B.BinaryOperator_u150, string, string, false), new A.SupportsExpression0(new A.SupportsAnything0(t2, t3)), new A.LoudComment0(t2)], _i = 0; _i < 4; ++_i) { - t3 = J.get$$prototype$x(t1._as(t2[_i].constructor)); - t4 = {get: A.allowInteropCaptureThis(new A._updateAstPrototypes_closure4()), enumerable: false}; - self.Object.defineProperty(t3, "span", t4); - } - }, - _addSupportsConditionToInterpolation() { - var t3, _i, $function, t4, - t1 = $.$get$_interpolation(), - t2 = $.$get$bogusSpan0(), - anything = new A.SupportsAnything0(t1, t2); - for (t3 = $.$get$_expression(), t2 = [anything, new A.SupportsDeclaration0(t3, t3, t2), new A.SupportsFunction0(t1, t1, t2), new A.SupportsInterpolation0(t3, t2), new A.SupportsNegation0(anything, t2), A.SupportsOperation$0(anything, anything, "and", t2)], t3 = type$.JSClass, _i = 0; _i < 6; ++_i) { - t1 = J.get$$prototype$x(t3._as(t2[_i].constructor)); - $function = A.allowInteropCaptureThis(new A._addSupportsConditionToInterpolation_closure()); - t4 = {value: "toInterpolation", enumerable: false}; - self.Object.defineProperty($function, "name", t4); - A._hideDartProperties($function); - t1.toInterpolation = $function; - } - }, - _parse(css, syntax, path) { - var t1; - $label0$0: { - if ("scss" === syntax) { - t1 = B.Syntax_SCSS_scss0; - break $label0$0; - } - if ("sass" === syntax) { - t1 = B.Syntax_Sass_sass0; - break $label0$0; - } - if ("css" === syntax) { - t1 = B.Syntax_CSS_css0; - break $label0$0; - } - t1 = A.throwExpression(A.UnsupportedError$('Unknown syntax "' + syntax + '"')); - } - return A.Stylesheet_Stylesheet$parse0(css, t1, A.NullableExtension_andThen0(path, A.path__toUri$closure())); - }, - _parseIdentifier(identifier) { - var t1, exception; - try { - t1 = new A.Parser1(A.SpanScanner$(identifier, null), null)._parser1$_parseIdentifier$0(); - return t1; - } catch (exception) { - if (type$.SassFormatException_2._is(A.unwrapException(exception))) - return null; - else - throw exception; - } - }, - _toCssIdentifier(text) { - return A.StringExtension_toCssIdentifier(text); - }, - ParserExports: function ParserExports() { - }, - loadParserExports_closure: function loadParserExports_closure() { - }, - loadParserExports_closure0: function loadParserExports_closure0() { - }, - loadParserExports_closure1: function loadParserExports_closure1() { - }, - _updateAstPrototypes_closure: function _updateAstPrototypes_closure() { - }, - _updateAstPrototypes_closure0: function _updateAstPrototypes_closure0() { - }, - _updateAstPrototypes_closure1: function _updateAstPrototypes_closure1() { - }, - _updateAstPrototypes_closure2: function _updateAstPrototypes_closure2() { - }, - _updateAstPrototypes_closure3: function _updateAstPrototypes_closure3() { - }, - _updateAstPrototypes_closure4: function _updateAstPrototypes_closure4() { - }, - _addSupportsConditionToInterpolation_closure: function _addSupportsConditionToInterpolation_closure() { - }, - Parser_isIdentifier0(text) { - var exception; - try { - new A.Parser1(A.SpanScanner$(text, null), null)._parser1$_parseIdentifier$0(); - return true; - } catch (exception) { - if (type$.SassFormatException_2._is(A.unwrapException(exception))) - return false; - else - throw exception; - } - }, - Parser1: function Parser1(t0, t1) { - this.scanner = t0; - this._parser1$_interpolationMap = t1; - }, - Parser__parseIdentifier_closure0: function Parser__parseIdentifier_closure0(t0) { - this.$this = t0; - }, - Parser_escape_closure0: function Parser_escape_closure0() { - }, - Parser_scanIdentChar_matches0: function Parser_scanIdentChar_matches0(t0, t1) { - this.caseSensitive = t0; - this.char = t1; - }, - Parser_spanFrom_closure0: function Parser_spanFrom_closure0(t0, t1) { - this.$this = t0; - this.span = t1; - }, - PlaceholderSelector0: function PlaceholderSelector0(t0, t1) { - this.name = t0; - this.span = t1; - }, - PlainCssCallable0: function PlainCssCallable0(t0) { - this.name = t0; - }, - PrefixedMapView0: function PrefixedMapView0(t0, t1, t2) { - this._prefixed_map_view0$_map = t0; - this._prefixed_map_view0$_prefix = t1; - this.$ti = t2; - }, - _PrefixedKeys0: function _PrefixedKeys0(t0) { - this._prefixed_map_view0$_view = t0; - }, - _PrefixedKeys_iterator_closure0: function _PrefixedKeys_iterator_closure0(t0) { - this.$this = t0; - }, - ProphotoRgbColorSpace0: function ProphotoRgbColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - PseudoSelector$0($name, span, argument, element, selector) { - var t1 = !element, - t2 = t1 && !A.PseudoSelector__isFakePseudoElement0($name); - return new A.PseudoSelector0($name, A.unvendor0($name), t2, t1, argument, selector, span); - }, - PseudoSelector__isFakePseudoElement0($name) { - switch ($name.charCodeAt(0)) { - case 97: - case 65: - return A.equalsIgnoreCase0($name, "after"); - case 98: - case 66: - return A.equalsIgnoreCase0($name, "before"); - case 102: - case 70: - return A.equalsIgnoreCase0($name, "first-line") || A.equalsIgnoreCase0($name, "first-letter"); - default: - return false; - } - }, - PseudoSelector0: function PseudoSelector0(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.name = t0; - _.normalizedName = t1; - _.isClass = t2; - _.isSyntacticClass = t3; - _.argument = t4; - _.selector = t5; - _._pseudo$__PseudoSelector_specificity_FI = $; - _.span = t6; - }, - PseudoSelector_specificity_closure0: function PseudoSelector_specificity_closure0(t0) { - this.$this = t0; - }, - PseudoSelector_specificity__closure1: function PseudoSelector_specificity__closure1() { - }, - PseudoSelector_specificity__closure2: function PseudoSelector_specificity__closure2() { - }, - PseudoSelector_unify_closure0: function PseudoSelector_unify_closure0() { - }, - PublicMemberMapView0: function PublicMemberMapView0(t0, t1) { - this._public_member_map_view0$_inner = t0; - this.$ti = t1; - }, - QualifiedName0: function QualifiedName0(t0, t1) { - this.name = t0; - this.namespace = t1; - }, - Rec2020ColorSpace0: function Rec2020ColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - createJSClass($name, $constructor) { - return type$.JSClass._as(A.allowInteropCaptureThisNamed($name, $constructor)); - }, - JSClassExtension_injectSuperclass(_this, superclass) { - var t1 = J.getInterceptor$x(superclass), - t2 = J.getInterceptor$x(_this); - self.Object.setPrototypeOf(t1.get$$prototype(superclass), J.get$$prototype$x(type$.JSClass._as(self.Object.getPrototypeOf(t2.get$$prototype(_this)).constructor))); - self.Object.setPrototypeOf(t2.get$$prototype(_this), self.Object.create(t1.get$$prototype(superclass))); - }, - JSClassExtension_setCustomInspect(_this, inspect) { - if (self.util == null) - return; - J.get$$prototype$x(_this)[self.util.inspect.custom] = A.allowInteropCaptureThis(new A.JSClassExtension_setCustomInspect_closure(inspect)); - }, - JSClassExtension_get_defineStaticMethod(_this) { - return new A.JSClassExtension_get_defineStaticMethod_closure(_this); - }, - JSClassExtension_get_defineMethod(_this) { - return new A.JSClassExtension_get_defineMethod_closure(_this); - }, - JSClassExtension_defineMethods(_this, methods) { - methods.forEach$1(0, A.JSClassExtension_get_defineMethod(_this)); - }, - JSClassExtension_get_defineGetter(_this) { - return new A.JSClassExtension_get_defineGetter_closure(_this); - }, - JSClass0: function JSClass0() { - }, - JSClassExtension_setCustomInspect_closure: function JSClassExtension_setCustomInspect_closure(t0) { - this.inspect = t0; - }, - JSClassExtension_get_defineStaticMethod_closure: function JSClassExtension_get_defineStaticMethod_closure(t0) { - this._this = t0; - }, - JSClassExtension_get_defineMethod_closure: function JSClassExtension_get_defineMethod_closure(t0) { - this._this = t0; - }, - JSClassExtension_get_defineGetter_closure: function JSClassExtension_get_defineGetter_closure(t0) { - this._this = t0; - }, - RenderContext0: function RenderContext0() { - }, - RenderContextOptions0: function RenderContextOptions0() { - }, - RenderContextResult0: function RenderContextResult0() { - }, - RenderContextResultStats0: function RenderContextResultStats0() { - }, - RenderOptions: function RenderOptions() { - }, - RenderResult: function RenderResult() { - }, - RenderResultStats: function RenderResultStats() { - }, - ReplaceExpressionVisitor0: function ReplaceExpressionVisitor0() { - }, - ReplaceExpressionVisitor_visitListExpression_closure0: function ReplaceExpressionVisitor_visitListExpression_closure0(t0) { - this.$this = t0; - }, - ReplaceExpressionVisitor_visitArgumentInvocation_closure0: function ReplaceExpressionVisitor_visitArgumentInvocation_closure0(t0) { - this.$this = t0; - }, - ReplaceExpressionVisitor_visitInterpolation_closure0: function ReplaceExpressionVisitor_visitInterpolation_closure0(t0) { - this.$this = t0; - }, - ImporterResult$(contents, sourceMapUrl, syntax) { - if ((sourceMapUrl == null ? null : sourceMapUrl.get$scheme()) === "") - A.throwExpression(A.ArgumentError$value(sourceMapUrl, "sourceMapUrl", "must be absolute")); - return new A.ImporterResult0(contents, sourceMapUrl, syntax); - }, - ImporterResult0: function ImporterResult0(t0, t1, t2) { - this.contents = t0; - this._result$_sourceMapUrl = t1; - this.syntax = t2; - }, - ReturnRule0: function ReturnRule0(t0, t1) { - this.expression = t0; - this.span = t1; - }, - RgbColorSpace0: function RgbColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - SassParser0: function SassParser0(t0, t1, t2, t3) { - var _ = this; - _._sass0$_currentIndentation = 0; - _._sass0$_spaces = _._sass0$_nextIndentationEnd = _._sass0$_nextIndentation = null; - _._stylesheet0$_isUseAllowed = true; - _._stylesheet0$_inExpression = _._stylesheet0$_inParentheses = _._stylesheet0$_inStyleRule = _._stylesheet0$_inUnknownAtRule = _._stylesheet0$_inControlDirective = _._stylesheet0$_inContentBlock = _._stylesheet0$_inMixin = false; - _._stylesheet0$_globalVariables = t0; - _.warnings = t1; - _.lastSilentComment = null; - _.scanner = t2; - _._parser1$_interpolationMap = t3; - }, - SassParser_styleRuleSelector_closure0: function SassParser_styleRuleSelector_closure0() { - }, - SassParser_children_closure0: function SassParser_children_closure0(t0, t1, t2) { - this.$this = t0; - this.child = t1; - this.children = t2; - }, - SassParser__peekIndentation_closure1: function SassParser__peekIndentation_closure1() { - }, - SassParser__peekIndentation_closure2: function SassParser__peekIndentation_closure2() { - }, - _translateReturnValue(val) { - if (val instanceof A._Future) - return A.futureToPromise(val, type$.dynamic); - else - return val; - }, - main2() { - new Uint8Array(0); - A.main(); - J.set$cli_pkg_main_0_$x(self.exports, A._wrapMain(A.sass__main$closure())); - }, - _wrapMain(main) { - if (type$.dynamic_Function._is(main)) - return A.allowInterop(new A._wrapMain_closure(main)); - else - return A.allowInterop(new A._wrapMain_closure0(main)); - }, - _Exports: function _Exports() { - }, - _wrapMain_closure: function _wrapMain_closure(t0) { - this.main = t0; - }, - _wrapMain_closure0: function _wrapMain_closure0(t0) { - this.main = t0; - }, - ScssParser$0(contents, url) { - return new A.ScssParser0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.FileSpan), A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2), A.SpanScanner$(contents, url), null); - }, - ScssParser0: function ScssParser0(t0, t1, t2, t3) { - var _ = this; - _._stylesheet0$_isUseAllowed = true; - _._stylesheet0$_inExpression = _._stylesheet0$_inParentheses = _._stylesheet0$_inStyleRule = _._stylesheet0$_inUnknownAtRule = _._stylesheet0$_inControlDirective = _._stylesheet0$_inContentBlock = _._stylesheet0$_inMixin = false; - _._stylesheet0$_globalVariables = t0; - _.warnings = t1; - _.lastSilentComment = null; - _.scanner = t2; - _._parser1$_interpolationMap = t3; - }, - Selector0: function Selector0() { - }, - _IsInvisibleVisitor2: function _IsInvisibleVisitor2(t0) { - this.includeBogus = t0; - }, - _IsBogusVisitor0: function _IsBogusVisitor0(t0) { - this.includeLeadingCombinator = t0; - }, - _IsBogusVisitor_visitComplexSelector_closure0: function _IsBogusVisitor_visitComplexSelector_closure0(t0) { - this.$this = t0; - }, - _IsUselessVisitor0: function _IsUselessVisitor0() { - }, - _IsUselessVisitor_visitComplexSelector_closure0: function _IsUselessVisitor_visitComplexSelector_closure0(t0) { - this.$this = t0; - }, - __IsBogusVisitor_Object_AnySelectorVisitor0: function __IsBogusVisitor_Object_AnySelectorVisitor0() { - }, - __IsInvisibleVisitor_Object_AnySelectorVisitor0: function __IsInvisibleVisitor_Object_AnySelectorVisitor0() { - }, - __IsUselessVisitor_Object_AnySelectorVisitor0: function __IsUselessVisitor_Object_AnySelectorVisitor0() { - }, - SelectorExpression0: function SelectorExpression0(t0) { - this.span = t0; - }, - _prependParent0(compound) { - var _0_3, _0_4, _0_40, t2, _0_4_isSet, t3, rest, _null = null, - t1 = A.EvaluationContext_currentOrNull0(), - span = (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan(), - _0_0 = compound.components; - $label0$0: { - _0_3 = _0_0.length >= 1; - _0_4 = _null; - if (_0_3) { - _0_40 = _0_0[0]; - t1 = _0_40; - _0_4 = t1; - t1 = t1 instanceof A.UniversalSelector0; - } else - t1 = false; - t2 = _null; - if (t1) { - t1 = t2; - break $label0$0; - } - t1 = false; - if (_0_3) { - _0_4_isSet = true; - t3 = _0_4; - if (t3 instanceof A.TypeSelector0) { - t1 = _0_4; - t1 = type$.TypeSelector_2._as(t1).name.namespace != null; - } - } else - _0_4_isSet = _0_3; - if (t1) { - t1 = t2; - break $label0$0; - } - if (_0_3) { - if (_0_4_isSet) - t1 = _0_4; - else { - _0_4 = _0_0[0]; - t1 = _0_4; - _0_4_isSet = true; - } - t1 = t1 instanceof A.TypeSelector0; - } else - t1 = false; - if (t1) { - t1 = _0_4_isSet ? _0_4 : _0_0[0]; - type$.TypeSelector_2._as(t1); - rest = B.JSArray_methods.sublist$1(_0_0, 1); - t1 = A._setArrayType([new A.ParentSelector0(t1.name.name, span)], type$.JSArray_SimpleSelector_2); - B.JSArray_methods.addAll$1(t1, rest); - t1 = A.CompoundSelector$0(t1, span); - break $label0$0; - } - t1 = A._setArrayType([new A.ParentSelector0(_null, span)], type$.JSArray_SimpleSelector_2); - B.JSArray_methods.addAll$1(t1, _0_0); - t1 = A.CompoundSelector$0(t1, span); - break $label0$0; - } - return t1; - }, - _function8($name, $arguments, callback) { - return A.BuiltInCallable$function0($name, $arguments, callback, "sass:selector"); - }, - _nest_closure0: function _nest_closure0() { - }, - _nest__closure1: function _nest__closure1(t0) { - this._box_0 = t0; - }, - _nest__closure2: function _nest__closure2() { - }, - _append_closure1: function _append_closure1() { - }, - _append__closure1: function _append__closure1() { - }, - _append__closure2: function _append__closure2(t0) { - this.span = t0; - }, - _append___closure0: function _append___closure0(t0, t1) { - this.parent = t0; - this.span = t1; - }, - _extend_closure0: function _extend_closure0() { - }, - _replace_closure0: function _replace_closure0() { - }, - _unify_closure0: function _unify_closure0() { - }, - _isSuperselector_closure0: function _isSuperselector_closure0() { - }, - _simpleSelectors_closure0: function _simpleSelectors_closure0() { - }, - _simpleSelectors__closure0: function _simpleSelectors__closure0() { - }, - _parse_closure0: function _parse_closure0() { - }, - SelectorParser0: function SelectorParser0(t0, t1, t2, t3) { - var _ = this; - _._selector$_allowParent = t0; - _._selector$_plainCss = t1; - _.scanner = t2; - _._parser1$_interpolationMap = t3; - }, - SelectorParser_parse_closure0: function SelectorParser_parse_closure0(t0) { - this.$this = t0; - }, - SelectorParser_parseCompoundSelector_closure0: function SelectorParser_parseCompoundSelector_closure0(t0) { - this.$this = t0; - }, - SelectorSearchVisitor0: function SelectorSearchVisitor0() { - }, - SelectorSearchVisitor_visitComplexSelector_closure0: function SelectorSearchVisitor_visitComplexSelector_closure0(t0) { - this.$this = t0; - }, - SelectorSearchVisitor_visitCompoundSelector_closure0: function SelectorSearchVisitor_visitCompoundSelector_closure0(t0) { - this.$this = t0; - }, - serialize0(node, charset, indentWidth, inspect, lineFeed, logger, sourceMap, style, useSpaces) { - var t1, css, t2, prefix, - visitor = A._SerializeVisitor$0(indentWidth == null ? 2 : indentWidth, inspect, lineFeed, logger, true, sourceMap, style, useSpaces); - node.accept$1(visitor); - t1 = visitor._serialize0$_buffer; - css = t1.toString$0(0); - if (charset) { - t2 = new A.CodeUnits(css); - t2 = t2.any$1(t2, new A.serialize_closure0()); - } else - t2 = false; - if (t2) - prefix = style === B.OutputStyle_10 ? "\ufeff" : '@charset "UTF-8";\n'; - else - prefix = ""; - t1 = sourceMap ? t1.buildSourceMap$1$prefix(prefix) : null; - return new A._Record_2_sourceMap(prefix + css, t1); - }, - serializeValue0(value, inspect, quote) { - var _null = null, - visitor = A._SerializeVisitor$0(_null, inspect, _null, _null, quote, false, _null, true); - value.accept$1(visitor); - return visitor._serialize0$_buffer.toString$0(0); - }, - serializeSelector0(selector, inspect) { - var _null = null, - visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); - selector.accept$1(visitor); - return visitor._serialize0$_buffer.toString$0(0); - }, - _SerializeVisitor$0(indentWidth, inspect, lineFeed, logger, quote, sourceMap, style, useSpaces) { - var t1 = sourceMap ? new A.SourceMapBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Entry)) : new A.NoSourceMapBuffer0(new A.StringBuffer("")), - t2 = style == null ? B.OutputStyle_00 : style, - t3 = useSpaces ? 32 : 9, - t4 = indentWidth == null ? 2 : indentWidth, - t5 = lineFeed == null ? B.LineFeed_LvD : lineFeed, - t6 = logger == null ? B.StderrLogger_false0 : logger; - A.RangeError_checkValueInInterval(t4, 0, 10, "indentWidth"); - return new A._SerializeVisitor0(t1, t2, inspect, quote, t3, t4, t5, t6); - }, - serialize_closure0: function serialize_closure0() { - }, - _SerializeVisitor0: function _SerializeVisitor0(t0, t1, t2, t3, t4, t5, t6, t7) { - var _ = this; - _._serialize0$_buffer = t0; - _._serialize0$_indentation = 0; - _._serialize0$_style = t1; - _._serialize0$_inspect = t2; - _._serialize0$_quote = t3; - _._serialize0$_indentCharacter = t4; - _._serialize0$_indentWidth = t5; - _._lineFeed = t6; - _._serialize0$_logger = t7; - }, - _SerializeVisitor_visitCssComment_closure0: function _SerializeVisitor_visitCssComment_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssAtRule_closure0: function _SerializeVisitor_visitCssAtRule_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssMediaRule_closure0: function _SerializeVisitor_visitCssMediaRule_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssImport_closure0: function _SerializeVisitor_visitCssImport_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssImport__closure0: function _SerializeVisitor_visitCssImport__closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssKeyframeBlock_closure0: function _SerializeVisitor_visitCssKeyframeBlock_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssStyleRule_closure0: function _SerializeVisitor_visitCssStyleRule_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssSupportsRule_closure0: function _SerializeVisitor_visitCssSupportsRule_closure0(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssDeclaration_closure1: function _SerializeVisitor_visitCssDeclaration_closure1(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitCssDeclaration_closure2: function _SerializeVisitor_visitCssDeclaration_closure2(t0, t1) { - this.$this = t0; - this.node = t1; - }, - _SerializeVisitor_visitList_closure2: function _SerializeVisitor_visitList_closure2() { - }, - _SerializeVisitor_visitList_closure3: function _SerializeVisitor_visitList_closure3(t0, t1) { - this.$this = t0; - this.value = t1; - }, - _SerializeVisitor_visitList_closure4: function _SerializeVisitor_visitList_closure4(t0) { - this.$this = t0; - }, - _SerializeVisitor_visitMap_closure0: function _SerializeVisitor_visitMap_closure0(t0) { - this.$this = t0; - }, - _SerializeVisitor_visitSelectorList_closure0: function _SerializeVisitor_visitSelectorList_closure0() { - }, - _SerializeVisitor__write_closure0: function _SerializeVisitor__write_closure0(t0, t1) { - this.$this = t0; - this.value = t1; - }, - _SerializeVisitor__visitChildren_closure1: function _SerializeVisitor__visitChildren_closure1(t0, t1) { - this.$this = t0; - this.child = t1; - }, - _SerializeVisitor__visitChildren_closure2: function _SerializeVisitor__visitChildren_closure2(t0, t1) { - this.$this = t0; - this.child = t1; - }, - OutputStyle0: function OutputStyle0(t0) { - this._name = t0; - }, - LineFeed0: function LineFeed0(t0, t1, t2) { - this.name = t0; - this.text = t1; - this._name = t2; - }, - JSSet: function JSSet() { - }, - ShadowedModuleView_ifNecessary0(inner, functions, mixins, variables, $T) { - return A.ShadowedModuleView__needsBlocklist0(inner.get$variables(), variables) || A.ShadowedModuleView__needsBlocklist0(inner.get$functions(inner), functions) || A.ShadowedModuleView__needsBlocklist0(inner.get$mixins(), mixins) ? new A.ShadowedModuleView0(inner, A.ShadowedModuleView__shadowedMap0(inner.get$variables(), variables, type$.Value_2), A.ShadowedModuleView__shadowedMap0(inner.get$variableNodes(), variables, type$.AstNode_2), A.ShadowedModuleView__shadowedMap0(inner.get$functions(inner), functions, $T), A.ShadowedModuleView__shadowedMap0(inner.get$mixins(), mixins, $T), $T._eval$1("ShadowedModuleView0<0>")) : null; - }, - ShadowedModuleView__shadowedMap0(map, blocklist, $V) { - var t1 = A.ShadowedModuleView__needsBlocklist0(map, blocklist); - return !t1 ? map : A.LimitedMapView$blocklist0(map, blocklist, type$.String, $V); - }, - ShadowedModuleView__needsBlocklist0(map, blocklist) { - return map.get$isNotEmpty(map) && blocklist.any$1(0, map.get$containsKey()); - }, - ShadowedModuleView0: function ShadowedModuleView0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._shadowed_view0$_inner = t0; - _.variables = t1; - _.variableNodes = t2; - _.functions = t3; - _.mixins = t4; - _.$ti = t5; - }, - SilentComment0: function SilentComment0(t0, t1) { - this.text = t0; - this.span = t1; - }, - SimpleSelector0: function SimpleSelector0() { - }, - SimpleSelector_isSuperselector_closure0: function SimpleSelector_isSuperselector_closure0(t0) { - this.$this = t0; - }, - SimpleSelector_isSuperselector__closure0: function SimpleSelector_isSuperselector__closure0(t0) { - this.$this = t0; - }, - SingleUnitSassNumber0: function SingleUnitSassNumber0(t0, t1, t2) { - var _ = this; - _._single_unit$_unit = t0; - _._number1$_value = t1; - _.hashCache = null; - _.asSlash = t2; - }, - SingleUnitSassNumber__coerceToUnit_closure0: function SingleUnitSassNumber__coerceToUnit_closure0(t0, t1) { - this.$this = t0; - this.unit = t1; - }, - SingleUnitSassNumber__coerceValueToUnit_closure0: function SingleUnitSassNumber__coerceValueToUnit_closure0(t0) { - this.$this = t0; - }, - SingleUnitSassNumber_multiplyUnits_closure1: function SingleUnitSassNumber_multiplyUnits_closure1(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - SingleUnitSassNumber_multiplyUnits_closure2: function SingleUnitSassNumber_multiplyUnits_closure2(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - SourceInterpolationVisitor: function SourceInterpolationVisitor(t0) { - this.buffer = t0; - }, - SourceMapBuffer0: function SourceMapBuffer0(t0, t1) { - var _ = this; - _._source_map_buffer0$_buffer = t0; - _._source_map_buffer0$_entries = t1; - _._source_map_buffer0$_column = _._source_map_buffer0$_line = 0; - _._source_map_buffer0$_inSpan = false; - }, - SourceMapBuffer_buildSourceMap_closure0: function SourceMapBuffer_buildSourceMap_closure0(t0, t1) { - this._box_0 = t0; - this.prefixLength = t1; - }, - updateSourceSpanPrototype() { - var t3, t4, _i, t5, - span = A.SourceFile$fromString("", null).span$1(0, 0), - t1 = type$.SourceSpan, - t2 = type$.String; - for (t1 = [span, new A.MultiSpan0(span, "", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), t1, t2)), new A.LazyFileSpan0(new A.updateSourceSpanPrototype_closure(span))], t3 = type$.JSClass, t4 = type$.Function, _i = 0; _i < 3; ++_i) { - t5 = t3._as(t1[_i].constructor); - A.LinkedHashMap_LinkedHashMap$_literal(["start", new A.updateSourceSpanPrototype_closure0(), "end", new A.updateSourceSpanPrototype_closure1(), "url", new A.updateSourceSpanPrototype_closure2(), "text", new A.updateSourceSpanPrototype_closure3(), "context", new A.updateSourceSpanPrototype_closure4()], t2, t4).forEach$1(0, A.JSClassExtension_get_defineGetter(t5)); - } - t1 = t3._as(A.FileLocation$_(span.file, span._file$_start).constructor); - A.LinkedHashMap_LinkedHashMap$_literal(["line", new A.updateSourceSpanPrototype_closure5(), "column", new A.updateSourceSpanPrototype_closure6()], t2, t4).forEach$1(0, A.JSClassExtension_get_defineGetter(t1)); - }, - updateSourceSpanPrototype_closure: function updateSourceSpanPrototype_closure(t0) { - this.span = t0; - }, - updateSourceSpanPrototype_closure0: function updateSourceSpanPrototype_closure0() { - }, - updateSourceSpanPrototype_closure1: function updateSourceSpanPrototype_closure1() { - }, - updateSourceSpanPrototype_closure2: function updateSourceSpanPrototype_closure2() { - }, - updateSourceSpanPrototype__closure: function updateSourceSpanPrototype__closure() { - }, - updateSourceSpanPrototype_closure3: function updateSourceSpanPrototype_closure3() { - }, - updateSourceSpanPrototype_closure4: function updateSourceSpanPrototype_closure4() { - }, - updateSourceSpanPrototype_closure5: function updateSourceSpanPrototype_closure5() { - }, - updateSourceSpanPrototype_closure6: function updateSourceSpanPrototype_closure6() { - }, - ColorSpace_fromName0($name, argumentName) { - var t1, - _0_0 = $name.toLowerCase(); - $label0$0: { - if ("rgb" === _0_0) { - t1 = B.RgbColorSpace_mlz0; - break $label0$0; - } - if ("hwb" === _0_0) { - t1 = B.HwbColorSpace_06z0; - break $label0$0; - } - if ("hsl" === _0_0) { - t1 = B.HslColorSpace_gsm0; - break $label0$0; - } - if ("srgb" === _0_0) { - t1 = B.SrgbColorSpace_AD40; - break $label0$0; - } - if ("srgb-linear" === _0_0) { - t1 = B.SrgbLinearColorSpace_sEs0; - break $label0$0; - } - if ("display-p3" === _0_0) { - t1 = B.DisplayP3ColorSpace_NQk0; - break $label0$0; - } - if ("a98-rgb" === _0_0) { - t1 = B.A98RgbColorSpace_bdu0; - break $label0$0; - } - if ("prophoto-rgb" === _0_0) { - t1 = B.ProphotoRgbColorSpace_KiG0; - break $label0$0; - } - if ("rec2020" === _0_0) { - t1 = B.Rec2020ColorSpace_2jN0; - break $label0$0; - } - if ("xyz" === _0_0 || "xyz-d65" === _0_0) { - t1 = B.XyzD65ColorSpace_4CA0; - break $label0$0; - } - if ("xyz-d50" === _0_0) { - t1 = B.XyzD50ColorSpace_2No0; - break $label0$0; - } - if ("lab" === _0_0) { - t1 = B.LabColorSpace_IF20; - break $label0$0; - } - if ("lch" === _0_0) { - t1 = B.LchColorSpace_wv80; - break $label0$0; - } - if ("oklab" === _0_0) { - t1 = B.OklabColorSpace_yrt0; - break $label0$0; - } - if ("oklch" === _0_0) { - t1 = B.OklchColorSpace_li80; - break $label0$0; - } - t1 = A.throwExpression(A.SassScriptException$0('Unknown color space "' + $name + '".', argumentName)); - } - return t1; - }, - ColorSpace0: function ColorSpace0() { - }, - SrgbColorSpace0: function SrgbColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - SrgbLinearColorSpace0: function SrgbLinearColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - Statement0: function Statement0() { - }, - JSStatementVisitor: function JSStatementVisitor(t0) { - this._statement$_inner = t0; - }, - JSStatementVisitorObject: function JSStatementVisitorObject() { - }, - StatementSearchVisitor0: function StatementSearchVisitor0() { - }, - StatementSearchVisitor_visitIfRule_closure1: function StatementSearchVisitor_visitIfRule_closure1(t0) { - this.$this = t0; - }, - StatementSearchVisitor_visitIfRule__closure2: function StatementSearchVisitor_visitIfRule__closure2(t0) { - this.$this = t0; - }, - StatementSearchVisitor_visitIfRule_closure2: function StatementSearchVisitor_visitIfRule_closure2(t0) { - this.$this = t0; - }, - StatementSearchVisitor_visitIfRule__closure1: function StatementSearchVisitor_visitIfRule__closure1(t0) { - this.$this = t0; - }, - StatementSearchVisitor_visitChildren_closure0: function StatementSearchVisitor_visitChildren_closure0(t0) { - this.$this = t0; - }, - StaticImport0: function StaticImport0(t0, t1, t2) { - this.url = t0; - this.modifiers = t1; - this.span = t2; - }, - StderrLogger0: function StderrLogger0(t0) { - this.color = t0; - }, - StringExpression_quoteText0(text) { - var t1, - quote = A.StringExpression__bestQuote0(A._setArrayType([text], type$.JSArray_String)), - buffer = new A.StringBuffer(""); - buffer._contents = "" + A.Primitives_stringFromCharCode(quote); - A.StringExpression__quoteInnerText0(text, quote, buffer, true); - t1 = A.Primitives_stringFromCharCode(quote); - t1 = buffer._contents += t1; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - StringExpression__quoteInnerText0(text, quote, buffer, $static) { - var t1, t2, i, _1_0, _0_0, t3, t4, t5, t0; - for (t1 = text.length, t2 = t1 - 1, i = 0; i < t1; ++i) { - _1_0 = text.charCodeAt(i); - if (_1_0 === 10 || _1_0 === 13 || _1_0 === 12) { - buffer.writeCharCode$1(92); - buffer.writeCharCode$1(97); - if (i !== t2) { - _0_0 = text.charCodeAt(i + 1); - t3 = true; - if (!(_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12)) - if (!(_0_0 >= 48 && _0_0 <= 57)) - if (!(_0_0 >= 97 && _0_0 <= 102)) - t3 = _0_0 >= 65 && _0_0 <= 70; - if (t3) - buffer.writeCharCode$1(32); - } - continue; - } - t3 = 92 === _1_0; - if (t3) - t4 = _1_0; - else - t4 = null; - if (!t3) { - t3 = false; - t5 = _1_0 === quote; - if (t5) - t4 = _1_0; - if (!t5) - if (35 === _1_0) - if ($static) - if (i < t2) { - t3 = text.charCodeAt(i + 1) === 123; - if (t3) - t4 = _1_0; - t0 = t4; - t4 = t3; - t3 = t0; - } else { - t0 = t4; - t4 = t3; - t3 = t0; - } - else { - t0 = t4; - t4 = t3; - t3 = t0; - } - else { - t0 = t4; - t4 = t3; - t3 = t0; - } - else { - t3 = t4; - t4 = true; - } - } else { - t3 = t4; - t4 = true; - } - if (t4) { - buffer.writeCharCode$1(92); - buffer.writeCharCode$1(t3); - continue; - } - buffer.writeCharCode$1(_1_0); - } - }, - StringExpression__bestQuote0(strings) { - var t1, t2, t3, containsDoubleQuote, t4, t5; - for (t1 = J.get$iterator$ax(strings), t2 = type$.CodeUnits, t3 = t2._eval$1("ListIterator"), t2 = t2._eval$1("ListBase.E"), containsDoubleQuote = false; t1.moveNext$0();) - for (t4 = new A.CodeUnits(t1.get$current(t1)), t4 = new A.ListIterator(t4, t4.get$length(0), t3); t4.moveNext$0();) { - t5 = t4.__internal$_current; - if (t5 == null) - t5 = t2._as(t5); - if (t5 === 39) - return 34; - if (t5 === 34) - containsDoubleQuote = true; - } - return containsDoubleQuote ? 39 : 34; - }, - StringExpression0: function StringExpression0(t0, t1) { - this.text = t0; - this.hasQuotes = t1; - }, - _codepointForIndex0(index, lengthInCodepoints, allowNegative) { - var result; - if (index === 0) - return 0; - if (index > 0) - return Math.min(index - 1, lengthInCodepoints); - result = lengthInCodepoints + index; - if (result < 0 && !allowNegative) - return 0; - return result; - }, - _function7($name, $arguments, callback) { - return A.BuiltInCallable$function0($name, $arguments, callback, "sass:string"); - }, - module_closure25: function module_closure25() { - }, - module__closure3: function module__closure3(t0) { - this.string = t0; - }, - module__closure4: function module__closure4(t0) { - this.string = t0; - }, - _unquote_closure0: function _unquote_closure0() { - }, - _quote_closure0: function _quote_closure0() { - }, - _length_closure1: function _length_closure1() { - }, - _insert_closure0: function _insert_closure0() { - }, - _index_closure1: function _index_closure1() { - }, - _slice_closure0: function _slice_closure0() { - }, - _toUpperCase_closure0: function _toUpperCase_closure0() { - }, - _toLowerCase_closure0: function _toLowerCase_closure0() { - }, - _uniqueId_closure0: function _uniqueId_closure0() { - }, - StringExtension_toCssIdentifier(_this) { - var t1, doubleDash, _2_0, character, _3_0, - _s52_ = "The U+0000 can't be represented as a CSS identifier.", - _s65_ = "An individual surrogate can't be represented as a CSS identifier.", - buffer = new A.StringBuffer(""), - scanner = A.SpanScanner$(_this, null), - writeEscape = new A.StringExtension_toCssIdentifier_writeEscape(buffer, scanner), - consumeSurrogatePair = new A.StringExtension_toCssIdentifier_consumeSurrogatePair(scanner, writeEscape, buffer); - if (scanner.scanChar$1(45)) { - if (scanner._string_scanner$_position === scanner.string.length) - return "\\2d"; - t1 = A.Primitives_stringFromCharCode(45); - buffer._contents += t1; - doubleDash = scanner.scanChar$1(45); - if (doubleDash) { - t1 = A.Primitives_stringFromCharCode(45); - buffer._contents += t1; - } - } else - doubleDash = false; - if (!doubleDash) - $label0$0: { - _2_0 = scanner.peekChar$0(); - if (_2_0 == null) - scanner.error$1(0, "The empty string can't be represented as a CSS identifier."); - if (0 === _2_0) - scanner.error$1(0, _s52_); - if (A._isInt(_2_0)) { - t1 = _2_0 >>> 10 === 54; - character = _2_0; - } else { - character = null; - t1 = false; - } - if (t1) { - consumeSurrogatePair.call$1(character); - break $label0$0; - } - if (_2_0 >>> 10 === 55) - scanner.error$2$length(0, _s65_, 1); - if (_2_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_2_0) || _2_0 >= 128) - t1 = !(_2_0 >= 57344 && _2_0 <= 63743); - else - t1 = false; - if (t1) { - t1 = A.Primitives_stringFromCharCode(scanner.readChar$0()); - buffer._contents += t1; - break $label0$0; - } - writeEscape.call$1(scanner.readChar$0()); - } - for (; true;) { - _3_0 = scanner.peekChar$0(); - if (_3_0 == null) - break; - if (0 === _3_0) - scanner.error$1(0, _s52_); - t1 = _3_0 >>> 10 === 54; - if (t1) { - consumeSurrogatePair.call$1(_3_0); - continue; - } - if (_3_0 >>> 10 === 55) - scanner.error$2$length(0, _s65_, 1); - if (_3_0 !== 95) { - if (!(_3_0 >= 97 && _3_0 <= 122)) - t1 = _3_0 >= 65 && _3_0 <= 90; - else - t1 = true; - t1 = t1 || _3_0 >= 128; - } else - t1 = true; - if (!t1) - t1 = _3_0 >= 48 && _3_0 <= 57 || _3_0 === 45; - else - t1 = true; - if (t1) - t1 = !(_3_0 >= 57344 && _3_0 <= 63743); - else - t1 = false; - if (t1) { - t1 = A.Primitives_stringFromCharCode(scanner.readChar$0()); - buffer._contents += t1; - continue; - } - writeEscape.call$1(scanner.readChar$0()); - } - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - StringExtension_toCssIdentifier_writeEscape: function StringExtension_toCssIdentifier_writeEscape(t0, t1) { - this.buffer = t0; - this.scanner = t1; - }, - StringExtension_toCssIdentifier_consumeSurrogatePair: function StringExtension_toCssIdentifier_consumeSurrogatePair(t0, t1, t2) { - this.scanner = t0; - this.writeEscape = t1; - this.buffer = t2; - }, - stringClass_closure: function stringClass_closure() { - }, - stringClass__closure: function stringClass__closure() { - }, - stringClass__closure0: function stringClass__closure0() { - }, - stringClass__closure1: function stringClass__closure1() { - }, - stringClass__closure2: function stringClass__closure2() { - }, - stringClass__closure3: function stringClass__closure3() { - }, - _ConstructorOptions1: function _ConstructorOptions1() { - }, - _NodeSassString: function _NodeSassString() { - }, - legacyStringClass_closure: function legacyStringClass_closure() { - }, - legacyStringClass_closure0: function legacyStringClass_closure0() { - }, - legacyStringClass_closure1: function legacyStringClass_closure1() { - }, - SassString$0(_text, quotes) { - return new A.SassString0(_text, quotes); - }, - SassString0: function SassString0(t0, t1) { - var _ = this; - _._string0$_text = t0; - _._string0$_hasQuotes = t1; - _._string0$__SassString__sassLength_FI = $; - _._string0$_hashCache = null; - }, - ModifiableCssStyleRule$0(_selector, span, fromPlainCss, originalSelector) { - var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); - return new A.ModifiableCssStyleRule0(_selector, originalSelector, span, fromPlainCss, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); - }, - ModifiableCssStyleRule0: function ModifiableCssStyleRule0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._style_rule0$_selector = t0; - _.originalSelector = t1; - _.span = t2; - _.fromPlainCss = t3; - _.children = t4; - _._node$_children = t5; - _._node$_indexInParent = _._node$_parent = null; - _.isGroupEnd = false; - }, - StyleRule$0(selector, children, span) { - var t1 = A.List_List$unmodifiable(children, type$.Statement_2), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); - return new A.StyleRule0(selector, span, t1, t2); - }, - StyleRule0: function StyleRule0(t0, t1, t2, t3) { - var _ = this; - _.selector = t0; - _.span = t1; - _.children = t2; - _.hasDeclarations = t3; - }, - CssStylesheet0: function CssStylesheet0(t0, t1) { - this.children = t0; - this.span = t1; - }, - ModifiableCssStylesheet$0(span) { - var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); - return new A.ModifiableCssStylesheet0(span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); - }, - ModifiableCssStylesheet0: function ModifiableCssStylesheet0(t0, t1, t2) { - var _ = this; - _.span = t0; - _.children = t1; - _._node$_children = t2; - _._node$_indexInParent = _._node$_parent = null; - _.isGroupEnd = false; - }, - StylesheetParser0: function StylesheetParser0() { - }, - StylesheetParser_parse_closure0: function StylesheetParser_parse_closure0(t0) { - this.$this = t0; - }, - StylesheetParser_parse__closure0: function StylesheetParser_parse__closure0(t0) { - this.$this = t0; - }, - StylesheetParser_parseArgumentDeclaration_closure0: function StylesheetParser_parseArgumentDeclaration_closure0(t0) { - this.$this = t0; - }, - StylesheetParser__parseSingleProduction_closure0: function StylesheetParser__parseSingleProduction_closure0(t0, t1, t2) { - this.$this = t0; - this.production = t1; - this.T = t2; - }, - StylesheetParser_parseSignature_closure: function StylesheetParser_parseSignature_closure(t0, t1) { - this.$this = t0; - this.requireParens = t1; - }, - StylesheetParser__statement_closure0: function StylesheetParser__statement_closure0(t0) { - this.$this = t0; - }, - StylesheetParser_variableDeclarationWithoutNamespace_closure1: function StylesheetParser_variableDeclarationWithoutNamespace_closure1(t0, t1) { - this.$this = t0; - this.start = t1; - }, - StylesheetParser_variableDeclarationWithoutNamespace_closure2: function StylesheetParser_variableDeclarationWithoutNamespace_closure2(t0) { - this.declaration = t0; - }, - StylesheetParser__styleRule_closure0: function StylesheetParser__styleRule_closure0(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.wasInStyleRule = t2; - _.start = t3; - }, - StylesheetParser__tryDeclarationChildren_closure0: function StylesheetParser__tryDeclarationChildren_closure0(t0, t1) { - this.name = t0; - this.value = t1; - }, - StylesheetParser__atRootRule_closure1: function StylesheetParser__atRootRule_closure1(t0) { - this.query = t0; - }, - StylesheetParser__atRootRule_closure2: function StylesheetParser__atRootRule_closure2() { - }, - StylesheetParser__eachRule_closure0: function StylesheetParser__eachRule_closure0(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.wasInControlDirective = t1; - _.variables = t2; - _.list = t3; - }, - StylesheetParser__functionRule_closure0: function StylesheetParser__functionRule_closure0(t0, t1, t2) { - this.name = t0; - this.$arguments = t1; - this.precedingComment = t2; - }, - StylesheetParser__forRule_closure1: function StylesheetParser__forRule_closure1(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - StylesheetParser__forRule_closure2: function StylesheetParser__forRule_closure2(t0, t1, t2, t3, t4, t5) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.wasInControlDirective = t2; - _.variable = t3; - _.from = t4; - _.to = t5; - }, - StylesheetParser__memberList_closure0: function StylesheetParser__memberList_closure0(t0, t1, t2) { - this.$this = t0; - this.variables = t1; - this.identifiers = t2; - }, - StylesheetParser__includeRule_closure0: function StylesheetParser__includeRule_closure0(t0) { - this.contentArguments_ = t0; - }, - StylesheetParser_mediaRule_closure0: function StylesheetParser_mediaRule_closure0(t0) { - this.query = t0; - }, - StylesheetParser__mixinRule_closure0: function StylesheetParser__mixinRule_closure0(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.name = t1; - _.$arguments = t2; - _.precedingComment = t3; - }, - StylesheetParser_mozDocumentRule_closure0: function StylesheetParser_mozDocumentRule_closure0(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.name = t2; - _.value = t3; - }, - StylesheetParser_supportsRule_closure0: function StylesheetParser_supportsRule_closure0(t0) { - this.condition = t0; - }, - StylesheetParser__whileRule_closure0: function StylesheetParser__whileRule_closure0(t0, t1, t2) { - this.$this = t0; - this.wasInControlDirective = t1; - this.condition = t2; - }, - StylesheetParser_unknownAtRule_closure0: function StylesheetParser_unknownAtRule_closure0(t0, t1) { - this._box_0 = t0; - this.name = t1; - }, - StylesheetParser__expression_resetState0: function StylesheetParser__expression_resetState0(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.start = t2; - }, - StylesheetParser__expression_resolveOneOperation0: function StylesheetParser__expression_resolveOneOperation0(t0, t1) { - this._box_0 = t0; - this.$this = t1; - }, - StylesheetParser__expression_resolveOperations0: function StylesheetParser__expression_resolveOperations0(t0, t1) { - this._box_0 = t0; - this.resolveOneOperation = t1; - }, - StylesheetParser__expression_addSingleExpression0: function StylesheetParser__expression_addSingleExpression0(t0, t1, t2, t3) { - var _ = this; - _._box_0 = t0; - _.$this = t1; - _.resetState = t2; - _.resolveOperations = t3; - }, - StylesheetParser__expression_addOperator0: function StylesheetParser__expression_addOperator0(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.resolveOneOperation = t2; - }, - StylesheetParser__expression_resolveSpaceExpressions0: function StylesheetParser__expression_resolveSpaceExpressions0(t0, t1, t2) { - this._box_0 = t0; - this.$this = t1; - this.resolveOperations = t2; - }, - StylesheetParser_expressionUntilComma_closure0: function StylesheetParser_expressionUntilComma_closure0(t0) { - this.$this = t0; - }, - StylesheetParser__isHexColor_closure0: function StylesheetParser__isHexColor_closure0() { - }, - StylesheetParser__unicodeRange_closure1: function StylesheetParser__unicodeRange_closure1() { - }, - StylesheetParser__unicodeRange_closure2: function StylesheetParser__unicodeRange_closure2() { - }, - StylesheetParser_namespacedExpression_closure0: function StylesheetParser_namespacedExpression_closure0(t0, t1) { - this.$this = t0; - this.start = t1; - }, - StylesheetParser_trySpecialFunction_closure0: function StylesheetParser_trySpecialFunction_closure0() { - }, - StylesheetParser__expressionUntilComparison_closure0: function StylesheetParser__expressionUntilComparison_closure0(t0) { - this.$this = t0; - }, - StylesheetParser__publicIdentifier_closure0: function StylesheetParser__publicIdentifier_closure0(t0, t1) { - this.$this = t0; - this.start = t1; - }, - Stylesheet$internal0(children, span, parseTimeWarnings, globalVariables, plainCss) { - var t1 = A._setArrayType([], type$.JSArray_UseRule_2), - t2 = A._setArrayType([], type$.JSArray_ForwardRule_2), - t3 = A.ConstantMap_ConstantMap$from(globalVariables, type$.String, type$.FileSpan), - t4 = A.List_List$unmodifiable(children, type$.Statement_2), - t5 = B.JSArray_methods.any$1(t4, new A.ParentStatement_closure0()); - t1 = new A.Stylesheet0(span, plainCss, t1, t2, new A.UnmodifiableListView(parseTimeWarnings, type$.UnmodifiableListView_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2), t3, t4, t5); - t1.Stylesheet$internal$5$globalVariables$plainCss0(children, span, parseTimeWarnings, globalVariables, plainCss); - return t1; - }, - Stylesheet_Stylesheet$parse0(contents, syntax, url) { - var error, stackTrace, url0, t1, exception, t2; - try { - switch (syntax) { - case B.Syntax_Sass_sass0: - t1 = new A.SassParser0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.FileSpan), A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2), A.SpanScanner$(contents, url), null).parse$0(0); - return t1; - case B.Syntax_SCSS_scss0: - t1 = A.ScssParser$0(contents, url).parse$0(0); - return t1; - case B.Syntax_CSS_css0: - t1 = new A.CssParser0(A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.FileSpan), A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2), A.SpanScanner$(contents, url), null).parse$0(0); - return t1; - } - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = error; - t2 = J.getInterceptor$z(t1); - t1 = A.SourceSpanException.prototype.get$span.call(t2, t1); - url0 = t1.get$sourceUrl(t1); - if (url0 == null || J.toString$0$(url0) === "stdin") - throw exception; - t1 = type$.Uri; - throw A.wrapException(A.throwWithTrace0(error.withLoadedUrls$1(A.Set_Set$unmodifiable(A.LinkedHashSet_LinkedHashSet$_literal([url0], t1), t1)), error, stackTrace)); - } else - throw exception; - } - }, - Stylesheet0: function Stylesheet0(t0, t1, t2, t3, t4, t5, t6, t7) { - var _ = this; - _.span = t0; - _.plainCss = t1; - _._stylesheet1$_uses = t2; - _._stylesheet1$_forwards = t3; - _.parseTimeWarnings = t4; - _.globalVariables = t5; - _.children = t6; - _.hasDeclarations = t7; - }, - SupportsExpression0: function SupportsExpression0(t0) { - this.condition = t0; - }, - ModifiableCssSupportsRule$0(condition, span) { - var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); - return new A.ModifiableCssSupportsRule0(condition, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); - }, - ModifiableCssSupportsRule0: function ModifiableCssSupportsRule0(t0, t1, t2, t3) { - var _ = this; - _.condition = t0; - _.span = t1; - _.children = t2; - _._node$_children = t3; - _._node$_indexInParent = _._node$_parent = null; - _.isGroupEnd = false; - }, - SupportsRule$0(condition, children, span) { - var t1 = A.List_List$unmodifiable(children, type$.Statement_2), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); - return new A.SupportsRule0(condition, span, t1, t2); - }, - SupportsRule0: function SupportsRule0(t0, t1, t2, t3) { - var _ = this; - _.condition = t0; - _.span = t1; - _.children = t2; - _.hasDeclarations = t3; - }, - JSToDartImporter: function JSToDartImporter(t0, t1, t2) { - this._sync$_canonicalize = t0; - this._sync$_load = t1; - this._sync$_nonCanonicalSchemes = t2; - }, - JSToDartImporter_canonicalize_closure: function JSToDartImporter_canonicalize_closure(t0, t1) { - this.$this = t0; - this.url = t1; - }, - JSToDartImporter_load_closure: function JSToDartImporter_load_closure(t0, t1) { - this.$this = t0; - this.url = t1; - }, - Syntax_forPath0(path) { - var t1, - _0_0 = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; - $label0$0: { - if (".sass" === _0_0) { - t1 = B.Syntax_Sass_sass0; - break $label0$0; - } - if (".css" === _0_0) { - t1 = B.Syntax_CSS_css0; - break $label0$0; - } - t1 = B.Syntax_SCSS_scss0; - break $label0$0; - } - return t1; - }, - Syntax0: function Syntax0(t0, t1) { - this._syntax0$_name = t0; - this._name = t1; - }, - TypeSelector0: function TypeSelector0(t0, t1) { - this.name = t0; - this.span = t1; - }, - Types: function Types() { - }, - UnaryOperationExpression0: function UnaryOperationExpression0(t0, t1, t2) { - this.operator = t0; - this.operand = t1; - this.span = t2; - }, - UnaryOperator0: function UnaryOperator0(t0, t1, t2) { - this.name = t0; - this.operator = t1; - this._name = t2; - }, - UnitlessSassNumber0: function UnitlessSassNumber0(t0, t1) { - this._number1$_value = t0; - this.hashCache = null; - this.asSlash = t1; - }, - UniversalSelector0: function UniversalSelector0(t0, t1) { - this.namespace = t0; - this.span = t1; - }, - UnprefixedMapView0: function UnprefixedMapView0(t0, t1, t2) { - this._unprefixed_map_view0$_map = t0; - this._unprefixed_map_view0$_prefix = t1; - this.$ti = t2; - }, - _UnprefixedKeys0: function _UnprefixedKeys0(t0) { - this._unprefixed_map_view0$_view = t0; - }, - _UnprefixedKeys_iterator_closure1: function _UnprefixedKeys_iterator_closure1(t0) { - this.$this = t0; - }, - _UnprefixedKeys_iterator_closure2: function _UnprefixedKeys_iterator_closure2(t0) { - this.$this = t0; - }, - JSUrl0: function JSUrl0() { - }, - UseRule0: function UseRule0(t0, t1, t2, t3) { - var _ = this; - _.url = t0; - _.namespace = t1; - _.configuration = t2; - _.span = t3; - }, - UserDefinedCallable0: function UserDefinedCallable0(t0, t1, t2, t3) { - var _ = this; - _.declaration = t0; - _.environment = t1; - _.inDependency = t2; - _.$ti = t3; - }, - fromImport0() { - var t1 = type$.nullable_CanonicalizeContext_2._as($.Zone__current.$index(0, B.Symbol__canonicalizeContext)); - t1 = t1 == null ? null : t1._canonicalize_context$_fromImport; - return t1 === true; - }, - canonicalizeContext0() { - var t1, - _0_0 = $.Zone__current.$index(0, B.Symbol__canonicalizeContext); - $label0$0: { - if (_0_0 == null) - A.throwExpression(A.StateError$(string$.canoni)); - if (_0_0 instanceof A.CanonicalizeContext0) { - t1 = _0_0; - break $label0$0; - } - t1 = A.throwExpression(A.StateError$(string$.Unexpe + A.S(_0_0) + ".")); - } - return t1; - }, - inImportRule(callback, $T) { - var t1, - _0_0 = $.Zone__current.$index(0, B.Symbol__canonicalizeContext); - $label0$0: { - if (_0_0 == null) { - t1 = type$.nullable_Object; - t1 = A.runZoned(callback, A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, new A.CanonicalizeContext0(true, null)], t1, t1), $T); - break $label0$0; - } - if (_0_0 instanceof A.CanonicalizeContext0) { - t1 = _0_0.withFromImport$2(true, callback); - break $label0$0; - } - t1 = A.throwExpression(A.StateError$(string$.Unexpe + A.S(_0_0) + ".")); - } - return t1; - }, - resolveImportPath0(path) { - var t1, - extension = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; - if (extension === ".sass" || extension === ".scss" || extension === ".css") { - t1 = A.fromImport0() ? new A.resolveImportPath_closure1(path, extension).call$0() : null; - return t1 == null ? A._exactlyOne0(A._tryPath0(path)) : t1; - } - t1 = A.fromImport0() ? new A.resolveImportPath_closure2(path).call$0() : null; - if (t1 == null) - t1 = A._exactlyOne0(A._tryPathWithExtensions0(path)); - return t1 == null ? A._tryPathAsDirectory0(path) : t1; - }, - _tryPathWithExtensions0(path) { - var result = A._tryPath0(path + ".sass"); - B.JSArray_methods.addAll$1(result, A._tryPath0(path + ".scss")); - return result.length !== 0 ? result : A._tryPath0(path + ".css"); - }, - _tryPath0(path) { - var t1 = $.$get$context(), - partial = A.join(t1.dirname$1(path), "_" + A.ParsedPath_ParsedPath$parse(path, t1.style).get$basename(), null); - t1 = A._setArrayType([], type$.JSArray_String); - if (A.fileExists0(partial)) - t1.push(partial); - if (A.fileExists0(path)) - t1.push(path); - return t1; - }, - _tryPathAsDirectory0(path) { - var t1; - if (!A.dirExists0(path)) - return null; - t1 = A.fromImport0() ? new A._tryPathAsDirectory_closure0(path).call$0() : null; - return t1 == null ? A._exactlyOne0(A._tryPathWithExtensions0(A.join(path, "index", null))) : t1; - }, - _exactlyOne0(paths) { - var _0_1, t1, path; - $label0$0: { - _0_1 = paths.length; - if (_0_1 <= 0) { - t1 = null; - break $label0$0; - } - if (_0_1 === 1) { - path = paths[0]; - t1 = path; - break $label0$0; - } - t1 = A.throwExpression(string$.It_s_n + B.JSArray_methods.map$1$1(paths, new A._exactlyOne_closure0(), type$.String).join$1(0, "\n")); - } - return t1; - }, - resolveImportPath_closure1: function resolveImportPath_closure1(t0, t1) { - this.path = t0; - this.extension = t1; - }, - resolveImportPath_closure2: function resolveImportPath_closure2(t0) { - this.path = t0; - }, - _tryPathAsDirectory_closure0: function _tryPathAsDirectory_closure0(t0) { - this.path = t0; - }, - _exactlyOne_closure0: function _exactlyOne_closure0() { - }, - jsThrow(error) { - return type$.Never._as($.$get$_jsThrow().call$1(error)); - }, - attachJsStack(error, trace) { - var traceString = trace.toString$0(0), - firstRealLine = B.JSString_methods.indexOf$1(traceString, "\n at"); - if (firstRealLine !== -1) - traceString = B.JSString_methods.substring$1(traceString, firstRealLine + 1); - error.stack = "Error: " + A.S(J.get$message$x(error)) + "\n" + traceString; - }, - jsForEach(object, callback) { - var t1, t2; - for (t1 = J.get$iterator$ax(self.Object.keys(object)); t1.moveNext$0();) { - t2 = t1.get$current(t1); - callback.call$2(t2, object[t2]); - } - }, - jsType(value) { - var typeOf = A._asString(new self.Function("value", "return typeof value").call$1(value)); - return typeOf !== "object" ? typeOf : A._asString(new self.Function("value", ' if (value && value.constructor && value.constructor.name) {\n return value.constructor.name;\n }\n return "object";\n ').call$1(value)); - }, - defineGetter(object, $name, get, value) { - self.Object.defineProperty(object, $name, get == null ? {value: value, enumerable: false} : {get: A.allowInteropCaptureThis(get), enumerable: false}); - }, - allowInteropNamed($name, $function) { - $function = A.allowInterop($function); - A.defineGetter($function, "name", null, $name); - A._hideDartProperties($function); - return $function; - }, - allowInteropCaptureThisNamed($name, $function) { - $function = A.allowInteropCaptureThis($function); - A.defineGetter($function, "name", null, $name); - A._hideDartProperties($function); - return $function; - }, - _hideDartProperties(object) { - var t1, t2, t3, t4; - for (t1 = J.cast$1$0$ax(self.Object.getOwnPropertyNames(object), type$.String), t2 = A._instanceType(t1), t1 = new A.ListIterator(t1, t1.get$length(t1), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t3 = t1.__internal$_current; - if (t3 == null) - t3 = t2._as(t3); - if (B.JSString_methods.startsWith$1(t3, "_")) { - t4 = {value: object[t3], enumerable: false}; - self.Object.defineProperty(object, t3, t4); - } - } - }, - futureToPromise0(future) { - return new self.Promise(A.allowInterop(new A.futureToPromise_closure0(future))); - }, - jsToDartUrl(url) { - return A.Uri_parse(J.toString$0$(url)); - }, - dartToJSUrl(url) { - return new self.URL(url.toString$0(0)); - }, - toJSArray(iterable) { - var t1, t2, - array = new self.Array(); - for (t1 = J.get$iterator$ax(iterable), t2 = J.getInterceptor$x(array); t1.moveNext$0();) - t2.push$1(array, t1.get$current(t1)); - return array; - }, - objectToMap(object) { - var map = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.nullable_Object); - A.jsForEach(object, new A.objectToMap_closure(map)); - return map; - }, - jsToDartSeparator(separator) { - var t1; - $label0$0: { - if (" " === separator) { - t1 = B.ListSeparator_nbm0; - break $label0$0; - } - if ("," === separator) { - t1 = B.ListSeparator_ECn0; - break $label0$0; - } - if ("/" === separator) { - t1 = B.ListSeparator_cQA0; - break $label0$0; - } - if (separator == null) { - t1 = B.ListSeparator_undecided_null_undecided0; - break $label0$0; - } - t1 = A.jsThrow(new self.Error('Unknown separator "' + separator + '".')); - } - return t1; - }, - parseSyntax(syntax) { - var t1; - $label0$0: { - if (syntax == null || "scss" === syntax) { - t1 = B.Syntax_SCSS_scss0; - break $label0$0; - } - if ("indented" === syntax) { - t1 = B.Syntax_Sass_sass0; - break $label0$0; - } - if ("css" === syntax) { - t1 = B.Syntax_CSS_css0; - break $label0$0; - } - t1 = A.jsThrow(new self.Error('Unknown syntax "' + A.S(syntax) + '".')); - } - return t1; - }, - entrypointFilename() { - var _1_0, _1_5_isSet, _1_5, t2, path, - t1 = self.require.main, - _0_0 = t1 == null ? null : J.get$filename$x(t1); - if (_0_0 != null) - return _0_0; - else { - _1_0 = J.get$argv$x(self.process); - t1 = J.getInterceptor$asx(_1_0); - _1_5_isSet = t1.get$length(_1_0) >= 2; - if (_1_5_isSet) { - _1_5 = t1.$index(_1_0, 1); - t2 = typeof _1_5 == "string"; - } else { - _1_5 = null; - t2 = false; - } - if (t2) { - path = A._asString(_1_5_isSet ? _1_5 : t1.$index(_1_0, 1)); - return J.resolve$1$x(J.createRequire$1$x(self.nodeModule, path), path); - } else - return null; - } - }, - _PropertyDescriptor0: function _PropertyDescriptor0() { - }, - futureToPromise_closure0: function futureToPromise_closure0(t0) { - this.future = t0; - }, - futureToPromise__closure0: function futureToPromise__closure0(t0) { - this.resolve = t0; - }, - futureToPromise__closure1: function futureToPromise__closure1(t0) { - this.reject = t0; - }, - objectToMap_closure: function objectToMap_closure(t0) { - this.map = t0; - }, - _RequireMain0: function _RequireMain0() { - }, - toSentence0(iter, conjunction) { - if (iter.get$length(iter) === 1) - return J.toString$0$(iter.get$first(iter)); - return A.IterableExtension_get_exceptLast0(iter).join$1(0, ", ") + (" " + conjunction + " " + A.S(iter.get$last(iter))); - }, - indent0(string, indentation) { - return new A.MappedListIterable(A._setArrayType(string.split("\n"), type$.JSArray_String), new A.indent_closure0(indentation), type$.MappedListIterable_String_String).join$1(0, "\n"); - }, - pluralize0($name, number, plural) { - if (number === 1) - return $name; - if (plural != null) - return plural; - return $name + "s"; - }, - trimAscii0(string, excludeEscape) { - var t1, - start = A._firstNonWhitespace0(string); - if (start == null) - t1 = ""; - else { - t1 = A._lastNonWhitespace0(string, true); - t1.toString; - t1 = B.JSString_methods.substring$2(string, start, t1 + 1); - } - return t1; - }, - trimAsciiRight0(string, excludeEscape) { - var end = A._lastNonWhitespace0(string, excludeEscape); - return end == null ? "" : B.JSString_methods.substring$2(string, 0, end + 1); - }, - _firstNonWhitespace0(string) { - var t1, i, t2; - for (t1 = string.length, i = 0; i < t1; ++i) { - t2 = string.charCodeAt(i); - if (!(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12)) - return i; - } - return null; - }, - _lastNonWhitespace0(string, excludeEscape) { - var i, i0, codeUnit; - for (i = string.length - 1, i0 = i; i0 >= 0; --i0) { - codeUnit = string.charCodeAt(i0); - if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) - if (excludeEscape && i0 !== 0 && i0 !== i && codeUnit === 92) - return i0 + 1; - else - return i0; - } - return null; - }, - isPublic0(member) { - var start = member.charCodeAt(0); - return start !== 45 && start !== 95; - }, - flattenVertically0(iterable, $T) { - var result, - t1 = iterable.$ti._eval$1("@")._bind$1($T._eval$1("QueueList<0>"))._eval$1("MappedListIterable<1,2>"), - queues = A.List_List$of(new A.MappedListIterable(iterable, new A.flattenVertically_closure1($T), t1), true, t1._eval$1("ListIterable.E")); - if (queues.length === 1) - return B.JSArray_methods.get$first(queues); - result = A._setArrayType([], $T._eval$1("JSArray<0>")); - for (; queues.length !== 0;) { - if (!!queues.fixed$length) - A.throwExpression(A.UnsupportedError$("removeWhere")); - B.JSArray_methods._removeWhere$2(queues, new A.flattenVertically_closure2(result, $T), true); - } - return result; - }, - codepointIndexToCodeUnitIndex0(string, codepointIndex) { - var codeUnitIndex, i, codeUnitIndex0; - for (codeUnitIndex = 0, i = 0; i < codepointIndex; ++i) { - codeUnitIndex0 = codeUnitIndex + 1; - codeUnitIndex = string.charCodeAt(codeUnitIndex) >>> 10 === 54 ? codeUnitIndex0 + 1 : codeUnitIndex0; - } - return codeUnitIndex; - }, - codeUnitIndexToCodepointIndex0(string, codeUnitIndex) { - var codepointIndex, i; - for (codepointIndex = 0, i = 0; i < codeUnitIndex; i = (string.charCodeAt(i) >>> 10 === 54 ? i + 1 : i) + 1) - ++codepointIndex; - return codepointIndex; - }, - frameForSpan0(span, member, url) { - var t2, t3, - t1 = url == null ? span.get$sourceUrl(span) : url; - if (t1 == null) - t1 = $.$get$_noSourceUrl0(); - t2 = span.get$start(span); - t2 = t2.file.getLine$1(t2.offset); - t3 = span.get$start(span); - return new A.Frame(t1, t2 + 1, t3.file.getColumn$1(t3.offset) + 1, member); - }, - declarationName0(span) { - var text = span.get$text(); - return A.trimAsciiRight0(B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")), false); - }, - unvendor0($name) { - var i, - t1 = $name.length; - if (t1 < 2) - return $name; - if ($name.charCodeAt(0) !== 45) - return $name; - if ($name.charCodeAt(1) === 45) - return $name; - for (i = 2; i < t1; ++i) - if ($name.charCodeAt(i) === 45) - return B.JSString_methods.substring$1($name, i + 1); - return $name; - }, - equalsIgnoreCase0(string1, string2) { - var t1, i; - if (string1 === string2) - return true; - if (string1 == null) - return false; - t1 = string1.length; - if (t1 !== string2.length) - return false; - for (i = 0; i < t1; ++i) - if (!A.characterEqualsIgnoreCase0(string1.charCodeAt(i), string2.charCodeAt(i))) - return false; - return true; - }, - startsWithIgnoreCase0(string, prefix) { - var i, - t1 = prefix.length; - if (string.length < t1) - return false; - for (i = 0; i < t1; ++i) - if (!A.characterEqualsIgnoreCase0(string.charCodeAt(i), prefix.charCodeAt(i))) - return false; - return true; - }, - mapInPlace0(list, $function) { - var i; - for (i = 0; i < list.length; ++i) - list[i] = $function.call$1(list[i]); - }, - longestCommonSubsequence0(list1, list2, select, $T) { - var t1, _i, selections, i, i0, j, selection, j0, - _length = list1.get$length(0) + 1, - lengths = J.JSArray_JSArray$allocateFixed(_length, type$.List_int); - for (t1 = type$.int, _i = 0; _i < _length; ++_i) - lengths[_i] = A.List_List$filled(((list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0) + 1, 0, false, t1); - _length = list1.get$length(0); - selections = J.JSArray_JSArray$allocateFixed(_length, $T._eval$1("List<0?>")); - for (t1 = $T._eval$1("0?"), _i = 0; _i < _length; ++_i) - selections[_i] = A.List_List$filled((list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0, null, false, t1); - for (i = 0; i < (list1._queue_list$_tail - list1._queue_list$_head & J.get$length$asx(list1._queue_list$_table) - 1) >>> 0; i = i0) - for (i0 = i + 1, j = 0; j < (list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0; j = j0) { - selection = select.call$2(list1.$index(0, i), list2.$index(0, j)); - selections[i][j] = selection; - t1 = lengths[i0]; - j0 = j + 1; - t1[j0] = selection == null ? Math.max(t1[j], lengths[i][j0]) : lengths[i][j] + 1; - } - return new A.longestCommonSubsequence_backtrack0(selections, lengths, $T).call$2(list1.get$length(0) - 1, list2.get$length(0) - 1); - }, - removeFirstWhere0(list, test, orElse) { - var i; - for (i = 0; i < list.length; ++i) { - if (!test.call$1(list[i])) - continue; - B.JSArray_methods.removeAt$1(list, i); - return; - } - orElse.call$0(); - }, - mapAddAll20(destination, source, K1, K2, $V) { - source.forEach$1(0, new A.mapAddAll2_closure0(destination, K1, K2, $V)); - }, - setAll0(map, keys, value) { - var t1; - for (t1 = J.get$iterator$ax(keys); t1.moveNext$0();) - map.$indexSet(0, t1.get$current(t1), value); - }, - rotateSlice0(list, start, end) { - var i, next, - element = list.$index(0, end - 1); - for (i = start; i < end; ++i, element = next) { - next = list.$index(0, i); - list.$indexSet(0, i, element); - } - }, - mapAsync0(iterable, callback, $E, $F) { - return A.mapAsync$body0(iterable, callback, $E, $F, $F._eval$1("Iterable<0>")); - }, - mapAsync$body0(iterable, callback, $E, $F, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, t2, _i, t1, $async$temp1; - var $async$mapAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = A._setArrayType([], $F._eval$1("JSArray<0>")); - t2 = iterable.length, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - $async$temp1 = t1; - $async$goto = 6; - return A._asyncAwait(callback.call$1(iterable[_i]), $async$mapAsync0); - case 6: - // returning from await. - $async$temp1.push($async$result); - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$mapAsync0, $async$completer); - }, - putIfAbsentAsync0(map, key, ifAbsent, $K, $V) { - return A.putIfAbsentAsync$body0(map, key, ifAbsent, $K, $V, $V); - }, - putIfAbsentAsync$body0(map, key, ifAbsent, $K, $V, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, t1, value; - var $async$putIfAbsentAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if (map.containsKey$1(key)) { - t1 = map.$index(0, key); - $async$returnValue = t1 == null ? $V._as(t1) : t1; - // goto return - $async$goto = 1; - break; - } - $async$goto = 3; - return A._asyncAwait(ifAbsent.call$0(), $async$putIfAbsentAsync0); - case 3: - // returning from await. - value = $async$result; - map.$indexSet(0, key, value); - $async$returnValue = value; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$putIfAbsentAsync0, $async$completer); - }, - copyMapOfMap0(map, K1, K2, $V) { - var t3, key, child, - t1 = K2._eval$1("@<0>")._bind$1($V)._eval$1("Map<1,2>"), - t2 = A.LinkedHashMap_LinkedHashMap$_empty(K1, t1); - for (t1 = A.MapExtensions_get_pairs0(map, K1, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t3 = t1.get$current(t1); - key = t3._0; - child = t3._1; - t3 = A.LinkedHashMap_LinkedHashMap(null, null, null, K2, $V); - t3.addAll$1(0, child); - t2.$indexSet(0, key, t3); - } - return t2; - }, - copyMapOfList0(map, $K, $E) { - var t3, - t1 = $E._eval$1("List<0>"), - t2 = A.LinkedHashMap_LinkedHashMap$_empty($K, t1); - for (t1 = A.MapExtensions_get_pairs0(map, $K, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t3 = t1.get$current(t1); - t2.$indexSet(0, t3._0, J.toList$0$ax(t3._1)); - } - return t2; - }, - consumeEscapedCharacter0(scanner) { - var _1_0, value, i, next, t1; - scanner.expectChar$1(92); - _1_0 = scanner.peekChar$0(); - if (_1_0 == null) - return 65533; - if (_1_0 === 10 || _1_0 === 13 || _1_0 === 12) - scanner.error$1(0, "Expected escape sequence."); - if (A.CharacterExtension_get_isHex0(_1_0)) { - for (value = 0, i = 0; i < 6; ++i) { - next = scanner.peekChar$0(); - if (next != null) { - t1 = true; - if (!(next >= 48 && next <= 57)) - if (!(next >= 97 && next <= 102)) - t1 = next >= 65 && next <= 70; - t1 = !t1; - } else - t1 = true; - if (t1) - break; - value = (value << 4 >>> 0) + A.asHex0(scanner.readChar$0()); - } - t1 = scanner.peekChar$0(); - if (t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12) - scanner.readChar$0(); - $label0$1: { - if (0 !== value) - t1 = value >= 55296 && value <= 57343 || value >= 1114111; - else - t1 = true; - if (t1) { - t1 = 65533; - break $label0$1; - } - t1 = value; - break $label0$1; - } - return t1; - } - return scanner.readChar$0(); - }, - throwWithTrace0(error, originalError, trace) { - var t1 = A.getTrace0(originalError); - A.attachTrace0(error, t1 == null ? trace : t1); - throw A.wrapException(error); - }, - attachTrace0(error, trace) { - var t1; - if (typeof error == "string" || typeof error == "number" || A._isBool(error)) - return; - if (trace.toString$0(0).length === 0) - return; - t1 = $.$get$_traces0(); - A.Expando__checkType(error); - if (t1._jsWeakMap.get(error) == null) - t1.$indexSet(0, error, trace); - }, - getTrace0(error) { - var t1; - if (typeof error == "string" || typeof error == "number" || A._isBool(error)) - t1 = null; - else { - t1 = $.$get$_traces0(); - A.Expando__checkType(error); - t1 = t1._jsWeakMap.get(error); - } - return t1; - }, - parseSignature(signature, requireParens) { - var error, stackTrace, t1, exception, t2; - try { - t1 = A.ScssParser$0(signature, null).parseSignature$1$requireParens(requireParens); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SassFormatException_2._is(t1)) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = error._span_exception$_message; - t2 = J.get$span$z(error); - A.throwWithTrace0(new A.SassFormatException0(B.Set_empty, 'Invalid signature "' + signature + '": ' + t1, t2), error, stackTrace); - } else - throw exception; - } - }, - indent_closure0: function indent_closure0(t0) { - this.indentation = t0; - }, - flattenVertically_closure1: function flattenVertically_closure1(t0) { - this.T = t0; - }, - flattenVertically_closure2: function flattenVertically_closure2(t0, t1) { - this.result = t0; - this.T = t1; - }, - longestCommonSubsequence_backtrack0: function longestCommonSubsequence_backtrack0(t0, t1, t2) { - this.selections = t0; - this.lengths = t1; - this.T = t2; - }, - mapAddAll2_closure0: function mapAddAll2_closure0(t0, t1, t2, t3) { - var _ = this; - _.destination = t0; - _.K1 = t1; - _.K2 = t2; - _.V = t3; - }, - CssValue0: function CssValue0(t0, t1, t2) { - this.value = t0; - this.span = t1; - this.$ti = t2; - }, - ValueExpression0: function ValueExpression0(t0, t1) { - this.value = t0; - this.span = t1; - }, - valueClass_closure: function valueClass_closure() { - }, - valueClass__closure: function valueClass__closure() { - }, - valueClass__closure0: function valueClass__closure0() { - }, - valueClass__closure1: function valueClass__closure1() { - }, - valueClass__closure2: function valueClass__closure2() { - }, - valueClass__closure3: function valueClass__closure3() { - }, - valueClass__closure4: function valueClass__closure4() { - }, - valueClass__closure5: function valueClass__closure5() { - }, - valueClass__closure6: function valueClass__closure6() { - }, - valueClass__closure7: function valueClass__closure7() { - }, - valueClass__closure8: function valueClass__closure8() { - }, - valueClass__closure9: function valueClass__closure9() { - }, - valueClass__closure10: function valueClass__closure10() { - }, - valueClass__closure11: function valueClass__closure11() { - }, - valueClass__closure12: function valueClass__closure12() { - }, - valueClass__closure13: function valueClass__closure13() { - }, - valueClass__closure14: function valueClass__closure14() { - }, - valueClass__closure15: function valueClass__closure15() { - }, - valueClass__closure16: function valueClass__closure16() { - }, - valueClass__closure17: function valueClass__closure17() { - }, - valueClass__closure18: function valueClass__closure18() { - }, - SassApiValue_assertSelector0(_this, allowParent, $name) { - var error, stackTrace, t1, exception, - string = _this._value$_selectorString$1($name); - try { - t1 = A.SelectorList_SelectorList$parse0(string, allowParent, null, false); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SassFormatException_2._is(t1)) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); - A.throwWithTrace0(new A.SassScriptException0($name == null ? t1 : "$" + $name + ": " + t1), error, stackTrace); - } else - throw exception; - } - }, - SassApiValue_assertCompoundSelector0(_this, $name) { - var error, stackTrace, t1, exception, - allowParent = false, - string = _this._value$_selectorString$1($name); - try { - t1 = new A.SelectorParser0(allowParent, false, A.SpanScanner$(string, null), null).parseCompoundSelector$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SassFormatException_2._is(t1)) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); - A.throwWithTrace0(new A.SassScriptException0("$" + $name + ": " + t1), error, stackTrace); - } else - throw exception; - } - }, - Value0: function Value0() { - }, - VariableExpression0: function VariableExpression0(t0, t1, t2) { - this.namespace = t0; - this.name = t1; - this.span = t2; - }, - VariableDeclaration$0($name, expression, span, comment, global, guarded, namespace) { - if (namespace != null && global) - A.throwExpression(A.ArgumentError$(string$.Other_, null)); - return new A.VariableDeclaration0(namespace, $name, expression, guarded, global, span); - }, - VariableDeclaration0: function VariableDeclaration0(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.namespace = t0; - _.name = t1; - _.expression = t2; - _.isGuarded = t3; - _.isGlobal = t4; - _.span = t5; - }, - WarnRule0: function WarnRule0(t0, t1) { - this.expression = t0; - this.span = t1; - }, - WhileRule$0(condition, children, span) { - var t1 = A.List_List$unmodifiable(children, type$.Statement_2), - t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); - return new A.WhileRule0(condition, span, t1, t2); - }, - WhileRule0: function WhileRule0(t0, t1, t2, t3) { - var _ = this; - _.condition = t0; - _.span = t1; - _.children = t2; - _.hasDeclarations = t3; - }, - XyzD50ColorSpace0: function XyzD50ColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - XyzD65ColorSpace0: function XyzD65ColorSpace0(t0, t1) { - this.name = t0; - this._space$_channels = t1; - }, - AsyncCallable_AsyncCallable$fromSignature(signature, callback, requireParens) { - var _0_0 = A.parseSignature(signature, requireParens); - return new A.AsyncBuiltInCallable0(_0_0._0, _0_0._1, callback, false); - }, - Callable_Callable$fromSignature(signature, callback, requireParens) { - var _0_0 = A.parseSignature(signature, requireParens); - return new A.BuiltInCallable0(_0_0._0, A._setArrayType([new A._Record_2(_0_0._1, callback)], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value_2), false); - }, - printString(string) { - if (typeof dartPrint == "function") { - dartPrint(string); - return; - } - if (typeof console == "object" && typeof console.log != "undefined") { - console.log(string); - return; - } - if (typeof print == "function") { - print(string); - return; - } - throw "Unable to print message: " + String(string); - }, - mergeMaps(map1, map2, $K, $V) { - var result = A.LinkedHashMap_LinkedHashMap$of(map1, $K, $V); - result.addAll$1(0, map2); - return result; - }, - groupBy(values, key, $S, $T) { - var t1, t2, _i, element, t3, t4, - map = A.LinkedHashMap_LinkedHashMap$_empty($T, $S._eval$1("List<0>")); - for (t1 = values.length, t2 = $S._eval$1("JSArray<0>"), _i = 0; _i < values.length; values.length === t1 || (0, A.throwConcurrentModificationError)(values), ++_i) { - element = values[_i]; - t3 = key.call$1(element); - t4 = map.$index(0, t3); - if (t4 == null) { - t4 = A._setArrayType([], t2); - map.$indexSet(0, t3, t4); - t3 = t4; - } else - t3 = t4; - J.add$1$ax(t3, element); - } - return map; - }, - minBy(values, orderBy) { - var t1, t2, minValue, minOrderBy, element, elementOrderBy; - for (t1 = values.$ti, t2 = new A.MappedIterator(J.get$iterator$ax(values.__internal$_iterable), values._f, t1._eval$1("MappedIterator<1,2>")), t1 = t1._rest[1], minValue = null, minOrderBy = null; t2.moveNext$0();) { - element = t2.__internal$_current; - if (element == null) - element = t1._as(element); - elementOrderBy = orderBy.call$1(element); - if (minOrderBy == null || A.defaultCompare(elementOrderBy, minOrderBy) < 0) { - minOrderBy = elementOrderBy; - minValue = element; - } - } - return minValue; - }, - IterableExtension_firstWhereOrNull(_this, test) { - var t1, element; - for (t1 = J.get$iterator$ax(_this); t1.moveNext$0();) { - element = t1.get$current(t1); - if (test.call$1(element)) - return element; - } - return null; - }, - IterableExtension_get_firstOrNull(_this) { - var iterator = J.get$iterator$ax(_this); - if (iterator.moveNext$0()) - return iterator.get$current(iterator); - return null; - }, - IterableExtension_get_lastOrNull(_this) { - if (_this.get$length(0) === 0) - return null; - return _this.get$last(_this); - }, - IterableExtension_get_singleOrNull(_this) { - var result, - iterator = J.get$iterator$ax(_this); - if (iterator.moveNext$0()) { - result = iterator.get$current(iterator); - if (!iterator.moveNext$0()) - return result; - } - return null; - }, - IterableIntegerExtension_get_maxOrNull(_this) { - var value, newValue, - iterator = _this.get$iterator(_this); - if (iterator.moveNext$0()) { - value = iterator.get$current(iterator); - for (; iterator.moveNext$0();) { - newValue = iterator.get$current(iterator); - if (newValue > value) - value = newValue; - } - return value; - } - return null; - }, - IterableIntegerExtension_get_max(_this) { - var t1 = A.IterableIntegerExtension_get_maxOrNull(_this); - return t1 == null ? A.throwExpression(A.StateError$("No element")) : t1; - }, - IterableIntegerExtension_get_sum(_this) { - var t1, t2, result, t3; - for (t1 = _this.$ti, t2 = new A.MappedIterator(J.get$iterator$ax(_this.__internal$_iterable), _this._f, t1._eval$1("MappedIterator<1,2>")), t1 = t1._rest[1], result = 0; t2.moveNext$0();) { - t3 = t2.__internal$_current; - result += t3 == null ? t1._as(t3) : t3; - } - return result; - }, - ListExtensions_mapIndexed(_this, convert, $E, $R) { - return new A._SyncStarIterable(A.ListExtensions_mapIndexed$body(_this, convert, $E, $R), $R._eval$1("_SyncStarIterable<0>")); - }, - ListExtensions_mapIndexed$body($async$_this, $async$convert, $async$$E, $async$$R) { - return function() { - var _this = $async$_this, - convert = $async$convert, - $E = $async$$E, - $R = $async$$R; - var $async$goto = 0, $async$handler = 1, $async$currentError, t1, index; - return function $async$ListExtensions_mapIndexed($async$iterator, $async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = _this.length, index = 0; - case 2: - // for condition - if (!(index < t1)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return $async$iterator._async$_current = convert.call$2(index, _this[index]), 1; - case 5: - // after yield - case 3: - // for update - ++index; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return 0; - case 1: - // rethrow - return $async$iterator._datum = $async$currentError, 3; - } - }; - }; - }, - ListExtensions_elementAtOrNull(_this, index) { - var t1 = J.getInterceptor$asx(_this); - return index < t1.get$length(_this) ? t1.$index(_this, index) : null; - }, - defaultCompare(value1, value2) { - return J.compareTo$1$ns(type$.Comparable_nullable_Object._as(value1), value2); - }, - current() { - var exception, t1, path, lastIndex, uri = null; - try { - uri = A.Uri_base(); - } catch (exception) { - if (type$.Exception._is(A.unwrapException(exception))) { - t1 = $._current; - if (t1 != null) - return t1; - throw exception; - } else - throw exception; - } - if (J.$eq$(uri, $._currentUriBase)) { - t1 = $._current; - t1.toString; - return t1; - } - $._currentUriBase = uri; - if ($.$get$Style_platform() === $.$get$Style_url()) - t1 = $._current = J.resolve$1$x(uri, ".").toString$0(0); - else { - path = uri.toFilePath$0(); - lastIndex = path.length - 1; - t1 = $._current = lastIndex === 0 ? path : B.JSString_methods.substring$2(path, 0, lastIndex); - } - return t1; - }, - absolute(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) { - return $.$get$context().absolute$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15); - }, - join(part1, part2, part3) { - var _null = null; - return $.$get$context().join$16(0, part1, part2, part3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); - }, - toUri(path) { - return $.$get$context().toUri$1(path); - }, - prettyUri(uri) { - var t1 = $.$get$context(); - uri.toString; - return t1.prettyUri$1(uri); - }, - isAlphabetic(char) { - var t1; - if (!(char >= 65 && char <= 90)) - t1 = char >= 97 && char <= 122; - else - t1 = true; - return t1; - }, - driveLetterEnd(path, index) { - var t2, t3, _null = null, - t1 = path.length, - index0 = index + 2; - if (t1 < index0) - return _null; - if (!A.isAlphabetic(path.charCodeAt(index))) - return _null; - t2 = index + 1; - if (path.charCodeAt(t2) !== 58) { - t3 = index + 4; - if (t1 < t3) - return _null; - if (B.JSString_methods.substring$2(path, t2, t3).toLowerCase() !== "%3a") - return _null; - index = index0; - } - t2 = index + 2; - if (t1 === t2) - return t2; - if (path.charCodeAt(t2) !== 47) - return _null; - return index + 3; - }, - main0(args) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - t1; - var $async$main0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - A.printError("sass --embedded is unavailable in pure JS mode."); - t1 = A.isNodeJs() ? self.process : null; - if (t1 != null) - J.set$exitCode$x(t1, 1); - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$main0, $async$completer); - }, - EvaluationContext_currentOrNull() { - var t1, - _0_0 = $.Zone__current.$index(0, B.Symbol__evaluationContext); - $label0$0: { - if (type$.EvaluationContext._is(_0_0)) { - t1 = _0_0; - break $label0$0; - } - t1 = null; - break $label0$0; - } - return t1; - }, - warn(message) { - var t1, - _0_0 = A.EvaluationContext_currentOrNull(); - $label0$0: { - if (_0_0 != null) { - t1 = _0_0.warn$2(0, message, null); - break $label0$0; - } - t1 = B.StderrLogger_false.warn$1(0, message); - break $label0$0; - } - return t1; - }, - warnForDeprecation(message, deprecation) { - var t1, - _0_0 = A.EvaluationContext_currentOrNull(); - $label0$0: { - if (_0_0 != null) { - t1 = _0_0.warn$2(0, message, deprecation); - break $label0$0; - } - t1 = A.WarnForDeprecation_warnForDeprecation(B.StderrLogger_false, deprecation, message, null, null); - break $label0$0; - } - return t1; - }, - compileStylesheets(options, graph, sourcesToDestinations, ifModified) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.bool), - $async$returnValue, t2, _1_4, source, t3, _i, t4, printedError, errorWithStackTrace, code, error, stackTrace, buffer, t1, $async$temp1; - var $async$compileStylesheets = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = type$.nullable_String; - t1 = A.List_List$of(A.MapExtensions_get_pairs(sourcesToDestinations, t1, t1), true, type$.Record_2_nullable_String_and_nullable_String); - t2 = t1.length; - $async$goto = t2 === 1 ? 4 : 5; - break; - case 4: - // then - _1_4 = t1[0]; - source = _1_4._0; - $async$temp1 = A; - $async$goto = 6; - return A._asyncAwait(A.compileStylesheet(options, graph, source, _1_4._1, ifModified), $async$compileStylesheets); - case 6: - // returning from await. - t1 = $async$temp1._setArrayType([$async$result], type$.JSArray_nullable_Record_3_int_and_String_and_nullable_String); - // goto break $label0$0 - $async$goto = 3; - break; - case 5: - // join - t3 = A._setArrayType([], type$.JSArray_Future_nullable_Record_3_int_and_String_and_nullable_String); - for (_i = 0; _i < t2; ++_i) { - t4 = t1[_i]; - t3.push(A.compileStylesheet(options, graph, t4._0, t4._1, ifModified)); - } - $async$goto = 7; - return A._asyncAwait(A.Future_wait(t3, A._asBool(options._options.$index(0, "stop-on-error")), type$.nullable_Record_3_int_and_String_and_nullable_String), $async$compileStylesheets); - case 7: - // returning from await. - t1 = $async$result; - // goto break $label0$0 - $async$goto = 3; - break; - case 3: - // break $label0$0 - for (t1 = J.get$iterator$ax(t1), printedError = false; t1.moveNext$0();) { - errorWithStackTrace = t1.get$current(t1); - if (errorWithStackTrace == null) - continue; - code = errorWithStackTrace._0; - error = errorWithStackTrace._1; - stackTrace = errorWithStackTrace._2; - t2 = self.process; - if (t2 == null) - t2 = null; - else { - t2 = J.get$release$x(t2); - t2 = t2 == null ? null : J.get$name$x(t2); - } - t2 = J.$eq$(t2, "node") ? self.process : null; - t2 = t2 == null ? null : J.get$exitCode$x(t2); - if (t2 == null) - t2 = 0; - t2 = Math.max(t2, code); - t3 = self.process; - if (t3 == null) - t3 = null; - else { - t3 = J.get$release$x(t3); - t3 = t3 == null ? null : J.get$name$x(t3); - } - t3 = J.$eq$(t3, "node") ? self.process : null; - if (t3 != null) - J.set$exitCode$x(t3, t2); - buffer = new A.StringBuffer(""); - t2 = (printedError ? buffer._contents = "" + "\n" : "") + error; - buffer._contents = t2; - if (stackTrace != null) { - t2 += "\n"; - buffer._contents = t2; - t2 += "\n"; - buffer._contents = t2; - buffer._contents = t2 + stackTrace; - } - A.printError(buffer); - printedError = true; - } - $async$returnValue = !printedError; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$compileStylesheets, $async$completer); - }, - CharacterExtension_get_isAlphabetic(_this) { - var t1; - if (!(_this >= 97 && _this <= 122)) - t1 = _this >= 65 && _this <= 90; - else - t1 = true; - return t1; - }, - CharacterExtension_get_isHex(_this) { - var t1 = true; - if (!(_this >= 48 && _this <= 57)) - if (!(_this >= 97 && _this <= 102)) - t1 = _this >= 65 && _this <= 70; - return t1; - }, - asHex(character) { - var t1; - $label0$0: { - if (character <= 57) { - t1 = character - 48; - break $label0$0; - } - if (character <= 70) { - t1 = 10 + character - 65; - break $label0$0; - } - t1 = 10 + character - 97; - break $label0$0; - } - return t1; - }, - hexCharFor(number) { - return number < 10 ? 48 + number : 87 + number; - }, - opposite(character) { - var t1; - $label0$0: { - if (40 === character) { - t1 = 41; - break $label0$0; - } - if (123 === character) { - t1 = 125; - break $label0$0; - } - if (91 === character) { - t1 = 93; - break $label0$0; - } - t1 = A.throwExpression(A.ArgumentError$('"' + A.String_String$fromCharCode(character) + "\" isn't a brace-like character.", null)); - } - return t1; - }, - characterEqualsIgnoreCase(character1, character2) { - var upperCase1; - if (character1 === character2) - return true; - if ((character1 ^ character2) >>> 0 !== 32) - return false; - upperCase1 = (character1 & 4294967263) >>> 0; - return upperCase1 >= 65 && upperCase1 <= 90; - }, - IterableExtension_search(_this, callback) { - var t1, _0_0; - for (t1 = J.get$iterator$ax(_this); t1.moveNext$0();) { - _0_0 = callback.call$1(t1.get$current(t1)); - if (_0_0 != null) - return _0_0; - } - return null; - }, - IterableExtension_get_exceptLast(_this) { - var t1 = J.getInterceptor$asx(_this), - size = t1.get$length(_this) - 1; - if (size < 0) - throw A.wrapException(A.StateError$("Iterable may not be empty")); - return t1.take$1(_this, size); - }, - NullableExtension_andThen(_this, fn) { - return _this == null ? null : fn.call$1(_this); - }, - SetExtension_removeNull(_this, $T) { - _this.remove$1(0, null); - return A.Set_castFrom(_this, _this.get$_newSimilarSet(), A._instanceType(_this)._precomputed1, $T); - }, - fuzzyEquals(number1, number2) { - var t1; - if (number1 === number2) - return true; - if (Math.abs(number1 - number2) <= $.$get$_epsilon()) { - t1 = $.$get$_inverseEpsilon(); - t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); - } else - t1 = false; - return t1; - }, - fuzzyEqualsNullable(number1, number2) { - var t1; - if (number1 == number2) - return true; - if (number1 == null || number2 == null) - return false; - if (Math.abs(number1 - number2) <= $.$get$_epsilon()) { - t1 = $.$get$_inverseEpsilon(); - t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); - } else - t1 = false; - return t1; - }, - fuzzyHashCode(number) { - if (!isFinite(number)) - return B.JSNumber_methods.get$hashCode(number); - return B.JSInt_methods.get$hashCode(B.JSNumber_methods.round$0(number * $.$get$_inverseEpsilon())); - }, - fuzzyLessThan(number1, number2) { - return number1 < number2 && !A.fuzzyEquals(number1, number2); - }, - fuzzyLessThanOrEquals(number1, number2) { - return number1 < number2 || A.fuzzyEquals(number1, number2); - }, - fuzzyGreaterThan(number1, number2) { - return number1 > number2 && !A.fuzzyEquals(number1, number2); - }, - fuzzyGreaterThanOrEquals(number1, number2) { - return number1 > number2 || A.fuzzyEquals(number1, number2); - }, - fuzzyIsInt(number) { - if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) - return false; - return A.fuzzyEquals(number, B.JSNumber_methods.round$0(number)); - }, - fuzzyAsInt(number) { - var rounded; - if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) - return null; - rounded = B.JSNumber_methods.round$0(number); - return A.fuzzyEquals(number, rounded) ? rounded : null; - }, - fuzzyRound(number) { - var t1; - if (number > 0) { - t1 = B.JSNumber_methods.$mod(number, 1); - return t1 < 0.5 && !A.fuzzyEquals(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); - } else { - t1 = B.JSNumber_methods.$mod(number, 1); - return t1 < 0.5 || A.fuzzyEquals(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); - } - }, - fuzzyCheckRange(number, min, max) { - if (A.fuzzyEquals(number, min)) - return min; - if (A.fuzzyEquals(number, max)) - return max; - if (number > min && number < max) - return number; - return null; - }, - fuzzyAssertRange(number, min, max, $name) { - var result = A.fuzzyCheckRange(number, min, max); - if (result != null) - return result; - throw A.wrapException(A.RangeError$range(number, min, max, $name, "must be between " + min + " and " + max)); - }, - moduloLikeSass(num1, num2) { - var result; - if (num1 == 1 / 0 || num1 == -1 / 0) - return 0 / 0; - if (num2 == 1 / 0 || num2 == -1 / 0) - return A.DoubleWithSignedZero_get_signIncludingZero(num1) === J.get$sign$in(num2) ? num1 : 0 / 0; - if (num2 > 0) - return B.JSNumber_methods.$mod(num1, num2); - if (num2 === 0) - return 0 / 0; - result = B.JSNumber_methods.$mod(num1, num2); - return result === 0 ? 0 : result + num2; - }, - sqrt(number) { - number.assertNoUnits$1("number"); - return A.SassNumber_SassNumber(Math.sqrt(number._number$_value), null); - }, - sin(number) { - return A.SassNumber_SassNumber(Math.sin(number.coerceValueToUnit$2("rad", "number")), null); - }, - cos(number) { - return A.SassNumber_SassNumber(Math.cos(number.coerceValueToUnit$2("rad", "number")), null); - }, - tan(number) { - return A.SassNumber_SassNumber(Math.tan(number.coerceValueToUnit$2("rad", "number")), null); - }, - atan(number) { - number.assertNoUnits$1("number"); - return A.SassNumber_SassNumber$withUnits(Math.atan(number._number$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); - }, - asin(number) { - number.assertNoUnits$1("number"); - return A.SassNumber_SassNumber$withUnits(Math.asin(number._number$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); - }, - acos(number) { - number.assertNoUnits$1("number"); - return A.SassNumber_SassNumber$withUnits(Math.acos(number._number$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); - }, - log(number, base) { - if (base != null) - return A.SassNumber_SassNumber(Math.log(number._number$_value) / Math.log(base._number$_value), null); - return A.SassNumber_SassNumber(Math.log(number._number$_value), null); - }, - pow0(base, exponent) { - base.assertNoUnits$1("base"); - exponent.assertNoUnits$1("exponent"); - return A.SassNumber_SassNumber(Math.pow(base._number$_value, exponent._number$_value), null); - }, - DoubleWithSignedZero_get_signIncludingZero(_this) { - if (_this === -0.0) - return -1; - if (_this === 0) - return 1; - return J.get$sign$in(_this); - }, - SpanExtensions_trimLeft(_this) { - var t1, start = 0; - while (true) { - t1 = _this.get$text().charCodeAt(start); - if (!(t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12)) - break; - ++start; - } - return A.FileSpanExtension_subspan(_this, start, null); - }, - SpanExtensions_trimRight(_this) { - var t1, - end = _this.get$text().length - 1; - while (true) { - t1 = _this.get$text().charCodeAt(end); - if (!(t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12)) - break; - --end; - } - return A.FileSpanExtension_subspan(_this, 0, end + 1); - }, - SpanExtensions_initialIdentifier(_this) { - var i, - scanner = A.StringScanner$(_this.get$text(), null, null); - for (i = 0; false; ++i) - scanner.readChar$0(); - A._scanIdentifier(scanner); - return A.FileSpanExtension_subspan(_this, 0, scanner._string_scanner$_position); - }, - SpanExtensions_withoutInitialIdentifier(_this) { - var scanner = A.StringScanner$(_this.get$text(), null, null); - A._scanIdentifier(scanner); - return A.FileSpanExtension_subspan(_this, scanner._string_scanner$_position, null); - }, - _scanIdentifier(scanner) { - var t1, _0_0, t2; - for (t1 = scanner.string.length; scanner._string_scanner$_position !== t1;) { - _0_0 = scanner.peekChar$0(); - if (92 === _0_0) { - A.consumeEscapedCharacter(scanner); - continue; - } - if (A._isInt(_0_0)) { - if (_0_0 !== 95) { - if (!(_0_0 >= 97 && _0_0 <= 122)) - t2 = _0_0 >= 65 && _0_0 <= 90; - else - t2 = true; - t2 = t2 || _0_0 >= 128; - } else - t2 = true; - if (!t2) - t2 = _0_0 >= 48 && _0_0 <= 57 || _0_0 === 45; - else - t2 = true; - } else - t2 = false; - if (t2) { - scanner.readChar$0(); - continue; - } - break; - } - }, - hueToRgb(m1, m2, hue) { - var t1; - if (hue < 0) - ++hue; - if (hue > 1) - --hue; - $label0$0: { - if (hue < 0.16666666666666666) { - t1 = m1 + (m2 - m1) * hue * 6; - break $label0$0; - } - if (hue < 0.5) { - t1 = m2; - break $label0$0; - } - if (hue < 0.6666666666666666) { - t1 = m1 + (m2 - m1) * (0.6666666666666666 - hue) * 6; - break $label0$0; - } - t1 = m1; - break $label0$0; - } - return t1; - }, - srgbAndDisplayP3ToLinear(channel) { - var abs = Math.abs(channel); - return abs <= 0.04045 ? channel / 12.92 : J.get$sign$in(channel) * Math.pow((abs + 0.055) / 1.055, 2.4); - }, - srgbAndDisplayP3FromLinear(channel) { - var abs = Math.abs(channel); - return abs <= 0.0031308 ? channel * 12.92 : J.get$sign$in(channel) * (1.055 * Math.pow(abs, 0.4166666666666667) - 0.055); - }, - labToLch(dest, lightness, a, b, alpha, missingChroma, missingHue) { - var t3, t4, chroma, hue, - t1 = a == null, - t2 = t1 ? 0 : a; - t2 = Math.pow(t2, 2); - t3 = b == null; - t4 = t3 ? 0 : b; - chroma = Math.sqrt(t2 + Math.pow(t4, 2)); - if (missingHue || A.fuzzyEquals(chroma, 0)) - hue = null; - else { - t2 = t3 ? 0 : b; - t1 = t1 ? 0 : a; - hue = Math.atan2(t2, t1) * 180 / 3.141592653589793; - } - t1 = missingChroma ? null : chroma; - return A.SassColor_SassColor$forSpaceInternal(dest, lightness, t1, hue == null || hue >= 0 ? hue : hue + 360, alpha); - }, - encodeVlq(value) { - var res, signBit, digit, t1; - if (value < $.$get$minInt32() || value > $.$get$maxInt32()) - throw A.wrapException(A.ArgumentError$("expected 32 bit int, got: " + value, null)); - res = A._setArrayType([], type$.JSArray_String); - if (value < 0) { - value = -value; - signBit = 1; - } else - signBit = 0; - value = value << 1 | signBit; - do { - digit = value & 31; - value = value >>> 5; - t1 = value > 0; - res.push(string$.ABCDEF[t1 ? digit | 32 : digit]); - } while (t1); - return res; - }, - isAllTheSame(iter) { - var firstValue, t1, t2, value; - if (iter.get$length(0) === 0) - return true; - firstValue = iter.get$first(0); - for (t1 = A.SubListIterable$(iter, 1, null, iter.$ti._eval$1("ListIterable.E")), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { - value = t1.__internal$_current; - if (!J.$eq$(value == null ? t2._as(value) : value, firstValue)) - return false; - } - return true; - }, - replaceFirstNull(list, element) { - var index = B.JSArray_methods.indexOf$1(list, null); - if (index < 0) - throw A.wrapException(A.ArgumentError$(A.S(list) + " contains no null elements.", null)); - list[index] = element; - }, - replaceWithNull(list, element) { - var index = B.JSArray_methods.indexOf$1(list, element); - if (index < 0) - throw A.wrapException(A.ArgumentError$(A.S(list) + " contains no elements matching " + element.toString$0(0) + ".", null)); - list[index] = null; - }, - countCodeUnits(string, codeUnit) { - var t1, t2, count, t3; - for (t1 = new A.CodeUnits(string), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"), count = 0; t1.moveNext$0();) { - t3 = t1.__internal$_current; - if ((t3 == null ? t2._as(t3) : t3) === codeUnit) - ++count; - } - return count; - }, - findLineStart(context, text, column) { - var beginningOfLine, index, lineStart; - if (text.length === 0) - for (beginningOfLine = 0; true;) { - index = B.JSString_methods.indexOf$2(context, "\n", beginningOfLine); - if (index === -1) - return context.length - beginningOfLine >= column ? beginningOfLine : null; - if (index - beginningOfLine >= column) - return beginningOfLine; - beginningOfLine = index + 1; - } - index = B.JSString_methods.indexOf$1(context, text); - for (; index !== -1;) { - lineStart = index === 0 ? 0 : B.JSString_methods.lastIndexOf$2(context, "\n", index - 1) + 1; - if (column === index - lineStart) - return lineStart; - index = B.JSString_methods.indexOf$2(context, text, index + 1); - } - return null; - }, - validateErrorArgs(string, match, position, $length) { - var t2, - t1 = position != null; - if (t1) - if (position < 0) - throw A.wrapException(A.RangeError$("position must be greater than or equal to 0.")); - else if (position > string.length) - throw A.wrapException(A.RangeError$("position must be less than or equal to the string length.")); - t2 = $length != null; - if (t2 && $length < 0) - throw A.wrapException(A.RangeError$("length must be greater than or equal to 0.")); - if (t1 && t2 && position + $length > string.length) - throw A.wrapException(A.RangeError$("position plus length must not go beyond the end of the string.")); - }, - CharacterExtension_get_isAlphabetic0(_this) { - var t1; - if (!(_this >= 97 && _this <= 122)) - t1 = _this >= 65 && _this <= 90; - else - t1 = true; - return t1; - }, - CharacterExtension_get_isHex0(_this) { - var t1 = true; - if (!(_this >= 48 && _this <= 57)) - if (!(_this >= 97 && _this <= 102)) - t1 = _this >= 65 && _this <= 70; - return t1; - }, - combineSurrogates(highSurrogate, lowSurrogate) { - return 65536 + ((highSurrogate & 1023) << 10) + (lowSurrogate & 1023); - }, - asHex0(character) { - var t1; - $label0$0: { - if (character <= 57) { - t1 = character - 48; - break $label0$0; - } - if (character <= 70) { - t1 = 10 + character - 65; - break $label0$0; - } - t1 = 10 + character - 97; - break $label0$0; - } - return t1; - }, - hexCharFor0(number) { - return number < 10 ? 48 + number : 87 + number; - }, - opposite0(character) { - var t1; - $label0$0: { - if (40 === character) { - t1 = 41; - break $label0$0; - } - if (123 === character) { - t1 = 125; - break $label0$0; - } - if (91 === character) { - t1 = 93; - break $label0$0; - } - t1 = A.throwExpression(A.ArgumentError$('"' + A.String_String$fromCharCode(character) + "\" isn't a brace-like character.", null)); - } - return t1; - }, - characterEqualsIgnoreCase0(character1, character2) { - var upperCase1; - if (character1 === character2) - return true; - if ((character1 ^ character2) >>> 0 !== 32) - return false; - upperCase1 = (character1 & 4294967263) >>> 0; - return upperCase1 >= 65 && upperCase1 <= 90; - }, - EvaluationContext_currentOrNull0() { - var t1, - _0_0 = $.Zone__current.$index(0, B.Symbol__evaluationContext); - $label0$0: { - if (type$.EvaluationContext_2._is(_0_0)) { - t1 = _0_0; - break $label0$0; - } - t1 = null; - break $label0$0; - } - return t1; - }, - EvaluationContext__currentOrNull() { - var _0_0 = $.Zone__current.$index(0, B.Symbol__evaluationContext); - if (type$.EvaluationContext_2._is(_0_0)) - return _0_0; - else - return null; - }, - warn0(message) { - var t1, - _0_0 = A.EvaluationContext_currentOrNull0(); - $label0$0: { - if (_0_0 != null) { - t1 = _0_0.warn$2(0, message, null); - break $label0$0; - } - t1 = B.StderrLogger_false0.warn$1(0, message); - break $label0$0; - } - return t1; - }, - warnForDeprecation0(message, deprecation) { - var t1, - _0_0 = A.EvaluationContext_currentOrNull0(); - $label0$0: { - if (_0_0 != null) { - t1 = _0_0.warn$2(0, message, deprecation); - break $label0$0; - } - t1 = A.WarnForDeprecation_warnForDeprecation0(B.StderrLogger_false0, deprecation, message, null, null); - break $label0$0; - } - return t1; - }, - warnForDeprecationFromApi(message, deprecation) { - var _0_0 = A.EvaluationContext__currentOrNull(); - if (_0_0 != null) - _0_0.warn$2(0, message, deprecation); - else - A.WarnForDeprecation_warnForDeprecation0(new A.StderrLogger0(false), deprecation, message, null, null); - }, - IterableExtension_search0(_this, callback) { - var t1, _0_0; - for (t1 = J.get$iterator$ax(_this); t1.moveNext$0();) { - _0_0 = callback.call$1(t1.get$current(t1)); - if (_0_0 != null) - return _0_0; - } - return null; - }, - IterableExtension_get_exceptLast0(_this) { - var t1 = J.getInterceptor$asx(_this), - size = t1.get$length(_this) - 1; - if (size < 0) - throw A.wrapException(A.StateError$("Iterable may not be empty")); - return t1.take$1(_this, size); - }, - NullableExtension_andThen0(_this, fn) { - return _this == null ? null : fn.call$1(_this); - }, - fuzzyEquals0(number1, number2) { - var t1; - if (number1 === number2) - return true; - if (Math.abs(number1 - number2) <= $.$get$_epsilon0()) { - t1 = $.$get$_inverseEpsilon0(); - t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); - } else - t1 = false; - return t1; - }, - fuzzyEqualsNullable0(number1, number2) { - var t1; - if (number1 == number2) - return true; - if (number1 == null || number2 == null) - return false; - if (Math.abs(number1 - number2) <= $.$get$_epsilon0()) { - t1 = $.$get$_inverseEpsilon0(); - t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); - } else - t1 = false; - return t1; - }, - fuzzyHashCode0(number) { - if (!isFinite(number)) - return B.JSNumber_methods.get$hashCode(number); - return B.JSInt_methods.get$hashCode(B.JSNumber_methods.round$0(number * $.$get$_inverseEpsilon0())); - }, - fuzzyLessThan0(number1, number2) { - return number1 < number2 && !A.fuzzyEquals0(number1, number2); - }, - fuzzyLessThanOrEquals0(number1, number2) { - return number1 < number2 || A.fuzzyEquals0(number1, number2); - }, - fuzzyGreaterThan0(number1, number2) { - return number1 > number2 && !A.fuzzyEquals0(number1, number2); - }, - fuzzyGreaterThanOrEquals0(number1, number2) { - return number1 > number2 || A.fuzzyEquals0(number1, number2); - }, - fuzzyIsInt0(number) { - if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) - return false; - return A.fuzzyEquals0(number, B.JSNumber_methods.round$0(number)); - }, - fuzzyAsInt0(number) { - var rounded; - if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) - return null; - rounded = B.JSNumber_methods.round$0(number); - return A.fuzzyEquals0(number, rounded) ? rounded : null; - }, - fuzzyRound0(number) { - var t1; - if (number > 0) { - t1 = B.JSNumber_methods.$mod(number, 1); - return t1 < 0.5 && !A.fuzzyEquals0(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); - } else { - t1 = B.JSNumber_methods.$mod(number, 1); - return t1 < 0.5 || A.fuzzyEquals0(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); - } - }, - fuzzyCheckRange0(number, min, max) { - if (A.fuzzyEquals0(number, min)) - return min; - if (A.fuzzyEquals0(number, max)) - return max; - if (number > min && number < max) - return number; - return null; - }, - fuzzyAssertRange0(number, min, max, $name) { - var result = A.fuzzyCheckRange0(number, min, max); - if (result != null) - return result; - throw A.wrapException(A.RangeError$range(number, min, max, $name, "must be between " + min + " and " + max)); - }, - moduloLikeSass0(num1, num2) { - var result; - if (num1 == 1 / 0 || num1 == -1 / 0) - return 0 / 0; - if (num2 == 1 / 0 || num2 == -1 / 0) - return A.DoubleWithSignedZero_get_signIncludingZero0(num1) === J.get$sign$in(num2) ? num1 : 0 / 0; - if (num2 > 0) - return B.JSNumber_methods.$mod(num1, num2); - if (num2 === 0) - return 0 / 0; - result = B.JSNumber_methods.$mod(num1, num2); - return result === 0 ? 0 : result + num2; - }, - sqrt0(number) { - number.assertNoUnits$1("number"); - return A.SassNumber_SassNumber0(Math.sqrt(number._number1$_value), null); - }, - sin0(number) { - return A.SassNumber_SassNumber0(Math.sin(number.coerceValueToUnit$2("rad", "number")), null); - }, - cos0(number) { - return A.SassNumber_SassNumber0(Math.cos(number.coerceValueToUnit$2("rad", "number")), null); - }, - tan0(number) { - return A.SassNumber_SassNumber0(Math.tan(number.coerceValueToUnit$2("rad", "number")), null); - }, - atan0(number) { - number.assertNoUnits$1("number"); - return A.SassNumber_SassNumber$withUnits0(Math.atan(number._number1$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); - }, - asin0(number) { - number.assertNoUnits$1("number"); - return A.SassNumber_SassNumber$withUnits0(Math.asin(number._number1$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); - }, - acos0(number) { - number.assertNoUnits$1("number"); - return A.SassNumber_SassNumber$withUnits0(Math.acos(number._number1$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); - }, - log0(number, base) { - if (base != null) - return A.SassNumber_SassNumber0(Math.log(number._number1$_value) / Math.log(base._number1$_value), null); - return A.SassNumber_SassNumber0(Math.log(number._number1$_value), null); - }, - pow1(base, exponent) { - base.assertNoUnits$1("base"); - exponent.assertNoUnits$1("exponent"); - return A.SassNumber_SassNumber0(Math.pow(base._number1$_value, exponent._number1$_value), null); - }, - DoubleWithSignedZero_get_signIncludingZero0(_this) { - if (_this === -0.0) - return -1; - if (_this === 0) - return 1; - return J.get$sign$in(_this); - }, - main1(args) { - return A.main$body(args); - }, - main$body(args) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$returnValue, $async$handler = 2, $async$currentError, options, t1, graph, error, error0, stackTrace, buffer, t2, exception, $async$exception, $async$temp1; - var $async$main1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - if (args.length >= 1 && "--embedded" === args[0]) { - A.main0(B.JSArray_methods.sublist$1(args, 1)); - // goto return - $async$goto = 1; - break; - } - options = null; - $async$handler = 4; - options = A.ExecutableOptions_ExecutableOptions$parse(args); - t2 = options._options; - $._glyphs = !(t2.wasParsed$1("unicode") ? A._asBool(t2.$index(0, "unicode")) : $._glyphs !== B.C_AsciiGlyphSet) ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; - $async$goto = A._asBool(options._options.$index(0, "version")) ? 7 : 8; - break; - case 7: - // then - $async$temp1 = A; - $async$goto = 9; - return A._asyncAwait(A._loadVersion(), $async$main1); - case 9: - // returning from await. - $async$temp1.print($async$result); - t1 = A.isNodeJs() ? self.process : null; - if (t1 != null) - J.set$exitCode$x(t1, 0); - // goto return - $async$goto = 1; - break; - case 8: - // join - $async$goto = options.get$interactive() ? 10 : 11; - break; - case 10: - // then - $async$goto = 12; - return A._asyncAwait(A.repl(options), $async$main1); - case 12: - // returning from await. - // goto return - $async$goto = 1; - break; - case 11: - // join - J.get$silenceDeprecations$x(options); - J.get$futureDeprecations$x(options); - J.get$fatalDeprecations$x(options); - t1 = A.List_List$of(options.get$pkgImporters(), true, type$.Importer_2); - J.add$1$ax(t1, $.$get$FilesystemImporter_noLoadPath()); - t2 = type$.Uri; - graph = new A.StylesheetGraph(A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.StylesheetNode), A.ImportCache$(t1, type$.List_String._as(options._options.$index(0, "load-path"))), A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.DateTime)); - $async$goto = A._asBool(options._options.$index(0, "watch")) ? 13 : 14; - break; - case 13: - // then - $async$goto = 15; - return A._asyncAwait(A.watch(options, graph), $async$main1); - case 15: - // returning from await. - // goto return - $async$goto = 1; - break; - case 14: - // join - t1 = options; - t2 = options; - t2._ensureSources$0(); - t2 = t2._sourcesToDestinations; - t2.toString; - $async$goto = 16; - return A._asyncAwait(A.compileStylesheets(t1, graph, t2, A._asBool(options._options.$index(0, "update"))), $async$main1); - case 16: - // returning from await. - $async$handler = 2; - // goto after finally - $async$goto = 6; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (t1 instanceof A.UsageException) { - error = t1; - A.print(error.message + "\n"); - A.print("Usage: sass [output.css]\n sass : : \n"); - t1 = $.$get$ExecutableOptions__parser(); - A.print(new A._Usage(t1._optionsAndSeparators, new A.StringBuffer(""), t1.usageLineLength).generate$0()); - t1 = A.isNodeJs() ? self.process : null; - if (t1 != null) - J.set$exitCode$x(t1, 64); - } else { - error0 = t1; - stackTrace = A.getTraceFromException($async$exception); - buffer = new A.StringBuffer(""); - t1 = options; - t1 = t1 == null ? null : t1.get$color(); - if (t1 === true) - buffer._contents += "\x1b[31m\x1b[1m"; - buffer._contents += "Unexpected exception:"; - t1 = options; - t1 = t1 == null ? null : t1.get$color(); - if (t1 === true) - buffer._contents += "\x1b[0m"; - buffer._contents += "\n"; - t1 = buffer; - t2 = A.S(error0) + "\n"; - t1._contents += t2; - buffer._contents += "\n"; - buffer._contents += "\n"; - t2 = buffer; - t1 = A.getTrace(error0); - t1 = B.JSString_methods.trimRight$0(A.Trace_Trace$from(t1 == null ? stackTrace : t1).get$terse().toString$0(0)); - t2._contents += t1; - A.printError(buffer); - t1 = A.isNodeJs() ? self.process : null; - if (t1 != null) - J.set$exitCode$x(t1, 255); - } - // goto after finally - $async$goto = 6; - break; - case 3: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 6: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$main1, $async$completer); - }, - _loadVersion() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.String), - $async$returnValue; - var $async$_loadVersion = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = "1.81.0 compiled with dart2js 3.5.4"; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_loadVersion, $async$completer); - }, - SpanExtensions_trimLeft0(_this) { - var t1, start = 0; - while (true) { - t1 = _this.get$text().charCodeAt(start); - if (!(t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12)) - break; - ++start; - } - return A.FileSpanExtension_subspan(_this, start, null); - }, - SpanExtensions_trimRight0(_this) { - var t1, - end = _this.get$text().length - 1; - while (true) { - t1 = _this.get$text().charCodeAt(end); - if (!(t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12)) - break; - --end; - } - return A.FileSpanExtension_subspan(_this, 0, end + 1); - }, - SpanExtensions_initialIdentifier0(_this) { - var i, - scanner = A.StringScanner$(_this.get$text(), null, null); - for (i = 0; false; ++i) - scanner.readChar$0(); - A._scanIdentifier0(scanner); - return A.FileSpanExtension_subspan(_this, 0, scanner._string_scanner$_position); - }, - SpanExtensions_withoutInitialIdentifier0(_this) { - var scanner = A.StringScanner$(_this.get$text(), null, null); - A._scanIdentifier0(scanner); - return A.FileSpanExtension_subspan(_this, scanner._string_scanner$_position, null); - }, - SpanExtensions_between(_this, other) { - if (!J.$eq$(_this.get$sourceUrl(_this), other.get$sourceUrl(other))) - throw A.wrapException(A.ArgumentError$(_this.toString$0(0) + " and " + other.toString$0(0) + " are in different files.", null)); - else if (_this.get$end(_this).offset > other.get$start(other).offset) - throw A.wrapException(A.ArgumentError$(_this.toString$0(0) + " isn't before " + other.toString$0(0) + ".", null)); - return _this.get$file(_this).span$2(0, _this.get$end(_this).offset, other.get$start(other).offset); - }, - SpanExtensions_before(_this, inner) { - if (!J.$eq$(_this.get$sourceUrl(_this), inner.get$sourceUrl(inner))) - throw A.wrapException(A.ArgumentError$(_this.toString$0(0) + " and " + inner.toString$0(0) + " are in different files.", null)); - else if (inner.get$start(inner).offset < _this.get$start(_this).offset || inner.get$end(inner).offset > _this.get$end(_this).offset) - throw A.wrapException(A.ArgumentError$(inner.toString$0(0) + " isn't inside " + _this.toString$0(0) + ".", null)); - return _this.get$file(_this).span$2(0, _this.get$start(_this).offset, inner.get$start(inner).offset); - }, - SpanExtensions_after(_this, inner) { - if (!J.$eq$(_this.get$sourceUrl(_this), inner.get$sourceUrl(inner))) - throw A.wrapException(A.ArgumentError$(_this.toString$0(0) + " and " + inner.toString$0(0) + " are in different files.", null)); - else if (inner.get$start(inner).offset < _this.get$start(_this).offset || inner.get$end(inner).offset > _this.get$end(_this).offset) - throw A.wrapException(A.ArgumentError$(inner.toString$0(0) + " isn't inside " + _this.toString$0(0) + ".", null)); - return _this.get$file(_this).span$2(0, inner.get$end(inner).offset, _this.get$end(_this).offset); - }, - _scanIdentifier0(scanner) { - var t1, _0_0, t2; - for (t1 = scanner.string.length; scanner._string_scanner$_position !== t1;) { - _0_0 = scanner.peekChar$0(); - if (92 === _0_0) { - A.consumeEscapedCharacter0(scanner); - continue; - } - if (A._isInt(_0_0)) { - if (_0_0 !== 95) { - if (!(_0_0 >= 97 && _0_0 <= 122)) - t2 = _0_0 >= 65 && _0_0 <= 90; - else - t2 = true; - t2 = t2 || _0_0 >= 128; - } else - t2 = true; - if (!t2) - t2 = _0_0 >= 48 && _0_0 <= 57 || _0_0 === 45; - else - t2 = true; - } else - t2 = false; - if (t2) { - scanner.readChar$0(); - continue; - } - break; - } - }, - validateUrlScheme(scheme) { - var t1 = $.$get$_urlSchemeRegExp(); - if (!t1._nativeRegExp.test(scheme)) - A.jsThrow(new self.Error('"' + scheme + '" isn\'t a valid URL scheme (for example "file").')); - }, - hueToRgb0(m1, m2, hue) { - var t1; - if (hue < 0) - ++hue; - if (hue > 1) - --hue; - $label0$0: { - if (hue < 0.16666666666666666) { - t1 = m1 + (m2 - m1) * hue * 6; - break $label0$0; - } - if (hue < 0.5) { - t1 = m2; - break $label0$0; - } - if (hue < 0.6666666666666666) { - t1 = m1 + (m2 - m1) * (0.6666666666666666 - hue) * 6; - break $label0$0; - } - t1 = m1; - break $label0$0; - } - return t1; - }, - srgbAndDisplayP3ToLinear0(channel) { - var abs = Math.abs(channel); - return abs <= 0.04045 ? channel / 12.92 : J.get$sign$in(channel) * Math.pow((abs + 0.055) / 1.055, 2.4); - }, - srgbAndDisplayP3FromLinear0(channel) { - var abs = Math.abs(channel); - return abs <= 0.0031308 ? channel * 12.92 : J.get$sign$in(channel) * (1.055 * Math.pow(abs, 0.4166666666666667) - 0.055); - }, - labToLch0(dest, lightness, a, b, alpha, missingChroma, missingHue) { - var t3, t4, chroma, hue, - t1 = a == null, - t2 = t1 ? 0 : a; - t2 = Math.pow(t2, 2); - t3 = b == null; - t4 = t3 ? 0 : b; - chroma = Math.sqrt(t2 + Math.pow(t4, 2)); - if (missingHue || A.fuzzyEquals0(chroma, 0)) - hue = null; - else { - t2 = t3 ? 0 : b; - t1 = t1 ? 0 : a; - hue = Math.atan2(t2, t1) * 180 / 3.141592653589793; - } - t1 = missingChroma ? null : chroma; - return A.SassColor_SassColor$forSpaceInternal0(dest, lightness, t1, hue == null || hue >= 0 ? hue : hue + 360, alpha); - }, - unwrapValue(object) { - var value; - if (object != null) { - if (object instanceof A.Value0) - return object; - value = object.dartValue; - if (value != null && value instanceof A.Value0) - return value; - if (object instanceof self.Error) - throw A.wrapException(object); - } - throw A.wrapException(A.S(object) + " must be a Sass value type."); - }, - wrapValue(value) { - var t1; - $label0$0: { - if (value instanceof A.SassColor0) { - t1 = A.callConstructor($.$get$legacyColorClass(), [null, null, null, null, value]); - break $label0$0; - } - if (value instanceof A.SassList0) { - t1 = A.callConstructor($.$get$legacyListClass(), [null, null, value]); - break $label0$0; - } - if (value instanceof A.SassMap0) { - t1 = A.callConstructor($.$get$legacyMapClass(), [null, value]); - break $label0$0; - } - if (value instanceof A.SassNumber0) { - t1 = A.callConstructor($.$get$legacyNumberClass(), [null, null, value]); - break $label0$0; - } - if (value instanceof A.SassString0) { - t1 = A.callConstructor($.$get$legacyStringClass(), [null, value]); - break $label0$0; - } - t1 = value; - break $label0$0; - } - return t1; - } - }, - B = {}; - var holders = [A, J, B]; - var $ = {}; - A.JS_CONST.prototype = {}; - J.Interceptor.prototype = { - $eq(receiver, other) { - return receiver === other; - }, - get$hashCode(receiver) { - return A.Primitives_objectHashCode(receiver); - }, - toString$0(receiver) { - return "Instance of '" + A.Primitives_objectTypeName(receiver) + "'"; - }, - noSuchMethod$1(receiver, invocation) { - throw A.wrapException(A.NoSuchMethodError_NoSuchMethodError$withInvocation(receiver, invocation)); - }, - get$runtimeType(receiver) { - return A.createRuntimeType(A._instanceTypeFromConstructor(this)); - } - }; - J.JSBool.prototype = { - toString$0(receiver) { - return String(receiver); - }, - $or(receiver, other) { - return other || receiver; - }, - get$hashCode(receiver) { - return receiver ? 519018 : 218159; - }, - get$runtimeType(receiver) { - return A.createRuntimeType(type$.bool); - }, - $isTrustedGetRuntimeType: 1, - $isbool: 1 - }; - J.JSNull.prototype = { - $eq(receiver, other) { - return null == other; - }, - toString$0(receiver) { - return "null"; - }, - get$hashCode(receiver) { - return 0; - }, - get$runtimeType(receiver) { - return A.createRuntimeType(type$.Null); - }, - $isTrustedGetRuntimeType: 1, - $isNull: 1 - }; - J.JavaScriptObject.prototype = {$isJSObject: 1}; - J.LegacyJavaScriptObject.prototype = { - get$hashCode(receiver) { - return 0; - }, - toString$0(receiver) { - return String(receiver); - }, - $isPromise: 1, - $isJsSystemError: 1, - $isImmutableList: 1, - $is_ConstructionOptions: 1, - $is_ChannelOptions: 1, - $is_ToGamutOptions: 1, - $is_InterpolationOptions: 1, - $is_NodeSassColor: 1, - $isCompileOptions: 1, - $isCompileStringOptions: 1, - $isNodeCompileResult: 1, - $isDeprecation1: 1, - $is_NodeException: 1, - $isJSExpressionVisitorObject: 1, - $isFiber: 1, - $isJSFunction0: 1, - $isImmutableList0: 1, - $isImmutableMap0: 1, - $isJSImporter: 1, - $isJSImporterResult: 1, - $isNodeImporterResult0: 1, - $is_ConstructorOptions: 1, - $is_NodeSassList: 1, - $isWarnOptions: 1, - $isDebugOptions: 1, - $is_NodeSassMap: 1, - $is_ConstructorOptions0: 1, - $is_NodeSassNumber: 1, - $isParserExports: 1, - $isJSClass0: 1, - $isRenderContextOptions0: 1, - $isRenderOptions: 1, - $isRenderResult: 1, - $isJSSet: 1, - $isJSStatementVisitorObject: 1, - $is_ConstructorOptions1: 1, - $is_NodeSassString: 1, - $isJSUrl0: 1, - get$isTTY(obj) { - return obj.isTTY; - }, - get$write(obj) { - return obj.write; - }, - write$1(receiver, p0) { - return receiver.write(p0); - }, - createInterface$1(receiver, p0) { - return receiver.createInterface(p0); - }, - on$2(receiver, p0, p1) { - return receiver.on(p0, p1); - }, - get$close(obj) { - return obj.close; - }, - close$0(receiver) { - return receiver.close(); - }, - setPrompt$1(receiver, p0) { - return receiver.setPrompt(p0); - }, - get$length(obj) { - return obj.length; - }, - toString$0(receiver) { - return receiver.toString(); - }, - get$debug(obj) { - return obj.debug; - }, - debug$2(receiver, p0, p1) { - return receiver.debug(p0, p1); - }, - get$error(obj) { - return obj.error; - }, - error$1(receiver, p0) { - return receiver.error(p0); - }, - error$2(receiver, p0, p1) { - return receiver.error(p0, p1); - }, - log$1(receiver, p0) { - return receiver.log(p0); - }, - get$warn(obj) { - return obj.warn; - }, - warn$1(receiver, p0) { - return receiver.warn(p0); - }, - warn$2(receiver, p0, p1) { - return receiver.warn(p0, p1); - }, - existsSync$1(receiver, p0) { - return receiver.existsSync(p0); - }, - mkdirSync$1(receiver, p0) { - return receiver.mkdirSync(p0); - }, - readdirSync$1(receiver, p0) { - return receiver.readdirSync(p0); - }, - readFileSync$2(receiver, p0, p1) { - return receiver.readFileSync(p0, p1); - }, - statSync$1(receiver, p0) { - return receiver.statSync(p0); - }, - unlinkSync$1(receiver, p0) { - return receiver.unlinkSync(p0); - }, - watch$2(receiver, p0, p1) { - return receiver.watch(p0, p1); - }, - writeFileSync$2(receiver, p0, p1) { - return receiver.writeFileSync(p0, p1); - }, - get$path(obj) { - return obj.path; - }, - isDirectory$0(receiver) { - return receiver.isDirectory(); - }, - isFile$0(receiver) { - return receiver.isFile(); - }, - get$mtime(obj) { - return obj.mtime; - }, - then$1$1(receiver, p0) { - return receiver.then(p0); - }, - then$2(receiver, p0, p1) { - return receiver.then(p0, p1); - }, - getTime$0(receiver) { - return receiver.getTime(); - }, - get$message(obj) { - return obj.message; - }, - message$1(receiver, p0) { - return receiver.message(p0); - }, - get$filename(obj) { - return obj.filename; - }, - get$id(obj) { - return obj.id; - }, - get$code(obj) { - return obj.code; - }, - get$syscall(obj) { - return obj.syscall; - }, - get$argv(obj) { - return obj.argv; - }, - get$env(obj) { - return obj.env; - }, - get$exitCode(obj) { - return obj.exitCode; - }, - set$exitCode(obj, v) { - return obj.exitCode = v; - }, - get$platform(obj) { - return obj.platform; - }, - get$release(obj) { - return obj.release; - }, - get$stderr(obj) { - return obj.stderr; - }, - get$stdin(obj) { - return obj.stdin; - }, - get$stdout(obj) { - return obj.stdout; - }, - get$name(obj) { - return obj.name; - }, - push$1(receiver, p0) { - return receiver.push(p0); - }, - call$0(receiver) { - return receiver.call(); - }, - call$1(receiver, p0) { - return receiver.call(p0); - }, - call$2(receiver, p0, p1) { - return receiver.call(p0, p1); - }, - call$3$1(receiver, p0) { - return receiver.call(p0); - }, - call$2$1(receiver, p0) { - return receiver.call(p0); - }, - call$1$1(receiver, p0) { - return receiver.call(p0); - }, - call$3(receiver, p0, p1, p2) { - return receiver.call(p0, p1, p2); - }, - call$3$3(receiver, p0, p1, p2) { - return receiver.call(p0, p1, p2); - }, - call$2$2(receiver, p0, p1) { - return receiver.call(p0, p1); - }, - call$2$0(receiver) { - return receiver.call(); - }, - call$1$0(receiver) { - return receiver.call(); - }, - call$1$2(receiver, p0, p1) { - return receiver.call(p0, p1); - }, - call$2$3(receiver, p0, p1, p2) { - return receiver.call(p0, p1, p2); - }, - apply$2(receiver, p0, p1) { - return receiver.apply(p0, p1); - }, - toArray$0(receiver) { - return receiver.toArray(); - }, - asMutable$0(receiver) { - return receiver.asMutable(); - }, - asImmutable$0(receiver) { - return receiver.asImmutable(); - }, - $set$2(receiver, p0, p1) { - return receiver.set(p0, p1); - }, - forEach$1(receiver, p0) { - return receiver.forEach(p0); - }, - get$file(obj) { - return obj.file; - }, - get$contents(obj) { - return obj.contents; - }, - get$options(obj) { - return obj.options; - }, - get$data(obj) { - return obj.data; - }, - get$includePaths(obj) { - return obj.includePaths; - }, - get$style(obj) { - return obj.style; - }, - get$indentType(obj) { - return obj.indentType; - }, - get$indentWidth(obj) { - return obj.indentWidth; - }, - get$linefeed(obj) { - return obj.linefeed; - }, - set$context(obj, v) { - return obj.context = v; - }, - createRequire$1(receiver, p0) { - return receiver.createRequire(p0); - }, - resolve$1(receiver, p0) { - return receiver.resolve(p0); - }, - get$$prototype(obj) { - return obj.prototype; - }, - get$red(obj) { - return obj.red; - }, - get$green(obj) { - return obj.green; - }, - get$blue(obj) { - return obj.blue; - }, - get$hue(obj) { - return obj.hue; - }, - get$saturation(obj) { - return obj.saturation; - }, - get$lightness(obj) { - return obj.lightness; - }, - get$whiteness(obj) { - return obj.whiteness; - }, - get$blackness(obj) { - return obj.blackness; - }, - get$alpha(obj) { - return obj.alpha; - }, - get$a(obj) { - return obj.a; - }, - get$b(obj) { - return obj.b; - }, - get$x(obj) { - return obj.x; - }, - get$y(obj) { - return obj.y; - }, - get$z(obj) { - return obj.z; - }, - get$chroma(obj) { - return obj.chroma; - }, - get$space(obj) { - return obj.space; - }, - get$method(obj) { - return obj.method; - }, - get$weight(obj) { - return obj.weight; - }, - get$dartValue(obj) { - return obj.dartValue; - }, - set$dartValue(obj, v) { - return obj.dartValue = v; - }, - get$alertAscii(obj) { - return obj.alertAscii; - }, - get$alertColor(obj) { - return obj.alertColor; - }, - get$loadPaths(obj) { - return obj.loadPaths; - }, - get$quietDeps(obj) { - return obj.quietDeps; - }, - get$verbose(obj) { - return obj.verbose; - }, - get$charset(obj) { - return obj.charset; - }, - get$sourceMap(obj) { - return obj.sourceMap; - }, - get$sourceMapIncludeSources(obj) { - return obj.sourceMapIncludeSources; - }, - get$logger(obj) { - return obj.logger; - }, - get$importers(obj) { - return obj.importers; - }, - get$functions(obj) { - return obj.functions; - }, - get$fatalDeprecations(obj) { - return obj.fatalDeprecations; - }, - get$silenceDeprecations(obj) { - return obj.silenceDeprecations; - }, - get$futureDeprecations(obj) { - return obj.futureDeprecations; - }, - get$syntax(obj) { - return obj.syntax; - }, - get$url(obj) { - return obj.url; - }, - get$importer(obj) { - return obj.importer; - }, - get$_dartException(obj) { - return obj._dartException; - }, - set$renderSync(obj, v) { - return obj.renderSync = v; - }, - set$compileString(obj, v) { - return obj.compileString = v; - }, - set$compileStringAsync(obj, v) { - return obj.compileStringAsync = v; - }, - set$compile(obj, v) { - return obj.compile = v; - }, - set$compileAsync(obj, v) { - return obj.compileAsync = v; - }, - set$initCompiler(obj, v) { - return obj.initCompiler = v; - }, - set$initAsyncCompiler(obj, v) { - return obj.initAsyncCompiler = v; - }, - set$Compiler(obj, v) { - return obj.Compiler = v; - }, - set$AsyncCompiler(obj, v) { - return obj.AsyncCompiler = v; - }, - set$info(obj, v) { - return obj.info = v; - }, - set$Exception(obj, v) { - return obj.Exception = v; - }, - set$Logger(obj, v) { - return obj.Logger = v; - }, - set$NodePackageImporter(obj, v) { - return obj.NodePackageImporter = v; - }, - set$deprecations(obj, v) { - return obj.deprecations = v; - }, - set$Version(obj, v) { - return obj.Version = v; - }, - set$Value(obj, v) { - return obj.Value = v; - }, - set$SassArgumentList(obj, v) { - return obj.SassArgumentList = v; - }, - set$SassCalculation(obj, v) { - return obj.SassCalculation = v; - }, - set$CalculationOperation(obj, v) { - return obj.CalculationOperation = v; - }, - set$CalculationInterpolation(obj, v) { - return obj.CalculationInterpolation = v; - }, - set$SassBoolean(obj, v) { - return obj.SassBoolean = v; - }, - set$SassColor(obj, v) { - return obj.SassColor = v; - }, - set$SassFunction(obj, v) { - return obj.SassFunction = v; - }, - set$SassMixin(obj, v) { - return obj.SassMixin = v; - }, - set$SassList(obj, v) { - return obj.SassList = v; - }, - set$SassMap(obj, v) { - return obj.SassMap = v; - }, - set$SassNumber(obj, v) { - return obj.SassNumber = v; - }, - set$SassString(obj, v) { - return obj.SassString = v; - }, - set$sassNull(obj, v) { - return obj.sassNull = v; - }, - set$sassTrue(obj, v) { - return obj.sassTrue = v; - }, - set$sassFalse(obj, v) { - return obj.sassFalse = v; - }, - set$render(obj, v) { - return obj.render = v; - }, - set$types(obj, v) { - return obj.types = v; - }, - set$NULL(obj, v) { - return obj.NULL = v; - }, - set$TRUE(obj, v) { - return obj.TRUE = v; - }, - set$FALSE(obj, v) { - return obj.FALSE = v; - }, - set$loadParserExports_(obj, v) { - return obj.loadParserExports_ = v; - }, - visitBinaryOperationExpression$1(receiver, p0) { - return receiver.visitBinaryOperationExpression(p0); - }, - visitBooleanExpression$1(receiver, p0) { - return receiver.visitBooleanExpression(p0); - }, - visitColorExpression$1(receiver, p0) { - return receiver.visitColorExpression(p0); - }, - visitInterpolatedFunctionExpression$1(receiver, p0) { - return receiver.visitInterpolatedFunctionExpression(p0); - }, - visitFunctionExpression$1(receiver, p0) { - return receiver.visitFunctionExpression(p0); - }, - visitIfExpression$1(receiver, p0) { - return receiver.visitIfExpression(p0); - }, - visitListExpression$1(receiver, p0) { - return receiver.visitListExpression(p0); - }, - visitMapExpression$1(receiver, p0) { - return receiver.visitMapExpression(p0); - }, - visitNullExpression$1(receiver, p0) { - return receiver.visitNullExpression(p0); - }, - visitNumberExpression$1(receiver, p0) { - return receiver.visitNumberExpression(p0); - }, - visitParenthesizedExpression$1(receiver, p0) { - return receiver.visitParenthesizedExpression(p0); - }, - visitSelectorExpression$1(receiver, p0) { - return receiver.visitSelectorExpression(p0); - }, - visitStringExpression$1(receiver, p0) { - return receiver.visitStringExpression(p0); - }, - visitSupportsExpression$1(receiver, p0) { - return receiver.visitSupportsExpression(p0); - }, - visitUnaryOperationExpression$1(receiver, p0) { - return receiver.visitUnaryOperationExpression(p0); - }, - visitValueExpression$1(receiver, p0) { - return receiver.visitValueExpression(p0); - }, - visitVariableExpression$1(receiver, p0) { - return receiver.visitVariableExpression(p0); - }, - get$current(obj) { - return obj.current; - }, - yield$0(receiver) { - return receiver.yield(); - }, - run$1$1(receiver, p0) { - return receiver.run(p0); - }, - run$1(receiver, p0) { - return receiver.run(p0); - }, - run$0(receiver) { - return receiver.run(); - }, - get$canonicalize(obj) { - return obj.canonicalize; - }, - canonicalize$1(receiver, p0) { - return receiver.canonicalize(p0); - }, - get$load(obj) { - return obj.load; - }, - load$1(receiver, p0) { - return receiver.load(p0); - }, - get$findFileUrl(obj) { - return obj.findFileUrl; - }, - get$nonCanonicalScheme(obj) { - return obj.nonCanonicalScheme; - }, - get$sourceMapUrl(obj) { - return obj.sourceMapUrl; - }, - get$separator(obj) { - return obj.separator; - }, - get$brackets(obj) { - return obj.brackets; - }, - get$numeratorUnits(obj) { - return obj.numeratorUnits; - }, - get$denominatorUnits(obj) { - return obj.denominatorUnits; - }, - get$pkgImporter(obj) { - return obj.pkgImporter; - }, - get$indentedSyntax(obj) { - return obj.indentedSyntax; - }, - get$omitSourceMapUrl(obj) { - return obj.omitSourceMapUrl; - }, - get$outFile(obj) { - return obj.outFile; - }, - get$outputStyle(obj) { - return obj.outputStyle; - }, - get$fiber(obj) { - return obj.fiber; - }, - get$sourceMapContents(obj) { - return obj.sourceMapContents; - }, - get$sourceMapEmbed(obj) { - return obj.sourceMapEmbed; - }, - get$sourceMapRoot(obj) { - return obj.sourceMapRoot; - }, - set$cli_pkg_main_0_(obj, v) { - return obj.cli_pkg_main_0_ = v; - }, - visitAtRootRule$1(receiver, p0) { - return receiver.visitAtRootRule(p0); - }, - visitAtRule$1(receiver, p0) { - return receiver.visitAtRule(p0); - }, - get$visitContentBlock(obj) { - return obj.visitContentBlock; - }, - visitContentBlock$1(receiver, p0) { - return receiver.visitContentBlock(p0); - }, - visitContentRule$1(receiver, p0) { - return receiver.visitContentRule(p0); - }, - visitDebugRule$1(receiver, p0) { - return receiver.visitDebugRule(p0); - }, - visitDeclaration$1(receiver, p0) { - return receiver.visitDeclaration(p0); - }, - visitEachRule$1(receiver, p0) { - return receiver.visitEachRule(p0); - }, - visitErrorRule$1(receiver, p0) { - return receiver.visitErrorRule(p0); - }, - visitExtendRule$1(receiver, p0) { - return receiver.visitExtendRule(p0); - }, - visitForRule$1(receiver, p0) { - return receiver.visitForRule(p0); - }, - visitForwardRule$1(receiver, p0) { - return receiver.visitForwardRule(p0); - }, - visitFunctionRule$1(receiver, p0) { - return receiver.visitFunctionRule(p0); - }, - visitIfRule$1(receiver, p0) { - return receiver.visitIfRule(p0); - }, - visitImportRule$1(receiver, p0) { - return receiver.visitImportRule(p0); - }, - visitIncludeRule$1(receiver, p0) { - return receiver.visitIncludeRule(p0); - }, - visitLoudComment$1(receiver, p0) { - return receiver.visitLoudComment(p0); - }, - visitMediaRule$1(receiver, p0) { - return receiver.visitMediaRule(p0); - }, - visitMixinRule$1(receiver, p0) { - return receiver.visitMixinRule(p0); - }, - visitReturnRule$1(receiver, p0) { - return receiver.visitReturnRule(p0); - }, - visitSilentComment$1(receiver, p0) { - return receiver.visitSilentComment(p0); - }, - visitStyleRule$1(receiver, p0) { - return receiver.visitStyleRule(p0); - }, - visitStylesheet$1(receiver, p0) { - return receiver.visitStylesheet(p0); - }, - visitSupportsRule$1(receiver, p0) { - return receiver.visitSupportsRule(p0); - }, - visitUseRule$1(receiver, p0) { - return receiver.visitUseRule(p0); - }, - visitVariableDeclaration$1(receiver, p0) { - return receiver.visitVariableDeclaration(p0); - }, - visitWarnRule$1(receiver, p0) { - return receiver.visitWarnRule(p0); - }, - visitWhileRule$1(receiver, p0) { - return receiver.visitWhileRule(p0); - }, - get$quotes(obj) { - return obj.quotes; - } - }; - J.PlainJavaScriptObject.prototype = {}; - J.UnknownJavaScriptObject.prototype = {}; - J.JavaScriptFunction.prototype = { - toString$0(receiver) { - var dartClosure = receiver[$.$get$DART_CLOSURE_PROPERTY_NAME()]; - if (dartClosure == null) - return this.super$LegacyJavaScriptObject$toString(receiver); - return "JavaScript function for " + A.S(J.toString$0$(dartClosure)); - }, - $isFunction: 1 - }; - J.JavaScriptBigInt.prototype = { - get$hashCode(receiver) { - return 0; - }, - toString$0(receiver) { - return String(receiver); - } - }; - J.JavaScriptSymbol.prototype = { - get$hashCode(receiver) { - return 0; - }, - toString$0(receiver) { - return String(receiver); - } - }; - J.JSArray.prototype = { - cast$1$0(receiver, $R) { - return new A.CastList(receiver, A._arrayInstanceType(receiver)._eval$1("@<1>")._bind$1($R)._eval$1("CastList<1,2>")); - }, - add$1(receiver, value) { - if (!!receiver.fixed$length) - A.throwExpression(A.UnsupportedError$("add")); - receiver.push(value); - }, - removeAt$1(receiver, index) { - var t1; - if (!!receiver.fixed$length) - A.throwExpression(A.UnsupportedError$("removeAt")); - t1 = receiver.length; - if (index >= t1) - throw A.wrapException(A.RangeError$value(index, null, null)); - return receiver.splice(index, 1)[0]; - }, - insert$2(receiver, index, value) { - var t1; - if (!!receiver.fixed$length) - A.throwExpression(A.UnsupportedError$("insert")); - t1 = receiver.length; - if (index > t1) - throw A.wrapException(A.RangeError$value(index, null, null)); - receiver.splice(index, 0, value); - }, - insertAll$2(receiver, index, iterable) { - var insertionLength, end; - if (!!receiver.fixed$length) - A.throwExpression(A.UnsupportedError$("insertAll")); - A.RangeError_checkValueInInterval(index, 0, receiver.length, "index"); - if (!type$.EfficientLengthIterable_dynamic._is(iterable)) - iterable = J.toList$0$ax(iterable); - insertionLength = J.get$length$asx(iterable); - receiver.length = receiver.length + insertionLength; - end = index + insertionLength; - this.setRange$4(receiver, end, receiver.length, receiver, index); - this.setRange$3(receiver, index, end, iterable); - }, - removeLast$0(receiver) { - if (!!receiver.fixed$length) - A.throwExpression(A.UnsupportedError$("removeLast")); - if (receiver.length === 0) - throw A.wrapException(A.diagnoseIndexError(receiver, -1)); - return receiver.pop(); - }, - _removeWhere$2(receiver, test, removeMatching) { - var i, element, t1, retained = [], - end = receiver.length; - for (i = 0; i < end; ++i) { - element = receiver[i]; - if (!test.call$1(element)) - retained.push(element); - if (receiver.length !== end) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } - t1 = retained.length; - if (t1 === end) - return; - this.set$length(receiver, t1); - for (i = 0; i < retained.length; ++i) - receiver[i] = retained[i]; - }, - where$1(receiver, f) { - return new A.WhereIterable(receiver, f, A._arrayInstanceType(receiver)._eval$1("WhereIterable<1>")); - }, - expand$1$1(receiver, f, $T) { - return new A.ExpandIterable(receiver, f, A._arrayInstanceType(receiver)._eval$1("@<1>")._bind$1($T)._eval$1("ExpandIterable<1,2>")); - }, - addAll$1(receiver, collection) { - var t1; - if (!!receiver.fixed$length) - A.throwExpression(A.UnsupportedError$("addAll")); - if (Array.isArray(collection)) { - this._addAllFromArray$1(receiver, collection); - return; - } - for (t1 = J.get$iterator$ax(collection); t1.moveNext$0();) - receiver.push(t1.get$current(t1)); - }, - _addAllFromArray$1(receiver, array) { - var i, - len = array.length; - if (len === 0) - return; - if (receiver === array) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - for (i = 0; i < len; ++i) - receiver.push(array[i]); - }, - clear$0(receiver) { - if (!!receiver.fixed$length) - A.throwExpression(A.UnsupportedError$("clear")); - receiver.length = 0; - }, - forEach$1(receiver, f) { - var i, - end = receiver.length; - for (i = 0; i < end; ++i) { - f.call$1(receiver[i]); - if (receiver.length !== end) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } - }, - map$1$1(receiver, f, $T) { - return new A.MappedListIterable(receiver, f, A._arrayInstanceType(receiver)._eval$1("@<1>")._bind$1($T)._eval$1("MappedListIterable<1,2>")); - }, - join$1(receiver, separator) { - var i, - list = A.List_List$filled(receiver.length, "", false, type$.String); - for (i = 0; i < receiver.length; ++i) - list[i] = A.S(receiver[i]); - return list.join(separator); - }, - join$0(receiver) { - return this.join$1(receiver, ""); - }, - take$1(receiver, n) { - return A.SubListIterable$(receiver, 0, A.checkNotNullable(n, "count", type$.int), A._arrayInstanceType(receiver)._precomputed1); - }, - skip$1(receiver, n) { - return A.SubListIterable$(receiver, n, null, A._arrayInstanceType(receiver)._precomputed1); - }, - fold$1$2(receiver, initialValue, combine) { - var value, i, - $length = receiver.length; - for (value = initialValue, i = 0; i < $length; ++i) { - value = combine.call$2(value, receiver[i]); - if (receiver.length !== $length) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } - return value; - }, - fold$2(receiver, initialValue, combine) { - return this.fold$1$2(receiver, initialValue, combine, type$.dynamic); - }, - firstWhere$1(receiver, test) { - var i, element, - end = receiver.length; - for (i = 0; i < end; ++i) { - element = receiver[i]; - if (test.call$1(element)) - return element; - if (receiver.length !== end) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } - throw A.wrapException(A.IterableElementError_noElement()); - }, - elementAt$1(receiver, index) { - return receiver[index]; - }, - sublist$2(receiver, start, end) { - var end0 = receiver.length; - if (start > end0) - throw A.wrapException(A.RangeError$range(start, 0, end0, "start", null)); - if (end == null) - end = end0; - else if (end < start || end > end0) - throw A.wrapException(A.RangeError$range(end, start, end0, "end", null)); - if (start === end) - return A._setArrayType([], A._arrayInstanceType(receiver)); - return A._setArrayType(receiver.slice(start, end), A._arrayInstanceType(receiver)); - }, - sublist$1(receiver, start) { - return this.sublist$2(receiver, start, null); - }, - getRange$2(receiver, start, end) { - A.RangeError_checkValidRange(start, end, receiver.length); - return A.SubListIterable$(receiver, start, end, A._arrayInstanceType(receiver)._precomputed1); - }, - get$first(receiver) { - if (receiver.length > 0) - return receiver[0]; - throw A.wrapException(A.IterableElementError_noElement()); - }, - get$last(receiver) { - var t1 = receiver.length; - if (t1 > 0) - return receiver[t1 - 1]; - throw A.wrapException(A.IterableElementError_noElement()); - }, - get$single(receiver) { - var t1 = receiver.length; - if (t1 === 1) - return receiver[0]; - if (t1 === 0) - throw A.wrapException(A.IterableElementError_noElement()); - throw A.wrapException(A.IterableElementError_tooMany()); - }, - removeRange$2(receiver, start, end) { - if (!!receiver.fixed$length) - A.throwExpression(A.UnsupportedError$("removeRange")); - A.RangeError_checkValidRange(start, end, receiver.length); - receiver.splice(start, end - start); - }, - setRange$4(receiver, start, end, iterable, skipCount) { - var $length, otherList, otherStart, t1, i; - if (!!receiver.immutable$list) - A.throwExpression(A.UnsupportedError$("setRange")); - A.RangeError_checkValidRange(start, end, receiver.length); - $length = end - start; - if ($length === 0) - return; - A.RangeError_checkNotNegative(skipCount, "skipCount"); - if (type$.List_dynamic._is(iterable)) { - otherList = iterable; - otherStart = skipCount; - } else { - otherList = J.skip$1$ax(iterable, skipCount).toList$1$growable(0, false); - otherStart = 0; - } - t1 = J.getInterceptor$asx(otherList); - if (otherStart + $length > t1.get$length(otherList)) - throw A.wrapException(A.IterableElementError_tooFew()); - if (otherStart < start) - for (i = $length - 1; i >= 0; --i) - receiver[start + i] = t1.$index(otherList, otherStart + i); - else - for (i = 0; i < $length; ++i) - receiver[start + i] = t1.$index(otherList, otherStart + i); - }, - setRange$3(receiver, start, end, iterable) { - return this.setRange$4(receiver, start, end, iterable, 0); - }, - fillRange$3(receiver, start, end, fillValue) { - var i; - if (!!receiver.immutable$list) - A.throwExpression(A.UnsupportedError$("fill range")); - A.RangeError_checkValidRange(start, end, receiver.length); - A._arrayInstanceType(receiver)._precomputed1._as(fillValue); - for (i = start; i < end; ++i) - receiver[i] = fillValue; - }, - any$1(receiver, test) { - var i, - end = receiver.length; - for (i = 0; i < end; ++i) { - if (test.call$1(receiver[i])) - return true; - if (receiver.length !== end) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } - return false; - }, - every$1(receiver, test) { - var i, - end = receiver.length; - for (i = 0; i < end; ++i) { - if (!test.call$1(receiver[i])) - return false; - if (receiver.length !== end) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } - return true; - }, - get$reversed(receiver) { - return new A.ReversedListIterable(receiver, A._arrayInstanceType(receiver)._eval$1("ReversedListIterable<1>")); - }, - sort$1(receiver, compare) { - var len, a, b, undefineds, i; - if (!!receiver.immutable$list) - A.throwExpression(A.UnsupportedError$("sort")); - len = receiver.length; - if (len < 2) - return; - if (compare == null) - compare = J._interceptors_JSArray__compareAny$closure(); - if (len === 2) { - a = receiver[0]; - b = receiver[1]; - if (compare.call$2(a, b) > 0) { - receiver[0] = b; - receiver[1] = a; - } - return; - } - undefineds = 0; - if (A._arrayInstanceType(receiver)._precomputed1._is(null)) - for (i = 0; i < receiver.length; ++i) - if (receiver[i] === void 0) { - receiver[i] = null; - ++undefineds; - } - receiver.sort(A.convertDartClosureToJS(compare, 2)); - if (undefineds > 0) - this._replaceSomeNullsWithUndefined$1(receiver, undefineds); - }, - sort$0(receiver) { - return this.sort$1(receiver, null); - }, - _replaceSomeNullsWithUndefined$1(receiver, count) { - var i0, - i = receiver.length; - for (; i0 = i - 1, i > 0; i = i0) - if (receiver[i0] === null) { - receiver[i0] = void 0; - --count; - if (count === 0) - break; - } - }, - indexOf$1(receiver, element) { - var i, - $length = receiver.length; - if (0 >= $length) - return -1; - for (i = 0; i < $length; ++i) - if (J.$eq$(receiver[i], element)) - return i; - return -1; - }, - contains$1(receiver, other) { - var i; - for (i = 0; i < receiver.length; ++i) - if (J.$eq$(receiver[i], other)) - return true; - return false; - }, - get$isEmpty(receiver) { - return receiver.length === 0; - }, - get$isNotEmpty(receiver) { - return receiver.length !== 0; - }, - toString$0(receiver) { - return A.Iterable_iterableToFullString(receiver, "[", "]"); - }, - toList$1$growable(receiver, growable) { - var t1 = A._setArrayType(receiver.slice(0), A._arrayInstanceType(receiver)); - return t1; - }, - toList$0(receiver) { - return this.toList$1$growable(receiver, true); - }, - toSet$0(receiver) { - return A.LinkedHashSet_LinkedHashSet$from(receiver, A._arrayInstanceType(receiver)._precomputed1); - }, - get$iterator(receiver) { - return new J.ArrayIterator(receiver, receiver.length, A._arrayInstanceType(receiver)._eval$1("ArrayIterator<1>")); - }, - get$hashCode(receiver) { - return A.Primitives_objectHashCode(receiver); - }, - get$length(receiver) { - return receiver.length; - }, - set$length(receiver, newLength) { - if (!!receiver.fixed$length) - A.throwExpression(A.UnsupportedError$("set length")); - if (newLength < 0) - throw A.wrapException(A.RangeError$range(newLength, 0, null, "newLength", null)); - if (newLength > receiver.length) - A._arrayInstanceType(receiver)._precomputed1._as(null); - receiver.length = newLength; - }, - $index(receiver, index) { - if (!(index >= 0 && index < receiver.length)) - throw A.wrapException(A.diagnoseIndexError(receiver, index)); - return receiver[index]; - }, - $indexSet(receiver, index, value) { - if (!!receiver.immutable$list) - A.throwExpression(A.UnsupportedError$("indexed set")); - if (!(index >= 0 && index < receiver.length)) - throw A.wrapException(A.diagnoseIndexError(receiver, index)); - receiver[index] = value; - }, - $add(receiver, other) { - var t1 = A.List_List$of(receiver, true, A._arrayInstanceType(receiver)._precomputed1); - this.addAll$1(t1, other); - return t1; - }, - indexWhere$1(receiver, test) { - var i; - if (0 >= receiver.length) - return -1; - for (i = 0; i < receiver.length; ++i) - if (test.call$1(receiver[i])) - return i; - return -1; - }, - $isEfficientLengthIterable: 1, - $isIterable: 1, - $isList: 1 - }; - J.JSUnmodifiableArray.prototype = {}; - J.ArrayIterator.prototype = { - get$current(_) { - var t1 = this._current; - return t1 == null ? this.$ti._precomputed1._as(t1) : t1; - }, - moveNext$0() { - var t2, _this = this, - t1 = _this._iterable, - $length = t1.length; - if (_this._length !== $length) - throw A.wrapException(A.throwConcurrentModificationError(t1)); - t2 = _this._index; - if (t2 >= $length) { - _this._current = null; - return false; - } - _this._current = t1[t2]; - _this._index = t2 + 1; - return true; - } - }; - J.JSNumber.prototype = { - compareTo$1(receiver, b) { - var bIsNegative; - if (receiver < b) - return -1; - else if (receiver > b) - return 1; - else if (receiver === b) { - if (receiver === 0) { - bIsNegative = this.get$isNegative(b); - if (this.get$isNegative(receiver) === bIsNegative) - return 0; - if (this.get$isNegative(receiver)) - return -1; - return 1; - } - return 0; - } else if (isNaN(receiver)) { - if (isNaN(b)) - return 0; - return 1; - } else - return -1; - }, - get$isNegative(receiver) { - return receiver === 0 ? 1 / receiver < 0 : receiver < 0; - }, - get$sign(receiver) { - var t1; - if (receiver > 0) - t1 = 1; - else - t1 = receiver < 0 ? -1 : receiver; - return t1; - }, - ceil$0(receiver) { - var truncated, d; - if (receiver >= 0) { - if (receiver <= 2147483647) { - truncated = receiver | 0; - return receiver === truncated ? truncated : truncated + 1; - } - } else if (receiver >= -2147483648) - return receiver | 0; - d = Math.ceil(receiver); - if (isFinite(d)) - return d; - throw A.wrapException(A.UnsupportedError$("" + receiver + ".ceil()")); - }, - floor$0(receiver) { - var truncated, d; - if (receiver >= 0) { - if (receiver <= 2147483647) - return receiver | 0; - } else if (receiver >= -2147483648) { - truncated = receiver | 0; - return receiver === truncated ? truncated : truncated - 1; - } - d = Math.floor(receiver); - if (isFinite(d)) - return d; - throw A.wrapException(A.UnsupportedError$("" + receiver + ".floor()")); - }, - round$0(receiver) { - if (receiver > 0) { - if (receiver !== 1 / 0) - return Math.round(receiver); - } else if (receiver > -1 / 0) - return 0 - Math.round(0 - receiver); - throw A.wrapException(A.UnsupportedError$("" + receiver + ".round()")); - }, - clamp$2(receiver, lowerLimit, upperLimit) { - if (this.compareTo$1(lowerLimit, upperLimit) > 0) - throw A.wrapException(A.argumentErrorValue(lowerLimit)); - if (this.compareTo$1(receiver, lowerLimit) < 0) - return lowerLimit; - if (this.compareTo$1(receiver, upperLimit) > 0) - return upperLimit; - return receiver; - }, - toRadixString$1(receiver, radix) { - var result, match, exponent, t1; - if (radix < 2 || radix > 36) - throw A.wrapException(A.RangeError$range(radix, 2, 36, "radix", null)); - result = receiver.toString(radix); - if (result.charCodeAt(result.length - 1) !== 41) - return result; - match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result); - if (match == null) - A.throwExpression(A.UnsupportedError$("Unexpected toString result: " + result)); - result = match[1]; - exponent = +match[3]; - t1 = match[2]; - if (t1 != null) { - result += t1; - exponent -= t1.length; - } - return result + B.JSString_methods.$mul("0", exponent); - }, - toString$0(receiver) { - if (receiver === 0 && 1 / receiver < 0) - return "-0.0"; - else - return "" + receiver; - }, - get$hashCode(receiver) { - var absolute, floorLog2, factor, scaled, - intValue = receiver | 0; - if (receiver === intValue) - return intValue & 536870911; - absolute = Math.abs(receiver); - floorLog2 = Math.log(absolute) / 0.6931471805599453 | 0; - factor = Math.pow(2, floorLog2); - scaled = absolute < 1 ? absolute / factor : factor / absolute; - return ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259 & 536870911; - }, - $mod(receiver, other) { - var result = receiver % other; - if (result === 0) - return 0; - if (result > 0) - return result; - if (other < 0) - return result - other; - else - return result + other; - }, - $tdiv(receiver, other) { - if ((receiver | 0) === receiver) - if (other >= 1 || other < -1) - return receiver / other | 0; - return this._tdivSlow$1(receiver, other); - }, - _tdivFast$1(receiver, other) { - return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow$1(receiver, other); - }, - _tdivSlow$1(receiver, other) { - var quotient = receiver / other; - if (quotient >= -2147483648 && quotient <= 2147483647) - return quotient | 0; - if (quotient > 0) { - if (quotient !== 1 / 0) - return Math.floor(quotient); - } else if (quotient > -1 / 0) - return Math.ceil(quotient); - throw A.wrapException(A.UnsupportedError$("Result of truncating division is " + A.S(quotient) + ": " + A.S(receiver) + " ~/ " + other)); - }, - _shrOtherPositive$1(receiver, other) { - var t1; - if (receiver > 0) - t1 = this._shrBothPositive$1(receiver, other); - else { - t1 = other > 31 ? 31 : other; - t1 = receiver >> t1 >>> 0; - } - return t1; - }, - _shrReceiverPositive$1(receiver, other) { - if (0 > other) - throw A.wrapException(A.argumentErrorValue(other)); - return this._shrBothPositive$1(receiver, other); - }, - _shrBothPositive$1(receiver, other) { - return other > 31 ? 0 : receiver >>> other; - }, - get$runtimeType(receiver) { - return A.createRuntimeType(type$.num); - }, - $isComparable: 1, - $isdouble: 1, - $isnum: 1 - }; - J.JSInt.prototype = { - get$sign(receiver) { - var t1; - if (receiver > 0) - t1 = 1; - else - t1 = receiver < 0 ? -1 : receiver; - return t1; - }, - get$runtimeType(receiver) { - return A.createRuntimeType(type$.int); - }, - $isTrustedGetRuntimeType: 1, - $isint: 1 - }; - J.JSNumNotInt.prototype = { - get$runtimeType(receiver) { - return A.createRuntimeType(type$.double); - }, - $isTrustedGetRuntimeType: 1 - }; - J.JSString.prototype = { - codeUnitAt$1(receiver, index) { - if (index < 0) - throw A.wrapException(A.diagnoseIndexError(receiver, index)); - if (index >= receiver.length) - A.throwExpression(A.diagnoseIndexError(receiver, index)); - return receiver.charCodeAt(index); - }, - allMatches$2(receiver, string, start) { - var t1 = string.length; - if (start > t1) - throw A.wrapException(A.RangeError$range(start, 0, t1, null, null)); - return new A._StringAllMatchesIterable(string, receiver, start); - }, - allMatches$1(receiver, string) { - return this.allMatches$2(receiver, string, 0); - }, - matchAsPrefix$2(receiver, string, start) { - var t1, i, _null = null; - if (start < 0 || start > string.length) - throw A.wrapException(A.RangeError$range(start, 0, string.length, _null, _null)); - t1 = receiver.length; - if (start + t1 > string.length) - return _null; - for (i = 0; i < t1; ++i) - if (string.charCodeAt(start + i) !== receiver.charCodeAt(i)) - return _null; - return new A.StringMatch(start, receiver); - }, - $add(receiver, other) { - return receiver + other; - }, - endsWith$1(receiver, other) { - var otherLength = other.length, - t1 = receiver.length; - if (otherLength > t1) - return false; - return other === this.substring$1(receiver, t1 - otherLength); - }, - replaceFirst$2(receiver, from, to) { - A.RangeError_checkValueInInterval(0, 0, receiver.length, "startIndex"); - return A.stringReplaceFirstUnchecked(receiver, from, to, 0); - }, - split$1(receiver, pattern) { - if (typeof pattern == "string") - return A._setArrayType(receiver.split(pattern), type$.JSArray_String); - else if (pattern instanceof A.JSSyntaxRegExp && pattern.get$_nativeAnchoredVersion().exec("").length - 2 === 0) - return A._setArrayType(receiver.split(pattern._nativeRegExp), type$.JSArray_String); - else - return this._defaultSplit$1(receiver, pattern); - }, - replaceRange$3(receiver, start, end, replacement) { - var e = A.RangeError_checkValidRange(start, end, receiver.length); - return A.stringReplaceRangeUnchecked(receiver, start, e, replacement); - }, - _defaultSplit$1(receiver, pattern) { - var t1, start, $length, match, matchStart, matchEnd, - result = A._setArrayType([], type$.JSArray_String); - for (t1 = J.allMatches$1$s(pattern, receiver), t1 = t1.get$iterator(t1), start = 0, $length = 1; t1.moveNext$0();) { - match = t1.get$current(t1); - matchStart = match.get$start(match); - matchEnd = match.get$end(match); - $length = matchEnd - matchStart; - if ($length === 0 && start === matchStart) - continue; - result.push(this.substring$2(receiver, start, matchStart)); - start = matchEnd; - } - if (start < receiver.length || $length > 0) - result.push(this.substring$1(receiver, start)); - return result; - }, - startsWith$2(receiver, pattern, index) { - var endIndex; - if (index < 0 || index > receiver.length) - throw A.wrapException(A.RangeError$range(index, 0, receiver.length, null, null)); - if (typeof pattern == "string") { - endIndex = index + pattern.length; - if (endIndex > receiver.length) - return false; - return pattern === receiver.substring(index, endIndex); - } - return J.matchAsPrefix$2$s(pattern, receiver, index) != null; - }, - startsWith$1(receiver, pattern) { - return this.startsWith$2(receiver, pattern, 0); - }, - substring$2(receiver, start, end) { - return receiver.substring(start, A.RangeError_checkValidRange(start, end, receiver.length)); - }, - substring$1(receiver, start) { - return this.substring$2(receiver, start, null); - }, - trim$0(receiver) { - var startIndex, t1, endIndex0, - result = receiver.trim(), - endIndex = result.length; - if (endIndex === 0) - return result; - if (result.charCodeAt(0) === 133) { - startIndex = J.JSString__skipLeadingWhitespace(result, 1); - if (startIndex === endIndex) - return ""; - } else - startIndex = 0; - t1 = endIndex - 1; - endIndex0 = result.charCodeAt(t1) === 133 ? J.JSString__skipTrailingWhitespace(result, t1) : endIndex; - if (startIndex === 0 && endIndex0 === endIndex) - return result; - return result.substring(startIndex, endIndex0); - }, - trimLeft$0(receiver) { - var result = receiver.trimStart(); - if (result.length === 0) - return result; - if (result.charCodeAt(0) !== 133) - return result; - return result.substring(J.JSString__skipLeadingWhitespace(result, 1)); - }, - trimRight$0(receiver) { - var t1, - result = receiver.trimEnd(), - endIndex = result.length; - if (endIndex === 0) - return result; - t1 = endIndex - 1; - if (result.charCodeAt(t1) !== 133) - return result; - return result.substring(0, J.JSString__skipTrailingWhitespace(result, t1)); - }, - $mul(receiver, times) { - var s, result; - if (0 >= times) - return ""; - if (times === 1 || receiver.length === 0) - return receiver; - if (times !== times >>> 0) - throw A.wrapException(B.C_OutOfMemoryError); - for (s = receiver, result = ""; true;) { - if ((times & 1) === 1) - result = s + result; - times = times >>> 1; - if (times === 0) - break; - s += s; - } - return result; - }, - padLeft$2(receiver, width, padding) { - var delta = width - receiver.length; - if (delta <= 0) - return receiver; - return this.$mul(padding, delta) + receiver; - }, - padRight$1(receiver, width) { - var delta = width - receiver.length; - if (delta <= 0) - return receiver; - return receiver + this.$mul(" ", delta); - }, - indexOf$2(receiver, pattern, start) { - var t1; - if (start < 0 || start > receiver.length) - throw A.wrapException(A.RangeError$range(start, 0, receiver.length, null, null)); - t1 = receiver.indexOf(pattern, start); - return t1; - }, - indexOf$1(receiver, pattern) { - return this.indexOf$2(receiver, pattern, 0); - }, - lastIndexOf$2(receiver, pattern, start) { - var t1, t2, i; - if (start == null) - start = receiver.length; - else if (start < 0 || start > receiver.length) - throw A.wrapException(A.RangeError$range(start, 0, receiver.length, null, null)); - if (typeof pattern == "string") { - t1 = pattern.length; - t2 = receiver.length; - if (start + t1 > t2) - start = t2 - t1; - return receiver.lastIndexOf(pattern, start); - } - for (t1 = J.getInterceptor$s(pattern), i = start; i >= 0; --i) - if (t1.matchAsPrefix$2(pattern, receiver, i) != null) - return i; - return -1; - }, - lastIndexOf$1(receiver, pattern) { - return this.lastIndexOf$2(receiver, pattern, null); - }, - contains$2(receiver, other, startIndex) { - var t1 = receiver.length; - if (startIndex > t1) - throw A.wrapException(A.RangeError$range(startIndex, 0, t1, null, null)); - return A.stringContainsUnchecked(receiver, other, startIndex); - }, - contains$1(receiver, other) { - return this.contains$2(receiver, other, 0); - }, - compareTo$1(receiver, other) { - var t1; - if (receiver === other) - t1 = 0; - else - t1 = receiver < other ? -1 : 1; - return t1; - }, - toString$0(receiver) { - return receiver; - }, - get$hashCode(receiver) { - var t1, hash, i; - for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) { - hash = hash + receiver.charCodeAt(i) & 536870911; - hash = hash + ((hash & 524287) << 10) & 536870911; - hash ^= hash >> 6; - } - hash = hash + ((hash & 67108863) << 3) & 536870911; - hash ^= hash >> 11; - return hash + ((hash & 16383) << 15) & 536870911; - }, - get$runtimeType(receiver) { - return A.createRuntimeType(type$.String); - }, - get$length(receiver) { - return receiver.length; - }, - $isTrustedGetRuntimeType: 1, - $isComparable: 1, - $isString: 1 - }; - A._CastIterableBase.prototype = { - get$iterator(_) { - return new A.CastIterator(J.get$iterator$ax(this.get$_source()), A._instanceType(this)._eval$1("CastIterator<1,2>")); - }, - get$length(_) { - return J.get$length$asx(this.get$_source()); - }, - get$isEmpty(_) { - return J.get$isEmpty$asx(this.get$_source()); - }, - get$isNotEmpty(_) { - return J.get$isNotEmpty$asx(this.get$_source()); - }, - skip$1(_, count) { - var t1 = A._instanceType(this); - return A.CastIterable_CastIterable(J.skip$1$ax(this.get$_source(), count), t1._precomputed1, t1._rest[1]); - }, - take$1(_, count) { - var t1 = A._instanceType(this); - return A.CastIterable_CastIterable(J.take$1$ax(this.get$_source(), count), t1._precomputed1, t1._rest[1]); - }, - elementAt$1(_, index) { - return A._instanceType(this)._rest[1]._as(J.elementAt$1$ax(this.get$_source(), index)); - }, - get$first(_) { - return A._instanceType(this)._rest[1]._as(J.get$first$ax(this.get$_source())); - }, - get$last(_) { - return A._instanceType(this)._rest[1]._as(J.get$last$ax(this.get$_source())); - }, - get$single(_) { - return A._instanceType(this)._rest[1]._as(J.get$single$ax(this.get$_source())); - }, - contains$1(_, other) { - return J.contains$1$asx(this.get$_source(), other); - }, - toString$0(_) { - return J.toString$0$(this.get$_source()); - } - }; - A.CastIterator.prototype = { - moveNext$0() { - return this._source.moveNext$0(); - }, - get$current(_) { - var t1 = this._source; - return this.$ti._rest[1]._as(t1.get$current(t1)); - } - }; - A.CastIterable.prototype = { - get$_source() { - return this._source; - } - }; - A._EfficientLengthCastIterable.prototype = {$isEfficientLengthIterable: 1}; - A._CastListBase.prototype = { - $index(_, index) { - return this.$ti._rest[1]._as(J.$index$asx(this._source, index)); - }, - $indexSet(_, index, value) { - J.$indexSet$ax(this._source, index, this.$ti._precomputed1._as(value)); - }, - set$length(_, $length) { - J.set$length$asx(this._source, $length); - }, - add$1(_, value) { - J.add$1$ax(this._source, this.$ti._precomputed1._as(value)); - }, - addAll$1(_, values) { - var t1 = this.$ti; - J.addAll$1$ax(this._source, A.CastIterable_CastIterable(values, t1._rest[1], t1._precomputed1)); - }, - sort$1(_, compare) { - var t1 = compare == null ? null : new A._CastListBase_sort_closure(this, compare); - J.sort$1$ax(this._source, t1); - }, - getRange$2(_, start, end) { - var t1 = this.$ti; - return A.CastIterable_CastIterable(J.getRange$2$ax(this._source, start, end), t1._precomputed1, t1._rest[1]); - }, - setRange$4(_, start, end, iterable, skipCount) { - var t1 = this.$ti; - J.setRange$4$ax(this._source, start, end, A.CastIterable_CastIterable(iterable, t1._rest[1], t1._precomputed1), skipCount); - }, - removeRange$2(_, start, end) { - J.removeRange$2$ax(this._source, start, end); - }, - fillRange$3(_, start, end, fillValue) { - J.fillRange$3$ax(this._source, start, end, this.$ti._precomputed1._as(fillValue)); - }, - $isEfficientLengthIterable: 1, - $isList: 1 - }; - A._CastListBase_sort_closure.prototype = { - call$2(v1, v2) { - var t1 = this.$this.$ti._rest[1]; - return this.compare.call$2(t1._as(v1), t1._as(v2)); - }, - $signature() { - return this.$this.$ti._eval$1("int(1,1)"); - } - }; - A.CastList.prototype = { - cast$1$0(_, $R) { - return new A.CastList(this._source, this.$ti._eval$1("@<1>")._bind$1($R)._eval$1("CastList<1,2>")); - }, - get$_source() { - return this._source; - } - }; - A.CastSet.prototype = { - add$1(_, value) { - return this._source.add$1(0, this.$ti._precomputed1._as(value)); - }, - addAll$1(_, elements) { - var t1 = this.$ti; - this._source.addAll$1(0, A.CastIterable_CastIterable(elements, t1._rest[1], t1._precomputed1)); - }, - difference$1(other) { - var _this = this; - if (_this._emptySet != null) - return _this._conditionalAdd$2(other, false); - return new A.CastSet(_this._source.difference$1(other), null, _this.$ti); - }, - _conditionalAdd$2(other, otherContains) { - var t3, castElement, - emptySet = this._emptySet, - t1 = this.$ti, - t2 = t1._rest[1], - result = emptySet == null ? A.LinkedHashSet_LinkedHashSet(t2) : emptySet.call$1$0(t2); - for (t2 = this._source, t2 = t2.get$iterator(t2), t3 = other._source, t1 = t1._rest[1]; t2.moveNext$0();) { - castElement = t1._as(t2.get$current(t2)); - if (otherContains === t3.contains$1(0, castElement)) - result.add$1(0, castElement); - } - return result; - }, - toSet$0(_) { - var emptySet = this._emptySet, - t1 = this.$ti._rest[1], - result = emptySet == null ? A.LinkedHashSet_LinkedHashSet(t1) : emptySet.call$1$0(t1); - result.addAll$1(0, this); - return result; - }, - $isEfficientLengthIterable: 1, - $isSet: 1, - get$_source() { - return this._source; - } - }; - A.CastMap.prototype = { - cast$2$0(_, RK, RV) { - return new A.CastMap(this._source, this.$ti._eval$1("@<1,2>")._bind$1(RK)._bind$1(RV)._eval$1("CastMap<1,2,3,4>")); - }, - containsKey$1(key) { - return this._source.containsKey$1(key); - }, - $index(_, key) { - return this.$ti._eval$1("4?")._as(this._source.$index(0, key)); - }, - $indexSet(_, key, value) { - var t1 = this.$ti; - this._source.$indexSet(0, t1._precomputed1._as(key), t1._rest[1]._as(value)); - }, - addAll$1(_, other) { - this._source.addAll$1(0, new A.CastMap(other, this.$ti._eval$1("CastMap<3,4,1,2>"))); - }, - remove$1(_, key) { - return this.$ti._eval$1("4?")._as(this._source.remove$1(0, key)); - }, - forEach$1(_, f) { - this._source.forEach$1(0, new A.CastMap_forEach_closure(this, f)); - }, - get$keys(_) { - var t1 = this._source, - t2 = this.$ti; - return A.CastIterable_CastIterable(t1.get$keys(t1), t2._precomputed1, t2._rest[2]); - }, - get$values(_) { - var t1 = this._source, - t2 = this.$ti; - return A.CastIterable_CastIterable(t1.get$values(t1), t2._rest[1], t2._rest[3]); - }, - get$length(_) { - var t1 = this._source; - return t1.get$length(t1); - }, - get$isEmpty(_) { - var t1 = this._source; - return t1.get$isEmpty(t1); - }, - get$isNotEmpty(_) { - var t1 = this._source; - return t1.get$isNotEmpty(t1); - }, - get$entries(_) { - var t1 = this._source; - return t1.get$entries(t1).map$1$1(0, new A.CastMap_entries_closure(this), this.$ti._eval$1("MapEntry<3,4>")); - } - }; - A.CastMap_forEach_closure.prototype = { - call$2(key, value) { - var t1 = this.$this.$ti; - this.f.call$2(t1._rest[2]._as(key), t1._rest[3]._as(value)); - }, - $signature() { - return this.$this.$ti._eval$1("~(1,2)"); - } - }; - A.CastMap_entries_closure.prototype = { - call$1(e) { - var t1 = this.$this.$ti; - return new A.MapEntry(t1._rest[2]._as(e.key), t1._rest[3]._as(e.value), t1._eval$1("MapEntry<3,4>")); - }, - $signature() { - return this.$this.$ti._eval$1("MapEntry<3,4>(MapEntry<1,2>)"); - } - }; - A.LateError.prototype = { - toString$0(_) { - return "LateInitializationError: " + this._message; - } - }; - A.CodeUnits.prototype = { - get$length(_) { - return this._string.length; - }, - $index(_, i) { - return this._string.charCodeAt(i); - } - }; - A.nullFuture_closure.prototype = { - call$0() { - return A.Future_Future$value(null, type$.Null); - }, - $signature: 2 - }; - A.SentinelValue.prototype = {}; - A.EfficientLengthIterable.prototype = {}; - A.ListIterable.prototype = { - get$iterator(_) { - var _this = this; - return new A.ListIterator(_this, _this.get$length(_this), A._instanceType(_this)._eval$1("ListIterator")); - }, - get$isEmpty(_) { - return this.get$length(this) === 0; - }, - get$first(_) { - if (this.get$length(this) === 0) - throw A.wrapException(A.IterableElementError_noElement()); - return this.elementAt$1(0, 0); - }, - get$last(_) { - var _this = this; - if (_this.get$length(_this) === 0) - throw A.wrapException(A.IterableElementError_noElement()); - return _this.elementAt$1(0, _this.get$length(_this) - 1); - }, - get$single(_) { - var _this = this; - if (_this.get$length(_this) === 0) - throw A.wrapException(A.IterableElementError_noElement()); - if (_this.get$length(_this) > 1) - throw A.wrapException(A.IterableElementError_tooMany()); - return _this.elementAt$1(0, 0); - }, - contains$1(_, element) { - var i, _this = this, - $length = _this.get$length(_this); - for (i = 0; i < $length; ++i) { - if (J.$eq$(_this.elementAt$1(0, i), element)) - return true; - if ($length !== _this.get$length(_this)) - throw A.wrapException(A.ConcurrentModificationError$(_this)); - } - return false; - }, - every$1(_, test) { - var i, _this = this, - $length = _this.get$length(_this); - for (i = 0; i < $length; ++i) { - if (!test.call$1(_this.elementAt$1(0, i))) - return false; - if ($length !== _this.get$length(_this)) - throw A.wrapException(A.ConcurrentModificationError$(_this)); - } - return true; - }, - any$1(_, test) { - var i, _this = this, - $length = _this.get$length(_this); - for (i = 0; i < $length; ++i) { - if (test.call$1(_this.elementAt$1(0, i))) - return true; - if ($length !== _this.get$length(_this)) - throw A.wrapException(A.ConcurrentModificationError$(_this)); - } - return false; - }, - join$1(_, separator) { - var first, t1, i, _this = this, - $length = _this.get$length(_this); - if (separator.length !== 0) { - if ($length === 0) - return ""; - first = A.S(_this.elementAt$1(0, 0)); - if ($length !== _this.get$length(_this)) - throw A.wrapException(A.ConcurrentModificationError$(_this)); - for (t1 = first, i = 1; i < $length; ++i) { - t1 = t1 + separator + A.S(_this.elementAt$1(0, i)); - if ($length !== _this.get$length(_this)) - throw A.wrapException(A.ConcurrentModificationError$(_this)); - } - return t1.charCodeAt(0) == 0 ? t1 : t1; - } else { - for (i = 0, t1 = ""; i < $length; ++i) { - t1 += A.S(_this.elementAt$1(0, i)); - if ($length !== _this.get$length(_this)) - throw A.wrapException(A.ConcurrentModificationError$(_this)); - } - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - }, - join$0(_) { - return this.join$1(0, ""); - }, - where$1(_, test) { - return this.super$Iterable$where(0, test); - }, - map$1$1(_, toElement, $T) { - return new A.MappedListIterable(this, toElement, A._instanceType(this)._eval$1("@")._bind$1($T)._eval$1("MappedListIterable<1,2>")); - }, - reduce$1(_, combine) { - var value, i, _this = this, - $length = _this.get$length(_this); - if ($length === 0) - throw A.wrapException(A.IterableElementError_noElement()); - value = _this.elementAt$1(0, 0); - for (i = 1; i < $length; ++i) { - value = combine.call$2(value, _this.elementAt$1(0, i)); - if ($length !== _this.get$length(_this)) - throw A.wrapException(A.ConcurrentModificationError$(_this)); - } - return value; - }, - fold$1$2(_, initialValue, combine) { - var value, i, _this = this, - $length = _this.get$length(_this); - for (value = initialValue, i = 0; i < $length; ++i) { - value = combine.call$2(value, _this.elementAt$1(0, i)); - if ($length !== _this.get$length(_this)) - throw A.wrapException(A.ConcurrentModificationError$(_this)); - } - return value; - }, - fold$2(_, initialValue, combine) { - return this.fold$1$2(0, initialValue, combine, type$.dynamic); - }, - skip$1(_, count) { - return A.SubListIterable$(this, count, null, A._instanceType(this)._eval$1("ListIterable.E")); - }, - take$1(_, count) { - return A.SubListIterable$(this, 0, A.checkNotNullable(count, "count", type$.int), A._instanceType(this)._eval$1("ListIterable.E")); - }, - toList$1$growable(_, growable) { - return A.List_List$of(this, true, A._instanceType(this)._eval$1("ListIterable.E")); - }, - toList$0(_) { - return this.toList$1$growable(0, true); - }, - toSet$0(_) { - var i, _this = this, - result = A.LinkedHashSet_LinkedHashSet(A._instanceType(_this)._eval$1("ListIterable.E")); - for (i = 0; i < _this.get$length(_this); ++i) - result.add$1(0, _this.elementAt$1(0, i)); - return result; - } - }; - A.SubListIterable.prototype = { - SubListIterable$3(_iterable, _start, _endOrLength, $E) { - var endOrLength, - t1 = this._start; - A.RangeError_checkNotNegative(t1, "start"); - endOrLength = this._endOrLength; - if (endOrLength != null) { - A.RangeError_checkNotNegative(endOrLength, "end"); - if (t1 > endOrLength) - throw A.wrapException(A.RangeError$range(t1, 0, endOrLength, "start", null)); - } - }, - get$_endIndex() { - var $length = J.get$length$asx(this.__internal$_iterable), - endOrLength = this._endOrLength; - if (endOrLength == null || endOrLength > $length) - return $length; - return endOrLength; - }, - get$_startIndex() { - var $length = J.get$length$asx(this.__internal$_iterable), - t1 = this._start; - if (t1 > $length) - return $length; - return t1; - }, - get$length(_) { - var endOrLength, - $length = J.get$length$asx(this.__internal$_iterable), - t1 = this._start; - if (t1 >= $length) - return 0; - endOrLength = this._endOrLength; - if (endOrLength == null || endOrLength >= $length) - return $length - t1; - return endOrLength - t1; - }, - elementAt$1(_, index) { - var _this = this, - realIndex = _this.get$_startIndex() + index; - if (index < 0 || realIndex >= _this.get$_endIndex()) - throw A.wrapException(A.IndexError$withLength(index, _this.get$length(0), _this, null, "index")); - return J.elementAt$1$ax(_this.__internal$_iterable, realIndex); - }, - skip$1(_, count) { - var newStart, endOrLength, _this = this; - A.RangeError_checkNotNegative(count, "count"); - newStart = _this._start + count; - endOrLength = _this._endOrLength; - if (endOrLength != null && newStart >= endOrLength) - return new A.EmptyIterable(_this.$ti._eval$1("EmptyIterable<1>")); - return A.SubListIterable$(_this.__internal$_iterable, newStart, endOrLength, _this.$ti._precomputed1); - }, - take$1(_, count) { - var endOrLength, t1, newEnd, _this = this; - A.RangeError_checkNotNegative(count, "count"); - endOrLength = _this._endOrLength; - t1 = _this._start; - newEnd = t1 + count; - if (endOrLength == null) - return A.SubListIterable$(_this.__internal$_iterable, t1, newEnd, _this.$ti._precomputed1); - else { - if (endOrLength < newEnd) - return _this; - return A.SubListIterable$(_this.__internal$_iterable, t1, newEnd, _this.$ti._precomputed1); - } - }, - toList$1$growable(_, growable) { - var $length, result, i, _this = this, - start = _this._start, - t1 = _this.__internal$_iterable, - t2 = J.getInterceptor$asx(t1), - end = t2.get$length(t1), - endOrLength = _this._endOrLength; - if (endOrLength != null && endOrLength < end) - end = endOrLength; - $length = end - start; - if ($length <= 0) { - t1 = _this.$ti._precomputed1; - return growable ? J.JSArray_JSArray$growable(0, t1) : J.JSArray_JSArray$fixed(0, t1); - } - result = A.List_List$filled($length, t2.elementAt$1(t1, start), growable, _this.$ti._precomputed1); - for (i = 1; i < $length; ++i) { - result[i] = t2.elementAt$1(t1, start + i); - if (t2.get$length(t1) < end) - throw A.wrapException(A.ConcurrentModificationError$(_this)); - } - return result; - }, - toList$0(_) { - return this.toList$1$growable(0, true); - } - }; - A.ListIterator.prototype = { - get$current(_) { - var t1 = this.__internal$_current; - return t1 == null ? this.$ti._precomputed1._as(t1) : t1; - }, - moveNext$0() { - var t3, _this = this, - t1 = _this.__internal$_iterable, - t2 = J.getInterceptor$asx(t1), - $length = t2.get$length(t1); - if (_this.__internal$_length !== $length) - throw A.wrapException(A.ConcurrentModificationError$(t1)); - t3 = _this.__internal$_index; - if (t3 >= $length) { - _this.__internal$_current = null; - return false; - } - _this.__internal$_current = t2.elementAt$1(t1, t3); - ++_this.__internal$_index; - return true; - } - }; - A.MappedIterable.prototype = { - get$iterator(_) { - return new A.MappedIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, A._instanceType(this)._eval$1("MappedIterator<1,2>")); - }, - get$length(_) { - return J.get$length$asx(this.__internal$_iterable); - }, - get$isEmpty(_) { - return J.get$isEmpty$asx(this.__internal$_iterable); - }, - get$first(_) { - return this._f.call$1(J.get$first$ax(this.__internal$_iterable)); - }, - get$last(_) { - return this._f.call$1(J.get$last$ax(this.__internal$_iterable)); - }, - get$single(_) { - return this._f.call$1(J.get$single$ax(this.__internal$_iterable)); - }, - elementAt$1(_, index) { - return this._f.call$1(J.elementAt$1$ax(this.__internal$_iterable, index)); - } - }; - A.EfficientLengthMappedIterable.prototype = {$isEfficientLengthIterable: 1}; - A.MappedIterator.prototype = { - moveNext$0() { - var _this = this, - t1 = _this._iterator; - if (t1.moveNext$0()) { - _this.__internal$_current = _this._f.call$1(t1.get$current(t1)); - return true; - } - _this.__internal$_current = null; - return false; - }, - get$current(_) { - var t1 = this.__internal$_current; - return t1 == null ? this.$ti._rest[1]._as(t1) : t1; - } - }; - A.MappedListIterable.prototype = { - get$length(_) { - return J.get$length$asx(this._source); - }, - elementAt$1(_, index) { - return this._f.call$1(J.elementAt$1$ax(this._source, index)); - } - }; - A.WhereIterable.prototype = { - get$iterator(_) { - return new A.WhereIterator(J.get$iterator$ax(this.__internal$_iterable), this._f); - }, - map$1$1(_, toElement, $T) { - return new A.MappedIterable(this, toElement, this.$ti._eval$1("@<1>")._bind$1($T)._eval$1("MappedIterable<1,2>")); - } - }; - A.WhereIterator.prototype = { - moveNext$0() { - var t1, t2; - for (t1 = this._iterator, t2 = this._f; t1.moveNext$0();) - if (t2.call$1(t1.get$current(t1))) - return true; - return false; - }, - get$current(_) { - var t1 = this._iterator; - return t1.get$current(t1); - } - }; - A.ExpandIterable.prototype = { - get$iterator(_) { - return new A.ExpandIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, B.C_EmptyIterator, this.$ti._eval$1("ExpandIterator<1,2>")); - } - }; - A.ExpandIterator.prototype = { - get$current(_) { - var t1 = this.__internal$_current; - return t1 == null ? this.$ti._rest[1]._as(t1) : t1; - }, - moveNext$0() { - var t2, t3, _this = this, - t1 = _this._currentExpansion; - if (t1 == null) - return false; - for (t2 = _this._iterator, t3 = _this._f; !t1.moveNext$0();) { - _this.__internal$_current = null; - if (t2.moveNext$0()) { - _this._currentExpansion = null; - t1 = J.get$iterator$ax(t3.call$1(t2.get$current(t2))); - _this._currentExpansion = t1; - } else - return false; - } - t1 = _this._currentExpansion; - _this.__internal$_current = t1.get$current(t1); - return true; - } - }; - A.TakeIterable.prototype = { - get$iterator(_) { - return new A.TakeIterator(J.get$iterator$ax(this.__internal$_iterable), this._takeCount, A._instanceType(this)._eval$1("TakeIterator<1>")); - } - }; - A.EfficientLengthTakeIterable.prototype = { - get$length(_) { - var iterableLength = J.get$length$asx(this.__internal$_iterable), - t1 = this._takeCount; - if (iterableLength > t1) - return t1; - return iterableLength; - }, - $isEfficientLengthIterable: 1 - }; - A.TakeIterator.prototype = { - moveNext$0() { - if (--this._remaining >= 0) - return this._iterator.moveNext$0(); - this._remaining = -1; - return false; - }, - get$current(_) { - var t1; - if (this._remaining < 0) { - this.$ti._precomputed1._as(null); - return null; - } - t1 = this._iterator; - return t1.get$current(t1); - } - }; - A.SkipIterable.prototype = { - skip$1(_, count) { - A.ArgumentError_checkNotNull(count, "count"); - A.RangeError_checkNotNegative(count, "count"); - return new A.SkipIterable(this.__internal$_iterable, this._skipCount + count, A._instanceType(this)._eval$1("SkipIterable<1>")); - }, - get$iterator(_) { - return new A.SkipIterator(J.get$iterator$ax(this.__internal$_iterable), this._skipCount); - } - }; - A.EfficientLengthSkipIterable.prototype = { - get$length(_) { - var $length = J.get$length$asx(this.__internal$_iterable) - this._skipCount; - if ($length >= 0) - return $length; - return 0; - }, - skip$1(_, count) { - A.ArgumentError_checkNotNull(count, "count"); - A.RangeError_checkNotNegative(count, "count"); - return new A.EfficientLengthSkipIterable(this.__internal$_iterable, this._skipCount + count, this.$ti); - }, - $isEfficientLengthIterable: 1 - }; - A.SkipIterator.prototype = { - moveNext$0() { - var t1, i; - for (t1 = this._iterator, i = 0; i < this._skipCount; ++i) - t1.moveNext$0(); - this._skipCount = 0; - return t1.moveNext$0(); - }, - get$current(_) { - var t1 = this._iterator; - return t1.get$current(t1); - } - }; - A.SkipWhileIterable.prototype = { - get$iterator(_) { - return new A.SkipWhileIterator(J.get$iterator$ax(this.__internal$_iterable), this._f); - } - }; - A.SkipWhileIterator.prototype = { - moveNext$0() { - var t1, t2, _this = this; - if (!_this._hasSkipped) { - _this._hasSkipped = true; - for (t1 = _this._iterator, t2 = _this._f; t1.moveNext$0();) - if (!t2.call$1(t1.get$current(t1))) - return true; - } - return _this._iterator.moveNext$0(); - }, - get$current(_) { - var t1 = this._iterator; - return t1.get$current(t1); - } - }; - A.EmptyIterable.prototype = { - get$iterator(_) { - return B.C_EmptyIterator; - }, - get$isEmpty(_) { - return true; - }, - get$length(_) { - return 0; - }, - get$first(_) { - throw A.wrapException(A.IterableElementError_noElement()); - }, - get$last(_) { - throw A.wrapException(A.IterableElementError_noElement()); - }, - get$single(_) { - throw A.wrapException(A.IterableElementError_noElement()); - }, - elementAt$1(_, index) { - throw A.wrapException(A.RangeError$range(index, 0, 0, "index", null)); - }, - contains$1(_, element) { - return false; - }, - every$1(_, test) { - return true; - }, - any$1(_, test) { - return false; - }, - join$1(_, separator) { - return ""; - }, - where$1(_, test) { - return this; - }, - map$1$1(_, toElement, $T) { - return new A.EmptyIterable($T._eval$1("EmptyIterable<0>")); - }, - skip$1(_, count) { - A.RangeError_checkNotNegative(count, "count"); - return this; - }, - take$1(_, count) { - A.RangeError_checkNotNegative(count, "count"); - return this; - }, - toList$1$growable(_, growable) { - var t1 = J.JSArray_JSArray$growable(0, this.$ti._precomputed1); - return t1; - }, - toList$0(_) { - return this.toList$1$growable(0, true); - }, - toSet$0(_) { - return A.LinkedHashSet_LinkedHashSet(this.$ti._precomputed1); - } - }; - A.EmptyIterator.prototype = { - moveNext$0() { - return false; - }, - get$current(_) { - throw A.wrapException(A.IterableElementError_noElement()); - } - }; - A.FollowedByIterable.prototype = { - get$iterator(_) { - return new A.FollowedByIterator(J.get$iterator$ax(this.__internal$_first), this._second); - }, - get$length(_) { - var t1 = this._second; - return J.get$length$asx(this.__internal$_first) + t1.get$length(t1); - }, - get$isEmpty(_) { - var t1; - if (J.get$isEmpty$asx(this.__internal$_first)) { - t1 = this._second; - t1 = t1.get$isEmpty(t1); - } else - t1 = false; - return t1; - }, - get$isNotEmpty(_) { - var t1; - if (!J.get$isNotEmpty$asx(this.__internal$_first)) { - t1 = this._second; - t1 = t1.get$isNotEmpty(t1); - } else - t1 = true; - return t1; - }, - contains$1(_, value) { - var t1; - if (!J.contains$1$asx(this.__internal$_first, value)) { - t1 = this._second; - t1 = t1.contains$1(t1, value); - } else - t1 = true; - return t1; - }, - get$first(_) { - var t1, - iterator = J.get$iterator$ax(this.__internal$_first); - if (iterator.moveNext$0()) - return iterator.get$current(iterator); - t1 = this._second; - return t1.get$first(t1); - }, - get$last(_) { - var last, - t1 = this._second, - iterator = t1.get$iterator(t1); - if (iterator.moveNext$0()) { - last = iterator.get$current(iterator); - for (; iterator.moveNext$0();) - last = iterator.get$current(iterator); - return last; - } - return J.get$last$ax(this.__internal$_first); - } - }; - A.EfficientLengthFollowedByIterable.prototype = { - elementAt$1(_, index) { - var t1 = this.__internal$_first, - t2 = J.getInterceptor$asx(t1), - firstLength = t2.get$length(t1); - if (index < firstLength) - return t2.elementAt$1(t1, index); - t1 = this._second; - return t1.elementAt$1(t1, index - firstLength); - }, - get$first(_) { - var t1 = this.__internal$_first, - t2 = J.getInterceptor$asx(t1); - if (t2.get$isNotEmpty(t1)) - return t2.get$first(t1); - t1 = this._second; - return t1.get$first(t1); - }, - get$last(_) { - var t1 = this._second; - if (t1.get$isNotEmpty(t1)) - return t1.get$last(t1); - return J.get$last$ax(this.__internal$_first); - }, - $isEfficientLengthIterable: 1 - }; - A.FollowedByIterator.prototype = { - moveNext$0() { - var t1, _this = this; - if (_this._currentIterator.moveNext$0()) - return true; - t1 = _this._nextIterable; - if (t1 != null) { - t1 = t1.get$iterator(t1); - _this._currentIterator = t1; - _this._nextIterable = null; - return t1.moveNext$0(); - } - return false; - }, - get$current(_) { - var t1 = this._currentIterator; - return t1.get$current(t1); - } - }; - A.WhereTypeIterable.prototype = { - get$iterator(_) { - return new A.WhereTypeIterator(J.get$iterator$ax(this._source), this.$ti._eval$1("WhereTypeIterator<1>")); - } - }; - A.WhereTypeIterator.prototype = { - moveNext$0() { - var t1, t2; - for (t1 = this._source, t2 = this.$ti._precomputed1; t1.moveNext$0();) - if (t2._is(t1.get$current(t1))) - return true; - return false; - }, - get$current(_) { - var t1 = this._source; - return this.$ti._precomputed1._as(t1.get$current(t1)); - } - }; - A.NonNullsIterable.prototype = { - get$_firstNonNull() { - var t1, element; - for (t1 = J.get$iterator$ax(this._source); t1.moveNext$0();) { - element = t1.get$current(t1); - if (element != null) - return element; - } - return null; - }, - get$isEmpty(_) { - return this.get$_firstNonNull() == null; - }, - get$isNotEmpty(_) { - return this.get$_firstNonNull() != null; - }, - get$first(_) { - var t1 = this.get$_firstNonNull(); - return t1 == null ? A.throwExpression(A.IterableElementError_noElement()) : t1; - }, - get$iterator(_) { - return new A.NonNullsIterator(J.get$iterator$ax(this._source)); - } - }; - A.NonNullsIterator.prototype = { - moveNext$0() { - var t1, next; - this.__internal$_current = null; - for (t1 = this._source; t1.moveNext$0();) { - next = t1.get$current(t1); - if (next != null) { - this.__internal$_current = next; - return true; - } - } - return false; - }, - get$current(_) { - var t1 = this.__internal$_current; - return t1 == null ? A.throwExpression(A.IterableElementError_noElement()) : t1; - } - }; - A.FixedLengthListMixin.prototype = { - set$length(receiver, newLength) { - throw A.wrapException(A.UnsupportedError$("Cannot change the length of a fixed-length list")); - }, - add$1(receiver, value) { - throw A.wrapException(A.UnsupportedError$("Cannot add to a fixed-length list")); - }, - addAll$1(receiver, iterable) { - throw A.wrapException(A.UnsupportedError$("Cannot add to a fixed-length list")); - }, - removeRange$2(receiver, start, end) { - throw A.wrapException(A.UnsupportedError$("Cannot remove from a fixed-length list")); - } - }; - A.UnmodifiableListMixin.prototype = { - $indexSet(_, index, value) { - throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); - }, - set$length(_, newLength) { - throw A.wrapException(A.UnsupportedError$("Cannot change the length of an unmodifiable list")); - }, - add$1(_, value) { - throw A.wrapException(A.UnsupportedError$("Cannot add to an unmodifiable list")); - }, - addAll$1(_, iterable) { - throw A.wrapException(A.UnsupportedError$("Cannot add to an unmodifiable list")); - }, - sort$1(_, compare) { - throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); - }, - setRange$4(_, start, end, iterable, skipCount) { - throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); - }, - removeRange$2(_, start, end) { - throw A.wrapException(A.UnsupportedError$("Cannot remove from an unmodifiable list")); - }, - fillRange$3(_, start, end, fillValue) { - throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); - } - }; - A.UnmodifiableListBase.prototype = {}; - A.ReversedListIterable.prototype = { - get$length(_) { - return J.get$length$asx(this._source); - }, - elementAt$1(_, index) { - var t1 = this._source, - t2 = J.getInterceptor$asx(t1); - return t2.elementAt$1(t1, t2.get$length(t1) - 1 - index); - } - }; - A.Symbol.prototype = { - get$hashCode(_) { - var hash = this._hashCode; - if (hash != null) - return hash; - hash = 664597 * B.JSString_methods.get$hashCode(this.__internal$_name) & 536870911; - this._hashCode = hash; - return hash; - }, - toString$0(_) { - return 'Symbol("' + this.__internal$_name + '")'; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.Symbol && this.__internal$_name === other.__internal$_name; - }, - $isSymbol0: 1 - }; - A.__CastListBase__CastIterableBase_ListMixin.prototype = {}; - A._Record_1.prototype = {$recipe: "+(1)", $shape: 1}; - A._Record_2.prototype = {$recipe: "+(1,2)", $shape: 2}; - A._Record_2_forImport.prototype = {$recipe: "+forImport(1,2)", $shape: 3}; - A._Record_2_imports_modules.prototype = {$recipe: "+imports,modules(1,2)", $shape: 5}; - A._Record_2_loadedUrls_stylesheet.prototype = {$recipe: "+loadedUrls,stylesheet(1,2)", $shape: 6}; - A._Record_2_sourceMap.prototype = {$recipe: "+sourceMap(1,2)", $shape: 4}; - A._Record_3.prototype = {$recipe: "+(1,2,3)", $shape: 7}; - A._Record_3_deprecation_message_span.prototype = { - get$message(_) { - return this._1; - }, - $recipe: "+deprecation,message,span(1,2,3)", - $shape: 11 - }; - A._Record_3_forImport.prototype = {$recipe: "+forImport(1,2,3)", $shape: 8}; - A._Record_3_importer_isDependency.prototype = {$recipe: "+importer,isDependency(1,2,3)", $shape: 10}; - A._Record_3_originalUrl.prototype = {$recipe: "+originalUrl(1,2,3)", $shape: 9}; - A._Record_5_named_namedNodes_positional_positionalNodes_separator.prototype = {$recipe: "+named,namedNodes,positional,positionalNodes,separator(1,2,3,4,5)", $shape: 13}; - A.ConstantMapView.prototype = {}; - A.ConstantMap.prototype = { - cast$2$0(_, RK, RV) { - var t1 = A._instanceType(this); - return A.Map_castFrom(this, t1._precomputed1, t1._rest[1], RK, RV); - }, - get$isEmpty(_) { - return this.get$length(this) === 0; - }, - get$isNotEmpty(_) { - return this.get$length(this) !== 0; - }, - toString$0(_) { - return A.MapBase_mapToString(this); - }, - $indexSet(_, key, value) { - A.ConstantMap__throwUnmodifiable(); - }, - remove$1(_, key) { - A.ConstantMap__throwUnmodifiable(); - }, - addAll$1(_, other) { - A.ConstantMap__throwUnmodifiable(); - }, - get$entries(_) { - return new A._SyncStarIterable(this.entries$body$ConstantMap(0), A._instanceType(this)._eval$1("_SyncStarIterable>")); - }, - entries$body$ConstantMap($async$_) { - var $async$self = this; - return function() { - var _ = $async$_; - var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, key; - return function $async$get$entries($async$iterator, $async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.get$keys($async$self), t1 = t1.get$iterator(t1), t2 = A._instanceType($async$self)._eval$1("MapEntry<1,2>"); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - key = t1.get$current(t1); - $async$goto = 4; - return $async$iterator._async$_current = new A.MapEntry(key, $async$self.$index(0, key), t2), 1; - case 4: - // after yield - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return 0; - case 1: - // rethrow - return $async$iterator._datum = $async$currentError, 3; - } - }; - }; - }, - $isMap: 1 - }; - A.ConstantStringMap.prototype = { - get$length(_) { - return this._values.length; - }, - get$_keys() { - var keys = this.$keys; - if (keys == null) { - keys = Object.keys(this._jsIndex); - this.$keys = keys; - } - return keys; - }, - containsKey$1(key) { - if (typeof key != "string") - return false; - if ("__proto__" === key) - return false; - return this._jsIndex.hasOwnProperty(key); - }, - $index(_, key) { - if (!this.containsKey$1(key)) - return null; - return this._values[this._jsIndex[key]]; - }, - forEach$1(_, f) { - var t1, i, - keys = this.get$_keys(), - values = this._values; - for (t1 = keys.length, i = 0; i < t1; ++i) - f.call$2(keys[i], values[i]); - }, - get$keys(_) { - return new A._KeysOrValues(this.get$_keys(), this.$ti._eval$1("_KeysOrValues<1>")); - }, - get$values(_) { - return new A._KeysOrValues(this._values, this.$ti._eval$1("_KeysOrValues<2>")); - } - }; - A._KeysOrValues.prototype = { - get$length(_) { - return this._elements.length; - }, - get$isEmpty(_) { - return 0 === this._elements.length; - }, - get$isNotEmpty(_) { - return 0 !== this._elements.length; - }, - get$iterator(_) { - var t1 = this._elements; - return new A._KeysOrValuesOrElementsIterator(t1, t1.length, this.$ti._eval$1("_KeysOrValuesOrElementsIterator<1>")); - } - }; - A._KeysOrValuesOrElementsIterator.prototype = { - get$current(_) { - var t1 = this.__js_helper$_current; - return t1 == null ? this.$ti._precomputed1._as(t1) : t1; - }, - moveNext$0() { - var _this = this, - t1 = _this.__js_helper$_index; - if (t1 >= _this.__js_helper$_length) { - _this.__js_helper$_current = null; - return false; - } - _this.__js_helper$_current = _this._elements[t1]; - _this.__js_helper$_index = t1 + 1; - return true; - } - }; - A.ConstantSet.prototype = { - add$1(_, value) { - A.ConstantSet__throwUnmodifiable(); - }, - addAll$1(_, elements) { - A.ConstantSet__throwUnmodifiable(); - }, - remove$1(_, value) { - A.ConstantSet__throwUnmodifiable(); - } - }; - A.ConstantStringSet.prototype = { - get$length(_) { - return this.__js_helper$_length; - }, - get$isEmpty(_) { - return this.__js_helper$_length === 0; - }, - get$isNotEmpty(_) { - return this.__js_helper$_length !== 0; - }, - get$iterator(_) { - var t1, _this = this, - keys = _this.$keys; - if (keys == null) { - keys = Object.keys(_this._jsIndex); - _this.$keys = keys; - } - t1 = keys; - return new A._KeysOrValuesOrElementsIterator(t1, t1.length, _this.$ti._eval$1("_KeysOrValuesOrElementsIterator<1>")); - }, - contains$1(_, key) { - if (typeof key != "string") - return false; - if ("__proto__" === key) - return false; - return this._jsIndex.hasOwnProperty(key); - }, - toSet$0(_) { - return A.LinkedHashSet_LinkedHashSet$of(this, this.$ti._precomputed1); - } - }; - A.GeneralConstantSet.prototype = { - get$length(_) { - return this._elements.length; - }, - get$isEmpty(_) { - return this._elements.length === 0; - }, - get$isNotEmpty(_) { - return this._elements.length !== 0; - }, - get$iterator(_) { - var t1 = this._elements; - return new A._KeysOrValuesOrElementsIterator(t1, t1.length, this.$ti._eval$1("_KeysOrValuesOrElementsIterator<1>")); - }, - _getMap$0() { - var t1, t2, _i, key, _this = this, - backingMap = _this.$map; - if (backingMap == null) { - backingMap = new A.JsConstantLinkedHashMap(_this.$ti._eval$1("JsConstantLinkedHashMap<1,1>")); - for (t1 = _this._elements, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - key = t1[_i]; - backingMap.$indexSet(0, key, key); - } - _this.$map = backingMap; - } - return backingMap; - }, - contains$1(_, key) { - return this._getMap$0().containsKey$1(key); - }, - toSet$0(_) { - return A.LinkedHashSet_LinkedHashSet$of(this, this.$ti._precomputed1); - } - }; - A.Instantiation.prototype = { - Instantiation$1(_genericClosure) { - if (false) - A.instantiatedGenericFunctionType(0, 0); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.Instantiation && this._genericClosure.$eq(0, other._genericClosure) && A.getRuntimeTypeOfClosure(this) === A.getRuntimeTypeOfClosure(other); - }, - get$hashCode(_) { - return A.Object_hash(this._genericClosure, A.getRuntimeTypeOfClosure(this), B.C_SentinelValue, B.C_SentinelValue); - }, - toString$0(_) { - var t1 = B.JSArray_methods.join$1(this.get$_types(), ", "); - return this._genericClosure.toString$0(0) + " with " + ("<" + t1 + ">"); - } - }; - A.Instantiation1.prototype = { - get$_types() { - return [A.createRuntimeType(this.$ti._precomputed1)]; - }, - call$0() { - return this._genericClosure.call$1$0(this.$ti._rest[0]); - }, - call$2(a0, a1) { - return this._genericClosure.call$1$2(a0, a1, this.$ti._rest[0]); - }, - call$3(a0, a1, a2) { - return this._genericClosure.call$1$3(a0, a1, a2, this.$ti._rest[0]); - }, - call$4(a0, a1, a2, a3) { - return this._genericClosure.call$1$4(a0, a1, a2, a3, this.$ti._rest[0]); - }, - $signature() { - return A.instantiatedGenericFunctionType(A.closureFunctionType(this._genericClosure), this.$ti); - } - }; - A.JSInvocationMirror.prototype = { - get$memberName() { - var t1 = this.__js_helper$_memberName; - if (t1 instanceof A.Symbol) - return t1; - return this.__js_helper$_memberName = new A.Symbol(t1); - }, - get$positionalArguments() { - var t1, t2, argumentCount, list, index, _this = this; - if (_this.__js_helper$_kind === 1) - return B.List_empty6; - t1 = _this._arguments; - t2 = J.getInterceptor$asx(t1); - argumentCount = t2.get$length(t1) - J.get$length$asx(_this._namedArgumentNames) - _this._typeArgumentCount; - if (argumentCount === 0) - return B.List_empty6; - list = []; - for (index = 0; index < argumentCount; ++index) - list.push(t2.$index(t1, index)); - return J.JSArray_markUnmodifiableList(list); - }, - get$namedArguments() { - var t1, t2, namedArgumentCount, t3, t4, namedArgumentsStartIndex, map, i, _this = this; - if (_this.__js_helper$_kind !== 0) - return B.Map_empty3; - t1 = _this._namedArgumentNames; - t2 = J.getInterceptor$asx(t1); - namedArgumentCount = t2.get$length(t1); - t3 = _this._arguments; - t4 = J.getInterceptor$asx(t3); - namedArgumentsStartIndex = t4.get$length(t3) - namedArgumentCount - _this._typeArgumentCount; - if (namedArgumentCount === 0) - return B.Map_empty3; - map = new A.JsLinkedHashMap(type$.JsLinkedHashMap_Symbol_dynamic); - for (i = 0; i < namedArgumentCount; ++i) - map.$indexSet(0, new A.Symbol(t2.$index(t1, i)), t4.$index(t3, namedArgumentsStartIndex + i)); - return new A.ConstantMapView(map, type$.ConstantMapView_Symbol_dynamic); - } - }; - A.Primitives_functionNoSuchMethod_closure.prototype = { - call$2($name, argument) { - var t1 = this._box_0; - t1.names = t1.names + "$" + $name; - this.namedArgumentList.push($name); - this.$arguments.push(argument); - ++t1.argumentCount; - }, - $signature: 129 - }; - A.TypeErrorDecoder.prototype = { - matchTypeError$1(message) { - var result, t1, _this = this, - match = new RegExp(_this._pattern).exec(message); - if (match == null) - return null; - result = Object.create(null); - t1 = _this._arguments; - if (t1 !== -1) - result.arguments = match[t1 + 1]; - t1 = _this._argumentsExpr; - if (t1 !== -1) - result.argumentsExpr = match[t1 + 1]; - t1 = _this._expr; - if (t1 !== -1) - result.expr = match[t1 + 1]; - t1 = _this._method; - if (t1 !== -1) - result.method = match[t1 + 1]; - t1 = _this._receiver; - if (t1 !== -1) - result.receiver = match[t1 + 1]; - return result; - } - }; - A.NullError.prototype = { - toString$0(_) { - return "Null check operator used on a null value"; - } - }; - A.JsNoSuchMethodError.prototype = { - toString$0(_) { - var t2, _this = this, - _s38_ = "NoSuchMethodError: method not found: '", - t1 = _this._method; - if (t1 == null) - return "NoSuchMethodError: " + _this.__js_helper$_message; - t2 = _this._receiver; - if (t2 == null) - return _s38_ + t1 + "' (" + _this.__js_helper$_message + ")"; - return _s38_ + t1 + "' on '" + t2 + "' (" + _this.__js_helper$_message + ")"; - } - }; - A.UnknownJsTypeError.prototype = { - toString$0(_) { - var t1 = this.__js_helper$_message; - return t1.length === 0 ? "Error" : "Error: " + t1; - } - }; - A.NullThrownFromJavaScriptException.prototype = { - toString$0(_) { - return "Throw of null ('" + (this._irritant === null ? "null" : "undefined") + "' from JavaScript)"; - }, - $isException: 1 - }; - A.ExceptionAndStackTrace.prototype = {}; - A._StackTrace.prototype = { - toString$0(_) { - var trace, - t1 = this._trace; - if (t1 != null) - return t1; - t1 = this._exception; - trace = t1 !== null && typeof t1 === "object" ? t1.stack : null; - return this._trace = trace == null ? "" : trace; - }, - $isStackTrace: 1 - }; - A.Closure.prototype = { - toString$0(_) { - var $constructor = this.constructor, - $name = $constructor == null ? null : $constructor.name; - return "Closure '" + A.unminifyOrTag($name == null ? "unknown" : $name) + "'"; - }, - $isFunction: 1, - get$$call() { - return this; - }, - "call*": "call$1", - $requiredArgCount: 1, - $defaultValues: null - }; - A.Closure0Args.prototype = {"call*": "call$0", $requiredArgCount: 0}; - A.Closure2Args.prototype = {"call*": "call$2", $requiredArgCount: 2}; - A.TearOffClosure.prototype = {}; - A.StaticClosure.prototype = { - toString$0(_) { - var $name = this.$static_name; - if ($name == null) - return "Closure of unknown static method"; - return "Closure '" + A.unminifyOrTag($name) + "'"; - } - }; - A.BoundClosure.prototype = { - $eq(_, other) { - if (other == null) - return false; - if (this === other) - return true; - if (!(other instanceof A.BoundClosure)) - return false; - return this.$_target === other.$_target && this._receiver === other._receiver; - }, - get$hashCode(_) { - return (A.objectHashCode(this._receiver) ^ A.Primitives_objectHashCode(this.$_target)) >>> 0; - }, - toString$0(_) { - return "Closure '" + this.$_name + "' of " + ("Instance of '" + A.Primitives_objectTypeName(this._receiver) + "'"); - } - }; - A._CyclicInitializationError.prototype = { - toString$0(_) { - return "Reading static variable '" + this.variableName + "' during its initialization"; - } - }; - A.RuntimeError.prototype = { - toString$0(_) { - return "RuntimeError: " + this.message; - }, - get$message(receiver) { - return this.message; - } - }; - A._Required.prototype = {}; - A.JsLinkedHashMap.prototype = { - get$length(_) { - return this.__js_helper$_length; - }, - get$isEmpty(_) { - return this.__js_helper$_length === 0; - }, - get$isNotEmpty(_) { - return this.__js_helper$_length !== 0; - }, - get$keys(_) { - return new A.LinkedHashMapKeyIterable(this, A._instanceType(this)._eval$1("LinkedHashMapKeyIterable<1>")); - }, - get$values(_) { - var t1 = A._instanceType(this); - return A.MappedIterable_MappedIterable(new A.LinkedHashMapKeyIterable(this, t1._eval$1("LinkedHashMapKeyIterable<1>")), new A.JsLinkedHashMap_values_closure(this), t1._precomputed1, t1._rest[1]); - }, - containsKey$1(key) { - var strings, nums; - if (typeof key == "string") { - strings = this.__js_helper$_strings; - if (strings == null) - return false; - return strings[key] != null; - } else if (typeof key == "number" && (key & 0x3fffffff) === key) { - nums = this.__js_helper$_nums; - if (nums == null) - return false; - return nums[key] != null; - } else - return this.internalContainsKey$1(key); - }, - internalContainsKey$1(key) { - var rest = this.__js_helper$_rest; - if (rest == null) - return false; - return this.internalFindBucketIndex$2(rest[this.internalComputeHashCode$1(key)], key) >= 0; - }, - addAll$1(_, other) { - other.forEach$1(0, new A.JsLinkedHashMap_addAll_closure(this)); - }, - $index(_, key) { - var strings, cell, t1, nums, _null = null; - if (typeof key == "string") { - strings = this.__js_helper$_strings; - if (strings == null) - return _null; - cell = strings[key]; - t1 = cell == null ? _null : cell.hashMapCellValue; - return t1; - } else if (typeof key == "number" && (key & 0x3fffffff) === key) { - nums = this.__js_helper$_nums; - if (nums == null) - return _null; - cell = nums[key]; - t1 = cell == null ? _null : cell.hashMapCellValue; - return t1; - } else - return this.internalGet$1(key); - }, - internalGet$1(key) { - var bucket, index, - rest = this.__js_helper$_rest; - if (rest == null) - return null; - bucket = rest[this.internalComputeHashCode$1(key)]; - index = this.internalFindBucketIndex$2(bucket, key); - if (index < 0) - return null; - return bucket[index].hashMapCellValue; - }, - $indexSet(_, key, value) { - var strings, nums, _this = this; - if (typeof key == "string") { - strings = _this.__js_helper$_strings; - _this.__js_helper$_addHashTableEntry$3(strings == null ? _this.__js_helper$_strings = _this._newHashTable$0() : strings, key, value); - } else if (typeof key == "number" && (key & 0x3fffffff) === key) { - nums = _this.__js_helper$_nums; - _this.__js_helper$_addHashTableEntry$3(nums == null ? _this.__js_helper$_nums = _this._newHashTable$0() : nums, key, value); - } else - _this.internalSet$2(key, value); - }, - internalSet$2(key, value) { - var hash, bucket, index, _this = this, - rest = _this.__js_helper$_rest; - if (rest == null) - rest = _this.__js_helper$_rest = _this._newHashTable$0(); - hash = _this.internalComputeHashCode$1(key); - bucket = rest[hash]; - if (bucket == null) - rest[hash] = [_this.__js_helper$_newLinkedCell$2(key, value)]; - else { - index = _this.internalFindBucketIndex$2(bucket, key); - if (index >= 0) - bucket[index].hashMapCellValue = value; - else - bucket.push(_this.__js_helper$_newLinkedCell$2(key, value)); - } - }, - putIfAbsent$2(key, ifAbsent) { - var t1, value, _this = this; - if (_this.containsKey$1(key)) { - t1 = _this.$index(0, key); - return t1 == null ? A._instanceType(_this)._rest[1]._as(t1) : t1; - } - value = ifAbsent.call$0(); - _this.$indexSet(0, key, value); - return value; - }, - remove$1(_, key) { - var _this = this; - if (typeof key == "string") - return _this.__js_helper$_removeHashTableEntry$2(_this.__js_helper$_strings, key); - else if (typeof key == "number" && (key & 0x3fffffff) === key) - return _this.__js_helper$_removeHashTableEntry$2(_this.__js_helper$_nums, key); - else - return _this.internalRemove$1(key); - }, - internalRemove$1(key) { - var hash, bucket, index, cell, _this = this, - rest = _this.__js_helper$_rest; - if (rest == null) - return null; - hash = _this.internalComputeHashCode$1(key); - bucket = rest[hash]; - index = _this.internalFindBucketIndex$2(bucket, key); - if (index < 0) - return null; - cell = bucket.splice(index, 1)[0]; - _this.__js_helper$_unlinkCell$1(cell); - if (bucket.length === 0) - delete rest[hash]; - return cell.hashMapCellValue; - }, - clear$0(_) { - var _this = this; - if (_this.__js_helper$_length > 0) { - _this.__js_helper$_strings = _this.__js_helper$_nums = _this.__js_helper$_rest = _this.__js_helper$_first = _this.__js_helper$_last = null; - _this.__js_helper$_length = 0; - _this.__js_helper$_modified$0(); - } - }, - forEach$1(_, action) { - var _this = this, - cell = _this.__js_helper$_first, - modifications = _this.__js_helper$_modifications; - for (; cell != null;) { - action.call$2(cell.hashMapCellKey, cell.hashMapCellValue); - if (modifications !== _this.__js_helper$_modifications) - throw A.wrapException(A.ConcurrentModificationError$(_this)); - cell = cell.__js_helper$_next; - } - }, - __js_helper$_addHashTableEntry$3(table, key, value) { - var cell = table[key]; - if (cell == null) - table[key] = this.__js_helper$_newLinkedCell$2(key, value); - else - cell.hashMapCellValue = value; - }, - __js_helper$_removeHashTableEntry$2(table, key) { - var cell; - if (table == null) - return null; - cell = table[key]; - if (cell == null) - return null; - this.__js_helper$_unlinkCell$1(cell); - delete table[key]; - return cell.hashMapCellValue; - }, - __js_helper$_modified$0() { - this.__js_helper$_modifications = this.__js_helper$_modifications + 1 & 1073741823; - }, - __js_helper$_newLinkedCell$2(key, value) { - var t1, _this = this, - cell = new A.LinkedHashMapCell(key, value); - if (_this.__js_helper$_first == null) - _this.__js_helper$_first = _this.__js_helper$_last = cell; - else { - t1 = _this.__js_helper$_last; - t1.toString; - cell.__js_helper$_previous = t1; - _this.__js_helper$_last = t1.__js_helper$_next = cell; - } - ++_this.__js_helper$_length; - _this.__js_helper$_modified$0(); - return cell; - }, - __js_helper$_unlinkCell$1(cell) { - var _this = this, - previous = cell.__js_helper$_previous, - next = cell.__js_helper$_next; - if (previous == null) - _this.__js_helper$_first = next; - else - previous.__js_helper$_next = next; - if (next == null) - _this.__js_helper$_last = previous; - else - next.__js_helper$_previous = previous; - --_this.__js_helper$_length; - _this.__js_helper$_modified$0(); - }, - internalComputeHashCode$1(key) { - return J.get$hashCode$(key) & 1073741823; - }, - internalFindBucketIndex$2(bucket, key) { - var $length, i; - if (bucket == null) - return -1; - $length = bucket.length; - for (i = 0; i < $length; ++i) - if (J.$eq$(bucket[i].hashMapCellKey, key)) - return i; - return -1; - }, - toString$0(_) { - return A.MapBase_mapToString(this); - }, - _newHashTable$0() { - var table = Object.create(null); - table[""] = table; - delete table[""]; - return table; - } - }; - A.JsLinkedHashMap_values_closure.prototype = { - call$1(each) { - var t1 = this.$this, - t2 = t1.$index(0, each); - return t2 == null ? A._instanceType(t1)._rest[1]._as(t2) : t2; - }, - $signature() { - return A._instanceType(this.$this)._eval$1("2(1)"); - } - }; - A.JsLinkedHashMap_addAll_closure.prototype = { - call$2(key, value) { - this.$this.$indexSet(0, key, value); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("~(1,2)"); - } - }; - A.LinkedHashMapCell.prototype = {}; - A.LinkedHashMapKeyIterable.prototype = { - get$length(_) { - return this.__js_helper$_map.__js_helper$_length; - }, - get$isEmpty(_) { - return this.__js_helper$_map.__js_helper$_length === 0; - }, - get$iterator(_) { - var t1 = this.__js_helper$_map, - t2 = new A.LinkedHashMapKeyIterator(t1, t1.__js_helper$_modifications); - t2.__js_helper$_cell = t1.__js_helper$_first; - return t2; - }, - contains$1(_, element) { - return this.__js_helper$_map.containsKey$1(element); - } - }; - A.LinkedHashMapKeyIterator.prototype = { - get$current(_) { - return this.__js_helper$_current; - }, - moveNext$0() { - var cell, _this = this, - t1 = _this.__js_helper$_map; - if (_this.__js_helper$_modifications !== t1.__js_helper$_modifications) - throw A.wrapException(A.ConcurrentModificationError$(t1)); - cell = _this.__js_helper$_cell; - if (cell == null) { - _this.__js_helper$_current = null; - return false; - } else { - _this.__js_helper$_current = cell.hashMapCellKey; - _this.__js_helper$_cell = cell.__js_helper$_next; - return true; - } - } - }; - A.JsIdentityLinkedHashMap.prototype = { - internalComputeHashCode$1(key) { - return A.objectHashCode(key) & 1073741823; - }, - internalFindBucketIndex$2(bucket, key) { - var $length, i, t1; - if (bucket == null) - return -1; - $length = bucket.length; - for (i = 0; i < $length; ++i) { - t1 = bucket[i].hashMapCellKey; - if (t1 == null ? key == null : t1 === key) - return i; - } - return -1; - } - }; - A.JsConstantLinkedHashMap.prototype = { - internalComputeHashCode$1(key) { - return A.constantHashCode(key) & 1073741823; - }, - internalFindBucketIndex$2(bucket, key) { - var $length, i; - if (bucket == null) - return -1; - $length = bucket.length; - for (i = 0; i < $length; ++i) - if (J.$eq$(bucket[i].hashMapCellKey, key)) - return i; - return -1; - } - }; - A.initHooks_closure.prototype = { - call$1(o) { - return this.getTag(o); - }, - $signature: 111 - }; - A.initHooks_closure0.prototype = { - call$2(o, tag) { - return this.getUnknownTag(o, tag); - }, - $signature: 421 - }; - A.initHooks_closure1.prototype = { - call$1(tag) { - return this.prototypeForTag(tag); - }, - $signature: 213 - }; - A._Record.prototype = { - toString$0(_) { - return this._toString$1(false); - }, - _toString$1(safe) { - var t2, separator, i, key, value, - keys = this._fieldKeys$0(), - values = this._getFieldValues$0(), - t1 = (safe ? "" + "Record " : "") + "("; - for (t2 = keys.length, separator = "", i = 0; i < t2; ++i, separator = ", ") { - t1 += separator; - key = keys[i]; - if (typeof key == "string") - t1 = t1 + key + ": "; - value = values[i]; - t1 = safe ? t1 + A.Primitives_safeToString(value) : t1 + A.S(value); - } - t1 += ")"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _fieldKeys$0() { - var t1, - shapeTag = this.$shape; - for (; $._Record__computedFieldKeys.length <= shapeTag;) - $._Record__computedFieldKeys.push(null); - t1 = $._Record__computedFieldKeys[shapeTag]; - if (t1 == null) { - t1 = this._computeFieldKeys$0(); - $._Record__computedFieldKeys[shapeTag] = t1; - } - return t1; - }, - _computeFieldKeys$0() { - var i, names, last, - recipe = this.$recipe, - position = recipe.indexOf("("), - joinedNames = recipe.substring(1, position), - fields = recipe.substring(position), - arity = fields === "()" ? 0 : fields.replace(/[^,]/g, "").length + 1, - t1 = type$.Object, - result = J.JSArray_JSArray$allocateGrowable(arity, t1); - for (i = 0; i < arity; ++i) - result[i] = i; - if (joinedNames !== "") { - names = joinedNames.split(","); - i = names.length; - for (last = arity; i > 0;) { - --last; - --i; - result[last] = names[i]; - } - } - return A.List_List$unmodifiable(result, t1); - } - }; - A._Record2.prototype = { - _getFieldValues$0() { - return [this._0, this._1]; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A._Record2 && this.$shape === other.$shape && J.$eq$(this._0, other._0) && J.$eq$(this._1, other._1); - }, - get$hashCode(_) { - return A.Object_hash(this.$shape, this._0, this._1, B.C_SentinelValue); - } - }; - A._Record1.prototype = { - _getFieldValues$0() { - return [this._0]; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A._Record1 && this.$shape === other.$shape && J.$eq$(this._0, other._0); - }, - get$hashCode(_) { - return A.Object_hash(this.$shape, this._0, B.C_SentinelValue, B.C_SentinelValue); - } - }; - A._Record3.prototype = { - _getFieldValues$0() { - return [this._0, this._1, this._2]; - }, - $eq(_, other) { - var _this = this; - if (other == null) - return false; - return other instanceof A._Record3 && _this.$shape === other.$shape && J.$eq$(_this._0, other._0) && J.$eq$(_this._1, other._1) && J.$eq$(_this._2, other._2); - }, - get$hashCode(_) { - var _this = this; - return A.Object_hash(_this.$shape, _this._0, _this._1, _this._2); - } - }; - A._RecordN.prototype = { - _getFieldValues$0() { - return this._values; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A._RecordN && this.$shape === other.$shape && A._RecordN__equalValues(this._values, other._values); - }, - get$hashCode(_) { - return A.Object_hash(this.$shape, A.Object_hashAll(this._values), B.C_SentinelValue, B.C_SentinelValue); - } - }; - A.JSSyntaxRegExp.prototype = { - toString$0(_) { - return "RegExp/" + this.pattern + "/" + this._nativeRegExp.flags; - }, - get$_nativeGlobalVersion() { - var _this = this, - t1 = _this._nativeGlobalRegExp; - if (t1 != null) - return t1; - t1 = _this._nativeRegExp; - return _this._nativeGlobalRegExp = A.JSSyntaxRegExp_makeNative(_this.pattern, t1.multiline, !t1.ignoreCase, t1.unicode, t1.dotAll, true); - }, - get$_nativeAnchoredVersion() { - var _this = this, - t1 = _this._nativeAnchoredRegExp; - if (t1 != null) - return t1; - t1 = _this._nativeRegExp; - return _this._nativeAnchoredRegExp = A.JSSyntaxRegExp_makeNative(_this.pattern + "|()", t1.multiline, !t1.ignoreCase, t1.unicode, t1.dotAll, true); - }, - firstMatch$1(string) { - var m = this._nativeRegExp.exec(string); - if (m == null) - return null; - return new A._MatchImplementation(m); - }, - allMatches$2(_, string, start) { - var t1 = string.length; - if (start > t1) - throw A.wrapException(A.RangeError$range(start, 0, t1, null, null)); - return new A._AllMatchesIterable(this, string, start); - }, - allMatches$1(_, string) { - return this.allMatches$2(0, string, 0); - }, - _execGlobal$2(string, start) { - var match, - regexp = this.get$_nativeGlobalVersion(); - regexp.lastIndex = start; - match = regexp.exec(string); - if (match == null) - return null; - return new A._MatchImplementation(match); - }, - _execAnchored$2(string, start) { - var match, - regexp = this.get$_nativeAnchoredVersion(); - regexp.lastIndex = start; - match = regexp.exec(string); - if (match == null) - return null; - if (match.pop() != null) - return null; - return new A._MatchImplementation(match); - }, - matchAsPrefix$2(_, string, start) { - if (start < 0 || start > string.length) - throw A.wrapException(A.RangeError$range(start, 0, string.length, null, null)); - return this._execAnchored$2(string, start); - } - }; - A._MatchImplementation.prototype = { - get$start(_) { - return this._match.index; - }, - get$end(_) { - var t1 = this._match; - return t1.index + t1[0].length; - }, - namedGroup$1($name) { - var result, - groups = this._match.groups; - if (groups != null) { - result = groups[$name]; - if (result != null || $name in groups) - return result; - } - throw A.wrapException(A.ArgumentError$value($name, "name", "Not a capture group name")); - }, - $isMatch: 1, - $isRegExpMatch: 1 - }; - A._AllMatchesIterable.prototype = { - get$iterator(_) { - return new A._AllMatchesIterator(this._re, this.__js_helper$_string, this.__js_helper$_start); - } - }; - A._AllMatchesIterator.prototype = { - get$current(_) { - var t1 = this.__js_helper$_current; - return t1 == null ? type$.RegExpMatch._as(t1) : t1; - }, - moveNext$0() { - var t1, t2, t3, match, nextIndex, t4, _this = this, - string = _this.__js_helper$_string; - if (string == null) - return false; - t1 = _this._nextIndex; - t2 = string.length; - if (t1 <= t2) { - t3 = _this._regExp; - match = t3._execGlobal$2(string, t1); - if (match != null) { - _this.__js_helper$_current = match; - nextIndex = match.get$end(0); - if (match._match.index === nextIndex) { - t1 = false; - if (t3._nativeRegExp.unicode) { - t3 = _this._nextIndex; - t4 = t3 + 1; - if (t4 < t2) { - t2 = string.charCodeAt(t3); - if (t2 >= 55296 && t2 <= 56319) { - t1 = string.charCodeAt(t4); - t1 = t1 >= 56320 && t1 <= 57343; - } - } - } - nextIndex = (t1 ? nextIndex + 1 : nextIndex) + 1; - } - _this._nextIndex = nextIndex; - return true; - } - } - _this.__js_helper$_string = _this.__js_helper$_current = null; - return false; - } - }; - A.StringMatch.prototype = { - get$end(_) { - return this.start + this.pattern.length; - }, - $isMatch: 1, - get$start(receiver) { - return this.start; - } - }; - A._StringAllMatchesIterable.prototype = { - get$iterator(_) { - return new A._StringAllMatchesIterator(this._input, this._pattern, this.__js_helper$_index); - }, - get$first(_) { - var t1 = this._pattern, - index = this._input.indexOf(t1, this.__js_helper$_index); - if (index >= 0) - return new A.StringMatch(index, t1); - throw A.wrapException(A.IterableElementError_noElement()); - } - }; - A._StringAllMatchesIterator.prototype = { - moveNext$0() { - var index, end, _this = this, - t1 = _this.__js_helper$_index, - t2 = _this._pattern, - t3 = t2.length, - t4 = _this._input, - t5 = t4.length; - if (t1 + t3 > t5) { - _this.__js_helper$_current = null; - return false; - } - index = t4.indexOf(t2, t1); - if (index < 0) { - _this.__js_helper$_index = t5 + 1; - _this.__js_helper$_current = null; - return false; - } - end = index + t3; - _this.__js_helper$_current = new A.StringMatch(index, t2); - _this.__js_helper$_index = end === _this.__js_helper$_index ? end + 1 : end; - return true; - }, - get$current(_) { - var t1 = this.__js_helper$_current; - t1.toString; - return t1; - } - }; - A._Cell.prototype = { - readLocal$1$0() { - var t1 = this.__late_helper$_value; - if (t1 === this) - A.throwExpression(new A.LateError("Local '' has not been initialized.")); - return t1; - }, - readLocal$0() { - return this.readLocal$1$0(type$.dynamic); - }, - _readLocal$0() { - var t1 = this.__late_helper$_value; - if (t1 === this) - throw A.wrapException(new A.LateError("Local '' has not been initialized.")); - return t1; - } - }; - A.NativeByteBuffer.prototype = { - get$runtimeType(receiver) { - return B.Type_ByteBuffer_EOZ; - }, - $isTrustedGetRuntimeType: 1, - $isByteBuffer: 1 - }; - A.NativeTypedData.prototype = { - _invalidPosition$3(receiver, position, $length, $name) { - var t1 = A.RangeError$range(position, 0, $length, $name, null); - throw A.wrapException(t1); - }, - _checkPosition$3(receiver, position, $length, $name) { - if (position >>> 0 !== position || position > $length) - this._invalidPosition$3(receiver, position, $length, $name); - } - }; - A.NativeByteData.prototype = { - get$runtimeType(receiver) { - return B.Type_ByteData_mF8; - }, - $isTrustedGetRuntimeType: 1, - $isByteData: 1 - }; - A.NativeTypedArray.prototype = { - get$length(receiver) { - return receiver.length; - }, - _setRangeFast$4(receiver, start, end, source, skipCount) { - var count, sourceLength, - targetLength = receiver.length; - this._checkPosition$3(receiver, start, targetLength, "start"); - this._checkPosition$3(receiver, end, targetLength, "end"); - if (start > end) - throw A.wrapException(A.RangeError$range(start, 0, end, null, null)); - count = end - start; - if (skipCount < 0) - throw A.wrapException(A.ArgumentError$(skipCount, null)); - sourceLength = source.length; - if (sourceLength - skipCount < count) - throw A.wrapException(A.StateError$("Not enough elements")); - if (skipCount !== 0 || sourceLength !== count) - source = source.subarray(skipCount, skipCount + count); - receiver.set(source, start); - }, - $isJavaScriptIndexingBehavior: 1 - }; - A.NativeTypedArrayOfDouble.prototype = { - $index(receiver, index) { - A._checkValidIndex(index, receiver, receiver.length); - return receiver[index]; - }, - $indexSet(receiver, index, value) { - A._checkValidIndex(index, receiver, receiver.length); - receiver[index] = value; - }, - setRange$4(receiver, start, end, iterable, skipCount) { - if (type$.NativeTypedArrayOfDouble._is(iterable)) { - this._setRangeFast$4(receiver, start, end, iterable, skipCount); - return; - } - this.super$ListBase$setRange(receiver, start, end, iterable, skipCount); - }, - $isEfficientLengthIterable: 1, - $isIterable: 1, - $isList: 1 - }; - A.NativeTypedArrayOfInt.prototype = { - $indexSet(receiver, index, value) { - A._checkValidIndex(index, receiver, receiver.length); - receiver[index] = value; - }, - setRange$4(receiver, start, end, iterable, skipCount) { - if (type$.NativeTypedArrayOfInt._is(iterable)) { - this._setRangeFast$4(receiver, start, end, iterable, skipCount); - return; - } - this.super$ListBase$setRange(receiver, start, end, iterable, skipCount); - }, - $isEfficientLengthIterable: 1, - $isIterable: 1, - $isList: 1 - }; - A.NativeFloat32List.prototype = { - get$runtimeType(receiver) { - return B.Type_Float32List_Ymk; - }, - sublist$2(receiver, start, end) { - return new Float32Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); - }, - sublist$1(receiver, start) { - return this.sublist$2(receiver, start, null); - }, - $isTrustedGetRuntimeType: 1, - $isFloat32List: 1 - }; - A.NativeFloat64List.prototype = { - get$runtimeType(receiver) { - return B.Type_Float64List_Ymk; - }, - sublist$2(receiver, start, end) { - return new Float64Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); - }, - sublist$1(receiver, start) { - return this.sublist$2(receiver, start, null); - }, - $isTrustedGetRuntimeType: 1, - $isFloat64List: 1 - }; - A.NativeInt16List.prototype = { - get$runtimeType(receiver) { - return B.Type_Int16List_cot; - }, - $index(receiver, index) { - A._checkValidIndex(index, receiver, receiver.length); - return receiver[index]; - }, - sublist$2(receiver, start, end) { - return new Int16Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); - }, - sublist$1(receiver, start) { - return this.sublist$2(receiver, start, null); - }, - $isTrustedGetRuntimeType: 1, - $isInt16List: 1 - }; - A.NativeInt32List.prototype = { - get$runtimeType(receiver) { - return B.Type_Int32List_m1p; - }, - $index(receiver, index) { - A._checkValidIndex(index, receiver, receiver.length); - return receiver[index]; - }, - sublist$2(receiver, start, end) { - return new Int32Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); - }, - sublist$1(receiver, start) { - return this.sublist$2(receiver, start, null); - }, - $isTrustedGetRuntimeType: 1, - $isInt32List: 1 - }; - A.NativeInt8List.prototype = { - get$runtimeType(receiver) { - return B.Type_Int8List_woc; - }, - $index(receiver, index) { - A._checkValidIndex(index, receiver, receiver.length); - return receiver[index]; - }, - sublist$2(receiver, start, end) { - return new Int8Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); - }, - sublist$1(receiver, start) { - return this.sublist$2(receiver, start, null); - }, - $isTrustedGetRuntimeType: 1, - $isInt8List: 1 - }; - A.NativeUint16List.prototype = { - get$runtimeType(receiver) { - return B.Type_Uint16List_2mh; - }, - $index(receiver, index) { - A._checkValidIndex(index, receiver, receiver.length); - return receiver[index]; - }, - sublist$2(receiver, start, end) { - return new Uint16Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); - }, - sublist$1(receiver, start) { - return this.sublist$2(receiver, start, null); - }, - $isTrustedGetRuntimeType: 1, - $isUint16List: 1 - }; - A.NativeUint32List.prototype = { - get$runtimeType(receiver) { - return B.Type_Uint32List_2mh; - }, - $index(receiver, index) { - A._checkValidIndex(index, receiver, receiver.length); - return receiver[index]; - }, - sublist$2(receiver, start, end) { - return new Uint32Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); - }, - sublist$1(receiver, start) { - return this.sublist$2(receiver, start, null); - }, - $isTrustedGetRuntimeType: 1, - $isUint32List: 1 - }; - A.NativeUint8ClampedList.prototype = { - get$runtimeType(receiver) { - return B.Type_Uint8ClampedList_9Bb; - }, - get$length(receiver) { - return receiver.length; - }, - $index(receiver, index) { - A._checkValidIndex(index, receiver, receiver.length); - return receiver[index]; - }, - sublist$2(receiver, start, end) { - return new Uint8ClampedArray(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); - }, - sublist$1(receiver, start) { - return this.sublist$2(receiver, start, null); - }, - $isTrustedGetRuntimeType: 1, - $isUint8ClampedList: 1 - }; - A.NativeUint8List.prototype = { - get$runtimeType(receiver) { - return B.Type_Uint8List_CSc; - }, - get$length(receiver) { - return receiver.length; - }, - $index(receiver, index) { - A._checkValidIndex(index, receiver, receiver.length); - return receiver[index]; - }, - sublist$2(receiver, start, end) { - return new Uint8Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); - }, - sublist$1(receiver, start) { - return this.sublist$2(receiver, start, null); - }, - $isTrustedGetRuntimeType: 1, - $isNativeUint8List: 1, - $isUint8List: 1 - }; - A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.prototype = {}; - A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; - A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.prototype = {}; - A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; - A.Rti.prototype = { - _eval$1(recipe) { - return A._Universe_evalInEnvironment(init.typeUniverse, this, recipe); - }, - _bind$1(typeOrTuple) { - return A._Universe_bind(init.typeUniverse, this, typeOrTuple); - } - }; - A._FunctionParameters.prototype = {}; - A._Type.prototype = { - toString$0(_) { - return A._rtiToString(this._rti, null); - } - }; - A._Error.prototype = { - toString$0(_) { - return this.__rti$_message; - } - }; - A._TypeError.prototype = { - get$message(_) { - return this.__rti$_message; - }, - $isTypeError: 1 - }; - A._AsyncRun__initializeScheduleImmediate_internalCallback.prototype = { - call$1(_) { - var t1 = this._box_0, - f = t1.storedCallback; - t1.storedCallback = null; - f.call$0(); - }, - $signature: 63 - }; - A._AsyncRun__initializeScheduleImmediate_closure.prototype = { - call$1(callback) { - var t1, t2; - this._box_0.storedCallback = callback; - t1 = this.div; - t2 = this.span; - t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); - }, - $signature: 37 - }; - A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { - call$0() { - this.callback.call$0(); - }, - $signature: 1 - }; - A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { - call$0() { - this.callback.call$0(); - }, - $signature: 1 - }; - A._TimerImpl.prototype = { - _TimerImpl$2(milliseconds, callback) { - if (self.setTimeout != null) - this._handle = self.setTimeout(A.convertDartClosureToJS(new A._TimerImpl_internalCallback(this, callback), 0), milliseconds); - else - throw A.wrapException(A.UnsupportedError$("`setTimeout()` not found.")); - }, - _TimerImpl$periodic$2(milliseconds, callback) { - if (self.setTimeout != null) - this._handle = self.setInterval(A.convertDartClosureToJS(new A._TimerImpl$periodic_closure(this, milliseconds, Date.now(), callback), 0), milliseconds); - else - throw A.wrapException(A.UnsupportedError$("Periodic timer.")); - }, - cancel$0() { - if (self.setTimeout != null) { - var t1 = this._handle; - if (t1 == null) - return; - if (this._once) - self.clearTimeout(t1); - else - self.clearInterval(t1); - this._handle = null; - } else - throw A.wrapException(A.UnsupportedError$("Canceling a timer.")); - } - }; - A._TimerImpl_internalCallback.prototype = { - call$0() { - var t1 = this.$this; - t1._handle = null; - t1._tick = 1; - this.callback.call$0(); - }, - $signature: 0 - }; - A._TimerImpl$periodic_closure.prototype = { - call$0() { - var duration, _this = this, - t1 = _this.$this, - tick = t1._tick + 1, - t2 = _this.milliseconds; - if (t2 > 0) { - duration = Date.now() - _this.start; - if (duration > (tick + 1) * t2) - tick = B.JSInt_methods.$tdiv(duration, t2); - } - t1._tick = tick; - _this.callback.call$1(t1); - }, - $signature: 1 - }; - A._AsyncAwaitCompleter.prototype = { - complete$1(value) { - var t1, _this = this; - if (value == null) - value = _this.$ti._precomputed1._as(value); - if (!_this.isSync) - _this._future._asyncComplete$1(value); - else { - t1 = _this._future; - if (_this.$ti._eval$1("Future<1>")._is(value)) - t1._chainFuture$1(value); - else - t1._completeWithValue$1(value); - } - }, - completeError$2(e, st) { - var t1 = this._future; - if (this.isSync) - t1._completeError$2(e, st); - else - t1._asyncCompleteError$2(e, st); - } - }; - A._awaitOnObject_closure.prototype = { - call$1(result) { - return this.bodyFunction.call$2(0, result); - }, - $signature: 68 - }; - A._awaitOnObject_closure0.prototype = { - call$2(error, stackTrace) { - this.bodyFunction.call$2(1, new A.ExceptionAndStackTrace(error, stackTrace)); - }, - $signature: 594 - }; - A._wrapJsFunctionForAsync_closure.prototype = { - call$2(errorCode, result) { - this.$protected(errorCode, result); - }, - $signature: 542 - }; - A._SyncStarIterator.prototype = { - get$current(_) { - return this._async$_current; - }, - _resumeBody$2(errorCode, errorValue) { - var body, t1, exception; - errorCode = errorCode; - errorValue = errorValue; - body = this._body; - for (; true;) - try { - t1 = body(this, errorCode, errorValue); - return t1; - } catch (exception) { - errorValue = exception; - errorCode = 1; - } - }, - moveNext$0() { - var nestedIterator, exception, value, suspendedBodies, _this = this, errorValue = null, errorCode = 0; - for (; true;) { - nestedIterator = _this._nestedIterator; - if (nestedIterator != null) - try { - if (nestedIterator.moveNext$0()) { - _this._async$_current = J.get$current$x(nestedIterator); - return true; - } else - _this._nestedIterator = null; - } catch (exception) { - errorValue = exception; - errorCode = 1; - _this._nestedIterator = null; - } - value = _this._resumeBody$2(errorCode, errorValue); - if (1 === value) - return true; - if (0 === value) { - _this._async$_current = null; - suspendedBodies = _this._suspendedBodies; - if (suspendedBodies == null || suspendedBodies.length === 0) { - _this._body = A._SyncStarIterator__terminatedBody; - return false; - } - _this._body = suspendedBodies.pop(); - errorCode = 0; - errorValue = null; - continue; - } - if (2 === value) { - errorCode = 0; - errorValue = null; - continue; - } - if (3 === value) { - errorValue = _this._datum; - _this._datum = null; - suspendedBodies = _this._suspendedBodies; - if (suspendedBodies == null || suspendedBodies.length === 0) { - _this._async$_current = null; - _this._body = A._SyncStarIterator__terminatedBody; - throw errorValue; - return false; - } - _this._body = suspendedBodies.pop(); - errorCode = 1; - continue; - } - throw A.wrapException(A.StateError$("sync*")); - } - return false; - }, - _yieldStar$1(iterable) { - var t1, t2, _this = this; - if (iterable instanceof A._SyncStarIterable) { - t1 = iterable._outerHelper(); - t2 = _this._suspendedBodies; - if (t2 == null) - t2 = _this._suspendedBodies = []; - t2.push(_this._body); - _this._body = t1; - return 2; - } else { - _this._nestedIterator = J.get$iterator$ax(iterable); - return 2; - } - } - }; - A._SyncStarIterable.prototype = { - get$iterator(_) { - return new A._SyncStarIterator(this._outerHelper()); - } - }; - A.AsyncError.prototype = { - toString$0(_) { - return A.S(this.error); - }, - $isError: 1, - get$stackTrace() { - return this.stackTrace; - } - }; - A.Future_wait_handleError.prototype = { - call$2(theError, theStackTrace) { - var _this = this, - t1 = _this._box_0, - t2 = --t1.remaining; - if (t1.values != null) { - t1.values = null; - t1.error = theError; - t1.stackTrace = theStackTrace; - if (t2 === 0 || _this.eagerError) - _this._future._completeError$2(theError, theStackTrace); - } else if (t2 === 0 && !_this.eagerError) { - t2 = t1.error; - t2.toString; - t1 = t1.stackTrace; - t1.toString; - _this._future._completeError$2(t2, t1); - } - }, - $signature: 69 - }; - A.Future_wait_closure.prototype = { - call$1(value) { - var t1, value0, t3, t4, _i, t5, _this = this, - t2 = _this._box_0, - remainingResults = --t2.remaining, - valueList = t2.values; - if (valueList != null) { - J.$indexSet$ax(valueList, _this.pos, value); - if (J.$eq$(remainingResults, 0)) { - t2 = _this.T; - t1 = A._setArrayType([], t2._eval$1("JSArray<0>")); - for (t3 = valueList, t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { - value0 = t3[_i]; - t5 = value0; - if (t5 == null) - t5 = t2._as(t5); - J.add$1$ax(t1, t5); - } - _this._future._completeWithValue$1(t1); - } - } else if (J.$eq$(remainingResults, 0) && !_this.eagerError) { - t1 = t2.error; - t1.toString; - t2 = t2.stackTrace; - t2.toString; - _this._future._completeError$2(t1, t2); - } - }, - $signature() { - return this.T._eval$1("Null(0)"); - } - }; - A._Completer.prototype = { - completeError$2(error, stackTrace) { - var replacement; - A.checkNotNullable(error, "error", type$.Object); - if ((this.future._state & 30) !== 0) - throw A.wrapException(A.StateError$("Future already completed")); - replacement = $.Zone__current.errorCallback$2(error, stackTrace); - if (replacement != null) { - error = replacement.error; - stackTrace = replacement.stackTrace; - } else if (stackTrace == null) - stackTrace = A.AsyncError_defaultStackTrace(error); - this._completeError$2(error, stackTrace); - }, - completeError$1(error) { - return this.completeError$2(error, null); - } - }; - A._AsyncCompleter.prototype = { - complete$1(value) { - var t1 = this.future; - if ((t1._state & 30) !== 0) - throw A.wrapException(A.StateError$("Future already completed")); - t1._asyncComplete$1(value); - }, - complete$0() { - return this.complete$1(null); - }, - _completeError$2(error, stackTrace) { - this.future._asyncCompleteError$2(error, stackTrace); - } - }; - A._SyncCompleter.prototype = { - complete$1(value) { - var t1 = this.future; - if ((t1._state & 30) !== 0) - throw A.wrapException(A.StateError$("Future already completed")); - t1._complete$1(value); - }, - _completeError$2(error, stackTrace) { - this.future._completeError$2(error, stackTrace); - } - }; - A._FutureListener.prototype = { - matchesErrorTest$1(asyncError) { - if ((this.state & 15) !== 6) - return true; - return this.result._zone.runUnary$2$2(this.callback, asyncError.error, type$.bool, type$.Object); - }, - handleError$1(asyncError) { - var exception, - errorCallback = this.errorCallback, - result = null, - t1 = type$.dynamic, - t2 = type$.Object, - t3 = asyncError.error, - t4 = this.result._zone; - if (type$.dynamic_Function_Object_StackTrace._is(errorCallback)) - result = t4.runBinary$3$3(errorCallback, t3, asyncError.stackTrace, t1, t2, type$.StackTrace); - else - result = t4.runUnary$2$2(errorCallback, t3, t1, t2); - try { - t1 = result; - return t1; - } catch (exception) { - if (type$.TypeError._is(A.unwrapException(exception))) { - if ((this.state & 1) !== 0) - throw A.wrapException(A.ArgumentError$("The error handler of Future.then must return a value of the returned future's type", "onError")); - throw A.wrapException(A.ArgumentError$("The error handler of Future.catchError must return a value of the future's type", "onError")); - } else - throw exception; - } - } - }; - A._Future.prototype = { - _setChained$1(source) { - this._state = this._state & 1 | 4; - this._resultOrListeners = source; - }, - then$1$2$onError(_, f, onError, $R) { - var result, t1, - currentZone = $.Zone__current; - if (currentZone === B.C__RootZone) { - if (onError != null && !type$.dynamic_Function_Object_StackTrace._is(onError) && !type$.dynamic_Function_Object._is(onError)) - throw A.wrapException(A.ArgumentError$value(onError, "onError", string$.Error_)); - } else { - f = currentZone.registerUnaryCallback$2$1(f, $R._eval$1("0/"), this.$ti._precomputed1); - if (onError != null) - onError = A._registerErrorHandler(onError, currentZone); - } - result = new A._Future($.Zone__current, $R._eval$1("_Future<0>")); - t1 = onError == null ? 1 : 3; - this._addListener$1(new A._FutureListener(result, t1, f, onError, this.$ti._eval$1("@<1>")._bind$1($R)._eval$1("_FutureListener<1,2>"))); - return result; - }, - then$1$1(_, f, $R) { - return this.then$1$2$onError(0, f, null, $R); - }, - _thenAwait$1$2(f, onError, $E) { - var result = new A._Future($.Zone__current, $E._eval$1("_Future<0>")); - this._addListener$1(new A._FutureListener(result, 19, f, onError, this.$ti._eval$1("@<1>")._bind$1($E)._eval$1("_FutureListener<1,2>"))); - return result; - }, - catchError$1(onError) { - var t1 = this.$ti, - t2 = $.Zone__current, - result = new A._Future(t2, t1); - if (t2 !== B.C__RootZone) - onError = A._registerErrorHandler(onError, t2); - this._addListener$1(new A._FutureListener(result, 2, null, onError, t1._eval$1("_FutureListener<1,1>"))); - return result; - }, - whenComplete$1(action) { - var t1 = this.$ti, - t2 = $.Zone__current, - result = new A._Future(t2, t1); - if (t2 !== B.C__RootZone) - action = t2.registerCallback$1$1(action, type$.dynamic); - this._addListener$1(new A._FutureListener(result, 8, action, null, t1._eval$1("_FutureListener<1,1>"))); - return result; - }, - _setErrorObject$1(error) { - this._state = this._state & 1 | 16; - this._resultOrListeners = error; - }, - _cloneResult$1(source) { - this._state = source._state & 30 | this._state & 1; - this._resultOrListeners = source._resultOrListeners; - }, - _addListener$1(listener) { - var _this = this, - t1 = _this._state; - if (t1 <= 3) { - listener._nextListener = _this._resultOrListeners; - _this._resultOrListeners = listener; - } else { - if ((t1 & 4) !== 0) { - t1 = _this._resultOrListeners; - if ((t1._state & 24) === 0) { - t1._addListener$1(listener); - return; - } - _this._cloneResult$1(t1); - } - _this._zone.scheduleMicrotask$1(new A._Future__addListener_closure(_this, listener)); - } - }, - _prependListeners$1(listeners) { - var t1, existingListeners, next, cursor, next0, _this = this, _box_0 = {}; - _box_0.listeners = listeners; - if (listeners == null) - return; - t1 = _this._state; - if (t1 <= 3) { - existingListeners = _this._resultOrListeners; - _this._resultOrListeners = listeners; - if (existingListeners != null) { - next = listeners._nextListener; - for (cursor = listeners; next != null; cursor = next, next = next0) - next0 = next._nextListener; - cursor._nextListener = existingListeners; - } - } else { - if ((t1 & 4) !== 0) { - t1 = _this._resultOrListeners; - if ((t1._state & 24) === 0) { - t1._prependListeners$1(listeners); - return; - } - _this._cloneResult$1(t1); - } - _box_0.listeners = _this._reverseListeners$1(listeners); - _this._zone.scheduleMicrotask$1(new A._Future__prependListeners_closure(_box_0, _this)); - } - }, - _removeListeners$0() { - var current = this._resultOrListeners; - this._resultOrListeners = null; - return this._reverseListeners$1(current); - }, - _reverseListeners$1(listeners) { - var current, prev, next; - for (current = listeners, prev = null; current != null; prev = current, current = next) { - next = current._nextListener; - current._nextListener = prev; - } - return prev; - }, - _chainForeignFuture$1(source) { - var e, s, exception, _this = this; - _this._state ^= 2; - try { - source.then$1$2$onError(0, new A._Future__chainForeignFuture_closure(_this), new A._Future__chainForeignFuture_closure0(_this), type$.Null); - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - A.scheduleMicrotask(new A._Future__chainForeignFuture_closure1(_this, e, s)); - } - }, - _complete$1(value) { - var listeners, _this = this, - t1 = _this.$ti; - if (t1._eval$1("Future<1>")._is(value)) - if (t1._is(value)) - A._Future__chainCoreFutureSync(value, _this); - else - _this._chainForeignFuture$1(value); - else { - listeners = _this._removeListeners$0(); - _this._state = 8; - _this._resultOrListeners = value; - A._Future__propagateToListeners(_this, listeners); - } - }, - _completeWithValue$1(value) { - var _this = this, - listeners = _this._removeListeners$0(); - _this._state = 8; - _this._resultOrListeners = value; - A._Future__propagateToListeners(_this, listeners); - }, - _completeError$2(error, stackTrace) { - var listeners = this._removeListeners$0(); - this._setErrorObject$1(A.AsyncError$(error, stackTrace)); - A._Future__propagateToListeners(this, listeners); - }, - _asyncComplete$1(value) { - if (this.$ti._eval$1("Future<1>")._is(value)) { - this._chainFuture$1(value); - return; - } - this._asyncCompleteWithValue$1(value); - }, - _asyncCompleteWithValue$1(value) { - this._state ^= 2; - this._zone.scheduleMicrotask$1(new A._Future__asyncCompleteWithValue_closure(this, value)); - }, - _chainFuture$1(value) { - if (this.$ti._is(value)) { - A._Future__chainCoreFutureAsync(value, this); - return; - } - this._chainForeignFuture$1(value); - }, - _asyncCompleteError$2(error, stackTrace) { - this._state ^= 2; - this._zone.scheduleMicrotask$1(new A._Future__asyncCompleteError_closure(this, error, stackTrace)); - }, - $isFuture: 1 - }; - A._Future__addListener_closure.prototype = { - call$0() { - A._Future__propagateToListeners(this.$this, this.listener); - }, - $signature: 0 - }; - A._Future__prependListeners_closure.prototype = { - call$0() { - A._Future__propagateToListeners(this.$this, this._box_0.listeners); - }, - $signature: 0 - }; - A._Future__chainForeignFuture_closure.prototype = { - call$1(value) { - var error, stackTrace, exception, - t1 = this.$this; - t1._state ^= 2; - try { - t1._completeWithValue$1(t1.$ti._precomputed1._as(value)); - } catch (exception) { - error = A.unwrapException(exception); - stackTrace = A.getTraceFromException(exception); - t1._completeError$2(error, stackTrace); - } - }, - $signature: 63 - }; - A._Future__chainForeignFuture_closure0.prototype = { - call$2(error, stackTrace) { - this.$this._completeError$2(error, stackTrace); - }, - $signature: 55 - }; - A._Future__chainForeignFuture_closure1.prototype = { - call$0() { - this.$this._completeError$2(this.e, this.s); - }, - $signature: 0 - }; - A._Future__chainCoreFutureAsync_closure.prototype = { - call$0() { - A._Future__chainCoreFutureSync(this._box_0.source, this.target); - }, - $signature: 0 - }; - A._Future__asyncCompleteWithValue_closure.prototype = { - call$0() { - this.$this._completeWithValue$1(this.value); - }, - $signature: 0 - }; - A._Future__asyncCompleteError_closure.prototype = { - call$0() { - this.$this._completeError$2(this.error, this.stackTrace); - }, - $signature: 0 - }; - A._Future__propagateToListeners_handleWhenCompleteCallback.prototype = { - call$0() { - var e, s, t1, exception, t2, originalSource, _this = this, completeResult = null; - try { - t1 = _this._box_0.listener; - completeResult = t1.result._zone.run$1$1(0, t1.callback, type$.dynamic); - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - t1 = _this.hasError && _this._box_1.source._resultOrListeners.error === e; - t2 = _this._box_0; - if (t1) - t2.listenerValueOrError = _this._box_1.source._resultOrListeners; - else - t2.listenerValueOrError = A.AsyncError$(e, s); - t2.listenerHasError = true; - return; - } - if (completeResult instanceof A._Future && (completeResult._state & 24) !== 0) { - if ((completeResult._state & 16) !== 0) { - t1 = _this._box_0; - t1.listenerValueOrError = completeResult._resultOrListeners; - t1.listenerHasError = true; - } - return; - } - if (completeResult instanceof A._Future) { - originalSource = _this._box_1.source; - t1 = _this._box_0; - t1.listenerValueOrError = J.then$1$1$x(completeResult, new A._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), type$.dynamic); - t1.listenerHasError = false; - } - }, - $signature: 0 - }; - A._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = { - call$1(_) { - return this.originalSource; - }, - $signature: 426 - }; - A._Future__propagateToListeners_handleValueCallback.prototype = { - call$0() { - var e, s, t1, t2, t3, exception; - try { - t1 = this._box_0; - t2 = t1.listener; - t3 = t2.$ti; - t1.listenerValueOrError = t2.result._zone.runUnary$2$2(t2.callback, this.sourceResult, t3._eval$1("2/"), t3._precomputed1); - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - t1 = this._box_0; - t1.listenerValueOrError = A.AsyncError$(e, s); - t1.listenerHasError = true; - } - }, - $signature: 0 - }; - A._Future__propagateToListeners_handleError.prototype = { - call$0() { - var asyncError, e, s, t1, exception, t2, _this = this; - try { - asyncError = _this._box_1.source._resultOrListeners; - t1 = _this._box_0; - if (t1.listener.matchesErrorTest$1(asyncError) && t1.listener.errorCallback != null) { - t1.listenerValueOrError = t1.listener.handleError$1(asyncError); - t1.listenerHasError = false; - } - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - t1 = _this._box_1.source._resultOrListeners; - t2 = _this._box_0; - if (t1.error === e) - t2.listenerValueOrError = t1; - else - t2.listenerValueOrError = A.AsyncError$(e, s); - t2.listenerHasError = true; - } - }, - $signature: 0 - }; - A._AsyncCallbackEntry.prototype = {}; - A.Stream.prototype = { - get$isBroadcast() { - return false; - }, - get$length(_) { - var t1 = {}, - future = new A._Future($.Zone__current, type$._Future_int); - t1.count = 0; - this.listen$4$cancelOnError$onDone$onError(0, new A.Stream_length_closure(t1, this), true, new A.Stream_length_closure0(t1, future), future.get$_completeError()); - return future; - } - }; - A.Stream_Stream$fromFuture_closure.prototype = { - call$1(value) { - var t1 = this.controller; - t1._async$_add$1(value); - t1._closeUnchecked$0(); - }, - $signature() { - return this.T._eval$1("Null(0)"); - } - }; - A.Stream_Stream$fromFuture_closure0.prototype = { - call$2(error, stackTrace) { - var t1 = this.controller; - t1._addError$2(error, stackTrace); - t1._closeUnchecked$0(); - }, - $signature: 474 - }; - A.Stream_length_closure.prototype = { - call$1(_) { - ++this._box_0.count; - }, - $signature() { - return A._instanceType(this.$this)._eval$1("~(Stream.T)"); - } - }; - A.Stream_length_closure0.prototype = { - call$0() { - this.future._complete$1(this._box_0.count); - }, - $signature: 0 - }; - A._StreamController.prototype = { - get$stream() { - return new A._ControllerStream(this, A._instanceType(this)._eval$1("_ControllerStream<1>")); - }, - get$_pendingEvents() { - if ((this._state & 8) === 0) - return this._varData; - return this._varData._varData; - }, - _ensurePendingEvents$0() { - var events, state, _this = this; - if ((_this._state & 8) === 0) { - events = _this._varData; - return events == null ? _this._varData = new A._PendingEvents() : events; - } - state = _this._varData; - events = state._varData; - return events == null ? state._varData = new A._PendingEvents() : events; - }, - get$_subscription() { - var varData = this._varData; - return (this._state & 8) !== 0 ? varData._varData : varData; - }, - _badEventState$0() { - if ((this._state & 4) !== 0) - return new A.StateError("Cannot add event after closing"); - return new A.StateError("Cannot add event while adding a stream"); - }, - addStream$2$cancelOnError(source, cancelOnError) { - var t2, t3, t4, _this = this, - t1 = _this._state; - if (t1 >= 4) - throw A.wrapException(_this._badEventState$0()); - if ((t1 & 2) !== 0) { - t1 = new A._Future($.Zone__current, type$._Future_dynamic); - t1._asyncComplete$1(null); - return t1; - } - t1 = _this._varData; - t2 = cancelOnError === true; - t3 = new A._Future($.Zone__current, type$._Future_dynamic); - t4 = t2 ? A._AddStreamState_makeErrorHandler(_this) : _this.get$_addError(); - t4 = source.listen$4$cancelOnError$onDone$onError(0, _this.get$_async$_add(), t2, _this.get$_close(), t4); - t2 = _this._state; - if ((t2 & 1) !== 0 ? (_this.get$_subscription()._state & 4) !== 0 : (t2 & 2) === 0) - t4.pause$0(0); - _this._varData = new A._StreamControllerAddStreamState(t1, t3, t4); - _this._state |= 8; - return t3; - }, - _ensureDoneFuture$0() { - var t1 = this._doneFuture; - if (t1 == null) - t1 = this._doneFuture = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new A._Future($.Zone__current, type$._Future_void); - return t1; - }, - add$1(_, value) { - if (this._state >= 4) - throw A.wrapException(this._badEventState$0()); - this._async$_add$1(value); - }, - addError$2(error, stackTrace) { - var replacement; - A.checkNotNullable(error, "error", type$.Object); - if (this._state >= 4) - throw A.wrapException(this._badEventState$0()); - replacement = $.Zone__current.errorCallback$2(error, stackTrace); - if (replacement != null) { - error = replacement.error; - stackTrace = replacement.stackTrace; - } else if (stackTrace == null) - stackTrace = A.AsyncError_defaultStackTrace(error); - this._addError$2(error, stackTrace); - }, - addError$1(error) { - return this.addError$2(error, null); - }, - close$0(_) { - var _this = this, - t1 = _this._state; - if ((t1 & 4) !== 0) - return _this._ensureDoneFuture$0(); - if (t1 >= 4) - throw A.wrapException(_this._badEventState$0()); - _this._closeUnchecked$0(); - return _this._ensureDoneFuture$0(); - }, - _closeUnchecked$0() { - var t1 = this._state |= 4; - if ((t1 & 1) !== 0) - this._sendDone$0(); - else if ((t1 & 3) === 0) - this._ensurePendingEvents$0().add$1(0, B.C__DelayedDone); - }, - _async$_add$1(value) { - var t1 = this._state; - if ((t1 & 1) !== 0) - this._sendData$1(value); - else if ((t1 & 3) === 0) - this._ensurePendingEvents$0().add$1(0, new A._DelayedData(value)); - }, - _addError$2(error, stackTrace) { - var t1 = this._state; - if ((t1 & 1) !== 0) - this._sendError$2(error, stackTrace); - else if ((t1 & 3) === 0) - this._ensurePendingEvents$0().add$1(0, new A._DelayedError(error, stackTrace)); - }, - _close$0() { - var addState = this._varData; - this._varData = addState._varData; - this._state &= 4294967287; - addState.addStreamFuture._asyncComplete$1(null); - }, - _subscribe$4(onData, onError, onDone, cancelOnError) { - var subscription, pendingEvents, t1, addState, _this = this; - if ((_this._state & 3) !== 0) - throw A.wrapException(A.StateError$("Stream has already been listened to.")); - subscription = A._ControllerSubscription$(_this, onData, onError, onDone, cancelOnError, A._instanceType(_this)._precomputed1); - pendingEvents = _this.get$_pendingEvents(); - t1 = _this._state |= 1; - if ((t1 & 8) !== 0) { - addState = _this._varData; - addState._varData = subscription; - addState.addSubscription.resume$0(0); - } else - _this._varData = subscription; - subscription._setPendingEvents$1(pendingEvents); - subscription._guardCallback$1(new A._StreamController__subscribe_closure(_this)); - return subscription; - }, - _recordCancel$1(subscription) { - var onCancel, cancelResult, e, s, exception, result0, t1, _this = this, result = null; - if ((_this._state & 8) !== 0) - result = _this._varData.cancel$0(); - _this._varData = null; - _this._state = _this._state & 4294967286 | 2; - onCancel = _this.onCancel; - if (onCancel != null) - if (result == null) - try { - cancelResult = onCancel.call$0(); - if (cancelResult instanceof A._Future) - result = cancelResult; - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - result0 = new A._Future($.Zone__current, type$._Future_void); - result0._asyncCompleteError$2(e, s); - result = result0; - } - else - result = result.whenComplete$1(onCancel); - t1 = new A._StreamController__recordCancel_complete(_this); - if (result != null) - result = result.whenComplete$1(t1); - else - t1.call$0(); - return result; - }, - _recordPause$1(subscription) { - if ((this._state & 8) !== 0) - this._varData.addSubscription.pause$0(0); - A._runGuarded(this.onPause); - }, - _recordResume$1(subscription) { - if ((this._state & 8) !== 0) - this._varData.addSubscription.resume$0(0); - A._runGuarded(this.onResume); - }, - $isEventSink: 1, - set$onPause(val) { - return this.onPause = val; - }, - set$onResume(val) { - return this.onResume = val; - }, - set$onCancel(val) { - return this.onCancel = val; - } - }; - A._StreamController__subscribe_closure.prototype = { - call$0() { - A._runGuarded(this.$this.onListen); - }, - $signature: 0 - }; - A._StreamController__recordCancel_complete.prototype = { - call$0() { - var doneFuture = this.$this._doneFuture; - if (doneFuture != null && (doneFuture._state & 30) === 0) - doneFuture._asyncComplete$1(null); - }, - $signature: 0 - }; - A._SyncStreamControllerDispatch.prototype = { - _sendData$1(data) { - this.get$_subscription()._async$_add$1(data); - }, - _sendError$2(error, stackTrace) { - this.get$_subscription()._addError$2(error, stackTrace); - }, - _sendDone$0() { - this.get$_subscription()._close$0(); - } - }; - A._AsyncStreamControllerDispatch.prototype = { - _sendData$1(data) { - this.get$_subscription()._addPending$1(new A._DelayedData(data)); - }, - _sendError$2(error, stackTrace) { - this.get$_subscription()._addPending$1(new A._DelayedError(error, stackTrace)); - }, - _sendDone$0() { - this.get$_subscription()._addPending$1(B.C__DelayedDone); - } - }; - A._AsyncStreamController.prototype = {}; - A._SyncStreamController.prototype = {}; - A._ControllerStream.prototype = { - get$hashCode(_) { - return (A.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0; - }, - $eq(_, other) { - if (other == null) - return false; - if (this === other) - return true; - return other instanceof A._ControllerStream && other._controller === this._controller; - } - }; - A._ControllerSubscription.prototype = { - _async$_onCancel$0() { - return this._controller._recordCancel$1(this); - }, - _async$_onPause$0() { - this._controller._recordPause$1(this); - }, - _async$_onResume$0() { - this._controller._recordResume$1(this); - } - }; - A._AddStreamState.prototype = { - cancel$0() { - var cancel = this.addSubscription.cancel$0(); - return cancel.whenComplete$1(new A._AddStreamState_cancel_closure(this)); - } - }; - A._AddStreamState_makeErrorHandler_closure.prototype = { - call$2(e, s) { - var t1 = this.controller; - t1._addError$2(e, s); - t1._close$0(); - }, - $signature: 55 - }; - A._AddStreamState_cancel_closure.prototype = { - call$0() { - this.$this.addStreamFuture._asyncComplete$1(null); - }, - $signature: 1 - }; - A._StreamControllerAddStreamState.prototype = {}; - A._BufferingStreamSubscription.prototype = { - _setPendingEvents$1(pendingEvents) { - var _this = this; - if (pendingEvents == null) - return; - _this._pending = pendingEvents; - if (pendingEvents.lastPendingEvent != null) { - _this._state = (_this._state | 128) >>> 0; - pendingEvents.schedule$1(_this); - } - }, - pause$1(_, resumeSignal) { - var t2, t3, _this = this, - t1 = _this._state; - if ((t1 & 8) !== 0) - return; - t2 = (t1 + 256 | 4) >>> 0; - _this._state = t2; - if (t1 < 256) { - t3 = _this._pending; - if (t3 != null) - if (t3._state === 1) - t3._state = 3; - } - if ((t1 & 4) === 0 && (t2 & 64) === 0) - _this._guardCallback$1(_this.get$_async$_onPause()); - }, - pause$0(_) { - return this.pause$1(0, null); - }, - resume$0(_) { - var _this = this, - t1 = _this._state; - if ((t1 & 8) !== 0) - return; - if (t1 >= 256) { - t1 = _this._state = t1 - 256; - if (t1 < 256) - if ((t1 & 128) !== 0 && _this._pending.lastPendingEvent != null) - _this._pending.schedule$1(_this); - else { - t1 = (t1 & 4294967291) >>> 0; - _this._state = t1; - if ((t1 & 64) === 0) - _this._guardCallback$1(_this.get$_async$_onResume()); - } - } - }, - cancel$0() { - var _this = this, - t1 = (_this._state & 4294967279) >>> 0; - _this._state = t1; - if ((t1 & 8) === 0) - _this._cancel$0(); - t1 = _this._cancelFuture; - return t1 == null ? $.$get$Future__nullFuture() : t1; - }, - _cancel$0() { - var t2, _this = this, - t1 = _this._state = (_this._state | 8) >>> 0; - if ((t1 & 128) !== 0) { - t2 = _this._pending; - if (t2._state === 1) - t2._state = 3; - } - if ((t1 & 64) === 0) - _this._pending = null; - _this._cancelFuture = _this._async$_onCancel$0(); - }, - _async$_add$1(data) { - var t1 = this._state; - if ((t1 & 8) !== 0) - return; - if (t1 < 64) - this._sendData$1(data); - else - this._addPending$1(new A._DelayedData(data)); - }, - _addError$2(error, stackTrace) { - var t1 = this._state; - if ((t1 & 8) !== 0) - return; - if (t1 < 64) - this._sendError$2(error, stackTrace); - else - this._addPending$1(new A._DelayedError(error, stackTrace)); - }, - _close$0() { - var _this = this, - t1 = _this._state; - if ((t1 & 8) !== 0) - return; - t1 = (t1 | 2) >>> 0; - _this._state = t1; - if (t1 < 64) - _this._sendDone$0(); - else - _this._addPending$1(B.C__DelayedDone); - }, - _async$_onPause$0() { - }, - _async$_onResume$0() { - }, - _async$_onCancel$0() { - return null; - }, - _addPending$1($event) { - var t1, _this = this, - pending = _this._pending; - if (pending == null) - pending = _this._pending = new A._PendingEvents(); - pending.add$1(0, $event); - t1 = _this._state; - if ((t1 & 128) === 0) { - t1 = (t1 | 128) >>> 0; - _this._state = t1; - if (t1 < 256) - pending.schedule$1(_this); - } - }, - _sendData$1(data) { - var _this = this, - t1 = _this._state; - _this._state = (t1 | 64) >>> 0; - _this._zone.runUnaryGuarded$1$2(_this._onData, data, A._instanceType(_this)._eval$1("_BufferingStreamSubscription.T")); - _this._state = (_this._state & 4294967231) >>> 0; - _this._checkState$1((t1 & 4) !== 0); - }, - _sendError$2(error, stackTrace) { - var cancelFuture, _this = this, - t1 = _this._state, - t2 = new A._BufferingStreamSubscription__sendError_sendError(_this, error, stackTrace); - if ((t1 & 1) !== 0) { - _this._state = (t1 | 16) >>> 0; - _this._cancel$0(); - cancelFuture = _this._cancelFuture; - if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) - cancelFuture.whenComplete$1(t2); - else - t2.call$0(); - } else { - t2.call$0(); - _this._checkState$1((t1 & 4) !== 0); - } - }, - _sendDone$0() { - var cancelFuture, _this = this, - t1 = new A._BufferingStreamSubscription__sendDone_sendDone(_this); - _this._cancel$0(); - _this._state = (_this._state | 16) >>> 0; - cancelFuture = _this._cancelFuture; - if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) - cancelFuture.whenComplete$1(t1); - else - t1.call$0(); - }, - _guardCallback$1(callback) { - var _this = this, - t1 = _this._state; - _this._state = (t1 | 64) >>> 0; - callback.call$0(); - _this._state = (_this._state & 4294967231) >>> 0; - _this._checkState$1((t1 & 4) !== 0); - }, - _checkState$1(wasInputPaused) { - var t2, isInputPaused, _this = this, - t1 = _this._state; - if ((t1 & 128) !== 0 && _this._pending.lastPendingEvent == null) { - t1 = _this._state = (t1 & 4294967167) >>> 0; - t2 = false; - if ((t1 & 4) !== 0) - if (t1 < 256) { - t2 = _this._pending; - t2 = t2 == null ? null : t2.lastPendingEvent == null; - t2 = t2 !== false; - } - if (t2) { - t1 = (t1 & 4294967291) >>> 0; - _this._state = t1; - } - } - for (; true; wasInputPaused = isInputPaused) { - if ((t1 & 8) !== 0) { - _this._pending = null; - return; - } - isInputPaused = (t1 & 4) !== 0; - if (wasInputPaused === isInputPaused) - break; - _this._state = (t1 ^ 64) >>> 0; - if (isInputPaused) - _this._async$_onPause$0(); - else - _this._async$_onResume$0(); - t1 = (_this._state & 4294967231) >>> 0; - _this._state = t1; - } - if ((t1 & 128) !== 0 && t1 < 256) - _this._pending.schedule$1(_this); - }, - $isStreamSubscription: 1 - }; - A._BufferingStreamSubscription__sendError_sendError.prototype = { - call$0() { - var onError, t3, t4, - t1 = this.$this, - t2 = t1._state; - if ((t2 & 8) !== 0 && (t2 & 16) === 0) - return; - t1._state = (t2 | 64) >>> 0; - onError = t1._onError; - t2 = this.error; - t3 = type$.Object; - t4 = t1._zone; - if (type$.void_Function_Object_StackTrace._is(onError)) - t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, type$.StackTrace); - else - t4.runUnaryGuarded$1$2(onError, t2, t3); - t1._state = (t1._state & 4294967231) >>> 0; - }, - $signature: 0 - }; - A._BufferingStreamSubscription__sendDone_sendDone.prototype = { - call$0() { - var t1 = this.$this, - t2 = t1._state; - if ((t2 & 16) === 0) - return; - t1._state = (t2 | 74) >>> 0; - t1._zone.runGuarded$1(t1._onDone); - t1._state = (t1._state & 4294967231) >>> 0; - }, - $signature: 0 - }; - A._StreamImpl.prototype = { - listen$4$cancelOnError$onDone$onError(_, onData, cancelOnError, onDone, onError) { - return this._controller._subscribe$4(onData, onError, onDone, cancelOnError === true); - }, - listen$1(_, onData) { - return this.listen$4$cancelOnError$onDone$onError(0, onData, null, null, null); - }, - listen$3$onDone$onError(_, onData, onDone, onError) { - return this.listen$4$cancelOnError$onDone$onError(0, onData, null, onDone, onError); - } - }; - A._DelayedEvent.prototype = { - get$next() { - return this.next; - }, - set$next(val) { - return this.next = val; - } - }; - A._DelayedData.prototype = { - perform$1(dispatch) { - dispatch._sendData$1(this.value); - } - }; - A._DelayedError.prototype = { - perform$1(dispatch) { - dispatch._sendError$2(this.error, this.stackTrace); - } - }; - A._DelayedDone.prototype = { - perform$1(dispatch) { - dispatch._sendDone$0(); - }, - get$next() { - return null; - }, - set$next(_) { - throw A.wrapException(A.StateError$("No events after a done.")); - } - }; - A._PendingEvents.prototype = { - schedule$1(dispatch) { - var _this = this, - t1 = _this._state; - if (t1 === 1) - return; - if (t1 >= 1) { - _this._state = 1; - return; - } - A.scheduleMicrotask(new A._PendingEvents_schedule_closure(_this, dispatch)); - _this._state = 1; - }, - add$1(_, $event) { - var _this = this, - lastEvent = _this.lastPendingEvent; - if (lastEvent == null) - _this.firstPendingEvent = _this.lastPendingEvent = $event; - else { - lastEvent.set$next($event); - _this.lastPendingEvent = $event; - } - } - }; - A._PendingEvents_schedule_closure.prototype = { - call$0() { - var $event, nextEvent, - t1 = this.$this, - oldState = t1._state; - t1._state = 0; - if (oldState === 3) - return; - $event = t1.firstPendingEvent; - nextEvent = $event.get$next(); - t1.firstPendingEvent = nextEvent; - if (nextEvent == null) - t1.lastPendingEvent = null; - $event.perform$1(this.dispatch); - }, - $signature: 0 - }; - A._StreamIterator.prototype = { - get$current(_) { - if (this._async$_hasValue) - return this._stateData; - return null; - }, - moveNext$0() { - var future, _this = this, - subscription = _this._subscription; - if (subscription != null) { - if (_this._async$_hasValue) { - future = new A._Future($.Zone__current, type$._Future_bool); - _this._stateData = future; - _this._async$_hasValue = false; - subscription.resume$0(0); - return future; - } - throw A.wrapException(A.StateError$("Already waiting for next.")); - } - return _this._initializeOrDone$0(); - }, - _initializeOrDone$0() { - var future, subscription, _this = this, - stateData = _this._stateData; - if (stateData != null) { - future = new A._Future($.Zone__current, type$._Future_bool); - _this._stateData = future; - subscription = stateData.listen$4$cancelOnError$onDone$onError(0, _this.get$_onData(), true, _this.get$_onDone(), _this.get$_onError()); - if (_this._stateData != null) - _this._subscription = subscription; - return future; - } - return $.$get$Future__falseFuture(); - }, - cancel$0() { - var _this = this, - subscription = _this._subscription, - stateData = _this._stateData; - _this._stateData = null; - if (subscription != null) { - _this._subscription = null; - if (!_this._async$_hasValue) - stateData._asyncComplete$1(false); - else - _this._async$_hasValue = false; - return subscription.cancel$0(); - } - return $.$get$Future__nullFuture(); - }, - _onData$1(data) { - var moveNextFuture, t1, _this = this; - if (_this._subscription == null) - return; - moveNextFuture = _this._stateData; - _this._stateData = data; - _this._async$_hasValue = true; - moveNextFuture._complete$1(true); - if (_this._async$_hasValue) { - t1 = _this._subscription; - if (t1 != null) - t1.pause$0(0); - } - }, - _onError$2(error, stackTrace) { - var _this = this, - subscription = _this._subscription, - moveNextFuture = _this._stateData; - _this._stateData = _this._subscription = null; - if (subscription != null) - moveNextFuture._completeError$2(error, stackTrace); - else - moveNextFuture._asyncCompleteError$2(error, stackTrace); - }, - _onDone$0() { - var _this = this, - subscription = _this._subscription, - moveNextFuture = _this._stateData; - _this._stateData = _this._subscription = null; - if (subscription != null) - moveNextFuture._completeWithValue$1(false); - else - moveNextFuture._asyncCompleteWithValue$1(false); - } - }; - A._ForwardingStream.prototype = { - get$isBroadcast() { - return this._async$_source.get$isBroadcast(); - }, - listen$4$cancelOnError$onDone$onError(_, onData, cancelOnError, onDone, onError) { - var t1 = this.$ti, - t2 = $.Zone__current, - t3 = cancelOnError === true ? 1 : 0, - t4 = onError != null ? 32 : 0, - t5 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._rest[1]), - t6 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError), - t7 = onDone == null ? A.async___nullDoneHandler$closure() : onDone; - t1 = new A._ForwardingStreamSubscription(this, t5, t6, t2.registerCallback$1$1(t7, type$.void), t2, t3 | t4, t1._eval$1("_ForwardingStreamSubscription<1,2>")); - t1._subscription = this._async$_source.listen$3$onDone$onError(0, t1.get$_handleData(), t1.get$_handleDone(), t1.get$_handleError()); - return t1; - }, - listen$1(_, onData) { - return this.listen$4$cancelOnError$onDone$onError(0, onData, null, null, null); - }, - listen$3$onDone$onError(_, onData, onDone, onError) { - return this.listen$4$cancelOnError$onDone$onError(0, onData, null, onDone, onError); - } - }; - A._ForwardingStreamSubscription.prototype = { - _async$_add$1(data) { - if ((this._state & 2) !== 0) - return; - this.super$_BufferingStreamSubscription$_add(data); - }, - _addError$2(error, stackTrace) { - if ((this._state & 2) !== 0) - return; - this.super$_BufferingStreamSubscription$_addError(error, stackTrace); - }, - _async$_onPause$0() { - var t1 = this._subscription; - if (t1 != null) - t1.pause$0(0); - }, - _async$_onResume$0() { - var t1 = this._subscription; - if (t1 != null) - t1.resume$0(0); - }, - _async$_onCancel$0() { - var subscription = this._subscription; - if (subscription != null) { - this._subscription = null; - return subscription.cancel$0(); - } - return null; - }, - _handleData$1(data) { - this._stream._handleData$2(data, this); - }, - _handleError$2(error, stackTrace) { - this._addError$2(error, stackTrace); - }, - _handleDone$0() { - this._close$0(); - } - }; - A._ExpandStream.prototype = { - _handleData$2(inputEvent, sink) { - var value, e, s, t1, exception, error, stackTrace, replacement; - try { - for (t1 = J.get$iterator$ax(this._expand.call$1(inputEvent)); t1.moveNext$0();) { - value = t1.get$current(t1); - sink._async$_add$1(value); - } - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - error = e; - stackTrace = s; - replacement = $.Zone__current.errorCallback$2(error, stackTrace); - if (replacement != null) { - error = replacement.error; - stackTrace = replacement.stackTrace; - } - sink._addError$2(error, stackTrace); - } - } - }; - A._ZoneFunction.prototype = {}; - A._ZoneSpecification.prototype = {$isZoneSpecification: 1}; - A._ZoneDelegate.prototype = {$isZoneDelegate: 1}; - A._Zone.prototype = { - _processUncaughtError$3(zone, error, stackTrace) { - var handler, parentDelegate, parentZone, currentZone, e, s, t1, exception, - implementation = this.get$_handleUncaughtError(), - implZone = implementation.zone; - if (implZone === B.C__RootZone) { - A._rootHandleError(error, stackTrace); - return; - } - handler = implementation.$function; - parentDelegate = implZone.get$_parentDelegate(); - t1 = J.get$parent$z(implZone); - t1.toString; - parentZone = t1; - currentZone = $.Zone__current; - try { - $.Zone__current = parentZone; - handler.call$5(implZone, parentDelegate, zone, error, stackTrace); - $.Zone__current = currentZone; - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - $.Zone__current = currentZone; - t1 = error === e ? stackTrace : s; - parentZone._processUncaughtError$3(implZone, e, t1); - } - }, - $isZone: 1 - }; - A._CustomZone.prototype = { - get$_delegate() { - var t1 = this._delegateCache; - return t1 == null ? this._delegateCache = new A._ZoneDelegate(this) : t1; - }, - get$_parentDelegate() { - return this.parent.get$_delegate(); - }, - get$errorZone() { - return this._handleUncaughtError.zone; - }, - runGuarded$1(f) { - var e, s, exception; - try { - this.run$1$1(0, f, type$.void); - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - this._processUncaughtError$3(this, e, s); - } - }, - runUnaryGuarded$1$2(f, arg, $T) { - var e, s, exception; - try { - this.runUnary$2$2(f, arg, type$.void, $T); - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - this._processUncaughtError$3(this, e, s); - } - }, - runBinaryGuarded$2$3(f, arg1, arg2, T1, T2) { - var e, s, exception; - try { - this.runBinary$3$3(f, arg1, arg2, type$.void, T1, T2); - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - this._processUncaughtError$3(this, e, s); - } - }, - bindCallback$1$1(f, $R) { - return new A._CustomZone_bindCallback_closure(this, this.registerCallback$1$1(f, $R), $R); - }, - bindUnaryCallback$2$1(f, $R, $T) { - return new A._CustomZone_bindUnaryCallback_closure(this, this.registerUnaryCallback$2$1(f, $R, $T), $T, $R); - }, - bindCallbackGuarded$1(f) { - return new A._CustomZone_bindCallbackGuarded_closure(this, this.registerCallback$1$1(f, type$.void)); - }, - $index(_, key) { - var value, - t1 = this._async$_map, - result = t1.$index(0, key); - if (result != null || t1.containsKey$1(key)) - return result; - value = this.parent.$index(0, key); - if (value != null) - t1.$indexSet(0, key, value); - return value; - }, - handleUncaughtError$2(error, stackTrace) { - this._processUncaughtError$3(this, error, stackTrace); - }, - fork$2$specification$zoneValues(specification, zoneValues) { - var implementation = this._fork, - t1 = implementation.zone; - return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, specification, zoneValues); - }, - run$1$1(_, f) { - var implementation = this._run, - t1 = implementation.zone; - return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, f); - }, - runUnary$2$2(f, arg) { - var implementation = this._runUnary, - t1 = implementation.zone; - return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, f, arg); - }, - runBinary$3$3(f, arg1, arg2) { - var implementation = this._runBinary, - t1 = implementation.zone; - return implementation.$function.call$6(t1, t1.get$_parentDelegate(), this, f, arg1, arg2); - }, - registerCallback$1$1(callback) { - var implementation = this._registerCallback, - t1 = implementation.zone; - return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, callback); - }, - registerUnaryCallback$2$1(callback) { - var implementation = this._registerUnaryCallback, - t1 = implementation.zone; - return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, callback); - }, - registerBinaryCallback$3$1(callback) { - var implementation = this._registerBinaryCallback, - t1 = implementation.zone; - return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, callback); - }, - errorCallback$2(error, stackTrace) { - var implementation, implementationZone; - A.checkNotNullable(error, "error", type$.Object); - implementation = this._errorCallback; - implementationZone = implementation.zone; - if (implementationZone === B.C__RootZone) - return null; - return implementation.$function.call$5(implementationZone, implementationZone.get$_parentDelegate(), this, error, stackTrace); - }, - scheduleMicrotask$1(f) { - var implementation = this._scheduleMicrotask, - t1 = implementation.zone; - return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, f); - }, - createTimer$2(duration, f) { - var implementation = this._createTimer, - t1 = implementation.zone; - return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, duration, f); - }, - print$1(line) { - var implementation = this._print, - t1 = implementation.zone; - return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, line); - }, - get$_run() { - return this._run; - }, - get$_runUnary() { - return this._runUnary; - }, - get$_runBinary() { - return this._runBinary; - }, - get$_registerCallback() { - return this._registerCallback; - }, - get$_registerUnaryCallback() { - return this._registerUnaryCallback; - }, - get$_registerBinaryCallback() { - return this._registerBinaryCallback; - }, - get$_errorCallback() { - return this._errorCallback; - }, - get$_scheduleMicrotask() { - return this._scheduleMicrotask; - }, - get$_createTimer() { - return this._createTimer; - }, - get$_createPeriodicTimer() { - return this._createPeriodicTimer; - }, - get$_print() { - return this._print; - }, - get$_fork() { - return this._fork; - }, - get$_handleUncaughtError() { - return this._handleUncaughtError; - }, - get$parent(receiver) { - return this.parent; - }, - get$_async$_map() { - return this._async$_map; - } - }; - A._CustomZone_bindCallback_closure.prototype = { - call$0() { - return this.$this.run$1$1(0, this.registered, this.R); - }, - $signature() { - return this.R._eval$1("0()"); - } - }; - A._CustomZone_bindUnaryCallback_closure.prototype = { - call$1(arg) { - var _this = this; - return _this.$this.runUnary$2$2(_this.registered, arg, _this.R, _this.T); - }, - $signature() { - return this.R._eval$1("@<0>")._bind$1(this.T)._eval$1("1(2)"); - } - }; - A._CustomZone_bindCallbackGuarded_closure.prototype = { - call$0() { - return this.$this.runGuarded$1(this.registered); - }, - $signature: 0 - }; - A._rootHandleError_closure.prototype = { - call$0() { - A.Error_throwWithStackTrace(this.error, this.stackTrace); - }, - $signature: 0 - }; - A._RootZone.prototype = { - get$_run() { - return B._ZoneFunction__RootZone__rootRun; - }, - get$_runUnary() { - return B._ZoneFunction__RootZone__rootRunUnary; - }, - get$_runBinary() { - return B._ZoneFunction__RootZone__rootRunBinary; - }, - get$_registerCallback() { - return B._ZoneFunction__RootZone__rootRegisterCallback; - }, - get$_registerUnaryCallback() { - return B._ZoneFunction_QOa; - }, - get$_registerBinaryCallback() { - return B._ZoneFunction_qxw; - }, - get$_errorCallback() { - return B._ZoneFunction__RootZone__rootErrorCallback; - }, - get$_scheduleMicrotask() { - return B._ZoneFunction__RootZone__rootScheduleMicrotask; - }, - get$_createTimer() { - return B._ZoneFunction__RootZone__rootCreateTimer; - }, - get$_createPeriodicTimer() { - return B._ZoneFunction_kWM; - }, - get$_print() { - return B._ZoneFunction__RootZone__rootPrint; - }, - get$_fork() { - return B._ZoneFunction__RootZone__rootFork; - }, - get$_handleUncaughtError() { - return B._ZoneFunction_NIe; - }, - get$parent(_) { - return null; - }, - get$_async$_map() { - return $.$get$_RootZone__rootMap(); - }, - get$_delegate() { - var t1 = $._RootZone__rootDelegate; - return t1 == null ? $._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1; - }, - get$_parentDelegate() { - var t1 = $._RootZone__rootDelegate; - return t1 == null ? $._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1; - }, - get$errorZone() { - return this; - }, - runGuarded$1(f) { - var e, s, exception; - try { - if (B.C__RootZone === $.Zone__current) { - f.call$0(); - return; - } - A._rootRun(null, null, this, f); - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - A._rootHandleError(e, s); - } - }, - runUnaryGuarded$1$2(f, arg) { - var e, s, exception; - try { - if (B.C__RootZone === $.Zone__current) { - f.call$1(arg); - return; - } - A._rootRunUnary(null, null, this, f, arg); - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - A._rootHandleError(e, s); - } - }, - runBinaryGuarded$2$3(f, arg1, arg2) { - var e, s, exception; - try { - if (B.C__RootZone === $.Zone__current) { - f.call$2(arg1, arg2); - return; - } - A._rootRunBinary(null, null, this, f, arg1, arg2); - } catch (exception) { - e = A.unwrapException(exception); - s = A.getTraceFromException(exception); - A._rootHandleError(e, s); - } - }, - bindCallback$1$1(f, $R) { - return new A._RootZone_bindCallback_closure(this, f, $R); - }, - bindUnaryCallback$2$1(f, $R, $T) { - return new A._RootZone_bindUnaryCallback_closure(this, f, $T, $R); - }, - bindCallbackGuarded$1(f) { - return new A._RootZone_bindCallbackGuarded_closure(this, f); - }, - $index(_, key) { - return null; - }, - handleUncaughtError$2(error, stackTrace) { - A._rootHandleError(error, stackTrace); - }, - fork$2$specification$zoneValues(specification, zoneValues) { - return A._rootFork(null, null, this, specification, zoneValues); - }, - run$1$1(_, f) { - if ($.Zone__current === B.C__RootZone) - return f.call$0(); - return A._rootRun(null, null, this, f); - }, - runUnary$2$2(f, arg) { - if ($.Zone__current === B.C__RootZone) - return f.call$1(arg); - return A._rootRunUnary(null, null, this, f, arg); - }, - runBinary$3$3(f, arg1, arg2) { - if ($.Zone__current === B.C__RootZone) - return f.call$2(arg1, arg2); - return A._rootRunBinary(null, null, this, f, arg1, arg2); - }, - registerCallback$1$1(f) { - return f; - }, - registerUnaryCallback$2$1(f) { - return f; - }, - registerBinaryCallback$3$1(f) { - return f; - }, - errorCallback$2(error, stackTrace) { - return null; - }, - scheduleMicrotask$1(f) { - A._rootScheduleMicrotask(null, null, this, f); - }, - createTimer$2(duration, f) { - return A.Timer__createTimer(duration, f); - }, - print$1(line) { - A.printString(line); - } - }; - A._RootZone_bindCallback_closure.prototype = { - call$0() { - return this.$this.run$1$1(0, this.f, this.R); - }, - $signature() { - return this.R._eval$1("0()"); - } - }; - A._RootZone_bindUnaryCallback_closure.prototype = { - call$1(arg) { - var _this = this; - return _this.$this.runUnary$2$2(_this.f, arg, _this.R, _this.T); - }, - $signature() { - return this.R._eval$1("@<0>")._bind$1(this.T)._eval$1("1(2)"); - } - }; - A._RootZone_bindCallbackGuarded_closure.prototype = { - call$0() { - return this.$this.runGuarded$1(this.f); - }, - $signature: 0 - }; - A._HashMap.prototype = { - get$length(_) { - return this._collection$_length; - }, - get$isEmpty(_) { - return this._collection$_length === 0; - }, - get$isNotEmpty(_) { - return this._collection$_length !== 0; - }, - get$keys(_) { - return new A._HashMapKeyIterable(this, A._instanceType(this)._eval$1("_HashMapKeyIterable<1>")); - }, - get$values(_) { - var t1 = A._instanceType(this); - return A.MappedIterable_MappedIterable(new A._HashMapKeyIterable(this, t1._eval$1("_HashMapKeyIterable<1>")), new A._HashMap_values_closure(this), t1._precomputed1, t1._rest[1]); - }, - containsKey$1(key) { - var strings, nums; - if (typeof key == "string" && key !== "__proto__") { - strings = this._strings; - return strings == null ? false : strings[key] != null; - } else if (typeof key == "number" && (key & 1073741823) === key) { - nums = this._nums; - return nums == null ? false : nums[key] != null; - } else - return this._containsKey$1(key); - }, - _containsKey$1(key) { - var rest = this._collection$_rest; - if (rest == null) - return false; - return this._findBucketIndex$2(this._getBucket$2(rest, key), key) >= 0; - }, - addAll$1(_, other) { - other.forEach$1(0, new A._HashMap_addAll_closure(this)); - }, - $index(_, key) { - var strings, t1, nums; - if (typeof key == "string" && key !== "__proto__") { - strings = this._strings; - t1 = strings == null ? null : A._HashMap__getTableEntry(strings, key); - return t1; - } else if (typeof key == "number" && (key & 1073741823) === key) { - nums = this._nums; - t1 = nums == null ? null : A._HashMap__getTableEntry(nums, key); - return t1; - } else - return this._get$1(key); - }, - _get$1(key) { - var bucket, index, - rest = this._collection$_rest; - if (rest == null) - return null; - bucket = this._getBucket$2(rest, key); - index = this._findBucketIndex$2(bucket, key); - return index < 0 ? null : bucket[index + 1]; - }, - $indexSet(_, key, value) { - var strings, nums, _this = this; - if (typeof key == "string" && key !== "__proto__") { - strings = _this._strings; - _this._addHashTableEntry$3(strings == null ? _this._strings = A._HashMap__newHashTable() : strings, key, value); - } else if (typeof key == "number" && (key & 1073741823) === key) { - nums = _this._nums; - _this._addHashTableEntry$3(nums == null ? _this._nums = A._HashMap__newHashTable() : nums, key, value); - } else - _this._set$2(key, value); - }, - _set$2(key, value) { - var hash, bucket, index, _this = this, - rest = _this._collection$_rest; - if (rest == null) - rest = _this._collection$_rest = A._HashMap__newHashTable(); - hash = _this._computeHashCode$1(key); - bucket = rest[hash]; - if (bucket == null) { - A._HashMap__setTableEntry(rest, hash, [key, value]); - ++_this._collection$_length; - _this._collection$_keys = null; - } else { - index = _this._findBucketIndex$2(bucket, key); - if (index >= 0) - bucket[index + 1] = value; - else { - bucket.push(key, value); - ++_this._collection$_length; - _this._collection$_keys = null; - } - } - }, - remove$1(_, key) { - var _this = this; - if (typeof key == "string" && key !== "__proto__") - return _this._removeHashTableEntry$2(_this._strings, key); - else if (typeof key == "number" && (key & 1073741823) === key) - return _this._removeHashTableEntry$2(_this._nums, key); - else - return _this._remove$1(key); - }, - _remove$1(key) { - var hash, bucket, index, result, _this = this, - rest = _this._collection$_rest; - if (rest == null) - return null; - hash = _this._computeHashCode$1(key); - bucket = rest[hash]; - index = _this._findBucketIndex$2(bucket, key); - if (index < 0) - return null; - --_this._collection$_length; - _this._collection$_keys = null; - result = bucket.splice(index, 2)[1]; - if (0 === bucket.length) - delete rest[hash]; - return result; - }, - forEach$1(_, action) { - var $length, t1, i, key, t2, _this = this, - keys = _this._computeKeys$0(); - for ($length = keys.length, t1 = A._instanceType(_this)._rest[1], i = 0; i < $length; ++i) { - key = keys[i]; - t2 = _this.$index(0, key); - action.call$2(key, t2 == null ? t1._as(t2) : t2); - if (keys !== _this._collection$_keys) - throw A.wrapException(A.ConcurrentModificationError$(_this)); - } - }, - _computeKeys$0() { - var strings, index, names, entries, i, nums, rest, bucket, $length, i0, _this = this, - result = _this._collection$_keys; - if (result != null) - return result; - result = A.List_List$filled(_this._collection$_length, null, false, type$.dynamic); - strings = _this._strings; - index = 0; - if (strings != null) { - names = Object.getOwnPropertyNames(strings); - entries = names.length; - for (i = 0; i < entries; ++i) { - result[index] = names[i]; - ++index; - } - } - nums = _this._nums; - if (nums != null) { - names = Object.getOwnPropertyNames(nums); - entries = names.length; - for (i = 0; i < entries; ++i) { - result[index] = +names[i]; - ++index; - } - } - rest = _this._collection$_rest; - if (rest != null) { - names = Object.getOwnPropertyNames(rest); - entries = names.length; - for (i = 0; i < entries; ++i) { - bucket = rest[names[i]]; - $length = bucket.length; - for (i0 = 0; i0 < $length; i0 += 2) { - result[index] = bucket[i0]; - ++index; - } - } - } - return _this._collection$_keys = result; - }, - _addHashTableEntry$3(table, key, value) { - if (table[key] == null) { - ++this._collection$_length; - this._collection$_keys = null; - } - A._HashMap__setTableEntry(table, key, value); - }, - _removeHashTableEntry$2(table, key) { - var value; - if (table != null && table[key] != null) { - value = A._HashMap__getTableEntry(table, key); - delete table[key]; - --this._collection$_length; - this._collection$_keys = null; - return value; - } else - return null; - }, - _computeHashCode$1(key) { - return J.get$hashCode$(key) & 1073741823; - }, - _getBucket$2(table, key) { - return table[this._computeHashCode$1(key)]; - }, - _findBucketIndex$2(bucket, key) { - var $length, i; - if (bucket == null) - return -1; - $length = bucket.length; - for (i = 0; i < $length; i += 2) - if (J.$eq$(bucket[i], key)) - return i; - return -1; - } - }; - A._HashMap_values_closure.prototype = { - call$1(each) { - var t1 = this.$this, - t2 = t1.$index(0, each); - return t2 == null ? A._instanceType(t1)._rest[1]._as(t2) : t2; - }, - $signature() { - return A._instanceType(this.$this)._eval$1("2(1)"); - } - }; - A._HashMap_addAll_closure.prototype = { - call$2(key, value) { - this.$this.$indexSet(0, key, value); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("~(1,2)"); - } - }; - A._IdentityHashMap.prototype = { - _computeHashCode$1(key) { - return A.objectHashCode(key) & 1073741823; - }, - _findBucketIndex$2(bucket, key) { - var $length, i, t1; - if (bucket == null) - return -1; - $length = bucket.length; - for (i = 0; i < $length; i += 2) { - t1 = bucket[i]; - if (t1 == null ? key == null : t1 === key) - return i; - } - return -1; - } - }; - A._HashMapKeyIterable.prototype = { - get$length(_) { - return this._map._collection$_length; - }, - get$isEmpty(_) { - return this._map._collection$_length === 0; - }, - get$isNotEmpty(_) { - return this._map._collection$_length !== 0; - }, - get$iterator(_) { - var t1 = this._map; - return new A._HashMapKeyIterator(t1, t1._computeKeys$0(), this.$ti._eval$1("_HashMapKeyIterator<1>")); - }, - contains$1(_, element) { - return this._map.containsKey$1(element); - } - }; - A._HashMapKeyIterator.prototype = { - get$current(_) { - var t1 = this._collection$_current; - return t1 == null ? this.$ti._precomputed1._as(t1) : t1; - }, - moveNext$0() { - var _this = this, - keys = _this._collection$_keys, - offset = _this._offset, - t1 = _this._map; - if (keys !== t1._collection$_keys) - throw A.wrapException(A.ConcurrentModificationError$(t1)); - else if (offset >= keys.length) { - _this._collection$_current = null; - return false; - } else { - _this._collection$_current = keys[offset]; - _this._offset = offset + 1; - return true; - } - } - }; - A._LinkedCustomHashMap.prototype = { - $index(_, key) { - if (!this._validKey.call$1(key)) - return null; - return this.super$JsLinkedHashMap$internalGet(key); - }, - $indexSet(_, key, value) { - this.super$JsLinkedHashMap$internalSet(key, value); - }, - containsKey$1(key) { - if (!this._validKey.call$1(key)) - return false; - return this.super$JsLinkedHashMap$internalContainsKey(key); - }, - remove$1(_, key) { - if (!this._validKey.call$1(key)) - return null; - return this.super$JsLinkedHashMap$internalRemove(key); - }, - internalComputeHashCode$1(key) { - return this._hashCode.call$1(key) & 1073741823; - }, - internalFindBucketIndex$2(bucket, key) { - var $length, t1, i; - if (bucket == null) - return -1; - $length = bucket.length; - for (t1 = this._equals, i = 0; i < $length; ++i) - if (t1.call$2(bucket[i].hashMapCellKey, key)) - return i; - return -1; - } - }; - A._LinkedCustomHashMap_closure.prototype = { - call$1(v) { - return this.K._is(v); - }, - $signature: 168 - }; - A._LinkedHashSet.prototype = { - _newSet$0() { - return new A._LinkedHashSet(A._instanceType(this)._eval$1("_LinkedHashSet<1>")); - }, - _newSimilarSet$1$0($R) { - return new A._LinkedHashSet($R._eval$1("_LinkedHashSet<0>")); - }, - _newSimilarSet$0() { - return this._newSimilarSet$1$0(type$.dynamic); - }, - get$iterator(_) { - var _this = this, - t1 = new A._LinkedHashSetIterator(_this, _this._modifications, A._instanceType(_this)._eval$1("_LinkedHashSetIterator<1>")); - t1._cell = _this._first; - return t1; - }, - get$length(_) { - return this._collection$_length; - }, - get$isEmpty(_) { - return this._collection$_length === 0; - }, - get$isNotEmpty(_) { - return this._collection$_length !== 0; - }, - contains$1(_, object) { - var strings, nums; - if (typeof object == "string" && object !== "__proto__") { - strings = this._strings; - if (strings == null) - return false; - return strings[object] != null; - } else if (typeof object == "number" && (object & 1073741823) === object) { - nums = this._nums; - if (nums == null) - return false; - return nums[object] != null; - } else - return this._contains$1(object); - }, - _contains$1(object) { - var rest = this._collection$_rest; - if (rest == null) - return false; - return this._findBucketIndex$2(rest[this._computeHashCode$1(object)], object) >= 0; - }, - get$first(_) { - var first = this._first; - if (first == null) - throw A.wrapException(A.StateError$("No elements")); - return first._element; - }, - get$last(_) { - var last = this._last; - if (last == null) - throw A.wrapException(A.StateError$("No elements")); - return last._element; - }, - add$1(_, element) { - var strings, nums, _this = this; - if (typeof element == "string" && element !== "__proto__") { - strings = _this._strings; - return _this._addHashTableEntry$2(strings == null ? _this._strings = A._LinkedHashSet__newHashTable() : strings, element); - } else if (typeof element == "number" && (element & 1073741823) === element) { - nums = _this._nums; - return _this._addHashTableEntry$2(nums == null ? _this._nums = A._LinkedHashSet__newHashTable() : nums, element); - } else - return _this._add$1(element); - }, - _add$1(element) { - var hash, bucket, _this = this, - rest = _this._collection$_rest; - if (rest == null) - rest = _this._collection$_rest = A._LinkedHashSet__newHashTable(); - hash = _this._computeHashCode$1(element); - bucket = rest[hash]; - if (bucket == null) - rest[hash] = [_this._newLinkedCell$1(element)]; - else { - if (_this._findBucketIndex$2(bucket, element) >= 0) - return false; - bucket.push(_this._newLinkedCell$1(element)); - } - return true; - }, - remove$1(_, object) { - var _this = this; - if (typeof object == "string" && object !== "__proto__") - return _this._removeHashTableEntry$2(_this._strings, object); - else if (typeof object == "number" && (object & 1073741823) === object) - return _this._removeHashTableEntry$2(_this._nums, object); - else - return _this._remove$1(object); - }, - _remove$1(object) { - var hash, bucket, index, cell, _this = this, - rest = _this._collection$_rest; - if (rest == null) - return false; - hash = _this._computeHashCode$1(object); - bucket = rest[hash]; - index = _this._findBucketIndex$2(bucket, object); - if (index < 0) - return false; - cell = bucket.splice(index, 1)[0]; - if (0 === bucket.length) - delete rest[hash]; - _this._unlinkCell$1(cell); - return true; - }, - _addHashTableEntry$2(table, element) { - if (table[element] != null) - return false; - table[element] = this._newLinkedCell$1(element); - return true; - }, - _removeHashTableEntry$2(table, element) { - var cell; - if (table == null) - return false; - cell = table[element]; - if (cell == null) - return false; - this._unlinkCell$1(cell); - delete table[element]; - return true; - }, - _modified$0() { - this._modifications = this._modifications + 1 & 1073741823; - }, - _newLinkedCell$1(element) { - var t1, _this = this, - cell = new A._LinkedHashSetCell(element); - if (_this._first == null) - _this._first = _this._last = cell; - else { - t1 = _this._last; - t1.toString; - cell._previous = t1; - _this._last = t1._next = cell; - } - ++_this._collection$_length; - _this._modified$0(); - return cell; - }, - _unlinkCell$1(cell) { - var _this = this, - previous = cell._previous, - next = cell._next; - if (previous == null) - _this._first = next; - else - previous._next = next; - if (next == null) - _this._last = previous; - else - next._previous = previous; - --_this._collection$_length; - _this._modified$0(); - }, - _computeHashCode$1(element) { - return J.get$hashCode$(element) & 1073741823; - }, - _findBucketIndex$2(bucket, element) { - var $length, i; - if (bucket == null) - return -1; - $length = bucket.length; - for (i = 0; i < $length; ++i) - if (J.$eq$(bucket[i]._element, element)) - return i; - return -1; - } - }; - A._LinkedIdentityHashSet.prototype = { - _newSet$0() { - return new A._LinkedIdentityHashSet(this.$ti); - }, - _newSimilarSet$1$0($R) { - return new A._LinkedIdentityHashSet($R._eval$1("_LinkedIdentityHashSet<0>")); - }, - _newSimilarSet$0() { - return this._newSimilarSet$1$0(type$.dynamic); - }, - _computeHashCode$1(key) { - return A.objectHashCode(key) & 1073741823; - }, - _findBucketIndex$2(bucket, element) { - var $length, i, t1; - if (bucket == null) - return -1; - $length = bucket.length; - for (i = 0; i < $length; ++i) { - t1 = bucket[i]._element; - if (t1 == null ? element == null : t1 === element) - return i; - } - return -1; - } - }; - A._LinkedHashSetCell.prototype = {}; - A._LinkedHashSetIterator.prototype = { - get$current(_) { - var t1 = this._collection$_current; - return t1 == null ? this.$ti._precomputed1._as(t1) : t1; - }, - moveNext$0() { - var _this = this, - cell = _this._cell, - t1 = _this._set; - if (_this._modifications !== t1._modifications) - throw A.wrapException(A.ConcurrentModificationError$(t1)); - else if (cell == null) { - _this._collection$_current = null; - return false; - } else { - _this._collection$_current = cell._element; - _this._cell = cell._next; - return true; - } - } - }; - A.UnmodifiableListView.prototype = { - cast$1$0(_, $R) { - return new A.UnmodifiableListView(J.cast$1$0$ax(this._collection$_source, $R), $R._eval$1("UnmodifiableListView<0>")); - }, - get$length(_) { - return J.get$length$asx(this._collection$_source); - }, - $index(_, index) { - return J.elementAt$1$ax(this._collection$_source, index); - } - }; - A.HashMap_HashMap$from_closure.prototype = { - call$2(k, v) { - this.result.$indexSet(0, this.K._as(k), this.V._as(v)); - }, - $signature: 172 - }; - A.LinkedHashMap_LinkedHashMap$from_closure.prototype = { - call$2(k, v) { - this.result.$indexSet(0, this.K._as(k), this.V._as(v)); - }, - $signature: 172 - }; - A.ListBase.prototype = { - get$iterator(receiver) { - return new A.ListIterator(receiver, this.get$length(receiver), A.instanceType(receiver)._eval$1("ListIterator")); - }, - elementAt$1(receiver, index) { - return this.$index(receiver, index); - }, - forEach$1(receiver, action) { - var i, - $length = this.get$length(receiver); - for (i = 0; i < $length; ++i) { - action.call$1(this.$index(receiver, i)); - if ($length !== this.get$length(receiver)) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } - }, - get$isEmpty(receiver) { - return this.get$length(receiver) === 0; - }, - get$isNotEmpty(receiver) { - return !this.get$isEmpty(receiver); - }, - get$first(receiver) { - if (this.get$length(receiver) === 0) - throw A.wrapException(A.IterableElementError_noElement()); - return this.$index(receiver, 0); - }, - get$last(receiver) { - if (this.get$length(receiver) === 0) - throw A.wrapException(A.IterableElementError_noElement()); - return this.$index(receiver, this.get$length(receiver) - 1); - }, - get$single(receiver) { - if (this.get$length(receiver) === 0) - throw A.wrapException(A.IterableElementError_noElement()); - if (this.get$length(receiver) > 1) - throw A.wrapException(A.IterableElementError_tooMany()); - return this.$index(receiver, 0); - }, - contains$1(receiver, element) { - var i, - $length = this.get$length(receiver); - for (i = 0; i < $length; ++i) { - if (J.$eq$(this.$index(receiver, i), element)) - return true; - if ($length !== this.get$length(receiver)) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } - return false; - }, - every$1(receiver, test) { - var i, - $length = this.get$length(receiver); - for (i = 0; i < $length; ++i) { - if (!test.call$1(this.$index(receiver, i))) - return false; - if ($length !== this.get$length(receiver)) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } - return true; - }, - any$1(receiver, test) { - var i, - $length = this.get$length(receiver); - for (i = 0; i < $length; ++i) { - if (test.call$1(this.$index(receiver, i))) - return true; - if ($length !== this.get$length(receiver)) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } - return false; - }, - lastWhere$2$orElse(receiver, test, orElse) { - var i, element, - $length = this.get$length(receiver); - for (i = $length - 1; i >= 0; --i) { - element = this.$index(receiver, i); - if (test.call$1(element)) - return element; - if ($length !== this.get$length(receiver)) - throw A.wrapException(A.ConcurrentModificationError$(receiver)); - } - if (orElse != null) - return orElse.call$0(); - throw A.wrapException(A.IterableElementError_noElement()); - }, - join$1(receiver, separator) { - var t1; - if (this.get$length(receiver) === 0) - return ""; - t1 = A.StringBuffer__writeAll("", receiver, separator); - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - where$1(receiver, test) { - return new A.WhereIterable(receiver, test, A.instanceType(receiver)._eval$1("WhereIterable")); - }, - map$1$1(receiver, f, $T) { - return new A.MappedListIterable(receiver, f, A.instanceType(receiver)._eval$1("@")._bind$1($T)._eval$1("MappedListIterable<1,2>")); - }, - expand$1$1(receiver, f, $T) { - return new A.ExpandIterable(receiver, f, A.instanceType(receiver)._eval$1("@")._bind$1($T)._eval$1("ExpandIterable<1,2>")); - }, - skip$1(receiver, count) { - return A.SubListIterable$(receiver, count, null, A.instanceType(receiver)._eval$1("ListBase.E")); - }, - take$1(receiver, count) { - return A.SubListIterable$(receiver, 0, A.checkNotNullable(count, "count", type$.int), A.instanceType(receiver)._eval$1("ListBase.E")); - }, - toList$1$growable(receiver, growable) { - var t1, first, result, i, _this = this; - if (_this.get$isEmpty(receiver)) { - t1 = J.JSArray_JSArray$growable(0, A.instanceType(receiver)._eval$1("ListBase.E")); - return t1; - } - first = _this.$index(receiver, 0); - result = A.List_List$filled(_this.get$length(receiver), first, true, A.instanceType(receiver)._eval$1("ListBase.E")); - for (i = 1; i < _this.get$length(receiver); ++i) - result[i] = _this.$index(receiver, i); - return result; - }, - toList$0(receiver) { - return this.toList$1$growable(receiver, true); - }, - toSet$0(receiver) { - var i, - result = A.LinkedHashSet_LinkedHashSet(A.instanceType(receiver)._eval$1("ListBase.E")); - for (i = 0; i < this.get$length(receiver); ++i) - result.add$1(0, this.$index(receiver, i)); - return result; - }, - add$1(receiver, element) { - var t1 = this.get$length(receiver); - this.set$length(receiver, t1 + 1); - this.$indexSet(receiver, t1, element); - }, - addAll$1(receiver, iterable) { - var t1, - i = this.get$length(receiver); - for (t1 = iterable.get$iterator(iterable); t1.moveNext$0();) { - this.add$1(receiver, t1.get$current(t1)); - ++i; - } - }, - _closeGap$2(receiver, start, end) { - var i, _this = this, - $length = _this.get$length(receiver), - size = end - start; - for (i = end; i < $length; ++i) - _this.$indexSet(receiver, i - size, _this.$index(receiver, i)); - _this.set$length(receiver, $length - size); - }, - cast$1$0(receiver, $R) { - return new A.CastList(receiver, A.instanceType(receiver)._eval$1("@")._bind$1($R)._eval$1("CastList<1,2>")); - }, - sort$1(receiver, compare) { - var t1 = compare == null ? A.collection_ListBase__compareAny$closure() : compare; - A.Sort__doSort(receiver, 0, this.get$length(receiver) - 1, t1); - }, - sublist$2(receiver, start, end) { - var listLength = this.get$length(receiver); - A.RangeError_checkValidRange(start, listLength, listLength); - return A.List_List$from(this.getRange$2(receiver, start, listLength), true, A.instanceType(receiver)._eval$1("ListBase.E")); - }, - sublist$1(receiver, start) { - return this.sublist$2(receiver, start, null); - }, - getRange$2(receiver, start, end) { - A.RangeError_checkValidRange(start, end, this.get$length(receiver)); - return A.SubListIterable$(receiver, start, end, A.instanceType(receiver)._eval$1("ListBase.E")); - }, - removeRange$2(receiver, start, end) { - A.RangeError_checkValidRange(start, end, this.get$length(receiver)); - if (end > start) - this._closeGap$2(receiver, start, end); - }, - fillRange$3(receiver, start, end, fill) { - var i, - value = fill == null ? A.instanceType(receiver)._eval$1("ListBase.E")._as(fill) : fill; - A.RangeError_checkValidRange(start, end, this.get$length(receiver)); - for (i = start; i < end; ++i) - this.$indexSet(receiver, i, value); - }, - setRange$4(receiver, start, end, iterable, skipCount) { - var $length, otherStart, otherList, t1, i; - A.RangeError_checkValidRange(start, end, this.get$length(receiver)); - $length = end - start; - if ($length === 0) - return; - A.RangeError_checkNotNegative(skipCount, "skipCount"); - if (A.instanceType(receiver)._eval$1("List")._is(iterable)) { - otherStart = skipCount; - otherList = iterable; - } else { - otherList = J.skip$1$ax(iterable, skipCount).toList$1$growable(0, false); - otherStart = 0; - } - t1 = J.getInterceptor$asx(otherList); - if (otherStart + $length > t1.get$length(otherList)) - throw A.wrapException(A.IterableElementError_tooFew()); - if (otherStart < start) - for (i = $length - 1; i >= 0; --i) - this.$indexSet(receiver, start + i, t1.$index(otherList, otherStart + i)); - else - for (i = 0; i < $length; ++i) - this.$indexSet(receiver, start + i, t1.$index(otherList, otherStart + i)); - }, - indexOf$1(receiver, element) { - var i; - for (i = 0; i < this.get$length(receiver); ++i) - if (J.$eq$(this.$index(receiver, i), element)) - return i; - return -1; - }, - get$reversed(receiver) { - return new A.ReversedListIterable(receiver, A.instanceType(receiver)._eval$1("ReversedListIterable")); - }, - toString$0(receiver) { - return A.Iterable_iterableToFullString(receiver, "[", "]"); - }, - $isEfficientLengthIterable: 1, - $isIterable: 1, - $isList: 1 - }; - A.MapBase.prototype = { - cast$2$0(_, RK, RV) { - var t1 = A._instanceType(this); - return A.Map_castFrom(this, t1._eval$1("MapBase.K"), t1._eval$1("MapBase.V"), RK, RV); - }, - forEach$1(_, action) { - var t1, t2, key, t3, _this = this; - for (t1 = J.get$iterator$ax(_this.get$keys(_this)), t2 = A._instanceType(_this)._eval$1("MapBase.V"); t1.moveNext$0();) { - key = t1.get$current(t1); - t3 = _this.$index(0, key); - action.call$2(key, t3 == null ? t2._as(t3) : t3); - } - }, - addAll$1(_, other) { - other.forEach$1(0, new A.MapBase_addAll_closure(this)); - }, - get$entries(_) { - var _this = this; - return J.map$1$1$ax(_this.get$keys(_this), new A.MapBase_entries_closure(_this), A._instanceType(_this)._eval$1("MapEntry")); - }, - removeWhere$1(_, test) { - var t2, key, t3, _i, _this = this, - t1 = A._instanceType(_this), - keysToRemove = A._setArrayType([], t1._eval$1("JSArray")); - for (t2 = J.get$iterator$ax(_this.get$keys(_this)), t1 = t1._eval$1("MapBase.V"); t2.moveNext$0();) { - key = t2.get$current(t2); - t3 = _this.$index(0, key); - if (test.call$2(key, t3 == null ? t1._as(t3) : t3)) - keysToRemove.push(key); - } - for (t1 = keysToRemove.length, _i = 0; _i < keysToRemove.length; keysToRemove.length === t1 || (0, A.throwConcurrentModificationError)(keysToRemove), ++_i) - _this.remove$1(0, keysToRemove[_i]); - }, - containsKey$1(key) { - return J.contains$1$asx(this.get$keys(this), key); - }, - get$length(_) { - return J.get$length$asx(this.get$keys(this)); - }, - get$isEmpty(_) { - return J.get$isEmpty$asx(this.get$keys(this)); - }, - get$isNotEmpty(_) { - return J.get$isNotEmpty$asx(this.get$keys(this)); - }, - get$values(_) { - return new A._MapBaseValueIterable(this, A._instanceType(this)._eval$1("_MapBaseValueIterable")); - }, - toString$0(_) { - return A.MapBase_mapToString(this); - }, - $isMap: 1 - }; - A.MapBase_addAll_closure.prototype = { - call$2(key, value) { - this.$this.$indexSet(0, key, value); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("~(MapBase.K,MapBase.V)"); - } - }; - A.MapBase_entries_closure.prototype = { - call$1(key) { - var t1 = this.$this, - t2 = t1.$index(0, key); - if (t2 == null) - t2 = A._instanceType(t1)._eval$1("MapBase.V")._as(t2); - return new A.MapEntry(key, t2, A._instanceType(t1)._eval$1("MapEntry")); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("MapEntry(MapBase.K)"); - } - }; - A.MapBase_mapToString_closure.prototype = { - call$2(k, v) { - var t2, - t1 = this._box_0; - if (!t1.first) - this.result._contents += ", "; - t1.first = false; - t1 = this.result; - t2 = A.S(k); - t2 = t1._contents += t2; - t1._contents = t2 + ": "; - t2 = A.S(v); - t1._contents += t2; - }, - $signature: 173 - }; - A.UnmodifiableMapBase.prototype = {}; - A._MapBaseValueIterable.prototype = { - get$length(_) { - var t1 = this._map; - return t1.get$length(t1); - }, - get$isEmpty(_) { - var t1 = this._map; - return t1.get$isEmpty(t1); - }, - get$isNotEmpty(_) { - var t1 = this._map; - return t1.get$isNotEmpty(t1); - }, - get$first(_) { - var t1 = this._map; - t1 = t1.$index(0, J.get$first$ax(t1.get$keys(t1))); - return t1 == null ? this.$ti._rest[1]._as(t1) : t1; - }, - get$single(_) { - var t1 = this._map; - t1 = t1.$index(0, J.get$single$ax(t1.get$keys(t1))); - return t1 == null ? this.$ti._rest[1]._as(t1) : t1; - }, - get$last(_) { - var t1 = this._map; - t1 = t1.$index(0, J.get$last$ax(t1.get$keys(t1))); - return t1 == null ? this.$ti._rest[1]._as(t1) : t1; - }, - get$iterator(_) { - var t1 = this._map; - return new A._MapBaseValueIterator(J.get$iterator$ax(t1.get$keys(t1)), t1, this.$ti._eval$1("_MapBaseValueIterator<1,2>")); - } - }; - A._MapBaseValueIterator.prototype = { - moveNext$0() { - var _this = this, - t1 = _this._collection$_keys; - if (t1.moveNext$0()) { - _this._collection$_current = _this._map.$index(0, t1.get$current(t1)); - return true; - } - _this._collection$_current = null; - return false; - }, - get$current(_) { - var t1 = this._collection$_current; - return t1 == null ? this.$ti._rest[1]._as(t1) : t1; - } - }; - A._UnmodifiableMapMixin.prototype = { - $indexSet(_, key, value) { - throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); - }, - addAll$1(_, other) { - throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); - }, - remove$1(_, key) { - throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); - } - }; - A.MapView.prototype = { - cast$2$0(_, RK, RV) { - return this._map.cast$2$0(0, RK, RV); - }, - $index(_, key) { - return this._map.$index(0, key); - }, - $indexSet(_, key, value) { - this._map.$indexSet(0, key, value); - }, - addAll$1(_, other) { - this._map.addAll$1(0, other); - }, - containsKey$1(key) { - return this._map.containsKey$1(key); - }, - forEach$1(_, action) { - this._map.forEach$1(0, action); - }, - get$isEmpty(_) { - var t1 = this._map; - return t1.get$isEmpty(t1); - }, - get$isNotEmpty(_) { - var t1 = this._map; - return t1.get$isNotEmpty(t1); - }, - get$length(_) { - var t1 = this._map; - return t1.get$length(t1); - }, - get$keys(_) { - var t1 = this._map; - return t1.get$keys(t1); - }, - remove$1(_, key) { - return this._map.remove$1(0, key); - }, - toString$0(_) { - return this._map.toString$0(0); - }, - get$values(_) { - var t1 = this._map; - return t1.get$values(t1); - }, - get$entries(_) { - var t1 = this._map; - return t1.get$entries(t1); - }, - $isMap: 1 - }; - A.UnmodifiableMapView.prototype = { - cast$2$0(_, RK, RV) { - return new A.UnmodifiableMapView(this._map.cast$2$0(0, RK, RV), RK._eval$1("@<0>")._bind$1(RV)._eval$1("UnmodifiableMapView<1,2>")); - } - }; - A.ListQueue.prototype = { - get$iterator(_) { - var _this = this; - return new A._ListQueueIterator(_this, _this._tail, _this._modificationCount, _this._head, _this.$ti._eval$1("_ListQueueIterator<1>")); - }, - get$isEmpty(_) { - return this._head === this._tail; - }, - get$length(_) { - return (this._tail - this._head & this._table.length - 1) >>> 0; - }, - get$first(_) { - var _this = this, - t1 = _this._head; - if (t1 === _this._tail) - throw A.wrapException(A.IterableElementError_noElement()); - t1 = _this._table[t1]; - return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; - }, - get$last(_) { - var _this = this, - t1 = _this._head, - t2 = _this._tail; - if (t1 === t2) - throw A.wrapException(A.IterableElementError_noElement()); - t1 = _this._table; - t1 = t1[(t2 - 1 & t1.length - 1) >>> 0]; - return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; - }, - get$single(_) { - var t1, _this = this; - if (_this._head === _this._tail) - throw A.wrapException(A.IterableElementError_noElement()); - if (_this.get$length(0) > 1) - throw A.wrapException(A.IterableElementError_tooMany()); - t1 = _this._table[_this._head]; - return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; - }, - elementAt$1(_, index) { - var t1, _this = this; - A.IndexError_check(index, _this.get$length(0), _this, null, null); - t1 = _this._table; - t1 = t1[(_this._head + index & t1.length - 1) >>> 0]; - return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; - }, - toList$1$growable(_, growable) { - var t1, list, t2, t3, i, t4, _this = this, - mask = _this._table.length - 1, - $length = (_this._tail - _this._head & mask) >>> 0; - if ($length === 0) { - t1 = J.JSArray_JSArray$growable(0, _this.$ti._precomputed1); - return t1; - } - t1 = _this.$ti._precomputed1; - list = A.List_List$filled($length, _this.get$first(0), true, t1); - for (t2 = _this._table, t3 = _this._head, i = 0; i < $length; ++i) { - t4 = t2[(t3 + i & mask) >>> 0]; - list[i] = t4 == null ? t1._as(t4) : t4; - } - return list; - }, - toList$0(_) { - return this.toList$1$growable(0, true); - }, - addAll$1(_, elements) { - var addCount, $length, t2, t3, t4, newTable, endSpace, preSpace, _i, _this = this, - t1 = _this.$ti; - if (t1._eval$1("List<1>")._is(elements)) { - addCount = elements.length; - $length = _this.get$length(0); - t2 = $length + addCount; - t3 = _this._table; - t4 = t3.length; - if (t2 >= t4) { - newTable = A.List_List$filled(A.ListQueue__nextPowerOf2(t2 + (t2 >>> 1)), null, false, t1._eval$1("1?")); - _this._tail = _this._collection$_writeToList$1(newTable); - _this._table = newTable; - _this._head = 0; - B.JSArray_methods.setRange$4(newTable, $length, t2, elements, 0); - _this._tail += addCount; - } else { - t1 = _this._tail; - endSpace = t4 - t1; - if (addCount < endSpace) { - B.JSArray_methods.setRange$4(t3, t1, t1 + addCount, elements, 0); - _this._tail += addCount; - } else { - preSpace = addCount - endSpace; - B.JSArray_methods.setRange$4(t3, t1, t1 + endSpace, elements, 0); - B.JSArray_methods.setRange$4(_this._table, 0, preSpace, elements, endSpace); - _this._tail = preSpace; - } - } - ++_this._modificationCount; - } else - for (t1 = elements.length, _i = 0; _i < elements.length; elements.length === t1 || (0, A.throwConcurrentModificationError)(elements), ++_i) - _this._add$1(elements[_i]); - }, - clear$0(_) { - var t2, t3, _this = this, - i = _this._head, - t1 = _this._tail; - if (i !== t1) { - for (t2 = _this._table, t3 = t2.length - 1; i !== t1; i = (i + 1 & t3) >>> 0) - t2[i] = null; - _this._head = _this._tail = 0; - ++_this._modificationCount; - } - }, - toString$0(_) { - return A.Iterable_iterableToFullString(this, "{", "}"); - }, - addFirst$1(value) { - var _this = this, - t1 = _this._head, - t2 = _this._table; - t1 = _this._head = (t1 - 1 & t2.length - 1) >>> 0; - t2[t1] = value; - if (t1 === _this._tail) - _this._grow$0(); - ++_this._modificationCount; - }, - removeFirst$0() { - var t2, result, _this = this, - t1 = _this._head; - if (t1 === _this._tail) - throw A.wrapException(A.IterableElementError_noElement()); - ++_this._modificationCount; - t2 = _this._table; - result = t2[t1]; - if (result == null) - result = _this.$ti._precomputed1._as(result); - t2[t1] = null; - _this._head = (t1 + 1 & t2.length - 1) >>> 0; - return result; - }, - _add$1(element) { - var _this = this, - t1 = _this._table, - t2 = _this._tail; - t1[t2] = element; - t1 = (t2 + 1 & t1.length - 1) >>> 0; - _this._tail = t1; - if (_this._head === t1) - _this._grow$0(); - ++_this._modificationCount; - }, - _grow$0() { - var _this = this, - newTable = A.List_List$filled(_this._table.length * 2, null, false, _this.$ti._eval$1("1?")), - t1 = _this._table, - t2 = _this._head, - split = t1.length - t2; - B.JSArray_methods.setRange$4(newTable, 0, split, t1, t2); - B.JSArray_methods.setRange$4(newTable, split, split + _this._head, _this._table, 0); - _this._head = 0; - _this._tail = _this._table.length; - _this._table = newTable; - }, - _collection$_writeToList$1(target) { - var $length, firstPartSize, _this = this, - t1 = _this._head, - t2 = _this._tail, - t3 = _this._table; - if (t1 <= t2) { - $length = t2 - t1; - B.JSArray_methods.setRange$4(target, 0, $length, t3, t1); - return $length; - } else { - firstPartSize = t3.length - t1; - B.JSArray_methods.setRange$4(target, 0, firstPartSize, t3, t1); - B.JSArray_methods.setRange$4(target, firstPartSize, firstPartSize + _this._tail, _this._table, 0); - return _this._tail + firstPartSize; - } - }, - $isQueue: 1 - }; - A._ListQueueIterator.prototype = { - get$current(_) { - var t1 = this._collection$_current; - return t1 == null ? this.$ti._precomputed1._as(t1) : t1; - }, - moveNext$0() { - var t2, _this = this, - t1 = _this._queue; - if (_this._modificationCount !== t1._modificationCount) - A.throwExpression(A.ConcurrentModificationError$(t1)); - t2 = _this._collection$_position; - if (t2 === _this._collection$_end) { - _this._collection$_current = null; - return false; - } - t1 = t1._table; - _this._collection$_current = t1[t2]; - _this._collection$_position = (t2 + 1 & t1.length - 1) >>> 0; - return true; - } - }; - A.SetBase.prototype = { - get$isEmpty(_) { - return this.get$length(this) === 0; - }, - get$isNotEmpty(_) { - return this.get$length(this) !== 0; - }, - addAll$1(_, elements) { - var t1; - for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) - this.add$1(0, t1.get$current(t1)); - }, - removeAll$1(elements) { - var t1; - for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) - this.remove$1(0, t1.get$current(t1)); - }, - difference$1(other) { - var t1, t2, element, - result = this.toSet$0(0); - for (t1 = this.get$iterator(this), t2 = other._source; t1.moveNext$0();) { - element = t1.get$current(t1); - if (t2.contains$1(0, element)) - result.remove$1(0, element); - } - return result; - }, - toList$1$growable(_, growable) { - return A.List_List$of(this, true, A._instanceType(this)._precomputed1); - }, - toList$0(_) { - return this.toList$1$growable(0, true); - }, - map$1$1(_, f, $T) { - return new A.EfficientLengthMappedIterable(this, f, A._instanceType(this)._eval$1("@<1>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); - }, - get$single(_) { - var it, _this = this; - if (_this.get$length(_this) > 1) - throw A.wrapException(A.IterableElementError_tooMany()); - it = _this.get$iterator(_this); - if (!it.moveNext$0()) - throw A.wrapException(A.IterableElementError_noElement()); - return it.get$current(it); - }, - toString$0(_) { - return A.Iterable_iterableToFullString(this, "{", "}"); - }, - where$1(_, f) { - return new A.WhereIterable(this, f, A._instanceType(this)._eval$1("WhereIterable<1>")); - }, - forEach$1(_, f) { - var t1; - for (t1 = this.get$iterator(this); t1.moveNext$0();) - f.call$1(t1.get$current(t1)); - }, - every$1(_, f) { - var t1; - for (t1 = this.get$iterator(this); t1.moveNext$0();) - if (!f.call$1(t1.get$current(t1))) - return false; - return true; - }, - any$1(_, test) { - var t1; - for (t1 = this.get$iterator(this); t1.moveNext$0();) - if (test.call$1(t1.get$current(t1))) - return true; - return false; - }, - take$1(_, n) { - return A.TakeIterable_TakeIterable(this, n, A._instanceType(this)._precomputed1); - }, - skip$1(_, n) { - return A.SkipIterable_SkipIterable(this, n, A._instanceType(this)._precomputed1); - }, - get$first(_) { - var it = this.get$iterator(this); - if (!it.moveNext$0()) - throw A.wrapException(A.IterableElementError_noElement()); - return it.get$current(it); - }, - get$last(_) { - var result, - it = this.get$iterator(this); - if (!it.moveNext$0()) - throw A.wrapException(A.IterableElementError_noElement()); - do - result = it.get$current(it); - while (it.moveNext$0()); - return result; - }, - elementAt$1(_, index) { - var iterator, skipCount; - A.RangeError_checkNotNegative(index, "index"); - iterator = this.get$iterator(this); - for (skipCount = index; iterator.moveNext$0();) { - if (skipCount === 0) - return iterator.get$current(iterator); - --skipCount; - } - throw A.wrapException(A.IndexError$withLength(index, index - skipCount, this, null, "index")); - }, - $isEfficientLengthIterable: 1, - $isIterable: 1, - $isSet: 1 - }; - A._SetBase.prototype = { - difference$1(other) { - var t1, t2, t3, element, _this = this, - result = _this._newSet$0(); - for (t1 = A._LinkedHashSetIterator$(_this, _this._modifications, A._instanceType(_this)._precomputed1), t2 = other._source, t3 = t1.$ti._precomputed1; t1.moveNext$0();) { - element = t1._collection$_current; - if (element == null) - element = t3._as(element); - if (!t2.contains$1(0, element)) - result.add$1(0, element); - } - return result; - }, - intersection$1(other) { - var t1, t2, t3, element, _this = this, - result = _this._newSet$0(); - for (t1 = A._LinkedHashSetIterator$(_this, _this._modifications, A._instanceType(_this)._precomputed1), t2 = other._baseMap, t3 = t1.$ti._precomputed1; t1.moveNext$0();) { - element = t1._collection$_current; - if (element == null) - element = t3._as(element); - if (t2.containsKey$1(element)) - result.add$1(0, element); - } - return result; - }, - toSet$0(_) { - var t1 = this._newSet$0(); - t1.addAll$1(0, this); - return t1; - } - }; - A._UnmodifiableSetMixin.prototype = { - add$1(_, value) { - return A._UnmodifiableSetMixin__throwUnmodifiable(); - }, - addAll$1(_, elements) { - return A._UnmodifiableSetMixin__throwUnmodifiable(); - }, - remove$1(_, value) { - return A._UnmodifiableSetMixin__throwUnmodifiable(); - } - }; - A.UnmodifiableSetView.prototype = { - contains$1(_, element) { - return this._collection$_source.contains$1(0, element); - }, - get$length(_) { - return this._collection$_source._collection$_length; - }, - get$iterator(_) { - var t1 = this._collection$_source; - return A._LinkedHashSetIterator$(t1, t1._modifications, A._instanceType(t1)._precomputed1); - }, - toSet$0(_) { - return this._collection$_source.toSet$0(0); - } - }; - A._UnmodifiableMapView_MapView__UnmodifiableMapMixin.prototype = {}; - A._UnmodifiableSetView_SetBase__UnmodifiableSetMixin.prototype = {}; - A._JsonMap.prototype = { - $index(_, key) { - var result, - t1 = this._processed; - if (t1 == null) - return this._data.$index(0, key); - else if (typeof key != "string") - return null; - else { - result = t1[key]; - return typeof result == "undefined" ? this._process$1(key) : result; - } - }, - get$length(_) { - return this._processed == null ? this._data.__js_helper$_length : this._convert$_computeKeys$0().length; - }, - get$isEmpty(_) { - return this.get$length(0) === 0; - }, - get$isNotEmpty(_) { - return this.get$length(0) > 0; - }, - get$keys(_) { - var t1; - if (this._processed == null) { - t1 = this._data; - return new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); - } - return new A._JsonMapKeyIterable(this); - }, - get$values(_) { - var _this = this; - if (_this._processed == null) - return _this._data.get$values(0); - return A.MappedIterable_MappedIterable(_this._convert$_computeKeys$0(), new A._JsonMap_values_closure(_this), type$.String, type$.dynamic); - }, - $indexSet(_, key, value) { - var processed, original, _this = this; - if (_this._processed == null) - _this._data.$indexSet(0, key, value); - else if (_this.containsKey$1(key)) { - processed = _this._processed; - processed[key] = value; - original = _this._original; - if (original == null ? processed != null : original !== processed) - original[key] = null; - } else - _this._upgrade$0().$indexSet(0, key, value); - }, - addAll$1(_, other) { - other.forEach$1(0, new A._JsonMap_addAll_closure(this)); - }, - containsKey$1(key) { - if (this._processed == null) - return this._data.containsKey$1(key); - if (typeof key != "string") - return false; - return Object.prototype.hasOwnProperty.call(this._original, key); - }, - remove$1(_, key) { - if (this._processed != null && !this.containsKey$1(key)) - return null; - return this._upgrade$0().remove$1(0, key); - }, - forEach$1(_, f) { - var keys, i, key, value, _this = this; - if (_this._processed == null) - return _this._data.forEach$1(0, f); - keys = _this._convert$_computeKeys$0(); - for (i = 0; i < keys.length; ++i) { - key = keys[i]; - value = _this._processed[key]; - if (typeof value == "undefined") { - value = A._convertJsonToDartLazy(_this._original[key]); - _this._processed[key] = value; - } - f.call$2(key, value); - if (keys !== _this._data) - throw A.wrapException(A.ConcurrentModificationError$(_this)); - } - }, - _convert$_computeKeys$0() { - var keys = this._data; - if (keys == null) - keys = this._data = A._setArrayType(Object.keys(this._original), type$.JSArray_String); - return keys; - }, - _upgrade$0() { - var result, keys, i, t1, key, _this = this; - if (_this._processed == null) - return _this._data; - result = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic); - keys = _this._convert$_computeKeys$0(); - for (i = 0; t1 = keys.length, i < t1; ++i) { - key = keys[i]; - result.$indexSet(0, key, _this.$index(0, key)); - } - if (t1 === 0) - keys.push(""); - else - B.JSArray_methods.clear$0(keys); - _this._original = _this._processed = null; - return _this._data = result; - }, - _process$1(key) { - var result; - if (!Object.prototype.hasOwnProperty.call(this._original, key)) - return null; - result = A._convertJsonToDartLazy(this._original[key]); - return this._processed[key] = result; - } - }; - A._JsonMap_values_closure.prototype = { - call$1(each) { - return this.$this.$index(0, each); - }, - $signature: 213 - }; - A._JsonMap_addAll_closure.prototype = { - call$2(key, value) { - this.$this.$indexSet(0, key, value); - }, - $signature: 129 - }; - A._JsonMapKeyIterable.prototype = { - get$length(_) { - return this._convert$_parent.get$length(0); - }, - elementAt$1(_, index) { - var t1 = this._convert$_parent; - return t1._processed == null ? t1.get$keys(0).elementAt$1(0, index) : t1._convert$_computeKeys$0()[index]; - }, - get$iterator(_) { - var t1 = this._convert$_parent; - if (t1._processed == null) { - t1 = t1.get$keys(0); - t1 = t1.get$iterator(t1); - } else { - t1 = t1._convert$_computeKeys$0(); - t1 = new J.ArrayIterator(t1, t1.length, A._arrayInstanceType(t1)._eval$1("ArrayIterator<1>")); - } - return t1; - }, - contains$1(_, key) { - return this._convert$_parent.containsKey$1(key); - } - }; - A._Utf8Decoder__decoder_closure.prototype = { - call$0() { - var t1, exception; - try { - t1 = new TextDecoder("utf-8", {fatal: true}); - return t1; - } catch (exception) { - } - return null; - }, - $signature: 61 - }; - A._Utf8Decoder__decoderNonfatal_closure.prototype = { - call$0() { - var t1, exception; - try { - t1 = new TextDecoder("utf-8", {fatal: false}); - return t1; - } catch (exception) { - } - return null; - }, - $signature: 61 - }; - A.AsciiCodec.prototype = { - encode$1(source) { - return B.AsciiEncoder_127.convert$1(source); - } - }; - A._UnicodeSubsetEncoder.prototype = { - convert$1(string) { - var t1, i, codeUnit, - end = A.RangeError_checkValidRange(0, null, string.length), - result = new Uint8Array(end); - for (t1 = ~this._subsetMask, i = 0; i < end; ++i) { - codeUnit = string.charCodeAt(i); - if ((codeUnit & t1) !== 0) - throw A.wrapException(A.ArgumentError$value(string, "string", "Contains invalid characters.")); - result[i] = codeUnit; - } - return result; - } - }; - A.AsciiEncoder.prototype = {}; - A.Base64Codec.prototype = { - normalize$3(source, start, end) { - var inverseAlphabet, i, sliceStart, buffer, firstPadding, firstPaddingSourceIndex, paddingCount, i0, char, i1, digit1, digit2, char0, value, t1, t2, endLength, $length, - _s31_ = "Invalid base64 encoding length "; - end = A.RangeError_checkValidRange(start, end, source.length); - inverseAlphabet = $.$get$_Base64Decoder__inverseAlphabet(); - for (i = start, sliceStart = i, buffer = null, firstPadding = -1, firstPaddingSourceIndex = -1, paddingCount = 0; i < end; i = i0) { - i0 = i + 1; - char = source.charCodeAt(i); - if (char === 37) { - i1 = i0 + 2; - if (i1 <= end) { - digit1 = A.hexDigitValue(source.charCodeAt(i0)); - digit2 = A.hexDigitValue(source.charCodeAt(i0 + 1)); - char0 = digit1 * 16 + digit2 - (digit2 & 256); - if (char0 === 37) - char0 = -1; - i0 = i1; - } else - char0 = -1; - } else - char0 = char; - if (0 <= char0 && char0 <= 127) { - value = inverseAlphabet[char0]; - if (value >= 0) { - char0 = string$.ABCDEF.charCodeAt(value); - if (char0 === char) - continue; - char = char0; - } else { - if (value === -1) { - if (firstPadding < 0) { - t1 = buffer == null ? null : buffer._contents.length; - if (t1 == null) - t1 = 0; - firstPadding = t1 + (i - sliceStart); - firstPaddingSourceIndex = i; - } - ++paddingCount; - if (char === 61) - continue; - } - char = char0; - } - if (value !== -2) { - if (buffer == null) { - buffer = new A.StringBuffer(""); - t1 = buffer; - } else - t1 = buffer; - t1._contents += B.JSString_methods.substring$2(source, sliceStart, i); - t2 = A.Primitives_stringFromCharCode(char); - t1._contents += t2; - sliceStart = i0; - continue; - } - } - throw A.wrapException(A.FormatException$("Invalid base64 data", source, i)); - } - if (buffer != null) { - t1 = B.JSString_methods.substring$2(source, sliceStart, end); - t1 = buffer._contents += t1; - t2 = t1.length; - if (firstPadding >= 0) - A.Base64Codec__checkPadding(source, firstPaddingSourceIndex, end, firstPadding, paddingCount, t2); - else { - endLength = B.JSInt_methods.$mod(t2 - 1, 4) + 1; - if (endLength === 1) - throw A.wrapException(A.FormatException$(_s31_, source, end)); - for (; endLength < 4;) { - t1 += "="; - buffer._contents = t1; - ++endLength; - } - } - t1 = buffer._contents; - return B.JSString_methods.replaceRange$3(source, start, end, t1.charCodeAt(0) == 0 ? t1 : t1); - } - $length = end - start; - if (firstPadding >= 0) - A.Base64Codec__checkPadding(source, firstPaddingSourceIndex, end, firstPadding, paddingCount, $length); - else { - endLength = B.JSInt_methods.$mod($length, 4); - if (endLength === 1) - throw A.wrapException(A.FormatException$(_s31_, source, end)); - if (endLength > 1) - source = B.JSString_methods.replaceRange$3(source, end, end, endLength === 2 ? "==" : "="); - } - return source; - } - }; - A.Base64Encoder.prototype = { - startChunkedConversion$1(sink) { - return new A._Utf8Base64EncoderSink(new A._Utf8StringSinkAdapter(new A._Utf8Decoder(false), sink, sink._stringSink), new A._Base64Encoder(string$.ABCDEF)); - } - }; - A._Base64Encoder.prototype = { - createBuffer$1(bufferLength) { - return new Uint8Array(bufferLength); - }, - encode$4(bytes, start, end, isLast) { - var output, _this = this, - byteCount = (_this._convert$_state & 3) + (end - start), - fullChunks = B.JSInt_methods._tdivFast$1(byteCount, 3), - bufferLength = fullChunks * 4; - if (isLast && byteCount - fullChunks * 3 > 0) - bufferLength += 4; - output = _this.createBuffer$1(bufferLength); - _this._convert$_state = A._Base64Encoder_encodeChunk(_this._alphabet, bytes, start, end, isLast, output, 0, _this._convert$_state); - if (bufferLength > 0) - return output; - return null; - } - }; - A._Base64EncoderSink.prototype = {}; - A._Utf8Base64EncoderSink.prototype = { - _convert$_add$4(source, start, end, isLast) { - var buffer = this._encoder.encode$4(source, start, end, isLast); - if (buffer != null) - this._sink.addSlice$4(buffer, 0, buffer.length, isLast); - } - }; - A.ByteConversionSink.prototype = {}; - A.Codec.prototype = {}; - A.Converter.prototype = {}; - A.Encoding.prototype = {}; - A.JsonUnsupportedObjectError.prototype = { - toString$0(_) { - var safeString = A.Error_safeToString(this.unsupportedObject); - return (this.cause != null ? "Converting object to an encodable object failed:" : "Converting object did not return an encodable object:") + " " + safeString; - } - }; - A.JsonCyclicError.prototype = { - toString$0(_) { - return "Cyclic error in JSON stringify"; - } - }; - A.JsonCodec.prototype = { - decode$1(source) { - var t1 = A._parseJson(source, this.get$decoder()._reviver); - return t1; - }, - encode$2$toEncodable(value, toEncodable) { - var t1 = A._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null); - return t1; - }, - get$encoder() { - return B.JsonEncoder_null; - }, - get$decoder() { - return B.JsonDecoder_null; - } - }; - A.JsonEncoder.prototype = {}; - A.JsonDecoder.prototype = {}; - A._JsonStringifier.prototype = { - writeStringContent$1(s) { - var offset, i, charCode, t1, t2, _this = this, - $length = s.length; - for (offset = 0, i = 0; i < $length; ++i) { - charCode = s.charCodeAt(i); - if (charCode > 92) { - if (charCode >= 55296) { - t1 = charCode & 64512; - if (t1 === 55296) { - t2 = i + 1; - t2 = !(t2 < $length && (s.charCodeAt(t2) & 64512) === 56320); - } else - t2 = false; - if (!t2) - if (t1 === 56320) { - t1 = i - 1; - t1 = !(t1 >= 0 && (s.charCodeAt(t1) & 64512) === 55296); - } else - t1 = false; - else - t1 = true; - if (t1) { - if (i > offset) - _this.writeStringSlice$3(s, offset, i); - offset = i + 1; - _this.writeCharCode$1(92); - _this.writeCharCode$1(117); - _this.writeCharCode$1(100); - t1 = charCode >>> 8 & 15; - _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); - t1 = charCode >>> 4 & 15; - _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); - t1 = charCode & 15; - _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); - } - } - continue; - } - if (charCode < 32) { - if (i > offset) - _this.writeStringSlice$3(s, offset, i); - offset = i + 1; - _this.writeCharCode$1(92); - switch (charCode) { - case 8: - _this.writeCharCode$1(98); - break; - case 9: - _this.writeCharCode$1(116); - break; - case 10: - _this.writeCharCode$1(110); - break; - case 12: - _this.writeCharCode$1(102); - break; - case 13: - _this.writeCharCode$1(114); - break; - default: - _this.writeCharCode$1(117); - _this.writeCharCode$1(48); - _this.writeCharCode$1(48); - t1 = charCode >>> 4 & 15; - _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); - t1 = charCode & 15; - _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); - break; - } - } else if (charCode === 34 || charCode === 92) { - if (i > offset) - _this.writeStringSlice$3(s, offset, i); - offset = i + 1; - _this.writeCharCode$1(92); - _this.writeCharCode$1(charCode); - } - } - if (offset === 0) - _this.writeString$1(s); - else if (offset < $length) - _this.writeStringSlice$3(s, offset, $length); - }, - _checkCycle$1(object) { - var t1, t2, i, t3; - for (t1 = this._seen, t2 = t1.length, i = 0; i < t2; ++i) { - t3 = t1[i]; - if (object == null ? t3 == null : object === t3) - throw A.wrapException(new A.JsonCyclicError(object, null)); - } - t1.push(object); - }, - writeObject$1(object) { - var customJson, e, t1, exception, _this = this; - if (_this.writeJsonValue$1(object)) - return; - _this._checkCycle$1(object); - try { - customJson = _this._toEncodable.call$1(object); - if (!_this.writeJsonValue$1(customJson)) { - t1 = A.JsonUnsupportedObjectError$(object, null, _this.get$_partialResult()); - throw A.wrapException(t1); - } - _this._seen.pop(); - } catch (exception) { - e = A.unwrapException(exception); - t1 = A.JsonUnsupportedObjectError$(object, e, _this.get$_partialResult()); - throw A.wrapException(t1); - } - }, - writeJsonValue$1(object) { - var success, _this = this; - if (typeof object == "number") { - if (!isFinite(object)) - return false; - _this.writeNumber$1(object); - return true; - } else if (object === true) { - _this.writeString$1("true"); - return true; - } else if (object === false) { - _this.writeString$1("false"); - return true; - } else if (object == null) { - _this.writeString$1("null"); - return true; - } else if (typeof object == "string") { - _this.writeString$1('"'); - _this.writeStringContent$1(object); - _this.writeString$1('"'); - return true; - } else if (type$.List_dynamic._is(object)) { - _this._checkCycle$1(object); - _this.writeList$1(object); - _this._seen.pop(); - return true; - } else if (type$.Map_dynamic_dynamic._is(object)) { - _this._checkCycle$1(object); - success = _this.writeMap$1(object); - _this._seen.pop(); - return success; - } else - return false; - }, - writeList$1(list) { - var t1, i, _this = this; - _this.writeString$1("["); - t1 = J.getInterceptor$asx(list); - if (t1.get$isNotEmpty(list)) { - _this.writeObject$1(t1.$index(list, 0)); - for (i = 1; i < t1.get$length(list); ++i) { - _this.writeString$1(","); - _this.writeObject$1(t1.$index(list, i)); - } - } - _this.writeString$1("]"); - }, - writeMap$1(map) { - var t1, keyValueList, i, separator, _this = this, _box_0 = {}; - if (map.get$isEmpty(map)) { - _this.writeString$1("{}"); - return true; - } - t1 = map.get$length(map) * 2; - keyValueList = A.List_List$filled(t1, null, false, type$.nullable_Object); - i = _box_0.i = 0; - _box_0.allStringKeys = true; - map.forEach$1(0, new A._JsonStringifier_writeMap_closure(_box_0, keyValueList)); - if (!_box_0.allStringKeys) - return false; - _this.writeString$1("{"); - for (separator = '"'; i < t1; i += 2, separator = ',"') { - _this.writeString$1(separator); - _this.writeStringContent$1(A._asString(keyValueList[i])); - _this.writeString$1('":'); - _this.writeObject$1(keyValueList[i + 1]); - } - _this.writeString$1("}"); - return true; - } - }; - A._JsonStringifier_writeMap_closure.prototype = { - call$2(key, value) { - var t1, t2, t3, i; - if (typeof key != "string") - this._box_0.allStringKeys = false; - t1 = this.keyValueList; - t2 = this._box_0; - t3 = t2.i; - i = t2.i = t3 + 1; - t1[t3] = key; - t2.i = i + 1; - t1[i] = value; - }, - $signature: 173 - }; - A._JsonStringStringifier.prototype = { - get$_partialResult() { - var t1 = this._sink._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - writeNumber$1(number) { - var t1 = this._sink, - t2 = B.JSNumber_methods.toString$0(number); - t1._contents += t2; - }, - writeString$1(string) { - this._sink._contents += string; - }, - writeStringSlice$3(string, start, end) { - this._sink._contents += B.JSString_methods.substring$2(string, start, end); - }, - writeCharCode$1(charCode) { - var t1 = this._sink, - t2 = A.Primitives_stringFromCharCode(charCode); - t1._contents += t2; - } - }; - A.StringConversionSink.prototype = {}; - A._StringSinkConversionSink.prototype = { - close$0(_) { - } - }; - A._StringCallbackSink.prototype = { - close$0(_) { - var t1 = this._stringSink, - t2 = t1._contents; - t1._contents = ""; - this._convert$_callback.call$1(t2.charCodeAt(0) == 0 ? t2 : t2); - }, - asUtf8Sink$1(allowMalformed) { - return new A._Utf8StringSinkAdapter(new A._Utf8Decoder(allowMalformed), this, this._stringSink); - } - }; - A._Utf8StringSinkAdapter.prototype = { - close$0(_) { - this._decoder.flush$1(this._stringSink); - this._sink.close$0(0); - }, - add$1(_, chunk) { - this.addSlice$4(chunk, 0, J.get$length$asx(chunk), false); - }, - addSlice$4(codeUnits, startIndex, endIndex, isLast) { - var t1 = this._stringSink, - t2 = this._decoder._convertGeneral$4(codeUnits, startIndex, endIndex, false); - t1._contents += t2; - if (isLast) - this.close$0(0); - } - }; - A.Utf8Codec.prototype = { - encode$1(string) { - return B.C_Utf8Encoder.convert$1(string); - } - }; - A.Utf8Encoder.prototype = { - convert$1(string) { - var t1, encoder, - end = A.RangeError_checkValidRange(0, null, string.length); - if (end === 0) - return new Uint8Array(0); - t1 = new Uint8Array(end * 3); - encoder = new A._Utf8Encoder(t1); - if (encoder._fillBuffer$3(string, 0, end) !== end) - encoder._writeReplacementCharacter$0(); - return B.NativeUint8List_methods.sublist$2(t1, 0, encoder._bufferIndex); - } - }; - A._Utf8Encoder.prototype = { - _writeReplacementCharacter$0() { - var _this = this, - t1 = _this._buffer, - t2 = _this._bufferIndex, - t3 = _this._bufferIndex = t2 + 1; - t1[t2] = 239; - t2 = _this._bufferIndex = t3 + 1; - t1[t3] = 191; - _this._bufferIndex = t2 + 1; - t1[t2] = 189; - }, - _writeSurrogate$2(leadingSurrogate, nextCodeUnit) { - var rune, t1, t2, t3, _this = this; - if ((nextCodeUnit & 64512) === 56320) { - rune = 65536 + ((leadingSurrogate & 1023) << 10) | nextCodeUnit & 1023; - t1 = _this._buffer; - t2 = _this._bufferIndex; - t3 = _this._bufferIndex = t2 + 1; - t1[t2] = rune >>> 18 | 240; - t2 = _this._bufferIndex = t3 + 1; - t1[t3] = rune >>> 12 & 63 | 128; - t3 = _this._bufferIndex = t2 + 1; - t1[t2] = rune >>> 6 & 63 | 128; - _this._bufferIndex = t3 + 1; - t1[t3] = rune & 63 | 128; - return true; - } else { - _this._writeReplacementCharacter$0(); - return false; - } - }, - _fillBuffer$3(str, start, end) { - var t1, t2, stringIndex, codeUnit, t3, stringIndex0, t4, _this = this; - if (start !== end && (str.charCodeAt(end - 1) & 64512) === 55296) - --end; - for (t1 = _this._buffer, t2 = t1.length, stringIndex = start; stringIndex < end; ++stringIndex) { - codeUnit = str.charCodeAt(stringIndex); - if (codeUnit <= 127) { - t3 = _this._bufferIndex; - if (t3 >= t2) - break; - _this._bufferIndex = t3 + 1; - t1[t3] = codeUnit; - } else { - t3 = codeUnit & 64512; - if (t3 === 55296) { - if (_this._bufferIndex + 4 > t2) - break; - stringIndex0 = stringIndex + 1; - if (_this._writeSurrogate$2(codeUnit, str.charCodeAt(stringIndex0))) - stringIndex = stringIndex0; - } else if (t3 === 56320) { - if (_this._bufferIndex + 3 > t2) - break; - _this._writeReplacementCharacter$0(); - } else if (codeUnit <= 2047) { - t3 = _this._bufferIndex; - t4 = t3 + 1; - if (t4 >= t2) - break; - _this._bufferIndex = t4; - t1[t3] = codeUnit >>> 6 | 192; - _this._bufferIndex = t4 + 1; - t1[t4] = codeUnit & 63 | 128; - } else { - t3 = _this._bufferIndex; - if (t3 + 2 >= t2) - break; - t4 = _this._bufferIndex = t3 + 1; - t1[t3] = codeUnit >>> 12 | 224; - t3 = _this._bufferIndex = t4 + 1; - t1[t4] = codeUnit >>> 6 & 63 | 128; - _this._bufferIndex = t3 + 1; - t1[t3] = codeUnit & 63 | 128; - } - } - } - return stringIndex; - } - }; - A.Utf8Decoder.prototype = { - convert$1(codeUnits) { - return new A._Utf8Decoder(this._allowMalformed)._convertGeneral$4(codeUnits, 0, null, true); - } - }; - A._Utf8Decoder.prototype = { - _convertGeneral$4(codeUnits, start, maybeEnd, single) { - var casted, bytes, errorOffset, t1, result, message, _this = this, - end = A.RangeError_checkValidRange(start, maybeEnd, J.get$length$asx(codeUnits)); - if (start === end) - return ""; - if (codeUnits instanceof Uint8Array) { - casted = codeUnits; - bytes = casted; - errorOffset = 0; - } else { - bytes = A._Utf8Decoder__makeNativeUint8List(codeUnits, start, end); - end -= start; - errorOffset = start; - start = 0; - } - if (single && end - start >= 15) { - t1 = _this.allowMalformed; - result = A._Utf8Decoder__convertInterceptedUint8List(t1, bytes, start, end); - if (result != null) { - if (!t1) - return result; - if (result.indexOf("\ufffd") < 0) - return result; - } - } - result = _this._decodeRecursive$4(bytes, start, end, single); - t1 = _this._convert$_state; - if ((t1 & 1) !== 0) { - message = A._Utf8Decoder_errorDescription(t1); - _this._convert$_state = 0; - throw A.wrapException(A.FormatException$(message, codeUnits, errorOffset + _this._charOrIndex)); - } - return result; - }, - _decodeRecursive$4(bytes, start, end, single) { - var mid, s1, _this = this; - if (end - start > 1000) { - mid = B.JSInt_methods._tdivFast$1(start + end, 2); - s1 = _this._decodeRecursive$4(bytes, start, mid, false); - if ((_this._convert$_state & 1) !== 0) - return s1; - return s1 + _this._decodeRecursive$4(bytes, mid, end, single); - } - return _this.decodeGeneral$4(bytes, start, end, single); - }, - flush$1(sink) { - var t1, - state = this._convert$_state; - this._convert$_state = 0; - if (state <= 32) - return; - if (this.allowMalformed) { - t1 = A.Primitives_stringFromCharCode(65533); - sink._contents += t1; - } else - throw A.wrapException(A.FormatException$(A._Utf8Decoder_errorDescription(77), null, null)); - }, - decodeGeneral$4(bytes, start, end, single) { - var t1, type, t2, i0, markEnd, i1, m, _this = this, _65533 = 65533, - state = _this._convert$_state, - char = _this._charOrIndex, - buffer = new A.StringBuffer(""), - i = start + 1, - byte = bytes[start]; - $label0$0: - for (t1 = _this.allowMalformed; true;) { - for (; true; i = i0) { - type = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHIHHHJEEBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKCCCCCCCCCCCCDCLONNNMEEEEEEEEEEE".charCodeAt(byte) & 31; - char = state <= 32 ? byte & 61694 >>> type : (byte & 63 | char << 6) >>> 0; - state = " \x000:XECCCCCN:lDb \x000:XECCCCCNvlDb \x000:XECCCCCN:lDb AAAAA\x00\x00\x00\x00\x00AAAAA00000AAAAA:::::AAAAAGG000AAAAA00KKKAAAAAG::::AAAAA:IIIIAAAAA000\x800AAAAA\x00\x00\x00\x00 AAAAA".charCodeAt(state + type); - if (state === 0) { - t2 = A.Primitives_stringFromCharCode(char); - buffer._contents += t2; - if (i === end) - break $label0$0; - break; - } else if ((state & 1) !== 0) { - if (t1) - switch (state) { - case 69: - case 67: - t2 = A.Primitives_stringFromCharCode(_65533); - buffer._contents += t2; - break; - case 65: - t2 = A.Primitives_stringFromCharCode(_65533); - buffer._contents += t2; - --i; - break; - default: - t2 = A.Primitives_stringFromCharCode(_65533); - t2 = buffer._contents += t2; - buffer._contents = t2 + A.Primitives_stringFromCharCode(_65533); - break; - } - else { - _this._convert$_state = state; - _this._charOrIndex = i - 1; - return ""; - } - state = 0; - } - if (i === end) - break $label0$0; - i0 = i + 1; - byte = bytes[i]; - } - i0 = i + 1; - byte = bytes[i]; - if (byte < 128) { - while (true) { - if (!(i0 < end)) { - markEnd = end; - break; - } - i1 = i0 + 1; - byte = bytes[i0]; - if (byte >= 128) { - markEnd = i1 - 1; - i0 = i1; - break; - } - i0 = i1; - } - if (markEnd - i < 20) - for (m = i; m < markEnd; ++m) { - t2 = A.Primitives_stringFromCharCode(bytes[m]); - buffer._contents += t2; - } - else { - t2 = A.String_String$fromCharCodes(bytes, i, markEnd); - buffer._contents += t2; - } - if (markEnd === end) - break $label0$0; - i = i0; - } else - i = i0; - } - if (single && state > 32) - if (t1) { - t1 = A.Primitives_stringFromCharCode(_65533); - buffer._contents += t1; - } else { - _this._convert$_state = 77; - _this._charOrIndex = end; - return ""; - } - _this._convert$_state = state; - _this._charOrIndex = char; - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - }; - A.NoSuchMethodError_toString_closure.prototype = { - call$2(key, value) { - var t1 = this.sb, - t2 = this._box_0, - t3 = t1._contents += t2.comma; - t3 += key.__internal$_name; - t1._contents = t3; - t1._contents = t3 + ": "; - t3 = A.Error_safeToString(value); - t1._contents += t3; - t2.comma = ", "; - }, - $signature: 274 - }; - A.DateTime.prototype = { - $eq(_, other) { - var t1; - if (other == null) - return false; - t1 = false; - if (other instanceof A.DateTime) - if (this._value === other._value) - t1 = this._microsecond === other._microsecond; - return t1; - }, - get$hashCode(_) { - return A.Object_hash(this._value, this._microsecond, B.C_SentinelValue, B.C_SentinelValue); - }, - isAfter$1(other) { - var t1 = this._value, - t2 = other._value; - if (t1 <= t2) - t1 = t1 === t2 && this._microsecond > other._microsecond; - else - t1 = true; - return t1; - }, - compareTo$1(_, other) { - var r = B.JSInt_methods.compareTo$1(this._value, other._value); - if (r !== 0) - return r; - return B.JSInt_methods.compareTo$1(this._microsecond, other._microsecond); - }, - toString$0(_) { - var _this = this, - y = A.DateTime__fourDigits(A.Primitives_getYear(_this)), - m = A.DateTime__twoDigits(A.Primitives_getMonth(_this)), - d = A.DateTime__twoDigits(A.Primitives_getDay(_this)), - h = A.DateTime__twoDigits(A.Primitives_getHours(_this)), - min = A.DateTime__twoDigits(A.Primitives_getMinutes(_this)), - sec = A.DateTime__twoDigits(A.Primitives_getSeconds(_this)), - ms = A.DateTime__threeDigits(A.Primitives_getMilliseconds(_this)), - t1 = _this._microsecond, - us = t1 === 0 ? "" : A.DateTime__threeDigits(t1); - return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms + us; - }, - $isComparable: 1 - }; - A.Duration.prototype = { - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.Duration && this._duration === other._duration; - }, - get$hashCode(_) { - return B.JSInt_methods.get$hashCode(this._duration); - }, - compareTo$1(_, other) { - return B.JSInt_methods.compareTo$1(this._duration, other._duration); - }, - toString$0(_) { - var sign, minutes, minutesPadding, seconds, secondsPadding, - microseconds = this._duration, - hours = B.JSInt_methods._tdivFast$1(microseconds, 3600000000), - microseconds0 = microseconds % 3600000000; - if (microseconds < 0) { - hours = 0 - hours; - microseconds = 0 - microseconds0; - sign = "-"; - } else { - microseconds = microseconds0; - sign = ""; - } - minutes = B.JSInt_methods._tdivFast$1(microseconds, 60000000); - microseconds %= 60000000; - minutesPadding = minutes < 10 ? "0" : ""; - seconds = B.JSInt_methods._tdivFast$1(microseconds, 1000000); - secondsPadding = seconds < 10 ? "0" : ""; - return sign + hours + ":" + minutesPadding + minutes + ":" + secondsPadding + seconds + "." + B.JSString_methods.padLeft$2(B.JSInt_methods.toString$0(microseconds % 1000000), 6, "0"); - }, - $isComparable: 1 - }; - A._Enum.prototype = { - toString$0(_) { - return this._enumToString$0(); - } - }; - A.Error.prototype = { - get$stackTrace() { - return A.Primitives_extractStackTrace(this); - } - }; - A.AssertionError.prototype = { - toString$0(_) { - var t1 = this.message; - if (t1 != null) - return "Assertion failed: " + A.Error_safeToString(t1); - return "Assertion failed"; - }, - get$message(receiver) { - return this.message; - } - }; - A.TypeError.prototype = {}; - A.ArgumentError.prototype = { - get$_errorName() { - return "Invalid argument" + (!this._hasValue ? "(s)" : ""); - }, - get$_errorExplanation() { - return ""; - }, - toString$0(_) { - var _this = this, - $name = _this.name, - nameString = $name == null ? "" : " (" + $name + ")", - message = _this.message, - messageString = message == null ? "" : ": " + A.S(message), - prefix = _this.get$_errorName() + nameString + messageString; - if (!_this._hasValue) - return prefix; - return prefix + _this.get$_errorExplanation() + ": " + A.Error_safeToString(_this.get$invalidValue()); - }, - get$invalidValue() { - return this.invalidValue; - }, - get$message(receiver) { - return this.message; - } - }; - A.RangeError.prototype = { - get$invalidValue() { - return this.invalidValue; - }, - get$_errorName() { - return "RangeError"; - }, - get$_errorExplanation() { - var explanation, - start = this.start, - end = this.end; - if (start == null) - explanation = end != null ? ": Not less than or equal to " + A.S(end) : ""; - else if (end == null) - explanation = ": Not greater than or equal to " + A.S(start); - else if (end > start) - explanation = ": Not in inclusive range " + A.S(start) + ".." + A.S(end); - else - explanation = end < start ? ": Valid value range is empty" : ": Only valid value is " + A.S(start); - return explanation; - } - }; - A.IndexError.prototype = { - get$invalidValue() { - return this.invalidValue; - }, - get$_errorName() { - return "RangeError"; - }, - get$_errorExplanation() { - if (this.invalidValue < 0) - return ": index must not be negative"; - var t1 = this.length; - if (t1 === 0) - return ": no indices are valid"; - return ": index should be less than " + t1; - }, - $isRangeError: 1, - get$length(receiver) { - return this.length; - } - }; - A.NoSuchMethodError.prototype = { - toString$0(_) { - var $arguments, t1, _i, t2, t3, argument, receiverText, actualParameters, _this = this, _box_0 = {}, - sb = new A.StringBuffer(""); - _box_0.comma = ""; - $arguments = _this._core$_arguments; - for (t1 = $arguments.length, _i = 0, t2 = "", t3 = ""; _i < t1; ++_i, t3 = ", ") { - argument = $arguments[_i]; - sb._contents = t2 + t3; - t2 = A.Error_safeToString(argument); - t2 = sb._contents += t2; - _box_0.comma = ", "; - } - _this._namedArguments.forEach$1(0, new A.NoSuchMethodError_toString_closure(_box_0, sb)); - receiverText = A.Error_safeToString(_this._core$_receiver); - actualParameters = sb.toString$0(0); - return "NoSuchMethodError: method not found: '" + _this._memberName.__internal$_name + "'\nReceiver: " + receiverText + "\nArguments: [" + actualParameters + "]"; - } - }; - A.UnsupportedError.prototype = { - toString$0(_) { - return "Unsupported operation: " + this.message; - }, - get$message(receiver) { - return this.message; - } - }; - A.UnimplementedError.prototype = { - toString$0(_) { - return "UnimplementedError: " + this.message; - }, - get$message(receiver) { - return this.message; - } - }; - A.StateError.prototype = { - toString$0(_) { - return "Bad state: " + this.message; - }, - get$message(receiver) { - return this.message; - } - }; - A.ConcurrentModificationError.prototype = { - toString$0(_) { - var t1 = this.modifiedObject; - if (t1 == null) - return "Concurrent modification during iteration."; - return "Concurrent modification during iteration: " + A.Error_safeToString(t1) + "."; - } - }; - A.OutOfMemoryError.prototype = { - toString$0(_) { - return "Out of Memory"; - }, - get$stackTrace() { - return null; - }, - $isError: 1 - }; - A.StackOverflowError.prototype = { - toString$0(_) { - return "Stack Overflow"; - }, - get$stackTrace() { - return null; - }, - $isError: 1 - }; - A._Exception.prototype = { - toString$0(_) { - return "Exception: " + this.message; - }, - $isException: 1, - get$message(receiver) { - return this.message; - } - }; - A.FormatException.prototype = { - toString$0(_) { - var t1, lineNum, lineStart, previousCharWasCR, i, char, lineEnd, prefix, postfix, end, start, - message = this.message, - report = "" !== message ? "FormatException: " + message : "FormatException", - offset = this.offset, - source = this.source; - if (typeof source == "string") { - if (offset != null) - t1 = offset < 0 || offset > source.length; - else - t1 = false; - if (t1) - offset = null; - if (offset == null) { - if (source.length > 78) - source = B.JSString_methods.substring$2(source, 0, 75) + "..."; - return report + "\n" + source; - } - for (lineNum = 1, lineStart = 0, previousCharWasCR = false, i = 0; i < offset; ++i) { - char = source.charCodeAt(i); - if (char === 10) { - if (lineStart !== i || !previousCharWasCR) - ++lineNum; - lineStart = i + 1; - previousCharWasCR = false; - } else if (char === 13) { - ++lineNum; - lineStart = i + 1; - previousCharWasCR = true; - } - } - report = lineNum > 1 ? report + (" (at line " + lineNum + ", character " + (offset - lineStart + 1) + ")\n") : report + (" (at character " + (offset + 1) + ")\n"); - lineEnd = source.length; - for (i = offset; i < lineEnd; ++i) { - char = source.charCodeAt(i); - if (char === 10 || char === 13) { - lineEnd = i; - break; - } - } - prefix = ""; - if (lineEnd - lineStart > 78) { - postfix = "..."; - if (offset - lineStart < 75) { - end = lineStart + 75; - start = lineStart; - } else { - if (lineEnd - offset < 75) { - start = lineEnd - 75; - end = lineEnd; - postfix = ""; - } else { - start = offset - 36; - end = offset + 36; - } - prefix = "..."; - } - } else { - end = lineEnd; - start = lineStart; - postfix = ""; - } - return report + prefix + B.JSString_methods.substring$2(source, start, end) + postfix + "\n" + B.JSString_methods.$mul(" ", offset - start + prefix.length) + "^\n"; - } else - return offset != null ? report + (" (at offset " + A.S(offset) + ")") : report; - }, - $isException: 1, - get$message(receiver) { - return this.message; - } - }; - A.Iterable.prototype = { - cast$1$0(_, $R) { - return A.CastIterable_CastIterable(this, A._instanceType(this)._eval$1("Iterable.E"), $R); - }, - followedBy$1(_, other) { - var _this = this, - t1 = A._instanceType(_this); - if (t1._eval$1("EfficientLengthIterable")._is(_this)) - return A.FollowedByIterable_FollowedByIterable$firstEfficient(_this, other, t1._eval$1("Iterable.E")); - return new A.FollowedByIterable(_this, other, t1._eval$1("FollowedByIterable")); - }, - map$1$1(_, toElement, $T) { - return A.MappedIterable_MappedIterable(this, toElement, A._instanceType(this)._eval$1("Iterable.E"), $T); - }, - where$1(_, test) { - return new A.WhereIterable(this, test, A._instanceType(this)._eval$1("WhereIterable")); - }, - expand$1$1(_, toElements, $T) { - return new A.ExpandIterable(this, toElements, A._instanceType(this)._eval$1("@")._bind$1($T)._eval$1("ExpandIterable<1,2>")); - }, - contains$1(_, element) { - var t1; - for (t1 = this.get$iterator(this); t1.moveNext$0();) - if (J.$eq$(t1.get$current(t1), element)) - return true; - return false; - }, - forEach$1(_, action) { - var t1; - for (t1 = this.get$iterator(this); t1.moveNext$0();) - action.call$1(t1.get$current(t1)); - }, - fold$1$2(_, initialValue, combine) { - var t1, value; - for (t1 = this.get$iterator(this), value = initialValue; t1.moveNext$0();) - value = combine.call$2(value, t1.get$current(t1)); - return value; - }, - fold$2(_, initialValue, combine) { - return this.fold$1$2(0, initialValue, combine, type$.dynamic); - }, - every$1(_, test) { - var t1; - for (t1 = this.get$iterator(this); t1.moveNext$0();) - if (!test.call$1(t1.get$current(t1))) - return false; - return true; - }, - join$1(_, separator) { - var first, t1, - iterator = this.get$iterator(this); - if (!iterator.moveNext$0()) - return ""; - first = J.toString$0$(iterator.get$current(iterator)); - if (!iterator.moveNext$0()) - return first; - if (separator.length === 0) { - t1 = first; - do - t1 += A.S(J.toString$0$(iterator.get$current(iterator))); - while (iterator.moveNext$0()); - } else { - t1 = first; - do - t1 = t1 + separator + A.S(J.toString$0$(iterator.get$current(iterator))); - while (iterator.moveNext$0()); - } - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - any$1(_, test) { - var t1; - for (t1 = this.get$iterator(this); t1.moveNext$0();) - if (test.call$1(t1.get$current(t1))) - return true; - return false; - }, - toList$1$growable(_, growable) { - return A.List_List$of(this, growable, A._instanceType(this)._eval$1("Iterable.E")); - }, - toList$0(_) { - return this.toList$1$growable(0, true); - }, - toSet$0(_) { - return A.LinkedHashSet_LinkedHashSet$of(this, A._instanceType(this)._eval$1("Iterable.E")); - }, - get$length(_) { - var count, - it = this.get$iterator(this); - for (count = 0; it.moveNext$0();) - ++count; - return count; - }, - get$isEmpty(_) { - return !this.get$iterator(this).moveNext$0(); - }, - get$isNotEmpty(_) { - return !this.get$isEmpty(this); - }, - take$1(_, count) { - return A.TakeIterable_TakeIterable(this, count, A._instanceType(this)._eval$1("Iterable.E")); - }, - skip$1(_, count) { - return A.SkipIterable_SkipIterable(this, count, A._instanceType(this)._eval$1("Iterable.E")); - }, - skipWhile$1(_, test) { - return new A.SkipWhileIterable(this, test, A._instanceType(this)._eval$1("SkipWhileIterable")); - }, - get$first(_) { - var it = this.get$iterator(this); - if (!it.moveNext$0()) - throw A.wrapException(A.IterableElementError_noElement()); - return it.get$current(it); - }, - get$last(_) { - var result, - it = this.get$iterator(this); - if (!it.moveNext$0()) - throw A.wrapException(A.IterableElementError_noElement()); - do - result = it.get$current(it); - while (it.moveNext$0()); - return result; - }, - get$single(_) { - var result, - it = this.get$iterator(this); - if (!it.moveNext$0()) - throw A.wrapException(A.IterableElementError_noElement()); - result = it.get$current(it); - if (it.moveNext$0()) - throw A.wrapException(A.IterableElementError_tooMany()); - return result; - }, - elementAt$1(_, index) { - var iterator, skipCount; - A.RangeError_checkNotNegative(index, "index"); - iterator = this.get$iterator(this); - for (skipCount = index; iterator.moveNext$0();) { - if (skipCount === 0) - return iterator.get$current(iterator); - --skipCount; - } - throw A.wrapException(A.IndexError$withLength(index, index - skipCount, this, null, "index")); - }, - toString$0(_) { - return A.Iterable_iterableToShortString(this, "(", ")"); - } - }; - A._GeneratorIterable.prototype = { - elementAt$1(_, index) { - A.IndexError_check(index, this.length, this, null, null); - return this._generator.call$1(index); - }, - get$length(receiver) { - return this.length; - } - }; - A.MapEntry.prototype = { - toString$0(_) { - return "MapEntry(" + A.S(this.key) + ": " + A.S(this.value) + ")"; - } - }; - A.Null.prototype = { - get$hashCode(_) { - return A.Object.prototype.get$hashCode.call(this, 0); - }, - toString$0(_) { - return "null"; - } - }; - A.Object.prototype = {$isObject: 1, - $eq(_, other) { - return this === other; - }, - get$hashCode(_) { - return A.Primitives_objectHashCode(this); - }, - toString$0(_) { - return "Instance of '" + A.Primitives_objectTypeName(this) + "'"; - }, - noSuchMethod$1(_, invocation) { - throw A.wrapException(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, invocation)); - }, - get$runtimeType(_) { - return A.getRuntimeTypeOfDartObject(this); - }, - toString() { - return this.toString$0(this); - } - }; - A._StringStackTrace.prototype = { - toString$0(_) { - return this._stackTrace; - }, - $isStackTrace: 1 - }; - A.Runes.prototype = { - get$iterator(_) { - return new A.RuneIterator(this.string); - }, - get$last(_) { - var code, previousCode, - t1 = this.string, - t2 = t1.length; - if (t2 === 0) - throw A.wrapException(A.StateError$("No elements.")); - code = t1.charCodeAt(t2 - 1); - if ((code & 64512) === 56320 && t2 > 1) { - previousCode = t1.charCodeAt(t2 - 2); - if ((previousCode & 64512) === 55296) - return A._combineSurrogatePair(previousCode, code); - } - return code; - } - }; - A.RuneIterator.prototype = { - get$current(_) { - return this._currentCodePoint; - }, - moveNext$0() { - var codeUnit, nextPosition, nextCodeUnit, _this = this, - t1 = _this._position = _this._nextPosition, - t2 = _this.string, - t3 = t2.length; - if (t1 === t3) { - _this._currentCodePoint = -1; - return false; - } - codeUnit = t2.charCodeAt(t1); - nextPosition = t1 + 1; - if ((codeUnit & 64512) === 55296 && nextPosition < t3) { - nextCodeUnit = t2.charCodeAt(nextPosition); - if ((nextCodeUnit & 64512) === 56320) { - _this._nextPosition = nextPosition + 1; - _this._currentCodePoint = A._combineSurrogatePair(codeUnit, nextCodeUnit); - return true; - } - } - _this._nextPosition = nextPosition; - _this._currentCodePoint = codeUnit; - return true; - } - }; - A.StringBuffer.prototype = { - get$length(_) { - return this._contents.length; - }, - write$1(_, obj) { - var t1 = A.S(obj); - this._contents += t1; - }, - writeCharCode$1(charCode) { - var t1 = A.Primitives_stringFromCharCode(charCode); - this._contents += t1; - }, - toString$0(_) { - var t1 = this._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - }; - A.Uri__parseIPv4Address_error.prototype = { - call$2(msg, position) { - throw A.wrapException(A.FormatException$("Illegal IPv4 address, " + msg, this.host, position)); - }, - $signature: 278 - }; - A.Uri_parseIPv6Address_error.prototype = { - call$2(msg, position) { - throw A.wrapException(A.FormatException$("Illegal IPv6 address, " + msg, this.host, position)); - }, - $signature: 304 - }; - A.Uri_parseIPv6Address_parseHex.prototype = { - call$2(start, end) { - var value; - if (end - start > 4) - this.error.call$2("an IPv6 part can only contain a maximum of 4 hex digits", start); - value = A.int_parse(B.JSString_methods.substring$2(this.host, start, end), 16); - if (value < 0 || value > 65535) - this.error.call$2("each part must be in the range of `0x0..0xFFFF`", start); - return value; - }, - $signature: 327 - }; - A._Uri.prototype = { - get$_text() { - var t1, t2, t3, t4, _this = this, - value = _this.___Uri__text_FI; - if (value === $) { - t1 = _this.scheme; - t2 = t1.length !== 0 ? "" + t1 + ":" : ""; - t3 = _this._host; - t4 = t3 == null; - if (!t4 || t1 === "file") { - t1 = t2 + "//"; - t2 = _this._userInfo; - if (t2.length !== 0) - t1 = t1 + t2 + "@"; - if (!t4) - t1 += t3; - t2 = _this._port; - if (t2 != null) - t1 = t1 + ":" + A.S(t2); - } else - t1 = t2; - t1 += _this.path; - t2 = _this._query; - if (t2 != null) - t1 = t1 + "?" + t2; - t2 = _this._fragment; - if (t2 != null) - t1 = t1 + "#" + t2; - value !== $ && A.throwUnnamedLateFieldADI(); - value = _this.___Uri__text_FI = t1.charCodeAt(0) == 0 ? t1 : t1; - } - return value; - }, - get$pathSegments() { - var pathToSplit, result, _this = this, - value = _this.___Uri_pathSegments_FI; - if (value === $) { - pathToSplit = _this.path; - if (pathToSplit.length !== 0 && pathToSplit.charCodeAt(0) === 47) - pathToSplit = B.JSString_methods.substring$1(pathToSplit, 1); - result = pathToSplit.length === 0 ? B.List_empty : A.List_List$unmodifiable(new A.MappedListIterable(A._setArrayType(pathToSplit.split("/"), type$.JSArray_String), A.core_Uri_decodeComponent$closure(), type$.MappedListIterable_String_dynamic), type$.String); - _this.___Uri_pathSegments_FI !== $ && A.throwUnnamedLateFieldADI(); - value = _this.___Uri_pathSegments_FI = result; - } - return value; - }, - get$hashCode(_) { - var result, _this = this, - value = _this.___Uri_hashCode_FI; - if (value === $) { - result = B.JSString_methods.get$hashCode(_this.get$_text()); - _this.___Uri_hashCode_FI !== $ && A.throwUnnamedLateFieldADI(); - _this.___Uri_hashCode_FI = result; - value = result; - } - return value; - }, - get$userInfo() { - return this._userInfo; - }, - get$host() { - var host = this._host; - if (host == null) - return ""; - if (B.JSString_methods.startsWith$1(host, "[")) - return B.JSString_methods.substring$2(host, 1, host.length - 1); - return host; - }, - get$port(_) { - var t1 = this._port; - return t1 == null ? A._Uri__defaultPort(this.scheme) : t1; - }, - get$query() { - var t1 = this._query; - return t1 == null ? "" : t1; - }, - get$fragment() { - var t1 = this._fragment; - return t1 == null ? "" : t1; - }, - isScheme$1(scheme) { - var thisScheme = this.scheme; - if (scheme.length !== thisScheme.length) - return false; - return A._caseInsensitiveCompareStart(scheme, thisScheme, 0) >= 0; - }, - replace$1$scheme(scheme) { - var isFile, userInfo, port, host, currentPath, t1, path, _this = this; - scheme = A._Uri__makeScheme(scheme, 0, scheme.length); - isFile = scheme === "file"; - userInfo = _this._userInfo; - port = _this._port; - if (scheme !== _this.scheme) - port = A._Uri__makePort(port, scheme); - host = _this._host; - if (!(host != null)) - host = userInfo.length !== 0 || port != null || isFile ? "" : null; - currentPath = _this.path; - if (!isFile) - t1 = host != null && currentPath.length !== 0; - else - t1 = true; - if (t1 && !B.JSString_methods.startsWith$1(currentPath, "/")) - currentPath = "/" + currentPath; - path = currentPath; - return A._Uri$_internal(scheme, userInfo, host, port, path, _this._query, _this._fragment); - }, - _mergePaths$2(base, reference) { - var backCount, refStart, baseEnd, newEnd, delta, t1, t2; - for (backCount = 0, refStart = 0; B.JSString_methods.startsWith$2(reference, "../", refStart);) { - refStart += 3; - ++backCount; - } - baseEnd = B.JSString_methods.lastIndexOf$1(base, "/"); - while (true) { - if (!(baseEnd > 0 && backCount > 0)) - break; - newEnd = B.JSString_methods.lastIndexOf$2(base, "/", baseEnd - 1); - if (newEnd < 0) - break; - delta = baseEnd - newEnd; - t1 = delta !== 2; - t2 = false; - if (!t1 || delta === 3) - if (base.charCodeAt(newEnd + 1) === 46) - t1 = !t1 || base.charCodeAt(newEnd + 2) === 46; - else - t1 = t2; - else - t1 = t2; - if (t1) - break; - --backCount; - baseEnd = newEnd; - } - return B.JSString_methods.replaceRange$3(base, baseEnd + 1, null, B.JSString_methods.substring$1(reference, refStart - 3 * backCount)); - }, - resolve$1(_, reference) { - return this.resolveUri$1(A.Uri_parse(reference)); - }, - resolveUri$1(reference) { - var targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, split, packageNameEnd, packageName, mergedPath, t1, fragment, _this = this, _null = null; - if (reference.get$scheme().length !== 0) { - if (type$._PlatformUri._is(reference)) - return reference; - targetScheme = reference.get$scheme(); - if (reference.get$hasAuthority()) { - targetUserInfo = reference.get$userInfo(); - targetHost = reference.get$host(); - targetPort = reference.get$hasPort() ? reference.get$port(reference) : _null; - } else { - targetPort = _null; - targetHost = targetPort; - targetUserInfo = ""; - } - targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); - targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; - split = 0; - } else { - targetScheme = _this.scheme; - if (reference.get$hasAuthority()) { - if (type$._PlatformUri._is(reference)) - return reference.replace$1$scheme(targetScheme); - targetUserInfo = reference.get$userInfo(); - targetHost = reference.get$host(); - targetPort = A._Uri__makePort(reference.get$hasPort() ? reference.get$port(reference) : _null, targetScheme); - targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); - targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; - split = 1; - } else { - targetUserInfo = _this._userInfo; - targetHost = _this._host; - targetPort = _this._port; - targetPath = _this.path; - if (reference.get$hasEmptyPath()) - if (reference.get$hasQuery()) { - targetQuery = reference.get$query(); - split = 3; - } else { - targetQuery = _this._query; - split = 4; - } - else { - packageNameEnd = A._Uri__packageNameEnd(_this, targetPath); - if (packageNameEnd > 0) { - packageName = B.JSString_methods.substring$2(targetPath, 0, packageNameEnd); - targetPath = reference.get$hasAbsolutePath() ? packageName + A._Uri__removeDotSegments(reference.get$path(reference)) : packageName + A._Uri__removeDotSegments(_this._mergePaths$2(B.JSString_methods.substring$1(targetPath, packageName.length), reference.get$path(reference))); - } else if (reference.get$hasAbsolutePath()) - targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); - else if (targetPath.length === 0) - if (targetHost == null) - targetPath = targetScheme.length === 0 ? reference.get$path(reference) : A._Uri__removeDotSegments(reference.get$path(reference)); - else - targetPath = A._Uri__removeDotSegments("/" + reference.get$path(reference)); - else { - mergedPath = _this._mergePaths$2(targetPath, reference.get$path(reference)); - t1 = targetScheme.length === 0; - if (!t1 || targetHost != null || B.JSString_methods.startsWith$1(targetPath, "/")) - targetPath = A._Uri__removeDotSegments(mergedPath); - else - targetPath = A._Uri__normalizeRelativePath(mergedPath, !t1 || targetHost != null); - } - targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; - split = 2; - } - } - } - fragment = reference.get$hasFragment() ? reference.get$fragment() : _null; - if (!type$._PlatformUri._is(reference)) { - if (split === 0) - targetScheme = A._Uri__makeScheme(targetScheme, 0, targetScheme.length); - if (split <= 1) { - targetUserInfo = A._Uri__makeUserInfo(targetUserInfo, 0, targetUserInfo.length); - if (targetPort != null) - targetPort = A._Uri__makePort(targetPort, targetScheme); - if (targetHost != null && targetHost.length !== 0) - targetHost = A._Uri__makeHost(targetHost, 0, targetHost.length, false); - } - t1 = split <= 3; - if (t1) - targetPath = A._Uri__makePath(targetPath, 0, targetPath.length, _null, targetScheme, targetHost != null); - if (t1 && targetQuery != null) - targetQuery = A._Uri__makeQuery(targetQuery, 0, targetQuery.length, _null); - if (fragment != null) - fragment = A._Uri__makeFragment(fragment, 0, fragment.length); - } - return A._Uri$_internal(targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, fragment); - }, - get$hasAuthority() { - return this._host != null; - }, - get$hasPort() { - return this._port != null; - }, - get$hasQuery() { - return this._query != null; - }, - get$hasFragment() { - return this._fragment != null; - }, - get$hasEmptyPath() { - return this.path.length === 0; - }, - get$hasAbsolutePath() { - return B.JSString_methods.startsWith$1(this.path, "/"); - }, - toFilePath$0() { - var pathSegments, _this = this, - t1 = _this.scheme; - if (t1 !== "" && t1 !== "file") - throw A.wrapException(A.UnsupportedError$("Cannot extract a file path from a " + t1 + " URI")); - t1 = _this._query; - if ((t1 == null ? "" : t1) !== "") - throw A.wrapException(A.UnsupportedError$(string$.Cannotfq)); - t1 = _this._fragment; - if ((t1 == null ? "" : t1) !== "") - throw A.wrapException(A.UnsupportedError$(string$.Cannotff)); - t1 = $.$get$_Uri__isWindowsCached(); - if (t1) - t1 = A._Uri__toWindowsFilePath(_this); - else { - if (_this._host != null && _this.get$host() !== "") - A.throwExpression(A.UnsupportedError$(string$.Cannotn)); - pathSegments = _this.get$pathSegments(); - A._Uri__checkNonWindowsPathReservedCharacters(pathSegments, false); - t1 = A.StringBuffer__writeAll(B.JSString_methods.startsWith$1(_this.path, "/") ? "" + "/" : "", pathSegments, "/"); - t1 = t1.charCodeAt(0) == 0 ? t1 : t1; - } - return t1; - }, - toString$0(_) { - return this.get$_text(); - }, - $eq(_, other) { - var t1, t2, t3, _this = this; - if (other == null) - return false; - if (_this === other) - return true; - t1 = false; - if (type$.Uri._is(other)) - if (_this.scheme === other.get$scheme()) - if (_this._host != null === other.get$hasAuthority()) - if (_this._userInfo === other.get$userInfo()) - if (_this.get$host() === other.get$host()) - if (_this.get$port(0) === other.get$port(other)) - if (_this.path === other.get$path(other)) { - t2 = _this._query; - t3 = t2 == null; - if (!t3 === other.get$hasQuery()) { - if (t3) - t2 = ""; - if (t2 === other.get$query()) { - t2 = _this._fragment; - t3 = t2 == null; - if (!t3 === other.get$hasFragment()) { - t1 = t3 ? "" : t2; - t1 = t1 === other.get$fragment(); - } - } - } - } - return t1; - }, - $isUri: 1, - $is_PlatformUri: 1, - get$scheme() { - return this.scheme; - }, - get$path(receiver) { - return this.path; - } - }; - A._Uri__makePath_closure.prototype = { - call$1(s) { - return A._Uri__uriEncode(B.List_M2I0, s, B.C_Utf8Codec, false); - }, - $signature: 6 - }; - A.UriData.prototype = { - get$uri() { - var t2, queryIndex, end, query, _this = this, _null = null, - t1 = _this._uriCache; - if (t1 == null) { - t1 = _this._text; - t2 = _this._separatorIndices[0] + 1; - queryIndex = B.JSString_methods.indexOf$2(t1, "?", t2); - end = t1.length; - if (queryIndex >= 0) { - query = A._Uri__normalizeOrSubstring(t1, queryIndex + 1, end, B.List_42A, false, false); - end = queryIndex; - } else - query = _null; - t1 = _this._uriCache = new A._DataUri("data", "", _null, _null, A._Uri__normalizeOrSubstring(t1, t2, end, B.List_M2I, false, false), query, _null); - } - return t1; - }, - toString$0(_) { - var t1 = this._text; - return this._separatorIndices[0] === -1 ? "data:" + t1 : t1; - } - }; - A._createTables_build.prototype = { - call$2(state, defaultTransition) { - var t1 = this.tables[state]; - B.NativeUint8List_methods.fillRange$3(t1, 0, 96, defaultTransition); - return t1; - }, - $signature: 394 - }; - A._createTables_setChars.prototype = { - call$3(target, chars, transition) { - var t1, i; - for (t1 = chars.length, i = 0; i < t1; ++i) - target[chars.charCodeAt(i) ^ 96] = transition; - }, - $signature: 223 - }; - A._createTables_setRange.prototype = { - call$3(target, range, transition) { - var i, n; - for (i = range.charCodeAt(0), n = range.charCodeAt(1); i <= n; ++i) - target[(i ^ 96) >>> 0] = transition; - }, - $signature: 223 - }; - A._SimpleUri.prototype = { - get$hasAuthority() { - return this._hostStart > 0; - }, - get$hasPort() { - return this._hostStart > 0 && this._portStart + 1 < this._pathStart; - }, - get$hasQuery() { - return this._queryStart < this._fragmentStart; - }, - get$hasFragment() { - return this._fragmentStart < this._uri.length; - }, - get$hasAbsolutePath() { - return B.JSString_methods.startsWith$2(this._uri, "/", this._pathStart); - }, - get$hasEmptyPath() { - return this._pathStart === this._queryStart; - }, - get$scheme() { - var t1 = this._schemeCache; - return t1 == null ? this._schemeCache = this._computeScheme$0() : t1; - }, - _computeScheme$0() { - var t2, _this = this, - t1 = _this._schemeEnd; - if (t1 <= 0) - return ""; - t2 = t1 === 4; - if (t2 && B.JSString_methods.startsWith$1(_this._uri, "http")) - return "http"; - if (t1 === 5 && B.JSString_methods.startsWith$1(_this._uri, "https")) - return "https"; - if (t2 && B.JSString_methods.startsWith$1(_this._uri, "file")) - return "file"; - if (t1 === 7 && B.JSString_methods.startsWith$1(_this._uri, "package")) - return "package"; - return B.JSString_methods.substring$2(_this._uri, 0, t1); - }, - get$userInfo() { - var t1 = this._hostStart, - t2 = this._schemeEnd + 3; - return t1 > t2 ? B.JSString_methods.substring$2(this._uri, t2, t1 - 1) : ""; - }, - get$host() { - var t1 = this._hostStart; - return t1 > 0 ? B.JSString_methods.substring$2(this._uri, t1, this._portStart) : ""; - }, - get$port(_) { - var t1, _this = this; - if (_this.get$hasPort()) - return A.int_parse(B.JSString_methods.substring$2(_this._uri, _this._portStart + 1, _this._pathStart), null); - t1 = _this._schemeEnd; - if (t1 === 4 && B.JSString_methods.startsWith$1(_this._uri, "http")) - return 80; - if (t1 === 5 && B.JSString_methods.startsWith$1(_this._uri, "https")) - return 443; - return 0; - }, - get$path(_) { - return B.JSString_methods.substring$2(this._uri, this._pathStart, this._queryStart); - }, - get$query() { - var t1 = this._queryStart, - t2 = this._fragmentStart; - return t1 < t2 ? B.JSString_methods.substring$2(this._uri, t1 + 1, t2) : ""; - }, - get$fragment() { - var t1 = this._fragmentStart, - t2 = this._uri; - return t1 < t2.length ? B.JSString_methods.substring$1(t2, t1 + 1) : ""; - }, - get$pathSegments() { - var parts, i, - start = this._pathStart, - end = this._queryStart, - t1 = this._uri; - if (B.JSString_methods.startsWith$2(t1, "/", start)) - ++start; - if (start === end) - return B.List_empty; - parts = A._setArrayType([], type$.JSArray_String); - for (i = start; i < end; ++i) - if (t1.charCodeAt(i) === 47) { - parts.push(B.JSString_methods.substring$2(t1, start, i)); - start = i + 1; - } - parts.push(B.JSString_methods.substring$2(t1, start, end)); - return A.List_List$unmodifiable(parts, type$.String); - }, - _isPort$1(port) { - var portDigitStart = this._portStart + 1; - return portDigitStart + port.length === this._pathStart && B.JSString_methods.startsWith$2(this._uri, port, portDigitStart); - }, - removeFragment$0() { - var _this = this, - t1 = _this._fragmentStart, - t2 = _this._uri; - if (t1 >= t2.length) - return _this; - return new A._SimpleUri(B.JSString_methods.substring$2(t2, 0, t1), _this._schemeEnd, _this._hostStart, _this._portStart, _this._pathStart, _this._queryStart, t1, _this._schemeCache); - }, - replace$1$scheme(scheme) { - var schemeChanged, isFile, t1, userInfo, port, host, t2, path, t3, query, fragment, _this = this, _null = null; - scheme = A._Uri__makeScheme(scheme, 0, scheme.length); - schemeChanged = !(_this._schemeEnd === scheme.length && B.JSString_methods.startsWith$1(_this._uri, scheme)); - isFile = scheme === "file"; - t1 = _this._hostStart; - userInfo = t1 > 0 ? B.JSString_methods.substring$2(_this._uri, _this._schemeEnd + 3, t1) : ""; - port = _this.get$hasPort() ? _this.get$port(0) : _null; - if (schemeChanged) - port = A._Uri__makePort(port, scheme); - t1 = _this._hostStart; - if (t1 > 0) - host = B.JSString_methods.substring$2(_this._uri, t1, _this._portStart); - else - host = userInfo.length !== 0 || port != null || isFile ? "" : _null; - t1 = _this._uri; - t2 = _this._queryStart; - path = B.JSString_methods.substring$2(t1, _this._pathStart, t2); - if (!isFile) - t3 = host != null && path.length !== 0; - else - t3 = true; - if (t3 && !B.JSString_methods.startsWith$1(path, "/")) - path = "/" + path; - t3 = _this._fragmentStart; - query = t2 < t3 ? B.JSString_methods.substring$2(t1, t2 + 1, t3) : _null; - t2 = _this._fragmentStart; - fragment = t2 < t1.length ? B.JSString_methods.substring$1(t1, t2 + 1) : _null; - return A._Uri$_internal(scheme, userInfo, host, port, path, query, fragment); - }, - resolve$1(_, reference) { - return this.resolveUri$1(A.Uri_parse(reference)); - }, - resolveUri$1(reference) { - if (reference instanceof A._SimpleUri) - return this._simpleMerge$2(this, reference); - return this._toNonSimple$0().resolveUri$1(reference); - }, - _simpleMerge$2(base, ref) { - var t2, t3, t4, isSimple, delta, refStart, basePathStart, packageNameEnd, basePathStart0, baseStart, baseEnd, baseUri, baseStart0, backCount, refStart0, insert, - t1 = ref._schemeEnd; - if (t1 > 0) - return ref; - t2 = ref._hostStart; - if (t2 > 0) { - t3 = base._schemeEnd; - if (t3 <= 0) - return ref; - t4 = t3 === 4; - if (t4 && B.JSString_methods.startsWith$1(base._uri, "file")) - isSimple = ref._pathStart !== ref._queryStart; - else if (t4 && B.JSString_methods.startsWith$1(base._uri, "http")) - isSimple = !ref._isPort$1("80"); - else - isSimple = !(t3 === 5 && B.JSString_methods.startsWith$1(base._uri, "https")) || !ref._isPort$1("443"); - if (isSimple) { - delta = t3 + 1; - return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, delta) + B.JSString_methods.substring$1(ref._uri, t1 + 1), t3, t2 + delta, ref._portStart + delta, ref._pathStart + delta, ref._queryStart + delta, ref._fragmentStart + delta, base._schemeCache); - } else - return this._toNonSimple$0().resolveUri$1(ref); - } - refStart = ref._pathStart; - t1 = ref._queryStart; - if (refStart === t1) { - t2 = ref._fragmentStart; - if (t1 < t2) { - t3 = base._queryStart; - delta = t3 - t1; - return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, t3) + B.JSString_methods.substring$1(ref._uri, t1), base._schemeEnd, base._hostStart, base._portStart, base._pathStart, t1 + delta, t2 + delta, base._schemeCache); - } - t1 = ref._uri; - if (t2 < t1.length) { - t3 = base._fragmentStart; - return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, t3) + B.JSString_methods.substring$1(t1, t2), base._schemeEnd, base._hostStart, base._portStart, base._pathStart, base._queryStart, t2 + (t3 - t2), base._schemeCache); - } - return base.removeFragment$0(); - } - t2 = ref._uri; - if (B.JSString_methods.startsWith$2(t2, "/", refStart)) { - basePathStart = base._pathStart; - packageNameEnd = A._SimpleUri__packageNameEnd(this); - basePathStart0 = packageNameEnd > 0 ? packageNameEnd : basePathStart; - delta = basePathStart0 - refStart; - return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, basePathStart0) + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, basePathStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); - } - baseStart = base._pathStart; - baseEnd = base._queryStart; - if (baseStart === baseEnd && base._hostStart > 0) { - for (; B.JSString_methods.startsWith$2(t2, "../", refStart);) - refStart += 3; - delta = baseStart - refStart + 1; - return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, baseStart) + "/" + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); - } - baseUri = base._uri; - packageNameEnd = A._SimpleUri__packageNameEnd(this); - if (packageNameEnd >= 0) - baseStart0 = packageNameEnd; - else - for (baseStart0 = baseStart; B.JSString_methods.startsWith$2(baseUri, "../", baseStart0);) - baseStart0 += 3; - backCount = 0; - while (true) { - refStart0 = refStart + 3; - if (!(refStart0 <= t1 && B.JSString_methods.startsWith$2(t2, "../", refStart))) - break; - ++backCount; - refStart = refStart0; - } - for (insert = ""; baseEnd > baseStart0;) { - --baseEnd; - if (baseUri.charCodeAt(baseEnd) === 47) { - if (backCount === 0) { - insert = "/"; - break; - } - --backCount; - insert = "/"; - } - } - if (baseEnd === baseStart0 && base._schemeEnd <= 0 && !B.JSString_methods.startsWith$2(baseUri, "/", baseStart)) { - refStart -= backCount * 3; - insert = ""; - } - delta = baseEnd - refStart + insert.length; - return new A._SimpleUri(B.JSString_methods.substring$2(baseUri, 0, baseEnd) + insert + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); - }, - toFilePath$0() { - var t2, t3, _this = this, - t1 = _this._schemeEnd; - if (t1 >= 0) { - t2 = !(t1 === 4 && B.JSString_methods.startsWith$1(_this._uri, "file")); - t1 = t2; - } else - t1 = false; - if (t1) - throw A.wrapException(A.UnsupportedError$("Cannot extract a file path from a " + _this.get$scheme() + " URI")); - t1 = _this._queryStart; - t2 = _this._uri; - if (t1 < t2.length) { - if (t1 < _this._fragmentStart) - throw A.wrapException(A.UnsupportedError$(string$.Cannotfq)); - throw A.wrapException(A.UnsupportedError$(string$.Cannotff)); - } - t3 = $.$get$_Uri__isWindowsCached(); - if (t3) - t1 = A._Uri__toWindowsFilePath(_this); - else { - if (_this._hostStart < _this._portStart) - A.throwExpression(A.UnsupportedError$(string$.Cannotn)); - t1 = B.JSString_methods.substring$2(t2, _this._pathStart, t1); - } - return t1; - }, - get$hashCode(_) { - var t1 = this._hashCodeCache; - return t1 == null ? this._hashCodeCache = B.JSString_methods.get$hashCode(this._uri) : t1; - }, - $eq(_, other) { - if (other == null) - return false; - if (this === other) - return true; - return type$.Uri._is(other) && this._uri === other.toString$0(0); - }, - _toNonSimple$0() { - var _this = this, _null = null, - t1 = _this.get$scheme(), - t2 = _this.get$userInfo(), - t3 = _this._hostStart > 0 ? _this.get$host() : _null, - t4 = _this.get$hasPort() ? _this.get$port(0) : _null, - t5 = _this._uri, - t6 = _this._queryStart, - t7 = B.JSString_methods.substring$2(t5, _this._pathStart, t6), - t8 = _this._fragmentStart; - t6 = t6 < t8 ? _this.get$query() : _null; - return A._Uri$_internal(t1, t2, t3, t4, t7, t6, t8 < t5.length ? _this.get$fragment() : _null); - }, - toString$0(_) { - return this._uri; - }, - $isUri: 1, - $is_PlatformUri: 1 - }; - A._DataUri.prototype = {}; - A.Expando.prototype = { - $indexSet(_, object, value) { - if (object instanceof A._Record) - A.Expando__badExpandoKey(object); - this._jsWeakMap.set(object, value); - }, - toString$0(_) { - return "Expando:null"; - } - }; - A.jsify__convert.prototype = { - call$1(o) { - var t1, convertedMap, key, convertedList; - if (A._noJsifyRequired(o)) - return o; - t1 = this._convertedObjects; - if (t1.containsKey$1(o)) - return t1.$index(0, o); - if (type$.Map_of_nullable_Object_and_nullable_Object._is(o)) { - convertedMap = {}; - t1.$indexSet(0, o, convertedMap); - for (t1 = J.get$iterator$ax(o.get$keys(o)); t1.moveNext$0();) { - key = t1.get$current(t1); - convertedMap[key] = this.call$1(o.$index(0, key)); - } - return convertedMap; - } else if (type$.Iterable_nullable_Object._is(o)) { - convertedList = []; - t1.$indexSet(0, o, convertedList); - B.JSArray_methods.addAll$1(convertedList, J.map$1$1$ax(o, this, type$.dynamic)); - return convertedList; - } else - return o; - }, - $signature: 396 - }; - A.promiseToFuture_closure.prototype = { - call$1(r) { - return this.completer.complete$1(r); - }, - $signature: 68 - }; - A.promiseToFuture_closure0.prototype = { - call$1(e) { - if (e == null) - return this.completer.completeError$1(new A.NullRejectionException(e === undefined)); - return this.completer.completeError$1(e); - }, - $signature: 68 - }; - A.NullRejectionException.prototype = { - toString$0(_) { - return "Promise was rejected with a value of `" + (this.isUndefined ? "undefined" : "null") + "`."; - }, - $isException: 1 - }; - A._JSRandom.prototype = { - nextInt$1(max) { - if (max <= 0 || max > 4294967296) - throw A.wrapException(A.RangeError$("max must be in range 0 < max \u2264 2^32, was " + max)); - return Math.random() * max >>> 0; - }, - nextDouble$0() { - return Math.random(); - } - }; - A.ArgParser.prototype = { - addFlag$6$abbr$defaultsTo$help$hide$negatable($name, abbr, defaultsTo, help, hide, negatable) { - var _null = null; - this._addOption$12$aliases$hide$negatable($name, abbr, help, _null, _null, _null, defaultsTo, _null, B.OptionType_I6i, B.List_empty, hide, negatable); - }, - addFlag$2$hide($name, hide) { - return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, false, null, hide, true); - }, - addFlag$2$help($name, help) { - return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, false, help, false, true); - }, - addFlag$3$defaultsTo$help($name, defaultsTo, help) { - return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, defaultsTo, help, false, true); - }, - addFlag$3$help$negatable($name, help, negatable) { - return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, false, help, false, negatable); - }, - addFlag$3$abbr$help($name, abbr, help) { - return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, abbr, false, help, false, true); - }, - addFlag$4$abbr$help$negatable($name, abbr, help, negatable) { - return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, abbr, false, help, false, negatable); - }, - addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, abbr, allowed, defaultsTo, help, hide, valueHelp) { - this._addOption$12$aliases$hide$mandatory($name, abbr, help, valueHelp, allowed, null, defaultsTo, null, B.OptionType_tew, B.List_empty, hide, false); - }, - addOption$2$hide($name, hide) { - var _null = null; - return this.addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, _null, _null, _null, _null, hide, _null); - }, - addOption$6$abbr$allowed$defaultsTo$help$valueHelp($name, abbr, allowed, defaultsTo, help, valueHelp) { - return this.addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, abbr, allowed, defaultsTo, help, false, valueHelp); - }, - addOption$4$allowed$defaultsTo$help($name, allowed, defaultsTo, help) { - return this.addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, null, allowed, defaultsTo, help, false, null); - }, - addMultiOption$7$abbr$allowed$allowedHelp$help$splitCommas$valueHelp($name, abbr, allowed, allowedHelp, help, splitCommas, valueHelp) { - var t1 = A._setArrayType([], type$.JSArray_String); - this._addOption$12$aliases$hide$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, t1, null, B.OptionType_yPm, B.List_empty, false, splitCommas); - }, - addMultiOption$5$abbr$help$splitCommas$valueHelp($name, abbr, help, splitCommas, valueHelp) { - return this.addMultiOption$7$abbr$allowed$allowedHelp$help$splitCommas$valueHelp($name, abbr, null, null, help, splitCommas, valueHelp); - }, - addMultiOption$6$abbr$allowed$allowedHelp$help$valueHelp($name, abbr, allowed, allowedHelp, help, valueHelp) { - return this.addMultiOption$7$abbr$allowed$allowedHelp$help$splitCommas$valueHelp($name, abbr, allowed, allowedHelp, help, true, valueHelp); - }, - addMultiOption$2$help($name, help) { - var _null = null; - return this.addMultiOption$7$abbr$allowed$allowedHelp$help$splitCommas$valueHelp($name, _null, _null, _null, help, true, _null); - }, - _addOption$14$aliases$hide$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, mandatory, negatable, splitCommas) { - var existing, t2, t3, option, _i, _this = this, _null = null, - t1 = A._setArrayType([$name], type$.JSArray_String); - B.JSArray_methods.addAll$1(t1, aliases); - if (B.JSArray_methods.any$1(t1, new A.ArgParser__addOption_closure(_this))) - throw A.wrapException(A.ArgumentError$('Duplicate option or alias "' + $name + '".', _null)); - t1 = abbr != null; - if (t1) { - existing = _this.findByAbbreviation$1(abbr); - if (existing != null) - throw A.wrapException(A.ArgumentError$('Abbreviation "' + abbr + '" is already used by "' + existing.name + '".', _null)); - } - t2 = allowed == null ? _null : A.List_List$unmodifiable(allowed, type$.String); - if (allowedHelp == null) - t3 = _null; - else { - t3 = type$.String; - t3 = A.ConstantMap_ConstantMap$from(allowedHelp, t3, t3); - } - option = new A.Option($name, abbr, help, valueHelp, t2, t3, defaultsTo, negatable, callback, type, splitCommas == null ? type === B.OptionType_yPm : splitCommas, false, hide); - if ($name.length === 0) - A.throwExpression(A.ArgumentError$("Name cannot be empty.", _null)); - else if (B.JSString_methods.startsWith$1($name, "-")) - A.throwExpression(A.ArgumentError$("Name " + $name + ' cannot start with "-".', _null)); - t2 = $.$get$Option__invalidChars()._nativeRegExp; - if (t2.test($name)) - A.throwExpression(A.ArgumentError$('Name "' + $name + '" contains invalid characters.', _null)); - if (t1) { - if (abbr.length !== 1) - A.throwExpression(A.ArgumentError$("Abbreviation must be null or have length 1.", _null)); - else if (abbr === "-") - A.throwExpression(A.ArgumentError$('Abbreviation cannot be "-".', _null)); - if (t2.test(abbr)) - A.throwExpression(A.ArgumentError$("Abbreviation is an invalid character.", _null)); - } - _this._arg_parser$_options.$indexSet(0, $name, option); - _this._optionsAndSeparators.push(option); - for (t1 = _this._aliases, _i = 0; false; ++_i) - t1.$indexSet(0, aliases[_i], $name); - }, - _addOption$12$aliases$hide$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, splitCommas) { - return this._addOption$14$aliases$hide$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, false, false, splitCommas); - }, - _addOption$12$aliases$hide$mandatory($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, mandatory) { - return this._addOption$14$aliases$hide$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, mandatory, false, null); - }, - _addOption$12$aliases$hide$negatable($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, negatable) { - return this._addOption$14$aliases$hide$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, false, negatable, null); - }, - findByAbbreviation$1(abbr) { - var t1, t2; - for (t1 = this.options._map, t1 = t1.get$values(t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t2 = t1.get$current(t1); - if (t2.abbr === abbr) - return t2; - } - return null; - }, - findByNameOrAlias$1($name) { - var t1 = this._aliases.$index(0, $name); - if (t1 == null) - t1 = $name; - return this.options._map.$index(0, t1); - } - }; - A.ArgParser__addOption_closure.prototype = { - call$1($name) { - return this.$this.findByNameOrAlias$1($name) != null; - }, - $signature: 5 - }; - A.ArgParserException.prototype = {}; - A.ArgResults.prototype = { - $index(_, $name) { - var t1 = this._parser.options._map; - if (!t1.containsKey$1($name)) - throw A.wrapException(A.ArgumentError$('Could not find an option named "--' + $name + '".', null)); - t1 = t1.$index(0, $name); - t1.toString; - return t1.valueOrDefault$1(this._parsed.$index(0, $name)); - }, - wasParsed$1($name) { - if (!this._parser.options._map.containsKey$1($name)) - throw A.wrapException(A.ArgumentError$('Could not find an option named "--' + $name + '".', null)); - return this._parsed.containsKey$1($name); - } - }; - A.Option.prototype = { - valueOrDefault$1(value) { - var t1; - if (value != null) - return value; - if (this.type === B.OptionType_yPm) { - t1 = this.defaultsTo; - return t1 == null ? A._setArrayType([], type$.JSArray_String) : t1; - } - return this.defaultsTo; - } - }; - A.OptionType.prototype = {}; - A.Parser0.prototype = { - parse$0(_) { - var commandResults, commandName, commandParser, error, t1, t3, t4, t5, t6, t7, t8, command, exception, _this = this, - t2 = _this._args; - t2.toList$0(0); - commandResults = null; - for (t3 = _this._parser$_rest, t4 = _this._grammar, t5 = t4.commands, t6 = t2.$ti._precomputed1; !t2.get$isEmpty(0);) { - t7 = t2._head; - if (t7 === t2._tail) - A.throwExpression(A.IterableElementError_noElement()); - t7 = t2._table[t7]; - t8 = t7 == null; - if ((t8 ? t6._as(t7) : t7) === "--") { - t2.removeFirst$0(); - break; - } - if (t8) - t7 = t6._as(t7); - command = t5._map.$index(0, t7); - if (command != null) { - t5 = t3.length; - t7 = t2._head; - if (t7 === t2._tail) - A.throwExpression(A.IterableElementError_noElement()); - t7 = t2._table[t7]; - t6 = t7 == null ? t6._as(t7) : t7; - if (t5 !== 0) - A.throwExpression(A.ArgParserException$("Cannot specify arguments before a command.", null, t6, null, null)); - commandName = t2.removeFirst$0(); - t5 = type$.JSArray_String; - t6 = A._setArrayType([], t5); - B.JSArray_methods.addAll$1(t6, t3); - commandParser = new A.Parser0(commandName, _this, command, t2, t6, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic)); - try { - commandResults = J.parse$0$z(commandParser); - } catch (exception) { - t2 = A.unwrapException(exception); - if (t2 instanceof A.ArgParserException) { - error = t2; - t2 = error.message; - t1 = A._setArrayType([commandName], t5); - J.addAll$1$ax(t1, error.commands); - throw A.wrapException(A.ArgParserException$(t2, t1, error.argumentName, error.source, error.offset)); - } else - throw exception; - } - B.JSArray_methods.clear$0(t3); - break; - } - if (_this._parseSoloOption$0()) - continue; - if (_this._parseAbbreviation$1(_this)) - continue; - if (_this._parseLongOption$0()) - continue; - t3.push(t2.removeFirst$0()); - } - t4.options._map.forEach$1(0, new A.Parser_parse_closure(_this)); - B.JSArray_methods.addAll$1(t3, t2); - t2.clear$0(0); - return new A.ArgResults(t4, _this._results, _this._commandName, new A.UnmodifiableListView(t3, type$.UnmodifiableListView_String)); - }, - _readNextArgAsValue$2(option, arg) { - var _this = this, - t1 = _this._args; - _this._validate$3(!t1.get$isEmpty(0), 'Missing argument for "' + arg + '".', arg); - _this._setOption$4(_this._results, option, t1.get$first(0), arg); - t1.removeFirst$0(); - }, - _parseSoloOption$0() { - var opt, - t1 = this._args; - if (t1.get$first(0).length !== 2) - return false; - if (!B.JSString_methods.startsWith$1(t1.get$first(0), "-")) - return false; - opt = t1.get$first(0)[1]; - if (!A._isLetterOrDigit(opt.charCodeAt(0))) - return false; - this._handleSoloOption$1(opt); - return true; - }, - _handleSoloOption$1(opt) { - var t1, _this = this, - option = _this._grammar.findByAbbreviation$1(opt); - if (option == null) { - t1 = _this._parser$_parent; - _this._validate$3(t1 != null, 'Could not find an option or flag "-' + opt + '".', "-" + opt); - t1._handleSoloOption$1(opt); - return true; - } - _this._args.removeFirst$0(); - if (option.type === B.OptionType_I6i) - _this._results.$indexSet(0, option.name, true); - else - _this._readNextArgAsValue$2(option, "-" + opt); - return true; - }, - _parseAbbreviation$1(innermostCommand) { - var t2, index, t3, t4, t5, lettersAndDigits, rest, - t1 = this._args; - if (t1.get$first(0).length < 2) - return false; - if (!B.JSString_methods.startsWith$1(t1.get$first(0), "-")) - return false; - t2 = t1.$ti._precomputed1; - index = 1; - while (true) { - t3 = t1._head; - if (t3 === t1._tail) - A.throwExpression(A.IterableElementError_noElement()); - t3 = t1._table[t3]; - t4 = t3 == null; - if (index < (t4 ? t2._as(t3) : t3).length) { - t5 = true; - t3 = (t4 ? t2._as(t3) : t3).charCodeAt(index); - if (!(t3 >= 65 && t3 <= 90)) - if (!(t3 >= 97 && t3 <= 122)) - t3 = t3 >= 48 && t3 <= 57; - else - t3 = t5; - else - t3 = t5; - } else - t3 = false; - if (!t3) - break; - ++index; - } - if (index === 1) - return false; - lettersAndDigits = B.JSString_methods.substring$2(t1.get$first(0), 1, index); - rest = B.JSString_methods.substring$1(t1.get$first(0), index); - if (B.JSString_methods.contains$1(rest, "\n") || B.JSString_methods.contains$1(rest, "\r")) - return false; - this._handleAbbreviation$3(lettersAndDigits, rest, innermostCommand); - return true; - }, - _handleAbbreviation$3(lettersAndDigits, rest, innermostCommand) { - var t1, i, i0, _this = this, - c = B.JSString_methods.substring$2(lettersAndDigits, 0, 1), - first = _this._grammar.findByAbbreviation$1(c); - if (first == null) { - t1 = _this._parser$_parent; - _this._validate$3(t1 != null, string$.Could_ + c + '".', "-" + c); - t1._handleAbbreviation$3(lettersAndDigits, rest, innermostCommand); - return true; - } else { - t1 = "-" + c; - if (first.type !== B.OptionType_I6i) - _this._setOption$4(_this._results, first, B.JSString_methods.substring$1(lettersAndDigits, 1) + rest, t1); - else { - _this._validate$3(rest === "", 'Option "-' + c + '" is a flag and cannot handle value "' + B.JSString_methods.substring$1(lettersAndDigits, 1) + rest + '".', t1); - for (t1 = lettersAndDigits.length, i = 0; i < t1; i = i0) { - i0 = i + 1; - innermostCommand._parseShortFlag$1(B.JSString_methods.substring$2(lettersAndDigits, i, i0)); - } - } - } - _this._args.removeFirst$0(); - return true; - }, - _parseShortFlag$1(c) { - var t1, _this = this, - option = _this._grammar.findByAbbreviation$1(c); - if (option == null) { - t1 = _this._parser$_parent; - _this._validate$3(t1 != null, string$.Could_ + c + '".', "-" + c); - t1._parseShortFlag$1(c); - return; - } - _this._validate$3(option.type === B.OptionType_I6i, 'Option "-' + c + '" must be a flag to be in a collapsed "-".', "-" + c); - _this._results.$indexSet(0, option.name, true); - }, - _parseLongOption$0() { - var index, t2, $name, t3, i, t4, t5, value, - t1 = this._args; - if (!B.JSString_methods.startsWith$1(t1.get$first(0), "--")) - return false; - index = B.JSString_methods.indexOf$1(t1.get$first(0), "="); - t2 = index === -1; - $name = t2 ? B.JSString_methods.substring$1(t1.get$first(0), 2) : B.JSString_methods.substring$2(t1.get$first(0), 2, index); - for (t3 = $name.length, i = 0; i !== t3; ++i) { - t4 = $name.charCodeAt(i); - t5 = true; - if (!(t4 >= 65 && t4 <= 90)) - if (!(t4 >= 97 && t4 <= 122)) - t5 = t4 >= 48 && t4 <= 57; - if (!(t5 || t4 === 45 || t4 === 95)) - return false; - } - value = t2 ? null : B.JSString_methods.substring$1(t1.get$first(0), index + 1); - if (value != null) - t1 = B.JSString_methods.contains$1(value, "\n") || B.JSString_methods.contains$1(value, "\r"); - else - t1 = false; - if (t1) - return false; - this._handleLongOption$2($name, value); - return true; - }, - _handleLongOption$2($name, value) { - var _this = this, - _s34_ = 'Could not find an option named "--', - t1 = _this._grammar, - option = t1.findByNameOrAlias$1($name); - if (option != null) { - _this._args.removeFirst$0(); - if (option.type === B.OptionType_I6i) { - _this._validate$3(value == null, 'Flag option "--' + $name + '" should not be given a value.', "--" + $name); - _this._results.$indexSet(0, option.name, true); - } else { - t1 = "--" + $name; - if (value != null) - _this._setOption$4(_this._results, option, value, t1); - else - _this._readNextArgAsValue$2(option, t1); - } - } else if (B.JSString_methods.startsWith$1($name, "no-")) { - option = t1.findByNameOrAlias$1(B.JSString_methods.substring$1($name, 3)); - if (option == null) { - t1 = _this._parser$_parent; - _this._validate$3(t1 != null, _s34_ + $name + '".', "--" + $name); - t1._handleLongOption$2($name, value); - return true; - } - _this._args.removeFirst$0(); - t1 = "--" + $name; - _this._validate$3(option.type === B.OptionType_I6i, 'Cannot negate non-flag option "--' + $name + '".', t1); - _this._validate$3(option.negatable, 'Cannot negate option "--' + $name + '".', t1); - _this._results.$indexSet(0, option.name, false); - } else { - t1 = _this._parser$_parent; - _this._validate$3(t1 != null, _s34_ + $name + '".', "--" + $name); - t1._handleLongOption$2($name, value); - return true; - } - return true; - }, - _validate$3(condition, message, args) { - if (!condition) - throw A.wrapException(A.ArgParserException$(message, null, args, null, null)); - }, - _setOption$4(results, option, value, arg) { - var list, t1, t2, t3, _i, element; - if (option.type !== B.OptionType_yPm) { - this._validateAllowed$3(option, value, arg); - results.$indexSet(0, option.name, value); - return; - } - list = type$.List_dynamic._as(results.putIfAbsent$2(option.name, new A.Parser__setOption_closure())); - if (option.splitCommas) - for (t1 = value.split(","), t2 = t1.length, t3 = J.getInterceptor$ax(list), _i = 0; _i < t2; ++_i) { - element = t1[_i]; - this._validateAllowed$3(option, element, arg); - t3.add$1(list, element); - } - else { - this._validateAllowed$3(option, value, arg); - J.add$1$ax(list, value); - } - }, - _validateAllowed$3(option, value, arg) { - var t1 = option.allowed; - if (t1 == null) - return; - this._validate$3(B.JSArray_methods.contains$1(t1, value), '"' + value + '" is not an allowed value for option "' + arg + '".', arg); - } - }; - A.Parser_parse_closure.prototype = { - call$2($name, option) { - var parsedOption = this.$this._results.$index(0, $name), - callback = option.callback; - if (callback == null) - return; - callback.call$1(option.valueOrDefault$1(parsedOption)); - }, - $signature: 419 - }; - A.Parser__setOption_closure.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_String); - }, - $signature: 119 - }; - A._Usage.prototype = { - get$_columnWidths() { - var result, _this = this, - value = _this.___Usage__columnWidths_FI; - if (value === $) { - result = _this._calculateColumnWidths$0(); - _this.___Usage__columnWidths_FI !== $ && A.throwUnnamedLateFieldADI(); - _this.___Usage__columnWidths_FI = result; - value = result; - } - return value; - }, - generate$0() { - var t1, t2, t3, t4, _i, optionOrSeparator, t5, _this = this; - for (t1 = _this._usage$_optionsAndSeparators, t2 = t1.length, t3 = type$.Option, t4 = _this._usage$_buffer, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - optionOrSeparator = t1[_i]; - if (typeof optionOrSeparator == "string") { - t5 = t4._contents; - t4._contents = (t5.length !== 0 ? t4._contents = t5 + "\n\n" : t5) + optionOrSeparator; - _this._newlinesNeeded = 1; - continue; - } - t3._as(optionOrSeparator); - if (optionOrSeparator.hide) - continue; - _this._writeOption$1(optionOrSeparator); - } - t1 = t4._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _writeOption$1(option) { - var allowedNames, t2, t3, t4, _i, $name, t5, _this = this, - t1 = option.abbr; - _this._write$2(0, t1 == null ? "" : "-" + t1 + ", "); - t1 = _this._longOption$1(option); - _this._write$2(1, t1); - t1 = option.help; - if (t1 != null) - _this._write$2(2, t1); - t1 = option.allowedHelp; - if (t1 != null) { - allowedNames = J.toList$0$ax(t1.get$keys(t1)); - B.JSArray_methods.sort$0(allowedNames); - _this._newline$0(); - for (t2 = allowedNames.length, t3 = option.defaultsTo, t4 = type$.List_dynamic._is(t3), _i = 0; _i < allowedNames.length; allowedNames.length === t2 || (0, A.throwConcurrentModificationError)(allowedNames), ++_i) { - $name = allowedNames[_i]; - t5 = (t4 ? B.JSArray_methods.contains$1(t3, $name) : t3 === $name) ? " (default)" : ""; - _this._write$2(1, " [" + $name + "]" + t5); - t5 = t1.$index(0, $name); - t5.toString; - _this._write$2(2, t5); - } - _this._newline$0(); - } else if (option.allowed != null) - _this._write$2(2, _this._buildAllowedList$1(option)); - else { - t1 = option.type; - if (t1 === B.OptionType_I6i) { - if (option.defaultsTo === true) - _this._write$2(2, "(defaults to on)"); - } else if (t1 === B.OptionType_yPm) { - t1 = option.defaultsTo; - if (t1 != null && type$.Iterable_dynamic._as(t1).length !== 0) { - type$.List_dynamic._as(t1); - _this._write$2(2, "(defaults to " + new A.MappedListIterable(t1, new A._Usage__writeOption_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + ")"); - } - } else { - t1 = option.defaultsTo; - if (t1 != null) - _this._write$2(2, '(defaults to "' + A.S(t1) + '")'); - } - } - }, - _longOption$1(option) { - var t1 = option.name, - result = option.negatable ? "--[no-]" + t1 : "--" + t1; - t1 = option.valueHelp; - return t1 != null ? result + ("=<" + t1 + ">") : result; - }, - _calculateColumnWidths$0() { - var t1, t2, t3, abbr, title, _i, option, t4, t5, t6, t7, t8; - for (t1 = this._usage$_optionsAndSeparators, t2 = t1.length, t3 = type$.List_dynamic, abbr = 0, title = 0, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - option = t1[_i]; - if (!(option instanceof A.Option)) - continue; - if (option.hide) - continue; - t4 = option.abbr; - abbr = Math.max(abbr, (t4 == null ? "" : "-" + t4 + ", ").length); - t4 = this._longOption$1(option); - title = Math.max(title, t4.length); - t4 = option.allowedHelp; - if (t4 != null) - for (t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = option.defaultsTo, t6 = t3._is(t5); t4.moveNext$0();) { - t7 = t4.get$current(t4); - t8 = (t6 ? B.JSArray_methods.contains$1(t5, t7) : t5 === t7) ? " (default)" : ""; - title = Math.max(title, (" [" + t7 + "]" + t8).length); - } - } - return A._setArrayType([abbr, title + 4], type$.JSArray_int); - }, - _newline$0() { - ++this._newlinesNeeded; - this._currentColumn = 0; - }, - _write$2(column, text) { - var t1, _i, - lines = A._setArrayType(text.split("\n"), type$.JSArray_String); - this.get$_columnWidths(); - while (true) { - if (!(lines.length !== 0 && J.trim$0$s(B.JSArray_methods.get$first(lines)) === "")) - break; - B.JSArray_methods.removeAt$1(lines, 0); - } - while (true) { - if (!(lines.length !== 0 && J.trim$0$s(B.JSArray_methods.get$last(lines)) === "")) - break; - lines.pop(); - } - for (t1 = lines.length, _i = 0; _i < lines.length; lines.length === t1 || (0, A.throwConcurrentModificationError)(lines), ++_i) - this._writeLine$2(column, lines[_i]); - }, - _writeLine$2(column, text) { - var t1, t2, _this = this; - for (t1 = _this._usage$_buffer; t2 = _this._newlinesNeeded, t2 > 0;) { - t1._contents += "\n"; - _this._newlinesNeeded = t2 - 1; - } - for (; t2 = _this._currentColumn, t2 !== column;) { - if (t2 < 2) { - t2 = B.JSString_methods.$mul(" ", _this.get$_columnWidths()[_this._currentColumn]); - t1._contents += t2; - } else - t1._contents += "\n"; - _this._currentColumn = (_this._currentColumn + 1) % 3; - } - _this.get$_columnWidths(); - if (column < 2) { - t2 = B.JSString_methods.padRight$1(text, _this.get$_columnWidths()[column]); - t1._contents += t2; - } else - t1._contents += text; - _this._currentColumn = (_this._currentColumn + 1) % 3; - if (column === 2) - ++_this._newlinesNeeded; - }, - _buildAllowedList$1(option) { - var t2, t3, first, _i, allowed, - t1 = option.defaultsTo, - isDefault = type$.List_dynamic._is(t1) ? B.JSArray_methods.get$contains(t1) : new A._Usage__buildAllowedList_closure(option); - t1 = "" + "["; - for (t2 = option.allowed, t3 = t2.length, first = true, _i = 0; _i < t3; ++_i, first = false) { - allowed = t2[_i]; - if (!first) - t1 += ", "; - t1 += A.S(allowed); - if (isDefault.call$1(allowed)) - t1 += " (default)"; - } - t1 += "]"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - }; - A._Usage__writeOption_closure.prototype = { - call$1(value) { - return '"' + A.S(value) + '"'; - }, - $signature: 122 - }; - A._Usage__buildAllowedList_closure.prototype = { - call$1(value) { - return value === this.option.defaultsTo; - }, - $signature: 5 - }; - A.FutureGroup.prototype = { - add$1(_, task) { - var t1, index, _this = this; - if (_this._future_group$_closed) - throw A.wrapException(A.StateError$("The FutureGroup is closed.")); - t1 = _this._future_group$_values; - index = t1.length; - t1.push(null); - ++_this._future_group$_pending; - task.then$1$1(0, new A.FutureGroup_add_closure(_this, index), type$.Null).catchError$1(new A.FutureGroup_add_closure0(_this)); - }, - close$0(_) { - var t1, t2, _this = this; - _this._future_group$_closed = true; - if (_this._future_group$_pending !== 0) - return; - t1 = _this._future_group$_completer; - if ((t1.future._state & 30) !== 0) - return; - t2 = _this.$ti._eval$1("WhereTypeIterable<1>"); - t1.complete$1(A.List_List$of(new A.WhereTypeIterable(_this._future_group$_values, t2), true, t2._eval$1("Iterable.E"))); - } - }; - A.FutureGroup_add_closure.prototype = { - call$1(value) { - var t3, t4, - t1 = this.$this, - t2 = t1._future_group$_completer; - if ((t2.future._state & 30) !== 0) - return null; - t3 = --t1._future_group$_pending; - t4 = t1._future_group$_values; - t4[this.index] = value; - if (t3 !== 0) - return null; - if (!t1._future_group$_closed) - return null; - t1 = t1.$ti._eval$1("WhereTypeIterable<1>"); - t2.complete$1(A.List_List$of(new A.WhereTypeIterable(t4, t1), true, t1._eval$1("Iterable.E"))); - }, - $signature() { - return this.$this.$ti._eval$1("Null(1)"); - } - }; - A.FutureGroup_add_closure0.prototype = { - call$2(error, stackTrace) { - var t1 = this.$this._future_group$_completer; - if ((t1.future._state & 30) !== 0) - return null; - t1.completeError$2(error, stackTrace); - }, - $signature: 55 - }; - A.ErrorResult.prototype = { - complete$1(completer) { - completer.completeError$2(this.error, this.stackTrace); - }, - get$hashCode(_) { - return (J.get$hashCode$(this.error) ^ A.Primitives_objectHashCode(this.stackTrace) ^ 492929599) >>> 0; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.ErrorResult && J.$eq$(this.error, other.error) && this.stackTrace === other.stackTrace; - }, - $isResult: 1 - }; - A.ValueResult.prototype = { - complete$1(completer) { - completer.complete$1(this.value); - }, - get$hashCode(_) { - return (J.get$hashCode$(this.value) ^ 842997089) >>> 0; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.ValueResult && J.$eq$(this.value, other.value); - }, - $isResult: 1 - }; - A.StreamCompleter.prototype = { - setSourceStream$1(sourceStream) { - var t1 = this._stream_completer$_stream; - if (t1._sourceStream != null) - throw A.wrapException(A.StateError$("Source stream already set")); - t1._sourceStream = sourceStream; - if (t1._stream_completer$_controller != null) - t1._linkStreamToController$0(); - }, - setError$2(error, stackTrace) { - var t1 = this.$ti._precomputed1; - this.setSourceStream$1(A.Stream_Stream$fromFuture(A.Future_Future$error(error, stackTrace, t1), t1)); - }, - setError$1(error) { - return this.setError$2(error, null); - } - }; - A._CompleterStream.prototype = { - listen$4$cancelOnError$onDone$onError(_, onData, cancelOnError, onDone, onError) { - var sourceStream, t1, _this = this, _null = null; - if (_this._stream_completer$_controller == null) { - sourceStream = _this._sourceStream; - if (sourceStream != null && !sourceStream.get$isBroadcast()) - return sourceStream.listen$4$cancelOnError$onDone$onError(0, onData, cancelOnError, onDone, onError); - if (_this._stream_completer$_controller == null) - _this._stream_completer$_controller = A.StreamController_StreamController(_null, _null, _null, _null, true, _this.$ti._precomputed1); - if (_this._sourceStream != null) - _this._linkStreamToController$0(); - } - t1 = _this._stream_completer$_controller; - t1.toString; - return new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$4$cancelOnError$onDone$onError(0, onData, cancelOnError, onDone, onError); - }, - listen$1(_, onData) { - return this.listen$4$cancelOnError$onDone$onError(0, onData, null, null, null); - }, - listen$3$onDone$onError(_, onData, onDone, onError) { - return this.listen$4$cancelOnError$onDone$onError(0, onData, null, onDone, onError); - }, - _linkStreamToController$0() { - var t2, - t1 = this._stream_completer$_controller; - t1.toString; - t2 = this._sourceStream; - t2.toString; - t1.addStream$2$cancelOnError(t2, false).whenComplete$1(t1.get$close(t1)); - } - }; - A.StreamGroup.prototype = { - add$1(_, stream) { - var t1, _this = this; - if (_this._closed) - throw A.wrapException(A.StateError$("Can't add a Stream to a closed StreamGroup.")); - t1 = _this._stream_group$_state; - if (t1 === B._StreamGroupState_dormant) - _this._subscriptions.putIfAbsent$2(stream, new A.StreamGroup_add_closure()); - else if (t1 === B._StreamGroupState_canceled) - return stream.listen$1(0, null).cancel$0(); - else - _this._subscriptions.putIfAbsent$2(stream, new A.StreamGroup_add_closure0(_this, stream)); - return null; - }, - remove$1(_, stream) { - var t1 = this._subscriptions, - subscription = t1.remove$1(0, stream), - future = subscription == null ? null : subscription.cancel$0(); - if (t1.__js_helper$_length === 0) - if (this._closed) { - t1 = this.__StreamGroup__controller_A; - t1 === $ && A.throwUnnamedLateFieldNI(); - A.scheduleMicrotask(t1.get$close(t1)); - } - return future; - }, - _onListen$0() { - var stream, t1, t2, t3, _i, entry, exception, _this = this; - _this._stream_group$_state = B._StreamGroupState_listening; - for (t1 = _this._subscriptions, t2 = A.List_List$of(t1.get$entries(0), true, _this.$ti._eval$1("MapEntry,StreamSubscription<1>?>")), t3 = t2.length, _i = 0; _i < t3; ++_i) { - entry = t2[_i]; - if (entry.value != null) - continue; - stream = entry.key; - try { - t1.$indexSet(0, stream, _this._listenToStream$1(stream)); - } catch (exception) { - t1 = _this._onCancel$0(); - if (t1 != null) - t1.catchError$1(new A.StreamGroup__onListen_closure()); - throw exception; - } - } - }, - _onPause$0() { - var t1, t2, t3; - this._stream_group$_state = B._StreamGroupState_paused; - for (t1 = this._subscriptions.get$values(0), t2 = A._instanceType(t1), t1 = new A.MappedIterator(J.get$iterator$ax(t1.__internal$_iterable), t1._f, t2._eval$1("MappedIterator<1,2>")), t2 = t2._rest[1]; t1.moveNext$0();) { - t3 = t1.__internal$_current; - (t3 == null ? t2._as(t3) : t3).pause$0(0); - } - }, - _onResume$0() { - var t1, t2, t3; - this._stream_group$_state = B._StreamGroupState_listening; - for (t1 = this._subscriptions.get$values(0), t2 = A._instanceType(t1), t1 = new A.MappedIterator(J.get$iterator$ax(t1.__internal$_iterable), t1._f, t2._eval$1("MappedIterator<1,2>")), t2 = t2._rest[1]; t1.moveNext$0();) { - t3 = t1.__internal$_current; - (t3 == null ? t2._as(t3) : t3).resume$0(0); - } - }, - _onCancel$0() { - var t1, t2, futures; - this._stream_group$_state = B._StreamGroupState_canceled; - t1 = this._subscriptions; - t2 = type$.NonNullsIterable_Future_void; - futures = A.List_List$of(new A.NonNullsIterable(t1.get$entries(0).map$1$1(0, new A.StreamGroup__onCancel_closure(this), type$.nullable_Future_void), t2), true, t2._eval$1("Iterable.E")); - t1.clear$0(0); - return futures.length === 0 ? null : A.Future_wait(futures, false, type$.void); - }, - _listenToStream$1(stream) { - var subscription, - t1 = this.__StreamGroup__controller_A; - t1 === $ && A.throwUnnamedLateFieldNI(); - subscription = stream.listen$3$onDone$onError(0, t1.get$add(t1), new A.StreamGroup__listenToStream_closure(this, stream), t1.get$addError()); - if (this._stream_group$_state === B._StreamGroupState_paused) - subscription.pause$0(0); - return subscription; - } - }; - A.StreamGroup_add_closure.prototype = { - call$0() { - return null; - }, - $signature: 1 - }; - A.StreamGroup_add_closure0.prototype = { - call$0() { - return this.$this._listenToStream$1(this.stream); - }, - $signature() { - return this.$this.$ti._eval$1("StreamSubscription<1>()"); - } - }; - A.StreamGroup__onListen_closure.prototype = { - call$1(_) { - }, - $signature: 63 - }; - A.StreamGroup__onCancel_closure.prototype = { - call$1(entry) { - var t1, exception, - subscription = entry.value; - try { - if (subscription != null) { - t1 = subscription.cancel$0(); - return t1; - } - t1 = J.listen$1$z(entry.key, null).cancel$0(); - return t1; - } catch (exception) { - return null; - } - }, - $signature() { - return this.$this.$ti._eval$1("Future<~>?(MapEntry,StreamSubscription<1>?>)"); - } - }; - A.StreamGroup__listenToStream_closure.prototype = { - call$0() { - return this.$this.remove$1(0, this.stream); - }, - $signature: 0 - }; - A._StreamGroupState.prototype = { - toString$0(_) { - return this.name; - } - }; - A.StreamQueue.prototype = { - _updateRequests$0() { - var t1, t2, t3, t4, _this = this; - for (t1 = _this._requestQueue, t2 = _this._eventQueue, t3 = t1.$ti._precomputed1; !t1.get$isEmpty(0);) { - t4 = t1._head; - if (t4 === t1._tail) - A.throwExpression(A.IterableElementError_noElement()); - t4 = t1._table[t4]; - if (t4 == null) - t4 = t3._as(t4); - if (t4.update$2(t2, _this._isDone)) - t1.removeFirst$0(); - else - return; - } - if (!_this._isDone) - _this._stream_queue$_subscription.pause$0(0); - }, - _ensureListening$0() { - var t1, _this = this; - if (_this._isDone) - return; - t1 = _this._stream_queue$_subscription; - if (t1 == null) - _this._stream_queue$_subscription = _this._stream_queue$_source.listen$3$onDone$onError(0, new A.StreamQueue__ensureListening_closure(_this), new A.StreamQueue__ensureListening_closure0(_this), new A.StreamQueue__ensureListening_closure1(_this)); - else - t1.resume$0(0); - }, - _addResult$1(result) { - ++this._eventsReceived; - this._eventQueue._queue_list$_add$1(result); - this._updateRequests$0(); - }, - _addRequest$1(request) { - var _this = this, - t1 = _this._requestQueue; - if (t1._head === t1._tail) { - if (request.update$2(_this._eventQueue, _this._isDone)) - return; - _this._ensureListening$0(); - } - t1._add$1(request); - } - }; - A.StreamQueue__ensureListening_closure.prototype = { - call$1(data) { - var t1 = this.$this; - t1._addResult$1(new A.ValueResult(data, t1.$ti._eval$1("ValueResult<1>"))); - }, - $signature() { - return this.$this.$ti._eval$1("~(1)"); - } - }; - A.StreamQueue__ensureListening_closure1.prototype = { - call$2(error, stackTrace) { - this.$this._addResult$1(new A.ErrorResult(error, stackTrace)); - }, - $signature: 55 - }; - A.StreamQueue__ensureListening_closure0.prototype = { - call$0() { - var t1 = this.$this; - t1._stream_queue$_subscription = null; - t1._isDone = true; - t1._updateRequests$0(); - }, - $signature: 0 - }; - A._NextRequest.prototype = { - update$2(events, isDone) { - if (!events.get$isEmpty(events)) { - events.removeFirst$0().complete$1(this._completer); - return true; - } - if (isDone) { - this._completer.completeError$2(new A.StateError("No elements"), A.StackTrace_current()); - return true; - } - return false; - }, - $is_EventRequest: 1 - }; - A._isStrictMode_closure.prototype = { - call$0() { - var exception; - try { - "".name = null; - return false; - } catch (exception) { - return true; - } - }, - $signature: 21 - }; - A.Repl.prototype = {}; - A.alwaysValid_closure.prototype = { - call$1(text) { - return true; - }, - $signature: 5 - }; - A.ReplAdapter.prototype = { - runAsync$0() { - var rl, runController, _this = this, t1 = {}, - t2 = J.get$isTTY$x(self.process.stdin), - output = (t2 == null ? false : t2) ? self.process.stdout : null; - t2 = _this.repl.prompt; - rl = J.createInterface$1$x($.$get$readline(), {input: self.process.stdin, output: output, prompt: t2}); - _this.rl = rl; - t1.statement = ""; - t1.prompt = t2; - runController = A._Cell$(); - runController.__late_helper$_value = A.StreamController_StreamController(_this.get$exit(_this), new A.ReplAdapter_runAsync_closure(t1, _this, rl, runController), null, null, false, type$.String); - return runController._readLocal$0().get$stream(); - }, - exit$0(_) { - var t1 = this.rl; - if (t1 != null) - J.close$0$x(t1); - this.rl = null; - } - }; - A.ReplAdapter_runAsync_closure.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$handler = 1, $async$currentError, $async$self = this, lineController, lineQueue, line, error, stackTrace, t1, t2, t3, t4, $prompt, prompt0, t5, t6, t7, t8, line0, toZone, statement, exception, $async$exception; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$handler = 3; - lineController = A.StreamController_StreamController(null, null, null, null, false, type$.String); - t1 = lineController; - t2 = A.QueueList$(null, type$.Result_String); - t3 = A.ListQueue$(type$._EventRequest_dynamic); - lineQueue = new A.StreamQueue(new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")), t2, t3, type$.StreamQueue_String); - t1 = $async$self.rl; - t2 = J.getInterceptor$x(t1); - t2.on$2(t1, "line", A.allowInterop(new A.ReplAdapter_runAsync__closure(lineController))); - t3 = $async$self._box_0, t4 = $async$self.$this.repl, $prompt = t4.continuation, prompt0 = t4.prompt, t5 = $async$self.runController; - case 6: - // for condition - // trivial condition - t6 = J.get$isTTY$x(self.process.stdin); - if (t6 == null ? false : t6) - J.write$1$x(self.process.stdout, t3.prompt); - t6 = lineQueue; - t6.toString; - t7 = t6.$ti; - t8 = new A._Future($.Zone__current, t7._eval$1("_Future<1>")); - t6._addRequest$1(new A._NextRequest(new A._AsyncCompleter(t8, t7._eval$1("_AsyncCompleter<1>")), t7._eval$1("_NextRequest<1>"))); - $async$goto = 8; - return A._asyncAwait(t8, $async$call$0); - case 8: - // returning from await. - line = $async$result; - t6 = J.get$isTTY$x(self.process.stdin); - if (!(t6 == null ? false : t6)) { - line0 = t3.prompt + A.S(line); - toZone = $.printToZone; - if (toZone == null) - A.printString(line0); - else - toZone.call$1(line0); - } - statement = B.JSString_methods.$add(t3.statement, line); - t3.statement = statement; - if (t4.validator.call$1(statement)) { - t6 = t5.__late_helper$_value; - if (t6 === t5) - A.throwExpression(A.LateError$localNI("")); - J.add$1$ax(t6, t3.statement); - t3.statement = ""; - t3.prompt = prompt0; - t2.setPrompt$1(t1, prompt0); - } else { - t3.statement += "\n"; - t3.prompt = $prompt; - t2.setPrompt$1(t1, $prompt); - } - // goto for condition - $async$goto = 6; - break; - case 7: - // after for - $async$handler = 1; - // goto after finally - $async$goto = 5; - break; - case 3: - // catch - $async$handler = 2; - $async$exception = $async$currentError; - error = A.unwrapException($async$exception); - stackTrace = A.getTraceFromException($async$exception); - t1 = $async$self.runController; - t1._readLocal$0().addError$2(error, stackTrace); - t2 = $async$self.$this.exit$0(0); - t2 = A._Future$value(t2, type$.void); - $async$goto = 9; - return A._asyncAwait(t2, $async$call$0); - case 9: - // returning from await. - J.close$0$x(t1._readLocal$0()); - // goto after finally - $async$goto = 5; - break; - case 2: - // uncaught - // goto rethrow - $async$goto = 1; - break; - case 5: - // after finally - // implicit return - return A._asyncReturn(null, $async$completer); - case 1: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A.ReplAdapter_runAsync__closure.prototype = { - call$1(value) { - return this.lineController.add$1(0, A._asString(value)); - }, - $signature: 68 - }; - A.Stdin.prototype = {}; - A.Stdout.prototype = {}; - A.ReadlineModule.prototype = {}; - A.ReadlineOptions.prototype = {}; - A.ReadlineInterface.prototype = {}; - A.EmptyUnmodifiableSet.prototype = { - get$iterator(_) { - return B.C_EmptyIterator; - }, - get$length(_) { - return 0; - }, - contains$1(_, element) { - return false; - }, - toSet$0(_) { - return A.LinkedHashSet_LinkedHashSet$_empty(this.$ti._precomputed1); - }, - $isEfficientLengthIterable: 1, - $isSet: 1 - }; - A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin.prototype = {}; - A.DefaultEquality.prototype = {}; - A.IterableEquality.prototype = { - equals$2(_, elements1, elements2) { - var it1, it2, hasNext; - if (elements1 === elements2) - return true; - it1 = J.get$iterator$ax(elements1); - it2 = J.get$iterator$ax(elements2); - for (; true;) { - hasNext = it1.moveNext$0(); - if (hasNext !== it2.moveNext$0()) - return false; - if (!hasNext) - return true; - if (!J.$eq$(it1.get$current(it1), it2.get$current(it2))) - return false; - } - }, - hash$1(elements) { - var t1, hash, _i; - for (t1 = elements.length, hash = 0, _i = 0; _i < elements.length; elements.length === t1 || (0, A.throwConcurrentModificationError)(elements), ++_i) { - hash = hash + J.get$hashCode$(elements[_i]) & 2147483647; - hash = hash + (hash << 10 >>> 0) & 2147483647; - hash ^= hash >>> 6; - } - hash = hash + (hash << 3 >>> 0) & 2147483647; - hash ^= hash >>> 11; - return hash + (hash << 15 >>> 0) & 2147483647; - } - }; - A.ListEquality.prototype = { - equals$2(_, list1, list2) { - var t1, $length, t2, i; - if (list1 == null ? list2 == null : list1 === list2) - return true; - if (list1 == null || list2 == null) - return false; - t1 = J.getInterceptor$asx(list1); - $length = t1.get$length(list1); - t2 = J.getInterceptor$asx(list2); - if ($length !== t2.get$length(list2)) - return false; - for (i = 0; i < $length; ++i) - if (!J.$eq$(t1.$index(list1, i), t2.$index(list2, i))) - return false; - return true; - }, - hash$1(list) { - var hash, i; - for (hash = 0, i = 0; i < list.length; ++i) { - hash = hash + J.get$hashCode$(list[i]) & 2147483647; - hash = hash + (hash << 10 >>> 0) & 2147483647; - hash ^= hash >>> 6; - } - hash = hash + (hash << 3 >>> 0) & 2147483647; - hash ^= hash >>> 11; - return hash + (hash << 15 >>> 0) & 2147483647; - } - }; - A._MapEntry.prototype = { - get$hashCode(_) { - return 3 * J.get$hashCode$(this.key) + 7 * J.get$hashCode$(this.value) & 2147483647; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A._MapEntry && J.$eq$(this.key, other.key) && J.$eq$(this.value, other.value); - } - }; - A.MapEquality.prototype = { - equals$2(_, map1, map2) { - var equalElementCounts, t1, key, entry, count; - if (map1 === map2) - return true; - if (map1.get$length(map1) !== map2.get$length(map2)) - return false; - equalElementCounts = A.HashMap_HashMap(type$._MapEntry, type$.int); - for (t1 = J.get$iterator$ax(map1.get$keys(map1)); t1.moveNext$0();) { - key = t1.get$current(t1); - entry = new A._MapEntry(this, key, map1.$index(0, key)); - count = equalElementCounts.$index(0, entry); - equalElementCounts.$indexSet(0, entry, (count == null ? 0 : count) + 1); - } - for (t1 = J.get$iterator$ax(map2.get$keys(map2)); t1.moveNext$0();) { - key = t1.get$current(t1); - entry = new A._MapEntry(this, key, map2.$index(0, key)); - count = equalElementCounts.$index(0, entry); - if (count == null || count === 0) - return false; - equalElementCounts.$indexSet(0, entry, count - 1); - } - return true; - }, - hash$1(map) { - var t1, t2, hash, key, keyHash, t3; - for (t1 = J.get$iterator$ax(map.get$keys(map)), t2 = this.$ti._rest[1], hash = 0; t1.moveNext$0();) { - key = t1.get$current(t1); - keyHash = J.get$hashCode$(key); - t3 = map.$index(0, key); - hash = hash + 3 * keyHash + 7 * J.get$hashCode$(t3 == null ? t2._as(t3) : t3) & 2147483647; - } - hash = hash + (hash << 3 >>> 0) & 2147483647; - hash ^= hash >>> 11; - return hash + (hash << 15 >>> 0) & 2147483647; - } - }; - A.QueueList.prototype = { - add$1(_, element) { - this._queue_list$_add$1(element); - }, - addAll$1(_, iterable) { - var addCount, $length, t1, endSpace, t2, preSpace, _this = this; - if (type$.List_dynamic._is(iterable)) { - addCount = J.get$length$asx(iterable); - $length = _this.get$length(0); - t1 = $length + addCount; - if (t1 >= J.get$length$asx(_this._queue_list$_table)) { - _this._preGrow$1(t1); - J.setRange$4$ax(_this._queue_list$_table, $length, t1, iterable, 0); - _this.set$_queue_list$_tail(_this.get$_queue_list$_tail() + addCount); - } else { - endSpace = J.get$length$asx(_this._queue_list$_table) - _this.get$_queue_list$_tail(); - t1 = _this._queue_list$_table; - t2 = J.getInterceptor$ax(t1); - if (addCount < endSpace) { - t2.setRange$4(t1, _this.get$_queue_list$_tail(), _this.get$_queue_list$_tail() + addCount, iterable, 0); - _this.set$_queue_list$_tail(_this.get$_queue_list$_tail() + addCount); - } else { - preSpace = addCount - endSpace; - t2.setRange$4(t1, _this.get$_queue_list$_tail(), _this.get$_queue_list$_tail() + endSpace, iterable, 0); - J.setRange$4$ax(_this._queue_list$_table, 0, preSpace, iterable, endSpace); - _this.set$_queue_list$_tail(preSpace); - } - } - } else - for (t1 = J.get$iterator$ax(iterable); t1.moveNext$0();) - _this._queue_list$_add$1(t1.get$current(t1)); - }, - cast$1$0(_, $T) { - return new A._CastQueueList(this, J.cast$1$0$ax(this._queue_list$_table, $T), -1, -1, A._instanceType(this)._eval$1("@")._bind$1($T)._eval$1("_CastQueueList<1,2>")); - }, - toString$0(_) { - return A.Iterable_iterableToFullString(this, "{", "}"); - }, - addFirst$1(element) { - var _this = this; - _this.set$_queue_list$_head((_this.get$_queue_list$_head() - 1 & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); - J.$indexSet$ax(_this._queue_list$_table, _this.get$_queue_list$_head(), element); - if (_this.get$_queue_list$_head() === _this.get$_queue_list$_tail()) - _this._queue_list$_grow$0(); - }, - removeFirst$0() { - var result, _this = this; - if (_this.get$_queue_list$_head() === _this.get$_queue_list$_tail()) - throw A.wrapException(A.StateError$("No element")); - result = J.$index$asx(_this._queue_list$_table, _this.get$_queue_list$_head()); - if (result == null) - result = A._instanceType(_this)._eval$1("QueueList.E")._as(result); - J.$indexSet$ax(_this._queue_list$_table, _this.get$_queue_list$_head(), null); - _this.set$_queue_list$_head((_this.get$_queue_list$_head() + 1 & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); - return result; - }, - removeLast$0(_) { - var result, _this = this; - if (_this.get$_queue_list$_head() === _this.get$_queue_list$_tail()) - throw A.wrapException(A.StateError$("No element")); - _this.set$_queue_list$_tail((_this.get$_queue_list$_tail() - 1 & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); - result = J.$index$asx(_this._queue_list$_table, _this.get$_queue_list$_tail()); - if (result == null) - result = A._instanceType(_this)._eval$1("QueueList.E")._as(result); - J.$indexSet$ax(_this._queue_list$_table, _this.get$_queue_list$_tail(), null); - return result; - }, - get$length(_) { - return (this.get$_queue_list$_tail() - this.get$_queue_list$_head() & J.get$length$asx(this._queue_list$_table) - 1) >>> 0; - }, - set$length(_, value) { - var delta, newTail, t1, t2, _this = this; - if (value < 0) - throw A.wrapException(A.RangeError$("Length " + value + " may not be negative.")); - if (value > _this.get$length(0) && !A._instanceType(_this)._eval$1("QueueList.E")._is(null)) - throw A.wrapException(A.UnsupportedError$("The length can only be increased when the element type is nullable, but the current element type is `" + A.createRuntimeType(A._instanceType(_this)._eval$1("QueueList.E")).toString$0(0) + "`.")); - delta = value - _this.get$length(0); - if (delta >= 0) { - if (J.get$length$asx(_this._queue_list$_table) <= value) - _this._preGrow$1(value); - _this.set$_queue_list$_tail((_this.get$_queue_list$_tail() + delta & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); - return; - } - newTail = _this.get$_queue_list$_tail() + delta; - t1 = _this._queue_list$_table; - if (newTail >= 0) - J.fillRange$3$ax(t1, newTail, _this.get$_queue_list$_tail(), null); - else { - newTail += J.get$length$asx(t1); - J.fillRange$3$ax(_this._queue_list$_table, 0, _this.get$_queue_list$_tail(), null); - t1 = _this._queue_list$_table; - t2 = J.getInterceptor$asx(t1); - t2.fillRange$3(t1, newTail, t2.get$length(t1), null); - } - _this.set$_queue_list$_tail(newTail); - }, - $index(_, index) { - var t1, _this = this; - if (index < 0 || index >= _this.get$length(0)) - throw A.wrapException(A.RangeError$("Index " + index + " must be in the range [0.." + _this.get$length(0) + ").")); - t1 = J.$index$asx(_this._queue_list$_table, (_this.get$_queue_list$_head() + index & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); - return t1 == null ? A._instanceType(_this)._eval$1("QueueList.E")._as(t1) : t1; - }, - $indexSet(_, index, value) { - var _this = this; - if (index < 0 || index >= _this.get$length(0)) - throw A.wrapException(A.RangeError$("Index " + index + " must be in the range [0.." + _this.get$length(0) + ").")); - J.$indexSet$ax(_this._queue_list$_table, (_this.get$_queue_list$_head() + index & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0, value); - }, - _queue_list$_add$1(element) { - var _this = this; - J.$indexSet$ax(_this._queue_list$_table, _this.get$_queue_list$_tail(), element); - _this.set$_queue_list$_tail((_this.get$_queue_list$_tail() + 1 & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); - if (_this.get$_queue_list$_head() === _this.get$_queue_list$_tail()) - _this._queue_list$_grow$0(); - }, - _queue_list$_grow$0() { - var _this = this, - newTable = A.List_List$filled(J.get$length$asx(_this._queue_list$_table) * 2, null, false, A._instanceType(_this)._eval$1("QueueList.E?")), - split = J.get$length$asx(_this._queue_list$_table) - _this.get$_queue_list$_head(); - B.JSArray_methods.setRange$4(newTable, 0, split, _this._queue_list$_table, _this.get$_queue_list$_head()); - B.JSArray_methods.setRange$4(newTable, split, split + _this.get$_queue_list$_head(), _this._queue_list$_table, 0); - _this.set$_queue_list$_head(0); - _this.set$_queue_list$_tail(J.get$length$asx(_this._queue_list$_table)); - _this._queue_list$_table = newTable; - }, - _writeToList$1(target) { - var $length, firstPartSize, _this = this; - if (_this.get$_queue_list$_head() <= _this.get$_queue_list$_tail()) { - $length = _this.get$_queue_list$_tail() - _this.get$_queue_list$_head(); - B.JSArray_methods.setRange$4(target, 0, $length, _this._queue_list$_table, _this.get$_queue_list$_head()); - return $length; - } else { - firstPartSize = J.get$length$asx(_this._queue_list$_table) - _this.get$_queue_list$_head(); - B.JSArray_methods.setRange$4(target, 0, firstPartSize, _this._queue_list$_table, _this.get$_queue_list$_head()); - B.JSArray_methods.setRange$4(target, firstPartSize, firstPartSize + _this.get$_queue_list$_tail(), _this._queue_list$_table, 0); - return _this.get$_queue_list$_tail() + firstPartSize; - } - }, - _preGrow$1(newElementCount) { - var _this = this, - newTable = A.List_List$filled(A.QueueList__nextPowerOf2(newElementCount + B.JSInt_methods._shrOtherPositive$1(newElementCount, 1)), null, false, A._instanceType(_this)._eval$1("QueueList.E?")); - _this.set$_queue_list$_tail(_this._writeToList$1(newTable)); - _this._queue_list$_table = newTable; - _this.set$_queue_list$_head(0); - }, - $isEfficientLengthIterable: 1, - $isQueue: 1, - $isIterable: 1, - $isList: 1, - get$_queue_list$_head() { - return this._queue_list$_head; - }, - get$_queue_list$_tail() { - return this._queue_list$_tail; - }, - set$_queue_list$_head(val) { - return this._queue_list$_head = val; - }, - set$_queue_list$_tail(val) { - return this._queue_list$_tail = val; - } - }; - A._CastQueueList.prototype = { - get$_queue_list$_head() { - return this._queue_list$_delegate.get$_queue_list$_head(); - }, - set$_queue_list$_head(value) { - this._queue_list$_delegate.set$_queue_list$_head(value); - }, - get$_queue_list$_tail() { - return this._queue_list$_delegate.get$_queue_list$_tail(); - }, - set$_queue_list$_tail(value) { - this._queue_list$_delegate.set$_queue_list$_tail(value); - } - }; - A._QueueList_Object_ListMixin.prototype = {}; - A.UnionSet.prototype = { - get$length(_) { - var t1 = this.get$_union_set$_iterable().get$length(0); - return t1; - }, - get$iterator(_) { - var t1 = this.get$_union_set$_iterable(); - return t1.get$iterator(t1); - }, - get$_union_set$_iterable() { - var t1 = this._sets, - t2 = this.$ti._precomputed1, - t3 = A._instanceType(t1)._eval$1("@<1>")._bind$1(t2)._eval$1("ExpandIterable<1,2>"); - t2 = A.LinkedHashSet_LinkedHashSet$_empty(t2); - return new A.WhereIterable(new A.ExpandIterable(t1, new A.UnionSet__iterable_closure(this), t3), t2.get$add(t2), t3._eval$1("WhereIterable")); - }, - contains$1(_, element) { - return this._sets.any$1(0, new A.UnionSet_contains_closure(this, element)); - }, - toSet$0(_) { - var t2, t3, t4, - t1 = A.LinkedHashSet_LinkedHashSet$_empty(this.$ti._precomputed1); - for (t2 = this._sets, t2 = A._LinkedHashSetIterator$(t2, t2._modifications, A._instanceType(t2)._precomputed1), t3 = t2.$ti._precomputed1; t2.moveNext$0();) { - t4 = t2._collection$_current; - t1.addAll$1(0, t4 == null ? t3._as(t4) : t4); - } - return t1; - } - }; - A.UnionSet__iterable_closure.prototype = { - call$1(set) { - return set; - }, - $signature() { - return this.$this.$ti._eval$1("Set<1>(Set<1>)"); - } - }; - A.UnionSet_contains_closure.prototype = { - call$1(set) { - return set.contains$1(0, this.element); - }, - $signature() { - return this.$this.$ti._eval$1("bool(Set<1>)"); - } - }; - A._UnionSet_SetBase_UnmodifiableSetMixin.prototype = {}; - A.UnmodifiableSetView0.prototype = {}; - A.UnmodifiableSetMixin.prototype = { - add$1(_, value) { - return A.UnmodifiableSetMixin__throw(); - }, - addAll$1(_, elements) { - return A.UnmodifiableSetMixin__throw(); - }, - remove$1(_, value) { - return A.UnmodifiableSetMixin__throw(); - } - }; - A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin.prototype = {}; - A._DelegatingIterableBase.prototype = { - any$1(_, test) { - return J.any$1$ax(this.get$_base(), test); - }, - contains$1(_, element) { - return J.contains$1$asx(this.get$_base(), element); - }, - elementAt$1(_, index) { - return J.elementAt$1$ax(this.get$_base(), index); - }, - every$1(_, test) { - return J.every$1$ax(this.get$_base(), test); - }, - get$first(_) { - return J.get$first$ax(this.get$_base()); - }, - get$isEmpty(_) { - return J.get$isEmpty$asx(this.get$_base()); - }, - get$isNotEmpty(_) { - return J.get$isNotEmpty$asx(this.get$_base()); - }, - get$iterator(_) { - return J.get$iterator$ax(this.get$_base()); - }, - get$last(_) { - return J.get$last$ax(this.get$_base()); - }, - get$length(_) { - return J.get$length$asx(this.get$_base()); - }, - map$1$1(_, f, $T) { - return J.map$1$1$ax(this.get$_base(), f, $T); - }, - get$single(_) { - return J.get$single$ax(this.get$_base()); - }, - skip$1(_, n) { - return J.skip$1$ax(this.get$_base(), n); - }, - take$1(_, n) { - return J.take$1$ax(this.get$_base(), n); - }, - toList$1$growable(_, growable) { - return J.toList$1$growable$ax(this.get$_base(), true); - }, - toList$0(_) { - return this.toList$1$growable(0, true); - }, - toSet$0(_) { - return J.toSet$0$ax(this.get$_base()); - }, - where$1(_, test) { - return J.where$1$ax(this.get$_base(), test); - }, - toString$0(_) { - return J.toString$0$(this.get$_base()); - }, - $isIterable: 1 - }; - A.DelegatingSet.prototype = { - add$1(_, value) { - return this._base.add$1(0, value); - }, - addAll$1(_, elements) { - this._base.addAll$1(0, elements); - }, - toSet$0(_) { - return new A.DelegatingSet(this._base.toSet$0(0), A._instanceType(this)._eval$1("DelegatingSet<1>")); - }, - $isEfficientLengthIterable: 1, - $isSet: 1, - get$_base() { - return this._base; - } - }; - A.MapKeySet.prototype = { - get$_base() { - var t1 = this._baseMap; - return t1.get$keys(t1); - }, - contains$1(_, element) { - return this._baseMap.containsKey$1(element); - }, - get$isEmpty(_) { - var t1 = this._baseMap; - return t1.get$isEmpty(t1); - }, - get$isNotEmpty(_) { - var t1 = this._baseMap; - return t1.get$isNotEmpty(t1); - }, - get$length(_) { - var t1 = this._baseMap; - return t1.get$length(t1); - }, - toString$0(_) { - return A.Iterable_iterableToFullString(this, "{", "}"); - }, - difference$1(other) { - return J.where$1$ax(this.get$_base(), new A.MapKeySet_difference_closure(this, other)).toSet$0(0); - }, - $isEfficientLengthIterable: 1, - $isSet: 1 - }; - A.MapKeySet_difference_closure.prototype = { - call$1(element) { - return !this.other._source.contains$1(0, element); - }, - $signature() { - return this.$this.$ti._eval$1("bool(1)"); - } - }; - A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin.prototype = {}; - A.BufferModule.prototype = {}; - A.BufferConstants.prototype = {}; - A.Buffer.prototype = {}; - A.ConsoleModule.prototype = {}; - A.Console.prototype = {}; - A.EventEmitter.prototype = {}; - A.FS.prototype = {}; - A.FSConstants.prototype = {}; - A.FSWatcher.prototype = {}; - A.ReadStream.prototype = {}; - A.ReadStreamOptions.prototype = {}; - A.WriteStream.prototype = {}; - A.WriteStreamOptions.prototype = {}; - A.FileOptions.prototype = {}; - A.StatOptions.prototype = {}; - A.MkdirOptions.prototype = {}; - A.RmdirOptions.prototype = {}; - A.WatchOptions.prototype = {}; - A.WatchFileOptions.prototype = {}; - A.Stats.prototype = {}; - A.Promise.prototype = {}; - A.Date.prototype = {}; - A.JsError.prototype = {}; - A.Atomics.prototype = {}; - A.Modules.prototype = {}; - A.Module.prototype = {}; - A.Net.prototype = {}; - A.Socket.prototype = {}; - A.NetAddress.prototype = {}; - A.NetServer.prototype = {}; - A.NodeJsError.prototype = {}; - A.JsAssertionError.prototype = {}; - A.JsRangeError.prototype = {}; - A.JsReferenceError.prototype = {}; - A.JsSyntaxError.prototype = {}; - A.JsTypeError.prototype = {}; - A.JsSystemError.prototype = {}; - A.Process.prototype = {}; - A.CPUUsage.prototype = {}; - A.Release.prototype = {}; - A.StreamModule.prototype = {}; - A.Readable.prototype = {}; - A.Writable.prototype = {}; - A.Duplex.prototype = {}; - A.Transform.prototype = {}; - A.WritableOptions.prototype = {}; - A.ReadableOptions.prototype = {}; - A.Immediate.prototype = {}; - A.Timeout.prototype = {}; - A.TTY.prototype = {}; - A.TTYReadStream.prototype = {}; - A.TTYWriteStream.prototype = {}; - A.Util.prototype = {}; - A.promiseToFuture_closure1.prototype = { - call$1(value) { - this.completer.complete$1(value); - }, - $signature: 63 - }; - A.promiseToFuture_closure2.prototype = { - call$1(error) { - this.completer.completeError$1(error); - }, - $signature: 63 - }; - A.futureToPromise_closure.prototype = { - call$2(resolve, reject) { - this.future.then$1$2$onError(0, new A.futureToPromise__closure(resolve, this.T), reject, type$.dynamic); - }, - $signature: 631 - }; - A.futureToPromise__closure.prototype = { - call$1(result) { - return this.resolve.call$1(result); - }, - $signature() { - return this.T._eval$1("@(0)"); - } - }; - A.Context.prototype = { - absolute$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) { - var t1; - A._validateArgList("absolute", A._setArrayType([part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15], type$.JSArray_nullable_String)); - if (part2 == null) { - t1 = this.style; - t1 = t1.rootLength$1(part1) > 0 && !t1.isRootRelative$1(part1); - } else - t1 = false; - if (t1) - return part1; - t1 = this._context$_current; - return this.join$16(0, t1 == null ? A.current() : t1, part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15); - }, - absolute$1(part1) { - var _null = null; - return this.absolute$15(part1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); - }, - dirname$1(path) { - var t1, t2, - parsed = A.ParsedPath_ParsedPath$parse(path, this.style); - parsed.removeTrailingSeparators$0(); - t1 = parsed.parts; - t2 = t1.length; - if (t2 === 0) { - t1 = parsed.root; - return t1 == null ? "." : t1; - } - if (t2 === 1) { - t1 = parsed.root; - return t1 == null ? "." : t1; - } - B.JSArray_methods.removeLast$0(t1); - parsed.separators.pop(); - parsed.removeTrailingSeparators$0(); - return parsed.toString$0(0); - }, - join$16(_, part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15, part16) { - var parts = A._setArrayType([part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15, part16], type$.JSArray_nullable_String); - A._validateArgList("join", parts); - return this.joinAll$1(new A.WhereTypeIterable(parts, type$.WhereTypeIterable_String)); - }, - join$2(_, part1, part2) { - var _null = null; - return this.join$16(0, part1, part2, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); - }, - joinAll$1(parts) { - var t1, t2, t3, needsSeparator, isAbsoluteAndNotRootRelative, t4, t5, parsed, path; - for (t1 = J.where$1$ax(parts, new A.Context_joinAll_closure()), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new A.WhereIterator(t2, t1._f), t3 = this.style, needsSeparator = false, isAbsoluteAndNotRootRelative = false, t4 = ""; t1.moveNext$0();) { - t5 = t2.get$current(t2); - if (t3.isRootRelative$1(t5) && isAbsoluteAndNotRootRelative) { - parsed = A.ParsedPath_ParsedPath$parse(t5, t3); - path = t4.charCodeAt(0) == 0 ? t4 : t4; - t4 = B.JSString_methods.substring$2(path, 0, t3.rootLength$2$withDrive(path, true)); - parsed.root = t4; - if (t3.needsSeparator$1(t4)) - parsed.separators[0] = t3.get$separator(t3); - t4 = "" + parsed.toString$0(0); - } else if (t3.rootLength$1(t5) > 0) { - isAbsoluteAndNotRootRelative = !t3.isRootRelative$1(t5); - t4 = "" + t5; - } else { - if (!(t5.length !== 0 && t3.containsSeparator$1(t5[0]))) - if (needsSeparator) - t4 += t3.get$separator(t3); - t4 += t5; - } - needsSeparator = t3.needsSeparator$1(t5); - } - return t4.charCodeAt(0) == 0 ? t4 : t4; - }, - split$1(_, path) { - var parsed = A.ParsedPath_ParsedPath$parse(path, this.style), - t1 = parsed.parts, - t2 = A._arrayInstanceType(t1)._eval$1("WhereIterable<1>"); - t2 = A.List_List$of(new A.WhereIterable(t1, new A.Context_split_closure(), t2), true, t2._eval$1("Iterable.E")); - parsed.parts = t2; - t1 = parsed.root; - if (t1 != null) - B.JSArray_methods.insert$2(t2, 0, t1); - return parsed.parts; - }, - canonicalize$1(_, path) { - var t1, parsed; - path = this.absolute$1(path); - t1 = this.style; - if (t1 !== $.$get$Style_windows() && !this._needsNormalization$1(path)) - return path; - parsed = A.ParsedPath_ParsedPath$parse(path, t1); - parsed.normalize$1$canonicalize(true); - return parsed.toString$0(0); - }, - normalize$1(path) { - var parsed; - if (!this._needsNormalization$1(path)) - return path; - parsed = A.ParsedPath_ParsedPath$parse(path, this.style); - parsed.normalize$0(); - return parsed.toString$0(0); - }, - _needsNormalization$1(path) { - var i, start, previous, t2, t3, previousPrevious, codeUnit, t4, - t1 = this.style, - root = t1.rootLength$1(path); - if (root !== 0) { - if (t1 === $.$get$Style_windows()) - for (i = 0; i < root; ++i) - if (path.charCodeAt(i) === 47) - return true; - start = root; - previous = 47; - } else { - start = 0; - previous = null; - } - for (t2 = new A.CodeUnits(path)._string, t3 = t2.length, i = start, previousPrevious = null; i < t3; ++i, previousPrevious = previous, previous = codeUnit) { - codeUnit = t2.charCodeAt(i); - if (t1.isSeparator$1(codeUnit)) { - if (t1 === $.$get$Style_windows() && codeUnit === 47) - return true; - if (previous != null && t1.isSeparator$1(previous)) - return true; - if (previous === 46) - t4 = previousPrevious == null || previousPrevious === 46 || t1.isSeparator$1(previousPrevious); - else - t4 = false; - if (t4) - return true; - } - } - if (previous == null) - return true; - if (t1.isSeparator$1(previous)) - return true; - if (previous === 46) - t1 = previousPrevious == null || t1.isSeparator$1(previousPrevious) || previousPrevious === 46; - else - t1 = false; - if (t1) - return true; - return false; - }, - relative$2$from(path, from) { - var fromParsed, pathParsed, t2, t3, _this = this, - _s26_ = 'Unable to find a path to "', - t1 = from == null; - if (t1 && _this.style.rootLength$1(path) <= 0) - return _this.normalize$1(path); - if (t1) { - t1 = _this._context$_current; - from = t1 == null ? A.current() : t1; - } else - from = _this.absolute$1(from); - t1 = _this.style; - if (t1.rootLength$1(from) <= 0 && t1.rootLength$1(path) > 0) - return _this.normalize$1(path); - if (t1.rootLength$1(path) <= 0 || t1.isRootRelative$1(path)) - path = _this.absolute$1(path); - if (t1.rootLength$1(path) <= 0 && t1.rootLength$1(from) > 0) - throw A.wrapException(A.PathException$(_s26_ + path + '" from "' + from + '".')); - fromParsed = A.ParsedPath_ParsedPath$parse(from, t1); - fromParsed.normalize$0(); - pathParsed = A.ParsedPath_ParsedPath$parse(path, t1); - pathParsed.normalize$0(); - t2 = fromParsed.parts; - if (t2.length !== 0 && J.$eq$(t2[0], ".")) - return pathParsed.toString$0(0); - t2 = fromParsed.root; - t3 = pathParsed.root; - if (t2 != t3) - t2 = t2 == null || t3 == null || !t1.pathsEqual$2(t2, t3); - else - t2 = false; - if (t2) - return pathParsed.toString$0(0); - while (true) { - t2 = fromParsed.parts; - if (t2.length !== 0) { - t3 = pathParsed.parts; - t2 = t3.length !== 0 && t1.pathsEqual$2(t2[0], t3[0]); - } else - t2 = false; - if (!t2) - break; - B.JSArray_methods.removeAt$1(fromParsed.parts, 0); - B.JSArray_methods.removeAt$1(fromParsed.separators, 1); - B.JSArray_methods.removeAt$1(pathParsed.parts, 0); - B.JSArray_methods.removeAt$1(pathParsed.separators, 1); - } - t2 = fromParsed.parts; - if (t2.length !== 0 && J.$eq$(t2[0], "..")) - throw A.wrapException(A.PathException$(_s26_ + path + '" from "' + from + '".')); - t2 = type$.String; - B.JSArray_methods.insertAll$2(pathParsed.parts, 0, A.List_List$filled(fromParsed.parts.length, "..", false, t2)); - t3 = pathParsed.separators; - t3[0] = ""; - B.JSArray_methods.insertAll$2(t3, 1, A.List_List$filled(fromParsed.parts.length, t1.get$separator(t1), false, t2)); - t1 = pathParsed.parts; - t2 = t1.length; - if (t2 === 0) - return "."; - if (t2 > 1 && J.$eq$(B.JSArray_methods.get$last(t1), ".")) { - B.JSArray_methods.removeLast$0(pathParsed.parts); - t1 = pathParsed.separators; - t1.pop(); - t1.pop(); - t1.push(""); - } - pathParsed.root = ""; - pathParsed.removeTrailingSeparators$0(); - return pathParsed.toString$0(0); - }, - relative$1(path) { - return this.relative$2$from(path, null); - }, - _isWithinOrEquals$2($parent, child) { - var relative, t1, parentIsAbsolute, childIsAbsolute, childIsRootRelative, parentIsRootRelative, result, exception, _this = this; - $parent = $parent; - child = child; - t1 = _this.style; - parentIsAbsolute = t1.rootLength$1($parent) > 0; - childIsAbsolute = t1.rootLength$1(child) > 0; - if (parentIsAbsolute && !childIsAbsolute) { - child = _this.absolute$1(child); - if (t1.isRootRelative$1($parent)) - $parent = _this.absolute$1($parent); - } else if (childIsAbsolute && !parentIsAbsolute) { - $parent = _this.absolute$1($parent); - if (t1.isRootRelative$1(child)) - child = _this.absolute$1(child); - } else if (childIsAbsolute && parentIsAbsolute) { - childIsRootRelative = t1.isRootRelative$1(child); - parentIsRootRelative = t1.isRootRelative$1($parent); - if (childIsRootRelative && !parentIsRootRelative) - child = _this.absolute$1(child); - else if (parentIsRootRelative && !childIsRootRelative) - $parent = _this.absolute$1($parent); - } - result = _this._isWithinOrEqualsFast$2($parent, child); - if (result !== B._PathRelation_inconclusive) - return result; - relative = null; - try { - relative = _this.relative$2$from(child, $parent); - } catch (exception) { - if (A.unwrapException(exception) instanceof A.PathException) - return B._PathRelation_different; - else - throw exception; - } - if (t1.rootLength$1(relative) > 0) - return B._PathRelation_different; - if (J.$eq$(relative, ".")) - return B._PathRelation_equal; - if (J.$eq$(relative, "..")) - return B._PathRelation_different; - return J.get$length$asx(relative) >= 3 && J.startsWith$1$s(relative, "..") && t1.isSeparator$1(J.codeUnitAt$1$s(relative, 2)) ? B._PathRelation_different : B._PathRelation_within; - }, - _isWithinOrEqualsFast$2($parent, child) { - var t1, parentRootLength, childRootLength, i, t2, t3, childIndex, parentIndex, lastCodeUnit, lastParentSeparator, parentCodeUnit, childCodeUnit, parentIndex0, direction, _this = this; - if ($parent === ".") - $parent = ""; - t1 = _this.style; - parentRootLength = t1.rootLength$1($parent); - childRootLength = t1.rootLength$1(child); - if (parentRootLength !== childRootLength) - return B._PathRelation_different; - for (i = 0; i < parentRootLength; ++i) - if (!t1.codeUnitsEqual$2($parent.charCodeAt(i), child.charCodeAt(i))) - return B._PathRelation_different; - t2 = child.length; - t3 = $parent.length; - childIndex = childRootLength; - parentIndex = parentRootLength; - lastCodeUnit = 47; - lastParentSeparator = null; - while (true) { - if (!(parentIndex < t3 && childIndex < t2)) - break; - c$0: { - parentCodeUnit = $parent.charCodeAt(parentIndex); - childCodeUnit = child.charCodeAt(childIndex); - if (t1.codeUnitsEqual$2(parentCodeUnit, childCodeUnit)) { - if (t1.isSeparator$1(parentCodeUnit)) - lastParentSeparator = parentIndex; - ++parentIndex; - ++childIndex; - lastCodeUnit = parentCodeUnit; - break c$0; - } - if (t1.isSeparator$1(parentCodeUnit) && t1.isSeparator$1(lastCodeUnit)) { - parentIndex0 = parentIndex + 1; - lastParentSeparator = parentIndex; - parentIndex = parentIndex0; - break c$0; - } else if (t1.isSeparator$1(childCodeUnit) && t1.isSeparator$1(lastCodeUnit)) { - ++childIndex; - break c$0; - } - if (parentCodeUnit === 46 && t1.isSeparator$1(lastCodeUnit)) { - ++parentIndex; - if (parentIndex === t3) - break; - parentCodeUnit = $parent.charCodeAt(parentIndex); - if (t1.isSeparator$1(parentCodeUnit)) { - parentIndex0 = parentIndex + 1; - lastParentSeparator = parentIndex; - parentIndex = parentIndex0; - break c$0; - } - if (parentCodeUnit === 46) { - ++parentIndex; - if (parentIndex === t3 || t1.isSeparator$1($parent.charCodeAt(parentIndex))) - return B._PathRelation_inconclusive; - } - } - if (childCodeUnit === 46 && t1.isSeparator$1(lastCodeUnit)) { - ++childIndex; - if (childIndex === t2) - break; - childCodeUnit = child.charCodeAt(childIndex); - if (t1.isSeparator$1(childCodeUnit)) { - ++childIndex; - break c$0; - } - if (childCodeUnit === 46) { - ++childIndex; - if (childIndex === t2 || t1.isSeparator$1(child.charCodeAt(childIndex))) - return B._PathRelation_inconclusive; - } - } - if (_this._pathDirection$2(child, childIndex) !== B._PathDirection_yLX) - return B._PathRelation_inconclusive; - if (_this._pathDirection$2($parent, parentIndex) !== B._PathDirection_yLX) - return B._PathRelation_inconclusive; - return B._PathRelation_different; - } - } - if (childIndex === t2) { - if (parentIndex === t3 || t1.isSeparator$1($parent.charCodeAt(parentIndex))) - lastParentSeparator = parentIndex; - else if (lastParentSeparator == null) - lastParentSeparator = Math.max(0, parentRootLength - 1); - direction = _this._pathDirection$2($parent, lastParentSeparator); - if (direction === B._PathDirection_8OV) - return B._PathRelation_equal; - return direction === B._PathDirection_3KU ? B._PathRelation_inconclusive : B._PathRelation_different; - } - direction = _this._pathDirection$2(child, childIndex); - if (direction === B._PathDirection_8OV) - return B._PathRelation_equal; - if (direction === B._PathDirection_3KU) - return B._PathRelation_inconclusive; - return t1.isSeparator$1(child.charCodeAt(childIndex)) || t1.isSeparator$1(lastCodeUnit) ? B._PathRelation_within : B._PathRelation_different; - }, - _pathDirection$2(path, index) { - var t1, t2, i, depth, reachedRoot, i0, t3; - for (t1 = path.length, t2 = this.style, i = index, depth = 0, reachedRoot = false; i < t1;) { - while (true) { - if (!(i < t1 && t2.isSeparator$1(path.charCodeAt(i)))) - break; - ++i; - } - if (i === t1) - break; - i0 = i; - while (true) { - if (!(i0 < t1 && !t2.isSeparator$1(path.charCodeAt(i0)))) - break; - ++i0; - } - t3 = i0 - i; - if (!(t3 === 1 && path.charCodeAt(i) === 46)) - if (t3 === 2 && path.charCodeAt(i) === 46 && path.charCodeAt(i + 1) === 46) { - --depth; - if (depth < 0) - break; - if (depth === 0) - reachedRoot = true; - } else - ++depth; - if (i0 === t1) - break; - i = i0 + 1; - } - if (depth < 0) - return B._PathDirection_3KU; - if (depth === 0) - return B._PathDirection_8OV; - if (reachedRoot) - return B._PathDirection_e7w; - return B._PathDirection_yLX; - }, - hash$1(path) { - var result, parsed, t1, _this = this; - path = _this.absolute$1(path); - result = _this._hashFast$1(path); - if (result != null) - return result; - parsed = A.ParsedPath_ParsedPath$parse(path, _this.style); - parsed.normalize$0(); - t1 = _this._hashFast$1(parsed.toString$0(0)); - t1.toString; - return t1; - }, - _hashFast$1(path) { - var t1, t2, hash, beginning, wasSeparator, i, codeUnit, t3, next; - for (t1 = path.length, t2 = this.style, hash = 4603, beginning = true, wasSeparator = true, i = 0; i < t1; ++i) { - codeUnit = t2.canonicalizeCodeUnit$1(path.charCodeAt(i)); - if (t2.isSeparator$1(codeUnit)) { - wasSeparator = true; - continue; - } - if (codeUnit === 46 && wasSeparator) { - t3 = i + 1; - if (t3 === t1) - break; - next = path.charCodeAt(t3); - if (t2.isSeparator$1(next)) - continue; - t3 = false; - if (!beginning) - if (next === 46) { - t3 = i + 2; - t3 = t3 === t1 || t2.isSeparator$1(path.charCodeAt(t3)); - } - if (t3) - return null; - } - hash = ((hash & 67108863) * 33 ^ codeUnit) >>> 0; - beginning = false; - wasSeparator = false; - } - return hash; - }, - withoutExtension$1(path) { - var i, - parsed = A.ParsedPath_ParsedPath$parse(path, this.style); - for (i = parsed.parts.length - 1; i >= 0; --i) - if (J.get$length$asx(parsed.parts[i]) !== 0) { - parsed.parts[i] = parsed._splitExtension$0()[0]; - break; - } - return parsed.toString$0(0); - }, - toUri$1(path) { - var t2, - t1 = this.style; - if (t1.rootLength$1(path) <= 0) - return t1.relativePathToUri$1(path); - else { - t2 = this._context$_current; - return t1.absolutePathToUri$1(this.join$2(0, t2 == null ? A.current() : t2, path)); - } - }, - prettyUri$1(uri) { - var path, rel, _this = this, - typedUri = A._parseUri(uri); - if (typedUri.get$scheme() === "file" && _this.style === $.$get$Style_url()) - return typedUri.toString$0(0); - else if (typedUri.get$scheme() !== "file" && typedUri.get$scheme() !== "" && _this.style !== $.$get$Style_url()) - return typedUri.toString$0(0); - path = _this.normalize$1(_this.style.pathFromUri$1(A._parseUri(typedUri))); - rel = _this.relative$1(path); - return _this.split$1(0, rel).length > _this.split$1(0, path).length ? path : rel; - } - }; - A.Context_joinAll_closure.prototype = { - call$1(part) { - return part !== ""; - }, - $signature: 5 - }; - A.Context_split_closure.prototype = { - call$1(part) { - return part.length !== 0; - }, - $signature: 5 - }; - A._validateArgList_closure.prototype = { - call$1(arg) { - return arg == null ? "null" : '"' + arg + '"'; - }, - $signature: 669 - }; - A._PathDirection.prototype = { - toString$0(_) { - return this.name; - } - }; - A._PathRelation.prototype = { - toString$0(_) { - return this.name; - } - }; - A.InternalStyle.prototype = { - getRoot$1(path) { - var $length = this.rootLength$1(path); - if ($length > 0) - return B.JSString_methods.substring$2(path, 0, $length); - return this.isRootRelative$1(path) ? path[0] : null; - }, - relativePathToUri$1(path) { - var segments, _null = null, - t1 = path.length; - if (t1 === 0) - return A._Uri__Uri(_null, _null, _null, _null); - segments = A.Context_Context(this).split$1(0, path); - if (this.isSeparator$1(path.charCodeAt(t1 - 1))) - B.JSArray_methods.add$1(segments, ""); - return A._Uri__Uri(_null, _null, segments, _null); - }, - codeUnitsEqual$2(codeUnit1, codeUnit2) { - return codeUnit1 === codeUnit2; - }, - pathsEqual$2(path1, path2) { - return path1 === path2; - }, - canonicalizeCodeUnit$1(codeUnit) { - return codeUnit; - }, - canonicalizePart$1(part) { - return part; - } - }; - A.ParsedPath.prototype = { - get$basename() { - var _this = this, - t1 = type$.String, - copy = new A.ParsedPath(_this.style, _this.root, _this.isRootRelative, A.List_List$from(_this.parts, true, t1), A.List_List$from(_this.separators, true, t1)); - copy.removeTrailingSeparators$0(); - t1 = copy.parts; - if (t1.length === 0) { - t1 = _this.root; - return t1 == null ? "" : t1; - } - return B.JSArray_methods.get$last(t1); - }, - get$hasTrailingSeparator() { - var t1 = this.parts; - if (t1.length !== 0) - t1 = J.$eq$(B.JSArray_methods.get$last(t1), "") || !J.$eq$(B.JSArray_methods.get$last(this.separators), ""); - else - t1 = false; - return t1; - }, - removeTrailingSeparators$0() { - var t1, t2, _this = this; - while (true) { - t1 = _this.parts; - if (!(t1.length !== 0 && J.$eq$(B.JSArray_methods.get$last(t1), ""))) - break; - B.JSArray_methods.removeLast$0(_this.parts); - _this.separators.pop(); - } - t1 = _this.separators; - t2 = t1.length; - if (t2 !== 0) - t1[t2 - 1] = ""; - }, - normalize$1$canonicalize(canonicalize) { - var t1, t2, t3, leadingDoubles, _i, part, t4, _this = this, - newParts = A._setArrayType([], type$.JSArray_String); - for (t1 = _this.parts, t2 = t1.length, t3 = _this.style, leadingDoubles = 0, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - part = t1[_i]; - t4 = J.getInterceptor$(part); - if (!(t4.$eq(part, ".") || t4.$eq(part, ""))) - if (t4.$eq(part, "..")) - if (newParts.length !== 0) - newParts.pop(); - else - ++leadingDoubles; - else - newParts.push(canonicalize ? t3.canonicalizePart$1(part) : part); - } - if (_this.root == null) - B.JSArray_methods.insertAll$2(newParts, 0, A.List_List$filled(leadingDoubles, "..", false, type$.String)); - if (newParts.length === 0 && _this.root == null) - newParts.push("."); - _this.parts = newParts; - _this.separators = A.List_List$filled(newParts.length + 1, t3.get$separator(t3), true, type$.String); - t1 = _this.root; - if (t1 == null || newParts.length === 0 || !t3.needsSeparator$1(t1)) - _this.separators[0] = ""; - t1 = _this.root; - if (t1 != null && t3 === $.$get$Style_windows()) { - if (canonicalize) - t1 = _this.root = t1.toLowerCase(); - t1.toString; - _this.root = A.stringReplaceAllUnchecked(t1, "/", "\\"); - } - _this.removeTrailingSeparators$0(); - }, - normalize$0() { - return this.normalize$1$canonicalize(false); - }, - toString$0(_) { - var i, _this = this, - t1 = _this.root; - t1 = t1 != null ? "" + t1 : ""; - for (i = 0; i < _this.parts.length; ++i) - t1 = t1 + A.S(_this.separators[i]) + A.S(_this.parts[i]); - t1 += A.S(B.JSArray_methods.get$last(_this.separators)); - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _kthLastIndexOf$3(path, character, k) { - var index, count, leftMostIndexedCharacter; - for (index = path.length - 1, count = 0, leftMostIndexedCharacter = 0; index >= 0; --index) - if (path[index] === character) { - ++count; - if (count === k) - return index; - leftMostIndexedCharacter = index; - } - return leftMostIndexedCharacter; - }, - _splitExtension$1(level) { - var t1, file, lastDot; - if (level <= 0) - throw A.wrapException(A.RangeError$value(level, "level", "level's value must be greater than 0")); - t1 = this.parts; - t1 = new A.CastList(t1, A._arrayInstanceType(t1)._eval$1("CastList<1,String?>")); - file = t1.lastWhere$2$orElse(t1, new A.ParsedPath__splitExtension_closure(), new A.ParsedPath__splitExtension_closure0()); - if (file == null) - return A._setArrayType(["", ""], type$.JSArray_String); - if (file === "..") - return A._setArrayType(["..", ""], type$.JSArray_String); - lastDot = this._kthLastIndexOf$3(file, ".", level); - if (lastDot <= 0) - return A._setArrayType([file, ""], type$.JSArray_String); - return A._setArrayType([B.JSString_methods.substring$2(file, 0, lastDot), B.JSString_methods.substring$1(file, lastDot)], type$.JSArray_String); - }, - _splitExtension$0() { - return this._splitExtension$1(1); - } - }; - A.ParsedPath__splitExtension_closure.prototype = { - call$1(p) { - return p !== ""; - }, - $signature: 186 - }; - A.ParsedPath__splitExtension_closure0.prototype = { - call$0() { - return null; - }, - $signature: 1 - }; - A.PathException.prototype = { - toString$0(_) { - return "PathException: " + this.message; - }, - $isException: 1, - get$message(receiver) { - return this.message; - } - }; - A.PathMap.prototype = {}; - A.PathMap__create_closure.prototype = { - call$2(path1, path2) { - if (path1 == null) - return path2 == null; - if (path2 == null) - return false; - return this._box_0.context._isWithinOrEquals$2(path1, path2) === B._PathRelation_equal; - }, - $signature: 383 - }; - A.PathMap__create_closure0.prototype = { - call$1(path) { - return path == null ? 0 : this._box_0.context.hash$1(path); - }, - $signature: 399 - }; - A.PathMap__create_closure1.prototype = { - call$1(path) { - return typeof path == "string" || path == null; - }, - $signature: 168 - }; - A.Style.prototype = { - toString$0(_) { - return this.get$name(this); - } - }; - A.PosixStyle.prototype = { - containsSeparator$1(path) { - return B.JSString_methods.contains$1(path, "/"); - }, - isSeparator$1(codeUnit) { - return codeUnit === 47; - }, - needsSeparator$1(path) { - var t1 = path.length; - return t1 !== 0 && path.charCodeAt(t1 - 1) !== 47; - }, - rootLength$2$withDrive(path, withDrive) { - if (path.length !== 0 && path.charCodeAt(0) === 47) - return 1; - return 0; - }, - rootLength$1(path) { - return this.rootLength$2$withDrive(path, false); - }, - isRootRelative$1(path) { - return false; - }, - pathFromUri$1(uri) { - var t1; - if (uri.get$scheme() === "" || uri.get$scheme() === "file") { - t1 = uri.get$path(uri); - return A._Uri__uriDecode(t1, 0, t1.length, B.C_Utf8Codec, false); - } - throw A.wrapException(A.ArgumentError$("Uri " + uri.toString$0(0) + " must have scheme 'file:'.", null)); - }, - absolutePathToUri$1(path) { - var parsed = A.ParsedPath_ParsedPath$parse(path, this), - t1 = parsed.parts; - if (t1.length === 0) - B.JSArray_methods.addAll$1(t1, A._setArrayType(["", ""], type$.JSArray_String)); - else if (parsed.get$hasTrailingSeparator()) - B.JSArray_methods.add$1(parsed.parts, ""); - return A._Uri__Uri(null, null, parsed.parts, "file"); - }, - get$name() { - return "posix"; - }, - get$separator() { - return "/"; - } - }; - A.UrlStyle.prototype = { - containsSeparator$1(path) { - return B.JSString_methods.contains$1(path, "/"); - }, - isSeparator$1(codeUnit) { - return codeUnit === 47; - }, - needsSeparator$1(path) { - var t1 = path.length; - if (t1 === 0) - return false; - if (path.charCodeAt(t1 - 1) !== 47) - return true; - return B.JSString_methods.endsWith$1(path, "://") && this.rootLength$1(path) === t1; - }, - rootLength$2$withDrive(path, withDrive) { - var i, codeUnit, index, - t1 = path.length; - if (t1 === 0) - return 0; - if (path.charCodeAt(0) === 47) - return 1; - for (i = 0; i < t1; ++i) { - codeUnit = path.charCodeAt(i); - if (codeUnit === 47) - return 0; - if (codeUnit === 58) { - if (i === 0) - return 0; - index = B.JSString_methods.indexOf$2(path, "/", B.JSString_methods.startsWith$2(path, "//", i + 1) ? i + 3 : i); - if (index <= 0) - return t1; - if (!withDrive || t1 < index + 3) - return index; - if (!B.JSString_methods.startsWith$1(path, "file://")) - return index; - t1 = A.driveLetterEnd(path, index + 1); - return t1 == null ? index : t1; - } - } - return 0; - }, - rootLength$1(path) { - return this.rootLength$2$withDrive(path, false); - }, - isRootRelative$1(path) { - return path.length !== 0 && path.charCodeAt(0) === 47; - }, - pathFromUri$1(uri) { - return uri.toString$0(0); - }, - relativePathToUri$1(path) { - return A.Uri_parse(path); - }, - absolutePathToUri$1(path) { - return A.Uri_parse(path); - }, - get$name() { - return "url"; - }, - get$separator() { - return "/"; - } - }; - A.WindowsStyle.prototype = { - containsSeparator$1(path) { - return B.JSString_methods.contains$1(path, "/"); - }, - isSeparator$1(codeUnit) { - return codeUnit === 47 || codeUnit === 92; - }, - needsSeparator$1(path) { - var t1 = path.length; - if (t1 === 0) - return false; - t1 = path.charCodeAt(t1 - 1); - return !(t1 === 47 || t1 === 92); - }, - rootLength$2$withDrive(path, withDrive) { - var index, - t1 = path.length; - if (t1 === 0) - return 0; - if (path.charCodeAt(0) === 47) - return 1; - if (path.charCodeAt(0) === 92) { - if (t1 < 2 || path.charCodeAt(1) !== 92) - return 1; - index = B.JSString_methods.indexOf$2(path, "\\", 2); - if (index > 0) { - index = B.JSString_methods.indexOf$2(path, "\\", index + 1); - if (index > 0) - return index; - } - return t1; - } - if (t1 < 3) - return 0; - if (!A.isAlphabetic(path.charCodeAt(0))) - return 0; - if (path.charCodeAt(1) !== 58) - return 0; - t1 = path.charCodeAt(2); - if (!(t1 === 47 || t1 === 92)) - return 0; - return 3; - }, - rootLength$1(path) { - return this.rootLength$2$withDrive(path, false); - }, - isRootRelative$1(path) { - return this.rootLength$1(path) === 1; - }, - pathFromUri$1(uri) { - var path, t1; - if (uri.get$scheme() !== "" && uri.get$scheme() !== "file") - throw A.wrapException(A.ArgumentError$("Uri " + uri.toString$0(0) + " must have scheme 'file:'.", null)); - path = uri.get$path(uri); - if (uri.get$host() === "") { - if (path.length >= 3 && B.JSString_methods.startsWith$1(path, "/") && A.driveLetterEnd(path, 1) != null) - path = B.JSString_methods.replaceFirst$2(path, "/", ""); - } else - path = "\\\\" + uri.get$host() + path; - t1 = A.stringReplaceAllUnchecked(path, "/", "\\"); - return A._Uri__uriDecode(t1, 0, t1.length, B.C_Utf8Codec, false); - }, - absolutePathToUri$1(path) { - var rootParts, t2, - parsed = A.ParsedPath_ParsedPath$parse(path, this), - t1 = parsed.root; - t1.toString; - if (B.JSString_methods.startsWith$1(t1, "\\\\")) { - rootParts = new A.WhereIterable(A._setArrayType(t1.split("\\"), type$.JSArray_String), new A.WindowsStyle_absolutePathToUri_closure(), type$.WhereIterable_String); - B.JSArray_methods.insert$2(parsed.parts, 0, rootParts.get$last(0)); - if (parsed.get$hasTrailingSeparator()) - B.JSArray_methods.add$1(parsed.parts, ""); - return A._Uri__Uri(rootParts.get$first(0), null, parsed.parts, "file"); - } else { - if (parsed.parts.length === 0 || parsed.get$hasTrailingSeparator()) - B.JSArray_methods.add$1(parsed.parts, ""); - t1 = parsed.parts; - t2 = parsed.root; - t2.toString; - t2 = A.stringReplaceAllUnchecked(t2, "/", ""); - B.JSArray_methods.insert$2(t1, 0, A.stringReplaceAllUnchecked(t2, "\\", "")); - return A._Uri__Uri(null, null, parsed.parts, "file"); - } - }, - codeUnitsEqual$2(codeUnit1, codeUnit2) { - var upperCase1; - if (codeUnit1 === codeUnit2) - return true; - if (codeUnit1 === 47) - return codeUnit2 === 92; - if (codeUnit1 === 92) - return codeUnit2 === 47; - if ((codeUnit1 ^ codeUnit2) !== 32) - return false; - upperCase1 = codeUnit1 | 32; - return upperCase1 >= 97 && upperCase1 <= 122; - }, - pathsEqual$2(path1, path2) { - var t1, i; - if (path1 === path2) - return true; - t1 = path1.length; - if (t1 !== path2.length) - return false; - for (i = 0; i < t1; ++i) - if (!this.codeUnitsEqual$2(path1.charCodeAt(i), path2.charCodeAt(i))) - return false; - return true; - }, - canonicalizeCodeUnit$1(codeUnit) { - if (codeUnit === 47) - return 92; - if (codeUnit < 65) - return codeUnit; - if (codeUnit > 90) - return codeUnit; - return codeUnit | 32; - }, - canonicalizePart$1(part) { - return part.toLowerCase(); - }, - get$name() { - return "windows"; - }, - get$separator() { - return "\\"; - } - }; - A.WindowsStyle_absolutePathToUri_closure.prototype = { - call$1(part) { - return part !== ""; - }, - $signature: 5 - }; - A.Version.prototype = { - get$min() { - return this; - }, - get$max() { - return this; - }, - get$includeMin() { - return true; - }, - get$includeMax() { - return true; - }, - $eq(_, other) { - var _this = this; - if (other == null) - return false; - return other instanceof A.Version && _this.major === other.major && _this.minor === other.minor && _this.patch === other.patch && B.C_IterableEquality.equals$2(0, _this.preRelease, other.preRelease) && B.C_IterableEquality.equals$2(0, _this.build, other.build); - }, - get$hashCode(_) { - var _this = this; - return (_this.major ^ _this.minor ^ _this.patch ^ B.C_IterableEquality.hash$1(_this.preRelease) ^ B.C_IterableEquality.hash$1(_this.build)) >>> 0; - }, - compareTo$1(_, other) { - var t1, t2, t3, comparison, _this = this; - if (other instanceof A.Version) { - t1 = _this.major; - t2 = other.major; - if (t1 !== t2) - return B.JSInt_methods.compareTo$1(t1, t2); - t1 = _this.minor; - t2 = other.minor; - if (t1 !== t2) - return B.JSInt_methods.compareTo$1(t1, t2); - t1 = _this.patch; - t2 = other.patch; - if (t1 !== t2) - return B.JSInt_methods.compareTo$1(t1, t2); - t1 = _this.preRelease; - t2 = t1.length === 0; - if (t2 && other.preRelease.length !== 0) - return 1; - t3 = other.preRelease; - if (t3.length === 0 && !t2) - return -1; - comparison = _this._compareLists$2(t1, t3); - if (comparison !== 0) - return comparison; - t1 = _this.build; - t2 = t1.length === 0; - if (t2 && other.build.length !== 0) - return -1; - t3 = other.build; - if (t3.length === 0 && !t2) - return 1; - return _this._compareLists$2(t1, t3); - } else - return -other.compareTo$1(0, _this); - }, - toString$0(_) { - return this._version$_text; - }, - _compareLists$2(a, b) { - var i, t1, t2, aPart, bPart; - for (i = 0; t1 = a.length, t2 = b.length, i < Math.max(t1, t2); ++i) { - aPart = i < t1 ? a[i] : null; - bPart = i < t2 ? b[i] : null; - if (J.$eq$(aPart, bPart)) - continue; - if (aPart == null) - return -1; - if (bPart == null) - return 1; - if (typeof aPart == "number") - if (typeof bPart == "number") - return B.JSNumber_methods.compareTo$1(aPart, bPart); - else - return -1; - else if (typeof bPart == "number") - return 1; - else { - A._asString(aPart); - A._asString(bPart); - if (aPart === bPart) - t1 = 0; - else - t1 = aPart < bPart ? -1 : 1; - return t1; - } - } - return 0; - }, - $isComparable: 1, - $isVersionRange: 1 - }; - A.Version__splitParts_closure.prototype = { - call$1(part) { - var t1 = A.Primitives_parseInt(part, null); - return t1 == null ? part : t1; - }, - $signature: 491 - }; - A.VersionRange.prototype = { - $eq(_, other) { - var t1; - if (other == null) - return false; - if (!type$.VersionRange._is(other)) - return false; - t1 = false; - if (this.min == other.get$min()) - if (J.$eq$(this.max, other.get$max())) { - t1 = !other.get$includeMin(); - if (t1) - other.get$includeMax(); - } - return t1; - }, - get$hashCode(_) { - var t1 = B.JSNull_methods.get$hashCode(this.min), - t2 = J.get$hashCode$(this.max); - return (t1 ^ t2 * 3 ^ 1090795 ^ 3633126) >>> 0; - }, - allows$1(other) { - var t1 = this.max; - if (t1 != null) - if (other.compareTo$1(0, t1) > 0) - return false; - return true; - }, - compareTo$1(_, other) { - if (other.get$min() == null) - return this._compareMax$1(other); - return -1; - }, - _compareMax$1(other) { - var t2, result, - t1 = this.max; - if (t1 == null) { - if (other.get$max() == null) - return 0; - return 1; - } else if (other.get$max() == null) - return -1; - t2 = other.get$max(); - t2.toString; - result = t1.compareTo$1(0, t2); - if (result !== 0) - return result; - other.get$includeMax(); - return 0; - }, - toString$0(_) { - var t2, - max = this.max, - t1 = max == null; - if (!t1) - t2 = "" + "<=" + max.toString$0(0); - else - t2 = ""; - t1 = t1 ? t2 + "any" : t2; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - $isComparable: 1, - get$min() { - return this.min; - }, - get$max() { - return this.max; - }, - get$includeMin() { - return this.includeMin; - }, - get$includeMax() { - return this.includeMax; - } - }; - A.CssMediaQuery.prototype = { - merge$1(other) { - var t1, ourModifier, t2, t3, ourType, t4, theirModifier, t5, t6, theirType, t7, t8, negativeConditions, conditions, type, modifier, fewerConditions, fewerConditions0, moreConditions, _this = this, _null = null, _s3_ = "all"; - if (!_this.conjunction || !other.conjunction) - return B._SingletonCssMediaQueryMergeResult_1; - t1 = _this.modifier; - ourModifier = t1 == null ? _null : t1.toLowerCase(); - t2 = _this.type; - t3 = t2 == null; - ourType = t3 ? _null : t2.toLowerCase(); - t4 = other.modifier; - theirModifier = t4 == null ? _null : t4.toLowerCase(); - t5 = other.type; - t6 = t5 == null; - theirType = t6 ? _null : t5.toLowerCase(); - t7 = ourType == null; - if (t7 && theirType == null) { - t1 = A.List_List$of(_this.conditions, true, type$.String); - B.JSArray_methods.addAll$1(t1, other.conditions); - return new A.MediaQuerySuccessfulMergeResult(A.CssMediaQuery$condition(t1, true)); - } - t8 = ourModifier === "not"; - if (t8 !== (theirModifier === "not")) { - if (ourType == theirType) { - negativeConditions = t8 ? _this.conditions : other.conditions; - if (B.JSArray_methods.every$1(negativeConditions, B.JSArray_methods.get$contains(t8 ? other.conditions : _this.conditions))) - return B._SingletonCssMediaQueryMergeResult_0; - else - return B._SingletonCssMediaQueryMergeResult_1; - } else if (t3 || A.equalsIgnoreCase(t2, _s3_) || t6 || A.equalsIgnoreCase(t5, _s3_)) - return B._SingletonCssMediaQueryMergeResult_1; - if (t8) { - conditions = other.conditions; - type = theirType; - modifier = theirModifier; - } else { - conditions = _this.conditions; - type = ourType; - modifier = ourModifier; - } - } else if (t8) { - if (ourType != theirType) - return B._SingletonCssMediaQueryMergeResult_1; - fewerConditions = _this.conditions; - fewerConditions0 = other.conditions; - t3 = fewerConditions.length > fewerConditions0.length; - moreConditions = t3 ? fewerConditions : fewerConditions0; - if (t3) - fewerConditions = fewerConditions0; - if (!B.JSArray_methods.every$1(fewerConditions, B.JSArray_methods.get$contains(moreConditions))) - return B._SingletonCssMediaQueryMergeResult_1; - conditions = moreConditions; - type = ourType; - modifier = ourModifier; - } else if (t3 || A.equalsIgnoreCase(t2, _s3_)) { - type = (t6 || A.equalsIgnoreCase(t5, _s3_)) && t7 ? _null : theirType; - t3 = A.List_List$of(_this.conditions, true, type$.String); - B.JSArray_methods.addAll$1(t3, other.conditions); - conditions = t3; - modifier = theirModifier; - } else { - if (t6 || A.equalsIgnoreCase(t5, _s3_)) { - t3 = A.List_List$of(_this.conditions, true, type$.String); - B.JSArray_methods.addAll$1(t3, other.conditions); - conditions = t3; - modifier = ourModifier; - } else { - if (ourType != theirType) - return B._SingletonCssMediaQueryMergeResult_0; - else { - modifier = ourModifier == null ? theirModifier : ourModifier; - t3 = A.List_List$of(_this.conditions, true, type$.String); - B.JSArray_methods.addAll$1(t3, other.conditions); - } - conditions = t3; - } - type = ourType; - } - t2 = type == ourType ? t2 : t5; - return new A.MediaQuerySuccessfulMergeResult(A.CssMediaQuery$type(t2, conditions, modifier == ourModifier ? t1 : t4)); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.CssMediaQuery && other.modifier == this.modifier && other.type == this.type && B.C_ListEquality.equals$2(0, other.conditions, this.conditions); - }, - get$hashCode(_) { - return J.get$hashCode$(this.modifier) ^ J.get$hashCode$(this.type) ^ B.C_ListEquality0.hash$1(this.conditions); - }, - toString$0(_) { - var t2, _this = this, - t1 = _this.modifier; - t1 = t1 != null ? "" + (t1 + " ") : ""; - t2 = _this.type; - if (t2 != null) { - t1 += t2; - if (_this.conditions.length !== 0) - t1 += " and "; - } - t2 = _this.conjunction ? " and " : " or "; - t2 = t1 + B.JSArray_methods.join$1(_this.conditions, t2); - return t2.charCodeAt(0) == 0 ? t2 : t2; - } - }; - A._SingletonCssMediaQueryMergeResult.prototype = { - _enumToString$0() { - return "_SingletonCssMediaQueryMergeResult." + this._name; - } - }; - A.MediaQuerySuccessfulMergeResult.prototype = { - toString$0(_) { - return this.query.toString$0(0); - } - }; - A.ModifiableCssAtRule.prototype = { - accept$1$1(visitor) { - return visitor.visitCssAtRule$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - equalsIgnoringChildren$1(other) { - var t1, t2; - if (other instanceof A.ModifiableCssAtRule) { - t1 = this.name; - t2 = other.name; - t1 = t1.$ti._is(t2) && J.$eq$(t2.value, t1.value) && J.$eq$(this.value, other.value) && this.isChildless === other.isChildless; - } else - t1 = false; - return t1; - }, - copyWithoutChildren$0() { - var _this = this; - return A.ModifiableCssAtRule$(_this.name, _this.span, _this.isChildless, _this.value); - }, - addChild$1(child) { - this.super$ModifiableCssParentNode$addChild(child); - }, - get$isChildless() { - return this.isChildless; - }, - get$span(receiver) { - return this.span; - } - }; - A.ModifiableCssComment.prototype = { - accept$1$1(visitor) { - return visitor.visitCssComment$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - $isCssComment: 1, - get$span(receiver) { - return this.span; - } - }; - A.ModifiableCssDeclaration.prototype = { - accept$1$1(visitor) { - return visitor.visitCssDeclaration$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.name.toString$0(0) + ": " + this.value.toString$0(0) + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.ModifiableCssImport.prototype = { - accept$1$1(visitor) { - return visitor.visitCssImport$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - get$span(receiver) { - return this.span; - } - }; - A.ModifiableCssKeyframeBlock.prototype = { - accept$1$1(visitor) { - return visitor.visitCssKeyframeBlock$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - equalsIgnoringChildren$1(other) { - return other instanceof A.ModifiableCssKeyframeBlock && B.C_ListEquality.equals$2(0, this.selector.value, other.selector.value); - }, - copyWithoutChildren$0() { - return A.ModifiableCssKeyframeBlock$(this.selector, this.span); - }, - get$span(receiver) { - return this.span; - } - }; - A.ModifiableCssMediaRule.prototype = { - accept$1$1(visitor) { - return visitor.visitCssMediaRule$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - equalsIgnoringChildren$1(other) { - return other instanceof A.ModifiableCssMediaRule && B.C_ListEquality.equals$2(0, this.queries, other.queries); - }, - copyWithoutChildren$0() { - return A.ModifiableCssMediaRule$(this.queries, this.span); - }, - get$span(receiver) { - return this.span; - } - }; - A.ModifiableCssNode.prototype = { - get$parent(_) { - return this._parent; - }, - get$hasFollowingSibling() { - var t2, - t1 = this._parent; - if (t1 == null) - t1 = null; - else { - t1 = t1.children; - t2 = this._indexInParent; - t2.toString; - t1 = A.SubListIterable$(t1, t2 + 1, null, t1.$ti._eval$1("ListBase.E")).any$1(0, new A.ModifiableCssNode_hasFollowingSibling_closure()); - } - return t1 === true; - }, - get$isGroupEnd() { - return this.isGroupEnd; - } - }; - A.ModifiableCssNode_hasFollowingSibling_closure.prototype = { - call$1(sibling) { - return !sibling.accept$1(B._IsInvisibleVisitor_true_false); - }, - $signature: 348 - }; - A.ModifiableCssParentNode.prototype = { - get$isChildless() { - return false; - }, - addChild$1(child) { - var t1; - child._parent = this; - t1 = this._children; - child._indexInParent = t1.length; - t1.push(child); - }, - clearChildren$0() { - var t1, t2, _i, child; - for (t1 = this._children, t2 = t1.length, _i = 0; _i < t2; ++_i) { - child = t1[_i]; - child._indexInParent = child._parent = null; - } - B.JSArray_methods.clear$0(t1); - }, - $isCssParentNode: 1, - get$children(receiver) { - return this.children; - } - }; - A.ModifiableCssStyleRule.prototype = { - accept$1$1(visitor) { - return visitor.visitCssStyleRule$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - equalsIgnoringChildren$1(other) { - var t1; - if (other instanceof A.ModifiableCssStyleRule) - t1 = B.C_ListEquality.equals$2(0, other._style_rule$_selector._box$_inner.value.components, this._style_rule$_selector._box$_inner.value.components); - else - t1 = false; - return t1; - }, - copyWithoutChildren$0() { - return A.ModifiableCssStyleRule$(this._style_rule$_selector, this.span, false, this.originalSelector); - }, - $isCssStyleRule: 1, - get$span(receiver) { - return this.span; - } - }; - A.ModifiableCssStylesheet.prototype = { - accept$1$1(visitor) { - return visitor.visitCssStylesheet$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - equalsIgnoringChildren$1(other) { - return other instanceof A.ModifiableCssStylesheet; - }, - copyWithoutChildren$0() { - return A.ModifiableCssStylesheet$(this.span); - }, - $isCssStylesheet: 1, - get$span(receiver) { - return this.span; - } - }; - A.ModifiableCssSupportsRule.prototype = { - accept$1$1(visitor) { - return visitor.visitCssSupportsRule$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - equalsIgnoringChildren$1(other) { - var t1, t2; - if (other instanceof A.ModifiableCssSupportsRule) { - t1 = this.condition; - t2 = other.condition; - t1 = t1.$ti._is(t2) && J.$eq$(t2.value, t1.value); - } else - t1 = false; - return t1; - }, - copyWithoutChildren$0() { - return A.ModifiableCssSupportsRule$(this.condition, this.span); - }, - get$span(receiver) { - return this.span; - } - }; - A.CssNode.prototype = { - toString$0(_) { - var _null = null; - return A.serialize(this, true, _null, true, _null, _null, false, _null, true)._0; - }, - $isAstNode: 1 - }; - A.CssParentNode.prototype = {}; - A._IsInvisibleVisitor.prototype = { - visitCssAtRule$1(rule) { - return false; - }, - visitCssComment$1(comment) { - return this.includeComments && comment.text.charCodeAt(2) !== 33; - }, - visitCssStyleRule$1(rule) { - var t1 = rule._style_rule$_selector._box$_inner; - return (this.includeBogus ? t1.value.accept$1(B._IsInvisibleVisitor_true) : t1.value.accept$1(B._IsInvisibleVisitor_false)) || this.super$EveryCssVisitor$visitCssStyleRule(rule); - } - }; - A.__IsInvisibleVisitor_Object_EveryCssVisitor.prototype = {}; - A.CssStylesheet.prototype = { - get$parent(_) { - return null; - }, - get$isGroupEnd() { - return false; - }, - get$isChildless() { - return false; - }, - accept$1$1(visitor) { - return visitor.visitCssStylesheet$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - get$children(receiver) { - return this.children; - }, - get$span(receiver) { - return this.span; - } - }; - A.CssValue.prototype = { - $eq(_, other) { - if (other == null) - return false; - return this.$ti._is(other) && J.$eq$(other.value, this.value); - }, - get$hashCode(_) { - return J.get$hashCode$(this.value); - }, - toString$0(_) { - return J.toString$0$(this.value); - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A._FakeAstNode.prototype = { - get$span(_) { - return this._callback.call$0(); - }, - $isAstNode: 1 - }; - A.Argument.prototype = { - toString$0(_) { - var t1 = this.defaultValue, - t2 = this.name; - return t1 == null ? t2 : t2 + ": " + t1.toString$0(0); - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.ArgumentDeclaration.prototype = { - get$spanWithName() { - var t3, t4, - t1 = this.span, - t2 = t1.file, - text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, 0, null), 0, null), - i = A.FileLocation$_(t2, t1._file$_start).offset - 1; - while (true) { - if (i > 0) { - t3 = text.charCodeAt(i); - t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; - } else - t3 = false; - if (!t3) - break; - --i; - } - t3 = text.charCodeAt(i); - if (!(t3 === 95 || A.CharacterExtension_get_isAlphabetic(t3) || t3 >= 128)) - t3 = t3 >= 48 && t3 <= 57 || t3 === 45; - else - t3 = true; - if (!t3) - return t1; - --i; - while (true) { - if (i >= 0) { - t3 = text.charCodeAt(i); - if (t3 !== 95) { - if (!(t3 >= 97 && t3 <= 122)) - t4 = t3 >= 65 && t3 <= 90; - else - t4 = true; - t4 = t4 || t3 >= 128; - } else - t4 = true; - if (!t4) - t3 = t3 >= 48 && t3 <= 57 || t3 === 45; - else - t3 = true; - } else - t3 = false; - if (!t3) - break; - --i; - } - t3 = i + 1; - t4 = text.charCodeAt(t3); - if (!(t4 === 95 || A.CharacterExtension_get_isAlphabetic(t4) || t4 >= 128)) - return t1; - return A.SpanExtensions_trimRight(A.SpanExtensions_trimLeft(t2.span$2(0, t3, A.FileLocation$_(t2, t1._end).offset))); - }, - verify$2(positional, names) { - var t1, t2, t3, namedUsed, i, argument, t4, unknownNames, _this = this, - _s10_ = "invocation", - _s8_ = "argument"; - for (t1 = _this.$arguments, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { - argument = t1[i]; - if (i < positional) { - t4 = argument.name; - if (t3.containsKey$1(t4)) - throw A.wrapException(A.SassScriptException$("Argument " + _this._originalArgumentName$1(t4) + string$.x20was_p, null)); - } else { - t4 = argument.name; - if (t3.containsKey$1(t4)) - ++namedUsed; - else if (argument.defaultValue == null) - throw A.wrapException(A.MultiSpanSassScriptException$("Missing argument " + _this._originalArgumentName$1(t4) + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); - } - } - if (_this.restArgument != null) - return; - if (positional > t2) { - t1 = names.get$isEmpty(0) ? "" : "positional "; - throw A.wrapException(A.MultiSpanSassScriptException$("Only " + t2 + " " + t1 + A.pluralize(_s8_, t2, null) + " allowed, but " + positional + " " + A.pluralize("was", positional, "were") + " passed.", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); - } - if (namedUsed < t3.get$length(t3)) { - t2 = type$.String; - unknownNames = A.LinkedHashSet_LinkedHashSet$of(names, t2); - unknownNames.removeAll$1(new A.MappedListIterable(t1, new A.ArgumentDeclaration_verify_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object?>"))); - throw A.wrapException(A.MultiSpanSassScriptException$("No " + A.pluralize(_s8_, unknownNames._collection$_length, null) + " named " + A.toSentence(unknownNames.map$1$1(0, new A.ArgumentDeclaration_verify_closure0(), type$.Object), "or") + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, t2))); - } - }, - _originalArgumentName$1($name) { - var t1, text, t2, _i, argument, t3, end; - if ($name === this.restArgument) { - t1 = this.span; - text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, null); - return B.JSString_methods.substring$2(B.JSString_methods.substring$1(text, B.JSString_methods.lastIndexOf$1(text, "$")), 0, B.JSString_methods.indexOf$1(text, ".")); - } - for (t1 = this.$arguments, t2 = t1.length, _i = 0; _i < t2; ++_i) { - argument = t1[_i]; - if (argument.name === $name) { - t1 = argument.defaultValue; - t2 = argument.span; - if (t1 == null) { - t1 = t2._file$_start; - t3 = t2.file._decodedChars; - t3 = A.String_String$fromCharCodes(new Uint32Array(t3.subarray(t1, A._checkValidRange(t1, t2._end, t3.length))), 0, null); - t1 = t3; - } else { - text = t2.get$text(); - t1 = B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")); - end = A._lastNonWhitespace(t1, false); - t1 = end == null ? "" : B.JSString_methods.substring$2(t1, 0, end + 1); - } - return t1; - } - } - throw A.wrapException(A.ArgumentError$(string$.This_d + $name + '".', null)); - }, - matches$2(positional, names) { - var t1, t2, t3, namedUsed, i, argument; - for (t1 = this.$arguments, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { - argument = t1[i]; - if (i < positional) { - if (t3.containsKey$1(argument.name)) - return false; - } else if (t3.containsKey$1(argument.name)) - ++namedUsed; - else if (argument.defaultValue == null) - return false; - } - if (this.restArgument != null) - return true; - if (positional > t2) - return false; - if (namedUsed < t3.get$length(t3)) - return false; - return true; - }, - toString$0(_) { - var t2, t3, _i, - t1 = A._setArrayType([], type$.JSArray_String); - for (t2 = this.$arguments, t3 = t2.length, _i = 0; _i < t3; ++_i) - t1.push("$" + A.S(t2[_i])); - t2 = this.restArgument; - if (t2 != null) - t1.push("$" + t2 + "..."); - return B.JSArray_methods.join$1(t1, ", "); - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.ArgumentDeclaration_verify_closure.prototype = { - call$1(argument) { - return argument.name; - }, - $signature: 353 - }; - A.ArgumentDeclaration_verify_closure0.prototype = { - call$1($name) { - return "$" + $name; - }, - $signature: 6 - }; - A.ArgumentInvocation.prototype = { - get$isEmpty(_) { - var t1; - if (this.positional.length === 0) { - t1 = this.named; - t1 = t1.get$isEmpty(t1) && this.rest == null; - } else - t1 = false; - return t1; - }, - toString$0(_) { - var t2, t3, _i, _1_0, _2_0, _this = this, - t1 = A._setArrayType([], type$.JSArray_String); - for (t2 = _this.positional, t3 = t2.length, _i = 0; _i < t3; ++_i) - t1.push(_this._parenthesizeArgument$1(t2[_i])); - for (t2 = A.MapExtensions_get_pairs(_this.named, type$.String, type$.Expression), t2 = t2.get$iterator(t2); t2.moveNext$0();) { - t3 = t2.get$current(t2); - t1.push("$" + t3._0 + ": " + _this._parenthesizeArgument$1(t3._1)); - } - _1_0 = _this.rest; - if (_1_0 != null) - t1.push(_this._parenthesizeArgument$1(_1_0) + "..."); - _2_0 = _this.keywordRest; - if (_2_0 != null) - t1.push(_this._parenthesizeArgument$1(_2_0) + "..."); - return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; - }, - _parenthesizeArgument$1(argument) { - var t1; - $label0$0: { - if (argument instanceof A.ListExpression && B.ListSeparator_ECn === argument.separator && !argument.hasBrackets && argument.contents.length >= 2) { - t1 = "(" + argument.toString$0(0) + ")"; - break $label0$0; - } - t1 = argument.toString$0(0); - break $label0$0; - } - return t1; - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.AtRootQuery.prototype = { - excludes$1(node) { - var t1, _this = this; - if (_this._all) - return !_this.include; - $label0$0: { - if (node instanceof A.ModifiableCssStyleRule) { - t1 = _this._at_root_query$_rule !== _this.include; - break $label0$0; - } - if (node instanceof A.ModifiableCssMediaRule) { - t1 = _this.excludesName$1("media"); - break $label0$0; - } - if (node instanceof A.ModifiableCssSupportsRule) { - t1 = _this.excludesName$1("supports"); - break $label0$0; - } - if (node instanceof A.ModifiableCssAtRule) { - t1 = _this.excludesName$1(node.name.value.toLowerCase()); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - excludesName$1($name) { - var t1 = this._all || this.names.contains$1(0, $name); - return t1 !== this.include; - } - }; - A.ConfiguredVariable.prototype = { - toString$0(_) { - var t1 = this.expression.toString$0(0), - t2 = this.isGuarded ? " !default" : ""; - return "$" + this.name + ": " + t1 + t2; - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.Expression.prototype = {$isAstNode: 1}; - A.BinaryOperationExpression.prototype = { - get$span(_) { - var right, - left = this.left; - for (; left instanceof A.BinaryOperationExpression;) - left = left.left; - right = this.right; - for (; right instanceof A.BinaryOperationExpression;) - right = right.right; - return left.get$span(left).expand$1(0, right.get$span(right)); - }, - get$operatorSpan() { - var t3, t4, - t1 = this.left, - t2 = t1.get$span(t1); - t2 = t2.get$file(t2); - t3 = this.right; - t4 = t3.get$span(t3); - if (t2 === t4.get$file(t4)) { - t2 = t1.get$span(t1); - t2 = t2.get$end(t2); - t4 = t3.get$span(t3); - t4 = t2.offset < t4.get$start(t4).offset; - t2 = t4; - } else - t2 = false; - if (t2) { - t2 = t1.get$span(t1); - t2 = t2.get$file(t2); - t1 = t1.get$span(t1); - t1 = t1.get$end(t1); - t3 = t3.get$span(t3); - t3 = A.SpanExtensions_trimRight(A.SpanExtensions_trimLeft(t2.span$2(0, t1.offset, t3.get$start(t3).offset))); - t1 = t3; - } else - t1 = this.get$span(0); - return t1; - }, - accept$1$1(visitor) { - return visitor.visitBinaryOperationExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1, t2, right, t3, operator, _this = this, - _0_0 = _this.left; - $label0$0: { - if (_0_0 instanceof A.BinaryOperationExpression) { - t1 = _0_0.operator.precedence < _this.operator.precedence; - break $label0$0; - } - if (_0_0 instanceof A.ListExpression && !_0_0.hasBrackets && _0_0.contents.length >= 2) { - t1 = true; - break $label0$0; - } - t1 = false; - break $label0$0; - } - t2 = t1 ? "" + A.Primitives_stringFromCharCode(40) : ""; - t2 += _0_0.toString$0(0); - t1 = t1 ? t2 + A.Primitives_stringFromCharCode(41) : t2; - t2 = _this.operator; - t1 = t1 + A.Primitives_stringFromCharCode(32) + t2.operator + A.Primitives_stringFromCharCode(32); - right = _this.right; - $label1$1: { - t3 = false; - if (right instanceof A.BinaryOperationExpression) { - operator = right.operator; - if (operator.precedence <= t2.precedence) { - t3 = !(operator === t2 && operator.isAssociative); - t2 = t3; - } else - t2 = t3; - break $label1$1; - } - if (right instanceof A.ListExpression && !right.hasBrackets && right.contents.length >= 2) { - t2 = true; - break $label1$1; - } - t2 = t3; - break $label1$1; - } - if (t2) - t1 += A.Primitives_stringFromCharCode(40); - t1 += right.toString$0(0); - if (t2) - t1 += A.Primitives_stringFromCharCode(41); - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - }; - A.BinaryOperator.prototype = { - _enumToString$0() { - return "BinaryOperator." + this._name; - }, - toString$0(_) { - return this.name; - } - }; - A.BooleanExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitBooleanExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return String(this.value); - }, - get$span(receiver) { - return this.span; - } - }; - A.ColorExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitColorExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return A.serializeValue(this.value, true, true); - }, - get$span(receiver) { - return this.span; - } - }; - A.FunctionExpression.prototype = { - get$nameSpan() { - if (this.namespace == null) - return A.SpanExtensions_initialIdentifier(this.span); - return A.SpanExtensions_initialIdentifier(A.FileSpanExtension_subspan(A.SpanExtensions_withoutInitialIdentifier(this.span), 1, null)); - }, - accept$1$1(visitor) { - return visitor.visitFunctionExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.namespace; - t1 = t1 != null ? "" + (t1 + ".") : ""; - t1 += this.originalName + this.$arguments.toString$0(0); - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - get$span(receiver) { - return this.span; - } - }; - A.IfExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitIfExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "if" + this.$arguments.toString$0(0); - }, - get$span(receiver) { - return this.span; - } - }; - A.InterpolatedFunctionExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitInterpolatedFunctionExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.name.toString$0(0) + this.$arguments.toString$0(0); - }, - get$span(receiver) { - return this.span; - } - }; - A.ListExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitListExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t2, t3, t4, t5, _this = this, - t1 = _this.hasBrackets; - if (t1) - t2 = "" + A.Primitives_stringFromCharCode(91); - else { - t2 = _this.contents.length; - if (t2 !== 0) - t2 = t2 === 1 && _this.separator === B.ListSeparator_ECn; - else - t2 = true; - t2 = t2 ? "" + A.Primitives_stringFromCharCode(40) : ""; - } - t3 = _this.contents; - t4 = _this.separator === B.ListSeparator_ECn; - t5 = t4 ? ", " : " "; - t5 = t2 + new A.MappedListIterable(t3, new A.ListExpression_toString_closure(_this), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,String>")).join$1(0, t5); - if (t1) - t1 = t5 + A.Primitives_stringFromCharCode(93); - else { - t1 = t3.length; - if (t1 === 0) - t1 = t5 + A.Primitives_stringFromCharCode(41); - else - t1 = t1 === 1 && t4 ? t5 + ",)" : t5; - } - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _list0$_elementNeedsParens$1(expression) { - var childSeparator, t1, _0_13; - $label0$0: { - if (expression instanceof A.ListExpression && expression.contents.length >= 2 && !expression.hasBrackets) { - childSeparator = expression.separator; - t1 = this.separator === B.ListSeparator_ECn ? childSeparator === B.ListSeparator_ECn : childSeparator !== B.ListSeparator_undecided_null_undecided; - break $label0$0; - } - if (expression instanceof A.UnaryOperationExpression) { - _0_13 = expression.operator; - if (B.UnaryOperator_cLp !== _0_13) - t1 = B.UnaryOperator_AiQ === _0_13; - else - t1 = true; - } else - t1 = false; - if (t1) { - t1 = this.separator === B.ListSeparator_nbm; - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - get$span(receiver) { - return this.span; - } - }; - A.ListExpression_toString_closure.prototype = { - call$1(element) { - return this.$this._list0$_elementNeedsParens$1(element) ? "(" + element.toString$0(0) + ")" : element.toString$0(0); - }, - $signature: 134 - }; - A.MapExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitMapExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t2, t3, _i, t4, key, value, - t1 = A._setArrayType([], type$.JSArray_String); - for (t2 = this.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { - t4 = t2[_i]; - key = t4._0; - value = t4._1; - t1.push(key.toString$0(0) + ": " + value.toString$0(0)); - } - return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; - }, - get$span(receiver) { - return this.span; - } - }; - A.NullExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitNullExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "null"; - }, - get$span(receiver) { - return this.span; - } - }; - A.NumberExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitNumberExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return A.serializeValue(A.SassNumber_SassNumber(this.value, this.unit), true, true); - }, - get$span(receiver) { - return this.span; - } - }; - A.ParenthesizedExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitParenthesizedExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "(" + this.expression.toString$0(0) + ")"; - }, - get$span(receiver) { - return this.span; - } - }; - A.SelectorExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitSelectorExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "&"; - }, - get$span(receiver) { - return this.span; - } - }; - A.StringExpression.prototype = { - get$span(_) { - return this.text.span; - }, - accept$1$1(visitor) { - return visitor.visitStringExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - asInterpolation$1$static($static) { - var t1, t2, quote, t3, t4, t5, buffer, t6, i, value, t7; - if (!this.hasQuotes) - return this.text; - t1 = this.text; - t2 = t1.contents; - quote = A.StringExpression__bestQuote(new A.WhereTypeIterable(t2, type$.WhereTypeIterable_String)); - t3 = new A.StringBuffer(""); - t4 = A._setArrayType([], type$.JSArray_Object); - t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); - buffer = new A.InterpolationBuffer(t3, t4, t5); - t6 = A.Primitives_stringFromCharCode(quote); - t3._contents += t6; - for (t6 = t2.length, i = 0; i < t6; ++i) { - value = t2[i]; - if (value instanceof A.Expression) { - t7 = t1.spanForElement$1(i); - buffer._flushText$0(); - t4.push(value); - t5.push(t7); - continue; - } - if (typeof value == "string") - A.StringExpression__quoteInnerText(value, quote, buffer, $static); - } - t2 = A.Primitives_stringFromCharCode(quote); - t3._contents += t2; - return buffer.interpolation$1(t1.span); - }, - asInterpolation$0() { - return this.asInterpolation$1$static(false); - }, - toString$0(_) { - return this.asInterpolation$0().toString$0(0); - } - }; - A.SupportsExpression.prototype = { - get$span(_) { - var t1 = this.condition; - return t1.get$span(t1); - }, - accept$1$1(visitor) { - return visitor.visitSupportsExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.condition.toString$0(0); - } - }; - A.UnaryOperationExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitUnaryOperationExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var operand, - t1 = this.operator, - t2 = t1.operator; - t1 = t1 === B.UnaryOperator_not_not_not ? t2 + A.Primitives_stringFromCharCode(32) : t2; - operand = this.operand; - $label0$0: { - t2 = true; - if (!(operand instanceof A.BinaryOperationExpression)) - if (!(operand instanceof A.UnaryOperationExpression)) - t2 = operand instanceof A.ListExpression && !operand.hasBrackets && operand.contents.length >= 2; - if (t2) - break $label0$0; - break $label0$0; - } - if (t2) - t1 += "40"; - t1 += operand.toString$0(0); - if (t2) - t1 += "41"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - get$span(receiver) { - return this.span; - } - }; - A.UnaryOperator.prototype = { - _enumToString$0() { - return "UnaryOperator." + this._name; - }, - toString$0(_) { - return this.name; - } - }; - A.ValueExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitValueExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.value.toString$0(0); - }, - get$span(receiver) { - return this.span; - } - }; - A.VariableExpression.prototype = { - accept$1$1(visitor) { - return visitor.visitVariableExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.span.get$text(); - }, - get$span(receiver) { - return this.span; - } - }; - A.DynamicImport.prototype = { - toString$0(_) { - return A.StringExpression_quoteText(this.urlString); - }, - $isAstNode: 1, - $isImport: 1, - get$span(receiver) { - return this.span; - } - }; - A.StaticImport.prototype = { - toString$0(_) { - var t1 = this.url.toString$0(0), - t2 = this.modifiers; - return t1 + (t2 == null ? "" : " " + t2.toString$0(0)); - }, - $isAstNode: 1, - $isImport: 1, - get$span(receiver) { - return this.span; - } - }; - A.Interpolation.prototype = { - get$asPlain() { - var _0_1, t1, _0_6_isSet, _0_6, _0_60, first, - _0_0 = this.contents; - $label0$0: { - _0_1 = _0_0.length; - if (_0_1 <= 0) { - t1 = ""; - break $label0$0; - } - _0_6_isSet = _0_1 === 1; - _0_6 = null; - if (_0_6_isSet) { - _0_60 = _0_0[0]; - t1 = _0_60; - _0_6 = t1; - t1 = typeof t1 == "string"; - } else - t1 = false; - if (t1) { - first = A._asString(_0_6_isSet ? _0_6 : _0_0[0]); - t1 = first; - break $label0$0; - } - t1 = null; - break $label0$0; - } - return t1; - }, - get$initialPlain() { - var _0_4_isSet, _0_4, _0_40, t1, first, - _0_0 = this.contents; - $label0$0: { - _0_4_isSet = _0_0.length >= 1; - _0_4 = null; - if (_0_4_isSet) { - _0_40 = _0_0[0]; - t1 = _0_40; - _0_4 = t1; - t1 = typeof t1 == "string"; - } else - t1 = false; - if (t1) { - first = A._asString(_0_4_isSet ? _0_4 : _0_0[0]); - t1 = first; - break $label0$0; - } - t1 = ""; - break $label0$0; - } - return t1; - }, - spanForElement$1(index) { - var t1, t2, t3, t4, _this = this; - $label0$0: { - if (typeof _this.contents[index] == "string") { - t1 = _this.span; - t2 = t1.file; - if (index === 0) - t3 = A.FileLocation$_(t2, t1._file$_start); - else { - t3 = _this.spans[index - 1]; - t3.toString; - t3 = J.get$end$z(t3); - } - t4 = _this.spans; - if (index === t4.length) - t1 = A.FileLocation$_(t2, t1._end); - else { - t1 = t4[index + 1]; - t1.toString; - t1 = J.get$start$z(t1); - } - t1 = t2.span$2(0, t3.offset, t1.offset); - break $label0$0; - } - t1 = _this.spans[index]; - t1.toString; - break $label0$0; - } - return t1; - }, - Interpolation$3(contents, spans, span) { - var t1, t2, t3, t4, i, t5, isString, _s5_ = "spans", - _s8_ = "contents"; - if (spans.length !== J.get$length$asx(contents)) - throw A.wrapException(A.ArgumentError$value(this.spans, _s5_, "Must be the same length as contents.")); - for (t1 = this.contents, t2 = t1.length, t3 = spans.length, t4 = this.spans, i = 0; i < t2; ++i) { - t5 = t1[i]; - isString = typeof t5 == "string"; - if (!isString && !(t5 instanceof A.Expression)) - throw A.wrapException(A.ArgumentError$value(t1, _s8_, "May only contain Strings or Expressions.")); - else if (isString) { - if (i !== 0 && typeof t1[i - 1] == "string") - throw A.wrapException(A.ArgumentError$value(t1, _s8_, "May not contain adjacent Strings.")); - else if (i < t3 && t4[i] != null) - throw A.wrapException(A.ArgumentError$value(t4, _s5_, string$.May_no + i + ").")); - } else if (i >= t3 || t4[i] == null) - throw A.wrapException(A.ArgumentError$value(t4, _s5_, string$.Must_n + i + ").")); - } - }, - toString$0(_) { - var t1 = this.contents; - return new A.MappedListIterable(t1, new A.Interpolation_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.Interpolation_toString_closure.prototype = { - call$1(value) { - return typeof value == "string" ? value : "#{" + A.S(value) + "}"; - }, - $signature: 133 - }; - A.Statement.prototype = {$isAstNode: 1}; - A.AtRootRule.prototype = { - accept$1$1(visitor) { - return visitor.visitAtRootRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var buffer = new A.StringBuffer("@at-root "), - t1 = this.query; - if (t1 != null) - buffer._contents = "@at-root " + (t1.toString$0(0) + " "); - t1 = this.children; - return buffer.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.AtRule.prototype = { - accept$1$1(visitor) { - return visitor.visitAtRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var children, - t1 = "@" + this.name.toString$0(0), - buffer = new A.StringBuffer(t1), - t2 = this.value; - if (t2 != null) - buffer._contents = t1 + (" " + t2.toString$0(0)); - children = this.children; - return children == null ? buffer.toString$0(0) + ";" : buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(children, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.CallableDeclaration.prototype = { - get$span(receiver) { - return this.span; - } - }; - A.ContentBlock.prototype = { - accept$1$1(visitor) { - return visitor.visitContentBlock$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t2, - t1 = this.$arguments; - t1 = t1.$arguments.length === 0 && t1.restArgument == null ? "" : " using (" + t1.toString$0(0) + ")"; - t2 = this.children; - return t1 + (" {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"); - } - }; - A.ContentRule.prototype = { - accept$1$1(visitor) { - return visitor.visitContentRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.$arguments; - return t1.get$isEmpty(0) ? "@content;" : "@content(" + t1.toString$0(0) + ");"; - }, - get$span(receiver) { - return this.span; - } - }; - A.DebugRule.prototype = { - accept$1$1(visitor) { - return visitor.visitDebugRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "@debug " + this.expression.toString$0(0) + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.Declaration.prototype = { - accept$1$1(visitor) { - return visitor.visitDeclaration$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t3, _0_0, - buffer = new A.StringBuffer(""), - t1 = this.name, - t2 = "" + t1.toString$0(0); - buffer._contents = t2; - t2 = buffer._contents = t2 + A.Primitives_stringFromCharCode(58); - t3 = this.value; - if (t3 != null) { - t1 = !B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--") ? buffer._contents = t2 + A.Primitives_stringFromCharCode(32) : t2; - buffer._contents = t1 + t3.toString$0(0); - } - _0_0 = this.children; - if (_0_0 != null) - return buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(_0_0, " ") + "}"; - else - return buffer.toString$0(0) + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.EachRule.prototype = { - accept$1$1(visitor) { - return visitor.visitEachRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.variables, - t2 = this.children; - return "@each " + new A.MappedListIterable(t1, new A.EachRule_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + " in " + this.list.toString$0(0) + " {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.EachRule_toString_closure.prototype = { - call$1(variable) { - return "$" + variable; - }, - $signature: 6 - }; - A.ErrorRule.prototype = { - accept$1$1(visitor) { - return visitor.visitErrorRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "@error " + this.expression.toString$0(0) + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.ExtendRule.prototype = { - accept$1$1(visitor) { - return visitor.visitExtendRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.selector.toString$0(0), - t2 = this.isOptional ? " !optional" : ""; - return "@extend " + t1 + t2 + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.ForRule.prototype = { - accept$1$1(visitor) { - return visitor.visitForRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var _this = this, - t1 = _this.from.toString$0(0), - t2 = _this.isExclusive ? "to" : "through", - t3 = _this.children; - return "@for $" + _this.variable + " from " + t1 + " " + t2 + " " + _this.to.toString$0(0) + " {" + (t3 && B.JSArray_methods).join$1(t3, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.ForwardRule.prototype = { - accept$1$1(visitor) { - return visitor.visitForwardRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t2, prefix, _this = this, - t1 = "@forward " + A.StringExpression_quoteText(_this.url.toString$0(0)), - shownMixinsAndFunctions = _this.shownMixinsAndFunctions, - hiddenMixinsAndFunctions = _this.hiddenMixinsAndFunctions; - if (shownMixinsAndFunctions != null) { - t2 = _this.shownVariables; - t2.toString; - t2 = t1 + " show " + _this._forward_rule$_memberList$2(shownMixinsAndFunctions, t2); - t1 = t2; - } else if (hiddenMixinsAndFunctions != null && hiddenMixinsAndFunctions._base.get$isNotEmpty(0)) { - t2 = _this.hiddenVariables; - t2.toString; - t2 = t1 + " hide " + _this._forward_rule$_memberList$2(hiddenMixinsAndFunctions, t2); - t1 = t2; - } - prefix = _this.prefix; - if (prefix != null) - t1 += " as " + prefix + "*"; - t2 = _this.configuration; - t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _forward_rule$_memberList$2(mixinsAndFunctions, variables) { - var t2, - t1 = A.List_List$of(mixinsAndFunctions, true, type$.String); - for (t2 = variables._base.get$iterator(0); t2.moveNext$0();) - t1.push("$" + t2.get$current(0)); - return B.JSArray_methods.join$1(t1, ", "); - }, - get$span(receiver) { - return this.span; - } - }; - A.FunctionRule.prototype = { - accept$1$1(visitor) { - return visitor.visitFunctionRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.children; - return "@function " + this.name + "(" + this.$arguments.toString$0(0) + ") {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; - } - }; - A.IfRule.prototype = { - accept$1$1(visitor) { - return visitor.visitIfRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var result = A.ListExtensions_mapIndexed(this.clauses, new A.IfRule_toString_closure(), type$.IfClause, type$.String).join$1(0, " "), - lastClause = this.lastClause; - return lastClause != null ? result + (" " + lastClause.toString$0(0)) : result; - }, - get$span(receiver) { - return this.span; - } - }; - A.IfRule_toString_closure.prototype = { - call$2(index, clause) { - var t1 = index === 0 ? "if" : "else if"; - return "@" + t1 + " " + clause.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(clause.children, " ") + "}"; - }, - $signature: 443 - }; - A.IfRuleClause.prototype = {}; - A.IfRuleClause$__closure.prototype = { - call$1(child) { - var t1; - $label0$0: { - if (child instanceof A.VariableDeclaration || child instanceof A.FunctionRule || child instanceof A.MixinRule) { - t1 = true; - break $label0$0; - } - if (child instanceof A.ImportRule) { - t1 = B.JSArray_methods.any$1(child.imports, new A.IfRuleClause$___closure()); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - $signature: 155 - }; - A.IfRuleClause$___closure.prototype = { - call$1($import) { - return $import instanceof A.DynamicImport; - }, - $signature: 158 - }; - A.IfClause.prototype = { - toString$0(_) { - return "@if " + this.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; - } - }; - A.ElseClause.prototype = { - toString$0(_) { - return "@else {" + B.JSArray_methods.join$1(this.children, " ") + "}"; - } - }; - A.ImportRule.prototype = { - accept$1$1(visitor) { - return visitor.visitImportRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "@import " + B.JSArray_methods.join$1(this.imports, ", ") + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.IncludeRule.prototype = { - get$spanWithoutContent() { - var t2, t3, - t1 = this.span; - if (!(this.content == null)) { - t2 = t1.file; - t3 = this.$arguments.span; - t3 = A.SpanExtensions_trimRight(A.SpanExtensions_trimLeft(t2.span$2(0, A.FileLocation$_(t2, t1._file$_start).offset, t3.get$end(t3).offset))); - t1 = t3; - } - return t1; - }, - get$nameSpan() { - var startSpan, scanner, _null = null, - t1 = this.span, - t2 = t1._file$_start, - t3 = t1._end, - t4 = t1.file._decodedChars; - if (B.JSString_methods.startsWith$1(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4, t2, t3), 0, _null), "+")) - startSpan = A.SpanExtensions_trimLeft(A.FileSpanExtension_subspan(t1, 1, _null)); - else { - scanner = A.StringScanner$(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4, t2, t3), 0, _null), _null, _null); - scanner.expectChar$1(64); - A._scanIdentifier(scanner); - startSpan = A.SpanExtensions_trimLeft(A.FileSpanExtension_subspan(t1, scanner._string_scanner$_position, _null)); - } - return A.SpanExtensions_initialIdentifier(this.namespace != null ? A.FileSpanExtension_subspan(A.SpanExtensions_withoutInitialIdentifier(startSpan), 1, _null) : startSpan); - }, - accept$1$1(visitor) { - return visitor.visitIncludeRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t2, _this = this, - t1 = _this.namespace; - t1 = t1 != null ? "@include " + (t1 + ".") : "@include "; - t1 += _this.name; - t2 = _this.$arguments; - if (!t2.get$isEmpty(0)) - t1 += "(" + t2.toString$0(0) + ")"; - t2 = _this.content; - t1 += t2 == null ? ";" : " " + t2.toString$0(0); - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - get$span(receiver) { - return this.span; - } - }; - A.LoudComment.prototype = { - get$span(_) { - return this.text.span; - }, - accept$1$1(visitor) { - return visitor.visitLoudComment$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.text.toString$0(0); - } - }; - A.MediaRule.prototype = { - accept$1$1(visitor) { - return visitor.visitMediaRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.children; - return "@media " + this.query.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.MixinRule.prototype = { - get$hasContent() { - var result, _this = this, - value = _this.__MixinRule_hasContent_FI; - if (value === $) { - result = J.$eq$(B.C__HasContentVisitor.visitChildren$1(_this.children), true); - _this.__MixinRule_hasContent_FI !== $ && A.throwUnnamedLateFieldADI(); - _this.__MixinRule_hasContent_FI = result; - value = result; - } - return value; - }, - accept$1$1(visitor) { - return visitor.visitMixinRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = "@mixin " + this.name, - t2 = this.$arguments; - if (!(t2.$arguments.length === 0 && t2.restArgument == null)) - t1 += "(" + t2.toString$0(0) + ")"; - t2 = this.children; - t2 = t1 + (" {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"); - return t2.charCodeAt(0) == 0 ? t2 : t2; - } - }; - A._HasContentVisitor.prototype = { - visitContentRule$1(_, _0) { - return true; - } - }; - A.__HasContentVisitor_Object_StatementSearchVisitor.prototype = {}; - A.ParentStatement.prototype = {}; - A.ParentStatement_closure.prototype = { - call$1(child) { - var t1; - $label0$0: { - if (child instanceof A.VariableDeclaration || child instanceof A.FunctionRule || child instanceof A.MixinRule) { - t1 = true; - break $label0$0; - } - if (child instanceof A.ImportRule) { - t1 = B.JSArray_methods.any$1(child.imports, new A.ParentStatement__closure()); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - $signature: 155 - }; - A.ParentStatement__closure.prototype = { - call$1($import) { - return $import instanceof A.DynamicImport; - }, - $signature: 158 - }; - A.ReturnRule.prototype = { - accept$1$1(visitor) { - return visitor.visitReturnRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "@return " + this.expression.toString$0(0) + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.SilentComment.prototype = { - accept$1$1(visitor) { - return visitor.visitSilentComment$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.text; - }, - get$span(receiver) { - return this.span; - } - }; - A.StyleRule.prototype = { - accept$1$1(visitor) { - return visitor.visitStyleRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.children; - return this.selector.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.Stylesheet.prototype = { - Stylesheet$internal$5$globalVariables$plainCss(children, span, parseTimeWarnings, globalVariables, plainCss) { - var t1, t2, t3, t4, _i, child; - for (t1 = this.children, t2 = t1.length, t3 = this._forwards, t4 = this._uses, _i = 0; _i < t2; ++_i) { - child = t1[_i]; - if (child instanceof A.UseRule) { - t4.push(child); - continue; - } - if (child instanceof A.ForwardRule) { - t3.push(child); - continue; - } - if (child instanceof A.SilentComment || child instanceof A.LoudComment || child instanceof A.VariableDeclaration) - continue; - break; - } - }, - accept$1$1(visitor) { - return visitor.visitStylesheet$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.children; - return (t1 && B.JSArray_methods).join$1(t1, " "); - }, - get$span(receiver) { - return this.span; - } - }; - A.SupportsRule.prototype = { - accept$1$1(visitor) { - return visitor.visitSupportsRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.children; - return "@supports " + this.condition.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.UseRule.prototype = { - UseRule$4$configuration(url, namespace, span, configuration) { - var t1, t2, _i, variable; - for (t1 = this.configuration, t2 = t1.length, _i = 0; _i < t2; ++_i) { - variable = t1[_i]; - if (variable.isGuarded) - throw A.wrapException(A.ArgumentError$value(variable, "configured variable", "can't be guarded in a @use rule.")); - } - }, - accept$1$1(visitor) { - return visitor.visitUseRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.url, - t2 = "@use " + A.StringExpression_quoteText(t1.toString$0(0)), - basename = t1.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(t1.get$pathSegments()), - dot = B.JSString_methods.indexOf$1(basename, "."); - t1 = this.namespace; - if (t1 !== B.JSString_methods.substring$2(basename, 0, dot === -1 ? basename.length : dot)) - t1 = t2 + (" as " + (t1 == null ? "*" : t1)); - else - t1 = t2; - t2 = this.configuration; - t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - get$span(receiver) { - return this.span; - } - }; - A.VariableDeclaration.prototype = { - accept$1$1(visitor) { - return visitor.visitVariableDeclaration$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.namespace; - t1 = t1 != null ? "" + (t1 + ".") : ""; - t1 += "$" + this.name + ": " + this.expression.toString$0(0) + ";"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - get$span(receiver) { - return this.span; - } - }; - A.WarnRule.prototype = { - accept$1$1(visitor) { - return visitor.visitWarnRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "@warn " + this.expression.toString$0(0) + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.WhileRule.prototype = { - accept$1$1(visitor) { - return visitor.visitWhileRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.children; - return "@while " + this.condition.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.SupportsAnything.prototype = { - withSpan$1(span) { - return new A.SupportsAnything(this.contents, span); - }, - toString$0(_) { - return "(" + this.contents.toString$0(0) + ")"; - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.SupportsDeclaration.prototype = { - get$isCustomProperty() { - var t1, - _0_0 = this.name; - $label0$0: { - if (_0_0 instanceof A.StringExpression && !_0_0.hasQuotes) { - t1 = B.JSString_methods.startsWith$1(_0_0.text.get$initialPlain(), "--"); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - withSpan$1(span) { - return new A.SupportsDeclaration(this.name, this.value, span); - }, - toString$0(_) { - return "(" + this.name.toString$0(0) + ": " + this.value.toString$0(0) + ")"; - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.SupportsFunction.prototype = { - withSpan$1(span) { - return new A.SupportsFunction(this.name, this.$arguments, span); - }, - toString$0(_) { - return this.name.toString$0(0) + "(" + this.$arguments.toString$0(0) + ")"; - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.SupportsInterpolation.prototype = { - withSpan$1(span) { - return new A.SupportsInterpolation(this.expression, span); - }, - toString$0(_) { - return "#{" + this.expression.toString$0(0) + "}"; - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.SupportsNegation.prototype = { - withSpan$1(span) { - return new A.SupportsNegation(this.condition, span); - }, - toString$0(_) { - var t1 = this.condition; - if (t1 instanceof A.SupportsNegation || t1 instanceof A.SupportsOperation) - return "not (" + t1.toString$0(0) + ")"; - else - return "not " + t1.toString$0(0); - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.SupportsOperation.prototype = { - withSpan$1(span) { - return A.SupportsOperation$(this.left, this.right, this.operator, span); - }, - toString$0(_) { - var _this = this; - return _this._operation$_parenthesize$1(_this.left) + " " + _this.operator + " " + _this._operation$_parenthesize$1(_this.right); - }, - _operation$_parenthesize$1(condition) { - var t1; - if (!(condition instanceof A.SupportsNegation)) - t1 = condition instanceof A.SupportsOperation && condition.operator === this.operator; - else - t1 = true; - return t1 ? "(" + condition.toString$0(0) + ")" : condition.toString$0(0); - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.Selector.prototype = { - assertNotBogus$1$name($name) { - if (!this.accept$1(B._IsBogusVisitor_true)) - return; - A.warnForDeprecation("$" + $name + ": " + (this.toString$0(0) + string$.x20is_nov), B.Deprecation_C9i); - }, - toString$0(_) { - var _null = null, - visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); - this.accept$1(visitor); - return visitor._serialize$_buffer.toString$0(0); - }, - $isAstNode: 1, - get$span(receiver) { - return this.span; - } - }; - A._IsInvisibleVisitor0.prototype = { - visitSelectorList$1(list) { - return B.JSArray_methods.every$1(list.components, this.get$visitComplexSelector()); - }, - visitComplexSelector$1(complex) { - var t1; - if (!this.super$AnySelectorVisitor$visitComplexSelector(complex)) - t1 = this.includeBogus && complex.accept$1(B._IsBogusVisitor_false); - else - t1 = true; - return t1; - }, - visitPlaceholderSelector$1(placeholder) { - return true; - }, - visitPseudoSelector$1(pseudo) { - var t1, - _0_0 = pseudo.selector; - if (_0_0 != null) { - if (pseudo.name === "not") - t1 = this.includeBogus && _0_0.accept$1(B._IsBogusVisitor_true); - else - t1 = this.visitSelectorList$1(_0_0); - return t1; - } else - return false; - } - }; - A._IsBogusVisitor.prototype = { - visitComplexSelector$1(complex) { - var t2, - t1 = complex.components; - if (t1.length === 0) - return complex.leadingCombinators.length !== 0; - else { - t2 = this.includeLeadingCombinator ? 0 : 1; - return complex.leadingCombinators.length > t2 || B.JSArray_methods.get$last(t1).combinators.length !== 0 || B.JSArray_methods.any$1(t1, new A._IsBogusVisitor_visitComplexSelector_closure(this)); - } - }, - visitPseudoSelector$1(pseudo) { - var selector = pseudo.selector; - if (selector == null) - return false; - return pseudo.name === "has" ? selector.accept$1(B._IsBogusVisitor_false) : selector.accept$1(B._IsBogusVisitor_true); - } - }; - A._IsBogusVisitor_visitComplexSelector_closure.prototype = { - call$1(component) { - return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); - }, - $signature: 51 - }; - A._IsUselessVisitor.prototype = { - visitComplexSelector$1(complex) { - return complex.leadingCombinators.length > 1 || B.JSArray_methods.any$1(complex.components, new A._IsUselessVisitor_visitComplexSelector_closure(this)); - }, - visitPseudoSelector$1(pseudo) { - return pseudo.accept$1(B._IsBogusVisitor_true); - } - }; - A._IsUselessVisitor_visitComplexSelector_closure.prototype = { - call$1(component) { - return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); - }, - $signature: 51 - }; - A.__IsBogusVisitor_Object_AnySelectorVisitor.prototype = {}; - A.__IsInvisibleVisitor_Object_AnySelectorVisitor.prototype = {}; - A.__IsUselessVisitor_Object_AnySelectorVisitor.prototype = {}; - A.AttributeSelector.prototype = { - accept$1$1(visitor) { - return visitor.visitAttributeSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - $eq(_, other) { - var _this = this; - if (other == null) - return false; - return other instanceof A.AttributeSelector && other.name.$eq(0, _this.name) && other.op == _this.op && other.value == _this.value && other.modifier == _this.modifier; - }, - get$hashCode(_) { - var _this = this, - t1 = _this.name; - return (B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace) ^ J.get$hashCode$(_this.op) ^ J.get$hashCode$(_this.value) ^ J.get$hashCode$(_this.modifier)) >>> 0; - } - }; - A.AttributeOperator.prototype = { - _enumToString$0() { - return "AttributeOperator." + this._name; - }, - toString$0(_) { - return this._attribute$_text; - } - }; - A.ClassSelector.prototype = { - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.ClassSelector && other.name === this.name; - }, - accept$1$1(visitor) { - return visitor.visitClassSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - addSuffix$1(suffix) { - return new A.ClassSelector(this.name + suffix, this.span); - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this.name); - } - }; - A.Combinator.prototype = { - _enumToString$0() { - return "Combinator." + this._name; - }, - toString$0(_) { - return this._combinator$_text; - } - }; - A.ComplexSelector.prototype = { - get$specificity() { - var result, _this = this, - value = _this.__ComplexSelector_specificity_FI; - if (value === $) { - result = B.JSArray_methods.fold$2(_this.components, 0, new A.ComplexSelector_specificity_closure()); - _this.__ComplexSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); - _this.__ComplexSelector_specificity_FI = result; - value = result; - } - return value; - }, - get$singleCompound() { - var _0_0, t1, _0_4, t2, selector, _null = null; - if (this.leadingCombinators.length !== 0) - return _null; - _0_0 = this.components; - $label0$0: { - t1 = false; - if (_0_0.length === 1) { - _0_4 = _0_0[0]; - t2 = _0_4; - selector = t2.selector; - t1 = _0_4.combinators.length <= 0; - } else - selector = _null; - if (t1) { - t1 = selector; - break $label0$0; - } - t1 = _null; - break $label0$0; - } - return t1; - }, - accept$1$1(visitor) { - return visitor.visitComplexSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - isSuperselector$1(other) { - return this.leadingCombinators.length === 0 && other.leadingCombinators.length === 0 && A.complexIsSuperselector(this.components, other.components); - }, - withAdditionalCombinators$1(combinators) { - var _0_0, _0_1, t1, initial, last, _this = this; - if (combinators.length === 0) - return _this; - _0_0 = _this.components; - $label0$0: { - _0_1 = _0_0.length; - if (_0_1 >= 1) { - t1 = _0_1 - 1; - initial = B.JSArray_methods.sublist$2(_0_0, 0, t1); - last = _0_0[t1]; - t1 = A.List_List$of(initial, true, type$.ComplexSelectorComponent); - t1.push(last.withAdditionalCombinators$1(combinators)); - t1 = A.ComplexSelector$(_this.leadingCombinators, t1, _this.span, _this.lineBreak); - break $label0$0; - } - if (_0_1 <= 0) { - t1 = A.List_List$of(_this.leadingCombinators, true, type$.CssValue_Combinator); - B.JSArray_methods.addAll$1(t1, combinators); - t1 = A.ComplexSelector$(t1, B.List_empty2, _this.span, _this.lineBreak); - break $label0$0; - } - t1 = null; - } - return t1; - }, - concatenate$3$forceLineBreak(child, span, forceLineBreak) { - var t2, _0_1, initial, last, _this = this, - t1 = child.leadingCombinators, - _0_0 = _this.components; - if (t1.length === 0) { - t1 = A.List_List$of(_0_0, true, type$.ComplexSelectorComponent); - B.JSArray_methods.addAll$1(t1, child.components); - t2 = _this.lineBreak || child.lineBreak || forceLineBreak; - return A.ComplexSelector$(_this.leadingCombinators, t1, span, t2); - } else { - _0_1 = _0_0.length; - if (_0_1 >= 1) { - t2 = _0_1 - 1; - initial = B.JSArray_methods.sublist$2(_0_0, 0, t2); - last = _0_0[t2]; - t2 = A.List_List$of(initial, true, type$.ComplexSelectorComponent); - t2.push(last.withAdditionalCombinators$1(t1)); - B.JSArray_methods.addAll$1(t2, child.components); - t1 = _this.lineBreak || child.lineBreak || forceLineBreak; - return A.ComplexSelector$(_this.leadingCombinators, t2, span, t1); - } else { - t2 = A.List_List$of(_this.leadingCombinators, true, type$.CssValue_Combinator); - B.JSArray_methods.addAll$1(t2, t1); - t1 = _this.lineBreak || child.lineBreak || forceLineBreak; - return A.ComplexSelector$(t2, child.components, span, t1); - } - } - }, - concatenate$2(child, span) { - return this.concatenate$3$forceLineBreak(child, span, false); - }, - get$hashCode(_) { - return B.C_ListEquality0.hash$1(this.leadingCombinators) ^ B.C_ListEquality0.hash$1(this.components); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.ComplexSelector && B.C_ListEquality.equals$2(0, this.leadingCombinators, other.leadingCombinators) && B.C_ListEquality.equals$2(0, this.components, other.components); - } - }; - A.ComplexSelector_specificity_closure.prototype = { - call$2(sum, component) { - return sum + component.selector.get$specificity(); - }, - $signature: 344 - }; - A.ComplexSelectorComponent.prototype = { - withAdditionalCombinators$1(combinators) { - var t1, t2, _this = this; - if (combinators.length === 0) - t1 = _this; - else { - t1 = type$.CssValue_Combinator; - t2 = A.List_List$of(_this.combinators, true, t1); - B.JSArray_methods.addAll$1(t2, combinators); - t1 = new A.ComplexSelectorComponent(_this.selector, A.List_List$unmodifiable(t2, t1), _this.span); - } - return t1; - }, - get$hashCode(_) { - return B.C_ListEquality0.hash$1(this.selector.components) ^ B.C_ListEquality0.hash$1(this.combinators); - }, - $eq(_, other) { - var t1; - if (other == null) - return false; - if (other instanceof A.ComplexSelectorComponent) { - t1 = B.C_ListEquality.equals$2(0, this.selector.components, other.selector.components); - t1 = t1 && B.C_ListEquality.equals$2(0, this.combinators, other.combinators); - } else - t1 = false; - return t1; - }, - toString$0(_) { - var t1 = this.combinators; - return A.serializeSelector(this.selector, true) + new A.MappedListIterable(t1, new A.ComplexSelectorComponent_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ""); - } - }; - A.ComplexSelectorComponent_toString_closure.prototype = { - call$1(combinator) { - return " " + combinator.toString$0(0); - }, - $signature: 352 - }; - A.CompoundSelector.prototype = { - get$specificity() { - var result, _this = this, - value = _this.__CompoundSelector_specificity_FI; - if (value === $) { - result = B.JSArray_methods.fold$2(_this.components, 0, new A.CompoundSelector_specificity_closure()); - _this.__CompoundSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); - _this.__CompoundSelector_specificity_FI = result; - value = result; - } - return value; - }, - get$hasComplicatedSuperselectorSemantics() { - var result, _this = this, - value = _this.__CompoundSelector_hasComplicatedSuperselectorSemantics_FI; - if (value === $) { - result = B.JSArray_methods.any$1(_this.components, new A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure()); - _this.__CompoundSelector_hasComplicatedSuperselectorSemantics_FI !== $ && A.throwUnnamedLateFieldADI(); - _this.__CompoundSelector_hasComplicatedSuperselectorSemantics_FI = result; - value = result; - } - return value; - }, - accept$1$1(visitor) { - return visitor.visitCompoundSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - get$hashCode(_) { - return B.C_ListEquality0.hash$1(this.components); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.CompoundSelector && B.C_ListEquality.equals$2(0, this.components, other.components); - } - }; - A.CompoundSelector_specificity_closure.prototype = { - call$2(sum, component) { - return sum + component.get$specificity(); - }, - $signature: 371 - }; - A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure.prototype = { - call$1(component) { - return component.get$hasComplicatedSuperselectorSemantics(); - }, - $signature: 13 - }; - A.IDSelector.prototype = { - get$specificity() { - return A._asInt(Math.pow(A.SimpleSelector.prototype.get$specificity.call(this), 2)); - }, - accept$1$1(visitor) { - return visitor.visitIDSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - addSuffix$1(suffix) { - return new A.IDSelector(this.name + suffix, this.span); - }, - unify$1(compound) { - if (B.JSArray_methods.any$1(compound, new A.IDSelector_unify_closure(this))) - return null; - return this.super$SimpleSelector$unify(compound); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.IDSelector && other.name === this.name; - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this.name); - } - }; - A.IDSelector_unify_closure.prototype = { - call$1(simple) { - var t1; - if (simple instanceof A.IDSelector) - t1 = this.$this.name !== simple.name; - else - t1 = false; - return t1; - }, - $signature: 13 - }; - A.SelectorList.prototype = { - get$asSassList() { - var t1 = this.components; - return A.SassList$(new A.MappedListIterable(t1, new A.SelectorList_asSassList_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), B.ListSeparator_ECn, false); - }, - accept$1$1(visitor) { - return visitor.visitSelectorList$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - unify$1(other) { - var t3, t4, t5, t6, _i, complex1, _i0, t7, - t1 = type$.JSArray_ComplexSelector, - t2 = A._setArrayType([], t1); - for (t3 = this.components, t4 = t3.length, t5 = other.components, t6 = t5.length, _i = 0; _i < t4; ++_i) { - complex1 = t3[_i]; - for (_i0 = 0; _i0 < t6; ++_i0) { - t7 = A.unifyComplex(A._setArrayType([complex1, t5[_i0]], t1), complex1.span); - if (t7 != null) - B.JSArray_methods.addAll$1(t2, t7); - } - } - return t2.length === 0 ? null : A.SelectorList$(t2, this.span); - }, - nestWithin$3$implicitParent$preserveParentSelectors($parent, implicitParent, preserveParentSelectors) { - var parentSelector, t1, _this = this; - if ($parent == null) { - if (preserveParentSelectors) - return _this; - parentSelector = B.C__ParentSelectorVisitor.visitSelectorList$1(_this); - if (parentSelector == null) - return _this; - throw A.wrapException(A.SassException$(string$.Top_les, parentSelector.span, null)); - } - t1 = _this.components; - return A.SelectorList$(A.flattenVertically(new A.MappedListIterable(t1, new A.SelectorList_nestWithin_closure(_this, preserveParentSelectors, implicitParent, $parent), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Iterable>")), type$.ComplexSelector), _this.span); - }, - nestWithin$1($parent) { - return this.nestWithin$3$implicitParent$preserveParentSelectors($parent, true, false); - }, - nestWithin$2$implicitParent($parent, implicitParent) { - return this.nestWithin$3$implicitParent$preserveParentSelectors($parent, implicitParent, false); - }, - _nestWithinCompound$2(component, $parent) { - var resolvedSimples, parentSelector, error, stackTrace, t2, resolvedSimples0, exception, - t1 = component.selector, - simples = t1.components, - containsSelectorPseudo = J.any$1$ax(simples, new A.SelectorList__nestWithinCompound_closure()); - if (!containsSelectorPseudo && !(J.get$first$ax(simples) instanceof A.ParentSelector)) - return null; - if (containsSelectorPseudo) { - t2 = simples; - resolvedSimples0 = new A.MappedListIterable(t2, new A.SelectorList__nestWithinCompound_closure0($parent), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,SimpleSelector>")); - } else - resolvedSimples0 = simples; - resolvedSimples = resolvedSimples0; - parentSelector = J.get$first$ax(simples); - try { - if (!(parentSelector instanceof A.ParentSelector)) { - t2 = component.span; - t2 = A._setArrayType([A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(resolvedSimples, t1.span), A.List_List$unmodifiable(component.combinators, type$.CssValue_Combinator), t2)], type$.JSArray_ComplexSelectorComponent), t2, false)], type$.JSArray_ComplexSelector); - return t2; - } else if (J.get$length$asx(simples) === 1 && parentSelector.suffix == null) { - t1 = $parent.withAdditionalCombinators$1(component.combinators); - return t1.components; - } - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace(error.withAdditionalSpan$2(parentSelector.span, "parent selector"), error, stackTrace); - } else - throw exception; - } - t1 = $parent.components; - return new A.MappedListIterable(t1, new A.SelectorList__nestWithinCompound_closure1(parentSelector, resolvedSimples, component), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")); - }, - isSuperselector$1(other) { - return A.listIsSuperselector(this.components, other.components); - }, - withAdditionalCombinators$1(combinators) { - var t1; - if (combinators.length === 0) - t1 = this; - else { - t1 = this.components; - t1 = A.SelectorList$(new A.MappedListIterable(t1, new A.SelectorList_withAdditionalCombinators_closure(combinators), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")), this.span); - } - return t1; - }, - get$hashCode(_) { - return B.C_ListEquality0.hash$1(this.components); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.SelectorList && B.C_ListEquality.equals$2(0, this.components, other.components); - } - }; - A.SelectorList_asSassList_closure.prototype = { - call$1(complex) { - var t3, t4, _i, component, t5, visitor, t6, t7, _i0, _null = null, - t1 = type$.JSArray_Value, - t2 = A._setArrayType([], t1); - for (t3 = complex.leadingCombinators, t4 = t3.length, _i = 0; _i < t4; ++_i) - t2.push(new A.SassString(J.toString$0$(t3[_i].value), false)); - for (t3 = complex.components, t4 = t3.length, _i = 0; _i < t4; ++_i) { - component = t3[_i]; - t5 = component.selector; - visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); - t5.accept$1(visitor); - t5 = A._setArrayType([new A.SassString(visitor._serialize$_buffer.toString$0(0), false)], t1); - for (t6 = component.combinators, t7 = t6.length, _i0 = 0; _i0 < t7; ++_i0) - t5.push(new A.SassString(J.toString$0$(t6[_i0].value), false)); - B.JSArray_methods.addAll$1(t2, t5); - } - return A.SassList$(t2, B.ListSeparator_nbm, false); - }, - $signature: 402 - }; - A.SelectorList_nestWithin_closure.prototype = { - call$1(complex) { - var t1, newComplexes, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, _i, component, resolved, i, t12, t13, t14, _i0, newComplex, t15, _this = this; - if (_this.preserveParentSelectors || complex.accept$1(B.C__ParentSelectorVisitor) == null) { - if (!_this.implicitParent) - return A._setArrayType([complex], type$.JSArray_ComplexSelector); - t1 = _this.parent.components; - return new A.MappedListIterable(t1, new A.SelectorList_nestWithin__closure(complex), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")); - } - t1 = type$.JSArray_ComplexSelector; - newComplexes = A._setArrayType([], t1); - for (t2 = complex.components, t3 = t2.length, t4 = _this.$this, t5 = _this.parent, t6 = type$.ComplexSelector, t7 = complex.leadingCombinators, t8 = t7.length === 0, t9 = complex.span, t10 = type$.ComplexSelectorComponent, t11 = type$.JSArray_ComplexSelectorComponent, _i = 0; _i < t3; ++_i) { - component = t2[_i]; - resolved = t4._nestWithinCompound$2(component, t5); - if (resolved == null) - if (newComplexes.length === 0) - newComplexes.push(A.ComplexSelector$(t7, A._setArrayType([component], t11), t9, false)); - else - for (i = 0; i < newComplexes.length; ++i) { - t12 = newComplexes[i]; - t13 = t12.leadingCombinators; - t14 = A.List_List$of(t12.components, true, t10); - t14.push(component); - t12 = t12.lineBreak; - newComplexes[i] = A.ComplexSelector$(t13, t14, t9, t12); - } - else if (newComplexes.length === 0) - B.JSArray_methods.addAll$1(newComplexes, t8 ? resolved : J.map$1$1$ax(resolved, new A.SelectorList_nestWithin__closure0(complex), t6)); - else { - t12 = A._setArrayType([], t1); - for (t13 = newComplexes.length, t14 = J.getInterceptor$ax(resolved), _i0 = 0; _i0 < newComplexes.length; newComplexes.length === t13 || (0, A.throwConcurrentModificationError)(newComplexes), ++_i0) { - newComplex = newComplexes[_i0]; - for (t15 = t14.get$iterator(resolved); t15.moveNext$0();) - t12.push(newComplex.concatenate$2(t15.get$current(t15), newComplex.span)); - } - newComplexes = t12; - } - } - return newComplexes; - }, - $signature: 423 - }; - A.SelectorList_nestWithin__closure.prototype = { - call$1(parentComplex) { - var t1 = this.complex; - return parentComplex.concatenate$2(t1, t1.span); - }, - $signature: 59 - }; - A.SelectorList_nestWithin__closure0.prototype = { - call$1(resolvedComplex) { - var t1 = resolvedComplex.leadingCombinators, - t2 = this.complex, - t3 = t2.leadingCombinators; - if (t1.length === 0) - t1 = t3; - else { - t3 = A.List_List$of(t3, true, type$.CssValue_Combinator); - B.JSArray_methods.addAll$1(t3, t1); - t1 = t3; - } - return A.ComplexSelector$(t1, resolvedComplex.components, t2.span, resolvedComplex.lineBreak); - }, - $signature: 59 - }; - A.SelectorList__nestWithinCompound_closure.prototype = { - call$1(simple) { - var selector; - if (!(simple instanceof A.PseudoSelector)) - return false; - selector = simple.selector; - return selector != null && selector.accept$1(B.C__ParentSelectorVisitor) != null; - }, - $signature: 13 - }; - A.SelectorList__nestWithinCompound_closure0.prototype = { - call$1(simple) { - var selector, t1, _0_2; - $label0$0: { - selector = null; - t1 = false; - if (simple instanceof A.PseudoSelector) { - _0_2 = simple.selector; - if (_0_2 != null) { - selector = _0_2 == null ? type$.SelectorList._as(_0_2) : _0_2; - t1 = selector.accept$1(B.C__ParentSelectorVisitor) != null; - } - } - if (t1) { - t1 = simple.withSelector$1(selector.nestWithin$2$implicitParent(this.parent, false)); - break $label0$0; - } - t1 = simple; - break $label0$0; - } - return t1; - }, - $signature: 444 - }; - A.SelectorList__nestWithinCompound_closure1.prototype = { - call$1(complex) { - var lastComponent, suffix, lastSimples, t1, t2, last, t3, error, stackTrace, t4, t5, t6, t7, exception, _this = this; - try { - t4 = complex.components; - lastComponent = B.JSArray_methods.get$last(t4); - if (lastComponent.combinators.length !== 0) { - t1 = A.MultiSpanSassException$('Selector "' + complex.toString$0(0) + string$.x22x20can_, A.SpanExtensions_trimRight(lastComponent.span), "outer selector", A.LinkedHashMap_LinkedHashMap$_literal([_this.parentSelector.span, "parent selector"], type$.FileSpan, type$.String), null); - throw A.wrapException(t1); - } - suffix = _this.parentSelector.suffix; - lastSimples = lastComponent.selector.components; - t5 = type$.SimpleSelector; - t6 = _this.resolvedSimples; - t7 = J.getInterceptor$ax(t6); - if (suffix == null) { - t1 = A.List_List$of(lastSimples, true, t5); - J.addAll$1$ax(t1, t7.skip$1(t6, 1)); - t1 = t1; - } else { - t2 = A.List_List$of(A.IterableExtension_get_exceptLast(lastSimples), true, t5); - J.add$1$ax(t2, J.get$last$ax(lastSimples).addSuffix$1(suffix)); - J.addAll$1$ax(t2, t7.skip$1(t6, 1)); - t1 = t2; - } - t2 = _this.component; - last = A.CompoundSelector$(t1, t2.selector.span); - t3 = A.List_List$of(A.IterableExtension_get_exceptLast(t4), true, type$.ComplexSelectorComponent); - t4 = t2.span; - J.add$1$ax(t3, new A.ComplexSelectorComponent(last, A.List_List$unmodifiable(t2.combinators, type$.CssValue_Combinator), t4)); - t4 = A.ComplexSelector$(complex.leadingCombinators, t3, t4, complex.lineBreak); - return t4; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace(error.withAdditionalSpan$2(_this.parentSelector.span, "parent selector"), error, stackTrace); - } else - throw exception; - } - }, - $signature: 59 - }; - A.SelectorList_withAdditionalCombinators_closure.prototype = { - call$1(complex) { - return complex.withAdditionalCombinators$1(this.combinators); - }, - $signature: 59 - }; - A._ParentSelectorVisitor.prototype = { - visitParentSelector$1(selector) { - return selector; - } - }; - A.__ParentSelectorVisitor_Object_SelectorSearchVisitor.prototype = {}; - A.ParentSelector.prototype = { - accept$1$1(visitor) { - return visitor.visitParentSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - unify$1(compound) { - return A.throwExpression(A.UnsupportedError$("& doesn't support unification.")); - } - }; - A.PlaceholderSelector.prototype = { - accept$1$1(visitor) { - return visitor.visitPlaceholderSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - addSuffix$1(suffix) { - return new A.PlaceholderSelector(this.name + suffix, this.span); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.PlaceholderSelector && other.name === this.name; - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this.name); - } - }; - A.PseudoSelector.prototype = { - get$isHostContext() { - return this.isClass && this.name === "host-context" && this.selector != null; - }, - get$hasComplicatedSuperselectorSemantics() { - return !this.isClass || this.selector != null; - }, - get$specificity() { - var result, _this = this, - value = _this.__PseudoSelector_specificity_FI; - if (value === $) { - result = new A.PseudoSelector_specificity_closure(_this).call$0(); - _this.__PseudoSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); - _this.__PseudoSelector_specificity_FI = result; - value = result; - } - return value; - }, - withSelector$1(selector) { - var _this = this; - return A.PseudoSelector$(_this.name, _this.span, _this.argument, !_this.isClass, selector); - }, - addSuffix$1(suffix) { - var _this = this; - if (_this.argument != null || _this.selector != null) - _this.super$SimpleSelector$addSuffix(suffix); - return A.PseudoSelector$(_this.name + suffix, _this.span, null, !_this.isClass, null); - }, - unify$1(compound) { - var other, result, t2, addedThis, _i, simple, _this = this, - t1 = _this.name; - if (t1 === "host" || t1 === "host-context") { - if (!B.JSArray_methods.every$1(compound, new A.PseudoSelector_unify_closure())) - return null; - } else { - t1 = false; - if (compound.length === 1) { - other = compound[0]; - if (!(other instanceof A.UniversalSelector)) { - if (other instanceof A.PseudoSelector) - t1 = other.isClass && other.name === "host" || other.get$isHostContext(); - } else - t1 = true; - } else - other = null; - if (t1) - return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector)); - } - if (B.JSArray_methods.contains$1(compound, _this)) - return compound; - result = A._setArrayType([], type$.JSArray_SimpleSelector); - for (t1 = compound.length, t2 = !_this.isClass, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { - simple = compound[_i]; - if (simple instanceof A.PseudoSelector && !simple.isClass) { - if (t2) - return null; - result.push(_this); - addedThis = true; - } - result.push(simple); - } - if (!addedThis) - result.push(_this); - return result; - }, - isSuperselector$1(other) { - var selector, t1, t2, _this = this; - if (_this.super$SimpleSelector$isSuperselector(other)) - return true; - selector = _this.selector; - if (selector == null) - return _this.$eq(0, other); - if (other instanceof A.PseudoSelector && !_this.isClass && !other.isClass && _this.normalizedName === "slotted" && other.name === _this.name) { - t1 = A.NullableExtension_andThen(other.selector, selector.get$isSuperselector()); - return t1 == null ? false : t1; - } - t1 = type$.JSArray_SimpleSelector; - t2 = _this.span; - return A.compoundIsSuperselector(A.CompoundSelector$(A._setArrayType([_this], t1), t2), A.CompoundSelector$(A._setArrayType([other], t1), t2), null); - }, - accept$1$1(visitor) { - return visitor.visitPseudoSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - $eq(_, other) { - var _this = this; - if (other == null) - return false; - return other instanceof A.PseudoSelector && other.name === _this.name && other.isClass === _this.isClass && other.argument == _this.argument && J.$eq$(other.selector, _this.selector); - }, - get$hashCode(_) { - var _this = this, - t1 = B.JSString_methods.get$hashCode(_this.name), - t2 = !_this.isClass ? 519018 : 218159; - return t1 ^ t2 ^ J.get$hashCode$(_this.argument) ^ J.get$hashCode$(_this.selector); - } - }; - A.PseudoSelector_specificity_closure.prototype = { - call$0() { - var selector, t2, - t1 = this.$this; - if (!t1.isClass) - return 1; - selector = t1.selector; - if (selector == null) - return A.SimpleSelector.prototype.get$specificity.call(t1); - switch (t1.normalizedName) { - case "where": - return 0; - case "is": - case "not": - case "has": - case "matches": - t1 = selector.components; - return A.IterableIntegerExtension_get_max(new A.MappedListIterable(t1, new A.PseudoSelector_specificity__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,int>"))); - case "nth-child": - case "nth-last-child": - t1 = A.SimpleSelector.prototype.get$specificity.call(t1); - t2 = selector.components; - return t1 + A.IterableIntegerExtension_get_max(new A.MappedListIterable(t2, new A.PseudoSelector_specificity__closure0(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,int>"))); - default: - return A.SimpleSelector.prototype.get$specificity.call(t1); - } - }, - $signature: 10 - }; - A.PseudoSelector_specificity__closure.prototype = { - call$1(component) { - return component.get$specificity(); - }, - $signature: 174 - }; - A.PseudoSelector_specificity__closure0.prototype = { - call$1(component) { - return component.get$specificity(); - }, - $signature: 174 - }; - A.PseudoSelector_unify_closure.prototype = { - call$1(simple) { - var t1; - if (simple instanceof A.PseudoSelector) - t1 = simple.isClass && simple.name === "host" || simple.selector != null; - else - t1 = false; - return t1; - }, - $signature: 13 - }; - A.QualifiedName.prototype = { - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.QualifiedName && other.name === this.name && other.namespace == this.namespace; - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this.name) ^ J.get$hashCode$(this.namespace); - }, - toString$0(_) { - var t1 = this.namespace, - t2 = this.name; - return t1 == null ? t2 : t1 + "|" + t2; - } - }; - A.SimpleSelector.prototype = { - get$specificity() { - return 1000; - }, - get$hasComplicatedSuperselectorSemantics() { - return false; - }, - addSuffix$1(suffix) { - return A.throwExpression(A.MultiSpanSassException$('Selector "' + this.toString$0(0) + "\" can't have a suffix", this.span, "outer selector", A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String), null)); - }, - unify$1(compound) { - var other, result, addedThis, _i, simple, _this = this, - t1 = false; - if (compound.length === 1) { - other = compound[0]; - if (!(other instanceof A.UniversalSelector)) { - if (other instanceof A.PseudoSelector) - t1 = other.isClass && other.name === "host" || other.get$isHostContext(); - } else - t1 = true; - } else - other = null; - if (t1) - return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector)); - if (B.JSArray_methods.contains$1(compound, _this)) - return compound; - result = A._setArrayType([], type$.JSArray_SimpleSelector); - for (t1 = compound.length, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { - simple = compound[_i]; - if (!addedThis && simple instanceof A.PseudoSelector) { - result.push(_this); - addedThis = true; - } - result.push(simple); - } - if (!addedThis) - result.push(_this); - return result; - }, - isSuperselector$1(other) { - var list; - if (this.$eq(0, other)) - return true; - if (other instanceof A.PseudoSelector && other.isClass) { - list = other.selector; - if (list != null && $._subselectorPseudos.contains$1(0, other.normalizedName)) - return B.JSArray_methods.every$1(list.components, new A.SimpleSelector_isSuperselector_closure(this)); - } - return false; - } - }; - A.SimpleSelector_isSuperselector_closure.prototype = { - call$1(complex) { - var t1 = complex.components; - return t1.length !== 0 && B.JSArray_methods.any$1(B.JSArray_methods.get$last(t1).selector.components, new A.SimpleSelector_isSuperselector__closure(this.$this)); - }, - $signature: 19 - }; - A.SimpleSelector_isSuperselector__closure.prototype = { - call$1(simple) { - return this.$this.isSuperselector$1(simple); - }, - $signature: 13 - }; - A.TypeSelector.prototype = { - get$specificity() { - return 1; - }, - accept$1$1(visitor) { - return visitor.visitTypeSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - addSuffix$1(suffix) { - var t1 = this.name; - return new A.TypeSelector(new A.QualifiedName(t1.name + suffix, t1.namespace), this.span); - }, - unify$1(compound) { - var unified, t1, - _0_0 = A.IterableExtensions_get_firstOrNull(compound); - if (_0_0 instanceof A.UniversalSelector || _0_0 instanceof A.TypeSelector) { - unified = A.unifyUniversalAndElement(this, B.JSArray_methods.get$first(compound)); - if (unified == null) - return null; - t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector); - B.JSArray_methods.addAll$1(t1, A.SubListIterable$(compound, 1, null, A._arrayInstanceType(compound)._precomputed1)); - return t1; - } else { - t1 = A._setArrayType([this], type$.JSArray_SimpleSelector); - B.JSArray_methods.addAll$1(t1, compound); - return t1; - } - }, - isSuperselector$1(other) { - var t1, t2, t3; - if (!this.super$SimpleSelector$isSuperselector(other)) { - t1 = false; - if (other instanceof A.TypeSelector) { - t2 = this.name; - t3 = other.name; - if (t2.name === t3.name) { - t1 = t2.namespace; - t1 = t1 === "*" || t1 == t3.namespace; - } - } - } else - t1 = true; - return t1; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.TypeSelector && other.name.$eq(0, this.name); - }, - get$hashCode(_) { - var t1 = this.name; - return B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace); - } - }; - A.UniversalSelector.prototype = { - get$specificity() { - return 0; - }, - accept$1$1(visitor) { - return visitor.visitUniversalSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - unify$1(compound) { - var _0_40, t1, rest, unified, t2, _this = this, _null = null, - _0_1 = compound.length, - _0_4_isSet = _0_1 >= 1, - _0_4 = _null; - if (_0_4_isSet) { - _0_40 = compound[0]; - t1 = _0_40; - _0_4 = t1; - if (!(t1 instanceof A.UniversalSelector)) - t1 = _0_4 instanceof A.TypeSelector; - else - t1 = true; - rest = t1 ? B.JSArray_methods.sublist$1(compound, 1) : _null; - } else { - rest = _null; - t1 = false; - } - if (t1) { - unified = A.unifyUniversalAndElement(_this, B.JSArray_methods.get$first(compound)); - if (unified == null) - return _null; - t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector); - B.JSArray_methods.addAll$1(t1, rest); - return t1; - } - t1 = false; - if (_0_1 === 1) { - if (_0_4_isSet) - t2 = _0_4; - else { - _0_4 = compound[0]; - t2 = _0_4; - _0_4_isSet = true; - } - if (t2 instanceof A.PseudoSelector) { - t2 = _0_4_isSet ? _0_4 : compound[0]; - type$.PseudoSelector._as(t2); - t1 = t2.isClass && t2.name === "host" || t2.get$isHostContext(); - } - } - if (t1) - return _null; - if (_0_1 <= 0) - return A._setArrayType([_this], type$.JSArray_SimpleSelector); - t1 = _this.namespace; - if (t1 == null || t1 === "*") - t1 = compound; - else { - t1 = A._setArrayType([_this], type$.JSArray_SimpleSelector); - B.JSArray_methods.addAll$1(t1, compound); - } - return t1; - }, - isSuperselector$1(other) { - var t1 = this.namespace; - if (t1 === "*") - return true; - if (other instanceof A.TypeSelector) - return t1 == other.name.namespace; - if (other instanceof A.UniversalSelector) - return t1 == other.namespace; - return t1 == null || this.super$SimpleSelector$isSuperselector(other); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.UniversalSelector && other.namespace == this.namespace; - }, - get$hashCode(_) { - return J.get$hashCode$(this.namespace); - } - }; - A._compileStylesheet_closure0.prototype = { - call$1(url) { - var t1; - if (url === "") { - t1 = this.stylesheet.span; - t1 = A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text(); - } else - t1 = this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); - return t1; - }, - $signature: 6 - }; - A.AsyncEnvironment.prototype = { - closure$0() { - var t4, t5, t6, _this = this, - t1 = _this._async_environment$_forwardedModules, - t2 = _this._async_environment$_nestedForwardedModules, - t3 = _this._async_environment$_variables; - t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); - t4 = _this._async_environment$_variableNodes; - t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); - t5 = _this._async_environment$_functions; - t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); - t6 = _this._async_environment$_mixins; - t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); - return A.AsyncEnvironment$_(_this._async_environment$_modules, _this._async_environment$_namespaceNodes, _this._async_environment$_globalModules, _this._async_environment$_importedModules, t1, t2, _this._async_environment$_allModules, t3, t4, t5, t6, _this._async_environment$_content); - }, - forwardModule$2(module, rule) { - var view, t1, t2, _this = this, - forwardedModules = _this._async_environment$_forwardedModules; - if (forwardedModules == null) - forwardedModules = _this._async_environment$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable, type$.AstNode); - view = A.ForwardedModuleView_ifNecessary(module, rule, type$.AsyncCallable); - for (t1 = A.LinkedHashMapKeyIterator$(forwardedModules, forwardedModules.__js_helper$_modifications); t1.moveNext$0();) { - t2 = t1.__js_helper$_current; - _this._async_environment$_assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); - _this._async_environment$_assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); - _this._async_environment$_assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); - } - _this._async_environment$_allModules.push(module); - forwardedModules.$indexSet(0, view, rule); - }, - _async_environment$_assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { - var larger, smaller, t1, t2, t3, t4, $name, small, large, span; - if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { - larger = oldMembers; - smaller = newMembers; - } else { - larger = newMembers; - smaller = oldMembers; - } - for (t1 = type$.String, t2 = A.MapExtensions_get_pairs(smaller, t1, type$.Object), t2 = t2.get$iterator(t2), t3 = type === "variable"; t2.moveNext$0();) { - t4 = t2.get$current(t2); - $name = t4._0; - small = t4._1; - large = larger.$index(0, $name); - if (large == null) - continue; - if (t3 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(large, small)) - continue; - if (t3) - $name = "$" + $name; - t2 = this._async_environment$_forwardedModules; - if (t2 == null) - span = null; - else { - t2 = t2.$index(0, oldModule); - span = t2 == null ? null : J.get$span$z(t2); - } - t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, t1); - if (span != null) - t2.$indexSet(0, span, "original @forward"); - throw A.wrapException(A.MultiSpanSassScriptException$("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t2)); - } - }, - importForwards$1(module) { - var forwardedModules, t1, t2, t3, t4, node, t5, t6, t7, t8, t9, t10, _i, t11, shadowed, t12, _length, _list, _this = this, - forwarded = module._async_environment$_environment._async_environment$_forwardedModules; - if (forwarded == null) - return; - forwardedModules = _this._async_environment$_forwardedModules; - if (forwardedModules != null) { - t1 = type$.Module_AsyncCallable; - t2 = type$.AstNode; - t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t1 = A.MapExtensions_get_pairs(forwarded, t1, t2), t1 = t1.get$iterator(t1), t2 = _this._async_environment$_globalModules; t1.moveNext$0();) { - t4 = t1.get$current(t1); - module = t4._0; - node = t4._1; - if (!forwardedModules.containsKey$1(module) || !t2.containsKey$1(module)) - t3.$indexSet(0, module, node); - } - forwarded = t3; - } else - forwardedModules = _this._async_environment$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable, type$.AstNode); - t1 = type$.String; - t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - for (t3 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t3.moveNext$0();) - for (t4 = t3.__js_helper$_current.get$variables(), t4 = J.get$iterator$ax(t4.get$keys(t4)); t4.moveNext$0();) - t2.add$1(0, t4.get$current(t4)); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) { - t5 = t4.__js_helper$_current; - for (t5 = t5.get$functions(t5), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) - t3.add$1(0, t5.get$current(t5)); - } - t1 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) - for (t5 = t4.__js_helper$_current.get$mixins(), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) - t1.add$1(0, t5.get$current(t5)); - t4 = _this._async_environment$_variables; - t5 = t4.length; - if (t5 === 1) { - for (t5 = _this._async_environment$_importedModules, t6 = type$.Module_AsyncCallable, t7 = type$.AstNode, t8 = A.MapExtensions_get_pairs(t5, t6, t7).toList$0(0), t9 = t8.length, t10 = type$.AsyncCallable, _i = 0; _i < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i) { - t11 = t8[_i]; - module = t11._0; - node = t11._1; - shadowed = A.ShadowedModuleView_ifNecessary(module, t3, t1, t2, t10); - if (shadowed != null) { - t5.remove$1(0, module); - t11 = shadowed.variables; - t12 = false; - if (t11.get$isEmpty(t11)) { - t11 = shadowed.functions; - if (t11.get$isEmpty(t11)) { - t11 = shadowed.mixins; - if (t11.get$isEmpty(t11)) { - t11 = shadowed._shadowed_view$_inner; - t11 = t11.get$css(t11); - t11 = J.get$isEmpty$asx(t11.get$children(t11)); - } else - t11 = t12; - } else - t11 = t12; - } else - t11 = t12; - if (!t11) - t5.$indexSet(0, shadowed, node); - } - } - for (t6 = A.MapExtensions_get_pairs(forwardedModules, t6, t7).toList$0(0), t7 = t6.length, _i = 0; _i < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i) { - t8 = t6[_i]; - module = t8._0; - node = t8._1; - shadowed = A.ShadowedModuleView_ifNecessary(module, t3, t1, t2, t10); - if (shadowed != null) { - forwardedModules.remove$1(0, module); - t8 = shadowed.variables; - t9 = false; - if (t8.get$isEmpty(t8)) { - t8 = shadowed.functions; - if (t8.get$isEmpty(t8)) { - t8 = shadowed.mixins; - if (t8.get$isEmpty(t8)) { - t8 = shadowed._shadowed_view$_inner; - t8 = t8.get$css(t8); - t8 = J.get$isEmpty$asx(t8.get$children(t8)); - } else - t8 = t9; - } else - t8 = t9; - } else - t8 = t9; - if (!t8) - forwardedModules.$indexSet(0, shadowed, node); - } - } - t5.addAll$1(0, forwarded); - forwardedModules.addAll$1(0, forwarded); - } else { - t6 = _this._async_environment$_nestedForwardedModules; - if (t6 == null) { - _length = t5 - 1; - _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_AsyncCallable); - for (t5 = type$.JSArray_Module_AsyncCallable, _i = 0; _i < _length; ++_i) - _list[_i] = A._setArrayType([], t5); - _this._async_environment$_nestedForwardedModules = _list; - t5 = _list; - } else - t5 = t6; - B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t5), new A.LinkedHashMapKeyIterable(forwarded, A._instanceType(forwarded)._eval$1("LinkedHashMapKeyIterable<1>"))); - } - for (t2 = A._LinkedHashSetIterator$(t2, t2._modifications, t2.$ti._precomputed1), t5 = _this._async_environment$_variableIndices, t6 = _this._async_environment$_variableNodes, t7 = t2.$ti._precomputed1; t2.moveNext$0();) { - t8 = t2._collection$_current; - if (t8 == null) - t8 = t7._as(t8); - t5.remove$1(0, t8); - J.remove$1$z(B.JSArray_methods.get$last(t4), t8); - J.remove$1$z(B.JSArray_methods.get$last(t6), t8); - } - for (t2 = A._LinkedHashSetIterator$(t3, t3._modifications, t3.$ti._precomputed1), t3 = _this._async_environment$_functionIndices, t4 = _this._async_environment$_functions, t5 = t2.$ti._precomputed1; t2.moveNext$0();) { - t6 = t2._collection$_current; - if (t6 == null) - t6 = t5._as(t6); - t3.remove$1(0, t6); - J.remove$1$z(B.JSArray_methods.get$last(t4), t6); - } - for (t1 = A._LinkedHashSetIterator$(t1, t1._modifications, t1.$ti._precomputed1), t2 = _this._async_environment$_mixinIndices, t3 = _this._async_environment$_mixins, t4 = t1.$ti._precomputed1; t1.moveNext$0();) { - t5 = t1._collection$_current; - if (t5 == null) - t5 = t4._as(t5); - t2.remove$1(0, t5); - J.remove$1$z(B.JSArray_methods.get$last(t3), t5); - } - }, - getVariable$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) - return _this._async_environment$_getModule$1(namespace).get$variables().$index(0, $name); - if (_this._async_environment$_lastVariableName === $name) { - t1 = _this._async_environment$_lastVariableIndex; - t1.toString; - t1 = J.$index$asx(_this._async_environment$_variables[t1], $name); - return t1 == null ? _this._async_environment$_getVariableFromGlobalModule$1($name) : t1; - } - t1 = _this._async_environment$_variableIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - _this._async_environment$_lastVariableName = $name; - _this._async_environment$_lastVariableIndex = _0_0; - t1 = J.$index$asx(_this._async_environment$_variables[_0_0], $name); - return t1 == null ? _this._async_environment$_getVariableFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._async_environment$_variableIndex$1($name); - if (_1_0 != null) { - _this._async_environment$_lastVariableName = $name; - _this._async_environment$_lastVariableIndex = _1_0; - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._async_environment$_variables[_1_0], $name); - return t1 == null ? _this._async_environment$_getVariableFromGlobalModule$1($name) : t1; - } else - return _this._async_environment$_getVariableFromGlobalModule$1($name); - } - }, - getVariable$1($name) { - return this.getVariable$2$namespace($name, null); - }, - _async_environment$_getVariableFromGlobalModule$1($name) { - return this._async_environment$_fromOneModule$3($name, "variable", new A.AsyncEnvironment__getVariableFromGlobalModule_closure($name)); - }, - getVariableNode$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) - return _this._async_environment$_getModule$1(namespace).get$variableNodes().$index(0, $name); - if (_this._async_environment$_lastVariableName === $name) { - t1 = _this._async_environment$_lastVariableIndex; - t1.toString; - t1 = J.$index$asx(_this._async_environment$_variableNodes[t1], $name); - return t1 == null ? _this._async_environment$_getVariableNodeFromGlobalModule$1($name) : t1; - } - t1 = _this._async_environment$_variableIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - _this._async_environment$_lastVariableName = $name; - _this._async_environment$_lastVariableIndex = _0_0; - t1 = J.$index$asx(_this._async_environment$_variableNodes[_0_0], $name); - return t1 == null ? _this._async_environment$_getVariableNodeFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._async_environment$_variableIndex$1($name); - if (_1_0 != null) { - _this._async_environment$_lastVariableName = $name; - _this._async_environment$_lastVariableIndex = _1_0; - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._async_environment$_variableNodes[_1_0], $name); - return t1 == null ? _this._async_environment$_getVariableNodeFromGlobalModule$1($name) : t1; - } else - return _this._async_environment$_getVariableNodeFromGlobalModule$1($name); - } - }, - _async_environment$_getVariableNodeFromGlobalModule$1($name) { - var t1, t2, _0_0; - for (t1 = this._async_environment$_importedModules, t2 = this._async_environment$_globalModules, t2 = new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeyIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { - t1 = t2._currentIterator; - _0_0 = t1.get$current(t1).get$variableNodes().$index(0, $name); - if (_0_0 != null) - return _0_0; - } - return null; - }, - globalVariableExists$2$namespace($name, namespace) { - if (namespace != null) - return this._async_environment$_getModule$1(namespace).get$variables().containsKey$1($name); - if (B.JSArray_methods.get$first(this._async_environment$_variables).containsKey$1($name)) - return true; - return this._async_environment$_getVariableFromGlobalModule$1($name) != null; - }, - globalVariableExists$1($name) { - return this.globalVariableExists$2$namespace($name, null); - }, - _async_environment$_variableIndex$1($name) { - var t1, i; - for (t1 = this._async_environment$_variables, i = t1.length - 1; i >= 0; --i) - if (t1[i].containsKey$1($name)) - return i; - return null; - }, - setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { - var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; - if (namespace != null) { - _this._async_environment$_getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); - return; - } - if (global || _this._async_environment$_variables.length === 1) { - _this._async_environment$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure(_this, $name)); - t1 = _this._async_environment$_variables; - if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { - moduleWithName = _this._async_environment$_fromOneModule$3($name, "variable", new A.AsyncEnvironment_setVariable_closure0($name)); - if (moduleWithName != null) { - moduleWithName.setVariable$3($name, value, nodeWithSpan); - return; - } - } - J.$indexSet$ax(B.JSArray_methods.get$first(t1), $name, value); - J.$indexSet$ax(B.JSArray_methods.get$first(_this._async_environment$_variableNodes), $name, nodeWithSpan); - return; - } - nestedForwardedModules = _this._async_environment$_nestedForwardedModules; - if (nestedForwardedModules != null && !_this._async_environment$_variableIndices.containsKey$1($name) && _this._async_environment$_variableIndex$1($name) == null) - for (t1 = A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(nestedForwardedModules, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { - t3 = t2.__internal$_current; - for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { - t5 = t3.__internal$_current; - if (t5 == null) - t5 = t4._as(t5); - if (t5.get$variables().containsKey$1($name)) { - t5.setVariable$3($name, value, nodeWithSpan); - return; - } - } - } - if (_this._async_environment$_lastVariableName === $name) { - t1 = _this._async_environment$_lastVariableIndex; - t1.toString; - index = t1; - } else - index = _this._async_environment$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure1(_this, $name)); - if (!_this._async_environment$_inSemiGlobalScope && index === 0) { - index = _this._async_environment$_variables.length - 1; - _this._async_environment$_variableIndices.$indexSet(0, $name, index); - } - _this._async_environment$_lastVariableName = $name; - _this._async_environment$_lastVariableIndex = index; - J.$indexSet$ax(_this._async_environment$_variables[index], $name, value); - J.$indexSet$ax(_this._async_environment$_variableNodes[index], $name, nodeWithSpan); - }, - setVariable$4$global($name, value, nodeWithSpan, global) { - return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); - }, - setLocalVariable$3($name, value, nodeWithSpan) { - var index, _this = this, - t1 = _this._async_environment$_variables, - t2 = t1.length; - _this._async_environment$_lastVariableName = $name; - index = _this._async_environment$_lastVariableIndex = t2 - 1; - _this._async_environment$_variableIndices.$indexSet(0, $name, index); - J.$indexSet$ax(t1[index], $name, value); - J.$indexSet$ax(_this._async_environment$_variableNodes[index], $name, nodeWithSpan); - }, - getFunction$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) { - t1 = _this._async_environment$_getModule$1(namespace); - return t1.get$functions(t1).$index(0, $name); - } - t1 = _this._async_environment$_functionIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - t1 = J.$index$asx(_this._async_environment$_functions[_0_0], $name); - return t1 == null ? _this._async_environment$_getFunctionFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._async_environment$_functionIndex$1($name); - if (_1_0 != null) { - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._async_environment$_functions[_1_0], $name); - return t1 == null ? _this._async_environment$_getFunctionFromGlobalModule$1($name) : t1; - } else - return _this._async_environment$_getFunctionFromGlobalModule$1($name); - } - }, - getFunction$1($name) { - return this.getFunction$2$namespace($name, null); - }, - _async_environment$_getFunctionFromGlobalModule$1($name) { - return this._async_environment$_fromOneModule$3($name, "function", new A.AsyncEnvironment__getFunctionFromGlobalModule_closure($name)); - }, - _async_environment$_functionIndex$1($name) { - var t1, i; - for (t1 = this._async_environment$_functions, i = t1.length - 1; i >= 0; --i) - if (t1[i].containsKey$1($name)) - return i; - return null; - }, - getMixin$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) - return _this._async_environment$_getModule$1(namespace).get$mixins().$index(0, $name); - t1 = _this._async_environment$_mixinIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - t1 = J.$index$asx(_this._async_environment$_mixins[_0_0], $name); - return t1 == null ? _this._async_environment$_getMixinFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._async_environment$_mixinIndex$1($name); - if (_1_0 != null) { - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._async_environment$_mixins[_1_0], $name); - return t1 == null ? _this._async_environment$_getMixinFromGlobalModule$1($name) : t1; - } else - return _this._async_environment$_getMixinFromGlobalModule$1($name); - } - }, - _async_environment$_getMixinFromGlobalModule$1($name) { - return this._async_environment$_fromOneModule$3($name, "mixin", new A.AsyncEnvironment__getMixinFromGlobalModule_closure($name)); - }, - _async_environment$_mixinIndex$1($name) { - var t1, i; - for (t1 = this._async_environment$_mixins, i = t1.length - 1; i >= 0; --i) - if (t1[i].containsKey$1($name)) - return i; - return null; - }, - withContent$2($content, callback) { - return this.withContent$body$AsyncEnvironment($content, callback); - }, - withContent$body$AsyncEnvironment($content, callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, oldContent; - var $async$withContent$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldContent = $async$self._async_environment$_content; - $async$self._async_environment$_content = $content; - $async$goto = 2; - return A._asyncAwait(callback.call$0(), $async$withContent$2); - case 2: - // returning from await. - $async$self._async_environment$_content = oldContent; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$withContent$2, $async$completer); - }, - asMixin$1(callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, oldInMixin; - var $async$asMixin$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldInMixin = $async$self._async_environment$_inMixin; - $async$self._async_environment$_inMixin = true; - $async$goto = 2; - return A._asyncAwait(callback.call$0(), $async$asMixin$1); - case 2: - // returning from await. - $async$self._async_environment$_inMixin = oldInMixin; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$asMixin$1, $async$completer); - }, - scope$1$3$semiGlobal$when(callback, semiGlobal, when, $T) { - return this.scope$body$AsyncEnvironment(callback, semiGlobal, when, $T, $T); - }, - scope$1$1(callback, $T) { - return this.scope$1$3$semiGlobal$when(callback, false, true, $T); - }, - scope$1$2$when(callback, when, $T) { - return this.scope$1$3$semiGlobal$when(callback, false, when, $T); - }, - scope$1$2$semiGlobal(callback, semiGlobal, $T) { - return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true, $T); - }, - scope$body$AsyncEnvironment(callback, semiGlobal, when, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6; - var $async$scope$1$3$semiGlobal$when = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - semiGlobal = semiGlobal && $async$self._async_environment$_inSemiGlobalScope; - wasInSemiGlobalScope = $async$self._async_environment$_inSemiGlobalScope; - $async$self._async_environment$_inSemiGlobalScope = semiGlobal; - $async$goto = !when ? 3 : 4; - break; - case 3: - // then - $async$handler = 5; - $async$goto = 8; - return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); - case 8: - // returning from await. - t1 = $async$result; - $async$returnValue = t1; - $async$next = [1]; - // goto finally - $async$goto = 6; - break; - $async$next.push(7); - // goto finally - $async$goto = 6; - break; - case 5: - // uncaught - $async$next = [2]; - case 6: - // finally - $async$handler = 2; - $async$self._async_environment$_inSemiGlobalScope = wasInSemiGlobalScope; - // goto the next finally handler - $async$goto = $async$next.pop(); - break; - case 7: - // after finally - case 4: - // join - t1 = $async$self._async_environment$_variables; - t2 = type$.String; - B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value)); - t3 = $async$self._async_environment$_variableNodes; - B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode)); - t4 = $async$self._async_environment$_functions; - t5 = type$.AsyncCallable; - B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); - t6 = $async$self._async_environment$_mixins; - B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); - t5 = $async$self._async_environment$_nestedForwardedModules; - if (t5 != null) - t5.push(A._setArrayType([], type$.JSArray_Module_AsyncCallable)); - $async$handler = 9; - $async$goto = 12; - return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); - case 12: - // returning from await. - t2 = $async$result; - $async$returnValue = t2; - $async$next = [1]; - // goto finally - $async$goto = 10; - break; - $async$next.push(11); - // goto finally - $async$goto = 10; - break; - case 9: - // uncaught - $async$next = [2]; - case 10: - // finally - $async$handler = 2; - $async$self._async_environment$_inSemiGlobalScope = wasInSemiGlobalScope; - $async$self._async_environment$_lastVariableIndex = $async$self._async_environment$_lastVariableName = null; - for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t1))), t2 = $async$self._async_environment$_variableIndices; t1.moveNext$0();) { - $name = t1.get$current(t1); - t2.remove$1(0, $name); - } - B.JSArray_methods.removeLast$0(t3); - for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t4))), t2 = $async$self._async_environment$_functionIndices; t1.moveNext$0();) { - name0 = t1.get$current(t1); - t2.remove$1(0, name0); - } - for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t6))), t2 = $async$self._async_environment$_mixinIndices; t1.moveNext$0();) { - name1 = t1.get$current(t1); - t2.remove$1(0, name1); - } - t1 = $async$self._async_environment$_nestedForwardedModules; - if (t1 != null) - t1.pop(); - // goto the next finally handler - $async$goto = $async$next.pop(); - break; - case 11: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$scope$1$3$semiGlobal$when, $async$completer); - }, - toImplicitConfiguration$0() { - var t2, t3, t4, i, values, nodes, t5, t6, $name, value, - t1 = type$.String, - configuration = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ConfiguredValue); - for (t2 = this._async_environment$_variables, t3 = type$.Value, t4 = this._async_environment$_variableNodes, i = 0; i < t2.length; ++i) { - values = t2[i]; - nodes = t4[i]; - for (t5 = A.MapExtensions_get_pairs(values, t1, t3), t5 = t5.get$iterator(t5); t5.moveNext$0();) { - t6 = t5.get$current(t5); - $name = t6._0; - value = t6._1; - t6 = nodes.$index(0, $name); - t6.toString; - configuration.$indexSet(0, $name, new A.ConfiguredValue(value, null, t6)); - } - } - return new A.Configuration(configuration, null); - }, - toModule$3(css, preModuleComments, extensionStore) { - return A._EnvironmentModule__EnvironmentModule0(this, css, preModuleComments, extensionStore, A.NullableExtension_andThen(this._async_environment$_forwardedModules, new A.AsyncEnvironment_toModule_closure())); - }, - toDummyModule$0() { - return A._EnvironmentModule__EnvironmentModule0(this, new A.CssStylesheet(new A.UnmodifiableListView(B.List_empty3, type$.UnmodifiableListView_CssNode), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.Map_empty8, B.C_EmptyExtensionStore, A.NullableExtension_andThen(this._async_environment$_forwardedModules, new A.AsyncEnvironment_toDummyModule_closure())); - }, - _async_environment$_getModule$1(namespace) { - var _0_0 = this._async_environment$_modules.$index(0, namespace); - if (_0_0 != null) - return _0_0; - throw A.wrapException(A.SassScriptException$('There is no module with the namespace "' + namespace + '".', null)); - }, - _async_environment$_fromOneModule$1$3($name, type, callback) { - var t1, t2, t3, t4, t5, _1_0, _2_0, value, identity, valueInModule, identityFromModule, module, node, - _0_0 = this._async_environment$_nestedForwardedModules; - if (_0_0 != null) - for (t1 = A._arrayInstanceType(_0_0)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(_0_0, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { - t3 = t2.__internal$_current; - for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { - t5 = t3.__internal$_current; - _1_0 = callback.call$1(t5 == null ? t4._as(t5) : t5); - if (_1_0 != null) - return _1_0; - } - } - for (t1 = this._async_environment$_importedModules, t1 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications); t1.moveNext$0();) { - _2_0 = callback.call$1(t1.__js_helper$_current); - if (_2_0 != null) - return _2_0; - } - for (t1 = this._async_environment$_globalModules, t2 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications), t3 = type$.AsyncCallable, value = null, identity = null; t2.moveNext$0();) { - t4 = t2.__js_helper$_current; - valueInModule = callback.call$1(t4); - if (valueInModule == null) - continue; - identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); - if (identityFromModule.$eq(0, identity)) - continue; - if (value != null) { - t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - for (t3 = A.MapExtensions_get_pairs(t1, type$.Module_AsyncCallable, type$.AstNode), t3 = t3.get$iterator(t3), t4 = "includes " + type; t3.moveNext$0();) { - t1 = t3.get$current(t3); - module = t1._0; - node = t1._1; - if (callback.call$1(module) != null) - t2.$indexSet(0, node.get$span(node), t4); - } - throw A.wrapException(A.MultiSpanSassScriptException$("This " + type + string$.x20is_av, type + " use", t2)); - } - identity = identityFromModule; - value = valueInModule; - } - return value; - }, - _async_environment$_fromOneModule$3($name, type, callback) { - return this._async_environment$_fromOneModule$1$3($name, type, callback, type$.dynamic); - } - }; - A.AsyncEnvironment__getVariableFromGlobalModule_closure.prototype = { - call$1(module) { - return module.get$variables().$index(0, this.name); - }, - $signature: 460 - }; - A.AsyncEnvironment_setVariable_closure.prototype = { - call$0() { - var t1 = this.$this; - t1._async_environment$_lastVariableName = this.name; - return t1._async_environment$_lastVariableIndex = 0; - }, - $signature: 10 - }; - A.AsyncEnvironment_setVariable_closure0.prototype = { - call$1(module) { - return module.get$variables().containsKey$1(this.name) ? module : null; - }, - $signature: 490 - }; - A.AsyncEnvironment_setVariable_closure1.prototype = { - call$0() { - var t1 = this.$this, - t2 = t1._async_environment$_variableIndex$1(this.name); - return t2 == null ? t1._async_environment$_variables.length - 1 : t2; - }, - $signature: 10 - }; - A.AsyncEnvironment__getFunctionFromGlobalModule_closure.prototype = { - call$1(module) { - return module.get$functions(module).$index(0, this.name); - }, - $signature: 180 - }; - A.AsyncEnvironment__getMixinFromGlobalModule_closure.prototype = { - call$1(module) { - return module.get$mixins().$index(0, this.name); - }, - $signature: 180 - }; - A.AsyncEnvironment_toModule_closure.prototype = { - call$1(modules) { - return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable); - }, - $signature: 181 - }; - A.AsyncEnvironment_toDummyModule_closure.prototype = { - call$1(modules) { - return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable); - }, - $signature: 181 - }; - A._EnvironmentModule0.prototype = { - get$url(_) { - var t1 = this.css; - t1 = t1.get$span(t1); - return t1.get$sourceUrl(t1); - }, - setVariable$3($name, value, nodeWithSpan) { - var t1, t2, - _0_0 = this._async_environment$_modulesByVariable.$index(0, $name); - if (_0_0 != null) { - _0_0.setVariable$3($name, value, nodeWithSpan); - return; - } - t1 = this._async_environment$_environment; - t2 = t1._async_environment$_variables; - if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) - throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); - J.$indexSet$ax(B.JSArray_methods.get$first(t2), $name, value); - J.$indexSet$ax(B.JSArray_methods.get$first(t1._async_environment$_variableNodes), $name, nodeWithSpan); - return; - }, - variableIdentity$1($name) { - var module = this._async_environment$_modulesByVariable.$index(0, $name); - return module == null ? this : module.variableIdentity$1($name); - }, - cloneCss$0() { - var _0_0, _this = this; - if (!_this.transitivelyContainsCss) - return _this; - _0_0 = A.cloneCssStylesheet(_this.css, _this.extensionStore); - return A._EnvironmentModule$_0(_this._async_environment$_environment, _0_0._0, _this.preModuleComments, _0_0._1, _this._async_environment$_modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, true, _this.transitivelyContainsExtensions); - }, - toString$0(_) { - var t1 = this.css, - t2 = t1.get$span(t1); - if (t2.get$sourceUrl(t2) == null) - t1 = ""; - else { - t1 = t1.get$span(t1); - t1 = t1.get$sourceUrl(t1); - t2 = $.$get$context(); - t1.toString; - t1 = t2.prettyUri$1(t1); - } - return t1; - }, - $isModule0: 1, - get$upstream() { - return this.upstream; - }, - get$variables() { - return this.variables; - }, - get$variableNodes() { - return this.variableNodes; - }, - get$functions(receiver) { - return this.functions; - }, - get$mixins() { - return this.mixins; - }, - get$extensionStore() { - return this.extensionStore; - }, - get$css(receiver) { - return this.css; - }, - get$preModuleComments() { - return this.preModuleComments; - }, - get$transitivelyContainsCss() { - return this.transitivelyContainsCss; - }, - get$transitivelyContainsExtensions() { - return this.transitivelyContainsExtensions; - } - }; - A._EnvironmentModule__EnvironmentModule_closure5.prototype = { - call$1(module) { - return module.get$variables(); - }, - $signature: 526 - }; - A._EnvironmentModule__EnvironmentModule_closure6.prototype = { - call$1(module) { - return module.get$variableNodes(); - }, - $signature: 535 - }; - A._EnvironmentModule__EnvironmentModule_closure7.prototype = { - call$1(module) { - return module.get$functions(module); - }, - $signature: 182 - }; - A._EnvironmentModule__EnvironmentModule_closure8.prototype = { - call$1(module) { - return module.get$mixins(); - }, - $signature: 182 - }; - A._EnvironmentModule__EnvironmentModule_closure9.prototype = { - call$1(module) { - return module.get$transitivelyContainsCss(); - }, - $signature: 120 - }; - A._EnvironmentModule__EnvironmentModule_closure10.prototype = { - call$1(module) { - return module.get$transitivelyContainsExtensions(); - }, - $signature: 120 - }; - A.AsyncImportCache.prototype = { - canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { - return this.canonicalize$body$AsyncImportCache(0, url, baseImporter, baseUrl, forImport); - }, - canonicalize$body$AsyncImportCache(_, url, baseImporter, baseUrl, forImport) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl), - $async$returnValue, $async$self = this, t1, resolvedUrl, key, relativeResult, t2, t3, t4, t5, t6, cacheable, i, importer, perImporterKey, t7, _1_0, _1_2_isSet, result, _1_2, _2_0, _2_1, _2_5_isSet, _2_5, _2_3, _2_3_isSet, j; - var $async$canonicalize$4$baseImporter$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if (A.isBrowser()) - t1 = (baseImporter == null || baseImporter instanceof A.NoOpImporter) && $async$self._async_import_cache$_importers.length === 0; - else - t1 = false; - if (t1) - throw A.wrapException(string$.Custom); - $async$goto = baseImporter != null && url.get$scheme() === "" ? 3 : 4; - break; - case 3: - // then - resolvedUrl = baseUrl == null ? null : baseUrl.resolveUri$1(url); - if (resolvedUrl == null) - resolvedUrl = url; - key = new A._Record_3_forImport(baseImporter, resolvedUrl, forImport); - $async$goto = 5; - return A._asyncAwait(A.putIfAbsentAsync($async$self._async_import_cache$_perImporterCanonicalizeCache, key, new A.AsyncImportCache_canonicalize_closure($async$self, baseImporter, resolvedUrl, baseUrl, forImport, key, url), type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport, type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl), $async$canonicalize$4$baseImporter$baseUrl$forImport); - case 5: - // returning from await. - relativeResult = $async$result; - if (relativeResult != null) { - $async$returnValue = relativeResult; - // goto return - $async$goto = 1; - break; - } - case 4: - // join - key = new A._Record_2_forImport(url, forImport); - t1 = $async$self._async_import_cache$_canonicalizeCache; - if (t1.containsKey$1(key)) { - $async$returnValue = t1.$index(0, key); - // goto return - $async$goto = 1; - break; - } - t2 = $async$self._async_import_cache$_importers, t3 = type$.Record_1_nullable_Object, t4 = $async$self._async_import_cache$_perImporterCanonicalizeCache, t5 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl, t6 = type$.Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl, cacheable = true, i = 0; - case 6: - // for condition - if (!(i < t2.length)) { - // goto after for - $async$goto = 8; - break; - } - importer = t2[i]; - perImporterKey = new A._Record_3_forImport(importer, url, forImport); - if (t4.containsKey$1(perImporterKey)) { - t7 = t4.$index(0, perImporterKey); - _1_0 = new A._Record_1(t7 == null ? t5._as(t7) : t7); - } else - _1_0 = null; - _1_2_isSet = t3._is(_1_0); - result = null; - if (_1_2_isSet) { - _1_2 = _1_0._0; - t7 = _1_2 != null; - if (t7) { - t6._as(_1_2); - result = _1_2; - } - } else { - _1_2 = null; - t7 = false; - } - if (t7) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - if (_1_2_isSet) - t7 = _1_2 == null; - else - t7 = false; - if (t7) { - // goto for update - $async$goto = 7; - break; - } - $async$goto = 10; - return A._asyncAwait($async$self._async_import_cache$_canonicalize$4(importer, url, baseUrl, forImport), $async$canonicalize$4$baseImporter$baseUrl$forImport); - case 10: - // returning from await. - _2_0 = $async$result; - _2_1 = _2_0._0; - _2_5_isSet = _2_1 != null; - _2_5 = null; - _2_3 = null; - t7 = false; - if (_2_5_isSet) { - result = _2_1 == null ? t6._as(_2_1) : _2_1; - _2_3 = _2_0._1; - t7 = _2_3; - _2_5 = t7; - t7 = t7 && cacheable; - } else - result = null; - if (t7) { - t1.$indexSet(0, key, result); - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - if (_2_5_isSet) { - t7 = _2_5; - _2_3_isSet = _2_5_isSet; - } else { - _2_3 = _2_0._1; - t7 = _2_3; - _2_3_isSet = true; - } - t7 = t7 && !cacheable; - if (t7) { - t4.$indexSet(0, perImporterKey, _2_1); - if (_2_1 != null) { - $async$returnValue = _2_1; - // goto return - $async$goto = 1; - break; - } - // goto break $label0$1 - $async$goto = 9; - break; - } - t7 = false === (_2_3_isSet ? _2_3 : _2_0._1); - if (t7) { - if (cacheable) { - for (j = 0; j < i; ++j) - t4.$indexSet(0, new A._Record_3_forImport(t2[j], url, forImport), null); - cacheable = false; - } - if (_2_1 != null) { - $async$returnValue = _2_1; - // goto return - $async$goto = 1; - break; - } - } - case 9: - // break $label0$1 - case 7: - // for update - ++i; - // goto for condition - $async$goto = 6; - break; - case 8: - // after for - if (cacheable) - t1.$indexSet(0, key, null); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$canonicalize$4$baseImporter$baseUrl$forImport, $async$completer); - }, - _async_import_cache$_canonicalize$4(importer, url, baseUrl, forImport) { - return this._canonicalize$body$AsyncImportCache(importer, url, baseUrl, forImport); - }, - _canonicalize$body$AsyncImportCache(importer, url, baseUrl, forImport) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_and_bool), - $async$returnValue, t1, passContainingUrl, canonicalizeContext, result, cacheable; - var $async$_async_import_cache$_canonicalize$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = baseUrl != null ? 3 : 5; - break; - case 3: - // then - $async$goto = url.get$scheme() !== "" ? 6 : 8; - break; - case 6: - // then - t1 = A._Future$value(importer.isNonCanonicalScheme$1(url.get$scheme()), type$.bool); - $async$goto = 9; - return A._asyncAwait(t1, $async$_async_import_cache$_canonicalize$4); - case 9: - // returning from await. - t1 = $async$result; - passContainingUrl = t1; - // goto join - $async$goto = 7; - break; - case 8: - // else - passContainingUrl = true; - case 7: - // join - // goto join - $async$goto = 4; - break; - case 5: - // else - passContainingUrl = false; - case 4: - // join - canonicalizeContext = new A.CanonicalizeContext(forImport, passContainingUrl ? baseUrl : null); - t1 = type$.nullable_Object; - t1 = A.runZoned(new A.AsyncImportCache__canonicalize_closure(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, canonicalizeContext], t1, t1), type$.FutureOr_nullable_Uri); - $async$goto = 10; - return A._asyncAwait(type$.Future_nullable_Uri._is(t1) ? t1 : A._Future$value(t1, type$.nullable_Uri), $async$_async_import_cache$_canonicalize$4); - case 10: - // returning from await. - result = $async$result; - cacheable = !passContainingUrl || !canonicalizeContext._wasContainingUrlAccessed; - if (result == null) { - $async$returnValue = new A._Record_2(null, cacheable); - // goto return - $async$goto = 1; - break; - } - $async$goto = result.get$scheme() !== "" ? 11 : 13; - break; - case 11: - // then - t1 = A._Future$value(importer.isNonCanonicalScheme$1(result.get$scheme()), type$.bool); - $async$goto = 14; - return A._asyncAwait(t1, $async$_async_import_cache$_canonicalize$4); - case 14: - // returning from await. - t1 = $async$result; - // goto join - $async$goto = 12; - break; - case 13: - // else - t1 = false; - case 12: - // join - if (t1) - throw A.wrapException("Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2c_whicu); - $async$returnValue = new A._Record_2(new A._Record_3_originalUrl(importer, result, url), cacheable); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_import_cache$_canonicalize$4, $async$completer); - }, - importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { - return this.importCanonical$body$AsyncImportCache(importer, canonicalUrl, originalUrl); - }, - importCanonical$body$AsyncImportCache(importer, canonicalUrl, originalUrl) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet), - $async$returnValue, $async$self = this; - var $async$importCanonical$3$originalUrl = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait(A.putIfAbsentAsync($async$self._async_import_cache$_importCache, canonicalUrl, new A.AsyncImportCache_importCanonical_closure($async$self, importer, canonicalUrl, originalUrl), type$.Uri, type$.nullable_Stylesheet), $async$importCanonical$3$originalUrl); - case 3: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$importCanonical$3$originalUrl, $async$completer); - }, - humanize$1(canonicalUrl) { - var t1 = type$.NonNullsIterable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl; - t1 = A.NullableExtension_andThen(A.minBy(new A.MappedIterable(new A.WhereIterable(new A.NonNullsIterable(this._async_import_cache$_canonicalizeCache.get$values(0), t1), new A.AsyncImportCache_humanize_closure(canonicalUrl), t1._eval$1("WhereIterable")), new A.AsyncImportCache_humanize_closure0(), t1._eval$1("MappedIterable")), new A.AsyncImportCache_humanize_closure1()), new A.AsyncImportCache_humanize_closure2(canonicalUrl)); - return t1 == null ? canonicalUrl : t1; - }, - sourceMapUrl$1(_, canonicalUrl) { - var t1 = this._async_import_cache$_resultsCache.$index(0, canonicalUrl); - t1 = t1 == null ? null : t1.get$sourceMapUrl(0); - return t1 == null ? canonicalUrl : t1; - } - }; - A.AsyncImportCache_canonicalize_closure.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl), - $async$returnValue, $async$self = this, t1, t2, _0_0, result; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self.baseUrl; - $async$goto = 3; - return A._asyncAwait(t1._async_import_cache$_canonicalize$4($async$self.baseImporter, $async$self.resolvedUrl, t2, $async$self.forImport), $async$call$0); - case 3: - // returning from await. - _0_0 = $async$result; - result = _0_0._0; - _0_0._1; - if (t2 != null) - t1._async_import_cache$_nonCanonicalRelativeUrls.$indexSet(0, $async$self.key, $async$self.url); - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 545 - }; - A.AsyncImportCache__canonicalize_closure.prototype = { - call$0() { - return this.importer.canonicalize$1(0, this.url); - }, - $signature: 184 - }; - A.AsyncImportCache_importCanonical_closure.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet), - $async$returnValue, $async$self = this, t3, t1, t2, result; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.canonicalUrl; - t2 = A._Future$value($async$self.importer.load$1(0, t1), type$.nullable_ImporterResult); - $async$goto = 3; - return A._asyncAwait(t2, $async$call$0); - case 3: - // returning from await. - result = $async$result; - if (result == null) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - $async$self.$this._async_import_cache$_resultsCache.$indexSet(0, t1, result); - t2 = result.contents; - t3 = result.syntax; - t1 = $async$self.originalUrl.resolveUri$1(t1); - $async$returnValue = A.Stylesheet_Stylesheet$parse(t2, t3, t1); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 568 - }; - A.AsyncImportCache_humanize_closure.prototype = { - call$1(result) { - return result._1.$eq(0, this.canonicalUrl); - }, - $signature: 579 - }; - A.AsyncImportCache_humanize_closure0.prototype = { - call$1(result) { - return result._2; - }, - $signature: 609 - }; - A.AsyncImportCache_humanize_closure1.prototype = { - call$1(url) { - return url.get$path(url).length; - }, - $signature: 112 - }; - A.AsyncImportCache_humanize_closure2.prototype = { - call$1(url) { - var t1 = $.$get$url(), - t2 = this.canonicalUrl; - return url.resolve$1(0, A.ParsedPath_ParsedPath$parse(t2.get$path(t2), t1.style).get$basename()); - }, - $signature: 47 - }; - A.AsyncBuiltInCallable.prototype = { - callbackFor$2(positional, names) { - return new A._Record_2(this._async_built_in$_arguments, this._async_built_in$_callback); - }, - withDeprecationWarning$1(module) { - return new A.AsyncBuiltInCallable(this.name, this._async_built_in$_arguments, new A.AsyncBuiltInCallable_withDeprecationWarning_closure(this, module, null), false); - }, - $isAsyncCallable: 1, - get$name(receiver) { - return this.name; - }, - get$acceptsContent() { - return this.acceptsContent; - } - }; - A.AsyncBuiltInCallable$mixin_closure.prototype = { - call$1($arguments) { - return this.$call$body$AsyncBuiltInCallable$mixin_closure($arguments); - }, - $call$body$AsyncBuiltInCallable$mixin_closure($arguments) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$self = this, t1; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.callback.call$1($arguments); - $async$goto = 3; - return A._asyncAwait(t1 instanceof A._Future ? t1 : A._Future$value(t1, type$.void), $async$call$1); - case 3: - // returning from await. - $async$returnValue = B.C__SassNull; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 192 - }; - A.AsyncBuiltInCallable_withDeprecationWarning_closure.prototype = { - call$1(args) { - var t1 = this.$this; - A.warnForDeprecation(string$.Global + this.module + "." + t1.name + string$.x20inste, B.Deprecation_0Gh); - return t1._async_built_in$_callback.call$1(args); - }, - $signature: 299 - }; - A.BuiltInCallable.prototype = { - callbackFor$2(positional, names) { - var t1, t2, fuzzyMatch, minMismatchDistance, _i, overload, t3, mismatchDistance, t4; - for (t1 = this._overloads, t2 = t1.length, fuzzyMatch = null, minMismatchDistance = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - overload = t1[_i]; - t3 = overload._0; - if (t3.matches$2(positional, names)) - return overload; - mismatchDistance = t3.$arguments.length - positional; - if (minMismatchDistance != null) { - t3 = Math.abs(mismatchDistance); - t4 = Math.abs(minMismatchDistance); - if (t3 > t4) - continue; - if (t3 === t4 && mismatchDistance < 0) - continue; - } - minMismatchDistance = mismatchDistance; - fuzzyMatch = overload; - } - if (fuzzyMatch != null) - return fuzzyMatch; - throw A.wrapException(A.StateError$("BuiltInCallable " + this.name + " may not have empty overloads.")); - }, - withName$1($name) { - return new A.BuiltInCallable($name, this._overloads, this.acceptsContent); - }, - withDeprecationWarning$2(module, newName) { - var t2, t3, _i, t4, t5, _this = this, - t1 = A._setArrayType([], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value); - for (t2 = _this._overloads, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - t4 = {}; - t5 = t2[_i]; - t4.$function = null; - t4.$function = t5._1; - t1.push(new A._Record_2(t5._0, new A.BuiltInCallable_withDeprecationWarning_closure(t4, _this, module, newName))); - } - return new A.BuiltInCallable(_this.name, t1, _this.acceptsContent); - }, - withDeprecationWarning$1(module) { - return this.withDeprecationWarning$2(module, null); - }, - $isCallable0: 1, - $isAsyncCallable: 1, - $isAsyncBuiltInCallable: 1, - get$name(receiver) { - return this.name; - }, - get$acceptsContent() { - return this.acceptsContent; - } - }; - A.BuiltInCallable$mixin_closure.prototype = { - call$1($arguments) { - this.callback.call$1($arguments); - return B.C__SassNull; - }, - $signature: 4 - }; - A.BuiltInCallable_withDeprecationWarning_closure.prototype = { - call$1(args) { - var _this = this, - t1 = _this.newName; - if (t1 == null) - t1 = _this.$this.name; - A.warnForDeprecation(string$.Global + _this.module + "." + t1 + string$.x20inste, B.Deprecation_0Gh); - return _this._box_0.$function.call$1(args); - }, - $signature: 4 - }; - A.PlainCssCallable.prototype = { - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.PlainCssCallable && this.name === other.name; - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this.name); - }, - $isCallable0: 1, - $isAsyncCallable: 1, - get$name(receiver) { - return this.name; - } - }; - A.UserDefinedCallable.prototype = { - get$name(_) { - return this.declaration.name; - }, - $isCallable0: 1, - $isAsyncCallable: 1 - }; - A._compileStylesheet_closure.prototype = { - call$1(url) { - var t1; - if (url === "") { - t1 = this.stylesheet.span; - t1 = A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text(); - } else - t1 = this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); - return t1; - }, - $signature: 6 - }; - A.CompileResult.prototype = {}; - A.Configuration.prototype = { - throughForward$1($forward) { - var _0_0, _1_0, _2_0, t1, hiddenVariables, - newValues = this._configuration$_values; - if (newValues.get$isEmpty(newValues)) - return B.Configuration_Map_empty_null; - _0_0 = $forward.prefix; - if (_0_0 != null) - newValues = new A.UnprefixedMapView(newValues, _0_0, type$.UnprefixedMapView_ConfiguredValue); - _1_0 = $forward.shownVariables; - if (_1_0 != null) - newValues = new A.LimitedMapView(newValues, _1_0._base.intersection$1(new A.MapKeySet(newValues, type$.MapKeySet_nullable_Object)), type$.LimitedMapView_String_ConfiguredValue); - else { - _2_0 = $forward.hiddenVariables; - if (_2_0 != null) { - t1 = _2_0._base.get$isNotEmpty(0); - hiddenVariables = _2_0; - } else { - hiddenVariables = null; - t1 = false; - } - if (t1) - newValues = A.LimitedMapView$blocklist(newValues, hiddenVariables, type$.String, type$.ConfiguredValue); - } - return this._withValues$1(newValues); - }, - _withValues$1(values) { - var t1 = this.__originalConfiguration; - return new A.Configuration(values, t1 == null ? this : t1); - }, - toString$0(_) { - var t2, t3, - t1 = A._setArrayType([], type$.JSArray_String); - for (t2 = A.MapExtensions_get_pairs(new A.UnmodifiableMapView(this._configuration$_values, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue), t2 = t2.get$iterator(t2); t2.moveNext$0();) { - t3 = t2.get$current(t2); - t1.push("$" + t3._0 + ": " + t3._1.toString$0(0)); - } - return "(" + B.JSArray_methods.join$1(t1, ",") + ")"; - } - }; - A.ExplicitConfiguration.prototype = { - _withValues$1(values) { - var t1 = this.__originalConfiguration; - if (t1 == null) - t1 = this; - return new A.ExplicitConfiguration(this.nodeWithSpan, values, t1); - } - }; - A.ConfiguredValue.prototype = { - toString$0(_) { - return this.value.toString$0(0); - } - }; - A.Deprecation.prototype = { - _enumToString$0() { - return "Deprecation." + this._name; - }, - toString$0(_) { - return this.id; - } - }; - A.Deprecation_fromId_closure.prototype = { - call$1(deprecation) { - return deprecation.id === this.id; - }, - $signature: 305 - }; - A.Environment.prototype = { - closure$0() { - var t4, t5, t6, _this = this, - t1 = _this._forwardedModules, - t2 = _this._nestedForwardedModules, - t3 = _this._variables; - t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); - t4 = _this._variableNodes; - t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); - t5 = _this._functions; - t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); - t6 = _this._mixins; - t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); - return A.Environment$_(_this._environment$_modules, _this._namespaceNodes, _this._globalModules, _this._importedModules, t1, t2, _this._allModules, t3, t4, t5, t6, _this._content); - }, - forwardModule$2(module, rule) { - var view, t1, t2, _this = this, - forwardedModules = _this._forwardedModules; - if (forwardedModules == null) - forwardedModules = _this._forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable, type$.AstNode); - view = A.ForwardedModuleView_ifNecessary(module, rule, type$.Callable); - for (t1 = A.LinkedHashMapKeyIterator$(forwardedModules, forwardedModules.__js_helper$_modifications); t1.moveNext$0();) { - t2 = t1.__js_helper$_current; - _this._assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); - _this._assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); - _this._assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); - } - _this._allModules.push(module); - forwardedModules.$indexSet(0, view, rule); - }, - _assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { - var larger, smaller, t1, t2, t3, t4, $name, small, large, span; - if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { - larger = oldMembers; - smaller = newMembers; - } else { - larger = newMembers; - smaller = oldMembers; - } - for (t1 = type$.String, t2 = A.MapExtensions_get_pairs(smaller, t1, type$.Object), t2 = t2.get$iterator(t2), t3 = type === "variable"; t2.moveNext$0();) { - t4 = t2.get$current(t2); - $name = t4._0; - small = t4._1; - large = larger.$index(0, $name); - if (large == null) - continue; - if (t3 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(large, small)) - continue; - if (t3) - $name = "$" + $name; - t2 = this._forwardedModules; - if (t2 == null) - span = null; - else { - t2 = t2.$index(0, oldModule); - span = t2 == null ? null : J.get$span$z(t2); - } - t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, t1); - if (span != null) - t2.$indexSet(0, span, "original @forward"); - throw A.wrapException(A.MultiSpanSassScriptException$("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t2)); - } - }, - importForwards$1(module) { - var forwardedModules, t1, t2, t3, t4, node, t5, t6, t7, t8, t9, t10, _i, t11, shadowed, t12, _length, _list, _this = this, - forwarded = module._environment$_environment._forwardedModules; - if (forwarded == null) - return; - forwardedModules = _this._forwardedModules; - if (forwardedModules != null) { - t1 = type$.Module_Callable; - t2 = type$.AstNode; - t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t1 = A.MapExtensions_get_pairs(forwarded, t1, t2), t1 = t1.get$iterator(t1), t2 = _this._globalModules; t1.moveNext$0();) { - t4 = t1.get$current(t1); - module = t4._0; - node = t4._1; - if (!forwardedModules.containsKey$1(module) || !t2.containsKey$1(module)) - t3.$indexSet(0, module, node); - } - forwarded = t3; - } else - forwardedModules = _this._forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable, type$.AstNode); - t1 = type$.String; - t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - for (t3 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t3.moveNext$0();) - for (t4 = t3.__js_helper$_current.get$variables(), t4 = J.get$iterator$ax(t4.get$keys(t4)); t4.moveNext$0();) - t2.add$1(0, t4.get$current(t4)); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) { - t5 = t4.__js_helper$_current; - for (t5 = t5.get$functions(t5), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) - t3.add$1(0, t5.get$current(t5)); - } - t1 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) - for (t5 = t4.__js_helper$_current.get$mixins(), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) - t1.add$1(0, t5.get$current(t5)); - t4 = _this._variables; - t5 = t4.length; - if (t5 === 1) { - for (t5 = _this._importedModules, t6 = type$.Module_Callable, t7 = type$.AstNode, t8 = A.MapExtensions_get_pairs(t5, t6, t7).toList$0(0), t9 = t8.length, t10 = type$.Callable, _i = 0; _i < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i) { - t11 = t8[_i]; - module = t11._0; - node = t11._1; - shadowed = A.ShadowedModuleView_ifNecessary(module, t3, t1, t2, t10); - if (shadowed != null) { - t5.remove$1(0, module); - t11 = shadowed.variables; - t12 = false; - if (t11.get$isEmpty(t11)) { - t11 = shadowed.functions; - if (t11.get$isEmpty(t11)) { - t11 = shadowed.mixins; - if (t11.get$isEmpty(t11)) { - t11 = shadowed._shadowed_view$_inner; - t11 = t11.get$css(t11); - t11 = J.get$isEmpty$asx(t11.get$children(t11)); - } else - t11 = t12; - } else - t11 = t12; - } else - t11 = t12; - if (!t11) - t5.$indexSet(0, shadowed, node); - } - } - for (t6 = A.MapExtensions_get_pairs(forwardedModules, t6, t7).toList$0(0), t7 = t6.length, _i = 0; _i < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i) { - t8 = t6[_i]; - module = t8._0; - node = t8._1; - shadowed = A.ShadowedModuleView_ifNecessary(module, t3, t1, t2, t10); - if (shadowed != null) { - forwardedModules.remove$1(0, module); - t8 = shadowed.variables; - t9 = false; - if (t8.get$isEmpty(t8)) { - t8 = shadowed.functions; - if (t8.get$isEmpty(t8)) { - t8 = shadowed.mixins; - if (t8.get$isEmpty(t8)) { - t8 = shadowed._shadowed_view$_inner; - t8 = t8.get$css(t8); - t8 = J.get$isEmpty$asx(t8.get$children(t8)); - } else - t8 = t9; - } else - t8 = t9; - } else - t8 = t9; - if (!t8) - forwardedModules.$indexSet(0, shadowed, node); - } - } - t5.addAll$1(0, forwarded); - forwardedModules.addAll$1(0, forwarded); - } else { - t6 = _this._nestedForwardedModules; - if (t6 == null) { - _length = t5 - 1; - _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_Callable); - for (t5 = type$.JSArray_Module_Callable, _i = 0; _i < _length; ++_i) - _list[_i] = A._setArrayType([], t5); - _this._nestedForwardedModules = _list; - t5 = _list; - } else - t5 = t6; - B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t5), new A.LinkedHashMapKeyIterable(forwarded, A._instanceType(forwarded)._eval$1("LinkedHashMapKeyIterable<1>"))); - } - for (t2 = A._LinkedHashSetIterator$(t2, t2._modifications, t2.$ti._precomputed1), t5 = _this._variableIndices, t6 = _this._variableNodes, t7 = t2.$ti._precomputed1; t2.moveNext$0();) { - t8 = t2._collection$_current; - if (t8 == null) - t8 = t7._as(t8); - t5.remove$1(0, t8); - J.remove$1$z(B.JSArray_methods.get$last(t4), t8); - J.remove$1$z(B.JSArray_methods.get$last(t6), t8); - } - for (t2 = A._LinkedHashSetIterator$(t3, t3._modifications, t3.$ti._precomputed1), t3 = _this._functionIndices, t4 = _this._functions, t5 = t2.$ti._precomputed1; t2.moveNext$0();) { - t6 = t2._collection$_current; - if (t6 == null) - t6 = t5._as(t6); - t3.remove$1(0, t6); - J.remove$1$z(B.JSArray_methods.get$last(t4), t6); - } - for (t1 = A._LinkedHashSetIterator$(t1, t1._modifications, t1.$ti._precomputed1), t2 = _this._mixinIndices, t3 = _this._mixins, t4 = t1.$ti._precomputed1; t1.moveNext$0();) { - t5 = t1._collection$_current; - if (t5 == null) - t5 = t4._as(t5); - t2.remove$1(0, t5); - J.remove$1$z(B.JSArray_methods.get$last(t3), t5); - } - }, - getVariable$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) - return _this._getModule$1(namespace).get$variables().$index(0, $name); - if (_this._lastVariableName === $name) { - t1 = _this._lastVariableIndex; - t1.toString; - t1 = J.$index$asx(_this._variables[t1], $name); - return t1 == null ? _this._getVariableFromGlobalModule$1($name) : t1; - } - t1 = _this._variableIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - _this._lastVariableName = $name; - _this._lastVariableIndex = _0_0; - t1 = J.$index$asx(_this._variables[_0_0], $name); - return t1 == null ? _this._getVariableFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._variableIndex$1($name); - if (_1_0 != null) { - _this._lastVariableName = $name; - _this._lastVariableIndex = _1_0; - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._variables[_1_0], $name); - return t1 == null ? _this._getVariableFromGlobalModule$1($name) : t1; - } else - return _this._getVariableFromGlobalModule$1($name); - } - }, - getVariable$1($name) { - return this.getVariable$2$namespace($name, null); - }, - _getVariableFromGlobalModule$1($name) { - return this._fromOneModule$3($name, "variable", new A.Environment__getVariableFromGlobalModule_closure($name)); - }, - getVariableNode$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) - return _this._getModule$1(namespace).get$variableNodes().$index(0, $name); - if (_this._lastVariableName === $name) { - t1 = _this._lastVariableIndex; - t1.toString; - t1 = J.$index$asx(_this._variableNodes[t1], $name); - return t1 == null ? _this._getVariableNodeFromGlobalModule$1($name) : t1; - } - t1 = _this._variableIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - _this._lastVariableName = $name; - _this._lastVariableIndex = _0_0; - t1 = J.$index$asx(_this._variableNodes[_0_0], $name); - return t1 == null ? _this._getVariableNodeFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._variableIndex$1($name); - if (_1_0 != null) { - _this._lastVariableName = $name; - _this._lastVariableIndex = _1_0; - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._variableNodes[_1_0], $name); - return t1 == null ? _this._getVariableNodeFromGlobalModule$1($name) : t1; - } else - return _this._getVariableNodeFromGlobalModule$1($name); - } - }, - _getVariableNodeFromGlobalModule$1($name) { - var t1, t2, _0_0; - for (t1 = this._importedModules, t2 = this._globalModules, t2 = new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeyIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { - t1 = t2._currentIterator; - _0_0 = t1.get$current(t1).get$variableNodes().$index(0, $name); - if (_0_0 != null) - return _0_0; - } - return null; - }, - globalVariableExists$2$namespace($name, namespace) { - if (namespace != null) - return this._getModule$1(namespace).get$variables().containsKey$1($name); - if (B.JSArray_methods.get$first(this._variables).containsKey$1($name)) - return true; - return this._getVariableFromGlobalModule$1($name) != null; - }, - globalVariableExists$1($name) { - return this.globalVariableExists$2$namespace($name, null); - }, - _variableIndex$1($name) { - var t1, i; - for (t1 = this._variables, i = t1.length - 1; i >= 0; --i) - if (t1[i].containsKey$1($name)) - return i; - return null; - }, - setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { - var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; - if (namespace != null) { - _this._getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); - return; - } - if (global || _this._variables.length === 1) { - _this._variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure(_this, $name)); - t1 = _this._variables; - if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { - moduleWithName = _this._fromOneModule$3($name, "variable", new A.Environment_setVariable_closure0($name)); - if (moduleWithName != null) { - moduleWithName.setVariable$3($name, value, nodeWithSpan); - return; - } - } - J.$indexSet$ax(B.JSArray_methods.get$first(t1), $name, value); - J.$indexSet$ax(B.JSArray_methods.get$first(_this._variableNodes), $name, nodeWithSpan); - return; - } - nestedForwardedModules = _this._nestedForwardedModules; - if (nestedForwardedModules != null && !_this._variableIndices.containsKey$1($name) && _this._variableIndex$1($name) == null) - for (t1 = A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(nestedForwardedModules, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { - t3 = t2.__internal$_current; - for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { - t5 = t3.__internal$_current; - if (t5 == null) - t5 = t4._as(t5); - if (t5.get$variables().containsKey$1($name)) { - t5.setVariable$3($name, value, nodeWithSpan); - return; - } - } - } - if (_this._lastVariableName === $name) { - t1 = _this._lastVariableIndex; - t1.toString; - index = t1; - } else - index = _this._variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure1(_this, $name)); - if (!_this._inSemiGlobalScope && index === 0) { - index = _this._variables.length - 1; - _this._variableIndices.$indexSet(0, $name, index); - } - _this._lastVariableName = $name; - _this._lastVariableIndex = index; - J.$indexSet$ax(_this._variables[index], $name, value); - J.$indexSet$ax(_this._variableNodes[index], $name, nodeWithSpan); - }, - setVariable$4$global($name, value, nodeWithSpan, global) { - return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); - }, - setLocalVariable$3($name, value, nodeWithSpan) { - var index, _this = this, - t1 = _this._variables, - t2 = t1.length; - _this._lastVariableName = $name; - index = _this._lastVariableIndex = t2 - 1; - _this._variableIndices.$indexSet(0, $name, index); - J.$indexSet$ax(t1[index], $name, value); - J.$indexSet$ax(_this._variableNodes[index], $name, nodeWithSpan); - }, - getFunction$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) { - t1 = _this._getModule$1(namespace); - return t1.get$functions(t1).$index(0, $name); - } - t1 = _this._functionIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - t1 = J.$index$asx(_this._functions[_0_0], $name); - return t1 == null ? _this._getFunctionFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._functionIndex$1($name); - if (_1_0 != null) { - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._functions[_1_0], $name); - return t1 == null ? _this._getFunctionFromGlobalModule$1($name) : t1; - } else - return _this._getFunctionFromGlobalModule$1($name); - } - }, - getFunction$1($name) { - return this.getFunction$2$namespace($name, null); - }, - _getFunctionFromGlobalModule$1($name) { - return this._fromOneModule$3($name, "function", new A.Environment__getFunctionFromGlobalModule_closure($name)); - }, - _functionIndex$1($name) { - var t1, i; - for (t1 = this._functions, i = t1.length - 1; i >= 0; --i) - if (t1[i].containsKey$1($name)) - return i; - return null; - }, - getMixin$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) - return _this._getModule$1(namespace).get$mixins().$index(0, $name); - t1 = _this._mixinIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - t1 = J.$index$asx(_this._mixins[_0_0], $name); - return t1 == null ? _this._getMixinFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._mixinIndex$1($name); - if (_1_0 != null) { - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._mixins[_1_0], $name); - return t1 == null ? _this._getMixinFromGlobalModule$1($name) : t1; - } else - return _this._getMixinFromGlobalModule$1($name); - } - }, - _getMixinFromGlobalModule$1($name) { - return this._fromOneModule$3($name, "mixin", new A.Environment__getMixinFromGlobalModule_closure($name)); - }, - _mixinIndex$1($name) { - var t1, i; - for (t1 = this._mixins, i = t1.length - 1; i >= 0; --i) - if (t1[i].containsKey$1($name)) - return i; - return null; - }, - withContent$2($content, callback) { - var oldContent = this._content; - this._content = $content; - callback.call$0(); - this._content = oldContent; - }, - asMixin$1(callback) { - var oldInMixin = this._inMixin; - this._inMixin = true; - callback.call$0(); - this._inMixin = oldInMixin; - }, - scope$1$3$semiGlobal$when(callback, semiGlobal, when) { - var wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6, _this = this; - semiGlobal = semiGlobal && _this._inSemiGlobalScope; - wasInSemiGlobalScope = _this._inSemiGlobalScope; - _this._inSemiGlobalScope = semiGlobal; - if (!when) - try { - t1 = callback.call$0(); - return t1; - } finally { - _this._inSemiGlobalScope = wasInSemiGlobalScope; - } - t1 = _this._variables; - t2 = type$.String; - B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value)); - t3 = _this._variableNodes; - B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode)); - t4 = _this._functions; - t5 = type$.Callable; - B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); - t6 = _this._mixins; - B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); - t5 = _this._nestedForwardedModules; - if (t5 != null) - t5.push(A._setArrayType([], type$.JSArray_Module_Callable)); - try { - t2 = callback.call$0(); - return t2; - } finally { - _this._inSemiGlobalScope = wasInSemiGlobalScope; - _this._lastVariableIndex = _this._lastVariableName = null; - for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t1))), t2 = _this._variableIndices; t1.moveNext$0();) { - $name = t1.get$current(t1); - t2.remove$1(0, $name); - } - B.JSArray_methods.removeLast$0(t3); - for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t4))), t2 = _this._functionIndices; t1.moveNext$0();) { - name0 = t1.get$current(t1); - t2.remove$1(0, name0); - } - for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t6))), t2 = _this._mixinIndices; t1.moveNext$0();) { - name1 = t1.get$current(t1); - t2.remove$1(0, name1); - } - t1 = _this._nestedForwardedModules; - if (t1 != null) - t1.pop(); - } - }, - scope$1$1(callback) { - return this.scope$1$3$semiGlobal$when(callback, false, true); - }, - scope$1$2$when(callback, when) { - return this.scope$1$3$semiGlobal$when(callback, false, when); - }, - scope$1$2$semiGlobal(callback, semiGlobal) { - return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true); - }, - toImplicitConfiguration$0() { - var t2, t3, t4, i, values, nodes, t5, t6, $name, value, - t1 = type$.String, - configuration = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ConfiguredValue); - for (t2 = this._variables, t3 = type$.Value, t4 = this._variableNodes, i = 0; i < t2.length; ++i) { - values = t2[i]; - nodes = t4[i]; - for (t5 = A.MapExtensions_get_pairs(values, t1, t3), t5 = t5.get$iterator(t5); t5.moveNext$0();) { - t6 = t5.get$current(t5); - $name = t6._0; - value = t6._1; - t6 = nodes.$index(0, $name); - t6.toString; - configuration.$indexSet(0, $name, new A.ConfiguredValue(value, null, t6)); - } - } - return new A.Configuration(configuration, null); - }, - toModule$3(css, preModuleComments, extensionStore) { - return A._EnvironmentModule__EnvironmentModule(this, css, preModuleComments, extensionStore, A.NullableExtension_andThen(this._forwardedModules, new A.Environment_toModule_closure())); - }, - toDummyModule$0() { - return A._EnvironmentModule__EnvironmentModule(this, new A.CssStylesheet(new A.UnmodifiableListView(B.List_empty3, type$.UnmodifiableListView_CssNode), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.Map_empty0, B.C_EmptyExtensionStore, A.NullableExtension_andThen(this._forwardedModules, new A.Environment_toDummyModule_closure())); - }, - _getModule$1(namespace) { - var _0_0 = this._environment$_modules.$index(0, namespace); - if (_0_0 != null) - return _0_0; - throw A.wrapException(A.SassScriptException$('There is no module with the namespace "' + namespace + '".', null)); - }, - _fromOneModule$1$3($name, type, callback) { - var t1, t2, t3, t4, t5, _1_0, _2_0, value, identity, valueInModule, identityFromModule, module, node, - _0_0 = this._nestedForwardedModules; - if (_0_0 != null) - for (t1 = A._arrayInstanceType(_0_0)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(_0_0, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { - t3 = t2.__internal$_current; - for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { - t5 = t3.__internal$_current; - _1_0 = callback.call$1(t5 == null ? t4._as(t5) : t5); - if (_1_0 != null) - return _1_0; - } - } - for (t1 = this._importedModules, t1 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications); t1.moveNext$0();) { - _2_0 = callback.call$1(t1.__js_helper$_current); - if (_2_0 != null) - return _2_0; - } - for (t1 = this._globalModules, t2 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications), t3 = type$.Callable, value = null, identity = null; t2.moveNext$0();) { - t4 = t2.__js_helper$_current; - valueInModule = callback.call$1(t4); - if (valueInModule == null) - continue; - identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); - if (identityFromModule.$eq(0, identity)) - continue; - if (value != null) { - t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - for (t3 = A.MapExtensions_get_pairs(t1, type$.Module_Callable, type$.AstNode), t3 = t3.get$iterator(t3), t4 = "includes " + type; t3.moveNext$0();) { - t1 = t3.get$current(t3); - module = t1._0; - node = t1._1; - if (callback.call$1(module) != null) - t2.$indexSet(0, node.get$span(node), t4); - } - throw A.wrapException(A.MultiSpanSassScriptException$("This " + type + string$.x20is_av, type + " use", t2)); - } - identity = identityFromModule; - value = valueInModule; - } - return value; - }, - _fromOneModule$3($name, type, callback) { - return this._fromOneModule$1$3($name, type, callback, type$.dynamic); - } - }; - A.Environment__getVariableFromGlobalModule_closure.prototype = { - call$1(module) { - return module.get$variables().$index(0, this.name); - }, - $signature: 306 - }; - A.Environment_setVariable_closure.prototype = { - call$0() { - var t1 = this.$this; - t1._lastVariableName = this.name; - return t1._lastVariableIndex = 0; - }, - $signature: 10 - }; - A.Environment_setVariable_closure0.prototype = { - call$1(module) { - return module.get$variables().containsKey$1(this.name) ? module : null; - }, - $signature: 308 - }; - A.Environment_setVariable_closure1.prototype = { - call$0() { - var t1 = this.$this, - t2 = t1._variableIndex$1(this.name); - return t2 == null ? t1._variables.length - 1 : t2; - }, - $signature: 10 - }; - A.Environment__getFunctionFromGlobalModule_closure.prototype = { - call$1(module) { - return module.get$functions(module).$index(0, this.name); - }, - $signature: 197 - }; - A.Environment__getMixinFromGlobalModule_closure.prototype = { - call$1(module) { - return module.get$mixins().$index(0, this.name); - }, - $signature: 197 - }; - A.Environment_toModule_closure.prototype = { - call$1(modules) { - return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable); - }, - $signature: 198 - }; - A.Environment_toDummyModule_closure.prototype = { - call$1(modules) { - return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable); - }, - $signature: 198 - }; - A._EnvironmentModule.prototype = { - get$url(_) { - var t1 = this.css; - t1 = t1.get$span(t1); - return t1.get$sourceUrl(t1); - }, - setVariable$3($name, value, nodeWithSpan) { - var t1, t2, - _0_0 = this._modulesByVariable.$index(0, $name); - if (_0_0 != null) { - _0_0.setVariable$3($name, value, nodeWithSpan); - return; - } - t1 = this._environment$_environment; - t2 = t1._variables; - if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) - throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); - J.$indexSet$ax(B.JSArray_methods.get$first(t2), $name, value); - J.$indexSet$ax(B.JSArray_methods.get$first(t1._variableNodes), $name, nodeWithSpan); - return; - }, - variableIdentity$1($name) { - var module = this._modulesByVariable.$index(0, $name); - return module == null ? this : module.variableIdentity$1($name); - }, - cloneCss$0() { - var _0_0, _this = this; - if (!_this.transitivelyContainsCss) - return _this; - _0_0 = A.cloneCssStylesheet(_this.css, _this.extensionStore); - return A._EnvironmentModule$_(_this._environment$_environment, _0_0._0, _this.preModuleComments, _0_0._1, _this._modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, true, _this.transitivelyContainsExtensions); - }, - toString$0(_) { - var t1 = this.css, - t2 = t1.get$span(t1); - if (t2.get$sourceUrl(t2) == null) - t1 = ""; - else { - t1 = t1.get$span(t1); - t1 = t1.get$sourceUrl(t1); - t2 = $.$get$context(); - t1.toString; - t1 = t2.prettyUri$1(t1); - } - return t1; - }, - $isModule0: 1, - get$upstream() { - return this.upstream; - }, - get$variables() { - return this.variables; - }, - get$variableNodes() { - return this.variableNodes; - }, - get$functions(receiver) { - return this.functions; - }, - get$mixins() { - return this.mixins; - }, - get$extensionStore() { - return this.extensionStore; - }, - get$css(receiver) { - return this.css; - }, - get$preModuleComments() { - return this.preModuleComments; - }, - get$transitivelyContainsCss() { - return this.transitivelyContainsCss; - }, - get$transitivelyContainsExtensions() { - return this.transitivelyContainsExtensions; - } - }; - A._EnvironmentModule__EnvironmentModule_closure.prototype = { - call$1(module) { - return module.get$variables(); - }, - $signature: 321 - }; - A._EnvironmentModule__EnvironmentModule_closure0.prototype = { - call$1(module) { - return module.get$variableNodes(); - }, - $signature: 324 - }; - A._EnvironmentModule__EnvironmentModule_closure1.prototype = { - call$1(module) { - return module.get$functions(module); - }, - $signature: 203 - }; - A._EnvironmentModule__EnvironmentModule_closure2.prototype = { - call$1(module) { - return module.get$mixins(); - }, - $signature: 203 - }; - A._EnvironmentModule__EnvironmentModule_closure3.prototype = { - call$1(module) { - return module.get$transitivelyContainsCss(); - }, - $signature: 118 - }; - A._EnvironmentModule__EnvironmentModule_closure4.prototype = { - call$1(module) { - return module.get$transitivelyContainsExtensions(); - }, - $signature: 118 - }; - A.SassException.prototype = { - get$trace(_) { - return A.Trace$(A._setArrayType([A.frameForSpan(A.SourceSpanException.prototype.get$span.call(this, 0), "root stylesheet", null)], type$.JSArray_Frame), null); - }, - get$span(_) { - return A.SourceSpanException.prototype.get$span.call(this, 0); - }, - withAdditionalSpan$2(span, label) { - return A.MultiSpanSassException$(this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), this.loadedUrls); - }, - withTrace$1(trace) { - var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), - t2 = A.Set_Set$unmodifiable(this.loadedUrls, type$.Uri); - return new A.SassRuntimeException(trace, t2, this._span_exception$_message, t1); - }, - withLoadedUrls$1(loadedUrls) { - var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), - t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); - return new A.SassException(t2, this._span_exception$_message, t1); - }, - toString$1$color(_, color) { - var t2, _i, frame, t3, _this = this, - buffer = new A.StringBuffer(""), - t1 = "" + ("Error: " + _this._span_exception$_message + "\n"); - buffer._contents = t1; - buffer._contents = t1 + A.SourceSpanException.prototype.get$span.call(_this, 0).highlight$1$color(color); - for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { - frame = t1[_i]; - if (J.get$length$asx(frame) === 0) - continue; - t3 = buffer._contents += "\n"; - buffer._contents = t3 + (" " + A.S(frame)); - } - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - toString$0(_) { - return this.toString$1$color(0, null); - }, - toCssString$0() { - var commentMessage, stringMessage, rune, - t1 = $._glyphs, - t2 = $._glyphs = B.C_AsciiGlyphSet, - t3 = this.toString$1$color(0, false); - t3 = A.stringReplaceAllUnchecked(t3, "*/", "*\u2215"); - commentMessage = A.stringReplaceAllUnchecked(t3, "\r\n", "\n"); - $._glyphs = t1 === B.C_AsciiGlyphSet ? t2 : B.C_UnicodeGlyphSet; - stringMessage = new A.StringBuffer(""); - for (t1 = new A.RuneIterator(A.serializeValue(new A.SassString(this.toString$1$color(0, false), true), true, true)); t1.moveNext$0();) { - rune = t1._currentCodePoint; - if (rune > 127) { - t2 = A.Primitives_stringFromCharCode(92); - stringMessage._contents += t2; - t2 = B.JSInt_methods.toRadixString$1(rune, 16); - stringMessage._contents += t2; - t2 = A.Primitives_stringFromCharCode(32); - stringMessage._contents += t2; - } else { - t2 = A.Primitives_stringFromCharCode(rune); - stringMessage._contents += t2; - } - } - return "/* " + B.JSArray_methods.join$1(A._setArrayType(commentMessage.split("\n"), type$.JSArray_String), "\n * ") + ' */\n\nbody::before {\n font-family: "Source Code Pro", "SF Mono", Monaco, Inconsolata, "Fira Mono",\n "Droid Sans Mono", monospace, monospace;\n white-space: pre;\n display: block;\n padding: 1em;\n margin-bottom: 1em;\n border-bottom: 2px solid black;\n content: ' + stringMessage.toString$0(0) + ";\n}"; - } - }; - A.MultiSpanSassException.prototype = { - withAdditionalSpan$2(span, label) { - var _this = this, - t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), - t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); - t2.$indexSet(0, span, label); - return A.MultiSpanSassException$(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.loadedUrls); - }, - withTrace$1(trace) { - var _this = this; - return A.MultiSpanSassRuntimeException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, trace, _this.loadedUrls); - }, - withLoadedUrls$1(loadedUrls) { - var _this = this; - return A.MultiSpanSassException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, loadedUrls); - }, - toString$1$color(_, color) { - var t1, t2, _i, frame, t3, _this = this, - useColor = color === true, - buffer = new A.StringBuffer("Error: " + _this._span_exception$_message + "\n"); - A.NullableExtension_andThen(A.Highlighter$multiple(A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, useColor, null, null).highlight$0(), buffer.get$write(buffer)); - for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { - frame = t1[_i]; - if (J.get$length$asx(frame) === 0) - continue; - buffer._contents += "\n"; - t3 = " " + A.S(frame); - buffer._contents += t3; - } - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - toString$0(_) { - return this.toString$1$color(0, null); - }, - get$primaryLabel() { - return this.primaryLabel; - }, - get$secondarySpans() { - return this.secondarySpans; - } - }; - A.SassRuntimeException.prototype = { - withAdditionalSpan$2(span, label) { - var _this = this; - return A.MultiSpanSassRuntimeException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), _this.trace, _this.loadedUrls); - }, - withLoadedUrls$1(loadedUrls) { - var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), - t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); - return new A.SassRuntimeException(this.trace, t2, this._span_exception$_message, t1); - }, - get$trace(receiver) { - return this.trace; - } - }; - A.MultiSpanSassRuntimeException.prototype = { - withAdditionalSpan$2(span, label) { - var _this = this, - t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), - t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); - t2.$indexSet(0, span, label); - return A.MultiSpanSassRuntimeException$(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.trace, _this.loadedUrls); - }, - withLoadedUrls$1(loadedUrls) { - var _this = this; - return A.MultiSpanSassRuntimeException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, _this.trace, loadedUrls); - }, - $isSassRuntimeException: 1, - get$trace(receiver) { - return this.trace; - } - }; - A.SassFormatException.prototype = { - get$source() { - var t1 = A.SourceSpanException.prototype.get$span.call(this, 0); - return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); - }, - withAdditionalSpan$2(span, label) { - return A.MultiSpanSassFormatException$(this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), this.loadedUrls); - }, - withLoadedUrls$1(loadedUrls) { - var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), - t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); - return new A.SassFormatException(t2, this._span_exception$_message, t1); - }, - $isFormatException: 1, - $isSourceSpanFormatException: 1 - }; - A.MultiSpanSassFormatException.prototype = { - get$source() { - var t1 = A.SourceSpanException.prototype.get$span.call(this, 0); - return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); - }, - withAdditionalSpan$2(span, label) { - var _this = this, - t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), - t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); - t2.$indexSet(0, span, label); - return A.MultiSpanSassFormatException$(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.loadedUrls); - }, - withLoadedUrls$1(loadedUrls) { - var _this = this; - return A.MultiSpanSassFormatException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, loadedUrls); - }, - $isFormatException: 1, - $isSassFormatException: 1, - $isSourceSpanFormatException: 1, - $isMultiSourceSpanFormatException: 1 - }; - A.SassScriptException.prototype = { - withSpan$1(span) { - return new A.SassException(B.Set_empty, this.message, span); - }, - toString$0(_) { - return this.message + string$.x0a_BUG_; - }, - get$message(receiver) { - return this.message; - } - }; - A.MultiSpanSassScriptException.prototype = { - withSpan$1(span) { - return A.MultiSpanSassException$(this.message, span, this.primaryLabel, this.secondarySpans, null); - } - }; - A._writeSourceMap_closure.prototype = { - call$1(url) { - return this.options.sourceMapUrl$2(0, A.Uri_parse(url), this.destination).toString$0(0); - }, - $signature: 6 - }; - A.ExecutableOptions.prototype = { - get$interactive() { - var result, _this = this, - value = _this.__ExecutableOptions_interactive_FI; - if (value === $) { - result = new A.ExecutableOptions_interactive_closure(_this).call$0(); - _this.__ExecutableOptions_interactive_FI !== $ && A.throwUnnamedLateFieldADI(); - _this.__ExecutableOptions_interactive_FI = result; - value = result; - } - return value; - }, - get$color() { - var t1 = this._options; - return t1.wasParsed$1("color") ? A._asBool(t1.$index(0, "color")) : A.hasTerminal(); - }, - get$pkgImporters() { - var t2, t3, t4, _null = null, - t1 = A._setArrayType([], type$.JSArray_Importer); - for (t2 = J.get$iterator$ax(type$.List_String._as(this._options.$index(0, "pkg-importer"))); t2.moveNext$0();) { - t2.get$current(t2); - t3 = new A.NodePackageImporter(); - t4 = self.process; - if (t4 == null) - t4 = _null; - else { - t4 = J.get$release$x(t4); - t4 = t4 == null ? _null : J.get$name$x(t4); - } - if (!J.$eq$(t4, "node") && self.document != null && typeof self.document.querySelector == "function") - A.throwExpression(string$.The_No); - t3.__NodePackageImporter__entryPointDirectory_F = $.$get$context().absolute$15(".", _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); - t1.push(t3); - } - return t1; - }, - get$emitErrorCss() { - var t1 = A._asBoolQ(this._options.$index(0, "error-css")); - if (t1 == null) { - this._ensureSources$0(); - t1 = this._sourcesToDestinations; - t1 = t1.get$values(t1).any$1(0, new A.ExecutableOptions_emitErrorCss_closure()); - } - return t1; - }, - _ensureSources$0() { - var t1, stdin, t2, t3, $directories, t4, t5, t6, colonArgs, positionalArgs, t7, t8, t9, message, target, source, destination, seen, _0_0, _this = this, _null = null, - _s18_ = 'Duplicate source "'; - if (_this._sourcesToDestinations != null) - return; - t1 = _this._options; - stdin = A._asBool(t1.$index(0, "stdin")); - t2 = t1.rest; - if (t2.get$length(0) === 0 && !stdin) - A.ExecutableOptions__fail("Compile Sass to CSS."); - t3 = type$.String; - $directories = A.LinkedHashSet_LinkedHashSet$_empty(t3); - for (t4 = t2.$ti, t5 = t4._eval$1("ListIterator"), t6 = new A.ListIterator(t2, t2.get$length(0), t5), t4 = t4._eval$1("ListBase.E"), colonArgs = false, positionalArgs = false; t6.moveNext$0();) { - t7 = t6.__internal$_current; - if (t7 == null) - t7 = t4._as(t7); - t8 = t7.length; - if (t8 === 0) - A.ExecutableOptions__fail('Invalid argument "".'); - if (A.stringContainsUnchecked(t7, ":", 0)) { - if (t8 > 2) { - t9 = t7.charCodeAt(0); - if (!(t9 >= 97 && t9 <= 122)) - t9 = t9 >= 65 && t9 <= 90; - else - t9 = true; - t9 = t9 && t7.charCodeAt(1) === 58; - } else - t9 = false; - if (t9) { - if (2 > t8) - A.throwExpression(A.RangeError$range(2, 0, t8, _null, _null)); - t8 = A.stringContainsUnchecked(t7, ":", 2); - } else - t8 = true; - } else - t8 = false; - if (t8) - colonArgs = true; - else if (A.dirExists(t7)) - $directories.add$1(0, t7); - else - positionalArgs = true; - } - if (positionalArgs || t2.get$length(0) === 0) { - if (colonArgs) - A.ExecutableOptions__fail('Positional and ":" arguments may not both be used.'); - else if (stdin) { - if (J.get$length$asx(t2._collection$_source) > 1) - A.ExecutableOptions__fail("Only one argument is allowed with --stdin."); - else if (A._asBool(t1.$index(0, "update"))) - A.ExecutableOptions__fail("--update is not allowed with --stdin."); - else if (A._asBool(t1.$index(0, "watch"))) - A.ExecutableOptions__fail("--watch is not allowed with --stdin."); - t1 = t2.get$length(0) === 0 ? _null : t2.get$first(t2); - t2 = type$.dynamic; - t3 = type$.nullable_String; - _this._sourcesToDestinations = A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([null, t1], t2, t2), t3, t3); - } else { - t3 = t2._collection$_source; - t4 = J.getInterceptor$asx(t3); - if (t4.get$length(t3) > 2) - A.ExecutableOptions__fail("Only two positional args may be passed."); - else if ($directories._collection$_length !== 0) { - message = 'Directory "' + A.S($directories.get$first(0)) + '" may not be a positional arg.'; - target = t2.get$last(t2); - A.ExecutableOptions__fail(J.$eq$($directories.get$first(0), t2.get$first(t2)) && !A.fileExists(target) ? message + ('\nTo compile all CSS in "' + A.S($directories.get$first(0)) + '" to "' + target + '", use `sass ' + A.S($directories.get$first(0)) + ":" + target + "`.") : message); - } else { - source = J.$eq$(t2.get$first(t2), "-") ? _null : t2.get$first(t2); - destination = t4.get$length(t3) === 1 ? _null : t2.get$last(t2); - if (destination == null) - if (A._asBool(t1.$index(0, "update"))) - A.ExecutableOptions__fail("--update is not allowed when printing to stdout."); - else if (A._asBool(t1.$index(0, "watch"))) - A.ExecutableOptions__fail("--watch is not allowed when printing to stdout."); - t1 = A.PathMap__create(_null, type$.nullable_String); - t1.$indexSet(0, source, destination); - _this._sourcesToDestinations = new A.UnmodifiableMapView(new A.PathMap(t1, type$.PathMap_nullable_String), type$.UnmodifiableMapView_of_nullable_String_and_nullable_String); - } - } - _this.__ExecutableOptions__sourceDirectoriesToDestinations_F !== $ && A.throwUnnamedLateFieldAI(); - _this.__ExecutableOptions__sourceDirectoriesToDestinations_F = B.Map_empty; - return; - } - if (stdin) - A.ExecutableOptions__fail('--stdin may not be used with ":" arguments.'); - seen = A.LinkedHashSet_LinkedHashSet$_empty(t3); - t1 = A.PathMap__create(_null, t3); - t6 = type$.PathMap_String; - t3 = A.PathMap__create(_null, t3); - for (t2 = new A.ListIterator(t2, t2.get$length(0), t5); t2.moveNext$0();) { - t5 = t2.__internal$_current; - if (t5 == null) - t5 = t4._as(t5); - if ($directories.contains$1(0, t5)) { - if (!seen.add$1(0, t5)) - A.ExecutableOptions__fail(_s18_ + t5 + '".'); - t3.$indexSet(0, t5, t5); - t1.addAll$1(0, _this._listSourceDirectory$2(t5, t5)); - continue; - } - _0_0 = _this._splitSourceAndDestination$1(t5); - source = _0_0._0; - destination = _0_0._1; - if (!seen.add$1(0, source)) - A.ExecutableOptions__fail(_s18_ + source + '".'); - if (source === "-") - t1.$indexSet(0, _null, destination); - else if (A.dirExists(source)) { - t3.$indexSet(0, source, destination); - t1.addAll$1(0, _this._listSourceDirectory$2(source, destination)); - } else - t1.$indexSet(0, source, destination); - } - _this._sourcesToDestinations = new A.UnmodifiableMapView(new A.PathMap(t1, t6), type$.UnmodifiableMapView_of_nullable_String_and_nullable_String); - _this.__ExecutableOptions__sourceDirectoriesToDestinations_F !== $ && A.throwUnnamedLateFieldAI(); - _this.__ExecutableOptions__sourceDirectoriesToDestinations_F = new A.UnmodifiableMapView(new A.PathMap(t3, t6), type$.UnmodifiableMapView_of_nullable_String_and_String); - }, - _splitSourceAndDestination$1(argument) { - var t1, i, t2, t3, nextColon; - for (t1 = argument.length, i = 0; i < t1; ++i) { - t2 = false; - if (i === 1) { - t3 = i - 1; - if (t1 > t3 + 2) { - t2 = argument.charCodeAt(t3); - if (!(t2 >= 97 && t2 <= 122)) - t2 = t2 >= 65 && t2 <= 90; - else - t2 = true; - t2 = t2 && argument.charCodeAt(t3 + 1) === 58; - } - } - if (t2) - continue; - if (argument.charCodeAt(i) === 58) { - t2 = i + 1; - nextColon = B.JSString_methods.indexOf$2(argument, ":", t2); - t3 = false; - if (nextColon === i + 2) - if (t1 > t2 + 2) { - t1 = argument.charCodeAt(t2); - if (!(t1 >= 97 && t1 <= 122)) - t1 = t1 >= 65 && t1 <= 90; - else - t1 = true; - t1 = t1 && argument.charCodeAt(t2 + 1) === 58; - } else - t1 = t3; - else - t1 = t3; - if ((t1 ? B.JSString_methods.indexOf$2(argument, ":", nextColon + 1) : nextColon) !== -1) - A.ExecutableOptions__fail('"' + argument + '" may only contain one ":".'); - return new A._Record_2(B.JSString_methods.substring$2(argument, 0, i), B.JSString_methods.substring$1(argument, t2)); - } - } - throw A.wrapException(A.ArgumentError$('Expected "' + argument + '" to contain a colon.', null)); - }, - _listSourceDirectory$2(source, destination) { - var t2, t3, t4, t5, - t1 = type$.String; - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t2 = J.get$iterator$ax(A.listDir(source, true)), t3 = source === destination; t2.moveNext$0();) { - t4 = t2.get$current(t2); - if (this._isEntrypoint$1(t4)) - t5 = !(t3 && A.ParsedPath_ParsedPath$parse(t4, $.$get$context().style)._splitExtension$1(1)[1] === ".css"); - else - t5 = false; - if (t5) { - t5 = $.$get$context(); - t1.$indexSet(0, t4, A.join(destination, t5.withoutExtension$1(t5.relative$2$from(t4, source)) + ".css", null)); - } - } - return t1; - }, - _isEntrypoint$1(path) { - var extension, - t1 = $.$get$context().style; - if (B.JSString_methods.startsWith$1(A.ParsedPath_ParsedPath$parse(path, t1).get$basename(), "_")) - return false; - extension = A.ParsedPath_ParsedPath$parse(path, t1)._splitExtension$1(1)[1]; - return extension === ".scss" || extension === ".sass" || extension === ".css"; - }, - get$_writeToStdout() { - var t1, _this = this; - _this._ensureSources$0(); - t1 = _this._sourcesToDestinations; - if (t1.get$length(t1) === 1) { - _this._ensureSources$0(); - t1 = _this._sourcesToDestinations; - t1 = t1.get$values(t1); - t1 = t1.get$single(t1) == null; - } else - t1 = false; - return t1; - }, - get$emitSourceMap() { - var _this = this, - _s10_ = "source-map", - _s15_ = "source-map-urls", - _s13_ = "embed-sources", - _s16_ = "embed-source-map", - t1 = _this._options; - if (!A._asBool(t1.$index(0, _s10_))) - if (t1.wasParsed$1(_s15_)) - A.ExecutableOptions__fail("--source-map-urls isn't allowed with --no-source-map."); - else if (t1.wasParsed$1(_s13_)) - A.ExecutableOptions__fail("--embed-sources isn't allowed with --no-source-map."); - else if (t1.wasParsed$1(_s16_)) - A.ExecutableOptions__fail("--embed-source-map isn't allowed with --no-source-map."); - if (!_this.get$_writeToStdout()) - return A._asBool(t1.$index(0, _s10_)); - if (J.$eq$(_this._ifParsed$1(_s15_), "relative")) - A.ExecutableOptions__fail("--source-map-urls=relative isn't allowed when printing to stdout."); - if (A._asBool(t1.$index(0, _s16_))) - return A._asBool(t1.$index(0, _s10_)); - else if (J.$eq$(_this._ifParsed$1(_s10_), true)) - A.ExecutableOptions__fail("When printing to stdout, --source-map requires --embed-source-map."); - else if (t1.wasParsed$1(_s15_)) - A.ExecutableOptions__fail("When printing to stdout, --source-map-urls requires --embed-source-map."); - else if (A._asBool(t1.$index(0, _s13_))) - A.ExecutableOptions__fail("When printing to stdout, --embed-sources requires --embed-source-map."); - else - return false; - }, - sourceMapUrl$2(_, url, destination) { - var t1, path, t2, _null = null; - if (url.get$scheme().length !== 0 && url.get$scheme() !== "file") - return url; - t1 = $.$get$context(); - path = t1.style.pathFromUri$1(A._parseUri(url)); - if (J.$eq$(this._options.$index(0, "source-map-urls"), "relative") && !this.get$_writeToStdout()) { - destination.toString; - t2 = t1.relative$2$from(path, t1.dirname$1(destination)); - } else - t2 = A.absolute(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); - return t1.toUri$1(t2); - }, - get$silenceDeprecations(_) { - var t2, t3, t4, - t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation); - for (t2 = J.get$iterator$ax(type$.List_String._as(this._options.$index(0, "silence-deprecation"))); t2.moveNext$0();) { - t3 = t2.get$current(t2); - t4 = A.Deprecation_fromId(t3); - t1.add$1(0, t4 == null ? A.ExecutableOptions__fail('Invalid deprecation "' + t3 + '".') : t4); - } - return t1; - }, - get$fatalDeprecations(_) { - var t1 = this._fatalDeprecations; - return t1 == null ? this._fatalDeprecations = new A.ExecutableOptions_fatalDeprecations_closure(this).call$0() : t1; - }, - get$futureDeprecations(_) { - var t2, t3, t4, - t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation); - for (t2 = J.get$iterator$ax(type$.List_String._as(this._options.$index(0, "future-deprecation"))); t2.moveNext$0();) { - t3 = t2.get$current(t2); - t4 = A.Deprecation_fromId(t3); - t1.add$1(0, t4 == null ? A.ExecutableOptions__fail('Invalid deprecation "' + t3 + '".') : t4); - } - return t1; - }, - _ifParsed$1($name) { - var t1 = this._options; - return t1.wasParsed$1($name) ? t1.$index(0, $name) : null; - } - }; - A.ExecutableOptions__parser_closure.prototype = { - call$0() { - var t1 = type$.String, - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Option), - t3 = A._setArrayType([], type$.JSArray_Object), - parser = new A.ArgParser(t2, A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), new A.UnmodifiableMapView(t2, type$.UnmodifiableMapView_String_Option), new A.UnmodifiableMapView(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ArgParser), type$.UnmodifiableMapView_String_ArgParser), t3, true, null); - parser.addOption$2$hide("precision", true); - parser.addFlag$2$hide("async", true); - t3.push(A.ExecutableOptions__separator("Input and Output")); - parser.addFlag$2$help("stdin", "Read the stylesheet from stdin."); - parser.addFlag$2$help("indented", "Use the indented syntax for input from stdin."); - parser.addMultiOption$5$abbr$help$splitCommas$valueHelp("load-path", "I", "A path to use when resolving imports.\nMay be passed multiple times.", false, "PATH"); - t2 = type$.JSArray_String; - parser.addMultiOption$6$abbr$allowed$allowedHelp$help$valueHelp("pkg-importer", "p", A._setArrayType(["node"], t2), A.LinkedHashMap_LinkedHashMap$_literal(["node", "Load files like Node.js package resolution."], t1, t1), "Built-in importer(s) to use for pkg: URLs.", "TYPE"); - parser.addOption$6$abbr$allowed$defaultsTo$help$valueHelp("style", "s", A._setArrayType(["expanded", "compressed"], t2), "expanded", "Output style.", "NAME"); - parser.addFlag$3$defaultsTo$help("charset", true, "Emit a @charset or BOM for CSS with non-ASCII characters."); - parser.addFlag$3$defaultsTo$help("error-css", null, "When an error occurs, emit a stylesheet describing it.\nDefaults to true when compiling to a file."); - parser.addFlag$3$help$negatable("update", "Only compile out-of-date stylesheets.", false); - t3.push(A.ExecutableOptions__separator("Source Maps")); - parser.addFlag$3$defaultsTo$help("source-map", true, "Whether to generate source maps."); - parser.addOption$4$allowed$defaultsTo$help("source-map-urls", A._setArrayType(["relative", "absolute"], t2), "relative", "How to link from source maps to source files."); - parser.addFlag$3$defaultsTo$help("embed-sources", false, "Embed source file contents in source maps."); - parser.addFlag$3$defaultsTo$help("embed-source-map", false, "Embed source map contents in CSS."); - t3.push(A.ExecutableOptions__separator("Warnings")); - parser.addFlag$3$abbr$help("quiet", "q", "Don't print warnings."); - parser.addFlag$2$help("quiet-deps", "Don't print compiler warnings from dependencies.\nStylesheets imported through load paths count as dependencies."); - parser.addFlag$2$help("verbose", "Print all deprecation warnings even when they're repetitive."); - parser.addMultiOption$2$help("fatal-deprecation", "Deprecations to treat as errors. You may also pass a Sass\nversion to include any behavior deprecated in or before it.\nSee https://sass-lang.com/documentation/breaking-changes for \na complete list."); - parser.addMultiOption$2$help("silence-deprecation", "Deprecations to ignore."); - parser.addMultiOption$2$help("future-deprecation", "Opt in to a deprecation early."); - t3.push(A.ExecutableOptions__separator("Other")); - parser.addFlag$4$abbr$help$negatable("watch", "w", "Watch stylesheets and recompile when they change.", false); - parser.addFlag$2$help("poll", "Manually check for changes rather than using a native watcher.\nOnly valid with --watch."); - parser.addFlag$2$help("stop-on-error", "Don't compile more files once an error is encountered."); - parser.addFlag$4$abbr$help$negatable("interactive", "i", "Run an interactive SassScript shell.", false); - parser.addFlag$3$abbr$help("color", "c", "Whether to use terminal colors for messages."); - parser.addFlag$2$help("unicode", "Whether to use Unicode characters for messages."); - parser.addFlag$2$help("trace", "Print full Dart stack traces for exceptions."); - parser.addFlag$4$abbr$help$negatable("help", "h", "Print this usage information.", false); - parser.addFlag$3$help$negatable("version", "Print the version of Dart Sass.", false); - return parser; - }, - $signature: 330 - }; - A.ExecutableOptions_interactive_closure.prototype = { - call$0() { - var _0_0, - t1 = this.$this._options; - if (!A._asBool(t1.$index(0, "interactive"))) - return false; - _0_0 = A.IterableExtension_firstWhereOrNull(A._setArrayType(["stdin", "indented", "style", "source-map", "source-map-urls", "embed-sources", "embed-source-map", "update", "watch"], type$.JSArray_String), t1.get$wasParsed()); - if (_0_0 != null) - throw A.wrapException(A.UsageException$("--" + _0_0 + " isn't allowed with --interactive.")); - return true; - }, - $signature: 21 - }; - A.ExecutableOptions_emitErrorCss_closure.prototype = { - call$1(destination) { - return destination != null; - }, - $signature: 186 - }; - A.ExecutableOptions_fatalDeprecations_closure.prototype = { - call$0() { - var id, argVersion, sassVersion, t1, t2, _0_0, exception, - deprecations = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation); - for (t1 = J.get$iterator$ax(type$.List_String._as(this.$this._options.$index(0, "fatal-deprecation"))), t2 = type$.FormatException; t1.moveNext$0();) { - id = t1.get$current(t1); - _0_0 = A.Deprecation_fromId(id); - if (_0_0 != null) { - J.add$1$ax(deprecations, _0_0); - continue; - } - try { - argVersion = A.Version_Version$parse(id); - sassVersion = A.Version_Version$parse("1.81.0"); - if (J.compareTo$1$ns(argVersion, sassVersion) > 0) - A.ExecutableOptions__fail("Invalid version " + A.S(argVersion) + ". --fatal-deprecation requires a version less than or equal to the current Dart Sass version."); - J.addAll$1$ax(deprecations, A.Deprecation_forVersion(argVersion)); - } catch (exception) { - if (t2._is(A.unwrapException(exception))) - A.ExecutableOptions__fail('Invalid deprecation "' + A.S(id) + '".'); - else - throw exception; - } - } - return deprecations; - }, - $signature: 334 - }; - A.UsageException.prototype = {$isException: 1, - get$message(receiver) { - return this.message; - } - }; - A.repl_warn.prototype = { - call$1(warning) { - var _0_1, _0_3, deprecation, t1, _0_2, span, _null = null; - $label0$0: { - _0_1 = warning._1; - _0_3 = _null; - deprecation = _null; - t1 = false; - _0_2 = warning._2; - _0_3 = warning._0; - t1 = _0_3 != null; - if (t1) - deprecation = _0_3 == null ? type$.Deprecation._as(_0_3) : _0_3; - span = _0_2; - if (t1) { - A.WarnForDeprecation_warnForDeprecation(this.logger, deprecation, _0_1, span, _null); - break $label0$0; - } - t1 = false; - t1 = _0_3 == null; - span = _0_2; - if (t1) - this.logger.internalWarn$4$deprecation$span$trace(_0_1, _null, span, _null); - } - }, - $signature: 338 - }; - A.watch_closure.prototype = { - call$1(dir) { - for (; !A.dirExists(dir);) - dir = $.$get$context().dirname$1(dir); - return this.dirWatcher.watch$1(0, dir); - }, - $signature: 339 - }; - A._Watcher.prototype = { - _delete$1(path) { - var buffer, t1, exception; - try { - A.deleteFile(path); - buffer = new A.StringBuffer(""); - t1 = this._watch$_options; - if (t1.get$color()) - buffer._contents += "\x1b[33m"; - buffer._contents += "Deleted " + path + "."; - if (t1.get$color()) - buffer._contents += "\x1b[0m"; - A.print(buffer); - } catch (exception) { - if (!(A.unwrapException(exception) instanceof A.FileSystemException)) - throw exception; - } - }, - watch$1(_, watcher) { - return this.watch$body$_Watcher(0, watcher); - }, - watch$body$_Watcher(_, watcher) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, $event, extension, success, success0, success1, t2, t1; - var $async$watch$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = watcher._group.__StreamGroup__controller_A; - t1 === $ && A.throwUnnamedLateFieldNI(); - t1 = new A._StreamIterator(A.checkNotNullable($async$self._debounceEvents$1(new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>"))), "stream", type$.Object)); - $async$handler = 3; - t2 = $async$self._watch$_options._options; - case 6: - // for condition - $async$goto = 8; - return A._asyncAwait(t1.moveNext$0(), $async$watch$1); - case 8: - // returning from await. - if (!$async$result) { - // goto after for - $async$goto = 7; - break; - } - $event = t1.get$current(0); - extension = A.ParsedPath_ParsedPath$parse($event.path, $.$get$context().style)._splitExtension$1(1)[1]; - if (!J.$eq$(extension, ".sass") && !J.$eq$(extension, ".scss") && !J.$eq$(extension, ".css")) { - // goto for condition - $async$goto = 6; - break; - } - case 9: - // switch - switch ($event.type) { - case B.ChangeType_modify: - // goto case - $async$goto = 11; - break; - case B.ChangeType_add: - // goto case - $async$goto = 12; - break; - case B.ChangeType_remove: - // goto case - $async$goto = 13; - break; - default: - // goto after switch - $async$goto = 10; - break; - } - break; - case 11: - // case - $async$goto = 14; - return A._asyncAwait($async$self._handleModify$1($event.path), $async$watch$1); - case 14: - // returning from await. - success = $async$result; - if (!success && A._asBool(t2.$index(0, "stop-on-error"))) { - $async$next = [1]; - // goto finally - $async$goto = 4; - break; - } - // goto after switch - $async$goto = 10; - break; - case 12: - // case - $async$goto = 15; - return A._asyncAwait($async$self._handleAdd$1($event.path), $async$watch$1); - case 15: - // returning from await. - success0 = $async$result; - if (!success0 && A._asBool(t2.$index(0, "stop-on-error"))) { - $async$next = [1]; - // goto finally - $async$goto = 4; - break; - } - // goto after switch - $async$goto = 10; - break; - case 13: - // case - $async$goto = 16; - return A._asyncAwait($async$self._handleRemove$1($event.path), $async$watch$1); - case 16: - // returning from await. - success1 = $async$result; - if (!success1 && A._asBool(t2.$index(0, "stop-on-error"))) { - $async$next = [1]; - // goto finally - $async$goto = 4; - break; - } - // goto after switch - $async$goto = 10; - break; - case 10: - // after switch - // goto for condition - $async$goto = 6; - break; - case 7: - // after for - $async$next.push(5); - // goto finally - $async$goto = 4; - break; - case 3: - // uncaught - $async$next = [2]; - case 4: - // finally - $async$handler = 2; - $async$goto = 17; - return A._asyncAwait(t1.cancel$0(), $async$watch$1); - case 17: - // returning from await. - // goto the next finally handler - $async$goto = $async$next.pop(); - break; - case 5: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$watch$1, $async$completer); - }, - _handleModify$1(path) { - return this._handleModify$body$_Watcher(path); - }, - _handleModify$body$_Watcher(path) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.bool), - $async$returnValue, $async$self = this, t2, t0, url, _0_0, t1; - var $async$_handleModify$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = A.isNodeJs() ? self.process : null; - if (!J.$eq$(t1 == null ? null : J.get$platform$x(t1), "win32")) { - t1 = A.isNodeJs() ? self.process : null; - t1 = J.$eq$(t1 == null ? null : J.get$platform$x(t1), "darwin"); - } else - t1 = true; - if (t1) { - t1 = $.$get$context(); - t2 = A._realCasePath(A.absolute(t1.normalize$1(path), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); - t0 = t2; - t2 = t1; - t1 = t0; - } else { - t1 = $.$get$context(); - t2 = t1.canonicalize$1(0, path); - t0 = t2; - t2 = t1; - t1 = t0; - } - url = t2.toUri$1(t1); - t1 = $async$self._graph; - _0_0 = t1._nodes.$index(0, url); - $async$goto = _0_0 != null ? 3 : 5; - break; - case 3: - // then - t1.reload$1(url); - $async$goto = 6; - return A._asyncAwait($async$self._recompileDownstream$1(A._setArrayType([_0_0], type$.JSArray_StylesheetNode)), $async$_handleModify$1); - case 6: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - // goto join - $async$goto = 4; - break; - case 5: - // else - $async$returnValue = $async$self._handleAdd$1(path); - // goto return - $async$goto = 1; - break; - case 4: - // join - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_handleModify$1, $async$completer); - }, - _handleAdd$1(path) { - return this._handleAdd$body$_Watcher(path); - }, - _handleAdd$body$_Watcher(path) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.bool), - $async$returnValue, $async$self = this, t1, success, t2, t3, t0, destination; - var $async$_handleAdd$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - destination = $async$self._destinationFor$1(path); - $async$goto = destination != null ? 3 : 5; - break; - case 3: - // then - t1 = type$.nullable_String; - $async$goto = 6; - return A._asyncAwait(A.compileStylesheets($async$self._watch$_options, $async$self._graph, A.LinkedHashMap_LinkedHashMap$_literal([path, destination], t1, t1), true), $async$_handleAdd$1); - case 6: - // returning from await. - success = $async$result; - // goto join - $async$goto = 4; - break; - case 5: - // else - success = true; - case 4: - // join - t1 = $.$get$FilesystemImporter_cwd(); - t2 = A.isNodeJs() ? self.process : null; - if (!J.$eq$(t2 == null ? null : J.get$platform$x(t2), "win32")) { - t2 = A.isNodeJs() ? self.process : null; - t2 = J.$eq$(t2 == null ? null : J.get$platform$x(t2), "darwin"); - } else - t2 = true; - if (t2) { - t2 = $.$get$context(); - t3 = A._realCasePath(A.absolute(t2.normalize$1(path), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); - t0 = t3; - t3 = t2; - t2 = t0; - } else { - t2 = $.$get$context(); - t3 = t2.canonicalize$1(0, path); - t0 = t3; - t3 = t2; - t2 = t0; - } - $async$goto = 7; - return A._asyncAwait($async$self._recompileDownstream$1($async$self._graph.addCanonical$3(t1, t3.toUri$1(t2), t3.toUri$1(path))), $async$_handleAdd$1); - case 7: - // returning from await. - $async$returnValue = $async$result && success; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_handleAdd$1, $async$completer); - }, - _handleRemove$1(path) { - return this._handleRemove$body$_Watcher(path); - }, - _handleRemove$body$_Watcher(path) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.bool), - $async$returnValue, $async$self = this, t2, t0, url, _0_0, t3, node, toRecompile, t1; - var $async$_handleRemove$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = A.isNodeJs() ? self.process : null; - if (!J.$eq$(t1 == null ? null : J.get$platform$x(t1), "win32")) { - t1 = A.isNodeJs() ? self.process : null; - t1 = J.$eq$(t1 == null ? null : J.get$platform$x(t1), "darwin"); - } else - t1 = true; - if (t1) { - t1 = $.$get$context(); - t2 = A._realCasePath(A.absolute(t1.normalize$1(path), null, null, null, null, null, null, null, null, null, null, null, null, null, null)); - t0 = t2; - t2 = t1; - t1 = t0; - } else { - t1 = $.$get$context(); - t2 = t1.canonicalize$1(0, path); - t0 = t2; - t2 = t1; - t1 = t0; - } - url = t2.toUri$1(t1); - t1 = $async$self._graph; - t2 = t1._nodes; - if (t2.containsKey$1(url)) { - _0_0 = $async$self._destinationFor$1(path); - if (_0_0 != null) - $async$self._delete$1(_0_0); - } - t3 = $.$get$FilesystemImporter_cwd(); - node = t2.remove$1(0, url); - t2 = node != null; - if (t2) { - t1._transitiveModificationTimes.clear$0(0); - t1.importCache.clearImport$1(url); - node._stylesheet_graph$_remove$0(); - } - toRecompile = t1._recanonicalizeImports$2(t3, url); - if (t2) - toRecompile.addAll$1(0, node._downstream); - $async$goto = 3; - return A._asyncAwait($async$self._recompileDownstream$1(toRecompile), $async$_handleRemove$1); - case 3: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_handleRemove$1, $async$completer); - }, - _debounceEvents$1(events) { - var t1 = type$.WatchEvent; - t1 = A.RateLimit__debounceAggregate(events, A.Duration$(0, 25), A.instantiate1(A.rate_limit___collect$closure(), t1), false, true, t1, type$.List_WatchEvent); - return new A._ExpandStream(new A._Watcher__debounceEvents_closure(), t1, A._instanceType(t1)._eval$1("_ExpandStream")); - }, - _recompileDownstream$1(nodes) { - return this._recompileDownstream$body$_Watcher(nodes); - }, - _recompileDownstream$body$_Watcher(nodes) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.bool), - $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, allSucceeded, t6, t7, t8, sourcesToDestinations, success, _i, seen; - var $async$_recompileDownstream$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - seen = A.LinkedHashSet_LinkedHashSet$_empty(type$.StylesheetNode); - t1 = type$.UnmodifiableSetView_StylesheetNode, t2 = type$.JSArray_StylesheetNode, t3 = $async$self._watch$_options, t4 = $async$self._graph, t5 = t3._options, allSucceeded = true; - case 3: - // for condition - if (!(t6 = J.getInterceptor$asx(nodes), t6.get$isNotEmpty(nodes))) { - // goto after for - $async$goto = 5; - break; - } - t7 = A._setArrayType([], t2); - for (t6 = t6.get$iterator(nodes); t6.moveNext$0();) { - t8 = t6.get$current(t6); - if (seen.add$1(0, t8)) - t7.push(t8); - } - sourcesToDestinations = $async$self._sourceEntrypointsToDestinations$1(t7); - $async$goto = sourcesToDestinations.__js_helper$_length !== 0 ? 6 : 7; - break; - case 6: - // then - $async$goto = 8; - return A._asyncAwait(A.compileStylesheets(t3, t4, sourcesToDestinations, true), $async$_recompileDownstream$1); - case 8: - // returning from await. - success = $async$result; - if (!success && A._asBool(t5.$index(0, "stop-on-error"))) { - $async$returnValue = false; - // goto return - $async$goto = 1; - break; - } - allSucceeded = allSucceeded && success; - case 7: - // join - t6 = A._setArrayType([], t2); - for (t8 = t7.length, _i = 0; _i < t7.length; t7.length === t8 || (0, A.throwConcurrentModificationError)(t7), ++_i) - B.JSArray_methods.addAll$1(t6, new A.UnmodifiableSetView0(t7[_i]._downstream, t1)); - case 4: - // for update - nodes = t6; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = allSucceeded; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_recompileDownstream$1, $async$completer); - }, - _sourceEntrypointsToDestinations$1(nodes) { - var _i, url, source, _0_0, - t1 = type$.String, - entrypoints = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t1 = nodes.length, _i = 0; _i < nodes.length; nodes.length === t1 || (0, A.throwConcurrentModificationError)(nodes), ++_i) { - url = nodes[_i].canonicalUrl; - if (url.get$scheme() !== "file") - continue; - source = $.$get$context().style.pathFromUri$1(A._parseUri(url)); - _0_0 = this._destinationFor$1(source); - if (_0_0 != null) - entrypoints.$indexSet(0, source, _0_0); - } - return entrypoints; - }, - _destinationFor$1(source) { - var t2, _0_0, t3, sourceDir, destinationDir, destination, - t1 = this._watch$_options; - t1._ensureSources$0(); - t2 = type$.String; - _0_0 = t1._sourcesToDestinations.cast$2$0(0, t2, t2).$index(0, source); - if (_0_0 != null) - return _0_0; - t3 = $.$get$context(); - if (B.JSString_methods.startsWith$1(A.ParsedPath_ParsedPath$parse(source, t3.style).get$basename(), "_")) - return null; - t1._ensureSources$0(); - t1 = t1.__ExecutableOptions__sourceDirectoriesToDestinations_F; - t1 === $ && A.throwUnnamedLateFieldNI(); - t2 = A.MapExtensions_get_pairs(t1.cast$2$0(0, t2, t2), t2, t2); - t2 = t2.get$iterator(t2); - for (; t2.moveNext$0();) { - t1 = t2.get$current(t2); - sourceDir = t1._0; - destinationDir = t1._1; - if (t3._isWithinOrEquals$2(sourceDir, source) !== B._PathRelation_within) - continue; - destination = A.join(destinationDir, t3.withoutExtension$1(t3.relative$2$from(source, sourceDir)) + ".css", null); - if (t3._isWithinOrEquals$2(destination, source) !== B._PathRelation_equal) - return destination; - } - return null; - } - }; - A._Watcher__debounceEvents_closure.prototype = { - call$1(buffer) { - var t3, t4, t5, oldType, newType, _1_1, - t1 = type$.ChangeType, - t2 = A.PathMap__create(null, t1); - for (t3 = J.get$iterator$ax(buffer); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t5 = t4.path; - oldType = t2.$index(0, t5); - newType = t4.type; - $label0$0: { - if (oldType == null) { - t4 = newType; - break $label0$0; - } - if (B.ChangeType_remove === newType) { - t4 = B.ChangeType_remove; - break $label0$0; - } - if (B.ChangeType_add === oldType) { - t4 = B.ChangeType_add; - break $label0$0; - } - t4 = B.ChangeType_modify; - break $label0$0; - } - t2.$indexSet(0, t5, t4); - } - t3 = A._setArrayType([], type$.JSArray_WatchEvent); - for (t1 = A.MapExtensions_get_pairs(new A.PathMap(t2, type$.PathMap_ChangeType), type$.nullable_String, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t2 = t1.get$current(t1); - _1_1 = t2._0; - _1_1.toString; - t3.push(new A.WatchEvent(t2._1, _1_1)); - } - return t3; - }, - $signature: 341 - }; - A.EmptyExtensionStore.prototype = { - get$_extensions() { - return A.throwExpression(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, A.JSInvocationMirror$(B.Symbol__extensions, "get$_empty_extension_store$_extensions", 1, [], [], 0))); - }, - get$_sourceSpecificity() { - return A.throwExpression(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, A.JSInvocationMirror$(B.Symbol__sourceSpecificity, "get$_empty_extension_store$_sourceSpecificity", 1, [], [], 0))); - }, - get$isEmpty(_) { - return true; - }, - get$simpleSelectors() { - return B.C_EmptyUnmodifiableSet; - }, - extensionsWhereTarget$1(callback) { - return B.List_empty5; - }, - addExtensions$1(extenders) { - throw A.wrapException(A.UnsupportedError$(string$.addExt)); - }, - clone$0() { - return B.Record2_EmptyExtensionStore_Map_empty; - }, - $isExtensionStore: 1 - }; - A.Extension.prototype = { - toString$0(_) { - var t1 = this.extender.toString$0(0), - t2 = this.target.toString$0(0), - t3 = this.isOptional ? " !optional" : ""; - return t1 + " {@extend " + t2 + t3 + "}"; - } - }; - A.Extender.prototype = { - assertCompatibleMediaContext$1(mediaContext) { - var expectedMediaContext, - extension = this._extension; - if (extension == null) - return; - expectedMediaContext = extension.mediaContext; - if (expectedMediaContext == null) - return; - if (mediaContext != null && B.C_ListEquality.equals$2(0, expectedMediaContext, mediaContext)) - return; - throw A.wrapException(A.SassException$(string$.You_ma, extension.span, null)); - }, - toString$0(_) { - return A.serializeSelector(this.selector, true); - } - }; - A.ExtensionStore.prototype = { - get$isEmpty(_) { - return this._extensions.__js_helper$_length === 0; - }, - get$simpleSelectors() { - return new A.MapKeySet(this._selectors, type$.MapKeySet_SimpleSelector); - }, - extensionsWhereTarget$1(callback) { - return new A._SyncStarIterable(this.extensionsWhereTarget$body$ExtensionStore(callback), type$._SyncStarIterable_Extension); - }, - extensionsWhereTarget$body$ExtensionStore($async$callback) { - var $async$self = this; - return function() { - var callback = $async$callback; - var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, simple, sources, t3; - return function $async$extensionsWhereTarget$1($async$iterator, $async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = A.MapExtensions_get_pairs($async$self._extensions, type$.SimpleSelector, type$.Map_ComplexSelector_Extension), t1 = t1.get$iterator(t1); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - t2 = t1.get$current(t1); - simple = t2._0; - sources = t2._1; - if (!callback.call$1(simple)) { - // goto for condition - $async$goto = 2; - break; - } - t2 = sources.get$values(sources), t2 = t2.get$iterator(t2); - case 4: - // for condition - if (!t2.moveNext$0()) { - // goto after for - $async$goto = 5; - break; - } - t3 = t2.get$current(t2); - $async$goto = t3 instanceof A.MergedExtension ? 6 : 8; - break; - case 6: - // then - t3 = t3.unmerge$0(); - $async$goto = 9; - return $async$iterator._yieldStar$1(new A.WhereIterable(t3, new A.ExtensionStore_extensionsWhereTarget_closure(), t3.$ti._eval$1("WhereIterable"))); - case 9: - // after yield - // goto join - $async$goto = 7; - break; - case 8: - // else - $async$goto = !t3.isOptional ? 10 : 11; - break; - case 10: - // then - $async$goto = 12; - return $async$iterator._async$_current = t3, 1; - case 12: - // after yield - case 11: - // join - case 7: - // join - // goto for condition - $async$goto = 4; - break; - case 5: - // after for - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return 0; - case 1: - // rethrow - return $async$iterator._datum = $async$currentError, 3; - } - }; - }; - }, - addSelector$2(selector, mediaContext) { - var originalSelector, error, stackTrace, t1, exception, t2, t3, t4, modifiableSelector, _this = this; - selector = selector; - originalSelector = selector; - if (!originalSelector.accept$1(B._IsInvisibleVisitor_true)) - _this._originals.addAll$1(0, originalSelector.components); - t1 = _this._extensions; - if (t1.__js_helper$_length !== 0) - try { - selector = _this._extendList$3(originalSelector, t1, mediaContext); - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = error; - t2 = J.getInterceptor$z(t1); - t1 = A.SourceSpanException.prototype.get$span.call(t2, t1).message$1(0, ""); - t2 = error._span_exception$_message; - t3 = error; - t4 = J.getInterceptor$z(t3); - t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); - A.throwWithTrace(new A.SassException(B.Set_empty, "From " + t1 + "\n" + t2, t3), error, stackTrace); - } else - throw exception; - } - modifiableSelector = new A.ModifiableBox(selector, type$.ModifiableBox_SelectorList); - if (mediaContext != null) - _this._mediaContexts.$indexSet(0, modifiableSelector, mediaContext); - _this._registerSelector$2(selector, modifiableSelector); - return new A.Box(modifiableSelector, type$.Box_SelectorList); - }, - _registerSelector$2(list, selector) { - var t1, t2, t3, t4, _i, t5, t6, _i0, t7, t8, _i1, simple, _0_2_isSet, _0_2, t9, selectorInPseudo; - for (t1 = list.components, t2 = t1.length, t3 = this._selectors, t4 = type$.SelectorList, _i = 0; _i < t2; ++_i) - for (t5 = t1[_i].components, t6 = t5.length, _i0 = 0; _i0 < t6; ++_i0) - for (t7 = t5[_i0].selector.components, t8 = t7.length, _i1 = 0; _i1 < t8; ++_i1) { - simple = t7[_i1]; - J.add$1$ax(t3.putIfAbsent$2(simple, new A.ExtensionStore__registerSelector_closure()), selector); - _0_2_isSet = simple instanceof A.PseudoSelector; - if (_0_2_isSet) { - _0_2 = simple.selector; - t9 = _0_2 != null; - } else { - _0_2 = null; - t9 = false; - } - if (t9) { - selectorInPseudo = _0_2_isSet ? _0_2 : simple.selector; - this._registerSelector$2(selectorInPseudo == null ? t4._as(selectorInPseudo) : selectorInPseudo, selector); - } - } - }, - addExtension$4(extender, target, extend, mediaContext) { - var t2, t3, t4, t5, t6, t7, t8, t9, t10, newExtensions, _i, complex, t11, extension, _0_0, t12, newExtensionsByTarget, additionalExtensions, _this = this, - selectors = _this._selectors.$index(0, target), - t1 = _this._extensionsByExtender, - existingExtensions = t1.$index(0, target), - sources = _this._extensions.putIfAbsent$2(target, new A.ExtensionStore_addExtension_closure()); - for (t2 = extender.components, t3 = t2.length, t4 = selectors == null, t5 = _this._sourceSpecificity, t6 = extend.span, t7 = extend.isOptional, t8 = existingExtensions != null, t9 = type$.ComplexSelector, t10 = type$.Extension, newExtensions = null, _i = 0; _i < t3; ++_i) { - complex = t2[_i]; - if (complex.accept$1(B.C__IsUselessVisitor)) - continue; - complex.get$specificity(); - t11 = new A.Extender(complex, false); - extension = t11._extension = new A.Extension(t11, target, mediaContext, t7, t6); - _0_0 = sources.$index(0, complex); - if (_0_0 != null) { - sources.$indexSet(0, complex, A.MergedExtension_merge(_0_0, extension)); - continue; - } - sources.$indexSet(0, complex, extension); - for (t11 = new A._SyncStarIterator(_this._simpleSelectors$1(complex)._outerHelper()); t11.moveNext$0();) { - t12 = t11._async$_current; - J.add$1$ax(t1.putIfAbsent$2(t12, new A.ExtensionStore_addExtension_closure0()), extension); - t5.putIfAbsent$2(t12, new A.ExtensionStore_addExtension_closure1(complex)); - } - if (!t4 || t8) { - if (newExtensions == null) - newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t9, t10); - newExtensions.$indexSet(0, complex, extension); - } - } - if (newExtensions == null) - return; - t1 = type$.SimpleSelector; - newExtensionsByTarget = A.LinkedHashMap_LinkedHashMap$_literal([target, newExtensions], t1, type$.Map_ComplexSelector_Extension); - if (t8) { - additionalExtensions = _this._extendExistingExtensions$2(existingExtensions, newExtensionsByTarget); - if (additionalExtensions != null) - A.mapAddAll2(newExtensionsByTarget, additionalExtensions, t1, t9, t10); - } - if (!t4) - _this._extendExistingSelectors$2(selectors, newExtensionsByTarget); - }, - _simpleSelectors$1(complex) { - return new A._SyncStarIterable(this._simpleSelectors$body$ExtensionStore(complex), type$._SyncStarIterable_SimpleSelector); - }, - _simpleSelectors$body$ExtensionStore($async$complex) { - var $async$self = this; - return function() { - var complex = $async$complex; - var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, t3, _i, t4, t5, _i0, simple, _0_2_isSet, _0_2, t6, selector, t7, _i1; - return function $async$_simpleSelectors$1($async$iterator, $async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = complex.components, t2 = t1.length, t3 = type$.SelectorList, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - t4 = t1[_i].selector.components, t5 = t4.length, _i0 = 0; - case 5: - // for condition - if (!(_i0 < t5)) { - // goto after for - $async$goto = 7; - break; - } - simple = t4[_i0]; - $async$goto = 8; - return $async$iterator._async$_current = simple, 1; - case 8: - // after yield - _0_2_isSet = simple instanceof A.PseudoSelector; - if (_0_2_isSet) { - _0_2 = simple.selector; - t6 = _0_2 != null; - } else { - _0_2 = null; - t6 = false; - } - $async$goto = t6 ? 9 : 10; - break; - case 9: - // then - selector = _0_2_isSet ? _0_2 : simple.selector; - t6 = (selector == null ? t3._as(selector) : selector).components, t7 = t6.length, _i1 = 0; - case 11: - // for condition - if (!(_i1 < t7)) { - // goto after for - $async$goto = 13; - break; - } - $async$goto = 14; - return $async$iterator._yieldStar$1($async$self._simpleSelectors$1(t6[_i1])); - case 14: - // after yield - case 12: - // for update - ++_i1; - // goto for condition - $async$goto = 11; - break; - case 13: - // after for - case 10: - // join - case 6: - // for update - ++_i0; - // goto for condition - $async$goto = 5; - break; - case 7: - // after for - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return 0; - case 1: - // rethrow - return $async$iterator._datum = $async$currentError, 3; - } - }; - }; - }, - _extendExistingExtensions$2(extensions, newExtensions) { - var extension, selectors, error, stackTrace, t1, t2, t3, t4, t5, t6, additionalExtensions, _i, t7, exception, t8, t9, selectors0, t10, t11, t12, t13, t14, withExtender, _0_0, _i0, _i1; - for (t1 = J.toList$0$ax(extensions), t2 = t1.length, t3 = this._extensionsByExtender, t4 = type$.SimpleSelector, t5 = type$.Map_ComplexSelector_Extension, t6 = this._extensions, additionalExtensions = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - extension = t1[_i]; - t7 = t6.$index(0, extension.target); - t7.toString; - selectors = null; - try { - selectors = this._extendComplex$3(extension.extender.selector, newExtensions, extension.mediaContext); - if (selectors == null) - continue; - } catch (exception) { - t8 = A.unwrapException(exception); - if (t8 instanceof A.SassException) { - error = t8; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace(error.withAdditionalSpan$2(extension.extender.selector.span, "target selector"), error, stackTrace); - } else - throw exception; - } - t8 = J.get$first$ax(selectors); - t9 = extension.extender.selector; - if (B.C_ListEquality.equals$2(0, t8.leadingCombinators, t9.leadingCombinators) && B.C_ListEquality.equals$2(0, t8.components, t9.components)) { - t8 = selectors; - t9 = A._arrayInstanceType(t8); - selectors0 = new A.SubListIterable(t8, 1, null, t9._eval$1("SubListIterable<1>")); - selectors0.SubListIterable$3(t8, 1, null, t9._precomputed1); - selectors = selectors0; - } - for (t8 = J.get$iterator$ax(selectors); t8.moveNext$0();) { - t9 = t8.get$current(t8); - t10 = extension; - t11 = t10.target; - t12 = t10.span; - t13 = t10.mediaContext; - t10 = t10.isOptional; - t9.get$specificity(); - t14 = new A.Extender(t9, false); - withExtender = t14._extension = new A.Extension(t14, t11, t13, t10, t12); - _0_0 = t7.$index(0, t9); - if (_0_0 != null) - t7.$indexSet(0, t9, A.MergedExtension_merge(_0_0, withExtender)); - else { - t7.$indexSet(0, t9, withExtender); - for (t10 = t9.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) - for (t12 = t10[_i0].selector.components, t13 = t12.length, _i1 = 0; _i1 < t13; ++_i1) - J.add$1$ax(t3.putIfAbsent$2(t12[_i1], new A.ExtensionStore__extendExistingExtensions_closure()), withExtender); - if (newExtensions.containsKey$1(extension.target)) { - if (additionalExtensions == null) - additionalExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t4, t5); - additionalExtensions.putIfAbsent$2(extension.target, new A.ExtensionStore__extendExistingExtensions_closure0()).$indexSet(0, t9, withExtender); - } - } - } - } - return additionalExtensions; - }, - _extendExistingSelectors$2(selectors, newExtensions) { - var selector, error, stackTrace, t1, t2, oldValue, exception, t3, t4, t5, t6; - for (t1 = selectors.get$iterator(selectors), t2 = this._mediaContexts; t1.moveNext$0();) { - selector = t1.get$current(t1); - oldValue = selector.value; - try { - selector.value = this._extendList$3(selector.value, newExtensions, t2.$index(0, selector)); - } catch (exception) { - t3 = A.unwrapException(exception); - if (t3 instanceof A.SassException) { - error = t3; - stackTrace = A.getTraceFromException(exception); - t3 = selector.value.span.message$1(0, ""); - t4 = error._span_exception$_message; - t5 = error; - t6 = J.getInterceptor$z(t5); - t5 = A.SourceSpanException.prototype.get$span.call(t6, t5); - A.throwWithTrace(new A.SassException(B.Set_empty, "From " + t3 + "\n" + t4, t5), error, stackTrace); - } else - throw exception; - } - if (oldValue === selector.value) - continue; - this._registerSelector$2(selector.value, selector); - } - }, - addExtensions$1(extensionStores) { - var t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, newExtensions, selectorsToExtend, extensionsToExtend, t12, t13, target, newSources, first, extensionsForTarget, t14, selectorsForTarget, t15, _2_0, t16, extender, extension, _this = this, _null = null; - for (t1 = J.get$iterator$ax(extensionStores), t2 = type$.SimpleSelector, t3 = type$.Map_ComplexSelector_Extension, t4 = _this._extensions, t5 = type$.ComplexSelector, t6 = type$.Extension, t7 = _this._selectors, t8 = _this._extensionsByExtender, t9 = type$.JSArray_Extension, t10 = type$.ModifiableBox_SelectorList, t11 = _this._sourceSpecificity, newExtensions = _null, selectorsToExtend = newExtensions, extensionsToExtend = selectorsToExtend; t1.moveNext$0();) { - t12 = t1.get$current(t1); - if (t12.get$isEmpty(t12)) - continue; - t11.addAll$1(0, t12.get$_sourceSpecificity()); - for (t12 = A.MapExtensions_get_pairs(t12.get$_extensions(), t2, t3), t12 = t12.get$iterator(t12); t12.moveNext$0();) { - t13 = t12.get$current(t12); - target = t13._0; - newSources = t13._1; - if (target instanceof A.PlaceholderSelector) { - first = target.name.charCodeAt(0); - t13 = first === 45 || first === 95; - } else - t13 = false; - if (t13) - continue; - extensionsForTarget = t8.$index(0, target); - t13 = extensionsForTarget == null; - if (!t13) { - if (extensionsToExtend == null) { - extensionsToExtend = A._setArrayType([], t9); - t14 = extensionsToExtend; - } else - t14 = extensionsToExtend; - B.JSArray_methods.addAll$1(t14, extensionsForTarget); - } - selectorsForTarget = t7.$index(0, target); - t14 = selectorsForTarget != null; - if (t14) { - if (selectorsToExtend == null) { - selectorsToExtend = A.LinkedHashSet_LinkedHashSet$_empty(t10); - t15 = selectorsToExtend; - } else - t15 = selectorsToExtend; - t15.addAll$1(0, selectorsForTarget); - } - _2_0 = t4.$index(0, target); - if (_2_0 != null) - for (t15 = A.MapExtensions_get_pairs(newSources, t5, t6), t15 = t15.get$iterator(t15); t15.moveNext$0();) { - t16 = t15.get$current(t15); - extender = t16._0; - extension = t16._1; - if (_2_0.containsKey$1(extender)) { - t16 = _2_0.$index(0, extender); - extension = A.MergedExtension_merge(t16 == null ? t6._as(t16) : t16, extension); - _2_0.$indexSet(0, extender, extension); - } else - _2_0.$indexSet(0, extender, extension); - if (!t13 || t14) { - if (newExtensions == null) { - newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); - t16 = newExtensions; - } else - t16 = newExtensions; - J.$indexSet$ax(t16.putIfAbsent$2(target, new A.ExtensionStore_addExtensions_closure()), extender, extension); - } - } - else { - t15 = A.LinkedHashMap_LinkedHashMap(_null, _null, _null, t5, t6); - t15.addAll$1(0, newSources); - t4.$indexSet(0, target, t15); - if (!t13 || t14) { - if (newExtensions == null) { - newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); - t13 = newExtensions; - } else - t13 = newExtensions; - t14 = A.LinkedHashMap_LinkedHashMap(_null, _null, _null, t5, t6); - t14.addAll$1(0, newSources); - t13.$indexSet(0, target, t14); - } - } - } - } - if (newExtensions != null) { - if (extensionsToExtend != null) - _this._extendExistingExtensions$2(extensionsToExtend, newExtensions); - if (selectorsToExtend != null) - _this._extendExistingSelectors$2(selectorsToExtend, newExtensions); - } - }, - _extendList$3(list, extensions, mediaQueryContext) { - var t1, t2, t3, extended, i, complex, result, t4; - for (t1 = list.components, t2 = t1.length, t3 = type$.JSArray_ComplexSelector, extended = null, i = 0; i < t2; ++i) { - complex = t1[i]; - result = this._extendComplex$3(complex, extensions, mediaQueryContext); - if (result == null) { - if (extended != null) - extended.push(complex); - } else { - if (extended == null) - if (i === 0) - extended = A._setArrayType([], t3); - else { - t4 = B.JSArray_methods.sublist$2(t1, 0, i); - extended = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); - } - B.JSArray_methods.addAll$1(extended, result); - } - } - if (extended == null) - return list; - t1 = this._originals; - return A.SelectorList$(this._trim$2(extended, t1.get$contains(t1)), list.span); - }, - _extendList$2(list, extensions) { - return this._extendList$3(list, extensions, null); - }, - _extendComplex$3(complex, extensions, mediaQueryContext) { - var isOriginal, t3, t4, t5, t6, t7, t8, t9, t10, extendedNotExpanded, i, component, extended, t11, t12, t13, t14, _box_0 = {}, - t1 = complex.leadingCombinators, - t2 = t1.length; - if (t2 > 1) - return null; - isOriginal = this._originals.contains$1(0, complex); - for (t3 = complex.components, t4 = t3.length, t5 = type$.JSArray_List_ComplexSelector, t6 = complex.lineBreak, t7 = !t6, t8 = complex.span, t9 = type$.JSArray_ComplexSelector, t2 = t2 === 0, t10 = type$.JSArray_ComplexSelectorComponent, extendedNotExpanded = null, i = 0; i < t4; ++i) { - component = t3[i]; - extended = this._extendCompound$4$inOriginal(component, extensions, mediaQueryContext, isOriginal); - if (extended == null) { - if (extendedNotExpanded != null) - extendedNotExpanded.push(A._setArrayType([A.ComplexSelector$(B.List_empty0, A._setArrayType([component], t10), t8, t6)], t9)); - } else if (extendedNotExpanded != null) - extendedNotExpanded.push(extended); - else if (i !== 0) { - t11 = A._arrayInstanceType(t3); - t12 = new A.SubListIterable(t3, 0, i, t11._eval$1("SubListIterable<1>")); - t12.SubListIterable$3(t3, 0, i, t11._precomputed1); - extendedNotExpanded = A._setArrayType([A._setArrayType([A.ComplexSelector$(t1, t12, t8, t6)], t9), extended], t5); - } else if (t2) - extendedNotExpanded = A._setArrayType([extended], t5); - else { - t11 = A._setArrayType([], t9); - for (t12 = J.get$iterator$ax(extended); t12.moveNext$0();) { - t13 = t12.get$current(t12); - t14 = t13.leadingCombinators; - if (t14.length === 0 || B.C_ListEquality.equals$2(0, t1, t14)) { - t14 = t13.components; - t11.push(A.ComplexSelector$(t1, t14, t8, !t7 || t13.lineBreak)); - } - } - extendedNotExpanded = A._setArrayType([t11], t5); - } - } - if (extendedNotExpanded == null) - return null; - _box_0.first = true; - t1 = type$.ComplexSelector; - t1 = J.expand$1$1$ax(A.paths(extendedNotExpanded, t1), new A.ExtensionStore__extendComplex_closure(_box_0, this, complex), t1); - return A.List_List$of(t1, true, t1.$ti._eval$1("Iterable.E")); - }, - _extendCompound$4$inOriginal(component, extensions, mediaQueryContext, inOriginal) { - var t3, t4, t5, t6, t7, t8, t9, t10, t11, options, i, simple, extended, t12, result, compound, complex, extenderPaths, withCombinators, isOriginal, _this = this, _null = null, - t1 = _this._mode, - targetsUsed = t1 === B.ExtendMode_normal_normal || extensions.__js_helper$_length < 2 ? _null : A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector), - t2 = component.selector, - simples = t2.components; - for (t3 = simples.length, t4 = type$.JSArray_List_Extender, t5 = type$.JSArray_Extender, t6 = type$.CssValue_Combinator, t7 = type$.JSArray_ComplexSelectorComponent, t8 = A._arrayInstanceType(simples), t9 = t8._precomputed1, t8 = t8._eval$1("SubListIterable<1>"), t10 = component.span, t11 = type$.SimpleSelector, options = _null, i = 0; i < t3; ++i) { - simple = simples[i]; - extended = _this._extendSimple$4(simple, extensions, mediaQueryContext, targetsUsed); - if (extended == null) { - if (options != null) - options.push(A._setArrayType([_this._extenderForSimple$1(simple)], t5)); - } else { - if (options == null) { - options = A._setArrayType([], t4); - if (i !== 0) { - t12 = new A.SubListIterable(simples, 0, i, t8); - t12.SubListIterable$3(simples, 0, i, t9); - result = A.List_List$from(t12, false, t11); - result.fixed$length = Array; - result.immutable$list = Array; - t12 = result; - compound = new A.CompoundSelector(t12, t10); - if (t12.length === 0) - A.throwExpression(A.ArgumentError$("components may not be empty.", _null)); - result = A.List_List$from(B.List_empty0, false, t6); - result.fixed$length = Array; - result.immutable$list = Array; - t12 = A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(compound, result, t10)], t7), t10, false); - _this._sourceSpecificityFor$1(compound); - options.push(A._setArrayType([new A.Extender(t12, true)], t5)); - } - } - B.JSArray_methods.addAll$1(options, extended); - } - } - if (options == null) - return _null; - if (targetsUsed != null && targetsUsed._collection$_length !== extensions.__js_helper$_length) - return _null; - if (options.length === 1) { - for (t1 = J.get$iterator$ax(options[0]), t2 = component.combinators, t3 = type$.JSArray_ComplexSelector, result = _null; t1.moveNext$0();) { - t4 = t1.get$current(t1); - t4.assertCompatibleMediaContext$1(mediaQueryContext); - complex = t4.selector.withAdditionalCombinators$1(t2); - if (complex.accept$1(B.C__IsUselessVisitor)) - continue; - if (result == null) - result = A._setArrayType([], t3); - result.push(complex); - } - return result; - } - extenderPaths = A.paths(options, type$.Extender); - t3 = A._setArrayType([], type$.JSArray_ComplexSelector); - t1 = t1 === B.ExtendMode_replace_replace; - t4 = !t1; - if (t4) - t3.push(A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(J.expand$1$1$ax(J.get$first$ax(extenderPaths), new A.ExtensionStore__extendCompound_closure(), t11), t2.span), A.List_List$unmodifiable(component.combinators, t6), t10)], t7), t10, false)); - t2 = J.skip$1$ax(extenderPaths, t1 ? 0 : 1); - t5 = t2.$ti; - t2 = new A.ListIterator(t2, t2.get$length(0), t5._eval$1("ListIterator")); - t6 = component.combinators; - t5 = t5._eval$1("ListIterable.E"); - for (; t2.moveNext$0();) { - t1 = t2.__internal$_current; - extended = _this._unifyExtenders$3(t1 == null ? t5._as(t1) : t1, mediaQueryContext, t10); - if (extended == null) - continue; - for (t1 = J.get$iterator$ax(extended); t1.moveNext$0();) { - withCombinators = t1.get$current(t1).withAdditionalCombinators$1(t6); - if (!withCombinators.accept$1(B.C__IsUselessVisitor)) - t3.push(withCombinators); - } - } - isOriginal = new A.ExtensionStore__extendCompound_closure0(); - return _this._trim$2(t3, inOriginal && t4 ? new A.ExtensionStore__extendCompound_closure1(B.JSArray_methods.get$first(t3)) : isOriginal); - }, - _unifyExtenders$3(extenders, mediaQueryContext, span) { - var t1, t2, t3, originals, originalsLineBreak, t4, complexes, _null = null, - toUnify = A.QueueList$(_null, type$.ComplexSelector); - for (t1 = J.getInterceptor$ax(extenders), t2 = t1.get$iterator(extenders), t3 = type$.JSArray_SimpleSelector, originals = _null, originalsLineBreak = false; t2.moveNext$0();) { - t4 = t2.get$current(t2); - if (t4.isOriginal) { - if (originals == null) - originals = A._setArrayType([], t3); - t4 = t4.selector; - B.JSArray_methods.addAll$1(originals, B.JSArray_methods.get$last(t4.components).selector.components); - originalsLineBreak = originalsLineBreak || t4.lineBreak; - } else { - t4 = t4.selector; - if (t4.accept$1(B.C__IsUselessVisitor)) - return _null; - else - toUnify._queue_list$_add$1(t4); - } - } - if (originals != null) - toUnify.addFirst$1(A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(originals, span), A.List_List$unmodifiable(B.List_empty0, type$.CssValue_Combinator), span)], type$.JSArray_ComplexSelectorComponent), span, originalsLineBreak)); - complexes = A.unifyComplex(toUnify, span); - if (complexes == null) - return _null; - for (t1 = t1.get$iterator(extenders); t1.moveNext$0();) - t1.get$current(t1).assertCompatibleMediaContext$1(mediaQueryContext); - return complexes; - }, - _extendSimple$4(simple, extensions, mediaQueryContext, targetsUsed) { - var t2, _1_0, - t1 = new A.ExtensionStore__extendSimple_withoutPseudo(this, extensions, targetsUsed); - if (simple instanceof A.PseudoSelector) - t2 = simple.selector != null; - else - t2 = false; - if (t2) { - _1_0 = this._extendPseudo$3(simple, extensions, mediaQueryContext); - if (_1_0 != null) - return new A.MappedListIterable(_1_0, new A.ExtensionStore__extendSimple_closure(this, t1), A._arrayInstanceType(_1_0)._eval$1("MappedListIterable<1,List>")); - } - return A.NullableExtension_andThen(t1.call$1(simple), new A.ExtensionStore__extendSimple_closure0()); - }, - _extenderForSimple$1(simple) { - var t1 = simple.span; - t1 = A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(A._setArrayType([simple], type$.JSArray_SimpleSelector), t1), A.List_List$unmodifiable(B.List_empty0, type$.CssValue_Combinator), t1)], type$.JSArray_ComplexSelectorComponent), t1, false); - this._sourceSpecificity.$index(0, simple); - return new A.Extender(t1, true); - }, - _extendPseudo$3(pseudo, extensions, mediaQueryContext) { - var extended, complexes, t1, result, - selector = pseudo.selector; - if (selector == null) - throw A.wrapException(A.ArgumentError$("Selector " + pseudo.toString$0(0) + " must have a selector argument.", null)); - extended = this._extendList$3(selector, extensions, mediaQueryContext); - if (extended === selector) - return null; - complexes = extended.components; - t1 = pseudo.normalizedName === "not"; - if (t1 && !B.JSArray_methods.any$1(selector.components, new A.ExtensionStore__extendPseudo_closure()) && B.JSArray_methods.any$1(complexes, new A.ExtensionStore__extendPseudo_closure0())) - complexes = new A.WhereIterable(complexes, new A.ExtensionStore__extendPseudo_closure1(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>")); - complexes = J.expand$1$1$ax(complexes, new A.ExtensionStore__extendPseudo_closure2(pseudo), type$.ComplexSelector); - if (t1 && selector.components.length === 1) { - t1 = A.MappedIterable_MappedIterable(complexes, new A.ExtensionStore__extendPseudo_closure3(pseudo, selector), complexes.$ti._eval$1("Iterable.E"), type$.PseudoSelector); - result = A.List_List$of(t1, true, A._instanceType(t1)._eval$1("Iterable.E")); - return result.length === 0 ? null : result; - } else - return A._setArrayType([pseudo.withSelector$1(A.SelectorList$(complexes, selector.span))], type$.JSArray_PseudoSelector); - }, - _trim$2(selectors, isOriginal) { - var i, t1, t2, numOriginals, _box_0, complex1, j, t3, t4, _i, t5, maxSpecificity, - result = A.QueueList$(null, type$.ComplexSelector); - $label0$0: - for (i = selectors.length - 1, t1 = A._arrayInstanceType(selectors), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), numOriginals = 0; i >= 0; --i) { - _box_0 = {}; - complex1 = selectors[i]; - if (isOriginal.call$1(complex1)) { - for (j = 0; j < numOriginals; ++j) - if (J.$eq$(result.$index(0, j), complex1)) { - A.rotateSlice(result, 0, j + 1); - continue $label0$0; - } - ++numOriginals; - result.addFirst$1(complex1); - continue $label0$0; - } - _box_0.maxSpecificity = 0; - for (t3 = complex1.components, t4 = t3.length, _i = 0, t5 = 0; _i < t4; ++_i, t5 = maxSpecificity) { - maxSpecificity = Math.max(t5, this._sourceSpecificityFor$1(t3[_i].selector)); - _box_0.maxSpecificity = maxSpecificity; - } - if (result.any$1(result, new A.ExtensionStore__trim_closure(_box_0, complex1))) - continue $label0$0; - t3 = new A.SubListIterable(selectors, 0, i, t1); - t3.SubListIterable$3(selectors, 0, i, t2); - if (t3.any$1(0, new A.ExtensionStore__trim_closure0(_box_0, complex1))) - continue $label0$0; - result.addFirst$1(complex1); - } - return result; - }, - _sourceSpecificityFor$1(compound) { - var t1, t2, t3, specificity, _i, t4; - for (t1 = compound.components, t2 = t1.length, t3 = this._sourceSpecificity, specificity = 0, _i = 0; _i < t2; ++_i) { - t4 = t3.$index(0, t1[_i]); - specificity = Math.max(specificity, A.checkNum(t4 == null ? 0 : t4)); - } - return specificity; - }, - clone$0() { - var t2, t3, t4, _this = this, - t1 = type$.SimpleSelector, - newSelectors = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList), - newMediaContexts = A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList, type$.List_CssMediaQuery), - oldToNewSelectors = new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_of_SelectorList_and_Box_SelectorList); - _this._selectors.forEach$1(0, new A.ExtensionStore_clone_closure(_this, newSelectors, oldToNewSelectors, newMediaContexts)); - t2 = type$.Extension; - t3 = A.copyMapOfMap(_this._extensions, t1, type$.ComplexSelector, t2); - t2 = A.copyMapOfList(_this._extensionsByExtender, t1, t2); - t1 = new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int); - t1.addAll$1(0, _this._sourceSpecificity); - t4 = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector); - t4.addAll$1(0, _this._originals); - return new A._Record_2(new A.ExtensionStore(newSelectors, t3, t2, newMediaContexts, t1, t4, B.ExtendMode_normal_normal), oldToNewSelectors); - }, - get$_extensions() { - return this._extensions; - }, - get$_sourceSpecificity() { - return this._sourceSpecificity; - } - }; - A.ExtensionStore_extensionsWhereTarget_closure.prototype = { - call$1(extension) { - return !extension.isOptional; - }, - $signature: 345 - }; - A.ExtensionStore__registerSelector_closure.prototype = { - call$0() { - return A.LinkedHashSet_LinkedHashSet$_empty(type$.ModifiableBox_SelectorList); - }, - $signature: 351 - }; - A.ExtensionStore_addExtension_closure.prototype = { - call$0() { - return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector, type$.Extension); - }, - $signature: 116 - }; - A.ExtensionStore_addExtension_closure0.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_Extension); - }, - $signature: 214 - }; - A.ExtensionStore_addExtension_closure1.prototype = { - call$0() { - return this.complex.get$specificity(); - }, - $signature: 10 - }; - A.ExtensionStore__extendExistingExtensions_closure.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_Extension); - }, - $signature: 214 - }; - A.ExtensionStore__extendExistingExtensions_closure0.prototype = { - call$0() { - return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector, type$.Extension); - }, - $signature: 116 - }; - A.ExtensionStore_addExtensions_closure.prototype = { - call$0() { - return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector, type$.Extension); - }, - $signature: 116 - }; - A.ExtensionStore__extendComplex_closure.prototype = { - call$1(path) { - var t1 = this.complex; - return J.map$1$1$ax(A.weave(path, t1.span, t1.lineBreak), new A.ExtensionStore__extendComplex__closure(this._box_0, this.$this, t1), type$.ComplexSelector); - }, - $signature: 354 - }; - A.ExtensionStore__extendComplex__closure.prototype = { - call$1(outputComplex) { - var _this = this, - t1 = _this._box_0; - if (t1.first && _this.$this._originals.contains$1(0, _this.complex)) - _this.$this._originals.add$1(0, outputComplex); - t1.first = false; - return outputComplex; - }, - $signature: 59 - }; - A.ExtensionStore__extendCompound_closure.prototype = { - call$1(extender) { - return B.JSArray_methods.get$last(extender.selector.components).selector.components; - }, - $signature: 355 - }; - A.ExtensionStore__extendCompound_closure0.prototype = { - call$1(_) { - return false; - }, - $signature: 19 - }; - A.ExtensionStore__extendCompound_closure1.prototype = { - call$1(complex) { - return complex.$eq(0, this.original); - }, - $signature: 19 - }; - A.ExtensionStore__extendSimple_withoutPseudo.prototype = { - call$1(simple) { - var t1, t2, - extensionsForSimple = this.extensions.$index(0, simple); - if (extensionsForSimple == null) - return null; - t1 = this.targetsUsed; - if (t1 != null) - t1.add$1(0, simple); - t1 = A._setArrayType([], type$.JSArray_Extender); - t2 = this.$this; - if (t2._mode !== B.ExtendMode_replace_replace) - t1.push(t2._extenderForSimple$1(simple)); - for (t2 = extensionsForSimple.get$values(extensionsForSimple), t2 = t2.get$iterator(t2); t2.moveNext$0();) - t1.push(t2.get$current(t2).extender); - return t1; - }, - $signature: 357 - }; - A.ExtensionStore__extendSimple_closure.prototype = { - call$1(pseudo) { - var t1 = this.withoutPseudo.call$1(pseudo); - return t1 == null ? A._setArrayType([this.$this._extenderForSimple$1(pseudo)], type$.JSArray_Extender) : t1; - }, - $signature: 358 - }; - A.ExtensionStore__extendSimple_closure0.prototype = { - call$1(result) { - return A._setArrayType([result], type$.JSArray_List_Extender); - }, - $signature: 360 - }; - A.ExtensionStore__extendPseudo_closure.prototype = { - call$1(complex) { - return complex.components.length > 1; - }, - $signature: 19 - }; - A.ExtensionStore__extendPseudo_closure0.prototype = { - call$1(complex) { - return complex.components.length === 1; - }, - $signature: 19 - }; - A.ExtensionStore__extendPseudo_closure1.prototype = { - call$1(complex) { - return complex.components.length <= 1; - }, - $signature: 19 - }; - A.ExtensionStore__extendPseudo_closure2.prototype = { - call$1(complex) { - var innerPseudo, innerSelector, - t1 = complex.get$singleCompound(); - if (t1 == null) - innerPseudo = null; - else { - t1 = t1.components; - innerPseudo = t1.length === 1 ? B.JSArray_methods.get$first(t1) : null; - } - if (!(innerPseudo instanceof A.PseudoSelector)) - return A._setArrayType([complex], type$.JSArray_ComplexSelector); - innerSelector = innerPseudo.selector; - if (innerSelector == null) - return A._setArrayType([complex], type$.JSArray_ComplexSelector); - t1 = this.pseudo; - switch (t1.normalizedName) { - case "not": - if (!B.Set_mlzm2.contains$1(0, innerPseudo.normalizedName)) - return A._setArrayType([], type$.JSArray_ComplexSelector); - return innerSelector.components; - case "is": - case "matches": - case "where": - case "any": - case "current": - case "nth-child": - case "nth-last-child": - if (innerPseudo.name !== t1.name) - return A._setArrayType([], type$.JSArray_ComplexSelector); - if (innerPseudo.argument != t1.argument) - return A._setArrayType([], type$.JSArray_ComplexSelector); - return innerSelector.components; - case "has": - case "host": - case "host-context": - case "slotted": - return A._setArrayType([complex], type$.JSArray_ComplexSelector); - default: - return A._setArrayType([], type$.JSArray_ComplexSelector); - } - }, - $signature: 672 - }; - A.ExtensionStore__extendPseudo_closure3.prototype = { - call$1(complex) { - return this.pseudo.withSelector$1(A.SelectorList$(A._setArrayType([complex], type$.JSArray_ComplexSelector), this.selector.span)); - }, - $signature: 362 - }; - A.ExtensionStore__trim_closure.prototype = { - call$1(complex2) { - return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); - }, - $signature: 19 - }; - A.ExtensionStore__trim_closure0.prototype = { - call$1(complex2) { - return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); - }, - $signature: 19 - }; - A.ExtensionStore_clone_closure.prototype = { - call$2(simple, selectors) { - var t2, t3, t4, t5, t6, t7, newSelector, _0_0, _this = this, - t1 = type$.ModifiableBox_SelectorList, - newSelectorSet = A.LinkedHashSet_LinkedHashSet$_empty(t1); - _this.newSelectors.$indexSet(0, simple, newSelectorSet); - for (t2 = selectors.get$iterator(selectors), t3 = _this.oldToNewSelectors, t4 = type$.Box_SelectorList, t5 = _this.$this._mediaContexts, t6 = _this.newMediaContexts; t2.moveNext$0();) { - t7 = t2.get$current(t2); - newSelector = new A.ModifiableBox(t7.value, t1); - newSelectorSet.add$1(0, newSelector); - t3.$indexSet(0, t7.value, new A.Box(newSelector, t4)); - _0_0 = t5.$index(0, t7); - if (_0_0 != null) - t6.$indexSet(0, newSelector, _0_0); - } - }, - $signature: 373 - }; - A.unifyComplex_closure.prototype = { - call$1(complex) { - return complex.lineBreak; - }, - $signature: 19 - }; - A._weaveParents_closure.prototype = { - call$2(group1, group2) { - var t1, unified; - if (B.C_ListEquality.equals$2(0, group1, group2)) - return group1; - if (A._complexIsParentSuperselector(group1, group2)) - return group2; - if (A._complexIsParentSuperselector(group2, group1)) - return group1; - if (!A._mustUnify(group1, group2)) - return null; - t1 = this.span; - unified = A.unifyComplex(A._setArrayType([A.ComplexSelector$(B.List_empty0, group1, t1, false), A.ComplexSelector$(B.List_empty0, group2, t1, false)], type$.JSArray_ComplexSelector), t1); - if (unified == null) - t1 = null; - else { - t1 = A.IterableExtension_get_singleOrNull(unified); - t1 = t1 == null ? null : t1.components; - } - return t1; - }, - $signature: 374 - }; - A._weaveParents_closure0.prototype = { - call$1(sequence) { - return A._complexIsParentSuperselector(sequence.get$first(sequence), this.group); - }, - $signature: 222 - }; - A._weaveParents_closure1.prototype = { - call$1(sequence) { - return sequence.get$length(0) === 0; - }, - $signature: 222 - }; - A._weaveParents_closure2.prototype = { - call$1(choice) { - return J.get$isNotEmpty$asx(choice); - }, - $signature: 391 - }; - A._mustUnify_closure.prototype = { - call$1(component) { - return B.JSArray_methods.any$1(component.selector.components, new A._mustUnify__closure(this.uniqueSelectors)); - }, - $signature: 51 - }; - A._mustUnify__closure.prototype = { - call$1(simple) { - var t1; - if (!(simple instanceof A.IDSelector)) - t1 = simple instanceof A.PseudoSelector && !simple.isClass; - else - t1 = true; - return t1 && this.uniqueSelectors.contains$1(0, simple); - }, - $signature: 13 - }; - A.paths_closure.prototype = { - call$2(paths, choice) { - var t1 = this.T; - t1 = J.expand$1$1$ax(choice, new A.paths__closure(paths, t1), t1._eval$1("List<0>")); - return A.List_List$of(t1, true, t1.$ti._eval$1("Iterable.E")); - }, - $signature() { - return this.T._eval$1("List>(List>,List<0>)"); - } - }; - A.paths__closure.prototype = { - call$1(option) { - var t1 = this.T; - return J.map$1$1$ax(this.paths, new A.paths___closure(option, t1), t1._eval$1("List<0>")); - }, - $signature() { - return this.T._eval$1("Iterable>(0)"); - } - }; - A.paths___closure.prototype = { - call$1(path) { - var t1 = A.List_List$of(path, true, this.T); - t1.push(this.option); - return t1; - }, - $signature() { - return this.T._eval$1("List<0>(List<0>)"); - } - }; - A.listIsSuperselector_closure.prototype = { - call$1(complex1) { - return B.JSArray_methods.any$1(this.list1, new A.listIsSuperselector__closure(complex1)); - }, - $signature: 19 - }; - A.listIsSuperselector__closure.prototype = { - call$1(complex2) { - return complex2.isSuperselector$1(this.complex1); - }, - $signature: 19 - }; - A.complexIsSuperselector_closure.prototype = { - call$1($parent) { - return $parent.combinators.length > 1; - }, - $signature: 51 - }; - A.complexIsSuperselector_closure0.prototype = { - call$1(component) { - return A._isSupercombinator(this.combinator1, A.IterableExtension_get_firstOrNull(component.combinators)); - }, - $signature: 51 - }; - A._compatibleWithPreviousCombinator_closure.prototype = { - call$1(component) { - var t1 = component.combinators, - t2 = A.IterableExtension_get_firstOrNull(t1); - if (!J.$eq$(t2 == null ? null : t2.value, B.Combinator_y18)) { - t1 = A.IterableExtension_get_firstOrNull(t1); - t1 = J.$eq$(t1 == null ? null : t1.value, B.Combinator_gRV); - } else - t1 = true; - return t1; - }, - $signature: 51 - }; - A.compoundIsSuperselector_closure.prototype = { - call$1(simple1) { - return B.JSArray_methods.any$1(this.compound2.components, simple1.get$isSuperselector()); - }, - $signature: 13 - }; - A._selectorPseudoIsSuperselector_closure.prototype = { - call$1(selector2) { - return A.listIsSuperselector(this.selector1.components, selector2.components); - }, - $signature: 70 - }; - A._selectorPseudoIsSuperselector_closure0.prototype = { - call$1(complex1) { - var t1, t2; - if (complex1.leadingCombinators.length === 0) { - t1 = A._setArrayType([], type$.JSArray_ComplexSelectorComponent); - t2 = this.parents; - if (t2 != null) - B.JSArray_methods.addAll$1(t1, t2); - t2 = this.compound2; - t1.push(new A.ComplexSelectorComponent(t2, A.List_List$unmodifiable(B.List_empty0, type$.CssValue_Combinator), t2.span)); - t1 = A.complexIsSuperselector(complex1.components, t1); - } else - t1 = false; - return t1; - }, - $signature: 19 - }; - A._selectorPseudoIsSuperselector_closure1.prototype = { - call$1(selector2) { - return A.listIsSuperselector(this.selector1.components, selector2.components); - }, - $signature: 70 - }; - A._selectorPseudoIsSuperselector_closure2.prototype = { - call$1(selector2) { - return A.listIsSuperselector(this.selector1.components, selector2.components); - }, - $signature: 70 - }; - A._selectorPseudoIsSuperselector_closure3.prototype = { - call$1(complex) { - if (complex.accept$1(B._IsBogusVisitor_true)) - return false; - return B.JSArray_methods.any$1(this.compound2.components, new A._selectorPseudoIsSuperselector__closure(complex, this.pseudo1)); - }, - $signature: 19 - }; - A._selectorPseudoIsSuperselector__closure.prototype = { - call$1(simple2) { - var t1, selector2, _0_4, _this = this; - $label0$1: { - if (simple2 instanceof A.TypeSelector) { - t1 = B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure(simple2)); - break $label0$1; - } - if (simple2 instanceof A.IDSelector) { - t1 = B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure0(simple2)); - break $label0$1; - } - selector2 = null; - t1 = false; - if (simple2 instanceof A.PseudoSelector) { - _0_4 = simple2.selector; - if (_0_4 != null) { - selector2 = _0_4 == null ? type$.SelectorList._as(_0_4) : _0_4; - t1 = simple2.name === _this.pseudo1.name; - } - } - if (t1) { - t1 = A.listIsSuperselector(selector2.components, A._setArrayType([_this.complex], type$.JSArray_ComplexSelector)); - break $label0$1; - } - t1 = false; - break $label0$1; - } - return t1; - }, - $signature: 13 - }; - A._selectorPseudoIsSuperselector___closure.prototype = { - call$1(simple1) { - var t1; - if (simple1 instanceof A.TypeSelector) { - t1 = this.simple2; - t1 = !(t1 instanceof A.TypeSelector && t1.name.$eq(0, simple1.name)); - } else - t1 = false; - return t1; - }, - $signature: 13 - }; - A._selectorPseudoIsSuperselector___closure0.prototype = { - call$1(simple1) { - var t1; - if (simple1 instanceof A.IDSelector) { - t1 = this.simple2; - t1 = !(t1 instanceof A.IDSelector && t1.name === simple1.name); - } else - t1 = false; - return t1; - }, - $signature: 13 - }; - A._selectorPseudoIsSuperselector_closure4.prototype = { - call$1(selector2) { - var t1 = B.C_ListEquality.equals$2(0, this.selector1.components, selector2.components); - return t1; - }, - $signature: 70 - }; - A._selectorPseudoIsSuperselector_closure5.prototype = { - call$1(pseudo2) { - var t1, selector2; - if (!(pseudo2 instanceof A.PseudoSelector)) - return false; - t1 = this.pseudo1; - if (pseudo2.name !== t1.name) - return false; - if (pseudo2.argument != t1.argument) - return false; - selector2 = pseudo2.selector; - if (selector2 == null) - return false; - return A.listIsSuperselector(this.selector1.components, selector2.components); - }, - $signature: 13 - }; - A._selectorPseudoArgs_closure.prototype = { - call$1(pseudo) { - return pseudo.isClass === this.isClass && pseudo.name === this.name; - }, - $signature: 392 - }; - A._selectorPseudoArgs_closure0.prototype = { - call$1(pseudo) { - return pseudo.selector; - }, - $signature: 393 - }; - A.MergedExtension.prototype = { - unmerge$0() { - return new A._SyncStarIterable(this.unmerge$body$MergedExtension(), type$._SyncStarIterable_Extension); - }, - unmerge$body$MergedExtension() { - var $async$self = this; - return function() { - var $async$goto = 0, $async$handler = 1, $async$currentError, right, left; - return function $async$unmerge$0($async$iterator, $async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - left = $async$self.left; - $async$goto = left instanceof A.MergedExtension ? 2 : 4; - break; - case 2: - // then - $async$goto = 5; - return $async$iterator._yieldStar$1(left.unmerge$0()); - case 5: - // after yield - // goto join - $async$goto = 3; - break; - case 4: - // else - $async$goto = 6; - return $async$iterator._async$_current = left, 1; - case 6: - // after yield - case 3: - // join - right = $async$self.right; - $async$goto = right instanceof A.MergedExtension ? 7 : 9; - break; - case 7: - // then - $async$goto = 10; - return $async$iterator._yieldStar$1(right.unmerge$0()); - case 10: - // after yield - // goto join - $async$goto = 8; - break; - case 9: - // else - $async$goto = 11; - return $async$iterator._async$_current = right, 1; - case 11: - // after yield - case 8: - // join - // implicit return - return 0; - case 1: - // rethrow - return $async$iterator._datum = $async$currentError, 3; - } - }; - }; - } - }; - A.ExtendMode.prototype = { - _enumToString$0() { - return "ExtendMode." + this._name; - }, - toString$0(_) { - return this.name; - } - }; - A.globalFunctions_closure.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return t1.$index($arguments, 0).get$isTruthy() ? t1.$index($arguments, 1) : t1.$index($arguments, 2); - }, - $signature: 4 - }; - A.global_closure0.prototype = { - call$1(color) { - return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_mlz, "red")); - }, - $signature: 65 - }; - A.global_closure1.prototype = { - call$1(color) { - return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_mlz, "green")); - }, - $signature: 65 - }; - A.global_closure2.prototype = { - call$1(color) { - return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_mlz, "blue")); - }, - $signature: 65 - }; - A.global_closure3.prototype = { - call$1($arguments) { - return A._rgb("rgb", $arguments); - }, - $signature: 4 - }; - A.global_closure4.prototype = { - call$1($arguments) { - return A._rgb("rgb", $arguments); - }, - $signature: 4 - }; - A.global_closure5.prototype = { - call$1($arguments) { - return A._rgbTwoArg("rgb", $arguments); - }, - $signature: 4 - }; - A.global_closure6.prototype = { - call$1($arguments) { - return A._parseChannels("rgb", J.$index$asx($arguments, 0), "channels", B.RgbColorSpace_mlz); - }, - $signature: 4 - }; - A.global_closure7.prototype = { - call$1($arguments) { - return A._rgb("rgba", $arguments); - }, - $signature: 4 - }; - A.global_closure8.prototype = { - call$1($arguments) { - return A._rgb("rgba", $arguments); - }, - $signature: 4 - }; - A.global_closure9.prototype = { - call$1($arguments) { - return A._rgbTwoArg("rgba", $arguments); - }, - $signature: 4 - }; - A.global_closure10.prototype = { - call$1($arguments) { - return A._parseChannels("rgba", J.$index$asx($arguments, 0), "channels", B.RgbColorSpace_mlz); - }, - $signature: 4 - }; - A.global_closure11.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - if (!(t1.$index($arguments, 0) instanceof A.SassNumber) && !t1.$index($arguments, 0).get$isSpecialNumber()) - A.warnForDeprecation(string$.Globalci, B.Deprecation_0Gh); - return A._invert($arguments, true); - }, - $signature: 4 - }; - A.global_closure12.prototype = { - call$1(color) { - return color._legacyChannel$2(B.HslColorSpace_gsm, "hue"); - }, - $signature: 48 - }; - A.global_closure13.prototype = { - call$1(color) { - return color._legacyChannel$2(B.HslColorSpace_gsm, "saturation"); - }, - $signature: 48 - }; - A.global_closure14.prototype = { - call$1(color) { - return color._legacyChannel$2(B.HslColorSpace_gsm, "lightness"); - }, - $signature: 48 - }; - A.global_closure15.prototype = { - call$1($arguments) { - return A._hsl("hsl", $arguments); - }, - $signature: 4 - }; - A.global_closure16.prototype = { - call$1($arguments) { - return A._hsl("hsl", $arguments); - }, - $signature: 4 - }; - A.global_closure17.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0).get$isVar() || t1.$index($arguments, 1).get$isVar()) - return A._functionString("hsl", $arguments); - else - throw A.wrapException(A.SassScriptException$("Missing argument $lightness.", null)); - }, - $signature: 18 - }; - A.global_closure18.prototype = { - call$1($arguments) { - return A._parseChannels("hsl", J.$index$asx($arguments, 0), "channels", B.HslColorSpace_gsm); - }, - $signature: 4 - }; - A.global_closure19.prototype = { - call$1($arguments) { - return A._hsl("hsla", $arguments); - }, - $signature: 4 - }; - A.global_closure20.prototype = { - call$1($arguments) { - return A._hsl("hsla", $arguments); - }, - $signature: 4 - }; - A.global_closure21.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0).get$isVar() || t1.$index($arguments, 1).get$isVar()) - return A._functionString("hsla", $arguments); - else - throw A.wrapException(A.SassScriptException$("Missing argument $lightness.", null)); - }, - $signature: 18 - }; - A.global_closure22.prototype = { - call$1($arguments) { - return A._parseChannels("hsla", J.$index$asx($arguments, 0), "channels", B.HslColorSpace_gsm); - }, - $signature: 4 - }; - A.global_closure23.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0) instanceof A.SassNumber || t1.$index($arguments, 0).get$isSpecialNumber()) - return A._functionString("grayscale", $arguments); - else { - A.warnForDeprecation(string$.Globalcg, B.Deprecation_0Gh); - return A._grayscale(t1.$index($arguments, 0)); - } - }, - $signature: 4 - }; - A.global_closure24.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - degrees = A._angleValue(t1.$index($arguments, 1), "degrees"); - if (!color._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$(string$.adjusto, null)); - A.warnForDeprecation(string$.adjustd + A.SassNumber_SassNumber(degrees, "deg").toString$0(0) + string$.x29x0a_Mor_, B.Deprecation_izR); - return color.changeHsl$1$hue(color._legacyChannel$2(B.HslColorSpace_gsm, "hue") + degrees); - }, - $signature: 23 - }; - A.global_closure25.prototype = { - call$1($arguments) { - var result, - _s9_ = "lightness", - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - amount = t1.$index($arguments, 1).assertNumber$1("amount"); - if (!color._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$(string$.lighte, null)); - t1 = color._legacyChannel$2(B.HslColorSpace_gsm, _s9_) + amount.valueInRange$3(0, 100, "amount"); - result = color.changeHsl$1$lightness(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); - A.warnForDeprecation("lighten() is deprecated. " + A._suggestScaleAndAdjust(color, amount._number$_value, _s9_) + string$.x0a_Morex3ac, B.Deprecation_izR); - return result; - }, - $signature: 23 - }; - A.global_closure26.prototype = { - call$1($arguments) { - var result, - _s9_ = "lightness", - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - amount = t1.$index($arguments, 1).assertNumber$1("amount"); - if (!color._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$(string$.darken, null)); - t1 = color._legacyChannel$2(B.HslColorSpace_gsm, _s9_) - amount.valueInRange$3(0, 100, "amount"); - result = color.changeHsl$1$lightness(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); - A.warnForDeprecation("darken() is deprecated. " + A._suggestScaleAndAdjust(color, -amount._number$_value, _s9_) + string$.x0a_Morex3ac, B.Deprecation_izR); - return result; - }, - $signature: 23 - }; - A.global_closure27.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0) instanceof A.SassNumber || t1.$index($arguments, 0).get$isSpecialNumber()) - return A._functionString("saturate", $arguments); - return new A.SassString("saturate(" + A.serializeValue(t1.$index($arguments, 0).assertNumber$1("amount"), false, true) + ")", false); - }, - $signature: 18 - }; - A.global_closure28.prototype = { - call$1($arguments) { - var t1, color, amount, result, - _s10_ = "saturation"; - A.warnForDeprecation(string$.Globalcad, B.Deprecation_0Gh); - t1 = J.getInterceptor$asx($arguments); - color = t1.$index($arguments, 0).assertColor$1("color"); - amount = t1.$index($arguments, 1).assertNumber$1("amount"); - if (!color._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$(string$.satura, null)); - t1 = color._legacyChannel$2(B.HslColorSpace_gsm, _s10_) + amount.valueInRange$3(0, 100, "amount"); - result = color.changeHsl$1$saturation(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); - A.warnForDeprecation("saturate() is deprecated. " + A._suggestScaleAndAdjust(color, amount._number$_value, _s10_) + string$.x0a_Morex3ac, B.Deprecation_izR); - return result; - }, - $signature: 23 - }; - A.global_closure29.prototype = { - call$1($arguments) { - var result, - _s10_ = "saturation", - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - amount = t1.$index($arguments, 1).assertNumber$1("amount"); - if (!color._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$(string$.desatu, null)); - t1 = color._legacyChannel$2(B.HslColorSpace_gsm, _s10_) - amount.valueInRange$3(0, 100, "amount"); - result = color.changeHsl$1$saturation(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); - A.warnForDeprecation("desaturate() is deprecated. " + A._suggestScaleAndAdjust(color, -amount._number$_value, _s10_) + string$.x0a_Morex3ac, B.Deprecation_izR); - return result; - }, - $signature: 23 - }; - A.global_closure30.prototype = { - call$1($arguments) { - return A._opacify("opacify", $arguments); - }, - $signature: 23 - }; - A.global_closure31.prototype = { - call$1($arguments) { - return A._opacify("fade-in", $arguments); - }, - $signature: 23 - }; - A.global_closure32.prototype = { - call$1($arguments) { - return A._transparentize("transparentize", $arguments); - }, - $signature: 23 - }; - A.global_closure33.prototype = { - call$1($arguments) { - return A._transparentize("fade-out", $arguments); - }, - $signature: 23 - }; - A.global_closure34.prototype = { - call$1($arguments) { - var _0_0 = J.$index$asx($arguments, 0), - t1 = false; - if (_0_0 instanceof A.SassString) - if (!_0_0._hasQuotes) - t1 = B.JSString_methods.contains$1(_0_0._string$_text, $.$get$_microsoftFilterStart()); - if (t1) - return A._functionString("alpha", $arguments); - if (_0_0 instanceof A.SassColor && !_0_0._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$(string$.alpha_, null)); - A.warnForDeprecation(string$.Globalcal, B.Deprecation_0Gh); - t1 = _0_0.assertColor$1("color").alphaOrNull; - return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); - }, - $signature: 4 - }; - A.global_closure35.prototype = { - call$1($arguments) { - var t1, - argList = J.$index$asx($arguments, 0).get$asList(); - if (argList.length !== 0 && B.JSArray_methods.every$1(argList, new A.global__closure())) - return A._functionString("alpha", $arguments); - t1 = argList.length; - if (t1 === 0) - throw A.wrapException(A.SassScriptException$("Missing argument $color.", null)); - else - throw A.wrapException(A.SassScriptException$("Only 1 argument allowed, but " + t1 + " were passed.", null)); - }, - $signature: 18 - }; - A.global__closure.prototype = { - call$1(argument) { - return argument instanceof A.SassString && !argument._hasQuotes && B.JSString_methods.contains$1(argument._string$_text, $.$get$_microsoftFilterStart()); - }, - $signature: 75 - }; - A.global_closure36.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0) instanceof A.SassNumber || t1.$index($arguments, 0).get$isSpecialNumber()) - return A._functionString("opacity", $arguments); - A.warnForDeprecation(string$.Globalco, B.Deprecation_0Gh); - t1 = t1.$index($arguments, 0).assertColor$1("color").alphaOrNull; - return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); - }, - $signature: 4 - }; - A.global_closure37.prototype = { - call$1($arguments) { - return A._parseChannels("color", J.$index$asx($arguments, 0), "description", null); - }, - $signature: 4 - }; - A.global_closure38.prototype = { - call$1($arguments) { - return A._parseChannels("hwb", J.$index$asx($arguments, 0), "channels", B.HwbColorSpace_06z); - }, - $signature: 4 - }; - A.global_closure39.prototype = { - call$1($arguments) { - return A._parseChannels("lab", J.$index$asx($arguments, 0), "channels", B.LabColorSpace_IF2); - }, - $signature: 4 - }; - A.global_closure40.prototype = { - call$1($arguments) { - return A._parseChannels("lch", J.$index$asx($arguments, 0), "channels", B.LchColorSpace_wv8); - }, - $signature: 4 - }; - A.global_closure41.prototype = { - call$1($arguments) { - return A._parseChannels("oklab", J.$index$asx($arguments, 0), "channels", B.OklabColorSpace_yrt); - }, - $signature: 4 - }; - A.global_closure42.prototype = { - call$1($arguments) { - return A._parseChannels("oklch", J.$index$asx($arguments, 0), "channels", B.OklchColorSpace_li8); - }, - $signature: 4 - }; - A.module_closure1.prototype = { - call$1(color) { - return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_mlz, "red")); - }, - $signature: 65 - }; - A.module_closure2.prototype = { - call$1(color) { - return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_mlz, "green")); - }, - $signature: 65 - }; - A.module_closure3.prototype = { - call$1(color) { - return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_mlz, "blue")); - }, - $signature: 65 - }; - A.module_closure4.prototype = { - call$1($arguments) { - var result = A._invert($arguments, false); - if (result instanceof A.SassString) - A.warnForDeprecation("Passing a number (" + A.S(J.$index$asx($arguments, 0)) + string$.x29x20to_ci + result.toString$0(0), B.Deprecation_ePO); - return result; - }, - $signature: 4 - }; - A.module_closure5.prototype = { - call$1(color) { - return color._legacyChannel$2(B.HslColorSpace_gsm, "hue"); - }, - $signature: 48 - }; - A.module_closure6.prototype = { - call$1(color) { - return color._legacyChannel$2(B.HslColorSpace_gsm, "saturation"); - }, - $signature: 48 - }; - A.module_closure7.prototype = { - call$1(color) { - return color._legacyChannel$2(B.HslColorSpace_gsm, "lightness"); - }, - $signature: 48 - }; - A.module_closure8.prototype = { - call$1($arguments) { - var result, - t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0) instanceof A.SassNumber) { - result = A._functionString("grayscale", t1.take$1($arguments, 1)); - A.warnForDeprecation("Passing a number (" + A.S(t1.$index($arguments, 0)) + string$.x29x20to_cg + result.toString$0(0), B.Deprecation_ePO); - return result; - } - return A._grayscale(t1.$index($arguments, 0)); - }, - $signature: 4 - }; - A.module_closure9.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - t2 = type$.JSArray_Value; - return A._parseChannels("hwb", A.SassList$(A._setArrayType([A.SassList$(A._setArrayType([t1.$index($arguments, 0), t1.$index($arguments, 1), t1.$index($arguments, 2)], t2), B.ListSeparator_nbm, false), t1.$index($arguments, 3)], t2), B.ListSeparator_cQA, false), null, B.HwbColorSpace_06z); - }, - $signature: 4 - }; - A.module_closure10.prototype = { - call$1($arguments) { - return A._parseChannels("hwb", J.$index$asx($arguments, 0), "channels", B.HwbColorSpace_06z); - }, - $signature: 4 - }; - A.module_closure11.prototype = { - call$1(color) { - return color._legacyChannel$2(B.HwbColorSpace_06z, "whiteness"); - }, - $signature: 48 - }; - A.module_closure12.prototype = { - call$1(color) { - return color._legacyChannel$2(B.HwbColorSpace_06z, "blackness"); - }, - $signature: 48 - }; - A.module_closure13.prototype = { - call$1($arguments) { - var result, - _0_0 = J.$index$asx($arguments, 0), - t1 = false; - if (_0_0 instanceof A.SassString) - if (!_0_0._hasQuotes) - t1 = B.JSString_methods.contains$1(_0_0._string$_text, $.$get$_microsoftFilterStart()); - if (t1) { - result = A._functionString("alpha", $arguments); - A.warnForDeprecation(string$.Using_c + result.toString$0(0), B.Deprecation_ePO); - return result; - } - if (_0_0 instanceof A.SassColor && !_0_0._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$(string$.color_a, null)); - t1 = _0_0.assertColor$1("color").alphaOrNull; - return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); - }, - $signature: 4 - }; - A.module_closure14.prototype = { - call$1($arguments) { - var result, - t1 = J.getInterceptor$asx($arguments); - if (B.JSArray_methods.every$1(t1.$index($arguments, 0).get$asList(), new A.module__closure2())) { - result = A._functionString("alpha", $arguments); - A.warnForDeprecation(string$.Using_c + result.toString$0(0), B.Deprecation_ePO); - return result; - } - throw A.wrapException(A.SassScriptException$("Only 1 argument allowed, but " + t1.get$length($arguments) + " were passed.", null)); - }, - $signature: 18 - }; - A.module__closure2.prototype = { - call$1(argument) { - return argument instanceof A.SassString && !argument._hasQuotes && B.JSString_methods.contains$1(argument._string$_text, $.$get$_microsoftFilterStart()); - }, - $signature: 75 - }; - A.module_closure15.prototype = { - call$1($arguments) { - var result, - t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0) instanceof A.SassNumber) { - result = A._functionString("opacity", $arguments); - A.warnForDeprecation("Passing a number (" + A.S(t1.$index($arguments, 0)) + string$.x20to_co + result.toString$0(0), B.Deprecation_ePO); - return result; - } - t1 = t1.$index($arguments, 0).assertColor$1("color").alphaOrNull; - return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); - }, - $signature: 4 - }; - A.module_closure16.prototype = { - call$1($arguments) { - return new A.SassString(J.get$first$ax($arguments).assertColor$1("color")._space.name, false); - }, - $signature: 18 - }; - A.module_closure17.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return A._colorInSpace(t1.$index($arguments, 0), t1.$index($arguments, 1), false); - }, - $signature: 23 - }; - A.module_closure18.prototype = { - call$1($arguments) { - return J.$index$asx($arguments, 0).assertColor$1("color")._space.get$isLegacyInternal() ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A.module_closure19.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return t1.$index($arguments, 0).assertColor$1("color").isChannelMissing$3$channelName$colorName(A._channelName(t1.$index($arguments, 1)), "channel", "color") ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A.module_closure20.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return A._colorInSpace(t1.$index($arguments, 0), t1.$index($arguments, 1), true).get$isInGamut() ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A.module_closure21.prototype = { - call$1($arguments) { - var space, method, _s5_ = "space", _s6_ = "method", - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - t2 = t1.$index($arguments, 1); - if (t2.$eq(0, B.C__SassNull)) - space = color._space; - else { - t2 = t2.assertString$1(_s5_); - t2.assertUnquoted$1(_s5_); - space = A.ColorSpace_fromName(t2._string$_text, _s5_); - } - if (J.$eq$(t1.$index($arguments, 2), B.C__SassNull)) - throw A.wrapException(A.SassScriptException$(string$.color_t, _s6_)); - t1 = t1.$index($arguments, 2).assertString$1(_s6_); - t1.assertUnquoted$1(_s6_); - method = A.GamutMapMethod_GamutMapMethod$fromName(t1._string$_text); - if (!space.get$isBoundedInternal()) - return color; - t1 = color.toSpace$1(space); - t1 = t1.get$isInGamut() ? t1 : method.map$1(0, t1); - return t1.toSpace$2$legacyMissing(color._space, false); - }, - $signature: 23 - }; - A.module_closure22.prototype = { - call$1($arguments) { - var channelIndex, channelInfo, channelValue, unit, - t1 = J.getInterceptor$asx($arguments), - color = A._colorInSpace(t1.$index($arguments, 0), t1.$index($arguments, 2), true), - channelName = A._channelName(t1.$index($arguments, 1)); - if (channelName === "alpha") { - t1 = color.alphaOrNull; - return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); - } - t1 = color._space._channels; - channelIndex = B.JSArray_methods.indexWhere$1(t1, new A.module__closure1(channelName)); - if (channelIndex === -1) - throw A.wrapException(A.SassScriptException$("Color " + color.toString$0(0) + " has no channel named " + channelName + ".", "channel")); - channelInfo = t1[channelIndex]; - channelValue = color.get$channels()[channelIndex]; - unit = channelInfo.associatedUnit; - return A.SassNumber_SassNumber(unit === "%" ? channelValue * 100 / type$.LinearChannel._as(channelInfo).max : channelValue, unit); - }, - $signature: 24 - }; - A.module__closure1.prototype = { - call$1(channel) { - return channel.name === this.channelName; - }, - $signature: 94 - }; - A.module_closure23.prototype = { - call$1($arguments) { - var t2, t3, - t1 = J.getInterceptor$asx($arguments), - color1 = t1.$index($arguments, 0).assertColor$1("color1"), - color2 = t1.$index($arguments, 1).assertColor$1("color2"); - t1 = new A.module_closure_toXyzNoMissing(); - if (color1._space === color2._space) { - t1 = color1.channel0OrNull; - t2 = false; - if (t1 == null) - t1 = 0; - t3 = color2.channel0OrNull; - if (A.fuzzyEquals(t1, t3 == null ? 0 : t3)) { - t1 = color1.channel1OrNull; - if (t1 == null) - t1 = 0; - t3 = color2.channel1OrNull; - if (A.fuzzyEquals(t1, t3 == null ? 0 : t3)) { - t1 = color1.channel2OrNull; - if (t1 == null) - t1 = 0; - t3 = color2.channel2OrNull; - if (A.fuzzyEquals(t1, t3 == null ? 0 : t3)) { - t1 = color1.alphaOrNull; - if (t1 == null) - t1 = 0; - t2 = color2.alphaOrNull; - t1 = A.fuzzyEquals(t1, t2 == null ? 0 : t2); - } else - t1 = t2; - } else - t1 = t2; - } else - t1 = t2; - } else - t1 = J.$eq$(t1.call$1(color1), t1.call$1(color2)); - return t1 ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A.module_closure_toXyzNoMissing.prototype = { - call$1(color) { - var _1_1, _1_3, t1, _1_7, channel0, _1_8, channel1, _1_9, channel2, _1_10, alpha, _null = null; - $label0$0: { - _1_1 = color._space; - _1_3 = B.XyzD65ColorSpace_4CA === _1_1; - t1 = _1_3; - if (t1) - t1 = !(color.channel0OrNull == null || color.channel1OrNull == null || color.channel2OrNull == null || color.alphaOrNull == null); - else - t1 = false; - if (t1) { - t1 = color; - break $label0$0; - } - if (_1_3) { - _1_7 = color.channel0OrNull; - if (_1_7 == null) - _1_7 = 0; - channel0 = _1_7; - _1_8 = color.channel1OrNull; - if (_1_8 == null) - _1_8 = 0; - channel1 = _1_8; - _1_9 = color.channel2OrNull; - if (_1_9 == null) - _1_9 = 0; - channel2 = _1_9; - _1_10 = color.alphaOrNull; - if (_1_10 == null) - _1_10 = 0; - alpha = _1_10; - t1 = A.SassColor$_forSpace(B.XyzD65ColorSpace_4CA, channel0, channel1, channel2, alpha, _null); - break $label0$0; - } - _1_7 = color.channel0OrNull; - if (_1_7 == null) - _1_7 = 0; - channel0 = _1_7; - _1_8 = color.channel1OrNull; - if (_1_8 == null) - _1_8 = 0; - channel1 = _1_8; - _1_9 = color.channel2OrNull; - if (_1_9 == null) - _1_9 = 0; - channel2 = _1_9; - _1_10 = color.alphaOrNull; - if (_1_10 == null) - _1_10 = 0; - alpha = _1_10; - t1 = _1_1.convert$5(B.XyzD65ColorSpace_4CA, channel0, channel1, channel2, alpha); - break $label0$0; - } - return t1; - }, - $signature: 454 - }; - A.module_closure24.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return A._colorInSpace(t1.$index($arguments, 0), t1.$index($arguments, 2), true).isChannelPowerless$3$channelName$colorName(A._channelName(t1.$index($arguments, 1)), "channel", "color") ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._mix_closure.prototype = { - call$1($arguments) { - var _s6_ = "weight", - _s41_ = string$.To_usem, - _s29_ = ", you must provide a $method.", - t1 = J.getInterceptor$asx($arguments), - color1 = t1.$index($arguments, 0).assertColor$1("color1"), - color2 = t1.$index($arguments, 1).assertColor$1("color2"), - weight = t1.$index($arguments, 2).assertNumber$1(_s6_); - if (!J.$eq$(t1.$index($arguments, 3), B.C__SassNull)) - return color1.interpolate$4$legacyMissing$weight(color2, A.InterpolationMethod_InterpolationMethod$fromValue(t1.$index($arguments, 3), "method"), false, weight.valueInRangeWithUnit$4(0, 100, _s6_, "%") / 100); - A._checkPercent(weight, _s6_); - if (!color1._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$(_s41_ + color1.toString$0(0) + _s29_, "color1")); - else if (!color2._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$(_s41_ + color2.toString$0(0) + _s29_, "color2")); - return A._mixLegacy(color1, color2, weight); - }, - $signature: 23 - }; - A._complement_closure.prototype = { - call$1($arguments) { - var space, t3, colorInSpace, t4, t5, t6, _s5_ = "space", - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - t2 = color._space; - if (t2.get$isLegacyInternal() && J.$eq$(t1.$index($arguments, 1), B.C__SassNull)) - space = B.HslColorSpace_gsm; - else { - t3 = t1.$index($arguments, 1).assertString$1(_s5_); - t3.assertUnquoted$1(_s5_); - space = A.ColorSpace_fromName(t3._string$_text, _s5_); - } - if (!space.get$isPolarInternal()) - throw A.wrapException(A.SassScriptException$("Color space " + space.toString$0(0) + " doesn't have a hue channel.", _s5_)); - colorInSpace = color.toSpace$2$legacyMissing(space, !J.$eq$(t1.$index($arguments, 1), B.C__SassNull)); - t1 = space._channels; - t3 = colorInSpace.channel0OrNull; - t4 = colorInSpace.channel1OrNull; - t5 = colorInSpace.channel2OrNull; - t6 = colorInSpace.alphaOrNull; - return (space.get$isLegacyInternal() ? A.SassColor_SassColor$forSpaceInternal(space, A._adjustChannel(colorInSpace, t1[0], t3, A.SassNumber_SassNumber(180, null)), t4, t5, t6) : A.SassColor_SassColor$forSpaceInternal(space, t3, t4, A._adjustChannel(colorInSpace, t1[2], t5, A.SassNumber_SassNumber(180, null)), t6)).toSpace$2$legacyMissing(t2, false); - }, - $signature: 23 - }; - A._adjust_closure.prototype = { - call$1($arguments) { - return A._updateComponents($arguments, true, false, false); - }, - $signature: 23 - }; - A._scale_closure.prototype = { - call$1($arguments) { - return A._updateComponents($arguments, false, false, true); - }, - $signature: 23 - }; - A._change_closure.prototype = { - call$1($arguments) { - return A._updateComponents($arguments, false, true, false); - }, - $signature: 23 - }; - A._ieHexStr_closure.prototype = { - call$1($arguments) { - var t1, t2, t3, t4, t5, - color = J.$index$asx($arguments, 0).assertColor$1("color").toSpace$1(B.RgbColorSpace_mlz); - color = color.get$isInGamut() ? color : B.LocalMindeGamutMap_Q7f.map$1(0, color); - t1 = new A._ieHexStr_closure_hexString(); - t2 = color.alphaOrNull; - t2 = A.S(t1.call$1((t2 == null ? 0 : t2) * 255)); - t3 = color.channel0OrNull; - t3 = A.S(t1.call$1(t3 == null ? 0 : t3)); - t4 = color.channel1OrNull; - t4 = A.S(t1.call$1(t4 == null ? 0 : t4)); - t5 = color.channel2OrNull; - return new A.SassString("#" + t2 + t3 + t4 + A.S(t1.call$1(t5 == null ? 0 : t5)), false); - }, - $signature: 18 - }; - A._ieHexStr_closure_hexString.prototype = { - call$1(component) { - return B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(A.fuzzyRound(component), 16), 2, "0").toUpperCase(); - }, - $signature: 237 - }; - A._updateComponents_closure.prototype = { - call$1(space) { - return this.originalColor.toSpace$2$legacyMissing(space, false); - }, - $signature: 461 - }; - A._updateComponents_closure0.prototype = { - call$1(info) { - return this._box_0.name === info.name; - }, - $signature: 94 - }; - A._changeColor_closure.prototype = { - call$0() { - var t1 = this.alphaArg; - A.warnForDeprecation("$alpha: Passing a unit other than % (" + A.S(t1) + string$.x29x20is_d + t1.unitSuggestion$1("alpha") + string$.x0a_See_, B.Deprecation_int); - return t1.valueInRange$3(0, 1, "alpha"); - }, - $signature: 241 - }; - A._adjustColor_closure.prototype = { - call$1(alpha) { - return isNaN(alpha) ? 0 : B.JSNumber_methods.clamp$2(alpha, 0, 1); - }, - $signature: 15 - }; - A._functionString_closure.prototype = { - call$1(argument) { - return A.serializeValue(argument, false, true); - }, - $signature: 486 - }; - A._removedColorFunction_closure.prototype = { - call$1($arguments) { - var t1 = this.name, - t2 = J.getInterceptor$asx($arguments), - t3 = A.S(t2.$index($arguments, 0)), - t4 = this.negative ? "-" : ""; - throw A.wrapException(A.SassScriptException$("The function " + t1 + string$.x28__isn + t3 + ", $" + this.argument + ": " + t4 + A.S(t2.$index($arguments, 1)) + string$.x29x0a_Moro + t1, null)); - }, - $signature: 504 - }; - A._rgb_closure.prototype = { - call$1(alpha) { - var t1 = A._percentageOrUnitless(alpha.assertNumber$1("alpha"), 1, "alpha"); - return isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1); - }, - $signature: 258 - }; - A._hsl_closure.prototype = { - call$1(alpha) { - var t1 = A._percentageOrUnitless(alpha.assertNumber$1("alpha"), 1, "alpha"); - return isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1); - }, - $signature: 258 - }; - A._parseChannels_closure.prototype = { - call$1($name) { - return $name + " channel"; - }, - $signature: 6 - }; - A._parseChannels_closure0.prototype = { - call$1(channel) { - return channel.get$isSpecialNumber(); - }, - $signature: 75 - }; - A._colorFromChannels_closure.prototype = { - call$1(channel0) { - return A._angleValue(channel0, "hue"); - }, - $signature: 138 - }; - A._colorFromChannels_closure0.prototype = { - call$1(channel0) { - return A._angleValue(channel0, "hue"); - }, - $signature: 138 - }; - A._channelFromValue_closure.prototype = { - call$1(value) { - var t1, _0_8, t2, _0_5, _0_8_isSet, upperClamped, t3, - _0_0 = this.channel; - $label0$0: { - t1 = _0_0 instanceof A.LinearChannel; - if (t1 && _0_0.requiresPercent && !value.hasUnit$1("%")) - A.throwExpression(A.SassScriptException$("Expected " + value.toString$0(0) + ' to have unit "%".', _0_0.name)); - _0_8 = null; - t2 = false; - if (t1) { - _0_5 = _0_0.lowerClamped; - _0_8_isSet = !_0_5; - if (_0_8_isSet) { - _0_8 = _0_0.upperClamped; - t2 = !_0_8; - } - } else { - _0_5 = null; - _0_8_isSet = false; - } - if (t2) { - t1 = A._percentageOrUnitless(value, _0_0.max, _0_0.name); - break $label0$0; - } - if (t1 && !this.clamp) { - t1 = A._percentageOrUnitless(value, _0_0.max, _0_0.name); - break $label0$0; - } - if (t1) { - upperClamped = _0_8_isSet ? _0_8 : _0_0.upperClamped; - t1 = _0_0.max; - t2 = A._percentageOrUnitless(value, t1, _0_0.name); - t3 = _0_5 ? _0_0.min : -1 / 0; - t1 = upperClamped ? t1 : 1 / 0; - t1 = isNaN(t2) ? t3 : B.JSNumber_methods.clamp$2(t2, t3, t1); - break $label0$0; - } - t1 = B.JSNumber_methods.$mod(value.coerceValueToUnit$2("deg", _0_0.name), 360); - break $label0$0; - } - return t1; - }, - $signature: 138 - }; - A._channelFunction_closure.prototype = { - call$1($arguments) { - var _this = this, - result = A.SassNumber_SassNumber(_this.getter.call$1(J.get$first$ax($arguments).assertColor$1("color")), _this.unit), - t1 = _this.global ? "" : "color.", - t2 = _this.name; - A.warnForDeprecation(t1 + t2 + string$.x28__is_d + t2 + '", $space: ' + _this.space.toString$0(0) + string$.x29x0a_Mor_, B.Deprecation_izR); - return result; - }, - $signature: 24 - }; - A._suggestScaleAndAdjust_closure.prototype = { - call$1(channel) { - return channel.name === this.channelName; - }, - $signature: 94 - }; - A._length_closure0.prototype = { - call$1($arguments) { - return A.SassNumber_SassNumber(J.$index$asx($arguments, 0).get$asList().length, null); - }, - $signature: 24 - }; - A._nth_closure.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - list = t1.$index($arguments, 0), - index = t1.$index($arguments, 1); - return list.get$asList()[list.sassIndexToListIndex$2(index, "n")]; - }, - $signature: 4 - }; - A._setNth_closure.prototype = { - call$1($arguments) { - var newList, - t1 = J.getInterceptor$asx($arguments), - list = t1.$index($arguments, 0), - index = t1.$index($arguments, 1), - value = t1.$index($arguments, 2); - t1 = list.get$asList(); - newList = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); - newList[list.sassIndexToListIndex$2(index, "n")] = value; - return list.withListContents$1(newList); - }, - $signature: 28 - }; - A._join_closure.prototype = { - call$1($arguments) { - var _0_1, _0_4, _0_3, t2, t3, _0_40, separator, bracketed, _null = null, - t1 = J.getInterceptor$asx($arguments), - list1 = t1.$index($arguments, 0), - list2 = t1.$index($arguments, 1), - separatorParam = t1.$index($arguments, 2).assertString$1("separator"), - bracketedParam = t1.$index($arguments, 3), - _1_0 = separatorParam._string$_text; - $label1$1: { - if ("auto" === _1_0) { - _0_1 = list1.get$separator(list1); - _0_4 = list2.get$separator(list2); - $label0$0: { - t1 = _null; - _0_3 = B.ListSeparator_undecided_null_undecided === _0_1; - t2 = _0_3; - if (t2) { - t3 = B.ListSeparator_undecided_null_undecided === _0_4; - _0_40 = _0_4; - } else { - _0_40 = _null; - t3 = false; - } - if (t3) { - t1 = B.ListSeparator_nbm; - break $label0$0; - } - if (_0_3) - separator = t2 ? _0_40 : _0_4; - else - separator = t1; - if (!_0_3) - separator = _0_1; - t1 = separator; - break $label0$0; - } - break $label1$1; - } - if ("space" === _1_0) { - t1 = B.ListSeparator_nbm; - break $label1$1; - } - if ("comma" === _1_0) { - t1 = B.ListSeparator_ECn; - break $label1$1; - } - if ("slash" === _1_0) { - t1 = B.ListSeparator_cQA; - break $label1$1; - } - t1 = A.throwExpression(A.SassScriptException$(string$.x24separ, _null)); - } - bracketed = bracketedParam instanceof A.SassString && bracketedParam._string$_text === "auto" ? list1.get$hasBrackets() : bracketedParam.get$isTruthy(); - t2 = A.List_List$of(list1.get$asList(), true, type$.Value); - B.JSArray_methods.addAll$1(t2, list2.get$asList()); - return A.SassList$(t2, t1, bracketed); - }, - $signature: 28 - }; - A._append_closure0.prototype = { - call$1($arguments) { - var t2, - t1 = J.getInterceptor$asx($arguments), - list = t1.$index($arguments, 0), - value = t1.$index($arguments, 1), - _0_0 = t1.$index($arguments, 2).assertString$1("separator")._string$_text; - $label0$0: { - if ("auto" === _0_0) { - t1 = list.get$separator(list) === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_nbm : list.get$separator(list); - break $label0$0; - } - if ("space" === _0_0) { - t1 = B.ListSeparator_nbm; - break $label0$0; - } - if ("comma" === _0_0) { - t1 = B.ListSeparator_ECn; - break $label0$0; - } - if ("slash" === _0_0) { - t1 = B.ListSeparator_cQA; - break $label0$0; - } - t1 = A.throwExpression(A.SassScriptException$(string$.x24separ, null)); - } - t2 = A.List_List$of(list.get$asList(), true, type$.Value); - t2.push(value); - return list.withListContents$2$separator(t2, t1); - }, - $signature: 28 - }; - A._zip_closure.prototype = { - call$1($arguments) { - var results, result, _box_0 = {}, - t1 = J.$index$asx($arguments, 0).get$asList(), - t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,List>"), - lists = A.List_List$of(new A.MappedListIterable(t1, new A._zip__closure(), t2), true, t2._eval$1("ListIterable.E")); - if (lists.length === 0) - return B.SassList_bdS; - _box_0.i = 0; - results = A._setArrayType([], type$.JSArray_SassList); - for (t1 = A._arrayInstanceType(lists)._eval$1("MappedListIterable<1,Value>"), t2 = type$.Value; B.JSArray_methods.every$1(lists, new A._zip__closure0(_box_0));) { - result = A.List_List$from(new A.MappedListIterable(lists, new A._zip__closure1(_box_0), t1), false, t2); - result.fixed$length = Array; - result.immutable$list = Array; - results.push(new A.SassList(result, B.ListSeparator_nbm, false)); - ++_box_0.i; - } - return A.SassList$(results, B.ListSeparator_ECn, false); - }, - $signature: 28 - }; - A._zip__closure.prototype = { - call$1(list) { - return list.get$asList(); - }, - $signature: 648 - }; - A._zip__closure0.prototype = { - call$1(list) { - return this._box_0.i !== J.get$length$asx(list); - }, - $signature: 668 - }; - A._zip__closure1.prototype = { - call$1(list) { - return J.$index$asx(list, this._box_0.i); - }, - $signature: 4 - }; - A._index_closure0.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - index = B.JSArray_methods.indexOf$1(t1.$index($arguments, 0).get$asList(), t1.$index($arguments, 1)); - return index === -1 ? B.C__SassNull : A.SassNumber_SassNumber(index + 1, null); - }, - $signature: 4 - }; - A._separator_closure.prototype = { - call$1($arguments) { - var t1, - _0_0 = J.get$separator$x(J.$index$asx($arguments, 0)); - $label0$0: { - if (B.ListSeparator_ECn === _0_0) { - t1 = new A.SassString("comma", false); - break $label0$0; - } - if (B.ListSeparator_cQA === _0_0) { - t1 = new A.SassString("slash", false); - break $label0$0; - } - t1 = new A.SassString("space", false); - break $label0$0; - } - return t1; - }, - $signature: 18 - }; - A._isBracketed_closure.prototype = { - call$1($arguments) { - return J.$index$asx($arguments, 0).get$hasBrackets() ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._slash_closure.prototype = { - call$1($arguments) { - var list = J.$index$asx($arguments, 0).get$asList(); - if (list.length < 2) - throw A.wrapException(A.SassScriptException$("At least two elements are required.", null)); - return A.SassList$(list, B.ListSeparator_cQA, false); - }, - $signature: 28 - }; - A._get_closure.prototype = { - call$1($arguments) { - var value, - t1 = J.getInterceptor$asx($arguments), - map = t1.$index($arguments, 0).assertMap$1("map"), - t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); - B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); - for (t1 = A.IterableExtension_get_exceptLast(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { - value = map._map$_contents.$index(0, t1.get$current(t1)); - if (!(value instanceof A.SassMap)) - return B.C__SassNull; - } - t1 = map._map$_contents.$index(0, B.JSArray_methods.get$last(t2)); - return t1 == null ? B.C__SassNull : t1; - }, - $signature: 4 - }; - A._set_closure.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return A._modify(t1.$index($arguments, 0).assertMap$1("map"), A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value), new A._set__closure0($arguments), true); - }, - $signature: 4 - }; - A._set__closure0.prototype = { - call$1(_) { - return J.$index$asx(this.$arguments, 2); - }, - $signature: 42 - }; - A._set_closure0.prototype = { - call$1($arguments) { - var keys, t3, t1 = {}, - t2 = J.getInterceptor$asx($arguments), - map = t2.$index($arguments, 0).assertMap$1("map"), - _0_0 = t2.$index($arguments, 1).get$asList(), - _0_1 = _0_0.length; - if (_0_1 <= 0) - throw A.wrapException(A.SassScriptException$("Expected $args to contain a key.", null)); - if (_0_1 === 1) - throw A.wrapException(A.SassScriptException$("Expected $args to contain a value.", null)); - keys = t1.value = null; - t2 = _0_1 >= 1; - if (t2) { - t3 = _0_1 - 1; - keys = B.JSArray_methods.sublist$2(_0_0, 0, t3); - t1.value = _0_0[t3]; - } - if (t2) - return A._modify(map, keys, new A._set__closure(t1), true); - throw A.wrapException("[BUG] Unreachable code"); - }, - $signature: 4 - }; - A._set__closure.prototype = { - call$1(_) { - return this._box_0.value; - }, - $signature: 42 - }; - A._merge_closure.prototype = { - call$1($arguments) { - var t2, - t1 = J.getInterceptor$asx($arguments), - map1 = t1.$index($arguments, 0).assertMap$1("map1"), - map2 = t1.$index($arguments, 1).assertMap$1("map2"); - t1 = type$.Value; - t2 = A.LinkedHashMap_LinkedHashMap$of(map1._map$_contents, t1, t1); - t2.addAll$1(0, map2._map$_contents); - return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 35 - }; - A._merge_closure0.prototype = { - call$1($arguments) { - var last, t2, keys, _null = null, - t1 = J.getInterceptor$asx($arguments), - map1 = t1.$index($arguments, 0).assertMap$1("map1"), - _0_0 = t1.$index($arguments, 1).get$asList(), - _0_1 = _0_0.length; - if (_0_1 <= 0) - throw A.wrapException(A.SassScriptException$("Expected $args to contain a key.", _null)); - if (_0_1 === 1) - throw A.wrapException(A.SassScriptException$("Expected $args to contain a map.", _null)); - t1 = _0_1 >= 1; - last = _null; - if (t1) { - t2 = _0_1 - 1; - keys = B.JSArray_methods.sublist$2(_0_0, 0, t2); - last = _0_0[t2]; - } else - keys = _null; - if (t1) - return A._modify(map1, keys, new A._merge__closure(last.assertMap$1("map2")), true); - throw A.wrapException("[BUG] Unreachable code"); - }, - $signature: 4 - }; - A._merge__closure.prototype = { - call$1(oldValue) { - var t1, t2, - nestedMap = oldValue.tryMap$0(); - if (nestedMap == null) - return this.map2; - t1 = type$.Value; - t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map$_contents, t1, t1); - t2.addAll$1(0, this.map2._map$_contents); - return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 318 - }; - A._deepMerge_closure.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return A._deepMergeImpl(t1.$index($arguments, 0).assertMap$1("map1"), t1.$index($arguments, 1).assertMap$1("map2")); - }, - $signature: 35 - }; - A._deepRemove_closure.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - map = t1.$index($arguments, 0).assertMap$1("map"), - t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); - B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); - return A._modify(map, A.IterableExtension_get_exceptLast(t2), new A._deepRemove__closure(t2), false); - }, - $signature: 4 - }; - A._deepRemove__closure.prototype = { - call$1(value) { - var t1, nestedMap, t2, - _0_0 = value.tryMap$0(); - if (_0_0 != null) { - t1 = _0_0._map$_contents.containsKey$1(B.JSArray_methods.get$last(this.keys)); - nestedMap = _0_0; - } else { - nestedMap = null; - t1 = false; - } - if (t1) { - t1 = type$.Value; - t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map$_contents, t1, t1); - t2.remove$1(0, B.JSArray_methods.get$last(this.keys)); - return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - } - return value; - }, - $signature: 42 - }; - A._remove_closure.prototype = { - call$1($arguments) { - return J.$index$asx($arguments, 0).assertMap$1("map"); - }, - $signature: 35 - }; - A._remove_closure0.prototype = { - call$1($arguments) { - var mutableMap, t3, _i, - t1 = J.getInterceptor$asx($arguments), - map = t1.$index($arguments, 0).assertMap$1("map"), - t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); - B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); - t1 = type$.Value; - mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map$_contents, t1, t1); - for (t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) - mutableMap.remove$1(0, t2[_i]); - return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); - }, - $signature: 35 - }; - A._keys_closure.prototype = { - call$1($arguments) { - var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map$_contents; - return A.SassList$(t1.get$keys(t1), B.ListSeparator_ECn, false); - }, - $signature: 28 - }; - A._values_closure.prototype = { - call$1($arguments) { - var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map$_contents; - return A.SassList$(t1.get$values(t1), B.ListSeparator_ECn, false); - }, - $signature: 28 - }; - A._hasKey_closure.prototype = { - call$1($arguments) { - var value, - t1 = J.getInterceptor$asx($arguments), - map = t1.$index($arguments, 0).assertMap$1("map"), - t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); - B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); - for (t1 = A.IterableExtension_get_exceptLast(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { - value = map._map$_contents.$index(0, t1.get$current(t1)); - if (!(value instanceof A.SassMap)) - return B.SassBoolean_false; - } - return map._map$_contents.containsKey$1(B.JSArray_methods.get$last(t2)) ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._modify_modifyNestedMap.prototype = { - call$1(map) { - var nestedMap, _this = this, - t1 = type$.Value, - mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map$_contents, t1, t1), - t2 = _this.keyIterator, - key = t2.get$current(t2); - if (!t2.moveNext$0()) { - t2 = mutableMap.$index(0, key); - if (t2 == null) - t2 = B.C__SassNull; - mutableMap.$indexSet(0, key, _this.modify.call$1(t2)); - return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); - } - t2 = mutableMap.$index(0, key); - nestedMap = t2 == null ? null : t2.tryMap$0(); - t2 = nestedMap == null; - if (t2 && !_this.addNesting) - return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); - mutableMap.$indexSet(0, key, _this.call$1(t2 ? B.SassMap_Map_empty : nestedMap)); - return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); - }, - $signature: 511 - }; - A.global_closure.prototype = { - call$1($arguments) { - var t1, - number = J.$index$asx($arguments, 0).assertNumber$1("number"); - if (number.hasUnit$1("%")) - A.warnForDeprecation(string$.Passinp + number.toString$0(0) + ")\nTo emit a CSS abs() now: abs(#{" + number.toString$0(0) + string$.x7d__Mor, B.Deprecation_Zk6); - else - A.warnForDeprecation(string$.Globalm, B.Deprecation_0Gh); - t1 = number.get$numeratorUnits(number); - return A.SassNumber_SassNumber$withUnits(Math.abs(number._number$_value), number.get$denominatorUnits(number), t1); - }, - $signature: 24 - }; - A.module_closure0.prototype = { - call$1(value) { - return Math.abs(value); - }, - $signature: 15 - }; - A._ceil_closure.prototype = { - call$1(value) { - return B.JSNumber_methods.ceil$0(value); - }, - $signature: 15 - }; - A._clamp_closure.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - min = t1.$index($arguments, 0).assertNumber$1("min"), - number = t1.$index($arguments, 1).assertNumber$1("number"), - max = t1.$index($arguments, 2).assertNumber$1("max"); - number.convertValueToMatch$3(min, "number", "min"); - max.convertValueToMatch$3(min, "max", "min"); - if (min.greaterThanOrEquals$1(max).value) - return min; - if (min.greaterThanOrEquals$1(number).value) - return min; - if (number.greaterThanOrEquals$1(max).value) - return max; - return number; - }, - $signature: 24 - }; - A._floor_closure.prototype = { - call$1(value) { - return B.JSNumber_methods.floor$0(value); - }, - $signature: 15 - }; - A._max_closure.prototype = { - call$1($arguments) { - var t1, t2, max, _i, number; - for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, max = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - number = t1[_i].assertNumber$0(); - if (max == null || max.lessThan$1(number).value) - max = number; - } - if (max != null) - return max; - throw A.wrapException(A.SassScriptException$("At least one argument must be passed.", null)); - }, - $signature: 24 - }; - A._min_closure.prototype = { - call$1($arguments) { - var t1, t2, min, _i, number; - for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, min = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - number = t1[_i].assertNumber$0(); - if (min == null || min.greaterThan$1(number).value) - min = number; - } - if (min != null) - return min; - throw A.wrapException(A.SassScriptException$("At least one argument must be passed.", null)); - }, - $signature: 24 - }; - A._round_closure.prototype = { - call$1(number) { - return B.JSNumber_methods.round$0(number); - }, - $signature: 15 - }; - A._hypot_closure.prototype = { - call$1($arguments) { - var subtotal, i, i0, t3, t4, - t1 = J.$index$asx($arguments, 0).get$asList(), - t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,SassNumber>"), - numbers = A.List_List$of(new A.MappedListIterable(t1, new A._hypot__closure(), t2), true, t2._eval$1("ListIterable.E")); - t1 = numbers.length; - if (t1 === 0) - throw A.wrapException(A.SassScriptException$("At least one argument must be passed.", null)); - for (subtotal = 0, i = 0; i < t1; i = i0) { - i0 = i + 1; - subtotal += Math.pow(numbers[i].convertValueToMatch$3(numbers[0], "numbers[" + i0 + "]", "numbers[1]"), 2); - } - t1 = Math.sqrt(subtotal); - t2 = numbers[0]; - t3 = J.getInterceptor$x(t2); - t4 = t3.get$numeratorUnits(t2); - return A.SassNumber_SassNumber$withUnits(t1, t3.get$denominatorUnits(t2), t4); - }, - $signature: 24 - }; - A._hypot__closure.prototype = { - call$1(argument) { - return argument.assertNumber$0(); - }, - $signature: 301 - }; - A._log_closure.prototype = { - call$1($arguments) { - var base, - _s18_ = " to have no units.", - _null = null, - t1 = J.getInterceptor$asx($arguments), - number = t1.$index($arguments, 0).assertNumber$1("number"); - if (number.get$hasUnits()) - throw A.wrapException(A.SassScriptException$("$number: Expected " + number.toString$0(0) + _s18_, _null)); - else if (J.$eq$(t1.$index($arguments, 1), B.C__SassNull)) - return A.SassNumber_SassNumber(Math.log(number._number$_value), _null); - base = t1.$index($arguments, 1).assertNumber$1("base"); - if (base.get$hasUnits()) - throw A.wrapException(A.SassScriptException$("$base: Expected " + base.toString$0(0) + _s18_, _null)); - else - return A.SassNumber_SassNumber(Math.log(number._number$_value) / Math.log(base._number$_value), _null); - }, - $signature: 24 - }; - A._pow_closure.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return A.pow0(t1.$index($arguments, 0).assertNumber$1("base"), t1.$index($arguments, 1).assertNumber$1("exponent")); - }, - $signature: 24 - }; - A._atan2_closure.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - y = t1.$index($arguments, 0).assertNumber$1("y"); - return A.SassNumber_SassNumber$withUnits(Math.atan2(y._number$_value, t1.$index($arguments, 1).assertNumber$1("x").convertValueToMatch$3(y, "x", "y")) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); - }, - $signature: 24 - }; - A._compatible_closure.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return t1.$index($arguments, 0).assertNumber$1("number1").isComparableTo$1(t1.$index($arguments, 1).assertNumber$1("number2")) ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._isUnitless_closure.prototype = { - call$1($arguments) { - return !J.$index$asx($arguments, 0).assertNumber$1("number").get$hasUnits() ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._unit_closure.prototype = { - call$1($arguments) { - return new A.SassString(J.$index$asx($arguments, 0).assertNumber$1("number").get$unitString(), true); - }, - $signature: 18 - }; - A._percentage_closure.prototype = { - call$1($arguments) { - var number = J.$index$asx($arguments, 0).assertNumber$1("number"); - number.assertNoUnits$1("number"); - return A.SassNumber_SassNumber(number._number$_value * 100, "%"); - }, - $signature: 24 - }; - A._randomFunction_closure.prototype = { - call$1($arguments) { - var limit, limitScalar, - t1 = J.getInterceptor$asx($arguments); - if (J.$eq$(t1.$index($arguments, 0), B.C__SassNull)) - return A.SassNumber_SassNumber($.$get$_random0().nextDouble$0(), null); - limit = t1.$index($arguments, 0).assertNumber$1("limit"); - if (limit.get$hasUnits()) - A.warnForDeprecation(string$.math_r + limit.toString$0(0) + string$.x29x20in_a + limit.get$unitString() + ")) * 1" + limit.get$unitString() + string$.x0a_To_p + limit.get$unitString() + string$.x29x29__Mo, B.Deprecation_int); - limitScalar = limit.assertInt$1("limit"); - if (limitScalar < 1) - throw A.wrapException(A.SassScriptException$("$limit: Must be greater than 0, was " + limit.toString$0(0) + ".", null)); - return A.SassNumber_SassNumber($.$get$_random0().nextInt$1(limitScalar) + 1, null); - }, - $signature: 24 - }; - A._div_closure.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - number1 = t1.$index($arguments, 0), - number2 = t1.$index($arguments, 1); - if (!(number1 instanceof A.SassNumber) || !(number2 instanceof A.SassNumber)) - A.warn(string$.math_d); - return number1.dividedBy$1(number2); - }, - $signature: 4 - }; - A._singleArgumentMathFunc_closure.prototype = { - call$1($arguments) { - return this.mathFunc.call$1(J.$index$asx($arguments, 0).assertNumber$1("number")); - }, - $signature: 24 - }; - A._numberFunction_closure.prototype = { - call$1($arguments) { - var number = J.$index$asx($arguments, 0).assertNumber$1("number"), - t1 = this.transform.call$1(number._number$_value), - t2 = number.get$numeratorUnits(number); - return A.SassNumber_SassNumber$withUnits(t1, number.get$denominatorUnits(number), t2); - }, - $signature: 24 - }; - A._shared_closure.prototype = { - call$1($arguments) { - A.warnForDeprecation(string$.The_fe, B.Deprecation_Vr4); - return $._features.contains$1(0, J.$index$asx($arguments, 0).assertString$1("feature")._string$_text) ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._shared_closure0.prototype = { - call$1($arguments) { - return new A.SassString(A.serializeValue(J.get$first$ax($arguments), true, true), false); - }, - $signature: 18 - }; - A._shared_closure1.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - _0_0 = t1.$index($arguments, 0); - $label0$0: { - if (_0_0 instanceof A.SassArgumentList) { - t1 = "arglist"; - break $label0$0; - } - if (_0_0 instanceof A.SassBoolean) { - t1 = "bool"; - break $label0$0; - } - if (_0_0 instanceof A.SassColor) { - t1 = "color"; - break $label0$0; - } - if (_0_0 instanceof A.SassList) { - t1 = "list"; - break $label0$0; - } - if (_0_0 instanceof A.SassMap) { - t1 = "map"; - break $label0$0; - } - if (B.C__SassNull === _0_0) { - t1 = "null"; - break $label0$0; - } - if (_0_0 instanceof A.SassNumber) { - t1 = "number"; - break $label0$0; - } - if (_0_0 instanceof A.SassFunction) { - t1 = "function"; - break $label0$0; - } - if (_0_0 instanceof A.SassMixin) { - t1 = "mixin"; - break $label0$0; - } - if (_0_0 instanceof A.SassCalculation) { - t1 = "calculation"; - break $label0$0; - } - if (_0_0 instanceof A.SassString) { - t1 = "string"; - break $label0$0; - } - t1 = A.throwExpression("[BUG] Unknown value type " + A.S(t1.$index($arguments, 0))); - } - return new A.SassString(t1, false); - }, - $signature: 18 - }; - A._shared_closure2.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.getInterceptor$asx($arguments), - _1_0 = t1.$index($arguments, 0); - if (_1_0 instanceof A.SassArgumentList) { - _1_0._wereKeywordsAccessed = true; - t1 = type$.Value; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs(_1_0._keywords, type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString(t4._0, false), t4._1); - } - return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - } else - throw A.wrapException("$args: " + A.S(t1.$index($arguments, 0)) + " is not an argument list."); - }, - $signature: 35 - }; - A.moduleFunctions_closure.prototype = { - call$1($arguments) { - return new A.SassString(J.$index$asx($arguments, 0).assertCalculation$1("calc").name, true); - }, - $signature: 18 - }; - A.moduleFunctions_closure0.prototype = { - call$1($arguments) { - var t1 = J.$index$asx($arguments, 0).assertCalculation$1("calc").$arguments; - return A.SassList$(new A.MappedListIterable(t1, new A.moduleFunctions__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), B.ListSeparator_ECn, false); - }, - $signature: 28 - }; - A.moduleFunctions__closure.prototype = { - call$1(argument) { - return argument instanceof A.Value ? argument : new A.SassString(J.toString$0$(argument), false); - }, - $signature: 390 - }; - A.moduleFunctions_closure1.prototype = { - call$1($arguments) { - var _0_2_isSet, _0_2, acceptsContent, t1, _0_5_isSet, _0_5, hasContent, - mixin = J.$index$asx($arguments, 0).assertMixin$1("mixin"), - _0_0 = mixin.callable; - $label0$0: { - _0_2_isSet = type$.AsyncBuiltInCallable._is(_0_0); - if (_0_2_isSet) { - _0_2 = _0_0.get$acceptsContent(); - acceptsContent = _0_2; - } else - acceptsContent = null; - if (!_0_2_isSet) { - _0_2_isSet = _0_0 instanceof A.BuiltInCallable; - if (_0_2_isSet) { - _0_2 = _0_0.acceptsContent; - acceptsContent = _0_2; - } - t1 = _0_2_isSet; - } else - t1 = true; - if (t1) { - t1 = acceptsContent; - break $label0$0; - } - _0_5_isSet = _0_0 instanceof A.UserDefinedCallable; - if (_0_5_isSet) { - _0_5 = _0_0.declaration; - t1 = _0_5 instanceof A.MixinRule; - } else { - _0_5 = null; - t1 = false; - } - if (t1) { - t1 = _0_5_isSet ? _0_5 : _0_0.declaration; - hasContent = type$.MixinRule._as(t1).get$hasContent(); - t1 = hasContent; - break $label0$0; - } - t1 = A.throwExpression(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); - } - return t1 ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._nest_closure.prototype = { - call$1($arguments) { - var t1 = {}, - selectors = J.$index$asx($arguments, 0).get$asList(); - if (selectors.length === 0) - throw A.wrapException(A.SassScriptException$(string$.x24selec, null)); - t1.first = true; - return new A.MappedListIterable(selectors, new A._nest__closure(t1), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList>")).reduce$1(0, new A._nest__closure0()).get$asSassList(); - }, - $signature: 28 - }; - A._nest__closure.prototype = { - call$1(selector) { - var t1 = this._box_0, - result = A.SassApiValue_assertSelector(selector, !t1.first, null); - t1.first = false; - return result; - }, - $signature: 143 - }; - A._nest__closure0.prototype = { - call$2($parent, child) { - return child.nestWithin$1($parent); - }, - $signature: 144 - }; - A._append_closure.prototype = { - call$1($arguments) { - var t1, - selectors = J.$index$asx($arguments, 0).get$asList(); - if (selectors.length === 0) - throw A.wrapException(A.SassScriptException$(string$.x24selec, null)); - t1 = A.EvaluationContext_currentOrNull(); - return new A.MappedListIterable(selectors, new A._append__closure(), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList>")).reduce$1(0, new A._append__closure0((t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan())).get$asSassList(); - }, - $signature: 28 - }; - A._append__closure.prototype = { - call$1(selector) { - return A.SassApiValue_assertSelector(selector, false, null); - }, - $signature: 143 - }; - A._append__closure0.prototype = { - call$2($parent, child) { - var t1 = child.components, - t2 = this.span; - return A.SelectorList$(new A.MappedListIterable(t1, new A._append___closure($parent, t2), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")), t2).nestWithin$1($parent); - }, - $signature: 144 - }; - A._append___closure.prototype = { - call$1(complex) { - var _0_0, t1, component, rest, newCompound, t2, _null = null; - if (complex.leadingCombinators.length !== 0) - throw A.wrapException(A.SassScriptException$("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", _null)); - _0_0 = complex.components; - t1 = _0_0.length >= 1; - if (t1) { - component = _0_0[0]; - rest = B.JSArray_methods.sublist$1(_0_0, 1); - } else { - rest = _null; - component = rest; - } - if (!t1) - throw A.wrapException(A.StateError$("Pattern matching error")); - newCompound = A._prependParent(component.selector); - if (newCompound == null) - throw A.wrapException(A.SassScriptException$("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", _null)); - t1 = this.span; - t2 = A._setArrayType([new A.ComplexSelectorComponent(newCompound, A.List_List$unmodifiable(component.combinators, type$.CssValue_Combinator), t1)], type$.JSArray_ComplexSelectorComponent); - B.JSArray_methods.addAll$1(t2, rest); - return A.ComplexSelector$(B.List_empty0, t2, t1, false); - }, - $signature: 59 - }; - A._extend_closure.prototype = { - call$1($arguments) { - var target, source, - _s8_ = "selector", - _s8_0 = "extendee", - _s8_1 = "extender", - t1 = J.getInterceptor$asx($arguments), - selector = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, _s8_); - selector.assertNotBogus$1$name(_s8_); - target = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, _s8_0); - target.assertNotBogus$1$name(_s8_0); - source = A.SassApiValue_assertSelector(t1.$index($arguments, 2), false, _s8_1); - source.assertNotBogus$1$name(_s8_1); - t1 = A.EvaluationContext_currentOrNull(); - return A.ExtensionStore__extendOrReplace(selector, source, target, B.ExtendMode_allTargets_allTargets, (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan()).get$asSassList(); - }, - $signature: 28 - }; - A._replace_closure.prototype = { - call$1($arguments) { - var target, source, - _s8_ = "selector", - _s8_0 = "original", - _s11_ = "replacement", - t1 = J.getInterceptor$asx($arguments), - selector = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, _s8_); - selector.assertNotBogus$1$name(_s8_); - target = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, _s8_0); - target.assertNotBogus$1$name(_s8_0); - source = A.SassApiValue_assertSelector(t1.$index($arguments, 2), false, _s11_); - source.assertNotBogus$1$name(_s11_); - t1 = A.EvaluationContext_currentOrNull(); - return A.ExtensionStore__extendOrReplace(selector, source, target, B.ExtendMode_replace_replace, (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan()).get$asSassList(); - }, - $signature: 28 - }; - A._unify_closure.prototype = { - call$1($arguments) { - var selector2, - _s9_ = "selector1", - _s9_0 = "selector2", - t1 = J.getInterceptor$asx($arguments), - selector1 = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, _s9_); - selector1.assertNotBogus$1$name(_s9_); - selector2 = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, _s9_0); - selector2.assertNotBogus$1$name(_s9_0); - t1 = selector1.unify$1(selector2); - t1 = t1 == null ? null : t1.get$asSassList(); - return t1 == null ? B.C__SassNull : t1; - }, - $signature: 4 - }; - A._isSuperselector_closure.prototype = { - call$1($arguments) { - var selector2, - t1 = J.getInterceptor$asx($arguments), - selector1 = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, "super"); - selector1.assertNotBogus$1$name("super"); - selector2 = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, "sub"); - selector2.assertNotBogus$1$name("sub"); - return A.listIsSuperselector(selector1.components, selector2.components) ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._simpleSelectors_closure.prototype = { - call$1($arguments) { - var t1 = A.SassApiValue_assertCompoundSelector(J.$index$asx($arguments, 0), "selector").components; - return A.SassList$(new A.MappedListIterable(t1, new A._simpleSelectors__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), B.ListSeparator_ECn, false); - }, - $signature: 28 - }; - A._simpleSelectors__closure.prototype = { - call$1(simple) { - return new A.SassString(A.serializeSelector(simple, true), false); - }, - $signature: 323 - }; - A._parse_closure.prototype = { - call$1($arguments) { - return A.SassApiValue_assertSelector(J.$index$asx($arguments, 0), false, "selector").get$asSassList(); - }, - $signature: 28 - }; - A.module_closure.prototype = { - call$1($arguments) { - var limit, t2, chunks, i, lastEnd, match, t3, - t1 = J.getInterceptor$asx($arguments), - string = t1.$index($arguments, 0).assertString$1("string"), - separator = t1.$index($arguments, 1).assertString$1("separator"); - t1 = t1.$index($arguments, 2).get$realNull(); - limit = t1 == null ? null : t1.assertNumber$1("limit").assertInt$1("limit"); - if (limit != null && limit < 1) - throw A.wrapException(A.SassScriptException$("$limit: Must be 1 or greater, was " + A.S(limit) + ".", null)); - t1 = string._string$_text; - if (t1.length === 0) - return B.SassList_bdS0; - else { - t2 = separator._string$_text; - if (t2.length === 0) - return A.SassList$(A.MappedIterable_MappedIterable(new A.Runes(t1), new A.module__closure(string), type$.Runes._eval$1("Iterable.E"), type$.Value), B.ListSeparator_ECn, true); - } - chunks = A._setArrayType([], type$.JSArray_String); - for (t2 = B.JSString_methods.allMatches$1(t2, t1), t2 = new A._StringAllMatchesIterator(t2._input, t2._pattern, t2.__js_helper$_index), i = 0, lastEnd = 0; t2.moveNext$0();) { - match = t2.__js_helper$_current; - t3 = match.start; - chunks.push(B.JSString_methods.substring$2(t1, lastEnd, t3)); - lastEnd = t3 + match.pattern.length; - ++i; - if (i === limit) - break; - } - chunks.push(B.JSString_methods.substring$1(t1, lastEnd)); - return A.SassList$(new A.MappedListIterable(chunks, new A.module__closure0(string), type$.MappedListIterable_String_Value), B.ListSeparator_ECn, true); - }, - $signature: 28 - }; - A.module__closure.prototype = { - call$1(rune) { - return new A.SassString(A.Primitives_stringFromCharCode(rune), this.string._hasQuotes); - }, - $signature: 364 - }; - A.module__closure0.prototype = { - call$1(chunk) { - return new A.SassString(chunk, this.string._hasQuotes); - }, - $signature: 372 - }; - A._unquote_closure.prototype = { - call$1($arguments) { - var string = J.$index$asx($arguments, 0).assertString$1("string"); - if (!string._hasQuotes) - return string; - return new A.SassString(string._string$_text, false); - }, - $signature: 18 - }; - A._quote_closure.prototype = { - call$1($arguments) { - var string = J.$index$asx($arguments, 0).assertString$1("string"); - if (string._hasQuotes) - return string; - return new A.SassString(string._string$_text, true); - }, - $signature: 18 - }; - A._length_closure.prototype = { - call$1($arguments) { - return A.SassNumber_SassNumber(J.$index$asx($arguments, 0).assertString$1("string").get$_sassLength(), null); - }, - $signature: 24 - }; - A._insert_closure.prototype = { - call$1($arguments) { - var indexInt, codeUnitIndex, _s5_ = "index", - t1 = J.getInterceptor$asx($arguments), - string = t1.$index($arguments, 0).assertString$1("string"), - insert = t1.$index($arguments, 1).assertString$1("insert"), - index = t1.$index($arguments, 2).assertNumber$1(_s5_); - index.assertNoUnits$1(_s5_); - indexInt = index.assertInt$1(_s5_); - if (indexInt < 0) - indexInt = Math.max(string.get$_sassLength() + indexInt + 2, 0); - t1 = string._string$_text; - codeUnitIndex = A.codepointIndexToCodeUnitIndex(t1, A._codepointForIndex(indexInt, string.get$_sassLength(), false)); - return new A.SassString(B.JSString_methods.replaceRange$3(t1, codeUnitIndex, codeUnitIndex, insert._string$_text), string._hasQuotes); - }, - $signature: 18 - }; - A._index_closure.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - t2 = t1.$index($arguments, 0).assertString$1("string")._string$_text, - codeUnitIndex = B.JSString_methods.indexOf$1(t2, t1.$index($arguments, 1).assertString$1("substring")._string$_text); - if (codeUnitIndex === -1) - return B.C__SassNull; - return A.SassNumber_SassNumber(A.codeUnitIndexToCodepointIndex(t2, codeUnitIndex) + 1, null); - }, - $signature: 4 - }; - A._slice_closure.prototype = { - call$1($arguments) { - var lengthInCodepoints, endInt, startCodepoint, endCodepoint, - _s8_ = "start-at", - t1 = J.getInterceptor$asx($arguments), - string = t1.$index($arguments, 0).assertString$1("string"), - start = t1.$index($arguments, 1).assertNumber$1(_s8_), - end = t1.$index($arguments, 2).assertNumber$1("end-at"); - start.assertNoUnits$1(_s8_); - end.assertNoUnits$1("end-at"); - lengthInCodepoints = string.get$_sassLength(); - endInt = end.assertInt$0(); - if (endInt === 0) - return string._hasQuotes ? $.$get$_emptyQuoted() : $.$get$_emptyUnquoted(); - startCodepoint = A._codepointForIndex(start.assertInt$0(), lengthInCodepoints, false); - endCodepoint = A._codepointForIndex(endInt, lengthInCodepoints, true); - if (endCodepoint === lengthInCodepoints) - --endCodepoint; - if (endCodepoint < startCodepoint) - return string._hasQuotes ? $.$get$_emptyQuoted() : $.$get$_emptyUnquoted(); - t1 = string._string$_text; - return new A.SassString(B.JSString_methods.substring$2(t1, A.codepointIndexToCodeUnitIndex(t1, startCodepoint), A.codepointIndexToCodeUnitIndex(t1, endCodepoint + 1)), string._hasQuotes); - }, - $signature: 18 - }; - A._toUpperCase_closure.prototype = { - call$1($arguments) { - var t1, t2, i, t3, t4, - string = J.$index$asx($arguments, 0).assertString$1("string"); - for (t1 = string._string$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { - t4 = t1.charCodeAt(i); - t3 += A.Primitives_stringFromCharCode(t4 >= 97 && t4 <= 122 ? t4 & 4294967263 : t4); - } - return new A.SassString(t3.charCodeAt(0) == 0 ? t3 : t3, string._hasQuotes); - }, - $signature: 18 - }; - A._toLowerCase_closure.prototype = { - call$1($arguments) { - var t1, t2, i, t3, t4, - string = J.$index$asx($arguments, 0).assertString$1("string"); - for (t1 = string._string$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { - t4 = t1.charCodeAt(i); - t3 += A.Primitives_stringFromCharCode(t4 >= 65 && t4 <= 90 ? t4 | 32 : t4); - } - return new A.SassString(t3.charCodeAt(0) == 0 ? t3 : t3, string._hasQuotes); - }, - $signature: 18 - }; - A._uniqueId_closure.prototype = { - call$1($arguments) { - var t1 = $.$get$_previousUniqueId() + ($.$get$_random().nextInt$1(36) + 1); - $._previousUniqueId = t1; - if (t1 > Math.pow(36, 6)) - $._previousUniqueId = B.JSInt_methods.$mod($.$get$_previousUniqueId(), A._asInt(Math.pow(36, 6))); - return new A.SassString("u" + B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1($.$get$_previousUniqueId(), 36), 6, "0"), false); - }, - $signature: 18 - }; - A.ImportCache.prototype = { - canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { - var t1, resolvedUrl, key, relativeResult, t2, t3, t4, t5, t6, cacheable, i, importer, perImporterKey, t7, _1_0, _1_2_isSet, result, _1_2, _2_0, _2_1, _2_5_isSet, _2_5, _2_3, _2_3_isSet, j, _this = this, _null = null; - if (A.isBrowser()) - t1 = (baseImporter == null || baseImporter instanceof A.NoOpImporter) && _this._importers.length === 0; - else - t1 = false; - if (t1) - throw A.wrapException(string$.Custom); - if (baseImporter != null && url.get$scheme() === "") { - resolvedUrl = baseUrl == null ? _null : baseUrl.resolveUri$1(url); - if (resolvedUrl == null) - resolvedUrl = url; - key = new A._Record_3_forImport(baseImporter, resolvedUrl, forImport); - relativeResult = _this._perImporterCanonicalizeCache.putIfAbsent$2(key, new A.ImportCache_canonicalize_closure(_this, baseImporter, resolvedUrl, baseUrl, forImport, key, url)); - if (relativeResult != null) - return relativeResult; - } - key = new A._Record_2_forImport(url, forImport); - t1 = _this._canonicalizeCache; - if (t1.containsKey$1(key)) - return t1.$index(0, key); - for (t2 = _this._importers, t3 = type$.Record_1_nullable_Object, t4 = _this._perImporterCanonicalizeCache, t5 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl, t6 = type$.Record_3_Importer_and_Uri_and_Uri_originalUrl, cacheable = true, i = 0; i < t2.length; ++i) { - importer = t2[i]; - perImporterKey = new A._Record_3_forImport(importer, url, forImport); - if (t4.containsKey$1(perImporterKey)) { - t7 = t4.$index(0, perImporterKey); - _1_0 = new A._Record_1(t7 == null ? t5._as(t7) : t7); - } else - _1_0 = _null; - _1_2_isSet = t3._is(_1_0); - result = _null; - if (_1_2_isSet) { - _1_2 = _1_0._0; - t7 = _1_2 != null; - if (t7) { - t6._as(_1_2); - result = _1_2; - } - } else { - _1_2 = _null; - t7 = false; - } - if (t7) - return result; - if (_1_2_isSet) - t7 = _1_2 == null; - else - t7 = false; - if (t7) - continue; - $label0$1: { - _2_0 = _this._canonicalize$4(importer, url, baseUrl, forImport); - _2_1 = _2_0._0; - _2_5_isSet = _2_1 != null; - _2_5 = _null; - _2_3 = _null; - t7 = false; - if (_2_5_isSet) { - result = _2_1 == null ? t6._as(_2_1) : _2_1; - _2_3 = _2_0._1; - t7 = _2_3; - _2_5 = t7; - t7 = t7 && cacheable; - } else - result = _null; - if (t7) { - t1.$indexSet(0, key, result); - return result; - } - if (_2_5_isSet) { - t7 = _2_5; - _2_3_isSet = _2_5_isSet; - } else { - _2_3 = _2_0._1; - t7 = _2_3; - _2_3_isSet = true; - } - t7 = t7 && !cacheable; - if (t7) { - t4.$indexSet(0, perImporterKey, _2_1); - if (_2_1 != null) - return _2_1; - break $label0$1; - } - t7 = false === (_2_3_isSet ? _2_3 : _2_0._1); - if (t7) { - if (cacheable) { - for (j = 0; j < i; ++j) - t4.$indexSet(0, new A._Record_3_forImport(t2[j], url, forImport), _null); - cacheable = false; - } - if (_2_1 != null) - return _2_1; - } - } - } - if (cacheable) - t1.$indexSet(0, key, _null); - return _null; - }, - canonicalize$3$baseImporter$baseUrl(_, url, baseImporter, baseUrl) { - return this.canonicalize$4$baseImporter$baseUrl$forImport(0, url, baseImporter, baseUrl, false); - }, - _canonicalize$4(importer, url, baseUrl, forImport) { - var passContainingUrl, canonicalizeContext, t1, result, cacheable; - if (baseUrl != null) - passContainingUrl = url.get$scheme() === "" || importer.isNonCanonicalScheme$1(url.get$scheme()); - else - passContainingUrl = false; - canonicalizeContext = new A.CanonicalizeContext(forImport, passContainingUrl ? baseUrl : null); - t1 = type$.nullable_Object; - result = A.runZoned(new A.ImportCache__canonicalize_closure(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, canonicalizeContext], t1, t1), type$.nullable_Uri); - cacheable = !passContainingUrl || !canonicalizeContext._wasContainingUrlAccessed; - if (result == null) - return new A._Record_2(null, cacheable); - if (result.get$scheme() !== "" && importer.isNonCanonicalScheme$1(result.get$scheme())) - throw A.wrapException("Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2c_whicu); - return new A._Record_2(new A._Record_3_originalUrl(importer, result, url), cacheable); - }, - importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { - return this._importCache.putIfAbsent$2(canonicalUrl, new A.ImportCache_importCanonical_closure(this, importer, canonicalUrl, originalUrl)); - }, - importCanonical$2(importer, canonicalUrl) { - return this.importCanonical$3$originalUrl(importer, canonicalUrl, null); - }, - humanize$1(canonicalUrl) { - var t1 = type$.NonNullsIterable_Record_3_Importer_and_Uri_and_Uri_originalUrl; - t1 = A.NullableExtension_andThen(A.minBy(new A.MappedIterable(new A.WhereIterable(new A.NonNullsIterable(this._canonicalizeCache.get$values(0), t1), new A.ImportCache_humanize_closure(canonicalUrl), t1._eval$1("WhereIterable")), new A.ImportCache_humanize_closure0(), t1._eval$1("MappedIterable")), new A.ImportCache_humanize_closure1()), new A.ImportCache_humanize_closure2(canonicalUrl)); - return t1 == null ? canonicalUrl : t1; - }, - sourceMapUrl$1(_, canonicalUrl) { - var t1 = this._resultsCache.$index(0, canonicalUrl); - t1 = t1 == null ? null : t1.get$sourceMapUrl(0); - return t1 == null ? canonicalUrl : t1; - }, - clearCanonicalize$1(url) { - var t1 = this._canonicalizeCache; - t1.remove$1(0, new A._Record_2_forImport(url, false)); - t1.remove$1(0, new A._Record_2_forImport(url, true)); - this._perImporterCanonicalizeCache.removeWhere$1(0, new A.ImportCache_clearCanonicalize_closure(this, url)); - }, - clearImport$1(canonicalUrl) { - this._resultsCache.remove$1(0, canonicalUrl); - this._importCache.remove$1(0, canonicalUrl); - } - }; - A.ImportCache_canonicalize_closure.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.baseUrl, - _0_0 = t1._canonicalize$4(_this.baseImporter, _this.resolvedUrl, t2, _this.forImport); - if (t2 != null) - t1._nonCanonicalRelativeUrls.$indexSet(0, _this.key, _this.url); - return _0_0._0; - }, - $signature: 132 - }; - A.ImportCache__canonicalize_closure.prototype = { - call$0() { - return this.importer.canonicalize$1(0, this.url); - }, - $signature: 145 - }; - A.ImportCache_importCanonical_closure.prototype = { - call$0() { - var t2, t3, t4, _this = this, - t1 = _this.canonicalUrl, - result = _this.importer.load$1(0, t1); - if (result == null) - return null; - _this.$this._resultsCache.$indexSet(0, t1, result); - t2 = result.contents; - t3 = result.syntax; - t4 = _this.originalUrl; - return A.Stylesheet_Stylesheet$parse(t2, t3, t4 == null ? t1 : t4.resolveUri$1(t1)); - }, - $signature: 90 - }; - A.ImportCache_humanize_closure.prototype = { - call$1(result) { - return result._1.$eq(0, this.canonicalUrl); - }, - $signature: 428 - }; - A.ImportCache_humanize_closure0.prototype = { - call$1(result) { - return result._2; - }, - $signature: 455 - }; - A.ImportCache_humanize_closure1.prototype = { - call$1(url) { - return url.get$path(url).length; - }, - $signature: 112 - }; - A.ImportCache_humanize_closure2.prototype = { - call$1(url) { - var t1 = $.$get$url(), - t2 = this.canonicalUrl; - return url.resolve$1(0, A.ParsedPath_ParsedPath$parse(t2.get$path(t2), t1.style).get$basename()); - }, - $signature: 47 - }; - A.ImportCache_clearCanonicalize_closure.prototype = { - call$2(key, _) { - var t1 = this.url; - return key._1.$eq(0, t1) || J.$eq$(this.$this._nonCanonicalRelativeUrls.$index(0, key), t1); - }, - $signature: 456 - }; - A.Importer.prototype = { - modificationTime$1(url) { - return new A.DateTime(Date.now(), 0, false); - }, - couldCanonicalize$2(url, canonicalUrl) { - return true; - }, - isNonCanonicalScheme$1(scheme) { - return false; - } - }; - A.AsyncImporter.prototype = {}; - A.CanonicalizeContext.prototype = {}; - A.FilesystemImporter.prototype = { - canonicalize$1(_, url) { - var resolved, _0_0; - if (url.get$scheme() === "file") - resolved = A.resolveImportPath($.$get$context().style.pathFromUri$1(A._parseUri(url))); - else if (url.get$scheme() !== "") - return null; - else { - _0_0 = this._loadPath; - if (_0_0 != null) { - resolved = A.resolveImportPath(A.join(_0_0, $.$get$context().style.pathFromUri$1(A._parseUri(url)), null)); - if (resolved != null && this._loadPathDeprecated) - A.warnForDeprecation(string$.Using_t, B.Deprecation_vct); - } else - return null; - } - return A.NullableExtension_andThen(resolved, new A.FilesystemImporter_canonicalize_closure()); - }, - load$1(_, url) { - var path = $.$get$context().style.pathFromUri$1(A._parseUri(url)), - t1 = A.readFile(path), - t2 = A.Syntax_forPath(path), - t3 = url.get$scheme(); - if (t3 === "") - A.throwExpression(A.ArgumentError$value(url, "sourceMapUrl", "must be absolute")); - return new A.ImporterResult(t1, url, t2); - }, - modificationTime$1(url) { - return A.modificationTime($.$get$context().style.pathFromUri$1(A._parseUri(url))); - }, - couldCanonicalize$2(url, canonicalUrl) { - var t1, t2, basename, canonicalBasename; - if (url.get$scheme() !== "file" && url.get$scheme() !== "") - return false; - if (canonicalUrl.get$scheme() !== "file") - return false; - t1 = $.$get$url(); - t2 = t1.style; - basename = A.ParsedPath_ParsedPath$parse(url.get$path(url), t2).get$basename(); - canonicalBasename = A.ParsedPath_ParsedPath$parse(canonicalUrl.get$path(canonicalUrl), t2).get$basename(); - if (!B.JSString_methods.startsWith$1(basename, "_") && B.JSString_methods.startsWith$1(canonicalBasename, "_")) - canonicalBasename = B.JSString_methods.substring$1(canonicalBasename, 1); - return basename === canonicalBasename || basename === t1.withoutExtension$1(canonicalBasename); - }, - toString$0(_) { - var t1 = this._loadPath; - return t1 == null ? "" : t1; - } - }; - A.FilesystemImporter_canonicalize_closure.prototype = { - call$1(resolved) { - var t2, t0, _null = null, - t1 = A.isNodeJs() ? self.process : _null; - if (!J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { - t1 = A.isNodeJs() ? self.process : _null; - t1 = J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "darwin"); - } else - t1 = true; - if (t1) { - t1 = $.$get$context(); - t2 = A._realCasePath(A.absolute(t1.normalize$1(resolved), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null)); - t0 = t2; - t2 = t1; - t1 = t0; - } else { - t1 = $.$get$context(); - t2 = t1.canonicalize$1(0, resolved); - t0 = t2; - t2 = t1; - t1 = t0; - } - return t2.toUri$1(t1); - }, - $signature: 130 - }; - A.NoOpImporter.prototype = {}; - A.NodePackageImporter.prototype = { - isNonCanonicalScheme$1(scheme) { - return scheme === "pkg"; - }, - canonicalize$1(_, url) { - var packageName, jsonPath, jsonString, packageManifest, e, t1, t2, t3, t4, baseDirectory, parts, t5, $name, subpath, packageRoot, exception, _1_0, rootPath, subpathInRoot, _this = this, _null = null; - if (url.get$scheme() === "file") - return $.$get$FilesystemImporter_cwd().canonicalize$1(0, url); - if (url.get$scheme() !== "pkg") - return _null; - if (url.get$hasAuthority()) - throw A.wrapException(string$.A_pkg_h); - else { - t1 = $.$get$url(); - t2 = t1.style; - if (t2.rootLength$1(url.get$path(url)) > 0) - throw A.wrapException("A pkg: URL's path must not begin with /."); - else if (url.get$path(url).length === 0) - throw A.wrapException("A pkg: URL must not have an empty path."); - else if (url.get$hasQuery() || url.get$hasFragment()) - throw A.wrapException(string$.A_pkg_q); - } - t3 = A.canonicalizeContext(); - t3._wasContainingUrlAccessed = true; - t3 = t3._containingUrl; - if ((t3 == null ? _null : t3.get$scheme()) === "file") { - t3 = A.canonicalizeContext(); - t3._wasContainingUrlAccessed = true; - t3 = t3._containingUrl; - t3.toString; - t4 = $.$get$context(); - baseDirectory = t4.dirname$1(t4.style.pathFromUri$1(A._parseUri(t3))); - } else { - t3 = _this.__NodePackageImporter__entryPointDirectory_F; - t3 === $ && A.throwUnnamedLateFieldNI(); - baseDirectory = t3; - } - packageName = null; - parts = t1.split$1(0, url.get$path(url)); - t3 = B.JSArray_methods.removeAt$1(parts, 0); - t4 = $.$get$context(); - t3.toString; - t5 = t4.style; - $name = t5.pathFromUri$1(A._parseUri(t3)); - if (B.JSString_methods.startsWith$1($name, "@")) - $name = parts.length !== 0 ? t1.join$2(0, $name, B.JSArray_methods.removeAt$1(parts, 0)) : $name; - subpath = parts.length !== 0 ? t5.pathFromUri$1(A._parseUri(t1.joinAll$1(parts))) : _null; - packageName = $name; - t1 = true; - if (!J.startsWith$1$s(packageName, ".")) - if (!J.contains$1$asx(packageName, "\\")) - if (!J.contains$1$asx(packageName, "%")) - t1 = J.startsWith$1$s(packageName, "@") && !J.contains$1$asx(packageName, t2.get$separator(t2)); - if (t1) - return _null; - packageRoot = _this._resolvePackageRoot$2(packageName, baseDirectory); - if (packageRoot == null) - return _null; - jsonPath = A.join(packageRoot, "package.json", _null); - jsonString = A.readFile(jsonPath); - packageManifest = null; - try { - packageManifest = type$.Map_String_dynamic._as(B.C_JsonCodec.decode$1(jsonString)); - } catch (exception) { - e = A.unwrapException(exception); - t1 = A.S(jsonPath); - t2 = A.S(packageName); - t3 = A.S(e); - throw A.wrapException("Failed to parse " + t1 + ' for "pkg:' + t2 + '": ' + t3); - } - _1_0 = _this._resolvePackageExports$4(packageRoot, subpath, packageManifest, packageName); - if (_1_0 != null) - if (B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(_1_0, t5)._splitExtension$1(1)[1])) - return t4.toUri$1(t4.canonicalize$1(0, _1_0)); - else { - t1 = subpath == null ? "root" : subpath; - throw A.wrapException("The export for '" + t1 + "' in '" + A.S(packageName) + "' resolved to '" + _1_0 + string$.x27x2c_whi); - } - if (subpath == null) { - rootPath = _this._resolvePackageRootValues$2(packageRoot, packageManifest); - return rootPath != null ? t4.toUri$1(t4.canonicalize$1(0, rootPath)) : _null; - } - subpathInRoot = A.join(packageRoot, subpath, _null); - return $.$get$FilesystemImporter_cwd().canonicalize$1(0, t4.toUri$1(subpathInRoot)); - }, - load$1(_, url) { - return $.$get$FilesystemImporter_cwd().load$1(0, url); - }, - _resolvePackageRoot$2(packageName, baseDirectory) { - var potentialPackage, t1; - for (; true;) { - potentialPackage = A.join(baseDirectory, "node_modules", packageName); - if (A.dirExists(potentialPackage)) - return potentialPackage; - t1 = $.$get$context(); - if (t1.split$1(0, baseDirectory).length === 1) - return null; - baseDirectory = t1.dirname$1(baseDirectory); - } - }, - _resolvePackageRootValues$2(packageRoot, packageManifest) { - var t1, sassValue, _1_0, styleValue, _null = null, - _0_0 = packageManifest.$index(0, "sass"); - if (typeof _0_0 == "string") { - t1 = B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(_0_0, $.$get$url().style)._splitExtension$1(1)[1]); - sassValue = _0_0; - } else { - sassValue = _null; - t1 = false; - } - if (t1) - return A.join(packageRoot, sassValue, _null); - else { - _1_0 = packageManifest.$index(0, "style"); - if (typeof _1_0 == "string") { - t1 = B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(_1_0, $.$get$url().style)._splitExtension$1(1)[1]); - styleValue = _1_0; - } else { - styleValue = _null; - t1 = false; - } - if (t1) - return A.join(packageRoot, styleValue, _null); - } - return A.resolveImportPath(A.join(packageRoot, "index", _null)); - }, - _resolvePackageExports$4(packageRoot, subpath, packageManifest, packageName) { - var _0_0, _1_0, _this = this, - exports = packageManifest.$index(0, "exports"); - if (exports == null) - return null; - _0_0 = _this._nodePackageExportsResolve$5(packageRoot, _this._exportsToCheck$1(subpath), exports, subpath, packageName); - if (_0_0 != null) - return _0_0; - if (subpath != null && A.ParsedPath_ParsedPath$parse(subpath, $.$get$url().style)._splitExtension$1(1)[1].length !== 0) - return null; - _1_0 = _this._nodePackageExportsResolve$5(packageRoot, _this._exportsToCheck$2$addIndex(subpath, true), exports, subpath, packageName); - if (_1_0 != null) - return _1_0; - return null; - }, - _nodePackageExportsResolve$5(packageRoot, subpathVariants, exports, subpath, packageName) { - var t1, matches, _1_1, path; - if (type$.Map_String_dynamic._is(exports) && J.any$1$ax(exports.get$keys(exports), new A.NodePackageImporter__nodePackageExportsResolve_closure()) && J.any$1$ax(exports.get$keys(exports), new A.NodePackageImporter__nodePackageExportsResolve_closure0())) - throw A.wrapException("`exports` in " + packageName + string$.x20can_n + J.map$1$1$ax(J.get$keys$z(exports), new A.NodePackageImporter__nodePackageExportsResolve_closure1(), type$.String).join$1(0, ",") + " in " + A.join(packageRoot, "package.json", null) + "."); - t1 = type$.NonNullsIterable_String; - matches = A.List_List$of(new A.NonNullsIterable(new A.MappedListIterable(subpathVariants, new A.NodePackageImporter__nodePackageExportsResolve_closure2(this, exports, packageRoot), A._arrayInstanceType(subpathVariants)._eval$1("MappedListIterable<1,String?>")), t1), true, t1._eval$1("Iterable.E")); - $label0$1: { - _1_1 = matches.length; - if (_1_1 === 1) { - path = matches[0]; - t1 = path; - break $label0$1; - } - if (_1_1 <= 0) { - t1 = null; - break $label0$1; - } - t1 = subpath == null ? "root" : subpath; - t1 = A.throwExpression(string$.Unable + t1 + " in " + packageName + " should be used. \n\nFound:\n" + B.JSArray_methods.join$1(matches, "\n")); - } - return t1; - }, - _compareExpansionKeys$2(keyA, keyB) { - var t1 = B.JSString_methods.contains$1(keyA, "*"), - baseLengthA = t1 ? B.JSString_methods.indexOf$1(keyA, "*") + 1 : keyA.length, - t2 = B.JSString_methods.contains$1(keyB, "*"), - baseLengthB = t2 ? B.JSString_methods.indexOf$1(keyB, "*") + 1 : keyB.length; - if (baseLengthA > baseLengthB) - return -1; - if (baseLengthB > baseLengthA) - return 1; - if (!t1) - return 1; - if (!t2) - return -1; - t1 = keyA.length; - t2 = keyB.length; - if (t1 > t2) - return -1; - if (t2 > t1) - return 1; - return 0; - }, - _packageTargetResolve$4(subpath, exports, packageRoot, patternMatch) { - var t2, string, path, map, key, value, _1_0, array, _2_0, _null = null, - t1 = typeof exports == "string"; - if (t1) { - t2 = !B.JSString_methods.startsWith$1(exports, "./"); - string = exports; - } else { - string = _null; - t2 = false; - } - if (t2) - throw A.wrapException("Export '" + A.S(string) + string$.x27x20must + packageRoot + "'."); - if (t1) { - t2 = patternMatch != null; - string = exports; - } else { - string = _null; - t2 = false; - } - if (t2) { - t1 = J.replaceFirst$2$s(string, "*", patternMatch); - t2 = $.$get$context(); - path = t2.normalize$1(A.join(packageRoot, t2.style.pathFromUri$1(A._parseUri(t1)), _null)); - return A.fileExists(path) ? path : _null; - } - string = t1 ? exports : _null; - if (t1) { - t1 = $.$get$context(); - string.toString; - return A.join(packageRoot, t1.style.pathFromUri$1(A._parseUri(string)), _null); - } - t1 = type$.Map_String_dynamic._is(exports); - map = t1 ? exports : _null; - if (t1) { - for (t1 = A.MapExtensions_get_pairs(map, type$.String, type$.dynamic), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t2 = t1.get$current(t1); - key = t2._0; - value = t2._1; - if (!B.Set_TnQrk.contains$1(0, key)) - continue; - if (value == null) - continue; - _1_0 = this._packageTargetResolve$4(subpath, value, packageRoot, patternMatch); - if (_1_0 != null) - return _1_0; - } - return _null; - } - if (type$.List_nullable_Object._is(exports) && J.get$length$asx(exports) <= 0) - return _null; - t1 = type$.List_dynamic._is(exports); - array = t1 ? exports : _null; - if (t1) { - for (t1 = J.get$iterator$ax(array); t1.moveNext$0();) { - value = t1.get$current(t1); - if (value == null) - continue; - _2_0 = this._packageTargetResolve$4(subpath, value, packageRoot, patternMatch); - if (_2_0 != null) - return _2_0; - } - return _null; - } - throw A.wrapException("Invalid 'exports' value " + A.S(exports) + " in " + A.join(packageRoot, "package.json", _null) + "."); - }, - _packageTargetResolve$3(subpath, exports, packageRoot) { - return this._packageTargetResolve$4(subpath, exports, packageRoot, null); - }, - _getMainExport$1(exports) { - var t1, t2, t3, map, _0_4, t4, $export; - $label0$0: { - t1 = null; - if (typeof exports == "string") { - t1 = exports; - break $label0$0; - } - if (type$.List_String._is(exports)) { - t1 = exports; - break $label0$0; - } - t2 = type$.Map_String_dynamic._is(exports); - if (t2) { - t3 = !J.any$1$ax(exports.get$keys(exports), new A.NodePackageImporter__getMainExport_closure()); - map = exports; - } else { - map = t1; - t3 = false; - } - if (t3) { - t1 = map; - break $label0$0; - } - t3 = false; - if (t2) { - _0_4 = exports.$index(0, "."); - if (_0_4 == null) - t4 = exports.containsKey$1("."); - else - t4 = true; - if (t4) - t3 = _0_4 != null; - } else - _0_4 = null; - if (t3) { - $export = t2 ? _0_4 : J.$index$asx(exports, "."); - t1 = $export; - break $label0$0; - } - break $label0$0; - } - return t1; - }, - _exportsToCheck$2$addIndex(subpath, addIndex) { - var basename, dirname, t3, t4, _i, path, - t1 = type$.JSArray_String, - paths = A._setArrayType([], t1), - t2 = subpath == null; - if (t2 && addIndex) - subpath = "index"; - else if (!t2 && addIndex) - subpath = A.join(subpath, "index", null); - if (subpath == null) - return A._setArrayType([null], type$.JSArray_nullable_String); - if (B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(subpath, $.$get$url().style)._splitExtension$1(1)[1])) - paths.push(subpath); - else - B.JSArray_methods.addAll$1(paths, A._setArrayType([subpath, subpath + ".scss", subpath + ".sass", subpath + ".css"], t1)); - t1 = $.$get$context(); - t2 = t1.style; - basename = A.ParsedPath_ParsedPath$parse(subpath, t2).get$basename(); - dirname = t1.dirname$1(subpath); - if (B.JSString_methods.startsWith$1(basename, "_")) - return paths; - t1 = A.List_List$of(paths, true, type$.nullable_String); - for (t3 = paths.length, t4 = dirname === ".", _i = 0; _i < paths.length; paths.length === t3 || (0, A.throwConcurrentModificationError)(paths), ++_i) { - path = paths[_i]; - if (t4) - t1.push("_" + A.ParsedPath_ParsedPath$parse(path, t2).get$basename()); - else - t1.push(A.join(dirname, "_" + A.ParsedPath_ParsedPath$parse(path, t2).get$basename(), null)); - } - return t1; - }, - _exportsToCheck$1(subpath) { - return this._exportsToCheck$2$addIndex(subpath, false); - } - }; - A.NodePackageImporter__nodePackageExportsResolve_closure.prototype = { - call$1(key) { - return B.JSString_methods.startsWith$1(key, "."); - }, - $signature: 5 - }; - A.NodePackageImporter__nodePackageExportsResolve_closure0.prototype = { - call$1(key) { - return !B.JSString_methods.startsWith$1(key, "."); - }, - $signature: 5 - }; - A.NodePackageImporter__nodePackageExportsResolve_closure1.prototype = { - call$1(key) { - return '"' + key + '"'; - }, - $signature: 6 - }; - A.NodePackageImporter__nodePackageExportsResolve_closure2.prototype = { - call$1(variant) { - var t1, matchKey, t2, t3, t4, t5, t6, _i, expansionKey, _0_0, t7, patternBase, patternTrailer, t8, target, _this = this, _null = null; - if (variant == null) { - t1 = _this.$this; - return A.NullableExtension_andThen(t1._getMainExport$1(_this.exports), new A.NodePackageImporter__nodePackageExportsResolve__closure(t1, variant, _this.packageRoot)); - } else { - t1 = _this.exports; - if (!type$.Map_String_dynamic._is(t1) || J.every$1$ax(t1.get$keys(t1), new A.NodePackageImporter__nodePackageExportsResolve__closure0())) - return _null; - } - matchKey = "./" + $.$get$context().toUri$1(variant).toString$0(0); - if (t1.containsKey$1(matchKey) && J.$index$asx(t1, matchKey) != null && !B.JSString_methods.contains$1(matchKey, "*")) { - t1 = J.$index$asx(t1, matchKey); - if (t1 == null) - t1 = type$.Object._as(t1); - return _this.$this._packageTargetResolve$3(matchKey, t1, _this.packageRoot); - } - t2 = A._setArrayType([], type$.JSArray_String); - for (t3 = J.getInterceptor$z(t1), t4 = J.get$iterator$ax(t3.get$keys(t1)); t4.moveNext$0();) { - t5 = t4.get$current(t4); - if (B.JSString_methods.allMatches$1("*", t5).get$length(0) === 1) - t2.push(t5); - } - t4 = _this.$this; - B.JSArray_methods.sort$1(t2, t4.get$_compareExpansionKeys()); - for (t5 = t2.length, t6 = matchKey.length, _i = 0; _i < t2.length; t2.length === t5 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - expansionKey = t2[_i]; - _0_0 = expansionKey.split("*"); - t7 = _0_0.length === 2; - if (t7) { - patternBase = _0_0[0]; - patternTrailer = _0_0[1]; - patternTrailer = patternTrailer; - } else { - patternTrailer = _null; - patternBase = patternTrailer; - } - if (!t7) - throw A.wrapException(A.StateError$("Pattern matching error")); - if (!B.JSString_methods.startsWith$1(matchKey, patternBase)) - continue; - if (matchKey === patternBase) - continue; - t7 = patternTrailer.length; - if (t7 !== 0) - t8 = B.JSString_methods.endsWith$1(matchKey, patternTrailer) && t6 >= expansionKey.length; - else - t8 = true; - if (t8) { - target = t3.$index(t1, expansionKey); - if (target == null) - continue; - return t4._packageTargetResolve$4(variant, target, _this.packageRoot, B.JSString_methods.substring$2(matchKey, patternBase.length, t6 - t7)); - } - } - return _null; - }, - $signature: 147 - }; - A.NodePackageImporter__nodePackageExportsResolve__closure.prototype = { - call$1(mainExport) { - return this.$this._packageTargetResolve$3(this.variant, mainExport, this.packageRoot); - }, - $signature: 148 - }; - A.NodePackageImporter__nodePackageExportsResolve__closure0.prototype = { - call$1(key) { - return !B.JSString_methods.startsWith$1(key, "."); - }, - $signature: 5 - }; - A.NodePackageImporter__getMainExport_closure.prototype = { - call$1(key) { - return B.JSString_methods.startsWith$1(key, "."); - }, - $signature: 5 - }; - A.ImporterResult.prototype = { - get$sourceMapUrl(_) { - return this._sourceMapUrl; - } - }; - A.resolveImportPath_closure.prototype = { - call$0() { - return A._exactlyOne(A._tryPath($.$get$context().withoutExtension$1(this.path) + ".import" + this.extension)); - }, - $signature: 45 - }; - A.resolveImportPath_closure0.prototype = { - call$0() { - return A._exactlyOne(A._tryPathWithExtensions(this.path + ".import")); - }, - $signature: 45 - }; - A._tryPathAsDirectory_closure.prototype = { - call$0() { - return A._exactlyOne(A._tryPathWithExtensions(A.join(this.path, "index.import", null))); - }, - $signature: 45 - }; - A._exactlyOne_closure.prototype = { - call$1(path) { - var t1 = $.$get$context(); - return " " + t1.prettyUri$1(t1.toUri$1(path)); - }, - $signature: 6 - }; - A.InterpolationBuffer.prototype = { - writeCharCode$1(character) { - var t1 = this._interpolation_buffer$_text, - t2 = A.Primitives_stringFromCharCode(character); - t1._contents += t2; - return null; - }, - add$2(_, expression, span) { - this._flushText$0(); - this._interpolation_buffer$_contents.push(expression); - this._spans.push(span); - }, - addInterpolation$1(interpolation) { - var spansToAdd, _0_4_isSet, _0_4, _0_40, first, rest, t2, t3, _this = this, - toAdd = interpolation.contents, - t1 = toAdd.length; - if (t1 === 0) - return; - spansToAdd = interpolation.spans; - _0_4_isSet = t1 >= 1; - _0_4 = null; - if (_0_4_isSet) { - _0_40 = toAdd[0]; - t1 = _0_40; - _0_4 = t1; - t1 = typeof t1 == "string"; - } else - t1 = false; - if (t1) { - first = A._asString(_0_4_isSet ? _0_4 : toAdd[0]); - rest = B.JSArray_methods.sublist$1(toAdd, 1); - t1 = _this._interpolation_buffer$_text; - t1._contents += first; - spansToAdd = A.SubListIterable$(spansToAdd, 1, null, A._arrayInstanceType(spansToAdd)._precomputed1); - toAdd = rest; - } - _this._flushText$0(); - t1 = _this._interpolation_buffer$_contents; - B.JSArray_methods.addAll$1(t1, toAdd); - t2 = _this._spans; - B.JSArray_methods.addAll$1(t2, spansToAdd); - if (typeof B.JSArray_methods.get$last(t1) == "string") { - t3 = _this._interpolation_buffer$_text; - t1 = A.S(t1.pop()); - t3._contents += t1; - t2.pop(); - } - }, - _flushText$0() { - var t1 = this._interpolation_buffer$_text, - t2 = t1._contents; - if (t2.length === 0) - return; - this._interpolation_buffer$_contents.push(t2.charCodeAt(0) == 0 ? t2 : t2); - this._spans.push(null); - t1._contents = ""; - }, - interpolation$1(span) { - var t1 = A.List_List$of(this._interpolation_buffer$_contents, true, type$.Object), - t2 = this._interpolation_buffer$_text, - t3 = t2._contents; - if (t3.length !== 0) - t1.push(t3.charCodeAt(0) == 0 ? t3 : t3); - t3 = A.List_List$of(this._spans, true, type$.nullable_FileSpan); - if (t2._contents.length !== 0) - t3.push(null); - return A.Interpolation$(t1, t3, span); - }, - toString$0(_) { - var t1, t2, _i, t3, element; - for (t1 = this._interpolation_buffer$_contents, t2 = t1.length, _i = 0, t3 = ""; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - element = t1[_i]; - t3 = typeof element == "string" ? t3 + element : t3 + "#{" + A.S(element) + A.Primitives_stringFromCharCode(125); - } - t1 = t3 + this._interpolation_buffer$_text.toString$0(0); - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - }; - A.InterpolationMap.prototype = { - mapException$1(error) { - var t3, t4, _this = this, - target = error.get$span(error), - source = _this.mapSpan$1(target), - startIndex = _this._indexInContents$1(target.get$start(target)), - endIndex = _this._indexInContents$1(target.get$end(target)), - t1 = _this._interpolation.contents, - t2 = error._span_exception$_message; - if (!A.SubListIterable$(t1, startIndex, null, A._arrayInstanceType(t1)._precomputed1).take$1(0, endIndex - startIndex + 1).any$1(0, new A.InterpolationMap_mapException_closure())) - return new A.SourceSpanFormatException(error.get$source(), t2, source); - else { - t1 = type$.SourceSpan; - t3 = type$.String; - t4 = A.LinkedHashMap_LinkedHashMap$_literal([target, "error in interpolated output"], t1, t3); - return new A.MultiSourceSpanFormatException(error.get$source(), "", A.ConstantMap_ConstantMap$from(t4, t1, t3), t2, source); - } - }, - mapSpan$1(target) { - var _0_10, t1, _0_2_isSet, _0_20, t2, start, end, _this = this, _null = null, - _0_1 = _this._mapLocation$1(target.get$start(target)), - _0_2 = _this._mapLocation$1(target.get$end(target)); - $label0$0: { - _0_10 = _0_1; - t1 = type$.FileSpan; - _0_2_isSet = t1._is(_0_1); - _0_20 = _null; - t2 = false; - if (_0_2_isSet) { - t1._as(_0_10); - _0_20 = _0_2; - t2 = t1._is(_0_2); - start = _0_10; - _0_1 = start; - } else { - start = _null; - _0_1 = _0_10; - } - if (t2) { - t1 = start.expand$1(0, t1._as(_0_2_isSet ? _0_20 : _0_2)); - break $label0$0; - } - t2 = false; - if (t1._is(_0_1)) { - if (_0_2_isSet) - t2 = _0_20; - else { - t2 = _0_2; - _0_20 = t2; - _0_2_isSet = true; - } - t2 = t2 instanceof A.FileLocation; - start = _0_1; - } else - start = _null; - if (t2) { - t1 = _0_2_isSet ? _0_20 : _0_2; - type$.FileLocation._as(t1); - t1 = _this._interpolation.span.file.span$2(0, _this._expandInterpolationSpanLeft$1(start.get$start(start)), t1.offset); - break $label0$0; - } - t2 = false; - if (_0_1 instanceof A.FileLocation) { - if (_0_2_isSet) - t2 = _0_20; - else { - t2 = _0_2; - _0_20 = t2; - _0_2_isSet = true; - } - t2 = t1._is(t2); - start = _0_1; - } else - start = _null; - if (t2) { - end = t1._as(_0_2_isSet ? _0_20 : _0_2); - t1 = _this._interpolation.span.file.span$2(0, start.offset, _this._expandInterpolationSpanRight$1(end.get$end(end))); - break $label0$0; - } - t1 = false; - if (_0_1 instanceof A.FileLocation) { - if (_0_2_isSet) - t1 = _0_20; - else { - t1 = _0_2; - _0_20 = t1; - _0_2_isSet = true; - } - t1 = t1 instanceof A.FileLocation; - start = _0_1; - } else - start = _null; - if (t1) { - t1 = _0_2_isSet ? _0_20 : _0_2; - type$.FileLocation._as(t1); - t1 = _this._interpolation.span.file.span$2(0, start.offset, t1.offset); - break $label0$0; - } - t1 = A.throwExpression("[BUG] Unreachable"); - } - return t1; - }, - _mapLocation$1(target) { - var t3, t4, previousLocation, _this = this, - index = _this._indexInContents$1(target), - t1 = _this._interpolation, - t2 = t1.contents, - _0_0 = t2[index]; - if (_0_0 instanceof A.Expression) - return _0_0.get$span(_0_0); - t3 = index === 0; - t1 = t1.span; - t4 = t1.file; - if (t3) - previousLocation = A.FileLocation$_(t4, t1._file$_start); - else { - t1 = type$.Expression._as(t2[index - 1]); - t1 = t1.get$span(t1); - previousLocation = A.FileLocation$_(t4, _this._expandInterpolationSpanRight$1(t1.get$end(t1))); - } - t1 = t3 ? 0 : _this._targetLocations[index - 1].get$offset(); - return A.FileLocation$_(previousLocation.file, previousLocation.offset + (target.offset - t1)); - }, - _indexInContents$1(target) { - var t1, t2, t3, i; - for (t1 = this._targetLocations, t2 = t1.length, t3 = target.offset, i = 0; i < t2; ++i) - if (t3 < t1[i].get$offset()) - return i; - return this._interpolation.contents.length - 1; - }, - _expandInterpolationSpanLeft$1(start) { - var i0, prev, char, - source = start.file._decodedChars, - i = start.offset - 1; - for (; i >= 0;) { - i0 = i - 1; - prev = source[i]; - if (prev === 123) { - if (source[i0] === 35) { - i = i0; - break; - } - i = i0; - } else if (prev === 47) { - i = i0 - 1; - if (source[i0] === 42) - for (; true;) { - i0 = i - 1; - if (source[i] !== 42) { - i = i0; - continue; - } - i = i0; - do { - i0 = i - 1; - char = source[i]; - if (char === 42) { - i = i0; - continue; - } else - break; - } while (true); - if (char === 47) { - i = i0; - break; - } - i = i0; - } - } else - i = i0; - } - return i; - }, - _expandInterpolationSpanRight$1(end) { - var t1, i0, next, second, t2, char, - source = end.file._decodedChars, - i = end.offset; - for (t1 = source.length; i < t1;) { - i0 = i + 1; - next = source[i]; - if (next === 125) { - i = i0; - break; - } - if (next === 47) { - i = i0 + 1; - second = source[i0]; - if (second === 47) { - while (true) { - i0 = i + 1; - t2 = source[i]; - if (!!(t2 === 10 || t2 === 13 || t2 === 12)) - break; - i = i0; - } - i = i0; - } else if (second === 42) - for (; true;) { - i0 = i + 1; - if (source[i] !== 42) { - i = i0; - continue; - } - i = i0; - do { - i0 = i + 1; - char = source[i]; - if (char === 42) { - i = i0; - continue; - } else - break; - } while (true); - if (char === 47) { - i = i0; - break; - } - i = i0; - } - } else - i = i0; - } - return i; - } - }; - A.InterpolationMap_mapException_closure.prototype = { - call$1($content) { - return $content instanceof A.Expression; - }, - $signature: 67 - }; - A._realCasePath_helper.prototype = { - call$1(path) { - var dirname = $.$get$context().dirname$1(path); - if (dirname === path) - return path; - return $._realCaseCache.putIfAbsent$2(path, new A._realCasePath_helper_closure(this, dirname, path)); - }, - $signature: 6 - }; - A._realCasePath_helper_closure.prototype = { - call$0() { - var matches, t1, _0_0, match, exception, - realDirname = this.helper.call$1(this.dirname), - t2 = this.path, - basename = A.ParsedPath_ParsedPath$parse(t2, $.$get$context().style).get$basename(); - try { - matches = J.where$1$ax(A.listDir(realDirname, false), new A._realCasePath_helper__closure(basename)).toList$0(0); - t1 = null; - _0_0 = matches; - $label0$0: { - match = null; - if (J.get$length$asx(_0_0) === 1) { - match = J.$index$asx(_0_0, 0); - t1 = match; - break $label0$0; - } - t1 = A.join(realDirname, basename, null); - break $label0$0; - } - t1 = t1; - return t1; - } catch (exception) { - if (A.unwrapException(exception) instanceof A.FileSystemException) - return t2; - else - throw exception; - } - }, - $signature: 30 - }; - A._realCasePath_helper__closure.prototype = { - call$1(realPath) { - return A.equalsIgnoreCase(A.ParsedPath_ParsedPath$parse(realPath, $.$get$context().style).get$basename(), this.basename); - }, - $signature: 5 - }; - A.FileSystemException.prototype = { - toString$0(_) { - var t1 = $.$get$context(); - return t1.prettyUri$1(t1.toUri$1(this.path)) + ": " + this.message; - }, - get$message(receiver) { - return this.message; - } - }; - A._readFile_closure.prototype = { - call$0() { - return J.readFileSync$2$x(A.fs(), this.path, this.encoding); - }, - $signature: 61 - }; - A.writeFile_closure.prototype = { - call$0() { - return J.writeFileSync$2$x(A.fs(), this.path, this.contents); - }, - $signature: 0 - }; - A.deleteFile_closure.prototype = { - call$0() { - return J.unlinkSync$1$x(A.fs(), this.path); - }, - $signature: 0 - }; - A.readStdin_closure.prototype = { - call$1(result) { - this._box_0.contents = result; - this.completer.complete$1(result); - }, - $signature: 91 - }; - A.readStdin_closure0.prototype = { - call$1(chunk) { - this.sink.add$1(0, type$.List_int._as(chunk)); - }, - call$0() { - return this.call$1(null); - }, - "call*": "call$1", - $requiredArgCount: 0, - $defaultValues() { - return [null]; - }, - $signature: 89 - }; - A.readStdin_closure1.prototype = { - call$1(arg) { - this.sink.close$0(0); - }, - call$0() { - return this.call$1(null); - }, - "call*": "call$1", - $requiredArgCount: 0, - $defaultValues() { - return [null]; - }, - $signature: 89 - }; - A.readStdin_closure2.prototype = { - call$1(e) { - A.printError("Failed to read from stdin"); - A.printError(e); - e.toString; - this.completer.completeError$1(e); - }, - call$0() { - return this.call$1(null); - }, - "call*": "call$1", - $requiredArgCount: 0, - $defaultValues() { - return [null]; - }, - $signature: 89 - }; - A.fileExists_closure.prototype = { - call$0() { - var error, systemError, exception, - t1 = this.path; - if (!J.existsSync$1$x(A.fs(), t1)) - return false; - try { - t1 = J.isFile$0$x(J.statSync$1$x(A.fs(), t1)); - return t1; - } catch (exception) { - error = A.unwrapException(exception); - systemError = type$.JsSystemError._as(error); - if (J.$eq$(J.get$code$x(systemError), "ENOENT")) - return false; - throw exception; - } - }, - $signature: 21 - }; - A.dirExists_closure.prototype = { - call$0() { - var error, systemError, exception, - t1 = this.path; - if (!J.existsSync$1$x(A.fs(), t1)) - return false; - try { - t1 = J.isDirectory$0$x(J.statSync$1$x(A.fs(), t1)); - return t1; - } catch (exception) { - error = A.unwrapException(exception); - systemError = type$.JsSystemError._as(error); - if (J.$eq$(J.get$code$x(systemError), "ENOENT")) - return false; - throw exception; - } - }, - $signature: 21 - }; - A.ensureDir_closure.prototype = { - call$0() { - var error, systemError, exception, t1; - try { - J.mkdirSync$1$x(A.fs(), this.path); - } catch (exception) { - error = A.unwrapException(exception); - systemError = type$.JsSystemError._as(error); - if (J.$eq$(J.get$code$x(systemError), "EEXIST")) - return; - if (!J.$eq$(J.get$code$x(systemError), "ENOENT")) - throw exception; - t1 = this.path; - A.ensureDir($.$get$context().dirname$1(t1)); - J.mkdirSync$1$x(A.fs(), t1); - } - }, - $signature: 0 - }; - A.listDir_closure.prototype = { - call$0() { - var t1 = this.path; - if (!this.recursive) - return J.map$1$1$ax(J.readdirSync$1$x(A.fs(), t1), new A.listDir__closure(t1), type$.String).super$Iterable$where(0, new A.listDir__closure0()); - else - return new A.listDir_closure_list().call$1(t1); - }, - $signature: 150 - }; - A.listDir__closure.prototype = { - call$1(child) { - return A.join(this.path, A._asString(child), null); - }, - $signature: 122 - }; - A.listDir__closure0.prototype = { - call$1(child) { - return !A.dirExists(child); - }, - $signature: 5 - }; - A.listDir_closure_list.prototype = { - call$1($parent) { - return J.expand$1$1$ax(J.readdirSync$1$x(A.fs(), $parent), new A.listDir__list_closure($parent, this), type$.String); - }, - $signature: 151 - }; - A.listDir__list_closure.prototype = { - call$1(child) { - var path = A.join(this.parent, A._asString(child), null); - return A.dirExists(path) ? this.list.call$1(path) : A._setArrayType([path], type$.JSArray_String); - }, - $signature: 152 - }; - A.modificationTime_closure.prototype = { - call$0() { - var t1 = J.getTime$0$x(J.get$mtime$x(J.statSync$1$x(A.fs(), this.path))); - if (t1 < -864e13 || t1 > 864e13) - A.throwExpression(A.RangeError$range(t1, -864e13, 864e13, "millisecondsSinceEpoch", null)); - A.checkNotNullable(false, "isUtc", type$.bool); - return new A.DateTime(t1, 0, false); - }, - $signature: 153 - }; - A.watchDir_closure0.prototype = { - call$2(error, events) { - var t1, t2, t3, t4, t5, lastEvent; - if (error != null) { - t1 = this._box_0.controller; - if (t1 != null) - t1.addError$1(error); - } else - for (t1 = J.get$iterator$ax(events), t2 = this._box_0; t1.moveNext$0();) { - t3 = t1.get$current(t1); - switch (t3.type) { - case "create": - t4 = t2.controller; - if (t4 != null) { - t3 = new A.WatchEvent(B.ChangeType_add, t3.path); - t5 = t4._state; - if (t5 >= 4) - A.throwExpression(t4._badEventState$0()); - if ((t5 & 1) !== 0) - t4._sendData$1(t3); - else if ((t5 & 3) === 0) { - t4 = t4._ensurePendingEvents$0(); - t3 = new A._DelayedData(t3); - lastEvent = t4.lastPendingEvent; - if (lastEvent == null) - t4.firstPendingEvent = t4.lastPendingEvent = t3; - else { - lastEvent.set$next(t3); - t4.lastPendingEvent = t3; - } - } - } - break; - case "update": - t4 = t2.controller; - if (t4 != null) { - t3 = new A.WatchEvent(B.ChangeType_modify, t3.path); - t5 = t4._state; - if (t5 >= 4) - A.throwExpression(t4._badEventState$0()); - if ((t5 & 1) !== 0) - t4._sendData$1(t3); - else if ((t5 & 3) === 0) { - t4 = t4._ensurePendingEvents$0(); - t3 = new A._DelayedData(t3); - lastEvent = t4.lastPendingEvent; - if (lastEvent == null) - t4.firstPendingEvent = t4.lastPendingEvent = t3; - else { - lastEvent.set$next(t3); - t4.lastPendingEvent = t3; - } - } - } - break; - case "delete": - t4 = t2.controller; - if (t4 != null) { - t3 = new A.WatchEvent(B.ChangeType_remove, t3.path); - t5 = t4._state; - if (t5 >= 4) - A.throwExpression(t4._badEventState$0()); - if ((t5 & 1) !== 0) - t4._sendData$1(t3); - else if ((t5 & 3) === 0) { - t4 = t4._ensurePendingEvents$0(); - t3 = new A._DelayedData(t3); - lastEvent = t4.lastPendingEvent; - if (lastEvent == null) - t4.firstPendingEvent = t4.lastPendingEvent = t3; - else { - lastEvent.set$next(t3); - t4.lastPendingEvent = t3; - } - } - } - break; - } - } - }, - $signature: 422 - }; - A.watchDir_closure.prototype = { - call$0() { - this.subscription.unsubscribe(); - }, - $signature: 1 - }; - A.watchDir_closure1.prototype = { - call$2(path, _) { - var t1 = this._box_0.controller; - return t1 == null ? null : t1.add$1(0, new A.WatchEvent(B.ChangeType_add, path)); - }, - call$1(path) { - return this.call$2(path, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 154 - }; - A.watchDir_closure2.prototype = { - call$2(path, _) { - var t1 = this._box_0.controller; - return t1 == null ? null : t1.add$1(0, new A.WatchEvent(B.ChangeType_modify, path)); - }, - call$1(path) { - return this.call$2(path, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 154 - }; - A.watchDir_closure3.prototype = { - call$1(path) { - var t1 = this._box_0.controller; - return t1 == null ? null : t1.add$1(0, new A.WatchEvent(B.ChangeType_remove, path)); - }, - $signature: 91 - }; - A.watchDir_closure4.prototype = { - call$1(error) { - var t1 = this._box_0.controller; - return t1 == null ? null : t1.addError$1(error); - }, - $signature: 107 - }; - A.watchDir_closure5.prototype = { - call$0() { - var controller = A.StreamController_StreamController(new A.watchDir__closure(this.watcher), null, null, null, false, type$.WatchEvent); - this._box_0.controller = controller; - this.completer.complete$1(new A._ControllerStream(controller, A._instanceType(controller)._eval$1("_ControllerStream<1>"))); - }, - $signature: 1 - }; - A.watchDir__closure.prototype = { - call$0() { - J.close$0$x(this.watcher); - }, - $signature: 1 - }; - A.JSArray0.prototype = {}; - A.Chokidar.prototype = {}; - A.ChokidarOptions.prototype = {}; - A.ChokidarWatcher.prototype = {}; - A.JSFunction.prototype = {}; - A.ImmutableList.prototype = {}; - A.ImmutableMap.prototype = {}; - A.NodeImporterResult.prototype = {}; - A.RenderContext.prototype = {}; - A.RenderContextOptions.prototype = {}; - A.RenderContextResult.prototype = {}; - A.RenderContextResultStats.prototype = {}; - A.JSModule.prototype = {}; - A.JSModuleRequire.prototype = {}; - A.ParcelWatcher_subscribe_closure.prototype = { - call$2(error, events) { - var t1 = type$.List_JSObject._is(events) ? events : new A.CastList(events, A._arrayInstanceType(events)._eval$1("CastList<1,JSObject>")); - this.callback.call$2(error, t1); - }, - $signature: 451 - }; - A.JSClass.prototype = {}; - A.JSUrl.prototype = {}; - A._PropertyDescriptor.prototype = {}; - A._RequireMain.prototype = {}; - A.LoggerWithDeprecationType0.prototype = { - warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { - this.internalWarn$4$deprecation$span$trace(message, deprecation ? B.Deprecation_W1R : null, span, trace); - }, - warn$3$span$trace(_, message, span, trace) { - return this.warn$4$deprecation$span$trace(0, message, false, span, trace); - }, - warn$2$trace(_, message, trace) { - return this.warn$4$deprecation$span$trace(0, message, false, null, trace); - } - }; - A._QuietLogger.prototype = { - warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { - }, - warn$1(_, message) { - return this.warn$4$deprecation$span$trace(0, message, false, null, null); - }, - warn$3$span$trace(_, message, span, trace) { - return this.warn$4$deprecation$span$trace(0, message, false, span, trace); - }, - debug$2(_, message, span) { - } - }; - A.DeprecationProcessingLogger.prototype = { - validate$0() { - var t1, t2, t3, t4, t5, _this = this, _null = null; - for (t1 = _this.fatalDeprecations, t1 = t1.get$iterator(t1), t2 = _this.silenceDeprecations, t3 = _this._inner; t1.moveNext$0();) { - t4 = t1.get$current(t1); - t5 = t2.contains$1(0, t4); - if (t5) { - t4 = t4.toString$0(0); - t3.warn$3$span$trace(0, "Ignoring setting to silence " + t4 + string$.x20deprex2c, _null, _null); - continue; - } - } - for (t1 = A._LinkedHashSetIterator$(t2, t2._modifications, A._instanceType(t2)._precomputed1), t2 = t1.$ti._precomputed1, t4 = _this.futureDeprecations; t1.moveNext$0();) { - t5 = t1._collection$_current; - if (B.Deprecation_W1R === (t5 == null ? t2._as(t5) : t5)) { - t3.warn$3$span$trace(0, string$.User_a, _null, _null); - continue; - } - } - for (t1 = A._LinkedHashSetIterator$(t4, t4._modifications, A._instanceType(t4)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { - t4 = t1._collection$_current; - t4 = (t4 == null ? t2._as(t4) : t4).toString$0(0); - t3.warn$3$span$trace(0, t4 + string$.x20is_noaf, _null, _null); - } - }, - internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { - if (deprecation != null) - this._handleDeprecation$4$span$trace(deprecation, message, span, trace); - else - this._inner.warn$3$span$trace(0, message, span, trace); - }, - _handleDeprecation$4$span$trace(deprecation, message, span, trace) { - var _0_3_isSet, _0_3, t1, span0, t2, count, _this = this, _null = null; - if (_this.fatalDeprecations.contains$1(0, deprecation)) { - message += string$.x0a_This + deprecation.toString$0(0) + string$.x20deprex20; - $label0$0: { - _0_3_isSet = span != null; - _0_3 = _null; - t1 = false; - if (_0_3_isSet) { - span0 = span == null ? type$.FileSpan._as(span) : span; - t1 = trace != null; - _0_3 = trace; - } else - span0 = _null; - if (t1) { - if (_0_3_isSet) - trace = _0_3; - t1 = A.SassRuntimeException$(message, span0, trace == null ? type$.Trace._as(trace) : trace, _null); - break $label0$0; - } - t1 = false; - if (span != null) - t1 = (_0_3_isSet ? _0_3 : trace) == null; - else - span = _null; - if (t1) { - t1 = A.SassException$(message, span, _null); - break $label0$0; - } - t1 = A.SassScriptException$(message, _null); - break $label0$0; - } - throw A.wrapException(t1); - } - if (_this.silenceDeprecations.contains$1(0, deprecation)) - return; - if (_this.limitRepetition) { - t1 = _this._warningCounts; - t2 = t1.$index(0, deprecation); - count = (t2 == null ? 0 : t2) + 1; - t1.$indexSet(0, deprecation, count); - if (count > 5) - return; - } - _this._inner.warn$4$deprecation$span$trace(0, message, true, span, trace); - }, - debug$2(_, message, span) { - return this._inner.debug$2(0, message, span); - }, - summarize$1$js(js) { - var t1 = this._warningCounts.get$values(0), - t2 = A._instanceType(t1), - total = A.IterableIntegerExtension_get_sum(new A.MappedIterable(new A.WhereIterable(t1, new A.DeprecationProcessingLogger_summarize_closure(), t2._eval$1("WhereIterable")), new A.DeprecationProcessingLogger_summarize_closure0(), t2._eval$1("MappedIterable"))); - if (total > 0) { - t1 = js ? "" : string$.x0aRun_i; - this._inner.warn$1(0, "" + total + string$.x20repet + t1); - } - } - }; - A.DeprecationProcessingLogger_summarize_closure.prototype = { - call$1(count) { - return count > 5; - }, - $signature: 46 - }; - A.DeprecationProcessingLogger_summarize_closure0.prototype = { - call$1(count) { - return count - 5; - }, - $signature: 156 - }; - A.StderrLogger.prototype = { - warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { - var t2, - result = new A.StringBuffer(""), - t1 = this.color; - if (t1) { - t2 = result._contents = "" + "\x1b[33m\x1b[1m"; - t2 = result._contents = (deprecation ? result._contents = t2 + "Deprecation " : t2) + "Warning\x1b[0m"; - } else - t2 = result._contents = (deprecation ? result._contents = "" + "DEPRECATION " : "") + "WARNING"; - if (span == null) - t1 = result._contents = t2 + (": " + message + "\n"); - else if (trace != null) { - t1 = t2 + (": " + message + "\n\n" + span.highlight$1$color(t1) + "\n"); - result._contents = t1; - } else { - t1 = t2 + (" on " + span.message$2$color(0, "\n" + message, t1) + "\n"); - result._contents = t1; - } - if (trace != null) - result._contents = t1 + (A.indent(B.JSString_methods.trimRight$0(trace.toString$0(0)), 4) + "\n"); - A.printError(result); - }, - warn$1(_, message) { - return this.warn$4$deprecation$span$trace(0, message, false, null, null); - }, - warn$3$span$trace(_, message, span, trace) { - return this.warn$4$deprecation$span$trace(0, message, false, span, trace); - }, - warn$2$trace(_, message, trace) { - return this.warn$4$deprecation$span$trace(0, message, false, null, trace); - }, - debug$2(_, message, span) { - var url, t3, t4, - t1 = span.file, - t2 = span._file$_start; - if (A.FileLocation$_(t1, t2).file.url == null) - url = "-"; - else { - t3 = A.FileLocation$_(t1, t2).file.url; - t4 = $.$get$context(); - t3.toString; - url = t4.prettyUri$1(t3); - } - t1 = A.FileLocation$_(t1, t2); - t1 = t1.file.getLine$1(t1.offset); - t2 = this.color ? "\x1b[1mDebug\x1b[0m" : "DEBUG"; - t2 = "" + (url + ":" + (t1 + 1) + " ") + t2 + (": " + message); - A.printError(t2.charCodeAt(0) == 0 ? t2 : t2); - } - }; - A.TrackingLogger.prototype = { - warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { - this._emittedWarning = true; - this._tracking$_logger.warn$4$deprecation$span$trace(0, message, deprecation, span, trace); - }, - warn$1(_, message) { - return this.warn$4$deprecation$span$trace(0, message, false, null, null); - }, - warn$3$span$trace(_, message, span, trace) { - return this.warn$4$deprecation$span$trace(0, message, false, span, trace); - }, - debug$2(_, message, span) { - this._emittedDebug = true; - this._tracking$_logger.debug$2(0, message, span); - } - }; - A.BuiltInModule.prototype = { - get$upstream() { - return B.List_empty7; - }, - get$variableNodes() { - return B.Map_empty4; - }, - get$extensionStore() { - return B.C_EmptyExtensionStore; - }, - get$css(_) { - return new A.CssStylesheet(B.List_empty3, A.SourceFile$decoded(B.List_empty4, this.url).span$2(0, 0, 0)); - }, - get$preModuleComments() { - return B.Map_empty2; - }, - get$transitivelyContainsCss() { - return false; - }, - get$transitivelyContainsExtensions() { - return false; - }, - setVariable$3($name, value, nodeWithSpan) { - if (!this.variables.containsKey$1($name)) - throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); - throw A.wrapException(A.SassScriptException$("Cannot modify built-in variable.", null)); - }, - variableIdentity$1($name) { - return this; - }, - cloneCss$0() { - return this; - }, - $isModule0: 1, - get$url(receiver) { - return this.url; - }, - get$functions(receiver) { - return this.functions; - }, - get$mixins() { - return this.mixins; - }, - get$variables() { - return this.variables; - } - }; - A.ForwardedModuleView.prototype = { - get$url(_) { - var t1 = this._forwarded_view$_inner; - return t1.get$url(t1); - }, - get$upstream() { - return this._forwarded_view$_inner.get$upstream(); - }, - get$extensionStore() { - return this._forwarded_view$_inner.get$extensionStore(); - }, - get$css(_) { - var t1 = this._forwarded_view$_inner; - return t1.get$css(t1); - }, - get$preModuleComments() { - return this._forwarded_view$_inner.get$preModuleComments(); - }, - get$transitivelyContainsCss() { - return this._forwarded_view$_inner.get$transitivelyContainsCss(); - }, - get$transitivelyContainsExtensions() { - return this._forwarded_view$_inner.get$transitivelyContainsExtensions(); - }, - setVariable$3($name, value, nodeWithSpan) { - var t2, _1_0, _2_0, - _s19_ = "Undefined variable.", - t1 = this._rule, - _0_0 = t1.shownVariables; - if (_0_0 != null) - t2 = !_0_0._base.contains$1(0, $name); - else - t2 = false; - if (t2) - throw A.wrapException(A.SassScriptException$(_s19_, null)); - else { - _1_0 = t1.hiddenVariables; - if (_1_0 != null) - t2 = _1_0._base.contains$1(0, $name); - else - t2 = false; - if (t2) - throw A.wrapException(A.SassScriptException$(_s19_, null)); - } - _2_0 = t1.prefix; - if (_2_0 != null) { - if (!B.JSString_methods.startsWith$1($name, _2_0)) - throw A.wrapException(A.SassScriptException$(_s19_, null)); - $name = B.JSString_methods.substring$1($name, _2_0.length); - } - return this._forwarded_view$_inner.setVariable$3($name, value, nodeWithSpan); - }, - variableIdentity$1($name) { - var _0_0 = this._rule.prefix; - if (_0_0 != null) - $name = B.JSString_methods.substring$1($name, _0_0.length); - return this._forwarded_view$_inner.variableIdentity$1($name); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.ForwardedModuleView && this._forwarded_view$_inner.$eq(0, other._forwarded_view$_inner) && this._rule === other._rule; - }, - get$hashCode(_) { - var t1 = this._forwarded_view$_inner; - return (t1.get$hashCode(t1) ^ A.Primitives_objectHashCode(this._rule)) >>> 0; - }, - cloneCss$0() { - return A.ForwardedModuleView$(this._forwarded_view$_inner.cloneCss$0(), this._rule, this.$ti._precomputed1); - }, - toString$0(_) { - return "forwarded " + this._forwarded_view$_inner.toString$0(0); - }, - $isModule0: 1, - get$variables() { - return this.variables; - }, - get$variableNodes() { - return this.variableNodes; - }, - get$functions(receiver) { - return this.functions; - }, - get$mixins() { - return this.mixins; - } - }; - A.ShadowedModuleView.prototype = { - get$url(_) { - var t1 = this._shadowed_view$_inner; - return t1.get$url(t1); - }, - get$upstream() { - return this._shadowed_view$_inner.get$upstream(); - }, - get$extensionStore() { - return this._shadowed_view$_inner.get$extensionStore(); - }, - get$css(_) { - var t1 = this._shadowed_view$_inner; - return t1.get$css(t1); - }, - get$preModuleComments() { - return this._shadowed_view$_inner.get$preModuleComments(); - }, - get$transitivelyContainsCss() { - return this._shadowed_view$_inner.get$transitivelyContainsCss(); - }, - get$transitivelyContainsExtensions() { - return this._shadowed_view$_inner.get$transitivelyContainsExtensions(); - }, - setVariable$3($name, value, nodeWithSpan) { - if (!this.variables.containsKey$1($name)) - throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); - else - this._shadowed_view$_inner.setVariable$3($name, value, nodeWithSpan); - }, - variableIdentity$1($name) { - return this._shadowed_view$_inner.variableIdentity$1($name); - }, - $eq(_, other) { - var t1, t2, t3, _this = this; - if (other == null) - return false; - t1 = false; - if (other instanceof A.ShadowedModuleView) - if (_this._shadowed_view$_inner.$eq(0, other._shadowed_view$_inner)) { - t2 = _this.variables; - t2 = t2.get$keys(t2); - t3 = other.variables; - if (B.C_IterableEquality.equals$2(0, t2, t3.get$keys(t3))) { - t2 = _this.functions; - t2 = t2.get$keys(t2); - t3 = other.functions; - if (B.C_IterableEquality.equals$2(0, t2, t3.get$keys(t3))) { - t1 = _this.mixins; - t1 = t1.get$keys(t1); - t2 = other.mixins; - t2 = B.C_IterableEquality.equals$2(0, t1, t2.get$keys(t2)); - t1 = t2; - } - } - } - return t1; - }, - get$hashCode(_) { - var t1 = this._shadowed_view$_inner; - return t1.get$hashCode(t1); - }, - cloneCss$0() { - var _this = this; - return new A.ShadowedModuleView(_this._shadowed_view$_inner.cloneCss$0(), _this.variables, _this.variableNodes, _this.functions, _this.mixins, _this.$ti); - }, - toString$0(_) { - return "shadowed " + this._shadowed_view$_inner.toString$0(0); - }, - $isModule0: 1, - get$variables() { - return this.variables; - }, - get$variableNodes() { - return this.variableNodes; - }, - get$functions(receiver) { - return this.functions; - }, - get$mixins() { - return this.mixins; - } - }; - A.AtRootQueryParser.prototype = { - parse$0(_) { - return this.wrapSpanFormatException$1(new A.AtRootQueryParser_parse_closure(this)); - } - }; - A.AtRootQueryParser_parse_closure.prototype = { - call$0() { - var include, atRules, - t1 = this.$this, - t2 = t1.scanner; - t2.expectChar$1(40); - t1.whitespace$0(); - include = t1.scanIdentifier$1("with"); - if (!include) - t1.expectIdentifier$2$name("without", '"with" or "without"'); - t1.whitespace$0(); - t2.expectChar$1(58); - t1.whitespace$0(); - atRules = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); - do { - atRules.add$1(0, t1.identifier$0().toLowerCase()); - t1.whitespace$0(); - } while (t1.lookingAtIdentifier$0()); - t2.expectChar$1(41); - t2.expectDone$0(); - return new A.AtRootQuery(include, atRules, atRules.contains$1(0, "all"), atRules.contains$1(0, "rule")); - }, - $signature: 463 - }; - A._disallowedFunctionNames_closure.prototype = { - call$1($function) { - return $function.name; - }, - $signature: 471 - }; - A.CssParser.prototype = { - get$plainCss() { - return true; - }, - silentComment$0() { - var t1, t2, _this = this; - if (_this._inExpression) - return false; - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - _this.super$Parser$silentComment(); - _this.error$2(0, string$.Silent, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - atRule$2$root(child, root) { - var $name, _0_0, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$1(64); - $name = _this.interpolatedIdentifier$0(); - _this.whitespace$0(); - _0_0 = $name.get$asPlain(); - $label0$0: { - if ("at-root" === _0_0 || "content" === _0_0 || "debug" === _0_0 || "each" === _0_0 || "error" === _0_0 || "extend" === _0_0 || "for" === _0_0 || "function" === _0_0 || "if" === _0_0 || "include" === _0_0 || "mixin" === _0_0 || "return" === _0_0 || "warn" === _0_0 || "while" === _0_0) - _this._forbiddenAtRule$1(start); - if ("import" === _0_0) { - t1 = _this._cssImportRule$1(start); - break $label0$0; - } - if ("media" === _0_0) { - t1 = _this.mediaRule$1(start); - break $label0$0; - } - if ("-moz-document" === _0_0) { - t1 = _this.mozDocumentRule$2(start, $name); - break $label0$0; - } - if ("supports" === _0_0) { - t1 = _this.supportsRule$1(start); - break $label0$0; - } - t1 = _this.unknownAtRule$2(start, $name); - break $label0$0; - } - return t1; - }, - _forbiddenAtRule$1(start) { - this.almostAnyValue$0(); - this.error$2(0, "This at-rule isn't allowed in plain CSS.", this.scanner.spanFrom$1(start)); - }, - _cssImportRule$1(start) { - var _0_0, t3, string, $name, _0_3, _0_4, t4, _0_8, t5, modifiers, _this = this, _null = null, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - _1_0 = t1.peekChar$0(); - $label1$1: { - if (117 === _1_0 || 85 === _1_0) { - _0_0 = _this.dynamicUrl$0(); - $label0$0: { - if (_0_0 instanceof A.StringExpression) { - t3 = _0_0.text; - break $label0$0; - } - string = _null; - t3 = false; - if (_0_0 instanceof A.InterpolatedFunctionExpression) { - $name = _0_0.name; - _0_3 = _0_0.$arguments; - _0_4 = _0_3.positional; - t4 = _0_4; - if (t4.length === 1) { - _0_8 = _0_4[0]; - t4 = _0_8; - if (t4 instanceof A.StringExpression) { - type$.StringExpression._as(_0_8); - t4 = _0_3.named; - if (t4.get$isEmpty(t4)) - if (_0_3.rest == null) - t3 = _0_3.keywordRest == null; - string = _0_8; - } - } - } else - $name = _null; - if (t3) { - t3 = new A.StringBuffer(""); - t4 = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t4.addInterpolation$1($name); - t5 = A.Primitives_stringFromCharCode(40); - t3._contents += t5; - t4.addInterpolation$1(string.asInterpolation$0()); - t5 = A.Primitives_stringFromCharCode(41); - t3._contents += t5; - t4 = t4.interpolation$1(_0_0.span); - t3 = t4; - break $label0$0; - } - t3 = _this.error$2(0, "Unsupported plain CSS import.", _0_0.get$span(_0_0)); - } - break $label1$1; - } - t3 = _this.interpolatedString$0().asInterpolation$1$static(true); - break $label1$1; - } - _this.whitespace$0(); - modifiers = _this.tryImportModifiers$0(); - _this.expectStatementSeparator$1("@import rule"); - t2 = A._setArrayType([new A.StaticImport(t3, modifiers, t1.spanFrom$1(new A._SpanScannerState(t1, t2)))], type$.JSArray_Import); - t1 = t1.spanFrom$1(start); - return new A.ImportRule(A.List_List$unmodifiable(t2, type$.Import), t1); - }, - parentheses$0() { - var expression, - t1 = this.scanner, - t2 = t1._string_scanner$_position; - t1.expectChar$1(40); - this.whitespace$0(); - expression = this.expressionUntilComma$0(); - t1.expectChar$1(41); - return new A.ParenthesizedExpression(expression, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - identifierLike$0() { - var t2, allowEmptySecondArg, $arguments, t3, t4, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - identifier = _this.interpolatedIdentifier$0(), - plain = identifier.get$asPlain(), - lower = plain.toLowerCase(), - _0_0 = _this.trySpecialFunction$2(lower, start); - if (_0_0 != null) - return _0_0; - t2 = t1._string_scanner$_position; - if (t1.scanChar$1(46)) - return _this.namespacedExpression$2(plain, start); - if (!t1.scanChar$1(40)) - return new A.StringExpression(identifier, false); - allowEmptySecondArg = lower === "var"; - $arguments = A._setArrayType([], type$.JSArray_Expression); - if (!t1.scanChar$1(41)) { - do { - _this.whitespace$0(); - if (allowEmptySecondArg && $arguments.length === 1 && t1.peekChar$0() === 41) { - t3 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); - t4 = t3.offset; - t4 = A._FileSpan$(t3.file, t4, t4); - $arguments.push(new A.StringExpression(new A.Interpolation(A.List_List$unmodifiable([""], type$.Object), B.List_null, t4), false)); - break; - } - $arguments.push(_this.expressionUntilComma$1$singleEquals(true)); - _this.whitespace$0(); - } while (t1.scanChar$1(44)); - t1.expectChar$1(41); - } - if ($.$get$_disallowedFunctionNames().contains$1(0, plain)) - _this.error$2(0, string$.This_f, t1.spanFrom$1(start)); - t2 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); - t3 = type$.Expression; - t4 = A.List_List$unmodifiable($arguments, t3); - t3 = A.ConstantMap_ConstantMap$from(B.Map_empty5, type$.String, t3); - t1 = t1.spanFrom$1(start); - return new A.FunctionExpression(null, A.stringReplaceAllUnchecked(plain, "_", "-"), plain, new A.ArgumentInvocation(t4, t3, null, null, t2), t1); - }, - namespacedExpression$2(namespace, start) { - var expression = this.super$StylesheetParser$namespacedExpression(namespace, start); - this.error$2(0, string$.Modulen, expression.get$span(expression)); - } - }; - A.KeyframeSelectorParser.prototype = { - parse$0(_) { - return this.wrapSpanFormatException$1(new A.KeyframeSelectorParser_parse_closure(this)); - }, - _percentage$0() { - var $self, _0_0, - t1 = this.scanner, - t2 = t1.scanChar$1(43) ? "" + A.Primitives_stringFromCharCode(43) : "", - second = t1.peekChar$0(); - if (!(second != null && second >= 48 && second <= 57) && second !== 46) - t1.error$1(0, "Expected number."); - while (true) { - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - break; - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - } - if (t1.peekChar$0() === 46) { - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - while (true) { - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - break; - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - } - } - if (this.scanIdentChar$1(101)) { - t2 += A.Primitives_stringFromCharCode(101); - _0_0 = t1.peekChar$0(); - if (43 === _0_0 || 45 === _0_0) - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - t1.error$1(0, "Expected digit."); - do { - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - $self = t1.peekChar$0(); - } while ($self != null && $self >= 48 && $self <= 57); - } - t1.expectChar$1(37); - t2 += A.Primitives_stringFromCharCode(37); - return t2.charCodeAt(0) == 0 ? t2 : t2; - } - }; - A.KeyframeSelectorParser_parse_closure.prototype = { - call$0() { - var selectors = A._setArrayType([], type$.JSArray_String), - t1 = this.$this, - t2 = t1.scanner; - do { - t1.whitespace$0(); - if (t1.lookingAtIdentifier$0()) - if (t1.scanIdentifier$1("from")) - selectors.push("from"); - else { - t1.expectIdentifier$2$name("to", '"to" or "from"'); - selectors.push("to"); - } - else - selectors.push(t1._percentage$0()); - t1.whitespace$0(); - } while (t2.scanChar$1(44)); - t2.expectDone$0(); - return selectors; - }, - $signature: 119 - }; - A.MediaQueryParser.prototype = { - parse$0(_) { - return this.wrapSpanFormatException$1(new A.MediaQueryParser_parse_closure(this)); - }, - _mediaQuery$0() { - var conditions, conjunction, t1, identifier1, identifier2, type, modifier, _this = this, _s3_ = "and", _null = null; - if (_this.scanner.peekChar$0() === 40) { - conditions = A._setArrayType([_this._mediaInParens$0()], type$.JSArray_String); - _this.whitespace$0(); - if (_this.scanIdentifier$1(_s3_)) { - _this.expectWhitespace$0(); - B.JSArray_methods.addAll$1(conditions, _this._mediaLogicSequence$1(_s3_)); - conjunction = true; - } else { - t1 = _this.scanIdentifier$1("or"); - if (t1) { - _this.expectWhitespace$0(); - B.JSArray_methods.addAll$1(conditions, _this._mediaLogicSequence$1("or")); - } - conjunction = !t1; - } - return A.CssMediaQuery$condition(conditions, conjunction); - } - identifier1 = _this.identifier$0(); - if (A.equalsIgnoreCase(identifier1, "not")) { - _this.expectWhitespace$0(); - if (!_this.lookingAtIdentifier$0()) - return A.CssMediaQuery$condition(A._setArrayType(["(not " + _this._mediaInParens$0() + ")"], type$.JSArray_String), _null); - } - _this.whitespace$0(); - if (!_this.lookingAtIdentifier$0()) - return A.CssMediaQuery$type(identifier1, _null, _null); - identifier2 = _this.identifier$0(); - if (A.equalsIgnoreCase(identifier2, _s3_)) { - _this.expectWhitespace$0(); - type = identifier1; - modifier = _null; - } else { - _this.whitespace$0(); - if (_this.scanIdentifier$1(_s3_)) - _this.expectWhitespace$0(); - else - return A.CssMediaQuery$type(identifier2, _null, identifier1); - type = identifier2; - modifier = identifier1; - } - if (_this.scanIdentifier$1("not")) { - _this.expectWhitespace$0(); - return A.CssMediaQuery$type(type, A._setArrayType(["(not " + _this._mediaInParens$0() + ")"], type$.JSArray_String), modifier); - } - return A.CssMediaQuery$type(type, _this._mediaLogicSequence$1(_s3_), modifier); - }, - _mediaLogicSequence$1(operator) { - var t1, t2, _this = this, - result = A._setArrayType([], type$.JSArray_String); - for (t1 = _this.scanner; true;) { - t1.expectChar$2$name(40, "media condition in parentheses"); - t2 = _this.declarationValue$0(); - t1.expectChar$1(41); - result.push("(" + t2 + ")"); - _this.whitespace$0(); - if (!_this.scanIdentifier$1(operator)) - return result; - _this.expectWhitespace$0(); - } - }, - _mediaInParens$0() { - var t2, - t1 = this.scanner; - t1.expectChar$2$name(40, "media condition in parentheses"); - t2 = this.declarationValue$0(); - t1.expectChar$1(41); - return "(" + t2 + ")"; - } - }; - A.MediaQueryParser_parse_closure.prototype = { - call$0() { - var queries = A._setArrayType([], type$.JSArray_CssMediaQuery), - t1 = this.$this, - t2 = t1.scanner; - do { - t1.whitespace$0(); - queries.push(t1._mediaQuery$0()); - t1.whitespace$0(); - } while (t2.scanChar$1(44)); - t2.expectDone$0(); - return queries; - }, - $signature: 472 - }; - A.Parser.prototype = { - _parseIdentifier$0() { - return this.wrapSpanFormatException$1(new A.Parser__parseIdentifier_closure(this)); - }, - _isVariableDeclarationLike$0() { - var _this = this, - t1 = _this.scanner; - if (!t1.scanChar$1(36)) - return false; - if (!_this.lookingAtIdentifier$0()) - return false; - _this.identifier$0(); - _this.whitespace$0(); - return t1.scanChar$1(58); - }, - whitespace$0() { - do - this.whitespaceWithoutComments$0(); - while (this.scanComment$0()); - }, - whitespaceWithoutComments$0() { - var t3, - t1 = this.scanner, - t2 = t1.string.length; - while (true) { - if (t1._string_scanner$_position !== t2) { - t3 = t1.peekChar$0(); - t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; - } else - t3 = false; - if (!t3) - break; - t1.readChar$0(); - } - }, - spaces$0() { - var t3, - t1 = this.scanner, - t2 = t1.string.length; - while (true) { - if (t1._string_scanner$_position !== t2) { - t3 = t1.peekChar$0(); - t3 = t3 === 32 || t3 === 9; - } else - t3 = false; - if (!t3) - break; - t1.readChar$0(); - } - }, - scanComment$0() { - var _0_0, - t1 = this.scanner; - if (t1.peekChar$0() !== 47) - return false; - _0_0 = t1.peekChar$1(1); - if (47 === _0_0) - return this.silentComment$0(); - if (42 === _0_0) { - this.loudComment$0(); - return true; - } - return false; - }, - expectWhitespace$0() { - var t2, t3, - t1 = this.scanner; - if (t1._string_scanner$_position !== t1.string.length) { - t2 = t1.peekChar$0(); - t3 = !(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || this.scanComment$0()); - t2 = t3; - } else - t2 = true; - if (t2) - t1.error$1(0, "Expected whitespace."); - this.whitespace$0(); - }, - silentComment$0() { - var t2, t3, - t1 = this.scanner; - t1.expect$1("//"); - t2 = t1.string.length; - while (true) { - if (t1._string_scanner$_position !== t2) { - t3 = t1.peekChar$0(); - t3 = !(t3 === 10 || t3 === 13 || t3 === 12); - } else - t3 = false; - if (!t3) - break; - t1.readChar$0(); - } - return true; - }, - loudComment$0() { - var next, - t1 = this.scanner; - t1.expect$1("/*"); - for (; true;) { - if (t1.readChar$0() !== 42) - continue; - do - next = t1.readChar$0(); - while (next === 42); - if (next === 47) - break; - } - }, - identifier$2$normalize$unit(normalize, unit) { - var t2, _0_0, _this = this, - _s20_ = "Expected identifier.", - text = new A.StringBuffer(""), - t1 = _this.scanner; - if (t1.scanChar$1(45)) { - t2 = text._contents = "" + A.Primitives_stringFromCharCode(45); - if (t1.scanChar$1(45)) { - text._contents = t2 + A.Primitives_stringFromCharCode(45); - _this._identifierBody$3$normalize$unit(text, normalize, unit); - t1 = text._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - } else - t2 = ""; - $label0$0: { - _0_0 = t1.peekChar$0(); - if (_0_0 == null) - t1.error$1(0, _s20_); - if (95 === _0_0 && normalize) { - t1.readChar$0(); - text._contents = t2 + A.Primitives_stringFromCharCode(45); - break $label0$0; - } - if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128) { - text._contents = t2 + A.Primitives_stringFromCharCode(t1.readChar$0()); - break $label0$0; - } - if (92 === _0_0) { - text._contents = t2 + _this.escape$1$identifierStart(true); - break $label0$0; - } - t1.error$1(0, _s20_); - } - _this._identifierBody$3$normalize$unit(text, normalize, unit); - t1 = text._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - identifier$0() { - return this.identifier$2$normalize$unit(false, false); - }, - identifier$1$normalize(normalize) { - return this.identifier$2$normalize$unit(normalize, false); - }, - identifier$1$unit(unit) { - return this.identifier$2$normalize$unit(false, unit); - }, - _identifierBody$3$normalize$unit(text, normalize, unit) { - var t1, _1_0, _0_0, t2; - for (t1 = this.scanner; true;) { - _1_0 = t1.peekChar$0(); - if (_1_0 == null) - break; - if (45 === _1_0 && unit) { - _0_0 = t1.peekChar$1(1); - if (46 !== _0_0) - t2 = A._isInt(_0_0) && _0_0 >= 48 && _0_0 <= 57; - else - t2 = true; - if (t2) - break; - t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); - text._contents += t2; - continue; - } - if (95 === _1_0 && normalize) { - t1.readChar$0(); - t2 = A.Primitives_stringFromCharCode(45); - text._contents += t2; - continue; - } - if (_1_0 !== 95) { - if (!(_1_0 >= 97 && _1_0 <= 122)) - t2 = _1_0 >= 65 && _1_0 <= 90; - else - t2 = true; - t2 = t2 || _1_0 >= 128; - } else - t2 = true; - if (!t2) - t2 = _1_0 >= 48 && _1_0 <= 57 || _1_0 === 45; - else - t2 = true; - if (t2) { - t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); - text._contents += t2; - continue; - } - if (92 === _1_0) { - t2 = this.escape$0(); - text._contents += t2; - continue; - } - break; - } - }, - _identifierBody$1(text) { - return this._identifierBody$3$normalize$unit(text, false, false); - }, - string$0() { - var buffer, _0_0, t2, - t1 = this.scanner, - quote = t1.readChar$0(); - if (quote !== 39 && quote !== 34) - t1.error$2$position(0, "Expected string.", t1._string_scanner$_position - 1); - buffer = new A.StringBuffer(""); - for (; true;) { - _0_0 = t1.peekChar$0(); - if (_0_0 === quote) { - t1.readChar$0(); - break; - } - if (_0_0 == null || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) - t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); - if (92 === _0_0) { - t2 = t1.peekChar$1(1); - if (t2 === 10 || t2 === 13 || t2 === 12) { - t1.readChar$0(); - t1.readChar$0(); - } else { - t2 = A.Primitives_stringFromCharCode(A.consumeEscapedCharacter(t1)); - buffer._contents += t2; - } - continue; - } - t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents += t2; - } - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - declarationValue$1$allowEmpty(allowEmpty) { - var t1, t2, wroteNewline, next, wroteNewline0, t3, start, end, _0_0, _this = this, - buffer = new A.StringBuffer(""), - brackets = A._setArrayType([], type$.JSArray_int); - for (t1 = _this.scanner, t2 = _this.get$string(), wroteNewline = false; true;) { - next = t1.peekChar$0(); - if (next == null) - break; - wroteNewline0 = false; - if (92 === next) { - t3 = _this.escape$1$identifierStart(true); - buffer._contents += t3; - wroteNewline = wroteNewline0; - continue; - } - if (34 === next || 39 === next) { - start = t1._string_scanner$_position; - t2.call$0(); - end = t1._string_scanner$_position; - buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); - wroteNewline = wroteNewline0; - continue; - } - if (47 === next) { - if (t1.peekChar$1(1) === 42) { - t3 = _this.get$loudComment(); - start = t1._string_scanner$_position; - t3.call$0(); - end = t1._string_scanner$_position; - buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); - } else { - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents += t3; - } - wroteNewline = wroteNewline0; - continue; - } - if (32 === next || 9 === next) { - if (!wroteNewline) { - t3 = t1.peekChar$1(1); - t3 = !(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12); - } else - t3 = true; - if (t3) { - t3 = A.Primitives_stringFromCharCode(32); - buffer._contents += t3; - } - t1.readChar$0(); - continue; - } - if (10 === next || 13 === next || 12 === next) { - t3 = t1.peekChar$1(-1); - if (!(t3 === 10 || t3 === 13 || t3 === 12)) - buffer._contents += "\n"; - t1.readChar$0(); - wroteNewline = true; - continue; - } - if (40 === next || 123 === next || 91 === next) { - t3 = A.Primitives_stringFromCharCode(next); - buffer._contents += t3; - brackets.push(A.opposite(t1.readChar$0())); - wroteNewline = wroteNewline0; - continue; - } - if (41 === next || 125 === next || 93 === next) { - if (brackets.length === 0) - break; - t3 = A.Primitives_stringFromCharCode(next); - buffer._contents += t3; - t1.expectChar$1(brackets.pop()); - wroteNewline = wroteNewline0; - continue; - } - if (59 === next) { - if (brackets.length === 0) - break; - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents += t3; - continue; - } - if (117 === next || 85 === next) { - _0_0 = _this.tryUrl$0(); - if (_0_0 != null) - buffer._contents += _0_0; - else { - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents += t3; - } - wroteNewline = wroteNewline0; - continue; - } - if (_this.lookingAtIdentifier$0()) { - t3 = _this.identifier$0(); - buffer._contents += t3; - } else { - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents += t3; - } - wroteNewline = wroteNewline0; - } - if (brackets.length !== 0) - t1.expectChar$1(B.JSArray_methods.get$last(brackets)); - if (!allowEmpty && buffer._contents.length === 0) - t1.error$1(0, "Expected token."); - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - declarationValue$0() { - return this.declarationValue$1$allowEmpty(false); - }, - tryUrl$0() { - var buffer, _0_0, t2, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - if (!_this.scanIdentifier$1("url")) - return null; - if (!t1.scanChar$1(40)) { - t1.set$state(start); - return null; - } - _this.whitespace$0(); - buffer = new A.StringBuffer(""); - buffer._contents = "" + "url("; - for (; true;) { - _0_0 = t1.peekChar$0(); - if (_0_0 == null) - break; - if (92 === _0_0) { - t2 = _this.escape$0(); - buffer._contents += t2; - continue; - } - t2 = true; - if (37 !== _0_0) - if (38 !== _0_0) - if (35 !== _0_0) - t2 = _0_0 >= 42 && _0_0 <= 126 || _0_0 >= 128; - if (t2) { - t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents += t2; - continue; - } - if (_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) { - _this.whitespace$0(); - if (t1.peekChar$0() !== 41) - break; - continue; - } - if (41 === _0_0) { - t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2 = buffer._contents += t2; - return t2.charCodeAt(0) == 0 ? t2 : t2; - } - break; - } - t1.set$state(start); - return null; - }, - variableName$0() { - this.scanner.expectChar$1(36); - return this.identifier$1$normalize(true); - }, - escape$1$identifierStart(identifierStart) { - var value, _0_0, i, next, t2, exception, - _s25_ = "Expected escape sequence.", - t1 = this.scanner, - start = t1._string_scanner$_position; - t1.expectChar$1(92); - value = 0; - $label0$1: { - _0_0 = t1.peekChar$0(); - if (_0_0 == null) - t1.error$1(0, _s25_); - if (_0_0 === 10 || _0_0 === 13 || _0_0 === 12) - t1.error$1(0, _s25_); - if (A.CharacterExtension_get_isHex(_0_0)) { - for (i = 0; i < 6; ++i) { - next = t1.peekChar$0(); - if (next != null) { - t2 = true; - if (!(next >= 48 && next <= 57)) - if (!(next >= 97 && next <= 102)) - t2 = next >= 65 && next <= 70; - t2 = !t2; - } else - t2 = true; - if (t2) - break; - value *= 16; - value += A.asHex(t1.readChar$0()); - } - this.scanCharIf$1(new A.Parser_escape_closure()); - break $label0$1; - } - value = t1.readChar$0(); - } - if (identifierStart) { - t2 = value; - t2 = t2 === 95 || A.CharacterExtension_get_isAlphabetic(t2) || t2 >= 128; - } else { - t2 = value; - if (!(t2 === 95 || A.CharacterExtension_get_isAlphabetic(t2) || t2 >= 128)) - t2 = t2 >= 48 && t2 <= 57 || t2 === 45; - else - t2 = true; - } - if (t2) - try { - t2 = A.Primitives_stringFromCharCode(value); - return t2; - } catch (exception) { - if (type$.RangeError._is(A.unwrapException(exception))) - t1.error$3$length$position(0, "Invalid Unicode code point.", t1._string_scanner$_position - start, start); - else - throw exception; - } - else { - t1 = true; - if (!(value <= 31)) - if (!J.$eq$(value, 127)) - if (identifierStart) { - t1 = value; - t1 = t1 >= 48 && t1 <= 57; - } else - t1 = false; - if (t1) { - t1 = "" + A.Primitives_stringFromCharCode(92); - if (value > 15) - t1 += A.Primitives_stringFromCharCode(A.hexCharFor(B.JSNumber_methods._shrOtherPositive$1(value, 4))); - t1 = t1 + A.Primitives_stringFromCharCode(A.hexCharFor(value & 15)) + A.Primitives_stringFromCharCode(32); - return t1.charCodeAt(0) == 0 ? t1 : t1; - } else - return A.String_String$fromCharCodes(A._setArrayType([92, value], type$.JSArray_int), 0, null); - } - }, - escape$0() { - return this.escape$1$identifierStart(false); - }, - scanCharIf$1(condition) { - var t1 = this.scanner; - if (!condition.call$1(t1.peekChar$0())) - return false; - t1.readChar$0(); - return true; - }, - scanIdentChar$2$caseSensitive(char, caseSensitive) { - var t3, - t1 = new A.Parser_scanIdentChar_matches(caseSensitive, char), - t2 = this.scanner, - _0_0 = t2.peekChar$0(); - if (_0_0 != null) { - t3 = t1.call$1(_0_0); - t3 = t3; - } else - t3 = false; - if (t3) { - t2.readChar$0(); - return true; - } - if (92 === _0_0) { - t3 = t2._string_scanner$_position; - if (t1.call$1(A.consumeEscapedCharacter(t2))) - return true; - t2.set$state(new A._SpanScannerState(t2, t3)); - } - return false; - }, - scanIdentChar$1(char) { - return this.scanIdentChar$2$caseSensitive(char, false); - }, - expectIdentChar$1(letter) { - var t1; - if (this.scanIdentChar$2$caseSensitive(letter, false)) - return; - t1 = this.scanner; - t1.error$2$position(0, 'Expected "' + A.Primitives_stringFromCharCode(letter) + '".', t1._string_scanner$_position); - }, - lookingAtIdentifier$1($forward) { - var t1, _1_0, t2, _0_0; - if ($forward == null) - $forward = 0; - t1 = this.scanner; - _1_0 = t1.peekChar$1($forward); - $label0$0: { - if (A._isInt(_1_0)) - t2 = _1_0 === 95 || A.CharacterExtension_get_isAlphabetic(_1_0) || _1_0 >= 128; - else - t2 = false; - if (t2 || 92 === _1_0) { - t1 = true; - break $label0$0; - } - if (45 === _1_0) { - _0_0 = t1.peekChar$1($forward + 1); - $label1$1: { - if (A._isInt(_0_0)) - t1 = _0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128; - else - t1 = false; - t1 = t1 || 92 === _0_0 || 45 === _0_0; - if (t1) - break $label1$1; - break $label1$1; - } - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - lookingAtIdentifier$0() { - return this.lookingAtIdentifier$1(null); - }, - lookingAtIdentifierBody$0() { - var t1, - next = this.scanner.peekChar$0(); - if (next != null) { - if (!(next === 95 || A.CharacterExtension_get_isAlphabetic(next) || next >= 128)) - t1 = next >= 48 && next <= 57 || next === 45; - else - t1 = true; - t1 = t1 || next === 92; - } else - t1 = false; - return t1; - }, - scanIdentifier$2$caseSensitive(text, caseSensitive) { - var t1, t2, _this = this; - if (!_this.lookingAtIdentifier$0()) - return false; - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - if (_this._consumeIdentifier$2(text, caseSensitive) && !_this.lookingAtIdentifierBody$0()) - return true; - else { - t1.set$state(new A._SpanScannerState(t1, t2)); - return false; - } - }, - scanIdentifier$1(text) { - return this.scanIdentifier$2$caseSensitive(text, false); - }, - _consumeIdentifier$2(text, caseSensitive) { - var t1, t2, t3; - for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t3 = t1.__internal$_current; - if (!this.scanIdentChar$2$caseSensitive(t3 == null ? t2._as(t3) : t3, caseSensitive)) - return false; - } - return true; - }, - expectIdentifier$2$name(text, $name) { - var t1, start, t2, t3, t4, t5, t6; - if ($name == null) - $name = '"' + text + '"'; - t1 = this.scanner; - start = t1._string_scanner$_position; - for (t2 = new A.CodeUnits(text), t3 = type$.CodeUnits, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = "Expected " + $name, t5 = t4 + ".", t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { - t6 = t2.__internal$_current; - if (this.scanIdentChar$2$caseSensitive(t6 == null ? t3._as(t6) : t6, false)) - continue; - t1.error$2$position(0, t5, start); - } - if (!this.lookingAtIdentifierBody$0()) - return; - t1.error$2$position(0, t4, start); - }, - expectIdentifier$1(text) { - return this.expectIdentifier$2$name(text, null); - }, - rawText$1(consumer) { - var t1 = this.scanner, - start = t1._string_scanner$_position; - consumer.call$0(); - return t1.substring$1(0, start); - }, - spanFrom$1(state) { - var span = this.scanner.spanFrom$1(state); - return this._interpolationMap == null ? span : new A.LazyFileSpan(new A.Parser_spanFrom_closure(this, span)); - }, - error$3(_, message, span, trace) { - var exception = new A.StringScannerException(this.scanner.string, message, span); - if (trace == null) - throw A.wrapException(exception); - else - A.throwWithTrace(exception, this.get$error(this), trace); - }, - error$2(_, message, span) { - return this.error$3(0, message, span, null); - }, - withErrorMessage$1$2(message, callback) { - var error, stackTrace, t1, exception; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SourceSpanFormatException._is(t1)) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = J.get$span$z(error); - A.throwWithTrace(new A.SourceSpanFormatException(error.get$source(), message, t1), error, stackTrace); - } else - throw exception; - } - }, - withErrorMessage$2(message, callback) { - return this.withErrorMessage$1$2(message, callback, type$.dynamic); - }, - wrapSpanFormatException$1$1(callback) { - var error, stackTrace, map, error0, stackTrace0, span, secondarySpans, t1, t2, span0, description, _0_0, error1, stackTrace1, span1, t3, exception, t4, _this = this, - _s8_ = "expected"; - try { - try { - t3 = callback.call$0(); - return t3; - } catch (exception) { - t3 = A.unwrapException(exception); - if (type$.SourceSpanFormatException._is(t3)) { - error = t3; - stackTrace = A.getTraceFromException(exception); - map = _this._interpolationMap; - if (map == null) - throw exception; - A.throwWithTrace(map.mapException$1(error), error, stackTrace); - } else - throw exception; - } - } catch (exception) { - t3 = A.unwrapException(exception); - if (type$.MultiSourceSpanFormatException._is(t3)) { - error0 = t3; - stackTrace0 = A.getTraceFromException(exception); - span = J.get$span$z(error0); - t3 = type$.FileSpan; - t4 = type$.String; - secondarySpans = error0.get$secondarySpans().cast$2$0(0, t3, t4); - if (A.startsWithIgnoreCase(error0._span_exception$_message, _s8_)) { - span = _this._adjustExceptionSpan$1(span); - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t3, t4); - for (t3 = A.MapExtensions_get_pairs(secondarySpans, t3, t4), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t2 = t3.get$current(t3); - span0 = null; - description = null; - _0_0 = t2; - span0 = _0_0._0; - description = _0_0._1; - J.$indexSet$ax(t1, _this._adjustExceptionSpan$1(span0), description); - } - secondarySpans = t1; - } - A.throwWithTrace(A.MultiSpanSassFormatException$(error0._span_exception$_message, span, error0.get$primaryLabel(), secondarySpans, null), error0, stackTrace0); - } else if (type$.SourceSpanFormatException._is(t3)) { - error1 = t3; - stackTrace1 = A.getTraceFromException(exception); - span1 = J.get$span$z(error1); - if (A.startsWithIgnoreCase(error1._span_exception$_message, _s8_)) - span1 = _this._adjustExceptionSpan$1(span1); - t1 = error1._span_exception$_message; - t2 = span1; - A.throwWithTrace(new A.SassFormatException(B.Set_empty, t1, t2), error1, stackTrace1); - } else - throw exception; - } - }, - wrapSpanFormatException$1(callback) { - return this.wrapSpanFormatException$1$1(callback, type$.dynamic); - }, - _adjustExceptionSpan$1(span) { - var start, t1; - if (span.get$length(span) > 0) - return span; - start = this._firstNewlineBefore$1(span.get$start(span)); - if (start.$eq(0, span.get$start(span))) - t1 = span; - else { - t1 = start.offset; - t1 = A._FileSpan$(start.file, t1, t1); - } - return t1; - }, - _firstNewlineBefore$1($location) { - var lastNewline, codeUnit, - t1 = $location.file, - t2 = $location.offset, - text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, 0, t2), 0, null), - index = t2 - 1; - for (lastNewline = null; index >= 0;) { - codeUnit = text.charCodeAt(index); - if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) { - if (lastNewline == null) - t1 = $location; - else { - t2 = new A.FileLocation(t1, lastNewline); - t2.FileLocation$_$2(t1, lastNewline); - t1 = t2; - } - return t1; - } - if (codeUnit === 10 || codeUnit === 13 || codeUnit === 12) - lastNewline = index; - --index; - } - return $location; - } - }; - A.Parser__parseIdentifier_closure.prototype = { - call$0() { - var t1 = this.$this, - result = t1.identifier$0(); - t1.scanner.expectDone$0(); - return result; - }, - $signature: 30 - }; - A.Parser_escape_closure.prototype = { - call$1(char) { - return char === 32 || char === 9 || char === 10 || char === 13 || char === 12; - }, - $signature: 32 - }; - A.Parser_scanIdentChar_matches.prototype = { - call$1(actual) { - var t1 = this.char; - return this.caseSensitive ? actual === t1 : A.characterEqualsIgnoreCase(t1, actual); - }, - $signature: 46 - }; - A.Parser_spanFrom_closure.prototype = { - call$0() { - var t1 = this.$this._interpolationMap; - if (t1 == null) - t1 = type$.InterpolationMap._as(t1); - return t1.mapSpan$1(this.span); - }, - $signature: 27 - }; - A.SassParser.prototype = { - get$currentIndentation() { - return this._currentIndentation; - }, - get$indented() { - return true; - }, - styleRuleSelector$0() { - var t4, - t1 = this.scanner, - t2 = t1._string_scanner$_position, - t3 = new A.StringBuffer(""), - buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - do { - buffer.addInterpolation$1(this.almostAnyValue$1$omitComments(true)); - t4 = A.Primitives_stringFromCharCode(10); - t4 = t3._contents += t4; - } while (B.JSString_methods.endsWith$1(B.JSString_methods.trimRight$0(t4.charCodeAt(0) == 0 ? t4 : t4), ",") && this.scanCharIf$1(new A.SassParser_styleRuleSelector_closure())); - return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - expectStatementSeparator$1($name) { - var t1, _this = this; - if (!_this.atEndOfStatement$0()) - _this._expectNewline$0(); - if (_this._peekIndentation$0() <= _this._currentIndentation) - return; - t1 = $name == null ? "here" : "beneath a " + $name; - _this.scanner.error$2$position(0, "Nothing may be indented " + t1 + ".", _this._nextIndentationEnd.position); - }, - expectStatementSeparator$0() { - return this.expectStatementSeparator$1(null); - }, - atEndOfStatement$0() { - var t1 = this.scanner.peekChar$0(); - if (t1 == null) - t1 = null; - else - t1 = t1 === 10 || t1 === 13 || t1 === 12; - return t1 !== false; - }, - lookingAtChildren$0() { - return this.atEndOfStatement$0() && this._peekIndentation$0() > this._currentIndentation; - }, - importArgument$0() { - var url, span, innerError, stackTrace, t1, _0_0, start, next, t2, exception, _this = this; - $label0$0: { - t1 = _this.scanner; - _0_0 = t1.peekChar$0(); - if (117 === _0_0 || 85 === _0_0) { - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - if (_this.scanIdentifier$1("url")) - if (t1.scanChar$1(40)) { - t1.set$state(start); - return _this.super$StylesheetParser$importArgument(); - } else - t1.set$state(start); - break $label0$0; - } - if (39 === _0_0 || 34 === _0_0) - return _this.super$StylesheetParser$importArgument(); - } - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - next = t1.peekChar$0(); - while (true) { - t2 = false; - if (next != null) - if (next !== 44) - if (next !== 59) - t2 = !(next === 10 || next === 13 || next === 12); - if (!t2) - break; - t1.readChar$0(); - next = t1.peekChar$0(); - } - url = t1.substring$1(0, start.position); - span = t1.spanFrom$1(start); - if (_this.isPlainImportUrl$1(url)) - return new A.StaticImport(new A.Interpolation(A.List_List$unmodifiable([A.serializeValue(new A.SassString(url, true), true, true)], type$.Object), B.List_null, span), null, span); - else - try { - t1 = _this.parseImportUrl$1(url); - return new A.DynamicImport(t1, span); - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.FormatException._is(t1)) { - innerError = t1; - stackTrace = A.getTraceFromException(exception); - _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), span, stackTrace); - } else - throw exception; - } - }, - scanElse$1(ifIndentation) { - var t1, t2, startIndentation, startNextIndentation, startNextIndentationEnd, _this = this; - if (_this._peekIndentation$0() !== ifIndentation) - return false; - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - startIndentation = _this._currentIndentation; - startNextIndentation = _this._nextIndentation; - startNextIndentationEnd = _this._nextIndentationEnd; - _this._readIndentation$0(); - if (t1.scanChar$1(64) && _this.scanIdentifier$1("else")) - return true; - t1.set$state(new A._SpanScannerState(t1, t2)); - _this._currentIndentation = startIndentation; - _this._nextIndentation = startNextIndentation; - _this._nextIndentationEnd = startNextIndentationEnd; - return false; - }, - children$1(_, child) { - var children = A._setArrayType([], type$.JSArray_Statement); - this._whileIndentedLower$1(new A.SassParser_children_closure(this, child, children)); - return children; - }, - statements$1(statement) { - var statements, t2, _1_0, - t1 = this.scanner, - _0_0 = t1.peekChar$0(); - if (9 === _0_0 || 32 === _0_0) - t1.error$3$length$position(0, string$.Indent, t1._string_scanner$_position, 0); - statements = A._setArrayType([], type$.JSArray_Statement); - for (t2 = t1.string.length; t1._string_scanner$_position !== t2;) { - _1_0 = this._child$1(statement); - if (_1_0 != null) - statements.push(_1_0); - this._readIndentation$0(); - } - return statements; - }, - _child$1(child) { - var _0_0, _this = this, - t1 = _this.scanner, - _1_0 = t1.peekChar$0(); - $label0$0: { - if (13 === _1_0 || 10 === _1_0 || 12 === _1_0) { - t1 = null; - break $label0$0; - } - if (36 === _1_0) { - t1 = _this.variableDeclarationWithoutNamespace$0(); - break $label0$0; - } - if (47 === _1_0) { - _0_0 = t1.peekChar$1(1); - $label1$1: { - if (47 === _0_0) { - t1 = _this._silentComment$0(); - break $label1$1; - } - if (42 === _0_0) { - t1 = _this._loudComment$0(); - break $label1$1; - } - t1 = child.call$0(); - break $label1$1; - } - break $label0$0; - } - t1 = child.call$0(); - break $label0$0; - } - return t1; - }, - _silentComment$0() { - var buffer, parentIndentation, t3, t4, t5, commentPrefix, i, t6, i0, t7, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - t1.expect$1("//"); - buffer = new A.StringBuffer(""); - parentIndentation = _this._currentIndentation; - t3 = t1.string.length; - t4 = 1 + parentIndentation; - t5 = 2 + parentIndentation; - $label0$0: - do { - commentPrefix = t1.scanChar$1(47) ? "///" : "//"; - for (i = commentPrefix.length; true;) { - t6 = buffer._contents += commentPrefix; - for (i0 = i; i0 < _this._currentIndentation - parentIndentation; ++i0) { - t6 += A.Primitives_stringFromCharCode(32); - buffer._contents = t6; - } - while (true) { - if (t1._string_scanner$_position !== t3) { - t7 = t1.peekChar$0(); - t7 = !(t7 === 10 || t7 === 13 || t7 === 12); - } else - t7 = false; - if (!t7) - break; - t6 += A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents = t6; - } - buffer._contents = t6 + "\n"; - if (_this._peekIndentation$0() < parentIndentation) - break $label0$0; - if (_this._peekIndentation$0() === parentIndentation) { - if (t1.peekChar$1(t4) === 47 && t1.peekChar$1(t5) === 47) - _this._readIndentation$0(); - break; - } - _this._readIndentation$0(); - } - } while (t1.scan$1("//")); - t3 = buffer._contents; - return _this.lastSilentComment = new A.SilentComment(t3.charCodeAt(0) == 0 ? t3 : t3, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _loudComment$0() { - var t2, t3, t4, buffer, parentIndentation, t5, t6, first, beginningOfComment, t7, end, i, _1_0, _0_0, endPosition, span, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expect$1("/*"); - t2 = new A.StringBuffer(""); - t3 = A._setArrayType([], type$.JSArray_Object); - t4 = A._setArrayType([], type$.JSArray_nullable_FileSpan); - buffer = new A.InterpolationBuffer(t2, t3, t4); - t2._contents = "" + "/*"; - parentIndentation = _this._currentIndentation; - for (t5 = t1.string, t6 = t5.length, first = true; true; first = false) { - if (first) { - beginningOfComment = t1._string_scanner$_position; - _this.spaces$0(); - t7 = t1.peekChar$0(); - if (t7 === 10 || t7 === 13 || t7 === 12) { - _this._readIndentation$0(); - t7 = A.Primitives_stringFromCharCode(32); - t2._contents += t7; - } else { - end = t1._string_scanner$_position; - t2._contents += B.JSString_methods.substring$2(t5, beginningOfComment, end); - } - } else { - t7 = t2._contents += "\n"; - t2._contents = t7 + " * "; - } - for (i = 3; i < _this._currentIndentation - parentIndentation; ++i) { - t7 = A.Primitives_stringFromCharCode(32); - t2._contents += t7; - } - for (; t1._string_scanner$_position !== t6;) { - _1_0 = t1.peekChar$0(); - if (10 === _1_0 || 13 === _1_0 || 12 === _1_0) - break; - if (35 === _1_0) { - if (t1.peekChar$1(1) === 123) { - _0_0 = _this.singleInterpolation$0(); - buffer._flushText$0(); - t3.push(_0_0._0); - t4.push(_0_0._1); - } else { - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t7; - } - continue; - } - if (42 === _1_0) { - if (t1.peekChar$1(1) === 47) { - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t3; - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t3; - endPosition = t1._string_scanner$_position; - t2 = t1._sourceFile; - t3 = start.position; - span = new A._FileSpan(t2, t3, endPosition); - span._FileSpan$3(t2, t3, endPosition); - _this.whitespace$0(); - while (true) { - t2 = t1.peekChar$0(); - if (!((t2 === 10 || t2 === 13 || t2 === 12) && _this._peekIndentation$0() > parentIndentation)) - break; - for (; _this._lookingAtDoubleNewline$0();) - _this._expectNewline$0(); - _this._readIndentation$0(); - _this.whitespace$0(); - } - if (t1._string_scanner$_position !== t6) { - t2 = t1.peekChar$0(); - t2 = !(t2 === 10 || t2 === 13 || t2 === 12); - } else - t2 = false; - if (t2) { - t2 = t1._string_scanner$_position; - while (true) { - if (t1._string_scanner$_position !== t6) { - t3 = t1.peekChar$0(); - t3 = !(t3 === 10 || t3 === 13 || t3 === 12); - } else - t3 = false; - if (!t3) - break; - t1.readChar$0(); - } - throw A.wrapException(A.MultiSpanSassFormatException$("Unexpected text after end of comment", t1.spanFrom$1(new A._SpanScannerState(t1, t2)), "extra text", A.LinkedHashMap_LinkedHashMap$_literal([span, "comment"], type$.FileSpan, type$.String), null)); - } else - return new A.LoudComment(buffer.interpolation$1(span)); - } else { - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t7; - } - continue; - } - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t7; - } - if (_this._peekIndentation$0() <= parentIndentation) - break; - for (; _this._lookingAtDoubleNewline$0();) { - _this._expectNewline$0(); - t7 = t2._contents += "\n"; - t2._contents = t7 + " *"; - } - _this._readIndentation$0(); - } - return new A.LoudComment(buffer.interpolation$1(t1.spanFrom$1(start))); - }, - whitespaceWithoutComments$0() { - var t1, t2, next; - for (t1 = this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) { - next = t1.peekChar$0(); - if (next !== 9 && next !== 32) - break; - t1.readChar$0(); - } - }, - loudComment$0() { - var next, - t1 = this.scanner; - t1.expect$1("/*"); - for (; true;) { - next = t1.readChar$0(); - if (next === 10 || next === 13 || next === 12) - t1.error$1(0, "expected */."); - if (next !== 42) - continue; - do - next = t1.readChar$0(); - while (next === 42); - if (next === 47) - break; - } - }, - _expectNewline$0() { - var t1 = this.scanner, - _0_0 = t1.peekChar$0(); - if (59 === _0_0) - t1.error$1(0, string$.semico); - if (13 === _0_0) { - t1.readChar$0(); - if (t1.peekChar$0() === 10) - t1.readChar$0(); - return; - } - if (10 === _0_0 || 12 === _0_0) { - t1.readChar$0(); - return; - } - t1.error$1(0, "expected newline."); - }, - _lookingAtDoubleNewline$0() { - var t2, _0_0, - t1 = this.scanner, - _1_0 = t1.peekChar$0(); - $label1$1: { - t2 = false; - if (13 === _1_0) { - _0_0 = t1.peekChar$1(1); - $label0$0: { - if (10 === _0_0) { - t1 = t1.peekChar$1(2); - t1 = t1 === 10 || t1 === 13 || t1 === 12; - break $label0$0; - } - if (13 === _0_0 || 12 === _0_0) { - t1 = true; - break $label0$0; - } - t1 = t2; - break $label0$0; - } - break $label1$1; - } - if (10 === _1_0 || 12 === _1_0) { - t1 = t1.peekChar$1(1); - t1 = t1 === 10 || t1 === 13 || t1 === 12; - break $label1$1; - } - t1 = t2; - break $label1$1; - } - return t1; - }, - _whileIndentedLower$1(body) { - var t1, t2, childIndentation, indentation, t3, t4, _this = this, - parentIndentation = _this._currentIndentation; - for (t1 = _this.scanner, t2 = t1._sourceFile, childIndentation = null; _this._peekIndentation$0() > parentIndentation;) { - indentation = _this._readIndentation$0(); - if (childIndentation == null) - childIndentation = indentation; - if (childIndentation !== indentation) { - t3 = t1._string_scanner$_position; - t4 = t2.getColumn$1(t3); - t1.error$3$length$position(0, "Inconsistent indentation, expected " + childIndentation + " spaces.", t2.getColumn$1(t1._string_scanner$_position), t3 - t4); - } - body.call$0(); - } - }, - _readIndentation$0() { - var t1, _this = this, - currentIndentation = _this._nextIndentation; - if (currentIndentation == null) - currentIndentation = _this._nextIndentation = _this._peekIndentation$0(); - _this._currentIndentation = currentIndentation; - t1 = _this._nextIndentationEnd; - t1.toString; - _this.scanner.set$state(t1); - _this._nextIndentationEnd = _this._nextIndentation = null; - return currentIndentation; - }, - _peekIndentation$0() { - var t1, t2, t3, start, containsTab, containsSpace, nextIndentation, _1_0, t4, _this = this, - _0_0 = _this._nextIndentation; - if (_0_0 != null) - return _0_0; - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - t3 = t1.string.length; - if (t2 === t3) { - _this._nextIndentation = 0; - _this._nextIndentationEnd = new A._SpanScannerState(t1, t2); - return 0; - } - start = new A._SpanScannerState(t1, t2); - if (!_this.scanCharIf$1(new A.SassParser__peekIndentation_closure())) - t1.error$2$position(0, "Expected newline.", t1._string_scanner$_position); - containsTab = A._Cell$(); - containsSpace = A._Cell$(); - nextIndentation = A._Cell$(); - do { - containsSpace.__late_helper$_value = containsTab.__late_helper$_value = false; - nextIndentation.__late_helper$_value = 0; - for (; true;) { - $label0$0: { - _1_0 = t1.peekChar$0(); - if (32 === _1_0) { - containsSpace.__late_helper$_value = true; - break $label0$0; - } - if (9 === _1_0) { - containsTab.__late_helper$_value = true; - break $label0$0; - } - break; - } - t2 = nextIndentation.__late_helper$_value; - if (t2 === nextIndentation) - A.throwExpression(A.LateError$localNI("")); - nextIndentation.__late_helper$_value = t2 + 1; - t1.readChar$0(); - } - t2 = t1._string_scanner$_position; - if (t2 === t3) { - _this._nextIndentation = 0; - _this._nextIndentationEnd = new A._SpanScannerState(t1, t2); - t1.set$state(start); - return 0; - } - } while (_this.scanCharIf$1(new A.SassParser__peekIndentation_closure0())); - t2 = containsTab._readLocal$0(); - t3 = containsSpace._readLocal$0(); - if (t2) { - if (t3) { - t2 = t1._string_scanner$_position; - t3 = t1._sourceFile; - t4 = t3.getColumn$1(t2); - t1.error$3$length$position(0, "Tabs and spaces may not be mixed.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); - } else if (_this._spaces === true) { - t2 = t1._string_scanner$_position; - t3 = t1._sourceFile; - t4 = t3.getColumn$1(t2); - t1.error$3$length$position(0, "Expected spaces, was tabs.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); - } - } else if (t3 && _this._spaces === false) { - t2 = t1._string_scanner$_position; - t3 = t1._sourceFile; - t4 = t3.getColumn$1(t2); - t1.error$3$length$position(0, "Expected tabs, was spaces.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); - } - _this._nextIndentation = nextIndentation._readLocal$0(); - if (nextIndentation._readLocal$0() > 0) - if (_this._spaces == null) - _this._spaces = containsSpace._readLocal$0(); - _this._nextIndentationEnd = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.set$state(start); - return nextIndentation._readLocal$0(); - } - }; - A.SassParser_styleRuleSelector_closure.prototype = { - call$1(char) { - return char === 10 || char === 13 || char === 12; - }, - $signature: 32 - }; - A.SassParser_children_closure.prototype = { - call$0() { - var _0_0 = this.$this._child$1(this.child); - if (_0_0 != null) - this.children.push(_0_0); - }, - $signature: 0 - }; - A.SassParser__peekIndentation_closure.prototype = { - call$1(char) { - return char === 10 || char === 13 || char === 12; - }, - $signature: 32 - }; - A.SassParser__peekIndentation_closure0.prototype = { - call$1(char) { - return char === 10 || char === 13 || char === 12; - }, - $signature: 32 - }; - A.ScssParser.prototype = { - get$indented() { - return false; - }, - get$currentIndentation() { - return 0; - }, - styleRuleSelector$0() { - return this.almostAnyValue$0(); - }, - expectStatementSeparator$1($name) { - var t1, _0_0; - this.whitespaceWithoutComments$0(); - t1 = this.scanner; - if (t1._string_scanner$_position === t1.string.length) - return; - _0_0 = t1.peekChar$0(); - if (59 === _0_0 || 125 === _0_0) - return; - t1.expectChar$1(59); - }, - expectStatementSeparator$0() { - return this.expectStatementSeparator$1(null); - }, - atEndOfStatement$0() { - var next = this.scanner.peekChar$0(); - return next == null || next === 59 || next === 125 || next === 123; - }, - lookingAtChildren$0() { - return this.scanner.peekChar$0() === 123; - }, - scanElse$1(ifIndentation) { - var t3, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - _this.whitespace$0(); - t3 = t1._string_scanner$_position; - if (t1.scanChar$1(64)) { - if (_this.scanIdentifier$2$caseSensitive("else", true)) - return true; - if (_this.scanIdentifier$2$caseSensitive("elseif", true)) { - _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_Aec, string$.x40elsei, t1.spanFrom$1(new A._SpanScannerState(t1, t3)))); - t1.set$position(t1._string_scanner$_position - 2); - return true; - } - } - t1.set$state(new A._SpanScannerState(t1, t2)); - return false; - }, - children$1(_, child) { - var children, _this = this, - t1 = _this.scanner; - t1.expectChar$1(123); - _this.whitespaceWithoutComments$0(); - children = A._setArrayType([], type$.JSArray_Statement); - for (; true;) - switch (t1.peekChar$0()) { - case 36: - children.push(_this.variableDeclarationWithoutNamespace$0()); - break; - case 47: - switch (t1.peekChar$1(1)) { - case 47: - children.push(_this._scss$_silentComment$0()); - _this.whitespaceWithoutComments$0(); - break; - case 42: - children.push(_this._scss$_loudComment$0()); - _this.whitespaceWithoutComments$0(); - break; - default: - children.push(child.call$0()); - } - break; - case 59: - t1.readChar$0(); - _this.whitespaceWithoutComments$0(); - break; - case 125: - t1.expectChar$1(125); - return children; - default: - children.push(child.call$0()); - } - }, - statements$1(statement) { - var t1, t2, _0_0, _1_0, _this = this, - statements = A._setArrayType([], type$.JSArray_Statement); - _this.whitespaceWithoutComments$0(); - for (t1 = _this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) - switch (t1.peekChar$0()) { - case 36: - statements.push(_this.variableDeclarationWithoutNamespace$0()); - break; - case 47: - switch (t1.peekChar$1(1)) { - case 47: - statements.push(_this._scss$_silentComment$0()); - _this.whitespaceWithoutComments$0(); - break; - case 42: - statements.push(_this._scss$_loudComment$0()); - _this.whitespaceWithoutComments$0(); - break; - default: - _0_0 = statement.call$0(); - if (_0_0 != null) - statements.push(_0_0); - } - break; - case 59: - t1.readChar$0(); - _this.whitespaceWithoutComments$0(); - break; - default: - _1_0 = statement.call$0(); - if (_1_0 != null) - statements.push(_1_0); - } - return statements; - }, - _scss$_silentComment$0() { - var t2, t3, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expect$1("//"); - t2 = t1.string.length; - do { - while (true) { - if (t1._string_scanner$_position !== t2) { - t3 = t1.readChar$0(); - t3 = !(t3 === 10 || t3 === 13 || t3 === 12); - } else - t3 = false; - if (!t3) - break; - } - if (t1._string_scanner$_position === t2) - break; - _this.spaces$0(); - } while (t1.scan$1("//")); - if (_this.get$plainCss()) - _this.error$2(0, string$.Silent, t1.spanFrom$1(start)); - return _this.lastSilentComment = new A.SilentComment(t1.substring$1(0, start.position), t1.spanFrom$1(start)); - }, - _scss$_loudComment$0() { - var t3, t4, t5, buffer, _0_0, t6, endPosition, - t1 = this.scanner, - t2 = t1._string_scanner$_position; - t1.expect$1("/*"); - t3 = new A.StringBuffer(""); - t4 = A._setArrayType([], type$.JSArray_Object); - t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); - buffer = new A.InterpolationBuffer(t3, t4, t5); - t3._contents = "" + "/*"; - $label0$1: - for (; true;) - switch (t1.peekChar$0()) { - case 35: - if (t1.peekChar$1(1) === 123) { - _0_0 = this.singleInterpolation$0(); - buffer._flushText$0(); - t4.push(_0_0._0); - t5.push(_0_0._1); - } else { - t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t6; - } - break; - case 42: - t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t6; - if (t1.peekChar$0() !== 47) - continue $label0$1; - t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t4; - endPosition = t1._string_scanner$_position; - t3 = t1._sourceFile; - t4 = new A._SpanScannerState(t1, t2).position; - t1 = new A._FileSpan(t3, t4, endPosition); - t1._FileSpan$3(t3, t4, endPosition); - return new A.LoudComment(buffer.interpolation$1(t1)); - case 13: - t1.readChar$0(); - if (t1.peekChar$0() !== 10) { - t6 = A.Primitives_stringFromCharCode(10); - t3._contents += t6; - } - break; - case 12: - t1.readChar$0(); - t6 = A.Primitives_stringFromCharCode(10); - t3._contents += t6; - break; - default: - t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t6; - } - } - }; - A.SelectorParser.prototype = { - parse$0(_) { - return this.wrapSpanFormatException$1(new A.SelectorParser_parse_closure(this)); - }, - parseCompoundSelector$0() { - return this.wrapSpanFormatException$1(new A.SelectorParser_parseCompoundSelector_closure(this)); - }, - _selectorList$0() { - var t4, t5, lineBreak, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - t3 = t1._sourceFile, - previousLine = t3.getLine$1(t2), - components = A._setArrayType([_this._complexSelector$0()], type$.JSArray_ComplexSelector); - _this.whitespace$0(); - for (t4 = t1.string.length; t1.scanChar$1(44);) { - _this.whitespace$0(); - if (t1.peekChar$0() === 44) - continue; - t5 = t1._string_scanner$_position; - if (t5 === t4) - break; - lineBreak = t3.getLine$1(t5) !== previousLine; - if (lineBreak) - previousLine = t3.getLine$1(t1._string_scanner$_position); - components.push(_this._complexSelector$1$lineBreak(lineBreak)); - } - return A.SelectorList$(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _complexSelector$1$lineBreak(lineBreak) { - var t4, lastCompound, initialCombinators, _0_0, t5, result, _this = this, - _s18_ = "expected selector.", - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - componentStart = new A._SpanScannerState(t1, t2), - t3 = type$.JSArray_CssValue_Combinator, - combinators = A._setArrayType([], t3), - components = A._setArrayType([], type$.JSArray_ComplexSelectorComponent); - for (t4 = type$.CssValue_Combinator, lastCompound = null, initialCombinators = null; true;) { - _this.whitespace$0(); - _0_0 = t1.peekChar$0(); - if (43 === _0_0) { - t5 = t1._string_scanner$_position; - t1.readChar$0(); - combinators.push(new A.CssValue(B.Combinator_gRV, _this.spanFrom$1(new A._SpanScannerState(t1, t5)), t4)); - continue; - } - if (62 === _0_0) { - t5 = t1._string_scanner$_position; - t1.readChar$0(); - combinators.push(new A.CssValue(B.Combinator_8I8, _this.spanFrom$1(new A._SpanScannerState(t1, t5)), t4)); - continue; - } - if (126 === _0_0) { - t5 = t1._string_scanner$_position; - t1.readChar$0(); - combinators.push(new A.CssValue(B.Combinator_y18, _this.spanFrom$1(new A._SpanScannerState(t1, t5)), t4)); - continue; - } - if (_0_0 == null) - break; - t5 = true; - if (91 !== _0_0) - if (46 !== _0_0) - if (35 !== _0_0) - if (37 !== _0_0) - if (58 !== _0_0) - if (38 !== _0_0) - if (42 !== _0_0) - if (124 !== _0_0) - t5 = _this.lookingAtIdentifier$0(); - if (t5) { - if (lastCompound != null) { - t5 = _this.spanFrom$1(componentStart); - result = A.List_List$from(combinators, false, t4); - result.fixed$length = Array; - result.immutable$list = Array; - components.push(new A.ComplexSelectorComponent(lastCompound, result, t5)); - } else if (combinators.length !== 0) { - componentStart = new A._SpanScannerState(t1, t1._string_scanner$_position); - initialCombinators = combinators; - } - lastCompound = _this._compoundSelector$0(); - combinators = A._setArrayType([], t3); - if (t1.peekChar$0() === 38) - t1.error$1(0, string$.x22x26__ma); - continue; - } - break; - } - t3 = combinators.length !== 0; - if (t3 && _this._plainCss) - t1.error$1(0, _s18_); - else if (lastCompound != null) { - t3 = _this.spanFrom$1(componentStart); - components.push(new A.ComplexSelectorComponent(lastCompound, A.List_List$unmodifiable(combinators, t4), t3)); - } else if (t3) - initialCombinators = combinators; - else - t1.error$1(0, _s18_); - t3 = initialCombinators == null ? B.List_empty0 : initialCombinators; - return A.ComplexSelector$(t3, components, _this.spanFrom$1(new A._SpanScannerState(t1, t2)), lineBreak); - }, - _complexSelector$0() { - return this._complexSelector$1$lineBreak(false); - }, - _compoundSelector$0() { - var t3, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - components = A._setArrayType([_this._simpleSelector$0()], type$.JSArray_SimpleSelector); - for (t3 = _this._plainCss; _this._isSimpleSelectorStart$1(t1.peekChar$0());) - components.push(_this._simpleSelector$1$allowParent(t3)); - return A.CompoundSelector$(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _simpleSelector$1$allowParent(allowParent) { - var t2, $name, text, t3, suffix, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - if (allowParent == null) - allowParent = _this._allowParent; - switch (t1.peekChar$0()) { - case 91: - return _this._attributeSelector$0(); - case 46: - t2 = t1._string_scanner$_position; - t1.expectChar$1(46); - return new A.ClassSelector(_this.identifier$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); - case 35: - t2 = t1._string_scanner$_position; - t1.expectChar$1(35); - return new A.IDSelector(_this.identifier$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); - case 37: - t2 = t1._string_scanner$_position; - t1.expectChar$1(37); - $name = _this.identifier$0(); - t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); - if (_this._plainCss) - _this.error$2(0, string$.Placeh, t1.spanFrom$1(start)); - return new A.PlaceholderSelector($name, t2); - case 58: - return _this._pseudoSelector$0(); - case 38: - t2 = t1._string_scanner$_position; - t1.expectChar$1(38); - if (_this.lookingAtIdentifierBody$0()) { - text = new A.StringBuffer(""); - _this._identifierBody$1(text); - if (text._contents.length === 0) - t1.error$1(0, "Expected identifier body."); - t3 = text._contents; - suffix = t3.charCodeAt(0) == 0 ? t3 : t3; - } else - suffix = null; - if (_this._plainCss && suffix != null) - t1.error$3$length$position(0, string$.Parent, t1._string_scanner$_position - t2, t2); - t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); - if (!allowParent) - _this.error$2(0, "Parent selectors aren't allowed here.", t1.spanFrom$1(start)); - return new A.ParentSelector(suffix, t2); - default: - return _this._typeOrUniversalSelector$0(); - } - }, - _simpleSelector$0() { - return this._simpleSelector$1$allowParent(null); - }, - _attributeSelector$0() { - var $name, operator, next, value, modifier, _this = this, _null = null, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$1(91); - _this.whitespace$0(); - $name = _this._attributeName$0(); - _this.whitespace$0(); - if (t1.scanChar$1(93)) - return new A.AttributeSelector($name, _null, _null, _null, _this.spanFrom$1(start)); - operator = _this._attributeOperator$0(); - _this.whitespace$0(); - next = t1.peekChar$0(); - value = next === 39 || next === 34 ? _this.string$0() : _this.identifier$0(); - _this.whitespace$0(); - next = t1.peekChar$0(); - modifier = next != null && A.CharacterExtension_get_isAlphabetic(next) ? A.Primitives_stringFromCharCode(t1.readChar$0()) : _null; - t1.expectChar$1(93); - return new A.AttributeSelector($name, operator, value, modifier, _this.spanFrom$1(start)); - }, - _attributeName$0() { - var nameOrNamespace, _this = this, - t1 = _this.scanner; - if (t1.scanChar$1(42)) { - t1.expectChar$1(124); - return new A.QualifiedName(_this.identifier$0(), "*"); - } - if (t1.scanChar$1(124)) - return new A.QualifiedName(_this.identifier$0(), ""); - nameOrNamespace = _this.identifier$0(); - if (t1.peekChar$0() !== 124 || t1.peekChar$1(1) === 61) - return new A.QualifiedName(nameOrNamespace, null); - t1.readChar$0(); - return new A.QualifiedName(_this.identifier$0(), nameOrNamespace); - }, - _attributeOperator$0() { - var t1 = this.scanner, - t2 = t1._string_scanner$_position; - switch (t1.readChar$0()) { - case 61: - return B.AttributeOperator_4QF; - case 126: - t1.expectChar$1(61); - return B.AttributeOperator_yT8; - case 124: - t1.expectChar$1(61); - return B.AttributeOperator_jqB; - case 94: - t1.expectChar$1(61); - return B.AttributeOperator_cMb; - case 36: - t1.expectChar$1(61); - return B.AttributeOperator_qhE; - case 42: - t1.expectChar$1(61); - return B.AttributeOperator_61T; - default: - t1.error$2$position(0, 'Expected "]".', t2); - } - }, - _pseudoSelector$0() { - var element, $name, unvendored, argument, selector, t2, _this = this, _null = null, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$1(58); - element = t1.scanChar$1(58); - $name = _this.identifier$0(); - if (!t1.scanChar$1(40)) - return A.PseudoSelector$($name, _this.spanFrom$1(start), _null, element, _null); - _this.whitespace$0(); - unvendored = A.unvendor($name); - argument = _null; - selector = _null; - if (element) - if ($._selectorPseudoElements.contains$1(0, unvendored)) - selector = _this._selectorList$0(); - else - argument = _this.declarationValue$1$allowEmpty(true); - else if ($._selectorPseudoClasses.contains$1(0, unvendored)) - selector = _this._selectorList$0(); - else if (unvendored === "nth-child" || unvendored === "nth-last-child") { - argument = _this._aNPlusB$0(); - _this.whitespace$0(); - t2 = t1.peekChar$1(-1); - if ((t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12) && t1.peekChar$0() !== 41) { - _this.expectIdentifier$1("of"); - argument += " of"; - _this.whitespace$0(); - selector = _this._selectorList$0(); - } - } else - argument = B.JSString_methods.trimRight$0(_this.declarationValue$1$allowEmpty(true)); - t1.expectChar$1(41); - return A.PseudoSelector$($name, _this.spanFrom$1(start), argument, element, selector); - }, - _aNPlusB$0() { - var t1, _0_0, t2, $self, next, _this = this; - $label0$0: { - t1 = _this.scanner; - _0_0 = t1.peekChar$0(); - if (101 === _0_0 || 69 === _0_0) { - _this.expectIdentifier$1("even"); - return "even"; - } - if (111 === _0_0 || 79 === _0_0) { - _this.expectIdentifier$1("odd"); - return "odd"; - } - if (43 === _0_0 || 45 === _0_0) { - t2 = "" + A.Primitives_stringFromCharCode(t1.readChar$0()); - break $label0$0; - } - t2 = ""; - } - $self = t1.peekChar$0(); - if ($self != null && $self >= 48 && $self <= 57) { - do { - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - $self = t1.peekChar$0(); - } while ($self != null && $self >= 48 && $self <= 57); - _this.whitespace$0(); - if (!_this.scanIdentChar$1(110)) - return t2.charCodeAt(0) == 0 ? t2 : t2; - } else - _this.expectIdentChar$1(110); - t2 += A.Primitives_stringFromCharCode(110); - _this.whitespace$0(); - next = t1.peekChar$0(); - if (next !== 43 && next !== 45) - return t2.charCodeAt(0) == 0 ? t2 : t2; - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - _this.whitespace$0(); - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - t1.error$1(0, "Expected a number."); - do { - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - $self = t1.peekChar$0(); - } while ($self != null && $self >= 48 && $self <= 57); - return t2.charCodeAt(0) == 0 ? t2 : t2; - }, - _typeOrUniversalSelector$0() { - var nameOrNamespace, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - if (t1.scanChar$1(42)) { - if (!t1.scanChar$1(124)) - return new A.UniversalSelector(null, _this.spanFrom$1(start)); - return t1.scanChar$1(42) ? new A.UniversalSelector("*", _this.spanFrom$1(start)) : new A.TypeSelector(new A.QualifiedName(_this.identifier$0(), "*"), _this.spanFrom$1(start)); - } else if (t1.scanChar$1(124)) - return t1.scanChar$1(42) ? new A.UniversalSelector("", _this.spanFrom$1(start)) : new A.TypeSelector(new A.QualifiedName(_this.identifier$0(), ""), _this.spanFrom$1(start)); - nameOrNamespace = _this.identifier$0(); - if (!t1.scanChar$1(124)) - return new A.TypeSelector(new A.QualifiedName(nameOrNamespace, null), _this.spanFrom$1(start)); - else if (t1.scanChar$1(42)) - return new A.UniversalSelector(nameOrNamespace, _this.spanFrom$1(start)); - else - return new A.TypeSelector(new A.QualifiedName(_this.identifier$0(), nameOrNamespace), _this.spanFrom$1(start)); - }, - _isSimpleSelectorStart$1(character) { - var t1; - $label0$0: { - if (42 === character || 91 === character || 46 === character || 35 === character || 37 === character || 58 === character) { - t1 = true; - break $label0$0; - } - if (38 === character) { - t1 = this._plainCss; - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - } - }; - A.SelectorParser_parse_closure.prototype = { - call$0() { - var t1 = this.$this, - selector = t1._selectorList$0(); - t1 = t1.scanner; - if (t1._string_scanner$_position !== t1.string.length) - t1.error$1(0, "expected selector."); - return selector; - }, - $signature: 537 - }; - A.SelectorParser_parseCompoundSelector_closure.prototype = { - call$0() { - var t1 = this.$this, - compound = t1._compoundSelector$0(); - t1 = t1.scanner; - if (t1._string_scanner$_position !== t1.string.length) - t1.error$1(0, "expected selector."); - return compound; - }, - $signature: 543 - }; - A.StylesheetParser.prototype = { - parse$0(_) { - return this.wrapSpanFormatException$1(new A.StylesheetParser_parse_closure(this)); - }, - parseArgumentDeclaration$0() { - return this._parseSingleProduction$1$1(new A.StylesheetParser_parseArgumentDeclaration_closure(this), type$.ArgumentDeclaration); - }, - parseVariableDeclaration$0() { - return new A._Record_2(this._parseSingleProduction$1$1(new A.StylesheetParser_parseVariableDeclaration_closure(this), type$.VariableDeclaration), this.warnings); - }, - parseUseRule$0() { - return new A._Record_2(this._parseSingleProduction$1$1(new A.StylesheetParser_parseUseRule_closure(this), type$.UseRule), this.warnings); - }, - _parseSingleProduction$1$1(production, $T) { - return this.wrapSpanFormatException$1(new A.StylesheetParser__parseSingleProduction_closure(this, production, $T)); - }, - _statement$1$root(root) { - var t2, _this = this, - t1 = _this.scanner, - _0_0 = t1.peekChar$0(); - if (64 === _0_0) - return _this.atRule$2$root(new A.StylesheetParser__statement_closure(_this), root); - if (43 === _0_0) { - if (!_this.get$indented() || !_this.lookingAtIdentifier$1(1)) - return _this._styleRule$0(); - _this._isUseAllowed = false; - t2 = t1._string_scanner$_position; - t1.readChar$0(); - return _this._includeRule$1(new A._SpanScannerState(t1, t2)); - } - if (61 === _0_0) { - if (!_this.get$indented()) - return _this._styleRule$0(); - _this._isUseAllowed = false; - t2 = t1._string_scanner$_position; - t1.readChar$0(); - _this.whitespace$0(); - return _this._mixinRule$1(new A._SpanScannerState(t1, t2)); - } - if (125 === _0_0) - t1.error$2$length(0, 'unmatched "}".', 1); - return _this._inStyleRule || _this._stylesheet$_inUnknownAtRule || _this._stylesheet$_inMixin || _this._inContentBlock ? _this._declarationOrStyleRule$0() : _this._variableDeclarationOrStyleRule$0(); - }, - _statement$0() { - return this._statement$1$root(false); - }, - _variableDeclarationWithNamespace$0() { - var t1 = this.scanner, - t2 = t1._string_scanner$_position, - namespace = this.identifier$0(); - t1.expectChar$1(46); - return this.variableDeclarationWithoutNamespace$2(namespace, new A._SpanScannerState(t1, t2)); - }, - variableDeclarationWithoutNamespace$2(namespace, start_) { - var t1, start, $name, t2, value, flagStart, t3, guarded, global, _0_0, endPosition, t4, t5, t6, declaration, _this = this, - precedingComment = _this.lastSilentComment; - _this.lastSilentComment = null; - if (start_ == null) { - t1 = _this.scanner; - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - } else - start = start_; - $name = _this.variableName$0(); - t1 = namespace != null; - if (t1) - _this._assertPublic$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure(_this, start)); - if (_this.get$plainCss()) - _this.error$2(0, string$.Sassx20v, _this.scanner.spanFrom$1(start)); - _this.whitespace$0(); - t2 = _this.scanner; - t2.expectChar$1(58); - _this.whitespace$0(); - value = _this._expression$0(); - flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); - for (t3 = _this.warnings, guarded = false, global = false; t2.scanChar$1(33);) { - $label0$0: { - _0_0 = _this.identifier$0(); - if ("default" === _0_0) { - if (guarded) { - endPosition = t2._string_scanner$_position; - t4 = t2._sourceFile; - t5 = flagStart.position; - t6 = new A._FileSpan(t4, t5, endPosition); - t6._FileSpan$3(t4, t5, endPosition); - t3.push(new A._Record_3_deprecation_message_span(B.Deprecation_YUI, string$.x21defau, t6)); - } - guarded = true; - break $label0$0; - } - if ("global" === _0_0) { - if (t1) { - endPosition = t2._string_scanner$_position; - t4 = t2._sourceFile; - t5 = flagStart.position; - t6 = new A._FileSpan(t4, t5, endPosition); - t6._FileSpan$3(t4, t5, endPosition); - _this.error$2(0, string$.x21globai, t6); - } else if (global) { - endPosition = t2._string_scanner$_position; - t4 = t2._sourceFile; - t5 = flagStart.position; - t6 = new A._FileSpan(t4, t5, endPosition); - t6._FileSpan$3(t4, t5, endPosition); - t3.push(new A._Record_3_deprecation_message_span(B.Deprecation_YUI, string$.x21globas, t6)); - } - global = true; - break $label0$0; - } - endPosition = t2._string_scanner$_position; - t4 = t2._sourceFile; - t5 = flagStart.position; - t6 = new A._FileSpan(t4, t5, endPosition); - t6._FileSpan$3(t4, t5, endPosition); - _this.error$2(0, "Invalid flag name.", t6); - } - _this.whitespace$0(); - flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); - } - _this.expectStatementSeparator$1("variable declaration"); - declaration = A.VariableDeclaration$($name, value, t2.spanFrom$1(start), precedingComment, global, guarded, namespace); - if (global) - _this._globalVariables.putIfAbsent$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure0(declaration)); - return declaration; - }, - variableDeclarationWithoutNamespace$0() { - return this.variableDeclarationWithoutNamespace$2(null, null); - }, - _variableDeclarationOrStyleRule$0() { - var t1, t2, variableOrInterpolation, t3, _this = this; - if (_this.get$plainCss()) - return _this._styleRule$0(); - if (_this.get$indented() && _this.scanner.scanChar$1(92)) - return _this._styleRule$0(); - if (!_this.lookingAtIdentifier$0()) - return _this._styleRule$0(); - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - variableOrInterpolation = _this._variableDeclarationOrInterpolation$0(); - if (variableOrInterpolation instanceof A.VariableDeclaration) - t1 = variableOrInterpolation; - else { - t3 = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t3.addInterpolation$1(type$.Interpolation._as(variableOrInterpolation)); - t2 = _this._styleRule$2(t3, new A._SpanScannerState(t1, t2)); - t1 = t2; - } - return t1; - }, - _declarationOrStyleRule$0() { - var t1, t2, declarationOrBuffer, _this = this; - if (_this.get$indented() && _this.scanner.scanChar$1(92)) - return _this._styleRule$0(); - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - declarationOrBuffer = _this._declarationOrBuffer$0(); - return declarationOrBuffer instanceof A.Statement ? declarationOrBuffer : _this._styleRule$2(type$.InterpolationBuffer._as(declarationOrBuffer), new A._SpanScannerState(t1, t2)); - }, - _declarationOrBuffer$0() { - var midBuffer, couldBeSelector, beforeDeclaration, value, additional, t2, t3, variableOrInterpolation, t4, t5, $name, postColonWhitespace, _0_0, exception, _1_0, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - nameBuffer = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), - startsWithPunctuation = _this._lookingAtPotentialPropertyHack$0(); - if (startsWithPunctuation) { - t2 = t1.readChar$0(); - t3 = nameBuffer._interpolation_buffer$_text; - t2 = A.Primitives_stringFromCharCode(t2); - t3._contents += t2; - t2 = _this.rawText$1(_this.get$whitespace()); - t3 = nameBuffer._interpolation_buffer$_text; - t3._contents += t2; - } - if (!_this._lookingAtInterpolatedIdentifier$0()) - return nameBuffer; - variableOrInterpolation = startsWithPunctuation ? _this.interpolatedIdentifier$0() : _this._variableDeclarationOrInterpolation$0(); - if (variableOrInterpolation instanceof A.VariableDeclaration) - return variableOrInterpolation; - else - nameBuffer.addInterpolation$1(type$.Interpolation._as(variableOrInterpolation)); - _this._isUseAllowed = false; - if (t1.matches$1("/*")) { - t2 = _this.rawText$1(_this.get$loudComment()); - t3 = nameBuffer._interpolation_buffer$_text; - t3._contents += t2; - } - midBuffer = new A.StringBuffer(""); - t2 = midBuffer; - t3 = _this.get$whitespace(); - t4 = _this.rawText$1(t3); - t2._contents += t4; - t4 = t1._string_scanner$_position; - if (!t1.scanChar$1(58)) { - if (midBuffer._contents.length !== 0) { - t1 = nameBuffer._interpolation_buffer$_text; - t2 = A.Primitives_stringFromCharCode(32); - t1._contents += t2; - } - return nameBuffer; - } - t2 = midBuffer; - t5 = A.Primitives_stringFromCharCode(58); - t2._contents += t5; - $name = nameBuffer.interpolation$1(t1.spanFrom$2(start, new A._SpanScannerState(t1, t4))); - if (B.JSString_methods.startsWith$1($name.get$initialPlain(), "--")) { - t2 = _this._interpolatedDeclarationValue$1$silentComments(false); - _this.expectStatementSeparator$1("custom property"); - return A.Declaration$($name, new A.StringExpression(t2, false), t1.spanFrom$1(start)); - } - if (t1.scanChar$1(58)) { - t1 = nameBuffer; - t2 = t1._interpolation_buffer$_text; - t3 = A.S(midBuffer); - t2._contents += t3; - t3 = A.Primitives_stringFromCharCode(58); - t2._contents += t3; - return t1; - } else if (_this.get$indented() && _this._lookingAtInterpolatedIdentifier$0()) { - t1 = nameBuffer; - t2 = t1._interpolation_buffer$_text; - t3 = A.S(midBuffer); - t2._contents += t3; - return t1; - } - postColonWhitespace = _this.rawText$1(t3); - _0_0 = _this._tryDeclarationChildren$2($name, start); - if (_0_0 != null) - return _0_0; - midBuffer._contents += postColonWhitespace; - couldBeSelector = postColonWhitespace.length === 0 && _this._lookingAtInterpolatedIdentifier$0(); - beforeDeclaration = new A._SpanScannerState(t1, t1._string_scanner$_position); - value = null; - try { - value = _this._expression$0(); - if (_this.lookingAtChildren$0()) { - if (couldBeSelector) - _this.expectStatementSeparator$0(); - } else if (!_this.atEndOfStatement$0()) - _this.expectStatementSeparator$0(); - } catch (exception) { - if (type$.FormatException._is(A.unwrapException(exception))) { - if (!couldBeSelector) - throw exception; - t1.set$state(beforeDeclaration); - additional = _this.almostAnyValue$0(); - if (!_this.get$indented() && t1.peekChar$0() === 59) - throw exception; - t1 = nameBuffer._interpolation_buffer$_text; - t2 = A.S(midBuffer); - t1._contents += t2; - nameBuffer.addInterpolation$1(additional); - return nameBuffer; - } else - throw exception; - } - _1_0 = _this._tryDeclarationChildren$3$value($name, start, value); - if (_1_0 != null) - return _1_0; - else { - _this.expectStatementSeparator$0(); - return A.Declaration$($name, value, t1.spanFrom$1(start)); - } - }, - _variableDeclarationOrInterpolation$0() { - var t1, start, identifier, t2, buffer, _this = this; - if (!_this.lookingAtIdentifier$0()) - return _this.interpolatedIdentifier$0(); - t1 = _this.scanner; - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - identifier = _this.identifier$0(); - if (t1.matches$1(".$")) { - t1.readChar$0(); - return _this.variableDeclarationWithoutNamespace$2(identifier, start); - } else { - t2 = new A.StringBuffer(""); - buffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t2._contents = "" + identifier; - if (_this._lookingAtInterpolatedIdentifierBody$0()) - buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); - return buffer.interpolation$1(t1.spanFrom$1(start)); - } - }, - _styleRule$2(buffer, start_) { - var t2, start, interpolation, wasInStyleRule, _this = this, t1 = {}; - _this._isUseAllowed = false; - if (start_ == null) { - t2 = _this.scanner; - start = new A._SpanScannerState(t2, t2._string_scanner$_position); - } else - start = start_; - interpolation = t1.interpolation = _this.styleRuleSelector$0(); - if (buffer != null) { - buffer.addInterpolation$1(interpolation); - t2 = t1.interpolation = buffer.interpolation$1(_this.scanner.spanFrom$1(start)); - } else - t2 = interpolation; - if (t2.contents.length === 0) - _this.scanner.error$1(0, 'expected "}".'); - wasInStyleRule = _this._inStyleRule; - _this._inStyleRule = true; - return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__styleRule_closure(t1, _this, wasInStyleRule, start)); - }, - _styleRule$0() { - return this._styleRule$2(null, null); - }, - _propertyOrVariableDeclaration$1$parseCustomProperties(parseCustomProperties) { - var t2, nameBuffer, t3, $name, variableOrInterpolation, _0_0, value, _1_0, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - if (_this._lookingAtPotentialPropertyHack$0()) { - t2 = new A.StringBuffer(""); - nameBuffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t3; - t3 = _this.rawText$1(_this.get$whitespace()); - t2._contents += t3; - nameBuffer.addInterpolation$1(_this.interpolatedIdentifier$0()); - $name = nameBuffer.interpolation$1(t1.spanFrom$1(start)); - } else if (!_this.get$plainCss()) { - variableOrInterpolation = _this._variableDeclarationOrInterpolation$0(); - if (variableOrInterpolation instanceof A.VariableDeclaration) - return variableOrInterpolation; - else - type$.Interpolation._as(variableOrInterpolation); - $name = variableOrInterpolation; - } else - $name = _this.interpolatedIdentifier$0(); - _this.whitespace$0(); - t1.expectChar$1(58); - _this.whitespace$0(); - _0_0 = _this._tryDeclarationChildren$2($name, start); - if (_0_0 != null) - return _0_0; - value = _this._expression$0(); - _1_0 = _this._tryDeclarationChildren$3$value($name, start, value); - if (_1_0 != null) - return _1_0; - else { - _this.expectStatementSeparator$0(); - return A.Declaration$($name, value, t1.spanFrom$1(start)); - } - }, - _tryDeclarationChildren$3$value($name, start, value) { - var _this = this; - if (!_this.lookingAtChildren$0()) - return null; - if (_this.get$plainCss()) - _this.scanner.error$1(0, string$.Nested); - return _this._withChildren$3(_this.get$_declarationChild(), start, new A.StylesheetParser__tryDeclarationChildren_closure($name, value)); - }, - _tryDeclarationChildren$2($name, start) { - return this._tryDeclarationChildren$3$value($name, start, null); - }, - _declarationChild$0() { - return this.scanner.peekChar$0() === 64 ? this._declarationAtRule$0() : this._propertyOrVariableDeclaration$1$parseCustomProperties(false); - }, - atRule$2$root(child, root) { - var $name, wasUseAllowed, value, optional, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$2$name(64, "@-rule"); - $name = _this.interpolatedIdentifier$0(); - _this.whitespace$0(); - wasUseAllowed = _this._isUseAllowed; - _this._isUseAllowed = false; - switch ($name.get$asPlain()) { - case "at-root": - return _this._atRootRule$1(start); - case "content": - return _this._contentRule$1(start); - case "debug": - return _this._debugRule$1(start); - case "each": - return _this._eachRule$2(start, child); - case "else": - return _this._disallowedAtRule$1(start); - case "error": - return _this._errorRule$1(start); - case "extend": - if (!_this._inStyleRule && !_this._stylesheet$_inMixin && !_this._inContentBlock) - _this.error$2(0, string$.x40exten, t1.spanFrom$1(start)); - value = _this.almostAnyValue$0(); - optional = t1.scanChar$1(33); - if (optional) { - _this.expectIdentifier$1("optional"); - _this.whitespace$0(); - } - _this.expectStatementSeparator$1("@extend rule"); - return new A.ExtendRule(value, optional, t1.spanFrom$1(start)); - case "for": - return _this._forRule$2(start, child); - case "forward": - _this._isUseAllowed = wasUseAllowed; - if (!root) - _this._disallowedAtRule$1(start); - return _this._forwardRule$1(start); - case "function": - return _this._functionRule$1(start); - case "if": - return _this._ifRule$2(start, child); - case "import": - return _this._importRule$1(start); - case "include": - return _this._includeRule$1(start); - case "media": - return _this.mediaRule$1(start); - case "mixin": - return _this._mixinRule$1(start); - case "-moz-document": - return _this.mozDocumentRule$2(start, $name); - case "return": - return _this._disallowedAtRule$1(start); - case "supports": - return _this.supportsRule$1(start); - case "use": - _this._isUseAllowed = wasUseAllowed; - if (!root) - _this._disallowedAtRule$1(start); - return _this._useRule$1(start); - case "warn": - return _this._warnRule$1(start); - case "while": - return _this._whileRule$2(start, child); - default: - return _this.unknownAtRule$2(start, $name); - } - }, - _declarationAtRule$0() { - var _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - _0_0 = _this._plainAtRuleName$0(); - $label0$0: { - if ("content" === _0_0) { - t1 = _this._contentRule$1(start); - break $label0$0; - } - if ("debug" === _0_0) { - t1 = _this._debugRule$1(start); - break $label0$0; - } - if ("each" === _0_0) { - t1 = _this._eachRule$2(start, _this.get$_declarationChild()); - break $label0$0; - } - if ("else" === _0_0) - _this._disallowedAtRule$1(start); - if ("error" === _0_0) { - t1 = _this._errorRule$1(start); - break $label0$0; - } - if ("for" === _0_0) { - t1 = _this._forRule$2(start, _this.get$_declarationChild()); - break $label0$0; - } - if ("if" === _0_0) { - t1 = _this._ifRule$2(start, _this.get$_declarationChild()); - break $label0$0; - } - if ("include" === _0_0) { - t1 = _this._includeRule$1(start); - break $label0$0; - } - if ("warn" === _0_0) { - t1 = _this._warnRule$1(start); - break $label0$0; - } - if ("while" === _0_0) { - t1 = _this._whileRule$2(start, _this.get$_declarationChild()); - break $label0$0; - } - t1 = _this._disallowedAtRule$1(start); - } - return t1; - }, - _functionChild$0() { - var state, variableDeclarationError, stackTrace, statement, t2, exception, t3, start, _0_0, value, _this = this, - t1 = _this.scanner; - if (t1.peekChar$0() !== 64) { - state = new A._SpanScannerState(t1, t1._string_scanner$_position); - try { - t2 = _this._variableDeclarationWithNamespace$0(); - return t2; - } catch (exception) { - t2 = A.unwrapException(exception); - t3 = type$.SourceSpanFormatException; - if (t3._is(t2)) { - variableDeclarationError = t2; - stackTrace = A.getTraceFromException(exception); - t1.set$state(state); - statement = null; - try { - statement = _this._declarationOrStyleRule$0(); - } catch (exception) { - if (t3._is(A.unwrapException(exception))) - throw A.wrapException(variableDeclarationError); - else - throw exception; - } - t2 = statement instanceof A.StyleRule ? "style rules" : "declarations"; - _this.error$3(0, "@function rules may not contain " + t2 + ".", J.get$span$z(statement), stackTrace); - } else - throw exception; - } - } - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - _0_0 = _this._plainAtRuleName$0(); - $label0$0: { - if ("debug" === _0_0) { - t1 = _this._debugRule$1(start); - break $label0$0; - } - if ("each" === _0_0) { - t1 = _this._eachRule$2(start, _this.get$_functionChild()); - break $label0$0; - } - if ("else" === _0_0) - _this._disallowedAtRule$1(start); - if ("error" === _0_0) { - t1 = _this._errorRule$1(start); - break $label0$0; - } - if ("for" === _0_0) { - t1 = _this._forRule$2(start, _this.get$_functionChild()); - break $label0$0; - } - if ("if" === _0_0) { - t1 = _this._ifRule$2(start, _this.get$_functionChild()); - break $label0$0; - } - if ("return" === _0_0) { - value = _this._expression$0(); - _this.expectStatementSeparator$1("@return rule"); - t1 = new A.ReturnRule(value, t1.spanFrom$1(start)); - break $label0$0; - } - if ("warn" === _0_0) { - t1 = _this._warnRule$1(start); - break $label0$0; - } - if ("while" === _0_0) { - t1 = _this._whileRule$2(start, _this.get$_functionChild()); - break $label0$0; - } - t1 = _this._disallowedAtRule$1(start); - } - return t1; - }, - _plainAtRuleName$0() { - this.scanner.expectChar$2$name(64, "@-rule"); - var $name = this.identifier$0(); - this.whitespace$0(); - return $name; - }, - _atRootRule$1(start) { - var t2, t3, buffer, t4, query, _this = this, - t1 = _this.scanner; - if (t1.peekChar$0() === 40) { - t2 = t1._string_scanner$_position; - t3 = new A.StringBuffer(""); - buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t1.expectChar$1(40); - t4 = A.Primitives_stringFromCharCode(40); - t3._contents += t4; - _this.whitespace$0(); - _this._addOrInject$2(buffer, _this._expression$0()); - if (t1.scanChar$1(58)) { - _this.whitespace$0(); - t4 = A.Primitives_stringFromCharCode(58); - t3._contents += t4; - t4 = A.Primitives_stringFromCharCode(32); - t3._contents += t4; - _this._addOrInject$2(buffer, _this._expression$0()); - } - t1.expectChar$1(41); - _this.whitespace$0(); - t4 = A.Primitives_stringFromCharCode(41); - t3._contents += t4; - query = buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - _this.whitespace$0(); - return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__atRootRule_closure(query)); - } else { - if (!_this.lookingAtChildren$0()) - t2 = _this.get$indented() && _this.atEndOfStatement$0(); - else - t2 = true; - if (t2) - return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__atRootRule_closure0()); - else - return A.AtRootRule$(A._setArrayType([_this._styleRule$0()], type$.JSArray_Statement), t1.spanFrom$1(start), null); - } - }, - _contentRule$1(start) { - var t1, beforeWhitespace, $arguments, t2, _this = this; - if (!_this._stylesheet$_inMixin) - _this.error$2(0, string$.x40conte, _this.scanner.spanFrom$1(start)); - t1 = _this.scanner; - beforeWhitespace = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); - _this.whitespace$0(); - if (t1.peekChar$0() === 40) { - $arguments = _this._argumentInvocation$1$mixin(true); - _this.whitespace$0(); - } else { - t2 = beforeWhitespace.offset; - $arguments = A.ArgumentInvocation$empty(A._FileSpan$(beforeWhitespace.file, t2, t2)); - } - _this.expectStatementSeparator$1("@content rule"); - return new A.ContentRule($arguments, t1.spanFrom$1(start)); - }, - _debugRule$1(start) { - var value = this._expression$0(); - this.expectStatementSeparator$1("@debug rule"); - return new A.DebugRule(value, this.scanner.spanFrom$1(start)); - }, - _eachRule$2(start, child) { - var variables, t1, _this = this, - wasInControlDirective = _this._inControlDirective; - _this._inControlDirective = true; - variables = A._setArrayType([_this.variableName$0()], type$.JSArray_String); - _this.whitespace$0(); - for (t1 = _this.scanner; t1.scanChar$1(44);) { - _this.whitespace$0(); - t1.expectChar$1(36); - variables.push(_this.identifier$1$normalize(true)); - _this.whitespace$0(); - } - _this.expectIdentifier$1("in"); - _this.whitespace$0(); - return _this._withChildren$3(child, start, new A.StylesheetParser__eachRule_closure(_this, wasInControlDirective, variables, _this._expression$0())); - }, - _errorRule$1(start) { - var value = this._expression$0(); - this.expectStatementSeparator$1("@error rule"); - return new A.ErrorRule(value, this.scanner.spanFrom$1(start)); - }, - _functionRule$1(start) { - var t1, t2, $name, $arguments, _0_0, _this = this, - precedingComment = _this.lastSilentComment; - _this.lastSilentComment = null; - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - $name = _this.identifier$0(); - if (B.JSString_methods.startsWith$1($name, "--")) - _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_0, string$.Sassx20_fm, t1.spanFrom$1(new A._SpanScannerState(t1, t2)))); - _this.whitespace$0(); - $arguments = _this._argumentDeclaration$0(); - if (_this._stylesheet$_inMixin || _this._inContentBlock) - _this.error$2(0, string$.Mixinscf, t1.spanFrom$1(start)); - else if (_this._inControlDirective) - _this.error$2(0, string$.Functi, t1.spanFrom$1(start)); - _0_0 = A.unvendor($name); - if ("calc" === _0_0 || "element" === _0_0 || "expression" === _0_0 || "url" === _0_0 || "and" === _0_0 || "or" === _0_0 || "not" === _0_0 || "clamp" === _0_0) - _this.error$2(0, "Invalid function name.", t1.spanFrom$1(start)); - _this.whitespace$0(); - return _this._withChildren$3(_this.get$_functionChild(), start, new A.StylesheetParser__functionRule_closure($name, $arguments, precedingComment)); - }, - _forRule$2(start, child) { - var variable, from, _this = this, t1 = {}, - wasInControlDirective = _this._inControlDirective; - _this._inControlDirective = true; - variable = _this.variableName$0(); - _this.whitespace$0(); - _this.expectIdentifier$1("from"); - _this.whitespace$0(); - t1.exclusive = null; - from = _this._expression$1$until(new A.StylesheetParser__forRule_closure(t1, _this)); - if (t1.exclusive == null) - _this.scanner.error$1(0, 'Expected "to" or "through".'); - _this.whitespace$0(); - return _this._withChildren$3(child, start, new A.StylesheetParser__forRule_closure0(t1, _this, wasInControlDirective, variable, from, _this._expression$0())); - }, - _forwardRule$1(start) { - var prefix, hiddenMixinsAndFunctions, hiddenVariables, _0_0, shownMixinsAndFunctions, shownVariables, _1_0, configuration, span, t1, t2, t3, t4, _this = this, _null = null, - url = _this._urlString$0(); - _this.whitespace$0(); - if (_this.scanIdentifier$1("as")) { - _this.whitespace$0(); - prefix = _this.identifier$1$normalize(true); - _this.scanner.expectChar$1(42); - _this.whitespace$0(); - } else - prefix = _null; - hiddenMixinsAndFunctions = _null; - hiddenVariables = _null; - if (_this.scanIdentifier$1("show")) { - _0_0 = _this._memberList$0(); - shownMixinsAndFunctions = _0_0._0; - shownVariables = _0_0._1; - } else { - if (_this.scanIdentifier$1("hide")) { - _1_0 = _this._memberList$0(); - hiddenMixinsAndFunctions = _1_0._0; - hiddenVariables = _1_0._1; - } - shownVariables = _null; - shownMixinsAndFunctions = shownVariables; - } - configuration = _this._stylesheet$_configuration$1$allowGuarded(true); - _this.whitespace$0(); - _this.expectStatementSeparator$1("@forward rule"); - span = _this.scanner.spanFrom$1(start); - if (!_this._isUseAllowed) - _this.error$2(0, string$.x40forwa, span); - if (shownMixinsAndFunctions != null) { - shownVariables.toString; - t1 = type$.String; - t2 = A.LinkedHashSet_LinkedHashSet$of(shownMixinsAndFunctions, t1); - t3 = type$.UnmodifiableSetView_String; - t1 = A.LinkedHashSet_LinkedHashSet$of(shownVariables, t1); - t4 = configuration == null ? B.List_empty10 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable); - return new A.ForwardRule(url, new A.UnmodifiableSetView0(t2, t3), new A.UnmodifiableSetView0(t1, t3), _null, _null, prefix, t4, span); - } else if (hiddenMixinsAndFunctions != null) { - hiddenVariables.toString; - t1 = type$.String; - t2 = A.LinkedHashSet_LinkedHashSet$of(hiddenMixinsAndFunctions, t1); - t3 = type$.UnmodifiableSetView_String; - t1 = A.LinkedHashSet_LinkedHashSet$of(hiddenVariables, t1); - t4 = configuration == null ? B.List_empty10 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable); - return new A.ForwardRule(url, _null, _null, new A.UnmodifiableSetView0(t2, t3), new A.UnmodifiableSetView0(t1, t3), prefix, t4, span); - } else - return new A.ForwardRule(url, _null, _null, _null, _null, prefix, configuration == null ? B.List_empty10 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable), span); - }, - _memberList$0() { - var _this = this, - t1 = type$.String, - identifiers = A.LinkedHashSet_LinkedHashSet$_empty(t1), - variables = A.LinkedHashSet_LinkedHashSet$_empty(t1); - t1 = _this.scanner; - do { - _this.whitespace$0(); - _this.withErrorMessage$2(string$.Expectv, new A.StylesheetParser__memberList_closure(_this, variables, identifiers)); - _this.whitespace$0(); - } while (t1.scanChar$1(44)); - return new A._Record_2(identifiers, variables); - }, - _ifRule$2(start, child) { - var condition, children, clauses, lastClause, span, _this = this, - ifIndentation = _this.get$currentIndentation(), - wasInControlDirective = _this._inControlDirective; - _this._inControlDirective = true; - condition = _this._expression$0(); - children = _this.children$1(0, child); - _this.whitespaceWithoutComments$0(); - clauses = A._setArrayType([A.IfClause$(condition, children)], type$.JSArray_IfClause); - while (true) { - if (!_this.scanElse$1(ifIndentation)) { - lastClause = null; - break; - } - _this.whitespace$0(); - if (_this.scanIdentifier$1("if")) { - _this.whitespace$0(); - clauses.push(A.IfClause$(_this._expression$0(), _this.children$1(0, child))); - } else { - lastClause = A.ElseClause$(_this.children$1(0, child)); - break; - } - } - _this._inControlDirective = wasInControlDirective; - span = _this.scanner.spanFrom$1(start); - _this.whitespaceWithoutComments$0(); - return new A.IfRule(A.List_List$unmodifiable(clauses, type$.IfClause), lastClause, span); - }, - _importRule$1(start) { - var argument, t3, _this = this, - imports = A._setArrayType([], type$.JSArray_Import), - t1 = _this.scanner, - t2 = _this.warnings; - do { - _this.whitespace$0(); - argument = _this.importArgument$0(); - t3 = argument instanceof A.DynamicImport; - if (t3) - t2.push(new A._Record_3_deprecation_message_span(B.Deprecation_MYu, string$.Sassx20_i, argument.span)); - if ((_this._inControlDirective || _this._stylesheet$_inMixin) && t3) - _this._disallowedAtRule$1(start); - imports.push(argument); - _this.whitespace$0(); - } while (t1.scanChar$1(44)); - _this.expectStatementSeparator$1("@import rule"); - t1 = t1.spanFrom$1(start); - return new A.ImportRule(A.List_List$unmodifiable(imports, type$.Import), t1); - }, - importArgument$0() { - var url, urlSpan, innerError, stackTrace, modifiers, t2, exception, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - _0_0 = t1.peekChar$0(); - if (117 === _0_0 || 85 === _0_0) { - url = _this.dynamicUrl$0(); - _this.whitespace$0(); - modifiers = _this.tryImportModifiers$0(); - t2 = url instanceof A.StringExpression ? url.text : A.Interpolation$(A._setArrayType([url], type$.JSArray_Object), A._setArrayType([url.get$span(url)], type$.JSArray_nullable_FileSpan), url.get$span(url)); - return new A.StaticImport(t2, modifiers, t1.spanFrom$1(start)); - } - url = _this.string$0(); - urlSpan = t1.spanFrom$1(start); - _this.whitespace$0(); - modifiers = _this.tryImportModifiers$0(); - if (_this.isPlainImportUrl$1(url) || modifiers != null) { - t2 = urlSpan; - return new A.StaticImport(new A.Interpolation(A.List_List$unmodifiable([A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2.file._decodedChars, t2._file$_start, t2._end), 0, null)], type$.Object), B.List_null, urlSpan), modifiers, t1.spanFrom$1(start)); - } else - try { - t1 = _this.parseImportUrl$1(url); - return new A.DynamicImport(t1, urlSpan); - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.FormatException._is(t1)) { - innerError = t1; - stackTrace = A.getTraceFromException(exception); - _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), urlSpan, stackTrace); - } else - throw exception; - } - }, - parseImportUrl$1(url) { - var t1 = $.$get$windows(); - if (t1.style.rootLength$1(url) > 0 && !$.$get$url().style.isRootRelative$1(url)) - return t1.toUri$1(url).toString$0(0); - A.Uri_parse(url); - return url; - }, - isPlainImportUrl$1(url) { - var _0_0, t1; - if (url.length < 5) - return false; - if (B.JSString_methods.endsWith$1(url, ".css")) - return true; - _0_0 = url.charCodeAt(0); - $label0$0: { - if (47 === _0_0) { - t1 = url.charCodeAt(1) === 47; - break $label0$0; - } - if (104 === _0_0) { - t1 = B.JSString_methods.startsWith$1(url, "http://") || B.JSString_methods.startsWith$1(url, "https://"); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - tryImportModifiers$0() { - var t1, start, t2, t3, t4, buffer, t5, identifier, $name, query, t6, endPosition, _this = this; - if (!_this._lookingAtInterpolatedIdentifier$0() && _this.scanner.peekChar$0() !== 40) - return null; - t1 = _this.scanner; - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t2 = new A.StringBuffer(""); - t3 = A._setArrayType([], type$.JSArray_Object); - t4 = A._setArrayType([], type$.JSArray_nullable_FileSpan); - buffer = new A.InterpolationBuffer(t2, t3, t4); - for (; true;) - if (_this._lookingAtInterpolatedIdentifier$0()) { - if (!(t3.length === 0 && t2._contents.length === 0)) { - t5 = A.Primitives_stringFromCharCode(32); - t2._contents += t5; - } - identifier = _this.interpolatedIdentifier$0(); - buffer.addInterpolation$1(identifier); - t5 = identifier.get$asPlain(); - $name = t5 == null ? null : t5.toLowerCase(); - if ($name !== "and" && t1.scanChar$1(40)) { - if ($name === "supports") { - query = _this._importSupportsQuery$0(); - t5 = !(query instanceof A.SupportsDeclaration); - if (t5) { - t6 = A.Primitives_stringFromCharCode(40); - t2._contents += t6; - } - t6 = query.get$span(query); - buffer._flushText$0(); - t3.push(new A.SupportsExpression(query)); - t4.push(t6); - if (t5) { - t5 = A.Primitives_stringFromCharCode(41); - t2._contents += t5; - } - } else { - t5 = A.Primitives_stringFromCharCode(40); - t2._contents += t5; - buffer.addInterpolation$1(_this._interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true)); - t5 = A.Primitives_stringFromCharCode(41); - t2._contents += t5; - } - t1.expectChar$1(41); - _this.whitespace$0(); - } else { - _this.whitespace$0(); - if (t1.scanChar$1(44)) { - t2._contents += ", "; - buffer.addInterpolation$1(_this._mediaQueryList$0()); - endPosition = t1._string_scanner$_position; - t2 = t1._sourceFile; - t3 = start.position; - t1 = new A._FileSpan(t2, t3, endPosition); - t1._FileSpan$3(t2, t3, endPosition); - return buffer.interpolation$1(t1); - } - } - } else if (t1.peekChar$0() === 40) { - if (!(t3.length === 0 && t2._contents.length === 0)) { - t3 = A.Primitives_stringFromCharCode(32); - t2._contents += t3; - } - buffer.addInterpolation$1(_this._mediaQueryList$0()); - endPosition = t1._string_scanner$_position; - t1 = t1._sourceFile; - t2 = start.position; - t3 = new A._FileSpan(t1, t2, endPosition); - t3._FileSpan$3(t1, t2, endPosition); - return buffer.interpolation$1(t3); - } else { - endPosition = t1._string_scanner$_position; - t1 = t1._sourceFile; - t2 = start.position; - t3 = new A._FileSpan(t1, t2, endPosition); - t3._FileSpan$3(t1, t2, endPosition); - return buffer.interpolation$1(t3); - } - }, - _importSupportsQuery$0() { - var t1, t2, _0_0, $name, _this = this; - if (_this.scanIdentifier$1("not")) { - _this.whitespace$0(); - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - return new A.SupportsNegation(_this._supportsConditionInParens$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - } else { - t1 = _this.scanner; - if (t1.peekChar$0() === 40) - return _this._supportsCondition$0(); - else { - _0_0 = _this._tryImportSupportsFunction$0(); - if (_0_0 != null) - return _0_0; - t2 = t1._string_scanner$_position; - $name = _this._expression$0(); - t1.expectChar$1(58); - return new A.SupportsDeclaration($name, _this._supportsDeclarationValue$1($name), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - } - } - }, - _tryImportSupportsFunction$0() { - var t1, start, $name, value, _this = this; - if (!_this._lookingAtInterpolatedIdentifier$0()) - return null; - t1 = _this.scanner; - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - $name = _this.interpolatedIdentifier$0(); - if (!t1.scanChar$1(40)) { - t1.set$state(start); - return null; - } - value = _this._interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true); - t1.expectChar$1(41); - return new A.SupportsFunction($name, value, t1.spanFrom$1(start)); - }, - _includeRule$1(start) { - var name0, namespace, $arguments, t2, t3, contentArguments, contentArguments_, wasInContentBlock, $content, span, _this = this, _null = null, - $name = _this.identifier$0(), - t1 = _this.scanner; - if (t1.scanChar$1(46)) { - name0 = _this._publicIdentifier$0(); - namespace = $name; - $name = name0; - } else - namespace = _null; - _this.whitespace$0(); - if (t1.peekChar$0() === 40) - $arguments = _this._argumentInvocation$1$mixin(true); - else { - t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); - t3 = t2.offset; - $arguments = A.ArgumentInvocation$empty(A._FileSpan$(t2.file, t3, t3)); - } - _this.whitespace$0(); - if (_this.scanIdentifier$1("using")) { - _this.whitespace$0(); - contentArguments = _this._argumentDeclaration$0(); - _this.whitespace$0(); - } else - contentArguments = _null; - t2 = contentArguments == null; - if (!t2 || _this.lookingAtChildren$0()) { - if (t2) { - t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); - t3 = t2.offset; - contentArguments_ = new A.ArgumentDeclaration(B.List_empty12, _null, A._FileSpan$(t2.file, t3, t3)); - } else - contentArguments_ = contentArguments; - wasInContentBlock = _this._inContentBlock; - _this._inContentBlock = true; - $content = _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__includeRule_closure(contentArguments_)); - _this._inContentBlock = wasInContentBlock; - } else { - _this.expectStatementSeparator$0(); - $content = _null; - } - t1 = t1.spanFrom$2(start, start); - t2 = $content == null ? $arguments : $content; - span = t1.expand$1(0, t2.get$span(t2)); - return new A.IncludeRule(namespace, A.stringReplaceAllUnchecked($name, "_", "-"), $name, $arguments, $content, span); - }, - mediaRule$1(start) { - return this._withChildren$3(this.get$_statement(), start, new A.StylesheetParser_mediaRule_closure(this._mediaQueryList$0())); - }, - _mixinRule$1(start) { - var t1, t2, $name, $arguments, t3, _this = this, - precedingComment = _this.lastSilentComment; - _this.lastSilentComment = null; - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - $name = _this.identifier$0(); - if (B.JSString_methods.startsWith$1($name, "--")) - _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_0, string$.Sassx20_m, t1.spanFrom$1(new A._SpanScannerState(t1, t2)))); - _this.whitespace$0(); - if (t1.peekChar$0() === 40) - $arguments = _this._argumentDeclaration$0(); - else { - t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); - t3 = t2.offset; - $arguments = new A.ArgumentDeclaration(B.List_empty12, null, A._FileSpan$(t2.file, t3, t3)); - } - if (_this._stylesheet$_inMixin || _this._inContentBlock) - _this.error$2(0, string$.Mixinscm, t1.spanFrom$1(start)); - else if (_this._inControlDirective) - _this.error$2(0, string$.Mixinsb, t1.spanFrom$1(start)); - _this.whitespace$0(); - _this._stylesheet$_inMixin = true; - return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__mixinRule_closure(_this, $name, $arguments, precedingComment)); - }, - mozDocumentRule$2(start, $name) { - var t6, _0_0, t7, identifier, _1_0, argument, trailing, endPosition, t8, t9, start0, end, _this = this, _box_0 = {}, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - t3 = new A.StringBuffer(""), - t4 = A._setArrayType([], type$.JSArray_Object), - t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan), - buffer = new A.InterpolationBuffer(t3, t4, t5); - _box_0.needsDeprecationWarning = false; - for (t6 = _this.get$whitespace(); true;) { - if (t1.peekChar$0() === 35) { - _0_0 = _this.singleInterpolation$0(); - buffer._flushText$0(); - t4.push(_0_0._0); - t5.push(_0_0._1); - _box_0.needsDeprecationWarning = true; - } else { - t7 = t1._string_scanner$_position; - identifier = _this.identifier$0(); - $label0$0: { - if ("url" === identifier || "url-prefix" === identifier || "domain" === identifier) { - _1_0 = _this._tryUrlContents$2$name(new A._SpanScannerState(t1, t7), identifier); - if (_1_0 != null) - buffer.addInterpolation$1(_1_0); - else { - t1.expectChar$1(40); - _this.whitespace$0(); - argument = _this.interpolatedString$0(); - t1.expectChar$1(41); - t3._contents += identifier; - t7 = A.Primitives_stringFromCharCode(40); - t3._contents += t7; - buffer.addInterpolation$1(argument.asInterpolation$0()); - t7 = A.Primitives_stringFromCharCode(41); - t3._contents += t7; - } - t7 = t3._contents; - trailing = t7.charCodeAt(0) == 0 ? t7 : t7; - if (!B.JSString_methods.endsWith$1(trailing, "url-prefix()") && !B.JSString_methods.endsWith$1(trailing, "url-prefix('')") && !B.JSString_methods.endsWith$1(trailing, 'url-prefix("")')) - _box_0.needsDeprecationWarning = true; - break $label0$0; - } - if ("regexp" === identifier) { - t3._contents += "regexp("; - t1.expectChar$1(40); - buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); - t1.expectChar$1(41); - t7 = A.Primitives_stringFromCharCode(41); - t3._contents += t7; - _box_0.needsDeprecationWarning = true; - break $label0$0; - } - endPosition = t1._string_scanner$_position; - t8 = t1._sourceFile; - t9 = new A._FileSpan(t8, t7, endPosition); - t9._FileSpan$3(t8, t7, endPosition); - _this.error$2(0, "Invalid function name.", t9); - } - } - _this.whitespace$0(); - if (!t1.scanChar$1(44)) - break; - t7 = A.Primitives_stringFromCharCode(44); - t3._contents += t7; - start0 = t1._string_scanner$_position; - t6.call$0(); - end = t1._string_scanner$_position; - t3._contents += B.JSString_methods.substring$2(t1.string, start0, end); - } - return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_mozDocumentRule_closure(_box_0, _this, $name, buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))))); - }, - supportsRule$1(start) { - var _this = this, - condition = _this._supportsCondition$0(); - _this.whitespace$0(); - return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_supportsRule_closure(condition)); - }, - _useRule$1(start) { - var namespace, configuration, span, t1, _this = this, - url = _this._urlString$0(); - _this.whitespace$0(); - namespace = _this._useNamespace$2(url, start); - _this.whitespace$0(); - configuration = _this._stylesheet$_configuration$0(); - _this.whitespace$0(); - span = _this.scanner.spanFrom$1(start); - if (!_this._isUseAllowed) - _this.error$2(0, string$.x40use_r, span); - _this.expectStatementSeparator$1("@use rule"); - t1 = new A.UseRule(url, namespace, configuration == null ? B.List_empty10 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable), span); - t1.UseRule$4$configuration(url, namespace, span, configuration); - return t1; - }, - _useNamespace$2(url, start) { - var namespace, basename, dot, t1, exception, _this = this; - if (_this.scanIdentifier$1("as")) { - _this.whitespace$0(); - return _this.scanner.scanChar$1(42) ? null : _this.identifier$0(); - } - basename = url.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(url.get$pathSegments()); - dot = B.JSString_methods.indexOf$1(basename, "."); - t1 = B.JSString_methods.startsWith$1(basename, "_") ? 1 : 0; - namespace = B.JSString_methods.substring$2(basename, t1, dot === -1 ? basename.length : dot); - try { - t1 = new A.Parser(A.SpanScanner$(namespace, null), null)._parseIdentifier$0(); - return t1; - } catch (exception) { - if (type$.SassFormatException._is(A.unwrapException(exception))) - _this.error$2(0, 'The default namespace "' + A.S(namespace) + string$.x22x20is_n, _this.scanner.spanFrom$1(start)); - else - throw exception; - } - }, - _stylesheet$_configuration$1$allowGuarded(allowGuarded) { - var variableNames, configuration, t1, t2, $name, expression, t3, guarded, endPosition, t4, t5, span, _this = this; - if (!_this.scanIdentifier$1("with")) - return null; - variableNames = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); - configuration = A._setArrayType([], type$.JSArray_ConfiguredVariable); - _this.whitespace$0(); - t1 = _this.scanner; - t1.expectChar$1(40); - for (; true;) { - _this.whitespace$0(); - t2 = t1._string_scanner$_position; - t1.expectChar$1(36); - $name = _this.identifier$1$normalize(true); - _this.whitespace$0(); - t1.expectChar$1(58); - _this.whitespace$0(); - expression = _this.expressionUntilComma$0(); - t3 = t1._string_scanner$_position; - if (allowGuarded && t1.scanChar$1(33)) { - guarded = _this.identifier$0() === "default"; - if (guarded) - _this.whitespace$0(); - else { - endPosition = t1._string_scanner$_position; - t4 = t1._sourceFile; - t5 = new A._FileSpan(t4, t3, endPosition); - t5._FileSpan$3(t4, t3, endPosition); - _this.error$2(0, "Invalid flag name.", t5); - } - } else - guarded = false; - endPosition = t1._string_scanner$_position; - t3 = t1._sourceFile; - span = new A._FileSpan(t3, t2, endPosition); - span._FileSpan$3(t3, t2, endPosition); - if (variableNames.contains$1(0, $name)) - _this.error$2(0, string$.The_sa, span); - variableNames.add$1(0, $name); - configuration.push(new A.ConfiguredVariable($name, expression, guarded, span)); - if (!t1.scanChar$1(44)) - break; - _this.whitespace$0(); - if (!_this._lookingAtExpression$0()) - break; - } - t1.expectChar$1(41); - return configuration; - }, - _stylesheet$_configuration$0() { - return this._stylesheet$_configuration$1$allowGuarded(false); - }, - _warnRule$1(start) { - var value = this._expression$0(); - this.expectStatementSeparator$1("@warn rule"); - return new A.WarnRule(value, this.scanner.spanFrom$1(start)); - }, - _whileRule$2(start, child) { - var _this = this, - wasInControlDirective = _this._inControlDirective; - _this._inControlDirective = true; - return _this._withChildren$3(child, start, new A.StylesheetParser__whileRule_closure(_this, wasInControlDirective, _this._expression$0())); - }, - unknownAtRule$2(start, $name) { - var t2, t3, rule, _this = this, t1 = {}, - wasInUnknownAtRule = _this._stylesheet$_inUnknownAtRule; - _this._stylesheet$_inUnknownAtRule = true; - t1.value = null; - t2 = _this.scanner; - t3 = t2.peekChar$0() !== 33 && !_this.atEndOfStatement$0() ? t1.value = _this._interpolatedDeclarationValue$1$allowOpenBrace(false) : null; - if (_this.lookingAtChildren$0()) - rule = _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_unknownAtRule_closure(t1, $name)); - else { - _this.expectStatementSeparator$0(); - rule = A.AtRule$($name, t2.spanFrom$1(start), null, t3); - } - _this._stylesheet$_inUnknownAtRule = wasInUnknownAtRule; - return rule; - }, - _disallowedAtRule$1(start) { - this._interpolatedDeclarationValue$2$allowEmpty$allowOpenBrace(true, false); - this.error$2(0, "This at-rule is not allowed here.", this.scanner.spanFrom$1(start)); - }, - _argumentDeclaration$0() { - var $arguments, named, restArgument, t3, $name, defaultValue, endPosition, t4, t5, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - t1.expectChar$1(40); - _this.whitespace$0(); - $arguments = A._setArrayType([], type$.JSArray_Argument); - named = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); - for (; restArgument = null, t1.peekChar$0() === 36;) { - t3 = t1._string_scanner$_position; - t1.expectChar$1(36); - $name = _this.identifier$1$normalize(true); - _this.whitespace$0(); - if (t1.scanChar$1(58)) { - _this.whitespace$0(); - defaultValue = _this.expressionUntilComma$0(); - } else { - if (t1.scanChar$1(46)) { - t1.expectChar$1(46); - t1.expectChar$1(46); - _this.whitespace$0(); - restArgument = $name; - break; - } - defaultValue = null; - } - endPosition = t1._string_scanner$_position; - t4 = t1._sourceFile; - t5 = new A._FileSpan(t4, t3, endPosition); - t5._FileSpan$3(t4, t3, endPosition); - $arguments.push(new A.Argument($name, defaultValue, t5)); - if (!named.add$1(0, $name)) - _this.error$2(0, "Duplicate argument.", B.JSArray_methods.get$last($arguments).span); - if (!t1.scanChar$1(44)) - break; - _this.whitespace$0(); - } - t1.expectChar$1(41); - t1 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); - return new A.ArgumentDeclaration(A.List_List$unmodifiable($arguments, type$.Argument), restArgument, t1); - }, - _argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, mixin) { - var positional, t3, t4, named, t5, rest, keywordRest, expression, t6, t7, result, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - t1.expectChar$1(40); - _this.whitespace$0(); - positional = A._setArrayType([], type$.JSArray_Expression); - t3 = type$.String; - t4 = type$.Expression; - named = A.LinkedHashMap_LinkedHashMap$_empty(t3, t4); - for (t5 = !mixin, rest = null; keywordRest = null, _this._lookingAtExpression$0();) { - expression = _this.expressionUntilComma$1$singleEquals(t5); - _this.whitespace$0(); - if (expression instanceof A.VariableExpression && t1.scanChar$1(58)) { - _this.whitespace$0(); - t6 = expression.name; - if (named.containsKey$1(t6)) - _this.error$2(0, "Duplicate argument.", expression.span); - named.$indexSet(0, t6, _this.expressionUntilComma$1$singleEquals(t5)); - } else if (t1.scanChar$1(46)) { - t1.expectChar$1(46); - t1.expectChar$1(46); - if (rest != null) { - _this.whitespace$0(); - keywordRest = expression; - break; - } - rest = expression; - } else if (named.__js_helper$_length !== 0) - _this.error$2(0, string$.Positi, expression.get$span(expression)); - else - positional.push(expression); - _this.whitespace$0(); - if (!t1.scanChar$1(44)) - break; - _this.whitespace$0(); - if (allowEmptySecondArg && positional.length === 1 && named.__js_helper$_length === 0 && rest == null && t1.peekChar$0() === 41) { - t5 = t1._sourceFile; - t6 = t1._string_scanner$_position; - new A.FileLocation(t5, t6).FileLocation$_$2(t5, t6); - t7 = new A._FileSpan(t5, t6, t6); - t7._FileSpan$3(t5, t6, t6); - result = A.List_List$from([""], false, type$.Object); - result.fixed$length = Array; - result.immutable$list = Array; - positional.push(new A.StringExpression(new A.Interpolation(result, B.List_null, t7), false)); - break; - } - } - t1.expectChar$1(41); - t1 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); - return new A.ArgumentInvocation(A.List_List$unmodifiable(positional, t4), A.ConstantMap_ConstantMap$from(named, t3, t4), rest, keywordRest, t1); - }, - _argumentInvocation$0() { - return this._argumentInvocation$2$allowEmptySecondArg$mixin(false, false); - }, - _argumentInvocation$1$allowEmptySecondArg(allowEmptySecondArg) { - return this._argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, false); - }, - _argumentInvocation$1$mixin(mixin) { - return this._argumentInvocation$2$allowEmptySecondArg$mixin(false, mixin); - }, - _expression$3$bracketList$singleEquals$until(bracketList, singleEquals, until) { - var t2, beforeBracket, start, wasInExpression, wasInParentheses, resetState, resolveOneOperation, resolveOperations, addSingleExpression, addOperator, resolveSpaceExpressions, t3, _3_0, _1_0, t4, _3_28, _2_0, _3_32, _3_40, commaExpressions, spaceExpressions, singleExpression, _this = this, - _s20_ = "Expected expression.", - _box_0 = {}, - t1 = until != null; - if (t1 && until.call$0()) - _this.scanner.error$1(0, _s20_); - if (bracketList) { - t2 = _this.scanner; - beforeBracket = new A._SpanScannerState(t2, t2._string_scanner$_position); - t2.expectChar$1(91); - _this.whitespace$0(); - if (t2.scanChar$1(93)) { - t1 = A._setArrayType([], type$.JSArray_Expression); - t2 = t2.spanFrom$1(beforeBracket); - return new A.ListExpression(A.List_List$unmodifiable(t1, type$.Expression), B.ListSeparator_undecided_null_undecided, true, t2); - } - } else - beforeBracket = null; - t2 = _this.scanner; - start = new A._SpanScannerState(t2, t2._string_scanner$_position); - wasInExpression = _this._inExpression; - wasInParentheses = _this._inParentheses; - _this._inExpression = true; - _box_0.operands_ = _box_0.operators_ = _box_0.spaceExpressions_ = _box_0.commaExpressions_ = null; - _box_0.allowSlash = true; - _box_0.singleExpression_ = _this._singleExpression$0(); - resetState = new A.StylesheetParser__expression_resetState(_box_0, _this, start); - resolveOneOperation = new A.StylesheetParser__expression_resolveOneOperation(_box_0, _this); - resolveOperations = new A.StylesheetParser__expression_resolveOperations(_box_0, resolveOneOperation); - addSingleExpression = new A.StylesheetParser__expression_addSingleExpression(_box_0, _this, resetState, resolveOperations); - addOperator = new A.StylesheetParser__expression_addOperator(_box_0, _this, resolveOneOperation); - resolveSpaceExpressions = new A.StylesheetParser__expression_resolveSpaceExpressions(_box_0, _this, resolveOperations); - for (t3 = type$.JSArray_Expression; true;) { - _this.whitespace$0(); - if (t1 && until.call$0()) - break; - _3_0 = t2.peekChar$0(); - if (_3_0 == null) - break; - if (40 === _3_0) { - addSingleExpression.call$1(_this.parentheses$0()); - continue; - } - if (91 === _3_0) { - addSingleExpression.call$1(_this._expression$1$bracketList(true)); - continue; - } - if (36 === _3_0) { - addSingleExpression.call$1(_this._variable$0()); - continue; - } - if (38 === _3_0) { - addSingleExpression.call$1(_this._selector$0()); - continue; - } - if (39 === _3_0 || 34 === _3_0) { - addSingleExpression.call$1(_this.interpolatedString$0()); - continue; - } - if (35 === _3_0) { - addSingleExpression.call$1(_this._hashExpression$0()); - continue; - } - if (61 === _3_0) { - t2.readChar$0(); - if (singleEquals && t2.peekChar$0() !== 61) - addOperator.call$1(B.BinaryOperator_wdM); - else { - t2.expectChar$1(61); - addOperator.call$1(B.BinaryOperator_g8k); - } - continue; - } - if (33 === _3_0) { - $label0$1: { - _1_0 = t2.peekChar$1(1); - if (61 === _1_0) { - t2.readChar$0(); - t2.readChar$0(); - addOperator.call$1(B.BinaryOperator_icU); - break $label0$1; - } - t4 = true; - if (_1_0 != null) - if (105 !== _1_0) - if (73 !== _1_0) - t4 = _1_0 === 32 || _1_0 === 9 || _1_0 === 10 || _1_0 === 13 || _1_0 === 12; - if (t4) { - addSingleExpression.call$1(_this._importantExpression$0()); - break $label0$1; - } - break; - } - continue; - } - if (60 === _3_0) { - t2.readChar$0(); - addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_SPQ : B.BinaryOperator_miq); - continue; - } - if (62 === _3_0) { - t2.readChar$0(); - addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_oEm : B.BinaryOperator_bEa); - continue; - } - if (42 === _3_0) { - t2.readChar$0(); - addOperator.call$1(B.BinaryOperator_2No); - continue; - } - _3_28 = 43 === _3_0; - if (_3_28 && _box_0.singleExpression_ == null) { - addSingleExpression.call$1(_this._unaryOperation$0()); - continue; - } - if (_3_28) { - t2.readChar$0(); - addOperator.call$1(B.BinaryOperator_u15); - continue; - } - if (45 === _3_0) { - _2_0 = t2.peekChar$1(1); - if (A._isInt(_2_0) && _2_0 >= 48 && _2_0 <= 57 || 46 === _2_0) - if (_box_0.singleExpression_ != null) { - t4 = t2.peekChar$1(-1); - t4 = t4 === 32 || t4 === 9 || t4 === 10 || t4 === 13 || t4 === 12; - } else - t4 = true; - else - t4 = false; - if (t4) - addSingleExpression.call$1(_this._number$0()); - else if (_this._lookingAtInterpolatedIdentifier$0()) - addSingleExpression.call$1(_this.identifierLike$0()); - else if (_box_0.singleExpression_ == null) - addSingleExpression.call$1(_this._unaryOperation$0()); - else { - t2.readChar$0(); - addOperator.call$1(B.BinaryOperator_SjO); - } - continue; - } - _3_32 = 47 === _3_0; - if (_3_32 && _box_0.singleExpression_ == null) { - addSingleExpression.call$1(_this._unaryOperation$0()); - continue; - } - if (_3_32) { - t2.readChar$0(); - addOperator.call$1(B.BinaryOperator_U77); - continue; - } - if (37 === _3_0) { - t2.readChar$0(); - addOperator.call$1(B.BinaryOperator_KNx); - continue; - } - if (_3_0 >= 48 && _3_0 <= 57) { - addSingleExpression.call$1(_this._number$0()); - continue; - } - _3_40 = 46 === _3_0; - if (_3_40 && t2.peekChar$1(1) === 46) - break; - if (_3_40) { - addSingleExpression.call$1(_this._number$0()); - continue; - } - if (97 === _3_0 && !_this.get$plainCss() && _this.scanIdentifier$1("and")) { - addOperator.call$1(B.BinaryOperator_eDt); - continue; - } - if (111 === _3_0 && !_this.get$plainCss() && _this.scanIdentifier$1("or")) { - addOperator.call$1(B.BinaryOperator_qNM); - continue; - } - if ((117 === _3_0 || 85 === _3_0) && t2.peekChar$1(1) === 43) { - addSingleExpression.call$1(_this._unicodeRange$0()); - continue; - } - if (!(_3_0 >= 97 && _3_0 <= 122)) - t4 = _3_0 >= 65 && _3_0 <= 90 || 95 === _3_0 || 92 === _3_0 || _3_0 >= 128; - else - t4 = true; - if (t4) { - addSingleExpression.call$1(_this.identifierLike$0()); - continue; - } - if (44 === _3_0) { - if (_this._inParentheses) { - _this._inParentheses = false; - if (_box_0.allowSlash) { - resetState.call$0(); - continue; - } - } - commaExpressions = _box_0.commaExpressions_; - if (commaExpressions == null) - commaExpressions = _box_0.commaExpressions_ = A._setArrayType([], t3); - if (_box_0.singleExpression_ == null) - t2.error$1(0, _s20_); - resolveSpaceExpressions.call$0(); - t4 = _box_0.singleExpression_; - t4.toString; - commaExpressions.push(t4); - t2.readChar$0(); - _box_0.allowSlash = true; - _box_0.singleExpression_ = null; - continue; - } - break; - } - if (bracketList) - t2.expectChar$1(93); - commaExpressions = _box_0.commaExpressions_; - spaceExpressions = _box_0.spaceExpressions_; - if (commaExpressions != null) { - resolveSpaceExpressions.call$0(); - _this._inParentheses = wasInParentheses; - singleExpression = _box_0.singleExpression_; - if (singleExpression != null) - commaExpressions.push(singleExpression); - _this._inExpression = wasInExpression; - t1 = t2.spanFrom$1(beforeBracket == null ? start : beforeBracket); - return new A.ListExpression(A.List_List$unmodifiable(commaExpressions, type$.Expression), B.ListSeparator_ECn, bracketList, t1); - } else if (bracketList && spaceExpressions != null) { - resolveOperations.call$0(); - _this._inExpression = wasInExpression; - t1 = _box_0.singleExpression_; - t1.toString; - spaceExpressions.push(t1); - beforeBracket.toString; - t2 = t2.spanFrom$1(beforeBracket); - return new A.ListExpression(A.List_List$unmodifiable(spaceExpressions, type$.Expression), B.ListSeparator_nbm, true, t2); - } else { - resolveSpaceExpressions.call$0(); - if (bracketList) { - t1 = _box_0.singleExpression_; - t1.toString; - t3 = A._setArrayType([t1], t3); - beforeBracket.toString; - t2 = t2.spanFrom$1(beforeBracket); - _box_0.singleExpression_ = new A.ListExpression(A.List_List$unmodifiable(t3, type$.Expression), B.ListSeparator_undecided_null_undecided, true, t2); - } - _this._inExpression = wasInExpression; - t1 = _box_0.singleExpression_; - t1.toString; - return t1; - } - }, - _expression$0() { - return this._expression$3$bracketList$singleEquals$until(false, false, null); - }, - _expression$2$singleEquals$until(singleEquals, until) { - return this._expression$3$bracketList$singleEquals$until(false, singleEquals, until); - }, - _expression$1$bracketList(bracketList) { - return this._expression$3$bracketList$singleEquals$until(bracketList, false, null); - }, - _expression$1$until(until) { - return this._expression$3$bracketList$singleEquals$until(false, false, until); - }, - expressionUntilComma$1$singleEquals(singleEquals) { - return this._expression$2$singleEquals$until(singleEquals, new A.StylesheetParser_expressionUntilComma_closure(this)); - }, - expressionUntilComma$0() { - return this.expressionUntilComma$1$singleEquals(false); - }, - _isSlashOperand$1(expression) { - var t1 = true; - if (!(expression instanceof A.NumberExpression)) - if (!(expression instanceof A.FunctionExpression)) - t1 = expression instanceof A.BinaryOperationExpression && expression.allowsSlash; - return t1; - }, - _singleExpression$0() { - var next, t2, _this = this, - _s20_ = "Expected expression.", - t1 = _this.scanner, - _0_0 = t1.peekChar$0(); - $label0$0: { - if (_0_0 == null) - t1.error$1(0, _s20_); - if (40 === _0_0) { - t1 = _this.parentheses$0(); - break $label0$0; - } - if (47 === _0_0) { - t1 = _this._unaryOperation$0(); - break $label0$0; - } - if (46 === _0_0) { - t1 = _this._number$0(); - break $label0$0; - } - if (91 === _0_0) { - t1 = _this._expression$1$bracketList(true); - break $label0$0; - } - if (36 === _0_0) { - t1 = _this._variable$0(); - break $label0$0; - } - if (38 === _0_0) { - t1 = _this._selector$0(); - break $label0$0; - } - if (39 === _0_0 || 34 === _0_0) { - t1 = _this.interpolatedString$0(); - break $label0$0; - } - if (35 === _0_0) { - t1 = _this._hashExpression$0(); - break $label0$0; - } - if (43 === _0_0) { - next = t1.peekChar$1(1); - t1 = next != null && next >= 48 && next <= 57 || next === 46 ? _this._number$0() : _this._unaryOperation$0(); - break $label0$0; - } - if (45 === _0_0) { - t1 = _this._minusExpression$0(); - break $label0$0; - } - if (33 === _0_0) { - t1 = _this._importantExpression$0(); - break $label0$0; - } - if ((117 === _0_0 || 85 === _0_0) && t1.peekChar$1(1) === 43) { - t1 = _this._unicodeRange$0(); - break $label0$0; - } - if (_0_0 >= 48 && _0_0 <= 57) { - t1 = _this._number$0(); - break $label0$0; - } - if (!(_0_0 >= 97 && _0_0 <= 122)) - t2 = _0_0 >= 65 && _0_0 <= 90 || 95 === _0_0 || 92 === _0_0 || _0_0 >= 128; - else - t2 = true; - if (t2) { - t1 = _this.identifierLike$0(); - break $label0$0; - } - t1 = t1.error$1(0, _s20_); - } - return t1; - }, - parentheses$0() { - var start, first, expressions, t1, t2, _this = this, - wasInParentheses = _this._inParentheses; - _this._inParentheses = true; - try { - t1 = _this.scanner; - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$1(40); - _this.whitespace$0(); - if (!_this._lookingAtExpression$0()) { - t1.expectChar$1(41); - t2 = A._setArrayType([], type$.JSArray_Expression); - t1 = t1.spanFrom$1(start); - t2 = A.List_List$unmodifiable(t2, type$.Expression); - return new A.ListExpression(t2, B.ListSeparator_undecided_null_undecided, false, t1); - } - first = _this.expressionUntilComma$0(); - if (t1.scanChar$1(58)) { - _this.whitespace$0(); - t1 = _this._stylesheet$_map$2(first, start); - return t1; - } - if (!t1.scanChar$1(44)) { - t1.expectChar$1(41); - t1 = t1.spanFrom$1(start); - return new A.ParenthesizedExpression(first, t1); - } - _this.whitespace$0(); - expressions = A._setArrayType([first], type$.JSArray_Expression); - for (; true;) { - if (!_this._lookingAtExpression$0()) - break; - J.add$1$ax(expressions, _this.expressionUntilComma$0()); - if (!t1.scanChar$1(44)) - break; - _this.whitespace$0(); - } - t1.expectChar$1(41); - t1 = t1.spanFrom$1(start); - t2 = A.List_List$unmodifiable(expressions, type$.Expression); - return new A.ListExpression(t2, B.ListSeparator_ECn, false, t1); - } finally { - _this._inParentheses = wasInParentheses; - } - }, - _stylesheet$_map$2(first, start) { - var t1, key, _this = this, - pairs = A._setArrayType([new A._Record_2(first, _this.expressionUntilComma$0())], type$.JSArray_Record_2_Expression_and_Expression); - for (t1 = _this.scanner; t1.scanChar$1(44);) { - _this.whitespace$0(); - if (!_this._lookingAtExpression$0()) - break; - key = _this.expressionUntilComma$0(); - t1.expectChar$1(58); - _this.whitespace$0(); - pairs.push(new A._Record_2(key, _this.expressionUntilComma$0())); - } - t1.expectChar$1(41); - t1 = t1.spanFrom$1(start); - return new A.MapExpression(A.List_List$unmodifiable(pairs, type$.Record_2_Expression_and_Expression), t1); - }, - _hashExpression$0() { - var start, t2, identifier, buffer, t3, _this = this, - t1 = _this.scanner; - if (t1.peekChar$1(1) === 123) - return _this.identifierLike$0(); - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$1(35); - t2 = t1.peekChar$0(); - if (t2 == null) - t2 = null; - else - t2 = t2 >= 48 && t2 <= 57; - if (t2 === true) - return new A.ColorExpression(_this._hexColorContents$1(start), t1.spanFrom$1(start)); - t2 = t1._string_scanner$_position; - identifier = _this.interpolatedIdentifier$0(); - if (_this._isHexColor$1(identifier)) { - t1.set$state(new A._SpanScannerState(t1, t2)); - return new A.ColorExpression(_this._hexColorContents$1(start), t1.spanFrom$1(start)); - } - t2 = new A.StringBuffer(""); - buffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t3 = A.Primitives_stringFromCharCode(35); - t2._contents += t3; - buffer.addInterpolation$1(identifier); - return new A.StringExpression(buffer.interpolation$1(t1.spanFrom$1(start)), false); - }, - _hexColorContents$1(start) { - var red, green, blue, alpha, digit4, t2, t3, t4, _this = this, - digit1 = _this._hexDigit$0(), - digit2 = _this._hexDigit$0(), - digit3 = _this._hexDigit$0(), - t1 = _this.scanner, - $self = t1.peekChar$0(); - if (!($self != null && A.CharacterExtension_get_isHex($self))) { - red = (digit1 << 4 >>> 0) + digit1; - green = (digit2 << 4 >>> 0) + digit2; - blue = (digit3 << 4 >>> 0) + digit3; - alpha = null; - } else { - digit4 = _this._hexDigit$0(); - $self = t1.peekChar$0(); - t2 = $self != null && A.CharacterExtension_get_isHex($self); - t3 = digit1 << 4 >>> 0; - t4 = digit3 << 4 >>> 0; - if (!t2) { - red = t3 + digit1; - green = (digit2 << 4 >>> 0) + digit2; - blue = t4 + digit3; - alpha = ((digit4 << 4 >>> 0) + digit4) / 255; - } else { - red = t3 + digit2; - green = t4 + digit4; - blue = (_this._hexDigit$0() << 4 >>> 0) + _this._hexDigit$0(); - $self = t1.peekChar$0(); - alpha = $self != null && A.CharacterExtension_get_isHex($self) ? ((_this._hexDigit$0() << 4 >>> 0) + _this._hexDigit$0()) / 255 : null; - } - } - t2 = alpha == null; - t3 = t2 ? 1 : alpha; - return A.SassColor_SassColor$rgbInternal(red, green, blue, t3, t2 ? new A.SpanColorFormat(t1.spanFrom$1(start)) : null); - }, - _isHexColor$1(interpolation) { - var _0_2, t1, - plain = interpolation.get$asPlain(); - if (typeof plain == "string") { - _0_2 = plain.length; - t1 = true; - if (3 !== _0_2) - if (4 !== _0_2) - if (6 !== _0_2) - t1 = 8 === _0_2; - } else - t1 = false; - if (t1) { - t1 = new A.CodeUnits(plain); - return t1.every$1(t1, new A.StylesheetParser__isHexColor_closure()); - } else - return false; - }, - _hexDigit$0() { - var t1 = this.scanner, - t2 = t1.peekChar$0(); - t2 = t2 == null ? null : A.CharacterExtension_get_isHex(t2); - return t2 === true ? A.asHex(t1.readChar$0()) : t1.error$1(0, "Expected hex digit."); - }, - _minusExpression$0() { - var _this = this, - _0_0 = _this.scanner.peekChar$1(1); - if (A._isInt(_0_0) && _0_0 >= 48 && _0_0 <= 57 || 46 === _0_0) - return _this._number$0(); - if (_this._lookingAtInterpolatedIdentifier$0()) - return _this.identifierLike$0(); - return _this._unaryOperation$0(); - }, - _importantExpression$0() { - var t1 = this.scanner, - t2 = t1._string_scanner$_position; - t1.readChar$0(); - this.whitespace$0(); - this.expectIdentifier$1("important"); - t2 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); - return new A.StringExpression(new A.Interpolation(A.List_List$unmodifiable(["!important"], type$.Object), B.List_null, t2), false); - }, - _unaryOperation$0() { - var _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - operator = _this._unaryOperatorFor$1(t1.readChar$0()); - if (operator == null) - t1.error$2$position(0, "Expected unary operator.", t1._string_scanner$_position - 1); - else if (_this.get$plainCss() && operator !== B.UnaryOperator_SJr) - t1.error$3$length$position(0, "Operators aren't allowed in plain CSS.", 1, t1._string_scanner$_position - 1); - _this.whitespace$0(); - return new A.UnaryOperationExpression(operator, _this._singleExpression$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _unaryOperatorFor$1(character) { - var t1; - $label0$0: { - if (43 === character) { - t1 = B.UnaryOperator_cLp; - break $label0$0; - } - if (45 === character) { - t1 = B.UnaryOperator_AiQ; - break $label0$0; - } - if (47 === character) { - t1 = B.UnaryOperator_SJr; - break $label0$0; - } - t1 = null; - break $label0$0; - } - return t1; - }, - _number$0() { - var number, unit, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - first = t1.peekChar$0(), - t3 = first !== 43; - if (!t3 || first === 45) - t1.readChar$0(); - if (t1.peekChar$0() !== 46) - _this._consumeNaturalNumber$0(); - _this._tryDecimal$1$allowTrailingDot(t1._string_scanner$_position !== t2 && t3 && first !== 45); - _this._tryExponent$0(); - number = A.double_parse(t1.substring$1(0, t2)); - if (t1.scanChar$1(37)) - unit = "%"; - else { - if (_this.lookingAtIdentifier$0()) - t3 = t1.peekChar$0() !== 45 || t1.peekChar$1(1) !== 45; - else - t3 = false; - unit = t3 ? _this.identifier$1$unit(true) : null; - } - return new A.NumberExpression(number, unit, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _consumeNaturalNumber$0() { - var $self, - t1 = this.scanner, - t2 = t1.readChar$0(); - if (!(t2 >= 48 && t2 <= 57)) - t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position - 1); - while (true) { - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - break; - t1.readChar$0(); - } - }, - _tryDecimal$1$allowTrailingDot(allowTrailingDot) { - var $self, - t1 = this.scanner; - if (t1.peekChar$0() !== 46) - return; - $self = t1.peekChar$1(1); - if (!($self != null && $self >= 48 && $self <= 57)) { - if (allowTrailingDot) - return; - t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position + 1); - } - t1.readChar$0(); - while (true) { - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - break; - t1.readChar$0(); - } - }, - _tryExponent$0() { - var next, $self, - t1 = this.scanner, - first = t1.peekChar$0(); - if (first !== 101 && first !== 69) - return; - next = t1.peekChar$1(1); - if (!(next != null && next >= 48 && next <= 57) && next !== 45 && next !== 43) - return; - t1.readChar$0(); - if (43 === next || 45 === next) - t1.readChar$0(); - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - t1.error$1(0, "Expected digit."); - while (true) { - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - break; - t1.readChar$0(); - } - }, - _unicodeRange$0() { - var firstRangeLength, hasQuestionMark, t2, secondRangeLength, _this = this, - _s26_ = "Expected at most 6 digits.", - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - _this.expectIdentChar$1(117); - t1.expectChar$1(43); - for (firstRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure());) - ++firstRangeLength; - for (hasQuestionMark = false; t1.scanChar$1(63); hasQuestionMark = true) - ++firstRangeLength; - if (firstRangeLength === 0) - t1.error$1(0, 'Expected hex digit or "?".'); - else if (firstRangeLength > 6) - _this.error$2(0, _s26_, t1.spanFrom$1(start)); - else if (hasQuestionMark) { - t2 = t1.substring$1(0, start.position); - t1 = t1.spanFrom$1(start); - return new A.StringExpression(new A.Interpolation(A.List_List$unmodifiable([t2], type$.Object), B.List_null, t1), false); - } - if (t1.scanChar$1(45)) { - t2 = t1._string_scanner$_position; - for (secondRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure0());) - ++secondRangeLength; - if (secondRangeLength === 0) - t1.error$1(0, "Expected hex digit."); - else if (secondRangeLength > 6) - _this.error$2(0, _s26_, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - } - if (_this._lookingAtInterpolatedIdentifierBody$0()) - t1.error$1(0, "Expected end of identifier."); - t2 = t1.substring$1(0, start.position); - t1 = t1.spanFrom$1(start); - return new A.StringExpression(new A.Interpolation(A.List_List$unmodifiable([t2], type$.Object), B.List_null, t1), false); - }, - _variable$0() { - var _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - $name = _this.variableName$0(); - if (_this.get$plainCss()) - _this.error$2(0, string$.Sassx20v, t1.spanFrom$1(start)); - return new A.VariableExpression(null, $name, t1.spanFrom$1(start)); - }, - _selector$0() { - var t1, start, _this = this; - if (_this.get$plainCss()) - _this.scanner.error$2$length(0, string$.The_pa, 1); - t1 = _this.scanner; - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$1(38); - if (t1.scanChar$1(38)) { - _this.warnings.push(new A._Record_3_deprecation_message_span(null, string$.In_Sas, t1.spanFrom$1(start))); - t1.set$position(t1._string_scanner$_position - 1); - } - return new A.SelectorExpression(t1.spanFrom$1(start)); - }, - interpolatedString$0() { - var t3, t4, t5, buffer, _1_0, second, t6, _0_0, - t1 = this.scanner, - t2 = t1._string_scanner$_position, - quote = t1.readChar$0(); - if (quote !== 39 && quote !== 34) - t1.error$2$position(0, "Expected string.", t2); - t3 = new A.StringBuffer(""); - t4 = A._setArrayType([], type$.JSArray_Object); - t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); - buffer = new A.InterpolationBuffer(t3, t4, t5); - for (; true;) { - _1_0 = t1.peekChar$0(); - if (_1_0 === quote) { - t1.readChar$0(); - break; - } - if (_1_0 == null || _1_0 === 10 || _1_0 === 13 || _1_0 === 12) - t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); - if (92 === _1_0) { - second = t1.peekChar$1(1); - if (second === 10 || second === 13 || second === 12) { - t1.readChar$0(); - t1.readChar$0(); - if (second === 13) - t1.scanChar$1(10); - } else { - t6 = A.Primitives_stringFromCharCode(A.consumeEscapedCharacter(t1)); - t3._contents += t6; - } - continue; - } - if (35 === _1_0 && t1.peekChar$1(1) === 123) { - _0_0 = this.singleInterpolation$0(); - buffer._flushText$0(); - t4.push(_0_0._0); - t5.push(_0_0._1); - continue; - } - t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t6; - } - return new A.StringExpression(buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))), true); - }, - identifierLike$0() { - var invocation, expression, _0_0, t3, t4, t5, _1_0, _2_0, _2_2, _2_4, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - identifier = _this.interpolatedIdentifier$0(), - plain = identifier.get$asPlain(), - lower = A._Cell$(), - t2 = plain != null; - if (t2) { - if (plain === "if" && t1.peekChar$0() === 40) { - invocation = _this._argumentInvocation$0(); - return new A.IfExpression(invocation, identifier.span.expand$1(0, invocation.span)); - } else if (plain === "not") { - _this.whitespace$0(); - expression = _this._singleExpression$0(); - return new A.UnaryOperationExpression(B.UnaryOperator_not_not_not, expression, identifier.span.expand$1(0, expression.get$span(expression))); - } - lower.__late_helper$_value = plain.toLowerCase(); - if (t1.peekChar$0() !== 40) { - switch (plain) { - case "false": - return new A.BooleanExpression(false, identifier.span); - case "null": - return new A.NullExpression(identifier.span); - case "true": - return new A.BooleanExpression(true, identifier.span); - } - _0_0 = $.$get$colorsByName().$index(0, lower._readLocal$0()); - if (_0_0 != null) { - t1 = B.JSNumber_methods.round$0(_0_0._legacyChannel$2(B.RgbColorSpace_mlz, "red")); - t2 = B.JSNumber_methods.round$0(_0_0._legacyChannel$2(B.RgbColorSpace_mlz, "green")); - t3 = B.JSNumber_methods.round$0(_0_0._legacyChannel$2(B.RgbColorSpace_mlz, "blue")); - t4 = _0_0.alphaOrNull; - if (t4 == null) - t4 = 0; - t5 = identifier.span; - return new A.ColorExpression(A.SassColor_SassColor$rgbInternal(t1, t2, t3, t4, new A.SpanColorFormat(t5)), t5); - } - } - _1_0 = _this.trySpecialFunction$2(lower._readLocal$0(), start); - if (_1_0 != null) - return _1_0; - } - _2_0 = t1.peekChar$0(); - _2_2 = 46 === _2_0; - if (_2_2 && t1.peekChar$1(1) === 46) - return new A.StringExpression(identifier, false); - if (_2_2) { - t1.readChar$0(); - if (t2) - return _this.namespacedExpression$2(plain, start); - _this.error$2(0, string$.Interpn, identifier.span); - } - _2_4 = 40 === _2_0; - if (_2_4 && t2) { - t2 = _this._argumentInvocation$1$allowEmptySecondArg(J.$eq$(lower._readLocal$0(), "var")); - t1 = t1.spanFrom$1(start); - return new A.FunctionExpression(null, A.stringReplaceAllUnchecked(plain, "_", "-"), plain, t2, t1); - } - if (_2_4) - return new A.InterpolatedFunctionExpression(identifier, _this._argumentInvocation$0(), t1.spanFrom$1(start)); - return new A.StringExpression(identifier, false); - }, - namespacedExpression$2(namespace, start) { - var $name, t2, t3, _this = this, - t1 = _this.scanner; - if (t1.peekChar$0() === 36) { - $name = _this.variableName$0(); - _this._assertPublic$2($name, new A.StylesheetParser_namespacedExpression_closure(_this, start)); - return new A.VariableExpression(namespace, $name, t1.spanFrom$1(start)); - } - t2 = _this._publicIdentifier$0(); - t3 = _this._argumentInvocation$0(); - t1 = t1.spanFrom$1(start); - return new A.FunctionExpression(namespace, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, t3, t1); - }, - trySpecialFunction$2($name, start) { - var t1, buffer, t2, next, t3, _this = this, - normalized = A.unvendor($name); - $label0$0: { - if (!("calc" === normalized && normalized !== $name && _this.scanner.scanChar$1(40))) - t1 = ("element" === normalized || "expression" === normalized) && _this.scanner.scanChar$1(40); - else - t1 = true; - if (t1) { - t1 = new A.StringBuffer(""); - buffer = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t1._contents = "" + $name; - t2 = A.Primitives_stringFromCharCode(40); - t1._contents += t2; - break $label0$0; - } - if ("progid" === normalized && _this.scanner.scanChar$1(58)) { - t1 = new A.StringBuffer(""); - buffer = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t1._contents = "" + $name; - t2 = A.Primitives_stringFromCharCode(58); - t1._contents += t2; - t2 = _this.scanner; - next = t2.peekChar$0(); - while (true) { - if (next != null) { - if (!(next >= 97 && next <= 122)) - t3 = next >= 65 && next <= 90; - else - t3 = true; - t3 = t3 || next === 46; - } else - t3 = false; - if (!t3) - break; - t3 = A.Primitives_stringFromCharCode(t2.readChar$0()); - t1._contents += t3; - next = t2.peekChar$0(); - } - t2.expectChar$1(40); - t2 = A.Primitives_stringFromCharCode(40); - t1._contents += t2; - break $label0$0; - } - if ("url" === normalized) - return A.NullableExtension_andThen(_this._tryUrlContents$1(start), new A.StylesheetParser_trySpecialFunction_closure()); - return null; - } - buffer.addInterpolation$1(_this._interpolatedDeclarationValue$1$allowEmpty(true)); - t1 = _this.scanner; - t1.expectChar$1(41); - t2 = buffer._interpolation_buffer$_text; - t3 = A.Primitives_stringFromCharCode(41); - t2._contents += t3; - return new A.StringExpression(buffer.interpolation$1(t1.spanFrom$1(start)), false); - }, - _tryUrlContents$2$name(start, $name) { - var t3, t4, t5, buffer, t6, _1_0, _1_6, _0_0, endPosition, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - if (!t1.scanChar$1(40)) - return null; - _this.whitespaceWithoutComments$0(); - t3 = new A.StringBuffer(""); - t4 = A._setArrayType([], type$.JSArray_Object); - t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); - buffer = new A.InterpolationBuffer(t3, t4, t5); - t3._contents = "" + ($name == null ? "url" : $name); - t6 = A.Primitives_stringFromCharCode(40); - t3._contents += t6; - for (; true;) { - _1_0 = t1.peekChar$0(); - if (_1_0 == null) - break; - if (92 === _1_0) { - t6 = _this.escape$0(); - t3._contents += t6; - continue; - } - _1_6 = 35 === _1_0; - if (_1_6 && t1.peekChar$1(1) === 123) { - _0_0 = _this.singleInterpolation$0(); - buffer._flushText$0(); - t4.push(_0_0._0); - t5.push(_0_0._1); - continue; - } - t6 = true; - if (33 !== _1_0) - if (37 !== _1_0) - if (38 !== _1_0) - if (!_1_6) - t6 = _1_0 >= 42 && _1_0 <= 126 || _1_0 >= 128; - if (t6) { - t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t6; - continue; - } - if (_1_0 === 32 || _1_0 === 9 || _1_0 === 10 || _1_0 === 13 || _1_0 === 12) { - _this.whitespaceWithoutComments$0(); - if (t1.peekChar$0() !== 41) - break; - continue; - } - if (41 === _1_0) { - t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t2; - endPosition = t1._string_scanner$_position; - t2 = t1._sourceFile; - t3 = start.position; - t1 = new A._FileSpan(t2, t3, endPosition); - t1._FileSpan$3(t2, t3, endPosition); - return buffer.interpolation$1(t1); - } - break; - } - t1.set$state(new A._SpanScannerState(t1, t2)); - return null; - }, - _tryUrlContents$1(start) { - return this._tryUrlContents$2$name(start, null); - }, - dynamicUrl$0() { - var _0_0, t2, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - _this.expectIdentifier$1("url"); - _0_0 = _this._tryUrlContents$1(start); - if (_0_0 != null) - return new A.StringExpression(_0_0, false); - t2 = t1.spanFrom$1(start); - return new A.InterpolatedFunctionExpression(new A.Interpolation(A.List_List$unmodifiable(["url"], type$.Object), B.List_null, t2), _this._argumentInvocation$0(), t1.spanFrom$1(start)); - }, - almostAnyValue$1$omitComments(omitComments) { - var t4, t5, t6, _2_0, t7, _0_0, _0_2, start, end, _0_4, identifier, _1_0, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - t3 = new A.StringBuffer(""), - buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - for (t4 = t1.string, t5 = t4.length, t6 = !omitComments; true;) - $label0$0: { - _2_0 = t1.peekChar$0(); - if (92 === _2_0) { - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t7; - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t7; - break $label0$0; - } - if (34 === _2_0 || 39 === _2_0) { - buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); - break $label0$0; - } - if (47 === _2_0) { - $label1$1: { - _0_0 = t1.peekChar$1(1); - _0_2 = 42 === _0_0; - if (_0_2 && t6) { - t7 = _this.get$loudComment(); - start = t1._string_scanner$_position; - t7.call$0(); - end = t1._string_scanner$_position; - t3._contents += B.JSString_methods.substring$2(t4, start, end); - break $label1$1; - } - if (_0_2) { - _this.loudComment$0(); - break $label1$1; - } - _0_4 = 47 === _0_0; - if (_0_4 && t6) { - t7 = _this.get$silentComment(); - start = t1._string_scanner$_position; - t7.call$0(); - end = t1._string_scanner$_position; - t3._contents += B.JSString_methods.substring$2(t4, start, end); - break $label1$1; - } - if (_0_4) { - _this.silentComment$0(); - break $label1$1; - } - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t7; - } - break $label0$0; - } - if (35 === _2_0 && t1.peekChar$1(1) === 123) { - buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); - break $label0$0; - } - if (13 === _2_0 || 10 === _2_0 || 12 === _2_0) { - if (_this.get$indented()) - break; - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t7; - break $label0$0; - } - if (33 === _2_0 || 59 === _2_0 || 123 === _2_0 || 125 === _2_0) - break; - if (117 === _2_0 || 85 === _2_0) { - t7 = t1._string_scanner$_position; - identifier = _this.identifier$0(); - if (identifier !== "url" && identifier !== "url-prefix") { - t3._contents += identifier; - continue; - } - _1_0 = _this._tryUrlContents$2$name(new A._SpanScannerState(t1, t7), identifier); - if (_1_0 != null) - buffer.addInterpolation$1(_1_0); - else { - if ((t7 === 0 ? 1 / t7 < 0 : t7 < 0) || t7 > t5) - A.throwExpression(A.ArgumentError$("Invalid position " + t7, null)); - t1._string_scanner$_position = t7; - t1._lastMatch = null; - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t7; - } - break $label0$0; - } - if (_2_0 == null) - break; - t7 = _this.lookingAtIdentifier$0(); - if (t7) { - t7 = _this.identifier$0(); - t3._contents += t7; - break $label0$0; - } - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t7; - } - return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - almostAnyValue$0() { - return this.almostAnyValue$1$omitComments(false); - }, - _interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(allowColon, allowEmpty, allowOpenBrace, allowSemicolon, silentComments) { - var t4, t5, t6, t7, t8, wroteNewline, _2_0, wroteNewline0, t9, _0_0, start, end, _2_14_isSet, _2_14, t10, _2_18_isSet, _2_20, _2_18, _2_20_isSet, _2_22, bracket, identifier, _1_0, _this = this, _null = null, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - t3 = new A.StringBuffer(""), - buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), - brackets = A._setArrayType([], type$.JSArray_int); - for (t4 = !allowOpenBrace, t5 = t1.string, t6 = t5.length, t7 = !allowColon, t8 = !allowSemicolon, wroteNewline = false; true;) - $label0$0: { - _2_0 = t1.peekChar$0(); - wroteNewline0 = false; - if (92 === _2_0) { - t9 = _this.escape$1$identifierStart(true); - t3._contents += t9; - wroteNewline = wroteNewline0; - break $label0$0; - } - if (34 === _2_0 || 39 === _2_0) { - buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); - wroteNewline = wroteNewline0; - break $label0$0; - } - if (47 === _2_0) { - $label1$1: { - _0_0 = t1.peekChar$1(1); - if (42 === _0_0) { - t9 = _this.get$loudComment(); - start = t1._string_scanner$_position; - t9.call$0(); - end = t1._string_scanner$_position; - t3._contents += B.JSString_methods.substring$2(t5, start, end); - break $label1$1; - } - if (47 === _0_0 && silentComments) { - _this.silentComment$0(); - break $label1$1; - } - t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t9; - } - wroteNewline = wroteNewline0; - break $label0$0; - } - if (35 === _2_0 && t1.peekChar$1(1) === 123) { - buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); - wroteNewline = wroteNewline0; - break $label0$0; - } - _2_14_isSet = 32 !== _2_0; - if (_2_14_isSet) { - _2_14 = 9 === _2_0; - t9 = _2_14; - } else { - _2_14 = _null; - t9 = true; - } - t10 = false; - if (t9) - if (!wroteNewline) { - t9 = t1.peekChar$1(1); - t9 = t9 === 32 || t9 === 9 || t9 === 10 || t9 === 13 || t9 === 12; - } else - t9 = t10; - else - t9 = t10; - if (t9) { - t1.readChar$0(); - break $label0$0; - } - if (_2_14_isSet) - t9 = _2_14; - else - t9 = true; - if (t9) { - t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t9; - break $label0$0; - } - _2_18_isSet = 10 !== _2_0; - _2_20 = _null; - t9 = true; - if (_2_18_isSet) { - _2_18 = 13 === _2_0; - _2_20_isSet = !_2_18; - if (_2_20_isSet) { - _2_20 = 12 === _2_0; - t9 = _2_20; - } - } else { - _2_18 = _null; - _2_20_isSet = false; - } - if (t9 && _this.get$indented()) - break; - t9 = true; - if (_2_18_isSet) - if (!_2_18) - t9 = _2_20_isSet ? _2_20 : 12 === _2_0; - if (t9) { - t9 = t1.peekChar$1(-1); - if (!(t9 === 10 || t9 === 13 || t9 === 12)) - t3._contents += "\n"; - t1.readChar$0(); - wroteNewline = true; - break $label0$0; - } - _2_22 = 123 === _2_0; - if (_2_22 && t4) - break; - if (40 !== _2_0) - t9 = _2_22 || 91 === _2_0; - else - t9 = true; - if (t9) { - bracket = t1.readChar$0(); - t9 = A.Primitives_stringFromCharCode(bracket); - t3._contents += t9; - brackets.push(A.opposite(bracket)); - wroteNewline = wroteNewline0; - break $label0$0; - } - if (41 === _2_0 || 125 === _2_0 || 93 === _2_0) { - if (brackets.length === 0) - break; - bracket = brackets.pop(); - t1.expectChar$1(bracket); - t9 = A.Primitives_stringFromCharCode(bracket); - t3._contents += t9; - wroteNewline = wroteNewline0; - break $label0$0; - } - if (59 === _2_0) { - if (t8 && brackets.length === 0) - break; - t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t9; - wroteNewline = wroteNewline0; - break $label0$0; - } - if (58 === _2_0) { - if (t7 && brackets.length === 0) - break; - t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t9; - wroteNewline = wroteNewline0; - break $label0$0; - } - if (117 === _2_0 || 85 === _2_0) { - t9 = t1._string_scanner$_position; - identifier = _this.identifier$0(); - if (identifier !== "url" && identifier !== "url-prefix") { - t3._contents += identifier; - wroteNewline = wroteNewline0; - continue; - } - _1_0 = _this._tryUrlContents$2$name(new A._SpanScannerState(t1, t9), identifier); - if (_1_0 != null) - buffer.addInterpolation$1(_1_0); - else { - if ((t9 === 0 ? 1 / t9 < 0 : t9 < 0) || t9 > t6) - A.throwExpression(A.ArgumentError$("Invalid position " + t9, _null)); - t1._string_scanner$_position = t9; - t1._lastMatch = null; - t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t9; - } - wroteNewline = wroteNewline0; - break $label0$0; - } - if (_2_0 == null) - break; - t9 = _this.lookingAtIdentifier$0(); - if (t9) { - t9 = _this.identifier$0(); - t3._contents += t9; - wroteNewline = wroteNewline0; - break $label0$0; - } - t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t9; - wroteNewline = wroteNewline0; - } - if (brackets.length !== 0) - t1.expectChar$1(B.JSArray_methods.get$last(brackets)); - if (!allowEmpty && buffer._interpolation_buffer$_contents.length === 0 && t3._contents.length === 0) - t1.error$1(0, "Expected token."); - return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _interpolatedDeclarationValue$1$allowEmpty(allowEmpty) { - return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, allowEmpty, true, false, true); - }, - _interpolatedDeclarationValue$1$allowOpenBrace(allowOpenBrace) { - return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, false, allowOpenBrace, false, true); - }, - _interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(allowEmpty, allowSemicolon) { - return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, allowEmpty, true, allowSemicolon, true); - }, - _interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(allowColon, allowEmpty, allowSemicolon) { - return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(allowColon, allowEmpty, true, allowSemicolon, true); - }, - _interpolatedDeclarationValue$0() { - return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, false, true, false, true); - }, - _interpolatedDeclarationValue$2$allowEmpty$allowOpenBrace(allowEmpty, allowOpenBrace) { - return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, allowEmpty, allowOpenBrace, false, true); - }, - _interpolatedDeclarationValue$1$silentComments(silentComments) { - return this._interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, false, true, false, silentComments); - }, - interpolatedIdentifier$0() { - var t3, _1_0, _0_0, _this = this, - _s20_ = "Expected identifier.", - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - t2 = new A.StringBuffer(""), - buffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - if (t1.scanChar$1(45)) { - t3 = A.Primitives_stringFromCharCode(45); - t2._contents += t3; - if (t1.scanChar$1(45)) { - t3 = A.Primitives_stringFromCharCode(45); - t2._contents += t3; - _this._interpolatedIdentifierBody$1(buffer); - return buffer.interpolation$1(t1.spanFrom$1(start)); - } - } - $label0$0: { - _1_0 = t1.peekChar$0(); - if (_1_0 == null) - t1.error$1(0, _s20_); - if (_1_0 === 95 || A.CharacterExtension_get_isAlphabetic(_1_0) || _1_0 >= 128) { - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t3; - break $label0$0; - } - if (92 === _1_0) { - t3 = _this.escape$1$identifierStart(true); - t2._contents += t3; - break $label0$0; - } - if (35 === _1_0 && t1.peekChar$1(1) === 123) { - _0_0 = _this.singleInterpolation$0(); - buffer.add$2(0, _0_0._0, _0_0._1); - break $label0$0; - } - t1.error$1(0, _s20_); - } - _this._interpolatedIdentifierBody$1(buffer); - return buffer.interpolation$1(t1.spanFrom$1(start)); - }, - _interpolatedIdentifierBody$1(buffer) { - var t1, t2, t3, t4, _1_0, t5, _0_0; - for (t1 = buffer._interpolation_buffer$_contents, t2 = buffer._spans, t3 = this.scanner, t4 = buffer._interpolation_buffer$_text; true;) { - _1_0 = t3.peekChar$0(); - if (_1_0 == null) - break; - t5 = true; - if (95 !== _1_0) - if (45 !== _1_0) { - if (!(_1_0 >= 97 && _1_0 <= 122)) - t5 = _1_0 >= 65 && _1_0 <= 90; - else - t5 = true; - if (!t5) - t5 = _1_0 >= 48 && _1_0 <= 57; - else - t5 = true; - t5 = t5 || _1_0 >= 128; - } - if (t5) { - t5 = A.Primitives_stringFromCharCode(t3.readChar$0()); - t4._contents += t5; - continue; - } - if (92 === _1_0) { - t5 = this.escape$0(); - t4._contents += t5; - continue; - } - if (35 === _1_0 && t3.peekChar$1(1) === 123) { - _0_0 = this.singleInterpolation$0(); - buffer._flushText$0(); - t1.push(_0_0._0); - t2.push(_0_0._1); - continue; - } - break; - } - }, - singleInterpolation$0() { - var contents, span, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - t1.expect$1("#{"); - _this.whitespace$0(); - contents = _this._expression$0(); - t1.expectChar$1(125); - span = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); - if (_this.get$plainCss()) - _this.error$2(0, string$.Interpp, span); - return new A._Record_2(contents, span); - }, - _mediaQueryList$0() { - var t4, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - t3 = new A.StringBuffer(""), - buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - for (; true;) { - _this.whitespace$0(); - _this._stylesheet$_mediaQuery$1(buffer); - _this.whitespace$0(); - if (!t1.scanChar$1(44)) - break; - t4 = A.Primitives_stringFromCharCode(44); - t3._contents += t4; - t4 = A.Primitives_stringFromCharCode(32); - t3._contents += t4; - } - return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _stylesheet$_mediaQuery$1(buffer) { - var identifier1, t1, t2, identifier2, _this = this, _s3_ = "and"; - if (_this.scanner.peekChar$0() === 40) { - _this._stylesheet$_mediaInParens$1(buffer); - _this.whitespace$0(); - if (_this.scanIdentifier$1(_s3_)) { - buffer._interpolation_buffer$_text._contents += " and "; - _this.expectWhitespace$0(); - _this._stylesheet$_mediaLogicSequence$2(buffer, _s3_); - } else if (_this.scanIdentifier$1("or")) { - buffer._interpolation_buffer$_text._contents += " or "; - _this.expectWhitespace$0(); - _this._stylesheet$_mediaLogicSequence$2(buffer, "or"); - } - return; - } - identifier1 = _this.interpolatedIdentifier$0(); - if (A.equalsIgnoreCase(identifier1.get$asPlain(), "not")) { - _this.expectWhitespace$0(); - if (!_this._lookingAtInterpolatedIdentifier$0()) { - buffer._interpolation_buffer$_text._contents += "not "; - _this._mediaOrInterp$1(buffer); - return; - } - } - _this.whitespace$0(); - buffer.addInterpolation$1(identifier1); - if (!_this._lookingAtInterpolatedIdentifier$0()) - return; - t1 = buffer._interpolation_buffer$_text; - t2 = A.Primitives_stringFromCharCode(32); - t1._contents += t2; - identifier2 = _this.interpolatedIdentifier$0(); - if (A.equalsIgnoreCase(identifier2.get$asPlain(), _s3_)) { - _this.expectWhitespace$0(); - t1._contents += " and "; - } else { - _this.whitespace$0(); - buffer.addInterpolation$1(identifier2); - if (_this.scanIdentifier$1(_s3_)) { - _this.expectWhitespace$0(); - t1._contents += " and "; - } else - return; - } - if (_this.scanIdentifier$1("not")) { - _this.expectWhitespace$0(); - t1._contents += "not "; - _this._mediaOrInterp$1(buffer); - return; - } - _this._stylesheet$_mediaLogicSequence$2(buffer, _s3_); - return; - }, - _stylesheet$_mediaLogicSequence$2(buffer, operator) { - var t1, t2, _this = this; - for (t1 = buffer._interpolation_buffer$_text; true;) { - _this._mediaOrInterp$1(buffer); - _this.whitespace$0(); - if (!_this.scanIdentifier$1(operator)) - return; - _this.expectWhitespace$0(); - t2 = A.Primitives_stringFromCharCode(32); - t2 = t1._contents += t2; - t1._contents = t2 + operator; - t2 = A.Primitives_stringFromCharCode(32); - t1._contents += t2; - } - }, - _mediaOrInterp$1(buffer) { - var _0_0; - if (this.scanner.peekChar$0() === 35) { - _0_0 = this.singleInterpolation$0(); - buffer.add$2(0, _0_0._0, _0_0._1); - } else - this._stylesheet$_mediaInParens$1(buffer); - }, - _stylesheet$_mediaInParens$1(buffer) { - var t2, t3, expressionBefore, expressionAfter, next, t4, expressionMiddle, _this = this, - t1 = _this.scanner; - t1.expectChar$2$name(40, "media condition in parentheses"); - t2 = buffer._interpolation_buffer$_text; - t3 = A.Primitives_stringFromCharCode(40); - t2._contents += t3; - _this.whitespace$0(); - if (t1.peekChar$0() === 40) { - _this._stylesheet$_mediaInParens$1(buffer); - _this.whitespace$0(); - if (_this.scanIdentifier$1("and")) { - t2._contents += " and "; - _this.expectWhitespace$0(); - _this._stylesheet$_mediaLogicSequence$2(buffer, "and"); - } else if (_this.scanIdentifier$1("or")) { - t2._contents += " or "; - _this.expectWhitespace$0(); - _this._stylesheet$_mediaLogicSequence$2(buffer, "or"); - } - } else if (_this.scanIdentifier$1("not")) { - t2._contents += "not "; - _this.expectWhitespace$0(); - _this._mediaOrInterp$1(buffer); - } else { - expressionBefore = _this._expressionUntilComparison$0(); - buffer.add$2(0, expressionBefore, expressionBefore.get$span(expressionBefore)); - if (t1.scanChar$1(58)) { - _this.whitespace$0(); - t3 = A.Primitives_stringFromCharCode(58); - t2._contents += t3; - t3 = A.Primitives_stringFromCharCode(32); - t2._contents += t3; - expressionAfter = _this._expression$0(); - buffer.add$2(0, expressionAfter, expressionAfter.get$span(expressionAfter)); - } else { - next = t1.peekChar$0(); - t3 = 60 !== next; - if (!t3 || 62 === next || 61 === next) { - t4 = A.Primitives_stringFromCharCode(32); - t2._contents += t4; - t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t4; - if ((!t3 || 62 === next) && t1.scanChar$1(61)) { - t4 = A.Primitives_stringFromCharCode(61); - t2._contents += t4; - } - t4 = A.Primitives_stringFromCharCode(32); - t2._contents += t4; - _this.whitespace$0(); - expressionMiddle = _this._expressionUntilComparison$0(); - buffer.add$2(0, expressionMiddle, expressionMiddle.get$span(expressionMiddle)); - if (!t3 || 62 === next) { - next.toString; - t3 = t1.scanChar$1(next); - } else - t3 = false; - if (t3) { - t3 = A.Primitives_stringFromCharCode(32); - t2._contents += t3; - t3 = A.Primitives_stringFromCharCode(next); - t2._contents += t3; - if (t1.scanChar$1(61)) { - t3 = A.Primitives_stringFromCharCode(61); - t2._contents += t3; - } - t3 = A.Primitives_stringFromCharCode(32); - t2._contents += t3; - _this.whitespace$0(); - expressionAfter = _this._expressionUntilComparison$0(); - buffer.add$2(0, expressionAfter, expressionAfter.get$span(expressionAfter)); - } - } - } - } - t1.expectChar$1(41); - _this.whitespace$0(); - t1 = A.Primitives_stringFromCharCode(41); - t2._contents += t1; - }, - _expressionUntilComparison$0() { - return this._expression$1$until(new A.StylesheetParser__expressionUntilComparison_closure(this)); - }, - _supportsCondition$0() { - var condition, operator, right, endPosition, t3, t4, lowerOperator, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - if (_this.scanIdentifier$1("not")) { - _this.whitespace$0(); - return new A.SupportsNegation(_this._supportsConditionInParens$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - } - condition = _this._supportsConditionInParens$0(); - _this.whitespace$0(); - for (operator = null; _this.lookingAtIdentifier$0();) { - if (operator != null) - _this.expectIdentifier$1(operator); - else if (_this.scanIdentifier$1("or")) - operator = "or"; - else { - _this.expectIdentifier$1("and"); - operator = "and"; - } - _this.whitespace$0(); - right = _this._supportsConditionInParens$0(); - endPosition = t1._string_scanner$_position; - t3 = t1._sourceFile; - t4 = new A._FileSpan(t3, t2, endPosition); - t4._FileSpan$3(t3, t2, endPosition); - condition = new A.SupportsOperation(condition, right, operator, t4); - lowerOperator = operator.toLowerCase(); - if (lowerOperator !== "and" && lowerOperator !== "or") - A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); - _this.whitespace$0(); - } - return condition; - }, - _supportsConditionInParens$0() { - var $name, nameStart, wasInParentheses, identifier, _1_0, operation, contents, identifier0, t2, $arguments, _0_0, _0_4_isSet, _0_4, _0_40, condition, exception, value, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - if (_this._lookingAtInterpolatedIdentifier$0()) { - identifier0 = _this.interpolatedIdentifier$0(); - t2 = identifier0.get$asPlain(); - if ((t2 == null ? null : t2.toLowerCase()) === "not") - _this.error$2(0, '"not" is not a valid identifier here.', identifier0.span); - if (t1.scanChar$1(40)) { - $arguments = _this._interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true); - t1.expectChar$1(41); - return new A.SupportsFunction(identifier0, $arguments, t1.spanFrom$1(start)); - } else { - _0_0 = identifier0.contents; - _0_4_isSet = _0_0.length === 1; - _0_4 = null; - if (_0_4_isSet) { - _0_40 = _0_0[0]; - t2 = _0_40; - _0_4 = t2; - t2 = t2 instanceof A.Expression; - } else - t2 = false; - if (t2) { - t2 = _0_4_isSet ? _0_4 : _0_0[0]; - return new A.SupportsInterpolation(type$.Expression._as(t2), t1.spanFrom$1(start)); - } else - _this.error$2(0, "Expected @supports condition.", identifier0.span); - } - } - t1.expectChar$1(40); - _this.whitespace$0(); - if (_this.scanIdentifier$1("not")) { - _this.whitespace$0(); - condition = _this._supportsConditionInParens$0(); - t1.expectChar$1(41); - return new A.SupportsNegation(condition, t1.spanFrom$1(start)); - } else if (t1.peekChar$0() === 40) { - condition = _this._supportsCondition$0(); - t1.expectChar$1(41); - return condition.withSpan$1(t1.spanFrom$1(start)); - } - $name = null; - nameStart = new A._SpanScannerState(t1, t1._string_scanner$_position); - wasInParentheses = _this._inParentheses; - try { - $name = _this._expression$0(); - t1.expectChar$1(58); - } catch (exception) { - if (type$.FormatException._is(A.unwrapException(exception))) { - t1.set$state(nameStart); - _this._inParentheses = wasInParentheses; - identifier = _this.interpolatedIdentifier$0(); - _1_0 = _this._trySupportsOperation$2(identifier, nameStart); - operation = null; - if (_1_0 != null) { - operation = _1_0; - t1.expectChar$1(41); - t2 = operation; - t1 = t1.spanFrom$1(start); - return A.SupportsOperation$(t2.left, t2.right, t2.operator, t1); - } - t2 = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t2.addInterpolation$1(identifier); - t2.addInterpolation$1(_this._interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(false, true, true)); - contents = t2.interpolation$1(t1.spanFrom$1(nameStart)); - if (t1.peekChar$0() === 58) - throw exception; - t1.expectChar$1(41); - return new A.SupportsAnything(contents, t1.spanFrom$1(start)); - } else - throw exception; - } - value = _this._supportsDeclarationValue$1($name); - t1.expectChar$1(41); - return new A.SupportsDeclaration($name, value, t1.spanFrom$1(start)); - }, - _supportsDeclarationValue$1($name) { - var t1 = false; - if ($name instanceof A.StringExpression) - if (!$name.hasQuotes) - t1 = B.JSString_methods.startsWith$1($name.text.get$initialPlain(), "--"); - if (t1) - return new A.StringExpression(this._interpolatedDeclarationValue$0(), false); - else { - this.whitespace$0(); - return this._expression$0(); - } - }, - _trySupportsOperation$2(interpolation, start) { - var expression, beforeWhitespace, t2, t3, operator, operation, right, t4, endPosition, t5, t6, lowerOperator, _this = this, _null = null, - t1 = interpolation.contents; - if (t1.length !== 1) - return _null; - expression = B.JSArray_methods.get$first(t1); - if (!(expression instanceof A.Expression)) - return _null; - t1 = _this.scanner; - beforeWhitespace = new A._SpanScannerState(t1, t1._string_scanner$_position); - _this.whitespace$0(); - for (t2 = start.position, t3 = interpolation.span, operator = _null, operation = operator; _this.lookingAtIdentifier$0();) { - if (operator != null) - _this.expectIdentifier$1(operator); - else if (_this.scanIdentifier$1("and")) - operator = "and"; - else { - if (!_this.scanIdentifier$1("or")) { - if (beforeWhitespace._scanner !== t1) - A.throwExpression(A.ArgumentError$(string$.The_gi, _null)); - t2 = beforeWhitespace.position; - if ((t2 === 0 ? 1 / t2 < 0 : t2 < 0) || t2 > t1.string.length) - A.throwExpression(A.ArgumentError$("Invalid position " + t2, _null)); - t1._string_scanner$_position = t2; - return t1._lastMatch = null; - } - operator = "or"; - } - _this.whitespace$0(); - right = _this._supportsConditionInParens$0(); - t4 = operation == null ? new A.SupportsInterpolation(expression, t3) : operation; - endPosition = t1._string_scanner$_position; - t5 = t1._sourceFile; - t6 = new A._FileSpan(t5, t2, endPosition); - t6._FileSpan$3(t5, t2, endPosition); - operation = new A.SupportsOperation(t4, right, operator, t6); - lowerOperator = operator.toLowerCase(); - if (lowerOperator !== "and" && lowerOperator !== "or") - A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); - _this.whitespace$0(); - } - return operation; - }, - _lookingAtInterpolatedIdentifier$0() { - var t2, _0_0, - t1 = this.scanner, - _1_0 = t1.peekChar$0(); - $label0$0: { - t2 = false; - if (_1_0 == null) { - t1 = t2; - break $label0$0; - } - if (_1_0 === 95 || A.CharacterExtension_get_isAlphabetic(_1_0) || _1_0 >= 128 || 92 === _1_0) { - t1 = true; - break $label0$0; - } - if (35 === _1_0) { - t1 = t1.peekChar$1(1) === 123; - break $label0$0; - } - if (45 === _1_0) { - _0_0 = t1.peekChar$1(1); - $label1$1: { - if (_0_0 == null) { - t1 = t2; - break $label1$1; - } - if (35 === _0_0) { - t1 = t1.peekChar$1(2) === 123; - break $label1$1; - } - if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128 || 92 === _0_0 || 45 === _0_0) { - t1 = true; - break $label1$1; - } - t1 = t2; - break $label1$1; - } - break $label0$0; - } - t1 = t2; - break $label0$0; - } - return t1; - }, - _lookingAtPotentialPropertyHack$0() { - var t1 = this.scanner, - _0_0 = t1.peekChar$0(); - $label0$0: { - if (58 === _0_0 || 42 === _0_0 || 46 === _0_0) { - t1 = true; - break $label0$0; - } - if (35 === _0_0) { - t1 = t1.peekChar$1(1) !== 123; - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - _lookingAtInterpolatedIdentifierBody$0() { - var t2, t3, - t1 = this.scanner, - _0_0 = t1.peekChar$0(); - $label0$0: { - t2 = false; - if (_0_0 == null) { - t1 = t2; - break $label0$0; - } - if (!(_0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128)) - t3 = _0_0 >= 48 && _0_0 <= 57 || _0_0 === 45; - else - t3 = true; - if (t3 || 92 === _0_0) { - t1 = true; - break $label0$0; - } - if (35 === _0_0) { - t1 = t1.peekChar$1(1) === 123; - break $label0$0; - } - t1 = t2; - break $label0$0; - } - return t1; - }, - _lookingAtExpression$0() { - var t2, _0_0, - t1 = this.scanner, - _1_0 = t1.peekChar$0(); - $label0$0: { - t2 = true; - if (_1_0 == null) { - t1 = false; - break $label0$0; - } - if (46 === _1_0) { - t1 = t1.peekChar$1(1) !== 46; - break $label0$0; - } - if (33 === _1_0) { - _0_0 = t1.peekChar$1(1); - $label1$1: { - if (_0_0 != null) - if (105 !== _0_0) - if (73 !== _0_0) - t1 = _0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12; - else - t1 = t2; - else - t1 = t2; - else - t1 = t2; - if (t1) - break $label1$1; - break $label1$1; - } - break $label0$0; - } - t1 = true; - if (40 !== _1_0) - if (47 !== _1_0) - if (91 !== _1_0) - if (39 !== _1_0) - if (34 !== _1_0) - if (35 !== _1_0) - if (43 !== _1_0) - if (45 !== _1_0) - if (92 !== _1_0) - if (36 !== _1_0) - if (38 !== _1_0) - if (!(_1_0 === 95 || A.CharacterExtension_get_isAlphabetic(_1_0) || _1_0 >= 128)) - t1 = _1_0 >= 48 && _1_0 <= 57; - if (t1) { - t1 = t2; - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - _withChildren$1$3(child, start, create) { - var result = create.call$2(this.children$1(0, child), this.scanner.spanFrom$1(start)); - this.whitespaceWithoutComments$0(); - return result; - }, - _withChildren$3(child, start, create) { - return this._withChildren$1$3(child, start, create, type$.dynamic); - }, - _urlString$0() { - var innerError, stackTrace, t2, exception, - t1 = this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - url = this.string$0(); - try { - t2 = A.Uri_parse(url); - return t2; - } catch (exception) { - t2 = A.unwrapException(exception); - if (type$.FormatException._is(t2)) { - innerError = t2; - stackTrace = A.getTraceFromException(exception); - this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), t1.spanFrom$1(start), stackTrace); - } else - throw exception; - } - }, - _publicIdentifier$0() { - var _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - result = _this.identifier$0(); - _this._assertPublic$2(result, new A.StylesheetParser__publicIdentifier_closure(_this, new A._SpanScannerState(t1, t2))); - return result; - }, - _assertPublic$2(identifier, span) { - var first = identifier.charCodeAt(0); - if (!(first === 45 || first === 95)) - return; - this.error$2(0, string$.Privat, span.call$0()); - }, - _addOrInject$2(buffer, expression) { - if (expression instanceof A.StringExpression && !expression.hasQuotes) - buffer.addInterpolation$1(expression.text); - else - buffer.add$2(0, expression, expression.get$span(expression)); - }, - get$plainCss() { - return false; - } - }; - A.StylesheetParser_parse_closure.prototype = { - call$0() { - var statements, - t1 = this.$this, - t2 = t1.scanner, - t3 = t2._string_scanner$_position; - t2.scanChar$1(65279); - statements = t1.statements$1(new A.StylesheetParser_parse__closure(t1)); - t2.expectDone$0(); - return A.Stylesheet$internal(statements, t2.spanFrom$1(new A._SpanScannerState(t2, t3)), t1.warnings, t1._globalVariables, t1.get$plainCss()); - }, - $signature: 577 - }; - A.StylesheetParser_parse__closure.prototype = { - call$0() { - var t1 = this.$this; - if (t1.scanner.scan$1("@charset")) { - t1.whitespace$0(); - t1.string$0(); - return null; - } - return t1._statement$1$root(true); - }, - $signature: 645 - }; - A.StylesheetParser_parseArgumentDeclaration_closure.prototype = { - call$0() { - var $arguments, - t1 = this.$this, - t2 = t1.scanner; - t2.expectChar$2$name(64, "@-rule"); - t1.identifier$0(); - t1.whitespace$0(); - t1.identifier$0(); - $arguments = t1._argumentDeclaration$0(); - t1.whitespace$0(); - t2.expectChar$1(123); - return $arguments; - }, - $signature: 277 - }; - A.StylesheetParser_parseVariableDeclaration_closure.prototype = { - call$0() { - var t1 = this.$this; - return t1.lookingAtIdentifier$0() ? t1._variableDeclarationWithNamespace$0() : t1.variableDeclarationWithoutNamespace$0(); - }, - $signature: 281 - }; - A.StylesheetParser_parseUseRule_closure.prototype = { - call$0() { - var t1 = this.$this, - t2 = t1.scanner, - t3 = t2._string_scanner$_position; - t2.expectChar$2$name(64, "@-rule"); - t1.expectIdentifier$1("use"); - t1.whitespace$0(); - return t1._useRule$1(new A._SpanScannerState(t2, t3)); - }, - $signature: 288 - }; - A.StylesheetParser__parseSingleProduction_closure.prototype = { - call$0() { - var result = this.production.call$0(); - this.$this.scanner.expectDone$0(); - return result; - }, - $signature() { - return this.T._eval$1("0()"); - } - }; - A.StylesheetParser__statement_closure.prototype = { - call$0() { - return this.$this._statement$0(); - }, - $signature: 128 - }; - A.StylesheetParser_variableDeclarationWithoutNamespace_closure.prototype = { - call$0() { - return this.$this.scanner.spanFrom$1(this.start); - }, - $signature: 27 - }; - A.StylesheetParser_variableDeclarationWithoutNamespace_closure0.prototype = { - call$0() { - return this.declaration.span; - }, - $signature: 27 - }; - A.StylesheetParser__styleRule_closure.prototype = { - call$2(children, span) { - var _this = this, - t1 = _this.$this; - if (t1.get$indented() && children.length === 0) - t1.warnings.push(new A._Record_3_deprecation_message_span(null, string$.This_s, _this._box_0.interpolation.span)); - t1._inStyleRule = _this.wasInStyleRule; - return A.StyleRule$(_this._box_0.interpolation, children, t1.scanner.spanFrom$1(_this.start)); - }, - $signature: 296 - }; - A.StylesheetParser__tryDeclarationChildren_closure.prototype = { - call$2(children, span) { - return A.Declaration$nested(this.name, children, span, this.value); - }, - $signature: 298 - }; - A.StylesheetParser__atRootRule_closure.prototype = { - call$2(children, span) { - return A.AtRootRule$(children, span, this.query); - }, - $signature: 159 - }; - A.StylesheetParser__atRootRule_closure0.prototype = { - call$2(children, span) { - return A.AtRootRule$(children, span, null); - }, - $signature: 159 - }; - A.StylesheetParser__eachRule_closure.prototype = { - call$2(children, span) { - var _this = this; - _this.$this._inControlDirective = _this.wasInControlDirective; - return A.EachRule$(_this.variables, _this.list, children, span); - }, - $signature: 302 - }; - A.StylesheetParser__functionRule_closure.prototype = { - call$2(children, span) { - return A.FunctionRule$(this.name, this.$arguments, children, span, this.precedingComment); - }, - $signature: 311 - }; - A.StylesheetParser__forRule_closure.prototype = { - call$0() { - var t1 = this.$this; - if (!t1.lookingAtIdentifier$0()) - return false; - if (t1.scanIdentifier$1("to")) - return this._box_0.exclusive = true; - else if (t1.scanIdentifier$1("through")) { - this._box_0.exclusive = false; - return true; - } else - return false; - }, - $signature: 21 - }; - A.StylesheetParser__forRule_closure0.prototype = { - call$2(children, span) { - var t1, _this = this; - _this.$this._inControlDirective = _this.wasInControlDirective; - t1 = _this._box_0.exclusive; - t1.toString; - return A.ForRule$(_this.variable, _this.from, _this.to, children, span, t1); - }, - $signature: 312 - }; - A.StylesheetParser__memberList_closure.prototype = { - call$0() { - var t1 = this.$this; - if (t1.scanner.peekChar$0() === 36) - this.variables.add$1(0, t1.variableName$0()); - else - this.identifiers.add$1(0, t1.identifier$1$normalize(true)); - }, - $signature: 1 - }; - A.StylesheetParser__includeRule_closure.prototype = { - call$2(children, span) { - return A.ContentBlock$(this.contentArguments_, children, span); - }, - $signature: 316 - }; - A.StylesheetParser_mediaRule_closure.prototype = { - call$2(children, span) { - return A.MediaRule$(this.query, children, span); - }, - $signature: 317 - }; - A.StylesheetParser__mixinRule_closure.prototype = { - call$2(children, span) { - var _this = this; - _this.$this._stylesheet$_inMixin = false; - return A.MixinRule$(_this.name, _this.$arguments, children, span, _this.precedingComment); - }, - $signature: 320 - }; - A.StylesheetParser_mozDocumentRule_closure.prototype = { - call$2(children, span) { - var _this = this; - if (_this._box_0.needsDeprecationWarning) - _this.$this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_T5f, string$.x40_moz_, span)); - return A.AtRule$(_this.name, span, children, _this.value); - }, - $signature: 160 - }; - A.StylesheetParser_supportsRule_closure.prototype = { - call$2(children, span) { - return A.SupportsRule$(this.condition, children, span); - }, - $signature: 325 - }; - A.StylesheetParser__whileRule_closure.prototype = { - call$2(children, span) { - this.$this._inControlDirective = this.wasInControlDirective; - return A.WhileRule$(this.condition, children, span); - }, - $signature: 326 - }; - A.StylesheetParser_unknownAtRule_closure.prototype = { - call$2(children, span) { - return A.AtRule$(this.name, span, children, this._box_0.value); - }, - $signature: 160 - }; - A.StylesheetParser__expression_resetState.prototype = { - call$0() { - var t2, - t1 = this._box_0; - t1.operands_ = t1.operators_ = t1.spaceExpressions_ = t1.commaExpressions_ = null; - t2 = this.$this; - t2.scanner.set$state(this.start); - t1.allowSlash = true; - t1.singleExpression_ = t2._singleExpression$0(); - }, - $signature: 0 - }; - A.StylesheetParser__expression_resolveOneOperation.prototype = { - call$0() { - var t2, t3, t4, t5, t6, t7, _this = this, - t1 = _this._box_0, - operator = t1.operators_.pop(), - left = t1.operands_.pop(), - right = t1.singleExpression_; - if (right == null) { - t2 = _this.$this.scanner; - t3 = operator.operator.length; - t2.error$3$length$position(0, "Expected expression.", t3, t2._string_scanner$_position - t3); - } - if (t1.allowSlash) { - t2 = _this.$this; - t2 = !t2._inParentheses && operator === B.BinaryOperator_U77 && t2._isSlashOperand$1(left) && t2._isSlashOperand$1(right); - } else - t2 = false; - if (t2) - t1.singleExpression_ = new A.BinaryOperationExpression(B.BinaryOperator_U77, left, right, true); - else { - t1.singleExpression_ = new A.BinaryOperationExpression(operator, left, right, false); - t2 = t1.allowSlash = false; - if (B.BinaryOperator_u15 === operator || B.BinaryOperator_SjO === operator) { - t3 = _this.$this; - t4 = t3.scanner.string; - t5 = right.get$span(right); - t5 = t5.get$start(t5); - t6 = right.get$span(right); - t7 = operator.operator; - if (B.JSString_methods.substring$2(t4, t5.offset - 1, t6.get$start(t6).offset) === t7) { - t2 = left.get$span(left); - t2 = t4.charCodeAt(t2.get$end(t2).offset); - t2 = t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12; - } - if (t2) { - t2 = left.toString$0(0); - t4 = right.toString$0(0); - t5 = left.toString$0(0); - t6 = right.toString$0(0); - t1 = t1.singleExpression_; - t3.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_2My, "This operation is parsed as:\n\n " + t2 + " " + t7 + " " + t4 + string$.x0a_but_ + t5 + " (" + t7 + t6 + ")\n\nAdd a space after " + t7 + string$.x20to_cl, t1.get$span(t1))); - } - } - } - }, - $signature: 0 - }; - A.StylesheetParser__expression_resolveOperations.prototype = { - call$0() { - var t1, - operators = this._box_0.operators_; - if (operators == null) - return; - for (t1 = this.resolveOneOperation; operators.length !== 0;) - t1.call$0(); - }, - $signature: 0 - }; - A.StylesheetParser__expression_addSingleExpression.prototype = { - call$1(expression) { - var t2, spaceExpressions, _this = this, - t1 = _this._box_0; - if (t1.singleExpression_ != null) { - t2 = _this.$this; - if (t2._inParentheses) { - t2._inParentheses = false; - if (t1.allowSlash) { - _this.resetState.call$0(); - return; - } - } - spaceExpressions = t1.spaceExpressions_; - if (spaceExpressions == null) - spaceExpressions = t1.spaceExpressions_ = A._setArrayType([], type$.JSArray_Expression); - _this.resolveOperations.call$0(); - t2 = t1.singleExpression_; - t2.toString; - spaceExpressions.push(t2); - t1.allowSlash = true; - } - t1.singleExpression_ = expression; - }, - $signature: 328 - }; - A.StylesheetParser__expression_addOperator.prototype = { - call$1(operator) { - var t2, t3, operators, operands, t4, singleExpression, - t1 = this.$this; - if (t1.get$plainCss() && operator !== B.BinaryOperator_wdM && operator !== B.BinaryOperator_u15 && operator !== B.BinaryOperator_SjO && operator !== B.BinaryOperator_2No && operator !== B.BinaryOperator_U77) { - t2 = t1.scanner; - t3 = operator.operator.length; - t2.error$3$length$position(0, "Operators aren't allowed in plain CSS.", t3, t2._string_scanner$_position - t3); - } - t2 = this._box_0; - t2.allowSlash = t2.allowSlash && operator === B.BinaryOperator_U77; - operators = t2.operators_; - if (operators == null) - operators = t2.operators_ = A._setArrayType([], type$.JSArray_BinaryOperator); - operands = t2.operands_; - if (operands == null) - operands = t2.operands_ = A._setArrayType([], type$.JSArray_Expression); - t3 = this.resolveOneOperation; - t4 = operator.precedence; - while (true) { - if (!(operators.length !== 0 && B.JSArray_methods.get$last(operators).precedence >= t4)) - break; - t3.call$0(); - } - operators.push(operator); - singleExpression = t2.singleExpression_; - if (singleExpression == null) { - t3 = t1.scanner; - t4 = operator.operator.length; - t3.error$3$length$position(0, "Expected expression.", t4, t3._string_scanner$_position - t4); - } - operands.push(singleExpression); - t1.whitespace$0(); - t2.singleExpression_ = t1._singleExpression$0(); - }, - $signature: 329 - }; - A.StylesheetParser__expression_resolveSpaceExpressions.prototype = { - call$0() { - var t1, spaceExpressions, singleExpression, t2; - this.resolveOperations.call$0(); - t1 = this._box_0; - spaceExpressions = t1.spaceExpressions_; - if (spaceExpressions == null) - return; - singleExpression = t1.singleExpression_; - if (singleExpression == null) - this.$this.scanner.error$1(0, "Expected expression."); - spaceExpressions.push(singleExpression); - t2 = B.JSArray_methods.get$first(spaceExpressions); - t2 = t2.get$span(t2).expand$1(0, singleExpression.get$span(singleExpression)); - t1.singleExpression_ = new A.ListExpression(A.List_List$unmodifiable(spaceExpressions, type$.Expression), B.ListSeparator_nbm, false, t2); - t1.spaceExpressions_ = null; - }, - $signature: 0 - }; - A.StylesheetParser_expressionUntilComma_closure.prototype = { - call$0() { - return this.$this.scanner.peekChar$0() === 44; - }, - $signature: 21 - }; - A.StylesheetParser__isHexColor_closure.prototype = { - call$1(char) { - return A.CharacterExtension_get_isHex(char); - }, - $signature: 46 - }; - A.StylesheetParser__unicodeRange_closure.prototype = { - call$1(char) { - return char != null && A.CharacterExtension_get_isHex(char); - }, - $signature: 32 - }; - A.StylesheetParser__unicodeRange_closure0.prototype = { - call$1(char) { - return char != null && A.CharacterExtension_get_isHex(char); - }, - $signature: 32 - }; - A.StylesheetParser_namespacedExpression_closure.prototype = { - call$0() { - return this.$this.scanner.spanFrom$1(this.start); - }, - $signature: 27 - }; - A.StylesheetParser_trySpecialFunction_closure.prototype = { - call$1(contents) { - return new A.StringExpression(contents, false); - }, - $signature: 337 - }; - A.StylesheetParser__expressionUntilComparison_closure.prototype = { - call$0() { - var t1 = this.$this.scanner, - _0_0 = t1.peekChar$0(); - $label0$0: { - if (61 === _0_0) { - t1 = t1.peekChar$1(1) !== 61; - break $label0$0; - } - if (60 === _0_0 || 62 === _0_0) { - t1 = true; - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - $signature: 21 - }; - A.StylesheetParser__publicIdentifier_closure.prototype = { - call$0() { - return this.$this.scanner.spanFrom$1(this.start); - }, - $signature: 27 - }; - A.StylesheetGraph.prototype = { - modifiedSince$3(url, since, baseImporter) { - var node = this._stylesheet_graph$_add$3(url, baseImporter, null); - if (node == null) - return true; - return new A.StylesheetGraph_modifiedSince_transitiveModificationTime(this).call$1(node).isAfter$1(since); - }, - _stylesheet_graph$_add$3(url, baseImporter, baseUrl) { - var importer, canonicalUrl, _this = this, - result = _this._ignoreErrors$1(new A.StylesheetGraph__add_closure(_this, url, baseImporter, baseUrl)); - if (type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(result)) { - importer = result._0; - canonicalUrl = result._1; - _this.addCanonical$3(importer, canonicalUrl, result._2); - return _this._nodes.$index(0, canonicalUrl); - } else - return null; - }, - addCanonical$4$recanonicalize(importer, canonicalUrl, originalUrl, recanonicalize) { - var stylesheet, _this = this, - t1 = _this._nodes; - if (t1.$index(0, canonicalUrl) != null) - return B.Set_empty3; - stylesheet = _this._ignoreErrors$1(new A.StylesheetGraph_addCanonical_closure(_this, importer, canonicalUrl, originalUrl)); - if (stylesheet == null) - return B.Set_empty3; - t1.$indexSet(0, canonicalUrl, A.StylesheetNode$_(stylesheet, importer, canonicalUrl, _this._upstreamNodes$3(stylesheet, importer, canonicalUrl))); - return recanonicalize ? _this._recanonicalizeImports$2(importer, canonicalUrl) : B.Set_empty3; - }, - addCanonical$3(importer, canonicalUrl, originalUrl) { - return this.addCanonical$4$recanonicalize(importer, canonicalUrl, originalUrl, true); - }, - _upstreamNodes$3(stylesheet, baseImporter, baseUrl) { - var t6, t7, t8, t9, t10, - t1 = type$.Uri, - active = A.LinkedHashSet_LinkedHashSet$_literal([baseUrl], t1), - t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1), - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1), - t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1), - t5 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - new A._FindDependenciesVisitor(t2, t3, t4, t5, A.LinkedHashSet_LinkedHashSet$_empty(type$.nullable_String)).visitChildren$1(stylesheet.children); - t6 = type$.UnmodifiableSetView_Uri; - t2 = new A.UnmodifiableSetView0(t2, t6); - t3 = new A.UnmodifiableSetView0(t3, t6); - t4 = new A.UnmodifiableSetView0(t4, t6); - t7 = type$.nullable_StylesheetNode; - t8 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t7); - for (t9 = new A.UnionSet(A.LinkedHashSet_LinkedHashSet$_literal([t2, t3, t4], type$.Set_Uri), type$.UnionSet_Uri).get$_union_set$_iterable(), t9 = t9.get$iterator(t9); t9.moveNext$0();) { - t10 = t9.get$current(t9); - t8.$indexSet(0, t10, this._nodeFor$4(t10, baseImporter, baseUrl, active)); - } - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t7); - for (t2 = new A.DependencyReport(t2, t3, t4, new A.UnmodifiableSetView0(t5, t6)).imports._base.get$iterator(0); t2.moveNext$0();) { - t3 = t2.get$current(0); - t1.$indexSet(0, t3, this._nodeFor$5$forImport(t3, baseImporter, baseUrl, active, true)); - } - return new A._Record_2_imports_modules(t1, t8); - }, - reload$1(canonicalUrl) { - var stylesheet, upstream, _this = this, - node = _this._nodes.$index(0, canonicalUrl); - if (node == null) - throw A.wrapException(A.StateError$(canonicalUrl.toString$0(0) + " is not in the dependency graph.")); - _this._transitiveModificationTimes.clear$0(0); - _this.importCache.clearImport$1(canonicalUrl); - stylesheet = _this._ignoreErrors$1(new A.StylesheetGraph_reload_closure(_this, node, canonicalUrl)); - if (stylesheet == null) - return false; - node._stylesheet = stylesheet; - upstream = _this._upstreamNodes$3(stylesheet, node.importer, canonicalUrl); - node._replaceUpstream$2(upstream._1, upstream._0); - return true; - }, - _recanonicalizeImports$2(importer, canonicalUrl) { - var t1, t2, t3, t4, t5, newUpstream, newUpstreamImports, _this = this, - changed = A.LinkedHashSet_LinkedHashSet$_empty(type$.StylesheetNode); - for (t1 = _this._nodes.get$values(0).get$iterator(0), t2 = type$.UnmodifiableMapView_of_Uri_and_nullable_StylesheetNode, t3 = type$.Uri, t4 = type$.nullable_StylesheetNode; t1.moveNext$0();) { - t5 = t1.get$current(0); - newUpstream = _this._recanonicalizeImportsForNode$4$forImport(t5, importer, canonicalUrl, false); - newUpstreamImports = _this._recanonicalizeImportsForNode$4$forImport(t5, importer, canonicalUrl, true); - if (newUpstream.__js_helper$_length !== 0 || newUpstreamImports.__js_helper$_length !== 0) { - changed.add$1(0, t5); - t5._replaceUpstream$2(A.mergeMaps(new A.UnmodifiableMapView(t5._upstream, t2), newUpstream, t3, t4), A.mergeMaps(new A.UnmodifiableMapView(t5._upstreamImports, t2), newUpstreamImports, t3, t4)); - } - } - if (changed._collection$_length !== 0) - _this._transitiveModificationTimes.clear$0(0); - return changed; - }, - _recanonicalizeImportsForNode$4$forImport(node, importer, canonicalUrl, forImport) { - var url, result, t2, newMap, t3, t4, t5, t6, upstream, exception, newCanonicalUrl, - t1 = type$.UnmodifiableMapView_of_Uri_and_nullable_StylesheetNode, - map = forImport ? new A.UnmodifiableMapView(node._upstreamImports, t1) : new A.UnmodifiableMapView(node._upstream, t1); - t1 = type$.Uri; - t2 = type$.nullable_StylesheetNode; - newMap = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t1 = A.MapExtensions_get_pairs(map, t1, t2), t1 = t1.get$iterator(t1), t2 = this._nodes, t3 = this.importCache, t4 = node.importer, t5 = node.canonicalUrl; t1.moveNext$0();) { - t6 = t1.get$current(t1); - url = null; - url = t6._0; - upstream = t6._1; - if (!importer.couldCanonicalize$2(url, canonicalUrl)) - continue; - t3.clearCanonicalize$1(url); - result = null; - try { - result = t3.canonicalize$4$baseImporter$baseUrl$forImport(0, url, t4, t5, forImport); - } catch (exception) { - } - t6 = result; - newCanonicalUrl = t6 == null ? null : t6._1; - if (J.$eq$(newCanonicalUrl, upstream == null ? null : upstream.canonicalUrl)) - continue; - t6 = url; - newMap.$indexSet(0, t6, result == null ? null : t2.$index(0, newCanonicalUrl)); - } - return newMap; - }, - _nodeFor$5$forImport(url, baseImporter, baseUrl, active, forImport) { - var canonicalUrl, t2, _1_0, stylesheet, t3, t4, node, _this = this, t1 = {}, - result = _this._ignoreErrors$1(new A.StylesheetGraph__nodeFor_closure(_this, url, baseImporter, baseUrl, forImport)); - if (result == null) - return null; - t1.originalUrl = t1.canonicalUrl = t1.importer = null; - t1.importer = result._0; - canonicalUrl = t1.canonicalUrl = result._1; - t1.originalUrl = result._2; - t2 = _this._nodes; - _1_0 = t2.$index(0, canonicalUrl); - if (_1_0 != null) - return _1_0; - if (active.contains$1(0, canonicalUrl)) - return null; - stylesheet = _this._ignoreErrors$1(new A.StylesheetGraph__nodeFor_closure0(t1, _this)); - if (stylesheet == null) - return null; - active.add$1(0, t1.canonicalUrl); - t3 = t1.importer; - t4 = t1.canonicalUrl; - node = A.StylesheetNode$_(stylesheet, t3, t4, _this._upstreamNodes$3(stylesheet, t3, t4)); - active.remove$1(0, t1.canonicalUrl); - t2.$indexSet(0, t1.canonicalUrl, node); - return node; - }, - _nodeFor$4(url, baseImporter, baseUrl, active) { - return this._nodeFor$5$forImport(url, baseImporter, baseUrl, active, false); - }, - _ignoreErrors$1$1(callback) { - var t1, exception; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - return null; - } - }, - _ignoreErrors$1(callback) { - return this._ignoreErrors$1$1(callback, type$.dynamic); - } - }; - A.StylesheetGraph_modifiedSince_transitiveModificationTime.prototype = { - call$1(node) { - return this.$this._transitiveModificationTimes.putIfAbsent$2(node.canonicalUrl, new A.StylesheetGraph_modifiedSince_transitiveModificationTime_closure(node, this)); - }, - $signature: 343 - }; - A.StylesheetGraph_modifiedSince_transitiveModificationTime_closure.prototype = { - call$0() { - var t2, t3, upstreamTime, t4, - t1 = this.node, - latest = t1.importer.modificationTime$1(t1.canonicalUrl); - for (t1 = t1._upstream.get$values(0).followedBy$1(0, t1._upstreamImports.get$values(0)), t1 = new A.FollowedByIterator(J.get$iterator$ax(t1.__internal$_first), t1._second), t2 = this.transitiveModificationTime; t1.moveNext$0();) { - t3 = t1._currentIterator; - t3 = t3.get$current(t3); - upstreamTime = t3 == null ? new A.DateTime(Date.now(), 0, false) : t2.call$1(t3); - t3 = upstreamTime._value; - t4 = latest._value; - if (t3 <= t4) - t3 = t3 === t4 && upstreamTime._microsecond > latest._microsecond; - else - t3 = true; - if (t3) - latest = upstreamTime; - } - return latest; - }, - $signature: 153 - }; - A.StylesheetGraph__add_closure.prototype = { - call$0() { - var _this = this; - return _this.$this.importCache.canonicalize$3$baseImporter$baseUrl(0, _this.url, _this.baseImporter, _this.baseUrl); - }, - $signature: 132 - }; - A.StylesheetGraph_addCanonical_closure.prototype = { - call$0() { - var _this = this; - return _this.$this.importCache.importCanonical$3$originalUrl(_this.importer, _this.canonicalUrl, _this.originalUrl); - }, - $signature: 90 - }; - A.StylesheetGraph_reload_closure.prototype = { - call$0() { - return this.$this.importCache.importCanonical$2(this.node.importer, this.canonicalUrl); - }, - $signature: 90 - }; - A.StylesheetGraph__nodeFor_closure.prototype = { - call$0() { - var _this = this; - return _this.$this.importCache.canonicalize$4$baseImporter$baseUrl$forImport(0, _this.url, _this.baseImporter, _this.baseUrl, _this.forImport); - }, - $signature: 132 - }; - A.StylesheetGraph__nodeFor_closure0.prototype = { - call$0() { - var t1 = this._box_0; - return this.$this.importCache.importCanonical$3$originalUrl(t1.importer, t1.canonicalUrl, t1.originalUrl); - }, - $signature: 90 - }; - A.StylesheetNode.prototype = { - StylesheetNode$_$4(_stylesheet, importer, canonicalUrl, allUpstream) { - var t1, t2; - for (t1 = this._upstream.get$values(0).followedBy$1(0, this._upstreamImports.get$values(0)), t1 = new A.FollowedByIterator(J.get$iterator$ax(t1.__internal$_first), t1._second); t1.moveNext$0();) { - t2 = t1._currentIterator; - t2 = t2.get$current(t2); - if (t2 != null) - t2._downstream.add$1(0, this); - } - }, - _replaceUpstream$2(newUpstream, newUpstreamImports) { - var t3, oldUpstream, newUpstreamSet, _this = this, - t1 = type$.nullable_StylesheetNode, - t2 = A.LinkedHashSet_LinkedHashSet$of(_this._upstream.get$values(0), t1); - t2.addAll$1(0, _this._upstreamImports.get$values(0)); - t3 = type$.StylesheetNode; - oldUpstream = A.SetExtension_removeNull(t2, t3); - t1 = A.LinkedHashSet_LinkedHashSet$of(newUpstream.get$values(0), t1); - t1.addAll$1(0, newUpstreamImports.get$values(0)); - newUpstreamSet = A.SetExtension_removeNull(t1, t3); - for (t1 = oldUpstream.difference$1(newUpstreamSet), t1 = t1.get$iterator(t1); t1.moveNext$0();) - t1.get$current(t1)._downstream.remove$1(0, _this); - for (t1 = newUpstreamSet.difference$1(oldUpstream), t1 = t1.get$iterator(t1); t1.moveNext$0();) - t1.get$current(t1)._downstream.add$1(0, _this); - _this._upstream = newUpstream; - _this._upstreamImports = newUpstreamImports; - }, - _stylesheet_graph$_remove$0() { - var t1, t2, t3, t4, _i, url, _this = this; - for (t1 = A.LinkedHashSet_LinkedHashSet$of(_this._upstream.get$values(0), type$.nullable_StylesheetNode), t1.addAll$1(0, _this._upstreamImports.get$values(0)), t1 = A._LinkedHashSetIterator$(t1, t1._modifications, A._instanceType(t1)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { - t3 = t1._collection$_current; - if (t3 == null) - t3 = t2._as(t3); - if (t3 == null) - continue; - t3._downstream.remove$1(0, _this); - } - for (t1 = _this._downstream.get$iterator(0); t1.moveNext$0();) { - t2 = t1.get$current(0); - for (t3 = t2._upstream, t4 = A._instanceType(t3)._eval$1("LinkedHashMapKeyIterable<1>"), t4 = A.List_List$of(new A.LinkedHashMapKeyIterable(t3, t4), true, t4._eval$1("Iterable.E")), t3 = t4.length, _i = 0; _i < t3; ++_i) { - url = t4[_i]; - if (J.$eq$(t2._upstream.$index(0, url), _this)) { - t2._upstream.$indexSet(0, url, null); - break; - } - } - for (t3 = t2._upstreamImports, t4 = A._instanceType(t3)._eval$1("LinkedHashMapKeyIterable<1>"), t4 = A.List_List$of(new A.LinkedHashMapKeyIterable(t3, t4), true, t4._eval$1("Iterable.E")), t3 = t4.length, _i = 0; _i < t3; ++_i) { - url = t4[_i]; - if (J.$eq$(t2._upstreamImports.$index(0, url), _this)) { - t2._upstreamImports.$indexSet(0, url, null); - break; - } - } - } - }, - toString$0(_) { - var t1 = this._stylesheet.span; - t1 = A.NullableExtension_andThen(t1.get$sourceUrl(t1), A.path__prettyUri$closure()); - return t1 == null ? "" : t1; - } - }; - A.Syntax.prototype = { - _enumToString$0() { - return "Syntax." + this._name; - }, - toString$0(_) { - return this._syntax$_name; - } - }; - A.Box.prototype = { - $eq(_, other) { - if (other == null) - return false; - return this.$ti._is(other) && other._box$_inner === this._box$_inner; - }, - get$hashCode(_) { - return A.Primitives_objectHashCode(this._box$_inner); - } - }; - A.ModifiableBox.prototype = {}; - A.LazyFileSpan.prototype = { - get$span(_) { - var t1 = this._lazy_file_span$_span; - return t1 == null ? this._lazy_file_span$_span = this._builder.call$0() : t1; - }, - compareTo$1(_, other) { - return this.get$span(0).compareTo$1(0, other); - }, - get$context(_) { - var t1 = this.get$span(0); - return t1.get$context(t1); - }, - get$end(_) { - var t1 = this.get$span(0); - return t1.get$end(t1); - }, - expand$1(_, other) { - return this.get$span(0).expand$1(0, other); - }, - get$file(_) { - var t1 = this.get$span(0); - return t1.get$file(t1); - }, - highlight$1$color(color) { - return this.get$span(0).highlight$1$color(color); - }, - get$length(_) { - var t1 = this.get$span(0); - return t1.get$length(t1); - }, - message$2$color(_, message, color) { - return this.get$span(0).message$2$color(0, message, color); - }, - message$1(_, message) { - return this.message$2$color(0, message, null); - }, - get$sourceUrl(_) { - var t1 = this.get$span(0); - return t1.get$sourceUrl(t1); - }, - get$start(_) { - var t1 = this.get$span(0); - return t1.get$start(t1); - }, - get$text() { - return this.get$span(0).get$text(); - }, - $isComparable: 1, - $isFileSpan: 1, - $isSourceSpan: 1, - $isSourceSpanWithContext: 1 - }; - A.LimitedMapView.prototype = { - get$keys(_) { - return this._limited_map_view$_keys; - }, - get$length(_) { - return this._limited_map_view$_keys._collection$_length; - }, - get$isEmpty(_) { - return this._limited_map_view$_keys._collection$_length === 0; - }, - get$isNotEmpty(_) { - return this._limited_map_view$_keys._collection$_length !== 0; - }, - $index(_, key) { - return this._limited_map_view$_keys.contains$1(0, key) ? this._limited_map_view$_map.$index(0, key) : null; - }, - containsKey$1(key) { - return this._limited_map_view$_keys.contains$1(0, key); - }, - remove$1(_, key) { - return this._limited_map_view$_keys.contains$1(0, key) ? this._limited_map_view$_map.remove$1(0, key) : null; - } - }; - A.MapExtensions_get_pairs_closure.prototype = { - call$1(e) { - return new A._Record_2(e.key, e.value); - }, - $signature() { - return this.K._eval$1("@<0>")._bind$1(this.V)._eval$1("+(1,2)(MapEntry<1,2>)"); - } - }; - A.MergedMapView.prototype = { - get$keys(_) { - var t1 = this._mapsByKey; - return new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); - }, - get$length(_) { - return this._mapsByKey.__js_helper$_length; - }, - get$isEmpty(_) { - return this._mapsByKey.__js_helper$_length === 0; - }, - get$isNotEmpty(_) { - return this._mapsByKey.__js_helper$_length !== 0; - }, - MergedMapView$1(maps, $K, $V) { - var t1, t2, t3, _i, map, t4, t5, t6; - for (t1 = maps.length, t2 = this._mapsByKey, t3 = $K._eval$1("@<0>")._bind$1($V)._eval$1("MergedMapView<1,2>"), _i = 0; _i < maps.length; maps.length === t1 || (0, A.throwConcurrentModificationError)(maps), ++_i) { - map = maps[_i]; - if (t3._is(map)) - for (t4 = map._mapsByKey.get$values(0), t5 = A._instanceType(t4), t4 = new A.MappedIterator(J.get$iterator$ax(t4.__internal$_iterable), t4._f, t5._eval$1("MappedIterator<1,2>")), t5 = t5._rest[1]; t4.moveNext$0();) { - t6 = t4.__internal$_current; - if (t6 == null) - t6 = t5._as(t6); - A.setAll(t2, t6.get$keys(t6), t6); - } - else - A.setAll(t2, map.get$keys(map), map); - } - }, - $index(_, key) { - var t1 = this._mapsByKey.$index(0, this.$ti._precomputed1._as(key)); - return t1 == null ? null : t1.$index(0, key); - }, - $indexSet(_, key, value) { - var _0_0 = this._mapsByKey.$index(0, key); - if (_0_0 != null) - _0_0.$indexSet(0, key, value); - else - throw A.wrapException(A.UnsupportedError$(string$.New_en)); - }, - remove$1(_, key) { - throw A.wrapException(A.UnsupportedError$(string$.Entrie)); - }, - containsKey$1(key) { - return this._mapsByKey.containsKey$1(key); - } - }; - A.MultiDirWatcher.prototype = { - watch$1(_, directory) { - var t1, t2, t3, t4, isParentOfExistingDir, _i, t5, _0_1, existingWatcher, future, completer; - for (t1 = this._watchers, t2 = A.MapExtensions_get_pairs(t1, type$.nullable_String, type$.Stream_WatchEvent).toList$0(0), t3 = t2.length, t1 = t1._map, t4 = this._group, isParentOfExistingDir = false, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - t5 = t2[_i]; - _0_1 = t5._0; - _0_1.toString; - existingWatcher = t5._1; - if (!isParentOfExistingDir) { - t5 = $.$get$context(); - t5 = t5._isWithinOrEquals$2(_0_1, directory) === B._PathRelation_equal || t5._isWithinOrEquals$2(_0_1, directory) === B._PathRelation_within; - } else - t5 = false; - if (t5) { - t1 = new A._Future($.Zone__current, type$._Future_void); - t1._asyncComplete$1(null); - return t1; - } - if ($.$get$context()._isWithinOrEquals$2(directory, _0_1) === B._PathRelation_within) { - t1.remove$1(0, _0_1); - t4.remove$1(0, existingWatcher); - isParentOfExistingDir = true; - } - } - future = A.watchDir(directory, this._poll); - t2 = new A._CompleterStream(type$._CompleterStream_WatchEvent); - completer = new A.StreamCompleter(t2, type$.StreamCompleter_WatchEvent); - future.then$1$2$onError(0, completer.get$setSourceStream(), completer.get$setError(), type$.void); - t1.$indexSet(0, directory, t2); - t4.add$1(0, t2); - return future; - } - }; - A.MultiSpan.prototype = { - get$start(_) { - var t1 = this._multi_span$_primary; - return t1.get$start(t1); - }, - get$end(_) { - var t1 = this._multi_span$_primary; - return t1.get$end(t1); - }, - get$text() { - return this._multi_span$_primary.get$text(); - }, - get$context(_) { - var t1 = this._multi_span$_primary; - return t1.get$context(t1); - }, - get$file(_) { - var t1 = this._multi_span$_primary; - return t1.get$file(t1); - }, - get$length(_) { - var t1 = this._multi_span$_primary; - return t1.get$length(t1); - }, - get$sourceUrl(_) { - var t1 = this._multi_span$_primary; - return t1.get$sourceUrl(t1); - }, - compareTo$1(_, other) { - return this._multi_span$_primary.compareTo$1(0, other); - }, - toString$0(_) { - return this._multi_span$_primary.toString$0(0); - }, - expand$1(_, other) { - return new A.MultiSpan(this._multi_span$_primary.expand$1(0, other), this.primaryLabel, this.secondarySpans); - }, - highlight$1$color(color) { - return A.Highlighter$multiple(this._multi_span$_primary, this.primaryLabel, this.secondarySpans, color === true, null, null).highlight$0(); - }, - message$2$color(_, message, color) { - var t1 = J.$eq$(color, true) || typeof color == "string", - t2 = typeof color == "string" ? color : null; - return A.SourceSpanExtension_messageMultiple(this._multi_span$_primary, message, this.primaryLabel, this.secondarySpans, t1, t2, null); - }, - message$1(_, message) { - return this.message$2$color(0, message, null); - }, - $isComparable: 1, - $isFileSpan: 1, - $isSourceSpan: 1, - $isSourceSpanWithContext: 1 - }; - A.NoSourceMapBuffer.prototype = { - get$length(_) { - return this._no_source_map_buffer$_buffer._contents.length; - }, - forSpan$1$2(span, callback) { - return callback.call$0(); - }, - forSpan$2(span, callback) { - return this.forSpan$1$2(span, callback, type$.dynamic); - }, - write$1(_, object) { - var t1 = this._no_source_map_buffer$_buffer, - t2 = A.S(object); - t1._contents += t2; - return null; - }, - writeCharCode$1(charCode) { - var t1 = this._no_source_map_buffer$_buffer, - t2 = A.Primitives_stringFromCharCode(charCode); - t1._contents += t2; - return null; - }, - toString$0(_) { - var t1 = this._no_source_map_buffer$_buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - buildSourceMap$1$prefix(prefix) { - return A.throwExpression(A.UnsupportedError$(string$.NoSour)); - } - }; - A.PrefixedMapView.prototype = { - get$keys(_) { - return new A._PrefixedKeys(this); - }, - get$length(_) { - var t1 = this._prefixed_map_view$_map; - return t1.get$length(t1); - }, - get$isEmpty(_) { - var t1 = this._prefixed_map_view$_map; - return t1.get$isEmpty(t1); - }, - get$isNotEmpty(_) { - var t1 = this._prefixed_map_view$_map; - return t1.get$isNotEmpty(t1); - }, - $index(_, key) { - return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefix) ? this._prefixed_map_view$_map.$index(0, J.substring$1$s(key, this._prefix.length)) : null; - }, - containsKey$1(key) { - return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefix) && this._prefixed_map_view$_map.containsKey$1(J.substring$1$s(key, this._prefix.length)); - } - }; - A._PrefixedKeys.prototype = { - get$length(_) { - var t1 = this._view._prefixed_map_view$_map; - return t1.get$length(t1); - }, - get$iterator(_) { - var t1 = this._view._prefixed_map_view$_map; - t1 = J.map$1$1$ax(t1.get$keys(t1), new A._PrefixedKeys_iterator_closure(this), type$.String); - return t1.get$iterator(t1); - }, - contains$1(_, key) { - return this._view.containsKey$1(key); - } - }; - A._PrefixedKeys_iterator_closure.prototype = { - call$1(key) { - return this.$this._view._prefix + key; - }, - $signature: 6 - }; - A.PublicMemberMapView.prototype = { - get$keys(_) { - var t1 = this._public_member_map_view$_inner; - return J.where$1$ax(t1.get$keys(t1), A.utils__isPublic$closure()); - }, - containsKey$1(key) { - return typeof key == "string" && A.isPublic(key) && this._public_member_map_view$_inner.containsKey$1(key); - }, - $index(_, key) { - if (typeof key == "string" && A.isPublic(key)) - return this._public_member_map_view$_inner.$index(0, key); - return null; - } - }; - A.SourceMapBuffer.prototype = { - get$_targetLocation() { - var t1 = this._source_map_buffer$_buffer._contents, - t2 = this._line; - return A.SourceLocation$(t1.length, this._column, t2, null); - }, - get$length(_) { - return this._source_map_buffer$_buffer._contents.length; - }, - forSpan$1$2(span, callback) { - var t1, _this = this, - wasInSpan = _this._inSpan; - _this._inSpan = true; - _this._addEntry$2(span.get$start(span), _this.get$_targetLocation()); - try { - t1 = callback.call$0(); - return t1; - } finally { - _this._inSpan = wasInSpan; - } - }, - forSpan$2(span, callback) { - return this.forSpan$1$2(span, callback, type$.dynamic); - }, - _addEntry$2(source, target) { - var entry, t2, - t1 = this._entries; - if (t1.length !== 0) { - entry = B.JSArray_methods.get$last(t1); - t2 = entry.source; - if (t2.file.getLine$1(t2.offset) === source.file.getLine$1(source.offset) && entry.target.line === target.line) - return; - if (entry.target.offset === target.offset) - return; - } - t1.push(new A.Entry(source, target, null)); - }, - write$1(_, object) { - var t1, i, - string = J.toString$0$(object); - this._source_map_buffer$_buffer._contents += string; - for (t1 = string.length, i = 0; i < t1; ++i) - if (string.charCodeAt(i) === 10) - this._source_map_buffer$_writeLine$0(); - else - ++this._column; - }, - writeCharCode$1(charCode) { - var t1 = this._source_map_buffer$_buffer, - t2 = A.Primitives_stringFromCharCode(charCode); - t1._contents += t2; - if (charCode === 10) - this._source_map_buffer$_writeLine$0(); - else - ++this._column; - }, - _source_map_buffer$_writeLine$0() { - var _this = this, - t1 = _this._entries; - if (B.JSArray_methods.get$last(t1).target.line === _this._line && B.JSArray_methods.get$last(t1).target.column === _this._column) - t1.pop(); - ++_this._line; - _this._column = 0; - if (_this._inSpan) - t1.push(new A.Entry(B.JSArray_methods.get$last(t1).source, _this.get$_targetLocation(), null)); - }, - toString$0(_) { - var t1 = this._source_map_buffer$_buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - buildSourceMap$1$prefix(prefix) { - var i, t2, prefixColumn, _box_0 = {}, - t1 = prefix.length; - if (t1 === 0) - return A.SingleMapping_SingleMapping$fromEntries(this._entries); - _box_0.prefixColumn = _box_0.prefixLines = 0; - for (i = 0, t2 = 0; i < t1; ++i) - if (prefix.charCodeAt(i) === 10) { - ++_box_0.prefixLines; - _box_0.prefixColumn = 0; - t2 = 0; - } else { - prefixColumn = t2 + 1; - _box_0.prefixColumn = prefixColumn; - t2 = prefixColumn; - } - t2 = this._entries; - return A.SingleMapping_SingleMapping$fromEntries(new A.MappedListIterable(t2, new A.SourceMapBuffer_buildSourceMap_closure(_box_0, t1), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Entry>"))); - } - }; - A.SourceMapBuffer_buildSourceMap_closure.prototype = { - call$1(entry) { - var t1 = entry.target, - t2 = t1.line, - t3 = this._box_0, - t4 = t3.prefixLines; - t3 = t2 === 0 ? t3.prefixColumn : 0; - return new A.Entry(entry.source, A.SourceLocation$(t1.offset + this.prefixLength, t1.column + t3, t2 + t4, null), entry.identifierName); - }, - $signature: 162 - }; - A.UnprefixedMapView.prototype = { - get$keys(_) { - return new A._UnprefixedKeys(this); - }, - $index(_, key) { - return typeof key == "string" ? this._unprefixed_map_view$_map.$index(0, this._unprefixed_map_view$_prefix + key) : null; - }, - containsKey$1(key) { - return typeof key == "string" && this._unprefixed_map_view$_map.containsKey$1(this._unprefixed_map_view$_prefix + key); - }, - remove$1(_, key) { - return typeof key == "string" ? this._unprefixed_map_view$_map.remove$1(0, this._unprefixed_map_view$_prefix + key) : null; - } - }; - A._UnprefixedKeys.prototype = { - get$iterator(_) { - var t1 = this._unprefixed_map_view$_view._unprefixed_map_view$_map; - t1 = J.where$1$ax(t1.get$keys(t1), new A._UnprefixedKeys_iterator_closure(this)).map$1$1(0, new A._UnprefixedKeys_iterator_closure0(this), type$.String); - return t1.get$iterator(t1); - }, - contains$1(_, key) { - return this._unprefixed_map_view$_view.containsKey$1(key); - } - }; - A._UnprefixedKeys_iterator_closure.prototype = { - call$1(key) { - return B.JSString_methods.startsWith$1(key, this.$this._unprefixed_map_view$_view._unprefixed_map_view$_prefix); - }, - $signature: 5 - }; - A._UnprefixedKeys_iterator_closure0.prototype = { - call$1(key) { - return B.JSString_methods.substring$1(key, this.$this._unprefixed_map_view$_view._unprefixed_map_view$_prefix.length); - }, - $signature: 6 - }; - A.indent_closure.prototype = { - call$1(line) { - return B.JSString_methods.$mul(" ", this.indentation) + line; - }, - $signature: 6 - }; - A.flattenVertically_closure.prototype = { - call$1(inner) { - return A.QueueList_QueueList$from(inner, this.T); - }, - $signature() { - return this.T._eval$1("QueueList<0>(Iterable<0>)"); - } - }; - A.flattenVertically_closure0.prototype = { - call$1(queue) { - this.result.push(queue.removeFirst$0()); - return queue.get$length(0) === 0; - }, - $signature() { - return this.T._eval$1("bool(QueueList<0>)"); - } - }; - A.longestCommonSubsequence_backtrack.prototype = { - call$2(i, j) { - var selection, t1, _this = this; - if (i === -1 || j === -1) - return A._setArrayType([], _this.T._eval$1("JSArray<0>")); - selection = _this.selections[i][j]; - if (selection != null) { - t1 = _this.call$2(i - 1, j - 1); - J.add$1$ax(t1, selection); - return t1; - } - t1 = _this.lengths; - return t1[i + 1][j] > t1[i][j + 1] ? _this.call$2(i, j - 1) : _this.call$2(i - 1, j); - }, - $signature() { - return this.T._eval$1("List<0>(int,int)"); - } - }; - A.mapAddAll2_closure.prototype = { - call$2(key, inner) { - var t1 = this.destination, - _0_0 = t1.$index(0, key); - if (_0_0 != null) - _0_0.addAll$1(0, inner); - else - t1.$indexSet(0, key, inner); - }, - $signature() { - return this.K1._eval$1("@<0>")._bind$1(this.K2)._bind$1(this.V)._eval$1("~(1,Map<2,3>)"); - } - }; - A.Value.prototype = { - get$isTruthy() { - return true; - }, - get$separator(_) { - return B.ListSeparator_undecided_null_undecided; - }, - get$hasBrackets() { - return false; - }, - get$asList() { - return A._setArrayType([this], type$.JSArray_Value); - }, - get$lengthAsList() { - return 1; - }, - get$isBlank() { - return false; - }, - get$isSpecialNumber() { - return false; - }, - get$isVar() { - return false; - }, - get$realNull() { - return this; - }, - sassIndexToListIndex$2(sassIndex, $name) { - var t1, index, - indexValue = sassIndex.assertNumber$1($name); - if (indexValue.get$hasUnits()) { - t1 = indexValue.get$unitString(); - A.warnForDeprecation("$" + $name + ": Passing a number with unit " + t1 + string$.x20is_de + indexValue.unitSuggestion$1($name) + string$.x0a_Morex3af, B.Deprecation_int); - } - index = indexValue.assertInt$1($name); - if (index === 0) - throw A.wrapException(A.SassScriptException$("List index may not be 0.", $name)); - if (Math.abs(index) > this.get$lengthAsList()) - throw A.wrapException(A.SassScriptException$("Invalid index " + sassIndex.toString$0(0) + " for a list with " + this.get$lengthAsList() + " elements.", $name)); - return index < 0 ? this.get$lengthAsList() + index : index - 1; - }, - assertCalculation$1($name) { - return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a calculation.", $name)); - }, - assertColor$1($name) { - return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a color.", $name)); - }, - assertFunction$1($name) { - return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a function reference.", $name)); - }, - assertMixin$1($name) { - return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a mixin reference.", $name)); - }, - assertMap$1($name) { - return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a map.", $name)); - }, - tryMap$0() { - return null; - }, - assertNumber$1($name) { - return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a number.", $name)); - }, - assertNumber$0() { - return this.assertNumber$1(null); - }, - assertString$1($name) { - return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a string.", $name)); - }, - assertCommonListStyle$2$allowSlash($name, allowSlash) { - var invalidSeparator, buffer, t1, _this = this, - _s8_ = "Expected"; - if (_this.get$separator(_this) !== B.ListSeparator_ECn) - invalidSeparator = !allowSlash && _this.get$separator(_this) === B.ListSeparator_cQA; - else - invalidSeparator = true; - if (!invalidSeparator && !_this.get$hasBrackets()) - return _this.get$asList(); - buffer = new A.StringBuffer(_s8_); - if (_this.get$hasBrackets()) { - t1 = "Expected" + " an unbracketed"; - buffer._contents = t1; - } else - t1 = _s8_; - if (invalidSeparator) { - t1 += _this.get$hasBrackets() ? "," : " a"; - buffer._contents = t1; - t1 = buffer._contents = t1 + " space-"; - t1 = buffer._contents = (allowSlash ? buffer._contents = t1 + " or slash-" : t1) + "separated"; - } - buffer._contents = t1 + (" list, was " + _this.toString$0(0)); - throw A.wrapException(A.SassScriptException$(buffer.toString$0(0), $name)); - }, - _selectorString$1($name) { - var _0_0 = this._selectorStringOrNull$0(); - if (_0_0 != null) - return _0_0; - throw A.wrapException(A.SassScriptException$(this.toString$0(0) + string$.x20is_noav, $name)); - }, - _selectorStringOrNull$0() { - var t1, t2, result, _1_0, _i, complex, string, compound, _this = this, _null = null; - if (_this instanceof A.SassString) - return _this._string$_text; - if (!(_this instanceof A.SassList)) - return _null; - t1 = _this._list$_contents; - t2 = t1.length; - if (t2 === 0) - return _null; - result = A._setArrayType([], type$.JSArray_String); - $label0$1: { - _1_0 = _this._separator; - if (B.ListSeparator_ECn === _1_0) { - for (_i = 0; _i < t2; ++_i) { - complex = t1[_i]; - if (complex instanceof A.SassString) { - result.push(complex._string$_text); - continue; - } - if (complex instanceof A.SassList && B.ListSeparator_nbm === complex._separator) { - string = complex._selectorStringOrNull$0(); - if (string == null) - return _null; - result.push(string); - continue; - } - return _null; - } - break $label0$1; - } - if (B.ListSeparator_cQA === _1_0) - return _null; - for (_i = 0; _i < t2; ++_i) { - compound = t1[_i]; - if (!(compound instanceof A.SassString)) - return _null; - result.push(compound._string$_text); - } - } - return B.JSArray_methods.join$1(result, _1_0 === B.ListSeparator_ECn ? ", " : " "); - }, - withListContents$2$separator(contents, separator) { - var t1 = separator == null ? this.get$separator(this) : separator, - t2 = this.get$hasBrackets(); - return A.SassList$(contents, t1, t2); - }, - withListContents$1(contents) { - return this.withListContents$2$separator(contents, null); - }, - greaterThan$1(other) { - return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); - }, - greaterThanOrEquals$1(other) { - return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); - }, - lessThan$1(other) { - return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); - }, - lessThanOrEquals$1(other) { - return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); - }, - times$1(other) { - return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); - }, - modulo$1(other) { - return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); - }, - plus$1(other) { - var t1; - $label0$0: { - if (other instanceof A.SassString) { - t1 = new A.SassString(A.serializeValue(this, false, true) + other._string$_text, other._hasQuotes); - break $label0$0; - } - if (other instanceof A.SassCalculation) - A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); - t1 = new A.SassString(A.serializeValue(this, false, true) + A.serializeValue(other, false, true), false); - break $label0$0; - } - return t1; - }, - minus$1(other) { - return other instanceof A.SassCalculation ? A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)) : new A.SassString(A.serializeValue(this, false, true) + "-" + A.serializeValue(other, false, true), false); - }, - dividedBy$1(other) { - return new A.SassString(A.serializeValue(this, false, true) + "/" + A.serializeValue(other, false, true), false); - }, - unaryPlus$0() { - return new A.SassString("+" + A.serializeValue(this, false, true), false); - }, - unaryMinus$0() { - return new A.SassString("-" + A.serializeValue(this, false, true), false); - }, - unaryNot$0() { - return B.SassBoolean_false; - }, - withoutSlash$0() { - return this; - }, - toString$0(_) { - return A.serializeValue(this, true, true); - } - }; - A.SassArgumentList.prototype = {}; - A.SassBoolean.prototype = { - get$isTruthy() { - return this.value; - }, - accept$1$1(visitor) { - return visitor._serialize$_buffer.write$1(0, String(this.value)); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - unaryNot$0() { - return this.value ? B.SassBoolean_false : B.SassBoolean_true; - } - }; - A.SassCalculation.prototype = { - get$isSpecialNumber() { - return true; - }, - accept$1$1(visitor) { - return visitor.visitCalculation$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertCalculation$1($name) { - return this; - }, - plus$1(other) { - if (other instanceof A.SassString) - return this.super$Value$plus(other); - throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); - }, - minus$1(other) { - return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); - }, - unaryPlus$0() { - return A.throwExpression(A.SassScriptException$('Undefined operation "+' + this.toString$0(0) + '".', null)); - }, - unaryMinus$0() { - return A.throwExpression(A.SassScriptException$('Undefined operation "-' + this.toString$0(0) + '".', null)); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.SassCalculation && this.name === other.name && B.C_ListEquality.equals$2(0, this.$arguments, other.$arguments); - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this.name) ^ B.C_ListEquality0.hash$1(this.$arguments); - } - }; - A.SassCalculation__verifyLength_closure.prototype = { - call$1(arg) { - return arg instanceof A.SassString; - }, - $signature: 67 - }; - A.CalculationOperation.prototype = { - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.CalculationOperation && this._operator === other._operator && J.$eq$(this._left, other._left) && J.$eq$(this._right, other._right); - }, - get$hashCode(_) { - return (A.Primitives_objectHashCode(this._operator) ^ J.get$hashCode$(this._left) ^ J.get$hashCode$(this._right)) >>> 0; - }, - toString$0(_) { - var parenthesized = A.serializeValue(new A.SassCalculation("", A._setArrayType([this], type$.JSArray_Object)), true, true); - return B.JSString_methods.substring$2(parenthesized, 1, parenthesized.length - 1); - } - }; - A.CalculationOperator.prototype = { - _enumToString$0() { - return "CalculationOperator." + this._name; - }, - toString$0(_) { - return this.name; - } - }; - A.SassColor.prototype = { - get$channels() { - var t2, t3, - t1 = this.channel0OrNull; - if (t1 == null) - t1 = 0; - t2 = this.channel1OrNull; - if (t2 == null) - t2 = 0; - t3 = this.channel2OrNull; - return A.List_List$unmodifiable([t1, t2, t3 == null ? 0 : t3], type$.double); - }, - get$channelsOrNull() { - return A.List_List$unmodifiable([this.channel0OrNull, this.channel1OrNull, this.channel2OrNull], type$.nullable_double); - }, - get$isChannel0Powerless() { - var t1, t2, _this = this, - _0_0 = _this._space; - $label0$0: { - if (B.HslColorSpace_gsm === _0_0) { - t1 = _this.channel1OrNull; - t1 = A.fuzzyEquals(t1 == null ? 0 : t1, 0); - break $label0$0; - } - if (B.HwbColorSpace_06z === _0_0) { - t1 = _this.channel1OrNull; - if (t1 == null) - t1 = 0; - t2 = _this.channel2OrNull; - t1 += t2 == null ? 0 : t2; - t1 = t1 > 100 || A.fuzzyEquals(t1, 100); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - get$isChannel2Powerless() { - var t1, - _0_0 = this._space; - $label0$0: { - if (B.LchColorSpace_wv8 === _0_0 || B.OklchColorSpace_li8 === _0_0) { - t1 = this.channel1OrNull; - t1 = A.fuzzyEquals(t1 == null ? 0 : t1, 0); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - get$isInGamut() { - var t2, t3, _this = this, - t1 = _this._space; - if (!t1.get$isBoundedInternal()) - return true; - t2 = _this.channel0OrNull; - if (t2 == null) - t2 = 0; - t1 = t1._channels; - t3 = false; - if (_this._isChannelInGamut$2(t2, t1[0])) { - t2 = _this.channel1OrNull; - if (t2 == null) - t2 = 0; - if (_this._isChannelInGamut$2(t2, t1[1])) { - t2 = _this.channel2OrNull; - if (t2 == null) - t2 = 0; - t1 = _this._isChannelInGamut$2(t2, t1[2]); - } else - t1 = t3; - } else - t1 = t3; - return t1; - }, - _isChannelInGamut$2(value, channel) { - var min, max, t1; - $label0$0: { - if (channel instanceof A.LinearChannel) { - min = channel.min; - max = channel.max; - if (value < max || A.fuzzyEquals(value, max)) - t1 = value > min || A.fuzzyEquals(value, min); - else - t1 = false; - break $label0$0; - } - t1 = true; - break $label0$0; - } - return t1; - }, - accept$1$1(visitor) { - return visitor.visitColor$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertColor$1($name) { - return this; - }, - assertLegacy$1($name) { - if (this._space.get$isLegacyInternal()) - return; - throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + string$.x20to_be, $name)); - }, - channel$1(_, channel) { - var t1, _this = this, - channels = _this._space._channels; - if (channel === channels[0].name) { - t1 = _this.channel0OrNull; - return t1 == null ? 0 : t1; - } - if (channel === channels[1].name) { - t1 = _this.channel1OrNull; - return t1 == null ? 0 : t1; - } - if (channel === channels[2].name) { - t1 = _this.channel2OrNull; - return t1 == null ? 0 : t1; - } - if (channel === "alpha") { - t1 = _this.alphaOrNull; - return t1 == null ? 0 : t1; - } - throw A.wrapException(A.SassScriptException$("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', null)); - }, - isChannelMissing$3$channelName$colorName(channel, channelName, colorName) { - var _this = this, - channels = _this._space._channels; - if (channel === channels[0].name) - return _this.channel0OrNull == null; - if (channel === channels[1].name) - return _this.channel1OrNull == null; - if (channel === channels[2].name) - return _this.channel2OrNull == null; - if (channel === "alpha") - return _this.alphaOrNull == null; - throw A.wrapException(A.SassScriptException$("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', channelName)); - }, - isChannelMissing$1(channel) { - return this.isChannelMissing$3$channelName$colorName(channel, null, null); - }, - isChannelPowerless$3$channelName$colorName(channel, channelName, colorName) { - var _this = this, - channels = _this._space._channels; - if (channel === channels[0].name) - return _this.get$isChannel0Powerless(); - if (channel === channels[1].name) - return false; - if (channel === channels[2].name) - return _this.get$isChannel2Powerless(); - if (channel === "alpha") - return false; - throw A.wrapException(A.SassScriptException$("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', channelName)); - }, - _legacyChannel$2(space, channel) { - if (!this._space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$("color." + channel + string$.x28__is_oc, null)); - return this.toSpace$1(space).channel$1(0, channel); - }, - toSpace$2$legacyMissing(space, legacyMissing) { - var t2, converted, t3, t4, _this = this, - t1 = _this._space; - if (t1 === space) - return _this; - t2 = _this.alphaOrNull; - if (t2 == null) - t2 = 0; - converted = t1.convert$5(space, _this.channel0OrNull, _this.channel1OrNull, _this.channel2OrNull, t2); - t1 = false; - if (!legacyMissing) - if (converted._space.get$isLegacyInternal()) - t1 = converted.channel0OrNull == null || converted.channel1OrNull == null || converted.channel2OrNull == null || converted.alphaOrNull == null; - if (t1) { - t1 = converted.channel0OrNull; - if (t1 == null) - t1 = 0; - t2 = converted.channel1OrNull; - if (t2 == null) - t2 = 0; - t3 = converted.channel2OrNull; - if (t3 == null) - t3 = 0; - t4 = converted.alphaOrNull; - if (t4 == null) - t4 = 0; - t4 = A.SassColor_SassColor$forSpaceInternal(converted._space, t1, t2, t3, t4); - t1 = t4; - } else - t1 = converted; - return t1; - }, - toSpace$1(space) { - return this.toSpace$2$legacyMissing(space, true); - }, - changeHsl$3$hue$lightness$saturation(hue, lightness, saturation) { - var t2, t3, t4, t5, _this = this, _null = null, - t1 = _this._space; - if (!t1.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$(string$.color_c, _null)); - t2 = hue == null ? _null : hue; - if (t2 == null) - t2 = _this._legacyChannel$2(B.HslColorSpace_gsm, "hue"); - t3 = saturation == null ? _null : saturation; - if (t3 == null) - t3 = _this._legacyChannel$2(B.HslColorSpace_gsm, "saturation"); - t4 = lightness == null ? _null : lightness; - if (t4 == null) - t4 = _this._legacyChannel$2(B.HslColorSpace_gsm, "lightness"); - t5 = _this.alphaOrNull; - if (t5 == null) - t5 = 0; - return A.SassColor_SassColor$hsl(t2, t3, t4, t5).toSpace$1(t1); - }, - changeHsl$1$saturation(saturation) { - return this.changeHsl$3$hue$lightness$saturation(null, null, saturation); - }, - changeHsl$1$lightness(lightness) { - return this.changeHsl$3$hue$lightness$saturation(null, lightness, null); - }, - changeHsl$1$hue(hue) { - return this.changeHsl$3$hue$lightness$saturation(hue, null, null); - }, - changeAlpha$1(alpha) { - var t2, t3, _this = this, - t1 = _this.channel0OrNull; - if (t1 == null) - t1 = 0; - t2 = _this.channel1OrNull; - if (t2 == null) - t2 = 0; - t3 = _this.channel2OrNull; - if (t3 == null) - t3 = 0; - return A.SassColor_SassColor$forSpaceInternal(_this._space, t1, t2, t3, alpha); - }, - interpolate$4$legacyMissing$weight(other, method, legacyMissing, weight) { - var t1, color1, color2, missing1_0, missing1_1, missing1_2, missing2_0, missing2_1, missing2_2, channel1_0, channel1_1, channel1_2, channel2_0, channel2_1, channel2_2, alpha1, t2, t3, alpha10, alpha2, alpha20, thisMultiplier, t4, t5, otherMultiplier, mixedAlpha, mixed0, mixed1, mixed2, _this = this, _null = null; - if (A.fuzzyEquals(weight, 0)) - return other; - if (A.fuzzyEquals(weight, 1)) - return _this; - t1 = method.space; - color1 = _this.toSpace$1(t1); - color2 = other.toSpace$1(t1); - if (weight < 0 || weight > 1) - throw A.wrapException(A.RangeError$range(weight, 0, 1, "weight", _null)); - missing1_0 = _this._isAnalogousChannelMissing$3(_this, color1, 0); - missing1_1 = _this._isAnalogousChannelMissing$3(_this, color1, 1); - missing1_2 = _this._isAnalogousChannelMissing$3(_this, color1, 2); - missing2_0 = _this._isAnalogousChannelMissing$3(other, color2, 0); - missing2_1 = _this._isAnalogousChannelMissing$3(other, color2, 1); - missing2_2 = _this._isAnalogousChannelMissing$3(other, color2, 2); - channel1_0 = (missing1_0 ? color2 : color1).channel0OrNull; - if (channel1_0 == null) - channel1_0 = 0; - channel1_1 = (missing1_1 ? color2 : color1).channel1OrNull; - if (channel1_1 == null) - channel1_1 = 0; - channel1_2 = (missing1_2 ? color2 : color1).channel2OrNull; - if (channel1_2 == null) - channel1_2 = 0; - channel2_0 = (missing2_0 ? color1 : color2).channel0OrNull; - if (channel2_0 == null) - channel2_0 = 0; - channel2_1 = (missing2_1 ? color1 : color2).channel1OrNull; - if (channel2_1 == null) - channel2_1 = 0; - channel2_2 = (missing2_2 ? color1 : color2).channel2OrNull; - if (channel2_2 == null) - channel2_2 = 0; - alpha1 = _this.alphaOrNull; - t2 = alpha1 == null; - if (t2) { - t3 = other.alphaOrNull; - alpha10 = t3 == null ? 0 : t3; - } else - alpha10 = alpha1; - alpha2 = other.alphaOrNull; - t3 = alpha2 == null; - if (t3) - alpha20 = t2 ? 0 : alpha1; - else - alpha20 = alpha2; - thisMultiplier = (t2 ? 1 : alpha1) * weight; - t4 = t3 ? 1 : alpha2; - t5 = 1 - weight; - otherMultiplier = t4 * t5; - mixedAlpha = t2 && t3 ? _null : alpha10 * weight + alpha20 * t5; - if (missing1_0 && missing2_0) - mixed0 = _null; - else { - t2 = mixedAlpha == null ? 1 : mixedAlpha; - mixed0 = (channel1_0 * thisMultiplier + channel2_0 * otherMultiplier) / t2; - } - if (missing1_1 && missing2_1) - mixed1 = _null; - else { - t2 = mixedAlpha == null ? 1 : mixedAlpha; - mixed1 = (channel1_1 * thisMultiplier + channel2_1 * otherMultiplier) / t2; - } - if (missing1_2 && missing2_2) - mixed2 = _null; - else { - t2 = mixedAlpha == null ? 1 : mixedAlpha; - mixed2 = (channel1_2 * thisMultiplier + channel2_2 * otherMultiplier) / t2; - } - $label0$0: { - if (B.HslColorSpace_gsm === t1 || B.HwbColorSpace_06z === t1) { - if (missing1_0 && missing2_0) - t2 = _null; - else { - t2 = method.hue; - t2.toString; - t2 = _this._interpolateHues$4(channel1_0, channel2_0, t2, weight); - } - t2 = A.SassColor_SassColor$forSpaceInternal(t1, t2, mixed1, mixed2, mixedAlpha); - t1 = t2; - break $label0$0; - } - if (B.LchColorSpace_wv8 === t1 || B.OklchColorSpace_li8 === t1) { - if (missing1_2 && missing2_2) - t2 = _null; - else { - t2 = method.hue; - t2.toString; - t2 = _this._interpolateHues$4(channel1_2, channel2_2, t2, weight); - } - t2 = A.SassColor_SassColor$forSpaceInternal(t1, mixed0, mixed1, t2, mixedAlpha); - t1 = t2; - break $label0$0; - } - t1 = A.SassColor_SassColor$forSpaceInternal(t1, mixed0, mixed1, mixed2, mixedAlpha); - break $label0$0; - } - return t1.toSpace$2$legacyMissing(_this._space, false); - }, - _isAnalogousChannelMissing$3(original, output, outputChannelIndex) { - var originalChannel; - if (output.get$channelsOrNull()[outputChannelIndex] == null) - return true; - if (original === output) - return false; - originalChannel = A.IterableExtension_firstWhereOrNull(original._space._channels, output._space._channels[outputChannelIndex].get$isAnalogous()); - if (originalChannel == null) - return false; - return original.isChannelMissing$1(originalChannel.name); - }, - _interpolateHues$4(hue1, hue2, method, weight) { - var _0_0, _1_0; - $label1$1: { - if (B.HueInterpolationMethod_0 === method) { - $label0$0: { - _0_0 = hue2 - hue1; - if (_0_0 > 180) { - hue1 += 360; - break $label0$0; - } - if (_0_0 < -180) - hue2 += 360; - } - break $label1$1; - } - if (B.HueInterpolationMethod_1 === method) { - $label2$2: { - _1_0 = hue2 - hue1; - if (_1_0 > 0 && _1_0 < 180) { - hue2 += 360; - break $label2$2; - } - if (_1_0 > -180 && _1_0 <= 0) - hue1 += 360; - } - break $label1$1; - } - if (B.HueInterpolationMethod_2 === method && hue2 < hue1) { - hue2 += 360; - break $label1$1; - } - if (B.HueInterpolationMethod_3 === method && hue1 < hue2) { - hue1 += 360; - break $label1$1; - } - } - return hue1 * weight + hue2 * (1 - weight); - }, - plus$1(other) { - if (!(other instanceof A.SassNumber) && !(other instanceof A.SassColor)) - return this.super$Value$plus(other); - throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); - }, - minus$1(other) { - if (!(other instanceof A.SassNumber) && !(other instanceof A.SassColor)) - return this.super$Value$minus(other); - throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); - }, - dividedBy$1(other) { - if (!(other instanceof A.SassNumber) && !(other instanceof A.SassColor)) - return this.super$Value$dividedBy(other); - throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " / " + other.toString$0(0) + '".', null)); - }, - $eq(_, other) { - var t1, t2, _this = this; - if (other == null) - return false; - if (!(other instanceof A.SassColor)) - return false; - t1 = _this._space; - if (t1.get$isLegacyInternal()) { - t2 = other._space; - if (!t2.get$isLegacyInternal()) - return false; - if (!A.fuzzyEqualsNullable(_this.alphaOrNull, other.alphaOrNull)) - return false; - if (t1 === t2) - return A.fuzzyEqualsNullable(_this.channel0OrNull, other.channel0OrNull) && A.fuzzyEqualsNullable(_this.channel1OrNull, other.channel1OrNull) && A.fuzzyEqualsNullable(_this.channel2OrNull, other.channel2OrNull); - else - return _this.toSpace$1(B.RgbColorSpace_mlz).$eq(0, other.toSpace$1(B.RgbColorSpace_mlz)); - } - return t1 === other._space && A.fuzzyEqualsNullable(_this.channel0OrNull, other.channel0OrNull) && A.fuzzyEqualsNullable(_this.channel1OrNull, other.channel1OrNull) && A.fuzzyEqualsNullable(_this.channel2OrNull, other.channel2OrNull) && A.fuzzyEqualsNullable(_this.alphaOrNull, other.alphaOrNull); - }, - get$hashCode(_) { - var rgb, t2, t3, t4, t5, _this = this, - t1 = _this._space; - if (t1.get$isLegacyInternal()) { - rgb = _this.toSpace$1(B.RgbColorSpace_mlz); - t1 = rgb.channel0OrNull; - t1 = A.fuzzyHashCode(t1 == null ? 0 : t1); - t2 = rgb.channel1OrNull; - t2 = A.fuzzyHashCode(t2 == null ? 0 : t2); - t3 = rgb.channel2OrNull; - t3 = A.fuzzyHashCode(t3 == null ? 0 : t3); - t4 = _this.alphaOrNull; - return t1 ^ t2 ^ t3 ^ A.fuzzyHashCode(t4 == null ? 0 : t4); - } else { - t1 = A.Primitives_objectHashCode(t1); - t2 = _this.channel0OrNull; - t2 = A.fuzzyHashCode(t2 == null ? 0 : t2); - t3 = _this.channel1OrNull; - t3 = A.fuzzyHashCode(t3 == null ? 0 : t3); - t4 = _this.channel2OrNull; - t4 = A.fuzzyHashCode(t4 == null ? 0 : t4); - t5 = _this.alphaOrNull; - return (t1 ^ t2 ^ t3 ^ t4 ^ A.fuzzyHashCode(t5 == null ? 0 : t5)) >>> 0; - } - } - }; - A.SassColor$_forSpace_closure.prototype = { - call$1(alpha) { - return A.fuzzyAssertRange(alpha, 0, 1, "alpha"); - }, - $signature: 15 - }; - A._ColorFormatEnum.prototype = { - toString$0(_) { - return "rgbFunction"; - } - }; - A.SpanColorFormat.prototype = {}; - A.ColorChannel.prototype = { - isAnalogous$1(other) { - var _0_6_isSet, t1, _0_60, t2, _0_6_isSet0, - _0_1 = this.name, - _0_6 = other.name; - $label0$0: { - if ("red" !== _0_1) - _0_6_isSet = "x" === _0_1; - else - _0_6_isSet = true; - if (_0_6_isSet) { - if ("red" !== _0_6) - t1 = "x" === _0_6; - else - t1 = true; - _0_60 = _0_6; - } else { - _0_60 = null; - t1 = false; - } - t2 = true; - if (!t1) { - if ("green" !== _0_1) - t1 = "y" === _0_1; - else - t1 = true; - if (t1) { - _0_6_isSet0 = true; - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - if ("green" !== t1) { - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - t1 = "y" === t1; - } else - t1 = true; - } else - t1 = false; - if (!t1) { - if ("blue" !== _0_1) - t1 = "z" === _0_1; - else - t1 = true; - if (t1) { - _0_6_isSet0 = true; - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - if ("blue" !== t1) { - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - t1 = "z" === t1; - } else - t1 = true; - } else - t1 = false; - if (!t1) { - if ("chroma" !== _0_1) - t1 = "saturation" === _0_1; - else - t1 = true; - if (t1) { - _0_6_isSet0 = true; - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - if ("chroma" !== t1) { - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - t1 = "saturation" === t1; - } else - t1 = true; - } else - t1 = false; - if (!t1) { - if ("lightness" === _0_1) { - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_60 = t1; - _0_6_isSet = true; - } - t1 = "lightness" === t1; - } else - t1 = false; - if (!t1) - if ("hue" === _0_1) - t1 = "hue" === (_0_6_isSet ? _0_60 : _0_6); - else - t1 = false; - else - t1 = t2; - } else - t1 = t2; - } else - t1 = t2; - } else - t1 = t2; - } else - t1 = t2; - if (t1) - break $label0$0; - break $label0$0; - } - return t1; - } - }; - A.LinearChannel.prototype = {}; - A.GamutMapMethod.prototype = { - toString$0(_) { - return this.name; - } - }; - A.ClipGamutMap.prototype = { - map$1(_, color) { - var t1 = color._space, - t2 = t1._channels; - return A.SassColor_SassColor$forSpaceInternal(t1, this._clampChannel$2(color.channel0OrNull, t2[0]), this._clampChannel$2(color.channel1OrNull, t2[1]), this._clampChannel$2(color.channel2OrNull, t2[2]), color.alphaOrNull); - }, - _clampChannel$2(value, channel) { - var t1, min; - if (value == null) - t1 = null; - else - $label0$0: { - if (channel instanceof A.LinearChannel) { - min = channel.min; - t1 = isNaN(value) ? min : B.JSNumber_methods.clamp$2(value, min, channel.max); - break $label0$0; - } - t1 = value; - break $label0$0; - } - return t1; - } - }; - A.LocalMindeGamutMap.prototype = { - map$1(_, color) { - var clipped, max, min, minInGamut, chroma, current, e, - originOklch = color.toSpace$1(B.OklchColorSpace_li8), - lightness = originOklch.channel0OrNull, - hue = originOklch.channel2OrNull, - alpha = originOklch.alphaOrNull, - t1 = lightness == null, - t2 = t1 ? 0 : lightness; - if (t2 > 1 || A.fuzzyEquals(t2, 1)) { - t1 = color._space; - t2 = color.alphaOrNull; - return t1.get$isLegacyInternal() ? A.SassColor_SassColor$rgbInternal(255, 255, 255, t2, null).toSpace$1(t1) : A.SassColor_SassColor$forSpaceInternal(t1, 1, 1, 1, t2); - } else { - t1 = t1 ? 0 : lightness; - if (t1 < 0 || A.fuzzyEquals(t1, 0)) - return A.SassColor_SassColor$rgbInternal(0, 0, 0, color.alphaOrNull, null).toSpace$1(color._space); - } - clipped = color.get$isInGamut() ? color : B.ClipGamutMap_clip.map$1(0, color); - if (this._deltaEOK$2(clipped, color) < 0.02) - return clipped; - max = originOklch.channel1OrNull; - if (max == null) - max = 0; - for (t1 = color._space, min = 0, minInGamut = true; max - min > 0.0001;) { - chroma = (min + max) / 2; - current = B.OklchColorSpace_li8.convert$5(t1, lightness, chroma, hue, alpha); - if (minInGamut && current.get$isInGamut()) { - min = chroma; - continue; - } - clipped = current.get$isInGamut() ? current : B.ClipGamutMap_clip.map$1(0, current); - e = this._deltaEOK$2(clipped, current); - if (e < 0.02) { - if (0.02 - e < 0.0001) - return clipped; - min = chroma; - minInGamut = false; - } else - max = chroma; - } - return clipped; - }, - _deltaEOK$2(color1, color2) { - var t2, t3, t4, - lab1 = color1.toSpace$1(B.OklabColorSpace_yrt), - lab2 = color2.toSpace$1(B.OklabColorSpace_yrt), - t1 = lab1.channel0OrNull; - if (t1 == null) - t1 = 0; - t2 = lab2.channel0OrNull; - t1 = Math.pow(t1 - (t2 == null ? 0 : t2), 2); - t2 = lab1.channel1OrNull; - if (t2 == null) - t2 = 0; - t3 = lab2.channel1OrNull; - t2 = Math.pow(t2 - (t3 == null ? 0 : t3), 2); - t3 = lab1.channel2OrNull; - if (t3 == null) - t3 = 0; - t4 = lab2.channel2OrNull; - return Math.sqrt(t1 + t2 + Math.pow(t3 - (t4 == null ? 0 : t4), 2)); - } - }; - A.InterpolationMethod.prototype = { - toString$0(_) { - var t1 = this.hue; - t1 = t1 == null ? "" : " " + t1.toString$0(0) + " hue"; - return this.space.name + t1; - } - }; - A.HueInterpolationMethod.prototype = { - _enumToString$0() { - return "HueInterpolationMethod." + this._name; - } - }; - A.ColorSpace.prototype = { - get$isLegacyInternal() { - return false; - }, - get$isPolarInternal() { - return false; - }, - convert$5(dest, channel0, channel1, channel2, alpha) { - return this.convertLinear$5(dest, channel0, channel1, channel2, alpha); - }, - convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { - var t1, t2, transformedBlue, transformedGreen, transformedRed, linearRed, linearGreen, linearBlue, matrix, _this = this; - $label0$0: { - t1 = B.HslColorSpace_gsm !== dest; - if (!t1 || B.HwbColorSpace_06z === dest) { - t2 = B.SrgbColorSpace_AD4; - break $label0$0; - } - if (B.LabColorSpace_IF2 === dest || B.LchColorSpace_wv8 === dest) { - t2 = B.XyzD50ColorSpace_2No; - break $label0$0; - } - if (B.OklabColorSpace_yrt === dest || B.OklchColorSpace_li8 === dest) { - t2 = B.LmsColorSpace_8I8; - break $label0$0; - } - t2 = dest; - break $label0$0; - } - if (t2 === _this) { - transformedBlue = blue; - transformedGreen = green; - transformedRed = red; - } else { - linearRed = _this.toLinear$1(red == null ? 0 : red); - linearGreen = _this.toLinear$1(green == null ? 0 : green); - linearBlue = _this.toLinear$1(blue == null ? 0 : blue); - matrix = _this.transformationMatrix$1(t2); - transformedRed = t2.fromLinear$1(matrix[0] * linearRed + matrix[1] * linearGreen + matrix[2] * linearBlue); - transformedGreen = t2.fromLinear$1(matrix[3] * linearRed + matrix[4] * linearGreen + matrix[5] * linearBlue); - transformedBlue = t2.fromLinear$1(matrix[6] * linearRed + matrix[7] * linearGreen + matrix[8] * linearBlue); - } - $label1$1: { - if (!t1 || B.HwbColorSpace_06z === dest) { - t1 = B.SrgbColorSpace_AD4.convert$8$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingChroma, missingHue, missingLightness); - break $label1$1; - } - if (B.LabColorSpace_IF2 === dest || B.LchColorSpace_wv8 === dest) { - t1 = B.XyzD50ColorSpace_2No.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); - break $label1$1; - } - if (B.OklabColorSpace_yrt === dest || B.OklchColorSpace_li8 === dest) { - t1 = B.LmsColorSpace_8I8.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); - break $label1$1; - } - t1 = red == null ? null : transformedRed; - t2 = green == null ? null : transformedGreen; - t1 = A.SassColor_SassColor$forSpaceInternal(dest, t1, t2, blue == null ? null : transformedBlue, alpha); - break $label1$1; - } - return t1; - }, - convertLinear$5(dest, red, green, blue, alpha) { - return this.convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, false, false, false, false); - }, - toLinear$1(channel) { - return A.throwExpression(A.UnimplementedError$("[BUG] Color space " + this.toString$0(0) + " doesn't support linear conversions.")); - }, - fromLinear$1(channel) { - return A.throwExpression(A.UnimplementedError$("[BUG] Color space " + this.toString$0(0) + " doesn't support linear conversions.")); - }, - transformationMatrix$1(dest) { - return A.throwExpression(A.UnimplementedError$("[BUG] Color space conversion from " + this.toString$0(0) + " to " + dest.toString$0(0) + " not implemented.")); - }, - toString$0(_) { - return this.name; - } - }; - A.A98RgbColorSpace.prototype = { - get$isBoundedInternal() { - return true; - }, - toLinear$1(channel) { - return J.get$sign$in(channel) * Math.pow(Math.abs(channel), 2.19921875); - }, - fromLinear$1(channel) { - return J.get$sign$in(channel) * Math.pow(Math.abs(channel), 0.4547069271758437); - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { - t1 = $.$get$linearA98RgbToLinearSrgb(); - break $label0$0; - } - if (B.DisplayP3ColorSpace_NQk === dest) { - t1 = $.$get$linearA98RgbToLinearDisplayP3(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG === dest) { - t1 = $.$get$linearA98RgbToLinearProphotoRgb(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN === dest) { - t1 = $.$get$linearA98RgbToLinearRec2020(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA === dest) { - t1 = $.$get$linearA98RgbToXyzD65(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No === dest) { - t1 = $.$get$linearA98RgbToXyzD50(); - break $label0$0; - } - if (B.LmsColorSpace_8I8 === dest) { - t1 = $.$get$linearA98RgbToLms(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix(dest); - break $label0$0; - } - return t1; - } - }; - A.DisplayP3ColorSpace.prototype = { - get$isBoundedInternal() { - return true; - }, - toLinear$1(channel) { - return A.srgbAndDisplayP3ToLinear(channel); - }, - fromLinear$1(channel) { - return A.srgbAndDisplayP3FromLinear(channel); - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { - t1 = $.$get$linearDisplayP3ToLinearSrgb(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu === dest) { - t1 = $.$get$linearDisplayP3ToLinearA98Rgb(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG === dest) { - t1 = $.$get$linearDisplayP3ToLinearProphotoRgb(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN === dest) { - t1 = $.$get$linearDisplayP3ToLinearRec2020(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA === dest) { - t1 = $.$get$linearDisplayP3ToXyzD65(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No === dest) { - t1 = $.$get$linearDisplayP3ToXyzD50(); - break $label0$0; - } - if (B.LmsColorSpace_8I8 === dest) { - t1 = $.$get$linearDisplayP3ToLms(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix(dest); - break $label0$0; - } - return t1; - } - }; - A.HslColorSpace.prototype = { - get$isBoundedInternal() { - return true; - }, - get$isLegacyInternal() { - return true; - }, - get$isPolarInternal() { - return true; - }, - convert$5(dest, hue, saturation, lightness, alpha) { - var t1 = hue == null, - scaledHue = B.JSNumber_methods.$mod((t1 ? 0 : hue) / 360, 1), - t2 = saturation == null, - scaledSaturation = (t2 ? 0 : saturation) / 100, - t3 = lightness == null, - scaledLightness = (t3 ? 0 : lightness) / 100, - m2 = scaledLightness <= 0.5 ? scaledLightness * (scaledSaturation + 1) : scaledLightness + scaledSaturation - scaledLightness * scaledSaturation, - m1 = scaledLightness * 2 - m2; - return B.SrgbColorSpace_AD4.convert$8$missingChroma$missingHue$missingLightness(dest, A.hueToRgb(m1, m2, scaledHue + 0.3333333333333333), A.hueToRgb(m1, m2, scaledHue), A.hueToRgb(m1, m2, scaledHue - 0.3333333333333333), alpha, t2, t1, t3); - } - }; - A.HwbColorSpace.prototype = { - get$isBoundedInternal() { - return true; - }, - get$isLegacyInternal() { - return true; - }, - get$isPolarInternal() { - return true; - }, - convert$5(dest, hue, whiteness, blackness, alpha) { - var t3, t1 = {}, - t2 = hue == null, - scaledHue = B.JSNumber_methods.$mod(t2 ? 0 : hue, 360) / 360, - scaledWhiteness = t1.scaledWhiteness = (whiteness == null ? 0 : whiteness) / 100, - scaledBlackness = (blackness == null ? 0 : blackness) / 100, - sum = scaledWhiteness + scaledBlackness; - if (sum > 1) { - t3 = t1.scaledWhiteness = scaledWhiteness / sum; - scaledBlackness /= sum; - } else - t3 = scaledWhiteness; - t3 = new A.HwbColorSpace_convert_toRgb(t1, 1 - t3 - scaledBlackness); - return B.SrgbColorSpace_AD4.convert$6$missingHue(dest, t3.call$1(scaledHue + 0.3333333333333333), t3.call$1(scaledHue), t3.call$1(scaledHue - 0.3333333333333333), alpha, t2); - } - }; - A.HwbColorSpace_convert_toRgb.prototype = { - call$1(hue) { - return A.hueToRgb(0, 1, hue) * this.factor + this._box_0.scaledWhiteness; - }, - $signature: 15 - }; - A.LabColorSpace.prototype = { - get$isBoundedInternal() { - return false; - }, - convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, missingChroma, missingHue) { - var powerlessAB, t1, missingLightness, f1, t2, t3, t4; - switch (dest) { - case B.LabColorSpace_IF2: - powerlessAB = lightness == null || A.fuzzyEquals(lightness, 0); - t1 = a == null || powerlessAB ? null : a; - return A.SassColor$_forSpace(B.LabColorSpace_IF2, lightness, t1, b == null || powerlessAB ? null : b, alpha, null); - case B.LchColorSpace_wv8: - return A.labToLch(dest, lightness, a, b, alpha, false, false); - default: - missingLightness = lightness == null; - if (missingLightness) - lightness = 0; - f1 = (lightness + 16) / 116; - t1 = a == null; - t2 = this._convertFToXorZ$1((t1 ? 0 : a) / 500 + f1); - t3 = lightness > 8 ? Math.pow(f1, 3) : lightness / 903.2962962962963; - t4 = b == null; - return B.XyzD50ColorSpace_2No.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, t2 * 0.9642956764295677, t3, this._convertFToXorZ$1(f1 - (t4 ? 0 : b) / 200) * 0.8251046025104602, alpha, t1, t4, missingChroma, missingHue, missingLightness); - } - }, - convert$5(dest, lightness, a, b, alpha) { - return this.convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, false, false); - }, - _convertFToXorZ$1(component) { - var cubed = Math.pow(component, 3) + 0; - return cubed > 0.008856451679035631 ? cubed : (116 * component - 16) / 903.2962962962963; - } - }; - A.LchColorSpace.prototype = { - get$isBoundedInternal() { - return false; - }, - get$isPolarInternal() { - return true; - }, - convert$5(dest, lightness, chroma, hue, alpha) { - var t1 = hue == null, - hueRadians = (t1 ? 0 : hue) * 3.141592653589793 / 180, - t2 = chroma == null, - t3 = t2 ? 0 : chroma, - t4 = Math.cos(hueRadians), - t5 = t2 ? 0 : chroma; - return B.LabColorSpace_IF2.convert$7$missingChroma$missingHue(dest, lightness, t3 * t4, t5 * Math.sin(hueRadians), alpha, t2, t1); - } - }; - A.LmsColorSpace.prototype = { - get$isBoundedInternal() { - return false; - }, - convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, long, medium, short, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { - var t1, longScaled, mediumScaled, shortScaled, lightness, t2, t3, _null = null; - switch (dest) { - case B.OklabColorSpace_yrt: - t1 = long == null ? 0 : long; - longScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); - t1 = medium == null ? 0 : medium; - mediumScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); - t1 = short == null ? 0 : short; - shortScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); - t1 = $.$get$lmsToOklab(); - lightness = t1[0] * longScaled + t1[1] * mediumScaled + t1[2] * shortScaled; - t2 = missingLightness ? _null : lightness; - t3 = missingA ? _null : t1[3] * longScaled + t1[4] * mediumScaled + t1[5] * shortScaled; - return A.SassColor$_forSpace(B.OklabColorSpace_yrt, t2, t3, missingB ? _null : t1[6] * longScaled + t1[7] * mediumScaled + t1[8] * shortScaled, alpha, _null); - case B.OklchColorSpace_li8: - t1 = long == null ? 0 : long; - longScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); - t1 = medium == null ? 0 : medium; - mediumScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); - t1 = short == null ? 0 : short; - shortScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); - if (missingLightness) - t1 = _null; - else { - t1 = $.$get$lmsToOklab(); - t1 = t1[0] * longScaled + t1[1] * mediumScaled + t1[2] * shortScaled; - } - t2 = $.$get$lmsToOklab(); - return A.labToLch(dest, t1, t2[3] * longScaled + t2[4] * mediumScaled + t2[5] * shortScaled, t2[6] * longScaled + t2[7] * mediumScaled + t2[8] * shortScaled, alpha, missingChroma, missingHue); - default: - return this.super$ColorSpace$convertLinear(dest, long, medium, short, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); - } - }, - convert$5(dest, long, medium, short, alpha) { - return this.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, long, medium, short, alpha, false, false, false, false, false); - }, - toLinear$1(channel) { - return channel; - }, - fromLinear$1(channel) { - return channel; - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { - t1 = $.$get$lmsToLinearSrgb(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu === dest) { - t1 = $.$get$lmsToLinearA98Rgb(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG === dest) { - t1 = $.$get$lmsToLinearProphotoRgb(); - break $label0$0; - } - if (B.DisplayP3ColorSpace_NQk === dest) { - t1 = $.$get$lmsToLinearDisplayP3(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN === dest) { - t1 = $.$get$lmsToLinearRec2020(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA === dest) { - t1 = $.$get$lmsToXyzD65(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No === dest) { - t1 = $.$get$lmsToXyzD50(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix(dest); - break $label0$0; - } - return t1; - } - }; - A.OklabColorSpace.prototype = { - get$isBoundedInternal() { - return false; - }, - convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, missingChroma, missingHue) { - var missingLightness, missingA, missingB, t1; - if (dest === B.OklchColorSpace_li8) - return A.labToLch(dest, lightness, a, b, alpha, missingChroma, missingHue); - missingLightness = lightness == null; - missingA = a == null; - missingB = b == null; - if (missingLightness) - lightness = 0; - if (missingA) - a = 0; - if (missingB) - b = 0; - t1 = $.$get$oklabToLms(); - return B.LmsColorSpace_8I8.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, Math.pow(t1[0] * lightness + t1[1] * a + t1[2] * b, 3) + 0, Math.pow(t1[3] * lightness + t1[4] * a + t1[5] * b, 3) + 0, Math.pow(t1[6] * lightness + t1[7] * a + t1[8] * b, 3) + 0, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); - }, - convert$5(dest, lightness, a, b, alpha) { - return this.convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, false, false); - } - }; - A.OklchColorSpace.prototype = { - get$isBoundedInternal() { - return false; - }, - get$isPolarInternal() { - return true; - }, - convert$5(dest, lightness, chroma, hue, alpha) { - var t1 = hue == null, - hueRadians = (t1 ? 0 : hue) * 3.141592653589793 / 180, - t2 = chroma == null, - t3 = t2 ? 0 : chroma, - t4 = Math.cos(hueRadians), - t5 = t2 ? 0 : chroma; - return B.OklabColorSpace_yrt.convert$7$missingChroma$missingHue(dest, lightness, t3 * t4, t5 * Math.sin(hueRadians), alpha, t2, t1); - } - }; - A.ProphotoRgbColorSpace.prototype = { - get$isBoundedInternal() { - return true; - }, - toLinear$1(channel) { - var abs = Math.abs(channel); - return abs <= 0.03125 ? channel / 16 : J.get$sign$in(channel) * Math.pow(abs, 1.8); - }, - fromLinear$1(channel) { - var abs = Math.abs(channel); - return abs >= 0.001953125 ? J.get$sign$in(channel) * Math.pow(abs, 0.5555555555555556) : 16 * channel; - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { - t1 = $.$get$linearProphotoRgbToLinearSrgb(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu === dest) { - t1 = $.$get$linearProphotoRgbToLinearA98Rgb(); - break $label0$0; - } - if (B.DisplayP3ColorSpace_NQk === dest) { - t1 = $.$get$linearProphotoRgbToLinearDisplayP3(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN === dest) { - t1 = $.$get$linearProphotoRgbToLinearRec2020(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA === dest) { - t1 = $.$get$linearProphotoRgbToXyzD65(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No === dest) { - t1 = $.$get$linearProphotoRgbToXyzD50(); - break $label0$0; - } - if (B.LmsColorSpace_8I8 === dest) { - t1 = $.$get$linearProphotoRgbToLms(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix(dest); - break $label0$0; - } - return t1; - } - }; - A.Rec2020ColorSpace.prototype = { - get$isBoundedInternal() { - return true; - }, - toLinear$1(channel) { - var abs = Math.abs(channel); - return abs < 0.08124285829863151 ? channel / 4.5 : J.get$sign$in(channel) * Math.pow((abs + 1.09929682680944 - 1) / 1.09929682680944, 2.2222222222222223); - }, - fromLinear$1(channel) { - var abs = Math.abs(channel); - return abs > 0.018053968510807 ? J.get$sign$in(channel) * (1.09929682680944 * Math.pow(abs, 0.45) - 0.09929682680944008) : 4.5 * channel; - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { - t1 = $.$get$linearRec2020ToLinearSrgb(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu === dest) { - t1 = $.$get$linearRec2020ToLinearA98Rgb(); - break $label0$0; - } - if (B.DisplayP3ColorSpace_NQk === dest) { - t1 = $.$get$linearRec2020ToLinearDisplayP3(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG === dest) { - t1 = $.$get$linearRec2020ToLinearProphotoRgb(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA === dest) { - t1 = $.$get$linearRec2020ToXyzD65(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No === dest) { - t1 = $.$get$linearRec2020ToXyzD50(); - break $label0$0; - } - if (B.LmsColorSpace_8I8 === dest) { - t1 = $.$get$linearRec2020ToLms(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix(dest); - break $label0$0; - } - return t1; - } - }; - A.RgbColorSpace.prototype = { - get$isBoundedInternal() { - return true; - }, - get$isLegacyInternal() { - return true; - }, - convert$5(dest, red, green, blue, alpha) { - var t1 = red == null ? null : red / 255, - t2 = green == null ? null : green / 255; - return B.SrgbColorSpace_AD4.convert$5(dest, t1, t2, blue == null ? null : blue / 255, alpha); - }, - toLinear$1(channel) { - return A.srgbAndDisplayP3ToLinear(channel / 255); - }, - fromLinear$1(channel) { - return A.srgbAndDisplayP3FromLinear(channel) * 255; - } - }; - A.SrgbColorSpace.prototype = { - get$isBoundedInternal() { - return true; - }, - convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, missingChroma, missingHue, missingLightness) { - var max, min, delta, hue, lightness, saturation, t1, t2, whiteness, blackness, _null = null; - if (B.HslColorSpace_gsm === dest || B.HwbColorSpace_06z === dest) { - if (red == null) - red = 0; - if (green == null) - green = 0; - if (blue == null) - blue = 0; - max = Math.max(Math.max(red, green), blue); - min = Math.min(Math.min(red, green), blue); - delta = max - min; - if (max === min) - hue = 0; - else if (max === red) - hue = 60 * (green - blue) / delta + 360; - else - hue = max === green ? 60 * (blue - red) / delta + 120 : 60 * (red - green) / delta + 240; - if (dest === B.HslColorSpace_gsm) { - lightness = (min + max) / 2; - saturation = lightness === 0 || lightness === 1 ? 0 : 100 * (max - lightness) / Math.min(lightness, 1 - lightness); - if (saturation < 0) { - hue += 180; - saturation = Math.abs(saturation); - } - t1 = missingHue || A.fuzzyEquals(saturation, 0) ? _null : B.JSNumber_methods.$mod(hue, 360); - t2 = missingChroma ? _null : saturation; - return A.SassColor_SassColor$forSpaceInternal(dest, t1, t2, missingLightness ? _null : lightness * 100, alpha); - } else { - whiteness = min * 100; - blackness = 100 - max * 100; - if (!missingHue) { - t1 = whiteness + blackness; - t1 = t1 > 100 || A.fuzzyEquals(t1, 100); - } else - t1 = true; - return A.SassColor_SassColor$forSpaceInternal(dest, t1 ? _null : B.JSNumber_methods.$mod(hue, 360), whiteness, blackness, alpha); - } - } - if (B.RgbColorSpace_mlz === dest) { - t1 = red == null ? _null : red * 255; - t2 = green == null ? _null : green * 255; - return A.SassColor_SassColor$rgbInternal(t1, t2, blue == null ? _null : blue * 255, alpha, _null); - } - if (B.SrgbLinearColorSpace_sEs === dest) { - t1 = this.get$toLinear(); - return A.SassColor_SassColor$forSpaceInternal(dest, A.NullableExtension_andThen(red, t1), A.NullableExtension_andThen(green, t1), A.NullableExtension_andThen(blue, t1), alpha); - } - return this.super$ColorSpace$convertLinear(dest, red, green, blue, alpha, false, false, missingChroma, missingHue, missingLightness); - }, - convert$5(dest, red, green, blue, alpha) { - return this.convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, false, false); - }, - convert$6$missingHue(dest, red, green, blue, alpha, missingHue) { - return this.convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, missingHue, false); - }, - toLinear$1(channel) { - return A.srgbAndDisplayP3ToLinear(channel); - }, - fromLinear$1(channel) { - return A.srgbAndDisplayP3FromLinear(channel); - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.DisplayP3ColorSpace_NQk === dest) { - t1 = $.$get$linearSrgbToLinearDisplayP3(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu === dest) { - t1 = $.$get$linearSrgbToLinearA98Rgb(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG === dest) { - t1 = $.$get$linearSrgbToLinearProphotoRgb(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN === dest) { - t1 = $.$get$linearSrgbToLinearRec2020(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA === dest) { - t1 = $.$get$linearSrgbToXyzD65(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No === dest) { - t1 = $.$get$linearSrgbToXyzD50(); - break $label0$0; - } - if (B.LmsColorSpace_8I8 === dest) { - t1 = $.$get$linearSrgbToLms(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix(dest); - break $label0$0; - } - return t1; - } - }; - A.SrgbLinearColorSpace.prototype = { - get$isBoundedInternal() { - return true; - }, - convert$5(dest, red, green, blue, alpha) { - var t1; - $label0$0: { - if (B.RgbColorSpace_mlz === dest || B.HslColorSpace_gsm === dest || B.HwbColorSpace_06z === dest || B.SrgbColorSpace_AD4 === dest) { - t1 = B.SrgbColorSpace_AD4.convert$5(dest, A.NullableExtension_andThen(red, A.utils0__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen(green, A.utils0__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen(blue, A.utils0__srgbAndDisplayP3FromLinear$closure()), alpha); - break $label0$0; - } - t1 = this.super$ColorSpace$convert(dest, red, green, blue, alpha); - break $label0$0; - } - return t1; - }, - toLinear$1(channel) { - return channel; - }, - fromLinear$1(channel) { - return channel; - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.DisplayP3ColorSpace_NQk === dest) { - t1 = $.$get$linearSrgbToLinearDisplayP3(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu === dest) { - t1 = $.$get$linearSrgbToLinearA98Rgb(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG === dest) { - t1 = $.$get$linearSrgbToLinearProphotoRgb(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN === dest) { - t1 = $.$get$linearSrgbToLinearRec2020(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA === dest) { - t1 = $.$get$linearSrgbToXyzD65(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No === dest) { - t1 = $.$get$linearSrgbToXyzD50(); - break $label0$0; - } - if (B.LmsColorSpace_8I8 === dest) { - t1 = $.$get$linearSrgbToLms(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix(dest); - break $label0$0; - } - return t1; - } - }; - A.XyzD50ColorSpace.prototype = { - get$isBoundedInternal() { - return false; - }, - convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, x, y, z, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { - var f0, f1, f2, lightness, a, b, t1, _this = this, _null = null; - if (B.LabColorSpace_IF2 === dest || B.LchColorSpace_wv8 === dest) { - f0 = _this._convertComponentToLabF$1((x == null ? 0 : x) / 0.9642956764295677); - f1 = _this._convertComponentToLabF$1((y == null ? 0 : y) / 1); - f2 = _this._convertComponentToLabF$1((z == null ? 0 : z) / 0.8251046025104602); - lightness = missingLightness ? _null : 116 * f1 - 16; - a = 500 * (f0 - f1); - b = 200 * (f1 - f2); - if (dest === B.LabColorSpace_IF2) { - t1 = missingA ? _null : a; - t1 = A.SassColor$_forSpace(B.LabColorSpace_IF2, lightness, t1, missingB ? _null : b, alpha, _null); - } else - t1 = A.labToLch(B.LchColorSpace_wv8, lightness, a, b, alpha, missingChroma, missingHue); - return t1; - } - return _this.super$ColorSpace$convertLinear(dest, x, y, z, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); - }, - convert$5(dest, x, y, z, alpha) { - return this.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, x, y, z, alpha, false, false, false, false, false); - }, - _convertComponentToLabF$1(component) { - return component > 0.008856451679035631 ? Math.pow(component, 0.3333333333333333) + 0 : (903.2962962962963 * component + 16) / 116; - }, - toLinear$1(channel) { - return channel; - }, - fromLinear$1(channel) { - return channel; - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { - t1 = $.$get$xyzD50ToLinearSrgb(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu === dest) { - t1 = $.$get$xyzD50ToLinearA98Rgb(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG === dest) { - t1 = $.$get$xyzD50ToLinearProphotoRgb(); - break $label0$0; - } - if (B.DisplayP3ColorSpace_NQk === dest) { - t1 = $.$get$xyzD50ToLinearDisplayP3(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN === dest) { - t1 = $.$get$xyzD50ToLinearRec2020(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA === dest) { - t1 = $.$get$xyzD50ToXyzD65(); - break $label0$0; - } - if (B.LmsColorSpace_8I8 === dest) { - t1 = $.$get$xyzD50ToLms(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix(dest); - break $label0$0; - } - return t1; - } - }; - A.XyzD65ColorSpace.prototype = { - get$isBoundedInternal() { - return false; - }, - toLinear$1(channel) { - return channel; - }, - fromLinear$1(channel) { - return channel; - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs === dest || B.SrgbColorSpace_AD4 === dest || B.RgbColorSpace_mlz === dest) { - t1 = $.$get$xyzD65ToLinearSrgb(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu === dest) { - t1 = $.$get$xyzD65ToLinearA98Rgb(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG === dest) { - t1 = $.$get$xyzD65ToLinearProphotoRgb(); - break $label0$0; - } - if (B.DisplayP3ColorSpace_NQk === dest) { - t1 = $.$get$xyzD65ToLinearDisplayP3(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN === dest) { - t1 = $.$get$xyzD65ToLinearRec2020(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No === dest) { - t1 = $.$get$xyzD65ToXyzD50(); - break $label0$0; - } - if (B.LmsColorSpace_8I8 === dest) { - t1 = $.$get$xyzD65ToLms(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix(dest); - break $label0$0; - } - return t1; - } - }; - A.SassFunction.prototype = { - accept$1$1(visitor) { - var t1, t2; - if (!visitor._inspect) - A.throwExpression(A.SassScriptException$(this.toString$0(0) + " isn't a valid CSS value.", null)); - t1 = visitor._serialize$_buffer; - t1.write$1(0, "get-function("); - t2 = this.callable; - visitor._visitQuotedString$1(t2.get$name(t2)); - t1.writeCharCode$1(41); - return null; - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertFunction$1($name) { - return this; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.SassFunction && this.callable.$eq(0, other.callable); - }, - get$hashCode(_) { - var t1 = this.callable; - return t1.get$hashCode(t1); - } - }; - A.SassList.prototype = { - get$separator(_) { - return this._separator; - }, - get$hasBrackets() { - return this._hasBrackets; - }, - get$isBlank() { - return !this._hasBrackets && B.JSArray_methods.every$1(this._list$_contents, new A.SassList_isBlank_closure()); - }, - get$asList() { - return this._list$_contents; - }, - get$lengthAsList() { - return this._list$_contents.length; - }, - SassList$3$brackets(contents, _separator, brackets) { - if (this._separator === B.ListSeparator_undecided_null_undecided && this._list$_contents.length > 1) - throw A.wrapException(A.ArgumentError$(string$.A_list, null)); - }, - toString$0(_) { - var t2, _this = this, - t1 = true; - if (!_this._hasBrackets) { - t2 = _this._list$_contents.length; - if (t2 !== 0) - t1 = t2 === 1 && _this._separator === B.ListSeparator_ECn; - } - if (t1) - return _this.super$Value$toString(0); - return "(" + _this.super$Value$toString(0) + ")"; - }, - accept$1$1(visitor) { - return visitor.visitList$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertMap$1($name) { - return this._list$_contents.length === 0 ? B.SassMap_Map_empty : this.super$Value$assertMap($name); - }, - tryMap$0() { - return this._list$_contents.length === 0 ? B.SassMap_Map_empty : null; - }, - $eq(_, other) { - var t1, _this = this; - if (other == null) - return false; - if (!(other instanceof A.SassList && other._separator === _this._separator && other._hasBrackets === _this._hasBrackets && B.C_ListEquality.equals$2(0, other._list$_contents, _this._list$_contents))) - t1 = _this._list$_contents.length === 0 && other instanceof A.SassMap && other.get$asList().length === 0; - else - t1 = true; - return t1; - }, - get$hashCode(_) { - return B.C_ListEquality0.hash$1(this._list$_contents); - } - }; - A.SassList_isBlank_closure.prototype = { - call$1(element) { - return element.get$isBlank(); - }, - $signature: 75 - }; - A.ListSeparator.prototype = { - _enumToString$0() { - return "ListSeparator." + this._name; - }, - toString$0(_) { - return this._list$_name; - } - }; - A.SassMap.prototype = { - get$separator(_) { - var t1 = this._map$_contents; - return t1.get$isEmpty(t1) ? B.ListSeparator_undecided_null_undecided : B.ListSeparator_ECn; - }, - get$asList() { - var t3, t4, t5, result, - t1 = type$.JSArray_Value, - t2 = A._setArrayType([], t1); - for (t3 = type$.Value, t4 = A.MapExtensions_get_pairs(this._map$_contents, t3, t3), t4 = t4.get$iterator(t4); t4.moveNext$0();) { - t5 = t4.get$current(t4); - result = A.List_List$from(A._setArrayType([t5._0, t5._1], t1), false, t3); - result.fixed$length = Array; - result.immutable$list = Array; - t2.push(new A.SassList(result, B.ListSeparator_nbm, false)); - } - return t2; - }, - get$lengthAsList() { - var t1 = this._map$_contents; - return t1.get$length(t1); - }, - accept$1$1(visitor) { - return visitor.visitMap$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertMap$1($name) { - return this; - }, - tryMap$0() { - return this; - }, - $eq(_, other) { - var t1; - if (other == null) - return false; - if (!(other instanceof A.SassMap && B.C_MapEquality.equals$2(0, other._map$_contents, this._map$_contents))) { - t1 = this._map$_contents; - t1 = t1.get$isEmpty(t1) && other instanceof A.SassList && other._list$_contents.length === 0; - } else - t1 = true; - return t1; - }, - get$hashCode(_) { - var t1 = this._map$_contents; - return t1.get$isEmpty(t1) ? B.C_ListEquality0.hash$1(B.List_empty8) : B.C_MapEquality.hash$1(t1); - } - }; - A.SassMixin.prototype = { - accept$1$1(visitor) { - var t1, t2; - if (!visitor._inspect) - A.throwExpression(A.SassScriptException$(this.toString$0(0) + " isn't a valid CSS value.", null)); - t1 = visitor._serialize$_buffer; - t1.write$1(0, "get-mixin("); - t2 = this.callable; - visitor._visitQuotedString$1(t2.get$name(t2)); - t1.writeCharCode$1(41); - return null; - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertMixin$1($name) { - return this; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.SassMixin && this.callable.$eq(0, other.callable); - }, - get$hashCode(_) { - var t1 = this.callable; - return t1.get$hashCode(t1); - } - }; - A._SassNull.prototype = { - get$isTruthy() { - return false; - }, - get$isBlank() { - return true; - }, - get$realNull() { - return null; - }, - accept$1$1(visitor) { - if (visitor._inspect) - visitor._serialize$_buffer.write$1(0, "null"); - return null; - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - unaryNot$0() { - return B.SassBoolean_true; - } - }; - A.SassNumber.prototype = { - get$unitString() { - var _this = this; - return _this.get$hasUnits() ? _this._unitString$2(_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this)) : ""; - }, - accept$1$1(visitor) { - return visitor.visitNumber$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - withoutSlash$0() { - var _this = this; - return _this.asSlash == null ? _this : _this.withValue$1(_this._number$_value); - }, - assertNumber$1($name) { - return this; - }, - assertNumber$0() { - return this.assertNumber$1(null); - }, - assertInt$1($name) { - var _0_0 = A.fuzzyAsInt(this._number$_value); - if (_0_0 != null) - return _0_0; - throw A.wrapException(A.SassScriptException$(this.toString$0(0) + " is not an int.", $name)); - }, - assertInt$0() { - return this.assertInt$1(null); - }, - valueInRange$3(min, max, $name) { - var _this = this, - _0_0 = A.fuzzyCheckRange(_this._number$_value, min, max); - if (_0_0 != null) - return _0_0; - throw A.wrapException(A.SassScriptException$("Expected " + _this.toString$0(0) + " to be within " + min + _this.get$unitString() + " and " + max + _this.get$unitString() + ".", $name)); - }, - valueInRangeWithUnit$4(min, max, $name, unit) { - var _0_0 = A.fuzzyCheckRange(this._number$_value, min, max); - if (_0_0 != null) - return _0_0; - throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to be within " + min + unit + " and " + max + unit + ".", $name)); - }, - hasCompatibleUnits$1(other) { - var _this = this; - if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length) - return false; - if (_this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) - return false; - return _this.isComparableTo$1(other); - }, - assertUnit$2(unit, $name) { - if (this.hasUnit$1(unit)) - return; - throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + ' to have unit "' + unit + '".', $name)); - }, - assertNoUnits$1($name) { - if (!this.get$hasUnits()) - return; - throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to have no units.", $name)); - }, - assertNoUnits$0() { - return this.assertNoUnits$1(null); - }, - convertValueToMatch$3(other, $name, otherName) { - return this._coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), false, $name, other, otherName); - }, - convertValueToMatch$1(other) { - return this.convertValueToMatch$3(other, null, null); - }, - coerce$3(newNumerators, newDenominators, $name) { - return A.SassNumber_SassNumber$withUnits(this.coerceValue$3(newNumerators, newDenominators, $name), newDenominators, newNumerators); - }, - coerce$2(newNumerators, newDenominators) { - return this.coerce$3(newNumerators, newDenominators, null); - }, - coerceValue$3(newNumerators, newDenominators, $name) { - return this._coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, true, $name); - }, - coerceValueToUnit$2(unit, $name) { - var t1 = type$.JSArray_String; - return this.coerceValue$3(A._setArrayType([unit], t1), A._setArrayType([], t1), $name); - }, - coerceValueToUnit$1(unit) { - return this.coerceValueToUnit$2(unit, null); - }, - coerceToMatch$3(other, $name, otherName) { - var t1 = this.coerceValueToMatch$3(other, $name, otherName), - t2 = other.get$numeratorUnits(other); - return A.SassNumber_SassNumber$withUnits(t1, other.get$denominatorUnits(other), t2); - }, - coerceValueToMatch$3(other, $name, otherName) { - return this._coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), true, $name, other, otherName); - }, - coerceValueToMatch$1(other) { - return this.coerceValueToMatch$3(other, null, null); - }, - _coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, other, otherName) { - var otherHasUnits, t1, compatibilityException, oldNumerators, _i, oldDenominators, _this = this, _box_0 = {}; - if (B.C_ListEquality.equals$2(0, _this.get$numeratorUnits(_this), newNumerators) && B.C_ListEquality.equals$2(0, _this.get$denominatorUnits(_this), newDenominators)) - return _this._number$_value; - otherHasUnits = newNumerators.length !== 0 || newDenominators.length !== 0; - if (coerceUnitless) - t1 = !_this.get$hasUnits() || !otherHasUnits; - else - t1 = false; - if (t1) - return _this._number$_value; - compatibilityException = new A.SassNumber__coerceOrConvertValue_compatibilityException(_this, other, otherName, otherHasUnits, $name, newNumerators, newDenominators); - _box_0.value = _this._number$_value; - t1 = _this.get$numeratorUnits(_this); - oldNumerators = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); - for (t1 = newNumerators.length, _i = 0; _i < newNumerators.length; newNumerators.length === t1 || (0, A.throwConcurrentModificationError)(newNumerators), ++_i) - A.removeFirstWhere(oldNumerators, new A.SassNumber__coerceOrConvertValue_closure(_box_0, newNumerators[_i]), new A.SassNumber__coerceOrConvertValue_closure0(compatibilityException)); - t1 = _this.get$denominatorUnits(_this); - oldDenominators = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); - for (t1 = newDenominators.length, _i = 0; _i < newDenominators.length; newDenominators.length === t1 || (0, A.throwConcurrentModificationError)(newDenominators), ++_i) - A.removeFirstWhere(oldDenominators, new A.SassNumber__coerceOrConvertValue_closure1(_box_0, newDenominators[_i]), new A.SassNumber__coerceOrConvertValue_closure2(compatibilityException)); - if (oldNumerators.length !== 0 || oldDenominators.length !== 0) - throw A.wrapException(compatibilityException.call$0()); - return _box_0.value; - }, - _coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, coerceUnitless, $name) { - return this._coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, null, null); - }, - isComparableTo$1(other) { - var exception; - if (!this.get$hasUnits() || !other.get$hasUnits()) - return true; - try { - this.greaterThan$1(other); - return true; - } catch (exception) { - if (A.unwrapException(exception) instanceof A.SassScriptException) - return false; - else - throw exception; - } - }, - greaterThan$1(other) { - if (other instanceof A.SassNumber) - return this._coerceUnits$2(other, A.number0__fuzzyGreaterThan$closure()) ? B.SassBoolean_true : B.SassBoolean_false; - throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); - }, - greaterThanOrEquals$1(other) { - if (other instanceof A.SassNumber) - return this._coerceUnits$2(other, A.number0__fuzzyGreaterThanOrEquals$closure()) ? B.SassBoolean_true : B.SassBoolean_false; - throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); - }, - lessThan$1(other) { - if (other instanceof A.SassNumber) - return this._coerceUnits$2(other, A.number0__fuzzyLessThan$closure()) ? B.SassBoolean_true : B.SassBoolean_false; - throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); - }, - lessThanOrEquals$1(other) { - if (other instanceof A.SassNumber) - return this._coerceUnits$2(other, A.number0__fuzzyLessThanOrEquals$closure()) ? B.SassBoolean_true : B.SassBoolean_false; - throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); - }, - modulo$1(other) { - if (other instanceof A.SassNumber) - return this.withValue$1(this._coerceUnits$2(other, A.number0__moduloLikeSass$closure())); - throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); - }, - plus$1(other) { - var _this = this; - if (other instanceof A.SassNumber) - return _this.withValue$1(_this._coerceUnits$2(other, new A.SassNumber_plus_closure())); - if (!(other instanceof A.SassColor)) - return _this.super$Value$plus(other); - throw A.wrapException(A.SassScriptException$('Undefined operation "' + _this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); - }, - minus$1(other) { - var _this = this; - if (other instanceof A.SassNumber) - return _this.withValue$1(_this._coerceUnits$2(other, new A.SassNumber_minus_closure())); - if (!(other instanceof A.SassColor)) - return _this.super$Value$minus(other); - throw A.wrapException(A.SassScriptException$('Undefined operation "' + _this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); - }, - times$1(other) { - var _this = this; - if (other instanceof A.SassNumber) { - if (!other.get$hasUnits()) - return _this.withValue$1(_this._number$_value * other._number$_value); - return _this.multiplyUnits$3(_this._number$_value * other._number$_value, other.get$numeratorUnits(other), other.get$denominatorUnits(other)); - } - throw A.wrapException(A.SassScriptException$('Undefined operation "' + _this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); - }, - dividedBy$1(other) { - var _this = this; - if (other instanceof A.SassNumber) { - if (!other.get$hasUnits()) - return _this.withValue$1(_this._number$_value / other._number$_value); - return _this.multiplyUnits$3(_this._number$_value / other._number$_value, other.get$denominatorUnits(other), other.get$numeratorUnits(other)); - } - return _this.super$Value$dividedBy(other); - }, - unaryPlus$0() { - return this; - }, - _coerceUnits$1$2(other, operation) { - var t1, exception; - try { - t1 = operation.call$2(this._number$_value, other.coerceValueToMatch$1(this)); - return t1; - } catch (exception) { - if (A.unwrapException(exception) instanceof A.SassScriptException) { - this.coerceValueToMatch$1(other); - throw exception; - } else - throw exception; - } - }, - _coerceUnits$2(other, operation) { - return this._coerceUnits$1$2(other, operation, type$.dynamic); - }, - multiplyUnits$3(value, otherNumerators, otherDenominators) { - var t1, _0_1, _0_6, _0_3, _0_9, _0_9_isSet, _0_7, _0_7_isSet, t2, _0_2, denominators_case_0, _0_11_isSet, _0_11, _0_13, _0_13_isSet, _0_10, numerators_case_0, t4, t3, t5, t6, t7, numerators_case_1, denominators_case_1, t0, newNumerators, mutableOtherDenominators, _i, numerator, mutableDenominatorUnits, _this = this, _null = null, _box_0 = {}; - _box_0.value = value; - t1 = [_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this), otherNumerators, otherDenominators]; - _0_1 = t1[0]; - _0_6 = _null; - _0_3 = _null; - _0_9 = _null; - _0_9_isSet = false; - _0_7 = _null; - _0_7_isSet = false; - t2 = false; - _0_2 = t1[1]; - _0_3 = t1[2]; - _0_6 = _0_3.length <= 0; - _0_7_isSet = _0_6; - if (_0_7_isSet) { - _0_7 = t1[3]; - _0_9 = _0_7.length <= 0; - t2 = _0_9; - } - _0_9_isSet = _0_7_isSet; - denominators_case_0 = _0_2; - _0_11_isSet = !t2; - _0_11 = _null; - _0_13 = _null; - if (_0_11_isSet) { - _0_11 = _0_1.length <= 0; - _0_13_isSet = _0_11; - _0_10 = _0_1; - if (_0_13_isSet) { - _0_13 = _0_2.length <= 0; - t2 = _0_13; - if (t2) { - if (_0_7_isSet) - denominators_case_0 = _0_7; - else { - _0_7 = t1[3]; - denominators_case_0 = _0_7; - _0_7_isSet = true; - } - numerators_case_0 = _0_3; - } else - numerators_case_0 = _0_1; - } else { - numerators_case_0 = _0_1; - t2 = false; - } - _0_1 = _0_10; - } else { - numerators_case_0 = _0_1; - _0_13_isSet = false; - t2 = true; - } - if (t2) { - t4 = denominators_case_0; - t3 = numerators_case_0; - } else { - t4 = _null; - t3 = t4; - } - if (!t2) { - t2 = _null; - t5 = _null; - if (_0_11_isSet) - t6 = _0_11; - else { - _0_11 = _0_1.length <= 0; - t6 = _0_11; - } - t7 = false; - if (t6) { - if (_0_9_isSet) - t2 = _0_9; - else { - if (_0_7_isSet) - t2 = _0_7; - else { - _0_7 = t1[3]; - t2 = _0_7; - _0_7_isSet = true; - } - _0_9 = t2.length <= 0; - t2 = _0_9; - } - numerators_case_1 = _0_3; - denominators_case_1 = _0_2; - } else { - numerators_case_1 = t2; - t2 = t7; - denominators_case_1 = t5; - } - if (!t2) { - t2 = false; - if (_0_13_isSet) - t5 = _0_13; - else { - _0_13 = _0_2.length <= 0; - t5 = _0_13; - } - if (t5) { - if (_0_6) - denominators_case_1 = _0_7_isSet ? _0_7 : t1[3]; - t1 = _0_6; - } else - t1 = t2; - numerators_case_1 = _0_1; - } else - t1 = true; - if (t1) { - t1 = !_this._areAnyConvertible$2(numerators_case_1, denominators_case_1); - if (t1) { - t3 = denominators_case_1; - t2 = numerators_case_1; - } else { - t2 = t3; - t3 = t4; - } - t0 = t3; - t3 = t1; - t1 = t2; - t2 = t0; - } else { - t2 = t4; - t1 = t3; - t3 = false; - } - } else { - t2 = t4; - t1 = t3; - t3 = true; - } - if (t3) - return A.SassNumber_SassNumber$withUnits(value, t2, t1); - newNumerators = A._setArrayType([], type$.JSArray_String); - mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); - for (t1 = _this.get$numeratorUnits(_this), t2 = t1.length, _i = 0; _i < t2; ++_i) { - numerator = t1[_i]; - A.removeFirstWhere(mutableOtherDenominators, new A.SassNumber_multiplyUnits_closure(_box_0, numerator), new A.SassNumber_multiplyUnits_closure0(newNumerators, numerator)); - } - t1 = _this.get$denominatorUnits(_this); - mutableDenominatorUnits = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); - for (t1 = otherNumerators.length, _i = 0; _i < t1; ++_i) { - numerator = otherNumerators[_i]; - A.removeFirstWhere(mutableDenominatorUnits, new A.SassNumber_multiplyUnits_closure1(_box_0, numerator), new A.SassNumber_multiplyUnits_closure2(newNumerators, numerator)); - } - t1 = _box_0.value; - B.JSArray_methods.addAll$1(mutableDenominatorUnits, mutableOtherDenominators); - return A.SassNumber_SassNumber$withUnits(t1, mutableDenominatorUnits, newNumerators); - }, - _areAnyConvertible$2(units1, units2) { - return B.JSArray_methods.any$1(units1, new A.SassNumber__areAnyConvertible_closure(units2)); - }, - _unitString$2(numerators, denominators) { - var _0_4, _0_7, _0_6, _0_5, t1, _0_9, _0_6_isSet, _0_5_isSet, _0_10, denominator, _null = null; - $label0$0: { - _0_4 = numerators.length <= 0; - _0_7 = _null; - _0_6 = _null; - _0_5 = _null; - if (_0_4) { - _0_6 = denominators.length; - t1 = _0_6; - _0_7 = t1 <= 0; - t1 = _0_7; - _0_5 = denominators; - } else - t1 = false; - if (t1) { - t1 = "no units"; - break $label0$0; - } - _0_9 = _null; - if (_0_4) { - _0_9 = _0_6 === 1; - t1 = _0_9; - _0_6_isSet = true; - _0_5_isSet = true; - } else { - _0_5_isSet = _0_4; - _0_6_isSet = _0_5_isSet; - t1 = false; - } - if (t1) { - _0_10 = (_0_5_isSet ? _0_5 : denominators)[0]; - denominator = _0_10; - t1 = denominator + "^-1"; - break $label0$0; - } - if (_0_4) { - t1 = "(" + B.JSArray_methods.join$1(denominators, "*") + ")^-1"; - break $label0$0; - } - if (_0_6_isSet) - t1 = _0_6; - else { - if (_0_5_isSet) - t1 = _0_5; - else { - t1 = denominators; - _0_5 = t1; - _0_5_isSet = true; - } - _0_6 = t1.length; - t1 = _0_6; - _0_6_isSet = true; - } - _0_7 = t1 <= 0; - t1 = _0_7; - if (t1) { - t1 = B.JSArray_methods.join$1(numerators, "*"); - break $label0$0; - } - if (_0_6_isSet) - t1 = _0_6; - else { - if (_0_5_isSet) - t1 = _0_5; - else { - t1 = denominators; - _0_5 = t1; - _0_5_isSet = true; - } - _0_6 = t1.length; - t1 = _0_6; - } - _0_9 = t1 === 1; - t1 = _0_9; - if (t1) { - _0_10 = (_0_5_isSet ? _0_5 : denominators)[0]; - denominator = _0_10; - t1 = B.JSArray_methods.join$1(numerators, "*") + "/" + denominator; - break $label0$0; - } - t1 = B.JSArray_methods.join$1(numerators, "*") + "/(" + B.JSArray_methods.join$1(denominators, "*") + ")"; - break $label0$0; - } - return t1; - }, - $eq(_, other) { - var _this = this; - if (other == null) - return false; - if (!(other instanceof A.SassNumber)) - return false; - if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length || _this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) - return false; - if (!_this.get$hasUnits()) - return A.fuzzyEquals(_this._number$_value, other._number$_value); - if (!B.C_ListEquality.equals$2(0, _this._canonicalizeUnitList$1(_this.get$numeratorUnits(_this)), _this._canonicalizeUnitList$1(other.get$numeratorUnits(other))) || !B.C_ListEquality.equals$2(0, _this._canonicalizeUnitList$1(_this.get$denominatorUnits(_this)), _this._canonicalizeUnitList$1(other.get$denominatorUnits(other)))) - return false; - return A.fuzzyEquals(_this._number$_value * _this._canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._canonicalMultiplier$1(_this.get$denominatorUnits(_this)), other._number$_value * _this._canonicalMultiplier$1(other.get$numeratorUnits(other)) / _this._canonicalMultiplier$1(other.get$denominatorUnits(other))); - }, - get$hashCode(_) { - var _this = this, - t1 = _this.hashCache; - return t1 == null ? _this.hashCache = A.fuzzyHashCode(_this._number$_value * _this._canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._canonicalMultiplier$1(_this.get$denominatorUnits(_this))) : t1; - }, - _canonicalizeUnitList$1(units) { - var type, - t1 = units.length; - if (t1 === 0) - return units; - if (t1 === 1) { - type = $.$get$_typesByUnit().$index(0, B.JSArray_methods.get$first(units)); - if (type == null) - t1 = units; - else { - t1 = B.Map_397RH.$index(0, type); - t1.toString; - t1 = A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_String); - } - return t1; - } - t1 = A._arrayInstanceType(units)._eval$1("MappedListIterable<1,String>"); - t1 = A.List_List$of(new A.MappedListIterable(units, new A.SassNumber__canonicalizeUnitList_closure(), t1), true, t1._eval$1("ListIterable.E")); - B.JSArray_methods.sort$0(t1); - return t1; - }, - _canonicalMultiplier$1(units) { - return B.JSArray_methods.fold$2(units, 1, new A.SassNumber__canonicalMultiplier_closure(this)); - }, - canonicalMultiplierForUnit$1(unit) { - var t1, - innerMap = B.Map_gQqJO.$index(0, unit); - if (innerMap == null) - t1 = 1; - else { - t1 = innerMap.get$values(innerMap); - t1 = 1 / t1.get$first(t1); - } - return t1; - }, - unitSuggestion$2($name, unit) { - var t2, t3, result, _this = this, - t1 = _this.get$denominatorUnits(_this); - t1 = new A.MappedListIterable(t1, new A.SassNumber_unitSuggestion_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); - t2 = _this.get$numeratorUnits(_this); - t2 = new A.MappedListIterable(t2, new A.SassNumber_unitSuggestion_closure0(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,String>")).join$0(0); - t3 = unit == null ? "" : " * 1" + unit; - result = "$" + $name + t1 + t2 + t3; - return _this.get$numeratorUnits(_this).length === 0 ? result : "calc(" + result + ")"; - }, - unitSuggestion$1($name) { - return this.unitSuggestion$2($name, null); - } - }; - A.SassNumber__coerceOrConvertValue_compatibilityException.prototype = { - call$0() { - var t2, t3, message, t4, type, unit, _this = this, - t1 = _this.other; - if (t1 != null) { - t2 = _this.$this; - t3 = t2.toString$0(0) + " and"; - message = new A.StringBuffer(t3); - t4 = _this.otherName; - if (t4 != null) - t3 = message._contents = t3 + (" $" + t4 + ":"); - t1 = t3 + (" " + t1.toString$0(0) + " have incompatible units"); - message._contents = t1; - if (!t2.get$hasUnits() || !_this.otherHasUnits) - message._contents = t1 + " (one has units and the other doesn't)"; - t1 = message.toString$0(0) + "."; - t2 = _this.name; - return new A.SassScriptException(t2 == null ? t1 : "$" + t2 + ": " + t1); - } else if (!_this.otherHasUnits) { - t1 = "Expected " + _this.$this.toString$0(0) + " to have no units."; - t2 = _this.name; - return new A.SassScriptException(t2 == null ? t1 : "$" + t2 + ": " + t1); - } else { - t1 = _this.newNumerators; - if (t1.length === 1 && _this.newDenominators.length === 0) { - type = $.$get$_typesByUnit().$index(0, B.JSArray_methods.get$first(t1)); - if (type != null) { - t1 = _this.$this.toString$0(0); - t2 = B.JSArray_methods.contains$1(A._setArrayType([97, 101, 105, 111, 117], type$.JSArray_int), type.charCodeAt(0)) ? "an " + type : "a " + type; - t3 = B.Map_397RH.$index(0, type); - t3.toString; - t3 = "Expected " + t1 + " to have " + t2 + " unit (" + B.JSArray_methods.join$1(t3, ", ") + ")."; - t2 = _this.name; - return new A.SassScriptException(t2 == null ? t3 : "$" + t2 + ": " + t3); - } - } - t2 = _this.newDenominators; - unit = A.pluralize("unit", t1.length + t2.length, null); - t3 = _this.$this; - t2 = "Expected " + t3.toString$0(0) + " to have " + unit + " " + t3._unitString$2(t1, t2) + "."; - t1 = _this.name; - return new A.SassScriptException(t1 == null ? t2 : "$" + t1 + ": " + t2); - } - }, - $signature: 349 - }; - A.SassNumber__coerceOrConvertValue_closure.prototype = { - call$1(oldNumerator) { - var factor = A.conversionFactor(this.newNumerator, oldNumerator); - if (factor == null) - return false; - this._box_0.value *= factor; - return true; - }, - $signature: 5 - }; - A.SassNumber__coerceOrConvertValue_closure0.prototype = { - call$0() { - return A.throwExpression(this.compatibilityException.call$0()); - }, - $signature: 0 - }; - A.SassNumber__coerceOrConvertValue_closure1.prototype = { - call$1(oldDenominator) { - var factor = A.conversionFactor(this.newDenominator, oldDenominator); - if (factor == null) - return false; - this._box_0.value /= factor; - return true; - }, - $signature: 5 - }; - A.SassNumber__coerceOrConvertValue_closure2.prototype = { - call$0() { - return A.throwExpression(this.compatibilityException.call$0()); - }, - $signature: 0 - }; - A.SassNumber_plus_closure.prototype = { - call$2(num1, num2) { - return num1 + num2; - }, - $signature: 57 - }; - A.SassNumber_minus_closure.prototype = { - call$2(num1, num2) { - return num1 - num2; - }, - $signature: 57 - }; - A.SassNumber_multiplyUnits_closure.prototype = { - call$1(denominator) { - var factor = A.conversionFactor(this.numerator, denominator); - if (factor == null) - return false; - this._box_0.value /= factor; - return true; - }, - $signature: 5 - }; - A.SassNumber_multiplyUnits_closure0.prototype = { - call$0() { - return this.newNumerators.push(this.numerator); - }, - $signature: 0 - }; - A.SassNumber_multiplyUnits_closure1.prototype = { - call$1(denominator) { - var factor = A.conversionFactor(this.numerator, denominator); - if (factor == null) - return false; - this._box_0.value /= factor; - return true; - }, - $signature: 5 - }; - A.SassNumber_multiplyUnits_closure2.prototype = { - call$0() { - return this.newNumerators.push(this.numerator); - }, - $signature: 0 - }; - A.SassNumber__areAnyConvertible_closure.prototype = { - call$1(unit1) { - var t1, - _0_0 = B.Map_gQqJO.$index(0, unit1); - $label0$0: { - if (_0_0 != null) { - t1 = B.JSArray_methods.any$1(this.units2, _0_0.get$containsKey()); - break $label0$0; - } - t1 = B.JSArray_methods.contains$1(this.units2, unit1); - break $label0$0; - } - return t1; - }, - $signature: 5 - }; - A.SassNumber__canonicalizeUnitList_closure.prototype = { - call$1(unit) { - var t1, - type = $.$get$_typesByUnit().$index(0, unit); - if (type == null) - t1 = unit; - else { - t1 = B.Map_397RH.$index(0, type); - t1.toString; - t1 = B.JSArray_methods.get$first(t1); - } - return t1; - }, - $signature: 6 - }; - A.SassNumber__canonicalMultiplier_closure.prototype = { - call$2(multiplier, unit) { - return multiplier * this.$this.canonicalMultiplierForUnit$1(unit); - }, - $signature: 163 - }; - A.SassNumber_unitSuggestion_closure.prototype = { - call$1(unit) { - return " * 1" + unit; - }, - $signature: 6 - }; - A.SassNumber_unitSuggestion_closure0.prototype = { - call$1(unit) { - return " / 1" + unit; - }, - $signature: 6 - }; - A.ComplexSassNumber.prototype = { - get$numeratorUnits(_) { - return this._numeratorUnits; - }, - get$denominatorUnits(_) { - return this._denominatorUnits; - }, - get$hasUnits() { - return true; - }, - get$hasComplexUnits() { - return true; - }, - hasUnit$1(unit) { - return false; - }, - compatibleWithUnit$1(unit) { - return false; - }, - hasPossiblyCompatibleUnits$1(other) { - throw A.wrapException(A.UnimplementedError$(string$.Comple)); - }, - withValue$1(value) { - return new A.ComplexSassNumber(this._numeratorUnits, this._denominatorUnits, value, null); - }, - withSlash$2(numerator, denominator) { - return new A.ComplexSassNumber(this._numeratorUnits, this._denominatorUnits, this._number$_value, new A._Record_2(numerator, denominator)); - } - }; - A.SingleUnitSassNumber.prototype = { - get$numeratorUnits(_) { - return A.List_List$unmodifiable([this._unit], type$.String); - }, - get$denominatorUnits(_) { - return B.List_empty; - }, - get$hasUnits() { - return true; - }, - get$hasComplexUnits() { - return false; - }, - withValue$1(value) { - return new A.SingleUnitSassNumber(this._unit, value, null); - }, - withSlash$2(numerator, denominator) { - return new A.SingleUnitSassNumber(this._unit, this._number$_value, new A._Record_2(numerator, denominator)); - }, - hasUnit$1(unit) { - return unit === this._unit; - }, - hasCompatibleUnits$1(other) { - return other instanceof A.SingleUnitSassNumber && A.conversionFactor(this._unit, other._unit) != null; - }, - hasPossiblyCompatibleUnits$1(other) { - var t1, knownCompatibilities, otherUnit; - if (!(other instanceof A.SingleUnitSassNumber)) - return false; - t1 = $.$get$_knownCompatibilitiesByUnit(); - knownCompatibilities = t1.$index(0, this._unit.toLowerCase()); - if (knownCompatibilities == null) - return true; - otherUnit = other._unit.toLowerCase(); - return knownCompatibilities.contains$1(0, otherUnit) || !t1.containsKey$1(otherUnit); - }, - compatibleWithUnit$1(unit) { - return A.conversionFactor(this._unit, unit) != null; - }, - coerceToMatch$1(other) { - var t1 = other instanceof A.SingleUnitSassNumber ? this._coerceToUnit$1(other._unit) : null; - return t1 == null ? this.super$SassNumber$coerceToMatch(other, null, null) : t1; - }, - coerceValueToMatch$3(other, $name, otherName) { - var t1 = other instanceof A.SingleUnitSassNumber ? this._coerceValueToUnit$1(other._unit) : null; - return t1 == null ? this.super$SassNumber$coerceValueToMatch(other, $name, otherName) : t1; - }, - coerceValueToMatch$1(other) { - return this.coerceValueToMatch$3(other, null, null); - }, - convertValueToMatch$3(other, $name, otherName) { - var t1 = other instanceof A.SingleUnitSassNumber ? this._coerceValueToUnit$1(other._unit) : null; - return t1 == null ? this.super$SassNumber$convertValueToMatch(other, $name, otherName) : t1; - }, - convertValueToMatch$1(other) { - return this.convertValueToMatch$3(other, null, null); - }, - coerce$2(newNumerators, newDenominators) { - var t1 = newNumerators.length === 1 && newDenominators.length === 0 ? this._coerceToUnit$1(newNumerators[0]) : null; - return t1 == null ? this.super$SassNumber$coerce(newNumerators, newDenominators, null) : t1; - }, - coerceValue$3(newNumerators, newDenominators, $name) { - var t1 = newNumerators.length === 1 && newDenominators.length === 0 ? this._coerceValueToUnit$1(newNumerators[0]) : null; - return t1 == null ? this.super$SassNumber$coerceValue(newNumerators, newDenominators, $name) : t1; - }, - coerceValueToUnit$2(unit, $name) { - var t1 = this._coerceValueToUnit$1(unit); - return t1 == null ? this.super$SassNumber$coerceValueToUnit(unit, $name) : t1; - }, - coerceValueToUnit$1(unit) { - return this.coerceValueToUnit$2(unit, null); - }, - _coerceToUnit$1(unit) { - var t1 = this._unit; - if (t1 === unit) - return this; - return A.NullableExtension_andThen(A.conversionFactor(unit, t1), new A.SingleUnitSassNumber__coerceToUnit_closure(this, unit)); - }, - _coerceValueToUnit$1(unit) { - return A.NullableExtension_andThen(A.conversionFactor(unit, this._unit), new A.SingleUnitSassNumber__coerceValueToUnit_closure(this)); - }, - multiplyUnits$3(value, otherNumerators, otherDenominators) { - var mutableOtherDenominators, t1 = {}; - t1.value = value; - t1.newNumerators = otherNumerators; - mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); - A.removeFirstWhere(mutableOtherDenominators, new A.SingleUnitSassNumber_multiplyUnits_closure(t1, this), new A.SingleUnitSassNumber_multiplyUnits_closure0(t1, this)); - return A.SassNumber_SassNumber$withUnits(t1.value, mutableOtherDenominators, t1.newNumerators); - }, - unaryMinus$0() { - return new A.SingleUnitSassNumber(this._unit, -this._number$_value, null); - }, - $eq(_, other) { - var factor; - if (other == null) - return false; - if (other instanceof A.SingleUnitSassNumber) { - factor = A.conversionFactor(other._unit, this._unit); - return factor != null && A.fuzzyEquals(this._number$_value * factor, other._number$_value); - } else - return false; - }, - get$hashCode(_) { - var _this = this, - t1 = _this.hashCache; - return t1 == null ? _this.hashCache = A.fuzzyHashCode(_this._number$_value * _this.canonicalMultiplierForUnit$1(_this._unit)) : t1; - } - }; - A.SingleUnitSassNumber__coerceToUnit_closure.prototype = { - call$1(factor) { - return new A.SingleUnitSassNumber(this.unit, this.$this._number$_value * factor, null); - }, - $signature: 361 - }; - A.SingleUnitSassNumber__coerceValueToUnit_closure.prototype = { - call$1(factor) { - return this.$this._number$_value * factor; - }, - $signature: 15 - }; - A.SingleUnitSassNumber_multiplyUnits_closure.prototype = { - call$1(denominator) { - var factor = A.conversionFactor(denominator, this.$this._unit); - if (factor == null) - return false; - this._box_0.value *= factor; - return true; - }, - $signature: 5 - }; - A.SingleUnitSassNumber_multiplyUnits_closure0.prototype = { - call$0() { - var t1 = A._setArrayType([this.$this._unit], type$.JSArray_String), - t2 = this._box_0; - B.JSArray_methods.addAll$1(t1, t2.newNumerators); - t2.newNumerators = t1; - }, - $signature: 0 - }; - A.UnitlessSassNumber.prototype = { - get$numeratorUnits(_) { - return B.List_empty; - }, - get$denominatorUnits(_) { - return B.List_empty; - }, - get$hasUnits() { - return false; - }, - get$hasComplexUnits() { - return false; - }, - withValue$1(value) { - return new A.UnitlessSassNumber(value, null); - }, - withSlash$2(numerator, denominator) { - return new A.UnitlessSassNumber(this._number$_value, new A._Record_2(numerator, denominator)); - }, - hasUnit$1(unit) { - return false; - }, - hasCompatibleUnits$1(other) { - return other instanceof A.UnitlessSassNumber; - }, - hasPossiblyCompatibleUnits$1(other) { - return other instanceof A.UnitlessSassNumber; - }, - compatibleWithUnit$1(unit) { - return true; - }, - coerceToMatch$1(other) { - return other.withValue$1(this._number$_value); - }, - coerceValueToMatch$3(other, $name, otherName) { - return this._number$_value; - }, - coerceValueToMatch$1(other) { - return this.coerceValueToMatch$3(other, null, null); - }, - convertValueToMatch$3(other, $name, otherName) { - return other.get$hasUnits() ? this.super$SassNumber$convertValueToMatch(other, $name, otherName) : this._number$_value; - }, - convertValueToMatch$1(other) { - return this.convertValueToMatch$3(other, null, null); - }, - coerce$2(newNumerators, newDenominators) { - return A.SassNumber_SassNumber$withUnits(this._number$_value, newDenominators, newNumerators); - }, - coerceValue$3(newNumerators, newDenominators, $name) { - return this._number$_value; - }, - coerceValueToUnit$2(unit, $name) { - return this._number$_value; - }, - coerceValueToUnit$1(unit) { - return this.coerceValueToUnit$2(unit, null); - }, - greaterThan$1(other) { - var t1, t2; - if (other instanceof A.SassNumber) { - t1 = this._number$_value; - t2 = other._number$_value; - return t1 > t2 && !A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; - } - return this.super$SassNumber$greaterThan(other); - }, - greaterThanOrEquals$1(other) { - var t1, t2; - if (other instanceof A.SassNumber) { - t1 = this._number$_value; - t2 = other._number$_value; - return t1 > t2 || A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; - } - return this.super$SassNumber$greaterThanOrEquals(other); - }, - lessThan$1(other) { - var t1, t2; - if (other instanceof A.SassNumber) { - t1 = this._number$_value; - t2 = other._number$_value; - return t1 < t2 && !A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; - } - return this.super$SassNumber$lessThan(other); - }, - lessThanOrEquals$1(other) { - var t1, t2; - if (other instanceof A.SassNumber) { - t1 = this._number$_value; - t2 = other._number$_value; - return t1 < t2 || A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; - } - return this.super$SassNumber$lessThanOrEquals(other); - }, - modulo$1(other) { - if (other instanceof A.SassNumber) - return other.withValue$1(A.moduloLikeSass(this._number$_value, other._number$_value)); - return this.super$SassNumber$modulo(other); - }, - plus$1(other) { - if (other instanceof A.SassNumber) - return other.withValue$1(this._number$_value + other._number$_value); - return this.super$SassNumber$plus(other); - }, - minus$1(other) { - if (other instanceof A.SassNumber) - return other.withValue$1(this._number$_value - other._number$_value); - return this.super$SassNumber$minus(other); - }, - times$1(other) { - if (other instanceof A.SassNumber) - return other.withValue$1(this._number$_value * other._number$_value); - return this.super$SassNumber$times(other); - }, - dividedBy$1(other) { - var t1, t2; - if (other instanceof A.SassNumber) { - t1 = this._number$_value / other._number$_value; - if (other.get$hasUnits()) { - t2 = other.get$denominatorUnits(other); - t2 = A.SassNumber_SassNumber$withUnits(t1, other.get$numeratorUnits(other), t2); - t1 = t2; - } else - t1 = new A.UnitlessSassNumber(t1, null); - return t1; - } - return this.super$SassNumber$dividedBy(other); - }, - unaryMinus$0() { - return new A.UnitlessSassNumber(-this._number$_value, null); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.UnitlessSassNumber && A.fuzzyEquals(this._number$_value, other._number$_value); - }, - get$hashCode(_) { - var t1 = this.hashCache; - return t1 == null ? this.hashCache = A.fuzzyHashCode(this._number$_value) : t1; - } - }; - A.SassString.prototype = { - get$_sassLength() { - var result, _this = this, - value = _this.__SassString__sassLength_FI; - if (value === $) { - result = new A.Runes(_this._string$_text).get$length(0); - _this.__SassString__sassLength_FI !== $ && A.throwUnnamedLateFieldADI(); - _this.__SassString__sassLength_FI = result; - value = result; - } - return value; - }, - get$isSpecialNumber() { - var t1, _2_0, t2, _0_0, _1_0; - if (this._hasQuotes) - return false; - t1 = this._string$_text; - if (t1.length < 6) - return false; - _2_0 = t1.charCodeAt(0); - $label1$1: { - t2 = false; - if (99 === _2_0 || 67 === _2_0) { - _0_0 = t1.charCodeAt(1); - $label0$0: { - if (108 === _0_0 || 76 === _0_0) { - t1 = (t1.charCodeAt(2) | 32) === 97 && (t1.charCodeAt(3) | 32) === 109 && (t1.charCodeAt(4) | 32) === 112 && t1.charCodeAt(5) === 40; - break $label0$0; - } - if (97 === _0_0 || 65 === _0_0) { - t1 = (t1.charCodeAt(2) | 32) === 108 && (t1.charCodeAt(3) | 32) === 99 && t1.charCodeAt(4) === 40; - break $label0$0; - } - t1 = t2; - break $label0$0; - } - break $label1$1; - } - if (118 === _2_0 || 86 === _2_0) { - t1 = (t1.charCodeAt(1) | 32) === 97 && (t1.charCodeAt(2) | 32) === 114 && t1.charCodeAt(3) === 40; - break $label1$1; - } - if (101 === _2_0 || 69 === _2_0) { - t1 = (t1.charCodeAt(1) | 32) === 110 && (t1.charCodeAt(2) | 32) === 118 && t1.charCodeAt(3) === 40; - break $label1$1; - } - if (109 === _2_0 || 77 === _2_0) { - _1_0 = t1.charCodeAt(1); - $label2$2: { - if (97 === _1_0 || 65 === _1_0) { - t1 = (t1.charCodeAt(2) | 32) === 120 && t1.charCodeAt(3) === 40; - break $label2$2; - } - if (105 === _1_0 || 73 === _1_0) { - t1 = (t1.charCodeAt(2) | 32) === 110 && t1.charCodeAt(3) === 40; - break $label2$2; - } - t1 = t2; - break $label2$2; - } - break $label1$1; - } - t1 = t2; - break $label1$1; - } - return t1; - }, - get$isVar() { - if (this._hasQuotes) - return false; - var t1 = this._string$_text; - if (t1.length < 8) - return false; - return (t1.charCodeAt(0) | 32) === 118 && (t1.charCodeAt(1) | 32) === 97 && (t1.charCodeAt(2) | 32) === 114 && t1.charCodeAt(3) === 40; - }, - get$isBlank() { - return !this._hasQuotes && this._string$_text.length === 0; - }, - assertQuoted$1($name) { - if (this._hasQuotes) - return; - throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to be a quoted string.", $name)); - }, - assertUnquoted$1($name) { - if (!this._hasQuotes) - return; - throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to be an unquoted string.", $name)); - }, - assertUnquoted$0() { - return this.assertUnquoted$1(null); - }, - accept$1$1(visitor) { - var t1 = visitor._quote && this._hasQuotes, - t2 = this._string$_text; - if (t1) - visitor._visitQuotedString$1(t2); - else - visitor._visitUnquotedString$1(t2); - return null; - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertString$1($name) { - return this; - }, - plus$1(other) { - var t1 = this._string$_text, - t2 = this._hasQuotes; - return other instanceof A.SassString ? new A.SassString(t1 + other._string$_text, t2) : new A.SassString(t1 + A.serializeValue(other, false, true), t2); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.SassString && this._string$_text === other._string$_text; - }, - get$hashCode(_) { - var t1 = this._hashCache; - return t1 == null ? this._hashCache = B.JSString_methods.get$hashCode(this._string$_text) : t1; - } - }; - A.AnySelectorVisitor.prototype = { - visitComplexSelector$1(complex) { - return B.JSArray_methods.any$1(complex.components, new A.AnySelectorVisitor_visitComplexSelector_closure(this)); - }, - visitCompoundSelector$1(compound) { - return B.JSArray_methods.any$1(compound.components, new A.AnySelectorVisitor_visitCompoundSelector_closure(this)); - }, - visitPseudoSelector$1(pseudo) { - var selector = pseudo.selector; - return selector == null ? false : this.visitSelectorList$1(selector); - }, - visitSelectorList$1(list) { - return B.JSArray_methods.any$1(list.components, this.get$visitComplexSelector()); - }, - visitAttributeSelector$1(attribute) { - return false; - }, - visitClassSelector$1(klass) { - return false; - }, - visitIDSelector$1(id) { - return false; - }, - visitParentSelector$1($parent) { - return false; - }, - visitPlaceholderSelector$1(placeholder) { - return false; - }, - visitTypeSelector$1(type) { - return false; - }, - visitUniversalSelector$1(universal) { - return false; - } - }; - A.AnySelectorVisitor_visitComplexSelector_closure.prototype = { - call$1(component) { - return this.$this.visitCompoundSelector$1(component.selector); - }, - $signature: 51 - }; - A.AnySelectorVisitor_visitCompoundSelector_closure.prototype = { - call$1(simple) { - return simple.accept$1(this.$this); - }, - $signature: 13 - }; - A._EvaluateVisitor0.prototype = { - _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { - var t2, metaModule, t3, _i, module, $function, t4, _this = this, - _s20_ = "$name, $module: null", - _s9_ = "sass:meta", - _s7_ = "$module", - t1 = type$.JSArray_AsyncBuiltInCallable, - metaFunctions = A._setArrayType([A.BuiltInCallable$function("global-variable-exists", _s20_, new A._EvaluateVisitor_closure12(_this), _s9_), A.BuiltInCallable$function("variable-exists", "$name", new A._EvaluateVisitor_closure13(_this), _s9_), A.BuiltInCallable$function("function-exists", _s20_, new A._EvaluateVisitor_closure14(_this), _s9_), A.BuiltInCallable$function("mixin-exists", _s20_, new A._EvaluateVisitor_closure15(_this), _s9_), A.BuiltInCallable$function("content-exists", "", new A._EvaluateVisitor_closure16(_this), _s9_), A.BuiltInCallable$function("module-variables", _s7_, new A._EvaluateVisitor_closure17(_this), _s9_), A.BuiltInCallable$function("module-functions", _s7_, new A._EvaluateVisitor_closure18(_this), _s9_), A.BuiltInCallable$function("module-mixins", _s7_, new A._EvaluateVisitor_closure19(_this), _s9_), A.BuiltInCallable$function("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure20(_this), _s9_), A.BuiltInCallable$function("get-mixin", _s20_, new A._EvaluateVisitor_closure21(_this), _s9_), new A.AsyncBuiltInCallable("call", A.ScssParser$("@function call($function, $args...) {", _s9_).parseArgumentDeclaration$0(), new A._EvaluateVisitor_closure22(_this), false)], t1), - metaMixins = A._setArrayType([A.AsyncBuiltInCallable$mixin("load-css", "$url, $with: null", new A._EvaluateVisitor_closure23(_this), false, _s9_), A.AsyncBuiltInCallable$mixin("apply", "$mixin, $args...", new A._EvaluateVisitor_closure24(_this), true, _s9_)], t1); - t1 = type$.AsyncBuiltInCallable; - t2 = A.List_List$of($.$get$moduleFunctions(), true, t1); - B.JSArray_methods.addAll$1(t2, metaFunctions); - metaModule = A.BuiltInModule$("meta", t2, metaMixins, null, t1); - for (t1 = A.List_List$of($.$get$coreModules(), true, type$.BuiltInModule_AsyncCallable), t1.push(metaModule), t2 = t1.length, t3 = _this._async_evaluate$_builtInModules, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - module = t1[_i]; - t3.$indexSet(0, module.url, module); - } - t1 = type$.JSArray_AsyncCallable; - t2 = A._setArrayType([], t1); - B.JSArray_methods.addAll$1(t2, $.$get$globalFunctions()); - t1 = A._setArrayType([], t1); - for (_i = 0; _i < 11; ++_i) - t1.push(metaFunctions[_i].withDeprecationWarning$1("meta")); - B.JSArray_methods.addAll$1(t2, t1); - for (t1 = t2.length, t3 = _this._async_evaluate$_builtInFunctions, _i = 0; _i < t2.length; t2.length === t1 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - $function = t2[_i]; - t4 = J.get$name$x($function); - t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); - } - }, - run$2(_, importer, node) { - return this.run$body$_EvaluateVisitor(0, importer, node); - }, - run$body$_EvaluateVisitor(_, importer, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet), - $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, $async$exception; - var $async$run$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$handler = 4; - t1 = type$.nullable_Object; - t1 = A.runZoned(new A._EvaluateVisitor_run_closure0($async$self, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext0($async$self, node)], t1, t1), type$.FutureOr_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet); - $async$goto = 7; - return A._asyncAwait(type$.Future_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet._is(t1) ? t1 : A._Future$value(t1, type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet), $async$run$2); - case 7: - // returning from await. - t1 = $async$result; - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - $async$handler = 2; - // goto after finally - $async$goto = 6; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (t1 instanceof A.SassException) { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - A.throwWithTrace(error.withLoadedUrls$1($async$self._async_evaluate$_loadedUrls), error, stackTrace); - } else - throw $async$exception; - // goto after finally - $async$goto = 6; - break; - case 3: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 6: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$run$2, $async$completer); - }, - _async_evaluate$_assertInModule$1$2(value, $name) { - if (value != null) - return value; - throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); - }, - _async_evaluate$_assertInModule$2(value, $name) { - return this._async_evaluate$_assertInModule$1$2(value, $name, type$.dynamic); - }, - _async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { - return this._loadModule$body$_EvaluateVisitor(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors); - }, - _async_evaluate$_loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { - return this._async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); - }, - _async_evaluate$_loadModule$4(url, stackFrame, nodeWithSpan, callback) { - return this._async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); - }, - _loadModule$body$_EvaluateVisitor(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$returnValue, $async$self = this, t2, t1, _0_0; - var $async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = {}; - _0_0 = $async$self._async_evaluate$_builtInModules.$index(0, url); - t1.builtInModule = null; - $async$goto = _0_0 != null ? 3 : 4; - break; - case 3: - // then - t1.builtInModule = _0_0; - if (configuration instanceof A.ExplicitConfiguration) { - t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; - t2 = configuration.nodeWithSpan; - throw A.wrapException($async$self._async_evaluate$_exception$2(t1, t2.get$span(t2))); - } - $async$goto = 5; - return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure1(t1, callback), type$.void), $async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors); - case 5: - // returning from await. - // goto return - $async$goto = 1; - break; - case 4: - // join - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate$_withStackFrame$1$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure2($async$self, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback), type$.Null), $async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors); - case 6: - // returning from await. - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors, $async$completer); - }, - _async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { - return this._execute$body$_EvaluateVisitor(importer, stylesheet, configuration, namesInErrors, nodeWithSpan); - }, - _async_evaluate$_execute$2(importer, stylesheet) { - return this._async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); - }, - _execute$body$_EvaluateVisitor(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Module_AsyncCallable), - $async$returnValue, $async$self = this, _0_0, currentConfiguration, t2, t3, message, existingSpan, configurationSpan, environment, css, preModuleComments, extensionStore, module, t1, url; - var $async$_async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = stylesheet.span; - url = t1.get$sourceUrl(t1); - t1 = $async$self._async_evaluate$_modules; - _0_0 = t1.$index(0, url); - if (_0_0 != null) { - t1 = configuration == null; - currentConfiguration = t1 ? $async$self._async_evaluate$_configuration : configuration; - t2 = $async$self._async_evaluate$_moduleConfigurations.$index(0, url); - t3 = t2.__originalConfiguration; - t2 = t3 == null ? t2 : t3; - t3 = currentConfiguration.__originalConfiguration; - if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration) { - if (namesInErrors) { - t2 = $.$get$context(); - url.toString; - message = t2.prettyUri$1(url) + string$.x20was_a; - } else - message = string$.This_mw; - t2 = $async$self._async_evaluate$_moduleNodes.$index(0, url); - existingSpan = t2 == null ? null : t2.get$span(t2); - if (t1) { - t1 = currentConfiguration.nodeWithSpan; - configurationSpan = t1.get$span(t1); - } else - configurationSpan = null; - t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - if (existingSpan != null) - t1.$indexSet(0, existingSpan, "original load"); - if (configurationSpan != null) - t1.$indexSet(0, configurationSpan, "configuration"); - throw A.wrapException(t1.get$isEmpty(0) ? $async$self._async_evaluate$_exception$1(message) : $async$self._async_evaluate$_multiSpanException$3(message, "new load", t1)); - } - $async$returnValue = _0_0; - // goto return - $async$goto = 1; - break; - } - environment = A.AsyncEnvironment$(); - css = A._Cell$(); - preModuleComments = A._Cell$(); - extensionStore = A.ExtensionStore$(); - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_withEnvironment$1$2(environment, new A._EvaluateVisitor__execute_closure0($async$self, importer, stylesheet, extensionStore, configuration, css, preModuleComments), type$.Null), $async$_async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan); - case 3: - // returning from await. - t2 = css._readLocal$0(); - t3 = preModuleComments._readLocal$0(); - module = environment.toModule$3(t2, t3 == null ? B.Map_empty8 : t3, extensionStore); - if (url != null) { - t1.$indexSet(0, url, module); - $async$self._async_evaluate$_moduleConfigurations.$indexSet(0, url, $async$self._async_evaluate$_configuration); - if (nodeWithSpan != null) - $async$self._async_evaluate$_moduleNodes.$indexSet(0, url, nodeWithSpan); - } - $async$returnValue = module; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan, $async$completer); - }, - _async_evaluate$_addOutOfOrderImports$0() { - var t1, t2, _this = this, _s5_ = "_root", - _s13_ = "_endOfImports", - _0_0 = _this._async_evaluate$_outOfOrderImports; - $label0$0: { - if (_0_0 == null) { - t1 = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children; - break $label0$0; - } - t1 = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children; - t1 = A.List_List$of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListBase.E")), true, type$.ModifiableCssNode); - B.JSArray_methods.addAll$1(t1, _0_0); - t2 = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children; - B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__endOfImports, _s13_), null, t2.$ti._eval$1("ListBase.E"))); - break $label0$0; - } - return t1; - }, - _async_evaluate$_combineCss$2$clone(root, clone) { - var selectors, _0_0, t1, imports, css, sorted, t2; - if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure1())) { - selectors = root.get$extensionStore().get$simpleSelectors(); - _0_0 = A.IterableExtension_get_firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure2(selectors))); - if (_0_0 != null) - this._async_evaluate$_throwForUnsatisfiedExtension$1(_0_0); - return root.get$css(root); - } - t1 = type$.JSArray_CssNode; - imports = A._setArrayType([], t1); - css = A._setArrayType([], t1); - t1 = type$.Module_AsyncCallable; - sorted = A.ListQueue$(t1); - new A._EvaluateVisitor__combineCss_visitModule0(this, A.LinkedHashSet_LinkedHashSet$_empty(t1), clone, css, imports, sorted).call$1(root); - if (root.get$transitivelyContainsExtensions()) - this._async_evaluate$_extendModules$1(sorted); - t1 = B.JSArray_methods.$add(imports, css); - t2 = root.get$css(root); - return new A.CssStylesheet(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode), t2.get$span(t2)); - }, - _async_evaluate$_combineCss$1(root) { - return this._async_evaluate$_combineCss$2$clone(root, false); - }, - _async_evaluate$_extendModules$1(sortedModules) { - var t1, t2, t3, originalSelectors, $self, t4, t5, _i, upstream, _0_0, - downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore), - unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension); - for (t1 = A._ListQueueIterator$(sortedModules, sortedModules.$ti._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { - t3 = t1._collection$_current; - if (t3 == null) - t3 = t2._as(t3); - originalSelectors = t3.get$extensionStore().get$simpleSelectors().toSet$0(0); - unsatisfiedExtensions.addAll$1(0, t3.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure1(originalSelectors))); - $self = downstreamExtensionStores.$index(0, t3.get$url(t3)); - t4 = t3.get$extensionStore().get$addExtensions(); - if ($self != null) - t4.call$1($self); - t4 = t3.get$extensionStore(); - if (t4.get$isEmpty(t4)) - continue; - for (t4 = t3.get$upstream(), t5 = t4.length, _i = 0; _i < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i) { - upstream = t4[_i]; - _0_0 = upstream.get$url(upstream); - if (_0_0 != null) - J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(_0_0, new A._EvaluateVisitor__extendModules_closure2()), t3.get$extensionStore()); - } - unsatisfiedExtensions.removeAll$1(t3.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); - } - if (unsatisfiedExtensions._collection$_length !== 0) - this._async_evaluate$_throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(0)); - }, - _async_evaluate$_throwForUnsatisfiedExtension$1(extension) { - throw A.wrapException(A.SassException$(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span, null)); - }, - _async_evaluate$_indexAfterImports$1(statements) { - var t1, lastImport, i, _0_0; - for (t1 = J.getInterceptor$asx(statements), lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { - $label0$0: { - _0_0 = t1.$index(statements, i); - if (_0_0 instanceof A.ModifiableCssImport) - break $label0$0; - if (_0_0 instanceof A.ModifiableCssComment) - continue; - break; - } - lastImport = i; - } - return lastImport + 1; - }, - visitStylesheet$1(_, node) { - return this.visitStylesheet$body$_EvaluateVisitor(0, node); - }, - visitStylesheet$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, t1, t2, warning, _i, $name, span; - var $async$visitStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - for (t1 = node.parseTimeWarnings, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - warning = t1.__internal$_current; - if (warning == null) - warning = t2._as(warning); - $async$self._async_evaluate$_warn$3(warning._1, warning._2, warning._0); - } - t1 = node.children, t2 = t1.length, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - $async$goto = 6; - return A._asyncAwait(t1[_i].accept$1($async$self), $async$visitStylesheet$1); - case 6: - // returning from await. - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - for (t1 = A.MapExtensions_get_pairs(node.globalVariables, type$.String, type$.FileSpan), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t2 = t1.get$current(t1); - $name = t2._0; - span = t2._1; - $async$self.visitVariableDeclaration$1(0, new A.VariableDeclaration(null, $name, new A.NullExpression(span), true, false, span)); - } - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitStylesheet$1, $async$completer); - }, - visitAtRootRule$1(_, node) { - return this.visitAtRootRule$body$_EvaluateVisitor(0, node); - }, - visitAtRootRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, _1_0, resolved, query, $parent, included, t1, _2_0, root, first, rest, innerCopy, outerCopy, _i, copy, _0_0; - var $async$visitAtRootRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - _0_0 = node.query; - $async$goto = _0_0 != null ? 3 : 5; - break; - case 3: - // then - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate$_performInterpolationWithMap$2$warnForColor(_0_0, true), $async$visitAtRootRule$1); - case 6: - // returning from await. - _1_0 = $async$result; - resolved = _1_0._0; - _1_0._1; - query = new A.AtRootQueryParser(A.SpanScanner$(resolved, null), null).parse$0(0); - // goto join - $async$goto = 4; - break; - case 5: - // else - query = B.AtRootQuery_n2q; - case 4: - // join - $parent = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); - included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode); - for (t1 = type$.CssStylesheet; !t1._is($parent); $parent = _2_0) { - if (!query.excludes$1($parent)) - included.push($parent); - _2_0 = $parent._parent; - if (_2_0 == null) - throw A.wrapException(A.StateError$(string$.CssNod)); - } - root = $async$self._async_evaluate$_trimIncluded$1(included); - $async$goto = root === $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") ? 7 : 8; - break; - case 7: - // then - $async$goto = 9; - return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure1($async$self, node), node.hasDeclarations, type$.Null), $async$visitAtRootRule$1); - case 9: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 8: - // join - if (included.length >= 1) { - first = included[0]; - rest = B.JSArray_methods.sublist$1(included, 1); - innerCopy = first.copyWithoutChildren$0(); - for (t1 = rest.length, outerCopy = innerCopy, _i = 0; _i < rest.length; rest.length === t1 || (0, A.throwConcurrentModificationError)(rest), ++_i, outerCopy = copy) { - copy = rest[_i].copyWithoutChildren$0(); - copy.addChild$1(outerCopy); - } - root.addChild$1(outerCopy); - } else - innerCopy = root; - $async$goto = 10; - return A._asyncAwait($async$self._async_evaluate$_scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure2($async$self, node)), $async$visitAtRootRule$1); - case 10: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitAtRootRule$1, $async$completer); - }, - _async_evaluate$_trimIncluded$1(nodes) { - var $parent, t1, innermostContiguous, i, t2, _0_0, _1_0, root, _this = this, _null = null, _s5_ = "_root", - _s22_ = " to be an ancestor of "; - if (nodes.length === 0) - return _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_); - $parent = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__parent, "__parent"); - for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = _1_0) { - for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = _0_0) { - _0_0 = $parent._parent; - if (_0_0 == null) - throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); - } - if (innermostContiguous == null) - innermostContiguous = i; - _1_0 = $parent._parent; - if (_1_0 == null) - throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); - } - if ($parent !== _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_)) - return _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_); - innermostContiguous.toString; - root = nodes[innermostContiguous]; - B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); - return root; - }, - _async_evaluate$_scopeForAtRoot$4(node, newParent, query, included) { - var _this = this, - scope = new A._EvaluateVisitor__scopeForAtRoot_closure5(_this, newParent, node), - t1 = query._all || query._at_root_query$_rule; - if (t1 !== query.include) - scope = new A._EvaluateVisitor__scopeForAtRoot_closure6(_this, scope); - if (_this._async_evaluate$_mediaQueries != null && query.excludesName$1("media")) - scope = new A._EvaluateVisitor__scopeForAtRoot_closure7(_this, scope); - if (_this._async_evaluate$_inKeyframes && query.excludesName$1("keyframes")) - scope = new A._EvaluateVisitor__scopeForAtRoot_closure8(_this, scope); - return _this._async_evaluate$_inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure9()) ? new A._EvaluateVisitor__scopeForAtRoot_closure10(_this, scope) : scope; - }, - visitContentBlock$1(_, node) { - return A.throwExpression(A.UnsupportedError$(string$.Evalua)); - }, - visitContentRule$1(_, node) { - return this.visitContentRule$body$_EvaluateVisitor(0, node); - }, - visitContentRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, $content; - var $async$visitContentRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $content = $async$self._async_evaluate$_environment._async_environment$_content; - if ($content == null) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure0($async$self, $content), type$.Null), $async$visitContentRule$1); - case 3: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitContentRule$1, $async$completer); - }, - visitDebugRule$1(_, node) { - return this.visitDebugRule$body$_EvaluateVisitor(0, node); - }, - visitDebugRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, value, t1; - var $async$visitDebugRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait(node.expression.accept$1($async$self), $async$visitDebugRule$1); - case 3: - // returning from await. - value = $async$result; - t1 = value instanceof A.SassString ? value._string$_text : A.serializeValue(value, true, true); - $async$self._async_evaluate$_logger.debug$2(0, t1, node.span); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitDebugRule$1, $async$completer); - }, - visitDeclaration$1(_, node) { - return this.visitDeclaration$body$_EvaluateVisitor(0, node); - }, - visitDeclaration$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, siblings, interleavedRules, t1, t2, t3, t4, t5, t6, rule, rule0, $name, _1_0, _2_0, value, _3_0, oldDeclarationName, _box_0; - var $async$visitDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - _box_0 = {}; - if (($async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot) == null && !$async$self._async_evaluate$_inUnknownAtRule && !$async$self._async_evaluate$_inKeyframes) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Declarm, node.span)); - if ($async$self._async_evaluate$_declarationName != null && B.JSString_methods.startsWith$1(node.name.get$initialPlain(), "--")) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Declarw, node.span)); - siblings = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent")._parent.children; - interleavedRules = A._setArrayType([], type$.JSArray_CssStyleRule); - if (siblings.get$last(siblings) !== $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent")) { - if ($async$self._async_evaluate$_quietDeps) - if (!$async$self._async_evaluate$_inDependency) { - t1 = $async$self._async_evaluate$_currentCallable; - t1 = t1 == null ? null : t1.inDependency; - t1 = t1 === true; - } else - t1 = true; - else - t1 = false; - t1 = !t1; - } else - t1 = false; - if (t1) - for (t1 = A.SubListIterable$(siblings, siblings.indexOf$1(siblings, $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent")) + 1, null, siblings.$ti._eval$1("ListBase.E")), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { - t6 = t1.__internal$_current; - rule = t6 == null ? t2._as(t6) : t6; - $label0$1: { - if (rule instanceof A.ModifiableCssComment) - continue; - t6 = rule instanceof A.ModifiableCssStyleRule; - rule0 = t6 ? rule : null; - if (t6) { - interleavedRules.push(rule0); - break $label0$1; - } - $async$self._async_evaluate$_warn$3(string$.Sassx27s, new A.MultiSpan(t3, "declaration", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rule.get$span(rule), "nested rule"], t4, t5), t4, t5)), B.Deprecation_u1l); - B.JSArray_methods.clear$0(interleavedRules); - break $label0$1; - } - } - t1 = node.name; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$2$warnForColor(t1, true), $async$visitDeclaration$1); - case 3: - // returning from await. - $name = $async$result; - _1_0 = $async$self._async_evaluate$_declarationName; - if (_1_0 != null) - $name = new A.CssValue(_1_0 + "-" + A.S($name.value), $name.span, type$.CssValue_String); - _2_0 = node.value; - $async$goto = _2_0 != null ? 4 : 5; - break; - case 4: - // then - $async$goto = 6; - return A._asyncAwait(_2_0.accept$1($async$self), $async$visitDeclaration$1); - case 6: - // returning from await. - value = $async$result; - if (!value.get$isBlank() || value.get$asList().length === 0) { - t2 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); - t3 = _2_0.get$span(_2_0); - t4 = node.span; - t1 = B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--"); - t5 = interleavedRules.length === 0 ? null : $async$self._async_evaluate$_stackTrace$1(t4); - if ($async$self._async_evaluate$_sourceMap) { - t6 = A.NullableExtension_andThen(_2_0, $async$self.get$_async_evaluate$_expressionNode()); - t6 = t6 == null ? null : J.get$span$z(t6); - } else - t6 = null; - t2.addChild$1(A.ModifiableCssDeclaration$($name, new A.CssValue(value, t3, type$.CssValue_Value), t4, interleavedRules, t1, t5, t6)); - } else if (J.startsWith$1$s($name.value, "--")) - throw A.wrapException($async$self._async_evaluate$_exception$2("Custom property values may not be empty.", _2_0.get$span(_2_0))); - case 5: - // join - _3_0 = node.children; - _box_0.children = null; - $async$goto = _3_0 != null ? 7 : 8; - break; - case 7: - // then - _box_0.children = _3_0; - oldDeclarationName = $async$self._async_evaluate$_declarationName; - $async$self._async_evaluate$_declarationName = $name.value; - $async$goto = 9; - return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure0(_box_0, $async$self), node.hasDeclarations, type$.Null), $async$visitDeclaration$1); - case 9: - // returning from await. - $async$self._async_evaluate$_declarationName = oldDeclarationName; - case 8: - // join - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitDeclaration$1, $async$completer); - }, - visitEachRule$1(_, node) { - return this.visitEachRule$body$_EvaluateVisitor(0, node); - }, - visitEachRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, _box_0, t1, list, nodeWithSpan, _0_0; - var $async$visitEachRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - _box_0 = {}; - t1 = node.list; - $async$goto = 3; - return A._asyncAwait(t1.accept$1($async$self), $async$visitEachRule$1); - case 3: - // returning from await. - list = $async$result; - nodeWithSpan = $async$self._async_evaluate$_expressionNode$1(t1); - _0_0 = node.variables; - $label0$0: { - _box_0.variable = null; - if (_0_0.length === 1) { - _box_0.variable = _0_0[0]; - t1 = new A._EvaluateVisitor_visitEachRule_closure2(_box_0, $async$self, nodeWithSpan); - break $label0$0; - } - _box_0.variables = null; - _box_0.variables = _0_0; - t1 = new A._EvaluateVisitor_visitEachRule_closure3(_box_0, $async$self, nodeWithSpan); - break $label0$0; - } - $async$returnValue = $async$self._async_evaluate$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure4($async$self, list, t1, node), true, type$.nullable_Value); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitEachRule$1, $async$completer); - }, - _async_evaluate$_setMultipleVariables$3(variables, value, nodeWithSpan) { - var i, - list = value.get$asList(), - t1 = variables.length, - minLength = Math.min(t1, list.length); - for (i = 0; i < minLength; ++i) - this._async_evaluate$_environment.setLocalVariable$3(variables[i], this._async_evaluate$_withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); - for (i = minLength; i < t1; ++i) - this._async_evaluate$_environment.setLocalVariable$3(variables[i], B.C__SassNull, nodeWithSpan); - }, - visitErrorRule$1(_, node) { - return this.visitErrorRule$body$_EvaluateVisitor(0, node); - }, - visitErrorRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$self = this, $async$temp1, $async$temp2; - var $async$visitErrorRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$temp1 = A; - $async$temp2 = J; - $async$goto = 2; - return A._asyncAwait(node.expression.accept$1($async$self), $async$visitErrorRule$1); - case 2: - // returning from await. - throw $async$temp1.wrapException($async$self._async_evaluate$_exception$2($async$temp2.toString$0$($async$result), node.span)); - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitErrorRule$1, $async$completer); - }, - visitExtendRule$1(_, node) { - return this.visitExtendRule$body$_EvaluateVisitor(0, node); - }, - visitExtendRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, _0_0, targetText, targetMap, compound, styleRule; - var $async$visitExtendRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - styleRule = $async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; - if (styleRule == null || $async$self._async_evaluate$_declarationName != null) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.x40exten, node.span)); - for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - if (!complex.accept$1(B._IsBogusVisitor_true)) - continue; - visitor = A._SerializeVisitor$(null, true, null, null, true, false, null, true); - complex.accept$1(visitor); - t6 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); - t7 = complex.accept$1(B.C__IsUselessVisitor) ? "can't" : "shouldn't"; - $async$self._async_evaluate$_warn$3('The selector "' + t6 + '" is invalid CSS and ' + t7 + string$.x20be_an, new A.MultiSpan(A.SpanExtensions_trimRight(complex.span), "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t3, "@extend rule"], t4, t5), t4, t5)), B.Deprecation_C9i); - } - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_performInterpolationWithMap$2$warnForColor(node.selector, true), $async$visitExtendRule$1); - case 3: - // returning from await. - _0_0 = $async$result; - targetText = _0_0._0; - targetMap = _0_0._1; - for (t1 = A.SelectorList_SelectorList$parse(A.trimAscii(targetText, true), false, targetMap, false).components, t2 = t1.length, t3 = styleRule._style_rule$_selector._box$_inner, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - compound = complex.get$singleCompound(); - if (compound == null) - throw A.wrapException(A.SassFormatException$("complex selectors may not be extended.", complex.span, null)); - t4 = compound.components; - t5 = t4.length === 1 ? B.JSArray_methods.get$first(t4) : null; - if (t5 == null) - throw A.wrapException(A.SassFormatException$(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, compound.span, null)); - $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__extensionStore, "_extensionStore").addExtension$4(t3.value, t5, node, $async$self._async_evaluate$_mediaQueries); - } - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitExtendRule$1, $async$completer); - }, - visitAtRule$1(_, node) { - return this.visitAtRule$body$_EvaluateVisitor(0, node); - }, - visitAtRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, $name, t1, value, children, wasInKeyframes, wasInUnknownAtRule; - var $async$visitAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate$_declarationName != null) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.At_rul, node.span)); - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$1(node.name), $async$visitAtRule$1); - case 3: - // returning from await. - $name = $async$result; - t1 = A.NullableExtension_andThen(node.value, new A._EvaluateVisitor_visitAtRule_closure2($async$self)); - $async$goto = 4; - return A._asyncAwait(type$.Future_nullable_CssValue_String._is(t1) ? t1 : A._Future$value(t1, type$.nullable_CssValue_String), $async$visitAtRule$1); - case 4: - // returning from await. - value = $async$result; - children = node.children; - if (children == null) { - $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$($name, node.span, true, value)); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - wasInKeyframes = $async$self._async_evaluate$_inKeyframes; - wasInUnknownAtRule = $async$self._async_evaluate$_inUnknownAtRule; - if (A.unvendor($name.value) === "keyframes") - $async$self._async_evaluate$_inKeyframes = true; - else - $async$self._async_evaluate$_inUnknownAtRule = true; - $async$goto = 5; - return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$($name, node.span, false, value), new A._EvaluateVisitor_visitAtRule_closure3($async$self, $name, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure4(), type$.ModifiableCssAtRule, type$.Null), $async$visitAtRule$1); - case 5: - // returning from await. - $async$self._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; - $async$self._async_evaluate$_inKeyframes = wasInKeyframes; - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitAtRule$1, $async$completer); - }, - visitForRule$1(_, node) { - return this.visitForRule$body$_EvaluateVisitor(0, node); - }, - visitForRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, t1, t2, t3, fromNumber, t4, toNumber, from, to, direction; - var $async$visitForRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = {}; - t2 = node.from; - t3 = type$.SassNumber; - $async$goto = 3; - return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(t2, new A._EvaluateVisitor_visitForRule_closure4($async$self, node), t3), $async$visitForRule$1); - case 3: - // returning from await. - fromNumber = $async$result; - t4 = node.to; - $async$goto = 4; - return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(t4, new A._EvaluateVisitor_visitForRule_closure5($async$self, node), t3), $async$visitForRule$1); - case 4: - // returning from await. - toNumber = $async$result; - from = $async$self._async_evaluate$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure6(fromNumber)); - to = t1.to = $async$self._async_evaluate$_addExceptionSpan$2(t4, new A._EvaluateVisitor_visitForRule_closure7(toNumber, fromNumber)); - direction = from > to ? -1 : 1; - if (from === (!node.isExclusive ? t1.to = to + direction : to)) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - $async$returnValue = $async$self._async_evaluate$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure8(t1, $async$self, node, from, direction, fromNumber), true, type$.nullable_Value); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitForRule$1, $async$completer); - }, - visitForwardRule$1(_, node) { - return this.visitForwardRule$body$_EvaluateVisitor(0, node); - }, - visitForwardRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, newConfiguration, t4, _i, variable, $name, oldConfiguration, adjustedConfiguration, t1, t2, t3; - var $async$visitForwardRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldConfiguration = $async$self._async_evaluate$_configuration; - adjustedConfiguration = oldConfiguration.throughForward$1(node); - t1 = node.configuration; - t2 = t1.length; - t3 = node.url; - $async$goto = t2 !== 0 ? 3 : 5; - break; - case 3: - // then - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate$_addForwardConfiguration$2(adjustedConfiguration, node), $async$visitForwardRule$1); - case 6: - // returning from await. - newConfiguration = $async$result; - $async$goto = 7; - return A._asyncAwait($async$self._async_evaluate$_loadModule$5$configuration(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure1($async$self, node), newConfiguration), $async$visitForwardRule$1); - case 7: - // returning from await. - t3 = type$.String; - t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); - for (_i = 0; _i < t2; ++_i) { - variable = t1[_i]; - if (!variable.isGuarded) - t4.add$1(0, variable.name); - } - $async$self._async_evaluate$_removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); - for (_i = 0; _i < t2; ++_i) - t3.add$1(0, t1[_i].name); - for (t1 = newConfiguration._configuration$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - $name = t2[_i]; - if (!t3.contains$1(0, $name)) - if (!t1.get$isEmpty(t1)) - t1.remove$1(0, $name); - } - $async$self._async_evaluate$_assertConfigurationIsEmpty$1(newConfiguration); - // goto join - $async$goto = 4; - break; - case 5: - // else - $async$self._async_evaluate$_configuration = adjustedConfiguration; - $async$goto = 8; - return A._asyncAwait($async$self._async_evaluate$_loadModule$4(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure2($async$self, node)), $async$visitForwardRule$1); - case 8: - // returning from await. - $async$self._async_evaluate$_configuration = oldConfiguration; - case 4: - // join - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitForwardRule$1, $async$completer); - }, - _async_evaluate$_addForwardConfiguration$2(configuration, node) { - return this._addForwardConfiguration$body$_EvaluateVisitor(configuration, node); - }, - _addForwardConfiguration$body$_EvaluateVisitor(configuration, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Configuration), - $async$returnValue, $async$self = this, t2, t3, t4, t5, _i, variable, t6, oldValue, t7, variableNodeWithSpan, t8, t1, newValues, $async$temp1, $async$temp2, $async$temp3; - var $async$_async_evaluate$_addForwardConfiguration$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = configuration._configuration$_values; - newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); - t2 = node.configuration, t3 = t2.length, t4 = type$._Future_Value, t5 = type$.Future_Value, _i = 0; - case 3: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 5; - break; - } - variable = t2[_i]; - if (variable.isGuarded) { - t6 = variable.name; - oldValue = t1.get$isEmpty(t1) ? null : t1.remove$1(0, t6); - if (oldValue != null) - t7 = !oldValue.value.$eq(0, B.C__SassNull); - else { - oldValue = null; - t7 = false; - } - if (t7) { - newValues.$indexSet(0, t6, oldValue); - // goto for update - $async$goto = 4; - break; - } - } - t6 = variable.expression; - variableNodeWithSpan = $async$self._async_evaluate$_expressionNode$1(t6); - t7 = variable.name; - t6 = t6.accept$1($async$self); - if (!t5._is(t6)) { - t8 = new A._Future($.Zone__current, t4); - t8._state = 8; - t8._resultOrListeners = t6; - t6 = t8; - } - $async$temp1 = newValues; - $async$temp2 = t7; - $async$temp3 = A; - $async$goto = 6; - return A._asyncAwait(t6, $async$_async_evaluate$_addForwardConfiguration$2); - case 6: - // returning from await. - $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue($async$self._async_evaluate$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - if (configuration instanceof A.ExplicitConfiguration || t1.get$isEmpty(t1)) { - $async$returnValue = new A.ExplicitConfiguration(node, newValues, null); - // goto return - $async$goto = 1; - break; - } else { - $async$returnValue = new A.Configuration(newValues, null); - // goto return - $async$goto = 1; - break; - } - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_addForwardConfiguration$2, $async$completer); - }, - _async_evaluate$_registerCommentsForModule$1(module) { - var _this = this, _s5_ = "_root", - t1 = _this._async_evaluate$__root; - if (t1 == null) - return; - if (_this._async_evaluate$_assertInModule$2(t1, _s5_).children.get$length(0) === 0 || !module.get$transitivelyContainsCss()) - return; - t1 = _this._async_evaluate$_preModuleComments; - if (t1 == null) - t1 = _this._async_evaluate$_preModuleComments = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable, type$.List_CssComment); - J.addAll$1$ax(t1.putIfAbsent$2(module, new A._EvaluateVisitor__registerCommentsForModule_closure0()), new A.UnmodifiableListView(J.cast$1$0$ax(_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children._collection$_source, type$.CssComment), type$.UnmodifiableListView_CssComment)); - _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).clearChildren$0(); - _this._async_evaluate$__endOfImports = 0; - }, - _async_evaluate$_removeUsedConfiguration$3$except(upstream, downstream, except) { - var t1, t2, t3, t4, _i, $name; - for (t1 = upstream._configuration$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t3 = t2.length, t4 = downstream._configuration$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - $name = t2[_i]; - if (except.contains$1(0, $name)) - continue; - if (!t4.containsKey$1($name)) - if (!t1.get$isEmpty(t1)) - t1.remove$1(0, $name); - } - }, - _async_evaluate$_assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { - var t1, _0_0, $name, value; - if (!(configuration instanceof A.ExplicitConfiguration)) - return; - t1 = configuration._configuration$_values; - if (t1.get$isEmpty(t1)) - return; - t1 = A.MapExtensions_get_pairs(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); - _0_0 = t1.get$first(t1); - $name = _0_0._0; - value = _0_0._1; - t1 = nameInError ? "$" + $name + string$.x20was_n : string$.This_v; - throw A.wrapException(this._async_evaluate$_exception$2(t1, value.configurationSpan)); - }, - _async_evaluate$_assertConfigurationIsEmpty$1(configuration) { - return this._async_evaluate$_assertConfigurationIsEmpty$2$nameInError(configuration, false); - }, - visitFunctionRule$1(_, node) { - return this.visitFunctionRule$body$_EvaluateVisitor(0, node); - }, - visitFunctionRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; - var $async$visitFunctionRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self._async_evaluate$_environment; - t2 = t1.closure$0(); - t3 = $async$self._async_evaluate$_inDependency; - t4 = t1._async_environment$_functions; - index = t4.length - 1; - t5 = node.name; - t1._async_environment$_functionIndices.$indexSet(0, t5, index); - J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment)); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitFunctionRule$1, $async$completer); - }, - visitIfRule$1(_, node) { - return this.visitIfRule$body$_EvaluateVisitor(0, node); - }, - visitIfRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, t1, t2, _i, clauseToCheck, clause; - var $async$visitIfRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - clause = node.lastClause; - t1 = node.clauses, t2 = t1.length, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - clauseToCheck = t1[_i]; - $async$goto = 6; - return A._asyncAwait(clauseToCheck.expression.accept$1($async$self), $async$visitIfRule$1); - case 6: - // returning from await. - if ($async$result.get$isTruthy()) { - clause = clauseToCheck; - // goto after for - $async$goto = 5; - break; - } - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - t1 = A.NullableExtension_andThen(clause, new A._EvaluateVisitor_visitIfRule_closure0($async$self)); - $async$goto = 7; - return A._asyncAwait(type$.Future_nullable_Value._is(t1) ? t1 : A._Future$value(t1, type$.nullable_Value), $async$visitIfRule$1); - case 7: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitIfRule$1, $async$completer); - }, - visitImportRule$1(_, node) { - return this.visitImportRule$body$_EvaluateVisitor(0, node); - }, - visitImportRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, t1, t2, t3, _i, $import; - var $async$visitImportRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = node.imports, t2 = t1.length, t3 = type$.StaticImport, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - $import = t1[_i]; - $async$goto = $import instanceof A.DynamicImport ? 6 : 8; - break; - case 6: - // then - $async$goto = 9; - return A._asyncAwait($async$self._async_evaluate$_visitDynamicImport$1($import), $async$visitImportRule$1); - case 9: - // returning from await. - // goto join - $async$goto = 7; - break; - case 8: - // else - $async$goto = 10; - return A._asyncAwait($async$self._visitStaticImport$1(t3._as($import)), $async$visitImportRule$1); - case 10: - // returning from await. - case 7: - // join - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitImportRule$1, $async$completer); - }, - _async_evaluate$_visitDynamicImport$1($import) { - return this._async_evaluate$_withStackFrame$1$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure0(this, $import), type$.void); - }, - _async_evaluate$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { - return this._loadStylesheet$body$_EvaluateVisitor(url, span, baseUrl, forImport); - }, - _async_evaluate$_loadStylesheet$3$baseUrl(url, span, baseUrl) { - return this._async_evaluate$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); - }, - _async_evaluate$_loadStylesheet$3$forImport(url, span, forImport) { - return this._async_evaluate$_loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); - }, - _loadStylesheet$body$_EvaluateVisitor(url, span, baseUrl, forImport) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency), - $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, _0_0, importCache, _1_0, importer, canonicalUrl, originalUrl, isDependency, _2_0, stylesheet, error, stackTrace, error0, stackTrace0, t1, t2, exception, $async$exception; - var $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - baseUrl = baseUrl; - $async$handler = 4; - $async$self._async_evaluate$_importSpan = span; - _0_0 = $async$self._async_evaluate$_importCache; - importCache = null; - $async$goto = _0_0 != null ? 7 : 8; - break; - case 7: - // then - importCache = _0_0; - if (baseUrl == null) { - t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").span; - baseUrl = t1.get$sourceUrl(t1); - } - $async$goto = 9; - return A._asyncAwait(J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), $async$self._async_evaluate$_importer, baseUrl, forImport), $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport); - case 9: - // returning from await. - _1_0 = $async$result; - importer = null; - canonicalUrl = null; - originalUrl = null; - $async$goto = type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(_1_0) ? 10 : 11; - break; - case 10: - // then - importer = _1_0._0; - canonicalUrl = _1_0._1; - originalUrl = _1_0._2; - if (canonicalUrl.get$scheme() === "") - A.WarnForDeprecation_warnForDeprecation($async$self._async_evaluate$_logger, B.Deprecation_INA, "Importer " + A.S(importer) + " canonicalized " + url + " to " + A.S(canonicalUrl) + string$.x2e_Rela, null, null); - $async$self._async_evaluate$_loadedUrls.add$1(0, canonicalUrl); - isDependency = $async$self._async_evaluate$_inDependency || !J.$eq$(importer, $async$self._async_evaluate$_importer); - $async$goto = 12; - return A._asyncAwait(importCache.importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl), $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport); - case 12: - // returning from await. - _2_0 = $async$result; - stylesheet = null; - if (_2_0 != null) { - stylesheet = _2_0; - t1 = stylesheet; - t2 = importer; - $async$returnValue = new A._Record_3_importer_isDependency(t1, t2, isDependency); - $async$next = [1]; - // goto finally - $async$goto = 5; - break; - } - case 11: - // join - case 8: - // join - t1 = B.JSString_methods.startsWith$1(url, "package:"); - if (t1) - throw A.wrapException(string$.x22packa); - else - throw A.wrapException("Can't find stylesheet to import."); - $async$next.push(6); - // goto finally - $async$goto = 5; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (t1 instanceof A.SassException) - throw $async$exception; - else if (t1 instanceof A.ArgumentError) { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - A.throwWithTrace($async$self._async_evaluate$_exception$1(J.toString$0$(error)), error, stackTrace); - } else { - error0 = t1; - stackTrace0 = A.getTraceFromException($async$exception); - A.throwWithTrace($async$self._async_evaluate$_exception$1($async$self._async_evaluate$_getErrorMessage$1(error0)), error0, stackTrace0); - } - $async$next.push(6); - // goto finally - $async$goto = 5; - break; - case 3: - // uncaught - $async$next = [2]; - case 5: - // finally - $async$handler = 2; - $async$self._async_evaluate$_importSpan = null; - // goto the next finally handler - $async$goto = $async$next.pop(); - break; - case 6: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport, $async$completer); - }, - _visitStaticImport$1($import) { - return this._visitStaticImport$body$_EvaluateVisitor($import); - }, - _visitStaticImport$body$_EvaluateVisitor($import) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1, t2, node, $async$temp1, $async$temp2; - var $async$_visitStaticImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 2; - return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$1($import.url), $async$_visitStaticImport$1); - case 2: - // returning from await. - t1 = $async$result; - t2 = A.NullableExtension_andThen($import.modifiers, $async$self.get$_async_evaluate$_interpolationToValue()); - $async$temp1 = A; - $async$temp2 = t1; - $async$goto = 3; - return A._asyncAwait(type$.Future_nullable_CssValue_String._is(t2) ? t2 : A._Future$value(t2, type$.nullable_CssValue_String), $async$_visitStaticImport$1); - case 3: - // returning from await. - node = new $async$temp1.ModifiableCssImport($async$temp2, $async$result, $import.span); - if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") !== $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root")) - $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(node); - else if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) { - $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").addChild$1(node); - $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; - } else { - t1 = $async$self._async_evaluate$_outOfOrderImports; - (t1 == null ? $async$self._async_evaluate$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t1).push(node); - } - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$_visitStaticImport$1, $async$completer); - }, - _async_evaluate$_applyMixin$5(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { - return this._applyMixin$body$_EvaluateVisitor(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent); - }, - _applyMixin$body$_EvaluateVisitor(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1, _0_0, t2, _1_8; - var $async$_async_evaluate$_applyMixin$5 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if (mixin == null) - throw A.wrapException($async$self._async_evaluate$_exception$2("Undefined mixin.", nodeWithSpan.get$span(nodeWithSpan))); - t1 = type$.AsyncBuiltInCallable._is(mixin); - $async$goto = t1 && !mixin.get$acceptsContent() && contentCallable != null ? 3 : 4; - break; - case 3: - // then - $async$goto = 5; - return A._asyncAwait($async$self._async_evaluate$_evaluateArguments$1($arguments), $async$_async_evaluate$_applyMixin$5); - case 5: - // returning from await. - t1 = $async$result._values; - _0_0 = mixin.callbackFor$2(J.get$length$asx(t1[2]), new A.MapKeySet(t1[0], type$.MapKeySet_String)); - throw A.wrapException(A.MultiSpanSassRuntimeException$("Mixin doesn't accept a content block.", nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_0_0._0.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); - case 4: - // join - $async$goto = t1 ? 6 : 7; - break; - case 6: - // then - $async$goto = 8; - return A._asyncAwait($async$self._async_evaluate$_environment.withContent$2(contentCallable, new A._EvaluateVisitor__applyMixin_closure1($async$self, $arguments, mixin, nodeWithSpanWithoutContent)), $async$_async_evaluate$_applyMixin$5); - case 8: - // returning from await. - // goto break $label0$0 - $async$goto = 2; - break; - case 7: - // join - t1 = type$.UserDefinedCallable_AsyncEnvironment._is(mixin); - t2 = false; - if (t1) { - _1_8 = mixin.declaration; - if (_1_8 instanceof A.MixinRule) - t2 = !type$.MixinRule._as(_1_8).get$hasContent() && contentCallable != null; - } - if (t2) - throw A.wrapException(A.MultiSpanSassRuntimeException$("Mixin doesn't accept a content block.", nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.$arguments.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); - $async$goto = t1 ? 9 : 10; - break; - case 9: - // then - $async$goto = 11; - return A._asyncAwait($async$self._async_evaluate$_runUserDefinedCallable$1$4($arguments, mixin, nodeWithSpanWithoutContent, new A._EvaluateVisitor__applyMixin_closure2($async$self, contentCallable, mixin, nodeWithSpanWithoutContent), type$.Null), $async$_async_evaluate$_applyMixin$5); - case 11: - // returning from await. - // goto break $label0$0 - $async$goto = 2; - break; - case 10: - // join - throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); - case 2: - // break $label0$0 - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_applyMixin$5, $async$completer); - }, - visitIncludeRule$1(_, node) { - return this.visitIncludeRule$body$_EvaluateVisitor(0, node); - }, - visitIncludeRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, mixin; - var $async$visitIncludeRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - mixin = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure2($async$self, node)); - if (B.JSString_methods.startsWith$1(node.originalName, "--") && mixin instanceof A.UserDefinedCallable && !B.JSString_methods.startsWith$1(mixin.declaration.originalName, "--")) - $async$self._async_evaluate$_warn$3(string$.Sassx20_m, node.get$nameSpan(), B.Deprecation_0); - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_applyMixin$5(mixin, A.NullableExtension_andThen(node.content, new A._EvaluateVisitor_visitIncludeRule_closure3($async$self)), node.$arguments, node, new A._FakeAstNode(new A._EvaluateVisitor_visitIncludeRule_closure4(node))), $async$visitIncludeRule$1); - case 3: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitIncludeRule$1, $async$completer); - }, - visitMixinRule$1(_, node) { - return this.visitMixinRule$body$_EvaluateVisitor(0, node); - }, - visitMixinRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; - var $async$visitMixinRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self._async_evaluate$_environment; - t2 = t1.closure$0(); - t3 = $async$self._async_evaluate$_inDependency; - t4 = t1._async_environment$_mixins; - index = t4.length - 1; - t5 = node.name; - t1._async_environment$_mixinIndices.$indexSet(0, t5, index); - J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment)); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitMixinRule$1, $async$completer); - }, - visitLoudComment$1(_, node) { - return this.visitLoudComment$body$_EvaluateVisitor(0, node); - }, - visitLoudComment$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, t1, text; - var $async$visitLoudComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate$_inFunction) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") === $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root") && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) - $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; - t1 = node.text; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(t1), $async$visitLoudComment$1); - case 3: - // returning from await. - text = $async$result; - if (!B.JSString_methods.endsWith$1(text, "*/")) - text += " */"; - $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(new A.ModifiableCssComment(text, t1.span)); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitLoudComment$1, $async$completer); - }, - visitMediaRule$1(_, node) { - return this.visitMediaRule$body$_EvaluateVisitor(0, node); - }, - visitMediaRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, queries, mergedQueries, t1, mergedSources, t2, t3; - var $async$visitMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate$_declarationName != null) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Media_, node.span)); - $async$goto = 3; - return A._asyncAwait($async$self._visitMediaQueries$1(node.query), $async$visitMediaRule$1); - case 3: - // returning from await. - queries = $async$result; - mergedQueries = A.NullableExtension_andThen($async$self._async_evaluate$_mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure2($async$self, queries)); - t1 = mergedQueries == null; - if (!t1 && J.get$isEmpty$asx(mergedQueries)) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - if (t1) - mergedSources = B.Set_empty1; - else { - t2 = $async$self._async_evaluate$_mediaQuerySources; - t2.toString; - t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); - t3 = $async$self._async_evaluate$_mediaQueries; - t3.toString; - t2.addAll$1(0, t3); - t2.addAll$1(0, queries); - mergedSources = t2; - } - t1 = t1 ? queries : mergedQueries; - $async$goto = 4; - return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure3($async$self, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure4(mergedSources), type$.ModifiableCssMediaRule, type$.Null), $async$visitMediaRule$1); - case 4: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitMediaRule$1, $async$completer); - }, - _visitMediaQueries$1(interpolation) { - return this._visitMediaQueries$body$_EvaluateVisitor(interpolation); - }, - _visitMediaQueries$body$_EvaluateVisitor(interpolation) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.List_CssMediaQuery), - $async$returnValue, $async$self = this, _0_0, resolved, map; - var $async$_visitMediaQueries$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_performInterpolationWithMap$2$warnForColor(interpolation, true), $async$_visitMediaQueries$1); - case 3: - // returning from await. - _0_0 = $async$result; - resolved = _0_0._0; - map = _0_0._1; - $async$returnValue = new A.MediaQueryParser(A.SpanScanner$(resolved, null), map).parse$0(0); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_visitMediaQueries$1, $async$completer); - }, - _async_evaluate$_mergeMediaQueries$2(queries1, queries2) { - var t1, t2, t3, t4, _0_0, t5, result, - queries = A._setArrayType([], type$.JSArray_CssMediaQuery); - for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2); t1.moveNext$0();) { - t3 = t1.get$current(t1); - for (t4 = t2.get$iterator(queries2); t4.moveNext$0();) { - _0_0 = t3.merge$1(t4.get$current(t4)); - if (B._SingletonCssMediaQueryMergeResult_0 === _0_0) - continue; - if (B._SingletonCssMediaQueryMergeResult_1 === _0_0) - return null; - t5 = _0_0 instanceof A.MediaQuerySuccessfulMergeResult; - result = t5 ? _0_0 : null; - if (t5) - queries.push(result.query); - } - } - return queries; - }, - visitReturnRule$1(_, node) { - return this.visitReturnRule$body$_EvaluateVisitor(0, node); - }, - visitReturnRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$self = this, t1, t2; - var $async$visitReturnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = node.expression; - t2 = t1.accept$1($async$self); - $async$goto = 3; - return A._asyncAwait(type$.Future_Value._is(t2) ? t2 : A._Future$value(t2, type$.Value), $async$visitReturnRule$1); - case 3: - // returning from await. - $async$returnValue = $async$self._async_evaluate$_withoutSlash$2($async$result, t1); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitReturnRule$1, $async$completer); - }, - visitSilentComment$1(_, node) { - return this.visitSilentComment$body$_EvaluateVisitor(0, node); - }, - visitSilentComment$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue; - var $async$visitSilentComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitSilentComment$1, $async$completer); - }, - visitStyleRule$1(_, node) { - return this.visitStyleRule$body$_EvaluateVisitor(0, node); - }, - visitStyleRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, t1, _0_0, selectorText, selectorMap, parsedSelector, nest, t2, _i, _1_0, first, t3, rule, oldAtRootExcludingStyleRule; - var $async$visitStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate$_declarationName != null) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_n, node.span)); - else if ($async$self._async_evaluate$_inKeyframes && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") instanceof A.ModifiableCssKeyframeBlock) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_k, node.span)); - t1 = node.selector; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_performInterpolationWithMap$2$warnForColor(t1, true), $async$visitStyleRule$1); - case 3: - // returning from await. - _0_0 = $async$result; - selectorText = _0_0._0; - selectorMap = _0_0._1; - $async$goto = $async$self._async_evaluate$_inKeyframes ? 4 : 5; - break; - case 4: - // then - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(new A.CssValue(A.List_List$unmodifiable(new A.KeyframeSelectorParser(A.SpanScanner$(selectorText, null), selectorMap).parse$0(0), type$.String), t1.span, type$.CssValue_List_String), node.span), new A._EvaluateVisitor_visitStyleRule_closure3($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure4(), type$.ModifiableCssKeyframeBlock, type$.Null), $async$visitStyleRule$1); - case 6: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 5: - // join - parsedSelector = A.SelectorList_SelectorList$parse(selectorText, true, selectorMap, $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss); - t1 = $async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; - t1 = t1 == null ? null : t1.fromPlainCss; - nest = t1 !== true; - if (nest) { - if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss) - for (t1 = parsedSelector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { - _1_0 = t1[_i].leadingCombinators; - if (_1_0.length >= 1) { - first = _1_0[0]; - t3 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet"); - t3 = t3.plainCss; - } else { - first = null; - t3 = false; - } - if (t3) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Top_lel, first.span)); - } - t1 = $async$self._async_evaluate$_styleRuleIgnoringAtRoot; - t1 = t1 == null ? null : t1.originalSelector; - parsedSelector = parsedSelector.nestWithin$3$implicitParent$preserveParentSelectors(t1, !$async$self._async_evaluate$_atRootExcludingStyleRule, $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss); - } - rule = A.ModifiableCssStyleRule$($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__extensionStore, "_extensionStore").addSelector$2(parsedSelector, $async$self._async_evaluate$_mediaQueries), node.span, $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss, parsedSelector); - oldAtRootExcludingStyleRule = $async$self._async_evaluate$_atRootExcludingStyleRule; - t1 = $async$self._async_evaluate$_atRootExcludingStyleRule = false; - t2 = nest ? new A._EvaluateVisitor_visitStyleRule_closure5() : null; - $async$goto = 7; - return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure6($async$self, rule, node), node.hasDeclarations, t2, type$.ModifiableCssStyleRule, type$.Null), $async$visitStyleRule$1); - case 7: - // returning from await. - $async$self._async_evaluate$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; - $async$self._async_evaluate$_warnForBogusCombinators$1(rule); - if (($async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot) == null) { - t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children; - t1 = !t1.get$isEmpty(t1); - } - if (t1) { - t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children; - t1.get$last(t1).isGroupEnd = true; - } - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitStyleRule$1, $async$completer); - }, - _async_evaluate$_warnForBogusCombinators$1(rule) { - var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, t8, t9, _this = this, _null = null; - if (!rule.accept$1(B._IsInvisibleVisitor_false_false)) - for (t1 = rule._style_rule$_selector._box$_inner.value.components, t2 = t1.length, t3 = type$.SourceSpan, t4 = type$.String, t5 = rule.children, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - if (!complex.accept$1(B._IsBogusVisitor_true)) - continue; - if (complex.accept$1(B.C__IsUselessVisitor)) { - visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - _this._async_evaluate$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix20, A.SpanExtensions_trimRight(complex.span), B.Deprecation_C9i); - } else if (complex.leadingCombinators.length !== 0) { - if (!_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__stylesheet, "_stylesheet").plainCss) { - visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - _this._async_evaluate$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix0a, A.SpanExtensions_trimRight(complex.span), B.Deprecation_C9i); - } - } else { - visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - t6 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); - t7 = complex.accept$1(B._IsBogusVisitor_false) ? string$.x20It_wi : ""; - t8 = A.SpanExtensions_trimRight(complex.span); - if (t5.get$length(0) === 0) - A.throwExpression(A.IterableElementError_noElement()); - t9 = J.get$span$z(t5.$index(0, 0)); - _this._async_evaluate$_warn$3('The selector "' + t6 + string$.x22x20is_o + t7 + string$.x0aThis_, new A.MultiSpan(t8, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t5.every$1(t5, new A._EvaluateVisitor__warnForBogusCombinators_closure0()) ? "\n(try converting to a //-style comment)" : "")], t3, t4), t3, t4)), B.Deprecation_C9i); - } - } - }, - visitSupportsRule$1(_, node) { - return this.visitSupportsRule$body$_EvaluateVisitor(0, node); - }, - visitSupportsRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, t1, $async$temp1, $async$temp2; - var $async$visitSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate$_declarationName != null) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Suppor, node.span)); - t1 = node.condition; - $async$temp1 = A; - $async$temp2 = A; - $async$goto = 4; - return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(t1), $async$visitSupportsRule$1); - case 4: - // returning from await. - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through($async$temp1.ModifiableCssSupportsRule$(new $async$temp2.CssValue($async$result, t1.get$span(t1), type$.CssValue_String), node.span), new A._EvaluateVisitor_visitSupportsRule_closure1($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure2(), type$.ModifiableCssSupportsRule, type$.Null), $async$visitSupportsRule$1); - case 3: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitSupportsRule$1, $async$completer); - }, - _async_evaluate$_visitSupportsCondition$1(condition) { - return this._visitSupportsCondition$body$_EvaluateVisitor(condition); - }, - _visitSupportsCondition$body$_EvaluateVisitor(condition) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.String), - $async$returnValue, $async$self = this, t1, _box_0, $async$temp1, $async$temp2; - var $async$_async_evaluate$_visitSupportsCondition$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - _box_0 = {}; - $async$goto = condition instanceof A.SupportsOperation ? 4 : 5; - break; - case 4: - // then - t1 = condition.operator; - $async$temp1 = A; - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate$_parenthesize$2(condition.left, t1), $async$_async_evaluate$_visitSupportsCondition$1); - case 6: - // returning from await. - $async$temp1 = $async$temp1.S($async$result) + " " + t1 + " "; - $async$temp2 = A; - $async$goto = 7; - return A._asyncAwait($async$self._async_evaluate$_parenthesize$2(condition.right, t1), $async$_async_evaluate$_visitSupportsCondition$1); - case 7: - // returning from await. - t1 = $async$temp1 + $async$temp2.S($async$result); - // goto break $label0$0 - $async$goto = 3; - break; - case 5: - // join - $async$goto = condition instanceof A.SupportsNegation ? 8 : 9; - break; - case 8: - // then - $async$temp1 = A; - $async$goto = 10; - return A._asyncAwait($async$self._async_evaluate$_parenthesize$1(condition.condition), $async$_async_evaluate$_visitSupportsCondition$1); - case 10: - // returning from await. - t1 = "not " + $async$temp1.S($async$result); - // goto break $label0$0 - $async$goto = 3; - break; - case 9: - // join - $async$goto = condition instanceof A.SupportsInterpolation ? 11 : 12; - break; - case 11: - // then - $async$goto = 13; - return A._asyncAwait($async$self._evaluateToCss$2$quote(condition.expression, false), $async$_async_evaluate$_visitSupportsCondition$1); - case 13: - // returning from await. - t1 = $async$result; - // goto break $label0$0 - $async$goto = 3; - break; - case 12: - // join - _box_0.declaration = null; - $async$goto = condition instanceof A.SupportsDeclaration ? 14 : 15; - break; - case 14: - // then - _box_0.declaration = condition; - $async$goto = 16; - return A._asyncAwait($async$self._async_evaluate$_withSupportsDeclaration$1$1(new A._EvaluateVisitor__visitSupportsCondition_closure0(_box_0, $async$self), type$.String), $async$_async_evaluate$_visitSupportsCondition$1); - case 16: - // returning from await. - t1 = $async$result; - // goto break $label0$0 - $async$goto = 3; - break; - case 15: - // join - $async$goto = condition instanceof A.SupportsFunction ? 17 : 18; - break; - case 17: - // then - $async$temp1 = A; - $async$goto = 19; - return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(condition.name), $async$_async_evaluate$_visitSupportsCondition$1); - case 19: - // returning from await. - $async$temp1 = $async$temp1.S($async$result) + "("; - $async$temp2 = A; - $async$goto = 20; - return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(condition.$arguments), $async$_async_evaluate$_visitSupportsCondition$1); - case 20: - // returning from await. - t1 = $async$temp1 + $async$temp2.S($async$result) + ")"; - // goto break $label0$0 - $async$goto = 3; - break; - case 18: - // join - $async$goto = condition instanceof A.SupportsAnything ? 21 : 22; - break; - case 21: - // then - $async$temp1 = A; - $async$goto = 23; - return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(condition.contents), $async$_async_evaluate$_visitSupportsCondition$1); - case 23: - // returning from await. - t1 = "(" + $async$temp1.S($async$result) + ")"; - // goto break $label0$0 - $async$goto = 3; - break; - case 22: - // join - t1 = A.throwExpression(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeTypeOfDartObject(condition).toString$0(0) + ".", null)); - case 3: - // break $label0$0 - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_visitSupportsCondition$1, $async$completer); - }, - _async_evaluate$_withSupportsDeclaration$1$1(callback, $T) { - return this._withSupportsDeclaration$body$_EvaluateVisitor(callback, $T, $T); - }, - _withSupportsDeclaration$body$_EvaluateVisitor(callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, t1, oldInSupportsDeclaration; - var $async$_async_evaluate$_withSupportsDeclaration$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - oldInSupportsDeclaration = $async$self._async_evaluate$_inSupportsDeclaration; - $async$self._async_evaluate$_inSupportsDeclaration = true; - $async$handler = 3; - t1 = callback.call$0(); - $async$goto = 6; - return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate$_withSupportsDeclaration$1$1); - case 6: - // returning from await. - t1 = $async$result; - $async$returnValue = t1; - $async$next = [1]; - // goto finally - $async$goto = 4; - break; - $async$next.push(5); - // goto finally - $async$goto = 4; - break; - case 3: - // uncaught - $async$next = [2]; - case 4: - // finally - $async$handler = 2; - $async$self._async_evaluate$_inSupportsDeclaration = oldInSupportsDeclaration; - // goto the next finally handler - $async$goto = $async$next.pop(); - break; - case 5: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_withSupportsDeclaration$1$1, $async$completer); - }, - _async_evaluate$_parenthesize$2(condition, operator) { - return this._parenthesize$body$_EvaluateVisitor(condition, operator); - }, - _async_evaluate$_parenthesize$1(condition) { - return this._async_evaluate$_parenthesize$2(condition, null); - }, - _parenthesize$body$_EvaluateVisitor(condition, operator) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.String), - $async$returnValue, $async$self = this, t1, $async$temp1; - var $async$_async_evaluate$_parenthesize$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if (!(condition instanceof A.SupportsNegation)) - if (condition instanceof A.SupportsOperation) - t1 = operator == null || operator !== condition.operator; - else - t1 = false; - else - t1 = true; - $async$goto = t1 ? 3 : 4; - break; - case 3: - // then - $async$temp1 = A; - $async$goto = 5; - return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(condition), $async$_async_evaluate$_parenthesize$2); - case 5: - // returning from await. - $async$returnValue = "(" + $async$temp1.S($async$result) + ")"; - // goto return - $async$goto = 1; - break; - case 4: - // join - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(condition), $async$_async_evaluate$_parenthesize$2); - case 6: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_parenthesize$2, $async$completer); - }, - visitVariableDeclaration$1(_, node) { - return this.visitVariableDeclaration$body$_EvaluateVisitor(0, node); - }, - visitVariableDeclaration$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, t2, value, t1, $async$temp1, $async$temp2, $async$temp3; - var $async$visitVariableDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = {}; - if (node.isGuarded) { - if (node.namespace == null && $async$self._async_evaluate$_environment._async_environment$_variables.length === 1) { - t2 = $async$self._async_evaluate$_configuration._configuration$_values; - t2 = t2.get$isEmpty(t2) ? null : t2.remove$1(0, node.name); - t1.override = null; - if (t2 != null) { - t1.override = t2; - t2 = !t2.value.$eq(0, B.C__SassNull); - } else - t2 = false; - if (t2) { - $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure2(t1, $async$self, node)); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - } - value = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure3($async$self, node)); - if (value != null && !value.$eq(0, B.C__SassNull)) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - } - if (node.isGlobal && !$async$self._async_evaluate$_environment.globalVariableExists$1(node.name)) { - t1 = $async$self._async_evaluate$_environment._async_environment$_variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName(node.span) + ": null` at the stylesheet root."; - $async$self._async_evaluate$_warn$3(t1, node.span, B.Deprecation_KIf); - } - t1 = node.expression; - t2 = t1.accept$1($async$self); - $async$temp1 = node; - $async$temp2 = A; - $async$temp3 = node; - $async$goto = 3; - return A._asyncAwait(type$.Future_Value._is(t2) ? t2 : A._Future$value(t2, type$.Value), $async$visitVariableDeclaration$1); - case 3: - // returning from await. - $async$self._async_evaluate$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitVariableDeclaration_closure4($async$self, $async$temp3, $async$self._async_evaluate$_withoutSlash$2($async$result, t1))); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitVariableDeclaration$1, $async$completer); - }, - visitUseRule$1(_, node) { - return this.visitUseRule$body$_EvaluateVisitor(0, node); - }, - visitUseRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, values, t3, t4, _i, variable, t5, variableNodeWithSpan, t6, t7, configuration, t1, t2, $async$temp1, $async$temp2, $async$temp3; - var $async$visitUseRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = node.configuration; - t2 = t1.length; - $async$goto = t2 !== 0 ? 3 : 5; - break; - case 3: - // then - values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); - t3 = type$._Future_Value, t4 = type$.Future_Value, _i = 0; - case 6: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 8; - break; - } - variable = t1[_i]; - t5 = variable.expression; - variableNodeWithSpan = $async$self._async_evaluate$_expressionNode$1(t5); - t6 = variable.name; - t5 = t5.accept$1($async$self); - if (!t4._is(t5)) { - t7 = new A._Future($.Zone__current, t3); - t7._state = 8; - t7._resultOrListeners = t5; - t5 = t7; - } - $async$temp1 = values; - $async$temp2 = t6; - $async$temp3 = A; - $async$goto = 9; - return A._asyncAwait(t5, $async$visitUseRule$1); - case 9: - // returning from await. - $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue($async$self._async_evaluate$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); - case 7: - // for update - ++_i; - // goto for condition - $async$goto = 6; - break; - case 8: - // after for - configuration = new A.ExplicitConfiguration(node, values, null); - // goto join - $async$goto = 4; - break; - case 5: - // else - configuration = B.Configuration_Map_empty_null; - case 4: - // join - $async$goto = 10; - return A._asyncAwait($async$self._async_evaluate$_loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure0($async$self, node), configuration), $async$visitUseRule$1); - case 10: - // returning from await. - $async$self._async_evaluate$_assertConfigurationIsEmpty$1(configuration); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitUseRule$1, $async$completer); - }, - visitWarnRule$1(_, node) { - return this.visitWarnRule$body$_EvaluateVisitor(0, node); - }, - visitWarnRule$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, value, t1; - var $async$visitWarnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitWarnRule_closure0($async$self, node), type$.Value), $async$visitWarnRule$1); - case 3: - // returning from await. - value = $async$result; - t1 = value instanceof A.SassString ? value._string$_text : $async$self._async_evaluate$_serialize$2(value, node.expression); - $async$self._async_evaluate$_logger.warn$2$trace(0, t1, $async$self._async_evaluate$_stackTrace$1(node.span)); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitWarnRule$1, $async$completer); - }, - visitWhileRule$1(_, node) { - return this._async_evaluate$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure0(this, node), true, node.hasDeclarations, type$.nullable_Value); - }, - visitBinaryOperationExpression$1(_, node) { - var t1, _this = this; - if (_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__stylesheet, "_stylesheet").plainCss) { - t1 = node.operator; - t1 = t1 !== B.BinaryOperator_wdM && t1 !== B.BinaryOperator_U77; - } else - t1 = false; - if (t1) - throw A.wrapException(_this._async_evaluate$_exception$2("Operators aren't allowed in plain CSS.", node.get$operatorSpan())); - return _this._addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure0(_this, node), type$.Value); - }, - _async_evaluate$_slash$3(left, right, node) { - var t2, _1_1, - result = left.dividedBy$1(right), - _1_2_isSet = left instanceof A.SassNumber, - _1_2 = null, right0 = null, - t1 = false; - if (_1_2_isSet) { - t2 = type$.SassNumber; - t2._as(left); - if (right instanceof A.SassNumber) { - t2._as(right); - t1 = node.allowsSlash && this._async_evaluate$_operandAllowsSlash$1(node.left) && this._async_evaluate$_operandAllowsSlash$1(node.right); - right0 = right; - _1_2 = right0; - } else - _1_2 = right; - _1_1 = left; - } else { - _1_1 = left; - left = null; - } - if (t1) - return type$.SassNumber._as(result).withSlash$2(left, right0); - if (_1_1 instanceof A.SassNumber) - t1 = (_1_2_isSet ? _1_2 : right) instanceof A.SassNumber; - else - t1 = false; - if (t1) { - this._async_evaluate$_warn$3(string$.Using__o + A.S(new A._EvaluateVisitor__slash_recommendation0().call$1(node)) + " or " + A.expressionToCalc(node).toString$0(0) + string$.x0a_Morex20, node.get$span(0), B.Deprecation_mRl); - return result; - } - return result; - }, - _async_evaluate$_operandAllowsSlash$1(node) { - var t1; - if (node instanceof A.FunctionExpression) - if (node.namespace == null) { - t1 = node.name; - t1 = B.Set_yHF81.contains$1(0, t1.toLowerCase()) && this._async_evaluate$_environment.getFunction$1(t1) == null; - } else - t1 = false; - else - t1 = true; - return t1; - }, - visitValueExpression$1(_, node) { - return this.visitValueExpression$body$_EvaluateVisitor(0, node); - }, - visitValueExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue; - var $async$visitValueExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = node.value; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitValueExpression$1, $async$completer); - }, - visitVariableExpression$1(_, node) { - return this.visitVariableExpression$body$_EvaluateVisitor(0, node); - }, - visitVariableExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$self = this, result; - var $async$visitVariableExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - result = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure0($async$self, node)); - if (result != null) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - throw A.wrapException($async$self._async_evaluate$_exception$2("Undefined variable.", node.span)); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitVariableExpression$1, $async$completer); - }, - visitUnaryOperationExpression$1(_, node) { - return this.visitUnaryOperationExpression$body$_EvaluateVisitor(0, node); - }, - visitUnaryOperationExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$self = this, $async$temp1, $async$temp2, $async$temp3; - var $async$visitUnaryOperationExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$temp1 = node; - $async$temp2 = A; - $async$temp3 = node; - $async$goto = 3; - return A._asyncAwait(node.operand.accept$1($async$self), $async$visitUnaryOperationExpression$1); - case 3: - // returning from await. - $async$returnValue = $async$self._async_evaluate$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitUnaryOperationExpression_closure0($async$temp3, $async$result)); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitUnaryOperationExpression$1, $async$completer); - }, - visitBooleanExpression$1(_, node) { - return this.visitBooleanExpression$body$_EvaluateVisitor(0, node); - }, - visitBooleanExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassBoolean), - $async$returnValue; - var $async$visitBooleanExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = node.value ? B.SassBoolean_true : B.SassBoolean_false; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitBooleanExpression$1, $async$completer); - }, - visitIfExpression$1(_, node) { - return this.visitIfExpression$body$_EvaluateVisitor(0, node); - }, - visitIfExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$self = this, condition, t1, ifTrue, ifFalse, result, _0_0, positional, named; - var $async$visitIfExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_evaluateMacroArguments$1(node), $async$visitIfExpression$1); - case 3: - // returning from await. - _0_0 = $async$result; - positional = _0_0._0; - named = _0_0._1; - $async$self._async_evaluate$_verifyArguments$4(J.get$length$asx(positional), named, $.$get$IfExpression_declaration(), node); - condition = A.ListExtensions_elementAtOrNull(positional, 0); - if (condition == null) { - t1 = named.$index(0, "condition"); - t1.toString; - condition = t1; - } - ifTrue = A.ListExtensions_elementAtOrNull(positional, 1); - if (ifTrue == null) { - t1 = named.$index(0, "if-true"); - t1.toString; - ifTrue = t1; - } - ifFalse = A.ListExtensions_elementAtOrNull(positional, 2); - if (ifFalse == null) { - t1 = named.$index(0, "if-false"); - t1.toString; - ifFalse = t1; - } - $async$goto = 4; - return A._asyncAwait(condition.accept$1($async$self), $async$visitIfExpression$1); - case 4: - // returning from await. - result = $async$result.get$isTruthy() ? ifTrue : ifFalse; - t1 = result.accept$1($async$self); - $async$goto = 5; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$visitIfExpression$1); - case 5: - // returning from await. - $async$returnValue = $async$self._async_evaluate$_withoutSlash$2($async$result, $async$self._async_evaluate$_expressionNode$1(result)); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitIfExpression$1, $async$completer); - }, - visitNullExpression$1(_, node) { - return this.visitNullExpression$body$_EvaluateVisitor(0, node); - }, - visitNullExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue; - var $async$visitNullExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = B.C__SassNull; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitNullExpression$1, $async$completer); - }, - visitNumberExpression$1(_, node) { - return this.visitNumberExpression$body$_EvaluateVisitor(0, node); - }, - visitNumberExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber), - $async$returnValue; - var $async$visitNumberExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = A.SassNumber_SassNumber(node.value, node.unit); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitNumberExpression$1, $async$completer); - }, - visitParenthesizedExpression$1(_, node) { - var _this = this; - return _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__stylesheet, "_stylesheet").plainCss ? A.throwExpression(_this._async_evaluate$_exception$2("Parentheses aren't allowed in plain CSS.", node.span)) : node.expression.accept$1(_this); - }, - visitColorExpression$1(_, node) { - return this.visitColorExpression$body$_EvaluateVisitor(0, node); - }, - visitColorExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassColor), - $async$returnValue; - var $async$visitColorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = node.value; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitColorExpression$1, $async$completer); - }, - visitListExpression$1(_, node) { - return this.visitListExpression$body$_EvaluateVisitor(0, node); - }, - visitListExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassList), - $async$returnValue, $async$self = this, $async$temp1; - var $async$visitListExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$temp1 = A; - $async$goto = 3; - return A._asyncAwait(A.mapAsync(node.contents, new A._EvaluateVisitor_visitListExpression_closure0($async$self), type$.Expression, type$.Value), $async$visitListExpression$1); - case 3: - // returning from await. - $async$returnValue = $async$temp1.SassList$($async$result, node.separator, node.hasBrackets); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitListExpression$1, $async$completer); - }, - visitMapExpression$1(_, node) { - return this.visitMapExpression$body$_EvaluateVisitor(0, node); - }, - visitMapExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassMap), - $async$returnValue, $async$self = this, t2, t3, _i, t4, key, value, keyValue, valueValue, oldValueSpan, t1, map, keyNodes; - var $async$visitMapExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = type$.Value; - map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode); - t2 = node.pairs, t3 = t2.length, _i = 0; - case 3: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 5; - break; - } - t4 = t2[_i]; - key = t4._0; - value = t4._1; - $async$goto = 6; - return A._asyncAwait(key.accept$1($async$self), $async$visitMapExpression$1); - case 6: - // returning from await. - keyValue = $async$result; - $async$goto = 7; - return A._asyncAwait(value.accept$1($async$self), $async$visitMapExpression$1); - case 7: - // returning from await. - valueValue = $async$result; - if (map.containsKey$1(keyValue)) { - t1 = keyNodes.$index(0, keyValue); - oldValueSpan = t1 == null ? null : t1.get$span(t1); - t1 = key.get$span(key); - t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - if (oldValueSpan != null) - t2.$indexSet(0, oldValueSpan, "first key"); - throw A.wrapException(A.MultiSpanSassRuntimeException$("Duplicate key.", t1, "second key", t2, $async$self._async_evaluate$_stackTrace$1(key.get$span(key)), null)); - } - map.$indexSet(0, keyValue, valueValue); - keyNodes.$indexSet(0, keyValue, key); - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = new A.SassMap(A.ConstantMap_ConstantMap$from(map, t1, t1)); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitMapExpression$1, $async$completer); - }, - visitFunctionExpression$1(_, node) { - return this.visitFunctionExpression$body$_EvaluateVisitor(0, node); - }, - visitFunctionExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$self = this, t2, _0_0, t3, t4, $name, oldInFunction, result, t1, $function; - var $async$visitFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = {}; - $function = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss ? null : $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure2($async$self, node)); - t1.$function = $function; - $async$goto = $function == null ? 3 : 5; - break; - case 3: - // then - if (node.namespace != null) - throw A.wrapException($async$self._async_evaluate$_exception$2("Undefined function.", node.span)); - t2 = node.name; - _0_0 = t2.toLowerCase(); - t3 = false; - if ("min" === _0_0 || "max" === _0_0 || "round" === _0_0 || "abs" === _0_0) { - t3 = node.$arguments; - t4 = t3.named; - t3 = t4.get$isEmpty(t4) && t3.rest == null && B.JSArray_methods.every$1(t3.positional, new A._EvaluateVisitor_visitFunctionExpression_closure3()); - $name = _0_0; - } else - $name = null; - $async$goto = t3 ? 6 : 7; - break; - case 6: - // then - $async$goto = 8; - return A._asyncAwait($async$self._async_evaluate$_visitCalculation$2$inLegacySassFunction(node, $name), $async$visitFunctionExpression$1); - case 8: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 7: - // join - $async$goto = "calc" === _0_0 || "clamp" === _0_0 || "hypot" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "sqrt" === _0_0 || "exp" === _0_0 || "sign" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "atan2" === _0_0 || "pow" === _0_0 || "log" === _0_0 ? 9 : 10; - break; - case 9: - // then - $async$goto = 11; - return A._asyncAwait($async$self._async_evaluate$_visitCalculation$1(node), $async$visitFunctionExpression$1); - case 11: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 10: - // join - $function = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss ? null : $async$self._async_evaluate$_builtInFunctions.$index(0, t2); - t2 = t1.$function = $function == null ? new A.PlainCssCallable(node.originalName) : $function; - // goto join - $async$goto = 4; - break; - case 5: - // else - t2 = $function; - case 4: - // join - if (B.JSString_methods.startsWith$1(node.originalName, "--") && t2 instanceof A.UserDefinedCallable && !B.JSString_methods.startsWith$1(t2.declaration.originalName, "--")) - $async$self._async_evaluate$_warn$3(string$.Sassx20_ff, node.get$nameSpan(), B.Deprecation_0); - oldInFunction = $async$self._async_evaluate$_inFunction; - $async$self._async_evaluate$_inFunction = true; - $async$goto = 12; - return A._asyncAwait($async$self._async_evaluate$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure4(t1, $async$self, node), type$.Value), $async$visitFunctionExpression$1); - case 12: - // returning from await. - result = $async$result; - $async$self._async_evaluate$_inFunction = oldInFunction; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitFunctionExpression$1, $async$completer); - }, - _async_evaluate$_visitCalculation$2$inLegacySassFunction(node, inLegacySassFunction) { - return this._visitCalculation$body$_EvaluateVisitor(node, inLegacySassFunction); - }, - _async_evaluate$_visitCalculation$1(node) { - return this._async_evaluate$_visitCalculation$2$inLegacySassFunction(node, null); - }, - _visitCalculation$body$_EvaluateVisitor(node, inLegacySassFunction) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$next = [], $async$self = this, $arguments, oldCallableNode, t1, _0_0, error, stackTrace, t4, _i, exception, t2, t3, $async$temp1; - var $async$_async_evaluate$_visitCalculation$2$inLegacySassFunction = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t2 = node.$arguments; - t3 = t2.named; - if (t3.get$isNotEmpty(t3)) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Keywor, node.span)); - else if (t2.rest != null) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Rest_a, node.span)); - $async$self._async_evaluate$_checkCalculationArguments$1(node); - t3 = A._setArrayType([], type$.JSArray_Object); - t2 = t2.positional, t4 = t2.length, _i = 0; - case 3: - // for condition - if (!(_i < t4)) { - // goto after for - $async$goto = 5; - break; - } - $async$temp1 = t3; - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction), $async$_async_evaluate$_visitCalculation$2$inLegacySassFunction); - case 6: - // returning from await. - $async$temp1.push($async$result); - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $arguments = t3; - if ($async$self._async_evaluate$_inSupportsDeclaration) { - $async$returnValue = new A.SassCalculation(node.name, A.List_List$unmodifiable($arguments, type$.Object)); - // goto return - $async$goto = 1; - break; - } - oldCallableNode = $async$self._async_evaluate$_callableNode; - $async$self._async_evaluate$_callableNode = node; - try { - t1 = null; - t3 = node.name; - _0_0 = t3.toLowerCase(); - $label0$0: { - if ("calc" === _0_0) { - t1 = A.SassCalculation_calc(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("sqrt" === _0_0) { - t1 = A.SassCalculation__singleArgument("sqrt", J.$index$asx($arguments, 0), A.number0__sqrt$closure(), true); - break $label0$0; - } - if ("sin" === _0_0) { - t1 = A.SassCalculation__singleArgument("sin", J.$index$asx($arguments, 0), A.number0__sin$closure(), false); - break $label0$0; - } - if ("cos" === _0_0) { - t1 = A.SassCalculation__singleArgument("cos", J.$index$asx($arguments, 0), A.number0__cos$closure(), false); - break $label0$0; - } - if ("tan" === _0_0) { - t1 = A.SassCalculation__singleArgument("tan", J.$index$asx($arguments, 0), A.number0__tan$closure(), false); - break $label0$0; - } - if ("asin" === _0_0) { - t1 = A.SassCalculation__singleArgument("asin", J.$index$asx($arguments, 0), A.number0__asin$closure(), true); - break $label0$0; - } - if ("acos" === _0_0) { - t1 = A.SassCalculation__singleArgument("acos", J.$index$asx($arguments, 0), A.number0__acos$closure(), true); - break $label0$0; - } - if ("atan" === _0_0) { - t1 = A.SassCalculation__singleArgument("atan", J.$index$asx($arguments, 0), A.number0__atan$closure(), true); - break $label0$0; - } - if ("abs" === _0_0) { - t1 = A.SassCalculation_abs(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("exp" === _0_0) { - t1 = A.SassCalculation_exp(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("sign" === _0_0) { - t1 = A.SassCalculation_sign(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("min" === _0_0) { - t1 = A.SassCalculation_min($arguments); - break $label0$0; - } - if ("max" === _0_0) { - t1 = A.SassCalculation_max($arguments); - break $label0$0; - } - if ("hypot" === _0_0) { - t1 = A.SassCalculation_hypot($arguments); - break $label0$0; - } - if ("pow" === _0_0) { - t1 = A.SassCalculation_pow(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("atan2" === _0_0) { - t1 = A.SassCalculation_atan2(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("log" === _0_0) { - t1 = A.SassCalculation_log(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("mod" === _0_0) { - t1 = A.SassCalculation_mod(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("rem" === _0_0) { - t1 = A.SassCalculation_rem(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("round" === _0_0) { - t1 = A.SassCalculation_roundInternal(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2), inLegacySassFunction, node.span, new A._EvaluateVisitor__visitCalculation_closure0($async$self, node)); - break $label0$0; - } - if ("clamp" === _0_0) { - t1 = A.SassCalculation_clamp(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); - break $label0$0; - } - t3 = A.UnsupportedError$('Unknown calculation name "' + t3 + '".'); - t1 = A.throwExpression(t3); - } - t1 = t1; - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassScriptException) { - error = t1; - stackTrace = A.getTraceFromException(exception); - if (B.JSString_methods.contains$1(error.message, "compatible")) - $async$self._async_evaluate$_verifyCompatibleNumbers$2($arguments, t2); - A.throwWithTrace($async$self._async_evaluate$_exception$2(error.message, node.span), error, stackTrace); - } else - throw exception; - } finally { - $async$self._async_evaluate$_callableNode = oldCallableNode; - } - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_visitCalculation$2$inLegacySassFunction, $async$completer); - }, - _async_evaluate$_checkCalculationArguments$1(node) { - var t1, _0_0, - check = new A._EvaluateVisitor__checkCalculationArguments_check0(this, node); - $label0$0: { - t1 = node.name; - _0_0 = t1.toLowerCase(); - if ("calc" === _0_0 || "sqrt" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "abs" === _0_0 || "exp" === _0_0 || "sign" === _0_0) { - check.call$1(1); - break $label0$0; - } - if ("min" === _0_0 || "max" === _0_0 || "hypot" === _0_0) { - check.call$0(); - break $label0$0; - } - if ("pow" === _0_0 || "atan2" === _0_0 || "log" === _0_0 || "mod" === _0_0 || "rem" === _0_0) { - check.call$1(2); - break $label0$0; - } - if ("round" === _0_0 || "clamp" === _0_0) { - check.call$1(3); - break $label0$0; - } - throw A.wrapException(A.UnsupportedError$('Unknown calculation name "' + t1 + '".')); - } - }, - _async_evaluate$_verifyCompatibleNumbers$2(args, nodesWithSpans) { - var i, t1, _0_0, arg, number1, j, number2; - for (i = 0; t1 = args.length, i < t1; ++i) { - _0_0 = args[i]; - if (_0_0 instanceof A.SassNumber) { - t1 = _0_0.get$hasComplexUnits(); - arg = _0_0; - } else { - arg = null; - t1 = false; - } - if (t1) - throw A.wrapException(this._async_evaluate$_exception$2("Number " + A.S(arg) + " isn't compatible with CSS calculations.", J.get$span$z(nodesWithSpans[i]))); - } - for (i = 0; i < t1 - 1; ++i) { - number1 = args[i]; - if (!(number1 instanceof A.SassNumber)) - continue; - for (j = i + 1; t1 = args.length, j < t1; ++j) { - number2 = args[j]; - if (!(number2 instanceof A.SassNumber)) - continue; - if (number1.hasPossiblyCompatibleUnits$1(number2)) - continue; - throw A.wrapException(A.MultiSpanSassRuntimeException$(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", J.get$span$z(nodesWithSpans[i]), number1.toString$0(0), A.LinkedHashMap_LinkedHashMap$_literal([J.get$span$z(nodesWithSpans[j]), number2.toString$0(0)], type$.FileSpan, type$.String), this._async_evaluate$_stackTrace$1(J.get$span$z(nodesWithSpans[i])), null)); - } - } - }, - _async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(node, inLegacySassFunction) { - return this._visitCalculationExpression$body$_EvaluateVisitor(node, inLegacySassFunction); - }, - _visitCalculationExpression$body$_EvaluateVisitor(node, inLegacySassFunction) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Object), - $async$returnValue, $async$self = this, result, t2, _0_0, _1_0, t3, _i, i, _box_0, t1, inner, $async$temp1; - var $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - _box_0 = {}; - t1 = node instanceof A.ParenthesizedExpression; - inner = t1 ? node.expression : null; - $async$goto = t1 ? 3 : 4; - break; - case 3: - // then - $async$goto = 5; - return A._asyncAwait($async$self._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(inner, inLegacySassFunction), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); - case 5: - // returning from await. - result = $async$result; - $async$returnValue = result instanceof A.SassString ? new A.SassString("(" + result._string$_text + ")", false) : result; - // goto return - $async$goto = 1; - break; - case 4: - // join - $async$goto = node instanceof A.StringExpression && node.accept$1(B.C_IsCalculationSafeVisitor) ? 6 : 7; - break; - case 6: - // then - t1 = node.text; - t2 = t1.get$asPlain(); - _0_0 = t2 == null ? null : t2.toLowerCase(); - if ("pi" === _0_0) { - t1 = A.SassNumber_SassNumber(3.141592653589793, null); - // goto break $label0$0 - $async$goto = 8; - break; - } - if ("e" === _0_0) { - t1 = A.SassNumber_SassNumber(2.718281828459045, null); - // goto break $label0$0 - $async$goto = 8; - break; - } - if ("infinity" === _0_0) { - t1 = A.SassNumber_SassNumber(1 / 0, null); - // goto break $label0$0 - $async$goto = 8; - break; - } - if ("-infinity" === _0_0) { - t1 = A.SassNumber_SassNumber(-1 / 0, null); - // goto break $label0$0 - $async$goto = 8; - break; - } - if ("nan" === _0_0) { - t1 = A.SassNumber_SassNumber(0 / 0, null); - // goto break $label0$0 - $async$goto = 8; - break; - } - $async$temp1 = A; - $async$goto = 9; - return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(t1), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); - case 9: - // returning from await. - t1 = new $async$temp1.SassString($async$result, false); - // goto break $label0$0 - $async$goto = 8; - break; - case 8: - // break $label0$0 - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - case 7: - // join - _box_0.right = _box_0.left = _box_0.operator = null; - t1 = node instanceof A.BinaryOperationExpression; - if (t1) { - _box_0.operator = node.operator; - _box_0.left = node.left; - _box_0.right = node.right; - } - $async$goto = t1 ? 10 : 11; - break; - case 10: - // then - $async$self._async_evaluate$_checkWhitespaceAroundCalculationOperator$1(node); - $async$goto = 12; - return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor__visitCalculationExpression_closure0(_box_0, $async$self, node, inLegacySassFunction), type$.Object), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); - case 12: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 11: - // join - $async$goto = node instanceof A.NumberExpression || node instanceof A.VariableExpression || node instanceof A.FunctionExpression || node instanceof A.IfExpression ? 13 : 14; - break; - case 13: - // then - $async$goto = 15; - return A._asyncAwait(node.accept$1($async$self), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); - case 15: - // returning from await. - _1_0 = $async$result; - $label1$1: { - if (_1_0 instanceof A.SassNumber) { - t1 = _1_0; - break $label1$1; - } - if (_1_0 instanceof A.SassCalculation) { - t1 = _1_0; - break $label1$1; - } - if (_1_0 instanceof A.SassString) { - t1 = !_1_0._hasQuotes; - result = _1_0; - } else { - result = null; - t1 = false; - } - if (t1) { - t1 = result; - break $label1$1; - } - t1 = A.throwExpression($async$self._async_evaluate$_exception$2("Value " + _1_0.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); - } - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - case 14: - // join - $async$goto = node instanceof A.ListExpression && !node.hasBrackets && B.ListSeparator_nbm === node.separator && node.contents.length >= 2 ? 16 : 17; - break; - case 16: - // then - t1 = A._setArrayType([], type$.JSArray_Object); - t2 = node.contents, t3 = t2.length, _i = 0; - case 18: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 20; - break; - } - $async$temp1 = t1; - $async$goto = 21; - return A._asyncAwait($async$self._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); - case 21: - // returning from await. - $async$temp1.push($async$result); - case 19: - // for update - ++_i; - // goto for condition - $async$goto = 18; - break; - case 20: - // after for - $async$self._async_evaluate$_checkAdjacentCalculationValues$2(t1, node); - for (i = 0; i < t1.length; ++i) { - t3 = t1[i]; - if (t3 instanceof A.CalculationOperation && t2[i] instanceof A.ParenthesizedExpression) - t1[i] = new A.SassString("(" + A.S(t3) + ")", false); - } - $async$returnValue = new A.SassString(B.JSArray_methods.join$1(t1, " "), false); - // goto return - $async$goto = 1; - break; - case 17: - // join - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.This_e, node.get$span(node))); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction, $async$completer); - }, - _async_evaluate$_checkWhitespaceAroundCalculationOperator$1(node) { - var t2, t3, t4, textBetweenOperands, first, last, - t1 = node.operator; - if (t1 !== B.BinaryOperator_u15 && t1 !== B.BinaryOperator_SjO) - return; - t1 = node.left; - t2 = t1.get$span(t1); - t2 = t2.get$file(t2); - t3 = node.right; - t4 = t3.get$span(t3); - if (t2 !== t4.get$file(t4)) - return; - t2 = t1.get$span(t1); - t2 = t2.get$end(t2); - t4 = t3.get$span(t3); - if (t2.offset >= t4.get$start(t4).offset) - return; - t2 = t1.get$span(t1); - t2 = t2.get$file(t2); - t1 = t1.get$span(t1); - t1 = t1.get$end(t1); - t3 = t3.get$span(t3); - textBetweenOperands = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, t1.offset, t3.get$start(t3).offset), 0, null); - first = textBetweenOperands.charCodeAt(0); - last = textBetweenOperands.charCodeAt(textBetweenOperands.length - 1); - if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47) - t1 = !(last === 32 || last === 9 || last === 10 || last === 13 || last === 12 || last === 47); - else - t1 = true; - if (t1) - throw A.wrapException(this._async_evaluate$_exception$2(string$.x22x2b__an, node.get$operatorSpan())); - }, - _async_evaluate$_binaryOperatorToCalculationOperator$2(operator, node) { - var t1; - $label0$0: { - if (B.BinaryOperator_u15 === operator) { - t1 = B.CalculationOperator_g2q; - break $label0$0; - } - if (B.BinaryOperator_SjO === operator) { - t1 = B.CalculationOperator_CxF; - break $label0$0; - } - if (B.BinaryOperator_2No === operator) { - t1 = B.CalculationOperator_171; - break $label0$0; - } - if (B.BinaryOperator_U77 === operator) { - t1 = B.CalculationOperator_Qf1; - break $label0$0; - } - t1 = A.throwExpression(this._async_evaluate$_exception$2(string$.This_o, node.get$operatorSpan())); - } - return t1; - }, - _async_evaluate$_checkAdjacentCalculationValues$2(elements, node) { - var t1, i, t2, previous, current, previousNode, currentNode, _0_2; - for (t1 = elements.length, i = 1; i < t1; ++i) { - t2 = i - 1; - previous = elements[t2]; - current = elements[i]; - if (previous instanceof A.SassString || current instanceof A.SassString) - continue; - t1 = node.contents; - previousNode = t1[t2]; - currentNode = t1[i]; - if (currentNode instanceof A.UnaryOperationExpression) { - _0_2 = currentNode.operator; - if (B.UnaryOperator_AiQ !== _0_2) - t1 = B.UnaryOperator_cLp === _0_2; - else - t1 = true; - } else - t1 = false; - if (!t1) - t1 = currentNode instanceof A.NumberExpression && currentNode.value < 0; - else - t1 = true; - if (t1) - throw A.wrapException(this._async_evaluate$_exception$2(string$.x22x2b__an, A.FileSpanExtension_subspan(currentNode.get$span(currentNode), 0, 1))); - else - throw A.wrapException(this._async_evaluate$_exception$2("Missing math operator.", previousNode.get$span(previousNode).expand$1(0, currentNode.get$span(currentNode)))); - } - }, - visitInterpolatedFunctionExpression$1(_, node) { - return this.visitInterpolatedFunctionExpression$body$_EvaluateVisitor(0, node); - }, - visitInterpolatedFunctionExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$self = this, result, t1, oldInFunction; - var $async$visitInterpolatedFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(node.name), $async$visitInterpolatedFunctionExpression$1); - case 3: - // returning from await. - t1 = $async$result; - oldInFunction = $async$self._async_evaluate$_inFunction; - $async$self._async_evaluate$_inFunction = true; - $async$goto = 4; - return A._asyncAwait($async$self._async_evaluate$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure0($async$self, node, new A.PlainCssCallable(t1)), type$.Value), $async$visitInterpolatedFunctionExpression$1); - case 4: - // returning from await. - result = $async$result; - $async$self._async_evaluate$_inFunction = oldInFunction; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitInterpolatedFunctionExpression$1, $async$completer); - }, - _async_evaluate$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { - return this._runUserDefinedCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan, run, $V, $V); - }, - _runUserDefinedCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan, run, $V, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, oldCallable, result, evaluated, $name; - var $async$_async_evaluate$_runUserDefinedCallable$1$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_evaluateArguments$1($arguments), $async$_async_evaluate$_runUserDefinedCallable$1$4); - case 3: - // returning from await. - evaluated = $async$result; - $name = callable.declaration.name; - if ($name !== "@content") - $name += "()"; - oldCallable = $async$self._async_evaluate$_currentCallable; - $async$self._async_evaluate$_currentCallable = callable; - $async$goto = 4; - return A._asyncAwait($async$self._async_evaluate$_withStackFrame$1$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure0($async$self, callable, evaluated, nodeWithSpan, run, $V), $V), $async$_async_evaluate$_runUserDefinedCallable$1$4); - case 4: - // returning from await. - result = $async$result; - $async$self._async_evaluate$_currentCallable = oldCallable; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_runUserDefinedCallable$1$4, $async$completer); - }, - _async_evaluate$_runFunctionCallable$3($arguments, callable, nodeWithSpan) { - return this._runFunctionCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan); - }, - _runFunctionCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, buffer, first, argument, restArg, rest, error, t1, t2, _i, t3, t4, exception, $async$exception, $async$temp1; - var $async$_async_evaluate$_runFunctionCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = type$.AsyncBuiltInCallable._is(callable) ? 3 : 5; - break; - case 3: - // then - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate$_runBuiltInCallable$3($arguments, callable, nodeWithSpan), $async$_async_evaluate$_runFunctionCallable$3); - case 6: - // returning from await. - $async$returnValue = $async$self._async_evaluate$_withoutSlash$2($async$result, nodeWithSpan); - // goto return - $async$goto = 1; - break; - // goto join - $async$goto = 4; - break; - case 5: - // else - $async$goto = type$.UserDefinedCallable_AsyncEnvironment._is(callable) ? 7 : 9; - break; - case 7: - // then - $async$goto = 10; - return A._asyncAwait($async$self._async_evaluate$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure0($async$self, callable), type$.Value), $async$_async_evaluate$_runFunctionCallable$3); - case 10: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - // goto join - $async$goto = 8; - break; - case 9: - // else - $async$goto = callable instanceof A.PlainCssCallable ? 11 : 13; - break; - case 11: - // then - t1 = $arguments.named; - if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); - buffer = new A.StringBuffer(callable.name + "("); - $async$handler = 15; - first = true; - t1 = $arguments.positional, t2 = t1.length, _i = 0; - case 18: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 20; - break; - } - argument = t1[_i]; - if (first) - first = false; - else - buffer._contents += ", "; - t3 = buffer; - $async$temp1 = A; - $async$goto = 21; - return A._asyncAwait($async$self._evaluateToCss$1(argument), $async$_async_evaluate$_runFunctionCallable$3); - case 21: - // returning from await. - t4 = $async$temp1.S($async$result); - t3._contents += t4; - case 19: - // for update - ++_i; - // goto for condition - $async$goto = 18; - break; - case 20: - // after for - restArg = $arguments.rest; - $async$goto = restArg != null ? 22 : 23; - break; - case 22: - // then - $async$goto = 24; - return A._asyncAwait(restArg.accept$1($async$self), $async$_async_evaluate$_runFunctionCallable$3); - case 24: - // returning from await. - rest = $async$result; - if (!first) - buffer._contents += ", "; - t1 = buffer; - t2 = $async$self._async_evaluate$_serialize$2(rest, restArg); - t1._contents += t2; - case 23: - // join - $async$handler = 2; - // goto after finally - $async$goto = 17; - break; - case 15: - // catch - $async$handler = 14; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (type$.SassRuntimeException._is(t1)) { - error = t1; - if (!B.JSString_methods.endsWith$1(error._span_exception$_message, "isn't a valid CSS value.")) - throw $async$exception; - throw A.wrapException(A.MultiSpanSassRuntimeException$(error._span_exception$_message, J.get$span$z(error), "value", A.LinkedHashMap_LinkedHashMap$_literal([nodeWithSpan.get$span(nodeWithSpan), "unknown function treated as plain CSS"], type$.FileSpan, type$.String), J.get$trace$z(error), null)); - } else - throw $async$exception; - // goto after finally - $async$goto = 17; - break; - case 14: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 17: - // after finally - t1 = buffer; - t2 = A.Primitives_stringFromCharCode(41); - t1._contents += t2; - t2 = buffer._contents; - $async$returnValue = new A.SassString(t2.charCodeAt(0) == 0 ? t2 : t2, false); - // goto return - $async$goto = 1; - break; - // goto join - $async$goto = 12; - break; - case 13: - // else - throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$(callable).toString$0(0) + ".", null)); - case 12: - // join - case 8: - // join - case 4: - // join - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_runFunctionCallable$3, $async$completer); - }, - _async_evaluate$_runBuiltInCallable$3($arguments, callable, nodeWithSpan) { - return this._runBuiltInCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan); - }, - _runBuiltInCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, result, error, stackTrace, namedSet, _0_0, declaredArguments, i, t1, t2, t3, argument, t4, t5, t6, t7, rest, argumentList, exception, _box_0, evaluated, oldCallableNode, $async$exception; - var $async$_async_evaluate$_runBuiltInCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - _box_0 = {}; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_evaluateArguments$1($arguments), $async$_async_evaluate$_runBuiltInCallable$3); - case 3: - // returning from await. - evaluated = $async$result; - oldCallableNode = $async$self._async_evaluate$_callableNode; - $async$self._async_evaluate$_callableNode = nodeWithSpan; - namedSet = new A.MapKeySet(evaluated._values[0], type$.MapKeySet_String); - _box_0.callback = _box_0.overload = null; - _0_0 = callable.callbackFor$2(J.get$length$asx(evaluated._values[2]), namedSet); - _box_0.overload = _0_0._0; - _box_0.callback = _0_0._1; - $async$self._async_evaluate$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure2(_box_0, evaluated, namedSet)); - declaredArguments = _box_0.overload.$arguments; - i = J.get$length$asx(evaluated._values[2]), t1 = declaredArguments.length, t2 = type$._Future_Value, t3 = type$.Future_Value; - case 4: - // for condition - if (!(i < t1)) { - // goto after for - $async$goto = 6; - break; - } - argument = declaredArguments[i]; - t4 = evaluated._values[2]; - t5 = evaluated._values[0].remove$1(0, argument.name); - $async$goto = t5 == null ? 7 : 8; - break; - case 7: - // then - t5 = argument.defaultValue; - t6 = t5.accept$1($async$self); - if (!t3._is(t6)) { - t7 = new A._Future($.Zone__current, t2); - t7._state = 8; - t7._resultOrListeners = t6; - t6 = t7; - } - $async$goto = 9; - return A._asyncAwait(t6, $async$_async_evaluate$_runBuiltInCallable$3); - case 9: - // returning from await. - t5 = $async$self._async_evaluate$_withoutSlash$2($async$result, t5); - case 8: - // join - J.add$1$ax(t4, t5); - case 5: - // for update - ++i; - // goto for condition - $async$goto = 4; - break; - case 6: - // after for - if (_box_0.overload.restArgument != null) { - if (J.get$length$asx(evaluated._values[2]) > t1) { - rest = J.sublist$1$ax(evaluated._values[2], t1); - J.removeRange$2$ax(evaluated._values[2], t1, J.get$length$asx(evaluated._values[2])); - } else - rest = B.List_empty8; - t1 = evaluated._values[0]; - argumentList = A.SassArgumentList$(rest, t1, evaluated._values[4] === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_ECn : evaluated._values[4]); - J.add$1$ax(evaluated._values[2], argumentList); - } else - argumentList = null; - result = null; - $async$handler = 11; - $async$goto = 14; - return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure3(_box_0, evaluated), type$.Value), $async$_async_evaluate$_runBuiltInCallable$3); - case 14: - // returning from await. - result = $async$result; - $async$handler = 2; - // goto after finally - $async$goto = 13; - break; - case 11: - // catch - $async$handler = 10; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (t1 instanceof A.SassException) - throw $async$exception; - else { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - A.throwWithTrace($async$self._async_evaluate$_exception$2($async$self._async_evaluate$_getErrorMessage$1(error), nodeWithSpan.get$span(nodeWithSpan)), error, stackTrace); - } - // goto after finally - $async$goto = 13; - break; - case 10: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 13: - // after finally - $async$self._async_evaluate$_callableNode = oldCallableNode; - if (argumentList == null) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - t1 = evaluated._values[0]; - if (t1.get$isEmpty(t1)) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - if (argumentList._wereKeywordsAccessed) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - t1 = evaluated._values[0]; - t1 = A.pluralize("argument", J.get$length$asx(t1.get$keys(t1)), null); - t2 = evaluated._values[0]; - throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + t1 + " named " + A.toSentence(J.map$1$1$ax(t2.get$keys(t2), new A._EvaluateVisitor__runBuiltInCallable_closure4(), type$.Object), "or") + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_box_0.overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), null)); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_runBuiltInCallable$3, $async$completer); - }, - _async_evaluate$_evaluateArguments$1($arguments) { - return this._evaluateArguments$body$_EvaluateVisitor($arguments); - }, - _evaluateArguments$body$_EvaluateVisitor($arguments) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_5_Map_String_Value_named_and_Map_String_AstNode_namedNodes_and_List_Value_positional_and_List_AstNode_positionalNodes_and_ListSeparator_separator), - $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, expression, nodeForSpan, t5, t6, named, namedNodes, $name, value, t7, restArgs, rest, restNodeForSpan, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, positional, positionalNodes, $async$temp1, $async$temp2; - var $async$_async_evaluate$_evaluateArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - positional = A._setArrayType([], type$.JSArray_Value); - positionalNodes = A._setArrayType([], type$.JSArray_AstNode); - t1 = $arguments.positional, t2 = t1.length, t3 = type$._Future_Value, t4 = type$.Future_Value, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - expression = t1[_i]; - nodeForSpan = $async$self._async_evaluate$_expressionNode$1(expression); - t5 = expression.accept$1($async$self); - if (!t4._is(t5)) { - t6 = new A._Future($.Zone__current, t3); - t6._state = 8; - t6._resultOrListeners = t5; - t5 = t6; - } - $async$temp1 = positional; - $async$goto = 6; - return A._asyncAwait(t5, $async$_async_evaluate$_evaluateArguments$1); - case 6: - // returning from await. - $async$temp1.push($async$self._async_evaluate$_withoutSlash$2($async$result, nodeForSpan)); - positionalNodes.push(nodeForSpan); - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - t1 = type$.String; - named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value); - t2 = type$.AstNode; - namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - t5 = A.MapExtensions_get_pairs($arguments.named, t1, type$.Expression), t5 = t5.get$iterator(t5); - case 7: - // for condition - if (!t5.moveNext$0()) { - // goto after for - $async$goto = 8; - break; - } - t6 = t5.get$current(t5); - $name = t6._0; - value = t6._1; - nodeForSpan = $async$self._async_evaluate$_expressionNode$1(value); - t6 = value.accept$1($async$self); - if (!t4._is(t6)) { - t7 = new A._Future($.Zone__current, t3); - t7._state = 8; - t7._resultOrListeners = t6; - t6 = t7; - } - $async$temp1 = named; - $async$temp2 = $name; - $async$goto = 9; - return A._asyncAwait(t6, $async$_async_evaluate$_evaluateArguments$1); - case 9: - // returning from await. - $async$temp1.$indexSet(0, $async$temp2, $async$self._async_evaluate$_withoutSlash$2($async$result, nodeForSpan)); - namedNodes.$indexSet(0, $name, nodeForSpan); - // goto for condition - $async$goto = 7; - break; - case 8: - // after for - restArgs = $arguments.rest; - if (restArgs == null) { - $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, B.ListSeparator_undecided_null_undecided]); - // goto return - $async$goto = 1; - break; - } - $async$goto = 10; - return A._asyncAwait(restArgs.accept$1($async$self), $async$_async_evaluate$_evaluateArguments$1); - case 10: - // returning from await. - rest = $async$result; - restNodeForSpan = $async$self._async_evaluate$_expressionNode$1(restArgs); - if (rest instanceof A.SassMap) { - $async$self._async_evaluate$_addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure3()); - t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t4 = rest._map$_contents, t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = type$.SassString; t4.moveNext$0();) - t3.$indexSet(0, t5._as(t4.get$current(t4))._string$_text, restNodeForSpan); - namedNodes.addAll$1(0, t3); - separator = B.ListSeparator_undecided_null_undecided; - } else if (rest instanceof A.SassList) { - t3 = rest._list$_contents; - B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure4($async$self, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value>"))); - B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); - separator = rest._separator; - if (rest instanceof A.SassArgumentList) { - rest._wereKeywordsAccessed = true; - rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure5($async$self, named, restNodeForSpan, namedNodes)); - } - } else { - positional.push($async$self._async_evaluate$_withoutSlash$2(rest, restNodeForSpan)); - positionalNodes.push(restNodeForSpan); - separator = B.ListSeparator_undecided_null_undecided; - } - keywordRestArgs = $arguments.keywordRest; - if (keywordRestArgs == null) { - $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); - // goto return - $async$goto = 1; - break; - } - $async$goto = 11; - return A._asyncAwait(keywordRestArgs.accept$1($async$self), $async$_async_evaluate$_evaluateArguments$1); - case 11: - // returning from await. - keywordRest = $async$result; - keywordRestNodeForSpan = $async$self._async_evaluate$_expressionNode$1(keywordRestArgs); - if (keywordRest instanceof A.SassMap) { - $async$self._async_evaluate$_addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure6()); - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t2 = keywordRest._map$_contents, t2 = J.get$iterator$ax(t2.get$keys(t2)), t3 = type$.SassString; t2.moveNext$0();) - t1.$indexSet(0, t3._as(t2.get$current(t2))._string$_text, keywordRestNodeForSpan); - namedNodes.addAll$1(0, t1); - $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); - // goto return - $async$goto = 1; - break; - } else - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_evaluateArguments$1, $async$completer); - }, - _async_evaluate$_evaluateMacroArguments$1(invocation) { - return this._evaluateMacroArguments$body$_EvaluateVisitor(invocation); - }, - _evaluateMacroArguments$body$_EvaluateVisitor(invocation) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_List_Expression_and_Map_String_Expression), - $async$returnValue, $async$self = this, t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, t1, restArgs_; - var $async$_async_evaluate$_evaluateMacroArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = invocation.$arguments; - restArgs_ = t1.rest; - if (restArgs_ == null) { - $async$returnValue = new A._Record_2(t1.positional, t1.named); - // goto return - $async$goto = 1; - break; - } - t2 = t1.positional; - positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); - named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression); - $async$goto = 3; - return A._asyncAwait(restArgs_.accept$1($async$self), $async$_async_evaluate$_evaluateMacroArguments$1); - case 3: - // returning from await. - rest = $async$result; - restNodeForSpan = $async$self._async_evaluate$_expressionNode$1(restArgs_); - if (rest instanceof A.SassMap) - $async$self._async_evaluate$_addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure3(restArgs_)); - else if (rest instanceof A.SassList) { - t2 = rest._list$_contents; - B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure4($async$self, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression>"))); - if (rest instanceof A.SassArgumentList) { - rest._wereKeywordsAccessed = true; - rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure5($async$self, named, restNodeForSpan, restArgs_)); - } - } else - positional.push(new A.ValueExpression($async$self._async_evaluate$_withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); - keywordRestArgs_ = t1.keywordRest; - if (keywordRestArgs_ == null) { - $async$returnValue = new A._Record_2(positional, named); - // goto return - $async$goto = 1; - break; - } - $async$goto = 4; - return A._asyncAwait(keywordRestArgs_.accept$1($async$self), $async$_async_evaluate$_evaluateMacroArguments$1); - case 4: - // returning from await. - keywordRest = $async$result; - keywordRestNodeForSpan = $async$self._async_evaluate$_expressionNode$1(keywordRestArgs_); - if (keywordRest instanceof A.SassMap) { - $async$self._async_evaluate$_addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure6($async$self, keywordRestNodeForSpan, keywordRestArgs_)); - $async$returnValue = new A._Record_2(positional, named); - // goto return - $async$goto = 1; - break; - } else - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_evaluateMacroArguments$1, $async$completer); - }, - _async_evaluate$_addRestMap$1$4(values, map, nodeWithSpan, convert) { - map._map$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure0(this, values, convert, this._async_evaluate$_expressionNode$1(nodeWithSpan), map, nodeWithSpan)); - }, - _async_evaluate$_addRestMap$4(values, map, nodeWithSpan, convert) { - return this._async_evaluate$_addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); - }, - _async_evaluate$_verifyArguments$4(positional, named, $arguments, nodeWithSpan) { - return this._async_evaluate$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure0($arguments, positional, named)); - }, - visitSelectorExpression$1(_, node) { - return this.visitSelectorExpression$body$_EvaluateVisitor(0, node); - }, - visitSelectorExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$self = this, t1; - var $async$visitSelectorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self._async_evaluate$_styleRuleIgnoringAtRoot; - t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); - $async$returnValue = t1 == null ? B.C__SassNull : t1; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitSelectorExpression$1, $async$completer); - }, - visitStringExpression$1(_, node) { - return this.visitStringExpression$body$_EvaluateVisitor(0, node); - }, - visitStringExpression$body$_EvaluateVisitor(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassString), - $async$returnValue, $async$self = this, t1, t2, t3, _i, value, t4, _0_0, text, oldInSupportsDeclaration; - var $async$visitStringExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldInSupportsDeclaration = $async$self._async_evaluate$_inSupportsDeclaration; - $async$self._async_evaluate$_inSupportsDeclaration = false; - t1 = A._setArrayType([], type$.JSArray_String); - t2 = node.text.contents, t3 = t2.length, _i = 0; - case 3: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 5; - break; - } - value = t2[_i]; - if (typeof value == "string") { - t4 = value; - // goto break $label0$0 - $async$goto = 6; - break; - } - $async$goto = value instanceof A.Expression ? 7 : 8; - break; - case 7: - // then - $async$goto = 9; - return A._asyncAwait(value.accept$1($async$self), $async$visitStringExpression$1); - case 9: - // returning from await. - _0_0 = $async$result; - $label1$1: { - if (_0_0 instanceof A.SassString) { - text = _0_0._string$_text; - t4 = text; - break $label1$1; - } - t4 = $async$self._async_evaluate$_serialize$3$quote(_0_0, value, false); - break $label1$1; - } - // goto break $label0$0 - $async$goto = 6; - break; - case 8: - // join - t4 = A.throwExpression(A.UnsupportedError$("Unknown interpolation value " + A.S(value))); - case 6: - // break $label0$0 - t1.push(t4); - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - t1 = B.JSArray_methods.join$0(t1); - $async$self._async_evaluate$_inSupportsDeclaration = oldInSupportsDeclaration; - $async$returnValue = new A.SassString(t1, node.hasQuotes); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitStringExpression$1, $async$completer); - }, - visitSupportsExpression$1(_, expression) { - return this.visitSupportsExpression$body$_EvaluateVisitor(0, expression); - }, - visitSupportsExpression$body$_EvaluateVisitor(_, expression) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassString), - $async$returnValue, $async$self = this, $async$temp1; - var $async$visitSupportsExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$temp1 = A; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(expression.condition), $async$visitSupportsExpression$1); - case 3: - // returning from await. - $async$returnValue = new $async$temp1.SassString($async$result, false); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitSupportsExpression$1, $async$completer); - }, - visitCssAtRule$1(node) { - return this.visitCssAtRule$body$_EvaluateVisitor(node); - }, - visitCssAtRule$body$_EvaluateVisitor(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$returnValue, $async$self = this, wasInKeyframes, wasInUnknownAtRule, t1; - var $async$visitCssAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate$_declarationName != null) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.At_rul, node.span)); - if (node.isChildless) { - $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$(node.name, node.span, true, node.value)); - // goto return - $async$goto = 1; - break; - } - wasInKeyframes = $async$self._async_evaluate$_inKeyframes; - wasInUnknownAtRule = $async$self._async_evaluate$_inUnknownAtRule; - t1 = node.name; - if (A.unvendor(t1.value) === "keyframes") - $async$self._async_evaluate$_inKeyframes = true; - else - $async$self._async_evaluate$_inUnknownAtRule = true; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$(t1, node.span, false, node.value), new A._EvaluateVisitor_visitCssAtRule_closure1($async$self, node), false, new A._EvaluateVisitor_visitCssAtRule_closure2(), type$.ModifiableCssAtRule, type$.Null), $async$visitCssAtRule$1); - case 3: - // returning from await. - $async$self._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; - $async$self._async_evaluate$_inKeyframes = wasInKeyframes; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssAtRule$1, $async$completer); - }, - visitCssComment$1(node) { - return this.visitCssComment$body$_EvaluateVisitor(node); - }, - visitCssComment$body$_EvaluateVisitor(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this; - var $async$visitCssComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") === $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root") && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) - $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; - $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(new A.ModifiableCssComment(node.text, node.span)); - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssComment$1, $async$completer); - }, - visitCssDeclaration$1(node) { - return this.visitCssDeclaration$body$_EvaluateVisitor(node); - }, - visitCssDeclaration$body$_EvaluateVisitor(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this; - var $async$visitCssDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$(node.name, node.value, node.span, null, node.parsedAsCustomProperty, null, node.valueSpanForMap)); - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssDeclaration$1, $async$completer); - }, - visitCssImport$1(node) { - return this.visitCssImport$body$_EvaluateVisitor(node); - }, - visitCssImport$body$_EvaluateVisitor(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1, modifiableNode; - var $async$visitCssImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - modifiableNode = new A.ModifiableCssImport(node.url, node.modifiers, node.span); - if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") !== $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root")) - $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(modifiableNode); - else if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) { - $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").addChild$1(modifiableNode); - $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; - } else { - t1 = $async$self._async_evaluate$_outOfOrderImports; - (t1 == null ? $async$self._async_evaluate$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t1).push(modifiableNode); - } - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssImport$1, $async$completer); - }, - visitCssKeyframeBlock$1(node) { - return this.visitCssKeyframeBlock$body$_EvaluateVisitor(node); - }, - visitCssKeyframeBlock$body$_EvaluateVisitor(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this; - var $async$visitCssKeyframeBlock$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 2; - return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure1($async$self, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure2(), type$.ModifiableCssKeyframeBlock, type$.Null), $async$visitCssKeyframeBlock$1); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssKeyframeBlock$1, $async$completer); - }, - visitCssMediaRule$1(node) { - return this.visitCssMediaRule$body$_EvaluateVisitor(node); - }, - visitCssMediaRule$body$_EvaluateVisitor(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$returnValue, $async$self = this, mergedQueries, t1, mergedSources, t2, t3; - var $async$visitCssMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate$_declarationName != null) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Media_, node.span)); - mergedQueries = A.NullableExtension_andThen($async$self._async_evaluate$_mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure2($async$self, node)); - t1 = mergedQueries == null; - if (!t1 && J.get$isEmpty$asx(mergedQueries)) { - // goto return - $async$goto = 1; - break; - } - if (t1) - mergedSources = B.Set_empty1; - else { - t2 = $async$self._async_evaluate$_mediaQuerySources; - t2.toString; - t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); - t3 = $async$self._async_evaluate$_mediaQueries; - t3.toString; - t2.addAll$1(0, t3); - t2.addAll$1(0, node.queries); - mergedSources = t2; - } - t1 = t1 ? node.queries : mergedQueries; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure3($async$self, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure4(mergedSources), type$.ModifiableCssMediaRule, type$.Null), $async$visitCssMediaRule$1); - case 3: - // returning from await. - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssMediaRule$1, $async$completer); - }, - visitCssStyleRule$1(node) { - return this.visitCssStyleRule$body$_EvaluateVisitor(node); - }, - visitCssStyleRule$body$_EvaluateVisitor(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1, styleRule, t2, nest, t3, originalSelector, rule, oldAtRootExcludingStyleRule, _0_1, lastChild; - var $async$visitCssStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate$_declarationName != null) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_n, node.span)); - else if ($async$self._async_evaluate$_inKeyframes && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") instanceof A.ModifiableCssKeyframeBlock) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_k, node.span)); - t1 = $async$self._async_evaluate$_atRootExcludingStyleRule; - styleRule = t1 ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; - t2 = t1 ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; - t2 = t2 == null ? null : t2.fromPlainCss; - nest = t2 !== true; - t2 = node._style_rule$_selector._box$_inner; - if (nest) { - t2 = t2.value; - t3 = styleRule == null ? null : styleRule.originalSelector; - originalSelector = t2.nestWithin$3$implicitParent$preserveParentSelectors(t3, !t1, node.fromPlainCss); - } else - originalSelector = t2.value; - rule = A.ModifiableCssStyleRule$($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__extensionStore, "_extensionStore").addSelector$2(originalSelector, $async$self._async_evaluate$_mediaQueries), node.span, node.fromPlainCss, originalSelector); - oldAtRootExcludingStyleRule = $async$self._async_evaluate$_atRootExcludingStyleRule; - $async$self._async_evaluate$_atRootExcludingStyleRule = false; - t1 = nest ? new A._EvaluateVisitor_visitCssStyleRule_closure1() : null; - $async$goto = 2; - return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure2($async$self, rule, node), false, t1, type$.ModifiableCssStyleRule, type$.Null), $async$visitCssStyleRule$1); - case 2: - // returning from await. - $async$self._async_evaluate$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; - t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children._collection$_source; - t2 = J.getInterceptor$asx(t1); - _0_1 = t2.get$length(t1); - if (_0_1 >= 1) { - lastChild = t2.elementAt$1(t1, _0_1 - 1); - t1 = styleRule == null; - } else { - lastChild = null; - t1 = false; - } - if (t1) - lastChild.isGroupEnd = true; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssStyleRule$1, $async$completer); - }, - visitCssStylesheet$1(node) { - return this.visitCssStylesheet$body$_EvaluateVisitor(node); - }, - visitCssStylesheet$body$_EvaluateVisitor(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1; - var $async$visitCssStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = J.get$iterator$ax(node.get$children(node)); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - $async$goto = 4; - return A._asyncAwait(t1.get$current(t1).accept$1($async$self), $async$visitCssStylesheet$1); - case 4: - // returning from await. - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssStylesheet$1, $async$completer); - }, - visitCssSupportsRule$1(node) { - return this.visitCssSupportsRule$body$_EvaluateVisitor(node); - }, - visitCssSupportsRule$body$_EvaluateVisitor(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this; - var $async$visitCssSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate$_declarationName != null) - throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Suppor, node.span)); - $async$goto = 2; - return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$(node.condition, node.span), new A._EvaluateVisitor_visitCssSupportsRule_closure1($async$self, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure2(), type$.ModifiableCssSupportsRule, type$.Null), $async$visitCssSupportsRule$1); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssSupportsRule$1, $async$completer); - }, - _async_evaluate$_handleReturn$1$2(list, callback) { - return this._handleReturn$body$_EvaluateVisitor(list, callback); - }, - _async_evaluate$_handleReturn$2(list, callback) { - return this._async_evaluate$_handleReturn$1$2(list, callback, type$.dynamic); - }, - _handleReturn$body$_EvaluateVisitor(list, callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, t1, _i, _0_0; - var $async$_async_evaluate$_handleReturn$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = list.length, _i = 0; - case 3: - // for condition - if (!(_i < list.length)) { - // goto after for - $async$goto = 5; - break; - } - $async$goto = 6; - return A._asyncAwait(callback.call$1(list[_i]), $async$_async_evaluate$_handleReturn$1$2); - case 6: - // returning from await. - _0_0 = $async$result; - if (_0_0 != null) { - $async$returnValue = _0_0; - // goto return - $async$goto = 1; - break; - } - case 4: - // for update - list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_handleReturn$1$2, $async$completer); - }, - _async_evaluate$_withEnvironment$1$2(environment, callback, $T) { - return this._withEnvironment$body$_EvaluateVisitor(environment, callback, $T, $T); - }, - _withEnvironment$body$_EvaluateVisitor(environment, callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, result, oldEnvironment; - var $async$_async_evaluate$_withEnvironment$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldEnvironment = $async$self._async_evaluate$_environment; - $async$self._async_evaluate$_environment = environment; - $async$goto = 3; - return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withEnvironment$1$2); - case 3: - // returning from await. - result = $async$result; - $async$self._async_evaluate$_environment = oldEnvironment; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_withEnvironment$1$2, $async$completer); - }, - _async_evaluate$_interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { - return this._interpolationToValue$body$_EvaluateVisitor(interpolation, trim, warnForColor); - }, - _async_evaluate$_interpolationToValue$1(interpolation) { - return this._async_evaluate$_interpolationToValue$3$trim$warnForColor(interpolation, false, false); - }, - _async_evaluate$_interpolationToValue$2$warnForColor(interpolation, warnForColor) { - return this._async_evaluate$_interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); - }, - _interpolationToValue$body$_EvaluateVisitor(interpolation, trim, warnForColor) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.CssValue_String), - $async$returnValue, $async$self = this, result, t1; - var $async$_async_evaluate$_interpolationToValue$3$trim$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_performInterpolation$2$warnForColor(interpolation, warnForColor), $async$_async_evaluate$_interpolationToValue$3$trim$warnForColor); - case 3: - // returning from await. - result = $async$result; - t1 = trim ? A.trimAscii(result, true) : result; - $async$returnValue = new A.CssValue(t1, interpolation.span, type$.CssValue_String); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_interpolationToValue$3$trim$warnForColor, $async$completer); - }, - _async_evaluate$_performInterpolation$2$warnForColor(interpolation, warnForColor) { - return this._performInterpolation$body$_EvaluateVisitor(interpolation, warnForColor); - }, - _async_evaluate$_performInterpolation$1(interpolation) { - return this._async_evaluate$_performInterpolation$2$warnForColor(interpolation, false); - }, - _performInterpolation$body$_EvaluateVisitor(interpolation, warnForColor) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.String), - $async$returnValue, $async$self = this; - var $async$_async_evaluate$_performInterpolation$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, false, warnForColor), $async$_async_evaluate$_performInterpolation$2$warnForColor); - case 3: - // returning from await. - $async$returnValue = $async$result._0; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_performInterpolation$2$warnForColor, $async$completer); - }, - _async_evaluate$_performInterpolationWithMap$2$warnForColor(interpolation, warnForColor) { - return this._performInterpolationWithMap$body$_EvaluateVisitor(interpolation, true); - }, - _performInterpolationWithMap$body$_EvaluateVisitor(interpolation, warnForColor) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_String_and_InterpolationMap), - $async$returnValue, $async$self = this, _0_0, result, map; - var $async$_async_evaluate$_performInterpolationWithMap$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, true, true), $async$_async_evaluate$_performInterpolationWithMap$2$warnForColor); - case 3: - // returning from await. - _0_0 = $async$result; - result = _0_0._0; - map = _0_0._1; - map.toString; - $async$returnValue = new A._Record_2(result, map); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_performInterpolationWithMap$2$warnForColor, $async$completer); - }, - _async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, sourceMap, warnForColor) { - return this._performInterpolationHelper$body$_EvaluateVisitor(interpolation, sourceMap, warnForColor); - }, - _performInterpolationHelper$body$_EvaluateVisitor(interpolation, sourceMap, warnForColor) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_String_and_nullable_InterpolationMap), - $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, t6, first, _i, t7, value, result, result0, t8, targetLocations, oldInSupportsDeclaration; - var $async$_async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - targetLocations = sourceMap ? A._setArrayType([], type$.JSArray_SourceLocation) : null; - oldInSupportsDeclaration = $async$self._async_evaluate$_inSupportsDeclaration; - $async$self._async_evaluate$_inSupportsDeclaration = false; - t1 = interpolation.contents, t2 = t1.length, t3 = type$.Expression, t4 = targetLocations == null, t5 = interpolation.span, t6 = type$.Object, first = true, _i = 0, t7 = ""; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - value = t1[_i]; - if (!first) - if (!t4) - targetLocations.push(A.SourceLocation$(t7.length, null, null, null)); - if (typeof value == "string") { - t7 += value; - // goto for update - $async$goto = 4; - break; - } - t3._as(value); - $async$goto = 6; - return A._asyncAwait(value.accept$1($async$self), $async$_async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor); - case 6: - // returning from await. - result = $async$result; - if (warnForColor && $.$get$namesByColor().containsKey$1(result)) { - result0 = A.List_List$from([""], false, t6); - result0.fixed$length = Array; - result0.immutable$list = Array; - t8 = $.$get$namesByColor(); - $async$self._async_evaluate$_warn$2(string$.You_pr + A.S(t8.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t8.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression(B.BinaryOperator_u15, new A.StringExpression(new A.Interpolation(result0, B.List_null, t5), true), value, false).toString$0(0) + "'.", value.get$span(value)); - } - t7 += $async$self._async_evaluate$_serialize$3$quote(result, value, false); - case 4: - // for update - ++_i, first = false; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$self._async_evaluate$_inSupportsDeclaration = oldInSupportsDeclaration; - $async$returnValue = new A._Record_2(t7.charCodeAt(0) == 0 ? t7 : t7, A.NullableExtension_andThen(targetLocations, new A._EvaluateVisitor__performInterpolationHelper_closure0(interpolation))); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor, $async$completer); - }, - _evaluateToCss$2$quote(expression, quote) { - return this._evaluateToCss$body$_EvaluateVisitor(expression, quote); - }, - _evaluateToCss$1(expression) { - return this._evaluateToCss$2$quote(expression, true); - }, - _evaluateToCss$body$_EvaluateVisitor(expression, quote) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.String), - $async$returnValue, $async$self = this, t1; - var $async$_evaluateToCss$2$quote = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = expression.accept$1($async$self); - $async$goto = 3; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$_evaluateToCss$2$quote); - case 3: - // returning from await. - $async$returnValue = $async$self._async_evaluate$_serialize$3$quote($async$result, expression, quote); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_evaluateToCss$2$quote, $async$completer); - }, - _async_evaluate$_serialize$3$quote(value, nodeWithSpan, quote) { - return this._async_evaluate$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure0(value, quote)); - }, - _async_evaluate$_serialize$2(value, nodeWithSpan) { - return this._async_evaluate$_serialize$3$quote(value, nodeWithSpan, true); - }, - _async_evaluate$_expressionNode$1(expression) { - var t1; - if (expression instanceof A.VariableExpression) { - t1 = this._async_evaluate$_addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure0(this, expression)); - return t1 == null ? expression : t1; - } else - return expression; - }, - _async_evaluate$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { - return this._withParent$body$_EvaluateVisitor(node, callback, scopeWhen, through, $S, $T, $T); - }, - _async_evaluate$_withParent$2$2(node, callback, $S, $T) { - return this._async_evaluate$_withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); - }, - _async_evaluate$_withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { - return this._async_evaluate$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); - }, - _withParent$body$_EvaluateVisitor(node, callback, scopeWhen, through, $S, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, t1, result; - var $async$_async_evaluate$_withParent$2$4$scopeWhen$through = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$self._async_evaluate$_addChild$2$through(node, through); - t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); - $async$self._async_evaluate$__parent = node; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$2$when(callback, scopeWhen, $T), $async$_async_evaluate$_withParent$2$4$scopeWhen$through); - case 3: - // returning from await. - result = $async$result; - $async$self._async_evaluate$__parent = t1; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_withParent$2$4$scopeWhen$through, $async$completer); - }, - _async_evaluate$_addChild$2$through(node, through) { - var _0_0, grandparent, t1, - $parent = this._async_evaluate$_assertInModule$2(this._async_evaluate$__parent, "__parent"); - if (through != null) { - for (; through.call$1($parent); $parent = _0_0) { - _0_0 = $parent._parent; - if (_0_0 == null) - throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); - } - if ($parent.get$hasFollowingSibling()) { - grandparent = $parent._parent; - t1 = grandparent.children; - if ($parent.equalsIgnoringChildren$1(t1.get$last(t1))) - $parent = type$.ModifiableCssParentNode._as(t1.get$last(t1)); - else { - $parent = $parent.copyWithoutChildren$0(); - grandparent.addChild$1($parent); - } - } - } - $parent.addChild$1(node); - }, - _async_evaluate$_addChild$1(node) { - return this._async_evaluate$_addChild$2$through(node, null); - }, - _async_evaluate$_withStyleRule$1$2(rule, callback, $T) { - return this._withStyleRule$body$_EvaluateVisitor(rule, callback, $T, $T); - }, - _withStyleRule$body$_EvaluateVisitor(rule, callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, result, oldRule; - var $async$_async_evaluate$_withStyleRule$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldRule = $async$self._async_evaluate$_styleRuleIgnoringAtRoot; - $async$self._async_evaluate$_styleRuleIgnoringAtRoot = rule; - $async$goto = 3; - return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withStyleRule$1$2); - case 3: - // returning from await. - result = $async$result; - $async$self._async_evaluate$_styleRuleIgnoringAtRoot = oldRule; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_withStyleRule$1$2, $async$completer); - }, - _async_evaluate$_withMediaQueries$1$3(queries, sources, callback, $T) { - return this._withMediaQueries$body$_EvaluateVisitor(queries, sources, callback, $T, $T); - }, - _withMediaQueries$body$_EvaluateVisitor(queries, sources, callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, result, oldMediaQueries, oldSources; - var $async$_async_evaluate$_withMediaQueries$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldMediaQueries = $async$self._async_evaluate$_mediaQueries; - oldSources = $async$self._async_evaluate$_mediaQuerySources; - $async$self._async_evaluate$_mediaQueries = queries; - $async$self._async_evaluate$_mediaQuerySources = sources; - $async$goto = 3; - return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withMediaQueries$1$3); - case 3: - // returning from await. - result = $async$result; - $async$self._async_evaluate$_mediaQueries = oldMediaQueries; - $async$self._async_evaluate$_mediaQuerySources = oldSources; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_withMediaQueries$1$3, $async$completer); - }, - _async_evaluate$_withStackFrame$1$3(member, nodeWithSpan, callback, $T) { - return this._withStackFrame$body$_EvaluateVisitor(member, nodeWithSpan, callback, $T, $T); - }, - _withStackFrame$body$_EvaluateVisitor(member, nodeWithSpan, callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, oldMember, result, t1; - var $async$_async_evaluate$_withStackFrame$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self._async_evaluate$_stack; - t1.push(new A._Record_2($async$self._async_evaluate$_member, nodeWithSpan)); - oldMember = $async$self._async_evaluate$_member; - $async$self._async_evaluate$_member = member; - $async$goto = 3; - return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withStackFrame$1$3); - case 3: - // returning from await. - result = $async$result; - $async$self._async_evaluate$_member = oldMember; - t1.pop(); - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_withStackFrame$1$3, $async$completer); - }, - _async_evaluate$_withoutSlash$2(value, nodeForSpan) { - var t1; - if (value instanceof A.SassNumber) - t1 = value.asSlash != null; - else - t1 = false; - if (t1) - this._async_evaluate$_warn$3(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation0().call$1(value)) + string$.x0a_Morex20, nodeForSpan.get$span(nodeForSpan), B.Deprecation_mRl); - return value.withoutSlash$0(); - }, - _async_evaluate$_stackFrame$2(member, span) { - return A.frameForSpan(span, member, A.NullableExtension_andThen(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure0(this))); - }, - _async_evaluate$_stackTrace$1(span) { - var t2, t3, _i, t4, nodeWithSpan, _this = this, - t1 = A._setArrayType([], type$.JSArray_Frame); - for (t2 = _this._async_evaluate$_stack, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - t4 = t2[_i]; - nodeWithSpan = t4._1; - t1.push(_this._async_evaluate$_stackFrame$2(t4._0, nodeWithSpan.get$span(nodeWithSpan))); - } - if (span != null) - t1.push(_this._async_evaluate$_stackFrame$2(_this._async_evaluate$_member, span)); - return A.Trace$(new A.ReversedListIterable(t1, type$.ReversedListIterable_Frame), null); - }, - _async_evaluate$_stackTrace$0() { - return this._async_evaluate$_stackTrace$1(null); - }, - _async_evaluate$_warn$3(message, span, deprecation) { - var t1, trace, _this = this; - if (_this._async_evaluate$_quietDeps) - if (!_this._async_evaluate$_inDependency) { - t1 = _this._async_evaluate$_currentCallable; - t1 = t1 == null ? null : t1.inDependency; - t1 = t1 === true; - } else - t1 = true; - else - t1 = false; - if (t1) - return; - if (!_this._async_evaluate$_warningsEmitted.add$1(0, new A._Record_2(message, span))) - return; - trace = _this._async_evaluate$_stackTrace$1(span); - t1 = _this._async_evaluate$_logger; - if (deprecation == null) - t1.warn$3$span$trace(0, message, span, trace); - else - A.WarnForDeprecation_warnForDeprecation(t1, deprecation, message, span, trace); - }, - _async_evaluate$_warn$2(message, span) { - return this._async_evaluate$_warn$3(message, span, null); - }, - _async_evaluate$_exception$2(message, span) { - var t1, t2; - if (span == null) { - t1 = B.JSArray_methods.get$last(this._async_evaluate$_stack)._1; - t1 = t1.get$span(t1); - } else - t1 = span; - t2 = this._async_evaluate$_stackTrace$1(span); - return new A.SassRuntimeException(t2, B.Set_empty, message, t1); - }, - _async_evaluate$_exception$1(message) { - return this._async_evaluate$_exception$2(message, null); - }, - _async_evaluate$_multiSpanException$3(message, primaryLabel, secondaryLabels) { - var t1 = B.JSArray_methods.get$last(this._async_evaluate$_stack)._1; - return A.MultiSpanSassRuntimeException$(message, t1.get$span(t1), primaryLabel, secondaryLabels, this._async_evaluate$_stackTrace$0(), null); - }, - _async_evaluate$_addExceptionSpan$1$2(nodeWithSpan, callback) { - var error, stackTrace, t1, exception, - addStackFrame = true; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassScriptException) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); - A.throwWithTrace(t1.withTrace$1(this._async_evaluate$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); - } else - throw exception; - } - }, - _async_evaluate$_addExceptionSpan$2(nodeWithSpan, callback) { - return this._async_evaluate$_addExceptionSpan$1$2(nodeWithSpan, callback, type$.dynamic); - }, - _addExceptionSpanAsync$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame, $T) { - return this._addExceptionSpanAsync$body$_EvaluateVisitor(nodeWithSpan, callback, addStackFrame, $T, $T); - }, - _addExceptionSpanAsync$1$2(nodeWithSpan, callback, $T) { - return this._addExceptionSpanAsync$1$3$addStackFrame(nodeWithSpan, callback, true, $T); - }, - _addExceptionSpanAsync$body$_EvaluateVisitor(nodeWithSpan, callback, addStackFrame, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, $async$exception; - var $async$_addExceptionSpanAsync$1$3$addStackFrame = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$handler = 4; - t1 = callback.call$0(); - $async$goto = 7; - return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_addExceptionSpanAsync$1$3$addStackFrame); - case 7: - // returning from await. - t1 = $async$result; - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - $async$handler = 2; - // goto after finally - $async$goto = 6; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (t1 instanceof A.SassScriptException) { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); - A.throwWithTrace(t1.withTrace$1($async$self._async_evaluate$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); - } else - throw $async$exception; - // goto after finally - $async$goto = 6; - break; - case 3: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 6: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_addExceptionSpanAsync$1$3$addStackFrame, $async$completer); - }, - _async_evaluate$_addExceptionTrace$1$1(callback, $T) { - return this._addExceptionTrace$body$_EvaluateVisitor(callback, $T, $T); - }, - _addExceptionTrace$body$_EvaluateVisitor(callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, t2, $async$exception; - var $async$_async_evaluate$_addExceptionTrace$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$handler = 4; - t1 = callback.call$0(); - $async$goto = 7; - return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate$_addExceptionTrace$1$1); - case 7: - // returning from await. - t1 = $async$result; - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - $async$handler = 2; - // goto after finally - $async$goto = 6; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (type$.SassRuntimeException._is(t1)) - throw $async$exception; - else if (t1 instanceof A.SassException) { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - t1 = error; - t2 = J.getInterceptor$z(t1); - A.throwWithTrace(error.withTrace$1($async$self._async_evaluate$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t2, t1))), error, stackTrace); - } else - throw $async$exception; - // goto after finally - $async$goto = 6; - break; - case 3: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 6: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_addExceptionTrace$1$1, $async$completer); - }, - _async_evaluate$_addErrorSpan$1$2(nodeWithSpan, callback, $T) { - return this._addErrorSpan$body$_EvaluateVisitor(nodeWithSpan, callback, $T, $T); - }, - _addErrorSpan$body$_EvaluateVisitor(nodeWithSpan, callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, t2, t3, $async$exception; - var $async$_async_evaluate$_addErrorSpan$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$handler = 4; - $async$goto = 7; - return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_addErrorSpan$1$2); - case 7: - // returning from await. - t1 = $async$result; - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - $async$handler = 2; - // goto after finally - $async$goto = 6; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (type$.SassRuntimeException._is(t1)) { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - if (!B.JSString_methods.startsWith$1(J.get$span$z(error).get$text(), "@error")) - throw $async$exception; - t1 = error._span_exception$_message; - t2 = nodeWithSpan.get$span(nodeWithSpan); - t3 = $async$self._async_evaluate$_stackTrace$0(); - A.throwWithTrace(new A.SassRuntimeException(t3, B.Set_empty, t1, t2), error, stackTrace); - } else - throw $async$exception; - // goto after finally - $async$goto = 6; - break; - case 3: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 6: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate$_addErrorSpan$1$2, $async$completer); - }, - _async_evaluate$_getErrorMessage$1(error) { - var t1, exception; - if (type$.Error._is(error)) - return error.toString$0(0); - try { - t1 = A._asString(J.get$message$x(error)); - return t1; - } catch (exception) { - t1 = J.toString$0$(error); - return t1; - } - } - }; - A._EvaluateVisitor_closure12.prototype = { - call$1($arguments) { - var module, t2, - t1 = J.getInterceptor$asx($arguments), - variable = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this._async_evaluate$_environment; - t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); - return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string$_text) ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._EvaluateVisitor_closure13.prototype = { - call$1($arguments) { - var variable = J.$index$asx($arguments, 0).assertString$1("name"), - t1 = this.$this._async_evaluate$_environment; - return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string$_text, "_", "-")) != null ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._EvaluateVisitor_closure14.prototype = { - call$1($arguments) { - var module, t2, t3, t4, - t1 = J.getInterceptor$asx($arguments), - variable = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this; - t2 = t1._async_evaluate$_environment; - t3 = variable._string$_text; - t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); - return t2.getFunction$2$namespace(t4, module == null ? null : module._string$_text) != null || t1._async_evaluate$_builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._EvaluateVisitor_closure15.prototype = { - call$1($arguments) { - var module, t2, - t1 = J.getInterceptor$asx($arguments), - variable = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this._async_evaluate$_environment; - t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); - return t1.getMixin$2$namespace(t2, module == null ? null : module._string$_text) != null ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._EvaluateVisitor_closure16.prototype = { - call$1($arguments) { - var t1 = this.$this._async_evaluate$_environment; - if (!t1._async_environment$_inMixin) - throw A.wrapException(A.SassScriptException$(string$.conten, null)); - return t1._async_environment$_content != null ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._EvaluateVisitor_closure17.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, - module = this.$this._async_evaluate$_environment._async_environment$_modules.$index(0, t1); - if (module == null) - throw A.wrapException('There is no module with namespace "' + t1 + '".'); - t1 = type$.Value; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs(module.get$variables(), type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString(t4._0, true), t4._1); - } - return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 35 - }; - A._EvaluateVisitor_closure18.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, - module = this.$this._async_evaluate$_environment._async_environment$_modules.$index(0, t1); - if (module == null) - throw A.wrapException('There is no module with namespace "' + t1 + '".'); - t1 = type$.Value; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs(module.get$functions(module), type$.String, type$.AsyncCallable), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString(t4._0, true), new A.SassFunction(t4._1)); - } - return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 35 - }; - A._EvaluateVisitor_closure19.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, - module = this.$this._async_evaluate$_environment._async_environment$_modules.$index(0, t1); - if (module == null) - throw A.wrapException('There is no module with namespace "' + t1 + '".'); - t1 = type$.Value; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs(module.get$mixins(), type$.String, type$.AsyncCallable), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString(t4._0, true), new A.SassMixin(t4._1)); - } - return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 35 - }; - A._EvaluateVisitor_closure20.prototype = { - call$1($arguments) { - var module, t2, callable, - t1 = J.getInterceptor$asx($arguments), - $name = t1.$index($arguments, 0).assertString$1("name"), - css = t1.$index($arguments, 1).get$isTruthy(); - t1 = t1.$index($arguments, 2).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - if (css) { - if (module != null) - throw A.wrapException(string$.x24css_a); - return new A.SassFunction(new A.PlainCssCallable($name._string$_text)); - } - t1 = this.$this; - t2 = t1._async_evaluate$_callableNode; - t2.toString; - callable = t1._async_evaluate$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure6(t1, $name, module)); - if (callable == null) - throw A.wrapException("Function not found: " + $name.toString$0(0)); - return new A.SassFunction(callable); - }, - $signature: 165 - }; - A._EvaluateVisitor__closure6.prototype = { - call$0() { - var local, - normalizedName = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), - t1 = this.module, - namespace = t1 == null ? null : t1._string$_text; - t1 = this.$this; - local = t1._async_evaluate$_environment.getFunction$2$namespace(normalizedName, namespace); - if (local != null || namespace != null) - return local; - return t1._async_evaluate$_builtInFunctions.$index(0, normalizedName); - }, - $signature: 93 - }; - A._EvaluateVisitor_closure21.prototype = { - call$1($arguments) { - var module, t2, callable, - t1 = J.getInterceptor$asx($arguments), - $name = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this; - t2 = t1._async_evaluate$_callableNode; - t2.toString; - callable = t1._async_evaluate$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure5(t1, $name, module)); - if (callable == null) - throw A.wrapException("Mixin not found: " + $name.toString$0(0)); - return new A.SassMixin(callable); - }, - $signature: 166 - }; - A._EvaluateVisitor__closure5.prototype = { - call$0() { - var t1 = this.$this._async_evaluate$_environment, - t2 = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), - t3 = this.module; - return t1.getMixin$2$namespace(t2, t3 == null ? null : t3._string$_text); - }, - $signature: 93 - }; - A._EvaluateVisitor_closure22.prototype = { - call$1($arguments) { - return this.$call$body$_EvaluateVisitor_closure1($arguments); - }, - $call$body$_EvaluateVisitor_closure1($arguments) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$self = this, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, invocation, callableNode, t1, $function, args; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = J.getInterceptor$asx($arguments); - $function = t1.$index($arguments, 0); - args = type$.SassArgumentList._as(t1.$index($arguments, 1)); - t1 = $async$self.$this; - t2 = t1._async_evaluate$_callableNode; - t2.toString; - t3 = A._setArrayType([], type$.JSArray_Expression); - t4 = type$.String; - t5 = type$.Expression; - t6 = t2.get$span(t2); - t7 = t2.get$span(t2); - args._wereKeywordsAccessed = true; - t8 = args._keywords; - if (t8.get$isEmpty(t8)) - t2 = null; - else { - t9 = type$.Value; - t10 = A.LinkedHashMap_LinkedHashMap$_empty(t9, t9); - for (args._wereKeywordsAccessed = true, t8 = A.MapExtensions_get_pairs(t8, t4, t9), t8 = t8.get$iterator(t8); t8.moveNext$0();) { - t11 = t8.get$current(t8); - t10.$indexSet(0, new A.SassString(t11._0, false), t11._1); - } - t2 = new A.ValueExpression(new A.SassMap(A.ConstantMap_ConstantMap$from(t10, t9, t9)), t2.get$span(t2)); - } - invocation = new A.ArgumentInvocation(A.List_List$unmodifiable(t3, t5), A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t4, t5), new A.ValueExpression(args, t7), t2, t6); - $async$goto = $function instanceof A.SassString ? 3 : 4; - break; - case 3: - // then - A.warnForDeprecation(string$.Passina + $function.toString$0(0) + "))", B.Deprecation_6v8); - callableNode = t1._async_evaluate$_callableNode; - t2 = $function._string$_text; - t3 = callableNode.get$span(callableNode); - t1 = t1.visitFunctionExpression$1(0, new A.FunctionExpression(null, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, invocation, t3)); - $async$goto = 5; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$1); - case 5: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 4: - // join - t2 = $function.assertFunction$1("function"); - t3 = t1._async_evaluate$_callableNode; - t3.toString; - $async$goto = 6; - return A._asyncAwait(t1._async_evaluate$_runFunctionCallable$3(invocation, t2.callable, t3), $async$call$1); - case 6: - // returning from await. - t3 = $async$result; - $async$returnValue = t3; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 192 - }; - A._EvaluateVisitor_closure23.prototype = { - call$1($arguments) { - return this.$call$body$_EvaluateVisitor_closure0($arguments); - }, - $call$body$_EvaluateVisitor_closure0($arguments) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, withMap, t2, values, configuration, t3, t1, url; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = J.getInterceptor$asx($arguments); - url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string$_text); - t1 = t1.$index($arguments, 1).get$realNull(); - withMap = t1 == null ? null : t1.assertMap$1("with")._map$_contents; - t1 = $async$self.$this; - t2 = t1._async_evaluate$_callableNode; - t2.toString; - if (withMap != null) { - values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); - withMap.forEach$1(0, new A._EvaluateVisitor__closure3(values, t2.get$span(t2), t2)); - configuration = new A.ExplicitConfiguration(t2, values, null); - } else - configuration = B.Configuration_Map_empty_null; - t3 = t2.get$span(t2); - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure4(t1), t3.get$sourceUrl(t3), configuration, true), $async$call$1); - case 2: - // returning from await. - t1._async_evaluate$_assertConfigurationIsEmpty$2$nameInError(configuration, true); - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 167 - }; - A._EvaluateVisitor__closure3.prototype = { - call$2(variable, value) { - var t1 = variable.assertString$1("with key"), - $name = A.stringReplaceAllUnchecked(t1._string$_text, "_", "-"); - t1 = this.values; - if (t1.containsKey$1($name)) - throw A.wrapException("The variable $" + $name + " was configured twice."); - t1.$indexSet(0, $name, new A.ConfiguredValue(value, this.span, this.callableNode)); - }, - $signature: 95 - }; - A._EvaluateVisitor__closure4.prototype = { - call$2(module, _) { - var t1 = this.$this; - return t1._async_evaluate$_combineCss$2$clone(module, true).accept$1(t1); - }, - $signature: 395 - }; - A._EvaluateVisitor_closure24.prototype = { - call$1($arguments) { - return this.$call$body$_EvaluateVisitor_closure($arguments); - }, - $call$body$_EvaluateVisitor_closure($arguments) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, callableNode, t2, t3, t4, t5, t1, mixin, args; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = J.getInterceptor$asx($arguments); - mixin = t1.$index($arguments, 0); - args = type$.SassArgumentList._as(t1.$index($arguments, 1)); - t1 = $async$self.$this; - callableNode = t1._async_evaluate$_callableNode; - t2 = callableNode.get$span(callableNode); - t3 = callableNode.get$span(callableNode); - t4 = type$.Expression; - t5 = A.List_List$unmodifiable(B.List_empty9, t4); - t4 = A.ConstantMap_ConstantMap$from(B.Map_empty5, type$.String, t4); - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate$_applyMixin$5(mixin.assertMixin$1("mixin").callable, t1._async_evaluate$_environment._async_environment$_content, new A.ArgumentInvocation(t5, t4, new A.ValueExpression(args, t3), null, t2), callableNode, callableNode), $async$call$1); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 167 - }; - A._EvaluateVisitor_run_closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet), - $async$returnValue, $async$self = this, module, t1, t2, _0_0, url; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node; - t2 = t1.span; - _0_0 = t2.get$sourceUrl(t2); - url = null; - if (_0_0 != null) { - url = _0_0; - t2 = $async$self.$this; - t2._async_evaluate$_activeModules.$indexSet(0, url, null); - t2._async_evaluate$_loadedUrls.add$1(0, url); - } - t2 = $async$self.$this; - $async$goto = 3; - return A._asyncAwait(t2._async_evaluate$_addExceptionTrace$1$1(new A._EvaluateVisitor_run__closure0(t2, $async$self.importer, t1), type$.Module_AsyncCallable), $async$call$0); - case 3: - // returning from await. - module = $async$result; - $async$returnValue = new A._Record_2_loadedUrls_stylesheet(t2._async_evaluate$_loadedUrls, t2._async_evaluate$_combineCss$1(module)); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 336 - }; - A._EvaluateVisitor_run__closure0.prototype = { - call$0() { - return this.$this._async_evaluate$_execute$2(this.importer, this.node); - }, - $signature: 401 - }; - A._EvaluateVisitor__loadModule_closure1.prototype = { - call$0() { - return this.callback.call$2(this._box_1.builtInModule, false); - }, - $signature: 0 - }; - A._EvaluateVisitor__loadModule_closure2.prototype = { - call$0() { - return this.$call$body$_EvaluateVisitor__loadModule_closure(); - }, - $call$body$_EvaluateVisitor__loadModule_closure() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, canonicalUrl, oldInDependency, isDependency, t4, message, t1, stylesheet, importer, t2, t3, _1_0, $async$temp1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = {}; - stylesheet = null; - importer = null; - t2 = $async$self.$this; - t3 = $async$self.nodeWithSpan; - $async$goto = 2; - return A._asyncAwait(t2._async_evaluate$_loadStylesheet$3$baseUrl($async$self.url.toString$0(0), t3.get$span(t3), $async$self.baseUrl), $async$call$0); - case 2: - // returning from await. - _1_0 = $async$result; - stylesheet = _1_0._0; - importer = _1_0._1; - isDependency = _1_0._2; - t4 = stylesheet.span; - canonicalUrl = t4.get$sourceUrl(t4); - if (canonicalUrl != null) { - t4 = t2._async_evaluate$_activeModules; - if (t4.containsKey$1(canonicalUrl)) { - if ($async$self.namesInErrors) { - t1 = canonicalUrl; - t3 = $.$get$context(); - t1.toString; - message = "Module loop: " + t3.prettyUri$1(t1) + " is already being loaded."; - } else - message = string$.Modulel; - t1 = A.NullableExtension_andThen(t4.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure1(t2, message)); - throw A.wrapException(t1 == null ? t2._async_evaluate$_exception$1(message) : t1); - } else - t4.$indexSet(0, canonicalUrl, t3); - } - t4 = t2._async_evaluate$_modules.containsKey$1(canonicalUrl); - oldInDependency = t2._async_evaluate$_inDependency; - t2._async_evaluate$_inDependency = isDependency; - t1.module = null; - $async$handler = 3; - $async$temp1 = t1; - $async$goto = 6; - return A._asyncAwait(t2._async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, $async$self.configuration, $async$self.namesInErrors, t3), $async$call$0); - case 6: - // returning from await. - $async$temp1.module = $async$result; - $async$next.push(5); - // goto finally - $async$goto = 4; - break; - case 3: - // uncaught - $async$next = [1]; - case 4: - // finally - $async$handler = 1; - t2._async_evaluate$_activeModules.remove$1(0, canonicalUrl); - t2._async_evaluate$_inDependency = oldInDependency; - // goto the next finally handler - $async$goto = $async$next.pop(); - break; - case 5: - // after finally - $async$goto = 7; - return A._asyncAwait(t2._addExceptionSpanAsync$1$3$addStackFrame(t3, new A._EvaluateVisitor__loadModule__closure2(t1, $async$self.callback, !t4), false, type$.void), $async$call$0); - case 7: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - case 1: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor__loadModule__closure1.prototype = { - call$1(previousLoad) { - return this.$this._async_evaluate$_multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); - }, - $signature: 84 - }; - A._EvaluateVisitor__loadModule__closure2.prototype = { - call$0() { - return this.callback.call$2(this._box_0.module, this.firstLoad); - }, - $signature: 0 - }; - A._EvaluateVisitor__execute_closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t3, t4, t5, t6, t1, oldImporter, oldStylesheet, oldRoot, oldPreModuleComments, oldParent, oldEndOfImports, oldOutOfOrderImports, oldExtensionStore, t2, oldStyleRule, oldMediaQueries, oldDeclarationName, oldInUnknownAtRule, oldInKeyframes, oldConfiguration; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - oldImporter = t1._async_evaluate$_importer; - oldStylesheet = t1._async_evaluate$__stylesheet; - oldRoot = t1._async_evaluate$__root; - oldPreModuleComments = t1._async_evaluate$_preModuleComments; - oldParent = t1._async_evaluate$__parent; - oldEndOfImports = t1._async_evaluate$__endOfImports; - oldOutOfOrderImports = t1._async_evaluate$_outOfOrderImports; - oldExtensionStore = t1._async_evaluate$__extensionStore; - t2 = t1._async_evaluate$_atRootExcludingStyleRule; - oldStyleRule = t2 ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; - oldMediaQueries = t1._async_evaluate$_mediaQueries; - oldDeclarationName = t1._async_evaluate$_declarationName; - oldInUnknownAtRule = t1._async_evaluate$_inUnknownAtRule; - oldInKeyframes = t1._async_evaluate$_inKeyframes; - oldConfiguration = t1._async_evaluate$_configuration; - t1._async_evaluate$_importer = $async$self.importer; - t3 = t1._async_evaluate$__stylesheet = $async$self.stylesheet; - t4 = t3.span; - t5 = t1._async_evaluate$__parent = t1._async_evaluate$__root = A.ModifiableCssStylesheet$(t4); - t1._async_evaluate$__endOfImports = 0; - t1._async_evaluate$_outOfOrderImports = null; - t1._async_evaluate$__extensionStore = $async$self.extensionStore; - t1._async_evaluate$_declarationName = t1._async_evaluate$_mediaQueries = t1._async_evaluate$_styleRuleIgnoringAtRoot = null; - t1._async_evaluate$_inKeyframes = t1._async_evaluate$_atRootExcludingStyleRule = t1._async_evaluate$_inUnknownAtRule = false; - t6 = $async$self.configuration; - if (t6 != null) - t1._async_evaluate$_configuration = t6; - $async$goto = 2; - return A._asyncAwait(t1.visitStylesheet$1(0, t3), $async$call$0); - case 2: - // returning from await. - t3 = t1._async_evaluate$_outOfOrderImports == null ? t5 : new A.CssStylesheet(new A.UnmodifiableListView(t1._async_evaluate$_addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode), t4); - $async$self.css.__late_helper$_value = t3; - $async$self.preModuleComments.__late_helper$_value = t1._async_evaluate$_preModuleComments; - t1._async_evaluate$_importer = oldImporter; - t1._async_evaluate$__stylesheet = oldStylesheet; - t1._async_evaluate$__root = oldRoot; - t1._async_evaluate$_preModuleComments = oldPreModuleComments; - t1._async_evaluate$__parent = oldParent; - t1._async_evaluate$__endOfImports = oldEndOfImports; - t1._async_evaluate$_outOfOrderImports = oldOutOfOrderImports; - t1._async_evaluate$__extensionStore = oldExtensionStore; - t1._async_evaluate$_styleRuleIgnoringAtRoot = oldStyleRule; - t1._async_evaluate$_mediaQueries = oldMediaQueries; - t1._async_evaluate$_declarationName = oldDeclarationName; - t1._async_evaluate$_inUnknownAtRule = oldInUnknownAtRule; - t1._async_evaluate$_atRootExcludingStyleRule = t2; - t1._async_evaluate$_inKeyframes = oldInKeyframes; - t1._async_evaluate$_configuration = oldConfiguration; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor__combineCss_closure1.prototype = { - call$1(module) { - return module.get$transitivelyContainsCss(); - }, - $signature: 120 - }; - A._EvaluateVisitor__combineCss_closure2.prototype = { - call$1(target) { - return !this.selectors.contains$1(0, target); - }, - $signature: 13 - }; - A._EvaluateVisitor__combineCss_visitModule0.prototype = { - call$1(module) { - var t1, t2, t3, t4, _i, upstream, _1_0, statements, index, _this = this; - if (!_this.seen.add$1(0, module)) - return; - if (_this.clone) - module = module.cloneCss$0(); - for (t1 = module.get$upstream(), t2 = t1.length, t3 = _this.css, t4 = _this.imports, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - upstream = t1[_i]; - if (upstream.get$transitivelyContainsCss()) { - _1_0 = module.get$preModuleComments().$index(0, upstream); - if (_1_0 != null) - B.JSArray_methods.addAll$1(t3.length === 0 ? t4 : t3, _1_0); - _this.call$1(upstream); - } - } - _this.sorted.addFirst$1(module); - t1 = module.get$css(module); - statements = t1.get$children(t1); - index = _this.$this._async_evaluate$_indexAfterImports$1(statements); - t1 = J.getInterceptor$ax(statements); - B.JSArray_methods.addAll$1(t4, t1.getRange$2(statements, 0, index)); - B.JSArray_methods.addAll$1(t3, t1.getRange$2(statements, index, t1.get$length(statements))); - }, - $signature: 416 - }; - A._EvaluateVisitor__extendModules_closure1.prototype = { - call$1(target) { - return !this.originalSelectors.contains$1(0, target); - }, - $signature: 13 - }; - A._EvaluateVisitor__extendModules_closure2.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_ExtensionStore); - }, - $signature: 170 - }; - A._EvaluateVisitor_visitAtRootRule_closure1.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitAtRootRule_closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A._EvaluateVisitor__scopeForAtRoot_closure5.prototype = { - call$1(callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__parent, "__parent"); - t1._async_evaluate$__parent = $async$self.newParent; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate$_environment.scope$1$2$when(callback, $async$self.node.hasDeclarations, type$.void), $async$call$1); - case 2: - // returning from await. - t1._async_evaluate$__parent = t2; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 40 - }; - A._EvaluateVisitor__scopeForAtRoot_closure6.prototype = { - call$1(callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, oldAtRootExcludingStyleRule; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - oldAtRootExcludingStyleRule = t1._async_evaluate$_atRootExcludingStyleRule; - t1._async_evaluate$_atRootExcludingStyleRule = true; - $async$goto = 2; - return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); - case 2: - // returning from await. - t1._async_evaluate$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 40 - }; - A._EvaluateVisitor__scopeForAtRoot_closure7.prototype = { - call$1(callback) { - return this.$this._async_evaluate$_withMediaQueries$1$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure0(this.innerScope, callback), type$.Null); - }, - $signature: 40 - }; - A._EvaluateVisitor__scopeForAtRoot__closure0.prototype = { - call$0() { - return this.innerScope.call$1(this.callback); - }, - $signature: 2 - }; - A._EvaluateVisitor__scopeForAtRoot_closure8.prototype = { - call$1(callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, wasInKeyframes; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - wasInKeyframes = t1._async_evaluate$_inKeyframes; - t1._async_evaluate$_inKeyframes = false; - $async$goto = 2; - return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); - case 2: - // returning from await. - t1._async_evaluate$_inKeyframes = wasInKeyframes; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 40 - }; - A._EvaluateVisitor__scopeForAtRoot_closure9.prototype = { - call$1($parent) { - return $parent instanceof A.ModifiableCssAtRule; - }, - $signature: 171 - }; - A._EvaluateVisitor__scopeForAtRoot_closure10.prototype = { - call$1(callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, wasInUnknownAtRule; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - wasInUnknownAtRule = t1._async_evaluate$_inUnknownAtRule; - t1._async_evaluate$_inUnknownAtRule = false; - $async$goto = 2; - return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); - case 2: - // returning from await. - t1._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 40 - }; - A._EvaluateVisitor_visitContentRule_closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$returnValue, $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.content.declaration.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - $async$goto = 6; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 6: - // returning from await. - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitDeclaration_closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self._box_0.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitEachRule_closure2.prototype = { - call$1(value) { - var t1 = this.$this, - t2 = this.nodeWithSpan; - return t1._async_evaluate$_environment.setLocalVariable$3(this._box_0.variable, t1._async_evaluate$_withoutSlash$2(value, t2), t2); - }, - $signature: 58 - }; - A._EvaluateVisitor_visitEachRule_closure3.prototype = { - call$1(value) { - return this.$this._async_evaluate$_setMultipleVariables$3(this._box_0.variables, value, this.nodeWithSpan); - }, - $signature: 58 - }; - A._EvaluateVisitor_visitEachRule_closure4.prototype = { - call$0() { - var _this = this, - t1 = _this.$this; - return t1._async_evaluate$_handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure0(t1, _this.setVariables, _this.node)); - }, - $signature: 72 - }; - A._EvaluateVisitor_visitEachRule__closure0.prototype = { - call$1(element) { - var t1; - this.setVariables.call$1(element); - t1 = this.$this; - return t1._async_evaluate$_handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure0(t1)); - }, - $signature: 447 - }; - A._EvaluateVisitor_visitEachRule___closure0.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 88 - }; - A._EvaluateVisitor_visitAtRule_closure2.prototype = { - call$1(value) { - return this.$this._async_evaluate$_interpolationToValue$3$trim$warnForColor(value, true, true); - }, - $signature: 452 - }; - A._EvaluateVisitor_visitAtRule_closure3.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t2, t3, _i, t1, styleRule; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - styleRule = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; - $async$goto = styleRule == null || t1._async_evaluate$_inKeyframes || J.$eq$($async$self.name.value, "font-face") ? 2 : 4; - break; - case 2: - // then - t2 = $async$self.children, t3 = t2.length, _i = 0; - case 5: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 7; - break; - } - $async$goto = 8; - return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); - case 8: - // returning from await. - case 6: - // for update - ++_i; - // goto for condition - $async$goto = 5; - break; - case 7: - // after for - // goto join - $async$goto = 3; - break; - case 4: - // else - $async$goto = 9; - return A._asyncAwait(t1._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(styleRule._style_rule$_selector, styleRule.span, false, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure0(t1, $async$self.children), false, type$.ModifiableCssStyleRule, type$.Null), $async$call$0); - case 9: - // returning from await. - case 3: - // join - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitAtRule__closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitAtRule_closure4.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitForRule_closure4.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber), - $async$returnValue, $async$self = this; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self.node.from.accept$1($async$self.$this), $async$call$0); - case 3: - // returning from await. - $async$returnValue = $async$result.assertNumber$0(); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 175 - }; - A._EvaluateVisitor_visitForRule_closure5.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber), - $async$returnValue, $async$self = this; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self.node.to.accept$1($async$self.$this), $async$call$0); - case 3: - // returning from await. - $async$returnValue = $async$result.assertNumber$0(); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 175 - }; - A._EvaluateVisitor_visitForRule_closure6.prototype = { - call$0() { - return this.fromNumber.assertInt$0(); - }, - $signature: 10 - }; - A._EvaluateVisitor_visitForRule_closure7.prototype = { - call$0() { - var t1 = this.fromNumber; - return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); - }, - $signature: 10 - }; - A._EvaluateVisitor_visitForRule_closure8.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, i, t3, t4, t5, t6, t7, t8, _0_0, t1, t2, nodeWithSpan; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self.node; - nodeWithSpan = t1._async_evaluate$_expressionNode$1(t2.from); - i = $async$self.from, t3 = $async$self._box_0, t4 = $async$self.direction, t5 = t2.variable, t6 = $async$self.fromNumber, t2 = t2.children; - case 3: - // for condition - if (!(i !== t3.to)) { - // goto after for - $async$goto = 5; - break; - } - t7 = t1._async_evaluate$_environment; - t8 = t6.get$numeratorUnits(t6); - t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); - $async$goto = 6; - return A._asyncAwait(t1._async_evaluate$_handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure0(t1)), $async$call$0); - case 6: - // returning from await. - _0_0 = $async$result; - if (_0_0 != null) { - $async$returnValue = _0_0; - // goto return - $async$goto = 1; - break; - } - case 4: - // for update - i += t4; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 72 - }; - A._EvaluateVisitor_visitForRule__closure0.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 88 - }; - A._EvaluateVisitor_visitForwardRule_closure1.prototype = { - call$2(module, firstLoad) { - if (firstLoad) - this.$this._async_evaluate$_registerCommentsForModule$1(module); - this.$this._async_evaluate$_environment.forwardModule$2(module, this.node); - }, - $signature: 140 - }; - A._EvaluateVisitor_visitForwardRule_closure2.prototype = { - call$2(module, firstLoad) { - if (firstLoad) - this.$this._async_evaluate$_registerCommentsForModule$1(module); - this.$this._async_evaluate$_environment.forwardModule$2(module, this.node); - }, - $signature: 140 - }; - A._EvaluateVisitor__registerCommentsForModule_closure0.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_CssComment); - }, - $signature: 176 - }; - A._EvaluateVisitor_visitIfRule_closure0.prototype = { - call$1(clause) { - var t1 = this.$this; - return t1._async_evaluate$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule__closure0(t1, clause), true, clause.hasDeclarations, type$.nullable_Value); - }, - $signature: 467 - }; - A._EvaluateVisitor_visitIfRule__closure0.prototype = { - call$0() { - var t1 = this.$this; - return t1._async_evaluate$_handleReturn$2(this.clause.children, new A._EvaluateVisitor_visitIfRule___closure0(t1)); - }, - $signature: 72 - }; - A._EvaluateVisitor_visitIfRule___closure0.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 88 - }; - A._EvaluateVisitor__visitDynamicImport_closure0.prototype = { - call$0() { - return this.$call$body$_EvaluateVisitor__visitDynamicImport_closure(); - }, - $call$body$_EvaluateVisitor__visitDynamicImport_closure() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$returnValue, $async$self = this, t1, t2, _0_0, stylesheet, importer, isDependency, t3, url, oldImporter, oldInDependency, loadsUserDefinedModules, children, t4, t5, t6, t7, t8, t9, t10, environment, module, visitor, _box_0; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - _box_0 = {}; - _box_0.isDependency = _box_0.importer = _box_0.stylesheet = null; - t1 = $async$self.$this; - t2 = $async$self.$import; - $async$goto = 3; - return A._asyncAwait(t1._async_evaluate$_loadStylesheet$3$forImport(t2.urlString, t2.span, true), $async$call$0); - case 3: - // returning from await. - _0_0 = $async$result; - stylesheet = _box_0.stylesheet = _0_0._0; - importer = _0_0._1; - _box_0.importer = importer; - isDependency = _0_0._2; - _box_0.isDependency = isDependency; - t3 = stylesheet.span; - url = t3.get$sourceUrl(t3); - if (url != null) { - t3 = t1._async_evaluate$_activeModules; - if (t3.containsKey$1(url)) { - t2 = A.NullableExtension_andThen(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure3(t1)); - throw A.wrapException(t2 == null ? t1._async_evaluate$_exception$1("This file is already being loaded.") : t2); - } - t3.$indexSet(0, url, t2); - } - t2 = stylesheet._uses; - t3 = type$.UnmodifiableListView_UseRule; - $async$goto = new A.UnmodifiableListView(t2, t3).get$length(0) === 0 && new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule).get$length(0) === 0 ? 4 : 5; - break; - case 4: - // then - oldImporter = t1._async_evaluate$_importer; - t2 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__stylesheet, "_stylesheet"); - oldInDependency = t1._async_evaluate$_inDependency; - t1._async_evaluate$_importer = importer; - t1._async_evaluate$__stylesheet = stylesheet; - t1._async_evaluate$_inDependency = isDependency; - $async$goto = 6; - return A._asyncAwait(t1.visitStylesheet$1(0, stylesheet), $async$call$0); - case 6: - // returning from await. - t1._async_evaluate$_importer = oldImporter; - t1._async_evaluate$__stylesheet = t2; - t1._async_evaluate$_inDependency = oldInDependency; - t1._async_evaluate$_activeModules.remove$1(0, url); - // goto return - $async$goto = 1; - break; - case 5: - // join - t2 = new A.UnmodifiableListView(t2, t3); - if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure4())) { - t2 = new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); - loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure5()); - } else - loadsUserDefinedModules = true; - children = A._Cell$(); - t2 = t1._async_evaluate$_environment; - t3 = type$.String; - t4 = type$.Module_AsyncCallable; - t5 = type$.AstNode; - t6 = A._setArrayType([], type$.JSArray_Module_AsyncCallable); - t7 = t2._async_environment$_variables; - t7 = A._setArrayType(t7.slice(0), A._arrayInstanceType(t7)); - t8 = t2._async_environment$_variableNodes; - t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); - t9 = t2._async_environment$_functions; - t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); - t10 = t2._async_environment$_mixins; - t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); - environment = A.AsyncEnvironment$_(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._async_environment$_importedModules, null, null, t6, t7, t8, t9, t10, t2._async_environment$_content); - $async$goto = 7; - return A._asyncAwait(t1._async_evaluate$_withEnvironment$1$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure6(_box_0, t1, loadsUserDefinedModules, environment, children), type$.Null), $async$call$0); - case 7: - // returning from await. - module = environment.toDummyModule$0(); - t1._async_evaluate$_environment.importForwards$1(module); - $async$goto = loadsUserDefinedModules ? 8 : 9; - break; - case 8: - // then - $async$goto = module.transitivelyContainsCss ? 10 : 11; - break; - case 10: - // then - $async$goto = 12; - return A._asyncAwait(t1._async_evaluate$_combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1), $async$call$0); - case 12: - // returning from await. - case 11: - // join - visitor = new A._ImportedCssVisitor0(t1); - for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) - t2.get$current(t2).accept$1(visitor); - case 9: - // join - t1._async_evaluate$_activeModules.remove$1(0, url); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A._EvaluateVisitor__visitDynamicImport__closure3.prototype = { - call$1(previousLoad) { - return this.$this._async_evaluate$_multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); - }, - $signature: 84 - }; - A._EvaluateVisitor__visitDynamicImport__closure4.prototype = { - call$1(rule) { - return rule.url.get$scheme() !== "sass"; - }, - $signature: 177 - }; - A._EvaluateVisitor__visitDynamicImport__closure5.prototype = { - call$1(rule) { - return rule.url.get$scheme() !== "sass"; - }, - $signature: 178 - }; - A._EvaluateVisitor__visitDynamicImport__closure6.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t7, t8, t1, oldImporter, t2, t3, t4, t5, oldOutOfOrderImports, oldConfiguration, oldInDependency, t6; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - oldImporter = t1._async_evaluate$_importer; - t2 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__stylesheet, "_stylesheet"); - t3 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__root, "_root"); - t4 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__parent, "__parent"); - t5 = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__endOfImports, "_endOfImports"); - oldOutOfOrderImports = t1._async_evaluate$_outOfOrderImports; - oldConfiguration = t1._async_evaluate$_configuration; - oldInDependency = t1._async_evaluate$_inDependency; - t6 = $async$self._box_0; - t1._async_evaluate$_importer = t6.importer; - t7 = t6.stylesheet; - t1._async_evaluate$__stylesheet = t7; - t8 = $async$self.loadsUserDefinedModules; - if (t8) { - t7 = A.ModifiableCssStylesheet$(t7.span); - t1._async_evaluate$__root = t7; - t1._async_evaluate$__parent = t1._async_evaluate$_assertInModule$2(t7, "_root"); - t1._async_evaluate$__endOfImports = 0; - t1._async_evaluate$_outOfOrderImports = null; - } - t1._async_evaluate$_inDependency = t6.isDependency; - t7 = new A.UnmodifiableListView(t6.stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); - if (!t7.get$isEmpty(t7)) - t1._async_evaluate$_configuration = $async$self.environment.toImplicitConfiguration$0(); - $async$goto = 2; - return A._asyncAwait(t1.visitStylesheet$1(0, t6.stylesheet), $async$call$0); - case 2: - // returning from await. - t6 = t8 ? t1._async_evaluate$_addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode); - $async$self.children.__late_helper$_value = t6; - t1._async_evaluate$_importer = oldImporter; - t1._async_evaluate$__stylesheet = t2; - if (t8) { - t1._async_evaluate$__root = t3; - t1._async_evaluate$__parent = t4; - t1._async_evaluate$__endOfImports = t5; - t1._async_evaluate$_outOfOrderImports = oldOutOfOrderImports; - } - t1._async_evaluate$_configuration = oldConfiguration; - t1._async_evaluate$_inDependency = oldInDependency; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor__applyMixin_closure1.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin__closure2(t1, $async$self.$arguments, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A._EvaluateVisitor__applyMixin__closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 2; - return A._asyncAwait($async$self.$this._async_evaluate$_runBuiltInCallable$3($async$self.$arguments, $async$self.mixin, $async$self.nodeWithSpanWithoutContent), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A._EvaluateVisitor__applyMixin_closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate$_environment.withContent$2($async$self.contentCallable, new A._EvaluateVisitor__applyMixin__closure1(t1, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor__applyMixin__closure1.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin___closure0(t1, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A._EvaluateVisitor__applyMixin___closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1, t2, t3, t4, t5, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.mixin.declaration.children, t2 = t1.length, t3 = $async$self.$this, t4 = $async$self.nodeWithSpanWithoutContent, t5 = type$.nullable_Value, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t3._async_evaluate$_addErrorSpan$1$2(t4, new A._EvaluateVisitor__applyMixin____closure0(t3, t1[_i]), t5), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A._EvaluateVisitor__applyMixin____closure0.prototype = { - call$0() { - return this.statement.accept$1(this.$this); - }, - $signature: 72 - }; - A._EvaluateVisitor_visitIncludeRule_closure2.prototype = { - call$0() { - var t1 = this.node; - return this.$this._async_evaluate$_environment.getMixin$2$namespace(t1.name, t1.namespace); - }, - $signature: 93 - }; - A._EvaluateVisitor_visitIncludeRule_closure3.prototype = { - call$1($content) { - var t1 = this.$this; - return new A.UserDefinedCallable($content, t1._async_evaluate$_environment.closure$0(), t1._async_evaluate$_inDependency, type$.UserDefinedCallable_AsyncEnvironment); - }, - $signature: 484 - }; - A._EvaluateVisitor_visitIncludeRule_closure4.prototype = { - call$0() { - return this.node.get$spanWithoutContent(); - }, - $signature: 27 - }; - A._EvaluateVisitor_visitMediaRule_closure2.prototype = { - call$1(mediaQueries) { - return this.$this._async_evaluate$_mergeMediaQueries$2(mediaQueries, this.queries); - }, - $signature: 80 - }; - A._EvaluateVisitor_visitMediaRule_closure3.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self.mergedQueries; - if (t2 == null) - t2 = $async$self.queries; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitMediaRule__closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t2, t3, _i, t1, _0_0; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - _0_0 = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; - $async$goto = _0_0 != null ? 2 : 4; - break; - case 2: - // then - $async$goto = 5; - return A._asyncAwait(t1._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure0(t1, $async$self.node), false, type$.ModifiableCssStyleRule, type$.Null), $async$call$0); - case 5: - // returning from await. - // goto join - $async$goto = 3; - break; - case 4: - // else - t2 = $async$self.node.children, t3 = t2.length, _i = 0; - case 6: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 8; - break; - } - $async$goto = 9; - return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); - case 9: - // returning from await. - case 7: - // for update - ++_i; - // goto for condition - $async$goto = 6; - break; - case 8: - // after for - case 3: - // join - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitMediaRule___closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitMediaRule_closure4.prototype = { - call$1(node) { - var t1; - if (!(node instanceof A.ModifiableCssStyleRule)) { - t1 = this.mergedSources; - t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); - } else - t1 = true; - return t1; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitStyleRule_closure3.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitStyleRule_closure4.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitStyleRule_closure6.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitStyleRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitStyleRule__closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitStyleRule_closure5.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor__warnForBogusCombinators_closure0.prototype = { - call$1(child) { - return child instanceof A.ModifiableCssComment; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitSupportsRule_closure1.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t2, t3, _i, t1, _0_0; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - _0_0 = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; - $async$goto = _0_0 != null ? 2 : 4; - break; - case 2: - // then - $async$goto = 5; - return A._asyncAwait(t1._async_evaluate$_withParent$2$2(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure0(t1, $async$self.node), type$.ModifiableCssStyleRule, type$.Null), $async$call$0); - case 5: - // returning from await. - // goto join - $async$goto = 3; - break; - case 4: - // else - t2 = $async$self.node.children, t3 = t2.length, _i = 0; - case 6: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 8; - break; - } - $async$goto = 9; - return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); - case 9: - // returning from await. - case 7: - // for update - ++_i; - // goto for condition - $async$goto = 6; - break; - case 8: - // after for - case 3: - // join - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitSupportsRule__closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitSupportsRule_closure2.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor__visitSupportsCondition_closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.String), - $async$returnValue, $async$self = this, t1, t2, t3, t4, $async$temp1, $async$temp2; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self._box_0; - $async$temp1 = A; - $async$goto = 3; - return A._asyncAwait(t1._evaluateToCss$1(t2.declaration.name), $async$call$0); - case 3: - // returning from await. - t3 = $async$temp1.S($async$result); - t4 = t2.declaration.get$isCustomProperty() ? "" : " "; - $async$temp1 = "(" + t3 + ":" + t4; - $async$temp2 = A; - $async$goto = 4; - return A._asyncAwait(t1._evaluateToCss$1(t2.declaration.value), $async$call$0); - case 4: - // returning from await. - $async$returnValue = $async$temp1 + $async$temp2.S($async$result) + ")"; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 179 - }; - A._EvaluateVisitor_visitVariableDeclaration_closure2.prototype = { - call$0() { - var t1 = this.$this._async_evaluate$_environment, - t2 = this._box_0.override; - t1.setVariable$4$global(this.node.name, t2.value, t2.assignmentNode, true); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitVariableDeclaration_closure3.prototype = { - call$0() { - var t1 = this.node; - return this.$this._async_evaluate$_environment.getVariable$2$namespace(t1.name, t1.namespace); - }, - $signature: 44 - }; - A._EvaluateVisitor_visitVariableDeclaration_closure4.prototype = { - call$0() { - var t1 = this.$this, - t2 = this.node; - t1._async_evaluate$_environment.setVariable$5$global$namespace(t2.name, this.value, t1._async_evaluate$_expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitUseRule_closure0.prototype = { - call$2(module, firstLoad) { - var t1, t2, t3, _0_0, t4, t5, span; - if (firstLoad) - this.$this._async_evaluate$_registerCommentsForModule$1(module); - t1 = this.$this._async_evaluate$_environment; - t2 = this.node; - t3 = t2.namespace; - if (t3 == null) { - t1._async_environment$_globalModules.$indexSet(0, module, t2); - t1._async_environment$_allModules.push(module); - _0_0 = A.IterableExtension_firstWhereOrNull(J.get$keys$z(B.JSArray_methods.get$first(t1._async_environment$_variables)), module.get$variables().get$containsKey()); - if (_0_0 != null) - A.throwExpression(A.SassScriptException$(string$.This_ma + _0_0 + '".', null)); - } else { - t4 = t1._async_environment$_modules; - if (t4.containsKey$1(t3)) { - t5 = t1._async_environment$_namespaceNodes.$index(0, t3); - span = t5 == null ? null : t5.span; - t5 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - if (span != null) - t5.$indexSet(0, span, "original @use"); - A.throwExpression(A.MultiSpanSassScriptException$(string$.There_ + t3 + '".', "new @use", t5)); - } - t4.$indexSet(0, t3, module); - t1._async_environment$_namespaceNodes.$indexSet(0, t3, t2); - t1._async_environment$_allModules.push(module); - } - }, - $signature: 140 - }; - A._EvaluateVisitor_visitWarnRule_closure0.prototype = { - call$0() { - return this.node.expression.accept$1(this.$this); - }, - $signature: 76 - }; - A._EvaluateVisitor_visitWhileRule_closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), - $async$returnValue, $async$self = this, t1, t2, t3, _0_0; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node, t2 = t1.condition, t3 = $async$self.$this, t1 = t1.children; - case 3: - // for condition - $async$goto = 5; - return A._asyncAwait(t2.accept$1(t3), $async$call$0); - case 5: - // returning from await. - if (!$async$result.get$isTruthy()) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 6; - return A._asyncAwait(t3._async_evaluate$_handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure0(t3)), $async$call$0); - case 6: - // returning from await. - _0_0 = $async$result; - if (_0_0 != null) { - $async$returnValue = _0_0; - // goto return - $async$goto = 1; - break; - } - // goto for condition - $async$goto = 3; - break; - case 4: - // after for - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 72 - }; - A._EvaluateVisitor_visitWhileRule__closure0.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 88 - }; - A._EvaluateVisitor_visitBinaryOperationExpression_closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$self = this, t3, t1, t2, left, $async$temp1, $async$temp2; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node; - t2 = $async$self.$this; - $async$goto = 3; - return A._asyncAwait(t1.left.accept$1(t2), $async$call$0); - case 3: - // returning from await. - left = $async$result; - case 4: - // switch - switch (t1.operator) { - case B.BinaryOperator_wdM: - // goto case - $async$goto = 6; - break; - case B.BinaryOperator_qNM: - // goto case - $async$goto = 7; - break; - case B.BinaryOperator_eDt: - // goto case - $async$goto = 8; - break; - case B.BinaryOperator_g8k: - // goto case - $async$goto = 9; - break; - case B.BinaryOperator_icU: - // goto case - $async$goto = 10; - break; - case B.BinaryOperator_bEa: - // goto case - $async$goto = 11; - break; - case B.BinaryOperator_oEm: - // goto case - $async$goto = 12; - break; - case B.BinaryOperator_miq: - // goto case - $async$goto = 13; - break; - case B.BinaryOperator_SPQ: - // goto case - $async$goto = 14; - break; - case B.BinaryOperator_u15: - // goto case - $async$goto = 15; - break; - case B.BinaryOperator_SjO: - // goto case - $async$goto = 16; - break; - case B.BinaryOperator_2No: - // goto case - $async$goto = 17; - break; - case B.BinaryOperator_U77: - // goto case - $async$goto = 18; - break; - case B.BinaryOperator_KNx: - // goto case - $async$goto = 19; - break; - default: - // goto default - $async$goto = 20; - break; - } - break; - case 6: - // case - t1 = t1.right.accept$1(t2); - $async$goto = 21; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); - case 21: - // returning from await. - t1 = $async$result; - t1 = new A.SassString(A.serializeValue(left, false, true) + "=" + A.serializeValue(t1, false, true), false); - // goto after switch - $async$goto = 5; - break; - case 7: - // case - $async$goto = left.get$isTruthy() ? 22 : 24; - break; - case 22: - // then - t1 = left; - // goto join - $async$goto = 23; - break; - case 24: - // else - t1 = t1.right.accept$1(t2); - $async$goto = 25; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); - case 25: - // returning from await. - t1 = $async$result; - case 23: - // join - // goto after switch - $async$goto = 5; - break; - case 8: - // case - $async$goto = left.get$isTruthy() ? 26 : 28; - break; - case 26: - // then - t1 = t1.right.accept$1(t2); - $async$goto = 29; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); - case 29: - // returning from await. - t1 = $async$result; - // goto join - $async$goto = 27; - break; - case 28: - // else - t1 = left; - case 27: - // join - // goto after switch - $async$goto = 5; - break; - case 9: - // case - $async$temp1 = left; - $async$goto = 30; - return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); - case 30: - // returning from await. - t1 = $async$temp1.$eq(0, $async$result) ? B.SassBoolean_true : B.SassBoolean_false; - // goto after switch - $async$goto = 5; - break; - case 10: - // case - $async$temp1 = left; - $async$goto = 31; - return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); - case 31: - // returning from await. - t1 = !$async$temp1.$eq(0, $async$result) ? B.SassBoolean_true : B.SassBoolean_false; - // goto after switch - $async$goto = 5; - break; - case 11: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 32; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); - case 32: - // returning from await. - t1 = $async$temp1.greaterThan$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 12: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 33; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); - case 33: - // returning from await. - t1 = $async$temp1.greaterThanOrEquals$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 13: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 34; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); - case 34: - // returning from await. - t1 = $async$temp1.lessThan$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 14: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 35; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); - case 35: - // returning from await. - t1 = $async$temp1.lessThanOrEquals$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 15: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 36; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); - case 36: - // returning from await. - t1 = $async$temp1.plus$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 16: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 37; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); - case 37: - // returning from await. - t1 = $async$temp1.minus$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 17: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 38; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); - case 38: - // returning from await. - t1 = $async$temp1.times$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 18: - // case - t3 = t1.right.accept$1(t2); - $async$temp1 = t2; - $async$temp2 = left; - $async$goto = 39; - return A._asyncAwait(type$.Future_Value._is(t3) ? t3 : A._Future$value(t3, type$.Value), $async$call$0); - case 39: - // returning from await. - t1 = $async$temp1._async_evaluate$_slash$3($async$temp2, $async$result, t1); - // goto after switch - $async$goto = 5; - break; - case 19: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 40; - return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); - case 40: - // returning from await. - t1 = $async$temp1.modulo$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 20: - // default - t1 = null; - case 5: - // after switch - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 76 - }; - A._EvaluateVisitor__slash_recommendation0.prototype = { - call$1(expression) { - var t1; - $label0$0: { - if (expression instanceof A.BinaryOperationExpression && B.BinaryOperator_U77 === expression.operator) { - t1 = "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; - break $label0$0; - } - if (expression instanceof A.ParenthesizedExpression) { - t1 = expression.expression.toString$0(0); - break $label0$0; - } - t1 = expression.toString$0(0); - break $label0$0; - } - return t1; - }, - $signature: 134 - }; - A._EvaluateVisitor_visitVariableExpression_closure0.prototype = { - call$0() { - var t1 = this.node; - return this.$this._async_evaluate$_environment.getVariable$2$namespace(t1.name, t1.namespace); - }, - $signature: 44 - }; - A._EvaluateVisitor_visitUnaryOperationExpression_closure0.prototype = { - call$0() { - var t1, _this = this; - switch (_this.node.operator) { - case B.UnaryOperator_cLp: - t1 = _this.operand.unaryPlus$0(); - break; - case B.UnaryOperator_AiQ: - t1 = _this.operand.unaryMinus$0(); - break; - case B.UnaryOperator_SJr: - t1 = new A.SassString("/" + A.serializeValue(_this.operand, false, true), false); - break; - case B.UnaryOperator_not_not_not: - t1 = _this.operand.unaryNot$0(); - break; - default: - t1 = null; - } - return t1; - }, - $signature: 38 - }; - A._EvaluateVisitor_visitListExpression_closure0.prototype = { - call$1(expression) { - return expression.accept$1(this.$this); - }, - $signature: 528 - }; - A._EvaluateVisitor_visitFunctionExpression_closure2.prototype = { - call$0() { - var t1 = this.node; - return this.$this._async_evaluate$_environment.getFunction$2$namespace(t1.name, t1.namespace); - }, - $signature: 93 - }; - A._EvaluateVisitor_visitFunctionExpression_closure3.prototype = { - call$1(argument) { - return argument.accept$1(B.C_IsCalculationSafeVisitor); - }, - $signature: 123 - }; - A._EvaluateVisitor_visitFunctionExpression_closure4.prototype = { - call$0() { - var t1 = this.node; - return this.$this._async_evaluate$_runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); - }, - $signature: 76 - }; - A._EvaluateVisitor__visitCalculation_closure0.prototype = { - call$2(message, deprecation) { - return this.$this._async_evaluate$_warn$3(message, this.node.span, deprecation); - }, - call$1(message) { - return this.call$2(message, null); - }, - $signature: 100 - }; - A._EvaluateVisitor__checkCalculationArguments_check0.prototype = { - call$1(maxArgs) { - var t1 = this.node, - t2 = t1.$arguments.positional.length; - if (t2 === 0) - throw A.wrapException(this.$this._async_evaluate$_exception$2("Missing argument.", t1.span)); - else if (maxArgs != null && t2 > maxArgs) - throw A.wrapException(this.$this._async_evaluate$_exception$2("Only " + A.S(maxArgs) + " " + A.pluralize("argument", maxArgs, null) + " allowed, but " + t2 + " " + A.pluralize("was", t2, "were") + " passed.", t1.span)); - }, - call$0() { - return this.call$1(null); - }, - $signature: 102 - }; - A._EvaluateVisitor__visitCalculationExpression_closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Object), - $async$returnValue, $async$self = this, t1, t2, t3, t4, $async$temp1, $async$temp2, $async$temp3; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self._box_0; - t3 = $async$self.node; - t4 = $async$self.inLegacySassFunction; - $async$temp1 = A; - $async$temp2 = t1._async_evaluate$_binaryOperatorToCalculationOperator$2(t2.operator, t3); - $async$goto = 3; - return A._asyncAwait(t1._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(t2.left, t4), $async$call$0); - case 3: - // returning from await. - $async$temp3 = $async$result; - $async$goto = 4; - return A._asyncAwait(t1._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(t2.right, t4), $async$call$0); - case 4: - // returning from await. - $async$returnValue = $async$temp1.SassCalculation_operateInternal($async$temp2, $async$temp3, $async$result, t4, !t1._async_evaluate$_inSupportsDeclaration, new A._EvaluateVisitor__visitCalculationExpression__closure0(t1, t3)); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 183 - }; - A._EvaluateVisitor__visitCalculationExpression__closure0.prototype = { - call$2(message, deprecation) { - return this.$this._async_evaluate$_warn$3(message, this.node.get$span(0), deprecation); - }, - call$1(message) { - return this.call$2(message, null); - }, - $signature: 100 - }; - A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure0.prototype = { - call$0() { - var t1 = this.node; - return this.$this._async_evaluate$_runFunctionCallable$3(t1.$arguments, this.$function, t1); - }, - $signature: 76 - }; - A._EvaluateVisitor__runUserDefinedCallable_closure0.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.callable, - t3 = _this.V; - return t1._async_evaluate$_withEnvironment$1$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure0(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, t3), t3); - }, - $signature() { - return this.V._eval$1("Future<0>()"); - } - }; - A._EvaluateVisitor__runUserDefinedCallable__closure0.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.V; - return t1._async_evaluate$_environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure0(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); - }, - $signature() { - return this.V._eval$1("Future<0>()"); - } - }; - A._EvaluateVisitor__runUserDefinedCallable___closure0.prototype = { - call$0() { - return this.$call$body$_EvaluateVisitor__runUserDefinedCallable___closure(this.V); - }, - $call$body$_EvaluateVisitor__runUserDefinedCallable___closure($async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, declaredArguments, t5, minLength, i, argument, t6, t7, value, t8, restArgument, rest, argumentList, result, argumentWord, t1, t2, t3, t4, $async$temp1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self.evaluated._values; - t3 = $async$self.callable.declaration.$arguments; - t4 = $async$self.nodeWithSpan; - t1._async_evaluate$_verifyArguments$4(J.get$length$asx(t2[2]), t2[0], t3, t4); - declaredArguments = t3.$arguments; - t5 = declaredArguments.length; - minLength = Math.min(J.get$length$asx(t2[2]), t5); - for (i = 0; i < minLength; ++i) - t1._async_evaluate$_environment.setLocalVariable$3(declaredArguments[i].name, J.$index$asx(t2[2], i), J.$index$asx(t2[3], i)); - i = J.get$length$asx(t2[2]); - case 3: - // for condition - if (!(i < t5)) { - // goto after for - $async$goto = 5; - break; - } - argument = declaredArguments[i]; - t6 = t2[0]; - t7 = argument.name; - value = t6.remove$1(0, t7); - $async$goto = value == null ? 6 : 7; - break; - case 6: - // then - t6 = argument.defaultValue; - $async$temp1 = t1; - $async$goto = 8; - return A._asyncAwait(t6.accept$1(t1), $async$call$0); - case 8: - // returning from await. - value = $async$temp1._async_evaluate$_withoutSlash$2($async$result, t1._async_evaluate$_expressionNode$1(t6)); - case 7: - // join - t6 = t1._async_evaluate$_environment; - t8 = t2[1].$index(0, t7); - if (t8 == null) { - t8 = argument.defaultValue; - t8.toString; - t8 = t1._async_evaluate$_expressionNode$1(t8); - } - t6.setLocalVariable$3(t7, value, t8); - case 4: - // for update - ++i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - restArgument = t3.restArgument; - if (restArgument != null) { - rest = J.get$length$asx(t2[2]) > t5 ? J.sublist$1$ax(t2[2], t5) : B.List_empty8; - t5 = t2[0]; - t6 = t2[4]; - argumentList = A.SassArgumentList$(rest, t5, t6 === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_ECn : t6); - t1._async_evaluate$_environment.setLocalVariable$3(restArgument, argumentList, t4); - } else - argumentList = null; - $async$goto = 9; - return A._asyncAwait($async$self.run.call$0(), $async$call$0); - case 9: - // returning from await. - result = $async$result; - if (argumentList == null) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - t5 = t2[0]; - if (t5.get$isEmpty(t5)) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - if (argumentList._wereKeywordsAccessed) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - t5 = t2[0]; - argumentWord = A.pluralize("argument", J.get$length$asx(t5.get$keys(t5)), null); - t2 = t2[0]; - throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + argumentWord + " named " + A.toSentence(J.map$1$1$ax(t2.get$keys(t2), new A._EvaluateVisitor__runUserDefinedCallable____closure0(), type$.Object), "or") + ".", t4.get$span(t4), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t3.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._async_evaluate$_stackTrace$1(t4.get$span(t4)), null)); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature() { - return this.V._eval$1("Future<0>()"); - } - }; - A._EvaluateVisitor__runUserDefinedCallable____closure0.prototype = { - call$1($name) { - return "$" + $name; - }, - $signature: 6 - }; - A._EvaluateVisitor__runFunctionCallable_closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value), - $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, $returnValue; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = $async$self.$this, _i = 0; - case 3: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 5; - break; - } - $async$goto = 6; - return A._asyncAwait(t2[_i].accept$1(t4), $async$call$0); - case 6: - // returning from await. - $returnValue = $async$result; - if ($returnValue instanceof A.Value) { - $async$returnValue = $returnValue; - // goto return - $async$goto = 1; - break; - } - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - throw A.wrapException(t4._async_evaluate$_exception$2("Function finished without @return.", t1.span)); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 76 - }; - A._EvaluateVisitor__runBuiltInCallable_closure2.prototype = { - call$0() { - return this._box_0.overload.verify$2(J.get$length$asx(this.evaluated._values[2]), this.namedSet); - }, - $signature: 0 - }; - A._EvaluateVisitor__runBuiltInCallable_closure3.prototype = { - call$0() { - return this._box_0.callback.call$1(this.evaluated._values[2]); - }, - $signature: 544 - }; - A._EvaluateVisitor__runBuiltInCallable_closure4.prototype = { - call$1($name) { - return "$" + $name; - }, - $signature: 6 - }; - A._EvaluateVisitor__evaluateArguments_closure3.prototype = { - call$1(value) { - return value; - }, - $signature: 42 - }; - A._EvaluateVisitor__evaluateArguments_closure4.prototype = { - call$1(value) { - return this.$this._async_evaluate$_withoutSlash$2(value, this.restNodeForSpan); - }, - $signature: 42 - }; - A._EvaluateVisitor__evaluateArguments_closure5.prototype = { - call$2(key, value) { - var _this = this, - t1 = _this.restNodeForSpan; - _this.named.$indexSet(0, key, _this.$this._async_evaluate$_withoutSlash$2(value, t1)); - _this.namedNodes.$indexSet(0, key, t1); - }, - $signature: 106 - }; - A._EvaluateVisitor__evaluateArguments_closure6.prototype = { - call$1(value) { - return value; - }, - $signature: 42 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure3.prototype = { - call$1(value) { - var t1 = this.restArgs; - return new A.ValueExpression(value, t1.get$span(t1)); - }, - $signature: 62 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure4.prototype = { - call$1(value) { - var t1 = this.restArgs; - return new A.ValueExpression(this.$this._async_evaluate$_withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); - }, - $signature: 62 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure5.prototype = { - call$2(key, value) { - var _this = this, - t1 = _this.restArgs; - _this.named.$indexSet(0, key, new A.ValueExpression(_this.$this._async_evaluate$_withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); - }, - $signature: 106 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure6.prototype = { - call$1(value) { - var t1 = this.keywordRestArgs; - return new A.ValueExpression(this.$this._async_evaluate$_withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); - }, - $signature: 62 - }; - A._EvaluateVisitor__addRestMap_closure0.prototype = { - call$2(key, value) { - var t2, _this = this, - t1 = _this.$this; - if (key instanceof A.SassString) - _this.values.$indexSet(0, key._string$_text, _this.convert.call$1(t1._async_evaluate$_withoutSlash$2(value, _this.expressionNode))); - else { - t2 = _this.nodeWithSpan; - throw A.wrapException(t1._async_evaluate$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); - } - }, - $signature: 95 - }; - A._EvaluateVisitor__verifyArguments_closure0.prototype = { - call$0() { - return this.$arguments.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); - }, - $signature: 0 - }; - A._EvaluateVisitor_visitCssAtRule_closure1.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, t4; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - t4 = t1.__internal$_current; - $async$goto = 4; - return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); - case 4: - // returning from await. - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssAtRule_closure2.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitCssKeyframeBlock_closure1.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, t4; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - t4 = t1.__internal$_current; - $async$goto = 4; - return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); - case 4: - // returning from await. - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssKeyframeBlock_closure2.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitCssMediaRule_closure2.prototype = { - call$1(mediaQueries) { - return this.$this._async_evaluate$_mergeMediaQueries$2(mediaQueries, this.node.queries); - }, - $signature: 80 - }; - A._EvaluateVisitor_visitCssMediaRule_closure3.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self.mergedQueries; - if (t2 == null) - t2 = $async$self.node.queries; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssMediaRule__closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t2, t3, t4, t1, _0_0; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - _0_0 = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; - $async$goto = _0_0 != null ? 2 : 4; - break; - case 2: - // then - $async$goto = 5; - return A._asyncAwait(t1._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure0(t1, $async$self.node), false, type$.ModifiableCssStyleRule, type$.Null), $async$call$0); - case 5: - // returning from await. - // goto join - $async$goto = 3; - break; - case 4: - // else - t2 = $async$self.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); - case 6: - // for condition - if (!t2.moveNext$0()) { - // goto after for - $async$goto = 7; - break; - } - t4 = t2.__internal$_current; - $async$goto = 8; - return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); - case 8: - // returning from await. - // goto for condition - $async$goto = 6; - break; - case 7: - // after for - case 3: - // join - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssMediaRule___closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, t4; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - t4 = t1.__internal$_current; - $async$goto = 4; - return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); - case 4: - // returning from await. - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssMediaRule_closure4.prototype = { - call$1(node) { - var t1; - if (!(node instanceof A.ModifiableCssStyleRule)) { - t1 = this.mergedSources; - t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); - } else - t1 = true; - return t1; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitCssStyleRule_closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitCssStyleRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssStyleRule__closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, t4; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - t4 = t1.__internal$_current; - $async$goto = 4; - return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); - case 4: - // returning from await. - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssStyleRule_closure1.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitCssSupportsRule_closure1.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t2, t3, t4, t1, _0_0; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - _0_0 = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; - $async$goto = _0_0 != null ? 2 : 4; - break; - case 2: - // then - $async$goto = 5; - return A._asyncAwait(t1._async_evaluate$_withParent$2$2(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure0(t1, $async$self.node), type$.ModifiableCssStyleRule, type$.Null), $async$call$0); - case 5: - // returning from await. - // goto join - $async$goto = 3; - break; - case 4: - // else - t2 = $async$self.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); - case 6: - // for condition - if (!t2.moveNext$0()) { - // goto after for - $async$goto = 7; - break; - } - t4 = t2.__internal$_current; - $async$goto = 8; - return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); - case 8: - // returning from await. - // goto for condition - $async$goto = 6; - break; - case 7: - // after for - case 3: - // join - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssSupportsRule__closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, t4; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - t4 = t1.__internal$_current; - $async$goto = 4; - return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); - case 4: - // returning from await. - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssSupportsRule_closure2.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor__performInterpolationHelper_closure0.prototype = { - call$1(targetLocations) { - return A.InterpolationMap$(this.interpolation, targetLocations); - }, - $signature: 185 - }; - A._EvaluateVisitor__serialize_closure0.prototype = { - call$0() { - return A.serializeValue(this.value, false, this.quote); - }, - $signature: 30 - }; - A._EvaluateVisitor__expressionNode_closure0.prototype = { - call$0() { - var t1 = this.expression; - return this.$this._async_evaluate$_environment.getVariableNode$2$namespace(t1.name, t1.namespace); - }, - $signature: 142 - }; - A._EvaluateVisitor__withoutSlash_recommendation0.prototype = { - call$1(number) { - var before, after, t1, - _1_0 = number.asSlash; - $label0$0: { - if (type$.Record_2_nullable_Object_and_nullable_Object._is(_1_0)) { - before = _1_0._0; - after = _1_0._1; - t1 = "math.div(" + A.S(this.call$1(before)) + ", " + A.S(this.call$1(after)) + ")"; - break $label0$0; - } - t1 = A.serializeValue(number, true, true); - break $label0$0; - } - return t1; - }, - $signature: 187 - }; - A._EvaluateVisitor__stackFrame_closure0.prototype = { - call$1(url) { - var t1 = this.$this._async_evaluate$_importCache; - t1 = t1 == null ? null : t1.humanize$1(url); - return t1 == null ? url : t1; - }, - $signature: 47 - }; - A._ImportedCssVisitor0.prototype = { - visitCssAtRule$1(node) { - var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure0(); - this._async_evaluate$_visitor._async_evaluate$_addChild$2$through(node, t1); - }, - visitCssComment$1(node) { - return this._async_evaluate$_visitor._async_evaluate$_addChild$1(node); - }, - visitCssDeclaration$1(node) { - }, - visitCssImport$1(node) { - var t2, - _s13_ = "_endOfImports", - t1 = this._async_evaluate$_visitor; - if (t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__parent, "__parent") !== t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__root, "_root")) - t1._async_evaluate$_addChild$1(node); - else if (t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__endOfImports, _s13_) === J.get$length$asx(t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__root, "_root").children._collection$_source)) { - t1._async_evaluate$_addChild$1(node); - t1._async_evaluate$__endOfImports = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__endOfImports, _s13_) + 1; - } else { - t2 = t1._async_evaluate$_outOfOrderImports; - (t2 == null ? t1._async_evaluate$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t2).push(node); - } - }, - visitCssKeyframeBlock$1(node) { - }, - visitCssMediaRule$1(node) { - var t1 = this._async_evaluate$_visitor, - mediaQueries = t1._async_evaluate$_mediaQueries; - t1._async_evaluate$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure0(mediaQueries == null || t1._async_evaluate$_mergeMediaQueries$2(mediaQueries, node.queries) != null)); - }, - visitCssStyleRule$1(node) { - return this._async_evaluate$_visitor._async_evaluate$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure0()); - }, - visitCssStylesheet$1(node) { - var t1, t2, t3; - for (t1 = node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t3 = t1.__internal$_current; - (t3 == null ? t2._as(t3) : t3).accept$1(this); - } - }, - visitCssSupportsRule$1(node) { - return this._async_evaluate$_visitor._async_evaluate$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure0()); - } - }; - A._ImportedCssVisitor_visitCssAtRule_closure0.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._ImportedCssVisitor_visitCssMediaRule_closure0.prototype = { - call$1(node) { - var t1; - if (!(node instanceof A.ModifiableCssStyleRule)) - t1 = this.hasBeenMerged && node instanceof A.ModifiableCssMediaRule; - else - t1 = true; - return t1; - }, - $signature: 7 - }; - A._ImportedCssVisitor_visitCssStyleRule_closure0.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._ImportedCssVisitor_visitCssSupportsRule_closure0.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluationContext0.prototype = { - get$currentCallableSpan() { - var _0_0 = this._async_evaluate$_visitor._async_evaluate$_callableNode; - if (_0_0 != null) - return _0_0.get$span(_0_0); - throw A.wrapException(A.StateError$(string$.No_Sasc)); - }, - warn$2(_, message, deprecation) { - var t1 = this._async_evaluate$_visitor, - t2 = t1._async_evaluate$_importSpan; - if (t2 == null) { - t2 = t1._async_evaluate$_callableNode; - t2 = t2 == null ? null : t2.get$span(t2); - } - t1._async_evaluate$_warn$3(message, t2 == null ? this._async_evaluate$_defaultWarnNodeWithSpan.span : t2, deprecation); - }, - $isEvaluationContext: 1 - }; - A._CloneCssVisitor.prototype = { - visitCssAtRule$1(node) { - var t1 = node.isChildless, - rule = A.ModifiableCssAtRule$(node.name, node.span, t1, node.value); - return t1 ? rule : this._visitChildren$2(rule, node); - }, - visitCssComment$1(node) { - return new A.ModifiableCssComment(node.text, node.span); - }, - visitCssDeclaration$1(node) { - return A.ModifiableCssDeclaration$(node.name, node.value, node.span, null, node.parsedAsCustomProperty, null, node.valueSpanForMap); - }, - visitCssImport$1(node) { - return new A.ModifiableCssImport(node.url, node.modifiers, node.span); - }, - visitCssKeyframeBlock$1(node) { - return this._visitChildren$2(A.ModifiableCssKeyframeBlock$(node.selector, node.span), node); - }, - visitCssMediaRule$1(node) { - return this._visitChildren$2(A.ModifiableCssMediaRule$(node.queries, node.span), node); - }, - visitCssStyleRule$1(node) { - var _0_0 = this._oldToNewSelectors.$index(0, node._style_rule$_selector._box$_inner.value); - if (_0_0 != null) - return this._visitChildren$2(A.ModifiableCssStyleRule$(_0_0, node.span, false, node.originalSelector), node); - else - throw A.wrapException(A.StateError$(string$.The_Ex)); - }, - visitCssStylesheet$1(node) { - return this._visitChildren$2(A.ModifiableCssStylesheet$(node.get$span(node)), node); - }, - visitCssSupportsRule$1(node) { - return this._visitChildren$2(A.ModifiableCssSupportsRule$(node.condition, node.span), node); - }, - _visitChildren$1$2(newParent, oldParent) { - var t1, t2, newChild; - for (t1 = J.get$iterator$ax(oldParent.get$children(oldParent)); t1.moveNext$0();) { - t2 = t1.get$current(t1); - newChild = t2.accept$1(this); - newChild.isGroupEnd = t2.get$isGroupEnd(); - newParent.addChild$1(newChild); - } - return newParent; - }, - _visitChildren$2(newParent, oldParent) { - return this._visitChildren$1$2(newParent, oldParent, type$.ModifiableCssParentNode); - } - }; - A.Evaluator.prototype = {}; - A._EvaluateVisitor.prototype = { - _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { - var t2, metaModule, t3, _i, module, $function, t4, _this = this, - _s20_ = "$name, $module: null", - _s9_ = "sass:meta", - _s7_ = "$module", - t1 = type$.JSArray_BuiltInCallable, - metaFunctions = A._setArrayType([A.BuiltInCallable$function("global-variable-exists", _s20_, new A._EvaluateVisitor_closure(_this), _s9_), A.BuiltInCallable$function("variable-exists", "$name", new A._EvaluateVisitor_closure0(_this), _s9_), A.BuiltInCallable$function("function-exists", _s20_, new A._EvaluateVisitor_closure1(_this), _s9_), A.BuiltInCallable$function("mixin-exists", _s20_, new A._EvaluateVisitor_closure2(_this), _s9_), A.BuiltInCallable$function("content-exists", "", new A._EvaluateVisitor_closure3(_this), _s9_), A.BuiltInCallable$function("module-variables", _s7_, new A._EvaluateVisitor_closure4(_this), _s9_), A.BuiltInCallable$function("module-functions", _s7_, new A._EvaluateVisitor_closure5(_this), _s9_), A.BuiltInCallable$function("module-mixins", _s7_, new A._EvaluateVisitor_closure6(_this), _s9_), A.BuiltInCallable$function("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure7(_this), _s9_), A.BuiltInCallable$function("get-mixin", _s20_, new A._EvaluateVisitor_closure8(_this), _s9_), A.BuiltInCallable$function("call", "$function, $args...", new A._EvaluateVisitor_closure9(_this), _s9_)], t1), - metaMixins = A._setArrayType([A.BuiltInCallable$mixin("load-css", "$url, $with: null", new A._EvaluateVisitor_closure10(_this), false, _s9_), A.BuiltInCallable$mixin("apply", "$mixin, $args...", new A._EvaluateVisitor_closure11(_this), true, _s9_)], t1); - t1 = type$.BuiltInCallable; - t2 = A.List_List$of($.$get$moduleFunctions(), true, t1); - B.JSArray_methods.addAll$1(t2, metaFunctions); - metaModule = A.BuiltInModule$("meta", t2, metaMixins, null, t1); - for (t1 = A.List_List$of($.$get$coreModules(), true, type$.BuiltInModule_Callable), t1.push(metaModule), t2 = t1.length, t3 = _this._builtInModules, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - module = t1[_i]; - t3.$indexSet(0, module.url, module); - } - t1 = type$.JSArray_Callable; - t2 = A._setArrayType([], t1); - B.JSArray_methods.addAll$1(t2, $.$get$globalFunctions()); - t1 = A._setArrayType([], t1); - for (_i = 0; _i < 11; ++_i) - t1.push(metaFunctions[_i].withDeprecationWarning$1("meta")); - B.JSArray_methods.addAll$1(t2, t1); - for (t1 = t2.length, t3 = _this._builtInFunctions, _i = 0; _i < t2.length; t2.length === t1 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - $function = t2[_i]; - t4 = J.get$name$x($function); - t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); - } - }, - run$2(_, importer, node) { - var error, stackTrace, t1, exception; - try { - t1 = type$.nullable_Object; - t1 = A.runZoned(new A._EvaluateVisitor_run_closure(this, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext(this, node)], t1, t1), type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace(error.withLoadedUrls$1(this._loadedUrls), error, stackTrace); - } else - throw exception; - } - }, - runExpression$2(importer, expression) { - var t1 = type$.nullable_Object; - return A.runZoned(new A._EvaluateVisitor_runExpression_closure(this, importer, expression), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext(this, expression)], t1, t1), type$.Value); - }, - runStatement$2(importer, statement) { - var t1 = type$.nullable_Object; - return A.runZoned(new A._EvaluateVisitor_runStatement_closure(this, importer, statement), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext(this, statement)], t1, t1), type$.void); - }, - _assertInModule$1$2(value, $name) { - if (value != null) - return value; - throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); - }, - _assertInModule$2(value, $name) { - return this._assertInModule$1$2(value, $name, type$.dynamic); - }, - _withFakeStylesheet$1$3(importer, nodeWithSpan, callback) { - var t1, _this = this, - oldImporter = _this._importer; - _this._importer = importer; - _this.__stylesheet = A.Stylesheet$(B.List_empty13, nodeWithSpan.get$span(nodeWithSpan)); - try { - t1 = callback.call$0(); - return t1; - } finally { - _this._importer = oldImporter; - _this.__stylesheet = null; - } - }, - _withFakeStylesheet$3(importer, nodeWithSpan, callback) { - return this._withFakeStylesheet$1$3(importer, nodeWithSpan, callback, type$.dynamic); - }, - _loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { - var t2, _this = this, t1 = {}, - _0_0 = _this._builtInModules.$index(0, url); - t1.builtInModule = null; - if (_0_0 != null) { - t1.builtInModule = _0_0; - if (configuration instanceof A.ExplicitConfiguration) { - t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; - t2 = configuration.nodeWithSpan; - throw A.wrapException(_this._evaluate$_exception$2(t1, t2.get$span(t2))); - } - _this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure(t1, callback)); - return; - } - _this._withStackFrame$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure0(_this, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback)); - }, - _loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { - return this._loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); - }, - _loadModule$4(url, stackFrame, nodeWithSpan, callback) { - return this._loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); - }, - _execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { - var _0_0, currentConfiguration, t2, t3, message, existingSpan, configurationSpan, environment, css, preModuleComments, extensionStore, module, _this = this, - t1 = stylesheet.span, - url = t1.get$sourceUrl(t1); - t1 = _this._modules; - _0_0 = t1.$index(0, url); - if (_0_0 != null) { - t1 = configuration == null; - currentConfiguration = t1 ? _this._configuration : configuration; - t2 = _this._moduleConfigurations.$index(0, url); - t3 = t2.__originalConfiguration; - t2 = t3 == null ? t2 : t3; - t3 = currentConfiguration.__originalConfiguration; - if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration) { - if (namesInErrors) { - t2 = $.$get$context(); - url.toString; - message = t2.prettyUri$1(url) + string$.x20was_a; - } else - message = string$.This_mw; - t2 = _this._moduleNodes.$index(0, url); - existingSpan = t2 == null ? null : t2.get$span(t2); - if (t1) { - t1 = currentConfiguration.nodeWithSpan; - configurationSpan = t1.get$span(t1); - } else - configurationSpan = null; - t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - if (existingSpan != null) - t1.$indexSet(0, existingSpan, "original load"); - if (configurationSpan != null) - t1.$indexSet(0, configurationSpan, "configuration"); - throw A.wrapException(t1.get$isEmpty(0) ? _this._evaluate$_exception$1(message) : _this._multiSpanException$3(message, "new load", t1)); - } - return _0_0; - } - environment = A.Environment$(); - css = A._Cell$(); - preModuleComments = A._Cell$(); - extensionStore = A.ExtensionStore$(); - _this._withEnvironment$2(environment, new A._EvaluateVisitor__execute_closure(_this, importer, stylesheet, extensionStore, configuration, css, preModuleComments)); - t2 = css._readLocal$0(); - t3 = preModuleComments._readLocal$0(); - module = environment.toModule$3(t2, t3 == null ? B.Map_empty0 : t3, extensionStore); - if (url != null) { - t1.$indexSet(0, url, module); - _this._moduleConfigurations.$indexSet(0, url, _this._configuration); - if (nodeWithSpan != null) - _this._moduleNodes.$indexSet(0, url, nodeWithSpan); - } - return module; - }, - _execute$2(importer, stylesheet) { - return this._execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); - }, - _addOutOfOrderImports$0() { - var t1, t2, _this = this, _s5_ = "_root", - _s13_ = "_endOfImports", - _0_0 = _this._outOfOrderImports; - $label0$0: { - if (_0_0 == null) { - t1 = _this._assertInModule$2(_this.__root, _s5_).children; - break $label0$0; - } - t1 = _this._assertInModule$2(_this.__root, _s5_).children; - t1 = A.List_List$of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._assertInModule$2(_this.__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListBase.E")), true, type$.ModifiableCssNode); - B.JSArray_methods.addAll$1(t1, _0_0); - t2 = _this._assertInModule$2(_this.__root, _s5_).children; - B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._assertInModule$2(_this.__endOfImports, _s13_), null, t2.$ti._eval$1("ListBase.E"))); - break $label0$0; - } - return t1; - }, - _combineCss$2$clone(root, clone) { - var selectors, _0_0, t1, imports, css, sorted, t2; - if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure())) { - selectors = root.get$extensionStore().get$simpleSelectors(); - _0_0 = A.IterableExtension_get_firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure0(selectors))); - if (_0_0 != null) - this._throwForUnsatisfiedExtension$1(_0_0); - return root.get$css(root); - } - t1 = type$.JSArray_CssNode; - imports = A._setArrayType([], t1); - css = A._setArrayType([], t1); - t1 = type$.Module_Callable; - sorted = A.ListQueue$(t1); - new A._EvaluateVisitor__combineCss_visitModule(this, A.LinkedHashSet_LinkedHashSet$_empty(t1), clone, css, imports, sorted).call$1(root); - if (root.get$transitivelyContainsExtensions()) - this._extendModules$1(sorted); - t1 = B.JSArray_methods.$add(imports, css); - t2 = root.get$css(root); - return new A.CssStylesheet(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode), t2.get$span(t2)); - }, - _combineCss$1(root) { - return this._combineCss$2$clone(root, false); - }, - _extendModules$1(sortedModules) { - var t1, t2, t3, originalSelectors, $self, t4, t5, _i, upstream, _0_0, - downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore), - unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension); - for (t1 = A._ListQueueIterator$(sortedModules, sortedModules.$ti._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { - t3 = t1._collection$_current; - if (t3 == null) - t3 = t2._as(t3); - originalSelectors = t3.get$extensionStore().get$simpleSelectors().toSet$0(0); - unsatisfiedExtensions.addAll$1(0, t3.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure(originalSelectors))); - $self = downstreamExtensionStores.$index(0, t3.get$url(t3)); - t4 = t3.get$extensionStore().get$addExtensions(); - if ($self != null) - t4.call$1($self); - t4 = t3.get$extensionStore(); - if (t4.get$isEmpty(t4)) - continue; - for (t4 = t3.get$upstream(), t5 = t4.length, _i = 0; _i < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i) { - upstream = t4[_i]; - _0_0 = upstream.get$url(upstream); - if (_0_0 != null) - J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(_0_0, new A._EvaluateVisitor__extendModules_closure0()), t3.get$extensionStore()); - } - unsatisfiedExtensions.removeAll$1(t3.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); - } - if (unsatisfiedExtensions._collection$_length !== 0) - this._throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(0)); - }, - _throwForUnsatisfiedExtension$1(extension) { - throw A.wrapException(A.SassException$(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span, null)); - }, - _indexAfterImports$1(statements) { - var t1, lastImport, i, _0_0; - for (t1 = J.getInterceptor$asx(statements), lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { - $label0$0: { - _0_0 = t1.$index(statements, i); - if (_0_0 instanceof A.ModifiableCssImport) - break $label0$0; - if (_0_0 instanceof A.ModifiableCssComment) - continue; - break; - } - lastImport = i; - } - return lastImport + 1; - }, - visitStylesheet$1(_, node) { - var t1, t2, warning, _i, $name, span; - for (t1 = node.parseTimeWarnings, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - warning = t1.__internal$_current; - if (warning == null) - warning = t2._as(warning); - this._warn$3(warning._1, warning._2, warning._0); - } - for (t1 = node.children, t2 = t1.length, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(this); - for (t1 = A.MapExtensions_get_pairs(node.globalVariables, type$.String, type$.FileSpan), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t2 = t1.get$current(t1); - $name = t2._0; - span = t2._1; - this.visitVariableDeclaration$1(0, new A.VariableDeclaration(null, $name, new A.NullExpression(span), true, false, span)); - } - return null; - }, - visitAtRootRule$1(_, node) { - var t1, _2_0, root, first, rest, innerCopy, outerCopy, _i, copy, _this = this, _null = null, - _s8_ = "__parent", - _0_0 = node.query, - query = _0_0 != null ? new A.AtRootQueryParser(A.SpanScanner$(_this._performInterpolationWithMap$2$warnForColor(_0_0, true)._0, _null), _null).parse$0(0) : B.AtRootQuery_n2q, - $parent = _this._assertInModule$2(_this.__parent, _s8_), - included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode); - for (t1 = type$.CssStylesheet; !t1._is($parent); $parent = _2_0) { - if (!query.excludes$1($parent)) - included.push($parent); - _2_0 = $parent._parent; - if (_2_0 == null) - throw A.wrapException(A.StateError$(string$.CssNod)); - } - root = _this._trimIncluded$1(included); - if (root === _this._assertInModule$2(_this.__parent, _s8_)) { - _this._environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure(_this, node), node.hasDeclarations, type$.Null); - return _null; - } - if (included.length >= 1) { - first = included[0]; - rest = B.JSArray_methods.sublist$1(included, 1); - innerCopy = first.copyWithoutChildren$0(); - for (t1 = rest.length, outerCopy = innerCopy, _i = 0; _i < rest.length; rest.length === t1 || (0, A.throwConcurrentModificationError)(rest), ++_i, outerCopy = copy) { - copy = rest[_i].copyWithoutChildren$0(); - copy.addChild$1(outerCopy); - } - root.addChild$1(outerCopy); - } else - innerCopy = root; - _this._scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure0(_this, node)); - return _null; - }, - _trimIncluded$1(nodes) { - var $parent, t1, innermostContiguous, i, t2, _0_0, _1_0, root, _this = this, _null = null, _s5_ = "_root", - _s22_ = " to be an ancestor of "; - if (nodes.length === 0) - return _this._assertInModule$2(_this.__root, _s5_); - $parent = _this._assertInModule$2(_this.__parent, "__parent"); - for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = _1_0) { - for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = _0_0) { - _0_0 = $parent._parent; - if (_0_0 == null) - throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); - } - if (innermostContiguous == null) - innermostContiguous = i; - _1_0 = $parent._parent; - if (_1_0 == null) - throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); - } - if ($parent !== _this._assertInModule$2(_this.__root, _s5_)) - return _this._assertInModule$2(_this.__root, _s5_); - innermostContiguous.toString; - root = nodes[innermostContiguous]; - B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); - return root; - }, - _scopeForAtRoot$4(node, newParent, query, included) { - var _this = this, - scope = new A._EvaluateVisitor__scopeForAtRoot_closure(_this, newParent, node), - t1 = query._all || query._at_root_query$_rule; - if (t1 !== query.include) - scope = new A._EvaluateVisitor__scopeForAtRoot_closure0(_this, scope); - if (_this._mediaQueries != null && query.excludesName$1("media")) - scope = new A._EvaluateVisitor__scopeForAtRoot_closure1(_this, scope); - if (_this._inKeyframes && query.excludesName$1("keyframes")) - scope = new A._EvaluateVisitor__scopeForAtRoot_closure2(_this, scope); - return _this._inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure3()) ? new A._EvaluateVisitor__scopeForAtRoot_closure4(_this, scope) : scope; - }, - visitContentBlock$1(_, node) { - return A.throwExpression(A.UnsupportedError$(string$.Evalua)); - }, - visitContentRule$1(_, node) { - var $content = this._environment._content; - if ($content == null) - return null; - this._runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure(this, $content), type$.Null); - return null; - }, - visitDebugRule$1(_, node) { - var value = node.expression.accept$1(this), - t1 = value instanceof A.SassString ? value._string$_text : A.serializeValue(value, true, true); - this._logger.debug$2(0, t1, node.span); - return null; - }, - visitDeclaration$1(_, node) { - var siblings, interleavedRules, t1, t2, t3, t4, t5, t6, rule, rule0, $name, _1_0, _2_0, value, _3_0, oldDeclarationName, _this = this, _null = null, - _s8_ = "__parent", - _box_0 = {}; - if ((_this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot) == null && !_this._inUnknownAtRule && !_this._inKeyframes) - throw A.wrapException(_this._evaluate$_exception$2(string$.Declarm, node.span)); - if (_this._declarationName != null && B.JSString_methods.startsWith$1(node.name.get$initialPlain(), "--")) - throw A.wrapException(_this._evaluate$_exception$2(string$.Declarw, node.span)); - siblings = _this._assertInModule$2(_this.__parent, _s8_)._parent.children; - interleavedRules = A._setArrayType([], type$.JSArray_CssStyleRule); - if (siblings.get$last(siblings) !== _this._assertInModule$2(_this.__parent, _s8_)) { - if (_this._quietDeps) - if (!_this._inDependency) { - t1 = _this._currentCallable; - t1 = t1 == null ? _null : t1.inDependency; - t1 = t1 === true; - } else - t1 = true; - else - t1 = false; - t1 = !t1; - } else - t1 = false; - if (t1) - for (t1 = A.SubListIterable$(siblings, siblings.indexOf$1(siblings, _this._assertInModule$2(_this.__parent, _s8_)) + 1, _null, siblings.$ti._eval$1("ListBase.E")), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { - t6 = t1.__internal$_current; - rule = t6 == null ? t2._as(t6) : t6; - $label0$1: { - if (rule instanceof A.ModifiableCssComment) - continue; - t6 = rule instanceof A.ModifiableCssStyleRule; - rule0 = t6 ? rule : _null; - if (t6) { - interleavedRules.push(rule0); - break $label0$1; - } - _this._warn$3(string$.Sassx27s, new A.MultiSpan(t3, "declaration", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rule.get$span(rule), "nested rule"], t4, t5), t4, t5)), B.Deprecation_u1l); - B.JSArray_methods.clear$0(interleavedRules); - break $label0$1; - } - } - t1 = node.name; - $name = _this._interpolationToValue$2$warnForColor(t1, true); - _1_0 = _this._declarationName; - if (_1_0 != null) - $name = new A.CssValue(_1_0 + "-" + A.S($name.value), $name.span, type$.CssValue_String); - _2_0 = node.value; - if (_2_0 != null) { - value = _2_0.accept$1(_this); - if (!value.get$isBlank() || value.get$asList().length === 0) { - t2 = _this._assertInModule$2(_this.__parent, _s8_); - t3 = _2_0.get$span(_2_0); - t4 = node.span; - t1 = B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--"); - t5 = interleavedRules.length === 0 ? _null : _this._evaluate$_stackTrace$1(t4); - if (_this._sourceMap) { - t6 = A.NullableExtension_andThen(_2_0, _this.get$_expressionNode()); - t6 = t6 == null ? _null : J.get$span$z(t6); - } else - t6 = _null; - t2.addChild$1(A.ModifiableCssDeclaration$($name, new A.CssValue(value, t3, type$.CssValue_Value), t4, interleavedRules, t1, t5, t6)); - } else if (J.startsWith$1$s($name.value, "--")) - throw A.wrapException(_this._evaluate$_exception$2("Custom property values may not be empty.", _2_0.get$span(_2_0))); - } - _3_0 = node.children; - _box_0.children = null; - if (_3_0 != null) { - _box_0.children = _3_0; - oldDeclarationName = _this._declarationName; - _this._declarationName = $name.value; - _this._environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure(_box_0, _this), node.hasDeclarations, type$.Null); - _this._declarationName = oldDeclarationName; - } - return _null; - }, - visitEachRule$1(_, node) { - var _this = this, _box_0 = {}, - t1 = node.list, - list = t1.accept$1(_this), - nodeWithSpan = _this._expressionNode$1(t1), - _0_0 = node.variables; - $label0$0: { - _box_0.variable = null; - if (_0_0.length === 1) { - _box_0.variable = _0_0[0]; - t1 = new A._EvaluateVisitor_visitEachRule_closure(_box_0, _this, nodeWithSpan); - break $label0$0; - } - _box_0.variables = null; - _box_0.variables = _0_0; - t1 = new A._EvaluateVisitor_visitEachRule_closure0(_box_0, _this, nodeWithSpan); - break $label0$0; - } - return _this._environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure1(_this, list, t1, node), true, type$.nullable_Value); - }, - _setMultipleVariables$3(variables, value, nodeWithSpan) { - var i, - list = value.get$asList(), - t1 = variables.length, - minLength = Math.min(t1, list.length); - for (i = 0; i < minLength; ++i) - this._environment.setLocalVariable$3(variables[i], this._withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); - for (i = minLength; i < t1; ++i) - this._environment.setLocalVariable$3(variables[i], B.C__SassNull, nodeWithSpan); - }, - visitErrorRule$1(_, node) { - throw A.wrapException(this._evaluate$_exception$2(J.toString$0$(node.expression.accept$1(this)), node.span)); - }, - visitExtendRule$1(_, node) { - var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, _0_0, compound, _this = this, _null = null, - styleRule = _this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot; - if (styleRule == null || _this._declarationName != null) - throw A.wrapException(_this._evaluate$_exception$2(string$.x40exten, node.span)); - for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - if (!complex.accept$1(B._IsBogusVisitor_true)) - continue; - visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - t6 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); - t7 = complex.accept$1(B.C__IsUselessVisitor) ? "can't" : "shouldn't"; - _this._warn$3('The selector "' + t6 + '" is invalid CSS and ' + t7 + string$.x20be_an, new A.MultiSpan(A.SpanExtensions_trimRight(complex.span), "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t3, "@extend rule"], t4, t5), t4, t5)), B.Deprecation_C9i); - } - _0_0 = _this._performInterpolationWithMap$2$warnForColor(node.selector, true); - for (t1 = A.SelectorList_SelectorList$parse(A.trimAscii(_0_0._0, true), false, _0_0._1, false).components, t2 = t1.length, t3 = styleRule._style_rule$_selector._box$_inner, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - compound = complex.get$singleCompound(); - if (compound == null) - throw A.wrapException(A.SassFormatException$("complex selectors may not be extended.", complex.span, _null)); - t4 = compound.components; - t5 = t4.length === 1 ? B.JSArray_methods.get$first(t4) : _null; - if (t5 == null) - throw A.wrapException(A.SassFormatException$(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, compound.span, _null)); - _this._assertInModule$2(_this.__extensionStore, "_extensionStore").addExtension$4(t3.value, t5, node, _this._mediaQueries); - } - return _null; - }, - visitAtRule$1(_, node) { - var $name, value, children, wasInKeyframes, wasInUnknownAtRule, _this = this; - if (_this._declarationName != null) - throw A.wrapException(_this._evaluate$_exception$2(string$.At_rul, node.span)); - $name = _this._interpolationToValue$1(node.name); - value = A.NullableExtension_andThen(node.value, new A._EvaluateVisitor_visitAtRule_closure(_this)); - children = node.children; - if (children == null) { - _this._assertInModule$2(_this.__parent, "__parent").addChild$1(A.ModifiableCssAtRule$($name, node.span, true, value)); - return null; - } - wasInKeyframes = _this._inKeyframes; - wasInUnknownAtRule = _this._inUnknownAtRule; - if (A.unvendor($name.value) === "keyframes") - _this._inKeyframes = true; - else - _this._inUnknownAtRule = true; - _this._withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$($name, node.span, false, value), new A._EvaluateVisitor_visitAtRule_closure0(_this, $name, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure1(), type$.ModifiableCssAtRule, type$.Null); - _this._inUnknownAtRule = wasInUnknownAtRule; - _this._inKeyframes = wasInKeyframes; - return null; - }, - visitForRule$1(_, node) { - var _this = this, t1 = {}, - t2 = node.from, - fromNumber = _this._addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure(_this, node)), - t3 = node.to, - toNumber = _this._addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure0(_this, node)), - from = _this._addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure1(fromNumber)), - to = t1.to = _this._addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure2(toNumber, fromNumber)), - direction = from > to ? -1 : 1; - if (from === (!node.isExclusive ? t1.to = to + direction : to)) - return null; - return _this._environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure3(t1, _this, node, from, direction, fromNumber), true, type$.nullable_Value); - }, - visitForwardRule$1(_, node) { - var newConfiguration, t4, _i, variable, $name, _this = this, - _s8_ = "@forward", - oldConfiguration = _this._configuration, - adjustedConfiguration = oldConfiguration.throughForward$1(node), - t1 = node.configuration, - t2 = t1.length, - t3 = node.url; - if (t2 !== 0) { - newConfiguration = _this._addForwardConfiguration$2(adjustedConfiguration, node); - _this._loadModule$5$configuration(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure(_this, node), newConfiguration); - t3 = type$.String; - t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); - for (_i = 0; _i < t2; ++_i) { - variable = t1[_i]; - if (!variable.isGuarded) - t4.add$1(0, variable.name); - } - _this._removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); - for (_i = 0; _i < t2; ++_i) - t3.add$1(0, t1[_i].name); - for (t1 = newConfiguration._configuration$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - $name = t2[_i]; - if (!t3.contains$1(0, $name)) - if (!t1.get$isEmpty(t1)) - t1.remove$1(0, $name); - } - _this._assertConfigurationIsEmpty$1(newConfiguration); - } else { - _this._configuration = adjustedConfiguration; - _this._loadModule$4(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure0(_this, node)); - _this._configuration = oldConfiguration; - } - return null; - }, - _addForwardConfiguration$2(configuration, node) { - var t2, t3, _i, variable, t4, oldValue, t5, variableNodeWithSpan, _null = null, - t1 = configuration._configuration$_values, - newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); - for (t2 = node.configuration, t3 = t2.length, _i = 0; _i < t3; ++_i) { - variable = t2[_i]; - if (variable.isGuarded) { - t4 = variable.name; - oldValue = t1.get$isEmpty(t1) ? _null : t1.remove$1(0, t4); - if (oldValue != null) - t5 = !oldValue.value.$eq(0, B.C__SassNull); - else { - oldValue = _null; - t5 = false; - } - if (t5) { - newValues.$indexSet(0, t4, oldValue); - continue; - } - } - t4 = variable.expression; - variableNodeWithSpan = this._expressionNode$1(t4); - newValues.$indexSet(0, variable.name, new A.ConfiguredValue(this._withoutSlash$2(t4.accept$1(this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); - } - if (configuration instanceof A.ExplicitConfiguration || t1.get$isEmpty(t1)) - return new A.ExplicitConfiguration(node, newValues, _null); - else - return new A.Configuration(newValues, _null); - }, - _registerCommentsForModule$1(module) { - var _this = this, _s5_ = "_root", - t1 = _this.__root; - if (t1 == null) - return; - if (_this._assertInModule$2(t1, _s5_).children.get$length(0) === 0 || !module.get$transitivelyContainsCss()) - return; - t1 = _this._preModuleComments; - if (t1 == null) - t1 = _this._preModuleComments = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable, type$.List_CssComment); - J.addAll$1$ax(t1.putIfAbsent$2(module, new A._EvaluateVisitor__registerCommentsForModule_closure()), new A.UnmodifiableListView(J.cast$1$0$ax(_this._assertInModule$2(_this.__root, _s5_).children._collection$_source, type$.CssComment), type$.UnmodifiableListView_CssComment)); - _this._assertInModule$2(_this.__root, _s5_).clearChildren$0(); - _this.__endOfImports = 0; - }, - _removeUsedConfiguration$3$except(upstream, downstream, except) { - var t1, t2, t3, t4, _i, $name; - for (t1 = upstream._configuration$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t3 = t2.length, t4 = downstream._configuration$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - $name = t2[_i]; - if (except.contains$1(0, $name)) - continue; - if (!t4.containsKey$1($name)) - if (!t1.get$isEmpty(t1)) - t1.remove$1(0, $name); - } - }, - _assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { - var t1, _0_0, $name, value; - if (!(configuration instanceof A.ExplicitConfiguration)) - return; - t1 = configuration._configuration$_values; - if (t1.get$isEmpty(t1)) - return; - t1 = A.MapExtensions_get_pairs(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); - _0_0 = t1.get$first(t1); - $name = _0_0._0; - value = _0_0._1; - t1 = nameInError ? "$" + $name + string$.x20was_n : string$.This_v; - throw A.wrapException(this._evaluate$_exception$2(t1, value.configurationSpan)); - }, - _assertConfigurationIsEmpty$1(configuration) { - return this._assertConfigurationIsEmpty$2$nameInError(configuration, false); - }, - visitFunctionRule$1(_, node) { - var t1 = this._environment, - t2 = t1.closure$0(), - t3 = this._inDependency, - t4 = t1._functions, - index = t4.length - 1, - t5 = node.name; - t1._functionIndices.$indexSet(0, t5, index); - J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_Environment)); - return null; - }, - visitIfRule$1(_, node) { - var t1, t2, _i, clauseToCheck, - clause = node.lastClause; - for (t1 = node.clauses, t2 = t1.length, _i = 0; _i < t2; ++_i) { - clauseToCheck = t1[_i]; - if (clauseToCheck.expression.accept$1(this).get$isTruthy()) { - clause = clauseToCheck; - break; - } - } - return A.NullableExtension_andThen(clause, new A._EvaluateVisitor_visitIfRule_closure(this)); - }, - visitImportRule$1(_, node) { - var t1, t2, t3, t4, t5, t6, _i, $import, t7, _0_0, $self, t8, _this = this, - _s8_ = "__parent", - _s5_ = "_root", - _s13_ = "_endOfImports"; - for (t1 = node.imports, t2 = t1.length, t3 = type$.CssValue_String, t4 = _this.get$_interpolationToValue(), t5 = type$.StaticImport, t6 = type$.JSArray_ModifiableCssImport, _i = 0; _i < t2; ++_i) { - $import = t1[_i]; - if ($import instanceof A.DynamicImport) - _this._visitDynamicImport$1($import); - else { - t5._as($import); - t7 = $import.url; - _0_0 = _this._performInterpolationHelper$3$sourceMap$warnForColor(t7, false, false); - $self = $import.modifiers; - t8 = $self == null ? null : t4.call$1($self); - node = new A.ModifiableCssImport(new A.CssValue(_0_0._0, t7.span, t3), t8, $import.span); - if (_this._assertInModule$2(_this.__parent, _s8_) !== _this._assertInModule$2(_this.__root, _s5_)) - _this._assertInModule$2(_this.__parent, _s8_).addChild$1(node); - else if (_this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, _s5_).children._collection$_source)) { - t7 = _this._assertInModule$2(_this.__root, _s5_); - node._parent = t7; - t7 = t7._children; - node._indexInParent = t7.length; - t7.push(node); - _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; - } else { - t7 = _this._outOfOrderImports; - (t7 == null ? _this._outOfOrderImports = A._setArrayType([], t6) : t7).push(node); - } - } - } - return null; - }, - _visitDynamicImport$1($import) { - return this._withStackFrame$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure(this, $import)); - }, - _loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { - var _0_0, importCache, _1_0, importer, canonicalUrl, originalUrl, isDependency, _2_0, stylesheet, error, stackTrace, error0, stackTrace0, t1, t2, exception, _this = this; - baseUrl = baseUrl; - try { - _this._importSpan = span; - _0_0 = _this._evaluate$_importCache; - importCache = null; - if (_0_0 != null) { - importCache = _0_0; - if (baseUrl == null) { - t1 = _this._assertInModule$2(_this.__stylesheet, "_stylesheet").span; - baseUrl = t1.get$sourceUrl(t1); - } - _1_0 = J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), _this._importer, baseUrl, forImport); - importer = null; - canonicalUrl = null; - originalUrl = null; - if (type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(_1_0)) { - importer = _1_0._0; - canonicalUrl = _1_0._1; - originalUrl = _1_0._2; - if (canonicalUrl.get$scheme() === "") - A.WarnForDeprecation_warnForDeprecation(_this._logger, B.Deprecation_INA, "Importer " + A.S(importer) + " canonicalized " + url + " to " + A.S(canonicalUrl) + string$.x2e_Rela, null, null); - _this._loadedUrls.add$1(0, canonicalUrl); - isDependency = _this._inDependency || !J.$eq$(importer, _this._importer); - _2_0 = importCache.importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl); - stylesheet = null; - if (_2_0 != null) { - stylesheet = _2_0; - t1 = stylesheet; - t2 = importer; - return new A._Record_3_importer_isDependency(t1, t2, isDependency); - } - } - } - t1 = B.JSString_methods.startsWith$1(url, "package:"); - if (t1) - throw A.wrapException(string$.x22packa); - else - throw A.wrapException("Can't find stylesheet to import."); - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException) - throw exception; - else if (t1 instanceof A.ArgumentError) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace(_this._evaluate$_exception$1(J.toString$0$(error)), error, stackTrace); - } else { - error0 = t1; - stackTrace0 = A.getTraceFromException(exception); - A.throwWithTrace(_this._evaluate$_exception$1(_this._getErrorMessage$1(error0)), error0, stackTrace0); - } - } finally { - _this._importSpan = null; - } - }, - _loadStylesheet$3$baseUrl(url, span, baseUrl) { - return this._loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); - }, - _loadStylesheet$3$forImport(url, span, forImport) { - return this._loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); - }, - _applyMixin$5(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { - var t1, _0_0, t2, _1_8, _this = this, - _s37_ = "Mixin doesn't accept a content block.", - _s10_ = "invocation"; - $label0$0: { - if (mixin == null) - throw A.wrapException(_this._evaluate$_exception$2("Undefined mixin.", nodeWithSpan.get$span(nodeWithSpan))); - t1 = mixin instanceof A.BuiltInCallable; - if (t1 && !mixin.acceptsContent && contentCallable != null) { - t1 = _this._evaluateArguments$1($arguments)._values; - _0_0 = mixin.callbackFor$2(t1[2].length, new A.MapKeySet(t1[0], type$.MapKeySet_String)); - throw A.wrapException(A.MultiSpanSassRuntimeException$(_s37_, nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_0_0._0.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); - } - if (t1) { - _this._environment.withContent$2(contentCallable, new A._EvaluateVisitor__applyMixin_closure(_this, $arguments, mixin, nodeWithSpanWithoutContent)); - break $label0$0; - } - t1 = type$.UserDefinedCallable_Environment._is(mixin); - t2 = false; - if (t1) { - _1_8 = mixin.declaration; - if (_1_8 instanceof A.MixinRule) - t2 = !type$.MixinRule._as(_1_8).get$hasContent() && contentCallable != null; - } - if (t2) - throw A.wrapException(A.MultiSpanSassRuntimeException$(_s37_, nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), _s10_, A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.$arguments.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); - if (t1) { - _this._runUserDefinedCallable$1$4($arguments, mixin, nodeWithSpanWithoutContent, new A._EvaluateVisitor__applyMixin_closure0(_this, contentCallable, mixin, nodeWithSpanWithoutContent), type$.Null); - break $label0$0; - } - throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); - } - }, - visitIncludeRule$1(_, node) { - var _this = this, - mixin = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure(_this, node)); - if (B.JSString_methods.startsWith$1(node.originalName, "--") && mixin instanceof A.UserDefinedCallable && !B.JSString_methods.startsWith$1(mixin.declaration.originalName, "--")) - _this._warn$3(string$.Sassx20_m, node.get$nameSpan(), B.Deprecation_0); - _this._applyMixin$5(mixin, A.NullableExtension_andThen(node.content, new A._EvaluateVisitor_visitIncludeRule_closure0(_this)), node.$arguments, node, new A._FakeAstNode(new A._EvaluateVisitor_visitIncludeRule_closure1(node))); - return null; - }, - visitMixinRule$1(_, node) { - var t1 = this._environment, - t2 = t1.closure$0(), - t3 = this._inDependency, - t4 = t1._mixins, - index = t4.length - 1, - t5 = node.name; - t1._mixinIndices.$indexSet(0, t5, index); - J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_Environment)); - return null; - }, - visitLoudComment$1(_, node) { - var t1, text, _this = this, - _s8_ = "__parent", - _s13_ = "_endOfImports"; - if (_this._inFunction) - return null; - if (_this._assertInModule$2(_this.__parent, _s8_) === _this._assertInModule$2(_this.__root, "_root") && _this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, "_root").children._collection$_source)) - _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; - t1 = node.text; - text = _this._performInterpolation$1(t1); - if (!B.JSString_methods.endsWith$1(text, "*/")) - text += " */"; - _this._assertInModule$2(_this.__parent, _s8_).addChild$1(new A.ModifiableCssComment(text, t1.span)); - return null; - }, - visitMediaRule$1(_, node) { - var _0_0, queries, mergedQueries, t1, mergedSources, t2, t3, _this = this; - if (_this._declarationName != null) - throw A.wrapException(_this._evaluate$_exception$2(string$.Media_, node.span)); - _0_0 = _this._performInterpolationWithMap$2$warnForColor(node.query, true); - queries = new A.MediaQueryParser(A.SpanScanner$(_0_0._0, null), _0_0._1).parse$0(0); - mergedQueries = A.NullableExtension_andThen(_this._mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure(_this, queries)); - t1 = mergedQueries == null; - if (!t1 && J.get$isEmpty$asx(mergedQueries)) - return null; - if (t1) - mergedSources = B.Set_empty1; - else { - t2 = _this._mediaQuerySources; - t2.toString; - t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); - t3 = _this._mediaQueries; - t3.toString; - t2.addAll$1(0, t3); - t2.addAll$1(0, queries); - mergedSources = t2; - } - t1 = t1 ? queries : mergedQueries; - _this._withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure0(_this, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure1(mergedSources), type$.ModifiableCssMediaRule, type$.Null); - return null; - }, - _mergeMediaQueries$2(queries1, queries2) { - var t1, t2, t3, t4, _0_0, t5, result, - queries = A._setArrayType([], type$.JSArray_CssMediaQuery); - for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2); t1.moveNext$0();) { - t3 = t1.get$current(t1); - for (t4 = t2.get$iterator(queries2); t4.moveNext$0();) { - _0_0 = t3.merge$1(t4.get$current(t4)); - if (B._SingletonCssMediaQueryMergeResult_0 === _0_0) - continue; - if (B._SingletonCssMediaQueryMergeResult_1 === _0_0) - return null; - t5 = _0_0 instanceof A.MediaQuerySuccessfulMergeResult; - result = t5 ? _0_0 : null; - if (t5) - queries.push(result.query); - } - } - return queries; - }, - visitReturnRule$1(_, node) { - var t1 = node.expression; - return this._withoutSlash$2(t1.accept$1(this), t1); - }, - visitSilentComment$1(_, node) { - return null; - }, - visitStyleRule$1(_, node) { - var t1, _0_0, selectorText, selectorMap, parsedSelector, nest, t2, _i, _1_0, first, t3, rule, oldAtRootExcludingStyleRule, _this = this, _null = null, - _s8_ = "__parent", - _s11_ = "_stylesheet"; - if (_this._declarationName != null) - throw A.wrapException(_this._evaluate$_exception$2(string$.Style_n, node.span)); - else if (_this._inKeyframes && _this._assertInModule$2(_this.__parent, _s8_) instanceof A.ModifiableCssKeyframeBlock) - throw A.wrapException(_this._evaluate$_exception$2(string$.Style_k, node.span)); - t1 = node.selector; - _0_0 = _this._performInterpolationWithMap$2$warnForColor(t1, true); - selectorText = _0_0._0; - selectorMap = _0_0._1; - if (_this._inKeyframes) { - _this._withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(new A.CssValue(A.List_List$unmodifiable(new A.KeyframeSelectorParser(A.SpanScanner$(selectorText, _null), selectorMap).parse$0(0), type$.String), t1.span, type$.CssValue_List_String), node.span), new A._EvaluateVisitor_visitStyleRule_closure(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure0(), type$.ModifiableCssKeyframeBlock, type$.Null); - return _null; - } - parsedSelector = A.SelectorList_SelectorList$parse(selectorText, true, selectorMap, _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss); - t1 = _this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot; - t1 = t1 == null ? _null : t1.fromPlainCss; - nest = t1 !== true; - if (nest) { - if (_this._assertInModule$2(_this.__stylesheet, _s11_).plainCss) - for (t1 = parsedSelector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { - _1_0 = t1[_i].leadingCombinators; - if (_1_0.length >= 1) { - first = _1_0[0]; - t3 = _this._assertInModule$2(_this.__stylesheet, _s11_); - t3 = t3.plainCss; - } else { - first = _null; - t3 = false; - } - if (t3) - throw A.wrapException(_this._evaluate$_exception$2(string$.Top_lel, first.span)); - } - t1 = _this._styleRuleIgnoringAtRoot; - t1 = t1 == null ? _null : t1.originalSelector; - parsedSelector = parsedSelector.nestWithin$3$implicitParent$preserveParentSelectors(t1, !_this._atRootExcludingStyleRule, _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss); - } - rule = A.ModifiableCssStyleRule$(_this._assertInModule$2(_this.__extensionStore, "_extensionStore").addSelector$2(parsedSelector, _this._mediaQueries), node.span, _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss, parsedSelector); - oldAtRootExcludingStyleRule = _this._atRootExcludingStyleRule; - t1 = _this._atRootExcludingStyleRule = false; - t2 = nest ? new A._EvaluateVisitor_visitStyleRule_closure1() : _null; - _this._withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure2(_this, rule, node), node.hasDeclarations, t2, type$.ModifiableCssStyleRule, type$.Null); - _this._atRootExcludingStyleRule = oldAtRootExcludingStyleRule; - _this._warnForBogusCombinators$1(rule); - if ((_this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot) == null) { - t1 = _this._assertInModule$2(_this.__parent, _s8_).children; - t1 = !t1.get$isEmpty(t1); - } - if (t1) { - t1 = _this._assertInModule$2(_this.__parent, _s8_).children; - t1.get$last(t1).isGroupEnd = true; - } - return _null; - }, - _warnForBogusCombinators$1(rule) { - var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, t8, t9, _this = this, _null = null; - if (!rule.accept$1(B._IsInvisibleVisitor_false_false)) - for (t1 = rule._style_rule$_selector._box$_inner.value.components, t2 = t1.length, t3 = type$.SourceSpan, t4 = type$.String, t5 = rule.children, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - if (!complex.accept$1(B._IsBogusVisitor_true)) - continue; - if (complex.accept$1(B.C__IsUselessVisitor)) { - visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - _this._warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix20, A.SpanExtensions_trimRight(complex.span), B.Deprecation_C9i); - } else if (complex.leadingCombinators.length !== 0) { - if (!_this._assertInModule$2(_this.__stylesheet, "_stylesheet").plainCss) { - visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - _this._warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix0a, A.SpanExtensions_trimRight(complex.span), B.Deprecation_C9i); - } - } else { - visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - t6 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); - t7 = complex.accept$1(B._IsBogusVisitor_false) ? string$.x20It_wi : ""; - t8 = A.SpanExtensions_trimRight(complex.span); - if (t5.get$length(0) === 0) - A.throwExpression(A.IterableElementError_noElement()); - t9 = J.get$span$z(t5.$index(0, 0)); - _this._warn$3('The selector "' + t6 + string$.x22x20is_o + t7 + string$.x0aThis_, new A.MultiSpan(t8, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t5.every$1(t5, new A._EvaluateVisitor__warnForBogusCombinators_closure()) ? "\n(try converting to a //-style comment)" : "")], t3, t4), t3, t4)), B.Deprecation_C9i); - } - } - }, - visitSupportsRule$1(_, node) { - var t1, _this = this; - if (_this._declarationName != null) - throw A.wrapException(_this._evaluate$_exception$2(string$.Suppor, node.span)); - t1 = node.condition; - _this._withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$(new A.CssValue(_this._visitSupportsCondition$1(t1), t1.get$span(t1), type$.CssValue_String), node.span), new A._EvaluateVisitor_visitSupportsRule_closure(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure0(), type$.ModifiableCssSupportsRule, type$.Null); - return null; - }, - _visitSupportsCondition$1(condition) { - var t1, _this = this, _box_0 = {}; - $label0$0: { - if (condition instanceof A.SupportsOperation) { - t1 = condition.operator; - t1 = _this._parenthesize$2(condition.left, t1) + " " + t1 + " " + _this._parenthesize$2(condition.right, t1); - break $label0$0; - } - if (condition instanceof A.SupportsNegation) { - t1 = "not " + _this._parenthesize$1(condition.condition); - break $label0$0; - } - if (condition instanceof A.SupportsInterpolation) { - t1 = condition.expression; - t1 = _this._evaluate$_serialize$3$quote(t1.accept$1(_this), t1, false); - break $label0$0; - } - _box_0.declaration = null; - if (condition instanceof A.SupportsDeclaration) { - _box_0.declaration = condition; - t1 = _this._withSupportsDeclaration$1(new A._EvaluateVisitor__visitSupportsCondition_closure(_box_0, _this)); - break $label0$0; - } - if (condition instanceof A.SupportsFunction) { - t1 = _this._performInterpolation$1(condition.name) + "(" + _this._performInterpolation$1(condition.$arguments) + ")"; - break $label0$0; - } - if (condition instanceof A.SupportsAnything) { - t1 = "(" + _this._performInterpolation$1(condition.contents) + ")"; - break $label0$0; - } - t1 = A.throwExpression(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeTypeOfDartObject(condition).toString$0(0) + ".", null)); - } - return t1; - }, - _withSupportsDeclaration$1$1(callback) { - var t1, - oldInSupportsDeclaration = this._inSupportsDeclaration; - this._inSupportsDeclaration = true; - try { - t1 = callback.call$0(); - return t1; - } finally { - this._inSupportsDeclaration = oldInSupportsDeclaration; - } - }, - _withSupportsDeclaration$1(callback) { - return this._withSupportsDeclaration$1$1(callback, type$.dynamic); - }, - _parenthesize$2(condition, operator) { - var t1; - if (!(condition instanceof A.SupportsNegation)) - if (condition instanceof A.SupportsOperation) - t1 = operator == null || operator !== condition.operator; - else - t1 = false; - else - t1 = true; - if (t1) - return "(" + this._visitSupportsCondition$1(condition) + ")"; - return this._visitSupportsCondition$1(condition); - }, - _parenthesize$1(condition) { - return this._parenthesize$2(condition, null); - }, - visitVariableDeclaration$1(_, node) { - var t2, value, _this = this, _null = null, t1 = {}; - if (node.isGuarded) { - if (node.namespace == null && _this._environment._variables.length === 1) { - t2 = _this._configuration._configuration$_values; - t2 = t2.get$isEmpty(t2) ? _null : t2.remove$1(0, node.name); - t1.override = null; - if (t2 != null) { - t1.override = t2; - t2 = !t2.value.$eq(0, B.C__SassNull); - } else - t2 = false; - if (t2) { - _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure(t1, _this, node)); - return _null; - } - } - value = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure0(_this, node)); - if (value != null && !value.$eq(0, B.C__SassNull)) - return _null; - } - if (node.isGlobal && !_this._environment.globalVariableExists$1(node.name)) { - t1 = _this._environment._variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName(node.span) + ": null` at the stylesheet root."; - _this._warn$3(t1, node.span, B.Deprecation_KIf); - } - t1 = node.expression; - _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure1(_this, node, _this._withoutSlash$2(t1.accept$1(_this), t1))); - return _null; - }, - visitUseRule$1(_, node) { - var values, _i, variable, t3, variableNodeWithSpan, configuration, _this = this, - t1 = node.configuration, - t2 = t1.length; - if (t2 !== 0) { - values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); - for (_i = 0; _i < t2; ++_i) { - variable = t1[_i]; - t3 = variable.expression; - variableNodeWithSpan = _this._expressionNode$1(t3); - values.$indexSet(0, variable.name, new A.ConfiguredValue(_this._withoutSlash$2(t3.accept$1(_this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); - } - configuration = new A.ExplicitConfiguration(node, values, null); - } else - configuration = B.Configuration_Map_empty_null; - _this._loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure(_this, node), configuration); - _this._assertConfigurationIsEmpty$1(configuration); - return null; - }, - visitWarnRule$1(_, node) { - var _this = this, - value = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitWarnRule_closure(_this, node)), - t1 = value instanceof A.SassString ? value._string$_text : _this._evaluate$_serialize$2(value, node.expression); - _this._logger.warn$2$trace(0, t1, _this._evaluate$_stackTrace$1(node.span)); - return null; - }, - visitWhileRule$1(_, node) { - return this._environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure(this, node), true, node.hasDeclarations, type$.nullable_Value); - }, - visitBinaryOperationExpression$1(_, node) { - var t1, _this = this; - if (_this._assertInModule$2(_this.__stylesheet, "_stylesheet").plainCss) { - t1 = node.operator; - t1 = t1 !== B.BinaryOperator_wdM && t1 !== B.BinaryOperator_U77; - } else - t1 = false; - if (t1) - throw A.wrapException(_this._evaluate$_exception$2("Operators aren't allowed in plain CSS.", node.get$operatorSpan())); - return _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure(_this, node)); - }, - _slash$3(left, right, node) { - var t2, _1_1, - result = left.dividedBy$1(right), - _1_2_isSet = left instanceof A.SassNumber, - _1_2 = null, right0 = null, - t1 = false; - if (_1_2_isSet) { - t2 = type$.SassNumber; - t2._as(left); - if (right instanceof A.SassNumber) { - t2._as(right); - t1 = node.allowsSlash && this._operandAllowsSlash$1(node.left) && this._operandAllowsSlash$1(node.right); - right0 = right; - _1_2 = right0; - } else - _1_2 = right; - _1_1 = left; - } else { - _1_1 = left; - left = null; - } - if (t1) - return type$.SassNumber._as(result).withSlash$2(left, right0); - if (_1_1 instanceof A.SassNumber) - t1 = (_1_2_isSet ? _1_2 : right) instanceof A.SassNumber; - else - t1 = false; - if (t1) { - this._warn$3(string$.Using__o + A.S(new A._EvaluateVisitor__slash_recommendation().call$1(node)) + " or " + A.expressionToCalc(node).toString$0(0) + string$.x0a_Morex20, node.get$span(0), B.Deprecation_mRl); - return result; - } - return result; - }, - _operandAllowsSlash$1(node) { - var t1; - if (node instanceof A.FunctionExpression) - if (node.namespace == null) { - t1 = node.name; - t1 = B.Set_yHF81.contains$1(0, t1.toLowerCase()) && this._environment.getFunction$1(t1) == null; - } else - t1 = false; - else - t1 = true; - return t1; - }, - visitValueExpression$1(_, node) { - return node.value; - }, - visitVariableExpression$1(_, node) { - var result = this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure(this, node)); - if (result != null) - return result; - throw A.wrapException(this._evaluate$_exception$2("Undefined variable.", node.span)); - }, - visitUnaryOperationExpression$1(_, node) { - return this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitUnaryOperationExpression_closure(node, node.operand.accept$1(this))); - }, - visitBooleanExpression$1(_, node) { - return node.value ? B.SassBoolean_true : B.SassBoolean_false; - }, - visitIfExpression$1(_, node) { - var condition, t1, ifTrue, ifFalse, result, _this = this, - _0_0 = _this._evaluateMacroArguments$1(node), - positional = _0_0._0, - named = _0_0._1; - _this._verifyArguments$4(positional.length, named, $.$get$IfExpression_declaration(), node); - condition = A.ListExtensions_elementAtOrNull(positional, 0); - if (condition == null) { - t1 = named.$index(0, "condition"); - t1.toString; - condition = t1; - } - ifTrue = A.ListExtensions_elementAtOrNull(positional, 1); - if (ifTrue == null) { - t1 = named.$index(0, "if-true"); - t1.toString; - ifTrue = t1; - } - ifFalse = A.ListExtensions_elementAtOrNull(positional, 2); - if (ifFalse == null) { - t1 = named.$index(0, "if-false"); - t1.toString; - ifFalse = t1; - } - result = condition.accept$1(_this).get$isTruthy() ? ifTrue : ifFalse; - return _this._withoutSlash$2(result.accept$1(_this), _this._expressionNode$1(result)); - }, - visitNullExpression$1(_, node) { - return B.C__SassNull; - }, - visitNumberExpression$1(_, node) { - return A.SassNumber_SassNumber(node.value, node.unit); - }, - visitParenthesizedExpression$1(_, node) { - var _this = this; - return _this._assertInModule$2(_this.__stylesheet, "_stylesheet").plainCss ? A.throwExpression(_this._evaluate$_exception$2("Parentheses aren't allowed in plain CSS.", node.span)) : node.expression.accept$1(_this); - }, - visitColorExpression$1(_, node) { - return node.value; - }, - visitListExpression$1(_, node) { - var t1 = node.contents; - return A.SassList$(new A.MappedListIterable(t1, new A._EvaluateVisitor_visitListExpression_closure(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), node.separator, node.hasBrackets); - }, - visitMapExpression$1(_, node) { - var t2, t3, _i, t4, key, value, keyValue, valueValue, oldValueSpan, - t1 = type$.Value, - map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), - keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode); - for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { - t4 = t2[_i]; - key = t4._0; - value = t4._1; - keyValue = key.accept$1(this); - valueValue = value.accept$1(this); - if (map.containsKey$1(keyValue)) { - t1 = keyNodes.$index(0, keyValue); - oldValueSpan = t1 == null ? null : t1.get$span(t1); - t1 = key.get$span(key); - t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - if (oldValueSpan != null) - t2.$indexSet(0, oldValueSpan, "first key"); - throw A.wrapException(A.MultiSpanSassRuntimeException$("Duplicate key.", t1, "second key", t2, this._evaluate$_stackTrace$1(key.get$span(key)), null)); - } - map.$indexSet(0, keyValue, valueValue); - keyNodes.$indexSet(0, keyValue, key); - } - return new A.SassMap(A.ConstantMap_ConstantMap$from(map, t1, t1)); - }, - visitFunctionExpression$1(_, node) { - var t2, _0_0, t3, t4, $name, oldInFunction, result, _this = this, - _s11_ = "_stylesheet", - t1 = {}, - $function = _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss ? null : _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure(_this, node)); - t1.$function = $function; - if ($function == null) { - if (node.namespace != null) - throw A.wrapException(_this._evaluate$_exception$2("Undefined function.", node.span)); - t2 = node.name; - _0_0 = t2.toLowerCase(); - t3 = false; - if ("min" === _0_0 || "max" === _0_0 || "round" === _0_0 || "abs" === _0_0) { - t3 = node.$arguments; - t4 = t3.named; - t3 = t4.get$isEmpty(t4) && t3.rest == null && B.JSArray_methods.every$1(t3.positional, new A._EvaluateVisitor_visitFunctionExpression_closure0()); - $name = _0_0; - } else - $name = null; - if (t3) - return _this._visitCalculation$2$inLegacySassFunction(node, $name); - if ("calc" === _0_0 || "clamp" === _0_0 || "hypot" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "sqrt" === _0_0 || "exp" === _0_0 || "sign" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "atan2" === _0_0 || "pow" === _0_0 || "log" === _0_0) - return _this._visitCalculation$1(node); - $function = _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss ? null : _this._builtInFunctions.$index(0, t2); - t2 = t1.$function = $function == null ? new A.PlainCssCallable(node.originalName) : $function; - } else - t2 = $function; - if (B.JSString_methods.startsWith$1(node.originalName, "--") && t2 instanceof A.UserDefinedCallable && !B.JSString_methods.startsWith$1(t2.declaration.originalName, "--")) - _this._warn$3(string$.Sassx20_ff, node.get$nameSpan(), B.Deprecation_0); - oldInFunction = _this._inFunction; - _this._inFunction = true; - result = _this._addErrorSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure1(t1, _this, node)); - _this._inFunction = oldInFunction; - return result; - }, - _visitCalculation$2$inLegacySassFunction(node, inLegacySassFunction) { - var $arguments, oldCallableNode, t1, _0_0, error, stackTrace, t4, _i, exception, _this = this, - t2 = node.$arguments, - t3 = t2.named; - if (t3.get$isNotEmpty(t3)) - throw A.wrapException(_this._evaluate$_exception$2(string$.Keywor, node.span)); - else if (t2.rest != null) - throw A.wrapException(_this._evaluate$_exception$2(string$.Rest_a, node.span)); - _this._checkCalculationArguments$1(node); - t3 = A._setArrayType([], type$.JSArray_Object); - for (t2 = t2.positional, t4 = t2.length, _i = 0; _i < t4; ++_i) - t3.push(_this._visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction)); - $arguments = t3; - if (_this._inSupportsDeclaration) - return new A.SassCalculation(node.name, A.List_List$unmodifiable($arguments, type$.Object)); - oldCallableNode = _this._callableNode; - _this._callableNode = node; - try { - t1 = null; - t3 = node.name; - _0_0 = t3.toLowerCase(); - $label0$0: { - if ("calc" === _0_0) { - t1 = A.SassCalculation_calc(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("sqrt" === _0_0) { - t1 = A.SassCalculation__singleArgument("sqrt", J.$index$asx($arguments, 0), A.number0__sqrt$closure(), true); - break $label0$0; - } - if ("sin" === _0_0) { - t1 = A.SassCalculation__singleArgument("sin", J.$index$asx($arguments, 0), A.number0__sin$closure(), false); - break $label0$0; - } - if ("cos" === _0_0) { - t1 = A.SassCalculation__singleArgument("cos", J.$index$asx($arguments, 0), A.number0__cos$closure(), false); - break $label0$0; - } - if ("tan" === _0_0) { - t1 = A.SassCalculation__singleArgument("tan", J.$index$asx($arguments, 0), A.number0__tan$closure(), false); - break $label0$0; - } - if ("asin" === _0_0) { - t1 = A.SassCalculation__singleArgument("asin", J.$index$asx($arguments, 0), A.number0__asin$closure(), true); - break $label0$0; - } - if ("acos" === _0_0) { - t1 = A.SassCalculation__singleArgument("acos", J.$index$asx($arguments, 0), A.number0__acos$closure(), true); - break $label0$0; - } - if ("atan" === _0_0) { - t1 = A.SassCalculation__singleArgument("atan", J.$index$asx($arguments, 0), A.number0__atan$closure(), true); - break $label0$0; - } - if ("abs" === _0_0) { - t1 = A.SassCalculation_abs(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("exp" === _0_0) { - t1 = A.SassCalculation_exp(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("sign" === _0_0) { - t1 = A.SassCalculation_sign(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("min" === _0_0) { - t1 = A.SassCalculation_min($arguments); - break $label0$0; - } - if ("max" === _0_0) { - t1 = A.SassCalculation_max($arguments); - break $label0$0; - } - if ("hypot" === _0_0) { - t1 = A.SassCalculation_hypot($arguments); - break $label0$0; - } - if ("pow" === _0_0) { - t1 = A.SassCalculation_pow(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("atan2" === _0_0) { - t1 = A.SassCalculation_atan2(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("log" === _0_0) { - t1 = A.SassCalculation_log(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("mod" === _0_0) { - t1 = A.SassCalculation_mod(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("rem" === _0_0) { - t1 = A.SassCalculation_rem(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("round" === _0_0) { - t1 = A.SassCalculation_roundInternal(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2), inLegacySassFunction, node.span, new A._EvaluateVisitor__visitCalculation_closure(_this, node)); - break $label0$0; - } - if ("clamp" === _0_0) { - t1 = A.SassCalculation_clamp(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); - break $label0$0; - } - t3 = A.UnsupportedError$('Unknown calculation name "' + t3 + '".'); - t1 = A.throwExpression(t3); - } - t1 = t1; - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassScriptException) { - error = t1; - stackTrace = A.getTraceFromException(exception); - if (B.JSString_methods.contains$1(error.message, "compatible")) - _this._verifyCompatibleNumbers$2($arguments, t2); - A.throwWithTrace(_this._evaluate$_exception$2(error.message, node.span), error, stackTrace); - } else - throw exception; - } finally { - _this._callableNode = oldCallableNode; - } - }, - _visitCalculation$1(node) { - return this._visitCalculation$2$inLegacySassFunction(node, null); - }, - _checkCalculationArguments$1(node) { - var t1, _0_0, - check = new A._EvaluateVisitor__checkCalculationArguments_check(this, node); - $label0$0: { - t1 = node.name; - _0_0 = t1.toLowerCase(); - if ("calc" === _0_0 || "sqrt" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "abs" === _0_0 || "exp" === _0_0 || "sign" === _0_0) { - check.call$1(1); - break $label0$0; - } - if ("min" === _0_0 || "max" === _0_0 || "hypot" === _0_0) { - check.call$0(); - break $label0$0; - } - if ("pow" === _0_0 || "atan2" === _0_0 || "log" === _0_0 || "mod" === _0_0 || "rem" === _0_0) { - check.call$1(2); - break $label0$0; - } - if ("round" === _0_0 || "clamp" === _0_0) { - check.call$1(3); - break $label0$0; - } - throw A.wrapException(A.UnsupportedError$('Unknown calculation name "' + t1 + '".')); - } - }, - _verifyCompatibleNumbers$2(args, nodesWithSpans) { - var i, t1, _0_0, arg, number1, j, number2; - for (i = 0; t1 = args.length, i < t1; ++i) { - _0_0 = args[i]; - if (_0_0 instanceof A.SassNumber) { - t1 = _0_0.get$hasComplexUnits(); - arg = _0_0; - } else { - arg = null; - t1 = false; - } - if (t1) - throw A.wrapException(this._evaluate$_exception$2("Number " + A.S(arg) + " isn't compatible with CSS calculations.", J.get$span$z(nodesWithSpans[i]))); - } - for (i = 0; i < t1 - 1; ++i) { - number1 = args[i]; - if (!(number1 instanceof A.SassNumber)) - continue; - for (j = i + 1; t1 = args.length, j < t1; ++j) { - number2 = args[j]; - if (!(number2 instanceof A.SassNumber)) - continue; - if (number1.hasPossiblyCompatibleUnits$1(number2)) - continue; - throw A.wrapException(A.MultiSpanSassRuntimeException$(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", J.get$span$z(nodesWithSpans[i]), number1.toString$0(0), A.LinkedHashMap_LinkedHashMap$_literal([J.get$span$z(nodesWithSpans[j]), number2.toString$0(0)], type$.FileSpan, type$.String), this._evaluate$_stackTrace$1(J.get$span$z(nodesWithSpans[i])), null)); - } - } - }, - _visitCalculationExpression$2$inLegacySassFunction(node, inLegacySassFunction) { - var result, t2, _0_0, _1_0, t3, _i, i, _this = this, _null = null, _box_0 = {}, - t1 = node instanceof A.ParenthesizedExpression, - inner = t1 ? node.expression : _null; - if (t1) { - result = _this._visitCalculationExpression$2$inLegacySassFunction(inner, inLegacySassFunction); - return result instanceof A.SassString ? new A.SassString("(" + result._string$_text + ")", false) : result; - } - if (node instanceof A.StringExpression && node.accept$1(B.C_IsCalculationSafeVisitor)) { - t1 = node.text; - t2 = t1.get$asPlain(); - _0_0 = t2 == null ? _null : t2.toLowerCase(); - $label0$0: { - if ("pi" === _0_0) { - t1 = A.SassNumber_SassNumber(3.141592653589793, _null); - break $label0$0; - } - if ("e" === _0_0) { - t1 = A.SassNumber_SassNumber(2.718281828459045, _null); - break $label0$0; - } - if ("infinity" === _0_0) { - t1 = A.SassNumber_SassNumber(1 / 0, _null); - break $label0$0; - } - if ("-infinity" === _0_0) { - t1 = A.SassNumber_SassNumber(-1 / 0, _null); - break $label0$0; - } - if ("nan" === _0_0) { - t1 = A.SassNumber_SassNumber(0 / 0, _null); - break $label0$0; - } - t1 = new A.SassString(_this._performInterpolation$1(t1), false); - break $label0$0; - } - return t1; - } - _box_0.right = _box_0.left = _box_0.operator = null; - t1 = node instanceof A.BinaryOperationExpression; - if (t1) { - _box_0.operator = node.operator; - _box_0.left = node.left; - _box_0.right = node.right; - } - if (t1) { - _this._checkWhitespaceAroundCalculationOperator$1(node); - return _this._addExceptionSpan$2(node, new A._EvaluateVisitor__visitCalculationExpression_closure(_box_0, _this, node, inLegacySassFunction)); - } - if (node instanceof A.NumberExpression || node instanceof A.VariableExpression || node instanceof A.FunctionExpression || node instanceof A.IfExpression) { - _1_0 = node.accept$1(_this); - $label1$1: { - if (_1_0 instanceof A.SassNumber) { - t1 = _1_0; - break $label1$1; - } - if (_1_0 instanceof A.SassCalculation) { - t1 = _1_0; - break $label1$1; - } - if (_1_0 instanceof A.SassString) { - t1 = !_1_0._hasQuotes; - result = _1_0; - } else { - result = _null; - t1 = false; - } - if (t1) { - t1 = result; - break $label1$1; - } - t1 = A.throwExpression(_this._evaluate$_exception$2("Value " + _1_0.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); - } - return t1; - } - if (node instanceof A.ListExpression && !node.hasBrackets && B.ListSeparator_nbm === node.separator && node.contents.length >= 2) { - t1 = A._setArrayType([], type$.JSArray_Object); - for (t2 = node.contents, t3 = t2.length, _i = 0; _i < t3; ++_i) - t1.push(_this._visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction)); - _this._checkAdjacentCalculationValues$2(t1, node); - for (i = 0; i < t1.length; ++i) { - t3 = t1[i]; - if (t3 instanceof A.CalculationOperation && t2[i] instanceof A.ParenthesizedExpression) - t1[i] = new A.SassString("(" + A.S(t3) + ")", false); - } - return new A.SassString(B.JSArray_methods.join$1(t1, " "), false); - } - throw A.wrapException(_this._evaluate$_exception$2(string$.This_e, node.get$span(node))); - }, - _checkWhitespaceAroundCalculationOperator$1(node) { - var t2, t3, t4, textBetweenOperands, first, last, - t1 = node.operator; - if (t1 !== B.BinaryOperator_u15 && t1 !== B.BinaryOperator_SjO) - return; - t1 = node.left; - t2 = t1.get$span(t1); - t2 = t2.get$file(t2); - t3 = node.right; - t4 = t3.get$span(t3); - if (t2 !== t4.get$file(t4)) - return; - t2 = t1.get$span(t1); - t2 = t2.get$end(t2); - t4 = t3.get$span(t3); - if (t2.offset >= t4.get$start(t4).offset) - return; - t2 = t1.get$span(t1); - t2 = t2.get$file(t2); - t1 = t1.get$span(t1); - t1 = t1.get$end(t1); - t3 = t3.get$span(t3); - textBetweenOperands = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, t1.offset, t3.get$start(t3).offset), 0, null); - first = textBetweenOperands.charCodeAt(0); - last = textBetweenOperands.charCodeAt(textBetweenOperands.length - 1); - if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47) - t1 = !(last === 32 || last === 9 || last === 10 || last === 13 || last === 12 || last === 47); - else - t1 = true; - if (t1) - throw A.wrapException(this._evaluate$_exception$2(string$.x22x2b__an, node.get$operatorSpan())); - }, - _binaryOperatorToCalculationOperator$2(operator, node) { - var t1; - $label0$0: { - if (B.BinaryOperator_u15 === operator) { - t1 = B.CalculationOperator_g2q; - break $label0$0; - } - if (B.BinaryOperator_SjO === operator) { - t1 = B.CalculationOperator_CxF; - break $label0$0; - } - if (B.BinaryOperator_2No === operator) { - t1 = B.CalculationOperator_171; - break $label0$0; - } - if (B.BinaryOperator_U77 === operator) { - t1 = B.CalculationOperator_Qf1; - break $label0$0; - } - t1 = A.throwExpression(this._evaluate$_exception$2(string$.This_o, node.get$operatorSpan())); - } - return t1; - }, - _checkAdjacentCalculationValues$2(elements, node) { - var t1, i, t2, previous, current, previousNode, currentNode, _0_2; - for (t1 = elements.length, i = 1; i < t1; ++i) { - t2 = i - 1; - previous = elements[t2]; - current = elements[i]; - if (previous instanceof A.SassString || current instanceof A.SassString) - continue; - t1 = node.contents; - previousNode = t1[t2]; - currentNode = t1[i]; - if (currentNode instanceof A.UnaryOperationExpression) { - _0_2 = currentNode.operator; - if (B.UnaryOperator_AiQ !== _0_2) - t1 = B.UnaryOperator_cLp === _0_2; - else - t1 = true; - } else - t1 = false; - if (!t1) - t1 = currentNode instanceof A.NumberExpression && currentNode.value < 0; - else - t1 = true; - if (t1) - throw A.wrapException(this._evaluate$_exception$2(string$.x22x2b__an, A.FileSpanExtension_subspan(currentNode.get$span(currentNode), 0, 1))); - else - throw A.wrapException(this._evaluate$_exception$2("Missing math operator.", previousNode.get$span(previousNode).expand$1(0, currentNode.get$span(currentNode)))); - } - }, - visitInterpolatedFunctionExpression$1(_, node) { - var result, _this = this, - t1 = _this._performInterpolation$1(node.name), - oldInFunction = _this._inFunction; - _this._inFunction = true; - result = _this._addErrorSpan$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure(_this, node, new A.PlainCssCallable(t1))); - _this._inFunction = oldInFunction; - return result; - }, - _runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { - var oldCallable, result, _this = this, - evaluated = _this._evaluateArguments$1($arguments), - $name = callable.declaration.name; - if ($name !== "@content") - $name += "()"; - oldCallable = _this._currentCallable; - _this._currentCallable = callable; - result = _this._withStackFrame$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure(_this, callable, evaluated, nodeWithSpan, run, $V)); - _this._currentCallable = oldCallable; - return result; - }, - _runFunctionCallable$3($arguments, callable, nodeWithSpan) { - var buffer, first, argument, restArg, rest, error, t1, t2, _i, t3, t4, exception, _this = this; - if (callable instanceof A.BuiltInCallable) - return _this._withoutSlash$2(_this._runBuiltInCallable$3($arguments, callable, nodeWithSpan), nodeWithSpan); - else if (type$.UserDefinedCallable_Environment._is(callable)) - return _this._runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure(_this, callable), type$.Value); - else if (callable instanceof A.PlainCssCallable) { - t1 = $arguments.named; - if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) - throw A.wrapException(_this._evaluate$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); - buffer = new A.StringBuffer(callable.name + "("); - try { - first = true; - for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { - argument = t1[_i]; - if (first) - first = false; - else - buffer._contents += ", "; - t3 = buffer; - t4 = argument; - t4 = _this._evaluate$_serialize$3$quote(t4.accept$1(_this), t4, true); - t3._contents += t4; - } - restArg = $arguments.rest; - if (restArg != null) { - rest = restArg.accept$1(_this); - if (!first) - buffer._contents += ", "; - t1 = buffer; - t2 = _this._evaluate$_serialize$2(rest, restArg); - t1._contents += t2; - } - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SassRuntimeException._is(t1)) { - error = t1; - if (!B.JSString_methods.endsWith$1(error._span_exception$_message, "isn't a valid CSS value.")) - throw exception; - throw A.wrapException(A.MultiSpanSassRuntimeException$(error._span_exception$_message, J.get$span$z(error), "value", A.LinkedHashMap_LinkedHashMap$_literal([nodeWithSpan.get$span(nodeWithSpan), "unknown function treated as plain CSS"], type$.FileSpan, type$.String), J.get$trace$z(error), null)); - } else - throw exception; - } - t1 = buffer; - t2 = A.Primitives_stringFromCharCode(41); - t1._contents += t2; - t2 = buffer._contents; - return new A.SassString(t2.charCodeAt(0) == 0 ? t2 : t2, false); - } else - throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$(callable).toString$0(0) + ".", null)); - }, - _runBuiltInCallable$3($arguments, callable, nodeWithSpan) { - var result, error, stackTrace, namedSet, _0_0, declaredArguments, i, t1, argument, t2, t3, rest, argumentList, exception, _this = this, _box_0 = {}, - evaluated = _this._evaluateArguments$1($arguments), - oldCallableNode = _this._callableNode; - _this._callableNode = nodeWithSpan; - namedSet = new A.MapKeySet(evaluated._values[0], type$.MapKeySet_String); - _box_0.callback = _box_0.overload = null; - _0_0 = callable.callbackFor$2(evaluated._values[2].length, namedSet); - _box_0.overload = _0_0._0; - _box_0.callback = _0_0._1; - _this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure(_box_0, evaluated, namedSet)); - declaredArguments = _box_0.overload.$arguments; - for (i = evaluated._values[2].length, t1 = declaredArguments.length; i < t1; ++i) { - argument = declaredArguments[i]; - t2 = evaluated._values[2]; - t3 = evaluated._values[0].remove$1(0, argument.name); - if (t3 == null) { - t3 = argument.defaultValue; - t3 = _this._withoutSlash$2(t3.accept$1(_this), t3); - } - t2.push(t3); - } - if (_box_0.overload.restArgument != null) { - if (evaluated._values[2].length > t1) { - rest = B.JSArray_methods.sublist$1(evaluated._values[2], t1); - B.JSArray_methods.removeRange$2(evaluated._values[2], t1, evaluated._values[2].length); - } else - rest = B.List_empty8; - t1 = evaluated._values[0]; - argumentList = A.SassArgumentList$(rest, t1, evaluated._values[4] === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_ECn : evaluated._values[4]); - evaluated._values[2].push(argumentList); - } else - argumentList = null; - result = null; - try { - result = _this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure0(_box_0, evaluated)); - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException) - throw exception; - else { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace(_this._evaluate$_exception$2(_this._getErrorMessage$1(error), nodeWithSpan.get$span(nodeWithSpan)), error, stackTrace); - } - } - _this._callableNode = oldCallableNode; - if (argumentList == null) - return result; - if (evaluated._values[0].__js_helper$_length === 0) - return result; - if (argumentList._wereKeywordsAccessed) - return result; - throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + A.pluralize("argument", evaluated._values[0].get$keys(0).get$length(0), null) + " named " + A.toSentence(evaluated._values[0].get$keys(0).map$1$1(0, new A._EvaluateVisitor__runBuiltInCallable_closure1(), type$.Object), "or") + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_box_0.overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), null)); - }, - _evaluateArguments$1($arguments) { - var t1, t2, _i, expression, nodeForSpan, named, namedNodes, t3, t4, $name, value, restArgs, rest, restNodeForSpan, t5, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, _this = this, - positional = A._setArrayType([], type$.JSArray_Value), - positionalNodes = A._setArrayType([], type$.JSArray_AstNode); - for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { - expression = t1[_i]; - nodeForSpan = _this._expressionNode$1(expression); - positional.push(_this._withoutSlash$2(expression.accept$1(_this), nodeForSpan)); - positionalNodes.push(nodeForSpan); - } - t1 = type$.String; - named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value); - t2 = type$.AstNode; - namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t3 = A.MapExtensions_get_pairs($arguments.named, t1, type$.Expression), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - $name = t4._0; - value = t4._1; - nodeForSpan = _this._expressionNode$1(value); - named.$indexSet(0, $name, _this._withoutSlash$2(value.accept$1(_this), nodeForSpan)); - namedNodes.$indexSet(0, $name, nodeForSpan); - } - restArgs = $arguments.rest; - if (restArgs == null) - return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, B.ListSeparator_undecided_null_undecided]); - rest = restArgs.accept$1(_this); - restNodeForSpan = _this._expressionNode$1(restArgs); - if (rest instanceof A.SassMap) { - _this._addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure()); - t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t4 = rest._map$_contents, t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = type$.SassString; t4.moveNext$0();) - t3.$indexSet(0, t5._as(t4.get$current(t4))._string$_text, restNodeForSpan); - namedNodes.addAll$1(0, t3); - separator = B.ListSeparator_undecided_null_undecided; - } else if (rest instanceof A.SassList) { - t3 = rest._list$_contents; - B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure0(_this, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value>"))); - B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); - separator = rest._separator; - if (rest instanceof A.SassArgumentList) { - rest._wereKeywordsAccessed = true; - rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure1(_this, named, restNodeForSpan, namedNodes)); - } - } else { - positional.push(_this._withoutSlash$2(rest, restNodeForSpan)); - positionalNodes.push(restNodeForSpan); - separator = B.ListSeparator_undecided_null_undecided; - } - keywordRestArgs = $arguments.keywordRest; - if (keywordRestArgs == null) - return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); - keywordRest = keywordRestArgs.accept$1(_this); - keywordRestNodeForSpan = _this._expressionNode$1(keywordRestArgs); - if (keywordRest instanceof A.SassMap) { - _this._addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure2()); - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t2 = keywordRest._map$_contents, t2 = J.get$iterator$ax(t2.get$keys(t2)), t3 = type$.SassString; t2.moveNext$0();) - t1.$indexSet(0, t3._as(t2.get$current(t2))._string$_text, keywordRestNodeForSpan); - namedNodes.addAll$1(0, t1); - return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); - } else - throw A.wrapException(_this._evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); - }, - _evaluateMacroArguments$1(invocation) { - var t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, _this = this, - t1 = invocation.$arguments, - restArgs_ = t1.rest; - if (restArgs_ == null) - return new A._Record_2(t1.positional, t1.named); - t2 = t1.positional; - positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); - named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression); - rest = restArgs_.accept$1(_this); - restNodeForSpan = _this._expressionNode$1(restArgs_); - if (rest instanceof A.SassMap) - _this._addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure(restArgs_)); - else if (rest instanceof A.SassList) { - t2 = rest._list$_contents; - B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure0(_this, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression>"))); - if (rest instanceof A.SassArgumentList) { - rest._wereKeywordsAccessed = true; - rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure1(_this, named, restNodeForSpan, restArgs_)); - } - } else - positional.push(new A.ValueExpression(_this._withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); - keywordRestArgs_ = t1.keywordRest; - if (keywordRestArgs_ == null) - return new A._Record_2(positional, named); - keywordRest = keywordRestArgs_.accept$1(_this); - keywordRestNodeForSpan = _this._expressionNode$1(keywordRestArgs_); - if (keywordRest instanceof A.SassMap) { - _this._addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure2(_this, keywordRestNodeForSpan, keywordRestArgs_)); - return new A._Record_2(positional, named); - } else - throw A.wrapException(_this._evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); - }, - _addRestMap$1$4(values, map, nodeWithSpan, convert) { - map._map$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure(this, values, convert, this._expressionNode$1(nodeWithSpan), map, nodeWithSpan)); - }, - _addRestMap$4(values, map, nodeWithSpan, convert) { - return this._addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); - }, - _verifyArguments$4(positional, named, $arguments, nodeWithSpan) { - return this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure($arguments, positional, named)); - }, - visitSelectorExpression$1(_, node) { - var t1 = this._styleRuleIgnoringAtRoot; - t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); - return t1 == null ? B.C__SassNull : t1; - }, - visitStringExpression$1(_, node) { - var t1, t2, t3, _i, value, t4, _0_0, text, _this = this, - oldInSupportsDeclaration = _this._inSupportsDeclaration; - _this._inSupportsDeclaration = false; - t1 = A._setArrayType([], type$.JSArray_String); - for (t2 = node.text.contents, t3 = t2.length, _i = 0; _i < t3; ++_i) { - value = t2[_i]; - $label0$0: { - if (typeof value == "string") { - t4 = value; - break $label0$0; - } - if (value instanceof A.Expression) { - _0_0 = value.accept$1(_this); - $label1$1: { - if (_0_0 instanceof A.SassString) { - text = _0_0._string$_text; - t4 = text; - break $label1$1; - } - t4 = _this._evaluate$_serialize$3$quote(_0_0, value, false); - break $label1$1; - } - break $label0$0; - } - t4 = A.throwExpression(A.UnsupportedError$("Unknown interpolation value " + A.S(value))); - } - t1.push(t4); - } - t1 = B.JSArray_methods.join$0(t1); - _this._inSupportsDeclaration = oldInSupportsDeclaration; - return new A.SassString(t1, node.hasQuotes); - }, - visitSupportsExpression$1(_, expression) { - return new A.SassString(this._visitSupportsCondition$1(expression.condition), false); - }, - visitCssAtRule$1(node) { - var wasInKeyframes, wasInUnknownAtRule, t1, _this = this; - if (_this._declarationName != null) - throw A.wrapException(_this._evaluate$_exception$2(string$.At_rul, node.span)); - if (node.isChildless) { - _this._assertInModule$2(_this.__parent, "__parent").addChild$1(A.ModifiableCssAtRule$(node.name, node.span, true, node.value)); - return; - } - wasInKeyframes = _this._inKeyframes; - wasInUnknownAtRule = _this._inUnknownAtRule; - t1 = node.name; - if (A.unvendor(t1.value) === "keyframes") - _this._inKeyframes = true; - else - _this._inUnknownAtRule = true; - _this._withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$(t1, node.span, false, node.value), new A._EvaluateVisitor_visitCssAtRule_closure(_this, node), false, new A._EvaluateVisitor_visitCssAtRule_closure0(), type$.ModifiableCssAtRule, type$.Null); - _this._inUnknownAtRule = wasInUnknownAtRule; - _this._inKeyframes = wasInKeyframes; - }, - visitCssComment$1(node) { - var _this = this, - _s8_ = "__parent", - _s13_ = "_endOfImports"; - if (_this._assertInModule$2(_this.__parent, _s8_) === _this._assertInModule$2(_this.__root, "_root") && _this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, "_root").children._collection$_source)) - _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; - _this._assertInModule$2(_this.__parent, _s8_).addChild$1(new A.ModifiableCssComment(node.text, node.span)); - }, - visitCssDeclaration$1(node) { - this._assertInModule$2(this.__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$(node.name, node.value, node.span, null, node.parsedAsCustomProperty, null, node.valueSpanForMap)); - }, - visitCssImport$1(node) { - var t1, _this = this, - _s8_ = "__parent", - _s5_ = "_root", - _s13_ = "_endOfImports", - modifiableNode = new A.ModifiableCssImport(node.url, node.modifiers, node.span); - if (_this._assertInModule$2(_this.__parent, _s8_) !== _this._assertInModule$2(_this.__root, _s5_)) - _this._assertInModule$2(_this.__parent, _s8_).addChild$1(modifiableNode); - else if (_this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, _s5_).children._collection$_source)) { - _this._assertInModule$2(_this.__root, _s5_).addChild$1(modifiableNode); - _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; - } else { - t1 = _this._outOfOrderImports; - (t1 == null ? _this._outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t1).push(modifiableNode); - } - }, - visitCssKeyframeBlock$1(node) { - this._withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure(this, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure0(), type$.ModifiableCssKeyframeBlock, type$.Null); - }, - visitCssMediaRule$1(node) { - var mergedQueries, t1, mergedSources, t2, t3, _this = this; - if (_this._declarationName != null) - throw A.wrapException(_this._evaluate$_exception$2(string$.Media_, node.span)); - mergedQueries = A.NullableExtension_andThen(_this._mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure(_this, node)); - t1 = mergedQueries == null; - if (!t1 && J.get$isEmpty$asx(mergedQueries)) - return; - if (t1) - mergedSources = B.Set_empty1; - else { - t2 = _this._mediaQuerySources; - t2.toString; - t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); - t3 = _this._mediaQueries; - t3.toString; - t2.addAll$1(0, t3); - t2.addAll$1(0, node.queries); - mergedSources = t2; - } - t1 = t1 ? node.queries : mergedQueries; - _this._withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure0(_this, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure1(mergedSources), type$.ModifiableCssMediaRule, type$.Null); - }, - visitCssStyleRule$1(node) { - var t1, styleRule, t2, nest, t3, originalSelector, rule, oldAtRootExcludingStyleRule, _0_1, lastChild, _this = this, _null = null, - _s8_ = "__parent"; - if (_this._declarationName != null) - throw A.wrapException(_this._evaluate$_exception$2(string$.Style_n, node.span)); - else if (_this._inKeyframes && _this._assertInModule$2(_this.__parent, _s8_) instanceof A.ModifiableCssKeyframeBlock) - throw A.wrapException(_this._evaluate$_exception$2(string$.Style_k, node.span)); - t1 = _this._atRootExcludingStyleRule; - styleRule = t1 ? _null : _this._styleRuleIgnoringAtRoot; - t2 = t1 ? _null : _this._styleRuleIgnoringAtRoot; - t2 = t2 == null ? _null : t2.fromPlainCss; - nest = t2 !== true; - t2 = node._style_rule$_selector._box$_inner; - if (nest) { - t2 = t2.value; - t3 = styleRule == null ? _null : styleRule.originalSelector; - originalSelector = t2.nestWithin$3$implicitParent$preserveParentSelectors(t3, !t1, node.fromPlainCss); - } else - originalSelector = t2.value; - rule = A.ModifiableCssStyleRule$(_this._assertInModule$2(_this.__extensionStore, "_extensionStore").addSelector$2(originalSelector, _this._mediaQueries), node.span, node.fromPlainCss, originalSelector); - oldAtRootExcludingStyleRule = _this._atRootExcludingStyleRule; - _this._atRootExcludingStyleRule = false; - t1 = nest ? new A._EvaluateVisitor_visitCssStyleRule_closure() : _null; - _this._withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure0(_this, rule, node), false, t1, type$.ModifiableCssStyleRule, type$.Null); - _this._atRootExcludingStyleRule = oldAtRootExcludingStyleRule; - t1 = _this._assertInModule$2(_this.__parent, _s8_).children._collection$_source; - t2 = J.getInterceptor$asx(t1); - _0_1 = t2.get$length(t1); - if (_0_1 >= 1) { - lastChild = t2.elementAt$1(t1, _0_1 - 1); - t1 = styleRule == null; - } else { - lastChild = _null; - t1 = false; - } - if (t1) - lastChild.isGroupEnd = true; - }, - visitCssStylesheet$1(node) { - var t1; - for (t1 = J.get$iterator$ax(node.get$children(node)); t1.moveNext$0();) - t1.get$current(t1).accept$1(this); - }, - visitCssSupportsRule$1(node) { - var _this = this; - if (_this._declarationName != null) - throw A.wrapException(_this._evaluate$_exception$2(string$.Suppor, node.span)); - _this._withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$(node.condition, node.span), new A._EvaluateVisitor_visitCssSupportsRule_closure(_this, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure0(), type$.ModifiableCssSupportsRule, type$.Null); - }, - _handleReturn$1$2(list, callback) { - var t1, _i, _0_0; - for (t1 = list.length, _i = 0; _i < list.length; list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i) { - _0_0 = callback.call$1(list[_i]); - if (_0_0 != null) - return _0_0; - } - return null; - }, - _handleReturn$2(list, callback) { - return this._handleReturn$1$2(list, callback, type$.dynamic); - }, - _withEnvironment$1$2(environment, callback) { - var result, - oldEnvironment = this._environment; - this._environment = environment; - result = callback.call$0(); - this._environment = oldEnvironment; - return result; - }, - _withEnvironment$2(environment, callback) { - return this._withEnvironment$1$2(environment, callback, type$.dynamic); - }, - _interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { - var result = this._performInterpolation$2$warnForColor(interpolation, warnForColor), - t1 = trim ? A.trimAscii(result, true) : result; - return new A.CssValue(t1, interpolation.span, type$.CssValue_String); - }, - _interpolationToValue$1(interpolation) { - return this._interpolationToValue$3$trim$warnForColor(interpolation, false, false); - }, - _interpolationToValue$2$warnForColor(interpolation, warnForColor) { - return this._interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); - }, - _performInterpolation$2$warnForColor(interpolation, warnForColor) { - return this._performInterpolationHelper$3$sourceMap$warnForColor(interpolation, false, warnForColor)._0; - }, - _performInterpolation$1(interpolation) { - return this._performInterpolation$2$warnForColor(interpolation, false); - }, - _performInterpolationWithMap$2$warnForColor(interpolation, warnForColor) { - var _0_0 = this._performInterpolationHelper$3$sourceMap$warnForColor(interpolation, true, true), - map = _0_0._1; - map.toString; - return new A._Record_2(_0_0._0, map); - }, - _performInterpolationHelper$3$sourceMap$warnForColor(interpolation, sourceMap, warnForColor) { - var t1, t2, t3, t4, t5, t6, first, _i, t7, value, result, result0, t8, _this = this, _null = null, - targetLocations = sourceMap ? A._setArrayType([], type$.JSArray_SourceLocation) : _null, - oldInSupportsDeclaration = _this._inSupportsDeclaration; - _this._inSupportsDeclaration = false; - for (t1 = interpolation.contents, t2 = t1.length, t3 = type$.Expression, t4 = targetLocations == null, t5 = interpolation.span, t6 = type$.Object, first = true, _i = 0, t7 = ""; _i < t2; ++_i, first = false) { - value = t1[_i]; - if (!first) - if (!t4) - targetLocations.push(A.SourceLocation$(t7.length, _null, _null, _null)); - if (typeof value == "string") { - t7 += value; - continue; - } - t3._as(value); - result = value.accept$1(_this); - if (warnForColor && $.$get$namesByColor().containsKey$1(result)) { - result0 = A.List_List$from([""], false, t6); - result0.fixed$length = Array; - result0.immutable$list = Array; - t8 = $.$get$namesByColor(); - _this._warn$2(string$.You_pr + A.S(t8.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t8.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression(B.BinaryOperator_u15, new A.StringExpression(new A.Interpolation(result0, B.List_null, t5), true), value, false).toString$0(0) + "'.", value.get$span(value)); - } - t7 += _this._evaluate$_serialize$3$quote(result, value, false); - } - _this._inSupportsDeclaration = oldInSupportsDeclaration; - return new A._Record_2(t7.charCodeAt(0) == 0 ? t7 : t7, A.NullableExtension_andThen(targetLocations, new A._EvaluateVisitor__performInterpolationHelper_closure(interpolation))); - }, - _evaluate$_serialize$3$quote(value, nodeWithSpan, quote) { - return this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure(value, quote)); - }, - _evaluate$_serialize$2(value, nodeWithSpan) { - return this._evaluate$_serialize$3$quote(value, nodeWithSpan, true); - }, - _expressionNode$1(expression) { - var t1; - if (expression instanceof A.VariableExpression) { - t1 = this._addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure(this, expression)); - return t1 == null ? expression : t1; - } else - return expression; - }, - _withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { - var t1, result, _this = this; - _this._addChild$2$through(node, through); - t1 = _this._assertInModule$2(_this.__parent, "__parent"); - _this.__parent = node; - result = _this._environment.scope$1$2$when(callback, scopeWhen, $T); - _this.__parent = t1; - return result; - }, - _withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { - return this._withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); - }, - _withParent$2$2(node, callback, $S, $T) { - return this._withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); - }, - _addChild$2$through(node, through) { - var _0_0, grandparent, t1, - $parent = this._assertInModule$2(this.__parent, "__parent"); - if (through != null) { - for (; through.call$1($parent); $parent = _0_0) { - _0_0 = $parent._parent; - if (_0_0 == null) - throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); - } - if ($parent.get$hasFollowingSibling()) { - grandparent = $parent._parent; - t1 = grandparent.children; - if ($parent.equalsIgnoringChildren$1(t1.get$last(t1))) - $parent = type$.ModifiableCssParentNode._as(t1.get$last(t1)); - else { - $parent = $parent.copyWithoutChildren$0(); - grandparent.addChild$1($parent); - } - } - } - $parent.addChild$1(node); - }, - _addChild$1(node) { - return this._addChild$2$through(node, null); - }, - _withStyleRule$1$2(rule, callback) { - var result, - oldRule = this._styleRuleIgnoringAtRoot; - this._styleRuleIgnoringAtRoot = rule; - result = callback.call$0(); - this._styleRuleIgnoringAtRoot = oldRule; - return result; - }, - _withStyleRule$2(rule, callback) { - return this._withStyleRule$1$2(rule, callback, type$.dynamic); - }, - _withMediaQueries$1$3(queries, sources, callback) { - var result, _this = this, - oldMediaQueries = _this._mediaQueries, - oldSources = _this._mediaQuerySources; - _this._mediaQueries = queries; - _this._mediaQuerySources = sources; - result = callback.call$0(); - _this._mediaQueries = oldMediaQueries; - _this._mediaQuerySources = oldSources; - return result; - }, - _withMediaQueries$3(queries, sources, callback) { - return this._withMediaQueries$1$3(queries, sources, callback, type$.dynamic); - }, - _withStackFrame$1$3(member, nodeWithSpan, callback) { - var oldMember, result, _this = this, - t1 = _this._stack; - t1.push(new A._Record_2(_this._member, nodeWithSpan)); - oldMember = _this._member; - _this._member = member; - result = callback.call$0(); - _this._member = oldMember; - t1.pop(); - return result; - }, - _withStackFrame$3(member, nodeWithSpan, callback) { - return this._withStackFrame$1$3(member, nodeWithSpan, callback, type$.dynamic); - }, - _withoutSlash$2(value, nodeForSpan) { - var t1; - if (value instanceof A.SassNumber) - t1 = value.asSlash != null; - else - t1 = false; - if (t1) - this._warn$3(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation().call$1(value)) + string$.x0a_Morex20, nodeForSpan.get$span(nodeForSpan), B.Deprecation_mRl); - return value.withoutSlash$0(); - }, - _stackFrame$2(member, span) { - return A.frameForSpan(span, member, A.NullableExtension_andThen(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure(this))); - }, - _evaluate$_stackTrace$1(span) { - var t2, t3, _i, t4, nodeWithSpan, _this = this, - t1 = A._setArrayType([], type$.JSArray_Frame); - for (t2 = _this._stack, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - t4 = t2[_i]; - nodeWithSpan = t4._1; - t1.push(_this._stackFrame$2(t4._0, nodeWithSpan.get$span(nodeWithSpan))); - } - if (span != null) - t1.push(_this._stackFrame$2(_this._member, span)); - return A.Trace$(new A.ReversedListIterable(t1, type$.ReversedListIterable_Frame), null); - }, - _evaluate$_stackTrace$0() { - return this._evaluate$_stackTrace$1(null); - }, - _warn$3(message, span, deprecation) { - var t1, trace, _this = this; - if (_this._quietDeps) - if (!_this._inDependency) { - t1 = _this._currentCallable; - t1 = t1 == null ? null : t1.inDependency; - t1 = t1 === true; - } else - t1 = true; - else - t1 = false; - if (t1) - return; - if (!_this._warningsEmitted.add$1(0, new A._Record_2(message, span))) - return; - trace = _this._evaluate$_stackTrace$1(span); - t1 = _this._logger; - if (deprecation == null) - t1.warn$3$span$trace(0, message, span, trace); - else - A.WarnForDeprecation_warnForDeprecation(t1, deprecation, message, span, trace); - }, - _warn$2(message, span) { - return this._warn$3(message, span, null); - }, - _evaluate$_exception$2(message, span) { - var t1, t2; - if (span == null) { - t1 = B.JSArray_methods.get$last(this._stack)._1; - t1 = t1.get$span(t1); - } else - t1 = span; - t2 = this._evaluate$_stackTrace$1(span); - return new A.SassRuntimeException(t2, B.Set_empty, message, t1); - }, - _evaluate$_exception$1(message) { - return this._evaluate$_exception$2(message, null); - }, - _multiSpanException$3(message, primaryLabel, secondaryLabels) { - var t1 = B.JSArray_methods.get$last(this._stack)._1; - return A.MultiSpanSassRuntimeException$(message, t1.get$span(t1), primaryLabel, secondaryLabels, this._evaluate$_stackTrace$0(), null); - }, - _addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame) { - var error, stackTrace, t1, exception; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassScriptException) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); - A.throwWithTrace(t1.withTrace$1(this._evaluate$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); - } else - throw exception; - } - }, - _addExceptionSpan$2(nodeWithSpan, callback) { - return this._addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, true, type$.dynamic); - }, - _addExceptionSpan$3$addStackFrame(nodeWithSpan, callback, addStackFrame) { - return this._addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame, type$.dynamic); - }, - _addExceptionTrace$1$1(callback) { - var error, stackTrace, t1, exception, t2; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SassRuntimeException._is(t1)) - throw exception; - else if (t1 instanceof A.SassException) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = error; - t2 = J.getInterceptor$z(t1); - A.throwWithTrace(error.withTrace$1(this._evaluate$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t2, t1))), error, stackTrace); - } else - throw exception; - } - }, - _addExceptionTrace$1(callback) { - return this._addExceptionTrace$1$1(callback, type$.dynamic); - }, - _addErrorSpan$1$2(nodeWithSpan, callback) { - var error, stackTrace, t1, exception, t2, t3; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SassRuntimeException._is(t1)) { - error = t1; - stackTrace = A.getTraceFromException(exception); - if (!B.JSString_methods.startsWith$1(J.get$span$z(error).get$text(), "@error")) - throw exception; - t1 = error._span_exception$_message; - t2 = nodeWithSpan.get$span(nodeWithSpan); - t3 = this._evaluate$_stackTrace$0(); - A.throwWithTrace(new A.SassRuntimeException(t3, B.Set_empty, t1, t2), error, stackTrace); - } else - throw exception; - } - }, - _addErrorSpan$2(nodeWithSpan, callback) { - return this._addErrorSpan$1$2(nodeWithSpan, callback, type$.dynamic); - }, - _getErrorMessage$1(error) { - var t1, exception; - if (type$.Error._is(error)) - return error.toString$0(0); - try { - t1 = A._asString(J.get$message$x(error)); - return t1; - } catch (exception) { - t1 = J.toString$0$(error); - return t1; - } - } - }; - A._EvaluateVisitor_closure.prototype = { - call$1($arguments) { - var module, t2, - t1 = J.getInterceptor$asx($arguments), - variable = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this._environment; - t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); - return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string$_text) ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._EvaluateVisitor_closure0.prototype = { - call$1($arguments) { - var variable = J.$index$asx($arguments, 0).assertString$1("name"), - t1 = this.$this._environment; - return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string$_text, "_", "-")) != null ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._EvaluateVisitor_closure1.prototype = { - call$1($arguments) { - var module, t2, t3, t4, - t1 = J.getInterceptor$asx($arguments), - variable = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this; - t2 = t1._environment; - t3 = variable._string$_text; - t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); - return t2.getFunction$2$namespace(t4, module == null ? null : module._string$_text) != null || t1._builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._EvaluateVisitor_closure2.prototype = { - call$1($arguments) { - var module, t2, - t1 = J.getInterceptor$asx($arguments), - variable = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this._environment; - t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); - return t1.getMixin$2$namespace(t2, module == null ? null : module._string$_text) != null ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._EvaluateVisitor_closure3.prototype = { - call$1($arguments) { - var t1 = this.$this._environment; - if (!t1._inMixin) - throw A.wrapException(A.SassScriptException$(string$.conten, null)); - return t1._content != null ? B.SassBoolean_true : B.SassBoolean_false; - }, - $signature: 11 - }; - A._EvaluateVisitor_closure4.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, - module = this.$this._environment._environment$_modules.$index(0, t1); - if (module == null) - throw A.wrapException('There is no module with namespace "' + t1 + '".'); - t1 = type$.Value; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs(module.get$variables(), type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString(t4._0, true), t4._1); - } - return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 35 - }; - A._EvaluateVisitor_closure5.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, - module = this.$this._environment._environment$_modules.$index(0, t1); - if (module == null) - throw A.wrapException('There is no module with namespace "' + t1 + '".'); - t1 = type$.Value; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs(module.get$functions(module), type$.String, type$.Callable), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString(t4._0, true), new A.SassFunction(t4._1)); - } - return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 35 - }; - A._EvaluateVisitor_closure6.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, - module = this.$this._environment._environment$_modules.$index(0, t1); - if (module == null) - throw A.wrapException('There is no module with namespace "' + t1 + '".'); - t1 = type$.Value; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs(module.get$mixins(), type$.String, type$.Callable), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString(t4._0, true), new A.SassMixin(t4._1)); - } - return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 35 - }; - A._EvaluateVisitor_closure7.prototype = { - call$1($arguments) { - var module, t2, callable, - t1 = J.getInterceptor$asx($arguments), - $name = t1.$index($arguments, 0).assertString$1("name"), - css = t1.$index($arguments, 1).get$isTruthy(); - t1 = t1.$index($arguments, 2).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - if (css) { - if (module != null) - throw A.wrapException(string$.x24css_a); - return new A.SassFunction(new A.PlainCssCallable($name._string$_text)); - } - t1 = this.$this; - t2 = t1._callableNode; - t2.toString; - callable = t1._addExceptionSpan$2(t2, new A._EvaluateVisitor__closure2(t1, $name, module)); - if (callable == null) - throw A.wrapException("Function not found: " + $name.toString$0(0)); - return new A.SassFunction(callable); - }, - $signature: 165 - }; - A._EvaluateVisitor__closure2.prototype = { - call$0() { - var local, - normalizedName = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), - t1 = this.module, - namespace = t1 == null ? null : t1._string$_text; - t1 = this.$this; - local = t1._environment.getFunction$2$namespace(normalizedName, namespace); - if (local != null || namespace != null) - return local; - return t1._builtInFunctions.$index(0, normalizedName); - }, - $signature: 108 - }; - A._EvaluateVisitor_closure8.prototype = { - call$1($arguments) { - var module, t2, callable, - t1 = J.getInterceptor$asx($arguments), - $name = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this; - t2 = t1._callableNode; - t2.toString; - callable = t1._addExceptionSpan$2(t2, new A._EvaluateVisitor__closure1(t1, $name, module)); - if (callable == null) - throw A.wrapException("Mixin not found: " + $name.toString$0(0)); - return new A.SassMixin(callable); - }, - $signature: 166 - }; - A._EvaluateVisitor__closure1.prototype = { - call$0() { - var t1 = this.$this._environment, - t2 = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), - t3 = this.module; - return t1.getMixin$2$namespace(t2, t3 == null ? null : t3._string$_text); - }, - $signature: 108 - }; - A._EvaluateVisitor_closure9.prototype = { - call$1($arguments) { - var t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, invocation, callableNode, callable, - t1 = J.getInterceptor$asx($arguments), - $function = t1.$index($arguments, 0), - args = type$.SassArgumentList._as(t1.$index($arguments, 1)); - t1 = this.$this; - t2 = t1._callableNode; - t2.toString; - t3 = A._setArrayType([], type$.JSArray_Expression); - t4 = type$.String; - t5 = type$.Expression; - t6 = t2.get$span(t2); - t7 = t2.get$span(t2); - args._wereKeywordsAccessed = true; - t8 = args._keywords; - if (t8.get$isEmpty(t8)) - t2 = null; - else { - t9 = type$.Value; - t10 = A.LinkedHashMap_LinkedHashMap$_empty(t9, t9); - for (args._wereKeywordsAccessed = true, t8 = A.MapExtensions_get_pairs(t8, t4, t9), t8 = t8.get$iterator(t8); t8.moveNext$0();) { - t11 = t8.get$current(t8); - t10.$indexSet(0, new A.SassString(t11._0, false), t11._1); - } - t2 = new A.ValueExpression(new A.SassMap(A.ConstantMap_ConstantMap$from(t10, t9, t9)), t2.get$span(t2)); - } - invocation = new A.ArgumentInvocation(A.List_List$unmodifiable(t3, t5), A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t4, t5), new A.ValueExpression(args, t7), t2, t6); - if ($function instanceof A.SassString) { - A.warnForDeprecation(string$.Passina + $function.toString$0(0) + "))", B.Deprecation_6v8); - callableNode = t1._callableNode; - t2 = $function._string$_text; - t3 = callableNode.get$span(callableNode); - return t1.visitFunctionExpression$1(0, new A.FunctionExpression(null, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, invocation, t3)); - } - callable = $function.assertFunction$1("function").callable; - if (type$.Callable._is(callable)) { - t2 = t1._callableNode; - t2.toString; - return t1._runFunctionCallable$3(invocation, callable, t2); - } else - throw A.wrapException(A.SassScriptException$("The function " + callable.get$name(callable) + string$.x20is_as, null)); - }, - $signature: 4 - }; - A._EvaluateVisitor_closure10.prototype = { - call$1($arguments) { - var withMap, t2, values, configuration, t3, - t1 = J.getInterceptor$asx($arguments), - url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string$_text); - t1 = t1.$index($arguments, 1).get$realNull(); - withMap = t1 == null ? null : t1.assertMap$1("with")._map$_contents; - t1 = this.$this; - t2 = t1._callableNode; - t2.toString; - if (withMap != null) { - values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); - withMap.forEach$1(0, new A._EvaluateVisitor__closure(values, t2.get$span(t2), t2)); - configuration = new A.ExplicitConfiguration(t2, values, null); - } else - configuration = B.Configuration_Map_empty_null; - t3 = t2.get$span(t2); - t1._loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure0(t1), t3.get$sourceUrl(t3), configuration, true); - t1._assertConfigurationIsEmpty$2$nameInError(configuration, true); - }, - $signature: 188 - }; - A._EvaluateVisitor__closure.prototype = { - call$2(variable, value) { - var t1 = variable.assertString$1("with key"), - $name = A.stringReplaceAllUnchecked(t1._string$_text, "_", "-"); - t1 = this.values; - if (t1.containsKey$1($name)) - throw A.wrapException("The variable $" + $name + " was configured twice."); - t1.$indexSet(0, $name, new A.ConfiguredValue(value, this.span, this.callableNode)); - }, - $signature: 95 - }; - A._EvaluateVisitor__closure0.prototype = { - call$2(module, _) { - var t1 = this.$this; - return t1._combineCss$2$clone(module, true).accept$1(t1); - }, - $signature: 81 - }; - A._EvaluateVisitor_closure11.prototype = { - call$1($arguments) { - var callableNode, t2, t3, t4, t5, callable, $content, - t1 = J.getInterceptor$asx($arguments), - mixin = t1.$index($arguments, 0), - args = type$.SassArgumentList._as(t1.$index($arguments, 1)); - t1 = this.$this; - callableNode = t1._callableNode; - t2 = callableNode.get$span(callableNode); - t3 = callableNode.get$span(callableNode); - t4 = type$.Expression; - t5 = A.List_List$unmodifiable(B.List_empty9, t4); - t4 = A.ConstantMap_ConstantMap$from(B.Map_empty5, type$.String, t4); - callable = mixin.assertMixin$1("mixin").callable; - $content = t1._environment._content; - if (type$.Callable._is(callable)) - t1._applyMixin$5(callable, $content, new A.ArgumentInvocation(t5, t4, new A.ValueExpression(args, t3), null, t2), callableNode, callableNode); - else - throw A.wrapException(A.SassScriptException$("The mixin " + callable.get$name(callable) + string$.x20is_as, null)); - }, - $signature: 188 - }; - A._EvaluateVisitor_run_closure.prototype = { - call$0() { - var module, _this = this, - t1 = _this.node, - t2 = t1.span, - _0_0 = t2.get$sourceUrl(t2), - url = null; - if (_0_0 != null) { - url = _0_0; - t2 = _this.$this; - t2._activeModules.$indexSet(0, url, null); - t2._loadedUrls.add$1(0, url); - } - t2 = _this.$this; - module = t2._addExceptionTrace$1(new A._EvaluateVisitor_run__closure(t2, _this.importer, t1)); - return new A._Record_2_loadedUrls_stylesheet(t2._loadedUrls, t2._combineCss$1(module)); - }, - $signature: 580 - }; - A._EvaluateVisitor_run__closure.prototype = { - call$0() { - return this.$this._execute$2(this.importer, this.node); - }, - $signature: 581 - }; - A._EvaluateVisitor_runExpression_closure.prototype = { - call$0() { - var t1 = this.$this, - t2 = this.expression; - return t1._withFakeStylesheet$3(this.importer, t2, new A._EvaluateVisitor_runExpression__closure(t1, t2)); - }, - $signature: 38 - }; - A._EvaluateVisitor_runExpression__closure.prototype = { - call$0() { - var t1 = this.$this; - return t1._addExceptionTrace$1(new A._EvaluateVisitor_runExpression___closure(t1, this.expression)); - }, - $signature: 38 - }; - A._EvaluateVisitor_runExpression___closure.prototype = { - call$0() { - return this.expression.accept$1(this.$this); - }, - $signature: 38 - }; - A._EvaluateVisitor_runStatement_closure.prototype = { - call$0() { - var t1 = this.$this, - t2 = this.statement; - return t1._withFakeStylesheet$3(this.importer, t2, new A._EvaluateVisitor_runStatement__closure(t1, t2)); - }, - $signature: 0 - }; - A._EvaluateVisitor_runStatement__closure.prototype = { - call$0() { - var t1 = this.$this; - return t1._addExceptionTrace$1(new A._EvaluateVisitor_runStatement___closure(t1, this.statement)); - }, - $signature: 0 - }; - A._EvaluateVisitor_runStatement___closure.prototype = { - call$0() { - return this.statement.accept$1(this.$this); - }, - $signature: 0 - }; - A._EvaluateVisitor__loadModule_closure.prototype = { - call$0() { - return this.callback.call$2(this._box_1.builtInModule, false); - }, - $signature: 0 - }; - A._EvaluateVisitor__loadModule_closure0.prototype = { - call$0() { - var canonicalUrl, oldInDependency, t4, message, _this = this, t1 = {}, stylesheet = null, importer = null, - t2 = _this.$this, - t3 = _this.nodeWithSpan, - _1_0 = t2._loadStylesheet$3$baseUrl(_this.url.toString$0(0), t3.get$span(t3), _this.baseUrl); - stylesheet = _1_0._0; - importer = _1_0._1; - t4 = stylesheet.span; - canonicalUrl = t4.get$sourceUrl(t4); - if (canonicalUrl != null) { - t4 = t2._activeModules; - if (t4.containsKey$1(canonicalUrl)) { - if (_this.namesInErrors) { - t1 = canonicalUrl; - t3 = $.$get$context(); - t1.toString; - message = "Module loop: " + t3.prettyUri$1(t1) + " is already being loaded."; - } else - message = string$.Modulel; - t1 = A.NullableExtension_andThen(t4.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure(t2, message)); - throw A.wrapException(t1 == null ? t2._evaluate$_exception$1(message) : t1); - } else - t4.$indexSet(0, canonicalUrl, t3); - } - t4 = t2._modules.containsKey$1(canonicalUrl); - oldInDependency = t2._inDependency; - t2._inDependency = _1_0._2; - t1.module = null; - try { - t1.module = t2._execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, _this.configuration, _this.namesInErrors, t3); - } finally { - t2._activeModules.remove$1(0, canonicalUrl); - t2._inDependency = oldInDependency; - } - t2._addExceptionSpan$3$addStackFrame(t3, new A._EvaluateVisitor__loadModule__closure0(t1, _this.callback, !t4), false); - }, - $signature: 1 - }; - A._EvaluateVisitor__loadModule__closure.prototype = { - call$1(previousLoad) { - return this.$this._multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); - }, - $signature: 84 - }; - A._EvaluateVisitor__loadModule__closure0.prototype = { - call$0() { - return this.callback.call$2(this._box_0.module, this.firstLoad); - }, - $signature: 0 - }; - A._EvaluateVisitor__execute_closure.prototype = { - call$0() { - var t3, t4, t5, t6, _this = this, - t1 = _this.$this, - oldImporter = t1._importer, - oldStylesheet = t1.__stylesheet, - oldRoot = t1.__root, - oldPreModuleComments = t1._preModuleComments, - oldParent = t1.__parent, - oldEndOfImports = t1.__endOfImports, - oldOutOfOrderImports = t1._outOfOrderImports, - oldExtensionStore = t1.__extensionStore, - t2 = t1._atRootExcludingStyleRule, - oldStyleRule = t2 ? null : t1._styleRuleIgnoringAtRoot, - oldMediaQueries = t1._mediaQueries, - oldDeclarationName = t1._declarationName, - oldInUnknownAtRule = t1._inUnknownAtRule, - oldInKeyframes = t1._inKeyframes, - oldConfiguration = t1._configuration; - t1._importer = _this.importer; - t3 = t1.__stylesheet = _this.stylesheet; - t4 = t3.span; - t5 = t1.__parent = t1.__root = A.ModifiableCssStylesheet$(t4); - t1.__endOfImports = 0; - t1._outOfOrderImports = null; - t1.__extensionStore = _this.extensionStore; - t1._declarationName = t1._mediaQueries = t1._styleRuleIgnoringAtRoot = null; - t1._inKeyframes = t1._atRootExcludingStyleRule = t1._inUnknownAtRule = false; - t6 = _this.configuration; - if (t6 != null) - t1._configuration = t6; - t1.visitStylesheet$1(0, t3); - t3 = t1._outOfOrderImports == null ? t5 : new A.CssStylesheet(new A.UnmodifiableListView(t1._addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode), t4); - _this.css.__late_helper$_value = t3; - _this.preModuleComments.__late_helper$_value = t1._preModuleComments; - t1._importer = oldImporter; - t1.__stylesheet = oldStylesheet; - t1.__root = oldRoot; - t1._preModuleComments = oldPreModuleComments; - t1.__parent = oldParent; - t1.__endOfImports = oldEndOfImports; - t1._outOfOrderImports = oldOutOfOrderImports; - t1.__extensionStore = oldExtensionStore; - t1._styleRuleIgnoringAtRoot = oldStyleRule; - t1._mediaQueries = oldMediaQueries; - t1._declarationName = oldDeclarationName; - t1._inUnknownAtRule = oldInUnknownAtRule; - t1._atRootExcludingStyleRule = t2; - t1._inKeyframes = oldInKeyframes; - t1._configuration = oldConfiguration; - }, - $signature: 1 - }; - A._EvaluateVisitor__combineCss_closure.prototype = { - call$1(module) { - return module.get$transitivelyContainsCss(); - }, - $signature: 118 - }; - A._EvaluateVisitor__combineCss_closure0.prototype = { - call$1(target) { - return !this.selectors.contains$1(0, target); - }, - $signature: 13 - }; - A._EvaluateVisitor__combineCss_visitModule.prototype = { - call$1(module) { - var t1, t2, t3, t4, _i, upstream, _1_0, statements, index, _this = this; - if (!_this.seen.add$1(0, module)) - return; - if (_this.clone) - module = module.cloneCss$0(); - for (t1 = module.get$upstream(), t2 = t1.length, t3 = _this.css, t4 = _this.imports, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - upstream = t1[_i]; - if (upstream.get$transitivelyContainsCss()) { - _1_0 = module.get$preModuleComments().$index(0, upstream); - if (_1_0 != null) - B.JSArray_methods.addAll$1(t3.length === 0 ? t4 : t3, _1_0); - _this.call$1(upstream); - } - } - _this.sorted.addFirst$1(module); - t1 = module.get$css(module); - statements = t1.get$children(t1); - index = _this.$this._indexAfterImports$1(statements); - t1 = J.getInterceptor$ax(statements); - B.JSArray_methods.addAll$1(t4, t1.getRange$2(statements, 0, index)); - B.JSArray_methods.addAll$1(t3, t1.getRange$2(statements, index, t1.get$length(statements))); - }, - $signature: 584 - }; - A._EvaluateVisitor__extendModules_closure.prototype = { - call$1(target) { - return !this.originalSelectors.contains$1(0, target); - }, - $signature: 13 - }; - A._EvaluateVisitor__extendModules_closure0.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_ExtensionStore); - }, - $signature: 170 - }; - A._EvaluateVisitor_visitAtRootRule_closure.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitAtRootRule_closure0.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 0 - }; - A._EvaluateVisitor__scopeForAtRoot_closure.prototype = { - call$1(callback) { - var t1 = this.$this, - t2 = t1._assertInModule$2(t1.__parent, "__parent"); - t1.__parent = this.newParent; - t1._environment.scope$1$2$when(callback, this.node.hasDeclarations, type$.void); - t1.__parent = t2; - }, - $signature: 37 - }; - A._EvaluateVisitor__scopeForAtRoot_closure0.prototype = { - call$1(callback) { - var t1 = this.$this, - oldAtRootExcludingStyleRule = t1._atRootExcludingStyleRule; - t1._atRootExcludingStyleRule = true; - this.innerScope.call$1(callback); - t1._atRootExcludingStyleRule = oldAtRootExcludingStyleRule; - }, - $signature: 37 - }; - A._EvaluateVisitor__scopeForAtRoot_closure1.prototype = { - call$1(callback) { - return this.$this._withMediaQueries$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure(this.innerScope, callback)); - }, - $signature: 37 - }; - A._EvaluateVisitor__scopeForAtRoot__closure.prototype = { - call$0() { - return this.innerScope.call$1(this.callback); - }, - $signature: 1 - }; - A._EvaluateVisitor__scopeForAtRoot_closure2.prototype = { - call$1(callback) { - var t1 = this.$this, - wasInKeyframes = t1._inKeyframes; - t1._inKeyframes = false; - this.innerScope.call$1(callback); - t1._inKeyframes = wasInKeyframes; - }, - $signature: 37 - }; - A._EvaluateVisitor__scopeForAtRoot_closure3.prototype = { - call$1($parent) { - return $parent instanceof A.ModifiableCssAtRule; - }, - $signature: 171 - }; - A._EvaluateVisitor__scopeForAtRoot_closure4.prototype = { - call$1(callback) { - var t1 = this.$this, - wasInUnknownAtRule = t1._inUnknownAtRule; - t1._inUnknownAtRule = false; - this.innerScope.call$1(callback); - t1._inUnknownAtRule = wasInUnknownAtRule; - }, - $signature: 37 - }; - A._EvaluateVisitor_visitContentRule_closure.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.content.declaration.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - return null; - }, - $signature: 1 - }; - A._EvaluateVisitor_visitDeclaration_closure.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this._box_0.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitEachRule_closure.prototype = { - call$1(value) { - var t1 = this.$this, - t2 = this.nodeWithSpan; - return t1._environment.setLocalVariable$3(this._box_0.variable, t1._withoutSlash$2(value, t2), t2); - }, - $signature: 58 - }; - A._EvaluateVisitor_visitEachRule_closure0.prototype = { - call$1(value) { - return this.$this._setMultipleVariables$3(this._box_0.variables, value, this.nodeWithSpan); - }, - $signature: 58 - }; - A._EvaluateVisitor_visitEachRule_closure1.prototype = { - call$0() { - var _this = this, - t1 = _this.$this; - return t1._handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure(t1, _this.setVariables, _this.node)); - }, - $signature: 44 - }; - A._EvaluateVisitor_visitEachRule__closure.prototype = { - call$1(element) { - var t1; - this.setVariables.call$1(element); - t1 = this.$this; - return t1._handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure(t1)); - }, - $signature: 602 - }; - A._EvaluateVisitor_visitEachRule___closure.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 82 - }; - A._EvaluateVisitor_visitAtRule_closure.prototype = { - call$1(value) { - return this.$this._interpolationToValue$3$trim$warnForColor(value, true, true); - }, - $signature: 630 - }; - A._EvaluateVisitor_visitAtRule_closure0.prototype = { - call$0() { - var t2, t3, _i, _this = this, - t1 = _this.$this, - styleRule = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; - if (styleRule == null || t1._inKeyframes || J.$eq$(_this.name.value, "font-face")) - for (t2 = _this.children, t3 = t2.length, _i = 0; _i < t3; ++_i) - t2[_i].accept$1(t1); - else - t1._withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(styleRule._style_rule$_selector, styleRule.span, false, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure(t1, _this.children), false, type$.ModifiableCssStyleRule, type$.Null); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitAtRule__closure.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitAtRule_closure1.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitForRule_closure.prototype = { - call$0() { - return this.node.from.accept$1(this.$this).assertNumber$0(); - }, - $signature: 189 - }; - A._EvaluateVisitor_visitForRule_closure0.prototype = { - call$0() { - return this.node.to.accept$1(this.$this).assertNumber$0(); - }, - $signature: 189 - }; - A._EvaluateVisitor_visitForRule_closure1.prototype = { - call$0() { - return this.fromNumber.assertInt$0(); - }, - $signature: 10 - }; - A._EvaluateVisitor_visitForRule_closure2.prototype = { - call$0() { - var t1 = this.fromNumber; - return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); - }, - $signature: 10 - }; - A._EvaluateVisitor_visitForRule_closure3.prototype = { - call$0() { - var i, t3, t4, t5, t6, t7, t8, _0_0, _this = this, - t1 = _this.$this, - t2 = _this.node, - nodeWithSpan = t1._expressionNode$1(t2.from); - for (i = _this.from, t3 = _this._box_0, t4 = _this.direction, t5 = t2.variable, t6 = _this.fromNumber, t2 = t2.children; i !== t3.to; i += t4) { - t7 = t1._environment; - t8 = t6.get$numeratorUnits(t6); - t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); - _0_0 = t1._handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure(t1)); - if (_0_0 != null) - return _0_0; - } - return null; - }, - $signature: 44 - }; - A._EvaluateVisitor_visitForRule__closure.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 82 - }; - A._EvaluateVisitor_visitForwardRule_closure.prototype = { - call$2(module, firstLoad) { - if (firstLoad) - this.$this._registerCommentsForModule$1(module); - this.$this._environment.forwardModule$2(module, this.node); - }, - $signature: 81 - }; - A._EvaluateVisitor_visitForwardRule_closure0.prototype = { - call$2(module, firstLoad) { - if (firstLoad) - this.$this._registerCommentsForModule$1(module); - this.$this._environment.forwardModule$2(module, this.node); - }, - $signature: 81 - }; - A._EvaluateVisitor__registerCommentsForModule_closure.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_CssComment); - }, - $signature: 176 - }; - A._EvaluateVisitor_visitIfRule_closure.prototype = { - call$1(clause) { - var t1 = this.$this; - return t1._environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule__closure(t1, clause), true, clause.hasDeclarations, type$.nullable_Value); - }, - $signature: 646 - }; - A._EvaluateVisitor_visitIfRule__closure.prototype = { - call$0() { - var t1 = this.$this; - return t1._handleReturn$2(this.clause.children, new A._EvaluateVisitor_visitIfRule___closure(t1)); - }, - $signature: 44 - }; - A._EvaluateVisitor_visitIfRule___closure.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 82 - }; - A._EvaluateVisitor__visitDynamicImport_closure.prototype = { - call$0() { - var t1, t2, _0_0, stylesheet, importer, isDependency, t3, url, oldImporter, oldInDependency, loadsUserDefinedModules, children, t4, t5, t6, t7, t8, t9, t10, environment, module, visitor, _box_0 = {}; - _box_0.isDependency = _box_0.importer = _box_0.stylesheet = null; - t1 = this.$this; - t2 = this.$import; - _0_0 = t1._loadStylesheet$3$forImport(t2.urlString, t2.span, true); - stylesheet = _box_0.stylesheet = _0_0._0; - importer = _0_0._1; - _box_0.importer = importer; - isDependency = _0_0._2; - _box_0.isDependency = isDependency; - t3 = stylesheet.span; - url = t3.get$sourceUrl(t3); - if (url != null) { - t3 = t1._activeModules; - if (t3.containsKey$1(url)) { - t2 = A.NullableExtension_andThen(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure(t1)); - throw A.wrapException(t2 == null ? t1._evaluate$_exception$1("This file is already being loaded.") : t2); - } - t3.$indexSet(0, url, t2); - } - t2 = stylesheet._uses; - t3 = type$.UnmodifiableListView_UseRule; - if (new A.UnmodifiableListView(t2, t3).get$length(0) === 0 && new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule).get$length(0) === 0) { - oldImporter = t1._importer; - t2 = t1._assertInModule$2(t1.__stylesheet, "_stylesheet"); - oldInDependency = t1._inDependency; - t1._importer = importer; - t1.__stylesheet = stylesheet; - t1._inDependency = isDependency; - t1.visitStylesheet$1(0, stylesheet); - t1._importer = oldImporter; - t1.__stylesheet = t2; - t1._inDependency = oldInDependency; - t1._activeModules.remove$1(0, url); - return; - } - t2 = new A.UnmodifiableListView(t2, t3); - if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure0())) { - t2 = new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); - loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure1()); - } else - loadsUserDefinedModules = true; - children = A._Cell$(); - t2 = t1._environment; - t3 = type$.String; - t4 = type$.Module_Callable; - t5 = type$.AstNode; - t6 = A._setArrayType([], type$.JSArray_Module_Callable); - t7 = t2._variables; - t7 = A._setArrayType(t7.slice(0), A._arrayInstanceType(t7)); - t8 = t2._variableNodes; - t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); - t9 = t2._functions; - t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); - t10 = t2._mixins; - t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); - environment = A.Environment$_(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._importedModules, null, null, t6, t7, t8, t9, t10, t2._content); - t1._withEnvironment$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure2(_box_0, t1, loadsUserDefinedModules, environment, children)); - module = environment.toDummyModule$0(); - t1._environment.importForwards$1(module); - if (loadsUserDefinedModules) { - if (module.transitivelyContainsCss) - t1._combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1); - visitor = new A._ImportedCssVisitor(t1); - for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) - t2.get$current(t2).accept$1(visitor); - } - t1._activeModules.remove$1(0, url); - }, - $signature: 0 - }; - A._EvaluateVisitor__visitDynamicImport__closure.prototype = { - call$1(previousLoad) { - return this.$this._multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); - }, - $signature: 84 - }; - A._EvaluateVisitor__visitDynamicImport__closure0.prototype = { - call$1(rule) { - return rule.url.get$scheme() !== "sass"; - }, - $signature: 177 - }; - A._EvaluateVisitor__visitDynamicImport__closure1.prototype = { - call$1(rule) { - return rule.url.get$scheme() !== "sass"; - }, - $signature: 178 - }; - A._EvaluateVisitor__visitDynamicImport__closure2.prototype = { - call$0() { - var t7, t8, _this = this, - t1 = _this.$this, - oldImporter = t1._importer, - t2 = t1._assertInModule$2(t1.__stylesheet, "_stylesheet"), - t3 = t1._assertInModule$2(t1.__root, "_root"), - t4 = t1._assertInModule$2(t1.__parent, "__parent"), - t5 = t1._assertInModule$2(t1.__endOfImports, "_endOfImports"), - oldOutOfOrderImports = t1._outOfOrderImports, - oldConfiguration = t1._configuration, - oldInDependency = t1._inDependency, - t6 = _this._box_0; - t1._importer = t6.importer; - t7 = t6.stylesheet; - t1.__stylesheet = t7; - t8 = _this.loadsUserDefinedModules; - if (t8) { - t7 = A.ModifiableCssStylesheet$(t7.span); - t1.__root = t7; - t1.__parent = t1._assertInModule$2(t7, "_root"); - t1.__endOfImports = 0; - t1._outOfOrderImports = null; - } - t1._inDependency = t6.isDependency; - t7 = new A.UnmodifiableListView(t6.stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); - if (!t7.get$isEmpty(t7)) - t1._configuration = _this.environment.toImplicitConfiguration$0(); - t1.visitStylesheet$1(0, t6.stylesheet); - t6 = t8 ? t1._addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode); - _this.children.__late_helper$_value = t6; - t1._importer = oldImporter; - t1.__stylesheet = t2; - if (t8) { - t1.__root = t3; - t1.__parent = t4; - t1.__endOfImports = t5; - t1._outOfOrderImports = oldOutOfOrderImports; - } - t1._configuration = oldConfiguration; - t1._inDependency = oldInDependency; - }, - $signature: 1 - }; - A._EvaluateVisitor__applyMixin_closure.prototype = { - call$0() { - var _this = this, - t1 = _this.$this; - t1._environment.asMixin$1(new A._EvaluateVisitor__applyMixin__closure0(t1, _this.$arguments, _this.mixin, _this.nodeWithSpanWithoutContent)); - }, - $signature: 0 - }; - A._EvaluateVisitor__applyMixin__closure0.prototype = { - call$0() { - var _this = this; - _this.$this._runBuiltInCallable$3(_this.$arguments, _this.mixin, _this.nodeWithSpanWithoutContent); - }, - $signature: 0 - }; - A._EvaluateVisitor__applyMixin_closure0.prototype = { - call$0() { - var _this = this, - t1 = _this.$this; - t1._environment.withContent$2(_this.contentCallable, new A._EvaluateVisitor__applyMixin__closure(t1, _this.mixin, _this.nodeWithSpanWithoutContent)); - }, - $signature: 1 - }; - A._EvaluateVisitor__applyMixin__closure.prototype = { - call$0() { - var t1 = this.$this; - t1._environment.asMixin$1(new A._EvaluateVisitor__applyMixin___closure(t1, this.mixin, this.nodeWithSpanWithoutContent)); - }, - $signature: 0 - }; - A._EvaluateVisitor__applyMixin___closure.prototype = { - call$0() { - var t1, t2, t3, t4, _i; - for (t1 = this.mixin.declaration.children, t2 = t1.length, t3 = this.$this, t4 = this.nodeWithSpanWithoutContent, _i = 0; _i < t2; ++_i) - t3._addErrorSpan$2(t4, new A._EvaluateVisitor__applyMixin____closure(t3, t1[_i])); - }, - $signature: 0 - }; - A._EvaluateVisitor__applyMixin____closure.prototype = { - call$0() { - return this.statement.accept$1(this.$this); - }, - $signature: 44 - }; - A._EvaluateVisitor_visitIncludeRule_closure.prototype = { - call$0() { - var t1 = this.node; - return this.$this._environment.getMixin$2$namespace(t1.name, t1.namespace); - }, - $signature: 108 - }; - A._EvaluateVisitor_visitIncludeRule_closure0.prototype = { - call$1($content) { - var t1 = this.$this; - return new A.UserDefinedCallable($content, t1._environment.closure$0(), t1._inDependency, type$.UserDefinedCallable_Environment); - }, - $signature: 649 - }; - A._EvaluateVisitor_visitIncludeRule_closure1.prototype = { - call$0() { - return this.node.get$spanWithoutContent(); - }, - $signature: 27 - }; - A._EvaluateVisitor_visitMediaRule_closure.prototype = { - call$1(mediaQueries) { - return this.$this._mergeMediaQueries$2(mediaQueries, this.queries); - }, - $signature: 80 - }; - A._EvaluateVisitor_visitMediaRule_closure0.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.mergedQueries; - if (t2 == null) - t2 = _this.queries; - t1._withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure(t1, _this.node)); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitMediaRule__closure.prototype = { - call$0() { - var t2, t3, _i, - t1 = this.$this, - _0_0 = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; - if (_0_0 != null) - t1._withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure(t1, this.node), false, type$.ModifiableCssStyleRule, type$.Null); - else - for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) - t2[_i].accept$1(t1); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitMediaRule___closure.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitMediaRule_closure1.prototype = { - call$1(node) { - var t1; - if (!(node instanceof A.ModifiableCssStyleRule)) { - t1 = this.mergedSources; - t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); - } else - t1 = true; - return t1; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitStyleRule_closure.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitStyleRule_closure0.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitStyleRule_closure2.prototype = { - call$0() { - var t1 = this.$this; - t1._withStyleRule$2(this.rule, new A._EvaluateVisitor_visitStyleRule__closure(t1, this.node)); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitStyleRule__closure.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitStyleRule_closure1.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor__warnForBogusCombinators_closure.prototype = { - call$1(child) { - return child instanceof A.ModifiableCssComment; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitSupportsRule_closure.prototype = { - call$0() { - var t2, t3, _i, - t1 = this.$this, - _0_0 = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; - if (_0_0 != null) - t1._withParent$2$2(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure(t1, this.node), type$.ModifiableCssStyleRule, type$.Null); - else - for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) - t2[_i].accept$1(t1); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitSupportsRule__closure.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitSupportsRule_closure0.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor__visitSupportsCondition_closure.prototype = { - call$0() { - var t4, - t1 = this.$this, - t2 = this._box_0, - t3 = t2.declaration.name; - t3 = t1._evaluate$_serialize$3$quote(t3.accept$1(t1), t3, true); - t4 = t2.declaration.get$isCustomProperty() ? "" : " "; - t2 = t2.declaration.value; - return "(" + t3 + ":" + t4 + t1._evaluate$_serialize$3$quote(t2.accept$1(t1), t2, true) + ")"; - }, - $signature: 30 - }; - A._EvaluateVisitor_visitVariableDeclaration_closure.prototype = { - call$0() { - var t1 = this.$this._environment, - t2 = this._box_0.override; - t1.setVariable$4$global(this.node.name, t2.value, t2.assignmentNode, true); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitVariableDeclaration_closure0.prototype = { - call$0() { - var t1 = this.node; - return this.$this._environment.getVariable$2$namespace(t1.name, t1.namespace); - }, - $signature: 44 - }; - A._EvaluateVisitor_visitVariableDeclaration_closure1.prototype = { - call$0() { - var t1 = this.$this, - t2 = this.node; - t1._environment.setVariable$5$global$namespace(t2.name, this.value, t1._expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitUseRule_closure.prototype = { - call$2(module, firstLoad) { - var t1, t2, t3, _0_0, t4, t5, span; - if (firstLoad) - this.$this._registerCommentsForModule$1(module); - t1 = this.$this._environment; - t2 = this.node; - t3 = t2.namespace; - if (t3 == null) { - t1._globalModules.$indexSet(0, module, t2); - t1._allModules.push(module); - _0_0 = A.IterableExtension_firstWhereOrNull(J.get$keys$z(B.JSArray_methods.get$first(t1._variables)), module.get$variables().get$containsKey()); - if (_0_0 != null) - A.throwExpression(A.SassScriptException$(string$.This_ma + _0_0 + '".', null)); - } else { - t4 = t1._environment$_modules; - if (t4.containsKey$1(t3)) { - t5 = t1._namespaceNodes.$index(0, t3); - span = t5 == null ? null : t5.span; - t5 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - if (span != null) - t5.$indexSet(0, span, "original @use"); - A.throwExpression(A.MultiSpanSassScriptException$(string$.There_ + t3 + '".', "new @use", t5)); - } - t4.$indexSet(0, t3, module); - t1._namespaceNodes.$indexSet(0, t3, t2); - t1._allModules.push(module); - } - }, - $signature: 81 - }; - A._EvaluateVisitor_visitWarnRule_closure.prototype = { - call$0() { - return this.node.expression.accept$1(this.$this); - }, - $signature: 38 - }; - A._EvaluateVisitor_visitWhileRule_closure.prototype = { - call$0() { - var t1, t2, t3, _0_0; - for (t1 = this.node, t2 = t1.condition, t3 = this.$this, t1 = t1.children; t2.accept$1(t3).get$isTruthy();) { - _0_0 = t3._handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure(t3)); - if (_0_0 != null) - return _0_0; - } - return null; - }, - $signature: 44 - }; - A._EvaluateVisitor_visitWhileRule__closure.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 82 - }; - A._EvaluateVisitor_visitBinaryOperationExpression_closure.prototype = { - call$0() { - var t1 = this.node, - t2 = this.$this, - left = t1.left.accept$1(t2); - switch (t1.operator) { - case B.BinaryOperator_wdM: - t1 = t1.right.accept$1(t2); - t1 = new A.SassString(A.serializeValue(left, false, true) + "=" + A.serializeValue(t1, false, true), false); - break; - case B.BinaryOperator_qNM: - t1 = left.get$isTruthy() ? left : t1.right.accept$1(t2); - break; - case B.BinaryOperator_eDt: - t1 = left.get$isTruthy() ? t1.right.accept$1(t2) : left; - break; - case B.BinaryOperator_g8k: - t1 = left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true : B.SassBoolean_false; - break; - case B.BinaryOperator_icU: - t1 = !left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true : B.SassBoolean_false; - break; - case B.BinaryOperator_bEa: - t1 = left.greaterThan$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_oEm: - t1 = left.greaterThanOrEquals$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_miq: - t1 = left.lessThan$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_SPQ: - t1 = left.lessThanOrEquals$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_u15: - t1 = left.plus$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_SjO: - t1 = left.minus$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_2No: - t1 = left.times$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_U77: - t1 = t2._slash$3(left, t1.right.accept$1(t2), t1); - break; - case B.BinaryOperator_KNx: - t1 = left.modulo$1(t1.right.accept$1(t2)); - break; - default: - t1 = null; - } - return t1; - }, - $signature: 38 - }; - A._EvaluateVisitor__slash_recommendation.prototype = { - call$1(expression) { - var t1; - $label0$0: { - if (expression instanceof A.BinaryOperationExpression && B.BinaryOperator_U77 === expression.operator) { - t1 = "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; - break $label0$0; - } - if (expression instanceof A.ParenthesizedExpression) { - t1 = expression.expression.toString$0(0); - break $label0$0; - } - t1 = expression.toString$0(0); - break $label0$0; - } - return t1; - }, - $signature: 134 - }; - A._EvaluateVisitor_visitVariableExpression_closure.prototype = { - call$0() { - var t1 = this.node; - return this.$this._environment.getVariable$2$namespace(t1.name, t1.namespace); - }, - $signature: 44 - }; - A._EvaluateVisitor_visitUnaryOperationExpression_closure.prototype = { - call$0() { - var t1, _this = this; - switch (_this.node.operator) { - case B.UnaryOperator_cLp: - t1 = _this.operand.unaryPlus$0(); - break; - case B.UnaryOperator_AiQ: - t1 = _this.operand.unaryMinus$0(); - break; - case B.UnaryOperator_SJr: - t1 = new A.SassString("/" + A.serializeValue(_this.operand, false, true), false); - break; - case B.UnaryOperator_not_not_not: - t1 = _this.operand.unaryNot$0(); - break; - default: - t1 = null; - } - return t1; - }, - $signature: 38 - }; - A._EvaluateVisitor_visitListExpression_closure.prototype = { - call$1(expression) { - return expression.accept$1(this.$this); - }, - $signature: 670 - }; - A._EvaluateVisitor_visitFunctionExpression_closure.prototype = { - call$0() { - var t1 = this.node; - return this.$this._environment.getFunction$2$namespace(t1.name, t1.namespace); - }, - $signature: 108 - }; - A._EvaluateVisitor_visitFunctionExpression_closure0.prototype = { - call$1(argument) { - return argument.accept$1(B.C_IsCalculationSafeVisitor); - }, - $signature: 123 - }; - A._EvaluateVisitor_visitFunctionExpression_closure1.prototype = { - call$0() { - var t1 = this.node; - return this.$this._runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); - }, - $signature: 38 - }; - A._EvaluateVisitor__visitCalculation_closure.prototype = { - call$2(message, deprecation) { - return this.$this._warn$3(message, this.node.span, deprecation); - }, - call$1(message) { - return this.call$2(message, null); - }, - $signature: 100 - }; - A._EvaluateVisitor__checkCalculationArguments_check.prototype = { - call$1(maxArgs) { - var t1 = this.node, - t2 = t1.$arguments.positional.length; - if (t2 === 0) - throw A.wrapException(this.$this._evaluate$_exception$2("Missing argument.", t1.span)); - else if (maxArgs != null && t2 > maxArgs) - throw A.wrapException(this.$this._evaluate$_exception$2("Only " + A.S(maxArgs) + " " + A.pluralize("argument", maxArgs, null) + " allowed, but " + t2 + " " + A.pluralize("was", t2, "were") + " passed.", t1.span)); - }, - call$0() { - return this.call$1(null); - }, - $signature: 102 - }; - A._EvaluateVisitor__visitCalculationExpression_closure.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this._box_0, - t3 = _this.node, - t4 = _this.inLegacySassFunction; - return A.SassCalculation_operateInternal(t1._binaryOperatorToCalculationOperator$2(t2.operator, t3), t1._visitCalculationExpression$2$inLegacySassFunction(t2.left, t4), t1._visitCalculationExpression$2$inLegacySassFunction(t2.right, t4), t4, !t1._inSupportsDeclaration, new A._EvaluateVisitor__visitCalculationExpression__closure(t1, t3)); - }, - $signature: 83 - }; - A._EvaluateVisitor__visitCalculationExpression__closure.prototype = { - call$2(message, deprecation) { - return this.$this._warn$3(message, this.node.get$span(0), deprecation); - }, - call$1(message) { - return this.call$2(message, null); - }, - $signature: 100 - }; - A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure.prototype = { - call$0() { - var t1 = this.node; - return this.$this._runFunctionCallable$3(t1.$arguments, this.$function, t1); - }, - $signature: 38 - }; - A._EvaluateVisitor__runUserDefinedCallable_closure.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.callable; - return t1._withEnvironment$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, _this.V)); - }, - $signature() { - return this.V._eval$1("0()"); - } - }; - A._EvaluateVisitor__runUserDefinedCallable__closure.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.V; - return t1._environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); - }, - $signature() { - return this.V._eval$1("0()"); - } - }; - A._EvaluateVisitor__runUserDefinedCallable___closure.prototype = { - call$0() { - var declaredArguments, t5, minLength, i, argument, t6, t7, value, t8, restArgument, rest, argumentList, result, argumentWord, _this = this, - t1 = _this.$this, - t2 = _this.evaluated._values, - t3 = _this.callable.declaration.$arguments, - t4 = _this.nodeWithSpan; - t1._verifyArguments$4(t2[2].length, t2[0], t3, t4); - declaredArguments = t3.$arguments; - t5 = declaredArguments.length; - minLength = Math.min(t2[2].length, t5); - for (i = 0; i < minLength; ++i) - t1._environment.setLocalVariable$3(declaredArguments[i].name, t2[2][i], t2[3][i]); - for (i = t2[2].length; i < t5; ++i) { - argument = declaredArguments[i]; - t6 = t2[0]; - t7 = argument.name; - value = t6.remove$1(0, t7); - if (value == null) { - t6 = argument.defaultValue; - value = t1._withoutSlash$2(t6.accept$1(t1), t1._expressionNode$1(t6)); - } - t6 = t1._environment; - t8 = t2[1].$index(0, t7); - if (t8 == null) { - t8 = argument.defaultValue; - t8.toString; - t8 = t1._expressionNode$1(t8); - } - t6.setLocalVariable$3(t7, value, t8); - } - restArgument = t3.restArgument; - if (restArgument != null) { - t6 = t2[2]; - rest = t6.length > t5 ? B.JSArray_methods.sublist$1(t6, t5) : B.List_empty8; - t5 = t2[0]; - t6 = t2[4]; - argumentList = A.SassArgumentList$(rest, t5, t6 === B.ListSeparator_undecided_null_undecided ? B.ListSeparator_ECn : t6); - t1._environment.setLocalVariable$3(restArgument, argumentList, t4); - } else - argumentList = null; - result = _this.run.call$0(); - if (argumentList == null) - return result; - t5 = t2[0].__js_helper$_length; - if (t5 === 0) - return result; - if (argumentList._wereKeywordsAccessed) - return result; - argumentWord = A.pluralize("argument", t5, null); - t2 = t2[0]; - t5 = A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"); - throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + argumentWord + " named " + A.toSentence(A.MappedIterable_MappedIterable(new A.LinkedHashMapKeyIterable(t2, t5), new A._EvaluateVisitor__runUserDefinedCallable____closure(), t5._eval$1("Iterable.E"), type$.Object), "or") + ".", t4.get$span(t4), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t3.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._evaluate$_stackTrace$1(t4.get$span(t4)), null)); - }, - $signature() { - return this.V._eval$1("0()"); - } - }; - A._EvaluateVisitor__runUserDefinedCallable____closure.prototype = { - call$1($name) { - return "$" + $name; - }, - $signature: 6 - }; - A._EvaluateVisitor__runFunctionCallable_closure.prototype = { - call$0() { - var t1, t2, t3, t4, _i, $returnValue; - for (t1 = this.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = this.$this, _i = 0; _i < t3; ++_i) { - $returnValue = t2[_i].accept$1(t4); - if ($returnValue instanceof A.Value) - return $returnValue; - } - throw A.wrapException(t4._evaluate$_exception$2("Function finished without @return.", t1.span)); - }, - $signature: 38 - }; - A._EvaluateVisitor__runBuiltInCallable_closure.prototype = { - call$0() { - return this._box_0.overload.verify$2(this.evaluated._values[2].length, this.namedSet); - }, - $signature: 0 - }; - A._EvaluateVisitor__runBuiltInCallable_closure0.prototype = { - call$0() { - return this._box_0.callback.call$1(this.evaluated._values[2]); - }, - $signature: 38 - }; - A._EvaluateVisitor__runBuiltInCallable_closure1.prototype = { - call$1($name) { - return "$" + $name; - }, - $signature: 6 - }; - A._EvaluateVisitor__evaluateArguments_closure.prototype = { - call$1(value) { - return value; - }, - $signature: 42 - }; - A._EvaluateVisitor__evaluateArguments_closure0.prototype = { - call$1(value) { - return this.$this._withoutSlash$2(value, this.restNodeForSpan); - }, - $signature: 42 - }; - A._EvaluateVisitor__evaluateArguments_closure1.prototype = { - call$2(key, value) { - var _this = this, - t1 = _this.restNodeForSpan; - _this.named.$indexSet(0, key, _this.$this._withoutSlash$2(value, t1)); - _this.namedNodes.$indexSet(0, key, t1); - }, - $signature: 106 - }; - A._EvaluateVisitor__evaluateArguments_closure2.prototype = { - call$1(value) { - return value; - }, - $signature: 42 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure.prototype = { - call$1(value) { - var t1 = this.restArgs; - return new A.ValueExpression(value, t1.get$span(t1)); - }, - $signature: 62 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure0.prototype = { - call$1(value) { - var t1 = this.restArgs; - return new A.ValueExpression(this.$this._withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); - }, - $signature: 62 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure1.prototype = { - call$2(key, value) { - var _this = this, - t1 = _this.restArgs; - _this.named.$indexSet(0, key, new A.ValueExpression(_this.$this._withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); - }, - $signature: 106 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure2.prototype = { - call$1(value) { - var t1 = this.keywordRestArgs; - return new A.ValueExpression(this.$this._withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); - }, - $signature: 62 - }; - A._EvaluateVisitor__addRestMap_closure.prototype = { - call$2(key, value) { - var t2, _this = this, - t1 = _this.$this; - if (key instanceof A.SassString) - _this.values.$indexSet(0, key._string$_text, _this.convert.call$1(t1._withoutSlash$2(value, _this.expressionNode))); - else { - t2 = _this.nodeWithSpan; - throw A.wrapException(t1._evaluate$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); - } - }, - $signature: 95 - }; - A._EvaluateVisitor__verifyArguments_closure.prototype = { - call$0() { - return this.$arguments.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); - }, - $signature: 0 - }; - A._EvaluateVisitor_visitCssAtRule_closure.prototype = { - call$0() { - var t1, t2, t3, t4; - for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t4 = t1.__internal$_current; - (t4 == null ? t2._as(t4) : t4).accept$1(t3); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssAtRule_closure0.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitCssKeyframeBlock_closure.prototype = { - call$0() { - var t1, t2, t3, t4; - for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t4 = t1.__internal$_current; - (t4 == null ? t2._as(t4) : t4).accept$1(t3); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssKeyframeBlock_closure0.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitCssMediaRule_closure.prototype = { - call$1(mediaQueries) { - return this.$this._mergeMediaQueries$2(mediaQueries, this.node.queries); - }, - $signature: 80 - }; - A._EvaluateVisitor_visitCssMediaRule_closure0.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.mergedQueries; - if (t2 == null) - t2 = _this.node.queries; - t1._withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure(t1, _this.node)); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssMediaRule__closure.prototype = { - call$0() { - var t2, t3, t4, - t1 = this.$this, - _0_0 = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; - if (_0_0 != null) - t1._withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure(t1, this.node), false, type$.ModifiableCssStyleRule, type$.Null); - else - for (t2 = this.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { - t4 = t2.__internal$_current; - (t4 == null ? t3._as(t4) : t4).accept$1(t1); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssMediaRule___closure.prototype = { - call$0() { - var t1, t2, t3, t4; - for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t4 = t1.__internal$_current; - (t4 == null ? t2._as(t4) : t4).accept$1(t3); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssMediaRule_closure1.prototype = { - call$1(node) { - var t1; - if (!(node instanceof A.ModifiableCssStyleRule)) { - t1 = this.mergedSources; - t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); - } else - t1 = true; - return t1; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitCssStyleRule_closure0.prototype = { - call$0() { - var t1 = this.$this; - t1._withStyleRule$2(this.rule, new A._EvaluateVisitor_visitCssStyleRule__closure(t1, this.node)); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssStyleRule__closure.prototype = { - call$0() { - var t1, t2, t3, t4; - for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t4 = t1.__internal$_current; - (t4 == null ? t2._as(t4) : t4).accept$1(t3); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssStyleRule_closure.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor_visitCssSupportsRule_closure.prototype = { - call$0() { - var t2, t3, t4, - t1 = this.$this, - _0_0 = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; - if (_0_0 != null) - t1._withParent$2$2(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure(t1, this.node), type$.ModifiableCssStyleRule, type$.Null); - else - for (t2 = this.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { - t4 = t2.__internal$_current; - (t4 == null ? t3._as(t4) : t4).accept$1(t1); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssSupportsRule__closure.prototype = { - call$0() { - var t1, t2, t3, t4; - for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t4 = t1.__internal$_current; - (t4 == null ? t2._as(t4) : t4).accept$1(t3); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssSupportsRule_closure0.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluateVisitor__performInterpolationHelper_closure.prototype = { - call$1(targetLocations) { - return A.InterpolationMap$(this.interpolation, targetLocations); - }, - $signature: 185 - }; - A._EvaluateVisitor__serialize_closure.prototype = { - call$0() { - return A.serializeValue(this.value, false, this.quote); - }, - $signature: 30 - }; - A._EvaluateVisitor__expressionNode_closure.prototype = { - call$0() { - var t1 = this.expression; - return this.$this._environment.getVariableNode$2$namespace(t1.name, t1.namespace); - }, - $signature: 142 - }; - A._EvaluateVisitor__withoutSlash_recommendation.prototype = { - call$1(number) { - var before, after, t1, - _1_0 = number.asSlash; - $label0$0: { - if (type$.Record_2_nullable_Object_and_nullable_Object._is(_1_0)) { - before = _1_0._0; - after = _1_0._1; - t1 = "math.div(" + A.S(this.call$1(before)) + ", " + A.S(this.call$1(after)) + ")"; - break $label0$0; - } - t1 = A.serializeValue(number, true, true); - break $label0$0; - } - return t1; - }, - $signature: 187 - }; - A._EvaluateVisitor__stackFrame_closure.prototype = { - call$1(url) { - var t1 = this.$this._evaluate$_importCache; - t1 = t1 == null ? null : t1.humanize$1(url); - return t1 == null ? url : t1; - }, - $signature: 47 - }; - A._ImportedCssVisitor.prototype = { - visitCssAtRule$1(node) { - var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure(); - this._visitor._addChild$2$through(node, t1); - }, - visitCssComment$1(node) { - return this._visitor._addChild$1(node); - }, - visitCssDeclaration$1(node) { - }, - visitCssImport$1(node) { - var t2, - _s13_ = "_endOfImports", - t1 = this._visitor; - if (t1._assertInModule$2(t1.__parent, "__parent") !== t1._assertInModule$2(t1.__root, "_root")) - t1._addChild$1(node); - else if (t1._assertInModule$2(t1.__endOfImports, _s13_) === J.get$length$asx(t1._assertInModule$2(t1.__root, "_root").children._collection$_source)) { - t1._addChild$1(node); - t1.__endOfImports = t1._assertInModule$2(t1.__endOfImports, _s13_) + 1; - } else { - t2 = t1._outOfOrderImports; - (t2 == null ? t1._outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t2).push(node); - } - }, - visitCssKeyframeBlock$1(node) { - }, - visitCssMediaRule$1(node) { - var t1 = this._visitor, - mediaQueries = t1._mediaQueries; - t1._addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure(mediaQueries == null || t1._mergeMediaQueries$2(mediaQueries, node.queries) != null)); - }, - visitCssStyleRule$1(node) { - return this._visitor._addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure()); - }, - visitCssStylesheet$1(node) { - var t1, t2, t3; - for (t1 = node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t3 = t1.__internal$_current; - (t3 == null ? t2._as(t3) : t3).accept$1(this); - } - }, - visitCssSupportsRule$1(node) { - return this._visitor._addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure()); - } - }; - A._ImportedCssVisitor_visitCssAtRule_closure.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._ImportedCssVisitor_visitCssMediaRule_closure.prototype = { - call$1(node) { - var t1; - if (!(node instanceof A.ModifiableCssStyleRule)) - t1 = this.hasBeenMerged && node instanceof A.ModifiableCssMediaRule; - else - t1 = true; - return t1; - }, - $signature: 7 - }; - A._ImportedCssVisitor_visitCssStyleRule_closure.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._ImportedCssVisitor_visitCssSupportsRule_closure.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule; - }, - $signature: 7 - }; - A._EvaluationContext.prototype = { - get$currentCallableSpan() { - var _0_0 = this._visitor._callableNode; - if (_0_0 != null) - return _0_0.get$span(_0_0); - throw A.wrapException(A.StateError$(string$.No_Sasc)); - }, - warn$2(_, message, deprecation) { - var t1 = this._visitor, - t2 = t1._importSpan; - if (t2 == null) { - t2 = t1._callableNode; - t2 = t2 == null ? null : t2.get$span(t2); - } - if (t2 == null) { - t2 = this._defaultWarnNodeWithSpan; - t2 = t2.get$span(t2); - } - t1._warn$3(message, t2, deprecation); - }, - $isEvaluationContext: 1 - }; - A.EveryCssVisitor.prototype = { - visitCssAtRule$1(node) { - var t1 = node.children; - return t1.every$1(t1, new A.EveryCssVisitor_visitCssAtRule_closure(this)); - }, - visitCssComment$1(node) { - return false; - }, - visitCssDeclaration$1(node) { - return false; - }, - visitCssImport$1(node) { - return false; - }, - visitCssKeyframeBlock$1(node) { - var t1 = node.children; - return t1.every$1(t1, new A.EveryCssVisitor_visitCssKeyframeBlock_closure(this)); - }, - visitCssMediaRule$1(node) { - var t1 = node.children; - return t1.every$1(t1, new A.EveryCssVisitor_visitCssMediaRule_closure(this)); - }, - visitCssStyleRule$1(node) { - var t1 = node.children; - return t1.every$1(t1, new A.EveryCssVisitor_visitCssStyleRule_closure(this)); - }, - visitCssStylesheet$1(node) { - return J.every$1$ax(node.get$children(node), new A.EveryCssVisitor_visitCssStylesheet_closure(this)); - }, - visitCssSupportsRule$1(node) { - var t1 = node.children; - return t1.every$1(t1, new A.EveryCssVisitor_visitCssSupportsRule_closure(this)); - } - }; - A.EveryCssVisitor_visitCssAtRule_closure.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 7 - }; - A.EveryCssVisitor_visitCssKeyframeBlock_closure.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 7 - }; - A.EveryCssVisitor_visitCssMediaRule_closure.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 7 - }; - A.EveryCssVisitor_visitCssStyleRule_closure.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 7 - }; - A.EveryCssVisitor_visitCssStylesheet_closure.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 7 - }; - A.EveryCssVisitor_visitCssSupportsRule_closure.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 7 - }; - A._MakeExpressionCalculationSafe.prototype = { - visitBinaryOperationExpression$1(_, node) { - var t1, t2, t3, t4; - if (node.operator === B.BinaryOperator_KNx) { - t1 = A._setArrayType([node], type$.JSArray_Expression); - t2 = node.get$span(0); - t3 = type$.Expression; - t1 = A.List_List$unmodifiable(t1, t3); - t3 = A.ConstantMap_ConstantMap$from(B.Map_empty5, type$.String, t3); - t4 = node.get$span(0); - t1 = new A.FunctionExpression("math", A.stringReplaceAllUnchecked("max", "_", "-"), "max", new A.ArgumentInvocation(t1, t3, null, null, t2), t4); - } else - t1 = this.super$ReplaceExpressionVisitor$visitBinaryOperationExpression(0, node); - return t1; - }, - visitInterpolatedFunctionExpression$1(_, node) { - return node; - }, - visitUnaryOperationExpression$1(_, node) { - var t1, - _0_0 = node.operator; - $label0$0: { - if (B.UnaryOperator_cLp === _0_0) { - t1 = node.operand; - break $label0$0; - } - if (B.UnaryOperator_AiQ === _0_0) { - t1 = new A.BinaryOperationExpression(B.BinaryOperator_2No, new A.NumberExpression(-1, null, node.span), node.operand, false); - break $label0$0; - } - t1 = this.super$ReplaceExpressionVisitor$visitUnaryOperationExpression(0, node); - break $label0$0; - } - return t1; - } - }; - A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor.prototype = {}; - A._FindDependenciesVisitor.prototype = { - visitEachRule$1(_, node) { - }, - visitForRule$1(_, node) { - }, - visitIfRule$1(_, node) { - }, - visitWhileRule$1(_, node) { - }, - visitUseRule$1(_, node) { - var t1 = node.url; - if (t1.get$scheme() !== "sass") - this._find_dependencies$_uses.add$1(0, t1); - else if (t1.toString$0(0) === "sass:meta") - this._metaNamespaces.add$1(0, node.namespace); - }, - visitForwardRule$1(_, node) { - var t1 = node.url; - if (t1.get$scheme() !== "sass") - this._find_dependencies$_forwards.add$1(0, t1); - }, - visitImportRule$1(_, node) { - var t1, t2, t3, _i, $import; - for (t1 = node.imports, t2 = t1.length, t3 = this._imports, _i = 0; _i < t2; ++_i) { - $import = t1[_i]; - if ($import instanceof A.DynamicImport) - t3.add$1(0, A.Uri_parse($import.urlString)); - } - }, - visitIncludeRule$1(_, node) { - var url, _0_0, _0_4_isSet, _0_4, _0_7, t1, _0_40, t2, _0_7_isSet, url0, exception, _null = null; - if (node.name !== "load-css") - return; - if (!this._metaNamespaces.contains$1(0, node.namespace)) - return; - _0_0 = node.$arguments.positional; - url = null; - _0_4_isSet = _0_0.length === 1; - _0_4 = _null; - _0_7 = _null; - t1 = false; - if (_0_4_isSet) { - _0_40 = _0_0[0]; - t2 = _0_40; - _0_4 = t2; - _0_7_isSet = t2 instanceof A.StringExpression; - if (_0_7_isSet) { - type$.StringExpression._as(_0_4); - _0_7 = _0_4.text.get$asPlain(); - t1 = _0_7; - t1 = t1 != null; - } - } else - _0_7_isSet = false; - if (t1) { - if (_0_7_isSet) - url0 = _0_7; - else { - t1 = _0_4_isSet ? _0_4 : _0_0[0]; - _0_7 = type$.StringExpression._as(t1).text.get$asPlain(); - url0 = _0_7; - } - url = url0 == null ? A._asString(url0) : url0; - try { - this._metaLoadCss.add$1(0, A.Uri_parse(url)); - } catch (exception) { - if (!type$.FormatException._is(A.unwrapException(exception))) - throw exception; - } - } - } - }; - A.DependencyReport.prototype = {}; - A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor.prototype = {}; - A.IsCalculationSafeVisitor.prototype = { - visitBinaryOperationExpression$1(_, node) { - var t1; - if (B.Set_mqKz.contains$1(0, node.operator)) - t1 = node.left.accept$1(this) || node.right.accept$1(this); - else - t1 = false; - return t1; - }, - visitBooleanExpression$1(_, node) { - return false; - }, - visitColorExpression$1(_, node) { - return false; - }, - visitFunctionExpression$1(_, node) { - return true; - }, - visitInterpolatedFunctionExpression$1(_, node) { - return true; - }, - visitIfExpression$1(_, node) { - return true; - }, - visitListExpression$1(_, node) { - var t1 = false; - if (node.separator === B.ListSeparator_nbm) - if (!node.hasBrackets) { - t1 = node.contents; - t1 = t1.length > 1 && B.JSArray_methods.every$1(t1, new A.IsCalculationSafeVisitor_visitListExpression_closure(this)); - } - return t1; - }, - visitMapExpression$1(_, node) { - return false; - }, - visitNullExpression$1(_, node) { - return false; - }, - visitNumberExpression$1(_, node) { - return true; - }, - visitParenthesizedExpression$1(_, node) { - return node.expression.accept$1(this); - }, - visitSelectorExpression$1(_, node) { - return false; - }, - visitStringExpression$1(_, node) { - var text, t1, t2; - if (node.hasQuotes) - return false; - text = node.text.get$initialPlain(); - t1 = false; - if (!B.JSString_methods.startsWith$1(text, "!")) - if (!B.JSString_methods.startsWith$1(text, "#")) { - t2 = text.length; - if ((1 >= t2 ? null : text.charCodeAt(1)) !== 43) - t1 = (3 >= t2 ? null : text.charCodeAt(3)) !== 40; - } - return t1; - }, - visitSupportsExpression$1(_, node) { - return false; - }, - visitUnaryOperationExpression$1(_, node) { - return false; - }, - visitValueExpression$1(_, node) { - return false; - }, - visitVariableExpression$1(_, node) { - return true; - } - }; - A.IsCalculationSafeVisitor_visitListExpression_closure.prototype = { - call$1(expression) { - return expression.accept$1(this.$this); - }, - $signature: 123 - }; - A.RecursiveStatementVisitor.prototype = { - visitAtRootRule$1(_, node) { - this.visitChildren$1(node.children); - }, - visitAtRule$1(_, node) { - return A.NullableExtension_andThen(node.children, this.get$visitChildren()); - }, - visitContentBlock$1(_, node) { - return null; - }, - visitContentRule$1(_, node) { - }, - visitDebugRule$1(_, node) { - }, - visitDeclaration$1(_, node) { - return A.NullableExtension_andThen(node.children, this.get$visitChildren()); - }, - visitEachRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitErrorRule$1(_, node) { - }, - visitExtendRule$1(_, node) { - }, - visitForRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitForwardRule$1(_, node) { - }, - visitFunctionRule$1(_, node) { - return null; - }, - visitIfRule$1(_, node) { - var t1, t2, _i, t3, t4, _i0, _0_0; - for (t1 = node.clauses, t2 = t1.length, _i = 0; _i < t2; ++_i) - for (t3 = t1[_i].children, t4 = t3.length, _i0 = 0; _i0 < t4; ++_i0) - t3[_i0].accept$1(this); - _0_0 = node.lastClause; - if (_0_0 != null) - for (t1 = _0_0.children, t2 = t1.length, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(this); - }, - visitImportRule$1(_, node) { - }, - visitIncludeRule$1(_, node) { - return A.NullableExtension_andThen(node.content, this.get$visitContentBlock(this)); - }, - visitLoudComment$1(_, node) { - }, - visitMediaRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitMixinRule$1(_, node) { - return null; - }, - visitReturnRule$1(_, node) { - }, - visitSilentComment$1(_, node) { - }, - visitStyleRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitStylesheet$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitSupportsRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitUseRule$1(_, node) { - }, - visitVariableDeclaration$1(_, node) { - }, - visitWarnRule$1(_, node) { - }, - visitWhileRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitChildren$1(children) { - var t1; - for (t1 = J.get$iterator$ax(children); t1.moveNext$0();) - t1.get$current(t1).accept$1(this); - } - }; - A.ReplaceExpressionVisitor.prototype = { - visitBinaryOperationExpression$1(_, node) { - return new A.BinaryOperationExpression(node.operator, node.left.accept$1(this), node.right.accept$1(this), false); - }, - visitBooleanExpression$1(_, node) { - return node; - }, - visitColorExpression$1(_, node) { - return node; - }, - visitFunctionExpression$1(_, node) { - var t1 = node.originalName, - t2 = this.visitArgumentInvocation$1(node.$arguments); - return new A.FunctionExpression(node.namespace, A.stringReplaceAllUnchecked(t1, "_", "-"), t1, t2, node.span); - }, - visitInterpolatedFunctionExpression$1(_, node) { - return new A.InterpolatedFunctionExpression(this.visitInterpolation$1(node.name), this.visitArgumentInvocation$1(node.$arguments), node.span); - }, - visitIfExpression$1(_, node) { - return new A.IfExpression(this.visitArgumentInvocation$1(node.$arguments), node.span); - }, - visitListExpression$1(_, node) { - var t1 = node.contents; - return new A.ListExpression(A.List_List$unmodifiable(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitListExpression_closure(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Expression>")), type$.Expression), node.separator, node.hasBrackets, node.span); - }, - visitMapExpression$1(_, node) { - var t2, t3, _i, t4, key, value, - t1 = A._setArrayType([], type$.JSArray_Record_2_Expression_and_Expression); - for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { - t4 = t2[_i]; - key = t4._0; - value = t4._1; - t1.push(new A._Record_2(key.accept$1(this), value.accept$1(this))); - } - return new A.MapExpression(A.List_List$unmodifiable(t1, type$.Record_2_Expression_and_Expression), node.span); - }, - visitNullExpression$1(_, node) { - return node; - }, - visitNumberExpression$1(_, node) { - return node; - }, - visitParenthesizedExpression$1(_, node) { - return new A.ParenthesizedExpression(node.expression.accept$1(this), node.span); - }, - visitSelectorExpression$1(_, node) { - return node; - }, - visitStringExpression$1(_, node) { - return new A.StringExpression(this.visitInterpolation$1(node.text), node.hasQuotes); - }, - visitSupportsExpression$1(_, node) { - return new A.SupportsExpression(this.visitSupportsCondition$1(node.condition)); - }, - visitUnaryOperationExpression$1(_, node) { - return new A.UnaryOperationExpression(node.operator, node.operand.accept$1(this), node.span); - }, - visitValueExpression$1(_, node) { - return node; - }, - visitVariableExpression$1(_, node) { - return node; - }, - visitArgumentInvocation$1(invocation) { - var t5, t6, _this = this, - t1 = invocation.positional, - t2 = type$.String, - t3 = type$.Expression, - t4 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); - for (t5 = A.MapExtensions_get_pairs(invocation.named, t2, t3), t5 = t5.get$iterator(t5); t5.moveNext$0();) { - t6 = t5.get$current(t5); - t4.$indexSet(0, t6._0, t6._1.accept$1(_this)); - } - t5 = invocation.rest; - t5 = t5 == null ? null : t5.accept$1(_this); - t6 = invocation.keywordRest; - t6 = t6 == null ? null : t6.accept$1(_this); - return new A.ArgumentInvocation(A.List_List$unmodifiable(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitArgumentInvocation_closure(_this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Expression>")), t3), A.ConstantMap_ConstantMap$from(t4, t2, t3), t5, t6, invocation.span); - }, - visitSupportsCondition$1(condition) { - var _this = this; - if (condition instanceof A.SupportsOperation) - return A.SupportsOperation$(_this.visitSupportsCondition$1(condition.left), _this.visitSupportsCondition$1(condition.right), condition.operator, condition.span); - else if (condition instanceof A.SupportsNegation) - return new A.SupportsNegation(_this.visitSupportsCondition$1(condition.condition), condition.span); - else if (condition instanceof A.SupportsInterpolation) - return new A.SupportsInterpolation(condition.expression.accept$1(_this), condition.span); - else if (condition instanceof A.SupportsDeclaration) - return new A.SupportsDeclaration(condition.name.accept$1(_this), condition.value.accept$1(_this), condition.span); - else - throw A.wrapException(A.SassException$("BUG: Unknown SupportsCondition " + condition.toString$0(0) + ".", condition.get$span(condition), null)); - }, - visitInterpolation$1(interpolation) { - var t1 = interpolation.contents; - return A.Interpolation$(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitInterpolation_closure(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object>")), interpolation.spans, interpolation.span); - } - }; - A.ReplaceExpressionVisitor_visitListExpression_closure.prototype = { - call$1(item) { - return item.accept$1(this.$this); - }, - $signature: 190 - }; - A.ReplaceExpressionVisitor_visitArgumentInvocation_closure.prototype = { - call$1(expression) { - return expression.accept$1(this.$this); - }, - $signature: 190 - }; - A.ReplaceExpressionVisitor_visitInterpolation_closure.prototype = { - call$1(node) { - return node instanceof A.Expression ? node.accept$1(this.$this) : node; - }, - $signature: 73 - }; - A.SelectorSearchVisitor.prototype = { - visitAttributeSelector$1(attribute) { - return null; - }, - visitClassSelector$1(klass) { - return null; - }, - visitIDSelector$1(id) { - return null; - }, - visitParentSelector$1(placeholder) { - return null; - }, - visitPlaceholderSelector$1(placeholder) { - return null; - }, - visitTypeSelector$1(type) { - return null; - }, - visitUniversalSelector$1(universal) { - return null; - }, - visitComplexSelector$1(complex) { - return A.IterableExtension_search(complex.components, new A.SelectorSearchVisitor_visitComplexSelector_closure(this)); - }, - visitCompoundSelector$1(compound) { - return A.IterableExtension_search(compound.components, new A.SelectorSearchVisitor_visitCompoundSelector_closure(this)); - }, - visitPseudoSelector$1(pseudo) { - return A.NullableExtension_andThen(pseudo.selector, this.get$visitSelectorList()); - }, - visitSelectorList$1(list) { - return A.IterableExtension_search(list.components, this.get$visitComplexSelector()); - } - }; - A.SelectorSearchVisitor_visitComplexSelector_closure.prototype = { - call$1(component) { - return this.$this.visitCompoundSelector$1(component.selector); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("SelectorSearchVisitor.T?(ComplexSelectorComponent)"); - } - }; - A.SelectorSearchVisitor_visitCompoundSelector_closure.prototype = { - call$1(simple) { - return simple.accept$1(this.$this); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("SelectorSearchVisitor.T?(SimpleSelector)"); - } - }; - A.serialize_closure.prototype = { - call$1(codeUnit) { - return codeUnit > 127; - }, - $signature: 46 - }; - A._SerializeVisitor.prototype = { - visitCssStylesheet$1(node) { - var t1, t2, t3, t4, t5, t6, previous, previous0, t7, _this = this; - for (t1 = J.get$iterator$ax(node.get$children(node)), t2 = !_this._inspect, t3 = _this._style === B.OutputStyle_1, t4 = !t3, t5 = type$.CssParentNode, t6 = _this._serialize$_buffer, previous = null; t1.moveNext$0();) { - previous0 = t1.get$current(t1); - if (t2) - t7 = t3 ? previous0.accept$1(B._IsInvisibleVisitor_true_true) : previous0.accept$1(B._IsInvisibleVisitor_true_false); - else - t7 = false; - if (t7) - continue; - if (previous != null) { - if (t5._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment)) - t6.writeCharCode$1(59); - if (_this._isTrailingComment$2(previous0, previous)) { - if (t4) - t6.writeCharCode$1(32); - } else { - if (t4) - t6.write$1(0, "\n"); - if (previous.get$isGroupEnd()) - if (t4) - t6.write$1(0, "\n"); - } - } - previous0.accept$1(_this); - previous = previous0; - } - if (previous != null) - t1 = (t5._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment)) && t4; - else - t1 = false; - if (t1) - t6.writeCharCode$1(59); - }, - visitCssComment$1(node) { - this._serialize$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssComment_closure(this, node)); - }, - visitCssAtRule$1(node) { - var t1, _this = this; - _this._writeIndentation$0(); - t1 = _this._serialize$_buffer; - t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssAtRule_closure(_this, node)); - if (!node.isChildless) { - if (_this._style !== B.OutputStyle_1) - t1.writeCharCode$1(32); - _this._serialize$_visitChildren$1(node); - } - }, - visitCssMediaRule$1(node) { - var t1, _this = this; - _this._writeIndentation$0(); - t1 = _this._serialize$_buffer; - t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssMediaRule_closure(_this, node)); - if (_this._style !== B.OutputStyle_1) - t1.writeCharCode$1(32); - _this._serialize$_visitChildren$1(node); - }, - visitCssImport$1(node) { - this._writeIndentation$0(); - this._serialize$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssImport_closure(this, node)); - }, - _writeImportUrl$1(url) { - var urlContents, maybeQuote, _this = this; - if (_this._style !== B.OutputStyle_1 || url.charCodeAt(0) !== 117) { - _this._serialize$_buffer.write$1(0, url); - return; - } - urlContents = B.JSString_methods.substring$2(url, 4, url.length - 1); - maybeQuote = urlContents.charCodeAt(0); - if (maybeQuote === 39 || maybeQuote === 34) - _this._serialize$_buffer.write$1(0, urlContents); - else - _this._visitQuotedString$1(urlContents); - }, - visitCssKeyframeBlock$1(node) { - var t1, _this = this; - _this._writeIndentation$0(); - t1 = _this._serialize$_buffer; - t1.forSpan$2(node.selector.span, new A._SerializeVisitor_visitCssKeyframeBlock_closure(_this, node)); - if (_this._style !== B.OutputStyle_1) - t1.writeCharCode$1(32); - _this._serialize$_visitChildren$1(node); - }, - _visitMediaQuery$1(query) { - var t1, _1_0, _2_0, condition, operator, t2, _this = this, - _0_0 = query.modifier; - if (_0_0 != null) { - t1 = _this._serialize$_buffer; - t1.write$1(0, _0_0); - t1.writeCharCode$1(32); - } - _1_0 = query.type; - if (_1_0 != null) { - t1 = _this._serialize$_buffer; - t1.write$1(0, _1_0); - if (query.conditions.length !== 0) - t1.write$1(0, " and "); - } - _2_0 = query.conditions; - if (_2_0.length === 1) - t1 = B.JSString_methods.startsWith$1(_2_0[0], "(not "); - else - t1 = false; - if (t1) { - t1 = _this._serialize$_buffer; - t1.write$1(0, "not "); - condition = B.JSArray_methods.get$first(_2_0); - t1.write$1(0, B.JSString_methods.substring$2(condition, 5, condition.length - 1)); - } else { - operator = query.conjunction ? "and" : "or"; - t1 = _this._style === B.OutputStyle_1 ? operator + " " : " " + operator + " "; - t2 = _this._serialize$_buffer; - _this._writeBetween$3(_2_0, t1, t2.get$write(t2)); - } - }, - visitCssStyleRule$1(node) { - var t1, _this = this; - _this._writeIndentation$0(); - t1 = _this._serialize$_buffer; - t1.forSpan$2(node._style_rule$_selector._box$_inner.value.span, new A._SerializeVisitor_visitCssStyleRule_closure(_this, node)); - if (_this._style !== B.OutputStyle_1) - t1.writeCharCode$1(32); - _this._serialize$_visitChildren$1(node); - }, - visitCssSupportsRule$1(node) { - var t1, _this = this; - _this._writeIndentation$0(); - t1 = _this._serialize$_buffer; - t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssSupportsRule_closure(_this, node)); - if (_this._style !== B.OutputStyle_1) - t1.writeCharCode$1(32); - _this._serialize$_visitChildren$1(node); - }, - visitCssDeclaration$1(node) { - var error, stackTrace, error0, stackTrace0, t3, declSpecificities, t4, t5, t6, t7, _i, rule, ruleSpecificities, exception, _this = this, - t1 = node.interleavedRules, - t2 = t1.length; - if (t2 !== 0) { - t3 = node._parent; - t3.toString; - declSpecificities = _this._specificities$1(t3); - for (t3 = _this._serialize$_logger, t4 = node.span, t5 = type$.SourceSpan, t6 = type$.String, t7 = node.trace, _i = 0; _i < t2; ++_i) { - rule = t1[_i]; - ruleSpecificities = _this._specificities$1(rule); - if (!declSpecificities.any$1(0, ruleSpecificities.get$contains(ruleSpecificities))) - continue; - A.WarnForDeprecation_warnForDeprecation(t3, B.Deprecation_u1l, string$.Sassx27s, new A.MultiSpan(t4, "declaration", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rule.span, "nested rule"], t5, t6), t5, t6)), t7); - } - } - _this._writeIndentation$0(); - t1 = node.name; - _this._serialize$_write$1(t1); - t2 = _this._serialize$_buffer; - t2.writeCharCode$1(58); - if (J.startsWith$1$s(t1.value, "--") && node.parsedAsCustomProperty) - t2.forSpan$2(node.value.span, new A._SerializeVisitor_visitCssDeclaration_closure(_this, node)); - else { - if (_this._style !== B.OutputStyle_1) - t2.writeCharCode$1(32); - try { - t2.forSpan$2(node.valueSpanForMap, new A._SerializeVisitor_visitCssDeclaration_closure0(_this, node)); - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.MultiSpanSassScriptException) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace(A.MultiSpanSassException$(error.message, node.value.span, error.primaryLabel, error.secondarySpans, null), error, stackTrace); - } else if (t1 instanceof A.SassScriptException) { - error0 = t1; - stackTrace0 = A.getTraceFromException(exception); - t1 = error0.message; - A.throwWithTrace(new A.SassException(B.Set_empty, t1, node.value.span), error0, stackTrace0); - } else - throw exception; - } - } - }, - _specificities$1(node) { - var $parent, t2, t3, _i, - t1 = this.get$_specificities(); - if (node instanceof A.ModifiableCssStyleRule) { - t1 = A.NullableExtension_andThen(node._parent, t1); - $parent = t1 == null ? null : A.IterableIntegerExtension_get_max(t1); - if ($parent == null) - $parent = 0; - t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.int); - for (t2 = node._style_rule$_selector._box$_inner.value.components, t3 = t2.length, _i = 0; _i < t3; ++_i) - t1.add$1(0, $parent + t2[_i].get$specificity()); - return t1; - } else { - t1 = A.NullableExtension_andThen(node.get$parent(node), t1); - return t1 == null ? B.Set_0 : t1; - } - }, - _writeFoldedValue$1(node) { - var t1, t2, next, t3, - scanner = A.StringScanner$(type$.SassString._as(node.value.value)._string$_text, null, null); - for (t1 = scanner.string.length, t2 = this._serialize$_buffer; scanner._string_scanner$_position !== t1;) { - next = scanner.readChar$0(); - if (next !== 10) { - t2.writeCharCode$1(next); - continue; - } - t2.writeCharCode$1(32); - while (true) { - t3 = scanner.peekChar$0(); - if (!(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12)) - break; - scanner.readChar$0(); - } - } - }, - _writeReindentedValue$1(node) { - var _0_0, t1, _this = this, - value = type$.SassString._as(node.value.value)._string$_text; - $label0$0: { - _0_0 = _this._minimumIndentation$1(value); - if (_0_0 == null) { - _this._serialize$_buffer.write$1(0, value); - break $label0$0; - } - if (-1 === _0_0) { - t1 = _this._serialize$_buffer; - t1.write$1(0, A.trimAsciiRight(value, true)); - t1.writeCharCode$1(32); - break $label0$0; - } - t1 = node.name.span; - t1 = t1.get$start(t1); - _this._writeWithIndent$2(value, Math.min(_0_0, t1.file.getColumn$1(t1.offset))); - } - }, - _minimumIndentation$1(text) { - var character, t2, min, next, min0, - scanner = A.LineScanner$(text), - t1 = scanner.string.length; - while (true) { - if (scanner._string_scanner$_position !== t1) { - character = scanner.super$StringScanner$readChar(); - scanner._adjustLineAndColumn$1(character); - t2 = character !== 10; - } else - t2 = false; - if (!t2) - break; - } - if (scanner._string_scanner$_position === t1) - return scanner.peekChar$1(-1) === 10 ? -1 : null; - for (min = null; scanner._string_scanner$_position !== t1;) { - for (; scanner._string_scanner$_position !== t1;) { - next = scanner.peekChar$0(); - if (next !== 32 && next !== 9) - break; - scanner._adjustLineAndColumn$1(scanner.super$StringScanner$readChar()); - } - if (scanner._string_scanner$_position === t1 || scanner.scanChar$1(10)) - continue; - min0 = scanner._line_scanner$_column; - min = min == null ? min0 : Math.min(min, min0); - while (true) { - if (scanner._string_scanner$_position !== t1) { - character = scanner.super$StringScanner$readChar(); - scanner._adjustLineAndColumn$1(character); - t2 = character !== 10; - } else - t2 = false; - if (!t2) - break; - } - } - return min == null ? -1 : min; - }, - _writeWithIndent$2(text, minimumIndentation) { - var t1, t2, t3, character, lineStart, newlines, end, - scanner = A.LineScanner$(text); - for (t1 = scanner.string, t2 = t1.length, t3 = this._serialize$_buffer; scanner._string_scanner$_position !== t2;) { - character = scanner.super$StringScanner$readChar(); - scanner._adjustLineAndColumn$1(character); - if (character === 10) - break; - t3.writeCharCode$1(character); - } - for (; true;) { - lineStart = scanner._string_scanner$_position; - for (newlines = 1; true;) { - if (scanner._string_scanner$_position === t2) { - t3.writeCharCode$1(32); - return; - } - $label0$2: { - character = scanner.super$StringScanner$readChar(); - scanner._adjustLineAndColumn$1(character); - if (32 === character || 9 === character) - continue; - if (10 === character) { - lineStart = scanner._string_scanner$_position; - ++newlines; - break $label0$2; - } - break; - } - } - this._writeTimes$2(10, newlines); - this._writeIndentation$0(); - end = scanner._string_scanner$_position; - t3.write$1(0, B.JSString_methods.substring$2(t1, lineStart + minimumIndentation, end)); - for (; true;) { - if (scanner._string_scanner$_position === t2) - return; - character = scanner.super$StringScanner$readChar(); - scanner._adjustLineAndColumn$1(character); - if (character === 10) - break; - t3.writeCharCode$1(character); - } - } - }, - visitCalculation$1(value) { - var t2, _this = this, - t1 = _this._serialize$_buffer; - t1.write$1(0, value.name); - t1.writeCharCode$1(40); - t2 = _this._style === B.OutputStyle_1 ? "," : ", "; - _this._writeBetween$3(value.$arguments, t2, _this.get$_writeCalculationValue()); - t1.writeCharCode$1(41); - }, - _writeCalculationValue$1(value) { - var _2_4_isSet, _2_4, t1, _0_0, _1_0, first, rest, left, right, operator, parenthesizeLeft, operatorWhitespace, parenthesizeRight, t2, _this = this, _null = null; - $label1$1: { - _2_4_isSet = value instanceof A.SassNumber; - if (_2_4_isSet) { - _2_4 = value.get$hasComplexUnits(); - t1 = _2_4 && !_this._inspect; - } else { - _2_4 = _null; - t1 = false; - } - if (t1) - throw A.wrapException(A.SassScriptException$(A.S(value) + " isn't a valid CSS value.", _null)); - if (_2_4_isSet && !isFinite(value._number$_value)) { - $label0$0: { - _0_0 = value._number$_value; - if (1 / 0 === _0_0) { - _this._serialize$_buffer.write$1(0, "infinity"); - break $label0$0; - } - if (-1 / 0 === _0_0) { - _this._serialize$_buffer.write$1(0, "-infinity"); - break $label0$0; - } - if (isNaN(_0_0)) - _this._serialize$_buffer.write$1(0, "NaN"); - } - t1 = J.getInterceptor$x(value); - _this._writeCalculationUnits$2(t1.get$numeratorUnits(value), t1.get$denominatorUnits(value)); - break $label1$1; - } - if (_2_4_isSet) - t1 = _2_4; - else - t1 = false; - if (t1) { - _this._writeNumber$1(value._number$_value); - t1 = J.getInterceptor$x(value); - _1_0 = t1.get$numeratorUnits(value); - if (_1_0.length >= 1) { - first = _1_0[0]; - rest = B.JSArray_methods.sublist$1(_1_0, 1); - _this._serialize$_buffer.write$1(0, first); - _this._writeCalculationUnits$2(rest, t1.get$denominatorUnits(value)); - } else - _this._writeCalculationUnits$2(A._setArrayType([], type$.JSArray_String), t1.get$denominatorUnits(value)); - break $label1$1; - } - if (value instanceof A.Value) { - value.accept$1(_this); - break $label1$1; - } - t1 = value instanceof A.CalculationOperation; - left = _null; - right = _null; - if (t1) { - operator = value._operator; - left = value._left; - right = value._right; - right = right; - } else - operator = _null; - if (t1) { - parenthesizeLeft = left instanceof A.CalculationOperation && left._operator.precedence < operator.precedence; - if (parenthesizeLeft) - _this._serialize$_buffer.writeCharCode$1(40); - _this._writeCalculationValue$1(left); - if (parenthesizeLeft) - _this._serialize$_buffer.writeCharCode$1(41); - operatorWhitespace = _this._style !== B.OutputStyle_1 || operator.precedence === 1; - if (operatorWhitespace) - _this._serialize$_buffer.writeCharCode$1(32); - t1 = _this._serialize$_buffer; - t1.write$1(0, operator.operator); - if (operatorWhitespace) - t1.writeCharCode$1(32); - if (!(right instanceof A.CalculationOperation && _this._parenthesizeCalculationRhs$2(operator, right._operator))) { - parenthesizeRight = false; - if (operator === B.CalculationOperator_Qf1) { - if (right instanceof A.SassNumber) - t2 = isFinite(right._number$_value) ? right.get$hasComplexUnits() : right.get$hasUnits(); - else - t2 = parenthesizeRight; - parenthesizeRight = t2; - } - } else - parenthesizeRight = true; - if (parenthesizeRight) - t1.writeCharCode$1(40); - _this._writeCalculationValue$1(right); - if (parenthesizeRight) - t1.writeCharCode$1(41); - } - } - }, - _writeCalculationUnits$2(numeratorUnits, denominatorUnits) { - var t1, t2, t3, t4; - for (t1 = J.get$iterator$ax(numeratorUnits), t2 = this._serialize$_buffer, t3 = this._style !== B.OutputStyle_1; t1.moveNext$0();) { - t4 = t1.get$current(t1); - if (t3) - t2.writeCharCode$1(32); - t2.writeCharCode$1(42); - if (t3) - t2.writeCharCode$1(32); - t2.writeCharCode$1(49); - t2.write$1(0, t4); - } - for (t1 = J.get$iterator$ax(denominatorUnits); t1.moveNext$0();) { - t4 = t1.get$current(t1); - if (t3) - t2.writeCharCode$1(32); - t2.writeCharCode$1(47); - if (t3) - t2.writeCharCode$1(32); - t2.writeCharCode$1(49); - t2.write$1(0, t4); - } - }, - _parenthesizeCalculationRhs$2(outer, right) { - var t1; - $label0$0: { - if (B.CalculationOperator_Qf1 === outer) { - t1 = true; - break $label0$0; - } - if (B.CalculationOperator_g2q === outer) { - t1 = false; - break $label0$0; - } - t1 = right === B.CalculationOperator_g2q || right === B.CalculationOperator_CxF; - break $label0$0; - } - return t1; - }, - visitColor$1(value) { - var _0_0, _0_2, _0_6, t1, _0_4, _0_6_isSet, t2, _0_10_isSet, _0_10, _0_12_isSet, _0_14, _0_12, _0_14_isSet, t3, _0_10_isSet0, polar, t4, t5, _this = this, _null = null; - $label0$0: { - _0_0 = value._space; - _0_2 = B.RgbColorSpace_mlz === _0_0; - _0_6 = _null; - t1 = true; - if (!_0_2) { - _0_4 = B.HslColorSpace_gsm === _0_0; - _0_6_isSet = !_0_4; - if (_0_6_isSet) { - _0_6 = B.HwbColorSpace_06z === _0_0; - t1 = _0_6; - } - } else { - _0_4 = _null; - _0_6_isSet = false; - } - if (t1 && value.channel0OrNull != null && value.channel1OrNull != null && value.channel2OrNull != null && value.alphaOrNull != null) { - _this._writeLegacyColor$1(value); - break $label0$0; - } - if (_0_2) { - t1 = _this._serialize$_buffer; - t1.write$1(0, "rgb("); - _this._writeChannel$1(value.channel0OrNull); - t1.writeCharCode$1(32); - _this._writeChannel$1(value.channel1OrNull); - t1.writeCharCode$1(32); - _this._writeChannel$1(value.channel2OrNull); - _this._maybeWriteSlashAlpha$1(value); - t1.writeCharCode$1(41); - break $label0$0; - } - if (!_0_4) - t1 = _0_6_isSet ? _0_6 : B.HwbColorSpace_06z === _0_0; - else - t1 = true; - if (t1) { - t1 = _this._serialize$_buffer; - t1.write$1(0, _0_0); - t1.writeCharCode$1(40); - t2 = _this._style === B.OutputStyle_1 ? _null : "deg"; - _this._writeChannel$2(value.channel0OrNull, t2); - t1.writeCharCode$1(32); - _this._writeChannel$2(value.channel1OrNull, "%"); - t1.writeCharCode$1(32); - _this._writeChannel$2(value.channel2OrNull, "%"); - _this._maybeWriteSlashAlpha$1(value); - t1.writeCharCode$1(41); - break $label0$0; - } - _0_10_isSet = B.LabColorSpace_IF2 !== _0_0; - if (_0_10_isSet) { - _0_10 = B.LchColorSpace_wv8 === _0_0; - t1 = _0_10; - } else { - _0_10 = _null; - t1 = true; - } - t2 = false; - if (t1) - if (!_this._inspect) { - t1 = value.channel0OrNull; - if (t1 == null) - t1 = 0; - if (t1 > 0 || A.fuzzyEquals(t1, 0)) - t1 = t1 < 100 || A.fuzzyEquals(t1, 100); - else - t1 = false; - t1 = !t1 && value.channel1OrNull != null && value.channel2OrNull != null; - } else - t1 = t2; - else - t1 = t2; - _0_12_isSet = !t1; - _0_14 = _null; - if (_0_12_isSet) { - _0_12 = B.OklabColorSpace_yrt === _0_0; - t1 = false; - _0_14_isSet = !_0_12; - if (_0_14_isSet) { - _0_14 = B.OklchColorSpace_li8 === _0_0; - t2 = _0_14; - } else - t2 = true; - t3 = false; - if (t2) - if (!_this._inspect) { - t2 = value.channel0OrNull; - if (t2 == null) - t2 = 0; - if (t2 > 0 || A.fuzzyEquals(t2, 0)) - t2 = t2 < 1 || A.fuzzyEquals(t2, 1); - else - t2 = false; - t2 = !t2 && value.channel1OrNull != null && value.channel2OrNull != null; - } else - t2 = t3; - else - t2 = t3; - if (!t2) { - if (_0_10_isSet) { - t2 = _0_10; - _0_10_isSet0 = _0_10_isSet; - } else { - _0_10 = B.LchColorSpace_wv8 === _0_0; - t2 = _0_10; - _0_10_isSet0 = true; - } - if (!t2) - if (_0_14_isSet) - t2 = _0_14; - else { - _0_14 = B.OklchColorSpace_li8 === _0_0; - t2 = _0_14; - _0_14_isSet = true; - } - else - t2 = true; - if (t2) - if (!_this._inspect) { - t1 = value.channel1OrNull; - t2 = t1 == null; - if (t2) - t1 = 0; - t1 = t1 < 0 && !A.fuzzyEquals(t1, 0) && value.channel0OrNull != null && !t2; - } - } else { - _0_10_isSet0 = _0_10_isSet; - t1 = true; - } - } else { - _0_12 = _null; - _0_10_isSet0 = _0_10_isSet; - _0_14_isSet = false; - t1 = true; - } - if (t1) { - t1 = _this._serialize$_buffer; - t1.write$1(0, "color-mix(in "); - t1.write$1(0, _0_0); - t2 = _this._style === B.OutputStyle_1; - t1.write$1(0, t2 ? "," : ", "); - _this._writeColorFunction$1(value.toSpace$1(B.XyzD65ColorSpace_4CA)); - if (!t2) - t1.writeCharCode$1(32); - t1.write$1(0, "100%"); - t1.write$1(0, t2 ? "," : ", "); - t1.write$1(0, t2 ? "red" : "black"); - t1.writeCharCode$1(41); - break $label0$0; - } - t1 = true; - if (_0_10_isSet) - if (!(_0_12_isSet ? _0_12 : B.OklabColorSpace_yrt === _0_0)) - if (!(_0_10_isSet0 ? _0_10 : B.LchColorSpace_wv8 === _0_0)) - t1 = _0_14_isSet ? _0_14 : B.OklchColorSpace_li8 === _0_0; - if (t1) { - t1 = _this._serialize$_buffer; - t1.write$1(0, _0_0); - t1.writeCharCode$1(40); - t2 = _0_0._channels; - polar = t2[2].isPolarAngle; - t3 = false; - if (!_this._inspect) { - t4 = value.channel0OrNull; - if (t4 == null) - t4 = 0; - if (t4 > 0 || A.fuzzyEquals(t4, 0)) - t4 = t4 < 100 || A.fuzzyEquals(t4, 100); - else - t4 = false; - if (t4) { - if (polar) { - t3 = value.channel1OrNull; - if (t3 == null) - t3 = 0; - t3 = t3 < 0 && !A.fuzzyEquals(t3, 0); - } - } else - t3 = true; - } - if (t3) { - t1.write$1(0, "from "); - t1.write$1(0, _this._style === B.OutputStyle_1 ? "red" : "black"); - t1.writeCharCode$1(32); - } - t3 = _this._style !== B.OutputStyle_1; - t4 = t3 && value.channel0OrNull != null; - t5 = value.channel0OrNull; - if (t4) { - t2 = type$.LinearChannel._as(t2[0]); - _this._writeNumber$1((t5 == null ? 0 : t5) * 100 / t2.max); - t1.writeCharCode$1(37); - } else - _this._writeChannel$1(t5); - t1.writeCharCode$1(32); - _this._writeChannel$1(value.channel1OrNull); - t1.writeCharCode$1(32); - t2 = polar && t3 ? "deg" : _null; - _this._writeChannel$2(value.channel2OrNull, t2); - _this._maybeWriteSlashAlpha$1(value); - t1.writeCharCode$1(41); - break $label0$0; - } - _this._writeColorFunction$1(value); - } - }, - _writeChannel$2(channel, unit) { - var _this = this; - if (channel == null) - _this._serialize$_buffer.write$1(0, "none"); - else if (isFinite(channel)) { - _this._writeNumber$1(channel); - if (unit != null) - _this._serialize$_buffer.write$1(0, unit); - } else - _this.visitNumber$1(A.SassNumber_SassNumber(channel, unit)); - }, - _writeChannel$1(channel) { - return this._writeChannel$2(channel, null); - }, - _writeLegacyColor$1(color) { - var rgb, t3, red, green, blue, hsl, hue, saturation, lightness, hwb, _0_0, format, _1_0, _this = this, - t1 = color.alphaOrNull, - t2 = t1 == null, - opaque = A.fuzzyEquals(t2 ? 0 : t1, 1); - if (!color.get$isInGamut() && !_this._inspect) { - _this._writeHsl$1(color); - return; - } - if (_this._style === B.OutputStyle_1) { - rgb = color.toSpace$1(B.RgbColorSpace_mlz); - if (opaque && _this._tryIntegerRgb$1(rgb)) - return; - t3 = rgb.channel0OrNull; - red = _this._writeNumberToString$1(t3 == null ? 0 : t3); - t3 = rgb.channel1OrNull; - green = _this._writeNumberToString$1(t3 == null ? 0 : t3); - t3 = rgb.channel2OrNull; - blue = _this._writeNumberToString$1(t3 == null ? 0 : t3); - hsl = color.toSpace$1(B.HslColorSpace_gsm); - t3 = hsl.channel0OrNull; - hue = _this._writeNumberToString$1(t3 == null ? 0 : t3); - t3 = hsl.channel1OrNull; - saturation = _this._writeNumberToString$1(t3 == null ? 0 : t3); - t3 = hsl.channel2OrNull; - lightness = _this._writeNumberToString$1(t3 == null ? 0 : t3); - t3 = _this._serialize$_buffer; - if (red.length + green.length + blue.length <= hue.length + saturation.length + lightness.length + 2) { - t3.write$1(0, opaque ? "rgb(" : "rgba("); - t3.write$1(0, red); - t3.writeCharCode$1(44); - t3.write$1(0, green); - t3.writeCharCode$1(44); - t3.write$1(0, blue); - } else { - t3.write$1(0, opaque ? "hsl(" : "hsla("); - t3.write$1(0, hue); - t3.writeCharCode$1(44); - t3.write$1(0, saturation); - t3.write$1(0, "%,"); - t3.write$1(0, lightness); - t3.writeCharCode$1(37); - } - if (!opaque) { - t3.writeCharCode$1(44); - _this._writeNumber$1(t2 ? 0 : t1); - } - t3.writeCharCode$1(41); - return; - } - t3 = color._space; - if (t3 === B.HslColorSpace_gsm) { - _this._writeHsl$1(color); - return; - } else if (_this._inspect && t3 === B.HwbColorSpace_06z) { - t3 = _this._serialize$_buffer; - t3.write$1(0, "hwb("); - hwb = color.toSpace$1(B.HwbColorSpace_06z); - _this._writeNumber$1(hwb.channel$1(0, "hue")); - t3.writeCharCode$1(32); - _this._writeNumber$1(hwb.channel$1(0, "whiteness")); - t3.writeCharCode$1(37); - t3.writeCharCode$1(32); - _this._writeNumber$1(hwb.channel$1(0, "blackness")); - t3.writeCharCode$1(37); - if (!A.fuzzyEquals(t2 ? 0 : t1, 1)) { - t3.write$1(0, " / "); - _this._writeNumber$1(t2 ? 0 : t1); - } - t3.writeCharCode$1(41); - return; - } - _0_0 = color.format; - if (B.C__ColorFormatEnum === _0_0) { - _this._writeRgb$1(color); - return; - } - t1 = _0_0 instanceof A.SpanColorFormat; - format = t1 ? _0_0 : null; - if (t1) { - t1 = format._color$_span; - _this._serialize$_buffer.write$1(0, A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, null)); - return; - } - if (opaque) { - rgb = color.toSpace$1(B.RgbColorSpace_mlz); - _1_0 = $.$get$namesByColor().$index(0, rgb); - if (_1_0 != null) { - _this._serialize$_buffer.write$1(0, _1_0); - return; - } - if (_this._canUseHex$1(rgb)) { - _this._serialize$_buffer.writeCharCode$1(35); - t1 = rgb.channel0OrNull; - _this._writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); - t1 = rgb.channel1OrNull; - _this._writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); - t1 = rgb.channel2OrNull; - _this._writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); - return; - } - } - if (t3 === B.HwbColorSpace_06z) - _this._writeHsl$1(color); - else - _this._writeRgb$1(color); - }, - _tryIntegerRgb$1(rgb) { - var t1, redInt, greenInt, blueInt, shortHex, _0_0, t2, t3, $name, _this = this; - if (!_this._canUseHex$1(rgb)) - return false; - t1 = rgb.channel0OrNull; - redInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); - t1 = rgb.channel1OrNull; - greenInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); - t1 = rgb.channel2OrNull; - blueInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); - t1 = redInt & 15; - shortHex = t1 === B.JSInt_methods._shrOtherPositive$1(redInt, 4) && (greenInt & 15) === B.JSInt_methods._shrOtherPositive$1(greenInt, 4) && (blueInt & 15) === B.JSInt_methods._shrOtherPositive$1(blueInt, 4); - _0_0 = $.$get$namesByColor().$index(0, rgb); - t2 = false; - if (_0_0 != null) { - t3 = _0_0.length; - t2 = t3 <= (shortHex ? 4 : 7); - $name = _0_0; - } else - $name = null; - if (t2) - _this._serialize$_buffer.write$1(0, $name); - else { - t2 = _this._serialize$_buffer; - if (shortHex) { - t2.writeCharCode$1(35); - t2.writeCharCode$1(A.hexCharFor(t1)); - t2.writeCharCode$1(A.hexCharFor(greenInt & 15)); - t2.writeCharCode$1(A.hexCharFor(blueInt & 15)); - } else { - t2.writeCharCode$1(35); - _this._writeHexComponent$1(redInt); - _this._writeHexComponent$1(greenInt); - _this._writeHexComponent$1(blueInt); - } - } - return true; - }, - _canUseHex$1(rgb) { - var t2, - t1 = rgb.channel0OrNull; - if (t1 == null) - t1 = 0; - if (A.fuzzyIsInt(t1)) - t1 = (t1 > 0 || A.fuzzyEquals(t1, 0)) && t1 < 256 && !A.fuzzyEquals(t1, 256); - else - t1 = false; - t2 = false; - if (t1) { - t1 = rgb.channel1OrNull; - if (t1 == null) - t1 = 0; - if (A.fuzzyIsInt(t1)) - t1 = (t1 > 0 || A.fuzzyEquals(t1, 0)) && t1 < 256 && !A.fuzzyEquals(t1, 256); - else - t1 = false; - if (t1) { - t1 = rgb.channel2OrNull; - if (t1 == null) - t1 = 0; - if (A.fuzzyIsInt(t1)) - t1 = (t1 > 0 || A.fuzzyEquals(t1, 0)) && t1 < 256 && !A.fuzzyEquals(t1, 256); - else - t1 = t2; - } else - t1 = t2; - } else - t1 = t2; - return t1; - }, - _writeRgb$1(color) { - var t4, _this = this, - t1 = color.alphaOrNull, - t2 = t1 == null, - opaque = A.fuzzyEquals(t2 ? 0 : t1, 1), - rgb = color.toSpace$1(B.RgbColorSpace_mlz), - t3 = _this._serialize$_buffer; - t3.write$1(0, opaque ? "rgb(" : "rgba("); - _this._writeNumber$1(rgb.channel$1(0, "red")); - t4 = _this._style === B.OutputStyle_1; - t3.write$1(0, t4 ? "," : ", "); - _this._writeNumber$1(rgb.channel$1(0, "green")); - t3.write$1(0, t4 ? "," : ", "); - _this._writeNumber$1(rgb.channel$1(0, "blue")); - if (!opaque) { - t3.write$1(0, t4 ? "," : ", "); - _this._writeNumber$1(t2 ? 0 : t1); - } - t3.writeCharCode$1(41); - }, - _writeHsl$1(color) { - var t4, _this = this, - t1 = color.alphaOrNull, - t2 = t1 == null, - opaque = A.fuzzyEquals(t2 ? 0 : t1, 1), - hsl = color.toSpace$1(B.HslColorSpace_gsm), - t3 = _this._serialize$_buffer; - t3.write$1(0, opaque ? "hsl(" : "hsla("); - _this._writeChannel$1(hsl.channel$1(0, "hue")); - t4 = _this._style === B.OutputStyle_1; - t3.write$1(0, t4 ? "," : ", "); - _this._writeChannel$2(hsl.channel$1(0, "saturation"), "%"); - t3.write$1(0, t4 ? "," : ", "); - _this._writeChannel$2(hsl.channel$1(0, "lightness"), "%"); - if (!opaque) { - t3.write$1(0, t4 ? "," : ", "); - _this._writeNumber$1(t2 ? 0 : t1); - } - t3.writeCharCode$1(41); - }, - _writeColorFunction$1(color) { - var _this = this, - t1 = _this._serialize$_buffer; - t1.write$1(0, "color("); - t1.write$1(0, color._space); - t1.writeCharCode$1(32); - _this._writeBetween$3(color.get$channelsOrNull(), " ", _this.get$_writeChannel()); - _this._maybeWriteSlashAlpha$1(color); - t1.writeCharCode$1(41); - }, - _writeHexComponent$1(color) { - var t1 = this._serialize$_buffer; - t1.writeCharCode$1(A.hexCharFor(B.JSInt_methods._shrOtherPositive$1(color, 4))); - t1.writeCharCode$1(A.hexCharFor(color & 15)); - }, - _maybeWriteSlashAlpha$1(color) { - var t2, t3, _this = this, - t1 = color.alphaOrNull; - if (A.fuzzyEquals(t1 == null ? 0 : t1, 1)) - return; - t2 = _this._style !== B.OutputStyle_1; - if (t2) - _this._serialize$_buffer.writeCharCode$1(32); - t3 = _this._serialize$_buffer; - t3.writeCharCode$1(47); - if (t2) - t3.writeCharCode$1(32); - _this._writeChannel$1(t1); - }, - visitList$1(value) { - var t2, singleton, t3, t4, t5, _this = this, - t1 = value._hasBrackets; - if (t1) - _this._serialize$_buffer.writeCharCode$1(91); - else if (value._list$_contents.length === 0) { - if (!_this._inspect) - throw A.wrapException(A.SassScriptException$("() isn't a valid CSS value.", null)); - _this._serialize$_buffer.write$1(0, "()"); - return; - } - t2 = _this._inspect; - singleton = false; - if (t2) - if (value._list$_contents.length === 1) { - t3 = value._separator; - t3 = t3 === B.ListSeparator_ECn || t3 === B.ListSeparator_cQA; - singleton = t3; - } - if (singleton && !t1) - _this._serialize$_buffer.writeCharCode$1(40); - t3 = value._list$_contents; - t3 = t2 ? t3 : new A.WhereIterable(t3, new A._SerializeVisitor_visitList_closure(), A._arrayInstanceType(t3)._eval$1("WhereIterable<1>")); - t4 = value._separator; - t5 = _this._separatorString$1(t4); - _this._writeBetween$3(t3, t5, t2 ? new A._SerializeVisitor_visitList_closure0(_this, value) : new A._SerializeVisitor_visitList_closure1(_this)); - if (singleton) { - t2 = _this._serialize$_buffer; - t2.write$1(0, t4.separator); - if (!t1) - t2.writeCharCode$1(41); - } - if (t1) - _this._serialize$_buffer.writeCharCode$1(93); - }, - _separatorString$1(separator) { - var t1; - $label0$0: { - if (B.ListSeparator_ECn === separator) { - t1 = this._style === B.OutputStyle_1 ? "," : ", "; - break $label0$0; - } - if (B.ListSeparator_cQA === separator) { - t1 = this._style === B.OutputStyle_1 ? "/" : " / "; - break $label0$0; - } - if (B.ListSeparator_nbm === separator) { - t1 = " "; - break $label0$0; - } - t1 = ""; - break $label0$0; - } - return t1; - }, - _elementNeedsParens$2(separator, value) { - var t1; - $label1$1: { - if (value instanceof A.SassList && value._list$_contents.length > 1 && !value._hasBrackets) { - $label0$0: { - if (B.ListSeparator_ECn === separator) { - t1 = value._separator === B.ListSeparator_ECn; - break $label0$0; - } - if (B.ListSeparator_cQA === separator) { - t1 = value._separator; - t1 = t1 === B.ListSeparator_ECn || t1 === B.ListSeparator_cQA; - break $label0$0; - } - t1 = value._separator !== B.ListSeparator_undecided_null_undecided; - break $label0$0; - } - break $label1$1; - } - t1 = false; - break $label1$1; - } - return t1; - }, - visitMap$1(map) { - var t1, t2, _this = this; - if (!_this._inspect) - throw A.wrapException(A.SassScriptException$(map.toString$0(0) + " isn't a valid CSS value.", null)); - t1 = _this._serialize$_buffer; - t1.writeCharCode$1(40); - t2 = map._map$_contents; - _this._writeBetween$3(t2.get$entries(t2), ", ", new A._SerializeVisitor_visitMap_closure(_this)); - t1.writeCharCode$1(41); - }, - _writeMapElement$1(value) { - var needsParens = value instanceof A.SassList && value._separator === B.ListSeparator_ECn && !value._hasBrackets; - if (needsParens) - this._serialize$_buffer.writeCharCode$1(40); - value.accept$1(this); - if (needsParens) - this._serialize$_buffer.writeCharCode$1(41); - }, - visitNumber$1(value) { - var before, after, t1, _1_0, _this = this, - _0_0 = value.asSlash; - if (type$.Record_2_nullable_Object_and_nullable_Object._is(_0_0)) { - before = _0_0._0; - after = _0_0._1; - _this.visitNumber$1(before); - _this._serialize$_buffer.writeCharCode$1(47); - _this.visitNumber$1(after); - return; - } - t1 = value._number$_value; - if (!isFinite(t1)) { - _this.visitCalculation$1(new A.SassCalculation("calc", A.List_List$unmodifiable(A._setArrayType([value], type$.JSArray_Object), type$.Object))); - return; - } - if (value.get$hasComplexUnits()) { - if (!_this._inspect) - throw A.wrapException(A.SassScriptException$(value.toString$0(0) + " isn't a valid CSS value.", null)); - _this.visitCalculation$1(new A.SassCalculation("calc", A.List_List$unmodifiable(A._setArrayType([value], type$.JSArray_Object), type$.Object))); - } else { - _this._writeNumber$1(t1); - _1_0 = value.get$numeratorUnits(value); - if (_1_0.length === 1) - _this._serialize$_buffer.write$1(0, _1_0[0]); - } - }, - _writeNumberToString$1(number) { - var t1 = new A.StringBuffer(""); - this._writeNumber$2(number, new A.NoSourceMapBuffer(t1)); - t1 = t1._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _writeNumber$2(number, buffer) { - var _0_0, text, _this = this; - if (buffer == null) - buffer = _this._serialize$_buffer; - _0_0 = A.fuzzyAsInt(number); - if (_0_0 != null) { - buffer.write$1(0, _this._removeExponent$1(B.JSInt_methods.toString$0(_0_0))); - return; - } - text = _this._removeExponent$1(B.JSNumber_methods.toString$0(number)); - if (text.length < 12) { - buffer.write$1(0, _this._style === B.OutputStyle_1 && text.charCodeAt(0) === 48 ? B.JSString_methods.substring$1(text, 1) : text); - return; - } - _this._writeRounded$2(text, buffer); - }, - _writeNumber$1(number) { - return this._writeNumber$2(number, null); - }, - _removeExponent$1(text) { - var buffer, t2, t3, additionalZeroes, - negative = text.charCodeAt(0) === 45, - exponent = A._Cell$(), - t1 = text.length, - i = 0; - while (true) { - if (!(i < t1)) { - buffer = null; - break; - } - c$0: { - if (text.charCodeAt(i) !== 101) - break c$0; - buffer = new A.StringBuffer(""); - t2 = buffer._contents = "" + A.Primitives_stringFromCharCode(text.charCodeAt(0)); - if (negative) { - t2 += A.Primitives_stringFromCharCode(text.charCodeAt(1)); - buffer._contents = t2; - if (i > 3) - buffer._contents = t2 + B.JSString_methods.substring$2(text, 3, i); - } else if (i > 2) - buffer._contents = t2 + B.JSString_methods.substring$2(text, 2, i); - exponent.__late_helper$_value = A.int_parse(B.JSString_methods.substring$2(text, i + 1, t1), null); - break; - } - ++i; - } - if (buffer == null) - return text; - if (exponent._readLocal$0() > 0) { - t1 = exponent._readLocal$0(); - t2 = buffer._contents; - t3 = negative ? 1 : 0; - additionalZeroes = t1 - (t2.length - 1 - t3); - for (t1 = t2, i = 0; i < additionalZeroes; ++i) { - t1 = A.Primitives_stringFromCharCode(48); - t1 = buffer._contents += t1; - } - return t1.charCodeAt(0) == 0 ? t1 : t1; - } else { - negative = text.charCodeAt(0) === 45; - t1 = (negative ? "" + A.Primitives_stringFromCharCode(45) : "") + "0."; - i = -1; - while (true) { - t2 = exponent.__late_helper$_value; - if (t2 === exponent) - A.throwExpression(A.LateError$localNI("")); - if (!(i > t2)) - break; - t1 += A.Primitives_stringFromCharCode(48); - --i; - } - if (negative) { - t2 = buffer._contents; - t2 = B.JSString_methods.substring$1(t2.charCodeAt(0) == 0 ? t2 : t2, 1); - } else - t2 = buffer; - t2 = t1 + A.S(t2); - return t2.charCodeAt(0) == 0 ? t2 : t2; - } - }, - _writeRounded$2(text, buffer) { - var t1, digits, negative, textIndex, digitsIndex, textIndex0, codeUnit, digitsIndex0, indexAfterPrecision, digitsIndex1, newDigit, writtenIndex; - if (B.JSString_methods.endsWith$1(text, ".0")) { - buffer.write$1(0, B.JSString_methods.substring$2(text, 0, text.length - 2)); - return; - } - t1 = text.length; - digits = new Uint8Array(t1 + 1); - negative = text.charCodeAt(0) === 45; - textIndex = negative ? 1 : 0; - for (digitsIndex = 1; true; textIndex = textIndex0, digitsIndex = digitsIndex0) { - if (textIndex === t1) { - buffer.write$1(0, text); - return; - } - textIndex0 = textIndex + 1; - codeUnit = text.charCodeAt(textIndex); - if (codeUnit === 46) { - textIndex = textIndex0; - break; - } - digitsIndex0 = digitsIndex + 1; - digits[digitsIndex] = codeUnit - 48; - } - indexAfterPrecision = textIndex + 10; - if (indexAfterPrecision >= t1) { - buffer.write$1(0, text); - return; - } - for (digitsIndex0 = digitsIndex; textIndex < indexAfterPrecision; textIndex = textIndex0, digitsIndex0 = digitsIndex1) { - digitsIndex1 = digitsIndex0 + 1; - textIndex0 = textIndex + 1; - digits[digitsIndex0] = text.charCodeAt(textIndex) - 48; - } - if (text.charCodeAt(textIndex) - 48 >= 5) - for (; true; digitsIndex0 = digitsIndex1) { - digitsIndex1 = digitsIndex0 - 1; - newDigit = digits[digitsIndex1] + 1; - digits[digitsIndex1] = newDigit; - if (newDigit !== 10) - break; - } - for (; digitsIndex0 < digitsIndex; ++digitsIndex0) - digits[digitsIndex0] = 0; - while (true) { - t1 = digitsIndex0 > digitsIndex; - if (!(t1 && digits[digitsIndex0 - 1] === 0)) - break; - --digitsIndex0; - } - if (digitsIndex0 === 2 && digits[0] === 0 && digits[1] === 0) { - buffer.writeCharCode$1(48); - return; - } - if (negative) - buffer.writeCharCode$1(45); - if (digits[0] === 0) - writtenIndex = this._style === B.OutputStyle_1 && digits[1] === 0 ? 2 : 1; - else - writtenIndex = 0; - for (; writtenIndex < digitsIndex; ++writtenIndex) - buffer.writeCharCode$1(48 + digits[writtenIndex]); - if (t1) { - buffer.writeCharCode$1(46); - for (; writtenIndex < digitsIndex0; ++writtenIndex) - buffer.writeCharCode$1(48 + digits[writtenIndex]); - } - }, - _visitQuotedString$2$forceDoubleQuote(string, forceDoubleQuote) { - var t1, includesSingleQuote, includesDoubleQuote, i, char, _1_2, _1_4, _0_0, quote, _this = this, - buffer = forceDoubleQuote ? _this._serialize$_buffer : new A.StringBuffer(""); - if (forceDoubleQuote) - buffer.writeCharCode$1(34); - for (t1 = string.length, includesSingleQuote = false, includesDoubleQuote = false, i = 0; i < t1; ++i) { - char = string.charCodeAt(i); - _1_2 = 39 === char; - if (_1_2 && forceDoubleQuote) { - buffer.writeCharCode$1(39); - continue; - } - if (_1_2 && includesDoubleQuote) { - _this._visitQuotedString$2$forceDoubleQuote(string, true); - return; - } - if (_1_2) { - buffer.writeCharCode$1(39); - includesSingleQuote = true; - continue; - } - _1_4 = 34 === char; - if (_1_4 && forceDoubleQuote) { - buffer.writeCharCode$1(92); - buffer.writeCharCode$1(34); - continue; - } - if (_1_4 && includesSingleQuote) { - _this._visitQuotedString$2$forceDoubleQuote(string, true); - return; - } - if (_1_4) { - buffer.writeCharCode$1(34); - includesDoubleQuote = true; - continue; - } - if (0 === char || 1 === char || 2 === char || 3 === char || 4 === char || 5 === char || 6 === char || 7 === char || 8 === char || 10 === char || 11 === char || 12 === char || 13 === char || 14 === char || 15 === char || 16 === char || 17 === char || 18 === char || 19 === char || 20 === char || 21 === char || 22 === char || 23 === char || 24 === char || 25 === char || 26 === char || 27 === char || 28 === char || 29 === char || 30 === char || 31 === char || 127 === char) { - _this._writeEscape$4(buffer, char, string, i); - continue; - } - if (92 === char) { - buffer.writeCharCode$1(92); - buffer.writeCharCode$1(92); - continue; - } - _0_0 = _this._tryPrivateUseCharacter$4(buffer, char, string, i); - if (_0_0 != null) - i = _0_0; - else - buffer.writeCharCode$1(char); - } - if (forceDoubleQuote) - buffer.writeCharCode$1(34); - else { - quote = includesDoubleQuote ? 39 : 34; - t1 = _this._serialize$_buffer; - t1.writeCharCode$1(quote); - t1.write$1(0, buffer); - t1.writeCharCode$1(quote); - } - }, - _visitQuotedString$1(string) { - return this._visitQuotedString$2$forceDoubleQuote(string, false); - }, - _visitUnquotedString$1(string) { - var t1, t2, afterNewline, i, _1_0, _0_0; - for (t1 = string.length, t2 = this._serialize$_buffer, afterNewline = false, i = 0; i < t1; ++i) { - _1_0 = string.charCodeAt(i); - if (10 === _1_0) { - t2.writeCharCode$1(32); - afterNewline = true; - continue; - } - if (32 === _1_0) { - if (!afterNewline) - t2.writeCharCode$1(32); - continue; - } - _0_0 = this._tryPrivateUseCharacter$4(t2, _1_0, string, i); - if (_0_0 != null) - i = _0_0; - else - t2.writeCharCode$1(_1_0); - afterNewline = false; - } - }, - _tryPrivateUseCharacter$4(buffer, codeUnit, string, i) { - var t1; - if (this._style === B.OutputStyle_1) - return null; - if (codeUnit >= 57344 && codeUnit <= 63743) { - this._writeEscape$4(buffer, codeUnit, string, i); - return i; - } - if (codeUnit >>> 7 === 439 && string.length > i + 1) { - t1 = i + 1; - this._writeEscape$4(buffer, 65536 + ((codeUnit & 1023) << 10) + (string.charCodeAt(t1) & 1023), string, t1); - return t1; - } - return null; - }, - _writeEscape$4(buffer, character, string, i) { - var t1, next; - buffer.writeCharCode$1(92); - buffer.write$1(0, B.JSInt_methods.toRadixString$1(character, 16)); - t1 = i + 1; - if (string.length === t1) - return; - next = string.charCodeAt(t1); - if (A.CharacterExtension_get_isHex(next) || 32 === next || 9 === next) - buffer.writeCharCode$1(32); - }, - visitAttributeSelector$1(attribute) { - var _0_0, t2, - t1 = this._serialize$_buffer; - t1.writeCharCode$1(91); - t1.write$1(0, attribute.name); - _0_0 = attribute.value; - if (_0_0 != null) { - t1.write$1(0, attribute.op); - if (A.Parser_isIdentifier(_0_0) && !B.JSString_methods.startsWith$1(_0_0, "--")) { - t1.write$1(0, _0_0); - t2 = attribute.modifier; - if (t2 != null) - t1.writeCharCode$1(32); - } else { - this._visitQuotedString$1(_0_0); - t2 = attribute.modifier; - if (t2 != null) - if (this._style !== B.OutputStyle_1) - t1.writeCharCode$1(32); - } - A.NullableExtension_andThen(t2, t1.get$write(t1)); - } - t1.writeCharCode$1(93); - }, - visitClassSelector$1(klass) { - var t1 = this._serialize$_buffer; - t1.writeCharCode$1(46); - t1.write$1(0, klass.name); - }, - visitComplexSelector$1(complex) { - var t2, t3, t4, t5, t6, i, component, t7, t8, t9, _this = this, - t1 = complex.leadingCombinators; - _this._writeCombinators$1(t1); - if (t1.length >= 1 && complex.components.length >= 1) - if (_this._style !== B.OutputStyle_1) - _this._serialize$_buffer.writeCharCode$1(32); - for (t1 = complex.components, t2 = t1.length, t3 = t2 - 1, t4 = _this._serialize$_buffer, t5 = _this._style === B.OutputStyle_1, t6 = !t5, i = 0; i < t2; ++i) { - component = t1[i]; - _this.visitCompoundSelector$1(component.selector); - t7 = component.combinators; - t8 = t7.length === 0; - if (!t8) - if (t6) - t4.writeCharCode$1(32); - t9 = t5 ? "" : " "; - _this._writeBetween$3(t7, t9, t4.get$write(t4)); - if (i !== t3) - t7 = !t5 || t8; - else - t7 = false; - if (t7) - t4.writeCharCode$1(32); - } - }, - _writeCombinators$1(combinators) { - var t1 = this._style === B.OutputStyle_1 ? "" : " ", - t2 = this._serialize$_buffer; - return this._writeBetween$3(combinators, t1, t2.get$write(t2)); - }, - visitCompoundSelector$1(compound) { - var t2, t3, _i, - t1 = this._serialize$_buffer, - start = t1.get$length(t1); - for (t2 = compound.components, t3 = t2.length, _i = 0; _i < t3; ++_i) - t2[_i].accept$1(this); - if (t1.get$length(t1) === start) - t1.writeCharCode$1(42); - }, - visitIDSelector$1(id) { - var t1 = this._serialize$_buffer; - t1.writeCharCode$1(35); - t1.write$1(0, id.name); - }, - visitSelectorList$1(list) { - var t1, t2, t3, first, t4, _this = this, - complexes = list.components; - for (t1 = J.get$iterator$ax(_this._inspect ? complexes : new A.WhereIterable(complexes, new A._SerializeVisitor_visitSelectorList_closure(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>"))), t2 = _this._style !== B.OutputStyle_1, t3 = _this._serialize$_buffer, first = true; t1.moveNext$0();) { - t4 = t1.get$current(t1); - if (first) - first = false; - else { - t3.writeCharCode$1(44); - if (t4.lineBreak) { - if (t2) - t3.write$1(0, "\n"); - _this._writeIndentation$0(); - } else if (t2) - t3.writeCharCode$1(32); - } - _this.visitComplexSelector$1(t4); - } - }, - visitParentSelector$1($parent) { - var t1 = this._serialize$_buffer; - t1.writeCharCode$1(38); - A.NullableExtension_andThen($parent.suffix, t1.get$write(t1)); - }, - visitPlaceholderSelector$1(placeholder) { - var t1 = this._serialize$_buffer; - t1.writeCharCode$1(37); - t1.write$1(0, placeholder.name); - }, - visitPseudoSelector$1(pseudo) { - var _0_4, t3, - t1 = pseudo.name, - t2 = false; - if ("not" === t1) { - _0_4 = pseudo.selector; - if (_0_4 instanceof A.SelectorList) - t2 = (_0_4 == null ? type$.SelectorList._as(_0_4) : _0_4).accept$1(B._IsInvisibleVisitor_true); - } - if (t2) - return; - t2 = this._serialize$_buffer; - t2.writeCharCode$1(58); - if (!pseudo.isSyntacticClass) - t2.writeCharCode$1(58); - t2.write$1(0, t1); - t1 = pseudo.argument; - t3 = t1 == null; - if (t3 && pseudo.selector == null) - return; - t2.writeCharCode$1(40); - if (!t3) { - t2.write$1(0, t1); - if (pseudo.selector != null) - t2.writeCharCode$1(32); - } - A.NullableExtension_andThen(pseudo.selector, this.get$visitSelectorList()); - t2.writeCharCode$1(41); - }, - visitTypeSelector$1(type) { - this._serialize$_buffer.write$1(0, type.name); - }, - visitUniversalSelector$1(universal) { - var t2, - t1 = universal.namespace; - if (t1 != null) { - t2 = this._serialize$_buffer; - t2.write$1(0, t1); - t2.writeCharCode$1(124); - } - this._serialize$_buffer.writeCharCode$1(42); - }, - _serialize$_write$1(value) { - return this._serialize$_buffer.forSpan$2(value.span, new A._SerializeVisitor__write_closure(this, value)); - }, - _serialize$_visitChildren$1($parent) { - var t2, t3, t4, t5, t6, t7, prePrevious, previous, t8, previous0, t9, savedIndentation, _this = this, - t1 = _this._serialize$_buffer; - t1.writeCharCode$1(123); - for (t2 = $parent.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = _this._style === B.OutputStyle_1, t5 = !t4, t6 = _this.get$_requiresSemicolon(), t7 = !_this._inspect, t3 = t3._eval$1("ListBase.E"), prePrevious = null, previous = null; t2.moveNext$0();) { - t8 = t2.__internal$_current; - previous0 = t8 == null ? t3._as(t8) : t8; - if (t7) - t8 = t4 ? previous0.accept$1(B._IsInvisibleVisitor_true_true) : previous0.accept$1(B._IsInvisibleVisitor_true_false); - else - t8 = false; - if (t8) - continue; - t8 = previous == null; - t9 = t8 ? null : t6.call$1(previous); - if (t9 == null ? false : t9) - t1.writeCharCode$1(59); - if (_this._isTrailingComment$2(previous0, t8 ? $parent : previous)) { - if (t5) - t1.writeCharCode$1(32); - savedIndentation = _this._indentation; - _this._indentation = 0; - new A._SerializeVisitor__visitChildren_closure(_this, previous0).call$0(); - _this._indentation = savedIndentation; - } else { - if (t5) - t1.write$1(0, "\n"); - ++_this._indentation; - new A._SerializeVisitor__visitChildren_closure0(_this, previous0).call$0(); - --_this._indentation; - } - prePrevious = previous; - previous = previous0; - } - if (previous != null) { - if ((type$.CssParentNode._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment)) && t5) - t1.writeCharCode$1(59); - if (prePrevious == null && _this._isTrailingComment$2(previous, $parent)) { - if (t5) - t1.writeCharCode$1(32); - } else { - _this._writeLineFeed$0(); - _this._writeIndentation$0(); - } - } - t1.writeCharCode$1(125); - }, - _requiresSemicolon$1(node) { - return type$.CssParentNode._is(node) ? node.get$isChildless() : !(node instanceof A.ModifiableCssComment); - }, - _isTrailingComment$2(node, previous) { - var t1, t2, t3, t4, searchFrom, endOffset, t5, span; - if (this._style === B.OutputStyle_1) - return false; - if (!(node instanceof A.ModifiableCssComment)) - return false; - t1 = node.span; - t2 = t1.file; - t3 = t2.url; - t4 = previous.get$span(previous); - if (!J.$eq$(t3, t4.get$sourceUrl(t4))) - return false; - t4 = previous.get$span(previous); - if (!(J.$eq$(t4.get$file(t4).url, t3) && t4.get$start(t4).offset <= A.FileLocation$_(t2, t1._file$_start).offset && t4.get$end(t4).offset >= A.FileLocation$_(t2, t1._end).offset)) { - t1 = A.FileLocation$_(t2, t1._file$_start); - t1 = t1.file.getLine$1(t1.offset); - t2 = previous.get$span(previous); - t2 = t2.get$end(t2); - return t1 === t2.file.getLine$1(t2.offset); - } - t1 = t1._file$_start; - t3 = A.FileLocation$_(t2, t1); - t4 = previous.get$span(previous); - searchFrom = t3.offset - t4.get$start(t4).offset - 1; - if (searchFrom < 0) - return false; - endOffset = Math.max(0, B.JSString_methods.lastIndexOf$2(previous.get$span(previous).get$text(), "{", searchFrom)); - t3 = previous.get$span(previous); - t3 = t3.get$file(t3); - t4 = previous.get$span(previous); - t4 = t4.get$start(t4); - t5 = previous.get$span(previous); - span = t3.span$2(0, t4.offset, t5.get$start(t5).offset + endOffset); - t1 = A.FileLocation$_(t2, t1); - t1 = t1.file.getLine$1(t1.offset); - t2 = A.FileLocation$_(span.file, span._end); - return t1 === t2.file.getLine$1(t2.offset); - }, - _writeLineFeed$0() { - if (this._style !== B.OutputStyle_1) - this._serialize$_buffer.write$1(0, "\n"); - }, - _writeIndentation$0() { - var _this = this; - if (_this._style === B.OutputStyle_1) - return; - _this._writeTimes$2(_this._indentCharacter, _this._indentation * _this._indentWidth); - }, - _writeTimes$2(char, times) { - var t1, i; - for (t1 = this._serialize$_buffer, i = 0; i < times; ++i) - t1.writeCharCode$1(char); - }, - _writeBetween$1$3(iterable, text, callback) { - var t1, t2, first, value; - for (t1 = J.get$iterator$ax(iterable), t2 = this._serialize$_buffer, first = true; t1.moveNext$0();) { - value = t1.get$current(t1); - if (first) - first = false; - else - t2.write$1(0, text); - callback.call$1(value); - } - }, - _writeBetween$3(iterable, text, callback) { - return this._writeBetween$1$3(iterable, text, callback, type$.dynamic); - } - }; - A._SerializeVisitor_visitCssComment_closure.prototype = { - call$0() { - var t2, t3, _0_0, minimumIndentation, - t1 = this.$this; - if (t1._style === B.OutputStyle_1 && this.node.text.charCodeAt(2) !== 33) - return; - t2 = this.node; - t3 = t2.text; - if (B.JSString_methods.startsWith$1(t3, A.RegExp_RegExp("/\\*# source(Mapping)?URL=", false))) - return; - _0_0 = t1._minimumIndentation$1(t3); - if (_0_0 != null) { - t2 = t2.span; - t2 = A.FileLocation$_(t2.file, t2._file$_start); - minimumIndentation = Math.min(_0_0, t2.file.getColumn$1(t2.offset)); - t1._writeIndentation$0(); - t1._writeWithIndent$2(t3, minimumIndentation); - } else { - t1._writeIndentation$0(); - t1._serialize$_buffer.write$1(0, t3); - } - }, - $signature: 1 - }; - A._SerializeVisitor_visitCssAtRule_closure.prototype = { - call$0() { - var t3, _0_0, - t1 = this.$this, - t2 = t1._serialize$_buffer; - t2.writeCharCode$1(64); - t3 = this.node; - t1._serialize$_write$1(t3.name); - _0_0 = t3.value; - if (_0_0 != null) { - t2.writeCharCode$1(32); - t1._serialize$_write$1(_0_0); - } - }, - $signature: 1 - }; - A._SerializeVisitor_visitCssMediaRule_closure.prototype = { - call$0() { - var t3, firstQuery, t4, t5, - t1 = this.$this, - t2 = t1._serialize$_buffer; - t2.write$1(0, "@media"); - t3 = this.node.queries; - firstQuery = B.JSArray_methods.get$first(t3); - t4 = t1._style === B.OutputStyle_1; - t5 = true; - if (t4) - if (firstQuery.modifier == null) - if (firstQuery.type == null) { - t5 = firstQuery.conditions; - t5 = t5.length === 1 && J.startsWith$1$s(B.JSArray_methods.get$first(t5), "(not "); - } - if (t5) - t2.writeCharCode$1(32); - t2 = t4 ? "," : ", "; - t1._writeBetween$3(t3, t2, t1.get$_visitMediaQuery()); - }, - $signature: 1 - }; - A._SerializeVisitor_visitCssImport_closure.prototype = { - call$0() { - var t3, t4, _0_0, - t1 = this.$this, - t2 = t1._serialize$_buffer; - t2.write$1(0, "@import"); - t3 = t1._style !== B.OutputStyle_1; - if (t3) - t2.writeCharCode$1(32); - t4 = this.node; - t2.forSpan$2(t4.url.span, new A._SerializeVisitor_visitCssImport__closure(t1, t4)); - _0_0 = t4.modifiers; - if (_0_0 != null) { - if (t3) - t2.writeCharCode$1(32); - t2.write$1(0, _0_0); - } - }, - $signature: 1 - }; - A._SerializeVisitor_visitCssImport__closure.prototype = { - call$0() { - return this.$this._writeImportUrl$1(this.node.url.value); - }, - $signature: 0 - }; - A._SerializeVisitor_visitCssKeyframeBlock_closure.prototype = { - call$0() { - var t1 = this.$this, - t2 = t1._style === B.OutputStyle_1 ? "," : ", ", - t3 = t1._serialize$_buffer; - return t1._writeBetween$3(this.node.selector.value, t2, t3.get$write(t3)); - }, - $signature: 0 - }; - A._SerializeVisitor_visitCssStyleRule_closure.prototype = { - call$0() { - return this.$this.visitSelectorList$1(this.node._style_rule$_selector._box$_inner.value); - }, - $signature: 0 - }; - A._SerializeVisitor_visitCssSupportsRule_closure.prototype = { - call$0() { - var t1 = this.$this, - t2 = t1._serialize$_buffer; - t2.write$1(0, "@supports"); - if (!(t1._style === B.OutputStyle_1 && J.codeUnitAt$1$s(this.node.condition.value, 0) === 40)) - t2.writeCharCode$1(32); - t1._serialize$_write$1(this.node.condition); - }, - $signature: 1 - }; - A._SerializeVisitor_visitCssDeclaration_closure.prototype = { - call$0() { - var t1 = this.$this, - t2 = this.node; - if (t1._style === B.OutputStyle_1) - t1._writeFoldedValue$1(t2); - else - t1._writeReindentedValue$1(t2); - }, - $signature: 1 - }; - A._SerializeVisitor_visitCssDeclaration_closure0.prototype = { - call$0() { - return this.node.value.value.accept$1(this.$this); - }, - $signature: 0 - }; - A._SerializeVisitor_visitList_closure.prototype = { - call$1(element) { - return !element.get$isBlank(); - }, - $signature: 75 - }; - A._SerializeVisitor_visitList_closure0.prototype = { - call$1(element) { - var t1 = this.$this, - needsParens = t1._elementNeedsParens$2(this.value._separator, element); - if (needsParens) - t1._serialize$_buffer.writeCharCode$1(40); - element.accept$1(t1); - if (needsParens) - t1._serialize$_buffer.writeCharCode$1(41); - }, - $signature: 58 - }; - A._SerializeVisitor_visitList_closure1.prototype = { - call$1(element) { - element.accept$1(this.$this); - }, - $signature: 58 - }; - A._SerializeVisitor_visitMap_closure.prototype = { - call$1(entry) { - var t1 = this.$this; - t1._writeMapElement$1(entry.key); - t1._serialize$_buffer.write$1(0, ": "); - t1._writeMapElement$1(entry.value); - }, - $signature: 283 - }; - A._SerializeVisitor_visitSelectorList_closure.prototype = { - call$1(complex) { - return !complex.accept$1(B._IsInvisibleVisitor_true); - }, - $signature: 19 - }; - A._SerializeVisitor__write_closure.prototype = { - call$0() { - return this.$this._serialize$_buffer.write$1(0, this.value.value); - }, - $signature: 0 - }; - A._SerializeVisitor__visitChildren_closure.prototype = { - call$0() { - return this.child.accept$1(this.$this); - }, - $signature: 0 - }; - A._SerializeVisitor__visitChildren_closure0.prototype = { - call$0() { - this.child.accept$1(this.$this); - }, - $signature: 0 - }; - A.OutputStyle.prototype = { - _enumToString$0() { - return "OutputStyle." + this._name; - } - }; - A.LineFeed.prototype = { - _enumToString$0() { - return "LineFeed." + this._name; - }, - toString$0(_) { - return "lf"; - } - }; - A.StatementSearchVisitor.prototype = { - visitAtRootRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitAtRule$1(_, node) { - return A.NullableExtension_andThen(node.children, this.get$visitChildren()); - }, - visitContentBlock$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitContentRule$1(_, node) { - return null; - }, - visitDebugRule$1(_, node) { - return null; - }, - visitDeclaration$1(_, node) { - return A.NullableExtension_andThen(node.children, this.get$visitChildren()); - }, - visitEachRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitErrorRule$1(_, node) { - return null; - }, - visitExtendRule$1(_, node) { - return null; - }, - visitForRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitForwardRule$1(_, node) { - return null; - }, - visitFunctionRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitIfRule$1(_, node) { - var t1 = A.IterableExtension_search(node.clauses, new A.StatementSearchVisitor_visitIfRule_closure(this)); - return t1 == null ? A.NullableExtension_andThen(node.lastClause, new A.StatementSearchVisitor_visitIfRule_closure0(this)) : t1; - }, - visitImportRule$1(_, node) { - return null; - }, - visitIncludeRule$1(_, node) { - return A.NullableExtension_andThen(node.content, this.get$visitContentBlock(this)); - }, - visitLoudComment$1(_, node) { - return null; - }, - visitMediaRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitMixinRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitReturnRule$1(_, node) { - return null; - }, - visitSilentComment$1(_, node) { - return null; - }, - visitStyleRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitStylesheet$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitSupportsRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitUseRule$1(_, node) { - return null; - }, - visitVariableDeclaration$1(_, node) { - return null; - }, - visitWarnRule$1(_, node) { - return null; - }, - visitWhileRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitChildren$1(children) { - return A.IterableExtension_search(children, new A.StatementSearchVisitor_visitChildren_closure(this)); - } - }; - A.StatementSearchVisitor_visitIfRule_closure.prototype = { - call$1(clause) { - return A.IterableExtension_search(clause.children, new A.StatementSearchVisitor_visitIfRule__closure0(this.$this)); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(IfClause)"); - } - }; - A.StatementSearchVisitor_visitIfRule__closure0.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(Statement)"); - } - }; - A.StatementSearchVisitor_visitIfRule_closure0.prototype = { - call$1(lastClause) { - return A.IterableExtension_search(lastClause.children, new A.StatementSearchVisitor_visitIfRule__closure(this.$this)); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(ElseClause)"); - } - }; - A.StatementSearchVisitor_visitIfRule__closure.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(Statement)"); - } - }; - A.StatementSearchVisitor_visitChildren_closure.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(Statement)"); - } - }; - A.Entry.prototype = { - compareTo$1(_, other) { - var t1, t2, - res = this.target.compareTo$1(0, other.target); - if (res !== 0) - return res; - t1 = this.source; - t2 = other.source; - res = B.JSString_methods.compareTo$1(J.toString$0$(t1.file.url), J.toString$0$(t2.file.url)); - if (res !== 0) - return res; - return t1.compareTo$1(0, t2); - }, - $isComparable: 1 - }; - A.Mapping.prototype = {}; - A.SingleMapping.prototype = { - toJson$1$includeSourceContents(includeSourceContents) { - var t1, t2, line, column, srcLine, srcColumn, srcUrlId, srcNameId, first, _i, entry, nextLine, i, t3, t4, column0, t5, newUrlId, srcLine0, srcColumn0, srcNameId0, result, _this = this, - buff = new A.StringBuffer(""); - for (t1 = _this.lines, t2 = t1.length, line = 0, column = 0, srcLine = 0, srcColumn = 0, srcUrlId = 0, srcNameId = 0, first = true, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - entry = t1[_i]; - nextLine = entry.line; - if (nextLine > line) { - for (i = line; i < nextLine; ++i) - buff._contents += ";"; - line = nextLine; - column = 0; - first = true; - } - for (t3 = J.get$iterator$ax(entry.entries); t3.moveNext$0(); column = column0, first = false) { - t4 = t3.get$current(t3); - if (!first) - buff._contents += ","; - column0 = t4.column; - t5 = A.encodeVlq(column0 - column); - t5 = A.StringBuffer__writeAll(buff._contents, t5, ""); - buff._contents = t5; - newUrlId = t4.sourceUrlId; - t5 = A.StringBuffer__writeAll(t5, A.encodeVlq(newUrlId - srcUrlId), ""); - buff._contents = t5; - srcLine0 = t4.sourceLine; - t5 = A.StringBuffer__writeAll(t5, A.encodeVlq(srcLine0 - srcLine), ""); - buff._contents = t5; - srcColumn0 = t4.sourceColumn; - t5 = A.StringBuffer__writeAll(t5, A.encodeVlq(srcColumn0 - srcColumn), ""); - buff._contents = t5; - srcNameId0 = t4.sourceNameId; - if (srcNameId0 == null) { - srcUrlId = newUrlId; - srcColumn = srcColumn0; - srcLine = srcLine0; - continue; - } - buff._contents = A.StringBuffer__writeAll(t5, A.encodeVlq(srcNameId0 - srcNameId), ""); - srcNameId = srcNameId0; - srcUrlId = newUrlId; - srcColumn = srcColumn0; - srcLine = srcLine0; - } - } - t1 = _this.sourceRoot; - if (t1 == null) - t1 = ""; - t2 = buff._contents; - result = A.LinkedHashMap_LinkedHashMap$_literal(["version", 3, "sourceRoot", t1, "sources", _this.urls, "names", _this.names, "mappings", t2.charCodeAt(0) == 0 ? t2 : t2], type$.String, type$.dynamic); - t1 = _this.targetUrl; - if (t1 != null) - result.$indexSet(0, "file", t1); - if (includeSourceContents) { - t1 = _this.files; - t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String?>"); - result.$indexSet(0, "sourcesContent", A.List_List$of(new A.MappedListIterable(t1, new A.SingleMapping_toJson_closure(), t2), true, t2._eval$1("ListIterable.E"))); - } - _this.extensions.forEach$1(0, new A.SingleMapping_toJson_closure0(result)); - return result; - }, - toJson$0() { - return this.toJson$1$includeSourceContents(false); - }, - toString$0(_) { - var _this = this, - t1 = A.getRuntimeTypeOfDartObject(_this).toString$0(0) + " : [" + "targetUrl: " + A.S(_this.targetUrl) + ", sourceRoot: " + A.S(_this.sourceRoot) + ", urls: " + A.S(_this.urls) + ", names: " + A.S(_this.names) + ", lines: " + A.S(_this.lines) + "]"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - }; - A.SingleMapping_SingleMapping$fromEntries_closure.prototype = { - call$0() { - return this.urls.__js_helper$_length; - }, - $signature: 10 - }; - A.SingleMapping_SingleMapping$fromEntries_closure0.prototype = { - call$0() { - return this.sourceEntry.source.file; - }, - $signature: 284 - }; - A.SingleMapping_SingleMapping$fromEntries_closure1.prototype = { - call$1(i) { - return this.files.$index(0, i); - }, - $signature: 285 - }; - A.SingleMapping_toJson_closure.prototype = { - call$1(file) { - return file == null ? null : A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(file._decodedChars, 0, null), 0, null); - }, - $signature: 286 - }; - A.SingleMapping_toJson_closure0.prototype = { - call$2($name, value) { - this.result.$indexSet(0, $name, value); - return value; - }, - $signature: 129 - }; - A.TargetLineEntry.prototype = { - toString$0(_) { - return A.getRuntimeTypeOfDartObject(this).toString$0(0) + ": " + this.line + " " + A.S(this.entries); - } - }; - A.TargetEntry.prototype = { - toString$0(_) { - var _this = this; - return A.getRuntimeTypeOfDartObject(_this).toString$0(0) + ": (" + _this.column + ", " + _this.sourceUrlId + ", " + _this.sourceLine + ", " + _this.sourceColumn + ", " + A.S(_this.sourceNameId) + ")"; - } - }; - A.SourceFile.prototype = { - get$length(_) { - return this._decodedChars.length; - }, - get$lines() { - return this._lineStarts.length; - }, - SourceFile$decoded$2$url(decodedChars, url) { - var t1, t2, t3, i, c, j; - for (t1 = this._decodedChars, t2 = t1.length, t3 = this._lineStarts, i = 0; i < t2; ++i) { - c = t1[i]; - if (c === 13) { - j = i + 1; - if (j >= t2 || t1[j] !== 10) - c = 10; - } - if (c === 10) - t3.push(i + 1); - } - }, - span$2(_, start, end) { - return A._FileSpan$(this, start, end == null ? this._decodedChars.length : end); - }, - span$1(_, start) { - return this.span$2(0, start, null); - }, - getLine$1(offset) { - var t1, _this = this; - if (offset < 0) - throw A.wrapException(A.RangeError$("Offset may not be negative, was " + offset + ".")); - else if (offset > _this._decodedChars.length) - throw A.wrapException(A.RangeError$("Offset " + offset + string$.x20must_n + _this.get$length(0) + ".")); - t1 = _this._lineStarts; - if (offset < B.JSArray_methods.get$first(t1)) - return -1; - if (offset >= B.JSArray_methods.get$last(t1)) - return t1.length - 1; - if (_this._isNearCachedLine$1(offset)) { - t1 = _this._cachedLine; - t1.toString; - return t1; - } - return _this._cachedLine = _this._binarySearch$1(offset) - 1; - }, - _isNearCachedLine$1(offset) { - var t2, t3, - t1 = this._cachedLine; - if (t1 == null) - return false; - t2 = this._lineStarts; - if (offset < t2[t1]) - return false; - t3 = t2.length; - if (t1 >= t3 - 1 || offset < t2[t1 + 1]) - return true; - if (t1 >= t3 - 2 || offset < t2[t1 + 2]) { - this._cachedLine = t1 + 1; - return true; - } - return false; - }, - _binarySearch$1(offset) { - var min, half, - t1 = this._lineStarts, - max = t1.length - 1; - for (min = 0; min < max;) { - half = min + B.JSInt_methods._tdivFast$1(max - min, 2); - if (t1[half] > offset) - max = half; - else - min = half + 1; - } - return max; - }, - getColumn$1(offset) { - var line, lineStart, _this = this; - if (offset < 0) - throw A.wrapException(A.RangeError$("Offset may not be negative, was " + offset + ".")); - else if (offset > _this._decodedChars.length) - throw A.wrapException(A.RangeError$("Offset " + offset + " must be not be greater than the number of characters in the file, " + _this.get$length(0) + ".")); - line = _this.getLine$1(offset); - lineStart = _this._lineStarts[line]; - if (lineStart > offset) - throw A.wrapException(A.RangeError$("Line " + line + " comes after offset " + offset + ".")); - return offset - lineStart; - }, - getOffset$1(line) { - var t1, t2, result, t3; - if (line < 0) - throw A.wrapException(A.RangeError$("Line may not be negative, was " + line + ".")); - else { - t1 = this._lineStarts; - t2 = t1.length; - if (line >= t2) - throw A.wrapException(A.RangeError$("Line " + line + " must be less than the number of lines in the file, " + this.get$lines() + ".")); - } - result = t1[line]; - if (result <= this._decodedChars.length) { - t3 = line + 1; - t1 = t3 < t2 && result >= t1[t3]; - } else - t1 = true; - if (t1) - throw A.wrapException(A.RangeError$("Line " + line + " doesn't have 0 columns.")); - return result; - } - }; - A.FileLocation.prototype = { - get$sourceUrl(_) { - return this.file.url; - }, - get$line() { - return this.file.getLine$1(this.offset); - }, - get$column() { - return this.file.getColumn$1(this.offset); - }, - FileLocation$_$2(file, offset) { - var t2, - t1 = this.offset; - if (t1 < 0) - throw A.wrapException(A.RangeError$("Offset may not be negative, was " + t1 + ".")); - else { - t2 = this.file; - if (t1 > t2._decodedChars.length) - throw A.wrapException(A.RangeError$("Offset " + t1 + string$.x20must_n + t2.get$length(0) + ".")); - } - }, - pointSpan$0() { - var t1 = this.offset; - return A._FileSpan$(this.file, t1, t1); - }, - get$offset() { - return this.offset; - } - }; - A._FileSpan.prototype = { - get$sourceUrl(_) { - return this.file.url; - }, - get$length(_) { - return this._end - this._file$_start; - }, - get$start(_) { - return A.FileLocation$_(this.file, this._file$_start); - }, - get$end(_) { - return A.FileLocation$_(this.file, this._end); - }, - get$text() { - return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(this.file._decodedChars, this._file$_start, this._end), 0, null); - }, - get$context(_) { - var _this = this, - t1 = _this.file, - endOffset = _this._end, - endLine = t1.getLine$1(endOffset); - if (t1.getColumn$1(endOffset) === 0 && endLine !== 0) { - if (endOffset - _this._file$_start === 0) - return endLine === t1._lineStarts.length - 1 ? "" : A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, t1.getOffset$1(endLine), t1.getOffset$1(endLine + 1)), 0, null); - } else - endOffset = endLine === t1._lineStarts.length - 1 ? t1._decodedChars.length : t1.getOffset$1(endLine + 1); - return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, t1.getOffset$1(t1.getLine$1(_this._file$_start)), endOffset), 0, null); - }, - _FileSpan$3(file, _start, _end) { - var t3, - t1 = this._end, - t2 = this._file$_start; - if (t1 < t2) - throw A.wrapException(A.ArgumentError$("End " + t1 + " must come after start " + t2 + ".", null)); - else { - t3 = this.file; - if (t1 > t3._decodedChars.length) - throw A.wrapException(A.RangeError$("End " + t1 + string$.x20must_n + t3.get$length(0) + ".")); - else if (t2 < 0) - throw A.wrapException(A.RangeError$("Start may not be negative, was " + t2 + ".")); - } - }, - compareTo$1(_, other) { - var result; - if (!(other instanceof A._FileSpan)) - return this.super$SourceSpanMixin$compareTo(0, other); - result = B.JSInt_methods.compareTo$1(this._file$_start, other._file$_start); - return result === 0 ? B.JSInt_methods.compareTo$1(this._end, other._end) : result; - }, - $eq(_, other) { - var _this = this; - if (other == null) - return false; - if (!type$.FileSpan._is(other)) - return _this.super$SourceSpanMixin$$eq(0, other); - if (!(other instanceof A._FileSpan)) - return _this.super$SourceSpanMixin$$eq(0, other) && J.$eq$(_this.file.url, other.get$sourceUrl(other)); - return _this._file$_start === other._file$_start && _this._end === other._end && J.$eq$(_this.file.url, other.file.url); - }, - get$hashCode(_) { - return A.Object_hash(this._file$_start, this._end, this.file.url, B.C_SentinelValue); - }, - expand$1(_, other) { - var t2, t3, _this = this, - t1 = _this.file; - if (!J.$eq$(t1.url, other.get$sourceUrl(other))) - throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(_this.get$sourceUrl(0)) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); - t2 = _this._file$_start; - t3 = _this._end; - if (other instanceof A._FileSpan) - return A._FileSpan$(t1, Math.min(t2, other._file$_start), Math.max(t3, other._end)); - else - return A._FileSpan$(t1, Math.min(t2, other.get$start(other).offset), Math.max(t3, other.get$end(other).offset)); - }, - $isFileSpan: 1, - $isSourceSpanWithContext: 1, - get$file(receiver) { - return this.file; - } - }; - A.Highlighter.prototype = { - highlight$0() { - var t2, highlightsByColumn, t3, t4, i, line, lastLine, t5, t6, t7, t8, t9, t10, t11, index, primaryIdx, primary, _i, highlight, _this = this, _null = null, - t1 = _this._lines; - _this._writeFileStart$1(B.JSArray_methods.get$first(t1).url); - t2 = _this._maxMultilineSpans; - highlightsByColumn = A.List_List$filled(t2, _null, false, type$.nullable__Highlight); - for (t3 = _this._highlighter$_buffer, t2 = t2 !== 0, t4 = _this._primaryColor, i = 0; i < t1.length; ++i) { - line = t1[i]; - if (i > 0) { - lastLine = t1[i - 1]; - t5 = lastLine.url; - t6 = line.url; - if (!J.$eq$(t5, t6)) { - _this._writeSidebar$1$end($._glyphs.get$upEnd()); - t3._contents += "\n"; - _this._writeFileStart$1(t6); - } else if (lastLine.number + 1 !== line.number) { - _this._writeSidebar$1$text("..."); - t3._contents += "\n"; - } - } - for (t5 = line.highlights, t6 = A._arrayInstanceType(t5)._eval$1("ReversedListIterable<1>"), t7 = new A.ReversedListIterable(t5, t6), t7 = new A.ListIterator(t7, t7.get$length(0), t6._eval$1("ListIterator")), t6 = t6._eval$1("ListIterable.E"), t8 = line.number, t9 = line.text; t7.moveNext$0();) { - t10 = t7.__internal$_current; - if (t10 == null) - t10 = t6._as(t10); - t11 = t10.span; - if (t11.get$start(t11).get$line() !== t11.get$end(t11).get$line() && t11.get$start(t11).get$line() === t8 && _this._isOnlyWhitespace$1(B.JSString_methods.substring$2(t9, 0, t11.get$start(t11).get$column()))) { - index = B.JSArray_methods.indexOf$1(highlightsByColumn, _null); - if (index < 0) - A.throwExpression(A.ArgumentError$(A.S(highlightsByColumn) + " contains no null elements.", _null)); - highlightsByColumn[index] = t10; - } - } - _this._writeSidebar$1$line(t8); - t3._contents += " "; - _this._writeMultilineHighlights$2(line, highlightsByColumn); - if (t2) - t3._contents += " "; - primaryIdx = B.JSArray_methods.indexWhere$1(t5, new A.Highlighter_highlight_closure()); - primary = primaryIdx === -1 ? _null : t5[primaryIdx]; - t6 = primary != null; - if (t6) { - t7 = primary.span; - t10 = t7.get$start(t7).get$line() === t8 ? t7.get$start(t7).get$column() : 0; - _this._writeHighlightedText$4$color(t9, t10, t7.get$end(t7).get$line() === t8 ? t7.get$end(t7).get$column() : t9.length, t4); - } else - _this._writeText$1(t9); - t3._contents += "\n"; - if (t6) - _this._writeIndicator$3(line, primary, highlightsByColumn); - for (t6 = t5.length, _i = 0; _i < t5.length; t5.length === t6 || (0, A.throwConcurrentModificationError)(t5), ++_i) { - highlight = t5[_i]; - if (highlight.isPrimary) - continue; - _this._writeIndicator$3(line, highlight, highlightsByColumn); - } - } - _this._writeSidebar$1$end($._glyphs.get$upEnd()); - t1 = t3._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _writeFileStart$1(url) { - var _this = this, - t1 = !_this._multipleFiles || !type$.Uri._is(url), - t2 = $._glyphs; - if (t1) - _this._writeSidebar$1$end(t2.get$downEnd()); - else { - _this._writeSidebar$1$end(t2.get$topLeftCorner()); - _this._colorize$2$color(new A.Highlighter__writeFileStart_closure(_this), "\x1b[34m"); - t1 = _this._highlighter$_buffer; - t2 = " " + $.$get$context().prettyUri$1(url); - t1._contents += t2; - } - _this._highlighter$_buffer._contents += "\n"; - }, - _writeMultilineHighlights$3$current(line, highlightsByColumn, current) { - var t1, currentColor, t2, t3, t4, t5, foundCurrent, _i, highlight, t6, startLine, t7, endLine, _this = this, _box_0 = {}; - _box_0.openedOnThisLine = false; - _box_0.openedOnThisLineColor = null; - t1 = current == null; - if (t1) - currentColor = null; - else - currentColor = current.isPrimary ? _this._primaryColor : _this._secondaryColor; - for (t2 = highlightsByColumn.length, t3 = _this._secondaryColor, t1 = !t1, t4 = _this._primaryColor, t5 = _this._highlighter$_buffer, foundCurrent = false, _i = 0; _i < t2; ++_i) { - highlight = highlightsByColumn[_i]; - t6 = highlight == null; - if (t6) - startLine = null; - else { - t7 = highlight.span; - startLine = t7.get$start(t7).get$line(); - } - if (t6) - endLine = null; - else { - t7 = highlight.span; - endLine = t7.get$end(t7).get$line(); - } - if (t1 && highlight === current) { - _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure(_this, startLine, line), currentColor); - foundCurrent = true; - } else if (foundCurrent) - _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure0(_this, highlight), currentColor); - else if (t6) - if (_box_0.openedOnThisLine) - _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure1(_this), _box_0.openedOnThisLineColor); - else - t5._contents += " "; - else { - t6 = highlight.isPrimary ? t4 : t3; - _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure2(_box_0, _this, current, startLine, line, highlight, endLine), t6); - } - } - }, - _writeMultilineHighlights$2(line, highlightsByColumn) { - return this._writeMultilineHighlights$3$current(line, highlightsByColumn, null); - }, - _writeHighlightedText$4$color(text, startColumn, endColumn, color) { - var _this = this; - _this._writeText$1(B.JSString_methods.substring$2(text, 0, startColumn)); - _this._colorize$2$color(new A.Highlighter__writeHighlightedText_closure(_this, text, startColumn, endColumn), color); - _this._writeText$1(B.JSString_methods.substring$2(text, endColumn, text.length)); - }, - _writeIndicator$3(line, highlight, highlightsByColumn) { - var t2, coversWholeLine, _this = this, - color = highlight.isPrimary ? _this._primaryColor : _this._secondaryColor, - t1 = highlight.span; - if (t1.get$start(t1).get$line() === t1.get$end(t1).get$line()) { - _this._writeSidebar$0(); - t1 = _this._highlighter$_buffer; - t1._contents += " "; - _this._writeMultilineHighlights$3$current(line, highlightsByColumn, highlight); - if (highlightsByColumn.length !== 0) - t1._contents += " "; - _this._writeLabel$3(highlight, highlightsByColumn, _this._colorize$2$color(new A.Highlighter__writeIndicator_closure(_this, line, highlight), color)); - } else { - t2 = line.number; - if (t1.get$start(t1).get$line() === t2) { - if (B.JSArray_methods.contains$1(highlightsByColumn, highlight)) - return; - A.replaceFirstNull(highlightsByColumn, highlight); - _this._writeSidebar$0(); - t1 = _this._highlighter$_buffer; - t1._contents += " "; - _this._writeMultilineHighlights$3$current(line, highlightsByColumn, highlight); - _this._colorize$2$color(new A.Highlighter__writeIndicator_closure0(_this, line, highlight), color); - t1._contents += "\n"; - } else if (t1.get$end(t1).get$line() === t2) { - coversWholeLine = t1.get$end(t1).get$column() === line.text.length; - if (coversWholeLine && highlight.label == null) { - A.replaceWithNull(highlightsByColumn, highlight); - return; - } - _this._writeSidebar$0(); - _this._highlighter$_buffer._contents += " "; - _this._writeMultilineHighlights$3$current(line, highlightsByColumn, highlight); - _this._writeLabel$3(highlight, highlightsByColumn, _this._colorize$2$color(new A.Highlighter__writeIndicator_closure1(_this, coversWholeLine, line, highlight), color)); - A.replaceWithNull(highlightsByColumn, highlight); - } - } - }, - _writeArrow$3$beginning(line, column, beginning) { - var t2, - t1 = beginning ? 0 : 1, - tabs = this._countTabs$1(B.JSString_methods.substring$2(line.text, 0, column + t1)); - t1 = this._highlighter$_buffer; - t2 = B.JSString_methods.$mul($._glyphs.get$horizontalLine(), 1 + column + tabs * 3); - t2 = t1._contents += t2; - t1._contents = t2 + "^"; - }, - _writeArrow$2(line, column) { - return this._writeArrow$3$beginning(line, column, true); - }, - _writeLabel$3(highlight, highlightsByColumn, underlineLength) { - var lines, color, t1, t2, t3, t4, t5, t6, _i, columnHighlight, _this = this, - label = highlight.label; - if (label == null) { - _this._highlighter$_buffer._contents += "\n"; - return; - } - lines = A._setArrayType(label.split("\n"), type$.JSArray_String); - color = highlight.isPrimary ? _this._primaryColor : _this._secondaryColor; - _this._colorize$2$color(new A.Highlighter__writeLabel_closure(_this, lines), color); - t1 = _this._highlighter$_buffer; - t1._contents += "\n"; - for (t2 = A.SubListIterable$(lines, 1, null, type$.String), t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = highlightsByColumn.length, t3 = t3._eval$1("ListIterable.E"); t2.moveNext$0();) { - t5 = t2.__internal$_current; - if (t5 == null) - t5 = t3._as(t5); - _this._writeSidebar$0(); - t6 = t1._contents += " "; - for (_i = 0; _i < t4; ++_i) { - columnHighlight = highlightsByColumn[_i]; - if (columnHighlight == null || columnHighlight === highlight) { - t6 += " "; - t1._contents = t6; - } else { - t6 = $._glyphs.get$verticalLine(); - t6 = t1._contents += t6; - } - } - t6 = B.JSString_methods.$mul(" ", underlineLength); - t1._contents += t6; - _this._colorize$2$color(new A.Highlighter__writeLabel_closure0(_this, t5), color); - t1._contents += "\n"; - } - }, - _writeText$1(text) { - var t1, t2, t3, t4; - for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this._highlighter$_buffer, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t4 = t1.__internal$_current; - if (t4 == null) - t4 = t2._as(t4); - if (t4 === 9) { - t4 = B.JSString_methods.$mul(" ", 4); - t3._contents += t4; - } else { - t4 = A.Primitives_stringFromCharCode(t4); - t3._contents += t4; - } - } - }, - _writeSidebar$3$end$line$text(end, line, text) { - var t1 = {}; - t1.text = text; - if (line != null) - t1.text = B.JSInt_methods.toString$0(line + 1); - this._colorize$2$color(new A.Highlighter__writeSidebar_closure(t1, this, end), "\x1b[34m"); - }, - _writeSidebar$1$end(end) { - return this._writeSidebar$3$end$line$text(end, null, null); - }, - _writeSidebar$1$text(text) { - return this._writeSidebar$3$end$line$text(null, null, text); - }, - _writeSidebar$1$line(line) { - return this._writeSidebar$3$end$line$text(null, line, null); - }, - _writeSidebar$0() { - return this._writeSidebar$3$end$line$text(null, null, null); - }, - _countTabs$1(text) { - var t1, t2, count, t3; - for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"), count = 0; t1.moveNext$0();) { - t3 = t1.__internal$_current; - if ((t3 == null ? t2._as(t3) : t3) === 9) - ++count; - } - return count; - }, - _isOnlyWhitespace$1(text) { - var t1, t2, t3; - for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t3 = t1.__internal$_current; - if (t3 == null) - t3 = t2._as(t3); - if (t3 !== 32 && t3 !== 9) - return false; - } - return true; - }, - _colorize$1$2$color(callback, color) { - var result, - t1 = this._primaryColor != null; - if (t1 && color != null) - this._highlighter$_buffer._contents += color; - result = callback.call$0(); - if (t1 && color != null) - this._highlighter$_buffer._contents += "\x1b[0m"; - return result; - }, - _colorize$2$color(callback, color) { - return this._colorize$1$2$color(callback, color, type$.dynamic); - } - }; - A.Highlighter_closure.prototype = { - call$0() { - var t1 = this.color, - t2 = J.getInterceptor$(t1); - if (t2.$eq(t1, true)) - return "\x1b[31m"; - if (t2.$eq(t1, false)) - return null; - return A._asStringQ(t1); - }, - $signature: 45 - }; - A.Highlighter$__closure.prototype = { - call$1(line) { - var t1 = line.highlights; - return new A.WhereIterable(t1, new A.Highlighter$___closure(), A._arrayInstanceType(t1)._eval$1("WhereIterable<1>")).get$length(0); - }, - $signature: 287 - }; - A.Highlighter$___closure.prototype = { - call$1(highlight) { - var t1 = highlight.span; - return t1.get$start(t1).get$line() !== t1.get$end(t1).get$line(); - }, - $signature: 121 - }; - A.Highlighter$__closure0.prototype = { - call$1(line) { - return line.url; - }, - $signature: 289 - }; - A.Highlighter__collateLines_closure.prototype = { - call$1(highlight) { - var t1 = highlight.span; - t1 = t1.get$sourceUrl(t1); - return t1 == null ? new A.Object() : t1; - }, - $signature: 290 - }; - A.Highlighter__collateLines_closure0.prototype = { - call$2(highlight1, highlight2) { - return highlight1.span.compareTo$1(0, highlight2.span); - }, - $signature: 291 - }; - A.Highlighter__collateLines_closure1.prototype = { - call$1(entry) { - var t1, t2, t3, t4, context, t5, linesBeforeSpan, lineNumber, _i, line, activeHighlights, highlightIndex, oldHighlightLength, t6, - url = entry.key, - highlightsForFile = entry.value, - lines = A._setArrayType([], type$.JSArray__Line); - for (t1 = J.getInterceptor$ax(highlightsForFile), t2 = t1.get$iterator(highlightsForFile), t3 = type$.JSArray__Highlight; t2.moveNext$0();) { - t4 = t2.get$current(t2).span; - context = t4.get$context(t4); - t5 = A.findLineStart(context, t4.get$text(), t4.get$start(t4).get$column()); - t5.toString; - linesBeforeSpan = B.JSString_methods.allMatches$1("\n", B.JSString_methods.substring$2(context, 0, t5)).get$length(0); - lineNumber = t4.get$start(t4).get$line() - linesBeforeSpan; - for (t4 = context.split("\n"), t5 = t4.length, _i = 0; _i < t5; ++_i) { - line = t4[_i]; - if (lines.length === 0 || lineNumber > B.JSArray_methods.get$last(lines).number) - lines.push(new A._Line(line, lineNumber, url, A._setArrayType([], t3))); - ++lineNumber; - } - } - activeHighlights = A._setArrayType([], t3); - for (t2 = lines.length, highlightIndex = 0, _i = 0; _i < lines.length; lines.length === t2 || (0, A.throwConcurrentModificationError)(lines), ++_i) { - line = lines[_i]; - if (!!activeHighlights.fixed$length) - A.throwExpression(A.UnsupportedError$("removeWhere")); - B.JSArray_methods._removeWhere$2(activeHighlights, new A.Highlighter__collateLines__closure(line), true); - oldHighlightLength = activeHighlights.length; - for (t3 = t1.skip$1(highlightsForFile, highlightIndex), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { - t5 = t3.__internal$_current; - if (t5 == null) - t5 = t4._as(t5); - t6 = t5.span; - if (t6.get$start(t6).get$line() > line.number) - break; - activeHighlights.push(t5); - } - highlightIndex += activeHighlights.length - oldHighlightLength; - B.JSArray_methods.addAll$1(line.highlights, activeHighlights); - } - return lines; - }, - $signature: 292 - }; - A.Highlighter__collateLines__closure.prototype = { - call$1(highlight) { - var t1 = highlight.span; - return t1.get$end(t1).get$line() < this.line.number; - }, - $signature: 121 - }; - A.Highlighter_highlight_closure.prototype = { - call$1(highlight) { - return highlight.isPrimary; - }, - $signature: 121 - }; - A.Highlighter__writeFileStart_closure.prototype = { - call$0() { - var t1 = this.$this._highlighter$_buffer, - t2 = B.JSString_methods.$mul($._glyphs.get$horizontalLine(), 2) + ">"; - t1._contents += t2; - return null; - }, - $signature: 0 - }; - A.Highlighter__writeMultilineHighlights_closure.prototype = { - call$0() { - var t1 = this.$this._highlighter$_buffer, - t2 = $._glyphs; - t2 = this.startLine === this.line.number ? t2.get$topLeftCorner() : t2.get$bottomLeftCorner(); - t1._contents += t2; - }, - $signature: 1 - }; - A.Highlighter__writeMultilineHighlights_closure0.prototype = { - call$0() { - var t1 = this.$this._highlighter$_buffer, - t2 = $._glyphs; - t2 = this.highlight == null ? t2.get$horizontalLine() : t2.get$cross(); - t1._contents += t2; - }, - $signature: 1 - }; - A.Highlighter__writeMultilineHighlights_closure1.prototype = { - call$0() { - var t1 = this.$this._highlighter$_buffer, - t2 = $._glyphs.get$horizontalLine(); - t1._contents += t2; - return null; - }, - $signature: 0 - }; - A.Highlighter__writeMultilineHighlights_closure2.prototype = { - call$0() { - var _this = this, - t1 = _this._box_0, - t2 = t1.openedOnThisLine, - t3 = $._glyphs, - vertical = t2 ? t3.get$cross() : t3.get$verticalLine(); - if (_this.current != null) - _this.$this._highlighter$_buffer._contents += vertical; - else { - t2 = _this.line; - t3 = t2.number; - if (_this.startLine === t3) { - t2 = _this.$this; - t2._colorize$2$color(new A.Highlighter__writeMultilineHighlights__closure(t1, t2), t1.openedOnThisLineColor); - t1.openedOnThisLine = true; - if (t1.openedOnThisLineColor == null) - t1.openedOnThisLineColor = _this.highlight.isPrimary ? t2._primaryColor : t2._secondaryColor; - } else { - if (_this.endLine === t3) { - t3 = _this.highlight.span; - t2 = t3.get$end(t3).get$column() === t2.text.length; - } else - t2 = false; - t3 = _this.$this; - if (t2) { - t1 = t3._highlighter$_buffer; - t2 = _this.highlight.label == null ? $._glyphs.glyphOrAscii$2("\u2514", "\\") : vertical; - t1._contents += t2; - } else - t3._colorize$2$color(new A.Highlighter__writeMultilineHighlights__closure0(t3, vertical), t1.openedOnThisLineColor); - } - } - }, - $signature: 1 - }; - A.Highlighter__writeMultilineHighlights__closure.prototype = { - call$0() { - var t1 = this.$this._highlighter$_buffer, - t2 = this._box_0.openedOnThisLine ? "\u252c" : "\u250c"; - t2 = $._glyphs.glyphOrAscii$2(t2, "/"); - t1._contents += t2; - }, - $signature: 1 - }; - A.Highlighter__writeMultilineHighlights__closure0.prototype = { - call$0() { - this.$this._highlighter$_buffer._contents += this.vertical; - }, - $signature: 1 - }; - A.Highlighter__writeHighlightedText_closure.prototype = { - call$0() { - var _this = this; - return _this.$this._writeText$1(B.JSString_methods.substring$2(_this.text, _this.startColumn, _this.endColumn)); - }, - $signature: 0 - }; - A.Highlighter__writeIndicator_closure.prototype = { - call$0() { - var startColumn, endColumn, tabsBefore, tabsInside, - t1 = this.$this, - t2 = t1._highlighter$_buffer, - t3 = t2._contents, - t4 = this.highlight, - t5 = t4.span; - t4 = t4.isPrimary ? "^" : $._glyphs.get$horizontalLineBold(); - startColumn = t5.get$start(t5).get$column(); - endColumn = t5.get$end(t5).get$column(); - t5 = this.line.text; - tabsBefore = t1._countTabs$1(B.JSString_methods.substring$2(t5, 0, startColumn)); - tabsInside = t1._countTabs$1(B.JSString_methods.substring$2(t5, startColumn, endColumn)); - startColumn += tabsBefore * 3; - t5 = B.JSString_methods.$mul(" ", startColumn); - t2._contents += t5; - t4 = B.JSString_methods.$mul(t4, Math.max(endColumn + (tabsBefore + tabsInside) * 3 - startColumn, 1)); - t4 = t2._contents += t4; - return t4.length - t3.length; - }, - $signature: 10 - }; - A.Highlighter__writeIndicator_closure0.prototype = { - call$0() { - var t1 = this.highlight.span; - return this.$this._writeArrow$2(this.line, t1.get$start(t1).get$column()); - }, - $signature: 0 - }; - A.Highlighter__writeIndicator_closure1.prototype = { - call$0() { - var t4, _this = this, - t1 = _this.$this, - t2 = t1._highlighter$_buffer, - t3 = t2._contents; - if (_this.coversWholeLine) { - t1 = B.JSString_methods.$mul($._glyphs.get$horizontalLine(), 3); - t2._contents += t1; - } else { - t4 = _this.highlight.span; - t1._writeArrow$3$beginning(_this.line, Math.max(t4.get$end(t4).get$column() - 1, 0), false); - } - return t2._contents.length - t3.length; - }, - $signature: 10 - }; - A.Highlighter__writeLabel_closure.prototype = { - call$0() { - var t1 = this.$this._highlighter$_buffer, - t2 = " " + A.S(B.JSArray_methods.get$first(this.lines)); - t1._contents += t2; - return null; - }, - $signature: 0 - }; - A.Highlighter__writeLabel_closure0.prototype = { - call$0() { - this.$this._highlighter$_buffer._contents += " " + this.text; - return null; - }, - $signature: 0 - }; - A.Highlighter__writeSidebar_closure.prototype = { - call$0() { - var t1 = this.$this, - t2 = t1._highlighter$_buffer, - t3 = this._box_0.text; - if (t3 == null) - t3 = ""; - t1 = B.JSString_methods.padRight$1(t3, t1._paddingBeforeSidebar); - t2._contents += t1; - t1 = this.end; - if (t1 == null) - t1 = $._glyphs.get$verticalLine(); - t2._contents += t1; - }, - $signature: 1 - }; - A._Highlight.prototype = { - toString$0(_) { - var t1 = this.isPrimary ? "" + "primary " : "", - t2 = this.span; - t2 = t1 + ("" + t2.get$start(t2).get$line() + ":" + t2.get$start(t2).get$column() + "-" + t2.get$end(t2).get$line() + ":" + t2.get$end(t2).get$column()); - t1 = this.label; - t1 = t1 != null ? t2 + (" (" + t1 + ")") : t2; - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - }; - A._Highlight_closure.prototype = { - call$0() { - var t2, t3, t4, t5, - t1 = this.span; - if (!(type$.SourceSpanWithContext._is(t1) && A.findLineStart(t1.get$context(t1), t1.get$text(), t1.get$start(t1).get$column()) != null)) { - t2 = A.SourceLocation$(t1.get$start(t1).get$offset(), 0, 0, t1.get$sourceUrl(t1)); - t3 = t1.get$end(t1).get$offset(); - t4 = t1.get$sourceUrl(t1); - t5 = A.countCodeUnits(t1.get$text(), 10); - t1 = A.SourceSpanWithContext$(t2, A.SourceLocation$(t3, A._Highlight__lastLineLength(t1.get$text()), t5, t4), t1.get$text(), t1.get$text()); - } - return A._Highlight__normalizeEndOfLine(A._Highlight__normalizeTrailingNewline(A._Highlight__normalizeNewlines(t1))); - }, - $signature: 293 - }; - A._Line.prototype = { - toString$0(_) { - return "" + this.number + ': "' + this.text + '" (' + B.JSArray_methods.join$1(this.highlights, ", ") + ")"; - } - }; - A.SourceLocation.prototype = { - distance$1(other) { - var t1 = this.sourceUrl; - if (!J.$eq$(t1, other.get$sourceUrl(other))) - throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(t1) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); - return Math.abs(this.offset - other.get$offset()); - }, - compareTo$1(_, other) { - var t1 = this.sourceUrl; - if (!J.$eq$(t1, other.get$sourceUrl(other))) - throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(t1) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); - return this.offset - other.get$offset(); - }, - $eq(_, other) { - if (other == null) - return false; - return type$.SourceLocation._is(other) && J.$eq$(this.sourceUrl, other.get$sourceUrl(other)) && this.offset === other.get$offset(); - }, - get$hashCode(_) { - var t1 = this.sourceUrl; - t1 = t1 == null ? null : t1.get$hashCode(t1); - if (t1 == null) - t1 = 0; - return t1 + this.offset; - }, - toString$0(_) { - var _this = this, - t1 = A.getRuntimeTypeOfDartObject(_this).toString$0(0), - source = _this.sourceUrl; - return "<" + t1 + ": " + _this.offset + " " + (A.S(source == null ? "unknown source" : source) + ":" + (_this.line + 1) + ":" + (_this.column + 1)) + ">"; - }, - $isComparable: 1, - get$sourceUrl(receiver) { - return this.sourceUrl; - }, - get$offset() { - return this.offset; - }, - get$line() { - return this.line; - }, - get$column() { - return this.column; - } - }; - A.SourceLocationMixin.prototype = { - distance$1(other) { - if (!J.$eq$(this.file.url, other.get$sourceUrl(other))) - throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(this.get$sourceUrl(0)) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); - return Math.abs(this.offset - other.get$offset()); - }, - compareTo$1(_, other) { - if (!J.$eq$(this.file.url, other.get$sourceUrl(other))) - throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(this.get$sourceUrl(0)) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); - return this.offset - other.get$offset(); - }, - $eq(_, other) { - if (other == null) - return false; - return type$.SourceLocation._is(other) && J.$eq$(this.file.url, other.get$sourceUrl(other)) && this.offset === other.get$offset(); - }, - get$hashCode(_) { - var t1 = this.file.url; - t1 = t1 == null ? null : t1.get$hashCode(t1); - if (t1 == null) - t1 = 0; - return t1 + this.offset; - }, - toString$0(_) { - var t1 = A.getRuntimeTypeOfDartObject(this).toString$0(0), - t2 = this.offset, - t3 = this.file, - source = t3.url; - return "<" + t1 + ": " + t2 + " " + (A.S(source == null ? "unknown source" : source) + ":" + (t3.getLine$1(t2) + 1) + ":" + (t3.getColumn$1(t2) + 1)) + ">"; - }, - $isComparable: 1, - $isSourceLocation: 1 - }; - A.SourceSpanBase.prototype = { - SourceSpanBase$3(start, end, text) { - var t3, - t1 = this.end, - t2 = this.start; - if (!J.$eq$(t1.get$sourceUrl(t1), t2.get$sourceUrl(t2))) - throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(t2.get$sourceUrl(t2)) + '" and "' + A.S(t1.get$sourceUrl(t1)) + "\" don't match.", null)); - else if (t1.get$offset() < t2.get$offset()) - throw A.wrapException(A.ArgumentError$("End " + t1.toString$0(0) + " must come after start " + t2.toString$0(0) + ".", null)); - else { - t3 = this.text; - if (t3.length !== t2.distance$1(t1)) - throw A.wrapException(A.ArgumentError$('Text "' + t3 + '" must be ' + t2.distance$1(t1) + " characters long.", null)); - } - }, - get$start(receiver) { - return this.start; - }, - get$end(receiver) { - return this.end; - }, - get$text() { - return this.text; - } - }; - A.SourceSpanException.prototype = { - get$message(_) { - return this._span_exception$_message; - }, - get$span(_) { - return this._span; - }, - toString$1$color(_, color) { - var _this = this; - _this.get$span(_this); - return "Error on " + _this.get$span(_this).message$2$color(0, _this._span_exception$_message, color); - }, - toString$0(_) { - return this.toString$1$color(0, null); - }, - $isException: 1 - }; - A.SourceSpanFormatException.prototype = {$isFormatException: 1, - get$source() { - return this.source; - } - }; - A.MultiSourceSpanException.prototype = { - toString$0(_) { - var _this = this; - return "Error on " + A.SourceSpanExtension_messageMultiple(_this._span, _this._span_exception$_message, _this.primaryLabel, _this.secondarySpans, false, null, null); - }, - get$primaryLabel() { - return this.primaryLabel; - }, - get$secondarySpans() { - return this.secondarySpans; - } - }; - A.MultiSourceSpanFormatException.prototype = {$isFormatException: 1}; - A.SourceSpanMixin.prototype = { - get$sourceUrl(_) { - var t1 = this.get$start(this); - return t1.get$sourceUrl(t1); - }, - get$length(_) { - var _this = this; - return _this.get$end(_this).get$offset() - _this.get$start(_this).get$offset(); - }, - compareTo$1(_, other) { - var _this = this, - result = _this.get$start(_this).compareTo$1(0, other.get$start(other)); - return result === 0 ? _this.get$end(_this).compareTo$1(0, other.get$end(other)) : result; - }, - message$2$color(_, message, color) { - var t2, t3, highlight, _this = this, - t1 = "" + ("line " + (_this.get$start(_this).get$line() + 1) + ", column " + (_this.get$start(_this).get$column() + 1)); - if (_this.get$sourceUrl(_this) != null) { - t2 = _this.get$sourceUrl(_this); - t3 = $.$get$context(); - t2.toString; - t2 = t1 + (" of " + t3.prettyUri$1(t2)); - t1 = t2; - } - t1 += ": " + message; - highlight = _this.highlight$1$color(color); - if (highlight.length !== 0) - t1 = t1 + "\n" + highlight; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - message$1(_, message) { - return this.message$2$color(0, message, null); - }, - highlight$1$color(color) { - var _this = this; - if (!type$.SourceSpanWithContext._is(_this) && _this.get$length(_this) === 0) - return ""; - return A.Highlighter$(_this, color).highlight$0(); - }, - $eq(_, other) { - var _this = this; - if (other == null) - return false; - return type$.SourceSpan._is(other) && _this.get$start(_this).$eq(0, other.get$start(other)) && _this.get$end(_this).$eq(0, other.get$end(other)); - }, - get$hashCode(_) { - var _this = this; - return A.Object_hash(_this.get$start(_this), _this.get$end(_this), B.C_SentinelValue, B.C_SentinelValue); - }, - toString$0(_) { - var _this = this; - return "<" + A.getRuntimeTypeOfDartObject(_this).toString$0(0) + ": from " + _this.get$start(_this).toString$0(0) + " to " + _this.get$end(_this).toString$0(0) + ' "' + _this.get$text() + '">'; - }, - $isComparable: 1, - $isSourceSpan: 1 - }; - A.SourceSpanWithContext.prototype = { - get$context(_) { - return this._context; - } - }; - A.Chain.prototype = { - toTrace$0() { - var t1 = this.traces; - return A.Trace$(new A.ExpandIterable(t1, new A.Chain_toTrace_closure(), A._arrayInstanceType(t1)._eval$1("ExpandIterable<1,Frame>")), null); - }, - toString$0(_) { - var t1 = this.traces, - t2 = A._arrayInstanceType(t1); - return new A.MappedListIterable(t1, new A.Chain_toString_closure(new A.MappedListIterable(t1, new A.Chain_toString_closure0(), t2._eval$1("MappedListIterable<1,int>")).fold$2(0, 0, B.CONSTANT)), t2._eval$1("MappedListIterable<1,String>")).join$1(0, string$.x3d_____); - }, - $isStackTrace: 1 - }; - A.Chain_Chain$parse_closure.prototype = { - call$1(line) { - return line.length !== 0; - }, - $signature: 5 - }; - A.Chain_toTrace_closure.prototype = { - call$1(trace) { - return trace.get$frames(); - }, - $signature: 294 - }; - A.Chain_toString_closure0.prototype = { - call$1(trace) { - var t1 = trace.get$frames(); - return new A.MappedListIterable(t1, new A.Chain_toString__closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,int>")).fold$2(0, 0, B.CONSTANT); - }, - $signature: 295 - }; - A.Chain_toString__closure0.prototype = { - call$1(frame) { - return frame.get$location().length; - }, - $signature: 193 - }; - A.Chain_toString_closure.prototype = { - call$1(trace) { - var t1 = trace.get$frames(); - return new A.MappedListIterable(t1, new A.Chain_toString__closure(this.longest), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); - }, - $signature: 297 - }; - A.Chain_toString__closure.prototype = { - call$1(frame) { - return B.JSString_methods.padRight$1(frame.get$location(), this.longest) + " " + A.S(frame.get$member()) + "\n"; - }, - $signature: 194 - }; - A.Frame.prototype = { - get$isCore() { - return this.uri.get$scheme() === "dart"; - }, - get$library() { - var t1 = this.uri; - if (t1.get$scheme() === "data") - return "data:..."; - return $.$get$context().prettyUri$1(t1); - }, - get$$package() { - var t1 = this.uri; - if (t1.get$scheme() !== "package") - return null; - return B.JSArray_methods.get$first(t1.get$path(t1).split("/")); - }, - get$location() { - var t2, _this = this, - t1 = _this.line; - if (t1 == null) - return _this.get$library(); - t2 = _this.column; - if (t2 == null) - return _this.get$library() + " " + A.S(t1); - return _this.get$library() + " " + A.S(t1) + ":" + A.S(t2); - }, - toString$0(_) { - return this.get$location() + " in " + A.S(this.member); - }, - get$uri() { - return this.uri; - }, - get$line() { - return this.line; - }, - get$column() { - return this.column; - }, - get$member() { - return this.member; - } - }; - A.Frame_Frame$parseVM_closure.prototype = { - call$0() { - var match, t2, t3, member, uri, lineAndColumn, line, _null = null, - t1 = this.frame; - if (t1 === "...") - return new A.Frame(A._Uri__Uri(_null, _null, _null, _null), _null, _null, "..."); - match = $.$get$_vmFrame().firstMatch$1(t1); - if (match == null) - return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); - t1 = match._match; - t2 = t1[1]; - t2.toString; - t3 = $.$get$_asyncBody(); - t2 = A.stringReplaceAllUnchecked(t2, t3, ""); - member = A.stringReplaceAllUnchecked(t2, "", ""); - t2 = t1[2]; - t3 = t2; - t3.toString; - if (B.JSString_methods.startsWith$1(t3, " 1 ? A.int_parse(lineAndColumn[1], _null) : _null; - return new A.Frame(uri, line, t1 > 2 ? A.int_parse(lineAndColumn[2], _null) : _null, member); - }, - $signature: 74 - }; - A.Frame_Frame$parseV8_closure.prototype = { - call$0() { - var member, uri, t2, functionOffset, t3, _s4_ = "", - t1 = this.frame, - match = $.$get$_v8WasmFrame().firstMatch$1(t1); - if (match != null) { - member = match.namedGroup$1("member"); - t1 = match.namedGroup$1("uri"); - t1.toString; - uri = A.Frame__uriOrPathToUri(t1); - t1 = match.namedGroup$1("index"); - t1.toString; - t2 = match.namedGroup$1("offset"); - t2.toString; - functionOffset = A.int_parse(t2, 16); - if (!(member == null)) - t1 = member; - return new A.Frame(uri, 1, functionOffset + 1, t1); - } - match = $.$get$_v8JsFrame().firstMatch$1(t1); - if (match != null) { - t1 = new A.Frame_Frame$parseV8_closure_parseJsLocation(t1); - t2 = match._match; - t3 = t2[2]; - if (t3 != null) { - t3 = t3; - t3.toString; - t2 = t2[1]; - t2.toString; - t2 = A.stringReplaceAllUnchecked(t2, "", _s4_); - t2 = A.stringReplaceAllUnchecked(t2, "Anonymous function", _s4_); - return t1.call$2(t3, A.stringReplaceAllUnchecked(t2, "(anonymous function)", _s4_)); - } else { - t2 = t2[3]; - t2.toString; - return t1.call$2(t2, _s4_); - } - } - return new A.UnparsedFrame(A._Uri__Uri(null, "unparsed", null, null), t1); - }, - $signature: 74 - }; - A.Frame_Frame$parseV8_closure_parseJsLocation.prototype = { - call$2($location, member) { - var t2, urlMatch, uri, line, columnMatch, _null = null, - t1 = $.$get$_v8EvalLocation(), - evalMatch = t1.firstMatch$1($location); - for (; evalMatch != null; $location = t2) { - t2 = evalMatch._match[1]; - t2.toString; - evalMatch = t1.firstMatch$1(t2); - } - if ($location === "native") - return new A.Frame(A.Uri_parse("native"), _null, _null, member); - urlMatch = $.$get$_v8JsUrlLocation().firstMatch$1($location); - if (urlMatch == null) - return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), this.frame); - t1 = urlMatch._match; - t2 = t1[1]; - t2.toString; - uri = A.Frame__uriOrPathToUri(t2); - t2 = t1[2]; - t2.toString; - line = A.int_parse(t2, _null); - columnMatch = t1[3]; - return new A.Frame(uri, line, columnMatch != null ? A.int_parse(columnMatch, _null) : _null, member); - }, - $signature: 300 - }; - A.Frame_Frame$_parseFirefoxEval_closure.prototype = { - call$0() { - var t2, member, uri, line, _null = null, - t1 = this.frame, - match = $.$get$_firefoxEvalLocation().firstMatch$1(t1); - if (match == null) - return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); - t1 = match._match; - t2 = t1[1]; - t2.toString; - member = A.stringReplaceAllUnchecked(t2, "/<", ""); - t2 = t1[2]; - t2.toString; - uri = A.Frame__uriOrPathToUri(t2); - t1 = t1[3]; - t1.toString; - line = A.int_parse(t1, _null); - return new A.Frame(uri, line, _null, member.length === 0 || member === "anonymous" ? "" : member); - }, - $signature: 74 - }; - A.Frame_Frame$parseFirefox_closure.prototype = { - call$0() { - var t2, t3, t4, uri, member, line, column, functionOffset, _null = null, - t1 = this.frame, - match = $.$get$_firefoxSafariJSFrame().firstMatch$1(t1); - if (match != null) { - t2 = match._match; - t3 = t2[3]; - t4 = t3; - t4.toString; - if (B.JSString_methods.contains$1(t4, " line ")) - return A.Frame_Frame$_parseFirefoxEval(t1); - t1 = t3; - t1.toString; - uri = A.Frame__uriOrPathToUri(t1); - member = t2[1]; - if (member != null) { - t1 = t2[2]; - t1.toString; - member += B.JSArray_methods.join$0(A.List_List$filled(B.JSString_methods.allMatches$1("/", t1).get$length(0), ".", false, type$.String)); - if (member === "") - member = ""; - member = B.JSString_methods.replaceFirst$2(member, $.$get$_initialDot(), ""); - } else - member = ""; - t1 = t2[4]; - if (t1 === "") - line = _null; - else { - t1 = t1; - t1.toString; - line = A.int_parse(t1, _null); - } - t1 = t2[5]; - if (t1 == null || t1 === "") - column = _null; - else { - t1 = t1; - t1.toString; - column = A.int_parse(t1, _null); - } - return new A.Frame(uri, line, column, member); - } - match = $.$get$_firefoxWasmFrame().firstMatch$1(t1); - if (match != null) { - t1 = match.namedGroup$1("member"); - t1.toString; - t2 = match.namedGroup$1("uri"); - t2.toString; - uri = A.Frame__uriOrPathToUri(t2); - t2 = match.namedGroup$1("index"); - t2.toString; - t3 = match.namedGroup$1("offset"); - t3.toString; - functionOffset = A.int_parse(t3, 16); - if (!(t1.length !== 0)) - t1 = t2; - return new A.Frame(uri, 1, functionOffset + 1, t1); - } - match = $.$get$_safariWasmFrame().firstMatch$1(t1); - if (match != null) { - t1 = match.namedGroup$1("member"); - t1.toString; - return new A.Frame(A._Uri__Uri(_null, "wasm code", _null, _null), _null, _null, t1); - } - return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); - }, - $signature: 74 - }; - A.Frame_Frame$parseFriendly_closure.prototype = { - call$0() { - var t2, uri, line, column, _null = null, - t1 = this.frame, - match = $.$get$_friendlyFrame().firstMatch$1(t1); - if (match == null) - throw A.wrapException(A.FormatException$("Couldn't parse package:stack_trace stack trace line '" + t1 + "'.", _null, _null)); - t1 = match._match; - t2 = t1[1]; - if (t2 === "data:...") - uri = A.Uri_Uri$dataFromString("", _null, _null); - else { - t2 = t2; - t2.toString; - uri = A.Uri_parse(t2); - } - if (uri.get$scheme() === "") { - t2 = $.$get$context(); - uri = t2.toUri$1(A.absolute(t2.style.pathFromUri$1(A._parseUri(uri)), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null)); - } - t2 = t1[2]; - if (t2 == null) - line = _null; - else { - t2 = t2; - t2.toString; - line = A.int_parse(t2, _null); - } - t2 = t1[3]; - if (t2 == null) - column = _null; - else { - t2 = t2; - t2.toString; - column = A.int_parse(t2, _null); - } - return new A.Frame(uri, line, column, t1[4]); - }, - $signature: 74 - }; - A.LazyTrace.prototype = { - get$_lazy_trace$_trace() { - var result, _this = this, - value = _this.__LazyTrace__trace_FI; - if (value === $) { - result = _this._thunk.call$0(); - _this.__LazyTrace__trace_FI !== $ && A.throwUnnamedLateFieldADI(); - _this.__LazyTrace__trace_FI = result; - value = result; - } - return value; - }, - get$frames() { - return this.get$_lazy_trace$_trace().get$frames(); - }, - get$terse() { - return new A.LazyTrace(new A.LazyTrace_terse_closure(this)); - }, - toString$0(_) { - return this.get$_lazy_trace$_trace().toString$0(0); - }, - $isStackTrace: 1, - $isTrace: 1 - }; - A.LazyTrace_terse_closure.prototype = { - call$0() { - return this.$this.get$_lazy_trace$_trace().get$terse(); - }, - $signature: 195 - }; - A.Trace.prototype = { - get$terse() { - return this.foldFrames$2$terse(new A.Trace_terse_closure(), true); - }, - foldFrames$2$terse(predicate, terse) { - var newFrames, t1, t2, t3, _box_0 = {}; - _box_0.predicate = predicate; - _box_0.predicate = new A.Trace_foldFrames_closure(predicate); - newFrames = A._setArrayType([], type$.JSArray_Frame); - for (t1 = this.frames, t2 = A._arrayInstanceType(t1)._eval$1("ReversedListIterable<1>"), t1 = new A.ReversedListIterable(t1, t2), t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { - t3 = t1.__internal$_current; - if (t3 == null) - t3 = t2._as(t3); - if (t3 instanceof A.UnparsedFrame || !_box_0.predicate.call$1(t3)) - newFrames.push(t3); - else if (newFrames.length === 0 || !_box_0.predicate.call$1(B.JSArray_methods.get$last(newFrames))) - newFrames.push(new A.Frame(t3.get$uri(), t3.get$line(), t3.get$column(), t3.get$member())); - } - t1 = type$.MappedListIterable_Frame_Frame; - newFrames = A.List_List$of(new A.MappedListIterable(newFrames, new A.Trace_foldFrames_closure0(_box_0), t1), true, t1._eval$1("ListIterable.E")); - if (newFrames.length > 1 && _box_0.predicate.call$1(B.JSArray_methods.get$first(newFrames))) - B.JSArray_methods.removeAt$1(newFrames, 0); - return A.Trace$(new A.ReversedListIterable(newFrames, A._arrayInstanceType(newFrames)._eval$1("ReversedListIterable<1>")), this.original._stackTrace); - }, - toString$0(_) { - var t1 = this.frames, - t2 = A._arrayInstanceType(t1); - return new A.MappedListIterable(t1, new A.Trace_toString_closure(new A.MappedListIterable(t1, new A.Trace_toString_closure0(), t2._eval$1("MappedListIterable<1,int>")).fold$2(0, 0, B.CONSTANT)), t2._eval$1("MappedListIterable<1,String>")).join$0(0); - }, - $isStackTrace: 1, - get$frames() { - return this.frames; - } - }; - A.Trace_Trace$from_closure.prototype = { - call$0() { - return A.Trace_Trace$parse(this.trace.toString$0(0)); - }, - $signature: 195 - }; - A.Trace__parseVM_closure.prototype = { - call$1(line) { - return line.length !== 0; - }, - $signature: 5 - }; - A.Trace$parseV8_closure.prototype = { - call$1(line) { - return !B.JSString_methods.startsWith$1(line, $.$get$_v8TraceLine()); - }, - $signature: 5 - }; - A.Trace$parseJSCore_closure.prototype = { - call$1(line) { - return line !== "\tat "; - }, - $signature: 5 - }; - A.Trace$parseFirefox_closure.prototype = { - call$1(line) { - return line.length !== 0 && line !== "[native code]"; - }, - $signature: 5 - }; - A.Trace$parseFriendly_closure.prototype = { - call$1(line) { - return !B.JSString_methods.startsWith$1(line, "====="); - }, - $signature: 5 - }; - A.Trace_terse_closure.prototype = { - call$1(_) { - return false; - }, - $signature: 196 - }; - A.Trace_foldFrames_closure.prototype = { - call$1(frame) { - var t1; - if (this.oldPredicate.call$1(frame)) - return true; - if (frame.get$isCore()) - return true; - if (frame.get$$package() === "stack_trace") - return true; - t1 = frame.get$member(); - t1.toString; - if (!B.JSString_methods.contains$1(t1, "")) - return false; - return frame.get$line() == null; - }, - $signature: 196 - }; - A.Trace_foldFrames_closure0.prototype = { - call$1(frame) { - var t1, t2; - if (frame instanceof A.UnparsedFrame || !this._box_0.predicate.call$1(frame)) - return frame; - t1 = frame.get$library(); - t2 = $.$get$_terseRegExp(); - return new A.Frame(A.Uri_parse(A.stringReplaceAllUnchecked(t1, t2, "")), null, null, frame.get$member()); - }, - $signature: 303 - }; - A.Trace_toString_closure0.prototype = { - call$1(frame) { - return frame.get$location().length; - }, - $signature: 193 - }; - A.Trace_toString_closure.prototype = { - call$1(frame) { - if (frame instanceof A.UnparsedFrame) - return frame.toString$0(0) + "\n"; - return B.JSString_methods.padRight$1(frame.get$location(), this.longest) + " " + A.S(frame.get$member()) + "\n"; - }, - $signature: 194 - }; - A.UnparsedFrame.prototype = { - toString$0(_) { - return this.member; - }, - $isFrame: 1, - get$uri() { - return this.uri; - }, - get$line() { - return null; - }, - get$column() { - return null; - }, - get$isCore() { - return false; - }, - get$library() { - return "unparsed"; - }, - get$$package() { - return null; - }, - get$location() { - return "unparsed"; - }, - get$member() { - return this.member; - } - }; - A.TransformByHandlers_transformByHandlers_closure.prototype = { - call$0() { - var t2, subscription, t3, t4, _this = this, t1 = {}; - t1.valuesDone = false; - t2 = _this.controller; - subscription = _this._this.listen$3$onDone$onError(0, new A.TransformByHandlers_transformByHandlers__closure(_this.handleData, t2, _this.S), new A.TransformByHandlers_transformByHandlers__closure0(t1, _this.handleDone, t2), new A.TransformByHandlers_transformByHandlers__closure1(_this.handleError, t2)); - t3 = _this._box_1; - t3.subscription = subscription; - t2.set$onPause(subscription.get$pause(subscription)); - t4 = t3.subscription; - t2.set$onResume(t4.get$resume(t4)); - t2.set$onCancel(new A.TransformByHandlers_transformByHandlers__closure2(t3, t1)); - }, - $signature: 0 - }; - A.TransformByHandlers_transformByHandlers__closure.prototype = { - call$1(value) { - return this.handleData.call$2(value, this.controller); - }, - $signature() { - return this.S._eval$1("~(0)"); - } - }; - A.TransformByHandlers_transformByHandlers__closure1.prototype = { - call$2(error, stackTrace) { - this.handleError.call$3(error, stackTrace, this.controller); - }, - $signature: 55 - }; - A.TransformByHandlers_transformByHandlers__closure0.prototype = { - call$0() { - this._box_0.valuesDone = true; - this.handleDone.call$1(this.controller); - }, - $signature: 0 - }; - A.TransformByHandlers_transformByHandlers__closure2.prototype = { - call$0() { - var t1 = this._box_1, - toCancel = t1.subscription; - t1.subscription = null; - if (!this._box_0.valuesDone) - return toCancel.cancel$0(); - return null; - }, - $signature: 235 - }; - A.RateLimit__debounceAggregate_closure.prototype = { - call$2(value, sink) { - var _this = this, - t1 = _this._box_0, - t2 = new A.RateLimit__debounceAggregate_closure_emit(t1, sink, _this.S), - t3 = t1.timer; - if (t3 != null) - t3.cancel$0(); - t1.soFar = _this.collect.call$2(value, t1.soFar); - t1.hasPending = true; - if (t1.timer == null && _this.leading) { - t1.emittedLatestAsLeading = true; - t2.call$0(); - } else - t1.emittedLatestAsLeading = false; - t1.timer = A.Timer_Timer(_this.duration, new A.RateLimit__debounceAggregate__closure(t1, _this.trailing, t2, sink)); - }, - $signature() { - return this.T._eval$1("@<0>")._bind$1(this.S)._eval$1("~(1,EventSink<2>)"); - } - }; - A.RateLimit__debounceAggregate_closure_emit.prototype = { - call$0() { - var t1 = this._box_0, - t2 = t1.soFar; - if (t2 == null) - t2 = this.S._as(t2); - this.sink.add$1(0, t2); - t1.soFar = null; - t1.hasPending = false; - }, - $signature: 0 - }; - A.RateLimit__debounceAggregate__closure.prototype = { - call$0() { - var t1 = this._box_0, - t2 = t1.emittedLatestAsLeading; - if (!t2) - this.emit.call$0(); - if (t1.shouldClose) - this.sink.close$0(0); - t1.timer = null; - }, - $signature: 0 - }; - A.RateLimit__debounceAggregate_closure0.prototype = { - call$1(sink) { - var t1 = this._box_0; - if (t1.hasPending && this.trailing) - t1.shouldClose = true; - else { - t1 = t1.timer; - if (t1 != null) - t1.cancel$0(); - sink.close$0(0); - } - }, - $signature() { - return this.S._eval$1("~(EventSink<0>)"); - } - }; - A.StringScannerException.prototype = { - get$source() { - return A._asString(this.source); - } - }; - A.LineScanner.prototype = { - scanChar$1(character) { - if (!this.super$StringScanner$scanChar(character)) - return false; - this._adjustLineAndColumn$1(character); - return true; - }, - readChar$0() { - var character = this.super$StringScanner$readChar(); - this._adjustLineAndColumn$1(character); - return character; - }, - _adjustLineAndColumn$1(character) { - var t1, _this = this; - if (character !== 10) - t1 = character === 13 && _this.peekChar$0() !== 10; - else - t1 = true; - if (t1) { - ++_this._line_scanner$_line; - _this._line_scanner$_column = 0; - } else { - t1 = _this._line_scanner$_column; - _this._line_scanner$_column = t1 + (character >= 65536 && character <= 1114111 ? 2 : 1); - } - }, - scan$1(pattern) { - var t1, newlines, t2, _this = this; - if (!_this.super$StringScanner$scan(pattern)) - return false; - t1 = _this.get$lastMatch(); - newlines = _this._newlinesIn$2$endPosition(t1.pattern, _this._string_scanner$_position); - t1 = _this._line_scanner$_line; - t2 = newlines.length; - _this._line_scanner$_line = t1 + t2; - if (t2 === 0) { - t1 = _this._line_scanner$_column; - t2 = _this.get$lastMatch(); - _this._line_scanner$_column = t1 + t2.pattern.length; - } else { - t1 = _this.get$lastMatch(); - _this._line_scanner$_column = t1.pattern.length - J.get$end$z(B.JSArray_methods.get$last(newlines)); - } - return true; - }, - _newlinesIn$2$endPosition(text, endPosition) { - var t1 = $.$get$_newlineRegExp().allMatches$1(0, text), - newlines = A.List_List$of(t1, true, A._instanceType(t1)._eval$1("Iterable.E")); - t1 = this.string; - if (endPosition < t1.length && B.JSString_methods.endsWith$1(text, "\r") && t1[endPosition] === "\n") - B.JSArray_methods.removeLast$0(newlines); - return newlines; - } - }; - A.SpanScanner.prototype = { - set$state(state) { - if (state._scanner !== this) - throw A.wrapException(A.ArgumentError$(string$.The_gi, null)); - this.set$position(state.position); - }, - spanFrom$2(startState, endState) { - var endPosition = endState == null ? this._string_scanner$_position : endState.position; - return this._sourceFile.span$2(0, startState.position, endPosition); - }, - spanFrom$1(startState) { - return this.spanFrom$2(startState, null); - }, - matches$1(pattern) { - var t1, t2, _this = this; - if (!_this.super$StringScanner$matches(pattern)) - return false; - t1 = _this._string_scanner$_position; - t2 = _this.get$lastMatch(); - _this._sourceFile.span$2(0, t1, t2.start + t2.pattern.length); - return true; - }, - error$3$length$position(_, message, $length, position) { - var match, t2, _this = this, - t1 = _this.string; - A.validateErrorArgs(t1, null, position, $length); - match = position == null && $length == null ? _this.get$lastMatch() : null; - if (position == null) - position = match == null ? _this._string_scanner$_position : match.start; - if ($length == null) - if (match == null) - $length = 0; - else { - t2 = match.start; - $length = t2 + match.pattern.length - t2; - } - throw A.wrapException(A.StringScannerException$(message, _this._sourceFile.span$2(0, position, position + $length), t1)); - }, - error$1(_, message) { - return this.error$3$length$position(0, message, null, null); - }, - error$2$position(_, message, position) { - return this.error$3$length$position(0, message, null, position); - }, - error$2$length(_, message, $length) { - return this.error$3$length$position(0, message, $length, null); - } - }; - A._SpanScannerState.prototype = {}; - A.StringScanner.prototype = { - set$position(position) { - if (B.JSInt_methods.get$isNegative(position) || position > this.string.length) - throw A.wrapException(A.ArgumentError$("Invalid position " + position, null)); - this._string_scanner$_position = position; - this._lastMatch = null; - }, - get$lastMatch() { - var _this = this; - if (_this._string_scanner$_position !== _this._lastMatchPosition) - _this._lastMatch = null; - return _this._lastMatch; - }, - readChar$0() { - var _this = this, - t1 = _this.string; - if (_this._string_scanner$_position === t1.length) - _this._fail$1("more input"); - return t1.charCodeAt(_this._string_scanner$_position++); - }, - peekChar$1(offset) { - var index; - if (offset == null) - offset = 0; - index = this._string_scanner$_position + offset; - if (index < 0 || index >= this.string.length) - return null; - return this.string.charCodeAt(index); - }, - peekChar$0() { - return this.peekChar$1(null); - }, - scanChar$1(character) { - var t1, t2, t3, t4, _this = this; - if (character >= 65536 && character <= 1114111) { - t1 = _this._string_scanner$_position; - t2 = t1 + 1; - t3 = _this.string; - if (t2 < t3.length) { - t4 = character - 65536; - t2 = t3.charCodeAt(t1) !== B.JSInt_methods._shrOtherPositive$1(t4, 10) + 55296 || t3.charCodeAt(t2) !== (t4 & 1023) + 56320; - } else - t2 = true; - if (t2) - return false; - else { - _this._string_scanner$_position = t1 + 2; - return true; - } - } else { - t1 = _this._string_scanner$_position; - t2 = _this.string; - if (t1 === t2.length) - return false; - if (t2.charCodeAt(t1) !== character) - return false; - _this._string_scanner$_position = t1 + 1; - return true; - } - }, - expectChar$2$name(character, $name) { - if (this.scanChar$1(character)) - return; - if ($name == null) - if (character === 92) - $name = '"\\"'; - else - $name = character === 34 ? '"\\""' : '"' + A.Primitives_stringFromCharCode(character) + '"'; - this._fail$1($name); - }, - expectChar$1(character) { - return this.expectChar$2$name(character, null); - }, - scan$1(pattern) { - var t1, _this = this, - success = _this.matches$1(pattern); - if (success) { - t1 = _this._lastMatch; - _this._lastMatchPosition = _this._string_scanner$_position = t1.start + t1.pattern.length; - } - return success; - }, - expect$1(pattern) { - var t1, $name; - if (this.scan$1(pattern)) - return; - t1 = A.stringReplaceAllUnchecked(pattern, "\\", "\\\\"); - $name = '"' + A.stringReplaceAllUnchecked(t1, '"', '\\"') + '"'; - this._fail$1($name); - }, - expectDone$0() { - if (this._string_scanner$_position === this.string.length) - return; - this._fail$1("no more input"); - }, - matches$1(pattern) { - var _this = this, - t1 = B.JSString_methods.matchAsPrefix$2(pattern, _this.string, _this._string_scanner$_position); - _this._lastMatch = t1; - _this._lastMatchPosition = _this._string_scanner$_position; - return t1 != null; - }, - substring$1(_, start) { - var end = this._string_scanner$_position; - return B.JSString_methods.substring$2(this.string, start, end); - }, - error$3$length$position(_, message, $length, position) { - var match, t2, _this = this, - t1 = _this.string; - A.validateErrorArgs(t1, null, position, $length); - match = position == null && $length == null ? _this.get$lastMatch() : null; - if (position == null) - position = match == null ? _this._string_scanner$_position : match.start; - if ($length == null) - if (match == null) - $length = 0; - else { - t2 = match.start; - $length = t2 + match.pattern.length - t2; - } - throw A.wrapException(A.StringScannerException$(message, A.SourceFile$fromString(t1, _this.sourceUrl).span$2(0, position, position + $length), t1)); - }, - error$1(_, message) { - return this.error$3$length$position(0, message, null, null); - }, - _fail$1($name) { - this.error$3$length$position(0, "expected " + $name + ".", 0, this._string_scanner$_position); - } - }; - A.AsciiGlyphSet.prototype = { - glyphOrAscii$2(glyph, alternative) { - return alternative; - }, - get$horizontalLine() { - return "-"; - }, - get$verticalLine() { - return "|"; - }, - get$topLeftCorner() { - return ","; - }, - get$bottomLeftCorner() { - return "'"; - }, - get$cross() { - return "+"; - }, - get$upEnd() { - return "'"; - }, - get$downEnd() { - return ","; - }, - get$horizontalLineBold() { - return "="; - } - }; - A.UnicodeGlyphSet.prototype = { - glyphOrAscii$2(glyph, alternative) { - return glyph; - }, - get$horizontalLine() { - return "\u2500"; - }, - get$verticalLine() { - return "\u2502"; - }, - get$topLeftCorner() { - return "\u250c"; - }, - get$bottomLeftCorner() { - return "\u2514"; - }, - get$cross() { - return "\u253c"; - }, - get$upEnd() { - return "\u2575"; - }, - get$downEnd() { - return "\u2577"; - }, - get$horizontalLineBold() { - return "\u2501"; - } - }; - A.WatchEvent.prototype = { - toString$0(_) { - return this.type.toString$0(0) + " " + this.path; - } - }; - A.ChangeType.prototype = { - toString$0(_) { - return this._watch_event$_name; - } - }; - A.A98RgbColorSpace0.prototype = { - get$isBoundedInternal() { - return true; - }, - toLinear$1(channel) { - return J.get$sign$in(channel) * Math.pow(Math.abs(channel), 2.19921875); - }, - fromLinear$1(channel) { - return J.get$sign$in(channel) * Math.pow(Math.abs(channel), 0.4547069271758437); - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { - t1 = $.$get$linearA98RgbToLinearSrgb0(); - break $label0$0; - } - if (B.DisplayP3ColorSpace_NQk0 === dest) { - t1 = $.$get$linearA98RgbToLinearDisplayP30(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG0 === dest) { - t1 = $.$get$linearA98RgbToLinearProphotoRgb0(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN0 === dest) { - t1 = $.$get$linearA98RgbToLinearRec20200(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA0 === dest) { - t1 = $.$get$linearA98RgbToXyzD650(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No0 === dest) { - t1 = $.$get$linearA98RgbToXyzD500(); - break $label0$0; - } - if (B.LmsColorSpace_8I80 === dest) { - t1 = $.$get$linearA98RgbToLms0(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix0(dest); - break $label0$0; - } - return t1; - } - }; - A.AnySelectorVisitor0.prototype = { - visitComplexSelector$1(complex) { - return B.JSArray_methods.any$1(complex.components, new A.AnySelectorVisitor_visitComplexSelector_closure0(this)); - }, - visitCompoundSelector$1(compound) { - return B.JSArray_methods.any$1(compound.components, new A.AnySelectorVisitor_visitCompoundSelector_closure0(this)); - }, - visitPseudoSelector$1(pseudo) { - var selector = pseudo.selector; - return selector == null ? false : this.visitSelectorList$1(selector); - }, - visitSelectorList$1(list) { - return B.JSArray_methods.any$1(list.components, this.get$visitComplexSelector()); - }, - visitAttributeSelector$1(attribute) { - return false; - }, - visitClassSelector$1(klass) { - return false; - }, - visitIDSelector$1(id) { - return false; - }, - visitParentSelector$1($parent) { - return false; - }, - visitPlaceholderSelector$1(placeholder) { - return false; - }, - visitTypeSelector$1(type) { - return false; - }, - visitUniversalSelector$1(universal) { - return false; - } - }; - A.AnySelectorVisitor_visitComplexSelector_closure0.prototype = { - call$1(component) { - return this.$this.visitCompoundSelector$1(component.selector); - }, - $signature: 53 - }; - A.AnySelectorVisitor_visitCompoundSelector_closure0.prototype = { - call$1(simple) { - return simple.accept$1(this.$this); - }, - $signature: 14 - }; - A.SupportsAnything0.prototype = { - toInterpolation$0() { - var t1 = new A.StringBuffer(""), - t2 = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), - t3 = this.span, - t4 = this.contents, - t5 = t4.span, - t6 = A.SpanExtensions_before(t3, t5); - t6 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t6.file._decodedChars, t6._file$_start, t6._end), 0, null); - t1._contents += t6; - t2.addInterpolation$1(t4); - t5 = A.SpanExtensions_after(t3, t5); - t5 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t5.file._decodedChars, t5._file$_start, t5._end), 0, null); - t1._contents += t5; - return t2.interpolation$1(t3); - }, - withSpan$1(span) { - return new A.SupportsAnything0(this.contents, span); - }, - toString$0(_) { - return "(" + this.contents.toString$0(0) + ")"; - }, - $isAstNode0: 1, - $isSassNode: 1, - $isSupportsCondition: 1, - get$span(receiver) { - return this.span; - } - }; - A.Argument0.prototype = { - toString$0(_) { - var t1 = this.defaultValue, - t2 = this.name; - return t1 == null ? t2 : t2 + ": " + t1.toString$0(0); - }, - $isAstNode0: 1, - $isSassNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.ArgumentDeclaration0.prototype = { - get$spanWithName() { - var t3, t4, - t1 = this.span, - t2 = t1.file, - text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, 0, null), 0, null), - i = A.FileLocation$_(t2, t1._file$_start).offset - 1; - while (true) { - if (i > 0) { - t3 = text.charCodeAt(i); - t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; - } else - t3 = false; - if (!t3) - break; - --i; - } - t3 = text.charCodeAt(i); - if (!(t3 === 95 || A.CharacterExtension_get_isAlphabetic0(t3) || t3 >= 128)) - t3 = t3 >= 48 && t3 <= 57 || t3 === 45; - else - t3 = true; - if (!t3) - return t1; - --i; - while (true) { - if (i >= 0) { - t3 = text.charCodeAt(i); - if (t3 !== 95) { - if (!(t3 >= 97 && t3 <= 122)) - t4 = t3 >= 65 && t3 <= 90; - else - t4 = true; - t4 = t4 || t3 >= 128; - } else - t4 = true; - if (!t4) - t3 = t3 >= 48 && t3 <= 57 || t3 === 45; - else - t3 = true; - } else - t3 = false; - if (!t3) - break; - --i; - } - t3 = i + 1; - t4 = text.charCodeAt(t3); - if (!(t4 === 95 || A.CharacterExtension_get_isAlphabetic0(t4) || t4 >= 128)) - return t1; - return A.SpanExtensions_trimRight0(A.SpanExtensions_trimLeft0(t2.span$2(0, t3, A.FileLocation$_(t2, t1._end).offset))); - }, - verify$2(positional, names) { - var t1, t2, t3, namedUsed, i, argument, t4, unknownNames, _this = this, - _s10_ = "invocation", - _s8_ = "argument"; - for (t1 = _this.$arguments, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { - argument = t1[i]; - if (i < positional) { - t4 = argument.name; - if (t3.containsKey$1(t4)) - throw A.wrapException(A.SassScriptException$0("Argument " + _this._argument_declaration$_originalArgumentName$1(t4) + string$.x20was_p, null)); - } else { - t4 = argument.name; - if (t3.containsKey$1(t4)) - ++namedUsed; - else if (argument.defaultValue == null) - throw A.wrapException(A.MultiSpanSassScriptException$0("Missing argument " + _this._argument_declaration$_originalArgumentName$1(t4) + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); - } - } - if (_this.restArgument != null) - return; - if (positional > t2) { - t1 = names.get$isEmpty(0) ? "" : "positional "; - throw A.wrapException(A.MultiSpanSassScriptException$0("Only " + t2 + " " + t1 + A.pluralize0(_s8_, t2, null) + " allowed, but " + positional + " " + A.pluralize0("was", positional, "were") + " passed.", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); - } - if (namedUsed < t3.get$length(t3)) { - t2 = type$.String; - unknownNames = A.LinkedHashSet_LinkedHashSet$of(names, t2); - unknownNames.removeAll$1(new A.MappedListIterable(t1, new A.ArgumentDeclaration_verify_closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object?>"))); - throw A.wrapException(A.MultiSpanSassScriptException$0("No " + A.pluralize0(_s8_, unknownNames._collection$_length, null) + " named " + A.toSentence0(unknownNames.map$1$1(0, new A.ArgumentDeclaration_verify_closure2(), type$.Object), "or") + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, t2))); - } - }, - _argument_declaration$_originalArgumentName$1($name) { - var t1, text, t2, _i, argument, t3, end; - if ($name === this.restArgument) { - t1 = this.span; - text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, null); - return B.JSString_methods.substring$2(B.JSString_methods.substring$1(text, B.JSString_methods.lastIndexOf$1(text, "$")), 0, B.JSString_methods.indexOf$1(text, ".")); - } - for (t1 = this.$arguments, t2 = t1.length, _i = 0; _i < t2; ++_i) { - argument = t1[_i]; - if (argument.name === $name) { - t1 = argument.defaultValue; - t2 = argument.span; - if (t1 == null) { - t1 = t2._file$_start; - t3 = t2.file._decodedChars; - t3 = A.String_String$fromCharCodes(new Uint32Array(t3.subarray(t1, A._checkValidRange(t1, t2._end, t3.length))), 0, null); - t1 = t3; - } else { - text = t2.get$text(); - t1 = B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")); - end = A._lastNonWhitespace0(t1, false); - t1 = end == null ? "" : B.JSString_methods.substring$2(t1, 0, end + 1); - } - return t1; - } - } - throw A.wrapException(A.ArgumentError$(string$.This_d + $name + '".', null)); - }, - matches$2(positional, names) { - var t1, t2, t3, namedUsed, i, argument; - for (t1 = this.$arguments, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { - argument = t1[i]; - if (i < positional) { - if (t3.containsKey$1(argument.name)) - return false; - } else if (t3.containsKey$1(argument.name)) - ++namedUsed; - else if (argument.defaultValue == null) - return false; - } - if (this.restArgument != null) - return true; - if (positional > t2) - return false; - if (namedUsed < t3.get$length(t3)) - return false; - return true; - }, - toString$0(_) { - var t2, t3, _i, - t1 = A._setArrayType([], type$.JSArray_String); - for (t2 = this.$arguments, t3 = t2.length, _i = 0; _i < t3; ++_i) - t1.push("$" + A.S(t2[_i])); - t2 = this.restArgument; - if (t2 != null) - t1.push("$" + t2 + "..."); - return B.JSArray_methods.join$1(t1, ", "); - }, - $isAstNode0: 1, - $isSassNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.ArgumentDeclaration_verify_closure1.prototype = { - call$1(argument) { - return argument.name; - }, - $signature: 307 - }; - A.ArgumentDeclaration_verify_closure2.prototype = { - call$1($name) { - return "$" + $name; - }, - $signature: 6 - }; - A.ArgumentInvocation0.prototype = { - get$isEmpty(_) { - var t1; - if (this.positional.length === 0) { - t1 = this.named; - t1 = t1.get$isEmpty(t1) && this.rest == null; - } else - t1 = false; - return t1; - }, - toString$0(_) { - var t2, t3, _i, _1_0, _2_0, _this = this, - t1 = A._setArrayType([], type$.JSArray_String); - for (t2 = _this.positional, t3 = t2.length, _i = 0; _i < t3; ++_i) - t1.push(_this._argument_invocation$_parenthesizeArgument$1(t2[_i])); - for (t2 = A.MapExtensions_get_pairs0(_this.named, type$.String, type$.Expression_2), t2 = t2.get$iterator(t2); t2.moveNext$0();) { - t3 = t2.get$current(t2); - t1.push("$" + t3._0 + ": " + _this._argument_invocation$_parenthesizeArgument$1(t3._1)); - } - _1_0 = _this.rest; - if (_1_0 != null) - t1.push(_this._argument_invocation$_parenthesizeArgument$1(_1_0) + "..."); - _2_0 = _this.keywordRest; - if (_2_0 != null) - t1.push(_this._argument_invocation$_parenthesizeArgument$1(_2_0) + "..."); - return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; - }, - _argument_invocation$_parenthesizeArgument$1(argument) { - var t1; - $label0$0: { - if (argument instanceof A.ListExpression0 && B.ListSeparator_ECn0 === argument.separator && !argument.hasBrackets && argument.contents.length >= 2) { - t1 = "(" + argument.toString$0(0) + ")"; - break $label0$0; - } - t1 = argument.toString$0(0); - break $label0$0; - } - return t1; - }, - $isAstNode0: 1, - $isSassNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.argumentListClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassArgumentList", new A.argumentListClass__closure())); - A.defineGetter(J.get$$prototype$x(jsClass), "keywords", new A.argumentListClass__closure0(), null); - A.JSClassExtension_injectSuperclass(t1._as(A.SassArgumentList$0(A._setArrayType([], type$.JSArray_Value_2), A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Value_2), B.ListSeparator_undecided_null_undecided0).constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.argumentListClass__closure.prototype = { - call$4($self, contents, keywords, separator) { - var t3, - t1 = self.immutable.isOrderedMap(contents) ? J.toArray$0$x(type$.ImmutableList._as(contents)) : type$.List_dynamic._as(contents), - t2 = type$.Value_2; - t1 = J.cast$1$0$ax(t1, t2); - t3 = self.immutable.isOrderedMap(keywords) ? A.immutableMapToDartMap(type$.ImmutableMap._as(keywords)) : A.objectToMap(keywords); - return A.SassArgumentList$0(t1, t3.cast$2$0(0, type$.String, t2), A.jsToDartSeparator(separator)); - }, - call$3($self, contents, keywords) { - return this.call$4($self, contents, keywords, ","); - }, - "call*": "call$4", - $requiredArgCount: 3, - $defaultValues() { - return [","]; - }, - $signature: 309 - }; - A.argumentListClass__closure0.prototype = { - call$1($self) { - $self._argument_list$_wereKeywordsAccessed = true; - return A.dartMapToImmutableMap($self._argument_list$_keywords); - }, - $signature: 310 - }; - A.SassArgumentList0.prototype = {}; - A.JSArray1.prototype = {}; - A.AsyncImporter0.prototype = { - isNonCanonicalScheme$1(scheme) { - return false; - } - }; - A.JSToDartAsyncImporter.prototype = { - canonicalize$1(_, url) { - return this.canonicalize$body$JSToDartAsyncImporter(0, url); - }, - canonicalize$body$JSToDartAsyncImporter(_, url) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Uri), - $async$returnValue, $async$self = this, t1, result; - var $async$canonicalize$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - result = A.wrapJSExceptions(new A.JSToDartAsyncImporter_canonicalize_closure($async$self, url)); - $async$goto = result != null && result instanceof self.Promise ? 3 : 4; - break; - case 3: - // then - $async$goto = 5; - return A._asyncAwait(A.promiseToFuture0(type$.Promise._as(result), type$.nullable_Object), $async$canonicalize$1); - case 5: - // returning from await. - result = $async$result; - case 4: - // join - if (result == null) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - t1 = self.URL; - if (result instanceof t1) { - $async$returnValue = A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); - // goto return - $async$goto = 1; - break; - } - A.jsThrow(new self.Error(string$.The_ca)); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$canonicalize$1, $async$completer); - }, - load$1(_, url) { - return this.load$body$JSToDartAsyncImporter(0, url); - }, - load$body$JSToDartAsyncImporter(_, url) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_ImporterResult_2), - $async$returnValue, $async$self = this, t1, contents, syntax, t2, result; - var $async$load$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - result = A.wrapJSExceptions(new A.JSToDartAsyncImporter_load_closure($async$self, url)); - $async$goto = result != null && result instanceof self.Promise ? 3 : 4; - break; - case 3: - // then - $async$goto = 5; - return A._asyncAwait(A.promiseToFuture0(type$.Promise._as(result), type$.nullable_Object), $async$load$1); - case 5: - // returning from await. - result = $async$result; - case 4: - // join - if (result == null) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - type$.JSImporterResult._as(result); - t1 = J.getInterceptor$x(result); - contents = t1.get$contents(result); - if (A._asString(new self.Function("value", "return typeof value").call$1(contents)) !== "string") - A.jsThrow(new A.ArgumentError(true, contents, "contents", "must be a string but was: " + A.jsType(contents))); - syntax = t1.get$syntax(result); - if (contents == null || syntax == null) - A.jsThrow(new self.Error(string$.The_lo)); - t2 = A.parseSyntax(syntax); - $async$returnValue = A.ImporterResult$(contents, A.NullableExtension_andThen0(t1.get$sourceMapUrl(result), A.utils3__jsToDartUrl$closure()), t2); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$load$1, $async$completer); - }, - isNonCanonicalScheme$1(scheme) { - return this._nonCanonicalSchemes.contains$1(0, scheme); - } - }; - A.JSToDartAsyncImporter_canonicalize_closure.prototype = { - call$0() { - return this.$this._async0$_canonicalize.call$2(this.url.toString$0(0), A.canonicalizeContext0()); - }, - $signature: 33 - }; - A.JSToDartAsyncImporter_load_closure.prototype = { - call$0() { - return this.$this._load.call$1(new self.URL(this.url.toString$0(0))); - }, - $signature: 33 - }; - A.AsyncBuiltInCallable0.prototype = { - callbackFor$2(positional, names) { - return new A._Record_2(this._async_built_in0$_arguments, this._async_built_in0$_callback); - }, - withDeprecationWarning$1(module) { - return new A.AsyncBuiltInCallable0(this.name, this._async_built_in0$_arguments, new A.AsyncBuiltInCallable_withDeprecationWarning_closure0(this, module, null), false); - }, - $isAsyncCallable0: 1, - get$name(receiver) { - return this.name; - }, - get$acceptsContent() { - return this.acceptsContent; - } - }; - A.AsyncBuiltInCallable$mixin_closure0.prototype = { - call$1($arguments) { - return this.$call$body$AsyncBuiltInCallable$mixin_closure0($arguments); - }, - $call$body$AsyncBuiltInCallable$mixin_closure0($arguments) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, t1; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.callback.call$1($arguments); - $async$goto = 3; - return A._asyncAwait(t1 instanceof A._Future ? t1 : A._Future$value(t1, type$.void), $async$call$1); - case 3: - // returning from await. - $async$returnValue = B.C__SassNull0; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 92 - }; - A.AsyncBuiltInCallable_withDeprecationWarning_closure0.prototype = { - call$1(args) { - var t1 = this.$this; - A.warnForDeprecation0(string$.Global + this.module + "." + t1.name + string$.x20inste, B.Deprecation_Q5r); - return t1._async_built_in0$_callback.call$1(args); - }, - $signature: 313 - }; - A._compileStylesheet_closure2.prototype = { - call$1(url) { - return url === "" ? A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(this.stylesheet.span.file._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text() : this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); - }, - $signature: 6 - }; - A.AsyncEnvironment0.prototype = { - closure$0() { - var t4, t5, t6, _this = this, - t1 = _this._async_environment0$_forwardedModules, - t2 = _this._async_environment0$_nestedForwardedModules, - t3 = _this._async_environment0$_variables; - t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); - t4 = _this._async_environment0$_variableNodes; - t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); - t5 = _this._async_environment0$_functions; - t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); - t6 = _this._async_environment0$_mixins; - t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); - return A.AsyncEnvironment$_0(_this._async_environment0$_modules, _this._async_environment0$_namespaceNodes, _this._async_environment0$_globalModules, _this._async_environment0$_importedModules, t1, t2, _this._async_environment0$_allModules, t3, t4, t5, t6, _this._async_environment0$_content); - }, - forwardModule$2(module, rule) { - var view, t1, t2, _this = this, - forwardedModules = _this._async_environment0$_forwardedModules; - if (forwardedModules == null) - forwardedModules = _this._async_environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable_2, type$.AstNode_2); - view = A.ForwardedModuleView_ifNecessary0(module, rule, type$.AsyncCallable_2); - for (t1 = A.LinkedHashMapKeyIterator$(forwardedModules, forwardedModules.__js_helper$_modifications); t1.moveNext$0();) { - t2 = t1.__js_helper$_current; - _this._async_environment0$_assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); - _this._async_environment0$_assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); - _this._async_environment0$_assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); - } - _this._async_environment0$_allModules.push(module); - forwardedModules.$indexSet(0, view, rule); - }, - _async_environment0$_assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { - var larger, smaller, t1, t2, t3, t4, $name, small, large, span; - if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { - larger = oldMembers; - smaller = newMembers; - } else { - larger = newMembers; - smaller = oldMembers; - } - for (t1 = type$.String, t2 = A.MapExtensions_get_pairs0(smaller, t1, type$.Object), t2 = t2.get$iterator(t2), t3 = type === "variable"; t2.moveNext$0();) { - t4 = t2.get$current(t2); - $name = t4._0; - small = t4._1; - large = larger.$index(0, $name); - if (large == null) - continue; - if (t3 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(large, small)) - continue; - if (t3) - $name = "$" + $name; - t2 = this._async_environment0$_forwardedModules; - if (t2 == null) - span = null; - else { - t2 = t2.$index(0, oldModule); - span = t2 == null ? null : J.get$span$z(t2); - } - t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, t1); - if (span != null) - t2.$indexSet(0, span, "original @forward"); - throw A.wrapException(A.MultiSpanSassScriptException$0("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t2)); - } - }, - importForwards$1(module) { - var forwardedModules, t1, t2, t3, t4, node, t5, t6, t7, t8, t9, t10, _i, t11, shadowed, t12, _length, _list, _this = this, - forwarded = module._async_environment0$_environment._async_environment0$_forwardedModules; - if (forwarded == null) - return; - forwardedModules = _this._async_environment0$_forwardedModules; - if (forwardedModules != null) { - t1 = type$.Module_AsyncCallable_2; - t2 = type$.AstNode_2; - t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t1 = A.MapExtensions_get_pairs0(forwarded, t1, t2), t1 = t1.get$iterator(t1), t2 = _this._async_environment0$_globalModules; t1.moveNext$0();) { - t4 = t1.get$current(t1); - module = t4._0; - node = t4._1; - if (!forwardedModules.containsKey$1(module) || !t2.containsKey$1(module)) - t3.$indexSet(0, module, node); - } - forwarded = t3; - } else - forwardedModules = _this._async_environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable_2, type$.AstNode_2); - t1 = type$.String; - t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - for (t3 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t3.moveNext$0();) - for (t4 = t3.__js_helper$_current.get$variables(), t4 = J.get$iterator$ax(t4.get$keys(t4)); t4.moveNext$0();) - t2.add$1(0, t4.get$current(t4)); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) { - t5 = t4.__js_helper$_current; - for (t5 = t5.get$functions(t5), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) - t3.add$1(0, t5.get$current(t5)); - } - t1 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) - for (t5 = t4.__js_helper$_current.get$mixins(), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) - t1.add$1(0, t5.get$current(t5)); - t4 = _this._async_environment0$_variables; - t5 = t4.length; - if (t5 === 1) { - for (t5 = _this._async_environment0$_importedModules, t6 = type$.Module_AsyncCallable_2, t7 = type$.AstNode_2, t8 = A.MapExtensions_get_pairs0(t5, t6, t7).toList$0(0), t9 = t8.length, t10 = type$.AsyncCallable_2, _i = 0; _i < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i) { - t11 = t8[_i]; - module = t11._0; - node = t11._1; - shadowed = A.ShadowedModuleView_ifNecessary0(module, t3, t1, t2, t10); - if (shadowed != null) { - t5.remove$1(0, module); - t11 = shadowed.variables; - t12 = false; - if (t11.get$isEmpty(t11)) { - t11 = shadowed.functions; - if (t11.get$isEmpty(t11)) { - t11 = shadowed.mixins; - if (t11.get$isEmpty(t11)) { - t11 = shadowed._shadowed_view0$_inner; - t11 = t11.get$css(t11); - t11 = J.get$isEmpty$asx(t11.get$children(t11)); - } else - t11 = t12; - } else - t11 = t12; - } else - t11 = t12; - if (!t11) - t5.$indexSet(0, shadowed, node); - } - } - for (t6 = A.MapExtensions_get_pairs0(forwardedModules, t6, t7).toList$0(0), t7 = t6.length, _i = 0; _i < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i) { - t8 = t6[_i]; - module = t8._0; - node = t8._1; - shadowed = A.ShadowedModuleView_ifNecessary0(module, t3, t1, t2, t10); - if (shadowed != null) { - forwardedModules.remove$1(0, module); - t8 = shadowed.variables; - t9 = false; - if (t8.get$isEmpty(t8)) { - t8 = shadowed.functions; - if (t8.get$isEmpty(t8)) { - t8 = shadowed.mixins; - if (t8.get$isEmpty(t8)) { - t8 = shadowed._shadowed_view0$_inner; - t8 = t8.get$css(t8); - t8 = J.get$isEmpty$asx(t8.get$children(t8)); - } else - t8 = t9; - } else - t8 = t9; - } else - t8 = t9; - if (!t8) - forwardedModules.$indexSet(0, shadowed, node); - } - } - t5.addAll$1(0, forwarded); - forwardedModules.addAll$1(0, forwarded); - } else { - t6 = _this._async_environment0$_nestedForwardedModules; - if (t6 == null) { - _length = t5 - 1; - _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_AsyncCallable_2); - for (t5 = type$.JSArray_Module_AsyncCallable_2, _i = 0; _i < _length; ++_i) - _list[_i] = A._setArrayType([], t5); - _this._async_environment0$_nestedForwardedModules = _list; - t5 = _list; - } else - t5 = t6; - B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t5), new A.LinkedHashMapKeyIterable(forwarded, A._instanceType(forwarded)._eval$1("LinkedHashMapKeyIterable<1>"))); - } - for (t2 = A._LinkedHashSetIterator$(t2, t2._modifications, t2.$ti._precomputed1), t5 = _this._async_environment0$_variableIndices, t6 = _this._async_environment0$_variableNodes, t7 = t2.$ti._precomputed1; t2.moveNext$0();) { - t8 = t2._collection$_current; - if (t8 == null) - t8 = t7._as(t8); - t5.remove$1(0, t8); - J.remove$1$z(B.JSArray_methods.get$last(t4), t8); - J.remove$1$z(B.JSArray_methods.get$last(t6), t8); - } - for (t2 = A._LinkedHashSetIterator$(t3, t3._modifications, t3.$ti._precomputed1), t3 = _this._async_environment0$_functionIndices, t4 = _this._async_environment0$_functions, t5 = t2.$ti._precomputed1; t2.moveNext$0();) { - t6 = t2._collection$_current; - if (t6 == null) - t6 = t5._as(t6); - t3.remove$1(0, t6); - J.remove$1$z(B.JSArray_methods.get$last(t4), t6); - } - for (t1 = A._LinkedHashSetIterator$(t1, t1._modifications, t1.$ti._precomputed1), t2 = _this._async_environment0$_mixinIndices, t3 = _this._async_environment0$_mixins, t4 = t1.$ti._precomputed1; t1.moveNext$0();) { - t5 = t1._collection$_current; - if (t5 == null) - t5 = t4._as(t5); - t2.remove$1(0, t5); - J.remove$1$z(B.JSArray_methods.get$last(t3), t5); - } - }, - getVariable$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) - return _this._async_environment0$_getModule$1(namespace).get$variables().$index(0, $name); - if (_this._async_environment0$_lastVariableName === $name) { - t1 = _this._async_environment0$_lastVariableIndex; - t1.toString; - t1 = J.$index$asx(_this._async_environment0$_variables[t1], $name); - return t1 == null ? _this._async_environment0$_getVariableFromGlobalModule$1($name) : t1; - } - t1 = _this._async_environment0$_variableIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - _this._async_environment0$_lastVariableName = $name; - _this._async_environment0$_lastVariableIndex = _0_0; - t1 = J.$index$asx(_this._async_environment0$_variables[_0_0], $name); - return t1 == null ? _this._async_environment0$_getVariableFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._async_environment0$_variableIndex$1($name); - if (_1_0 != null) { - _this._async_environment0$_lastVariableName = $name; - _this._async_environment0$_lastVariableIndex = _1_0; - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._async_environment0$_variables[_1_0], $name); - return t1 == null ? _this._async_environment0$_getVariableFromGlobalModule$1($name) : t1; - } else - return _this._async_environment0$_getVariableFromGlobalModule$1($name); - } - }, - getVariable$1($name) { - return this.getVariable$2$namespace($name, null); - }, - _async_environment0$_getVariableFromGlobalModule$1($name) { - return this._async_environment0$_fromOneModule$3($name, "variable", new A.AsyncEnvironment__getVariableFromGlobalModule_closure0($name)); - }, - getVariableNode$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) - return _this._async_environment0$_getModule$1(namespace).get$variableNodes().$index(0, $name); - if (_this._async_environment0$_lastVariableName === $name) { - t1 = _this._async_environment0$_lastVariableIndex; - t1.toString; - t1 = J.$index$asx(_this._async_environment0$_variableNodes[t1], $name); - return t1 == null ? _this._async_environment0$_getVariableNodeFromGlobalModule$1($name) : t1; - } - t1 = _this._async_environment0$_variableIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - _this._async_environment0$_lastVariableName = $name; - _this._async_environment0$_lastVariableIndex = _0_0; - t1 = J.$index$asx(_this._async_environment0$_variableNodes[_0_0], $name); - return t1 == null ? _this._async_environment0$_getVariableNodeFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._async_environment0$_variableIndex$1($name); - if (_1_0 != null) { - _this._async_environment0$_lastVariableName = $name; - _this._async_environment0$_lastVariableIndex = _1_0; - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._async_environment0$_variableNodes[_1_0], $name); - return t1 == null ? _this._async_environment0$_getVariableNodeFromGlobalModule$1($name) : t1; - } else - return _this._async_environment0$_getVariableNodeFromGlobalModule$1($name); - } - }, - _async_environment0$_getVariableNodeFromGlobalModule$1($name) { - var t1, t2, _0_0; - for (t1 = this._async_environment0$_importedModules, t2 = this._async_environment0$_globalModules, t2 = new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeyIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { - t1 = t2._currentIterator; - _0_0 = t1.get$current(t1).get$variableNodes().$index(0, $name); - if (_0_0 != null) - return _0_0; - } - return null; - }, - globalVariableExists$2$namespace($name, namespace) { - if (namespace != null) - return this._async_environment0$_getModule$1(namespace).get$variables().containsKey$1($name); - if (B.JSArray_methods.get$first(this._async_environment0$_variables).containsKey$1($name)) - return true; - return this._async_environment0$_getVariableFromGlobalModule$1($name) != null; - }, - globalVariableExists$1($name) { - return this.globalVariableExists$2$namespace($name, null); - }, - _async_environment0$_variableIndex$1($name) { - var t1, i; - for (t1 = this._async_environment0$_variables, i = t1.length - 1; i >= 0; --i) - if (t1[i].containsKey$1($name)) - return i; - return null; - }, - setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { - var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; - if (namespace != null) { - _this._async_environment0$_getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); - return; - } - if (global || _this._async_environment0$_variables.length === 1) { - _this._async_environment0$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure2(_this, $name)); - t1 = _this._async_environment0$_variables; - if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { - moduleWithName = _this._async_environment0$_fromOneModule$3($name, "variable", new A.AsyncEnvironment_setVariable_closure3($name)); - if (moduleWithName != null) { - moduleWithName.setVariable$3($name, value, nodeWithSpan); - return; - } - } - J.$indexSet$ax(B.JSArray_methods.get$first(t1), $name, value); - J.$indexSet$ax(B.JSArray_methods.get$first(_this._async_environment0$_variableNodes), $name, nodeWithSpan); - return; - } - nestedForwardedModules = _this._async_environment0$_nestedForwardedModules; - if (nestedForwardedModules != null && !_this._async_environment0$_variableIndices.containsKey$1($name) && _this._async_environment0$_variableIndex$1($name) == null) - for (t1 = A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(nestedForwardedModules, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { - t3 = t2.__internal$_current; - for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { - t5 = t3.__internal$_current; - if (t5 == null) - t5 = t4._as(t5); - if (t5.get$variables().containsKey$1($name)) { - t5.setVariable$3($name, value, nodeWithSpan); - return; - } - } - } - if (_this._async_environment0$_lastVariableName === $name) { - t1 = _this._async_environment0$_lastVariableIndex; - t1.toString; - index = t1; - } else - index = _this._async_environment0$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure4(_this, $name)); - if (!_this._async_environment0$_inSemiGlobalScope && index === 0) { - index = _this._async_environment0$_variables.length - 1; - _this._async_environment0$_variableIndices.$indexSet(0, $name, index); - } - _this._async_environment0$_lastVariableName = $name; - _this._async_environment0$_lastVariableIndex = index; - J.$indexSet$ax(_this._async_environment0$_variables[index], $name, value); - J.$indexSet$ax(_this._async_environment0$_variableNodes[index], $name, nodeWithSpan); - }, - setVariable$4$global($name, value, nodeWithSpan, global) { - return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); - }, - setLocalVariable$3($name, value, nodeWithSpan) { - var index, _this = this, - t1 = _this._async_environment0$_variables, - t2 = t1.length; - _this._async_environment0$_lastVariableName = $name; - index = _this._async_environment0$_lastVariableIndex = t2 - 1; - _this._async_environment0$_variableIndices.$indexSet(0, $name, index); - J.$indexSet$ax(t1[index], $name, value); - J.$indexSet$ax(_this._async_environment0$_variableNodes[index], $name, nodeWithSpan); - }, - getFunction$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) { - t1 = _this._async_environment0$_getModule$1(namespace); - return t1.get$functions(t1).$index(0, $name); - } - t1 = _this._async_environment0$_functionIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - t1 = J.$index$asx(_this._async_environment0$_functions[_0_0], $name); - return t1 == null ? _this._async_environment0$_getFunctionFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._async_environment0$_functionIndex$1($name); - if (_1_0 != null) { - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._async_environment0$_functions[_1_0], $name); - return t1 == null ? _this._async_environment0$_getFunctionFromGlobalModule$1($name) : t1; - } else - return _this._async_environment0$_getFunctionFromGlobalModule$1($name); - } - }, - getFunction$1($name) { - return this.getFunction$2$namespace($name, null); - }, - _async_environment0$_getFunctionFromGlobalModule$1($name) { - return this._async_environment0$_fromOneModule$3($name, "function", new A.AsyncEnvironment__getFunctionFromGlobalModule_closure0($name)); - }, - _async_environment0$_functionIndex$1($name) { - var t1, i; - for (t1 = this._async_environment0$_functions, i = t1.length - 1; i >= 0; --i) - if (t1[i].containsKey$1($name)) - return i; - return null; - }, - getMixin$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) - return _this._async_environment0$_getModule$1(namespace).get$mixins().$index(0, $name); - t1 = _this._async_environment0$_mixinIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - t1 = J.$index$asx(_this._async_environment0$_mixins[_0_0], $name); - return t1 == null ? _this._async_environment0$_getMixinFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._async_environment0$_mixinIndex$1($name); - if (_1_0 != null) { - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._async_environment0$_mixins[_1_0], $name); - return t1 == null ? _this._async_environment0$_getMixinFromGlobalModule$1($name) : t1; - } else - return _this._async_environment0$_getMixinFromGlobalModule$1($name); - } - }, - _async_environment0$_getMixinFromGlobalModule$1($name) { - return this._async_environment0$_fromOneModule$3($name, "mixin", new A.AsyncEnvironment__getMixinFromGlobalModule_closure0($name)); - }, - _async_environment0$_mixinIndex$1($name) { - var t1, i; - for (t1 = this._async_environment0$_mixins, i = t1.length - 1; i >= 0; --i) - if (t1[i].containsKey$1($name)) - return i; - return null; - }, - withContent$2($content, callback) { - return this.withContent$body$AsyncEnvironment0($content, callback); - }, - withContent$body$AsyncEnvironment0($content, callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, oldContent; - var $async$withContent$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldContent = $async$self._async_environment0$_content; - $async$self._async_environment0$_content = $content; - $async$goto = 2; - return A._asyncAwait(callback.call$0(), $async$withContent$2); - case 2: - // returning from await. - $async$self._async_environment0$_content = oldContent; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$withContent$2, $async$completer); - }, - asMixin$1(callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, oldInMixin; - var $async$asMixin$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldInMixin = $async$self._async_environment0$_inMixin; - $async$self._async_environment0$_inMixin = true; - $async$goto = 2; - return A._asyncAwait(callback.call$0(), $async$asMixin$1); - case 2: - // returning from await. - $async$self._async_environment0$_inMixin = oldInMixin; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$asMixin$1, $async$completer); - }, - scope$1$3$semiGlobal$when(callback, semiGlobal, when, $T) { - return this.scope$body$AsyncEnvironment0(callback, semiGlobal, when, $T, $T); - }, - scope$1$1(callback, $T) { - return this.scope$1$3$semiGlobal$when(callback, false, true, $T); - }, - scope$1$2$when(callback, when, $T) { - return this.scope$1$3$semiGlobal$when(callback, false, when, $T); - }, - scope$1$2$semiGlobal(callback, semiGlobal, $T) { - return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true, $T); - }, - scope$body$AsyncEnvironment0(callback, semiGlobal, when, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6; - var $async$scope$1$3$semiGlobal$when = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - semiGlobal = semiGlobal && $async$self._async_environment0$_inSemiGlobalScope; - wasInSemiGlobalScope = $async$self._async_environment0$_inSemiGlobalScope; - $async$self._async_environment0$_inSemiGlobalScope = semiGlobal; - $async$goto = !when ? 3 : 4; - break; - case 3: - // then - $async$handler = 5; - $async$goto = 8; - return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); - case 8: - // returning from await. - t1 = $async$result; - $async$returnValue = t1; - $async$next = [1]; - // goto finally - $async$goto = 6; - break; - $async$next.push(7); - // goto finally - $async$goto = 6; - break; - case 5: - // uncaught - $async$next = [2]; - case 6: - // finally - $async$handler = 2; - $async$self._async_environment0$_inSemiGlobalScope = wasInSemiGlobalScope; - // goto the next finally handler - $async$goto = $async$next.pop(); - break; - case 7: - // after finally - case 4: - // join - t1 = $async$self._async_environment0$_variables; - t2 = type$.String; - B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value_2)); - t3 = $async$self._async_environment0$_variableNodes; - B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode_2)); - t4 = $async$self._async_environment0$_functions; - t5 = type$.AsyncCallable_2; - B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); - t6 = $async$self._async_environment0$_mixins; - B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); - t5 = $async$self._async_environment0$_nestedForwardedModules; - if (t5 != null) - t5.push(A._setArrayType([], type$.JSArray_Module_AsyncCallable_2)); - $async$handler = 9; - $async$goto = 12; - return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); - case 12: - // returning from await. - t2 = $async$result; - $async$returnValue = t2; - $async$next = [1]; - // goto finally - $async$goto = 10; - break; - $async$next.push(11); - // goto finally - $async$goto = 10; - break; - case 9: - // uncaught - $async$next = [2]; - case 10: - // finally - $async$handler = 2; - $async$self._async_environment0$_inSemiGlobalScope = wasInSemiGlobalScope; - $async$self._async_environment0$_lastVariableIndex = $async$self._async_environment0$_lastVariableName = null; - for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t1))), t2 = $async$self._async_environment0$_variableIndices; t1.moveNext$0();) { - $name = t1.get$current(t1); - t2.remove$1(0, $name); - } - B.JSArray_methods.removeLast$0(t3); - for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t4))), t2 = $async$self._async_environment0$_functionIndices; t1.moveNext$0();) { - name0 = t1.get$current(t1); - t2.remove$1(0, name0); - } - for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t6))), t2 = $async$self._async_environment0$_mixinIndices; t1.moveNext$0();) { - name1 = t1.get$current(t1); - t2.remove$1(0, name1); - } - t1 = $async$self._async_environment0$_nestedForwardedModules; - if (t1 != null) - t1.pop(); - // goto the next finally handler - $async$goto = $async$next.pop(); - break; - case 11: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$scope$1$3$semiGlobal$when, $async$completer); - }, - toImplicitConfiguration$0() { - var t2, t3, t4, i, values, nodes, t5, t6, $name, value, - t1 = type$.String, - configuration = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ConfiguredValue_2); - for (t2 = this._async_environment0$_variables, t3 = type$.Value_2, t4 = this._async_environment0$_variableNodes, i = 0; i < t2.length; ++i) { - values = t2[i]; - nodes = t4[i]; - for (t5 = A.MapExtensions_get_pairs0(values, t1, t3), t5 = t5.get$iterator(t5); t5.moveNext$0();) { - t6 = t5.get$current(t5); - $name = t6._0; - value = t6._1; - t6 = nodes.$index(0, $name); - t6.toString; - configuration.$indexSet(0, $name, new A.ConfiguredValue0(value, null, t6)); - } - } - return new A.Configuration0(configuration, null); - }, - toModule$3(css, preModuleComments, extensionStore) { - return A._EnvironmentModule__EnvironmentModule2(this, css, preModuleComments, extensionStore, A.NullableExtension_andThen0(this._async_environment0$_forwardedModules, new A.AsyncEnvironment_toModule_closure0())); - }, - toDummyModule$0() { - return A._EnvironmentModule__EnvironmentModule2(this, new A.CssStylesheet0(new A.UnmodifiableListView(B.List_empty17, type$.UnmodifiableListView_CssNode_2), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.Map_empty16, B.C_EmptyExtensionStore0, A.NullableExtension_andThen0(this._async_environment0$_forwardedModules, new A.AsyncEnvironment_toDummyModule_closure0())); - }, - _async_environment0$_getModule$1(namespace) { - var _0_0 = this._async_environment0$_modules.$index(0, namespace); - if (_0_0 != null) - return _0_0; - throw A.wrapException(A.SassScriptException$0('There is no module with the namespace "' + namespace + '".', null)); - }, - _async_environment0$_fromOneModule$1$3($name, type, callback) { - var t1, t2, t3, t4, t5, _1_0, _2_0, value, identity, valueInModule, identityFromModule, module, node, - _0_0 = this._async_environment0$_nestedForwardedModules; - if (_0_0 != null) - for (t1 = A._arrayInstanceType(_0_0)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(_0_0, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { - t3 = t2.__internal$_current; - for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { - t5 = t3.__internal$_current; - _1_0 = callback.call$1(t5 == null ? t4._as(t5) : t5); - if (_1_0 != null) - return _1_0; - } - } - for (t1 = this._async_environment0$_importedModules, t1 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications); t1.moveNext$0();) { - _2_0 = callback.call$1(t1.__js_helper$_current); - if (_2_0 != null) - return _2_0; - } - for (t1 = this._async_environment0$_globalModules, t2 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications), t3 = type$.AsyncCallable_2, value = null, identity = null; t2.moveNext$0();) { - t4 = t2.__js_helper$_current; - valueInModule = callback.call$1(t4); - if (valueInModule == null) - continue; - identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); - if (identityFromModule.$eq(0, identity)) - continue; - if (value != null) { - t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - for (t3 = A.MapExtensions_get_pairs0(t1, type$.Module_AsyncCallable_2, type$.AstNode_2), t3 = t3.get$iterator(t3), t4 = "includes " + type; t3.moveNext$0();) { - t1 = t3.get$current(t3); - module = t1._0; - node = t1._1; - if (callback.call$1(module) != null) - t2.$indexSet(0, node.get$span(node), t4); - } - throw A.wrapException(A.MultiSpanSassScriptException$0("This " + type + string$.x20is_av, type + " use", t2)); - } - identity = identityFromModule; - value = valueInModule; - } - return value; - }, - _async_environment0$_fromOneModule$3($name, type, callback) { - return this._async_environment0$_fromOneModule$1$3($name, type, callback, type$.dynamic); - } - }; - A.AsyncEnvironment__getVariableFromGlobalModule_closure0.prototype = { - call$1(module) { - return module.get$variables().$index(0, this.name); - }, - $signature: 314 - }; - A.AsyncEnvironment_setVariable_closure2.prototype = { - call$0() { - var t1 = this.$this; - t1._async_environment0$_lastVariableName = this.name; - return t1._async_environment0$_lastVariableIndex = 0; - }, - $signature: 10 - }; - A.AsyncEnvironment_setVariable_closure3.prototype = { - call$1(module) { - return module.get$variables().containsKey$1(this.name) ? module : null; - }, - $signature: 315 - }; - A.AsyncEnvironment_setVariable_closure4.prototype = { - call$0() { - var t1 = this.$this, - t2 = t1._async_environment0$_variableIndex$1(this.name); - return t2 == null ? t1._async_environment0$_variables.length - 1 : t2; - }, - $signature: 10 - }; - A.AsyncEnvironment__getFunctionFromGlobalModule_closure0.prototype = { - call$1(module) { - return module.get$functions(module).$index(0, this.name); - }, - $signature: 199 - }; - A.AsyncEnvironment__getMixinFromGlobalModule_closure0.prototype = { - call$1(module) { - return module.get$mixins().$index(0, this.name); - }, - $signature: 199 - }; - A.AsyncEnvironment_toModule_closure0.prototype = { - call$1(modules) { - return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable_2); - }, - $signature: 200 - }; - A.AsyncEnvironment_toDummyModule_closure0.prototype = { - call$1(modules) { - return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable_2); - }, - $signature: 200 - }; - A._EnvironmentModule2.prototype = { - get$url(_) { - var t1 = this.css; - return t1.get$span(t1).file.url; - }, - setVariable$3($name, value, nodeWithSpan) { - var t1, t2, - _0_0 = this._async_environment0$_modulesByVariable.$index(0, $name); - if (_0_0 != null) { - _0_0.setVariable$3($name, value, nodeWithSpan); - return; - } - t1 = this._async_environment0$_environment; - t2 = t1._async_environment0$_variables; - if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) - throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); - J.$indexSet$ax(B.JSArray_methods.get$first(t2), $name, value); - J.$indexSet$ax(B.JSArray_methods.get$first(t1._async_environment0$_variableNodes), $name, nodeWithSpan); - return; - }, - variableIdentity$1($name) { - var module = this._async_environment0$_modulesByVariable.$index(0, $name); - return module == null ? this : module.variableIdentity$1($name); - }, - cloneCss$0() { - var _0_0, _this = this; - if (!_this.transitivelyContainsCss) - return _this; - _0_0 = A.cloneCssStylesheet0(_this.css, _this.extensionStore); - return A._EnvironmentModule$_2(_this._async_environment0$_environment, _0_0._0, _this.preModuleComments, _0_0._1, _this._async_environment0$_modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, true, _this.transitivelyContainsExtensions); - }, - toString$0(_) { - var t2, - t1 = this.css; - if (t1.get$span(t1).file.url == null) - t1 = ""; - else { - t1 = t1.get$span(t1).file.url; - t2 = $.$get$context(); - t1.toString; - t1 = t2.prettyUri$1(t1); - } - return t1; - }, - $isModule1: 1, - get$upstream() { - return this.upstream; - }, - get$variables() { - return this.variables; - }, - get$variableNodes() { - return this.variableNodes; - }, - get$functions(receiver) { - return this.functions; - }, - get$mixins() { - return this.mixins; - }, - get$extensionStore() { - return this.extensionStore; - }, - get$css(receiver) { - return this.css; - }, - get$preModuleComments() { - return this.preModuleComments; - }, - get$transitivelyContainsCss() { - return this.transitivelyContainsCss; - }, - get$transitivelyContainsExtensions() { - return this.transitivelyContainsExtensions; - } - }; - A._EnvironmentModule__EnvironmentModule_closure17.prototype = { - call$1(module) { - return module.get$variables(); - }, - $signature: 273 - }; - A._EnvironmentModule__EnvironmentModule_closure18.prototype = { - call$1(module) { - return module.get$variableNodes(); - }, - $signature: 319 - }; - A._EnvironmentModule__EnvironmentModule_closure19.prototype = { - call$1(module) { - return module.get$functions(module); - }, - $signature: 201 - }; - A._EnvironmentModule__EnvironmentModule_closure20.prototype = { - call$1(module) { - return module.get$mixins(); - }, - $signature: 201 - }; - A._EnvironmentModule__EnvironmentModule_closure21.prototype = { - call$1(module) { - return module.get$transitivelyContainsCss(); - }, - $signature: 117 - }; - A._EnvironmentModule__EnvironmentModule_closure22.prototype = { - call$1(module) { - return module.get$transitivelyContainsExtensions(); - }, - $signature: 117 - }; - A._EvaluateVisitor2.prototype = { - _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { - var t2, metaModule, t3, _i, module, $function, t4, _this = this, - _s20_ = "$name, $module: null", - _s9_ = "sass:meta", - _s7_ = "$module", - t1 = type$.JSArray_AsyncBuiltInCallable_2, - metaFunctions = A._setArrayType([A.BuiltInCallable$function0("global-variable-exists", _s20_, new A._EvaluateVisitor_closure38(_this), _s9_), A.BuiltInCallable$function0("variable-exists", "$name", new A._EvaluateVisitor_closure39(_this), _s9_), A.BuiltInCallable$function0("function-exists", _s20_, new A._EvaluateVisitor_closure40(_this), _s9_), A.BuiltInCallable$function0("mixin-exists", _s20_, new A._EvaluateVisitor_closure41(_this), _s9_), A.BuiltInCallable$function0("content-exists", "", new A._EvaluateVisitor_closure42(_this), _s9_), A.BuiltInCallable$function0("module-variables", _s7_, new A._EvaluateVisitor_closure43(_this), _s9_), A.BuiltInCallable$function0("module-functions", _s7_, new A._EvaluateVisitor_closure44(_this), _s9_), A.BuiltInCallable$function0("module-mixins", _s7_, new A._EvaluateVisitor_closure45(_this), _s9_), A.BuiltInCallable$function0("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure46(_this), _s9_), A.BuiltInCallable$function0("get-mixin", _s20_, new A._EvaluateVisitor_closure47(_this), _s9_), new A.AsyncBuiltInCallable0("call", A.ScssParser$0("@function call($function, $args...) {", _s9_).parseArgumentDeclaration$0(), new A._EvaluateVisitor_closure48(_this), false)], t1), - metaMixins = A._setArrayType([A.AsyncBuiltInCallable$mixin0("load-css", "$url, $with: null", new A._EvaluateVisitor_closure49(_this), false, _s9_), A.AsyncBuiltInCallable$mixin0("apply", "$mixin, $args...", new A._EvaluateVisitor_closure50(_this), true, _s9_)], t1); - t1 = type$.AsyncBuiltInCallable_2; - t2 = A.List_List$of($.$get$moduleFunctions0(), true, t1); - B.JSArray_methods.addAll$1(t2, metaFunctions); - metaModule = A.BuiltInModule$0("meta", t2, metaMixins, null, t1); - for (t1 = A.List_List$of($.$get$coreModules0(), true, type$.BuiltInModule_AsyncCallable_2), t1.push(metaModule), t2 = t1.length, t3 = _this._async_evaluate0$_builtInModules, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - module = t1[_i]; - t3.$indexSet(0, module.url, module); - } - t1 = type$.JSArray_AsyncCallable_2; - t2 = A._setArrayType([], t1); - B.JSArray_methods.addAll$1(t2, functions); - B.JSArray_methods.addAll$1(t2, $.$get$globalFunctions0()); - t1 = A._setArrayType([], t1); - for (_i = 0; _i < 11; ++_i) - t1.push(metaFunctions[_i].withDeprecationWarning$1("meta")); - B.JSArray_methods.addAll$1(t2, t1); - for (t1 = t2.length, t3 = _this._async_evaluate0$_builtInFunctions, _i = 0; _i < t2.length; t2.length === t1 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - $function = t2[_i]; - t4 = J.get$name$x($function); - t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); - } - }, - run$2(_, importer, node) { - return this.run$body$_EvaluateVisitor0(0, importer, node); - }, - run$body$_EvaluateVisitor0(_, importer, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2), - $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, $async$exception; - var $async$run$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$handler = 4; - t1 = type$.nullable_Object; - t1 = A.runZoned(new A._EvaluateVisitor_run_closure2($async$self, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext2($async$self, node)], t1, t1), type$.FutureOr_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2); - $async$goto = 7; - return A._asyncAwait(type$.Future_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2._is(t1) ? t1 : A._Future$value(t1, type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2), $async$run$2); - case 7: - // returning from await. - t1 = $async$result; - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - $async$handler = 2; - // goto after finally - $async$goto = 6; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (t1 instanceof A.SassException0) { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - A.throwWithTrace0(error.withLoadedUrls$1($async$self._async_evaluate0$_loadedUrls), error, stackTrace); - } else - throw $async$exception; - // goto after finally - $async$goto = 6; - break; - case 3: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 6: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$run$2, $async$completer); - }, - _async_evaluate0$_assertInModule$1$2(value, $name) { - if (value != null) - return value; - throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); - }, - _async_evaluate0$_assertInModule$2(value, $name) { - return this._async_evaluate0$_assertInModule$1$2(value, $name, type$.dynamic); - }, - _async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { - return this._loadModule$body$_EvaluateVisitor0(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors); - }, - _async_evaluate0$_loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { - return this._async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); - }, - _async_evaluate0$_loadModule$4(url, stackFrame, nodeWithSpan, callback) { - return this._async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); - }, - _loadModule$body$_EvaluateVisitor0(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$returnValue, $async$self = this, t2, t1, _0_0; - var $async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = {}; - _0_0 = $async$self._async_evaluate0$_builtInModules.$index(0, url); - t1.builtInModule = null; - $async$goto = _0_0 != null ? 3 : 4; - break; - case 3: - // then - t1.builtInModule = _0_0; - if (configuration instanceof A.ExplicitConfiguration0) { - t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; - t2 = configuration.nodeWithSpan; - throw A.wrapException($async$self._async_evaluate0$_exception$2(t1, t2.get$span(t2))); - } - $async$goto = 5; - return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure5(t1, callback), type$.void), $async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors); - case 5: - // returning from await. - // goto return - $async$goto = 1; - break; - case 4: - // join - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate0$_withStackFrame$1$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure6($async$self, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback), type$.Null), $async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors); - case 6: - // returning from await. - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors, $async$completer); - }, - _async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { - return this._execute$body$_EvaluateVisitor0(importer, stylesheet, configuration, namesInErrors, nodeWithSpan); - }, - _async_evaluate0$_execute$2(importer, stylesheet) { - return this._async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); - }, - _execute$body$_EvaluateVisitor0(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Module_AsyncCallable_2), - $async$returnValue, $async$self = this, currentConfiguration, t2, t3, message, existingSpan, configurationSpan, environment, css, preModuleComments, extensionStore, module, url, t1, _0_0; - var $async$_async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - url = stylesheet.span.file.url; - t1 = $async$self._async_evaluate0$_modules; - _0_0 = t1.$index(0, url); - if (_0_0 != null) { - t1 = configuration == null; - currentConfiguration = t1 ? $async$self._async_evaluate0$_configuration : configuration; - t2 = $async$self._async_evaluate0$_moduleConfigurations.$index(0, url); - t3 = t2._configuration0$__originalConfiguration; - t2 = t3 == null ? t2 : t3; - t3 = currentConfiguration._configuration0$__originalConfiguration; - if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration0) { - if (namesInErrors) { - t2 = $.$get$context(); - url.toString; - message = t2.prettyUri$1(url) + string$.x20was_a; - } else - message = string$.This_mw; - t2 = $async$self._async_evaluate0$_moduleNodes.$index(0, url); - existingSpan = t2 == null ? null : t2.get$span(t2); - if (t1) { - t1 = currentConfiguration.nodeWithSpan; - configurationSpan = t1.get$span(t1); - } else - configurationSpan = null; - t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - if (existingSpan != null) - t1.$indexSet(0, existingSpan, "original load"); - if (configurationSpan != null) - t1.$indexSet(0, configurationSpan, "configuration"); - throw A.wrapException(t1.get$isEmpty(0) ? $async$self._async_evaluate0$_exception$1(message) : $async$self._async_evaluate0$_multiSpanException$3(message, "new load", t1)); - } - $async$returnValue = _0_0; - // goto return - $async$goto = 1; - break; - } - environment = A.AsyncEnvironment$0(); - css = A._Cell$(); - preModuleComments = A._Cell$(); - extensionStore = A.ExtensionStore$0(); - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_withEnvironment$1$2(environment, new A._EvaluateVisitor__execute_closure2($async$self, importer, stylesheet, extensionStore, configuration, css, preModuleComments), type$.Null), $async$_async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan); - case 3: - // returning from await. - t2 = css._readLocal$0(); - t3 = preModuleComments._readLocal$0(); - module = environment.toModule$3(t2, t3 == null ? B.Map_empty16 : t3, extensionStore); - if (url != null) { - t1.$indexSet(0, url, module); - $async$self._async_evaluate0$_moduleConfigurations.$indexSet(0, url, $async$self._async_evaluate0$_configuration); - if (nodeWithSpan != null) - $async$self._async_evaluate0$_moduleNodes.$indexSet(0, url, nodeWithSpan); - } - $async$returnValue = module; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan, $async$completer); - }, - _async_evaluate0$_addOutOfOrderImports$0() { - var t1, t2, _this = this, _s5_ = "_root", - _s13_ = "_endOfImports", - _0_0 = _this._async_evaluate0$_outOfOrderImports; - $label0$0: { - if (_0_0 == null) { - t1 = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children; - break $label0$0; - } - t1 = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children; - t1 = A.List_List$of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListBase.E")), true, type$.ModifiableCssNode_2); - B.JSArray_methods.addAll$1(t1, _0_0); - t2 = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children; - B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__endOfImports, _s13_), null, t2.$ti._eval$1("ListBase.E"))); - break $label0$0; - } - return t1; - }, - _async_evaluate0$_combineCss$2$clone(root, clone) { - var selectors, _0_0, t1, imports, css, sorted, t2; - if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure5())) { - selectors = root.get$extensionStore().get$simpleSelectors(); - _0_0 = A.IterableExtension_get_firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure6(selectors))); - if (_0_0 != null) - this._async_evaluate0$_throwForUnsatisfiedExtension$1(_0_0); - return root.get$css(root); - } - t1 = type$.JSArray_CssNode_2; - imports = A._setArrayType([], t1); - css = A._setArrayType([], t1); - t1 = type$.Module_AsyncCallable_2; - sorted = A.ListQueue$(t1); - new A._EvaluateVisitor__combineCss_visitModule2(this, A.LinkedHashSet_LinkedHashSet$_empty(t1), clone, css, imports, sorted).call$1(root); - if (root.get$transitivelyContainsExtensions()) - this._async_evaluate0$_extendModules$1(sorted); - t1 = B.JSArray_methods.$add(imports, css); - t2 = root.get$css(root); - return new A.CssStylesheet0(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode_2), t2.get$span(t2)); - }, - _async_evaluate0$_combineCss$1(root) { - return this._async_evaluate0$_combineCss$2$clone(root, false); - }, - _async_evaluate0$_extendModules$1(sortedModules) { - var t1, t2, t3, originalSelectors, $self, t4, t5, _i, upstream, _0_0, - downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore_2), - unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension_2); - for (t1 = A._ListQueueIterator$(sortedModules, sortedModules.$ti._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { - t3 = t1._collection$_current; - if (t3 == null) - t3 = t2._as(t3); - originalSelectors = t3.get$extensionStore().get$simpleSelectors().toSet$0(0); - unsatisfiedExtensions.addAll$1(0, t3.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure5(originalSelectors))); - $self = downstreamExtensionStores.$index(0, t3.get$url(t3)); - t4 = t3.get$extensionStore().get$addExtensions(); - if ($self != null) - t4.call$1($self); - t4 = t3.get$extensionStore(); - if (t4.get$isEmpty(t4)) - continue; - for (t4 = t3.get$upstream(), t5 = t4.length, _i = 0; _i < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i) { - upstream = t4[_i]; - _0_0 = upstream.get$url(upstream); - if (_0_0 != null) - J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(_0_0, new A._EvaluateVisitor__extendModules_closure6()), t3.get$extensionStore()); - } - unsatisfiedExtensions.removeAll$1(t3.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); - } - if (unsatisfiedExtensions._collection$_length !== 0) - this._async_evaluate0$_throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(0)); - }, - _async_evaluate0$_throwForUnsatisfiedExtension$1(extension) { - throw A.wrapException(A.SassException$0(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span, null)); - }, - _async_evaluate0$_indexAfterImports$1(statements) { - var t1, lastImport, i, _0_0; - for (t1 = J.getInterceptor$asx(statements), lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { - $label0$0: { - _0_0 = t1.$index(statements, i); - if (_0_0 instanceof A.ModifiableCssImport0) - break $label0$0; - if (_0_0 instanceof A.ModifiableCssComment0) - continue; - break; - } - lastImport = i; - } - return lastImport + 1; - }, - visitStylesheet$1(_, node) { - return this.visitStylesheet$body$_EvaluateVisitor0(0, node); - }, - visitStylesheet$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, t1, t2, warning, _i, $name, span; - var $async$visitStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - for (t1 = node.parseTimeWarnings, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - warning = t1.__internal$_current; - if (warning == null) - warning = t2._as(warning); - $async$self._async_evaluate0$_warn$3(warning._1, warning._2, warning._0); - } - t1 = node.children, t2 = t1.length, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - $async$goto = 6; - return A._asyncAwait(t1[_i].accept$1($async$self), $async$visitStylesheet$1); - case 6: - // returning from await. - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - for (t1 = A.MapExtensions_get_pairs0(node.globalVariables, type$.String, type$.FileSpan), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t2 = t1.get$current(t1); - $name = t2._0; - span = t2._1; - $async$self.visitVariableDeclaration$1(0, new A.VariableDeclaration0(null, $name, new A.NullExpression0(span), true, false, span)); - } - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitStylesheet$1, $async$completer); - }, - visitAtRootRule$1(_, node) { - return this.visitAtRootRule$body$_EvaluateVisitor0(0, node); - }, - visitAtRootRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, _1_0, resolved, query, $parent, included, t1, _2_0, root, first, rest, innerCopy, outerCopy, _i, copy, _0_0; - var $async$visitAtRootRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - _0_0 = node.query; - $async$goto = _0_0 != null ? 3 : 5; - break; - case 3: - // then - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolationWithMap$2$warnForColor(_0_0, true), $async$visitAtRootRule$1); - case 6: - // returning from await. - _1_0 = $async$result; - resolved = _1_0._0; - _1_0._1; - query = new A.AtRootQueryParser0(A.SpanScanner$(resolved, null), null).parse$0(0); - // goto join - $async$goto = 4; - break; - case 5: - // else - query = B.AtRootQuery_n2q0; - case 4: - // join - $parent = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); - included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode_2); - for (t1 = type$.CssStylesheet_2; !t1._is($parent); $parent = _2_0) { - if (!query.excludes$1($parent)) - included.push($parent); - _2_0 = $parent._node$_parent; - if (_2_0 == null) - throw A.wrapException(A.StateError$(string$.CssNod)); - } - root = $async$self._async_evaluate0$_trimIncluded$1(included); - $async$goto = root === $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") ? 7 : 8; - break; - case 7: - // then - $async$goto = 9; - return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure5($async$self, node), node.hasDeclarations, type$.Null), $async$visitAtRootRule$1); - case 9: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 8: - // join - if (included.length >= 1) { - first = included[0]; - rest = B.JSArray_methods.sublist$1(included, 1); - innerCopy = first.copyWithoutChildren$0(); - for (t1 = rest.length, outerCopy = innerCopy, _i = 0; _i < rest.length; rest.length === t1 || (0, A.throwConcurrentModificationError)(rest), ++_i, outerCopy = copy) { - copy = rest[_i].copyWithoutChildren$0(); - copy.addChild$1(outerCopy); - } - root.addChild$1(outerCopy); - } else - innerCopy = root; - $async$goto = 10; - return A._asyncAwait($async$self._async_evaluate0$_scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure6($async$self, node)), $async$visitAtRootRule$1); - case 10: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitAtRootRule$1, $async$completer); - }, - _async_evaluate0$_trimIncluded$1(nodes) { - var $parent, t1, innermostContiguous, i, t2, _0_0, _1_0, root, _this = this, _null = null, _s5_ = "_root", - _s22_ = " to be an ancestor of "; - if (nodes.length === 0) - return _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_); - $parent = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__parent, "__parent"); - for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = _1_0) { - for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = _0_0) { - _0_0 = $parent._node$_parent; - if (_0_0 == null) - throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); - } - if (innermostContiguous == null) - innermostContiguous = i; - _1_0 = $parent._node$_parent; - if (_1_0 == null) - throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); - } - if ($parent !== _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_)) - return _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_); - innermostContiguous.toString; - root = nodes[innermostContiguous]; - B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); - return root; - }, - _async_evaluate0$_scopeForAtRoot$4(node, newParent, query, included) { - var _this = this, - scope = new A._EvaluateVisitor__scopeForAtRoot_closure17(_this, newParent, node), - t1 = query._at_root_query0$_all || query._at_root_query0$_rule; - if (t1 !== query.include) - scope = new A._EvaluateVisitor__scopeForAtRoot_closure18(_this, scope); - if (_this._async_evaluate0$_mediaQueries != null && query.excludesName$1("media")) - scope = new A._EvaluateVisitor__scopeForAtRoot_closure19(_this, scope); - if (_this._async_evaluate0$_inKeyframes && query.excludesName$1("keyframes")) - scope = new A._EvaluateVisitor__scopeForAtRoot_closure20(_this, scope); - return _this._async_evaluate0$_inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure21()) ? new A._EvaluateVisitor__scopeForAtRoot_closure22(_this, scope) : scope; - }, - visitContentBlock$1(_, node) { - return A.throwExpression(A.UnsupportedError$(string$.Evalua)); - }, - visitContentRule$1(_, node) { - return this.visitContentRule$body$_EvaluateVisitor0(0, node); - }, - visitContentRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, $content; - var $async$visitContentRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $content = $async$self._async_evaluate0$_environment._async_environment0$_content; - if ($content == null) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure2($async$self, $content), type$.Null), $async$visitContentRule$1); - case 3: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitContentRule$1, $async$completer); - }, - visitDebugRule$1(_, node) { - return this.visitDebugRule$body$_EvaluateVisitor0(0, node); - }, - visitDebugRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, value, t1; - var $async$visitDebugRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait(node.expression.accept$1($async$self), $async$visitDebugRule$1); - case 3: - // returning from await. - value = $async$result; - t1 = value instanceof A.SassString0 ? value._string0$_text : A.serializeValue0(value, true, true); - $async$self._async_evaluate0$_logger.debug$2(0, t1, node.span); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitDebugRule$1, $async$completer); - }, - visitDeclaration$1(_, node) { - return this.visitDeclaration$body$_EvaluateVisitor0(0, node); - }, - visitDeclaration$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, siblings, interleavedRules, t1, t2, t3, t4, t5, t6, rule, rule0, $name, _1_0, _2_0, value, _3_0, oldDeclarationName, _box_0; - var $async$visitDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - _box_0 = {}; - if (($async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot) == null && !$async$self._async_evaluate0$_inUnknownAtRule && !$async$self._async_evaluate0$_inKeyframes) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Declarm, node.span)); - if ($async$self._async_evaluate0$_declarationName != null && B.JSString_methods.startsWith$1(node.name.get$initialPlain(), "--")) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Declarw, node.span)); - siblings = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent")._node$_parent.children; - interleavedRules = A._setArrayType([], type$.JSArray_CssStyleRule_2); - if (siblings.get$last(siblings) !== $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent")) { - if ($async$self._async_evaluate0$_quietDeps) - if (!$async$self._async_evaluate0$_inDependency) { - t1 = $async$self._async_evaluate0$_currentCallable; - t1 = t1 == null ? null : t1.inDependency; - t1 = t1 === true; - } else - t1 = true; - else - t1 = false; - t1 = !t1; - } else - t1 = false; - if (t1) - for (t1 = A.SubListIterable$(siblings, siblings.indexOf$1(siblings, $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent")) + 1, null, siblings.$ti._eval$1("ListBase.E")), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { - t6 = t1.__internal$_current; - rule = t6 == null ? t2._as(t6) : t6; - $label0$1: { - if (rule instanceof A.ModifiableCssComment0) - continue; - t6 = rule instanceof A.ModifiableCssStyleRule0; - rule0 = t6 ? rule : null; - if (t6) { - interleavedRules.push(rule0); - break $label0$1; - } - $async$self._async_evaluate0$_warn$3(string$.Sassx27s, new A.MultiSpan0(t3, "declaration", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rule.get$span(rule), "nested rule"], t4, t5), t4, t5)), B.Deprecation_VIq); - B.JSArray_methods.clear$0(interleavedRules); - break $label0$1; - } - } - t1 = node.name; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$2$warnForColor(t1, true), $async$visitDeclaration$1); - case 3: - // returning from await. - $name = $async$result; - _1_0 = $async$self._async_evaluate0$_declarationName; - if (_1_0 != null) - $name = new A.CssValue0(_1_0 + "-" + A.S($name.value), $name.span, type$.CssValue_String_2); - _2_0 = node.value; - $async$goto = _2_0 != null ? 4 : 5; - break; - case 4: - // then - $async$goto = 6; - return A._asyncAwait(_2_0.accept$1($async$self), $async$visitDeclaration$1); - case 6: - // returning from await. - value = $async$result; - if (!value.get$isBlank() || value.get$asList().length === 0) { - t2 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); - t3 = _2_0.get$span(_2_0); - t4 = node.span; - t1 = B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--"); - t5 = interleavedRules.length === 0 ? null : $async$self._async_evaluate0$_stackTrace$1(t4); - if ($async$self._async_evaluate0$_sourceMap) { - t6 = A.NullableExtension_andThen0(_2_0, $async$self.get$_async_evaluate0$_expressionNode()); - t6 = t6 == null ? null : J.get$span$z(t6); - } else - t6 = null; - t2.addChild$1(A.ModifiableCssDeclaration$0($name, new A.CssValue0(value, t3, type$.CssValue_Value_2), t4, interleavedRules, t1, t5, t6)); - } else if (J.startsWith$1$s($name.value, "--")) - throw A.wrapException($async$self._async_evaluate0$_exception$2("Custom property values may not be empty.", _2_0.get$span(_2_0))); - case 5: - // join - _3_0 = node.children; - _box_0.children = null; - $async$goto = _3_0 != null ? 7 : 8; - break; - case 7: - // then - _box_0.children = _3_0; - oldDeclarationName = $async$self._async_evaluate0$_declarationName; - $async$self._async_evaluate0$_declarationName = $name.value; - $async$goto = 9; - return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure2(_box_0, $async$self), node.hasDeclarations, type$.Null), $async$visitDeclaration$1); - case 9: - // returning from await. - $async$self._async_evaluate0$_declarationName = oldDeclarationName; - case 8: - // join - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitDeclaration$1, $async$completer); - }, - visitEachRule$1(_, node) { - return this.visitEachRule$body$_EvaluateVisitor0(0, node); - }, - visitEachRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, _box_0, t1, list, nodeWithSpan, _0_0; - var $async$visitEachRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - _box_0 = {}; - t1 = node.list; - $async$goto = 3; - return A._asyncAwait(t1.accept$1($async$self), $async$visitEachRule$1); - case 3: - // returning from await. - list = $async$result; - nodeWithSpan = $async$self._async_evaluate0$_expressionNode$1(t1); - _0_0 = node.variables; - $label0$0: { - _box_0.variable = null; - if (_0_0.length === 1) { - _box_0.variable = _0_0[0]; - t1 = new A._EvaluateVisitor_visitEachRule_closure8(_box_0, $async$self, nodeWithSpan); - break $label0$0; - } - _box_0.variables = null; - _box_0.variables = _0_0; - t1 = new A._EvaluateVisitor_visitEachRule_closure9(_box_0, $async$self, nodeWithSpan); - break $label0$0; - } - $async$returnValue = $async$self._async_evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure10($async$self, list, t1, node), true, type$.nullable_Value_2); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitEachRule$1, $async$completer); - }, - _async_evaluate0$_setMultipleVariables$3(variables, value, nodeWithSpan) { - var i, - list = value.get$asList(), - t1 = variables.length, - minLength = Math.min(t1, list.length); - for (i = 0; i < minLength; ++i) - this._async_evaluate0$_environment.setLocalVariable$3(variables[i], this._async_evaluate0$_withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); - for (i = minLength; i < t1; ++i) - this._async_evaluate0$_environment.setLocalVariable$3(variables[i], B.C__SassNull0, nodeWithSpan); - }, - visitErrorRule$1(_, node) { - return this.visitErrorRule$body$_EvaluateVisitor0(0, node); - }, - visitErrorRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$self = this, $async$temp1, $async$temp2; - var $async$visitErrorRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$temp1 = A; - $async$temp2 = J; - $async$goto = 2; - return A._asyncAwait(node.expression.accept$1($async$self), $async$visitErrorRule$1); - case 2: - // returning from await. - throw $async$temp1.wrapException($async$self._async_evaluate0$_exception$2($async$temp2.toString$0$($async$result), node.span)); - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitErrorRule$1, $async$completer); - }, - visitExtendRule$1(_, node) { - return this.visitExtendRule$body$_EvaluateVisitor0(0, node); - }, - visitExtendRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, _0_0, targetText, targetMap, compound, styleRule; - var $async$visitExtendRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - styleRule = $async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; - if (styleRule == null || $async$self._async_evaluate0$_declarationName != null) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.x40exten, node.span)); - for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - if (!complex.accept$1(B._IsBogusVisitor_true0)) - continue; - visitor = A._SerializeVisitor$0(null, true, null, null, true, false, null, true); - complex.accept$1(visitor); - t6 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); - t7 = complex.accept$1(B.C__IsUselessVisitor0) ? "can't" : "shouldn't"; - $async$self._async_evaluate0$_warn$3('The selector "' + t6 + '" is invalid CSS and ' + t7 + string$.x20be_an, new A.MultiSpan0(A.SpanExtensions_trimRight0(complex.span), "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t3, "@extend rule"], t4, t5), t4, t5)), B.Deprecation_bh9); - } - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolationWithMap$2$warnForColor(node.selector, true), $async$visitExtendRule$1); - case 3: - // returning from await. - _0_0 = $async$result; - targetText = _0_0._0; - targetMap = _0_0._1; - for (t1 = A.SelectorList_SelectorList$parse0(A.trimAscii0(targetText, true), false, targetMap, false).components, t2 = t1.length, t3 = styleRule._style_rule0$_selector._box0$_inner, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - compound = complex.get$singleCompound(); - if (compound == null) - throw A.wrapException(A.SassFormatException$0("complex selectors may not be extended.", complex.span, null)); - t4 = compound.components; - t5 = t4.length === 1 ? B.JSArray_methods.get$first(t4) : null; - if (t5 == null) - throw A.wrapException(A.SassFormatException$0(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, compound.span, null)); - $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__extensionStore, "_extensionStore").addExtension$4(t3.value, t5, node, $async$self._async_evaluate0$_mediaQueries); - } - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitExtendRule$1, $async$completer); - }, - visitAtRule$1(_, node) { - return this.visitAtRule$body$_EvaluateVisitor0(0, node); - }, - visitAtRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, $name, t1, value, children, wasInKeyframes, wasInUnknownAtRule; - var $async$visitAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate0$_declarationName != null) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.At_rul, node.span)); - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$1(node.name), $async$visitAtRule$1); - case 3: - // returning from await. - $name = $async$result; - t1 = A.NullableExtension_andThen0(node.value, new A._EvaluateVisitor_visitAtRule_closure8($async$self)); - $async$goto = 4; - return A._asyncAwait(type$.Future_nullable_CssValue_String_2._is(t1) ? t1 : A._Future$value(t1, type$.nullable_CssValue_String_2), $async$visitAtRule$1); - case 4: - // returning from await. - value = $async$result; - children = node.children; - if (children == null) { - $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0($name, node.span, true, value)); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - wasInKeyframes = $async$self._async_evaluate0$_inKeyframes; - wasInUnknownAtRule = $async$self._async_evaluate0$_inUnknownAtRule; - if (A.unvendor0($name.value) === "keyframes") - $async$self._async_evaluate0$_inKeyframes = true; - else - $async$self._async_evaluate0$_inUnknownAtRule = true; - $async$goto = 5; - return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$0($name, node.span, false, value), new A._EvaluateVisitor_visitAtRule_closure9($async$self, $name, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure10(), type$.ModifiableCssAtRule_2, type$.Null), $async$visitAtRule$1); - case 5: - // returning from await. - $async$self._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; - $async$self._async_evaluate0$_inKeyframes = wasInKeyframes; - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitAtRule$1, $async$completer); - }, - visitForRule$1(_, node) { - return this.visitForRule$body$_EvaluateVisitor0(0, node); - }, - visitForRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, t1, t2, t3, fromNumber, t4, toNumber, from, to, direction; - var $async$visitForRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = {}; - t2 = node.from; - t3 = type$.SassNumber_2; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(t2, new A._EvaluateVisitor_visitForRule_closure14($async$self, node), t3), $async$visitForRule$1); - case 3: - // returning from await. - fromNumber = $async$result; - t4 = node.to; - $async$goto = 4; - return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(t4, new A._EvaluateVisitor_visitForRule_closure15($async$self, node), t3), $async$visitForRule$1); - case 4: - // returning from await. - toNumber = $async$result; - from = $async$self._async_evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure16(fromNumber)); - to = t1.to = $async$self._async_evaluate0$_addExceptionSpan$2(t4, new A._EvaluateVisitor_visitForRule_closure17(toNumber, fromNumber)); - direction = from > to ? -1 : 1; - if (from === (!node.isExclusive ? t1.to = to + direction : to)) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - $async$returnValue = $async$self._async_evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure18(t1, $async$self, node, from, direction, fromNumber), true, type$.nullable_Value_2); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitForRule$1, $async$completer); - }, - visitForwardRule$1(_, node) { - return this.visitForwardRule$body$_EvaluateVisitor0(0, node); - }, - visitForwardRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, newConfiguration, t4, _i, variable, $name, oldConfiguration, adjustedConfiguration, t1, t2, t3; - var $async$visitForwardRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldConfiguration = $async$self._async_evaluate0$_configuration; - adjustedConfiguration = oldConfiguration.throughForward$1(node); - t1 = node.configuration; - t2 = t1.length; - t3 = node.url; - $async$goto = t2 !== 0 ? 3 : 5; - break; - case 3: - // then - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate0$_addForwardConfiguration$2(adjustedConfiguration, node), $async$visitForwardRule$1); - case 6: - // returning from await. - newConfiguration = $async$result; - $async$goto = 7; - return A._asyncAwait($async$self._async_evaluate0$_loadModule$5$configuration(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure5($async$self, node), newConfiguration), $async$visitForwardRule$1); - case 7: - // returning from await. - t3 = type$.String; - t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); - for (_i = 0; _i < t2; ++_i) { - variable = t1[_i]; - if (!variable.isGuarded) - t4.add$1(0, variable.name); - } - $async$self._async_evaluate0$_removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); - for (_i = 0; _i < t2; ++_i) - t3.add$1(0, t1[_i].name); - for (t1 = newConfiguration._configuration0$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - $name = t2[_i]; - if (!t3.contains$1(0, $name)) - if (!t1.get$isEmpty(t1)) - t1.remove$1(0, $name); - } - $async$self._async_evaluate0$_assertConfigurationIsEmpty$1(newConfiguration); - // goto join - $async$goto = 4; - break; - case 5: - // else - $async$self._async_evaluate0$_configuration = adjustedConfiguration; - $async$goto = 8; - return A._asyncAwait($async$self._async_evaluate0$_loadModule$4(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure6($async$self, node)), $async$visitForwardRule$1); - case 8: - // returning from await. - $async$self._async_evaluate0$_configuration = oldConfiguration; - case 4: - // join - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitForwardRule$1, $async$completer); - }, - _async_evaluate0$_addForwardConfiguration$2(configuration, node) { - return this._addForwardConfiguration$body$_EvaluateVisitor0(configuration, node); - }, - _addForwardConfiguration$body$_EvaluateVisitor0(configuration, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Configuration_2), - $async$returnValue, $async$self = this, t2, t3, t4, t5, _i, variable, t6, oldValue, t7, variableNodeWithSpan, t8, t1, newValues, $async$temp1, $async$temp2, $async$temp3; - var $async$_async_evaluate0$_addForwardConfiguration$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = configuration._configuration0$_values; - newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); - t2 = node.configuration, t3 = t2.length, t4 = type$._Future_Value_2, t5 = type$.Future_Value_2, _i = 0; - case 3: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 5; - break; - } - variable = t2[_i]; - if (variable.isGuarded) { - t6 = variable.name; - oldValue = t1.get$isEmpty(t1) ? null : t1.remove$1(0, t6); - if (oldValue != null) - t7 = !oldValue.value.$eq(0, B.C__SassNull0); - else { - oldValue = null; - t7 = false; - } - if (t7) { - newValues.$indexSet(0, t6, oldValue); - // goto for update - $async$goto = 4; - break; - } - } - t6 = variable.expression; - variableNodeWithSpan = $async$self._async_evaluate0$_expressionNode$1(t6); - t7 = variable.name; - t6 = t6.accept$1($async$self); - if (!t5._is(t6)) { - t8 = new A._Future($.Zone__current, t4); - t8._state = 8; - t8._resultOrListeners = t6; - t6 = t8; - } - $async$temp1 = newValues; - $async$temp2 = t7; - $async$temp3 = A; - $async$goto = 6; - return A._asyncAwait(t6, $async$_async_evaluate0$_addForwardConfiguration$2); - case 6: - // returning from await. - $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue0($async$self._async_evaluate0$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - if (configuration instanceof A.ExplicitConfiguration0 || t1.get$isEmpty(t1)) { - $async$returnValue = new A.ExplicitConfiguration0(node, newValues, null); - // goto return - $async$goto = 1; - break; - } else { - $async$returnValue = new A.Configuration0(newValues, null); - // goto return - $async$goto = 1; - break; - } - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_addForwardConfiguration$2, $async$completer); - }, - _async_evaluate0$_registerCommentsForModule$1(module) { - var _this = this, _s5_ = "_root", - t1 = _this._async_evaluate0$__root; - if (t1 == null) - return; - if (_this._async_evaluate0$_assertInModule$2(t1, _s5_).children.get$length(0) === 0 || !module.get$transitivelyContainsCss()) - return; - t1 = _this._async_evaluate0$_preModuleComments; - if (t1 == null) - t1 = _this._async_evaluate0$_preModuleComments = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable_2, type$.List_CssComment_2); - J.addAll$1$ax(t1.putIfAbsent$2(module, new A._EvaluateVisitor__registerCommentsForModule_closure2()), new A.UnmodifiableListView(J.cast$1$0$ax(_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children._collection$_source, type$.CssComment_2), type$.UnmodifiableListView_CssComment_2)); - _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).clearChildren$0(); - _this._async_evaluate0$__endOfImports = 0; - }, - _async_evaluate0$_removeUsedConfiguration$3$except(upstream, downstream, except) { - var t1, t2, t3, t4, _i, $name; - for (t1 = upstream._configuration0$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t3 = t2.length, t4 = downstream._configuration0$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - $name = t2[_i]; - if (except.contains$1(0, $name)) - continue; - if (!t4.containsKey$1($name)) - if (!t1.get$isEmpty(t1)) - t1.remove$1(0, $name); - } - }, - _async_evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { - var t1, _0_0, $name, value; - if (!(configuration instanceof A.ExplicitConfiguration0)) - return; - t1 = configuration._configuration0$_values; - if (t1.get$isEmpty(t1)) - return; - t1 = A.MapExtensions_get_pairs0(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); - _0_0 = t1.get$first(t1); - $name = _0_0._0; - value = _0_0._1; - t1 = nameInError ? "$" + $name + string$.x20was_n : string$.This_v; - throw A.wrapException(this._async_evaluate0$_exception$2(t1, value.configurationSpan)); - }, - _async_evaluate0$_assertConfigurationIsEmpty$1(configuration) { - return this._async_evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, false); - }, - visitFunctionRule$1(_, node) { - return this.visitFunctionRule$body$_EvaluateVisitor0(0, node); - }, - visitFunctionRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; - var $async$visitFunctionRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self._async_evaluate0$_environment; - t2 = t1.closure$0(); - t3 = $async$self._async_evaluate0$_inDependency; - t4 = t1._async_environment0$_functions; - index = t4.length - 1; - t5 = node.name; - t1._async_environment0$_functionIndices.$indexSet(0, t5, index); - J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment_2)); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitFunctionRule$1, $async$completer); - }, - visitIfRule$1(_, node) { - return this.visitIfRule$body$_EvaluateVisitor0(0, node); - }, - visitIfRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, t1, t2, _i, clauseToCheck, clause; - var $async$visitIfRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - clause = node.lastClause; - t1 = node.clauses, t2 = t1.length, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - clauseToCheck = t1[_i]; - $async$goto = 6; - return A._asyncAwait(clauseToCheck.expression.accept$1($async$self), $async$visitIfRule$1); - case 6: - // returning from await. - if ($async$result.get$isTruthy()) { - clause = clauseToCheck; - // goto after for - $async$goto = 5; - break; - } - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - t1 = A.NullableExtension_andThen0(clause, new A._EvaluateVisitor_visitIfRule_closure2($async$self)); - $async$goto = 7; - return A._asyncAwait(type$.Future_nullable_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.nullable_Value_2), $async$visitIfRule$1); - case 7: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitIfRule$1, $async$completer); - }, - visitImportRule$1(_, node) { - return this.visitImportRule$body$_EvaluateVisitor0(0, node); - }, - visitImportRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, t1, t2, t3, _i, $import; - var $async$visitImportRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = node.imports, t2 = t1.length, t3 = type$.StaticImport_2, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - $import = t1[_i]; - $async$goto = $import instanceof A.DynamicImport0 ? 6 : 8; - break; - case 6: - // then - $async$goto = 9; - return A._asyncAwait($async$self._async_evaluate0$_visitDynamicImport$1($import), $async$visitImportRule$1); - case 9: - // returning from await. - // goto join - $async$goto = 7; - break; - case 8: - // else - $async$goto = 10; - return A._asyncAwait($async$self._async_evaluate0$_visitStaticImport$1(t3._as($import)), $async$visitImportRule$1); - case 10: - // returning from await. - case 7: - // join - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitImportRule$1, $async$completer); - }, - _async_evaluate0$_visitDynamicImport$1($import) { - return this._async_evaluate0$_withStackFrame$1$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure2(this, $import), type$.void); - }, - _async_evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { - return this._loadStylesheet$body$_EvaluateVisitor0(url, span, baseUrl, forImport); - }, - _async_evaluate0$_loadStylesheet$3$baseUrl(url, span, baseUrl) { - return this._async_evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); - }, - _async_evaluate0$_loadStylesheet$3$forImport(url, span, forImport) { - return this._async_evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); - }, - _loadStylesheet$body$_EvaluateVisitor0(url, span, baseUrl, forImport) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency_2), - $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, _0_0, importCache, _1_0, importer, canonicalUrl, originalUrl, isDependency, _2_0, stylesheet, _3_0, result, error, stackTrace, error0, stackTrace0, t1, t2, exception, $async$exception; - var $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - baseUrl = baseUrl; - $async$handler = 4; - $async$self._async_evaluate0$_importSpan = span; - _0_0 = $async$self._async_evaluate0$_importCache; - importCache = null; - $async$goto = _0_0 != null ? 7 : 8; - break; - case 7: - // then - importCache = _0_0; - if (baseUrl == null) - baseUrl = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").span.file.url; - $async$goto = 9; - return A._asyncAwait(J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), $async$self._async_evaluate0$_importer, baseUrl, forImport), $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport); - case 9: - // returning from await. - _1_0 = $async$result; - importer = null; - canonicalUrl = null; - originalUrl = null; - $async$goto = type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(_1_0) ? 10 : 11; - break; - case 10: - // then - importer = _1_0._0; - canonicalUrl = _1_0._1; - originalUrl = _1_0._2; - if (canonicalUrl.get$scheme() === "") - A.WarnForDeprecation_warnForDeprecation0($async$self._async_evaluate0$_logger, B.Deprecation_fXI, "Importer " + A.S(importer) + " canonicalized " + url + " to " + A.S(canonicalUrl) + string$.x2e_Rela, null, null); - $async$self._async_evaluate0$_loadedUrls.add$1(0, canonicalUrl); - isDependency = $async$self._async_evaluate0$_inDependency || !J.$eq$(importer, $async$self._async_evaluate0$_importer); - $async$goto = 12; - return A._asyncAwait(importCache.importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl), $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport); - case 12: - // returning from await. - _2_0 = $async$result; - stylesheet = null; - if (_2_0 != null) { - stylesheet = _2_0; - t1 = stylesheet; - t2 = importer; - $async$returnValue = new A._Record_3_importer_isDependency(t1, t2, isDependency); - $async$next = [1]; - // goto finally - $async$goto = 5; - break; - } - case 11: - // join - case 8: - // join - $async$goto = $async$self._async_evaluate0$_nodeImporter != null ? 13 : 14; - break; - case 13: - // then - t1 = baseUrl; - $async$goto = 15; - return A._asyncAwait($async$self._async_evaluate0$_importLikeNode$3(url, t1 == null ? $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").span.file.url : t1, forImport), $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport); - case 15: - // returning from await. - _3_0 = $async$result; - result = null; - if (_3_0 != null) { - result = _3_0; - t1 = $async$self._async_evaluate0$_loadedUrls; - A.NullableExtension_andThen0(result._0.span.file.url, t1.get$add(t1)); - t1 = result; - $async$returnValue = t1; - $async$next = [1]; - // goto finally - $async$goto = 5; - break; - } - case 14: - // join - t1 = B.JSString_methods.startsWith$1(url, "package:"); - if (t1) - throw A.wrapException(string$.x22packa); - else - throw A.wrapException("Can't find stylesheet to import."); - $async$next.push(6); - // goto finally - $async$goto = 5; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (t1 instanceof A.SassException0) - throw $async$exception; - else if (t1 instanceof A.ArgumentError) { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - A.throwWithTrace0($async$self._async_evaluate0$_exception$1(J.toString$0$(error)), error, stackTrace); - } else { - error0 = t1; - stackTrace0 = A.getTraceFromException($async$exception); - A.throwWithTrace0($async$self._async_evaluate0$_exception$1($async$self._async_evaluate0$_getErrorMessage$1(error0)), error0, stackTrace0); - } - $async$next.push(6); - // goto finally - $async$goto = 5; - break; - case 3: - // uncaught - $async$next = [2]; - case 5: - // finally - $async$handler = 2; - $async$self._async_evaluate0$_importSpan = null; - // goto the next finally handler - $async$goto = $async$next.pop(); - break; - case 6: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport, $async$completer); - }, - _async_evaluate0$_importLikeNode$3(originalUrl, previous, forImport) { - return this._importLikeNode$body$_EvaluateVisitor(originalUrl, previous, forImport); - }, - _importLikeNode$body$_EvaluateVisitor(originalUrl, previous, forImport) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency), - $async$returnValue, $async$self = this, isDependency, url, t1, result; - var $async$_async_evaluate0$_importLikeNode$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self._async_evaluate0$_nodeImporter; - result = t1.loadRelative$3(originalUrl, previous, forImport); - $async$goto = result != null ? 3 : 5; - break; - case 3: - // then - isDependency = $async$self._async_evaluate0$_inDependency; - // goto join - $async$goto = 4; - break; - case 5: - // else - $async$goto = 6; - return A._asyncAwait(t1.loadAsync$3(originalUrl, previous, forImport), $async$_async_evaluate0$_importLikeNode$3); - case 6: - // returning from await. - result = $async$result; - if (result == null) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - isDependency = true; - case 4: - // join - url = result._1; - t1 = B.JSString_methods.startsWith$1(url, "file") ? A.Syntax_forPath0(url) : B.Syntax_SCSS_scss0; - $async$returnValue = new A._Record_3_importer_isDependency(A.Stylesheet_Stylesheet$parse0(result._0, t1, url), null, isDependency); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_importLikeNode$3, $async$completer); - }, - _async_evaluate0$_visitStaticImport$1($import) { - return this._visitStaticImport$body$_EvaluateVisitor0($import); - }, - _visitStaticImport$body$_EvaluateVisitor0($import) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1, t2, node, $async$temp1, $async$temp2; - var $async$_async_evaluate0$_visitStaticImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 2; - return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$1($import.url), $async$_async_evaluate0$_visitStaticImport$1); - case 2: - // returning from await. - t1 = $async$result; - t2 = A.NullableExtension_andThen0($import.modifiers, $async$self.get$_async_evaluate0$_interpolationToValue()); - $async$temp1 = A; - $async$temp2 = t1; - $async$goto = 3; - return A._asyncAwait(type$.Future_nullable_CssValue_String_2._is(t2) ? t2 : A._Future$value(t2, type$.nullable_CssValue_String_2), $async$_async_evaluate0$_visitStaticImport$1); - case 3: - // returning from await. - node = new $async$temp1.ModifiableCssImport0($async$temp2, $async$result, $import.span); - if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") !== $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root")) - $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(node); - else if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) { - $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").addChild$1(node); - $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; - } else { - t1 = $async$self._async_evaluate0$_outOfOrderImports; - (t1 == null ? $async$self._async_evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t1).push(node); - } - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_visitStaticImport$1, $async$completer); - }, - _async_evaluate0$_applyMixin$5(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { - return this._applyMixin$body$_EvaluateVisitor0(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent); - }, - _applyMixin$body$_EvaluateVisitor0(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1, _0_0, t2, _1_8; - var $async$_async_evaluate0$_applyMixin$5 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if (mixin == null) - throw A.wrapException($async$self._async_evaluate0$_exception$2("Undefined mixin.", nodeWithSpan.get$span(nodeWithSpan))); - t1 = type$.AsyncBuiltInCallable_2._is(mixin); - $async$goto = t1 && !mixin.get$acceptsContent() && contentCallable != null ? 3 : 4; - break; - case 3: - // then - $async$goto = 5; - return A._asyncAwait($async$self._async_evaluate0$_evaluateArguments$1($arguments), $async$_async_evaluate0$_applyMixin$5); - case 5: - // returning from await. - t1 = $async$result._values; - _0_0 = mixin.callbackFor$2(J.get$length$asx(t1[2]), new A.MapKeySet(t1[0], type$.MapKeySet_String)); - throw A.wrapException(A.MultiSpanSassRuntimeException$0("Mixin doesn't accept a content block.", nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_0_0._0.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate0$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); - case 4: - // join - $async$goto = t1 ? 6 : 7; - break; - case 6: - // then - $async$goto = 8; - return A._asyncAwait($async$self._async_evaluate0$_environment.withContent$2(contentCallable, new A._EvaluateVisitor__applyMixin_closure5($async$self, $arguments, mixin, nodeWithSpanWithoutContent)), $async$_async_evaluate0$_applyMixin$5); - case 8: - // returning from await. - // goto break $label0$0 - $async$goto = 2; - break; - case 7: - // join - t1 = type$.UserDefinedCallable_AsyncEnvironment_2._is(mixin); - t2 = false; - if (t1) { - _1_8 = mixin.declaration; - if (_1_8 instanceof A.MixinRule0) - t2 = !type$.MixinRule_2._as(_1_8).get$hasContent() && contentCallable != null; - } - if (t2) - throw A.wrapException(A.MultiSpanSassRuntimeException$0("Mixin doesn't accept a content block.", nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.$arguments.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate0$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); - $async$goto = t1 ? 9 : 10; - break; - case 9: - // then - $async$goto = 11; - return A._asyncAwait($async$self._async_evaluate0$_runUserDefinedCallable$1$4($arguments, mixin, nodeWithSpanWithoutContent, new A._EvaluateVisitor__applyMixin_closure6($async$self, contentCallable, mixin, nodeWithSpanWithoutContent), type$.Null), $async$_async_evaluate0$_applyMixin$5); - case 11: - // returning from await. - // goto break $label0$0 - $async$goto = 2; - break; - case 10: - // join - throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); - case 2: - // break $label0$0 - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_applyMixin$5, $async$completer); - }, - visitIncludeRule$1(_, node) { - return this.visitIncludeRule$body$_EvaluateVisitor0(0, node); - }, - visitIncludeRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, mixin; - var $async$visitIncludeRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - mixin = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure8($async$self, node)); - if (B.JSString_methods.startsWith$1(node.originalName, "--") && mixin instanceof A.UserDefinedCallable0 && !B.JSString_methods.startsWith$1(mixin.declaration.originalName, "--")) - $async$self._async_evaluate0$_warn$3(string$.Sassx20_m, node.get$nameSpan(), B.Deprecation_omC); - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_applyMixin$5(mixin, A.NullableExtension_andThen0(node.content, new A._EvaluateVisitor_visitIncludeRule_closure9($async$self)), node.$arguments, node, new A._FakeAstNode0(new A._EvaluateVisitor_visitIncludeRule_closure10(node))), $async$visitIncludeRule$1); - case 3: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitIncludeRule$1, $async$completer); - }, - visitMixinRule$1(_, node) { - return this.visitMixinRule$body$_EvaluateVisitor0(0, node); - }, - visitMixinRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; - var $async$visitMixinRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self._async_evaluate0$_environment; - t2 = t1.closure$0(); - t3 = $async$self._async_evaluate0$_inDependency; - t4 = t1._async_environment0$_mixins; - index = t4.length - 1; - t5 = node.name; - t1._async_environment0$_mixinIndices.$indexSet(0, t5, index); - J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment_2)); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitMixinRule$1, $async$completer); - }, - visitLoudComment$1(_, node) { - return this.visitLoudComment$body$_EvaluateVisitor0(0, node); - }, - visitLoudComment$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, t1, text; - var $async$visitLoudComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate0$_inFunction) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") === $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root") && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) - $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; - t1 = node.text; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(t1), $async$visitLoudComment$1); - case 3: - // returning from await. - text = $async$result; - if (!B.JSString_methods.endsWith$1(text, "*/")) - text += " */"; - $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(new A.ModifiableCssComment0(text, t1.span)); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitLoudComment$1, $async$completer); - }, - visitMediaRule$1(_, node) { - return this.visitMediaRule$body$_EvaluateVisitor0(0, node); - }, - visitMediaRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, queries, mergedQueries, t1, mergedSources, t2, t3; - var $async$visitMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate0$_declarationName != null) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Media_, node.span)); - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_visitMediaQueries$1(node.query), $async$visitMediaRule$1); - case 3: - // returning from await. - queries = $async$result; - mergedQueries = A.NullableExtension_andThen0($async$self._async_evaluate0$_mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure8($async$self, queries)); - t1 = mergedQueries == null; - if (!t1 && J.get$isEmpty$asx(mergedQueries)) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - if (t1) - mergedSources = B.Set_empty5; - else { - t2 = $async$self._async_evaluate0$_mediaQuerySources; - t2.toString; - t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); - t3 = $async$self._async_evaluate0$_mediaQueries; - t3.toString; - t2.addAll$1(0, t3); - t2.addAll$1(0, queries); - mergedSources = t2; - } - t1 = t1 ? queries : mergedQueries; - $async$goto = 4; - return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure9($async$self, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure10(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null), $async$visitMediaRule$1); - case 4: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitMediaRule$1, $async$completer); - }, - _async_evaluate0$_visitMediaQueries$1(interpolation) { - return this._visitMediaQueries$body$_EvaluateVisitor0(interpolation); - }, - _visitMediaQueries$body$_EvaluateVisitor0(interpolation) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.List_CssMediaQuery_2), - $async$returnValue, $async$self = this, _0_0, resolved, map; - var $async$_async_evaluate0$_visitMediaQueries$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolationWithMap$2$warnForColor(interpolation, true), $async$_async_evaluate0$_visitMediaQueries$1); - case 3: - // returning from await. - _0_0 = $async$result; - resolved = _0_0._0; - map = _0_0._1; - $async$returnValue = new A.MediaQueryParser0(A.SpanScanner$(resolved, null), map).parse$0(0); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_visitMediaQueries$1, $async$completer); - }, - _async_evaluate0$_mergeMediaQueries$2(queries1, queries2) { - var t1, t2, t3, t4, _0_0, t5, result, - queries = A._setArrayType([], type$.JSArray_CssMediaQuery_2); - for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2); t1.moveNext$0();) { - t3 = t1.get$current(t1); - for (t4 = t2.get$iterator(queries2); t4.moveNext$0();) { - _0_0 = t3.merge$1(t4.get$current(t4)); - if (B._SingletonCssMediaQueryMergeResult_00 === _0_0) - continue; - if (B._SingletonCssMediaQueryMergeResult_10 === _0_0) - return null; - t5 = _0_0 instanceof A.MediaQuerySuccessfulMergeResult0; - result = t5 ? _0_0 : null; - if (t5) - queries.push(result.query); - } - } - return queries; - }, - visitReturnRule$1(_, node) { - return this.visitReturnRule$body$_EvaluateVisitor0(0, node); - }, - visitReturnRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, t1, t2; - var $async$visitReturnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = node.expression; - t2 = t1.accept$1($async$self); - $async$goto = 3; - return A._asyncAwait(type$.Future_Value_2._is(t2) ? t2 : A._Future$value(t2, type$.Value_2), $async$visitReturnRule$1); - case 3: - // returning from await. - $async$returnValue = $async$self._async_evaluate0$_withoutSlash$2($async$result, t1); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitReturnRule$1, $async$completer); - }, - visitSilentComment$1(_, node) { - return this.visitSilentComment$body$_EvaluateVisitor0(0, node); - }, - visitSilentComment$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue; - var $async$visitSilentComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitSilentComment$1, $async$completer); - }, - visitStyleRule$1(_, node) { - return this.visitStyleRule$body$_EvaluateVisitor0(0, node); - }, - visitStyleRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, t1, _0_0, selectorText, selectorMap, parsedSelector, nest, t2, _i, _1_0, first, t3, rule, oldAtRootExcludingStyleRule; - var $async$visitStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate0$_declarationName != null) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_n, node.span)); - else if ($async$self._async_evaluate0$_inKeyframes && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") instanceof A.ModifiableCssKeyframeBlock0) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_k, node.span)); - t1 = node.selector; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolationWithMap$2$warnForColor(t1, true), $async$visitStyleRule$1); - case 3: - // returning from await. - _0_0 = $async$result; - selectorText = _0_0._0; - selectorMap = _0_0._1; - $async$goto = $async$self._async_evaluate0$_inKeyframes ? 4 : 5; - break; - case 4: - // then - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(new A.CssValue0(A.List_List$unmodifiable(new A.KeyframeSelectorParser0(A.SpanScanner$(selectorText, null), selectorMap).parse$0(0), type$.String), t1.span, type$.CssValue_List_String_2), node.span), new A._EvaluateVisitor_visitStyleRule_closure11($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure12(), type$.ModifiableCssKeyframeBlock_2, type$.Null), $async$visitStyleRule$1); - case 6: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 5: - // join - parsedSelector = A.SelectorList_SelectorList$parse0(selectorText, true, selectorMap, $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss); - t1 = $async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; - t1 = t1 == null ? null : t1.fromPlainCss; - nest = t1 !== true; - if (nest) { - if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss) - for (t1 = parsedSelector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { - _1_0 = t1[_i].leadingCombinators; - if (_1_0.length >= 1) { - first = _1_0[0]; - t3 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet"); - t3 = t3.plainCss; - } else { - first = null; - t3 = false; - } - if (t3) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Top_lel, first.span)); - } - t1 = $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; - t1 = t1 == null ? null : t1.originalSelector; - parsedSelector = parsedSelector.nestWithin$3$implicitParent$preserveParentSelectors(t1, !$async$self._async_evaluate0$_atRootExcludingStyleRule, $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss); - } - rule = A.ModifiableCssStyleRule$0($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__extensionStore, "_extensionStore").addSelector$2(parsedSelector, $async$self._async_evaluate0$_mediaQueries), node.span, $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss, parsedSelector); - oldAtRootExcludingStyleRule = $async$self._async_evaluate0$_atRootExcludingStyleRule; - t1 = $async$self._async_evaluate0$_atRootExcludingStyleRule = false; - t2 = nest ? new A._EvaluateVisitor_visitStyleRule_closure13() : null; - $async$goto = 7; - return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure14($async$self, rule, node), node.hasDeclarations, t2, type$.ModifiableCssStyleRule_2, type$.Null), $async$visitStyleRule$1); - case 7: - // returning from await. - $async$self._async_evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; - $async$self._async_evaluate0$_warnForBogusCombinators$1(rule); - if (($async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot) == null) { - t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children; - t1 = !t1.get$isEmpty(t1); - } - if (t1) { - t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children; - t1.get$last(t1).isGroupEnd = true; - } - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitStyleRule$1, $async$completer); - }, - _async_evaluate0$_warnForBogusCombinators$1(rule) { - var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, t8, t9, _this = this, _null = null; - if (!rule.accept$1(B._IsInvisibleVisitor_false_false0)) - for (t1 = rule._style_rule0$_selector._box0$_inner.value.components, t2 = t1.length, t3 = type$.SourceSpan, t4 = type$.String, t5 = rule.children, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - if (!complex.accept$1(B._IsBogusVisitor_true0)) - continue; - if (complex.accept$1(B.C__IsUselessVisitor0)) { - visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - _this._async_evaluate0$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix20, A.SpanExtensions_trimRight0(complex.span), B.Deprecation_bh9); - } else if (complex.leadingCombinators.length !== 0) { - if (!_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__stylesheet, "_stylesheet").plainCss) { - visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - _this._async_evaluate0$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix0a, A.SpanExtensions_trimRight0(complex.span), B.Deprecation_bh9); - } - } else { - visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - t6 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); - t7 = complex.accept$1(B._IsBogusVisitor_false0) ? string$.x20It_wi : ""; - t8 = A.SpanExtensions_trimRight0(complex.span); - if (t5.get$length(0) === 0) - A.throwExpression(A.IterableElementError_noElement()); - t9 = J.get$span$z(t5.$index(0, 0)); - _this._async_evaluate0$_warn$3('The selector "' + t6 + string$.x22x20is_o + t7 + string$.x0aThis_, new A.MultiSpan0(t8, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t5.every$1(t5, new A._EvaluateVisitor__warnForBogusCombinators_closure2()) ? "\n(try converting to a //-style comment)" : "")], t3, t4), t3, t4)), B.Deprecation_bh9); - } - } - }, - visitSupportsRule$1(_, node) { - return this.visitSupportsRule$body$_EvaluateVisitor0(0, node); - }, - visitSupportsRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, t1, $async$temp1, $async$temp2; - var $async$visitSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate0$_declarationName != null) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Suppor, node.span)); - t1 = node.condition; - $async$temp1 = A; - $async$temp2 = A; - $async$goto = 4; - return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(t1), $async$visitSupportsRule$1); - case 4: - // returning from await. - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through($async$temp1.ModifiableCssSupportsRule$0(new $async$temp2.CssValue0($async$result, t1.get$span(t1), type$.CssValue_String_2), node.span), new A._EvaluateVisitor_visitSupportsRule_closure5($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure6(), type$.ModifiableCssSupportsRule_2, type$.Null), $async$visitSupportsRule$1); - case 3: - // returning from await. - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitSupportsRule$1, $async$completer); - }, - _async_evaluate0$_visitSupportsCondition$1(condition) { - return this._visitSupportsCondition$body$_EvaluateVisitor0(condition); - }, - _visitSupportsCondition$body$_EvaluateVisitor0(condition) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.String), - $async$returnValue, $async$self = this, t1, _box_0, $async$temp1, $async$temp2; - var $async$_async_evaluate0$_visitSupportsCondition$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - _box_0 = {}; - $async$goto = condition instanceof A.SupportsOperation0 ? 4 : 5; - break; - case 4: - // then - t1 = condition.operator; - $async$temp1 = A; - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate0$_parenthesize$2(condition.left, t1), $async$_async_evaluate0$_visitSupportsCondition$1); - case 6: - // returning from await. - $async$temp1 = $async$temp1.S($async$result) + " " + t1 + " "; - $async$temp2 = A; - $async$goto = 7; - return A._asyncAwait($async$self._async_evaluate0$_parenthesize$2(condition.right, t1), $async$_async_evaluate0$_visitSupportsCondition$1); - case 7: - // returning from await. - t1 = $async$temp1 + $async$temp2.S($async$result); - // goto break $label0$0 - $async$goto = 3; - break; - case 5: - // join - $async$goto = condition instanceof A.SupportsNegation0 ? 8 : 9; - break; - case 8: - // then - $async$temp1 = A; - $async$goto = 10; - return A._asyncAwait($async$self._async_evaluate0$_parenthesize$1(condition.condition), $async$_async_evaluate0$_visitSupportsCondition$1); - case 10: - // returning from await. - t1 = "not " + $async$temp1.S($async$result); - // goto break $label0$0 - $async$goto = 3; - break; - case 9: - // join - $async$goto = condition instanceof A.SupportsInterpolation0 ? 11 : 12; - break; - case 11: - // then - $async$goto = 13; - return A._asyncAwait($async$self._async_evaluate0$_evaluateToCss$2$quote(condition.expression, false), $async$_async_evaluate0$_visitSupportsCondition$1); - case 13: - // returning from await. - t1 = $async$result; - // goto break $label0$0 - $async$goto = 3; - break; - case 12: - // join - _box_0.declaration = null; - $async$goto = condition instanceof A.SupportsDeclaration0 ? 14 : 15; - break; - case 14: - // then - _box_0.declaration = condition; - $async$goto = 16; - return A._asyncAwait($async$self._async_evaluate0$_withSupportsDeclaration$1$1(new A._EvaluateVisitor__visitSupportsCondition_closure2(_box_0, $async$self), type$.String), $async$_async_evaluate0$_visitSupportsCondition$1); - case 16: - // returning from await. - t1 = $async$result; - // goto break $label0$0 - $async$goto = 3; - break; - case 15: - // join - $async$goto = condition instanceof A.SupportsFunction0 ? 17 : 18; - break; - case 17: - // then - $async$temp1 = A; - $async$goto = 19; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(condition.name), $async$_async_evaluate0$_visitSupportsCondition$1); - case 19: - // returning from await. - $async$temp1 = $async$temp1.S($async$result) + "("; - $async$temp2 = A; - $async$goto = 20; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(condition.$arguments), $async$_async_evaluate0$_visitSupportsCondition$1); - case 20: - // returning from await. - t1 = $async$temp1 + $async$temp2.S($async$result) + ")"; - // goto break $label0$0 - $async$goto = 3; - break; - case 18: - // join - $async$goto = condition instanceof A.SupportsAnything0 ? 21 : 22; - break; - case 21: - // then - $async$temp1 = A; - $async$goto = 23; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(condition.contents), $async$_async_evaluate0$_visitSupportsCondition$1); - case 23: - // returning from await. - t1 = "(" + $async$temp1.S($async$result) + ")"; - // goto break $label0$0 - $async$goto = 3; - break; - case 22: - // join - t1 = A.throwExpression(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeTypeOfDartObject(condition).toString$0(0) + ".", null)); - case 3: - // break $label0$0 - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_visitSupportsCondition$1, $async$completer); - }, - _async_evaluate0$_withSupportsDeclaration$1$1(callback, $T) { - return this._withSupportsDeclaration$body$_EvaluateVisitor0(callback, $T, $T); - }, - _withSupportsDeclaration$body$_EvaluateVisitor0(callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, t1, oldInSupportsDeclaration; - var $async$_async_evaluate0$_withSupportsDeclaration$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - oldInSupportsDeclaration = $async$self._async_evaluate0$_inSupportsDeclaration; - $async$self._async_evaluate0$_inSupportsDeclaration = true; - $async$handler = 3; - t1 = callback.call$0(); - $async$goto = 6; - return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate0$_withSupportsDeclaration$1$1); - case 6: - // returning from await. - t1 = $async$result; - $async$returnValue = t1; - $async$next = [1]; - // goto finally - $async$goto = 4; - break; - $async$next.push(5); - // goto finally - $async$goto = 4; - break; - case 3: - // uncaught - $async$next = [2]; - case 4: - // finally - $async$handler = 2; - $async$self._async_evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; - // goto the next finally handler - $async$goto = $async$next.pop(); - break; - case 5: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_withSupportsDeclaration$1$1, $async$completer); - }, - _async_evaluate0$_parenthesize$2(condition, operator) { - return this._parenthesize$body$_EvaluateVisitor0(condition, operator); - }, - _async_evaluate0$_parenthesize$1(condition) { - return this._async_evaluate0$_parenthesize$2(condition, null); - }, - _parenthesize$body$_EvaluateVisitor0(condition, operator) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.String), - $async$returnValue, $async$self = this, t1, $async$temp1; - var $async$_async_evaluate0$_parenthesize$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if (!(condition instanceof A.SupportsNegation0)) - if (condition instanceof A.SupportsOperation0) - t1 = operator == null || operator !== condition.operator; - else - t1 = false; - else - t1 = true; - $async$goto = t1 ? 3 : 4; - break; - case 3: - // then - $async$temp1 = A; - $async$goto = 5; - return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(condition), $async$_async_evaluate0$_parenthesize$2); - case 5: - // returning from await. - $async$returnValue = "(" + $async$temp1.S($async$result) + ")"; - // goto return - $async$goto = 1; - break; - case 4: - // join - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(condition), $async$_async_evaluate0$_parenthesize$2); - case 6: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_parenthesize$2, $async$completer); - }, - visitVariableDeclaration$1(_, node) { - return this.visitVariableDeclaration$body$_EvaluateVisitor0(0, node); - }, - visitVariableDeclaration$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, t2, value, t1, $async$temp1, $async$temp2, $async$temp3; - var $async$visitVariableDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = {}; - if (node.isGuarded) { - if (node.namespace == null && $async$self._async_evaluate0$_environment._async_environment0$_variables.length === 1) { - t2 = $async$self._async_evaluate0$_configuration._configuration0$_values; - t2 = t2.get$isEmpty(t2) ? null : t2.remove$1(0, node.name); - t1.override = null; - if (t2 != null) { - t1.override = t2; - t2 = !t2.value.$eq(0, B.C__SassNull0); - } else - t2 = false; - if (t2) { - $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure8(t1, $async$self, node)); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - } - value = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure9($async$self, node)); - if (value != null && !value.$eq(0, B.C__SassNull0)) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - } - if (node.isGlobal && !$async$self._async_evaluate0$_environment.globalVariableExists$1(node.name)) { - t1 = $async$self._async_evaluate0$_environment._async_environment0$_variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName0(node.span) + ": null` at the stylesheet root."; - $async$self._async_evaluate0$_warn$3(t1, node.span, B.Deprecation_MT8); - } - t1 = node.expression; - t2 = t1.accept$1($async$self); - $async$temp1 = node; - $async$temp2 = A; - $async$temp3 = node; - $async$goto = 3; - return A._asyncAwait(type$.Future_Value_2._is(t2) ? t2 : A._Future$value(t2, type$.Value_2), $async$visitVariableDeclaration$1); - case 3: - // returning from await. - $async$self._async_evaluate0$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitVariableDeclaration_closure10($async$self, $async$temp3, $async$self._async_evaluate0$_withoutSlash$2($async$result, t1))); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitVariableDeclaration$1, $async$completer); - }, - visitUseRule$1(_, node) { - return this.visitUseRule$body$_EvaluateVisitor0(0, node); - }, - visitUseRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, values, t3, t4, _i, variable, t5, variableNodeWithSpan, t6, t7, configuration, t1, t2, $async$temp1, $async$temp2, $async$temp3; - var $async$visitUseRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = node.configuration; - t2 = t1.length; - $async$goto = t2 !== 0 ? 3 : 5; - break; - case 3: - // then - values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); - t3 = type$._Future_Value_2, t4 = type$.Future_Value_2, _i = 0; - case 6: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 8; - break; - } - variable = t1[_i]; - t5 = variable.expression; - variableNodeWithSpan = $async$self._async_evaluate0$_expressionNode$1(t5); - t6 = variable.name; - t5 = t5.accept$1($async$self); - if (!t4._is(t5)) { - t7 = new A._Future($.Zone__current, t3); - t7._state = 8; - t7._resultOrListeners = t5; - t5 = t7; - } - $async$temp1 = values; - $async$temp2 = t6; - $async$temp3 = A; - $async$goto = 9; - return A._asyncAwait(t5, $async$visitUseRule$1); - case 9: - // returning from await. - $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue0($async$self._async_evaluate0$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); - case 7: - // for update - ++_i; - // goto for condition - $async$goto = 6; - break; - case 8: - // after for - configuration = new A.ExplicitConfiguration0(node, values, null); - // goto join - $async$goto = 4; - break; - case 5: - // else - configuration = B.Configuration_Map_empty_null0; - case 4: - // join - $async$goto = 10; - return A._asyncAwait($async$self._async_evaluate0$_loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure2($async$self, node), configuration), $async$visitUseRule$1); - case 10: - // returning from await. - $async$self._async_evaluate0$_assertConfigurationIsEmpty$1(configuration); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitUseRule$1, $async$completer); - }, - visitWarnRule$1(_, node) { - return this.visitWarnRule$body$_EvaluateVisitor0(0, node); - }, - visitWarnRule$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, value, t1; - var $async$visitWarnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitWarnRule_closure2($async$self, node), type$.Value_2), $async$visitWarnRule$1); - case 3: - // returning from await. - value = $async$result; - t1 = value instanceof A.SassString0 ? value._string0$_text : $async$self._async_evaluate0$_serialize$2(value, node.expression); - $async$self._async_evaluate0$_logger.warn$2$trace(0, t1, $async$self._async_evaluate0$_stackTrace$1(node.span)); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitWarnRule$1, $async$completer); - }, - visitWhileRule$1(_, node) { - return this._async_evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure2(this, node), true, node.hasDeclarations, type$.nullable_Value_2); - }, - visitBinaryOperationExpression$1(_, node) { - var t1, _this = this; - if (_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__stylesheet, "_stylesheet").plainCss) { - t1 = node.operator; - t1 = t1 !== B.BinaryOperator_wdM0 && t1 !== B.BinaryOperator_U770; - } else - t1 = false; - if (t1) - throw A.wrapException(_this._async_evaluate0$_exception$2("Operators aren't allowed in plain CSS.", node.get$operatorSpan())); - return _this._async_evaluate0$_addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure2(_this, node), type$.Value_2); - }, - _async_evaluate0$_slash$3(left, right, node) { - var t2, _1_1, - result = left.dividedBy$1(right), - _1_2_isSet = left instanceof A.SassNumber0, - _1_2 = null, right0 = null, - t1 = false; - if (_1_2_isSet) { - t2 = type$.SassNumber_2; - t2._as(left); - if (right instanceof A.SassNumber0) { - t2._as(right); - t1 = node.allowsSlash && this._async_evaluate0$_operandAllowsSlash$1(node.left) && this._async_evaluate0$_operandAllowsSlash$1(node.right); - right0 = right; - _1_2 = right0; - } else - _1_2 = right; - _1_1 = left; - } else { - _1_1 = left; - left = null; - } - if (t1) - return type$.SassNumber_2._as(result).withSlash$2(left, right0); - if (_1_1 instanceof A.SassNumber0) - t1 = (_1_2_isSet ? _1_2 : right) instanceof A.SassNumber0; - else - t1 = false; - if (t1) { - this._async_evaluate0$_warn$3(string$.Using__o + A.S(new A._EvaluateVisitor__slash_recommendation2().call$1(node)) + " or " + A.expressionToCalc0(node).toString$0(0) + string$.x0a_Morex20, node.get$span(0), B.Deprecation_q39); - return result; - } - return result; - }, - _async_evaluate0$_operandAllowsSlash$1(node) { - var t1; - if (node instanceof A.FunctionExpression0) - if (node.namespace == null) { - t1 = node.name; - t1 = B.Set_yHF81.contains$1(0, t1.toLowerCase()) && this._async_evaluate0$_environment.getFunction$1(t1) == null; - } else - t1 = false; - else - t1 = true; - return t1; - }, - visitValueExpression$1(_, node) { - return this.visitValueExpression$body$_EvaluateVisitor0(0, node); - }, - visitValueExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue; - var $async$visitValueExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = node.value; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitValueExpression$1, $async$completer); - }, - visitVariableExpression$1(_, node) { - return this.visitVariableExpression$body$_EvaluateVisitor0(0, node); - }, - visitVariableExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, result; - var $async$visitVariableExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - result = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure2($async$self, node)); - if (result != null) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - throw A.wrapException($async$self._async_evaluate0$_exception$2("Undefined variable.", node.span)); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitVariableExpression$1, $async$completer); - }, - visitUnaryOperationExpression$1(_, node) { - return this.visitUnaryOperationExpression$body$_EvaluateVisitor0(0, node); - }, - visitUnaryOperationExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, $async$temp1, $async$temp2, $async$temp3; - var $async$visitUnaryOperationExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$temp1 = node; - $async$temp2 = A; - $async$temp3 = node; - $async$goto = 3; - return A._asyncAwait(node.operand.accept$1($async$self), $async$visitUnaryOperationExpression$1); - case 3: - // returning from await. - $async$returnValue = $async$self._async_evaluate0$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitUnaryOperationExpression_closure2($async$temp3, $async$result)); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitUnaryOperationExpression$1, $async$completer); - }, - visitBooleanExpression$1(_, node) { - return this.visitBooleanExpression$body$_EvaluateVisitor0(0, node); - }, - visitBooleanExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassBoolean_2), - $async$returnValue; - var $async$visitBooleanExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = node.value ? B.SassBoolean_true0 : B.SassBoolean_false0; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitBooleanExpression$1, $async$completer); - }, - visitIfExpression$1(_, node) { - return this.visitIfExpression$body$_EvaluateVisitor0(0, node); - }, - visitIfExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, condition, t1, ifTrue, ifFalse, result, _0_0, positional, named; - var $async$visitIfExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_evaluateMacroArguments$1(node), $async$visitIfExpression$1); - case 3: - // returning from await. - _0_0 = $async$result; - positional = _0_0._0; - named = _0_0._1; - $async$self._async_evaluate0$_verifyArguments$4(J.get$length$asx(positional), named, $.$get$IfExpression_declaration0(), node); - condition = A.ListExtensions_elementAtOrNull(positional, 0); - if (condition == null) { - t1 = named.$index(0, "condition"); - t1.toString; - condition = t1; - } - ifTrue = A.ListExtensions_elementAtOrNull(positional, 1); - if (ifTrue == null) { - t1 = named.$index(0, "if-true"); - t1.toString; - ifTrue = t1; - } - ifFalse = A.ListExtensions_elementAtOrNull(positional, 2); - if (ifFalse == null) { - t1 = named.$index(0, "if-false"); - t1.toString; - ifFalse = t1; - } - $async$goto = 4; - return A._asyncAwait(condition.accept$1($async$self), $async$visitIfExpression$1); - case 4: - // returning from await. - result = $async$result.get$isTruthy() ? ifTrue : ifFalse; - t1 = result.accept$1($async$self); - $async$goto = 5; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$visitIfExpression$1); - case 5: - // returning from await. - $async$returnValue = $async$self._async_evaluate0$_withoutSlash$2($async$result, $async$self._async_evaluate0$_expressionNode$1(result)); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitIfExpression$1, $async$completer); - }, - visitNullExpression$1(_, node) { - return this.visitNullExpression$body$_EvaluateVisitor0(0, node); - }, - visitNullExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue; - var $async$visitNullExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = B.C__SassNull0; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitNullExpression$1, $async$completer); - }, - visitNumberExpression$1(_, node) { - return this.visitNumberExpression$body$_EvaluateVisitor0(0, node); - }, - visitNumberExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber_2), - $async$returnValue; - var $async$visitNumberExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = A.SassNumber_SassNumber0(node.value, node.unit); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitNumberExpression$1, $async$completer); - }, - visitParenthesizedExpression$1(_, node) { - var _this = this; - return _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__stylesheet, "_stylesheet").plainCss ? A.throwExpression(_this._async_evaluate0$_exception$2("Parentheses aren't allowed in plain CSS.", node.span)) : node.expression.accept$1(_this); - }, - visitColorExpression$1(_, node) { - return this.visitColorExpression$body$_EvaluateVisitor0(0, node); - }, - visitColorExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassColor_2), - $async$returnValue; - var $async$visitColorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = node.value; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitColorExpression$1, $async$completer); - }, - visitListExpression$1(_, node) { - return this.visitListExpression$body$_EvaluateVisitor0(0, node); - }, - visitListExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassList_2), - $async$returnValue, $async$self = this, $async$temp1; - var $async$visitListExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$temp1 = A; - $async$goto = 3; - return A._asyncAwait(A.mapAsync0(node.contents, new A._EvaluateVisitor_visitListExpression_closure2($async$self), type$.Expression_2, type$.Value_2), $async$visitListExpression$1); - case 3: - // returning from await. - $async$returnValue = $async$temp1.SassList$0($async$result, node.separator, node.hasBrackets); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitListExpression$1, $async$completer); - }, - visitMapExpression$1(_, node) { - return this.visitMapExpression$body$_EvaluateVisitor0(0, node); - }, - visitMapExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassMap_2), - $async$returnValue, $async$self = this, t2, t3, _i, t4, key, value, keyValue, valueValue, oldValueSpan, t1, map, keyNodes; - var $async$visitMapExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = type$.Value_2; - map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2); - t2 = node.pairs, t3 = t2.length, _i = 0; - case 3: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 5; - break; - } - t4 = t2[_i]; - key = t4._0; - value = t4._1; - $async$goto = 6; - return A._asyncAwait(key.accept$1($async$self), $async$visitMapExpression$1); - case 6: - // returning from await. - keyValue = $async$result; - $async$goto = 7; - return A._asyncAwait(value.accept$1($async$self), $async$visitMapExpression$1); - case 7: - // returning from await. - valueValue = $async$result; - if (map.containsKey$1(keyValue)) { - t1 = keyNodes.$index(0, keyValue); - oldValueSpan = t1 == null ? null : t1.get$span(t1); - t1 = key.get$span(key); - t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - if (oldValueSpan != null) - t2.$indexSet(0, oldValueSpan, "first key"); - throw A.wrapException(A.MultiSpanSassRuntimeException$0("Duplicate key.", t1, "second key", t2, $async$self._async_evaluate0$_stackTrace$1(key.get$span(key)), null)); - } - map.$indexSet(0, keyValue, valueValue); - keyNodes.$indexSet(0, keyValue, key); - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = new A.SassMap0(A.ConstantMap_ConstantMap$from(map, t1, t1)); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitMapExpression$1, $async$completer); - }, - visitFunctionExpression$1(_, node) { - return this.visitFunctionExpression$body$_EvaluateVisitor0(0, node); - }, - visitFunctionExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, t2, _0_0, t3, t4, $name, oldInFunction, result, t1, $function; - var $async$visitFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = {}; - $function = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss ? null : $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure8($async$self, node)); - t1.$function = $function; - $async$goto = $function == null ? 3 : 5; - break; - case 3: - // then - if (node.namespace != null) - throw A.wrapException($async$self._async_evaluate0$_exception$2("Undefined function.", node.span)); - t2 = node.name; - _0_0 = t2.toLowerCase(); - t3 = false; - if ("min" === _0_0 || "max" === _0_0 || "round" === _0_0 || "abs" === _0_0) { - t3 = node.$arguments; - t4 = t3.named; - t3 = t4.get$isEmpty(t4) && t3.rest == null && B.JSArray_methods.every$1(t3.positional, new A._EvaluateVisitor_visitFunctionExpression_closure9()); - $name = _0_0; - } else - $name = null; - $async$goto = t3 ? 6 : 7; - break; - case 6: - // then - $async$goto = 8; - return A._asyncAwait($async$self._async_evaluate0$_visitCalculation$2$inLegacySassFunction(node, $name), $async$visitFunctionExpression$1); - case 8: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 7: - // join - $async$goto = "calc" === _0_0 || "clamp" === _0_0 || "hypot" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "sqrt" === _0_0 || "exp" === _0_0 || "sign" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "atan2" === _0_0 || "pow" === _0_0 || "log" === _0_0 ? 9 : 10; - break; - case 9: - // then - $async$goto = 11; - return A._asyncAwait($async$self._async_evaluate0$_visitCalculation$1(node), $async$visitFunctionExpression$1); - case 11: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 10: - // join - $function = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss ? null : $async$self._async_evaluate0$_builtInFunctions.$index(0, t2); - t2 = t1.$function = $function == null ? new A.PlainCssCallable0(node.originalName) : $function; - // goto join - $async$goto = 4; - break; - case 5: - // else - t2 = $function; - case 4: - // join - if (B.JSString_methods.startsWith$1(node.originalName, "--") && t2 instanceof A.UserDefinedCallable0 && !B.JSString_methods.startsWith$1(t2.declaration.originalName, "--")) - $async$self._async_evaluate0$_warn$3(string$.Sassx20_ff, node.get$nameSpan(), B.Deprecation_omC); - oldInFunction = $async$self._async_evaluate0$_inFunction; - $async$self._async_evaluate0$_inFunction = true; - $async$goto = 12; - return A._asyncAwait($async$self._async_evaluate0$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure10(t1, $async$self, node), type$.Value_2), $async$visitFunctionExpression$1); - case 12: - // returning from await. - result = $async$result; - $async$self._async_evaluate0$_inFunction = oldInFunction; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitFunctionExpression$1, $async$completer); - }, - _async_evaluate0$_visitCalculation$2$inLegacySassFunction(node, inLegacySassFunction) { - return this._visitCalculation$body$_EvaluateVisitor0(node, inLegacySassFunction); - }, - _async_evaluate0$_visitCalculation$1(node) { - return this._async_evaluate0$_visitCalculation$2$inLegacySassFunction(node, null); - }, - _visitCalculation$body$_EvaluateVisitor0(node, inLegacySassFunction) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$next = [], $async$self = this, $arguments, oldCallableNode, t1, _0_0, error, stackTrace, t4, _i, exception, t2, t3, $async$temp1; - var $async$_async_evaluate0$_visitCalculation$2$inLegacySassFunction = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t2 = node.$arguments; - t3 = t2.named; - if (t3.get$isNotEmpty(t3)) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Keywor, node.span)); - else if (t2.rest != null) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Rest_a, node.span)); - $async$self._async_evaluate0$_checkCalculationArguments$1(node); - t3 = A._setArrayType([], type$.JSArray_Object); - t2 = t2.positional, t4 = t2.length, _i = 0; - case 3: - // for condition - if (!(_i < t4)) { - // goto after for - $async$goto = 5; - break; - } - $async$temp1 = t3; - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction), $async$_async_evaluate0$_visitCalculation$2$inLegacySassFunction); - case 6: - // returning from await. - $async$temp1.push($async$result); - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $arguments = t3; - if ($async$self._async_evaluate0$_inSupportsDeclaration) { - $async$returnValue = new A.SassCalculation0(node.name, A.List_List$unmodifiable($arguments, type$.Object)); - // goto return - $async$goto = 1; - break; - } - oldCallableNode = $async$self._async_evaluate0$_callableNode; - $async$self._async_evaluate0$_callableNode = node; - try { - t1 = null; - t3 = node.name; - _0_0 = t3.toLowerCase(); - $label0$0: { - if ("calc" === _0_0) { - t1 = A.SassCalculation_calc0(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("sqrt" === _0_0) { - t1 = A.SassCalculation__singleArgument0("sqrt", J.$index$asx($arguments, 0), A.number2__sqrt$closure(), true); - break $label0$0; - } - if ("sin" === _0_0) { - t1 = A.SassCalculation__singleArgument0("sin", J.$index$asx($arguments, 0), A.number2__sin$closure(), false); - break $label0$0; - } - if ("cos" === _0_0) { - t1 = A.SassCalculation__singleArgument0("cos", J.$index$asx($arguments, 0), A.number2__cos$closure(), false); - break $label0$0; - } - if ("tan" === _0_0) { - t1 = A.SassCalculation__singleArgument0("tan", J.$index$asx($arguments, 0), A.number2__tan$closure(), false); - break $label0$0; - } - if ("asin" === _0_0) { - t1 = A.SassCalculation__singleArgument0("asin", J.$index$asx($arguments, 0), A.number2__asin$closure(), true); - break $label0$0; - } - if ("acos" === _0_0) { - t1 = A.SassCalculation__singleArgument0("acos", J.$index$asx($arguments, 0), A.number2__acos$closure(), true); - break $label0$0; - } - if ("atan" === _0_0) { - t1 = A.SassCalculation__singleArgument0("atan", J.$index$asx($arguments, 0), A.number2__atan$closure(), true); - break $label0$0; - } - if ("abs" === _0_0) { - t1 = A.SassCalculation_abs0(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("exp" === _0_0) { - t1 = A.SassCalculation_exp0(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("sign" === _0_0) { - t1 = A.SassCalculation_sign0(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("min" === _0_0) { - t1 = A.SassCalculation_min0($arguments); - break $label0$0; - } - if ("max" === _0_0) { - t1 = A.SassCalculation_max0($arguments); - break $label0$0; - } - if ("hypot" === _0_0) { - t1 = A.SassCalculation_hypot0($arguments); - break $label0$0; - } - if ("pow" === _0_0) { - t1 = A.SassCalculation_pow0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("atan2" === _0_0) { - t1 = A.SassCalculation_atan20(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("log" === _0_0) { - t1 = A.SassCalculation_log0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("mod" === _0_0) { - t1 = A.SassCalculation_mod0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("rem" === _0_0) { - t1 = A.SassCalculation_rem0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("round" === _0_0) { - t1 = A.SassCalculation_roundInternal0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2), inLegacySassFunction, node.span, new A._EvaluateVisitor__visitCalculation_closure2($async$self, node)); - break $label0$0; - } - if ("clamp" === _0_0) { - t1 = A.SassCalculation_clamp0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); - break $label0$0; - } - t3 = A.UnsupportedError$('Unknown calculation name "' + t3 + '".'); - t1 = A.throwExpression(t3); - } - t1 = t1; - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassScriptException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - if (B.JSString_methods.contains$1(error.message, "compatible")) - $async$self._async_evaluate0$_verifyCompatibleNumbers$2($arguments, t2); - A.throwWithTrace0($async$self._async_evaluate0$_exception$2(error.message, node.span), error, stackTrace); - } else - throw exception; - } finally { - $async$self._async_evaluate0$_callableNode = oldCallableNode; - } - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_visitCalculation$2$inLegacySassFunction, $async$completer); - }, - _async_evaluate0$_checkCalculationArguments$1(node) { - var t1, _0_0, - check = new A._EvaluateVisitor__checkCalculationArguments_check2(this, node); - $label0$0: { - t1 = node.name; - _0_0 = t1.toLowerCase(); - if ("calc" === _0_0 || "sqrt" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "abs" === _0_0 || "exp" === _0_0 || "sign" === _0_0) { - check.call$1(1); - break $label0$0; - } - if ("min" === _0_0 || "max" === _0_0 || "hypot" === _0_0) { - check.call$0(); - break $label0$0; - } - if ("pow" === _0_0 || "atan2" === _0_0 || "log" === _0_0 || "mod" === _0_0 || "rem" === _0_0) { - check.call$1(2); - break $label0$0; - } - if ("round" === _0_0 || "clamp" === _0_0) { - check.call$1(3); - break $label0$0; - } - throw A.wrapException(A.UnsupportedError$('Unknown calculation name "' + t1 + '".')); - } - }, - _async_evaluate0$_verifyCompatibleNumbers$2(args, nodesWithSpans) { - var i, t1, _0_0, arg, number1, j, number2; - for (i = 0; t1 = args.length, i < t1; ++i) { - _0_0 = args[i]; - if (_0_0 instanceof A.SassNumber0) { - t1 = _0_0.get$hasComplexUnits(); - arg = _0_0; - } else { - arg = null; - t1 = false; - } - if (t1) - throw A.wrapException(this._async_evaluate0$_exception$2("Number " + A.S(arg) + " isn't compatible with CSS calculations.", J.get$span$z(nodesWithSpans[i]))); - } - for (i = 0; i < t1 - 1; ++i) { - number1 = args[i]; - if (!(number1 instanceof A.SassNumber0)) - continue; - for (j = i + 1; t1 = args.length, j < t1; ++j) { - number2 = args[j]; - if (!(number2 instanceof A.SassNumber0)) - continue; - if (number1.hasPossiblyCompatibleUnits$1(number2)) - continue; - throw A.wrapException(A.MultiSpanSassRuntimeException$0(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", J.get$span$z(nodesWithSpans[i]), number1.toString$0(0), A.LinkedHashMap_LinkedHashMap$_literal([J.get$span$z(nodesWithSpans[j]), number2.toString$0(0)], type$.FileSpan, type$.String), this._async_evaluate0$_stackTrace$1(J.get$span$z(nodesWithSpans[i])), null)); - } - } - }, - _async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(node, inLegacySassFunction) { - return this._visitCalculationExpression$body$_EvaluateVisitor0(node, inLegacySassFunction); - }, - _visitCalculationExpression$body$_EvaluateVisitor0(node, inLegacySassFunction) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Object), - $async$returnValue, $async$self = this, result, t2, _0_0, _1_0, t3, _i, i, _box_0, t1, inner, $async$temp1; - var $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - _box_0 = {}; - t1 = node instanceof A.ParenthesizedExpression0; - inner = t1 ? node.expression : null; - $async$goto = t1 ? 3 : 4; - break; - case 3: - // then - $async$goto = 5; - return A._asyncAwait($async$self._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(inner, inLegacySassFunction), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); - case 5: - // returning from await. - result = $async$result; - $async$returnValue = result instanceof A.SassString0 ? new A.SassString0("(" + result._string0$_text + ")", false) : result; - // goto return - $async$goto = 1; - break; - case 4: - // join - $async$goto = node instanceof A.StringExpression0 && node.accept$1(B.C_IsCalculationSafeVisitor0) ? 6 : 7; - break; - case 6: - // then - t1 = node.text; - t2 = t1.get$asPlain(); - _0_0 = t2 == null ? null : t2.toLowerCase(); - if ("pi" === _0_0) { - t1 = A.SassNumber_SassNumber0(3.141592653589793, null); - // goto break $label0$0 - $async$goto = 8; - break; - } - if ("e" === _0_0) { - t1 = A.SassNumber_SassNumber0(2.718281828459045, null); - // goto break $label0$0 - $async$goto = 8; - break; - } - if ("infinity" === _0_0) { - t1 = A.SassNumber_SassNumber0(1 / 0, null); - // goto break $label0$0 - $async$goto = 8; - break; - } - if ("-infinity" === _0_0) { - t1 = A.SassNumber_SassNumber0(-1 / 0, null); - // goto break $label0$0 - $async$goto = 8; - break; - } - if ("nan" === _0_0) { - t1 = A.SassNumber_SassNumber0(0 / 0, null); - // goto break $label0$0 - $async$goto = 8; - break; - } - $async$temp1 = A; - $async$goto = 9; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(t1), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); - case 9: - // returning from await. - t1 = new $async$temp1.SassString0($async$result, false); - // goto break $label0$0 - $async$goto = 8; - break; - case 8: - // break $label0$0 - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - case 7: - // join - _box_0.right = _box_0.left = _box_0.operator = null; - t1 = node instanceof A.BinaryOperationExpression0; - if (t1) { - _box_0.operator = node.operator; - _box_0.left = node.left; - _box_0.right = node.right; - } - $async$goto = t1 ? 10 : 11; - break; - case 10: - // then - $async$self._async_evaluate0$_checkWhitespaceAroundCalculationOperator$1(node); - $async$goto = 12; - return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor__visitCalculationExpression_closure2(_box_0, $async$self, node, inLegacySassFunction), type$.Object), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); - case 12: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 11: - // join - $async$goto = node instanceof A.NumberExpression0 || node instanceof A.VariableExpression0 || node instanceof A.FunctionExpression0 || node instanceof A.IfExpression0 ? 13 : 14; - break; - case 13: - // then - $async$goto = 15; - return A._asyncAwait(node.accept$1($async$self), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); - case 15: - // returning from await. - _1_0 = $async$result; - $label1$1: { - if (_1_0 instanceof A.SassNumber0) { - t1 = _1_0; - break $label1$1; - } - if (_1_0 instanceof A.SassCalculation0) { - t1 = _1_0; - break $label1$1; - } - if (_1_0 instanceof A.SassString0) { - t1 = !_1_0._string0$_hasQuotes; - result = _1_0; - } else { - result = null; - t1 = false; - } - if (t1) { - t1 = result; - break $label1$1; - } - t1 = A.throwExpression($async$self._async_evaluate0$_exception$2("Value " + _1_0.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); - } - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - case 14: - // join - $async$goto = node instanceof A.ListExpression0 && !node.hasBrackets && B.ListSeparator_nbm0 === node.separator && node.contents.length >= 2 ? 16 : 17; - break; - case 16: - // then - t1 = A._setArrayType([], type$.JSArray_Object); - t2 = node.contents, t3 = t2.length, _i = 0; - case 18: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 20; - break; - } - $async$temp1 = t1; - $async$goto = 21; - return A._asyncAwait($async$self._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); - case 21: - // returning from await. - $async$temp1.push($async$result); - case 19: - // for update - ++_i; - // goto for condition - $async$goto = 18; - break; - case 20: - // after for - $async$self._async_evaluate0$_checkAdjacentCalculationValues$2(t1, node); - for (i = 0; i < t1.length; ++i) { - t3 = t1[i]; - if (t3 instanceof A.CalculationOperation0 && t2[i] instanceof A.ParenthesizedExpression0) - t1[i] = new A.SassString0("(" + A.S(t3) + ")", false); - } - $async$returnValue = new A.SassString0(B.JSArray_methods.join$1(t1, " "), false); - // goto return - $async$goto = 1; - break; - case 17: - // join - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.This_e, node.get$span(node))); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction, $async$completer); - }, - _async_evaluate0$_checkWhitespaceAroundCalculationOperator$1(node) { - var t2, t3, t4, textBetweenOperands, first, last, - t1 = node.operator; - if (t1 !== B.BinaryOperator_u150 && t1 !== B.BinaryOperator_SjO0) - return; - t1 = node.left; - t2 = t1.get$span(t1); - t2 = t2.get$file(t2); - t3 = node.right; - t4 = t3.get$span(t3); - if (t2 !== t4.get$file(t4)) - return; - t2 = t1.get$span(t1); - t2 = t2.get$end(t2); - t4 = t3.get$span(t3); - if (t2.offset >= t4.get$start(t4).offset) - return; - t2 = t1.get$span(t1); - t2 = t2.get$file(t2); - t1 = t1.get$span(t1); - t1 = t1.get$end(t1); - t3 = t3.get$span(t3); - textBetweenOperands = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, t1.offset, t3.get$start(t3).offset), 0, null); - first = textBetweenOperands.charCodeAt(0); - last = textBetweenOperands.charCodeAt(textBetweenOperands.length - 1); - if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47) - t1 = !(last === 32 || last === 9 || last === 10 || last === 13 || last === 12 || last === 47); - else - t1 = true; - if (t1) - throw A.wrapException(this._async_evaluate0$_exception$2(string$.x22x2b__an, node.get$operatorSpan())); - }, - _async_evaluate0$_binaryOperatorToCalculationOperator$2(operator, node) { - var t1; - $label0$0: { - if (B.BinaryOperator_u150 === operator) { - t1 = B.CalculationOperator_g2q0; - break $label0$0; - } - if (B.BinaryOperator_SjO0 === operator) { - t1 = B.CalculationOperator_CxF0; - break $label0$0; - } - if (B.BinaryOperator_2No0 === operator) { - t1 = B.CalculationOperator_1710; - break $label0$0; - } - if (B.BinaryOperator_U770 === operator) { - t1 = B.CalculationOperator_Qf10; - break $label0$0; - } - t1 = A.throwExpression(this._async_evaluate0$_exception$2(string$.This_o, node.get$operatorSpan())); - } - return t1; - }, - _async_evaluate0$_checkAdjacentCalculationValues$2(elements, node) { - var t1, i, t2, previous, current, previousNode, currentNode, _0_2; - for (t1 = elements.length, i = 1; i < t1; ++i) { - t2 = i - 1; - previous = elements[t2]; - current = elements[i]; - if (previous instanceof A.SassString0 || current instanceof A.SassString0) - continue; - t1 = node.contents; - previousNode = t1[t2]; - currentNode = t1[i]; - if (currentNode instanceof A.UnaryOperationExpression0) { - _0_2 = currentNode.operator; - if (B.UnaryOperator_AiQ0 !== _0_2) - t1 = B.UnaryOperator_cLp0 === _0_2; - else - t1 = true; - } else - t1 = false; - if (!t1) - t1 = currentNode instanceof A.NumberExpression0 && currentNode.value < 0; - else - t1 = true; - if (t1) - throw A.wrapException(this._async_evaluate0$_exception$2(string$.x22x2b__an, A.FileSpanExtension_subspan(currentNode.get$span(currentNode), 0, 1))); - else - throw A.wrapException(this._async_evaluate0$_exception$2("Missing math operator.", previousNode.get$span(previousNode).expand$1(0, currentNode.get$span(currentNode)))); - } - }, - visitInterpolatedFunctionExpression$1(_, node) { - return this.visitInterpolatedFunctionExpression$body$_EvaluateVisitor0(0, node); - }, - visitInterpolatedFunctionExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, result, t1, oldInFunction; - var $async$visitInterpolatedFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(node.name), $async$visitInterpolatedFunctionExpression$1); - case 3: - // returning from await. - t1 = $async$result; - oldInFunction = $async$self._async_evaluate0$_inFunction; - $async$self._async_evaluate0$_inFunction = true; - $async$goto = 4; - return A._asyncAwait($async$self._async_evaluate0$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure2($async$self, node, new A.PlainCssCallable0(t1)), type$.Value_2), $async$visitInterpolatedFunctionExpression$1); - case 4: - // returning from await. - result = $async$result; - $async$self._async_evaluate0$_inFunction = oldInFunction; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitInterpolatedFunctionExpression$1, $async$completer); - }, - _async_evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { - return this._runUserDefinedCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan, run, $V, $V); - }, - _runUserDefinedCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan, run, $V, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, oldCallable, result, evaluated, $name; - var $async$_async_evaluate0$_runUserDefinedCallable$1$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_evaluateArguments$1($arguments), $async$_async_evaluate0$_runUserDefinedCallable$1$4); - case 3: - // returning from await. - evaluated = $async$result; - $name = callable.declaration.name; - if ($name !== "@content") - $name += "()"; - oldCallable = $async$self._async_evaluate0$_currentCallable; - $async$self._async_evaluate0$_currentCallable = callable; - $async$goto = 4; - return A._asyncAwait($async$self._async_evaluate0$_withStackFrame$1$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure2($async$self, callable, evaluated, nodeWithSpan, run, $V), $V), $async$_async_evaluate0$_runUserDefinedCallable$1$4); - case 4: - // returning from await. - result = $async$result; - $async$self._async_evaluate0$_currentCallable = oldCallable; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_runUserDefinedCallable$1$4, $async$completer); - }, - _async_evaluate0$_runFunctionCallable$3($arguments, callable, nodeWithSpan) { - return this._runFunctionCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan); - }, - _runFunctionCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, buffer, first, argument, restArg, rest, error, t1, t2, _i, t3, t4, exception, $async$exception, $async$temp1; - var $async$_async_evaluate0$_runFunctionCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = type$.AsyncBuiltInCallable_2._is(callable) ? 3 : 5; - break; - case 3: - // then - $async$goto = 6; - return A._asyncAwait($async$self._async_evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan), $async$_async_evaluate0$_runFunctionCallable$3); - case 6: - // returning from await. - $async$returnValue = $async$self._async_evaluate0$_withoutSlash$2($async$result, nodeWithSpan); - // goto return - $async$goto = 1; - break; - // goto join - $async$goto = 4; - break; - case 5: - // else - $async$goto = type$.UserDefinedCallable_AsyncEnvironment_2._is(callable) ? 7 : 9; - break; - case 7: - // then - $async$goto = 10; - return A._asyncAwait($async$self._async_evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure2($async$self, callable), type$.Value_2), $async$_async_evaluate0$_runFunctionCallable$3); - case 10: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - // goto join - $async$goto = 8; - break; - case 9: - // else - $async$goto = callable instanceof A.PlainCssCallable0 ? 11 : 13; - break; - case 11: - // then - t1 = $arguments.named; - if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); - buffer = new A.StringBuffer(callable.name + "("); - $async$handler = 15; - first = true; - t1 = $arguments.positional, t2 = t1.length, _i = 0; - case 18: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 20; - break; - } - argument = t1[_i]; - if (first) - first = false; - else - buffer._contents += ", "; - t3 = buffer; - $async$temp1 = A; - $async$goto = 21; - return A._asyncAwait($async$self._async_evaluate0$_evaluateToCss$1(argument), $async$_async_evaluate0$_runFunctionCallable$3); - case 21: - // returning from await. - t4 = $async$temp1.S($async$result); - t3._contents += t4; - case 19: - // for update - ++_i; - // goto for condition - $async$goto = 18; - break; - case 20: - // after for - restArg = $arguments.rest; - $async$goto = restArg != null ? 22 : 23; - break; - case 22: - // then - $async$goto = 24; - return A._asyncAwait(restArg.accept$1($async$self), $async$_async_evaluate0$_runFunctionCallable$3); - case 24: - // returning from await. - rest = $async$result; - if (!first) - buffer._contents += ", "; - t1 = buffer; - t2 = $async$self._async_evaluate0$_serialize$2(rest, restArg); - t1._contents += t2; - case 23: - // join - $async$handler = 2; - // goto after finally - $async$goto = 17; - break; - case 15: - // catch - $async$handler = 14; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (type$.SassRuntimeException_2._is(t1)) { - error = t1; - if (!B.JSString_methods.endsWith$1(error._span_exception$_message, "isn't a valid CSS value.")) - throw $async$exception; - throw A.wrapException(A.MultiSpanSassRuntimeException$0(error._span_exception$_message, J.get$span$z(error), "value", A.LinkedHashMap_LinkedHashMap$_literal([nodeWithSpan.get$span(nodeWithSpan), "unknown function treated as plain CSS"], type$.FileSpan, type$.String), J.get$trace$z(error), null)); - } else - throw $async$exception; - // goto after finally - $async$goto = 17; - break; - case 14: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 17: - // after finally - t1 = buffer; - t2 = A.Primitives_stringFromCharCode(41); - t1._contents += t2; - t2 = buffer._contents; - $async$returnValue = new A.SassString0(t2.charCodeAt(0) == 0 ? t2 : t2, false); - // goto return - $async$goto = 1; - break; - // goto join - $async$goto = 12; - break; - case 13: - // else - throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$(callable).toString$0(0) + ".", null)); - case 12: - // join - case 8: - // join - case 4: - // join - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_runFunctionCallable$3, $async$completer); - }, - _async_evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan) { - return this._runBuiltInCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan); - }, - _runBuiltInCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, result, error, stackTrace, namedSet, _0_0, declaredArguments, i, t1, t2, t3, argument, t4, t5, t6, t7, rest, argumentList, exception, _box_0, evaluated, oldCallableNode, $async$exception; - var $async$_async_evaluate0$_runBuiltInCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - _box_0 = {}; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_evaluateArguments$1($arguments), $async$_async_evaluate0$_runBuiltInCallable$3); - case 3: - // returning from await. - evaluated = $async$result; - oldCallableNode = $async$self._async_evaluate0$_callableNode; - $async$self._async_evaluate0$_callableNode = nodeWithSpan; - namedSet = new A.MapKeySet(evaluated._values[0], type$.MapKeySet_String); - _box_0.callback = _box_0.overload = null; - _0_0 = callable.callbackFor$2(J.get$length$asx(evaluated._values[2]), namedSet); - _box_0.overload = _0_0._0; - _box_0.callback = _0_0._1; - $async$self._async_evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure8(_box_0, evaluated, namedSet)); - declaredArguments = _box_0.overload.$arguments; - i = J.get$length$asx(evaluated._values[2]), t1 = declaredArguments.length, t2 = type$._Future_Value_2, t3 = type$.Future_Value_2; - case 4: - // for condition - if (!(i < t1)) { - // goto after for - $async$goto = 6; - break; - } - argument = declaredArguments[i]; - t4 = evaluated._values[2]; - t5 = evaluated._values[0].remove$1(0, argument.name); - $async$goto = t5 == null ? 7 : 8; - break; - case 7: - // then - t5 = argument.defaultValue; - t6 = t5.accept$1($async$self); - if (!t3._is(t6)) { - t7 = new A._Future($.Zone__current, t2); - t7._state = 8; - t7._resultOrListeners = t6; - t6 = t7; - } - $async$goto = 9; - return A._asyncAwait(t6, $async$_async_evaluate0$_runBuiltInCallable$3); - case 9: - // returning from await. - t5 = $async$self._async_evaluate0$_withoutSlash$2($async$result, t5); - case 8: - // join - J.add$1$ax(t4, t5); - case 5: - // for update - ++i; - // goto for condition - $async$goto = 4; - break; - case 6: - // after for - if (_box_0.overload.restArgument != null) { - if (J.get$length$asx(evaluated._values[2]) > t1) { - rest = J.sublist$1$ax(evaluated._values[2], t1); - J.removeRange$2$ax(evaluated._values[2], t1, J.get$length$asx(evaluated._values[2])); - } else - rest = B.List_empty20; - t1 = evaluated._values[0]; - argumentList = A.SassArgumentList$0(rest, t1, evaluated._values[4] === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_ECn0 : evaluated._values[4]); - J.add$1$ax(evaluated._values[2], argumentList); - } else - argumentList = null; - result = null; - $async$handler = 11; - $async$goto = 14; - return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure9(_box_0, evaluated), type$.Value_2), $async$_async_evaluate0$_runBuiltInCallable$3); - case 14: - // returning from await. - result = $async$result; - $async$handler = 2; - // goto after finally - $async$goto = 13; - break; - case 11: - // catch - $async$handler = 10; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (t1 instanceof A.SassException0) - throw $async$exception; - else { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - A.throwWithTrace0($async$self._async_evaluate0$_exception$2($async$self._async_evaluate0$_getErrorMessage$1(error), nodeWithSpan.get$span(nodeWithSpan)), error, stackTrace); - } - // goto after finally - $async$goto = 13; - break; - case 10: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 13: - // after finally - $async$self._async_evaluate0$_callableNode = oldCallableNode; - if (argumentList == null) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - t1 = evaluated._values[0]; - if (t1.get$isEmpty(t1)) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - if (argumentList._argument_list$_wereKeywordsAccessed) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - t1 = evaluated._values[0]; - t1 = A.pluralize0("argument", J.get$length$asx(t1.get$keys(t1)), null); - t2 = evaluated._values[0]; - throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + t1 + " named " + A.toSentence0(J.map$1$1$ax(t2.get$keys(t2), new A._EvaluateVisitor__runBuiltInCallable_closure10(), type$.Object), "or") + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_box_0.overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), null)); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_runBuiltInCallable$3, $async$completer); - }, - _async_evaluate0$_evaluateArguments$1($arguments) { - return this._evaluateArguments$body$_EvaluateVisitor0($arguments); - }, - _evaluateArguments$body$_EvaluateVisitor0($arguments) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_5_Map_String_Value_named_and_Map_String_AstNode_namedNodes_and_List_Value_positional_and_List_AstNode_positionalNodes_and_ListSeparator_separator_2), - $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, expression, nodeForSpan, t5, t6, named, namedNodes, $name, value, t7, restArgs, rest, restNodeForSpan, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, positional, positionalNodes, $async$temp1, $async$temp2; - var $async$_async_evaluate0$_evaluateArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - positional = A._setArrayType([], type$.JSArray_Value_2); - positionalNodes = A._setArrayType([], type$.JSArray_AstNode_2); - t1 = $arguments.positional, t2 = t1.length, t3 = type$._Future_Value_2, t4 = type$.Future_Value_2, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - expression = t1[_i]; - nodeForSpan = $async$self._async_evaluate0$_expressionNode$1(expression); - t5 = expression.accept$1($async$self); - if (!t4._is(t5)) { - t6 = new A._Future($.Zone__current, t3); - t6._state = 8; - t6._resultOrListeners = t5; - t5 = t6; - } - $async$temp1 = positional; - $async$goto = 6; - return A._asyncAwait(t5, $async$_async_evaluate0$_evaluateArguments$1); - case 6: - // returning from await. - $async$temp1.push($async$self._async_evaluate0$_withoutSlash$2($async$result, nodeForSpan)); - positionalNodes.push(nodeForSpan); - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - t1 = type$.String; - named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2); - t2 = type$.AstNode_2; - namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - t5 = A.MapExtensions_get_pairs0($arguments.named, t1, type$.Expression_2), t5 = t5.get$iterator(t5); - case 7: - // for condition - if (!t5.moveNext$0()) { - // goto after for - $async$goto = 8; - break; - } - t6 = t5.get$current(t5); - $name = t6._0; - value = t6._1; - nodeForSpan = $async$self._async_evaluate0$_expressionNode$1(value); - t6 = value.accept$1($async$self); - if (!t4._is(t6)) { - t7 = new A._Future($.Zone__current, t3); - t7._state = 8; - t7._resultOrListeners = t6; - t6 = t7; - } - $async$temp1 = named; - $async$temp2 = $name; - $async$goto = 9; - return A._asyncAwait(t6, $async$_async_evaluate0$_evaluateArguments$1); - case 9: - // returning from await. - $async$temp1.$indexSet(0, $async$temp2, $async$self._async_evaluate0$_withoutSlash$2($async$result, nodeForSpan)); - namedNodes.$indexSet(0, $name, nodeForSpan); - // goto for condition - $async$goto = 7; - break; - case 8: - // after for - restArgs = $arguments.rest; - if (restArgs == null) { - $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, B.ListSeparator_undecided_null_undecided0]); - // goto return - $async$goto = 1; - break; - } - $async$goto = 10; - return A._asyncAwait(restArgs.accept$1($async$self), $async$_async_evaluate0$_evaluateArguments$1); - case 10: - // returning from await. - rest = $async$result; - restNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(restArgs); - if (rest instanceof A.SassMap0) { - $async$self._async_evaluate0$_addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure11()); - t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t4 = rest._map0$_contents, t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = type$.SassString_2; t4.moveNext$0();) - t3.$indexSet(0, t5._as(t4.get$current(t4))._string0$_text, restNodeForSpan); - namedNodes.addAll$1(0, t3); - separator = B.ListSeparator_undecided_null_undecided0; - } else if (rest instanceof A.SassList0) { - t3 = rest._list1$_contents; - B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure12($async$self, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value0>"))); - B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); - separator = rest._list1$_separator; - if (rest instanceof A.SassArgumentList0) { - rest._argument_list$_wereKeywordsAccessed = true; - rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure13($async$self, named, restNodeForSpan, namedNodes)); - } - } else { - positional.push($async$self._async_evaluate0$_withoutSlash$2(rest, restNodeForSpan)); - positionalNodes.push(restNodeForSpan); - separator = B.ListSeparator_undecided_null_undecided0; - } - keywordRestArgs = $arguments.keywordRest; - if (keywordRestArgs == null) { - $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); - // goto return - $async$goto = 1; - break; - } - $async$goto = 11; - return A._asyncAwait(keywordRestArgs.accept$1($async$self), $async$_async_evaluate0$_evaluateArguments$1); - case 11: - // returning from await. - keywordRest = $async$result; - keywordRestNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(keywordRestArgs); - if (keywordRest instanceof A.SassMap0) { - $async$self._async_evaluate0$_addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure14()); - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t2 = keywordRest._map0$_contents, t2 = J.get$iterator$ax(t2.get$keys(t2)), t3 = type$.SassString_2; t2.moveNext$0();) - t1.$indexSet(0, t3._as(t2.get$current(t2))._string0$_text, keywordRestNodeForSpan); - namedNodes.addAll$1(0, t1); - $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); - // goto return - $async$goto = 1; - break; - } else - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_evaluateArguments$1, $async$completer); - }, - _async_evaluate0$_evaluateMacroArguments$1(invocation) { - return this._evaluateMacroArguments$body$_EvaluateVisitor0(invocation); - }, - _evaluateMacroArguments$body$_EvaluateVisitor0(invocation) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_List_Expression_and_Map_String_Expression_2), - $async$returnValue, $async$self = this, t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, t1, restArgs_; - var $async$_async_evaluate0$_evaluateMacroArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = invocation.$arguments; - restArgs_ = t1.rest; - if (restArgs_ == null) { - $async$returnValue = new A._Record_2(t1.positional, t1.named); - // goto return - $async$goto = 1; - break; - } - t2 = t1.positional; - positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); - named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression_2); - $async$goto = 3; - return A._asyncAwait(restArgs_.accept$1($async$self), $async$_async_evaluate0$_evaluateMacroArguments$1); - case 3: - // returning from await. - rest = $async$result; - restNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(restArgs_); - if (rest instanceof A.SassMap0) - $async$self._async_evaluate0$_addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure11(restArgs_)); - else if (rest instanceof A.SassList0) { - t2 = rest._list1$_contents; - B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure12($async$self, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression0>"))); - if (rest instanceof A.SassArgumentList0) { - rest._argument_list$_wereKeywordsAccessed = true; - rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure13($async$self, named, restNodeForSpan, restArgs_)); - } - } else - positional.push(new A.ValueExpression0($async$self._async_evaluate0$_withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); - keywordRestArgs_ = t1.keywordRest; - if (keywordRestArgs_ == null) { - $async$returnValue = new A._Record_2(positional, named); - // goto return - $async$goto = 1; - break; - } - $async$goto = 4; - return A._asyncAwait(keywordRestArgs_.accept$1($async$self), $async$_async_evaluate0$_evaluateMacroArguments$1); - case 4: - // returning from await. - keywordRest = $async$result; - keywordRestNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(keywordRestArgs_); - if (keywordRest instanceof A.SassMap0) { - $async$self._async_evaluate0$_addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure14($async$self, keywordRestNodeForSpan, keywordRestArgs_)); - $async$returnValue = new A._Record_2(positional, named); - // goto return - $async$goto = 1; - break; - } else - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_evaluateMacroArguments$1, $async$completer); - }, - _async_evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert) { - map._map0$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure2(this, values, convert, this._async_evaluate0$_expressionNode$1(nodeWithSpan), map, nodeWithSpan)); - }, - _async_evaluate0$_addRestMap$4(values, map, nodeWithSpan, convert) { - return this._async_evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); - }, - _async_evaluate0$_verifyArguments$4(positional, named, $arguments, nodeWithSpan) { - return this._async_evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure2($arguments, positional, named)); - }, - visitSelectorExpression$1(_, node) { - return this.visitSelectorExpression$body$_EvaluateVisitor0(0, node); - }, - visitSelectorExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, t1; - var $async$visitSelectorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; - t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); - $async$returnValue = t1 == null ? B.C__SassNull0 : t1; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitSelectorExpression$1, $async$completer); - }, - visitStringExpression$1(_, node) { - return this.visitStringExpression$body$_EvaluateVisitor0(0, node); - }, - visitStringExpression$body$_EvaluateVisitor0(_, node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassString_2), - $async$returnValue, $async$self = this, t1, t2, t3, _i, value, t4, _0_0, text, oldInSupportsDeclaration; - var $async$visitStringExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldInSupportsDeclaration = $async$self._async_evaluate0$_inSupportsDeclaration; - $async$self._async_evaluate0$_inSupportsDeclaration = false; - t1 = A._setArrayType([], type$.JSArray_String); - t2 = node.text.contents, t3 = t2.length, _i = 0; - case 3: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 5; - break; - } - value = t2[_i]; - if (typeof value == "string") { - t4 = value; - // goto break $label0$0 - $async$goto = 6; - break; - } - $async$goto = value instanceof A.Expression0 ? 7 : 8; - break; - case 7: - // then - $async$goto = 9; - return A._asyncAwait(value.accept$1($async$self), $async$visitStringExpression$1); - case 9: - // returning from await. - _0_0 = $async$result; - $label1$1: { - if (_0_0 instanceof A.SassString0) { - text = _0_0._string0$_text; - t4 = text; - break $label1$1; - } - t4 = $async$self._async_evaluate0$_serialize$3$quote(_0_0, value, false); - break $label1$1; - } - // goto break $label0$0 - $async$goto = 6; - break; - case 8: - // join - t4 = A.throwExpression(A.UnsupportedError$("Unknown interpolation value " + A.S(value))); - case 6: - // break $label0$0 - t1.push(t4); - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - t1 = B.JSArray_methods.join$0(t1); - $async$self._async_evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; - $async$returnValue = new A.SassString0(t1, node.hasQuotes); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitStringExpression$1, $async$completer); - }, - visitSupportsExpression$1(_, expression) { - return this.visitSupportsExpression$body$_EvaluateVisitor0(0, expression); - }, - visitSupportsExpression$body$_EvaluateVisitor0(_, expression) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassString_2), - $async$returnValue, $async$self = this, $async$temp1; - var $async$visitSupportsExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$temp1 = A; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(expression.condition), $async$visitSupportsExpression$1); - case 3: - // returning from await. - $async$returnValue = new $async$temp1.SassString0($async$result, false); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitSupportsExpression$1, $async$completer); - }, - visitCssAtRule$1(node) { - return this.visitCssAtRule$body$_EvaluateVisitor0(node); - }, - visitCssAtRule$body$_EvaluateVisitor0(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$returnValue, $async$self = this, wasInKeyframes, wasInUnknownAtRule, t1; - var $async$visitCssAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate0$_declarationName != null) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.At_rul, node.span)); - if (node.isChildless) { - $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0(node.name, node.span, true, node.value)); - // goto return - $async$goto = 1; - break; - } - wasInKeyframes = $async$self._async_evaluate0$_inKeyframes; - wasInUnknownAtRule = $async$self._async_evaluate0$_inUnknownAtRule; - t1 = node.name; - if (A.unvendor0(t1.value) === "keyframes") - $async$self._async_evaluate0$_inKeyframes = true; - else - $async$self._async_evaluate0$_inUnknownAtRule = true; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$0(t1, node.span, false, node.value), new A._EvaluateVisitor_visitCssAtRule_closure5($async$self, node), false, new A._EvaluateVisitor_visitCssAtRule_closure6(), type$.ModifiableCssAtRule_2, type$.Null), $async$visitCssAtRule$1); - case 3: - // returning from await. - $async$self._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; - $async$self._async_evaluate0$_inKeyframes = wasInKeyframes; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssAtRule$1, $async$completer); - }, - visitCssComment$1(node) { - return this.visitCssComment$body$_EvaluateVisitor0(node); - }, - visitCssComment$body$_EvaluateVisitor0(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this; - var $async$visitCssComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") === $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root") && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) - $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; - $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(new A.ModifiableCssComment0(node.text, node.span)); - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssComment$1, $async$completer); - }, - visitCssDeclaration$1(node) { - return this.visitCssDeclaration$body$_EvaluateVisitor0(node); - }, - visitCssDeclaration$body$_EvaluateVisitor0(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this; - var $async$visitCssDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$0(node.name, node.value, node.span, null, node.parsedAsCustomProperty, null, node.valueSpanForMap)); - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssDeclaration$1, $async$completer); - }, - visitCssImport$1(node) { - return this.visitCssImport$body$_EvaluateVisitor0(node); - }, - visitCssImport$body$_EvaluateVisitor0(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1, modifiableNode; - var $async$visitCssImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - modifiableNode = new A.ModifiableCssImport0(node.url, node.modifiers, node.span); - if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") !== $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root")) - $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(modifiableNode); - else if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) { - $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").addChild$1(modifiableNode); - $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; - } else { - t1 = $async$self._async_evaluate0$_outOfOrderImports; - (t1 == null ? $async$self._async_evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t1).push(modifiableNode); - } - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssImport$1, $async$completer); - }, - visitCssKeyframeBlock$1(node) { - return this.visitCssKeyframeBlock$body$_EvaluateVisitor0(node); - }, - visitCssKeyframeBlock$body$_EvaluateVisitor0(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this; - var $async$visitCssKeyframeBlock$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 2; - return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure5($async$self, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure6(), type$.ModifiableCssKeyframeBlock_2, type$.Null), $async$visitCssKeyframeBlock$1); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssKeyframeBlock$1, $async$completer); - }, - visitCssMediaRule$1(node) { - return this.visitCssMediaRule$body$_EvaluateVisitor0(node); - }, - visitCssMediaRule$body$_EvaluateVisitor0(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$returnValue, $async$self = this, mergedQueries, t1, mergedSources, t2, t3; - var $async$visitCssMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate0$_declarationName != null) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Media_, node.span)); - mergedQueries = A.NullableExtension_andThen0($async$self._async_evaluate0$_mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure8($async$self, node)); - t1 = mergedQueries == null; - if (!t1 && J.get$isEmpty$asx(mergedQueries)) { - // goto return - $async$goto = 1; - break; - } - if (t1) - mergedSources = B.Set_empty5; - else { - t2 = $async$self._async_evaluate0$_mediaQuerySources; - t2.toString; - t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); - t3 = $async$self._async_evaluate0$_mediaQueries; - t3.toString; - t2.addAll$1(0, t3); - t2.addAll$1(0, node.queries); - mergedSources = t2; - } - t1 = t1 ? node.queries : mergedQueries; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure9($async$self, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure10(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null), $async$visitCssMediaRule$1); - case 3: - // returning from await. - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssMediaRule$1, $async$completer); - }, - visitCssStyleRule$1(node) { - return this.visitCssStyleRule$body$_EvaluateVisitor0(node); - }, - visitCssStyleRule$body$_EvaluateVisitor0(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1, styleRule, t2, nest, t3, originalSelector, rule, oldAtRootExcludingStyleRule, _0_1, lastChild; - var $async$visitCssStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate0$_declarationName != null) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_n, node.span)); - else if ($async$self._async_evaluate0$_inKeyframes && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") instanceof A.ModifiableCssKeyframeBlock0) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_k, node.span)); - t1 = $async$self._async_evaluate0$_atRootExcludingStyleRule; - styleRule = t1 ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; - t2 = t1 ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; - t2 = t2 == null ? null : t2.fromPlainCss; - nest = t2 !== true; - t2 = node._style_rule0$_selector._box0$_inner; - if (nest) { - t2 = t2.value; - t3 = styleRule == null ? null : styleRule.originalSelector; - originalSelector = t2.nestWithin$3$implicitParent$preserveParentSelectors(t3, !t1, node.fromPlainCss); - } else - originalSelector = t2.value; - rule = A.ModifiableCssStyleRule$0($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__extensionStore, "_extensionStore").addSelector$2(originalSelector, $async$self._async_evaluate0$_mediaQueries), node.span, node.fromPlainCss, originalSelector); - oldAtRootExcludingStyleRule = $async$self._async_evaluate0$_atRootExcludingStyleRule; - $async$self._async_evaluate0$_atRootExcludingStyleRule = false; - t1 = nest ? new A._EvaluateVisitor_visitCssStyleRule_closure5() : null; - $async$goto = 2; - return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure6($async$self, rule, node), false, t1, type$.ModifiableCssStyleRule_2, type$.Null), $async$visitCssStyleRule$1); - case 2: - // returning from await. - $async$self._async_evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; - t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children._collection$_source; - t2 = J.getInterceptor$asx(t1); - _0_1 = t2.get$length(t1); - if (_0_1 >= 1) { - lastChild = t2.elementAt$1(t1, _0_1 - 1); - t1 = styleRule == null; - } else { - lastChild = null; - t1 = false; - } - if (t1) - lastChild.isGroupEnd = true; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssStyleRule$1, $async$completer); - }, - visitCssStylesheet$1(node) { - return this.visitCssStylesheet$body$_EvaluateVisitor0(node); - }, - visitCssStylesheet$body$_EvaluateVisitor0(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1; - var $async$visitCssStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = J.get$iterator$ax(node.get$children(node)); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - $async$goto = 4; - return A._asyncAwait(t1.get$current(t1).accept$1($async$self), $async$visitCssStylesheet$1); - case 4: - // returning from await. - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssStylesheet$1, $async$completer); - }, - visitCssSupportsRule$1(node) { - return this.visitCssSupportsRule$body$_EvaluateVisitor0(node); - }, - visitCssSupportsRule$body$_EvaluateVisitor0(node) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this; - var $async$visitCssSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if ($async$self._async_evaluate0$_declarationName != null) - throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Suppor, node.span)); - $async$goto = 2; - return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$0(node.condition, node.span), new A._EvaluateVisitor_visitCssSupportsRule_closure5($async$self, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure6(), type$.ModifiableCssSupportsRule_2, type$.Null), $async$visitCssSupportsRule$1); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$visitCssSupportsRule$1, $async$completer); - }, - _async_evaluate0$_handleReturn$1$2(list, callback) { - return this._handleReturn$body$_EvaluateVisitor0(list, callback); - }, - _async_evaluate0$_handleReturn$2(list, callback) { - return this._async_evaluate0$_handleReturn$1$2(list, callback, type$.dynamic); - }, - _handleReturn$body$_EvaluateVisitor0(list, callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, t1, _i, _0_0; - var $async$_async_evaluate0$_handleReturn$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = list.length, _i = 0; - case 3: - // for condition - if (!(_i < list.length)) { - // goto after for - $async$goto = 5; - break; - } - $async$goto = 6; - return A._asyncAwait(callback.call$1(list[_i]), $async$_async_evaluate0$_handleReturn$1$2); - case 6: - // returning from await. - _0_0 = $async$result; - if (_0_0 != null) { - $async$returnValue = _0_0; - // goto return - $async$goto = 1; - break; - } - case 4: - // for update - list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_handleReturn$1$2, $async$completer); - }, - _async_evaluate0$_withEnvironment$1$2(environment, callback, $T) { - return this._withEnvironment$body$_EvaluateVisitor0(environment, callback, $T, $T); - }, - _withEnvironment$body$_EvaluateVisitor0(environment, callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, result, oldEnvironment; - var $async$_async_evaluate0$_withEnvironment$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldEnvironment = $async$self._async_evaluate0$_environment; - $async$self._async_evaluate0$_environment = environment; - $async$goto = 3; - return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withEnvironment$1$2); - case 3: - // returning from await. - result = $async$result; - $async$self._async_evaluate0$_environment = oldEnvironment; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_withEnvironment$1$2, $async$completer); - }, - _async_evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { - return this._interpolationToValue$body$_EvaluateVisitor0(interpolation, trim, warnForColor); - }, - _async_evaluate0$_interpolationToValue$1(interpolation) { - return this._async_evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, false); - }, - _async_evaluate0$_interpolationToValue$2$warnForColor(interpolation, warnForColor) { - return this._async_evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); - }, - _interpolationToValue$body$_EvaluateVisitor0(interpolation, trim, warnForColor) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.CssValue_String_2), - $async$returnValue, $async$self = this, result, t1; - var $async$_async_evaluate0$_interpolationToValue$3$trim$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor), $async$_async_evaluate0$_interpolationToValue$3$trim$warnForColor); - case 3: - // returning from await. - result = $async$result; - t1 = trim ? A.trimAscii0(result, true) : result; - $async$returnValue = new A.CssValue0(t1, interpolation.span, type$.CssValue_String_2); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_interpolationToValue$3$trim$warnForColor, $async$completer); - }, - _async_evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor) { - return this._performInterpolation$body$_EvaluateVisitor0(interpolation, warnForColor); - }, - _async_evaluate0$_performInterpolation$1(interpolation) { - return this._async_evaluate0$_performInterpolation$2$warnForColor(interpolation, false); - }, - _performInterpolation$body$_EvaluateVisitor0(interpolation, warnForColor) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.String), - $async$returnValue, $async$self = this; - var $async$_async_evaluate0$_performInterpolation$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, false, warnForColor), $async$_async_evaluate0$_performInterpolation$2$warnForColor); - case 3: - // returning from await. - $async$returnValue = $async$result._0; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_performInterpolation$2$warnForColor, $async$completer); - }, - _async_evaluate0$_performInterpolationWithMap$2$warnForColor(interpolation, warnForColor) { - return this._performInterpolationWithMap$body$_EvaluateVisitor0(interpolation, true); - }, - _performInterpolationWithMap$body$_EvaluateVisitor0(interpolation, warnForColor) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_String_and_InterpolationMap_2), - $async$returnValue, $async$self = this, _0_0, result, map; - var $async$_async_evaluate0$_performInterpolationWithMap$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, true, true), $async$_async_evaluate0$_performInterpolationWithMap$2$warnForColor); - case 3: - // returning from await. - _0_0 = $async$result; - result = _0_0._0; - map = _0_0._1; - map.toString; - $async$returnValue = new A._Record_2(result, map); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_performInterpolationWithMap$2$warnForColor, $async$completer); - }, - _async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, sourceMap, warnForColor) { - return this._performInterpolationHelper$body$_EvaluateVisitor0(interpolation, sourceMap, warnForColor); - }, - _performInterpolationHelper$body$_EvaluateVisitor0(interpolation, sourceMap, warnForColor) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_String_and_nullable_InterpolationMap_2), - $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, t6, first, _i, t7, value, result, result0, t8, targetLocations, oldInSupportsDeclaration; - var $async$_async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - targetLocations = sourceMap ? A._setArrayType([], type$.JSArray_SourceLocation) : null; - oldInSupportsDeclaration = $async$self._async_evaluate0$_inSupportsDeclaration; - $async$self._async_evaluate0$_inSupportsDeclaration = false; - t1 = interpolation.contents, t2 = t1.length, t3 = type$.Expression_2, t4 = targetLocations == null, t5 = interpolation.span, t6 = type$.Object, first = true, _i = 0, t7 = ""; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - value = t1[_i]; - if (!first) - if (!t4) - targetLocations.push(A.SourceLocation$(t7.length, null, null, null)); - if (typeof value == "string") { - t7 += value; - // goto for update - $async$goto = 4; - break; - } - t3._as(value); - $async$goto = 6; - return A._asyncAwait(value.accept$1($async$self), $async$_async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor); - case 6: - // returning from await. - result = $async$result; - if (warnForColor && $.$get$namesByColor0().containsKey$1(result)) { - result0 = A.List_List$from([""], false, t6); - result0.fixed$length = Array; - result0.immutable$list = Array; - t8 = $.$get$namesByColor0(); - $async$self._async_evaluate0$_warn$2(string$.You_pr + A.S(t8.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t8.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression0(B.BinaryOperator_u150, new A.StringExpression0(new A.Interpolation0(result0, B.List_null, t5), true), value, false).toString$0(0) + "'.", value.get$span(value)); - } - t7 += $async$self._async_evaluate0$_serialize$3$quote(result, value, false); - case 4: - // for update - ++_i, first = false; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$self._async_evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; - $async$returnValue = new A._Record_2(t7.charCodeAt(0) == 0 ? t7 : t7, A.NullableExtension_andThen0(targetLocations, new A._EvaluateVisitor__performInterpolationHelper_closure2(interpolation))); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor, $async$completer); - }, - _async_evaluate0$_evaluateToCss$2$quote(expression, quote) { - return this._evaluateToCss$body$_EvaluateVisitor0(expression, quote); - }, - _async_evaluate0$_evaluateToCss$1(expression) { - return this._async_evaluate0$_evaluateToCss$2$quote(expression, true); - }, - _evaluateToCss$body$_EvaluateVisitor0(expression, quote) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.String), - $async$returnValue, $async$self = this, t1; - var $async$_async_evaluate0$_evaluateToCss$2$quote = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = expression.accept$1($async$self); - $async$goto = 3; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$_async_evaluate0$_evaluateToCss$2$quote); - case 3: - // returning from await. - $async$returnValue = $async$self._async_evaluate0$_serialize$3$quote($async$result, expression, quote); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_evaluateToCss$2$quote, $async$completer); - }, - _async_evaluate0$_serialize$3$quote(value, nodeWithSpan, quote) { - return this._async_evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure2(value, quote)); - }, - _async_evaluate0$_serialize$2(value, nodeWithSpan) { - return this._async_evaluate0$_serialize$3$quote(value, nodeWithSpan, true); - }, - _async_evaluate0$_expressionNode$1(expression) { - var t1; - if (expression instanceof A.VariableExpression0) { - t1 = this._async_evaluate0$_addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure2(this, expression)); - return t1 == null ? expression : t1; - } else - return expression; - }, - _async_evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { - return this._withParent$body$_EvaluateVisitor0(node, callback, scopeWhen, through, $S, $T, $T); - }, - _async_evaluate0$_withParent$2$2(node, callback, $S, $T) { - return this._async_evaluate0$_withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); - }, - _async_evaluate0$_withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { - return this._async_evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); - }, - _withParent$body$_EvaluateVisitor0(node, callback, scopeWhen, through, $S, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, t1, result; - var $async$_async_evaluate0$_withParent$2$4$scopeWhen$through = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$self._async_evaluate0$_addChild$2$through(node, through); - t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); - $async$self._async_evaluate0$__parent = node; - $async$goto = 3; - return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$2$when(callback, scopeWhen, $T), $async$_async_evaluate0$_withParent$2$4$scopeWhen$through); - case 3: - // returning from await. - result = $async$result; - $async$self._async_evaluate0$__parent = t1; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_withParent$2$4$scopeWhen$through, $async$completer); - }, - _async_evaluate0$_addChild$2$through(node, through) { - var _0_0, grandparent, t1, - $parent = this._async_evaluate0$_assertInModule$2(this._async_evaluate0$__parent, "__parent"); - if (through != null) { - for (; through.call$1($parent); $parent = _0_0) { - _0_0 = $parent._node$_parent; - if (_0_0 == null) - throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); - } - if ($parent.get$hasFollowingSibling()) { - grandparent = $parent._node$_parent; - t1 = grandparent.children; - if ($parent.equalsIgnoringChildren$1(t1.get$last(t1))) - $parent = type$.ModifiableCssParentNode_2._as(t1.get$last(t1)); - else { - $parent = $parent.copyWithoutChildren$0(); - grandparent.addChild$1($parent); - } - } - } - $parent.addChild$1(node); - }, - _async_evaluate0$_addChild$1(node) { - return this._async_evaluate0$_addChild$2$through(node, null); - }, - _async_evaluate0$_withStyleRule$1$2(rule, callback, $T) { - return this._withStyleRule$body$_EvaluateVisitor0(rule, callback, $T, $T); - }, - _withStyleRule$body$_EvaluateVisitor0(rule, callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, result, oldRule; - var $async$_async_evaluate0$_withStyleRule$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldRule = $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; - $async$self._async_evaluate0$_styleRuleIgnoringAtRoot = rule; - $async$goto = 3; - return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withStyleRule$1$2); - case 3: - // returning from await. - result = $async$result; - $async$self._async_evaluate0$_styleRuleIgnoringAtRoot = oldRule; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_withStyleRule$1$2, $async$completer); - }, - _async_evaluate0$_withMediaQueries$1$3(queries, sources, callback, $T) { - return this._withMediaQueries$body$_EvaluateVisitor0(queries, sources, callback, $T, $T); - }, - _withMediaQueries$body$_EvaluateVisitor0(queries, sources, callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, result, oldMediaQueries, oldSources; - var $async$_async_evaluate0$_withMediaQueries$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - oldMediaQueries = $async$self._async_evaluate0$_mediaQueries; - oldSources = $async$self._async_evaluate0$_mediaQuerySources; - $async$self._async_evaluate0$_mediaQueries = queries; - $async$self._async_evaluate0$_mediaQuerySources = sources; - $async$goto = 3; - return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withMediaQueries$1$3); - case 3: - // returning from await. - result = $async$result; - $async$self._async_evaluate0$_mediaQueries = oldMediaQueries; - $async$self._async_evaluate0$_mediaQuerySources = oldSources; - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_withMediaQueries$1$3, $async$completer); - }, - _async_evaluate0$_withStackFrame$1$3(member, nodeWithSpan, callback, $T) { - return this._withStackFrame$body$_EvaluateVisitor0(member, nodeWithSpan, callback, $T, $T); - }, - _withStackFrame$body$_EvaluateVisitor0(member, nodeWithSpan, callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, oldMember, result, t1; - var $async$_async_evaluate0$_withStackFrame$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self._async_evaluate0$_stack; - t1.push(new A._Record_2($async$self._async_evaluate0$_member, nodeWithSpan)); - oldMember = $async$self._async_evaluate0$_member; - $async$self._async_evaluate0$_member = member; - $async$goto = 3; - return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withStackFrame$1$3); - case 3: - // returning from await. - result = $async$result; - $async$self._async_evaluate0$_member = oldMember; - t1.pop(); - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_withStackFrame$1$3, $async$completer); - }, - _async_evaluate0$_withoutSlash$2(value, nodeForSpan) { - var t1; - if (value instanceof A.SassNumber0) - t1 = value.asSlash != null; - else - t1 = false; - if (t1) - this._async_evaluate0$_warn$3(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation2().call$1(value)) + string$.x0a_Morex20, nodeForSpan.get$span(nodeForSpan), B.Deprecation_q39); - return value.withoutSlash$0(); - }, - _async_evaluate0$_stackFrame$2(member, span) { - return A.frameForSpan0(span, member, A.NullableExtension_andThen0(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure2(this))); - }, - _async_evaluate0$_stackTrace$1(span) { - var t2, t3, _i, t4, nodeWithSpan, _this = this, - t1 = A._setArrayType([], type$.JSArray_Frame); - for (t2 = _this._async_evaluate0$_stack, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - t4 = t2[_i]; - nodeWithSpan = t4._1; - t1.push(_this._async_evaluate0$_stackFrame$2(t4._0, nodeWithSpan.get$span(nodeWithSpan))); - } - if (span != null) - t1.push(_this._async_evaluate0$_stackFrame$2(_this._async_evaluate0$_member, span)); - return A.Trace$(new A.ReversedListIterable(t1, type$.ReversedListIterable_Frame), null); - }, - _async_evaluate0$_stackTrace$0() { - return this._async_evaluate0$_stackTrace$1(null); - }, - _async_evaluate0$_warn$3(message, span, deprecation) { - var t1, trace, _this = this; - if (_this._async_evaluate0$_quietDeps) - if (!_this._async_evaluate0$_inDependency) { - t1 = _this._async_evaluate0$_currentCallable; - t1 = t1 == null ? null : t1.inDependency; - t1 = t1 === true; - } else - t1 = true; - else - t1 = false; - if (t1) - return; - if (!_this._async_evaluate0$_warningsEmitted.add$1(0, new A._Record_2(message, span))) - return; - trace = _this._async_evaluate0$_stackTrace$1(span); - t1 = _this._async_evaluate0$_logger; - if (deprecation == null) - t1.warn$3$span$trace(0, message, span, trace); - else - A.WarnForDeprecation_warnForDeprecation0(t1, deprecation, message, span, trace); - }, - _async_evaluate0$_warn$2(message, span) { - return this._async_evaluate0$_warn$3(message, span, null); - }, - _async_evaluate0$_exception$2(message, span) { - var t1, t2; - if (span == null) { - t1 = B.JSArray_methods.get$last(this._async_evaluate0$_stack)._1; - t1 = t1.get$span(t1); - } else - t1 = span; - t2 = this._async_evaluate0$_stackTrace$1(span); - return new A.SassRuntimeException0(t2, B.Set_empty, message, t1); - }, - _async_evaluate0$_exception$1(message) { - return this._async_evaluate0$_exception$2(message, null); - }, - _async_evaluate0$_multiSpanException$3(message, primaryLabel, secondaryLabels) { - var t1 = B.JSArray_methods.get$last(this._async_evaluate0$_stack)._1; - return A.MultiSpanSassRuntimeException$0(message, t1.get$span(t1), primaryLabel, secondaryLabels, this._async_evaluate0$_stackTrace$0(), null); - }, - _async_evaluate0$_addExceptionSpan$1$2(nodeWithSpan, callback) { - var error, stackTrace, t1, exception, - addStackFrame = true; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassScriptException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); - A.throwWithTrace0(t1.withTrace$1(this._async_evaluate0$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); - } else - throw exception; - } - }, - _async_evaluate0$_addExceptionSpan$2(nodeWithSpan, callback) { - return this._async_evaluate0$_addExceptionSpan$1$2(nodeWithSpan, callback, type$.dynamic); - }, - _async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame, $T) { - return this._addExceptionSpanAsync$body$_EvaluateVisitor0(nodeWithSpan, callback, addStackFrame, $T, $T); - }, - _async_evaluate0$_addExceptionSpanAsync$1$2(nodeWithSpan, callback, $T) { - return this._async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame(nodeWithSpan, callback, true, $T); - }, - _addExceptionSpanAsync$body$_EvaluateVisitor0(nodeWithSpan, callback, addStackFrame, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, $async$exception; - var $async$_async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$handler = 4; - t1 = callback.call$0(); - $async$goto = 7; - return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame); - case 7: - // returning from await. - t1 = $async$result; - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - $async$handler = 2; - // goto after finally - $async$goto = 6; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (t1 instanceof A.SassScriptException0) { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); - A.throwWithTrace0(t1.withTrace$1($async$self._async_evaluate0$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); - } else - throw $async$exception; - // goto after finally - $async$goto = 6; - break; - case 3: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 6: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame, $async$completer); - }, - _async_evaluate0$_addExceptionTrace$1$1(callback, $T) { - return this._addExceptionTrace$body$_EvaluateVisitor0(callback, $T, $T); - }, - _addExceptionTrace$body$_EvaluateVisitor0(callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, t2, $async$exception; - var $async$_async_evaluate0$_addExceptionTrace$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$handler = 4; - t1 = callback.call$0(); - $async$goto = 7; - return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate0$_addExceptionTrace$1$1); - case 7: - // returning from await. - t1 = $async$result; - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - $async$handler = 2; - // goto after finally - $async$goto = 6; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (type$.SassRuntimeException_2._is(t1)) - throw $async$exception; - else if (t1 instanceof A.SassException0) { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - t1 = error; - t2 = J.getInterceptor$z(t1); - A.throwWithTrace0(error.withTrace$1($async$self._async_evaluate0$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t2, t1))), error, stackTrace); - } else - throw $async$exception; - // goto after finally - $async$goto = 6; - break; - case 3: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 6: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_addExceptionTrace$1$1, $async$completer); - }, - _async_evaluate0$_addErrorSpan$1$2(nodeWithSpan, callback, $T) { - return this._addErrorSpan$body$_EvaluateVisitor0(nodeWithSpan, callback, $T, $T); - }, - _addErrorSpan$body$_EvaluateVisitor0(nodeWithSpan, callback, $T, $async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, error, stackTrace, t1, exception, t2, t3, $async$exception; - var $async$_async_evaluate0$_addErrorSpan$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$handler = 4; - $async$goto = 7; - return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_addErrorSpan$1$2); - case 7: - // returning from await. - t1 = $async$result; - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - $async$handler = 2; - // goto after finally - $async$goto = 6; - break; - case 4: - // catch - $async$handler = 3; - $async$exception = $async$currentError; - t1 = A.unwrapException($async$exception); - if (type$.SassRuntimeException_2._is(t1)) { - error = t1; - stackTrace = A.getTraceFromException($async$exception); - if (!B.JSString_methods.startsWith$1(J.get$span$z(error).get$text(), "@error")) - throw $async$exception; - t1 = error._span_exception$_message; - t2 = nodeWithSpan.get$span(nodeWithSpan); - t3 = $async$self._async_evaluate0$_stackTrace$0(); - A.throwWithTrace0(new A.SassRuntimeException0(t3, B.Set_empty, t1, t2), error, stackTrace); - } else - throw $async$exception; - // goto after finally - $async$goto = 6; - break; - case 3: - // uncaught - // goto rethrow - $async$goto = 2; - break; - case 6: - // after finally - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - case 2: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$_async_evaluate0$_addErrorSpan$1$2, $async$completer); - }, - _async_evaluate0$_getErrorMessage$1(error) { - var t1, exception; - if (type$.Error._is(error)) - return error.toString$0(0); - try { - t1 = A._asString(J.get$message$x(error)); - return t1; - } catch (exception) { - t1 = J.toString$0$(error); - return t1; - } - }, - $isExpressionVisitor: 1, - $isStatementVisitor: 1 - }; - A._EvaluateVisitor_closure38.prototype = { - call$1($arguments) { - var module, t2, - t1 = J.getInterceptor$asx($arguments), - variable = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this._async_evaluate0$_environment; - t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); - return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string0$_text) ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._EvaluateVisitor_closure39.prototype = { - call$1($arguments) { - var variable = J.$index$asx($arguments, 0).assertString$1("name"), - t1 = this.$this._async_evaluate0$_environment; - return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-")) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._EvaluateVisitor_closure40.prototype = { - call$1($arguments) { - var module, t2, t3, t4, - t1 = J.getInterceptor$asx($arguments), - variable = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this; - t2 = t1._async_evaluate0$_environment; - t3 = variable._string0$_text; - t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); - return t2.getFunction$2$namespace(t4, module == null ? null : module._string0$_text) != null || t1._async_evaluate0$_builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._EvaluateVisitor_closure41.prototype = { - call$1($arguments) { - var module, t2, - t1 = J.getInterceptor$asx($arguments), - variable = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this._async_evaluate0$_environment; - t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); - return t1.getMixin$2$namespace(t2, module == null ? null : module._string0$_text) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._EvaluateVisitor_closure42.prototype = { - call$1($arguments) { - var t1 = this.$this._async_evaluate0$_environment; - if (!t1._async_environment0$_inMixin) - throw A.wrapException(A.SassScriptException$0(string$.conten, null)); - return t1._async_environment0$_content != null ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._EvaluateVisitor_closure43.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, - module = this.$this._async_evaluate0$_environment._async_environment0$_modules.$index(0, t1); - if (module == null) - throw A.wrapException('There is no module with namespace "' + t1 + '".'); - t1 = type$.Value_2; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs0(module.get$variables(), type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString0(t4._0, true), t4._1); - } - return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 34 - }; - A._EvaluateVisitor_closure44.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, - module = this.$this._async_evaluate0$_environment._async_environment0$_modules.$index(0, t1); - if (module == null) - throw A.wrapException('There is no module with namespace "' + t1 + '".'); - t1 = type$.Value_2; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs0(module.get$functions(module), type$.String, type$.AsyncCallable_2), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString0(t4._0, true), new A.SassFunction0(t4._1)); - } - return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 34 - }; - A._EvaluateVisitor_closure45.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, - module = this.$this._async_evaluate0$_environment._async_environment0$_modules.$index(0, t1); - if (module == null) - throw A.wrapException('There is no module with namespace "' + t1 + '".'); - t1 = type$.Value_2; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs0(module.get$mixins(), type$.String, type$.AsyncCallable_2), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString0(t4._0, true), new A.SassMixin0(t4._1)); - } - return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 34 - }; - A._EvaluateVisitor_closure46.prototype = { - call$1($arguments) { - var module, t2, callable, - t1 = J.getInterceptor$asx($arguments), - $name = t1.$index($arguments, 0).assertString$1("name"), - css = t1.$index($arguments, 1).get$isTruthy(); - t1 = t1.$index($arguments, 2).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - if (css) { - if (module != null) - throw A.wrapException(string$.x24css_a); - return new A.SassFunction0(new A.PlainCssCallable0($name._string0$_text)); - } - t1 = this.$this; - t2 = t1._async_evaluate0$_callableNode; - t2.toString; - callable = t1._async_evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure14(t1, $name, module)); - if (callable == null) - throw A.wrapException("Function not found: " + $name.toString$0(0)); - return new A.SassFunction0(callable); - }, - $signature: 204 - }; - A._EvaluateVisitor__closure14.prototype = { - call$0() { - var local, - normalizedName = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), - t1 = this.module, - namespace = t1 == null ? null : t1._string0$_text; - t1 = this.$this; - local = t1._async_evaluate0$_environment.getFunction$2$namespace(normalizedName, namespace); - if (local != null || namespace != null) - return local; - return t1._async_evaluate0$_builtInFunctions.$index(0, normalizedName); - }, - $signature: 96 - }; - A._EvaluateVisitor_closure47.prototype = { - call$1($arguments) { - var module, t2, callable, - t1 = J.getInterceptor$asx($arguments), - $name = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this; - t2 = t1._async_evaluate0$_callableNode; - t2.toString; - callable = t1._async_evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure13(t1, $name, module)); - if (callable == null) - throw A.wrapException("Mixin not found: " + $name.toString$0(0)); - return new A.SassMixin0(callable); - }, - $signature: 205 - }; - A._EvaluateVisitor__closure13.prototype = { - call$0() { - var t1 = this.$this._async_evaluate0$_environment, - t2 = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), - t3 = this.module; - return t1.getMixin$2$namespace(t2, t3 == null ? null : t3._string0$_text); - }, - $signature: 96 - }; - A._EvaluateVisitor_closure48.prototype = { - call$1($arguments) { - return this.$call$body$_EvaluateVisitor_closure4($arguments); - }, - $call$body$_EvaluateVisitor_closure4($arguments) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, invocation, callableNode, t1, $function, args; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = J.getInterceptor$asx($arguments); - $function = t1.$index($arguments, 0); - args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); - t1 = $async$self.$this; - t2 = t1._async_evaluate0$_callableNode; - t2.toString; - t3 = A._setArrayType([], type$.JSArray_Expression_2); - t4 = type$.String; - t5 = type$.Expression_2; - t6 = t2.get$span(t2); - t7 = t2.get$span(t2); - args._argument_list$_wereKeywordsAccessed = true; - t8 = args._argument_list$_keywords; - if (t8.get$isEmpty(t8)) - t2 = null; - else { - t9 = type$.Value_2; - t10 = A.LinkedHashMap_LinkedHashMap$_empty(t9, t9); - for (args._argument_list$_wereKeywordsAccessed = true, t8 = A.MapExtensions_get_pairs0(t8, t4, t9), t8 = t8.get$iterator(t8); t8.moveNext$0();) { - t11 = t8.get$current(t8); - t10.$indexSet(0, new A.SassString0(t11._0, false), t11._1); - } - t2 = new A.ValueExpression0(new A.SassMap0(A.ConstantMap_ConstantMap$from(t10, t9, t9)), t2.get$span(t2)); - } - invocation = new A.ArgumentInvocation0(A.List_List$unmodifiable(t3, t5), A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t4, t5), new A.ValueExpression0(args, t7), t2, t6); - $async$goto = $function instanceof A.SassString0 ? 3 : 4; - break; - case 3: - // then - A.warnForDeprecation0(string$.Passina + $function.toString$0(0) + "))", B.Deprecation_U43); - callableNode = t1._async_evaluate0$_callableNode; - t2 = $function._string0$_text; - t3 = callableNode.get$span(callableNode); - t1 = t1.visitFunctionExpression$1(0, new A.FunctionExpression0(null, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, invocation, t3)); - $async$goto = 5; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$1); - case 5: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 4: - // join - t2 = $function.assertFunction$1("function"); - t3 = t1._async_evaluate0$_callableNode; - t3.toString; - $async$goto = 6; - return A._asyncAwait(t1._async_evaluate0$_runFunctionCallable$3(invocation, t2.callable, t3), $async$call$1); - case 6: - // returning from await. - t3 = $async$result; - $async$returnValue = t3; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 92 - }; - A._EvaluateVisitor_closure49.prototype = { - call$1($arguments) { - return this.$call$body$_EvaluateVisitor_closure3($arguments); - }, - $call$body$_EvaluateVisitor_closure3($arguments) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, withMap, t2, values, configuration, t3, t1, url; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = J.getInterceptor$asx($arguments); - url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string0$_text); - t1 = t1.$index($arguments, 1).get$realNull(); - withMap = t1 == null ? null : t1.assertMap$1("with")._map0$_contents; - t1 = $async$self.$this; - t2 = t1._async_evaluate0$_callableNode; - t2.toString; - if (withMap != null) { - values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); - withMap.forEach$1(0, new A._EvaluateVisitor__closure11(values, t2.get$span(t2), t2)); - configuration = new A.ExplicitConfiguration0(t2, values, null); - } else - configuration = B.Configuration_Map_empty_null0; - t3 = t2.get$span(t2); - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure12(t1), t3.get$sourceUrl(t3), configuration, true), $async$call$1); - case 2: - // returning from await. - t1._async_evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, true); - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 206 - }; - A._EvaluateVisitor__closure11.prototype = { - call$2(variable, value) { - var t1 = variable.assertString$1("with key"), - $name = A.stringReplaceAllUnchecked(t1._string0$_text, "_", "-"); - t1 = this.values; - if (t1.containsKey$1($name)) - throw A.wrapException("The variable $" + $name + " was configured twice."); - t1.$indexSet(0, $name, new A.ConfiguredValue0(value, this.span, this.callableNode)); - }, - $signature: 97 - }; - A._EvaluateVisitor__closure12.prototype = { - call$2(module, _) { - var t1 = this.$this; - return t1._async_evaluate0$_combineCss$2$clone(module, true).accept$1(t1); - }, - $signature: 331 - }; - A._EvaluateVisitor_closure50.prototype = { - call$1($arguments) { - return this.$call$body$_EvaluateVisitor_closure2($arguments); - }, - $call$body$_EvaluateVisitor_closure2($arguments) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, callableNode, t2, t3, t4, t5, t1, mixin, args; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = J.getInterceptor$asx($arguments); - mixin = t1.$index($arguments, 0); - args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); - t1 = $async$self.$this; - callableNode = t1._async_evaluate0$_callableNode; - t2 = callableNode.get$span(callableNode); - t3 = callableNode.get$span(callableNode); - t4 = type$.Expression_2; - t5 = A.List_List$unmodifiable(B.List_empty21, t4); - t4 = A.ConstantMap_ConstantMap$from(B.Map_empty14, type$.String, t4); - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate0$_applyMixin$5(mixin.assertMixin$1("mixin").callable, t1._async_evaluate0$_environment._async_environment0$_content, new A.ArgumentInvocation0(t5, t4, new A.ValueExpression0(args, t3), null, t2), callableNode, callableNode), $async$call$1); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 206 - }; - A._EvaluateVisitor_run_closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2), - $async$returnValue, $async$self = this, module, t2, t1, _0_0, url; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node; - _0_0 = t1.span.file.url; - url = null; - if (_0_0 != null) { - url = _0_0; - t2 = $async$self.$this; - t2._async_evaluate0$_activeModules.$indexSet(0, url, null); - if (!(t2._async_evaluate0$_nodeImporter != null && J.toString$0$(url) === "stdin")) - t2._async_evaluate0$_loadedUrls.add$1(0, url); - } - t2 = $async$self.$this; - $async$goto = 3; - return A._asyncAwait(t2._async_evaluate0$_addExceptionTrace$1$1(new A._EvaluateVisitor_run__closure2(t2, $async$self.importer, t1), type$.Module_AsyncCallable_2), $async$call$0); - case 3: - // returning from await. - module = $async$result; - $async$returnValue = new A._Record_2_loadedUrls_stylesheet(t2._async_evaluate0$_loadedUrls, t2._async_evaluate0$_combineCss$1(module)); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 332 - }; - A._EvaluateVisitor_run__closure2.prototype = { - call$0() { - return this.$this._async_evaluate0$_execute$2(this.importer, this.node); - }, - $signature: 333 - }; - A._EvaluateVisitor__loadModule_closure5.prototype = { - call$0() { - return this.callback.call$2(this._box_1.builtInModule, false); - }, - $signature: 0 - }; - A._EvaluateVisitor__loadModule_closure6.prototype = { - call$0() { - return this.$call$body$_EvaluateVisitor__loadModule_closure0(); - }, - $call$body$_EvaluateVisitor__loadModule_closure0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, canonicalUrl, oldInDependency, isDependency, t4, message, t1, stylesheet, importer, t2, t3, _1_0, $async$temp1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = {}; - stylesheet = null; - importer = null; - t2 = $async$self.$this; - t3 = $async$self.nodeWithSpan; - $async$goto = 2; - return A._asyncAwait(t2._async_evaluate0$_loadStylesheet$3$baseUrl($async$self.url.toString$0(0), t3.get$span(t3), $async$self.baseUrl), $async$call$0); - case 2: - // returning from await. - _1_0 = $async$result; - stylesheet = _1_0._0; - importer = _1_0._1; - isDependency = _1_0._2; - canonicalUrl = stylesheet.span.file.url; - if (canonicalUrl != null) { - t4 = t2._async_evaluate0$_activeModules; - if (t4.containsKey$1(canonicalUrl)) { - if ($async$self.namesInErrors) { - t1 = canonicalUrl; - t3 = $.$get$context(); - t1.toString; - message = "Module loop: " + t3.prettyUri$1(t1) + " is already being loaded."; - } else - message = string$.Modulel; - t1 = A.NullableExtension_andThen0(t4.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure5(t2, message)); - throw A.wrapException(t1 == null ? t2._async_evaluate0$_exception$1(message) : t1); - } else - t4.$indexSet(0, canonicalUrl, t3); - } - t4 = t2._async_evaluate0$_modules.containsKey$1(canonicalUrl); - oldInDependency = t2._async_evaluate0$_inDependency; - t2._async_evaluate0$_inDependency = isDependency; - t1.module = null; - $async$handler = 3; - $async$temp1 = t1; - $async$goto = 6; - return A._asyncAwait(t2._async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, $async$self.configuration, $async$self.namesInErrors, t3), $async$call$0); - case 6: - // returning from await. - $async$temp1.module = $async$result; - $async$next.push(5); - // goto finally - $async$goto = 4; - break; - case 3: - // uncaught - $async$next = [1]; - case 4: - // finally - $async$handler = 1; - t2._async_evaluate0$_activeModules.remove$1(0, canonicalUrl); - t2._async_evaluate0$_inDependency = oldInDependency; - // goto the next finally handler - $async$goto = $async$next.pop(); - break; - case 5: - // after finally - $async$goto = 7; - return A._asyncAwait(t2._async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame(t3, new A._EvaluateVisitor__loadModule__closure6(t1, $async$self.callback, !t4), false, type$.void), $async$call$0); - case 7: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - case 1: - // rethrow - return A._asyncRethrow($async$currentError, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor__loadModule__closure5.prototype = { - call$1(previousLoad) { - return this.$this._async_evaluate0$_multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); - }, - $signature: 98 - }; - A._EvaluateVisitor__loadModule__closure6.prototype = { - call$0() { - return this.callback.call$2(this._box_0.module, this.firstLoad); - }, - $signature: 0 - }; - A._EvaluateVisitor__execute_closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t3, t4, t5, t6, t1, oldImporter, oldStylesheet, oldRoot, oldPreModuleComments, oldParent, oldEndOfImports, oldOutOfOrderImports, oldExtensionStore, t2, oldStyleRule, oldMediaQueries, oldDeclarationName, oldInUnknownAtRule, oldInKeyframes, oldConfiguration; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - oldImporter = t1._async_evaluate0$_importer; - oldStylesheet = t1._async_evaluate0$__stylesheet; - oldRoot = t1._async_evaluate0$__root; - oldPreModuleComments = t1._async_evaluate0$_preModuleComments; - oldParent = t1._async_evaluate0$__parent; - oldEndOfImports = t1._async_evaluate0$__endOfImports; - oldOutOfOrderImports = t1._async_evaluate0$_outOfOrderImports; - oldExtensionStore = t1._async_evaluate0$__extensionStore; - t2 = t1._async_evaluate0$_atRootExcludingStyleRule; - oldStyleRule = t2 ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; - oldMediaQueries = t1._async_evaluate0$_mediaQueries; - oldDeclarationName = t1._async_evaluate0$_declarationName; - oldInUnknownAtRule = t1._async_evaluate0$_inUnknownAtRule; - oldInKeyframes = t1._async_evaluate0$_inKeyframes; - oldConfiguration = t1._async_evaluate0$_configuration; - t1._async_evaluate0$_importer = $async$self.importer; - t3 = t1._async_evaluate0$__stylesheet = $async$self.stylesheet; - t4 = t3.span; - t5 = t1._async_evaluate0$__parent = t1._async_evaluate0$__root = A.ModifiableCssStylesheet$0(t4); - t1._async_evaluate0$__endOfImports = 0; - t1._async_evaluate0$_outOfOrderImports = null; - t1._async_evaluate0$__extensionStore = $async$self.extensionStore; - t1._async_evaluate0$_declarationName = t1._async_evaluate0$_mediaQueries = t1._async_evaluate0$_styleRuleIgnoringAtRoot = null; - t1._async_evaluate0$_inKeyframes = t1._async_evaluate0$_atRootExcludingStyleRule = t1._async_evaluate0$_inUnknownAtRule = false; - t6 = $async$self.configuration; - if (t6 != null) - t1._async_evaluate0$_configuration = t6; - $async$goto = 2; - return A._asyncAwait(t1.visitStylesheet$1(0, t3), $async$call$0); - case 2: - // returning from await. - t3 = t1._async_evaluate0$_outOfOrderImports == null ? t5 : new A.CssStylesheet0(new A.UnmodifiableListView(t1._async_evaluate0$_addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode_2), t4); - $async$self.css.__late_helper$_value = t3; - $async$self.preModuleComments.__late_helper$_value = t1._async_evaluate0$_preModuleComments; - t1._async_evaluate0$_importer = oldImporter; - t1._async_evaluate0$__stylesheet = oldStylesheet; - t1._async_evaluate0$__root = oldRoot; - t1._async_evaluate0$_preModuleComments = oldPreModuleComments; - t1._async_evaluate0$__parent = oldParent; - t1._async_evaluate0$__endOfImports = oldEndOfImports; - t1._async_evaluate0$_outOfOrderImports = oldOutOfOrderImports; - t1._async_evaluate0$__extensionStore = oldExtensionStore; - t1._async_evaluate0$_styleRuleIgnoringAtRoot = oldStyleRule; - t1._async_evaluate0$_mediaQueries = oldMediaQueries; - t1._async_evaluate0$_declarationName = oldDeclarationName; - t1._async_evaluate0$_inUnknownAtRule = oldInUnknownAtRule; - t1._async_evaluate0$_atRootExcludingStyleRule = t2; - t1._async_evaluate0$_inKeyframes = oldInKeyframes; - t1._async_evaluate0$_configuration = oldConfiguration; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor__combineCss_closure5.prototype = { - call$1(module) { - return module.get$transitivelyContainsCss(); - }, - $signature: 117 - }; - A._EvaluateVisitor__combineCss_closure6.prototype = { - call$1(target) { - return !this.selectors.contains$1(0, target); - }, - $signature: 14 - }; - A._EvaluateVisitor__combineCss_visitModule2.prototype = { - call$1(module) { - var t1, t2, t3, t4, _i, upstream, _1_0, statements, index, _this = this; - if (!_this.seen.add$1(0, module)) - return; - if (_this.clone) - module = module.cloneCss$0(); - for (t1 = module.get$upstream(), t2 = t1.length, t3 = _this.css, t4 = _this.imports, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - upstream = t1[_i]; - if (upstream.get$transitivelyContainsCss()) { - _1_0 = module.get$preModuleComments().$index(0, upstream); - if (_1_0 != null) - B.JSArray_methods.addAll$1(t3.length === 0 ? t4 : t3, _1_0); - _this.call$1(upstream); - } - } - _this.sorted.addFirst$1(module); - t1 = module.get$css(module); - statements = t1.get$children(t1); - index = _this.$this._async_evaluate0$_indexAfterImports$1(statements); - t1 = J.getInterceptor$ax(statements); - B.JSArray_methods.addAll$1(t4, t1.getRange$2(statements, 0, index)); - B.JSArray_methods.addAll$1(t3, t1.getRange$2(statements, index, t1.get$length(statements))); - }, - $signature: 335 - }; - A._EvaluateVisitor__extendModules_closure5.prototype = { - call$1(target) { - return !this.originalSelectors.contains$1(0, target); - }, - $signature: 14 - }; - A._EvaluateVisitor__extendModules_closure6.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_ExtensionStore_2); - }, - $signature: 215 - }; - A._EvaluateVisitor_visitAtRootRule_closure5.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitAtRootRule_closure6.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A._EvaluateVisitor__scopeForAtRoot_closure17.prototype = { - call$1(callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__parent, "__parent"); - t1._async_evaluate0$__parent = $async$self.newParent; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate0$_environment.scope$1$2$when(callback, $async$self.node.hasDeclarations, type$.void), $async$call$1); - case 2: - // returning from await. - t1._async_evaluate0$__parent = t2; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 40 - }; - A._EvaluateVisitor__scopeForAtRoot_closure18.prototype = { - call$1(callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, oldAtRootExcludingStyleRule; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - oldAtRootExcludingStyleRule = t1._async_evaluate0$_atRootExcludingStyleRule; - t1._async_evaluate0$_atRootExcludingStyleRule = true; - $async$goto = 2; - return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); - case 2: - // returning from await. - t1._async_evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 40 - }; - A._EvaluateVisitor__scopeForAtRoot_closure19.prototype = { - call$1(callback) { - return this.$this._async_evaluate0$_withMediaQueries$1$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure2(this.innerScope, callback), type$.Null); - }, - $signature: 40 - }; - A._EvaluateVisitor__scopeForAtRoot__closure2.prototype = { - call$0() { - return this.innerScope.call$1(this.callback); - }, - $signature: 2 - }; - A._EvaluateVisitor__scopeForAtRoot_closure20.prototype = { - call$1(callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, wasInKeyframes; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - wasInKeyframes = t1._async_evaluate0$_inKeyframes; - t1._async_evaluate0$_inKeyframes = false; - $async$goto = 2; - return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); - case 2: - // returning from await. - t1._async_evaluate0$_inKeyframes = wasInKeyframes; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 40 - }; - A._EvaluateVisitor__scopeForAtRoot_closure21.prototype = { - call$1($parent) { - return $parent instanceof A.ModifiableCssAtRule0; - }, - $signature: 207 - }; - A._EvaluateVisitor__scopeForAtRoot_closure22.prototype = { - call$1(callback) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, wasInUnknownAtRule; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - wasInUnknownAtRule = t1._async_evaluate0$_inUnknownAtRule; - t1._async_evaluate0$_inUnknownAtRule = false; - $async$goto = 2; - return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); - case 2: - // returning from await. - t1._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 40 - }; - A._EvaluateVisitor_visitContentRule_closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$returnValue, $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.content.declaration.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - $async$goto = 6; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 6: - // returning from await. - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitDeclaration_closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self._box_0.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitEachRule_closure8.prototype = { - call$1(value) { - var t1 = this.$this, - t2 = this.nodeWithSpan; - return t1._async_evaluate0$_environment.setLocalVariable$3(this._box_0.variable, t1._async_evaluate0$_withoutSlash$2(value, t2), t2); - }, - $signature: 64 - }; - A._EvaluateVisitor_visitEachRule_closure9.prototype = { - call$1(value) { - return this.$this._async_evaluate0$_setMultipleVariables$3(this._box_0.variables, value, this.nodeWithSpan); - }, - $signature: 64 - }; - A._EvaluateVisitor_visitEachRule_closure10.prototype = { - call$0() { - var _this = this, - t1 = _this.$this; - return t1._async_evaluate0$_handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure2(t1, _this.setVariables, _this.node)); - }, - $signature: 78 - }; - A._EvaluateVisitor_visitEachRule__closure2.prototype = { - call$1(element) { - var t1; - this.setVariables.call$1(element); - t1 = this.$this; - return t1._async_evaluate0$_handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure2(t1)); - }, - $signature: 340 - }; - A._EvaluateVisitor_visitEachRule___closure2.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 101 - }; - A._EvaluateVisitor_visitAtRule_closure8.prototype = { - call$1(value) { - return this.$this._async_evaluate0$_interpolationToValue$3$trim$warnForColor(value, true, true); - }, - $signature: 342 - }; - A._EvaluateVisitor_visitAtRule_closure9.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t2, t3, _i, t1, styleRule; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - styleRule = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; - $async$goto = styleRule == null || t1._async_evaluate0$_inKeyframes || J.$eq$($async$self.name.value, "font-face") ? 2 : 4; - break; - case 2: - // then - t2 = $async$self.children, t3 = t2.length, _i = 0; - case 5: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 7; - break; - } - $async$goto = 8; - return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); - case 8: - // returning from await. - case 6: - // for update - ++_i; - // goto for condition - $async$goto = 5; - break; - case 7: - // after for - // goto join - $async$goto = 3; - break; - case 4: - // else - $async$goto = 9; - return A._asyncAwait(t1._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(styleRule._style_rule0$_selector, styleRule.span, false, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure2(t1, $async$self.children), false, type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); - case 9: - // returning from await. - case 3: - // join - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitAtRule__closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitAtRule_closure10.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitForRule_closure14.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber_2), - $async$returnValue, $async$self = this; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self.node.from.accept$1($async$self.$this), $async$call$0); - case 3: - // returning from await. - $async$returnValue = $async$result.assertNumber$0(); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 209 - }; - A._EvaluateVisitor_visitForRule_closure15.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber_2), - $async$returnValue, $async$self = this; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait($async$self.node.to.accept$1($async$self.$this), $async$call$0); - case 3: - // returning from await. - $async$returnValue = $async$result.assertNumber$0(); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 209 - }; - A._EvaluateVisitor_visitForRule_closure16.prototype = { - call$0() { - return this.fromNumber.assertInt$0(); - }, - $signature: 10 - }; - A._EvaluateVisitor_visitForRule_closure17.prototype = { - call$0() { - var t1 = this.fromNumber; - return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); - }, - $signature: 10 - }; - A._EvaluateVisitor_visitForRule_closure18.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, i, t3, t4, t5, t6, t7, t8, _0_0, t1, t2, nodeWithSpan; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self.node; - nodeWithSpan = t1._async_evaluate0$_expressionNode$1(t2.from); - i = $async$self.from, t3 = $async$self._box_0, t4 = $async$self.direction, t5 = t2.variable, t6 = $async$self.fromNumber, t2 = t2.children; - case 3: - // for condition - if (!(i !== t3.to)) { - // goto after for - $async$goto = 5; - break; - } - t7 = t1._async_evaluate0$_environment; - t8 = t6.get$numeratorUnits(t6); - t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits0(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); - $async$goto = 6; - return A._asyncAwait(t1._async_evaluate0$_handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure2(t1)), $async$call$0); - case 6: - // returning from await. - _0_0 = $async$result; - if (_0_0 != null) { - $async$returnValue = _0_0; - // goto return - $async$goto = 1; - break; - } - case 4: - // for update - i += t4; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 78 - }; - A._EvaluateVisitor_visitForRule__closure2.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 101 - }; - A._EvaluateVisitor_visitForwardRule_closure5.prototype = { - call$2(module, firstLoad) { - if (firstLoad) - this.$this._async_evaluate0$_registerCommentsForModule$1(module); - this.$this._async_evaluate0$_environment.forwardModule$2(module, this.node); - }, - $signature: 114 - }; - A._EvaluateVisitor_visitForwardRule_closure6.prototype = { - call$2(module, firstLoad) { - if (firstLoad) - this.$this._async_evaluate0$_registerCommentsForModule$1(module); - this.$this._async_evaluate0$_environment.forwardModule$2(module, this.node); - }, - $signature: 114 - }; - A._EvaluateVisitor__registerCommentsForModule_closure2.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_CssComment_2); - }, - $signature: 210 - }; - A._EvaluateVisitor_visitIfRule_closure2.prototype = { - call$1(clause) { - var t1 = this.$this; - return t1._async_evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule__closure2(t1, clause), true, clause.hasDeclarations, type$.nullable_Value_2); - }, - $signature: 347 - }; - A._EvaluateVisitor_visitIfRule__closure2.prototype = { - call$0() { - var t1 = this.$this; - return t1._async_evaluate0$_handleReturn$2(this.clause.children, new A._EvaluateVisitor_visitIfRule___closure2(t1)); - }, - $signature: 78 - }; - A._EvaluateVisitor_visitIfRule___closure2.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 101 - }; - A._EvaluateVisitor__visitDynamicImport_closure2.prototype = { - call$0() { - return this.$call$body$_EvaluateVisitor__visitDynamicImport_closure0(); - }, - $call$body$_EvaluateVisitor__visitDynamicImport_closure0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$returnValue, $async$self = this, t1, t2, _0_0, stylesheet, importer, isDependency, url, t3, oldImporter, oldInDependency, loadsUserDefinedModules, children, t4, t5, t6, t7, t8, t9, t10, environment, module, visitor, _box_0; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - _box_0 = {}; - _box_0.isDependency = _box_0.importer = _box_0.stylesheet = null; - t1 = $async$self.$this; - t2 = $async$self.$import; - $async$goto = 3; - return A._asyncAwait(t1._async_evaluate0$_loadStylesheet$3$forImport(t2.urlString, t2.span, true), $async$call$0); - case 3: - // returning from await. - _0_0 = $async$result; - stylesheet = _box_0.stylesheet = _0_0._0; - importer = _0_0._1; - _box_0.importer = importer; - isDependency = _0_0._2; - _box_0.isDependency = isDependency; - url = stylesheet.span.file.url; - if (url != null) { - t3 = t1._async_evaluate0$_activeModules; - if (t3.containsKey$1(url)) { - t2 = A.NullableExtension_andThen0(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure11(t1)); - throw A.wrapException(t2 == null ? t1._async_evaluate0$_exception$1("This file is already being loaded.") : t2); - } - t3.$indexSet(0, url, t2); - } - t2 = stylesheet._stylesheet1$_uses; - t3 = type$.UnmodifiableListView_UseRule_2; - $async$goto = new A.UnmodifiableListView(t2, t3).get$length(0) === 0 && new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2).get$length(0) === 0 ? 4 : 5; - break; - case 4: - // then - oldImporter = t1._async_evaluate0$_importer; - t2 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__stylesheet, "_stylesheet"); - oldInDependency = t1._async_evaluate0$_inDependency; - t1._async_evaluate0$_importer = importer; - t1._async_evaluate0$__stylesheet = stylesheet; - t1._async_evaluate0$_inDependency = isDependency; - $async$goto = 6; - return A._asyncAwait(t1.visitStylesheet$1(0, stylesheet), $async$call$0); - case 6: - // returning from await. - t1._async_evaluate0$_importer = oldImporter; - t1._async_evaluate0$__stylesheet = t2; - t1._async_evaluate0$_inDependency = oldInDependency; - t1._async_evaluate0$_activeModules.remove$1(0, url); - // goto return - $async$goto = 1; - break; - case 5: - // join - t2 = new A.UnmodifiableListView(t2, t3); - if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure12())) { - t2 = new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); - loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure13()); - } else - loadsUserDefinedModules = true; - children = A._Cell$(); - t2 = t1._async_evaluate0$_environment; - t3 = type$.String; - t4 = type$.Module_AsyncCallable_2; - t5 = type$.AstNode_2; - t6 = A._setArrayType([], type$.JSArray_Module_AsyncCallable_2); - t7 = t2._async_environment0$_variables; - t7 = A._setArrayType(t7.slice(0), A._arrayInstanceType(t7)); - t8 = t2._async_environment0$_variableNodes; - t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); - t9 = t2._async_environment0$_functions; - t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); - t10 = t2._async_environment0$_mixins; - t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); - environment = A.AsyncEnvironment$_0(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._async_environment0$_importedModules, null, null, t6, t7, t8, t9, t10, t2._async_environment0$_content); - $async$goto = 7; - return A._asyncAwait(t1._async_evaluate0$_withEnvironment$1$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure14(_box_0, t1, loadsUserDefinedModules, environment, children), type$.Null), $async$call$0); - case 7: - // returning from await. - module = environment.toDummyModule$0(); - t1._async_evaluate0$_environment.importForwards$1(module); - $async$goto = loadsUserDefinedModules ? 8 : 9; - break; - case 8: - // then - $async$goto = module.transitivelyContainsCss ? 10 : 11; - break; - case 10: - // then - $async$goto = 12; - return A._asyncAwait(t1._async_evaluate0$_combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1), $async$call$0); - case 12: - // returning from await. - case 11: - // join - visitor = new A._ImportedCssVisitor2(t1); - for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) - t2.get$current(t2).accept$1(visitor); - case 9: - // join - t1._async_evaluate0$_activeModules.remove$1(0, url); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A._EvaluateVisitor__visitDynamicImport__closure11.prototype = { - call$1(previousLoad) { - return this.$this._async_evaluate0$_multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); - }, - $signature: 98 - }; - A._EvaluateVisitor__visitDynamicImport__closure12.prototype = { - call$1(rule) { - return rule.url.get$scheme() !== "sass"; - }, - $signature: 211 - }; - A._EvaluateVisitor__visitDynamicImport__closure13.prototype = { - call$1(rule) { - return rule.url.get$scheme() !== "sass"; - }, - $signature: 212 - }; - A._EvaluateVisitor__visitDynamicImport__closure14.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t7, t8, t1, oldImporter, t2, t3, t4, t5, oldOutOfOrderImports, oldConfiguration, oldInDependency, t6; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - oldImporter = t1._async_evaluate0$_importer; - t2 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__stylesheet, "_stylesheet"); - t3 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__root, "_root"); - t4 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__parent, "__parent"); - t5 = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__endOfImports, "_endOfImports"); - oldOutOfOrderImports = t1._async_evaluate0$_outOfOrderImports; - oldConfiguration = t1._async_evaluate0$_configuration; - oldInDependency = t1._async_evaluate0$_inDependency; - t6 = $async$self._box_0; - t1._async_evaluate0$_importer = t6.importer; - t7 = t6.stylesheet; - t1._async_evaluate0$__stylesheet = t7; - t8 = $async$self.loadsUserDefinedModules; - if (t8) { - t7 = A.ModifiableCssStylesheet$0(t7.span); - t1._async_evaluate0$__root = t7; - t1._async_evaluate0$__parent = t1._async_evaluate0$_assertInModule$2(t7, "_root"); - t1._async_evaluate0$__endOfImports = 0; - t1._async_evaluate0$_outOfOrderImports = null; - } - t1._async_evaluate0$_inDependency = t6.isDependency; - t7 = new A.UnmodifiableListView(t6.stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); - if (!t7.get$isEmpty(t7)) - t1._async_evaluate0$_configuration = $async$self.environment.toImplicitConfiguration$0(); - $async$goto = 2; - return A._asyncAwait(t1.visitStylesheet$1(0, t6.stylesheet), $async$call$0); - case 2: - // returning from await. - t6 = t8 ? t1._async_evaluate0$_addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode_2); - $async$self.children.__late_helper$_value = t6; - t1._async_evaluate0$_importer = oldImporter; - t1._async_evaluate0$__stylesheet = t2; - if (t8) { - t1._async_evaluate0$__root = t3; - t1._async_evaluate0$__parent = t4; - t1._async_evaluate0$__endOfImports = t5; - t1._async_evaluate0$_outOfOrderImports = oldOutOfOrderImports; - } - t1._async_evaluate0$_configuration = oldConfiguration; - t1._async_evaluate0$_inDependency = oldInDependency; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor__applyMixin_closure5.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate0$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin__closure6(t1, $async$self.$arguments, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A._EvaluateVisitor__applyMixin__closure6.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 2; - return A._asyncAwait($async$self.$this._async_evaluate0$_runBuiltInCallable$3($async$self.$arguments, $async$self.mixin, $async$self.nodeWithSpanWithoutContent), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A._EvaluateVisitor__applyMixin_closure6.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate0$_environment.withContent$2($async$self.contentCallable, new A._EvaluateVisitor__applyMixin__closure5(t1, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor__applyMixin__closure5.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate0$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin___closure2(t1, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A._EvaluateVisitor__applyMixin___closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1, t2, t3, t4, t5, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.mixin.declaration.children, t2 = t1.length, t3 = $async$self.$this, t4 = $async$self.nodeWithSpanWithoutContent, t5 = type$.nullable_Value_2, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t3._async_evaluate0$_addErrorSpan$1$2(t4, new A._EvaluateVisitor__applyMixin____closure2(t3, t1[_i]), t5), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 31 - }; - A._EvaluateVisitor__applyMixin____closure2.prototype = { - call$0() { - return this.statement.accept$1(this.$this); - }, - $signature: 78 - }; - A._EvaluateVisitor_visitIncludeRule_closure8.prototype = { - call$0() { - var t1 = this.node; - return this.$this._async_evaluate0$_environment.getMixin$2$namespace(t1.name, t1.namespace); - }, - $signature: 96 - }; - A._EvaluateVisitor_visitIncludeRule_closure9.prototype = { - call$1($content) { - var t1 = this.$this; - return new A.UserDefinedCallable0($content, t1._async_evaluate0$_environment.closure$0(), t1._async_evaluate0$_inDependency, type$.UserDefinedCallable_AsyncEnvironment_2); - }, - $signature: 350 - }; - A._EvaluateVisitor_visitIncludeRule_closure10.prototype = { - call$0() { - return this.node.get$spanWithoutContent(); - }, - $signature: 27 - }; - A._EvaluateVisitor_visitMediaRule_closure8.prototype = { - call$1(mediaQueries) { - return this.$this._async_evaluate0$_mergeMediaQueries$2(mediaQueries, this.queries); - }, - $signature: 104 - }; - A._EvaluateVisitor_visitMediaRule_closure9.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self.mergedQueries; - if (t2 == null) - t2 = $async$self.queries; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate0$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitMediaRule__closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t2, t3, _i, t1, _0_0; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - _0_0 = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; - $async$goto = _0_0 != null ? 2 : 4; - break; - case 2: - // then - $async$goto = 5; - return A._asyncAwait(t1._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure2(t1, $async$self.node), false, type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); - case 5: - // returning from await. - // goto join - $async$goto = 3; - break; - case 4: - // else - t2 = $async$self.node.children, t3 = t2.length, _i = 0; - case 6: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 8; - break; - } - $async$goto = 9; - return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); - case 9: - // returning from await. - case 7: - // for update - ++_i; - // goto for condition - $async$goto = 6; - break; - case 8: - // after for - case 3: - // join - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitMediaRule___closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitMediaRule_closure10.prototype = { - call$1(node) { - var t1; - if (!(node instanceof A.ModifiableCssStyleRule0)) { - t1 = this.mergedSources; - t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule0 && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); - } else - t1 = true; - return t1; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitStyleRule_closure11.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitStyleRule_closure12.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitStyleRule_closure14.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate0$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitStyleRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitStyleRule__closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitStyleRule_closure13.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor__warnForBogusCombinators_closure2.prototype = { - call$1(child) { - return child instanceof A.ModifiableCssComment0; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitSupportsRule_closure5.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t2, t3, _i, t1, _0_0; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - _0_0 = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; - $async$goto = _0_0 != null ? 2 : 4; - break; - case 2: - // then - $async$goto = 5; - return A._asyncAwait(t1._async_evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure2(t1, $async$self.node), type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); - case 5: - // returning from await. - // goto join - $async$goto = 3; - break; - case 4: - // else - t2 = $async$self.node.children, t3 = t2.length, _i = 0; - case 6: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 8; - break; - } - $async$goto = 9; - return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); - case 9: - // returning from await. - case 7: - // for update - ++_i; - // goto for condition - $async$goto = 6; - break; - case 8: - // after for - case 3: - // join - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitSupportsRule__closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, _i; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 5; - return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); - case 5: - // returning from await. - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitSupportsRule_closure6.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor__visitSupportsCondition_closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.String), - $async$returnValue, $async$self = this, t1, t2, t3, t4, $async$temp1, $async$temp2; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self._box_0; - $async$temp1 = A; - $async$goto = 3; - return A._asyncAwait(t1._async_evaluate0$_evaluateToCss$1(t2.declaration.name), $async$call$0); - case 3: - // returning from await. - t3 = $async$temp1.S($async$result); - t4 = t2.declaration.get$isCustomProperty() ? "" : " "; - $async$temp1 = "(" + t3 + ":" + t4; - $async$temp2 = A; - $async$goto = 4; - return A._asyncAwait(t1._async_evaluate0$_evaluateToCss$1(t2.declaration.value), $async$call$0); - case 4: - // returning from await. - $async$returnValue = $async$temp1 + $async$temp2.S($async$result) + ")"; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 179 - }; - A._EvaluateVisitor_visitVariableDeclaration_closure8.prototype = { - call$0() { - var t1 = this.$this._async_evaluate0$_environment, - t2 = this._box_0.override; - t1.setVariable$4$global(this.node.name, t2.value, t2.assignmentNode, true); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitVariableDeclaration_closure9.prototype = { - call$0() { - var t1 = this.node; - return this.$this._async_evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); - }, - $signature: 43 - }; - A._EvaluateVisitor_visitVariableDeclaration_closure10.prototype = { - call$0() { - var t1 = this.$this, - t2 = this.node; - t1._async_evaluate0$_environment.setVariable$5$global$namespace(t2.name, this.value, t1._async_evaluate0$_expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitUseRule_closure2.prototype = { - call$2(module, firstLoad) { - var t1, t2, t3, _0_0, t4, t5, span; - if (firstLoad) - this.$this._async_evaluate0$_registerCommentsForModule$1(module); - t1 = this.$this._async_evaluate0$_environment; - t2 = this.node; - t3 = t2.namespace; - if (t3 == null) { - t1._async_environment0$_globalModules.$indexSet(0, module, t2); - t1._async_environment0$_allModules.push(module); - _0_0 = A.IterableExtension_firstWhereOrNull(J.get$keys$z(B.JSArray_methods.get$first(t1._async_environment0$_variables)), module.get$variables().get$containsKey()); - if (_0_0 != null) - A.throwExpression(A.SassScriptException$0(string$.This_ma + _0_0 + '".', null)); - } else { - t4 = t1._async_environment0$_modules; - if (t4.containsKey$1(t3)) { - t5 = t1._async_environment0$_namespaceNodes.$index(0, t3); - span = t5 == null ? null : t5.span; - t5 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - if (span != null) - t5.$indexSet(0, span, "original @use"); - A.throwExpression(A.MultiSpanSassScriptException$0(string$.There_ + t3 + '".', "new @use", t5)); - } - t4.$indexSet(0, t3, module); - t1._async_environment0$_namespaceNodes.$indexSet(0, t3, t2); - t1._async_environment0$_allModules.push(module); - } - }, - $signature: 114 - }; - A._EvaluateVisitor_visitWarnRule_closure2.prototype = { - call$0() { - return this.node.expression.accept$1(this.$this); - }, - $signature: 79 - }; - A._EvaluateVisitor_visitWhileRule_closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), - $async$returnValue, $async$self = this, t1, t2, t3, _0_0; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node, t2 = t1.condition, t3 = $async$self.$this, t1 = t1.children; - case 3: - // for condition - $async$goto = 5; - return A._asyncAwait(t2.accept$1(t3), $async$call$0); - case 5: - // returning from await. - if (!$async$result.get$isTruthy()) { - // goto after for - $async$goto = 4; - break; - } - $async$goto = 6; - return A._asyncAwait(t3._async_evaluate0$_handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure2(t3)), $async$call$0); - case 6: - // returning from await. - _0_0 = $async$result; - if (_0_0 != null) { - $async$returnValue = _0_0; - // goto return - $async$goto = 1; - break; - } - // goto for condition - $async$goto = 3; - break; - case 4: - // after for - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 78 - }; - A._EvaluateVisitor_visitWhileRule__closure2.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 101 - }; - A._EvaluateVisitor_visitBinaryOperationExpression_closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, t3, t1, t2, left, $async$temp1, $async$temp2; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node; - t2 = $async$self.$this; - $async$goto = 3; - return A._asyncAwait(t1.left.accept$1(t2), $async$call$0); - case 3: - // returning from await. - left = $async$result; - case 4: - // switch - switch (t1.operator) { - case B.BinaryOperator_wdM0: - // goto case - $async$goto = 6; - break; - case B.BinaryOperator_qNM0: - // goto case - $async$goto = 7; - break; - case B.BinaryOperator_eDt0: - // goto case - $async$goto = 8; - break; - case B.BinaryOperator_g8k0: - // goto case - $async$goto = 9; - break; - case B.BinaryOperator_icU0: - // goto case - $async$goto = 10; - break; - case B.BinaryOperator_bEa0: - // goto case - $async$goto = 11; - break; - case B.BinaryOperator_oEm0: - // goto case - $async$goto = 12; - break; - case B.BinaryOperator_miq0: - // goto case - $async$goto = 13; - break; - case B.BinaryOperator_SPQ0: - // goto case - $async$goto = 14; - break; - case B.BinaryOperator_u150: - // goto case - $async$goto = 15; - break; - case B.BinaryOperator_SjO0: - // goto case - $async$goto = 16; - break; - case B.BinaryOperator_2No0: - // goto case - $async$goto = 17; - break; - case B.BinaryOperator_U770: - // goto case - $async$goto = 18; - break; - case B.BinaryOperator_KNx0: - // goto case - $async$goto = 19; - break; - default: - // goto default - $async$goto = 20; - break; - } - break; - case 6: - // case - t1 = t1.right.accept$1(t2); - $async$goto = 21; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); - case 21: - // returning from await. - t1 = $async$result; - t1 = new A.SassString0(A.serializeValue0(left, false, true) + "=" + A.serializeValue0(t1, false, true), false); - // goto after switch - $async$goto = 5; - break; - case 7: - // case - $async$goto = left.get$isTruthy() ? 22 : 24; - break; - case 22: - // then - t1 = left; - // goto join - $async$goto = 23; - break; - case 24: - // else - t1 = t1.right.accept$1(t2); - $async$goto = 25; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); - case 25: - // returning from await. - t1 = $async$result; - case 23: - // join - // goto after switch - $async$goto = 5; - break; - case 8: - // case - $async$goto = left.get$isTruthy() ? 26 : 28; - break; - case 26: - // then - t1 = t1.right.accept$1(t2); - $async$goto = 29; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); - case 29: - // returning from await. - t1 = $async$result; - // goto join - $async$goto = 27; - break; - case 28: - // else - t1 = left; - case 27: - // join - // goto after switch - $async$goto = 5; - break; - case 9: - // case - $async$temp1 = left; - $async$goto = 30; - return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); - case 30: - // returning from await. - t1 = $async$temp1.$eq(0, $async$result) ? B.SassBoolean_true0 : B.SassBoolean_false0; - // goto after switch - $async$goto = 5; - break; - case 10: - // case - $async$temp1 = left; - $async$goto = 31; - return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); - case 31: - // returning from await. - t1 = !$async$temp1.$eq(0, $async$result) ? B.SassBoolean_true0 : B.SassBoolean_false0; - // goto after switch - $async$goto = 5; - break; - case 11: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 32; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); - case 32: - // returning from await. - t1 = $async$temp1.greaterThan$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 12: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 33; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); - case 33: - // returning from await. - t1 = $async$temp1.greaterThanOrEquals$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 13: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 34; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); - case 34: - // returning from await. - t1 = $async$temp1.lessThan$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 14: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 35; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); - case 35: - // returning from await. - t1 = $async$temp1.lessThanOrEquals$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 15: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 36; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); - case 36: - // returning from await. - t1 = $async$temp1.plus$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 16: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 37; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); - case 37: - // returning from await. - t1 = $async$temp1.minus$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 17: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 38; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); - case 38: - // returning from await. - t1 = $async$temp1.times$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 18: - // case - t3 = t1.right.accept$1(t2); - $async$temp1 = t2; - $async$temp2 = left; - $async$goto = 39; - return A._asyncAwait(type$.Future_Value_2._is(t3) ? t3 : A._Future$value(t3, type$.Value_2), $async$call$0); - case 39: - // returning from await. - t1 = $async$temp1._async_evaluate0$_slash$3($async$temp2, $async$result, t1); - // goto after switch - $async$goto = 5; - break; - case 19: - // case - t1 = t1.right.accept$1(t2); - $async$temp1 = left; - $async$goto = 40; - return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); - case 40: - // returning from await. - t1 = $async$temp1.modulo$1($async$result); - // goto after switch - $async$goto = 5; - break; - case 20: - // default - t1 = null; - case 5: - // after switch - $async$returnValue = t1; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 79 - }; - A._EvaluateVisitor__slash_recommendation2.prototype = { - call$1(expression) { - var t1; - $label0$0: { - if (expression instanceof A.BinaryOperationExpression0 && B.BinaryOperator_U770 === expression.operator) { - t1 = "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; - break $label0$0; - } - if (expression instanceof A.ParenthesizedExpression0) { - t1 = expression.expression.toString$0(0); - break $label0$0; - } - t1 = expression.toString$0(0); - break $label0$0; - } - return t1; - }, - $signature: 113 - }; - A._EvaluateVisitor_visitVariableExpression_closure2.prototype = { - call$0() { - var t1 = this.node; - return this.$this._async_evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); - }, - $signature: 43 - }; - A._EvaluateVisitor_visitUnaryOperationExpression_closure2.prototype = { - call$0() { - var t1, _this = this; - switch (_this.node.operator) { - case B.UnaryOperator_cLp0: - t1 = _this.operand.unaryPlus$0(); - break; - case B.UnaryOperator_AiQ0: - t1 = _this.operand.unaryMinus$0(); - break; - case B.UnaryOperator_SJr0: - t1 = new A.SassString0("/" + A.serializeValue0(_this.operand, false, true), false); - break; - case B.UnaryOperator_not_not_not0: - t1 = _this.operand.unaryNot$0(); - break; - default: - t1 = null; - } - return t1; - }, - $signature: 50 - }; - A._EvaluateVisitor_visitListExpression_closure2.prototype = { - call$1(expression) { - return expression.accept$1(this.$this); - }, - $signature: 356 - }; - A._EvaluateVisitor_visitFunctionExpression_closure8.prototype = { - call$0() { - var t1 = this.node; - return this.$this._async_evaluate0$_environment.getFunction$2$namespace(t1.name, t1.namespace); - }, - $signature: 96 - }; - A._EvaluateVisitor_visitFunctionExpression_closure9.prototype = { - call$1(argument) { - return argument.accept$1(B.C_IsCalculationSafeVisitor0); - }, - $signature: 139 - }; - A._EvaluateVisitor_visitFunctionExpression_closure10.prototype = { - call$0() { - var t1 = this.node; - return this.$this._async_evaluate0$_runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); - }, - $signature: 79 - }; - A._EvaluateVisitor__visitCalculation_closure2.prototype = { - call$2(message, deprecation) { - return this.$this._async_evaluate0$_warn$3(message, this.node.span, deprecation); - }, - call$1(message) { - return this.call$2(message, null); - }, - $signature: 110 - }; - A._EvaluateVisitor__checkCalculationArguments_check2.prototype = { - call$1(maxArgs) { - var t1 = this.node, - t2 = t1.$arguments.positional.length; - if (t2 === 0) - throw A.wrapException(this.$this._async_evaluate0$_exception$2("Missing argument.", t1.span)); - else if (maxArgs != null && t2 > maxArgs) - throw A.wrapException(this.$this._async_evaluate0$_exception$2("Only " + A.S(maxArgs) + " " + A.pluralize0("argument", maxArgs, null) + " allowed, but " + t2 + " " + A.pluralize0("was", t2, "were") + " passed.", t1.span)); - }, - call$0() { - return this.call$1(null); - }, - $signature: 102 - }; - A._EvaluateVisitor__visitCalculationExpression_closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Object), - $async$returnValue, $async$self = this, t1, t2, t3, t4, $async$temp1, $async$temp2, $async$temp3; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self._box_0; - t3 = $async$self.node; - t4 = $async$self.inLegacySassFunction; - $async$temp1 = A; - $async$temp2 = t1._async_evaluate0$_binaryOperatorToCalculationOperator$2(t2.operator, t3); - $async$goto = 3; - return A._asyncAwait(t1._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2.left, t4), $async$call$0); - case 3: - // returning from await. - $async$temp3 = $async$result; - $async$goto = 4; - return A._asyncAwait(t1._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2.right, t4), $async$call$0); - case 4: - // returning from await. - $async$returnValue = $async$temp1.SassCalculation_operateInternal0($async$temp2, $async$temp3, $async$result, t4, !t1._async_evaluate0$_inSupportsDeclaration, new A._EvaluateVisitor__visitCalculationExpression__closure2(t1, t3)); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 183 - }; - A._EvaluateVisitor__visitCalculationExpression__closure2.prototype = { - call$2(message, deprecation) { - return this.$this._async_evaluate0$_warn$3(message, this.node.get$span(0), deprecation); - }, - call$1(message) { - return this.call$2(message, null); - }, - $signature: 110 - }; - A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure2.prototype = { - call$0() { - var t1 = this.node; - return this.$this._async_evaluate0$_runFunctionCallable$3(t1.$arguments, this.$function, t1); - }, - $signature: 79 - }; - A._EvaluateVisitor__runUserDefinedCallable_closure2.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.callable, - t3 = _this.V; - return t1._async_evaluate0$_withEnvironment$1$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure2(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, t3), t3); - }, - $signature() { - return this.V._eval$1("Future<0>()"); - } - }; - A._EvaluateVisitor__runUserDefinedCallable__closure2.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.V; - return t1._async_evaluate0$_environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure2(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); - }, - $signature() { - return this.V._eval$1("Future<0>()"); - } - }; - A._EvaluateVisitor__runUserDefinedCallable___closure2.prototype = { - call$0() { - return this.$call$body$_EvaluateVisitor__runUserDefinedCallable___closure0(this.V); - }, - $call$body$_EvaluateVisitor__runUserDefinedCallable___closure0($async$type) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter($async$type), - $async$returnValue, $async$self = this, declaredArguments, t5, minLength, i, argument, t6, t7, value, t8, restArgument, rest, argumentList, result, argumentWord, t1, t2, t3, t4, $async$temp1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self.evaluated._values; - t3 = $async$self.callable.declaration.$arguments; - t4 = $async$self.nodeWithSpan; - t1._async_evaluate0$_verifyArguments$4(J.get$length$asx(t2[2]), t2[0], t3, t4); - declaredArguments = t3.$arguments; - t5 = declaredArguments.length; - minLength = Math.min(J.get$length$asx(t2[2]), t5); - for (i = 0; i < minLength; ++i) - t1._async_evaluate0$_environment.setLocalVariable$3(declaredArguments[i].name, J.$index$asx(t2[2], i), J.$index$asx(t2[3], i)); - i = J.get$length$asx(t2[2]); - case 3: - // for condition - if (!(i < t5)) { - // goto after for - $async$goto = 5; - break; - } - argument = declaredArguments[i]; - t6 = t2[0]; - t7 = argument.name; - value = t6.remove$1(0, t7); - $async$goto = value == null ? 6 : 7; - break; - case 6: - // then - t6 = argument.defaultValue; - $async$temp1 = t1; - $async$goto = 8; - return A._asyncAwait(t6.accept$1(t1), $async$call$0); - case 8: - // returning from await. - value = $async$temp1._async_evaluate0$_withoutSlash$2($async$result, t1._async_evaluate0$_expressionNode$1(t6)); - case 7: - // join - t6 = t1._async_evaluate0$_environment; - t8 = t2[1].$index(0, t7); - if (t8 == null) { - t8 = argument.defaultValue; - t8.toString; - t8 = t1._async_evaluate0$_expressionNode$1(t8); - } - t6.setLocalVariable$3(t7, value, t8); - case 4: - // for update - ++i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - restArgument = t3.restArgument; - if (restArgument != null) { - rest = J.get$length$asx(t2[2]) > t5 ? J.sublist$1$ax(t2[2], t5) : B.List_empty20; - t5 = t2[0]; - t6 = t2[4]; - argumentList = A.SassArgumentList$0(rest, t5, t6 === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_ECn0 : t6); - t1._async_evaluate0$_environment.setLocalVariable$3(restArgument, argumentList, t4); - } else - argumentList = null; - $async$goto = 9; - return A._asyncAwait($async$self.run.call$0(), $async$call$0); - case 9: - // returning from await. - result = $async$result; - if (argumentList == null) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - t5 = t2[0]; - if (t5.get$isEmpty(t5)) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - if (argumentList._argument_list$_wereKeywordsAccessed) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - t5 = t2[0]; - argumentWord = A.pluralize0("argument", J.get$length$asx(t5.get$keys(t5)), null); - t2 = t2[0]; - throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + argumentWord + " named " + A.toSentence0(J.map$1$1$ax(t2.get$keys(t2), new A._EvaluateVisitor__runUserDefinedCallable____closure2(), type$.Object), "or") + ".", t4.get$span(t4), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t3.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._async_evaluate0$_stackTrace$1(t4.get$span(t4)), null)); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature() { - return this.V._eval$1("Future<0>()"); - } - }; - A._EvaluateVisitor__runUserDefinedCallable____closure2.prototype = { - call$1($name) { - return "$" + $name; - }, - $signature: 6 - }; - A._EvaluateVisitor__runFunctionCallable_closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, $returnValue; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = $async$self.$this, _i = 0; - case 3: - // for condition - if (!(_i < t3)) { - // goto after for - $async$goto = 5; - break; - } - $async$goto = 6; - return A._asyncAwait(t2[_i].accept$1(t4), $async$call$0); - case 6: - // returning from await. - $returnValue = $async$result; - if ($returnValue instanceof A.Value0) { - $async$returnValue = $returnValue; - // goto return - $async$goto = 1; - break; - } - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - throw A.wrapException(t4._async_evaluate0$_exception$2("Function finished without @return.", t1.span)); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 79 - }; - A._EvaluateVisitor__runBuiltInCallable_closure8.prototype = { - call$0() { - return this._box_0.overload.verify$2(J.get$length$asx(this.evaluated._values[2]), this.namedSet); - }, - $signature: 0 - }; - A._EvaluateVisitor__runBuiltInCallable_closure9.prototype = { - call$0() { - return this._box_0.callback.call$1(this.evaluated._values[2]); - }, - $signature: 359 - }; - A._EvaluateVisitor__runBuiltInCallable_closure10.prototype = { - call$1($name) { - return "$" + $name; - }, - $signature: 6 - }; - A._EvaluateVisitor__evaluateArguments_closure11.prototype = { - call$1(value) { - return value; - }, - $signature: 41 - }; - A._EvaluateVisitor__evaluateArguments_closure12.prototype = { - call$1(value) { - return this.$this._async_evaluate0$_withoutSlash$2(value, this.restNodeForSpan); - }, - $signature: 41 - }; - A._EvaluateVisitor__evaluateArguments_closure13.prototype = { - call$2(key, value) { - var _this = this, - t1 = _this.restNodeForSpan; - _this.named.$indexSet(0, key, _this.$this._async_evaluate0$_withoutSlash$2(value, t1)); - _this.namedNodes.$indexSet(0, key, t1); - }, - $signature: 109 - }; - A._EvaluateVisitor__evaluateArguments_closure14.prototype = { - call$1(value) { - return value; - }, - $signature: 41 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure11.prototype = { - call$1(value) { - var t1 = this.restArgs; - return new A.ValueExpression0(value, t1.get$span(t1)); - }, - $signature: 66 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure12.prototype = { - call$1(value) { - var t1 = this.restArgs; - return new A.ValueExpression0(this.$this._async_evaluate0$_withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); - }, - $signature: 66 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure13.prototype = { - call$2(key, value) { - var _this = this, - t1 = _this.restArgs; - _this.named.$indexSet(0, key, new A.ValueExpression0(_this.$this._async_evaluate0$_withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); - }, - $signature: 109 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure14.prototype = { - call$1(value) { - var t1 = this.keywordRestArgs; - return new A.ValueExpression0(this.$this._async_evaluate0$_withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); - }, - $signature: 66 - }; - A._EvaluateVisitor__addRestMap_closure2.prototype = { - call$2(key, value) { - var t2, _this = this, - t1 = _this.$this; - if (key instanceof A.SassString0) - _this.values.$indexSet(0, key._string0$_text, _this.convert.call$1(t1._async_evaluate0$_withoutSlash$2(value, _this.expressionNode))); - else { - t2 = _this.nodeWithSpan; - throw A.wrapException(t1._async_evaluate0$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); - } - }, - $signature: 97 - }; - A._EvaluateVisitor__verifyArguments_closure2.prototype = { - call$0() { - return this.$arguments.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); - }, - $signature: 0 - }; - A._EvaluateVisitor_visitCssAtRule_closure5.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, t4; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - t4 = t1.__internal$_current; - $async$goto = 4; - return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); - case 4: - // returning from await. - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssAtRule_closure6.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitCssKeyframeBlock_closure5.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, t4; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - t4 = t1.__internal$_current; - $async$goto = 4; - return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); - case 4: - // returning from await. - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssKeyframeBlock_closure6.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitCssMediaRule_closure8.prototype = { - call$1(mediaQueries) { - return this.$this._async_evaluate0$_mergeMediaQueries$2(mediaQueries, this.node.queries); - }, - $signature: 104 - }; - A._EvaluateVisitor_visitCssMediaRule_closure9.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self.mergedQueries; - if (t2 == null) - t2 = $async$self.node.queries; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate0$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssMediaRule__closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t2, t3, t4, t1, _0_0; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - _0_0 = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; - $async$goto = _0_0 != null ? 2 : 4; - break; - case 2: - // then - $async$goto = 5; - return A._asyncAwait(t1._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure2(t1, $async$self.node), false, type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); - case 5: - // returning from await. - // goto join - $async$goto = 3; - break; - case 4: - // else - t2 = $async$self.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); - case 6: - // for condition - if (!t2.moveNext$0()) { - // goto after for - $async$goto = 7; - break; - } - t4 = t2.__internal$_current; - $async$goto = 8; - return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); - case 8: - // returning from await. - // goto for condition - $async$goto = 6; - break; - case 7: - // after for - case 3: - // join - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssMediaRule___closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, t4; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - t4 = t1.__internal$_current; - $async$goto = 4; - return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); - case 4: - // returning from await. - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssMediaRule_closure10.prototype = { - call$1(node) { - var t1; - if (!(node instanceof A.ModifiableCssStyleRule0)) { - t1 = this.mergedSources; - t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule0 && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); - } else - t1 = true; - return t1; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitCssStyleRule_closure6.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - $async$goto = 2; - return A._asyncAwait(t1._async_evaluate0$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitCssStyleRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssStyleRule__closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, t4; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - t4 = t1.__internal$_current; - $async$goto = 4; - return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); - case 4: - // returning from await. - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssStyleRule_closure5.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitCssSupportsRule_closure5.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t2, t3, t4, t1, _0_0; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - _0_0 = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; - $async$goto = _0_0 != null ? 2 : 4; - break; - case 2: - // then - $async$goto = 5; - return A._asyncAwait(t1._async_evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure2(t1, $async$self.node), type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); - case 5: - // returning from await. - // goto join - $async$goto = 3; - break; - case 4: - // else - t2 = $async$self.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); - case 6: - // for condition - if (!t2.moveNext$0()) { - // goto after for - $async$goto = 7; - break; - } - t4 = t2.__internal$_current; - $async$goto = 8; - return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); - case 8: - // returning from await. - // goto for condition - $async$goto = 6; - break; - case 7: - // after for - case 3: - // join - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssSupportsRule__closure2.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1, t2, t3, t4; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - t4 = t1.__internal$_current; - $async$goto = 4; - return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); - case 4: - // returning from await. - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A._EvaluateVisitor_visitCssSupportsRule_closure6.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor__performInterpolationHelper_closure2.prototype = { - call$1(targetLocations) { - return A.InterpolationMap$0(this.interpolation, targetLocations); - }, - $signature: 216 - }; - A._EvaluateVisitor__serialize_closure2.prototype = { - call$0() { - return A.serializeValue0(this.value, false, this.quote); - }, - $signature: 30 - }; - A._EvaluateVisitor__expressionNode_closure2.prototype = { - call$0() { - var t1 = this.expression; - return this.$this._async_evaluate0$_environment.getVariableNode$2$namespace(t1.name, t1.namespace); - }, - $signature: 217 - }; - A._EvaluateVisitor__withoutSlash_recommendation2.prototype = { - call$1(number) { - var before, after, t1, - _1_0 = number.asSlash; - $label0$0: { - if (type$.Record_2_nullable_Object_and_nullable_Object._is(_1_0)) { - before = _1_0._0; - after = _1_0._1; - t1 = "math.div(" + A.S(this.call$1(before)) + ", " + A.S(this.call$1(after)) + ")"; - break $label0$0; - } - t1 = A.serializeValue0(number, true, true); - break $label0$0; - } - return t1; - }, - $signature: 218 - }; - A._EvaluateVisitor__stackFrame_closure2.prototype = { - call$1(url) { - var t1 = this.$this._async_evaluate0$_importCache; - t1 = t1 == null ? null : t1.humanize$1(url); - return t1 == null ? url : t1; - }, - $signature: 47 - }; - A._ImportedCssVisitor2.prototype = { - visitCssAtRule$1(node) { - var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure2(); - this._async_evaluate0$_visitor._async_evaluate0$_addChild$2$through(node, t1); - }, - visitCssComment$1(node) { - return this._async_evaluate0$_visitor._async_evaluate0$_addChild$1(node); - }, - visitCssDeclaration$1(node) { - }, - visitCssImport$1(node) { - var t2, - _s13_ = "_endOfImports", - t1 = this._async_evaluate0$_visitor; - if (t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__parent, "__parent") !== t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__root, "_root")) - t1._async_evaluate0$_addChild$1(node); - else if (t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__endOfImports, _s13_) === J.get$length$asx(t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__root, "_root").children._collection$_source)) { - t1._async_evaluate0$_addChild$1(node); - t1._async_evaluate0$__endOfImports = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__endOfImports, _s13_) + 1; - } else { - t2 = t1._async_evaluate0$_outOfOrderImports; - (t2 == null ? t1._async_evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t2).push(node); - } - }, - visitCssKeyframeBlock$1(node) { - }, - visitCssMediaRule$1(node) { - var t1 = this._async_evaluate0$_visitor, - mediaQueries = t1._async_evaluate0$_mediaQueries; - t1._async_evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure2(mediaQueries == null || t1._async_evaluate0$_mergeMediaQueries$2(mediaQueries, node.queries) != null)); - }, - visitCssStyleRule$1(node) { - return this._async_evaluate0$_visitor._async_evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure2()); - }, - visitCssStylesheet$1(node) { - var t1, t2, t3; - for (t1 = node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t3 = t1.__internal$_current; - (t3 == null ? t2._as(t3) : t3).accept$1(this); - } - }, - visitCssSupportsRule$1(node) { - return this._async_evaluate0$_visitor._async_evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure2()); - } - }; - A._ImportedCssVisitor_visitCssAtRule_closure2.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._ImportedCssVisitor_visitCssMediaRule_closure2.prototype = { - call$1(node) { - var t1; - if (!(node instanceof A.ModifiableCssStyleRule0)) - t1 = this.hasBeenMerged && node instanceof A.ModifiableCssMediaRule0; - else - t1 = true; - return t1; - }, - $signature: 8 - }; - A._ImportedCssVisitor_visitCssStyleRule_closure2.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._ImportedCssVisitor_visitCssSupportsRule_closure2.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluationContext2.prototype = { - get$currentCallableSpan() { - var _0_0 = this._async_evaluate0$_visitor._async_evaluate0$_callableNode; - if (_0_0 != null) - return _0_0.get$span(_0_0); - throw A.wrapException(A.StateError$(string$.No_Sasc)); - }, - warn$2(_, message, deprecation) { - var t1 = this._async_evaluate0$_visitor, - t2 = t1._async_evaluate0$_importSpan; - if (t2 == null) { - t2 = t1._async_evaluate0$_callableNode; - t2 = t2 == null ? null : t2.get$span(t2); - } - t1._async_evaluate0$_warn$3(message, t2 == null ? this._async_evaluate0$_defaultWarnNodeWithSpan.span : t2, deprecation); - }, - $isEvaluationContext0: 1 - }; - A.JSToDartAsyncFileImporter.prototype = { - canonicalize$1(_, url) { - return this.canonicalize$body$JSToDartAsyncFileImporter(0, url); - }, - canonicalize$body$JSToDartAsyncFileImporter(_, url) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Uri), - $async$returnValue, $async$self = this, result, t1, resultUrl; - var $async$canonicalize$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if (url.get$scheme() === "file") { - $async$returnValue = $.$get$FilesystemImporter_cwd0().canonicalize$1(0, url); - // goto return - $async$goto = 1; - break; - } - result = A.wrapJSExceptions(new A.JSToDartAsyncFileImporter_canonicalize_closure($async$self, url)); - $async$goto = result != null && result instanceof self.Promise ? 3 : 4; - break; - case 3: - // then - $async$goto = 5; - return A._asyncAwait(A.promiseToFuture0(type$.Promise._as(result), type$.nullable_Object), $async$canonicalize$1); - case 5: - // returning from await. - result = $async$result; - case 4: - // join - if (result == null) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - t1 = self.URL; - if (!(result instanceof t1)) - A.jsThrow(new self.Error(string$.The_fie)); - resultUrl = A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); - if (resultUrl.get$scheme() !== "file") - A.jsThrow(new self.Error(string$.The_fiu + url.toString$0(0) + '".')); - $async$returnValue = $.$get$FilesystemImporter_cwd0().canonicalize$1(0, resultUrl); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$canonicalize$1, $async$completer); - }, - load$1(_, url) { - return $.$get$FilesystemImporter_cwd0().load$1(0, url); - }, - isNonCanonicalScheme$1(scheme) { - return scheme !== "file"; - } - }; - A.JSToDartAsyncFileImporter_canonicalize_closure.prototype = { - call$0() { - return this.$this._findFileUrl.call$2(this.url.toString$0(0), A.canonicalizeContext0()); - }, - $signature: 33 - }; - A.AsyncImportCache0.prototype = { - canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { - return this.canonicalize$body$AsyncImportCache0(0, url, baseImporter, baseUrl, forImport); - }, - canonicalize$body$AsyncImportCache0(_, url, baseImporter, baseUrl, forImport) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2), - $async$returnValue, $async$self = this, t1, resolvedUrl, key, relativeResult, t2, t3, t4, t5, t6, cacheable, i, importer, perImporterKey, t7, _1_0, _1_2_isSet, result, _1_2, _2_0, _2_1, _2_5_isSet, _2_5, _2_3, _2_3_isSet, j; - var $async$canonicalize$4$baseImporter$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - if (A.isBrowser()) - t1 = (baseImporter == null || baseImporter instanceof A.NoOpImporter0) && $async$self._async_import_cache0$_importers.length === 0; - else - t1 = false; - if (t1) - throw A.wrapException(string$.Custom); - $async$goto = baseImporter != null && url.get$scheme() === "" ? 3 : 4; - break; - case 3: - // then - resolvedUrl = baseUrl == null ? null : baseUrl.resolveUri$1(url); - if (resolvedUrl == null) - resolvedUrl = url; - key = new A._Record_3_forImport(baseImporter, resolvedUrl, forImport); - $async$goto = 5; - return A._asyncAwait(A.putIfAbsentAsync0($async$self._async_import_cache0$_perImporterCanonicalizeCache, key, new A.AsyncImportCache_canonicalize_closure0($async$self, baseImporter, resolvedUrl, baseUrl, forImport, key, url), type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport_2, type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2), $async$canonicalize$4$baseImporter$baseUrl$forImport); - case 5: - // returning from await. - relativeResult = $async$result; - if (relativeResult != null) { - $async$returnValue = relativeResult; - // goto return - $async$goto = 1; - break; - } - case 4: - // join - key = new A._Record_2_forImport(url, forImport); - t1 = $async$self._async_import_cache0$_canonicalizeCache; - if (t1.containsKey$1(key)) { - $async$returnValue = t1.$index(0, key); - // goto return - $async$goto = 1; - break; - } - t2 = $async$self._async_import_cache0$_importers, t3 = type$.Record_1_nullable_Object, t4 = $async$self._async_import_cache0$_perImporterCanonicalizeCache, t5 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2, t6 = type$.Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2, cacheable = true, i = 0; - case 6: - // for condition - if (!(i < t2.length)) { - // goto after for - $async$goto = 8; - break; - } - importer = t2[i]; - perImporterKey = new A._Record_3_forImport(importer, url, forImport); - if (t4.containsKey$1(perImporterKey)) { - t7 = t4.$index(0, perImporterKey); - _1_0 = new A._Record_1(t7 == null ? t5._as(t7) : t7); - } else - _1_0 = null; - _1_2_isSet = t3._is(_1_0); - result = null; - if (_1_2_isSet) { - _1_2 = _1_0._0; - t7 = _1_2 != null; - if (t7) { - t6._as(_1_2); - result = _1_2; - } - } else { - _1_2 = null; - t7 = false; - } - if (t7) { - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - if (_1_2_isSet) - t7 = _1_2 == null; - else - t7 = false; - if (t7) { - // goto for update - $async$goto = 7; - break; - } - $async$goto = 10; - return A._asyncAwait($async$self._async_import_cache0$_canonicalize$4(importer, url, baseUrl, forImport), $async$canonicalize$4$baseImporter$baseUrl$forImport); - case 10: - // returning from await. - _2_0 = $async$result; - _2_1 = _2_0._0; - _2_5_isSet = _2_1 != null; - _2_5 = null; - _2_3 = null; - t7 = false; - if (_2_5_isSet) { - result = _2_1 == null ? t6._as(_2_1) : _2_1; - _2_3 = _2_0._1; - t7 = _2_3; - _2_5 = t7; - t7 = t7 && cacheable; - } else - result = null; - if (t7) { - t1.$indexSet(0, key, result); - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - } - if (_2_5_isSet) { - t7 = _2_5; - _2_3_isSet = _2_5_isSet; - } else { - _2_3 = _2_0._1; - t7 = _2_3; - _2_3_isSet = true; - } - t7 = t7 && !cacheable; - if (t7) { - t4.$indexSet(0, perImporterKey, _2_1); - if (_2_1 != null) { - $async$returnValue = _2_1; - // goto return - $async$goto = 1; - break; - } - // goto break $label0$1 - $async$goto = 9; - break; - } - t7 = false === (_2_3_isSet ? _2_3 : _2_0._1); - if (t7) { - if (cacheable) { - for (j = 0; j < i; ++j) - t4.$indexSet(0, new A._Record_3_forImport(t2[j], url, forImport), null); - cacheable = false; - } - if (_2_1 != null) { - $async$returnValue = _2_1; - // goto return - $async$goto = 1; - break; - } - } - case 9: - // break $label0$1 - case 7: - // for update - ++i; - // goto for condition - $async$goto = 6; - break; - case 8: - // after for - if (cacheable) - t1.$indexSet(0, key, null); - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$canonicalize$4$baseImporter$baseUrl$forImport, $async$completer); - }, - _async_import_cache0$_canonicalize$4(importer, url, baseUrl, forImport) { - return this._canonicalize$body$AsyncImportCache0(importer, url, baseUrl, forImport); - }, - _canonicalize$body$AsyncImportCache0(importer, url, baseUrl, forImport) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_and_bool_2), - $async$returnValue, t1, passContainingUrl, canonicalizeContext, result, cacheable; - var $async$_async_import_cache0$_canonicalize$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = baseUrl != null ? 3 : 5; - break; - case 3: - // then - $async$goto = url.get$scheme() !== "" ? 6 : 8; - break; - case 6: - // then - t1 = A._Future$value(importer.isNonCanonicalScheme$1(url.get$scheme()), type$.bool); - $async$goto = 9; - return A._asyncAwait(t1, $async$_async_import_cache0$_canonicalize$4); - case 9: - // returning from await. - t1 = $async$result; - passContainingUrl = t1; - // goto join - $async$goto = 7; - break; - case 8: - // else - passContainingUrl = true; - case 7: - // join - // goto join - $async$goto = 4; - break; - case 5: - // else - passContainingUrl = false; - case 4: - // join - canonicalizeContext = new A.CanonicalizeContext0(forImport, passContainingUrl ? baseUrl : null); - t1 = type$.nullable_Object; - t1 = A.runZoned(new A.AsyncImportCache__canonicalize_closure0(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, canonicalizeContext], t1, t1), type$.FutureOr_nullable_Uri); - $async$goto = 10; - return A._asyncAwait(type$.Future_nullable_Uri._is(t1) ? t1 : A._Future$value(t1, type$.nullable_Uri), $async$_async_import_cache0$_canonicalize$4); - case 10: - // returning from await. - result = $async$result; - cacheable = !passContainingUrl || !canonicalizeContext._canonicalize_context$_wasContainingUrlAccessed; - if (result == null) { - $async$returnValue = new A._Record_2(null, cacheable); - // goto return - $async$goto = 1; - break; - } - $async$goto = result.get$scheme() !== "" ? 11 : 13; - break; - case 11: - // then - t1 = A._Future$value(importer.isNonCanonicalScheme$1(result.get$scheme()), type$.bool); - $async$goto = 14; - return A._asyncAwait(t1, $async$_async_import_cache0$_canonicalize$4); - case 14: - // returning from await. - t1 = $async$result; - // goto join - $async$goto = 12; - break; - case 13: - // else - t1 = false; - case 12: - // join - if (t1) - throw A.wrapException("Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2c_whicu); - $async$returnValue = new A._Record_2(new A._Record_3_originalUrl(importer, result, url), cacheable); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_async_import_cache0$_canonicalize$4, $async$completer); - }, - importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { - return this.importCanonical$body$AsyncImportCache0(importer, canonicalUrl, originalUrl); - }, - importCanonical$body$AsyncImportCache0(importer, canonicalUrl, originalUrl) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet_2), - $async$returnValue, $async$self = this; - var $async$importCanonical$3$originalUrl = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$goto = 3; - return A._asyncAwait(A.putIfAbsentAsync0($async$self._async_import_cache0$_importCache, canonicalUrl, new A.AsyncImportCache_importCanonical_closure0($async$self, importer, canonicalUrl, originalUrl), type$.Uri, type$.nullable_Stylesheet_2), $async$importCanonical$3$originalUrl); - case 3: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$importCanonical$3$originalUrl, $async$completer); - }, - humanize$1(canonicalUrl) { - var t1 = type$.NonNullsIterable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2; - t1 = A.NullableExtension_andThen0(A.minBy(new A.MappedIterable(new A.WhereIterable(new A.NonNullsIterable(this._async_import_cache0$_canonicalizeCache.get$values(0), t1), new A.AsyncImportCache_humanize_closure3(canonicalUrl), t1._eval$1("WhereIterable")), new A.AsyncImportCache_humanize_closure4(), t1._eval$1("MappedIterable")), new A.AsyncImportCache_humanize_closure5()), new A.AsyncImportCache_humanize_closure6(canonicalUrl)); - return t1 == null ? canonicalUrl : t1; - }, - sourceMapUrl$1(_, canonicalUrl) { - var t1 = this._async_import_cache0$_resultsCache.$index(0, canonicalUrl); - t1 = t1 == null ? null : t1.get$sourceMapUrl(0); - return t1 == null ? canonicalUrl : t1; - } - }; - A.AsyncImportCache_canonicalize_closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2), - $async$returnValue, $async$self = this, t1, t2, _0_0, result; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.$this; - t2 = $async$self.baseUrl; - $async$goto = 3; - return A._asyncAwait(t1._async_import_cache0$_canonicalize$4($async$self.baseImporter, $async$self.resolvedUrl, t2, $async$self.forImport), $async$call$0); - case 3: - // returning from await. - _0_0 = $async$result; - result = _0_0._0; - _0_0._1; - if (t2 != null) - t1._async_import_cache0$_nonCanonicalRelativeUrls.$indexSet(0, $async$self.key, $async$self.url); - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 366 - }; - A.AsyncImportCache__canonicalize_closure0.prototype = { - call$0() { - return this.importer.canonicalize$1(0, this.url); - }, - $signature: 184 - }; - A.AsyncImportCache_importCanonical_closure0.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet_2), - $async$returnValue, $async$self = this, t3, t1, t2, result; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.canonicalUrl; - t2 = $async$self.importer.load$1(0, t1); - $async$goto = 3; - return A._asyncAwait(type$.Future_nullable_ImporterResult._is(t2) ? t2 : A._Future$value(t2, type$.nullable_ImporterResult_2), $async$call$0); - case 3: - // returning from await. - result = $async$result; - if (result == null) { - $async$returnValue = null; - // goto return - $async$goto = 1; - break; - } - $async$self.$this._async_import_cache0$_resultsCache.$indexSet(0, t1, result); - t2 = result.contents; - t3 = result.syntax; - t1 = $async$self.originalUrl.resolveUri$1(t1); - $async$returnValue = A.Stylesheet_Stylesheet$parse0(t2, t3, t1); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 367 - }; - A.AsyncImportCache_humanize_closure3.prototype = { - call$1(result) { - return result._1.$eq(0, this.canonicalUrl); - }, - $signature: 368 - }; - A.AsyncImportCache_humanize_closure4.prototype = { - call$1(result) { - return result._2; - }, - $signature: 369 - }; - A.AsyncImportCache_humanize_closure5.prototype = { - call$1(url) { - return url.get$path(url).length; - }, - $signature: 112 - }; - A.AsyncImportCache_humanize_closure6.prototype = { - call$1(url) { - var t1 = $.$get$url(), - t2 = this.canonicalUrl; - return url.resolve$1(0, A.ParsedPath_ParsedPath$parse(t2.get$path(t2), t1.style).get$basename()); - }, - $signature: 47 - }; - A.AtRootQueryParser0.prototype = { - parse$0(_) { - return this.wrapSpanFormatException$1(new A.AtRootQueryParser_parse_closure0(this)); - } - }; - A.AtRootQueryParser_parse_closure0.prototype = { - call$0() { - var include, atRules, - t1 = this.$this, - t2 = t1.scanner; - t2.expectChar$1(40); - t1.whitespace$0(); - include = t1.scanIdentifier$1("with"); - if (!include) - t1.expectIdentifier$2$name("without", '"with" or "without"'); - t1.whitespace$0(); - t2.expectChar$1(58); - t1.whitespace$0(); - atRules = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); - do { - atRules.add$1(0, t1.identifier$0().toLowerCase()); - t1.whitespace$0(); - } while (t1.lookingAtIdentifier$0()); - t2.expectChar$1(41); - t2.expectDone$0(); - return new A.AtRootQuery0(include, atRules, atRules.contains$1(0, "all"), atRules.contains$1(0, "rule")); - }, - $signature: 370 - }; - A.AtRootQuery0.prototype = { - excludes$1(node) { - var t1, _this = this; - if (_this._at_root_query0$_all) - return !_this.include; - $label0$0: { - if (node instanceof A.ModifiableCssStyleRule0) { - t1 = _this._at_root_query0$_rule !== _this.include; - break $label0$0; - } - if (node instanceof A.ModifiableCssMediaRule0) { - t1 = _this.excludesName$1("media"); - break $label0$0; - } - if (node instanceof A.ModifiableCssSupportsRule0) { - t1 = _this.excludesName$1("supports"); - break $label0$0; - } - if (node instanceof A.ModifiableCssAtRule0) { - t1 = _this.excludesName$1(node.name.value.toLowerCase()); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - excludesName$1($name) { - var t1 = this._at_root_query0$_all || this.names.contains$1(0, $name); - return t1 !== this.include; - } - }; - A.AtRootRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitAtRootRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var buffer = new A.StringBuffer("@at-root "), - t1 = this.query; - if (t1 != null) - buffer._contents = "@at-root " + (t1.toString$0(0) + " "); - t1 = this.children; - return buffer.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.ModifiableCssAtRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitCssAtRule$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - equalsIgnoringChildren$1(other) { - var t1, t2; - if (other instanceof A.ModifiableCssAtRule0) { - t1 = this.name; - t2 = other.name; - t1 = t1.$ti._is(t2) && J.$eq$(t2.value, t1.value) && J.$eq$(this.value, other.value) && this.isChildless === other.isChildless; - } else - t1 = false; - return t1; - }, - copyWithoutChildren$0() { - var _this = this; - return A.ModifiableCssAtRule$0(_this.name, _this.span, _this.isChildless, _this.value); - }, - addChild$1(child) { - this.super$ModifiableCssParentNode$addChild0(child); - }, - get$isChildless() { - return this.isChildless; - }, - get$span(receiver) { - return this.span; - } - }; - A.AtRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitAtRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var children, - t1 = "@" + this.name.toString$0(0), - buffer = new A.StringBuffer(t1), - t2 = this.value; - if (t2 != null) - buffer._contents = t1 + (" " + t2.toString$0(0)); - children = this.children; - return children == null ? buffer.toString$0(0) + ";" : buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(children, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.AttributeSelector0.prototype = { - accept$1$1(visitor) { - return visitor.visitAttributeSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - $eq(_, other) { - var _this = this; - if (other == null) - return false; - return other instanceof A.AttributeSelector0 && other.name.$eq(0, _this.name) && other.op == _this.op && other.value == _this.value && other.modifier == _this.modifier; - }, - get$hashCode(_) { - var _this = this, - t1 = _this.name; - return (B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace) ^ J.get$hashCode$(_this.op) ^ J.get$hashCode$(_this.value) ^ J.get$hashCode$(_this.modifier)) >>> 0; - } - }; - A.AttributeOperator0.prototype = { - _enumToString$0() { - return "AttributeOperator." + this._name; - }, - toString$0(_) { - return this._attribute0$_text; - } - }; - A.BinaryOperationExpression0.prototype = { - get$span(_) { - var right, - left = this.left; - for (; left instanceof A.BinaryOperationExpression0;) - left = left.left; - right = this.right; - for (; right instanceof A.BinaryOperationExpression0;) - right = right.right; - return left.get$span(left).expand$1(0, right.get$span(right)); - }, - get$operatorSpan() { - var t3, t4, - t1 = this.left, - t2 = t1.get$span(t1); - t2 = t2.get$file(t2); - t3 = this.right; - t4 = t3.get$span(t3); - if (t2 === t4.get$file(t4)) { - t2 = t1.get$span(t1); - t2 = t2.get$end(t2); - t4 = t3.get$span(t3); - t4 = t2.offset < t4.get$start(t4).offset; - t2 = t4; - } else - t2 = false; - if (t2) { - t2 = t1.get$span(t1); - t2 = t2.get$file(t2); - t1 = t1.get$span(t1); - t1 = t1.get$end(t1); - t3 = t3.get$span(t3); - t3 = A.SpanExtensions_trimRight0(A.SpanExtensions_trimLeft0(t2.span$2(0, t1.offset, t3.get$start(t3).offset))); - t1 = t3; - } else - t1 = this.get$span(0); - return t1; - }, - accept$1$1(visitor) { - return visitor.visitBinaryOperationExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1, t2, right, t3, operator, _this = this, - _0_0 = _this.left; - $label0$0: { - if (_0_0 instanceof A.BinaryOperationExpression0) { - t1 = _0_0.operator.precedence < _this.operator.precedence; - break $label0$0; - } - if (_0_0 instanceof A.ListExpression0 && !_0_0.hasBrackets && _0_0.contents.length >= 2) { - t1 = true; - break $label0$0; - } - t1 = false; - break $label0$0; - } - t2 = t1 ? "" + A.Primitives_stringFromCharCode(40) : ""; - t2 += _0_0.toString$0(0); - t1 = t1 ? t2 + A.Primitives_stringFromCharCode(41) : t2; - t2 = _this.operator; - t1 = t1 + A.Primitives_stringFromCharCode(32) + t2.operator + A.Primitives_stringFromCharCode(32); - right = _this.right; - $label1$1: { - t3 = false; - if (right instanceof A.BinaryOperationExpression0) { - operator = right.operator; - if (operator.precedence <= t2.precedence) { - t3 = !(operator === t2 && operator.isAssociative); - t2 = t3; - } else - t2 = t3; - break $label1$1; - } - if (right instanceof A.ListExpression0 && !right.hasBrackets && right.contents.length >= 2) { - t2 = true; - break $label1$1; - } - t2 = t3; - break $label1$1; - } - if (t2) - t1 += A.Primitives_stringFromCharCode(40); - t1 += right.toString$0(0); - if (t2) - t1 += A.Primitives_stringFromCharCode(41); - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - }; - A.BinaryOperator0.prototype = { - _enumToString$0() { - return "BinaryOperator." + this._name; - }, - toString$0(_) { - return this.name; - } - }; - A.BooleanExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitBooleanExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return String(this.value); - }, - get$span(receiver) { - return this.span; - } - }; - A.booleanClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassBoolean", new A.booleanClass__closure())); - A.JSClassExtension_injectSuperclass(t1._as(B.SassBoolean_true0.constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.booleanClass__closure.prototype = { - call$2($self, _) { - A.jsThrow(new self.Error("new sass.SassBoolean() isn't allowed.\nUse sass.sassTrue or sass.sassFalse instead.")); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 219 - }; - A.legacyBooleanClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.types.Boolean", new A.legacyBooleanClass__closure())); - J.get$$prototype$x(jsClass).getValue = A.allowInteropCaptureThisNamed("getValue", new A.legacyBooleanClass__closure0()); - jsClass.TRUE = B.SassBoolean_true0; - jsClass.FALSE = B.SassBoolean_false0; - A.JSClassExtension_injectSuperclass(t1._as(B.SassBoolean_true0.constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.legacyBooleanClass__closure.prototype = { - call$2(_, __) { - throw A.wrapException("new sass.types.Boolean() isn't allowed.\nUse sass.types.Boolean.TRUE or sass.types.Boolean.FALSE instead."); - }, - call$1(_) { - return this.call$2(_, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 220 - }; - A.legacyBooleanClass__closure0.prototype = { - call$1($self) { - return $self === B.SassBoolean_true0; - }, - $signature: 67 - }; - A.SassBoolean0.prototype = { - get$isTruthy() { - return this.value; - }, - accept$1$1(visitor) { - return visitor._serialize0$_buffer.write$1(0, String(this.value)); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertBoolean$1($name) { - return this; - }, - unaryNot$0() { - return this.value ? B.SassBoolean_false0 : B.SassBoolean_true0; - } - }; - A.Box0.prototype = { - $eq(_, other) { - if (other == null) - return false; - return this.$ti._is(other) && other._box0$_inner === this._box0$_inner; - }, - get$hashCode(_) { - return A.Primitives_objectHashCode(this._box0$_inner); - } - }; - A.ModifiableBox0.prototype = {}; - A.BuiltInCallable0.prototype = { - callbackFor$2(positional, names) { - var t1, t2, fuzzyMatch, minMismatchDistance, _i, overload, t3, mismatchDistance, t4; - for (t1 = this._built_in$_overloads, t2 = t1.length, fuzzyMatch = null, minMismatchDistance = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - overload = t1[_i]; - t3 = overload._0; - if (t3.matches$2(positional, names)) - return overload; - mismatchDistance = t3.$arguments.length - positional; - if (minMismatchDistance != null) { - t3 = Math.abs(mismatchDistance); - t4 = Math.abs(minMismatchDistance); - if (t3 > t4) - continue; - if (t3 === t4 && mismatchDistance < 0) - continue; - } - minMismatchDistance = mismatchDistance; - fuzzyMatch = overload; - } - if (fuzzyMatch != null) - return fuzzyMatch; - throw A.wrapException(A.StateError$("BuiltInCallable " + this.name + " may not have empty overloads.")); - }, - withName$1($name) { - return new A.BuiltInCallable0($name, this._built_in$_overloads, this.acceptsContent); - }, - withDeprecationWarning$2(module, newName) { - var t2, t3, _i, t4, t5, _this = this, - t1 = A._setArrayType([], type$.JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value_2); - for (t2 = _this._built_in$_overloads, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - t4 = {}; - t5 = t2[_i]; - t4.$function = null; - t4.$function = t5._1; - t1.push(new A._Record_2(t5._0, new A.BuiltInCallable_withDeprecationWarning_closure0(t4, _this, module, newName))); - } - return new A.BuiltInCallable0(_this.name, t1, _this.acceptsContent); - }, - withDeprecationWarning$1(module) { - return this.withDeprecationWarning$2(module, null); - }, - $isAsyncCallable0: 1, - $isAsyncBuiltInCallable0: 1, - $isCallable: 1, - get$name(receiver) { - return this.name; - }, - get$acceptsContent() { - return this.acceptsContent; - } - }; - A.BuiltInCallable$mixin_closure0.prototype = { - call$1($arguments) { - this.callback.call$1($arguments); - return B.C__SassNull0; - }, - $signature: 3 - }; - A.BuiltInCallable_withDeprecationWarning_closure0.prototype = { - call$1(args) { - var _this = this, - t1 = _this.newName; - if (t1 == null) - t1 = _this.$this.name; - A.warnForDeprecation0(string$.Global + _this.module + "." + t1 + string$.x20inste, B.Deprecation_Q5r); - return _this._box_0.$function.call$1(args); - }, - $signature: 3 - }; - A.BuiltInModule0.prototype = { - get$upstream() { - return B.List_empty19; - }, - get$variableNodes() { - return B.Map_empty13; - }, - get$extensionStore() { - return B.C_EmptyExtensionStore0; - }, - get$css(_) { - return new A.CssStylesheet0(B.List_empty17, A.SourceFile$decoded(B.List_empty4, this.url).span$2(0, 0, 0)); - }, - get$preModuleComments() { - return B.Map_empty12; - }, - get$transitivelyContainsCss() { - return false; - }, - get$transitivelyContainsExtensions() { - return false; - }, - setVariable$3($name, value, nodeWithSpan) { - if (!this.variables.containsKey$1($name)) - throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); - throw A.wrapException(A.SassScriptException$0("Cannot modify built-in variable.", null)); - }, - variableIdentity$1($name) { - return this; - }, - cloneCss$0() { - return this; - }, - $isModule1: 1, - get$url(receiver) { - return this.url; - }, - get$functions(receiver) { - return this.functions; - }, - get$mixins() { - return this.mixins; - }, - get$variables() { - return this.variables; - } - }; - A.calculationClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassCalculation", new A.calculationClass__closure())), - t2 = type$.String, - t3 = type$.Function; - A.LinkedHashMap_LinkedHashMap$_literal(["calc", new A.calculationClass__closure0(), "min", new A.calculationClass__closure1(), "max", new A.calculationClass__closure2(), "clamp", new A.calculationClass__closure3()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineStaticMethod(jsClass)); - A.LinkedHashMap_LinkedHashMap$_literal(["assertCalculation", new A.calculationClass__closure4()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); - A.LinkedHashMap_LinkedHashMap$_literal(["arguments", new A.calculationClass__closure5()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); - A.JSClassExtension_injectSuperclass(t1._as(new A.SassCalculation0("calc", A.List_List$unmodifiable(A._setArrayType([A.SassNumber_SassNumber0(1, null)], type$.JSArray_Object), type$.Object)).constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.calculationClass__closure.prototype = { - call$2($self, _) { - A.jsThrow0(new self.Error("new sass.SassCalculation() isn't allowed")); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 219 - }; - A.calculationClass__closure0.prototype = { - call$1(argument) { - A._assertCalculationValue(argument); - return new A.SassCalculation0("calc", A.List_List$unmodifiable(A._setArrayType([argument], type$.JSArray_Object), type$.Object)); - }, - $signature: 115 - }; - A.calculationClass__closure1.prototype = { - call$1($arguments) { - var t1 = self.immutable.isOrderedMap($arguments) ? J.toArray$0$x(type$.ImmutableList_2._as($arguments)) : type$.List_dynamic._as($arguments), - t2 = type$.Object, - argList = J.cast$1$0$ax(t1, t2); - argList.forEach$1(argList, A.calculation1___assertCalculationValue$closure()); - return new A.SassCalculation0("min", A.List_List$unmodifiable(argList, t2)); - }, - $signature: 115 - }; - A.calculationClass__closure2.prototype = { - call$1($arguments) { - var t1 = self.immutable.isOrderedMap($arguments) ? J.toArray$0$x(type$.ImmutableList_2._as($arguments)) : type$.List_dynamic._as($arguments), - t2 = type$.Object, - argList = J.cast$1$0$ax(t1, t2); - argList.forEach$1(argList, A.calculation1___assertCalculationValue$closure()); - return new A.SassCalculation0("max", A.List_List$unmodifiable(argList, t2)); - }, - $signature: 115 - }; - A.calculationClass__closure3.prototype = { - call$3(min, value, max) { - var t1; - if (!(value == null && !A._isValidClampArg(min))) - t1 = max == null && !B.JSArray_methods.any$1([min, value], A.calculation1___isValidClampArg$closure()); - else - t1 = true; - if (t1) - A.jsThrow0(new self.Error("Expected at least one SassString or CalculationInterpolation in `" + new A.NonNullsIterable([min, value, max], type$.NonNullsIterable_Object).toString$0(0) + "`")); - t1 = type$.NonNullsIterable_Object; - new A.NonNullsIterable([min, value, max], t1).forEach$1(0, A.calculation1___assertCalculationValue$closure()); - return new A.SassCalculation0("clamp", A.List_List$unmodifiable(new A.NonNullsIterable([min, value, max], t1), type$.Object)); - }, - call$1(min) { - return this.call$3(min, null, null); - }, - call$2(min, value) { - return this.call$3(min, value, null); - }, - "call*": "call$3", - $requiredArgCount: 1, - $defaultValues() { - return [null, null]; - }, - $signature: 375 - }; - A.calculationClass__closure4.prototype = { - call$2($self, $name) { - return $self; - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 376 - }; - A.calculationClass__closure5.prototype = { - call$1($self) { - return new self.immutable.List($self.$arguments); - }, - $signature: 377 - }; - A.calculationOperationClass_closure.prototype = { - call$0() { - var _null = null, - t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.CalculationOperation", new A.calculationOperationClass__closure())), - t2 = type$.String, - t3 = type$.Function; - A.LinkedHashMap_LinkedHashMap$_literal(["equals", new A.calculationOperationClass__closure0(), "hashCode", new A.calculationOperationClass__closure1()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); - A.LinkedHashMap_LinkedHashMap$_literal(["operator", new A.calculationOperationClass__closure2(), "left", new A.calculationOperationClass__closure3(), "right", new A.calculationOperationClass__closure4()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); - A.JSClassExtension_injectSuperclass(t1._as(A.SassCalculation_operateInternal0(B.CalculationOperator_g2q0, A.SassNumber_SassNumber0(1, _null), A.SassNumber_SassNumber0(1, _null), _null, false, _null).constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.calculationOperationClass__closure.prototype = { - call$4($self, strOperator, left, right) { - var operator = A.IterableExtension_firstWhereOrNull(B.List_kUZ, new A.calculationOperationClass___closure(strOperator)); - if (operator == null) - A.jsThrow0(new self.Error("Invalid operator: " + strOperator)); - A._assertCalculationValue(left); - A._assertCalculationValue(right); - return A.SassCalculation_operateInternal0(operator, left, right, null, false, null); - }, - "call*": "call$4", - $requiredArgCount: 4, - $signature: 378 - }; - A.calculationOperationClass___closure.prototype = { - call$1(value) { - return value.operator === this.strOperator; - }, - $signature: 379 - }; - A.calculationOperationClass__closure0.prototype = { - call$2($self, other) { - return $self.$eq(0, other); - }, - $signature: 380 - }; - A.calculationOperationClass__closure1.prototype = { - call$1($self) { - return $self.get$hashCode(0); - }, - $signature: 381 - }; - A.calculationOperationClass__closure2.prototype = { - call$1($self) { - return $self._calculation0$_operator.operator; - }, - $signature: 382 - }; - A.calculationOperationClass__closure3.prototype = { - call$1($self) { - return $self._calculation0$_left; - }, - $signature: 221 - }; - A.calculationOperationClass__closure4.prototype = { - call$1($self) { - return $self._calculation0$_right; - }, - $signature: 221 - }; - A.calculationInterpolationClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.CalculationInterpolation", new A.calculationInterpolationClass__closure())), - t2 = type$.String, - t3 = type$.Function; - A.LinkedHashMap_LinkedHashMap$_literal(["equals", new A.calculationInterpolationClass__closure0(), "hashCode", new A.calculationInterpolationClass__closure1()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); - A.LinkedHashMap_LinkedHashMap$_literal(["value", new A.calculationInterpolationClass__closure2()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); - A.JSClassExtension_injectSuperclass(t1._as(new A.CalculationInterpolation("").constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.calculationInterpolationClass__closure.prototype = { - call$2($self, value) { - return new A.CalculationInterpolation(value); - }, - $signature: 384 - }; - A.calculationInterpolationClass__closure0.prototype = { - call$2($self, other) { - return other instanceof A.CalculationInterpolation && $self._calculation0$_value === other._calculation0$_value; - }, - $signature: 385 - }; - A.calculationInterpolationClass__closure1.prototype = { - call$1($self) { - return B.JSString_methods.get$hashCode($self._calculation0$_value); - }, - $signature: 386 - }; - A.calculationInterpolationClass__closure2.prototype = { - call$1($self) { - return $self._calculation0$_value; - }, - $signature: 387 - }; - A.SassCalculation0.prototype = { - get$isSpecialNumber() { - return true; - }, - accept$1$1(visitor) { - return visitor.visitCalculation$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertCalculation$1($name) { - return this; - }, - plus$1(other) { - if (other instanceof A.SassString0) - return this.super$Value$plus0(other); - throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); - }, - minus$1(other) { - return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); - }, - unaryPlus$0() { - return A.throwExpression(A.SassScriptException$0('Undefined operation "+' + this.toString$0(0) + '".', null)); - }, - unaryMinus$0() { - return A.throwExpression(A.SassScriptException$0('Undefined operation "-' + this.toString$0(0) + '".', null)); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.SassCalculation0 && this.name === other.name && B.C_ListEquality.equals$2(0, this.$arguments, other.$arguments); - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this.name) ^ B.C_ListEquality0.hash$1(this.$arguments); - } - }; - A.SassCalculation__verifyLength_closure0.prototype = { - call$1(arg) { - return arg instanceof A.SassString0; - }, - $signature: 67 - }; - A.CalculationOperation0.prototype = { - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.CalculationOperation0 && this._calculation0$_operator === other._calculation0$_operator && J.$eq$(this._calculation0$_left, other._calculation0$_left) && J.$eq$(this._calculation0$_right, other._calculation0$_right); - }, - get$hashCode(_) { - return (A.Primitives_objectHashCode(this._calculation0$_operator) ^ J.get$hashCode$(this._calculation0$_left) ^ J.get$hashCode$(this._calculation0$_right)) >>> 0; - }, - toString$0(_) { - var parenthesized = A.serializeValue0(new A.SassCalculation0("", A._setArrayType([this], type$.JSArray_Object)), true, true); - return B.JSString_methods.substring$2(parenthesized, 1, parenthesized.length - 1); - } - }; - A.CalculationOperator0.prototype = { - _enumToString$0() { - return "CalculationOperator." + this._name; - }, - toString$0(_) { - return this.name; - } - }; - A.CalculationInterpolation.prototype = { - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.CalculationInterpolation && this._calculation0$_value === other._calculation0$_value; - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this._calculation0$_value); - }, - toString$0(_) { - return this._calculation0$_value; - } - }; - A.CallableDeclaration0.prototype = { - get$span(receiver) { - return this.span; - } - }; - A.updateCanonicalizeContextPrototype_closure.prototype = { - call$1($self) { - return $self._canonicalize_context$_fromImport; - }, - $signature: 388 - }; - A.updateCanonicalizeContextPrototype_closure0.prototype = { - call$1($self) { - $self._canonicalize_context$_wasContainingUrlAccessed = true; - return A.NullableExtension_andThen0($self._canonicalize_context$_containingUrl, A.utils3__dartToJSUrl$closure()); - }, - $signature: 389 - }; - A.CanonicalizeContext0.prototype = { - withFromImport$1$2(fromImport, callback) { - var t1, - oldFromImport = this._canonicalize_context$_fromImport; - this._canonicalize_context$_fromImport = true; - try { - t1 = callback.call$0(); - return t1; - } finally { - this._canonicalize_context$_fromImport = oldFromImport; - } - }, - withFromImport$2(fromImport, callback) { - return this.withFromImport$1$2(fromImport, callback, type$.dynamic); - } - }; - A.ColorChannel0.prototype = { - isAnalogous$1(other) { - var _0_6_isSet, t1, _0_60, t2, _0_6_isSet0, - _0_1 = this.name, - _0_6 = other.name; - $label0$0: { - if ("red" !== _0_1) - _0_6_isSet = "x" === _0_1; - else - _0_6_isSet = true; - if (_0_6_isSet) { - if ("red" !== _0_6) - t1 = "x" === _0_6; - else - t1 = true; - _0_60 = _0_6; - } else { - _0_60 = null; - t1 = false; - } - t2 = true; - if (!t1) { - if ("green" !== _0_1) - t1 = "y" === _0_1; - else - t1 = true; - if (t1) { - _0_6_isSet0 = true; - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - if ("green" !== t1) { - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - t1 = "y" === t1; - } else - t1 = true; - } else - t1 = false; - if (!t1) { - if ("blue" !== _0_1) - t1 = "z" === _0_1; - else - t1 = true; - if (t1) { - _0_6_isSet0 = true; - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - if ("blue" !== t1) { - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - t1 = "z" === t1; - } else - t1 = true; - } else - t1 = false; - if (!t1) { - if ("chroma" !== _0_1) - t1 = "saturation" === _0_1; - else - t1 = true; - if (t1) { - _0_6_isSet0 = true; - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - if ("chroma" !== t1) { - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_6_isSet = _0_6_isSet0; - _0_60 = t1; - } - t1 = "saturation" === t1; - } else - t1 = true; - } else - t1 = false; - if (!t1) { - if ("lightness" === _0_1) { - if (_0_6_isSet) - t1 = _0_60; - else { - t1 = _0_6; - _0_60 = t1; - _0_6_isSet = true; - } - t1 = "lightness" === t1; - } else - t1 = false; - if (!t1) - if ("hue" === _0_1) - t1 = "hue" === (_0_6_isSet ? _0_60 : _0_6); - else - t1 = false; - else - t1 = t2; - } else - t1 = t2; - } else - t1 = t2; - } else - t1 = t2; - } else - t1 = t2; - if (t1) - break $label0$0; - break $label0$0; - } - return t1; - } - }; - A.LinearChannel0.prototype = {}; - A.Chokidar0.prototype = {}; - A.ChokidarOptions0.prototype = {}; - A.ChokidarWatcher0.prototype = {}; - A.ClassSelector0.prototype = { - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.ClassSelector0 && other.name === this.name; - }, - accept$1$1(visitor) { - return visitor.visitClassSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - addSuffix$1(suffix) { - return new A.ClassSelector0(this.name + suffix, this.span); - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this.name); - } - }; - A.ClipGamutMap0.prototype = { - map$1(_, color) { - var t1 = color._color0$_space, - t2 = t1._space$_channels; - return A.SassColor_SassColor$forSpaceInternal0(t1, this._clip$_clampChannel$2(color.channel0OrNull, t2[0]), this._clip$_clampChannel$2(color.channel1OrNull, t2[1]), this._clip$_clampChannel$2(color.channel2OrNull, t2[2]), color.alphaOrNull); - }, - _clip$_clampChannel$2(value, channel) { - var t1, min; - if (value == null) - t1 = null; - else - $label0$0: { - if (channel instanceof A.LinearChannel0) { - min = channel.min; - t1 = isNaN(value) ? min : B.JSNumber_methods.clamp$2(value, min, channel.max); - break $label0$0; - } - t1 = value; - break $label0$0; - } - return t1; - } - }; - A._CloneCssVisitor0.prototype = { - visitCssAtRule$1(node) { - var t1 = node.isChildless, - rule = A.ModifiableCssAtRule$0(node.name, node.span, t1, node.value); - return t1 ? rule : this._clone_css$_visitChildren$2(rule, node); - }, - visitCssComment$1(node) { - return new A.ModifiableCssComment0(node.text, node.span); - }, - visitCssDeclaration$1(node) { - return A.ModifiableCssDeclaration$0(node.name, node.value, node.span, null, node.parsedAsCustomProperty, null, node.valueSpanForMap); - }, - visitCssImport$1(node) { - return new A.ModifiableCssImport0(node.url, node.modifiers, node.span); - }, - visitCssKeyframeBlock$1(node) { - return this._clone_css$_visitChildren$2(A.ModifiableCssKeyframeBlock$0(node.selector, node.span), node); - }, - visitCssMediaRule$1(node) { - return this._clone_css$_visitChildren$2(A.ModifiableCssMediaRule$0(node.queries, node.span), node); - }, - visitCssStyleRule$1(node) { - var _0_0 = this._clone_css$_oldToNewSelectors.$index(0, node._style_rule0$_selector._box0$_inner.value); - if (_0_0 != null) - return this._clone_css$_visitChildren$2(A.ModifiableCssStyleRule$0(_0_0, node.span, false, node.originalSelector), node); - else - throw A.wrapException(A.StateError$(string$.The_Ex)); - }, - visitCssStylesheet$1(node) { - return this._clone_css$_visitChildren$2(A.ModifiableCssStylesheet$0(node.get$span(node)), node); - }, - visitCssSupportsRule$1(node) { - return this._clone_css$_visitChildren$2(A.ModifiableCssSupportsRule$0(node.condition, node.span), node); - }, - _clone_css$_visitChildren$1$2(newParent, oldParent) { - var t1, t2, newChild; - for (t1 = J.get$iterator$ax(oldParent.get$children(oldParent)); t1.moveNext$0();) { - t2 = t1.get$current(t1); - newChild = t2.accept$1(this); - newChild.isGroupEnd = t2.get$isGroupEnd(); - newParent.addChild$1(newChild); - } - return newParent; - }, - _clone_css$_visitChildren$2(newParent, oldParent) { - return this._clone_css$_visitChildren$1$2(newParent, oldParent, type$.ModifiableCssParentNode_2); - } - }; - A.ColorExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitColorExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return A.serializeValue0(this.value, true, true); - }, - get$span(receiver) { - return this.span; - } - }; - A.global_closure44.prototype = { - call$1(color) { - return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "red")); - }, - $signature: 39 - }; - A.global_closure45.prototype = { - call$1(color) { - return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "green")); - }, - $signature: 39 - }; - A.global_closure46.prototype = { - call$1(color) { - return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "blue")); - }, - $signature: 39 - }; - A.global_closure47.prototype = { - call$1($arguments) { - return A._rgb0("rgb", $arguments); - }, - $signature: 3 - }; - A.global_closure48.prototype = { - call$1($arguments) { - return A._rgb0("rgb", $arguments); - }, - $signature: 3 - }; - A.global_closure49.prototype = { - call$1($arguments) { - return A._rgbTwoArg0("rgb", $arguments); - }, - $signature: 3 - }; - A.global_closure50.prototype = { - call$1($arguments) { - return A._parseChannels0("rgb", J.$index$asx($arguments, 0), "channels", B.RgbColorSpace_mlz0); - }, - $signature: 3 - }; - A.global_closure51.prototype = { - call$1($arguments) { - return A._rgb0("rgba", $arguments); - }, - $signature: 3 - }; - A.global_closure52.prototype = { - call$1($arguments) { - return A._rgb0("rgba", $arguments); - }, - $signature: 3 - }; - A.global_closure53.prototype = { - call$1($arguments) { - return A._rgbTwoArg0("rgba", $arguments); - }, - $signature: 3 - }; - A.global_closure54.prototype = { - call$1($arguments) { - return A._parseChannels0("rgba", J.$index$asx($arguments, 0), "channels", B.RgbColorSpace_mlz0); - }, - $signature: 3 - }; - A.global_closure55.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - if (!(t1.$index($arguments, 0) instanceof A.SassNumber0) && !t1.$index($arguments, 0).get$isSpecialNumber()) - A.warnForDeprecation0(string$.Globalci, B.Deprecation_Q5r); - return A._invert0($arguments, true); - }, - $signature: 3 - }; - A.global_closure56.prototype = { - call$1(color) { - return color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "hue"); - }, - $signature: 29 - }; - A.global_closure57.prototype = { - call$1(color) { - return color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "saturation"); - }, - $signature: 29 - }; - A.global_closure58.prototype = { - call$1(color) { - return color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "lightness"); - }, - $signature: 29 - }; - A.global_closure59.prototype = { - call$1($arguments) { - return A._hsl0("hsl", $arguments); - }, - $signature: 3 - }; - A.global_closure60.prototype = { - call$1($arguments) { - return A._hsl0("hsl", $arguments); - }, - $signature: 3 - }; - A.global_closure61.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0).get$isVar() || t1.$index($arguments, 1).get$isVar()) - return A._functionString0("hsl", $arguments); - else - throw A.wrapException(A.SassScriptException$0("Missing argument $lightness.", null)); - }, - $signature: 17 - }; - A.global_closure62.prototype = { - call$1($arguments) { - return A._parseChannels0("hsl", J.$index$asx($arguments, 0), "channels", B.HslColorSpace_gsm0); - }, - $signature: 3 - }; - A.global_closure63.prototype = { - call$1($arguments) { - return A._hsl0("hsla", $arguments); - }, - $signature: 3 - }; - A.global_closure64.prototype = { - call$1($arguments) { - return A._hsl0("hsla", $arguments); - }, - $signature: 3 - }; - A.global_closure65.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0).get$isVar() || t1.$index($arguments, 1).get$isVar()) - return A._functionString0("hsla", $arguments); - else - throw A.wrapException(A.SassScriptException$0("Missing argument $lightness.", null)); - }, - $signature: 17 - }; - A.global_closure66.prototype = { - call$1($arguments) { - return A._parseChannels0("hsla", J.$index$asx($arguments, 0), "channels", B.HslColorSpace_gsm0); - }, - $signature: 3 - }; - A.global_closure67.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0) instanceof A.SassNumber0 || t1.$index($arguments, 0).get$isSpecialNumber()) - return A._functionString0("grayscale", $arguments); - else { - A.warnForDeprecation0(string$.Globalcg, B.Deprecation_Q5r); - return A._grayscale0(t1.$index($arguments, 0)); - } - }, - $signature: 3 - }; - A.global_closure68.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - degrees = A._angleValue0(t1.$index($arguments, 1), "degrees"); - if (!color._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0(string$.adjusto, null)); - A.warnForDeprecation0(string$.adjustd + A.SassNumber_SassNumber0(degrees, "deg").toString$0(0) + string$.x29x0a_Mor_, B.Deprecation_rb9); - return color.changeHsl$1$hue(color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "hue") + degrees); - }, - $signature: 22 - }; - A.global_closure69.prototype = { - call$1($arguments) { - var result, - _s9_ = "lightness", - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - amount = t1.$index($arguments, 1).assertNumber$1("amount"); - if (!color._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0(string$.lighte, null)); - t1 = color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, _s9_) + amount.valueInRange$3(0, 100, "amount"); - result = color.changeHsl$1$lightness(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); - A.warnForDeprecation0("lighten() is deprecated. " + A._suggestScaleAndAdjust0(color, amount._number1$_value, _s9_) + string$.x0a_Morex3ac, B.Deprecation_rb9); - return result; - }, - $signature: 22 - }; - A.global_closure70.prototype = { - call$1($arguments) { - var result, - _s9_ = "lightness", - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - amount = t1.$index($arguments, 1).assertNumber$1("amount"); - if (!color._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0(string$.darken, null)); - t1 = color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, _s9_) - amount.valueInRange$3(0, 100, "amount"); - result = color.changeHsl$1$lightness(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); - A.warnForDeprecation0("darken() is deprecated. " + A._suggestScaleAndAdjust0(color, -amount._number1$_value, _s9_) + string$.x0a_Morex3ac, B.Deprecation_rb9); - return result; - }, - $signature: 22 - }; - A.global_closure71.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0) instanceof A.SassNumber0 || t1.$index($arguments, 0).get$isSpecialNumber()) - return A._functionString0("saturate", $arguments); - return new A.SassString0("saturate(" + A.serializeValue0(t1.$index($arguments, 0).assertNumber$1("amount"), false, true) + ")", false); - }, - $signature: 17 - }; - A.global_closure72.prototype = { - call$1($arguments) { - var t1, color, amount, result, - _s10_ = "saturation"; - A.warnForDeprecation0(string$.Globalcad, B.Deprecation_Q5r); - t1 = J.getInterceptor$asx($arguments); - color = t1.$index($arguments, 0).assertColor$1("color"); - amount = t1.$index($arguments, 1).assertNumber$1("amount"); - if (!color._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0(string$.satura, null)); - t1 = color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, _s10_) + amount.valueInRange$3(0, 100, "amount"); - result = color.changeHsl$1$saturation(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); - A.warnForDeprecation0("saturate() is deprecated. " + A._suggestScaleAndAdjust0(color, amount._number1$_value, _s10_) + string$.x0a_Morex3ac, B.Deprecation_rb9); - return result; - }, - $signature: 22 - }; - A.global_closure73.prototype = { - call$1($arguments) { - var result, - _s10_ = "saturation", - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - amount = t1.$index($arguments, 1).assertNumber$1("amount"); - if (!color._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0(string$.desatu, null)); - t1 = color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, _s10_) - amount.valueInRange$3(0, 100, "amount"); - result = color.changeHsl$1$saturation(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); - A.warnForDeprecation0("desaturate() is deprecated. " + A._suggestScaleAndAdjust0(color, -amount._number1$_value, _s10_) + string$.x0a_Morex3ac, B.Deprecation_rb9); - return result; - }, - $signature: 22 - }; - A.global_closure74.prototype = { - call$1($arguments) { - return A._opacify0("opacify", $arguments); - }, - $signature: 22 - }; - A.global_closure75.prototype = { - call$1($arguments) { - return A._opacify0("fade-in", $arguments); - }, - $signature: 22 - }; - A.global_closure76.prototype = { - call$1($arguments) { - return A._transparentize0("transparentize", $arguments); - }, - $signature: 22 - }; - A.global_closure77.prototype = { - call$1($arguments) { - return A._transparentize0("fade-out", $arguments); - }, - $signature: 22 - }; - A.global_closure78.prototype = { - call$1($arguments) { - var _0_0 = J.$index$asx($arguments, 0), - t1 = false; - if (_0_0 instanceof A.SassString0) - if (!_0_0._string0$_hasQuotes) - t1 = B.JSString_methods.contains$1(_0_0._string0$_text, $.$get$_microsoftFilterStart0()); - if (t1) - return A._functionString0("alpha", $arguments); - if (_0_0 instanceof A.SassColor0 && !_0_0._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0(string$.alpha_, null)); - A.warnForDeprecation0(string$.Globalcal, B.Deprecation_Q5r); - t1 = _0_0.assertColor$1("color").alphaOrNull; - return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); - }, - $signature: 3 - }; - A.global_closure79.prototype = { - call$1($arguments) { - var t1, - argList = J.$index$asx($arguments, 0).get$asList(); - if (argList.length !== 0 && B.JSArray_methods.every$1(argList, new A.global__closure0())) - return A._functionString0("alpha", $arguments); - t1 = argList.length; - if (t1 === 0) - throw A.wrapException(A.SassScriptException$0("Missing argument $color.", null)); - else - throw A.wrapException(A.SassScriptException$0("Only 1 argument allowed, but " + t1 + " were passed.", null)); - }, - $signature: 17 - }; - A.global__closure0.prototype = { - call$1(argument) { - return argument instanceof A.SassString0 && !argument._string0$_hasQuotes && B.JSString_methods.contains$1(argument._string0$_text, $.$get$_microsoftFilterStart0()); - }, - $signature: 52 - }; - A.global_closure80.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0) instanceof A.SassNumber0 || t1.$index($arguments, 0).get$isSpecialNumber()) - return A._functionString0("opacity", $arguments); - A.warnForDeprecation0(string$.Globalco, B.Deprecation_Q5r); - t1 = t1.$index($arguments, 0).assertColor$1("color").alphaOrNull; - return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); - }, - $signature: 3 - }; - A.global_closure81.prototype = { - call$1($arguments) { - return A._parseChannels0("color", J.$index$asx($arguments, 0), "description", null); - }, - $signature: 3 - }; - A.global_closure82.prototype = { - call$1($arguments) { - return A._parseChannels0("hwb", J.$index$asx($arguments, 0), "channels", B.HwbColorSpace_06z0); - }, - $signature: 3 - }; - A.global_closure83.prototype = { - call$1($arguments) { - return A._parseChannels0("lab", J.$index$asx($arguments, 0), "channels", B.LabColorSpace_IF20); - }, - $signature: 3 - }; - A.global_closure84.prototype = { - call$1($arguments) { - return A._parseChannels0("lch", J.$index$asx($arguments, 0), "channels", B.LchColorSpace_wv80); - }, - $signature: 3 - }; - A.global_closure85.prototype = { - call$1($arguments) { - return A._parseChannels0("oklab", J.$index$asx($arguments, 0), "channels", B.OklabColorSpace_yrt0); - }, - $signature: 3 - }; - A.global_closure86.prototype = { - call$1($arguments) { - return A._parseChannels0("oklch", J.$index$asx($arguments, 0), "channels", B.OklchColorSpace_li80); - }, - $signature: 3 - }; - A.module_closure27.prototype = { - call$1(color) { - return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "red")); - }, - $signature: 39 - }; - A.module_closure28.prototype = { - call$1(color) { - return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "green")); - }, - $signature: 39 - }; - A.module_closure29.prototype = { - call$1(color) { - return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "blue")); - }, - $signature: 39 - }; - A.module_closure30.prototype = { - call$1($arguments) { - var result = A._invert0($arguments, false); - if (result instanceof A.SassString0) - A.warnForDeprecation0("Passing a number (" + A.S(J.$index$asx($arguments, 0)) + string$.x29x20to_ci + result.toString$0(0), B.Deprecation_4QP); - return result; - }, - $signature: 3 - }; - A.module_closure31.prototype = { - call$1(color) { - return color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "hue"); - }, - $signature: 29 - }; - A.module_closure32.prototype = { - call$1(color) { - return color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "saturation"); - }, - $signature: 29 - }; - A.module_closure33.prototype = { - call$1(color) { - return color._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "lightness"); - }, - $signature: 29 - }; - A.module_closure34.prototype = { - call$1($arguments) { - var result, - t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0) instanceof A.SassNumber0) { - result = A._functionString0("grayscale", t1.take$1($arguments, 1)); - A.warnForDeprecation0("Passing a number (" + A.S(t1.$index($arguments, 0)) + string$.x29x20to_cg + result.toString$0(0), B.Deprecation_4QP); - return result; - } - return A._grayscale0(t1.$index($arguments, 0)); - }, - $signature: 3 - }; - A.module_closure35.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - t2 = type$.JSArray_Value_2; - return A._parseChannels0("hwb", A.SassList$0(A._setArrayType([A.SassList$0(A._setArrayType([t1.$index($arguments, 0), t1.$index($arguments, 1), t1.$index($arguments, 2)], t2), B.ListSeparator_nbm0, false), t1.$index($arguments, 3)], t2), B.ListSeparator_cQA0, false), null, B.HwbColorSpace_06z0); - }, - $signature: 3 - }; - A.module_closure36.prototype = { - call$1($arguments) { - return A._parseChannels0("hwb", J.$index$asx($arguments, 0), "channels", B.HwbColorSpace_06z0); - }, - $signature: 3 - }; - A.module_closure37.prototype = { - call$1(color) { - return color._color0$_legacyChannel$2(B.HwbColorSpace_06z0, "whiteness"); - }, - $signature: 29 - }; - A.module_closure38.prototype = { - call$1(color) { - return color._color0$_legacyChannel$2(B.HwbColorSpace_06z0, "blackness"); - }, - $signature: 29 - }; - A.module_closure39.prototype = { - call$1($arguments) { - var result, - _0_0 = J.$index$asx($arguments, 0), - t1 = false; - if (_0_0 instanceof A.SassString0) - if (!_0_0._string0$_hasQuotes) - t1 = B.JSString_methods.contains$1(_0_0._string0$_text, $.$get$_microsoftFilterStart0()); - if (t1) { - result = A._functionString0("alpha", $arguments); - A.warnForDeprecation0(string$.Using_c + result.toString$0(0), B.Deprecation_4QP); - return result; - } - if (_0_0 instanceof A.SassColor0 && !_0_0._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0(string$.color_a, null)); - t1 = _0_0.assertColor$1("color").alphaOrNull; - return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); - }, - $signature: 3 - }; - A.module_closure40.prototype = { - call$1($arguments) { - var result, - t1 = J.getInterceptor$asx($arguments); - if (B.JSArray_methods.every$1(t1.$index($arguments, 0).get$asList(), new A.module__closure6())) { - result = A._functionString0("alpha", $arguments); - A.warnForDeprecation0(string$.Using_c + result.toString$0(0), B.Deprecation_4QP); - return result; - } - throw A.wrapException(A.SassScriptException$0("Only 1 argument allowed, but " + t1.get$length($arguments) + " were passed.", null)); - }, - $signature: 17 - }; - A.module__closure6.prototype = { - call$1(argument) { - return argument instanceof A.SassString0 && !argument._string0$_hasQuotes && B.JSString_methods.contains$1(argument._string0$_text, $.$get$_microsoftFilterStart0()); - }, - $signature: 52 - }; - A.module_closure41.prototype = { - call$1($arguments) { - var result, - t1 = J.getInterceptor$asx($arguments); - if (t1.$index($arguments, 0) instanceof A.SassNumber0) { - result = A._functionString0("opacity", $arguments); - A.warnForDeprecation0("Passing a number (" + A.S(t1.$index($arguments, 0)) + string$.x20to_co + result.toString$0(0), B.Deprecation_4QP); - return result; - } - t1 = t1.$index($arguments, 0).assertColor$1("color").alphaOrNull; - return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); - }, - $signature: 3 - }; - A.module_closure42.prototype = { - call$1($arguments) { - return new A.SassString0(J.get$first$ax($arguments).assertColor$1("color")._color0$_space.name, false); - }, - $signature: 17 - }; - A.module_closure43.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return A._colorInSpace0(t1.$index($arguments, 0), t1.$index($arguments, 1), false); - }, - $signature: 22 - }; - A.module_closure44.prototype = { - call$1($arguments) { - return J.$index$asx($arguments, 0).assertColor$1("color")._color0$_space.get$isLegacyInternal() ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A.module_closure45.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return t1.$index($arguments, 0).assertColor$1("color").isChannelMissing$3$channelName$colorName(A._channelName0(t1.$index($arguments, 1)), "channel", "color") ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A.module_closure46.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return A._colorInSpace0(t1.$index($arguments, 0), t1.$index($arguments, 1), true).get$isInGamut() ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A.module_closure47.prototype = { - call$1($arguments) { - var space, method, _s5_ = "space", _s6_ = "method", - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - t2 = t1.$index($arguments, 1); - if (t2.$eq(0, B.C__SassNull0)) - space = color._color0$_space; - else { - t2 = t2.assertString$1(_s5_); - t2.assertUnquoted$1(_s5_); - space = A.ColorSpace_fromName0(t2._string0$_text, _s5_); - } - if (J.$eq$(t1.$index($arguments, 2), B.C__SassNull0)) - throw A.wrapException(A.SassScriptException$0(string$.color_t, _s6_)); - t1 = t1.$index($arguments, 2).assertString$1(_s6_); - t1.assertUnquoted$1(_s6_); - method = A.GamutMapMethod_GamutMapMethod$fromName0(t1._string0$_text); - if (!space.get$isBoundedInternal()) - return color; - t1 = color.toSpace$1(space); - t1 = t1.get$isInGamut() ? t1 : method.map$1(0, t1); - return t1.toSpace$2$legacyMissing(color._color0$_space, false); - }, - $signature: 22 - }; - A.module_closure48.prototype = { - call$1($arguments) { - var channelIndex, channelInfo, channelValue, unit, - t1 = J.getInterceptor$asx($arguments), - color = A._colorInSpace0(t1.$index($arguments, 0), t1.$index($arguments, 2), true), - channelName = A._channelName0(t1.$index($arguments, 1)); - if (channelName === "alpha") { - t1 = color.alphaOrNull; - return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); - } - t1 = color._color0$_space._space$_channels; - channelIndex = B.JSArray_methods.indexWhere$1(t1, new A.module__closure5(channelName)); - if (channelIndex === -1) - throw A.wrapException(A.SassScriptException$0("Color " + color.toString$0(0) + " has no channel named " + channelName + ".", "channel")); - channelInfo = t1[channelIndex]; - channelValue = color.get$channels()[channelIndex]; - unit = channelInfo.associatedUnit; - return A.SassNumber_SassNumber0(unit === "%" ? channelValue * 100 / type$.LinearChannel_2._as(channelInfo).max : channelValue, unit); - }, - $signature: 25 - }; - A.module__closure5.prototype = { - call$1(channel) { - return channel.name === this.channelName; - }, - $signature: 77 - }; - A.module_closure49.prototype = { - call$1($arguments) { - var t2, t3, - t1 = J.getInterceptor$asx($arguments), - color1 = t1.$index($arguments, 0).assertColor$1("color1"), - color2 = t1.$index($arguments, 1).assertColor$1("color2"); - t1 = new A.module_closure_toXyzNoMissing0(); - if (color1._color0$_space === color2._color0$_space) { - t1 = color1.channel0OrNull; - t2 = false; - if (t1 == null) - t1 = 0; - t3 = color2.channel0OrNull; - if (A.fuzzyEquals0(t1, t3 == null ? 0 : t3)) { - t1 = color1.channel1OrNull; - if (t1 == null) - t1 = 0; - t3 = color2.channel1OrNull; - if (A.fuzzyEquals0(t1, t3 == null ? 0 : t3)) { - t1 = color1.channel2OrNull; - if (t1 == null) - t1 = 0; - t3 = color2.channel2OrNull; - if (A.fuzzyEquals0(t1, t3 == null ? 0 : t3)) { - t1 = color1.alphaOrNull; - if (t1 == null) - t1 = 0; - t2 = color2.alphaOrNull; - t1 = A.fuzzyEquals0(t1, t2 == null ? 0 : t2); - } else - t1 = t2; - } else - t1 = t2; - } else - t1 = t2; - } else - t1 = J.$eq$(t1.call$1(color1), t1.call$1(color2)); - return t1 ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A.module_closure_toXyzNoMissing0.prototype = { - call$1(color) { - var _1_1, _1_3, t1, _1_7, channel0, _1_8, channel1, _1_9, channel2, _1_10, alpha, _null = null; - $label0$0: { - _1_1 = color._color0$_space; - _1_3 = B.XyzD65ColorSpace_4CA0 === _1_1; - t1 = _1_3; - if (t1) - t1 = !(color.channel0OrNull == null || color.channel1OrNull == null || color.channel2OrNull == null || color.alphaOrNull == null); - else - t1 = false; - if (t1) { - t1 = color; - break $label0$0; - } - if (_1_3) { - _1_7 = color.channel0OrNull; - if (_1_7 == null) - _1_7 = 0; - channel0 = _1_7; - _1_8 = color.channel1OrNull; - if (_1_8 == null) - _1_8 = 0; - channel1 = _1_8; - _1_9 = color.channel2OrNull; - if (_1_9 == null) - _1_9 = 0; - channel2 = _1_9; - _1_10 = color.alphaOrNull; - if (_1_10 == null) - _1_10 = 0; - alpha = _1_10; - t1 = A.SassColor$_forSpace0(B.XyzD65ColorSpace_4CA0, channel0, channel1, channel2, alpha, _null); - break $label0$0; - } - _1_7 = color.channel0OrNull; - if (_1_7 == null) - _1_7 = 0; - channel0 = _1_7; - _1_8 = color.channel1OrNull; - if (_1_8 == null) - _1_8 = 0; - channel1 = _1_8; - _1_9 = color.channel2OrNull; - if (_1_9 == null) - _1_9 = 0; - channel2 = _1_9; - _1_10 = color.alphaOrNull; - if (_1_10 == null) - _1_10 = 0; - alpha = _1_10; - t1 = _1_1.convert$5(B.XyzD65ColorSpace_4CA0, channel0, channel1, channel2, alpha); - break $label0$0; - } - return t1; - }, - $signature: 397 - }; - A.module_closure50.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return A._colorInSpace0(t1.$index($arguments, 0), t1.$index($arguments, 2), true).isChannelPowerless$3$channelName$colorName(A._channelName0(t1.$index($arguments, 1)), "channel", "color") ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._mix_closure0.prototype = { - call$1($arguments) { - var _s6_ = "weight", - _s41_ = string$.To_usem, - _s29_ = ", you must provide a $method.", - t1 = J.getInterceptor$asx($arguments), - color1 = t1.$index($arguments, 0).assertColor$1("color1"), - color2 = t1.$index($arguments, 1).assertColor$1("color2"), - weight = t1.$index($arguments, 2).assertNumber$1(_s6_); - if (!J.$eq$(t1.$index($arguments, 3), B.C__SassNull0)) - return color1.interpolate$4$legacyMissing$weight(color2, A.InterpolationMethod_InterpolationMethod$fromValue0(t1.$index($arguments, 3), "method"), false, weight.valueInRangeWithUnit$4(0, 100, _s6_, "%") / 100); - A._checkPercent0(weight, _s6_); - if (!color1._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0(_s41_ + color1.toString$0(0) + _s29_, "color1")); - else if (!color2._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0(_s41_ + color2.toString$0(0) + _s29_, "color2")); - return A._mixLegacy0(color1, color2, weight); - }, - $signature: 22 - }; - A._complement_closure0.prototype = { - call$1($arguments) { - var space, t3, colorInSpace, t4, t5, t6, _s5_ = "space", - t1 = J.getInterceptor$asx($arguments), - color = t1.$index($arguments, 0).assertColor$1("color"), - t2 = color._color0$_space; - if (t2.get$isLegacyInternal() && J.$eq$(t1.$index($arguments, 1), B.C__SassNull0)) - space = B.HslColorSpace_gsm0; - else { - t3 = t1.$index($arguments, 1).assertString$1(_s5_); - t3.assertUnquoted$1(_s5_); - space = A.ColorSpace_fromName0(t3._string0$_text, _s5_); - } - if (!space.get$isPolarInternal()) - throw A.wrapException(A.SassScriptException$0("Color space " + space.toString$0(0) + " doesn't have a hue channel.", _s5_)); - colorInSpace = color.toSpace$2$legacyMissing(space, !J.$eq$(t1.$index($arguments, 1), B.C__SassNull0)); - t1 = space._space$_channels; - t3 = colorInSpace.channel0OrNull; - t4 = colorInSpace.channel1OrNull; - t5 = colorInSpace.channel2OrNull; - t6 = colorInSpace.alphaOrNull; - return (space.get$isLegacyInternal() ? A.SassColor_SassColor$forSpaceInternal0(space, A._adjustChannel0(colorInSpace, t1[0], t3, A.SassNumber_SassNumber0(180, null)), t4, t5, t6) : A.SassColor_SassColor$forSpaceInternal0(space, t3, t4, A._adjustChannel0(colorInSpace, t1[2], t5, A.SassNumber_SassNumber0(180, null)), t6)).toSpace$2$legacyMissing(t2, false); - }, - $signature: 22 - }; - A._adjust_closure0.prototype = { - call$1($arguments) { - return A._updateComponents0($arguments, true, false, false); - }, - $signature: 22 - }; - A._scale_closure0.prototype = { - call$1($arguments) { - return A._updateComponents0($arguments, false, false, true); - }, - $signature: 22 - }; - A._change_closure0.prototype = { - call$1($arguments) { - return A._updateComponents0($arguments, false, true, false); - }, - $signature: 22 - }; - A._ieHexStr_closure0.prototype = { - call$1($arguments) { - var t1, t2, t3, t4, t5, - color = J.$index$asx($arguments, 0).assertColor$1("color").toSpace$1(B.RgbColorSpace_mlz0); - color = color.get$isInGamut() ? color : B.LocalMindeGamutMap_Q7f0.map$1(0, color); - t1 = new A._ieHexStr_closure_hexString0(); - t2 = color.alphaOrNull; - t2 = A.S(t1.call$1((t2 == null ? 0 : t2) * 255)); - t3 = color.channel0OrNull; - t3 = A.S(t1.call$1(t3 == null ? 0 : t3)); - t4 = color.channel1OrNull; - t4 = A.S(t1.call$1(t4 == null ? 0 : t4)); - t5 = color.channel2OrNull; - return new A.SassString0("#" + t2 + t3 + t4 + A.S(t1.call$1(t5 == null ? 0 : t5)), false); - }, - $signature: 17 - }; - A._ieHexStr_closure_hexString0.prototype = { - call$1(component) { - return B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(A.fuzzyRound0(component), 16), 2, "0").toUpperCase(); - }, - $signature: 237 - }; - A._updateComponents_closure1.prototype = { - call$1(space) { - return this.originalColor.toSpace$2$legacyMissing(space, false); - }, - $signature: 398 - }; - A._updateComponents_closure2.prototype = { - call$1(info) { - return this._box_0.name === info.name; - }, - $signature: 77 - }; - A._changeColor_closure0.prototype = { - call$0() { - var t1 = this.alphaArg; - A.warnForDeprecation0("$alpha: Passing a unit other than % (" + A.S(t1) + string$.x29x20is_d + t1.unitSuggestion$1("alpha") + string$.x0a_See_, B.Deprecation_jV0); - return t1.valueInRange$3(0, 1, "alpha"); - }, - $signature: 241 - }; - A._adjustColor_closure0.prototype = { - call$1(alpha) { - return isNaN(alpha) ? 0 : B.JSNumber_methods.clamp$2(alpha, 0, 1); - }, - $signature: 15 - }; - A._functionString_closure0.prototype = { - call$1(argument) { - return A.serializeValue0(argument, false, true); - }, - $signature: 224 - }; - A._removedColorFunction_closure0.prototype = { - call$1($arguments) { - var t1 = this.name, - t2 = J.getInterceptor$asx($arguments), - t3 = A.S(t2.$index($arguments, 0)), - t4 = this.negative ? "-" : ""; - throw A.wrapException(A.SassScriptException$0("The function " + t1 + string$.x28__isn + t3 + ", $" + this.argument + ": " + t4 + A.S(t2.$index($arguments, 1)) + string$.x29x0a_Moro + t1, null)); - }, - $signature: 400 - }; - A._rgb_closure0.prototype = { - call$1(alpha) { - var t1 = A._percentageOrUnitless0(alpha.assertNumber$1("alpha"), 1, "alpha"); - return isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1); - }, - $signature: 225 - }; - A._hsl_closure0.prototype = { - call$1(alpha) { - var t1 = A._percentageOrUnitless0(alpha.assertNumber$1("alpha"), 1, "alpha"); - return isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1); - }, - $signature: 225 - }; - A._parseChannels_closure1.prototype = { - call$1($name) { - return $name + " channel"; - }, - $signature: 6 - }; - A._parseChannels_closure2.prototype = { - call$1(channel) { - return channel.get$isSpecialNumber(); - }, - $signature: 52 - }; - A._colorFromChannels_closure1.prototype = { - call$1(channel0) { - return A._angleValue0(channel0, "hue"); - }, - $signature: 99 - }; - A._colorFromChannels_closure2.prototype = { - call$1(channel0) { - return A._angleValue0(channel0, "hue"); - }, - $signature: 99 - }; - A._channelFromValue_closure0.prototype = { - call$1(value) { - var t1, _0_8, t2, _0_5, _0_8_isSet, upperClamped, t3, - _0_0 = this.channel; - $label0$0: { - t1 = _0_0 instanceof A.LinearChannel0; - if (t1 && _0_0.requiresPercent && !value.hasUnit$1("%")) - A.throwExpression(A.SassScriptException$0("Expected " + value.toString$0(0) + ' to have unit "%".', _0_0.name)); - _0_8 = null; - t2 = false; - if (t1) { - _0_5 = _0_0.lowerClamped; - _0_8_isSet = !_0_5; - if (_0_8_isSet) { - _0_8 = _0_0.upperClamped; - t2 = !_0_8; - } - } else { - _0_5 = null; - _0_8_isSet = false; - } - if (t2) { - t1 = A._percentageOrUnitless0(value, _0_0.max, _0_0.name); - break $label0$0; - } - if (t1 && !this.clamp) { - t1 = A._percentageOrUnitless0(value, _0_0.max, _0_0.name); - break $label0$0; - } - if (t1) { - upperClamped = _0_8_isSet ? _0_8 : _0_0.upperClamped; - t1 = _0_0.max; - t2 = A._percentageOrUnitless0(value, t1, _0_0.name); - t3 = _0_5 ? _0_0.min : -1 / 0; - t1 = upperClamped ? t1 : 1 / 0; - t1 = isNaN(t2) ? t3 : B.JSNumber_methods.clamp$2(t2, t3, t1); - break $label0$0; - } - t1 = B.JSNumber_methods.$mod(value.coerceValueToUnit$2("deg", _0_0.name), 360); - break $label0$0; - } - return t1; - }, - $signature: 99 - }; - A._channelFunction_closure0.prototype = { - call$1($arguments) { - var _this = this, - result = A.SassNumber_SassNumber0(_this.getter.call$1(J.get$first$ax($arguments).assertColor$1("color")), _this.unit), - t1 = _this.global ? "" : "color.", - t2 = _this.name; - A.warnForDeprecation0(t1 + t2 + string$.x28__is_d + t2 + '", $space: ' + _this.space.toString$0(0) + string$.x29x0a_Mor_, B.Deprecation_rb9); - return result; - }, - $signature: 25 - }; - A._suggestScaleAndAdjust_closure0.prototype = { - call$1(channel) { - return channel.name === this.channelName; - }, - $signature: 77 - }; - A.colorClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassColor", new A.colorClass__closure())), - t2 = type$.String, - t3 = type$.Function; - A.LinkedHashMap_LinkedHashMap$_literal(["equals", new A.colorClass__closure0(), "hashCode", new A.colorClass__closure1(), "toSpace", new A.colorClass__closure2(), "isInGamut", new A.colorClass__closure3(), "toGamut", new A.colorClass__closure4(), "channel", new A.colorClass__closure5(), "isChannelMissing", new A.colorClass__closure6(), "isChannelPowerless", new A.colorClass__closure7(), "change", new A.colorClass__closure8(), "interpolate", new A.colorClass__closure9()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); - A.LinkedHashMap_LinkedHashMap$_literal(["red", new A.colorClass__closure10(), "green", new A.colorClass__closure11(), "blue", new A.colorClass__closure12(), "hue", new A.colorClass__closure13(), "saturation", new A.colorClass__closure14(), "lightness", new A.colorClass__closure15(), "whiteness", new A.colorClass__closure16(), "blackness", new A.colorClass__closure17(), "alpha", new A.colorClass__closure18(), "space", new A.colorClass__closure19(), "isLegacy", new A.colorClass__closure20(), "channelsOrNull", new A.colorClass__closure21(), "channels", new A.colorClass__closure22()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); - A.JSClassExtension_injectSuperclass(t1._as(A.SassColor_SassColor$rgbInternal0(0, 0, 0, 1, null).constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.colorClass__closure.prototype = { - call$2($self, options) { - var t1, t2, t3, t4, _null = null; - switch (A._constructionSpace(options)) { - case B.RgbColorSpace_mlz0: - A._checkNullAlphaDeprecation(options); - t1 = J.getInterceptor$x(options); - t2 = t1.get$red(options); - t3 = t1.get$green(options); - t4 = t1.get$blue(options); - t1 = t1.get$alpha(options); - return A.SassColor_SassColor$rgbInternal0(t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); - case B.HslColorSpace_gsm0: - A._checkNullAlphaDeprecation(options); - t1 = J.getInterceptor$x(options); - t2 = t1.get$hue(options); - t3 = t1.get$saturation(options); - t4 = t1.get$lightness(options); - t1 = t1.get$alpha(options); - return A.SassColor_SassColor$hsl0(t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1); - case B.HwbColorSpace_06z0: - A._checkNullAlphaDeprecation(options); - t1 = J.getInterceptor$x(options); - t2 = t1.get$hue(options); - t3 = t1.get$whiteness(options); - t4 = t1.get$blackness(options); - t1 = t1.get$alpha(options); - return A.SassColor_SassColor$hwb0(t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1); - case B.LabColorSpace_IF20: - t1 = J.getInterceptor$x(options); - t2 = t1.get$lightness(options); - t3 = t1.get$a(options); - t4 = t1.get$b(options); - t1 = t1.get$alpha(options); - return A.SassColor$_forSpace0(B.LabColorSpace_IF20, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); - case B.OklabColorSpace_yrt0: - t1 = J.getInterceptor$x(options); - t2 = t1.get$lightness(options); - t3 = t1.get$a(options); - t4 = t1.get$b(options); - t1 = t1.get$alpha(options); - return A.SassColor$_forSpace0(B.OklabColorSpace_yrt0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); - case B.LchColorSpace_wv80: - t1 = J.getInterceptor$x(options); - t2 = t1.get$lightness(options); - t3 = t1.get$chroma(options); - t4 = t1.get$hue(options); - t1 = t1.get$alpha(options); - return A.SassColor_SassColor$forSpaceInternal0(B.LchColorSpace_wv80, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1); - case B.OklchColorSpace_li80: - t1 = J.getInterceptor$x(options); - t2 = t1.get$lightness(options); - t3 = t1.get$chroma(options); - t4 = t1.get$hue(options); - t1 = t1.get$alpha(options); - return A.SassColor_SassColor$forSpaceInternal0(B.OklchColorSpace_li80, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1); - case B.SrgbColorSpace_AD40: - t1 = J.getInterceptor$x(options); - t2 = t1.get$red(options); - t3 = t1.get$green(options); - t4 = t1.get$blue(options); - t1 = t1.get$alpha(options); - return A.SassColor$_forSpace0(B.SrgbColorSpace_AD40, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); - case B.SrgbLinearColorSpace_sEs0: - t1 = J.getInterceptor$x(options); - t2 = t1.get$red(options); - t3 = t1.get$green(options); - t4 = t1.get$blue(options); - t1 = t1.get$alpha(options); - return A.SassColor$_forSpace0(B.SrgbLinearColorSpace_sEs0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); - case B.DisplayP3ColorSpace_NQk0: - t1 = J.getInterceptor$x(options); - t2 = t1.get$red(options); - t3 = t1.get$green(options); - t4 = t1.get$blue(options); - t1 = t1.get$alpha(options); - return A.SassColor$_forSpace0(B.DisplayP3ColorSpace_NQk0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); - case B.A98RgbColorSpace_bdu0: - t1 = J.getInterceptor$x(options); - t2 = t1.get$red(options); - t3 = t1.get$green(options); - t4 = t1.get$blue(options); - t1 = t1.get$alpha(options); - return A.SassColor$_forSpace0(B.A98RgbColorSpace_bdu0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); - case B.ProphotoRgbColorSpace_KiG0: - t1 = J.getInterceptor$x(options); - t2 = t1.get$red(options); - t3 = t1.get$green(options); - t4 = t1.get$blue(options); - t1 = t1.get$alpha(options); - return A.SassColor$_forSpace0(B.ProphotoRgbColorSpace_KiG0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); - case B.Rec2020ColorSpace_2jN0: - t1 = J.getInterceptor$x(options); - t2 = t1.get$red(options); - t3 = t1.get$green(options); - t4 = t1.get$blue(options); - t1 = t1.get$alpha(options); - return A.SassColor$_forSpace0(B.Rec2020ColorSpace_2jN0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); - case B.XyzD50ColorSpace_2No0: - t1 = J.getInterceptor$x(options); - t2 = t1.get$x(options); - t3 = t1.get$y(options); - t4 = t1.get$z(options); - t1 = t1.get$alpha(options); - return A.SassColor$_forSpace0(B.XyzD50ColorSpace_2No0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); - case B.XyzD65ColorSpace_4CA0: - t1 = J.getInterceptor$x(options); - t2 = t1.get$x(options); - t3 = t1.get$y(options); - t4 = t1.get$z(options); - t1 = t1.get$alpha(options); - return A.SassColor$_forSpace0(B.XyzD65ColorSpace_4CA0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); - default: - throw A.wrapException("Unreachable"); - } - }, - $signature: 403 - }; - A.colorClass__closure0.prototype = { - call$2($self, other) { - return $self.$eq(0, other); - }, - $signature: 404 - }; - A.colorClass__closure1.prototype = { - call$1($self) { - return $self.get$hashCode(0); - }, - $signature: 39 - }; - A.colorClass__closure2.prototype = { - call$2($self, space) { - return A._toSpace($self, space); - }, - $signature: 405 - }; - A.colorClass__closure3.prototype = { - call$2($self, space) { - return A._toSpace($self, space).get$isInGamut(); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 406 - }; - A.colorClass__closure4.prototype = { - call$2($self, options) { - var t1 = J.getInterceptor$x(options), - t2 = A._toSpace($self, t1.get$space(options)); - t1 = A.GamutMapMethod_GamutMapMethod$fromName0(t1.get$method(options)); - t1 = t2.get$isInGamut() ? t2 : t1.map$1(0, t2); - return t1.toSpace$1($self._color0$_space); - }, - $signature: 407 - }; - A.colorClass__closure5.prototype = { - call$3($self, channel, options) { - return A._toSpace($self, options == null ? null : J.get$space$x(options)).channel$1(0, channel); - }, - call$2($self, channel) { - return this.call$3($self, channel, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 408 - }; - A.colorClass__closure6.prototype = { - call$2($self, channel) { - return $self.isChannelMissing$1(channel); - }, - $signature: 409 - }; - A.colorClass__closure7.prototype = { - call$3($self, channel, options) { - return A._toSpace($self, options == null ? null : J.get$space$x(options)).isChannelPowerless$1(channel); - }, - call$2($self, channel) { - return this.call$3($self, channel, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 410 - }; - A.colorClass__closure8.prototype = { - call$2($self, options) { - var t3, space, t4, t5, t6, color, changedValue, _0_2, changedColor, _0_4, _0_6, _null = null, - _s9_ = "whiteness", - _s9_0 = "blackness", - _s3_ = "hue", - _s10_ = "saturation", - _s9_1 = "lightness", - _s3_0 = "red", _s5_ = "green", _s4_ = "blue", _s5_0 = "alpha", - _s106_ = string$.Passin_, - _s105_ = "Passing `hue: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", - t1 = J.getInterceptor$x(options), - t2 = t1.get$space(options) == null, - spaceSetExplicitly = !t2; - if (spaceSetExplicitly) { - t3 = t1.get$space(options); - t3.toString; - space = A.ColorSpace_fromName0(t3, _null); - } else - space = $self._color0$_space; - t3 = $self._color0$_space; - if (t3.get$isLegacyInternal() && t2) { - if ("whiteness" in options || "blackness" in options) - space = B.HwbColorSpace_06z0; - else if ("hue" in options && t3 === B.HwbColorSpace_06z0) - space = B.HwbColorSpace_06z0; - else if ("hue" in options || "saturation" in options || "lightness" in options) - space = B.HslColorSpace_gsm0; - else if ("red" in options || "green" in options || "blue" in options) - space = B.RgbColorSpace_mlz0; - if (space !== t3) - A.warnForDeprecationFromApi("Changing a channel not in this color's space without explicitly specifying the `space` option is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - } - for (t2 = J.get$iterator$ax(self.Object.keys(options)), t4 = space._space$_channels, t5 = type$.JSArray_String; t2.moveNext$0();) { - t6 = t2.get$current(t2); - if (B.JSArray_methods.contains$1(A._setArrayType(["alpha", "space"], t5), t6)) - continue; - if (!B.JSArray_methods.any$1(t4, new A.colorClass___closure(t6))) - A.jsThrow(new self.Error("`" + t6 + "` is not a valid channel in `" + space.toString$0(0) + "`.")); - } - color = $self.toSpace$1(space); - changedValue = new A.colorClass__closure_changedValue(color, options); - $label0$2: { - _0_2 = B.HslColorSpace_gsm0 === space; - if (_0_2 && spaceSetExplicitly) { - changedColor = A.SassColor_SassColor$hsl0(changedValue.call$1(_s3_), changedValue.call$1(_s10_), changedValue.call$1(_s9_1), changedValue.call$1(_s5_0)); - break $label0$2; - } - if (_0_2) { - t2 = t1.get$hue(options); - t4 = $.$get$_isNull(); - if (A._asBool(t4.call$1(t2))) - A.warnForDeprecationFromApi(_s105_, B.Deprecation_FIw); - else if (A._asBool(t4.call$1(t1.get$saturation(options)))) - A.warnForDeprecationFromApi("Passing `saturation: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - else if (A._asBool(t4.call$1(t1.get$lightness(options)))) - A.warnForDeprecationFromApi("Passing `lightness: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - if (A._asBool(t4.call$1(t1.get$alpha(options)))) - A.warnForDeprecationFromApi(_s106_, B.Deprecation_mBb); - t2 = t1.get$hue(options); - if (t2 == null) - t2 = color.channel$1(0, _s3_); - t4 = t1.get$saturation(options); - if (t4 == null) - t4 = color.channel$1(0, _s10_); - t5 = t1.get$lightness(options); - if (t5 == null) - t5 = color.channel$1(0, _s9_1); - t1 = t1.get$alpha(options); - changedColor = A.SassColor_SassColor$hsl0(t2, t4, t5, t1 == null ? color.channel$1(0, _s5_0) : t1); - break $label0$2; - } - _0_4 = B.HwbColorSpace_06z0 === space; - if (_0_4 && spaceSetExplicitly) { - changedColor = A.SassColor_SassColor$hwb0(changedValue.call$1(_s3_), changedValue.call$1(_s9_), changedValue.call$1(_s9_0), changedValue.call$1(_s5_0)); - break $label0$2; - } - if (_0_4) { - t2 = t1.get$hue(options); - t4 = $.$get$_isNull(); - if (A._asBool(t4.call$1(t2))) - A.warnForDeprecationFromApi(_s105_, B.Deprecation_FIw); - else if (A._asBool(t4.call$1(t1.get$whiteness(options)))) - A.warnForDeprecationFromApi("Passing `whiteness: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - else if (A._asBool(t4.call$1(t1.get$blackness(options)))) - A.warnForDeprecationFromApi("Passing `blackness: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - if (A._asBool(t4.call$1(t1.get$alpha(options)))) - A.warnForDeprecationFromApi(_s106_, B.Deprecation_mBb); - t2 = t1.get$hue(options); - if (t2 == null) - t2 = color.channel$1(0, _s3_); - t4 = t1.get$whiteness(options); - if (t4 == null) - t4 = color.channel$1(0, _s9_); - t5 = t1.get$blackness(options); - if (t5 == null) - t5 = color.channel$1(0, _s9_0); - t1 = t1.get$alpha(options); - changedColor = A.SassColor_SassColor$hwb0(t2, t4, t5, t1 == null ? color.channel$1(0, _s5_0) : t1); - break $label0$2; - } - _0_6 = B.RgbColorSpace_mlz0 === space; - if (_0_6 && spaceSetExplicitly) { - changedColor = A.SassColor_SassColor$rgbInternal0(changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); - break $label0$2; - } - if (_0_6) { - t2 = t1.get$red(options); - t4 = $.$get$_isNull(); - if (A._asBool(t4.call$1(t2))) - A.warnForDeprecationFromApi("Passing `red: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - else if (A._asBool(t4.call$1(t1.get$green(options)))) - A.warnForDeprecationFromApi("Passing `green: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - else if (A._asBool(t4.call$1(t1.get$blue(options)))) - A.warnForDeprecationFromApi("Passing `blue: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - if (A._asBool(t4.call$1(t1.get$alpha(options)))) - A.warnForDeprecationFromApi(_s106_, B.Deprecation_mBb); - t2 = t1.get$red(options); - if (t2 == null) - t2 = color.channel$1(0, _s3_0); - t4 = t1.get$green(options); - if (t4 == null) - t4 = color.channel$1(0, _s5_); - t5 = t1.get$blue(options); - if (t5 == null) - t5 = color.channel$1(0, _s4_); - t1 = t1.get$alpha(options); - changedColor = A.SassColor_SassColor$rgbInternal0(t2, t4, t5, t1 == null ? color.channel$1(0, _s5_0) : t1, _null); - break $label0$2; - } - if (B.LabColorSpace_IF20 === space) { - changedColor = A.SassColor$_forSpace0(B.LabColorSpace_IF20, changedValue.call$1(_s9_1), changedValue.call$1("a"), changedValue.call$1("b"), changedValue.call$1(_s5_0), _null); - break $label0$2; - } - if (B.OklabColorSpace_yrt0 === space) { - changedColor = A.SassColor$_forSpace0(B.OklabColorSpace_yrt0, changedValue.call$1(_s9_1), changedValue.call$1("a"), changedValue.call$1("b"), changedValue.call$1(_s5_0), _null); - break $label0$2; - } - if (B.LchColorSpace_wv80 === space) { - changedColor = A.SassColor_SassColor$forSpaceInternal0(B.LchColorSpace_wv80, changedValue.call$1(_s9_1), changedValue.call$1("chroma"), changedValue.call$1(_s3_), changedValue.call$1(_s5_0)); - break $label0$2; - } - if (B.OklchColorSpace_li80 === space) { - changedColor = A.SassColor_SassColor$forSpaceInternal0(B.OklchColorSpace_li80, changedValue.call$1(_s9_1), changedValue.call$1("chroma"), changedValue.call$1(_s3_), changedValue.call$1(_s5_0)); - break $label0$2; - } - if (B.A98RgbColorSpace_bdu0 === space) { - changedColor = A.SassColor$_forSpace0(B.A98RgbColorSpace_bdu0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); - break $label0$2; - } - if (B.DisplayP3ColorSpace_NQk0 === space) { - changedColor = A.SassColor$_forSpace0(B.DisplayP3ColorSpace_NQk0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); - break $label0$2; - } - if (B.ProphotoRgbColorSpace_KiG0 === space) { - changedColor = A.SassColor$_forSpace0(B.ProphotoRgbColorSpace_KiG0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); - break $label0$2; - } - if (B.Rec2020ColorSpace_2jN0 === space) { - changedColor = A.SassColor$_forSpace0(B.Rec2020ColorSpace_2jN0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); - break $label0$2; - } - if (B.SrgbColorSpace_AD40 === space) { - changedColor = A.SassColor$_forSpace0(B.SrgbColorSpace_AD40, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); - break $label0$2; - } - if (B.SrgbLinearColorSpace_sEs0 === space) { - changedColor = A.SassColor$_forSpace0(B.SrgbLinearColorSpace_sEs0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); - break $label0$2; - } - if (B.XyzD50ColorSpace_2No0 === space) { - changedColor = A.SassColor_SassColor$forSpaceInternal0(space, changedValue.call$1("x"), changedValue.call$1("y"), changedValue.call$1("z"), changedValue.call$1(_s5_0)); - break $label0$2; - } - if (B.XyzD65ColorSpace_4CA0 === space) { - changedColor = A.SassColor_SassColor$forSpaceInternal0(space, changedValue.call$1("x"), changedValue.call$1("y"), changedValue.call$1("z"), changedValue.call$1(_s5_0)); - break $label0$2; - } - throw A.wrapException("No space set"); - } - return changedColor.toSpace$1(t3); - }, - $signature: 411 - }; - A.colorClass___closure.prototype = { - call$1(channel) { - return channel.name === this.key; - }, - $signature: 77 - }; - A.colorClass__closure_changedValue.prototype = { - call$1(channel) { - var t2, - t1 = this.options; - if (channel in t1) { - t2 = t1[channel]; - t2 = !A._asBool($.$get$_isUndefined().call$1(t2)); - } else - t2 = false; - return t2 ? t1[channel] : this.color.channel$1(0, channel); - }, - $signature: 412 - }; - A.colorClass__closure9.prototype = { - call$3($self, color2, options) { - var interpolationMethod, t2, - t1 = options == null, - _1_0 = t1 ? null : J.get$method$x(options); - if (_1_0 != null) - interpolationMethod = A.InterpolationMethod$0($self._color0$_space, A.EnumByName_byName(B.List_23h, _1_0)); - else { - t2 = $self._color0$_space; - interpolationMethod = !t2.get$isPolarInternal() ? A.InterpolationMethod$0(t2, null) : A.InterpolationMethod$0(t2, B.HueInterpolationMethod_00); - } - return $self.interpolate$3$weight(color2, interpolationMethod, t1 ? null : J.get$weight$x(options)); - }, - call$2($self, color2) { - return this.call$3($self, color2, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 413 - }; - A.colorClass__closure10.prototype = { - call$1($self) { - A.warnForDeprecationFromApi("red is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - return B.JSNumber_methods.round$0($self._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "red")); - }, - $signature: 39 - }; - A.colorClass__closure11.prototype = { - call$1($self) { - A.warnForDeprecationFromApi("green is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - return B.JSNumber_methods.round$0($self._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "green")); - }, - $signature: 39 - }; - A.colorClass__closure12.prototype = { - call$1($self) { - A.warnForDeprecationFromApi("blue is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - return B.JSNumber_methods.round$0($self._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "blue")); - }, - $signature: 39 - }; - A.colorClass__closure13.prototype = { - call$1($self) { - A.warnForDeprecationFromApi("hue is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - return $self._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "hue"); - }, - $signature: 29 - }; - A.colorClass__closure14.prototype = { - call$1($self) { - A.warnForDeprecationFromApi("saturation is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - return $self._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "saturation"); - }, - $signature: 29 - }; - A.colorClass__closure15.prototype = { - call$1($self) { - A.warnForDeprecationFromApi("lightness is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - return $self._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "lightness"); - }, - $signature: 29 - }; - A.colorClass__closure16.prototype = { - call$1($self) { - A.warnForDeprecationFromApi("whiteness is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - return $self._color0$_legacyChannel$2(B.HwbColorSpace_06z0, "whiteness"); - }, - $signature: 29 - }; - A.colorClass__closure17.prototype = { - call$1($self) { - A.warnForDeprecationFromApi("blackness is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_FIw); - return $self._color0$_legacyChannel$2(B.HwbColorSpace_06z0, "blackness"); - }, - $signature: 29 - }; - A.colorClass__closure18.prototype = { - call$1($self) { - var t1 = $self.alphaOrNull; - return t1 == null ? 0 : t1; - }, - $signature: 29 - }; - A.colorClass__closure19.prototype = { - call$1($self) { - return $self._color0$_space.name; - }, - $signature: 414 - }; - A.colorClass__closure20.prototype = { - call$1($self) { - return $self._color0$_space.get$isLegacyInternal(); - }, - $signature: 415 - }; - A.colorClass__closure21.prototype = { - call$1($self) { - return new self.immutable.List($self.get$channelsOrNull()); - }, - $signature: 227 - }; - A.colorClass__closure22.prototype = { - call$1($self) { - return new self.immutable.List($self.get$channels()); - }, - $signature: 227 - }; - A._Channels.prototype = {}; - A._ConstructionOptions.prototype = {}; - A._ChannelOptions.prototype = {}; - A._ToGamutOptions.prototype = {}; - A._InterpolationOptions.prototype = {}; - A._NodeSassColor.prototype = {}; - A.legacyColorClass_closure.prototype = { - call$6(thisArg, redOrArgb, green, blue, alpha, dartValue) { - var red, t1, t2, t3, t4; - if (dartValue != null) { - J.set$dartValue$x(thisArg, dartValue); - return; - } - if (green == null || blue == null) { - A._asInt(redOrArgb); - alpha = B.JSInt_methods._shrOtherPositive$1(redOrArgb, 24) / 255; - red = B.JSInt_methods.$mod(B.JSInt_methods._shrOtherPositive$1(redOrArgb, 16), 256); - green = B.JSInt_methods.$mod(B.JSInt_methods._shrOtherPositive$1(redOrArgb, 8), 256); - blue = B.JSInt_methods.$mod(redOrArgb, 256); - } else { - redOrArgb.toString; - red = redOrArgb; - } - t1 = A.fuzzyRound0(isNaN(red) ? 0 : B.JSNumber_methods.clamp$2(red, 0, 255)); - t2 = A.fuzzyRound0(isNaN(green) ? 0 : B.JSNumber_methods.clamp$2(green, 0, 255)); - t3 = A.fuzzyRound0(isNaN(blue) ? 0 : B.JSNumber_methods.clamp$2(blue, 0, 255)); - t4 = A.NullableExtension_andThen0(alpha, new A.legacyColorClass__closure()); - J.set$dartValue$x(thisArg, A.SassColor_SassColor$rgbInternal0(t1, t2, t3, t4 == null ? 1 : t4, null)); - }, - call$2(thisArg, redOrArgb) { - var _null = null; - return this.call$6(thisArg, redOrArgb, _null, _null, _null, _null); - }, - call$3(thisArg, redOrArgb, green) { - return this.call$6(thisArg, redOrArgb, green, null, null, null); - }, - call$4(thisArg, redOrArgb, green, blue) { - return this.call$6(thisArg, redOrArgb, green, blue, null, null); - }, - call$5(thisArg, redOrArgb, green, blue, alpha) { - return this.call$6(thisArg, redOrArgb, green, blue, alpha, null); - }, - "call*": "call$6", - $requiredArgCount: 2, - $defaultValues() { - return [null, null, null, null]; - }, - $signature: 417 - }; - A.legacyColorClass__closure.prototype = { - call$1(alpha) { - return isNaN(alpha) ? 0 : B.JSNumber_methods.clamp$2(alpha, 0, 1); - }, - $signature: 418 - }; - A.legacyColorClass_closure0.prototype = { - call$1(thisArg) { - return B.JSNumber_methods.round$0(J.get$dartValue$x(thisArg)._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "red")); - }, - $signature: 124 - }; - A.legacyColorClass_closure1.prototype = { - call$1(thisArg) { - return B.JSNumber_methods.round$0(J.get$dartValue$x(thisArg)._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "green")); - }, - $signature: 124 - }; - A.legacyColorClass_closure2.prototype = { - call$1(thisArg) { - return B.JSNumber_methods.round$0(J.get$dartValue$x(thisArg)._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "blue")); - }, - $signature: 124 - }; - A.legacyColorClass_closure3.prototype = { - call$1(thisArg) { - var t1 = J.get$dartValue$x(thisArg).alphaOrNull; - return t1 == null ? 0 : t1; - }, - $signature: 420 - }; - A.legacyColorClass_closure4.prototype = { - call$2(thisArg, value) { - var t1 = J.getInterceptor$x(thisArg), - t2 = t1.get$dartValue(thisArg); - t1.set$dartValue(thisArg, t2.changeRgb$1$red(A.fuzzyRound0(isNaN(value) ? 0 : B.JSNumber_methods.clamp$2(value, 0, 255)))); - }, - $signature: 87 - }; - A.legacyColorClass_closure5.prototype = { - call$2(thisArg, value) { - var t1 = J.getInterceptor$x(thisArg), - t2 = t1.get$dartValue(thisArg); - t1.set$dartValue(thisArg, t2.changeRgb$1$green(A.fuzzyRound0(isNaN(value) ? 0 : B.JSNumber_methods.clamp$2(value, 0, 255)))); - }, - $signature: 87 - }; - A.legacyColorClass_closure6.prototype = { - call$2(thisArg, value) { - var t1 = J.getInterceptor$x(thisArg), - t2 = t1.get$dartValue(thisArg); - t1.set$dartValue(thisArg, t2.changeRgb$1$blue(A.fuzzyRound0(isNaN(value) ? 0 : B.JSNumber_methods.clamp$2(value, 0, 255)))); - }, - $signature: 87 - }; - A.legacyColorClass_closure7.prototype = { - call$2(thisArg, value) { - var t1 = J.getInterceptor$x(thisArg), - t2 = t1.get$dartValue(thisArg); - t1.set$dartValue(thisArg, t2.changeRgb$1$alpha(isNaN(value) ? 0 : B.JSNumber_methods.clamp$2(value, 0, 1))); - }, - $signature: 87 - }; - A.SassColor0.prototype = { - get$channels() { - var t2, t3, - t1 = this.channel0OrNull; - if (t1 == null) - t1 = 0; - t2 = this.channel1OrNull; - if (t2 == null) - t2 = 0; - t3 = this.channel2OrNull; - return A.List_List$unmodifiable([t1, t2, t3 == null ? 0 : t3], type$.double); - }, - get$channelsOrNull() { - return A.List_List$unmodifiable([this.channel0OrNull, this.channel1OrNull, this.channel2OrNull], type$.nullable_double); - }, - get$isChannel0Powerless() { - var t1, t2, _this = this, - _0_0 = _this._color0$_space; - $label0$0: { - if (B.HslColorSpace_gsm0 === _0_0) { - t1 = _this.channel1OrNull; - t1 = A.fuzzyEquals0(t1 == null ? 0 : t1, 0); - break $label0$0; - } - if (B.HwbColorSpace_06z0 === _0_0) { - t1 = _this.channel1OrNull; - if (t1 == null) - t1 = 0; - t2 = _this.channel2OrNull; - t1 += t2 == null ? 0 : t2; - t1 = t1 > 100 || A.fuzzyEquals0(t1, 100); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - get$isChannel2Powerless() { - var t1, - _0_0 = this._color0$_space; - $label0$0: { - if (B.LchColorSpace_wv80 === _0_0 || B.OklchColorSpace_li80 === _0_0) { - t1 = this.channel1OrNull; - t1 = A.fuzzyEquals0(t1 == null ? 0 : t1, 0); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - get$isInGamut() { - var t2, t3, _this = this, - t1 = _this._color0$_space; - if (!t1.get$isBoundedInternal()) - return true; - t2 = _this.channel0OrNull; - if (t2 == null) - t2 = 0; - t1 = t1._space$_channels; - t3 = false; - if (_this._color0$_isChannelInGamut$2(t2, t1[0])) { - t2 = _this.channel1OrNull; - if (t2 == null) - t2 = 0; - if (_this._color0$_isChannelInGamut$2(t2, t1[1])) { - t2 = _this.channel2OrNull; - if (t2 == null) - t2 = 0; - t1 = _this._color0$_isChannelInGamut$2(t2, t1[2]); - } else - t1 = t3; - } else - t1 = t3; - return t1; - }, - _color0$_isChannelInGamut$2(value, channel) { - var min, max, t1; - $label0$0: { - if (channel instanceof A.LinearChannel0) { - min = channel.min; - max = channel.max; - if (value < max || A.fuzzyEquals0(value, max)) - t1 = value > min || A.fuzzyEquals0(value, min); - else - t1 = false; - break $label0$0; - } - t1 = true; - break $label0$0; - } - return t1; - }, - accept$1$1(visitor) { - return visitor.visitColor$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertColor$1($name) { - return this; - }, - assertLegacy$1($name) { - if (this._color0$_space.get$isLegacyInternal()) - return; - throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + string$.x20to_be, $name)); - }, - channel$1(_, channel) { - var t1, _this = this, - channels = _this._color0$_space._space$_channels; - if (channel === channels[0].name) { - t1 = _this.channel0OrNull; - return t1 == null ? 0 : t1; - } - if (channel === channels[1].name) { - t1 = _this.channel1OrNull; - return t1 == null ? 0 : t1; - } - if (channel === channels[2].name) { - t1 = _this.channel2OrNull; - return t1 == null ? 0 : t1; - } - if (channel === "alpha") { - t1 = _this.alphaOrNull; - return t1 == null ? 0 : t1; - } - throw A.wrapException(A.SassScriptException$0("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', null)); - }, - isChannelMissing$3$channelName$colorName(channel, channelName, colorName) { - var _this = this, - channels = _this._color0$_space._space$_channels; - if (channel === channels[0].name) - return _this.channel0OrNull == null; - if (channel === channels[1].name) - return _this.channel1OrNull == null; - if (channel === channels[2].name) - return _this.channel2OrNull == null; - if (channel === "alpha") - return _this.alphaOrNull == null; - throw A.wrapException(A.SassScriptException$0("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', channelName)); - }, - isChannelMissing$1(channel) { - return this.isChannelMissing$3$channelName$colorName(channel, null, null); - }, - isChannelPowerless$3$channelName$colorName(channel, channelName, colorName) { - var _this = this, - channels = _this._color0$_space._space$_channels; - if (channel === channels[0].name) - return _this.get$isChannel0Powerless(); - if (channel === channels[1].name) - return false; - if (channel === channels[2].name) - return _this.get$isChannel2Powerless(); - if (channel === "alpha") - return false; - throw A.wrapException(A.SassScriptException$0("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', channelName)); - }, - isChannelPowerless$1(channel) { - return this.isChannelPowerless$3$channelName$colorName(channel, null, null); - }, - _color0$_legacyChannel$2(space, channel) { - if (!this._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0("color." + channel + string$.x28__is_oc, null)); - return this.toSpace$1(space).channel$1(0, channel); - }, - toSpace$2$legacyMissing(space, legacyMissing) { - var t2, converted, t3, t4, _this = this, - t1 = _this._color0$_space; - if (t1 === space) - return _this; - t2 = _this.alphaOrNull; - if (t2 == null) - t2 = 0; - converted = t1.convert$5(space, _this.channel0OrNull, _this.channel1OrNull, _this.channel2OrNull, t2); - t1 = false; - if (!legacyMissing) - if (converted._color0$_space.get$isLegacyInternal()) - t1 = converted.channel0OrNull == null || converted.channel1OrNull == null || converted.channel2OrNull == null || converted.alphaOrNull == null; - if (t1) { - t1 = converted.channel0OrNull; - if (t1 == null) - t1 = 0; - t2 = converted.channel1OrNull; - if (t2 == null) - t2 = 0; - t3 = converted.channel2OrNull; - if (t3 == null) - t3 = 0; - t4 = converted.alphaOrNull; - if (t4 == null) - t4 = 0; - t4 = A.SassColor_SassColor$forSpaceInternal0(converted._color0$_space, t1, t2, t3, t4); - t1 = t4; - } else - t1 = converted; - return t1; - }, - toSpace$1(space) { - return this.toSpace$2$legacyMissing(space, true); - }, - changeRgb$4$alpha$blue$green$red(alpha, blue, green, red) { - var t1, t2, t3, t4, _this = this, _null = null; - if (!_this._color0$_space.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0("color.changeRgb() is only supported for legacy colors. Please use color.changeChannels() instead with an explicit $space argument.", _null)); - t1 = red == null ? _null : red; - if (t1 == null) - t1 = _this.channel$1(0, "red"); - t2 = green == null ? _null : green; - if (t2 == null) - t2 = _this.channel$1(0, "green"); - t3 = blue == null ? _null : blue; - if (t3 == null) - t3 = _this.channel$1(0, "blue"); - t4 = alpha == null ? _null : alpha; - if (t4 == null) { - t4 = _this.alphaOrNull; - if (t4 == null) - t4 = 0; - } - return A.SassColor_SassColor$rgbInternal0(t1, t2, t3, t4, _null); - }, - changeRgb$1$alpha(alpha) { - return this.changeRgb$4$alpha$blue$green$red(alpha, null, null, null); - }, - changeRgb$1$blue(blue) { - return this.changeRgb$4$alpha$blue$green$red(null, blue, null, null); - }, - changeRgb$1$green(green) { - return this.changeRgb$4$alpha$blue$green$red(null, null, green, null); - }, - changeRgb$1$red(red) { - return this.changeRgb$4$alpha$blue$green$red(null, null, null, red); - }, - changeHsl$3$hue$lightness$saturation(hue, lightness, saturation) { - var t2, t3, t4, t5, _this = this, _null = null, - t1 = _this._color0$_space; - if (!t1.get$isLegacyInternal()) - throw A.wrapException(A.SassScriptException$0(string$.color_c, _null)); - t2 = hue == null ? _null : hue; - if (t2 == null) - t2 = _this._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "hue"); - t3 = saturation == null ? _null : saturation; - if (t3 == null) - t3 = _this._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "saturation"); - t4 = lightness == null ? _null : lightness; - if (t4 == null) - t4 = _this._color0$_legacyChannel$2(B.HslColorSpace_gsm0, "lightness"); - t5 = _this.alphaOrNull; - if (t5 == null) - t5 = 0; - return A.SassColor_SassColor$hsl0(t2, t3, t4, t5).toSpace$1(t1); - }, - changeHsl$1$saturation(saturation) { - return this.changeHsl$3$hue$lightness$saturation(null, null, saturation); - }, - changeHsl$1$lightness(lightness) { - return this.changeHsl$3$hue$lightness$saturation(null, lightness, null); - }, - changeHsl$1$hue(hue) { - return this.changeHsl$3$hue$lightness$saturation(hue, null, null); - }, - changeAlpha$1(alpha) { - var t2, t3, _this = this, - t1 = _this.channel0OrNull; - if (t1 == null) - t1 = 0; - t2 = _this.channel1OrNull; - if (t2 == null) - t2 = 0; - t3 = _this.channel2OrNull; - if (t3 == null) - t3 = 0; - return A.SassColor_SassColor$forSpaceInternal0(_this._color0$_space, t1, t2, t3, alpha); - }, - interpolate$4$legacyMissing$weight(other, method, legacyMissing, weight) { - var t1, color1, color2, missing1_0, missing1_1, missing1_2, missing2_0, missing2_1, missing2_2, channel1_0, channel1_1, channel1_2, channel2_0, channel2_1, channel2_2, alpha1, t2, t3, alpha10, alpha2, alpha20, thisMultiplier, t4, t5, otherMultiplier, mixedAlpha, mixed0, mixed1, mixed2, _this = this, _null = null; - if (weight == null) - weight = 0.5; - if (A.fuzzyEquals0(weight, 0)) - return other; - if (A.fuzzyEquals0(weight, 1)) - return _this; - t1 = method.space; - color1 = _this.toSpace$1(t1); - color2 = other.toSpace$1(t1); - if (weight < 0 || weight > 1) - throw A.wrapException(A.RangeError$range(weight, 0, 1, "weight", _null)); - missing1_0 = _this._color0$_isAnalogousChannelMissing$3(_this, color1, 0); - missing1_1 = _this._color0$_isAnalogousChannelMissing$3(_this, color1, 1); - missing1_2 = _this._color0$_isAnalogousChannelMissing$3(_this, color1, 2); - missing2_0 = _this._color0$_isAnalogousChannelMissing$3(other, color2, 0); - missing2_1 = _this._color0$_isAnalogousChannelMissing$3(other, color2, 1); - missing2_2 = _this._color0$_isAnalogousChannelMissing$3(other, color2, 2); - channel1_0 = (missing1_0 ? color2 : color1).channel0OrNull; - if (channel1_0 == null) - channel1_0 = 0; - channel1_1 = (missing1_1 ? color2 : color1).channel1OrNull; - if (channel1_1 == null) - channel1_1 = 0; - channel1_2 = (missing1_2 ? color2 : color1).channel2OrNull; - if (channel1_2 == null) - channel1_2 = 0; - channel2_0 = (missing2_0 ? color1 : color2).channel0OrNull; - if (channel2_0 == null) - channel2_0 = 0; - channel2_1 = (missing2_1 ? color1 : color2).channel1OrNull; - if (channel2_1 == null) - channel2_1 = 0; - channel2_2 = (missing2_2 ? color1 : color2).channel2OrNull; - if (channel2_2 == null) - channel2_2 = 0; - alpha1 = _this.alphaOrNull; - t2 = alpha1 == null; - if (t2) { - t3 = other.alphaOrNull; - alpha10 = t3 == null ? 0 : t3; - } else - alpha10 = alpha1; - alpha2 = other.alphaOrNull; - t3 = alpha2 == null; - if (t3) - alpha20 = t2 ? 0 : alpha1; - else - alpha20 = alpha2; - thisMultiplier = (t2 ? 1 : alpha1) * weight; - t4 = t3 ? 1 : alpha2; - t5 = 1 - weight; - otherMultiplier = t4 * t5; - mixedAlpha = t2 && t3 ? _null : alpha10 * weight + alpha20 * t5; - if (missing1_0 && missing2_0) - mixed0 = _null; - else { - t2 = mixedAlpha == null ? 1 : mixedAlpha; - mixed0 = (channel1_0 * thisMultiplier + channel2_0 * otherMultiplier) / t2; - } - if (missing1_1 && missing2_1) - mixed1 = _null; - else { - t2 = mixedAlpha == null ? 1 : mixedAlpha; - mixed1 = (channel1_1 * thisMultiplier + channel2_1 * otherMultiplier) / t2; - } - if (missing1_2 && missing2_2) - mixed2 = _null; - else { - t2 = mixedAlpha == null ? 1 : mixedAlpha; - mixed2 = (channel1_2 * thisMultiplier + channel2_2 * otherMultiplier) / t2; - } - $label0$0: { - if (B.HslColorSpace_gsm0 === t1 || B.HwbColorSpace_06z0 === t1) { - if (missing1_0 && missing2_0) - t2 = _null; - else { - t2 = method.hue; - t2.toString; - t2 = _this._color0$_interpolateHues$4(channel1_0, channel2_0, t2, weight); - } - t2 = A.SassColor_SassColor$forSpaceInternal0(t1, t2, mixed1, mixed2, mixedAlpha); - t1 = t2; - break $label0$0; - } - if (B.LchColorSpace_wv80 === t1 || B.OklchColorSpace_li80 === t1) { - if (missing1_2 && missing2_2) - t2 = _null; - else { - t2 = method.hue; - t2.toString; - t2 = _this._color0$_interpolateHues$4(channel1_2, channel2_2, t2, weight); - } - t2 = A.SassColor_SassColor$forSpaceInternal0(t1, mixed0, mixed1, t2, mixedAlpha); - t1 = t2; - break $label0$0; - } - t1 = A.SassColor_SassColor$forSpaceInternal0(t1, mixed0, mixed1, mixed2, mixedAlpha); - break $label0$0; - } - return t1.toSpace$2$legacyMissing(_this._color0$_space, legacyMissing); - }, - interpolate$3$weight(other, method, weight) { - return this.interpolate$4$legacyMissing$weight(other, method, true, weight); - }, - _color0$_isAnalogousChannelMissing$3(original, output, outputChannelIndex) { - var originalChannel; - if (output.get$channelsOrNull()[outputChannelIndex] == null) - return true; - if (original === output) - return false; - originalChannel = A.IterableExtension_firstWhereOrNull(original._color0$_space._space$_channels, output._color0$_space._space$_channels[outputChannelIndex].get$isAnalogous()); - if (originalChannel == null) - return false; - return original.isChannelMissing$1(originalChannel.name); - }, - _color0$_interpolateHues$4(hue1, hue2, method, weight) { - var _0_0, _1_0; - $label1$1: { - if (B.HueInterpolationMethod_00 === method) { - $label0$0: { - _0_0 = hue2 - hue1; - if (_0_0 > 180) { - hue1 += 360; - break $label0$0; - } - if (_0_0 < -180) - hue2 += 360; - } - break $label1$1; - } - if (B.HueInterpolationMethod_10 === method) { - $label2$2: { - _1_0 = hue2 - hue1; - if (_1_0 > 0 && _1_0 < 180) { - hue2 += 360; - break $label2$2; - } - if (_1_0 > -180 && _1_0 <= 0) - hue1 += 360; - } - break $label1$1; - } - if (B.HueInterpolationMethod_20 === method && hue2 < hue1) { - hue2 += 360; - break $label1$1; - } - if (B.HueInterpolationMethod_30 === method && hue1 < hue2) { - hue1 += 360; - break $label1$1; - } - } - return hue1 * weight + hue2 * (1 - weight); - }, - plus$1(other) { - if (!(other instanceof A.SassNumber0) && !(other instanceof A.SassColor0)) - return this.super$Value$plus0(other); - throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); - }, - minus$1(other) { - if (!(other instanceof A.SassNumber0) && !(other instanceof A.SassColor0)) - return this.super$Value$minus0(other); - throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); - }, - dividedBy$1(other) { - if (!(other instanceof A.SassNumber0) && !(other instanceof A.SassColor0)) - return this.super$Value$dividedBy0(other); - throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " / " + other.toString$0(0) + '".', null)); - }, - $eq(_, other) { - var t1, t2, _this = this; - if (other == null) - return false; - if (!(other instanceof A.SassColor0)) - return false; - t1 = _this._color0$_space; - if (t1.get$isLegacyInternal()) { - t2 = other._color0$_space; - if (!t2.get$isLegacyInternal()) - return false; - if (!A.fuzzyEqualsNullable0(_this.alphaOrNull, other.alphaOrNull)) - return false; - if (t1 === t2) - return A.fuzzyEqualsNullable0(_this.channel0OrNull, other.channel0OrNull) && A.fuzzyEqualsNullable0(_this.channel1OrNull, other.channel1OrNull) && A.fuzzyEqualsNullable0(_this.channel2OrNull, other.channel2OrNull); - else - return _this.toSpace$1(B.RgbColorSpace_mlz0).$eq(0, other.toSpace$1(B.RgbColorSpace_mlz0)); - } - return t1 === other._color0$_space && A.fuzzyEqualsNullable0(_this.channel0OrNull, other.channel0OrNull) && A.fuzzyEqualsNullable0(_this.channel1OrNull, other.channel1OrNull) && A.fuzzyEqualsNullable0(_this.channel2OrNull, other.channel2OrNull) && A.fuzzyEqualsNullable0(_this.alphaOrNull, other.alphaOrNull); - }, - get$hashCode(_) { - var rgb, t2, t3, t4, t5, _this = this, - t1 = _this._color0$_space; - if (t1.get$isLegacyInternal()) { - rgb = _this.toSpace$1(B.RgbColorSpace_mlz0); - t1 = rgb.channel0OrNull; - t1 = A.fuzzyHashCode0(t1 == null ? 0 : t1); - t2 = rgb.channel1OrNull; - t2 = A.fuzzyHashCode0(t2 == null ? 0 : t2); - t3 = rgb.channel2OrNull; - t3 = A.fuzzyHashCode0(t3 == null ? 0 : t3); - t4 = _this.alphaOrNull; - return t1 ^ t2 ^ t3 ^ A.fuzzyHashCode0(t4 == null ? 0 : t4); - } else { - t1 = A.Primitives_objectHashCode(t1); - t2 = _this.channel0OrNull; - t2 = A.fuzzyHashCode0(t2 == null ? 0 : t2); - t3 = _this.channel1OrNull; - t3 = A.fuzzyHashCode0(t3 == null ? 0 : t3); - t4 = _this.channel2OrNull; - t4 = A.fuzzyHashCode0(t4 == null ? 0 : t4); - t5 = _this.alphaOrNull; - return (t1 ^ t2 ^ t3 ^ t4 ^ A.fuzzyHashCode0(t5 == null ? 0 : t5)) >>> 0; - } - } - }; - A.SassColor$_forSpace_closure0.prototype = { - call$1(alpha) { - return A.fuzzyAssertRange0(alpha, 0, 1, "alpha"); - }, - $signature: 15 - }; - A._ColorFormatEnum0.prototype = { - toString$0(_) { - return "rgbFunction"; - } - }; - A.SpanColorFormat0.prototype = {}; - A.Combinator0.prototype = { - _enumToString$0() { - return "Combinator." + this._name; - }, - toString$0(_) { - return this._combinator0$_text; - } - }; - A.ModifiableCssComment0.prototype = { - accept$1$1(visitor) { - return visitor.visitCssComment$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - $isCssComment0: 1, - get$span(receiver) { - return this.span; - } - }; - A.compileAsync_closure.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.NodeCompileResult), - $async$returnValue, $async$self = this, t5, t6, t7, t8, t9, t10, t11, t12, t13, result, t1, t2, t3, t4; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.options; - t2 = t1 == null; - t3 = t2 ? null : J.get$loadPaths$x(t1); - t4 = t2 ? null : J.get$quietDeps$x(t1); - if (t4 == null) - t4 = false; - t5 = A._parseOutputStyle0(t2 ? null : J.get$style$x(t1)); - t6 = t2 ? null : J.get$verbose$x(t1); - if (t6 == null) - t6 = false; - t7 = t2 ? null : J.get$charset$x(t1); - if (t7 == null) - t7 = true; - t8 = t2 ? null : J.get$sourceMap$x(t1); - if (t8 == null) - t8 = false; - t9 = $async$self.logger; - if (t2) - t10 = null; - else { - t10 = J.get$importers$x(t1); - t10 = t10 == null ? null : J.map$1$1$ax(t10, new A.compileAsync__closure(), type$.AsyncImporter); - } - t11 = A._parseFunctions0(t2 ? null : J.get$functions$x(t1), true); - t12 = A.parseDeprecations(t9, t2 ? null : J.get$fatalDeprecations$x(t1), true); - t13 = A.parseDeprecations(t9, t2 ? null : J.get$silenceDeprecations$x(t1), false); - $async$goto = 3; - return A._asyncAwait(A.compileAsync0($async$self.path, t7, t12, t11, A.parseDeprecations(t9, t2 ? null : J.get$futureDeprecations$x(t1), false), A.AsyncImportCache$(t10, t3, null), null, null, t9, null, t4, t13, t8, t5, null, true, t6), $async$call$0); - case 3: - // returning from await. - result = $async$result; - t1 = t2 ? null : J.get$sourceMapIncludeSources$x(t1); - $async$returnValue = A._convertResult(result, t1 == null ? false : t1); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 272 - }; - A.compileAsync__closure.prototype = { - call$1(importer) { - return A._parseAsyncImporter(importer); - }, - $signature: 229 - }; - A.compileStringAsync_closure.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.NodeCompileResult), - $async$returnValue, $async$self = this, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, result, t1, t2, t3, t4, t5, t6; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.options; - t2 = t1 == null; - t3 = A.parseSyntax(t2 ? null : J.get$syntax$x(t1)); - t4 = t2 ? null : A.NullableExtension_andThen0(J.get$url$x(t1), A.utils3__jsToDartUrl$closure()); - t5 = t2 ? null : J.get$loadPaths$x(t1); - t6 = t2 ? null : J.get$quietDeps$x(t1); - if (t6 == null) - t6 = false; - t7 = A._parseOutputStyle0(t2 ? null : J.get$style$x(t1)); - t8 = t2 ? null : J.get$verbose$x(t1); - if (t8 == null) - t8 = false; - t9 = t2 ? null : J.get$charset$x(t1); - if (t9 == null) - t9 = true; - t10 = t2 ? null : J.get$sourceMap$x(t1); - if (t10 == null) - t10 = false; - t11 = $async$self.logger; - if (t2) - t12 = null; - else { - t12 = J.get$importers$x(t1); - t12 = t12 == null ? null : J.map$1$1$ax(t12, new A.compileStringAsync__closure(), type$.AsyncImporter); - } - t13 = t2 ? null : A.NullableExtension_andThen0(J.get$importer$x(t1), new A.compileStringAsync__closure0()); - if (t13 == null) - t13 = (t2 ? null : J.get$url$x(t1)) == null ? new A.NoOpImporter0() : null; - t14 = A._parseFunctions0(t2 ? null : J.get$functions$x(t1), true); - t15 = A.parseDeprecations(t11, t2 ? null : J.get$fatalDeprecations$x(t1), true); - t16 = A.parseDeprecations(t11, t2 ? null : J.get$silenceDeprecations$x(t1), false); - $async$goto = 3; - return A._asyncAwait(A.compileStringAsync0($async$self.text, t9, t15, t14, A.parseDeprecations(t11, t2 ? null : J.get$futureDeprecations$x(t1), false), A.AsyncImportCache$(t12, t5, null), t13, null, null, t11, null, t6, t16, t10, t7, t3, t4, true, t8), $async$call$0); - case 3: - // returning from await. - result = $async$result; - t1 = t2 ? null : J.get$sourceMapIncludeSources$x(t1); - $async$returnValue = A._convertResult(result, t1 == null ? false : t1); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 272 - }; - A.compileStringAsync__closure.prototype = { - call$1(importer) { - return A._parseAsyncImporter(importer); - }, - $signature: 229 - }; - A.compileStringAsync__closure0.prototype = { - call$1(importer) { - return A._parseAsyncImporter(importer); - }, - $signature: 424 - }; - A._wrapAsyncSassExceptions_closure.prototype = { - call$1(error) { - var t1; - if (error instanceof A.SassException0) - t1 = A.throwNodeException(error, this.ascii, this.color, null); - else - t1 = A.jsThrow(error == null ? type$.Object._as(error) : error); - return t1; - }, - $signature: 425 - }; - A._parseFunctions_closure0.prototype = { - call$2(signature, callback) { - var callable, - t1 = this.result; - if (!this.asynch) { - callable = A._Cell$(); - callable.__late_helper$_value = A.Callable_Callable$fromSignature(signature, new A._parseFunctions__closure2(callback, callable), true); - t1.push(callable._readLocal$0()); - } else { - callable = A._Cell$(); - callable.__late_helper$_value = A.AsyncCallable_AsyncCallable$fromSignature(signature, new A._parseFunctions__closure3(callback, callable), true); - t1.push(callable._readLocal$0()); - } - }, - $signature: 126 - }; - A._parseFunctions__closure2.prototype = { - call$1($arguments) { - var t1, t2, - _s42_ = string$.Invali, - result = A.wrapJSExceptions(new A._parseFunctions___closure6(this.callback, $arguments)); - if (result instanceof A.Value0) - return A._simplifyValue(result); - t1 = result != null && result instanceof self.Promise; - t2 = this.callable; - if (t1) - throw A.wrapException(_s42_ + J.get$name$x(t2.readLocal$0()) + '":\nPromises may only be returned for sass.compileAsync() and sass.compileStringAsync().'); - else - throw A.wrapException(_s42_ + J.get$name$x(t2.readLocal$0()) + '": ' + A.S(result) + " is not a sass.Value."); - }, - $signature: 3 - }; - A._parseFunctions___closure6.prototype = { - call$0() { - return type$.Function._as(this.callback).call$1(A.toJSArray(this.$arguments)); - }, - $signature: 61 - }; - A._parseFunctions__closure3.prototype = { - call$1($arguments) { - return this.$call$body$_parseFunctions__closure0($arguments); - }, - $call$body$_parseFunctions__closure0($arguments) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, result; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - result = A.wrapJSExceptions(new A._parseFunctions___closure5($async$self.callback, $arguments)); - $async$goto = result != null && result instanceof self.Promise ? 3 : 4; - break; - case 3: - // then - $async$goto = 5; - return A._asyncAwait(A.promiseToFuture0(type$.Promise._as(result), type$.Object), $async$call$1); - case 5: - // returning from await. - result = $async$result; - case 4: - // join - if (result instanceof A.Value0) { - $async$returnValue = A._simplifyValue(result); - // goto return - $async$goto = 1; - break; - } - throw A.wrapException(string$.Invali + J.get$name$x($async$self.callable.readLocal$0()) + '": ' + A.S(result) + " is not a sass.Value."); - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 92 - }; - A._parseFunctions___closure5.prototype = { - call$0() { - return type$.Function._as(this.callback).call$1(A.toJSArray(this.$arguments)); - }, - $signature: 61 - }; - A.nodePackageImporterClass_closure.prototype = { - call$0() { - return type$.JSClass._as(A.allowInteropCaptureThisNamed("sass.NodePackageImporter", new A.nodePackageImporterClass__closure())); - }, - $signature: 16 - }; - A.nodePackageImporterClass__closure.prototype = { - call$2($self, entrypointDirectory) { - var directory, t1, filename, t2, _null = null, - _0_3 = A.entrypointFilename(); - $label0$0: { - if (entrypointDirectory != null) { - directory = entrypointDirectory == null ? A._asString(entrypointDirectory) : entrypointDirectory; - t1 = directory; - break $label0$0; - } - if (_0_3 != null) { - filename = _0_3 == null ? A._asString(_0_3) : _0_3; - t1 = $.$get$context().dirname$1(filename); - break $label0$0; - } - t1 = A.throwExpression("The Node package importer cannot determine an entry point because `require.main.filename` is not defined. Please provide an `entryPointDirectory` to the `NodePackageImporter`."); - } - t2 = new A.NodePackageImporter0(); - if (A.isBrowser()) - A.throwExpression(string$.The_No); - t2._node_package$__NodePackageImporter__entryPointDirectory_F = A.absolute(t1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); - return t2; - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 427 - }; - A._compileStylesheet_closure1.prototype = { - call$1(url) { - return url === "" ? A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(this.stylesheet.span.file._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text() : this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); - }, - $signature: 6 - }; - A.CompileOptions.prototype = {}; - A.CompileStringOptions.prototype = {}; - A.NodeCompileResult.prototype = {}; - A.CompileResult0.prototype = {}; - A.Compiler.prototype = {}; - A.AsyncCompiler.prototype = { - addCompilation$1(compilation) { - this.compilations.add$1(0, A.promiseToFuture(compilation, type$.dynamic).catchError$1(new A.AsyncCompiler_addCompilation_closure())); - } - }; - A.AsyncCompiler_addCompilation_closure.prototype = { - call$1(err) { - }, - $signature: 63 - }; - A.compilerClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.Compiler", new A.compilerClass__closure())); - A.LinkedHashMap_LinkedHashMap$_literal(["compile", new A.compilerClass__closure0(), "compileString", new A.compilerClass__closure1(), "dispose", new A.compilerClass__closure2()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); - A.JSClassExtension_injectSuperclass(t1._as(new A.Compiler().constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.compilerClass__closure.prototype = { - call$1($self) { - return A.LinkedHashSet_LinkedHashSet$_literal([A.jsThrow(new self.Error("Compiler can not be directly constructed. Please use `sass.initCompiler()` instead."))], type$.Never); - }, - $signature: 230 - }; - A.compilerClass__closure0.prototype = { - call$3($self, path, options) { - if ($self._disposed) - A.jsThrow(new self.Error("Compiler has already been disposed.")); - return A.compile0(path, options); - }, - call$2($self, path) { - return this.call$3($self, path, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 429 - }; - A.compilerClass__closure1.prototype = { - call$3($self, source, options) { - if ($self._disposed) - A.jsThrow(new self.Error("Compiler has already been disposed.")); - return A.compileString0(source, options); - }, - call$2($self, source) { - return this.call$3($self, source, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 430 - }; - A.compilerClass__closure2.prototype = { - call$1($self) { - $self._disposed = true; - }, - $signature: 431 - }; - A.asyncCompilerClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.AsyncCompiler", new A.asyncCompilerClass__closure())); - A.LinkedHashMap_LinkedHashMap$_literal(["compileAsync", new A.asyncCompilerClass__closure0(), "compileStringAsync", new A.asyncCompilerClass__closure1(), "dispose", new A.asyncCompilerClass__closure2()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); - A.JSClassExtension_injectSuperclass(t1._as(new A.AsyncCompiler(new A.FutureGroup(new A._AsyncCompleter(new A._Future($.Zone__current, type$._Future_List_void), type$._AsyncCompleter_List_void), [], type$.FutureGroup_void)).constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.asyncCompilerClass__closure.prototype = { - call$1($self) { - return A.LinkedHashSet_LinkedHashSet$_literal([A.jsThrow(new self.Error("AsyncCompiler can not be directly constructed. Please use `sass.initAsyncCompiler()` instead."))], type$.Never); - }, - $signature: 230 - }; - A.asyncCompilerClass__closure0.prototype = { - call$3($self, path, options) { - var compilation; - if ($self._disposed) - A.jsThrow(new self.Error("Compiler has already been disposed.")); - compilation = A.compileAsync1(path, options); - $self.addCompilation$1(compilation); - return compilation; - }, - call$2($self, path) { - return this.call$3($self, path, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 432 - }; - A.asyncCompilerClass__closure1.prototype = { - call$3($self, source, options) { - var compilation; - if ($self._disposed) - A.jsThrow(new self.Error("Compiler has already been disposed.")); - compilation = A.compileStringAsync1(source, options); - $self.addCompilation$1(compilation); - return compilation; - }, - call$2($self, source) { - return this.call$3($self, source, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 433 - }; - A.asyncCompilerClass__closure2.prototype = { - call$1($self) { - $self._disposed = true; - return A.futureToPromise0(new A.asyncCompilerClass___closure($self).call$0()); - }, - $signature: 434 - }; - A.asyncCompilerClass___closure.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Null), - $async$self = this, t1; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = $async$self.self.compilations; - t1.close$0(0); - $async$goto = 2; - return A._asyncAwait(t1._future_group$_completer.future, $async$call$0); - case 2: - // returning from await. - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 2 - }; - A.initAsyncCompiler_closure.prototype = { - call$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.AsyncCompiler), - $async$returnValue; - var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - $async$returnValue = new A.AsyncCompiler(new A.FutureGroup(new A._AsyncCompleter(new A._Future($.Zone__current, type$._Future_List_void), type$._AsyncCompleter_List_void), [], type$.FutureGroup_void)); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$0, $async$completer); - }, - $signature: 435 - }; - A.ComplexSassNumber0.prototype = { - get$numeratorUnits(_) { - return this._complex0$_numeratorUnits; - }, - get$denominatorUnits(_) { - return this._complex0$_denominatorUnits; - }, - get$hasUnits() { - return true; - }, - get$hasComplexUnits() { - return true; - }, - hasUnit$1(unit) { - return false; - }, - compatibleWithUnit$1(unit) { - return false; - }, - hasPossiblyCompatibleUnits$1(other) { - throw A.wrapException(A.UnimplementedError$(string$.Comple)); - }, - withValue$1(value) { - return new A.ComplexSassNumber0(this._complex0$_numeratorUnits, this._complex0$_denominatorUnits, value, null); - }, - withSlash$2(numerator, denominator) { - return new A.ComplexSassNumber0(this._complex0$_numeratorUnits, this._complex0$_denominatorUnits, this._number1$_value, new A._Record_2(numerator, denominator)); - } - }; - A.ComplexSelector0.prototype = { - get$specificity() { - var result, _this = this, - value = _this._complex$__ComplexSelector_specificity_FI; - if (value === $) { - result = B.JSArray_methods.fold$2(_this.components, 0, new A.ComplexSelector_specificity_closure0()); - _this._complex$__ComplexSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); - _this._complex$__ComplexSelector_specificity_FI = result; - value = result; - } - return value; - }, - get$singleCompound() { - var _0_0, t1, _0_4, t2, selector, _null = null; - if (this.leadingCombinators.length !== 0) - return _null; - _0_0 = this.components; - $label0$0: { - t1 = false; - if (_0_0.length === 1) { - _0_4 = _0_0[0]; - t2 = _0_4; - selector = t2.selector; - t1 = _0_4.combinators.length <= 0; - } else - selector = _null; - if (t1) { - t1 = selector; - break $label0$0; - } - t1 = _null; - break $label0$0; - } - return t1; - }, - accept$1$1(visitor) { - return visitor.visitComplexSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - isSuperselector$1(other) { - return this.leadingCombinators.length === 0 && other.leadingCombinators.length === 0 && A.complexIsSuperselector0(this.components, other.components); - }, - withAdditionalCombinators$1(combinators) { - var _0_0, _0_1, t1, initial, last, _this = this; - if (combinators.length === 0) - return _this; - _0_0 = _this.components; - $label0$0: { - _0_1 = _0_0.length; - if (_0_1 >= 1) { - t1 = _0_1 - 1; - initial = B.JSArray_methods.sublist$2(_0_0, 0, t1); - last = _0_0[t1]; - t1 = A.List_List$of(initial, true, type$.ComplexSelectorComponent_2); - t1.push(last.withAdditionalCombinators$1(combinators)); - t1 = A.ComplexSelector$0(_this.leadingCombinators, t1, _this.span, _this.lineBreak); - break $label0$0; - } - if (_0_1 <= 0) { - t1 = A.List_List$of(_this.leadingCombinators, true, type$.CssValue_Combinator_2); - B.JSArray_methods.addAll$1(t1, combinators); - t1 = A.ComplexSelector$0(t1, B.List_empty16, _this.span, _this.lineBreak); - break $label0$0; - } - t1 = null; - } - return t1; - }, - concatenate$3$forceLineBreak(child, span, forceLineBreak) { - var t2, _0_1, initial, last, _this = this, - t1 = child.leadingCombinators, - _0_0 = _this.components; - if (t1.length === 0) { - t1 = A.List_List$of(_0_0, true, type$.ComplexSelectorComponent_2); - B.JSArray_methods.addAll$1(t1, child.components); - t2 = _this.lineBreak || child.lineBreak || forceLineBreak; - return A.ComplexSelector$0(_this.leadingCombinators, t1, span, t2); - } else { - _0_1 = _0_0.length; - if (_0_1 >= 1) { - t2 = _0_1 - 1; - initial = B.JSArray_methods.sublist$2(_0_0, 0, t2); - last = _0_0[t2]; - t2 = A.List_List$of(initial, true, type$.ComplexSelectorComponent_2); - t2.push(last.withAdditionalCombinators$1(t1)); - B.JSArray_methods.addAll$1(t2, child.components); - t1 = _this.lineBreak || child.lineBreak || forceLineBreak; - return A.ComplexSelector$0(_this.leadingCombinators, t2, span, t1); - } else { - t2 = A.List_List$of(_this.leadingCombinators, true, type$.CssValue_Combinator_2); - B.JSArray_methods.addAll$1(t2, t1); - t1 = _this.lineBreak || child.lineBreak || forceLineBreak; - return A.ComplexSelector$0(t2, child.components, span, t1); - } - } - }, - concatenate$2(child, span) { - return this.concatenate$3$forceLineBreak(child, span, false); - }, - get$hashCode(_) { - return B.C_ListEquality0.hash$1(this.leadingCombinators) ^ B.C_ListEquality0.hash$1(this.components); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.ComplexSelector0 && B.C_ListEquality.equals$2(0, this.leadingCombinators, other.leadingCombinators) && B.C_ListEquality.equals$2(0, this.components, other.components); - } - }; - A.ComplexSelector_specificity_closure0.prototype = { - call$2(sum, component) { - return sum + component.selector.get$specificity(); - }, - $signature: 436 - }; - A.ComplexSelectorComponent0.prototype = { - withAdditionalCombinators$1(combinators) { - var t1, t2, _this = this; - if (combinators.length === 0) - t1 = _this; - else { - t1 = type$.CssValue_Combinator_2; - t2 = A.List_List$of(_this.combinators, true, t1); - B.JSArray_methods.addAll$1(t2, combinators); - t1 = new A.ComplexSelectorComponent0(_this.selector, A.List_List$unmodifiable(t2, t1), _this.span); - } - return t1; - }, - get$hashCode(_) { - return B.C_ListEquality0.hash$1(this.selector.components) ^ B.C_ListEquality0.hash$1(this.combinators); - }, - $eq(_, other) { - var t1; - if (other == null) - return false; - if (other instanceof A.ComplexSelectorComponent0) { - t1 = B.C_ListEquality.equals$2(0, this.selector.components, other.selector.components); - t1 = t1 && B.C_ListEquality.equals$2(0, this.combinators, other.combinators); - } else - t1 = false; - return t1; - }, - toString$0(_) { - var t1 = this.combinators; - return A.serializeSelector0(this.selector, true) + new A.MappedListIterable(t1, new A.ComplexSelectorComponent_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ""); - } - }; - A.ComplexSelectorComponent_toString_closure0.prototype = { - call$1(combinator) { - return " " + combinator.toString$0(0); - }, - $signature: 437 - }; - A.CompoundSelector0.prototype = { - get$specificity() { - var result, _this = this, - value = _this._compound$__CompoundSelector_specificity_FI; - if (value === $) { - result = B.JSArray_methods.fold$2(_this.components, 0, new A.CompoundSelector_specificity_closure0()); - _this._compound$__CompoundSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); - _this._compound$__CompoundSelector_specificity_FI = result; - value = result; - } - return value; - }, - get$hasComplicatedSuperselectorSemantics() { - var result, _this = this, - value = _this._compound$__CompoundSelector_hasComplicatedSuperselectorSemantics_FI; - if (value === $) { - result = B.JSArray_methods.any$1(_this.components, new A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure0()); - _this._compound$__CompoundSelector_hasComplicatedSuperselectorSemantics_FI !== $ && A.throwUnnamedLateFieldADI(); - _this._compound$__CompoundSelector_hasComplicatedSuperselectorSemantics_FI = result; - value = result; - } - return value; - }, - accept$1$1(visitor) { - return visitor.visitCompoundSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - get$hashCode(_) { - return B.C_ListEquality0.hash$1(this.components); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.CompoundSelector0 && B.C_ListEquality.equals$2(0, this.components, other.components); - } - }; - A.CompoundSelector_specificity_closure0.prototype = { - call$2(sum, component) { - return sum + component.get$specificity(); - }, - $signature: 438 - }; - A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure0.prototype = { - call$1(component) { - return component.get$hasComplicatedSuperselectorSemantics(); - }, - $signature: 14 - }; - A.Configuration0.prototype = { - throughForward$1($forward) { - var _0_0, _1_0, _2_0, t1, hiddenVariables, - newValues = this._configuration0$_values; - if (newValues.get$isEmpty(newValues)) - return B.Configuration_Map_empty_null0; - _0_0 = $forward.prefix; - if (_0_0 != null) - newValues = new A.UnprefixedMapView0(newValues, _0_0, type$.UnprefixedMapView_ConfiguredValue_2); - _1_0 = $forward.shownVariables; - if (_1_0 != null) - newValues = new A.LimitedMapView0(newValues, _1_0._base.intersection$1(new A.MapKeySet(newValues, type$.MapKeySet_nullable_Object)), type$.LimitedMapView_String_ConfiguredValue_2); - else { - _2_0 = $forward.hiddenVariables; - if (_2_0 != null) { - t1 = _2_0._base.get$isNotEmpty(0); - hiddenVariables = _2_0; - } else { - hiddenVariables = null; - t1 = false; - } - if (t1) - newValues = A.LimitedMapView$blocklist0(newValues, hiddenVariables, type$.String, type$.ConfiguredValue_2); - } - return this._configuration0$_withValues$1(newValues); - }, - _configuration0$_withValues$1(values) { - var t1 = this._configuration0$__originalConfiguration; - return new A.Configuration0(values, t1 == null ? this : t1); - }, - toString$0(_) { - var t2, t3, - t1 = A._setArrayType([], type$.JSArray_String); - for (t2 = A.MapExtensions_get_pairs0(new A.UnmodifiableMapView(this._configuration0$_values, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2), t2 = t2.get$iterator(t2); t2.moveNext$0();) { - t3 = t2.get$current(t2); - t1.push("$" + t3._0 + ": " + t3._1.toString$0(0)); - } - return "(" + B.JSArray_methods.join$1(t1, ",") + ")"; - } - }; - A.ExplicitConfiguration0.prototype = { - _configuration0$_withValues$1(values) { - var t1 = this._configuration0$__originalConfiguration; - if (t1 == null) - t1 = this; - return new A.ExplicitConfiguration0(this.nodeWithSpan, values, t1); - } - }; - A.ConfiguredValue0.prototype = { - toString$0(_) { - return this.value.toString$0(0); - } - }; - A.ConfiguredVariable0.prototype = { - toString$0(_) { - var t1 = this.expression.toString$0(0), - t2 = this.isGuarded ? " !default" : ""; - return "$" + this.name + ": " + t1 + t2; - }, - $isAstNode0: 1, - $isSassNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.ContentBlock0.prototype = { - accept$1$1(visitor) { - return visitor.visitContentBlock$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t2, - t1 = this.$arguments; - t1 = t1.$arguments.length === 0 && t1.restArgument == null ? "" : " using (" + t1.toString$0(0) + ")"; - t2 = this.children; - return t1 + (" {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"); - } - }; - A.ContentRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitContentRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.$arguments; - return t1.get$isEmpty(0) ? "@content;" : "@content(" + t1.toString$0(0) + ");"; - }, - get$span(receiver) { - return this.span; - } - }; - A._disallowedFunctionNames_closure0.prototype = { - call$1($function) { - return $function.name; - }, - $signature: 439 - }; - A.CssParser0.prototype = { - get$plainCss() { - return true; - }, - silentComment$0() { - var t1, t2, _this = this; - if (_this._stylesheet0$_inExpression) - return false; - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - _this.super$Parser$silentComment0(); - _this.error$2(0, string$.Silent, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - atRule$2$root(child, root) { - var $name, _0_0, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$1(64); - $name = _this.interpolatedIdentifier$0(); - _this.whitespace$0(); - _0_0 = $name.get$asPlain(); - $label0$0: { - if ("at-root" === _0_0 || "content" === _0_0 || "debug" === _0_0 || "each" === _0_0 || "error" === _0_0 || "extend" === _0_0 || "for" === _0_0 || "function" === _0_0 || "if" === _0_0 || "include" === _0_0 || "mixin" === _0_0 || "return" === _0_0 || "warn" === _0_0 || "while" === _0_0) - _this._css$_forbiddenAtRule$1(start); - if ("import" === _0_0) { - t1 = _this._css$_cssImportRule$1(start); - break $label0$0; - } - if ("media" === _0_0) { - t1 = _this.mediaRule$1(start); - break $label0$0; - } - if ("-moz-document" === _0_0) { - t1 = _this.mozDocumentRule$2(start, $name); - break $label0$0; - } - if ("supports" === _0_0) { - t1 = _this.supportsRule$1(start); - break $label0$0; - } - t1 = _this.unknownAtRule$2(start, $name); - break $label0$0; - } - return t1; - }, - _css$_forbiddenAtRule$1(start) { - this.almostAnyValue$0(); - this.error$2(0, "This at-rule isn't allowed in plain CSS.", this.scanner.spanFrom$1(start)); - }, - _css$_cssImportRule$1(start) { - var _0_0, t3, string, $name, _0_3, _0_4, t4, _0_8, t5, modifiers, _this = this, _null = null, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - _1_0 = t1.peekChar$0(); - $label1$1: { - if (117 === _1_0 || 85 === _1_0) { - _0_0 = _this.dynamicUrl$0(); - $label0$0: { - if (_0_0 instanceof A.StringExpression0) { - t3 = _0_0.text; - break $label0$0; - } - string = _null; - t3 = false; - if (_0_0 instanceof A.InterpolatedFunctionExpression0) { - $name = _0_0.name; - _0_3 = _0_0.$arguments; - _0_4 = _0_3.positional; - t4 = _0_4; - if (t4.length === 1) { - _0_8 = _0_4[0]; - t4 = _0_8; - if (t4 instanceof A.StringExpression0) { - type$.StringExpression_2._as(_0_8); - t4 = _0_3.named; - if (t4.get$isEmpty(t4)) - if (_0_3.rest == null) - t3 = _0_3.keywordRest == null; - string = _0_8; - } - } - } else - $name = _null; - if (t3) { - t3 = new A.StringBuffer(""); - t4 = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t4.addInterpolation$1($name); - t5 = A.Primitives_stringFromCharCode(40); - t3._contents += t5; - t4.addInterpolation$1(string.asInterpolation$0()); - t5 = A.Primitives_stringFromCharCode(41); - t3._contents += t5; - t4 = t4.interpolation$1(_0_0.span); - t3 = t4; - break $label0$0; - } - t3 = _this.error$2(0, "Unsupported plain CSS import.", _0_0.get$span(_0_0)); - } - break $label1$1; - } - t3 = _this.interpolatedString$0().asInterpolation$1$static(true); - break $label1$1; - } - _this.whitespace$0(); - modifiers = _this.tryImportModifiers$0(); - _this.expectStatementSeparator$1("@import rule"); - t2 = A._setArrayType([new A.StaticImport0(t3, modifiers, t1.spanFrom$1(new A._SpanScannerState(t1, t2)))], type$.JSArray_Import_2); - t1 = t1.spanFrom$1(start); - return new A.ImportRule0(A.List_List$unmodifiable(t2, type$.Import_2), t1); - }, - parentheses$0() { - var expression, - t1 = this.scanner, - t2 = t1._string_scanner$_position; - t1.expectChar$1(40); - this.whitespace$0(); - expression = this.expressionUntilComma$0(); - t1.expectChar$1(41); - return new A.ParenthesizedExpression0(expression, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - identifierLike$0() { - var t2, allowEmptySecondArg, $arguments, t3, t4, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - identifier = _this.interpolatedIdentifier$0(), - plain = identifier.get$asPlain(), - lower = plain.toLowerCase(), - _0_0 = _this.trySpecialFunction$2(lower, start); - if (_0_0 != null) - return _0_0; - t2 = t1._string_scanner$_position; - if (t1.scanChar$1(46)) - return _this.namespacedExpression$2(plain, start); - if (!t1.scanChar$1(40)) - return new A.StringExpression0(identifier, false); - allowEmptySecondArg = lower === "var"; - $arguments = A._setArrayType([], type$.JSArray_Expression_2); - if (!t1.scanChar$1(41)) { - do { - _this.whitespace$0(); - if (allowEmptySecondArg && $arguments.length === 1 && t1.peekChar$0() === 41) { - t3 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); - t4 = t3.offset; - t4 = A._FileSpan$(t3.file, t4, t4); - $arguments.push(new A.StringExpression0(new A.Interpolation0(A.List_List$unmodifiable([""], type$.Object), B.List_null, t4), false)); - break; - } - $arguments.push(_this.expressionUntilComma$1$singleEquals(true)); - _this.whitespace$0(); - } while (t1.scanChar$1(44)); - t1.expectChar$1(41); - } - if ($.$get$_disallowedFunctionNames0().contains$1(0, plain)) - _this.error$2(0, string$.This_f, t1.spanFrom$1(start)); - t2 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); - t3 = type$.Expression_2; - t4 = A.List_List$unmodifiable($arguments, t3); - t3 = A.ConstantMap_ConstantMap$from(B.Map_empty14, type$.String, t3); - t1 = t1.spanFrom$1(start); - return new A.FunctionExpression0(null, A.stringReplaceAllUnchecked(plain, "_", "-"), plain, new A.ArgumentInvocation0(t4, t3, null, null, t2), t1); - }, - namespacedExpression$2(namespace, start) { - var expression = this.super$StylesheetParser$namespacedExpression0(namespace, start); - this.error$2(0, string$.Modulen, expression.get$span(expression)); - } - }; - A.DebugRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitDebugRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "@debug " + this.expression.toString$0(0) + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.ModifiableCssDeclaration0.prototype = { - accept$1$1(visitor) { - return visitor.visitCssDeclaration$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.name.toString$0(0) + ": " + this.value.toString$0(0) + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.Declaration0.prototype = { - accept$1$1(visitor) { - return visitor.visitDeclaration$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t3, _0_0, - buffer = new A.StringBuffer(""), - t1 = this.name, - t2 = "" + t1.toString$0(0); - buffer._contents = t2; - t2 = buffer._contents = t2 + A.Primitives_stringFromCharCode(58); - t3 = this.value; - if (t3 != null) { - t1 = !B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--") ? buffer._contents = t2 + A.Primitives_stringFromCharCode(32) : t2; - buffer._contents = t1 + t3.toString$0(0); - } - _0_0 = this.children; - if (_0_0 != null) - return buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(_0_0, " ") + "}"; - else - return buffer.toString$0(0) + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.SupportsDeclaration0.prototype = { - get$isCustomProperty() { - var t1, - _0_0 = this.name; - $label0$0: { - if (_0_0 instanceof A.StringExpression0 && !_0_0.hasQuotes) { - t1 = B.JSString_methods.startsWith$1(_0_0.text.get$initialPlain(), "--"); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - toInterpolation$0() { - var visitor, _1_0, _null = null, - t1 = new A.StringBuffer(""), - t2 = type$.JSArray_Object, - t3 = type$.JSArray_nullable_FileSpan, - buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], t2), A._setArrayType([], t3)), - t4 = this.span, - t5 = this.name, - t6 = A.SpanExtensions_before(t4, t5.get$span(t5)); - t6 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t6.file._decodedChars, t6._file$_start, t6._end), 0, _null); - t1._contents += t6; - if (t5 instanceof A.StringExpression0 && !t5.hasQuotes) - buffer.addInterpolation$1(t5.text); - else - buffer.add$2(0, t5, t5.get$span(t5)); - t6 = this.value; - t5 = A.SpanExtensions_between(t5.get$span(t5), t6.get$span(t6)); - t5 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t5.file._decodedChars, t5._file$_start, t5._end), 0, _null); - t1._contents += t5; - visitor = new A.SourceInterpolationVisitor(new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], t2), A._setArrayType([], t3))); - t6.accept$1(visitor); - t3 = visitor.buffer; - _1_0 = t3 == null ? _null : t3.interpolation$1(t6.get$span(t6)); - if (_1_0 != null) - buffer.addInterpolation$1(_1_0); - else - buffer.add$2(0, t6, t6.get$span(t6)); - t2 = A.SpanExtensions_after(t4, t6.get$span(t6)); - t2 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2.file._decodedChars, t2._file$_start, t2._end), 0, _null); - t1._contents += t2; - return buffer.interpolation$1(t4); - }, - withSpan$1(span) { - return new A.SupportsDeclaration0(this.name, this.value, span); - }, - toString$0(_) { - return "(" + this.name.toString$0(0) + ": " + this.value.toString$0(0) + ")"; - }, - $isAstNode0: 1, - $isSassNode: 1, - $isSupportsCondition: 1, - get$span(receiver) { - return this.span; - } - }; - A.Deprecation0.prototype = { - _enumToString$0() { - return "Deprecation." + this._name; - }, - get$deprecatedIn(_) { - return A.NullableExtension_andThen0(this._deprecation$_deprecatedIn, A.version_Version___parse_tearOff$closure()); - }, - get$obsoleteIn(_) { - return null; - }, - toString$0(_) { - return this.id; - } - }; - A.Deprecation_fromId_closure0.prototype = { - call$1(deprecation) { - return deprecation.id === this.id; - }, - $signature: 440 - }; - A.DeprecationProcessingLogger0.prototype = { - validate$0() { - var t1, t2, t3, t4, t5, _this = this, _null = null; - for (t1 = _this.fatalDeprecations, t1 = A._LinkedHashSetIterator$(t1, t1._modifications, A._instanceType(t1)._precomputed1), t2 = _this.silenceDeprecations, t3 = t1.$ti._precomputed1; t1.moveNext$0();) { - t4 = t1._collection$_current; - if (t4 == null) - t4 = t3._as(t4); - t5 = t2.contains$1(0, t4); - if (t5) { - t4 = t4.toString$0(0); - _this.internalWarn$4$deprecation$span$trace("Ignoring setting to silence " + t4 + string$.x20deprex2c, _null, _null, _null); - continue; - } - } - for (t1 = A._LinkedHashSetIterator$(t2, t2._modifications, A._instanceType(t2)._precomputed1), t2 = t1.$ti._precomputed1, t3 = _this.futureDeprecations; t1.moveNext$0();) { - t4 = t1._collection$_current; - if (B.Deprecation_JeE === (t4 == null ? t2._as(t4) : t4)) { - _this.internalWarn$4$deprecation$span$trace(string$.User_a, _null, _null, _null); - continue; - } - } - for (t1 = A._LinkedHashSetIterator$(t3, t3._modifications, A._instanceType(t3)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { - t3 = t1._collection$_current; - t3 = (t3 == null ? t2._as(t3) : t3).toString$0(0); - _this.internalWarn$4$deprecation$span$trace(t3 + string$.x20is_noaf, _null, _null, _null); - } - }, - internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { - if (deprecation != null) - this._deprecation_processing$_handleDeprecation$4$span$trace(deprecation, message, span, trace); - else - this._deprecation_processing$_inner.warn$3$span$trace(0, message, span, trace); - }, - _deprecation_processing$_handleDeprecation$4$span$trace(deprecation, message, span, trace) { - var _0_3_isSet, _0_3, t1, span0, t2, count, _1_0, _this = this, _null = null; - if (_this.fatalDeprecations.contains$1(0, deprecation)) { - message += string$.x0a_This + deprecation.toString$0(0) + string$.x20deprex20; - $label0$0: { - _0_3_isSet = span != null; - _0_3 = _null; - t1 = false; - if (_0_3_isSet) { - span0 = span == null ? type$.FileSpan._as(span) : span; - t1 = trace != null; - _0_3 = trace; - } else - span0 = _null; - if (t1) { - if (_0_3_isSet) - trace = _0_3; - t1 = A.SassRuntimeException$0(message, span0, trace == null ? type$.Trace._as(trace) : trace, _null); - break $label0$0; - } - t1 = false; - if (span != null) - t1 = (_0_3_isSet ? _0_3 : trace) == null; - else - span = _null; - if (t1) { - t1 = A.SassException$0(message, span, _null); - break $label0$0; - } - t1 = A.SassScriptException$0(message, _null); - break $label0$0; - } - throw A.wrapException(t1); - } - if (_this.silenceDeprecations.contains$1(0, deprecation)) - return; - if (_this.limitRepetition) { - t1 = _this._deprecation_processing$_warningCounts; - t2 = t1.$index(0, deprecation); - count = (t2 == null ? 0 : t2) + 1; - t1.$indexSet(0, deprecation, count); - if (count > 5) - return; - } - _1_0 = _this._deprecation_processing$_inner; - if (_1_0 instanceof A.LoggerWithDeprecationType) - _1_0.internalWarn$4$deprecation$span$trace(message, deprecation, span, trace); - else - _1_0.warn$4$deprecation$span$trace(0, message, true, span, trace); - }, - debug$2(_, message, span) { - return this._deprecation_processing$_inner.debug$2(0, message, span); - }, - summarize$1$js(js) { - var t1 = this._deprecation_processing$_warningCounts.get$values(0), - t2 = A._instanceType(t1), - total = A.IterableIntegerExtension_get_sum(new A.MappedIterable(new A.WhereIterable(t1, new A.DeprecationProcessingLogger_summarize_closure1(), t2._eval$1("WhereIterable")), new A.DeprecationProcessingLogger_summarize_closure2(), t2._eval$1("MappedIterable"))); - if (total > 0) { - t1 = js ? "" : string$.x0aRun_i; - this._deprecation_processing$_inner.warn$1(0, "" + total + string$.x20repet + t1); - } - } - }; - A.DeprecationProcessingLogger_summarize_closure1.prototype = { - call$1(count) { - return count > 5; - }, - $signature: 46 - }; - A.DeprecationProcessingLogger_summarize_closure2.prototype = { - call$1(count) { - return count - 5; - }, - $signature: 156 - }; - A.Deprecation1.prototype = {}; - A.deprecations_closure.prototype = { - call$0() { - var _0_8_isSet, _0_8, t1, - _0_0 = this.deprecation; - $label0$0: { - _0_8_isSet = A.NullableExtension_andThen0(_0_0._deprecation$_deprecatedIn, A.version_Version___parse_tearOff$closure()) == null; - if (_0_8_isSet) { - _0_8 = _0_0.get$obsoleteIn(0) == null; - t1 = _0_8; - } else { - _0_8 = null; - t1 = false; - } - if (t1) { - t1 = "user"; - break $label0$0; - } - if (_0_8_isSet ? _0_8 : _0_0.get$obsoleteIn(0) == null) { - t1 = "active"; - break $label0$0; - } - t1 = "obsolete"; - break $label0$0; - } - return t1; - }, - $signature: 30 - }; - A.parseDeprecations_closure.prototype = { - call$0() { - return new A._SyncStarIterable(this.$call$body$parseDeprecations_closure(), type$._SyncStarIterable_Deprecation); - }, - $call$body$parseDeprecations_closure() { - var $async$self = this; - return function() { - var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, t3, t4, item, t5, id, deprecation, version; - return function $async$call$0($async$iterator, $async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = J.get$iterator$ax($async$self.deprecations), t2 = type$.Deprecation_2, t3 = $async$self.supportVersions, t4 = $async$self.logger; - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - item = t1.get$current(t1); - t5 = typeof item == "string"; - id = t5 ? item : null; - $async$goto = t5 ? 4 : 5; - break; - case 4: - // then - deprecation = A.Deprecation_fromId0(id); - $async$goto = deprecation == null ? 6 : 8; - break; - case 6: - // then - t4.internalWarn$4$deprecation$span$trace('Invalid deprecation "' + A.S(id) + '".', null, null, null); - // goto join - $async$goto = 7; - break; - case 8: - // else - $async$goto = 9; - return $async$iterator._async$_current = deprecation, 1; - case 9: - // after yield - case 7: - // join - // goto for condition - $async$goto = 2; - break; - case 5: - // join - t5 = t2._is(item); - id = t5 ? J.get$id$x(item) : null; - $async$goto = t5 ? 10 : 11; - break; - case 10: - // then - deprecation = A.Deprecation_fromId0(id); - $async$goto = deprecation == null ? 12 : 14; - break; - case 12: - // then - t4.internalWarn$4$deprecation$span$trace('Invalid deprecation "' + A.S(id) + '".', null, null, null); - // goto join - $async$goto = 13; - break; - case 14: - // else - $async$goto = 15; - return $async$iterator._async$_current = deprecation, 1; - case 15: - // after yield - case 13: - // join - // goto for condition - $async$goto = 2; - break; - case 11: - // join - if (item instanceof A.Version) { - t5 = t3; - version = item; - } else { - version = null; - t5 = false; - } - $async$goto = t5 ? 16 : 17; - break; - case 16: - // then - $async$goto = 18; - return $async$iterator._yieldStar$1(A.Deprecation_forVersion0(version)); - case 18: - // after yield - case 17: - // join - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return 0; - case 1: - // rethrow - return $async$iterator._datum = $async$currentError, 3; - } - }; - }; - }, - $signature: 441 - }; - A.versionClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.Version", new A.versionClass__closure())); - jsClass.parse = A.allowInteropNamed("parse", new A.versionClass__closure0()); - A.JSClassExtension_injectSuperclass(t1._as(A.Version_Version(0, 0, 0, null).constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.versionClass__closure.prototype = { - call$4($self, major, minor, patch) { - return A.Version_Version(major, minor, patch, null); - }, - "call*": "call$4", - $requiredArgCount: 4, - $signature: 442 - }; - A.versionClass__closure0.prototype = { - call$1(version) { - var v = A.Version_Version$parse(version); - if (v.preRelease.length !== 0 || v.build.length !== 0) - throw A.wrapException(A.FormatException$("Build identifiers and prerelease versions not supported.", null, null)); - return v; - }, - $signature: 231 - }; - A.DisplayP3ColorSpace0.prototype = { - get$isBoundedInternal() { - return true; - }, - toLinear$1(channel) { - return A.srgbAndDisplayP3ToLinear0(channel); - }, - fromLinear$1(channel) { - return A.srgbAndDisplayP3FromLinear0(channel); - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { - t1 = $.$get$linearDisplayP3ToLinearSrgb0(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu0 === dest) { - t1 = $.$get$linearDisplayP3ToLinearA98Rgb0(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG0 === dest) { - t1 = $.$get$linearDisplayP3ToLinearProphotoRgb0(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN0 === dest) { - t1 = $.$get$linearDisplayP3ToLinearRec20200(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA0 === dest) { - t1 = $.$get$linearDisplayP3ToXyzD650(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No0 === dest) { - t1 = $.$get$linearDisplayP3ToXyzD500(); - break $label0$0; - } - if (B.LmsColorSpace_8I80 === dest) { - t1 = $.$get$linearDisplayP3ToLms0(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix0(dest); - break $label0$0; - } - return t1; - } - }; - A.DynamicImport0.prototype = { - toString$0(_) { - return A.StringExpression_quoteText0(this.urlString); - }, - $isImport0: 1, - $isAstNode0: 1, - $isSassNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.EachRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitEachRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.variables, - t2 = this.children; - return "@each " + new A.MappedListIterable(t1, new A.EachRule_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + " in " + this.list.toString$0(0) + " {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.EachRule_toString_closure0.prototype = { - call$1(variable) { - return "$" + variable; - }, - $signature: 6 - }; - A.EmptyExtensionStore0.prototype = { - get$_extension_store$_extensions() { - return A.throwExpression(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, A.JSInvocationMirror$(B.Symbol__extensions, "get$_empty_extension_store0$_extensions", 1, [], [], 0))); - }, - get$_extension_store$_sourceSpecificity() { - return A.throwExpression(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, A.JSInvocationMirror$(B.Symbol__sourceSpecificity, "get$_empty_extension_store0$_sourceSpecificity", 1, [], [], 0))); - }, - get$isEmpty(_) { - return true; - }, - get$simpleSelectors() { - return B.C_EmptyUnmodifiableSet0; - }, - extensionsWhereTarget$1(callback) { - return B.List_empty18; - }, - addSelector$2(selector, mediaContext) { - throw A.wrapException(A.UnsupportedError$("addSelector() can't be called for a const ExtensionStore.")); - }, - addExtension$4(extender, target, extend, mediaContext) { - throw A.wrapException(A.UnsupportedError$("addExtension() can't be called for a const ExtensionStore.")); - }, - addExtensions$1(extenders) { - throw A.wrapException(A.UnsupportedError$(string$.addExt)); - }, - clone$0() { - return B.Record2_EmptyExtensionStore_Map_empty0; - }, - $isExtensionStore0: 1 - }; - A.Environment0.prototype = { - closure$0() { - var t4, t5, t6, _this = this, - t1 = _this._environment0$_forwardedModules, - t2 = _this._environment0$_nestedForwardedModules, - t3 = _this._environment0$_variables; - t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); - t4 = _this._environment0$_variableNodes; - t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); - t5 = _this._environment0$_functions; - t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); - t6 = _this._environment0$_mixins; - t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); - return A.Environment$_0(_this._environment0$_modules, _this._environment0$_namespaceNodes, _this._environment0$_globalModules, _this._environment0$_importedModules, t1, t2, _this._environment0$_allModules, t3, t4, t5, t6, _this._environment0$_content); - }, - forwardModule$2(module, rule) { - var view, t1, t2, _this = this, - forwardedModules = _this._environment0$_forwardedModules; - if (forwardedModules == null) - forwardedModules = _this._environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable_2, type$.AstNode_2); - view = A.ForwardedModuleView_ifNecessary0(module, rule, type$.Callable_2); - for (t1 = A.LinkedHashMapKeyIterator$(forwardedModules, forwardedModules.__js_helper$_modifications); t1.moveNext$0();) { - t2 = t1.__js_helper$_current; - _this._environment0$_assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); - _this._environment0$_assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); - _this._environment0$_assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); - } - _this._environment0$_allModules.push(module); - forwardedModules.$indexSet(0, view, rule); - }, - _environment0$_assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { - var larger, smaller, t1, t2, t3, t4, $name, small, large, span; - if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { - larger = oldMembers; - smaller = newMembers; - } else { - larger = newMembers; - smaller = oldMembers; - } - for (t1 = type$.String, t2 = A.MapExtensions_get_pairs0(smaller, t1, type$.Object), t2 = t2.get$iterator(t2), t3 = type === "variable"; t2.moveNext$0();) { - t4 = t2.get$current(t2); - $name = t4._0; - small = t4._1; - large = larger.$index(0, $name); - if (large == null) - continue; - if (t3 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(large, small)) - continue; - if (t3) - $name = "$" + $name; - t2 = this._environment0$_forwardedModules; - if (t2 == null) - span = null; - else { - t2 = t2.$index(0, oldModule); - span = t2 == null ? null : J.get$span$z(t2); - } - t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, t1); - if (span != null) - t2.$indexSet(0, span, "original @forward"); - throw A.wrapException(A.MultiSpanSassScriptException$0("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t2)); - } - }, - importForwards$1(module) { - var forwardedModules, t1, t2, t3, t4, node, t5, t6, t7, t8, t9, t10, _i, t11, shadowed, t12, _length, _list, _this = this, - forwarded = module._environment0$_environment._environment0$_forwardedModules; - if (forwarded == null) - return; - forwardedModules = _this._environment0$_forwardedModules; - if (forwardedModules != null) { - t1 = type$.Module_Callable_2; - t2 = type$.AstNode_2; - t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t1 = A.MapExtensions_get_pairs0(forwarded, t1, t2), t1 = t1.get$iterator(t1), t2 = _this._environment0$_globalModules; t1.moveNext$0();) { - t4 = t1.get$current(t1); - module = t4._0; - node = t4._1; - if (!forwardedModules.containsKey$1(module) || !t2.containsKey$1(module)) - t3.$indexSet(0, module, node); - } - forwarded = t3; - } else - forwardedModules = _this._environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable_2, type$.AstNode_2); - t1 = type$.String; - t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - for (t3 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t3.moveNext$0();) - for (t4 = t3.__js_helper$_current.get$variables(), t4 = J.get$iterator$ax(t4.get$keys(t4)); t4.moveNext$0();) - t2.add$1(0, t4.get$current(t4)); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) { - t5 = t4.__js_helper$_current; - for (t5 = t5.get$functions(t5), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) - t3.add$1(0, t5.get$current(t5)); - } - t1 = A.LinkedHashSet_LinkedHashSet$_empty(t1); - for (t4 = A.LinkedHashMapKeyIterator$(forwarded, forwarded.__js_helper$_modifications); t4.moveNext$0();) - for (t5 = t4.__js_helper$_current.get$mixins(), t5 = J.get$iterator$ax(t5.get$keys(t5)); t5.moveNext$0();) - t1.add$1(0, t5.get$current(t5)); - t4 = _this._environment0$_variables; - t5 = t4.length; - if (t5 === 1) { - for (t5 = _this._environment0$_importedModules, t6 = type$.Module_Callable_2, t7 = type$.AstNode_2, t8 = A.MapExtensions_get_pairs0(t5, t6, t7).toList$0(0), t9 = t8.length, t10 = type$.Callable_2, _i = 0; _i < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i) { - t11 = t8[_i]; - module = t11._0; - node = t11._1; - shadowed = A.ShadowedModuleView_ifNecessary0(module, t3, t1, t2, t10); - if (shadowed != null) { - t5.remove$1(0, module); - t11 = shadowed.variables; - t12 = false; - if (t11.get$isEmpty(t11)) { - t11 = shadowed.functions; - if (t11.get$isEmpty(t11)) { - t11 = shadowed.mixins; - if (t11.get$isEmpty(t11)) { - t11 = shadowed._shadowed_view0$_inner; - t11 = t11.get$css(t11); - t11 = J.get$isEmpty$asx(t11.get$children(t11)); - } else - t11 = t12; - } else - t11 = t12; - } else - t11 = t12; - if (!t11) - t5.$indexSet(0, shadowed, node); - } - } - for (t6 = A.MapExtensions_get_pairs0(forwardedModules, t6, t7).toList$0(0), t7 = t6.length, _i = 0; _i < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i) { - t8 = t6[_i]; - module = t8._0; - node = t8._1; - shadowed = A.ShadowedModuleView_ifNecessary0(module, t3, t1, t2, t10); - if (shadowed != null) { - forwardedModules.remove$1(0, module); - t8 = shadowed.variables; - t9 = false; - if (t8.get$isEmpty(t8)) { - t8 = shadowed.functions; - if (t8.get$isEmpty(t8)) { - t8 = shadowed.mixins; - if (t8.get$isEmpty(t8)) { - t8 = shadowed._shadowed_view0$_inner; - t8 = t8.get$css(t8); - t8 = J.get$isEmpty$asx(t8.get$children(t8)); - } else - t8 = t9; - } else - t8 = t9; - } else - t8 = t9; - if (!t8) - forwardedModules.$indexSet(0, shadowed, node); - } - } - t5.addAll$1(0, forwarded); - forwardedModules.addAll$1(0, forwarded); - } else { - t6 = _this._environment0$_nestedForwardedModules; - if (t6 == null) { - _length = t5 - 1; - _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_Callable_2); - for (t5 = type$.JSArray_Module_Callable_2, _i = 0; _i < _length; ++_i) - _list[_i] = A._setArrayType([], t5); - _this._environment0$_nestedForwardedModules = _list; - t5 = _list; - } else - t5 = t6; - B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t5), new A.LinkedHashMapKeyIterable(forwarded, A._instanceType(forwarded)._eval$1("LinkedHashMapKeyIterable<1>"))); - } - for (t2 = A._LinkedHashSetIterator$(t2, t2._modifications, t2.$ti._precomputed1), t5 = _this._environment0$_variableIndices, t6 = _this._environment0$_variableNodes, t7 = t2.$ti._precomputed1; t2.moveNext$0();) { - t8 = t2._collection$_current; - if (t8 == null) - t8 = t7._as(t8); - t5.remove$1(0, t8); - J.remove$1$z(B.JSArray_methods.get$last(t4), t8); - J.remove$1$z(B.JSArray_methods.get$last(t6), t8); - } - for (t2 = A._LinkedHashSetIterator$(t3, t3._modifications, t3.$ti._precomputed1), t3 = _this._environment0$_functionIndices, t4 = _this._environment0$_functions, t5 = t2.$ti._precomputed1; t2.moveNext$0();) { - t6 = t2._collection$_current; - if (t6 == null) - t6 = t5._as(t6); - t3.remove$1(0, t6); - J.remove$1$z(B.JSArray_methods.get$last(t4), t6); - } - for (t1 = A._LinkedHashSetIterator$(t1, t1._modifications, t1.$ti._precomputed1), t2 = _this._environment0$_mixinIndices, t3 = _this._environment0$_mixins, t4 = t1.$ti._precomputed1; t1.moveNext$0();) { - t5 = t1._collection$_current; - if (t5 == null) - t5 = t4._as(t5); - t2.remove$1(0, t5); - J.remove$1$z(B.JSArray_methods.get$last(t3), t5); - } - }, - getVariable$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) - return _this._environment0$_getModule$1(namespace).get$variables().$index(0, $name); - if (_this._environment0$_lastVariableName === $name) { - t1 = _this._environment0$_lastVariableIndex; - t1.toString; - t1 = J.$index$asx(_this._environment0$_variables[t1], $name); - return t1 == null ? _this._environment0$_getVariableFromGlobalModule$1($name) : t1; - } - t1 = _this._environment0$_variableIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - _this._environment0$_lastVariableName = $name; - _this._environment0$_lastVariableIndex = _0_0; - t1 = J.$index$asx(_this._environment0$_variables[_0_0], $name); - return t1 == null ? _this._environment0$_getVariableFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._environment0$_variableIndex$1($name); - if (_1_0 != null) { - _this._environment0$_lastVariableName = $name; - _this._environment0$_lastVariableIndex = _1_0; - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._environment0$_variables[_1_0], $name); - return t1 == null ? _this._environment0$_getVariableFromGlobalModule$1($name) : t1; - } else - return _this._environment0$_getVariableFromGlobalModule$1($name); - } - }, - getVariable$1($name) { - return this.getVariable$2$namespace($name, null); - }, - _environment0$_getVariableFromGlobalModule$1($name) { - return this._environment0$_fromOneModule$3($name, "variable", new A.Environment__getVariableFromGlobalModule_closure0($name)); - }, - getVariableNode$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) - return _this._environment0$_getModule$1(namespace).get$variableNodes().$index(0, $name); - if (_this._environment0$_lastVariableName === $name) { - t1 = _this._environment0$_lastVariableIndex; - t1.toString; - t1 = J.$index$asx(_this._environment0$_variableNodes[t1], $name); - return t1 == null ? _this._environment0$_getVariableNodeFromGlobalModule$1($name) : t1; - } - t1 = _this._environment0$_variableIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - _this._environment0$_lastVariableName = $name; - _this._environment0$_lastVariableIndex = _0_0; - t1 = J.$index$asx(_this._environment0$_variableNodes[_0_0], $name); - return t1 == null ? _this._environment0$_getVariableNodeFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._environment0$_variableIndex$1($name); - if (_1_0 != null) { - _this._environment0$_lastVariableName = $name; - _this._environment0$_lastVariableIndex = _1_0; - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._environment0$_variableNodes[_1_0], $name); - return t1 == null ? _this._environment0$_getVariableNodeFromGlobalModule$1($name) : t1; - } else - return _this._environment0$_getVariableNodeFromGlobalModule$1($name); - } - }, - _environment0$_getVariableNodeFromGlobalModule$1($name) { - var t1, t2, _0_0; - for (t1 = this._environment0$_importedModules, t2 = this._environment0$_globalModules, t2 = new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeyIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { - t1 = t2._currentIterator; - _0_0 = t1.get$current(t1).get$variableNodes().$index(0, $name); - if (_0_0 != null) - return _0_0; - } - return null; - }, - globalVariableExists$2$namespace($name, namespace) { - if (namespace != null) - return this._environment0$_getModule$1(namespace).get$variables().containsKey$1($name); - if (B.JSArray_methods.get$first(this._environment0$_variables).containsKey$1($name)) - return true; - return this._environment0$_getVariableFromGlobalModule$1($name) != null; - }, - globalVariableExists$1($name) { - return this.globalVariableExists$2$namespace($name, null); - }, - _environment0$_variableIndex$1($name) { - var t1, i; - for (t1 = this._environment0$_variables, i = t1.length - 1; i >= 0; --i) - if (t1[i].containsKey$1($name)) - return i; - return null; - }, - setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { - var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; - if (namespace != null) { - _this._environment0$_getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); - return; - } - if (global || _this._environment0$_variables.length === 1) { - _this._environment0$_variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure2(_this, $name)); - t1 = _this._environment0$_variables; - if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { - moduleWithName = _this._environment0$_fromOneModule$3($name, "variable", new A.Environment_setVariable_closure3($name)); - if (moduleWithName != null) { - moduleWithName.setVariable$3($name, value, nodeWithSpan); - return; - } - } - J.$indexSet$ax(B.JSArray_methods.get$first(t1), $name, value); - J.$indexSet$ax(B.JSArray_methods.get$first(_this._environment0$_variableNodes), $name, nodeWithSpan); - return; - } - nestedForwardedModules = _this._environment0$_nestedForwardedModules; - if (nestedForwardedModules != null && !_this._environment0$_variableIndices.containsKey$1($name) && _this._environment0$_variableIndex$1($name) == null) - for (t1 = A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(nestedForwardedModules, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { - t3 = t2.__internal$_current; - for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { - t5 = t3.__internal$_current; - if (t5 == null) - t5 = t4._as(t5); - if (t5.get$variables().containsKey$1($name)) { - t5.setVariable$3($name, value, nodeWithSpan); - return; - } - } - } - if (_this._environment0$_lastVariableName === $name) { - t1 = _this._environment0$_lastVariableIndex; - t1.toString; - index = t1; - } else - index = _this._environment0$_variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure4(_this, $name)); - if (!_this._environment0$_inSemiGlobalScope && index === 0) { - index = _this._environment0$_variables.length - 1; - _this._environment0$_variableIndices.$indexSet(0, $name, index); - } - _this._environment0$_lastVariableName = $name; - _this._environment0$_lastVariableIndex = index; - J.$indexSet$ax(_this._environment0$_variables[index], $name, value); - J.$indexSet$ax(_this._environment0$_variableNodes[index], $name, nodeWithSpan); - }, - setVariable$4$global($name, value, nodeWithSpan, global) { - return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); - }, - setLocalVariable$3($name, value, nodeWithSpan) { - var index, _this = this, - t1 = _this._environment0$_variables, - t2 = t1.length; - _this._environment0$_lastVariableName = $name; - index = _this._environment0$_lastVariableIndex = t2 - 1; - _this._environment0$_variableIndices.$indexSet(0, $name, index); - J.$indexSet$ax(t1[index], $name, value); - J.$indexSet$ax(_this._environment0$_variableNodes[index], $name, nodeWithSpan); - }, - getFunction$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) { - t1 = _this._environment0$_getModule$1(namespace); - return t1.get$functions(t1).$index(0, $name); - } - t1 = _this._environment0$_functionIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - t1 = J.$index$asx(_this._environment0$_functions[_0_0], $name); - return t1 == null ? _this._environment0$_getFunctionFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._environment0$_functionIndex$1($name); - if (_1_0 != null) { - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._environment0$_functions[_1_0], $name); - return t1 == null ? _this._environment0$_getFunctionFromGlobalModule$1($name) : t1; - } else - return _this._environment0$_getFunctionFromGlobalModule$1($name); - } - }, - getFunction$1($name) { - return this.getFunction$2$namespace($name, null); - }, - _environment0$_getFunctionFromGlobalModule$1($name) { - return this._environment0$_fromOneModule$3($name, "function", new A.Environment__getFunctionFromGlobalModule_closure0($name)); - }, - _environment0$_functionIndex$1($name) { - var t1, i; - for (t1 = this._environment0$_functions, i = t1.length - 1; i >= 0; --i) - if (t1[i].containsKey$1($name)) - return i; - return null; - }, - getMixin$2$namespace($name, namespace) { - var t1, _0_0, _1_0, _this = this; - if (namespace != null) - return _this._environment0$_getModule$1(namespace).get$mixins().$index(0, $name); - t1 = _this._environment0$_mixinIndices; - _0_0 = t1.$index(0, $name); - if (_0_0 != null) { - t1 = J.$index$asx(_this._environment0$_mixins[_0_0], $name); - return t1 == null ? _this._environment0$_getMixinFromGlobalModule$1($name) : t1; - } else { - _1_0 = _this._environment0$_mixinIndex$1($name); - if (_1_0 != null) { - t1.$indexSet(0, $name, _1_0); - t1 = J.$index$asx(_this._environment0$_mixins[_1_0], $name); - return t1 == null ? _this._environment0$_getMixinFromGlobalModule$1($name) : t1; - } else - return _this._environment0$_getMixinFromGlobalModule$1($name); - } - }, - _environment0$_getMixinFromGlobalModule$1($name) { - return this._environment0$_fromOneModule$3($name, "mixin", new A.Environment__getMixinFromGlobalModule_closure0($name)); - }, - _environment0$_mixinIndex$1($name) { - var t1, i; - for (t1 = this._environment0$_mixins, i = t1.length - 1; i >= 0; --i) - if (t1[i].containsKey$1($name)) - return i; - return null; - }, - withContent$2($content, callback) { - var oldContent = this._environment0$_content; - this._environment0$_content = $content; - callback.call$0(); - this._environment0$_content = oldContent; - }, - asMixin$1(callback) { - var oldInMixin = this._environment0$_inMixin; - this._environment0$_inMixin = true; - callback.call$0(); - this._environment0$_inMixin = oldInMixin; - }, - scope$1$3$semiGlobal$when(callback, semiGlobal, when) { - var wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6, _this = this; - semiGlobal = semiGlobal && _this._environment0$_inSemiGlobalScope; - wasInSemiGlobalScope = _this._environment0$_inSemiGlobalScope; - _this._environment0$_inSemiGlobalScope = semiGlobal; - if (!when) - try { - t1 = callback.call$0(); - return t1; - } finally { - _this._environment0$_inSemiGlobalScope = wasInSemiGlobalScope; - } - t1 = _this._environment0$_variables; - t2 = type$.String; - B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value_2)); - t3 = _this._environment0$_variableNodes; - B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode_2)); - t4 = _this._environment0$_functions; - t5 = type$.Callable_2; - B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); - t6 = _this._environment0$_mixins; - B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); - t5 = _this._environment0$_nestedForwardedModules; - if (t5 != null) - t5.push(A._setArrayType([], type$.JSArray_Module_Callable_2)); - try { - t2 = callback.call$0(); - return t2; - } finally { - _this._environment0$_inSemiGlobalScope = wasInSemiGlobalScope; - _this._environment0$_lastVariableIndex = _this._environment0$_lastVariableName = null; - for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t1))), t2 = _this._environment0$_variableIndices; t1.moveNext$0();) { - $name = t1.get$current(t1); - t2.remove$1(0, $name); - } - B.JSArray_methods.removeLast$0(t3); - for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t4))), t2 = _this._environment0$_functionIndices; t1.moveNext$0();) { - name0 = t1.get$current(t1); - t2.remove$1(0, name0); - } - for (t1 = J.get$iterator$ax(J.get$keys$z(B.JSArray_methods.removeLast$0(t6))), t2 = _this._environment0$_mixinIndices; t1.moveNext$0();) { - name1 = t1.get$current(t1); - t2.remove$1(0, name1); - } - t1 = _this._environment0$_nestedForwardedModules; - if (t1 != null) - t1.pop(); - } - }, - scope$1$1(callback) { - return this.scope$1$3$semiGlobal$when(callback, false, true); - }, - scope$1$2$when(callback, when) { - return this.scope$1$3$semiGlobal$when(callback, false, when); - }, - scope$1$2$semiGlobal(callback, semiGlobal) { - return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true); - }, - toImplicitConfiguration$0() { - var t2, t3, t4, i, values, nodes, t5, t6, $name, value, - t1 = type$.String, - configuration = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ConfiguredValue_2); - for (t2 = this._environment0$_variables, t3 = type$.Value_2, t4 = this._environment0$_variableNodes, i = 0; i < t2.length; ++i) { - values = t2[i]; - nodes = t4[i]; - for (t5 = A.MapExtensions_get_pairs0(values, t1, t3), t5 = t5.get$iterator(t5); t5.moveNext$0();) { - t6 = t5.get$current(t5); - $name = t6._0; - value = t6._1; - t6 = nodes.$index(0, $name); - t6.toString; - configuration.$indexSet(0, $name, new A.ConfiguredValue0(value, null, t6)); - } - } - return new A.Configuration0(configuration, null); - }, - toModule$3(css, preModuleComments, extensionStore) { - return A._EnvironmentModule__EnvironmentModule1(this, css, preModuleComments, extensionStore, A.NullableExtension_andThen0(this._environment0$_forwardedModules, new A.Environment_toModule_closure0())); - }, - toDummyModule$0() { - return A._EnvironmentModule__EnvironmentModule1(this, new A.CssStylesheet0(new A.UnmodifiableListView(B.List_empty17, type$.UnmodifiableListView_CssNode_2), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.Map_empty10, B.C_EmptyExtensionStore0, A.NullableExtension_andThen0(this._environment0$_forwardedModules, new A.Environment_toDummyModule_closure0())); - }, - _environment0$_getModule$1(namespace) { - var _0_0 = this._environment0$_modules.$index(0, namespace); - if (_0_0 != null) - return _0_0; - throw A.wrapException(A.SassScriptException$0('There is no module with the namespace "' + namespace + '".', null)); - }, - _environment0$_fromOneModule$1$3($name, type, callback) { - var t1, t2, t3, t4, t5, _1_0, _2_0, value, identity, valueInModule, identityFromModule, module, node, - _0_0 = this._environment0$_nestedForwardedModules; - if (_0_0 != null) - for (t1 = A._arrayInstanceType(_0_0)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(_0_0, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { - t3 = t2.__internal$_current; - for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { - t5 = t3.__internal$_current; - _1_0 = callback.call$1(t5 == null ? t4._as(t5) : t5); - if (_1_0 != null) - return _1_0; - } - } - for (t1 = this._environment0$_importedModules, t1 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications); t1.moveNext$0();) { - _2_0 = callback.call$1(t1.__js_helper$_current); - if (_2_0 != null) - return _2_0; - } - for (t1 = this._environment0$_globalModules, t2 = A.LinkedHashMapKeyIterator$(t1, t1.__js_helper$_modifications), t3 = type$.Callable_2, value = null, identity = null; t2.moveNext$0();) { - t4 = t2.__js_helper$_current; - valueInModule = callback.call$1(t4); - if (valueInModule == null) - continue; - identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); - if (identityFromModule.$eq(0, identity)) - continue; - if (value != null) { - t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - for (t3 = A.MapExtensions_get_pairs0(t1, type$.Module_Callable_2, type$.AstNode_2), t3 = t3.get$iterator(t3), t4 = "includes " + type; t3.moveNext$0();) { - t1 = t3.get$current(t3); - module = t1._0; - node = t1._1; - if (callback.call$1(module) != null) - t2.$indexSet(0, node.get$span(node), t4); - } - throw A.wrapException(A.MultiSpanSassScriptException$0("This " + type + string$.x20is_av, type + " use", t2)); - } - identity = identityFromModule; - value = valueInModule; - } - return value; - }, - _environment0$_fromOneModule$3($name, type, callback) { - return this._environment0$_fromOneModule$1$3($name, type, callback, type$.dynamic); - } - }; - A.Environment__getVariableFromGlobalModule_closure0.prototype = { - call$1(module) { - return module.get$variables().$index(0, this.name); - }, - $signature: 445 - }; - A.Environment_setVariable_closure2.prototype = { - call$0() { - var t1 = this.$this; - t1._environment0$_lastVariableName = this.name; - return t1._environment0$_lastVariableIndex = 0; - }, - $signature: 10 - }; - A.Environment_setVariable_closure3.prototype = { - call$1(module) { - return module.get$variables().containsKey$1(this.name) ? module : null; - }, - $signature: 446 - }; - A.Environment_setVariable_closure4.prototype = { - call$0() { - var t1 = this.$this, - t2 = t1._environment0$_variableIndex$1(this.name); - return t2 == null ? t1._environment0$_variables.length - 1 : t2; - }, - $signature: 10 - }; - A.Environment__getFunctionFromGlobalModule_closure0.prototype = { - call$1(module) { - return module.get$functions(module).$index(0, this.name); - }, - $signature: 233 - }; - A.Environment__getMixinFromGlobalModule_closure0.prototype = { - call$1(module) { - return module.get$mixins().$index(0, this.name); - }, - $signature: 233 - }; - A.Environment_toModule_closure0.prototype = { - call$1(modules) { - return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable_2); - }, - $signature: 141 - }; - A.Environment_toDummyModule_closure0.prototype = { - call$1(modules) { - return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable_2); - }, - $signature: 141 - }; - A._EnvironmentModule1.prototype = { - get$url(_) { - var t1 = this.css; - return t1.get$span(t1).file.url; - }, - setVariable$3($name, value, nodeWithSpan) { - var t1, t2, - _0_0 = this._environment0$_modulesByVariable.$index(0, $name); - if (_0_0 != null) { - _0_0.setVariable$3($name, value, nodeWithSpan); - return; - } - t1 = this._environment0$_environment; - t2 = t1._environment0$_variables; - if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) - throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); - J.$indexSet$ax(B.JSArray_methods.get$first(t2), $name, value); - J.$indexSet$ax(B.JSArray_methods.get$first(t1._environment0$_variableNodes), $name, nodeWithSpan); - return; - }, - variableIdentity$1($name) { - var module = this._environment0$_modulesByVariable.$index(0, $name); - return module == null ? this : module.variableIdentity$1($name); - }, - cloneCss$0() { - var _0_0, _this = this; - if (!_this.transitivelyContainsCss) - return _this; - _0_0 = A.cloneCssStylesheet0(_this.css, _this.extensionStore); - return A._EnvironmentModule$_1(_this._environment0$_environment, _0_0._0, _this.preModuleComments, _0_0._1, _this._environment0$_modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, true, _this.transitivelyContainsExtensions); - }, - toString$0(_) { - var t2, - t1 = this.css; - if (t1.get$span(t1).file.url == null) - t1 = ""; - else { - t1 = t1.get$span(t1).file.url; - t2 = $.$get$context(); - t1.toString; - t1 = t2.prettyUri$1(t1); - } - return t1; - }, - $isModule1: 1, - get$upstream() { - return this.upstream; - }, - get$variables() { - return this.variables; - }, - get$variableNodes() { - return this.variableNodes; - }, - get$functions(receiver) { - return this.functions; - }, - get$mixins() { - return this.mixins; - }, - get$extensionStore() { - return this.extensionStore; - }, - get$css(receiver) { - return this.css; - }, - get$preModuleComments() { - return this.preModuleComments; - }, - get$transitivelyContainsCss() { - return this.transitivelyContainsCss; - }, - get$transitivelyContainsExtensions() { - return this.transitivelyContainsExtensions; - } - }; - A._EnvironmentModule__EnvironmentModule_closure11.prototype = { - call$1(module) { - return module.get$variables(); - }, - $signature: 449 - }; - A._EnvironmentModule__EnvironmentModule_closure12.prototype = { - call$1(module) { - return module.get$variableNodes(); - }, - $signature: 450 - }; - A._EnvironmentModule__EnvironmentModule_closure13.prototype = { - call$1(module) { - return module.get$functions(module); - }, - $signature: 234 - }; - A._EnvironmentModule__EnvironmentModule_closure14.prototype = { - call$1(module) { - return module.get$mixins(); - }, - $signature: 234 - }; - A._EnvironmentModule__EnvironmentModule_closure15.prototype = { - call$1(module) { - return module.get$transitivelyContainsCss(); - }, - $signature: 127 - }; - A._EnvironmentModule__EnvironmentModule_closure16.prototype = { - call$1(module) { - return module.get$transitivelyContainsExtensions(); - }, - $signature: 127 - }; - A.ErrorRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitErrorRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "@error " + this.expression.toString$0(0) + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A._EvaluateVisitor1.prototype = { - _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { - var t2, metaModule, t3, _i, module, $function, t4, _this = this, - _s20_ = "$name, $module: null", - _s9_ = "sass:meta", - _s7_ = "$module", - t1 = type$.JSArray_BuiltInCallable_2, - metaFunctions = A._setArrayType([A.BuiltInCallable$function0("global-variable-exists", _s20_, new A._EvaluateVisitor_closure25(_this), _s9_), A.BuiltInCallable$function0("variable-exists", "$name", new A._EvaluateVisitor_closure26(_this), _s9_), A.BuiltInCallable$function0("function-exists", _s20_, new A._EvaluateVisitor_closure27(_this), _s9_), A.BuiltInCallable$function0("mixin-exists", _s20_, new A._EvaluateVisitor_closure28(_this), _s9_), A.BuiltInCallable$function0("content-exists", "", new A._EvaluateVisitor_closure29(_this), _s9_), A.BuiltInCallable$function0("module-variables", _s7_, new A._EvaluateVisitor_closure30(_this), _s9_), A.BuiltInCallable$function0("module-functions", _s7_, new A._EvaluateVisitor_closure31(_this), _s9_), A.BuiltInCallable$function0("module-mixins", _s7_, new A._EvaluateVisitor_closure32(_this), _s9_), A.BuiltInCallable$function0("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure33(_this), _s9_), A.BuiltInCallable$function0("get-mixin", _s20_, new A._EvaluateVisitor_closure34(_this), _s9_), A.BuiltInCallable$function0("call", "$function, $args...", new A._EvaluateVisitor_closure35(_this), _s9_)], t1), - metaMixins = A._setArrayType([A.BuiltInCallable$mixin0("load-css", "$url, $with: null", new A._EvaluateVisitor_closure36(_this), false, _s9_), A.BuiltInCallable$mixin0("apply", "$mixin, $args...", new A._EvaluateVisitor_closure37(_this), true, _s9_)], t1); - t1 = type$.BuiltInCallable_2; - t2 = A.List_List$of($.$get$moduleFunctions0(), true, t1); - B.JSArray_methods.addAll$1(t2, metaFunctions); - metaModule = A.BuiltInModule$0("meta", t2, metaMixins, null, t1); - for (t1 = A.List_List$of($.$get$coreModules0(), true, type$.BuiltInModule_Callable_2), t1.push(metaModule), t2 = t1.length, t3 = _this._evaluate0$_builtInModules, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - module = t1[_i]; - t3.$indexSet(0, module.url, module); - } - t1 = type$.JSArray_Callable_2; - t2 = A._setArrayType([], t1); - B.JSArray_methods.addAll$1(t2, functions); - B.JSArray_methods.addAll$1(t2, $.$get$globalFunctions0()); - t1 = A._setArrayType([], t1); - for (_i = 0; _i < 11; ++_i) - t1.push(metaFunctions[_i].withDeprecationWarning$1("meta")); - B.JSArray_methods.addAll$1(t2, t1); - for (t1 = t2.length, t3 = _this._evaluate0$_builtInFunctions, _i = 0; _i < t2.length; t2.length === t1 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - $function = t2[_i]; - t4 = J.get$name$x($function); - t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); - } - }, - run$2(_, importer, node) { - var error, stackTrace, t1, exception; - try { - t1 = type$.nullable_Object; - t1 = A.runZoned(new A._EvaluateVisitor_run_closure1(this, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext1(this, node)], t1, t1), type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace0(error.withLoadedUrls$1(this._evaluate0$_loadedUrls), error, stackTrace); - } else - throw exception; - } - }, - _evaluate0$_assertInModule$1$2(value, $name) { - if (value != null) - return value; - throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); - }, - _evaluate0$_assertInModule$2(value, $name) { - return this._evaluate0$_assertInModule$1$2(value, $name, type$.dynamic); - }, - _evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { - var t2, _this = this, t1 = {}, - _0_0 = _this._evaluate0$_builtInModules.$index(0, url); - t1.builtInModule = null; - if (_0_0 != null) { - t1.builtInModule = _0_0; - if (configuration instanceof A.ExplicitConfiguration0) { - t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; - t2 = configuration.nodeWithSpan; - throw A.wrapException(_this._evaluate0$_exception$2(t1, t2.get$span(t2))); - } - _this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure3(t1, callback)); - return; - } - _this._evaluate0$_withStackFrame$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure4(_this, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback)); - }, - _evaluate0$_loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { - return this._evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); - }, - _evaluate0$_loadModule$4(url, stackFrame, nodeWithSpan, callback) { - return this._evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); - }, - _evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { - var currentConfiguration, t2, t3, message, existingSpan, configurationSpan, environment, css, preModuleComments, extensionStore, module, _this = this, - url = stylesheet.span.file.url, - t1 = _this._evaluate0$_modules, - _0_0 = t1.$index(0, url); - if (_0_0 != null) { - t1 = configuration == null; - currentConfiguration = t1 ? _this._evaluate0$_configuration : configuration; - t2 = _this._evaluate0$_moduleConfigurations.$index(0, url); - t3 = t2._configuration0$__originalConfiguration; - t2 = t3 == null ? t2 : t3; - t3 = currentConfiguration._configuration0$__originalConfiguration; - if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration0) { - if (namesInErrors) { - t2 = $.$get$context(); - url.toString; - message = t2.prettyUri$1(url) + string$.x20was_a; - } else - message = string$.This_mw; - t2 = _this._evaluate0$_moduleNodes.$index(0, url); - existingSpan = t2 == null ? null : t2.get$span(t2); - if (t1) { - t1 = currentConfiguration.nodeWithSpan; - configurationSpan = t1.get$span(t1); - } else - configurationSpan = null; - t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - if (existingSpan != null) - t1.$indexSet(0, existingSpan, "original load"); - if (configurationSpan != null) - t1.$indexSet(0, configurationSpan, "configuration"); - throw A.wrapException(t1.get$isEmpty(0) ? _this._evaluate0$_exception$1(message) : _this._evaluate0$_multiSpanException$3(message, "new load", t1)); - } - return _0_0; - } - environment = A.Environment$0(); - css = A._Cell$(); - preModuleComments = A._Cell$(); - extensionStore = A.ExtensionStore$0(); - _this._evaluate0$_withEnvironment$2(environment, new A._EvaluateVisitor__execute_closure1(_this, importer, stylesheet, extensionStore, configuration, css, preModuleComments)); - t2 = css._readLocal$0(); - t3 = preModuleComments._readLocal$0(); - module = environment.toModule$3(t2, t3 == null ? B.Map_empty10 : t3, extensionStore); - if (url != null) { - t1.$indexSet(0, url, module); - _this._evaluate0$_moduleConfigurations.$indexSet(0, url, _this._evaluate0$_configuration); - if (nodeWithSpan != null) - _this._evaluate0$_moduleNodes.$indexSet(0, url, nodeWithSpan); - } - return module; - }, - _evaluate0$_execute$2(importer, stylesheet) { - return this._evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); - }, - _evaluate0$_addOutOfOrderImports$0() { - var t1, t2, _this = this, _s5_ = "_root", - _s13_ = "_endOfImports", - _0_0 = _this._evaluate0$_outOfOrderImports; - $label0$0: { - if (_0_0 == null) { - t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children; - break $label0$0; - } - t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children; - t1 = A.List_List$of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListBase.E")), true, type$.ModifiableCssNode_2); - B.JSArray_methods.addAll$1(t1, _0_0); - t2 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children; - B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_), null, t2.$ti._eval$1("ListBase.E"))); - break $label0$0; - } - return t1; - }, - _evaluate0$_combineCss$2$clone(root, clone) { - var selectors, _0_0, t1, imports, css, sorted, t2; - if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure3())) { - selectors = root.get$extensionStore().get$simpleSelectors(); - _0_0 = A.IterableExtension_get_firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure4(selectors))); - if (_0_0 != null) - this._evaluate0$_throwForUnsatisfiedExtension$1(_0_0); - return root.get$css(root); - } - t1 = type$.JSArray_CssNode_2; - imports = A._setArrayType([], t1); - css = A._setArrayType([], t1); - t1 = type$.Module_Callable_2; - sorted = A.ListQueue$(t1); - new A._EvaluateVisitor__combineCss_visitModule1(this, A.LinkedHashSet_LinkedHashSet$_empty(t1), clone, css, imports, sorted).call$1(root); - if (root.get$transitivelyContainsExtensions()) - this._evaluate0$_extendModules$1(sorted); - t1 = B.JSArray_methods.$add(imports, css); - t2 = root.get$css(root); - return new A.CssStylesheet0(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode_2), t2.get$span(t2)); - }, - _evaluate0$_combineCss$1(root) { - return this._evaluate0$_combineCss$2$clone(root, false); - }, - _evaluate0$_extendModules$1(sortedModules) { - var t1, t2, t3, originalSelectors, $self, t4, t5, _i, upstream, _0_0, - downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore_2), - unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension_2); - for (t1 = A._ListQueueIterator$(sortedModules, sortedModules.$ti._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { - t3 = t1._collection$_current; - if (t3 == null) - t3 = t2._as(t3); - originalSelectors = t3.get$extensionStore().get$simpleSelectors().toSet$0(0); - unsatisfiedExtensions.addAll$1(0, t3.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure3(originalSelectors))); - $self = downstreamExtensionStores.$index(0, t3.get$url(t3)); - t4 = t3.get$extensionStore().get$addExtensions(); - if ($self != null) - t4.call$1($self); - t4 = t3.get$extensionStore(); - if (t4.get$isEmpty(t4)) - continue; - for (t4 = t3.get$upstream(), t5 = t4.length, _i = 0; _i < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i) { - upstream = t4[_i]; - _0_0 = upstream.get$url(upstream); - if (_0_0 != null) - J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(_0_0, new A._EvaluateVisitor__extendModules_closure4()), t3.get$extensionStore()); - } - unsatisfiedExtensions.removeAll$1(t3.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); - } - if (unsatisfiedExtensions._collection$_length !== 0) - this._evaluate0$_throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(0)); - }, - _evaluate0$_throwForUnsatisfiedExtension$1(extension) { - throw A.wrapException(A.SassException$0(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span, null)); - }, - _evaluate0$_indexAfterImports$1(statements) { - var t1, lastImport, i, _0_0; - for (t1 = J.getInterceptor$asx(statements), lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { - $label0$0: { - _0_0 = t1.$index(statements, i); - if (_0_0 instanceof A.ModifiableCssImport0) - break $label0$0; - if (_0_0 instanceof A.ModifiableCssComment0) - continue; - break; - } - lastImport = i; - } - return lastImport + 1; - }, - visitStylesheet$1(_, node) { - var t1, t2, warning, _i, $name, span; - for (t1 = node.parseTimeWarnings, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - warning = t1.__internal$_current; - if (warning == null) - warning = t2._as(warning); - this._evaluate0$_warn$3(warning._1, warning._2, warning._0); - } - for (t1 = node.children, t2 = t1.length, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(this); - for (t1 = A.MapExtensions_get_pairs0(node.globalVariables, type$.String, type$.FileSpan), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t2 = t1.get$current(t1); - $name = t2._0; - span = t2._1; - this.visitVariableDeclaration$1(0, new A.VariableDeclaration0(null, $name, new A.NullExpression0(span), true, false, span)); - } - return null; - }, - visitAtRootRule$1(_, node) { - var t1, _2_0, root, first, rest, innerCopy, outerCopy, _i, copy, _this = this, _null = null, - _s8_ = "__parent", - _0_0 = node.query, - query = _0_0 != null ? new A.AtRootQueryParser0(A.SpanScanner$(_this._evaluate0$_performInterpolationWithMap$2$warnForColor(_0_0, true)._0, _null), _null).parse$0(0) : B.AtRootQuery_n2q0, - $parent = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_), - included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode_2); - for (t1 = type$.CssStylesheet_2; !t1._is($parent); $parent = _2_0) { - if (!query.excludes$1($parent)) - included.push($parent); - _2_0 = $parent._node$_parent; - if (_2_0 == null) - throw A.wrapException(A.StateError$(string$.CssNod)); - } - root = _this._evaluate0$_trimIncluded$1(included); - if (root === _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_)) { - _this._evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure3(_this, node), node.hasDeclarations, type$.Null); - return _null; - } - if (included.length >= 1) { - first = included[0]; - rest = B.JSArray_methods.sublist$1(included, 1); - innerCopy = first.copyWithoutChildren$0(); - for (t1 = rest.length, outerCopy = innerCopy, _i = 0; _i < rest.length; rest.length === t1 || (0, A.throwConcurrentModificationError)(rest), ++_i, outerCopy = copy) { - copy = rest[_i].copyWithoutChildren$0(); - copy.addChild$1(outerCopy); - } - root.addChild$1(outerCopy); - } else - innerCopy = root; - _this._evaluate0$_scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure4(_this, node)); - return _null; - }, - _evaluate0$_trimIncluded$1(nodes) { - var $parent, t1, innermostContiguous, i, t2, _0_0, _1_0, root, _this = this, _null = null, _s5_ = "_root", - _s22_ = " to be an ancestor of "; - if (nodes.length === 0) - return _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_); - $parent = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent"); - for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = _1_0) { - for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = _0_0) { - _0_0 = $parent._node$_parent; - if (_0_0 == null) - throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); - } - if (innermostContiguous == null) - innermostContiguous = i; - _1_0 = $parent._node$_parent; - if (_1_0 == null) - throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); - } - if ($parent !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_)) - return _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_); - innermostContiguous.toString; - root = nodes[innermostContiguous]; - B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); - return root; - }, - _evaluate0$_scopeForAtRoot$4(node, newParent, query, included) { - var _this = this, - scope = new A._EvaluateVisitor__scopeForAtRoot_closure11(_this, newParent, node), - t1 = query._at_root_query0$_all || query._at_root_query0$_rule; - if (t1 !== query.include) - scope = new A._EvaluateVisitor__scopeForAtRoot_closure12(_this, scope); - if (_this._evaluate0$_mediaQueries != null && query.excludesName$1("media")) - scope = new A._EvaluateVisitor__scopeForAtRoot_closure13(_this, scope); - if (_this._evaluate0$_inKeyframes && query.excludesName$1("keyframes")) - scope = new A._EvaluateVisitor__scopeForAtRoot_closure14(_this, scope); - return _this._evaluate0$_inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure15()) ? new A._EvaluateVisitor__scopeForAtRoot_closure16(_this, scope) : scope; - }, - visitContentBlock$1(_, node) { - return A.throwExpression(A.UnsupportedError$(string$.Evalua)); - }, - visitContentRule$1(_, node) { - var $content = this._evaluate0$_environment._environment0$_content; - if ($content == null) - return null; - this._evaluate0$_runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure1(this, $content), type$.Null); - return null; - }, - visitDebugRule$1(_, node) { - var value = node.expression.accept$1(this), - t1 = value instanceof A.SassString0 ? value._string0$_text : A.serializeValue0(value, true, true); - this._evaluate0$_logger.debug$2(0, t1, node.span); - return null; - }, - visitDeclaration$1(_, node) { - var siblings, interleavedRules, t1, t2, t3, t4, t5, t6, rule, rule0, $name, _1_0, _2_0, value, _3_0, oldDeclarationName, _this = this, _null = null, - _s8_ = "__parent", - _box_0 = {}; - if ((_this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot) == null && !_this._evaluate0$_inUnknownAtRule && !_this._evaluate0$_inKeyframes) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Declarm, node.span)); - if (_this._evaluate0$_declarationName != null && B.JSString_methods.startsWith$1(node.name.get$initialPlain(), "--")) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Declarw, node.span)); - siblings = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_)._node$_parent.children; - interleavedRules = A._setArrayType([], type$.JSArray_CssStyleRule_2); - if (siblings.get$last(siblings) !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_)) { - if (_this._evaluate0$_quietDeps) - if (!_this._evaluate0$_inDependency) { - t1 = _this._evaluate0$_currentCallable; - t1 = t1 == null ? _null : t1.inDependency; - t1 = t1 === true; - } else - t1 = true; - else - t1 = false; - t1 = !t1; - } else - t1 = false; - if (t1) - for (t1 = A.SubListIterable$(siblings, siblings.indexOf$1(siblings, _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_)) + 1, _null, siblings.$ti._eval$1("ListBase.E")), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { - t6 = t1.__internal$_current; - rule = t6 == null ? t2._as(t6) : t6; - $label0$1: { - if (rule instanceof A.ModifiableCssComment0) - continue; - t6 = rule instanceof A.ModifiableCssStyleRule0; - rule0 = t6 ? rule : _null; - if (t6) { - interleavedRules.push(rule0); - break $label0$1; - } - _this._evaluate0$_warn$3(string$.Sassx27s, new A.MultiSpan0(t3, "declaration", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rule.get$span(rule), "nested rule"], t4, t5), t4, t5)), B.Deprecation_VIq); - B.JSArray_methods.clear$0(interleavedRules); - break $label0$1; - } - } - t1 = node.name; - $name = _this._evaluate0$_interpolationToValue$2$warnForColor(t1, true); - _1_0 = _this._evaluate0$_declarationName; - if (_1_0 != null) - $name = new A.CssValue0(_1_0 + "-" + A.S($name.value), $name.span, type$.CssValue_String_2); - _2_0 = node.value; - if (_2_0 != null) { - value = _2_0.accept$1(_this); - if (!value.get$isBlank() || value.get$asList().length === 0) { - t2 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_); - t3 = _2_0.get$span(_2_0); - t4 = node.span; - t1 = B.JSString_methods.startsWith$1(t1.get$initialPlain(), "--"); - t5 = interleavedRules.length === 0 ? _null : _this._evaluate0$_stackTrace$1(t4); - if (_this._evaluate0$_sourceMap) { - t6 = A.NullableExtension_andThen0(_2_0, _this.get$_evaluate0$_expressionNode()); - t6 = t6 == null ? _null : J.get$span$z(t6); - } else - t6 = _null; - t2.addChild$1(A.ModifiableCssDeclaration$0($name, new A.CssValue0(value, t3, type$.CssValue_Value_2), t4, interleavedRules, t1, t5, t6)); - } else if (J.startsWith$1$s($name.value, "--")) - throw A.wrapException(_this._evaluate0$_exception$2("Custom property values may not be empty.", _2_0.get$span(_2_0))); - } - _3_0 = node.children; - _box_0.children = null; - if (_3_0 != null) { - _box_0.children = _3_0; - oldDeclarationName = _this._evaluate0$_declarationName; - _this._evaluate0$_declarationName = $name.value; - _this._evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure1(_box_0, _this), node.hasDeclarations, type$.Null); - _this._evaluate0$_declarationName = oldDeclarationName; - } - return _null; - }, - visitEachRule$1(_, node) { - var _this = this, _box_0 = {}, - t1 = node.list, - list = t1.accept$1(_this), - nodeWithSpan = _this._evaluate0$_expressionNode$1(t1), - _0_0 = node.variables; - $label0$0: { - _box_0.variable = null; - if (_0_0.length === 1) { - _box_0.variable = _0_0[0]; - t1 = new A._EvaluateVisitor_visitEachRule_closure5(_box_0, _this, nodeWithSpan); - break $label0$0; - } - _box_0.variables = null; - _box_0.variables = _0_0; - t1 = new A._EvaluateVisitor_visitEachRule_closure6(_box_0, _this, nodeWithSpan); - break $label0$0; - } - return _this._evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure7(_this, list, t1, node), true, type$.nullable_Value_2); - }, - _evaluate0$_setMultipleVariables$3(variables, value, nodeWithSpan) { - var i, - list = value.get$asList(), - t1 = variables.length, - minLength = Math.min(t1, list.length); - for (i = 0; i < minLength; ++i) - this._evaluate0$_environment.setLocalVariable$3(variables[i], this._evaluate0$_withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); - for (i = minLength; i < t1; ++i) - this._evaluate0$_environment.setLocalVariable$3(variables[i], B.C__SassNull0, nodeWithSpan); - }, - visitErrorRule$1(_, node) { - throw A.wrapException(this._evaluate0$_exception$2(J.toString$0$(node.expression.accept$1(this)), node.span)); - }, - visitExtendRule$1(_, node) { - var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, _0_0, compound, _this = this, _null = null, - styleRule = _this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; - if (styleRule == null || _this._evaluate0$_declarationName != null) - throw A.wrapException(_this._evaluate0$_exception$2(string$.x40exten, node.span)); - for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - if (!complex.accept$1(B._IsBogusVisitor_true0)) - continue; - visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - t6 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); - t7 = complex.accept$1(B.C__IsUselessVisitor0) ? "can't" : "shouldn't"; - _this._evaluate0$_warn$3('The selector "' + t6 + '" is invalid CSS and ' + t7 + string$.x20be_an, new A.MultiSpan0(A.SpanExtensions_trimRight0(complex.span), "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t3, "@extend rule"], t4, t5), t4, t5)), B.Deprecation_bh9); - } - _0_0 = _this._evaluate0$_performInterpolationWithMap$2$warnForColor(node.selector, true); - for (t1 = A.SelectorList_SelectorList$parse0(A.trimAscii0(_0_0._0, true), false, _0_0._1, false).components, t2 = t1.length, t3 = styleRule._style_rule0$_selector._box0$_inner, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - compound = complex.get$singleCompound(); - if (compound == null) - throw A.wrapException(A.SassFormatException$0("complex selectors may not be extended.", complex.span, _null)); - t4 = compound.components; - t5 = t4.length === 1 ? B.JSArray_methods.get$first(t4) : _null; - if (t5 == null) - throw A.wrapException(A.SassFormatException$0(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, compound.span, _null)); - _this._evaluate0$_assertInModule$2(_this._evaluate0$__extensionStore, "_extensionStore").addExtension$4(t3.value, t5, node, _this._evaluate0$_mediaQueries); - } - return _null; - }, - visitAtRule$1(_, node) { - var $name, value, children, wasInKeyframes, wasInUnknownAtRule, _this = this; - if (_this._evaluate0$_declarationName != null) - throw A.wrapException(_this._evaluate0$_exception$2(string$.At_rul, node.span)); - $name = _this._evaluate0$_interpolationToValue$1(node.name); - value = A.NullableExtension_andThen0(node.value, new A._EvaluateVisitor_visitAtRule_closure5(_this)); - children = node.children; - if (children == null) { - _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0($name, node.span, true, value)); - return null; - } - wasInKeyframes = _this._evaluate0$_inKeyframes; - wasInUnknownAtRule = _this._evaluate0$_inUnknownAtRule; - if (A.unvendor0($name.value) === "keyframes") - _this._evaluate0$_inKeyframes = true; - else - _this._evaluate0$_inUnknownAtRule = true; - _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$0($name, node.span, false, value), new A._EvaluateVisitor_visitAtRule_closure6(_this, $name, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure7(), type$.ModifiableCssAtRule_2, type$.Null); - _this._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; - _this._evaluate0$_inKeyframes = wasInKeyframes; - return null; - }, - visitForRule$1(_, node) { - var _this = this, t1 = {}, - t2 = node.from, - fromNumber = _this._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure9(_this, node)), - t3 = node.to, - toNumber = _this._evaluate0$_addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure10(_this, node)), - from = _this._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure11(fromNumber)), - to = t1.to = _this._evaluate0$_addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure12(toNumber, fromNumber)), - direction = from > to ? -1 : 1; - if (from === (!node.isExclusive ? t1.to = to + direction : to)) - return null; - return _this._evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure13(t1, _this, node, from, direction, fromNumber), true, type$.nullable_Value_2); - }, - visitForwardRule$1(_, node) { - var newConfiguration, t4, _i, variable, $name, _this = this, - _s8_ = "@forward", - oldConfiguration = _this._evaluate0$_configuration, - adjustedConfiguration = oldConfiguration.throughForward$1(node), - t1 = node.configuration, - t2 = t1.length, - t3 = node.url; - if (t2 !== 0) { - newConfiguration = _this._evaluate0$_addForwardConfiguration$2(adjustedConfiguration, node); - _this._evaluate0$_loadModule$5$configuration(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure3(_this, node), newConfiguration); - t3 = type$.String; - t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); - for (_i = 0; _i < t2; ++_i) { - variable = t1[_i]; - if (!variable.isGuarded) - t4.add$1(0, variable.name); - } - _this._evaluate0$_removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); - t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); - for (_i = 0; _i < t2; ++_i) - t3.add$1(0, t1[_i].name); - for (t1 = newConfiguration._configuration0$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - $name = t2[_i]; - if (!t3.contains$1(0, $name)) - if (!t1.get$isEmpty(t1)) - t1.remove$1(0, $name); - } - _this._evaluate0$_assertConfigurationIsEmpty$1(newConfiguration); - } else { - _this._evaluate0$_configuration = adjustedConfiguration; - _this._evaluate0$_loadModule$4(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure4(_this, node)); - _this._evaluate0$_configuration = oldConfiguration; - } - return null; - }, - _evaluate0$_addForwardConfiguration$2(configuration, node) { - var t2, t3, _i, variable, t4, oldValue, t5, variableNodeWithSpan, _null = null, - t1 = configuration._configuration0$_values, - newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); - for (t2 = node.configuration, t3 = t2.length, _i = 0; _i < t3; ++_i) { - variable = t2[_i]; - if (variable.isGuarded) { - t4 = variable.name; - oldValue = t1.get$isEmpty(t1) ? _null : t1.remove$1(0, t4); - if (oldValue != null) - t5 = !oldValue.value.$eq(0, B.C__SassNull0); - else { - oldValue = _null; - t5 = false; - } - if (t5) { - newValues.$indexSet(0, t4, oldValue); - continue; - } - } - t4 = variable.expression; - variableNodeWithSpan = this._evaluate0$_expressionNode$1(t4); - newValues.$indexSet(0, variable.name, new A.ConfiguredValue0(this._evaluate0$_withoutSlash$2(t4.accept$1(this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); - } - if (configuration instanceof A.ExplicitConfiguration0 || t1.get$isEmpty(t1)) - return new A.ExplicitConfiguration0(node, newValues, _null); - else - return new A.Configuration0(newValues, _null); - }, - _evaluate0$_registerCommentsForModule$1(module) { - var _this = this, _s5_ = "_root", - t1 = _this._evaluate0$__root; - if (t1 == null) - return; - if (_this._evaluate0$_assertInModule$2(t1, _s5_).children.get$length(0) === 0 || !module.get$transitivelyContainsCss()) - return; - t1 = _this._evaluate0$_preModuleComments; - if (t1 == null) - t1 = _this._evaluate0$_preModuleComments = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable_2, type$.List_CssComment_2); - J.addAll$1$ax(t1.putIfAbsent$2(module, new A._EvaluateVisitor__registerCommentsForModule_closure1()), new A.UnmodifiableListView(J.cast$1$0$ax(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children._collection$_source, type$.CssComment_2), type$.UnmodifiableListView_CssComment_2)); - _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).clearChildren$0(); - _this._evaluate0$__endOfImports = 0; - }, - _evaluate0$_removeUsedConfiguration$3$except(upstream, downstream, except) { - var t1, t2, t3, t4, _i, $name; - for (t1 = upstream._configuration0$_values, t2 = J.toList$0$ax(t1.get$keys(t1)), t3 = t2.length, t4 = downstream._configuration0$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - $name = t2[_i]; - if (except.contains$1(0, $name)) - continue; - if (!t4.containsKey$1($name)) - if (!t1.get$isEmpty(t1)) - t1.remove$1(0, $name); - } - }, - _evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { - var t1, _0_0, $name, value; - if (!(configuration instanceof A.ExplicitConfiguration0)) - return; - t1 = configuration._configuration0$_values; - if (t1.get$isEmpty(t1)) - return; - t1 = A.MapExtensions_get_pairs0(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); - _0_0 = t1.get$first(t1); - $name = _0_0._0; - value = _0_0._1; - t1 = nameInError ? "$" + $name + string$.x20was_n : string$.This_v; - throw A.wrapException(this._evaluate0$_exception$2(t1, value.configurationSpan)); - }, - _evaluate0$_assertConfigurationIsEmpty$1(configuration) { - return this._evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, false); - }, - visitFunctionRule$1(_, node) { - var t1 = this._evaluate0$_environment, - t2 = t1.closure$0(), - t3 = this._evaluate0$_inDependency, - t4 = t1._environment0$_functions, - index = t4.length - 1, - t5 = node.name; - t1._environment0$_functionIndices.$indexSet(0, t5, index); - J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_Environment_2)); - return null; - }, - visitIfRule$1(_, node) { - var t1, t2, _i, clauseToCheck, - clause = node.lastClause; - for (t1 = node.clauses, t2 = t1.length, _i = 0; _i < t2; ++_i) { - clauseToCheck = t1[_i]; - if (clauseToCheck.expression.accept$1(this).get$isTruthy()) { - clause = clauseToCheck; - break; - } - } - return A.NullableExtension_andThen0(clause, new A._EvaluateVisitor_visitIfRule_closure1(this)); - }, - visitImportRule$1(_, node) { - var t1, t2, t3, t4, t5, t6, _i, $import, t7, _0_0, $self, t8, _this = this, - _s8_ = "__parent", - _s5_ = "_root", - _s13_ = "_endOfImports"; - for (t1 = node.imports, t2 = t1.length, t3 = type$.CssValue_String_2, t4 = _this.get$_evaluate0$_interpolationToValue(), t5 = type$.StaticImport_2, t6 = type$.JSArray_ModifiableCssImport_2, _i = 0; _i < t2; ++_i) { - $import = t1[_i]; - if ($import instanceof A.DynamicImport0) - _this._evaluate0$_visitDynamicImport$1($import); - else { - t5._as($import); - t7 = $import.url; - _0_0 = _this._evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(t7, false, false); - $self = $import.modifiers; - t8 = $self == null ? null : t4.call$1($self); - node = new A.ModifiableCssImport0(new A.CssValue0(_0_0._0, t7.span, t3), t8, $import.span); - if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_)) - _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(node); - else if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children._collection$_source)) { - t7 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_); - node._node$_parent = t7; - t7 = t7._node$_children; - node._node$_indexInParent = t7.length; - t7.push(node); - _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; - } else { - t7 = _this._evaluate0$_outOfOrderImports; - (t7 == null ? _this._evaluate0$_outOfOrderImports = A._setArrayType([], t6) : t7).push(node); - } - } - } - return null; - }, - _evaluate0$_visitDynamicImport$1($import) { - return this._evaluate0$_withStackFrame$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure1(this, $import)); - }, - _evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { - var _0_0, importCache, _1_0, importer, canonicalUrl, originalUrl, isDependency, _2_0, stylesheet, _3_0, result, error, stackTrace, error0, stackTrace0, t1, t2, exception, _this = this, - _s11_ = "_stylesheet"; - baseUrl = baseUrl; - try { - _this._evaluate0$_importSpan = span; - _0_0 = _this._evaluate0$_importCache; - importCache = null; - if (_0_0 != null) { - importCache = _0_0; - if (baseUrl == null) - baseUrl = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).span.file.url; - _1_0 = J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), _this._evaluate0$_importer, baseUrl, forImport); - importer = null; - canonicalUrl = null; - originalUrl = null; - if (type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(_1_0)) { - importer = _1_0._0; - canonicalUrl = _1_0._1; - originalUrl = _1_0._2; - if (canonicalUrl.get$scheme() === "") - A.WarnForDeprecation_warnForDeprecation0(_this._evaluate0$_logger, B.Deprecation_fXI, "Importer " + A.S(importer) + " canonicalized " + url + " to " + A.S(canonicalUrl) + string$.x2e_Rela, null, null); - _this._evaluate0$_loadedUrls.add$1(0, canonicalUrl); - isDependency = _this._evaluate0$_inDependency || !J.$eq$(importer, _this._evaluate0$_importer); - _2_0 = importCache.importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl); - stylesheet = null; - if (_2_0 != null) { - stylesheet = _2_0; - t1 = stylesheet; - t2 = importer; - return new A._Record_3_importer_isDependency(t1, t2, isDependency); - } - } - } - if (_this._nodeImporter != null) { - t1 = baseUrl; - _3_0 = _this._importLikeNode$3(url, t1 == null ? _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).span.file.url : t1, forImport); - result = null; - if (_3_0 != null) { - result = _3_0; - t1 = _this._evaluate0$_loadedUrls; - A.NullableExtension_andThen0(result._0.span.file.url, t1.get$add(t1)); - t1 = result; - return t1; - } - } - t1 = B.JSString_methods.startsWith$1(url, "package:"); - if (t1) - throw A.wrapException(string$.x22packa); - else - throw A.wrapException("Can't find stylesheet to import."); - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException0) - throw exception; - else if (t1 instanceof A.ArgumentError) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace0(_this._evaluate0$_exception$1(J.toString$0$(error)), error, stackTrace); - } else { - error0 = t1; - stackTrace0 = A.getTraceFromException(exception); - A.throwWithTrace0(_this._evaluate0$_exception$1(_this._evaluate0$_getErrorMessage$1(error0)), error0, stackTrace0); - } - } finally { - _this._evaluate0$_importSpan = null; - } - }, - _evaluate0$_loadStylesheet$3$baseUrl(url, span, baseUrl) { - return this._evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); - }, - _evaluate0$_loadStylesheet$3$forImport(url, span, forImport) { - return this._evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); - }, - _importLikeNode$3(originalUrl, previous, forImport) { - var isDependency, url, - t1 = this._nodeImporter, - result = t1.loadRelative$3(originalUrl, previous, forImport); - if (result != null) - isDependency = this._evaluate0$_inDependency; - else { - result = t1.load$3(0, originalUrl, previous, forImport); - if (result == null) - return null; - isDependency = true; - } - url = result._1; - t1 = B.JSString_methods.startsWith$1(url, "file") ? A.Syntax_forPath0(url) : B.Syntax_SCSS_scss0; - return new A._Record_3_importer_isDependency(A.Stylesheet_Stylesheet$parse0(result._0, t1, url), null, isDependency); - }, - _evaluate0$_applyMixin$5(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { - var t1, _0_0, t2, _1_8, _this = this, - _s37_ = "Mixin doesn't accept a content block.", - _s10_ = "invocation"; - $label0$0: { - if (mixin == null) - throw A.wrapException(_this._evaluate0$_exception$2("Undefined mixin.", nodeWithSpan.get$span(nodeWithSpan))); - t1 = mixin instanceof A.BuiltInCallable0; - if (t1 && !mixin.acceptsContent && contentCallable != null) { - t1 = _this._evaluate0$_evaluateArguments$1($arguments)._values; - _0_0 = mixin.callbackFor$2(t1[2].length, new A.MapKeySet(t1[0], type$.MapKeySet_String)); - throw A.wrapException(A.MultiSpanSassRuntimeException$0(_s37_, nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_0_0._0.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate0$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); - } - if (t1) { - _this._evaluate0$_environment.withContent$2(contentCallable, new A._EvaluateVisitor__applyMixin_closure3(_this, $arguments, mixin, nodeWithSpanWithoutContent)); - break $label0$0; - } - t1 = type$.UserDefinedCallable_Environment_2._is(mixin); - t2 = false; - if (t1) { - _1_8 = mixin.declaration; - if (_1_8 instanceof A.MixinRule0) - t2 = !type$.MixinRule_2._as(_1_8).get$hasContent() && contentCallable != null; - } - if (t2) - throw A.wrapException(A.MultiSpanSassRuntimeException$0(_s37_, nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), _s10_, A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.$arguments.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate0$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); - if (t1) { - _this._evaluate0$_runUserDefinedCallable$1$4($arguments, mixin, nodeWithSpanWithoutContent, new A._EvaluateVisitor__applyMixin_closure4(_this, contentCallable, mixin, nodeWithSpanWithoutContent), type$.Null); - break $label0$0; - } - throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); - } - }, - visitIncludeRule$1(_, node) { - var _this = this, - mixin = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure5(_this, node)); - if (B.JSString_methods.startsWith$1(node.originalName, "--") && mixin instanceof A.UserDefinedCallable0 && !B.JSString_methods.startsWith$1(mixin.declaration.originalName, "--")) - _this._evaluate0$_warn$3(string$.Sassx20_m, node.get$nameSpan(), B.Deprecation_omC); - _this._evaluate0$_applyMixin$5(mixin, A.NullableExtension_andThen0(node.content, new A._EvaluateVisitor_visitIncludeRule_closure6(_this)), node.$arguments, node, new A._FakeAstNode0(new A._EvaluateVisitor_visitIncludeRule_closure7(node))); - return null; - }, - visitMixinRule$1(_, node) { - var t1 = this._evaluate0$_environment, - t2 = t1.closure$0(), - t3 = this._evaluate0$_inDependency, - t4 = t1._environment0$_mixins, - index = t4.length - 1, - t5 = node.name; - t1._environment0$_mixinIndices.$indexSet(0, t5, index); - J.$indexSet$ax(t4[index], t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_Environment_2)); - return null; - }, - visitLoudComment$1(_, node) { - var t1, text, _this = this, - _s8_ = "__parent", - _s13_ = "_endOfImports"; - if (_this._evaluate0$_inFunction) - return null; - if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) === _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root") && _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root").children._collection$_source)) - _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; - t1 = node.text; - text = _this._evaluate0$_performInterpolation$1(t1); - if (!B.JSString_methods.endsWith$1(text, "*/")) - text += " */"; - _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(new A.ModifiableCssComment0(text, t1.span)); - return null; - }, - visitMediaRule$1(_, node) { - var _0_0, queries, mergedQueries, t1, mergedSources, t2, t3, _this = this; - if (_this._evaluate0$_declarationName != null) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Media_, node.span)); - _0_0 = _this._evaluate0$_performInterpolationWithMap$2$warnForColor(node.query, true); - queries = new A.MediaQueryParser0(A.SpanScanner$(_0_0._0, null), _0_0._1).parse$0(0); - mergedQueries = A.NullableExtension_andThen0(_this._evaluate0$_mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure5(_this, queries)); - t1 = mergedQueries == null; - if (!t1 && J.get$isEmpty$asx(mergedQueries)) - return null; - if (t1) - mergedSources = B.Set_empty5; - else { - t2 = _this._evaluate0$_mediaQuerySources; - t2.toString; - t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); - t3 = _this._evaluate0$_mediaQueries; - t3.toString; - t2.addAll$1(0, t3); - t2.addAll$1(0, queries); - mergedSources = t2; - } - t1 = t1 ? queries : mergedQueries; - _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure6(_this, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure7(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null); - return null; - }, - _evaluate0$_mergeMediaQueries$2(queries1, queries2) { - var t1, t2, t3, t4, _0_0, t5, result, - queries = A._setArrayType([], type$.JSArray_CssMediaQuery_2); - for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2); t1.moveNext$0();) { - t3 = t1.get$current(t1); - for (t4 = t2.get$iterator(queries2); t4.moveNext$0();) { - _0_0 = t3.merge$1(t4.get$current(t4)); - if (B._SingletonCssMediaQueryMergeResult_00 === _0_0) - continue; - if (B._SingletonCssMediaQueryMergeResult_10 === _0_0) - return null; - t5 = _0_0 instanceof A.MediaQuerySuccessfulMergeResult0; - result = t5 ? _0_0 : null; - if (t5) - queries.push(result.query); - } - } - return queries; - }, - visitReturnRule$1(_, node) { - var t1 = node.expression; - return this._evaluate0$_withoutSlash$2(t1.accept$1(this), t1); - }, - visitSilentComment$1(_, node) { - return null; - }, - visitStyleRule$1(_, node) { - var t1, _0_0, selectorText, selectorMap, parsedSelector, nest, t2, _i, _1_0, first, t3, rule, oldAtRootExcludingStyleRule, _this = this, _null = null, - _s8_ = "__parent", - _s11_ = "_stylesheet"; - if (_this._evaluate0$_declarationName != null) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_n, node.span)); - else if (_this._evaluate0$_inKeyframes && _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) instanceof A.ModifiableCssKeyframeBlock0) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_k, node.span)); - t1 = node.selector; - _0_0 = _this._evaluate0$_performInterpolationWithMap$2$warnForColor(t1, true); - selectorText = _0_0._0; - selectorMap = _0_0._1; - if (_this._evaluate0$_inKeyframes) { - _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(new A.CssValue0(A.List_List$unmodifiable(new A.KeyframeSelectorParser0(A.SpanScanner$(selectorText, _null), selectorMap).parse$0(0), type$.String), t1.span, type$.CssValue_List_String_2), node.span), new A._EvaluateVisitor_visitStyleRule_closure7(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure8(), type$.ModifiableCssKeyframeBlock_2, type$.Null); - return _null; - } - parsedSelector = A.SelectorList_SelectorList$parse0(selectorText, true, selectorMap, _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss); - t1 = _this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; - t1 = t1 == null ? _null : t1.fromPlainCss; - nest = t1 !== true; - if (nest) { - if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss) - for (t1 = parsedSelector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { - _1_0 = t1[_i].leadingCombinators; - if (_1_0.length >= 1) { - first = _1_0[0]; - t3 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_); - t3 = t3.plainCss; - } else { - first = _null; - t3 = false; - } - if (t3) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Top_lel, first.span)); - } - t1 = _this._evaluate0$_styleRuleIgnoringAtRoot; - t1 = t1 == null ? _null : t1.originalSelector; - parsedSelector = parsedSelector.nestWithin$3$implicitParent$preserveParentSelectors(t1, !_this._evaluate0$_atRootExcludingStyleRule, _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss); - } - rule = A.ModifiableCssStyleRule$0(_this._evaluate0$_assertInModule$2(_this._evaluate0$__extensionStore, "_extensionStore").addSelector$2(parsedSelector, _this._evaluate0$_mediaQueries), node.span, _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss, parsedSelector); - oldAtRootExcludingStyleRule = _this._evaluate0$_atRootExcludingStyleRule; - t1 = _this._evaluate0$_atRootExcludingStyleRule = false; - t2 = nest ? new A._EvaluateVisitor_visitStyleRule_closure9() : _null; - _this._evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure10(_this, rule, node), node.hasDeclarations, t2, type$.ModifiableCssStyleRule_2, type$.Null); - _this._evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; - _this._evaluate0$_warnForBogusCombinators$1(rule); - if ((_this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot) == null) { - t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children; - t1 = !t1.get$isEmpty(t1); - } - if (t1) { - t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children; - t1.get$last(t1).isGroupEnd = true; - } - return _null; - }, - _evaluate0$_warnForBogusCombinators$1(rule) { - var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, t8, t9, _this = this, _null = null; - if (!rule.accept$1(B._IsInvisibleVisitor_false_false0)) - for (t1 = rule._style_rule0$_selector._box0$_inner.value.components, t2 = t1.length, t3 = type$.SourceSpan, t4 = type$.String, t5 = rule.children, _i = 0; _i < t2; ++_i) { - complex = t1[_i]; - if (!complex.accept$1(B._IsBogusVisitor_true0)) - continue; - if (complex.accept$1(B.C__IsUselessVisitor0)) { - visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - _this._evaluate0$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix20, A.SpanExtensions_trimRight0(complex.span), B.Deprecation_bh9); - } else if (complex.leadingCombinators.length !== 0) { - if (!_this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, "_stylesheet").plainCss) { - visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - _this._evaluate0$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix0a, A.SpanExtensions_trimRight0(complex.span), B.Deprecation_bh9); - } - } else { - visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); - complex.accept$1(visitor); - t6 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); - t7 = complex.accept$1(B._IsBogusVisitor_false0) ? string$.x20It_wi : ""; - t8 = A.SpanExtensions_trimRight0(complex.span); - if (t5.get$length(0) === 0) - A.throwExpression(A.IterableElementError_noElement()); - t9 = J.get$span$z(t5.$index(0, 0)); - _this._evaluate0$_warn$3('The selector "' + t6 + string$.x22x20is_o + t7 + string$.x0aThis_, new A.MultiSpan0(t8, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t5.every$1(t5, new A._EvaluateVisitor__warnForBogusCombinators_closure1()) ? "\n(try converting to a //-style comment)" : "")], t3, t4), t3, t4)), B.Deprecation_bh9); - } - } - }, - visitSupportsRule$1(_, node) { - var t1, _this = this; - if (_this._evaluate0$_declarationName != null) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Suppor, node.span)); - t1 = node.condition; - _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$0(new A.CssValue0(_this._evaluate0$_visitSupportsCondition$1(t1), t1.get$span(t1), type$.CssValue_String_2), node.span), new A._EvaluateVisitor_visitSupportsRule_closure3(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure4(), type$.ModifiableCssSupportsRule_2, type$.Null); - return null; - }, - _evaluate0$_visitSupportsCondition$1(condition) { - var t1, _this = this, _box_0 = {}; - $label0$0: { - if (condition instanceof A.SupportsOperation0) { - t1 = condition.operator; - t1 = _this._evaluate0$_parenthesize$2(condition.left, t1) + " " + t1 + " " + _this._evaluate0$_parenthesize$2(condition.right, t1); - break $label0$0; - } - if (condition instanceof A.SupportsNegation0) { - t1 = "not " + _this._evaluate0$_parenthesize$1(condition.condition); - break $label0$0; - } - if (condition instanceof A.SupportsInterpolation0) { - t1 = condition.expression; - t1 = _this._evaluate0$_serialize$3$quote(t1.accept$1(_this), t1, false); - break $label0$0; - } - _box_0.declaration = null; - if (condition instanceof A.SupportsDeclaration0) { - _box_0.declaration = condition; - t1 = _this._evaluate0$_withSupportsDeclaration$1(new A._EvaluateVisitor__visitSupportsCondition_closure1(_box_0, _this)); - break $label0$0; - } - if (condition instanceof A.SupportsFunction0) { - t1 = _this._evaluate0$_performInterpolation$1(condition.name) + "(" + _this._evaluate0$_performInterpolation$1(condition.$arguments) + ")"; - break $label0$0; - } - if (condition instanceof A.SupportsAnything0) { - t1 = "(" + _this._evaluate0$_performInterpolation$1(condition.contents) + ")"; - break $label0$0; - } - t1 = A.throwExpression(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeTypeOfDartObject(condition).toString$0(0) + ".", null)); - } - return t1; - }, - _evaluate0$_withSupportsDeclaration$1$1(callback) { - var t1, - oldInSupportsDeclaration = this._evaluate0$_inSupportsDeclaration; - this._evaluate0$_inSupportsDeclaration = true; - try { - t1 = callback.call$0(); - return t1; - } finally { - this._evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; - } - }, - _evaluate0$_withSupportsDeclaration$1(callback) { - return this._evaluate0$_withSupportsDeclaration$1$1(callback, type$.dynamic); - }, - _evaluate0$_parenthesize$2(condition, operator) { - var t1; - if (!(condition instanceof A.SupportsNegation0)) - if (condition instanceof A.SupportsOperation0) - t1 = operator == null || operator !== condition.operator; - else - t1 = false; - else - t1 = true; - if (t1) - return "(" + this._evaluate0$_visitSupportsCondition$1(condition) + ")"; - return this._evaluate0$_visitSupportsCondition$1(condition); - }, - _evaluate0$_parenthesize$1(condition) { - return this._evaluate0$_parenthesize$2(condition, null); - }, - visitVariableDeclaration$1(_, node) { - var t2, value, _this = this, _null = null, t1 = {}; - if (node.isGuarded) { - if (node.namespace == null && _this._evaluate0$_environment._environment0$_variables.length === 1) { - t2 = _this._evaluate0$_configuration._configuration0$_values; - t2 = t2.get$isEmpty(t2) ? _null : t2.remove$1(0, node.name); - t1.override = null; - if (t2 != null) { - t1.override = t2; - t2 = !t2.value.$eq(0, B.C__SassNull0); - } else - t2 = false; - if (t2) { - _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure5(t1, _this, node)); - return _null; - } - } - value = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure6(_this, node)); - if (value != null && !value.$eq(0, B.C__SassNull0)) - return _null; - } - if (node.isGlobal && !_this._evaluate0$_environment.globalVariableExists$1(node.name)) { - t1 = _this._evaluate0$_environment._environment0$_variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName0(node.span) + ": null` at the stylesheet root."; - _this._evaluate0$_warn$3(t1, node.span, B.Deprecation_MT8); - } - t1 = node.expression; - _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure7(_this, node, _this._evaluate0$_withoutSlash$2(t1.accept$1(_this), t1))); - return _null; - }, - visitUseRule$1(_, node) { - var values, _i, variable, t3, variableNodeWithSpan, configuration, _this = this, - t1 = node.configuration, - t2 = t1.length; - if (t2 !== 0) { - values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); - for (_i = 0; _i < t2; ++_i) { - variable = t1[_i]; - t3 = variable.expression; - variableNodeWithSpan = _this._evaluate0$_expressionNode$1(t3); - values.$indexSet(0, variable.name, new A.ConfiguredValue0(_this._evaluate0$_withoutSlash$2(t3.accept$1(_this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); - } - configuration = new A.ExplicitConfiguration0(node, values, null); - } else - configuration = B.Configuration_Map_empty_null0; - _this._evaluate0$_loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure1(_this, node), configuration); - _this._evaluate0$_assertConfigurationIsEmpty$1(configuration); - return null; - }, - visitWarnRule$1(_, node) { - var _this = this, - value = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitWarnRule_closure1(_this, node)), - t1 = value instanceof A.SassString0 ? value._string0$_text : _this._evaluate0$_serialize$2(value, node.expression); - _this._evaluate0$_logger.warn$2$trace(0, t1, _this._evaluate0$_stackTrace$1(node.span)); - return null; - }, - visitWhileRule$1(_, node) { - return this._evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure1(this, node), true, node.hasDeclarations, type$.nullable_Value_2); - }, - visitBinaryOperationExpression$1(_, node) { - var t1, _this = this; - if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, "_stylesheet").plainCss) { - t1 = node.operator; - t1 = t1 !== B.BinaryOperator_wdM0 && t1 !== B.BinaryOperator_U770; - } else - t1 = false; - if (t1) - throw A.wrapException(_this._evaluate0$_exception$2("Operators aren't allowed in plain CSS.", node.get$operatorSpan())); - return _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure1(_this, node)); - }, - _evaluate0$_slash$3(left, right, node) { - var t2, _1_1, - result = left.dividedBy$1(right), - _1_2_isSet = left instanceof A.SassNumber0, - _1_2 = null, right0 = null, - t1 = false; - if (_1_2_isSet) { - t2 = type$.SassNumber_2; - t2._as(left); - if (right instanceof A.SassNumber0) { - t2._as(right); - t1 = node.allowsSlash && this._evaluate0$_operandAllowsSlash$1(node.left) && this._evaluate0$_operandAllowsSlash$1(node.right); - right0 = right; - _1_2 = right0; - } else - _1_2 = right; - _1_1 = left; - } else { - _1_1 = left; - left = null; - } - if (t1) - return type$.SassNumber_2._as(result).withSlash$2(left, right0); - if (_1_1 instanceof A.SassNumber0) - t1 = (_1_2_isSet ? _1_2 : right) instanceof A.SassNumber0; - else - t1 = false; - if (t1) { - this._evaluate0$_warn$3(string$.Using__o + A.S(new A._EvaluateVisitor__slash_recommendation1().call$1(node)) + " or " + A.expressionToCalc0(node).toString$0(0) + string$.x0a_Morex20, node.get$span(0), B.Deprecation_q39); - return result; - } - return result; - }, - _evaluate0$_operandAllowsSlash$1(node) { - var t1; - if (node instanceof A.FunctionExpression0) - if (node.namespace == null) { - t1 = node.name; - t1 = B.Set_yHF81.contains$1(0, t1.toLowerCase()) && this._evaluate0$_environment.getFunction$1(t1) == null; - } else - t1 = false; - else - t1 = true; - return t1; - }, - visitValueExpression$1(_, node) { - return node.value; - }, - visitVariableExpression$1(_, node) { - var result = this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure1(this, node)); - if (result != null) - return result; - throw A.wrapException(this._evaluate0$_exception$2("Undefined variable.", node.span)); - }, - visitUnaryOperationExpression$1(_, node) { - return this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitUnaryOperationExpression_closure1(node, node.operand.accept$1(this))); - }, - visitBooleanExpression$1(_, node) { - return node.value ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - visitIfExpression$1(_, node) { - var condition, t1, ifTrue, ifFalse, result, _this = this, - _0_0 = _this._evaluate0$_evaluateMacroArguments$1(node), - positional = _0_0._0, - named = _0_0._1; - _this._evaluate0$_verifyArguments$4(positional.length, named, $.$get$IfExpression_declaration0(), node); - condition = A.ListExtensions_elementAtOrNull(positional, 0); - if (condition == null) { - t1 = named.$index(0, "condition"); - t1.toString; - condition = t1; - } - ifTrue = A.ListExtensions_elementAtOrNull(positional, 1); - if (ifTrue == null) { - t1 = named.$index(0, "if-true"); - t1.toString; - ifTrue = t1; - } - ifFalse = A.ListExtensions_elementAtOrNull(positional, 2); - if (ifFalse == null) { - t1 = named.$index(0, "if-false"); - t1.toString; - ifFalse = t1; - } - result = condition.accept$1(_this).get$isTruthy() ? ifTrue : ifFalse; - return _this._evaluate0$_withoutSlash$2(result.accept$1(_this), _this._evaluate0$_expressionNode$1(result)); - }, - visitNullExpression$1(_, node) { - return B.C__SassNull0; - }, - visitNumberExpression$1(_, node) { - return A.SassNumber_SassNumber0(node.value, node.unit); - }, - visitParenthesizedExpression$1(_, node) { - var _this = this; - return _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, "_stylesheet").plainCss ? A.throwExpression(_this._evaluate0$_exception$2("Parentheses aren't allowed in plain CSS.", node.span)) : node.expression.accept$1(_this); - }, - visitColorExpression$1(_, node) { - return node.value; - }, - visitListExpression$1(_, node) { - var t1 = node.contents; - return A.SassList$0(new A.MappedListIterable(t1, new A._EvaluateVisitor_visitListExpression_closure1(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), node.separator, node.hasBrackets); - }, - visitMapExpression$1(_, node) { - var t2, t3, _i, t4, key, value, keyValue, valueValue, oldValueSpan, - t1 = type$.Value_2, - map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), - keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2); - for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { - t4 = t2[_i]; - key = t4._0; - value = t4._1; - keyValue = key.accept$1(this); - valueValue = value.accept$1(this); - if (map.containsKey$1(keyValue)) { - t1 = keyNodes.$index(0, keyValue); - oldValueSpan = t1 == null ? null : t1.get$span(t1); - t1 = key.get$span(key); - t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - if (oldValueSpan != null) - t2.$indexSet(0, oldValueSpan, "first key"); - throw A.wrapException(A.MultiSpanSassRuntimeException$0("Duplicate key.", t1, "second key", t2, this._evaluate0$_stackTrace$1(key.get$span(key)), null)); - } - map.$indexSet(0, keyValue, valueValue); - keyNodes.$indexSet(0, keyValue, key); - } - return new A.SassMap0(A.ConstantMap_ConstantMap$from(map, t1, t1)); - }, - visitFunctionExpression$1(_, node) { - var t2, _0_0, t3, t4, $name, oldInFunction, result, _this = this, - _s11_ = "_stylesheet", - t1 = {}, - $function = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss ? null : _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure5(_this, node)); - t1.$function = $function; - if ($function == null) { - if (node.namespace != null) - throw A.wrapException(_this._evaluate0$_exception$2("Undefined function.", node.span)); - t2 = node.name; - _0_0 = t2.toLowerCase(); - t3 = false; - if ("min" === _0_0 || "max" === _0_0 || "round" === _0_0 || "abs" === _0_0) { - t3 = node.$arguments; - t4 = t3.named; - t3 = t4.get$isEmpty(t4) && t3.rest == null && B.JSArray_methods.every$1(t3.positional, new A._EvaluateVisitor_visitFunctionExpression_closure6()); - $name = _0_0; - } else - $name = null; - if (t3) - return _this._evaluate0$_visitCalculation$2$inLegacySassFunction(node, $name); - if ("calc" === _0_0 || "clamp" === _0_0 || "hypot" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "sqrt" === _0_0 || "exp" === _0_0 || "sign" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "atan2" === _0_0 || "pow" === _0_0 || "log" === _0_0) - return _this._evaluate0$_visitCalculation$1(node); - $function = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss ? null : _this._evaluate0$_builtInFunctions.$index(0, t2); - t2 = t1.$function = $function == null ? new A.PlainCssCallable0(node.originalName) : $function; - } else - t2 = $function; - if (B.JSString_methods.startsWith$1(node.originalName, "--") && t2 instanceof A.UserDefinedCallable0 && !B.JSString_methods.startsWith$1(t2.declaration.originalName, "--")) - _this._evaluate0$_warn$3(string$.Sassx20_ff, node.get$nameSpan(), B.Deprecation_omC); - oldInFunction = _this._evaluate0$_inFunction; - _this._evaluate0$_inFunction = true; - result = _this._evaluate0$_addErrorSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure7(t1, _this, node)); - _this._evaluate0$_inFunction = oldInFunction; - return result; - }, - _evaluate0$_visitCalculation$2$inLegacySassFunction(node, inLegacySassFunction) { - var $arguments, oldCallableNode, t1, _0_0, error, stackTrace, t4, _i, exception, _this = this, - t2 = node.$arguments, - t3 = t2.named; - if (t3.get$isNotEmpty(t3)) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Keywor, node.span)); - else if (t2.rest != null) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Rest_a, node.span)); - _this._evaluate0$_checkCalculationArguments$1(node); - t3 = A._setArrayType([], type$.JSArray_Object); - for (t2 = t2.positional, t4 = t2.length, _i = 0; _i < t4; ++_i) - t3.push(_this._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction)); - $arguments = t3; - if (_this._evaluate0$_inSupportsDeclaration) - return new A.SassCalculation0(node.name, A.List_List$unmodifiable($arguments, type$.Object)); - oldCallableNode = _this._evaluate0$_callableNode; - _this._evaluate0$_callableNode = node; - try { - t1 = null; - t3 = node.name; - _0_0 = t3.toLowerCase(); - $label0$0: { - if ("calc" === _0_0) { - t1 = A.SassCalculation_calc0(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("sqrt" === _0_0) { - t1 = A.SassCalculation__singleArgument0("sqrt", J.$index$asx($arguments, 0), A.number2__sqrt$closure(), true); - break $label0$0; - } - if ("sin" === _0_0) { - t1 = A.SassCalculation__singleArgument0("sin", J.$index$asx($arguments, 0), A.number2__sin$closure(), false); - break $label0$0; - } - if ("cos" === _0_0) { - t1 = A.SassCalculation__singleArgument0("cos", J.$index$asx($arguments, 0), A.number2__cos$closure(), false); - break $label0$0; - } - if ("tan" === _0_0) { - t1 = A.SassCalculation__singleArgument0("tan", J.$index$asx($arguments, 0), A.number2__tan$closure(), false); - break $label0$0; - } - if ("asin" === _0_0) { - t1 = A.SassCalculation__singleArgument0("asin", J.$index$asx($arguments, 0), A.number2__asin$closure(), true); - break $label0$0; - } - if ("acos" === _0_0) { - t1 = A.SassCalculation__singleArgument0("acos", J.$index$asx($arguments, 0), A.number2__acos$closure(), true); - break $label0$0; - } - if ("atan" === _0_0) { - t1 = A.SassCalculation__singleArgument0("atan", J.$index$asx($arguments, 0), A.number2__atan$closure(), true); - break $label0$0; - } - if ("abs" === _0_0) { - t1 = A.SassCalculation_abs0(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("exp" === _0_0) { - t1 = A.SassCalculation_exp0(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("sign" === _0_0) { - t1 = A.SassCalculation_sign0(J.$index$asx($arguments, 0)); - break $label0$0; - } - if ("min" === _0_0) { - t1 = A.SassCalculation_min0($arguments); - break $label0$0; - } - if ("max" === _0_0) { - t1 = A.SassCalculation_max0($arguments); - break $label0$0; - } - if ("hypot" === _0_0) { - t1 = A.SassCalculation_hypot0($arguments); - break $label0$0; - } - if ("pow" === _0_0) { - t1 = A.SassCalculation_pow0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("atan2" === _0_0) { - t1 = A.SassCalculation_atan20(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("log" === _0_0) { - t1 = A.SassCalculation_log0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("mod" === _0_0) { - t1 = A.SassCalculation_mod0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("rem" === _0_0) { - t1 = A.SassCalculation_rem0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); - break $label0$0; - } - if ("round" === _0_0) { - t1 = A.SassCalculation_roundInternal0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2), inLegacySassFunction, node.span, new A._EvaluateVisitor__visitCalculation_closure1(_this, node)); - break $label0$0; - } - if ("clamp" === _0_0) { - t1 = A.SassCalculation_clamp0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); - break $label0$0; - } - t3 = A.UnsupportedError$('Unknown calculation name "' + t3 + '".'); - t1 = A.throwExpression(t3); - } - t1 = t1; - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassScriptException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - if (B.JSString_methods.contains$1(error.message, "compatible")) - _this._evaluate0$_verifyCompatibleNumbers$2($arguments, t2); - A.throwWithTrace0(_this._evaluate0$_exception$2(error.message, node.span), error, stackTrace); - } else - throw exception; - } finally { - _this._evaluate0$_callableNode = oldCallableNode; - } - }, - _evaluate0$_visitCalculation$1(node) { - return this._evaluate0$_visitCalculation$2$inLegacySassFunction(node, null); - }, - _evaluate0$_checkCalculationArguments$1(node) { - var t1, _0_0, - check = new A._EvaluateVisitor__checkCalculationArguments_check1(this, node); - $label0$0: { - t1 = node.name; - _0_0 = t1.toLowerCase(); - if ("calc" === _0_0 || "sqrt" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "abs" === _0_0 || "exp" === _0_0 || "sign" === _0_0) { - check.call$1(1); - break $label0$0; - } - if ("min" === _0_0 || "max" === _0_0 || "hypot" === _0_0) { - check.call$0(); - break $label0$0; - } - if ("pow" === _0_0 || "atan2" === _0_0 || "log" === _0_0 || "mod" === _0_0 || "rem" === _0_0) { - check.call$1(2); - break $label0$0; - } - if ("round" === _0_0 || "clamp" === _0_0) { - check.call$1(3); - break $label0$0; - } - throw A.wrapException(A.UnsupportedError$('Unknown calculation name "' + t1 + '".')); - } - }, - _evaluate0$_verifyCompatibleNumbers$2(args, nodesWithSpans) { - var i, t1, _0_0, arg, number1, j, number2; - for (i = 0; t1 = args.length, i < t1; ++i) { - _0_0 = args[i]; - if (_0_0 instanceof A.SassNumber0) { - t1 = _0_0.get$hasComplexUnits(); - arg = _0_0; - } else { - arg = null; - t1 = false; - } - if (t1) - throw A.wrapException(this._evaluate0$_exception$2("Number " + A.S(arg) + " isn't compatible with CSS calculations.", J.get$span$z(nodesWithSpans[i]))); - } - for (i = 0; i < t1 - 1; ++i) { - number1 = args[i]; - if (!(number1 instanceof A.SassNumber0)) - continue; - for (j = i + 1; t1 = args.length, j < t1; ++j) { - number2 = args[j]; - if (!(number2 instanceof A.SassNumber0)) - continue; - if (number1.hasPossiblyCompatibleUnits$1(number2)) - continue; - throw A.wrapException(A.MultiSpanSassRuntimeException$0(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", J.get$span$z(nodesWithSpans[i]), number1.toString$0(0), A.LinkedHashMap_LinkedHashMap$_literal([J.get$span$z(nodesWithSpans[j]), number2.toString$0(0)], type$.FileSpan, type$.String), this._evaluate0$_stackTrace$1(J.get$span$z(nodesWithSpans[i])), null)); - } - } - }, - _evaluate0$_visitCalculationExpression$2$inLegacySassFunction(node, inLegacySassFunction) { - var result, t2, _0_0, _1_0, t3, _i, i, _this = this, _null = null, _box_0 = {}, - t1 = node instanceof A.ParenthesizedExpression0, - inner = t1 ? node.expression : _null; - if (t1) { - result = _this._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(inner, inLegacySassFunction); - return result instanceof A.SassString0 ? new A.SassString0("(" + result._string0$_text + ")", false) : result; - } - if (node instanceof A.StringExpression0 && node.accept$1(B.C_IsCalculationSafeVisitor0)) { - t1 = node.text; - t2 = t1.get$asPlain(); - _0_0 = t2 == null ? _null : t2.toLowerCase(); - $label0$0: { - if ("pi" === _0_0) { - t1 = A.SassNumber_SassNumber0(3.141592653589793, _null); - break $label0$0; - } - if ("e" === _0_0) { - t1 = A.SassNumber_SassNumber0(2.718281828459045, _null); - break $label0$0; - } - if ("infinity" === _0_0) { - t1 = A.SassNumber_SassNumber0(1 / 0, _null); - break $label0$0; - } - if ("-infinity" === _0_0) { - t1 = A.SassNumber_SassNumber0(-1 / 0, _null); - break $label0$0; - } - if ("nan" === _0_0) { - t1 = A.SassNumber_SassNumber0(0 / 0, _null); - break $label0$0; - } - t1 = new A.SassString0(_this._evaluate0$_performInterpolation$1(t1), false); - break $label0$0; - } - return t1; - } - _box_0.right = _box_0.left = _box_0.operator = null; - t1 = node instanceof A.BinaryOperationExpression0; - if (t1) { - _box_0.operator = node.operator; - _box_0.left = node.left; - _box_0.right = node.right; - } - if (t1) { - _this._evaluate0$_checkWhitespaceAroundCalculationOperator$1(node); - return _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor__visitCalculationExpression_closure1(_box_0, _this, node, inLegacySassFunction)); - } - if (node instanceof A.NumberExpression0 || node instanceof A.VariableExpression0 || node instanceof A.FunctionExpression0 || node instanceof A.IfExpression0) { - _1_0 = node.accept$1(_this); - $label1$1: { - if (_1_0 instanceof A.SassNumber0) { - t1 = _1_0; - break $label1$1; - } - if (_1_0 instanceof A.SassCalculation0) { - t1 = _1_0; - break $label1$1; - } - if (_1_0 instanceof A.SassString0) { - t1 = !_1_0._string0$_hasQuotes; - result = _1_0; - } else { - result = _null; - t1 = false; - } - if (t1) { - t1 = result; - break $label1$1; - } - t1 = A.throwExpression(_this._evaluate0$_exception$2("Value " + _1_0.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); - } - return t1; - } - if (node instanceof A.ListExpression0 && !node.hasBrackets && B.ListSeparator_nbm0 === node.separator && node.contents.length >= 2) { - t1 = A._setArrayType([], type$.JSArray_Object); - for (t2 = node.contents, t3 = t2.length, _i = 0; _i < t3; ++_i) - t1.push(_this._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction)); - _this._evaluate0$_checkAdjacentCalculationValues$2(t1, node); - for (i = 0; i < t1.length; ++i) { - t3 = t1[i]; - if (t3 instanceof A.CalculationOperation0 && t2[i] instanceof A.ParenthesizedExpression0) - t1[i] = new A.SassString0("(" + A.S(t3) + ")", false); - } - return new A.SassString0(B.JSArray_methods.join$1(t1, " "), false); - } - throw A.wrapException(_this._evaluate0$_exception$2(string$.This_e, node.get$span(node))); - }, - _evaluate0$_checkWhitespaceAroundCalculationOperator$1(node) { - var t2, t3, t4, textBetweenOperands, first, last, - t1 = node.operator; - if (t1 !== B.BinaryOperator_u150 && t1 !== B.BinaryOperator_SjO0) - return; - t1 = node.left; - t2 = t1.get$span(t1); - t2 = t2.get$file(t2); - t3 = node.right; - t4 = t3.get$span(t3); - if (t2 !== t4.get$file(t4)) - return; - t2 = t1.get$span(t1); - t2 = t2.get$end(t2); - t4 = t3.get$span(t3); - if (t2.offset >= t4.get$start(t4).offset) - return; - t2 = t1.get$span(t1); - t2 = t2.get$file(t2); - t1 = t1.get$span(t1); - t1 = t1.get$end(t1); - t3 = t3.get$span(t3); - textBetweenOperands = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, t1.offset, t3.get$start(t3).offset), 0, null); - first = textBetweenOperands.charCodeAt(0); - last = textBetweenOperands.charCodeAt(textBetweenOperands.length - 1); - if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47) - t1 = !(last === 32 || last === 9 || last === 10 || last === 13 || last === 12 || last === 47); - else - t1 = true; - if (t1) - throw A.wrapException(this._evaluate0$_exception$2(string$.x22x2b__an, node.get$operatorSpan())); - }, - _evaluate0$_binaryOperatorToCalculationOperator$2(operator, node) { - var t1; - $label0$0: { - if (B.BinaryOperator_u150 === operator) { - t1 = B.CalculationOperator_g2q0; - break $label0$0; - } - if (B.BinaryOperator_SjO0 === operator) { - t1 = B.CalculationOperator_CxF0; - break $label0$0; - } - if (B.BinaryOperator_2No0 === operator) { - t1 = B.CalculationOperator_1710; - break $label0$0; - } - if (B.BinaryOperator_U770 === operator) { - t1 = B.CalculationOperator_Qf10; - break $label0$0; - } - t1 = A.throwExpression(this._evaluate0$_exception$2(string$.This_o, node.get$operatorSpan())); - } - return t1; - }, - _evaluate0$_checkAdjacentCalculationValues$2(elements, node) { - var t1, i, t2, previous, current, previousNode, currentNode, _0_2; - for (t1 = elements.length, i = 1; i < t1; ++i) { - t2 = i - 1; - previous = elements[t2]; - current = elements[i]; - if (previous instanceof A.SassString0 || current instanceof A.SassString0) - continue; - t1 = node.contents; - previousNode = t1[t2]; - currentNode = t1[i]; - if (currentNode instanceof A.UnaryOperationExpression0) { - _0_2 = currentNode.operator; - if (B.UnaryOperator_AiQ0 !== _0_2) - t1 = B.UnaryOperator_cLp0 === _0_2; - else - t1 = true; - } else - t1 = false; - if (!t1) - t1 = currentNode instanceof A.NumberExpression0 && currentNode.value < 0; - else - t1 = true; - if (t1) - throw A.wrapException(this._evaluate0$_exception$2(string$.x22x2b__an, A.FileSpanExtension_subspan(currentNode.get$span(currentNode), 0, 1))); - else - throw A.wrapException(this._evaluate0$_exception$2("Missing math operator.", previousNode.get$span(previousNode).expand$1(0, currentNode.get$span(currentNode)))); - } - }, - visitInterpolatedFunctionExpression$1(_, node) { - var result, _this = this, - t1 = _this._evaluate0$_performInterpolation$1(node.name), - oldInFunction = _this._evaluate0$_inFunction; - _this._evaluate0$_inFunction = true; - result = _this._evaluate0$_addErrorSpan$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure1(_this, node, new A.PlainCssCallable0(t1))); - _this._evaluate0$_inFunction = oldInFunction; - return result; - }, - _evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { - var oldCallable, result, _this = this, - evaluated = _this._evaluate0$_evaluateArguments$1($arguments), - $name = callable.declaration.name; - if ($name !== "@content") - $name += "()"; - oldCallable = _this._evaluate0$_currentCallable; - _this._evaluate0$_currentCallable = callable; - result = _this._evaluate0$_withStackFrame$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure1(_this, callable, evaluated, nodeWithSpan, run, $V)); - _this._evaluate0$_currentCallable = oldCallable; - return result; - }, - _evaluate0$_runFunctionCallable$3($arguments, callable, nodeWithSpan) { - var buffer, first, argument, restArg, rest, error, t1, t2, _i, t3, t4, exception, _this = this; - if (callable instanceof A.BuiltInCallable0) - return _this._evaluate0$_withoutSlash$2(_this._evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan), nodeWithSpan); - else if (type$.UserDefinedCallable_Environment_2._is(callable)) - return _this._evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure1(_this, callable), type$.Value_2); - else if (callable instanceof A.PlainCssCallable0) { - t1 = $arguments.named; - if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); - buffer = new A.StringBuffer(callable.name + "("); - try { - first = true; - for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { - argument = t1[_i]; - if (first) - first = false; - else - buffer._contents += ", "; - t3 = buffer; - t4 = argument; - t4 = _this._evaluate0$_serialize$3$quote(t4.accept$1(_this), t4, true); - t3._contents += t4; - } - restArg = $arguments.rest; - if (restArg != null) { - rest = restArg.accept$1(_this); - if (!first) - buffer._contents += ", "; - t1 = buffer; - t2 = _this._evaluate0$_serialize$2(rest, restArg); - t1._contents += t2; - } - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SassRuntimeException_2._is(t1)) { - error = t1; - if (!B.JSString_methods.endsWith$1(error._span_exception$_message, "isn't a valid CSS value.")) - throw exception; - throw A.wrapException(A.MultiSpanSassRuntimeException$0(error._span_exception$_message, J.get$span$z(error), "value", A.LinkedHashMap_LinkedHashMap$_literal([nodeWithSpan.get$span(nodeWithSpan), "unknown function treated as plain CSS"], type$.FileSpan, type$.String), J.get$trace$z(error), null)); - } else - throw exception; - } - t1 = buffer; - t2 = A.Primitives_stringFromCharCode(41); - t1._contents += t2; - t2 = buffer._contents; - return new A.SassString0(t2.charCodeAt(0) == 0 ? t2 : t2, false); - } else - throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$(callable).toString$0(0) + ".", null)); - }, - _evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan) { - var result, error, stackTrace, namedSet, _0_0, declaredArguments, i, t1, argument, t2, t3, rest, argumentList, exception, _this = this, _box_0 = {}, - evaluated = _this._evaluate0$_evaluateArguments$1($arguments), - oldCallableNode = _this._evaluate0$_callableNode; - _this._evaluate0$_callableNode = nodeWithSpan; - namedSet = new A.MapKeySet(evaluated._values[0], type$.MapKeySet_String); - _box_0.callback = _box_0.overload = null; - _0_0 = callable.callbackFor$2(evaluated._values[2].length, namedSet); - _box_0.overload = _0_0._0; - _box_0.callback = _0_0._1; - _this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure5(_box_0, evaluated, namedSet)); - declaredArguments = _box_0.overload.$arguments; - for (i = evaluated._values[2].length, t1 = declaredArguments.length; i < t1; ++i) { - argument = declaredArguments[i]; - t2 = evaluated._values[2]; - t3 = evaluated._values[0].remove$1(0, argument.name); - if (t3 == null) { - t3 = argument.defaultValue; - t3 = _this._evaluate0$_withoutSlash$2(t3.accept$1(_this), t3); - } - t2.push(t3); - } - if (_box_0.overload.restArgument != null) { - if (evaluated._values[2].length > t1) { - rest = B.JSArray_methods.sublist$1(evaluated._values[2], t1); - B.JSArray_methods.removeRange$2(evaluated._values[2], t1, evaluated._values[2].length); - } else - rest = B.List_empty20; - t1 = evaluated._values[0]; - argumentList = A.SassArgumentList$0(rest, t1, evaluated._values[4] === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_ECn0 : evaluated._values[4]); - evaluated._values[2].push(argumentList); - } else - argumentList = null; - result = null; - try { - result = _this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure6(_box_0, evaluated)); - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException0) - throw exception; - else { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace0(_this._evaluate0$_exception$2(_this._evaluate0$_getErrorMessage$1(error), nodeWithSpan.get$span(nodeWithSpan)), error, stackTrace); - } - } - _this._evaluate0$_callableNode = oldCallableNode; - if (argumentList == null) - return result; - if (evaluated._values[0].__js_helper$_length === 0) - return result; - if (argumentList._argument_list$_wereKeywordsAccessed) - return result; - throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + A.pluralize0("argument", evaluated._values[0].get$keys(0).get$length(0), null) + " named " + A.toSentence0(evaluated._values[0].get$keys(0).map$1$1(0, new A._EvaluateVisitor__runBuiltInCallable_closure7(), type$.Object), "or") + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_box_0.overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), null)); - }, - _evaluate0$_evaluateArguments$1($arguments) { - var t1, t2, _i, expression, nodeForSpan, named, namedNodes, t3, t4, $name, value, restArgs, rest, restNodeForSpan, t5, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, _this = this, - positional = A._setArrayType([], type$.JSArray_Value_2), - positionalNodes = A._setArrayType([], type$.JSArray_AstNode_2); - for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { - expression = t1[_i]; - nodeForSpan = _this._evaluate0$_expressionNode$1(expression); - positional.push(_this._evaluate0$_withoutSlash$2(expression.accept$1(_this), nodeForSpan)); - positionalNodes.push(nodeForSpan); - } - t1 = type$.String; - named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2); - t2 = type$.AstNode_2; - namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t3 = A.MapExtensions_get_pairs0($arguments.named, t1, type$.Expression_2), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - $name = t4._0; - value = t4._1; - nodeForSpan = _this._evaluate0$_expressionNode$1(value); - named.$indexSet(0, $name, _this._evaluate0$_withoutSlash$2(value.accept$1(_this), nodeForSpan)); - namedNodes.$indexSet(0, $name, nodeForSpan); - } - restArgs = $arguments.rest; - if (restArgs == null) - return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, B.ListSeparator_undecided_null_undecided0]); - rest = restArgs.accept$1(_this); - restNodeForSpan = _this._evaluate0$_expressionNode$1(restArgs); - if (rest instanceof A.SassMap0) { - _this._evaluate0$_addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure7()); - t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t4 = rest._map0$_contents, t4 = J.get$iterator$ax(t4.get$keys(t4)), t5 = type$.SassString_2; t4.moveNext$0();) - t3.$indexSet(0, t5._as(t4.get$current(t4))._string0$_text, restNodeForSpan); - namedNodes.addAll$1(0, t3); - separator = B.ListSeparator_undecided_null_undecided0; - } else if (rest instanceof A.SassList0) { - t3 = rest._list1$_contents; - B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure8(_this, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value0>"))); - B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); - separator = rest._list1$_separator; - if (rest instanceof A.SassArgumentList0) { - rest._argument_list$_wereKeywordsAccessed = true; - rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure9(_this, named, restNodeForSpan, namedNodes)); - } - } else { - positional.push(_this._evaluate0$_withoutSlash$2(rest, restNodeForSpan)); - positionalNodes.push(restNodeForSpan); - separator = B.ListSeparator_undecided_null_undecided0; - } - keywordRestArgs = $arguments.keywordRest; - if (keywordRestArgs == null) - return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); - keywordRest = keywordRestArgs.accept$1(_this); - keywordRestNodeForSpan = _this._evaluate0$_expressionNode$1(keywordRestArgs); - if (keywordRest instanceof A.SassMap0) { - _this._evaluate0$_addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure10()); - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t2 = keywordRest._map0$_contents, t2 = J.get$iterator$ax(t2.get$keys(t2)), t3 = type$.SassString_2; t2.moveNext$0();) - t1.$indexSet(0, t3._as(t2.get$current(t2))._string0$_text, keywordRestNodeForSpan); - namedNodes.addAll$1(0, t1); - return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); - } else - throw A.wrapException(_this._evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); - }, - _evaluate0$_evaluateMacroArguments$1(invocation) { - var t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, _this = this, - t1 = invocation.$arguments, - restArgs_ = t1.rest; - if (restArgs_ == null) - return new A._Record_2(t1.positional, t1.named); - t2 = t1.positional; - positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); - named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression_2); - rest = restArgs_.accept$1(_this); - restNodeForSpan = _this._evaluate0$_expressionNode$1(restArgs_); - if (rest instanceof A.SassMap0) - _this._evaluate0$_addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure7(restArgs_)); - else if (rest instanceof A.SassList0) { - t2 = rest._list1$_contents; - B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure8(_this, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression0>"))); - if (rest instanceof A.SassArgumentList0) { - rest._argument_list$_wereKeywordsAccessed = true; - rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure9(_this, named, restNodeForSpan, restArgs_)); - } - } else - positional.push(new A.ValueExpression0(_this._evaluate0$_withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); - keywordRestArgs_ = t1.keywordRest; - if (keywordRestArgs_ == null) - return new A._Record_2(positional, named); - keywordRest = keywordRestArgs_.accept$1(_this); - keywordRestNodeForSpan = _this._evaluate0$_expressionNode$1(keywordRestArgs_); - if (keywordRest instanceof A.SassMap0) { - _this._evaluate0$_addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure10(_this, keywordRestNodeForSpan, keywordRestArgs_)); - return new A._Record_2(positional, named); - } else - throw A.wrapException(_this._evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); - }, - _evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert) { - map._map0$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure1(this, values, convert, this._evaluate0$_expressionNode$1(nodeWithSpan), map, nodeWithSpan)); - }, - _evaluate0$_addRestMap$4(values, map, nodeWithSpan, convert) { - return this._evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); - }, - _evaluate0$_verifyArguments$4(positional, named, $arguments, nodeWithSpan) { - return this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure1($arguments, positional, named)); - }, - visitSelectorExpression$1(_, node) { - var t1 = this._evaluate0$_styleRuleIgnoringAtRoot; - t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); - return t1 == null ? B.C__SassNull0 : t1; - }, - visitStringExpression$1(_, node) { - var t1, t2, t3, _i, value, t4, _0_0, text, _this = this, - oldInSupportsDeclaration = _this._evaluate0$_inSupportsDeclaration; - _this._evaluate0$_inSupportsDeclaration = false; - t1 = A._setArrayType([], type$.JSArray_String); - for (t2 = node.text.contents, t3 = t2.length, _i = 0; _i < t3; ++_i) { - value = t2[_i]; - $label0$0: { - if (typeof value == "string") { - t4 = value; - break $label0$0; - } - if (value instanceof A.Expression0) { - _0_0 = value.accept$1(_this); - $label1$1: { - if (_0_0 instanceof A.SassString0) { - text = _0_0._string0$_text; - t4 = text; - break $label1$1; - } - t4 = _this._evaluate0$_serialize$3$quote(_0_0, value, false); - break $label1$1; - } - break $label0$0; - } - t4 = A.throwExpression(A.UnsupportedError$("Unknown interpolation value " + A.S(value))); - } - t1.push(t4); - } - t1 = B.JSArray_methods.join$0(t1); - _this._evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; - return new A.SassString0(t1, node.hasQuotes); - }, - visitSupportsExpression$1(_, expression) { - return new A.SassString0(this._evaluate0$_visitSupportsCondition$1(expression.condition), false); - }, - visitCssAtRule$1(node) { - var wasInKeyframes, wasInUnknownAtRule, t1, _this = this; - if (_this._evaluate0$_declarationName != null) - throw A.wrapException(_this._evaluate0$_exception$2(string$.At_rul, node.span)); - if (node.isChildless) { - _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0(node.name, node.span, true, node.value)); - return; - } - wasInKeyframes = _this._evaluate0$_inKeyframes; - wasInUnknownAtRule = _this._evaluate0$_inUnknownAtRule; - t1 = node.name; - if (A.unvendor0(t1.value) === "keyframes") - _this._evaluate0$_inKeyframes = true; - else - _this._evaluate0$_inUnknownAtRule = true; - _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssAtRule$0(t1, node.span, false, node.value), new A._EvaluateVisitor_visitCssAtRule_closure3(_this, node), false, new A._EvaluateVisitor_visitCssAtRule_closure4(), type$.ModifiableCssAtRule_2, type$.Null); - _this._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; - _this._evaluate0$_inKeyframes = wasInKeyframes; - }, - visitCssComment$1(node) { - var _this = this, - _s8_ = "__parent", - _s13_ = "_endOfImports"; - if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) === _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root") && _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root").children._collection$_source)) - _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; - _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(new A.ModifiableCssComment0(node.text, node.span)); - }, - visitCssDeclaration$1(node) { - this._evaluate0$_assertInModule$2(this._evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$0(node.name, node.value, node.span, null, node.parsedAsCustomProperty, null, node.valueSpanForMap)); - }, - visitCssImport$1(node) { - var t1, _this = this, - _s8_ = "__parent", - _s5_ = "_root", - _s13_ = "_endOfImports", - modifiableNode = new A.ModifiableCssImport0(node.url, node.modifiers, node.span); - if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_)) - _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(modifiableNode); - else if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children._collection$_source)) { - _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).addChild$1(modifiableNode); - _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; - } else { - t1 = _this._evaluate0$_outOfOrderImports; - (t1 == null ? _this._evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t1).push(modifiableNode); - } - }, - visitCssKeyframeBlock$1(node) { - this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure3(this, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure4(), type$.ModifiableCssKeyframeBlock_2, type$.Null); - }, - visitCssMediaRule$1(node) { - var mergedQueries, t1, mergedSources, t2, t3, _this = this; - if (_this._evaluate0$_declarationName != null) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Media_, node.span)); - mergedQueries = A.NullableExtension_andThen0(_this._evaluate0$_mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure5(_this, node)); - t1 = mergedQueries == null; - if (!t1 && J.get$isEmpty$asx(mergedQueries)) - return; - if (t1) - mergedSources = B.Set_empty5; - else { - t2 = _this._evaluate0$_mediaQuerySources; - t2.toString; - t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); - t3 = _this._evaluate0$_mediaQueries; - t3.toString; - t2.addAll$1(0, t3); - t2.addAll$1(0, node.queries); - mergedSources = t2; - } - t1 = t1 ? node.queries : mergedQueries; - _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure6(_this, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure7(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null); - }, - visitCssStyleRule$1(node) { - var t1, styleRule, t2, nest, t3, originalSelector, rule, oldAtRootExcludingStyleRule, _0_1, lastChild, _this = this, _null = null, - _s8_ = "__parent"; - if (_this._evaluate0$_declarationName != null) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_n, node.span)); - else if (_this._evaluate0$_inKeyframes && _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) instanceof A.ModifiableCssKeyframeBlock0) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_k, node.span)); - t1 = _this._evaluate0$_atRootExcludingStyleRule; - styleRule = t1 ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; - t2 = t1 ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; - t2 = t2 == null ? _null : t2.fromPlainCss; - nest = t2 !== true; - t2 = node._style_rule0$_selector._box0$_inner; - if (nest) { - t2 = t2.value; - t3 = styleRule == null ? _null : styleRule.originalSelector; - originalSelector = t2.nestWithin$3$implicitParent$preserveParentSelectors(t3, !t1, node.fromPlainCss); - } else - originalSelector = t2.value; - rule = A.ModifiableCssStyleRule$0(_this._evaluate0$_assertInModule$2(_this._evaluate0$__extensionStore, "_extensionStore").addSelector$2(originalSelector, _this._evaluate0$_mediaQueries), node.span, node.fromPlainCss, originalSelector); - oldAtRootExcludingStyleRule = _this._evaluate0$_atRootExcludingStyleRule; - _this._evaluate0$_atRootExcludingStyleRule = false; - t1 = nest ? new A._EvaluateVisitor_visitCssStyleRule_closure3() : _null; - _this._evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure4(_this, rule, node), false, t1, type$.ModifiableCssStyleRule_2, type$.Null); - _this._evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; - t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children._collection$_source; - t2 = J.getInterceptor$asx(t1); - _0_1 = t2.get$length(t1); - if (_0_1 >= 1) { - lastChild = t2.elementAt$1(t1, _0_1 - 1); - t1 = styleRule == null; - } else { - lastChild = _null; - t1 = false; - } - if (t1) - lastChild.isGroupEnd = true; - }, - visitCssStylesheet$1(node) { - var t1; - for (t1 = J.get$iterator$ax(node.get$children(node)); t1.moveNext$0();) - t1.get$current(t1).accept$1(this); - }, - visitCssSupportsRule$1(node) { - var _this = this; - if (_this._evaluate0$_declarationName != null) - throw A.wrapException(_this._evaluate0$_exception$2(string$.Suppor, node.span)); - _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssSupportsRule$0(node.condition, node.span), new A._EvaluateVisitor_visitCssSupportsRule_closure3(_this, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure4(), type$.ModifiableCssSupportsRule_2, type$.Null); - }, - _evaluate0$_handleReturn$1$2(list, callback) { - var t1, _i, _0_0; - for (t1 = list.length, _i = 0; _i < list.length; list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i) { - _0_0 = callback.call$1(list[_i]); - if (_0_0 != null) - return _0_0; - } - return null; - }, - _evaluate0$_handleReturn$2(list, callback) { - return this._evaluate0$_handleReturn$1$2(list, callback, type$.dynamic); - }, - _evaluate0$_withEnvironment$1$2(environment, callback) { - var result, - oldEnvironment = this._evaluate0$_environment; - this._evaluate0$_environment = environment; - result = callback.call$0(); - this._evaluate0$_environment = oldEnvironment; - return result; - }, - _evaluate0$_withEnvironment$2(environment, callback) { - return this._evaluate0$_withEnvironment$1$2(environment, callback, type$.dynamic); - }, - _evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { - var result = this._evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor), - t1 = trim ? A.trimAscii0(result, true) : result; - return new A.CssValue0(t1, interpolation.span, type$.CssValue_String_2); - }, - _evaluate0$_interpolationToValue$1(interpolation) { - return this._evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, false); - }, - _evaluate0$_interpolationToValue$2$warnForColor(interpolation, warnForColor) { - return this._evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); - }, - _evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor) { - return this._evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, false, warnForColor)._0; - }, - _evaluate0$_performInterpolation$1(interpolation) { - return this._evaluate0$_performInterpolation$2$warnForColor(interpolation, false); - }, - _evaluate0$_performInterpolationWithMap$2$warnForColor(interpolation, warnForColor) { - var _0_0 = this._evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, true, true), - map = _0_0._1; - map.toString; - return new A._Record_2(_0_0._0, map); - }, - _evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, sourceMap, warnForColor) { - var t1, t2, t3, t4, t5, t6, first, _i, t7, value, result, result0, t8, _this = this, _null = null, - targetLocations = sourceMap ? A._setArrayType([], type$.JSArray_SourceLocation) : _null, - oldInSupportsDeclaration = _this._evaluate0$_inSupportsDeclaration; - _this._evaluate0$_inSupportsDeclaration = false; - for (t1 = interpolation.contents, t2 = t1.length, t3 = type$.Expression_2, t4 = targetLocations == null, t5 = interpolation.span, t6 = type$.Object, first = true, _i = 0, t7 = ""; _i < t2; ++_i, first = false) { - value = t1[_i]; - if (!first) - if (!t4) - targetLocations.push(A.SourceLocation$(t7.length, _null, _null, _null)); - if (typeof value == "string") { - t7 += value; - continue; - } - t3._as(value); - result = value.accept$1(_this); - if (warnForColor && $.$get$namesByColor0().containsKey$1(result)) { - result0 = A.List_List$from([""], false, t6); - result0.fixed$length = Array; - result0.immutable$list = Array; - t8 = $.$get$namesByColor0(); - _this._evaluate0$_warn$2(string$.You_pr + A.S(t8.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t8.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression0(B.BinaryOperator_u150, new A.StringExpression0(new A.Interpolation0(result0, B.List_null, t5), true), value, false).toString$0(0) + "'.", value.get$span(value)); - } - t7 += _this._evaluate0$_serialize$3$quote(result, value, false); - } - _this._evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; - return new A._Record_2(t7.charCodeAt(0) == 0 ? t7 : t7, A.NullableExtension_andThen0(targetLocations, new A._EvaluateVisitor__performInterpolationHelper_closure1(interpolation))); - }, - _evaluate0$_serialize$3$quote(value, nodeWithSpan, quote) { - return this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure1(value, quote)); - }, - _evaluate0$_serialize$2(value, nodeWithSpan) { - return this._evaluate0$_serialize$3$quote(value, nodeWithSpan, true); - }, - _evaluate0$_expressionNode$1(expression) { - var t1; - if (expression instanceof A.VariableExpression0) { - t1 = this._evaluate0$_addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure1(this, expression)); - return t1 == null ? expression : t1; - } else - return expression; - }, - _evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { - var t1, result, _this = this; - _this._evaluate0$_addChild$2$through(node, through); - t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent"); - _this._evaluate0$__parent = node; - result = _this._evaluate0$_environment.scope$1$2$when(callback, scopeWhen, $T); - _this._evaluate0$__parent = t1; - return result; - }, - _evaluate0$_withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { - return this._evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); - }, - _evaluate0$_withParent$2$2(node, callback, $S, $T) { - return this._evaluate0$_withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); - }, - _evaluate0$_addChild$2$through(node, through) { - var _0_0, grandparent, t1, - $parent = this._evaluate0$_assertInModule$2(this._evaluate0$__parent, "__parent"); - if (through != null) { - for (; through.call$1($parent); $parent = _0_0) { - _0_0 = $parent._node$_parent; - if (_0_0 == null) - throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); - } - if ($parent.get$hasFollowingSibling()) { - grandparent = $parent._node$_parent; - t1 = grandparent.children; - if ($parent.equalsIgnoringChildren$1(t1.get$last(t1))) - $parent = type$.ModifiableCssParentNode_2._as(t1.get$last(t1)); - else { - $parent = $parent.copyWithoutChildren$0(); - grandparent.addChild$1($parent); - } - } - } - $parent.addChild$1(node); - }, - _evaluate0$_addChild$1(node) { - return this._evaluate0$_addChild$2$through(node, null); - }, - _evaluate0$_withStyleRule$1$2(rule, callback) { - var result, - oldRule = this._evaluate0$_styleRuleIgnoringAtRoot; - this._evaluate0$_styleRuleIgnoringAtRoot = rule; - result = callback.call$0(); - this._evaluate0$_styleRuleIgnoringAtRoot = oldRule; - return result; - }, - _evaluate0$_withStyleRule$2(rule, callback) { - return this._evaluate0$_withStyleRule$1$2(rule, callback, type$.dynamic); - }, - _evaluate0$_withMediaQueries$1$3(queries, sources, callback) { - var result, _this = this, - oldMediaQueries = _this._evaluate0$_mediaQueries, - oldSources = _this._evaluate0$_mediaQuerySources; - _this._evaluate0$_mediaQueries = queries; - _this._evaluate0$_mediaQuerySources = sources; - result = callback.call$0(); - _this._evaluate0$_mediaQueries = oldMediaQueries; - _this._evaluate0$_mediaQuerySources = oldSources; - return result; - }, - _evaluate0$_withMediaQueries$3(queries, sources, callback) { - return this._evaluate0$_withMediaQueries$1$3(queries, sources, callback, type$.dynamic); - }, - _evaluate0$_withStackFrame$1$3(member, nodeWithSpan, callback) { - var oldMember, result, _this = this, - t1 = _this._evaluate0$_stack; - t1.push(new A._Record_2(_this._evaluate0$_member, nodeWithSpan)); - oldMember = _this._evaluate0$_member; - _this._evaluate0$_member = member; - result = callback.call$0(); - _this._evaluate0$_member = oldMember; - t1.pop(); - return result; - }, - _evaluate0$_withStackFrame$3(member, nodeWithSpan, callback) { - return this._evaluate0$_withStackFrame$1$3(member, nodeWithSpan, callback, type$.dynamic); - }, - _evaluate0$_withoutSlash$2(value, nodeForSpan) { - var t1; - if (value instanceof A.SassNumber0) - t1 = value.asSlash != null; - else - t1 = false; - if (t1) - this._evaluate0$_warn$3(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation1().call$1(value)) + string$.x0a_Morex20, nodeForSpan.get$span(nodeForSpan), B.Deprecation_q39); - return value.withoutSlash$0(); - }, - _evaluate0$_stackFrame$2(member, span) { - return A.frameForSpan0(span, member, A.NullableExtension_andThen0(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure1(this))); - }, - _evaluate0$_stackTrace$1(span) { - var t2, t3, _i, t4, nodeWithSpan, _this = this, - t1 = A._setArrayType([], type$.JSArray_Frame); - for (t2 = _this._evaluate0$_stack, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - t4 = t2[_i]; - nodeWithSpan = t4._1; - t1.push(_this._evaluate0$_stackFrame$2(t4._0, nodeWithSpan.get$span(nodeWithSpan))); - } - if (span != null) - t1.push(_this._evaluate0$_stackFrame$2(_this._evaluate0$_member, span)); - return A.Trace$(new A.ReversedListIterable(t1, type$.ReversedListIterable_Frame), null); - }, - _evaluate0$_stackTrace$0() { - return this._evaluate0$_stackTrace$1(null); - }, - _evaluate0$_warn$3(message, span, deprecation) { - var t1, trace, _this = this; - if (_this._evaluate0$_quietDeps) - if (!_this._evaluate0$_inDependency) { - t1 = _this._evaluate0$_currentCallable; - t1 = t1 == null ? null : t1.inDependency; - t1 = t1 === true; - } else - t1 = true; - else - t1 = false; - if (t1) - return; - if (!_this._evaluate0$_warningsEmitted.add$1(0, new A._Record_2(message, span))) - return; - trace = _this._evaluate0$_stackTrace$1(span); - t1 = _this._evaluate0$_logger; - if (deprecation == null) - t1.warn$3$span$trace(0, message, span, trace); - else - A.WarnForDeprecation_warnForDeprecation0(t1, deprecation, message, span, trace); - }, - _evaluate0$_warn$2(message, span) { - return this._evaluate0$_warn$3(message, span, null); - }, - _evaluate0$_exception$2(message, span) { - var t1, t2; - if (span == null) { - t1 = B.JSArray_methods.get$last(this._evaluate0$_stack)._1; - t1 = t1.get$span(t1); - } else - t1 = span; - t2 = this._evaluate0$_stackTrace$1(span); - return new A.SassRuntimeException0(t2, B.Set_empty, message, t1); - }, - _evaluate0$_exception$1(message) { - return this._evaluate0$_exception$2(message, null); - }, - _evaluate0$_multiSpanException$3(message, primaryLabel, secondaryLabels) { - var t1 = B.JSArray_methods.get$last(this._evaluate0$_stack)._1; - return A.MultiSpanSassRuntimeException$0(message, t1.get$span(t1), primaryLabel, secondaryLabels, this._evaluate0$_stackTrace$0(), null); - }, - _evaluate0$_addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame) { - var error, stackTrace, t1, exception; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassScriptException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); - A.throwWithTrace0(t1.withTrace$1(this._evaluate0$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); - } else - throw exception; - } - }, - _evaluate0$_addExceptionSpan$2(nodeWithSpan, callback) { - return this._evaluate0$_addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, true, type$.dynamic); - }, - _evaluate0$_addExceptionSpan$3$addStackFrame(nodeWithSpan, callback, addStackFrame) { - return this._evaluate0$_addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame, type$.dynamic); - }, - _evaluate0$_addExceptionTrace$1$1(callback) { - var error, stackTrace, t1, exception, t2; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SassRuntimeException_2._is(t1)) - throw exception; - else if (t1 instanceof A.SassException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = error; - t2 = J.getInterceptor$z(t1); - A.throwWithTrace0(error.withTrace$1(this._evaluate0$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t2, t1))), error, stackTrace); - } else - throw exception; - } - }, - _evaluate0$_addExceptionTrace$1(callback) { - return this._evaluate0$_addExceptionTrace$1$1(callback, type$.dynamic); - }, - _evaluate0$_addErrorSpan$1$2(nodeWithSpan, callback) { - var error, stackTrace, t1, exception, t2, t3; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SassRuntimeException_2._is(t1)) { - error = t1; - stackTrace = A.getTraceFromException(exception); - if (!B.JSString_methods.startsWith$1(J.get$span$z(error).get$text(), "@error")) - throw exception; - t1 = error._span_exception$_message; - t2 = nodeWithSpan.get$span(nodeWithSpan); - t3 = this._evaluate0$_stackTrace$0(); - A.throwWithTrace0(new A.SassRuntimeException0(t3, B.Set_empty, t1, t2), error, stackTrace); - } else - throw exception; - } - }, - _evaluate0$_addErrorSpan$2(nodeWithSpan, callback) { - return this._evaluate0$_addErrorSpan$1$2(nodeWithSpan, callback, type$.dynamic); - }, - _evaluate0$_getErrorMessage$1(error) { - var t1, exception; - if (type$.Error._is(error)) - return error.toString$0(0); - try { - t1 = A._asString(J.get$message$x(error)); - return t1; - } catch (exception) { - t1 = J.toString$0$(error); - return t1; - } - }, - $isExpressionVisitor: 1, - $isStatementVisitor: 1 - }; - A._EvaluateVisitor_closure25.prototype = { - call$1($arguments) { - var module, t2, - t1 = J.getInterceptor$asx($arguments), - variable = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this._evaluate0$_environment; - t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); - return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string0$_text) ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._EvaluateVisitor_closure26.prototype = { - call$1($arguments) { - var variable = J.$index$asx($arguments, 0).assertString$1("name"), - t1 = this.$this._evaluate0$_environment; - return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-")) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._EvaluateVisitor_closure27.prototype = { - call$1($arguments) { - var module, t2, t3, t4, - t1 = J.getInterceptor$asx($arguments), - variable = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this; - t2 = t1._evaluate0$_environment; - t3 = variable._string0$_text; - t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); - return t2.getFunction$2$namespace(t4, module == null ? null : module._string0$_text) != null || t1._evaluate0$_builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._EvaluateVisitor_closure28.prototype = { - call$1($arguments) { - var module, t2, - t1 = J.getInterceptor$asx($arguments), - variable = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this._evaluate0$_environment; - t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); - return t1.getMixin$2$namespace(t2, module == null ? null : module._string0$_text) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._EvaluateVisitor_closure29.prototype = { - call$1($arguments) { - var t1 = this.$this._evaluate0$_environment; - if (!t1._environment0$_inMixin) - throw A.wrapException(A.SassScriptException$0(string$.conten, null)); - return t1._environment0$_content != null ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._EvaluateVisitor_closure30.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, - module = this.$this._evaluate0$_environment._environment0$_modules.$index(0, t1); - if (module == null) - throw A.wrapException('There is no module with namespace "' + t1 + '".'); - t1 = type$.Value_2; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs0(module.get$variables(), type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString0(t4._0, true), t4._1); - } - return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 34 - }; - A._EvaluateVisitor_closure31.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, - module = this.$this._evaluate0$_environment._environment0$_modules.$index(0, t1); - if (module == null) - throw A.wrapException('There is no module with namespace "' + t1 + '".'); - t1 = type$.Value_2; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs0(module.get$functions(module), type$.String, type$.Callable_2), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString0(t4._0, true), new A.SassFunction0(t4._1)); - } - return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 34 - }; - A._EvaluateVisitor_closure32.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, - module = this.$this._evaluate0$_environment._environment0$_modules.$index(0, t1); - if (module == null) - throw A.wrapException('There is no module with namespace "' + t1 + '".'); - t1 = type$.Value_2; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs0(module.get$mixins(), type$.String, type$.Callable_2), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString0(t4._0, true), new A.SassMixin0(t4._1)); - } - return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 34 - }; - A._EvaluateVisitor_closure33.prototype = { - call$1($arguments) { - var module, t2, callable, - t1 = J.getInterceptor$asx($arguments), - $name = t1.$index($arguments, 0).assertString$1("name"), - css = t1.$index($arguments, 1).get$isTruthy(); - t1 = t1.$index($arguments, 2).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - if (css) { - if (module != null) - throw A.wrapException(string$.x24css_a); - return new A.SassFunction0(new A.PlainCssCallable0($name._string0$_text)); - } - t1 = this.$this; - t2 = t1._evaluate0$_callableNode; - t2.toString; - callable = t1._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure10(t1, $name, module)); - if (callable == null) - throw A.wrapException("Function not found: " + $name.toString$0(0)); - return new A.SassFunction0(callable); - }, - $signature: 204 - }; - A._EvaluateVisitor__closure10.prototype = { - call$0() { - var local, - normalizedName = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), - t1 = this.module, - namespace = t1 == null ? null : t1._string0$_text; - t1 = this.$this; - local = t1._evaluate0$_environment.getFunction$2$namespace(normalizedName, namespace); - if (local != null || namespace != null) - return local; - return t1._evaluate0$_builtInFunctions.$index(0, normalizedName); - }, - $signature: 86 - }; - A._EvaluateVisitor_closure34.prototype = { - call$1($arguments) { - var module, t2, callable, - t1 = J.getInterceptor$asx($arguments), - $name = t1.$index($arguments, 0).assertString$1("name"); - t1 = t1.$index($arguments, 1).get$realNull(); - module = t1 == null ? null : t1.assertString$1("module"); - t1 = this.$this; - t2 = t1._evaluate0$_callableNode; - t2.toString; - callable = t1._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure9(t1, $name, module)); - if (callable == null) - throw A.wrapException("Mixin not found: " + $name.toString$0(0)); - return new A.SassMixin0(callable); - }, - $signature: 205 - }; - A._EvaluateVisitor__closure9.prototype = { - call$0() { - var t1 = this.$this._evaluate0$_environment, - t2 = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), - t3 = this.module; - return t1.getMixin$2$namespace(t2, t3 == null ? null : t3._string0$_text); - }, - $signature: 86 - }; - A._EvaluateVisitor_closure35.prototype = { - call$1($arguments) { - var t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, invocation, callableNode, callable, - t1 = J.getInterceptor$asx($arguments), - $function = t1.$index($arguments, 0), - args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); - t1 = this.$this; - t2 = t1._evaluate0$_callableNode; - t2.toString; - t3 = A._setArrayType([], type$.JSArray_Expression_2); - t4 = type$.String; - t5 = type$.Expression_2; - t6 = t2.get$span(t2); - t7 = t2.get$span(t2); - args._argument_list$_wereKeywordsAccessed = true; - t8 = args._argument_list$_keywords; - if (t8.get$isEmpty(t8)) - t2 = null; - else { - t9 = type$.Value_2; - t10 = A.LinkedHashMap_LinkedHashMap$_empty(t9, t9); - for (args._argument_list$_wereKeywordsAccessed = true, t8 = A.MapExtensions_get_pairs0(t8, t4, t9), t8 = t8.get$iterator(t8); t8.moveNext$0();) { - t11 = t8.get$current(t8); - t10.$indexSet(0, new A.SassString0(t11._0, false), t11._1); - } - t2 = new A.ValueExpression0(new A.SassMap0(A.ConstantMap_ConstantMap$from(t10, t9, t9)), t2.get$span(t2)); - } - invocation = new A.ArgumentInvocation0(A.List_List$unmodifiable(t3, t5), A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t4, t5), new A.ValueExpression0(args, t7), t2, t6); - if ($function instanceof A.SassString0) { - A.warnForDeprecation0(string$.Passina + $function.toString$0(0) + "))", B.Deprecation_U43); - callableNode = t1._evaluate0$_callableNode; - t2 = $function._string0$_text; - t3 = callableNode.get$span(callableNode); - return t1.visitFunctionExpression$1(0, new A.FunctionExpression0(null, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, invocation, t3)); - } - callable = $function.assertFunction$1("function").callable; - if (type$.Callable_2._is(callable)) { - t2 = t1._evaluate0$_callableNode; - t2.toString; - return t1._evaluate0$_runFunctionCallable$3(invocation, callable, t2); - } else - throw A.wrapException(A.SassScriptException$0("The function " + callable.get$name(callable) + string$.x20is_as, null)); - }, - $signature: 3 - }; - A._EvaluateVisitor_closure36.prototype = { - call$1($arguments) { - var withMap, t2, values, configuration, t3, - t1 = J.getInterceptor$asx($arguments), - url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string0$_text); - t1 = t1.$index($arguments, 1).get$realNull(); - withMap = t1 == null ? null : t1.assertMap$1("with")._map0$_contents; - t1 = this.$this; - t2 = t1._evaluate0$_callableNode; - t2.toString; - if (withMap != null) { - values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); - withMap.forEach$1(0, new A._EvaluateVisitor__closure7(values, t2.get$span(t2), t2)); - configuration = new A.ExplicitConfiguration0(t2, values, null); - } else - configuration = B.Configuration_Map_empty_null0; - t3 = t2.get$span(t2); - t1._evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure8(t1), t3.get$sourceUrl(t3), configuration, true); - t1._evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, true); - }, - $signature: 236 - }; - A._EvaluateVisitor__closure7.prototype = { - call$2(variable, value) { - var t1 = variable.assertString$1("with key"), - $name = A.stringReplaceAllUnchecked(t1._string0$_text, "_", "-"); - t1 = this.values; - if (t1.containsKey$1($name)) - throw A.wrapException("The variable $" + $name + " was configured twice."); - t1.$indexSet(0, $name, new A.ConfiguredValue0(value, this.span, this.callableNode)); - }, - $signature: 97 - }; - A._EvaluateVisitor__closure8.prototype = { - call$2(module, _) { - var t1 = this.$this; - return t1._evaluate0$_combineCss$2$clone(module, true).accept$1(t1); - }, - $signature: 85 - }; - A._EvaluateVisitor_closure37.prototype = { - call$1($arguments) { - var callableNode, t2, t3, t4, t5, callable, $content, - t1 = J.getInterceptor$asx($arguments), - mixin = t1.$index($arguments, 0), - args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); - t1 = this.$this; - callableNode = t1._evaluate0$_callableNode; - t2 = callableNode.get$span(callableNode); - t3 = callableNode.get$span(callableNode); - t4 = type$.Expression_2; - t5 = A.List_List$unmodifiable(B.List_empty21, t4); - t4 = A.ConstantMap_ConstantMap$from(B.Map_empty14, type$.String, t4); - callable = mixin.assertMixin$1("mixin").callable; - $content = t1._evaluate0$_environment._environment0$_content; - if (type$.Callable_2._is(callable)) - t1._evaluate0$_applyMixin$5(callable, $content, new A.ArgumentInvocation0(t5, t4, new A.ValueExpression0(args, t3), null, t2), callableNode, callableNode); - else - throw A.wrapException(A.SassScriptException$0("The mixin " + callable.get$name(callable) + string$.x20is_as, null)); - }, - $signature: 236 - }; - A._EvaluateVisitor_run_closure1.prototype = { - call$0() { - var module, t2, _this = this, - t1 = _this.node, - _0_0 = t1.span.file.url, - url = null; - if (_0_0 != null) { - url = _0_0; - t2 = _this.$this; - t2._evaluate0$_activeModules.$indexSet(0, url, null); - if (!(t2._nodeImporter != null && J.toString$0$(url) === "stdin")) - t2._evaluate0$_loadedUrls.add$1(0, url); - } - t2 = _this.$this; - module = t2._evaluate0$_addExceptionTrace$1(new A._EvaluateVisitor_run__closure1(t2, _this.importer, t1)); - return new A._Record_2_loadedUrls_stylesheet(t2._evaluate0$_loadedUrls, t2._evaluate0$_combineCss$1(module)); - }, - $signature: 457 - }; - A._EvaluateVisitor_run__closure1.prototype = { - call$0() { - return this.$this._evaluate0$_execute$2(this.importer, this.node); - }, - $signature: 458 - }; - A._EvaluateVisitor__loadModule_closure3.prototype = { - call$0() { - return this.callback.call$2(this._box_1.builtInModule, false); - }, - $signature: 0 - }; - A._EvaluateVisitor__loadModule_closure4.prototype = { - call$0() { - var canonicalUrl, oldInDependency, t4, message, _this = this, t1 = {}, stylesheet = null, importer = null, - t2 = _this.$this, - t3 = _this.nodeWithSpan, - _1_0 = t2._evaluate0$_loadStylesheet$3$baseUrl(_this.url.toString$0(0), t3.get$span(t3), _this.baseUrl); - stylesheet = _1_0._0; - importer = _1_0._1; - canonicalUrl = stylesheet.span.file.url; - if (canonicalUrl != null) { - t4 = t2._evaluate0$_activeModules; - if (t4.containsKey$1(canonicalUrl)) { - if (_this.namesInErrors) { - t1 = canonicalUrl; - t3 = $.$get$context(); - t1.toString; - message = "Module loop: " + t3.prettyUri$1(t1) + " is already being loaded."; - } else - message = string$.Modulel; - t1 = A.NullableExtension_andThen0(t4.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure3(t2, message)); - throw A.wrapException(t1 == null ? t2._evaluate0$_exception$1(message) : t1); - } else - t4.$indexSet(0, canonicalUrl, t3); - } - t4 = t2._evaluate0$_modules.containsKey$1(canonicalUrl); - oldInDependency = t2._evaluate0$_inDependency; - t2._evaluate0$_inDependency = _1_0._2; - t1.module = null; - try { - t1.module = t2._evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, _this.configuration, _this.namesInErrors, t3); - } finally { - t2._evaluate0$_activeModules.remove$1(0, canonicalUrl); - t2._evaluate0$_inDependency = oldInDependency; - } - t2._evaluate0$_addExceptionSpan$3$addStackFrame(t3, new A._EvaluateVisitor__loadModule__closure4(t1, _this.callback, !t4), false); - }, - $signature: 1 - }; - A._EvaluateVisitor__loadModule__closure3.prototype = { - call$1(previousLoad) { - return this.$this._evaluate0$_multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); - }, - $signature: 98 - }; - A._EvaluateVisitor__loadModule__closure4.prototype = { - call$0() { - return this.callback.call$2(this._box_0.module, this.firstLoad); - }, - $signature: 0 - }; - A._EvaluateVisitor__execute_closure1.prototype = { - call$0() { - var t3, t4, t5, t6, _this = this, - t1 = _this.$this, - oldImporter = t1._evaluate0$_importer, - oldStylesheet = t1._evaluate0$__stylesheet, - oldRoot = t1._evaluate0$__root, - oldPreModuleComments = t1._evaluate0$_preModuleComments, - oldParent = t1._evaluate0$__parent, - oldEndOfImports = t1._evaluate0$__endOfImports, - oldOutOfOrderImports = t1._evaluate0$_outOfOrderImports, - oldExtensionStore = t1._evaluate0$__extensionStore, - t2 = t1._evaluate0$_atRootExcludingStyleRule, - oldStyleRule = t2 ? null : t1._evaluate0$_styleRuleIgnoringAtRoot, - oldMediaQueries = t1._evaluate0$_mediaQueries, - oldDeclarationName = t1._evaluate0$_declarationName, - oldInUnknownAtRule = t1._evaluate0$_inUnknownAtRule, - oldInKeyframes = t1._evaluate0$_inKeyframes, - oldConfiguration = t1._evaluate0$_configuration; - t1._evaluate0$_importer = _this.importer; - t3 = t1._evaluate0$__stylesheet = _this.stylesheet; - t4 = t3.span; - t5 = t1._evaluate0$__parent = t1._evaluate0$__root = A.ModifiableCssStylesheet$0(t4); - t1._evaluate0$__endOfImports = 0; - t1._evaluate0$_outOfOrderImports = null; - t1._evaluate0$__extensionStore = _this.extensionStore; - t1._evaluate0$_declarationName = t1._evaluate0$_mediaQueries = t1._evaluate0$_styleRuleIgnoringAtRoot = null; - t1._evaluate0$_inKeyframes = t1._evaluate0$_atRootExcludingStyleRule = t1._evaluate0$_inUnknownAtRule = false; - t6 = _this.configuration; - if (t6 != null) - t1._evaluate0$_configuration = t6; - t1.visitStylesheet$1(0, t3); - t3 = t1._evaluate0$_outOfOrderImports == null ? t5 : new A.CssStylesheet0(new A.UnmodifiableListView(t1._evaluate0$_addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode_2), t4); - _this.css.__late_helper$_value = t3; - _this.preModuleComments.__late_helper$_value = t1._evaluate0$_preModuleComments; - t1._evaluate0$_importer = oldImporter; - t1._evaluate0$__stylesheet = oldStylesheet; - t1._evaluate0$__root = oldRoot; - t1._evaluate0$_preModuleComments = oldPreModuleComments; - t1._evaluate0$__parent = oldParent; - t1._evaluate0$__endOfImports = oldEndOfImports; - t1._evaluate0$_outOfOrderImports = oldOutOfOrderImports; - t1._evaluate0$__extensionStore = oldExtensionStore; - t1._evaluate0$_styleRuleIgnoringAtRoot = oldStyleRule; - t1._evaluate0$_mediaQueries = oldMediaQueries; - t1._evaluate0$_declarationName = oldDeclarationName; - t1._evaluate0$_inUnknownAtRule = oldInUnknownAtRule; - t1._evaluate0$_atRootExcludingStyleRule = t2; - t1._evaluate0$_inKeyframes = oldInKeyframes; - t1._evaluate0$_configuration = oldConfiguration; - }, - $signature: 1 - }; - A._EvaluateVisitor__combineCss_closure3.prototype = { - call$1(module) { - return module.get$transitivelyContainsCss(); - }, - $signature: 127 - }; - A._EvaluateVisitor__combineCss_closure4.prototype = { - call$1(target) { - return !this.selectors.contains$1(0, target); - }, - $signature: 14 - }; - A._EvaluateVisitor__combineCss_visitModule1.prototype = { - call$1(module) { - var t1, t2, t3, t4, _i, upstream, _1_0, statements, index, _this = this; - if (!_this.seen.add$1(0, module)) - return; - if (_this.clone) - module = module.cloneCss$0(); - for (t1 = module.get$upstream(), t2 = t1.length, t3 = _this.css, t4 = _this.imports, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - upstream = t1[_i]; - if (upstream.get$transitivelyContainsCss()) { - _1_0 = module.get$preModuleComments().$index(0, upstream); - if (_1_0 != null) - B.JSArray_methods.addAll$1(t3.length === 0 ? t4 : t3, _1_0); - _this.call$1(upstream); - } - } - _this.sorted.addFirst$1(module); - t1 = module.get$css(module); - statements = t1.get$children(t1); - index = _this.$this._evaluate0$_indexAfterImports$1(statements); - t1 = J.getInterceptor$ax(statements); - B.JSArray_methods.addAll$1(t4, t1.getRange$2(statements, 0, index)); - B.JSArray_methods.addAll$1(t3, t1.getRange$2(statements, index, t1.get$length(statements))); - }, - $signature: 459 - }; - A._EvaluateVisitor__extendModules_closure3.prototype = { - call$1(target) { - return !this.originalSelectors.contains$1(0, target); - }, - $signature: 14 - }; - A._EvaluateVisitor__extendModules_closure4.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_ExtensionStore_2); - }, - $signature: 215 - }; - A._EvaluateVisitor_visitAtRootRule_closure3.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitAtRootRule_closure4.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 0 - }; - A._EvaluateVisitor__scopeForAtRoot_closure11.prototype = { - call$1(callback) { - var t1 = this.$this, - t2 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__parent, "__parent"); - t1._evaluate0$__parent = this.newParent; - t1._evaluate0$_environment.scope$1$2$when(callback, this.node.hasDeclarations, type$.void); - t1._evaluate0$__parent = t2; - }, - $signature: 37 - }; - A._EvaluateVisitor__scopeForAtRoot_closure12.prototype = { - call$1(callback) { - var t1 = this.$this, - oldAtRootExcludingStyleRule = t1._evaluate0$_atRootExcludingStyleRule; - t1._evaluate0$_atRootExcludingStyleRule = true; - this.innerScope.call$1(callback); - t1._evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; - }, - $signature: 37 - }; - A._EvaluateVisitor__scopeForAtRoot_closure13.prototype = { - call$1(callback) { - return this.$this._evaluate0$_withMediaQueries$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure1(this.innerScope, callback)); - }, - $signature: 37 - }; - A._EvaluateVisitor__scopeForAtRoot__closure1.prototype = { - call$0() { - return this.innerScope.call$1(this.callback); - }, - $signature: 1 - }; - A._EvaluateVisitor__scopeForAtRoot_closure14.prototype = { - call$1(callback) { - var t1 = this.$this, - wasInKeyframes = t1._evaluate0$_inKeyframes; - t1._evaluate0$_inKeyframes = false; - this.innerScope.call$1(callback); - t1._evaluate0$_inKeyframes = wasInKeyframes; - }, - $signature: 37 - }; - A._EvaluateVisitor__scopeForAtRoot_closure15.prototype = { - call$1($parent) { - return $parent instanceof A.ModifiableCssAtRule0; - }, - $signature: 207 - }; - A._EvaluateVisitor__scopeForAtRoot_closure16.prototype = { - call$1(callback) { - var t1 = this.$this, - wasInUnknownAtRule = t1._evaluate0$_inUnknownAtRule; - t1._evaluate0$_inUnknownAtRule = false; - this.innerScope.call$1(callback); - t1._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; - }, - $signature: 37 - }; - A._EvaluateVisitor_visitContentRule_closure1.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.content.declaration.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - return null; - }, - $signature: 1 - }; - A._EvaluateVisitor_visitDeclaration_closure1.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this._box_0.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitEachRule_closure5.prototype = { - call$1(value) { - var t1 = this.$this, - t2 = this.nodeWithSpan; - return t1._evaluate0$_environment.setLocalVariable$3(this._box_0.variable, t1._evaluate0$_withoutSlash$2(value, t2), t2); - }, - $signature: 64 - }; - A._EvaluateVisitor_visitEachRule_closure6.prototype = { - call$1(value) { - return this.$this._evaluate0$_setMultipleVariables$3(this._box_0.variables, value, this.nodeWithSpan); - }, - $signature: 64 - }; - A._EvaluateVisitor_visitEachRule_closure7.prototype = { - call$0() { - var _this = this, - t1 = _this.$this; - return t1._evaluate0$_handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure1(t1, _this.setVariables, _this.node)); - }, - $signature: 43 - }; - A._EvaluateVisitor_visitEachRule__closure1.prototype = { - call$1(element) { - var t1; - this.setVariables.call$1(element); - t1 = this.$this; - return t1._evaluate0$_handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure1(t1)); - }, - $signature: 238 - }; - A._EvaluateVisitor_visitEachRule___closure1.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 103 - }; - A._EvaluateVisitor_visitAtRule_closure5.prototype = { - call$1(value) { - return this.$this._evaluate0$_interpolationToValue$3$trim$warnForColor(value, true, true); - }, - $signature: 462 - }; - A._EvaluateVisitor_visitAtRule_closure6.prototype = { - call$0() { - var t2, t3, _i, _this = this, - t1 = _this.$this, - styleRule = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; - if (styleRule == null || t1._evaluate0$_inKeyframes || J.$eq$(_this.name.value, "font-face")) - for (t2 = _this.children, t3 = t2.length, _i = 0; _i < t3; ++_i) - t2[_i].accept$1(t1); - else - t1._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(styleRule._style_rule0$_selector, styleRule.span, false, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure1(t1, _this.children), false, type$.ModifiableCssStyleRule_2, type$.Null); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitAtRule__closure1.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitAtRule_closure7.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitForRule_closure9.prototype = { - call$0() { - return this.node.from.accept$1(this.$this).assertNumber$0(); - }, - $signature: 239 - }; - A._EvaluateVisitor_visitForRule_closure10.prototype = { - call$0() { - return this.node.to.accept$1(this.$this).assertNumber$0(); - }, - $signature: 239 - }; - A._EvaluateVisitor_visitForRule_closure11.prototype = { - call$0() { - return this.fromNumber.assertInt$0(); - }, - $signature: 10 - }; - A._EvaluateVisitor_visitForRule_closure12.prototype = { - call$0() { - var t1 = this.fromNumber; - return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); - }, - $signature: 10 - }; - A._EvaluateVisitor_visitForRule_closure13.prototype = { - call$0() { - var i, t3, t4, t5, t6, t7, t8, _0_0, _this = this, - t1 = _this.$this, - t2 = _this.node, - nodeWithSpan = t1._evaluate0$_expressionNode$1(t2.from); - for (i = _this.from, t3 = _this._box_0, t4 = _this.direction, t5 = t2.variable, t6 = _this.fromNumber, t2 = t2.children; i !== t3.to; i += t4) { - t7 = t1._evaluate0$_environment; - t8 = t6.get$numeratorUnits(t6); - t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits0(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); - _0_0 = t1._evaluate0$_handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure1(t1)); - if (_0_0 != null) - return _0_0; - } - return null; - }, - $signature: 43 - }; - A._EvaluateVisitor_visitForRule__closure1.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 103 - }; - A._EvaluateVisitor_visitForwardRule_closure3.prototype = { - call$2(module, firstLoad) { - if (firstLoad) - this.$this._evaluate0$_registerCommentsForModule$1(module); - this.$this._evaluate0$_environment.forwardModule$2(module, this.node); - }, - $signature: 85 - }; - A._EvaluateVisitor_visitForwardRule_closure4.prototype = { - call$2(module, firstLoad) { - if (firstLoad) - this.$this._evaluate0$_registerCommentsForModule$1(module); - this.$this._evaluate0$_environment.forwardModule$2(module, this.node); - }, - $signature: 85 - }; - A._EvaluateVisitor__registerCommentsForModule_closure1.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_CssComment_2); - }, - $signature: 210 - }; - A._EvaluateVisitor_visitIfRule_closure1.prototype = { - call$1(clause) { - var t1 = this.$this; - return t1._evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule__closure1(t1, clause), true, clause.hasDeclarations, type$.nullable_Value_2); - }, - $signature: 464 - }; - A._EvaluateVisitor_visitIfRule__closure1.prototype = { - call$0() { - var t1 = this.$this; - return t1._evaluate0$_handleReturn$2(this.clause.children, new A._EvaluateVisitor_visitIfRule___closure1(t1)); - }, - $signature: 43 - }; - A._EvaluateVisitor_visitIfRule___closure1.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 103 - }; - A._EvaluateVisitor__visitDynamicImport_closure1.prototype = { - call$0() { - var t1, t2, _0_0, stylesheet, importer, isDependency, url, t3, oldImporter, oldInDependency, loadsUserDefinedModules, children, t4, t5, t6, t7, t8, t9, t10, environment, module, visitor, _box_0 = {}; - _box_0.isDependency = _box_0.importer = _box_0.stylesheet = null; - t1 = this.$this; - t2 = this.$import; - _0_0 = t1._evaluate0$_loadStylesheet$3$forImport(t2.urlString, t2.span, true); - stylesheet = _box_0.stylesheet = _0_0._0; - importer = _0_0._1; - _box_0.importer = importer; - isDependency = _0_0._2; - _box_0.isDependency = isDependency; - url = stylesheet.span.file.url; - if (url != null) { - t3 = t1._evaluate0$_activeModules; - if (t3.containsKey$1(url)) { - t2 = A.NullableExtension_andThen0(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure7(t1)); - throw A.wrapException(t2 == null ? t1._evaluate0$_exception$1("This file is already being loaded.") : t2); - } - t3.$indexSet(0, url, t2); - } - t2 = stylesheet._stylesheet1$_uses; - t3 = type$.UnmodifiableListView_UseRule_2; - if (new A.UnmodifiableListView(t2, t3).get$length(0) === 0 && new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2).get$length(0) === 0) { - oldImporter = t1._evaluate0$_importer; - t2 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__stylesheet, "_stylesheet"); - oldInDependency = t1._evaluate0$_inDependency; - t1._evaluate0$_importer = importer; - t1._evaluate0$__stylesheet = stylesheet; - t1._evaluate0$_inDependency = isDependency; - t1.visitStylesheet$1(0, stylesheet); - t1._evaluate0$_importer = oldImporter; - t1._evaluate0$__stylesheet = t2; - t1._evaluate0$_inDependency = oldInDependency; - t1._evaluate0$_activeModules.remove$1(0, url); - return; - } - t2 = new A.UnmodifiableListView(t2, t3); - if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure8())) { - t2 = new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); - loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure9()); - } else - loadsUserDefinedModules = true; - children = A._Cell$(); - t2 = t1._evaluate0$_environment; - t3 = type$.String; - t4 = type$.Module_Callable_2; - t5 = type$.AstNode_2; - t6 = A._setArrayType([], type$.JSArray_Module_Callable_2); - t7 = t2._environment0$_variables; - t7 = A._setArrayType(t7.slice(0), A._arrayInstanceType(t7)); - t8 = t2._environment0$_variableNodes; - t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); - t9 = t2._environment0$_functions; - t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); - t10 = t2._environment0$_mixins; - t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); - environment = A.Environment$_0(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._environment0$_importedModules, null, null, t6, t7, t8, t9, t10, t2._environment0$_content); - t1._evaluate0$_withEnvironment$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure10(_box_0, t1, loadsUserDefinedModules, environment, children)); - module = environment.toDummyModule$0(); - t1._evaluate0$_environment.importForwards$1(module); - if (loadsUserDefinedModules) { - if (module.transitivelyContainsCss) - t1._evaluate0$_combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1); - visitor = new A._ImportedCssVisitor1(t1); - for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) - t2.get$current(t2).accept$1(visitor); - } - t1._evaluate0$_activeModules.remove$1(0, url); - }, - $signature: 0 - }; - A._EvaluateVisitor__visitDynamicImport__closure7.prototype = { - call$1(previousLoad) { - return this.$this._evaluate0$_multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); - }, - $signature: 98 - }; - A._EvaluateVisitor__visitDynamicImport__closure8.prototype = { - call$1(rule) { - return rule.url.get$scheme() !== "sass"; - }, - $signature: 211 - }; - A._EvaluateVisitor__visitDynamicImport__closure9.prototype = { - call$1(rule) { - return rule.url.get$scheme() !== "sass"; - }, - $signature: 212 - }; - A._EvaluateVisitor__visitDynamicImport__closure10.prototype = { - call$0() { - var t7, t8, _this = this, - t1 = _this.$this, - oldImporter = t1._evaluate0$_importer, - t2 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__stylesheet, "_stylesheet"), - t3 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__root, "_root"), - t4 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__parent, "__parent"), - t5 = t1._evaluate0$_assertInModule$2(t1._evaluate0$__endOfImports, "_endOfImports"), - oldOutOfOrderImports = t1._evaluate0$_outOfOrderImports, - oldConfiguration = t1._evaluate0$_configuration, - oldInDependency = t1._evaluate0$_inDependency, - t6 = _this._box_0; - t1._evaluate0$_importer = t6.importer; - t7 = t6.stylesheet; - t1._evaluate0$__stylesheet = t7; - t8 = _this.loadsUserDefinedModules; - if (t8) { - t7 = A.ModifiableCssStylesheet$0(t7.span); - t1._evaluate0$__root = t7; - t1._evaluate0$__parent = t1._evaluate0$_assertInModule$2(t7, "_root"); - t1._evaluate0$__endOfImports = 0; - t1._evaluate0$_outOfOrderImports = null; - } - t1._evaluate0$_inDependency = t6.isDependency; - t7 = new A.UnmodifiableListView(t6.stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); - if (!t7.get$isEmpty(t7)) - t1._evaluate0$_configuration = _this.environment.toImplicitConfiguration$0(); - t1.visitStylesheet$1(0, t6.stylesheet); - t6 = t8 ? t1._evaluate0$_addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode_2); - _this.children.__late_helper$_value = t6; - t1._evaluate0$_importer = oldImporter; - t1._evaluate0$__stylesheet = t2; - if (t8) { - t1._evaluate0$__root = t3; - t1._evaluate0$__parent = t4; - t1._evaluate0$__endOfImports = t5; - t1._evaluate0$_outOfOrderImports = oldOutOfOrderImports; - } - t1._evaluate0$_configuration = oldConfiguration; - t1._evaluate0$_inDependency = oldInDependency; - }, - $signature: 1 - }; - A._EvaluateVisitor__applyMixin_closure3.prototype = { - call$0() { - var _this = this, - t1 = _this.$this; - t1._evaluate0$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin__closure4(t1, _this.$arguments, _this.mixin, _this.nodeWithSpanWithoutContent)); - }, - $signature: 0 - }; - A._EvaluateVisitor__applyMixin__closure4.prototype = { - call$0() { - var _this = this; - _this.$this._evaluate0$_runBuiltInCallable$3(_this.$arguments, _this.mixin, _this.nodeWithSpanWithoutContent); - }, - $signature: 0 - }; - A._EvaluateVisitor__applyMixin_closure4.prototype = { - call$0() { - var _this = this, - t1 = _this.$this; - t1._evaluate0$_environment.withContent$2(_this.contentCallable, new A._EvaluateVisitor__applyMixin__closure3(t1, _this.mixin, _this.nodeWithSpanWithoutContent)); - }, - $signature: 1 - }; - A._EvaluateVisitor__applyMixin__closure3.prototype = { - call$0() { - var t1 = this.$this; - t1._evaluate0$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin___closure1(t1, this.mixin, this.nodeWithSpanWithoutContent)); - }, - $signature: 0 - }; - A._EvaluateVisitor__applyMixin___closure1.prototype = { - call$0() { - var t1, t2, t3, t4, _i; - for (t1 = this.mixin.declaration.children, t2 = t1.length, t3 = this.$this, t4 = this.nodeWithSpanWithoutContent, _i = 0; _i < t2; ++_i) - t3._evaluate0$_addErrorSpan$2(t4, new A._EvaluateVisitor__applyMixin____closure1(t3, t1[_i])); - }, - $signature: 0 - }; - A._EvaluateVisitor__applyMixin____closure1.prototype = { - call$0() { - return this.statement.accept$1(this.$this); - }, - $signature: 43 - }; - A._EvaluateVisitor_visitIncludeRule_closure5.prototype = { - call$0() { - var t1 = this.node; - return this.$this._evaluate0$_environment.getMixin$2$namespace(t1.name, t1.namespace); - }, - $signature: 86 - }; - A._EvaluateVisitor_visitIncludeRule_closure6.prototype = { - call$1($content) { - var t1 = this.$this; - return new A.UserDefinedCallable0($content, t1._evaluate0$_environment.closure$0(), t1._evaluate0$_inDependency, type$.UserDefinedCallable_Environment_2); - }, - $signature: 465 - }; - A._EvaluateVisitor_visitIncludeRule_closure7.prototype = { - call$0() { - return this.node.get$spanWithoutContent(); - }, - $signature: 27 - }; - A._EvaluateVisitor_visitMediaRule_closure5.prototype = { - call$1(mediaQueries) { - return this.$this._evaluate0$_mergeMediaQueries$2(mediaQueries, this.queries); - }, - $signature: 104 - }; - A._EvaluateVisitor_visitMediaRule_closure6.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.mergedQueries; - if (t2 == null) - t2 = _this.queries; - t1._evaluate0$_withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure1(t1, _this.node)); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitMediaRule__closure1.prototype = { - call$0() { - var t2, t3, _i, - t1 = this.$this, - _0_0 = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; - if (_0_0 != null) - t1._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure1(t1, this.node), false, type$.ModifiableCssStyleRule_2, type$.Null); - else - for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) - t2[_i].accept$1(t1); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitMediaRule___closure1.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitMediaRule_closure7.prototype = { - call$1(node) { - var t1; - if (!(node instanceof A.ModifiableCssStyleRule0)) { - t1 = this.mergedSources; - t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule0 && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); - } else - t1 = true; - return t1; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitStyleRule_closure7.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitStyleRule_closure8.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitStyleRule_closure10.prototype = { - call$0() { - var t1 = this.$this; - t1._evaluate0$_withStyleRule$2(this.rule, new A._EvaluateVisitor_visitStyleRule__closure1(t1, this.node)); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitStyleRule__closure1.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitStyleRule_closure9.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor__warnForBogusCombinators_closure1.prototype = { - call$1(child) { - return child instanceof A.ModifiableCssComment0; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitSupportsRule_closure3.prototype = { - call$0() { - var t2, t3, _i, - t1 = this.$this, - _0_0 = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; - if (_0_0 != null) - t1._evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure1(t1, this.node), type$.ModifiableCssStyleRule_2, type$.Null); - else - for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) - t2[_i].accept$1(t1); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitSupportsRule__closure1.prototype = { - call$0() { - var t1, t2, t3, _i; - for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) - t1[_i].accept$1(t3); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitSupportsRule_closure4.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor__visitSupportsCondition_closure1.prototype = { - call$0() { - var t4, - t1 = this.$this, - t2 = this._box_0, - t3 = t2.declaration.name; - t3 = t1._evaluate0$_serialize$3$quote(t3.accept$1(t1), t3, true); - t4 = t2.declaration.get$isCustomProperty() ? "" : " "; - t2 = t2.declaration.value; - return "(" + t3 + ":" + t4 + t1._evaluate0$_serialize$3$quote(t2.accept$1(t1), t2, true) + ")"; - }, - $signature: 30 - }; - A._EvaluateVisitor_visitVariableDeclaration_closure5.prototype = { - call$0() { - var t1 = this.$this._evaluate0$_environment, - t2 = this._box_0.override; - t1.setVariable$4$global(this.node.name, t2.value, t2.assignmentNode, true); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitVariableDeclaration_closure6.prototype = { - call$0() { - var t1 = this.node; - return this.$this._evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); - }, - $signature: 43 - }; - A._EvaluateVisitor_visitVariableDeclaration_closure7.prototype = { - call$0() { - var t1 = this.$this, - t2 = this.node; - t1._evaluate0$_environment.setVariable$5$global$namespace(t2.name, this.value, t1._evaluate0$_expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitUseRule_closure1.prototype = { - call$2(module, firstLoad) { - var t1, t2, t3, _0_0, t4, t5, span; - if (firstLoad) - this.$this._evaluate0$_registerCommentsForModule$1(module); - t1 = this.$this._evaluate0$_environment; - t2 = this.node; - t3 = t2.namespace; - if (t3 == null) { - t1._environment0$_globalModules.$indexSet(0, module, t2); - t1._environment0$_allModules.push(module); - _0_0 = A.IterableExtension_firstWhereOrNull(J.get$keys$z(B.JSArray_methods.get$first(t1._environment0$_variables)), module.get$variables().get$containsKey()); - if (_0_0 != null) - A.throwExpression(A.SassScriptException$0(string$.This_ma + _0_0 + '".', null)); - } else { - t4 = t1._environment0$_modules; - if (t4.containsKey$1(t3)) { - t5 = t1._environment0$_namespaceNodes.$index(0, t3); - span = t5 == null ? null : t5.span; - t5 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); - if (span != null) - t5.$indexSet(0, span, "original @use"); - A.throwExpression(A.MultiSpanSassScriptException$0(string$.There_ + t3 + '".', "new @use", t5)); - } - t4.$indexSet(0, t3, module); - t1._environment0$_namespaceNodes.$indexSet(0, t3, t2); - t1._environment0$_allModules.push(module); - } - }, - $signature: 85 - }; - A._EvaluateVisitor_visitWarnRule_closure1.prototype = { - call$0() { - return this.node.expression.accept$1(this.$this); - }, - $signature: 50 - }; - A._EvaluateVisitor_visitWhileRule_closure1.prototype = { - call$0() { - var t1, t2, t3, _0_0; - for (t1 = this.node, t2 = t1.condition, t3 = this.$this, t1 = t1.children; t2.accept$1(t3).get$isTruthy();) { - _0_0 = t3._evaluate0$_handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure1(t3)); - if (_0_0 != null) - return _0_0; - } - return null; - }, - $signature: 43 - }; - A._EvaluateVisitor_visitWhileRule__closure1.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 103 - }; - A._EvaluateVisitor_visitBinaryOperationExpression_closure1.prototype = { - call$0() { - var t1 = this.node, - t2 = this.$this, - left = t1.left.accept$1(t2); - switch (t1.operator) { - case B.BinaryOperator_wdM0: - t1 = t1.right.accept$1(t2); - t1 = new A.SassString0(A.serializeValue0(left, false, true) + "=" + A.serializeValue0(t1, false, true), false); - break; - case B.BinaryOperator_qNM0: - t1 = left.get$isTruthy() ? left : t1.right.accept$1(t2); - break; - case B.BinaryOperator_eDt0: - t1 = left.get$isTruthy() ? t1.right.accept$1(t2) : left; - break; - case B.BinaryOperator_g8k0: - t1 = left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true0 : B.SassBoolean_false0; - break; - case B.BinaryOperator_icU0: - t1 = !left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true0 : B.SassBoolean_false0; - break; - case B.BinaryOperator_bEa0: - t1 = left.greaterThan$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_oEm0: - t1 = left.greaterThanOrEquals$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_miq0: - t1 = left.lessThan$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_SPQ0: - t1 = left.lessThanOrEquals$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_u150: - t1 = left.plus$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_SjO0: - t1 = left.minus$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_2No0: - t1 = left.times$1(t1.right.accept$1(t2)); - break; - case B.BinaryOperator_U770: - t1 = t2._evaluate0$_slash$3(left, t1.right.accept$1(t2), t1); - break; - case B.BinaryOperator_KNx0: - t1 = left.modulo$1(t1.right.accept$1(t2)); - break; - default: - t1 = null; - } - return t1; - }, - $signature: 50 - }; - A._EvaluateVisitor__slash_recommendation1.prototype = { - call$1(expression) { - var t1; - $label0$0: { - if (expression instanceof A.BinaryOperationExpression0 && B.BinaryOperator_U770 === expression.operator) { - t1 = "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; - break $label0$0; - } - if (expression instanceof A.ParenthesizedExpression0) { - t1 = expression.expression.toString$0(0); - break $label0$0; - } - t1 = expression.toString$0(0); - break $label0$0; - } - return t1; - }, - $signature: 113 - }; - A._EvaluateVisitor_visitVariableExpression_closure1.prototype = { - call$0() { - var t1 = this.node; - return this.$this._evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); - }, - $signature: 43 - }; - A._EvaluateVisitor_visitUnaryOperationExpression_closure1.prototype = { - call$0() { - var t1, _this = this; - switch (_this.node.operator) { - case B.UnaryOperator_cLp0: - t1 = _this.operand.unaryPlus$0(); - break; - case B.UnaryOperator_AiQ0: - t1 = _this.operand.unaryMinus$0(); - break; - case B.UnaryOperator_SJr0: - t1 = new A.SassString0("/" + A.serializeValue0(_this.operand, false, true), false); - break; - case B.UnaryOperator_not_not_not0: - t1 = _this.operand.unaryNot$0(); - break; - default: - t1 = null; - } - return t1; - }, - $signature: 50 - }; - A._EvaluateVisitor_visitListExpression_closure1.prototype = { - call$1(expression) { - return expression.accept$1(this.$this); - }, - $signature: 466 - }; - A._EvaluateVisitor_visitFunctionExpression_closure5.prototype = { - call$0() { - var t1 = this.node; - return this.$this._evaluate0$_environment.getFunction$2$namespace(t1.name, t1.namespace); - }, - $signature: 86 - }; - A._EvaluateVisitor_visitFunctionExpression_closure6.prototype = { - call$1(argument) { - return argument.accept$1(B.C_IsCalculationSafeVisitor0); - }, - $signature: 139 - }; - A._EvaluateVisitor_visitFunctionExpression_closure7.prototype = { - call$0() { - var t1 = this.node; - return this.$this._evaluate0$_runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); - }, - $signature: 50 - }; - A._EvaluateVisitor__visitCalculation_closure1.prototype = { - call$2(message, deprecation) { - return this.$this._evaluate0$_warn$3(message, this.node.span, deprecation); - }, - call$1(message) { - return this.call$2(message, null); - }, - $signature: 110 - }; - A._EvaluateVisitor__checkCalculationArguments_check1.prototype = { - call$1(maxArgs) { - var t1 = this.node, - t2 = t1.$arguments.positional.length; - if (t2 === 0) - throw A.wrapException(this.$this._evaluate0$_exception$2("Missing argument.", t1.span)); - else if (maxArgs != null && t2 > maxArgs) - throw A.wrapException(this.$this._evaluate0$_exception$2("Only " + A.S(maxArgs) + " " + A.pluralize0("argument", maxArgs, null) + " allowed, but " + t2 + " " + A.pluralize0("was", t2, "were") + " passed.", t1.span)); - }, - call$0() { - return this.call$1(null); - }, - $signature: 102 - }; - A._EvaluateVisitor__visitCalculationExpression_closure1.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this._box_0, - t3 = _this.node, - t4 = _this.inLegacySassFunction; - return A.SassCalculation_operateInternal0(t1._evaluate0$_binaryOperatorToCalculationOperator$2(t2.operator, t3), t1._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2.left, t4), t1._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2.right, t4), t4, !t1._evaluate0$_inSupportsDeclaration, new A._EvaluateVisitor__visitCalculationExpression__closure1(t1, t3)); - }, - $signature: 83 - }; - A._EvaluateVisitor__visitCalculationExpression__closure1.prototype = { - call$2(message, deprecation) { - return this.$this._evaluate0$_warn$3(message, this.node.get$span(0), deprecation); - }, - call$1(message) { - return this.call$2(message, null); - }, - $signature: 110 - }; - A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure1.prototype = { - call$0() { - var t1 = this.node; - return this.$this._evaluate0$_runFunctionCallable$3(t1.$arguments, this.$function, t1); - }, - $signature: 50 - }; - A._EvaluateVisitor__runUserDefinedCallable_closure1.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.callable; - return t1._evaluate0$_withEnvironment$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure1(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, _this.V)); - }, - $signature() { - return this.V._eval$1("0()"); - } - }; - A._EvaluateVisitor__runUserDefinedCallable__closure1.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.V; - return t1._evaluate0$_environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure1(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); - }, - $signature() { - return this.V._eval$1("0()"); - } - }; - A._EvaluateVisitor__runUserDefinedCallable___closure1.prototype = { - call$0() { - var declaredArguments, t5, minLength, i, argument, t6, t7, value, t8, restArgument, rest, argumentList, result, argumentWord, _this = this, - t1 = _this.$this, - t2 = _this.evaluated._values, - t3 = _this.callable.declaration.$arguments, - t4 = _this.nodeWithSpan; - t1._evaluate0$_verifyArguments$4(t2[2].length, t2[0], t3, t4); - declaredArguments = t3.$arguments; - t5 = declaredArguments.length; - minLength = Math.min(t2[2].length, t5); - for (i = 0; i < minLength; ++i) - t1._evaluate0$_environment.setLocalVariable$3(declaredArguments[i].name, t2[2][i], t2[3][i]); - for (i = t2[2].length; i < t5; ++i) { - argument = declaredArguments[i]; - t6 = t2[0]; - t7 = argument.name; - value = t6.remove$1(0, t7); - if (value == null) { - t6 = argument.defaultValue; - value = t1._evaluate0$_withoutSlash$2(t6.accept$1(t1), t1._evaluate0$_expressionNode$1(t6)); - } - t6 = t1._evaluate0$_environment; - t8 = t2[1].$index(0, t7); - if (t8 == null) { - t8 = argument.defaultValue; - t8.toString; - t8 = t1._evaluate0$_expressionNode$1(t8); - } - t6.setLocalVariable$3(t7, value, t8); - } - restArgument = t3.restArgument; - if (restArgument != null) { - t6 = t2[2]; - rest = t6.length > t5 ? B.JSArray_methods.sublist$1(t6, t5) : B.List_empty20; - t5 = t2[0]; - t6 = t2[4]; - argumentList = A.SassArgumentList$0(rest, t5, t6 === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_ECn0 : t6); - t1._evaluate0$_environment.setLocalVariable$3(restArgument, argumentList, t4); - } else - argumentList = null; - result = _this.run.call$0(); - if (argumentList == null) - return result; - t5 = t2[0].__js_helper$_length; - if (t5 === 0) - return result; - if (argumentList._argument_list$_wereKeywordsAccessed) - return result; - argumentWord = A.pluralize0("argument", t5, null); - t2 = t2[0]; - t5 = A._instanceType(t2)._eval$1("LinkedHashMapKeyIterable<1>"); - throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + argumentWord + " named " + A.toSentence0(A.MappedIterable_MappedIterable(new A.LinkedHashMapKeyIterable(t2, t5), new A._EvaluateVisitor__runUserDefinedCallable____closure1(), t5._eval$1("Iterable.E"), type$.Object), "or") + ".", t4.get$span(t4), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t3.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._evaluate0$_stackTrace$1(t4.get$span(t4)), null)); - }, - $signature() { - return this.V._eval$1("0()"); - } - }; - A._EvaluateVisitor__runUserDefinedCallable____closure1.prototype = { - call$1($name) { - return "$" + $name; - }, - $signature: 6 - }; - A._EvaluateVisitor__runFunctionCallable_closure1.prototype = { - call$0() { - var t1, t2, t3, t4, _i, $returnValue; - for (t1 = this.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = this.$this, _i = 0; _i < t3; ++_i) { - $returnValue = t2[_i].accept$1(t4); - if ($returnValue instanceof A.Value0) - return $returnValue; - } - throw A.wrapException(t4._evaluate0$_exception$2("Function finished without @return.", t1.span)); - }, - $signature: 50 - }; - A._EvaluateVisitor__runBuiltInCallable_closure5.prototype = { - call$0() { - return this._box_0.overload.verify$2(this.evaluated._values[2].length, this.namedSet); - }, - $signature: 0 - }; - A._EvaluateVisitor__runBuiltInCallable_closure6.prototype = { - call$0() { - return this._box_0.callback.call$1(this.evaluated._values[2]); - }, - $signature: 50 - }; - A._EvaluateVisitor__runBuiltInCallable_closure7.prototype = { - call$1($name) { - return "$" + $name; - }, - $signature: 6 - }; - A._EvaluateVisitor__evaluateArguments_closure7.prototype = { - call$1(value) { - return value; - }, - $signature: 41 - }; - A._EvaluateVisitor__evaluateArguments_closure8.prototype = { - call$1(value) { - return this.$this._evaluate0$_withoutSlash$2(value, this.restNodeForSpan); - }, - $signature: 41 - }; - A._EvaluateVisitor__evaluateArguments_closure9.prototype = { - call$2(key, value) { - var _this = this, - t1 = _this.restNodeForSpan; - _this.named.$indexSet(0, key, _this.$this._evaluate0$_withoutSlash$2(value, t1)); - _this.namedNodes.$indexSet(0, key, t1); - }, - $signature: 109 - }; - A._EvaluateVisitor__evaluateArguments_closure10.prototype = { - call$1(value) { - return value; - }, - $signature: 41 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure7.prototype = { - call$1(value) { - var t1 = this.restArgs; - return new A.ValueExpression0(value, t1.get$span(t1)); - }, - $signature: 66 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure8.prototype = { - call$1(value) { - var t1 = this.restArgs; - return new A.ValueExpression0(this.$this._evaluate0$_withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); - }, - $signature: 66 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure9.prototype = { - call$2(key, value) { - var _this = this, - t1 = _this.restArgs; - _this.named.$indexSet(0, key, new A.ValueExpression0(_this.$this._evaluate0$_withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); - }, - $signature: 109 - }; - A._EvaluateVisitor__evaluateMacroArguments_closure10.prototype = { - call$1(value) { - var t1 = this.keywordRestArgs; - return new A.ValueExpression0(this.$this._evaluate0$_withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); - }, - $signature: 66 - }; - A._EvaluateVisitor__addRestMap_closure1.prototype = { - call$2(key, value) { - var t2, _this = this, - t1 = _this.$this; - if (key instanceof A.SassString0) - _this.values.$indexSet(0, key._string0$_text, _this.convert.call$1(t1._evaluate0$_withoutSlash$2(value, _this.expressionNode))); - else { - t2 = _this.nodeWithSpan; - throw A.wrapException(t1._evaluate0$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); - } - }, - $signature: 97 - }; - A._EvaluateVisitor__verifyArguments_closure1.prototype = { - call$0() { - return this.$arguments.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); - }, - $signature: 0 - }; - A._EvaluateVisitor_visitCssAtRule_closure3.prototype = { - call$0() { - var t1, t2, t3, t4; - for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t4 = t1.__internal$_current; - (t4 == null ? t2._as(t4) : t4).accept$1(t3); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssAtRule_closure4.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitCssKeyframeBlock_closure3.prototype = { - call$0() { - var t1, t2, t3, t4; - for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t4 = t1.__internal$_current; - (t4 == null ? t2._as(t4) : t4).accept$1(t3); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssKeyframeBlock_closure4.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitCssMediaRule_closure5.prototype = { - call$1(mediaQueries) { - return this.$this._evaluate0$_mergeMediaQueries$2(mediaQueries, this.node.queries); - }, - $signature: 104 - }; - A._EvaluateVisitor_visitCssMediaRule_closure6.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.mergedQueries; - if (t2 == null) - t2 = _this.node.queries; - t1._evaluate0$_withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure1(t1, _this.node)); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssMediaRule__closure1.prototype = { - call$0() { - var t2, t3, t4, - t1 = this.$this, - _0_0 = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; - if (_0_0 != null) - t1._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure1(t1, this.node), false, type$.ModifiableCssStyleRule_2, type$.Null); - else - for (t2 = this.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { - t4 = t2.__internal$_current; - (t4 == null ? t3._as(t4) : t4).accept$1(t1); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssMediaRule___closure1.prototype = { - call$0() { - var t1, t2, t3, t4; - for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t4 = t1.__internal$_current; - (t4 == null ? t2._as(t4) : t4).accept$1(t3); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssMediaRule_closure7.prototype = { - call$1(node) { - var t1; - if (!(node instanceof A.ModifiableCssStyleRule0)) { - t1 = this.mergedSources; - t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule0 && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); - } else - t1 = true; - return t1; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitCssStyleRule_closure4.prototype = { - call$0() { - var t1 = this.$this; - t1._evaluate0$_withStyleRule$2(this.rule, new A._EvaluateVisitor_visitCssStyleRule__closure1(t1, this.node)); - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssStyleRule__closure1.prototype = { - call$0() { - var t1, t2, t3, t4; - for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t4 = t1.__internal$_current; - (t4 == null ? t2._as(t4) : t4).accept$1(t3); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssStyleRule_closure3.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor_visitCssSupportsRule_closure3.prototype = { - call$0() { - var t2, t3, t4, - t1 = this.$this, - _0_0 = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; - if (_0_0 != null) - t1._evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure1(t1, this.node), type$.ModifiableCssStyleRule_2, type$.Null); - else - for (t2 = this.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { - t4 = t2.__internal$_current; - (t4 == null ? t3._as(t4) : t4).accept$1(t1); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssSupportsRule__closure1.prototype = { - call$0() { - var t1, t2, t3, t4; - for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t4 = t1.__internal$_current; - (t4 == null ? t2._as(t4) : t4).accept$1(t3); - } - }, - $signature: 1 - }; - A._EvaluateVisitor_visitCssSupportsRule_closure4.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluateVisitor__performInterpolationHelper_closure1.prototype = { - call$1(targetLocations) { - return A.InterpolationMap$0(this.interpolation, targetLocations); - }, - $signature: 216 - }; - A._EvaluateVisitor__serialize_closure1.prototype = { - call$0() { - return A.serializeValue0(this.value, false, this.quote); - }, - $signature: 30 - }; - A._EvaluateVisitor__expressionNode_closure1.prototype = { - call$0() { - var t1 = this.expression; - return this.$this._evaluate0$_environment.getVariableNode$2$namespace(t1.name, t1.namespace); - }, - $signature: 217 - }; - A._EvaluateVisitor__withoutSlash_recommendation1.prototype = { - call$1(number) { - var before, after, t1, - _1_0 = number.asSlash; - $label0$0: { - if (type$.Record_2_nullable_Object_and_nullable_Object._is(_1_0)) { - before = _1_0._0; - after = _1_0._1; - t1 = "math.div(" + A.S(this.call$1(before)) + ", " + A.S(this.call$1(after)) + ")"; - break $label0$0; - } - t1 = A.serializeValue0(number, true, true); - break $label0$0; - } - return t1; - }, - $signature: 218 - }; - A._EvaluateVisitor__stackFrame_closure1.prototype = { - call$1(url) { - var t1 = this.$this._evaluate0$_importCache; - t1 = t1 == null ? null : t1.humanize$1(url); - return t1 == null ? url : t1; - }, - $signature: 47 - }; - A._ImportedCssVisitor1.prototype = { - visitCssAtRule$1(node) { - var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure1(); - this._evaluate0$_visitor._evaluate0$_addChild$2$through(node, t1); - }, - visitCssComment$1(node) { - return this._evaluate0$_visitor._evaluate0$_addChild$1(node); - }, - visitCssDeclaration$1(node) { - }, - visitCssImport$1(node) { - var t2, - _s13_ = "_endOfImports", - t1 = this._evaluate0$_visitor; - if (t1._evaluate0$_assertInModule$2(t1._evaluate0$__parent, "__parent") !== t1._evaluate0$_assertInModule$2(t1._evaluate0$__root, "_root")) - t1._evaluate0$_addChild$1(node); - else if (t1._evaluate0$_assertInModule$2(t1._evaluate0$__endOfImports, _s13_) === J.get$length$asx(t1._evaluate0$_assertInModule$2(t1._evaluate0$__root, "_root").children._collection$_source)) { - t1._evaluate0$_addChild$1(node); - t1._evaluate0$__endOfImports = t1._evaluate0$_assertInModule$2(t1._evaluate0$__endOfImports, _s13_) + 1; - } else { - t2 = t1._evaluate0$_outOfOrderImports; - (t2 == null ? t1._evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t2).push(node); - } - }, - visitCssKeyframeBlock$1(node) { - }, - visitCssMediaRule$1(node) { - var t1 = this._evaluate0$_visitor, - mediaQueries = t1._evaluate0$_mediaQueries; - t1._evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure1(mediaQueries == null || t1._evaluate0$_mergeMediaQueries$2(mediaQueries, node.queries) != null)); - }, - visitCssStyleRule$1(node) { - return this._evaluate0$_visitor._evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure1()); - }, - visitCssStylesheet$1(node) { - var t1, t2, t3; - for (t1 = node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t3 = t1.__internal$_current; - (t3 == null ? t2._as(t3) : t3).accept$1(this); - } - }, - visitCssSupportsRule$1(node) { - return this._evaluate0$_visitor._evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure1()); - } - }; - A._ImportedCssVisitor_visitCssAtRule_closure1.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._ImportedCssVisitor_visitCssMediaRule_closure1.prototype = { - call$1(node) { - var t1; - if (!(node instanceof A.ModifiableCssStyleRule0)) - t1 = this.hasBeenMerged && node instanceof A.ModifiableCssMediaRule0; - else - t1 = true; - return t1; - }, - $signature: 8 - }; - A._ImportedCssVisitor_visitCssStyleRule_closure1.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._ImportedCssVisitor_visitCssSupportsRule_closure1.prototype = { - call$1(node) { - return node instanceof A.ModifiableCssStyleRule0; - }, - $signature: 8 - }; - A._EvaluationContext1.prototype = { - get$currentCallableSpan() { - var _0_0 = this._evaluate0$_visitor._evaluate0$_callableNode; - if (_0_0 != null) - return _0_0.get$span(_0_0); - throw A.wrapException(A.StateError$(string$.No_Sasc)); - }, - warn$2(_, message, deprecation) { - var t1 = this._evaluate0$_visitor, - t2 = t1._evaluate0$_importSpan; - if (t2 == null) { - t2 = t1._evaluate0$_callableNode; - t2 = t2 == null ? null : t2.get$span(t2); - } - t1._evaluate0$_warn$3(message, t2 == null ? this._evaluate0$_defaultWarnNodeWithSpan.span : t2, deprecation); - }, - $isEvaluationContext0: 1 - }; - A.EveryCssVisitor0.prototype = { - visitCssAtRule$1(node) { - var t1 = node.children; - return t1.every$1(t1, new A.EveryCssVisitor_visitCssAtRule_closure0(this)); - }, - visitCssComment$1(node) { - return false; - }, - visitCssDeclaration$1(node) { - return false; - }, - visitCssImport$1(node) { - return false; - }, - visitCssKeyframeBlock$1(node) { - var t1 = node.children; - return t1.every$1(t1, new A.EveryCssVisitor_visitCssKeyframeBlock_closure0(this)); - }, - visitCssMediaRule$1(node) { - var t1 = node.children; - return t1.every$1(t1, new A.EveryCssVisitor_visitCssMediaRule_closure0(this)); - }, - visitCssStyleRule$1(node) { - var t1 = node.children; - return t1.every$1(t1, new A.EveryCssVisitor_visitCssStyleRule_closure0(this)); - }, - visitCssStylesheet$1(node) { - return J.every$1$ax(node.get$children(node), new A.EveryCssVisitor_visitCssStylesheet_closure0(this)); - }, - visitCssSupportsRule$1(node) { - var t1 = node.children; - return t1.every$1(t1, new A.EveryCssVisitor_visitCssSupportsRule_closure0(this)); - } - }; - A.EveryCssVisitor_visitCssAtRule_closure0.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 8 - }; - A.EveryCssVisitor_visitCssKeyframeBlock_closure0.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 8 - }; - A.EveryCssVisitor_visitCssMediaRule_closure0.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 8 - }; - A.EveryCssVisitor_visitCssStyleRule_closure0.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 8 - }; - A.EveryCssVisitor_visitCssStylesheet_closure0.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 8 - }; - A.EveryCssVisitor_visitCssSupportsRule_closure0.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature: 8 - }; - A._NodeException.prototype = {}; - A.exceptionClass_closure.prototype = { - call$0() { - var jsClass = type$.JSClass._as(new self.Function("", " return class Exception extends Error {\n constructor(dartException, message) {\n super(message);\n\n // Define this as non-enumerable so that it doesn't show up when the\n // exception hits the top level.\n Object.defineProperty(this, '_dartException', {\n value: dartException,\n enumerable: false\n });\n }\n\n toString() {\n return this.message;\n }\n }\n ").call$0()); - A.defineGetter(jsClass, "name", null, "sass.Exception"); - A.LinkedHashMap_LinkedHashMap$_literal(["sassMessage", new A.exceptionClass__closure(), "sassStack", new A.exceptionClass__closure0(), "span", new A.exceptionClass__closure1()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); - return jsClass; - }, - $signature: 16 - }; - A.exceptionClass__closure.prototype = { - call$1(exception) { - return J.get$_dartException$x(exception)._span_exception$_message; - }, - $signature: 240 - }; - A.exceptionClass__closure0.prototype = { - call$1(exception) { - return J.get$trace$z(J.get$_dartException$x(exception)).toString$0(0); - }, - $signature: 240 - }; - A.exceptionClass__closure1.prototype = { - call$1(exception) { - var t1 = J.get$_dartException$x(exception), - t2 = J.getInterceptor$z(t1); - return A.SourceSpanException.prototype.get$span.call(t2, t1); - }, - $signature: 468 - }; - A.SassException0.prototype = { - get$trace(_) { - return A.Trace$(A._setArrayType([A.frameForSpan0(A.SourceSpanException.prototype.get$span.call(this, 0), "root stylesheet", null)], type$.JSArray_Frame), null); - }, - get$span(_) { - return A.SourceSpanException.prototype.get$span.call(this, 0); - }, - withAdditionalSpan$2(span, label) { - return A.MultiSpanSassException$0(this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), this.loadedUrls); - }, - withTrace$1(trace) { - var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), - t2 = A.Set_Set$unmodifiable(this.loadedUrls, type$.Uri); - return new A.SassRuntimeException0(trace, t2, this._span_exception$_message, t1); - }, - withLoadedUrls$1(loadedUrls) { - var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), - t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); - return new A.SassException0(t2, this._span_exception$_message, t1); - }, - toString$1$color(_, color) { - var t2, _i, frame, t3, _this = this, - buffer = new A.StringBuffer(""), - t1 = "" + ("Error: " + _this._span_exception$_message + "\n"); - buffer._contents = t1; - buffer._contents = t1 + A.SourceSpanException.prototype.get$span.call(_this, 0).highlight$1$color(color); - for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { - frame = t1[_i]; - if (J.get$length$asx(frame) === 0) - continue; - t3 = buffer._contents += "\n"; - buffer._contents = t3 + (" " + A.S(frame)); - } - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - toString$0(_) { - return this.toString$1$color(0, null); - } - }; - A.MultiSpanSassException0.prototype = { - withAdditionalSpan$2(span, label) { - var _this = this, - t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), - t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); - t2.$indexSet(0, span, label); - return A.MultiSpanSassException$0(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.loadedUrls); - }, - withTrace$1(trace) { - var _this = this; - return A.MultiSpanSassRuntimeException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, trace, _this.loadedUrls); - }, - withLoadedUrls$1(loadedUrls) { - var _this = this; - return A.MultiSpanSassException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, loadedUrls); - }, - toString$1$color(_, color) { - var t1, t2, _i, frame, t3, _this = this, - useColor = color === true, - buffer = new A.StringBuffer("Error: " + _this._span_exception$_message + "\n"); - A.NullableExtension_andThen0(A.Highlighter$multiple(A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, useColor, null, null).highlight$0(), buffer.get$write(buffer)); - for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { - frame = t1[_i]; - if (J.get$length$asx(frame) === 0) - continue; - buffer._contents += "\n"; - t3 = " " + A.S(frame); - buffer._contents += t3; - } - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - toString$0(_) { - return this.toString$1$color(0, null); - }, - get$primaryLabel() { - return this.primaryLabel; - }, - get$secondarySpans() { - return this.secondarySpans; - } - }; - A.SassRuntimeException0.prototype = { - withAdditionalSpan$2(span, label) { - var _this = this; - return A.MultiSpanSassRuntimeException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), _this.trace, _this.loadedUrls); - }, - withLoadedUrls$1(loadedUrls) { - var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), - t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); - return new A.SassRuntimeException0(this.trace, t2, this._span_exception$_message, t1); - }, - get$trace(receiver) { - return this.trace; - } - }; - A.MultiSpanSassRuntimeException0.prototype = { - withAdditionalSpan$2(span, label) { - var _this = this, - t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), - t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); - t2.$indexSet(0, span, label); - return A.MultiSpanSassRuntimeException$0(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.trace, _this.loadedUrls); - }, - withLoadedUrls$1(loadedUrls) { - var _this = this; - return A.MultiSpanSassRuntimeException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, _this.trace, loadedUrls); - }, - $isSassRuntimeException0: 1, - get$trace(receiver) { - return this.trace; - } - }; - A.SassFormatException0.prototype = { - get$source() { - var t1 = A.SourceSpanException.prototype.get$span.call(this, 0); - return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); - }, - withAdditionalSpan$2(span, label) { - return A.MultiSpanSassFormatException$0(this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), this.loadedUrls); - }, - withLoadedUrls$1(loadedUrls) { - var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), - t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); - return new A.SassFormatException0(t2, this._span_exception$_message, t1); - }, - $isFormatException: 1, - $isSourceSpanFormatException: 1 - }; - A.MultiSpanSassFormatException0.prototype = { - get$source() { - var t1 = A.SourceSpanException.prototype.get$span.call(this, 0); - return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); - }, - withAdditionalSpan$2(span, label) { - var _this = this, - t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), - t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); - t2.$indexSet(0, span, label); - return A.MultiSpanSassFormatException$0(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.loadedUrls); - }, - withLoadedUrls$1(loadedUrls) { - var _this = this; - return A.MultiSpanSassFormatException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, loadedUrls); - }, - $isFormatException: 1, - $isSourceSpanFormatException: 1, - $isMultiSourceSpanFormatException: 1, - $isSassFormatException0: 1 - }; - A.SassScriptException0.prototype = { - withSpan$1(span) { - return new A.SassException0(B.Set_empty, this.message, span); - }, - toString$0(_) { - return this.message + string$.x0a_BUG_; - }, - get$message(receiver) { - return this.message; - } - }; - A.MultiSpanSassScriptException0.prototype = { - withSpan$1(span) { - return A.MultiSpanSassException$0(this.message, span, this.primaryLabel, this.secondarySpans, null); - } - }; - A.Exports.prototype = {}; - A.LoggerNamespace.prototype = {}; - A.Expression0.prototype = {$isAstNode0: 1, $isSassNode: 1}; - A.JSExpressionVisitor.prototype = { - visitBinaryOperationExpression$1(_, node) { - return J.visitBinaryOperationExpression$1$x(this._expression$_inner, node); - }, - visitBooleanExpression$1(_, node) { - return J.visitBooleanExpression$1$x(this._expression$_inner, node); - }, - visitColorExpression$1(_, node) { - return J.visitColorExpression$1$x(this._expression$_inner, node); - }, - visitInterpolatedFunctionExpression$1(_, node) { - return J.visitInterpolatedFunctionExpression$1$x(this._expression$_inner, node); - }, - visitFunctionExpression$1(_, node) { - return J.visitFunctionExpression$1$x(this._expression$_inner, node); - }, - visitIfExpression$1(_, node) { - return J.visitIfExpression$1$x(this._expression$_inner, node); - }, - visitListExpression$1(_, node) { - return J.visitListExpression$1$x(this._expression$_inner, node); - }, - visitMapExpression$1(_, node) { - return J.visitMapExpression$1$x(this._expression$_inner, node); - }, - visitNullExpression$1(_, node) { - return J.visitNullExpression$1$x(this._expression$_inner, node); - }, - visitNumberExpression$1(_, node) { - return J.visitNumberExpression$1$x(this._expression$_inner, node); - }, - visitParenthesizedExpression$1(_, node) { - return J.visitParenthesizedExpression$1$x(this._expression$_inner, node); - }, - visitSelectorExpression$1(_, node) { - return J.visitSelectorExpression$1$x(this._expression$_inner, node); - }, - visitStringExpression$1(_, node) { - return J.visitStringExpression$1$x(this._expression$_inner, node); - }, - visitSupportsExpression$1(_, node) { - return J.visitSupportsExpression$1$x(this._expression$_inner, node); - }, - visitUnaryOperationExpression$1(_, node) { - return J.visitUnaryOperationExpression$1$x(this._expression$_inner, node); - }, - visitValueExpression$1(_, node) { - return J.visitValueExpression$1$x(this._expression$_inner, node); - }, - visitVariableExpression$1(_, node) { - return J.visitVariableExpression$1$x(this._expression$_inner, node); - }, - $isExpressionVisitor: 1 - }; - A.JSExpressionVisitorObject.prototype = {}; - A._MakeExpressionCalculationSafe0.prototype = { - visitBinaryOperationExpression$1(_, node) { - var t1, t2, t3, t4; - if (node.operator === B.BinaryOperator_KNx0) { - t1 = A._setArrayType([node], type$.JSArray_Expression_2); - t2 = node.get$span(0); - t3 = type$.Expression_2; - t1 = A.List_List$unmodifiable(t1, t3); - t3 = A.ConstantMap_ConstantMap$from(B.Map_empty14, type$.String, t3); - t4 = node.get$span(0); - t1 = new A.FunctionExpression0("math", A.stringReplaceAllUnchecked("max", "_", "-"), "max", new A.ArgumentInvocation0(t1, t3, null, null, t2), t4); - } else - t1 = this.super$ReplaceExpressionVisitor$visitBinaryOperationExpression0(0, node); - return t1; - }, - visitInterpolatedFunctionExpression$1(_, node) { - return node; - }, - visitUnaryOperationExpression$1(_, node) { - var t1, - _0_0 = node.operator; - $label0$0: { - if (B.UnaryOperator_cLp0 === _0_0) { - t1 = node.operand; - break $label0$0; - } - if (B.UnaryOperator_AiQ0 === _0_0) { - t1 = new A.BinaryOperationExpression0(B.BinaryOperator_2No0, new A.NumberExpression0(-1, null, node.span), node.operand, false); - break $label0$0; - } - t1 = this.super$ReplaceExpressionVisitor$visitUnaryOperationExpression0(0, node); - break $label0$0; - } - return t1; - }, - $isExpressionVisitor: 1 - }; - A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0.prototype = {}; - A.ExtendRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitExtendRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.selector.toString$0(0), - t2 = this.isOptional ? " !optional" : ""; - return "@extend " + t1 + t2 + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.Extension0.prototype = { - toString$0(_) { - var t1 = this.extender.toString$0(0), - t2 = this.target.toString$0(0), - t3 = this.isOptional ? " !optional" : ""; - return t1 + " {@extend " + t2 + t3 + "}"; - } - }; - A.Extender0.prototype = { - assertCompatibleMediaContext$1(mediaContext) { - var expectedMediaContext, - extension = this._extension$_extension; - if (extension == null) - return; - expectedMediaContext = extension.mediaContext; - if (expectedMediaContext == null) - return; - if (mediaContext != null && B.C_ListEquality.equals$2(0, expectedMediaContext, mediaContext)) - return; - throw A.wrapException(A.SassException$0(string$.You_ma, extension.span, null)); - }, - toString$0(_) { - return A.serializeSelector0(this.selector, true); - } - }; - A.ExtensionStore0.prototype = { - get$isEmpty(_) { - return this._extension_store$_extensions.__js_helper$_length === 0; - }, - get$simpleSelectors() { - return new A.MapKeySet(this._extension_store$_selectors, type$.MapKeySet_SimpleSelector_2); - }, - extensionsWhereTarget$1(callback) { - return new A._SyncStarIterable(this.extensionsWhereTarget$body$ExtensionStore0(callback), type$._SyncStarIterable_Extension_2); - }, - extensionsWhereTarget$body$ExtensionStore0($async$callback) { - var $async$self = this; - return function() { - var callback = $async$callback; - var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, simple, sources, t3; - return function $async$extensionsWhereTarget$1($async$iterator, $async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = A.MapExtensions_get_pairs0($async$self._extension_store$_extensions, type$.SimpleSelector_2, type$.Map_ComplexSelector_Extension_2), t1 = t1.get$iterator(t1); - case 2: - // for condition - if (!t1.moveNext$0()) { - // goto after for - $async$goto = 3; - break; - } - t2 = t1.get$current(t1); - simple = t2._0; - sources = t2._1; - if (!callback.call$1(simple)) { - // goto for condition - $async$goto = 2; - break; - } - t2 = sources.get$values(sources), t2 = t2.get$iterator(t2); - case 4: - // for condition - if (!t2.moveNext$0()) { - // goto after for - $async$goto = 5; - break; - } - t3 = t2.get$current(t2); - $async$goto = t3 instanceof A.MergedExtension0 ? 6 : 8; - break; - case 6: - // then - t3 = t3.unmerge$0(); - $async$goto = 9; - return $async$iterator._yieldStar$1(new A.WhereIterable(t3, new A.ExtensionStore_extensionsWhereTarget_closure0(), t3.$ti._eval$1("WhereIterable"))); - case 9: - // after yield - // goto join - $async$goto = 7; - break; - case 8: - // else - $async$goto = !t3.isOptional ? 10 : 11; - break; - case 10: - // then - $async$goto = 12; - return $async$iterator._async$_current = t3, 1; - case 12: - // after yield - case 11: - // join - case 7: - // join - // goto for condition - $async$goto = 4; - break; - case 5: - // after for - // goto for condition - $async$goto = 2; - break; - case 3: - // after for - // implicit return - return 0; - case 1: - // rethrow - return $async$iterator._datum = $async$currentError, 3; - } - }; - }; - }, - addSelector$2(selector, mediaContext) { - var originalSelector, error, stackTrace, t1, exception, t2, t3, t4, modifiableSelector, _this = this; - selector = selector; - originalSelector = selector; - if (!originalSelector.accept$1(B._IsInvisibleVisitor_true0)) - _this._extension_store$_originals.addAll$1(0, originalSelector.components); - t1 = _this._extension_store$_extensions; - if (t1.__js_helper$_length !== 0) - try { - selector = _this._extension_store$_extendList$3(originalSelector, t1, mediaContext); - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = error; - t2 = J.getInterceptor$z(t1); - t1 = A.SourceSpanException.prototype.get$span.call(t2, t1).message$1(0, ""); - t2 = error._span_exception$_message; - t3 = error; - t4 = J.getInterceptor$z(t3); - t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); - A.throwWithTrace0(new A.SassException0(B.Set_empty, "From " + t1 + "\n" + t2, t3), error, stackTrace); - } else - throw exception; - } - modifiableSelector = new A.ModifiableBox0(selector, type$.ModifiableBox_SelectorList_2); - if (mediaContext != null) - _this._extension_store$_mediaContexts.$indexSet(0, modifiableSelector, mediaContext); - _this._extension_store$_registerSelector$2(selector, modifiableSelector); - return new A.Box0(modifiableSelector, type$.Box_SelectorList_2); - }, - _extension_store$_registerSelector$2(list, selector) { - var t1, t2, t3, t4, _i, t5, t6, _i0, t7, t8, _i1, simple, _0_2_isSet, _0_2, t9, selectorInPseudo; - for (t1 = list.components, t2 = t1.length, t3 = this._extension_store$_selectors, t4 = type$.SelectorList_2, _i = 0; _i < t2; ++_i) - for (t5 = t1[_i].components, t6 = t5.length, _i0 = 0; _i0 < t6; ++_i0) - for (t7 = t5[_i0].selector.components, t8 = t7.length, _i1 = 0; _i1 < t8; ++_i1) { - simple = t7[_i1]; - J.add$1$ax(t3.putIfAbsent$2(simple, new A.ExtensionStore__registerSelector_closure0()), selector); - _0_2_isSet = simple instanceof A.PseudoSelector0; - if (_0_2_isSet) { - _0_2 = simple.selector; - t9 = _0_2 != null; - } else { - _0_2 = null; - t9 = false; - } - if (t9) { - selectorInPseudo = _0_2_isSet ? _0_2 : simple.selector; - this._extension_store$_registerSelector$2(selectorInPseudo == null ? t4._as(selectorInPseudo) : selectorInPseudo, selector); - } - } - }, - addExtension$4(extender, target, extend, mediaContext) { - var t2, t3, t4, t5, t6, t7, t8, t9, t10, newExtensions, _i, complex, t11, extension, _0_0, t12, newExtensionsByTarget, additionalExtensions, _this = this, - selectors = _this._extension_store$_selectors.$index(0, target), - t1 = _this._extension_store$_extensionsByExtender, - existingExtensions = t1.$index(0, target), - sources = _this._extension_store$_extensions.putIfAbsent$2(target, new A.ExtensionStore_addExtension_closure2()); - for (t2 = extender.components, t3 = t2.length, t4 = selectors == null, t5 = _this._extension_store$_sourceSpecificity, t6 = extend.span, t7 = extend.isOptional, t8 = existingExtensions != null, t9 = type$.ComplexSelector_2, t10 = type$.Extension_2, newExtensions = null, _i = 0; _i < t3; ++_i) { - complex = t2[_i]; - if (complex.accept$1(B.C__IsUselessVisitor0)) - continue; - complex.get$specificity(); - t11 = new A.Extender0(complex, false); - extension = t11._extension$_extension = new A.Extension0(t11, target, mediaContext, t7, t6); - _0_0 = sources.$index(0, complex); - if (_0_0 != null) { - sources.$indexSet(0, complex, A.MergedExtension_merge0(_0_0, extension)); - continue; - } - sources.$indexSet(0, complex, extension); - for (t11 = new A._SyncStarIterator(_this._extension_store$_simpleSelectors$1(complex)._outerHelper()); t11.moveNext$0();) { - t12 = t11._async$_current; - J.add$1$ax(t1.putIfAbsent$2(t12, new A.ExtensionStore_addExtension_closure3()), extension); - t5.putIfAbsent$2(t12, new A.ExtensionStore_addExtension_closure4(complex)); - } - if (!t4 || t8) { - if (newExtensions == null) - newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t9, t10); - newExtensions.$indexSet(0, complex, extension); - } - } - if (newExtensions == null) - return; - t1 = type$.SimpleSelector_2; - newExtensionsByTarget = A.LinkedHashMap_LinkedHashMap$_literal([target, newExtensions], t1, type$.Map_ComplexSelector_Extension_2); - if (t8) { - additionalExtensions = _this._extension_store$_extendExistingExtensions$2(existingExtensions, newExtensionsByTarget); - if (additionalExtensions != null) - A.mapAddAll20(newExtensionsByTarget, additionalExtensions, t1, t9, t10); - } - if (!t4) - _this._extension_store$_extendExistingSelectors$2(selectors, newExtensionsByTarget); - }, - _extension_store$_simpleSelectors$1(complex) { - return new A._SyncStarIterable(this._simpleSelectors$body$ExtensionStore0(complex), type$._SyncStarIterable_SimpleSelector_2); - }, - _simpleSelectors$body$ExtensionStore0($async$complex) { - var $async$self = this; - return function() { - var complex = $async$complex; - var $async$goto = 0, $async$handler = 1, $async$currentError, t1, t2, t3, _i, t4, t5, _i0, simple, _0_2_isSet, _0_2, t6, selector, t7, _i1; - return function $async$_extension_store$_simpleSelectors$1($async$iterator, $async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = complex.components, t2 = t1.length, t3 = type$.SelectorList_2, _i = 0; - case 2: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 4; - break; - } - t4 = t1[_i].selector.components, t5 = t4.length, _i0 = 0; - case 5: - // for condition - if (!(_i0 < t5)) { - // goto after for - $async$goto = 7; - break; - } - simple = t4[_i0]; - $async$goto = 8; - return $async$iterator._async$_current = simple, 1; - case 8: - // after yield - _0_2_isSet = simple instanceof A.PseudoSelector0; - if (_0_2_isSet) { - _0_2 = simple.selector; - t6 = _0_2 != null; - } else { - _0_2 = null; - t6 = false; - } - $async$goto = t6 ? 9 : 10; - break; - case 9: - // then - selector = _0_2_isSet ? _0_2 : simple.selector; - t6 = (selector == null ? t3._as(selector) : selector).components, t7 = t6.length, _i1 = 0; - case 11: - // for condition - if (!(_i1 < t7)) { - // goto after for - $async$goto = 13; - break; - } - $async$goto = 14; - return $async$iterator._yieldStar$1($async$self._extension_store$_simpleSelectors$1(t6[_i1])); - case 14: - // after yield - case 12: - // for update - ++_i1; - // goto for condition - $async$goto = 11; - break; - case 13: - // after for - case 10: - // join - case 6: - // for update - ++_i0; - // goto for condition - $async$goto = 5; - break; - case 7: - // after for - case 3: - // for update - ++_i; - // goto for condition - $async$goto = 2; - break; - case 4: - // after for - // implicit return - return 0; - case 1: - // rethrow - return $async$iterator._datum = $async$currentError, 3; - } - }; - }; - }, - _extension_store$_extendExistingExtensions$2(extensions, newExtensions) { - var extension, selectors, error, stackTrace, t1, t2, t3, t4, t5, t6, additionalExtensions, _i, t7, exception, t8, t9, selectors0, t10, t11, t12, t13, t14, withExtender, _0_0, _i0, _i1; - for (t1 = J.toList$0$ax(extensions), t2 = t1.length, t3 = this._extension_store$_extensionsByExtender, t4 = type$.SimpleSelector_2, t5 = type$.Map_ComplexSelector_Extension_2, t6 = this._extension_store$_extensions, additionalExtensions = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - extension = t1[_i]; - t7 = t6.$index(0, extension.target); - t7.toString; - selectors = null; - try { - selectors = this._extension_store$_extendComplex$3(extension.extender.selector, newExtensions, extension.mediaContext); - if (selectors == null) - continue; - } catch (exception) { - t8 = A.unwrapException(exception); - if (t8 instanceof A.SassException0) { - error = t8; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace0(error.withAdditionalSpan$2(extension.extender.selector.span, "target selector"), error, stackTrace); - } else - throw exception; - } - t8 = J.get$first$ax(selectors); - t9 = extension.extender.selector; - if (B.C_ListEquality.equals$2(0, t8.leadingCombinators, t9.leadingCombinators) && B.C_ListEquality.equals$2(0, t8.components, t9.components)) { - t8 = selectors; - t9 = A._arrayInstanceType(t8); - selectors0 = new A.SubListIterable(t8, 1, null, t9._eval$1("SubListIterable<1>")); - selectors0.SubListIterable$3(t8, 1, null, t9._precomputed1); - selectors = selectors0; - } - for (t8 = J.get$iterator$ax(selectors); t8.moveNext$0();) { - t9 = t8.get$current(t8); - t10 = extension; - t11 = t10.target; - t12 = t10.span; - t13 = t10.mediaContext; - t10 = t10.isOptional; - t9.get$specificity(); - t14 = new A.Extender0(t9, false); - withExtender = t14._extension$_extension = new A.Extension0(t14, t11, t13, t10, t12); - _0_0 = t7.$index(0, t9); - if (_0_0 != null) - t7.$indexSet(0, t9, A.MergedExtension_merge0(_0_0, withExtender)); - else { - t7.$indexSet(0, t9, withExtender); - for (t10 = t9.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) - for (t12 = t10[_i0].selector.components, t13 = t12.length, _i1 = 0; _i1 < t13; ++_i1) - J.add$1$ax(t3.putIfAbsent$2(t12[_i1], new A.ExtensionStore__extendExistingExtensions_closure1()), withExtender); - if (newExtensions.containsKey$1(extension.target)) { - if (additionalExtensions == null) - additionalExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t4, t5); - additionalExtensions.putIfAbsent$2(extension.target, new A.ExtensionStore__extendExistingExtensions_closure2()).$indexSet(0, t9, withExtender); - } - } - } - } - return additionalExtensions; - }, - _extension_store$_extendExistingSelectors$2(selectors, newExtensions) { - var selector, error, stackTrace, t1, t2, oldValue, exception, t3, t4, t5, t6; - for (t1 = selectors.get$iterator(selectors), t2 = this._extension_store$_mediaContexts; t1.moveNext$0();) { - selector = t1.get$current(t1); - oldValue = selector.value; - try { - selector.value = this._extension_store$_extendList$3(selector.value, newExtensions, t2.$index(0, selector)); - } catch (exception) { - t3 = A.unwrapException(exception); - if (t3 instanceof A.SassException0) { - error = t3; - stackTrace = A.getTraceFromException(exception); - t3 = selector.value.span.message$1(0, ""); - t4 = error._span_exception$_message; - t5 = error; - t6 = J.getInterceptor$z(t5); - t5 = A.SourceSpanException.prototype.get$span.call(t6, t5); - A.throwWithTrace0(new A.SassException0(B.Set_empty, "From " + t3 + "\n" + t4, t5), error, stackTrace); - } else - throw exception; - } - if (oldValue === selector.value) - continue; - this._extension_store$_registerSelector$2(selector.value, selector); - } - }, - addExtensions$1(extensionStores) { - var t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, newExtensions, selectorsToExtend, extensionsToExtend, t12, t13, target, newSources, first, extensionsForTarget, t14, selectorsForTarget, t15, _2_0, t16, extender, extension, _this = this, _null = null; - for (t1 = J.get$iterator$ax(extensionStores), t2 = type$.SimpleSelector_2, t3 = type$.Map_ComplexSelector_Extension_2, t4 = _this._extension_store$_extensions, t5 = type$.ComplexSelector_2, t6 = type$.Extension_2, t7 = _this._extension_store$_selectors, t8 = _this._extension_store$_extensionsByExtender, t9 = type$.JSArray_Extension_2, t10 = type$.ModifiableBox_SelectorList_2, t11 = _this._extension_store$_sourceSpecificity, newExtensions = _null, selectorsToExtend = newExtensions, extensionsToExtend = selectorsToExtend; t1.moveNext$0();) { - t12 = t1.get$current(t1); - if (t12.get$isEmpty(t12)) - continue; - t11.addAll$1(0, t12.get$_extension_store$_sourceSpecificity()); - for (t12 = A.MapExtensions_get_pairs0(t12.get$_extension_store$_extensions(), t2, t3), t12 = t12.get$iterator(t12); t12.moveNext$0();) { - t13 = t12.get$current(t12); - target = t13._0; - newSources = t13._1; - if (target instanceof A.PlaceholderSelector0) { - first = target.name.charCodeAt(0); - t13 = first === 45 || first === 95; - } else - t13 = false; - if (t13) - continue; - extensionsForTarget = t8.$index(0, target); - t13 = extensionsForTarget == null; - if (!t13) { - if (extensionsToExtend == null) { - extensionsToExtend = A._setArrayType([], t9); - t14 = extensionsToExtend; - } else - t14 = extensionsToExtend; - B.JSArray_methods.addAll$1(t14, extensionsForTarget); - } - selectorsForTarget = t7.$index(0, target); - t14 = selectorsForTarget != null; - if (t14) { - if (selectorsToExtend == null) { - selectorsToExtend = A.LinkedHashSet_LinkedHashSet$_empty(t10); - t15 = selectorsToExtend; - } else - t15 = selectorsToExtend; - t15.addAll$1(0, selectorsForTarget); - } - _2_0 = t4.$index(0, target); - if (_2_0 != null) - for (t15 = A.MapExtensions_get_pairs0(newSources, t5, t6), t15 = t15.get$iterator(t15); t15.moveNext$0();) { - t16 = t15.get$current(t15); - extender = t16._0; - extension = t16._1; - if (_2_0.containsKey$1(extender)) { - t16 = _2_0.$index(0, extender); - extension = A.MergedExtension_merge0(t16 == null ? t6._as(t16) : t16, extension); - _2_0.$indexSet(0, extender, extension); - } else - _2_0.$indexSet(0, extender, extension); - if (!t13 || t14) { - if (newExtensions == null) { - newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); - t16 = newExtensions; - } else - t16 = newExtensions; - J.$indexSet$ax(t16.putIfAbsent$2(target, new A.ExtensionStore_addExtensions_closure0()), extender, extension); - } - } - else { - t15 = A.LinkedHashMap_LinkedHashMap(_null, _null, _null, t5, t6); - t15.addAll$1(0, newSources); - t4.$indexSet(0, target, t15); - if (!t13 || t14) { - if (newExtensions == null) { - newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); - t13 = newExtensions; - } else - t13 = newExtensions; - t14 = A.LinkedHashMap_LinkedHashMap(_null, _null, _null, t5, t6); - t14.addAll$1(0, newSources); - t13.$indexSet(0, target, t14); - } - } - } - } - if (newExtensions != null) { - if (extensionsToExtend != null) - _this._extension_store$_extendExistingExtensions$2(extensionsToExtend, newExtensions); - if (selectorsToExtend != null) - _this._extension_store$_extendExistingSelectors$2(selectorsToExtend, newExtensions); - } - }, - _extension_store$_extendList$3(list, extensions, mediaQueryContext) { - var t1, t2, t3, extended, i, complex, result, t4; - for (t1 = list.components, t2 = t1.length, t3 = type$.JSArray_ComplexSelector_2, extended = null, i = 0; i < t2; ++i) { - complex = t1[i]; - result = this._extension_store$_extendComplex$3(complex, extensions, mediaQueryContext); - if (result == null) { - if (extended != null) - extended.push(complex); - } else { - if (extended == null) - if (i === 0) - extended = A._setArrayType([], t3); - else { - t4 = B.JSArray_methods.sublist$2(t1, 0, i); - extended = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); - } - B.JSArray_methods.addAll$1(extended, result); - } - } - if (extended == null) - return list; - t1 = this._extension_store$_originals; - return A.SelectorList$0(this._extension_store$_trim$2(extended, t1.get$contains(t1)), list.span); - }, - _extension_store$_extendList$2(list, extensions) { - return this._extension_store$_extendList$3(list, extensions, null); - }, - _extension_store$_extendComplex$3(complex, extensions, mediaQueryContext) { - var isOriginal, t3, t4, t5, t6, t7, t8, t9, t10, extendedNotExpanded, i, component, extended, t11, t12, t13, t14, _box_0 = {}, - t1 = complex.leadingCombinators, - t2 = t1.length; - if (t2 > 1) - return null; - isOriginal = this._extension_store$_originals.contains$1(0, complex); - for (t3 = complex.components, t4 = t3.length, t5 = type$.JSArray_List_ComplexSelector_2, t6 = complex.lineBreak, t7 = !t6, t8 = complex.span, t9 = type$.JSArray_ComplexSelector_2, t2 = t2 === 0, t10 = type$.JSArray_ComplexSelectorComponent_2, extendedNotExpanded = null, i = 0; i < t4; ++i) { - component = t3[i]; - extended = this._extension_store$_extendCompound$4$inOriginal(component, extensions, mediaQueryContext, isOriginal); - if (extended == null) { - if (extendedNotExpanded != null) - extendedNotExpanded.push(A._setArrayType([A.ComplexSelector$0(B.List_empty14, A._setArrayType([component], t10), t8, t6)], t9)); - } else if (extendedNotExpanded != null) - extendedNotExpanded.push(extended); - else if (i !== 0) { - t11 = A._arrayInstanceType(t3); - t12 = new A.SubListIterable(t3, 0, i, t11._eval$1("SubListIterable<1>")); - t12.SubListIterable$3(t3, 0, i, t11._precomputed1); - extendedNotExpanded = A._setArrayType([A._setArrayType([A.ComplexSelector$0(t1, t12, t8, t6)], t9), extended], t5); - } else if (t2) - extendedNotExpanded = A._setArrayType([extended], t5); - else { - t11 = A._setArrayType([], t9); - for (t12 = J.get$iterator$ax(extended); t12.moveNext$0();) { - t13 = t12.get$current(t12); - t14 = t13.leadingCombinators; - if (t14.length === 0 || B.C_ListEquality.equals$2(0, t1, t14)) { - t14 = t13.components; - t11.push(A.ComplexSelector$0(t1, t14, t8, !t7 || t13.lineBreak)); - } - } - extendedNotExpanded = A._setArrayType([t11], t5); - } - } - if (extendedNotExpanded == null) - return null; - _box_0.first = true; - t1 = type$.ComplexSelector_2; - t1 = J.expand$1$1$ax(A.paths0(extendedNotExpanded, t1), new A.ExtensionStore__extendComplex_closure0(_box_0, this, complex), t1); - return A.List_List$of(t1, true, t1.$ti._eval$1("Iterable.E")); - }, - _extension_store$_extendCompound$4$inOriginal(component, extensions, mediaQueryContext, inOriginal) { - var t3, t4, t5, t6, t7, t8, t9, t10, t11, options, i, simple, extended, t12, result, compound, complex, extenderPaths, withCombinators, isOriginal, _this = this, _null = null, - t1 = _this._extension_store$_mode, - targetsUsed = t1 === B.ExtendMode_normal_normal0 || extensions.__js_helper$_length < 2 ? _null : A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector_2), - t2 = component.selector, - simples = t2.components; - for (t3 = simples.length, t4 = type$.JSArray_List_Extender_2, t5 = type$.JSArray_Extender_2, t6 = type$.CssValue_Combinator_2, t7 = type$.JSArray_ComplexSelectorComponent_2, t8 = A._arrayInstanceType(simples), t9 = t8._precomputed1, t8 = t8._eval$1("SubListIterable<1>"), t10 = component.span, t11 = type$.SimpleSelector_2, options = _null, i = 0; i < t3; ++i) { - simple = simples[i]; - extended = _this._extension_store$_extendSimple$4(simple, extensions, mediaQueryContext, targetsUsed); - if (extended == null) { - if (options != null) - options.push(A._setArrayType([_this._extension_store$_extenderForSimple$1(simple)], t5)); - } else { - if (options == null) { - options = A._setArrayType([], t4); - if (i !== 0) { - t12 = new A.SubListIterable(simples, 0, i, t8); - t12.SubListIterable$3(simples, 0, i, t9); - result = A.List_List$from(t12, false, t11); - result.fixed$length = Array; - result.immutable$list = Array; - t12 = result; - compound = new A.CompoundSelector0(t12, t10); - if (t12.length === 0) - A.throwExpression(A.ArgumentError$("components may not be empty.", _null)); - result = A.List_List$from(B.List_empty14, false, t6); - result.fixed$length = Array; - result.immutable$list = Array; - t12 = A.ComplexSelector$0(B.List_empty14, A._setArrayType([new A.ComplexSelectorComponent0(compound, result, t10)], t7), t10, false); - _this._extension_store$_sourceSpecificityFor$1(compound); - options.push(A._setArrayType([new A.Extender0(t12, true)], t5)); - } - } - B.JSArray_methods.addAll$1(options, extended); - } - } - if (options == null) - return _null; - if (targetsUsed != null && targetsUsed._collection$_length !== extensions.__js_helper$_length) - return _null; - if (options.length === 1) { - for (t1 = J.get$iterator$ax(options[0]), t2 = component.combinators, t3 = type$.JSArray_ComplexSelector_2, result = _null; t1.moveNext$0();) { - t4 = t1.get$current(t1); - t4.assertCompatibleMediaContext$1(mediaQueryContext); - complex = t4.selector.withAdditionalCombinators$1(t2); - if (complex.accept$1(B.C__IsUselessVisitor0)) - continue; - if (result == null) - result = A._setArrayType([], t3); - result.push(complex); - } - return result; - } - extenderPaths = A.paths0(options, type$.Extender_2); - t3 = A._setArrayType([], type$.JSArray_ComplexSelector_2); - t1 = t1 === B.ExtendMode_replace_replace0; - t4 = !t1; - if (t4) - t3.push(A.ComplexSelector$0(B.List_empty14, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(J.expand$1$1$ax(J.get$first$ax(extenderPaths), new A.ExtensionStore__extendCompound_closure2(), t11), t2.span), A.List_List$unmodifiable(component.combinators, t6), t10)], t7), t10, false)); - t2 = J.skip$1$ax(extenderPaths, t1 ? 0 : 1); - t5 = t2.$ti; - t2 = new A.ListIterator(t2, t2.get$length(0), t5._eval$1("ListIterator")); - t6 = component.combinators; - t5 = t5._eval$1("ListIterable.E"); - for (; t2.moveNext$0();) { - t1 = t2.__internal$_current; - extended = _this._extension_store$_unifyExtenders$3(t1 == null ? t5._as(t1) : t1, mediaQueryContext, t10); - if (extended == null) - continue; - for (t1 = J.get$iterator$ax(extended); t1.moveNext$0();) { - withCombinators = t1.get$current(t1).withAdditionalCombinators$1(t6); - if (!withCombinators.accept$1(B.C__IsUselessVisitor0)) - t3.push(withCombinators); - } - } - isOriginal = new A.ExtensionStore__extendCompound_closure3(); - return _this._extension_store$_trim$2(t3, inOriginal && t4 ? new A.ExtensionStore__extendCompound_closure4(B.JSArray_methods.get$first(t3)) : isOriginal); - }, - _extension_store$_unifyExtenders$3(extenders, mediaQueryContext, span) { - var t1, t2, t3, originals, originalsLineBreak, t4, complexes, _null = null, - toUnify = A.QueueList$(_null, type$.ComplexSelector_2); - for (t1 = J.getInterceptor$ax(extenders), t2 = t1.get$iterator(extenders), t3 = type$.JSArray_SimpleSelector_2, originals = _null, originalsLineBreak = false; t2.moveNext$0();) { - t4 = t2.get$current(t2); - if (t4.isOriginal) { - if (originals == null) - originals = A._setArrayType([], t3); - t4 = t4.selector; - B.JSArray_methods.addAll$1(originals, B.JSArray_methods.get$last(t4.components).selector.components); - originalsLineBreak = originalsLineBreak || t4.lineBreak; - } else { - t4 = t4.selector; - if (t4.accept$1(B.C__IsUselessVisitor0)) - return _null; - else - toUnify._queue_list$_add$1(t4); - } - } - if (originals != null) - toUnify.addFirst$1(A.ComplexSelector$0(B.List_empty14, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(originals, span), A.List_List$unmodifiable(B.List_empty14, type$.CssValue_Combinator_2), span)], type$.JSArray_ComplexSelectorComponent_2), span, originalsLineBreak)); - complexes = A.unifyComplex0(toUnify, span); - if (complexes == null) - return _null; - for (t1 = t1.get$iterator(extenders); t1.moveNext$0();) - t1.get$current(t1).assertCompatibleMediaContext$1(mediaQueryContext); - return complexes; - }, - _extension_store$_extendSimple$4(simple, extensions, mediaQueryContext, targetsUsed) { - var t2, _1_0, - t1 = new A.ExtensionStore__extendSimple_withoutPseudo0(this, extensions, targetsUsed); - if (simple instanceof A.PseudoSelector0) - t2 = simple.selector != null; - else - t2 = false; - if (t2) { - _1_0 = this._extension_store$_extendPseudo$3(simple, extensions, mediaQueryContext); - if (_1_0 != null) - return new A.MappedListIterable(_1_0, new A.ExtensionStore__extendSimple_closure1(this, t1), A._arrayInstanceType(_1_0)._eval$1("MappedListIterable<1,List>")); - } - return A.NullableExtension_andThen0(t1.call$1(simple), new A.ExtensionStore__extendSimple_closure2()); - }, - _extension_store$_extenderForSimple$1(simple) { - var t1 = simple.span; - t1 = A.ComplexSelector$0(B.List_empty14, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(A._setArrayType([simple], type$.JSArray_SimpleSelector_2), t1), A.List_List$unmodifiable(B.List_empty14, type$.CssValue_Combinator_2), t1)], type$.JSArray_ComplexSelectorComponent_2), t1, false); - this._extension_store$_sourceSpecificity.$index(0, simple); - return new A.Extender0(t1, true); - }, - _extension_store$_extendPseudo$3(pseudo, extensions, mediaQueryContext) { - var extended, complexes, t1, result, - selector = pseudo.selector; - if (selector == null) - throw A.wrapException(A.ArgumentError$("Selector " + pseudo.toString$0(0) + " must have a selector argument.", null)); - extended = this._extension_store$_extendList$3(selector, extensions, mediaQueryContext); - if (extended === selector) - return null; - complexes = extended.components; - t1 = pseudo.normalizedName === "not"; - if (t1 && !B.JSArray_methods.any$1(selector.components, new A.ExtensionStore__extendPseudo_closure4()) && B.JSArray_methods.any$1(complexes, new A.ExtensionStore__extendPseudo_closure5())) - complexes = new A.WhereIterable(complexes, new A.ExtensionStore__extendPseudo_closure6(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>")); - complexes = J.expand$1$1$ax(complexes, new A.ExtensionStore__extendPseudo_closure7(pseudo), type$.ComplexSelector_2); - if (t1 && selector.components.length === 1) { - t1 = A.MappedIterable_MappedIterable(complexes, new A.ExtensionStore__extendPseudo_closure8(pseudo, selector), complexes.$ti._eval$1("Iterable.E"), type$.PseudoSelector_2); - result = A.List_List$of(t1, true, A._instanceType(t1)._eval$1("Iterable.E")); - return result.length === 0 ? null : result; - } else - return A._setArrayType([pseudo.withSelector$1(A.SelectorList$0(complexes, selector.span))], type$.JSArray_PseudoSelector_2); - }, - _extension_store$_trim$2(selectors, isOriginal) { - var i, t1, t2, numOriginals, _box_0, complex1, j, t3, t4, _i, t5, maxSpecificity, - result = A.QueueList$(null, type$.ComplexSelector_2); - $label0$0: - for (i = selectors.length - 1, t1 = A._arrayInstanceType(selectors), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), numOriginals = 0; i >= 0; --i) { - _box_0 = {}; - complex1 = selectors[i]; - if (isOriginal.call$1(complex1)) { - for (j = 0; j < numOriginals; ++j) - if (J.$eq$(result.$index(0, j), complex1)) { - A.rotateSlice0(result, 0, j + 1); - continue $label0$0; - } - ++numOriginals; - result.addFirst$1(complex1); - continue $label0$0; - } - _box_0.maxSpecificity = 0; - for (t3 = complex1.components, t4 = t3.length, _i = 0, t5 = 0; _i < t4; ++_i, t5 = maxSpecificity) { - maxSpecificity = Math.max(t5, this._extension_store$_sourceSpecificityFor$1(t3[_i].selector)); - _box_0.maxSpecificity = maxSpecificity; - } - if (result.any$1(result, new A.ExtensionStore__trim_closure1(_box_0, complex1))) - continue $label0$0; - t3 = new A.SubListIterable(selectors, 0, i, t1); - t3.SubListIterable$3(selectors, 0, i, t2); - if (t3.any$1(0, new A.ExtensionStore__trim_closure2(_box_0, complex1))) - continue $label0$0; - result.addFirst$1(complex1); - } - return result; - }, - _extension_store$_sourceSpecificityFor$1(compound) { - var t1, t2, t3, specificity, _i, t4; - for (t1 = compound.components, t2 = t1.length, t3 = this._extension_store$_sourceSpecificity, specificity = 0, _i = 0; _i < t2; ++_i) { - t4 = t3.$index(0, t1[_i]); - specificity = Math.max(specificity, A.checkNum(t4 == null ? 0 : t4)); - } - return specificity; - }, - clone$0() { - var t2, t3, t4, _this = this, - t1 = type$.SimpleSelector_2, - newSelectors = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList_2), - newMediaContexts = A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList_2, type$.List_CssMediaQuery_2), - oldToNewSelectors = new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_of_SelectorList_and_Box_SelectorList_2); - _this._extension_store$_selectors.forEach$1(0, new A.ExtensionStore_clone_closure0(_this, newSelectors, oldToNewSelectors, newMediaContexts)); - t2 = type$.Extension_2; - t3 = A.copyMapOfMap0(_this._extension_store$_extensions, t1, type$.ComplexSelector_2, t2); - t2 = A.copyMapOfList0(_this._extension_store$_extensionsByExtender, t1, t2); - t1 = new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int_2); - t1.addAll$1(0, _this._extension_store$_sourceSpecificity); - t4 = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector_2); - t4.addAll$1(0, _this._extension_store$_originals); - return new A._Record_2(new A.ExtensionStore0(newSelectors, t3, t2, newMediaContexts, t1, t4, B.ExtendMode_normal_normal0), oldToNewSelectors); - }, - get$_extension_store$_extensions() { - return this._extension_store$_extensions; - }, - get$_extension_store$_sourceSpecificity() { - return this._extension_store$_sourceSpecificity; - } - }; - A.ExtensionStore_extensionsWhereTarget_closure0.prototype = { - call$1(extension) { - return !extension.isOptional; - }, - $signature: 469 - }; - A.ExtensionStore__registerSelector_closure0.prototype = { - call$0() { - return A.LinkedHashSet_LinkedHashSet$_empty(type$.ModifiableBox_SelectorList_2); - }, - $signature: 470 - }; - A.ExtensionStore_addExtension_closure2.prototype = { - call$0() { - return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector_2, type$.Extension_2); - }, - $signature: 131 - }; - A.ExtensionStore_addExtension_closure3.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_Extension_2); - }, - $signature: 242 - }; - A.ExtensionStore_addExtension_closure4.prototype = { - call$0() { - return this.complex.get$specificity(); - }, - $signature: 10 - }; - A.ExtensionStore__extendExistingExtensions_closure1.prototype = { - call$0() { - return A._setArrayType([], type$.JSArray_Extension_2); - }, - $signature: 242 - }; - A.ExtensionStore__extendExistingExtensions_closure2.prototype = { - call$0() { - return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector_2, type$.Extension_2); - }, - $signature: 131 - }; - A.ExtensionStore_addExtensions_closure0.prototype = { - call$0() { - return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector_2, type$.Extension_2); - }, - $signature: 131 - }; - A.ExtensionStore__extendComplex_closure0.prototype = { - call$1(path) { - var t1 = this.complex; - return J.map$1$1$ax(A.weave0(path, t1.span, t1.lineBreak), new A.ExtensionStore__extendComplex__closure0(this._box_0, this.$this, t1), type$.ComplexSelector_2); - }, - $signature: 473 - }; - A.ExtensionStore__extendComplex__closure0.prototype = { - call$1(outputComplex) { - var _this = this, - t1 = _this._box_0; - if (t1.first && _this.$this._extension_store$_originals.contains$1(0, _this.complex)) - _this.$this._extension_store$_originals.add$1(0, outputComplex); - t1.first = false; - return outputComplex; - }, - $signature: 60 - }; - A.ExtensionStore__extendCompound_closure2.prototype = { - call$1(extender) { - return B.JSArray_methods.get$last(extender.selector.components).selector.components; - }, - $signature: 475 - }; - A.ExtensionStore__extendCompound_closure3.prototype = { - call$1(_) { - return false; - }, - $signature: 20 - }; - A.ExtensionStore__extendCompound_closure4.prototype = { - call$1(complex) { - return complex.$eq(0, this.original); - }, - $signature: 20 - }; - A.ExtensionStore__extendSimple_withoutPseudo0.prototype = { - call$1(simple) { - var t1, t2, - extensionsForSimple = this.extensions.$index(0, simple); - if (extensionsForSimple == null) - return null; - t1 = this.targetsUsed; - if (t1 != null) - t1.add$1(0, simple); - t1 = A._setArrayType([], type$.JSArray_Extender_2); - t2 = this.$this; - if (t2._extension_store$_mode !== B.ExtendMode_replace_replace0) - t1.push(t2._extension_store$_extenderForSimple$1(simple)); - for (t2 = extensionsForSimple.get$values(extensionsForSimple), t2 = t2.get$iterator(t2); t2.moveNext$0();) - t1.push(t2.get$current(t2).extender); - return t1; - }, - $signature: 476 - }; - A.ExtensionStore__extendSimple_closure1.prototype = { - call$1(pseudo) { - var t1 = this.withoutPseudo.call$1(pseudo); - return t1 == null ? A._setArrayType([this.$this._extension_store$_extenderForSimple$1(pseudo)], type$.JSArray_Extender_2) : t1; - }, - $signature: 477 - }; - A.ExtensionStore__extendSimple_closure2.prototype = { - call$1(result) { - return A._setArrayType([result], type$.JSArray_List_Extender_2); - }, - $signature: 478 - }; - A.ExtensionStore__extendPseudo_closure4.prototype = { - call$1(complex) { - return complex.components.length > 1; - }, - $signature: 20 - }; - A.ExtensionStore__extendPseudo_closure5.prototype = { - call$1(complex) { - return complex.components.length === 1; - }, - $signature: 20 - }; - A.ExtensionStore__extendPseudo_closure6.prototype = { - call$1(complex) { - return complex.components.length <= 1; - }, - $signature: 20 - }; - A.ExtensionStore__extendPseudo_closure7.prototype = { - call$1(complex) { - var innerPseudo, innerSelector, - t1 = complex.get$singleCompound(); - if (t1 == null) - innerPseudo = null; - else { - t1 = t1.components; - innerPseudo = t1.length === 1 ? B.JSArray_methods.get$first(t1) : null; - } - if (!(innerPseudo instanceof A.PseudoSelector0)) - return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); - innerSelector = innerPseudo.selector; - if (innerSelector == null) - return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); - t1 = this.pseudo; - switch (t1.normalizedName) { - case "not": - if (!B.Set_mlzm2.contains$1(0, innerPseudo.normalizedName)) - return A._setArrayType([], type$.JSArray_ComplexSelector_2); - return innerSelector.components; - case "is": - case "matches": - case "where": - case "any": - case "current": - case "nth-child": - case "nth-last-child": - if (innerPseudo.name !== t1.name) - return A._setArrayType([], type$.JSArray_ComplexSelector_2); - if (innerPseudo.argument != t1.argument) - return A._setArrayType([], type$.JSArray_ComplexSelector_2); - return innerSelector.components; - case "has": - case "host": - case "host-context": - case "slotted": - return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); - default: - return A._setArrayType([], type$.JSArray_ComplexSelector_2); - } - }, - $signature: 479 - }; - A.ExtensionStore__extendPseudo_closure8.prototype = { - call$1(complex) { - return this.pseudo.withSelector$1(A.SelectorList$0(A._setArrayType([complex], type$.JSArray_ComplexSelector_2), this.selector.span)); - }, - $signature: 480 - }; - A.ExtensionStore__trim_closure1.prototype = { - call$1(complex2) { - return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); - }, - $signature: 20 - }; - A.ExtensionStore__trim_closure2.prototype = { - call$1(complex2) { - return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); - }, - $signature: 20 - }; - A.ExtensionStore_clone_closure0.prototype = { - call$2(simple, selectors) { - var t2, t3, t4, t5, t6, t7, newSelector, _0_0, _this = this, - t1 = type$.ModifiableBox_SelectorList_2, - newSelectorSet = A.LinkedHashSet_LinkedHashSet$_empty(t1); - _this.newSelectors.$indexSet(0, simple, newSelectorSet); - for (t2 = selectors.get$iterator(selectors), t3 = _this.oldToNewSelectors, t4 = type$.Box_SelectorList_2, t5 = _this.$this._extension_store$_mediaContexts, t6 = _this.newMediaContexts; t2.moveNext$0();) { - t7 = t2.get$current(t2); - newSelector = new A.ModifiableBox0(t7.value, t1); - newSelectorSet.add$1(0, newSelector); - t3.$indexSet(0, t7.value, new A.Box0(newSelector, t4)); - _0_0 = t5.$index(0, t7); - if (_0_0 != null) - t6.$indexSet(0, newSelector, _0_0); - } - }, - $signature: 481 - }; - A.FiberClass.prototype = {}; - A.Fiber.prototype = {}; - A.JSToDartFileImporter.prototype = { - canonicalize$1(_, url) { - var result, t1, resultUrl; - if (url.get$scheme() === "file") - return $.$get$FilesystemImporter_cwd0().canonicalize$1(0, url); - result = A.wrapJSExceptions(new A.JSToDartFileImporter_canonicalize_closure(this, url)); - if (result == null) - return null; - t1 = self.Promise; - if (result instanceof t1) - A.jsThrow(new self.Error("The findFileUrl() function can't return a Promise for synchron compile functions.")); - else { - t1 = self.URL; - if (!(result instanceof t1)) - A.jsThrow(new self.Error(string$.The_fie)); - } - resultUrl = A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); - if (resultUrl.get$scheme() !== "file") - A.jsThrow(new self.Error(string$.The_fiu + url.toString$0(0) + '".')); - return $.$get$FilesystemImporter_cwd0().canonicalize$1(0, resultUrl); - }, - load$1(_, url) { - return $.$get$FilesystemImporter_cwd0().load$1(0, url); - }, - isNonCanonicalScheme$1(scheme) { - return scheme !== "file"; - } - }; - A.JSToDartFileImporter_canonicalize_closure.prototype = { - call$0() { - return this.$this._file0$_findFileUrl.call$2(this.url.toString$0(0), A.canonicalizeContext0()); - }, - $signature: 33 - }; - A.FilesystemImporter0.prototype = { - canonicalize$1(_, url) { - var resolved; - if (url.get$scheme() === "file") - resolved = A.resolveImportPath0($.$get$context().style.pathFromUri$1(A._parseUri(url))); - else if (url.get$scheme() !== "") - return null; - else { - resolved = A.resolveImportPath0(A.join(this._filesystem$_loadPath, $.$get$context().style.pathFromUri$1(A._parseUri(url)), null)); - if (resolved != null && this._filesystem$_loadPathDeprecated) - A.warnForDeprecation0(string$.Using_t, B.Deprecation_cI8); - } - return A.NullableExtension_andThen0(resolved, new A.FilesystemImporter_canonicalize_closure0()); - }, - load$1(_, url) { - var path = $.$get$context().style.pathFromUri$1(A._parseUri(url)); - return A.ImporterResult$(A.readFile0(path), url, A.Syntax_forPath0(path)); - }, - toString$0(_) { - return this._filesystem$_loadPath; - } - }; - A.FilesystemImporter_canonicalize_closure0.prototype = { - call$1(resolved) { - var t2, t0, _null = null, - t1 = A.isNodeJs() ? self.process : _null; - if (!J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { - t1 = A.isNodeJs() ? self.process : _null; - t1 = J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "darwin"); - } else - t1 = true; - if (t1) { - t1 = $.$get$context(); - t2 = A._realCasePath0(A.absolute(t1.normalize$1(resolved), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null)); - t0 = t2; - t2 = t1; - t1 = t0; - } else { - t1 = $.$get$context(); - t2 = t1.canonicalize$1(0, resolved); - t0 = t2; - t2 = t1; - t1 = t0; - } - return t2.toUri$1(t1); - }, - $signature: 130 - }; - A.ForRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitForRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var _this = this, - t1 = _this.from.toString$0(0), - t2 = _this.isExclusive ? "to" : "through", - t3 = _this.children; - return "@for $" + _this.variable + " from " + t1 + " " + t2 + " " + _this.to.toString$0(0) + " {" + (t3 && B.JSArray_methods).join$1(t3, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.ForwardRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitForwardRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t2, prefix, _this = this, - t1 = "@forward " + A.StringExpression_quoteText0(_this.url.toString$0(0)), - shownMixinsAndFunctions = _this.shownMixinsAndFunctions, - hiddenMixinsAndFunctions = _this.hiddenMixinsAndFunctions; - if (shownMixinsAndFunctions != null) { - t2 = _this.shownVariables; - t2.toString; - t2 = t1 + " show " + _this._forward_rule0$_memberList$2(shownMixinsAndFunctions, t2); - t1 = t2; - } else if (hiddenMixinsAndFunctions != null && hiddenMixinsAndFunctions._base.get$isNotEmpty(0)) { - t2 = _this.hiddenVariables; - t2.toString; - t2 = t1 + " hide " + _this._forward_rule0$_memberList$2(hiddenMixinsAndFunctions, t2); - t1 = t2; - } - prefix = _this.prefix; - if (prefix != null) - t1 += " as " + prefix + "*"; - t2 = _this.configuration; - t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _forward_rule0$_memberList$2(mixinsAndFunctions, variables) { - var t2, - t1 = A.List_List$of(mixinsAndFunctions, true, type$.String); - for (t2 = variables._base.get$iterator(0); t2.moveNext$0();) - t1.push("$" + t2.get$current(0)); - return B.JSArray_methods.join$1(t1, ", "); - }, - get$span(receiver) { - return this.span; - } - }; - A.ForwardedModuleView0.prototype = { - get$url(_) { - var t1 = this._forwarded_view0$_inner; - return t1.get$url(t1); - }, - get$upstream() { - return this._forwarded_view0$_inner.get$upstream(); - }, - get$extensionStore() { - return this._forwarded_view0$_inner.get$extensionStore(); - }, - get$css(_) { - var t1 = this._forwarded_view0$_inner; - return t1.get$css(t1); - }, - get$preModuleComments() { - return this._forwarded_view0$_inner.get$preModuleComments(); - }, - get$transitivelyContainsCss() { - return this._forwarded_view0$_inner.get$transitivelyContainsCss(); - }, - get$transitivelyContainsExtensions() { - return this._forwarded_view0$_inner.get$transitivelyContainsExtensions(); - }, - setVariable$3($name, value, nodeWithSpan) { - var t2, _1_0, _2_0, - _s19_ = "Undefined variable.", - t1 = this._forwarded_view0$_rule, - _0_0 = t1.shownVariables; - if (_0_0 != null) - t2 = !_0_0._base.contains$1(0, $name); - else - t2 = false; - if (t2) - throw A.wrapException(A.SassScriptException$0(_s19_, null)); - else { - _1_0 = t1.hiddenVariables; - if (_1_0 != null) - t2 = _1_0._base.contains$1(0, $name); - else - t2 = false; - if (t2) - throw A.wrapException(A.SassScriptException$0(_s19_, null)); - } - _2_0 = t1.prefix; - if (_2_0 != null) { - if (!B.JSString_methods.startsWith$1($name, _2_0)) - throw A.wrapException(A.SassScriptException$0(_s19_, null)); - $name = B.JSString_methods.substring$1($name, _2_0.length); - } - return this._forwarded_view0$_inner.setVariable$3($name, value, nodeWithSpan); - }, - variableIdentity$1($name) { - var _0_0 = this._forwarded_view0$_rule.prefix; - if (_0_0 != null) - $name = B.JSString_methods.substring$1($name, _0_0.length); - return this._forwarded_view0$_inner.variableIdentity$1($name); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.ForwardedModuleView0 && this._forwarded_view0$_inner.$eq(0, other._forwarded_view0$_inner) && this._forwarded_view0$_rule === other._forwarded_view0$_rule; - }, - get$hashCode(_) { - var t1 = this._forwarded_view0$_inner; - return (t1.get$hashCode(t1) ^ A.Primitives_objectHashCode(this._forwarded_view0$_rule)) >>> 0; - }, - cloneCss$0() { - return A.ForwardedModuleView$0(this._forwarded_view0$_inner.cloneCss$0(), this._forwarded_view0$_rule, this.$ti._precomputed1); - }, - toString$0(_) { - return "forwarded " + this._forwarded_view0$_inner.toString$0(0); - }, - $isModule1: 1, - get$variables() { - return this.variables; - }, - get$variableNodes() { - return this.variableNodes; - }, - get$functions(receiver) { - return this.functions; - }, - get$mixins() { - return this.mixins; - } - }; - A.FunctionExpression0.prototype = { - get$nameSpan() { - if (this.namespace == null) - return A.SpanExtensions_initialIdentifier0(this.span); - return A.SpanExtensions_initialIdentifier0(A.FileSpanExtension_subspan(A.SpanExtensions_withoutInitialIdentifier0(this.span), 1, null)); - }, - accept$1$1(visitor) { - return visitor.visitFunctionExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.namespace; - t1 = t1 != null ? "" + (t1 + ".") : ""; - t1 += this.originalName + this.$arguments.toString$0(0); - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - get$span(receiver) { - return this.span; - } - }; - A.JSFunction0.prototype = {}; - A.SupportsFunction0.prototype = { - toInterpolation$0() { - var t4, t5, - t1 = new A.StringBuffer(""), - t2 = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), - t3 = this.name; - t2.addInterpolation$1(t3); - t4 = this.$arguments; - t5 = t4.span; - t3 = A.SpanExtensions_between(t3.span, t5); - t3 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t3.file._decodedChars, t3._file$_start, t3._end), 0, null); - t1._contents += t3; - t2.addInterpolation$1(t4); - t4 = this.span; - t5 = A.SpanExtensions_after(t4, t5); - t5 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t5.file._decodedChars, t5._file$_start, t5._end), 0, null); - t1._contents += t5; - return t2.interpolation$1(t4); - }, - withSpan$1(span) { - return new A.SupportsFunction0(this.name, this.$arguments, span); - }, - toString$0(_) { - return this.name.toString$0(0) + "(" + this.$arguments.toString$0(0) + ")"; - }, - $isAstNode0: 1, - $isSassNode: 1, - $isSupportsCondition: 1, - get$span(receiver) { - return this.span; - } - }; - A.functionClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassFunction", new A.functionClass__closure())); - A.JSClassExtension_injectSuperclass(t1._as(new A.SassFunction0(A.BuiltInCallable$function0("f", "", new A.functionClass__closure0(), null)).constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.functionClass__closure.prototype = { - call$3($self, signature, callback) { - var paren = B.JSString_methods.indexOf$1(signature, "("); - if (paren === -1 || !B.JSString_methods.endsWith$1(signature, ")")) - A.jsThrow(new self.Error('Invalid signature for new sass.SassFunction(): "' + signature + '"')); - return new A.SassFunction0(A.BuiltInCallable$function0(B.JSString_methods.substring$2(signature, 0, paren), B.JSString_methods.substring$2(signature, paren + 1, signature.length - 1), callback, null)); - }, - "call*": "call$3", - $requiredArgCount: 3, - $signature: 482 - }; - A.functionClass__closure0.prototype = { - call$1(_) { - return B.C__SassNull0; - }, - $signature: 3 - }; - A.SassFunction0.prototype = { - accept$1$1(visitor) { - var t1, t2; - if (!visitor._serialize0$_inspect) - A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " isn't a valid CSS value.", null)); - t1 = visitor._serialize0$_buffer; - t1.write$1(0, "get-function("); - t2 = this.callable; - visitor._serialize0$_visitQuotedString$1(t2.get$name(t2)); - t1.writeCharCode$1(41); - return null; - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertFunction$1($name) { - return this; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.SassFunction0 && this.callable.$eq(0, other.callable); - }, - get$hashCode(_) { - var t1 = this.callable; - return t1.get$hashCode(t1); - } - }; - A.FunctionRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitFunctionRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.children; - return "@function " + this.name + "(" + this.$arguments.toString$0(0) + ") {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; - } - }; - A.unifyComplex_closure0.prototype = { - call$1(complex) { - return complex.lineBreak; - }, - $signature: 20 - }; - A._weaveParents_closure3.prototype = { - call$2(group1, group2) { - var t1, unified; - if (B.C_ListEquality.equals$2(0, group1, group2)) - return group1; - if (A._complexIsParentSuperselector0(group1, group2)) - return group2; - if (A._complexIsParentSuperselector0(group2, group1)) - return group1; - if (!A._mustUnify0(group1, group2)) - return null; - t1 = this.span; - unified = A.unifyComplex0(A._setArrayType([A.ComplexSelector$0(B.List_empty14, group1, t1, false), A.ComplexSelector$0(B.List_empty14, group2, t1, false)], type$.JSArray_ComplexSelector_2), t1); - if (unified == null) - t1 = null; - else { - t1 = A.IterableExtension_get_singleOrNull(unified); - t1 = t1 == null ? null : t1.components; - } - return t1; - }, - $signature: 483 - }; - A._weaveParents_closure4.prototype = { - call$1(sequence) { - return A._complexIsParentSuperselector0(sequence.get$first(sequence), this.group); - }, - $signature: 243 - }; - A._weaveParents_closure5.prototype = { - call$1(sequence) { - return sequence.get$length(0) === 0; - }, - $signature: 243 - }; - A._weaveParents_closure6.prototype = { - call$1(choice) { - return J.get$isNotEmpty$asx(choice); - }, - $signature: 485 - }; - A._mustUnify_closure0.prototype = { - call$1(component) { - return B.JSArray_methods.any$1(component.selector.components, new A._mustUnify__closure0(this.uniqueSelectors)); - }, - $signature: 53 - }; - A._mustUnify__closure0.prototype = { - call$1(simple) { - var t1; - if (!(simple instanceof A.IDSelector0)) - t1 = simple instanceof A.PseudoSelector0 && !simple.isClass; - else - t1 = true; - return t1 && this.uniqueSelectors.contains$1(0, simple); - }, - $signature: 14 - }; - A.paths_closure0.prototype = { - call$2(paths, choice) { - var t1 = this.T; - t1 = J.expand$1$1$ax(choice, new A.paths__closure0(paths, t1), t1._eval$1("List<0>")); - return A.List_List$of(t1, true, t1.$ti._eval$1("Iterable.E")); - }, - $signature() { - return this.T._eval$1("List>(List>,List<0>)"); - } - }; - A.paths__closure0.prototype = { - call$1(option) { - var t1 = this.T; - return J.map$1$1$ax(this.paths, new A.paths___closure0(option, t1), t1._eval$1("List<0>")); - }, - $signature() { - return this.T._eval$1("Iterable>(0)"); - } - }; - A.paths___closure0.prototype = { - call$1(path) { - var t1 = A.List_List$of(path, true, this.T); - t1.push(this.option); - return t1; - }, - $signature() { - return this.T._eval$1("List<0>(List<0>)"); - } - }; - A.listIsSuperselector_closure0.prototype = { - call$1(complex1) { - return B.JSArray_methods.any$1(this.list1, new A.listIsSuperselector__closure0(complex1)); - }, - $signature: 20 - }; - A.listIsSuperselector__closure0.prototype = { - call$1(complex2) { - return complex2.isSuperselector$1(this.complex1); - }, - $signature: 20 - }; - A.complexIsSuperselector_closure1.prototype = { - call$1($parent) { - return $parent.combinators.length > 1; - }, - $signature: 53 - }; - A.complexIsSuperselector_closure2.prototype = { - call$1(component) { - return A._isSupercombinator0(this.combinator1, A.IterableExtension_get_firstOrNull(component.combinators)); - }, - $signature: 53 - }; - A._compatibleWithPreviousCombinator_closure0.prototype = { - call$1(component) { - var t1 = component.combinators, - t2 = A.IterableExtension_get_firstOrNull(t1); - if (!J.$eq$(t2 == null ? null : t2.value, B.Combinator_y180)) { - t1 = A.IterableExtension_get_firstOrNull(t1); - t1 = J.$eq$(t1 == null ? null : t1.value, B.Combinator_gRV0); - } else - t1 = true; - return t1; - }, - $signature: 53 - }; - A.compoundIsSuperselector_closure0.prototype = { - call$1(simple1) { - return B.JSArray_methods.any$1(this.compound2.components, simple1.get$isSuperselector()); - }, - $signature: 14 - }; - A._selectorPseudoIsSuperselector_closure6.prototype = { - call$1(selector2) { - return A.listIsSuperselector0(this.selector1.components, selector2.components); - }, - $signature: 71 - }; - A._selectorPseudoIsSuperselector_closure7.prototype = { - call$1(complex1) { - var t1, t2; - if (complex1.leadingCombinators.length === 0) { - t1 = A._setArrayType([], type$.JSArray_ComplexSelectorComponent_2); - t2 = this.parents; - if (t2 != null) - B.JSArray_methods.addAll$1(t1, t2); - t2 = this.compound2; - t1.push(new A.ComplexSelectorComponent0(t2, A.List_List$unmodifiable(B.List_empty14, type$.CssValue_Combinator_2), t2.span)); - t1 = A.complexIsSuperselector0(complex1.components, t1); - } else - t1 = false; - return t1; - }, - $signature: 20 - }; - A._selectorPseudoIsSuperselector_closure8.prototype = { - call$1(selector2) { - return A.listIsSuperselector0(this.selector1.components, selector2.components); - }, - $signature: 71 - }; - A._selectorPseudoIsSuperselector_closure9.prototype = { - call$1(selector2) { - return A.listIsSuperselector0(this.selector1.components, selector2.components); - }, - $signature: 71 - }; - A._selectorPseudoIsSuperselector_closure10.prototype = { - call$1(complex) { - if (complex.accept$1(B._IsBogusVisitor_true0)) - return false; - return B.JSArray_methods.any$1(this.compound2.components, new A._selectorPseudoIsSuperselector__closure0(complex, this.pseudo1)); - }, - $signature: 20 - }; - A._selectorPseudoIsSuperselector__closure0.prototype = { - call$1(simple2) { - var t1, selector2, _0_4, _this = this; - $label0$1: { - if (simple2 instanceof A.TypeSelector0) { - t1 = B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure1(simple2)); - break $label0$1; - } - if (simple2 instanceof A.IDSelector0) { - t1 = B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure2(simple2)); - break $label0$1; - } - selector2 = null; - t1 = false; - if (simple2 instanceof A.PseudoSelector0) { - _0_4 = simple2.selector; - if (_0_4 != null) { - selector2 = _0_4 == null ? type$.SelectorList_2._as(_0_4) : _0_4; - t1 = simple2.name === _this.pseudo1.name; - } - } - if (t1) { - t1 = A.listIsSuperselector0(selector2.components, A._setArrayType([_this.complex], type$.JSArray_ComplexSelector_2)); - break $label0$1; - } - t1 = false; - break $label0$1; - } - return t1; - }, - $signature: 14 - }; - A._selectorPseudoIsSuperselector___closure1.prototype = { - call$1(simple1) { - var t1; - if (simple1 instanceof A.TypeSelector0) { - t1 = this.simple2; - t1 = !(t1 instanceof A.TypeSelector0 && t1.name.$eq(0, simple1.name)); - } else - t1 = false; - return t1; - }, - $signature: 14 - }; - A._selectorPseudoIsSuperselector___closure2.prototype = { - call$1(simple1) { - var t1; - if (simple1 instanceof A.IDSelector0) { - t1 = this.simple2; - t1 = !(t1 instanceof A.IDSelector0 && t1.name === simple1.name); - } else - t1 = false; - return t1; - }, - $signature: 14 - }; - A._selectorPseudoIsSuperselector_closure11.prototype = { - call$1(selector2) { - var t1 = B.C_ListEquality.equals$2(0, this.selector1.components, selector2.components); - return t1; - }, - $signature: 71 - }; - A._selectorPseudoIsSuperselector_closure12.prototype = { - call$1(pseudo2) { - var t1, selector2; - if (!(pseudo2 instanceof A.PseudoSelector0)) - return false; - t1 = this.pseudo1; - if (pseudo2.name !== t1.name) - return false; - if (pseudo2.argument != t1.argument) - return false; - selector2 = pseudo2.selector; - if (selector2 == null) - return false; - return A.listIsSuperselector0(this.selector1.components, selector2.components); - }, - $signature: 14 - }; - A._selectorPseudoArgs_closure1.prototype = { - call$1(pseudo) { - return pseudo.isClass === this.isClass && pseudo.name === this.name; - }, - $signature: 487 - }; - A._selectorPseudoArgs_closure2.prototype = { - call$1(pseudo) { - return pseudo.selector; - }, - $signature: 488 - }; - A.globalFunctions_closure0.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return t1.$index($arguments, 0).get$isTruthy() ? t1.$index($arguments, 1) : t1.$index($arguments, 2); - }, - $signature: 3 - }; - A.GamutMapMethod0.prototype = { - toString$0(_) { - return this.name; - } - }; - A.HslColorSpace0.prototype = { - get$isBoundedInternal() { - return true; - }, - get$isLegacyInternal() { - return true; - }, - get$isPolarInternal() { - return true; - }, - convert$5(dest, hue, saturation, lightness, alpha) { - var t1 = hue == null, - scaledHue = B.JSNumber_methods.$mod((t1 ? 0 : hue) / 360, 1), - t2 = saturation == null, - scaledSaturation = (t2 ? 0 : saturation) / 100, - t3 = lightness == null, - scaledLightness = (t3 ? 0 : lightness) / 100, - m2 = scaledLightness <= 0.5 ? scaledLightness * (scaledSaturation + 1) : scaledLightness + scaledSaturation - scaledLightness * scaledSaturation, - m1 = scaledLightness * 2 - m2; - return B.SrgbColorSpace_AD40.convert$8$missingChroma$missingHue$missingLightness(dest, A.hueToRgb0(m1, m2, scaledHue + 0.3333333333333333), A.hueToRgb0(m1, m2, scaledHue), A.hueToRgb0(m1, m2, scaledHue - 0.3333333333333333), alpha, t2, t1, t3); - } - }; - A.HwbColorSpace0.prototype = { - get$isBoundedInternal() { - return true; - }, - get$isLegacyInternal() { - return true; - }, - get$isPolarInternal() { - return true; - }, - convert$5(dest, hue, whiteness, blackness, alpha) { - var t3, t1 = {}, - t2 = hue == null, - scaledHue = B.JSNumber_methods.$mod(t2 ? 0 : hue, 360) / 360, - scaledWhiteness = t1.scaledWhiteness = (whiteness == null ? 0 : whiteness) / 100, - scaledBlackness = (blackness == null ? 0 : blackness) / 100, - sum = scaledWhiteness + scaledBlackness; - if (sum > 1) { - t3 = t1.scaledWhiteness = scaledWhiteness / sum; - scaledBlackness /= sum; - } else - t3 = scaledWhiteness; - t3 = new A.HwbColorSpace_convert_toRgb0(t1, 1 - t3 - scaledBlackness); - return B.SrgbColorSpace_AD40.convert$6$missingHue(dest, t3.call$1(scaledHue + 0.3333333333333333), t3.call$1(scaledHue), t3.call$1(scaledHue - 0.3333333333333333), alpha, t2); - } - }; - A.HwbColorSpace_convert_toRgb0.prototype = { - call$1(hue) { - return A.hueToRgb0(0, 1, hue) * this.factor + this._box_0.scaledWhiteness; - }, - $signature: 15 - }; - A.IDSelector0.prototype = { - get$specificity() { - return A._asInt(Math.pow(A.SimpleSelector0.prototype.get$specificity.call(this), 2)); - }, - accept$1$1(visitor) { - return visitor.visitIDSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - addSuffix$1(suffix) { - return new A.IDSelector0(this.name + suffix, this.span); - }, - unify$1(compound) { - if (B.JSArray_methods.any$1(compound, new A.IDSelector_unify_closure0(this))) - return null; - return this.super$SimpleSelector$unify0(compound); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.IDSelector0 && other.name === this.name; - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this.name); - } - }; - A.IDSelector_unify_closure0.prototype = { - call$1(simple) { - var t1; - if (simple instanceof A.IDSelector0) - t1 = this.$this.name !== simple.name; - else - t1 = false; - return t1; - }, - $signature: 14 - }; - A.IfExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitIfExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "if" + this.$arguments.toString$0(0); - }, - get$span(receiver) { - return this.span; - } - }; - A.IfRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitIfRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var result = A.ListExtensions_mapIndexed(this.clauses, new A.IfRule_toString_closure0(), type$.IfClause_2, type$.String).join$1(0, " "), - lastClause = this.lastClause; - return lastClause != null ? result + (" " + lastClause.toString$0(0)) : result; - }, - get$span(receiver) { - return this.span; - } - }; - A.IfRule_toString_closure0.prototype = { - call$2(index, clause) { - var t1 = index === 0 ? "if" : "else if"; - return "@" + t1 + " " + clause.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(clause.children, " ") + "}"; - }, - $signature: 489 - }; - A.IfRuleClause0.prototype = {}; - A.IfRuleClause$__closure0.prototype = { - call$1(child) { - var t1; - $label0$0: { - if (child instanceof A.VariableDeclaration0 || child instanceof A.FunctionRule0 || child instanceof A.MixinRule0) { - t1 = true; - break $label0$0; - } - if (child instanceof A.ImportRule0) { - t1 = B.JSArray_methods.any$1(child.imports, new A.IfRuleClause$___closure0()); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - $signature: 244 - }; - A.IfRuleClause$___closure0.prototype = { - call$1($import) { - return $import instanceof A.DynamicImport0; - }, - $signature: 245 - }; - A.IfClause0.prototype = { - toString$0(_) { - return "@if " + this.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; - } - }; - A.ElseClause0.prototype = { - toString$0(_) { - return "@else {" + B.JSArray_methods.join$1(this.children, " ") + "}"; - } - }; - A.ImmutableList0.prototype = {}; - A.ImmutableMap0.prototype = {}; - A.immutableMapToDartMap_closure.prototype = { - call$3(value, key, _) { - this.dartMap.$indexSet(0, key, value); - }, - "call*": "call$3", - $requiredArgCount: 3, - $signature: 492 - }; - A.NodeImporter.prototype = { - loadRelative$3(url, previous, forImport) { - var t1, t2, _null = null; - if ($.$get$url().style.rootLength$1(url) > 0) { - if (!B.JSString_methods.startsWith$1(url, "/") && !B.JSString_methods.startsWith$1(url, "file:")) - return _null; - return this._tryPath$2($.$get$context().style.pathFromUri$1(A._parseUri(url)), forImport); - } - if ((previous == null ? _null : previous.get$scheme()) !== "file") - return _null; - t1 = $.$get$context(); - previous.toString; - t2 = t1.style; - return this._tryPath$2(A.join(t1.dirname$1(t2.pathFromUri$1(A._parseUri(previous))), t2.pathFromUri$1(A._parseUri(url)), _null), forImport); - }, - load$3(_, url, previous, forImport) { - var t1, t2, _i, _0_0, _this = this, - previousString = _this._previousToString$1(previous); - for (t1 = _this._implementation$_importers, t2 = t1.length, _i = 0; _i < t2; ++_i) { - _0_0 = A.wrapJSExceptions(new A.NodeImporter_load_closure(_this, t1[_i], forImport, url, previousString)); - if (_0_0 != null) - return _this._handleImportResult$4(url, previous, _0_0, forImport); - } - return _this._resolveLoadPathFromUrl$2(A.Uri_parse(url), forImport); - }, - loadAsync$3(url, previous, forImport) { - return this.loadAsync$body$NodeImporter(url, previous, forImport); - }, - loadAsync$body$NodeImporter(url, previous, forImport) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_2_String_and_String), - $async$returnValue, $async$self = this, t1, t2, _i, _0_0, previousString; - var $async$loadAsync$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - previousString = $async$self._previousToString$1(previous); - t1 = $async$self._implementation$_importers, t2 = t1.length, _i = 0; - case 3: - // for condition - if (!(_i < t2)) { - // goto after for - $async$goto = 5; - break; - } - $async$goto = 6; - return A._asyncAwait($async$self._callImporterAsync$4(t1[_i], url, previousString, forImport), $async$loadAsync$3); - case 6: - // returning from await. - _0_0 = $async$result; - if (_0_0 != null) { - $async$returnValue = $async$self._handleImportResult$4(url, previous, _0_0, forImport); - // goto return - $async$goto = 1; - break; - } - case 4: - // for update - ++_i; - // goto for condition - $async$goto = 3; - break; - case 5: - // after for - $async$returnValue = $async$self._resolveLoadPathFromUrl$2(A.Uri_parse(url), forImport); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$loadAsync$3, $async$completer); - }, - _previousToString$1(previous) { - var t1; - $label0$0: { - if (previous == null) { - t1 = "stdin"; - break $label0$0; - } - if ("file" === previous.get$scheme()) { - t1 = $.$get$context().style.pathFromUri$1(A._parseUri(previous)); - break $label0$0; - } - t1 = previous.toString$0(0); - break $label0$0; - } - return t1; - }, - _resolveLoadPathFromUrl$2(url, forImport) { - return url.get$scheme() === "" || url.get$scheme() === "file" ? this._resolveLoadPath$2($.$get$context().style.pathFromUri$1(A._parseUri(url)), forImport) : null; - }, - _resolveLoadPath$2(path, forImport) { - var t1, t2, _i, t3, _1_0, _null = null, - _0_0 = this._tryPath$2(A.absolute(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), forImport); - if (_0_0 != null) - return _0_0; - for (t1 = this._includePaths, t2 = t1.length, _i = 0; _i < t2; ++_i) { - t3 = A.join(t1[_i], path, _null); - _1_0 = this._tryPath$2($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), forImport); - if (_1_0 != null) - return _1_0; - } - return _null; - }, - _tryPath$2(path, forImport) { - var t1 = forImport ? A.inImportRule(new A.NodeImporter__tryPath_closure(path), type$.nullable_String) : A.resolveImportPath0(path); - return A.NullableExtension_andThen0(t1, new A.NodeImporter__tryPath_closure0()); - }, - _handleImportResult$4(url, previous, value, forImport) { - var t1, file, contents, t2, resolved; - if (value instanceof self.Error) - throw A.wrapException(value); - if (!type$.NodeImporterResult._is(value)) - return null; - t1 = J.getInterceptor$x(value); - file = t1.get$file(value); - contents = t1.get$contents(value); - t1 = contents == null; - t2 = !t1; - if (t2 && A._asString(new self.Function("value", "return typeof value").call$1(contents)) !== "string") - A.jsThrow(new A.ArgumentError(true, contents, "contents", "must be a string but was: " + A.jsType(contents))); - if (file == null) - return new A._Record_2(t1 ? "" : contents, url); - else if (t2) - return new A._Record_2(contents, $.$get$context().toUri$1(file).toString$0(0)); - else { - resolved = this.loadRelative$3($.$get$context().toUri$1(file).toString$0(0), previous, forImport); - if (resolved == null) - resolved = this._resolveLoadPath$2(file, forImport); - if (resolved != null) - return resolved; - throw A.wrapException("Can't find stylesheet to import."); - } - }, - _callImporterAsync$4(importer, url, previousString, forImport) { - return this._callImporterAsync$body$NodeImporter(importer, url, previousString, forImport); - }, - _callImporterAsync$body$NodeImporter(importer, url, previousString, forImport) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Object), - $async$returnValue, $async$self = this, t1, result; - var $async$_callImporterAsync$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = new A._Future($.Zone__current, type$._Future_Object); - result = A.wrapJSExceptions(new A.NodeImporter__callImporterAsync_closure($async$self, importer, forImport, url, previousString, new A._AsyncCompleter(t1, type$._AsyncCompleter_Object))); - $async$goto = A._asBool($.$get$_isUndefined().call$1(result)) ? 3 : 4; - break; - case 3: - // then - $async$goto = 5; - return A._asyncAwait(t1, $async$_callImporterAsync$4); - case 5: - // returning from await. - $async$returnValue = $async$result; - // goto return - $async$goto = 1; - break; - case 4: - // join - $async$returnValue = result; - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$_callImporterAsync$4, $async$completer); - }, - _renderContext$1(fromImport) { - var context = {options: type$.RenderContextOptions._as(this._implementation$_options), fromImport: fromImport}; - J.set$context$x(J.get$options$x(context), context); - return context; - } - }; - A.NodeImporter_load_closure.prototype = { - call$0() { - var _this = this; - return J.apply$2$x(_this.importer, _this.$this._renderContext$1(_this.forImport), A._setArrayType([_this.url, _this.previousString], type$.JSArray_Object)); - }, - $signature: 33 - }; - A.NodeImporter__tryPath_closure.prototype = { - call$0() { - return A.resolveImportPath0(this.path); - }, - $signature: 45 - }; - A.NodeImporter__tryPath_closure0.prototype = { - call$1(resolved) { - return new A._Record_2(A.readFile0(resolved), $.$get$context().toUri$1(resolved).toString$0(0)); - }, - $signature: 493 - }; - A.NodeImporter__callImporterAsync_closure.prototype = { - call$0() { - var _this = this; - return J.apply$2$x(_this.importer, _this.$this._renderContext$1(_this.forImport), A._setArrayType([_this.url, _this.previousString, A.allowInterop(_this.completer.get$complete())], type$.JSArray_Object)); - }, - $signature: 33 - }; - A.ModifiableCssImport0.prototype = { - accept$1$1(visitor) { - return visitor.visitCssImport$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - get$span(receiver) { - return this.span; - } - }; - A.ImportCache0.prototype = { - canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { - var t1, resolvedUrl, key, relativeResult, t2, t3, t4, t5, t6, cacheable, i, importer, perImporterKey, t7, _1_0, _1_2_isSet, result, _1_2, _2_0, _2_1, _2_5_isSet, _2_5, _2_3, _2_3_isSet, j, _this = this, _null = null; - if (A.isBrowser()) - t1 = (baseImporter == null || baseImporter instanceof A.NoOpImporter0) && _this._import_cache$_importers.length === 0; - else - t1 = false; - if (t1) - throw A.wrapException(string$.Custom); - if (baseImporter != null && url.get$scheme() === "") { - resolvedUrl = baseUrl == null ? _null : baseUrl.resolveUri$1(url); - if (resolvedUrl == null) - resolvedUrl = url; - key = new A._Record_3_forImport(baseImporter, resolvedUrl, forImport); - relativeResult = _this._import_cache$_perImporterCanonicalizeCache.putIfAbsent$2(key, new A.ImportCache_canonicalize_closure0(_this, baseImporter, resolvedUrl, baseUrl, forImport, key, url)); - if (relativeResult != null) - return relativeResult; - } - key = new A._Record_2_forImport(url, forImport); - t1 = _this._import_cache$_canonicalizeCache; - if (t1.containsKey$1(key)) - return t1.$index(0, key); - for (t2 = _this._import_cache$_importers, t3 = type$.Record_1_nullable_Object, t4 = _this._import_cache$_perImporterCanonicalizeCache, t5 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2, t6 = type$.Record_3_Importer_and_Uri_and_Uri_originalUrl_2, cacheable = true, i = 0; i < t2.length; ++i) { - importer = t2[i]; - perImporterKey = new A._Record_3_forImport(importer, url, forImport); - if (t4.containsKey$1(perImporterKey)) { - t7 = t4.$index(0, perImporterKey); - _1_0 = new A._Record_1(t7 == null ? t5._as(t7) : t7); - } else - _1_0 = _null; - _1_2_isSet = t3._is(_1_0); - result = _null; - if (_1_2_isSet) { - _1_2 = _1_0._0; - t7 = _1_2 != null; - if (t7) { - t6._as(_1_2); - result = _1_2; - } - } else { - _1_2 = _null; - t7 = false; - } - if (t7) - return result; - if (_1_2_isSet) - t7 = _1_2 == null; - else - t7 = false; - if (t7) - continue; - $label0$1: { - _2_0 = _this._import_cache$_canonicalize$4(importer, url, baseUrl, forImport); - _2_1 = _2_0._0; - _2_5_isSet = _2_1 != null; - _2_5 = _null; - _2_3 = _null; - t7 = false; - if (_2_5_isSet) { - result = _2_1 == null ? t6._as(_2_1) : _2_1; - _2_3 = _2_0._1; - t7 = _2_3; - _2_5 = t7; - t7 = t7 && cacheable; - } else - result = _null; - if (t7) { - t1.$indexSet(0, key, result); - return result; - } - if (_2_5_isSet) { - t7 = _2_5; - _2_3_isSet = _2_5_isSet; - } else { - _2_3 = _2_0._1; - t7 = _2_3; - _2_3_isSet = true; - } - t7 = t7 && !cacheable; - if (t7) { - t4.$indexSet(0, perImporterKey, _2_1); - if (_2_1 != null) - return _2_1; - break $label0$1; - } - t7 = false === (_2_3_isSet ? _2_3 : _2_0._1); - if (t7) { - if (cacheable) { - for (j = 0; j < i; ++j) - t4.$indexSet(0, new A._Record_3_forImport(t2[j], url, forImport), _null); - cacheable = false; - } - if (_2_1 != null) - return _2_1; - } - } - } - if (cacheable) - t1.$indexSet(0, key, _null); - return _null; - }, - _import_cache$_canonicalize$4(importer, url, baseUrl, forImport) { - var passContainingUrl, canonicalizeContext, t1, result, cacheable; - if (baseUrl != null) - passContainingUrl = url.get$scheme() === "" || importer.isNonCanonicalScheme$1(url.get$scheme()); - else - passContainingUrl = false; - canonicalizeContext = new A.CanonicalizeContext0(forImport, passContainingUrl ? baseUrl : null); - t1 = type$.nullable_Object; - result = A.runZoned(new A.ImportCache__canonicalize_closure0(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, canonicalizeContext], t1, t1), type$.nullable_Uri); - cacheable = !passContainingUrl || !canonicalizeContext._canonicalize_context$_wasContainingUrlAccessed; - if (result == null) - return new A._Record_2(null, cacheable); - if (result.get$scheme() !== "" && importer.isNonCanonicalScheme$1(result.get$scheme())) - throw A.wrapException("Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2c_whicu); - return new A._Record_2(new A._Record_3_originalUrl(importer, result, url), cacheable); - }, - importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { - return this._import_cache$_importCache.putIfAbsent$2(canonicalUrl, new A.ImportCache_importCanonical_closure0(this, importer, canonicalUrl, originalUrl)); - }, - humanize$1(canonicalUrl) { - var t1 = type$.NonNullsIterable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2; - t1 = A.NullableExtension_andThen0(A.minBy(new A.MappedIterable(new A.WhereIterable(new A.NonNullsIterable(this._import_cache$_canonicalizeCache.get$values(0), t1), new A.ImportCache_humanize_closure3(canonicalUrl), t1._eval$1("WhereIterable")), new A.ImportCache_humanize_closure4(), t1._eval$1("MappedIterable")), new A.ImportCache_humanize_closure5()), new A.ImportCache_humanize_closure6(canonicalUrl)); - return t1 == null ? canonicalUrl : t1; - }, - sourceMapUrl$1(_, canonicalUrl) { - var t1 = this._import_cache$_resultsCache.$index(0, canonicalUrl); - t1 = t1 == null ? null : t1.get$sourceMapUrl(0); - return t1 == null ? canonicalUrl : t1; - } - }; - A.ImportCache_canonicalize_closure0.prototype = { - call$0() { - var _this = this, - t1 = _this.$this, - t2 = _this.baseUrl, - _0_0 = t1._import_cache$_canonicalize$4(_this.baseImporter, _this.resolvedUrl, t2, _this.forImport); - if (t2 != null) - t1._import_cache$_nonCanonicalRelativeUrls.$indexSet(0, _this.key, _this.url); - return _0_0._0; - }, - $signature: 671 - }; - A.ImportCache__canonicalize_closure0.prototype = { - call$0() { - return this.importer.canonicalize$1(0, this.url); - }, - $signature: 145 - }; - A.ImportCache_importCanonical_closure0.prototype = { - call$0() { - var t2, t3, _this = this, - t1 = _this.canonicalUrl, - result = _this.importer.load$1(0, t1); - if (result == null) - return null; - _this.$this._import_cache$_resultsCache.$indexSet(0, t1, result); - t2 = result.contents; - t3 = result.syntax; - t1 = _this.originalUrl.resolveUri$1(t1); - return A.Stylesheet_Stylesheet$parse0(t2, t3, t1); - }, - $signature: 495 - }; - A.ImportCache_humanize_closure3.prototype = { - call$1(result) { - return result._1.$eq(0, this.canonicalUrl); - }, - $signature: 496 - }; - A.ImportCache_humanize_closure4.prototype = { - call$1(result) { - return result._2; - }, - $signature: 497 - }; - A.ImportCache_humanize_closure5.prototype = { - call$1(url) { - return url.get$path(url).length; - }, - $signature: 112 - }; - A.ImportCache_humanize_closure6.prototype = { - call$1(url) { - var t1 = $.$get$url(), - t2 = this.canonicalUrl; - return url.resolve$1(0, A.ParsedPath_ParsedPath$parse(t2.get$path(t2), t1.style).get$basename()); - }, - $signature: 47 - }; - A.ImportRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitImportRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "@import " + B.JSArray_methods.join$1(this.imports, ", ") + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.JSImporter.prototype = {}; - A.JSImporterResult.prototype = {}; - A.Importer0.prototype = { - isNonCanonicalScheme$1(scheme) { - return false; - } - }; - A.NodeImporterResult0.prototype = {}; - A.IncludeRule0.prototype = { - get$spanWithoutContent() { - var t2, t3, - t1 = this.span; - if (!(this.content == null)) { - t2 = t1.file; - t3 = this.$arguments.span; - t3 = A.SpanExtensions_trimRight0(A.SpanExtensions_trimLeft0(t2.span$2(0, A.FileLocation$_(t2, t1._file$_start).offset, t3.get$end(t3).offset))); - t1 = t3; - } - return t1; - }, - get$nameSpan() { - var startSpan, scanner, _null = null, - t1 = this.span, - t2 = t1._file$_start, - t3 = t1._end, - t4 = t1.file._decodedChars; - if (B.JSString_methods.startsWith$1(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4, t2, t3), 0, _null), "+")) - startSpan = A.SpanExtensions_trimLeft0(A.FileSpanExtension_subspan(t1, 1, _null)); - else { - scanner = A.StringScanner$(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4, t2, t3), 0, _null), _null, _null); - scanner.expectChar$1(64); - A._scanIdentifier0(scanner); - startSpan = A.SpanExtensions_trimLeft0(A.FileSpanExtension_subspan(t1, scanner._string_scanner$_position, _null)); - } - return A.SpanExtensions_initialIdentifier0(this.namespace != null ? A.FileSpanExtension_subspan(A.SpanExtensions_withoutInitialIdentifier0(startSpan), 1, _null) : startSpan); - }, - accept$1$1(visitor) { - return visitor.visitIncludeRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t2, _this = this, - t1 = _this.namespace; - t1 = t1 != null ? "@include " + (t1 + ".") : "@include "; - t1 += _this.name; - t2 = _this.$arguments; - if (!t2.get$isEmpty(0)) - t1 += "(" + t2.toString$0(0) + ")"; - t2 = _this.content; - t1 += t2 == null ? ";" : " " + t2.toString$0(0); - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - get$span(receiver) { - return this.span; - } - }; - A.InterpolatedFunctionExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitInterpolatedFunctionExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.name.toString$0(0) + this.$arguments.toString$0(0); - }, - get$span(receiver) { - return this.span; - } - }; - A.Interpolation0.prototype = { - get$asPlain() { - var _0_1, t1, _0_6_isSet, _0_6, _0_60, first, - _0_0 = this.contents; - $label0$0: { - _0_1 = _0_0.length; - if (_0_1 <= 0) { - t1 = ""; - break $label0$0; - } - _0_6_isSet = _0_1 === 1; - _0_6 = null; - if (_0_6_isSet) { - _0_60 = _0_0[0]; - t1 = _0_60; - _0_6 = t1; - t1 = typeof t1 == "string"; - } else - t1 = false; - if (t1) { - first = A._asString(_0_6_isSet ? _0_6 : _0_0[0]); - t1 = first; - break $label0$0; - } - t1 = null; - break $label0$0; - } - return t1; - }, - get$initialPlain() { - var _0_4_isSet, _0_4, _0_40, t1, first, - _0_0 = this.contents; - $label0$0: { - _0_4_isSet = _0_0.length >= 1; - _0_4 = null; - if (_0_4_isSet) { - _0_40 = _0_0[0]; - t1 = _0_40; - _0_4 = t1; - t1 = typeof t1 == "string"; - } else - t1 = false; - if (t1) { - first = A._asString(_0_4_isSet ? _0_4 : _0_0[0]); - t1 = first; - break $label0$0; - } - t1 = ""; - break $label0$0; - } - return t1; - }, - spanForElement$1(index) { - var t1, t2, t3, t4, _this = this; - $label0$0: { - if (typeof _this.contents[index] == "string") { - t1 = _this.span; - t2 = t1.get$file(t1); - if (index === 0) - t3 = t1.get$start(t1); - else { - t3 = _this.spans[index - 1]; - t3.toString; - t3 = J.get$end$z(t3); - } - t4 = _this.spans; - if (index === t4.length) - t1 = t1.get$end(t1); - else { - t1 = t4[index + 1]; - t1.toString; - t1 = J.get$start$z(t1); - } - t1 = t2.span$2(0, t3.offset, t1.offset); - break $label0$0; - } - t1 = _this.spans[index]; - t1.toString; - break $label0$0; - } - return t1; - }, - Interpolation$30(contents, spans, span) { - var t1, t2, t3, t4, i, t5, isString, _s5_ = "spans", - _s8_ = "contents"; - if (spans.length !== J.get$length$asx(contents)) - throw A.wrapException(A.ArgumentError$value(this.spans, _s5_, "Must be the same length as contents.")); - for (t1 = this.contents, t2 = t1.length, t3 = spans.length, t4 = this.spans, i = 0; i < t2; ++i) { - t5 = t1[i]; - isString = typeof t5 == "string"; - if (!isString && !(t5 instanceof A.Expression0)) - throw A.wrapException(A.ArgumentError$value(t1, _s8_, "May only contain Strings or Expressions.")); - else if (isString) { - if (i !== 0 && typeof t1[i - 1] == "string") - throw A.wrapException(A.ArgumentError$value(t1, _s8_, "May not contain adjacent Strings.")); - else if (i < t3 && t4[i] != null) - throw A.wrapException(A.ArgumentError$value(t4, _s5_, string$.May_no + i + ").")); - } else if (i >= t3 || t4[i] == null) - throw A.wrapException(A.ArgumentError$value(t4, _s5_, string$.Must_n + i + ").")); - } - }, - toString$0(_) { - var t1 = this.contents; - return new A.MappedListIterable(t1, new A.Interpolation_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); - }, - $isAstNode0: 1, - $isSassNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.Interpolation_toString_closure0.prototype = { - call$1(value) { - return typeof value == "string" ? value : "#{" + A.S(value) + "}"; - }, - $signature: 133 - }; - A.SupportsInterpolation0.prototype = { - toInterpolation$0() { - var t1 = this.span; - return A.Interpolation$0(A._setArrayType([this.expression], type$.JSArray_Object), A._setArrayType([t1], type$.JSArray_nullable_FileSpan), t1); - }, - withSpan$1(span) { - return new A.SupportsInterpolation0(this.expression, span); - }, - toString$0(_) { - return "#{" + this.expression.toString$0(0) + "}"; - }, - $isAstNode0: 1, - $isSassNode: 1, - $isSupportsCondition: 1, - get$span(receiver) { - return this.span; - } - }; - A.InterpolationBuffer0.prototype = { - writeCharCode$1(character) { - var t1 = this._interpolation_buffer0$_text, - t2 = A.Primitives_stringFromCharCode(character); - t1._contents += t2; - return null; - }, - add$2(_, expression, span) { - this._interpolation_buffer0$_flushText$0(); - this._interpolation_buffer0$_contents.push(expression); - this._interpolation_buffer0$_spans.push(span); - }, - addInterpolation$1(interpolation) { - var spansToAdd, _0_4_isSet, _0_4, _0_40, first, rest, t2, t3, _this = this, - toAdd = interpolation.contents, - t1 = toAdd.length; - if (t1 === 0) - return; - spansToAdd = interpolation.spans; - _0_4_isSet = t1 >= 1; - _0_4 = null; - if (_0_4_isSet) { - _0_40 = toAdd[0]; - t1 = _0_40; - _0_4 = t1; - t1 = typeof t1 == "string"; - } else - t1 = false; - if (t1) { - first = A._asString(_0_4_isSet ? _0_4 : toAdd[0]); - rest = B.JSArray_methods.sublist$1(toAdd, 1); - t1 = _this._interpolation_buffer0$_text; - t1._contents += first; - spansToAdd = A.SubListIterable$(spansToAdd, 1, null, A._arrayInstanceType(spansToAdd)._precomputed1); - toAdd = rest; - } - _this._interpolation_buffer0$_flushText$0(); - t1 = _this._interpolation_buffer0$_contents; - B.JSArray_methods.addAll$1(t1, toAdd); - t2 = _this._interpolation_buffer0$_spans; - B.JSArray_methods.addAll$1(t2, spansToAdd); - if (typeof B.JSArray_methods.get$last(t1) == "string") { - t3 = _this._interpolation_buffer0$_text; - t1 = A.S(t1.pop()); - t3._contents += t1; - t2.pop(); - } - }, - _interpolation_buffer0$_flushText$0() { - var t1 = this._interpolation_buffer0$_text, - t2 = t1._contents; - if (t2.length === 0) - return; - this._interpolation_buffer0$_contents.push(t2.charCodeAt(0) == 0 ? t2 : t2); - this._interpolation_buffer0$_spans.push(null); - t1._contents = ""; - }, - interpolation$1(span) { - var t1 = A.List_List$of(this._interpolation_buffer0$_contents, true, type$.Object), - t2 = this._interpolation_buffer0$_text, - t3 = t2._contents; - if (t3.length !== 0) - t1.push(t3.charCodeAt(0) == 0 ? t3 : t3); - t3 = A.List_List$of(this._interpolation_buffer0$_spans, true, type$.nullable_FileSpan); - if (t2._contents.length !== 0) - t3.push(null); - return A.Interpolation$0(t1, t3, span); - }, - toString$0(_) { - var t1, t2, _i, t3, element; - for (t1 = this._interpolation_buffer0$_contents, t2 = t1.length, _i = 0, t3 = ""; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - element = t1[_i]; - t3 = typeof element == "string" ? t3 + element : t3 + "#{" + A.S(element) + A.Primitives_stringFromCharCode(125); - } - t1 = t3 + this._interpolation_buffer0$_text.toString$0(0); - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - }; - A.InterpolationMap0.prototype = { - mapException$1(error) { - var t3, t4, _this = this, - target = error.get$span(error), - source = _this.mapSpan$1(target), - startIndex = _this._interpolation_map$_indexInContents$1(target.get$start(target)), - endIndex = _this._interpolation_map$_indexInContents$1(target.get$end(target)), - t1 = _this._interpolation_map$_interpolation.contents, - t2 = error._span_exception$_message; - if (!A.SubListIterable$(t1, startIndex, null, A._arrayInstanceType(t1)._precomputed1).take$1(0, endIndex - startIndex + 1).any$1(0, new A.InterpolationMap_mapException_closure0())) - return new A.SourceSpanFormatException(error.get$source(), t2, source); - else { - t1 = type$.SourceSpan; - t3 = type$.String; - t4 = A.LinkedHashMap_LinkedHashMap$_literal([target, "error in interpolated output"], t1, t3); - return new A.MultiSourceSpanFormatException(error.get$source(), "", A.ConstantMap_ConstantMap$from(t4, t1, t3), t2, source); - } - }, - mapSpan$1(target) { - var _0_10, t1, _0_2_isSet, _0_20, t2, start, end, _this = this, _null = null, - _0_1 = _this._interpolation_map$_mapLocation$1(target.get$start(target)), - _0_2 = _this._interpolation_map$_mapLocation$1(target.get$end(target)); - $label0$0: { - _0_10 = _0_1; - t1 = type$.FileSpan; - _0_2_isSet = t1._is(_0_1); - _0_20 = _null; - t2 = false; - if (_0_2_isSet) { - t1._as(_0_10); - _0_20 = _0_2; - t2 = t1._is(_0_2); - start = _0_10; - _0_1 = start; - } else { - start = _null; - _0_1 = _0_10; - } - if (t2) { - t1 = start.expand$1(0, t1._as(_0_2_isSet ? _0_20 : _0_2)); - break $label0$0; - } - t2 = false; - if (t1._is(_0_1)) { - if (_0_2_isSet) - t2 = _0_20; - else { - t2 = _0_2; - _0_20 = t2; - _0_2_isSet = true; - } - t2 = t2 instanceof A.FileLocation; - start = _0_1; - } else - start = _null; - if (t2) { - t1 = _0_2_isSet ? _0_20 : _0_2; - type$.FileLocation._as(t1); - t2 = _this._interpolation_map$_interpolation.span; - t1 = t2.get$file(t2).span$2(0, _this._interpolation_map$_expandInterpolationSpanLeft$1(start.get$start(start)), t1.offset); - break $label0$0; - } - t2 = false; - if (_0_1 instanceof A.FileLocation) { - if (_0_2_isSet) - t2 = _0_20; - else { - t2 = _0_2; - _0_20 = t2; - _0_2_isSet = true; - } - t2 = t1._is(t2); - start = _0_1; - } else - start = _null; - if (t2) { - end = t1._as(_0_2_isSet ? _0_20 : _0_2); - t1 = _this._interpolation_map$_interpolation.span; - t1 = t1.get$file(t1).span$2(0, start.offset, _this._interpolation_map$_expandInterpolationSpanRight$1(end.get$end(end))); - break $label0$0; - } - t1 = false; - if (_0_1 instanceof A.FileLocation) { - if (_0_2_isSet) - t1 = _0_20; - else { - t1 = _0_2; - _0_20 = t1; - _0_2_isSet = true; - } - t1 = t1 instanceof A.FileLocation; - start = _0_1; - } else - start = _null; - if (t1) { - t1 = _0_2_isSet ? _0_20 : _0_2; - type$.FileLocation._as(t1); - t2 = _this._interpolation_map$_interpolation.span; - t1 = t2.get$file(t2).span$2(0, start.offset, t1.offset); - break $label0$0; - } - t1 = A.throwExpression("[BUG] Unreachable"); - } - return t1; - }, - _interpolation_map$_mapLocation$1(target) { - var t3, previousLocation, _this = this, - index = _this._interpolation_map$_indexInContents$1(target), - t1 = _this._interpolation_map$_interpolation, - t2 = t1.contents, - _0_0 = t2[index]; - if (_0_0 instanceof A.Expression0) - return _0_0.get$span(_0_0); - t3 = index === 0; - t1 = t1.span; - if (t3) - previousLocation = t1.get$start(t1); - else { - t1 = t1.get$file(t1); - t2 = type$.Expression_2._as(t2[index - 1]); - t2 = t2.get$span(t2); - previousLocation = A.FileLocation$_(t1, _this._interpolation_map$_expandInterpolationSpanRight$1(t2.get$end(t2))); - } - t1 = t3 ? 0 : _this._interpolation_map$_targetLocations[index - 1].get$offset(); - return A.FileLocation$_(previousLocation.file, previousLocation.offset + (target.offset - t1)); - }, - _interpolation_map$_indexInContents$1(target) { - var t1, t2, t3, i; - for (t1 = this._interpolation_map$_targetLocations, t2 = t1.length, t3 = target.offset, i = 0; i < t2; ++i) - if (t3 < t1[i].get$offset()) - return i; - return this._interpolation_map$_interpolation.contents.length - 1; - }, - _interpolation_map$_expandInterpolationSpanLeft$1(start) { - var i0, prev, char, - source = start.file._decodedChars, - i = start.offset - 1; - for (; i >= 0;) { - i0 = i - 1; - prev = source[i]; - if (prev === 123) { - if (source[i0] === 35) { - i = i0; - break; - } - i = i0; - } else if (prev === 47) { - i = i0 - 1; - if (source[i0] === 42) - for (; true;) { - i0 = i - 1; - if (source[i] !== 42) { - i = i0; - continue; - } - i = i0; - do { - i0 = i - 1; - char = source[i]; - if (char === 42) { - i = i0; - continue; - } else - break; - } while (true); - if (char === 47) { - i = i0; - break; - } - i = i0; - } - } else - i = i0; - } - return i; - }, - _interpolation_map$_expandInterpolationSpanRight$1(end) { - var t1, i0, next, second, t2, char, - source = end.file._decodedChars, - i = end.offset; - for (t1 = source.length; i < t1;) { - i0 = i + 1; - next = source[i]; - if (next === 125) { - i = i0; - break; - } - if (next === 47) { - i = i0 + 1; - second = source[i0]; - if (second === 47) { - while (true) { - i0 = i + 1; - t2 = source[i]; - if (!!(t2 === 10 || t2 === 13 || t2 === 12)) - break; - i = i0; - } - i = i0; - } else if (second === 42) - for (; true;) { - i0 = i + 1; - if (source[i] !== 42) { - i = i0; - continue; - } - i = i0; - do { - i0 = i + 1; - char = source[i]; - if (char === 42) { - i = i0; - continue; - } else - break; - } while (true); - if (char === 47) { - i = i0; - break; - } - i = i0; - } - } else - i = i0; - } - return i; - } - }; - A.InterpolationMap_mapException_closure0.prototype = { - call$1($content) { - return $content instanceof A.Expression0; - }, - $signature: 67 - }; - A.InterpolationMethod0.prototype = { - toString$0(_) { - var t1 = this.hue; - t1 = t1 == null ? "" : " " + t1.toString$0(0) + " hue"; - return this.space.name + t1; - } - }; - A.HueInterpolationMethod0.prototype = { - _enumToString$0() { - return "HueInterpolationMethod." + this._name; - } - }; - A._realCasePath_helper0.prototype = { - call$1(path) { - var dirname = $.$get$context().dirname$1(path); - if (dirname === path) - return path; - return $._realCaseCache0.putIfAbsent$2(path, new A._realCasePath_helper_closure0(this, dirname, path)); - }, - $signature: 6 - }; - A._realCasePath_helper_closure0.prototype = { - call$0() { - var matches, t1, _0_0, match, exception, - realDirname = this.helper.call$1(this.dirname), - t2 = this.path, - basename = A.ParsedPath_ParsedPath$parse(t2, $.$get$context().style).get$basename(); - try { - matches = J.where$1$ax(A.listDir0(realDirname), new A._realCasePath_helper__closure0(basename)).toList$0(0); - t1 = null; - _0_0 = matches; - $label0$0: { - match = null; - if (J.get$length$asx(_0_0) === 1) { - match = J.$index$asx(_0_0, 0); - t1 = match; - break $label0$0; - } - t1 = A.join(realDirname, basename, null); - break $label0$0; - } - t1 = t1; - return t1; - } catch (exception) { - if (A.unwrapException(exception) instanceof A.FileSystemException0) - return t2; - else - throw exception; - } - }, - $signature: 30 - }; - A._realCasePath_helper__closure0.prototype = { - call$1(realPath) { - return A.equalsIgnoreCase0(A.ParsedPath_ParsedPath$parse(realPath, $.$get$context().style).get$basename(), this.basename); - }, - $signature: 5 - }; - A.IsCalculationSafeVisitor0.prototype = { - visitBinaryOperationExpression$1(_, node) { - var t1; - if (B.Set_mqKz0.contains$1(0, node.operator)) - t1 = node.left.accept$1(this) || node.right.accept$1(this); - else - t1 = false; - return t1; - }, - visitBooleanExpression$1(_, node) { - return false; - }, - visitColorExpression$1(_, node) { - return false; - }, - visitFunctionExpression$1(_, node) { - return true; - }, - visitInterpolatedFunctionExpression$1(_, node) { - return true; - }, - visitIfExpression$1(_, node) { - return true; - }, - visitListExpression$1(_, node) { - var t1 = false; - if (node.separator === B.ListSeparator_nbm0) - if (!node.hasBrackets) { - t1 = node.contents; - t1 = t1.length > 1 && B.JSArray_methods.every$1(t1, new A.IsCalculationSafeVisitor_visitListExpression_closure0(this)); - } - return t1; - }, - visitMapExpression$1(_, node) { - return false; - }, - visitNullExpression$1(_, node) { - return false; - }, - visitNumberExpression$1(_, node) { - return true; - }, - visitParenthesizedExpression$1(_, node) { - return node.expression.accept$1(this); - }, - visitSelectorExpression$1(_, node) { - return false; - }, - visitStringExpression$1(_, node) { - var text, t1, t2; - if (node.hasQuotes) - return false; - text = node.text.get$initialPlain(); - t1 = false; - if (!B.JSString_methods.startsWith$1(text, "!")) - if (!B.JSString_methods.startsWith$1(text, "#")) { - t2 = text.length; - if ((1 >= t2 ? null : text.charCodeAt(1)) !== 43) - t1 = (3 >= t2 ? null : text.charCodeAt(3)) !== 40; - } - return t1; - }, - visitSupportsExpression$1(_, node) { - return false; - }, - visitUnaryOperationExpression$1(_, node) { - return false; - }, - visitValueExpression$1(_, node) { - return false; - }, - visitVariableExpression$1(_, node) { - return true; - }, - $isExpressionVisitor: 1 - }; - A.IsCalculationSafeVisitor_visitListExpression_closure0.prototype = { - call$1(expression) { - return expression.accept$1(this.$this); - }, - $signature: 139 - }; - A.FileSystemException0.prototype = { - toString$0(_) { - var t1 = $.$get$context(); - return t1.prettyUri$1(t1.toUri$1(this.path)) + ": " + this.message; - }, - get$message(receiver) { - return this.message; - } - }; - A._readFile_closure0.prototype = { - call$0() { - return J.readFileSync$2$x(A.fs(), this.path, this.encoding); - }, - $signature: 61 - }; - A.fileExists_closure0.prototype = { - call$0() { - var error, systemError, exception, - t1 = this.path; - if (!J.existsSync$1$x(A.fs(), t1)) - return false; - try { - t1 = J.isFile$0$x(J.statSync$1$x(A.fs(), t1)); - return t1; - } catch (exception) { - error = A.unwrapException(exception); - systemError = type$.JsSystemError._as(error); - if (J.$eq$(J.get$code$x(systemError), "ENOENT")) - return false; - throw exception; - } - }, - $signature: 21 - }; - A.dirExists_closure0.prototype = { - call$0() { - var error, systemError, exception, - t1 = this.path; - if (!J.existsSync$1$x(A.fs(), t1)) - return false; - try { - t1 = J.isDirectory$0$x(J.statSync$1$x(A.fs(), t1)); - return t1; - } catch (exception) { - error = A.unwrapException(exception); - systemError = type$.JsSystemError._as(error); - if (J.$eq$(J.get$code$x(systemError), "ENOENT")) - return false; - throw exception; - } - }, - $signature: 21 - }; - A.listDir_closure0.prototype = { - call$0() { - var t1 = this.path; - if (!this.recursive) - return J.map$1$1$ax(J.readdirSync$1$x(A.fs(), t1), new A.listDir__closure1(t1), type$.String).super$Iterable$where(0, new A.listDir__closure2()); - else - return new A.listDir_closure_list0().call$1(t1); - }, - $signature: 150 - }; - A.listDir__closure1.prototype = { - call$1(child) { - return A.join(this.path, A._asString(child), null); - }, - $signature: 122 - }; - A.listDir__closure2.prototype = { - call$1(child) { - return !A.dirExists0(child); - }, - $signature: 5 - }; - A.listDir_closure_list0.prototype = { - call$1($parent) { - return J.expand$1$1$ax(J.readdirSync$1$x(A.fs(), $parent), new A.listDir__list_closure0($parent, this), type$.String); - }, - $signature: 151 - }; - A.listDir__list_closure0.prototype = { - call$1(child) { - var path = A.join(this.parent, A._asString(child), null); - return A.dirExists0(path) ? this.list.call$1(path) : A._setArrayType([path], type$.JSArray_String); - }, - $signature: 152 - }; - A.main_closure.prototype = { - call$2(_, __) { - }, - $signature: 498 - }; - A.main_closure0.prototype = { - call$2(_, __) { - }, - $signature: 499 - }; - A.JSToDartLogger.prototype = { - internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { - var t2, t3, t4, - t1 = this._node, - _0_0 = t1 == null ? null : J.get$warn$x(t1); - if (_0_0 != null) { - t1 = span == null ? type$.nullable_SourceSpan._as(self.undefined) : span; - t2 = J.toString$0$(trace); - t3 = deprecation == null; - t4 = $.$get$deprecations(); - _0_0.call$2(message, {deprecation: !t3, deprecationType: t4.$index(0, t3 ? null : deprecation.id), span: t1, stack: t2}); - } else - this._withAscii$1(new A.JSToDartLogger_internalWarn_closure(this, message, span, trace, deprecation)); - }, - debug$2(_, message, span) { - var t1 = this._node, - _0_0 = t1 == null ? null : J.get$debug$x(t1); - if (_0_0 != null) - _0_0.call$2(message, {span: span}); - else - this._withAscii$1(new A.JSToDartLogger_debug_closure(this, message, span)); - }, - _withAscii$1$1(callback) { - var t1, - wasAscii = $._glyphs === B.C_AsciiGlyphSet; - $._glyphs = this._ascii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; - try { - t1 = callback.call$0(); - return t1; - } finally { - $._glyphs = wasAscii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; - } - }, - _withAscii$1(callback) { - return this._withAscii$1$1(callback, type$.dynamic); - } - }; - A.JSToDartLogger_internalWarn_closure.prototype = { - call$0() { - var _this = this; - _this.$this._fallback.warn$4$deprecation$span$trace(0, _this.message, _this.deprecation != null, _this.span, _this.trace); - }, - $signature: 1 - }; - A.JSToDartLogger_debug_closure.prototype = { - call$0() { - return this.$this._fallback.debug$2(0, this.message, this.span); - }, - $signature: 0 - }; - A.ModifiableCssKeyframeBlock0.prototype = { - accept$1$1(visitor) { - return visitor.visitCssKeyframeBlock$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - equalsIgnoringChildren$1(other) { - return other instanceof A.ModifiableCssKeyframeBlock0 && B.C_ListEquality.equals$2(0, this.selector.value, other.selector.value); - }, - copyWithoutChildren$0() { - return A.ModifiableCssKeyframeBlock$0(this.selector, this.span); - }, - get$span(receiver) { - return this.span; - } - }; - A.KeyframeSelectorParser0.prototype = { - parse$0(_) { - return this.wrapSpanFormatException$1(new A.KeyframeSelectorParser_parse_closure0(this)); - }, - _keyframe_selector$_percentage$0() { - var $self, _0_0, - t1 = this.scanner, - t2 = t1.scanChar$1(43) ? "" + A.Primitives_stringFromCharCode(43) : "", - second = t1.peekChar$0(); - if (!(second != null && second >= 48 && second <= 57) && second !== 46) - t1.error$1(0, "Expected number."); - while (true) { - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - break; - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - } - if (t1.peekChar$0() === 46) { - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - while (true) { - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - break; - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - } - } - if (this.scanIdentChar$1(101)) { - t2 += A.Primitives_stringFromCharCode(101); - _0_0 = t1.peekChar$0(); - if (43 === _0_0 || 45 === _0_0) - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - t1.error$1(0, "Expected digit."); - do { - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - $self = t1.peekChar$0(); - } while ($self != null && $self >= 48 && $self <= 57); - } - t1.expectChar$1(37); - t2 += A.Primitives_stringFromCharCode(37); - return t2.charCodeAt(0) == 0 ? t2 : t2; - } - }; - A.KeyframeSelectorParser_parse_closure0.prototype = { - call$0() { - var selectors = A._setArrayType([], type$.JSArray_String), - t1 = this.$this, - t2 = t1.scanner; - do { - t1.whitespace$0(); - if (t1.lookingAtIdentifier$0()) - if (t1.scanIdentifier$1("from")) - selectors.push("from"); - else { - t1.expectIdentifier$2$name("to", '"to" or "from"'); - selectors.push("to"); - } - else - selectors.push(t1._keyframe_selector$_percentage$0()); - t1.whitespace$0(); - } while (t2.scanChar$1(44)); - t2.expectDone$0(); - return selectors; - }, - $signature: 119 - }; - A.LabColorSpace0.prototype = { - get$isBoundedInternal() { - return false; - }, - convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, missingChroma, missingHue) { - var powerlessAB, t1, missingLightness, f1, t2, t3, t4; - switch (dest) { - case B.LabColorSpace_IF20: - powerlessAB = lightness == null || A.fuzzyEquals0(lightness, 0); - t1 = a == null || powerlessAB ? null : a; - return A.SassColor$_forSpace0(B.LabColorSpace_IF20, lightness, t1, b == null || powerlessAB ? null : b, alpha, null); - case B.LchColorSpace_wv80: - return A.labToLch0(dest, lightness, a, b, alpha, false, false); - default: - missingLightness = lightness == null; - if (missingLightness) - lightness = 0; - f1 = (lightness + 16) / 116; - t1 = a == null; - t2 = this._lab$_convertFToXorZ$1((t1 ? 0 : a) / 500 + f1); - t3 = lightness > 8 ? Math.pow(f1, 3) : lightness / 903.2962962962963; - t4 = b == null; - return B.XyzD50ColorSpace_2No0.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, t2 * 0.9642956764295677, t3, this._lab$_convertFToXorZ$1(f1 - (t4 ? 0 : b) / 200) * 0.8251046025104602, alpha, t1, t4, missingChroma, missingHue, missingLightness); - } - }, - convert$5(dest, lightness, a, b, alpha) { - return this.convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, false, false); - }, - _lab$_convertFToXorZ$1(component) { - var cubed = Math.pow(component, 3) + 0; - return cubed > 0.008856451679035631 ? cubed : (116 * component - 16) / 903.2962962962963; - } - }; - A.LazyFileSpan0.prototype = { - get$span(_) { - var t1 = this._lazy_file_span0$_span; - return t1 == null ? this._lazy_file_span0$_span = this._lazy_file_span0$_builder.call$0() : t1; - }, - compareTo$1(_, other) { - return this.get$span(0).compareTo$1(0, other); - }, - get$context(_) { - var t1 = this.get$span(0); - return t1.get$context(t1); - }, - get$end(_) { - var t1 = this.get$span(0); - return t1.get$end(t1); - }, - expand$1(_, other) { - return this.get$span(0).expand$1(0, other); - }, - get$file(_) { - var t1 = this.get$span(0); - return t1.get$file(t1); - }, - highlight$1$color(color) { - return this.get$span(0).highlight$1$color(color); - }, - get$length(_) { - var t1 = this.get$span(0); - return t1.get$length(t1); - }, - message$2$color(_, message, color) { - return this.get$span(0).message$2$color(0, message, color); - }, - message$1(_, message) { - return this.message$2$color(0, message, null); - }, - get$sourceUrl(_) { - var t1 = this.get$span(0); - return t1.get$sourceUrl(t1); - }, - get$start(_) { - var t1 = this.get$span(0); - return t1.get$start(t1); - }, - get$text() { - return this.get$span(0).get$text(); - }, - $isComparable: 1, - $isFileSpan: 1, - $isSourceSpan: 1, - $isSourceSpanWithContext: 1 - }; - A.LchColorSpace0.prototype = { - get$isBoundedInternal() { - return false; - }, - get$isPolarInternal() { - return true; - }, - convert$5(dest, lightness, chroma, hue, alpha) { - var t1 = hue == null, - hueRadians = (t1 ? 0 : hue) * 3.141592653589793 / 180, - t2 = chroma == null, - t3 = t2 ? 0 : chroma, - t4 = Math.cos(hueRadians), - t5 = t2 ? 0 : chroma; - return B.LabColorSpace_IF20.convert$7$missingChroma$missingHue(dest, lightness, t3 * t4, t5 * Math.sin(hueRadians), alpha, t2, t1); - } - }; - A.render_closure.prototype = { - call$0() { - var error, exception; - try { - this.callback.call$2(null, A.renderSync(this.options)); - } catch (exception) { - error = A.unwrapException(exception); - this.callback.call$2(error, null); - } - return null; - }, - $signature: 1 - }; - A.render_closure0.prototype = { - call$1(result) { - this.callback.call$2(null, result); - }, - $signature: 500 - }; - A.render_closure1.prototype = { - call$2(error, stackTrace) { - var t2, t3, _null = null, - t1 = this.callback; - if (error instanceof A.SassException0) - t1.call$2(A._wrapException(error, stackTrace), _null); - else { - t2 = J.toString$0$(error); - t3 = A.getTrace0(error); - t1.call$2(A._newRenderError(t2, t3 == null ? stackTrace : t3, _null, _null, _null, 3), _null); - } - }, - $signature: 55 - }; - A._parseFunctions_closure.prototype = { - call$2(signature, callback) { - var _0_0, _this = this, t1 = {}, - t2 = _this.options, - context = {options: A._contextOptions(t2, _this.start)}; - J.set$context$x(J.get$options$x(context), context); - _0_0 = J.get$fiber$x(t2); - t1.fiber = null; - if (_0_0 != null) { - t1.fiber = _0_0; - _this.result.push(A.Callable_Callable$fromSignature(B.JSString_methods.trimLeft$0(signature), new A._parseFunctions__closure(t1, callback, context), false)); - } else { - t1 = _this.result; - if (!_this.asynch) - t1.push(A.Callable_Callable$fromSignature(B.JSString_methods.trimLeft$0(signature), new A._parseFunctions__closure0(callback, context), false)); - else - t1.push(A.AsyncCallable_AsyncCallable$fromSignature(B.JSString_methods.trimLeft$0(signature), new A._parseFunctions__closure1(callback, context), false)); - } - }, - $signature: 126 - }; - A._parseFunctions__closure.prototype = { - call$1($arguments) { - var result, - t1 = this._box_0, - currentFiber = J.get$current$x(t1.fiber), - t2 = type$.Object; - t2 = A.List_List$of(J.map$1$1$ax($arguments, A.value0__wrapValue$closure(), t2), true, t2); - t2.push(A.allowInterop(new A._parseFunctions___closure2(currentFiber))); - result = A.wrapJSExceptions(new A._parseFunctions___closure3(this.callback, this.context, t2)); - return A.unwrapValue(A._asBool($.$get$_isUndefined().call$1(result)) ? A.runZoned(new A._parseFunctions___closure4(t1), null, type$.nullable_Object) : result); - }, - $signature: 3 - }; - A._parseFunctions___closure2.prototype = { - call$1(result) { - A.scheduleMicrotask(new A._parseFunctions____closure(this.currentFiber, result)); - }, - call$0() { - return this.call$1(null); - }, - "call*": "call$1", - $requiredArgCount: 0, - $defaultValues() { - return [null]; - }, - $signature: 89 - }; - A._parseFunctions____closure.prototype = { - call$0() { - return J.run$1$x(this.currentFiber, this.result); - }, - $signature: 0 - }; - A._parseFunctions___closure3.prototype = { - call$0() { - return J.apply$2$x(type$.JSFunction._as(this.callback), this.context, this.jsArguments); - }, - $signature: 33 - }; - A._parseFunctions___closure4.prototype = { - call$0() { - return J.yield$0$x(this._box_0.fiber); - }, - $signature: 83 - }; - A._parseFunctions__closure0.prototype = { - call$1($arguments) { - return A.unwrapValue(A.wrapJSExceptions(new A._parseFunctions___closure1(this.callback, this.context, $arguments))); - }, - $signature: 3 - }; - A._parseFunctions___closure1.prototype = { - call$0() { - var t1 = type$.JSFunction._as(this.callback), - t2 = J.map$1$1$ax(this.$arguments, A.value0__wrapValue$closure(), type$.Object); - return J.apply$2$x(t1, this.context, A.List_List$of(t2, true, t2.$ti._eval$1("ListIterable.E"))); - }, - $signature: 33 - }; - A._parseFunctions__closure1.prototype = { - call$1($arguments) { - return this.$call$body$_parseFunctions__closure($arguments); - }, - $call$body$_parseFunctions__closure($arguments) { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), - $async$returnValue, $async$self = this, result, t1, t2, $async$temp1; - var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = new A._Future($.Zone__current, type$._Future_nullable_Object); - t2 = type$.Object; - t2 = A.List_List$of(J.map$1$1$ax($arguments, A.value0__wrapValue$closure(), t2), true, t2); - t2.push(A.allowInterop(new A._parseFunctions___closure(new A._AsyncCompleter(t1, type$._AsyncCompleter_nullable_Object)))); - result = A.wrapJSExceptions(new A._parseFunctions___closure0($async$self.callback, $async$self.context, t2)); - $async$temp1 = A; - $async$goto = A._asBool($.$get$_isUndefined().call$1(result)) ? 3 : 5; - break; - case 3: - // then - $async$goto = 6; - return A._asyncAwait(t1, $async$call$1); - case 6: - // returning from await. - // goto join - $async$goto = 4; - break; - case 5: - // else - $async$result = result; - case 4: - // join - $async$returnValue = $async$temp1.unwrapValue($async$result); - // goto return - $async$goto = 1; - break; - case 1: - // return - return A._asyncReturn($async$returnValue, $async$completer); - } - }); - return A._asyncStartSync($async$call$1, $async$completer); - }, - $signature: 92 - }; - A._parseFunctions___closure.prototype = { - call$1(result) { - return this.completer.complete$1(result); - }, - call$0() { - return this.call$1(null); - }, - "call*": "call$1", - $requiredArgCount: 0, - $defaultValues() { - return [null]; - }, - $signature: 226 - }; - A._parseFunctions___closure0.prototype = { - call$0() { - return J.apply$2$x(type$.JSFunction._as(this.callback), this.context, this.jsArguments); - }, - $signature: 33 - }; - A._parseImporter_closure.prototype = { - call$1(importer) { - return type$.JSFunction._as(A.allowInteropCaptureThis(new A._parseImporter__closure(this._box_0, importer))); - }, - $signature: 501 - }; - A._parseImporter__closure.prototype = { - call$4(thisArg, url, previous, _) { - var t1 = this._box_0, - result = J.apply$2$x(this.importer, thisArg, A._setArrayType([url, previous, A.allowInterop(new A._parseImporter___closure(J.get$current$x(t1.fiber)))], type$.JSArray_Object)); - if (A._asBool($.$get$_isUndefined().call$1(result))) - return A.runZoned(new A._parseImporter___closure0(t1), null, type$.Object); - return result; - }, - call$3(thisArg, url, previous) { - return this.call$4(thisArg, url, previous, null); - }, - "call*": "call$4", - $requiredArgCount: 3, - $defaultValues() { - return [null]; - }, - $signature: 502 - }; - A._parseImporter___closure.prototype = { - call$1(result) { - A.scheduleMicrotask(new A._parseImporter____closure(this.currentFiber, result)); - }, - $signature: 503 - }; - A._parseImporter____closure.prototype = { - call$0() { - return J.run$1$x(this.currentFiber, this.result); - }, - $signature: 0 - }; - A._parseImporter___closure0.prototype = { - call$0() { - return J.yield$0$x(this._box_0.fiber); - }, - $signature: 83 - }; - A.LimitedMapView0.prototype = { - get$keys(_) { - return this._limited_map_view0$_keys; - }, - get$length(_) { - return this._limited_map_view0$_keys._collection$_length; - }, - get$isEmpty(_) { - return this._limited_map_view0$_keys._collection$_length === 0; - }, - get$isNotEmpty(_) { - return this._limited_map_view0$_keys._collection$_length !== 0; - }, - $index(_, key) { - return this._limited_map_view0$_keys.contains$1(0, key) ? this._limited_map_view0$_map.$index(0, key) : null; - }, - containsKey$1(key) { - return this._limited_map_view0$_keys.contains$1(0, key); - }, - remove$1(_, key) { - return this._limited_map_view0$_keys.contains$1(0, key) ? this._limited_map_view0$_map.remove$1(0, key) : null; - } - }; - A.ListExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitListExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t2, t3, t4, t5, _this = this, - t1 = _this.hasBrackets; - if (t1) - t2 = "" + A.Primitives_stringFromCharCode(91); - else { - t2 = _this.contents.length; - if (t2 !== 0) - t2 = t2 === 1 && _this.separator === B.ListSeparator_ECn0; - else - t2 = true; - t2 = t2 ? "" + A.Primitives_stringFromCharCode(40) : ""; - } - t3 = _this.contents; - t4 = _this.separator === B.ListSeparator_ECn0; - t5 = t4 ? ", " : " "; - t5 = t2 + new A.MappedListIterable(t3, new A.ListExpression_toString_closure0(_this), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,String>")).join$1(0, t5); - if (t1) - t1 = t5 + A.Primitives_stringFromCharCode(93); - else { - t1 = t3.length; - if (t1 === 0) - t1 = t5 + A.Primitives_stringFromCharCode(41); - else - t1 = t1 === 1 && t4 ? t5 + ",)" : t5; - } - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _list3$_elementNeedsParens$1(expression) { - var childSeparator, t1, _0_13; - $label0$0: { - if (expression instanceof A.ListExpression0 && expression.contents.length >= 2 && !expression.hasBrackets) { - childSeparator = expression.separator; - t1 = this.separator === B.ListSeparator_ECn0 ? childSeparator === B.ListSeparator_ECn0 : childSeparator !== B.ListSeparator_undecided_null_undecided0; - break $label0$0; - } - if (expression instanceof A.UnaryOperationExpression0) { - _0_13 = expression.operator; - if (B.UnaryOperator_cLp0 !== _0_13) - t1 = B.UnaryOperator_AiQ0 === _0_13; - else - t1 = true; - } else - t1 = false; - if (t1) { - t1 = this.separator === B.ListSeparator_nbm0; - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - get$span(receiver) { - return this.span; - } - }; - A.ListExpression_toString_closure0.prototype = { - call$1(element) { - return this.$this._list3$_elementNeedsParens$1(element) ? "(" + element.toString$0(0) + ")" : element.toString$0(0); - }, - $signature: 113 - }; - A._length_closure2.prototype = { - call$1($arguments) { - return A.SassNumber_SassNumber0(J.$index$asx($arguments, 0).get$asList().length, null); - }, - $signature: 25 - }; - A._nth_closure0.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - list = t1.$index($arguments, 0), - index = t1.$index($arguments, 1); - return list.get$asList()[list.sassIndexToListIndex$2(index, "n")]; - }, - $signature: 3 - }; - A._setNth_closure0.prototype = { - call$1($arguments) { - var newList, - t1 = J.getInterceptor$asx($arguments), - list = t1.$index($arguments, 0), - index = t1.$index($arguments, 1), - value = t1.$index($arguments, 2); - t1 = list.get$asList(); - newList = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); - newList[list.sassIndexToListIndex$2(index, "n")] = value; - return list.withListContents$1(newList); - }, - $signature: 26 - }; - A._join_closure0.prototype = { - call$1($arguments) { - var _0_1, _0_4, _0_3, t2, t3, _0_40, separator, bracketed, _null = null, - t1 = J.getInterceptor$asx($arguments), - list1 = t1.$index($arguments, 0), - list2 = t1.$index($arguments, 1), - separatorParam = t1.$index($arguments, 2).assertString$1("separator"), - bracketedParam = t1.$index($arguments, 3), - _1_0 = separatorParam._string0$_text; - $label1$1: { - if ("auto" === _1_0) { - _0_1 = list1.get$separator(list1); - _0_4 = list2.get$separator(list2); - $label0$0: { - t1 = _null; - _0_3 = B.ListSeparator_undecided_null_undecided0 === _0_1; - t2 = _0_3; - if (t2) { - t3 = B.ListSeparator_undecided_null_undecided0 === _0_4; - _0_40 = _0_4; - } else { - _0_40 = _null; - t3 = false; - } - if (t3) { - t1 = B.ListSeparator_nbm0; - break $label0$0; - } - if (_0_3) - separator = t2 ? _0_40 : _0_4; - else - separator = t1; - if (!_0_3) - separator = _0_1; - t1 = separator; - break $label0$0; - } - break $label1$1; - } - if ("space" === _1_0) { - t1 = B.ListSeparator_nbm0; - break $label1$1; - } - if ("comma" === _1_0) { - t1 = B.ListSeparator_ECn0; - break $label1$1; - } - if ("slash" === _1_0) { - t1 = B.ListSeparator_cQA0; - break $label1$1; - } - t1 = A.throwExpression(A.SassScriptException$0(string$.x24separ, _null)); - } - bracketed = bracketedParam instanceof A.SassString0 && bracketedParam._string0$_text === "auto" ? list1.get$hasBrackets() : bracketedParam.get$isTruthy(); - t2 = A.List_List$of(list1.get$asList(), true, type$.Value_2); - B.JSArray_methods.addAll$1(t2, list2.get$asList()); - return A.SassList$0(t2, t1, bracketed); - }, - $signature: 26 - }; - A._append_closure2.prototype = { - call$1($arguments) { - var t2, - t1 = J.getInterceptor$asx($arguments), - list = t1.$index($arguments, 0), - value = t1.$index($arguments, 1), - _0_0 = t1.$index($arguments, 2).assertString$1("separator")._string0$_text; - $label0$0: { - if ("auto" === _0_0) { - t1 = list.get$separator(list) === B.ListSeparator_undecided_null_undecided0 ? B.ListSeparator_nbm0 : list.get$separator(list); - break $label0$0; - } - if ("space" === _0_0) { - t1 = B.ListSeparator_nbm0; - break $label0$0; - } - if ("comma" === _0_0) { - t1 = B.ListSeparator_ECn0; - break $label0$0; - } - if ("slash" === _0_0) { - t1 = B.ListSeparator_cQA0; - break $label0$0; - } - t1 = A.throwExpression(A.SassScriptException$0(string$.x24separ, null)); - } - t2 = A.List_List$of(list.get$asList(), true, type$.Value_2); - t2.push(value); - return list.withListContents$2$separator(t2, t1); - }, - $signature: 26 - }; - A._zip_closure0.prototype = { - call$1($arguments) { - var results, result, _box_0 = {}, - t1 = J.$index$asx($arguments, 0).get$asList(), - t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,List>"), - lists = A.List_List$of(new A.MappedListIterable(t1, new A._zip__closure2(), t2), true, t2._eval$1("ListIterable.E")); - if (lists.length === 0) - return B.SassList_bdS1; - _box_0.i = 0; - results = A._setArrayType([], type$.JSArray_SassList_2); - for (t1 = A._arrayInstanceType(lists)._eval$1("MappedListIterable<1,Value0>"), t2 = type$.Value_2; B.JSArray_methods.every$1(lists, new A._zip__closure3(_box_0));) { - result = A.List_List$from(new A.MappedListIterable(lists, new A._zip__closure4(_box_0), t1), false, t2); - result.fixed$length = Array; - result.immutable$list = Array; - results.push(new A.SassList0(result, B.ListSeparator_nbm0, false)); - ++_box_0.i; - } - return A.SassList$0(results, B.ListSeparator_ECn0, false); - }, - $signature: 26 - }; - A._zip__closure2.prototype = { - call$1(list) { - return list.get$asList(); - }, - $signature: 505 - }; - A._zip__closure3.prototype = { - call$1(list) { - return this._box_0.i !== J.get$length$asx(list); - }, - $signature: 506 - }; - A._zip__closure4.prototype = { - call$1(list) { - return J.$index$asx(list, this._box_0.i); - }, - $signature: 3 - }; - A._index_closure2.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - index = B.JSArray_methods.indexOf$1(t1.$index($arguments, 0).get$asList(), t1.$index($arguments, 1)); - return index === -1 ? B.C__SassNull0 : A.SassNumber_SassNumber0(index + 1, null); - }, - $signature: 3 - }; - A._separator_closure0.prototype = { - call$1($arguments) { - var t1, - _0_0 = J.get$separator$x(J.$index$asx($arguments, 0)); - $label0$0: { - if (B.ListSeparator_ECn0 === _0_0) { - t1 = new A.SassString0("comma", false); - break $label0$0; - } - if (B.ListSeparator_cQA0 === _0_0) { - t1 = new A.SassString0("slash", false); - break $label0$0; - } - t1 = new A.SassString0("space", false); - break $label0$0; - } - return t1; - }, - $signature: 17 - }; - A._isBracketed_closure0.prototype = { - call$1($arguments) { - return J.$index$asx($arguments, 0).get$hasBrackets() ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._slash_closure0.prototype = { - call$1($arguments) { - var list = J.$index$asx($arguments, 0).get$asList(); - if (list.length < 2) - throw A.wrapException(A.SassScriptException$0("At least two elements are required.", null)); - return A.SassList$0(list, B.ListSeparator_cQA0, false); - }, - $signature: 26 - }; - A.SelectorList0.prototype = { - get$asSassList() { - var t1 = this.components; - return A.SassList$0(new A.MappedListIterable(t1, new A.SelectorList_asSassList_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), B.ListSeparator_ECn0, false); - }, - accept$1$1(visitor) { - return visitor.visitSelectorList$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - unify$1(other) { - var t3, t4, t5, t6, _i, complex1, _i0, t7, - t1 = type$.JSArray_ComplexSelector_2, - t2 = A._setArrayType([], t1); - for (t3 = this.components, t4 = t3.length, t5 = other.components, t6 = t5.length, _i = 0; _i < t4; ++_i) { - complex1 = t3[_i]; - for (_i0 = 0; _i0 < t6; ++_i0) { - t7 = A.unifyComplex0(A._setArrayType([complex1, t5[_i0]], t1), complex1.span); - if (t7 != null) - B.JSArray_methods.addAll$1(t2, t7); - } - } - return t2.length === 0 ? null : A.SelectorList$0(t2, this.span); - }, - nestWithin$3$implicitParent$preserveParentSelectors($parent, implicitParent, preserveParentSelectors) { - var parentSelector, t1, _this = this; - if ($parent == null) { - if (preserveParentSelectors) - return _this; - parentSelector = B.C__ParentSelectorVisitor0.visitSelectorList$1(_this); - if (parentSelector == null) - return _this; - throw A.wrapException(A.SassException$0(string$.Top_les, parentSelector.span, null)); - } - t1 = _this.components; - return A.SelectorList$0(A.flattenVertically0(new A.MappedListIterable(t1, new A.SelectorList_nestWithin_closure0(_this, preserveParentSelectors, implicitParent, $parent), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Iterable>")), type$.ComplexSelector_2), _this.span); - }, - nestWithin$1($parent) { - return this.nestWithin$3$implicitParent$preserveParentSelectors($parent, true, false); - }, - nestWithin$2$implicitParent($parent, implicitParent) { - return this.nestWithin$3$implicitParent$preserveParentSelectors($parent, implicitParent, false); - }, - _list2$_nestWithinCompound$2(component, $parent) { - var resolvedSimples, parentSelector, error, stackTrace, t2, resolvedSimples0, exception, - t1 = component.selector, - simples = t1.components, - containsSelectorPseudo = J.any$1$ax(simples, new A.SelectorList__nestWithinCompound_closure2()); - if (!containsSelectorPseudo && !(J.get$first$ax(simples) instanceof A.ParentSelector0)) - return null; - if (containsSelectorPseudo) { - t2 = simples; - resolvedSimples0 = new A.MappedListIterable(t2, new A.SelectorList__nestWithinCompound_closure3($parent), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,SimpleSelector0>")); - } else - resolvedSimples0 = simples; - resolvedSimples = resolvedSimples0; - parentSelector = J.get$first$ax(simples); - try { - if (!(parentSelector instanceof A.ParentSelector0)) { - t2 = component.span; - t2 = A._setArrayType([A.ComplexSelector$0(B.List_empty14, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(resolvedSimples, t1.span), A.List_List$unmodifiable(component.combinators, type$.CssValue_Combinator_2), t2)], type$.JSArray_ComplexSelectorComponent_2), t2, false)], type$.JSArray_ComplexSelector_2); - return t2; - } else if (J.get$length$asx(simples) === 1 && parentSelector.suffix == null) { - t1 = $parent.withAdditionalCombinators$1(component.combinators); - return t1.components; - } - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace0(error.withAdditionalSpan$2(parentSelector.span, "parent selector"), error, stackTrace); - } else - throw exception; - } - t1 = $parent.components; - return new A.MappedListIterable(t1, new A.SelectorList__nestWithinCompound_closure4(parentSelector, resolvedSimples, component), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")); - }, - isSuperselector$1(other) { - return A.listIsSuperselector0(this.components, other.components); - }, - withAdditionalCombinators$1(combinators) { - var t1; - if (combinators.length === 0) - t1 = this; - else { - t1 = this.components; - t1 = A.SelectorList$0(new A.MappedListIterable(t1, new A.SelectorList_withAdditionalCombinators_closure0(combinators), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")), this.span); - } - return t1; - }, - get$hashCode(_) { - return B.C_ListEquality0.hash$1(this.components); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.SelectorList0 && B.C_ListEquality.equals$2(0, this.components, other.components); - } - }; - A.SelectorList_asSassList_closure0.prototype = { - call$1(complex) { - var t3, t4, _i, component, t5, visitor, t6, t7, _i0, _null = null, - t1 = type$.JSArray_Value_2, - t2 = A._setArrayType([], t1); - for (t3 = complex.leadingCombinators, t4 = t3.length, _i = 0; _i < t4; ++_i) - t2.push(new A.SassString0(J.toString$0$(t3[_i].value), false)); - for (t3 = complex.components, t4 = t3.length, _i = 0; _i < t4; ++_i) { - component = t3[_i]; - t5 = component.selector; - visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); - t5.accept$1(visitor); - t5 = A._setArrayType([new A.SassString0(visitor._serialize0$_buffer.toString$0(0), false)], t1); - for (t6 = component.combinators, t7 = t6.length, _i0 = 0; _i0 < t7; ++_i0) - t5.push(new A.SassString0(J.toString$0$(t6[_i0].value), false)); - B.JSArray_methods.addAll$1(t2, t5); - } - return A.SassList$0(t2, B.ListSeparator_nbm0, false); - }, - $signature: 507 - }; - A.SelectorList_nestWithin_closure0.prototype = { - call$1(complex) { - var t1, newComplexes, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, _i, component, resolved, i, t12, t13, t14, _i0, newComplex, t15, _this = this; - if (_this.preserveParentSelectors || complex.accept$1(B.C__ParentSelectorVisitor0) == null) { - if (!_this.implicitParent) - return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); - t1 = _this.parent.components; - return new A.MappedListIterable(t1, new A.SelectorList_nestWithin__closure1(complex), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")); - } - t1 = type$.JSArray_ComplexSelector_2; - newComplexes = A._setArrayType([], t1); - for (t2 = complex.components, t3 = t2.length, t4 = _this.$this, t5 = _this.parent, t6 = type$.ComplexSelector_2, t7 = complex.leadingCombinators, t8 = t7.length === 0, t9 = complex.span, t10 = type$.ComplexSelectorComponent_2, t11 = type$.JSArray_ComplexSelectorComponent_2, _i = 0; _i < t3; ++_i) { - component = t2[_i]; - resolved = t4._list2$_nestWithinCompound$2(component, t5); - if (resolved == null) - if (newComplexes.length === 0) - newComplexes.push(A.ComplexSelector$0(t7, A._setArrayType([component], t11), t9, false)); - else - for (i = 0; i < newComplexes.length; ++i) { - t12 = newComplexes[i]; - t13 = t12.leadingCombinators; - t14 = A.List_List$of(t12.components, true, t10); - t14.push(component); - t12 = t12.lineBreak; - newComplexes[i] = A.ComplexSelector$0(t13, t14, t9, t12); - } - else if (newComplexes.length === 0) - B.JSArray_methods.addAll$1(newComplexes, t8 ? resolved : J.map$1$1$ax(resolved, new A.SelectorList_nestWithin__closure2(complex), t6)); - else { - t12 = A._setArrayType([], t1); - for (t13 = newComplexes.length, t14 = J.getInterceptor$ax(resolved), _i0 = 0; _i0 < newComplexes.length; newComplexes.length === t13 || (0, A.throwConcurrentModificationError)(newComplexes), ++_i0) { - newComplex = newComplexes[_i0]; - for (t15 = t14.get$iterator(resolved); t15.moveNext$0();) - t12.push(newComplex.concatenate$2(t15.get$current(t15), newComplex.span)); - } - newComplexes = t12; - } - } - return newComplexes; - }, - $signature: 508 - }; - A.SelectorList_nestWithin__closure1.prototype = { - call$1(parentComplex) { - var t1 = this.complex; - return parentComplex.concatenate$2(t1, t1.span); - }, - $signature: 60 - }; - A.SelectorList_nestWithin__closure2.prototype = { - call$1(resolvedComplex) { - var t1 = resolvedComplex.leadingCombinators, - t2 = this.complex, - t3 = t2.leadingCombinators; - if (t1.length === 0) - t1 = t3; - else { - t3 = A.List_List$of(t3, true, type$.CssValue_Combinator_2); - B.JSArray_methods.addAll$1(t3, t1); - t1 = t3; - } - return A.ComplexSelector$0(t1, resolvedComplex.components, t2.span, resolvedComplex.lineBreak); - }, - $signature: 60 - }; - A.SelectorList__nestWithinCompound_closure2.prototype = { - call$1(simple) { - var selector; - if (!(simple instanceof A.PseudoSelector0)) - return false; - selector = simple.selector; - return selector != null && selector.accept$1(B.C__ParentSelectorVisitor0) != null; - }, - $signature: 14 - }; - A.SelectorList__nestWithinCompound_closure3.prototype = { - call$1(simple) { - var selector, t1, _0_2; - $label0$0: { - selector = null; - t1 = false; - if (simple instanceof A.PseudoSelector0) { - _0_2 = simple.selector; - if (_0_2 != null) { - selector = _0_2 == null ? type$.SelectorList_2._as(_0_2) : _0_2; - t1 = selector.accept$1(B.C__ParentSelectorVisitor0) != null; - } - } - if (t1) { - t1 = simple.withSelector$1(selector.nestWithin$2$implicitParent(this.parent, false)); - break $label0$0; - } - t1 = simple; - break $label0$0; - } - return t1; - }, - $signature: 509 - }; - A.SelectorList__nestWithinCompound_closure4.prototype = { - call$1(complex) { - var lastComponent, suffix, lastSimples, t1, t2, last, t3, error, stackTrace, t4, t5, t6, t7, exception, _this = this; - try { - t4 = complex.components; - lastComponent = B.JSArray_methods.get$last(t4); - if (lastComponent.combinators.length !== 0) { - t1 = A.MultiSpanSassException$0('Selector "' + complex.toString$0(0) + string$.x22x20can_, A.SpanExtensions_trimRight0(lastComponent.span), "outer selector", A.LinkedHashMap_LinkedHashMap$_literal([_this.parentSelector.span, "parent selector"], type$.FileSpan, type$.String), null); - throw A.wrapException(t1); - } - suffix = _this.parentSelector.suffix; - lastSimples = lastComponent.selector.components; - t5 = type$.SimpleSelector_2; - t6 = _this.resolvedSimples; - t7 = J.getInterceptor$ax(t6); - if (suffix == null) { - t1 = A.List_List$of(lastSimples, true, t5); - J.addAll$1$ax(t1, t7.skip$1(t6, 1)); - t1 = t1; - } else { - t2 = A.List_List$of(A.IterableExtension_get_exceptLast0(lastSimples), true, t5); - J.add$1$ax(t2, J.get$last$ax(lastSimples).addSuffix$1(suffix)); - J.addAll$1$ax(t2, t7.skip$1(t6, 1)); - t1 = t2; - } - t2 = _this.component; - last = A.CompoundSelector$0(t1, t2.selector.span); - t3 = A.List_List$of(A.IterableExtension_get_exceptLast0(t4), true, type$.ComplexSelectorComponent_2); - t4 = t2.span; - J.add$1$ax(t3, new A.ComplexSelectorComponent0(last, A.List_List$unmodifiable(t2.combinators, type$.CssValue_Combinator_2), t4)); - t4 = A.ComplexSelector$0(complex.leadingCombinators, t3, t4, complex.lineBreak); - return t4; - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.SassException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace0(error.withAdditionalSpan$2(_this.parentSelector.span, "parent selector"), error, stackTrace); - } else - throw exception; - } - }, - $signature: 60 - }; - A.SelectorList_withAdditionalCombinators_closure0.prototype = { - call$1(complex) { - return complex.withAdditionalCombinators$1(this.combinators); - }, - $signature: 60 - }; - A._ParentSelectorVisitor0.prototype = { - visitParentSelector$1(selector) { - return selector; - } - }; - A.__ParentSelectorVisitor_Object_SelectorSearchVisitor0.prototype = {}; - A.listClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassList", new A.listClass__closure())); - J.get$$prototype$x(jsClass).get = A.allowInteropCaptureThisNamed("get", new A.listClass__closure0()); - A.JSClassExtension_injectSuperclass(t1._as(B.SassList_k8F.constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.listClass__closure.prototype = { - call$3($self, contentsOrOptions, options) { - var contents, t1, t2; - if (self.immutable.isList(contentsOrOptions)) - contents = J.cast$1$0$ax(J.toArray$0$x(type$.ImmutableList._as(contentsOrOptions)), type$.Value_2); - else if (type$.List_dynamic._is(contentsOrOptions)) - contents = J.cast$1$0$ax(contentsOrOptions, type$.Value_2); - else { - contents = A._setArrayType([], type$.JSArray_Value_2); - type$.nullable__ConstructorOptions._as(contentsOrOptions); - options = contentsOrOptions; - } - t1 = options == null; - if (!t1) { - t2 = J.get$separator$x(options); - t2 = A._asBool($.$get$_isUndefined().call$1(t2)); - } else - t2 = true; - t2 = t2 ? B.ListSeparator_ECn0 : A.jsToDartSeparator(J.get$separator$x(options)); - t1 = t1 ? null : J.get$brackets$x(options); - return A.SassList$0(contents, t2, t1 == null ? false : t1); - }, - call$1($self) { - return this.call$3($self, null, null); - }, - call$2($self, contentsOrOptions) { - return this.call$3($self, contentsOrOptions, null); - }, - "call*": "call$3", - $requiredArgCount: 1, - $defaultValues() { - return [null, null]; - }, - $signature: 510 - }; - A.listClass__closure0.prototype = { - call$2($self, indexFloat) { - var index = B.JSNumber_methods.floor$0(indexFloat); - if (index < 0) - index = $self.get$asList().length + index; - if (index < 0 || index >= $self.get$asList().length) - return self.undefined; - return $self.get$asList()[index]; - }, - $signature: 246 - }; - A._ConstructorOptions.prototype = {}; - A._NodeSassList.prototype = {}; - A.legacyListClass_closure.prototype = { - call$4(thisArg, $length, commaSeparator, dartValue) { - var t1; - if (dartValue == null) { - $length.toString; - t1 = A.Iterable_Iterable$generate($length, new A.legacyListClass__closure(), type$.Value_2); - t1 = A.SassList$0(t1, commaSeparator !== false ? B.ListSeparator_ECn0 : B.ListSeparator_nbm0, false); - } else - t1 = dartValue; - J.set$dartValue$x(thisArg, t1); - }, - call$2(thisArg, $length) { - return this.call$4(thisArg, $length, null, null); - }, - call$3(thisArg, $length, commaSeparator) { - return this.call$4(thisArg, $length, commaSeparator, null); - }, - "call*": "call$4", - $requiredArgCount: 2, - $defaultValues() { - return [null, null]; - }, - $signature: 512 - }; - A.legacyListClass__closure.prototype = { - call$1(_) { - return B.C__SassNull0; - }, - $signature: 247 - }; - A.legacyListClass_closure0.prototype = { - call$2(thisArg, index) { - return A.wrapValue(J.get$dartValue$x(thisArg)._list1$_contents[index]); - }, - $signature: 514 - }; - A.legacyListClass_closure1.prototype = { - call$3(thisArg, index, value) { - var t1 = J.getInterceptor$x(thisArg), - t2 = t1.get$dartValue(thisArg)._list1$_contents, - mutable = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); - mutable[index] = A.unwrapValue(value); - t1.set$dartValue(thisArg, t1.get$dartValue(thisArg).withListContents$1(mutable)); - }, - "call*": "call$3", - $requiredArgCount: 3, - $signature: 515 - }; - A.legacyListClass_closure2.prototype = { - call$1(thisArg) { - return J.get$dartValue$x(thisArg)._list1$_separator === B.ListSeparator_ECn0; - }, - $signature: 516 - }; - A.legacyListClass_closure3.prototype = { - call$2(thisArg, isComma) { - var t1 = J.getInterceptor$x(thisArg), - t2 = t1.get$dartValue(thisArg)._list1$_contents, - t3 = isComma ? B.ListSeparator_ECn0 : B.ListSeparator_nbm0; - t1.set$dartValue(thisArg, A.SassList$0(t2, t3, t1.get$dartValue(thisArg)._list1$_hasBrackets)); - }, - $signature: 517 - }; - A.legacyListClass_closure4.prototype = { - call$1(thisArg) { - return J.get$dartValue$x(thisArg)._list1$_contents.length; - }, - $signature: 518 - }; - A.SassList0.prototype = { - get$separator(_) { - return this._list1$_separator; - }, - get$hasBrackets() { - return this._list1$_hasBrackets; - }, - get$isBlank() { - return !this._list1$_hasBrackets && B.JSArray_methods.every$1(this._list1$_contents, new A.SassList_isBlank_closure0()); - }, - get$asList() { - return this._list1$_contents; - }, - get$lengthAsList() { - return this._list1$_contents.length; - }, - SassList$3$brackets0(contents, _separator, brackets) { - if (this._list1$_separator === B.ListSeparator_undecided_null_undecided0 && this._list1$_contents.length > 1) - throw A.wrapException(A.ArgumentError$(string$.A_list, null)); - }, - toString$0(_) { - var t2, _this = this, - t1 = true; - if (!_this._list1$_hasBrackets) { - t2 = _this._list1$_contents.length; - if (t2 !== 0) - t1 = t2 === 1 && _this._list1$_separator === B.ListSeparator_ECn0; - } - if (t1) - return _this.super$Value$toString0(0); - return "(" + _this.super$Value$toString0(0) + ")"; - }, - accept$1$1(visitor) { - return visitor.visitList$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertMap$1($name) { - return this._list1$_contents.length === 0 ? B.SassMap_Map_empty0 : this.super$Value$assertMap0($name); - }, - tryMap$0() { - return this._list1$_contents.length === 0 ? B.SassMap_Map_empty0 : null; - }, - $eq(_, other) { - var t1, _this = this; - if (other == null) - return false; - if (!(other instanceof A.SassList0 && other._list1$_separator === _this._list1$_separator && other._list1$_hasBrackets === _this._list1$_hasBrackets && B.C_ListEquality.equals$2(0, other._list1$_contents, _this._list1$_contents))) - t1 = _this._list1$_contents.length === 0 && other instanceof A.SassMap0 && other.get$asList().length === 0; - else - t1 = true; - return t1; - }, - get$hashCode(_) { - return B.C_ListEquality0.hash$1(this._list1$_contents); - } - }; - A.SassList_isBlank_closure0.prototype = { - call$1(element) { - return element.get$isBlank(); - }, - $signature: 52 - }; - A.ListSeparator0.prototype = { - _enumToString$0() { - return "ListSeparator." + this._name; - }, - toString$0(_) { - return this._list1$_name; - } - }; - A.LmsColorSpace0.prototype = { - get$isBoundedInternal() { - return false; - }, - convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, long, medium, short, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { - var t1, longScaled, mediumScaled, shortScaled, lightness, t2, t3, _null = null; - switch (dest) { - case B.OklabColorSpace_yrt0: - t1 = long == null ? 0 : long; - longScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); - t1 = medium == null ? 0 : medium; - mediumScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); - t1 = short == null ? 0 : short; - shortScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); - t1 = $.$get$lmsToOklab0(); - lightness = t1[0] * longScaled + t1[1] * mediumScaled + t1[2] * shortScaled; - t2 = missingLightness ? _null : lightness; - t3 = missingA ? _null : t1[3] * longScaled + t1[4] * mediumScaled + t1[5] * shortScaled; - return A.SassColor$_forSpace0(B.OklabColorSpace_yrt0, t2, t3, missingB ? _null : t1[6] * longScaled + t1[7] * mediumScaled + t1[8] * shortScaled, alpha, _null); - case B.OklchColorSpace_li80: - t1 = long == null ? 0 : long; - longScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); - t1 = medium == null ? 0 : medium; - mediumScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); - t1 = short == null ? 0 : short; - shortScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); - if (missingLightness) - t1 = _null; - else { - t1 = $.$get$lmsToOklab0(); - t1 = t1[0] * longScaled + t1[1] * mediumScaled + t1[2] * shortScaled; - } - t2 = $.$get$lmsToOklab0(); - return A.labToLch0(dest, t1, t2[3] * longScaled + t2[4] * mediumScaled + t2[5] * shortScaled, t2[6] * longScaled + t2[7] * mediumScaled + t2[8] * shortScaled, alpha, missingChroma, missingHue); - default: - return this.super$ColorSpace$convertLinear0(dest, long, medium, short, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); - } - }, - convert$5(dest, long, medium, short, alpha) { - return this.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, long, medium, short, alpha, false, false, false, false, false); - }, - toLinear$1(channel) { - return channel; - }, - fromLinear$1(channel) { - return channel; - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { - t1 = $.$get$lmsToLinearSrgb0(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu0 === dest) { - t1 = $.$get$lmsToLinearA98Rgb0(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG0 === dest) { - t1 = $.$get$lmsToLinearProphotoRgb0(); - break $label0$0; - } - if (B.DisplayP3ColorSpace_NQk0 === dest) { - t1 = $.$get$lmsToLinearDisplayP30(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN0 === dest) { - t1 = $.$get$lmsToLinearRec20200(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA0 === dest) { - t1 = $.$get$lmsToXyzD650(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No0 === dest) { - t1 = $.$get$lmsToXyzD500(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix0(dest); - break $label0$0; - } - return t1; - } - }; - A.LocalMindeGamutMap0.prototype = { - map$1(_, color) { - var clipped, max, min, minInGamut, chroma, current, e, - originOklch = color.toSpace$1(B.OklchColorSpace_li80), - lightness = originOklch.channel0OrNull, - hue = originOklch.channel2OrNull, - alpha = originOklch.alphaOrNull, - t1 = lightness == null, - t2 = t1 ? 0 : lightness; - if (t2 > 1 || A.fuzzyEquals0(t2, 1)) { - t1 = color._color0$_space; - t2 = color.alphaOrNull; - return t1.get$isLegacyInternal() ? A.SassColor_SassColor$rgbInternal0(255, 255, 255, t2, null).toSpace$1(t1) : A.SassColor_SassColor$forSpaceInternal0(t1, 1, 1, 1, t2); - } else { - t1 = t1 ? 0 : lightness; - if (t1 < 0 || A.fuzzyEquals0(t1, 0)) - return A.SassColor_SassColor$rgbInternal0(0, 0, 0, color.alphaOrNull, null).toSpace$1(color._color0$_space); - } - clipped = color.get$isInGamut() ? color : B.ClipGamutMap_clip0.map$1(0, color); - if (this._local_minde$_deltaEOK$2(clipped, color) < 0.02) - return clipped; - max = originOklch.channel1OrNull; - if (max == null) - max = 0; - for (t1 = color._color0$_space, min = 0, minInGamut = true; max - min > 0.0001;) { - chroma = (min + max) / 2; - current = B.OklchColorSpace_li80.convert$5(t1, lightness, chroma, hue, alpha); - if (minInGamut && current.get$isInGamut()) { - min = chroma; - continue; - } - clipped = current.get$isInGamut() ? current : B.ClipGamutMap_clip0.map$1(0, current); - e = this._local_minde$_deltaEOK$2(clipped, current); - if (e < 0.02) { - if (0.02 - e < 0.0001) - return clipped; - min = chroma; - minInGamut = false; - } else - max = chroma; - } - return clipped; - }, - _local_minde$_deltaEOK$2(color1, color2) { - var t2, t3, t4, - lab1 = color1.toSpace$1(B.OklabColorSpace_yrt0), - lab2 = color2.toSpace$1(B.OklabColorSpace_yrt0), - t1 = lab1.channel0OrNull; - if (t1 == null) - t1 = 0; - t2 = lab2.channel0OrNull; - t1 = Math.pow(t1 - (t2 == null ? 0 : t2), 2); - t2 = lab1.channel1OrNull; - if (t2 == null) - t2 = 0; - t3 = lab2.channel1OrNull; - t2 = Math.pow(t2 - (t3 == null ? 0 : t3), 2); - t3 = lab1.channel2OrNull; - if (t3 == null) - t3 = 0; - t4 = lab2.channel2OrNull; - return Math.sqrt(t1 + t2 + Math.pow(t3 - (t4 == null ? 0 : t4), 2)); - } - }; - A.JSLogger.prototype = {}; - A.WarnOptions.prototype = {}; - A.DebugOptions.prototype = {}; - A.LoggerWithDeprecationType.prototype = { - warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { - this.internalWarn$4$deprecation$span$trace(message, deprecation ? B.Deprecation_JeE : null, span, trace); - }, - warn$1(_, message) { - return this.warn$4$deprecation$span$trace(0, message, false, null, null); - }, - warn$3$span$trace(_, message, span, trace) { - return this.warn$4$deprecation$span$trace(0, message, false, span, trace); - }, - warn$2$trace(_, message, trace) { - return this.warn$4$deprecation$span$trace(0, message, false, null, trace); - } - }; - A.LoudComment0.prototype = { - get$span(_) { - return this.text.span; - }, - accept$1$1(visitor) { - return visitor.visitLoudComment$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.text.toString$0(0); - } - }; - A.MapExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitMapExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t2, t3, _i, t4, key, value, - t1 = A._setArrayType([], type$.JSArray_String); - for (t2 = this.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { - t4 = t2[_i]; - key = t4._0; - value = t4._1; - t1.push(key.toString$0(0) + ": " + value.toString$0(0)); - } - return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; - }, - get$span(receiver) { - return this.span; - } - }; - A._get_closure0.prototype = { - call$1($arguments) { - var value, - t1 = J.getInterceptor$asx($arguments), - map = t1.$index($arguments, 0).assertMap$1("map"), - t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); - B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); - for (t1 = A.IterableExtension_get_exceptLast0(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { - value = map._map0$_contents.$index(0, t1.get$current(t1)); - if (!(value instanceof A.SassMap0)) - return B.C__SassNull0; - } - t1 = map._map0$_contents.$index(0, B.JSArray_methods.get$last(t2)); - return t1 == null ? B.C__SassNull0 : t1; - }, - $signature: 3 - }; - A._set_closure1.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return A._modify0(t1.$index($arguments, 0).assertMap$1("map"), A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2), new A._set__closure2($arguments), true); - }, - $signature: 3 - }; - A._set__closure2.prototype = { - call$1(_) { - return J.$index$asx(this.$arguments, 2); - }, - $signature: 41 - }; - A._set_closure2.prototype = { - call$1($arguments) { - var keys, t3, t1 = {}, - t2 = J.getInterceptor$asx($arguments), - map = t2.$index($arguments, 0).assertMap$1("map"), - _0_0 = t2.$index($arguments, 1).get$asList(), - _0_1 = _0_0.length; - if (_0_1 <= 0) - throw A.wrapException(A.SassScriptException$0("Expected $args to contain a key.", null)); - if (_0_1 === 1) - throw A.wrapException(A.SassScriptException$0("Expected $args to contain a value.", null)); - keys = t1.value = null; - t2 = _0_1 >= 1; - if (t2) { - t3 = _0_1 - 1; - keys = B.JSArray_methods.sublist$2(_0_0, 0, t3); - t1.value = _0_0[t3]; - } - if (t2) - return A._modify0(map, keys, new A._set__closure1(t1), true); - throw A.wrapException("[BUG] Unreachable code"); - }, - $signature: 3 - }; - A._set__closure1.prototype = { - call$1(_) { - return this._box_0.value; - }, - $signature: 41 - }; - A._merge_closure1.prototype = { - call$1($arguments) { - var t2, - t1 = J.getInterceptor$asx($arguments), - map1 = t1.$index($arguments, 0).assertMap$1("map1"), - map2 = t1.$index($arguments, 1).assertMap$1("map2"); - t1 = type$.Value_2; - t2 = A.LinkedHashMap_LinkedHashMap$of(map1._map0$_contents, t1, t1); - t2.addAll$1(0, map2._map0$_contents); - return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 34 - }; - A._merge_closure2.prototype = { - call$1($arguments) { - var last, t2, keys, _null = null, - t1 = J.getInterceptor$asx($arguments), - map1 = t1.$index($arguments, 0).assertMap$1("map1"), - _0_0 = t1.$index($arguments, 1).get$asList(), - _0_1 = _0_0.length; - if (_0_1 <= 0) - throw A.wrapException(A.SassScriptException$0("Expected $args to contain a key.", _null)); - if (_0_1 === 1) - throw A.wrapException(A.SassScriptException$0("Expected $args to contain a map.", _null)); - t1 = _0_1 >= 1; - last = _null; - if (t1) { - t2 = _0_1 - 1; - keys = B.JSArray_methods.sublist$2(_0_0, 0, t2); - last = _0_0[t2]; - } else - keys = _null; - if (t1) - return A._modify0(map1, keys, new A._merge__closure0(last.assertMap$1("map2")), true); - throw A.wrapException("[BUG] Unreachable code"); - }, - $signature: 3 - }; - A._merge__closure0.prototype = { - call$1(oldValue) { - var t1, t2, - nestedMap = oldValue.tryMap$0(); - if (nestedMap == null) - return this.map2; - t1 = type$.Value_2; - t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map0$_contents, t1, t1); - t2.addAll$1(0, this.map2._map0$_contents); - return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - }, - $signature: 519 - }; - A._deepMerge_closure0.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return A._deepMergeImpl0(t1.$index($arguments, 0).assertMap$1("map1"), t1.$index($arguments, 1).assertMap$1("map2")); - }, - $signature: 34 - }; - A._deepRemove_closure0.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - map = t1.$index($arguments, 0).assertMap$1("map"), - t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); - B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); - return A._modify0(map, A.IterableExtension_get_exceptLast0(t2), new A._deepRemove__closure0(t2), false); - }, - $signature: 3 - }; - A._deepRemove__closure0.prototype = { - call$1(value) { - var t1, nestedMap, t2, - _0_0 = value.tryMap$0(); - if (_0_0 != null) { - t1 = _0_0._map0$_contents.containsKey$1(B.JSArray_methods.get$last(this.keys)); - nestedMap = _0_0; - } else { - nestedMap = null; - t1 = false; - } - if (t1) { - t1 = type$.Value_2; - t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map0$_contents, t1, t1); - t2.remove$1(0, B.JSArray_methods.get$last(this.keys)); - return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - } - return value; - }, - $signature: 41 - }; - A._remove_closure1.prototype = { - call$1($arguments) { - return J.$index$asx($arguments, 0).assertMap$1("map"); - }, - $signature: 34 - }; - A._remove_closure2.prototype = { - call$1($arguments) { - var mutableMap, t3, _i, - t1 = J.getInterceptor$asx($arguments), - map = t1.$index($arguments, 0).assertMap$1("map"), - t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); - B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); - t1 = type$.Value_2; - mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map0$_contents, t1, t1); - for (t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) - mutableMap.remove$1(0, t2[_i]); - return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); - }, - $signature: 34 - }; - A._keys_closure0.prototype = { - call$1($arguments) { - var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map0$_contents; - return A.SassList$0(t1.get$keys(t1), B.ListSeparator_ECn0, false); - }, - $signature: 26 - }; - A._values_closure0.prototype = { - call$1($arguments) { - var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map0$_contents; - return A.SassList$0(t1.get$values(t1), B.ListSeparator_ECn0, false); - }, - $signature: 26 - }; - A._hasKey_closure0.prototype = { - call$1($arguments) { - var value, - t1 = J.getInterceptor$asx($arguments), - map = t1.$index($arguments, 0).assertMap$1("map"), - t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); - B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); - for (t1 = A.IterableExtension_get_exceptLast0(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { - value = map._map0$_contents.$index(0, t1.get$current(t1)); - if (!(value instanceof A.SassMap0)) - return B.SassBoolean_false0; - } - return map._map0$_contents.containsKey$1(B.JSArray_methods.get$last(t2)) ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._modify_modifyNestedMap0.prototype = { - call$1(map) { - var nestedMap, _this = this, - t1 = type$.Value_2, - mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map0$_contents, t1, t1), - t2 = _this.keyIterator, - key = t2.get$current(t2); - if (!t2.moveNext$0()) { - t2 = mutableMap.$index(0, key); - if (t2 == null) - t2 = B.C__SassNull0; - mutableMap.$indexSet(0, key, _this.modify.call$1(t2)); - return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); - } - t2 = mutableMap.$index(0, key); - nestedMap = t2 == null ? null : t2.tryMap$0(); - t2 = nestedMap == null; - if (t2 && !_this.addNesting) - return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); - mutableMap.$indexSet(0, key, _this.call$1(t2 ? B.SassMap_Map_empty0 : nestedMap)); - return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); - }, - $signature: 520 - }; - A.MapExtensions_get_pairs_closure0.prototype = { - call$1(e) { - return new A._Record_2(e.key, e.value); - }, - $signature() { - return this.K._eval$1("@<0>")._bind$1(this.V)._eval$1("+(1,2)(MapEntry<1,2>)"); - } - }; - A.mapClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassMap", new A.mapClass__closure())), - t2 = J.getInterceptor$x(jsClass); - A.defineGetter(t2.get$$prototype(jsClass), "contents", new A.mapClass__closure0(), null); - t2.get$$prototype(jsClass).get = A.allowInteropCaptureThisNamed("get", new A.mapClass__closure1()); - A.JSClassExtension_injectSuperclass(t1._as(B.SassMap_Map_empty0.constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.mapClass__closure.prototype = { - call$2($self, contents) { - var t1; - if (contents == null) - t1 = B.SassMap_Map_empty0; - else { - t1 = type$.Value_2; - t1 = new A.SassMap0(A.ConstantMap_ConstantMap$from(A.immutableMapToDartMap(contents).cast$2$0(0, t1, t1), t1, t1)); - } - return t1; - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 521 - }; - A.mapClass__closure0.prototype = { - call$1($self) { - return A.dartMapToImmutableMap($self._map0$_contents); - }, - $signature: 522 - }; - A.mapClass__closure1.prototype = { - call$2($self, indexOrKey) { - var index, t1, _0_0; - if (typeof indexOrKey == "number") { - index = B.JSNumber_methods.floor$0(indexOrKey); - if (index < 0) { - t1 = $self._map0$_contents; - index = t1.get$length(t1) + index; - } - if (index >= 0) { - t1 = $self._map0$_contents; - t1 = index >= t1.get$length(t1); - } else - t1 = true; - if (t1) - return self.undefined; - t1 = type$.Value_2; - _0_0 = A.MapExtensions_get_pairs0($self._map0$_contents, t1, t1).elementAt$1(0, index); - return A.SassList$0(A._setArrayType([_0_0._0, _0_0._1], type$.JSArray_Value_2), B.ListSeparator_nbm0, false); - } else { - t1 = $self._map0$_contents.$index(0, indexOrKey); - return t1 == null ? self.undefined : t1; - } - }, - $signature: 523 - }; - A._NodeSassMap.prototype = {}; - A.legacyMapClass_closure.prototype = { - call$3(thisArg, $length, dartValue) { - var t1, t2, t3, map; - if (dartValue == null) { - $length.toString; - t1 = type$.Value_2; - t2 = A.Iterable_Iterable$generate($length, new A.legacyMapClass__closure(), t1); - t3 = A.Iterable_Iterable$generate($length, new A.legacyMapClass__closure0(), t1); - map = A.LinkedHashMap_LinkedHashMap(null, null, null, t1, t1); - A.MapBase__fillMapWithIterables(map, t2, t3); - t1 = new A.SassMap0(A.ConstantMap_ConstantMap$from(map, t1, t1)); - } else - t1 = dartValue; - J.set$dartValue$x(thisArg, t1); - }, - call$2(thisArg, $length) { - return this.call$3(thisArg, $length, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 524 - }; - A.legacyMapClass__closure.prototype = { - call$1(i) { - return A.SassNumber_SassNumber0(i, null); - }, - $signature: 525 - }; - A.legacyMapClass__closure0.prototype = { - call$1(_) { - return B.C__SassNull0; - }, - $signature: 247 - }; - A.legacyMapClass_closure0.prototype = { - call$2(thisArg, index) { - var t1 = J.get$dartValue$x(thisArg)._map0$_contents; - return A.wrapValue(J.elementAt$1$ax(t1.get$keys(t1), index)); - }, - $signature: 248 - }; - A.legacyMapClass_closure1.prototype = { - call$2(thisArg, index) { - var t1 = J.get$dartValue$x(thisArg)._map0$_contents; - return A.wrapValue(t1.get$values(t1).elementAt$1(0, index)); - }, - $signature: 248 - }; - A.legacyMapClass_closure2.prototype = { - call$1(thisArg) { - var t1 = J.get$dartValue$x(thisArg)._map0$_contents; - return t1.get$length(t1); - }, - $signature: 527 - }; - A.legacyMapClass_closure3.prototype = { - call$3(thisArg, index, key) { - var newKey, t2, newMap, t3, i, t4, oldKey, oldValue, - t1 = J.getInterceptor$x(thisArg), - oldMap = t1.get$dartValue(thisArg)._map0$_contents, - $length = oldMap.get$length(oldMap); - A.IndexError_check(index, $length, oldMap, null, "index"); - newKey = A.unwrapValue(key); - t2 = type$.Value_2; - newMap = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); - for (t3 = A.MapExtensions_get_pairs0(t1.get$dartValue(thisArg)._map0$_contents, t2, t2), t3 = t3.get$iterator(t3), i = 0; t3.moveNext$0();) { - t4 = t3.get$current(t3); - oldKey = t4._0; - oldValue = t4._1; - if (i === index) - newMap.$indexSet(0, newKey, oldValue); - else { - if (newKey.$eq(0, oldKey)) - throw A.wrapException(A.ArgumentError$value(key, "key", "is already in the map")); - newMap.$indexSet(0, oldKey, oldValue); - } - ++i; - } - t1.set$dartValue(thisArg, new A.SassMap0(A.ConstantMap_ConstantMap$from(newMap, t2, t2))); - }, - "call*": "call$3", - $requiredArgCount: 3, - $signature: 249 - }; - A.legacyMapClass_closure4.prototype = { - call$3(thisArg, index, value) { - var t3, - t1 = J.getInterceptor$x(thisArg), - t2 = t1.get$dartValue(thisArg)._map0$_contents, - key = J.elementAt$1$ax(t2.get$keys(t2), index); - t2 = type$.Value_2; - t3 = A.LinkedHashMap_LinkedHashMap$of(t1.get$dartValue(thisArg)._map0$_contents, t2, t2); - t3.$indexSet(0, key, A.unwrapValue(value)); - t1.set$dartValue(thisArg, new A.SassMap0(A.ConstantMap_ConstantMap$from(t3, t2, t2))); - }, - "call*": "call$3", - $requiredArgCount: 3, - $signature: 249 - }; - A.SassMap0.prototype = { - get$separator(_) { - var t1 = this._map0$_contents; - return t1.get$isEmpty(t1) ? B.ListSeparator_undecided_null_undecided0 : B.ListSeparator_ECn0; - }, - get$asList() { - var t3, t4, t5, result, - t1 = type$.JSArray_Value_2, - t2 = A._setArrayType([], t1); - for (t3 = type$.Value_2, t4 = A.MapExtensions_get_pairs0(this._map0$_contents, t3, t3), t4 = t4.get$iterator(t4); t4.moveNext$0();) { - t5 = t4.get$current(t4); - result = A.List_List$from(A._setArrayType([t5._0, t5._1], t1), false, t3); - result.fixed$length = Array; - result.immutable$list = Array; - t2.push(new A.SassList0(result, B.ListSeparator_nbm0, false)); - } - return t2; - }, - get$lengthAsList() { - var t1 = this._map0$_contents; - return t1.get$length(t1); - }, - accept$1$1(visitor) { - return visitor.visitMap$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertMap$1($name) { - return this; - }, - tryMap$0() { - return this; - }, - $eq(_, other) { - var t1; - if (other == null) - return false; - if (!(other instanceof A.SassMap0 && B.C_MapEquality.equals$2(0, other._map0$_contents, this._map0$_contents))) { - t1 = this._map0$_contents; - t1 = t1.get$isEmpty(t1) && other instanceof A.SassList0 && other._list1$_contents.length === 0; - } else - t1 = true; - return t1; - }, - get$hashCode(_) { - var t1 = this._map0$_contents; - return t1.get$isEmpty(t1) ? B.C_ListEquality0.hash$1(B.List_empty20) : B.C_MapEquality.hash$1(t1); - } - }; - A.global_closure43.prototype = { - call$1($arguments) { - var t1, - number = J.$index$asx($arguments, 0).assertNumber$1("number"); - if (number.hasUnit$1("%")) - A.warnForDeprecation0(string$.Passinp + number.toString$0(0) + ")\nTo emit a CSS abs() now: abs(#{" + number.toString$0(0) + string$.x7d__Mor, B.Deprecation_qgq); - else - A.warnForDeprecation0(string$.Globalm, B.Deprecation_Q5r); - t1 = number.get$numeratorUnits(number); - return A.SassNumber_SassNumber$withUnits0(Math.abs(number._number1$_value), number.get$denominatorUnits(number), t1); - }, - $signature: 25 - }; - A.module_closure26.prototype = { - call$1(value) { - return Math.abs(value); - }, - $signature: 15 - }; - A._ceil_closure0.prototype = { - call$1(value) { - return B.JSNumber_methods.ceil$0(value); - }, - $signature: 15 - }; - A._clamp_closure0.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - min = t1.$index($arguments, 0).assertNumber$1("min"), - number = t1.$index($arguments, 1).assertNumber$1("number"), - max = t1.$index($arguments, 2).assertNumber$1("max"); - number.convertValueToMatch$3(min, "number", "min"); - max.convertValueToMatch$3(min, "max", "min"); - if (min.greaterThanOrEquals$1(max).value) - return min; - if (min.greaterThanOrEquals$1(number).value) - return min; - if (number.greaterThanOrEquals$1(max).value) - return max; - return number; - }, - $signature: 25 - }; - A._floor_closure0.prototype = { - call$1(value) { - return B.JSNumber_methods.floor$0(value); - }, - $signature: 15 - }; - A._max_closure0.prototype = { - call$1($arguments) { - var t1, t2, max, _i, number; - for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, max = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - number = t1[_i].assertNumber$0(); - if (max == null || max.lessThan$1(number).value) - max = number; - } - if (max != null) - return max; - throw A.wrapException(A.SassScriptException$0("At least one argument must be passed.", null)); - }, - $signature: 25 - }; - A._min_closure0.prototype = { - call$1($arguments) { - var t1, t2, min, _i, number; - for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, min = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { - number = t1[_i].assertNumber$0(); - if (min == null || min.greaterThan$1(number).value) - min = number; - } - if (min != null) - return min; - throw A.wrapException(A.SassScriptException$0("At least one argument must be passed.", null)); - }, - $signature: 25 - }; - A._round_closure0.prototype = { - call$1(number) { - return B.JSNumber_methods.round$0(number); - }, - $signature: 15 - }; - A._hypot_closure0.prototype = { - call$1($arguments) { - var subtotal, i, i0, t3, t4, - t1 = J.$index$asx($arguments, 0).get$asList(), - t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,SassNumber0>"), - numbers = A.List_List$of(new A.MappedListIterable(t1, new A._hypot__closure0(), t2), true, t2._eval$1("ListIterable.E")); - t1 = numbers.length; - if (t1 === 0) - throw A.wrapException(A.SassScriptException$0("At least one argument must be passed.", null)); - for (subtotal = 0, i = 0; i < t1; i = i0) { - i0 = i + 1; - subtotal += Math.pow(numbers[i].convertValueToMatch$3(numbers[0], "numbers[" + i0 + "]", "numbers[1]"), 2); - } - t1 = Math.sqrt(subtotal); - t2 = numbers[0]; - t3 = J.getInterceptor$x(t2); - t4 = t3.get$numeratorUnits(t2); - return A.SassNumber_SassNumber$withUnits0(t1, t3.get$denominatorUnits(t2), t4); - }, - $signature: 25 - }; - A._hypot__closure0.prototype = { - call$1(argument) { - return argument.assertNumber$0(); - }, - $signature: 529 - }; - A._log_closure0.prototype = { - call$1($arguments) { - var base, - _s18_ = " to have no units.", - _null = null, - t1 = J.getInterceptor$asx($arguments), - number = t1.$index($arguments, 0).assertNumber$1("number"); - if (number.get$hasUnits()) - throw A.wrapException(A.SassScriptException$0("$number: Expected " + number.toString$0(0) + _s18_, _null)); - else if (J.$eq$(t1.$index($arguments, 1), B.C__SassNull0)) - return A.SassNumber_SassNumber0(Math.log(number._number1$_value), _null); - base = t1.$index($arguments, 1).assertNumber$1("base"); - if (base.get$hasUnits()) - throw A.wrapException(A.SassScriptException$0("$base: Expected " + base.toString$0(0) + _s18_, _null)); - else - return A.SassNumber_SassNumber0(Math.log(number._number1$_value) / Math.log(base._number1$_value), _null); - }, - $signature: 25 - }; - A._pow_closure0.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return A.pow1(t1.$index($arguments, 0).assertNumber$1("base"), t1.$index($arguments, 1).assertNumber$1("exponent")); - }, - $signature: 25 - }; - A._atan2_closure0.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - y = t1.$index($arguments, 0).assertNumber$1("y"); - return A.SassNumber_SassNumber$withUnits0(Math.atan2(y._number1$_value, t1.$index($arguments, 1).assertNumber$1("x").convertValueToMatch$3(y, "x", "y")) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); - }, - $signature: 25 - }; - A._compatible_closure0.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments); - return t1.$index($arguments, 0).assertNumber$1("number1").isComparableTo$1(t1.$index($arguments, 1).assertNumber$1("number2")) ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._isUnitless_closure0.prototype = { - call$1($arguments) { - return !J.$index$asx($arguments, 0).assertNumber$1("number").get$hasUnits() ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._unit_closure0.prototype = { - call$1($arguments) { - return new A.SassString0(J.$index$asx($arguments, 0).assertNumber$1("number").get$unitString(), true); - }, - $signature: 17 - }; - A._percentage_closure0.prototype = { - call$1($arguments) { - var number = J.$index$asx($arguments, 0).assertNumber$1("number"); - number.assertNoUnits$1("number"); - return A.SassNumber_SassNumber0(number._number1$_value * 100, "%"); - }, - $signature: 25 - }; - A._randomFunction_closure0.prototype = { - call$1($arguments) { - var limit, limitScalar, - t1 = J.getInterceptor$asx($arguments); - if (J.$eq$(t1.$index($arguments, 0), B.C__SassNull0)) - return A.SassNumber_SassNumber0($.$get$_random2().nextDouble$0(), null); - limit = t1.$index($arguments, 0).assertNumber$1("limit"); - if (limit.get$hasUnits()) - A.warnForDeprecation0(string$.math_r + limit.toString$0(0) + string$.x29x20in_a + limit.get$unitString() + ")) * 1" + limit.get$unitString() + string$.x0a_To_p + limit.get$unitString() + string$.x29x29__Mo, B.Deprecation_jV0); - limitScalar = limit.assertInt$1("limit"); - if (limitScalar < 1) - throw A.wrapException(A.SassScriptException$0("$limit: Must be greater than 0, was " + limit.toString$0(0) + ".", null)); - return A.SassNumber_SassNumber0($.$get$_random2().nextInt$1(limitScalar) + 1, null); - }, - $signature: 25 - }; - A._div_closure0.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - number1 = t1.$index($arguments, 0), - number2 = t1.$index($arguments, 1); - if (!(number1 instanceof A.SassNumber0) || !(number2 instanceof A.SassNumber0)) - A.warn0(string$.math_d); - return number1.dividedBy$1(number2); - }, - $signature: 3 - }; - A._singleArgumentMathFunc_closure0.prototype = { - call$1($arguments) { - return this.mathFunc.call$1(J.$index$asx($arguments, 0).assertNumber$1("number")); - }, - $signature: 25 - }; - A._numberFunction_closure0.prototype = { - call$1($arguments) { - var number = J.$index$asx($arguments, 0).assertNumber$1("number"), - t1 = this.transform.call$1(number._number1$_value), - t2 = number.get$numeratorUnits(number); - return A.SassNumber_SassNumber$withUnits0(t1, number.get$denominatorUnits(number), t2); - }, - $signature: 25 - }; - A.CssMediaQuery0.prototype = { - merge$1(other) { - var t1, ourModifier, t2, t3, ourType, t4, theirModifier, t5, t6, theirType, t7, t8, negativeConditions, conditions, type, modifier, fewerConditions, fewerConditions0, moreConditions, _this = this, _null = null, _s3_ = "all"; - if (!_this.conjunction || !other.conjunction) - return B._SingletonCssMediaQueryMergeResult_10; - t1 = _this.modifier; - ourModifier = t1 == null ? _null : t1.toLowerCase(); - t2 = _this.type; - t3 = t2 == null; - ourType = t3 ? _null : t2.toLowerCase(); - t4 = other.modifier; - theirModifier = t4 == null ? _null : t4.toLowerCase(); - t5 = other.type; - t6 = t5 == null; - theirType = t6 ? _null : t5.toLowerCase(); - t7 = ourType == null; - if (t7 && theirType == null) { - t1 = A.List_List$of(_this.conditions, true, type$.String); - B.JSArray_methods.addAll$1(t1, other.conditions); - return new A.MediaQuerySuccessfulMergeResult0(A.CssMediaQuery$condition0(t1, true)); - } - t8 = ourModifier === "not"; - if (t8 !== (theirModifier === "not")) { - if (ourType == theirType) { - negativeConditions = t8 ? _this.conditions : other.conditions; - if (B.JSArray_methods.every$1(negativeConditions, B.JSArray_methods.get$contains(t8 ? other.conditions : _this.conditions))) - return B._SingletonCssMediaQueryMergeResult_00; - else - return B._SingletonCssMediaQueryMergeResult_10; - } else if (t3 || A.equalsIgnoreCase0(t2, _s3_) || t6 || A.equalsIgnoreCase0(t5, _s3_)) - return B._SingletonCssMediaQueryMergeResult_10; - if (t8) { - conditions = other.conditions; - type = theirType; - modifier = theirModifier; - } else { - conditions = _this.conditions; - type = ourType; - modifier = ourModifier; - } - } else if (t8) { - if (ourType != theirType) - return B._SingletonCssMediaQueryMergeResult_10; - fewerConditions = _this.conditions; - fewerConditions0 = other.conditions; - t3 = fewerConditions.length > fewerConditions0.length; - moreConditions = t3 ? fewerConditions : fewerConditions0; - if (t3) - fewerConditions = fewerConditions0; - if (!B.JSArray_methods.every$1(fewerConditions, B.JSArray_methods.get$contains(moreConditions))) - return B._SingletonCssMediaQueryMergeResult_10; - conditions = moreConditions; - type = ourType; - modifier = ourModifier; - } else if (t3 || A.equalsIgnoreCase0(t2, _s3_)) { - type = (t6 || A.equalsIgnoreCase0(t5, _s3_)) && t7 ? _null : theirType; - t3 = A.List_List$of(_this.conditions, true, type$.String); - B.JSArray_methods.addAll$1(t3, other.conditions); - conditions = t3; - modifier = theirModifier; - } else { - if (t6 || A.equalsIgnoreCase0(t5, _s3_)) { - t3 = A.List_List$of(_this.conditions, true, type$.String); - B.JSArray_methods.addAll$1(t3, other.conditions); - conditions = t3; - modifier = ourModifier; - } else { - if (ourType != theirType) - return B._SingletonCssMediaQueryMergeResult_00; - else { - modifier = ourModifier == null ? theirModifier : ourModifier; - t3 = A.List_List$of(_this.conditions, true, type$.String); - B.JSArray_methods.addAll$1(t3, other.conditions); - } - conditions = t3; - } - type = ourType; - } - t2 = type == ourType ? t2 : t5; - return new A.MediaQuerySuccessfulMergeResult0(A.CssMediaQuery$type0(t2, conditions, modifier == ourModifier ? t1 : t4)); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.CssMediaQuery0 && other.modifier == this.modifier && other.type == this.type && B.C_ListEquality.equals$2(0, other.conditions, this.conditions); - }, - get$hashCode(_) { - return J.get$hashCode$(this.modifier) ^ J.get$hashCode$(this.type) ^ B.C_ListEquality0.hash$1(this.conditions); - }, - toString$0(_) { - var t2, _this = this, - t1 = _this.modifier; - t1 = t1 != null ? "" + (t1 + " ") : ""; - t2 = _this.type; - if (t2 != null) { - t1 += t2; - if (_this.conditions.length !== 0) - t1 += " and "; - } - t2 = _this.conjunction ? " and " : " or "; - t2 = t1 + B.JSArray_methods.join$1(_this.conditions, t2); - return t2.charCodeAt(0) == 0 ? t2 : t2; - } - }; - A._SingletonCssMediaQueryMergeResult0.prototype = { - _enumToString$0() { - return "_SingletonCssMediaQueryMergeResult." + this._name; - } - }; - A.MediaQuerySuccessfulMergeResult0.prototype = { - toString$0(_) { - return this.query.toString$0(0); - } - }; - A.MediaQueryParser0.prototype = { - parse$0(_) { - return this.wrapSpanFormatException$1(new A.MediaQueryParser_parse_closure0(this)); - }, - _media_query$_mediaQuery$0() { - var conditions, conjunction, t1, identifier1, identifier2, type, modifier, _this = this, _s3_ = "and", _null = null; - if (_this.scanner.peekChar$0() === 40) { - conditions = A._setArrayType([_this._media_query$_mediaInParens$0()], type$.JSArray_String); - _this.whitespace$0(); - if (_this.scanIdentifier$1(_s3_)) { - _this.expectWhitespace$0(); - B.JSArray_methods.addAll$1(conditions, _this._media_query$_mediaLogicSequence$1(_s3_)); - conjunction = true; - } else { - t1 = _this.scanIdentifier$1("or"); - if (t1) { - _this.expectWhitespace$0(); - B.JSArray_methods.addAll$1(conditions, _this._media_query$_mediaLogicSequence$1("or")); - } - conjunction = !t1; - } - return A.CssMediaQuery$condition0(conditions, conjunction); - } - identifier1 = _this.identifier$0(); - if (A.equalsIgnoreCase0(identifier1, "not")) { - _this.expectWhitespace$0(); - if (!_this.lookingAtIdentifier$0()) - return A.CssMediaQuery$condition0(A._setArrayType(["(not " + _this._media_query$_mediaInParens$0() + ")"], type$.JSArray_String), _null); - } - _this.whitespace$0(); - if (!_this.lookingAtIdentifier$0()) - return A.CssMediaQuery$type0(identifier1, _null, _null); - identifier2 = _this.identifier$0(); - if (A.equalsIgnoreCase0(identifier2, _s3_)) { - _this.expectWhitespace$0(); - type = identifier1; - modifier = _null; - } else { - _this.whitespace$0(); - if (_this.scanIdentifier$1(_s3_)) - _this.expectWhitespace$0(); - else - return A.CssMediaQuery$type0(identifier2, _null, identifier1); - type = identifier2; - modifier = identifier1; - } - if (_this.scanIdentifier$1("not")) { - _this.expectWhitespace$0(); - return A.CssMediaQuery$type0(type, A._setArrayType(["(not " + _this._media_query$_mediaInParens$0() + ")"], type$.JSArray_String), modifier); - } - return A.CssMediaQuery$type0(type, _this._media_query$_mediaLogicSequence$1(_s3_), modifier); - }, - _media_query$_mediaLogicSequence$1(operator) { - var t1, t2, _this = this, - result = A._setArrayType([], type$.JSArray_String); - for (t1 = _this.scanner; true;) { - t1.expectChar$2$name(40, "media condition in parentheses"); - t2 = _this.declarationValue$0(); - t1.expectChar$1(41); - result.push("(" + t2 + ")"); - _this.whitespace$0(); - if (!_this.scanIdentifier$1(operator)) - return result; - _this.expectWhitespace$0(); - } - }, - _media_query$_mediaInParens$0() { - var t2, - t1 = this.scanner; - t1.expectChar$2$name(40, "media condition in parentheses"); - t2 = this.declarationValue$0(); - t1.expectChar$1(41); - return "(" + t2 + ")"; - } - }; - A.MediaQueryParser_parse_closure0.prototype = { - call$0() { - var queries = A._setArrayType([], type$.JSArray_CssMediaQuery_2), - t1 = this.$this, - t2 = t1.scanner; - do { - t1.whitespace$0(); - queries.push(t1._media_query$_mediaQuery$0()); - t1.whitespace$0(); - } while (t2.scanChar$1(44)); - t2.expectDone$0(); - return queries; - }, - $signature: 530 - }; - A.ModifiableCssMediaRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitCssMediaRule$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - equalsIgnoringChildren$1(other) { - return other instanceof A.ModifiableCssMediaRule0 && B.C_ListEquality.equals$2(0, this.queries, other.queries); - }, - copyWithoutChildren$0() { - return A.ModifiableCssMediaRule$0(this.queries, this.span); - }, - get$span(receiver) { - return this.span; - } - }; - A.MediaRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitMediaRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.children; - return "@media " + this.query.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.MergedExtension0.prototype = { - unmerge$0() { - return new A._SyncStarIterable(this.unmerge$body$MergedExtension0(), type$._SyncStarIterable_Extension_2); - }, - unmerge$body$MergedExtension0() { - var $async$self = this; - return function() { - var $async$goto = 0, $async$handler = 1, $async$currentError, right, left; - return function $async$unmerge$0($async$iterator, $async$errorCode, $async$result) { - if ($async$errorCode === 1) { - $async$currentError = $async$result; - $async$goto = $async$handler; - } - while (true) - switch ($async$goto) { - case 0: - // Function start - left = $async$self.left; - $async$goto = left instanceof A.MergedExtension0 ? 2 : 4; - break; - case 2: - // then - $async$goto = 5; - return $async$iterator._yieldStar$1(left.unmerge$0()); - case 5: - // after yield - // goto join - $async$goto = 3; - break; - case 4: - // else - $async$goto = 6; - return $async$iterator._async$_current = left, 1; - case 6: - // after yield - case 3: - // join - right = $async$self.right; - $async$goto = right instanceof A.MergedExtension0 ? 7 : 9; - break; - case 7: - // then - $async$goto = 10; - return $async$iterator._yieldStar$1(right.unmerge$0()); - case 10: - // after yield - // goto join - $async$goto = 8; - break; - case 9: - // else - $async$goto = 11; - return $async$iterator._async$_current = right, 1; - case 11: - // after yield - case 8: - // join - // implicit return - return 0; - case 1: - // rethrow - return $async$iterator._datum = $async$currentError, 3; - } - }; - }; - } - }; - A.MergedMapView0.prototype = { - get$keys(_) { - var t1 = this._merged_map_view$_mapsByKey; - return new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); - }, - get$length(_) { - return this._merged_map_view$_mapsByKey.__js_helper$_length; - }, - get$isEmpty(_) { - return this._merged_map_view$_mapsByKey.__js_helper$_length === 0; - }, - get$isNotEmpty(_) { - return this._merged_map_view$_mapsByKey.__js_helper$_length !== 0; - }, - MergedMapView$10(maps, $K, $V) { - var t1, t2, t3, _i, map, t4, t5, t6; - for (t1 = maps.length, t2 = this._merged_map_view$_mapsByKey, t3 = $K._eval$1("@<0>")._bind$1($V)._eval$1("MergedMapView0<1,2>"), _i = 0; _i < maps.length; maps.length === t1 || (0, A.throwConcurrentModificationError)(maps), ++_i) { - map = maps[_i]; - if (t3._is(map)) - for (t4 = map._merged_map_view$_mapsByKey.get$values(0), t5 = A._instanceType(t4), t4 = new A.MappedIterator(J.get$iterator$ax(t4.__internal$_iterable), t4._f, t5._eval$1("MappedIterator<1,2>")), t5 = t5._rest[1]; t4.moveNext$0();) { - t6 = t4.__internal$_current; - if (t6 == null) - t6 = t5._as(t6); - A.setAll0(t2, t6.get$keys(t6), t6); - } - else - A.setAll0(t2, map.get$keys(map), map); - } - }, - $index(_, key) { - var t1 = this._merged_map_view$_mapsByKey.$index(0, this.$ti._precomputed1._as(key)); - return t1 == null ? null : t1.$index(0, key); - }, - $indexSet(_, key, value) { - var _0_0 = this._merged_map_view$_mapsByKey.$index(0, key); - if (_0_0 != null) - _0_0.$indexSet(0, key, value); - else - throw A.wrapException(A.UnsupportedError$(string$.New_en)); - }, - remove$1(_, key) { - throw A.wrapException(A.UnsupportedError$(string$.Entrie)); - }, - containsKey$1(key) { - return this._merged_map_view$_mapsByKey.containsKey$1(key); - } - }; - A._shared_closure3.prototype = { - call$1($arguments) { - A.warnForDeprecation0(string$.The_fe, B.Deprecation_QAx); - return $._features0.contains$1(0, J.$index$asx($arguments, 0).assertString$1("feature")._string0$_text) ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._shared_closure4.prototype = { - call$1($arguments) { - return new A.SassString0(A.serializeValue0(J.get$first$ax($arguments), true, true), false); - }, - $signature: 17 - }; - A._shared_closure5.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - _0_0 = t1.$index($arguments, 0); - $label0$0: { - if (_0_0 instanceof A.SassArgumentList0) { - t1 = "arglist"; - break $label0$0; - } - if (_0_0 instanceof A.SassBoolean0) { - t1 = "bool"; - break $label0$0; - } - if (_0_0 instanceof A.SassColor0) { - t1 = "color"; - break $label0$0; - } - if (_0_0 instanceof A.SassList0) { - t1 = "list"; - break $label0$0; - } - if (_0_0 instanceof A.SassMap0) { - t1 = "map"; - break $label0$0; - } - if (B.C__SassNull0 === _0_0) { - t1 = "null"; - break $label0$0; - } - if (_0_0 instanceof A.SassNumber0) { - t1 = "number"; - break $label0$0; - } - if (_0_0 instanceof A.SassFunction0) { - t1 = "function"; - break $label0$0; - } - if (_0_0 instanceof A.SassMixin0) { - t1 = "mixin"; - break $label0$0; - } - if (_0_0 instanceof A.SassCalculation0) { - t1 = "calculation"; - break $label0$0; - } - if (_0_0 instanceof A.SassString0) { - t1 = "string"; - break $label0$0; - } - t1 = A.throwExpression("[BUG] Unknown value type " + A.S(t1.$index($arguments, 0))); - } - return new A.SassString0(t1, false); - }, - $signature: 17 - }; - A._shared_closure6.prototype = { - call$1($arguments) { - var t2, t3, t4, - t1 = J.getInterceptor$asx($arguments), - _1_0 = t1.$index($arguments, 0); - if (_1_0 instanceof A.SassArgumentList0) { - _1_0._argument_list$_wereKeywordsAccessed = true; - t1 = type$.Value_2; - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t3 = A.MapExtensions_get_pairs0(_1_0._argument_list$_keywords, type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t4 = t3.get$current(t3); - t2.$indexSet(0, new A.SassString0(t4._0, false), t4._1); - } - return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); - } else - throw A.wrapException("$args: " + A.S(t1.$index($arguments, 0)) + " is not an argument list."); - }, - $signature: 34 - }; - A.moduleFunctions_closure2.prototype = { - call$1($arguments) { - return new A.SassString0(J.$index$asx($arguments, 0).assertCalculation$1("calc").name, true); - }, - $signature: 17 - }; - A.moduleFunctions_closure3.prototype = { - call$1($arguments) { - var t1 = J.$index$asx($arguments, 0).assertCalculation$1("calc").$arguments; - return A.SassList$0(new A.MappedListIterable(t1, new A.moduleFunctions__closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), B.ListSeparator_ECn0, false); - }, - $signature: 26 - }; - A.moduleFunctions__closure0.prototype = { - call$1(argument) { - return argument instanceof A.Value0 ? argument : new A.SassString0(J.toString$0$(argument), false); - }, - $signature: 531 - }; - A.moduleFunctions_closure4.prototype = { - call$1($arguments) { - var _0_2_isSet, _0_2, acceptsContent, t1, _0_5_isSet, _0_5, hasContent, - mixin = J.$index$asx($arguments, 0).assertMixin$1("mixin"), - _0_0 = mixin.callable; - $label0$0: { - _0_2_isSet = type$.AsyncBuiltInCallable_2._is(_0_0); - if (_0_2_isSet) { - _0_2 = _0_0.get$acceptsContent(); - acceptsContent = _0_2; - } else - acceptsContent = null; - if (!_0_2_isSet) { - _0_2_isSet = _0_0 instanceof A.BuiltInCallable0; - if (_0_2_isSet) { - _0_2 = _0_0.acceptsContent; - acceptsContent = _0_2; - } - t1 = _0_2_isSet; - } else - t1 = true; - if (t1) { - t1 = acceptsContent; - break $label0$0; - } - _0_5_isSet = _0_0 instanceof A.UserDefinedCallable0; - if (_0_5_isSet) { - _0_5 = _0_0.declaration; - t1 = _0_5 instanceof A.MixinRule0; - } else { - _0_5 = null; - t1 = false; - } - if (t1) { - t1 = _0_5_isSet ? _0_5 : _0_0.declaration; - hasContent = type$.MixinRule_2._as(t1).get$hasContent(); - t1 = hasContent; - break $label0$0; - } - t1 = A.throwExpression(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); - } - return t1 ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A.mixinClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassMixin", new A.mixinClass__closure())); - A.JSClassExtension_injectSuperclass(t1._as(new A.SassMixin0(A.BuiltInCallable$function0("f", "", new A.mixinClass__closure0(), null)).constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.mixinClass__closure.prototype = { - call$1($self) { - A.jsThrow(new self.Error("It is not possible to construct a SassMixin through the JavaScript API")); - }, - $signature: 532 - }; - A.mixinClass__closure0.prototype = { - call$1(_) { - return B.C__SassNull0; - }, - $signature: 3 - }; - A.SassMixin0.prototype = { - accept$1$1(visitor) { - var t1, t2; - if (!visitor._serialize0$_inspect) - A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " isn't a valid CSS value.", null)); - t1 = visitor._serialize0$_buffer; - t1.write$1(0, "get-mixin("); - t2 = this.callable; - visitor._serialize0$_visitQuotedString$1(t2.get$name(t2)); - t1.writeCharCode$1(41); - return null; - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertMixin$1($name) { - return this; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.SassMixin0 && this.callable.$eq(0, other.callable); - }, - get$hashCode(_) { - var t1 = this.callable; - return t1.get$hashCode(t1); - } - }; - A.MixinRule0.prototype = { - get$hasContent() { - var result, _this = this, - value = _this._mixin_rule$__MixinRule_hasContent_FI; - if (value === $) { - result = J.$eq$(B.C__HasContentVisitor0.visitChildren$1(_this.children), true); - _this._mixin_rule$__MixinRule_hasContent_FI !== $ && A.throwUnnamedLateFieldADI(); - _this._mixin_rule$__MixinRule_hasContent_FI = result; - value = result; - } - return value; - }, - accept$1$1(visitor) { - return visitor.visitMixinRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = "@mixin " + this.name, - t2 = this.$arguments; - if (!(t2.$arguments.length === 0 && t2.restArgument == null)) - t1 += "(" + t2.toString$0(0) + ")"; - t2 = this.children; - t2 = t1 + (" {" + (t2 && B.JSArray_methods).join$1(t2, " ") + "}"); - return t2.charCodeAt(0) == 0 ? t2 : t2; - } - }; - A._HasContentVisitor0.prototype = { - visitContentRule$1(_, _0) { - return true; - }, - $isStatementVisitor: 1 - }; - A.__HasContentVisitor_Object_StatementSearchVisitor0.prototype = {}; - A.ExtendMode0.prototype = { - _enumToString$0() { - return "ExtendMode." + this._name; - }, - toString$0(_) { - return this.name; - } - }; - A.JSModule0.prototype = {}; - A.JSModuleRequire0.prototype = {}; - A.MultiSpan0.prototype = { - get$start(_) { - var t1 = this._multi_span0$_primary; - return t1.get$start(t1); - }, - get$end(_) { - var t1 = this._multi_span0$_primary; - return t1.get$end(t1); - }, - get$text() { - return this._multi_span0$_primary.get$text(); - }, - get$context(_) { - var t1 = this._multi_span0$_primary; - return t1.get$context(t1); - }, - get$file(_) { - var t1 = this._multi_span0$_primary; - return t1.get$file(t1); - }, - get$length(_) { - var t1 = this._multi_span0$_primary; - return t1.get$length(t1); - }, - get$sourceUrl(_) { - var t1 = this._multi_span0$_primary; - return t1.get$sourceUrl(t1); - }, - compareTo$1(_, other) { - return this._multi_span0$_primary.compareTo$1(0, other); - }, - toString$0(_) { - return this._multi_span0$_primary.toString$0(0); - }, - expand$1(_, other) { - return new A.MultiSpan0(this._multi_span0$_primary.expand$1(0, other), this.primaryLabel, this.secondarySpans); - }, - highlight$1$color(color) { - return A.Highlighter$multiple(this._multi_span0$_primary, this.primaryLabel, this.secondarySpans, color === true, null, null).highlight$0(); - }, - message$2$color(_, message, color) { - var t1 = J.$eq$(color, true) || typeof color == "string", - t2 = typeof color == "string" ? color : null; - return A.SourceSpanExtension_messageMultiple(this._multi_span0$_primary, message, this.primaryLabel, this.secondarySpans, t1, t2, null); - }, - message$1(_, message) { - return this.message$2$color(0, message, null); - }, - $isComparable: 1, - $isFileSpan: 1, - $isSourceSpan: 1, - $isSourceSpanWithContext: 1 - }; - A.SupportsNegation0.prototype = { - toInterpolation$0() { - var t1 = new A.StringBuffer(""), - t2 = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), - t3 = this.span, - t4 = this.condition, - t5 = A.SpanExtensions_before(t3, t4.get$span(t4)); - t5 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t5.file._decodedChars, t5._file$_start, t5._end), 0, null); - t1._contents += t5; - t2.addInterpolation$1(t4.toInterpolation$0()); - t4 = A.SpanExtensions_after(t3, t4.get$span(t4)); - t4 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4.file._decodedChars, t4._file$_start, t4._end), 0, null); - t1._contents += t4; - return t2.interpolation$1(t3); - }, - withSpan$1(span) { - return new A.SupportsNegation0(this.condition, span); - }, - toString$0(_) { - var t1 = this.condition; - if (t1 instanceof A.SupportsNegation0 || t1 instanceof A.SupportsOperation0) - return "not (" + t1.toString$0(0) + ")"; - else - return "not " + t1.toString$0(0); - }, - $isAstNode0: 1, - $isSassNode: 1, - $isSupportsCondition: 1, - get$span(receiver) { - return this.span; - } - }; - A.NoOpImporter0.prototype = { - canonicalize$1(_, url) { - return null; - }, - load$1(_, url) { - return null; - }, - toString$0(_) { - return "(unknown)"; - } - }; - A.NoSourceMapBuffer0.prototype = { - get$length(_) { - return this._no_source_map_buffer0$_buffer._contents.length; - }, - forSpan$1$2(span, callback) { - return callback.call$0(); - }, - forSpan$2(span, callback) { - return this.forSpan$1$2(span, callback, type$.dynamic); - }, - write$1(_, object) { - var t1 = this._no_source_map_buffer0$_buffer, - t2 = A.S(object); - t1._contents += t2; - return null; - }, - writeCharCode$1(charCode) { - var t1 = this._no_source_map_buffer0$_buffer, - t2 = A.Primitives_stringFromCharCode(charCode); - t1._contents += t2; - return null; - }, - toString$0(_) { - var t1 = this._no_source_map_buffer0$_buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - buildSourceMap$1$prefix(prefix) { - return A.throwExpression(A.UnsupportedError$(string$.NoSour)); - } - }; - A._FakeAstNode0.prototype = { - get$span(_) { - return this._node0$_callback.call$0(); - }, - $isAstNode0: 1 - }; - A.CssNode0.prototype = { - toString$0(_) { - var _null = null; - return A.serialize0(this, true, _null, true, _null, _null, false, _null, true)._0; - }, - $isAstNode0: 1 - }; - A.CssParentNode0.prototype = {}; - A._IsInvisibleVisitor1.prototype = { - visitCssAtRule$1(rule) { - return false; - }, - visitCssComment$1(comment) { - return this.includeComments && comment.text.charCodeAt(2) !== 33; - }, - visitCssStyleRule$1(rule) { - var t1 = rule._style_rule0$_selector._box0$_inner; - return (this.includeBogus ? t1.value.accept$1(B._IsInvisibleVisitor_true0) : t1.value.accept$1(B._IsInvisibleVisitor_false0)) || this.super$EveryCssVisitor$visitCssStyleRule0(rule); - } - }; - A.__IsInvisibleVisitor_Object_EveryCssVisitor0.prototype = {}; - A.ModifiableCssNode0.prototype = { - get$parent(_) { - return this._node$_parent; - }, - get$hasFollowingSibling() { - var t2, - t1 = this._node$_parent; - if (t1 == null) - t1 = null; - else { - t1 = t1.children; - t2 = this._node$_indexInParent; - t2.toString; - t1 = A.SubListIterable$(t1, t2 + 1, null, t1.$ti._eval$1("ListBase.E")).any$1(0, new A.ModifiableCssNode_hasFollowingSibling_closure0()); - } - return t1 === true; - }, - get$isGroupEnd() { - return this.isGroupEnd; - } - }; - A.ModifiableCssNode_hasFollowingSibling_closure0.prototype = { - call$1(sibling) { - return !sibling.accept$1(B._IsInvisibleVisitor_true_false0); - }, - $signature: 533 - }; - A.ModifiableCssParentNode0.prototype = { - get$isChildless() { - return false; - }, - addChild$1(child) { - var t1; - child._node$_parent = this; - t1 = this._node$_children; - child._node$_indexInParent = t1.length; - t1.push(child); - }, - clearChildren$0() { - var t1, t2, _i, child; - for (t1 = this._node$_children, t2 = t1.length, _i = 0; _i < t2; ++_i) { - child = t1[_i]; - child._node$_indexInParent = child._node$_parent = null; - } - B.JSArray_methods.clear$0(t1); - }, - $isCssParentNode0: 1, - get$children(receiver) { - return this.children; - } - }; - A.NodePackageImporter0.prototype = { - isNonCanonicalScheme$1(scheme) { - return scheme === "pkg"; - }, - canonicalize$1(_, url) { - var packageName, jsonPath, jsonString, packageManifest, e, t1, t2, t3, t4, baseDirectory, parts, t5, $name, subpath, packageRoot, exception, _1_0, rootPath, subpathInRoot, _this = this, _null = null; - if (url.get$scheme() === "file") - return $.$get$FilesystemImporter_cwd0().canonicalize$1(0, url); - if (url.get$scheme() !== "pkg") - return _null; - if (url.get$hasAuthority()) - throw A.wrapException(string$.A_pkg_h); - else { - t1 = $.$get$url(); - t2 = t1.style; - if (t2.rootLength$1(url.get$path(url)) > 0) - throw A.wrapException("A pkg: URL's path must not begin with /."); - else if (url.get$path(url).length === 0) - throw A.wrapException("A pkg: URL must not have an empty path."); - else if (url.get$hasQuery() || url.get$hasFragment()) - throw A.wrapException(string$.A_pkg_q); - } - t3 = A.canonicalizeContext0(); - t3._canonicalize_context$_wasContainingUrlAccessed = true; - t3 = t3._canonicalize_context$_containingUrl; - if ((t3 == null ? _null : t3.get$scheme()) === "file") { - t3 = A.canonicalizeContext0(); - t3._canonicalize_context$_wasContainingUrlAccessed = true; - t3 = t3._canonicalize_context$_containingUrl; - t3.toString; - t4 = $.$get$context(); - baseDirectory = t4.dirname$1(t4.style.pathFromUri$1(A._parseUri(t3))); - } else { - t3 = _this._node_package$__NodePackageImporter__entryPointDirectory_F; - t3 === $ && A.throwUnnamedLateFieldNI(); - baseDirectory = t3; - } - packageName = null; - parts = t1.split$1(0, url.get$path(url)); - t3 = B.JSArray_methods.removeAt$1(parts, 0); - t4 = $.$get$context(); - t3.toString; - t5 = t4.style; - $name = t5.pathFromUri$1(A._parseUri(t3)); - if (B.JSString_methods.startsWith$1($name, "@")) - $name = parts.length !== 0 ? t1.join$2(0, $name, B.JSArray_methods.removeAt$1(parts, 0)) : $name; - subpath = parts.length !== 0 ? t5.pathFromUri$1(A._parseUri(t1.joinAll$1(parts))) : _null; - packageName = $name; - t1 = true; - if (!J.startsWith$1$s(packageName, ".")) - if (!J.contains$1$asx(packageName, "\\")) - if (!J.contains$1$asx(packageName, "%")) - t1 = J.startsWith$1$s(packageName, "@") && !J.contains$1$asx(packageName, t2.get$separator(t2)); - if (t1) - return _null; - packageRoot = _this._node_package$_resolvePackageRoot$2(packageName, baseDirectory); - if (packageRoot == null) - return _null; - jsonPath = A.join(packageRoot, "package.json", _null); - jsonString = A.readFile0(jsonPath); - packageManifest = null; - try { - packageManifest = type$.Map_String_dynamic._as(B.C_JsonCodec.decode$1(jsonString)); - } catch (exception) { - e = A.unwrapException(exception); - t1 = A.S(jsonPath); - t2 = A.S(packageName); - t3 = A.S(e); - throw A.wrapException("Failed to parse " + t1 + ' for "pkg:' + t2 + '": ' + t3); - } - _1_0 = _this._node_package$_resolvePackageExports$4(packageRoot, subpath, packageManifest, packageName); - if (_1_0 != null) - if (B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(_1_0, t5)._splitExtension$1(1)[1])) - return t4.toUri$1(t4.canonicalize$1(0, _1_0)); - else { - t1 = subpath == null ? "root" : subpath; - throw A.wrapException("The export for '" + t1 + "' in '" + A.S(packageName) + "' resolved to '" + _1_0 + string$.x27x2c_whi); - } - if (subpath == null) { - rootPath = _this._node_package$_resolvePackageRootValues$2(packageRoot, packageManifest); - return rootPath != null ? t4.toUri$1(t4.canonicalize$1(0, rootPath)) : _null; - } - subpathInRoot = A.join(packageRoot, subpath, _null); - return $.$get$FilesystemImporter_cwd0().canonicalize$1(0, t4.toUri$1(subpathInRoot)); - }, - load$1(_, url) { - return $.$get$FilesystemImporter_cwd0().load$1(0, url); - }, - _node_package$_resolvePackageRoot$2(packageName, baseDirectory) { - var potentialPackage, t1; - for (; true;) { - potentialPackage = A.join(baseDirectory, "node_modules", packageName); - if (A.dirExists0(potentialPackage)) - return potentialPackage; - t1 = $.$get$context(); - if (t1.split$1(0, baseDirectory).length === 1) - return null; - baseDirectory = t1.dirname$1(baseDirectory); - } - }, - _node_package$_resolvePackageRootValues$2(packageRoot, packageManifest) { - var t1, sassValue, _1_0, styleValue, _null = null, - _0_0 = packageManifest.$index(0, "sass"); - if (typeof _0_0 == "string") { - t1 = B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(_0_0, $.$get$url().style)._splitExtension$1(1)[1]); - sassValue = _0_0; - } else { - sassValue = _null; - t1 = false; - } - if (t1) - return A.join(packageRoot, sassValue, _null); - else { - _1_0 = packageManifest.$index(0, "style"); - if (typeof _1_0 == "string") { - t1 = B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(_1_0, $.$get$url().style)._splitExtension$1(1)[1]); - styleValue = _1_0; - } else { - styleValue = _null; - t1 = false; - } - if (t1) - return A.join(packageRoot, styleValue, _null); - } - return A.resolveImportPath0(A.join(packageRoot, "index", _null)); - }, - _node_package$_resolvePackageExports$4(packageRoot, subpath, packageManifest, packageName) { - var _0_0, _1_0, _this = this, - exports = packageManifest.$index(0, "exports"); - if (exports == null) - return null; - _0_0 = _this._node_package$_nodePackageExportsResolve$5(packageRoot, _this._node_package$_exportsToCheck$1(subpath), exports, subpath, packageName); - if (_0_0 != null) - return _0_0; - if (subpath != null && A.ParsedPath_ParsedPath$parse(subpath, $.$get$url().style)._splitExtension$1(1)[1].length !== 0) - return null; - _1_0 = _this._node_package$_nodePackageExportsResolve$5(packageRoot, _this._node_package$_exportsToCheck$2$addIndex(subpath, true), exports, subpath, packageName); - if (_1_0 != null) - return _1_0; - return null; - }, - _node_package$_nodePackageExportsResolve$5(packageRoot, subpathVariants, exports, subpath, packageName) { - var t1, matches, _1_1, path; - if (type$.Map_String_dynamic._is(exports) && J.any$1$ax(exports.get$keys(exports), new A.NodePackageImporter__nodePackageExportsResolve_closure3()) && J.any$1$ax(exports.get$keys(exports), new A.NodePackageImporter__nodePackageExportsResolve_closure4())) - throw A.wrapException("`exports` in " + packageName + string$.x20can_n + J.map$1$1$ax(J.get$keys$z(exports), new A.NodePackageImporter__nodePackageExportsResolve_closure5(), type$.String).join$1(0, ",") + " in " + A.join(packageRoot, "package.json", null) + "."); - t1 = type$.NonNullsIterable_String; - matches = A.List_List$of(new A.NonNullsIterable(new A.MappedListIterable(subpathVariants, new A.NodePackageImporter__nodePackageExportsResolve_closure6(this, exports, packageRoot), A._arrayInstanceType(subpathVariants)._eval$1("MappedListIterable<1,String?>")), t1), true, t1._eval$1("Iterable.E")); - $label0$1: { - _1_1 = matches.length; - if (_1_1 === 1) { - path = matches[0]; - t1 = path; - break $label0$1; - } - if (_1_1 <= 0) { - t1 = null; - break $label0$1; - } - t1 = subpath == null ? "root" : subpath; - t1 = A.throwExpression(string$.Unable + t1 + " in " + packageName + " should be used. \n\nFound:\n" + B.JSArray_methods.join$1(matches, "\n")); - } - return t1; - }, - _node_package$_compareExpansionKeys$2(keyA, keyB) { - var t1 = B.JSString_methods.contains$1(keyA, "*"), - baseLengthA = t1 ? B.JSString_methods.indexOf$1(keyA, "*") + 1 : keyA.length, - t2 = B.JSString_methods.contains$1(keyB, "*"), - baseLengthB = t2 ? B.JSString_methods.indexOf$1(keyB, "*") + 1 : keyB.length; - if (baseLengthA > baseLengthB) - return -1; - if (baseLengthB > baseLengthA) - return 1; - if (!t1) - return 1; - if (!t2) - return -1; - t1 = keyA.length; - t2 = keyB.length; - if (t1 > t2) - return -1; - if (t2 > t1) - return 1; - return 0; - }, - _node_package$_packageTargetResolve$4(subpath, exports, packageRoot, patternMatch) { - var t2, string, path, map, key, value, _1_0, array, _2_0, _null = null, - t1 = typeof exports == "string"; - if (t1) { - t2 = !B.JSString_methods.startsWith$1(exports, "./"); - string = exports; - } else { - string = _null; - t2 = false; - } - if (t2) - throw A.wrapException("Export '" + A.S(string) + string$.x27x20must + packageRoot + "'."); - if (t1) { - t2 = patternMatch != null; - string = exports; - } else { - string = _null; - t2 = false; - } - if (t2) { - t1 = J.replaceFirst$2$s(string, "*", patternMatch); - t2 = $.$get$context(); - path = t2.normalize$1(A.join(packageRoot, t2.style.pathFromUri$1(A._parseUri(t1)), _null)); - return A.fileExists0(path) ? path : _null; - } - string = t1 ? exports : _null; - if (t1) { - t1 = $.$get$context(); - string.toString; - return A.join(packageRoot, t1.style.pathFromUri$1(A._parseUri(string)), _null); - } - t1 = type$.Map_String_dynamic._is(exports); - map = t1 ? exports : _null; - if (t1) { - for (t1 = A.MapExtensions_get_pairs(map, type$.String, type$.dynamic), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t2 = t1.get$current(t1); - key = t2._0; - value = t2._1; - if (!B.Set_TnQrk.contains$1(0, key)) - continue; - if (value == null) - continue; - _1_0 = this._node_package$_packageTargetResolve$4(subpath, value, packageRoot, patternMatch); - if (_1_0 != null) - return _1_0; - } - return _null; - } - if (type$.List_nullable_Object._is(exports) && J.get$length$asx(exports) <= 0) - return _null; - t1 = type$.List_dynamic._is(exports); - array = t1 ? exports : _null; - if (t1) { - for (t1 = J.get$iterator$ax(array); t1.moveNext$0();) { - value = t1.get$current(t1); - if (value == null) - continue; - _2_0 = this._node_package$_packageTargetResolve$4(subpath, value, packageRoot, patternMatch); - if (_2_0 != null) - return _2_0; - } - return _null; - } - throw A.wrapException("Invalid 'exports' value " + A.S(exports) + " in " + A.join(packageRoot, "package.json", _null) + "."); - }, - _node_package$_packageTargetResolve$3(subpath, exports, packageRoot) { - return this._node_package$_packageTargetResolve$4(subpath, exports, packageRoot, null); - }, - _node_package$_getMainExport$1(exports) { - var t1, t2, t3, map, _0_4, t4, $export; - $label0$0: { - t1 = null; - if (typeof exports == "string") { - t1 = exports; - break $label0$0; - } - if (type$.List_String._is(exports)) { - t1 = exports; - break $label0$0; - } - t2 = type$.Map_String_dynamic._is(exports); - if (t2) { - t3 = !J.any$1$ax(exports.get$keys(exports), new A.NodePackageImporter__getMainExport_closure0()); - map = exports; - } else { - map = t1; - t3 = false; - } - if (t3) { - t1 = map; - break $label0$0; - } - t3 = false; - if (t2) { - _0_4 = exports.$index(0, "."); - if (_0_4 == null) - t4 = exports.containsKey$1("."); - else - t4 = true; - if (t4) - t3 = _0_4 != null; - } else - _0_4 = null; - if (t3) { - $export = t2 ? _0_4 : J.$index$asx(exports, "."); - t1 = $export; - break $label0$0; - } - break $label0$0; - } - return t1; - }, - _node_package$_exportsToCheck$2$addIndex(subpath, addIndex) { - var basename, dirname, t3, t4, _i, path, - t1 = type$.JSArray_String, - paths = A._setArrayType([], t1), - t2 = subpath == null; - if (t2 && addIndex) - subpath = "index"; - else if (!t2 && addIndex) - subpath = A.join(subpath, "index", null); - if (subpath == null) - return A._setArrayType([null], type$.JSArray_nullable_String); - if (B.Set_00.contains$1(0, A.ParsedPath_ParsedPath$parse(subpath, $.$get$url().style)._splitExtension$1(1)[1])) - paths.push(subpath); - else - B.JSArray_methods.addAll$1(paths, A._setArrayType([subpath, subpath + ".scss", subpath + ".sass", subpath + ".css"], t1)); - t1 = $.$get$context(); - t2 = t1.style; - basename = A.ParsedPath_ParsedPath$parse(subpath, t2).get$basename(); - dirname = t1.dirname$1(subpath); - if (B.JSString_methods.startsWith$1(basename, "_")) - return paths; - t1 = A.List_List$of(paths, true, type$.nullable_String); - for (t3 = paths.length, t4 = dirname === ".", _i = 0; _i < paths.length; paths.length === t3 || (0, A.throwConcurrentModificationError)(paths), ++_i) { - path = paths[_i]; - if (t4) - t1.push("_" + A.ParsedPath_ParsedPath$parse(path, t2).get$basename()); - else - t1.push(A.join(dirname, "_" + A.ParsedPath_ParsedPath$parse(path, t2).get$basename(), null)); - } - return t1; - }, - _node_package$_exportsToCheck$1(subpath) { - return this._node_package$_exportsToCheck$2$addIndex(subpath, false); - } - }; - A.NodePackageImporter__nodePackageExportsResolve_closure3.prototype = { - call$1(key) { - return B.JSString_methods.startsWith$1(key, "."); - }, - $signature: 5 - }; - A.NodePackageImporter__nodePackageExportsResolve_closure4.prototype = { - call$1(key) { - return !B.JSString_methods.startsWith$1(key, "."); - }, - $signature: 5 - }; - A.NodePackageImporter__nodePackageExportsResolve_closure5.prototype = { - call$1(key) { - return '"' + key + '"'; - }, - $signature: 6 - }; - A.NodePackageImporter__nodePackageExportsResolve_closure6.prototype = { - call$1(variant) { - var t1, matchKey, t2, t3, t4, t5, t6, _i, expansionKey, _0_0, t7, patternBase, patternTrailer, t8, target, _this = this, _null = null; - if (variant == null) { - t1 = _this.$this; - return A.NullableExtension_andThen(t1._node_package$_getMainExport$1(_this.exports), new A.NodePackageImporter__nodePackageExportsResolve__closure1(t1, variant, _this.packageRoot)); - } else { - t1 = _this.exports; - if (!type$.Map_String_dynamic._is(t1) || J.every$1$ax(t1.get$keys(t1), new A.NodePackageImporter__nodePackageExportsResolve__closure2())) - return _null; - } - matchKey = "./" + $.$get$context().toUri$1(variant).toString$0(0); - if (t1.containsKey$1(matchKey) && J.$index$asx(t1, matchKey) != null && !B.JSString_methods.contains$1(matchKey, "*")) { - t1 = J.$index$asx(t1, matchKey); - if (t1 == null) - t1 = type$.Object._as(t1); - return _this.$this._node_package$_packageTargetResolve$3(matchKey, t1, _this.packageRoot); - } - t2 = A._setArrayType([], type$.JSArray_String); - for (t3 = J.getInterceptor$z(t1), t4 = J.get$iterator$ax(t3.get$keys(t1)); t4.moveNext$0();) { - t5 = t4.get$current(t4); - if (B.JSString_methods.allMatches$1("*", t5).get$length(0) === 1) - t2.push(t5); - } - t4 = _this.$this; - B.JSArray_methods.sort$1(t2, t4.get$_node_package$_compareExpansionKeys()); - for (t5 = t2.length, t6 = matchKey.length, _i = 0; _i < t2.length; t2.length === t5 || (0, A.throwConcurrentModificationError)(t2), ++_i) { - expansionKey = t2[_i]; - _0_0 = expansionKey.split("*"); - t7 = _0_0.length === 2; - if (t7) { - patternBase = _0_0[0]; - patternTrailer = _0_0[1]; - patternTrailer = patternTrailer; - } else { - patternTrailer = _null; - patternBase = patternTrailer; - } - if (!t7) - throw A.wrapException(A.StateError$("Pattern matching error")); - if (!B.JSString_methods.startsWith$1(matchKey, patternBase)) - continue; - if (matchKey === patternBase) - continue; - t7 = patternTrailer.length; - if (t7 !== 0) - t8 = B.JSString_methods.endsWith$1(matchKey, patternTrailer) && t6 >= expansionKey.length; - else - t8 = true; - if (t8) { - target = t3.$index(t1, expansionKey); - if (target == null) - continue; - return t4._node_package$_packageTargetResolve$4(variant, target, _this.packageRoot, B.JSString_methods.substring$2(matchKey, patternBase.length, t6 - t7)); - } - } - return _null; - }, - $signature: 147 - }; - A.NodePackageImporter__nodePackageExportsResolve__closure1.prototype = { - call$1(mainExport) { - return this.$this._node_package$_packageTargetResolve$3(this.variant, mainExport, this.packageRoot); - }, - $signature: 148 - }; - A.NodePackageImporter__nodePackageExportsResolve__closure2.prototype = { - call$1(key) { - return !B.JSString_methods.startsWith$1(key, "."); - }, - $signature: 5 - }; - A.NodePackageImporter__getMainExport_closure0.prototype = { - call$1(key) { - return B.JSString_methods.startsWith$1(key, "."); - }, - $signature: 5 - }; - A.NullExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitNullExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "null"; - }, - get$span(receiver) { - return this.span; - } - }; - A.legacyNullClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.types.Null", new A.legacyNullClass__closure())); - jsClass.NULL = B.C__SassNull0; - A.JSClassExtension_injectSuperclass(t1._as(B.C__SassNull0.constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.legacyNullClass__closure.prototype = { - call$2(_, __) { - throw A.wrapException("new sass.types.Null() isn't allowed. Use sass.types.Null.NULL instead."); - }, - call$1(_) { - return this.call$2(_, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 220 - }; - A._SassNull0.prototype = { - get$isTruthy() { - return false; - }, - get$isBlank() { - return true; - }, - get$realNull() { - return null; - }, - accept$1$1(visitor) { - if (visitor._serialize0$_inspect) - visitor._serialize0$_buffer.write$1(0, "null"); - return null; - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - unaryNot$0() { - return B.SassBoolean_true0; - } - }; - A.NumberExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitNumberExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return A.serializeValue0(A.SassNumber_SassNumber0(this.value, this.unit), true, true); - }, - get$span(receiver) { - return this.span; - } - }; - A.numberClass_closure.prototype = { - call$0() { - var t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassNumber", new A.numberClass__closure())), - t2 = type$.String, - t3 = type$.Function; - A.LinkedHashMap_LinkedHashMap$_literal(["value", new A.numberClass__closure0(), "isInt", new A.numberClass__closure1(), "asInt", new A.numberClass__closure2(), "numeratorUnits", new A.numberClass__closure3(), "denominatorUnits", new A.numberClass__closure4(), "hasUnits", new A.numberClass__closure5()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); - A.LinkedHashMap_LinkedHashMap$_literal(["assertInt", new A.numberClass__closure6(), "assertInRange", new A.numberClass__closure7(), "assertNoUnits", new A.numberClass__closure8(), "assertUnit", new A.numberClass__closure9(), "hasUnit", new A.numberClass__closure10(), "compatibleWithUnit", new A.numberClass__closure11(), "convert", new A.numberClass__closure12(), "convertToMatch", new A.numberClass__closure13(), "convertValue", new A.numberClass__closure14(), "convertValueToMatch", new A.numberClass__closure15(), "coerce", new A.numberClass__closure16(), "coerceToMatch", new A.numberClass__closure17(), "coerceValue", new A.numberClass__closure18(), "coerceValueToMatch", new A.numberClass__closure19()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); - A.JSClassExtension_injectSuperclass(t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(A.SassNumber_SassNumber0(0, null).constructor))).constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.numberClass__closure.prototype = { - call$3($self, value, unitOrOptions) { - var t1, t2, _null = null; - if (typeof unitOrOptions == "string") - return A.SassNumber_SassNumber0(value, unitOrOptions); - type$.nullable__ConstructorOptions_2._as(unitOrOptions); - t1 = unitOrOptions == null; - if (t1) - t2 = _null; - else { - t2 = A.NullableExtension_andThen0(J.get$numeratorUnits$x(unitOrOptions), A.immutable__jsToDartList$closure()); - t2 = t2 == null ? _null : J.cast$1$0$ax(t2, type$.String); - } - if (t1) - t1 = _null; - else { - t1 = A.NullableExtension_andThen0(J.get$denominatorUnits$x(unitOrOptions), A.immutable__jsToDartList$closure()); - t1 = t1 == null ? _null : J.cast$1$0$ax(t1, type$.String); - } - return A.SassNumber_SassNumber$withUnits0(value, t1, t2); - }, - call$2($self, value) { - return this.call$3($self, value, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 534 - }; - A.numberClass__closure0.prototype = { - call$1($self) { - return $self._number1$_value; - }, - $signature: 99 - }; - A.numberClass__closure1.prototype = { - call$1($self) { - return A.fuzzyIsInt0($self._number1$_value); - }, - $signature: 250 - }; - A.numberClass__closure2.prototype = { - call$1($self) { - return A.fuzzyAsInt0($self._number1$_value); - }, - $signature: 536 - }; - A.numberClass__closure3.prototype = { - call$1($self) { - return new self.immutable.List($self.get$numeratorUnits($self)); - }, - $signature: 251 - }; - A.numberClass__closure4.prototype = { - call$1($self) { - return new self.immutable.List($self.get$denominatorUnits($self)); - }, - $signature: 251 - }; - A.numberClass__closure5.prototype = { - call$1($self) { - return $self.get$hasUnits(); - }, - $signature: 250 - }; - A.numberClass__closure6.prototype = { - call$2($self, $name) { - return $self.assertInt$1($name); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 538 - }; - A.numberClass__closure7.prototype = { - call$4($self, min, max, $name) { - return $self.valueInRange$3(min, max, $name); - }, - call$3($self, min, max) { - return this.call$4($self, min, max, null); - }, - "call*": "call$4", - $requiredArgCount: 3, - $defaultValues() { - return [null]; - }, - $signature: 539 - }; - A.numberClass__closure8.prototype = { - call$2($self, $name) { - $self.assertNoUnits$1($name); - return $self; - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 540 - }; - A.numberClass__closure9.prototype = { - call$3($self, unit, $name) { - $self.assertUnit$2(unit, $name); - return $self; - }, - call$2($self, unit) { - return this.call$3($self, unit, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 541 - }; - A.numberClass__closure10.prototype = { - call$2($self, unit) { - return $self.hasUnit$1(unit); - }, - $signature: 252 - }; - A.numberClass__closure11.prototype = { - call$2($self, unit) { - return $self.get$hasUnits() && $self.compatibleWithUnit$1(unit); - }, - $signature: 252 - }; - A.numberClass__closure12.prototype = { - call$4($self, numeratorUnits, denominatorUnits, $name) { - var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), - t2 = type$.String; - t1 = J.cast$1$0$ax(t1, t2); - t2 = J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2); - return A.SassNumber_SassNumber$withUnits0($self._number1$_coerceOrConvertValue$4$coerceUnitless$name(t1, t2, false, $name), t2, t1); - }, - call$3($self, numeratorUnits, denominatorUnits) { - return this.call$4($self, numeratorUnits, denominatorUnits, null); - }, - "call*": "call$4", - $requiredArgCount: 3, - $defaultValues() { - return [null]; - }, - $signature: 253 - }; - A.numberClass__closure13.prototype = { - call$4($self, other, $name, otherName) { - return $self.convertToMatch$3(other, $name, otherName); - }, - call$2($self, other) { - return this.call$4($self, other, null, null); - }, - call$3($self, other, $name) { - return this.call$4($self, other, $name, null); - }, - "call*": "call$4", - $requiredArgCount: 2, - $defaultValues() { - return [null, null]; - }, - $signature: 254 - }; - A.numberClass__closure14.prototype = { - call$4($self, numeratorUnits, denominatorUnits, $name) { - var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), - t2 = type$.String; - t1 = J.cast$1$0$ax(t1, t2); - return $self._number1$_coerceOrConvertValue$4$coerceUnitless$name(t1, J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2), false, $name); - }, - call$3($self, numeratorUnits, denominatorUnits) { - return this.call$4($self, numeratorUnits, denominatorUnits, null); - }, - "call*": "call$4", - $requiredArgCount: 3, - $defaultValues() { - return [null]; - }, - $signature: 255 - }; - A.numberClass__closure15.prototype = { - call$4($self, other, $name, otherName) { - return $self.convertValueToMatch$3(other, $name, otherName); - }, - call$2($self, other) { - return this.call$4($self, other, null, null); - }, - call$3($self, other, $name) { - return this.call$4($self, other, $name, null); - }, - "call*": "call$4", - $requiredArgCount: 2, - $defaultValues() { - return [null, null]; - }, - $signature: 256 - }; - A.numberClass__closure16.prototype = { - call$4($self, numeratorUnits, denominatorUnits, $name) { - var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), - t2 = type$.String; - t1 = J.cast$1$0$ax(t1, t2); - return $self.coerce$3(t1, J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2), $name); - }, - call$3($self, numeratorUnits, denominatorUnits) { - return this.call$4($self, numeratorUnits, denominatorUnits, null); - }, - "call*": "call$4", - $requiredArgCount: 3, - $defaultValues() { - return [null]; - }, - $signature: 253 - }; - A.numberClass__closure17.prototype = { - call$4($self, other, $name, otherName) { - return $self.coerceToMatch$3(other, $name, otherName); - }, - call$2($self, other) { - return this.call$4($self, other, null, null); - }, - call$3($self, other, $name) { - return this.call$4($self, other, $name, null); - }, - "call*": "call$4", - $requiredArgCount: 2, - $defaultValues() { - return [null, null]; - }, - $signature: 254 - }; - A.numberClass__closure18.prototype = { - call$4($self, numeratorUnits, denominatorUnits, $name) { - var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), - t2 = type$.String; - t1 = J.cast$1$0$ax(t1, t2); - return $self.coerceValue$3(t1, J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2), $name); - }, - call$3($self, numeratorUnits, denominatorUnits) { - return this.call$4($self, numeratorUnits, denominatorUnits, null); - }, - "call*": "call$4", - $requiredArgCount: 3, - $defaultValues() { - return [null]; - }, - $signature: 255 - }; - A.numberClass__closure19.prototype = { - call$4($self, other, $name, otherName) { - return $self.coerceValueToMatch$3(other, $name, otherName); - }, - call$2($self, other) { - return this.call$4($self, other, null, null); - }, - call$3($self, other, $name) { - return this.call$4($self, other, $name, null); - }, - "call*": "call$4", - $requiredArgCount: 2, - $defaultValues() { - return [null, null]; - }, - $signature: 256 - }; - A._ConstructorOptions0.prototype = {}; - A._NodeSassNumber.prototype = {}; - A.legacyNumberClass_closure.prototype = { - call$4(thisArg, value, unit, dartValue) { - var t1; - if (dartValue == null) { - value.toString; - t1 = A._parseNumber(value, unit); - } else - t1 = dartValue; - J.set$dartValue$x(thisArg, t1); - }, - call$2(thisArg, value) { - return this.call$4(thisArg, value, null, null); - }, - call$3(thisArg, value, unit) { - return this.call$4(thisArg, value, unit, null); - }, - "call*": "call$4", - $requiredArgCount: 2, - $defaultValues() { - return [null, null]; - }, - $signature: 547 - }; - A.legacyNumberClass_closure0.prototype = { - call$1(thisArg) { - return J.get$dartValue$x(thisArg)._number1$_value; - }, - $signature: 548 - }; - A.legacyNumberClass_closure1.prototype = { - call$2(thisArg, value) { - var t1 = J.getInterceptor$x(thisArg), - t2 = J.get$numeratorUnits$x(t1.get$dartValue(thisArg)); - t1.set$dartValue(thisArg, A.SassNumber_SassNumber$withUnits0(value, J.get$denominatorUnits$x(t1.get$dartValue(thisArg)), t2)); - }, - $signature: 549 - }; - A.legacyNumberClass_closure2.prototype = { - call$1(thisArg) { - var t1 = J.getInterceptor$x(thisArg), - t2 = B.JSArray_methods.join$1(J.get$numeratorUnits$x(t1.get$dartValue(thisArg)), "*"), - t3 = J.get$denominatorUnits$x(t1.get$dartValue(thisArg)).length === 0 ? "" : "/"; - return t2 + t3 + B.JSArray_methods.join$1(J.get$denominatorUnits$x(t1.get$dartValue(thisArg)), "*"); - }, - $signature: 550 - }; - A.legacyNumberClass_closure3.prototype = { - call$2(thisArg, unit) { - var t1 = J.getInterceptor$x(thisArg); - t1.set$dartValue(thisArg, A._parseNumber(t1.get$dartValue(thisArg)._number1$_value, unit)); - }, - $signature: 551 - }; - A._parseNumber_closure.prototype = { - call$1(unit) { - return unit.length === 0; - }, - $signature: 5 - }; - A._parseNumber_closure0.prototype = { - call$1(unit) { - return unit.length === 0; - }, - $signature: 5 - }; - A.SassNumber0.prototype = { - get$unitString() { - var _this = this; - return _this.get$hasUnits() ? _this._number1$_unitString$2(_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this)) : ""; - }, - accept$1$1(visitor) { - return visitor.visitNumber$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - withoutSlash$0() { - var _this = this; - return _this.asSlash == null ? _this : _this.withValue$1(_this._number1$_value); - }, - assertNumber$1($name) { - return this; - }, - assertNumber$0() { - return this.assertNumber$1(null); - }, - assertInt$1($name) { - var _0_0 = A.fuzzyAsInt0(this._number1$_value); - if (_0_0 != null) - return _0_0; - throw A.wrapException(A.SassScriptException$0(this.toString$0(0) + " is not an int.", $name)); - }, - assertInt$0() { - return this.assertInt$1(null); - }, - valueInRange$3(min, max, $name) { - var _this = this, - _0_0 = A.fuzzyCheckRange0(_this._number1$_value, min, max); - if (_0_0 != null) - return _0_0; - throw A.wrapException(A.SassScriptException$0("Expected " + _this.toString$0(0) + " to be within " + A.S(min) + _this.get$unitString() + " and " + A.S(max) + _this.get$unitString() + ".", $name)); - }, - valueInRangeWithUnit$4(min, max, $name, unit) { - var _0_0 = A.fuzzyCheckRange0(this._number1$_value, min, max); - if (_0_0 != null) - return _0_0; - throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to be within " + min + unit + " and " + max + unit + ".", $name)); - }, - hasCompatibleUnits$1(other) { - var _this = this; - if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length) - return false; - if (_this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) - return false; - return _this.isComparableTo$1(other); - }, - assertUnit$2(unit, $name) { - if (this.hasUnit$1(unit)) - return; - throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + ' to have unit "' + unit + '".', $name)); - }, - assertNoUnits$1($name) { - if (!this.get$hasUnits()) - return; - throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to have no units.", $name)); - }, - assertNoUnits$0() { - return this.assertNoUnits$1(null); - }, - convertToMatch$3(other, $name, otherName) { - var t1 = this.convertValueToMatch$3(other, $name, otherName), - t2 = other.get$numeratorUnits(other); - return A.SassNumber_SassNumber$withUnits0(t1, other.get$denominatorUnits(other), t2); - }, - convertValueToMatch$3(other, $name, otherName) { - return this._number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), false, $name, other, otherName); - }, - convertValueToMatch$1(other) { - return this.convertValueToMatch$3(other, null, null); - }, - coerce$3(newNumerators, newDenominators, $name) { - return A.SassNumber_SassNumber$withUnits0(this.coerceValue$3(newNumerators, newDenominators, $name), newDenominators, newNumerators); - }, - coerce$2(newNumerators, newDenominators) { - return this.coerce$3(newNumerators, newDenominators, null); - }, - coerceValue$3(newNumerators, newDenominators, $name) { - return this._number1$_coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, true, $name); - }, - coerceValueToUnit$2(unit, $name) { - var t1 = type$.JSArray_String; - return this.coerceValue$3(A._setArrayType([unit], t1), A._setArrayType([], t1), $name); - }, - coerceValueToUnit$1(unit) { - return this.coerceValueToUnit$2(unit, null); - }, - coerceToMatch$3(other, $name, otherName) { - var t1 = this.coerceValueToMatch$3(other, $name, otherName), - t2 = other.get$numeratorUnits(other); - return A.SassNumber_SassNumber$withUnits0(t1, other.get$denominatorUnits(other), t2); - }, - coerceValueToMatch$3(other, $name, otherName) { - return this._number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), true, $name, other, otherName); - }, - coerceValueToMatch$1(other) { - return this.coerceValueToMatch$3(other, null, null); - }, - _number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, other, otherName) { - var t1, otherHasUnits, t2, compatibilityException, oldNumerators, oldDenominators, _this = this, _box_0 = {}; - if (B.C_ListEquality.equals$2(0, _this.get$numeratorUnits(_this), newNumerators) && B.C_ListEquality.equals$2(0, _this.get$denominatorUnits(_this), newDenominators)) - return _this._number1$_value; - t1 = J.getInterceptor$asx(newNumerators); - otherHasUnits = t1.get$isNotEmpty(newNumerators) || J.get$isNotEmpty$asx(newDenominators); - if (coerceUnitless) - t2 = !_this.get$hasUnits() || !otherHasUnits; - else - t2 = false; - if (t2) - return _this._number1$_value; - compatibilityException = new A.SassNumber__coerceOrConvertValue_compatibilityException0(_this, other, otherName, otherHasUnits, $name, newNumerators, newDenominators); - _box_0.value = _this._number1$_value; - t2 = _this.get$numeratorUnits(_this); - oldNumerators = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); - for (t1 = t1.get$iterator(newNumerators); t1.moveNext$0();) - A.removeFirstWhere0(oldNumerators, new A.SassNumber__coerceOrConvertValue_closure3(_box_0, t1.get$current(t1)), new A.SassNumber__coerceOrConvertValue_closure4(compatibilityException)); - t1 = _this.get$denominatorUnits(_this); - oldDenominators = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); - for (t1 = J.get$iterator$ax(newDenominators); t1.moveNext$0();) - A.removeFirstWhere0(oldDenominators, new A.SassNumber__coerceOrConvertValue_closure5(_box_0, t1.get$current(t1)), new A.SassNumber__coerceOrConvertValue_closure6(compatibilityException)); - if (oldNumerators.length !== 0 || oldDenominators.length !== 0) - throw A.wrapException(compatibilityException.call$0()); - return _box_0.value; - }, - _number1$_coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, coerceUnitless, $name) { - return this._number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, null, null); - }, - isComparableTo$1(other) { - var exception; - if (!this.get$hasUnits() || !other.get$hasUnits()) - return true; - try { - this.greaterThan$1(other); - return true; - } catch (exception) { - if (A.unwrapException(exception) instanceof A.SassScriptException0) - return false; - else - throw exception; - } - }, - greaterThan$1(other) { - if (other instanceof A.SassNumber0) - return this._number1$_coerceUnits$2(other, A.number2__fuzzyGreaterThan$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; - throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); - }, - greaterThanOrEquals$1(other) { - if (other instanceof A.SassNumber0) - return this._number1$_coerceUnits$2(other, A.number2__fuzzyGreaterThanOrEquals$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; - throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); - }, - lessThan$1(other) { - if (other instanceof A.SassNumber0) - return this._number1$_coerceUnits$2(other, A.number2__fuzzyLessThan$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; - throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); - }, - lessThanOrEquals$1(other) { - if (other instanceof A.SassNumber0) - return this._number1$_coerceUnits$2(other, A.number2__fuzzyLessThanOrEquals$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; - throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); - }, - modulo$1(other) { - if (other instanceof A.SassNumber0) - return this.withValue$1(this._number1$_coerceUnits$2(other, A.number2__moduloLikeSass$closure())); - throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); - }, - plus$1(other) { - var _this = this; - if (other instanceof A.SassNumber0) - return _this.withValue$1(_this._number1$_coerceUnits$2(other, new A.SassNumber_plus_closure0())); - if (!(other instanceof A.SassColor0)) - return _this.super$Value$plus0(other); - throw A.wrapException(A.SassScriptException$0('Undefined operation "' + _this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); - }, - minus$1(other) { - var _this = this; - if (other instanceof A.SassNumber0) - return _this.withValue$1(_this._number1$_coerceUnits$2(other, new A.SassNumber_minus_closure0())); - if (!(other instanceof A.SassColor0)) - return _this.super$Value$minus0(other); - throw A.wrapException(A.SassScriptException$0('Undefined operation "' + _this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); - }, - times$1(other) { - var _this = this; - if (other instanceof A.SassNumber0) { - if (!other.get$hasUnits()) - return _this.withValue$1(_this._number1$_value * other._number1$_value); - return _this.multiplyUnits$3(_this._number1$_value * other._number1$_value, other.get$numeratorUnits(other), other.get$denominatorUnits(other)); - } - throw A.wrapException(A.SassScriptException$0('Undefined operation "' + _this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); - }, - dividedBy$1(other) { - var _this = this; - if (other instanceof A.SassNumber0) { - if (!other.get$hasUnits()) - return _this.withValue$1(_this._number1$_value / other._number1$_value); - return _this.multiplyUnits$3(_this._number1$_value / other._number1$_value, other.get$denominatorUnits(other), other.get$numeratorUnits(other)); - } - return _this.super$Value$dividedBy0(other); - }, - unaryPlus$0() { - return this; - }, - _number1$_coerceUnits$1$2(other, operation) { - var t1, exception; - try { - t1 = operation.call$2(this._number1$_value, other.coerceValueToMatch$1(this)); - return t1; - } catch (exception) { - if (A.unwrapException(exception) instanceof A.SassScriptException0) { - this.coerceValueToMatch$1(other); - throw exception; - } else - throw exception; - } - }, - _number1$_coerceUnits$2(other, operation) { - return this._number1$_coerceUnits$1$2(other, operation, type$.dynamic); - }, - multiplyUnits$3(value, otherNumerators, otherDenominators) { - var t1, _0_1, _0_6, _0_3, _0_9, _0_9_isSet, _0_7, _0_7_isSet, t2, _0_2, denominators_case_0, _0_11_isSet, _0_11, _0_13, _0_13_isSet, _0_10, numerators_case_0, t4, t3, t5, t6, t7, numerators_case_1, denominators_case_1, t0, newNumerators, mutableOtherDenominators, _i, numerator, mutableDenominatorUnits, _this = this, _null = null, _box_0 = {}; - _box_0.value = value; - t1 = [_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this), otherNumerators, otherDenominators]; - _0_1 = t1[0]; - _0_6 = _null; - _0_3 = _null; - _0_9 = _null; - _0_9_isSet = false; - _0_7 = _null; - _0_7_isSet = false; - t2 = false; - _0_2 = t1[1]; - _0_3 = t1[2]; - _0_6 = _0_3.length <= 0; - _0_7_isSet = _0_6; - if (_0_7_isSet) { - _0_7 = t1[3]; - _0_9 = _0_7.length <= 0; - t2 = _0_9; - } - _0_9_isSet = _0_7_isSet; - denominators_case_0 = _0_2; - _0_11_isSet = !t2; - _0_11 = _null; - _0_13 = _null; - if (_0_11_isSet) { - _0_11 = _0_1.length <= 0; - _0_13_isSet = _0_11; - _0_10 = _0_1; - if (_0_13_isSet) { - _0_13 = _0_2.length <= 0; - t2 = _0_13; - if (t2) { - if (_0_7_isSet) - denominators_case_0 = _0_7; - else { - _0_7 = t1[3]; - denominators_case_0 = _0_7; - _0_7_isSet = true; - } - numerators_case_0 = _0_3; - } else - numerators_case_0 = _0_1; - } else { - numerators_case_0 = _0_1; - t2 = false; - } - _0_1 = _0_10; - } else { - numerators_case_0 = _0_1; - _0_13_isSet = false; - t2 = true; - } - if (t2) { - t4 = denominators_case_0; - t3 = numerators_case_0; - } else { - t4 = _null; - t3 = t4; - } - if (!t2) { - t2 = _null; - t5 = _null; - if (_0_11_isSet) - t6 = _0_11; - else { - _0_11 = _0_1.length <= 0; - t6 = _0_11; - } - t7 = false; - if (t6) { - if (_0_9_isSet) - t2 = _0_9; - else { - if (_0_7_isSet) - t2 = _0_7; - else { - _0_7 = t1[3]; - t2 = _0_7; - _0_7_isSet = true; - } - _0_9 = t2.length <= 0; - t2 = _0_9; - } - numerators_case_1 = _0_3; - denominators_case_1 = _0_2; - } else { - numerators_case_1 = t2; - t2 = t7; - denominators_case_1 = t5; - } - if (!t2) { - t2 = false; - if (_0_13_isSet) - t5 = _0_13; - else { - _0_13 = _0_2.length <= 0; - t5 = _0_13; - } - if (t5) { - if (_0_6) - denominators_case_1 = _0_7_isSet ? _0_7 : t1[3]; - t1 = _0_6; - } else - t1 = t2; - numerators_case_1 = _0_1; - } else - t1 = true; - if (t1) { - t1 = !_this._number1$_areAnyConvertible$2(numerators_case_1, denominators_case_1); - if (t1) { - t3 = denominators_case_1; - t2 = numerators_case_1; - } else { - t2 = t3; - t3 = t4; - } - t0 = t3; - t3 = t1; - t1 = t2; - t2 = t0; - } else { - t2 = t4; - t1 = t3; - t3 = false; - } - } else { - t2 = t4; - t1 = t3; - t3 = true; - } - if (t3) - return A.SassNumber_SassNumber$withUnits0(value, t2, t1); - newNumerators = A._setArrayType([], type$.JSArray_String); - mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); - for (t1 = _this.get$numeratorUnits(_this), t2 = t1.length, _i = 0; _i < t2; ++_i) { - numerator = t1[_i]; - A.removeFirstWhere0(mutableOtherDenominators, new A.SassNumber_multiplyUnits_closure3(_box_0, numerator), new A.SassNumber_multiplyUnits_closure4(newNumerators, numerator)); - } - t1 = _this.get$denominatorUnits(_this); - mutableDenominatorUnits = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); - for (t1 = otherNumerators.length, _i = 0; _i < t1; ++_i) { - numerator = otherNumerators[_i]; - A.removeFirstWhere0(mutableDenominatorUnits, new A.SassNumber_multiplyUnits_closure5(_box_0, numerator), new A.SassNumber_multiplyUnits_closure6(newNumerators, numerator)); - } - t1 = _box_0.value; - B.JSArray_methods.addAll$1(mutableDenominatorUnits, mutableOtherDenominators); - return A.SassNumber_SassNumber$withUnits0(t1, mutableDenominatorUnits, newNumerators); - }, - _number1$_areAnyConvertible$2(units1, units2) { - return B.JSArray_methods.any$1(units1, new A.SassNumber__areAnyConvertible_closure0(units2)); - }, - _number1$_unitString$2(numerators, denominators) { - var _0_4, _0_7, _0_6, _0_5, t1, _0_9, _0_6_isSet, _0_5_isSet, _0_10, denominator, _null = null; - $label0$0: { - _0_4 = J.get$length$asx(numerators) <= 0; - _0_7 = _null; - _0_6 = _null; - _0_5 = _null; - if (_0_4) { - _0_6 = J.get$length$asx(denominators); - t1 = _0_6; - _0_7 = t1 <= 0; - t1 = _0_7; - _0_5 = denominators; - } else - t1 = false; - if (t1) { - t1 = "no units"; - break $label0$0; - } - _0_9 = _null; - if (_0_4) { - _0_9 = _0_6 === 1; - t1 = _0_9; - _0_6_isSet = true; - _0_5_isSet = true; - } else { - _0_5_isSet = _0_4; - _0_6_isSet = _0_5_isSet; - t1 = false; - } - if (t1) { - _0_10 = J.$index$asx(_0_5_isSet ? _0_5 : denominators, 0); - denominator = _0_10; - t1 = denominator + "^-1"; - break $label0$0; - } - if (_0_4) { - t1 = "(" + J.join$1$ax(denominators, "*") + ")^-1"; - break $label0$0; - } - if (_0_6_isSet) - t1 = _0_6; - else { - if (_0_5_isSet) - t1 = _0_5; - else { - t1 = denominators; - _0_5 = t1; - _0_5_isSet = true; - } - _0_6 = J.get$length$asx(t1); - t1 = _0_6; - _0_6_isSet = true; - } - _0_7 = t1 <= 0; - t1 = _0_7; - if (t1) { - t1 = J.join$1$ax(numerators, "*"); - break $label0$0; - } - if (_0_6_isSet) - t1 = _0_6; - else { - if (_0_5_isSet) - t1 = _0_5; - else { - t1 = denominators; - _0_5 = t1; - _0_5_isSet = true; - } - _0_6 = J.get$length$asx(t1); - t1 = _0_6; - } - _0_9 = t1 === 1; - t1 = _0_9; - if (t1) { - _0_10 = J.$index$asx(_0_5_isSet ? _0_5 : denominators, 0); - denominator = _0_10; - t1 = J.join$1$ax(numerators, "*") + "/" + denominator; - break $label0$0; - } - t1 = J.join$1$ax(numerators, "*") + "/(" + J.join$1$ax(denominators, "*") + ")"; - break $label0$0; - } - return t1; - }, - $eq(_, other) { - var _this = this; - if (other == null) - return false; - if (!(other instanceof A.SassNumber0)) - return false; - if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length || _this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) - return false; - if (!_this.get$hasUnits()) - return A.fuzzyEquals0(_this._number1$_value, other._number1$_value); - if (!B.C_ListEquality.equals$2(0, _this._number1$_canonicalizeUnitList$1(_this.get$numeratorUnits(_this)), _this._number1$_canonicalizeUnitList$1(other.get$numeratorUnits(other))) || !B.C_ListEquality.equals$2(0, _this._number1$_canonicalizeUnitList$1(_this.get$denominatorUnits(_this)), _this._number1$_canonicalizeUnitList$1(other.get$denominatorUnits(other)))) - return false; - return A.fuzzyEquals0(_this._number1$_value * _this._number1$_canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._number1$_canonicalMultiplier$1(_this.get$denominatorUnits(_this)), other._number1$_value * _this._number1$_canonicalMultiplier$1(other.get$numeratorUnits(other)) / _this._number1$_canonicalMultiplier$1(other.get$denominatorUnits(other))); - }, - get$hashCode(_) { - var _this = this, - t1 = _this.hashCache; - return t1 == null ? _this.hashCache = A.fuzzyHashCode0(_this._number1$_value * _this._number1$_canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._number1$_canonicalMultiplier$1(_this.get$denominatorUnits(_this))) : t1; - }, - _number1$_canonicalizeUnitList$1(units) { - var type, - t1 = units.length; - if (t1 === 0) - return units; - if (t1 === 1) { - type = $.$get$_typesByUnit0().$index(0, B.JSArray_methods.get$first(units)); - if (type == null) - t1 = units; - else { - t1 = B.Map_397RH.$index(0, type); - t1.toString; - t1 = A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_String); - } - return t1; - } - t1 = A._arrayInstanceType(units)._eval$1("MappedListIterable<1,String>"); - t1 = A.List_List$of(new A.MappedListIterable(units, new A.SassNumber__canonicalizeUnitList_closure0(), t1), true, t1._eval$1("ListIterable.E")); - B.JSArray_methods.sort$0(t1); - return t1; - }, - _number1$_canonicalMultiplier$1(units) { - return B.JSArray_methods.fold$2(units, 1, new A.SassNumber__canonicalMultiplier_closure0(this)); - }, - canonicalMultiplierForUnit$1(unit) { - var t1, - innerMap = B.Map_gQqJO.$index(0, unit); - if (innerMap == null) - t1 = 1; - else { - t1 = innerMap.get$values(innerMap); - t1 = 1 / t1.get$first(t1); - } - return t1; - }, - unitSuggestion$2($name, unit) { - var t2, t3, result, _this = this, - t1 = _this.get$denominatorUnits(_this); - t1 = new A.MappedListIterable(t1, new A.SassNumber_unitSuggestion_closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); - t2 = _this.get$numeratorUnits(_this); - t2 = new A.MappedListIterable(t2, new A.SassNumber_unitSuggestion_closure2(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,String>")).join$0(0); - t3 = unit == null ? "" : " * 1" + unit; - result = "$" + $name + t1 + t2 + t3; - return _this.get$numeratorUnits(_this).length === 0 ? result : "calc(" + result + ")"; - }, - unitSuggestion$1($name) { - return this.unitSuggestion$2($name, null); - } - }; - A.SassNumber__coerceOrConvertValue_compatibilityException0.prototype = { - call$0() { - var t2, t3, message, t4, type, unit, _this = this, - t1 = _this.other; - if (t1 != null) { - t2 = _this.$this; - t3 = t2.toString$0(0) + " and"; - message = new A.StringBuffer(t3); - t4 = _this.otherName; - if (t4 != null) - t3 = message._contents = t3 + (" $" + t4 + ":"); - t1 = t3 + (" " + t1.toString$0(0) + " have incompatible units"); - message._contents = t1; - if (!t2.get$hasUnits() || !_this.otherHasUnits) - message._contents = t1 + " (one has units and the other doesn't)"; - t1 = message.toString$0(0) + "."; - t2 = _this.name; - return new A.SassScriptException0(t2 == null ? t1 : "$" + t2 + ": " + t1); - } else if (!_this.otherHasUnits) { - t1 = "Expected " + _this.$this.toString$0(0) + " to have no units."; - t2 = _this.name; - return new A.SassScriptException0(t2 == null ? t1 : "$" + t2 + ": " + t1); - } else { - t1 = _this.newNumerators; - t2 = J.getInterceptor$asx(t1); - if (t2.get$length(t1) === 1 && J.get$isEmpty$asx(_this.newDenominators)) { - type = $.$get$_typesByUnit0().$index(0, t2.get$first(t1)); - if (type != null) { - t1 = _this.$this.toString$0(0); - t2 = B.JSArray_methods.contains$1(A._setArrayType([97, 101, 105, 111, 117], type$.JSArray_int), type.charCodeAt(0)) ? "an " + type : "a " + type; - t3 = B.Map_397RH.$index(0, type); - t3.toString; - t3 = "Expected " + t1 + " to have " + t2 + " unit (" + B.JSArray_methods.join$1(t3, ", ") + ")."; - t2 = _this.name; - return new A.SassScriptException0(t2 == null ? t3 : "$" + t2 + ": " + t3); - } - } - t3 = _this.newDenominators; - unit = A.pluralize0("unit", t2.get$length(t1) + J.get$length$asx(t3), null); - t2 = _this.$this; - t3 = "Expected " + t2.toString$0(0) + " to have " + unit + " " + t2._number1$_unitString$2(t1, t3) + "."; - t1 = _this.name; - return new A.SassScriptException0(t1 == null ? t3 : "$" + t1 + ": " + t3); - } - }, - $signature: 552 - }; - A.SassNumber__coerceOrConvertValue_closure3.prototype = { - call$1(oldNumerator) { - var factor = A.conversionFactor0(this.newNumerator, oldNumerator); - if (factor == null) - return false; - this._box_0.value *= factor; - return true; - }, - $signature: 5 - }; - A.SassNumber__coerceOrConvertValue_closure4.prototype = { - call$0() { - return A.throwExpression(this.compatibilityException.call$0()); - }, - $signature: 0 - }; - A.SassNumber__coerceOrConvertValue_closure5.prototype = { - call$1(oldDenominator) { - var factor = A.conversionFactor0(this.newDenominator, oldDenominator); - if (factor == null) - return false; - this._box_0.value /= factor; - return true; - }, - $signature: 5 - }; - A.SassNumber__coerceOrConvertValue_closure6.prototype = { - call$0() { - return A.throwExpression(this.compatibilityException.call$0()); - }, - $signature: 0 - }; - A.SassNumber_plus_closure0.prototype = { - call$2(num1, num2) { - return num1 + num2; - }, - $signature: 57 - }; - A.SassNumber_minus_closure0.prototype = { - call$2(num1, num2) { - return num1 - num2; - }, - $signature: 57 - }; - A.SassNumber_multiplyUnits_closure3.prototype = { - call$1(denominator) { - var factor = A.conversionFactor0(this.numerator, denominator); - if (factor == null) - return false; - this._box_0.value /= factor; - return true; - }, - $signature: 5 - }; - A.SassNumber_multiplyUnits_closure4.prototype = { - call$0() { - return this.newNumerators.push(this.numerator); - }, - $signature: 0 - }; - A.SassNumber_multiplyUnits_closure5.prototype = { - call$1(denominator) { - var factor = A.conversionFactor0(this.numerator, denominator); - if (factor == null) - return false; - this._box_0.value /= factor; - return true; - }, - $signature: 5 - }; - A.SassNumber_multiplyUnits_closure6.prototype = { - call$0() { - return this.newNumerators.push(this.numerator); - }, - $signature: 0 - }; - A.SassNumber__areAnyConvertible_closure0.prototype = { - call$1(unit1) { - var t1, - _0_0 = B.Map_gQqJO.$index(0, unit1); - $label0$0: { - if (_0_0 != null) { - t1 = B.JSArray_methods.any$1(this.units2, _0_0.get$containsKey()); - break $label0$0; - } - t1 = B.JSArray_methods.contains$1(this.units2, unit1); - break $label0$0; - } - return t1; - }, - $signature: 5 - }; - A.SassNumber__canonicalizeUnitList_closure0.prototype = { - call$1(unit) { - var t1, - type = $.$get$_typesByUnit0().$index(0, unit); - if (type == null) - t1 = unit; - else { - t1 = B.Map_397RH.$index(0, type); - t1.toString; - t1 = B.JSArray_methods.get$first(t1); - } - return t1; - }, - $signature: 6 - }; - A.SassNumber__canonicalMultiplier_closure0.prototype = { - call$2(multiplier, unit) { - return multiplier * this.$this.canonicalMultiplierForUnit$1(unit); - }, - $signature: 163 - }; - A.SassNumber_unitSuggestion_closure1.prototype = { - call$1(unit) { - return " * 1" + unit; - }, - $signature: 6 - }; - A.SassNumber_unitSuggestion_closure2.prototype = { - call$1(unit) { - return " / 1" + unit; - }, - $signature: 6 - }; - A.OklabColorSpace0.prototype = { - get$isBoundedInternal() { - return false; - }, - convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, missingChroma, missingHue) { - var missingLightness, missingA, missingB, t1; - if (dest === B.OklchColorSpace_li80) - return A.labToLch0(dest, lightness, a, b, alpha, missingChroma, missingHue); - missingLightness = lightness == null; - missingA = a == null; - missingB = b == null; - if (missingLightness) - lightness = 0; - if (missingA) - a = 0; - if (missingB) - b = 0; - t1 = $.$get$oklabToLms0(); - return B.LmsColorSpace_8I80.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, Math.pow(t1[0] * lightness + t1[1] * a + t1[2] * b, 3) + 0, Math.pow(t1[3] * lightness + t1[4] * a + t1[5] * b, 3) + 0, Math.pow(t1[6] * lightness + t1[7] * a + t1[8] * b, 3) + 0, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); - }, - convert$5(dest, lightness, a, b, alpha) { - return this.convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, false, false); - } - }; - A.OklchColorSpace0.prototype = { - get$isBoundedInternal() { - return false; - }, - get$isPolarInternal() { - return true; - }, - convert$5(dest, lightness, chroma, hue, alpha) { - var t1 = hue == null, - hueRadians = (t1 ? 0 : hue) * 3.141592653589793 / 180, - t2 = chroma == null, - t3 = t2 ? 0 : chroma, - t4 = Math.cos(hueRadians), - t5 = t2 ? 0 : chroma; - return B.OklabColorSpace_yrt0.convert$7$missingChroma$missingHue(dest, lightness, t3 * t4, t5 * Math.sin(hueRadians), alpha, t2, t1); - } - }; - A.SupportsOperation0.prototype = { - toInterpolation$0() { - var t1 = new A.StringBuffer(""), - t2 = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), - t3 = this.span, - t4 = this.left, - t5 = A.SpanExtensions_before(t3, t4.get$span(t4)); - t5 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t5.file._decodedChars, t5._file$_start, t5._end), 0, null); - t1._contents += t5; - t2.addInterpolation$1(t4.toInterpolation$0()); - t5 = this.right; - t4 = A.SpanExtensions_between(t4.get$span(t4), t5.get$span(t5)); - t4 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4.file._decodedChars, t4._file$_start, t4._end), 0, null); - t1._contents += t4; - t2.addInterpolation$1(t5.toInterpolation$0()); - t5 = A.SpanExtensions_after(t3, t5.get$span(t5)); - t5 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t5.file._decodedChars, t5._file$_start, t5._end), 0, null); - t1._contents += t5; - return t2.interpolation$1(t3); - }, - withSpan$1(span) { - return A.SupportsOperation$0(this.left, this.right, this.operator, span); - }, - toString$0(_) { - var _this = this; - return _this._operation0$_parenthesize$1(_this.left) + " " + _this.operator + " " + _this._operation0$_parenthesize$1(_this.right); - }, - _operation0$_parenthesize$1(condition) { - var t1; - if (!(condition instanceof A.SupportsNegation0)) - t1 = condition instanceof A.SupportsOperation0 && condition.operator === this.operator; - else - t1 = true; - return t1 ? "(" + condition.toString$0(0) + ")" : condition.toString$0(0); - }, - $isAstNode0: 1, - $isSassNode: 1, - $isSupportsCondition: 1, - get$span(receiver) { - return this.span; - } - }; - A.ParentSelector0.prototype = { - accept$1$1(visitor) { - return visitor.visitParentSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - unify$1(compound) { - return A.throwExpression(A.UnsupportedError$("& doesn't support unification.")); - } - }; - A.ParentStatement0.prototype = {}; - A.ParentStatement_closure0.prototype = { - call$1(child) { - var t1; - $label0$0: { - if (child instanceof A.VariableDeclaration0 || child instanceof A.FunctionRule0 || child instanceof A.MixinRule0) { - t1 = true; - break $label0$0; - } - if (child instanceof A.ImportRule0) { - t1 = B.JSArray_methods.any$1(child.imports, new A.ParentStatement__closure0()); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - $signature: 244 - }; - A.ParentStatement__closure0.prototype = { - call$1($import) { - return $import instanceof A.DynamicImport0; - }, - $signature: 245 - }; - A.ParenthesizedExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitParenthesizedExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "(" + this.expression.toString$0(0) + ")"; - }, - get$span(receiver) { - return this.span; - } - }; - A.ParserExports.prototype = {}; - A.loadParserExports_closure.prototype = { - call$1(inner) { - return new A.JSExpressionVisitor(inner); - }, - $signature: 553 - }; - A.loadParserExports_closure0.prototype = { - call$1(inner) { - return new A.JSStatementVisitor(inner); - }, - $signature: 554 - }; - A.loadParserExports_closure1.prototype = { - call$1(set) { - return new self.Set(A.List_List$of(set, true, type$.nullable_Object)); - }, - $signature: 555 - }; - A._updateAstPrototypes_closure.prototype = { - call$3($self, start, end) { - return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2($self._decodedChars, start, end), 0, null); - }, - call$2($self, start) { - return this.call$3($self, start, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 556 - }; - A._updateAstPrototypes_closure0.prototype = { - call$1($self) { - return $self._decodedChars; - }, - $signature: 557 - }; - A._updateAstPrototypes_closure1.prototype = { - call$1($self) { - return $self.get$asPlain(); - }, - $signature: 558 - }; - A._updateAstPrototypes_closure2.prototype = { - call$2($self, visitor) { - return $self.accept$1(visitor); - }, - $signature: 559 - }; - A._updateAstPrototypes_closure3.prototype = { - call$2($self, visitor) { - return $self.accept$1(visitor); - }, - $signature: 560 - }; - A._updateAstPrototypes_closure4.prototype = { - call$1($self) { - return $self.get$span($self); - }, - $signature: 561 - }; - A._addSupportsConditionToInterpolation_closure.prototype = { - call$1($self) { - return $self.toInterpolation$0(); - }, - $signature: 562 - }; - A.Parser1.prototype = { - _parser1$_parseIdentifier$0() { - return this.wrapSpanFormatException$1(new A.Parser__parseIdentifier_closure0(this)); - }, - whitespace$0() { - do - this.whitespaceWithoutComments$0(); - while (this.scanComment$0()); - }, - whitespaceWithoutComments$0() { - var t3, - t1 = this.scanner, - t2 = t1.string.length; - while (true) { - if (t1._string_scanner$_position !== t2) { - t3 = t1.peekChar$0(); - t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; - } else - t3 = false; - if (!t3) - break; - t1.readChar$0(); - } - }, - spaces$0() { - var t3, - t1 = this.scanner, - t2 = t1.string.length; - while (true) { - if (t1._string_scanner$_position !== t2) { - t3 = t1.peekChar$0(); - t3 = t3 === 32 || t3 === 9; - } else - t3 = false; - if (!t3) - break; - t1.readChar$0(); - } - }, - scanComment$0() { - var _0_0, - t1 = this.scanner; - if (t1.peekChar$0() !== 47) - return false; - _0_0 = t1.peekChar$1(1); - if (47 === _0_0) - return this.silentComment$0(); - if (42 === _0_0) { - this.loudComment$0(); - return true; - } - return false; - }, - expectWhitespace$0() { - var t2, t3, - t1 = this.scanner; - if (t1._string_scanner$_position !== t1.string.length) { - t2 = t1.peekChar$0(); - t3 = !(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || this.scanComment$0()); - t2 = t3; - } else - t2 = true; - if (t2) - t1.error$1(0, "Expected whitespace."); - this.whitespace$0(); - }, - silentComment$0() { - var t2, t3, - t1 = this.scanner; - t1.expect$1("//"); - t2 = t1.string.length; - while (true) { - if (t1._string_scanner$_position !== t2) { - t3 = t1.peekChar$0(); - t3 = !(t3 === 10 || t3 === 13 || t3 === 12); - } else - t3 = false; - if (!t3) - break; - t1.readChar$0(); - } - return true; - }, - loudComment$0() { - var next, - t1 = this.scanner; - t1.expect$1("/*"); - for (; true;) { - if (t1.readChar$0() !== 42) - continue; - do - next = t1.readChar$0(); - while (next === 42); - if (next === 47) - break; - } - }, - identifier$2$normalize$unit(normalize, unit) { - var t2, _0_0, _this = this, - _s20_ = "Expected identifier.", - text = new A.StringBuffer(""), - t1 = _this.scanner; - if (t1.scanChar$1(45)) { - t2 = text._contents = "" + A.Primitives_stringFromCharCode(45); - if (t1.scanChar$1(45)) { - text._contents = t2 + A.Primitives_stringFromCharCode(45); - _this._parser1$_identifierBody$3$normalize$unit(text, normalize, unit); - t1 = text._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - } else - t2 = ""; - $label0$0: { - _0_0 = t1.peekChar$0(); - if (_0_0 == null) - t1.error$1(0, _s20_); - if (95 === _0_0 && normalize) { - t1.readChar$0(); - text._contents = t2 + A.Primitives_stringFromCharCode(45); - break $label0$0; - } - if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128) { - text._contents = t2 + A.Primitives_stringFromCharCode(t1.readChar$0()); - break $label0$0; - } - if (92 === _0_0) { - text._contents = t2 + _this.escape$1$identifierStart(true); - break $label0$0; - } - t1.error$1(0, _s20_); - } - _this._parser1$_identifierBody$3$normalize$unit(text, normalize, unit); - t1 = text._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - identifier$0() { - return this.identifier$2$normalize$unit(false, false); - }, - identifier$1$normalize(normalize) { - return this.identifier$2$normalize$unit(normalize, false); - }, - identifier$1$unit(unit) { - return this.identifier$2$normalize$unit(false, unit); - }, - _parser1$_identifierBody$3$normalize$unit(text, normalize, unit) { - var t1, _1_0, _0_0, t2; - for (t1 = this.scanner; true;) { - _1_0 = t1.peekChar$0(); - if (_1_0 == null) - break; - if (45 === _1_0 && unit) { - _0_0 = t1.peekChar$1(1); - if (46 !== _0_0) - t2 = A._isInt(_0_0) && _0_0 >= 48 && _0_0 <= 57; - else - t2 = true; - if (t2) - break; - t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); - text._contents += t2; - continue; - } - if (95 === _1_0 && normalize) { - t1.readChar$0(); - t2 = A.Primitives_stringFromCharCode(45); - text._contents += t2; - continue; - } - if (_1_0 !== 95) { - if (!(_1_0 >= 97 && _1_0 <= 122)) - t2 = _1_0 >= 65 && _1_0 <= 90; - else - t2 = true; - t2 = t2 || _1_0 >= 128; - } else - t2 = true; - if (!t2) - t2 = _1_0 >= 48 && _1_0 <= 57 || _1_0 === 45; - else - t2 = true; - if (t2) { - t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); - text._contents += t2; - continue; - } - if (92 === _1_0) { - t2 = this.escape$0(); - text._contents += t2; - continue; - } - break; - } - }, - _parser1$_identifierBody$1(text) { - return this._parser1$_identifierBody$3$normalize$unit(text, false, false); - }, - string$0() { - var buffer, _0_0, t2, - t1 = this.scanner, - quote = t1.readChar$0(); - if (quote !== 39 && quote !== 34) - t1.error$2$position(0, "Expected string.", t1._string_scanner$_position - 1); - buffer = new A.StringBuffer(""); - for (; true;) { - _0_0 = t1.peekChar$0(); - if (_0_0 === quote) { - t1.readChar$0(); - break; - } - if (_0_0 == null || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) - t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); - if (92 === _0_0) { - t2 = t1.peekChar$1(1); - if (t2 === 10 || t2 === 13 || t2 === 12) { - t1.readChar$0(); - t1.readChar$0(); - } else { - t2 = A.Primitives_stringFromCharCode(A.consumeEscapedCharacter0(t1)); - buffer._contents += t2; - } - continue; - } - t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents += t2; - } - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - declarationValue$1$allowEmpty(allowEmpty) { - var t1, t2, wroteNewline, next, wroteNewline0, t3, start, end, _0_0, _this = this, - buffer = new A.StringBuffer(""), - brackets = A._setArrayType([], type$.JSArray_int); - for (t1 = _this.scanner, t2 = _this.get$string(), wroteNewline = false; true;) { - next = t1.peekChar$0(); - if (next == null) - break; - wroteNewline0 = false; - if (92 === next) { - t3 = _this.escape$1$identifierStart(true); - buffer._contents += t3; - wroteNewline = wroteNewline0; - continue; - } - if (34 === next || 39 === next) { - start = t1._string_scanner$_position; - t2.call$0(); - end = t1._string_scanner$_position; - buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); - wroteNewline = wroteNewline0; - continue; - } - if (47 === next) { - if (t1.peekChar$1(1) === 42) { - t3 = _this.get$loudComment(); - start = t1._string_scanner$_position; - t3.call$0(); - end = t1._string_scanner$_position; - buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); - } else { - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents += t3; - } - wroteNewline = wroteNewline0; - continue; - } - if (32 === next || 9 === next) { - if (!wroteNewline) { - t3 = t1.peekChar$1(1); - t3 = !(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12); - } else - t3 = true; - if (t3) { - t3 = A.Primitives_stringFromCharCode(32); - buffer._contents += t3; - } - t1.readChar$0(); - continue; - } - if (10 === next || 13 === next || 12 === next) { - t3 = t1.peekChar$1(-1); - if (!(t3 === 10 || t3 === 13 || t3 === 12)) - buffer._contents += "\n"; - t1.readChar$0(); - wroteNewline = true; - continue; - } - if (40 === next || 123 === next || 91 === next) { - t3 = A.Primitives_stringFromCharCode(next); - buffer._contents += t3; - brackets.push(A.opposite0(t1.readChar$0())); - wroteNewline = wroteNewline0; - continue; - } - if (41 === next || 125 === next || 93 === next) { - if (brackets.length === 0) - break; - t3 = A.Primitives_stringFromCharCode(next); - buffer._contents += t3; - t1.expectChar$1(brackets.pop()); - wroteNewline = wroteNewline0; - continue; - } - if (59 === next) { - if (brackets.length === 0) - break; - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents += t3; - continue; - } - if (117 === next || 85 === next) { - _0_0 = _this.tryUrl$0(); - if (_0_0 != null) - buffer._contents += _0_0; - else { - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents += t3; - } - wroteNewline = wroteNewline0; - continue; - } - if (_this.lookingAtIdentifier$0()) { - t3 = _this.identifier$0(); - buffer._contents += t3; - } else { - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents += t3; - } - wroteNewline = wroteNewline0; - } - if (brackets.length !== 0) - t1.expectChar$1(B.JSArray_methods.get$last(brackets)); - if (!allowEmpty && buffer._contents.length === 0) - t1.error$1(0, "Expected token."); - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - declarationValue$0() { - return this.declarationValue$1$allowEmpty(false); - }, - tryUrl$0() { - var buffer, _0_0, t2, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - if (!_this.scanIdentifier$1("url")) - return null; - if (!t1.scanChar$1(40)) { - t1.set$state(start); - return null; - } - _this.whitespace$0(); - buffer = new A.StringBuffer(""); - buffer._contents = "" + "url("; - for (; true;) { - _0_0 = t1.peekChar$0(); - if (_0_0 == null) - break; - if (92 === _0_0) { - t2 = _this.escape$0(); - buffer._contents += t2; - continue; - } - t2 = true; - if (37 !== _0_0) - if (38 !== _0_0) - if (35 !== _0_0) - t2 = _0_0 >= 42 && _0_0 <= 126 || _0_0 >= 128; - if (t2) { - t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents += t2; - continue; - } - if (_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) { - _this.whitespace$0(); - if (t1.peekChar$0() !== 41) - break; - continue; - } - if (41 === _0_0) { - t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2 = buffer._contents += t2; - return t2.charCodeAt(0) == 0 ? t2 : t2; - } - break; - } - t1.set$state(start); - return null; - }, - variableName$0() { - this.scanner.expectChar$1(36); - return this.identifier$1$normalize(true); - }, - escape$1$identifierStart(identifierStart) { - var value, _0_0, i, next, t2, exception, - _s25_ = "Expected escape sequence.", - t1 = this.scanner, - start = t1._string_scanner$_position; - t1.expectChar$1(92); - value = 0; - $label0$1: { - _0_0 = t1.peekChar$0(); - if (_0_0 == null) - t1.error$1(0, _s25_); - if (_0_0 === 10 || _0_0 === 13 || _0_0 === 12) - t1.error$1(0, _s25_); - if (A.CharacterExtension_get_isHex0(_0_0)) { - for (i = 0; i < 6; ++i) { - next = t1.peekChar$0(); - if (next != null) { - t2 = true; - if (!(next >= 48 && next <= 57)) - if (!(next >= 97 && next <= 102)) - t2 = next >= 65 && next <= 70; - t2 = !t2; - } else - t2 = true; - if (t2) - break; - value *= 16; - value += A.asHex0(t1.readChar$0()); - } - this.scanCharIf$1(new A.Parser_escape_closure0()); - break $label0$1; - } - value = t1.readChar$0(); - } - if (identifierStart) { - t2 = value; - t2 = t2 === 95 || A.CharacterExtension_get_isAlphabetic0(t2) || t2 >= 128; - } else { - t2 = value; - if (!(t2 === 95 || A.CharacterExtension_get_isAlphabetic0(t2) || t2 >= 128)) - t2 = t2 >= 48 && t2 <= 57 || t2 === 45; - else - t2 = true; - } - if (t2) - try { - t2 = A.Primitives_stringFromCharCode(value); - return t2; - } catch (exception) { - if (type$.RangeError._is(A.unwrapException(exception))) - t1.error$3$length$position(0, "Invalid Unicode code point.", t1._string_scanner$_position - start, start); - else - throw exception; - } - else { - t1 = true; - if (!(value <= 31)) - if (!J.$eq$(value, 127)) - if (identifierStart) { - t1 = value; - t1 = t1 >= 48 && t1 <= 57; - } else - t1 = false; - if (t1) { - t1 = "" + A.Primitives_stringFromCharCode(92); - if (value > 15) - t1 += A.Primitives_stringFromCharCode(A.hexCharFor0(B.JSNumber_methods._shrOtherPositive$1(value, 4))); - t1 = t1 + A.Primitives_stringFromCharCode(A.hexCharFor0(value & 15)) + A.Primitives_stringFromCharCode(32); - return t1.charCodeAt(0) == 0 ? t1 : t1; - } else - return A.String_String$fromCharCodes(A._setArrayType([92, value], type$.JSArray_int), 0, null); - } - }, - escape$0() { - return this.escape$1$identifierStart(false); - }, - scanCharIf$1(condition) { - var t1 = this.scanner; - if (!condition.call$1(t1.peekChar$0())) - return false; - t1.readChar$0(); - return true; - }, - scanIdentChar$2$caseSensitive(char, caseSensitive) { - var t3, - t1 = new A.Parser_scanIdentChar_matches0(caseSensitive, char), - t2 = this.scanner, - _0_0 = t2.peekChar$0(); - if (_0_0 != null) { - t3 = t1.call$1(_0_0); - t3 = t3; - } else - t3 = false; - if (t3) { - t2.readChar$0(); - return true; - } - if (92 === _0_0) { - t3 = t2._string_scanner$_position; - if (t1.call$1(A.consumeEscapedCharacter0(t2))) - return true; - t2.set$state(new A._SpanScannerState(t2, t3)); - } - return false; - }, - scanIdentChar$1(char) { - return this.scanIdentChar$2$caseSensitive(char, false); - }, - expectIdentChar$1(letter) { - var t1; - if (this.scanIdentChar$2$caseSensitive(letter, false)) - return; - t1 = this.scanner; - t1.error$2$position(0, 'Expected "' + A.Primitives_stringFromCharCode(letter) + '".', t1._string_scanner$_position); - }, - lookingAtIdentifier$1($forward) { - var t1, _1_0, t2, _0_0; - if ($forward == null) - $forward = 0; - t1 = this.scanner; - _1_0 = t1.peekChar$1($forward); - $label0$0: { - if (A._isInt(_1_0)) - t2 = _1_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_1_0) || _1_0 >= 128; - else - t2 = false; - if (t2 || 92 === _1_0) { - t1 = true; - break $label0$0; - } - if (45 === _1_0) { - _0_0 = t1.peekChar$1($forward + 1); - $label1$1: { - if (A._isInt(_0_0)) - t1 = _0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128; - else - t1 = false; - t1 = t1 || 92 === _0_0 || 45 === _0_0; - if (t1) - break $label1$1; - break $label1$1; - } - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - lookingAtIdentifier$0() { - return this.lookingAtIdentifier$1(null); - }, - lookingAtIdentifierBody$0() { - var t1, - next = this.scanner.peekChar$0(); - if (next != null) { - if (!(next === 95 || A.CharacterExtension_get_isAlphabetic0(next) || next >= 128)) - t1 = next >= 48 && next <= 57 || next === 45; - else - t1 = true; - t1 = t1 || next === 92; - } else - t1 = false; - return t1; - }, - scanIdentifier$2$caseSensitive(text, caseSensitive) { - var t1, t2, _this = this; - if (!_this.lookingAtIdentifier$0()) - return false; - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - if (_this._parser1$_consumeIdentifier$2(text, caseSensitive) && !_this.lookingAtIdentifierBody$0()) - return true; - else { - t1.set$state(new A._SpanScannerState(t1, t2)); - return false; - } - }, - scanIdentifier$1(text) { - return this.scanIdentifier$2$caseSensitive(text, false); - }, - _parser1$_consumeIdentifier$2(text, caseSensitive) { - var t1, t2, t3; - for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { - t3 = t1.__internal$_current; - if (!this.scanIdentChar$2$caseSensitive(t3 == null ? t2._as(t3) : t3, caseSensitive)) - return false; - } - return true; - }, - expectIdentifier$2$name(text, $name) { - var t1, start, t2, t3, t4, t5, t6; - if ($name == null) - $name = '"' + text + '"'; - t1 = this.scanner; - start = t1._string_scanner$_position; - for (t2 = new A.CodeUnits(text), t3 = type$.CodeUnits, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = "Expected " + $name, t5 = t4 + ".", t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { - t6 = t2.__internal$_current; - if (this.scanIdentChar$2$caseSensitive(t6 == null ? t3._as(t6) : t6, false)) - continue; - t1.error$2$position(0, t5, start); - } - if (!this.lookingAtIdentifierBody$0()) - return; - t1.error$2$position(0, t4, start); - }, - expectIdentifier$1(text) { - return this.expectIdentifier$2$name(text, null); - }, - rawText$1(consumer) { - var t1 = this.scanner, - start = t1._string_scanner$_position; - consumer.call$0(); - return t1.substring$1(0, start); - }, - spanFrom$1(state) { - var span = this.scanner.spanFrom$1(state); - return this._parser1$_interpolationMap == null ? span : new A.LazyFileSpan0(new A.Parser_spanFrom_closure0(this, span)); - }, - error$3(_, message, span, trace) { - var exception = new A.StringScannerException(this.scanner.string, message, span); - if (trace == null) - throw A.wrapException(exception); - else - A.throwWithTrace0(exception, this.get$error(this), trace); - }, - error$2(_, message, span) { - return this.error$3(0, message, span, null); - }, - withErrorMessage$1$2(message, callback) { - var error, stackTrace, t1, exception; - try { - t1 = callback.call$0(); - return t1; - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.SourceSpanFormatException._is(t1)) { - error = t1; - stackTrace = A.getTraceFromException(exception); - t1 = J.get$span$z(error); - A.throwWithTrace0(new A.SourceSpanFormatException(error.get$source(), message, t1), error, stackTrace); - } else - throw exception; - } - }, - withErrorMessage$2(message, callback) { - return this.withErrorMessage$1$2(message, callback, type$.dynamic); - }, - wrapSpanFormatException$1$1(callback) { - var error, stackTrace, map, error0, stackTrace0, span, secondarySpans, t1, t2, span0, description, _0_0, error1, stackTrace1, span1, t3, exception, t4, _this = this, - _s8_ = "expected"; - try { - try { - t3 = callback.call$0(); - return t3; - } catch (exception) { - t3 = A.unwrapException(exception); - if (type$.SourceSpanFormatException._is(t3)) { - error = t3; - stackTrace = A.getTraceFromException(exception); - map = _this._parser1$_interpolationMap; - if (map == null) - throw exception; - A.throwWithTrace0(map.mapException$1(error), error, stackTrace); - } else - throw exception; - } - } catch (exception) { - t3 = A.unwrapException(exception); - if (type$.MultiSourceSpanFormatException._is(t3)) { - error0 = t3; - stackTrace0 = A.getTraceFromException(exception); - span = J.get$span$z(error0); - t3 = type$.FileSpan; - t4 = type$.String; - secondarySpans = error0.get$secondarySpans().cast$2$0(0, t3, t4); - if (A.startsWithIgnoreCase0(error0._span_exception$_message, _s8_)) { - span = _this._parser1$_adjustExceptionSpan$1(span); - t1 = A.LinkedHashMap_LinkedHashMap$_empty(t3, t4); - for (t3 = A.MapExtensions_get_pairs0(secondarySpans, t3, t4), t3 = t3.get$iterator(t3); t3.moveNext$0();) { - t2 = t3.get$current(t3); - span0 = null; - description = null; - _0_0 = t2; - span0 = _0_0._0; - description = _0_0._1; - J.$indexSet$ax(t1, _this._parser1$_adjustExceptionSpan$1(span0), description); - } - secondarySpans = t1; - } - A.throwWithTrace0(A.MultiSpanSassFormatException$0(error0._span_exception$_message, span, error0.get$primaryLabel(), secondarySpans, null), error0, stackTrace0); - } else if (type$.SourceSpanFormatException._is(t3)) { - error1 = t3; - stackTrace1 = A.getTraceFromException(exception); - span1 = J.get$span$z(error1); - if (A.startsWithIgnoreCase0(error1._span_exception$_message, _s8_)) - span1 = _this._parser1$_adjustExceptionSpan$1(span1); - t1 = error1._span_exception$_message; - t2 = span1; - A.throwWithTrace0(new A.SassFormatException0(B.Set_empty, t1, t2), error1, stackTrace1); - } else - throw exception; - } - }, - wrapSpanFormatException$1(callback) { - return this.wrapSpanFormatException$1$1(callback, type$.dynamic); - }, - _parser1$_adjustExceptionSpan$1(span) { - var start, t1; - if (span.get$length(span) > 0) - return span; - start = this._parser1$_firstNewlineBefore$1(span.get$start(span)); - if (start.$eq(0, span.get$start(span))) - t1 = span; - else { - t1 = start.offset; - t1 = A._FileSpan$(start.file, t1, t1); - } - return t1; - }, - _parser1$_firstNewlineBefore$1($location) { - var lastNewline, codeUnit, - t1 = $location.file, - t2 = $location.offset, - text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, 0, t2), 0, null), - index = t2 - 1; - for (lastNewline = null; index >= 0;) { - codeUnit = text.charCodeAt(index); - if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) { - if (lastNewline == null) - t1 = $location; - else { - t2 = new A.FileLocation(t1, lastNewline); - t2.FileLocation$_$2(t1, lastNewline); - t1 = t2; - } - return t1; - } - if (codeUnit === 10 || codeUnit === 13 || codeUnit === 12) - lastNewline = index; - --index; - } - return $location; - } - }; - A.Parser__parseIdentifier_closure0.prototype = { - call$0() { - var t1 = this.$this, - result = t1.identifier$0(); - t1.scanner.expectDone$0(); - return result; - }, - $signature: 30 - }; - A.Parser_escape_closure0.prototype = { - call$1(char) { - return char === 32 || char === 9 || char === 10 || char === 13 || char === 12; - }, - $signature: 32 - }; - A.Parser_scanIdentChar_matches0.prototype = { - call$1(actual) { - var t1 = this.char; - return this.caseSensitive ? actual === t1 : A.characterEqualsIgnoreCase0(t1, actual); - }, - $signature: 46 - }; - A.Parser_spanFrom_closure0.prototype = { - call$0() { - var t1 = this.$this._parser1$_interpolationMap; - if (t1 == null) - t1 = type$.InterpolationMap_2._as(t1); - return t1.mapSpan$1(this.span); - }, - $signature: 27 - }; - A.PlaceholderSelector0.prototype = { - accept$1$1(visitor) { - return visitor.visitPlaceholderSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - addSuffix$1(suffix) { - return new A.PlaceholderSelector0(this.name + suffix, this.span); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.PlaceholderSelector0 && other.name === this.name; - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this.name); - } - }; - A.PlainCssCallable0.prototype = { - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.PlainCssCallable0 && this.name === other.name; - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this.name); - }, - $isAsyncCallable0: 1, - $isCallable: 1, - get$name(receiver) { - return this.name; - } - }; - A.PrefixedMapView0.prototype = { - get$keys(_) { - return new A._PrefixedKeys0(this); - }, - get$length(_) { - var t1 = this._prefixed_map_view0$_map; - return t1.get$length(t1); - }, - get$isEmpty(_) { - var t1 = this._prefixed_map_view0$_map; - return t1.get$isEmpty(t1); - }, - get$isNotEmpty(_) { - var t1 = this._prefixed_map_view0$_map; - return t1.get$isNotEmpty(t1); - }, - $index(_, key) { - return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefixed_map_view0$_prefix) ? this._prefixed_map_view0$_map.$index(0, J.substring$1$s(key, this._prefixed_map_view0$_prefix.length)) : null; - }, - containsKey$1(key) { - return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefixed_map_view0$_prefix) && this._prefixed_map_view0$_map.containsKey$1(J.substring$1$s(key, this._prefixed_map_view0$_prefix.length)); - } - }; - A._PrefixedKeys0.prototype = { - get$length(_) { - var t1 = this._prefixed_map_view0$_view._prefixed_map_view0$_map; - return t1.get$length(t1); - }, - get$iterator(_) { - var t1 = this._prefixed_map_view0$_view._prefixed_map_view0$_map; - t1 = J.map$1$1$ax(t1.get$keys(t1), new A._PrefixedKeys_iterator_closure0(this), type$.String); - return t1.get$iterator(t1); - }, - contains$1(_, key) { - return this._prefixed_map_view0$_view.containsKey$1(key); - } - }; - A._PrefixedKeys_iterator_closure0.prototype = { - call$1(key) { - return this.$this._prefixed_map_view0$_view._prefixed_map_view0$_prefix + key; - }, - $signature: 6 - }; - A.ProphotoRgbColorSpace0.prototype = { - get$isBoundedInternal() { - return true; - }, - toLinear$1(channel) { - var abs = Math.abs(channel); - return abs <= 0.03125 ? channel / 16 : J.get$sign$in(channel) * Math.pow(abs, 1.8); - }, - fromLinear$1(channel) { - var abs = Math.abs(channel); - return abs >= 0.001953125 ? J.get$sign$in(channel) * Math.pow(abs, 0.5555555555555556) : 16 * channel; - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { - t1 = $.$get$linearProphotoRgbToLinearSrgb0(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu0 === dest) { - t1 = $.$get$linearProphotoRgbToLinearA98Rgb0(); - break $label0$0; - } - if (B.DisplayP3ColorSpace_NQk0 === dest) { - t1 = $.$get$linearProphotoRgbToLinearDisplayP30(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN0 === dest) { - t1 = $.$get$linearProphotoRgbToLinearRec20200(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA0 === dest) { - t1 = $.$get$linearProphotoRgbToXyzD650(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No0 === dest) { - t1 = $.$get$linearProphotoRgbToXyzD500(); - break $label0$0; - } - if (B.LmsColorSpace_8I80 === dest) { - t1 = $.$get$linearProphotoRgbToLms0(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix0(dest); - break $label0$0; - } - return t1; - } - }; - A.PseudoSelector0.prototype = { - get$isHostContext() { - return this.isClass && this.name === "host-context" && this.selector != null; - }, - get$hasComplicatedSuperselectorSemantics() { - return !this.isClass || this.selector != null; - }, - get$specificity() { - var result, _this = this, - value = _this._pseudo$__PseudoSelector_specificity_FI; - if (value === $) { - result = new A.PseudoSelector_specificity_closure0(_this).call$0(); - _this._pseudo$__PseudoSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); - _this._pseudo$__PseudoSelector_specificity_FI = result; - value = result; - } - return value; - }, - withSelector$1(selector) { - var _this = this; - return A.PseudoSelector$0(_this.name, _this.span, _this.argument, !_this.isClass, selector); - }, - addSuffix$1(suffix) { - var _this = this; - if (_this.argument != null || _this.selector != null) - _this.super$SimpleSelector$addSuffix0(suffix); - return A.PseudoSelector$0(_this.name + suffix, _this.span, null, !_this.isClass, null); - }, - unify$1(compound) { - var other, result, t2, addedThis, _i, simple, _this = this, - t1 = _this.name; - if (t1 === "host" || t1 === "host-context") { - if (!B.JSArray_methods.every$1(compound, new A.PseudoSelector_unify_closure0())) - return null; - } else { - t1 = false; - if (compound.length === 1) { - other = compound[0]; - if (!(other instanceof A.UniversalSelector0)) { - if (other instanceof A.PseudoSelector0) - t1 = other.isClass && other.name === "host" || other.get$isHostContext(); - } else - t1 = true; - } else - other = null; - if (t1) - return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector_2)); - } - if (B.JSArray_methods.contains$1(compound, _this)) - return compound; - result = A._setArrayType([], type$.JSArray_SimpleSelector_2); - for (t1 = compound.length, t2 = !_this.isClass, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { - simple = compound[_i]; - if (simple instanceof A.PseudoSelector0 && !simple.isClass) { - if (t2) - return null; - result.push(_this); - addedThis = true; - } - result.push(simple); - } - if (!addedThis) - result.push(_this); - return result; - }, - isSuperselector$1(other) { - var selector, t1, t2, _this = this; - if (_this.super$SimpleSelector$isSuperselector0(other)) - return true; - selector = _this.selector; - if (selector == null) - return _this.$eq(0, other); - if (other instanceof A.PseudoSelector0 && !_this.isClass && !other.isClass && _this.normalizedName === "slotted" && other.name === _this.name) { - t1 = A.NullableExtension_andThen0(other.selector, selector.get$isSuperselector()); - return t1 == null ? false : t1; - } - t1 = type$.JSArray_SimpleSelector_2; - t2 = _this.span; - return A.compoundIsSuperselector0(A.CompoundSelector$0(A._setArrayType([_this], t1), t2), A.CompoundSelector$0(A._setArrayType([other], t1), t2), null); - }, - accept$1$1(visitor) { - return visitor.visitPseudoSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - $eq(_, other) { - var _this = this; - if (other == null) - return false; - return other instanceof A.PseudoSelector0 && other.name === _this.name && other.isClass === _this.isClass && other.argument == _this.argument && J.$eq$(other.selector, _this.selector); - }, - get$hashCode(_) { - var _this = this, - t1 = B.JSString_methods.get$hashCode(_this.name), - t2 = !_this.isClass ? 519018 : 218159; - return t1 ^ t2 ^ J.get$hashCode$(_this.argument) ^ J.get$hashCode$(_this.selector); - } - }; - A.PseudoSelector_specificity_closure0.prototype = { - call$0() { - var selector, t2, - t1 = this.$this; - if (!t1.isClass) - return 1; - selector = t1.selector; - if (selector == null) - return A.SimpleSelector0.prototype.get$specificity.call(t1); - switch (t1.normalizedName) { - case "where": - return 0; - case "is": - case "not": - case "has": - case "matches": - t1 = selector.components; - return A.IterableIntegerExtension_get_max(new A.MappedListIterable(t1, new A.PseudoSelector_specificity__closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,int>"))); - case "nth-child": - case "nth-last-child": - t1 = A.SimpleSelector0.prototype.get$specificity.call(t1); - t2 = selector.components; - return t1 + A.IterableIntegerExtension_get_max(new A.MappedListIterable(t2, new A.PseudoSelector_specificity__closure2(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,int>"))); - default: - return A.SimpleSelector0.prototype.get$specificity.call(t1); - } - }, - $signature: 10 - }; - A.PseudoSelector_specificity__closure1.prototype = { - call$1(component) { - return component.get$specificity(); - }, - $signature: 257 - }; - A.PseudoSelector_specificity__closure2.prototype = { - call$1(component) { - return component.get$specificity(); - }, - $signature: 257 - }; - A.PseudoSelector_unify_closure0.prototype = { - call$1(simple) { - var t1; - if (simple instanceof A.PseudoSelector0) - t1 = simple.isClass && simple.name === "host" || simple.selector != null; - else - t1 = false; - return t1; - }, - $signature: 14 - }; - A.PublicMemberMapView0.prototype = { - get$keys(_) { - var t1 = this._public_member_map_view0$_inner; - return J.where$1$ax(t1.get$keys(t1), A.utils1__isPublic$closure()); - }, - containsKey$1(key) { - return typeof key == "string" && A.isPublic0(key) && this._public_member_map_view0$_inner.containsKey$1(key); - }, - $index(_, key) { - if (typeof key == "string" && A.isPublic0(key)) - return this._public_member_map_view0$_inner.$index(0, key); - return null; - } - }; - A.QualifiedName0.prototype = { - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.QualifiedName0 && other.name === this.name && other.namespace == this.namespace; - }, - get$hashCode(_) { - return B.JSString_methods.get$hashCode(this.name) ^ J.get$hashCode$(this.namespace); - }, - toString$0(_) { - var t1 = this.namespace, - t2 = this.name; - return t1 == null ? t2 : t1 + "|" + t2; - } - }; - A.Rec2020ColorSpace0.prototype = { - get$isBoundedInternal() { - return true; - }, - toLinear$1(channel) { - var abs = Math.abs(channel); - return abs < 0.08124285829863151 ? channel / 4.5 : J.get$sign$in(channel) * Math.pow((abs + 1.09929682680944 - 1) / 1.09929682680944, 2.2222222222222223); - }, - fromLinear$1(channel) { - var abs = Math.abs(channel); - return abs > 0.018053968510807 ? J.get$sign$in(channel) * (1.09929682680944 * Math.pow(abs, 0.45) - 0.09929682680944008) : 4.5 * channel; - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { - t1 = $.$get$linearRec2020ToLinearSrgb0(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu0 === dest) { - t1 = $.$get$linearRec2020ToLinearA98Rgb0(); - break $label0$0; - } - if (B.DisplayP3ColorSpace_NQk0 === dest) { - t1 = $.$get$linearRec2020ToLinearDisplayP30(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG0 === dest) { - t1 = $.$get$linearRec2020ToLinearProphotoRgb0(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA0 === dest) { - t1 = $.$get$linearRec2020ToXyzD650(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No0 === dest) { - t1 = $.$get$linearRec2020ToXyzD500(); - break $label0$0; - } - if (B.LmsColorSpace_8I80 === dest) { - t1 = $.$get$linearRec2020ToLms0(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix0(dest); - break $label0$0; - } - return t1; - } - }; - A.JSClass0.prototype = {}; - A.JSClassExtension_setCustomInspect_closure.prototype = { - call$4($self, _, __, ___) { - return this.inspect.call$1($self); - }, - call$3($self, _, __) { - return this.call$4($self, _, __, null); - }, - "call*": "call$4", - $requiredArgCount: 3, - $defaultValues() { - return [null]; - }, - $signature: 564 - }; - A.JSClassExtension_get_defineStaticMethod_closure.prototype = { - call$2($name, body) { - this._this[$name] = A.allowInteropNamed($name, body); - return null; - }, - $signature: 135 - }; - A.JSClassExtension_get_defineMethod_closure.prototype = { - call$2($name, body) { - J.get$$prototype$x(this._this)[$name] = A.allowInteropCaptureThisNamed($name, body); - return null; - }, - $signature: 135 - }; - A.JSClassExtension_get_defineGetter_closure.prototype = { - call$2($name, body) { - A.defineGetter(J.get$$prototype$x(this._this), $name, body, null); - return null; - }, - $signature: 135 - }; - A.RenderContext0.prototype = {}; - A.RenderContextOptions0.prototype = {}; - A.RenderContextResult0.prototype = {}; - A.RenderContextResultStats0.prototype = {}; - A.RenderOptions.prototype = {}; - A.RenderResult.prototype = {}; - A.RenderResultStats.prototype = {}; - A.ReplaceExpressionVisitor0.prototype = { - visitBinaryOperationExpression$1(_, node) { - return new A.BinaryOperationExpression0(node.operator, node.left.accept$1(this), node.right.accept$1(this), false); - }, - visitBooleanExpression$1(_, node) { - return node; - }, - visitColorExpression$1(_, node) { - return node; - }, - visitFunctionExpression$1(_, node) { - var t1 = node.originalName, - t2 = this.visitArgumentInvocation$1(node.$arguments); - return new A.FunctionExpression0(node.namespace, A.stringReplaceAllUnchecked(t1, "_", "-"), t1, t2, node.span); - }, - visitInterpolatedFunctionExpression$1(_, node) { - return new A.InterpolatedFunctionExpression0(this.visitInterpolation$1(node.name), this.visitArgumentInvocation$1(node.$arguments), node.span); - }, - visitIfExpression$1(_, node) { - return new A.IfExpression0(this.visitArgumentInvocation$1(node.$arguments), node.span); - }, - visitListExpression$1(_, node) { - var t1 = node.contents; - return new A.ListExpression0(A.List_List$unmodifiable(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitListExpression_closure0(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Expression0>")), type$.Expression_2), node.separator, node.hasBrackets, node.span); - }, - visitMapExpression$1(_, node) { - var t2, t3, _i, t4, key, value, - t1 = A._setArrayType([], type$.JSArray_Record_2_Expression_and_Expression_2); - for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { - t4 = t2[_i]; - key = t4._0; - value = t4._1; - t1.push(new A._Record_2(key.accept$1(this), value.accept$1(this))); - } - return new A.MapExpression0(A.List_List$unmodifiable(t1, type$.Record_2_Expression_and_Expression_2), node.span); - }, - visitNullExpression$1(_, node) { - return node; - }, - visitNumberExpression$1(_, node) { - return node; - }, - visitParenthesizedExpression$1(_, node) { - return new A.ParenthesizedExpression0(node.expression.accept$1(this), node.span); - }, - visitSelectorExpression$1(_, node) { - return node; - }, - visitStringExpression$1(_, node) { - return new A.StringExpression0(this.visitInterpolation$1(node.text), node.hasQuotes); - }, - visitSupportsExpression$1(_, node) { - return new A.SupportsExpression0(this.visitSupportsCondition$1(node.condition)); - }, - visitUnaryOperationExpression$1(_, node) { - return new A.UnaryOperationExpression0(node.operator, node.operand.accept$1(this), node.span); - }, - visitValueExpression$1(_, node) { - return node; - }, - visitVariableExpression$1(_, node) { - return node; - }, - visitArgumentInvocation$1(invocation) { - var t5, t6, _this = this, - t1 = invocation.positional, - t2 = type$.String, - t3 = type$.Expression_2, - t4 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); - for (t5 = A.MapExtensions_get_pairs0(invocation.named, t2, t3), t5 = t5.get$iterator(t5); t5.moveNext$0();) { - t6 = t5.get$current(t5); - t4.$indexSet(0, t6._0, t6._1.accept$1(_this)); - } - t5 = invocation.rest; - t5 = t5 == null ? null : t5.accept$1(_this); - t6 = invocation.keywordRest; - t6 = t6 == null ? null : t6.accept$1(_this); - return new A.ArgumentInvocation0(A.List_List$unmodifiable(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitArgumentInvocation_closure0(_this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Expression0>")), t3), A.ConstantMap_ConstantMap$from(t4, t2, t3), t5, t6, invocation.span); - }, - visitSupportsCondition$1(condition) { - var _this = this; - if (condition instanceof A.SupportsOperation0) - return A.SupportsOperation$0(_this.visitSupportsCondition$1(condition.left), _this.visitSupportsCondition$1(condition.right), condition.operator, condition.span); - else if (condition instanceof A.SupportsNegation0) - return new A.SupportsNegation0(_this.visitSupportsCondition$1(condition.condition), condition.span); - else if (condition instanceof A.SupportsInterpolation0) - return new A.SupportsInterpolation0(condition.expression.accept$1(_this), condition.span); - else if (condition instanceof A.SupportsDeclaration0) - return new A.SupportsDeclaration0(condition.name.accept$1(_this), condition.value.accept$1(_this), condition.span); - else - throw A.wrapException(A.SassException$0("BUG: Unknown SupportsCondition " + condition.toString$0(0) + ".", condition.get$span(condition), null)); - }, - visitInterpolation$1(interpolation) { - var t1 = interpolation.contents; - return A.Interpolation$0(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitInterpolation_closure0(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object>")), interpolation.spans, interpolation.span); - } - }; - A.ReplaceExpressionVisitor_visitListExpression_closure0.prototype = { - call$1(item) { - return item.accept$1(this.$this); - }, - $signature: 259 - }; - A.ReplaceExpressionVisitor_visitArgumentInvocation_closure0.prototype = { - call$1(expression) { - return expression.accept$1(this.$this); - }, - $signature: 259 - }; - A.ReplaceExpressionVisitor_visitInterpolation_closure0.prototype = { - call$1(node) { - return node instanceof A.Expression0 ? node.accept$1(this.$this) : node; - }, - $signature: 73 - }; - A.ImporterResult0.prototype = { - get$sourceMapUrl(_) { - var t1 = this._result$_sourceMapUrl; - return t1 == null ? A.Uri_Uri$dataFromString(this.contents, B.C_Utf8Codec, null) : t1; - } - }; - A.ReturnRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitReturnRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "@return " + this.expression.toString$0(0) + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.RgbColorSpace0.prototype = { - get$isBoundedInternal() { - return true; - }, - get$isLegacyInternal() { - return true; - }, - convert$5(dest, red, green, blue, alpha) { - var t1 = red == null ? null : red / 255, - t2 = green == null ? null : green / 255; - return B.SrgbColorSpace_AD40.convert$5(dest, t1, t2, blue == null ? null : blue / 255, alpha); - }, - toLinear$1(channel) { - return A.srgbAndDisplayP3ToLinear0(channel / 255); - }, - fromLinear$1(channel) { - return A.srgbAndDisplayP3FromLinear0(channel) * 255; - } - }; - A.SassParser0.prototype = { - get$currentIndentation() { - return this._sass0$_currentIndentation; - }, - get$indented() { - return true; - }, - styleRuleSelector$0() { - var t4, - t1 = this.scanner, - t2 = t1._string_scanner$_position, - t3 = new A.StringBuffer(""), - buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - do { - buffer.addInterpolation$1(this.almostAnyValue$1$omitComments(true)); - t4 = A.Primitives_stringFromCharCode(10); - t4 = t3._contents += t4; - } while (B.JSString_methods.endsWith$1(B.JSString_methods.trimRight$0(t4.charCodeAt(0) == 0 ? t4 : t4), ",") && this.scanCharIf$1(new A.SassParser_styleRuleSelector_closure0())); - return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - expectStatementSeparator$1($name) { - var t1, _this = this; - if (!_this.atEndOfStatement$0()) - _this._sass0$_expectNewline$0(); - if (_this._sass0$_peekIndentation$0() <= _this._sass0$_currentIndentation) - return; - t1 = $name == null ? "here" : "beneath a " + $name; - _this.scanner.error$2$position(0, "Nothing may be indented " + t1 + ".", _this._sass0$_nextIndentationEnd.position); - }, - expectStatementSeparator$0() { - return this.expectStatementSeparator$1(null); - }, - atEndOfStatement$0() { - var t1 = this.scanner.peekChar$0(); - if (t1 == null) - t1 = null; - else - t1 = t1 === 10 || t1 === 13 || t1 === 12; - return t1 !== false; - }, - lookingAtChildren$0() { - return this.atEndOfStatement$0() && this._sass0$_peekIndentation$0() > this._sass0$_currentIndentation; - }, - importArgument$0() { - var url, span, innerError, stackTrace, t1, _0_0, start, next, t2, exception, _this = this; - $label0$0: { - t1 = _this.scanner; - _0_0 = t1.peekChar$0(); - if (117 === _0_0 || 85 === _0_0) { - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - if (_this.scanIdentifier$1("url")) - if (t1.scanChar$1(40)) { - t1.set$state(start); - return _this.super$StylesheetParser$importArgument0(); - } else - t1.set$state(start); - break $label0$0; - } - if (39 === _0_0 || 34 === _0_0) - return _this.super$StylesheetParser$importArgument0(); - } - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - next = t1.peekChar$0(); - while (true) { - t2 = false; - if (next != null) - if (next !== 44) - if (next !== 59) - t2 = !(next === 10 || next === 13 || next === 12); - if (!t2) - break; - t1.readChar$0(); - next = t1.peekChar$0(); - } - url = t1.substring$1(0, start.position); - span = t1.spanFrom$1(start); - if (_this.isPlainImportUrl$1(url)) - return new A.StaticImport0(new A.Interpolation0(A.List_List$unmodifiable([A.serializeValue0(new A.SassString0(url, true), true, true)], type$.Object), B.List_null, span), null, span); - else - try { - t1 = _this.parseImportUrl$1(url); - return new A.DynamicImport0(t1, span); - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.FormatException._is(t1)) { - innerError = t1; - stackTrace = A.getTraceFromException(exception); - _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), span, stackTrace); - } else - throw exception; - } - }, - scanElse$1(ifIndentation) { - var t1, t2, startIndentation, startNextIndentation, startNextIndentationEnd, _this = this; - if (_this._sass0$_peekIndentation$0() !== ifIndentation) - return false; - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - startIndentation = _this._sass0$_currentIndentation; - startNextIndentation = _this._sass0$_nextIndentation; - startNextIndentationEnd = _this._sass0$_nextIndentationEnd; - _this._sass0$_readIndentation$0(); - if (t1.scanChar$1(64) && _this.scanIdentifier$1("else")) - return true; - t1.set$state(new A._SpanScannerState(t1, t2)); - _this._sass0$_currentIndentation = startIndentation; - _this._sass0$_nextIndentation = startNextIndentation; - _this._sass0$_nextIndentationEnd = startNextIndentationEnd; - return false; - }, - children$1(_, child) { - var children = A._setArrayType([], type$.JSArray_Statement_2); - this._sass0$_whileIndentedLower$1(new A.SassParser_children_closure0(this, child, children)); - return children; - }, - statements$1(statement) { - var statements, t2, _1_0, - t1 = this.scanner, - _0_0 = t1.peekChar$0(); - if (9 === _0_0 || 32 === _0_0) - t1.error$3$length$position(0, string$.Indent, t1._string_scanner$_position, 0); - statements = A._setArrayType([], type$.JSArray_Statement_2); - for (t2 = t1.string.length; t1._string_scanner$_position !== t2;) { - _1_0 = this._sass0$_child$1(statement); - if (_1_0 != null) - statements.push(_1_0); - this._sass0$_readIndentation$0(); - } - return statements; - }, - _sass0$_child$1(child) { - var _0_0, _this = this, - t1 = _this.scanner, - _1_0 = t1.peekChar$0(); - $label0$0: { - if (13 === _1_0 || 10 === _1_0 || 12 === _1_0) { - t1 = null; - break $label0$0; - } - if (36 === _1_0) { - t1 = _this.variableDeclarationWithoutNamespace$0(); - break $label0$0; - } - if (47 === _1_0) { - _0_0 = t1.peekChar$1(1); - $label1$1: { - if (47 === _0_0) { - t1 = _this._sass0$_silentComment$0(); - break $label1$1; - } - if (42 === _0_0) { - t1 = _this._sass0$_loudComment$0(); - break $label1$1; - } - t1 = child.call$0(); - break $label1$1; - } - break $label0$0; - } - t1 = child.call$0(); - break $label0$0; - } - return t1; - }, - _sass0$_silentComment$0() { - var buffer, parentIndentation, t3, t4, t5, commentPrefix, i, t6, i0, t7, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - t1.expect$1("//"); - buffer = new A.StringBuffer(""); - parentIndentation = _this._sass0$_currentIndentation; - t3 = t1.string.length; - t4 = 1 + parentIndentation; - t5 = 2 + parentIndentation; - $label0$0: - do { - commentPrefix = t1.scanChar$1(47) ? "///" : "//"; - for (i = commentPrefix.length; true;) { - t6 = buffer._contents += commentPrefix; - for (i0 = i; i0 < _this._sass0$_currentIndentation - parentIndentation; ++i0) { - t6 += A.Primitives_stringFromCharCode(32); - buffer._contents = t6; - } - while (true) { - if (t1._string_scanner$_position !== t3) { - t7 = t1.peekChar$0(); - t7 = !(t7 === 10 || t7 === 13 || t7 === 12); - } else - t7 = false; - if (!t7) - break; - t6 += A.Primitives_stringFromCharCode(t1.readChar$0()); - buffer._contents = t6; - } - buffer._contents = t6 + "\n"; - if (_this._sass0$_peekIndentation$0() < parentIndentation) - break $label0$0; - if (_this._sass0$_peekIndentation$0() === parentIndentation) { - if (t1.peekChar$1(t4) === 47 && t1.peekChar$1(t5) === 47) - _this._sass0$_readIndentation$0(); - break; - } - _this._sass0$_readIndentation$0(); - } - } while (t1.scan$1("//")); - t3 = buffer._contents; - return _this.lastSilentComment = new A.SilentComment0(t3.charCodeAt(0) == 0 ? t3 : t3, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _sass0$_loudComment$0() { - var t2, t3, t4, buffer, parentIndentation, t5, t6, first, beginningOfComment, t7, end, i, _1_0, _0_0, endPosition, span, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expect$1("/*"); - t2 = new A.StringBuffer(""); - t3 = A._setArrayType([], type$.JSArray_Object); - t4 = A._setArrayType([], type$.JSArray_nullable_FileSpan); - buffer = new A.InterpolationBuffer0(t2, t3, t4); - t2._contents = "" + "/*"; - parentIndentation = _this._sass0$_currentIndentation; - for (t5 = t1.string, t6 = t5.length, first = true; true; first = false) { - if (first) { - beginningOfComment = t1._string_scanner$_position; - _this.spaces$0(); - t7 = t1.peekChar$0(); - if (t7 === 10 || t7 === 13 || t7 === 12) { - _this._sass0$_readIndentation$0(); - t7 = A.Primitives_stringFromCharCode(32); - t2._contents += t7; - } else { - end = t1._string_scanner$_position; - t2._contents += B.JSString_methods.substring$2(t5, beginningOfComment, end); - } - } else { - t7 = t2._contents += "\n"; - t2._contents = t7 + " * "; - } - for (i = 3; i < _this._sass0$_currentIndentation - parentIndentation; ++i) { - t7 = A.Primitives_stringFromCharCode(32); - t2._contents += t7; - } - for (; t1._string_scanner$_position !== t6;) { - _1_0 = t1.peekChar$0(); - if (10 === _1_0 || 13 === _1_0 || 12 === _1_0) - break; - if (35 === _1_0) { - if (t1.peekChar$1(1) === 123) { - _0_0 = _this.singleInterpolation$0(); - buffer._interpolation_buffer0$_flushText$0(); - t3.push(_0_0._0); - t4.push(_0_0._1); - } else { - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t7; - } - continue; - } - if (42 === _1_0) { - if (t1.peekChar$1(1) === 47) { - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t3; - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t3; - endPosition = t1._string_scanner$_position; - t2 = t1._sourceFile; - t3 = start.position; - span = new A._FileSpan(t2, t3, endPosition); - span._FileSpan$3(t2, t3, endPosition); - _this.whitespace$0(); - while (true) { - t2 = t1.peekChar$0(); - if (!((t2 === 10 || t2 === 13 || t2 === 12) && _this._sass0$_peekIndentation$0() > parentIndentation)) - break; - for (; _this._sass0$_lookingAtDoubleNewline$0();) - _this._sass0$_expectNewline$0(); - _this._sass0$_readIndentation$0(); - _this.whitespace$0(); - } - if (t1._string_scanner$_position !== t6) { - t2 = t1.peekChar$0(); - t2 = !(t2 === 10 || t2 === 13 || t2 === 12); - } else - t2 = false; - if (t2) { - t2 = t1._string_scanner$_position; - while (true) { - if (t1._string_scanner$_position !== t6) { - t3 = t1.peekChar$0(); - t3 = !(t3 === 10 || t3 === 13 || t3 === 12); - } else - t3 = false; - if (!t3) - break; - t1.readChar$0(); - } - throw A.wrapException(A.MultiSpanSassFormatException$0("Unexpected text after end of comment", t1.spanFrom$1(new A._SpanScannerState(t1, t2)), "extra text", A.LinkedHashMap_LinkedHashMap$_literal([span, "comment"], type$.FileSpan, type$.String), null)); - } else - return new A.LoudComment0(buffer.interpolation$1(span)); - } else { - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t7; - } - continue; - } - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t7; - } - if (_this._sass0$_peekIndentation$0() <= parentIndentation) - break; - for (; _this._sass0$_lookingAtDoubleNewline$0();) { - _this._sass0$_expectNewline$0(); - t7 = t2._contents += "\n"; - t2._contents = t7 + " *"; - } - _this._sass0$_readIndentation$0(); - } - return new A.LoudComment0(buffer.interpolation$1(t1.spanFrom$1(start))); - }, - whitespaceWithoutComments$0() { - var t1, t2, next; - for (t1 = this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) { - next = t1.peekChar$0(); - if (next !== 9 && next !== 32) - break; - t1.readChar$0(); - } - }, - loudComment$0() { - var next, - t1 = this.scanner; - t1.expect$1("/*"); - for (; true;) { - next = t1.readChar$0(); - if (next === 10 || next === 13 || next === 12) - t1.error$1(0, "expected */."); - if (next !== 42) - continue; - do - next = t1.readChar$0(); - while (next === 42); - if (next === 47) - break; - } - }, - _sass0$_expectNewline$0() { - var t1 = this.scanner, - _0_0 = t1.peekChar$0(); - if (59 === _0_0) - t1.error$1(0, string$.semico); - if (13 === _0_0) { - t1.readChar$0(); - if (t1.peekChar$0() === 10) - t1.readChar$0(); - return; - } - if (10 === _0_0 || 12 === _0_0) { - t1.readChar$0(); - return; - } - t1.error$1(0, "expected newline."); - }, - _sass0$_lookingAtDoubleNewline$0() { - var t2, _0_0, - t1 = this.scanner, - _1_0 = t1.peekChar$0(); - $label1$1: { - t2 = false; - if (13 === _1_0) { - _0_0 = t1.peekChar$1(1); - $label0$0: { - if (10 === _0_0) { - t1 = t1.peekChar$1(2); - t1 = t1 === 10 || t1 === 13 || t1 === 12; - break $label0$0; - } - if (13 === _0_0 || 12 === _0_0) { - t1 = true; - break $label0$0; - } - t1 = t2; - break $label0$0; - } - break $label1$1; - } - if (10 === _1_0 || 12 === _1_0) { - t1 = t1.peekChar$1(1); - t1 = t1 === 10 || t1 === 13 || t1 === 12; - break $label1$1; - } - t1 = t2; - break $label1$1; - } - return t1; - }, - _sass0$_whileIndentedLower$1(body) { - var t1, t2, childIndentation, indentation, t3, t4, _this = this, - parentIndentation = _this._sass0$_currentIndentation; - for (t1 = _this.scanner, t2 = t1._sourceFile, childIndentation = null; _this._sass0$_peekIndentation$0() > parentIndentation;) { - indentation = _this._sass0$_readIndentation$0(); - if (childIndentation == null) - childIndentation = indentation; - if (childIndentation !== indentation) { - t3 = t1._string_scanner$_position; - t4 = t2.getColumn$1(t3); - t1.error$3$length$position(0, "Inconsistent indentation, expected " + childIndentation + " spaces.", t2.getColumn$1(t1._string_scanner$_position), t3 - t4); - } - body.call$0(); - } - }, - _sass0$_readIndentation$0() { - var t1, _this = this, - currentIndentation = _this._sass0$_nextIndentation; - if (currentIndentation == null) - currentIndentation = _this._sass0$_nextIndentation = _this._sass0$_peekIndentation$0(); - _this._sass0$_currentIndentation = currentIndentation; - t1 = _this._sass0$_nextIndentationEnd; - t1.toString; - _this.scanner.set$state(t1); - _this._sass0$_nextIndentationEnd = _this._sass0$_nextIndentation = null; - return currentIndentation; - }, - _sass0$_peekIndentation$0() { - var t1, t2, t3, start, containsTab, containsSpace, nextIndentation, _1_0, t4, _this = this, - _0_0 = _this._sass0$_nextIndentation; - if (_0_0 != null) - return _0_0; - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - t3 = t1.string.length; - if (t2 === t3) { - _this._sass0$_nextIndentation = 0; - _this._sass0$_nextIndentationEnd = new A._SpanScannerState(t1, t2); - return 0; - } - start = new A._SpanScannerState(t1, t2); - if (!_this.scanCharIf$1(new A.SassParser__peekIndentation_closure1())) - t1.error$2$position(0, "Expected newline.", t1._string_scanner$_position); - containsTab = A._Cell$(); - containsSpace = A._Cell$(); - nextIndentation = A._Cell$(); - do { - containsSpace.__late_helper$_value = containsTab.__late_helper$_value = false; - nextIndentation.__late_helper$_value = 0; - for (; true;) { - $label0$0: { - _1_0 = t1.peekChar$0(); - if (32 === _1_0) { - containsSpace.__late_helper$_value = true; - break $label0$0; - } - if (9 === _1_0) { - containsTab.__late_helper$_value = true; - break $label0$0; - } - break; - } - t2 = nextIndentation.__late_helper$_value; - if (t2 === nextIndentation) - A.throwExpression(A.LateError$localNI("")); - nextIndentation.__late_helper$_value = t2 + 1; - t1.readChar$0(); - } - t2 = t1._string_scanner$_position; - if (t2 === t3) { - _this._sass0$_nextIndentation = 0; - _this._sass0$_nextIndentationEnd = new A._SpanScannerState(t1, t2); - t1.set$state(start); - return 0; - } - } while (_this.scanCharIf$1(new A.SassParser__peekIndentation_closure2())); - t2 = containsTab._readLocal$0(); - t3 = containsSpace._readLocal$0(); - if (t2) { - if (t3) { - t2 = t1._string_scanner$_position; - t3 = t1._sourceFile; - t4 = t3.getColumn$1(t2); - t1.error$3$length$position(0, "Tabs and spaces may not be mixed.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); - } else if (_this._sass0$_spaces === true) { - t2 = t1._string_scanner$_position; - t3 = t1._sourceFile; - t4 = t3.getColumn$1(t2); - t1.error$3$length$position(0, "Expected spaces, was tabs.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); - } - } else if (t3 && _this._sass0$_spaces === false) { - t2 = t1._string_scanner$_position; - t3 = t1._sourceFile; - t4 = t3.getColumn$1(t2); - t1.error$3$length$position(0, "Expected tabs, was spaces.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); - } - _this._sass0$_nextIndentation = nextIndentation._readLocal$0(); - if (nextIndentation._readLocal$0() > 0) - if (_this._sass0$_spaces == null) - _this._sass0$_spaces = containsSpace._readLocal$0(); - _this._sass0$_nextIndentationEnd = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.set$state(start); - return nextIndentation._readLocal$0(); - } - }; - A.SassParser_styleRuleSelector_closure0.prototype = { - call$1(char) { - return char === 10 || char === 13 || char === 12; - }, - $signature: 32 - }; - A.SassParser_children_closure0.prototype = { - call$0() { - var _0_0 = this.$this._sass0$_child$1(this.child); - if (_0_0 != null) - this.children.push(_0_0); - }, - $signature: 0 - }; - A.SassParser__peekIndentation_closure1.prototype = { - call$1(char) { - return char === 10 || char === 13 || char === 12; - }, - $signature: 32 - }; - A.SassParser__peekIndentation_closure2.prototype = { - call$1(char) { - return char === 10 || char === 13 || char === 12; - }, - $signature: 32 - }; - A._Exports.prototype = {}; - A._wrapMain_closure.prototype = { - call$1(_) { - return A._translateReturnValue(this.main.call$0()); - }, - $signature: 111 - }; - A._wrapMain_closure0.prototype = { - call$1(args) { - return A._translateReturnValue(this.main.call$1(A.List_List$from(type$.List_dynamic._as(args), true, type$.String))); - }, - $signature: 111 - }; - A.ScssParser0.prototype = { - get$indented() { - return false; - }, - get$currentIndentation() { - return 0; - }, - styleRuleSelector$0() { - return this.almostAnyValue$0(); - }, - expectStatementSeparator$1($name) { - var t1, _0_0; - this.whitespaceWithoutComments$0(); - t1 = this.scanner; - if (t1._string_scanner$_position === t1.string.length) - return; - _0_0 = t1.peekChar$0(); - if (59 === _0_0 || 125 === _0_0) - return; - t1.expectChar$1(59); - }, - expectStatementSeparator$0() { - return this.expectStatementSeparator$1(null); - }, - atEndOfStatement$0() { - var next = this.scanner.peekChar$0(); - return next == null || next === 59 || next === 125 || next === 123; - }, - lookingAtChildren$0() { - return this.scanner.peekChar$0() === 123; - }, - scanElse$1(ifIndentation) { - var t3, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - _this.whitespace$0(); - t3 = t1._string_scanner$_position; - if (t1.scanChar$1(64)) { - if (_this.scanIdentifier$2$caseSensitive("else", true)) - return true; - if (_this.scanIdentifier$2$caseSensitive("elseif", true)) { - _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_YKG, string$.x40elsei, t1.spanFrom$1(new A._SpanScannerState(t1, t3)))); - t1.set$position(t1._string_scanner$_position - 2); - return true; - } - } - t1.set$state(new A._SpanScannerState(t1, t2)); - return false; - }, - children$1(_, child) { - var children, _this = this, - t1 = _this.scanner; - t1.expectChar$1(123); - _this.whitespaceWithoutComments$0(); - children = A._setArrayType([], type$.JSArray_Statement_2); - for (; true;) - switch (t1.peekChar$0()) { - case 36: - children.push(_this.variableDeclarationWithoutNamespace$0()); - break; - case 47: - switch (t1.peekChar$1(1)) { - case 47: - children.push(_this._scss0$_silentComment$0()); - _this.whitespaceWithoutComments$0(); - break; - case 42: - children.push(_this._scss0$_loudComment$0()); - _this.whitespaceWithoutComments$0(); - break; - default: - children.push(child.call$0()); - } - break; - case 59: - t1.readChar$0(); - _this.whitespaceWithoutComments$0(); - break; - case 125: - t1.expectChar$1(125); - return children; - default: - children.push(child.call$0()); - } - }, - statements$1(statement) { - var t1, t2, _0_0, _1_0, _this = this, - statements = A._setArrayType([], type$.JSArray_Statement_2); - _this.whitespaceWithoutComments$0(); - for (t1 = _this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) - switch (t1.peekChar$0()) { - case 36: - statements.push(_this.variableDeclarationWithoutNamespace$0()); - break; - case 47: - switch (t1.peekChar$1(1)) { - case 47: - statements.push(_this._scss0$_silentComment$0()); - _this.whitespaceWithoutComments$0(); - break; - case 42: - statements.push(_this._scss0$_loudComment$0()); - _this.whitespaceWithoutComments$0(); - break; - default: - _0_0 = statement.call$0(); - if (_0_0 != null) - statements.push(_0_0); - } - break; - case 59: - t1.readChar$0(); - _this.whitespaceWithoutComments$0(); - break; - default: - _1_0 = statement.call$0(); - if (_1_0 != null) - statements.push(_1_0); - } - return statements; - }, - _scss0$_silentComment$0() { - var t2, t3, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expect$1("//"); - t2 = t1.string.length; - do { - while (true) { - if (t1._string_scanner$_position !== t2) { - t3 = t1.readChar$0(); - t3 = !(t3 === 10 || t3 === 13 || t3 === 12); - } else - t3 = false; - if (!t3) - break; - } - if (t1._string_scanner$_position === t2) - break; - _this.spaces$0(); - } while (t1.scan$1("//")); - if (_this.get$plainCss()) - _this.error$2(0, string$.Silent, t1.spanFrom$1(start)); - return _this.lastSilentComment = new A.SilentComment0(t1.substring$1(0, start.position), t1.spanFrom$1(start)); - }, - _scss0$_loudComment$0() { - var t3, t4, t5, buffer, _0_0, t6, endPosition, - t1 = this.scanner, - t2 = t1._string_scanner$_position; - t1.expect$1("/*"); - t3 = new A.StringBuffer(""); - t4 = A._setArrayType([], type$.JSArray_Object); - t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); - buffer = new A.InterpolationBuffer0(t3, t4, t5); - t3._contents = "" + "/*"; - $label0$1: - for (; true;) - switch (t1.peekChar$0()) { - case 35: - if (t1.peekChar$1(1) === 123) { - _0_0 = this.singleInterpolation$0(); - buffer._interpolation_buffer0$_flushText$0(); - t4.push(_0_0._0); - t5.push(_0_0._1); - } else { - t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t6; - } - break; - case 42: - t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t6; - if (t1.peekChar$0() !== 47) - continue $label0$1; - t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t4; - endPosition = t1._string_scanner$_position; - t3 = t1._sourceFile; - t4 = new A._SpanScannerState(t1, t2).position; - t1 = new A._FileSpan(t3, t4, endPosition); - t1._FileSpan$3(t3, t4, endPosition); - return new A.LoudComment0(buffer.interpolation$1(t1)); - case 13: - t1.readChar$0(); - if (t1.peekChar$0() !== 10) { - t6 = A.Primitives_stringFromCharCode(10); - t3._contents += t6; - } - break; - case 12: - t1.readChar$0(); - t6 = A.Primitives_stringFromCharCode(10); - t3._contents += t6; - break; - default: - t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t6; - } - } - }; - A.Selector0.prototype = { - assertNotBogus$1$name($name) { - if (!this.accept$1(B._IsBogusVisitor_true0)) - return; - A.warnForDeprecation0("$" + $name + ": " + (this.toString$0(0) + string$.x20is_nov), B.Deprecation_bh9); - }, - toString$0(_) { - var _null = null, - visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); - this.accept$1(visitor); - return visitor._serialize0$_buffer.toString$0(0); - }, - $isAstNode0: 1, - get$span(receiver) { - return this.span; - } - }; - A._IsInvisibleVisitor2.prototype = { - visitSelectorList$1(list) { - return B.JSArray_methods.every$1(list.components, this.get$visitComplexSelector()); - }, - visitComplexSelector$1(complex) { - var t1; - if (!this.super$AnySelectorVisitor$visitComplexSelector0(complex)) - t1 = this.includeBogus && complex.accept$1(B._IsBogusVisitor_false0); - else - t1 = true; - return t1; - }, - visitPlaceholderSelector$1(placeholder) { - return true; - }, - visitPseudoSelector$1(pseudo) { - var t1, - _0_0 = pseudo.selector; - if (_0_0 != null) { - if (pseudo.name === "not") - t1 = this.includeBogus && _0_0.accept$1(B._IsBogusVisitor_true0); - else - t1 = this.visitSelectorList$1(_0_0); - return t1; - } else - return false; - } - }; - A._IsBogusVisitor0.prototype = { - visitComplexSelector$1(complex) { - var t2, - t1 = complex.components; - if (t1.length === 0) - return complex.leadingCombinators.length !== 0; - else { - t2 = this.includeLeadingCombinator ? 0 : 1; - return complex.leadingCombinators.length > t2 || B.JSArray_methods.get$last(t1).combinators.length !== 0 || B.JSArray_methods.any$1(t1, new A._IsBogusVisitor_visitComplexSelector_closure0(this)); - } - }, - visitPseudoSelector$1(pseudo) { - var selector = pseudo.selector; - if (selector == null) - return false; - return pseudo.name === "has" ? selector.accept$1(B._IsBogusVisitor_false0) : selector.accept$1(B._IsBogusVisitor_true0); - } - }; - A._IsBogusVisitor_visitComplexSelector_closure0.prototype = { - call$1(component) { - return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); - }, - $signature: 53 - }; - A._IsUselessVisitor0.prototype = { - visitComplexSelector$1(complex) { - return complex.leadingCombinators.length > 1 || B.JSArray_methods.any$1(complex.components, new A._IsUselessVisitor_visitComplexSelector_closure0(this)); - }, - visitPseudoSelector$1(pseudo) { - return pseudo.accept$1(B._IsBogusVisitor_true0); - } - }; - A._IsUselessVisitor_visitComplexSelector_closure0.prototype = { - call$1(component) { - return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); - }, - $signature: 53 - }; - A.__IsBogusVisitor_Object_AnySelectorVisitor0.prototype = {}; - A.__IsInvisibleVisitor_Object_AnySelectorVisitor0.prototype = {}; - A.__IsUselessVisitor_Object_AnySelectorVisitor0.prototype = {}; - A.SelectorExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitSelectorExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "&"; - }, - get$span(receiver) { - return this.span; - } - }; - A._nest_closure0.prototype = { - call$1($arguments) { - var t1 = {}, - selectors = J.$index$asx($arguments, 0).get$asList(); - if (selectors.length === 0) - throw A.wrapException(A.SassScriptException$0(string$.x24selec, null)); - t1.first = true; - return new A.MappedListIterable(selectors, new A._nest__closure1(t1), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList0>")).reduce$1(0, new A._nest__closure2()).get$asSassList(); - }, - $signature: 26 - }; - A._nest__closure1.prototype = { - call$1(selector) { - var t1 = this._box_0, - result = A.SassApiValue_assertSelector0(selector, !t1.first, null); - t1.first = false; - return result; - }, - $signature: 260 - }; - A._nest__closure2.prototype = { - call$2($parent, child) { - return child.nestWithin$1($parent); - }, - $signature: 261 - }; - A._append_closure1.prototype = { - call$1($arguments) { - var t1, - selectors = J.$index$asx($arguments, 0).get$asList(); - if (selectors.length === 0) - throw A.wrapException(A.SassScriptException$0(string$.x24selec, null)); - t1 = A.EvaluationContext_currentOrNull0(); - return new A.MappedListIterable(selectors, new A._append__closure1(), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList0>")).reduce$1(0, new A._append__closure2((t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan())).get$asSassList(); - }, - $signature: 26 - }; - A._append__closure1.prototype = { - call$1(selector) { - return A.SassApiValue_assertSelector0(selector, false, null); - }, - $signature: 260 - }; - A._append__closure2.prototype = { - call$2($parent, child) { - var t1 = child.components, - t2 = this.span; - return A.SelectorList$0(new A.MappedListIterable(t1, new A._append___closure0($parent, t2), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")), t2).nestWithin$1($parent); - }, - $signature: 261 - }; - A._append___closure0.prototype = { - call$1(complex) { - var _0_0, t1, component, rest, newCompound, t2, _null = null; - if (complex.leadingCombinators.length !== 0) - throw A.wrapException(A.SassScriptException$0("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", _null)); - _0_0 = complex.components; - t1 = _0_0.length >= 1; - if (t1) { - component = _0_0[0]; - rest = B.JSArray_methods.sublist$1(_0_0, 1); - } else { - rest = _null; - component = rest; - } - if (!t1) - throw A.wrapException(A.StateError$("Pattern matching error")); - newCompound = A._prependParent0(component.selector); - if (newCompound == null) - throw A.wrapException(A.SassScriptException$0("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", _null)); - t1 = this.span; - t2 = A._setArrayType([new A.ComplexSelectorComponent0(newCompound, A.List_List$unmodifiable(component.combinators, type$.CssValue_Combinator_2), t1)], type$.JSArray_ComplexSelectorComponent_2); - B.JSArray_methods.addAll$1(t2, rest); - return A.ComplexSelector$0(B.List_empty14, t2, t1, false); - }, - $signature: 60 - }; - A._extend_closure0.prototype = { - call$1($arguments) { - var target, source, - _s8_ = "selector", - _s8_0 = "extendee", - _s8_1 = "extender", - t1 = J.getInterceptor$asx($arguments), - selector = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, _s8_); - selector.assertNotBogus$1$name(_s8_); - target = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, _s8_0); - target.assertNotBogus$1$name(_s8_0); - source = A.SassApiValue_assertSelector0(t1.$index($arguments, 2), false, _s8_1); - source.assertNotBogus$1$name(_s8_1); - t1 = A.EvaluationContext_currentOrNull0(); - return A.ExtensionStore__extendOrReplace0(selector, source, target, B.ExtendMode_allTargets_allTargets0, (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan()).get$asSassList(); - }, - $signature: 26 - }; - A._replace_closure0.prototype = { - call$1($arguments) { - var target, source, - _s8_ = "selector", - _s8_0 = "original", - _s11_ = "replacement", - t1 = J.getInterceptor$asx($arguments), - selector = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, _s8_); - selector.assertNotBogus$1$name(_s8_); - target = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, _s8_0); - target.assertNotBogus$1$name(_s8_0); - source = A.SassApiValue_assertSelector0(t1.$index($arguments, 2), false, _s11_); - source.assertNotBogus$1$name(_s11_); - t1 = A.EvaluationContext_currentOrNull0(); - return A.ExtensionStore__extendOrReplace0(selector, source, target, B.ExtendMode_replace_replace0, (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan()).get$asSassList(); - }, - $signature: 26 - }; - A._unify_closure0.prototype = { - call$1($arguments) { - var selector2, - _s9_ = "selector1", - _s9_0 = "selector2", - t1 = J.getInterceptor$asx($arguments), - selector1 = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, _s9_); - selector1.assertNotBogus$1$name(_s9_); - selector2 = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, _s9_0); - selector2.assertNotBogus$1$name(_s9_0); - t1 = selector1.unify$1(selector2); - t1 = t1 == null ? null : t1.get$asSassList(); - return t1 == null ? B.C__SassNull0 : t1; - }, - $signature: 3 - }; - A._isSuperselector_closure0.prototype = { - call$1($arguments) { - var selector2, - t1 = J.getInterceptor$asx($arguments), - selector1 = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, "super"); - selector1.assertNotBogus$1$name("super"); - selector2 = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, "sub"); - selector2.assertNotBogus$1$name("sub"); - return A.listIsSuperselector0(selector1.components, selector2.components) ? B.SassBoolean_true0 : B.SassBoolean_false0; - }, - $signature: 12 - }; - A._simpleSelectors_closure0.prototype = { - call$1($arguments) { - var t1 = A.SassApiValue_assertCompoundSelector0(J.$index$asx($arguments, 0), "selector").components; - return A.SassList$0(new A.MappedListIterable(t1, new A._simpleSelectors__closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), B.ListSeparator_ECn0, false); - }, - $signature: 26 - }; - A._simpleSelectors__closure0.prototype = { - call$1(simple) { - return new A.SassString0(A.serializeSelector0(simple, true), false); - }, - $signature: 569 - }; - A._parse_closure0.prototype = { - call$1($arguments) { - return A.SassApiValue_assertSelector0(J.$index$asx($arguments, 0), false, "selector").get$asSassList(); - }, - $signature: 26 - }; - A.SelectorParser0.prototype = { - parse$0(_) { - return this.wrapSpanFormatException$1(new A.SelectorParser_parse_closure0(this)); - }, - parseCompoundSelector$0() { - return this.wrapSpanFormatException$1(new A.SelectorParser_parseCompoundSelector_closure0(this)); - }, - _selector$_selectorList$0() { - var t4, t5, lineBreak, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - t3 = t1._sourceFile, - previousLine = t3.getLine$1(t2), - components = A._setArrayType([_this._selector$_complexSelector$0()], type$.JSArray_ComplexSelector_2); - _this.whitespace$0(); - for (t4 = t1.string.length; t1.scanChar$1(44);) { - _this.whitespace$0(); - if (t1.peekChar$0() === 44) - continue; - t5 = t1._string_scanner$_position; - if (t5 === t4) - break; - lineBreak = t3.getLine$1(t5) !== previousLine; - if (lineBreak) - previousLine = t3.getLine$1(t1._string_scanner$_position); - components.push(_this._selector$_complexSelector$1$lineBreak(lineBreak)); - } - return A.SelectorList$0(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _selector$_complexSelector$1$lineBreak(lineBreak) { - var t4, lastCompound, initialCombinators, _0_0, t5, result, _this = this, - _s18_ = "expected selector.", - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - componentStart = new A._SpanScannerState(t1, t2), - t3 = type$.JSArray_CssValue_Combinator_2, - combinators = A._setArrayType([], t3), - components = A._setArrayType([], type$.JSArray_ComplexSelectorComponent_2); - for (t4 = type$.CssValue_Combinator_2, lastCompound = null, initialCombinators = null; true;) { - _this.whitespace$0(); - _0_0 = t1.peekChar$0(); - if (43 === _0_0) { - t5 = t1._string_scanner$_position; - t1.readChar$0(); - combinators.push(new A.CssValue0(B.Combinator_gRV0, _this.spanFrom$1(new A._SpanScannerState(t1, t5)), t4)); - continue; - } - if (62 === _0_0) { - t5 = t1._string_scanner$_position; - t1.readChar$0(); - combinators.push(new A.CssValue0(B.Combinator_8I80, _this.spanFrom$1(new A._SpanScannerState(t1, t5)), t4)); - continue; - } - if (126 === _0_0) { - t5 = t1._string_scanner$_position; - t1.readChar$0(); - combinators.push(new A.CssValue0(B.Combinator_y180, _this.spanFrom$1(new A._SpanScannerState(t1, t5)), t4)); - continue; - } - if (_0_0 == null) - break; - t5 = true; - if (91 !== _0_0) - if (46 !== _0_0) - if (35 !== _0_0) - if (37 !== _0_0) - if (58 !== _0_0) - if (38 !== _0_0) - if (42 !== _0_0) - if (124 !== _0_0) - t5 = _this.lookingAtIdentifier$0(); - if (t5) { - if (lastCompound != null) { - t5 = _this.spanFrom$1(componentStart); - result = A.List_List$from(combinators, false, t4); - result.fixed$length = Array; - result.immutable$list = Array; - components.push(new A.ComplexSelectorComponent0(lastCompound, result, t5)); - } else if (combinators.length !== 0) { - componentStart = new A._SpanScannerState(t1, t1._string_scanner$_position); - initialCombinators = combinators; - } - lastCompound = _this._selector$_compoundSelector$0(); - combinators = A._setArrayType([], t3); - if (t1.peekChar$0() === 38) - t1.error$1(0, string$.x22x26__ma); - continue; - } - break; - } - t3 = combinators.length !== 0; - if (t3 && _this._selector$_plainCss) - t1.error$1(0, _s18_); - else if (lastCompound != null) { - t3 = _this.spanFrom$1(componentStart); - components.push(new A.ComplexSelectorComponent0(lastCompound, A.List_List$unmodifiable(combinators, t4), t3)); - } else if (t3) - initialCombinators = combinators; - else - t1.error$1(0, _s18_); - t3 = initialCombinators == null ? B.List_empty14 : initialCombinators; - return A.ComplexSelector$0(t3, components, _this.spanFrom$1(new A._SpanScannerState(t1, t2)), lineBreak); - }, - _selector$_complexSelector$0() { - return this._selector$_complexSelector$1$lineBreak(false); - }, - _selector$_compoundSelector$0() { - var t3, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - components = A._setArrayType([_this._selector$_simpleSelector$0()], type$.JSArray_SimpleSelector_2); - for (t3 = _this._selector$_plainCss; _this._selector$_isSimpleSelectorStart$1(t1.peekChar$0());) - components.push(_this._selector$_simpleSelector$1$allowParent(t3)); - return A.CompoundSelector$0(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _selector$_simpleSelector$1$allowParent(allowParent) { - var t2, $name, text, t3, suffix, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - if (allowParent == null) - allowParent = _this._selector$_allowParent; - switch (t1.peekChar$0()) { - case 91: - return _this._selector$_attributeSelector$0(); - case 46: - t2 = t1._string_scanner$_position; - t1.expectChar$1(46); - return new A.ClassSelector0(_this.identifier$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); - case 35: - t2 = t1._string_scanner$_position; - t1.expectChar$1(35); - return new A.IDSelector0(_this.identifier$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); - case 37: - t2 = t1._string_scanner$_position; - t1.expectChar$1(37); - $name = _this.identifier$0(); - t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); - if (_this._selector$_plainCss) - _this.error$2(0, string$.Placeh, t1.spanFrom$1(start)); - return new A.PlaceholderSelector0($name, t2); - case 58: - return _this._selector$_pseudoSelector$0(); - case 38: - t2 = t1._string_scanner$_position; - t1.expectChar$1(38); - if (_this.lookingAtIdentifierBody$0()) { - text = new A.StringBuffer(""); - _this._parser1$_identifierBody$1(text); - if (text._contents.length === 0) - t1.error$1(0, "Expected identifier body."); - t3 = text._contents; - suffix = t3.charCodeAt(0) == 0 ? t3 : t3; - } else - suffix = null; - if (_this._selector$_plainCss && suffix != null) - t1.error$3$length$position(0, string$.Parent, t1._string_scanner$_position - t2, t2); - t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); - if (!allowParent) - _this.error$2(0, "Parent selectors aren't allowed here.", t1.spanFrom$1(start)); - return new A.ParentSelector0(suffix, t2); - default: - return _this._selector$_typeOrUniversalSelector$0(); - } - }, - _selector$_simpleSelector$0() { - return this._selector$_simpleSelector$1$allowParent(null); - }, - _selector$_attributeSelector$0() { - var $name, operator, next, value, modifier, _this = this, _null = null, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$1(91); - _this.whitespace$0(); - $name = _this._selector$_attributeName$0(); - _this.whitespace$0(); - if (t1.scanChar$1(93)) - return new A.AttributeSelector0($name, _null, _null, _null, _this.spanFrom$1(start)); - operator = _this._selector$_attributeOperator$0(); - _this.whitespace$0(); - next = t1.peekChar$0(); - value = next === 39 || next === 34 ? _this.string$0() : _this.identifier$0(); - _this.whitespace$0(); - next = t1.peekChar$0(); - modifier = next != null && A.CharacterExtension_get_isAlphabetic0(next) ? A.Primitives_stringFromCharCode(t1.readChar$0()) : _null; - t1.expectChar$1(93); - return new A.AttributeSelector0($name, operator, value, modifier, _this.spanFrom$1(start)); - }, - _selector$_attributeName$0() { - var nameOrNamespace, _this = this, - t1 = _this.scanner; - if (t1.scanChar$1(42)) { - t1.expectChar$1(124); - return new A.QualifiedName0(_this.identifier$0(), "*"); - } - if (t1.scanChar$1(124)) - return new A.QualifiedName0(_this.identifier$0(), ""); - nameOrNamespace = _this.identifier$0(); - if (t1.peekChar$0() !== 124 || t1.peekChar$1(1) === 61) - return new A.QualifiedName0(nameOrNamespace, null); - t1.readChar$0(); - return new A.QualifiedName0(_this.identifier$0(), nameOrNamespace); - }, - _selector$_attributeOperator$0() { - var t1 = this.scanner, - t2 = t1._string_scanner$_position; - switch (t1.readChar$0()) { - case 61: - return B.AttributeOperator_4QF0; - case 126: - t1.expectChar$1(61); - return B.AttributeOperator_yT80; - case 124: - t1.expectChar$1(61); - return B.AttributeOperator_jqB0; - case 94: - t1.expectChar$1(61); - return B.AttributeOperator_cMb0; - case 36: - t1.expectChar$1(61); - return B.AttributeOperator_qhE0; - case 42: - t1.expectChar$1(61); - return B.AttributeOperator_61T0; - default: - t1.error$2$position(0, 'Expected "]".', t2); - } - }, - _selector$_pseudoSelector$0() { - var element, $name, unvendored, argument, selector, t2, _this = this, _null = null, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$1(58); - element = t1.scanChar$1(58); - $name = _this.identifier$0(); - if (!t1.scanChar$1(40)) - return A.PseudoSelector$0($name, _this.spanFrom$1(start), _null, element, _null); - _this.whitespace$0(); - unvendored = A.unvendor0($name); - argument = _null; - selector = _null; - if (element) - if ($._selectorPseudoElements0.contains$1(0, unvendored)) - selector = _this._selector$_selectorList$0(); - else - argument = _this.declarationValue$1$allowEmpty(true); - else if ($._selectorPseudoClasses0.contains$1(0, unvendored)) - selector = _this._selector$_selectorList$0(); - else if (unvendored === "nth-child" || unvendored === "nth-last-child") { - argument = _this._selector$_aNPlusB$0(); - _this.whitespace$0(); - t2 = t1.peekChar$1(-1); - if ((t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12) && t1.peekChar$0() !== 41) { - _this.expectIdentifier$1("of"); - argument += " of"; - _this.whitespace$0(); - selector = _this._selector$_selectorList$0(); - } - } else - argument = B.JSString_methods.trimRight$0(_this.declarationValue$1$allowEmpty(true)); - t1.expectChar$1(41); - return A.PseudoSelector$0($name, _this.spanFrom$1(start), argument, element, selector); - }, - _selector$_aNPlusB$0() { - var t1, _0_0, t2, $self, next, _this = this; - $label0$0: { - t1 = _this.scanner; - _0_0 = t1.peekChar$0(); - if (101 === _0_0 || 69 === _0_0) { - _this.expectIdentifier$1("even"); - return "even"; - } - if (111 === _0_0 || 79 === _0_0) { - _this.expectIdentifier$1("odd"); - return "odd"; - } - if (43 === _0_0 || 45 === _0_0) { - t2 = "" + A.Primitives_stringFromCharCode(t1.readChar$0()); - break $label0$0; - } - t2 = ""; - } - $self = t1.peekChar$0(); - if ($self != null && $self >= 48 && $self <= 57) { - do { - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - $self = t1.peekChar$0(); - } while ($self != null && $self >= 48 && $self <= 57); - _this.whitespace$0(); - if (!_this.scanIdentChar$1(110)) - return t2.charCodeAt(0) == 0 ? t2 : t2; - } else - _this.expectIdentChar$1(110); - t2 += A.Primitives_stringFromCharCode(110); - _this.whitespace$0(); - next = t1.peekChar$0(); - if (next !== 43 && next !== 45) - return t2.charCodeAt(0) == 0 ? t2 : t2; - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - _this.whitespace$0(); - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - t1.error$1(0, "Expected a number."); - do { - t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); - $self = t1.peekChar$0(); - } while ($self != null && $self >= 48 && $self <= 57); - return t2.charCodeAt(0) == 0 ? t2 : t2; - }, - _selector$_typeOrUniversalSelector$0() { - var nameOrNamespace, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - if (t1.scanChar$1(42)) { - if (!t1.scanChar$1(124)) - return new A.UniversalSelector0(null, _this.spanFrom$1(start)); - return t1.scanChar$1(42) ? new A.UniversalSelector0("*", _this.spanFrom$1(start)) : new A.TypeSelector0(new A.QualifiedName0(_this.identifier$0(), "*"), _this.spanFrom$1(start)); - } else if (t1.scanChar$1(124)) - return t1.scanChar$1(42) ? new A.UniversalSelector0("", _this.spanFrom$1(start)) : new A.TypeSelector0(new A.QualifiedName0(_this.identifier$0(), ""), _this.spanFrom$1(start)); - nameOrNamespace = _this.identifier$0(); - if (!t1.scanChar$1(124)) - return new A.TypeSelector0(new A.QualifiedName0(nameOrNamespace, null), _this.spanFrom$1(start)); - else if (t1.scanChar$1(42)) - return new A.UniversalSelector0(nameOrNamespace, _this.spanFrom$1(start)); - else - return new A.TypeSelector0(new A.QualifiedName0(_this.identifier$0(), nameOrNamespace), _this.spanFrom$1(start)); - }, - _selector$_isSimpleSelectorStart$1(character) { - var t1; - $label0$0: { - if (42 === character || 91 === character || 46 === character || 35 === character || 37 === character || 58 === character) { - t1 = true; - break $label0$0; - } - if (38 === character) { - t1 = this._selector$_plainCss; - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - } - }; - A.SelectorParser_parse_closure0.prototype = { - call$0() { - var t1 = this.$this, - selector = t1._selector$_selectorList$0(); - t1 = t1.scanner; - if (t1._string_scanner$_position !== t1.string.length) - t1.error$1(0, "expected selector."); - return selector; - }, - $signature: 570 - }; - A.SelectorParser_parseCompoundSelector_closure0.prototype = { - call$0() { - var t1 = this.$this, - compound = t1._selector$_compoundSelector$0(); - t1 = t1.scanner; - if (t1._string_scanner$_position !== t1.string.length) - t1.error$1(0, "expected selector."); - return compound; - }, - $signature: 571 - }; - A.SelectorSearchVisitor0.prototype = { - visitAttributeSelector$1(attribute) { - return null; - }, - visitClassSelector$1(klass) { - return null; - }, - visitIDSelector$1(id) { - return null; - }, - visitParentSelector$1(placeholder) { - return null; - }, - visitPlaceholderSelector$1(placeholder) { - return null; - }, - visitTypeSelector$1(type) { - return null; - }, - visitUniversalSelector$1(universal) { - return null; - }, - visitComplexSelector$1(complex) { - return A.IterableExtension_search0(complex.components, new A.SelectorSearchVisitor_visitComplexSelector_closure0(this)); - }, - visitCompoundSelector$1(compound) { - return A.IterableExtension_search0(compound.components, new A.SelectorSearchVisitor_visitCompoundSelector_closure0(this)); - }, - visitPseudoSelector$1(pseudo) { - return A.NullableExtension_andThen0(pseudo.selector, this.get$visitSelectorList()); - }, - visitSelectorList$1(list) { - return A.IterableExtension_search0(list.components, this.get$visitComplexSelector()); - } - }; - A.SelectorSearchVisitor_visitComplexSelector_closure0.prototype = { - call$1(component) { - return this.$this.visitCompoundSelector$1(component.selector); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("SelectorSearchVisitor0.T?(ComplexSelectorComponent0)"); - } - }; - A.SelectorSearchVisitor_visitCompoundSelector_closure0.prototype = { - call$1(simple) { - return simple.accept$1(this.$this); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("SelectorSearchVisitor0.T?(SimpleSelector0)"); - } - }; - A.serialize_closure0.prototype = { - call$1(codeUnit) { - return codeUnit > 127; - }, - $signature: 46 - }; - A._SerializeVisitor0.prototype = { - visitCssStylesheet$1(node) { - var t1, t2, t3, t4, t5, t6, t7, previous, previous0, t8, _this = this; - for (t1 = J.get$iterator$ax(node.get$children(node)), t2 = !_this._serialize0$_inspect, t3 = _this._serialize0$_style === B.OutputStyle_10, t4 = !t3, t5 = type$.CssParentNode_2, t6 = _this._serialize0$_buffer, t7 = _this._lineFeed.text, previous = null; t1.moveNext$0();) { - previous0 = t1.get$current(t1); - if (t2) - t8 = t3 ? previous0.accept$1(B._IsInvisibleVisitor_true_true0) : previous0.accept$1(B._IsInvisibleVisitor_true_false0); - else - t8 = false; - if (t8) - continue; - if (previous != null) { - if (t5._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment0)) - t6.writeCharCode$1(59); - if (_this._serialize0$_isTrailingComment$2(previous0, previous)) { - if (t4) - t6.writeCharCode$1(32); - } else { - if (t4) - t6.write$1(0, t7); - if (previous.get$isGroupEnd()) - if (t4) - t6.write$1(0, t7); - } - } - previous0.accept$1(_this); - previous = previous0; - } - if (previous != null) - t1 = (t5._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment0)) && t4; - else - t1 = false; - if (t1) - t6.writeCharCode$1(59); - }, - visitCssComment$1(node) { - this._serialize0$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssComment_closure0(this, node)); - }, - visitCssAtRule$1(node) { - var t1, _this = this; - _this._serialize0$_writeIndentation$0(); - t1 = _this._serialize0$_buffer; - t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssAtRule_closure0(_this, node)); - if (!node.isChildless) { - if (_this._serialize0$_style !== B.OutputStyle_10) - t1.writeCharCode$1(32); - _this._serialize0$_visitChildren$1(node); - } - }, - visitCssMediaRule$1(node) { - var t1, _this = this; - _this._serialize0$_writeIndentation$0(); - t1 = _this._serialize0$_buffer; - t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssMediaRule_closure0(_this, node)); - if (_this._serialize0$_style !== B.OutputStyle_10) - t1.writeCharCode$1(32); - _this._serialize0$_visitChildren$1(node); - }, - visitCssImport$1(node) { - this._serialize0$_writeIndentation$0(); - this._serialize0$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssImport_closure0(this, node)); - }, - _serialize0$_writeImportUrl$1(url) { - var urlContents, maybeQuote, _this = this; - if (_this._serialize0$_style !== B.OutputStyle_10 || url.charCodeAt(0) !== 117) { - _this._serialize0$_buffer.write$1(0, url); - return; - } - urlContents = B.JSString_methods.substring$2(url, 4, url.length - 1); - maybeQuote = urlContents.charCodeAt(0); - if (maybeQuote === 39 || maybeQuote === 34) - _this._serialize0$_buffer.write$1(0, urlContents); - else - _this._serialize0$_visitQuotedString$1(urlContents); - }, - visitCssKeyframeBlock$1(node) { - var t1, _this = this; - _this._serialize0$_writeIndentation$0(); - t1 = _this._serialize0$_buffer; - t1.forSpan$2(node.selector.span, new A._SerializeVisitor_visitCssKeyframeBlock_closure0(_this, node)); - if (_this._serialize0$_style !== B.OutputStyle_10) - t1.writeCharCode$1(32); - _this._serialize0$_visitChildren$1(node); - }, - _serialize0$_visitMediaQuery$1(query) { - var t1, _1_0, _2_0, condition, operator, t2, _this = this, - _0_0 = query.modifier; - if (_0_0 != null) { - t1 = _this._serialize0$_buffer; - t1.write$1(0, _0_0); - t1.writeCharCode$1(32); - } - _1_0 = query.type; - if (_1_0 != null) { - t1 = _this._serialize0$_buffer; - t1.write$1(0, _1_0); - if (query.conditions.length !== 0) - t1.write$1(0, " and "); - } - _2_0 = query.conditions; - if (_2_0.length === 1) - t1 = B.JSString_methods.startsWith$1(_2_0[0], "(not "); - else - t1 = false; - if (t1) { - t1 = _this._serialize0$_buffer; - t1.write$1(0, "not "); - condition = B.JSArray_methods.get$first(_2_0); - t1.write$1(0, B.JSString_methods.substring$2(condition, 5, condition.length - 1)); - } else { - operator = query.conjunction ? "and" : "or"; - t1 = _this._serialize0$_style === B.OutputStyle_10 ? operator + " " : " " + operator + " "; - t2 = _this._serialize0$_buffer; - _this._serialize0$_writeBetween$3(_2_0, t1, t2.get$write(t2)); - } - }, - visitCssStyleRule$1(node) { - var t1, _this = this; - _this._serialize0$_writeIndentation$0(); - t1 = _this._serialize0$_buffer; - t1.forSpan$2(node._style_rule0$_selector._box0$_inner.value.span, new A._SerializeVisitor_visitCssStyleRule_closure0(_this, node)); - if (_this._serialize0$_style !== B.OutputStyle_10) - t1.writeCharCode$1(32); - _this._serialize0$_visitChildren$1(node); - }, - visitCssSupportsRule$1(node) { - var t1, _this = this; - _this._serialize0$_writeIndentation$0(); - t1 = _this._serialize0$_buffer; - t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssSupportsRule_closure0(_this, node)); - if (_this._serialize0$_style !== B.OutputStyle_10) - t1.writeCharCode$1(32); - _this._serialize0$_visitChildren$1(node); - }, - visitCssDeclaration$1(node) { - var error, stackTrace, error0, stackTrace0, t3, declSpecificities, t4, t5, t6, t7, _i, rule, ruleSpecificities, exception, _this = this, - t1 = node.interleavedRules, - t2 = t1.length; - if (t2 !== 0) { - t3 = node._node$_parent; - t3.toString; - declSpecificities = _this._serialize0$_specificities$1(t3); - for (t3 = _this._serialize0$_logger, t4 = node.span, t5 = type$.SourceSpan, t6 = type$.String, t7 = node.trace, _i = 0; _i < t2; ++_i) { - rule = t1[_i]; - ruleSpecificities = _this._serialize0$_specificities$1(rule); - if (!declSpecificities.any$1(0, ruleSpecificities.get$contains(ruleSpecificities))) - continue; - A.WarnForDeprecation_warnForDeprecation0(t3, B.Deprecation_VIq, string$.Sassx27s, new A.MultiSpan0(t4, "declaration", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rule.span, "nested rule"], t5, t6), t5, t6)), t7); - } - } - _this._serialize0$_writeIndentation$0(); - t1 = node.name; - _this._serialize0$_write$1(t1); - t2 = _this._serialize0$_buffer; - t2.writeCharCode$1(58); - if (J.startsWith$1$s(t1.value, "--") && node.parsedAsCustomProperty) - t2.forSpan$2(node.value.span, new A._SerializeVisitor_visitCssDeclaration_closure1(_this, node)); - else { - if (_this._serialize0$_style !== B.OutputStyle_10) - t2.writeCharCode$1(32); - try { - t2.forSpan$2(node.valueSpanForMap, new A._SerializeVisitor_visitCssDeclaration_closure2(_this, node)); - } catch (exception) { - t1 = A.unwrapException(exception); - if (t1 instanceof A.MultiSpanSassScriptException0) { - error = t1; - stackTrace = A.getTraceFromException(exception); - A.throwWithTrace0(A.MultiSpanSassException$0(error.message, node.value.span, error.primaryLabel, error.secondarySpans, null), error, stackTrace); - } else if (t1 instanceof A.SassScriptException0) { - error0 = t1; - stackTrace0 = A.getTraceFromException(exception); - t1 = error0.message; - A.throwWithTrace0(new A.SassException0(B.Set_empty, t1, node.value.span), error0, stackTrace0); - } else - throw exception; - } - } - }, - _serialize0$_specificities$1(node) { - var $parent, t2, t3, _i, - t1 = this.get$_serialize0$_specificities(); - if (node instanceof A.ModifiableCssStyleRule0) { - t1 = A.NullableExtension_andThen0(node._node$_parent, t1); - $parent = t1 == null ? null : A.IterableIntegerExtension_get_max(t1); - if ($parent == null) - $parent = 0; - t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.int); - for (t2 = node._style_rule0$_selector._box0$_inner.value.components, t3 = t2.length, _i = 0; _i < t3; ++_i) - t1.add$1(0, $parent + t2[_i].get$specificity()); - return t1; - } else { - t1 = A.NullableExtension_andThen0(node.get$parent(node), t1); - return t1 == null ? B.Set_0 : t1; - } - }, - _serialize0$_writeFoldedValue$1(node) { - var t1, t2, next, t3, - scanner = A.StringScanner$(type$.SassString_2._as(node.value.value)._string0$_text, null, null); - for (t1 = scanner.string.length, t2 = this._serialize0$_buffer; scanner._string_scanner$_position !== t1;) { - next = scanner.readChar$0(); - if (next !== 10) { - t2.writeCharCode$1(next); - continue; - } - t2.writeCharCode$1(32); - while (true) { - t3 = scanner.peekChar$0(); - if (!(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12)) - break; - scanner.readChar$0(); - } - } - }, - _serialize0$_writeReindentedValue$1(node) { - var _0_0, t1, _this = this, - value = type$.SassString_2._as(node.value.value)._string0$_text; - $label0$0: { - _0_0 = _this._serialize0$_minimumIndentation$1(value); - if (_0_0 == null) { - _this._serialize0$_buffer.write$1(0, value); - break $label0$0; - } - if (-1 === _0_0) { - t1 = _this._serialize0$_buffer; - t1.write$1(0, A.trimAsciiRight0(value, true)); - t1.writeCharCode$1(32); - break $label0$0; - } - t1 = node.name.span; - t1 = t1.get$start(t1); - _this._serialize0$_writeWithIndent$2(value, Math.min(_0_0, t1.file.getColumn$1(t1.offset))); - } - }, - _serialize0$_minimumIndentation$1(text) { - var character, t2, min, next, min0, - scanner = A.LineScanner$(text), - t1 = scanner.string.length; - while (true) { - if (scanner._string_scanner$_position !== t1) { - character = scanner.super$StringScanner$readChar(); - scanner._adjustLineAndColumn$1(character); - t2 = character !== 10; - } else - t2 = false; - if (!t2) - break; - } - if (scanner._string_scanner$_position === t1) - return scanner.peekChar$1(-1) === 10 ? -1 : null; - for (min = null; scanner._string_scanner$_position !== t1;) { - for (; scanner._string_scanner$_position !== t1;) { - next = scanner.peekChar$0(); - if (next !== 32 && next !== 9) - break; - scanner._adjustLineAndColumn$1(scanner.super$StringScanner$readChar()); - } - if (scanner._string_scanner$_position === t1 || scanner.scanChar$1(10)) - continue; - min0 = scanner._line_scanner$_column; - min = min == null ? min0 : Math.min(min, min0); - while (true) { - if (scanner._string_scanner$_position !== t1) { - character = scanner.super$StringScanner$readChar(); - scanner._adjustLineAndColumn$1(character); - t2 = character !== 10; - } else - t2 = false; - if (!t2) - break; - } - } - return min == null ? -1 : min; - }, - _serialize0$_writeWithIndent$2(text, minimumIndentation) { - var t1, t2, t3, character, lineStart, newlines, end, - scanner = A.LineScanner$(text); - for (t1 = scanner.string, t2 = t1.length, t3 = this._serialize0$_buffer; scanner._string_scanner$_position !== t2;) { - character = scanner.super$StringScanner$readChar(); - scanner._adjustLineAndColumn$1(character); - if (character === 10) - break; - t3.writeCharCode$1(character); - } - for (; true;) { - lineStart = scanner._string_scanner$_position; - for (newlines = 1; true;) { - if (scanner._string_scanner$_position === t2) { - t3.writeCharCode$1(32); - return; - } - $label0$2: { - character = scanner.super$StringScanner$readChar(); - scanner._adjustLineAndColumn$1(character); - if (32 === character || 9 === character) - continue; - if (10 === character) { - lineStart = scanner._string_scanner$_position; - ++newlines; - break $label0$2; - } - break; - } - } - this._serialize0$_writeTimes$2(10, newlines); - this._serialize0$_writeIndentation$0(); - end = scanner._string_scanner$_position; - t3.write$1(0, B.JSString_methods.substring$2(t1, lineStart + minimumIndentation, end)); - for (; true;) { - if (scanner._string_scanner$_position === t2) - return; - character = scanner.super$StringScanner$readChar(); - scanner._adjustLineAndColumn$1(character); - if (character === 10) - break; - t3.writeCharCode$1(character); - } - } - }, - visitCalculation$1(value) { - var t2, _this = this, - t1 = _this._serialize0$_buffer; - t1.write$1(0, value.name); - t1.writeCharCode$1(40); - t2 = _this._serialize0$_style === B.OutputStyle_10 ? "," : ", "; - _this._serialize0$_writeBetween$3(value.$arguments, t2, _this.get$_serialize0$_writeCalculationValue()); - t1.writeCharCode$1(41); - }, - _serialize0$_writeCalculationValue$1(value) { - var _2_4_isSet, _2_4, t1, _0_0, _1_0, first, rest, left, right, operator, parenthesizeLeft, operatorWhitespace, parenthesizeRight, t2, _this = this, _null = null; - $label1$1: { - _2_4_isSet = value instanceof A.SassNumber0; - if (_2_4_isSet) { - _2_4 = value.get$hasComplexUnits(); - t1 = _2_4 && !_this._serialize0$_inspect; - } else { - _2_4 = _null; - t1 = false; - } - if (t1) - throw A.wrapException(A.SassScriptException$0(A.S(value) + " isn't a valid CSS value.", _null)); - if (_2_4_isSet && !isFinite(value._number1$_value)) { - $label0$0: { - _0_0 = value._number1$_value; - if (1 / 0 === _0_0) { - _this._serialize0$_buffer.write$1(0, "infinity"); - break $label0$0; - } - if (-1 / 0 === _0_0) { - _this._serialize0$_buffer.write$1(0, "-infinity"); - break $label0$0; - } - if (isNaN(_0_0)) - _this._serialize0$_buffer.write$1(0, "NaN"); - } - t1 = J.getInterceptor$x(value); - _this._serialize0$_writeCalculationUnits$2(t1.get$numeratorUnits(value), t1.get$denominatorUnits(value)); - break $label1$1; - } - if (_2_4_isSet) - t1 = _2_4; - else - t1 = false; - if (t1) { - _this._serialize0$_writeNumber$1(value._number1$_value); - t1 = J.getInterceptor$x(value); - _1_0 = t1.get$numeratorUnits(value); - if (_1_0.length >= 1) { - first = _1_0[0]; - rest = B.JSArray_methods.sublist$1(_1_0, 1); - _this._serialize0$_buffer.write$1(0, first); - _this._serialize0$_writeCalculationUnits$2(rest, t1.get$denominatorUnits(value)); - } else - _this._serialize0$_writeCalculationUnits$2(A._setArrayType([], type$.JSArray_String), t1.get$denominatorUnits(value)); - break $label1$1; - } - if (value instanceof A.Value0) { - value.accept$1(_this); - break $label1$1; - } - t1 = value instanceof A.CalculationOperation0; - left = _null; - right = _null; - if (t1) { - operator = value._calculation0$_operator; - left = value._calculation0$_left; - right = value._calculation0$_right; - right = right; - } else - operator = _null; - if (t1) { - parenthesizeLeft = left instanceof A.CalculationOperation0 && left._calculation0$_operator.precedence < operator.precedence; - if (parenthesizeLeft) - _this._serialize0$_buffer.writeCharCode$1(40); - _this._serialize0$_writeCalculationValue$1(left); - if (parenthesizeLeft) - _this._serialize0$_buffer.writeCharCode$1(41); - operatorWhitespace = _this._serialize0$_style !== B.OutputStyle_10 || operator.precedence === 1; - if (operatorWhitespace) - _this._serialize0$_buffer.writeCharCode$1(32); - t1 = _this._serialize0$_buffer; - t1.write$1(0, operator.operator); - if (operatorWhitespace) - t1.writeCharCode$1(32); - if (!(right instanceof A.CalculationOperation0 && _this._serialize0$_parenthesizeCalculationRhs$2(operator, right._calculation0$_operator))) { - parenthesizeRight = false; - if (operator === B.CalculationOperator_Qf10) { - if (right instanceof A.SassNumber0) - t2 = isFinite(right._number1$_value) ? right.get$hasComplexUnits() : right.get$hasUnits(); - else - t2 = parenthesizeRight; - parenthesizeRight = t2; - } - } else - parenthesizeRight = true; - if (parenthesizeRight) - t1.writeCharCode$1(40); - _this._serialize0$_writeCalculationValue$1(right); - if (parenthesizeRight) - t1.writeCharCode$1(41); - } - } - }, - _serialize0$_writeCalculationUnits$2(numeratorUnits, denominatorUnits) { - var t1, t2, t3, t4; - for (t1 = J.get$iterator$ax(numeratorUnits), t2 = this._serialize0$_buffer, t3 = this._serialize0$_style !== B.OutputStyle_10; t1.moveNext$0();) { - t4 = t1.get$current(t1); - if (t3) - t2.writeCharCode$1(32); - t2.writeCharCode$1(42); - if (t3) - t2.writeCharCode$1(32); - t2.writeCharCode$1(49); - t2.write$1(0, t4); - } - for (t1 = J.get$iterator$ax(denominatorUnits); t1.moveNext$0();) { - t4 = t1.get$current(t1); - if (t3) - t2.writeCharCode$1(32); - t2.writeCharCode$1(47); - if (t3) - t2.writeCharCode$1(32); - t2.writeCharCode$1(49); - t2.write$1(0, t4); - } - }, - _serialize0$_parenthesizeCalculationRhs$2(outer, right) { - var t1; - $label0$0: { - if (B.CalculationOperator_Qf10 === outer) { - t1 = true; - break $label0$0; - } - if (B.CalculationOperator_g2q0 === outer) { - t1 = false; - break $label0$0; - } - t1 = right === B.CalculationOperator_g2q0 || right === B.CalculationOperator_CxF0; - break $label0$0; - } - return t1; - }, - visitColor$1(value) { - var _0_0, _0_2, _0_6, t1, _0_4, _0_6_isSet, t2, _0_10_isSet, _0_10, _0_12_isSet, _0_14, _0_12, _0_14_isSet, t3, _0_10_isSet0, polar, t4, t5, _this = this, _null = null; - $label0$0: { - _0_0 = value._color0$_space; - _0_2 = B.RgbColorSpace_mlz0 === _0_0; - _0_6 = _null; - t1 = true; - if (!_0_2) { - _0_4 = B.HslColorSpace_gsm0 === _0_0; - _0_6_isSet = !_0_4; - if (_0_6_isSet) { - _0_6 = B.HwbColorSpace_06z0 === _0_0; - t1 = _0_6; - } - } else { - _0_4 = _null; - _0_6_isSet = false; - } - if (t1 && value.channel0OrNull != null && value.channel1OrNull != null && value.channel2OrNull != null && value.alphaOrNull != null) { - _this._serialize0$_writeLegacyColor$1(value); - break $label0$0; - } - if (_0_2) { - t1 = _this._serialize0$_buffer; - t1.write$1(0, "rgb("); - _this._serialize0$_writeChannel$1(value.channel0OrNull); - t1.writeCharCode$1(32); - _this._serialize0$_writeChannel$1(value.channel1OrNull); - t1.writeCharCode$1(32); - _this._serialize0$_writeChannel$1(value.channel2OrNull); - _this._serialize0$_maybeWriteSlashAlpha$1(value); - t1.writeCharCode$1(41); - break $label0$0; - } - if (!_0_4) - t1 = _0_6_isSet ? _0_6 : B.HwbColorSpace_06z0 === _0_0; - else - t1 = true; - if (t1) { - t1 = _this._serialize0$_buffer; - t1.write$1(0, _0_0); - t1.writeCharCode$1(40); - t2 = _this._serialize0$_style === B.OutputStyle_10 ? _null : "deg"; - _this._serialize0$_writeChannel$2(value.channel0OrNull, t2); - t1.writeCharCode$1(32); - _this._serialize0$_writeChannel$2(value.channel1OrNull, "%"); - t1.writeCharCode$1(32); - _this._serialize0$_writeChannel$2(value.channel2OrNull, "%"); - _this._serialize0$_maybeWriteSlashAlpha$1(value); - t1.writeCharCode$1(41); - break $label0$0; - } - _0_10_isSet = B.LabColorSpace_IF20 !== _0_0; - if (_0_10_isSet) { - _0_10 = B.LchColorSpace_wv80 === _0_0; - t1 = _0_10; - } else { - _0_10 = _null; - t1 = true; - } - t2 = false; - if (t1) - if (!_this._serialize0$_inspect) { - t1 = value.channel0OrNull; - if (t1 == null) - t1 = 0; - if (t1 > 0 || A.fuzzyEquals0(t1, 0)) - t1 = t1 < 100 || A.fuzzyEquals0(t1, 100); - else - t1 = false; - t1 = !t1 && value.channel1OrNull != null && value.channel2OrNull != null; - } else - t1 = t2; - else - t1 = t2; - _0_12_isSet = !t1; - _0_14 = _null; - if (_0_12_isSet) { - _0_12 = B.OklabColorSpace_yrt0 === _0_0; - t1 = false; - _0_14_isSet = !_0_12; - if (_0_14_isSet) { - _0_14 = B.OklchColorSpace_li80 === _0_0; - t2 = _0_14; - } else - t2 = true; - t3 = false; - if (t2) - if (!_this._serialize0$_inspect) { - t2 = value.channel0OrNull; - if (t2 == null) - t2 = 0; - if (t2 > 0 || A.fuzzyEquals0(t2, 0)) - t2 = t2 < 1 || A.fuzzyEquals0(t2, 1); - else - t2 = false; - t2 = !t2 && value.channel1OrNull != null && value.channel2OrNull != null; - } else - t2 = t3; - else - t2 = t3; - if (!t2) { - if (_0_10_isSet) { - t2 = _0_10; - _0_10_isSet0 = _0_10_isSet; - } else { - _0_10 = B.LchColorSpace_wv80 === _0_0; - t2 = _0_10; - _0_10_isSet0 = true; - } - if (!t2) - if (_0_14_isSet) - t2 = _0_14; - else { - _0_14 = B.OklchColorSpace_li80 === _0_0; - t2 = _0_14; - _0_14_isSet = true; - } - else - t2 = true; - if (t2) - if (!_this._serialize0$_inspect) { - t1 = value.channel1OrNull; - t2 = t1 == null; - if (t2) - t1 = 0; - t1 = t1 < 0 && !A.fuzzyEquals0(t1, 0) && value.channel0OrNull != null && !t2; - } - } else { - _0_10_isSet0 = _0_10_isSet; - t1 = true; - } - } else { - _0_12 = _null; - _0_10_isSet0 = _0_10_isSet; - _0_14_isSet = false; - t1 = true; - } - if (t1) { - t1 = _this._serialize0$_buffer; - t1.write$1(0, "color-mix(in "); - t1.write$1(0, _0_0); - t2 = _this._serialize0$_style === B.OutputStyle_10; - t1.write$1(0, t2 ? "," : ", "); - _this._serialize0$_writeColorFunction$1(value.toSpace$1(B.XyzD65ColorSpace_4CA0)); - if (!t2) - t1.writeCharCode$1(32); - t1.write$1(0, "100%"); - t1.write$1(0, t2 ? "," : ", "); - t1.write$1(0, t2 ? "red" : "black"); - t1.writeCharCode$1(41); - break $label0$0; - } - t1 = true; - if (_0_10_isSet) - if (!(_0_12_isSet ? _0_12 : B.OklabColorSpace_yrt0 === _0_0)) - if (!(_0_10_isSet0 ? _0_10 : B.LchColorSpace_wv80 === _0_0)) - t1 = _0_14_isSet ? _0_14 : B.OklchColorSpace_li80 === _0_0; - if (t1) { - t1 = _this._serialize0$_buffer; - t1.write$1(0, _0_0); - t1.writeCharCode$1(40); - t2 = _0_0._space$_channels; - polar = t2[2].isPolarAngle; - t3 = false; - if (!_this._serialize0$_inspect) { - t4 = value.channel0OrNull; - if (t4 == null) - t4 = 0; - if (t4 > 0 || A.fuzzyEquals0(t4, 0)) - t4 = t4 < 100 || A.fuzzyEquals0(t4, 100); - else - t4 = false; - if (t4) { - if (polar) { - t3 = value.channel1OrNull; - if (t3 == null) - t3 = 0; - t3 = t3 < 0 && !A.fuzzyEquals0(t3, 0); - } - } else - t3 = true; - } - if (t3) { - t1.write$1(0, "from "); - t1.write$1(0, _this._serialize0$_style === B.OutputStyle_10 ? "red" : "black"); - t1.writeCharCode$1(32); - } - t3 = _this._serialize0$_style !== B.OutputStyle_10; - t4 = t3 && value.channel0OrNull != null; - t5 = value.channel0OrNull; - if (t4) { - t2 = type$.LinearChannel_2._as(t2[0]); - _this._serialize0$_writeNumber$1((t5 == null ? 0 : t5) * 100 / t2.max); - t1.writeCharCode$1(37); - } else - _this._serialize0$_writeChannel$1(t5); - t1.writeCharCode$1(32); - _this._serialize0$_writeChannel$1(value.channel1OrNull); - t1.writeCharCode$1(32); - t2 = polar && t3 ? "deg" : _null; - _this._serialize0$_writeChannel$2(value.channel2OrNull, t2); - _this._serialize0$_maybeWriteSlashAlpha$1(value); - t1.writeCharCode$1(41); - break $label0$0; - } - _this._serialize0$_writeColorFunction$1(value); - } - }, - _serialize0$_writeChannel$2(channel, unit) { - var _this = this; - if (channel == null) - _this._serialize0$_buffer.write$1(0, "none"); - else if (isFinite(channel)) { - _this._serialize0$_writeNumber$1(channel); - if (unit != null) - _this._serialize0$_buffer.write$1(0, unit); - } else - _this.visitNumber$1(A.SassNumber_SassNumber0(channel, unit)); - }, - _serialize0$_writeChannel$1(channel) { - return this._serialize0$_writeChannel$2(channel, null); - }, - _serialize0$_writeLegacyColor$1(color) { - var rgb, t3, red, green, blue, hsl, hue, saturation, lightness, hwb, _0_0, format, _1_0, _this = this, - t1 = color.alphaOrNull, - t2 = t1 == null, - opaque = A.fuzzyEquals0(t2 ? 0 : t1, 1); - if (!color.get$isInGamut() && !_this._serialize0$_inspect) { - _this._serialize0$_writeHsl$1(color); - return; - } - if (_this._serialize0$_style === B.OutputStyle_10) { - rgb = color.toSpace$1(B.RgbColorSpace_mlz0); - if (opaque && _this._serialize0$_tryIntegerRgb$1(rgb)) - return; - t3 = rgb.channel0OrNull; - red = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); - t3 = rgb.channel1OrNull; - green = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); - t3 = rgb.channel2OrNull; - blue = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); - hsl = color.toSpace$1(B.HslColorSpace_gsm0); - t3 = hsl.channel0OrNull; - hue = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); - t3 = hsl.channel1OrNull; - saturation = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); - t3 = hsl.channel2OrNull; - lightness = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); - t3 = _this._serialize0$_buffer; - if (red.length + green.length + blue.length <= hue.length + saturation.length + lightness.length + 2) { - t3.write$1(0, opaque ? "rgb(" : "rgba("); - t3.write$1(0, red); - t3.writeCharCode$1(44); - t3.write$1(0, green); - t3.writeCharCode$1(44); - t3.write$1(0, blue); - } else { - t3.write$1(0, opaque ? "hsl(" : "hsla("); - t3.write$1(0, hue); - t3.writeCharCode$1(44); - t3.write$1(0, saturation); - t3.write$1(0, "%,"); - t3.write$1(0, lightness); - t3.writeCharCode$1(37); - } - if (!opaque) { - t3.writeCharCode$1(44); - _this._serialize0$_writeNumber$1(t2 ? 0 : t1); - } - t3.writeCharCode$1(41); - return; - } - t3 = color._color0$_space; - if (t3 === B.HslColorSpace_gsm0) { - _this._serialize0$_writeHsl$1(color); - return; - } else if (_this._serialize0$_inspect && t3 === B.HwbColorSpace_06z0) { - t3 = _this._serialize0$_buffer; - t3.write$1(0, "hwb("); - hwb = color.toSpace$1(B.HwbColorSpace_06z0); - _this._serialize0$_writeNumber$1(hwb.channel$1(0, "hue")); - t3.writeCharCode$1(32); - _this._serialize0$_writeNumber$1(hwb.channel$1(0, "whiteness")); - t3.writeCharCode$1(37); - t3.writeCharCode$1(32); - _this._serialize0$_writeNumber$1(hwb.channel$1(0, "blackness")); - t3.writeCharCode$1(37); - if (!A.fuzzyEquals0(t2 ? 0 : t1, 1)) { - t3.write$1(0, " / "); - _this._serialize0$_writeNumber$1(t2 ? 0 : t1); - } - t3.writeCharCode$1(41); - return; - } - _0_0 = color.format; - if (B.C__ColorFormatEnum0 === _0_0) { - _this._serialize0$_writeRgb$1(color); - return; - } - t1 = _0_0 instanceof A.SpanColorFormat0; - format = t1 ? _0_0 : null; - if (t1) { - _this._serialize0$_buffer.write$1(0, format._color0$_span.get$text()); - return; - } - if (opaque) { - rgb = color.toSpace$1(B.RgbColorSpace_mlz0); - _1_0 = $.$get$namesByColor0().$index(0, rgb); - if (_1_0 != null) { - _this._serialize0$_buffer.write$1(0, _1_0); - return; - } - if (_this._serialize0$_canUseHex$1(rgb)) { - _this._serialize0$_buffer.writeCharCode$1(35); - t1 = rgb.channel0OrNull; - _this._serialize0$_writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); - t1 = rgb.channel1OrNull; - _this._serialize0$_writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); - t1 = rgb.channel2OrNull; - _this._serialize0$_writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); - return; - } - } - if (t3 === B.HwbColorSpace_06z0) - _this._serialize0$_writeHsl$1(color); - else - _this._serialize0$_writeRgb$1(color); - }, - _serialize0$_tryIntegerRgb$1(rgb) { - var t1, redInt, greenInt, blueInt, shortHex, _0_0, t2, t3, $name, _this = this; - if (!_this._serialize0$_canUseHex$1(rgb)) - return false; - t1 = rgb.channel0OrNull; - redInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); - t1 = rgb.channel1OrNull; - greenInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); - t1 = rgb.channel2OrNull; - blueInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); - t1 = redInt & 15; - shortHex = t1 === B.JSInt_methods._shrOtherPositive$1(redInt, 4) && (greenInt & 15) === B.JSInt_methods._shrOtherPositive$1(greenInt, 4) && (blueInt & 15) === B.JSInt_methods._shrOtherPositive$1(blueInt, 4); - _0_0 = $.$get$namesByColor0().$index(0, rgb); - t2 = false; - if (_0_0 != null) { - t3 = _0_0.length; - t2 = t3 <= (shortHex ? 4 : 7); - $name = _0_0; - } else - $name = null; - if (t2) - _this._serialize0$_buffer.write$1(0, $name); - else { - t2 = _this._serialize0$_buffer; - if (shortHex) { - t2.writeCharCode$1(35); - t2.writeCharCode$1(A.hexCharFor0(t1)); - t2.writeCharCode$1(A.hexCharFor0(greenInt & 15)); - t2.writeCharCode$1(A.hexCharFor0(blueInt & 15)); - } else { - t2.writeCharCode$1(35); - _this._serialize0$_writeHexComponent$1(redInt); - _this._serialize0$_writeHexComponent$1(greenInt); - _this._serialize0$_writeHexComponent$1(blueInt); - } - } - return true; - }, - _serialize0$_canUseHex$1(rgb) { - var t2, - t1 = rgb.channel0OrNull; - if (t1 == null) - t1 = 0; - if (A.fuzzyIsInt0(t1)) - t1 = (t1 > 0 || A.fuzzyEquals0(t1, 0)) && t1 < 256 && !A.fuzzyEquals0(t1, 256); - else - t1 = false; - t2 = false; - if (t1) { - t1 = rgb.channel1OrNull; - if (t1 == null) - t1 = 0; - if (A.fuzzyIsInt0(t1)) - t1 = (t1 > 0 || A.fuzzyEquals0(t1, 0)) && t1 < 256 && !A.fuzzyEquals0(t1, 256); - else - t1 = false; - if (t1) { - t1 = rgb.channel2OrNull; - if (t1 == null) - t1 = 0; - if (A.fuzzyIsInt0(t1)) - t1 = (t1 > 0 || A.fuzzyEquals0(t1, 0)) && t1 < 256 && !A.fuzzyEquals0(t1, 256); - else - t1 = t2; - } else - t1 = t2; - } else - t1 = t2; - return t1; - }, - _serialize0$_writeRgb$1(color) { - var t4, _this = this, - t1 = color.alphaOrNull, - t2 = t1 == null, - opaque = A.fuzzyEquals0(t2 ? 0 : t1, 1), - rgb = color.toSpace$1(B.RgbColorSpace_mlz0), - t3 = _this._serialize0$_buffer; - t3.write$1(0, opaque ? "rgb(" : "rgba("); - _this._serialize0$_writeNumber$1(rgb.channel$1(0, "red")); - t4 = _this._serialize0$_style === B.OutputStyle_10; - t3.write$1(0, t4 ? "," : ", "); - _this._serialize0$_writeNumber$1(rgb.channel$1(0, "green")); - t3.write$1(0, t4 ? "," : ", "); - _this._serialize0$_writeNumber$1(rgb.channel$1(0, "blue")); - if (!opaque) { - t3.write$1(0, t4 ? "," : ", "); - _this._serialize0$_writeNumber$1(t2 ? 0 : t1); - } - t3.writeCharCode$1(41); - }, - _serialize0$_writeHsl$1(color) { - var t4, _this = this, - t1 = color.alphaOrNull, - t2 = t1 == null, - opaque = A.fuzzyEquals0(t2 ? 0 : t1, 1), - hsl = color.toSpace$1(B.HslColorSpace_gsm0), - t3 = _this._serialize0$_buffer; - t3.write$1(0, opaque ? "hsl(" : "hsla("); - _this._serialize0$_writeChannel$1(hsl.channel$1(0, "hue")); - t4 = _this._serialize0$_style === B.OutputStyle_10; - t3.write$1(0, t4 ? "," : ", "); - _this._serialize0$_writeChannel$2(hsl.channel$1(0, "saturation"), "%"); - t3.write$1(0, t4 ? "," : ", "); - _this._serialize0$_writeChannel$2(hsl.channel$1(0, "lightness"), "%"); - if (!opaque) { - t3.write$1(0, t4 ? "," : ", "); - _this._serialize0$_writeNumber$1(t2 ? 0 : t1); - } - t3.writeCharCode$1(41); - }, - _serialize0$_writeColorFunction$1(color) { - var _this = this, - t1 = _this._serialize0$_buffer; - t1.write$1(0, "color("); - t1.write$1(0, color._color0$_space); - t1.writeCharCode$1(32); - _this._serialize0$_writeBetween$3(color.get$channelsOrNull(), " ", _this.get$_serialize0$_writeChannel()); - _this._serialize0$_maybeWriteSlashAlpha$1(color); - t1.writeCharCode$1(41); - }, - _serialize0$_writeHexComponent$1(color) { - var t1 = this._serialize0$_buffer; - t1.writeCharCode$1(A.hexCharFor0(B.JSInt_methods._shrOtherPositive$1(color, 4))); - t1.writeCharCode$1(A.hexCharFor0(color & 15)); - }, - _serialize0$_maybeWriteSlashAlpha$1(color) { - var t2, t3, _this = this, - t1 = color.alphaOrNull; - if (A.fuzzyEquals0(t1 == null ? 0 : t1, 1)) - return; - t2 = _this._serialize0$_style !== B.OutputStyle_10; - if (t2) - _this._serialize0$_buffer.writeCharCode$1(32); - t3 = _this._serialize0$_buffer; - t3.writeCharCode$1(47); - if (t2) - t3.writeCharCode$1(32); - _this._serialize0$_writeChannel$1(t1); - }, - visitList$1(value) { - var t2, singleton, t3, t4, t5, _this = this, - t1 = value._list1$_hasBrackets; - if (t1) - _this._serialize0$_buffer.writeCharCode$1(91); - else if (value._list1$_contents.length === 0) { - if (!_this._serialize0$_inspect) - throw A.wrapException(A.SassScriptException$0("() isn't a valid CSS value.", null)); - _this._serialize0$_buffer.write$1(0, "()"); - return; - } - t2 = _this._serialize0$_inspect; - singleton = false; - if (t2) - if (value._list1$_contents.length === 1) { - t3 = value._list1$_separator; - t3 = t3 === B.ListSeparator_ECn0 || t3 === B.ListSeparator_cQA0; - singleton = t3; - } - if (singleton && !t1) - _this._serialize0$_buffer.writeCharCode$1(40); - t3 = value._list1$_contents; - t3 = t2 ? t3 : new A.WhereIterable(t3, new A._SerializeVisitor_visitList_closure2(), A._arrayInstanceType(t3)._eval$1("WhereIterable<1>")); - t4 = value._list1$_separator; - t5 = _this._serialize0$_separatorString$1(t4); - _this._serialize0$_writeBetween$3(t3, t5, t2 ? new A._SerializeVisitor_visitList_closure3(_this, value) : new A._SerializeVisitor_visitList_closure4(_this)); - if (singleton) { - t2 = _this._serialize0$_buffer; - t2.write$1(0, t4.separator); - if (!t1) - t2.writeCharCode$1(41); - } - if (t1) - _this._serialize0$_buffer.writeCharCode$1(93); - }, - _serialize0$_separatorString$1(separator) { - var t1; - $label0$0: { - if (B.ListSeparator_ECn0 === separator) { - t1 = this._serialize0$_style === B.OutputStyle_10 ? "," : ", "; - break $label0$0; - } - if (B.ListSeparator_cQA0 === separator) { - t1 = this._serialize0$_style === B.OutputStyle_10 ? "/" : " / "; - break $label0$0; - } - if (B.ListSeparator_nbm0 === separator) { - t1 = " "; - break $label0$0; - } - t1 = ""; - break $label0$0; - } - return t1; - }, - _serialize0$_elementNeedsParens$2(separator, value) { - var t1; - $label1$1: { - if (value instanceof A.SassList0 && value._list1$_contents.length > 1 && !value._list1$_hasBrackets) { - $label0$0: { - if (B.ListSeparator_ECn0 === separator) { - t1 = value._list1$_separator === B.ListSeparator_ECn0; - break $label0$0; - } - if (B.ListSeparator_cQA0 === separator) { - t1 = value._list1$_separator; - t1 = t1 === B.ListSeparator_ECn0 || t1 === B.ListSeparator_cQA0; - break $label0$0; - } - t1 = value._list1$_separator !== B.ListSeparator_undecided_null_undecided0; - break $label0$0; - } - break $label1$1; - } - t1 = false; - break $label1$1; - } - return t1; - }, - visitMap$1(map) { - var t1, t2, _this = this; - if (!_this._serialize0$_inspect) - throw A.wrapException(A.SassScriptException$0(map.toString$0(0) + " isn't a valid CSS value.", null)); - t1 = _this._serialize0$_buffer; - t1.writeCharCode$1(40); - t2 = map._map0$_contents; - _this._serialize0$_writeBetween$3(t2.get$entries(t2), ", ", new A._SerializeVisitor_visitMap_closure0(_this)); - t1.writeCharCode$1(41); - }, - _serialize0$_writeMapElement$1(value) { - var needsParens = value instanceof A.SassList0 && value._list1$_separator === B.ListSeparator_ECn0 && !value._list1$_hasBrackets; - if (needsParens) - this._serialize0$_buffer.writeCharCode$1(40); - value.accept$1(this); - if (needsParens) - this._serialize0$_buffer.writeCharCode$1(41); - }, - visitNumber$1(value) { - var before, after, t1, _1_0, _this = this, - _0_0 = value.asSlash; - if (type$.Record_2_nullable_Object_and_nullable_Object._is(_0_0)) { - before = _0_0._0; - after = _0_0._1; - _this.visitNumber$1(before); - _this._serialize0$_buffer.writeCharCode$1(47); - _this.visitNumber$1(after); - return; - } - t1 = value._number1$_value; - if (!isFinite(t1)) { - _this.visitCalculation$1(new A.SassCalculation0("calc", A.List_List$unmodifiable(A._setArrayType([value], type$.JSArray_Object), type$.Object))); - return; - } - if (value.get$hasComplexUnits()) { - if (!_this._serialize0$_inspect) - throw A.wrapException(A.SassScriptException$0(value.toString$0(0) + " isn't a valid CSS value.", null)); - _this.visitCalculation$1(new A.SassCalculation0("calc", A.List_List$unmodifiable(A._setArrayType([value], type$.JSArray_Object), type$.Object))); - } else { - _this._serialize0$_writeNumber$1(t1); - _1_0 = value.get$numeratorUnits(value); - if (_1_0.length === 1) - _this._serialize0$_buffer.write$1(0, _1_0[0]); - } - }, - _serialize0$_writeNumberToString$1(number) { - var t1 = new A.StringBuffer(""); - this._serialize0$_writeNumber$2(number, new A.NoSourceMapBuffer0(t1)); - t1 = t1._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _serialize0$_writeNumber$2(number, buffer) { - var _0_0, text, _this = this; - if (buffer == null) - buffer = _this._serialize0$_buffer; - _0_0 = A.fuzzyAsInt0(number); - if (_0_0 != null) { - buffer.write$1(0, _this._serialize0$_removeExponent$1(B.JSInt_methods.toString$0(_0_0))); - return; - } - text = _this._serialize0$_removeExponent$1(B.JSNumber_methods.toString$0(number)); - if (text.length < 12) { - buffer.write$1(0, _this._serialize0$_style === B.OutputStyle_10 && text.charCodeAt(0) === 48 ? B.JSString_methods.substring$1(text, 1) : text); - return; - } - _this._serialize0$_writeRounded$2(text, buffer); - }, - _serialize0$_writeNumber$1(number) { - return this._serialize0$_writeNumber$2(number, null); - }, - _serialize0$_removeExponent$1(text) { - var buffer, t2, t3, additionalZeroes, - negative = text.charCodeAt(0) === 45, - exponent = A._Cell$(), - t1 = text.length, - i = 0; - while (true) { - if (!(i < t1)) { - buffer = null; - break; - } - c$0: { - if (text.charCodeAt(i) !== 101) - break c$0; - buffer = new A.StringBuffer(""); - t2 = buffer._contents = "" + A.Primitives_stringFromCharCode(text.charCodeAt(0)); - if (negative) { - t2 += A.Primitives_stringFromCharCode(text.charCodeAt(1)); - buffer._contents = t2; - if (i > 3) - buffer._contents = t2 + B.JSString_methods.substring$2(text, 3, i); - } else if (i > 2) - buffer._contents = t2 + B.JSString_methods.substring$2(text, 2, i); - exponent.__late_helper$_value = A.int_parse(B.JSString_methods.substring$2(text, i + 1, t1), null); - break; - } - ++i; - } - if (buffer == null) - return text; - if (exponent._readLocal$0() > 0) { - t1 = exponent._readLocal$0(); - t2 = buffer._contents; - t3 = negative ? 1 : 0; - additionalZeroes = t1 - (t2.length - 1 - t3); - for (t1 = t2, i = 0; i < additionalZeroes; ++i) { - t1 = A.Primitives_stringFromCharCode(48); - t1 = buffer._contents += t1; - } - return t1.charCodeAt(0) == 0 ? t1 : t1; - } else { - negative = text.charCodeAt(0) === 45; - t1 = (negative ? "" + A.Primitives_stringFromCharCode(45) : "") + "0."; - i = -1; - while (true) { - t2 = exponent.__late_helper$_value; - if (t2 === exponent) - A.throwExpression(A.LateError$localNI("")); - if (!(i > t2)) - break; - t1 += A.Primitives_stringFromCharCode(48); - --i; - } - if (negative) { - t2 = buffer._contents; - t2 = B.JSString_methods.substring$1(t2.charCodeAt(0) == 0 ? t2 : t2, 1); - } else - t2 = buffer; - t2 = t1 + A.S(t2); - return t2.charCodeAt(0) == 0 ? t2 : t2; - } - }, - _serialize0$_writeRounded$2(text, buffer) { - var t1, digits, negative, textIndex, digitsIndex, textIndex0, codeUnit, digitsIndex0, indexAfterPrecision, digitsIndex1, newDigit, writtenIndex; - if (B.JSString_methods.endsWith$1(text, ".0")) { - buffer.write$1(0, B.JSString_methods.substring$2(text, 0, text.length - 2)); - return; - } - t1 = text.length; - digits = new Uint8Array(t1 + 1); - negative = text.charCodeAt(0) === 45; - textIndex = negative ? 1 : 0; - for (digitsIndex = 1; true; textIndex = textIndex0, digitsIndex = digitsIndex0) { - if (textIndex === t1) { - buffer.write$1(0, text); - return; - } - textIndex0 = textIndex + 1; - codeUnit = text.charCodeAt(textIndex); - if (codeUnit === 46) { - textIndex = textIndex0; - break; - } - digitsIndex0 = digitsIndex + 1; - digits[digitsIndex] = codeUnit - 48; - } - indexAfterPrecision = textIndex + 10; - if (indexAfterPrecision >= t1) { - buffer.write$1(0, text); - return; - } - for (digitsIndex0 = digitsIndex; textIndex < indexAfterPrecision; textIndex = textIndex0, digitsIndex0 = digitsIndex1) { - digitsIndex1 = digitsIndex0 + 1; - textIndex0 = textIndex + 1; - digits[digitsIndex0] = text.charCodeAt(textIndex) - 48; - } - if (text.charCodeAt(textIndex) - 48 >= 5) - for (; true; digitsIndex0 = digitsIndex1) { - digitsIndex1 = digitsIndex0 - 1; - newDigit = digits[digitsIndex1] + 1; - digits[digitsIndex1] = newDigit; - if (newDigit !== 10) - break; - } - for (; digitsIndex0 < digitsIndex; ++digitsIndex0) - digits[digitsIndex0] = 0; - while (true) { - t1 = digitsIndex0 > digitsIndex; - if (!(t1 && digits[digitsIndex0 - 1] === 0)) - break; - --digitsIndex0; - } - if (digitsIndex0 === 2 && digits[0] === 0 && digits[1] === 0) { - buffer.writeCharCode$1(48); - return; - } - if (negative) - buffer.writeCharCode$1(45); - if (digits[0] === 0) - writtenIndex = this._serialize0$_style === B.OutputStyle_10 && digits[1] === 0 ? 2 : 1; - else - writtenIndex = 0; - for (; writtenIndex < digitsIndex; ++writtenIndex) - buffer.writeCharCode$1(48 + digits[writtenIndex]); - if (t1) { - buffer.writeCharCode$1(46); - for (; writtenIndex < digitsIndex0; ++writtenIndex) - buffer.writeCharCode$1(48 + digits[writtenIndex]); - } - }, - _serialize0$_visitQuotedString$2$forceDoubleQuote(string, forceDoubleQuote) { - var t1, includesSingleQuote, includesDoubleQuote, i, char, _1_2, _1_4, _0_0, quote, _this = this, - buffer = forceDoubleQuote ? _this._serialize0$_buffer : new A.StringBuffer(""); - if (forceDoubleQuote) - buffer.writeCharCode$1(34); - for (t1 = string.length, includesSingleQuote = false, includesDoubleQuote = false, i = 0; i < t1; ++i) { - char = string.charCodeAt(i); - _1_2 = 39 === char; - if (_1_2 && forceDoubleQuote) { - buffer.writeCharCode$1(39); - continue; - } - if (_1_2 && includesDoubleQuote) { - _this._serialize0$_visitQuotedString$2$forceDoubleQuote(string, true); - return; - } - if (_1_2) { - buffer.writeCharCode$1(39); - includesSingleQuote = true; - continue; - } - _1_4 = 34 === char; - if (_1_4 && forceDoubleQuote) { - buffer.writeCharCode$1(92); - buffer.writeCharCode$1(34); - continue; - } - if (_1_4 && includesSingleQuote) { - _this._serialize0$_visitQuotedString$2$forceDoubleQuote(string, true); - return; - } - if (_1_4) { - buffer.writeCharCode$1(34); - includesDoubleQuote = true; - continue; - } - if (0 === char || 1 === char || 2 === char || 3 === char || 4 === char || 5 === char || 6 === char || 7 === char || 8 === char || 10 === char || 11 === char || 12 === char || 13 === char || 14 === char || 15 === char || 16 === char || 17 === char || 18 === char || 19 === char || 20 === char || 21 === char || 22 === char || 23 === char || 24 === char || 25 === char || 26 === char || 27 === char || 28 === char || 29 === char || 30 === char || 31 === char || 127 === char) { - _this._serialize0$_writeEscape$4(buffer, char, string, i); - continue; - } - if (92 === char) { - buffer.writeCharCode$1(92); - buffer.writeCharCode$1(92); - continue; - } - _0_0 = _this._serialize0$_tryPrivateUseCharacter$4(buffer, char, string, i); - if (_0_0 != null) - i = _0_0; - else - buffer.writeCharCode$1(char); - } - if (forceDoubleQuote) - buffer.writeCharCode$1(34); - else { - quote = includesDoubleQuote ? 39 : 34; - t1 = _this._serialize0$_buffer; - t1.writeCharCode$1(quote); - t1.write$1(0, buffer); - t1.writeCharCode$1(quote); - } - }, - _serialize0$_visitQuotedString$1(string) { - return this._serialize0$_visitQuotedString$2$forceDoubleQuote(string, false); - }, - _serialize0$_visitUnquotedString$1(string) { - var t1, t2, afterNewline, i, _1_0, _0_0; - for (t1 = string.length, t2 = this._serialize0$_buffer, afterNewline = false, i = 0; i < t1; ++i) { - _1_0 = string.charCodeAt(i); - if (10 === _1_0) { - t2.writeCharCode$1(32); - afterNewline = true; - continue; - } - if (32 === _1_0) { - if (!afterNewline) - t2.writeCharCode$1(32); - continue; - } - _0_0 = this._serialize0$_tryPrivateUseCharacter$4(t2, _1_0, string, i); - if (_0_0 != null) - i = _0_0; - else - t2.writeCharCode$1(_1_0); - afterNewline = false; - } - }, - _serialize0$_tryPrivateUseCharacter$4(buffer, codeUnit, string, i) { - var t1; - if (this._serialize0$_style === B.OutputStyle_10) - return null; - if (codeUnit >= 57344 && codeUnit <= 63743) { - this._serialize0$_writeEscape$4(buffer, codeUnit, string, i); - return i; - } - if (codeUnit >>> 7 === 439 && string.length > i + 1) { - t1 = i + 1; - this._serialize0$_writeEscape$4(buffer, A.combineSurrogates(codeUnit, string.charCodeAt(t1)), string, t1); - return t1; - } - return null; - }, - _serialize0$_writeEscape$4(buffer, character, string, i) { - var t1, next; - buffer.writeCharCode$1(92); - buffer.write$1(0, B.JSInt_methods.toRadixString$1(character, 16)); - t1 = i + 1; - if (string.length === t1) - return; - next = string.charCodeAt(t1); - if (A.CharacterExtension_get_isHex0(next) || 32 === next || 9 === next) - buffer.writeCharCode$1(32); - }, - visitAttributeSelector$1(attribute) { - var _0_0, t2, - t1 = this._serialize0$_buffer; - t1.writeCharCode$1(91); - t1.write$1(0, attribute.name); - _0_0 = attribute.value; - if (_0_0 != null) { - t1.write$1(0, attribute.op); - if (A.Parser_isIdentifier0(_0_0) && !B.JSString_methods.startsWith$1(_0_0, "--")) { - t1.write$1(0, _0_0); - t2 = attribute.modifier; - if (t2 != null) - t1.writeCharCode$1(32); - } else { - this._serialize0$_visitQuotedString$1(_0_0); - t2 = attribute.modifier; - if (t2 != null) - if (this._serialize0$_style !== B.OutputStyle_10) - t1.writeCharCode$1(32); - } - A.NullableExtension_andThen0(t2, t1.get$write(t1)); - } - t1.writeCharCode$1(93); - }, - visitClassSelector$1(klass) { - var t1 = this._serialize0$_buffer; - t1.writeCharCode$1(46); - t1.write$1(0, klass.name); - }, - visitComplexSelector$1(complex) { - var t2, t3, t4, t5, t6, i, component, t7, t8, t9, _this = this, - t1 = complex.leadingCombinators; - _this._serialize0$_writeCombinators$1(t1); - if (t1.length >= 1 && complex.components.length >= 1) - if (_this._serialize0$_style !== B.OutputStyle_10) - _this._serialize0$_buffer.writeCharCode$1(32); - for (t1 = complex.components, t2 = t1.length, t3 = t2 - 1, t4 = _this._serialize0$_buffer, t5 = _this._serialize0$_style === B.OutputStyle_10, t6 = !t5, i = 0; i < t2; ++i) { - component = t1[i]; - _this.visitCompoundSelector$1(component.selector); - t7 = component.combinators; - t8 = t7.length === 0; - if (!t8) - if (t6) - t4.writeCharCode$1(32); - t9 = t5 ? "" : " "; - _this._serialize0$_writeBetween$3(t7, t9, t4.get$write(t4)); - if (i !== t3) - t7 = !t5 || t8; - else - t7 = false; - if (t7) - t4.writeCharCode$1(32); - } - }, - _serialize0$_writeCombinators$1(combinators) { - var t1 = this._serialize0$_style === B.OutputStyle_10 ? "" : " ", - t2 = this._serialize0$_buffer; - return this._serialize0$_writeBetween$3(combinators, t1, t2.get$write(t2)); - }, - visitCompoundSelector$1(compound) { - var t2, t3, _i, - t1 = this._serialize0$_buffer, - start = t1.get$length(t1); - for (t2 = compound.components, t3 = t2.length, _i = 0; _i < t3; ++_i) - t2[_i].accept$1(this); - if (t1.get$length(t1) === start) - t1.writeCharCode$1(42); - }, - visitIDSelector$1(id) { - var t1 = this._serialize0$_buffer; - t1.writeCharCode$1(35); - t1.write$1(0, id.name); - }, - visitSelectorList$1(list) { - var t1, t2, t3, t4, first, t5, _this = this, - complexes = list.components; - for (t1 = J.get$iterator$ax(_this._serialize0$_inspect ? complexes : new A.WhereIterable(complexes, new A._SerializeVisitor_visitSelectorList_closure0(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>"))), t2 = _this._serialize0$_style !== B.OutputStyle_10, t3 = _this._serialize0$_buffer, t4 = _this._lineFeed.text, first = true; t1.moveNext$0();) { - t5 = t1.get$current(t1); - if (first) - first = false; - else { - t3.writeCharCode$1(44); - if (t5.lineBreak) { - if (t2) - t3.write$1(0, t4); - _this._serialize0$_writeIndentation$0(); - } else if (t2) - t3.writeCharCode$1(32); - } - _this.visitComplexSelector$1(t5); - } - }, - visitParentSelector$1($parent) { - var t1 = this._serialize0$_buffer; - t1.writeCharCode$1(38); - A.NullableExtension_andThen0($parent.suffix, t1.get$write(t1)); - }, - visitPlaceholderSelector$1(placeholder) { - var t1 = this._serialize0$_buffer; - t1.writeCharCode$1(37); - t1.write$1(0, placeholder.name); - }, - visitPseudoSelector$1(pseudo) { - var _0_4, t3, - t1 = pseudo.name, - t2 = false; - if ("not" === t1) { - _0_4 = pseudo.selector; - if (_0_4 instanceof A.SelectorList0) - t2 = (_0_4 == null ? type$.SelectorList_2._as(_0_4) : _0_4).accept$1(B._IsInvisibleVisitor_true0); - } - if (t2) - return; - t2 = this._serialize0$_buffer; - t2.writeCharCode$1(58); - if (!pseudo.isSyntacticClass) - t2.writeCharCode$1(58); - t2.write$1(0, t1); - t1 = pseudo.argument; - t3 = t1 == null; - if (t3 && pseudo.selector == null) - return; - t2.writeCharCode$1(40); - if (!t3) { - t2.write$1(0, t1); - if (pseudo.selector != null) - t2.writeCharCode$1(32); - } - A.NullableExtension_andThen0(pseudo.selector, this.get$visitSelectorList()); - t2.writeCharCode$1(41); - }, - visitTypeSelector$1(type) { - this._serialize0$_buffer.write$1(0, type.name); - }, - visitUniversalSelector$1(universal) { - var t2, - t1 = universal.namespace; - if (t1 != null) { - t2 = this._serialize0$_buffer; - t2.write$1(0, t1); - t2.writeCharCode$1(124); - } - this._serialize0$_buffer.writeCharCode$1(42); - }, - _serialize0$_write$1(value) { - return this._serialize0$_buffer.forSpan$2(value.span, new A._SerializeVisitor__write_closure0(this, value)); - }, - _serialize0$_visitChildren$1($parent) { - var t2, t3, t4, t5, t6, t7, t8, prePrevious, previous, t9, previous0, t10, savedIndentation, _this = this, - t1 = _this._serialize0$_buffer; - t1.writeCharCode$1(123); - for (t2 = $parent.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = _this._serialize0$_style === B.OutputStyle_10, t5 = !t4, t6 = _this.get$_serialize0$_requiresSemicolon(), t7 = !_this._serialize0$_inspect, t3 = t3._eval$1("ListBase.E"), t8 = _this._lineFeed.text, prePrevious = null, previous = null; t2.moveNext$0();) { - t9 = t2.__internal$_current; - previous0 = t9 == null ? t3._as(t9) : t9; - if (t7) - t9 = t4 ? previous0.accept$1(B._IsInvisibleVisitor_true_true0) : previous0.accept$1(B._IsInvisibleVisitor_true_false0); - else - t9 = false; - if (t9) - continue; - t9 = previous == null; - t10 = t9 ? null : t6.call$1(previous); - if (t10 == null ? false : t10) - t1.writeCharCode$1(59); - if (_this._serialize0$_isTrailingComment$2(previous0, t9 ? $parent : previous)) { - if (t5) - t1.writeCharCode$1(32); - savedIndentation = _this._serialize0$_indentation; - _this._serialize0$_indentation = 0; - new A._SerializeVisitor__visitChildren_closure1(_this, previous0).call$0(); - _this._serialize0$_indentation = savedIndentation; - } else { - if (t5) - t1.write$1(0, t8); - ++_this._serialize0$_indentation; - new A._SerializeVisitor__visitChildren_closure2(_this, previous0).call$0(); - --_this._serialize0$_indentation; - } - prePrevious = previous; - previous = previous0; - } - if (previous != null) { - if ((type$.CssParentNode_2._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment0)) && t5) - t1.writeCharCode$1(59); - if (prePrevious == null && _this._serialize0$_isTrailingComment$2(previous, $parent)) { - if (t5) - t1.writeCharCode$1(32); - } else { - _this._serialize0$_writeLineFeed$0(); - _this._serialize0$_writeIndentation$0(); - } - } - t1.writeCharCode$1(125); - }, - _serialize0$_requiresSemicolon$1(node) { - return type$.CssParentNode_2._is(node) ? node.get$isChildless() : !(node instanceof A.ModifiableCssComment0); - }, - _serialize0$_isTrailingComment$2(node, previous) { - var t1, t2, t3, searchFrom, endOffset, t4, span; - if (this._serialize0$_style === B.OutputStyle_10) - return false; - if (!(node instanceof A.ModifiableCssComment0)) - return false; - t1 = node.span; - t2 = t1.get$sourceUrl(t1); - t3 = previous.get$span(previous); - if (!J.$eq$(t2, t3.get$sourceUrl(t3))) - return false; - t2 = previous.get$span(previous); - if (!(J.$eq$(t2.get$file(t2).url, t1.get$file(t1).url) && t2.get$start(t2).offset <= t1.get$start(t1).offset && t2.get$end(t2).offset >= t1.get$end(t1).offset)) { - t1 = t1.get$start(t1); - t1 = t1.file.getLine$1(t1.offset); - t2 = previous.get$span(previous); - t2 = t2.get$end(t2); - return t1 === t2.file.getLine$1(t2.offset); - } - t2 = t1.get$start(t1); - t3 = previous.get$span(previous); - searchFrom = t2.offset - t3.get$start(t3).offset - 1; - if (searchFrom < 0) - return false; - endOffset = Math.max(0, B.JSString_methods.lastIndexOf$2(previous.get$span(previous).get$text(), "{", searchFrom)); - t2 = previous.get$span(previous); - t2 = t2.get$file(t2); - t3 = previous.get$span(previous); - t3 = t3.get$start(t3); - t4 = previous.get$span(previous); - span = t2.span$2(0, t3.offset, t4.get$start(t4).offset + endOffset); - t1 = t1.get$start(t1); - t1 = t1.file.getLine$1(t1.offset); - t4 = A.FileLocation$_(span.file, span._end); - return t1 === t4.file.getLine$1(t4.offset); - }, - _serialize0$_writeLineFeed$0() { - if (this._serialize0$_style !== B.OutputStyle_10) - this._serialize0$_buffer.write$1(0, this._lineFeed.text); - }, - _serialize0$_writeIndentation$0() { - var _this = this; - if (_this._serialize0$_style === B.OutputStyle_10) - return; - _this._serialize0$_writeTimes$2(_this._serialize0$_indentCharacter, _this._serialize0$_indentation * _this._serialize0$_indentWidth); - }, - _serialize0$_writeTimes$2(char, times) { - var t1, i; - for (t1 = this._serialize0$_buffer, i = 0; i < times; ++i) - t1.writeCharCode$1(char); - }, - _serialize0$_writeBetween$1$3(iterable, text, callback) { - var t1, t2, first, value; - for (t1 = J.get$iterator$ax(iterable), t2 = this._serialize0$_buffer, first = true; t1.moveNext$0();) { - value = t1.get$current(t1); - if (first) - first = false; - else - t2.write$1(0, text); - callback.call$1(value); - } - }, - _serialize0$_writeBetween$3(iterable, text, callback) { - return this._serialize0$_writeBetween$1$3(iterable, text, callback, type$.dynamic); - } - }; - A._SerializeVisitor_visitCssComment_closure0.prototype = { - call$0() { - var t2, t3, _0_0, minimumIndentation, - t1 = this.$this; - if (t1._serialize0$_style === B.OutputStyle_10 && this.node.text.charCodeAt(2) !== 33) - return; - t2 = this.node; - t3 = t2.text; - if (B.JSString_methods.startsWith$1(t3, A.RegExp_RegExp("/\\*# source(Mapping)?URL=", false))) - return; - _0_0 = t1._serialize0$_minimumIndentation$1(t3); - if (_0_0 != null) { - t2 = t2.span; - t2 = t2.get$start(t2); - minimumIndentation = Math.min(_0_0, t2.file.getColumn$1(t2.offset)); - t1._serialize0$_writeIndentation$0(); - t1._serialize0$_writeWithIndent$2(t3, minimumIndentation); - } else { - t1._serialize0$_writeIndentation$0(); - t1._serialize0$_buffer.write$1(0, t3); - } - }, - $signature: 1 - }; - A._SerializeVisitor_visitCssAtRule_closure0.prototype = { - call$0() { - var t3, _0_0, - t1 = this.$this, - t2 = t1._serialize0$_buffer; - t2.writeCharCode$1(64); - t3 = this.node; - t1._serialize0$_write$1(t3.name); - _0_0 = t3.value; - if (_0_0 != null) { - t2.writeCharCode$1(32); - t1._serialize0$_write$1(_0_0); - } - }, - $signature: 1 - }; - A._SerializeVisitor_visitCssMediaRule_closure0.prototype = { - call$0() { - var t3, firstQuery, t4, t5, - t1 = this.$this, - t2 = t1._serialize0$_buffer; - t2.write$1(0, "@media"); - t3 = this.node.queries; - firstQuery = B.JSArray_methods.get$first(t3); - t4 = t1._serialize0$_style === B.OutputStyle_10; - t5 = true; - if (t4) - if (firstQuery.modifier == null) - if (firstQuery.type == null) { - t5 = firstQuery.conditions; - t5 = t5.length === 1 && J.startsWith$1$s(B.JSArray_methods.get$first(t5), "(not "); - } - if (t5) - t2.writeCharCode$1(32); - t2 = t4 ? "," : ", "; - t1._serialize0$_writeBetween$3(t3, t2, t1.get$_serialize0$_visitMediaQuery()); - }, - $signature: 1 - }; - A._SerializeVisitor_visitCssImport_closure0.prototype = { - call$0() { - var t3, t4, _0_0, - t1 = this.$this, - t2 = t1._serialize0$_buffer; - t2.write$1(0, "@import"); - t3 = t1._serialize0$_style !== B.OutputStyle_10; - if (t3) - t2.writeCharCode$1(32); - t4 = this.node; - t2.forSpan$2(t4.url.span, new A._SerializeVisitor_visitCssImport__closure0(t1, t4)); - _0_0 = t4.modifiers; - if (_0_0 != null) { - if (t3) - t2.writeCharCode$1(32); - t2.write$1(0, _0_0); - } - }, - $signature: 1 - }; - A._SerializeVisitor_visitCssImport__closure0.prototype = { - call$0() { - return this.$this._serialize0$_writeImportUrl$1(this.node.url.value); - }, - $signature: 0 - }; - A._SerializeVisitor_visitCssKeyframeBlock_closure0.prototype = { - call$0() { - var t1 = this.$this, - t2 = t1._serialize0$_style === B.OutputStyle_10 ? "," : ", ", - t3 = t1._serialize0$_buffer; - return t1._serialize0$_writeBetween$3(this.node.selector.value, t2, t3.get$write(t3)); - }, - $signature: 0 - }; - A._SerializeVisitor_visitCssStyleRule_closure0.prototype = { - call$0() { - return this.$this.visitSelectorList$1(this.node._style_rule0$_selector._box0$_inner.value); - }, - $signature: 0 - }; - A._SerializeVisitor_visitCssSupportsRule_closure0.prototype = { - call$0() { - var t1 = this.$this, - t2 = t1._serialize0$_buffer; - t2.write$1(0, "@supports"); - if (!(t1._serialize0$_style === B.OutputStyle_10 && J.codeUnitAt$1$s(this.node.condition.value, 0) === 40)) - t2.writeCharCode$1(32); - t1._serialize0$_write$1(this.node.condition); - }, - $signature: 1 - }; - A._SerializeVisitor_visitCssDeclaration_closure1.prototype = { - call$0() { - var t1 = this.$this, - t2 = this.node; - if (t1._serialize0$_style === B.OutputStyle_10) - t1._serialize0$_writeFoldedValue$1(t2); - else - t1._serialize0$_writeReindentedValue$1(t2); - }, - $signature: 1 - }; - A._SerializeVisitor_visitCssDeclaration_closure2.prototype = { - call$0() { - return this.node.value.value.accept$1(this.$this); - }, - $signature: 0 - }; - A._SerializeVisitor_visitList_closure2.prototype = { - call$1(element) { - return !element.get$isBlank(); - }, - $signature: 52 - }; - A._SerializeVisitor_visitList_closure3.prototype = { - call$1(element) { - var t1 = this.$this, - needsParens = t1._serialize0$_elementNeedsParens$2(this.value._list1$_separator, element); - if (needsParens) - t1._serialize0$_buffer.writeCharCode$1(40); - element.accept$1(t1); - if (needsParens) - t1._serialize0$_buffer.writeCharCode$1(41); - }, - $signature: 64 - }; - A._SerializeVisitor_visitList_closure4.prototype = { - call$1(element) { - element.accept$1(this.$this); - }, - $signature: 64 - }; - A._SerializeVisitor_visitMap_closure0.prototype = { - call$1(entry) { - var t1 = this.$this; - t1._serialize0$_writeMapElement$1(entry.key); - t1._serialize0$_buffer.write$1(0, ": "); - t1._serialize0$_writeMapElement$1(entry.value); - }, - $signature: 575 - }; - A._SerializeVisitor_visitSelectorList_closure0.prototype = { - call$1(complex) { - return !complex.accept$1(B._IsInvisibleVisitor_true0); - }, - $signature: 20 - }; - A._SerializeVisitor__write_closure0.prototype = { - call$0() { - return this.$this._serialize0$_buffer.write$1(0, this.value.value); - }, - $signature: 0 - }; - A._SerializeVisitor__visitChildren_closure1.prototype = { - call$0() { - return this.child.accept$1(this.$this); - }, - $signature: 0 - }; - A._SerializeVisitor__visitChildren_closure2.prototype = { - call$0() { - this.child.accept$1(this.$this); - }, - $signature: 0 - }; - A.OutputStyle0.prototype = { - _enumToString$0() { - return "OutputStyle." + this._name; - } - }; - A.LineFeed0.prototype = { - _enumToString$0() { - return "LineFeed." + this._name; - }, - toString$0(_) { - return this.name; - } - }; - A.JSSet.prototype = {}; - A.ShadowedModuleView0.prototype = { - get$url(_) { - var t1 = this._shadowed_view0$_inner; - return t1.get$url(t1); - }, - get$upstream() { - return this._shadowed_view0$_inner.get$upstream(); - }, - get$extensionStore() { - return this._shadowed_view0$_inner.get$extensionStore(); - }, - get$css(_) { - var t1 = this._shadowed_view0$_inner; - return t1.get$css(t1); - }, - get$preModuleComments() { - return this._shadowed_view0$_inner.get$preModuleComments(); - }, - get$transitivelyContainsCss() { - return this._shadowed_view0$_inner.get$transitivelyContainsCss(); - }, - get$transitivelyContainsExtensions() { - return this._shadowed_view0$_inner.get$transitivelyContainsExtensions(); - }, - setVariable$3($name, value, nodeWithSpan) { - if (!this.variables.containsKey$1($name)) - throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); - else - this._shadowed_view0$_inner.setVariable$3($name, value, nodeWithSpan); - }, - variableIdentity$1($name) { - return this._shadowed_view0$_inner.variableIdentity$1($name); - }, - $eq(_, other) { - var t1, t2, t3, _this = this; - if (other == null) - return false; - t1 = false; - if (other instanceof A.ShadowedModuleView0) - if (_this._shadowed_view0$_inner.$eq(0, other._shadowed_view0$_inner)) { - t2 = _this.variables; - t2 = t2.get$keys(t2); - t3 = other.variables; - if (B.C_IterableEquality.equals$2(0, t2, t3.get$keys(t3))) { - t2 = _this.functions; - t2 = t2.get$keys(t2); - t3 = other.functions; - if (B.C_IterableEquality.equals$2(0, t2, t3.get$keys(t3))) { - t1 = _this.mixins; - t1 = t1.get$keys(t1); - t2 = other.mixins; - t2 = B.C_IterableEquality.equals$2(0, t1, t2.get$keys(t2)); - t1 = t2; - } - } - } - return t1; - }, - get$hashCode(_) { - var t1 = this._shadowed_view0$_inner; - return t1.get$hashCode(t1); - }, - cloneCss$0() { - var _this = this; - return new A.ShadowedModuleView0(_this._shadowed_view0$_inner.cloneCss$0(), _this.variables, _this.variableNodes, _this.functions, _this.mixins, _this.$ti); - }, - toString$0(_) { - return "shadowed " + this._shadowed_view0$_inner.toString$0(0); - }, - $isModule1: 1, - get$variables() { - return this.variables; - }, - get$variableNodes() { - return this.variableNodes; - }, - get$functions(receiver) { - return this.functions; - }, - get$mixins() { - return this.mixins; - } - }; - A.SilentComment0.prototype = { - accept$1$1(visitor) { - return visitor.visitSilentComment$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.text; - }, - get$span(receiver) { - return this.span; - } - }; - A.SimpleSelector0.prototype = { - get$specificity() { - return 1000; - }, - get$hasComplicatedSuperselectorSemantics() { - return false; - }, - addSuffix$1(suffix) { - return A.throwExpression(A.MultiSpanSassException$0('Selector "' + this.toString$0(0) + "\" can't have a suffix", this.span, "outer selector", A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String), null)); - }, - unify$1(compound) { - var other, result, addedThis, _i, simple, _this = this, - t1 = false; - if (compound.length === 1) { - other = compound[0]; - if (!(other instanceof A.UniversalSelector0)) { - if (other instanceof A.PseudoSelector0) - t1 = other.isClass && other.name === "host" || other.get$isHostContext(); - } else - t1 = true; - } else - other = null; - if (t1) - return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector_2)); - if (B.JSArray_methods.contains$1(compound, _this)) - return compound; - result = A._setArrayType([], type$.JSArray_SimpleSelector_2); - for (t1 = compound.length, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { - simple = compound[_i]; - if (!addedThis && simple instanceof A.PseudoSelector0) { - result.push(_this); - addedThis = true; - } - result.push(simple); - } - if (!addedThis) - result.push(_this); - return result; - }, - isSuperselector$1(other) { - var list; - if (this.$eq(0, other)) - return true; - if (other instanceof A.PseudoSelector0 && other.isClass) { - list = other.selector; - if (list != null && $._subselectorPseudos0.contains$1(0, other.normalizedName)) - return B.JSArray_methods.every$1(list.components, new A.SimpleSelector_isSuperselector_closure0(this)); - } - return false; - } - }; - A.SimpleSelector_isSuperselector_closure0.prototype = { - call$1(complex) { - var t1 = complex.components; - return t1.length !== 0 && B.JSArray_methods.any$1(B.JSArray_methods.get$last(t1).selector.components, new A.SimpleSelector_isSuperselector__closure0(this.$this)); - }, - $signature: 20 - }; - A.SimpleSelector_isSuperselector__closure0.prototype = { - call$1(simple) { - return this.$this.isSuperselector$1(simple); - }, - $signature: 14 - }; - A.SingleUnitSassNumber0.prototype = { - get$numeratorUnits(_) { - return A.List_List$unmodifiable([this._single_unit$_unit], type$.String); - }, - get$denominatorUnits(_) { - return B.List_empty; - }, - get$hasUnits() { - return true; - }, - get$hasComplexUnits() { - return false; - }, - withValue$1(value) { - return new A.SingleUnitSassNumber0(this._single_unit$_unit, value, null); - }, - withSlash$2(numerator, denominator) { - return new A.SingleUnitSassNumber0(this._single_unit$_unit, this._number1$_value, new A._Record_2(numerator, denominator)); - }, - hasUnit$1(unit) { - return unit === this._single_unit$_unit; - }, - hasCompatibleUnits$1(other) { - return other instanceof A.SingleUnitSassNumber0 && A.conversionFactor0(this._single_unit$_unit, other._single_unit$_unit) != null; - }, - hasPossiblyCompatibleUnits$1(other) { - var t1, knownCompatibilities, otherUnit; - if (!(other instanceof A.SingleUnitSassNumber0)) - return false; - t1 = $.$get$_knownCompatibilitiesByUnit0(); - knownCompatibilities = t1.$index(0, this._single_unit$_unit.toLowerCase()); - if (knownCompatibilities == null) - return true; - otherUnit = other._single_unit$_unit.toLowerCase(); - return knownCompatibilities.contains$1(0, otherUnit) || !t1.containsKey$1(otherUnit); - }, - compatibleWithUnit$1(unit) { - return A.conversionFactor0(this._single_unit$_unit, unit) != null; - }, - coerceToMatch$3(other, $name, otherName) { - var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceToUnit$1(other._single_unit$_unit) : null; - return t1 == null ? this.super$SassNumber$coerceToMatch0(other, $name, otherName) : t1; - }, - coerceToMatch$1(other) { - return this.coerceToMatch$3(other, null, null); - }, - coerceValueToMatch$3(other, $name, otherName) { - var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceValueToUnit$1(other._single_unit$_unit) : null; - return t1 == null ? this.super$SassNumber$coerceValueToMatch0(other, $name, otherName) : t1; - }, - coerceValueToMatch$1(other) { - return this.coerceValueToMatch$3(other, null, null); - }, - convertToMatch$3(other, $name, otherName) { - var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceToUnit$1(other._single_unit$_unit) : null; - return t1 == null ? this.super$SassNumber$convertToMatch(other, $name, otherName) : t1; - }, - convertValueToMatch$3(other, $name, otherName) { - var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceValueToUnit$1(other._single_unit$_unit) : null; - return t1 == null ? this.super$SassNumber$convertValueToMatch0(other, $name, otherName) : t1; - }, - convertValueToMatch$1(other) { - return this.convertValueToMatch$3(other, null, null); - }, - coerce$3(newNumerators, newDenominators, $name) { - var t1 = J.getInterceptor$asx(newNumerators); - t1 = t1.get$length(newNumerators) === 1 && J.get$isEmpty$asx(newDenominators) ? this._single_unit$_coerceToUnit$1(t1.$index(newNumerators, 0)) : null; - return t1 == null ? this.super$SassNumber$coerce0(newNumerators, newDenominators, $name) : t1; - }, - coerce$2(newNumerators, newDenominators) { - return this.coerce$3(newNumerators, newDenominators, null); - }, - coerceValue$3(newNumerators, newDenominators, $name) { - var t1 = J.getInterceptor$asx(newNumerators); - t1 = t1.get$length(newNumerators) === 1 && J.get$isEmpty$asx(newDenominators) ? this._single_unit$_coerceValueToUnit$1(t1.$index(newNumerators, 0)) : null; - return t1 == null ? this.super$SassNumber$coerceValue0(newNumerators, newDenominators, $name) : t1; - }, - coerceValueToUnit$2(unit, $name) { - var t1 = this._single_unit$_coerceValueToUnit$1(unit); - return t1 == null ? this.super$SassNumber$coerceValueToUnit0(unit, $name) : t1; - }, - coerceValueToUnit$1(unit) { - return this.coerceValueToUnit$2(unit, null); - }, - _single_unit$_coerceToUnit$1(unit) { - var t1 = this._single_unit$_unit; - if (t1 === unit) - return this; - return A.NullableExtension_andThen0(A.conversionFactor0(unit, t1), new A.SingleUnitSassNumber__coerceToUnit_closure0(this, unit)); - }, - _single_unit$_coerceValueToUnit$1(unit) { - return A.NullableExtension_andThen0(A.conversionFactor0(unit, this._single_unit$_unit), new A.SingleUnitSassNumber__coerceValueToUnit_closure0(this)); - }, - multiplyUnits$3(value, otherNumerators, otherDenominators) { - var mutableOtherDenominators, t1 = {}; - t1.value = value; - t1.newNumerators = otherNumerators; - mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); - A.removeFirstWhere0(mutableOtherDenominators, new A.SingleUnitSassNumber_multiplyUnits_closure1(t1, this), new A.SingleUnitSassNumber_multiplyUnits_closure2(t1, this)); - return A.SassNumber_SassNumber$withUnits0(t1.value, mutableOtherDenominators, t1.newNumerators); - }, - unaryMinus$0() { - return new A.SingleUnitSassNumber0(this._single_unit$_unit, -this._number1$_value, null); - }, - $eq(_, other) { - var factor; - if (other == null) - return false; - if (other instanceof A.SingleUnitSassNumber0) { - factor = A.conversionFactor0(other._single_unit$_unit, this._single_unit$_unit); - return factor != null && A.fuzzyEquals0(this._number1$_value * factor, other._number1$_value); - } else - return false; - }, - get$hashCode(_) { - var _this = this, - t1 = _this.hashCache; - return t1 == null ? _this.hashCache = A.fuzzyHashCode0(_this._number1$_value * _this.canonicalMultiplierForUnit$1(_this._single_unit$_unit)) : t1; - } - }; - A.SingleUnitSassNumber__coerceToUnit_closure0.prototype = { - call$1(factor) { - return new A.SingleUnitSassNumber0(this.unit, this.$this._number1$_value * factor, null); - }, - $signature: 576 - }; - A.SingleUnitSassNumber__coerceValueToUnit_closure0.prototype = { - call$1(factor) { - return this.$this._number1$_value * factor; - }, - $signature: 15 - }; - A.SingleUnitSassNumber_multiplyUnits_closure1.prototype = { - call$1(denominator) { - var factor = A.conversionFactor0(denominator, this.$this._single_unit$_unit); - if (factor == null) - return false; - this._box_0.value *= factor; - return true; - }, - $signature: 5 - }; - A.SingleUnitSassNumber_multiplyUnits_closure2.prototype = { - call$0() { - var t1 = A._setArrayType([this.$this._single_unit$_unit], type$.JSArray_String), - t2 = this._box_0; - B.JSArray_methods.addAll$1(t1, t2.newNumerators); - t2.newNumerators = t1; - }, - $signature: 0 - }; - A.SourceInterpolationVisitor.prototype = { - visitBinaryOperationExpression$1(_, node) { - return this.buffer = null; - }, - visitBooleanExpression$1(_, node) { - return this.buffer = null; - }, - visitColorExpression$1(_, node) { - var t2, - t1 = this.buffer; - if (t1 != null) { - t2 = node.span.get$text(); - t1 = t1._interpolation_buffer0$_text; - t1._contents += t2; - } - return null; - }, - visitFunctionExpression$1(_, node) { - return this.buffer = null; - }, - visitInterpolatedFunctionExpression$1(_, node) { - var t1 = this.buffer; - if (t1 != null) - t1.addInterpolation$1(node.name); - this._visitArguments$1(node.$arguments); - }, - _visitArguments$1($arguments) { - var t2, t3, _this = this, - t1 = $arguments.named; - if (t1.get$isNotEmpty(t1) || $arguments.rest != null) - return; - t1 = $arguments.positional; - if (t1.length === 0) { - t1 = _this.buffer; - if (t1 != null) { - t2 = $arguments.span.get$text(); - t1 = t1._interpolation_buffer0$_text; - t1._contents += t2; - } - return; - } - t2 = _this.buffer; - if (t2 != null) { - t3 = A.SpanExtensions_before($arguments.span, J.get$span$z(B.JSArray_methods.get$first(t1))); - t3 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t3.file._decodedChars, t3._file$_start, t3._end), 0, null); - t2 = t2._interpolation_buffer0$_text; - t2._contents += t3; - } - _this._writeListAndBetween$2(t1, null); - t2 = _this.buffer; - if (t2 != null) { - t1 = A.SpanExtensions_after($arguments.span, J.get$span$z(B.JSArray_methods.get$last(t1))); - t1 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, null); - t2 = t2._interpolation_buffer0$_text; - t2._contents += t1; - } - }, - visitIfExpression$1(_, node) { - return this.buffer = null; - }, - visitListExpression$1(_, node) { - var t3, t4, _this = this, - t1 = node.contents, - t2 = t1.length; - if (t2 <= 1 && !node.hasBrackets) { - _this.buffer = null; - return; - } - t3 = node.hasBrackets; - if (t3 && t2 === 0) { - t1 = _this.buffer; - if (t1 != null) { - t2 = node.span.get$text(); - t1 = t1._interpolation_buffer0$_text; - t1._contents += t2; - } - return; - } - if (t3) { - t2 = _this.buffer; - if (t2 != null) { - t4 = A.SpanExtensions_before(node.span, J.get$span$z(B.JSArray_methods.get$first(t1))); - t4 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4.file._decodedChars, t4._file$_start, t4._end), 0, null); - t2 = t2._interpolation_buffer0$_text; - t2._contents += t4; - } - } - _this._writeListAndBetween$1(t1); - if (t3) { - t2 = _this.buffer; - if (t2 != null) { - t1 = A.SpanExtensions_after(node.span, J.get$span$z(B.JSArray_methods.get$last(t1))); - t1 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, null); - t2 = t2._interpolation_buffer0$_text; - t2._contents += t1; - } - } - }, - visitMapExpression$1(_, node) { - return this.buffer = null; - }, - visitNullExpression$1(_, node) { - return this.buffer = null; - }, - visitNumberExpression$1(_, node) { - var t2, - t1 = this.buffer; - if (t1 != null) { - t2 = node.span.get$text(); - t1 = t1._interpolation_buffer0$_text; - t1._contents += t2; - } - return null; - }, - visitParenthesizedExpression$1(_, node) { - return this.buffer = null; - }, - visitSelectorExpression$1(_, node) { - return this.buffer = null; - }, - visitStringExpression$1(_, node) { - var t2, t3, t4, t5, i, span, _0_0, t6, expression, t7, t8, t9, _this = this, - t1 = node.text; - if (t1.get$asPlain() != null) { - t2 = _this.buffer; - if (t2 != null) { - t1 = t1.span.get$text(); - t2 = t2._interpolation_buffer0$_text; - t2._contents += t1; - } - return; - } - for (t2 = t1.contents, t3 = t2.length, t4 = t3 - 1, t5 = t1.span, i = 0; i < t3; ++i) { - span = t1.spanForElement$1(i); - _0_0 = t2[i]; - t6 = _0_0 instanceof A.Expression0; - expression = t6 ? _0_0 : null; - if (t6) { - if (i === 0) { - t6 = _this.buffer; - if (t6 != null) { - t7 = A.SpanExtensions_before(t5, span); - t8 = t7._file$_start; - t9 = t7.file._decodedChars; - t9 = A.String_String$fromCharCodes(new Uint32Array(t9.subarray(t8, A._checkValidRange(t8, t7._end, t9.length))), 0, null); - t6 = t6._interpolation_buffer0$_text; - t6._contents += t9; - } - } - t6 = _this.buffer; - if (t6 != null) { - t6._interpolation_buffer0$_flushText$0(); - t6._interpolation_buffer0$_contents.push(expression); - t6._interpolation_buffer0$_spans.push(span); - } - if (i === t4) { - t6 = _this.buffer; - if (t6 != null) { - t7 = A.SpanExtensions_after(t5, span); - t8 = t7._file$_start; - t9 = t7.file._decodedChars; - t9 = A.String_String$fromCharCodes(new Uint32Array(t9.subarray(t8, A._checkValidRange(t8, t7._end, t9.length))), 0, null); - t6 = t6._interpolation_buffer0$_text; - t6._contents += t9; - } - } - continue; - } - t6 = _this.buffer; - if (t6 != null) { - t6 = t6._interpolation_buffer0$_text; - t7 = span.toString$0(0); - t6._contents += t7; - } - } - }, - visitSupportsExpression$1(_, node) { - return this.buffer = null; - }, - visitUnaryOperationExpression$1(_, node) { - return this.buffer = null; - }, - visitValueExpression$1(_, node) { - return this.buffer = null; - }, - visitVariableExpression$1(_, node) { - return this.buffer = null; - }, - _writeListAndBetween$2(expressions, visitor) { - var t1, lastExpression, _i, expression, t2, t3, t4, t5; - for (t1 = expressions.length, lastExpression = null, _i = 0; _i < t1; ++_i, lastExpression = expression) { - expression = expressions[_i]; - if (lastExpression != null) { - t2 = this.buffer; - if (t2 != null) { - t3 = A.SpanExtensions_between(lastExpression.get$span(lastExpression), J.get$span$z(expression)); - t4 = t3._file$_start; - t5 = t3.file._decodedChars; - t5 = A.String_String$fromCharCodes(new Uint32Array(t5.subarray(t4, A._checkValidRange(t4, t3._end, t5.length))), 0, null); - t2 = t2._interpolation_buffer0$_text; - t2._contents += t5; - } - } - expression.accept$1(this); - if (this.buffer == null) - return; - } - }, - _writeListAndBetween$1(expressions) { - return this._writeListAndBetween$2(expressions, null); - }, - $isExpressionVisitor: 1 - }; - A.SourceMapBuffer0.prototype = { - get$_source_map_buffer0$_targetLocation() { - var t1 = this._source_map_buffer0$_buffer._contents, - t2 = this._source_map_buffer0$_line; - return A.SourceLocation$(t1.length, this._source_map_buffer0$_column, t2, null); - }, - get$length(_) { - return this._source_map_buffer0$_buffer._contents.length; - }, - forSpan$1$2(span, callback) { - var t1, _this = this, - wasInSpan = _this._source_map_buffer0$_inSpan; - _this._source_map_buffer0$_inSpan = true; - _this._source_map_buffer0$_addEntry$2(span.get$start(span), _this.get$_source_map_buffer0$_targetLocation()); - try { - t1 = callback.call$0(); - return t1; - } finally { - _this._source_map_buffer0$_inSpan = wasInSpan; - } - }, - forSpan$2(span, callback) { - return this.forSpan$1$2(span, callback, type$.dynamic); - }, - _source_map_buffer0$_addEntry$2(source, target) { - var entry, t2, - t1 = this._source_map_buffer0$_entries; - if (t1.length !== 0) { - entry = B.JSArray_methods.get$last(t1); - t2 = entry.source; - if (t2.file.getLine$1(t2.offset) === source.file.getLine$1(source.offset) && entry.target.line === target.line) - return; - if (entry.target.offset === target.offset) - return; - } - t1.push(new A.Entry(source, target, null)); - }, - write$1(_, object) { - var t1, i, - string = J.toString$0$(object); - this._source_map_buffer0$_buffer._contents += string; - for (t1 = string.length, i = 0; i < t1; ++i) - if (string.charCodeAt(i) === 10) - this._source_map_buffer0$_writeLine$0(); - else - ++this._source_map_buffer0$_column; - }, - writeCharCode$1(charCode) { - var t1 = this._source_map_buffer0$_buffer, - t2 = A.Primitives_stringFromCharCode(charCode); - t1._contents += t2; - if (charCode === 10) - this._source_map_buffer0$_writeLine$0(); - else - ++this._source_map_buffer0$_column; - }, - _source_map_buffer0$_writeLine$0() { - var _this = this, - t1 = _this._source_map_buffer0$_entries; - if (B.JSArray_methods.get$last(t1).target.line === _this._source_map_buffer0$_line && B.JSArray_methods.get$last(t1).target.column === _this._source_map_buffer0$_column) - t1.pop(); - ++_this._source_map_buffer0$_line; - _this._source_map_buffer0$_column = 0; - if (_this._source_map_buffer0$_inSpan) - t1.push(new A.Entry(B.JSArray_methods.get$last(t1).source, _this.get$_source_map_buffer0$_targetLocation(), null)); - }, - toString$0(_) { - var t1 = this._source_map_buffer0$_buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - buildSourceMap$1$prefix(prefix) { - var i, t2, prefixColumn, _box_0 = {}, - t1 = prefix.length; - if (t1 === 0) - return A.SingleMapping_SingleMapping$fromEntries(this._source_map_buffer0$_entries); - _box_0.prefixColumn = _box_0.prefixLines = 0; - for (i = 0, t2 = 0; i < t1; ++i) - if (prefix.charCodeAt(i) === 10) { - ++_box_0.prefixLines; - _box_0.prefixColumn = 0; - t2 = 0; - } else { - prefixColumn = t2 + 1; - _box_0.prefixColumn = prefixColumn; - t2 = prefixColumn; - } - t2 = this._source_map_buffer0$_entries; - return A.SingleMapping_SingleMapping$fromEntries(new A.MappedListIterable(t2, new A.SourceMapBuffer_buildSourceMap_closure0(_box_0, t1), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Entry>"))); - } - }; - A.SourceMapBuffer_buildSourceMap_closure0.prototype = { - call$1(entry) { - var t1 = entry.target, - t2 = t1.line, - t3 = this._box_0, - t4 = t3.prefixLines; - t3 = t2 === 0 ? t3.prefixColumn : 0; - return new A.Entry(entry.source, A.SourceLocation$(t1.offset + this.prefixLength, t1.column + t3, t2 + t4, null), entry.identifierName); - }, - $signature: 162 - }; - A.updateSourceSpanPrototype_closure.prototype = { - call$0() { - return this.span; - }, - $signature: 27 - }; - A.updateSourceSpanPrototype_closure0.prototype = { - call$1(span) { - return span.get$start(span); - }, - $signature: 262 - }; - A.updateSourceSpanPrototype_closure1.prototype = { - call$1(span) { - return span.get$end(span); - }, - $signature: 262 - }; - A.updateSourceSpanPrototype_closure2.prototype = { - call$1(span) { - return A.NullableExtension_andThen0(span.get$sourceUrl(span), new A.updateSourceSpanPrototype__closure()); - }, - $signature: 578 - }; - A.updateSourceSpanPrototype__closure.prototype = { - call$1(url) { - var t1, _null = null; - if (url.get$scheme() === "") { - t1 = $.$get$context(); - t1 = t1.toUri$1(A.absolute(t1.style.pathFromUri$1(A._parseUri(url)), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null)); - } else - t1 = url; - return new self.URL(t1.toString$0(0)); - }, - $signature: 263 - }; - A.updateSourceSpanPrototype_closure3.prototype = { - call$1(span) { - return span.get$text(); - }, - $signature: 264 - }; - A.updateSourceSpanPrototype_closure4.prototype = { - call$1(span) { - return span.get$context(span); - }, - $signature: 264 - }; - A.updateSourceSpanPrototype_closure5.prototype = { - call$1($location) { - return $location.get$line(); - }, - $signature: 265 - }; - A.updateSourceSpanPrototype_closure6.prototype = { - call$1($location) { - return $location.get$column(); - }, - $signature: 265 - }; - A.ColorSpace0.prototype = { - get$isLegacyInternal() { - return false; - }, - get$isPolarInternal() { - return false; - }, - convert$5(dest, channel0, channel1, channel2, alpha) { - return this.convertLinear$5(dest, channel0, channel1, channel2, alpha); - }, - convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { - var t1, t2, transformedBlue, transformedGreen, transformedRed, linearRed, linearGreen, linearBlue, matrix, _this = this; - $label0$0: { - t1 = B.HslColorSpace_gsm0 !== dest; - if (!t1 || B.HwbColorSpace_06z0 === dest) { - t2 = B.SrgbColorSpace_AD40; - break $label0$0; - } - if (B.LabColorSpace_IF20 === dest || B.LchColorSpace_wv80 === dest) { - t2 = B.XyzD50ColorSpace_2No0; - break $label0$0; - } - if (B.OklabColorSpace_yrt0 === dest || B.OklchColorSpace_li80 === dest) { - t2 = B.LmsColorSpace_8I80; - break $label0$0; - } - t2 = dest; - break $label0$0; - } - if (t2 === _this) { - transformedBlue = blue; - transformedGreen = green; - transformedRed = red; - } else { - linearRed = _this.toLinear$1(red == null ? 0 : red); - linearGreen = _this.toLinear$1(green == null ? 0 : green); - linearBlue = _this.toLinear$1(blue == null ? 0 : blue); - matrix = _this.transformationMatrix$1(t2); - transformedRed = t2.fromLinear$1(matrix[0] * linearRed + matrix[1] * linearGreen + matrix[2] * linearBlue); - transformedGreen = t2.fromLinear$1(matrix[3] * linearRed + matrix[4] * linearGreen + matrix[5] * linearBlue); - transformedBlue = t2.fromLinear$1(matrix[6] * linearRed + matrix[7] * linearGreen + matrix[8] * linearBlue); - } - $label1$1: { - if (!t1 || B.HwbColorSpace_06z0 === dest) { - t1 = B.SrgbColorSpace_AD40.convert$8$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingChroma, missingHue, missingLightness); - break $label1$1; - } - if (B.LabColorSpace_IF20 === dest || B.LchColorSpace_wv80 === dest) { - t1 = B.XyzD50ColorSpace_2No0.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); - break $label1$1; - } - if (B.OklabColorSpace_yrt0 === dest || B.OklchColorSpace_li80 === dest) { - t1 = B.LmsColorSpace_8I80.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); - break $label1$1; - } - t1 = red == null ? null : transformedRed; - t2 = green == null ? null : transformedGreen; - t1 = A.SassColor_SassColor$forSpaceInternal0(dest, t1, t2, blue == null ? null : transformedBlue, alpha); - break $label1$1; - } - return t1; - }, - convertLinear$5(dest, red, green, blue, alpha) { - return this.convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, false, false, false, false); - }, - toLinear$1(channel) { - return A.throwExpression(A.UnimplementedError$("[BUG] Color space " + this.toString$0(0) + " doesn't support linear conversions.")); - }, - fromLinear$1(channel) { - return A.throwExpression(A.UnimplementedError$("[BUG] Color space " + this.toString$0(0) + " doesn't support linear conversions.")); - }, - transformationMatrix$1(dest) { - return A.throwExpression(A.UnimplementedError$("[BUG] Color space conversion from " + this.toString$0(0) + " to " + dest.toString$0(0) + " not implemented.")); - }, - toString$0(_) { - return this.name; - } - }; - A.SrgbColorSpace0.prototype = { - get$isBoundedInternal() { - return true; - }, - convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, missingChroma, missingHue, missingLightness) { - var max, min, delta, hue, lightness, saturation, t1, t2, whiteness, blackness, _null = null; - if (B.HslColorSpace_gsm0 === dest || B.HwbColorSpace_06z0 === dest) { - if (red == null) - red = 0; - if (green == null) - green = 0; - if (blue == null) - blue = 0; - max = Math.max(Math.max(red, green), blue); - min = Math.min(Math.min(red, green), blue); - delta = max - min; - if (max === min) - hue = 0; - else if (max === red) - hue = 60 * (green - blue) / delta + 360; - else - hue = max === green ? 60 * (blue - red) / delta + 120 : 60 * (red - green) / delta + 240; - if (dest === B.HslColorSpace_gsm0) { - lightness = (min + max) / 2; - saturation = lightness === 0 || lightness === 1 ? 0 : 100 * (max - lightness) / Math.min(lightness, 1 - lightness); - if (saturation < 0) { - hue += 180; - saturation = Math.abs(saturation); - } - t1 = missingHue || A.fuzzyEquals0(saturation, 0) ? _null : B.JSNumber_methods.$mod(hue, 360); - t2 = missingChroma ? _null : saturation; - return A.SassColor_SassColor$forSpaceInternal0(dest, t1, t2, missingLightness ? _null : lightness * 100, alpha); - } else { - whiteness = min * 100; - blackness = 100 - max * 100; - if (!missingHue) { - t1 = whiteness + blackness; - t1 = t1 > 100 || A.fuzzyEquals0(t1, 100); - } else - t1 = true; - return A.SassColor_SassColor$forSpaceInternal0(dest, t1 ? _null : B.JSNumber_methods.$mod(hue, 360), whiteness, blackness, alpha); - } - } - if (B.RgbColorSpace_mlz0 === dest) { - t1 = red == null ? _null : red * 255; - t2 = green == null ? _null : green * 255; - return A.SassColor_SassColor$rgbInternal0(t1, t2, blue == null ? _null : blue * 255, alpha, _null); - } - if (B.SrgbLinearColorSpace_sEs0 === dest) { - t1 = this.get$toLinear(); - return A.SassColor_SassColor$forSpaceInternal0(dest, A.NullableExtension_andThen0(red, t1), A.NullableExtension_andThen0(green, t1), A.NullableExtension_andThen0(blue, t1), alpha); - } - return this.super$ColorSpace$convertLinear0(dest, red, green, blue, alpha, false, false, missingChroma, missingHue, missingLightness); - }, - convert$5(dest, red, green, blue, alpha) { - return this.convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, false, false); - }, - convert$6$missingHue(dest, red, green, blue, alpha, missingHue) { - return this.convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, missingHue, false); - }, - toLinear$1(channel) { - return A.srgbAndDisplayP3ToLinear0(channel); - }, - fromLinear$1(channel) { - return A.srgbAndDisplayP3FromLinear0(channel); - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.DisplayP3ColorSpace_NQk0 === dest) { - t1 = $.$get$linearSrgbToLinearDisplayP30(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu0 === dest) { - t1 = $.$get$linearSrgbToLinearA98Rgb0(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG0 === dest) { - t1 = $.$get$linearSrgbToLinearProphotoRgb0(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN0 === dest) { - t1 = $.$get$linearSrgbToLinearRec20200(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA0 === dest) { - t1 = $.$get$linearSrgbToXyzD650(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No0 === dest) { - t1 = $.$get$linearSrgbToXyzD500(); - break $label0$0; - } - if (B.LmsColorSpace_8I80 === dest) { - t1 = $.$get$linearSrgbToLms0(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix0(dest); - break $label0$0; - } - return t1; - } - }; - A.SrgbLinearColorSpace0.prototype = { - get$isBoundedInternal() { - return true; - }, - convert$5(dest, red, green, blue, alpha) { - var t1; - $label0$0: { - if (B.RgbColorSpace_mlz0 === dest || B.HslColorSpace_gsm0 === dest || B.HwbColorSpace_06z0 === dest || B.SrgbColorSpace_AD40 === dest) { - t1 = B.SrgbColorSpace_AD40.convert$5(dest, A.NullableExtension_andThen0(red, A.utils2__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen0(green, A.utils2__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen0(blue, A.utils2__srgbAndDisplayP3FromLinear$closure()), alpha); - break $label0$0; - } - t1 = this.super$ColorSpace$convert0(dest, red, green, blue, alpha); - break $label0$0; - } - return t1; - }, - toLinear$1(channel) { - return channel; - }, - fromLinear$1(channel) { - return channel; - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.DisplayP3ColorSpace_NQk0 === dest) { - t1 = $.$get$linearSrgbToLinearDisplayP30(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu0 === dest) { - t1 = $.$get$linearSrgbToLinearA98Rgb0(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG0 === dest) { - t1 = $.$get$linearSrgbToLinearProphotoRgb0(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN0 === dest) { - t1 = $.$get$linearSrgbToLinearRec20200(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA0 === dest) { - t1 = $.$get$linearSrgbToXyzD650(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No0 === dest) { - t1 = $.$get$linearSrgbToXyzD500(); - break $label0$0; - } - if (B.LmsColorSpace_8I80 === dest) { - t1 = $.$get$linearSrgbToLms0(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix0(dest); - break $label0$0; - } - return t1; - } - }; - A.Statement0.prototype = {$isAstNode0: 1, $isSassNode: 1}; - A.JSStatementVisitor.prototype = { - visitAtRootRule$1(_, node) { - return J.visitAtRootRule$1$x(this._statement$_inner, node); - }, - visitAtRule$1(_, node) { - return J.visitAtRule$1$x(this._statement$_inner, node); - }, - visitContentBlock$1(_, node) { - return J.visitContentBlock$1$x(this._statement$_inner, node); - }, - visitContentRule$1(_, node) { - return J.visitContentRule$1$x(this._statement$_inner, node); - }, - visitDebugRule$1(_, node) { - return J.visitDebugRule$1$x(this._statement$_inner, node); - }, - visitDeclaration$1(_, node) { - return J.visitDeclaration$1$x(this._statement$_inner, node); - }, - visitEachRule$1(_, node) { - return J.visitEachRule$1$x(this._statement$_inner, node); - }, - visitErrorRule$1(_, node) { - return J.visitErrorRule$1$x(this._statement$_inner, node); - }, - visitExtendRule$1(_, node) { - return J.visitExtendRule$1$x(this._statement$_inner, node); - }, - visitForRule$1(_, node) { - return J.visitForRule$1$x(this._statement$_inner, node); - }, - visitForwardRule$1(_, node) { - return J.visitForwardRule$1$x(this._statement$_inner, node); - }, - visitFunctionRule$1(_, node) { - return J.visitFunctionRule$1$x(this._statement$_inner, node); - }, - visitIfRule$1(_, node) { - return J.visitIfRule$1$x(this._statement$_inner, node); - }, - visitImportRule$1(_, node) { - return J.visitImportRule$1$x(this._statement$_inner, node); - }, - visitIncludeRule$1(_, node) { - return J.visitIncludeRule$1$x(this._statement$_inner, node); - }, - visitLoudComment$1(_, node) { - return J.visitLoudComment$1$x(this._statement$_inner, node); - }, - visitMediaRule$1(_, node) { - return J.visitMediaRule$1$x(this._statement$_inner, node); - }, - visitMixinRule$1(_, node) { - return J.visitMixinRule$1$x(this._statement$_inner, node); - }, - visitReturnRule$1(_, node) { - return J.visitReturnRule$1$x(this._statement$_inner, node); - }, - visitSilentComment$1(_, node) { - return J.visitSilentComment$1$x(this._statement$_inner, node); - }, - visitStyleRule$1(_, node) { - return J.visitStyleRule$1$x(this._statement$_inner, node); - }, - visitStylesheet$1(_, node) { - return J.visitStylesheet$1$x(this._statement$_inner, node); - }, - visitSupportsRule$1(_, node) { - return J.visitSupportsRule$1$x(this._statement$_inner, node); - }, - visitUseRule$1(_, node) { - return J.visitUseRule$1$x(this._statement$_inner, node); - }, - visitVariableDeclaration$1(_, node) { - return J.visitVariableDeclaration$1$x(this._statement$_inner, node); - }, - visitWarnRule$1(_, node) { - return J.visitWarnRule$1$x(this._statement$_inner, node); - }, - visitWhileRule$1(_, node) { - return J.visitWhileRule$1$x(this._statement$_inner, node); - }, - $isStatementVisitor: 1 - }; - A.JSStatementVisitorObject.prototype = {}; - A.StatementSearchVisitor0.prototype = { - visitAtRootRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitAtRule$1(_, node) { - return A.NullableExtension_andThen0(node.children, this.get$visitChildren()); - }, - visitContentBlock$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitContentRule$1(_, node) { - return null; - }, - visitDebugRule$1(_, node) { - return null; - }, - visitDeclaration$1(_, node) { - return A.NullableExtension_andThen0(node.children, this.get$visitChildren()); - }, - visitEachRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitErrorRule$1(_, node) { - return null; - }, - visitExtendRule$1(_, node) { - return null; - }, - visitForRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitForwardRule$1(_, node) { - return null; - }, - visitFunctionRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitIfRule$1(_, node) { - var t1 = A.IterableExtension_search0(node.clauses, new A.StatementSearchVisitor_visitIfRule_closure1(this)); - return t1 == null ? A.NullableExtension_andThen0(node.lastClause, new A.StatementSearchVisitor_visitIfRule_closure2(this)) : t1; - }, - visitImportRule$1(_, node) { - return null; - }, - visitIncludeRule$1(_, node) { - return A.NullableExtension_andThen0(node.content, this.get$visitContentBlock(this)); - }, - visitLoudComment$1(_, node) { - return null; - }, - visitMediaRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitMixinRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitReturnRule$1(_, node) { - return null; - }, - visitSilentComment$1(_, node) { - return null; - }, - visitStyleRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitStylesheet$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitSupportsRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitUseRule$1(_, node) { - return null; - }, - visitVariableDeclaration$1(_, node) { - return null; - }, - visitWarnRule$1(_, node) { - return null; - }, - visitWhileRule$1(_, node) { - return this.visitChildren$1(node.children); - }, - visitChildren$1(children) { - return A.IterableExtension_search0(children, new A.StatementSearchVisitor_visitChildren_closure0(this)); - } - }; - A.StatementSearchVisitor_visitIfRule_closure1.prototype = { - call$1(clause) { - return A.IterableExtension_search0(clause.children, new A.StatementSearchVisitor_visitIfRule__closure2(this.$this)); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(IfClause0)"); - } - }; - A.StatementSearchVisitor_visitIfRule__closure2.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(Statement0)"); - } - }; - A.StatementSearchVisitor_visitIfRule_closure2.prototype = { - call$1(lastClause) { - return A.IterableExtension_search0(lastClause.children, new A.StatementSearchVisitor_visitIfRule__closure1(this.$this)); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(ElseClause0)"); - } - }; - A.StatementSearchVisitor_visitIfRule__closure1.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(Statement0)"); - } - }; - A.StatementSearchVisitor_visitChildren_closure0.prototype = { - call$1(child) { - return child.accept$1(this.$this); - }, - $signature() { - return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(Statement0)"); - } - }; - A.StaticImport0.prototype = { - toString$0(_) { - var t1 = this.url.toString$0(0), - t2 = this.modifiers; - return t1 + (t2 == null ? "" : " " + t2.toString$0(0)); - }, - $isImport0: 1, - $isAstNode0: 1, - $isSassNode: 1, - get$span(receiver) { - return this.span; - } - }; - A.StderrLogger0.prototype = { - warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { - var t2, - result = new A.StringBuffer(""), - t1 = this.color; - if (t1) { - t2 = result._contents = "" + "\x1b[33m\x1b[1m"; - t2 = result._contents = (deprecation ? result._contents = t2 + "Deprecation " : t2) + "Warning\x1b[0m"; - } else - t2 = result._contents = (deprecation ? result._contents = "" + "DEPRECATION " : "") + "WARNING"; - if (span == null) - t1 = result._contents = t2 + (": " + message + "\n"); - else if (trace != null) { - t1 = t2 + (": " + message + "\n\n" + span.highlight$1$color(t1) + "\n"); - result._contents = t1; - } else { - t1 = t2 + (" on " + span.message$2$color(0, "\n" + message, t1) + "\n"); - result._contents = t1; - } - if (trace != null) - result._contents = t1 + (A.indent0(B.JSString_methods.trimRight$0(trace.toString$0(0)), 4) + "\n"); - A.printError0(result); - }, - warn$1(_, message) { - return this.warn$4$deprecation$span$trace(0, message, false, null, null); - }, - warn$3$span$trace(_, message, span, trace) { - return this.warn$4$deprecation$span$trace(0, message, false, span, trace); - }, - warn$2$trace(_, message, trace) { - return this.warn$4$deprecation$span$trace(0, message, false, null, trace); - }, - debug$2(_, message, span) { - var url, t3, t4, - t1 = span.file, - t2 = span._file$_start; - if (A.FileLocation$_(t1, t2).file.url == null) - url = "-"; - else { - t3 = A.FileLocation$_(t1, t2).file.url; - t4 = $.$get$context(); - t3.toString; - url = t4.prettyUri$1(t3); - } - t1 = A.FileLocation$_(t1, t2); - t1 = t1.file.getLine$1(t1.offset); - t2 = this.color ? "\x1b[1mDebug\x1b[0m" : "DEBUG"; - t2 = "" + (url + ":" + (t1 + 1) + " ") + t2 + (": " + message); - A.printError0(t2.charCodeAt(0) == 0 ? t2 : t2); - } - }; - A.StringExpression0.prototype = { - get$span(_) { - return this.text.span; - }, - accept$1$1(visitor) { - return visitor.visitStringExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - asInterpolation$1$static($static) { - var t1, t2, quote, t3, t4, t5, buffer, t6, i, value, t7; - if (!this.hasQuotes) - return this.text; - t1 = this.text; - t2 = t1.contents; - quote = A.StringExpression__bestQuote0(new A.WhereTypeIterable(t2, type$.WhereTypeIterable_String)); - t3 = new A.StringBuffer(""); - t4 = A._setArrayType([], type$.JSArray_Object); - t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); - buffer = new A.InterpolationBuffer0(t3, t4, t5); - t6 = A.Primitives_stringFromCharCode(quote); - t3._contents += t6; - for (t6 = t2.length, i = 0; i < t6; ++i) { - value = t2[i]; - if (value instanceof A.Expression0) { - t7 = t1.spanForElement$1(i); - buffer._interpolation_buffer0$_flushText$0(); - t4.push(value); - t5.push(t7); - continue; - } - if (typeof value == "string") - A.StringExpression__quoteInnerText0(value, quote, buffer, $static); - } - t2 = A.Primitives_stringFromCharCode(quote); - t3._contents += t2; - return buffer.interpolation$1(t1.span); - }, - asInterpolation$0() { - return this.asInterpolation$1$static(false); - }, - toString$0(_) { - return this.asInterpolation$0().toString$0(0); - } - }; - A.module_closure25.prototype = { - call$1($arguments) { - var limit, t2, chunks, i, lastEnd, match, t3, - t1 = J.getInterceptor$asx($arguments), - string = t1.$index($arguments, 0).assertString$1("string"), - separator = t1.$index($arguments, 1).assertString$1("separator"); - t1 = t1.$index($arguments, 2).get$realNull(); - limit = t1 == null ? null : t1.assertNumber$1("limit").assertInt$1("limit"); - if (limit != null && limit < 1) - throw A.wrapException(A.SassScriptException$0("$limit: Must be 1 or greater, was " + A.S(limit) + ".", null)); - t1 = string._string0$_text; - if (t1.length === 0) - return B.SassList_bdS2; - else { - t2 = separator._string0$_text; - if (t2.length === 0) - return A.SassList$0(A.MappedIterable_MappedIterable(new A.Runes(t1), new A.module__closure3(string), type$.Runes._eval$1("Iterable.E"), type$.Value_2), B.ListSeparator_ECn0, true); - } - chunks = A._setArrayType([], type$.JSArray_String); - for (t2 = B.JSString_methods.allMatches$1(t2, t1), t2 = new A._StringAllMatchesIterator(t2._input, t2._pattern, t2.__js_helper$_index), i = 0, lastEnd = 0; t2.moveNext$0();) { - match = t2.__js_helper$_current; - t3 = match.start; - chunks.push(B.JSString_methods.substring$2(t1, lastEnd, t3)); - lastEnd = t3 + match.pattern.length; - ++i; - if (i === limit) - break; - } - chunks.push(B.JSString_methods.substring$1(t1, lastEnd)); - return A.SassList$0(new A.MappedListIterable(chunks, new A.module__closure4(string), type$.MappedListIterable_String_Value_2), B.ListSeparator_ECn0, true); - }, - $signature: 26 - }; - A.module__closure3.prototype = { - call$1(rune) { - return new A.SassString0(A.Primitives_stringFromCharCode(rune), this.string._string0$_hasQuotes); - }, - $signature: 582 - }; - A.module__closure4.prototype = { - call$1(chunk) { - return new A.SassString0(chunk, this.string._string0$_hasQuotes); - }, - $signature: 583 - }; - A._unquote_closure0.prototype = { - call$1($arguments) { - var string = J.$index$asx($arguments, 0).assertString$1("string"); - if (!string._string0$_hasQuotes) - return string; - return new A.SassString0(string._string0$_text, false); - }, - $signature: 17 - }; - A._quote_closure0.prototype = { - call$1($arguments) { - var string = J.$index$asx($arguments, 0).assertString$1("string"); - if (string._string0$_hasQuotes) - return string; - return new A.SassString0(string._string0$_text, true); - }, - $signature: 17 - }; - A._length_closure1.prototype = { - call$1($arguments) { - return A.SassNumber_SassNumber0(J.$index$asx($arguments, 0).assertString$1("string").get$_string0$_sassLength(), null); - }, - $signature: 25 - }; - A._insert_closure0.prototype = { - call$1($arguments) { - var indexInt, codeUnitIndex, _s5_ = "index", - t1 = J.getInterceptor$asx($arguments), - string = t1.$index($arguments, 0).assertString$1("string"), - insert = t1.$index($arguments, 1).assertString$1("insert"), - index = t1.$index($arguments, 2).assertNumber$1(_s5_); - index.assertNoUnits$1(_s5_); - indexInt = index.assertInt$1(_s5_); - if (indexInt < 0) - indexInt = Math.max(string.get$_string0$_sassLength() + indexInt + 2, 0); - t1 = string._string0$_text; - codeUnitIndex = A.codepointIndexToCodeUnitIndex0(t1, A._codepointForIndex0(indexInt, string.get$_string0$_sassLength(), false)); - return new A.SassString0(B.JSString_methods.replaceRange$3(t1, codeUnitIndex, codeUnitIndex, insert._string0$_text), string._string0$_hasQuotes); - }, - $signature: 17 - }; - A._index_closure1.prototype = { - call$1($arguments) { - var t1 = J.getInterceptor$asx($arguments), - t2 = t1.$index($arguments, 0).assertString$1("string")._string0$_text, - codeUnitIndex = B.JSString_methods.indexOf$1(t2, t1.$index($arguments, 1).assertString$1("substring")._string0$_text); - if (codeUnitIndex === -1) - return B.C__SassNull0; - return A.SassNumber_SassNumber0(A.codeUnitIndexToCodepointIndex0(t2, codeUnitIndex) + 1, null); - }, - $signature: 3 - }; - A._slice_closure0.prototype = { - call$1($arguments) { - var lengthInCodepoints, endInt, startCodepoint, endCodepoint, - _s8_ = "start-at", - t1 = J.getInterceptor$asx($arguments), - string = t1.$index($arguments, 0).assertString$1("string"), - start = t1.$index($arguments, 1).assertNumber$1(_s8_), - end = t1.$index($arguments, 2).assertNumber$1("end-at"); - start.assertNoUnits$1(_s8_); - end.assertNoUnits$1("end-at"); - lengthInCodepoints = string.get$_string0$_sassLength(); - endInt = end.assertInt$0(); - if (endInt === 0) - return string._string0$_hasQuotes ? $.$get$_emptyQuoted0() : $.$get$_emptyUnquoted0(); - startCodepoint = A._codepointForIndex0(start.assertInt$0(), lengthInCodepoints, false); - endCodepoint = A._codepointForIndex0(endInt, lengthInCodepoints, true); - if (endCodepoint === lengthInCodepoints) - --endCodepoint; - if (endCodepoint < startCodepoint) - return string._string0$_hasQuotes ? $.$get$_emptyQuoted0() : $.$get$_emptyUnquoted0(); - t1 = string._string0$_text; - return new A.SassString0(B.JSString_methods.substring$2(t1, A.codepointIndexToCodeUnitIndex0(t1, startCodepoint), A.codepointIndexToCodeUnitIndex0(t1, endCodepoint + 1)), string._string0$_hasQuotes); - }, - $signature: 17 - }; - A._toUpperCase_closure0.prototype = { - call$1($arguments) { - var t1, t2, i, t3, t4, - string = J.$index$asx($arguments, 0).assertString$1("string"); - for (t1 = string._string0$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { - t4 = t1.charCodeAt(i); - t3 += A.Primitives_stringFromCharCode(t4 >= 97 && t4 <= 122 ? t4 & 4294967263 : t4); - } - return new A.SassString0(t3.charCodeAt(0) == 0 ? t3 : t3, string._string0$_hasQuotes); - }, - $signature: 17 - }; - A._toLowerCase_closure0.prototype = { - call$1($arguments) { - var t1, t2, i, t3, t4, - string = J.$index$asx($arguments, 0).assertString$1("string"); - for (t1 = string._string0$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { - t4 = t1.charCodeAt(i); - t3 += A.Primitives_stringFromCharCode(t4 >= 65 && t4 <= 90 ? t4 | 32 : t4); - } - return new A.SassString0(t3.charCodeAt(0) == 0 ? t3 : t3, string._string0$_hasQuotes); - }, - $signature: 17 - }; - A._uniqueId_closure0.prototype = { - call$1($arguments) { - var t1 = $.$get$_previousUniqueId0() + ($.$get$_random1().nextInt$1(36) + 1); - $._previousUniqueId0 = t1; - if (t1 > Math.pow(36, 6)) - $._previousUniqueId0 = B.JSInt_methods.$mod($.$get$_previousUniqueId0(), A._asInt(Math.pow(36, 6))); - return new A.SassString0("u" + B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1($.$get$_previousUniqueId0(), 36), 6, "0"), false); - }, - $signature: 17 - }; - A.StringExtension_toCssIdentifier_writeEscape.prototype = { - call$1(character) { - var _0_0, - t1 = this.buffer, - t2 = A.Primitives_stringFromCharCode(92); - t1._contents += t2; - t2 = B.JSInt_methods.toRadixString$1(character, 16); - t1._contents += t2; - _0_0 = this.scanner.peekChar$0(); - if (A._isInt(_0_0) && A.CharacterExtension_get_isHex0(_0_0)) { - t2 = A.Primitives_stringFromCharCode(32); - t1._contents += t2; - } - }, - $signature: 266 - }; - A.StringExtension_toCssIdentifier_consumeSurrogatePair.prototype = { - call$1(character) { - var t2, t3, - t1 = this.scanner, - _1_0 = t1.peekChar$1(1); - if (_1_0 == null || _1_0 >>> 10 !== 55) - t1.error$2$length(0, "An individual surrogates can't be represented as a CSS identifier.", 1); - else if (character >>> 7 === 439) - this.writeEscape.call$1(A.combineSurrogates(t1.readChar$0(), t1.readChar$0())); - else { - t2 = this.buffer; - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t3; - t1 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t1; - } - }, - $signature: 266 - }; - A.stringClass_closure.prototype = { - call$0() { - var t2, - t1 = type$.JSClass, - jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassString", new A.stringClass__closure())); - A.LinkedHashMap_LinkedHashMap$_literal(["text", new A.stringClass__closure0(), "hasQuotes", new A.stringClass__closure1(), "sassLength", new A.stringClass__closure2()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); - J.get$$prototype$x(jsClass).sassIndexToStringIndex = A.allowInteropCaptureThisNamed("sassIndexToStringIndex", new A.stringClass__closure3()); - t2 = $.$get$_emptyQuoted0(); - A.JSClassExtension_injectSuperclass(t1._as(t2.constructor), jsClass); - return jsClass; - }, - $signature: 16 - }; - A.stringClass__closure.prototype = { - call$3($self, textOrOptions, options) { - var t1; - if (typeof textOrOptions == "string") { - t1 = options == null ? null : J.get$quotes$x(options); - t1 = new A.SassString0(textOrOptions, t1 == null ? true : t1); - } else { - type$.nullable__ConstructorOptions_3._as(textOrOptions); - t1 = textOrOptions == null ? null : J.get$quotes$x(textOrOptions); - t1 = (t1 == null ? true : t1) ? $.$get$_emptyQuoted0() : $.$get$_emptyUnquoted0(); - } - return t1; - }, - call$1($self) { - return this.call$3($self, null, null); - }, - call$2($self, textOrOptions) { - return this.call$3($self, textOrOptions, null); - }, - "call*": "call$3", - $requiredArgCount: 1, - $defaultValues() { - return [null, null]; - }, - $signature: 585 - }; - A.stringClass__closure0.prototype = { - call$1($self) { - return $self._string0$_text; - }, - $signature: 586 - }; - A.stringClass__closure1.prototype = { - call$1($self) { - return $self._string0$_hasQuotes; - }, - $signature: 587 - }; - A.stringClass__closure2.prototype = { - call$1($self) { - return $self.get$_string0$_sassLength(); - }, - $signature: 588 - }; - A.stringClass__closure3.prototype = { - call$3($self, sassIndex, $name) { - var t1, - index = sassIndex.assertNumber$1($name).assertInt$1($name); - if (index === 0) - A.throwExpression(A.SassScriptException$0("String index may not be 0.", $name)); - else if (Math.abs(index) > $self.get$_string0$_sassLength()) - A.throwExpression(A.SassScriptException$0("Invalid index " + sassIndex.toString$0(0) + " for a string with " + $self.get$_string0$_sassLength() + " characters.", $name)); - t1 = index < 0 ? $self.get$_string0$_sassLength() + index : index - 1; - return A.codepointIndexToCodeUnitIndex0($self._string0$_text, t1); - }, - call$2($self, sassIndex) { - return this.call$3($self, sassIndex, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 589 - }; - A._ConstructorOptions1.prototype = {}; - A._NodeSassString.prototype = {}; - A.legacyStringClass_closure.prototype = { - call$3(thisArg, value, dartValue) { - var t1; - if (dartValue == null) { - value.toString; - t1 = new A.SassString0(value, false); - } else - t1 = dartValue; - J.set$dartValue$x(thisArg, t1); - }, - call$2(thisArg, value) { - return this.call$3(thisArg, value, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 590 - }; - A.legacyStringClass_closure0.prototype = { - call$1(thisArg) { - return J.get$dartValue$x(thisArg)._string0$_text; - }, - $signature: 591 - }; - A.legacyStringClass_closure1.prototype = { - call$2(thisArg, value) { - J.set$dartValue$x(thisArg, new A.SassString0(value, false)); - }, - $signature: 592 - }; - A.SassString0.prototype = { - get$_string0$_sassLength() { - var result, _this = this, - value = _this._string0$__SassString__sassLength_FI; - if (value === $) { - result = new A.Runes(_this._string0$_text).get$length(0); - _this._string0$__SassString__sassLength_FI !== $ && A.throwUnnamedLateFieldADI(); - _this._string0$__SassString__sassLength_FI = result; - value = result; - } - return value; - }, - get$isSpecialNumber() { - var t1, _2_0, t2, _0_0, _1_0; - if (this._string0$_hasQuotes) - return false; - t1 = this._string0$_text; - if (t1.length < 6) - return false; - _2_0 = t1.charCodeAt(0); - $label1$1: { - t2 = false; - if (99 === _2_0 || 67 === _2_0) { - _0_0 = t1.charCodeAt(1); - $label0$0: { - if (108 === _0_0 || 76 === _0_0) { - t1 = (t1.charCodeAt(2) | 32) === 97 && (t1.charCodeAt(3) | 32) === 109 && (t1.charCodeAt(4) | 32) === 112 && t1.charCodeAt(5) === 40; - break $label0$0; - } - if (97 === _0_0 || 65 === _0_0) { - t1 = (t1.charCodeAt(2) | 32) === 108 && (t1.charCodeAt(3) | 32) === 99 && t1.charCodeAt(4) === 40; - break $label0$0; - } - t1 = t2; - break $label0$0; - } - break $label1$1; - } - if (118 === _2_0 || 86 === _2_0) { - t1 = (t1.charCodeAt(1) | 32) === 97 && (t1.charCodeAt(2) | 32) === 114 && t1.charCodeAt(3) === 40; - break $label1$1; - } - if (101 === _2_0 || 69 === _2_0) { - t1 = (t1.charCodeAt(1) | 32) === 110 && (t1.charCodeAt(2) | 32) === 118 && t1.charCodeAt(3) === 40; - break $label1$1; - } - if (109 === _2_0 || 77 === _2_0) { - _1_0 = t1.charCodeAt(1); - $label2$2: { - if (97 === _1_0 || 65 === _1_0) { - t1 = (t1.charCodeAt(2) | 32) === 120 && t1.charCodeAt(3) === 40; - break $label2$2; - } - if (105 === _1_0 || 73 === _1_0) { - t1 = (t1.charCodeAt(2) | 32) === 110 && t1.charCodeAt(3) === 40; - break $label2$2; - } - t1 = t2; - break $label2$2; - } - break $label1$1; - } - t1 = t2; - break $label1$1; - } - return t1; - }, - get$isVar() { - if (this._string0$_hasQuotes) - return false; - var t1 = this._string0$_text; - if (t1.length < 8) - return false; - return (t1.charCodeAt(0) | 32) === 118 && (t1.charCodeAt(1) | 32) === 97 && (t1.charCodeAt(2) | 32) === 114 && t1.charCodeAt(3) === 40; - }, - get$isBlank() { - return !this._string0$_hasQuotes && this._string0$_text.length === 0; - }, - assertQuoted$1($name) { - if (this._string0$_hasQuotes) - return; - throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to be a quoted string.", $name)); - }, - assertUnquoted$1($name) { - if (!this._string0$_hasQuotes) - return; - throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to be an unquoted string.", $name)); - }, - assertUnquoted$0() { - return this.assertUnquoted$1(null); - }, - accept$1$1(visitor) { - var t1 = visitor._serialize0$_quote && this._string0$_hasQuotes, - t2 = this._string0$_text; - if (t1) - visitor._serialize0$_visitQuotedString$1(t2); - else - visitor._serialize0$_visitUnquotedString$1(t2); - return null; - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - assertString$1($name) { - return this; - }, - plus$1(other) { - var t1 = this._string0$_text, - t2 = this._string0$_hasQuotes; - return other instanceof A.SassString0 ? new A.SassString0(t1 + other._string0$_text, t2) : new A.SassString0(t1 + A.serializeValue0(other, false, true), t2); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.SassString0 && this._string0$_text === other._string0$_text; - }, - get$hashCode(_) { - var t1 = this._string0$_hashCache; - return t1 == null ? this._string0$_hashCache = B.JSString_methods.get$hashCode(this._string0$_text) : t1; - } - }; - A.ModifiableCssStyleRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitCssStyleRule$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - equalsIgnoringChildren$1(other) { - var t1; - if (other instanceof A.ModifiableCssStyleRule0) - t1 = B.C_ListEquality.equals$2(0, other._style_rule0$_selector._box0$_inner.value.components, this._style_rule0$_selector._box0$_inner.value.components); - else - t1 = false; - return t1; - }, - copyWithoutChildren$0() { - return A.ModifiableCssStyleRule$0(this._style_rule0$_selector, this.span, false, this.originalSelector); - }, - $isCssStyleRule0: 1, - get$span(receiver) { - return this.span; - } - }; - A.StyleRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitStyleRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.children; - return this.selector.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.CssStylesheet0.prototype = { - get$parent(_) { - return null; - }, - get$isGroupEnd() { - return false; - }, - get$isChildless() { - return false; - }, - accept$1$1(visitor) { - return visitor.visitCssStylesheet$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - get$children(receiver) { - return this.children; - }, - get$span(receiver) { - return this.span; - } - }; - A.ModifiableCssStylesheet0.prototype = { - accept$1$1(visitor) { - return visitor.visitCssStylesheet$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - equalsIgnoringChildren$1(other) { - return other instanceof A.ModifiableCssStylesheet0; - }, - copyWithoutChildren$0() { - return A.ModifiableCssStylesheet$0(this.span); - }, - $isCssStylesheet0: 1, - get$span(receiver) { - return this.span; - } - }; - A.StylesheetParser0.prototype = { - parse$0(_) { - return this.wrapSpanFormatException$1(new A.StylesheetParser_parse_closure0(this)); - }, - parseArgumentDeclaration$0() { - return this._stylesheet0$_parseSingleProduction$1$1(new A.StylesheetParser_parseArgumentDeclaration_closure0(this), type$.ArgumentDeclaration_2); - }, - _stylesheet0$_parseSingleProduction$1$1(production, $T) { - return this.wrapSpanFormatException$1(new A.StylesheetParser__parseSingleProduction_closure0(this, production, $T)); - }, - parseSignature$1$requireParens(requireParens) { - return this.wrapSpanFormatException$1(new A.StylesheetParser_parseSignature_closure(this, requireParens)); - }, - _stylesheet0$_statement$1$root(root) { - var t2, _this = this, - t1 = _this.scanner, - _0_0 = t1.peekChar$0(); - if (64 === _0_0) - return _this.atRule$2$root(new A.StylesheetParser__statement_closure0(_this), root); - if (43 === _0_0) { - if (!_this.get$indented() || !_this.lookingAtIdentifier$1(1)) - return _this._stylesheet0$_styleRule$0(); - _this._stylesheet0$_isUseAllowed = false; - t2 = t1._string_scanner$_position; - t1.readChar$0(); - return _this._stylesheet0$_includeRule$1(new A._SpanScannerState(t1, t2)); - } - if (61 === _0_0) { - if (!_this.get$indented()) - return _this._stylesheet0$_styleRule$0(); - _this._stylesheet0$_isUseAllowed = false; - t2 = t1._string_scanner$_position; - t1.readChar$0(); - _this.whitespace$0(); - return _this._stylesheet0$_mixinRule$1(new A._SpanScannerState(t1, t2)); - } - if (125 === _0_0) - t1.error$2$length(0, 'unmatched "}".', 1); - return _this._stylesheet0$_inStyleRule || _this._stylesheet0$_inUnknownAtRule || _this._stylesheet0$_inMixin || _this._stylesheet0$_inContentBlock ? _this._stylesheet0$_declarationOrStyleRule$0() : _this._stylesheet0$_variableDeclarationOrStyleRule$0(); - }, - _stylesheet0$_statement$0() { - return this._stylesheet0$_statement$1$root(false); - }, - variableDeclarationWithoutNamespace$2(namespace, start_) { - var t1, start, $name, t2, value, flagStart, t3, guarded, global, _0_0, endPosition, t4, t5, t6, declaration, _this = this, - precedingComment = _this.lastSilentComment; - _this.lastSilentComment = null; - if (start_ == null) { - t1 = _this.scanner; - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - } else - start = start_; - $name = _this.variableName$0(); - t1 = namespace != null; - if (t1) - _this._stylesheet0$_assertPublic$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure1(_this, start)); - if (_this.get$plainCss()) - _this.error$2(0, string$.Sassx20v, _this.scanner.spanFrom$1(start)); - _this.whitespace$0(); - t2 = _this.scanner; - t2.expectChar$1(58); - _this.whitespace$0(); - value = _this._stylesheet0$_expression$0(); - flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); - for (t3 = _this.warnings, guarded = false, global = false; t2.scanChar$1(33);) { - $label0$0: { - _0_0 = _this.identifier$0(); - if ("default" === _0_0) { - if (guarded) { - endPosition = t2._string_scanner$_position; - t4 = t2._sourceFile; - t5 = flagStart.position; - t6 = new A._FileSpan(t4, t5, endPosition); - t6._FileSpan$3(t4, t5, endPosition); - t3.push(new A._Record_3_deprecation_message_span(B.Deprecation_VqL, string$.x21defau, t6)); - } - guarded = true; - break $label0$0; - } - if ("global" === _0_0) { - if (t1) { - endPosition = t2._string_scanner$_position; - t4 = t2._sourceFile; - t5 = flagStart.position; - t6 = new A._FileSpan(t4, t5, endPosition); - t6._FileSpan$3(t4, t5, endPosition); - _this.error$2(0, string$.x21globai, t6); - } else if (global) { - endPosition = t2._string_scanner$_position; - t4 = t2._sourceFile; - t5 = flagStart.position; - t6 = new A._FileSpan(t4, t5, endPosition); - t6._FileSpan$3(t4, t5, endPosition); - t3.push(new A._Record_3_deprecation_message_span(B.Deprecation_VqL, string$.x21globas, t6)); - } - global = true; - break $label0$0; - } - endPosition = t2._string_scanner$_position; - t4 = t2._sourceFile; - t5 = flagStart.position; - t6 = new A._FileSpan(t4, t5, endPosition); - t6._FileSpan$3(t4, t5, endPosition); - _this.error$2(0, "Invalid flag name.", t6); - } - _this.whitespace$0(); - flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); - } - _this.expectStatementSeparator$1("variable declaration"); - declaration = A.VariableDeclaration$0($name, value, t2.spanFrom$1(start), precedingComment, global, guarded, namespace); - if (global) - _this._stylesheet0$_globalVariables.putIfAbsent$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure2(declaration)); - return declaration; - }, - variableDeclarationWithoutNamespace$0() { - return this.variableDeclarationWithoutNamespace$2(null, null); - }, - _stylesheet0$_variableDeclarationOrStyleRule$0() { - var t1, t2, variableOrInterpolation, t3, _this = this; - if (_this.get$plainCss()) - return _this._stylesheet0$_styleRule$0(); - if (_this.get$indented() && _this.scanner.scanChar$1(92)) - return _this._stylesheet0$_styleRule$0(); - if (!_this.lookingAtIdentifier$0()) - return _this._stylesheet0$_styleRule$0(); - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - variableOrInterpolation = _this._stylesheet0$_variableDeclarationOrInterpolation$0(); - if (variableOrInterpolation instanceof A.VariableDeclaration0) - t1 = variableOrInterpolation; - else { - t3 = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t3.addInterpolation$1(type$.Interpolation_2._as(variableOrInterpolation)); - t2 = _this._stylesheet0$_styleRule$2(t3, new A._SpanScannerState(t1, t2)); - t1 = t2; - } - return t1; - }, - _stylesheet0$_declarationOrStyleRule$0() { - var t1, t2, declarationOrBuffer, _this = this; - if (_this.get$indented() && _this.scanner.scanChar$1(92)) - return _this._stylesheet0$_styleRule$0(); - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - declarationOrBuffer = _this._stylesheet0$_declarationOrBuffer$0(); - return declarationOrBuffer instanceof A.Statement0 ? declarationOrBuffer : _this._stylesheet0$_styleRule$2(type$.InterpolationBuffer_2._as(declarationOrBuffer), new A._SpanScannerState(t1, t2)); - }, - _stylesheet0$_declarationOrBuffer$0() { - var midBuffer, couldBeSelector, beforeDeclaration, value, additional, t2, t3, variableOrInterpolation, t4, t5, $name, postColonWhitespace, _0_0, exception, _1_0, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - nameBuffer = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), - startsWithPunctuation = _this._stylesheet0$_lookingAtPotentialPropertyHack$0(); - if (startsWithPunctuation) { - t2 = t1.readChar$0(); - t3 = nameBuffer._interpolation_buffer0$_text; - t2 = A.Primitives_stringFromCharCode(t2); - t3._contents += t2; - t2 = _this.rawText$1(_this.get$whitespace()); - t3 = nameBuffer._interpolation_buffer0$_text; - t3._contents += t2; - } - if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) - return nameBuffer; - variableOrInterpolation = startsWithPunctuation ? _this.interpolatedIdentifier$0() : _this._stylesheet0$_variableDeclarationOrInterpolation$0(); - if (variableOrInterpolation instanceof A.VariableDeclaration0) - return variableOrInterpolation; - else - nameBuffer.addInterpolation$1(type$.Interpolation_2._as(variableOrInterpolation)); - _this._stylesheet0$_isUseAllowed = false; - if (t1.matches$1("/*")) { - t2 = _this.rawText$1(_this.get$loudComment()); - t3 = nameBuffer._interpolation_buffer0$_text; - t3._contents += t2; - } - midBuffer = new A.StringBuffer(""); - t2 = midBuffer; - t3 = _this.get$whitespace(); - t4 = _this.rawText$1(t3); - t2._contents += t4; - t4 = t1._string_scanner$_position; - if (!t1.scanChar$1(58)) { - if (midBuffer._contents.length !== 0) { - t1 = nameBuffer._interpolation_buffer0$_text; - t2 = A.Primitives_stringFromCharCode(32); - t1._contents += t2; - } - return nameBuffer; - } - t2 = midBuffer; - t5 = A.Primitives_stringFromCharCode(58); - t2._contents += t5; - $name = nameBuffer.interpolation$1(t1.spanFrom$2(start, new A._SpanScannerState(t1, t4))); - if (B.JSString_methods.startsWith$1($name.get$initialPlain(), "--")) { - t2 = _this._stylesheet0$_interpolatedDeclarationValue$1$silentComments(false); - _this.expectStatementSeparator$1("custom property"); - return A.Declaration$0($name, new A.StringExpression0(t2, false), t1.spanFrom$1(start)); - } - if (t1.scanChar$1(58)) { - t1 = nameBuffer; - t2 = t1._interpolation_buffer0$_text; - t3 = A.S(midBuffer); - t2._contents += t3; - t3 = A.Primitives_stringFromCharCode(58); - t2._contents += t3; - return t1; - } else if (_this.get$indented() && _this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { - t1 = nameBuffer; - t2 = t1._interpolation_buffer0$_text; - t3 = A.S(midBuffer); - t2._contents += t3; - return t1; - } - postColonWhitespace = _this.rawText$1(t3); - _0_0 = _this._stylesheet0$_tryDeclarationChildren$2($name, start); - if (_0_0 != null) - return _0_0; - midBuffer._contents += postColonWhitespace; - couldBeSelector = postColonWhitespace.length === 0 && _this._stylesheet0$_lookingAtInterpolatedIdentifier$0(); - beforeDeclaration = new A._SpanScannerState(t1, t1._string_scanner$_position); - value = null; - try { - value = _this._stylesheet0$_expression$0(); - if (_this.lookingAtChildren$0()) { - if (couldBeSelector) - _this.expectStatementSeparator$0(); - } else if (!_this.atEndOfStatement$0()) - _this.expectStatementSeparator$0(); - } catch (exception) { - if (type$.FormatException._is(A.unwrapException(exception))) { - if (!couldBeSelector) - throw exception; - t1.set$state(beforeDeclaration); - additional = _this.almostAnyValue$0(); - if (!_this.get$indented() && t1.peekChar$0() === 59) - throw exception; - t1 = nameBuffer._interpolation_buffer0$_text; - t2 = A.S(midBuffer); - t1._contents += t2; - nameBuffer.addInterpolation$1(additional); - return nameBuffer; - } else - throw exception; - } - _1_0 = _this._stylesheet0$_tryDeclarationChildren$3$value($name, start, value); - if (_1_0 != null) - return _1_0; - else { - _this.expectStatementSeparator$0(); - return A.Declaration$0($name, value, t1.spanFrom$1(start)); - } - }, - _stylesheet0$_variableDeclarationOrInterpolation$0() { - var t1, start, identifier, t2, buffer, _this = this; - if (!_this.lookingAtIdentifier$0()) - return _this.interpolatedIdentifier$0(); - t1 = _this.scanner; - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - identifier = _this.identifier$0(); - if (t1.matches$1(".$")) { - t1.readChar$0(); - return _this.variableDeclarationWithoutNamespace$2(identifier, start); - } else { - t2 = new A.StringBuffer(""); - buffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t2._contents = "" + identifier; - if (_this._stylesheet0$_lookingAtInterpolatedIdentifierBody$0()) - buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); - return buffer.interpolation$1(t1.spanFrom$1(start)); - } - }, - _stylesheet0$_styleRule$2(buffer, start_) { - var t2, start, interpolation, wasInStyleRule, _this = this, t1 = {}; - _this._stylesheet0$_isUseAllowed = false; - if (start_ == null) { - t2 = _this.scanner; - start = new A._SpanScannerState(t2, t2._string_scanner$_position); - } else - start = start_; - interpolation = t1.interpolation = _this.styleRuleSelector$0(); - if (buffer != null) { - buffer.addInterpolation$1(interpolation); - t2 = t1.interpolation = buffer.interpolation$1(_this.scanner.spanFrom$1(start)); - } else - t2 = interpolation; - if (t2.contents.length === 0) - _this.scanner.error$1(0, 'expected "}".'); - wasInStyleRule = _this._stylesheet0$_inStyleRule; - _this._stylesheet0$_inStyleRule = true; - return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__styleRule_closure0(t1, _this, wasInStyleRule, start)); - }, - _stylesheet0$_styleRule$0() { - return this._stylesheet0$_styleRule$2(null, null); - }, - _stylesheet0$_propertyOrVariableDeclaration$1$parseCustomProperties(parseCustomProperties) { - var t2, nameBuffer, t3, $name, variableOrInterpolation, _0_0, value, _1_0, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - if (_this._stylesheet0$_lookingAtPotentialPropertyHack$0()) { - t2 = new A.StringBuffer(""); - nameBuffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t3; - t3 = _this.rawText$1(_this.get$whitespace()); - t2._contents += t3; - nameBuffer.addInterpolation$1(_this.interpolatedIdentifier$0()); - $name = nameBuffer.interpolation$1(t1.spanFrom$1(start)); - } else if (!_this.get$plainCss()) { - variableOrInterpolation = _this._stylesheet0$_variableDeclarationOrInterpolation$0(); - if (variableOrInterpolation instanceof A.VariableDeclaration0) - return variableOrInterpolation; - else - type$.Interpolation_2._as(variableOrInterpolation); - $name = variableOrInterpolation; - } else - $name = _this.interpolatedIdentifier$0(); - _this.whitespace$0(); - t1.expectChar$1(58); - _this.whitespace$0(); - _0_0 = _this._stylesheet0$_tryDeclarationChildren$2($name, start); - if (_0_0 != null) - return _0_0; - value = _this._stylesheet0$_expression$0(); - _1_0 = _this._stylesheet0$_tryDeclarationChildren$3$value($name, start, value); - if (_1_0 != null) - return _1_0; - else { - _this.expectStatementSeparator$0(); - return A.Declaration$0($name, value, t1.spanFrom$1(start)); - } - }, - _stylesheet0$_tryDeclarationChildren$3$value($name, start, value) { - var _this = this; - if (!_this.lookingAtChildren$0()) - return null; - if (_this.get$plainCss()) - _this.scanner.error$1(0, string$.Nested); - return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_declarationChild(), start, new A.StylesheetParser__tryDeclarationChildren_closure0($name, value)); - }, - _stylesheet0$_tryDeclarationChildren$2($name, start) { - return this._stylesheet0$_tryDeclarationChildren$3$value($name, start, null); - }, - _stylesheet0$_declarationChild$0() { - return this.scanner.peekChar$0() === 64 ? this._stylesheet0$_declarationAtRule$0() : this._stylesheet0$_propertyOrVariableDeclaration$1$parseCustomProperties(false); - }, - atRule$2$root(child, root) { - var $name, wasUseAllowed, value, optional, url, namespace, configuration, span, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$2$name(64, "@-rule"); - $name = _this.interpolatedIdentifier$0(); - _this.whitespace$0(); - wasUseAllowed = _this._stylesheet0$_isUseAllowed; - _this._stylesheet0$_isUseAllowed = false; - switch ($name.get$asPlain()) { - case "at-root": - return _this._stylesheet0$_atRootRule$1(start); - case "content": - return _this._stylesheet0$_contentRule$1(start); - case "debug": - return _this._stylesheet0$_debugRule$1(start); - case "each": - return _this._stylesheet0$_eachRule$2(start, child); - case "else": - return _this._stylesheet0$_disallowedAtRule$1(start); - case "error": - return _this._stylesheet0$_errorRule$1(start); - case "extend": - if (!_this._stylesheet0$_inStyleRule && !_this._stylesheet0$_inMixin && !_this._stylesheet0$_inContentBlock) - _this.error$2(0, string$.x40exten, t1.spanFrom$1(start)); - value = _this.almostAnyValue$0(); - optional = t1.scanChar$1(33); - if (optional) { - _this.expectIdentifier$1("optional"); - _this.whitespace$0(); - } - _this.expectStatementSeparator$1("@extend rule"); - return new A.ExtendRule0(value, optional, t1.spanFrom$1(start)); - case "for": - return _this._stylesheet0$_forRule$2(start, child); - case "forward": - _this._stylesheet0$_isUseAllowed = wasUseAllowed; - if (!root) - _this._stylesheet0$_disallowedAtRule$1(start); - return _this._stylesheet0$_forwardRule$1(start); - case "function": - return _this._stylesheet0$_functionRule$1(start); - case "if": - return _this._stylesheet0$_ifRule$2(start, child); - case "import": - return _this._stylesheet0$_importRule$1(start); - case "include": - return _this._stylesheet0$_includeRule$1(start); - case "media": - return _this.mediaRule$1(start); - case "mixin": - return _this._stylesheet0$_mixinRule$1(start); - case "-moz-document": - return _this.mozDocumentRule$2(start, $name); - case "return": - return _this._stylesheet0$_disallowedAtRule$1(start); - case "supports": - return _this.supportsRule$1(start); - case "use": - _this._stylesheet0$_isUseAllowed = wasUseAllowed; - if (!root) - _this._stylesheet0$_disallowedAtRule$1(start); - url = _this._stylesheet0$_urlString$0(); - _this.whitespace$0(); - namespace = _this._stylesheet0$_useNamespace$2(url, start); - _this.whitespace$0(); - configuration = _this._stylesheet0$_configuration$0(); - _this.whitespace$0(); - span = t1.spanFrom$1(start); - if (!_this._stylesheet0$_isUseAllowed) - _this.error$2(0, string$.x40use_r, span); - _this.expectStatementSeparator$1("@use rule"); - t1 = new A.UseRule0(url, namespace, configuration == null ? B.List_empty22 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2), span); - t1.UseRule$4$configuration0(url, namespace, span, configuration); - return t1; - case "warn": - return _this._stylesheet0$_warnRule$1(start); - case "while": - return _this._stylesheet0$_whileRule$2(start, child); - default: - return _this.unknownAtRule$2(start, $name); - } - }, - _stylesheet0$_declarationAtRule$0() { - var _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - _0_0 = _this._stylesheet0$_plainAtRuleName$0(); - $label0$0: { - if ("content" === _0_0) { - t1 = _this._stylesheet0$_contentRule$1(start); - break $label0$0; - } - if ("debug" === _0_0) { - t1 = _this._stylesheet0$_debugRule$1(start); - break $label0$0; - } - if ("each" === _0_0) { - t1 = _this._stylesheet0$_eachRule$2(start, _this.get$_stylesheet0$_declarationChild()); - break $label0$0; - } - if ("else" === _0_0) - _this._stylesheet0$_disallowedAtRule$1(start); - if ("error" === _0_0) { - t1 = _this._stylesheet0$_errorRule$1(start); - break $label0$0; - } - if ("for" === _0_0) { - t1 = _this._stylesheet0$_forRule$2(start, _this.get$_stylesheet0$_declarationChild()); - break $label0$0; - } - if ("if" === _0_0) { - t1 = _this._stylesheet0$_ifRule$2(start, _this.get$_stylesheet0$_declarationChild()); - break $label0$0; - } - if ("include" === _0_0) { - t1 = _this._stylesheet0$_includeRule$1(start); - break $label0$0; - } - if ("warn" === _0_0) { - t1 = _this._stylesheet0$_warnRule$1(start); - break $label0$0; - } - if ("while" === _0_0) { - t1 = _this._stylesheet0$_whileRule$2(start, _this.get$_stylesheet0$_declarationChild()); - break $label0$0; - } - t1 = _this._stylesheet0$_disallowedAtRule$1(start); - } - return t1; - }, - _stylesheet0$_functionChild$0() { - var state, variableDeclarationError, stackTrace, statement, t2, namespace, exception, t3, start, _0_0, value, _this = this, - t1 = _this.scanner; - if (t1.peekChar$0() !== 64) { - t2 = t1._string_scanner$_position; - state = new A._SpanScannerState(t1, t2); - try { - namespace = _this.identifier$0(); - t1.expectChar$1(46); - t2 = _this.variableDeclarationWithoutNamespace$2(namespace, new A._SpanScannerState(t1, t2)); - return t2; - } catch (exception) { - t2 = A.unwrapException(exception); - t3 = type$.SourceSpanFormatException; - if (t3._is(t2)) { - variableDeclarationError = t2; - stackTrace = A.getTraceFromException(exception); - t1.set$state(state); - statement = null; - try { - statement = _this._stylesheet0$_declarationOrStyleRule$0(); - } catch (exception) { - if (t3._is(A.unwrapException(exception))) - throw A.wrapException(variableDeclarationError); - else - throw exception; - } - t2 = statement instanceof A.StyleRule0 ? "style rules" : "declarations"; - _this.error$3(0, "@function rules may not contain " + t2 + ".", J.get$span$z(statement), stackTrace); - } else - throw exception; - } - } - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - _0_0 = _this._stylesheet0$_plainAtRuleName$0(); - $label0$0: { - if ("debug" === _0_0) { - t1 = _this._stylesheet0$_debugRule$1(start); - break $label0$0; - } - if ("each" === _0_0) { - t1 = _this._stylesheet0$_eachRule$2(start, _this.get$_stylesheet0$_functionChild()); - break $label0$0; - } - if ("else" === _0_0) - _this._stylesheet0$_disallowedAtRule$1(start); - if ("error" === _0_0) { - t1 = _this._stylesheet0$_errorRule$1(start); - break $label0$0; - } - if ("for" === _0_0) { - t1 = _this._stylesheet0$_forRule$2(start, _this.get$_stylesheet0$_functionChild()); - break $label0$0; - } - if ("if" === _0_0) { - t1 = _this._stylesheet0$_ifRule$2(start, _this.get$_stylesheet0$_functionChild()); - break $label0$0; - } - if ("return" === _0_0) { - value = _this._stylesheet0$_expression$0(); - _this.expectStatementSeparator$1("@return rule"); - t1 = new A.ReturnRule0(value, t1.spanFrom$1(start)); - break $label0$0; - } - if ("warn" === _0_0) { - t1 = _this._stylesheet0$_warnRule$1(start); - break $label0$0; - } - if ("while" === _0_0) { - t1 = _this._stylesheet0$_whileRule$2(start, _this.get$_stylesheet0$_functionChild()); - break $label0$0; - } - t1 = _this._stylesheet0$_disallowedAtRule$1(start); - } - return t1; - }, - _stylesheet0$_plainAtRuleName$0() { - this.scanner.expectChar$2$name(64, "@-rule"); - var $name = this.identifier$0(); - this.whitespace$0(); - return $name; - }, - _stylesheet0$_atRootRule$1(start) { - var t2, t3, buffer, t4, query, _this = this, - t1 = _this.scanner; - if (t1.peekChar$0() === 40) { - t2 = t1._string_scanner$_position; - t3 = new A.StringBuffer(""); - buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t1.expectChar$1(40); - t4 = A.Primitives_stringFromCharCode(40); - t3._contents += t4; - _this.whitespace$0(); - _this._stylesheet0$_addOrInject$2(buffer, _this._stylesheet0$_expression$0()); - if (t1.scanChar$1(58)) { - _this.whitespace$0(); - t4 = A.Primitives_stringFromCharCode(58); - t3._contents += t4; - t4 = A.Primitives_stringFromCharCode(32); - t3._contents += t4; - _this._stylesheet0$_addOrInject$2(buffer, _this._stylesheet0$_expression$0()); - } - t1.expectChar$1(41); - _this.whitespace$0(); - t4 = A.Primitives_stringFromCharCode(41); - t3._contents += t4; - query = buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - _this.whitespace$0(); - return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__atRootRule_closure1(query)); - } else { - if (!_this.lookingAtChildren$0()) - t2 = _this.get$indented() && _this.atEndOfStatement$0(); - else - t2 = true; - if (t2) - return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__atRootRule_closure2()); - else - return A.AtRootRule$0(A._setArrayType([_this._stylesheet0$_styleRule$0()], type$.JSArray_Statement_2), t1.spanFrom$1(start), null); - } - }, - _stylesheet0$_contentRule$1(start) { - var t1, beforeWhitespace, $arguments, t2, _this = this; - if (!_this._stylesheet0$_inMixin) - _this.error$2(0, string$.x40conte, _this.scanner.spanFrom$1(start)); - t1 = _this.scanner; - beforeWhitespace = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); - _this.whitespace$0(); - if (t1.peekChar$0() === 40) { - $arguments = _this._stylesheet0$_argumentInvocation$1$mixin(true); - _this.whitespace$0(); - } else { - t2 = beforeWhitespace.offset; - $arguments = A.ArgumentInvocation$empty0(A._FileSpan$(beforeWhitespace.file, t2, t2)); - } - _this.expectStatementSeparator$1("@content rule"); - return new A.ContentRule0($arguments, t1.spanFrom$1(start)); - }, - _stylesheet0$_debugRule$1(start) { - var value = this._stylesheet0$_expression$0(); - this.expectStatementSeparator$1("@debug rule"); - return new A.DebugRule0(value, this.scanner.spanFrom$1(start)); - }, - _stylesheet0$_eachRule$2(start, child) { - var variables, t1, _this = this, - wasInControlDirective = _this._stylesheet0$_inControlDirective; - _this._stylesheet0$_inControlDirective = true; - variables = A._setArrayType([_this.variableName$0()], type$.JSArray_String); - _this.whitespace$0(); - for (t1 = _this.scanner; t1.scanChar$1(44);) { - _this.whitespace$0(); - t1.expectChar$1(36); - variables.push(_this.identifier$1$normalize(true)); - _this.whitespace$0(); - } - _this.expectIdentifier$1("in"); - _this.whitespace$0(); - return _this._stylesheet0$_withChildren$3(child, start, new A.StylesheetParser__eachRule_closure0(_this, wasInControlDirective, variables, _this._stylesheet0$_expression$0())); - }, - _stylesheet0$_errorRule$1(start) { - var value = this._stylesheet0$_expression$0(); - this.expectStatementSeparator$1("@error rule"); - return new A.ErrorRule0(value, this.scanner.spanFrom$1(start)); - }, - _stylesheet0$_functionRule$1(start) { - var t1, t2, $name, $arguments, _0_0, _this = this, - precedingComment = _this.lastSilentComment; - _this.lastSilentComment = null; - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - $name = _this.identifier$0(); - if (B.JSString_methods.startsWith$1($name, "--")) - _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_omC, string$.Sassx20_fm, t1.spanFrom$1(new A._SpanScannerState(t1, t2)))); - _this.whitespace$0(); - $arguments = _this._stylesheet0$_argumentDeclaration$0(); - if (_this._stylesheet0$_inMixin || _this._stylesheet0$_inContentBlock) - _this.error$2(0, string$.Mixinscf, t1.spanFrom$1(start)); - else if (_this._stylesheet0$_inControlDirective) - _this.error$2(0, string$.Functi, t1.spanFrom$1(start)); - _0_0 = A.unvendor0($name); - if ("calc" === _0_0 || "element" === _0_0 || "expression" === _0_0 || "url" === _0_0 || "and" === _0_0 || "or" === _0_0 || "not" === _0_0 || "clamp" === _0_0) - _this.error$2(0, "Invalid function name.", t1.spanFrom$1(start)); - _this.whitespace$0(); - return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_functionChild(), start, new A.StylesheetParser__functionRule_closure0($name, $arguments, precedingComment)); - }, - _stylesheet0$_forRule$2(start, child) { - var variable, from, _this = this, t1 = {}, - wasInControlDirective = _this._stylesheet0$_inControlDirective; - _this._stylesheet0$_inControlDirective = true; - variable = _this.variableName$0(); - _this.whitespace$0(); - _this.expectIdentifier$1("from"); - _this.whitespace$0(); - t1.exclusive = null; - from = _this._stylesheet0$_expression$1$until(new A.StylesheetParser__forRule_closure1(t1, _this)); - if (t1.exclusive == null) - _this.scanner.error$1(0, 'Expected "to" or "through".'); - _this.whitespace$0(); - return _this._stylesheet0$_withChildren$3(child, start, new A.StylesheetParser__forRule_closure2(t1, _this, wasInControlDirective, variable, from, _this._stylesheet0$_expression$0())); - }, - _stylesheet0$_forwardRule$1(start) { - var prefix, hiddenMixinsAndFunctions, hiddenVariables, _0_0, shownMixinsAndFunctions, shownVariables, _1_0, configuration, span, t1, t2, t3, t4, _this = this, _null = null, - url = _this._stylesheet0$_urlString$0(); - _this.whitespace$0(); - if (_this.scanIdentifier$1("as")) { - _this.whitespace$0(); - prefix = _this.identifier$1$normalize(true); - _this.scanner.expectChar$1(42); - _this.whitespace$0(); - } else - prefix = _null; - hiddenMixinsAndFunctions = _null; - hiddenVariables = _null; - if (_this.scanIdentifier$1("show")) { - _0_0 = _this._stylesheet0$_memberList$0(); - shownMixinsAndFunctions = _0_0._0; - shownVariables = _0_0._1; - } else { - if (_this.scanIdentifier$1("hide")) { - _1_0 = _this._stylesheet0$_memberList$0(); - hiddenMixinsAndFunctions = _1_0._0; - hiddenVariables = _1_0._1; - } - shownVariables = _null; - shownMixinsAndFunctions = shownVariables; - } - configuration = _this._stylesheet0$_configuration$1$allowGuarded(true); - _this.whitespace$0(); - _this.expectStatementSeparator$1("@forward rule"); - span = _this.scanner.spanFrom$1(start); - if (!_this._stylesheet0$_isUseAllowed) - _this.error$2(0, string$.x40forwa, span); - if (shownMixinsAndFunctions != null) { - shownVariables.toString; - t1 = type$.String; - t2 = A.LinkedHashSet_LinkedHashSet$of(shownMixinsAndFunctions, t1); - t3 = type$.UnmodifiableSetView_String; - t1 = A.LinkedHashSet_LinkedHashSet$of(shownVariables, t1); - t4 = configuration == null ? B.List_empty22 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2); - return new A.ForwardRule0(url, new A.UnmodifiableSetView0(t2, t3), new A.UnmodifiableSetView0(t1, t3), _null, _null, prefix, t4, span); - } else if (hiddenMixinsAndFunctions != null) { - hiddenVariables.toString; - t1 = type$.String; - t2 = A.LinkedHashSet_LinkedHashSet$of(hiddenMixinsAndFunctions, t1); - t3 = type$.UnmodifiableSetView_String; - t1 = A.LinkedHashSet_LinkedHashSet$of(hiddenVariables, t1); - t4 = configuration == null ? B.List_empty22 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2); - return new A.ForwardRule0(url, _null, _null, new A.UnmodifiableSetView0(t2, t3), new A.UnmodifiableSetView0(t1, t3), prefix, t4, span); - } else - return new A.ForwardRule0(url, _null, _null, _null, _null, prefix, configuration == null ? B.List_empty22 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2), span); - }, - _stylesheet0$_memberList$0() { - var _this = this, - t1 = type$.String, - identifiers = A.LinkedHashSet_LinkedHashSet$_empty(t1), - variables = A.LinkedHashSet_LinkedHashSet$_empty(t1); - t1 = _this.scanner; - do { - _this.whitespace$0(); - _this.withErrorMessage$2(string$.Expectv, new A.StylesheetParser__memberList_closure0(_this, variables, identifiers)); - _this.whitespace$0(); - } while (t1.scanChar$1(44)); - return new A._Record_2(identifiers, variables); - }, - _stylesheet0$_ifRule$2(start, child) { - var condition, children, clauses, lastClause, span, _this = this, - ifIndentation = _this.get$currentIndentation(), - wasInControlDirective = _this._stylesheet0$_inControlDirective; - _this._stylesheet0$_inControlDirective = true; - condition = _this._stylesheet0$_expression$0(); - children = _this.children$1(0, child); - _this.whitespaceWithoutComments$0(); - clauses = A._setArrayType([A.IfClause$0(condition, children)], type$.JSArray_IfClause_2); - while (true) { - if (!_this.scanElse$1(ifIndentation)) { - lastClause = null; - break; - } - _this.whitespace$0(); - if (_this.scanIdentifier$1("if")) { - _this.whitespace$0(); - clauses.push(A.IfClause$0(_this._stylesheet0$_expression$0(), _this.children$1(0, child))); - } else { - lastClause = A.ElseClause$0(_this.children$1(0, child)); - break; - } - } - _this._stylesheet0$_inControlDirective = wasInControlDirective; - span = _this.scanner.spanFrom$1(start); - _this.whitespaceWithoutComments$0(); - return new A.IfRule0(A.List_List$unmodifiable(clauses, type$.IfClause_2), lastClause, span); - }, - _stylesheet0$_importRule$1(start) { - var argument, t3, _this = this, - imports = A._setArrayType([], type$.JSArray_Import_2), - t1 = _this.scanner, - t2 = _this.warnings; - do { - _this.whitespace$0(); - argument = _this.importArgument$0(); - t3 = argument instanceof A.DynamicImport0; - if (t3) - t2.push(new A._Record_3_deprecation_message_span(B.Deprecation_A0i, string$.Sassx20_i, argument.span)); - if ((_this._stylesheet0$_inControlDirective || _this._stylesheet0$_inMixin) && t3) - _this._stylesheet0$_disallowedAtRule$1(start); - imports.push(argument); - _this.whitespace$0(); - } while (t1.scanChar$1(44)); - _this.expectStatementSeparator$1("@import rule"); - t1 = t1.spanFrom$1(start); - return new A.ImportRule0(A.List_List$unmodifiable(imports, type$.Import_2), t1); - }, - importArgument$0() { - var url, urlSpan, innerError, stackTrace, modifiers, t2, exception, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - _0_0 = t1.peekChar$0(); - if (117 === _0_0 || 85 === _0_0) { - url = _this.dynamicUrl$0(); - _this.whitespace$0(); - modifiers = _this.tryImportModifiers$0(); - t2 = url instanceof A.StringExpression0 ? url.text : A.Interpolation$0(A._setArrayType([url], type$.JSArray_Object), A._setArrayType([url.get$span(url)], type$.JSArray_nullable_FileSpan), url.get$span(url)); - return new A.StaticImport0(t2, modifiers, t1.spanFrom$1(start)); - } - url = _this.string$0(); - urlSpan = t1.spanFrom$1(start); - _this.whitespace$0(); - modifiers = _this.tryImportModifiers$0(); - if (_this.isPlainImportUrl$1(url) || modifiers != null) { - t2 = urlSpan; - return new A.StaticImport0(new A.Interpolation0(A.List_List$unmodifiable([A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2.file._decodedChars, t2._file$_start, t2._end), 0, null)], type$.Object), B.List_null, urlSpan), modifiers, t1.spanFrom$1(start)); - } else - try { - t1 = _this.parseImportUrl$1(url); - return new A.DynamicImport0(t1, urlSpan); - } catch (exception) { - t1 = A.unwrapException(exception); - if (type$.FormatException._is(t1)) { - innerError = t1; - stackTrace = A.getTraceFromException(exception); - _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), urlSpan, stackTrace); - } else - throw exception; - } - }, - parseImportUrl$1(url) { - var t1 = $.$get$windows(); - if (t1.style.rootLength$1(url) > 0 && !$.$get$url().style.isRootRelative$1(url)) - return t1.toUri$1(url).toString$0(0); - A.Uri_parse(url); - return url; - }, - isPlainImportUrl$1(url) { - var _0_0, t1; - if (url.length < 5) - return false; - if (B.JSString_methods.endsWith$1(url, ".css")) - return true; - _0_0 = url.charCodeAt(0); - $label0$0: { - if (47 === _0_0) { - t1 = url.charCodeAt(1) === 47; - break $label0$0; - } - if (104 === _0_0) { - t1 = B.JSString_methods.startsWith$1(url, "http://") || B.JSString_methods.startsWith$1(url, "https://"); - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - tryImportModifiers$0() { - var t1, start, t2, t3, t4, buffer, t5, identifier, $name, query, t6, endPosition, _this = this; - if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0() && _this.scanner.peekChar$0() !== 40) - return null; - t1 = _this.scanner; - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t2 = new A.StringBuffer(""); - t3 = A._setArrayType([], type$.JSArray_Object); - t4 = A._setArrayType([], type$.JSArray_nullable_FileSpan); - buffer = new A.InterpolationBuffer0(t2, t3, t4); - for (; true;) - if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { - if (!(t3.length === 0 && t2._contents.length === 0)) { - t5 = A.Primitives_stringFromCharCode(32); - t2._contents += t5; - } - identifier = _this.interpolatedIdentifier$0(); - buffer.addInterpolation$1(identifier); - t5 = identifier.get$asPlain(); - $name = t5 == null ? null : t5.toLowerCase(); - if ($name !== "and" && t1.scanChar$1(40)) { - if ($name === "supports") { - query = _this._stylesheet0$_importSupportsQuery$0(); - t5 = !(query instanceof A.SupportsDeclaration0); - if (t5) { - t6 = A.Primitives_stringFromCharCode(40); - t2._contents += t6; - } - t6 = query.get$span(query); - buffer._interpolation_buffer0$_flushText$0(); - t3.push(new A.SupportsExpression0(query)); - t4.push(t6); - if (t5) { - t5 = A.Primitives_stringFromCharCode(41); - t2._contents += t5; - } - } else { - t5 = A.Primitives_stringFromCharCode(40); - t2._contents += t5; - buffer.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true)); - t5 = A.Primitives_stringFromCharCode(41); - t2._contents += t5; - } - t1.expectChar$1(41); - _this.whitespace$0(); - } else { - _this.whitespace$0(); - if (t1.scanChar$1(44)) { - t2._contents += ", "; - buffer.addInterpolation$1(_this._stylesheet0$_mediaQueryList$0()); - endPosition = t1._string_scanner$_position; - t2 = t1._sourceFile; - t3 = start.position; - t1 = new A._FileSpan(t2, t3, endPosition); - t1._FileSpan$3(t2, t3, endPosition); - return buffer.interpolation$1(t1); - } - } - } else if (t1.peekChar$0() === 40) { - if (!(t3.length === 0 && t2._contents.length === 0)) { - t3 = A.Primitives_stringFromCharCode(32); - t2._contents += t3; - } - buffer.addInterpolation$1(_this._stylesheet0$_mediaQueryList$0()); - endPosition = t1._string_scanner$_position; - t1 = t1._sourceFile; - t2 = start.position; - t3 = new A._FileSpan(t1, t2, endPosition); - t3._FileSpan$3(t1, t2, endPosition); - return buffer.interpolation$1(t3); - } else { - endPosition = t1._string_scanner$_position; - t1 = t1._sourceFile; - t2 = start.position; - t3 = new A._FileSpan(t1, t2, endPosition); - t3._FileSpan$3(t1, t2, endPosition); - return buffer.interpolation$1(t3); - } - }, - _stylesheet0$_importSupportsQuery$0() { - var t1, t2, _0_0, $name, _this = this; - if (_this.scanIdentifier$1("not")) { - _this.whitespace$0(); - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - return new A.SupportsNegation0(_this._stylesheet0$_supportsConditionInParens$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - } else { - t1 = _this.scanner; - if (t1.peekChar$0() === 40) - return _this._stylesheet0$_supportsCondition$0(); - else { - _0_0 = _this._stylesheet0$_tryImportSupportsFunction$0(); - if (_0_0 != null) - return _0_0; - t2 = t1._string_scanner$_position; - $name = _this._stylesheet0$_expression$0(); - t1.expectChar$1(58); - return new A.SupportsDeclaration0($name, _this._stylesheet0$_supportsDeclarationValue$1($name), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - } - } - }, - _stylesheet0$_tryImportSupportsFunction$0() { - var t1, start, $name, value, _this = this; - if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) - return null; - t1 = _this.scanner; - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - $name = _this.interpolatedIdentifier$0(); - if (!t1.scanChar$1(40)) { - t1.set$state(start); - return null; - } - value = _this._stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true); - t1.expectChar$1(41); - return new A.SupportsFunction0($name, value, t1.spanFrom$1(start)); - }, - _stylesheet0$_includeRule$1(start) { - var name0, namespace, $arguments, t2, t3, contentArguments, contentArguments_, wasInContentBlock, $content, span, _this = this, _null = null, - $name = _this.identifier$0(), - t1 = _this.scanner; - if (t1.scanChar$1(46)) { - name0 = _this._stylesheet0$_publicIdentifier$0(); - namespace = $name; - $name = name0; - } else - namespace = _null; - _this.whitespace$0(); - if (t1.peekChar$0() === 40) - $arguments = _this._stylesheet0$_argumentInvocation$1$mixin(true); - else { - t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); - t3 = t2.offset; - $arguments = A.ArgumentInvocation$empty0(A._FileSpan$(t2.file, t3, t3)); - } - _this.whitespace$0(); - if (_this.scanIdentifier$1("using")) { - _this.whitespace$0(); - contentArguments = _this._stylesheet0$_argumentDeclaration$0(); - _this.whitespace$0(); - } else - contentArguments = _null; - t2 = contentArguments == null; - if (!t2 || _this.lookingAtChildren$0()) { - if (t2) { - t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); - t3 = t2.offset; - contentArguments_ = new A.ArgumentDeclaration0(B.List_empty24, _null, A._FileSpan$(t2.file, t3, t3)); - } else - contentArguments_ = contentArguments; - wasInContentBlock = _this._stylesheet0$_inContentBlock; - _this._stylesheet0$_inContentBlock = true; - $content = _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__includeRule_closure0(contentArguments_)); - _this._stylesheet0$_inContentBlock = wasInContentBlock; - } else { - _this.expectStatementSeparator$0(); - $content = _null; - } - t1 = t1.spanFrom$2(start, start); - t2 = $content == null ? $arguments : $content; - span = t1.expand$1(0, t2.get$span(t2)); - return new A.IncludeRule0(namespace, A.stringReplaceAllUnchecked($name, "_", "-"), $name, $arguments, $content, span); - }, - mediaRule$1(start) { - return this._stylesheet0$_withChildren$3(this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_mediaRule_closure0(this._stylesheet0$_mediaQueryList$0())); - }, - _stylesheet0$_mixinRule$1(start) { - var t1, t2, $name, $arguments, t3, _this = this, - precedingComment = _this.lastSilentComment; - _this.lastSilentComment = null; - t1 = _this.scanner; - t2 = t1._string_scanner$_position; - $name = _this.identifier$0(); - if (B.JSString_methods.startsWith$1($name, "--")) - _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_omC, string$.Sassx20_m, t1.spanFrom$1(new A._SpanScannerState(t1, t2)))); - _this.whitespace$0(); - if (t1.peekChar$0() === 40) - $arguments = _this._stylesheet0$_argumentDeclaration$0(); - else { - t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); - t3 = t2.offset; - $arguments = new A.ArgumentDeclaration0(B.List_empty24, null, A._FileSpan$(t2.file, t3, t3)); - } - if (_this._stylesheet0$_inMixin || _this._stylesheet0$_inContentBlock) - _this.error$2(0, string$.Mixinscm, t1.spanFrom$1(start)); - else if (_this._stylesheet0$_inControlDirective) - _this.error$2(0, string$.Mixinsb, t1.spanFrom$1(start)); - _this.whitespace$0(); - _this._stylesheet0$_inMixin = true; - return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__mixinRule_closure0(_this, $name, $arguments, precedingComment)); - }, - mozDocumentRule$2(start, $name) { - var t6, _0_0, t7, identifier, _1_0, argument, trailing, endPosition, t8, t9, start0, end, _this = this, _box_0 = {}, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - t3 = new A.StringBuffer(""), - t4 = A._setArrayType([], type$.JSArray_Object), - t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan), - buffer = new A.InterpolationBuffer0(t3, t4, t5); - _box_0.needsDeprecationWarning = false; - for (t6 = _this.get$whitespace(); true;) { - if (t1.peekChar$0() === 35) { - _0_0 = _this.singleInterpolation$0(); - buffer._interpolation_buffer0$_flushText$0(); - t4.push(_0_0._0); - t5.push(_0_0._1); - _box_0.needsDeprecationWarning = true; - } else { - t7 = t1._string_scanner$_position; - identifier = _this.identifier$0(); - $label0$0: { - if ("url" === identifier || "url-prefix" === identifier || "domain" === identifier) { - _1_0 = _this._stylesheet0$_tryUrlContents$2$name(new A._SpanScannerState(t1, t7), identifier); - if (_1_0 != null) - buffer.addInterpolation$1(_1_0); - else { - t1.expectChar$1(40); - _this.whitespace$0(); - argument = _this.interpolatedString$0(); - t1.expectChar$1(41); - t3._contents += identifier; - t7 = A.Primitives_stringFromCharCode(40); - t3._contents += t7; - buffer.addInterpolation$1(argument.asInterpolation$0()); - t7 = A.Primitives_stringFromCharCode(41); - t3._contents += t7; - } - t7 = t3._contents; - trailing = t7.charCodeAt(0) == 0 ? t7 : t7; - if (!B.JSString_methods.endsWith$1(trailing, "url-prefix()") && !B.JSString_methods.endsWith$1(trailing, "url-prefix('')") && !B.JSString_methods.endsWith$1(trailing, 'url-prefix("")')) - _box_0.needsDeprecationWarning = true; - break $label0$0; - } - if ("regexp" === identifier) { - t3._contents += "regexp("; - t1.expectChar$1(40); - buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); - t1.expectChar$1(41); - t7 = A.Primitives_stringFromCharCode(41); - t3._contents += t7; - _box_0.needsDeprecationWarning = true; - break $label0$0; - } - endPosition = t1._string_scanner$_position; - t8 = t1._sourceFile; - t9 = new A._FileSpan(t8, t7, endPosition); - t9._FileSpan$3(t8, t7, endPosition); - _this.error$2(0, "Invalid function name.", t9); - } - } - _this.whitespace$0(); - if (!t1.scanChar$1(44)) - break; - t7 = A.Primitives_stringFromCharCode(44); - t3._contents += t7; - start0 = t1._string_scanner$_position; - t6.call$0(); - end = t1._string_scanner$_position; - t3._contents += B.JSString_methods.substring$2(t1.string, start0, end); - } - return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_mozDocumentRule_closure0(_box_0, _this, $name, buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))))); - }, - supportsRule$1(start) { - var _this = this, - condition = _this._stylesheet0$_supportsCondition$0(); - _this.whitespace$0(); - return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_supportsRule_closure0(condition)); - }, - _stylesheet0$_useNamespace$2(url, start) { - var namespace, basename, dot, t1, exception, _this = this; - if (_this.scanIdentifier$1("as")) { - _this.whitespace$0(); - return _this.scanner.scanChar$1(42) ? null : _this.identifier$0(); - } - basename = url.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(url.get$pathSegments()); - dot = B.JSString_methods.indexOf$1(basename, "."); - t1 = B.JSString_methods.startsWith$1(basename, "_") ? 1 : 0; - namespace = B.JSString_methods.substring$2(basename, t1, dot === -1 ? basename.length : dot); - try { - t1 = new A.Parser1(A.SpanScanner$(namespace, null), null)._parser1$_parseIdentifier$0(); - return t1; - } catch (exception) { - if (type$.SassFormatException_2._is(A.unwrapException(exception))) - _this.error$2(0, 'The default namespace "' + A.S(namespace) + string$.x22x20is_n, _this.scanner.spanFrom$1(start)); - else - throw exception; - } - }, - _stylesheet0$_configuration$1$allowGuarded(allowGuarded) { - var variableNames, configuration, t1, t2, $name, expression, t3, guarded, endPosition, t4, t5, span, _this = this; - if (!_this.scanIdentifier$1("with")) - return null; - variableNames = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); - configuration = A._setArrayType([], type$.JSArray_ConfiguredVariable_2); - _this.whitespace$0(); - t1 = _this.scanner; - t1.expectChar$1(40); - for (; true;) { - _this.whitespace$0(); - t2 = t1._string_scanner$_position; - t1.expectChar$1(36); - $name = _this.identifier$1$normalize(true); - _this.whitespace$0(); - t1.expectChar$1(58); - _this.whitespace$0(); - expression = _this.expressionUntilComma$0(); - t3 = t1._string_scanner$_position; - if (allowGuarded && t1.scanChar$1(33)) { - guarded = _this.identifier$0() === "default"; - if (guarded) - _this.whitespace$0(); - else { - endPosition = t1._string_scanner$_position; - t4 = t1._sourceFile; - t5 = new A._FileSpan(t4, t3, endPosition); - t5._FileSpan$3(t4, t3, endPosition); - _this.error$2(0, "Invalid flag name.", t5); - } - } else - guarded = false; - endPosition = t1._string_scanner$_position; - t3 = t1._sourceFile; - span = new A._FileSpan(t3, t2, endPosition); - span._FileSpan$3(t3, t2, endPosition); - if (variableNames.contains$1(0, $name)) - _this.error$2(0, string$.The_sa, span); - variableNames.add$1(0, $name); - configuration.push(new A.ConfiguredVariable0($name, expression, guarded, span)); - if (!t1.scanChar$1(44)) - break; - _this.whitespace$0(); - if (!_this._stylesheet0$_lookingAtExpression$0()) - break; - } - t1.expectChar$1(41); - return configuration; - }, - _stylesheet0$_configuration$0() { - return this._stylesheet0$_configuration$1$allowGuarded(false); - }, - _stylesheet0$_warnRule$1(start) { - var value = this._stylesheet0$_expression$0(); - this.expectStatementSeparator$1("@warn rule"); - return new A.WarnRule0(value, this.scanner.spanFrom$1(start)); - }, - _stylesheet0$_whileRule$2(start, child) { - var _this = this, - wasInControlDirective = _this._stylesheet0$_inControlDirective; - _this._stylesheet0$_inControlDirective = true; - return _this._stylesheet0$_withChildren$3(child, start, new A.StylesheetParser__whileRule_closure0(_this, wasInControlDirective, _this._stylesheet0$_expression$0())); - }, - unknownAtRule$2(start, $name) { - var t2, t3, rule, _this = this, t1 = {}, - wasInUnknownAtRule = _this._stylesheet0$_inUnknownAtRule; - _this._stylesheet0$_inUnknownAtRule = true; - t1.value = null; - t2 = _this.scanner; - t3 = t2.peekChar$0() !== 33 && !_this.atEndOfStatement$0() ? t1.value = _this._stylesheet0$_interpolatedDeclarationValue$1$allowOpenBrace(false) : null; - if (_this.lookingAtChildren$0()) - rule = _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_unknownAtRule_closure0(t1, $name)); - else { - _this.expectStatementSeparator$0(); - rule = A.AtRule$0($name, t2.spanFrom$1(start), null, t3); - } - _this._stylesheet0$_inUnknownAtRule = wasInUnknownAtRule; - return rule; - }, - _stylesheet0$_disallowedAtRule$1(start) { - this._stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowOpenBrace(true, false); - this.error$2(0, "This at-rule is not allowed here.", this.scanner.spanFrom$1(start)); - }, - _stylesheet0$_argumentDeclaration$0() { - var $arguments, named, restArgument, t3, $name, defaultValue, endPosition, t4, t5, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - t1.expectChar$1(40); - _this.whitespace$0(); - $arguments = A._setArrayType([], type$.JSArray_Argument_2); - named = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); - for (; restArgument = null, t1.peekChar$0() === 36;) { - t3 = t1._string_scanner$_position; - t1.expectChar$1(36); - $name = _this.identifier$1$normalize(true); - _this.whitespace$0(); - if (t1.scanChar$1(58)) { - _this.whitespace$0(); - defaultValue = _this.expressionUntilComma$0(); - } else { - if (t1.scanChar$1(46)) { - t1.expectChar$1(46); - t1.expectChar$1(46); - _this.whitespace$0(); - restArgument = $name; - break; - } - defaultValue = null; - } - endPosition = t1._string_scanner$_position; - t4 = t1._sourceFile; - t5 = new A._FileSpan(t4, t3, endPosition); - t5._FileSpan$3(t4, t3, endPosition); - $arguments.push(new A.Argument0($name, defaultValue, t5)); - if (!named.add$1(0, $name)) - _this.error$2(0, "Duplicate argument.", B.JSArray_methods.get$last($arguments).span); - if (!t1.scanChar$1(44)) - break; - _this.whitespace$0(); - } - t1.expectChar$1(41); - t1 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); - return new A.ArgumentDeclaration0(A.List_List$unmodifiable($arguments, type$.Argument_2), restArgument, t1); - }, - _stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, mixin) { - var positional, t3, t4, named, t5, rest, keywordRest, expression, t6, t7, result, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - t1.expectChar$1(40); - _this.whitespace$0(); - positional = A._setArrayType([], type$.JSArray_Expression_2); - t3 = type$.String; - t4 = type$.Expression_2; - named = A.LinkedHashMap_LinkedHashMap$_empty(t3, t4); - for (t5 = !mixin, rest = null; keywordRest = null, _this._stylesheet0$_lookingAtExpression$0();) { - expression = _this.expressionUntilComma$1$singleEquals(t5); - _this.whitespace$0(); - if (expression instanceof A.VariableExpression0 && t1.scanChar$1(58)) { - _this.whitespace$0(); - t6 = expression.name; - if (named.containsKey$1(t6)) - _this.error$2(0, "Duplicate argument.", expression.span); - named.$indexSet(0, t6, _this.expressionUntilComma$1$singleEquals(t5)); - } else if (t1.scanChar$1(46)) { - t1.expectChar$1(46); - t1.expectChar$1(46); - if (rest != null) { - _this.whitespace$0(); - keywordRest = expression; - break; - } - rest = expression; - } else if (named.__js_helper$_length !== 0) - _this.error$2(0, string$.Positi, expression.get$span(expression)); - else - positional.push(expression); - _this.whitespace$0(); - if (!t1.scanChar$1(44)) - break; - _this.whitespace$0(); - if (allowEmptySecondArg && positional.length === 1 && named.__js_helper$_length === 0 && rest == null && t1.peekChar$0() === 41) { - t5 = t1._sourceFile; - t6 = t1._string_scanner$_position; - new A.FileLocation(t5, t6).FileLocation$_$2(t5, t6); - t7 = new A._FileSpan(t5, t6, t6); - t7._FileSpan$3(t5, t6, t6); - result = A.List_List$from([""], false, type$.Object); - result.fixed$length = Array; - result.immutable$list = Array; - positional.push(new A.StringExpression0(new A.Interpolation0(result, B.List_null, t7), false)); - break; - } - } - t1.expectChar$1(41); - t1 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); - return new A.ArgumentInvocation0(A.List_List$unmodifiable(positional, t4), A.ConstantMap_ConstantMap$from(named, t3, t4), rest, keywordRest, t1); - }, - _stylesheet0$_argumentInvocation$0() { - return this._stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(false, false); - }, - _stylesheet0$_argumentInvocation$1$allowEmptySecondArg(allowEmptySecondArg) { - return this._stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, false); - }, - _stylesheet0$_argumentInvocation$1$mixin(mixin) { - return this._stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(false, mixin); - }, - _stylesheet0$_expression$3$bracketList$singleEquals$until(bracketList, singleEquals, until) { - var t2, beforeBracket, start, wasInExpression, wasInParentheses, resetState, resolveOneOperation, resolveOperations, addSingleExpression, addOperator, resolveSpaceExpressions, t3, _3_0, _1_0, t4, _3_28, _2_0, _3_32, _3_40, commaExpressions, spaceExpressions, singleExpression, _this = this, - _s20_ = "Expected expression.", - _box_0 = {}, - t1 = until != null; - if (t1 && until.call$0()) - _this.scanner.error$1(0, _s20_); - if (bracketList) { - t2 = _this.scanner; - beforeBracket = new A._SpanScannerState(t2, t2._string_scanner$_position); - t2.expectChar$1(91); - _this.whitespace$0(); - if (t2.scanChar$1(93)) { - t1 = A._setArrayType([], type$.JSArray_Expression_2); - t2 = t2.spanFrom$1(beforeBracket); - return new A.ListExpression0(A.List_List$unmodifiable(t1, type$.Expression_2), B.ListSeparator_undecided_null_undecided0, true, t2); - } - } else - beforeBracket = null; - t2 = _this.scanner; - start = new A._SpanScannerState(t2, t2._string_scanner$_position); - wasInExpression = _this._stylesheet0$_inExpression; - wasInParentheses = _this._stylesheet0$_inParentheses; - _this._stylesheet0$_inExpression = true; - _box_0.operands_ = _box_0.operators_ = _box_0.spaceExpressions_ = _box_0.commaExpressions_ = null; - _box_0.allowSlash = true; - _box_0.singleExpression_ = _this._stylesheet0$_singleExpression$0(); - resetState = new A.StylesheetParser__expression_resetState0(_box_0, _this, start); - resolveOneOperation = new A.StylesheetParser__expression_resolveOneOperation0(_box_0, _this); - resolveOperations = new A.StylesheetParser__expression_resolveOperations0(_box_0, resolveOneOperation); - addSingleExpression = new A.StylesheetParser__expression_addSingleExpression0(_box_0, _this, resetState, resolveOperations); - addOperator = new A.StylesheetParser__expression_addOperator0(_box_0, _this, resolveOneOperation); - resolveSpaceExpressions = new A.StylesheetParser__expression_resolveSpaceExpressions0(_box_0, _this, resolveOperations); - for (t3 = type$.JSArray_Expression_2; true;) { - _this.whitespace$0(); - if (t1 && until.call$0()) - break; - _3_0 = t2.peekChar$0(); - if (_3_0 == null) - break; - if (40 === _3_0) { - addSingleExpression.call$1(_this.parentheses$0()); - continue; - } - if (91 === _3_0) { - addSingleExpression.call$1(_this._stylesheet0$_expression$1$bracketList(true)); - continue; - } - if (36 === _3_0) { - addSingleExpression.call$1(_this._stylesheet0$_variable$0()); - continue; - } - if (38 === _3_0) { - addSingleExpression.call$1(_this._stylesheet0$_selector$0()); - continue; - } - if (39 === _3_0 || 34 === _3_0) { - addSingleExpression.call$1(_this.interpolatedString$0()); - continue; - } - if (35 === _3_0) { - addSingleExpression.call$1(_this._stylesheet0$_hashExpression$0()); - continue; - } - if (61 === _3_0) { - t2.readChar$0(); - if (singleEquals && t2.peekChar$0() !== 61) - addOperator.call$1(B.BinaryOperator_wdM0); - else { - t2.expectChar$1(61); - addOperator.call$1(B.BinaryOperator_g8k0); - } - continue; - } - if (33 === _3_0) { - $label0$1: { - _1_0 = t2.peekChar$1(1); - if (61 === _1_0) { - t2.readChar$0(); - t2.readChar$0(); - addOperator.call$1(B.BinaryOperator_icU0); - break $label0$1; - } - t4 = true; - if (_1_0 != null) - if (105 !== _1_0) - if (73 !== _1_0) - t4 = _1_0 === 32 || _1_0 === 9 || _1_0 === 10 || _1_0 === 13 || _1_0 === 12; - if (t4) { - addSingleExpression.call$1(_this._stylesheet0$_importantExpression$0()); - break $label0$1; - } - break; - } - continue; - } - if (60 === _3_0) { - t2.readChar$0(); - addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_SPQ0 : B.BinaryOperator_miq0); - continue; - } - if (62 === _3_0) { - t2.readChar$0(); - addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_oEm0 : B.BinaryOperator_bEa0); - continue; - } - if (42 === _3_0) { - t2.readChar$0(); - addOperator.call$1(B.BinaryOperator_2No0); - continue; - } - _3_28 = 43 === _3_0; - if (_3_28 && _box_0.singleExpression_ == null) { - addSingleExpression.call$1(_this._stylesheet0$_unaryOperation$0()); - continue; - } - if (_3_28) { - t2.readChar$0(); - addOperator.call$1(B.BinaryOperator_u150); - continue; - } - if (45 === _3_0) { - _2_0 = t2.peekChar$1(1); - if (A._isInt(_2_0) && _2_0 >= 48 && _2_0 <= 57 || 46 === _2_0) - if (_box_0.singleExpression_ != null) { - t4 = t2.peekChar$1(-1); - t4 = t4 === 32 || t4 === 9 || t4 === 10 || t4 === 13 || t4 === 12; - } else - t4 = true; - else - t4 = false; - if (t4) - addSingleExpression.call$1(_this._stylesheet0$_number$0()); - else if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) - addSingleExpression.call$1(_this.identifierLike$0()); - else if (_box_0.singleExpression_ == null) - addSingleExpression.call$1(_this._stylesheet0$_unaryOperation$0()); - else { - t2.readChar$0(); - addOperator.call$1(B.BinaryOperator_SjO0); - } - continue; - } - _3_32 = 47 === _3_0; - if (_3_32 && _box_0.singleExpression_ == null) { - addSingleExpression.call$1(_this._stylesheet0$_unaryOperation$0()); - continue; - } - if (_3_32) { - t2.readChar$0(); - addOperator.call$1(B.BinaryOperator_U770); - continue; - } - if (37 === _3_0) { - t2.readChar$0(); - addOperator.call$1(B.BinaryOperator_KNx0); - continue; - } - if (_3_0 >= 48 && _3_0 <= 57) { - addSingleExpression.call$1(_this._stylesheet0$_number$0()); - continue; - } - _3_40 = 46 === _3_0; - if (_3_40 && t2.peekChar$1(1) === 46) - break; - if (_3_40) { - addSingleExpression.call$1(_this._stylesheet0$_number$0()); - continue; - } - if (97 === _3_0 && !_this.get$plainCss() && _this.scanIdentifier$1("and")) { - addOperator.call$1(B.BinaryOperator_eDt0); - continue; - } - if (111 === _3_0 && !_this.get$plainCss() && _this.scanIdentifier$1("or")) { - addOperator.call$1(B.BinaryOperator_qNM0); - continue; - } - if ((117 === _3_0 || 85 === _3_0) && t2.peekChar$1(1) === 43) { - addSingleExpression.call$1(_this._stylesheet0$_unicodeRange$0()); - continue; - } - if (!(_3_0 >= 97 && _3_0 <= 122)) - t4 = _3_0 >= 65 && _3_0 <= 90 || 95 === _3_0 || 92 === _3_0 || _3_0 >= 128; - else - t4 = true; - if (t4) { - addSingleExpression.call$1(_this.identifierLike$0()); - continue; - } - if (44 === _3_0) { - if (_this._stylesheet0$_inParentheses) { - _this._stylesheet0$_inParentheses = false; - if (_box_0.allowSlash) { - resetState.call$0(); - continue; - } - } - commaExpressions = _box_0.commaExpressions_; - if (commaExpressions == null) - commaExpressions = _box_0.commaExpressions_ = A._setArrayType([], t3); - if (_box_0.singleExpression_ == null) - t2.error$1(0, _s20_); - resolveSpaceExpressions.call$0(); - t4 = _box_0.singleExpression_; - t4.toString; - commaExpressions.push(t4); - t2.readChar$0(); - _box_0.allowSlash = true; - _box_0.singleExpression_ = null; - continue; - } - break; - } - if (bracketList) - t2.expectChar$1(93); - commaExpressions = _box_0.commaExpressions_; - spaceExpressions = _box_0.spaceExpressions_; - if (commaExpressions != null) { - resolveSpaceExpressions.call$0(); - _this._stylesheet0$_inParentheses = wasInParentheses; - singleExpression = _box_0.singleExpression_; - if (singleExpression != null) - commaExpressions.push(singleExpression); - _this._stylesheet0$_inExpression = wasInExpression; - t1 = t2.spanFrom$1(beforeBracket == null ? start : beforeBracket); - return new A.ListExpression0(A.List_List$unmodifiable(commaExpressions, type$.Expression_2), B.ListSeparator_ECn0, bracketList, t1); - } else if (bracketList && spaceExpressions != null) { - resolveOperations.call$0(); - _this._stylesheet0$_inExpression = wasInExpression; - t1 = _box_0.singleExpression_; - t1.toString; - spaceExpressions.push(t1); - beforeBracket.toString; - t2 = t2.spanFrom$1(beforeBracket); - return new A.ListExpression0(A.List_List$unmodifiable(spaceExpressions, type$.Expression_2), B.ListSeparator_nbm0, true, t2); - } else { - resolveSpaceExpressions.call$0(); - if (bracketList) { - t1 = _box_0.singleExpression_; - t1.toString; - t3 = A._setArrayType([t1], t3); - beforeBracket.toString; - t2 = t2.spanFrom$1(beforeBracket); - _box_0.singleExpression_ = new A.ListExpression0(A.List_List$unmodifiable(t3, type$.Expression_2), B.ListSeparator_undecided_null_undecided0, true, t2); - } - _this._stylesheet0$_inExpression = wasInExpression; - t1 = _box_0.singleExpression_; - t1.toString; - return t1; - } - }, - _stylesheet0$_expression$2$singleEquals$until(singleEquals, until) { - return this._stylesheet0$_expression$3$bracketList$singleEquals$until(false, singleEquals, until); - }, - _stylesheet0$_expression$1$bracketList(bracketList) { - return this._stylesheet0$_expression$3$bracketList$singleEquals$until(bracketList, false, null); - }, - _stylesheet0$_expression$0() { - return this._stylesheet0$_expression$3$bracketList$singleEquals$until(false, false, null); - }, - _stylesheet0$_expression$1$until(until) { - return this._stylesheet0$_expression$3$bracketList$singleEquals$until(false, false, until); - }, - expressionUntilComma$1$singleEquals(singleEquals) { - return this._stylesheet0$_expression$2$singleEquals$until(singleEquals, new A.StylesheetParser_expressionUntilComma_closure0(this)); - }, - expressionUntilComma$0() { - return this.expressionUntilComma$1$singleEquals(false); - }, - _stylesheet0$_isSlashOperand$1(expression) { - var t1 = true; - if (!(expression instanceof A.NumberExpression0)) - if (!(expression instanceof A.FunctionExpression0)) - t1 = expression instanceof A.BinaryOperationExpression0 && expression.allowsSlash; - return t1; - }, - _stylesheet0$_singleExpression$0() { - var next, t2, _this = this, - _s20_ = "Expected expression.", - t1 = _this.scanner, - _0_0 = t1.peekChar$0(); - $label0$0: { - if (_0_0 == null) - t1.error$1(0, _s20_); - if (40 === _0_0) { - t1 = _this.parentheses$0(); - break $label0$0; - } - if (47 === _0_0) { - t1 = _this._stylesheet0$_unaryOperation$0(); - break $label0$0; - } - if (46 === _0_0) { - t1 = _this._stylesheet0$_number$0(); - break $label0$0; - } - if (91 === _0_0) { - t1 = _this._stylesheet0$_expression$1$bracketList(true); - break $label0$0; - } - if (36 === _0_0) { - t1 = _this._stylesheet0$_variable$0(); - break $label0$0; - } - if (38 === _0_0) { - t1 = _this._stylesheet0$_selector$0(); - break $label0$0; - } - if (39 === _0_0 || 34 === _0_0) { - t1 = _this.interpolatedString$0(); - break $label0$0; - } - if (35 === _0_0) { - t1 = _this._stylesheet0$_hashExpression$0(); - break $label0$0; - } - if (43 === _0_0) { - next = t1.peekChar$1(1); - t1 = next != null && next >= 48 && next <= 57 || next === 46 ? _this._stylesheet0$_number$0() : _this._stylesheet0$_unaryOperation$0(); - break $label0$0; - } - if (45 === _0_0) { - t1 = _this._stylesheet0$_minusExpression$0(); - break $label0$0; - } - if (33 === _0_0) { - t1 = _this._stylesheet0$_importantExpression$0(); - break $label0$0; - } - if ((117 === _0_0 || 85 === _0_0) && t1.peekChar$1(1) === 43) { - t1 = _this._stylesheet0$_unicodeRange$0(); - break $label0$0; - } - if (_0_0 >= 48 && _0_0 <= 57) { - t1 = _this._stylesheet0$_number$0(); - break $label0$0; - } - if (!(_0_0 >= 97 && _0_0 <= 122)) - t2 = _0_0 >= 65 && _0_0 <= 90 || 95 === _0_0 || 92 === _0_0 || _0_0 >= 128; - else - t2 = true; - if (t2) { - t1 = _this.identifierLike$0(); - break $label0$0; - } - t1 = t1.error$1(0, _s20_); - } - return t1; - }, - parentheses$0() { - var start, first, expressions, t1, t2, _this = this, - wasInParentheses = _this._stylesheet0$_inParentheses; - _this._stylesheet0$_inParentheses = true; - try { - t1 = _this.scanner; - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$1(40); - _this.whitespace$0(); - if (!_this._stylesheet0$_lookingAtExpression$0()) { - t1.expectChar$1(41); - t2 = A._setArrayType([], type$.JSArray_Expression_2); - t1 = t1.spanFrom$1(start); - t2 = A.List_List$unmodifiable(t2, type$.Expression_2); - return new A.ListExpression0(t2, B.ListSeparator_undecided_null_undecided0, false, t1); - } - first = _this.expressionUntilComma$0(); - if (t1.scanChar$1(58)) { - _this.whitespace$0(); - t1 = _this._stylesheet0$_map$2(first, start); - return t1; - } - if (!t1.scanChar$1(44)) { - t1.expectChar$1(41); - t1 = t1.spanFrom$1(start); - return new A.ParenthesizedExpression0(first, t1); - } - _this.whitespace$0(); - expressions = A._setArrayType([first], type$.JSArray_Expression_2); - for (; true;) { - if (!_this._stylesheet0$_lookingAtExpression$0()) - break; - J.add$1$ax(expressions, _this.expressionUntilComma$0()); - if (!t1.scanChar$1(44)) - break; - _this.whitespace$0(); - } - t1.expectChar$1(41); - t1 = t1.spanFrom$1(start); - t2 = A.List_List$unmodifiable(expressions, type$.Expression_2); - return new A.ListExpression0(t2, B.ListSeparator_ECn0, false, t1); - } finally { - _this._stylesheet0$_inParentheses = wasInParentheses; - } - }, - _stylesheet0$_map$2(first, start) { - var t1, key, _this = this, - pairs = A._setArrayType([new A._Record_2(first, _this.expressionUntilComma$0())], type$.JSArray_Record_2_Expression_and_Expression_2); - for (t1 = _this.scanner; t1.scanChar$1(44);) { - _this.whitespace$0(); - if (!_this._stylesheet0$_lookingAtExpression$0()) - break; - key = _this.expressionUntilComma$0(); - t1.expectChar$1(58); - _this.whitespace$0(); - pairs.push(new A._Record_2(key, _this.expressionUntilComma$0())); - } - t1.expectChar$1(41); - t1 = t1.spanFrom$1(start); - return new A.MapExpression0(A.List_List$unmodifiable(pairs, type$.Record_2_Expression_and_Expression_2), t1); - }, - _stylesheet0$_hashExpression$0() { - var start, t2, identifier, buffer, t3, _this = this, - t1 = _this.scanner; - if (t1.peekChar$1(1) === 123) - return _this.identifierLike$0(); - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$1(35); - t2 = t1.peekChar$0(); - if (t2 == null) - t2 = null; - else - t2 = t2 >= 48 && t2 <= 57; - if (t2 === true) - return new A.ColorExpression0(_this._stylesheet0$_hexColorContents$1(start), t1.spanFrom$1(start)); - t2 = t1._string_scanner$_position; - identifier = _this.interpolatedIdentifier$0(); - if (_this._stylesheet0$_isHexColor$1(identifier)) { - t1.set$state(new A._SpanScannerState(t1, t2)); - return new A.ColorExpression0(_this._stylesheet0$_hexColorContents$1(start), t1.spanFrom$1(start)); - } - t2 = new A.StringBuffer(""); - buffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t3 = A.Primitives_stringFromCharCode(35); - t2._contents += t3; - buffer.addInterpolation$1(identifier); - return new A.StringExpression0(buffer.interpolation$1(t1.spanFrom$1(start)), false); - }, - _stylesheet0$_hexColorContents$1(start) { - var red, green, blue, alpha, digit4, t2, t3, t4, _this = this, - digit1 = _this._stylesheet0$_hexDigit$0(), - digit2 = _this._stylesheet0$_hexDigit$0(), - digit3 = _this._stylesheet0$_hexDigit$0(), - t1 = _this.scanner, - $self = t1.peekChar$0(); - if (!($self != null && A.CharacterExtension_get_isHex0($self))) { - red = (digit1 << 4 >>> 0) + digit1; - green = (digit2 << 4 >>> 0) + digit2; - blue = (digit3 << 4 >>> 0) + digit3; - alpha = null; - } else { - digit4 = _this._stylesheet0$_hexDigit$0(); - $self = t1.peekChar$0(); - t2 = $self != null && A.CharacterExtension_get_isHex0($self); - t3 = digit1 << 4 >>> 0; - t4 = digit3 << 4 >>> 0; - if (!t2) { - red = t3 + digit1; - green = (digit2 << 4 >>> 0) + digit2; - blue = t4 + digit3; - alpha = ((digit4 << 4 >>> 0) + digit4) / 255; - } else { - red = t3 + digit2; - green = t4 + digit4; - blue = (_this._stylesheet0$_hexDigit$0() << 4 >>> 0) + _this._stylesheet0$_hexDigit$0(); - $self = t1.peekChar$0(); - alpha = $self != null && A.CharacterExtension_get_isHex0($self) ? ((_this._stylesheet0$_hexDigit$0() << 4 >>> 0) + _this._stylesheet0$_hexDigit$0()) / 255 : null; - } - } - t2 = alpha == null; - t3 = t2 ? 1 : alpha; - return A.SassColor_SassColor$rgbInternal0(red, green, blue, t3, t2 ? new A.SpanColorFormat0(t1.spanFrom$1(start)) : null); - }, - _stylesheet0$_isHexColor$1(interpolation) { - var _0_2, t1, - plain = interpolation.get$asPlain(); - if (typeof plain == "string") { - _0_2 = plain.length; - t1 = true; - if (3 !== _0_2) - if (4 !== _0_2) - if (6 !== _0_2) - t1 = 8 === _0_2; - } else - t1 = false; - if (t1) { - t1 = new A.CodeUnits(plain); - return t1.every$1(t1, new A.StylesheetParser__isHexColor_closure0()); - } else - return false; - }, - _stylesheet0$_hexDigit$0() { - var t1 = this.scanner, - t2 = t1.peekChar$0(); - t2 = t2 == null ? null : A.CharacterExtension_get_isHex0(t2); - return t2 === true ? A.asHex0(t1.readChar$0()) : t1.error$1(0, "Expected hex digit."); - }, - _stylesheet0$_minusExpression$0() { - var _this = this, - _0_0 = _this.scanner.peekChar$1(1); - if (A._isInt(_0_0) && _0_0 >= 48 && _0_0 <= 57 || 46 === _0_0) - return _this._stylesheet0$_number$0(); - if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) - return _this.identifierLike$0(); - return _this._stylesheet0$_unaryOperation$0(); - }, - _stylesheet0$_importantExpression$0() { - var t1 = this.scanner, - t2 = t1._string_scanner$_position; - t1.readChar$0(); - this.whitespace$0(); - this.expectIdentifier$1("important"); - t2 = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); - return new A.StringExpression0(new A.Interpolation0(A.List_List$unmodifiable(["!important"], type$.Object), B.List_null, t2), false); - }, - _stylesheet0$_unaryOperation$0() { - var _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - operator = _this._stylesheet0$_unaryOperatorFor$1(t1.readChar$0()); - if (operator == null) - t1.error$2$position(0, "Expected unary operator.", t1._string_scanner$_position - 1); - else if (_this.get$plainCss() && operator !== B.UnaryOperator_SJr0) - t1.error$3$length$position(0, "Operators aren't allowed in plain CSS.", 1, t1._string_scanner$_position - 1); - _this.whitespace$0(); - return new A.UnaryOperationExpression0(operator, _this._stylesheet0$_singleExpression$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _stylesheet0$_unaryOperatorFor$1(character) { - var t1; - $label0$0: { - if (43 === character) { - t1 = B.UnaryOperator_cLp0; - break $label0$0; - } - if (45 === character) { - t1 = B.UnaryOperator_AiQ0; - break $label0$0; - } - if (47 === character) { - t1 = B.UnaryOperator_SJr0; - break $label0$0; - } - t1 = null; - break $label0$0; - } - return t1; - }, - _stylesheet0$_number$0() { - var number, unit, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - first = t1.peekChar$0(), - t3 = first !== 43; - if (!t3 || first === 45) - t1.readChar$0(); - if (t1.peekChar$0() !== 46) - _this._stylesheet0$_consumeNaturalNumber$0(); - _this._stylesheet0$_tryDecimal$1$allowTrailingDot(t1._string_scanner$_position !== t2 && t3 && first !== 45); - _this._stylesheet0$_tryExponent$0(); - number = A.double_parse(t1.substring$1(0, t2)); - if (t1.scanChar$1(37)) - unit = "%"; - else { - if (_this.lookingAtIdentifier$0()) - t3 = t1.peekChar$0() !== 45 || t1.peekChar$1(1) !== 45; - else - t3 = false; - unit = t3 ? _this.identifier$1$unit(true) : null; - } - return new A.NumberExpression0(number, unit, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _stylesheet0$_consumeNaturalNumber$0() { - var $self, - t1 = this.scanner, - t2 = t1.readChar$0(); - if (!(t2 >= 48 && t2 <= 57)) - t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position - 1); - while (true) { - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - break; - t1.readChar$0(); - } - }, - _stylesheet0$_tryDecimal$1$allowTrailingDot(allowTrailingDot) { - var $self, - t1 = this.scanner; - if (t1.peekChar$0() !== 46) - return; - $self = t1.peekChar$1(1); - if (!($self != null && $self >= 48 && $self <= 57)) { - if (allowTrailingDot) - return; - t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position + 1); - } - t1.readChar$0(); - while (true) { - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - break; - t1.readChar$0(); - } - }, - _stylesheet0$_tryExponent$0() { - var next, $self, - t1 = this.scanner, - first = t1.peekChar$0(); - if (first !== 101 && first !== 69) - return; - next = t1.peekChar$1(1); - if (!(next != null && next >= 48 && next <= 57) && next !== 45 && next !== 43) - return; - t1.readChar$0(); - if (43 === next || 45 === next) - t1.readChar$0(); - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - t1.error$1(0, "Expected digit."); - while (true) { - $self = t1.peekChar$0(); - if (!($self != null && $self >= 48 && $self <= 57)) - break; - t1.readChar$0(); - } - }, - _stylesheet0$_unicodeRange$0() { - var firstRangeLength, hasQuestionMark, t2, secondRangeLength, _this = this, - _s26_ = "Expected at most 6 digits.", - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - _this.expectIdentChar$1(117); - t1.expectChar$1(43); - for (firstRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure1());) - ++firstRangeLength; - for (hasQuestionMark = false; t1.scanChar$1(63); hasQuestionMark = true) - ++firstRangeLength; - if (firstRangeLength === 0) - t1.error$1(0, 'Expected hex digit or "?".'); - else if (firstRangeLength > 6) - _this.error$2(0, _s26_, t1.spanFrom$1(start)); - else if (hasQuestionMark) { - t2 = t1.substring$1(0, start.position); - t1 = t1.spanFrom$1(start); - return new A.StringExpression0(new A.Interpolation0(A.List_List$unmodifiable([t2], type$.Object), B.List_null, t1), false); - } - if (t1.scanChar$1(45)) { - t2 = t1._string_scanner$_position; - for (secondRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure2());) - ++secondRangeLength; - if (secondRangeLength === 0) - t1.error$1(0, "Expected hex digit."); - else if (secondRangeLength > 6) - _this.error$2(0, _s26_, t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - } - if (_this._stylesheet0$_lookingAtInterpolatedIdentifierBody$0()) - t1.error$1(0, "Expected end of identifier."); - t2 = t1.substring$1(0, start.position); - t1 = t1.spanFrom$1(start); - return new A.StringExpression0(new A.Interpolation0(A.List_List$unmodifiable([t2], type$.Object), B.List_null, t1), false); - }, - _stylesheet0$_variable$0() { - var _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - $name = _this.variableName$0(); - if (_this.get$plainCss()) - _this.error$2(0, string$.Sassx20v, t1.spanFrom$1(start)); - return new A.VariableExpression0(null, $name, t1.spanFrom$1(start)); - }, - _stylesheet0$_selector$0() { - var t1, start, _this = this; - if (_this.get$plainCss()) - _this.scanner.error$2$length(0, string$.The_pa, 1); - t1 = _this.scanner; - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - t1.expectChar$1(38); - if (t1.scanChar$1(38)) { - _this.warnings.push(new A._Record_3_deprecation_message_span(null, string$.In_Sas, t1.spanFrom$1(start))); - t1.set$position(t1._string_scanner$_position - 1); - } - return new A.SelectorExpression0(t1.spanFrom$1(start)); - }, - interpolatedString$0() { - var t3, t4, t5, buffer, _1_0, second, t6, _0_0, - t1 = this.scanner, - t2 = t1._string_scanner$_position, - quote = t1.readChar$0(); - if (quote !== 39 && quote !== 34) - t1.error$2$position(0, "Expected string.", t2); - t3 = new A.StringBuffer(""); - t4 = A._setArrayType([], type$.JSArray_Object); - t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); - buffer = new A.InterpolationBuffer0(t3, t4, t5); - for (; true;) { - _1_0 = t1.peekChar$0(); - if (_1_0 === quote) { - t1.readChar$0(); - break; - } - if (_1_0 == null || _1_0 === 10 || _1_0 === 13 || _1_0 === 12) - t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); - if (92 === _1_0) { - second = t1.peekChar$1(1); - if (second === 10 || second === 13 || second === 12) { - t1.readChar$0(); - t1.readChar$0(); - if (second === 13) - t1.scanChar$1(10); - } else { - t6 = A.Primitives_stringFromCharCode(A.consumeEscapedCharacter0(t1)); - t3._contents += t6; - } - continue; - } - if (35 === _1_0 && t1.peekChar$1(1) === 123) { - _0_0 = this.singleInterpolation$0(); - buffer._interpolation_buffer0$_flushText$0(); - t4.push(_0_0._0); - t5.push(_0_0._1); - continue; - } - t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t6; - } - return new A.StringExpression0(buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))), true); - }, - identifierLike$0() { - var invocation, expression, _0_0, t3, t4, t5, _1_0, _2_0, _2_2, _2_4, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - identifier = _this.interpolatedIdentifier$0(), - plain = identifier.get$asPlain(), - lower = A._Cell$(), - t2 = plain != null; - if (t2) { - if (plain === "if" && t1.peekChar$0() === 40) { - invocation = _this._stylesheet0$_argumentInvocation$0(); - return new A.IfExpression0(invocation, identifier.span.expand$1(0, invocation.span)); - } else if (plain === "not") { - _this.whitespace$0(); - expression = _this._stylesheet0$_singleExpression$0(); - return new A.UnaryOperationExpression0(B.UnaryOperator_not_not_not0, expression, identifier.span.expand$1(0, expression.get$span(expression))); - } - lower.__late_helper$_value = plain.toLowerCase(); - if (t1.peekChar$0() !== 40) { - switch (plain) { - case "false": - return new A.BooleanExpression0(false, identifier.span); - case "null": - return new A.NullExpression0(identifier.span); - case "true": - return new A.BooleanExpression0(true, identifier.span); - } - _0_0 = $.$get$colorsByName0().$index(0, lower._readLocal$0()); - if (_0_0 != null) { - t1 = B.JSNumber_methods.round$0(_0_0._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "red")); - t2 = B.JSNumber_methods.round$0(_0_0._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "green")); - t3 = B.JSNumber_methods.round$0(_0_0._color0$_legacyChannel$2(B.RgbColorSpace_mlz0, "blue")); - t4 = _0_0.alphaOrNull; - if (t4 == null) - t4 = 0; - t5 = identifier.span; - return new A.ColorExpression0(A.SassColor_SassColor$rgbInternal0(t1, t2, t3, t4, new A.SpanColorFormat0(t5)), t5); - } - } - _1_0 = _this.trySpecialFunction$2(lower._readLocal$0(), start); - if (_1_0 != null) - return _1_0; - } - _2_0 = t1.peekChar$0(); - _2_2 = 46 === _2_0; - if (_2_2 && t1.peekChar$1(1) === 46) - return new A.StringExpression0(identifier, false); - if (_2_2) { - t1.readChar$0(); - if (t2) - return _this.namespacedExpression$2(plain, start); - _this.error$2(0, string$.Interpn, identifier.span); - } - _2_4 = 40 === _2_0; - if (_2_4 && t2) { - t2 = _this._stylesheet0$_argumentInvocation$1$allowEmptySecondArg(J.$eq$(lower._readLocal$0(), "var")); - t1 = t1.spanFrom$1(start); - return new A.FunctionExpression0(null, A.stringReplaceAllUnchecked(plain, "_", "-"), plain, t2, t1); - } - if (_2_4) - return new A.InterpolatedFunctionExpression0(identifier, _this._stylesheet0$_argumentInvocation$0(), t1.spanFrom$1(start)); - return new A.StringExpression0(identifier, false); - }, - namespacedExpression$2(namespace, start) { - var $name, t2, t3, _this = this, - t1 = _this.scanner; - if (t1.peekChar$0() === 36) { - $name = _this.variableName$0(); - _this._stylesheet0$_assertPublic$2($name, new A.StylesheetParser_namespacedExpression_closure0(_this, start)); - return new A.VariableExpression0(namespace, $name, t1.spanFrom$1(start)); - } - t2 = _this._stylesheet0$_publicIdentifier$0(); - t3 = _this._stylesheet0$_argumentInvocation$0(); - t1 = t1.spanFrom$1(start); - return new A.FunctionExpression0(namespace, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, t3, t1); - }, - trySpecialFunction$2($name, start) { - var t1, buffer, t2, next, t3, _this = this, - normalized = A.unvendor0($name); - $label0$0: { - if (!("calc" === normalized && normalized !== $name && _this.scanner.scanChar$1(40))) - t1 = ("element" === normalized || "expression" === normalized) && _this.scanner.scanChar$1(40); - else - t1 = true; - if (t1) { - t1 = new A.StringBuffer(""); - buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t1._contents = "" + $name; - t2 = A.Primitives_stringFromCharCode(40); - t1._contents += t2; - break $label0$0; - } - if ("progid" === normalized && _this.scanner.scanChar$1(58)) { - t1 = new A.StringBuffer(""); - buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t1._contents = "" + $name; - t2 = A.Primitives_stringFromCharCode(58); - t1._contents += t2; - t2 = _this.scanner; - next = t2.peekChar$0(); - while (true) { - if (next != null) { - if (!(next >= 97 && next <= 122)) - t3 = next >= 65 && next <= 90; - else - t3 = true; - t3 = t3 || next === 46; - } else - t3 = false; - if (!t3) - break; - t3 = A.Primitives_stringFromCharCode(t2.readChar$0()); - t1._contents += t3; - next = t2.peekChar$0(); - } - t2.expectChar$1(40); - t2 = A.Primitives_stringFromCharCode(40); - t1._contents += t2; - break $label0$0; - } - if ("url" === normalized) - return A.NullableExtension_andThen0(_this._stylesheet0$_tryUrlContents$1(start), new A.StylesheetParser_trySpecialFunction_closure0()); - return null; - } - buffer.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$1$allowEmpty(true)); - t1 = _this.scanner; - t1.expectChar$1(41); - t2 = buffer._interpolation_buffer0$_text; - t3 = A.Primitives_stringFromCharCode(41); - t2._contents += t3; - return new A.StringExpression0(buffer.interpolation$1(t1.spanFrom$1(start)), false); - }, - _stylesheet0$_tryUrlContents$2$name(start, $name) { - var t3, t4, t5, buffer, t6, _1_0, _1_6, _0_0, endPosition, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - if (!t1.scanChar$1(40)) - return null; - _this.whitespaceWithoutComments$0(); - t3 = new A.StringBuffer(""); - t4 = A._setArrayType([], type$.JSArray_Object); - t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); - buffer = new A.InterpolationBuffer0(t3, t4, t5); - t3._contents = "" + ($name == null ? "url" : $name); - t6 = A.Primitives_stringFromCharCode(40); - t3._contents += t6; - for (; true;) { - _1_0 = t1.peekChar$0(); - if (_1_0 == null) - break; - if (92 === _1_0) { - t6 = _this.escape$0(); - t3._contents += t6; - continue; - } - _1_6 = 35 === _1_0; - if (_1_6 && t1.peekChar$1(1) === 123) { - _0_0 = _this.singleInterpolation$0(); - buffer._interpolation_buffer0$_flushText$0(); - t4.push(_0_0._0); - t5.push(_0_0._1); - continue; - } - t6 = true; - if (33 !== _1_0) - if (37 !== _1_0) - if (38 !== _1_0) - if (!_1_6) - t6 = _1_0 >= 42 && _1_0 <= 126 || _1_0 >= 128; - if (t6) { - t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t6; - continue; - } - if (_1_0 === 32 || _1_0 === 9 || _1_0 === 10 || _1_0 === 13 || _1_0 === 12) { - _this.whitespaceWithoutComments$0(); - if (t1.peekChar$0() !== 41) - break; - continue; - } - if (41 === _1_0) { - t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t2; - endPosition = t1._string_scanner$_position; - t2 = t1._sourceFile; - t3 = start.position; - t1 = new A._FileSpan(t2, t3, endPosition); - t1._FileSpan$3(t2, t3, endPosition); - return buffer.interpolation$1(t1); - } - break; - } - t1.set$state(new A._SpanScannerState(t1, t2)); - return null; - }, - _stylesheet0$_tryUrlContents$1(start) { - return this._stylesheet0$_tryUrlContents$2$name(start, null); - }, - dynamicUrl$0() { - var _0_0, t2, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - _this.expectIdentifier$1("url"); - _0_0 = _this._stylesheet0$_tryUrlContents$1(start); - if (_0_0 != null) - return new A.StringExpression0(_0_0, false); - t2 = t1.spanFrom$1(start); - return new A.InterpolatedFunctionExpression0(new A.Interpolation0(A.List_List$unmodifiable(["url"], type$.Object), B.List_null, t2), _this._stylesheet0$_argumentInvocation$0(), t1.spanFrom$1(start)); - }, - almostAnyValue$1$omitComments(omitComments) { - var t4, t5, t6, _2_0, t7, _0_0, _0_2, start, end, _0_4, identifier, _1_0, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - t3 = new A.StringBuffer(""), - buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - for (t4 = t1.string, t5 = t4.length, t6 = !omitComments; true;) - $label0$0: { - _2_0 = t1.peekChar$0(); - if (92 === _2_0) { - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t7; - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t7; - break $label0$0; - } - if (34 === _2_0 || 39 === _2_0) { - buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); - break $label0$0; - } - if (47 === _2_0) { - $label1$1: { - _0_0 = t1.peekChar$1(1); - _0_2 = 42 === _0_0; - if (_0_2 && t6) { - t7 = _this.get$loudComment(); - start = t1._string_scanner$_position; - t7.call$0(); - end = t1._string_scanner$_position; - t3._contents += B.JSString_methods.substring$2(t4, start, end); - break $label1$1; - } - if (_0_2) { - _this.loudComment$0(); - break $label1$1; - } - _0_4 = 47 === _0_0; - if (_0_4 && t6) { - t7 = _this.get$silentComment(); - start = t1._string_scanner$_position; - t7.call$0(); - end = t1._string_scanner$_position; - t3._contents += B.JSString_methods.substring$2(t4, start, end); - break $label1$1; - } - if (_0_4) { - _this.silentComment$0(); - break $label1$1; - } - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t7; - } - break $label0$0; - } - if (35 === _2_0 && t1.peekChar$1(1) === 123) { - buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); - break $label0$0; - } - if (13 === _2_0 || 10 === _2_0 || 12 === _2_0) { - if (_this.get$indented()) - break; - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t7; - break $label0$0; - } - if (33 === _2_0 || 59 === _2_0 || 123 === _2_0 || 125 === _2_0) - break; - if (117 === _2_0 || 85 === _2_0) { - t7 = t1._string_scanner$_position; - identifier = _this.identifier$0(); - if (identifier !== "url" && identifier !== "url-prefix") { - t3._contents += identifier; - continue; - } - _1_0 = _this._stylesheet0$_tryUrlContents$2$name(new A._SpanScannerState(t1, t7), identifier); - if (_1_0 != null) - buffer.addInterpolation$1(_1_0); - else { - if ((t7 === 0 ? 1 / t7 < 0 : t7 < 0) || t7 > t5) - A.throwExpression(A.ArgumentError$("Invalid position " + t7, null)); - t1._string_scanner$_position = t7; - t1._lastMatch = null; - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t7; - } - break $label0$0; - } - if (_2_0 == null) - break; - t7 = _this.lookingAtIdentifier$0(); - if (t7) { - t7 = _this.identifier$0(); - t3._contents += t7; - break $label0$0; - } - t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t7; - } - return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - almostAnyValue$0() { - return this.almostAnyValue$1$omitComments(false); - }, - _stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(allowColon, allowEmpty, allowOpenBrace, allowSemicolon, silentComments) { - var t4, t5, t6, t7, t8, wroteNewline, _2_0, wroteNewline0, t9, _0_0, start, end, _2_14_isSet, _2_14, t10, _2_18_isSet, _2_20, _2_18, _2_20_isSet, _2_22, bracket, identifier, _1_0, _this = this, _null = null, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - t3 = new A.StringBuffer(""), - buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), - brackets = A._setArrayType([], type$.JSArray_int); - for (t4 = !allowOpenBrace, t5 = t1.string, t6 = t5.length, t7 = !allowColon, t8 = !allowSemicolon, wroteNewline = false; true;) - $label0$0: { - _2_0 = t1.peekChar$0(); - wroteNewline0 = false; - if (92 === _2_0) { - t9 = _this.escape$1$identifierStart(true); - t3._contents += t9; - wroteNewline = wroteNewline0; - break $label0$0; - } - if (34 === _2_0 || 39 === _2_0) { - buffer.addInterpolation$1(_this.interpolatedString$0().asInterpolation$0()); - wroteNewline = wroteNewline0; - break $label0$0; - } - if (47 === _2_0) { - $label1$1: { - _0_0 = t1.peekChar$1(1); - if (42 === _0_0) { - t9 = _this.get$loudComment(); - start = t1._string_scanner$_position; - t9.call$0(); - end = t1._string_scanner$_position; - t3._contents += B.JSString_methods.substring$2(t5, start, end); - break $label1$1; - } - if (47 === _0_0 && silentComments) { - _this.silentComment$0(); - break $label1$1; - } - t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t9; - } - wroteNewline = wroteNewline0; - break $label0$0; - } - if (35 === _2_0 && t1.peekChar$1(1) === 123) { - buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); - wroteNewline = wroteNewline0; - break $label0$0; - } - _2_14_isSet = 32 !== _2_0; - if (_2_14_isSet) { - _2_14 = 9 === _2_0; - t9 = _2_14; - } else { - _2_14 = _null; - t9 = true; - } - t10 = false; - if (t9) - if (!wroteNewline) { - t9 = t1.peekChar$1(1); - t9 = t9 === 32 || t9 === 9 || t9 === 10 || t9 === 13 || t9 === 12; - } else - t9 = t10; - else - t9 = t10; - if (t9) { - t1.readChar$0(); - break $label0$0; - } - if (_2_14_isSet) - t9 = _2_14; - else - t9 = true; - if (t9) { - t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t9; - break $label0$0; - } - _2_18_isSet = 10 !== _2_0; - _2_20 = _null; - t9 = true; - if (_2_18_isSet) { - _2_18 = 13 === _2_0; - _2_20_isSet = !_2_18; - if (_2_20_isSet) { - _2_20 = 12 === _2_0; - t9 = _2_20; - } - } else { - _2_18 = _null; - _2_20_isSet = false; - } - if (t9 && _this.get$indented()) - break; - t9 = true; - if (_2_18_isSet) - if (!_2_18) - t9 = _2_20_isSet ? _2_20 : 12 === _2_0; - if (t9) { - t9 = t1.peekChar$1(-1); - if (!(t9 === 10 || t9 === 13 || t9 === 12)) - t3._contents += "\n"; - t1.readChar$0(); - wroteNewline = true; - break $label0$0; - } - _2_22 = 123 === _2_0; - if (_2_22 && t4) - break; - if (40 !== _2_0) - t9 = _2_22 || 91 === _2_0; - else - t9 = true; - if (t9) { - bracket = t1.readChar$0(); - t9 = A.Primitives_stringFromCharCode(bracket); - t3._contents += t9; - brackets.push(A.opposite0(bracket)); - wroteNewline = wroteNewline0; - break $label0$0; - } - if (41 === _2_0 || 125 === _2_0 || 93 === _2_0) { - if (brackets.length === 0) - break; - bracket = brackets.pop(); - t1.expectChar$1(bracket); - t9 = A.Primitives_stringFromCharCode(bracket); - t3._contents += t9; - wroteNewline = wroteNewline0; - break $label0$0; - } - if (59 === _2_0) { - if (t8 && brackets.length === 0) - break; - t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t9; - wroteNewline = wroteNewline0; - break $label0$0; - } - if (58 === _2_0) { - if (t7 && brackets.length === 0) - break; - t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t9; - wroteNewline = wroteNewline0; - break $label0$0; - } - if (117 === _2_0 || 85 === _2_0) { - t9 = t1._string_scanner$_position; - identifier = _this.identifier$0(); - if (identifier !== "url" && identifier !== "url-prefix") { - t3._contents += identifier; - wroteNewline = wroteNewline0; - continue; - } - _1_0 = _this._stylesheet0$_tryUrlContents$2$name(new A._SpanScannerState(t1, t9), identifier); - if (_1_0 != null) - buffer.addInterpolation$1(_1_0); - else { - if ((t9 === 0 ? 1 / t9 < 0 : t9 < 0) || t9 > t6) - A.throwExpression(A.ArgumentError$("Invalid position " + t9, _null)); - t1._string_scanner$_position = t9; - t1._lastMatch = null; - t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t9; - } - wroteNewline = wroteNewline0; - break $label0$0; - } - if (_2_0 == null) - break; - t9 = _this.lookingAtIdentifier$0(); - if (t9) { - t9 = _this.identifier$0(); - t3._contents += t9; - wroteNewline = wroteNewline0; - break $label0$0; - } - t9 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t3._contents += t9; - wroteNewline = wroteNewline0; - } - if (brackets.length !== 0) - t1.expectChar$1(B.JSArray_methods.get$last(brackets)); - if (!allowEmpty && buffer._interpolation_buffer0$_contents.length === 0 && t3._contents.length === 0) - t1.error$1(0, "Expected token."); - return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _stylesheet0$_interpolatedDeclarationValue$1$allowEmpty(allowEmpty) { - return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, allowEmpty, true, false, true); - }, - _stylesheet0$_interpolatedDeclarationValue$1$allowOpenBrace(allowOpenBrace) { - return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, false, allowOpenBrace, false, true); - }, - _stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(allowEmpty, allowSemicolon) { - return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, allowEmpty, true, allowSemicolon, true); - }, - _stylesheet0$_interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(allowColon, allowEmpty, allowSemicolon) { - return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(allowColon, allowEmpty, true, allowSemicolon, true); - }, - _stylesheet0$_interpolatedDeclarationValue$0() { - return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, false, true, false, true); - }, - _stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowOpenBrace(allowEmpty, allowOpenBrace) { - return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, allowEmpty, allowOpenBrace, false, true); - }, - _stylesheet0$_interpolatedDeclarationValue$1$silentComments(silentComments) { - return this._stylesheet0$_interpolatedDeclarationValue$5$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$silentComments(true, false, true, false, silentComments); - }, - interpolatedIdentifier$0() { - var t3, _1_0, _0_0, _this = this, - _s20_ = "Expected identifier.", - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - t2 = new A.StringBuffer(""), - buffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - if (t1.scanChar$1(45)) { - t3 = A.Primitives_stringFromCharCode(45); - t2._contents += t3; - if (t1.scanChar$1(45)) { - t3 = A.Primitives_stringFromCharCode(45); - t2._contents += t3; - _this._stylesheet0$_interpolatedIdentifierBody$1(buffer); - return buffer.interpolation$1(t1.spanFrom$1(start)); - } - } - $label0$0: { - _1_0 = t1.peekChar$0(); - if (_1_0 == null) - t1.error$1(0, _s20_); - if (_1_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_1_0) || _1_0 >= 128) { - t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t3; - break $label0$0; - } - if (92 === _1_0) { - t3 = _this.escape$1$identifierStart(true); - t2._contents += t3; - break $label0$0; - } - if (35 === _1_0 && t1.peekChar$1(1) === 123) { - _0_0 = _this.singleInterpolation$0(); - buffer.add$2(0, _0_0._0, _0_0._1); - break $label0$0; - } - t1.error$1(0, _s20_); - } - _this._stylesheet0$_interpolatedIdentifierBody$1(buffer); - return buffer.interpolation$1(t1.spanFrom$1(start)); - }, - _stylesheet0$_interpolatedIdentifierBody$1(buffer) { - var t1, t2, t3, t4, _1_0, t5, _0_0; - for (t1 = buffer._interpolation_buffer0$_contents, t2 = buffer._interpolation_buffer0$_spans, t3 = this.scanner, t4 = buffer._interpolation_buffer0$_text; true;) { - _1_0 = t3.peekChar$0(); - if (_1_0 == null) - break; - t5 = true; - if (95 !== _1_0) - if (45 !== _1_0) { - if (!(_1_0 >= 97 && _1_0 <= 122)) - t5 = _1_0 >= 65 && _1_0 <= 90; - else - t5 = true; - if (!t5) - t5 = _1_0 >= 48 && _1_0 <= 57; - else - t5 = true; - t5 = t5 || _1_0 >= 128; - } - if (t5) { - t5 = A.Primitives_stringFromCharCode(t3.readChar$0()); - t4._contents += t5; - continue; - } - if (92 === _1_0) { - t5 = this.escape$0(); - t4._contents += t5; - continue; - } - if (35 === _1_0 && t3.peekChar$1(1) === 123) { - _0_0 = this.singleInterpolation$0(); - buffer._interpolation_buffer0$_flushText$0(); - t1.push(_0_0._0); - t2.push(_0_0._1); - continue; - } - break; - } - }, - singleInterpolation$0() { - var contents, span, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - t1.expect$1("#{"); - _this.whitespace$0(); - contents = _this._stylesheet0$_expression$0(); - t1.expectChar$1(125); - span = t1.spanFrom$1(new A._SpanScannerState(t1, t2)); - if (_this.get$plainCss()) - _this.error$2(0, string$.Interpp, span); - return new A._Record_2(contents, span); - }, - _stylesheet0$_mediaQueryList$0() { - var t4, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - t3 = new A.StringBuffer(""), - buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - for (; true;) { - _this.whitespace$0(); - _this._stylesheet0$_mediaQuery$1(buffer); - _this.whitespace$0(); - if (!t1.scanChar$1(44)) - break; - t4 = A.Primitives_stringFromCharCode(44); - t3._contents += t4; - t4 = A.Primitives_stringFromCharCode(32); - t3._contents += t4; - } - return buffer.interpolation$1(t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - }, - _stylesheet0$_mediaQuery$1(buffer) { - var identifier1, t1, t2, identifier2, _this = this, _s3_ = "and"; - if (_this.scanner.peekChar$0() === 40) { - _this._stylesheet0$_mediaInParens$1(buffer); - _this.whitespace$0(); - if (_this.scanIdentifier$1(_s3_)) { - buffer._interpolation_buffer0$_text._contents += " and "; - _this.expectWhitespace$0(); - _this._stylesheet0$_mediaLogicSequence$2(buffer, _s3_); - } else if (_this.scanIdentifier$1("or")) { - buffer._interpolation_buffer0$_text._contents += " or "; - _this.expectWhitespace$0(); - _this._stylesheet0$_mediaLogicSequence$2(buffer, "or"); - } - return; - } - identifier1 = _this.interpolatedIdentifier$0(); - if (A.equalsIgnoreCase0(identifier1.get$asPlain(), "not")) { - _this.expectWhitespace$0(); - if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { - buffer._interpolation_buffer0$_text._contents += "not "; - _this._stylesheet0$_mediaOrInterp$1(buffer); - return; - } - } - _this.whitespace$0(); - buffer.addInterpolation$1(identifier1); - if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) - return; - t1 = buffer._interpolation_buffer0$_text; - t2 = A.Primitives_stringFromCharCode(32); - t1._contents += t2; - identifier2 = _this.interpolatedIdentifier$0(); - if (A.equalsIgnoreCase0(identifier2.get$asPlain(), _s3_)) { - _this.expectWhitespace$0(); - t1._contents += " and "; - } else { - _this.whitespace$0(); - buffer.addInterpolation$1(identifier2); - if (_this.scanIdentifier$1(_s3_)) { - _this.expectWhitespace$0(); - t1._contents += " and "; - } else - return; - } - if (_this.scanIdentifier$1("not")) { - _this.expectWhitespace$0(); - t1._contents += "not "; - _this._stylesheet0$_mediaOrInterp$1(buffer); - return; - } - _this._stylesheet0$_mediaLogicSequence$2(buffer, _s3_); - return; - }, - _stylesheet0$_mediaLogicSequence$2(buffer, operator) { - var t1, t2, _this = this; - for (t1 = buffer._interpolation_buffer0$_text; true;) { - _this._stylesheet0$_mediaOrInterp$1(buffer); - _this.whitespace$0(); - if (!_this.scanIdentifier$1(operator)) - return; - _this.expectWhitespace$0(); - t2 = A.Primitives_stringFromCharCode(32); - t2 = t1._contents += t2; - t1._contents = t2 + operator; - t2 = A.Primitives_stringFromCharCode(32); - t1._contents += t2; - } - }, - _stylesheet0$_mediaOrInterp$1(buffer) { - var _0_0; - if (this.scanner.peekChar$0() === 35) { - _0_0 = this.singleInterpolation$0(); - buffer.add$2(0, _0_0._0, _0_0._1); - } else - this._stylesheet0$_mediaInParens$1(buffer); - }, - _stylesheet0$_mediaInParens$1(buffer) { - var t2, t3, expressionBefore, expressionAfter, next, t4, expressionMiddle, _this = this, - t1 = _this.scanner; - t1.expectChar$2$name(40, "media condition in parentheses"); - t2 = buffer._interpolation_buffer0$_text; - t3 = A.Primitives_stringFromCharCode(40); - t2._contents += t3; - _this.whitespace$0(); - if (t1.peekChar$0() === 40) { - _this._stylesheet0$_mediaInParens$1(buffer); - _this.whitespace$0(); - if (_this.scanIdentifier$1("and")) { - t2._contents += " and "; - _this.expectWhitespace$0(); - _this._stylesheet0$_mediaLogicSequence$2(buffer, "and"); - } else if (_this.scanIdentifier$1("or")) { - t2._contents += " or "; - _this.expectWhitespace$0(); - _this._stylesheet0$_mediaLogicSequence$2(buffer, "or"); - } - } else if (_this.scanIdentifier$1("not")) { - t2._contents += "not "; - _this.expectWhitespace$0(); - _this._stylesheet0$_mediaOrInterp$1(buffer); - } else { - expressionBefore = _this._stylesheet0$_expressionUntilComparison$0(); - buffer.add$2(0, expressionBefore, expressionBefore.get$span(expressionBefore)); - if (t1.scanChar$1(58)) { - _this.whitespace$0(); - t3 = A.Primitives_stringFromCharCode(58); - t2._contents += t3; - t3 = A.Primitives_stringFromCharCode(32); - t2._contents += t3; - expressionAfter = _this._stylesheet0$_expression$0(); - buffer.add$2(0, expressionAfter, expressionAfter.get$span(expressionAfter)); - } else { - next = t1.peekChar$0(); - t3 = 60 !== next; - if (!t3 || 62 === next || 61 === next) { - t4 = A.Primitives_stringFromCharCode(32); - t2._contents += t4; - t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); - t2._contents += t4; - if ((!t3 || 62 === next) && t1.scanChar$1(61)) { - t4 = A.Primitives_stringFromCharCode(61); - t2._contents += t4; - } - t4 = A.Primitives_stringFromCharCode(32); - t2._contents += t4; - _this.whitespace$0(); - expressionMiddle = _this._stylesheet0$_expressionUntilComparison$0(); - buffer.add$2(0, expressionMiddle, expressionMiddle.get$span(expressionMiddle)); - if (!t3 || 62 === next) { - next.toString; - t3 = t1.scanChar$1(next); - } else - t3 = false; - if (t3) { - t3 = A.Primitives_stringFromCharCode(32); - t2._contents += t3; - t3 = A.Primitives_stringFromCharCode(next); - t2._contents += t3; - if (t1.scanChar$1(61)) { - t3 = A.Primitives_stringFromCharCode(61); - t2._contents += t3; - } - t3 = A.Primitives_stringFromCharCode(32); - t2._contents += t3; - _this.whitespace$0(); - expressionAfter = _this._stylesheet0$_expressionUntilComparison$0(); - buffer.add$2(0, expressionAfter, expressionAfter.get$span(expressionAfter)); - } - } - } - } - t1.expectChar$1(41); - _this.whitespace$0(); - t1 = A.Primitives_stringFromCharCode(41); - t2._contents += t1; - }, - _stylesheet0$_expressionUntilComparison$0() { - return this._stylesheet0$_expression$1$until(new A.StylesheetParser__expressionUntilComparison_closure0(this)); - }, - _stylesheet0$_supportsCondition$0() { - var condition, operator, right, endPosition, t3, t4, lowerOperator, _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position; - if (_this.scanIdentifier$1("not")) { - _this.whitespace$0(); - return new A.SupportsNegation0(_this._stylesheet0$_supportsConditionInParens$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); - } - condition = _this._stylesheet0$_supportsConditionInParens$0(); - _this.whitespace$0(); - for (operator = null; _this.lookingAtIdentifier$0();) { - if (operator != null) - _this.expectIdentifier$1(operator); - else if (_this.scanIdentifier$1("or")) - operator = "or"; - else { - _this.expectIdentifier$1("and"); - operator = "and"; - } - _this.whitespace$0(); - right = _this._stylesheet0$_supportsConditionInParens$0(); - endPosition = t1._string_scanner$_position; - t3 = t1._sourceFile; - t4 = new A._FileSpan(t3, t2, endPosition); - t4._FileSpan$3(t3, t2, endPosition); - condition = new A.SupportsOperation0(condition, right, operator, t4); - lowerOperator = operator.toLowerCase(); - if (lowerOperator !== "and" && lowerOperator !== "or") - A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); - _this.whitespace$0(); - } - return condition; - }, - _stylesheet0$_supportsConditionInParens$0() { - var $name, nameStart, wasInParentheses, identifier, _1_0, operation, contents, identifier0, t2, $arguments, _0_0, _0_4_isSet, _0_4, _0_40, condition, exception, value, _this = this, - t1 = _this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position); - if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { - identifier0 = _this.interpolatedIdentifier$0(); - t2 = identifier0.get$asPlain(); - if ((t2 == null ? null : t2.toLowerCase()) === "not") - _this.error$2(0, '"not" is not a valid identifier here.', identifier0.span); - if (t1.scanChar$1(40)) { - $arguments = _this._stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowSemicolon(true, true); - t1.expectChar$1(41); - return new A.SupportsFunction0(identifier0, $arguments, t1.spanFrom$1(start)); - } else { - _0_0 = identifier0.contents; - _0_4_isSet = _0_0.length === 1; - _0_4 = null; - if (_0_4_isSet) { - _0_40 = _0_0[0]; - t2 = _0_40; - _0_4 = t2; - t2 = t2 instanceof A.Expression0; - } else - t2 = false; - if (t2) { - t2 = _0_4_isSet ? _0_4 : _0_0[0]; - return new A.SupportsInterpolation0(type$.Expression_2._as(t2), t1.spanFrom$1(start)); - } else - _this.error$2(0, "Expected @supports condition.", identifier0.span); - } - } - t1.expectChar$1(40); - _this.whitespace$0(); - if (_this.scanIdentifier$1("not")) { - _this.whitespace$0(); - condition = _this._stylesheet0$_supportsConditionInParens$0(); - t1.expectChar$1(41); - return new A.SupportsNegation0(condition, t1.spanFrom$1(start)); - } else if (t1.peekChar$0() === 40) { - condition = _this._stylesheet0$_supportsCondition$0(); - t1.expectChar$1(41); - return condition.withSpan$1(t1.spanFrom$1(start)); - } - $name = null; - nameStart = new A._SpanScannerState(t1, t1._string_scanner$_position); - wasInParentheses = _this._stylesheet0$_inParentheses; - try { - $name = _this._stylesheet0$_expression$0(); - t1.expectChar$1(58); - } catch (exception) { - if (type$.FormatException._is(A.unwrapException(exception))) { - t1.set$state(nameStart); - _this._stylesheet0$_inParentheses = wasInParentheses; - identifier = _this.interpolatedIdentifier$0(); - _1_0 = _this._stylesheet0$_trySupportsOperation$2(identifier, nameStart); - operation = null; - if (_1_0 != null) { - operation = _1_0; - t1.expectChar$1(41); - t2 = operation; - t1 = t1.spanFrom$1(start); - return A.SupportsOperation$0(t2.left, t2.right, t2.operator, t1); - } - t2 = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); - t2.addInterpolation$1(identifier); - t2.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$3$allowColon$allowEmpty$allowSemicolon(false, true, true)); - contents = t2.interpolation$1(t1.spanFrom$1(nameStart)); - if (t1.peekChar$0() === 58) - throw exception; - t1.expectChar$1(41); - return new A.SupportsAnything0(contents, t1.spanFrom$1(start)); - } else - throw exception; - } - value = _this._stylesheet0$_supportsDeclarationValue$1($name); - t1.expectChar$1(41); - return new A.SupportsDeclaration0($name, value, t1.spanFrom$1(start)); - }, - _stylesheet0$_supportsDeclarationValue$1($name) { - var t1 = false; - if ($name instanceof A.StringExpression0) - if (!$name.hasQuotes) - t1 = B.JSString_methods.startsWith$1($name.text.get$initialPlain(), "--"); - if (t1) - return new A.StringExpression0(this._stylesheet0$_interpolatedDeclarationValue$0(), false); - else { - this.whitespace$0(); - return this._stylesheet0$_expression$0(); - } - }, - _stylesheet0$_trySupportsOperation$2(interpolation, start) { - var expression, beforeWhitespace, t2, t3, operator, operation, right, t4, endPosition, t5, t6, lowerOperator, _this = this, _null = null, - t1 = interpolation.contents; - if (t1.length !== 1) - return _null; - expression = B.JSArray_methods.get$first(t1); - if (!(expression instanceof A.Expression0)) - return _null; - t1 = _this.scanner; - beforeWhitespace = new A._SpanScannerState(t1, t1._string_scanner$_position); - _this.whitespace$0(); - for (t2 = start.position, t3 = interpolation.span, operator = _null, operation = operator; _this.lookingAtIdentifier$0();) { - if (operator != null) - _this.expectIdentifier$1(operator); - else if (_this.scanIdentifier$1("and")) - operator = "and"; - else { - if (!_this.scanIdentifier$1("or")) { - if (beforeWhitespace._scanner !== t1) - A.throwExpression(A.ArgumentError$(string$.The_gi, _null)); - t2 = beforeWhitespace.position; - if ((t2 === 0 ? 1 / t2 < 0 : t2 < 0) || t2 > t1.string.length) - A.throwExpression(A.ArgumentError$("Invalid position " + t2, _null)); - t1._string_scanner$_position = t2; - return t1._lastMatch = null; - } - operator = "or"; - } - _this.whitespace$0(); - right = _this._stylesheet0$_supportsConditionInParens$0(); - t4 = operation == null ? new A.SupportsInterpolation0(expression, t3) : operation; - endPosition = t1._string_scanner$_position; - t5 = t1._sourceFile; - t6 = new A._FileSpan(t5, t2, endPosition); - t6._FileSpan$3(t5, t2, endPosition); - operation = new A.SupportsOperation0(t4, right, operator, t6); - lowerOperator = operator.toLowerCase(); - if (lowerOperator !== "and" && lowerOperator !== "or") - A.throwExpression(A.ArgumentError$value(operator, "operator", 'may only be "and" or "or".')); - _this.whitespace$0(); - } - return operation; - }, - _stylesheet0$_lookingAtInterpolatedIdentifier$0() { - var t2, _0_0, - t1 = this.scanner, - _1_0 = t1.peekChar$0(); - $label0$0: { - t2 = false; - if (_1_0 == null) { - t1 = t2; - break $label0$0; - } - if (_1_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_1_0) || _1_0 >= 128 || 92 === _1_0) { - t1 = true; - break $label0$0; - } - if (35 === _1_0) { - t1 = t1.peekChar$1(1) === 123; - break $label0$0; - } - if (45 === _1_0) { - _0_0 = t1.peekChar$1(1); - $label1$1: { - if (_0_0 == null) { - t1 = t2; - break $label1$1; - } - if (35 === _0_0) { - t1 = t1.peekChar$1(2) === 123; - break $label1$1; - } - if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128 || 92 === _0_0 || 45 === _0_0) { - t1 = true; - break $label1$1; - } - t1 = t2; - break $label1$1; - } - break $label0$0; - } - t1 = t2; - break $label0$0; - } - return t1; - }, - _stylesheet0$_lookingAtPotentialPropertyHack$0() { - var t1 = this.scanner, - _0_0 = t1.peekChar$0(); - $label0$0: { - if (58 === _0_0 || 42 === _0_0 || 46 === _0_0) { - t1 = true; - break $label0$0; - } - if (35 === _0_0) { - t1 = t1.peekChar$1(1) !== 123; - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - _stylesheet0$_lookingAtInterpolatedIdentifierBody$0() { - var t2, t3, - t1 = this.scanner, - _0_0 = t1.peekChar$0(); - $label0$0: { - t2 = false; - if (_0_0 == null) { - t1 = t2; - break $label0$0; - } - if (!(_0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128)) - t3 = _0_0 >= 48 && _0_0 <= 57 || _0_0 === 45; - else - t3 = true; - if (t3 || 92 === _0_0) { - t1 = true; - break $label0$0; - } - if (35 === _0_0) { - t1 = t1.peekChar$1(1) === 123; - break $label0$0; - } - t1 = t2; - break $label0$0; - } - return t1; - }, - _stylesheet0$_lookingAtExpression$0() { - var t2, _0_0, - t1 = this.scanner, - _1_0 = t1.peekChar$0(); - $label0$0: { - t2 = true; - if (_1_0 == null) { - t1 = false; - break $label0$0; - } - if (46 === _1_0) { - t1 = t1.peekChar$1(1) !== 46; - break $label0$0; - } - if (33 === _1_0) { - _0_0 = t1.peekChar$1(1); - $label1$1: { - if (_0_0 != null) - if (105 !== _0_0) - if (73 !== _0_0) - t1 = _0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12; - else - t1 = t2; - else - t1 = t2; - else - t1 = t2; - if (t1) - break $label1$1; - break $label1$1; - } - break $label0$0; - } - t1 = true; - if (40 !== _1_0) - if (47 !== _1_0) - if (91 !== _1_0) - if (39 !== _1_0) - if (34 !== _1_0) - if (35 !== _1_0) - if (43 !== _1_0) - if (45 !== _1_0) - if (92 !== _1_0) - if (36 !== _1_0) - if (38 !== _1_0) - if (!(_1_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_1_0) || _1_0 >= 128)) - t1 = _1_0 >= 48 && _1_0 <= 57; - if (t1) { - t1 = t2; - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - _stylesheet0$_withChildren$1$3(child, start, create) { - var result = create.call$2(this.children$1(0, child), this.scanner.spanFrom$1(start)); - this.whitespaceWithoutComments$0(); - return result; - }, - _stylesheet0$_withChildren$3(child, start, create) { - return this._stylesheet0$_withChildren$1$3(child, start, create, type$.dynamic); - }, - _stylesheet0$_urlString$0() { - var innerError, stackTrace, t2, exception, - t1 = this.scanner, - start = new A._SpanScannerState(t1, t1._string_scanner$_position), - url = this.string$0(); - try { - t2 = A.Uri_parse(url); - return t2; - } catch (exception) { - t2 = A.unwrapException(exception); - if (type$.FormatException._is(t2)) { - innerError = t2; - stackTrace = A.getTraceFromException(exception); - this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), t1.spanFrom$1(start), stackTrace); - } else - throw exception; - } - }, - _stylesheet0$_publicIdentifier$0() { - var _this = this, - t1 = _this.scanner, - t2 = t1._string_scanner$_position, - result = _this.identifier$0(); - _this._stylesheet0$_assertPublic$2(result, new A.StylesheetParser__publicIdentifier_closure0(_this, new A._SpanScannerState(t1, t2))); - return result; - }, - _stylesheet0$_assertPublic$2(identifier, span) { - var first = identifier.charCodeAt(0); - if (!(first === 45 || first === 95)) - return; - this.error$2(0, string$.Privat, span.call$0()); - }, - _stylesheet0$_addOrInject$2(buffer, expression) { - if (expression instanceof A.StringExpression0 && !expression.hasQuotes) - buffer.addInterpolation$1(expression.text); - else - buffer.add$2(0, expression, expression.get$span(expression)); - }, - get$plainCss() { - return false; - } - }; - A.StylesheetParser_parse_closure0.prototype = { - call$0() { - var statements, - t1 = this.$this, - t2 = t1.scanner, - t3 = t2._string_scanner$_position; - t2.scanChar$1(65279); - statements = t1.statements$1(new A.StylesheetParser_parse__closure0(t1)); - t2.expectDone$0(); - return A.Stylesheet$internal0(statements, t2.spanFrom$1(new A._SpanScannerState(t2, t3)), t1.warnings, t1._stylesheet0$_globalVariables, t1.get$plainCss()); - }, - $signature: 596 - }; - A.StylesheetParser_parse__closure0.prototype = { - call$0() { - var t1 = this.$this; - if (t1.scanner.scan$1("@charset")) { - t1.whitespace$0(); - t1.string$0(); - return null; - } - return t1._stylesheet0$_statement$1$root(true); - }, - $signature: 597 - }; - A.StylesheetParser_parseArgumentDeclaration_closure0.prototype = { - call$0() { - var $arguments, - t1 = this.$this, - t2 = t1.scanner; - t2.expectChar$2$name(64, "@-rule"); - t1.identifier$0(); - t1.whitespace$0(); - t1.identifier$0(); - $arguments = t1._stylesheet0$_argumentDeclaration$0(); - t1.whitespace$0(); - t2.expectChar$1(123); - return $arguments; - }, - $signature: 598 - }; - A.StylesheetParser__parseSingleProduction_closure0.prototype = { - call$0() { - var result = this.production.call$0(); - this.$this.scanner.expectDone$0(); - return result; - }, - $signature() { - return this.T._eval$1("0()"); - } - }; - A.StylesheetParser_parseSignature_closure.prototype = { - call$0() { - var $arguments, t2, t3, - t1 = this.$this, - $name = t1.identifier$0(); - if (this.requireParens || t1.scanner.peekChar$0() === 40) - $arguments = t1._stylesheet0$_argumentDeclaration$0(); - else { - t2 = t1.scanner; - t2 = A.FileLocation$_(t2._sourceFile, t2._string_scanner$_position); - t3 = t2.offset; - $arguments = new A.ArgumentDeclaration0(B.List_empty24, null, A._FileSpan$(t2.file, t3, t3)); - } - t1.scanner.expectDone$0(); - return new A._Record_2($name, $arguments); - }, - $signature: 599 - }; - A.StylesheetParser__statement_closure0.prototype = { - call$0() { - return this.$this._stylesheet0$_statement$0(); - }, - $signature: 136 - }; - A.StylesheetParser_variableDeclarationWithoutNamespace_closure1.prototype = { - call$0() { - return this.$this.scanner.spanFrom$1(this.start); - }, - $signature: 27 - }; - A.StylesheetParser_variableDeclarationWithoutNamespace_closure2.prototype = { - call$0() { - return this.declaration.span; - }, - $signature: 27 - }; - A.StylesheetParser__styleRule_closure0.prototype = { - call$2(children, span) { - var _this = this, - t1 = _this.$this; - if (t1.get$indented() && children.length === 0) - t1.warnings.push(new A._Record_3_deprecation_message_span(null, string$.This_s, _this._box_0.interpolation.span)); - t1._stylesheet0$_inStyleRule = _this.wasInStyleRule; - return A.StyleRule$0(_this._box_0.interpolation, children, t1.scanner.spanFrom$1(_this.start)); - }, - $signature: 600 - }; - A.StylesheetParser__tryDeclarationChildren_closure0.prototype = { - call$2(children, span) { - return A.Declaration$nested0(this.name, children, span, this.value); - }, - $signature: 601 - }; - A.StylesheetParser__atRootRule_closure1.prototype = { - call$2(children, span) { - return A.AtRootRule$0(children, span, this.query); - }, - $signature: 267 - }; - A.StylesheetParser__atRootRule_closure2.prototype = { - call$2(children, span) { - return A.AtRootRule$0(children, span, null); - }, - $signature: 267 - }; - A.StylesheetParser__eachRule_closure0.prototype = { - call$2(children, span) { - var _this = this; - _this.$this._stylesheet0$_inControlDirective = _this.wasInControlDirective; - return A.EachRule$0(_this.variables, _this.list, children, span); - }, - $signature: 603 - }; - A.StylesheetParser__functionRule_closure0.prototype = { - call$2(children, span) { - return A.FunctionRule$0(this.name, this.$arguments, children, span, this.precedingComment); - }, - $signature: 604 - }; - A.StylesheetParser__forRule_closure1.prototype = { - call$0() { - var t1 = this.$this; - if (!t1.lookingAtIdentifier$0()) - return false; - if (t1.scanIdentifier$1("to")) - return this._box_0.exclusive = true; - else if (t1.scanIdentifier$1("through")) { - this._box_0.exclusive = false; - return true; - } else - return false; - }, - $signature: 21 - }; - A.StylesheetParser__forRule_closure2.prototype = { - call$2(children, span) { - var t1, _this = this; - _this.$this._stylesheet0$_inControlDirective = _this.wasInControlDirective; - t1 = _this._box_0.exclusive; - t1.toString; - return A.ForRule$0(_this.variable, _this.from, _this.to, children, span, t1); - }, - $signature: 605 - }; - A.StylesheetParser__memberList_closure0.prototype = { - call$0() { - var t1 = this.$this; - if (t1.scanner.peekChar$0() === 36) - this.variables.add$1(0, t1.variableName$0()); - else - this.identifiers.add$1(0, t1.identifier$1$normalize(true)); - }, - $signature: 1 - }; - A.StylesheetParser__includeRule_closure0.prototype = { - call$2(children, span) { - return A.ContentBlock$0(this.contentArguments_, children, span); - }, - $signature: 606 - }; - A.StylesheetParser_mediaRule_closure0.prototype = { - call$2(children, span) { - return A.MediaRule$0(this.query, children, span); - }, - $signature: 607 - }; - A.StylesheetParser__mixinRule_closure0.prototype = { - call$2(children, span) { - var _this = this; - _this.$this._stylesheet0$_inMixin = false; - return A.MixinRule$0(_this.name, _this.$arguments, children, span, _this.precedingComment); - }, - $signature: 608 - }; - A.StylesheetParser_mozDocumentRule_closure0.prototype = { - call$2(children, span) { - var _this = this; - if (_this._box_0.needsDeprecationWarning) - _this.$this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_Ctw, string$.x40_moz_, span)); - return A.AtRule$0(_this.name, span, children, _this.value); - }, - $signature: 268 - }; - A.StylesheetParser_supportsRule_closure0.prototype = { - call$2(children, span) { - return A.SupportsRule$0(this.condition, children, span); - }, - $signature: 610 - }; - A.StylesheetParser__whileRule_closure0.prototype = { - call$2(children, span) { - this.$this._stylesheet0$_inControlDirective = this.wasInControlDirective; - return A.WhileRule$0(this.condition, children, span); - }, - $signature: 611 - }; - A.StylesheetParser_unknownAtRule_closure0.prototype = { - call$2(children, span) { - return A.AtRule$0(this.name, span, children, this._box_0.value); - }, - $signature: 268 - }; - A.StylesheetParser__expression_resetState0.prototype = { - call$0() { - var t2, - t1 = this._box_0; - t1.operands_ = t1.operators_ = t1.spaceExpressions_ = t1.commaExpressions_ = null; - t2 = this.$this; - t2.scanner.set$state(this.start); - t1.allowSlash = true; - t1.singleExpression_ = t2._stylesheet0$_singleExpression$0(); - }, - $signature: 0 - }; - A.StylesheetParser__expression_resolveOneOperation0.prototype = { - call$0() { - var t2, t3, t4, t5, t6, t7, _this = this, - t1 = _this._box_0, - operator = t1.operators_.pop(), - left = t1.operands_.pop(), - right = t1.singleExpression_; - if (right == null) { - t2 = _this.$this.scanner; - t3 = operator.operator.length; - t2.error$3$length$position(0, "Expected expression.", t3, t2._string_scanner$_position - t3); - } - if (t1.allowSlash) { - t2 = _this.$this; - t2 = !t2._stylesheet0$_inParentheses && operator === B.BinaryOperator_U770 && t2._stylesheet0$_isSlashOperand$1(left) && t2._stylesheet0$_isSlashOperand$1(right); - } else - t2 = false; - if (t2) - t1.singleExpression_ = new A.BinaryOperationExpression0(B.BinaryOperator_U770, left, right, true); - else { - t1.singleExpression_ = new A.BinaryOperationExpression0(operator, left, right, false); - t2 = t1.allowSlash = false; - if (B.BinaryOperator_u150 === operator || B.BinaryOperator_SjO0 === operator) { - t3 = _this.$this; - t4 = t3.scanner.string; - t5 = right.get$span(right); - t5 = t5.get$start(t5); - t6 = right.get$span(right); - t7 = operator.operator; - if (B.JSString_methods.substring$2(t4, t5.offset - 1, t6.get$start(t6).offset) === t7) { - t2 = left.get$span(left); - t2 = t4.charCodeAt(t2.get$end(t2).offset); - t2 = t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12; - } - if (t2) { - t2 = left.toString$0(0); - t4 = right.toString$0(0); - t5 = left.toString$0(0); - t6 = right.toString$0(0); - t1 = t1.singleExpression_; - t3.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_UW2, "This operation is parsed as:\n\n " + t2 + " " + t7 + " " + t4 + string$.x0a_but_ + t5 + " (" + t7 + t6 + ")\n\nAdd a space after " + t7 + string$.x20to_cl, t1.get$span(t1))); - } - } - } - }, - $signature: 0 - }; - A.StylesheetParser__expression_resolveOperations0.prototype = { - call$0() { - var t1, - operators = this._box_0.operators_; - if (operators == null) - return; - for (t1 = this.resolveOneOperation; operators.length !== 0;) - t1.call$0(); - }, - $signature: 0 - }; - A.StylesheetParser__expression_addSingleExpression0.prototype = { - call$1(expression) { - var t2, spaceExpressions, _this = this, - t1 = _this._box_0; - if (t1.singleExpression_ != null) { - t2 = _this.$this; - if (t2._stylesheet0$_inParentheses) { - t2._stylesheet0$_inParentheses = false; - if (t1.allowSlash) { - _this.resetState.call$0(); - return; - } - } - spaceExpressions = t1.spaceExpressions_; - if (spaceExpressions == null) - spaceExpressions = t1.spaceExpressions_ = A._setArrayType([], type$.JSArray_Expression_2); - _this.resolveOperations.call$0(); - t2 = t1.singleExpression_; - t2.toString; - spaceExpressions.push(t2); - t1.allowSlash = true; - } - t1.singleExpression_ = expression; - }, - $signature: 612 - }; - A.StylesheetParser__expression_addOperator0.prototype = { - call$1(operator) { - var t2, t3, operators, operands, t4, singleExpression, - t1 = this.$this; - if (t1.get$plainCss() && operator !== B.BinaryOperator_wdM0 && operator !== B.BinaryOperator_u150 && operator !== B.BinaryOperator_SjO0 && operator !== B.BinaryOperator_2No0 && operator !== B.BinaryOperator_U770) { - t2 = t1.scanner; - t3 = operator.operator.length; - t2.error$3$length$position(0, "Operators aren't allowed in plain CSS.", t3, t2._string_scanner$_position - t3); - } - t2 = this._box_0; - t2.allowSlash = t2.allowSlash && operator === B.BinaryOperator_U770; - operators = t2.operators_; - if (operators == null) - operators = t2.operators_ = A._setArrayType([], type$.JSArray_BinaryOperator_2); - operands = t2.operands_; - if (operands == null) - operands = t2.operands_ = A._setArrayType([], type$.JSArray_Expression_2); - t3 = this.resolveOneOperation; - t4 = operator.precedence; - while (true) { - if (!(operators.length !== 0 && B.JSArray_methods.get$last(operators).precedence >= t4)) - break; - t3.call$0(); - } - operators.push(operator); - singleExpression = t2.singleExpression_; - if (singleExpression == null) { - t3 = t1.scanner; - t4 = operator.operator.length; - t3.error$3$length$position(0, "Expected expression.", t4, t3._string_scanner$_position - t4); - } - operands.push(singleExpression); - t1.whitespace$0(); - t2.singleExpression_ = t1._stylesheet0$_singleExpression$0(); - }, - $signature: 613 - }; - A.StylesheetParser__expression_resolveSpaceExpressions0.prototype = { - call$0() { - var t1, spaceExpressions, singleExpression, t2; - this.resolveOperations.call$0(); - t1 = this._box_0; - spaceExpressions = t1.spaceExpressions_; - if (spaceExpressions == null) - return; - singleExpression = t1.singleExpression_; - if (singleExpression == null) - this.$this.scanner.error$1(0, "Expected expression."); - spaceExpressions.push(singleExpression); - t2 = B.JSArray_methods.get$first(spaceExpressions); - t2 = t2.get$span(t2).expand$1(0, singleExpression.get$span(singleExpression)); - t1.singleExpression_ = new A.ListExpression0(A.List_List$unmodifiable(spaceExpressions, type$.Expression_2), B.ListSeparator_nbm0, false, t2); - t1.spaceExpressions_ = null; - }, - $signature: 0 - }; - A.StylesheetParser_expressionUntilComma_closure0.prototype = { - call$0() { - return this.$this.scanner.peekChar$0() === 44; - }, - $signature: 21 - }; - A.StylesheetParser__isHexColor_closure0.prototype = { - call$1(char) { - return A.CharacterExtension_get_isHex0(char); - }, - $signature: 46 - }; - A.StylesheetParser__unicodeRange_closure1.prototype = { - call$1(char) { - return char != null && A.CharacterExtension_get_isHex0(char); - }, - $signature: 32 - }; - A.StylesheetParser__unicodeRange_closure2.prototype = { - call$1(char) { - return char != null && A.CharacterExtension_get_isHex0(char); - }, - $signature: 32 - }; - A.StylesheetParser_namespacedExpression_closure0.prototype = { - call$0() { - return this.$this.scanner.spanFrom$1(this.start); - }, - $signature: 27 - }; - A.StylesheetParser_trySpecialFunction_closure0.prototype = { - call$1(contents) { - return new A.StringExpression0(contents, false); - }, - $signature: 614 - }; - A.StylesheetParser__expressionUntilComparison_closure0.prototype = { - call$0() { - var t1 = this.$this.scanner, - _0_0 = t1.peekChar$0(); - $label0$0: { - if (61 === _0_0) { - t1 = t1.peekChar$1(1) !== 61; - break $label0$0; - } - if (60 === _0_0 || 62 === _0_0) { - t1 = true; - break $label0$0; - } - t1 = false; - break $label0$0; - } - return t1; - }, - $signature: 21 - }; - A.StylesheetParser__publicIdentifier_closure0.prototype = { - call$0() { - return this.$this.scanner.spanFrom$1(this.start); - }, - $signature: 27 - }; - A.Stylesheet0.prototype = { - Stylesheet$internal$5$globalVariables$plainCss0(children, span, parseTimeWarnings, globalVariables, plainCss) { - var t1, t2, t3, t4, _i, child; - for (t1 = this.children, t2 = t1.length, t3 = this._stylesheet1$_forwards, t4 = this._stylesheet1$_uses, _i = 0; _i < t2; ++_i) { - child = t1[_i]; - if (child instanceof A.UseRule0) { - t4.push(child); - continue; - } - if (child instanceof A.ForwardRule0) { - t3.push(child); - continue; - } - if (child instanceof A.SilentComment0 || child instanceof A.LoudComment0 || child instanceof A.VariableDeclaration0) - continue; - break; - } - }, - accept$1$1(visitor) { - return visitor.visitStylesheet$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.children; - return (t1 && B.JSArray_methods).join$1(t1, " "); - }, - get$span(receiver) { - return this.span; - } - }; - A.SupportsExpression0.prototype = { - get$span(_) { - var t1 = this.condition; - return t1.get$span(t1); - }, - accept$1$1(visitor) { - return visitor.visitSupportsExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.condition.toString$0(0); - } - }; - A.ModifiableCssSupportsRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitCssSupportsRule$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - equalsIgnoringChildren$1(other) { - var t1, t2; - if (other instanceof A.ModifiableCssSupportsRule0) { - t1 = this.condition; - t2 = other.condition; - t1 = t1.$ti._is(t2) && J.$eq$(t2.value, t1.value); - } else - t1 = false; - return t1; - }, - copyWithoutChildren$0() { - return A.ModifiableCssSupportsRule$0(this.condition, this.span); - }, - get$span(receiver) { - return this.span; - } - }; - A.SupportsRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitSupportsRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.children; - return "@supports " + this.condition.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.JSToDartImporter.prototype = { - canonicalize$1(_, url) { - var t1, - result = A.wrapJSExceptions(new A.JSToDartImporter_canonicalize_closure(this, url)); - if (result == null) - return null; - t1 = self.URL; - if (result instanceof t1) - return A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); - t1 = self.Promise; - if (result instanceof t1) - A.jsThrow(new self.Error("The canonicalize() function can't return a Promise for synchronous compile functions.")); - else - A.jsThrow(new self.Error(string$.The_ca)); - }, - load$1(_, url) { - var t1, contents, syntax, t2, - result = A.wrapJSExceptions(new A.JSToDartImporter_load_closure(this, url)); - if (result == null) - return null; - t1 = self.Promise; - if (result instanceof t1) - A.jsThrow(new self.Error("The load() function can't return a Promise for synchronous compile functions.")); - type$.JSImporterResult._as(result); - t1 = J.getInterceptor$x(result); - contents = t1.get$contents(result); - if (A._asString(new self.Function("value", "return typeof value").call$1(contents)) !== "string") - A.jsThrow(new A.ArgumentError(true, contents, "contents", "must be a string but was: " + A.jsType(contents))); - syntax = t1.get$syntax(result); - if (contents == null || syntax == null) - A.jsThrow(new self.Error(string$.The_lo)); - t2 = A.parseSyntax(syntax); - return A.ImporterResult$(contents, A.NullableExtension_andThen0(t1.get$sourceMapUrl(result), A.utils3__jsToDartUrl$closure()), t2); - }, - isNonCanonicalScheme$1(scheme) { - return this._sync$_nonCanonicalSchemes.contains$1(0, scheme); - } - }; - A.JSToDartImporter_canonicalize_closure.prototype = { - call$0() { - return this.$this._sync$_canonicalize.call$2(this.url.toString$0(0), A.canonicalizeContext0()); - }, - $signature: 33 - }; - A.JSToDartImporter_load_closure.prototype = { - call$0() { - return this.$this._sync$_load.call$1(new self.URL(this.url.toString$0(0))); - }, - $signature: 33 - }; - A.Syntax0.prototype = { - _enumToString$0() { - return "Syntax." + this._name; - }, - toString$0(_) { - return this._syntax0$_name; - } - }; - A.TypeSelector0.prototype = { - get$specificity() { - return 1; - }, - accept$1$1(visitor) { - return visitor.visitTypeSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - addSuffix$1(suffix) { - var t1 = this.name; - return new A.TypeSelector0(new A.QualifiedName0(t1.name + suffix, t1.namespace), this.span); - }, - unify$1(compound) { - var unified, t1, - _0_0 = A.IterableExtensions_get_firstOrNull(compound); - if (_0_0 instanceof A.UniversalSelector0 || _0_0 instanceof A.TypeSelector0) { - unified = A.unifyUniversalAndElement0(this, B.JSArray_methods.get$first(compound)); - if (unified == null) - return null; - t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector_2); - B.JSArray_methods.addAll$1(t1, A.SubListIterable$(compound, 1, null, A._arrayInstanceType(compound)._precomputed1)); - return t1; - } else { - t1 = A._setArrayType([this], type$.JSArray_SimpleSelector_2); - B.JSArray_methods.addAll$1(t1, compound); - return t1; - } - }, - isSuperselector$1(other) { - var t1, t2, t3; - if (!this.super$SimpleSelector$isSuperselector0(other)) { - t1 = false; - if (other instanceof A.TypeSelector0) { - t2 = this.name; - t3 = other.name; - if (t2.name === t3.name) { - t1 = t2.namespace; - t1 = t1 === "*" || t1 == t3.namespace; - } - } - } else - t1 = true; - return t1; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.TypeSelector0 && other.name.$eq(0, this.name); - }, - get$hashCode(_) { - var t1 = this.name; - return B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace); - } - }; - A.Types.prototype = {}; - A.UnaryOperationExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitUnaryOperationExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var operand, - t1 = this.operator, - t2 = t1.operator; - t1 = t1 === B.UnaryOperator_not_not_not0 ? t2 + A.Primitives_stringFromCharCode(32) : t2; - operand = this.operand; - $label0$0: { - t2 = true; - if (!(operand instanceof A.BinaryOperationExpression0)) - if (!(operand instanceof A.UnaryOperationExpression0)) - t2 = operand instanceof A.ListExpression0 && !operand.hasBrackets && operand.contents.length >= 2; - if (t2) - break $label0$0; - break $label0$0; - } - if (t2) - t1 += "40"; - t1 += operand.toString$0(0); - if (t2) - t1 += "41"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - get$span(receiver) { - return this.span; - } - }; - A.UnaryOperator0.prototype = { - _enumToString$0() { - return "UnaryOperator." + this._name; - }, - toString$0(_) { - return this.name; - } - }; - A.UnitlessSassNumber0.prototype = { - get$numeratorUnits(_) { - return B.List_empty; - }, - get$denominatorUnits(_) { - return B.List_empty; - }, - get$hasUnits() { - return false; - }, - get$hasComplexUnits() { - return false; - }, - withValue$1(value) { - return new A.UnitlessSassNumber0(value, null); - }, - withSlash$2(numerator, denominator) { - return new A.UnitlessSassNumber0(this._number1$_value, new A._Record_2(numerator, denominator)); - }, - hasUnit$1(unit) { - return false; - }, - hasCompatibleUnits$1(other) { - return other instanceof A.UnitlessSassNumber0; - }, - hasPossiblyCompatibleUnits$1(other) { - return other instanceof A.UnitlessSassNumber0; - }, - compatibleWithUnit$1(unit) { - return true; - }, - coerceToMatch$3(other, $name, otherName) { - return other.withValue$1(this._number1$_value); - }, - coerceToMatch$1(other) { - return this.coerceToMatch$3(other, null, null); - }, - coerceValueToMatch$3(other, $name, otherName) { - return this._number1$_value; - }, - coerceValueToMatch$1(other) { - return this.coerceValueToMatch$3(other, null, null); - }, - convertToMatch$3(other, $name, otherName) { - return other.get$hasUnits() ? this.super$SassNumber$convertToMatch(other, $name, otherName) : this; - }, - convertValueToMatch$3(other, $name, otherName) { - return other.get$hasUnits() ? this.super$SassNumber$convertValueToMatch0(other, $name, otherName) : this._number1$_value; - }, - convertValueToMatch$1(other) { - return this.convertValueToMatch$3(other, null, null); - }, - coerce$3(newNumerators, newDenominators, $name) { - return A.SassNumber_SassNumber$withUnits0(this._number1$_value, newDenominators, newNumerators); - }, - coerce$2(newNumerators, newDenominators) { - return this.coerce$3(newNumerators, newDenominators, null); - }, - coerceValue$3(newNumerators, newDenominators, $name) { - return this._number1$_value; - }, - coerceValueToUnit$2(unit, $name) { - return this._number1$_value; - }, - coerceValueToUnit$1(unit) { - return this.coerceValueToUnit$2(unit, null); - }, - greaterThan$1(other) { - var t1, t2; - if (other instanceof A.SassNumber0) { - t1 = this._number1$_value; - t2 = other._number1$_value; - return t1 > t2 && !A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; - } - return this.super$SassNumber$greaterThan0(other); - }, - greaterThanOrEquals$1(other) { - var t1, t2; - if (other instanceof A.SassNumber0) { - t1 = this._number1$_value; - t2 = other._number1$_value; - return t1 > t2 || A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; - } - return this.super$SassNumber$greaterThanOrEquals0(other); - }, - lessThan$1(other) { - var t1, t2; - if (other instanceof A.SassNumber0) { - t1 = this._number1$_value; - t2 = other._number1$_value; - return t1 < t2 && !A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; - } - return this.super$SassNumber$lessThan0(other); - }, - lessThanOrEquals$1(other) { - var t1, t2; - if (other instanceof A.SassNumber0) { - t1 = this._number1$_value; - t2 = other._number1$_value; - return t1 < t2 || A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; - } - return this.super$SassNumber$lessThanOrEquals0(other); - }, - modulo$1(other) { - if (other instanceof A.SassNumber0) - return other.withValue$1(A.moduloLikeSass0(this._number1$_value, other._number1$_value)); - return this.super$SassNumber$modulo0(other); - }, - plus$1(other) { - if (other instanceof A.SassNumber0) - return other.withValue$1(this._number1$_value + other._number1$_value); - return this.super$SassNumber$plus0(other); - }, - minus$1(other) { - if (other instanceof A.SassNumber0) - return other.withValue$1(this._number1$_value - other._number1$_value); - return this.super$SassNumber$minus0(other); - }, - times$1(other) { - if (other instanceof A.SassNumber0) - return other.withValue$1(this._number1$_value * other._number1$_value); - return this.super$SassNumber$times0(other); - }, - dividedBy$1(other) { - var t1, t2; - if (other instanceof A.SassNumber0) { - t1 = this._number1$_value / other._number1$_value; - if (other.get$hasUnits()) { - t2 = other.get$denominatorUnits(other); - t2 = A.SassNumber_SassNumber$withUnits0(t1, other.get$numeratorUnits(other), t2); - t1 = t2; - } else - t1 = new A.UnitlessSassNumber0(t1, null); - return t1; - } - return this.super$SassNumber$dividedBy0(other); - }, - unaryMinus$0() { - return new A.UnitlessSassNumber0(-this._number1$_value, null); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.UnitlessSassNumber0 && A.fuzzyEquals0(this._number1$_value, other._number1$_value); - }, - get$hashCode(_) { - var t1 = this.hashCache; - return t1 == null ? this.hashCache = A.fuzzyHashCode0(this._number1$_value) : t1; - } - }; - A.UniversalSelector0.prototype = { - get$specificity() { - return 0; - }, - accept$1$1(visitor) { - return visitor.visitUniversalSelector$1(this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - unify$1(compound) { - var _0_40, t1, rest, unified, t2, _this = this, _null = null, - _0_1 = compound.length, - _0_4_isSet = _0_1 >= 1, - _0_4 = _null; - if (_0_4_isSet) { - _0_40 = compound[0]; - t1 = _0_40; - _0_4 = t1; - if (!(t1 instanceof A.UniversalSelector0)) - t1 = _0_4 instanceof A.TypeSelector0; - else - t1 = true; - rest = t1 ? B.JSArray_methods.sublist$1(compound, 1) : _null; - } else { - rest = _null; - t1 = false; - } - if (t1) { - unified = A.unifyUniversalAndElement0(_this, B.JSArray_methods.get$first(compound)); - if (unified == null) - return _null; - t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector_2); - B.JSArray_methods.addAll$1(t1, rest); - return t1; - } - t1 = false; - if (_0_1 === 1) { - if (_0_4_isSet) - t2 = _0_4; - else { - _0_4 = compound[0]; - t2 = _0_4; - _0_4_isSet = true; - } - if (t2 instanceof A.PseudoSelector0) { - t2 = _0_4_isSet ? _0_4 : compound[0]; - type$.PseudoSelector_2._as(t2); - t1 = t2.isClass && t2.name === "host" || t2.get$isHostContext(); - } - } - if (t1) - return _null; - if (_0_1 <= 0) - return A._setArrayType([_this], type$.JSArray_SimpleSelector_2); - t1 = _this.namespace; - if (t1 == null || t1 === "*") - t1 = compound; - else { - t1 = A._setArrayType([_this], type$.JSArray_SimpleSelector_2); - B.JSArray_methods.addAll$1(t1, compound); - } - return t1; - }, - isSuperselector$1(other) { - var t1 = this.namespace; - if (t1 === "*") - return true; - if (other instanceof A.TypeSelector0) - return t1 == other.name.namespace; - if (other instanceof A.UniversalSelector0) - return t1 == other.namespace; - return t1 == null || this.super$SimpleSelector$isSuperselector0(other); - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A.UniversalSelector0 && other.namespace == this.namespace; - }, - get$hashCode(_) { - return J.get$hashCode$(this.namespace); - } - }; - A.UnprefixedMapView0.prototype = { - get$keys(_) { - return new A._UnprefixedKeys0(this); - }, - $index(_, key) { - return typeof key == "string" ? this._unprefixed_map_view0$_map.$index(0, this._unprefixed_map_view0$_prefix + key) : null; - }, - containsKey$1(key) { - return typeof key == "string" && this._unprefixed_map_view0$_map.containsKey$1(this._unprefixed_map_view0$_prefix + key); - }, - remove$1(_, key) { - return typeof key == "string" ? this._unprefixed_map_view0$_map.remove$1(0, this._unprefixed_map_view0$_prefix + key) : null; - } - }; - A._UnprefixedKeys0.prototype = { - get$iterator(_) { - var t1 = this._unprefixed_map_view0$_view._unprefixed_map_view0$_map; - t1 = J.where$1$ax(t1.get$keys(t1), new A._UnprefixedKeys_iterator_closure1(this)).map$1$1(0, new A._UnprefixedKeys_iterator_closure2(this), type$.String); - return t1.get$iterator(t1); - }, - contains$1(_, key) { - return this._unprefixed_map_view0$_view.containsKey$1(key); - } - }; - A._UnprefixedKeys_iterator_closure1.prototype = { - call$1(key) { - return B.JSString_methods.startsWith$1(key, this.$this._unprefixed_map_view0$_view._unprefixed_map_view0$_prefix); - }, - $signature: 5 - }; - A._UnprefixedKeys_iterator_closure2.prototype = { - call$1(key) { - return B.JSString_methods.substring$1(key, this.$this._unprefixed_map_view0$_view._unprefixed_map_view0$_prefix.length); - }, - $signature: 6 - }; - A.JSUrl0.prototype = {}; - A.UseRule0.prototype = { - UseRule$4$configuration0(url, namespace, span, configuration) { - var t1, t2, _i, variable; - for (t1 = this.configuration, t2 = t1.length, _i = 0; _i < t2; ++_i) { - variable = t1[_i]; - if (variable.isGuarded) - throw A.wrapException(A.ArgumentError$value(variable, "configured variable", "can't be guarded in a @use rule.")); - } - }, - accept$1$1(visitor) { - return visitor.visitUseRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.url, - t2 = "@use " + A.StringExpression_quoteText0(t1.toString$0(0)), - basename = t1.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(t1.get$pathSegments()), - dot = B.JSString_methods.indexOf$1(basename, "."); - t1 = this.namespace; - if (t1 !== B.JSString_methods.substring$2(basename, 0, dot === -1 ? basename.length : dot)) - t1 = t2 + (" as " + (t1 == null ? "*" : t1)); - else - t1 = t2; - t2 = this.configuration; - t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - get$span(receiver) { - return this.span; - } - }; - A.UserDefinedCallable0.prototype = { - get$name(_) { - return this.declaration.name; - }, - $isAsyncCallable0: 1, - $isCallable: 1 - }; - A.resolveImportPath_closure1.prototype = { - call$0() { - return A._exactlyOne0(A._tryPath0($.$get$context().withoutExtension$1(this.path) + ".import" + this.extension)); - }, - $signature: 45 - }; - A.resolveImportPath_closure2.prototype = { - call$0() { - return A._exactlyOne0(A._tryPathWithExtensions0(this.path + ".import")); - }, - $signature: 45 - }; - A._tryPathAsDirectory_closure0.prototype = { - call$0() { - return A._exactlyOne0(A._tryPathWithExtensions0(A.join(this.path, "index.import", null))); - }, - $signature: 45 - }; - A._exactlyOne_closure0.prototype = { - call$1(path) { - var t1 = $.$get$context(); - return " " + t1.prettyUri$1(t1.toUri$1(path)); - }, - $signature: 6 - }; - A._PropertyDescriptor0.prototype = {}; - A.futureToPromise_closure0.prototype = { - call$2(resolve, reject) { - this.future.then$1$2$onError(0, new A.futureToPromise__closure0(resolve), new A.futureToPromise__closure1(reject), type$.void); - }, - $signature: 615 - }; - A.futureToPromise__closure0.prototype = { - call$1(result) { - return this.resolve.call$1(result); - }, - $signature: 36 - }; - A.futureToPromise__closure1.prototype = { - call$2(error, stackTrace) { - A.attachTrace0(error, stackTrace); - this.reject.call$1(error); - }, - $signature: 55 - }; - A.objectToMap_closure.prototype = { - call$2(key, value) { - this.map.$indexSet(0, key, value); - return value; - }, - $signature: 126 - }; - A._RequireMain0.prototype = {}; - A.indent_closure0.prototype = { - call$1(line) { - return B.JSString_methods.$mul(" ", this.indentation) + line; - }, - $signature: 6 - }; - A.flattenVertically_closure1.prototype = { - call$1(inner) { - return A.QueueList_QueueList$from(inner, this.T); - }, - $signature() { - return this.T._eval$1("QueueList<0>(Iterable<0>)"); - } - }; - A.flattenVertically_closure2.prototype = { - call$1(queue) { - this.result.push(queue.removeFirst$0()); - return queue.get$length(0) === 0; - }, - $signature() { - return this.T._eval$1("bool(QueueList<0>)"); - } - }; - A.longestCommonSubsequence_backtrack0.prototype = { - call$2(i, j) { - var selection, t1, _this = this; - if (i === -1 || j === -1) - return A._setArrayType([], _this.T._eval$1("JSArray<0>")); - selection = _this.selections[i][j]; - if (selection != null) { - t1 = _this.call$2(i - 1, j - 1); - J.add$1$ax(t1, selection); - return t1; - } - t1 = _this.lengths; - return t1[i + 1][j] > t1[i][j + 1] ? _this.call$2(i, j - 1) : _this.call$2(i - 1, j); - }, - $signature() { - return this.T._eval$1("List<0>(int,int)"); - } - }; - A.mapAddAll2_closure0.prototype = { - call$2(key, inner) { - var t1 = this.destination, - _0_0 = t1.$index(0, key); - if (_0_0 != null) - _0_0.addAll$1(0, inner); - else - t1.$indexSet(0, key, inner); - }, - $signature() { - return this.K1._eval$1("@<0>")._bind$1(this.K2)._bind$1(this.V)._eval$1("~(1,Map<2,3>)"); - } - }; - A.CssValue0.prototype = { - $eq(_, other) { - if (other == null) - return false; - return this.$ti._is(other) && J.$eq$(other.value, this.value); - }, - get$hashCode(_) { - return J.get$hashCode$(this.value); - }, - toString$0(_) { - return J.toString$0$(this.value); - }, - $isAstNode0: 1, - get$span(receiver) { - return this.span; - } - }; - A.ValueExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitValueExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return this.value.toString$0(0); - }, - get$span(receiver) { - return this.span; - } - }; - A.valueClass_closure.prototype = { - call$0() { - var t2, - t1 = type$.JSClass, - jsClass = t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(B.C__SassNull0.constructor))).constructor); - A.JSClassExtension_setCustomInspect(jsClass, new A.valueClass__closure()); - t1 = type$.String; - t2 = type$.Function; - A.LinkedHashMap_LinkedHashMap$_literal(["asList", new A.valueClass__closure0(), "hasBrackets", new A.valueClass__closure1(), "isTruthy", new A.valueClass__closure2(), "realNull", new A.valueClass__closure3(), "separator", new A.valueClass__closure4()], t1, t2).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); - A.LinkedHashMap_LinkedHashMap$_literal(["sassIndexToListIndex", new A.valueClass__closure5(), "get", new A.valueClass__closure6(), "assertBoolean", new A.valueClass__closure7(), "assertCalculation", new A.valueClass__closure8(), "assertColor", new A.valueClass__closure9(), "assertFunction", new A.valueClass__closure10(), "assertMap", new A.valueClass__closure11(), "assertMixin", new A.valueClass__closure12(), "assertNumber", new A.valueClass__closure13(), "assertString", new A.valueClass__closure14(), "tryMap", new A.valueClass__closure15(), "equals", new A.valueClass__closure16(), "hashCode", new A.valueClass__closure17(), "toString", new A.valueClass__closure18()], t1, t2).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); - return jsClass; - }, - $signature: 16 - }; - A.valueClass__closure.prototype = { - call$1($self) { - return J.toString$0$($self); - }, - $signature: 133 - }; - A.valueClass__closure0.prototype = { - call$1($self) { - return new self.immutable.List($self.get$asList()); - }, - $signature: 616 - }; - A.valueClass__closure1.prototype = { - call$1($self) { - return $self.get$hasBrackets(); - }, - $signature: 52 - }; - A.valueClass__closure2.prototype = { - call$1($self) { - return $self.get$isTruthy(); - }, - $signature: 52 - }; - A.valueClass__closure3.prototype = { - call$1($self) { - return $self.get$realNull(); - }, - $signature: 238 - }; - A.valueClass__closure4.prototype = { - call$1($self) { - return $self.get$separator($self).separator; - }, - $signature: 617 - }; - A.valueClass__closure5.prototype = { - call$3($self, sassIndex, $name) { - return $self.sassIndexToListIndex$2(sassIndex, $name); - }, - call$2($self, sassIndex) { - return this.call$3($self, sassIndex, null); - }, - "call*": "call$3", - $requiredArgCount: 2, - $defaultValues() { - return [null]; - }, - $signature: 618 - }; - A.valueClass__closure6.prototype = { - call$2($self, index) { - return index < 1 && index >= -1 ? $self : self.undefined; - }, - $signature: 246 - }; - A.valueClass__closure7.prototype = { - call$2($self, $name) { - return $self.assertBoolean$1($name); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 619 - }; - A.valueClass__closure8.prototype = { - call$2($self, $name) { - return $self.assertCalculation$1($name); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 620 - }; - A.valueClass__closure9.prototype = { - call$2($self, $name) { - return $self.assertColor$1($name); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 621 - }; - A.valueClass__closure10.prototype = { - call$2($self, $name) { - return $self.assertFunction$1($name); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 622 - }; - A.valueClass__closure11.prototype = { - call$2($self, $name) { - return $self.assertMap$1($name); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 623 - }; - A.valueClass__closure12.prototype = { - call$2($self, $name) { - return $self.assertMixin$1($name); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 624 - }; - A.valueClass__closure13.prototype = { - call$2($self, $name) { - return $self.assertNumber$1($name); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 625 - }; - A.valueClass__closure14.prototype = { - call$2($self, $name) { - return $self.assertString$1($name); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 626 - }; - A.valueClass__closure15.prototype = { - call$1($self) { - return $self.tryMap$0(); - }, - $signature: 627 - }; - A.valueClass__closure16.prototype = { - call$2($self, other) { - return $self.$eq(0, other); - }, - $signature: 628 - }; - A.valueClass__closure17.prototype = { - call$2($self, _) { - return $self.get$hashCode($self); - }, - call$1($self) { - return this.call$2($self, null); - }, - "call*": "call$2", - $requiredArgCount: 1, - $defaultValues() { - return [null]; - }, - $signature: 629 - }; - A.valueClass__closure18.prototype = { - call$1($self) { - return $self.toString$0(0); - }, - $signature: 224 - }; - A.Value0.prototype = { - get$isTruthy() { - return true; - }, - get$separator(_) { - return B.ListSeparator_undecided_null_undecided0; - }, - get$hasBrackets() { - return false; - }, - get$asList() { - return A._setArrayType([this], type$.JSArray_Value_2); - }, - get$lengthAsList() { - return 1; - }, - get$isBlank() { - return false; - }, - get$isSpecialNumber() { - return false; - }, - get$isVar() { - return false; - }, - get$realNull() { - return this; - }, - sassIndexToListIndex$2(sassIndex, $name) { - var t1, index, - indexValue = sassIndex.assertNumber$1($name); - if (indexValue.get$hasUnits()) { - t1 = indexValue.get$unitString(); - A.warnForDeprecation0("$" + A.S($name) + ": Passing a number with unit " + t1 + string$.x20is_de + indexValue.unitSuggestion$1($name == null ? "index" : $name) + string$.x0a_Morex3af, B.Deprecation_jV0); - } - index = indexValue.assertInt$1($name); - if (index === 0) - throw A.wrapException(A.SassScriptException$0("List index may not be 0.", $name)); - if (Math.abs(index) > this.get$lengthAsList()) - throw A.wrapException(A.SassScriptException$0("Invalid index " + sassIndex.toString$0(0) + " for a list with " + this.get$lengthAsList() + " elements.", $name)); - return index < 0 ? this.get$lengthAsList() + index : index - 1; - }, - assertBoolean$1($name) { - return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a boolean.", $name)); - }, - assertCalculation$1($name) { - return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a calculation.", $name)); - }, - assertColor$1($name) { - return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a color.", $name)); - }, - assertFunction$1($name) { - return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a function reference.", $name)); - }, - assertMixin$1($name) { - return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a mixin reference.", $name)); - }, - assertMap$1($name) { - return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a map.", $name)); - }, - tryMap$0() { - return null; - }, - assertNumber$1($name) { - return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a number.", $name)); - }, - assertNumber$0() { - return this.assertNumber$1(null); - }, - assertString$1($name) { - return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a string.", $name)); - }, - assertCommonListStyle$2$allowSlash($name, allowSlash) { - var invalidSeparator, buffer, t1, _this = this, - _s8_ = "Expected"; - if (_this.get$separator(_this) !== B.ListSeparator_ECn0) - invalidSeparator = !allowSlash && _this.get$separator(_this) === B.ListSeparator_cQA0; - else - invalidSeparator = true; - if (!invalidSeparator && !_this.get$hasBrackets()) - return _this.get$asList(); - buffer = new A.StringBuffer(_s8_); - if (_this.get$hasBrackets()) { - t1 = "Expected" + " an unbracketed"; - buffer._contents = t1; - } else - t1 = _s8_; - if (invalidSeparator) { - t1 += _this.get$hasBrackets() ? "," : " a"; - buffer._contents = t1; - t1 = buffer._contents = t1 + " space-"; - t1 = buffer._contents = (allowSlash ? buffer._contents = t1 + " or slash-" : t1) + "separated"; - } - buffer._contents = t1 + (" list, was " + _this.toString$0(0)); - throw A.wrapException(A.SassScriptException$0(buffer.toString$0(0), $name)); - }, - _value$_selectorString$1($name) { - var _0_0 = this._value$_selectorStringOrNull$0(); - if (_0_0 != null) - return _0_0; - throw A.wrapException(A.SassScriptException$0(this.toString$0(0) + string$.x20is_noav, $name)); - }, - _value$_selectorStringOrNull$0() { - var t1, t2, result, _1_0, _i, complex, string, compound, _this = this, _null = null; - if (_this instanceof A.SassString0) - return _this._string0$_text; - if (!(_this instanceof A.SassList0)) - return _null; - t1 = _this._list1$_contents; - t2 = t1.length; - if (t2 === 0) - return _null; - result = A._setArrayType([], type$.JSArray_String); - $label0$1: { - _1_0 = _this._list1$_separator; - if (B.ListSeparator_ECn0 === _1_0) { - for (_i = 0; _i < t2; ++_i) { - complex = t1[_i]; - if (complex instanceof A.SassString0) { - result.push(complex._string0$_text); - continue; - } - if (complex instanceof A.SassList0 && B.ListSeparator_nbm0 === complex._list1$_separator) { - string = complex._value$_selectorStringOrNull$0(); - if (string == null) - return _null; - result.push(string); - continue; - } - return _null; - } - break $label0$1; - } - if (B.ListSeparator_cQA0 === _1_0) - return _null; - for (_i = 0; _i < t2; ++_i) { - compound = t1[_i]; - if (!(compound instanceof A.SassString0)) - return _null; - result.push(compound._string0$_text); - } - } - return B.JSArray_methods.join$1(result, _1_0 === B.ListSeparator_ECn0 ? ", " : " "); - }, - withListContents$2$separator(contents, separator) { - var t1 = separator == null ? this.get$separator(this) : separator, - t2 = this.get$hasBrackets(); - return A.SassList$0(contents, t1, t2); - }, - withListContents$1(contents) { - return this.withListContents$2$separator(contents, null); - }, - greaterThan$1(other) { - return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); - }, - greaterThanOrEquals$1(other) { - return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); - }, - lessThan$1(other) { - return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); - }, - lessThanOrEquals$1(other) { - return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); - }, - times$1(other) { - return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); - }, - modulo$1(other) { - return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); - }, - plus$1(other) { - var t1; - $label0$0: { - if (other instanceof A.SassString0) { - t1 = new A.SassString0(A.serializeValue0(this, false, true) + other._string0$_text, other._string0$_hasQuotes); - break $label0$0; - } - if (other instanceof A.SassCalculation0) - A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); - t1 = new A.SassString0(A.serializeValue0(this, false, true) + A.serializeValue0(other, false, true), false); - break $label0$0; - } - return t1; - }, - minus$1(other) { - return other instanceof A.SassCalculation0 ? A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)) : new A.SassString0(A.serializeValue0(this, false, true) + "-" + A.serializeValue0(other, false, true), false); - }, - dividedBy$1(other) { - return new A.SassString0(A.serializeValue0(this, false, true) + "/" + A.serializeValue0(other, false, true), false); - }, - unaryPlus$0() { - return new A.SassString0("+" + A.serializeValue0(this, false, true), false); - }, - unaryMinus$0() { - return new A.SassString0("-" + A.serializeValue0(this, false, true), false); - }, - unaryNot$0() { - return B.SassBoolean_false0; - }, - withoutSlash$0() { - return this; - }, - toString$0(_) { - return A.serializeValue0(this, true, true); - } - }; - A.VariableExpression0.prototype = { - accept$1$1(visitor) { - return visitor.visitVariableExpression$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.span; - return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, null); - }, - get$span(receiver) { - return this.span; - } - }; - A.VariableDeclaration0.prototype = { - accept$1$1(visitor) { - return visitor.visitVariableDeclaration$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.namespace; - t1 = t1 != null ? "" + (t1 + ".") : ""; - t1 += "$" + this.name + ": " + this.expression.toString$0(0) + ";"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - get$span(receiver) { - return this.span; - } - }; - A.WarnRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitWarnRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - return "@warn " + this.expression.toString$0(0) + ";"; - }, - get$span(receiver) { - return this.span; - } - }; - A.WhileRule0.prototype = { - accept$1$1(visitor) { - return visitor.visitWhileRule$1(0, this); - }, - accept$1(visitor) { - return this.accept$1$1(visitor, type$.dynamic); - }, - toString$0(_) { - var t1 = this.children; - return "@while " + this.condition.toString$0(0) + " {" + (t1 && B.JSArray_methods).join$1(t1, " ") + "}"; - }, - get$span(receiver) { - return this.span; - } - }; - A.XyzD50ColorSpace0.prototype = { - get$isBoundedInternal() { - return false; - }, - convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, x, y, z, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { - var f0, f1, f2, lightness, a, b, t1, _this = this, _null = null; - if (B.LabColorSpace_IF20 === dest || B.LchColorSpace_wv80 === dest) { - f0 = _this._xyz_d50$_convertComponentToLabF$1((x == null ? 0 : x) / 0.9642956764295677); - f1 = _this._xyz_d50$_convertComponentToLabF$1((y == null ? 0 : y) / 1); - f2 = _this._xyz_d50$_convertComponentToLabF$1((z == null ? 0 : z) / 0.8251046025104602); - lightness = missingLightness ? _null : 116 * f1 - 16; - a = 500 * (f0 - f1); - b = 200 * (f1 - f2); - if (dest === B.LabColorSpace_IF20) { - t1 = missingA ? _null : a; - t1 = A.SassColor$_forSpace0(B.LabColorSpace_IF20, lightness, t1, missingB ? _null : b, alpha, _null); - } else - t1 = A.labToLch0(B.LchColorSpace_wv80, lightness, a, b, alpha, missingChroma, missingHue); - return t1; - } - return _this.super$ColorSpace$convertLinear0(dest, x, y, z, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); - }, - convert$5(dest, x, y, z, alpha) { - return this.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, x, y, z, alpha, false, false, false, false, false); - }, - _xyz_d50$_convertComponentToLabF$1(component) { - return component > 0.008856451679035631 ? Math.pow(component, 0.3333333333333333) + 0 : (903.2962962962963 * component + 16) / 116; - }, - toLinear$1(channel) { - return channel; - }, - fromLinear$1(channel) { - return channel; - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { - t1 = $.$get$xyzD50ToLinearSrgb0(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu0 === dest) { - t1 = $.$get$xyzD50ToLinearA98Rgb0(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG0 === dest) { - t1 = $.$get$xyzD50ToLinearProphotoRgb0(); - break $label0$0; - } - if (B.DisplayP3ColorSpace_NQk0 === dest) { - t1 = $.$get$xyzD50ToLinearDisplayP30(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN0 === dest) { - t1 = $.$get$xyzD50ToLinearRec20200(); - break $label0$0; - } - if (B.XyzD65ColorSpace_4CA0 === dest) { - t1 = $.$get$xyzD50ToXyzD650(); - break $label0$0; - } - if (B.LmsColorSpace_8I80 === dest) { - t1 = $.$get$xyzD50ToLms0(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix0(dest); - break $label0$0; - } - return t1; - } - }; - A.XyzD65ColorSpace0.prototype = { - get$isBoundedInternal() { - return false; - }, - toLinear$1(channel) { - return channel; - }, - fromLinear$1(channel) { - return channel; - }, - transformationMatrix$1(dest) { - var t1; - $label0$0: { - if (B.SrgbLinearColorSpace_sEs0 === dest || B.SrgbColorSpace_AD40 === dest || B.RgbColorSpace_mlz0 === dest) { - t1 = $.$get$xyzD65ToLinearSrgb0(); - break $label0$0; - } - if (B.A98RgbColorSpace_bdu0 === dest) { - t1 = $.$get$xyzD65ToLinearA98Rgb0(); - break $label0$0; - } - if (B.ProphotoRgbColorSpace_KiG0 === dest) { - t1 = $.$get$xyzD65ToLinearProphotoRgb0(); - break $label0$0; - } - if (B.DisplayP3ColorSpace_NQk0 === dest) { - t1 = $.$get$xyzD65ToLinearDisplayP30(); - break $label0$0; - } - if (B.Rec2020ColorSpace_2jN0 === dest) { - t1 = $.$get$xyzD65ToLinearRec20200(); - break $label0$0; - } - if (B.XyzD50ColorSpace_2No0 === dest) { - t1 = $.$get$xyzD65ToXyzD500(); - break $label0$0; - } - if (B.LmsColorSpace_8I80 === dest) { - t1 = $.$get$xyzD65ToLms0(); - break $label0$0; - } - t1 = this.super$ColorSpace$transformationMatrix0(dest); - break $label0$0; - } - return t1; - } - }; - (function aliases() { - var _ = J.LegacyJavaScriptObject.prototype; - _.super$LegacyJavaScriptObject$toString = _.toString$0; - _ = A.JsLinkedHashMap.prototype; - _.super$JsLinkedHashMap$internalContainsKey = _.internalContainsKey$1; - _.super$JsLinkedHashMap$internalGet = _.internalGet$1; - _.super$JsLinkedHashMap$internalSet = _.internalSet$2; - _.super$JsLinkedHashMap$internalRemove = _.internalRemove$1; - _ = A._BufferingStreamSubscription.prototype; - _.super$_BufferingStreamSubscription$_add = _._async$_add$1; - _.super$_BufferingStreamSubscription$_addError = _._addError$2; - _ = A.ListBase.prototype; - _.super$ListBase$setRange = _.setRange$4; - _ = A.Iterable.prototype; - _.super$Iterable$where = _.where$1; - _.super$Iterable$skipWhile = _.skipWhile$1; - _ = A.ModifiableCssParentNode.prototype; - _.super$ModifiableCssParentNode$addChild = _.addChild$1; - _ = A.SimpleSelector.prototype; - _.super$SimpleSelector$addSuffix = _.addSuffix$1; - _.super$SimpleSelector$unify = _.unify$1; - _.super$SimpleSelector$isSuperselector = _.isSuperselector$1; - _ = A.Parser.prototype; - _.super$Parser$silentComment = _.silentComment$0; - _ = A.StylesheetParser.prototype; - _.super$StylesheetParser$importArgument = _.importArgument$0; - _.super$StylesheetParser$namespacedExpression = _.namespacedExpression$2; - _ = A.Value.prototype; - _.super$Value$assertMap = _.assertMap$1; - _.super$Value$plus = _.plus$1; - _.super$Value$minus = _.minus$1; - _.super$Value$dividedBy = _.dividedBy$1; - _.super$Value$toString = _.toString$0; - _ = A.ColorSpace.prototype; - _.super$ColorSpace$convert = _.convert$5; - _.super$ColorSpace$convertLinear = _.convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness; - _.super$ColorSpace$transformationMatrix = _.transformationMatrix$1; - _ = A.SassNumber.prototype; - _.super$SassNumber$convertValueToMatch = _.convertValueToMatch$3; - _.super$SassNumber$coerce = _.coerce$3; - _.super$SassNumber$coerceValue = _.coerceValue$3; - _.super$SassNumber$coerceValueToUnit = _.coerceValueToUnit$2; - _.super$SassNumber$coerceToMatch = _.coerceToMatch$3; - _.super$SassNumber$coerceValueToMatch = _.coerceValueToMatch$3; - _.super$SassNumber$greaterThan = _.greaterThan$1; - _.super$SassNumber$greaterThanOrEquals = _.greaterThanOrEquals$1; - _.super$SassNumber$lessThan = _.lessThan$1; - _.super$SassNumber$lessThanOrEquals = _.lessThanOrEquals$1; - _.super$SassNumber$modulo = _.modulo$1; - _.super$SassNumber$plus = _.plus$1; - _.super$SassNumber$minus = _.minus$1; - _.super$SassNumber$times = _.times$1; - _.super$SassNumber$dividedBy = _.dividedBy$1; - _ = A.AnySelectorVisitor.prototype; - _.super$AnySelectorVisitor$visitComplexSelector = _.visitComplexSelector$1; - _ = A.EveryCssVisitor.prototype; - _.super$EveryCssVisitor$visitCssStyleRule = _.visitCssStyleRule$1; - _ = A.ReplaceExpressionVisitor.prototype; - _.super$ReplaceExpressionVisitor$visitBinaryOperationExpression = _.visitBinaryOperationExpression$1; - _.super$ReplaceExpressionVisitor$visitUnaryOperationExpression = _.visitUnaryOperationExpression$1; - _ = A.SourceSpanMixin.prototype; - _.super$SourceSpanMixin$compareTo = _.compareTo$1; - _.super$SourceSpanMixin$$eq = _.$eq; - _ = A.StringScanner.prototype; - _.super$StringScanner$readChar = _.readChar$0; - _.super$StringScanner$scanChar = _.scanChar$1; - _.super$StringScanner$scan = _.scan$1; - _.super$StringScanner$matches = _.matches$1; - _ = A.AnySelectorVisitor0.prototype; - _.super$AnySelectorVisitor$visitComplexSelector0 = _.visitComplexSelector$1; - _ = A.EveryCssVisitor0.prototype; - _.super$EveryCssVisitor$visitCssStyleRule0 = _.visitCssStyleRule$1; - _ = A.ModifiableCssParentNode0.prototype; - _.super$ModifiableCssParentNode$addChild0 = _.addChild$1; - _ = A.SassNumber0.prototype; - _.super$SassNumber$convertToMatch = _.convertToMatch$3; - _.super$SassNumber$convertValueToMatch0 = _.convertValueToMatch$3; - _.super$SassNumber$coerce0 = _.coerce$3; - _.super$SassNumber$coerceValue0 = _.coerceValue$3; - _.super$SassNumber$coerceValueToUnit0 = _.coerceValueToUnit$2; - _.super$SassNumber$coerceToMatch0 = _.coerceToMatch$3; - _.super$SassNumber$coerceValueToMatch0 = _.coerceValueToMatch$3; - _.super$SassNumber$greaterThan0 = _.greaterThan$1; - _.super$SassNumber$greaterThanOrEquals0 = _.greaterThanOrEquals$1; - _.super$SassNumber$lessThan0 = _.lessThan$1; - _.super$SassNumber$lessThanOrEquals0 = _.lessThanOrEquals$1; - _.super$SassNumber$modulo0 = _.modulo$1; - _.super$SassNumber$plus0 = _.plus$1; - _.super$SassNumber$minus0 = _.minus$1; - _.super$SassNumber$times0 = _.times$1; - _.super$SassNumber$dividedBy0 = _.dividedBy$1; - _ = A.Parser1.prototype; - _.super$Parser$silentComment0 = _.silentComment$0; - _ = A.ReplaceExpressionVisitor0.prototype; - _.super$ReplaceExpressionVisitor$visitBinaryOperationExpression0 = _.visitBinaryOperationExpression$1; - _.super$ReplaceExpressionVisitor$visitUnaryOperationExpression0 = _.visitUnaryOperationExpression$1; - _ = A.SimpleSelector0.prototype; - _.super$SimpleSelector$addSuffix0 = _.addSuffix$1; - _.super$SimpleSelector$unify0 = _.unify$1; - _.super$SimpleSelector$isSuperselector0 = _.isSuperselector$1; - _ = A.ColorSpace0.prototype; - _.super$ColorSpace$convert0 = _.convert$5; - _.super$ColorSpace$convertLinear0 = _.convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness; - _.super$ColorSpace$transformationMatrix0 = _.transformationMatrix$1; - _ = A.StylesheetParser0.prototype; - _.super$StylesheetParser$importArgument0 = _.importArgument$0; - _.super$StylesheetParser$namespacedExpression0 = _.namespacedExpression$2; - _ = A.Value0.prototype; - _.super$Value$assertMap0 = _.assertMap$1; - _.super$Value$plus0 = _.plus$1; - _.super$Value$minus0 = _.minus$1; - _.super$Value$dividedBy0 = _.dividedBy$1; - _.super$Value$toString0 = _.toString$0; - })(); - (function installTearOffs() { - var _static_2 = hunkHelpers._static_2, - _instance_1_i = hunkHelpers._instance_1i, - _instance_1_u = hunkHelpers._instance_1u, - _static_1 = hunkHelpers._static_1, - _static_0 = hunkHelpers._static_0, - _static = hunkHelpers.installStaticTearOff, - _instance = hunkHelpers.installInstanceTearOff, - _instance_2_u = hunkHelpers._instance_2u, - _instance_0_i = hunkHelpers._instance_0i, - _instance_0_u = hunkHelpers._instance_0u; - _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 269); - _instance_1_i(J.JSArray.prototype, "get$contains", "contains$1", 9); - _instance_1_i(A._CastIterableBase.prototype, "get$contains", "contains$1", 9); - _instance_1_u(A.CastMap.prototype, "get$containsKey", "containsKey$1", 9); - _instance_1_u(A.ConstantStringMap.prototype, "get$containsKey", "containsKey$1", 9); - _instance_1_i(A.ConstantStringSet.prototype, "get$contains", "contains$1", 9); - _instance_1_i(A.GeneralConstantSet.prototype, "get$contains", "contains$1", 9); - _instance_1_u(A.JsLinkedHashMap.prototype, "get$containsKey", "containsKey$1", 9); - _static_1(A, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 137); - _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 137); - _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 137); - _static_0(A, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); - _static_1(A, "async___nullDataHandler$closure", "_nullDataHandler", 68); - _static_2(A, "async___nullErrorHandler$closure", "_nullErrorHandler", 69); - _static_0(A, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); - _static(A, "async___rootHandleUncaughtError$closure", 5, null, ["call$5"], ["_rootHandleUncaughtError"], 632, 0); - _static(A, "async___rootRun$closure", 4, null, ["call$1$4", "call$4"], ["_rootRun", function($self, $parent, zone, f) { - return A._rootRun($self, $parent, zone, f, type$.dynamic); - }], 633, 1); - _static(A, "async___rootRunUnary$closure", 5, null, ["call$2$5", "call$5"], ["_rootRunUnary", function($self, $parent, zone, f, arg) { - var t1 = type$.dynamic; - return A._rootRunUnary($self, $parent, zone, f, arg, t1, t1); - }], 634, 1); - _static(A, "async___rootRunBinary$closure", 6, null, ["call$3$6", "call$6"], ["_rootRunBinary", function($self, $parent, zone, f, arg1, arg2) { - var t1 = type$.dynamic; - return A._rootRunBinary($self, $parent, zone, f, arg1, arg2, t1, t1, t1); - }], 635, 1); - _static(A, "async___rootRegisterCallback$closure", 4, null, ["call$1$4", "call$4"], ["_rootRegisterCallback", function($self, $parent, zone, f) { - return A._rootRegisterCallback($self, $parent, zone, f, type$.dynamic); - }], 636, 0); - _static(A, "async___rootRegisterUnaryCallback$closure", 4, null, ["call$2$4", "call$4"], ["_rootRegisterUnaryCallback", function($self, $parent, zone, f) { - var t1 = type$.dynamic; - return A._rootRegisterUnaryCallback($self, $parent, zone, f, t1, t1); - }], 637, 0); - _static(A, "async___rootRegisterBinaryCallback$closure", 4, null, ["call$3$4", "call$4"], ["_rootRegisterBinaryCallback", function($self, $parent, zone, f) { - var t1 = type$.dynamic; - return A._rootRegisterBinaryCallback($self, $parent, zone, f, t1, t1, t1); - }], 638, 0); - _static(A, "async___rootErrorCallback$closure", 5, null, ["call$5"], ["_rootErrorCallback"], 639, 0); - _static(A, "async___rootScheduleMicrotask$closure", 4, null, ["call$4"], ["_rootScheduleMicrotask"], 640, 0); - _static(A, "async___rootCreateTimer$closure", 5, null, ["call$5"], ["_rootCreateTimer"], 641, 0); - _static(A, "async___rootCreatePeriodicTimer$closure", 5, null, ["call$5"], ["_rootCreatePeriodicTimer"], 642, 0); - _static(A, "async___rootPrint$closure", 4, null, ["call$4"], ["_rootPrint"], 643, 0); - _static_1(A, "async___printToZone$closure", "_printToZone", 91); - _static(A, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 644, 0); - _instance(A._AsyncCompleter.prototype, "get$complete", 0, 0, function() { - return [null]; - }, ["call$1", "call$0"], ["complete$1", "complete$0"], 226, 0, 0); - _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 69); - var _; - _instance_1_i(_ = A._StreamController.prototype, "get$add", "add$1", 36); - _instance(_, "get$addError", 0, 1, function() { - return [null]; - }, ["call$2", "call$1"], ["addError$2", "addError$1"], 149, 0, 0); - _instance_0_i(_, "get$close", "close$0", 365); - _instance_1_u(_, "get$_async$_add", "_async$_add$1", 36); - _instance_2_u(_, "get$_addError", "_addError$2", 69); - _instance_0_u(_, "get$_close", "_close$0", 0); - _instance_0_u(_ = A._ControllerSubscription.prototype, "get$_async$_onPause", "_async$_onPause$0", 0); - _instance_0_u(_, "get$_async$_onResume", "_async$_onResume$0", 0); - _instance(_ = A._BufferingStreamSubscription.prototype, "get$pause", 1, 0, null, ["call$1", "call$0"], ["pause$1", "pause$0"], 513, 0, 0); - _instance_0_i(_, "get$resume", "resume$0", 0); - _instance_0_u(_, "get$_async$_onPause", "_async$_onPause$0", 0); - _instance_0_u(_, "get$_async$_onResume", "_async$_onResume$0", 0); - _instance_1_u(_ = A._StreamIterator.prototype, "get$_onData", "_onData$1", 36); - _instance_2_u(_, "get$_onError", "_onError$2", 69); - _instance_0_u(_, "get$_onDone", "_onDone$0", 0); - _instance_0_u(_ = A._ForwardingStreamSubscription.prototype, "get$_async$_onPause", "_async$_onPause$0", 0); - _instance_0_u(_, "get$_async$_onResume", "_async$_onResume$0", 0); - _instance_1_u(_, "get$_handleData", "_handleData$1", 36); - _instance_2_u(_, "get$_handleError", "_handleError$2", 563); - _instance_0_u(_, "get$_handleDone", "_handleDone$0", 0); - _static_2(A, "collection___defaultEquals$closure", "_defaultEquals", 270); - _static_1(A, "collection___defaultHashCode$closure", "_defaultHashCode", 271); - _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 269); - _instance_1_u(A._HashMap.prototype, "get$containsKey", "containsKey$1", 9); - _instance_1_u(A._LinkedCustomHashMap.prototype, "get$containsKey", "containsKey$1", 9); - _instance(_ = A._LinkedHashSet.prototype, "get$_newSimilarSet", 0, 0, null, ["call$1$0", "call$0"], ["_newSimilarSet$1$0", "_newSimilarSet$0"], 169, 0, 0); - _instance_1_i(_, "get$contains", "contains$1", 9); - _instance_1_i(_, "get$add", "add$1", 9); - _instance(A._LinkedIdentityHashSet.prototype, "get$_newSimilarSet", 0, 0, null, ["call$1$0", "call$0"], ["_newSimilarSet$1$0", "_newSimilarSet$0"], 169, 0, 0); - _instance_1_u(A.MapBase.prototype, "get$containsKey", "containsKey$1", 9); - _instance_1_u(A.MapView.prototype, "get$containsKey", "containsKey$1", 9); - _instance_1_i(A.UnmodifiableSetView.prototype, "get$contains", "contains$1", 9); - _static_1(A, "convert___defaultToEncodable$closure", "_defaultToEncodable", 111); - _instance_1_u(A._JsonMap.prototype, "get$containsKey", "containsKey$1", 9); - _static_1(A, "core__identityHashCode$closure", "identityHashCode", 271); - _static_2(A, "core__identical$closure", "identical", 270); - _static_1(A, "core_Uri_decodeComponent$closure", "Uri_decodeComponent", 6); - _instance_1_i(A.Iterable.prototype, "get$contains", "contains$1", 9); - _instance_1_i(A.StringBuffer.prototype, "get$write", "write$1", 36); - _static(A, "math0__max$closure", 2, null, ["call$1$2", "call$2"], ["max", function(a, b) { - return A.max(a, b, type$.num); - }], 647, 1); - _instance_1_u(A.ArgResults.prototype, "get$wasParsed", "wasParsed$1", 5); - _instance_1_u(_ = A.StreamCompleter.prototype, "get$setSourceStream", "setSourceStream$1", 36); - _instance(_, "get$setError", 0, 1, function() { - return [null]; - }, ["call$2", "call$1"], ["setError$2", "setError$1"], 149, 0, 0); - _instance_0_u(_ = A.StreamGroup.prototype, "get$_onListen", "_onListen$0", 0); - _instance_0_u(_, "get$_onPause", "_onPause$0", 0); - _instance_0_u(_, "get$_onResume", "_onResume$0", 0); - _instance_0_u(_, "get$_onCancel", "_onCancel$0", 235); - _instance_0_i(A.ReplAdapter.prototype, "get$exit", "exit$0", 0); - _instance_1_i(A.EmptyUnmodifiableSet.prototype, "get$contains", "contains$1", 9); - _instance_1_i(A.UnionSet.prototype, "get$contains", "contains$1", 9); - _instance_1_i(A._DelegatingIterableBase.prototype, "get$contains", "contains$1", 9); - _instance_1_i(A.MapKeySet.prototype, "get$contains", "contains$1", 9); - _static_1(A, "version_Version___parse_tearOff$closure", "Version___parse_tearOff", 231); - _instance_1_u(A.VersionRange.prototype, "get$allows", "allows$1", 346); - _instance_1_u(A._IsInvisibleVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 19); - _instance_1_u(A._IsBogusVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 19); - _instance_1_u(A._IsUselessVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 19); - _instance_1_u(A.SelectorList.prototype, "get$isSuperselector", "isSuperselector$1", 70); - _instance_1_u(A.PseudoSelector.prototype, "get$isSuperselector", "isSuperselector$1", 13); - _instance_1_u(A.SimpleSelector.prototype, "get$isSuperselector", "isSuperselector$1", 13); - _instance_1_u(A.TypeSelector.prototype, "get$isSuperselector", "isSuperselector$1", 13); - _instance_1_u(A.UniversalSelector.prototype, "get$isSuperselector", "isSuperselector$1", 13); - _instance_1_u(A.EmptyExtensionStore.prototype, "get$addExtensions", "addExtensions$1", 208); - _instance_1_u(A.ExtensionStore.prototype, "get$addExtensions", "addExtensions$1", 208); - _static_1(A, "functions___isUnique$closure", "_isUnique", 13); - _instance_2_u(A.NodePackageImporter.prototype, "get$_compareExpansionKeys", "_compareExpansionKeys$2", 146); - _instance_0_u(A.CssParser.prototype, "get$silentComment", "silentComment$0", 21); - _instance_0_u(_ = A.Parser.prototype, "get$whitespace", "whitespace$0", 0); - _instance_0_u(_, "get$silentComment", "silentComment$0", 21); - _instance_0_u(_, "get$loudComment", "loudComment$0", 0); - _instance_0_u(_, "get$string", "string$0", 30); - _instance(_, "get$error", 1, 2, function() { - return [null]; - }, ["call$3", "call$2"], ["error$3", "error$2"], 157, 0, 0); - _instance_0_u(A.SassParser.prototype, "get$loudComment", "loudComment$0", 0); - _instance(_ = A.StylesheetParser.prototype, "get$_statement", 0, 0, null, ["call$1$root", "call$0"], ["_statement$1$root", "_statement$0"], 546, 0, 0); - _instance_0_u(_, "get$_declarationChild", "_declarationChild$0", 128); - _instance_0_u(_, "get$_functionChild", "_functionChild$0", 128); - _instance(_, "get$_expression", 0, 0, null, ["call$3$bracketList$singleEquals$until", "call$0", "call$2$singleEquals$until", "call$1$bracketList", "call$1$until"], ["_expression$3$bracketList$singleEquals$until", "_expression$0", "_expression$2$singleEquals$until", "_expression$1$bracketList", "_expression$1$until"], 565, 0, 0); - _instance_0_u(_, "get$_number", "_number$0", 566); - _instance(A.LazyFileSpan.prototype, "get$message", 1, 1, function() { - return {color: null}; - }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 125, 0, 0); - _instance_1_u(A.LimitedMapView.prototype, "get$containsKey", "containsKey$1", 9); - _instance_1_u(A.MergedMapView.prototype, "get$containsKey", "containsKey$1", 9); - _instance(A.MultiSpan.prototype, "get$message", 1, 1, function() { - return {color: null}; - }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 161, 0, 0); - _instance_1_i(A.NoSourceMapBuffer.prototype, "get$write", "write$1", 36); - _instance_1_u(A.PrefixedMapView.prototype, "get$containsKey", "containsKey$1", 9); - _instance_1_u(A.PublicMemberMapView.prototype, "get$containsKey", "containsKey$1", 9); - _instance_1_i(A.SourceMapBuffer.prototype, "get$write", "write$1", 36); - _instance_1_u(A.UnprefixedMapView.prototype, "get$containsKey", "containsKey$1", 9); - _static_1(A, "utils__isPublic$closure", "isPublic", 5); - _static_1(A, "calculation_SassCalculation__simplify$closure", "SassCalculation__simplify", 73); - _instance_1_u(A.ColorChannel.prototype, "get$isAnalogous", "isAnalogous$1", 94); - _instance_1_u(A.SrgbColorSpace.prototype, "get$toLinear", "toLinear$1", 15); - _instance_1_u(A.AnySelectorVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 19); - _instance(_ = A._EvaluateVisitor0.prototype, "get$_async_evaluate$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_async_evaluate$_interpolationToValue$3$trim$warnForColor", "_async_evaluate$_interpolationToValue$1", "_async_evaluate$_interpolationToValue$2$warnForColor"], 363, 0, 0); - _instance_1_u(_, "get$_async_evaluate$_expressionNode", "_async_evaluate$_expressionNode$1", 164); - _instance(_ = A._EvaluateVisitor.prototype, "get$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_interpolationToValue$3$trim$warnForColor", "_interpolationToValue$1", "_interpolationToValue$2$warnForColor"], 567, 0, 0); - _instance_1_u(_, "get$_expressionNode", "_expressionNode$1", 164); - _instance_1_i(_ = A.RecursiveStatementVisitor.prototype, "get$visitContentBlock", "visitContentBlock$1", 275); - _instance_1_u(_, "get$visitChildren", "visitChildren$1", 276); - _instance_1_u(_ = A.SelectorSearchVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", "SelectorSearchVisitor.T?(ComplexSelector)"); - _instance_1_u(_, "get$visitSelectorList", "visitSelectorList$1", "SelectorSearchVisitor.T?(SelectorList)"); - _instance_1_u(_ = A._SerializeVisitor.prototype, "get$_visitMediaQuery", "_visitMediaQuery$1", 279); - _instance_1_u(_, "get$_specificities", "_specificities$1", 280); - _instance_1_u(_, "get$_writeCalculationValue", "_writeCalculationValue$1", 107); - _instance(_, "get$_writeChannel", 0, 1, null, ["call$2", "call$1"], ["_writeChannel$2", "_writeChannel$1"], 191, 0, 0); - _instance_1_u(_, "get$visitSelectorList", "visitSelectorList$1", 282); - _instance_1_u(_, "get$_requiresSemicolon", "_requiresSemicolon$1", 7); - _instance_1_i(_ = A.StatementSearchVisitor.prototype, "get$visitContentBlock", "visitContentBlock$1", "StatementSearchVisitor.T?(ContentBlock)"); - _instance_1_u(_, "get$visitChildren", "visitChildren$1", "StatementSearchVisitor.T?(List)"); - _instance(A.SourceSpanMixin.prototype, "get$message", 1, 1, function() { - return {color: null}; - }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 125, 0, 0); - _static_1(A, "frame_Frame___parseVM_tearOff$closure", "Frame___parseVM_tearOff", 105); - _static_1(A, "frame_Frame___parseV8_tearOff$closure", "Frame___parseV8_tearOff", 105); - _static_1(A, "frame_Frame___parseFirefox_tearOff$closure", "Frame___parseFirefox_tearOff", 105); - _static_1(A, "frame_Frame___parseFriendly_tearOff$closure", "Frame___parseFriendly_tearOff", 105); - _static_1(A, "trace_Trace___parseVM_tearOff$closure", "Trace___parseVM_tearOff", 228); - _static_1(A, "trace_Trace___parseFriendly_tearOff$closure", "Trace___parseFriendly_tearOff", 228); - _static(A, "from_handlers__TransformByHandlers__defaultHandleError$closure", 3, null, ["call$1$3", "call$3"], ["TransformByHandlers__defaultHandleError", function(error, stackTrace, sink) { - return A.TransformByHandlers__defaultHandleError(error, stackTrace, sink, type$.dynamic); - }], 650, 0); - _static(A, "rate_limit___collect$closure", 2, null, ["call$1$2", "call$2"], ["_collect", function($event, soFar) { - return A._collect($event, soFar, type$.dynamic); - }], 651, 0); - _instance_1_u(A.AnySelectorVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 20); - _instance(_ = A._EvaluateVisitor2.prototype, "get$_async_evaluate0$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_async_evaluate0$_interpolationToValue$3$trim$warnForColor", "_async_evaluate0$_interpolationToValue$1", "_async_evaluate0$_interpolationToValue$2$warnForColor"], 322, 0, 0); - _instance_1_u(_, "get$_async_evaluate0$_expressionNode", "_async_evaluate0$_expressionNode$1", 202); - _static_1(A, "calculation1___assertCalculationValue$closure", "_assertCalculationValue", 107); - _static_1(A, "calculation1___isValidClampArg$closure", "_isValidClampArg", 9); - _static_1(A, "calculation0_SassCalculation__simplify$closure", "SassCalculation__simplify0", 73); - _instance_1_u(A.ColorChannel0.prototype, "get$isAnalogous", "isAnalogous$1", 77); - _static(A, "compile__compile$closure", 1, function() { - return [null]; - }, ["call$2", "call$1"], ["compile0", function(path) { - return A.compile0(path, null); - }], 652, 0); - _static(A, "compile__compileString$closure", 1, function() { - return [null]; - }, ["call$2", "call$1"], ["compileString0", function(text) { - return A.compileString0(text, null); - }], 653, 0); - _static(A, "compile__compileAsync$closure", 1, function() { - return [null]; - }, ["call$2", "call$1"], ["compileAsync1", function(path) { - return A.compileAsync1(path, null); - }], 654, 0); - _static(A, "compile__compileStringAsync$closure", 1, function() { - return [null]; - }, ["call$2", "call$1"], ["compileStringAsync1", function(text) { - return A.compileStringAsync1(text, null); - }], 655, 0); - _static_1(A, "compile___parseImporter$closure", "_parseImporter0", 656); - _static_1(A, "compile___simplifyCalcArg$closure", "_simplifyCalcArg", 73); - _static_0(A, "compiler__initCompiler$closure", "initCompiler", 657); - _static_0(A, "compiler__initAsyncCompiler$closure", "initAsyncCompiler", 658); - _instance_0_u(A.CssParser0.prototype, "get$silentComment", "silentComment$0", 21); - _instance_1_u(A.EmptyExtensionStore0.prototype, "get$addExtensions", "addExtensions$1", 232); - _instance(_ = A._EvaluateVisitor1.prototype, "get$_evaluate0$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_evaluate0$_interpolationToValue$3$trim$warnForColor", "_evaluate0$_interpolationToValue$1", "_evaluate0$_interpolationToValue$2$warnForColor"], 453, 0, 0); - _instance_1_u(_, "get$_evaluate0$_expressionNode", "_evaluate0$_expressionNode$1", 202); - _instance_1_u(A.ExtensionStore0.prototype, "get$addExtensions", "addExtensions$1", 232); - _static_1(A, "functions0___isUnique$closure", "_isUnique0", 14); - _static_1(A, "immutable__jsToDartList$closure", "jsToDartList", 659); - _instance(A.LazyFileSpan0.prototype, "get$message", 1, 1, function() { - return {color: null}; - }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 125, 0, 0); - _static_2(A, "legacy__render$closure", "render", 660); - _static_1(A, "legacy__renderSync$closure", "renderSync", 661); - _instance_1_u(A.LimitedMapView0.prototype, "get$containsKey", "containsKey$1", 9); - _instance_1_u(A.SelectorList0.prototype, "get$isSuperselector", "isSuperselector$1", 71); - _instance_1_u(A.MergedMapView0.prototype, "get$containsKey", "containsKey$1", 9); - _instance(A.MultiSpan0.prototype, "get$message", 1, 1, function() { - return {color: null}; - }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 161, 0, 0); - _instance_1_i(A.NoSourceMapBuffer0.prototype, "get$write", "write$1", 36); - _instance_2_u(A.NodePackageImporter0.prototype, "get$_node_package$_compareExpansionKeys", "_node_package$_compareExpansionKeys$2", 146); - _static_0(A, "parser0__loadParserExports$closure", "loadParserExports", 662); - _static(A, "parser0___parse$closure", 3, null, ["call$3"], ["_parse"], 663, 0); - _static_1(A, "parser0___parseIdentifier$closure", "_parseIdentifier", 664); - _static_1(A, "parser0___toCssIdentifier$closure", "_toCssIdentifier", 6); - _instance_0_u(_ = A.Parser1.prototype, "get$whitespace", "whitespace$0", 0); - _instance_0_u(_, "get$silentComment", "silentComment$0", 21); - _instance_0_u(_, "get$loudComment", "loudComment$0", 0); - _instance_0_u(_, "get$string", "string$0", 30); - _instance(_, "get$error", 1, 2, function() { - return [null]; - }, ["call$3", "call$2"], ["error$3", "error$2"], 157, 0, 0); - _instance_1_u(A.PrefixedMapView0.prototype, "get$containsKey", "containsKey$1", 9); - _instance_1_u(A.PseudoSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 14); - _instance_1_u(A.PublicMemberMapView0.prototype, "get$containsKey", "containsKey$1", 9); - _instance_0_u(A.SassParser0.prototype, "get$loudComment", "loudComment$0", 0); - _instance_1_u(A._IsInvisibleVisitor2.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 20); - _instance_1_u(A._IsBogusVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 20); - _instance_1_u(A._IsUselessVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 20); - _instance_1_u(_ = A.SelectorSearchVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", "SelectorSearchVisitor0.T?(ComplexSelector0)"); - _instance_1_u(_, "get$visitSelectorList", "visitSelectorList$1", "SelectorSearchVisitor0.T?(SelectorList0)"); - _instance_1_u(_ = A._SerializeVisitor0.prototype, "get$_serialize0$_visitMediaQuery", "_serialize0$_visitMediaQuery$1", 572); - _instance_1_u(_, "get$_serialize0$_specificities", "_serialize0$_specificities$1", 573); - _instance_1_u(_, "get$_serialize0$_writeCalculationValue", "_serialize0$_writeCalculationValue$1", 107); - _instance(_, "get$_serialize0$_writeChannel", 0, 1, null, ["call$2", "call$1"], ["_serialize0$_writeChannel$2", "_serialize0$_writeChannel$1"], 191, 0, 0); - _instance_1_u(_, "get$visitSelectorList", "visitSelectorList$1", 574); - _instance_1_u(_, "get$_serialize0$_requiresSemicolon", "_serialize0$_requiresSemicolon$1", 8); - _instance_1_u(A.SimpleSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 14); - _instance_1_i(A.SourceMapBuffer0.prototype, "get$write", "write$1", 36); - _instance_1_u(A.SrgbColorSpace0.prototype, "get$toLinear", "toLinear$1", 15); - _instance_1_i(_ = A.StatementSearchVisitor0.prototype, "get$visitContentBlock", "visitContentBlock$1", "StatementSearchVisitor0.T?(ContentBlock0)"); - _instance_1_u(_, "get$visitChildren", "visitChildren$1", "StatementSearchVisitor0.T?(List)"); - _instance(_ = A.StylesheetParser0.prototype, "get$_stylesheet0$_statement", 0, 0, null, ["call$1$root", "call$0"], ["_stylesheet0$_statement$1$root", "_stylesheet0$_statement$0"], 593, 0, 0); - _instance_0_u(_, "get$_stylesheet0$_declarationChild", "_stylesheet0$_declarationChild$0", 136); - _instance_0_u(_, "get$_stylesheet0$_functionChild", "_stylesheet0$_functionChild$0", 136); - _instance_0_u(_, "get$_stylesheet0$_number", "_stylesheet0$_number$0", 595); - _instance_1_u(A.TypeSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 14); - _instance_1_u(A.UniversalSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 14); - _instance_1_u(A.UnprefixedMapView0.prototype, "get$containsKey", "containsKey$1", 9); - _static_1(A, "utils3__jsToDartUrl$closure", "jsToDartUrl", 665); - _static_1(A, "utils3__dartToJSUrl$closure", "dartToJSUrl", 263); - _static_1(A, "utils1__isPublic$closure", "isPublic0", 5); - _static(A, "path__absolute$closure", 1, function() { - return [null, null, null, null, null, null, null, null, null, null, null, null, null, null]; - }, ["call$15", "call$1", "call$2", "call$3", "call$4", "call$5", "call$6"], ["absolute", function(part1) { - var _null = null; - return A.absolute(part1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); - }, function(part1, part2) { - var _null = null; - return A.absolute(part1, part2, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); - }, function(part1, part2, part3) { - var _null = null; - return A.absolute(part1, part2, part3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); - }, function(part1, part2, part3, part4) { - var _null = null; - return A.absolute(part1, part2, part3, part4, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); - }, function(part1, part2, part3, part4, part5) { - var _null = null; - return A.absolute(part1, part2, part3, part4, part5, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); - }, function(part1, part2, part3, part4, part5, part6) { - var _null = null; - return A.absolute(part1, part2, part3, part4, part5, part6, _null, _null, _null, _null, _null, _null, _null, _null, _null); - }], 666, 0); - _static_1(A, "path__toUri$closure", "toUri", 130); - _static_1(A, "path__prettyUri$closure", "prettyUri", 667); - _static_2(A, "number0__fuzzyLessThan$closure", "fuzzyLessThan", 49); - _static_2(A, "number0__fuzzyLessThanOrEquals$closure", "fuzzyLessThanOrEquals", 49); - _static_2(A, "number0__fuzzyGreaterThan$closure", "fuzzyGreaterThan", 49); - _static_2(A, "number0__fuzzyGreaterThanOrEquals$closure", "fuzzyGreaterThanOrEquals", 49); - _static_2(A, "number0__moduloLikeSass$closure", "moduloLikeSass", 57); - _static_1(A, "number0__sqrt$closure", "sqrt", 56); - _static_1(A, "number0__sin$closure", "sin", 56); - _static_1(A, "number0__cos$closure", "cos", 56); - _static_1(A, "number0__tan$closure", "tan", 56); - _static_1(A, "number0__atan$closure", "atan", 56); - _static_1(A, "number0__asin$closure", "asin", 56); - _static_1(A, "number0__acos$closure", "acos", 56); - _static_1(A, "utils0__srgbAndDisplayP3FromLinear$closure", "srgbAndDisplayP3FromLinear", 15); - _static_2(A, "number2__fuzzyLessThan$closure", "fuzzyLessThan0", 49); - _static_2(A, "number2__fuzzyLessThanOrEquals$closure", "fuzzyLessThanOrEquals0", 49); - _static_2(A, "number2__fuzzyGreaterThan$closure", "fuzzyGreaterThan0", 49); - _static_2(A, "number2__fuzzyGreaterThanOrEquals$closure", "fuzzyGreaterThanOrEquals0", 49); - _static_2(A, "number2__moduloLikeSass$closure", "moduloLikeSass0", 57); - _static_1(A, "number2__sqrt$closure", "sqrt0", 54); - _static_1(A, "number2__sin$closure", "sin0", 54); - _static_1(A, "number2__cos$closure", "cos0", 54); - _static_1(A, "number2__tan$closure", "tan0", 54); - _static_1(A, "number2__atan$closure", "atan0", 54); - _static_1(A, "number2__asin$closure", "asin0", 54); - _static_1(A, "number2__acos$closure", "acos0", 54); - _static_1(A, "sass__main$closure", "main1", 494); - _static_1(A, "utils4__validateUrlScheme$closure", "validateUrlScheme", 91); - _static_1(A, "utils2__srgbAndDisplayP3FromLinear$closure", "srgbAndDisplayP3FromLinear0", 15); - _static_1(A, "value0__wrapValue$closure", "wrapValue", 448); - })(); - (function inheritance() { - var _mixin = hunkHelpers.mixin, - _inherit = hunkHelpers.inherit, - _inheritMany = hunkHelpers.inheritMany; - _inherit(A.Object, null); - _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, J.ArrayIterator, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.SkipWhileIterator, A.EmptyIterator, A.FollowedByIterator, A.WhereTypeIterator, A.NonNullsIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A.Symbol, A._Record, A.MapView, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.SetBase, A.JSInvocationMirror, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A._Required, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A._SyncStarIterator, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A._StreamController, A._SyncStreamControllerDispatch, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._AddStreamState, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._StreamIterator, A._ZoneFunction, A._ZoneSpecification, A._ZoneDelegate, A._Zone, A._HashMapKeyIterator, A._LinkedHashSetCell, A._LinkedHashSetIterator, A._MapBaseValueIterator, A._UnmodifiableMapMixin, A._ListQueueIterator, A._UnmodifiableSetMixin, A.Codec, A.Converter, A._Base64Encoder, A.ByteConversionSink, A._JsonStringifier, A.StringConversionSink, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.RuneIterator, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.Expando, A.NullRejectionException, A._JSRandom, A.ArgParser, A.ArgResults, A.Option, A.OptionType, A.Parser0, A._Usage, A.FutureGroup, A.ErrorResult, A.ValueResult, A.StreamCompleter, A.StreamGroup, A._StreamGroupState, A.StreamQueue, A._NextRequest, A.Repl, A.ReplAdapter, A.DefaultEquality, A.IterableEquality, A.ListEquality, A._MapEntry, A.MapEquality, A._QueueList_Object_ListMixin, A._DelegatingIterableBase, A.UnmodifiableSetMixin, A.Context, A._PathDirection, A._PathRelation, A.Style, A.ParsedPath, A.PathException, A.Version, A.VersionRange, A.CssMediaQuery, A.MediaQuerySuccessfulMergeResult, A.CssNode, A.__IsInvisibleVisitor_Object_EveryCssVisitor, A.CssValue, A._FakeAstNode, A.Argument, A.ArgumentDeclaration, A.ArgumentInvocation, A.AtRootQuery, A.ConfiguredVariable, A.Expression, A.DynamicImport, A.StaticImport, A.Interpolation, A.Statement, A.IfRuleClause, A.__HasContentVisitor_Object_StatementSearchVisitor, A.SupportsAnything, A.SupportsDeclaration, A.SupportsFunction, A.SupportsInterpolation, A.SupportsNegation, A.SupportsOperation, A.Selector, A.__IsInvisibleVisitor_Object_AnySelectorVisitor, A.__IsBogusVisitor_Object_AnySelectorVisitor, A.__IsUselessVisitor_Object_AnySelectorVisitor, A.ComplexSelectorComponent, A.__ParentSelectorVisitor_Object_SelectorSearchVisitor, A.QualifiedName, A.AsyncEnvironment, A._EnvironmentModule0, A.AsyncImportCache, A.AsyncBuiltInCallable, A.BuiltInCallable, A.PlainCssCallable, A.UserDefinedCallable, A.CompileResult, A.Configuration, A.ConfiguredValue, A.Environment, A._EnvironmentModule, A.SourceSpanException, A.SassScriptException, A.ExecutableOptions, A.UsageException, A._Watcher, A.EmptyExtensionStore, A.Extension, A.Extender, A.ExtensionStore, A.ImportCache, A.AsyncImporter, A.CanonicalizeContext, A.ImporterResult, A.InterpolationBuffer, A.InterpolationMap, A.FileSystemException, A.LoggerWithDeprecationType0, A._QuietLogger, A.StderrLogger, A.TrackingLogger, A.BuiltInModule, A.ForwardedModuleView, A.ShadowedModuleView, A.Parser, A.StylesheetGraph, A.StylesheetNode, A.Box, A.ModifiableBox, A.LazyFileSpan, A.MultiDirWatcher, A.MultiSpan, A.NoSourceMapBuffer, A.SourceMapBuffer, A.Value, A.CalculationOperation, A._ColorFormatEnum, A.SpanColorFormat, A.ColorChannel, A.GamutMapMethod, A.InterpolationMethod, A.ColorSpace, A.AnySelectorVisitor, A._EvaluateVisitor0, A._ImportedCssVisitor0, A._EvaluationContext0, A._CloneCssVisitor, A.Evaluator, A._EvaluateVisitor, A._ImportedCssVisitor, A._EvaluationContext, A.EveryCssVisitor, A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor, A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor, A.DependencyReport, A.IsCalculationSafeVisitor, A.RecursiveStatementVisitor, A.ReplaceExpressionVisitor, A.SelectorSearchVisitor, A._SerializeVisitor, A.StatementSearchVisitor, A.Entry, A.Mapping, A.TargetLineEntry, A.TargetEntry, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.Chain, A.Frame, A.LazyTrace, A.Trace, A.UnparsedFrame, A.StringScanner, A._SpanScannerState, A.AsciiGlyphSet, A.UnicodeGlyphSet, A.WatchEvent, A.ChangeType, A.ColorSpace0, A.AnySelectorVisitor0, A.SupportsAnything0, A.Argument0, A.ArgumentDeclaration0, A.ArgumentInvocation0, A.Value0, A.AsyncImporter0, A.AsyncBuiltInCallable0, A.AsyncEnvironment0, A._EnvironmentModule2, A._EvaluateVisitor2, A._ImportedCssVisitor2, A._EvaluationContext2, A.AsyncImportCache0, A.Parser1, A.AtRootQuery0, A.Statement0, A.CssNode0, A.Selector0, A.Expression0, A.Box0, A.ModifiableBox0, A.BuiltInCallable0, A.BuiltInModule0, A.CalculationOperation0, A.CalculationInterpolation, A.CanonicalizeContext0, A.ColorChannel0, A.GamutMapMethod0, A._CloneCssVisitor0, A._ColorFormatEnum0, A.SpanColorFormat0, A.CompileResult0, A.Compiler, A.ComplexSelectorComponent0, A.Configuration0, A.ConfiguredValue0, A.ConfiguredVariable0, A.SupportsDeclaration0, A.LoggerWithDeprecationType, A.DynamicImport0, A.EmptyExtensionStore0, A.Environment0, A._EnvironmentModule1, A._EvaluateVisitor1, A._ImportedCssVisitor1, A._EvaluationContext1, A.EveryCssVisitor0, A.SassScriptException0, A.JSExpressionVisitor, A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0, A.Extension0, A.Extender0, A.ExtensionStore0, A.ForwardedModuleView0, A.SupportsFunction0, A.IfRuleClause0, A.NodeImporter, A.ImportCache0, A.Interpolation0, A.SupportsInterpolation0, A.InterpolationBuffer0, A.InterpolationMap0, A.InterpolationMethod0, A.IsCalculationSafeVisitor0, A.FileSystemException0, A.LazyFileSpan0, A.__ParentSelectorVisitor_Object_SelectorSearchVisitor0, A.CssMediaQuery0, A.MediaQuerySuccessfulMergeResult0, A.__HasContentVisitor_Object_StatementSearchVisitor0, A.MultiSpan0, A.SupportsNegation0, A.NoSourceMapBuffer0, A._FakeAstNode0, A.__IsInvisibleVisitor_Object_EveryCssVisitor0, A.SupportsOperation0, A.PlainCssCallable0, A.QualifiedName0, A.ReplaceExpressionVisitor0, A.ImporterResult0, A.__IsInvisibleVisitor_Object_AnySelectorVisitor0, A.__IsBogusVisitor_Object_AnySelectorVisitor0, A.__IsUselessVisitor_Object_AnySelectorVisitor0, A.SelectorSearchVisitor0, A._SerializeVisitor0, A.ShadowedModuleView0, A.SourceInterpolationVisitor, A.SourceMapBuffer0, A.JSStatementVisitor, A.StatementSearchVisitor0, A.StaticImport0, A.StderrLogger0, A.UserDefinedCallable0, A.CssValue0]); - _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]); - _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]); - _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction, A.Stdin, A.Stdout, A.ReadlineModule, A.ReadlineOptions, A.ReadlineInterface, A.BufferModule, A.BufferConstants, A.Buffer, A.ConsoleModule, A.Console, A.EventEmitter, A.FS, A.FSConstants, A.FSWatcher, A.ReadStream, A.ReadStreamOptions, A.WriteStream, A.WriteStreamOptions, A.FileOptions, A.StatOptions, A.MkdirOptions, A.RmdirOptions, A.WatchOptions, A.WatchFileOptions, A.Stats, A.Promise, A.Date, A.JsError, A.Atomics, A.Modules, A.Module, A.Net, A.Socket, A.NetAddress, A.NetServer, A.NodeJsError, A.Process, A.CPUUsage, A.Release, A.StreamModule, A.Readable, A.Writable, A.Duplex, A.Transform, A.WritableOptions, A.ReadableOptions, A.Immediate, A.Timeout, A.TTY, A.Util, A.JSArray0, A.Chokidar, A.ChokidarOptions, A.ChokidarWatcher, A.JSFunction, A.ImmutableList, A.ImmutableMap, A.NodeImporterResult, A.RenderContext, A.RenderContextOptions, A.RenderContextResult, A.RenderContextResultStats, A.JSModule, A.JSModuleRequire, A.JSClass, A.JSUrl, A._PropertyDescriptor, A._RequireMain, A.JSArray1, A.Chokidar0, A.ChokidarOptions0, A.ChokidarWatcher0, A._Channels, A._ChannelOptions, A._ToGamutOptions, A._InterpolationOptions, A._NodeSassColor, A.CompileOptions, A.NodeCompileResult, A.Deprecation1, A.Exports, A.LoggerNamespace, A.JSExpressionVisitorObject, A.FiberClass, A.Fiber, A.JSFunction0, A.ImmutableList0, A.ImmutableMap0, A.JSImporter, A.JSImporterResult, A.NodeImporterResult0, A._ConstructorOptions, A._NodeSassList, A.JSLogger, A.WarnOptions, A.DebugOptions, A._NodeSassMap, A.JSModule0, A.JSModuleRequire0, A._ConstructorOptions0, A._NodeSassNumber, A.ParserExports, A.JSClass0, A.RenderContext0, A.RenderContextOptions0, A.RenderContextResult0, A.RenderContextResultStats0, A.RenderOptions, A.RenderResult, A.RenderResultStats, A._Exports, A.JSSet, A.JSStatementVisitorObject, A._ConstructorOptions1, A._NodeSassString, A.Types, A.JSUrl0, A._PropertyDescriptor0, A._RequireMain0]); - _inherit(J.JSUnmodifiableArray, J.JSArray); - _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]); - _inheritMany(A.Iterable, [A._CastIterableBase, A.EfficientLengthIterable, A.MappedIterable, A.WhereIterable, A.ExpandIterable, A.TakeIterable, A.SkipIterable, A.SkipWhileIterable, A.FollowedByIterable, A.WhereTypeIterable, A.NonNullsIterable, A._KeysOrValues, A._AllMatchesIterable, A._StringAllMatchesIterable, A._SyncStarIterable, A.Runes, A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin, A._PrefixedKeys, A._UnprefixedKeys, A._PrefixedKeys0, A._UnprefixedKeys0]); - _inheritMany(A._CastIterableBase, [A.CastIterable, A.__CastListBase__CastIterableBase_ListMixin, A.CastSet]); - _inherit(A._EfficientLengthCastIterable, A.CastIterable); - _inherit(A._CastListBase, A.__CastListBase__CastIterableBase_ListMixin); - _inheritMany(A.Closure, [A.Closure2Args, A.CastMap_entries_closure, A.Closure0Args, A.Instantiation, A.TearOffClosure, A.JsLinkedHashMap_values_closure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A.Future_wait_closure, A._Future__chainForeignFuture_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A.Stream_Stream$fromFuture_closure, A.Stream_length_closure, A._CustomZone_bindUnaryCallback_closure, A._RootZone_bindUnaryCallback_closure, A._HashMap_values_closure, A._LinkedCustomHashMap_closure, A.MapBase_entries_closure, A._JsonMap_values_closure, A._Uri__makePath_closure, A._createTables_setChars, A._createTables_setRange, A.jsify__convert, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.ArgParser__addOption_closure, A._Usage__writeOption_closure, A._Usage__buildAllowedList_closure, A.FutureGroup_add_closure, A.StreamGroup__onListen_closure, A.StreamGroup__onCancel_closure, A.StreamQueue__ensureListening_closure, A.alwaysValid_closure, A.ReplAdapter_runAsync__closure, A.UnionSet__iterable_closure, A.UnionSet_contains_closure, A.MapKeySet_difference_closure, A.promiseToFuture_closure1, A.promiseToFuture_closure2, A.futureToPromise__closure, A.Context_joinAll_closure, A.Context_split_closure, A._validateArgList_closure, A.ParsedPath__splitExtension_closure, A.PathMap__create_closure0, A.PathMap__create_closure1, A.WindowsStyle_absolutePathToUri_closure, A.Version__splitParts_closure, A.ModifiableCssNode_hasFollowingSibling_closure, A.ArgumentDeclaration_verify_closure, A.ArgumentDeclaration_verify_closure0, A.ListExpression_toString_closure, A.Interpolation_toString_closure, A.EachRule_toString_closure, A.IfRuleClause$__closure, A.IfRuleClause$___closure, A.ParentStatement_closure, A.ParentStatement__closure, A._IsBogusVisitor_visitComplexSelector_closure, A._IsUselessVisitor_visitComplexSelector_closure, A.ComplexSelectorComponent_toString_closure, A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure, A.IDSelector_unify_closure, A.SelectorList_asSassList_closure, A.SelectorList_nestWithin_closure, A.SelectorList_nestWithin__closure, A.SelectorList_nestWithin__closure0, A.SelectorList__nestWithinCompound_closure, A.SelectorList__nestWithinCompound_closure0, A.SelectorList__nestWithinCompound_closure1, A.SelectorList_withAdditionalCombinators_closure, A.PseudoSelector_specificity__closure, A.PseudoSelector_specificity__closure0, A.PseudoSelector_unify_closure, A.SimpleSelector_isSuperselector_closure, A.SimpleSelector_isSuperselector__closure, A._compileStylesheet_closure0, A.AsyncEnvironment__getVariableFromGlobalModule_closure, A.AsyncEnvironment_setVariable_closure0, A.AsyncEnvironment__getFunctionFromGlobalModule_closure, A.AsyncEnvironment__getMixinFromGlobalModule_closure, A.AsyncEnvironment_toModule_closure, A.AsyncEnvironment_toDummyModule_closure, A._EnvironmentModule__EnvironmentModule_closure5, A._EnvironmentModule__EnvironmentModule_closure6, A._EnvironmentModule__EnvironmentModule_closure7, A._EnvironmentModule__EnvironmentModule_closure8, A._EnvironmentModule__EnvironmentModule_closure9, A._EnvironmentModule__EnvironmentModule_closure10, A.AsyncImportCache_humanize_closure, A.AsyncImportCache_humanize_closure0, A.AsyncImportCache_humanize_closure1, A.AsyncImportCache_humanize_closure2, A.AsyncBuiltInCallable$mixin_closure, A.AsyncBuiltInCallable_withDeprecationWarning_closure, A.BuiltInCallable$mixin_closure, A.BuiltInCallable_withDeprecationWarning_closure, A._compileStylesheet_closure, A.Deprecation_fromId_closure, A.Environment__getVariableFromGlobalModule_closure, A.Environment_setVariable_closure0, A.Environment__getFunctionFromGlobalModule_closure, A.Environment__getMixinFromGlobalModule_closure, A.Environment_toModule_closure, A.Environment_toDummyModule_closure, A._EnvironmentModule__EnvironmentModule_closure, A._EnvironmentModule__EnvironmentModule_closure0, A._EnvironmentModule__EnvironmentModule_closure1, A._EnvironmentModule__EnvironmentModule_closure2, A._EnvironmentModule__EnvironmentModule_closure3, A._EnvironmentModule__EnvironmentModule_closure4, A._writeSourceMap_closure, A.ExecutableOptions_emitErrorCss_closure, A.repl_warn, A.watch_closure, A._Watcher__debounceEvents_closure, A.ExtensionStore_extensionsWhereTarget_closure, A.ExtensionStore__extendComplex_closure, A.ExtensionStore__extendComplex__closure, A.ExtensionStore__extendCompound_closure, A.ExtensionStore__extendCompound_closure0, A.ExtensionStore__extendCompound_closure1, A.ExtensionStore__extendSimple_withoutPseudo, A.ExtensionStore__extendSimple_closure, A.ExtensionStore__extendSimple_closure0, A.ExtensionStore__extendPseudo_closure, A.ExtensionStore__extendPseudo_closure0, A.ExtensionStore__extendPseudo_closure1, A.ExtensionStore__extendPseudo_closure2, A.ExtensionStore__extendPseudo_closure3, A.ExtensionStore__trim_closure, A.ExtensionStore__trim_closure0, A.unifyComplex_closure, A._weaveParents_closure0, A._weaveParents_closure1, A._weaveParents_closure2, A._mustUnify_closure, A._mustUnify__closure, A.paths__closure, A.paths___closure, A.listIsSuperselector_closure, A.listIsSuperselector__closure, A.complexIsSuperselector_closure, A.complexIsSuperselector_closure0, A._compatibleWithPreviousCombinator_closure, A.compoundIsSuperselector_closure, A._selectorPseudoIsSuperselector_closure, A._selectorPseudoIsSuperselector_closure0, A._selectorPseudoIsSuperselector_closure1, A._selectorPseudoIsSuperselector_closure2, A._selectorPseudoIsSuperselector_closure3, A._selectorPseudoIsSuperselector__closure, A._selectorPseudoIsSuperselector___closure, A._selectorPseudoIsSuperselector___closure0, A._selectorPseudoIsSuperselector_closure4, A._selectorPseudoIsSuperselector_closure5, A._selectorPseudoArgs_closure, A._selectorPseudoArgs_closure0, A.globalFunctions_closure, A.global_closure0, A.global_closure1, A.global_closure2, A.global_closure3, A.global_closure4, A.global_closure5, A.global_closure6, A.global_closure7, A.global_closure8, A.global_closure9, A.global_closure10, A.global_closure11, A.global_closure12, A.global_closure13, A.global_closure14, A.global_closure15, A.global_closure16, A.global_closure17, A.global_closure18, A.global_closure19, A.global_closure20, A.global_closure21, A.global_closure22, A.global_closure23, A.global_closure24, A.global_closure25, A.global_closure26, A.global_closure27, A.global_closure28, A.global_closure29, A.global_closure30, A.global_closure31, A.global_closure32, A.global_closure33, A.global_closure34, A.global_closure35, A.global__closure, A.global_closure36, A.global_closure37, A.global_closure38, A.global_closure39, A.global_closure40, A.global_closure41, A.global_closure42, A.module_closure1, A.module_closure2, A.module_closure3, A.module_closure4, A.module_closure5, A.module_closure6, A.module_closure7, A.module_closure8, A.module_closure9, A.module_closure10, A.module_closure11, A.module_closure12, A.module_closure13, A.module_closure14, A.module__closure2, A.module_closure15, A.module_closure16, A.module_closure17, A.module_closure18, A.module_closure19, A.module_closure20, A.module_closure21, A.module_closure22, A.module__closure1, A.module_closure23, A.module_closure_toXyzNoMissing, A.module_closure24, A._mix_closure, A._complement_closure, A._adjust_closure, A._scale_closure, A._change_closure, A._ieHexStr_closure, A._ieHexStr_closure_hexString, A._updateComponents_closure, A._updateComponents_closure0, A._adjustColor_closure, A._functionString_closure, A._removedColorFunction_closure, A._rgb_closure, A._hsl_closure, A._parseChannels_closure, A._parseChannels_closure0, A._colorFromChannels_closure, A._colorFromChannels_closure0, A._channelFromValue_closure, A._channelFunction_closure, A._suggestScaleAndAdjust_closure, A._length_closure0, A._nth_closure, A._setNth_closure, A._join_closure, A._append_closure0, A._zip_closure, A._zip__closure, A._zip__closure0, A._zip__closure1, A._index_closure0, A._separator_closure, A._isBracketed_closure, A._slash_closure, A._get_closure, A._set_closure, A._set__closure0, A._set_closure0, A._set__closure, A._merge_closure, A._merge_closure0, A._merge__closure, A._deepMerge_closure, A._deepRemove_closure, A._deepRemove__closure, A._remove_closure, A._remove_closure0, A._keys_closure, A._values_closure, A._hasKey_closure, A._modify_modifyNestedMap, A.global_closure, A.module_closure0, A._ceil_closure, A._clamp_closure, A._floor_closure, A._max_closure, A._min_closure, A._round_closure, A._hypot_closure, A._hypot__closure, A._log_closure, A._pow_closure, A._atan2_closure, A._compatible_closure, A._isUnitless_closure, A._unit_closure, A._percentage_closure, A._randomFunction_closure, A._div_closure, A._singleArgumentMathFunc_closure, A._numberFunction_closure, A._shared_closure, A._shared_closure0, A._shared_closure1, A._shared_closure2, A.moduleFunctions_closure, A.moduleFunctions_closure0, A.moduleFunctions__closure, A.moduleFunctions_closure1, A._nest_closure, A._nest__closure, A._append_closure, A._append__closure, A._append___closure, A._extend_closure, A._replace_closure, A._unify_closure, A._isSuperselector_closure, A._simpleSelectors_closure, A._simpleSelectors__closure, A._parse_closure, A.module_closure, A.module__closure, A.module__closure0, A._unquote_closure, A._quote_closure, A._length_closure, A._insert_closure, A._index_closure, A._slice_closure, A._toUpperCase_closure, A._toLowerCase_closure, A._uniqueId_closure, A.ImportCache_humanize_closure, A.ImportCache_humanize_closure0, A.ImportCache_humanize_closure1, A.ImportCache_humanize_closure2, A.FilesystemImporter_canonicalize_closure, A.NodePackageImporter__nodePackageExportsResolve_closure, A.NodePackageImporter__nodePackageExportsResolve_closure0, A.NodePackageImporter__nodePackageExportsResolve_closure1, A.NodePackageImporter__nodePackageExportsResolve_closure2, A.NodePackageImporter__nodePackageExportsResolve__closure, A.NodePackageImporter__nodePackageExportsResolve__closure0, A.NodePackageImporter__getMainExport_closure, A._exactlyOne_closure, A.InterpolationMap_mapException_closure, A._realCasePath_helper, A._realCasePath_helper__closure, A.readStdin_closure, A.readStdin_closure0, A.readStdin_closure1, A.readStdin_closure2, A.listDir__closure, A.listDir__closure0, A.listDir_closure_list, A.listDir__list_closure, A.watchDir_closure1, A.watchDir_closure2, A.watchDir_closure3, A.watchDir_closure4, A.DeprecationProcessingLogger_summarize_closure, A.DeprecationProcessingLogger_summarize_closure0, A._disallowedFunctionNames_closure, A.Parser_escape_closure, A.Parser_scanIdentChar_matches, A.SassParser_styleRuleSelector_closure, A.SassParser__peekIndentation_closure, A.SassParser__peekIndentation_closure0, A.StylesheetParser__expression_addSingleExpression, A.StylesheetParser__expression_addOperator, A.StylesheetParser__isHexColor_closure, A.StylesheetParser__unicodeRange_closure, A.StylesheetParser__unicodeRange_closure0, A.StylesheetParser_trySpecialFunction_closure, A.StylesheetGraph_modifiedSince_transitiveModificationTime, A.MapExtensions_get_pairs_closure, A._PrefixedKeys_iterator_closure, A.SourceMapBuffer_buildSourceMap_closure, A._UnprefixedKeys_iterator_closure, A._UnprefixedKeys_iterator_closure0, A.indent_closure, A.flattenVertically_closure, A.flattenVertically_closure0, A.SassCalculation__verifyLength_closure, A.SassColor$_forSpace_closure, A.HwbColorSpace_convert_toRgb, A.SassList_isBlank_closure, A.SassNumber__coerceOrConvertValue_closure, A.SassNumber__coerceOrConvertValue_closure1, A.SassNumber_multiplyUnits_closure, A.SassNumber_multiplyUnits_closure1, A.SassNumber__areAnyConvertible_closure, A.SassNumber__canonicalizeUnitList_closure, A.SassNumber_unitSuggestion_closure, A.SassNumber_unitSuggestion_closure0, A.SingleUnitSassNumber__coerceToUnit_closure, A.SingleUnitSassNumber__coerceValueToUnit_closure, A.SingleUnitSassNumber_multiplyUnits_closure, A.AnySelectorVisitor_visitComplexSelector_closure, A.AnySelectorVisitor_visitCompoundSelector_closure, A._EvaluateVisitor_closure12, A._EvaluateVisitor_closure13, A._EvaluateVisitor_closure14, A._EvaluateVisitor_closure15, A._EvaluateVisitor_closure16, A._EvaluateVisitor_closure17, A._EvaluateVisitor_closure18, A._EvaluateVisitor_closure19, A._EvaluateVisitor_closure20, A._EvaluateVisitor_closure21, A._EvaluateVisitor_closure22, A._EvaluateVisitor_closure23, A._EvaluateVisitor_closure24, A._EvaluateVisitor__loadModule__closure1, A._EvaluateVisitor__combineCss_closure1, A._EvaluateVisitor__combineCss_closure2, A._EvaluateVisitor__combineCss_visitModule0, A._EvaluateVisitor__extendModules_closure1, A._EvaluateVisitor__scopeForAtRoot_closure5, A._EvaluateVisitor__scopeForAtRoot_closure6, A._EvaluateVisitor__scopeForAtRoot_closure7, A._EvaluateVisitor__scopeForAtRoot_closure8, A._EvaluateVisitor__scopeForAtRoot_closure9, A._EvaluateVisitor__scopeForAtRoot_closure10, A._EvaluateVisitor_visitEachRule_closure2, A._EvaluateVisitor_visitEachRule_closure3, A._EvaluateVisitor_visitEachRule__closure0, A._EvaluateVisitor_visitEachRule___closure0, A._EvaluateVisitor_visitAtRule_closure2, A._EvaluateVisitor_visitAtRule_closure4, A._EvaluateVisitor_visitForRule__closure0, A._EvaluateVisitor_visitIfRule_closure0, A._EvaluateVisitor_visitIfRule___closure0, A._EvaluateVisitor__visitDynamicImport__closure3, A._EvaluateVisitor__visitDynamicImport__closure4, A._EvaluateVisitor__visitDynamicImport__closure5, A._EvaluateVisitor_visitIncludeRule_closure3, A._EvaluateVisitor_visitMediaRule_closure2, A._EvaluateVisitor_visitMediaRule_closure4, A._EvaluateVisitor_visitStyleRule_closure4, A._EvaluateVisitor_visitStyleRule_closure5, A._EvaluateVisitor__warnForBogusCombinators_closure0, A._EvaluateVisitor_visitSupportsRule_closure2, A._EvaluateVisitor_visitWhileRule__closure0, A._EvaluateVisitor__slash_recommendation0, A._EvaluateVisitor_visitListExpression_closure0, A._EvaluateVisitor_visitFunctionExpression_closure3, A._EvaluateVisitor__visitCalculation_closure0, A._EvaluateVisitor__checkCalculationArguments_check0, A._EvaluateVisitor__visitCalculationExpression__closure0, A._EvaluateVisitor__runUserDefinedCallable____closure0, A._EvaluateVisitor__runBuiltInCallable_closure4, A._EvaluateVisitor__evaluateArguments_closure3, A._EvaluateVisitor__evaluateArguments_closure4, A._EvaluateVisitor__evaluateArguments_closure6, A._EvaluateVisitor__evaluateMacroArguments_closure3, A._EvaluateVisitor__evaluateMacroArguments_closure4, A._EvaluateVisitor__evaluateMacroArguments_closure6, A._EvaluateVisitor_visitCssAtRule_closure2, A._EvaluateVisitor_visitCssKeyframeBlock_closure2, A._EvaluateVisitor_visitCssMediaRule_closure2, A._EvaluateVisitor_visitCssMediaRule_closure4, A._EvaluateVisitor_visitCssStyleRule_closure1, A._EvaluateVisitor_visitCssSupportsRule_closure2, A._EvaluateVisitor__performInterpolationHelper_closure0, A._EvaluateVisitor__withoutSlash_recommendation0, A._EvaluateVisitor__stackFrame_closure0, A._ImportedCssVisitor_visitCssAtRule_closure0, A._ImportedCssVisitor_visitCssMediaRule_closure0, A._ImportedCssVisitor_visitCssStyleRule_closure0, A._ImportedCssVisitor_visitCssSupportsRule_closure0, A._EvaluateVisitor_closure, A._EvaluateVisitor_closure0, A._EvaluateVisitor_closure1, A._EvaluateVisitor_closure2, A._EvaluateVisitor_closure3, A._EvaluateVisitor_closure4, A._EvaluateVisitor_closure5, A._EvaluateVisitor_closure6, A._EvaluateVisitor_closure7, A._EvaluateVisitor_closure8, A._EvaluateVisitor_closure9, A._EvaluateVisitor_closure10, A._EvaluateVisitor_closure11, A._EvaluateVisitor__loadModule__closure, A._EvaluateVisitor__combineCss_closure, A._EvaluateVisitor__combineCss_closure0, A._EvaluateVisitor__combineCss_visitModule, A._EvaluateVisitor__extendModules_closure, A._EvaluateVisitor__scopeForAtRoot_closure, A._EvaluateVisitor__scopeForAtRoot_closure0, A._EvaluateVisitor__scopeForAtRoot_closure1, A._EvaluateVisitor__scopeForAtRoot_closure2, A._EvaluateVisitor__scopeForAtRoot_closure3, A._EvaluateVisitor__scopeForAtRoot_closure4, A._EvaluateVisitor_visitEachRule_closure, A._EvaluateVisitor_visitEachRule_closure0, A._EvaluateVisitor_visitEachRule__closure, A._EvaluateVisitor_visitEachRule___closure, A._EvaluateVisitor_visitAtRule_closure, A._EvaluateVisitor_visitAtRule_closure1, A._EvaluateVisitor_visitForRule__closure, A._EvaluateVisitor_visitIfRule_closure, A._EvaluateVisitor_visitIfRule___closure, A._EvaluateVisitor__visitDynamicImport__closure, A._EvaluateVisitor__visitDynamicImport__closure0, A._EvaluateVisitor__visitDynamicImport__closure1, A._EvaluateVisitor_visitIncludeRule_closure0, A._EvaluateVisitor_visitMediaRule_closure, A._EvaluateVisitor_visitMediaRule_closure1, A._EvaluateVisitor_visitStyleRule_closure0, A._EvaluateVisitor_visitStyleRule_closure1, A._EvaluateVisitor__warnForBogusCombinators_closure, A._EvaluateVisitor_visitSupportsRule_closure0, A._EvaluateVisitor_visitWhileRule__closure, A._EvaluateVisitor__slash_recommendation, A._EvaluateVisitor_visitListExpression_closure, A._EvaluateVisitor_visitFunctionExpression_closure0, A._EvaluateVisitor__visitCalculation_closure, A._EvaluateVisitor__checkCalculationArguments_check, A._EvaluateVisitor__visitCalculationExpression__closure, A._EvaluateVisitor__runUserDefinedCallable____closure, A._EvaluateVisitor__runBuiltInCallable_closure1, A._EvaluateVisitor__evaluateArguments_closure, A._EvaluateVisitor__evaluateArguments_closure0, A._EvaluateVisitor__evaluateArguments_closure2, A._EvaluateVisitor__evaluateMacroArguments_closure, A._EvaluateVisitor__evaluateMacroArguments_closure0, A._EvaluateVisitor__evaluateMacroArguments_closure2, A._EvaluateVisitor_visitCssAtRule_closure0, A._EvaluateVisitor_visitCssKeyframeBlock_closure0, A._EvaluateVisitor_visitCssMediaRule_closure, A._EvaluateVisitor_visitCssMediaRule_closure1, A._EvaluateVisitor_visitCssStyleRule_closure, A._EvaluateVisitor_visitCssSupportsRule_closure0, A._EvaluateVisitor__performInterpolationHelper_closure, A._EvaluateVisitor__withoutSlash_recommendation, A._EvaluateVisitor__stackFrame_closure, A._ImportedCssVisitor_visitCssAtRule_closure, A._ImportedCssVisitor_visitCssMediaRule_closure, A._ImportedCssVisitor_visitCssStyleRule_closure, A._ImportedCssVisitor_visitCssSupportsRule_closure, A.EveryCssVisitor_visitCssAtRule_closure, A.EveryCssVisitor_visitCssKeyframeBlock_closure, A.EveryCssVisitor_visitCssMediaRule_closure, A.EveryCssVisitor_visitCssStyleRule_closure, A.EveryCssVisitor_visitCssStylesheet_closure, A.EveryCssVisitor_visitCssSupportsRule_closure, A.IsCalculationSafeVisitor_visitListExpression_closure, A.ReplaceExpressionVisitor_visitListExpression_closure, A.ReplaceExpressionVisitor_visitArgumentInvocation_closure, A.ReplaceExpressionVisitor_visitInterpolation_closure, A.SelectorSearchVisitor_visitComplexSelector_closure, A.SelectorSearchVisitor_visitCompoundSelector_closure, A.serialize_closure, A._SerializeVisitor_visitList_closure, A._SerializeVisitor_visitList_closure0, A._SerializeVisitor_visitList_closure1, A._SerializeVisitor_visitMap_closure, A._SerializeVisitor_visitSelectorList_closure, A.StatementSearchVisitor_visitIfRule_closure, A.StatementSearchVisitor_visitIfRule__closure0, A.StatementSearchVisitor_visitIfRule_closure0, A.StatementSearchVisitor_visitIfRule__closure, A.StatementSearchVisitor_visitChildren_closure, A.SingleMapping_SingleMapping$fromEntries_closure1, A.SingleMapping_toJson_closure, A.Highlighter$__closure, A.Highlighter$___closure, A.Highlighter$__closure0, A.Highlighter__collateLines_closure, A.Highlighter__collateLines_closure1, A.Highlighter__collateLines__closure, A.Highlighter_highlight_closure, A.Chain_Chain$parse_closure, A.Chain_toTrace_closure, A.Chain_toString_closure0, A.Chain_toString__closure0, A.Chain_toString_closure, A.Chain_toString__closure, A.Trace__parseVM_closure, A.Trace$parseV8_closure, A.Trace$parseJSCore_closure, A.Trace$parseFirefox_closure, A.Trace$parseFriendly_closure, A.Trace_terse_closure, A.Trace_foldFrames_closure, A.Trace_foldFrames_closure0, A.Trace_toString_closure0, A.Trace_toString_closure, A.TransformByHandlers_transformByHandlers__closure, A.RateLimit__debounceAggregate_closure0, A.AnySelectorVisitor_visitComplexSelector_closure0, A.AnySelectorVisitor_visitCompoundSelector_closure0, A.ArgumentDeclaration_verify_closure1, A.ArgumentDeclaration_verify_closure2, A.argumentListClass__closure, A.argumentListClass__closure0, A.AsyncBuiltInCallable$mixin_closure0, A.AsyncBuiltInCallable_withDeprecationWarning_closure0, A._compileStylesheet_closure2, A.AsyncEnvironment__getVariableFromGlobalModule_closure0, A.AsyncEnvironment_setVariable_closure3, A.AsyncEnvironment__getFunctionFromGlobalModule_closure0, A.AsyncEnvironment__getMixinFromGlobalModule_closure0, A.AsyncEnvironment_toModule_closure0, A.AsyncEnvironment_toDummyModule_closure0, A._EnvironmentModule__EnvironmentModule_closure17, A._EnvironmentModule__EnvironmentModule_closure18, A._EnvironmentModule__EnvironmentModule_closure19, A._EnvironmentModule__EnvironmentModule_closure20, A._EnvironmentModule__EnvironmentModule_closure21, A._EnvironmentModule__EnvironmentModule_closure22, A._EvaluateVisitor_closure38, A._EvaluateVisitor_closure39, A._EvaluateVisitor_closure40, A._EvaluateVisitor_closure41, A._EvaluateVisitor_closure42, A._EvaluateVisitor_closure43, A._EvaluateVisitor_closure44, A._EvaluateVisitor_closure45, A._EvaluateVisitor_closure46, A._EvaluateVisitor_closure47, A._EvaluateVisitor_closure48, A._EvaluateVisitor_closure49, A._EvaluateVisitor_closure50, A._EvaluateVisitor__loadModule__closure5, A._EvaluateVisitor__combineCss_closure5, A._EvaluateVisitor__combineCss_closure6, A._EvaluateVisitor__combineCss_visitModule2, A._EvaluateVisitor__extendModules_closure5, A._EvaluateVisitor__scopeForAtRoot_closure17, A._EvaluateVisitor__scopeForAtRoot_closure18, A._EvaluateVisitor__scopeForAtRoot_closure19, A._EvaluateVisitor__scopeForAtRoot_closure20, A._EvaluateVisitor__scopeForAtRoot_closure21, A._EvaluateVisitor__scopeForAtRoot_closure22, A._EvaluateVisitor_visitEachRule_closure8, A._EvaluateVisitor_visitEachRule_closure9, A._EvaluateVisitor_visitEachRule__closure2, A._EvaluateVisitor_visitEachRule___closure2, A._EvaluateVisitor_visitAtRule_closure8, A._EvaluateVisitor_visitAtRule_closure10, A._EvaluateVisitor_visitForRule__closure2, A._EvaluateVisitor_visitIfRule_closure2, A._EvaluateVisitor_visitIfRule___closure2, A._EvaluateVisitor__visitDynamicImport__closure11, A._EvaluateVisitor__visitDynamicImport__closure12, A._EvaluateVisitor__visitDynamicImport__closure13, A._EvaluateVisitor_visitIncludeRule_closure9, A._EvaluateVisitor_visitMediaRule_closure8, A._EvaluateVisitor_visitMediaRule_closure10, A._EvaluateVisitor_visitStyleRule_closure12, A._EvaluateVisitor_visitStyleRule_closure13, A._EvaluateVisitor__warnForBogusCombinators_closure2, A._EvaluateVisitor_visitSupportsRule_closure6, A._EvaluateVisitor_visitWhileRule__closure2, A._EvaluateVisitor__slash_recommendation2, A._EvaluateVisitor_visitListExpression_closure2, A._EvaluateVisitor_visitFunctionExpression_closure9, A._EvaluateVisitor__visitCalculation_closure2, A._EvaluateVisitor__checkCalculationArguments_check2, A._EvaluateVisitor__visitCalculationExpression__closure2, A._EvaluateVisitor__runUserDefinedCallable____closure2, A._EvaluateVisitor__runBuiltInCallable_closure10, A._EvaluateVisitor__evaluateArguments_closure11, A._EvaluateVisitor__evaluateArguments_closure12, A._EvaluateVisitor__evaluateArguments_closure14, A._EvaluateVisitor__evaluateMacroArguments_closure11, A._EvaluateVisitor__evaluateMacroArguments_closure12, A._EvaluateVisitor__evaluateMacroArguments_closure14, A._EvaluateVisitor_visitCssAtRule_closure6, A._EvaluateVisitor_visitCssKeyframeBlock_closure6, A._EvaluateVisitor_visitCssMediaRule_closure8, A._EvaluateVisitor_visitCssMediaRule_closure10, A._EvaluateVisitor_visitCssStyleRule_closure5, A._EvaluateVisitor_visitCssSupportsRule_closure6, A._EvaluateVisitor__performInterpolationHelper_closure2, A._EvaluateVisitor__withoutSlash_recommendation2, A._EvaluateVisitor__stackFrame_closure2, A._ImportedCssVisitor_visitCssAtRule_closure2, A._ImportedCssVisitor_visitCssMediaRule_closure2, A._ImportedCssVisitor_visitCssStyleRule_closure2, A._ImportedCssVisitor_visitCssSupportsRule_closure2, A.AsyncImportCache_humanize_closure3, A.AsyncImportCache_humanize_closure4, A.AsyncImportCache_humanize_closure5, A.AsyncImportCache_humanize_closure6, A.booleanClass__closure, A.legacyBooleanClass__closure, A.legacyBooleanClass__closure0, A.BuiltInCallable$mixin_closure0, A.BuiltInCallable_withDeprecationWarning_closure0, A.calculationClass__closure, A.calculationClass__closure0, A.calculationClass__closure1, A.calculationClass__closure2, A.calculationClass__closure3, A.calculationClass__closure4, A.calculationClass__closure5, A.calculationOperationClass__closure, A.calculationOperationClass___closure, A.calculationOperationClass__closure1, A.calculationOperationClass__closure2, A.calculationOperationClass__closure3, A.calculationOperationClass__closure4, A.calculationInterpolationClass__closure1, A.calculationInterpolationClass__closure2, A.SassCalculation__verifyLength_closure0, A.updateCanonicalizeContextPrototype_closure, A.updateCanonicalizeContextPrototype_closure0, A.global_closure44, A.global_closure45, A.global_closure46, A.global_closure47, A.global_closure48, A.global_closure49, A.global_closure50, A.global_closure51, A.global_closure52, A.global_closure53, A.global_closure54, A.global_closure55, A.global_closure56, A.global_closure57, A.global_closure58, A.global_closure59, A.global_closure60, A.global_closure61, A.global_closure62, A.global_closure63, A.global_closure64, A.global_closure65, A.global_closure66, A.global_closure67, A.global_closure68, A.global_closure69, A.global_closure70, A.global_closure71, A.global_closure72, A.global_closure73, A.global_closure74, A.global_closure75, A.global_closure76, A.global_closure77, A.global_closure78, A.global_closure79, A.global__closure0, A.global_closure80, A.global_closure81, A.global_closure82, A.global_closure83, A.global_closure84, A.global_closure85, A.global_closure86, A.module_closure27, A.module_closure28, A.module_closure29, A.module_closure30, A.module_closure31, A.module_closure32, A.module_closure33, A.module_closure34, A.module_closure35, A.module_closure36, A.module_closure37, A.module_closure38, A.module_closure39, A.module_closure40, A.module__closure6, A.module_closure41, A.module_closure42, A.module_closure43, A.module_closure44, A.module_closure45, A.module_closure46, A.module_closure47, A.module_closure48, A.module__closure5, A.module_closure49, A.module_closure_toXyzNoMissing0, A.module_closure50, A._mix_closure0, A._complement_closure0, A._adjust_closure0, A._scale_closure0, A._change_closure0, A._ieHexStr_closure0, A._ieHexStr_closure_hexString0, A._updateComponents_closure1, A._updateComponents_closure2, A._adjustColor_closure0, A._functionString_closure0, A._removedColorFunction_closure0, A._rgb_closure0, A._hsl_closure0, A._parseChannels_closure1, A._parseChannels_closure2, A._colorFromChannels_closure1, A._colorFromChannels_closure2, A._channelFromValue_closure0, A._channelFunction_closure0, A._suggestScaleAndAdjust_closure0, A.colorClass__closure1, A.colorClass__closure3, A.colorClass__closure5, A.colorClass__closure7, A.colorClass___closure, A.colorClass__closure_changedValue, A.colorClass__closure9, A.colorClass__closure10, A.colorClass__closure11, A.colorClass__closure12, A.colorClass__closure13, A.colorClass__closure14, A.colorClass__closure15, A.colorClass__closure16, A.colorClass__closure17, A.colorClass__closure18, A.colorClass__closure19, A.colorClass__closure20, A.colorClass__closure21, A.colorClass__closure22, A.legacyColorClass_closure, A.legacyColorClass__closure, A.legacyColorClass_closure0, A.legacyColorClass_closure1, A.legacyColorClass_closure2, A.legacyColorClass_closure3, A.SassColor$_forSpace_closure0, A.compileAsync__closure, A.compileStringAsync__closure, A.compileStringAsync__closure0, A._wrapAsyncSassExceptions_closure, A._parseFunctions__closure2, A._parseFunctions__closure3, A.nodePackageImporterClass__closure, A._compileStylesheet_closure1, A.AsyncCompiler_addCompilation_closure, A.compilerClass__closure, A.compilerClass__closure0, A.compilerClass__closure1, A.compilerClass__closure2, A.asyncCompilerClass__closure, A.asyncCompilerClass__closure0, A.asyncCompilerClass__closure1, A.asyncCompilerClass__closure2, A.ComplexSelectorComponent_toString_closure0, A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure0, A._disallowedFunctionNames_closure0, A.Deprecation_fromId_closure0, A.DeprecationProcessingLogger_summarize_closure1, A.DeprecationProcessingLogger_summarize_closure2, A.versionClass__closure, A.versionClass__closure0, A.EachRule_toString_closure0, A.Environment__getVariableFromGlobalModule_closure0, A.Environment_setVariable_closure3, A.Environment__getFunctionFromGlobalModule_closure0, A.Environment__getMixinFromGlobalModule_closure0, A.Environment_toModule_closure0, A.Environment_toDummyModule_closure0, A._EnvironmentModule__EnvironmentModule_closure11, A._EnvironmentModule__EnvironmentModule_closure12, A._EnvironmentModule__EnvironmentModule_closure13, A._EnvironmentModule__EnvironmentModule_closure14, A._EnvironmentModule__EnvironmentModule_closure15, A._EnvironmentModule__EnvironmentModule_closure16, A._EvaluateVisitor_closure25, A._EvaluateVisitor_closure26, A._EvaluateVisitor_closure27, A._EvaluateVisitor_closure28, A._EvaluateVisitor_closure29, A._EvaluateVisitor_closure30, A._EvaluateVisitor_closure31, A._EvaluateVisitor_closure32, A._EvaluateVisitor_closure33, A._EvaluateVisitor_closure34, A._EvaluateVisitor_closure35, A._EvaluateVisitor_closure36, A._EvaluateVisitor_closure37, A._EvaluateVisitor__loadModule__closure3, A._EvaluateVisitor__combineCss_closure3, A._EvaluateVisitor__combineCss_closure4, A._EvaluateVisitor__combineCss_visitModule1, A._EvaluateVisitor__extendModules_closure3, A._EvaluateVisitor__scopeForAtRoot_closure11, A._EvaluateVisitor__scopeForAtRoot_closure12, A._EvaluateVisitor__scopeForAtRoot_closure13, A._EvaluateVisitor__scopeForAtRoot_closure14, A._EvaluateVisitor__scopeForAtRoot_closure15, A._EvaluateVisitor__scopeForAtRoot_closure16, A._EvaluateVisitor_visitEachRule_closure5, A._EvaluateVisitor_visitEachRule_closure6, A._EvaluateVisitor_visitEachRule__closure1, A._EvaluateVisitor_visitEachRule___closure1, A._EvaluateVisitor_visitAtRule_closure5, A._EvaluateVisitor_visitAtRule_closure7, A._EvaluateVisitor_visitForRule__closure1, A._EvaluateVisitor_visitIfRule_closure1, A._EvaluateVisitor_visitIfRule___closure1, A._EvaluateVisitor__visitDynamicImport__closure7, A._EvaluateVisitor__visitDynamicImport__closure8, A._EvaluateVisitor__visitDynamicImport__closure9, A._EvaluateVisitor_visitIncludeRule_closure6, A._EvaluateVisitor_visitMediaRule_closure5, A._EvaluateVisitor_visitMediaRule_closure7, A._EvaluateVisitor_visitStyleRule_closure8, A._EvaluateVisitor_visitStyleRule_closure9, A._EvaluateVisitor__warnForBogusCombinators_closure1, A._EvaluateVisitor_visitSupportsRule_closure4, A._EvaluateVisitor_visitWhileRule__closure1, A._EvaluateVisitor__slash_recommendation1, A._EvaluateVisitor_visitListExpression_closure1, A._EvaluateVisitor_visitFunctionExpression_closure6, A._EvaluateVisitor__visitCalculation_closure1, A._EvaluateVisitor__checkCalculationArguments_check1, A._EvaluateVisitor__visitCalculationExpression__closure1, A._EvaluateVisitor__runUserDefinedCallable____closure1, A._EvaluateVisitor__runBuiltInCallable_closure7, A._EvaluateVisitor__evaluateArguments_closure7, A._EvaluateVisitor__evaluateArguments_closure8, A._EvaluateVisitor__evaluateArguments_closure10, A._EvaluateVisitor__evaluateMacroArguments_closure7, A._EvaluateVisitor__evaluateMacroArguments_closure8, A._EvaluateVisitor__evaluateMacroArguments_closure10, A._EvaluateVisitor_visitCssAtRule_closure4, A._EvaluateVisitor_visitCssKeyframeBlock_closure4, A._EvaluateVisitor_visitCssMediaRule_closure5, A._EvaluateVisitor_visitCssMediaRule_closure7, A._EvaluateVisitor_visitCssStyleRule_closure3, A._EvaluateVisitor_visitCssSupportsRule_closure4, A._EvaluateVisitor__performInterpolationHelper_closure1, A._EvaluateVisitor__withoutSlash_recommendation1, A._EvaluateVisitor__stackFrame_closure1, A._ImportedCssVisitor_visitCssAtRule_closure1, A._ImportedCssVisitor_visitCssMediaRule_closure1, A._ImportedCssVisitor_visitCssStyleRule_closure1, A._ImportedCssVisitor_visitCssSupportsRule_closure1, A.EveryCssVisitor_visitCssAtRule_closure0, A.EveryCssVisitor_visitCssKeyframeBlock_closure0, A.EveryCssVisitor_visitCssMediaRule_closure0, A.EveryCssVisitor_visitCssStyleRule_closure0, A.EveryCssVisitor_visitCssStylesheet_closure0, A.EveryCssVisitor_visitCssSupportsRule_closure0, A.exceptionClass__closure, A.exceptionClass__closure0, A.exceptionClass__closure1, A.ExtensionStore_extensionsWhereTarget_closure0, A.ExtensionStore__extendComplex_closure0, A.ExtensionStore__extendComplex__closure0, A.ExtensionStore__extendCompound_closure2, A.ExtensionStore__extendCompound_closure3, A.ExtensionStore__extendCompound_closure4, A.ExtensionStore__extendSimple_withoutPseudo0, A.ExtensionStore__extendSimple_closure1, A.ExtensionStore__extendSimple_closure2, A.ExtensionStore__extendPseudo_closure4, A.ExtensionStore__extendPseudo_closure5, A.ExtensionStore__extendPseudo_closure6, A.ExtensionStore__extendPseudo_closure7, A.ExtensionStore__extendPseudo_closure8, A.ExtensionStore__trim_closure1, A.ExtensionStore__trim_closure2, A.FilesystemImporter_canonicalize_closure0, A.functionClass__closure, A.functionClass__closure0, A.unifyComplex_closure0, A._weaveParents_closure4, A._weaveParents_closure5, A._weaveParents_closure6, A._mustUnify_closure0, A._mustUnify__closure0, A.paths__closure0, A.paths___closure0, A.listIsSuperselector_closure0, A.listIsSuperselector__closure0, A.complexIsSuperselector_closure1, A.complexIsSuperselector_closure2, A._compatibleWithPreviousCombinator_closure0, A.compoundIsSuperselector_closure0, A._selectorPseudoIsSuperselector_closure6, A._selectorPseudoIsSuperselector_closure7, A._selectorPseudoIsSuperselector_closure8, A._selectorPseudoIsSuperselector_closure9, A._selectorPseudoIsSuperselector_closure10, A._selectorPseudoIsSuperselector__closure0, A._selectorPseudoIsSuperselector___closure1, A._selectorPseudoIsSuperselector___closure2, A._selectorPseudoIsSuperselector_closure11, A._selectorPseudoIsSuperselector_closure12, A._selectorPseudoArgs_closure1, A._selectorPseudoArgs_closure2, A.globalFunctions_closure0, A.HwbColorSpace_convert_toRgb0, A.IDSelector_unify_closure0, A.IfRuleClause$__closure0, A.IfRuleClause$___closure0, A.immutableMapToDartMap_closure, A.NodeImporter__tryPath_closure0, A.ImportCache_humanize_closure3, A.ImportCache_humanize_closure4, A.ImportCache_humanize_closure5, A.ImportCache_humanize_closure6, A.Interpolation_toString_closure0, A.InterpolationMap_mapException_closure0, A._realCasePath_helper0, A._realCasePath_helper__closure0, A.IsCalculationSafeVisitor_visitListExpression_closure0, A.listDir__closure1, A.listDir__closure2, A.listDir_closure_list0, A.listDir__list_closure0, A.render_closure0, A._parseFunctions__closure, A._parseFunctions___closure2, A._parseFunctions__closure0, A._parseFunctions__closure1, A._parseFunctions___closure, A._parseImporter_closure, A._parseImporter__closure, A._parseImporter___closure, A.ListExpression_toString_closure0, A._length_closure2, A._nth_closure0, A._setNth_closure0, A._join_closure0, A._append_closure2, A._zip_closure0, A._zip__closure2, A._zip__closure3, A._zip__closure4, A._index_closure2, A._separator_closure0, A._isBracketed_closure0, A._slash_closure0, A.SelectorList_asSassList_closure0, A.SelectorList_nestWithin_closure0, A.SelectorList_nestWithin__closure1, A.SelectorList_nestWithin__closure2, A.SelectorList__nestWithinCompound_closure2, A.SelectorList__nestWithinCompound_closure3, A.SelectorList__nestWithinCompound_closure4, A.SelectorList_withAdditionalCombinators_closure0, A.listClass__closure, A.legacyListClass_closure, A.legacyListClass__closure, A.legacyListClass_closure1, A.legacyListClass_closure2, A.legacyListClass_closure4, A.SassList_isBlank_closure0, A._get_closure0, A._set_closure1, A._set__closure2, A._set_closure2, A._set__closure1, A._merge_closure1, A._merge_closure2, A._merge__closure0, A._deepMerge_closure0, A._deepRemove_closure0, A._deepRemove__closure0, A._remove_closure1, A._remove_closure2, A._keys_closure0, A._values_closure0, A._hasKey_closure0, A._modify_modifyNestedMap0, A.MapExtensions_get_pairs_closure0, A.mapClass__closure, A.mapClass__closure0, A.legacyMapClass_closure, A.legacyMapClass__closure, A.legacyMapClass__closure0, A.legacyMapClass_closure2, A.legacyMapClass_closure3, A.legacyMapClass_closure4, A.global_closure43, A.module_closure26, A._ceil_closure0, A._clamp_closure0, A._floor_closure0, A._max_closure0, A._min_closure0, A._round_closure0, A._hypot_closure0, A._hypot__closure0, A._log_closure0, A._pow_closure0, A._atan2_closure0, A._compatible_closure0, A._isUnitless_closure0, A._unit_closure0, A._percentage_closure0, A._randomFunction_closure0, A._div_closure0, A._singleArgumentMathFunc_closure0, A._numberFunction_closure0, A._shared_closure3, A._shared_closure4, A._shared_closure5, A._shared_closure6, A.moduleFunctions_closure2, A.moduleFunctions_closure3, A.moduleFunctions__closure0, A.moduleFunctions_closure4, A.mixinClass__closure, A.mixinClass__closure0, A.ModifiableCssNode_hasFollowingSibling_closure0, A.NodePackageImporter__nodePackageExportsResolve_closure3, A.NodePackageImporter__nodePackageExportsResolve_closure4, A.NodePackageImporter__nodePackageExportsResolve_closure5, A.NodePackageImporter__nodePackageExportsResolve_closure6, A.NodePackageImporter__nodePackageExportsResolve__closure1, A.NodePackageImporter__nodePackageExportsResolve__closure2, A.NodePackageImporter__getMainExport_closure0, A.legacyNullClass__closure, A.numberClass__closure, A.numberClass__closure0, A.numberClass__closure1, A.numberClass__closure2, A.numberClass__closure3, A.numberClass__closure4, A.numberClass__closure5, A.numberClass__closure6, A.numberClass__closure7, A.numberClass__closure8, A.numberClass__closure9, A.numberClass__closure12, A.numberClass__closure13, A.numberClass__closure14, A.numberClass__closure15, A.numberClass__closure16, A.numberClass__closure17, A.numberClass__closure18, A.numberClass__closure19, A.legacyNumberClass_closure, A.legacyNumberClass_closure0, A.legacyNumberClass_closure2, A._parseNumber_closure, A._parseNumber_closure0, A.SassNumber__coerceOrConvertValue_closure3, A.SassNumber__coerceOrConvertValue_closure5, A.SassNumber_multiplyUnits_closure3, A.SassNumber_multiplyUnits_closure5, A.SassNumber__areAnyConvertible_closure0, A.SassNumber__canonicalizeUnitList_closure0, A.SassNumber_unitSuggestion_closure1, A.SassNumber_unitSuggestion_closure2, A.ParentStatement_closure0, A.ParentStatement__closure0, A.loadParserExports_closure, A.loadParserExports_closure0, A.loadParserExports_closure1, A._updateAstPrototypes_closure, A._updateAstPrototypes_closure0, A._updateAstPrototypes_closure1, A._updateAstPrototypes_closure4, A._addSupportsConditionToInterpolation_closure, A.Parser_escape_closure0, A.Parser_scanIdentChar_matches0, A._PrefixedKeys_iterator_closure0, A.PseudoSelector_specificity__closure1, A.PseudoSelector_specificity__closure2, A.PseudoSelector_unify_closure0, A.JSClassExtension_setCustomInspect_closure, A.ReplaceExpressionVisitor_visitListExpression_closure0, A.ReplaceExpressionVisitor_visitArgumentInvocation_closure0, A.ReplaceExpressionVisitor_visitInterpolation_closure0, A.SassParser_styleRuleSelector_closure0, A.SassParser__peekIndentation_closure1, A.SassParser__peekIndentation_closure2, A._wrapMain_closure, A._wrapMain_closure0, A._IsBogusVisitor_visitComplexSelector_closure0, A._IsUselessVisitor_visitComplexSelector_closure0, A._nest_closure0, A._nest__closure1, A._append_closure1, A._append__closure1, A._append___closure0, A._extend_closure0, A._replace_closure0, A._unify_closure0, A._isSuperselector_closure0, A._simpleSelectors_closure0, A._simpleSelectors__closure0, A._parse_closure0, A.SelectorSearchVisitor_visitComplexSelector_closure0, A.SelectorSearchVisitor_visitCompoundSelector_closure0, A.serialize_closure0, A._SerializeVisitor_visitList_closure2, A._SerializeVisitor_visitList_closure3, A._SerializeVisitor_visitList_closure4, A._SerializeVisitor_visitMap_closure0, A._SerializeVisitor_visitSelectorList_closure0, A.SimpleSelector_isSuperselector_closure0, A.SimpleSelector_isSuperselector__closure0, A.SingleUnitSassNumber__coerceToUnit_closure0, A.SingleUnitSassNumber__coerceValueToUnit_closure0, A.SingleUnitSassNumber_multiplyUnits_closure1, A.SourceMapBuffer_buildSourceMap_closure0, A.updateSourceSpanPrototype_closure0, A.updateSourceSpanPrototype_closure1, A.updateSourceSpanPrototype_closure2, A.updateSourceSpanPrototype__closure, A.updateSourceSpanPrototype_closure3, A.updateSourceSpanPrototype_closure4, A.updateSourceSpanPrototype_closure5, A.updateSourceSpanPrototype_closure6, A.StatementSearchVisitor_visitIfRule_closure1, A.StatementSearchVisitor_visitIfRule__closure2, A.StatementSearchVisitor_visitIfRule_closure2, A.StatementSearchVisitor_visitIfRule__closure1, A.StatementSearchVisitor_visitChildren_closure0, A.module_closure25, A.module__closure3, A.module__closure4, A._unquote_closure0, A._quote_closure0, A._length_closure1, A._insert_closure0, A._index_closure1, A._slice_closure0, A._toUpperCase_closure0, A._toLowerCase_closure0, A._uniqueId_closure0, A.StringExtension_toCssIdentifier_writeEscape, A.StringExtension_toCssIdentifier_consumeSurrogatePair, A.stringClass__closure, A.stringClass__closure0, A.stringClass__closure1, A.stringClass__closure2, A.stringClass__closure3, A.legacyStringClass_closure, A.legacyStringClass_closure0, A.StylesheetParser__expression_addSingleExpression0, A.StylesheetParser__expression_addOperator0, A.StylesheetParser__isHexColor_closure0, A.StylesheetParser__unicodeRange_closure1, A.StylesheetParser__unicodeRange_closure2, A.StylesheetParser_trySpecialFunction_closure0, A._UnprefixedKeys_iterator_closure1, A._UnprefixedKeys_iterator_closure2, A._exactlyOne_closure0, A.futureToPromise__closure0, A.indent_closure0, A.flattenVertically_closure1, A.flattenVertically_closure2, A.valueClass__closure, A.valueClass__closure0, A.valueClass__closure1, A.valueClass__closure2, A.valueClass__closure3, A.valueClass__closure4, A.valueClass__closure5, A.valueClass__closure7, A.valueClass__closure8, A.valueClass__closure9, A.valueClass__closure10, A.valueClass__closure11, A.valueClass__closure12, A.valueClass__closure13, A.valueClass__closure14, A.valueClass__closure15, A.valueClass__closure17, A.valueClass__closure18]); - _inheritMany(A.Closure2Args, [A._CastListBase_sort_closure, A.CastMap_forEach_closure, A.Primitives_functionNoSuchMethod_closure, A.JsLinkedHashMap_addAll_closure, A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A.Future_wait_handleError, A._Future__chainForeignFuture_closure0, A.Stream_Stream$fromFuture_closure0, A._AddStreamState_makeErrorHandler_closure, A._HashMap_addAll_closure, A.HashMap_HashMap$from_closure, A.LinkedHashMap_LinkedHashMap$from_closure, A.MapBase_addAll_closure, A.MapBase_mapToString_closure, A._JsonMap_addAll_closure, A._JsonStringifier_writeMap_closure, A.NoSuchMethodError_toString_closure, A.Uri__parseIPv4Address_error, A.Uri_parseIPv6Address_error, A.Uri_parseIPv6Address_parseHex, A._createTables_build, A.Parser_parse_closure, A.FutureGroup_add_closure0, A.StreamQueue__ensureListening_closure1, A.futureToPromise_closure, A.PathMap__create_closure, A.IfRule_toString_closure, A.ComplexSelector_specificity_closure, A.CompoundSelector_specificity_closure, A.ExtensionStore_clone_closure, A._weaveParents_closure, A.paths_closure, A._nest__closure0, A._append__closure0, A.ImportCache_clearCanonicalize_closure, A.watchDir_closure0, A.ParcelWatcher_subscribe_closure, A.StylesheetParser__styleRule_closure, A.StylesheetParser__tryDeclarationChildren_closure, A.StylesheetParser__atRootRule_closure, A.StylesheetParser__atRootRule_closure0, A.StylesheetParser__eachRule_closure, A.StylesheetParser__functionRule_closure, A.StylesheetParser__forRule_closure0, A.StylesheetParser__includeRule_closure, A.StylesheetParser_mediaRule_closure, A.StylesheetParser__mixinRule_closure, A.StylesheetParser_mozDocumentRule_closure, A.StylesheetParser_supportsRule_closure, A.StylesheetParser__whileRule_closure, A.StylesheetParser_unknownAtRule_closure, A.longestCommonSubsequence_backtrack, A.mapAddAll2_closure, A.SassNumber_plus_closure, A.SassNumber_minus_closure, A.SassNumber__canonicalMultiplier_closure, A._EvaluateVisitor__closure3, A._EvaluateVisitor__closure4, A._EvaluateVisitor_visitForwardRule_closure1, A._EvaluateVisitor_visitForwardRule_closure2, A._EvaluateVisitor_visitUseRule_closure0, A._EvaluateVisitor__evaluateArguments_closure5, A._EvaluateVisitor__evaluateMacroArguments_closure5, A._EvaluateVisitor__addRestMap_closure0, A._EvaluateVisitor__closure, A._EvaluateVisitor__closure0, A._EvaluateVisitor_visitForwardRule_closure, A._EvaluateVisitor_visitForwardRule_closure0, A._EvaluateVisitor_visitUseRule_closure, A._EvaluateVisitor__evaluateArguments_closure1, A._EvaluateVisitor__evaluateMacroArguments_closure1, A._EvaluateVisitor__addRestMap_closure, A.SingleMapping_toJson_closure0, A.Highlighter__collateLines_closure0, A.Frame_Frame$parseV8_closure_parseJsLocation, A.TransformByHandlers_transformByHandlers__closure1, A.RateLimit__debounceAggregate_closure, A._EvaluateVisitor__closure11, A._EvaluateVisitor__closure12, A._EvaluateVisitor_visitForwardRule_closure5, A._EvaluateVisitor_visitForwardRule_closure6, A._EvaluateVisitor_visitUseRule_closure2, A._EvaluateVisitor__evaluateArguments_closure13, A._EvaluateVisitor__evaluateMacroArguments_closure13, A._EvaluateVisitor__addRestMap_closure2, A.calculationOperationClass__closure0, A.calculationInterpolationClass__closure, A.calculationInterpolationClass__closure0, A.colorClass__closure, A.colorClass__closure0, A.colorClass__closure2, A.colorClass__closure4, A.colorClass__closure6, A.colorClass__closure8, A.legacyColorClass_closure4, A.legacyColorClass_closure5, A.legacyColorClass_closure6, A.legacyColorClass_closure7, A._parseFunctions_closure0, A.ComplexSelector_specificity_closure0, A.CompoundSelector_specificity_closure0, A._EvaluateVisitor__closure7, A._EvaluateVisitor__closure8, A._EvaluateVisitor_visitForwardRule_closure3, A._EvaluateVisitor_visitForwardRule_closure4, A._EvaluateVisitor_visitUseRule_closure1, A._EvaluateVisitor__evaluateArguments_closure9, A._EvaluateVisitor__evaluateMacroArguments_closure9, A._EvaluateVisitor__addRestMap_closure1, A.ExtensionStore_clone_closure0, A._weaveParents_closure3, A.paths_closure0, A.IfRule_toString_closure0, A.main_closure, A.main_closure0, A.render_closure1, A._parseFunctions_closure, A.listClass__closure0, A.legacyListClass_closure0, A.legacyListClass_closure3, A.mapClass__closure1, A.legacyMapClass_closure0, A.legacyMapClass_closure1, A.numberClass__closure10, A.numberClass__closure11, A.legacyNumberClass_closure1, A.legacyNumberClass_closure3, A.SassNumber_plus_closure0, A.SassNumber_minus_closure0, A.SassNumber__canonicalMultiplier_closure0, A._updateAstPrototypes_closure2, A._updateAstPrototypes_closure3, A.JSClassExtension_get_defineStaticMethod_closure, A.JSClassExtension_get_defineMethod_closure, A.JSClassExtension_get_defineGetter_closure, A._nest__closure2, A._append__closure2, A.legacyStringClass_closure1, A.StylesheetParser__styleRule_closure0, A.StylesheetParser__tryDeclarationChildren_closure0, A.StylesheetParser__atRootRule_closure1, A.StylesheetParser__atRootRule_closure2, A.StylesheetParser__eachRule_closure0, A.StylesheetParser__functionRule_closure0, A.StylesheetParser__forRule_closure2, A.StylesheetParser__includeRule_closure0, A.StylesheetParser_mediaRule_closure0, A.StylesheetParser__mixinRule_closure0, A.StylesheetParser_mozDocumentRule_closure0, A.StylesheetParser_supportsRule_closure0, A.StylesheetParser__whileRule_closure0, A.StylesheetParser_unknownAtRule_closure0, A.futureToPromise_closure0, A.futureToPromise__closure1, A.objectToMap_closure, A.longestCommonSubsequence_backtrack0, A.mapAddAll2_closure0, A.valueClass__closure6, A.valueClass__closure16]); - _inherit(A.CastList, A._CastListBase); - _inheritMany(A.MapBase, [A.CastMap, A.JsLinkedHashMap, A._HashMap, A.UnmodifiableMapBase, A._JsonMap, A.MergedMapView, A.MergedMapView0]); - _inheritMany(A.Error, [A.LateError, A.TypeError, A.JsNoSuchMethodError, A.UnknownJsTypeError, A._CyclicInitializationError, A.RuntimeError, A._Error, A.JsonUnsupportedObjectError, A.AssertionError, A.ArgumentError, A.NoSuchMethodError, A.UnsupportedError, A.UnimplementedError, A.StateError, A.ConcurrentModificationError]); - _inherit(A.UnmodifiableListBase, A.ListBase); - _inheritMany(A.UnmodifiableListBase, [A.CodeUnits, A.UnmodifiableListView]); - _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl$periodic_closure, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainForeignFuture_closure1, A._Future__chainCoreFutureAsync_closure, A._Future__asyncCompleteWithValue_closure, A._Future__asyncCompleteError_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A.Stream_length_closure0, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._AddStreamState_cancel_closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._CustomZone_bindCallback_closure, A._CustomZone_bindCallbackGuarded_closure, A._rootHandleError_closure, A._RootZone_bindCallback_closure, A._RootZone_bindCallbackGuarded_closure, A._Utf8Decoder__decoder_closure, A._Utf8Decoder__decoderNonfatal_closure, A.Parser__setOption_closure, A.StreamGroup_add_closure, A.StreamGroup_add_closure0, A.StreamGroup__listenToStream_closure, A.StreamQueue__ensureListening_closure0, A._isStrictMode_closure, A.ReplAdapter_runAsync_closure, A.ParsedPath__splitExtension_closure0, A.PseudoSelector_specificity_closure, A.AsyncEnvironment_setVariable_closure, A.AsyncEnvironment_setVariable_closure1, A.AsyncImportCache_canonicalize_closure, A.AsyncImportCache__canonicalize_closure, A.AsyncImportCache_importCanonical_closure, A.Environment_setVariable_closure, A.Environment_setVariable_closure1, A.ExecutableOptions__parser_closure, A.ExecutableOptions_interactive_closure, A.ExecutableOptions_fatalDeprecations_closure, A.ExtensionStore__registerSelector_closure, A.ExtensionStore_addExtension_closure, A.ExtensionStore_addExtension_closure0, A.ExtensionStore_addExtension_closure1, A.ExtensionStore__extendExistingExtensions_closure, A.ExtensionStore__extendExistingExtensions_closure0, A.ExtensionStore_addExtensions_closure, A._changeColor_closure, A.ImportCache_canonicalize_closure, A.ImportCache__canonicalize_closure, A.ImportCache_importCanonical_closure, A.resolveImportPath_closure, A.resolveImportPath_closure0, A._tryPathAsDirectory_closure, A._realCasePath_helper_closure, A._readFile_closure, A.writeFile_closure, A.deleteFile_closure, A.fileExists_closure, A.dirExists_closure, A.ensureDir_closure, A.listDir_closure, A.modificationTime_closure, A.watchDir_closure, A.watchDir_closure5, A.watchDir__closure, A.AtRootQueryParser_parse_closure, A.KeyframeSelectorParser_parse_closure, A.MediaQueryParser_parse_closure, A.Parser__parseIdentifier_closure, A.Parser_spanFrom_closure, A.SassParser_children_closure, A.SelectorParser_parse_closure, A.SelectorParser_parseCompoundSelector_closure, A.StylesheetParser_parse_closure, A.StylesheetParser_parse__closure, A.StylesheetParser_parseArgumentDeclaration_closure, A.StylesheetParser_parseVariableDeclaration_closure, A.StylesheetParser_parseUseRule_closure, A.StylesheetParser__parseSingleProduction_closure, A.StylesheetParser__statement_closure, A.StylesheetParser_variableDeclarationWithoutNamespace_closure, A.StylesheetParser_variableDeclarationWithoutNamespace_closure0, A.StylesheetParser__forRule_closure, A.StylesheetParser__memberList_closure, A.StylesheetParser__expression_resetState, A.StylesheetParser__expression_resolveOneOperation, A.StylesheetParser__expression_resolveOperations, A.StylesheetParser__expression_resolveSpaceExpressions, A.StylesheetParser_expressionUntilComma_closure, A.StylesheetParser_namespacedExpression_closure, A.StylesheetParser__expressionUntilComparison_closure, A.StylesheetParser__publicIdentifier_closure, A.StylesheetGraph_modifiedSince_transitiveModificationTime_closure, A.StylesheetGraph__add_closure, A.StylesheetGraph_addCanonical_closure, A.StylesheetGraph_reload_closure, A.StylesheetGraph__nodeFor_closure, A.StylesheetGraph__nodeFor_closure0, A.SassNumber__coerceOrConvertValue_compatibilityException, A.SassNumber__coerceOrConvertValue_closure0, A.SassNumber__coerceOrConvertValue_closure2, A.SassNumber_multiplyUnits_closure0, A.SassNumber_multiplyUnits_closure2, A.SingleUnitSassNumber_multiplyUnits_closure0, A._EvaluateVisitor__closure6, A._EvaluateVisitor__closure5, A._EvaluateVisitor_run_closure0, A._EvaluateVisitor_run__closure0, A._EvaluateVisitor__loadModule_closure1, A._EvaluateVisitor__loadModule_closure2, A._EvaluateVisitor__loadModule__closure2, A._EvaluateVisitor__execute_closure0, A._EvaluateVisitor__extendModules_closure2, A._EvaluateVisitor_visitAtRootRule_closure1, A._EvaluateVisitor_visitAtRootRule_closure2, A._EvaluateVisitor__scopeForAtRoot__closure0, A._EvaluateVisitor_visitContentRule_closure0, A._EvaluateVisitor_visitDeclaration_closure0, A._EvaluateVisitor_visitEachRule_closure4, A._EvaluateVisitor_visitAtRule_closure3, A._EvaluateVisitor_visitAtRule__closure0, A._EvaluateVisitor_visitForRule_closure4, A._EvaluateVisitor_visitForRule_closure5, A._EvaluateVisitor_visitForRule_closure6, A._EvaluateVisitor_visitForRule_closure7, A._EvaluateVisitor_visitForRule_closure8, A._EvaluateVisitor__registerCommentsForModule_closure0, A._EvaluateVisitor_visitIfRule__closure0, A._EvaluateVisitor__visitDynamicImport_closure0, A._EvaluateVisitor__visitDynamicImport__closure6, A._EvaluateVisitor__applyMixin_closure1, A._EvaluateVisitor__applyMixin__closure2, A._EvaluateVisitor__applyMixin_closure2, A._EvaluateVisitor__applyMixin__closure1, A._EvaluateVisitor__applyMixin___closure0, A._EvaluateVisitor__applyMixin____closure0, A._EvaluateVisitor_visitIncludeRule_closure2, A._EvaluateVisitor_visitIncludeRule_closure4, A._EvaluateVisitor_visitMediaRule_closure3, A._EvaluateVisitor_visitMediaRule__closure0, A._EvaluateVisitor_visitMediaRule___closure0, A._EvaluateVisitor_visitStyleRule_closure3, A._EvaluateVisitor_visitStyleRule_closure6, A._EvaluateVisitor_visitStyleRule__closure0, A._EvaluateVisitor_visitSupportsRule_closure1, A._EvaluateVisitor_visitSupportsRule__closure0, A._EvaluateVisitor__visitSupportsCondition_closure0, A._EvaluateVisitor_visitVariableDeclaration_closure2, A._EvaluateVisitor_visitVariableDeclaration_closure3, A._EvaluateVisitor_visitVariableDeclaration_closure4, A._EvaluateVisitor_visitWarnRule_closure0, A._EvaluateVisitor_visitWhileRule_closure0, A._EvaluateVisitor_visitBinaryOperationExpression_closure0, A._EvaluateVisitor_visitVariableExpression_closure0, A._EvaluateVisitor_visitUnaryOperationExpression_closure0, A._EvaluateVisitor_visitFunctionExpression_closure2, A._EvaluateVisitor_visitFunctionExpression_closure4, A._EvaluateVisitor__visitCalculationExpression_closure0, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure0, A._EvaluateVisitor__runUserDefinedCallable_closure0, A._EvaluateVisitor__runUserDefinedCallable__closure0, A._EvaluateVisitor__runUserDefinedCallable___closure0, A._EvaluateVisitor__runFunctionCallable_closure0, A._EvaluateVisitor__runBuiltInCallable_closure2, A._EvaluateVisitor__runBuiltInCallable_closure3, A._EvaluateVisitor__verifyArguments_closure0, A._EvaluateVisitor_visitCssAtRule_closure1, A._EvaluateVisitor_visitCssKeyframeBlock_closure1, A._EvaluateVisitor_visitCssMediaRule_closure3, A._EvaluateVisitor_visitCssMediaRule__closure0, A._EvaluateVisitor_visitCssMediaRule___closure0, A._EvaluateVisitor_visitCssStyleRule_closure2, A._EvaluateVisitor_visitCssStyleRule__closure0, A._EvaluateVisitor_visitCssSupportsRule_closure1, A._EvaluateVisitor_visitCssSupportsRule__closure0, A._EvaluateVisitor__serialize_closure0, A._EvaluateVisitor__expressionNode_closure0, A._EvaluateVisitor__closure2, A._EvaluateVisitor__closure1, A._EvaluateVisitor_run_closure, A._EvaluateVisitor_run__closure, A._EvaluateVisitor_runExpression_closure, A._EvaluateVisitor_runExpression__closure, A._EvaluateVisitor_runExpression___closure, A._EvaluateVisitor_runStatement_closure, A._EvaluateVisitor_runStatement__closure, A._EvaluateVisitor_runStatement___closure, A._EvaluateVisitor__loadModule_closure, A._EvaluateVisitor__loadModule_closure0, A._EvaluateVisitor__loadModule__closure0, A._EvaluateVisitor__execute_closure, A._EvaluateVisitor__extendModules_closure0, A._EvaluateVisitor_visitAtRootRule_closure, A._EvaluateVisitor_visitAtRootRule_closure0, A._EvaluateVisitor__scopeForAtRoot__closure, A._EvaluateVisitor_visitContentRule_closure, A._EvaluateVisitor_visitDeclaration_closure, A._EvaluateVisitor_visitEachRule_closure1, A._EvaluateVisitor_visitAtRule_closure0, A._EvaluateVisitor_visitAtRule__closure, A._EvaluateVisitor_visitForRule_closure, A._EvaluateVisitor_visitForRule_closure0, A._EvaluateVisitor_visitForRule_closure1, A._EvaluateVisitor_visitForRule_closure2, A._EvaluateVisitor_visitForRule_closure3, A._EvaluateVisitor__registerCommentsForModule_closure, A._EvaluateVisitor_visitIfRule__closure, A._EvaluateVisitor__visitDynamicImport_closure, A._EvaluateVisitor__visitDynamicImport__closure2, A._EvaluateVisitor__applyMixin_closure, A._EvaluateVisitor__applyMixin__closure0, A._EvaluateVisitor__applyMixin_closure0, A._EvaluateVisitor__applyMixin__closure, A._EvaluateVisitor__applyMixin___closure, A._EvaluateVisitor__applyMixin____closure, A._EvaluateVisitor_visitIncludeRule_closure, A._EvaluateVisitor_visitIncludeRule_closure1, A._EvaluateVisitor_visitMediaRule_closure0, A._EvaluateVisitor_visitMediaRule__closure, A._EvaluateVisitor_visitMediaRule___closure, A._EvaluateVisitor_visitStyleRule_closure, A._EvaluateVisitor_visitStyleRule_closure2, A._EvaluateVisitor_visitStyleRule__closure, A._EvaluateVisitor_visitSupportsRule_closure, A._EvaluateVisitor_visitSupportsRule__closure, A._EvaluateVisitor__visitSupportsCondition_closure, A._EvaluateVisitor_visitVariableDeclaration_closure, A._EvaluateVisitor_visitVariableDeclaration_closure0, A._EvaluateVisitor_visitVariableDeclaration_closure1, A._EvaluateVisitor_visitWarnRule_closure, A._EvaluateVisitor_visitWhileRule_closure, A._EvaluateVisitor_visitBinaryOperationExpression_closure, A._EvaluateVisitor_visitVariableExpression_closure, A._EvaluateVisitor_visitUnaryOperationExpression_closure, A._EvaluateVisitor_visitFunctionExpression_closure, A._EvaluateVisitor_visitFunctionExpression_closure1, A._EvaluateVisitor__visitCalculationExpression_closure, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure, A._EvaluateVisitor__runUserDefinedCallable_closure, A._EvaluateVisitor__runUserDefinedCallable__closure, A._EvaluateVisitor__runUserDefinedCallable___closure, A._EvaluateVisitor__runFunctionCallable_closure, A._EvaluateVisitor__runBuiltInCallable_closure, A._EvaluateVisitor__runBuiltInCallable_closure0, A._EvaluateVisitor__verifyArguments_closure, A._EvaluateVisitor_visitCssAtRule_closure, A._EvaluateVisitor_visitCssKeyframeBlock_closure, A._EvaluateVisitor_visitCssMediaRule_closure0, A._EvaluateVisitor_visitCssMediaRule__closure, A._EvaluateVisitor_visitCssMediaRule___closure, A._EvaluateVisitor_visitCssStyleRule_closure0, A._EvaluateVisitor_visitCssStyleRule__closure, A._EvaluateVisitor_visitCssSupportsRule_closure, A._EvaluateVisitor_visitCssSupportsRule__closure, A._EvaluateVisitor__serialize_closure, A._EvaluateVisitor__expressionNode_closure, A._SerializeVisitor_visitCssComment_closure, A._SerializeVisitor_visitCssAtRule_closure, A._SerializeVisitor_visitCssMediaRule_closure, A._SerializeVisitor_visitCssImport_closure, A._SerializeVisitor_visitCssImport__closure, A._SerializeVisitor_visitCssKeyframeBlock_closure, A._SerializeVisitor_visitCssStyleRule_closure, A._SerializeVisitor_visitCssSupportsRule_closure, A._SerializeVisitor_visitCssDeclaration_closure, A._SerializeVisitor_visitCssDeclaration_closure0, A._SerializeVisitor__write_closure, A._SerializeVisitor__visitChildren_closure, A._SerializeVisitor__visitChildren_closure0, A.SingleMapping_SingleMapping$fromEntries_closure, A.SingleMapping_SingleMapping$fromEntries_closure0, A.Highlighter_closure, A.Highlighter__writeFileStart_closure, A.Highlighter__writeMultilineHighlights_closure, A.Highlighter__writeMultilineHighlights_closure0, A.Highlighter__writeMultilineHighlights_closure1, A.Highlighter__writeMultilineHighlights_closure2, A.Highlighter__writeMultilineHighlights__closure, A.Highlighter__writeMultilineHighlights__closure0, A.Highlighter__writeHighlightedText_closure, A.Highlighter__writeIndicator_closure, A.Highlighter__writeIndicator_closure0, A.Highlighter__writeIndicator_closure1, A.Highlighter__writeLabel_closure, A.Highlighter__writeLabel_closure0, A.Highlighter__writeSidebar_closure, A._Highlight_closure, A.Frame_Frame$parseVM_closure, A.Frame_Frame$parseV8_closure, A.Frame_Frame$_parseFirefoxEval_closure, A.Frame_Frame$parseFirefox_closure, A.Frame_Frame$parseFriendly_closure, A.LazyTrace_terse_closure, A.Trace_Trace$from_closure, A.TransformByHandlers_transformByHandlers_closure, A.TransformByHandlers_transformByHandlers__closure0, A.TransformByHandlers_transformByHandlers__closure2, A.RateLimit__debounceAggregate_closure_emit, A.RateLimit__debounceAggregate__closure, A.argumentListClass_closure, A.JSToDartAsyncImporter_canonicalize_closure, A.JSToDartAsyncImporter_load_closure, A.AsyncEnvironment_setVariable_closure2, A.AsyncEnvironment_setVariable_closure4, A._EvaluateVisitor__closure14, A._EvaluateVisitor__closure13, A._EvaluateVisitor_run_closure2, A._EvaluateVisitor_run__closure2, A._EvaluateVisitor__loadModule_closure5, A._EvaluateVisitor__loadModule_closure6, A._EvaluateVisitor__loadModule__closure6, A._EvaluateVisitor__execute_closure2, A._EvaluateVisitor__extendModules_closure6, A._EvaluateVisitor_visitAtRootRule_closure5, A._EvaluateVisitor_visitAtRootRule_closure6, A._EvaluateVisitor__scopeForAtRoot__closure2, A._EvaluateVisitor_visitContentRule_closure2, A._EvaluateVisitor_visitDeclaration_closure2, A._EvaluateVisitor_visitEachRule_closure10, A._EvaluateVisitor_visitAtRule_closure9, A._EvaluateVisitor_visitAtRule__closure2, A._EvaluateVisitor_visitForRule_closure14, A._EvaluateVisitor_visitForRule_closure15, A._EvaluateVisitor_visitForRule_closure16, A._EvaluateVisitor_visitForRule_closure17, A._EvaluateVisitor_visitForRule_closure18, A._EvaluateVisitor__registerCommentsForModule_closure2, A._EvaluateVisitor_visitIfRule__closure2, A._EvaluateVisitor__visitDynamicImport_closure2, A._EvaluateVisitor__visitDynamicImport__closure14, A._EvaluateVisitor__applyMixin_closure5, A._EvaluateVisitor__applyMixin__closure6, A._EvaluateVisitor__applyMixin_closure6, A._EvaluateVisitor__applyMixin__closure5, A._EvaluateVisitor__applyMixin___closure2, A._EvaluateVisitor__applyMixin____closure2, A._EvaluateVisitor_visitIncludeRule_closure8, A._EvaluateVisitor_visitIncludeRule_closure10, A._EvaluateVisitor_visitMediaRule_closure9, A._EvaluateVisitor_visitMediaRule__closure2, A._EvaluateVisitor_visitMediaRule___closure2, A._EvaluateVisitor_visitStyleRule_closure11, A._EvaluateVisitor_visitStyleRule_closure14, A._EvaluateVisitor_visitStyleRule__closure2, A._EvaluateVisitor_visitSupportsRule_closure5, A._EvaluateVisitor_visitSupportsRule__closure2, A._EvaluateVisitor__visitSupportsCondition_closure2, A._EvaluateVisitor_visitVariableDeclaration_closure8, A._EvaluateVisitor_visitVariableDeclaration_closure9, A._EvaluateVisitor_visitVariableDeclaration_closure10, A._EvaluateVisitor_visitWarnRule_closure2, A._EvaluateVisitor_visitWhileRule_closure2, A._EvaluateVisitor_visitBinaryOperationExpression_closure2, A._EvaluateVisitor_visitVariableExpression_closure2, A._EvaluateVisitor_visitUnaryOperationExpression_closure2, A._EvaluateVisitor_visitFunctionExpression_closure8, A._EvaluateVisitor_visitFunctionExpression_closure10, A._EvaluateVisitor__visitCalculationExpression_closure2, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure2, A._EvaluateVisitor__runUserDefinedCallable_closure2, A._EvaluateVisitor__runUserDefinedCallable__closure2, A._EvaluateVisitor__runUserDefinedCallable___closure2, A._EvaluateVisitor__runFunctionCallable_closure2, A._EvaluateVisitor__runBuiltInCallable_closure8, A._EvaluateVisitor__runBuiltInCallable_closure9, A._EvaluateVisitor__verifyArguments_closure2, A._EvaluateVisitor_visitCssAtRule_closure5, A._EvaluateVisitor_visitCssKeyframeBlock_closure5, A._EvaluateVisitor_visitCssMediaRule_closure9, A._EvaluateVisitor_visitCssMediaRule__closure2, A._EvaluateVisitor_visitCssMediaRule___closure2, A._EvaluateVisitor_visitCssStyleRule_closure6, A._EvaluateVisitor_visitCssStyleRule__closure2, A._EvaluateVisitor_visitCssSupportsRule_closure5, A._EvaluateVisitor_visitCssSupportsRule__closure2, A._EvaluateVisitor__serialize_closure2, A._EvaluateVisitor__expressionNode_closure2, A.JSToDartAsyncFileImporter_canonicalize_closure, A.AsyncImportCache_canonicalize_closure0, A.AsyncImportCache__canonicalize_closure0, A.AsyncImportCache_importCanonical_closure0, A.AtRootQueryParser_parse_closure0, A.booleanClass_closure, A.legacyBooleanClass_closure, A.calculationClass_closure, A.calculationOperationClass_closure, A.calculationInterpolationClass_closure, A._changeColor_closure0, A.colorClass_closure, A.compileAsync_closure, A.compileStringAsync_closure, A._parseFunctions___closure6, A._parseFunctions___closure5, A.nodePackageImporterClass_closure, A.compilerClass_closure, A.asyncCompilerClass_closure, A.asyncCompilerClass___closure, A.initAsyncCompiler_closure, A.deprecations_closure, A.parseDeprecations_closure, A.versionClass_closure, A.Environment_setVariable_closure2, A.Environment_setVariable_closure4, A._EvaluateVisitor__closure10, A._EvaluateVisitor__closure9, A._EvaluateVisitor_run_closure1, A._EvaluateVisitor_run__closure1, A._EvaluateVisitor__loadModule_closure3, A._EvaluateVisitor__loadModule_closure4, A._EvaluateVisitor__loadModule__closure4, A._EvaluateVisitor__execute_closure1, A._EvaluateVisitor__extendModules_closure4, A._EvaluateVisitor_visitAtRootRule_closure3, A._EvaluateVisitor_visitAtRootRule_closure4, A._EvaluateVisitor__scopeForAtRoot__closure1, A._EvaluateVisitor_visitContentRule_closure1, A._EvaluateVisitor_visitDeclaration_closure1, A._EvaluateVisitor_visitEachRule_closure7, A._EvaluateVisitor_visitAtRule_closure6, A._EvaluateVisitor_visitAtRule__closure1, A._EvaluateVisitor_visitForRule_closure9, A._EvaluateVisitor_visitForRule_closure10, A._EvaluateVisitor_visitForRule_closure11, A._EvaluateVisitor_visitForRule_closure12, A._EvaluateVisitor_visitForRule_closure13, A._EvaluateVisitor__registerCommentsForModule_closure1, A._EvaluateVisitor_visitIfRule__closure1, A._EvaluateVisitor__visitDynamicImport_closure1, A._EvaluateVisitor__visitDynamicImport__closure10, A._EvaluateVisitor__applyMixin_closure3, A._EvaluateVisitor__applyMixin__closure4, A._EvaluateVisitor__applyMixin_closure4, A._EvaluateVisitor__applyMixin__closure3, A._EvaluateVisitor__applyMixin___closure1, A._EvaluateVisitor__applyMixin____closure1, A._EvaluateVisitor_visitIncludeRule_closure5, A._EvaluateVisitor_visitIncludeRule_closure7, A._EvaluateVisitor_visitMediaRule_closure6, A._EvaluateVisitor_visitMediaRule__closure1, A._EvaluateVisitor_visitMediaRule___closure1, A._EvaluateVisitor_visitStyleRule_closure7, A._EvaluateVisitor_visitStyleRule_closure10, A._EvaluateVisitor_visitStyleRule__closure1, A._EvaluateVisitor_visitSupportsRule_closure3, A._EvaluateVisitor_visitSupportsRule__closure1, A._EvaluateVisitor__visitSupportsCondition_closure1, A._EvaluateVisitor_visitVariableDeclaration_closure5, A._EvaluateVisitor_visitVariableDeclaration_closure6, A._EvaluateVisitor_visitVariableDeclaration_closure7, A._EvaluateVisitor_visitWarnRule_closure1, A._EvaluateVisitor_visitWhileRule_closure1, A._EvaluateVisitor_visitBinaryOperationExpression_closure1, A._EvaluateVisitor_visitVariableExpression_closure1, A._EvaluateVisitor_visitUnaryOperationExpression_closure1, A._EvaluateVisitor_visitFunctionExpression_closure5, A._EvaluateVisitor_visitFunctionExpression_closure7, A._EvaluateVisitor__visitCalculationExpression_closure1, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure1, A._EvaluateVisitor__runUserDefinedCallable_closure1, A._EvaluateVisitor__runUserDefinedCallable__closure1, A._EvaluateVisitor__runUserDefinedCallable___closure1, A._EvaluateVisitor__runFunctionCallable_closure1, A._EvaluateVisitor__runBuiltInCallable_closure5, A._EvaluateVisitor__runBuiltInCallable_closure6, A._EvaluateVisitor__verifyArguments_closure1, A._EvaluateVisitor_visitCssAtRule_closure3, A._EvaluateVisitor_visitCssKeyframeBlock_closure3, A._EvaluateVisitor_visitCssMediaRule_closure6, A._EvaluateVisitor_visitCssMediaRule__closure1, A._EvaluateVisitor_visitCssMediaRule___closure1, A._EvaluateVisitor_visitCssStyleRule_closure4, A._EvaluateVisitor_visitCssStyleRule__closure1, A._EvaluateVisitor_visitCssSupportsRule_closure3, A._EvaluateVisitor_visitCssSupportsRule__closure1, A._EvaluateVisitor__serialize_closure1, A._EvaluateVisitor__expressionNode_closure1, A.exceptionClass_closure, A.ExtensionStore__registerSelector_closure0, A.ExtensionStore_addExtension_closure2, A.ExtensionStore_addExtension_closure3, A.ExtensionStore_addExtension_closure4, A.ExtensionStore__extendExistingExtensions_closure1, A.ExtensionStore__extendExistingExtensions_closure2, A.ExtensionStore_addExtensions_closure0, A.JSToDartFileImporter_canonicalize_closure, A.functionClass_closure, A.NodeImporter_load_closure, A.NodeImporter__tryPath_closure, A.NodeImporter__callImporterAsync_closure, A.ImportCache_canonicalize_closure0, A.ImportCache__canonicalize_closure0, A.ImportCache_importCanonical_closure0, A._realCasePath_helper_closure0, A._readFile_closure0, A.fileExists_closure0, A.dirExists_closure0, A.listDir_closure0, A.JSToDartLogger_internalWarn_closure, A.JSToDartLogger_debug_closure, A.KeyframeSelectorParser_parse_closure0, A.render_closure, A._parseFunctions____closure, A._parseFunctions___closure3, A._parseFunctions___closure4, A._parseFunctions___closure1, A._parseFunctions___closure0, A._parseImporter____closure, A._parseImporter___closure0, A.listClass_closure, A.mapClass_closure, A.MediaQueryParser_parse_closure0, A.mixinClass_closure, A.legacyNullClass_closure, A.numberClass_closure, A.SassNumber__coerceOrConvertValue_compatibilityException0, A.SassNumber__coerceOrConvertValue_closure4, A.SassNumber__coerceOrConvertValue_closure6, A.SassNumber_multiplyUnits_closure4, A.SassNumber_multiplyUnits_closure6, A.Parser__parseIdentifier_closure0, A.Parser_spanFrom_closure0, A.PseudoSelector_specificity_closure0, A.SassParser_children_closure0, A.SelectorParser_parse_closure0, A.SelectorParser_parseCompoundSelector_closure0, A._SerializeVisitor_visitCssComment_closure0, A._SerializeVisitor_visitCssAtRule_closure0, A._SerializeVisitor_visitCssMediaRule_closure0, A._SerializeVisitor_visitCssImport_closure0, A._SerializeVisitor_visitCssImport__closure0, A._SerializeVisitor_visitCssKeyframeBlock_closure0, A._SerializeVisitor_visitCssStyleRule_closure0, A._SerializeVisitor_visitCssSupportsRule_closure0, A._SerializeVisitor_visitCssDeclaration_closure1, A._SerializeVisitor_visitCssDeclaration_closure2, A._SerializeVisitor__write_closure0, A._SerializeVisitor__visitChildren_closure1, A._SerializeVisitor__visitChildren_closure2, A.SingleUnitSassNumber_multiplyUnits_closure2, A.updateSourceSpanPrototype_closure, A.stringClass_closure, A.StylesheetParser_parse_closure0, A.StylesheetParser_parse__closure0, A.StylesheetParser_parseArgumentDeclaration_closure0, A.StylesheetParser__parseSingleProduction_closure0, A.StylesheetParser_parseSignature_closure, A.StylesheetParser__statement_closure0, A.StylesheetParser_variableDeclarationWithoutNamespace_closure1, A.StylesheetParser_variableDeclarationWithoutNamespace_closure2, A.StylesheetParser__forRule_closure1, A.StylesheetParser__memberList_closure0, A.StylesheetParser__expression_resetState0, A.StylesheetParser__expression_resolveOneOperation0, A.StylesheetParser__expression_resolveOperations0, A.StylesheetParser__expression_resolveSpaceExpressions0, A.StylesheetParser_expressionUntilComma_closure0, A.StylesheetParser_namespacedExpression_closure0, A.StylesheetParser__expressionUntilComparison_closure0, A.StylesheetParser__publicIdentifier_closure0, A.JSToDartImporter_canonicalize_closure, A.JSToDartImporter_load_closure, A.resolveImportPath_closure1, A.resolveImportPath_closure2, A._tryPathAsDirectory_closure0, A.valueClass_closure]); - _inheritMany(A.EfficientLengthIterable, [A.ListIterable, A.EmptyIterable, A.LinkedHashMapKeyIterable, A._HashMapKeyIterable, A._MapBaseValueIterable]); - _inheritMany(A.ListIterable, [A.SubListIterable, A.MappedListIterable, A.ReversedListIterable, A.ListQueue, A._JsonMapKeyIterable, A._GeneratorIterable]); - _inherit(A.EfficientLengthMappedIterable, A.MappedIterable); - _inherit(A.EfficientLengthTakeIterable, A.TakeIterable); - _inherit(A.EfficientLengthSkipIterable, A.SkipIterable); - _inherit(A.EfficientLengthFollowedByIterable, A.FollowedByIterable); - _inheritMany(A._Record, [A._Record1, A._Record2, A._Record3, A._RecordN]); - _inherit(A._Record_1, A._Record1); - _inheritMany(A._Record2, [A._Record_2, A._Record_2_forImport, A._Record_2_imports_modules, A._Record_2_loadedUrls_stylesheet, A._Record_2_sourceMap]); - _inheritMany(A._Record3, [A._Record_3, A._Record_3_deprecation_message_span, A._Record_3_forImport, A._Record_3_importer_isDependency, A._Record_3_originalUrl]); - _inherit(A._Record_5_named_namedNodes_positional_positionalNodes_separator, A._RecordN); - _inheritMany(A.MapView, [A._UnmodifiableMapView_MapView__UnmodifiableMapMixin, A.PathMap]); - _inherit(A.UnmodifiableMapView, A._UnmodifiableMapView_MapView__UnmodifiableMapMixin); - _inherit(A.ConstantMapView, A.UnmodifiableMapView); - _inherit(A.ConstantStringMap, A.ConstantMap); - _inheritMany(A.SetBase, [A.ConstantSet, A._SetBase, A._UnmodifiableSetView_SetBase__UnmodifiableSetMixin, A._UnionSet_SetBase_UnmodifiableSetMixin]); - _inheritMany(A.ConstantSet, [A.ConstantStringSet, A.GeneralConstantSet]); - _inherit(A.Instantiation1, A.Instantiation); - _inherit(A.NullError, A.TypeError); - _inheritMany(A.TearOffClosure, [A.StaticClosure, A.BoundClosure]); - _inheritMany(A.JsLinkedHashMap, [A.JsIdentityLinkedHashMap, A.JsConstantLinkedHashMap, A._LinkedCustomHashMap]); - _inheritMany(A.NativeTypedData, [A.NativeByteData, A.NativeTypedArray]); - _inheritMany(A.NativeTypedArray, [A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin]); - _inherit(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin); - _inherit(A.NativeTypedArrayOfDouble, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin); - _inherit(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin); - _inherit(A.NativeTypedArrayOfInt, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin); - _inheritMany(A.NativeTypedArrayOfDouble, [A.NativeFloat32List, A.NativeFloat64List]); - _inheritMany(A.NativeTypedArrayOfInt, [A.NativeInt16List, A.NativeInt32List, A.NativeInt8List, A.NativeUint16List, A.NativeUint32List, A.NativeUint8ClampedList, A.NativeUint8List]); - _inherit(A._TypeError, A._Error); - _inheritMany(A._Completer, [A._AsyncCompleter, A._SyncCompleter]); - _inheritMany(A._StreamController, [A._AsyncStreamController, A._SyncStreamController]); - _inheritMany(A.Stream, [A._StreamImpl, A._ForwardingStream, A._CompleterStream]); - _inherit(A._ControllerStream, A._StreamImpl); - _inheritMany(A._BufferingStreamSubscription, [A._ControllerSubscription, A._ForwardingStreamSubscription]); - _inherit(A._StreamControllerAddStreamState, A._AddStreamState); - _inheritMany(A._DelayedEvent, [A._DelayedData, A._DelayedError]); - _inherit(A._ExpandStream, A._ForwardingStream); - _inheritMany(A._Zone, [A._CustomZone, A._RootZone]); - _inherit(A._IdentityHashMap, A._HashMap); - _inherit(A._LinkedHashSet, A._SetBase); - _inherit(A._LinkedIdentityHashSet, A._LinkedHashSet); - _inherit(A.UnmodifiableSetView, A._UnmodifiableSetView_SetBase__UnmodifiableSetMixin); - _inheritMany(A.Codec, [A.Encoding, A.Base64Codec, A.JsonCodec]); - _inheritMany(A.Encoding, [A.AsciiCodec, A.Utf8Codec]); - _inheritMany(A.Converter, [A._UnicodeSubsetEncoder, A.Base64Encoder, A.JsonEncoder, A.JsonDecoder, A.Utf8Encoder, A.Utf8Decoder]); - _inherit(A.AsciiEncoder, A._UnicodeSubsetEncoder); - _inheritMany(A.ByteConversionSink, [A._Base64EncoderSink, A._Utf8StringSinkAdapter]); - _inherit(A._Utf8Base64EncoderSink, A._Base64EncoderSink); - _inherit(A.JsonCyclicError, A.JsonUnsupportedObjectError); - _inherit(A._JsonStringStringifier, A._JsonStringifier); - _inherit(A._StringSinkConversionSink, A.StringConversionSink); - _inherit(A._StringCallbackSink, A._StringSinkConversionSink); - _inheritMany(A.ArgumentError, [A.RangeError, A.IndexError]); - _inherit(A._DataUri, A._Uri); - _inherit(A.ArgParserException, A.FormatException); - _inherit(A.EmptyUnmodifiableSet, A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin); - _inherit(A.QueueList, A._QueueList_Object_ListMixin); - _inherit(A._CastQueueList, A.QueueList); - _inherit(A.UnionSet, A._UnionSet_SetBase_UnmodifiableSetMixin); - _inheritMany(A._DelegatingIterableBase, [A.DelegatingSet, A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin]); - _inherit(A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin, A.DelegatingSet); - _inherit(A.UnmodifiableSetView0, A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin); - _inherit(A.MapKeySet, A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin); - _inheritMany(A.NodeJsError, [A.JsAssertionError, A.JsRangeError, A.JsReferenceError, A.JsSyntaxError, A.JsTypeError, A.JsSystemError]); - _inheritMany(A.Socket, [A.TTYReadStream, A.TTYWriteStream]); - _inherit(A.InternalStyle, A.Style); - _inheritMany(A.InternalStyle, [A.PosixStyle, A.UrlStyle, A.WindowsStyle]); - _inheritMany(A._Enum, [A._SingletonCssMediaQueryMergeResult, A.BinaryOperator, A.UnaryOperator, A.AttributeOperator, A.Combinator, A.Deprecation, A.ExtendMode, A.Syntax, A.CalculationOperator, A.HueInterpolationMethod, A.ListSeparator, A.OutputStyle, A.LineFeed, A.AttributeOperator0, A.BinaryOperator0, A.CalculationOperator0, A.Combinator0, A.Deprecation0, A.HueInterpolationMethod0, A.ListSeparator0, A._SingletonCssMediaQueryMergeResult0, A.ExtendMode0, A.OutputStyle0, A.LineFeed0, A.Syntax0, A.UnaryOperator0]); - _inheritMany(A.CssNode, [A.ModifiableCssNode, A.CssParentNode]); - _inheritMany(A.ModifiableCssNode, [A.ModifiableCssParentNode, A.ModifiableCssComment, A.ModifiableCssDeclaration, A.ModifiableCssImport]); - _inheritMany(A.ModifiableCssParentNode, [A.ModifiableCssAtRule, A.ModifiableCssKeyframeBlock, A.ModifiableCssMediaRule, A.ModifiableCssStyleRule, A.ModifiableCssStylesheet, A.ModifiableCssSupportsRule]); - _inherit(A._IsInvisibleVisitor, A.__IsInvisibleVisitor_Object_EveryCssVisitor); - _inherit(A.CssStylesheet, A.CssParentNode); - _inheritMany(A.Expression, [A.BinaryOperationExpression, A.BooleanExpression, A.ColorExpression, A.FunctionExpression, A.IfExpression, A.InterpolatedFunctionExpression, A.ListExpression, A.MapExpression, A.NullExpression, A.NumberExpression, A.ParenthesizedExpression, A.SelectorExpression, A.StringExpression, A.SupportsExpression, A.UnaryOperationExpression, A.ValueExpression, A.VariableExpression]); - _inheritMany(A.Statement, [A.ParentStatement, A.ContentRule, A.DebugRule, A.ErrorRule, A.ExtendRule, A.ForwardRule, A.IfRule, A.ImportRule, A.IncludeRule, A.LoudComment, A.ReturnRule, A.SilentComment, A.UseRule, A.VariableDeclaration, A.WarnRule]); - _inheritMany(A.ParentStatement, [A.AtRootRule, A.AtRule, A.CallableDeclaration, A.Declaration, A.EachRule, A.ForRule, A.MediaRule, A.StyleRule, A.Stylesheet, A.SupportsRule, A.WhileRule]); - _inheritMany(A.CallableDeclaration, [A.ContentBlock, A.FunctionRule, A.MixinRule]); - _inheritMany(A.IfRuleClause, [A.IfClause, A.ElseClause]); - _inherit(A._HasContentVisitor, A.__HasContentVisitor_Object_StatementSearchVisitor); - _inherit(A._IsInvisibleVisitor0, A.__IsInvisibleVisitor_Object_AnySelectorVisitor); - _inherit(A._IsBogusVisitor, A.__IsBogusVisitor_Object_AnySelectorVisitor); - _inherit(A._IsUselessVisitor, A.__IsUselessVisitor_Object_AnySelectorVisitor); - _inheritMany(A.Selector, [A.SimpleSelector, A.ComplexSelector, A.CompoundSelector, A.SelectorList]); - _inheritMany(A.SimpleSelector, [A.AttributeSelector, A.ClassSelector, A.IDSelector, A.ParentSelector, A.PlaceholderSelector, A.PseudoSelector, A.TypeSelector, A.UniversalSelector]); - _inherit(A._ParentSelectorVisitor, A.__ParentSelectorVisitor_Object_SelectorSearchVisitor); - _inherit(A.ExplicitConfiguration, A.Configuration); - _inheritMany(A.SourceSpanException, [A.SassException, A.SourceSpanFormatException, A.MultiSourceSpanException, A.SassException0]); - _inheritMany(A.SassException, [A.MultiSpanSassException, A.SassRuntimeException, A.SassFormatException]); - _inheritMany(A.MultiSpanSassException, [A.MultiSpanSassRuntimeException, A.MultiSpanSassFormatException]); - _inherit(A.MultiSpanSassScriptException, A.SassScriptException); - _inherit(A.MergedExtension, A.Extension); - _inherit(A.Importer, A.AsyncImporter); - _inheritMany(A.Importer, [A.FilesystemImporter, A.NoOpImporter, A.NodePackageImporter]); - _inherit(A.DeprecationProcessingLogger, A.LoggerWithDeprecationType0); - _inheritMany(A.Parser, [A.AtRootQueryParser, A.StylesheetParser, A.KeyframeSelectorParser, A.MediaQueryParser, A.SelectorParser]); - _inheritMany(A.StylesheetParser, [A.ScssParser, A.SassParser]); - _inherit(A.CssParser, A.ScssParser); - _inheritMany(A.UnmodifiableMapBase, [A.LimitedMapView, A.PrefixedMapView, A.PublicMemberMapView, A.UnprefixedMapView, A.LimitedMapView0, A.PrefixedMapView0, A.PublicMemberMapView0, A.UnprefixedMapView0]); - _inheritMany(A.Value, [A.SassList, A.SassBoolean, A.SassCalculation, A.SassColor, A.SassFunction, A.SassMap, A.SassMixin, A._SassNull, A.SassNumber, A.SassString]); - _inherit(A.SassArgumentList, A.SassList); - _inherit(A.LinearChannel, A.ColorChannel); - _inheritMany(A.GamutMapMethod, [A.ClipGamutMap, A.LocalMindeGamutMap]); - _inheritMany(A.ColorSpace, [A.A98RgbColorSpace, A.DisplayP3ColorSpace, A.HslColorSpace, A.HwbColorSpace, A.LabColorSpace, A.LchColorSpace, A.LmsColorSpace, A.OklabColorSpace, A.OklchColorSpace, A.ProphotoRgbColorSpace, A.Rec2020ColorSpace, A.RgbColorSpace, A.SrgbColorSpace, A.SrgbLinearColorSpace, A.XyzD50ColorSpace, A.XyzD65ColorSpace]); - _inheritMany(A.SassNumber, [A.ComplexSassNumber, A.SingleUnitSassNumber, A.UnitlessSassNumber]); - _inherit(A._MakeExpressionCalculationSafe, A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor); - _inherit(A._FindDependenciesVisitor, A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor); - _inherit(A.SingleMapping, A.Mapping); - _inherit(A.FileLocation, A.SourceLocationMixin); - _inheritMany(A.SourceSpanMixin, [A._FileSpan, A.SourceSpanBase]); - _inherit(A.MultiSourceSpanFormatException, A.MultiSourceSpanException); - _inherit(A.SourceSpanWithContext, A.SourceSpanBase); - _inherit(A.StringScannerException, A.SourceSpanFormatException); - _inheritMany(A.StringScanner, [A.LineScanner, A.SpanScanner]); - _inheritMany(A.ColorSpace0, [A.A98RgbColorSpace0, A.DisplayP3ColorSpace0, A.HslColorSpace0, A.HwbColorSpace0, A.LabColorSpace0, A.LchColorSpace0, A.LmsColorSpace0, A.OklabColorSpace0, A.OklchColorSpace0, A.ProphotoRgbColorSpace0, A.Rec2020ColorSpace0, A.RgbColorSpace0, A.SrgbColorSpace0, A.SrgbLinearColorSpace0, A.XyzD50ColorSpace0, A.XyzD65ColorSpace0]); - _inheritMany(A.Value0, [A.SassList0, A.SassBoolean0, A.SassCalculation0, A.SassColor0, A.SassNumber0, A.SassFunction0, A.SassMap0, A.SassMixin0, A._SassNull0, A.SassString0]); - _inherit(A.SassArgumentList0, A.SassList0); - _inheritMany(A.AsyncImporter0, [A.JSToDartAsyncImporter, A.JSToDartAsyncFileImporter, A.Importer0]); - _inheritMany(A.Parser1, [A.AtRootQueryParser0, A.StylesheetParser0, A.KeyframeSelectorParser0, A.MediaQueryParser0, A.SelectorParser0]); - _inheritMany(A.Statement0, [A.ParentStatement0, A.ContentRule0, A.DebugRule0, A.ErrorRule0, A.ExtendRule0, A.ForwardRule0, A.IfRule0, A.ImportRule0, A.IncludeRule0, A.LoudComment0, A.ReturnRule0, A.SilentComment0, A.UseRule0, A.VariableDeclaration0, A.WarnRule0]); - _inheritMany(A.ParentStatement0, [A.AtRootRule0, A.AtRule0, A.CallableDeclaration0, A.Declaration0, A.EachRule0, A.ForRule0, A.MediaRule0, A.StyleRule0, A.Stylesheet0, A.SupportsRule0, A.WhileRule0]); - _inheritMany(A.CssNode0, [A.ModifiableCssNode0, A.CssParentNode0]); - _inheritMany(A.ModifiableCssNode0, [A.ModifiableCssParentNode0, A.ModifiableCssComment0, A.ModifiableCssDeclaration0, A.ModifiableCssImport0]); - _inheritMany(A.ModifiableCssParentNode0, [A.ModifiableCssAtRule0, A.ModifiableCssKeyframeBlock0, A.ModifiableCssMediaRule0, A.ModifiableCssStyleRule0, A.ModifiableCssStylesheet0, A.ModifiableCssSupportsRule0]); - _inheritMany(A.Selector0, [A.SimpleSelector0, A.ComplexSelector0, A.CompoundSelector0, A.SelectorList0]); - _inheritMany(A.SimpleSelector0, [A.AttributeSelector0, A.ClassSelector0, A.IDSelector0, A.ParentSelector0, A.PlaceholderSelector0, A.PseudoSelector0, A.TypeSelector0, A.UniversalSelector0]); - _inheritMany(A.Expression0, [A.BinaryOperationExpression0, A.BooleanExpression0, A.ColorExpression0, A.FunctionExpression0, A.IfExpression0, A.InterpolatedFunctionExpression0, A.ListExpression0, A.MapExpression0, A.NullExpression0, A.NumberExpression0, A.ParenthesizedExpression0, A.SelectorExpression0, A.StringExpression0, A.SupportsExpression0, A.UnaryOperationExpression0, A.ValueExpression0, A.VariableExpression0]); - _inherit(A.LinearChannel0, A.ColorChannel0); - _inheritMany(A.GamutMapMethod0, [A.ClipGamutMap0, A.LocalMindeGamutMap0]); - _inherit(A._ConstructionOptions, A._Channels); - _inherit(A.CompileStringOptions, A.CompileOptions); - _inherit(A.AsyncCompiler, A.Compiler); - _inheritMany(A.SassNumber0, [A.ComplexSassNumber0, A.SingleUnitSassNumber0, A.UnitlessSassNumber0]); - _inherit(A.ExplicitConfiguration0, A.Configuration0); - _inheritMany(A.CallableDeclaration0, [A.ContentBlock0, A.FunctionRule0, A.MixinRule0]); - _inheritMany(A.StylesheetParser0, [A.ScssParser0, A.SassParser0]); - _inherit(A.CssParser0, A.ScssParser0); - _inheritMany(A.LoggerWithDeprecationType, [A.DeprecationProcessingLogger0, A.JSToDartLogger]); - _inherit(A._NodeException, A.JsError); - _inheritMany(A.SassException0, [A.MultiSpanSassException0, A.SassRuntimeException0, A.SassFormatException0]); - _inheritMany(A.MultiSpanSassException0, [A.MultiSpanSassRuntimeException0, A.MultiSpanSassFormatException0]); - _inherit(A.MultiSpanSassScriptException0, A.SassScriptException0); - _inherit(A._MakeExpressionCalculationSafe0, A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0); - _inheritMany(A.Importer0, [A.JSToDartFileImporter, A.FilesystemImporter0, A.NoOpImporter0, A.NodePackageImporter0, A.JSToDartImporter]); - _inheritMany(A.IfRuleClause0, [A.IfClause0, A.ElseClause0]); - _inherit(A._ParentSelectorVisitor0, A.__ParentSelectorVisitor_Object_SelectorSearchVisitor0); - _inherit(A.MergedExtension0, A.Extension0); - _inherit(A._HasContentVisitor0, A.__HasContentVisitor_Object_StatementSearchVisitor0); - _inherit(A._IsInvisibleVisitor1, A.__IsInvisibleVisitor_Object_EveryCssVisitor0); - _inherit(A._IsInvisibleVisitor2, A.__IsInvisibleVisitor_Object_AnySelectorVisitor0); - _inherit(A._IsBogusVisitor0, A.__IsBogusVisitor_Object_AnySelectorVisitor0); - _inherit(A._IsUselessVisitor0, A.__IsUselessVisitor_Object_AnySelectorVisitor0); - _inherit(A.CssStylesheet0, A.CssParentNode0); - _mixin(A.UnmodifiableListBase, A.UnmodifiableListMixin); - _mixin(A.__CastListBase__CastIterableBase_ListMixin, A.ListBase); - _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A.ListBase); - _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); - _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, A.ListBase); - _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); - _mixin(A._AsyncStreamController, A._AsyncStreamControllerDispatch); - _mixin(A._SyncStreamController, A._SyncStreamControllerDispatch); - _mixin(A.UnmodifiableMapBase, A._UnmodifiableMapMixin); - _mixin(A._UnmodifiableMapView_MapView__UnmodifiableMapMixin, A._UnmodifiableMapMixin); - _mixin(A._UnmodifiableSetView_SetBase__UnmodifiableSetMixin, A._UnmodifiableSetMixin); - _mixin(A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin, A.UnmodifiableSetMixin); - _mixin(A._QueueList_Object_ListMixin, A.ListBase); - _mixin(A._UnionSet_SetBase_UnmodifiableSetMixin, A.UnmodifiableSetMixin); - _mixin(A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin, A.UnmodifiableSetMixin); - _mixin(A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin, A.UnmodifiableSetMixin); - _mixin(A.__IsInvisibleVisitor_Object_EveryCssVisitor, A.EveryCssVisitor); - _mixin(A.__HasContentVisitor_Object_StatementSearchVisitor, A.StatementSearchVisitor); - _mixin(A.__IsBogusVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); - _mixin(A.__IsInvisibleVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); - _mixin(A.__IsUselessVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); - _mixin(A.__ParentSelectorVisitor_Object_SelectorSearchVisitor, A.SelectorSearchVisitor); - _mixin(A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor, A.ReplaceExpressionVisitor); - _mixin(A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor, A.RecursiveStatementVisitor); - _mixin(A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0, A.ReplaceExpressionVisitor0); - _mixin(A.__ParentSelectorVisitor_Object_SelectorSearchVisitor0, A.SelectorSearchVisitor0); - _mixin(A.__HasContentVisitor_Object_StatementSearchVisitor0, A.StatementSearchVisitor0); - _mixin(A.__IsInvisibleVisitor_Object_EveryCssVisitor0, A.EveryCssVisitor0); - _mixin(A.__IsBogusVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); - _mixin(A.__IsInvisibleVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); - _mixin(A.__IsUselessVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); - })(); - var init = { - typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, - mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List", Object: "Object", Map: "Map"}, - mangledNames: {}, - types: ["~()", "Null()", "Future()", "Value0(List)", "Value(List)", "bool(String)", "String(String)", "bool(CssNode)", "bool(CssNode0)", "bool(Object?)", "int()", "SassBoolean(List)", "SassBoolean0(List)", "bool(SimpleSelector)", "bool(SimpleSelector0)", "double(double)", "JSClass0()", "SassString0(List)", "SassString(List)", "bool(ComplexSelector)", "bool(ComplexSelector0)", "bool()", "SassColor0(List)", "SassColor(List)", "SassNumber(List)", "SassNumber0(List)", "SassList0(List)", "FileSpan()", "SassList(List)", "double(SassColor0)", "String()", "Future<~>()", "bool(int?)", "Object?()", "SassMap0(List)", "SassMap(List)", "~(Object?)", "Null(~())", "Value()", "int(SassColor0)", "Future(Future<~>())", "Value0(Value0)", "Value(Value)", "Value0?()", "Value?()", "String?()", "bool(int)", "Uri(Uri)", "double(SassColor)", "bool(num,num)", "Value0()", "bool(ComplexSelectorComponent)", "bool(Value0)", "bool(ComplexSelectorComponent0)", "SassNumber0(SassNumber0)", "Null(Object,StackTrace)", "SassNumber(SassNumber)", "double(double,double)", "~(Value)", "ComplexSelector(ComplexSelector)", "ComplexSelector0(ComplexSelector0)", "@()", "ValueExpression(Value)", "Null(@)", "~(Value0)", "int(SassColor)", "ValueExpression0(Value0)", "bool(Object)", "~(@)", "~(Object,StackTrace)", "bool(SelectorList)", "bool(SelectorList0)", "Future()", "Object(Object)", "Frame()", "bool(Value)", "Future()", "bool(ColorChannel0)", "Future()", "Future()", "List?(List)", "~(Module0,bool)", "Value?(Statement)", "Object()", "SassRuntimeException(AstNode)", "~(Module1,bool)", "Callable?()", "Null(_NodeSassColor,num)", "Future(Statement)", "Null([Object?])", "Stylesheet?()", "~(String)", "Future(List)", "AsyncCallable?()", "bool(ColorChannel)", "~(Value,Value)", "AsyncCallable0?()", "~(Value0,Value0)", "SassRuntimeException0(AstNode0)", "double(SassNumber0)", "~(String[Deprecation?])", "Future(Statement0)", "~([int?])", "Value0?(Statement0)", "List?(List)", "Frame(String)", "~(String,Value)", "~(Object)", "Callable0?()", "~(String,Value0)", "~(String[Deprecation0?])", "@(@)", "int(Uri)", "String(Expression0)", "Null(Module1,bool)", "SassCalculation0(Object)", "Map()", "bool(Module1)", "bool(Module0)", "List()", "bool(Module0)", "bool(_Highlight)", "String(@)", "bool(Expression)", "int(_NodeSassColor)", "String(String{color:Object?})", "~(String,Object?)", "bool(Module1)", "Statement()", "~(String,@)", "Uri(String)", "Map()", "+originalUrl(Importer,Uri,Uri)?()", "String(Object)", "String(Expression)", "~(String,Function)", "Statement0()", "~(~())", "double(SassNumber)", "bool(Expression0)", "Null(Module0,bool)", "MapKeySet>(Map,AstNode0>)", "AstNode?()", "SelectorList(Value)", "SelectorList(SelectorList,SelectorList)", "Uri?()", "int(String,String)", "String?(String?)", "String?(Object)", "~(Object[StackTrace?])", "Iterable()", "Iterable(String)", "Iterable(@)", "DateTime()", "~(String[~])", "bool(Statement)", "int(int)", "0&(String,FileSpan[StackTrace?])", "bool(Import)", "AtRootRule(List,FileSpan)", "AtRule(List,FileSpan)", "String(String{color:@})", "Entry(Entry)", "double(double,String)", "AstNode(AstNode)", "SassFunction(List)", "SassMixin(List)", "Future<~>(List)", "bool(@)", "Set<0^>()", "List()", "bool(ModifiableCssParentNode)", "~(@,@)", "~(Object?,Object?)", "int(ComplexSelector)", "Future()", "List()", "bool(UseRule)", "bool(ForwardRule)", "Future()", "AsyncCallable?(Module0)", "MapKeySet>(Map,AstNode>)", "Map(Module0)", "Future()", "Uri?/()", "InterpolationMap(List)", "bool(String?)", "String(SassNumber)", "~(List)", "SassNumber()", "Expression(Expression)", "~(double?[String?])", "Future(List)", "int(Frame)", "String(Frame)", "Trace()", "bool(Frame)", "Callable0?(Module0)", "MapKeySet>(Map,AstNode>)", "AsyncCallable0?(Module1)", "MapKeySet>(Map,AstNode0>)", "Map(Module1)", "AstNode0(AstNode0)", "Map(Module0)", "SassFunction0(List)", "SassMixin0(List)", "Future<~>(List)", "bool(ModifiableCssParentNode0)", "~(Iterable)", "Future()", "List()", "bool(UseRule0)", "bool(ForwardRule0)", "@(String)", "List()", "List()", "InterpolationMap0(List)", "AstNode0?()", "String(SassNumber0)", "0&(Object[Object?])", "0&(@[@])", "Object(CalculationOperation0)", "bool(Queue>)", "~(Uint8List,String,int)", "String(Value0)", "double(Value0)", "~([Object?])", "ImmutableList0(SassColor0)", "Trace(String)", "AsyncImporter0(Object?)", "Set<0&>(Object)", "Version(String)", "~(Iterable)", "Callable?(Module1)", "Map(Module1)", "Future<~>?()", "~(List)", "String(double)", "Value0?(Value0)", "SassNumber0()", "String(_NodeException)", "double()", "List()", "bool(Queue>)", "bool(Statement0)", "bool(Import0)", "@(Value0,num)", "Value0(int)", "Object(_NodeSassMap,int)", "Null(_NodeSassMap,int,Object)", "bool(SassNumber0)", "ImmutableList0(SassNumber0)", "bool(SassNumber0,String)", "SassNumber0(SassNumber0,Object,Object[String?])", "SassNumber0(SassNumber0,SassNumber0[String?,String?])", "double(SassNumber0,Object,Object[String?])", "double(SassNumber0,SassNumber0[String?,String?])", "int(ComplexSelector0)", "double(Value)", "Expression0(Expression0)", "SelectorList0(Value0)", "SelectorList0(SelectorList0,SelectorList0)", "FileLocation(FileSpan)", "JSUrl0(Uri)", "String(FileSpan)", "int(SourceLocation)", "~(int)", "AtRootRule0(List,FileSpan)", "AtRule0(List,FileSpan)", "int(@,@)", "bool(Object?,Object?)", "int(Object?)", "Future()", "Map(Module1)", "~(Symbol0,@)", "~(ContentBlock)", "~(List)", "ArgumentDeclaration()", "~(String,int)", "~(CssMediaQuery)", "Set(CssParentNode)", "VariableDeclaration()", "~(SelectorList)", "~(MapEntry)", "SourceFile()", "SourceFile?(int)", "String?(SourceFile?)", "int(_Line)", "UseRule()", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "SourceSpanWithContext()", "List(Trace)", "int(Trace)", "StyleRule(List,FileSpan)", "String(Trace)", "Declaration(List,FileSpan)", "Value/(List)", "Frame(String,String)", "SassNumber(Value)", "EachRule(List,FileSpan)", "Frame(Frame)", "~(String,int?)", "bool(Deprecation)", "Value?(Module0)", "String(Argument0)", "Module0?(Module0)", "SassArgumentList0(Object,Object,Object[String?])", "ImmutableMap0(SassArgumentList0)", "FunctionRule(List,FileSpan)", "ForRule(List,FileSpan)", "Value0/(List)", "Value0?(Module1)", "Module1?(Module1)", "ContentBlock(List,FileSpan)", "MediaRule(List,FileSpan)", "SassMap(Value)", "Map(Module1)", "MixinRule(List,FileSpan)", "Map(Module0)", "Future>(Interpolation0{trim:bool,warnForColor:bool})", "SassString(SimpleSelector)", "Map(Module0)", "SupportsRule(List,FileSpan)", "WhileRule(List,FileSpan)", "int(int,int)", "~(Expression)", "~(BinaryOperator)", "ArgParser()", "~(Module1,bool)", "Future<+loadedUrls,stylesheet(Set,CssStylesheet0)>()", "Future>()", "Set()", "~(Module1)", "Future<+loadedUrls,stylesheet(Set,CssStylesheet)>()", "StringExpression(Interpolation)", "~(+deprecation,message,span(Deprecation?,String,FileSpan))", "Future<~>(String)", "Future(Value0)", "List(List)", "Future>(Interpolation0)", "DateTime(StylesheetNode)", "int(int,ComplexSelectorComponent)", "bool(Extension)", "bool(Version)", "Future(IfRuleClause0)", "bool(ModifiableCssNode)", "SassScriptException()", "UserDefinedCallable0(ContentBlock0)", "Set>()", "String(CssValue)", "String(Argument)", "Iterable(List)", "List(Extender)", "Future(Expression0)", "List?(SimpleSelector)", "List(PseudoSelector)", "Value0/()", "List>(List)", "SingleUnitSassNumber(double)", "PseudoSelector(ComplexSelector)", "Future>(Interpolation{trim:bool,warnForColor:bool})", "SassString(int)", "Future<@>()", "Future<+originalUrl(AsyncImporter0,Uri,Uri)?>()", "Future()", "bool(+originalUrl(AsyncImporter0,Uri,Uri))", "Uri(+originalUrl(AsyncImporter0,Uri,Uri))", "AtRootQuery0()", "int(int,SimpleSelector)", "SassString(String)", "~(SimpleSelector,Set>)", "List?(List,List)", "SassCalculation0(Object[Object?,Object?])", "SassCalculation0(SassCalculation0[String?])", "ImmutableList(SassCalculation0)", "Object(Object,String,Object,Object)", "bool(CalculationOperator0)", "bool(CalculationOperation0,Object)", "int(CalculationOperation0)", "String(CalculationOperation0)", "bool(String?,String?)", "CalculationInterpolation(Object,String)", "bool(CalculationInterpolation,Object)", "int(CalculationInterpolation)", "String(CalculationInterpolation)", "bool(CanonicalizeContext0)", "JSUrl0?(CanonicalizeContext0)", "Value(Object)", "bool(List>)", "bool(PseudoSelector)", "SelectorList?(PseudoSelector)", "Uint8List(@,@)", "~(Module0,bool)", "Object?(Object?)", "SassColor0(SassColor0)", "SassColor0(ColorSpace0)", "int(String?)", "0&(List)", "Future>()", "SassList(ComplexSelector)", "SassColor0(Object,_ConstructionOptions)", "bool(SassColor0,Object)", "SassColor0(SassColor0,String)", "bool(SassColor0[String?])", "SassColor0(SassColor0,_ToGamutOptions)", "double(SassColor0,String[_ChannelOptions?])", "bool(SassColor0,String)", "bool(SassColor0,String[_ChannelOptions?])", "SassColor0(SassColor0,_ConstructionOptions)", "double?(String)", "SassColor0(SassColor0,SassColor0[_InterpolationOptions?])", "String(SassColor0)", "bool(SassColor0)", "~(Module0)", "Null(_NodeSassColor,num?[num?,num?,num?,SassColor0?])", "double(num)", "~(String,Option)", "double(_NodeSassColor)", "@(@,String)", "~(Object?,List)", "Iterable(ComplexSelector)", "AsyncImporter0(JSImporter)", "0&(@)", "_Future<@>(@)", "NodePackageImporter0(Object[String?])", "bool(+originalUrl(Importer,Uri,Uri))", "NodeCompileResult(Compiler,String[CompileOptions?])", "NodeCompileResult(Compiler,String[CompileStringOptions?])", "Null(Compiler)", "Promise(AsyncCompiler,String[CompileOptions?])", "Promise(AsyncCompiler,String[CompileStringOptions?])", "Promise(AsyncCompiler)", "Future()", "int(int,ComplexSelectorComponent0)", "String(CssValue0)", "int(int,SimpleSelector0)", "String(BuiltInCallable0)", "bool(Deprecation0)", "Iterable()", "Version(Object,int,int,int)", "String(int,IfClause)", "SimpleSelector(SimpleSelector)", "Value0?(Module1)", "Module1?(Module1)", "Future(Value)", "Object(Value0)", "Map(Module1)", "Map(Module1)", "Null(JSObject?,JSArray)", "Future>(Interpolation)", "CssValue0(Interpolation0{trim:bool,warnForColor:bool})", "SassColor(SassColor)", "Uri(+originalUrl(Importer,Uri,Uri))", "bool(+forImport(Importer,Uri,bool),+originalUrl(Importer,Uri,Uri)?)", "+loadedUrls,stylesheet(Set,CssStylesheet0)()", "Module1()", "~(Module1)", "Value?(Module0)", "SassColor(ColorSpace)", "CssValue0(Interpolation0)", "AtRootQuery()", "Value0?(IfRuleClause0)", "UserDefinedCallable0(ContentBlock0)", "Value0(Expression0)", "Future(IfRuleClause)", "FileSpan(_NodeException)", "bool(Extension0)", "Set>()", "String(BuiltInCallable)", "List()", "Iterable(List)", "Null(@,@)", "List(Extender0)", "List?(SimpleSelector0)", "List(PseudoSelector0)", "List>(List)", "List(ComplexSelector0)", "PseudoSelector0(ComplexSelector0)", "~(SimpleSelector0,Set>)", "SassFunction0(Object,String,Value0(List))", "List?(List,List)", "UserDefinedCallable(ContentBlock)", "bool(List>)", "String(Value)", "bool(PseudoSelector0)", "SelectorList0?(PseudoSelector0)", "String(int,IfClause0)", "Module0?(Module0)", "Object(String)", "~(Object?,Object,Object?)", "+(String,String)(String)", "Future<~>(List)", "Stylesheet0?()", "bool(+originalUrl(Importer0,Uri,Uri))", "Uri(+originalUrl(Importer0,Uri,Uri))", "~(String,WarnOptions)", "~(String,DebugOptions)", "Null(RenderResult)", "JSFunction0(JSFunction0)", "Object?(Object,String,String[Object?])", "Null(Object)", "0&(List)", "List(Value0)", "bool(List)", "SassList0(ComplexSelector0)", "Iterable(ComplexSelector0)", "SimpleSelector0(SimpleSelector0)", "SassList0(Object[Object?,_ConstructorOptions?])", "SassMap(SassMap)", "Null(_NodeSassList,int?[bool?,SassList0?])", "~([Future<~>?])", "Object(_NodeSassList,int)", "Null(_NodeSassList,int,Object)", "bool(_NodeSassList)", "Null(_NodeSassList,bool)", "int(_NodeSassList)", "SassMap0(Value0)", "SassMap0(SassMap0)", "SassMap0(Object[ImmutableMap0?])", "ImmutableMap0(SassMap0)", "@(SassMap0,Object)", "Null(_NodeSassMap,int?[SassMap0?])", "SassNumber0(int)", "Map(Module0)", "int(_NodeSassMap)", "Future(Expression)", "SassNumber0(Value0)", "List()", "Value0(Object)", "0&(Object)", "bool(ModifiableCssNode0)", "SassNumber0(Object,num[Object?])", "Map(Module0)", "int?(SassNumber0)", "SelectorList()", "int(SassNumber0[String?])", "double(SassNumber0,num,num[String?])", "SassNumber0(SassNumber0[String?])", "SassNumber0(SassNumber0,String[String?])", "~(int,@)", "CompoundSelector()", "Value/()", "Future<+originalUrl(AsyncImporter,Uri,Uri)?>()", "Statement({root:bool})", "Null(_NodeSassNumber,num?[String?,SassNumber0?])", "double(_NodeSassNumber)", "Null(_NodeSassNumber,num)", "String(_NodeSassNumber)", "Null(_NodeSassNumber,String)", "SassScriptException0()", "JSExpressionVisitor(JSExpressionVisitorObject)", "JSStatementVisitor(JSStatementVisitorObject)", "JSSet(Set)", "String(SourceFile,int[int?])", "List(SourceFile)", "String?(Interpolation0)", "Object?(Statement0,StatementVisitor)", "Object?(Expression0,ExpressionVisitor)", "FileSpan(SassNode)", "Interpolation0(SupportsCondition)", "~(@,StackTrace)", "String(Object,@,@[@])", "Expression({bracketList:bool,singleEquals:bool,until:bool()?})", "NumberExpression()", "CssValue(Interpolation{trim:bool,warnForColor:bool})", "Future()", "SassString0(SimpleSelector0)", "SelectorList0()", "CompoundSelector0()", "~(CssMediaQuery0)", "Set(CssParentNode0)", "~(SelectorList0)", "~(MapEntry)", "SingleUnitSassNumber0(double)", "Stylesheet()", "JSUrl0?(FileSpan)", "bool(+originalUrl(AsyncImporter,Uri,Uri))", "+loadedUrls,stylesheet(Set,CssStylesheet)()", "Module0()", "SassString0(int)", "SassString0(String)", "~(Module0)", "SassString0(Object[Object?,_ConstructorOptions1?])", "String(SassString0)", "bool(SassString0)", "int(SassString0)", "int(SassString0,Value0[String?])", "Null(_NodeSassString,String?[SassString0?])", "String(_NodeSassString)", "Null(_NodeSassString,String)", "Statement0({root:bool})", "Null(@,StackTrace)", "NumberExpression0()", "Stylesheet0()", "Statement0?()", "ArgumentDeclaration0()", "+(String,ArgumentDeclaration0)()", "StyleRule0(List,FileSpan)", "Declaration0(List,FileSpan)", "Value?(Value)", "EachRule0(List,FileSpan)", "FunctionRule0(List,FileSpan)", "ForRule0(List,FileSpan)", "ContentBlock0(List,FileSpan)", "MediaRule0(List,FileSpan)", "MixinRule0(List,FileSpan)", "Uri(+originalUrl(AsyncImporter,Uri,Uri))", "SupportsRule0(List,FileSpan)", "WhileRule0(List,FileSpan)", "~(Expression0)", "~(BinaryOperator0)", "StringExpression0(Interpolation0)", "Null(~(Object?),~(Object?))", "ImmutableList0(Value0)", "String?(Value0)", "int(Value0,Value0[String?])", "SassBoolean0(Value0[String?])", "SassCalculation0(Value0[String?])", "SassColor0(Value0[String?])", "SassFunction0(Value0[String?])", "SassMap0(Value0[String?])", "SassMixin0(Value0[String?])", "SassNumber0(Value0[String?])", "SassString0(Value0[String?])", "SassMap0?(Value0)", "bool(Value0,Object?)", "int(Value0[Object?])", "CssValue(Interpolation)", "Null(Function,Function)", "~(Zone?,ZoneDelegate?,Zone,Object,StackTrace)", "0^(Zone?,ZoneDelegate?,Zone,0^())", "0^(Zone?,ZoneDelegate?,Zone,0^(1^),1^)", "0^(Zone?,ZoneDelegate?,Zone,0^(1^,2^),1^,2^)", "0^()(Zone,ZoneDelegate,Zone,0^())", "0^(1^)(Zone,ZoneDelegate,Zone,0^(1^))", "0^(1^,2^)(Zone,ZoneDelegate,Zone,0^(1^,2^))", "AsyncError?(Zone,ZoneDelegate,Zone,Object,StackTrace?)", "~(Zone?,ZoneDelegate?,Zone,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~(Timer))", "~(Zone,ZoneDelegate,Zone,String)", "Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)", "Statement?()", "Value?(IfRuleClause)", "0^(0^,0^)", "List(Value)", "UserDefinedCallable(ContentBlock)", "~(Object,StackTrace,EventSink<0^>)", "List<0^>(0^,List<0^>?)", "NodeCompileResult(String[CompileOptions?])", "NodeCompileResult(String[CompileStringOptions?])", "Promise(String[CompileOptions?])", "Promise(String[CompileStringOptions?])", "Importer0(Object?)", "Compiler()", "Promise()", "List(Object?)", "~(RenderOptions,~(Object?,RenderResult?))", "RenderResult(RenderOptions)", "ParserExports()", "Stylesheet0(String,String,String?)", "String?(String)", "Uri(JSUrl0)", "String(String[String?,String?,String?,String?,String?,String?,String?,String?,String?,String?,String?,String?,String?,String?])", "String(Object?)", "bool(List)", "String(String?)", "Value(Expression)", "+originalUrl(Importer0,Uri,Uri)?()", "List(ComplexSelector)"], - interceptorsByTag: null, - leafTags: null, - arrayRti: Symbol("$ti"), - rttc: { - "1;": t1 => o => o instanceof A._Record_1 && t1._is(o._0), - "2;": (t1, t2) => o => o instanceof A._Record_2 && t1._is(o._0) && t2._is(o._1), - "2;forImport": (t1, t2) => o => o instanceof A._Record_2_forImport && t1._is(o._0) && t2._is(o._1), - "2;sourceMap": (t1, t2) => o => o instanceof A._Record_2_sourceMap && t1._is(o._0) && t2._is(o._1), - "2;imports,modules": (t1, t2) => o => o instanceof A._Record_2_imports_modules && t1._is(o._0) && t2._is(o._1), - "2;loadedUrls,stylesheet": (t1, t2) => o => o instanceof A._Record_2_loadedUrls_stylesheet && t1._is(o._0) && t2._is(o._1), - "3;": (t1, t2, t3) => o => o instanceof A._Record_3 && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), - "3;forImport": (t1, t2, t3) => o => o instanceof A._Record_3_forImport && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), - "3;originalUrl": (t1, t2, t3) => o => o instanceof A._Record_3_originalUrl && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), - "3;importer,isDependency": (t1, t2, t3) => o => o instanceof A._Record_3_importer_isDependency && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), - "3;deprecation,message,span": (t1, t2, t3) => o => o instanceof A._Record_3_deprecation_message_span && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), - "5;named,namedNodes,positional,positionalNodes,separator": types => o => o instanceof A._Record_5_named_namedNodes_positional_positionalNodes_separator && A.pairwiseIsTest(types, o._values) - } - }; - A._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptFunction":"LegacyJavaScriptObject","Stdin":"LegacyJavaScriptObject","Stdout":"LegacyJavaScriptObject","ReadlineModule":"LegacyJavaScriptObject","ReadlineOptions":"LegacyJavaScriptObject","ReadlineInterface":"LegacyJavaScriptObject","BufferModule":"LegacyJavaScriptObject","BufferConstants":"LegacyJavaScriptObject","Buffer":"LegacyJavaScriptObject","ConsoleModule":"LegacyJavaScriptObject","Console":"LegacyJavaScriptObject","EventEmitter":"LegacyJavaScriptObject","FS":"LegacyJavaScriptObject","FSConstants":"LegacyJavaScriptObject","FSWatcher":"LegacyJavaScriptObject","ReadStream":"LegacyJavaScriptObject","ReadStreamOptions":"LegacyJavaScriptObject","WriteStream":"LegacyJavaScriptObject","WriteStreamOptions":"LegacyJavaScriptObject","FileOptions":"LegacyJavaScriptObject","StatOptions":"LegacyJavaScriptObject","MkdirOptions":"LegacyJavaScriptObject","RmdirOptions":"LegacyJavaScriptObject","WatchOptions":"LegacyJavaScriptObject","WatchFileOptions":"LegacyJavaScriptObject","Stats":"LegacyJavaScriptObject","Promise":"LegacyJavaScriptObject","Date":"LegacyJavaScriptObject","JsError":"LegacyJavaScriptObject","Atomics":"LegacyJavaScriptObject","Modules":"LegacyJavaScriptObject","Module":"LegacyJavaScriptObject","Net":"LegacyJavaScriptObject","Socket":"LegacyJavaScriptObject","NetAddress":"LegacyJavaScriptObject","NetServer":"LegacyJavaScriptObject","NodeJsError":"LegacyJavaScriptObject","JsAssertionError":"LegacyJavaScriptObject","JsRangeError":"LegacyJavaScriptObject","JsReferenceError":"LegacyJavaScriptObject","JsSyntaxError":"LegacyJavaScriptObject","JsTypeError":"LegacyJavaScriptObject","JsSystemError":"LegacyJavaScriptObject","Process":"LegacyJavaScriptObject","CPUUsage":"LegacyJavaScriptObject","Release":"LegacyJavaScriptObject","StreamModule":"LegacyJavaScriptObject","Readable":"LegacyJavaScriptObject","Writable":"LegacyJavaScriptObject","Duplex":"LegacyJavaScriptObject","Transform":"LegacyJavaScriptObject","WritableOptions":"LegacyJavaScriptObject","ReadableOptions":"LegacyJavaScriptObject","Immediate":"LegacyJavaScriptObject","Timeout":"LegacyJavaScriptObject","TTY":"LegacyJavaScriptObject","TTYReadStream":"LegacyJavaScriptObject","TTYWriteStream":"LegacyJavaScriptObject","Util":"LegacyJavaScriptObject","JSArray0":"LegacyJavaScriptObject","Chokidar":"LegacyJavaScriptObject","ChokidarOptions":"LegacyJavaScriptObject","ChokidarWatcher":"LegacyJavaScriptObject","JSFunction":"LegacyJavaScriptObject","ImmutableList":"LegacyJavaScriptObject","ImmutableMap":"LegacyJavaScriptObject","NodeImporterResult":"LegacyJavaScriptObject","RenderContext":"LegacyJavaScriptObject","RenderContextOptions":"LegacyJavaScriptObject","RenderContextResult":"LegacyJavaScriptObject","RenderContextResultStats":"LegacyJavaScriptObject","JSModule":"LegacyJavaScriptObject","JSModuleRequire":"LegacyJavaScriptObject","JSClass":"LegacyJavaScriptObject","JSUrl":"LegacyJavaScriptObject","_PropertyDescriptor":"LegacyJavaScriptObject","_RequireMain":"LegacyJavaScriptObject","JSArray1":"LegacyJavaScriptObject","Chokidar0":"LegacyJavaScriptObject","ChokidarOptions0":"LegacyJavaScriptObject","ChokidarWatcher0":"LegacyJavaScriptObject","_ConstructionOptions":"LegacyJavaScriptObject","_ChannelOptions":"LegacyJavaScriptObject","_ToGamutOptions":"LegacyJavaScriptObject","_InterpolationOptions":"LegacyJavaScriptObject","_Channels":"LegacyJavaScriptObject","_NodeSassColor":"LegacyJavaScriptObject","CompileOptions":"LegacyJavaScriptObject","CompileStringOptions":"LegacyJavaScriptObject","NodeCompileResult":"LegacyJavaScriptObject","Deprecation1":"LegacyJavaScriptObject","_NodeException":"LegacyJavaScriptObject","Exports":"LegacyJavaScriptObject","LoggerNamespace":"LegacyJavaScriptObject","JSExpressionVisitorObject":"LegacyJavaScriptObject","Fiber":"LegacyJavaScriptObject","FiberClass":"LegacyJavaScriptObject","JSFunction0":"LegacyJavaScriptObject","ImmutableList0":"LegacyJavaScriptObject","ImmutableMap0":"LegacyJavaScriptObject","JSImporter":"LegacyJavaScriptObject","JSImporterResult":"LegacyJavaScriptObject","NodeImporterResult0":"LegacyJavaScriptObject","_ConstructorOptions":"LegacyJavaScriptObject","_NodeSassList":"LegacyJavaScriptObject","WarnOptions":"LegacyJavaScriptObject","DebugOptions":"LegacyJavaScriptObject","JSLogger":"LegacyJavaScriptObject","_NodeSassMap":"LegacyJavaScriptObject","JSModule0":"LegacyJavaScriptObject","JSModuleRequire0":"LegacyJavaScriptObject","_ConstructorOptions0":"LegacyJavaScriptObject","_NodeSassNumber":"LegacyJavaScriptObject","ParserExports":"LegacyJavaScriptObject","JSClass0":"LegacyJavaScriptObject","RenderContext0":"LegacyJavaScriptObject","RenderContextOptions0":"LegacyJavaScriptObject","RenderContextResult0":"LegacyJavaScriptObject","RenderContextResultStats0":"LegacyJavaScriptObject","RenderOptions":"LegacyJavaScriptObject","RenderResult":"LegacyJavaScriptObject","RenderResultStats":"LegacyJavaScriptObject","_Exports":"LegacyJavaScriptObject","JSSet":"LegacyJavaScriptObject","JSStatementVisitorObject":"LegacyJavaScriptObject","_ConstructorOptions1":"LegacyJavaScriptObject","_NodeSassString":"LegacyJavaScriptObject","Types":"LegacyJavaScriptObject","JSUrl0":"LegacyJavaScriptObject","_PropertyDescriptor0":"LegacyJavaScriptObject","_RequireMain0":"LegacyJavaScriptObject","JSArray":{"List":["1"],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"]},"JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"JavaScriptObject":{"JSObject":[]},"LegacyJavaScriptObject":{"JSObject":[],"Promise":[],"JsSystemError":[],"ImmutableList":[],"_ConstructionOptions":[],"_ChannelOptions":[],"_ToGamutOptions":[],"_InterpolationOptions":[],"_NodeSassColor":[],"CompileOptions":[],"CompileStringOptions":[],"NodeCompileResult":[],"Deprecation1":[],"_NodeException":[],"JSExpressionVisitorObject":[],"Fiber":[],"JSFunction0":[],"ImmutableList0":[],"ImmutableMap0":[],"JSImporter":[],"JSImporterResult":[],"NodeImporterResult0":[],"_ConstructorOptions":[],"_NodeSassList":[],"WarnOptions":[],"DebugOptions":[],"_NodeSassMap":[],"_ConstructorOptions0":[],"_NodeSassNumber":[],"ParserExports":[],"JSClass0":[],"RenderContextOptions0":[],"RenderOptions":[],"RenderResult":[],"JSSet":[],"JSStatementVisitorObject":[],"_ConstructorOptions1":[],"_NodeSassString":[],"JSUrl0":[]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"]},"JSNumber":{"double":[],"num":[],"Comparable":["num"]},"JSInt":{"double":[],"int":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Comparable":["String"],"TrustedGetRuntimeType":[]},"_CastIterableBase":{"Iterable":["2"]},"CastIterable":{"_CastIterableBase":["1","2"],"Iterable":["2"],"Iterable.E":"2"},"_EfficientLengthCastIterable":{"CastIterable":["1","2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"_CastListBase":{"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"]},"CastList":{"_CastListBase":["1","2"],"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","Iterable.E":"2"},"CastSet":{"Set":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"CastMap":{"MapBase":["3","4"],"Map":["3","4"],"MapBase.V":"4","MapBase.K":"3"},"LateError":{"Error":[]},"CodeUnits":{"ListBase":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListBase.E":"int"},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"SubListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"MappedIterable":{"Iterable":["2"],"Iterable.E":"2"},"EfficientLengthMappedIterable":{"MappedIterable":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MappedListIterable":{"ListIterable":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListIterable.E":"2","Iterable.E":"2"},"WhereIterable":{"Iterable":["1"],"Iterable.E":"1"},"ExpandIterable":{"Iterable":["2"],"Iterable.E":"2"},"TakeIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthTakeIterable":{"TakeIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthSkipIterable":{"SkipIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipWhileIterable":{"Iterable":["1"],"Iterable.E":"1"},"EmptyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"FollowedByIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthFollowedByIterable":{"FollowedByIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"WhereTypeIterable":{"Iterable":["1"],"Iterable.E":"1"},"NonNullsIterable":{"Iterable":["1"],"Iterable.E":"1"},"UnmodifiableListBase":{"ListBase":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ReversedListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"Symbol":{"Symbol0":[]},"ConstantMapView":{"UnmodifiableMapView":["1","2"],"Map":["1","2"]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"_KeysOrValues":{"Iterable":["1"],"Iterable.E":"1"},"ConstantSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ConstantStringSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"GeneralConstantSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"Instantiation":{"Function":[]},"Instantiation1":{"Function":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"NullThrownFromJavaScriptException":{"Exception":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Function":[]},"Closure2Args":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"_CyclicInitializationError":{"Error":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"LinkedHashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"JsIdentityLinkedHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"JsConstantLinkedHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"_MatchImplementation":{"RegExpMatch":[],"Match":[]},"_AllMatchesIterable":{"Iterable":["RegExpMatch"],"Iterable.E":"RegExpMatch"},"StringMatch":{"Match":[]},"_StringAllMatchesIterable":{"Iterable":["Match"],"Iterable.E":"Match"},"NativeByteBuffer":{"JSObject":[],"ByteBuffer":[],"TrustedGetRuntimeType":[]},"NativeTypedData":{"JSObject":[]},"NativeByteData":{"ByteData":[],"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"JSObject":[]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"EfficientLengthIterable":["double"],"JSObject":[],"Iterable":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"]},"NativeFloat32List":{"NativeTypedArrayOfDouble":[],"Float32List":[],"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"EfficientLengthIterable":["double"],"JSObject":[],"Iterable":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeFloat64List":{"NativeTypedArrayOfDouble":[],"Float64List":[],"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"EfficientLengthIterable":["double"],"JSObject":[],"Iterable":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeInt16List":{"NativeTypedArrayOfInt":[],"Int16List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt32List":{"NativeTypedArrayOfInt":[],"Int32List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt8List":{"NativeTypedArrayOfInt":[],"Int8List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint16List":{"NativeTypedArrayOfInt":[],"Uint16List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint32List":{"NativeTypedArrayOfInt":[],"Uint32List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8ClampedList":{"NativeTypedArrayOfInt":[],"Uint8ClampedList":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8List":{"NativeTypedArrayOfInt":[],"Uint8List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"AsyncError":{"Error":[]},"_Future":{"Future":["1"]},"_SyncStarIterable":{"Iterable":["1"],"Iterable.E":"1"},"_AsyncCompleter":{"_Completer":["1"]},"_SyncCompleter":{"_Completer":["1"]},"_StreamController":{"EventSink":["1"]},"_AsyncStreamController":{"_StreamController":["1"],"EventSink":["1"]},"_SyncStreamController":{"_StreamController":["1"],"EventSink":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"],"Stream.T":"1"},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_BufferingStreamSubscription.T":"1"},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamImpl":{"Stream":["1"]},"_ForwardingStream":{"Stream":["2"]},"_ForwardingStreamSubscription":{"_BufferingStreamSubscription":["2"],"StreamSubscription":["2"],"_BufferingStreamSubscription.T":"2"},"_ExpandStream":{"_ForwardingStream":["1","2"],"Stream":["2"],"Stream.T":"2"},"_ZoneSpecification":{"ZoneSpecification":[]},"_ZoneDelegate":{"ZoneDelegate":[]},"_Zone":{"Zone":[]},"_CustomZone":{"Zone":[]},"_RootZone":{"Zone":[]},"Queue":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"_HashMap":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"_IdentityHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"_HashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_LinkedCustomHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"_LinkedHashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_LinkedIdentityHashSet":{"_LinkedHashSet":["1"],"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"UnmodifiableListView":{"ListBase":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1"},"ListBase":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapBase":{"Map":["1","2"]},"UnmodifiableMapBase":{"MapBase":["1","2"],"Map":["1","2"]},"_MapBaseValueIterable":{"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"SetBase":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SetBase":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"UnmodifiableSetView":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.V":"@","MapBase.K":"String"},"_JsonMapKeyIterable":{"ListIterable":["String"],"EfficientLengthIterable":["String"],"Iterable":["String"],"ListIterable.E":"String","Iterable.E":"String"},"AsciiCodec":{"Codec":["String","List"]},"_UnicodeSubsetEncoder":{"Converter":["String","List"]},"AsciiEncoder":{"Converter":["String","List"]},"Base64Codec":{"Codec":["List","String"]},"Base64Encoder":{"Converter":["List","String"]},"Encoding":{"Codec":["String","List"]},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"Utf8Codec":{"Codec":["String","List"]},"Utf8Encoder":{"Converter":["String","List"]},"Utf8Decoder":{"Converter":["List","String"]},"DateTime":{"Comparable":["DateTime"]},"double":{"num":[],"Comparable":["num"]},"Duration":{"Comparable":["Duration"]},"int":{"num":[],"Comparable":["num"]},"List":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"num":{"Comparable":["num"]},"RegExpMatch":{"Match":[]},"Set":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"String":{"Comparable":["String"]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"RangeError":[],"Error":[]},"NoSuchMethodError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_Exception":{"Exception":[]},"FormatException":{"Exception":[]},"_GeneratorIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_StringStackTrace":{"StackTrace":[]},"Runes":{"Iterable":["int"],"Iterable.E":"int"},"_Uri":{"_PlatformUri":[],"Uri":[]},"_SimpleUri":{"_PlatformUri":[],"Uri":[]},"_DataUri":{"_PlatformUri":[],"Uri":[]},"NullRejectionException":{"Exception":[]},"ArgParserException":{"FormatException":[],"Exception":[]},"ErrorResult":{"Result":["0&"]},"ValueResult":{"Result":["1"]},"_CompleterStream":{"Stream":["1"],"Stream.T":"1"},"_NextRequest":{"_EventRequest":["1"]},"EmptyUnmodifiableSet":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"QueueList":{"ListBase":["1"],"List":["1"],"Queue":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","QueueList.E":"1"},"_CastQueueList":{"QueueList":["2"],"ListBase":["2"],"List":["2"],"Queue":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","QueueList.E":"2"},"UnionSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"UnmodifiableSetView0":{"DelegatingSet":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapKeySet":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_DelegatingIterableBase":{"Iterable":["1"]},"DelegatingSet":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"PathException":{"Exception":[]},"PathMap":{"Map":["String?","1"]},"Version":{"VersionRange":[],"Comparable":["VersionRange"]},"VersionRange":{"Comparable":["VersionRange"]},"ModifiableCssAtRule":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssComment":{"ModifiableCssNode":[],"CssComment":[],"CssNode":[],"AstNode":[]},"ModifiableCssDeclaration":{"ModifiableCssNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssImport":{"ModifiableCssNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssKeyframeBlock":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssMediaRule":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssNode":{"CssNode":[],"AstNode":[]},"ModifiableCssParentNode":{"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssStyleRule":{"ModifiableCssParentNode":[],"CssStyleRule":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssStylesheet":{"ModifiableCssParentNode":[],"CssStylesheet":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssSupportsRule":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"CssNode":{"AstNode":[]},"CssParentNode":{"CssNode":[],"AstNode":[]},"CssStylesheet":{"CssParentNode":[],"CssNode":[],"AstNode":[]},"CssValue":{"AstNode":[]},"_FakeAstNode":{"AstNode":[]},"Argument":{"AstNode":[]},"ArgumentDeclaration":{"AstNode":[]},"ArgumentInvocation":{"AstNode":[]},"ConfiguredVariable":{"AstNode":[]},"Expression":{"AstNode":[]},"BinaryOperationExpression":{"Expression":[],"AstNode":[]},"BooleanExpression":{"Expression":[],"AstNode":[]},"ColorExpression":{"Expression":[],"AstNode":[]},"FunctionExpression":{"Expression":[],"AstNode":[]},"IfExpression":{"Expression":[],"AstNode":[]},"InterpolatedFunctionExpression":{"Expression":[],"AstNode":[]},"ListExpression":{"Expression":[],"AstNode":[]},"MapExpression":{"Expression":[],"AstNode":[]},"NullExpression":{"Expression":[],"AstNode":[]},"NumberExpression":{"Expression":[],"AstNode":[]},"ParenthesizedExpression":{"Expression":[],"AstNode":[]},"SelectorExpression":{"Expression":[],"AstNode":[]},"StringExpression":{"Expression":[],"AstNode":[]},"SupportsExpression":{"Expression":[],"AstNode":[]},"UnaryOperationExpression":{"Expression":[],"AstNode":[]},"ValueExpression":{"Expression":[],"AstNode":[]},"VariableExpression":{"Expression":[],"AstNode":[]},"DynamicImport":{"Import":[],"AstNode":[]},"StaticImport":{"Import":[],"AstNode":[]},"Interpolation":{"AstNode":[]},"Statement":{"AstNode":[]},"AtRootRule":{"Statement":[],"AstNode":[]},"AtRule":{"Statement":[],"AstNode":[]},"CallableDeclaration":{"Statement":[],"AstNode":[]},"ContentBlock":{"Statement":[],"AstNode":[]},"ContentRule":{"Statement":[],"AstNode":[]},"DebugRule":{"Statement":[],"AstNode":[]},"Declaration":{"Statement":[],"AstNode":[]},"EachRule":{"Statement":[],"AstNode":[]},"ErrorRule":{"Statement":[],"AstNode":[]},"ExtendRule":{"Statement":[],"AstNode":[]},"ForRule":{"Statement":[],"AstNode":[]},"ForwardRule":{"Statement":[],"AstNode":[]},"FunctionRule":{"Statement":[],"AstNode":[]},"IfClause":{"IfRuleClause":[]},"ElseClause":{"IfRuleClause":[]},"IfRule":{"Statement":[],"AstNode":[]},"ImportRule":{"Statement":[],"AstNode":[]},"IncludeRule":{"Statement":[],"AstNode":[]},"LoudComment":{"Statement":[],"AstNode":[]},"MediaRule":{"Statement":[],"AstNode":[]},"MixinRule":{"Statement":[],"AstNode":[]},"_HasContentVisitor":{"StatementSearchVisitor":["bool"],"StatementSearchVisitor.T":"bool"},"ParentStatement":{"Statement":[],"AstNode":[]},"ReturnRule":{"Statement":[],"AstNode":[]},"SilentComment":{"Statement":[],"AstNode":[]},"StyleRule":{"Statement":[],"AstNode":[]},"Stylesheet":{"Statement":[],"AstNode":[]},"SupportsRule":{"Statement":[],"AstNode":[]},"UseRule":{"Statement":[],"AstNode":[]},"VariableDeclaration":{"Statement":[],"AstNode":[]},"WarnRule":{"Statement":[],"AstNode":[]},"WhileRule":{"Statement":[],"AstNode":[]},"SupportsAnything":{"AstNode":[]},"SupportsDeclaration":{"AstNode":[]},"SupportsFunction":{"AstNode":[]},"SupportsInterpolation":{"AstNode":[]},"SupportsNegation":{"AstNode":[]},"SupportsOperation":{"AstNode":[]},"Selector":{"AstNode":[]},"AttributeSelector":{"SimpleSelector":[],"AstNode":[]},"ClassSelector":{"SimpleSelector":[],"AstNode":[]},"ComplexSelector":{"AstNode":[]},"CompoundSelector":{"AstNode":[]},"IDSelector":{"SimpleSelector":[],"AstNode":[]},"SelectorList":{"AstNode":[]},"_ParentSelectorVisitor":{"SelectorSearchVisitor":["ParentSelector"],"SelectorSearchVisitor.T":"ParentSelector"},"ParentSelector":{"SimpleSelector":[],"AstNode":[]},"PlaceholderSelector":{"SimpleSelector":[],"AstNode":[]},"PseudoSelector":{"SimpleSelector":[],"AstNode":[]},"SimpleSelector":{"AstNode":[]},"TypeSelector":{"SimpleSelector":[],"AstNode":[]},"UniversalSelector":{"SimpleSelector":[],"AstNode":[]},"_EnvironmentModule0":{"Module0":["AsyncCallable"]},"AsyncBuiltInCallable":{"AsyncCallable":[]},"BuiltInCallable":{"Callable0":[],"AsyncBuiltInCallable":[],"AsyncCallable":[]},"PlainCssCallable":{"Callable0":[],"AsyncCallable":[]},"UserDefinedCallable":{"Callable0":[],"AsyncCallable":[]},"ExplicitConfiguration":{"Configuration":[]},"_EnvironmentModule":{"Module0":["Callable0"]},"SassRuntimeException":{"Exception":[]},"SassException":{"Exception":[]},"MultiSpanSassException":{"Exception":[]},"MultiSpanSassRuntimeException":{"SassRuntimeException":[],"Exception":[]},"SassFormatException":{"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"MultiSpanSassFormatException":{"MultiSourceSpanFormatException":[],"SassFormatException":[],"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"UsageException":{"Exception":[]},"EmptyExtensionStore":{"ExtensionStore":[]},"MergedExtension":{"Extension":[]},"Importer":{"AsyncImporter":[]},"FilesystemImporter":{"Importer":[],"AsyncImporter":[]},"NodePackageImporter":{"Importer":[],"AsyncImporter":[]},"BuiltInModule":{"Module0":["1"]},"ForwardedModuleView":{"Module0":["1"]},"ShadowedModuleView":{"Module0":["1"]},"LazyFileSpan":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"LimitedMapView":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"MergedMapView":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"MultiSpan":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"PrefixedMapView":{"MapBase":["String","1"],"Map":["String","1"],"MapBase.V":"1","MapBase.K":"String"},"_PrefixedKeys":{"Iterable":["String"],"Iterable.E":"String"},"PublicMemberMapView":{"MapBase":["String","1"],"Map":["String","1"],"MapBase.V":"1","MapBase.K":"String"},"UnprefixedMapView":{"MapBase":["String","1"],"Map":["String","1"],"MapBase.V":"1","MapBase.K":"String"},"_UnprefixedKeys":{"Iterable":["String"],"Iterable.E":"String"},"SassArgumentList":{"SassList":[],"Value":[]},"SassBoolean":{"Value":[]},"SassCalculation":{"Value":[]},"SassColor":{"Value":[]},"LinearChannel":{"ColorChannel":[]},"A98RgbColorSpace":{"ColorSpace":[]},"DisplayP3ColorSpace":{"ColorSpace":[]},"HslColorSpace":{"ColorSpace":[]},"HwbColorSpace":{"ColorSpace":[]},"LabColorSpace":{"ColorSpace":[]},"LchColorSpace":{"ColorSpace":[]},"LmsColorSpace":{"ColorSpace":[]},"OklabColorSpace":{"ColorSpace":[]},"OklchColorSpace":{"ColorSpace":[]},"ProphotoRgbColorSpace":{"ColorSpace":[]},"Rec2020ColorSpace":{"ColorSpace":[]},"RgbColorSpace":{"ColorSpace":[]},"SrgbColorSpace":{"ColorSpace":[]},"SrgbLinearColorSpace":{"ColorSpace":[]},"XyzD50ColorSpace":{"ColorSpace":[]},"XyzD65ColorSpace":{"ColorSpace":[]},"SassFunction":{"Value":[]},"SassList":{"Value":[]},"SassMap":{"Value":[]},"SassMixin":{"Value":[]},"_SassNull":{"Value":[]},"SassNumber":{"Value":[]},"ComplexSassNumber":{"SassNumber":[],"Value":[]},"SingleUnitSassNumber":{"SassNumber":[],"Value":[]},"UnitlessSassNumber":{"SassNumber":[],"Value":[]},"SassString":{"Value":[]},"_EvaluationContext0":{"EvaluationContext":[]},"_EvaluationContext":{"EvaluationContext":[]},"Entry":{"Comparable":["Entry"]},"FileLocation":{"SourceLocation":[],"Comparable":["SourceLocation"]},"FileSpan":{"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"_FileSpan":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceLocation":{"Comparable":["SourceLocation"]},"SourceLocationMixin":{"SourceLocation":[],"Comparable":["SourceLocation"]},"SourceSpan":{"Comparable":["SourceSpan"]},"SourceSpanBase":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanException":{"Exception":[]},"SourceSpanFormatException":{"FormatException":[],"Exception":[]},"MultiSourceSpanException":{"Exception":[]},"MultiSourceSpanFormatException":{"FormatException":[],"Exception":[]},"SourceSpanMixin":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanWithContext":{"SourceSpan":[],"Comparable":["SourceSpan"]},"Chain":{"StackTrace":[]},"LazyTrace":{"Trace":[],"StackTrace":[]},"Trace":{"StackTrace":[]},"UnparsedFrame":{"Frame":[]},"StringScannerException":{"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"A98RgbColorSpace0":{"ColorSpace0":[]},"SupportsAnything0":{"SupportsCondition":[],"SassNode":[],"AstNode0":[]},"Argument0":{"SassNode":[],"AstNode0":[]},"ArgumentDeclaration0":{"SassNode":[],"AstNode0":[]},"ArgumentInvocation0":{"SassNode":[],"AstNode0":[]},"SassArgumentList0":{"SassList0":[],"Value0":[]},"JSToDartAsyncImporter":{"AsyncImporter0":[]},"AsyncBuiltInCallable0":{"AsyncCallable0":[]},"_EnvironmentModule2":{"Module1":["AsyncCallable0"]},"_EvaluateVisitor2":{"StatementVisitor":["Future"],"ExpressionVisitor":["Future"]},"_EvaluationContext2":{"EvaluationContext0":[]},"JSToDartAsyncFileImporter":{"AsyncImporter0":[]},"AtRootRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ModifiableCssAtRule0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"AtRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"AttributeSelector0":{"SimpleSelector0":[],"AstNode0":[]},"BinaryOperationExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"BooleanExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassBoolean0":{"Value0":[]},"BuiltInCallable0":{"Callable":[],"AsyncBuiltInCallable0":[],"AsyncCallable0":[]},"BuiltInModule0":{"Module1":["1"]},"SassCalculation0":{"Value0":[]},"CallableDeclaration0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"LinearChannel0":{"ColorChannel0":[]},"ClassSelector0":{"SimpleSelector0":[],"AstNode0":[]},"ColorExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassColor0":{"Value0":[]},"ModifiableCssComment0":{"ModifiableCssNode0":[],"CssComment0":[],"CssNode0":[],"AstNode0":[]},"AsyncCompiler":{"Compiler":[]},"ComplexSassNumber0":{"SassNumber0":[],"Value0":[]},"ComplexSelector0":{"AstNode0":[]},"CompoundSelector0":{"AstNode0":[]},"ExplicitConfiguration0":{"Configuration0":[]},"ConfiguredVariable0":{"SassNode":[],"AstNode0":[]},"ContentBlock0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ContentRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"DebugRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ModifiableCssDeclaration0":{"ModifiableCssNode0":[],"CssNode0":[],"AstNode0":[]},"Declaration0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"SupportsDeclaration0":{"SupportsCondition":[],"SassNode":[],"AstNode0":[]},"DisplayP3ColorSpace0":{"ColorSpace0":[]},"DynamicImport0":{"Import0":[],"SassNode":[],"AstNode0":[]},"EachRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"EmptyExtensionStore0":{"ExtensionStore0":[]},"_EnvironmentModule1":{"Module1":["Callable"]},"ErrorRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"_EvaluateVisitor1":{"StatementVisitor":["Value0?"],"ExpressionVisitor":["Value0"]},"_EvaluationContext1":{"EvaluationContext0":[]},"SassRuntimeException0":{"Exception":[]},"SassException0":{"Exception":[]},"MultiSpanSassException0":{"Exception":[]},"MultiSpanSassRuntimeException0":{"SassRuntimeException0":[],"Exception":[]},"SassFormatException0":{"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"MultiSpanSassFormatException0":{"MultiSourceSpanFormatException":[],"SassFormatException0":[],"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"Expression0":{"SassNode":[],"AstNode0":[]},"JSExpressionVisitor":{"ExpressionVisitor":["Object?"]},"_MakeExpressionCalculationSafe0":{"ExpressionVisitor":["Expression0"]},"ExtendRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"JSToDartFileImporter":{"Importer0":[],"AsyncImporter0":[]},"FilesystemImporter0":{"Importer0":[],"AsyncImporter0":[]},"ForRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ForwardRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ForwardedModuleView0":{"Module1":["1"]},"FunctionExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SupportsFunction0":{"SupportsCondition":[],"SassNode":[],"AstNode0":[]},"SassFunction0":{"Value0":[]},"FunctionRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"HslColorSpace0":{"ColorSpace0":[]},"HwbColorSpace0":{"ColorSpace0":[]},"IDSelector0":{"SimpleSelector0":[],"AstNode0":[]},"IfExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"IfClause0":{"IfRuleClause0":[]},"ElseClause0":{"IfRuleClause0":[]},"IfRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ModifiableCssImport0":{"ModifiableCssNode0":[],"CssNode0":[],"AstNode0":[]},"ImportRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"Importer0":{"AsyncImporter0":[]},"IncludeRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"InterpolatedFunctionExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"Interpolation0":{"SassNode":[],"AstNode0":[]},"SupportsInterpolation0":{"SupportsCondition":[],"SassNode":[],"AstNode0":[]},"IsCalculationSafeVisitor0":{"ExpressionVisitor":["bool"]},"ModifiableCssKeyframeBlock0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"LabColorSpace0":{"ColorSpace0":[]},"LazyFileSpan0":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"LchColorSpace0":{"ColorSpace0":[]},"LimitedMapView0":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"ListExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SelectorList0":{"AstNode0":[]},"_ParentSelectorVisitor0":{"SelectorSearchVisitor0":["ParentSelector0"],"SelectorSearchVisitor0.T":"ParentSelector0"},"SassList0":{"Value0":[]},"LmsColorSpace0":{"ColorSpace0":[]},"LoudComment0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"MapExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassMap0":{"Value0":[]},"ModifiableCssMediaRule0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"MediaRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"MergedExtension0":{"Extension0":[]},"MergedMapView0":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.V":"2","MapBase.K":"1"},"SassMixin0":{"Value0":[]},"MixinRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"_HasContentVisitor0":{"StatementSearchVisitor0":["bool"],"StatementVisitor":["bool?"],"StatementSearchVisitor0.T":"bool"},"MultiSpan0":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SupportsNegation0":{"SupportsCondition":[],"SassNode":[],"AstNode0":[]},"NoOpImporter0":{"Importer0":[],"AsyncImporter0":[]},"_FakeAstNode0":{"AstNode0":[]},"CssNode0":{"AstNode0":[]},"CssParentNode0":{"CssNode0":[],"AstNode0":[]},"ModifiableCssNode0":{"CssNode0":[],"AstNode0":[]},"ModifiableCssParentNode0":{"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"NodePackageImporter0":{"Importer0":[],"AsyncImporter0":[]},"NullExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"_SassNull0":{"Value0":[]},"NumberExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassNumber0":{"Value0":[]},"OklabColorSpace0":{"ColorSpace0":[]},"OklchColorSpace0":{"ColorSpace0":[]},"SupportsOperation0":{"SupportsCondition":[],"SassNode":[],"AstNode0":[]},"ParentSelector0":{"SimpleSelector0":[],"AstNode0":[]},"ParentStatement0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ParenthesizedExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"PlaceholderSelector0":{"SimpleSelector0":[],"AstNode0":[]},"PlainCssCallable0":{"Callable":[],"AsyncCallable0":[]},"PrefixedMapView0":{"MapBase":["String","1"],"Map":["String","1"],"MapBase.V":"1","MapBase.K":"String"},"_PrefixedKeys0":{"Iterable":["String"],"Iterable.E":"String"},"ProphotoRgbColorSpace0":{"ColorSpace0":[]},"PseudoSelector0":{"SimpleSelector0":[],"AstNode0":[]},"PublicMemberMapView0":{"MapBase":["String","1"],"Map":["String","1"],"MapBase.V":"1","MapBase.K":"String"},"Rec2020ColorSpace0":{"ColorSpace0":[]},"ReturnRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"RgbColorSpace0":{"ColorSpace0":[]},"Selector0":{"AstNode0":[]},"SelectorExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"ShadowedModuleView0":{"Module1":["1"]},"SilentComment0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"SimpleSelector0":{"AstNode0":[]},"SingleUnitSassNumber0":{"SassNumber0":[],"Value0":[]},"SourceInterpolationVisitor":{"ExpressionVisitor":["~"]},"SrgbColorSpace0":{"ColorSpace0":[]},"SrgbLinearColorSpace0":{"ColorSpace0":[]},"Statement0":{"SassNode":[],"AstNode0":[]},"JSStatementVisitor":{"StatementVisitor":["Object?"]},"StaticImport0":{"Import0":[],"SassNode":[],"AstNode0":[]},"StringExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassString0":{"Value0":[]},"ModifiableCssStyleRule0":{"ModifiableCssParentNode0":[],"CssStyleRule0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"StyleRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"CssStylesheet0":{"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"ModifiableCssStylesheet0":{"ModifiableCssParentNode0":[],"CssStylesheet0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"Stylesheet0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"SupportsExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"ModifiableCssSupportsRule0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"SupportsRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"JSToDartImporter":{"Importer0":[],"AsyncImporter0":[]},"TypeSelector0":{"SimpleSelector0":[],"AstNode0":[]},"UnaryOperationExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"UnitlessSassNumber0":{"SassNumber0":[],"Value0":[]},"UniversalSelector0":{"SimpleSelector0":[],"AstNode0":[]},"UnprefixedMapView0":{"MapBase":["String","1"],"Map":["String","1"],"MapBase.V":"1","MapBase.K":"String"},"_UnprefixedKeys0":{"Iterable":["String"],"Iterable.E":"String"},"UseRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"UserDefinedCallable0":{"Callable":[],"AsyncCallable0":[]},"CssValue0":{"AstNode0":[]},"ValueExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"VariableExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"VariableDeclaration0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"WarnRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"WhileRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"XyzD50ColorSpace0":{"ColorSpace0":[]},"XyzD65ColorSpace0":{"ColorSpace0":[]},"Int8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"CssComment":{"CssNode":[],"AstNode":[]},"CssStyleRule":{"CssParentNode":[],"CssNode":[],"AstNode":[]},"Import":{"AstNode":[]},"Callable0":{"AsyncCallable":[]},"Callable":{"AsyncCallable0":[]},"CssComment0":{"CssNode0":[],"AstNode0":[]},"Import0":{"SassNode":[],"AstNode0":[]},"SassNode":{"AstNode0":[]},"CssStyleRule0":{"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"SupportsCondition":{"SassNode":[],"AstNode0":[]}}')); - A._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"WhereIterator":1,"SkipIterator":1,"SkipWhileIterator":1,"EmptyIterator":1,"FollowedByIterator":1,"NonNullsIterator":1,"FixedLengthListMixin":1,"UnmodifiableListMixin":1,"UnmodifiableListBase":1,"__CastListBase__CastIterableBase_ListMixin":2,"ConstantSet":1,"LinkedHashMapKeyIterator":1,"NativeTypedArray":1,"EventSink":1,"_SyncStarIterator":1,"_SyncStreamControllerDispatch":1,"_AsyncStreamControllerDispatch":1,"_AddStreamState":1,"_StreamControllerAddStreamState":1,"_DelayedEvent":1,"_DelayedData":1,"_PendingEvents":1,"_StreamIterator":1,"_ZoneFunction":1,"Queue":1,"UnmodifiableMapBase":2,"_UnmodifiableMapMixin":2,"MapView":2,"_UnmodifiableSetMixin":1,"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":2,"_UnmodifiableSetView_SetBase__UnmodifiableSetMixin":1,"_StringSinkConversionSink":1,"Expando":1,"_EventRequest":1,"_EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin":1,"DefaultEquality":1,"IterableEquality":1,"ListEquality":1,"_QueueList_Object_ListMixin":1,"_UnionSet_SetBase_UnmodifiableSetMixin":1,"UnmodifiableSetMixin":1,"_UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin":1,"_DelegatingIterableBase":1,"_MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin":1,"ParentStatement":1,"ParentStatement0":1,"ExpressionVisitor":1}')); - var string$ = { - x0a_BUG_: "\n\nBUG: This should include a source span!", - x0a_Morex20: "\n\nMore info and automated migrator: https://sass-lang.com/d/slash-div", - x0a_Morex3ac: "\n\nMore info: https://sass-lang.com/d/color-functions", - x0a_Morex3af: "\n\nMore info: https://sass-lang.com/d/function-units", - x0a_See_: "\n\nSee https://sass-lang.com/d/function-units", - x0a_This: "\n\nThis is only an error because you've set the ", - x0a_To_p: "\n\nTo preserve current behavior: math.random(math.div($limit, 1", - x0a_but_: "\n\nbut you may have intended it to mean:\n\n ", - x0aRun_i: "\nRun in verbose mode to see all warnings.", - x0aThis_: "\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators", - x0aYou_m: "\nYou may not @extend the same selector from within different media queries.", - x20It_wi: " It will be omitted from the generated CSS.", - x20be_an: " be an extender.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators", - x20can_n: " can not have both conditions and paths at the same level.\nFound ", - x20deprex20: " deprecation to be fatal.\nRemove this setting if you need to keep using this feature.", - x20deprex2c: " deprecation, since it has also been made fatal.", - x20hue__: ' hue" may not be set for rectangular color space ', - x20in_in: " in interpolation here.\nIt may end up represented as ", - x20inste: " instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", - x20is_as: " is asynchronous.\nThis is probably caused by a bug in a Sass plugin.", - x20is_av: " is available from multiple global modules.", - x20is_de: " is deprecated.\n\nTo preserve current behavior: ", - x20is_noaf: " is not a future deprecation, so it does not need to be explicitly enabled.", - x20is_noav: " is not a valid selector: it must be a string,\na list of strings, or a list of lists of strings.", - x20is_nov: " is not valid CSS.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators", - x20must_b: " must be either nearest, up, down or to-zero.", - x20must_n: " must not be greater than the number of characters in the file, ", - x20repet: " repetitive deprecation warnings omitted.", - x20targe: " targetLocations if the interpolation has ", - x20to_be: " to be in the legacy RGB, HSL, or HWB color space.", - x20to_be_: " to be in the legacy RGB, HSL, or HWB color space.\n\nRecommendation: color.change(", - x20to_cl: " to clarify that it's meant to be a binary operation, or wrap\nit in parentheses to make it a unary operation. This will be an error in future\nversions of Sass.\n\nMore info and automated migrator: https://sass-lang.com/d/strict-unary", - x20to_co: " to color.opacity() is deprecated.\n\nRecommendation: ", - x20was_a: ' was already loaded, so it can\'t be configured using "with".', - x20was_n: " was not declared with !default in the @used module.", - x20was_p: " was passed both by position and by name.", - x21defau: "!default should only be written once for each variable.\nThis will be an error in Dart Sass 2.0.0.", - x21globai: "!global isn't allowed for variables in other modules.", - x21globas: "!global should only be written once for each variable.\nThis will be an error in Dart Sass 2.0.0.", - x22x20can_: "\" can't be used as a parent in a compound selector.", - x22x20is_ix0a: '" is invalid CSS.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators', - x22x20is_ix20: '" is invalid CSS. It will be omitted from the generated CSS.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators', - x22x20is_n: '" is not a valid Sass identifier.\n\nRecommendation: add an "as" clause to define an explicit namespace.', - x22x20is_o: "\" is only valid for nesting and shouldn't\nhave children other than style rules.", - x22x26__ma: '"&" may only used at the beginning of a compound selector.', - x22x29__If: "\").\nIf you really want to use the color value here, use '", - x22x2b__an: '"+" and "-" must be surrounded by whitespace in calculations.', - x22packa: '"package:" URLs aren\'t supported on this platform.', - x24color: "$color1, $color2, $weight: 50%, $method: null", - x24css_a: "$css and $module may not both be passed at once.", - x24list1: "$list1, $list2, $separator: auto, $bracketed: auto", - x24selec: "$selectors: At least one selector must be passed.", - x24separ: '$separator: Must be "space", "comma", "slash", or "auto".', - x27x20must: "' must be a path relative to the package root at '", - x27x2c_whi: "', which is not a '.scss', '.sass', or '.css' file.", - x28__cal: "() calculation. This doesn't allow unitless numbers to be mixed with numbers with units. If you want to use the Sass function, call math.", - x28__ins: "() instead.\n\nSee https://sass-lang.com/d/import", - x28__is_d: '() is deprecated. Suggestion:\n\ncolor.channel($color, "', - x28__is_oa: "() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", - x28__is_oc: "() is only supported for legacy colors. Please use color.channel() instead with an explicit $space argument.", - x28__isn: "() isn't in the sass:color module.\n\nRecommendation: color.adjust(", - x29x0a_Mor_: ")\n\nMore info: https://sass-lang.com/d/color-functions", - x29x0a_Moro: ")\n\nMore info: https://sass-lang.com/documentation/functions/color#", - x29x20in_a: ") in a future release.\n\nRecommendation: math.random(math.div($limit, 1", - x29x20is_d: ") is deprecated.\n\nTo preserve current behavior: ", - x29x20to_cg: ") to color.grayscale() is deprecated.\n\nRecommendation: ", - x29x20to_ci: ") to color.invert() is deprecated.\n\nRecommendation: ", - x29x29__Mo: "))\n\nMore info: https://sass-lang.com/d/function-units", - x2c_whicu: ", which uses a scheme declared as non-canonical.", - x2c_whicw: ', which will likely produce invalid CSS.\nAlways quote color names when using them as strings or map keys (for example, "', - x2e_Rela: ".\nRelative canonical URLs are deprecated and will eventually be disallowed.", - x3d_____: "===== asynchronous gap ===========================\n", - x40_moz_: "@-moz-document is deprecated and support will be removed in Dart Sass 2.0.0.\n\nFor details, see https://sass-lang.com/d/moz-document.", - x40conte: "@content is only allowed within mixin declarations.", - x40elsei: "@elseif is deprecated and will not be supported in future Sass versions.\n\nRecommendation: @else if", - x40exten: "@extend may only be used within style rules.", - x40forwa: "@forward rules must be written before any other rules.", - x40funct: "@function if($condition, $if-true, $if-false) {", - x40use_r: "@use rules must be written before any other rules.", - A_list: "A list with more than one element must have an explicit separator.", - A_pkg_h: "A pkg: URL must not have a host, port, username or password.", - A_pkg_q: "A pkg: URL must not have a query or fragment.", - ABCDEF: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", - An_impa: "An importer may not have a findFileUrl method as well as canonicalize and load methods.", - An_impu: "An importer must have either canonicalize and load methods, or a findFileUrl method.", - As_of_R: "As of Dart Sass 2.0.0, !global assignments won't be able to declare new variables.\n\nRecommendation: add `", - As_of_S: "As of Dart Sass 2.0.0, !global assignments won't be able to declare new variables.\n\nSince this assignment is at the root of the stylesheet, the !global flag is\nunnecessary and can safely be removed.", - At_rul: "At-rules may not be used within nested declarations.", - Becaus: "Because the CSS working group is still deciding on the best behavior, Sass doesn't currently support modifying missing channels (color: ", - Cannotff: "Cannot extract a file path from a URI with a fragment component", - Cannotfq: "Cannot extract a file path from a URI with a query component", - Cannotn: "Cannot extract a non-Windows file path from a file URI with an authority", - Comple: "ComplexSassNumber.hasPossiblyCompatibleUnits is not implemented.", - Could_: 'Could not find an option with short name "-', - CssNod: "CssNodes must have a CssStylesheet transitive parent node.", - Custom: "Custom importers are required to load stylesheets when compiling in the browser.", - Declarm: "Declarations may only be used within style rules.", - Declarw: 'Declarations whose names begin with "--" may not be nested.', - Either: "Either options.data or options.file must be set.", - Entrie: "Entries may not be removed from MergedMapView.", - Error_: "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type", - Evalua: "Evaluation handles @include and its content block together.", - Expecta: "Expected a color interpolation method, got an empty list.", - Expectu: 'Expected unquoted string "hue" at the end of ', - Expectv: "Expected variable, mixin, or function name", - Functi: "Functions may not be declared in control directives.", - Global: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse ", - Globalcad: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse color.adjust instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", - Globalcal: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse color.alpha instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", - Globalcg: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse color.grayscale instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", - Globalci: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse color.invert instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", - Globalco: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse color.opacity instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", - Globalm: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse math.abs instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", - Hue_in: "Hue interpolation method may not be set for rectangular color space ", - If_con: "If conditions is longer than one element, conjunction may not be null.", - If_par: "If parsedAsCustomProperty is true, value must contain a SassString (was `", - If_str: "If strategy is not null, step is required.", - In_Sas: 'In Sass, "&&" means two copies of the parent selector. You probably want to use "and" instead.', - In_fut: "In future versions of Sass, round() will be interpreted as a CSS round() calculation. This requires an explicit modulus when rounding numbers with units. If you want to use the Sass function, call math.round() instead.\n\nSee https://sass-lang.com/d/import", - Indent: "Indenting at the beginning of the document is illegal.", - Interpn: "Interpolation isn't allowed in namespaces.", - Interpp: "Interpolation isn't allowed in plain CSS.", - Invali: 'Invalid return value for custom function "', - It_s_n: "It's not clear which file to import. Found:\n", - Keywor: "Keyword arguments can't be used with calculations.", - May_no: "May not have a value for string elements (at index ", - Media_: "Media rules may not be used within nested declarations.", - Mixinsb: "Mixins may not be declared in control directives.", - Mixinscf: "Mixins may not contain function declarations.", - Mixinscm: "Mixins may not contain mixin declarations.", - Modulel: "Module loop: this module is already being loaded.", - Modulen: "Module namespaces aren't allowed in plain CSS.", - Must_n: "Must not have a value for expression elements (at index ", - Nested: "Nested declarations aren't allowed in plain CSS.", - New_en: "New entries may not be added to MergedMapView.", - No_Sasc: "No Sass callable is currently being evaluated.", - No_Sass: "No Sass stylesheet is currently being evaluated.", - NoSour: "NoSourceMapBuffer.buildSourceMap() is not supported.", - Number: "Number to round and step arguments are required.", - Only_2: "Only 2 slash-separated elements allowed, but ", - Only_oa: "Only one argument may be passed to the plain-CSS invert() function.", - Only_op: "Only one positional argument is allowed. All other arguments must be passed by name.", - Other_: "Other modules' members can't be defined with !global.", - Parent: "Parent selectors can't have suffixes in plain CSS.", - Passin_: "Passing `alpha: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/null-alpha", - Passina: "Passing a string to call() is deprecated and will be illegal in Dart Sass 2.0.0.\n\nRecommendation: call(get-function(", - Passinp: "Passing percentage units to the global abs() function is deprecated.\nIn the future, this will emit a CSS abs() function to be resolved by the browser.\nTo preserve current behavior: math.abs(", - Placeh: "Placeholder selectors aren't allowed in plain CSS.", - Plain_: "Plain CSS functions don't support keyword arguments.", - Positi: "Positional arguments must come before keyword arguments.", - Privat: "Private members can't be accessed from outside their modules.", - Rest_a: "Rest arguments can't be used with calculations.", - Sassx20_ff: "Sass @function names beginning with -- are deprecated for forward-compatibility with plain CSS functions.\n\nFor details, see https://sass-lang.com/d/css-function-mixin", - Sassx20_fm: "Sass @function names beginning with -- are deprecated for forward-compatibility with plain CSS mixins.\n\nFor details, see https://sass-lang.com/d/css-function-mixin", - Sassx20_i: "Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\nMore info and automated migrator: https://sass-lang.com/d/import", - Sassx20_m: "Sass @mixin names beginning with -- are deprecated for forward-compatibility with plain CSS mixins.\n\nFor details, see https://sass-lang.com/d/css-function-mixin", - Sassx20v: "Sass variables aren't allowed in plain CSS.", - Sassx27s: "Sass's behavior for declarations that appear after nested\nrules will be changing to match the behavior specified by CSS in an upcoming\nversion. To keep the existing behavior, move the declaration above the nested\nrule. To opt into the new behavior, wrap the declaration in `& {}`.\n\nMore info: https://sass-lang.com/d/mixed-decls", - Silent: "Silent comments aren't allowed in plain CSS.", - Style_k: "Style rules may not be used within keyframe blocks.", - Style_n: "Style rules may not be used within nested declarations.", - Suppor: "Supports rules may not be used within nested declarations.", - The_Ex: "The ExtensionStore and CssStylesheet passed to cloneCssStylesheet() must come from the same compilation.", - The_No: "The Node package importer cannot be used without a filesystem.", - The_ca: "The canonicalize() method must return a URL.", - The_co: "The color() function doesn't support the color space ", - The_fe: "The feature-exists() function is deprecated.\n\nMore info: https://sass-lang.com/d/feature-exists", - The_fie: "The findFileUrl() method must return a URL.", - The_fiu: 'The findFileUrl() must return a URL with scheme file://, was "', - The_gi: "The given LineScannerState was not returned by this LineScanner.", - The_le: "The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/legacy-js-api", - The_lo: "The load() function must return an object with contents and syntax fields.", - The_pa: "The parent selector isn't allowed in plain CSS.", - The_sa: "The same variable may only be configured once.", - The_ta: 'The target selector was not found.\nUse "@extend ', - There_: "There's already a module with namespace \"", - This_d: 'This declaration has no argument named "$', - This_e: "This expression can't be used in a calculation.", - This_f: "This function isn't allowed in plain CSS.", - This_ma: 'This module and the new module both define a variable named "$', - This_mw: 'This module was already loaded, so it can\'t be configured using "with".', - This_o: "This operation can't be used in a calculation.", - This_s: "This selector doesn't have any properties and won't be rendered.", - This_v: "This variable was not declared with !default in the @used module.", - To_usei: "To use color.invert() with non-legacy color ", - To_usem: "To use color.mix() with non-legacy color ", - Top_lel: "Top-level leading combinators aren't allowed in plain CSS.", - Top_les: 'Top-level selectors may not contain the parent selector "&".', - Unable: "Unable to determine which of multiple potential resolutions found for ", - Unexpe: "Unexpected Zone.current[#_canonicalizeContext] value ", - User_a: "User-authored deprecations should not be silenced.", - Using__i: "Using / for division is deprecated and will be removed in Dart Sass 2.0.0.\n\nRecommendation: ", - Using__o: "Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.\n\nRecommendation: ", - Using_c: "Using color.alpha() for a Microsoft filter is deprecated.\n\nRecommendation: ", - Using_t: "Using the current working directory as an implicit load path is deprecated. Either add it as an explicit load path or importer, or load this stylesheet from a different URL.", - Variab_: "Variable keyword argument map must have string keys.\n", - Variabs: "Variable keyword arguments must be a map (was ", - You_ma: "You may not @extend selectors across media queries.", - You_pr: "You probably don't mean to use the color value ", - x60_inst: "` instead.\nSee https://sass-lang.com/d/extend-compound for details.\n", - addExt: "addExtensions() can't be called for a const ExtensionStore.", - adjustd: "adjust-hue() is deprecated. Suggestion:\n\ncolor.adjust($color, $hue: ", - adjusto: "adjust-hue() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", - alpha_: "alpha() is only supported for legacy colors. Please use color.channel() instead.", - canoni: "canonicalizeContext may only be accessed within a call to canonicalize().", - color_a: "color.alpha() is only supported for legacy colors. Please use color.channel() instead.", - color_c: "color.changeHsl() is only supported for legacy colors. Please use color.changeChannels() instead with an explicit $space argument.", - color_t: "color.to-gamut() requires a $method argument for forwards-compatibility with changes in the CSS spec. Suggestion:\n\n$method: local-minde", - compou: "compound selectors may no longer be extended.\nConsider `@extend ", - conten: "content-exists() may only be called within a mixin.", - darken: "darken() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", - desatu: "desaturate() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", - fileEx: "fileExists() is only supported on Node.js", - leadin: "leadingCombinators and components may not both be empty.", - lighte: "lighten() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", - math_d: "math.div() will only support number arguments in a future release.\nUse list.slash() instead for a slash separator.", - math_r: "math.random() will no longer ignore $limit units (", - must_b: "must be a UniversalSelector or a TypeSelector", - parsed: 'parsedAsCustomProperty must be false if name doesn\'t begin with "--".', - satura: "saturate() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", - semico: "semicolons aren't allowed in the indented syntax.", - throug: "through() must return false for at least one parent of ", - x7d__Mor: "})\nMore info: https://sass-lang.com/d/abs-percent" - }; - var type$ = (function rtii() { - var findType = A.findType; - return { - $env_1_1_String: findType("@"), - ArgParser: findType("ArgParser"), - Argument: findType("Argument"), - ArgumentDeclaration: findType("ArgumentDeclaration"), - ArgumentDeclaration_2: findType("ArgumentDeclaration0"), - Argument_2: findType("Argument0"), - AstNode: findType("AstNode"), - AstNode_2: findType("AstNode0"), - AsyncBuiltInCallable: findType("AsyncBuiltInCallable"), - AsyncBuiltInCallable_2: findType("AsyncBuiltInCallable0"), - AsyncCallable: findType("AsyncCallable"), - AsyncCallable_2: findType("AsyncCallable0"), - AsyncCompiler: findType("AsyncCompiler"), - AsyncImporter: findType("AsyncImporter0"), - Box_SelectorList: findType("Box"), - Box_SelectorList_2: findType("Box0"), - BuiltInCallable: findType("BuiltInCallable"), - BuiltInCallable_2: findType("BuiltInCallable0"), - BuiltInModule_AsyncCallable: findType("BuiltInModule"), - BuiltInModule_AsyncCallable_2: findType("BuiltInModule0"), - BuiltInModule_Callable: findType("BuiltInModule"), - BuiltInModule_Callable_2: findType("BuiltInModule0"), - ByteBuffer: findType("ByteBuffer"), - ByteData: findType("ByteData"), - Callable: findType("Callable0"), - Callable_2: findType("Callable"), - ChangeType: findType("ChangeType"), - CodeUnits: findType("CodeUnits"), - Combinator: findType("Combinator"), - Combinator_2: findType("Combinator0"), - Comparable_dynamic: findType("Comparable<@>"), - Comparable_nullable_Object: findType("Comparable"), - CompileResult: findType("CompileResult"), - CompileResult_2: findType("CompileResult0"), - ComplexSelector: findType("ComplexSelector"), - ComplexSelectorComponent: findType("ComplexSelectorComponent"), - ComplexSelectorComponent_2: findType("ComplexSelectorComponent0"), - ComplexSelector_2: findType("ComplexSelector0"), - Configuration: findType("Configuration"), - Configuration_2: findType("Configuration0"), - ConfiguredValue: findType("ConfiguredValue"), - ConfiguredValue_2: findType("ConfiguredValue0"), - ConfiguredVariable: findType("ConfiguredVariable"), - ConfiguredVariable_2: findType("ConfiguredVariable0"), - ConstantMapView_Symbol_dynamic: findType("ConstantMapView"), - ConstantStringMap_String_double: findType("ConstantStringMap"), - ConstantStringSet_String: findType("ConstantStringSet"), - CssComment: findType("CssComment"), - CssComment_2: findType("CssComment0"), - CssMediaQuery: findType("CssMediaQuery"), - CssMediaQuery_2: findType("CssMediaQuery0"), - CssParentNode: findType("CssParentNode"), - CssParentNode_2: findType("CssParentNode0"), - CssStyleRule: findType("CssStyleRule"), - CssStyleRule_2: findType("CssStyleRule0"), - CssStylesheet: findType("CssStylesheet"), - CssStylesheet_2: findType("CssStylesheet0"), - CssValue_Combinator: findType("CssValue"), - CssValue_Combinator_2: findType("CssValue0"), - CssValue_List_String: findType("CssValue>"), - CssValue_List_String_2: findType("CssValue0>"), - CssValue_String: findType("CssValue"), - CssValue_String_2: findType("CssValue0"), - CssValue_Value: findType("CssValue"), - CssValue_Value_2: findType("CssValue0"), - DateTime: findType("DateTime"), - Deprecation: findType("Deprecation"), - Deprecation_2: findType("Deprecation1"), - Deprecation_3: findType("Deprecation0"), - EfficientLengthIterable_dynamic: findType("EfficientLengthIterable<@>"), - Error: findType("Error"), - EvaluationContext: findType("EvaluationContext"), - EvaluationContext_2: findType("EvaluationContext0"), - Exception: findType("Exception"), - Expression: findType("Expression"), - Expression_2: findType("Expression0"), - Extender: findType("Extender"), - Extender_2: findType("Extender0"), - Extension: findType("Extension"), - Extension_2: findType("Extension0"), - FileLocation: findType("FileLocation"), - FileSpan: findType("FileSpan"), - Float32List: findType("Float32List"), - Float64List: findType("Float64List"), - FormatException: findType("FormatException"), - Frame: findType("Frame"), - Function: findType("Function"), - FutureGroup_void: findType("FutureGroup<~>"), - FutureOr_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet: findType("+loadedUrls,stylesheet(Set,CssStylesheet)/"), - FutureOr_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2: findType("+loadedUrls,stylesheet(Set,CssStylesheet0)/"), - FutureOr_nullable_Uri: findType("Uri?/"), - Future_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet: findType("Future<+loadedUrls,stylesheet(Set,CssStylesheet)>"), - Future_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2: findType("Future<+loadedUrls,stylesheet(Set,CssStylesheet0)>"), - Future_Value: findType("Future"), - Future_Value_2: findType("Future"), - Future_nullable_CssValue_String: findType("Future?>"), - Future_nullable_CssValue_String_2: findType("Future?>"), - Future_nullable_ImporterResult: findType("Future"), - Future_nullable_Uri: findType("Future"), - Future_nullable_Value: findType("Future"), - Future_nullable_Value_2: findType("Future"), - IfClause: findType("IfClause"), - IfClause_2: findType("IfClause0"), - ImmutableList: findType("ImmutableList0"), - ImmutableList_2: findType("ImmutableList"), - ImmutableMap: findType("ImmutableMap0"), - Import: findType("Import"), - Import_2: findType("Import0"), - Importer: findType("Importer0"), - ImporterResult: findType("ImporterResult"), - ImporterResult_2: findType("ImporterResult0"), - Importer_2: findType("Importer"), - Int16List: findType("Int16List"), - Int32List: findType("Int32List"), - Int8List: findType("Int8List"), - Interpolation: findType("Interpolation"), - InterpolationBuffer: findType("InterpolationBuffer"), - InterpolationBuffer_2: findType("InterpolationBuffer0"), - InterpolationMap: findType("InterpolationMap"), - InterpolationMap_2: findType("InterpolationMap0"), - Interpolation_2: findType("Interpolation0"), - Iterable_ComplexSelectorComponent: findType("Iterable"), - Iterable_ComplexSelectorComponent_2: findType("Iterable"), - Iterable_dynamic: findType("Iterable<@>"), - Iterable_nullable_Object: findType("Iterable"), - JSArray_Argument: findType("JSArray"), - JSArray_Argument_2: findType("JSArray"), - JSArray_AstNode: findType("JSArray"), - JSArray_AstNode_2: findType("JSArray"), - JSArray_AsyncBuiltInCallable: findType("JSArray"), - JSArray_AsyncBuiltInCallable_2: findType("JSArray"), - JSArray_AsyncCallable: findType("JSArray"), - JSArray_AsyncCallable_2: findType("JSArray"), - JSArray_AsyncImporter: findType("JSArray"), - JSArray_AsyncImporter_2: findType("JSArray"), - JSArray_BinaryOperator: findType("JSArray"), - JSArray_BinaryOperator_2: findType("JSArray"), - JSArray_BuiltInCallable: findType("JSArray"), - JSArray_BuiltInCallable_2: findType("JSArray"), - JSArray_Callable: findType("JSArray"), - JSArray_Callable_2: findType("JSArray"), - JSArray_ColorChannel: findType("JSArray"), - JSArray_ColorChannel_2: findType("JSArray"), - JSArray_ComplexSelector: findType("JSArray"), - JSArray_ComplexSelectorComponent: findType("JSArray"), - JSArray_ComplexSelectorComponent_2: findType("JSArray"), - JSArray_ComplexSelector_2: findType("JSArray"), - JSArray_ConfiguredVariable: findType("JSArray"), - JSArray_ConfiguredVariable_2: findType("JSArray"), - JSArray_CssComment: findType("JSArray"), - JSArray_CssComment_2: findType("JSArray"), - JSArray_CssMediaQuery: findType("JSArray"), - JSArray_CssMediaQuery_2: findType("JSArray"), - JSArray_CssNode: findType("JSArray"), - JSArray_CssNode_2: findType("JSArray"), - JSArray_CssStyleRule: findType("JSArray"), - JSArray_CssStyleRule_2: findType("JSArray"), - JSArray_CssValue_Combinator: findType("JSArray>"), - JSArray_CssValue_Combinator_2: findType("JSArray>"), - JSArray_Entry: findType("JSArray"), - JSArray_Expression: findType("JSArray"), - JSArray_Expression_2: findType("JSArray"), - JSArray_Extender: findType("JSArray"), - JSArray_Extender_2: findType("JSArray"), - JSArray_Extension: findType("JSArray"), - JSArray_ExtensionStore: findType("JSArray"), - JSArray_ExtensionStore_2: findType("JSArray"), - JSArray_Extension_2: findType("JSArray"), - JSArray_ForwardRule: findType("JSArray"), - JSArray_ForwardRule_2: findType("JSArray"), - JSArray_Frame: findType("JSArray"), - JSArray_Future_nullable_Record_3_int_and_String_and_nullable_String: findType("JSArray>"), - JSArray_IfClause: findType("JSArray"), - JSArray_IfClause_2: findType("JSArray"), - JSArray_Import: findType("JSArray"), - JSArray_Import_2: findType("JSArray"), - JSArray_Importer: findType("JSArray"), - JSArray_Importer_2: findType("JSArray"), - JSArray_Iterable_ComplexSelectorComponent: findType("JSArray>"), - JSArray_Iterable_ComplexSelectorComponent_2: findType("JSArray>"), - JSArray_JSFunction: findType("JSArray"), - JSArray_LinearChannel: findType("JSArray"), - JSArray_LinearChannel_2: findType("JSArray"), - JSArray_List_ComplexSelector: findType("JSArray>"), - JSArray_List_ComplexSelectorComponent: findType("JSArray>"), - JSArray_List_ComplexSelectorComponent_2: findType("JSArray>"), - JSArray_List_ComplexSelector_2: findType("JSArray>"), - JSArray_List_Extender: findType("JSArray>"), - JSArray_List_Extender_2: findType("JSArray>"), - JSArray_List_Iterable_ComplexSelectorComponent: findType("JSArray>>"), - JSArray_List_Iterable_ComplexSelectorComponent_2: findType("JSArray>>"), - JSArray_Map_String_AstNode: findType("JSArray>"), - JSArray_Map_String_AstNode_2: findType("JSArray>"), - JSArray_Map_String_AsyncCallable: findType("JSArray>"), - JSArray_Map_String_AsyncCallable_2: findType("JSArray>"), - JSArray_Map_String_Callable: findType("JSArray>"), - JSArray_Map_String_Callable_2: findType("JSArray>"), - JSArray_Map_String_Value: findType("JSArray>"), - JSArray_Map_String_Value_2: findType("JSArray>"), - JSArray_ModifiableCssImport: findType("JSArray"), - JSArray_ModifiableCssImport_2: findType("JSArray"), - JSArray_ModifiableCssNode: findType("JSArray"), - JSArray_ModifiableCssNode_2: findType("JSArray"), - JSArray_ModifiableCssParentNode: findType("JSArray"), - JSArray_ModifiableCssParentNode_2: findType("JSArray"), - JSArray_Module_AsyncCallable: findType("JSArray>"), - JSArray_Module_AsyncCallable_2: findType("JSArray>"), - JSArray_Module_Callable: findType("JSArray>"), - JSArray_Module_Callable_2: findType("JSArray>"), - JSArray_Object: findType("JSArray"), - JSArray_PseudoSelector: findType("JSArray"), - JSArray_PseudoSelector_2: findType("JSArray"), - JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value: findType("JSArray<+(ArgumentDeclaration,Value(List))>"), - JSArray_Record_2_ArgumentDeclaration_and_Value_Function_List_Value_2: findType("JSArray<+(ArgumentDeclaration0,Value0(List))>"), - JSArray_Record_2_Expression_and_Expression: findType("JSArray<+(Expression,Expression)>"), - JSArray_Record_2_Expression_and_Expression_2: findType("JSArray<+(Expression0,Expression0)>"), - JSArray_Record_2_String_and_AstNode: findType("JSArray<+(String,AstNode)>"), - JSArray_Record_2_String_and_AstNode_2: findType("JSArray<+(String,AstNode0)>"), - JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span: findType("JSArray<+deprecation,message,span(Deprecation?,String,FileSpan)>"), - JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2: findType("JSArray<+deprecation,message,span(Deprecation0?,String,FileSpan)>"), - JSArray_SassList: findType("JSArray"), - JSArray_SassList_2: findType("JSArray"), - JSArray_SimpleSelector: findType("JSArray"), - JSArray_SimpleSelector_2: findType("JSArray"), - JSArray_SourceLocation: findType("JSArray"), - JSArray_Statement: findType("JSArray"), - JSArray_Statement_2: findType("JSArray"), - JSArray_String: findType("JSArray"), - JSArray_StylesheetNode: findType("JSArray"), - JSArray_TargetEntry: findType("JSArray"), - JSArray_TargetLineEntry: findType("JSArray"), - JSArray_Trace: findType("JSArray"), - JSArray_UseRule: findType("JSArray"), - JSArray_UseRule_2: findType("JSArray"), - JSArray_Value: findType("JSArray"), - JSArray_Value_2: findType("JSArray"), - JSArray_WatchEvent: findType("JSArray"), - JSArray__Highlight: findType("JSArray<_Highlight>"), - JSArray__Line: findType("JSArray<_Line>"), - JSArray_double: findType("JSArray"), - JSArray_dynamic: findType("JSArray<@>"), - JSArray_int: findType("JSArray"), - JSArray_nullable_FileSpan: findType("JSArray"), - JSArray_nullable_Record_3_int_and_String_and_nullable_String: findType("JSArray<+(int,String,String?)?>"), - JSArray_nullable_SassNumber: findType("JSArray"), - JSArray_nullable_SassNumber_2: findType("JSArray"), - JSArray_nullable_String: findType("JSArray"), - JSClass: findType("JSClass0"), - JSFunction: findType("JSFunction0"), - JSImporter: findType("JSImporter"), - JSImporterResult: findType("JSImporterResult"), - JSNull: findType("JSNull"), - JSObject: findType("JSObject"), - JSUrl: findType("JSUrl0"), - JavaScriptFunction: findType("JavaScriptFunction"), - JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"), - JsIdentityLinkedHashMap_SimpleSelector_int: findType("JsIdentityLinkedHashMap"), - JsIdentityLinkedHashMap_SimpleSelector_int_2: findType("JsIdentityLinkedHashMap"), - JsIdentityLinkedHashMap_of_SelectorList_and_Box_SelectorList: findType("JsIdentityLinkedHashMap>"), - JsIdentityLinkedHashMap_of_SelectorList_and_Box_SelectorList_2: findType("JsIdentityLinkedHashMap>"), - JsLinkedHashMap_Symbol_dynamic: findType("JsLinkedHashMap"), - JsSystemError: findType("JsSystemError"), - LimitedMapView_String_ConfiguredValue: findType("LimitedMapView"), - LimitedMapView_String_ConfiguredValue_2: findType("LimitedMapView0"), - LinearChannel: findType("LinearChannel"), - LinearChannel_2: findType("LinearChannel0"), - List_ComplexSelectorComponent: findType("List"), - List_ComplexSelectorComponent_2: findType("List"), - List_CssComment: findType("List"), - List_CssComment_2: findType("List"), - List_CssMediaQuery: findType("List"), - List_CssMediaQuery_2: findType("List"), - List_CssValue_Combinator: findType("List>"), - List_CssValue_Combinator_2: findType("List>"), - List_Extension: findType("List"), - List_ExtensionStore: findType("List"), - List_ExtensionStore_2: findType("List"), - List_Extension_2: findType("List"), - List_JSObject: findType("List"), - List_List_ComplexSelectorComponent: findType("List>"), - List_List_ComplexSelectorComponent_2: findType("List>"), - List_Module_AsyncCallable: findType("List>"), - List_Module_AsyncCallable_2: findType("List>"), - List_Module_Callable: findType("List>"), - List_Module_Callable_2: findType("List>"), - List_String: findType("List"), - List_WatchEvent: findType("List"), - List_dynamic: findType("List<@>"), - List_int: findType("List"), - List_nullable_Object: findType("List"), - MapKeySet_Module_AsyncCallable: findType("MapKeySet>"), - MapKeySet_Module_AsyncCallable_2: findType("MapKeySet>"), - MapKeySet_Module_Callable: findType("MapKeySet>"), - MapKeySet_Module_Callable_2: findType("MapKeySet>"), - MapKeySet_SimpleSelector: findType("MapKeySet"), - MapKeySet_SimpleSelector_2: findType("MapKeySet"), - MapKeySet_String: findType("MapKeySet"), - MapKeySet_nullable_Object: findType("MapKeySet"), - Map_ComplexSelector_Extension: findType("Map"), - Map_ComplexSelector_Extension_2: findType("Map"), - Map_String_AstNode: findType("Map"), - Map_String_AstNode_2: findType("Map"), - Map_String_AsyncCallable: findType("Map"), - Map_String_AsyncCallable_2: findType("Map"), - Map_String_Callable: findType("Map"), - Map_String_Callable_2: findType("Map"), - Map_String_Value: findType("Map"), - Map_String_Value_2: findType("Map"), - Map_String_dynamic: findType("Map"), - Map_dynamic_dynamic: findType("Map<@,@>"), - Map_of_nullable_Object_and_nullable_Object: findType("Map"), - MappedIterable_String_Frame: findType("MappedIterable"), - MappedListIterable_Frame_Frame: findType("MappedListIterable"), - MappedListIterable_String_Object: findType("MappedListIterable"), - MappedListIterable_String_String: findType("MappedListIterable"), - MappedListIterable_String_Trace: findType("MappedListIterable"), - MappedListIterable_String_Value: findType("MappedListIterable"), - MappedListIterable_String_Value_2: findType("MappedListIterable"), - MappedListIterable_String_dynamic: findType("MappedListIterable"), - MixinRule: findType("MixinRule"), - MixinRule_2: findType("MixinRule0"), - ModifiableBox_SelectorList: findType("ModifiableBox"), - ModifiableBox_SelectorList_2: findType("ModifiableBox0"), - ModifiableCssAtRule: findType("ModifiableCssAtRule"), - ModifiableCssAtRule_2: findType("ModifiableCssAtRule0"), - ModifiableCssKeyframeBlock: findType("ModifiableCssKeyframeBlock"), - ModifiableCssKeyframeBlock_2: findType("ModifiableCssKeyframeBlock0"), - ModifiableCssMediaRule: findType("ModifiableCssMediaRule"), - ModifiableCssMediaRule_2: findType("ModifiableCssMediaRule0"), - ModifiableCssNode: findType("ModifiableCssNode"), - ModifiableCssNode_2: findType("ModifiableCssNode0"), - ModifiableCssParentNode: findType("ModifiableCssParentNode"), - ModifiableCssParentNode_2: findType("ModifiableCssParentNode0"), - ModifiableCssStyleRule: findType("ModifiableCssStyleRule"), - ModifiableCssStyleRule_2: findType("ModifiableCssStyleRule0"), - ModifiableCssSupportsRule: findType("ModifiableCssSupportsRule"), - ModifiableCssSupportsRule_2: findType("ModifiableCssSupportsRule0"), - Module_AsyncCallable: findType("Module0"), - Module_AsyncCallable_2: findType("Module1"), - Module_Callable: findType("Module0"), - Module_Callable_2: findType("Module1"), - MultiSourceSpanFormatException: findType("MultiSourceSpanFormatException"), - NativeTypedArrayOfDouble: findType("NativeTypedArrayOfDouble"), - NativeTypedArrayOfInt: findType("NativeTypedArrayOfInt"), - NativeUint8List: findType("NativeUint8List"), - Never: findType("0&"), - NodeCompileResult: findType("NodeCompileResult"), - NodeImporterResult: findType("NodeImporterResult0"), - NonNullsIterable_Future_void: findType("NonNullsIterable>"), - NonNullsIterable_Object: findType("NonNullsIterable"), - NonNullsIterable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl: findType("NonNullsIterable<+originalUrl(AsyncImporter,Uri,Uri)>"), - NonNullsIterable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2: findType("NonNullsIterable<+originalUrl(AsyncImporter0,Uri,Uri)>"), - NonNullsIterable_Record_3_Importer_and_Uri_and_Uri_originalUrl: findType("NonNullsIterable<+originalUrl(Importer,Uri,Uri)>"), - NonNullsIterable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2: findType("NonNullsIterable<+originalUrl(Importer0,Uri,Uri)>"), - NonNullsIterable_SelectorList: findType("NonNullsIterable"), - NonNullsIterable_SelectorList_2: findType("NonNullsIterable"), - NonNullsIterable_String: findType("NonNullsIterable"), - Null: findType("Null"), - NumberExpression: findType("NumberExpression"), - NumberExpression_2: findType("NumberExpression0"), - Object: findType("Object"), - Option: findType("Option"), - PathMap_ChangeType: findType("PathMap"), - PathMap_Stream_WatchEvent: findType("PathMap>"), - PathMap_String: findType("PathMap"), - PathMap_nullable_String: findType("PathMap"), - Promise: findType("Promise"), - PseudoSelector: findType("PseudoSelector"), - PseudoSelector_2: findType("PseudoSelector0"), - RangeError: findType("RangeError"), - Record: findType("Record"), - Record_0: findType("+()"), - Record_1_nullable_Object: findType("+(Object?)"), - Record_2_Expression_and_Expression: findType("+(Expression,Expression)"), - Record_2_Expression_and_Expression_2: findType("+(Expression0,Expression0)"), - Record_2_List_Expression_and_Map_String_Expression: findType("+(List,Map)"), - Record_2_List_Expression_and_Map_String_Expression_2: findType("+(List,Map)"), - Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet: findType("+loadedUrls,stylesheet(Set,CssStylesheet)"), - Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2: findType("+loadedUrls,stylesheet(Set,CssStylesheet0)"), - Record_2_String_and_InterpolationMap: findType("+(String,InterpolationMap)"), - Record_2_String_and_InterpolationMap_2: findType("+(String,InterpolationMap0)"), - Record_2_String_and_SourceSpan: findType("+(String,SourceSpan)"), - Record_2_String_and_nullable_InterpolationMap: findType("+(String,InterpolationMap?)"), - Record_2_String_and_nullable_InterpolationMap_2: findType("+(String,InterpolationMap0?)"), - Record_2_Uri_and_bool_forImport: findType("+forImport(Uri,bool)"), - Record_2_nullable_Object_and_nullable_Object: findType("+(Object?,Object?)"), - Record_2_nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_and_bool: findType("+(+originalUrl(AsyncImporter,Uri,Uri)?,bool)"), - Record_2_nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_and_bool_2: findType("+(+originalUrl(AsyncImporter0,Uri,Uri)?,bool)"), - Record_2_nullable_String_and_nullable_String: findType("+(String?,String?)"), - Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl: findType("+originalUrl(AsyncImporter,Uri,Uri)"), - Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2: findType("+originalUrl(AsyncImporter0,Uri,Uri)"), - Record_3_AsyncImporter_and_Uri_and_bool_forImport: findType("+forImport(AsyncImporter,Uri,bool)"), - Record_3_AsyncImporter_and_Uri_and_bool_forImport_2: findType("+forImport(AsyncImporter0,Uri,bool)"), - Record_3_Importer_and_Uri_and_Uri_originalUrl: findType("+originalUrl(Importer,Uri,Uri)"), - Record_3_Importer_and_Uri_and_Uri_originalUrl_2: findType("+originalUrl(Importer0,Uri,Uri)"), - Record_3_Importer_and_Uri_and_bool_forImport: findType("+forImport(Importer,Uri,bool)"), - Record_3_Importer_and_Uri_and_bool_forImport_2: findType("+forImport(Importer0,Uri,bool)"), - Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency: findType("+importer,isDependency(Stylesheet,AsyncImporter?,bool)"), - Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency_2: findType("+importer,isDependency(Stylesheet0,AsyncImporter0?,bool)"), - Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl: findType("+originalUrl(Object?,Object?,Object?)"), - Record_5_Map_String_Value_named_and_Map_String_AstNode_namedNodes_and_List_Value_positional_and_List_AstNode_positionalNodes_and_ListSeparator_separator: findType("+named,namedNodes,positional,positionalNodes,separator(Map,Map,List,List,ListSeparator)"), - Record_5_Map_String_Value_named_and_Map_String_AstNode_namedNodes_and_List_Value_positional_and_List_AstNode_positionalNodes_and_ListSeparator_separator_2: findType("+named,namedNodes,positional,positionalNodes,separator(Map,Map,List,List,ListSeparator0)"), - RegExpMatch: findType("RegExpMatch"), - RenderContextOptions: findType("RenderContextOptions0"), - RenderResult: findType("RenderResult"), - Result_String: findType("Result"), - ReversedListIterable_Frame: findType("ReversedListIterable"), - Runes: findType("Runes"), - SassArgumentList: findType("SassArgumentList"), - SassArgumentList_2: findType("SassArgumentList0"), - SassBoolean: findType("SassBoolean"), - SassBoolean_2: findType("SassBoolean0"), - SassColor: findType("SassColor"), - SassColor_2: findType("SassColor0"), - SassFormatException: findType("SassFormatException"), - SassFormatException_2: findType("SassFormatException0"), - SassList: findType("SassList"), - SassList_2: findType("SassList0"), - SassMap: findType("SassMap"), - SassMap_2: findType("SassMap0"), - SassNumber: findType("SassNumber"), - SassNumber_2: findType("SassNumber0"), - SassRuntimeException: findType("SassRuntimeException"), - SassRuntimeException_2: findType("SassRuntimeException0"), - SassString: findType("SassString"), - SassString_2: findType("SassString0"), - SelectorList: findType("SelectorList"), - SelectorList_2: findType("SelectorList0"), - Set_ModifiableBox_SelectorList: findType("Set>"), - Set_ModifiableBox_SelectorList_2: findType("Set>"), - Set_Uri: findType("Set"), - SimpleSelector: findType("SimpleSelector"), - SimpleSelector_2: findType("SimpleSelector0"), - SourceFile: findType("SourceFile"), - SourceLocation: findType("SourceLocation"), - SourceSpan: findType("SourceSpan"), - SourceSpanFormatException: findType("SourceSpanFormatException"), - SourceSpanWithContext: findType("SourceSpanWithContext"), - StackTrace: findType("StackTrace"), - Statement: findType("Statement"), - Statement_2: findType("Statement0"), - StaticImport: findType("StaticImport"), - StaticImport_2: findType("StaticImport0"), - StreamCompleter_WatchEvent: findType("StreamCompleter"), - StreamGroup_WatchEvent: findType("StreamGroup"), - StreamQueue_String: findType("StreamQueue"), - Stream_WatchEvent: findType("Stream"), - String: findType("String"), - StringExpression: findType("StringExpression"), - StringExpression_2: findType("StringExpression0"), - StylesheetNode: findType("StylesheetNode"), - Timer: findType("Timer"), - Trace: findType("Trace"), - TrustedGetRuntimeType: findType("TrustedGetRuntimeType"), - TypeError: findType("TypeError"), - TypeSelector: findType("TypeSelector"), - TypeSelector_2: findType("TypeSelector0"), - Uint16List: findType("Uint16List"), - Uint32List: findType("Uint32List"), - Uint8ClampedList: findType("Uint8ClampedList"), - Uint8List: findType("Uint8List"), - UnionSet_Uri: findType("UnionSet"), - UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), - UnmodifiableListView_CssComment: findType("UnmodifiableListView"), - UnmodifiableListView_CssComment_2: findType("UnmodifiableListView"), - UnmodifiableListView_CssNode: findType("UnmodifiableListView"), - UnmodifiableListView_CssNode_2: findType("UnmodifiableListView"), - UnmodifiableListView_ForwardRule: findType("UnmodifiableListView"), - UnmodifiableListView_ForwardRule_2: findType("UnmodifiableListView"), - UnmodifiableListView_ModifiableCssNode: findType("UnmodifiableListView"), - UnmodifiableListView_ModifiableCssNode_2: findType("UnmodifiableListView"), - UnmodifiableListView_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span: findType("UnmodifiableListView<+deprecation,message,span(Deprecation?,String,FileSpan)>"), - UnmodifiableListView_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2: findType("UnmodifiableListView<+deprecation,message,span(Deprecation0?,String,FileSpan)>"), - UnmodifiableListView_String: findType("UnmodifiableListView"), - UnmodifiableListView_UseRule: findType("UnmodifiableListView"), - UnmodifiableListView_UseRule_2: findType("UnmodifiableListView"), - UnmodifiableMapView_String_ArgParser: findType("UnmodifiableMapView"), - UnmodifiableMapView_String_ConfiguredValue: findType("UnmodifiableMapView"), - UnmodifiableMapView_String_ConfiguredValue_2: findType("UnmodifiableMapView"), - UnmodifiableMapView_String_Option: findType("UnmodifiableMapView"), - UnmodifiableMapView_String_Value: findType("UnmodifiableMapView"), - UnmodifiableMapView_String_Value_2: findType("UnmodifiableMapView"), - UnmodifiableMapView_of_Uri_and_nullable_StylesheetNode: findType("UnmodifiableMapView"), - UnmodifiableMapView_of_nullable_String_and_String: findType("UnmodifiableMapView"), - UnmodifiableMapView_of_nullable_String_and_nullable_String: findType("UnmodifiableMapView"), - UnmodifiableSetView_String: findType("UnmodifiableSetView0"), - UnmodifiableSetView_StylesheetNode: findType("UnmodifiableSetView0"), - UnmodifiableSetView_Uri: findType("UnmodifiableSetView0"), - UnprefixedMapView_ConfiguredValue: findType("UnprefixedMapView"), - UnprefixedMapView_ConfiguredValue_2: findType("UnprefixedMapView0"), - Uri: findType("Uri"), - UseRule: findType("UseRule"), - UserDefinedCallable_AsyncEnvironment: findType("UserDefinedCallable"), - UserDefinedCallable_AsyncEnvironment_2: findType("UserDefinedCallable0"), - UserDefinedCallable_Environment: findType("UserDefinedCallable"), - UserDefinedCallable_Environment_2: findType("UserDefinedCallable0"), - Value: findType("Value"), - Value_2: findType("Value0"), - Value_Function_List_Value: findType("Value(List)"), - Value_Function_List_Value_2: findType("Value0(List)"), - VariableDeclaration: findType("VariableDeclaration"), - VersionRange: findType("VersionRange"), - WatchEvent: findType("WatchEvent"), - WhereIterable_List_Iterable_ComplexSelectorComponent: findType("WhereIterable>>"), - WhereIterable_List_Iterable_ComplexSelectorComponent_2: findType("WhereIterable>>"), - WhereIterable_String: findType("WhereIterable"), - WhereTypeIterable_PseudoSelector: findType("WhereTypeIterable"), - WhereTypeIterable_PseudoSelector_2: findType("WhereTypeIterable"), - WhereTypeIterable_String: findType("WhereTypeIterable"), - _AsyncCompleter_List_void: findType("_AsyncCompleter>"), - _AsyncCompleter_Object: findType("_AsyncCompleter"), - _AsyncCompleter_Stream_WatchEvent: findType("_AsyncCompleter>"), - _AsyncCompleter_String: findType("_AsyncCompleter"), - _AsyncCompleter_nullable_Object: findType("_AsyncCompleter"), - _CompleterStream_WatchEvent: findType("_CompleterStream"), - _EventRequest_dynamic: findType("_EventRequest<@>"), - _Future_List_void: findType("_Future>"), - _Future_Object: findType("_Future"), - _Future_Stream_WatchEvent: findType("_Future>"), - _Future_String: findType("_Future"), - _Future_Value: findType("_Future"), - _Future_Value_2: findType("_Future"), - _Future_bool: findType("_Future"), - _Future_dynamic: findType("_Future<@>"), - _Future_int: findType("_Future"), - _Future_nullable_Object: findType("_Future"), - _Future_void: findType("_Future<~>"), - _Highlight: findType("_Highlight"), - _IdentityHashMap_of_nullable_Object_and_nullable_Object: findType("_IdentityHashMap"), - _LinkedIdentityHashSet_ComplexSelector: findType("_LinkedIdentityHashSet"), - _LinkedIdentityHashSet_ComplexSelector_2: findType("_LinkedIdentityHashSet"), - _LinkedIdentityHashSet_Extension: findType("_LinkedIdentityHashSet"), - _LinkedIdentityHashSet_Extension_2: findType("_LinkedIdentityHashSet"), - _MapEntry: findType("_MapEntry"), - _NodeException: findType("_NodeException"), - _PlatformUri: findType("_PlatformUri"), - _SyncStarIterable_Deprecation: findType("_SyncStarIterable"), - _SyncStarIterable_Extension: findType("_SyncStarIterable"), - _SyncStarIterable_Extension_2: findType("_SyncStarIterable"), - _SyncStarIterable_SimpleSelector: findType("_SyncStarIterable"), - _SyncStarIterable_SimpleSelector_2: findType("_SyncStarIterable"), - _SyncStarIterable_String: findType("_SyncStarIterable"), - bool: findType("bool"), - double: findType("double"), - dynamic: findType("@"), - dynamic_Function: findType("@()"), - dynamic_Function_Object: findType("@(Object)"), - dynamic_Function_Object_StackTrace: findType("@(Object,StackTrace)"), - int: findType("int"), - legacy_Never: findType("0&*"), - legacy_Object: findType("Object*"), - nullable_AstNode: findType("AstNode?"), - nullable_AstNode_2: findType("AstNode0?"), - nullable_CanonicalizeContext: findType("CanonicalizeContext?"), - nullable_CanonicalizeContext_2: findType("CanonicalizeContext0?"), - nullable_CssValue_String: findType("CssValue?"), - nullable_CssValue_String_2: findType("CssValue0?"), - nullable_FileSpan: findType("FileSpan?"), - nullable_Future_Null: findType("Future?"), - nullable_Future_void: findType("Future<~>?"), - nullable_ImporterResult: findType("ImporterResult?"), - nullable_ImporterResult_2: findType("ImporterResult0?"), - nullable_Object: findType("Object?"), - nullable_Record_2_String_and_String: findType("+(String,String)?"), - nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl: findType("+originalUrl(AsyncImporter,Uri,Uri)?"), - nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2: findType("+originalUrl(AsyncImporter0,Uri,Uri)?"), - nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl: findType("+originalUrl(Importer,Uri,Uri)?"), - nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2: findType("+originalUrl(Importer0,Uri,Uri)?"), - nullable_Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency: findType("+importer,isDependency(Stylesheet0,AsyncImporter0?,bool)?"), - nullable_Record_3_int_and_String_and_nullable_String: findType("+(int,String,String?)?"), - nullable_SourceFile: findType("SourceFile?"), - nullable_SourceSpan: findType("SourceSpan?"), - nullable_StreamSubscription_WatchEvent: findType("StreamSubscription?"), - nullable_String: findType("String?"), - nullable_Stylesheet: findType("Stylesheet?"), - nullable_StylesheetNode: findType("StylesheetNode?"), - nullable_Stylesheet_2: findType("Stylesheet0?"), - nullable_Uri: findType("Uri?"), - nullable_Value: findType("Value?"), - nullable_Value_2: findType("Value0?"), - nullable__ConstructorOptions: findType("_ConstructorOptions?"), - nullable__ConstructorOptions_2: findType("_ConstructorOptions0?"), - nullable__ConstructorOptions_3: findType("_ConstructorOptions1?"), - nullable__Highlight: findType("_Highlight?"), - nullable_double: findType("double?"), - num: findType("num"), - void: findType("~"), - void_Function_Object: findType("~(Object)"), - void_Function_Object_StackTrace: findType("~(Object,StackTrace)") - }; - })(); - (function constants() { - var makeConstList = hunkHelpers.makeConstList; - B.Interceptor_methods = J.Interceptor.prototype; - B.JSArray_methods = J.JSArray.prototype; - B.JSBool_methods = J.JSBool.prototype; - B.JSInt_methods = J.JSInt.prototype; - B.JSNull_methods = J.JSNull.prototype; - B.JSNumber_methods = J.JSNumber.prototype; - B.JSString_methods = J.JSString.prototype; - B.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; - B.JavaScriptObject_methods = J.JavaScriptObject.prototype; - B.NativeUint32List_methods = A.NativeUint32List.prototype; - B.NativeUint8List_methods = A.NativeUint8List.prototype; - B.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; - B.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; - B.LinearChannel_4KI = new A.LinearChannel(0, 1, false, false, false, "red", false, null); - B.LinearChannel_qbH = new A.LinearChannel(0, 1, false, false, false, "green", false, null); - B.LinearChannel_W3m = new A.LinearChannel(0, 1, false, false, false, "blue", false, null); - B.List_V3K = A._setArrayType(makeConstList([B.LinearChannel_4KI, B.LinearChannel_qbH, B.LinearChannel_W3m]), type$.JSArray_LinearChannel); - B.A98RgbColorSpace_bdu = new A.A98RgbColorSpace("a98-rgb", B.List_V3K); - B.LinearChannel_4KI0 = new A.LinearChannel0(0, 1, false, false, false, "red", false, null); - B.LinearChannel_qbH0 = new A.LinearChannel0(0, 1, false, false, false, "green", false, null); - B.LinearChannel_W3m0 = new A.LinearChannel0(0, 1, false, false, false, "blue", false, null); - B.List_V3K0 = A._setArrayType(makeConstList([B.LinearChannel_4KI0, B.LinearChannel_qbH0, B.LinearChannel_W3m0]), type$.JSArray_LinearChannel_2); - B.A98RgbColorSpace_bdu0 = new A.A98RgbColorSpace0("a98-rgb", B.List_V3K0); - B.AsciiEncoder_127 = new A.AsciiEncoder(127); - B.C_EmptyUnmodifiableSet1 = new A.EmptyUnmodifiableSet(A.findType("EmptyUnmodifiableSet")); - B.AtRootQuery_n2q = new A.AtRootQuery(false, B.C_EmptyUnmodifiableSet1, false, true); - B.AtRootQuery_n2q0 = new A.AtRootQuery0(false, B.C_EmptyUnmodifiableSet1, false, true); - B.AttributeOperator_4QF = new A.AttributeOperator("=", "equal"); - B.AttributeOperator_4QF0 = new A.AttributeOperator0("=", "equal"); - B.AttributeOperator_61T = new A.AttributeOperator("*=", "substring"); - B.AttributeOperator_61T0 = new A.AttributeOperator0("*=", "substring"); - B.AttributeOperator_cMb = new A.AttributeOperator("^=", "prefix"); - B.AttributeOperator_cMb0 = new A.AttributeOperator0("^=", "prefix"); - B.AttributeOperator_jqB = new A.AttributeOperator("|=", "dash"); - B.AttributeOperator_jqB0 = new A.AttributeOperator0("|=", "dash"); - B.AttributeOperator_qhE = new A.AttributeOperator("$=", "suffix"); - B.AttributeOperator_qhE0 = new A.AttributeOperator0("$=", "suffix"); - B.AttributeOperator_yT8 = new A.AttributeOperator("~=", "include"); - B.AttributeOperator_yT80 = new A.AttributeOperator0("~=", "include"); - B.BinaryOperator_2No = new A.BinaryOperator("times", "*", 6, true, "times"); - B.BinaryOperator_2No0 = new A.BinaryOperator0("times", "*", 6, true, "times"); - B.BinaryOperator_KNx = new A.BinaryOperator("modulo", "%", 6, false, "modulo"); - B.BinaryOperator_KNx0 = new A.BinaryOperator0("modulo", "%", 6, false, "modulo"); - B.BinaryOperator_SPQ = new A.BinaryOperator("less than or equals", "<=", 4, false, "lessThanOrEquals"); - B.BinaryOperator_SPQ0 = new A.BinaryOperator0("less than or equals", "<=", 4, false, "lessThanOrEquals"); - B.BinaryOperator_SjO = new A.BinaryOperator("minus", "-", 5, false, "minus"); - B.BinaryOperator_SjO0 = new A.BinaryOperator0("minus", "-", 5, false, "minus"); - B.BinaryOperator_U77 = new A.BinaryOperator("divided by", "/", 6, false, "dividedBy"); - B.BinaryOperator_U770 = new A.BinaryOperator0("divided by", "/", 6, false, "dividedBy"); - B.BinaryOperator_bEa = new A.BinaryOperator("greater than", ">", 4, false, "greaterThan"); - B.BinaryOperator_bEa0 = new A.BinaryOperator0("greater than", ">", 4, false, "greaterThan"); - B.BinaryOperator_eDt = new A.BinaryOperator("and", "and", 2, true, "and"); - B.BinaryOperator_eDt0 = new A.BinaryOperator0("and", "and", 2, true, "and"); - B.BinaryOperator_g8k = new A.BinaryOperator("equals", "==", 3, false, "equals"); - B.BinaryOperator_g8k0 = new A.BinaryOperator0("equals", "==", 3, false, "equals"); - B.BinaryOperator_icU = new A.BinaryOperator("not equals", "!=", 3, false, "notEquals"); - B.BinaryOperator_icU0 = new A.BinaryOperator0("not equals", "!=", 3, false, "notEquals"); - B.BinaryOperator_miq = new A.BinaryOperator("less than", "<", 4, false, "lessThan"); - B.BinaryOperator_miq0 = new A.BinaryOperator0("less than", "<", 4, false, "lessThan"); - B.BinaryOperator_oEm = new A.BinaryOperator("greater than or equals", ">=", 4, false, "greaterThanOrEquals"); - B.BinaryOperator_oEm0 = new A.BinaryOperator0("greater than or equals", ">=", 4, false, "greaterThanOrEquals"); - B.BinaryOperator_qNM = new A.BinaryOperator("or", "or", 1, true, "or"); - B.BinaryOperator_qNM0 = new A.BinaryOperator0("or", "or", 1, true, "or"); - B.BinaryOperator_u15 = new A.BinaryOperator("plus", "+", 5, true, "plus"); - B.BinaryOperator_u150 = new A.BinaryOperator0("plus", "+", 5, true, "plus"); - B.BinaryOperator_wdM = new A.BinaryOperator("single equals", "=", 0, false, "singleEquals"); - B.BinaryOperator_wdM0 = new A.BinaryOperator0("single equals", "=", 0, false, "singleEquals"); - B.CONSTANT = new A.Instantiation1(A.math0__max$closure(), A.findType("Instantiation1")); - B.C_AsciiCodec = new A.AsciiCodec(); - B.C_AsciiGlyphSet = new A.AsciiGlyphSet(); - B.C_Base64Encoder = new A.Base64Encoder(); - B.C_Base64Codec = new A.Base64Codec(); - B.C_DefaultEquality = new A.DefaultEquality(); - B.C_EmptyExtensionStore = new A.EmptyExtensionStore(); - B.C_EmptyExtensionStore0 = new A.EmptyExtensionStore0(); - B.C_EmptyIterator = new A.EmptyIterator(); - B.C_EmptyUnmodifiableSet = new A.EmptyUnmodifiableSet(A.findType("EmptyUnmodifiableSet")); - B.C_EmptyUnmodifiableSet0 = new A.EmptyUnmodifiableSet(A.findType("EmptyUnmodifiableSet")); - B.C_IsCalculationSafeVisitor = new A.IsCalculationSafeVisitor(); - B.C_IsCalculationSafeVisitor0 = new A.IsCalculationSafeVisitor0(); - B.C_IterableEquality = new A.IterableEquality(); - B.C_JS_CONST = function getTagFallback(o) { - var s = Object.prototype.toString.call(o); - return s.substring(8, s.length - 1); -}; - B.C_JS_CONST0 = function() { - var toStringFunction = Object.prototype.toString; - function getTag(o) { - var s = toStringFunction.call(o); - return s.substring(8, s.length - 1); - } - function getUnknownTag(object, tag) { - if (/^HTML[A-Z].*Element$/.test(tag)) { - var name = toStringFunction.call(object); - if (name == "[object Object]") return null; - return "HTMLElement"; - } - } - function getUnknownTagGenericBrowser(object, tag) { - if (object instanceof HTMLElement) return "HTMLElement"; - return getUnknownTag(object, tag); - } - function prototypeForTag(tag) { - if (typeof window == "undefined") return null; - if (typeof window[tag] == "undefined") return null; - var constructor = window[tag]; - if (typeof constructor != "function") return null; - return constructor.prototype; - } - function discriminator(tag) { return null; } - var isBrowser = typeof HTMLElement == "function"; - return { - getTag: getTag, - getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, - prototypeForTag: prototypeForTag, - discriminator: discriminator }; -}; - B.C_JS_CONST6 = function(getTagFallback) { - return function(hooks) { - if (typeof navigator != "object") return hooks; - var userAgent = navigator.userAgent; - if (typeof userAgent != "string") return hooks; - if (userAgent.indexOf("DumpRenderTree") >= 0) return hooks; - if (userAgent.indexOf("Chrome") >= 0) { - function confirm(p) { - return typeof window == "object" && window[p] && window[p].name == p; - } - if (confirm("Window") && confirm("HTMLElement")) return hooks; - } - hooks.getTag = getTagFallback; - }; -}; - B.C_JS_CONST1 = function(hooks) { - if (typeof dartExperimentalFixupGetTag != "function") return hooks; - hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); -}; - B.C_JS_CONST5 = function(hooks) { - if (typeof navigator != "object") return hooks; - var userAgent = navigator.userAgent; - if (typeof userAgent != "string") return hooks; - if (userAgent.indexOf("Firefox") == -1) return hooks; - var getTag = hooks.getTag; - var quickMap = { - "BeforeUnloadEvent": "Event", - "DataTransfer": "Clipboard", - "GeoGeolocation": "Geolocation", - "Location": "!Location", - "WorkerMessageEvent": "MessageEvent", - "XMLDocument": "!Document"}; - function getTagFirefox(o) { - var tag = getTag(o); - return quickMap[tag] || tag; - } - hooks.getTag = getTagFirefox; -}; - B.C_JS_CONST4 = function(hooks) { - if (typeof navigator != "object") return hooks; - var userAgent = navigator.userAgent; - if (typeof userAgent != "string") return hooks; - if (userAgent.indexOf("Trident/") == -1) return hooks; - var getTag = hooks.getTag; - var quickMap = { - "BeforeUnloadEvent": "Event", - "DataTransfer": "Clipboard", - "HTMLDDElement": "HTMLElement", - "HTMLDTElement": "HTMLElement", - "HTMLPhraseElement": "HTMLElement", - "Position": "Geoposition" - }; - function getTagIE(o) { - var tag = getTag(o); - var newTag = quickMap[tag]; - if (newTag) return newTag; - if (tag == "Object") { - if (window.DataView && (o instanceof window.DataView)) return "DataView"; - } - return tag; - } - function prototypeForTagIE(tag) { - var constructor = window[tag]; - if (constructor == null) return null; - return constructor.prototype; - } - hooks.getTag = getTagIE; - hooks.prototypeForTag = prototypeForTagIE; -}; - B.C_JS_CONST2 = function(hooks) { - var getTag = hooks.getTag; - var prototypeForTag = hooks.prototypeForTag; - function getTagFixed(o) { - var tag = getTag(o); - if (tag == "Document") { - if (!!o.xmlVersion) return "!Document"; - return "!HTMLDocument"; - } - return tag; - } - function prototypeForTagFixed(tag) { - if (tag == "Document") return null; - return prototypeForTag(tag); - } - hooks.getTag = getTagFixed; - hooks.prototypeForTag = prototypeForTagFixed; -}; - B.C_JS_CONST3 = function(hooks) { return hooks; } -; - B.C_JsonCodec = new A.JsonCodec(); - B.C_ListEquality0 = new A.ListEquality(); - B.C_ListEquality = new A.ListEquality(); - B.C_MapEquality = new A.MapEquality(A.findType("MapEquality")); - B.C_OutOfMemoryError = new A.OutOfMemoryError(); - B.C_SentinelValue = new A.SentinelValue(); - B.C_UnicodeGlyphSet = new A.UnicodeGlyphSet(); - B.C_Utf8Codec = new A.Utf8Codec(); - B.C_Utf8Encoder = new A.Utf8Encoder(); - B.C__ColorFormatEnum = new A._ColorFormatEnum(); - B.C__ColorFormatEnum0 = new A._ColorFormatEnum0(); - B.C__DelayedDone = new A._DelayedDone(); - B.C__HasContentVisitor = new A._HasContentVisitor(); - B.C__HasContentVisitor0 = new A._HasContentVisitor0(); - B.C__IsUselessVisitor = new A._IsUselessVisitor(); - B.C__IsUselessVisitor0 = new A._IsUselessVisitor0(); - B.C__JSRandom = new A._JSRandom(); - B.C__MakeExpressionCalculationSafe = new A._MakeExpressionCalculationSafe(); - B.C__MakeExpressionCalculationSafe0 = new A._MakeExpressionCalculationSafe0(); - B.C__ParentSelectorVisitor = new A._ParentSelectorVisitor(); - B.C__ParentSelectorVisitor0 = new A._ParentSelectorVisitor0(); - B.C__Required = new A._Required(); - B.C__RootZone = new A._RootZone(); - B.C__SassNull = new A._SassNull(); - B.C__SassNull0 = new A._SassNull0(); - B.CalculationOperator_171 = new A.CalculationOperator("times", "*", 2, "times"); - B.CalculationOperator_1710 = new A.CalculationOperator0("times", "*", 2, "times"); - B.CalculationOperator_CxF = new A.CalculationOperator("minus", "-", 1, "minus"); - B.CalculationOperator_CxF0 = new A.CalculationOperator0("minus", "-", 1, "minus"); - B.CalculationOperator_Qf1 = new A.CalculationOperator("divided by", "/", 2, "dividedBy"); - B.CalculationOperator_Qf10 = new A.CalculationOperator0("divided by", "/", 2, "dividedBy"); - B.CalculationOperator_g2q = new A.CalculationOperator("plus", "+", 1, "plus"); - B.CalculationOperator_g2q0 = new A.CalculationOperator0("plus", "+", 1, "plus"); - B.ChangeType_add = new A.ChangeType("add"); - B.ChangeType_modify = new A.ChangeType("modify"); - B.ChangeType_remove = new A.ChangeType("remove"); - B.ClipGamutMap_clip = new A.ClipGamutMap("clip"); - B.ClipGamutMap_clip0 = new A.ClipGamutMap0("clip"); - B.Combinator_8I8 = new A.Combinator(">", "child"); - B.Combinator_8I80 = new A.Combinator0(">", "child"); - B.Combinator_gRV = new A.Combinator("+", "nextSibling"); - B.Combinator_gRV0 = new A.Combinator0("+", "nextSibling"); - B.Combinator_y18 = new A.Combinator("~", "followingSibling"); - B.Combinator_y180 = new A.Combinator0("~", "followingSibling"); - B.Object_empty = {}; - B.Map_empty18 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.Configuration_Map_empty_null = new A.Configuration(B.Map_empty18, null); - B.Map_empty19 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.Configuration_Map_empty_null0 = new A.Configuration0(B.Map_empty19, null); - B.Deprecation_0 = new A.Deprecation("css-function-mixin", "1.76.0", "cssFunctionMixin"); - B.Deprecation_0Gh = new A.Deprecation("global-builtin", "1.80.0", "globalBuiltin"); - B.Deprecation_2My = new A.Deprecation("strict-unary", "1.55.0", "strictUnary"); - B.Deprecation_2No = new A.Deprecation0("legacy-js-api", "1.79.0", "Legacy JS API.", "legacyJsApi"); - B.Deprecation_4QP = new A.Deprecation0("color-module-compat", "1.23.0", "Using color module functions in place of plain CSS functions.", "colorModuleCompat"); - B.Deprecation_6v8 = new A.Deprecation("call-string", "0.0.0", "callString"); - B.Deprecation_A0i = new A.Deprecation0("import", "1.80.0", "@import rules.", "import"); - B.Deprecation_Aec = new A.Deprecation("elseif", "1.3.2", "elseif"); - B.Deprecation_C9i = new A.Deprecation("bogus-combinators", "1.54.0", "bogusCombinators"); - B.Deprecation_Ctw = new A.Deprecation0("moz-document", "1.7.2", "@-moz-document.", "mozDocument"); - B.Deprecation_ErI = new A.Deprecation0("calc-interp", null, null, "calcInterp"); - B.Deprecation_FIw = new A.Deprecation0("color-4-api", "1.79.0", "Certain uses of built-in sass:color functions.", "color4Api"); - B.Deprecation_INA = new A.Deprecation("relative-canonical", "1.14.2", "relativeCanonical"); - B.Deprecation_JeE = new A.Deprecation0("user-authored", null, null, "userAuthored"); - B.Deprecation_KIf = new A.Deprecation("new-global", "1.17.2", "newGlobal"); - B.Deprecation_MT8 = new A.Deprecation0("new-global", "1.17.2", "Declaring new variables with !global.", "newGlobal"); - B.Deprecation_MYu = new A.Deprecation("import", "1.80.0", "import"); - B.Deprecation_Q5r = new A.Deprecation0("global-builtin", "1.80.0", "Global built-in functions that are available in sass: modules.", "globalBuiltin"); - B.Deprecation_QAx = new A.Deprecation0("feature-exists", "1.78.0", "meta.feature-exists", "featureExists"); - B.Deprecation_T5f = new A.Deprecation("moz-document", "1.7.2", "mozDocument"); - B.Deprecation_U43 = new A.Deprecation0("call-string", "0.0.0", "Passing a string directly to meta.call().", "callString"); - B.Deprecation_UW2 = new A.Deprecation0("strict-unary", "1.55.0", "Ambiguous + and - operators.", "strictUnary"); - B.Deprecation_VIq = new A.Deprecation0("mixed-decls", "1.77.7", "Declarations after or between nested rules.", "mixedDecls"); - B.Deprecation_VqL = new A.Deprecation0("duplicate-var-flags", "1.62.0", "Using !default or !global multiple times for one variable.", "duplicateVarFlags"); - B.Deprecation_Vr4 = new A.Deprecation("feature-exists", "1.78.0", "featureExists"); - B.Deprecation_W1R = new A.Deprecation("user-authored", null, "userAuthored"); - B.Deprecation_YKG = new A.Deprecation0("elseif", "1.3.2", "@elseif.", "elseif"); - B.Deprecation_YUI = new A.Deprecation("duplicate-var-flags", "1.62.0", "duplicateVarFlags"); - B.Deprecation_Zk6 = new A.Deprecation("abs-percent", "1.65.0", "absPercent"); - B.Deprecation_bh9 = new A.Deprecation0("bogus-combinators", "1.54.0", "Leading, trailing, and repeated combinators.", "bogusCombinators"); - B.Deprecation_cI8 = new A.Deprecation0("fs-importer-cwd", "1.73.0", "Using the current working directory as an implicit load path.", "fsImporterCwd"); - B.Deprecation_ePO = new A.Deprecation("color-module-compat", "1.23.0", "colorModuleCompat"); - B.Deprecation_fXI = new A.Deprecation0("relative-canonical", "1.14.2", "Imports using relative canonical URLs.", "relativeCanonical"); - B.Deprecation_int = new A.Deprecation("function-units", "1.56.0", "functionUnits"); - B.Deprecation_izR = new A.Deprecation("color-functions", "1.79.0", "colorFunctions"); - B.Deprecation_jV0 = new A.Deprecation0("function-units", "1.56.0", "Passing invalid units to built-in functions.", "functionUnits"); - B.Deprecation_mBb = new A.Deprecation0("null-alpha", "1.62.3", "Passing null as alpha in the JS API.", "nullAlpha"); - B.Deprecation_mRl = new A.Deprecation("slash-div", "1.33.0", "slashDiv"); - B.Deprecation_omC = new A.Deprecation0("css-function-mixin", "1.76.0", "Function and mixin names beginning with --.", "cssFunctionMixin"); - B.Deprecation_q39 = new A.Deprecation0("slash-div", "1.33.0", "/ operator for division.", "slashDiv"); - B.Deprecation_qgq = new A.Deprecation0("abs-percent", "1.65.0", "Passing percentages to the Sass abs() function.", "absPercent"); - B.Deprecation_rb9 = new A.Deprecation0("color-functions", "1.79.0", "Using global color functions instead of sass:color.", "colorFunctions"); - B.Deprecation_u1l = new A.Deprecation("mixed-decls", "1.77.7", "mixedDecls"); - B.Deprecation_vct = new A.Deprecation("fs-importer-cwd", "1.73.0", "fsImporterCwd"); - B.DisplayP3ColorSpace_NQk = new A.DisplayP3ColorSpace("display-p3", B.List_V3K); - B.DisplayP3ColorSpace_NQk0 = new A.DisplayP3ColorSpace0("display-p3", B.List_V3K0); - B.Duration_0 = new A.Duration(0); - B.ExtendMode_allTargets_allTargets = new A.ExtendMode("allTargets", "allTargets"); - B.ExtendMode_allTargets_allTargets0 = new A.ExtendMode0("allTargets", "allTargets"); - B.ExtendMode_normal_normal = new A.ExtendMode("normal", "normal"); - B.ExtendMode_normal_normal0 = new A.ExtendMode0("normal", "normal"); - B.ExtendMode_replace_replace = new A.ExtendMode("replace", "replace"); - B.ExtendMode_replace_replace0 = new A.ExtendMode0("replace", "replace"); - B.ColorChannel_hue_true_deg = new A.ColorChannel("hue", true, "deg"); - B.LinearChannel_Bq6 = new A.LinearChannel(0, 100, true, true, false, "saturation", false, "%"); - B.LinearChannel_cKo = new A.LinearChannel(0, 100, true, false, false, "lightness", false, "%"); - B.List_8aB = A._setArrayType(makeConstList([B.ColorChannel_hue_true_deg, B.LinearChannel_Bq6, B.LinearChannel_cKo]), type$.JSArray_ColorChannel); - B.HslColorSpace_gsm = new A.HslColorSpace("hsl", B.List_8aB); - B.ColorChannel_hue_true_deg0 = new A.ColorChannel0("hue", true, "deg"); - B.LinearChannel_Bq60 = new A.LinearChannel0(0, 100, true, true, false, "saturation", false, "%"); - B.LinearChannel_cKo0 = new A.LinearChannel0(0, 100, true, false, false, "lightness", false, "%"); - B.List_8aB0 = A._setArrayType(makeConstList([B.ColorChannel_hue_true_deg0, B.LinearChannel_Bq60, B.LinearChannel_cKo0]), type$.JSArray_ColorChannel_2); - B.HslColorSpace_gsm0 = new A.HslColorSpace0("hsl", B.List_8aB0); - B.HueInterpolationMethod_0 = new A.HueInterpolationMethod("shorter"); - B.HueInterpolationMethod_00 = new A.HueInterpolationMethod0("shorter"); - B.HueInterpolationMethod_1 = new A.HueInterpolationMethod("longer"); - B.HueInterpolationMethod_10 = new A.HueInterpolationMethod0("longer"); - B.HueInterpolationMethod_2 = new A.HueInterpolationMethod("increasing"); - B.HueInterpolationMethod_20 = new A.HueInterpolationMethod0("increasing"); - B.HueInterpolationMethod_3 = new A.HueInterpolationMethod("decreasing"); - B.HueInterpolationMethod_30 = new A.HueInterpolationMethod0("decreasing"); - B.LinearChannel_A0x = new A.LinearChannel(0, 100, true, false, false, "whiteness", false, "%"); - B.LinearChannel_SYB = new A.LinearChannel(0, 100, true, false, false, "blackness", false, "%"); - B.List_gc6 = A._setArrayType(makeConstList([B.ColorChannel_hue_true_deg, B.LinearChannel_A0x, B.LinearChannel_SYB]), type$.JSArray_ColorChannel); - B.HwbColorSpace_06z = new A.HwbColorSpace("hwb", B.List_gc6); - B.LinearChannel_A0x0 = new A.LinearChannel0(0, 100, true, false, false, "whiteness", false, "%"); - B.LinearChannel_SYB0 = new A.LinearChannel0(0, 100, true, false, false, "blackness", false, "%"); - B.List_gc60 = A._setArrayType(makeConstList([B.ColorChannel_hue_true_deg0, B.LinearChannel_A0x0, B.LinearChannel_SYB0]), type$.JSArray_ColorChannel_2); - B.HwbColorSpace_06z0 = new A.HwbColorSpace0("hwb", B.List_gc60); - B.JsonDecoder_null = new A.JsonDecoder(null); - B.JsonEncoder_null = new A.JsonEncoder(null); - B.LinearChannel_cKo1 = new A.LinearChannel(0, 100, false, true, true, "lightness", false, "%"); - B.LinearChannel_EgN = new A.LinearChannel(-125, 125, false, false, false, "a", false, null); - B.LinearChannel_WFl = new A.LinearChannel(-125, 125, false, false, false, "b", false, null); - B.List_gT2 = A._setArrayType(makeConstList([B.LinearChannel_cKo1, B.LinearChannel_EgN, B.LinearChannel_WFl]), type$.JSArray_ColorChannel); - B.LabColorSpace_IF2 = new A.LabColorSpace("lab", B.List_gT2); - B.LinearChannel_cKo2 = new A.LinearChannel0(0, 100, false, true, true, "lightness", false, "%"); - B.LinearChannel_EgN0 = new A.LinearChannel0(-125, 125, false, false, false, "a", false, null); - B.LinearChannel_WFl0 = new A.LinearChannel0(-125, 125, false, false, false, "b", false, null); - B.List_gT20 = A._setArrayType(makeConstList([B.LinearChannel_cKo2, B.LinearChannel_EgN0, B.LinearChannel_WFl0]), type$.JSArray_ColorChannel_2); - B.LabColorSpace_IF20 = new A.LabColorSpace0("lab", B.List_gT20); - B.LinearChannel_a4O = new A.LinearChannel(0, 150, false, true, false, "chroma", false, null); - B.List_i7B = A._setArrayType(makeConstList([B.LinearChannel_cKo1, B.LinearChannel_a4O, B.ColorChannel_hue_true_deg]), type$.JSArray_ColorChannel); - B.LchColorSpace_wv8 = new A.LchColorSpace("lch", B.List_i7B); - B.LinearChannel_a4O0 = new A.LinearChannel0(0, 150, false, true, false, "chroma", false, null); - B.List_i7B0 = A._setArrayType(makeConstList([B.LinearChannel_cKo2, B.LinearChannel_a4O0, B.ColorChannel_hue_true_deg0]), type$.JSArray_ColorChannel_2); - B.LchColorSpace_wv80 = new A.LchColorSpace0("lch", B.List_i7B0); - B.LineFeed_75j = new A.LineFeed0("lfcr", "\n\r", "lfcr"); - B.LineFeed_89t = new A.LineFeed0("cr", "\r", "cr"); - B.LineFeed_A4L = new A.LineFeed0("crlf", "\r\n", "crlf"); - B.LineFeed_LvD = new A.LineFeed0("lf", "\n", "lf"); - B.LineFeed_lf = new A.LineFeed("lf"); - B.LinearChannel_Npb = new A.LinearChannel(0, 255, false, true, true, "blue", false, null); - B.LinearChannel_Npb0 = new A.LinearChannel0(0, 255, false, true, true, "blue", false, null); - B.LinearChannel_bdu = new A.LinearChannel(0, 255, false, true, true, "red", false, null); - B.LinearChannel_bdu0 = new A.LinearChannel0(0, 255, false, true, true, "red", false, null); - B.LinearChannel_kUZ = new A.LinearChannel(0, 255, false, true, true, "green", false, null); - B.LinearChannel_kUZ0 = new A.LinearChannel0(0, 255, false, true, true, "green", false, null); - B.LinearChannel_omH = new A.LinearChannel(0, 1, false, false, false, "alpha", false, null); - B.LinearChannel_omH0 = new A.LinearChannel0(0, 1, false, false, false, "alpha", false, null); - B.ListSeparator_ECn = new A.ListSeparator("comma", ",", "comma"); - B.ListSeparator_ECn0 = new A.ListSeparator0("comma", ",", "comma"); - B.ListSeparator_cQA = new A.ListSeparator("slash", "/", "slash"); - B.ListSeparator_cQA0 = new A.ListSeparator0("slash", "/", "slash"); - B.ListSeparator_nbm = new A.ListSeparator("space", " ", "space"); - B.ListSeparator_nbm0 = new A.ListSeparator0("space", " ", "space"); - B.ListSeparator_undecided_null_undecided = new A.ListSeparator("undecided", null, "undecided"); - B.ListSeparator_undecided_null_undecided0 = new A.ListSeparator0("undecided", null, "undecided"); - B.List_23h = A._setArrayType(makeConstList([B.HueInterpolationMethod_00, B.HueInterpolationMethod_10, B.HueInterpolationMethod_20, B.HueInterpolationMethod_30]), A.findType("JSArray")); - B.List_2jN = A._setArrayType(makeConstList([0, 0, 32722, 12287, 65534, 34815, 65534, 18431]), type$.JSArray_int); - B.List_31K = A._setArrayType(makeConstList([B.Deprecation_U43, B.Deprecation_YKG, B.Deprecation_Ctw, B.Deprecation_fXI, B.Deprecation_MT8, B.Deprecation_4QP, B.Deprecation_q39, B.Deprecation_bh9, B.Deprecation_UW2, B.Deprecation_jV0, B.Deprecation_VqL, B.Deprecation_mBb, B.Deprecation_qgq, B.Deprecation_cI8, B.Deprecation_omC, B.Deprecation_VIq, B.Deprecation_QAx, B.Deprecation_FIw, B.Deprecation_rb9, B.Deprecation_2No, B.Deprecation_A0i, B.Deprecation_Q5r, B.Deprecation_JeE, B.Deprecation_ErI]), A.findType("JSArray")); - B.List_42A = A._setArrayType(makeConstList([0, 0, 65490, 45055, 65535, 34815, 65534, 18431]), type$.JSArray_int); - B.List_4AN = A._setArrayType(makeConstList([0, 0, 32754, 11263, 65534, 34815, 65534, 18431]), type$.JSArray_int); - B.Object_79D = {em: 0, rem: 1, ex: 2, rex: 3, cap: 4, rcap: 5, ch: 6, rch: 7, ic: 8, ric: 9, lh: 10, rlh: 11, vw: 12, lvw: 13, svw: 14, dvw: 15, vh: 16, lvh: 17, svh: 18, dvh: 19, vi: 20, lvi: 21, svi: 22, dvi: 23, vb: 24, lvb: 25, svb: 26, dvb: 27, vmin: 28, lvmin: 29, svmin: 30, dvmin: 31, vmax: 32, lvmax: 33, svmax: 34, dvmax: 35, cqw: 36, cqh: 37, cqi: 38, cqb: 39, cqmin: 40, cqmax: 41, cm: 42, mm: 43, q: 44, in: 45, pt: 46, pc: 47, px: 48}; - B.Set_ot1A = new A.ConstantStringSet(B.Object_79D, 49, type$.ConstantStringSet_String); - B.Object_Yf3 = {deg: 0, grad: 1, rad: 2, turn: 3}; - B.Set_YZQG9 = new A.ConstantStringSet(B.Object_Yf3, 4, type$.ConstantStringSet_String); - B.Object_s_0_ms_1 = {s: 0, ms: 1}; - B.Set_wEo81 = new A.ConstantStringSet(B.Object_s_0_ms_1, 2, type$.ConstantStringSet_String); - B.Object_hz_0_khz_1 = {hz: 0, khz: 1}; - B.Set_y00Wb = new A.ConstantStringSet(B.Object_hz_0_khz_1, 2, type$.ConstantStringSet_String); - B.Object_3CF = {dpi: 0, dpcm: 1, dppx: 2}; - B.Set_Db0y4 = new A.ConstantStringSet(B.Object_3CF, 3, type$.ConstantStringSet_String); - B.List_Eeh = A._setArrayType(makeConstList([B.Set_ot1A, B.Set_YZQG9, B.Set_wEo81, B.Set_y00Wb, B.Set_Db0y4]), A.findType("JSArray>")); - B.List_GVy = A._setArrayType(makeConstList([0, 0, 26624, 1023, 65534, 2047, 65534, 2047]), type$.JSArray_int); - B.Deprecation_0Tm = new A.Deprecation("null-alpha", "1.62.3", "nullAlpha"); - B.Deprecation_izR0 = new A.Deprecation("color-4-api", "1.79.0", "color4Api"); - B.Deprecation_wa9 = new A.Deprecation("legacy-js-api", "1.79.0", "legacyJsApi"); - B.Deprecation_uOS = new A.Deprecation("calc-interp", null, "calcInterp"); - B.List_Hx4 = A._setArrayType(makeConstList([B.Deprecation_6v8, B.Deprecation_Aec, B.Deprecation_T5f, B.Deprecation_INA, B.Deprecation_KIf, B.Deprecation_ePO, B.Deprecation_mRl, B.Deprecation_C9i, B.Deprecation_2My, B.Deprecation_int, B.Deprecation_YUI, B.Deprecation_0Tm, B.Deprecation_Zk6, B.Deprecation_vct, B.Deprecation_0, B.Deprecation_u1l, B.Deprecation_Vr4, B.Deprecation_izR0, B.Deprecation_izR, B.Deprecation_wa9, B.Deprecation_MYu, B.Deprecation_0Gh, B.Deprecation_W1R, B.Deprecation_uOS]), A.findType("JSArray")); - B.List_M2I0 = A._setArrayType(makeConstList([0, 0, 32722, 12287, 65535, 34815, 65534, 18431]), type$.JSArray_int); - B.List_M2I = A._setArrayType(makeConstList([0, 0, 65490, 12287, 65535, 34815, 65534, 18431]), type$.JSArray_int); - B.List_VOY = A._setArrayType(makeConstList([0, 0, 32776, 33792, 1, 10240, 0, 0]), type$.JSArray_int); - B.List_empty12 = A._setArrayType(makeConstList([]), type$.JSArray_Argument); - B.List_empty24 = A._setArrayType(makeConstList([]), type$.JSArray_Argument_2); - B.List_empty26 = A._setArrayType(makeConstList([]), type$.JSArray_AsyncCallable_2); - B.List_empty27 = A._setArrayType(makeConstList([]), type$.JSArray_AsyncImporter); - B.List_empty1 = A._setArrayType(makeConstList([]), type$.JSArray_ComplexSelector); - B.List_empty15 = A._setArrayType(makeConstList([]), type$.JSArray_ComplexSelector_2); - B.List_empty2 = A._setArrayType(makeConstList([]), type$.JSArray_ComplexSelectorComponent); - B.List_empty16 = A._setArrayType(makeConstList([]), type$.JSArray_ComplexSelectorComponent_2); - B.List_empty10 = A._setArrayType(makeConstList([]), type$.JSArray_ConfiguredVariable); - B.List_empty22 = A._setArrayType(makeConstList([]), type$.JSArray_ConfiguredVariable_2); - B.List_empty3 = A._setArrayType(makeConstList([]), type$.JSArray_CssNode); - B.List_empty17 = A._setArrayType(makeConstList([]), type$.JSArray_CssNode_2); - B.List_empty11 = A._setArrayType(makeConstList([]), type$.JSArray_CssStyleRule); - B.List_empty23 = A._setArrayType(makeConstList([]), type$.JSArray_CssStyleRule_2); - B.List_empty0 = A._setArrayType(makeConstList([]), type$.JSArray_CssValue_Combinator); - B.List_empty14 = A._setArrayType(makeConstList([]), type$.JSArray_CssValue_Combinator_2); - B.List_empty9 = A._setArrayType(makeConstList([]), type$.JSArray_Expression); - B.List_empty21 = A._setArrayType(makeConstList([]), type$.JSArray_Expression_2); - B.List_empty5 = A._setArrayType(makeConstList([]), type$.JSArray_Extension); - B.List_empty18 = A._setArrayType(makeConstList([]), type$.JSArray_Extension_2); - B.List_empty25 = A._setArrayType(makeConstList([]), type$.JSArray_Importer_2); - B.List_empty7 = A._setArrayType(makeConstList([]), A.findType("JSArray>")); - B.List_empty19 = A._setArrayType(makeConstList([]), A.findType("JSArray>")); - B.List_empty28 = A._setArrayType(makeConstList([]), type$.JSArray_Object); - B.List_empty13 = A._setArrayType(makeConstList([]), type$.JSArray_Statement); - B.List_empty = A._setArrayType(makeConstList([]), type$.JSArray_String); - B.List_empty8 = A._setArrayType(makeConstList([]), type$.JSArray_Value); - B.List_empty20 = A._setArrayType(makeConstList([]), type$.JSArray_Value_2); - B.List_empty4 = A._setArrayType(makeConstList([]), type$.JSArray_int); - B.List_empty6 = A._setArrayType(makeConstList([]), type$.JSArray_dynamic); - B.List_empty29 = A._setArrayType(makeConstList([]), type$.JSArray_nullable_FileSpan); - B.List_kUZ = A._setArrayType(makeConstList([B.CalculationOperator_g2q0, B.CalculationOperator_CxF0, B.CalculationOperator_1710, B.CalculationOperator_Qf10]), A.findType("JSArray")); - B.List_null = A._setArrayType(makeConstList([null]), type$.JSArray_nullable_FileSpan); - B.List_oyU = A._setArrayType(makeConstList([0, 0, 27858, 1023, 65534, 51199, 65535, 32767]), type$.JSArray_int); - B.List_piR = A._setArrayType(makeConstList([0, 0, 24576, 1023, 65534, 34815, 65534, 18431]), type$.JSArray_int); - B.LinearChannel_WRn = new A.LinearChannel(0, 1, false, false, false, "long", false, null); - B.LinearChannel_AKA = new A.LinearChannel(0, 1, false, false, false, "medium", false, null); - B.LinearChannel_Kdl = new A.LinearChannel(0, 1, false, false, false, "short", false, null); - B.List_Na9 = A._setArrayType(makeConstList([B.LinearChannel_WRn, B.LinearChannel_AKA, B.LinearChannel_Kdl]), type$.JSArray_ColorChannel); - B.LmsColorSpace_8I8 = new A.LmsColorSpace("lms", B.List_Na9); - B.LinearChannel_WRn0 = new A.LinearChannel0(0, 1, false, false, false, "long", false, null); - B.LinearChannel_AKA0 = new A.LinearChannel0(0, 1, false, false, false, "medium", false, null); - B.LinearChannel_Kdl0 = new A.LinearChannel0(0, 1, false, false, false, "short", false, null); - B.List_Na90 = A._setArrayType(makeConstList([B.LinearChannel_WRn0, B.LinearChannel_AKA0, B.LinearChannel_Kdl0]), type$.JSArray_ColorChannel_2); - B.LmsColorSpace_8I80 = new A.LmsColorSpace0("lms", B.List_Na90); - B.LocalMindeGamutMap_Q7f = new A.LocalMindeGamutMap("local-minde"); - B.LocalMindeGamutMap_Q7f0 = new A.LocalMindeGamutMap0("local-minde"); - B.Object_Jgz = {length: 0, angle: 1, time: 2, frequency: 3, "pixel density": 4}; - B.List_Mul = A._setArrayType(makeConstList(["in", "cm", "pc", "mm", "q", "pt", "px"]), type$.JSArray_String); - B.List_deg_grad_rad_turn = A._setArrayType(makeConstList(["deg", "grad", "rad", "turn"]), type$.JSArray_String); - B.List_s_ms = A._setArrayType(makeConstList(["s", "ms"]), type$.JSArray_String); - B.List_Hz_kHz = A._setArrayType(makeConstList(["Hz", "kHz"]), type$.JSArray_String); - B.List_dpi_dpcm_dppx = A._setArrayType(makeConstList(["dpi", "dpcm", "dppx"]), type$.JSArray_String); - B.Map_397RH = new A.ConstantStringMap(B.Object_Jgz, [B.List_Mul, B.List_deg_grad_rad_turn, B.List_s_ms, B.List_Hz_kHz, B.List_dpi_dpcm_dppx], A.findType("ConstantStringMap>")); - B.Map_empty8 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); - B.Map_empty0 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); - B.Map_empty2 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); - B.Map_empty16 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); - B.Map_empty10 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); - B.Map_empty12 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); - B.Map_empty4 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.Map_empty13 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.Map_empty5 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.Map_empty14 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.Map_empty7 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.Map_empty9 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); - B.Map_empty1 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); - B.Map_empty17 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); - B.Map_empty11 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); - B.Map_empty6 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.Map_empty15 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.Map_empty3 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.Map_empty = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.Object_AiQ = {in: 0, cm: 1, pc: 2, mm: 3, q: 4, pt: 5, px: 6, deg: 7, grad: 8, rad: 9, turn: 10, s: 11, ms: 12, Hz: 13, kHz: 14, dpi: 15, dpcm: 16, dppx: 17}; - B.Object_Uy1 = {in: 0, cm: 1, pc: 2, mm: 3, q: 4, pt: 5, px: 6}; - B.Map_MuACk = new A.ConstantStringMap(B.Object_Uy1, [1, 0.39370078740157477, 0.16666666666666666, 0.03937007874015748, 0.00984251968503937, 0.013888888888888888, 0.010416666666666666], type$.ConstantStringMap_String_double); - B.Map_MuHeh = new A.ConstantStringMap(B.Object_Uy1, [2.54, 1, 0.42333333333333334, 0.1, 0.025, 0.035277777777777776, 0.026458333333333334], type$.ConstantStringMap_String_double); - B.Map_Mudgs = new A.ConstantStringMap(B.Object_Uy1, [6, 2.3622047244094486, 1, 0.2362204724409449, 0.05905511811023623, 0.08333333333333333, 0.0625], type$.ConstantStringMap_String_double); - B.Map_Mu8oi = new A.ConstantStringMap(B.Object_Uy1, [25.4, 10, 4.233333333333333, 1, 0.25, 0.35277777777777775, 0.26458333333333334], type$.ConstantStringMap_String_double); - B.Map_MusBb = new A.ConstantStringMap(B.Object_Uy1, [101.6, 40, 16.933333333333334, 4, 1, 1.411111111111111, 1.0583333333333333], type$.ConstantStringMap_String_double); - B.Map_MuX5a = new A.ConstantStringMap(B.Object_Uy1, [72, 28.346456692913385, 12, 2.834645669291339, 0.7086614173228347, 1, 0.75], type$.ConstantStringMap_String_double); - B.Map_MuVWp = new A.ConstantStringMap(B.Object_Uy1, [96, 37.79527559055118, 16, 3.7795275590551185, 0.9448818897637796, 1.3333333333333333, 1], type$.ConstantStringMap_String_double); - B.Map_P98ha = new A.ConstantStringMap(B.Object_Yf3, [1, 0.9, 57.29577951308232, 360], type$.ConstantStringMap_String_double); - B.Map_P9IYz = new A.ConstantStringMap(B.Object_Yf3, [1.1111111111111112, 1, 63.66197723675813, 400], type$.ConstantStringMap_String_double); - B.Map_P9t42 = new A.ConstantStringMap(B.Object_Yf3, [0.017453292519943295, 0.015707963267948967, 1, 6.283185307179586], type$.ConstantStringMap_String_double); - B.Map_P9ZUB = new A.ConstantStringMap(B.Object_Yf3, [0.002777777777777778, 0.0025, 0.15915494309189535, 1], type$.ConstantStringMap_String_double); - B.Map_kUCK0 = new A.ConstantStringMap(B.Object_s_0_ms_1, [1, 0.001], type$.ConstantStringMap_String_double); - B.Map_kUfVB = new A.ConstantStringMap(B.Object_s_0_ms_1, [1000, 1], type$.ConstantStringMap_String_double); - B.Object_Hz_0_kHz_1 = {Hz: 0, kHz: 1}; - B.Map_WfkC8 = new A.ConstantStringMap(B.Object_Hz_0_kHz_1, [1, 1000], type$.ConstantStringMap_String_double); - B.Map_Wfs7p = new A.ConstantStringMap(B.Object_Hz_0_kHz_1, [0.001, 1], type$.ConstantStringMap_String_double); - B.Map_dgy9B = new A.ConstantStringMap(B.Object_3CF, [1, 2.54, 96], type$.ConstantStringMap_String_double); - B.Map_dgLkt = new A.ConstantStringMap(B.Object_3CF, [0.39370078740157477, 1, 37.79527559055118], type$.ConstantStringMap_String_double); - B.Map_dgw3K = new A.ConstantStringMap(B.Object_3CF, [0.010416666666666666, 0.026458333333333334, 1], type$.ConstantStringMap_String_double); - B.Map_gQqJO = new A.ConstantStringMap(B.Object_AiQ, [B.Map_MuACk, B.Map_MuHeh, B.Map_Mudgs, B.Map_Mu8oi, B.Map_MusBb, B.Map_MuX5a, B.Map_MuVWp, B.Map_P98ha, B.Map_P9IYz, B.Map_P9t42, B.Map_P9ZUB, B.Map_kUCK0, B.Map_kUfVB, B.Map_WfkC8, B.Map_Wfs7p, B.Map_dgy9B, B.Map_dgLkt, B.Map_dgw3K], A.findType("ConstantStringMap>")); - B.LinearChannel_cKo3 = new A.LinearChannel(0, 1, false, true, true, "lightness", false, "%"); - B.LinearChannel_6h9 = new A.LinearChannel(-0.4, 0.4, false, false, false, "a", false, null); - B.LinearChannel_kOG = new A.LinearChannel(-0.4, 0.4, false, false, false, "b", false, null); - B.List_9dS = A._setArrayType(makeConstList([B.LinearChannel_cKo3, B.LinearChannel_6h9, B.LinearChannel_kOG]), type$.JSArray_ColorChannel); - B.OklabColorSpace_yrt = new A.OklabColorSpace("oklab", B.List_9dS); - B.LinearChannel_cKo4 = new A.LinearChannel0(0, 1, false, true, true, "lightness", false, "%"); - B.LinearChannel_6h90 = new A.LinearChannel0(-0.4, 0.4, false, false, false, "a", false, null); - B.LinearChannel_kOG0 = new A.LinearChannel0(-0.4, 0.4, false, false, false, "b", false, null); - B.List_9dS0 = A._setArrayType(makeConstList([B.LinearChannel_cKo4, B.LinearChannel_6h90, B.LinearChannel_kOG0]), type$.JSArray_ColorChannel_2); - B.OklabColorSpace_yrt0 = new A.OklabColorSpace0("oklab", B.List_9dS0); - B.LinearChannel_kmC = new A.LinearChannel(0, 0.4, false, true, false, "chroma", false, null); - B.List_e5Y = A._setArrayType(makeConstList([B.LinearChannel_cKo3, B.LinearChannel_kmC, B.ColorChannel_hue_true_deg]), type$.JSArray_ColorChannel); - B.OklchColorSpace_li8 = new A.OklchColorSpace("oklch", B.List_e5Y); - B.LinearChannel_kmC0 = new A.LinearChannel0(0, 0.4, false, true, false, "chroma", false, null); - B.List_e5Y0 = A._setArrayType(makeConstList([B.LinearChannel_cKo4, B.LinearChannel_kmC0, B.ColorChannel_hue_true_deg0]), type$.JSArray_ColorChannel_2); - B.OklchColorSpace_li80 = new A.OklchColorSpace0("oklch", B.List_e5Y0); - B.OptionType_I6i = new A.OptionType("OptionType.flag"); - B.OptionType_tew = new A.OptionType("OptionType.single"); - B.OptionType_yPm = new A.OptionType("OptionType.multiple"); - B.OutputStyle_0 = new A.OutputStyle("expanded"); - B.OutputStyle_00 = new A.OutputStyle0("expanded"); - B.OutputStyle_1 = new A.OutputStyle("compressed"); - B.OutputStyle_10 = new A.OutputStyle0("compressed"); - B.ProphotoRgbColorSpace_KiG = new A.ProphotoRgbColorSpace("prophoto-rgb", B.List_V3K); - B.ProphotoRgbColorSpace_KiG0 = new A.ProphotoRgbColorSpace0("prophoto-rgb", B.List_V3K0); - B.Rec2020ColorSpace_2jN = new A.Rec2020ColorSpace("rec2020", B.List_V3K); - B.Rec2020ColorSpace_2jN0 = new A.Rec2020ColorSpace0("rec2020", B.List_V3K0); - B.Map_empty20 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); - B.Record2_EmptyExtensionStore_Map_empty = new A._Record_2(B.C_EmptyExtensionStore, B.Map_empty20); - B.Map_empty21 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); - B.Record2_EmptyExtensionStore_Map_empty0 = new A._Record_2(B.C_EmptyExtensionStore0, B.Map_empty21); - B.List_wEo = A._setArrayType(makeConstList([B.LinearChannel_bdu, B.LinearChannel_kUZ, B.LinearChannel_Npb]), type$.JSArray_ColorChannel); - B.RgbColorSpace_mlz = new A.RgbColorSpace("rgb", B.List_wEo); - B.List_wEo0 = A._setArrayType(makeConstList([B.LinearChannel_bdu0, B.LinearChannel_kUZ0, B.LinearChannel_Npb0]), type$.JSArray_ColorChannel_2); - B.RgbColorSpace_mlz0 = new A.RgbColorSpace0("rgb", B.List_wEo0); - B.SassBoolean_false = new A.SassBoolean(false); - B.SassBoolean_false0 = new A.SassBoolean0(false); - B.SassBoolean_true = new A.SassBoolean(true); - B.SassBoolean_true0 = new A.SassBoolean0(true); - B.SassList_bdS = new A.SassList(B.List_empty8, B.ListSeparator_ECn, false); - B.SassList_bdS0 = new A.SassList(B.List_empty8, B.ListSeparator_ECn, true); - B.SassList_bdS1 = new A.SassList0(B.List_empty20, B.ListSeparator_ECn0, false); - B.SassList_bdS2 = new A.SassList0(B.List_empty20, B.ListSeparator_ECn0, true); - B.SassList_k8F = new A.SassList0(B.List_empty20, B.ListSeparator_undecided_null_undecided0, false); - B.Map_empty22 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.SassMap_Map_empty = new A.SassMap(B.Map_empty22); - B.Map_empty23 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); - B.SassMap_Map_empty0 = new A.SassMap0(B.Map_empty23); - B.Set_0 = new A.GeneralConstantSet([0], A.findType("GeneralConstantSet")); - B.Object_oyn = {".scss": 0, ".sass": 1, ".css": 2}; - B.Set_00 = new A.ConstantStringSet(B.Object_oyn, 3, type$.ConstantStringSet_String); - B.Set_2Dcfy = new A.GeneralConstantSet([B.RgbColorSpace_mlz, B.HslColorSpace_gsm], A.findType("GeneralConstantSet")); - B.Set_2Dcfy0 = new A.GeneralConstantSet([B.RgbColorSpace_mlz0, B.HslColorSpace_gsm0], A.findType("GeneralConstantSet")); - B.Object_6Gw = {sass: 0, style: 1, default: 2}; - B.Set_TnQrk = new A.ConstantStringSet(B.Object_6Gw, 3, type$.ConstantStringSet_String); - B.Set_empty1 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet")); - B.Set_empty5 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet")); - B.Set_empty2 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet>")); - B.Set_empty0 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet>")); - B.Set_empty6 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet>")); - B.Set_empty4 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet>")); - B.Set_empty7 = new A.ConstantStringSet(B.Object_empty, 0, type$.ConstantStringSet_String); - B.Set_empty3 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet")); - B.Set_empty = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet")); - B.Object_q8Y = {is: 0, matches: 1, where: 2}; - B.Set_mlzm2 = new A.ConstantStringSet(B.Object_q8Y, 3, type$.ConstantStringSet_String); - B.Set_mqKz = new A.GeneralConstantSet([B.BinaryOperator_2No, B.BinaryOperator_U77, B.BinaryOperator_u15, B.BinaryOperator_SjO], A.findType("GeneralConstantSet")); - B.Set_mqKz0 = new A.GeneralConstantSet([B.BinaryOperator_2No0, B.BinaryOperator_U770, B.BinaryOperator_u150, B.BinaryOperator_SjO0], A.findType("GeneralConstantSet")); - B.Object_GUq = {calc: 0, clamp: 1, hypot: 2, sin: 3, cos: 4, tan: 5, asin: 6, acos: 7, atan: 8, sqrt: 9, exp: 10, sign: 11, mod: 12, rem: 13, atan2: 14, pow: 15, log: 16}; - B.Set_yHF81 = new A.ConstantStringSet(B.Object_GUq, 17, type$.ConstantStringSet_String); - B.SrgbColorSpace_AD4 = new A.SrgbColorSpace("srgb", B.List_V3K); - B.SrgbColorSpace_AD40 = new A.SrgbColorSpace0("srgb", B.List_V3K0); - B.SrgbLinearColorSpace_sEs = new A.SrgbLinearColorSpace("srgb-linear", B.List_V3K); - B.SrgbLinearColorSpace_sEs0 = new A.SrgbLinearColorSpace0("srgb-linear", B.List_V3K0); - B.StderrLogger_false = new A.StderrLogger(false); - B.StderrLogger_false0 = new A.StderrLogger0(false); - B.Symbol__canonicalizeContext = new A.Symbol("_canonicalizeContext"); - B.Symbol__evaluationContext = new A.Symbol("_evaluationContext"); - B.Symbol__extensions = new A.Symbol("_extensions"); - B.Symbol__sourceSpecificity = new A.Symbol("_sourceSpecificity"); - B.Symbol_call = new A.Symbol("call"); - B.Syntax_CSS_css = new A.Syntax("CSS", "css"); - B.Syntax_CSS_css0 = new A.Syntax0("CSS", "css"); - B.Syntax_SCSS_scss = new A.Syntax("SCSS", "scss"); - B.Syntax_SCSS_scss0 = new A.Syntax0("SCSS", "scss"); - B.Syntax_Sass_sass = new A.Syntax("Sass", "sass"); - B.Syntax_Sass_sass0 = new A.Syntax0("Sass", "sass"); - B.Type_ByteBuffer_EOZ = A.typeLiteral("ByteBuffer"); - B.Type_ByteData_mF8 = A.typeLiteral("ByteData"); - B.Type_Float32List_Ymk = A.typeLiteral("Float32List"); - B.Type_Float64List_Ymk = A.typeLiteral("Float64List"); - B.Type_Int16List_cot = A.typeLiteral("Int16List"); - B.Type_Int32List_m1p = A.typeLiteral("Int32List"); - B.Type_Int8List_woc = A.typeLiteral("Int8List"); - B.Type_Object_QJv = A.typeLiteral("Object"); - B.Type_Uint16List_2mh = A.typeLiteral("Uint16List"); - B.Type_Uint32List_2mh = A.typeLiteral("Uint32List"); - B.Type_Uint8ClampedList_9Bb = A.typeLiteral("Uint8ClampedList"); - B.Type_Uint8List_CSc = A.typeLiteral("Uint8List"); - B.UnaryOperator_AiQ = new A.UnaryOperator("minus", "-", "minus"); - B.UnaryOperator_AiQ0 = new A.UnaryOperator0("minus", "-", "minus"); - B.UnaryOperator_SJr = new A.UnaryOperator("divide", "/", "divide"); - B.UnaryOperator_SJr0 = new A.UnaryOperator0("divide", "/", "divide"); - B.UnaryOperator_cLp = new A.UnaryOperator("plus", "+", "plus"); - B.UnaryOperator_cLp0 = new A.UnaryOperator0("plus", "+", "plus"); - B.UnaryOperator_not_not_not = new A.UnaryOperator("not", "not", "not"); - B.UnaryOperator_not_not_not0 = new A.UnaryOperator0("not", "not", "not"); - B.Utf8Decoder_false = new A.Utf8Decoder(false); - B.LinearChannel_qJx = new A.LinearChannel(0, 1, false, false, false, "x", false, null); - B.LinearChannel_FCG = new A.LinearChannel(0, 1, false, false, false, "y", false, null); - B.LinearChannel_AWj = new A.LinearChannel(0, 1, false, false, false, "z", false, null); - B.List_8eb = A._setArrayType(makeConstList([B.LinearChannel_qJx, B.LinearChannel_FCG, B.LinearChannel_AWj]), type$.JSArray_LinearChannel); - B.XyzD50ColorSpace_2No = new A.XyzD50ColorSpace("xyz-d50", B.List_8eb); - B.LinearChannel_qJx0 = new A.LinearChannel0(0, 1, false, false, false, "x", false, null); - B.LinearChannel_FCG0 = new A.LinearChannel0(0, 1, false, false, false, "y", false, null); - B.LinearChannel_AWj0 = new A.LinearChannel0(0, 1, false, false, false, "z", false, null); - B.List_8eb0 = A._setArrayType(makeConstList([B.LinearChannel_qJx0, B.LinearChannel_FCG0, B.LinearChannel_AWj0]), type$.JSArray_LinearChannel_2); - B.XyzD50ColorSpace_2No0 = new A.XyzD50ColorSpace0("xyz-d50", B.List_8eb0); - B.XyzD65ColorSpace_4CA = new A.XyzD65ColorSpace("xyz", B.List_8eb); - B.XyzD65ColorSpace_4CA0 = new A.XyzD65ColorSpace0("xyz", B.List_8eb0); - B._IsBogusVisitor_false = new A._IsBogusVisitor(false); - B._IsBogusVisitor_false0 = new A._IsBogusVisitor0(false); - B._IsBogusVisitor_true = new A._IsBogusVisitor(true); - B._IsBogusVisitor_true0 = new A._IsBogusVisitor0(true); - B._IsInvisibleVisitor_false = new A._IsInvisibleVisitor0(false); - B._IsInvisibleVisitor_false0 = new A._IsInvisibleVisitor2(false); - B._IsInvisibleVisitor_false_false = new A._IsInvisibleVisitor(false, false); - B._IsInvisibleVisitor_false_false0 = new A._IsInvisibleVisitor1(false, false); - B._IsInvisibleVisitor_true = new A._IsInvisibleVisitor0(true); - B._IsInvisibleVisitor_true0 = new A._IsInvisibleVisitor2(true); - B._IsInvisibleVisitor_true_false = new A._IsInvisibleVisitor(true, false); - B._IsInvisibleVisitor_true_false0 = new A._IsInvisibleVisitor1(true, false); - B._IsInvisibleVisitor_true_true = new A._IsInvisibleVisitor(true, true); - B._IsInvisibleVisitor_true_true0 = new A._IsInvisibleVisitor1(true, true); - B._PathDirection_3KU = new A._PathDirection("above root"); - B._PathDirection_8OV = new A._PathDirection("at root"); - B._PathDirection_e7w = new A._PathDirection("reaches root"); - B._PathDirection_yLX = new A._PathDirection("below root"); - B._PathRelation_different = new A._PathRelation("different"); - B._PathRelation_equal = new A._PathRelation("equal"); - B._PathRelation_inconclusive = new A._PathRelation("inconclusive"); - B._PathRelation_within = new A._PathRelation("within"); - B._SingletonCssMediaQueryMergeResult_0 = new A._SingletonCssMediaQueryMergeResult("empty"); - B._SingletonCssMediaQueryMergeResult_00 = new A._SingletonCssMediaQueryMergeResult0("empty"); - B._SingletonCssMediaQueryMergeResult_1 = new A._SingletonCssMediaQueryMergeResult("unrepresentable"); - B._SingletonCssMediaQueryMergeResult_10 = new A._SingletonCssMediaQueryMergeResult0("unrepresentable"); - B._StreamGroupState_canceled = new A._StreamGroupState("canceled"); - B._StreamGroupState_dormant = new A._StreamGroupState("dormant"); - B._StreamGroupState_listening = new A._StreamGroupState("listening"); - B._StreamGroupState_paused = new A._StreamGroupState("paused"); - B._StringStackTrace_uwd = new A._StringStackTrace(""); - B._ZoneFunction_NIe = new A._ZoneFunction(B.C__RootZone, A.async___rootHandleUncaughtError$closure()); - B._ZoneFunction_QOa = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterUnaryCallback$closure()); - B._ZoneFunction__RootZone__rootCreateTimer = new A._ZoneFunction(B.C__RootZone, A.async___rootCreateTimer$closure()); - B._ZoneFunction__RootZone__rootErrorCallback = new A._ZoneFunction(B.C__RootZone, A.async___rootErrorCallback$closure()); - B._ZoneFunction__RootZone__rootFork = new A._ZoneFunction(B.C__RootZone, A.async___rootFork$closure()); - B._ZoneFunction__RootZone__rootPrint = new A._ZoneFunction(B.C__RootZone, A.async___rootPrint$closure()); - B._ZoneFunction__RootZone__rootRegisterCallback = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterCallback$closure()); - B._ZoneFunction__RootZone__rootRun = new A._ZoneFunction(B.C__RootZone, A.async___rootRun$closure()); - B._ZoneFunction__RootZone__rootRunBinary = new A._ZoneFunction(B.C__RootZone, A.async___rootRunBinary$closure()); - B._ZoneFunction__RootZone__rootRunUnary = new A._ZoneFunction(B.C__RootZone, A.async___rootRunUnary$closure()); - B._ZoneFunction__RootZone__rootScheduleMicrotask = new A._ZoneFunction(B.C__RootZone, A.async___rootScheduleMicrotask$closure()); - B._ZoneFunction_kWM = new A._ZoneFunction(B.C__RootZone, A.async___rootCreatePeriodicTimer$closure()); - B._ZoneFunction_qxw = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterBinaryCallback$closure()); - B._ZoneSpecification_48t = new A._ZoneSpecification(null, null, null, null, null, null, null, null, null, null, null, null, null); - })(); - (function staticFields() { - $._JS_INTEROP_INTERCEPTOR_TAG = null; - $.toStringVisiting = A._setArrayType([], type$.JSArray_Object); - $.printToZone = null; - $.Primitives__identityHashCodeProperty = null; - $.BoundClosure__receiverFieldNameCache = null; - $.BoundClosure__interceptorFieldNameCache = null; - $.getTagFunction = null; - $.alternateTagFunction = null; - $.prototypeForTagFunction = null; - $.dispatchRecordsForInstanceTags = null; - $.interceptorsForUncacheableTags = null; - $.initNativeDispatchFlag = null; - $._Record__computedFieldKeys = A._setArrayType([], A.findType("JSArray?>")); - $._nextCallback = null; - $._lastCallback = null; - $._lastPriorityCallback = null; - $._isInCallbackLoop = false; - $.Zone__current = B.C__RootZone; - $._RootZone__rootDelegate = null; - $.Uri__cachedBaseString = ""; - $.Uri__cachedBaseUri = null; - $._fs = null; - $._currentUriBase = null; - $._current = null; - $._subselectorPseudos = A.LinkedHashSet_LinkedHashSet$_literal(["is", "matches", "where", "any", "nth-child", "nth-last-child"], type$.String); - $._rootishPseudoClasses = A.LinkedHashSet_LinkedHashSet$_literal(["root", "scope", "host", "host-context"], type$.String); - $._features = A.LinkedHashSet_LinkedHashSet$_literal(["global-variable-shadowing", "extend-selector-pseudoclass", "units-level-3", "at-error", "custom-property"], type$.String); - $._realCaseCache = function() { - var t1 = type$.String; - return A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - }(); - $._selectorPseudoClasses = A.LinkedHashSet_LinkedHashSet$_literal(["not", "is", "matches", "where", "current", "any", "has", "host", "host-context"], type$.String); - $._selectorPseudoElements = A.LinkedHashSet_LinkedHashSet$_literal(["slotted"], type$.String); - $._glyphs = B.C_UnicodeGlyphSet; - $._rootishPseudoClasses0 = A.LinkedHashSet_LinkedHashSet$_literal(["root", "scope", "host", "host-context"], type$.String); - $._realCaseCache0 = function() { - var t1 = type$.String; - return A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - }(); - $._features0 = A.LinkedHashSet_LinkedHashSet$_literal(["global-variable-shadowing", "extend-selector-pseudoclass", "units-level-3", "at-error", "custom-property"], type$.String); - $._selectorPseudoClasses0 = A.LinkedHashSet_LinkedHashSet$_literal(["not", "is", "matches", "where", "current", "any", "has", "host", "host-context"], type$.String); - $._selectorPseudoElements0 = A.LinkedHashSet_LinkedHashSet$_literal(["slotted"], type$.String); - $._subselectorPseudos0 = A.LinkedHashSet_LinkedHashSet$_literal(["is", "matches", "where", "any", "nth-child", "nth-last-child"], type$.String); - })(); - (function lazyInitializers() { - var _lazyFinal = hunkHelpers.lazyFinal, - _lazy = hunkHelpers.lazy; - _lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", () => A.getIsolateAffinityTag("_$dart_dartClosure")); - _lazyFinal($, "nullFuture", "$get$nullFuture", () => B.C__RootZone.run$1$1(0, new A.nullFuture_closure(), A.findType("Future"))); - _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({ - toString: function() { - return "$receiver$"; - } - }))); - _lazyFinal($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({$method$: null, - toString: function() { - return "$receiver$"; - } - }))); - _lazyFinal($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn(null))); - _lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", () => A.TypeErrorDecoder_extractPattern(function() { - var $argumentsExpr$ = "$arguments$"; - try { - null.$method$($argumentsExpr$); - } catch (e) { - return e.message; - } - }())); - _lazyFinal($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn(void 0))); - _lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", () => A.TypeErrorDecoder_extractPattern(function() { - var $argumentsExpr$ = "$arguments$"; - try { - (void 0).$method$($argumentsExpr$); - } catch (e) { - return e.message; - } - }())); - _lazyFinal($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokePropertyErrorOn(null))); - _lazyFinal($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", () => A.TypeErrorDecoder_extractPattern(function() { - try { - null.$method$; - } catch (e) { - return e.message; - } - }())); - _lazyFinal($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokePropertyErrorOn(void 0))); - _lazyFinal($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", () => A.TypeErrorDecoder_extractPattern(function() { - try { - (void 0).$method$; - } catch (e) { - return e.message; - } - }())); - _lazyFinal($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", () => A._AsyncRun__initializeScheduleImmediate()); - _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", () => A.findType("_Future")._as($.$get$nullFuture())); - _lazyFinal($, "Future__falseFuture", "$get$Future__falseFuture", () => A._Future$zoneValue(false, B.C__RootZone, type$.bool)); - _lazyFinal($, "_RootZone__rootMap", "$get$_RootZone__rootMap", () => { - var t1 = type$.dynamic; - return A.HashMap_HashMap(t1, t1); - }); - _lazyFinal($, "_Utf8Decoder__reusableBuffer", "$get$_Utf8Decoder__reusableBuffer", () => A.NativeUint8List_NativeUint8List(4096)); - _lazyFinal($, "_Utf8Decoder__decoder", "$get$_Utf8Decoder__decoder", () => new A._Utf8Decoder__decoder_closure().call$0()); - _lazyFinal($, "_Utf8Decoder__decoderNonfatal", "$get$_Utf8Decoder__decoderNonfatal", () => new A._Utf8Decoder__decoderNonfatal_closure().call$0()); - _lazyFinal($, "_Base64Decoder__inverseAlphabet", "$get$_Base64Decoder__inverseAlphabet", () => A.NativeInt8List__create1(A._ensureNativeList(A._setArrayType([-2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2, 62, -2, 62, -2, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -2, -2, -2, -1, -2, -2, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -2, -2, -2, -2, 63, -2, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -2, -2, -2, -2, -2], type$.JSArray_int)))); - _lazyFinal($, "_Uri__isWindowsCached", "$get$_Uri__isWindowsCached", () => { - var t1 = typeof process != "undefined" && Object.prototype.toString.call(process) == "[object process]" && process.platform == "win32"; - return t1; - }); - _lazyFinal($, "_Uri__needsNoEncoding", "$get$_Uri__needsNoEncoding", () => A.RegExp_RegExp("^[\\-\\.0-9A-Z_a-z~]*$", false)); - _lazyFinal($, "_hashSeed", "$get$_hashSeed", () => A.objectHashCode(B.Type_Object_QJv)); - _lazyFinal($, "_scannerTables", "$get$_scannerTables", () => A._createTables()); - _lazyFinal($, "Option__invalidChars", "$get$Option__invalidChars", () => A.RegExp_RegExp("[ \\t\\r\\n\"'\\\\/]", false)); - _lazyFinal($, "_isStrictMode", "$get$_isStrictMode", () => new A._isStrictMode_closure().call$0()); - _lazyFinal($, "alwaysValid", "$get$alwaysValid", () => new A.alwaysValid_closure()); - _lazyFinal($, "readline", "$get$readline", () => self.readline); - _lazyFinal($, "windows", "$get$windows", () => A.Context_Context($.$get$Style_windows())); - _lazyFinal($, "url", "$get$url", () => A.Context_Context($.$get$Style_url())); - _lazyFinal($, "context", "$get$context", () => new A.Context($.$get$Style_platform(), null)); - _lazyFinal($, "Style_posix", "$get$Style_posix", () => new A.PosixStyle(A.RegExp_RegExp("/", false), A.RegExp_RegExp("[^/]$", false), A.RegExp_RegExp("^/", false))); - _lazyFinal($, "Style_windows", "$get$Style_windows", () => new A.WindowsStyle(A.RegExp_RegExp("[/\\\\]", false), A.RegExp_RegExp("[^/\\\\]$", false), A.RegExp_RegExp("^(\\\\\\\\[^\\\\]+\\\\[^\\\\/]+|[a-zA-Z]:[/\\\\])", false), A.RegExp_RegExp("^[/\\\\](?![/\\\\])", false))); - _lazyFinal($, "Style_url", "$get$Style_url", () => new A.UrlStyle(A.RegExp_RegExp("/", false), A.RegExp_RegExp("(^[a-zA-Z][-+.a-zA-Z\\d]*://|[^/])$", false), A.RegExp_RegExp("[a-zA-Z][-+.a-zA-Z\\d]*://[^/]*", false), A.RegExp_RegExp("^/", false))); - _lazyFinal($, "Style_platform", "$get$Style_platform", () => A.Style__getPlatformStyle()); - _lazyFinal($, "startVersion", "$get$startVersion", () => A.RegExp_RegExp("^(\\d+)\\.(\\d+)\\.(\\d+)(-([0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*))?(\\+([0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*))?", false)); - _lazyFinal($, "completeVersion", "$get$completeVersion", () => A.RegExp_RegExp($.$get$startVersion().pattern + "$", false)); - _lazyFinal($, "IfExpression_declaration", "$get$IfExpression_declaration", () => A.ArgumentDeclaration_ArgumentDeclaration$parse(string$.x40funct, null)); - _lazyFinal($, "colorsByName", "$get$colorsByName", () => A.LinkedHashMap_LinkedHashMap$_literal(["yellowgreen", A.SassColor_SassColor$rgb(154, 205, 50, 1), "yellow", A.SassColor_SassColor$rgb(255, 255, 0, 1), "whitesmoke", A.SassColor_SassColor$rgb(245, 245, 245, 1), "white", A.SassColor_SassColor$rgb(255, 255, 255, 1), "wheat", A.SassColor_SassColor$rgb(245, 222, 179, 1), "violet", A.SassColor_SassColor$rgb(238, 130, 238, 1), "turquoise", A.SassColor_SassColor$rgb(64, 224, 208, 1), "transparent", A.SassColor_SassColor$rgb(0, 0, 0, 0), "tomato", A.SassColor_SassColor$rgb(255, 99, 71, 1), "thistle", A.SassColor_SassColor$rgb(216, 191, 216, 1), "teal", A.SassColor_SassColor$rgb(0, 128, 128, 1), "tan", A.SassColor_SassColor$rgb(210, 180, 140, 1), "steelblue", A.SassColor_SassColor$rgb(70, 130, 180, 1), "springgreen", A.SassColor_SassColor$rgb(0, 255, 127, 1), "snow", A.SassColor_SassColor$rgb(255, 250, 250, 1), "slategrey", A.SassColor_SassColor$rgb(112, 128, 144, 1), "slategray", A.SassColor_SassColor$rgb(112, 128, 144, 1), "slateblue", A.SassColor_SassColor$rgb(106, 90, 205, 1), "skyblue", A.SassColor_SassColor$rgb(135, 206, 235, 1), "silver", A.SassColor_SassColor$rgb(192, 192, 192, 1), "sienna", A.SassColor_SassColor$rgb(160, 82, 45, 1), "seashell", A.SassColor_SassColor$rgb(255, 245, 238, 1), "seagreen", A.SassColor_SassColor$rgb(46, 139, 87, 1), "sandybrown", A.SassColor_SassColor$rgb(244, 164, 96, 1), "salmon", A.SassColor_SassColor$rgb(250, 128, 114, 1), "saddlebrown", A.SassColor_SassColor$rgb(139, 69, 19, 1), "royalblue", A.SassColor_SassColor$rgb(65, 105, 225, 1), "rosybrown", A.SassColor_SassColor$rgb(188, 143, 143, 1), "red", A.SassColor_SassColor$rgb(255, 0, 0, 1), "rebeccapurple", A.SassColor_SassColor$rgb(102, 51, 153, 1), "purple", A.SassColor_SassColor$rgb(128, 0, 128, 1), "powderblue", A.SassColor_SassColor$rgb(176, 224, 230, 1), "plum", A.SassColor_SassColor$rgb(221, 160, 221, 1), "pink", A.SassColor_SassColor$rgb(255, 192, 203, 1), "peru", A.SassColor_SassColor$rgb(205, 133, 63, 1), "peachpuff", A.SassColor_SassColor$rgb(255, 218, 185, 1), "papayawhip", A.SassColor_SassColor$rgb(255, 239, 213, 1), "palevioletred", A.SassColor_SassColor$rgb(219, 112, 147, 1), "paleturquoise", A.SassColor_SassColor$rgb(175, 238, 238, 1), "palegreen", A.SassColor_SassColor$rgb(152, 251, 152, 1), "palegoldenrod", A.SassColor_SassColor$rgb(238, 232, 170, 1), "orchid", A.SassColor_SassColor$rgb(218, 112, 214, 1), "orangered", A.SassColor_SassColor$rgb(255, 69, 0, 1), "orange", A.SassColor_SassColor$rgb(255, 165, 0, 1), "olivedrab", A.SassColor_SassColor$rgb(107, 142, 35, 1), "olive", A.SassColor_SassColor$rgb(128, 128, 0, 1), "oldlace", A.SassColor_SassColor$rgb(253, 245, 230, 1), "navy", A.SassColor_SassColor$rgb(0, 0, 128, 1), "navajowhite", A.SassColor_SassColor$rgb(255, 222, 173, 1), "moccasin", A.SassColor_SassColor$rgb(255, 228, 181, 1), "mistyrose", A.SassColor_SassColor$rgb(255, 228, 225, 1), "mintcream", A.SassColor_SassColor$rgb(245, 255, 250, 1), "midnightblue", A.SassColor_SassColor$rgb(25, 25, 112, 1), "mediumvioletred", A.SassColor_SassColor$rgb(199, 21, 133, 1), "mediumturquoise", A.SassColor_SassColor$rgb(72, 209, 204, 1), "mediumspringgreen", A.SassColor_SassColor$rgb(0, 250, 154, 1), "mediumslateblue", A.SassColor_SassColor$rgb(123, 104, 238, 1), "mediumseagreen", A.SassColor_SassColor$rgb(60, 179, 113, 1), "mediumpurple", A.SassColor_SassColor$rgb(147, 112, 219, 1), "mediumorchid", A.SassColor_SassColor$rgb(186, 85, 211, 1), "mediumblue", A.SassColor_SassColor$rgb(0, 0, 205, 1), "mediumaquamarine", A.SassColor_SassColor$rgb(102, 205, 170, 1), "maroon", A.SassColor_SassColor$rgb(128, 0, 0, 1), "magenta", A.SassColor_SassColor$rgb(255, 0, 255, 1), "linen", A.SassColor_SassColor$rgb(250, 240, 230, 1), "limegreen", A.SassColor_SassColor$rgb(50, 205, 50, 1), "lime", A.SassColor_SassColor$rgb(0, 255, 0, 1), "lightyellow", A.SassColor_SassColor$rgb(255, 255, 224, 1), "lightsteelblue", A.SassColor_SassColor$rgb(176, 196, 222, 1), "lightslategrey", A.SassColor_SassColor$rgb(119, 136, 153, 1), "lightslategray", A.SassColor_SassColor$rgb(119, 136, 153, 1), "lightskyblue", A.SassColor_SassColor$rgb(135, 206, 250, 1), "lightseagreen", A.SassColor_SassColor$rgb(32, 178, 170, 1), "lightsalmon", A.SassColor_SassColor$rgb(255, 160, 122, 1), "lightpink", A.SassColor_SassColor$rgb(255, 182, 193, 1), "lightgrey", A.SassColor_SassColor$rgb(211, 211, 211, 1), "lightgreen", A.SassColor_SassColor$rgb(144, 238, 144, 1), "lightgray", A.SassColor_SassColor$rgb(211, 211, 211, 1), "lightgoldenrodyellow", A.SassColor_SassColor$rgb(250, 250, 210, 1), "lightcyan", A.SassColor_SassColor$rgb(224, 255, 255, 1), "lightcoral", A.SassColor_SassColor$rgb(240, 128, 128, 1), "lightblue", A.SassColor_SassColor$rgb(173, 216, 230, 1), "lemonchiffon", A.SassColor_SassColor$rgb(255, 250, 205, 1), "lawngreen", A.SassColor_SassColor$rgb(124, 252, 0, 1), "lavenderblush", A.SassColor_SassColor$rgb(255, 240, 245, 1), "lavender", A.SassColor_SassColor$rgb(230, 230, 250, 1), "khaki", A.SassColor_SassColor$rgb(240, 230, 140, 1), "ivory", A.SassColor_SassColor$rgb(255, 255, 240, 1), "indigo", A.SassColor_SassColor$rgb(75, 0, 130, 1), "indianred", A.SassColor_SassColor$rgb(205, 92, 92, 1), "hotpink", A.SassColor_SassColor$rgb(255, 105, 180, 1), "honeydew", A.SassColor_SassColor$rgb(240, 255, 240, 1), "grey", A.SassColor_SassColor$rgb(128, 128, 128, 1), "greenyellow", A.SassColor_SassColor$rgb(173, 255, 47, 1), "green", A.SassColor_SassColor$rgb(0, 128, 0, 1), "gray", A.SassColor_SassColor$rgb(128, 128, 128, 1), "goldenrod", A.SassColor_SassColor$rgb(218, 165, 32, 1), "gold", A.SassColor_SassColor$rgb(255, 215, 0, 1), "ghostwhite", A.SassColor_SassColor$rgb(248, 248, 255, 1), "gainsboro", A.SassColor_SassColor$rgb(220, 220, 220, 1), "fuchsia", A.SassColor_SassColor$rgb(255, 0, 255, 1), "forestgreen", A.SassColor_SassColor$rgb(34, 139, 34, 1), "floralwhite", A.SassColor_SassColor$rgb(255, 250, 240, 1), "firebrick", A.SassColor_SassColor$rgb(178, 34, 34, 1), "dodgerblue", A.SassColor_SassColor$rgb(30, 144, 255, 1), "dimgrey", A.SassColor_SassColor$rgb(105, 105, 105, 1), "dimgray", A.SassColor_SassColor$rgb(105, 105, 105, 1), "deepskyblue", A.SassColor_SassColor$rgb(0, 191, 255, 1), "deeppink", A.SassColor_SassColor$rgb(255, 20, 147, 1), "darkviolet", A.SassColor_SassColor$rgb(148, 0, 211, 1), "darkturquoise", A.SassColor_SassColor$rgb(0, 206, 209, 1), "darkslategrey", A.SassColor_SassColor$rgb(47, 79, 79, 1), "darkslategray", A.SassColor_SassColor$rgb(47, 79, 79, 1), "darkslateblue", A.SassColor_SassColor$rgb(72, 61, 139, 1), "darkseagreen", A.SassColor_SassColor$rgb(143, 188, 143, 1), "darksalmon", A.SassColor_SassColor$rgb(233, 150, 122, 1), "darkred", A.SassColor_SassColor$rgb(139, 0, 0, 1), "darkorchid", A.SassColor_SassColor$rgb(153, 50, 204, 1), "darkorange", A.SassColor_SassColor$rgb(255, 140, 0, 1), "darkolivegreen", A.SassColor_SassColor$rgb(85, 107, 47, 1), "darkmagenta", A.SassColor_SassColor$rgb(139, 0, 139, 1), "darkkhaki", A.SassColor_SassColor$rgb(189, 183, 107, 1), "darkgrey", A.SassColor_SassColor$rgb(169, 169, 169, 1), "darkgreen", A.SassColor_SassColor$rgb(0, 100, 0, 1), "darkgray", A.SassColor_SassColor$rgb(169, 169, 169, 1), "darkgoldenrod", A.SassColor_SassColor$rgb(184, 134, 11, 1), "darkcyan", A.SassColor_SassColor$rgb(0, 139, 139, 1), "darkblue", A.SassColor_SassColor$rgb(0, 0, 139, 1), "cyan", A.SassColor_SassColor$rgb(0, 255, 255, 1), "crimson", A.SassColor_SassColor$rgb(220, 20, 60, 1), "cornsilk", A.SassColor_SassColor$rgb(255, 248, 220, 1), "cornflowerblue", A.SassColor_SassColor$rgb(100, 149, 237, 1), "coral", A.SassColor_SassColor$rgb(255, 127, 80, 1), "chocolate", A.SassColor_SassColor$rgb(210, 105, 30, 1), "chartreuse", A.SassColor_SassColor$rgb(127, 255, 0, 1), "cadetblue", A.SassColor_SassColor$rgb(95, 158, 160, 1), "burlywood", A.SassColor_SassColor$rgb(222, 184, 135, 1), "brown", A.SassColor_SassColor$rgb(165, 42, 42, 1), "blueviolet", A.SassColor_SassColor$rgb(138, 43, 226, 1), "blue", A.SassColor_SassColor$rgb(0, 0, 255, 1), "blanchedalmond", A.SassColor_SassColor$rgb(255, 235, 205, 1), "black", A.SassColor_SassColor$rgb(0, 0, 0, 1), "bisque", A.SassColor_SassColor$rgb(255, 228, 196, 1), "beige", A.SassColor_SassColor$rgb(245, 245, 220, 1), "azure", A.SassColor_SassColor$rgb(240, 255, 255, 1), "aquamarine", A.SassColor_SassColor$rgb(127, 255, 212, 1), "aqua", A.SassColor_SassColor$rgb(0, 255, 255, 1), "antiquewhite", A.SassColor_SassColor$rgb(250, 235, 215, 1), "aliceblue", A.SassColor_SassColor$rgb(240, 248, 255, 1)], type$.String, type$.SassColor)); - _lazyFinal($, "namesByColor", "$get$namesByColor", () => { - var $name, - t1 = type$.SassColor, - t2 = type$.String, - t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t1 = A.MapExtensions_get_pairs($.$get$colorsByName(), t2, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t2 = t1.get$current(t1); - $name = t2._0; - t3.$indexSet(0, t2._1, $name); - } - return t3; - }); - _lazyFinal($, "ExecutableOptions__separatorBar", "$get$ExecutableOptions__separatorBar", () => A.isWindows() ? "=" : "\u2501"); - _lazyFinal($, "ExecutableOptions__parser", "$get$ExecutableOptions__parser", () => new A.ExecutableOptions__parser_closure().call$0()); - _lazyFinal($, "globalFunctions", "$get$globalFunctions", () => { - var t1 = type$.BuiltInCallable, - t2 = A.List_List$of($.$get$global(), true, t1); - B.JSArray_methods.addAll$1(t2, $.$get$global0()); - B.JSArray_methods.addAll$1(t2, $.$get$global1()); - B.JSArray_methods.addAll$1(t2, $.$get$global2()); - B.JSArray_methods.addAll$1(t2, $.$get$global3()); - B.JSArray_methods.addAll$1(t2, $.$get$global4()); - B.JSArray_methods.addAll$1(t2, $.$get$global5()); - t2.push(A.BuiltInCallable$function("if", "$condition, $if-true, $if-false", new A.globalFunctions_closure(), null)); - return A.UnmodifiableListView$(t2, t1); - }); - _lazyFinal($, "coreModules", "$get$coreModules", () => A.UnmodifiableListView$(A._setArrayType([$.$get$module(), $.$get$module0(), $.$get$module1(), $.$get$module2(), $.$get$module3(), $.$get$module4()], A.findType("JSArray>")), type$.BuiltInModule_Callable)); - _lazyFinal($, "_microsoftFilterStart", "$get$_microsoftFilterStart", () => A.RegExp_RegExp("^[a-zA-Z]+\\s*=", false)); - _lazyFinal($, "global", "$get$global", () => { - var _s5_ = "color", - _s27_ = "$red, $green, $blue, $alpha", - _s19_ = "$red, $green, $blue", - _s9_ = "$channels", - _s37_ = "$hue, $saturation, $lightness, $alpha", - _s29_ = "$hue, $saturation, $lightness", - _s17_ = "$hue, $saturation", - _s6_ = "adjust", - _s15_ = "$color, $amount", - t1 = type$.String, - t2 = type$.Value_Function_List_Value; - return A.UnmodifiableListView$(A._setArrayType([A._channelFunction("red", B.RgbColorSpace_mlz, new A.global_closure0(), true, null).withDeprecationWarning$1(_s5_), A._channelFunction("green", B.RgbColorSpace_mlz, new A.global_closure1(), true, null).withDeprecationWarning$1(_s5_), A._channelFunction("blue", B.RgbColorSpace_mlz, new A.global_closure2(), true, null).withDeprecationWarning$1(_s5_), $.$get$_mix().withDeprecationWarning$1(_s5_), A.BuiltInCallable$overloadedFunction("rgb", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure3(), _s19_, new A.global_closure4(), "$color, $alpha", new A.global_closure5(), "$channels", new A.global_closure6()], t1, t2)), A.BuiltInCallable$overloadedFunction("rgba", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure7(), _s19_, new A.global_closure8(), "$color, $alpha", new A.global_closure9(), "$channels", new A.global_closure10()], t1, t2)), A._function5("invert", "$color, $weight: 100%, $space: null", new A.global_closure11()), A._channelFunction("hue", B.HslColorSpace_gsm, new A.global_closure12(), true, "deg").withDeprecationWarning$1(_s5_), A._channelFunction("saturation", B.HslColorSpace_gsm, new A.global_closure13(), true, "%").withDeprecationWarning$1(_s5_), A._channelFunction("lightness", B.HslColorSpace_gsm, new A.global_closure14(), true, "%").withDeprecationWarning$1(_s5_), A.BuiltInCallable$overloadedFunction("hsl", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure15(), _s29_, new A.global_closure16(), _s17_, new A.global_closure17(), "$channels", new A.global_closure18()], t1, t2)), A.BuiltInCallable$overloadedFunction("hsla", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure19(), _s29_, new A.global_closure20(), _s17_, new A.global_closure21(), "$channels", new A.global_closure22()], t1, t2)), A._function5("grayscale", "$color", new A.global_closure23()), A._function5("adjust-hue", "$color, $degrees", new A.global_closure24()).withDeprecationWarning$2(_s5_, _s6_), A._function5("lighten", _s15_, new A.global_closure25()).withDeprecationWarning$2(_s5_, _s6_), A._function5("darken", _s15_, new A.global_closure26()).withDeprecationWarning$2(_s5_, _s6_), A.BuiltInCallable$overloadedFunction("saturate", A.LinkedHashMap_LinkedHashMap$_literal(["$amount", new A.global_closure27(), "$color, $amount", new A.global_closure28()], t1, t2)), A._function5("desaturate", _s15_, new A.global_closure29()).withDeprecationWarning$2(_s5_, _s6_), A._function5("opacify", _s15_, new A.global_closure30()).withDeprecationWarning$2(_s5_, _s6_), A._function5("fade-in", _s15_, new A.global_closure31()).withDeprecationWarning$2(_s5_, _s6_), A._function5("transparentize", _s15_, new A.global_closure32()).withDeprecationWarning$2(_s5_, _s6_), A._function5("fade-out", _s15_, new A.global_closure33()).withDeprecationWarning$2(_s5_, _s6_), A.BuiltInCallable$overloadedFunction("alpha", A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.global_closure34(), "$args...", new A.global_closure35()], t1, t2)), A._function5("opacity", "$color", new A.global_closure36()), A._function5(_s5_, "$description", new A.global_closure37()), A._function5("hwb", _s9_, new A.global_closure38()), A._function5("lab", _s9_, new A.global_closure39()), A._function5("lch", _s9_, new A.global_closure40()), A._function5("oklab", _s9_, new A.global_closure41()), A._function5("oklch", _s9_, new A.global_closure42()), $.$get$_complement().withDeprecationWarning$1(_s5_), $.$get$_ieHexStr(), $.$get$_adjust().withDeprecationWarning$1(_s5_).withName$1("adjust-color"), $.$get$_scale().withDeprecationWarning$1(_s5_).withName$1("scale-color"), $.$get$_change().withDeprecationWarning$1(_s5_).withName$1("change-color")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); - }); - _lazyFinal($, "module", "$get$module", () => { - var _null = null, - _s10_ = "saturation", - _s9_ = "lightness", - _s6_ = "$color", _s5_ = "alpha", - _s30_ = "$color, $channel, $space: null", - t1 = type$.String, - t2 = type$.Value_Function_List_Value; - return A.BuiltInModule$("color", A._setArrayType([A._channelFunction("red", B.RgbColorSpace_mlz, new A.module_closure1(), false, _null), A._channelFunction("green", B.RgbColorSpace_mlz, new A.module_closure2(), false, _null), A._channelFunction("blue", B.RgbColorSpace_mlz, new A.module_closure3(), false, _null), $.$get$_mix(), A._function5("invert", "$color, $weight: 100%, $space: null", new A.module_closure4()), A._channelFunction("hue", B.HslColorSpace_gsm, new A.module_closure5(), false, "deg"), A._channelFunction(_s10_, B.HslColorSpace_gsm, new A.module_closure6(), false, "%"), A._channelFunction(_s9_, B.HslColorSpace_gsm, new A.module_closure7(), false, "%"), A._removedColorFunction("adjust-hue", "hue", false), A._removedColorFunction("lighten", _s9_, false), A._removedColorFunction("darken", _s9_, true), A._removedColorFunction("saturate", _s10_, false), A._removedColorFunction("desaturate", _s10_, true), A._function5("grayscale", _s6_, new A.module_closure8()), A.BuiltInCallable$overloadedFunction("hwb", A.LinkedHashMap_LinkedHashMap$_literal(["$hue, $whiteness, $blackness, $alpha: 1", new A.module_closure9(), "$channels", new A.module_closure10()], t1, t2)), A._channelFunction("whiteness", B.HwbColorSpace_06z, new A.module_closure11(), false, "%"), A._channelFunction("blackness", B.HwbColorSpace_06z, new A.module_closure12(), false, "%"), A._removedColorFunction("opacify", _s5_, false), A._removedColorFunction("fade-in", _s5_, false), A._removedColorFunction("transparentize", _s5_, true), A._removedColorFunction("fade-out", _s5_, true), A.BuiltInCallable$overloadedFunction(_s5_, A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.module_closure13(), "$args...", new A.module_closure14()], t1, t2)), A._function5("opacity", _s6_, new A.module_closure15()), A._function5("space", _s6_, new A.module_closure16()), A._function5("to-space", "$color, $space", new A.module_closure17()), A._function5("is-legacy", _s6_, new A.module_closure18()), A._function5("is-missing", "$color, $channel", new A.module_closure19()), A._function5("is-in-gamut", "$color, $space: null", new A.module_closure20()), A._function5("to-gamut", "$color, $space: null, $method: null", new A.module_closure21()), A._function5("channel", _s30_, new A.module_closure22()), A._function5("same", "$color1, $color2", new A.module_closure23()), A._function5("is-powerless", _s30_, new A.module_closure24()), $.$get$_complement(), $.$get$_adjust(), $.$get$_scale(), $.$get$_change(), $.$get$_ieHexStr()], type$.JSArray_Callable), _null, _null, type$.Callable); - }); - _lazyFinal($, "_mix", "$get$_mix", () => A._function5("mix", string$.x24color, new A._mix_closure())); - _lazyFinal($, "_complement", "$get$_complement", () => A._function5("complement", "$color, $space: null", new A._complement_closure())); - _lazyFinal($, "_adjust", "$get$_adjust", () => A._function5("adjust", "$color, $kwargs...", new A._adjust_closure())); - _lazyFinal($, "_scale", "$get$_scale", () => A._function5("scale", "$color, $kwargs...", new A._scale_closure())); - _lazyFinal($, "_change", "$get$_change", () => A._function5("change", "$color, $kwargs...", new A._change_closure())); - _lazyFinal($, "_ieHexStr", "$get$_ieHexStr", () => A._function5("ie-hex-str", "$color", new A._ieHexStr_closure())); - _lazyFinal($, "global0", "$get$global0", () => { - var _s4_ = "list"; - return A.UnmodifiableListView$(A._setArrayType([$.$get$_length0().withDeprecationWarning$1(_s4_), $.$get$_nth().withDeprecationWarning$1(_s4_), $.$get$_setNth().withDeprecationWarning$1(_s4_), $.$get$_join().withDeprecationWarning$1(_s4_), $.$get$_append0().withDeprecationWarning$1(_s4_), $.$get$_zip().withDeprecationWarning$1(_s4_), $.$get$_index0().withDeprecationWarning$1(_s4_), $.$get$_isBracketed().withDeprecationWarning$1(_s4_), $.$get$_separator().withDeprecationWarning$1(_s4_).withName$1("list-separator")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); - }); - _lazyFinal($, "module0", "$get$module0", () => A.BuiltInModule$("list", A._setArrayType([$.$get$_length0(), $.$get$_nth(), $.$get$_setNth(), $.$get$_join(), $.$get$_append0(), $.$get$_zip(), $.$get$_index0(), $.$get$_isBracketed(), $.$get$_separator(), $.$get$_slash()], type$.JSArray_Callable), null, null, type$.Callable)); - _lazyFinal($, "_length", "$get$_length0", () => A._function4("length", "$list", new A._length_closure0())); - _lazyFinal($, "_nth", "$get$_nth", () => A._function4("nth", "$list, $n", new A._nth_closure())); - _lazyFinal($, "_setNth", "$get$_setNth", () => A._function4("set-nth", "$list, $n, $value", new A._setNth_closure())); - _lazyFinal($, "_join", "$get$_join", () => A._function4("join", string$.x24list1, new A._join_closure())); - _lazyFinal($, "_append", "$get$_append0", () => A._function4("append", "$list, $val, $separator: auto", new A._append_closure0())); - _lazyFinal($, "_zip", "$get$_zip", () => A._function4("zip", "$lists...", new A._zip_closure())); - _lazyFinal($, "_index", "$get$_index0", () => A._function4("index", "$list, $value", new A._index_closure0())); - _lazyFinal($, "_separator", "$get$_separator", () => A._function4("separator", "$list", new A._separator_closure())); - _lazyFinal($, "_isBracketed", "$get$_isBracketed", () => A._function4("is-bracketed", "$list", new A._isBracketed_closure())); - _lazyFinal($, "_slash", "$get$_slash", () => A._function4("slash", "$elements...", new A._slash_closure())); - _lazyFinal($, "global1", "$get$global1", () => { - var _s3_ = "map"; - return A.UnmodifiableListView$(A._setArrayType([$.$get$_get().withDeprecationWarning$1(_s3_).withName$1("map-get"), $.$get$_merge().withDeprecationWarning$1(_s3_).withName$1("map-merge"), $.$get$_remove().withDeprecationWarning$1(_s3_).withName$1("map-remove"), $.$get$_keys().withDeprecationWarning$1(_s3_).withName$1("map-keys"), $.$get$_values().withDeprecationWarning$1(_s3_).withName$1("map-values"), $.$get$_hasKey().withDeprecationWarning$1(_s3_).withName$1("map-has-key")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); - }); - _lazyFinal($, "module1", "$get$module1", () => A.BuiltInModule$("map", A._setArrayType([$.$get$_get(), $.$get$_set(), $.$get$_merge(), $.$get$_remove(), $.$get$_keys(), $.$get$_values(), $.$get$_hasKey(), $.$get$_deepMerge(), $.$get$_deepRemove()], type$.JSArray_Callable), null, null, type$.Callable)); - _lazyFinal($, "_get", "$get$_get", () => A._function3("get", "$map, $key, $keys...", new A._get_closure())); - _lazyFinal($, "_set", "$get$_set", () => A.BuiltInCallable$overloadedFunction("set", A.LinkedHashMap_LinkedHashMap$_literal(["$map, $key, $value", new A._set_closure(), "$map, $args...", new A._set_closure0()], type$.String, type$.Value_Function_List_Value))); - _lazyFinal($, "_merge", "$get$_merge", () => A.BuiltInCallable$overloadedFunction("merge", A.LinkedHashMap_LinkedHashMap$_literal(["$map1, $map2", new A._merge_closure(), "$map1, $args...", new A._merge_closure0()], type$.String, type$.Value_Function_List_Value))); - _lazyFinal($, "_deepMerge", "$get$_deepMerge", () => A._function3("deep-merge", "$map1, $map2", new A._deepMerge_closure())); - _lazyFinal($, "_deepRemove", "$get$_deepRemove", () => A._function3("deep-remove", "$map, $key, $keys...", new A._deepRemove_closure())); - _lazyFinal($, "_remove", "$get$_remove", () => A.BuiltInCallable$overloadedFunction("remove", A.LinkedHashMap_LinkedHashMap$_literal(["$map", new A._remove_closure(), "$map, $key, $keys...", new A._remove_closure0()], type$.String, type$.Value_Function_List_Value))); - _lazyFinal($, "_keys", "$get$_keys", () => A._function3("keys", "$map", new A._keys_closure())); - _lazyFinal($, "_values", "$get$_values", () => A._function3("values", "$map", new A._values_closure())); - _lazyFinal($, "_hasKey", "$get$_hasKey", () => A._function3("has-key", "$map, $key, $keys...", new A._hasKey_closure())); - _lazyFinal($, "global2", "$get$global2", () => { - var _s4_ = "math"; - return A.UnmodifiableListView$(A._setArrayType([A._function2("abs", "$number", new A.global_closure()), $.$get$_ceil().withDeprecationWarning$1(_s4_), $.$get$_floor().withDeprecationWarning$1(_s4_), $.$get$_max().withDeprecationWarning$1(_s4_), $.$get$_min().withDeprecationWarning$1(_s4_), $.$get$_percentage().withDeprecationWarning$1(_s4_), $.$get$_randomFunction().withDeprecationWarning$1(_s4_), $.$get$_round().withDeprecationWarning$1(_s4_), $.$get$_unit().withDeprecationWarning$1(_s4_), $.$get$_compatible().withDeprecationWarning$1(_s4_).withName$1("comparable"), $.$get$_isUnitless().withDeprecationWarning$1(_s4_).withName$1("unitless")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); - }); - _lazyFinal($, "module2", "$get$module2", () => { - var _null = null; - return A.BuiltInModule$("math", A._setArrayType([A._numberFunction("abs", new A.module_closure0()), $.$get$_acos(), $.$get$_asin(), $.$get$_atan(), $.$get$_atan2(), $.$get$_ceil(), $.$get$_clamp(), $.$get$_cos(), $.$get$_compatible(), $.$get$_floor(), $.$get$_hypot(), $.$get$_isUnitless(), $.$get$_log(), $.$get$_max(), $.$get$_min(), $.$get$_percentage(), $.$get$_pow(), $.$get$_randomFunction(), $.$get$_round(), $.$get$_sin(), $.$get$_sqrt(), $.$get$_tan(), $.$get$_unit(), $.$get$_div()], type$.JSArray_Callable), _null, A.LinkedHashMap_LinkedHashMap$_literal(["e", A.SassNumber_SassNumber(2.718281828459045, _null), "pi", A.SassNumber_SassNumber(3.141592653589793, _null), "epsilon", A.SassNumber_SassNumber(2220446049250313e-31, _null), "max-safe-integer", A.SassNumber_SassNumber(9007199254740991, _null), "min-safe-integer", A.SassNumber_SassNumber(-9007199254740991, _null), "max-number", A.SassNumber_SassNumber(17976931348623157e292, _null), "min-number", A.SassNumber_SassNumber(5e-324, _null)], type$.String, type$.Value), type$.Callable); - }); - _lazyFinal($, "_ceil", "$get$_ceil", () => A._numberFunction("ceil", new A._ceil_closure())); - _lazyFinal($, "_clamp", "$get$_clamp", () => A._function2("clamp", "$min, $number, $max", new A._clamp_closure())); - _lazyFinal($, "_floor", "$get$_floor", () => A._numberFunction("floor", new A._floor_closure())); - _lazyFinal($, "_max", "$get$_max", () => A._function2("max", "$numbers...", new A._max_closure())); - _lazyFinal($, "_min", "$get$_min", () => A._function2("min", "$numbers...", new A._min_closure())); - _lazyFinal($, "_round", "$get$_round", () => A._numberFunction("round", new A._round_closure())); - _lazyFinal($, "_hypot", "$get$_hypot", () => A._function2("hypot", "$numbers...", new A._hypot_closure())); - _lazyFinal($, "_log", "$get$_log", () => A._function2("log", "$number, $base: null", new A._log_closure())); - _lazyFinal($, "_pow", "$get$_pow", () => A._function2("pow", "$base, $exponent", new A._pow_closure())); - _lazyFinal($, "_sqrt", "$get$_sqrt", () => A._singleArgumentMathFunc("sqrt", A.number0__sqrt$closure())); - _lazyFinal($, "_acos", "$get$_acos", () => A._singleArgumentMathFunc("acos", A.number0__acos$closure())); - _lazyFinal($, "_asin", "$get$_asin", () => A._singleArgumentMathFunc("asin", A.number0__asin$closure())); - _lazyFinal($, "_atan", "$get$_atan", () => A._singleArgumentMathFunc("atan", A.number0__atan$closure())); - _lazyFinal($, "_atan2", "$get$_atan2", () => A._function2("atan2", "$y, $x", new A._atan2_closure())); - _lazyFinal($, "_cos", "$get$_cos", () => A._singleArgumentMathFunc("cos", A.number0__cos$closure())); - _lazyFinal($, "_sin", "$get$_sin", () => A._singleArgumentMathFunc("sin", A.number0__sin$closure())); - _lazyFinal($, "_tan", "$get$_tan", () => A._singleArgumentMathFunc("tan", A.number0__tan$closure())); - _lazyFinal($, "_compatible", "$get$_compatible", () => A._function2("compatible", "$number1, $number2", new A._compatible_closure())); - _lazyFinal($, "_isUnitless", "$get$_isUnitless", () => A._function2("is-unitless", "$number", new A._isUnitless_closure())); - _lazyFinal($, "_unit", "$get$_unit", () => A._function2("unit", "$number", new A._unit_closure())); - _lazyFinal($, "_percentage", "$get$_percentage", () => A._function2("percentage", "$number", new A._percentage_closure())); - _lazyFinal($, "_random", "$get$_random0", () => A.Random_Random()); - _lazyFinal($, "_randomFunction", "$get$_randomFunction", () => A._function2("random", "$limit: null", new A._randomFunction_closure())); - _lazyFinal($, "_div", "$get$_div", () => A._function2("div", "$number1, $number2", new A._div_closure())); - _lazyFinal($, "_shared", "$get$_shared", () => A.UnmodifiableListView$(A._setArrayType([A._function("feature-exists", "$feature", new A._shared_closure()), A._function("inspect", "$value", new A._shared_closure0()), A._function("type-of", "$value", new A._shared_closure1()), A._function("keywords", "$args", new A._shared_closure2())], type$.JSArray_BuiltInCallable), type$.BuiltInCallable)); - _lazyFinal($, "global3", "$get$global5", () => { - var t2, - t1 = A._setArrayType([], type$.JSArray_BuiltInCallable); - for (t2 = $.$get$_shared(), t2 = t2.get$iterator(t2); t2.moveNext$0();) - t1.push(t2.get$current(0).withDeprecationWarning$1("meta")); - return A.UnmodifiableListView$(t1, type$.BuiltInCallable); - }); - _lazyFinal($, "moduleFunctions", "$get$moduleFunctions", () => { - var t1 = type$.BuiltInCallable, - t2 = A.List_List$of($.$get$_shared(), true, t1); - t2.push(A._function("calc-name", "$calc", new A.moduleFunctions_closure())); - t2.push(A._function("calc-args", "$calc", new A.moduleFunctions_closure0())); - t2.push(A._function("accepts-content", "$mixin", new A.moduleFunctions_closure1())); - return A.UnmodifiableListView$(t2, t1); - }); - _lazyFinal($, "global4", "$get$global3", () => { - var _s8_ = "selector"; - return A.UnmodifiableListView$(A._setArrayType([$.$get$_isSuperselector().withDeprecationWarning$1(_s8_), $.$get$_simpleSelectors().withDeprecationWarning$1(_s8_), $.$get$_parse().withDeprecationWarning$1(_s8_).withName$1("selector-parse"), $.$get$_nest().withDeprecationWarning$1(_s8_).withName$1("selector-nest"), $.$get$_append().withDeprecationWarning$1(_s8_).withName$1("selector-append"), $.$get$_extend().withDeprecationWarning$1(_s8_).withName$1("selector-extend"), $.$get$_replace().withDeprecationWarning$1(_s8_).withName$1("selector-replace"), $.$get$_unify().withDeprecationWarning$1(_s8_).withName$1("selector-unify")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); - }); - _lazyFinal($, "module3", "$get$module3", () => A.BuiltInModule$("selector", A._setArrayType([$.$get$_isSuperselector(), $.$get$_simpleSelectors(), $.$get$_parse(), $.$get$_nest(), $.$get$_append(), $.$get$_extend(), $.$get$_replace(), $.$get$_unify()], type$.JSArray_Callable), null, null, type$.Callable)); - _lazyFinal($, "_nest", "$get$_nest", () => A._function1("nest", "$selectors...", new A._nest_closure())); - _lazyFinal($, "_append0", "$get$_append", () => A._function1("append", "$selectors...", new A._append_closure())); - _lazyFinal($, "_extend", "$get$_extend", () => A._function1("extend", "$selector, $extendee, $extender", new A._extend_closure())); - _lazyFinal($, "_replace", "$get$_replace", () => A._function1("replace", "$selector, $original, $replacement", new A._replace_closure())); - _lazyFinal($, "_unify", "$get$_unify", () => A._function1("unify", "$selector1, $selector2", new A._unify_closure())); - _lazyFinal($, "_isSuperselector", "$get$_isSuperselector", () => A._function1("is-superselector", "$super, $sub", new A._isSuperselector_closure())); - _lazyFinal($, "_simpleSelectors", "$get$_simpleSelectors", () => A._function1("simple-selectors", "$selector", new A._simpleSelectors_closure())); - _lazyFinal($, "_parse0", "$get$_parse", () => A._function1("parse", "$selector", new A._parse_closure())); - _lazyFinal($, "_random0", "$get$_random", () => A.Random_Random()); - _lazy($, "_previousUniqueId", "$get$_previousUniqueId", () => $.$get$_random().nextInt$1(A._asInt(A.pow(36, 6)))); - _lazyFinal($, "global5", "$get$global4", () => { - var _s6_ = "string"; - return A.UnmodifiableListView$(A._setArrayType([$.$get$_unquote().withDeprecationWarning$1(_s6_), $.$get$_quote().withDeprecationWarning$1(_s6_), $.$get$_toUpperCase().withDeprecationWarning$1(_s6_), $.$get$_toLowerCase().withDeprecationWarning$1(_s6_), $.$get$_uniqueId().withDeprecationWarning$1(_s6_), $.$get$_length().withDeprecationWarning$1(_s6_).withName$1("str-length"), $.$get$_insert().withDeprecationWarning$1(_s6_).withName$1("str-insert"), $.$get$_index().withDeprecationWarning$1(_s6_).withName$1("str-index"), $.$get$_slice().withDeprecationWarning$1(_s6_).withName$1("str-slice")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); - }); - _lazyFinal($, "module4", "$get$module4", () => A.BuiltInModule$("string", A._setArrayType([$.$get$_unquote(), $.$get$_quote(), $.$get$_toUpperCase(), $.$get$_toLowerCase(), $.$get$_length(), $.$get$_insert(), $.$get$_index(), $.$get$_slice(), $.$get$_uniqueId(), A._function0("split", "$string, $separator, $limit: null", new A.module_closure())], type$.JSArray_Callable), null, null, type$.Callable)); - _lazyFinal($, "_unquote", "$get$_unquote", () => A._function0("unquote", "$string", new A._unquote_closure())); - _lazyFinal($, "_quote", "$get$_quote", () => A._function0("quote", "$string", new A._quote_closure())); - _lazyFinal($, "_length0", "$get$_length", () => A._function0("length", "$string", new A._length_closure())); - _lazyFinal($, "_insert", "$get$_insert", () => A._function0("insert", "$string, $insert, $index", new A._insert_closure())); - _lazyFinal($, "_index0", "$get$_index", () => A._function0("index", "$string, $substring", new A._index_closure())); - _lazyFinal($, "_slice", "$get$_slice", () => A._function0("slice", "$string, $start-at, $end-at: -1", new A._slice_closure())); - _lazyFinal($, "_toUpperCase", "$get$_toUpperCase", () => A._function0("to-upper-case", "$string", new A._toUpperCase_closure())); - _lazyFinal($, "_toLowerCase", "$get$_toLowerCase", () => A._function0("to-lower-case", "$string", new A._toLowerCase_closure())); - _lazyFinal($, "_uniqueId", "$get$_uniqueId", () => A._function0("unique-id", "", new A._uniqueId_closure())); - _lazyFinal($, "FilesystemImporter_cwd", "$get$FilesystemImporter_cwd", () => { - var _null = null; - return new A.FilesystemImporter(A.absolute(".", _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), true); - }); - _lazyFinal($, "FilesystemImporter_noLoadPath", "$get$FilesystemImporter_noLoadPath", () => new A.FilesystemImporter(null, false)); - _lazyFinal($, "_jsThrow", "$get$_jsThrow0", () => new self.Function("error", "throw error;")); - _lazyFinal($, "Logger_quiet", "$get$Logger_quiet", () => new A._QuietLogger()); - _lazyFinal($, "_disallowedFunctionNames", "$get$_disallowedFunctionNames", () => { - var t1 = $.$get$globalFunctions(); - t1 = t1.map$1$1(t1, new A._disallowedFunctionNames_closure(), type$.String).toSet$0(0); - t1.add$1(0, "if"); - t1.remove$1(0, "rgb"); - t1.remove$1(0, "rgba"); - t1.remove$1(0, "hsl"); - t1.remove$1(0, "hsla"); - t1.remove$1(0, "grayscale"); - t1.remove$1(0, "invert"); - t1.remove$1(0, "alpha"); - t1.remove$1(0, "opacity"); - t1.remove$1(0, "saturate"); - t1.remove$1(0, "min"); - t1.remove$1(0, "max"); - t1.remove$1(0, "round"); - t1.remove$1(0, "abs"); - return t1; - }); - _lazyFinal($, "_epsilon", "$get$_epsilon", () => A.pow(10, -11)); - _lazyFinal($, "_inverseEpsilon", "$get$_inverseEpsilon", () => A.pow(10, 11)); - _lazyFinal($, "bogusSpan", "$get$bogusSpan", () => A.SourceFile$decoded(A._setArrayType([], type$.JSArray_int), null).span$1(0, 0)); - _lazyFinal($, "_noSourceUrl", "$get$_noSourceUrl", () => A.Uri_parse("-")); - _lazyFinal($, "_traces", "$get$_traces", () => A.Expando$()); - _lazyFinal($, "lmsToOklab", "$get$lmsToOklab", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.210454268309314, 0.7936177747023054, -0.0040720430116193, 1.9779985324311684, -2.42859224204858, 0.450593709617411, 0.0259040424655478, 0.7827717124575296, -0.8086757549230774], type$.JSArray_double))); - _lazyFinal($, "oklabToLms", "$get$oklabToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.0000000000000002, 0.3963377773761749, 0.2158037573099136, 0.9999999999999998, -0.10556134581565854, -0.06385417282581334, 0.9999999999999999, -0.0894841775298118, -1.2914855480194094], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToLinearDisplayP3", "$get$linearSrgbToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8224619687143623, 0.17753803128563775, 0, 0.03319419885096161, 0.9668058011490384, 0, 0.01708263072112003, 0.07239744066396346, 0.9105199286149165], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToLinearSrgb", "$get$linearDisplayP3ToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2249401762805598, -0.22494017628055996, 0, -0.04205695470968816, 1.042056954709688, 0, -0.01963755459033443, -0.07863604555063188, 1.0982736001409663], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToLinearA98Rgb", "$get$linearSrgbToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7151256068556247, 0.28487439314437535, 0, 0, 1, 0, 0, 0.04116194845011846, 0.9588380515498816], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToLinearSrgb", "$get$linearA98RgbToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.3983557439607783, -0.3983557439607783, 0, 0, 1, 0, 0, -0.04292898929447326, 1.0429289892944733], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToLinearRec2020", "$get$linearSrgbToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.627403895934699, 0.3292830383778837, 0.04331306568741722, 0.06909728935823208, 0.9195403950754587, 0.01136231556630917, 0.01639143887515027, 0.08801330787722575, 0.895595253247624], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToLinearSrgb", "$get$linearRec2020ToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.6604910021084345, -0.5876411387885495, -0.07284986331988487, -0.12455047452159074, 1.1328998971259603, -0.00834942260436947, -0.0181507633549053, -0.10057889800800737, 1.1187296613629127], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToXyzD65", "$get$linearSrgbToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.4123907992659595, 0.35758433938387796, 0.1804807884018343, 0.21263900587151036, 0.7151686787677559, 0.07219231536073371, 0.01933081871559185, 0.11919477979462598, 0.9505321522496606], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToLinearSrgb", "$get$xyzD65ToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.2409699419045213, -1.5373831775700935, -0.4986107602930033, -0.9692436362808798, 1.8759675015077206, 0.04155505740717561, 0.0556300796969936, -0.20397695888897657, 1.0569715142428786], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToLms", "$get$linearSrgbToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.412221469470763, 0.5363325372617348, 0.0514459932675022, 0.2119034958178252, 0.6806995506452342, 0.1073969535369405, 0.08830245919005641, 0.2817188391361215, 0.6299787016738221], type$.JSArray_double))); - _lazyFinal($, "lmsToLinearSrgb", "$get$lmsToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([4.076741636075958, -3.307711539258062, 0.23096990318210417, -1.268437973285032, 2.609757349287689, -0.3413193760026571, -0.00419607613867551, -0.7034186179359363, 1.707614694074612], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToLinearProphotoRgb", "$get$linearSrgbToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5292769776226116, 0.33015450197849283, 0.14056852039889556, 0.09836585954044917, 0.8734707129069618, 0.028163427552589, 0.01687534092138684, 0.11765941425612084, 0.8654652448224923], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToLinearSrgb", "$get$linearProphotoRgbToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.034380849516996, -0.7276357899341342, -0.3067450595828618, -0.22882573163305037, 1.2317425411901048, -0.00291680955705449, -0.00855882878391742, -0.1532667021380372, 1.1618255309219547], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToXyzD50", "$get$linearSrgbToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.43606574687426936, 0.3851515095901596, 0.14307841996513868, 0.22249317711056518, 0.7168870130944824, 0.06061980979495235, 0.01392392146316939, 0.09708132423141015, 0.7140993568158807], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToLinearSrgb", "$get$xyzD50ToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.1341358529001178, -1.617385998018042, -0.49066221791109754, -0.9787954765557777, 1.9162543773959884, 0.03344287339036693, 0.07195539255794733, -0.228976759815182, 1.4053860351131182], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToLinearA98Rgb", "$get$linearDisplayP3ToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8640051374740484, 0.13599486252595164, 0, -0.04205695470968816, 1.042056954709688, 0, -0.02056038078232985, -0.03250613804550798, 1.0530665188278379], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToLinearDisplayP3", "$get$linearA98RgbToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.1500944181410184, -0.15009441814101834, 0, 0.04641729862941844, 0.9535827013705815, 0, 0.02388759479083904, 0.02650477632633013, 0.9496076288828308], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToLinearRec2020", "$get$linearDisplayP3ToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7538330343617218, 0.1985973690526163, 0.04756959658566187, 0.04574384896535833, 0.9417772198116935, 0.01247893122294812, -0.00121034035451832, 0.01760171730108989, 0.9836086230534284], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToLinearDisplayP3", "$get$linearRec2020ToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.343578252584332, -0.2821796705261357, -0.06139858205819628, -0.06529745278911953, 1.0757879158485746, -0.01049046305945495, 0.00282178726170095, -0.01959849452449406, 1.0167767072627931], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToXyzD65", "$get$linearDisplayP3ToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.48657094864821626, 0.26566769316909294, 0.1982172852343625, 0.22897456406974884, 0.6917385218365062, 0.079286914093745, 0, 0.04511338185890257, 1.0439443689009757], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToLinearDisplayP3", "$get$xyzD65ToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.4934969119414245, -0.9313836179191236, -0.40271078445071684, -0.8294889695615749, 1.7626640603183468, 0.02362468584194359, 0.03584583024378433, -0.0761723892680417, 0.9568845240076873], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToLms", "$get$linearDisplayP3ToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.48137985274995443, 0.46211837101131803, 0.05650177623872756, 0.22883194181124472, 0.6532168193835676, 0.11795123880518774, 0.08394575232299319, 0.22416527097756642, 0.6918889766994404], type$.JSArray_double))); - _lazyFinal($, "lmsToLinearDisplayP3", "$get$lmsToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.1277689713618737, -2.2571357625916386, 0.12936679122976494, -1.0910090184377979, 2.4133317103069225, -0.32232269186912466, -0.02601080193857045, -0.508041331704167, 1.5340521336427373], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToLinearProphotoRgb", "$get$linearDisplayP3ToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6316869193403589, 0.21393038569465722, 0.1543826949649839, 0.08320371426648458, 0.8858651367630243, 0.03093114897049121, -0.00127273456473881, 0.05075510433665735, 0.9505176302280814], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToLinearDisplayP3", "$get$linearProphotoRgbToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.6325756087069179, -0.3797716184825984, -0.2528039902243195, -0.15370040233755072, 1.1667025472425014, -0.01300214490495082, 0.01039319529676572, -0.0628073126495944, 1.0524141173528287], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToXyzD50", "$get$linearDisplayP3ToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.515146442968116, 0.2920099820638577, 0.15713925139759397, 0.2412003221252552, 0.6922225411313818, 0.06657713674336294, -0.00105013914714014, 0.0418782701890746, 0.7842764714685257], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToLinearDisplayP3", "$get$xyzD50ToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.4039341218554973, -0.9900304424955931, -0.39761363181465614, -0.8422700161454688, 1.7989580161067082, 0.01604562477090472, 0.04819381686413303, -0.09738519815446048, 1.2736713693321273], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToLinearRec2020", "$get$linearA98RgbToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8773338416636568, 0.07749370651571998, 0.04517245182062317, 0.09662259146620378, 0.8915273202441805, 0.01185008828961569, 0.02292106270284839, 0.04303668501067932, 0.9340422522864723], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToLinearA98Rgb", "$get$linearRec2020ToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.1519783947159163, -0.0975030553024086, -0.05447533941350766, -0.12455047452159074, 1.1328998971259603, -0.00834942260436947, -0.0225303827810559, -0.04980650742838876, 1.0723368902094446], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToXyzD65", "$get$linearA98RgbToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5766690429101308, 0.18555823790654627, 0.18822864623499472, 0.29734497525053616, 0.627363566255466, 0.07529145849399789, 0.02703136138641237, 0.07068885253582714, 0.9913375368376389], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToLinearA98Rgb", "$get$xyzD65ToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.041587903810746, -0.5650069742788596, -0.3447313507783295, -0.9692436362808798, 1.8759675015077206, 0.04155505740717561, 0.01344428063203102, -0.11836239223101823, 1.0151749943912054], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToLms", "$get$linearA98RgbToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5764322596183941, 0.36991322261987963, 0.05365451776172635, 0.29631647054222465, 0.5916761332521885, 0.11200739620558686, 0.1234782510142776, 0.21949869837199862, 0.6570230506137238], type$.JSArray_double))); - _lazyFinal($, "lmsToLinearA98Rgb", "$get$lmsToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.5540368386115566, -1.6219761806828699, 0.06793934207131327, -1.268437973285032, 2.609757349287689, -0.3413193760026571, -0.05623473593749381, -0.5670418395669061, 1.6232765755043999], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToLinearProphotoRgb", "$get$linearA98RgbToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7401175018047792, 0.11327951328898105, 0.1466029849062397, 0.1375504646980262, 0.833077080269484, 0.02937245503248977, 0.02359772990871766, 0.07378347703906656, 0.9026187930522158], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToLinearA98Rgb", "$get$linearProphotoRgbToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.38965124815152, -0.16945907691487766, -0.22019217123664242, -0.22882573163305037, 1.2317425411901048, -0.00291680955705449, -0.01762544368426068, -0.09625702306122665, 1.1138824667454874], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToXyzD50", "$get$linearA98RgbToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6097750418861814, 0.20530000261929401, 0.14922063192409227, 0.31112461220464155, 0.6256532308346856, 0.06322215696067286, 0.01947059555648168, 0.06087908649415867, 0.7447549204598198], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToLinearA98Rgb", "$get$xyzD50ToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.9624670363768806, -0.6107423404815073, -0.3413580980827154, -0.9787954765557777, 1.9162543773959884, 0.03344287339036693, 0.02870443944957101, -0.1406748663317068, 1.3489141814137937], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToXyzD65", "$get$linearRec2020ToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6369580483012913, 0.14461690358620838, 0.16888097516417205, 0.26270021201126703, 0.677998071518871, 0.05930171646986194, 0, 0.0280726930490875, 1.0609850577107909], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToLinearRec2020", "$get$xyzD65ToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.7166511879712676, -0.3556707837763924, -0.2533662813736598, -0.666684351832489, 1.616481236634939, 0.01576854581391113, 0.01763985744531091, -0.04277061325780865, 0.942103121235474], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToLms", "$get$linearRec2020ToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6167557848654444, 0.36019840122646335, 0.02304581390809228, 0.2651330593926367, 0.6358393720678491, 0.09902756853951408, 0.10010262952034828, 0.20390652261661452, 0.6959908478630372], type$.JSArray_double))); - _lazyFinal($, "lmsToLinearRec2020", "$get$lmsToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.1399067304346513, -1.246389493760618, 0.10648276332596668, -0.8847358357577674, 2.1632309383612007, -0.2784951026034334, -0.04857374640044396, -0.4545031497140964, 1.5030768961145404], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToLinearProphotoRgb", "$get$linearRec2020ToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8351873331297235, 0.04886884858605698, 0.11594381828421951, 0.05403324519953363, 0.9289184085692044, 0.01704834623126199, -0.00234203897072539, 0.03633215316169465, 0.9660098858090307], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToLinearRec2020", "$get$linearProphotoRgbToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.200659329517408, -0.05756805370122346, -0.14309127581618444, -0.06994154955888504, 1.080617897597214, -0.01067634803832895, 0.00554147334294746, -0.04078219298657951, 1.035240719643632], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToXyzD50", "$get$linearRec2020ToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.673515463188276, 0.16569726370390453, 0.12508294953738705, 0.2790590051411206, 0.6753180057491098, 0.04562298910976962, -0.00193242713400438, 0.02997782679282923, 0.7970592028516355], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToLinearRec2020", "$get$xyzD50ToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.647184904671766, -0.3936818981316471, -0.23595963848828266, -0.6826641074173818, 1.6477146127444076, 0.01281708338512084, 0.02966887665275675, -0.0629258964297003, 1.2535578201865771], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToLms", "$get$xyzD65ToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.819022437996703, 0.36190626005289034, -0.12887378152098788, 0.03298365393238846, 0.9292868615863433, 0.03614466635064235, 0.0481771893596242, 0.2642395317527308, 0.6335478284694308], type$.JSArray_double))); - _lazyFinal($, "lmsToXyzD65", "$get$lmsToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2268798758459243, -0.5578149944602171, 0.2813910456659646, -0.04057574521480084, 1.1122868032803173, -0.07171105806551635, -0.07637293667466007, -0.42149333240224324, 1.5869240198367818], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToLinearProphotoRgb", "$get$xyzD65ToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.4031904633774979, -0.22301514479051668, -0.1016066850741379, -0.5262384021633072, 1.4816319629234644, 0.01701879027252688, -0.0112022652862215, 0.01824640347962099, 0.9112472274915048], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToXyzD65", "$get$linearProphotoRgbToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.755590742296921, 0.11271984265940525, 0.0821453420953454, 0.2683218435785719, 0.7151152566617912, 0.01656289975963685, 0.0039159727624258, -0.01293344283684181, 1.0980752208342945], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToXyzD50", "$get$xyzD65ToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.0479297925449966, 0.02294687060160952, -0.05019226628920519, 0.02962780877005567, 0.99043442675388, -0.01707379906341879, -0.00924304064620452, 0.01505519149029816, 0.751874281428137], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToXyzD65", "$get$xyzD50ToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.9554734214880752, -0.02309845494876452, 0.06325924320057065, -0.02836970933386358, 1.0099953980813041, 0.0210414411919173, 0.01231401486448199, -0.02050764929889898, 1.330365926242124], type$.JSArray_double))); - _lazyFinal($, "lmsToLinearProphotoRgb", "$get$lmsToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.7383551481157207, -0.9879509427514458, 0.24959579463572504, -0.7070494015329266, 1.9343700444401382, -0.2273206429072115, -0.08407882206239634, -0.35754060521141334, 1.4416194272738097], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToLms", "$get$linearProphotoRgbToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7154484605655534, 0.35279155007721186, -0.0682400106427653, 0.2744116490015671, 0.6677976498412367, 0.05779070115719616, 0.10978443261622942, 0.18619829115002018, 0.7040172762337504], type$.JSArray_double))); - _lazyFinal($, "lmsToXyzD50", "$get$lmsToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.288586218172706, -0.5378717444973745, 0.2135812027542364, -0.00253387643187372, 1.0923167988719165, -0.08978292244004273, -0.06937382305734124, -0.29500839894431263, 1.1894868245121142], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToLms", "$get$xyzD50ToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7707000420431172, 0.34924840261939616, -0.11202351884164681, 0.00559649248368848, 0.9370723401136769, 0.06972568836252771, 0.04633714262191069, 0.25277531574310524, 0.851458076746796], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToXyzD50", "$get$linearProphotoRgbToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7977666449006423, 0.13518129740053308, 0.0313477341283922, 0.2880748288194013, 0.711835234241873, 0.00008993693872564, 0, 0, 0.8251046025104602], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToLinearProphotoRgb", "$get$xyzD50ToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.3457868816471583, -0.25557208737979464, -0.05110186497554526, -0.5446307051249019, 1.5082477428451468, 0.02052744743642139, 0, 0, 1.2119675456389452], type$.JSArray_double))); - _lazyFinal($, "_typesByUnit", "$get$_typesByUnit", () => { - var t3, type, - t1 = type$.String, - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t1 = A.MapExtensions_get_pairs(B.Map_397RH, t1, type$.List_String), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t3 = t1.get$current(t1); - type = t3._0; - for (t3 = J.get$iterator$ax(t3._1); t3.moveNext$0();) - t2.$indexSet(0, t3.get$current(t3), type); - } - return t2; - }); - _lazyFinal($, "_knownCompatibilitiesByUnit", "$get$_knownCompatibilitiesByUnit", () => { - var _i, set, t2, - t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, A.findType("Set")); - for (_i = 0; _i < 5; ++_i) { - set = B.List_Eeh[_i]; - for (t2 = set.get$iterator(set); t2.moveNext$0();) - t1.$indexSet(0, t2.get$current(0), set); - } - return t1; - }); - _lazyFinal($, "_emptyQuoted", "$get$_emptyQuoted", () => A.SassString$("", true)); - _lazyFinal($, "_emptyUnquoted", "$get$_emptyUnquoted", () => A.SassString$("", false)); - _lazyFinal($, "maxInt32", "$get$maxInt32", () => A._asInt(A.pow(2, 31)) - 1); - _lazyFinal($, "minInt32", "$get$minInt32", () => -A._asInt(A.pow(2, 31))); - _lazyFinal($, "_vmFrame", "$get$_vmFrame", () => A.RegExp_RegExp("^#\\d+\\s+(\\S.*) \\((.+?)((?::\\d+){0,2})\\)$", false)); - _lazyFinal($, "_v8JsFrame", "$get$_v8JsFrame", () => A.RegExp_RegExp("^\\s*at (?:(\\S.*?)(?: \\[as [^\\]]+\\])? \\((.*)\\)|(.*))$", false)); - _lazyFinal($, "_v8JsUrlLocation", "$get$_v8JsUrlLocation", () => A.RegExp_RegExp("^(.*?):(\\d+)(?::(\\d+))?$|native$", false)); - _lazyFinal($, "_v8WasmFrame", "$get$_v8WasmFrame", () => A.RegExp_RegExp("^\\s*at (?:(?.+) )?(?:\\(?(?:(?\\S+):wasm-function\\[(?\\d+)\\]\\:0x(?[0-9a-fA-F]+))\\)?)$", false)); - _lazyFinal($, "_v8EvalLocation", "$get$_v8EvalLocation", () => A.RegExp_RegExp("^eval at (?:\\S.*?) \\((.*)\\)(?:, .*?:\\d+:\\d+)?$", false)); - _lazyFinal($, "_firefoxEvalLocation", "$get$_firefoxEvalLocation", () => A.RegExp_RegExp("(\\S+)@(\\S+) line (\\d+) >.* (Function|eval):\\d+:\\d+", false)); - _lazyFinal($, "_firefoxSafariJSFrame", "$get$_firefoxSafariJSFrame", () => A.RegExp_RegExp("^(?:([^@(/]*)(?:\\(.*\\))?((?:/[^/]*)*)(?:\\(.*\\))?@)?(.*?):(\\d*)(?::(\\d*))?$", false)); - _lazyFinal($, "_firefoxWasmFrame", "$get$_firefoxWasmFrame", () => A.RegExp_RegExp("^(?.*?)@(?:(?\\S+).*?:wasm-function\\[(?\\d+)\\]:0x(?[0-9a-fA-F]+))$", false)); - _lazyFinal($, "_safariWasmFrame", "$get$_safariWasmFrame", () => A.RegExp_RegExp("^.*?wasm-function\\[(?.*)\\]@\\[wasm code\\]$", false)); - _lazyFinal($, "_friendlyFrame", "$get$_friendlyFrame", () => A.RegExp_RegExp("^(\\S+)(?: (\\d+)(?::(\\d+))?)?\\s+([^\\d].*)$", false)); - _lazyFinal($, "_asyncBody", "$get$_asyncBody", () => A.RegExp_RegExp("<(|[^>]+)_async_body>", false)); - _lazyFinal($, "_initialDot", "$get$_initialDot", () => A.RegExp_RegExp("^\\.", false)); - _lazyFinal($, "Frame__uriRegExp", "$get$Frame__uriRegExp", () => A.RegExp_RegExp("^[a-zA-Z][-+.a-zA-Z\\d]*://", false)); - _lazyFinal($, "Frame__windowsRegExp", "$get$Frame__windowsRegExp", () => A.RegExp_RegExp("^([a-zA-Z]:[\\\\/]|\\\\\\\\)", false)); - _lazyFinal($, "_terseRegExp", "$get$_terseRegExp", () => A.RegExp_RegExp("(-patch)?([/\\\\].*)?$", false)); - _lazyFinal($, "_v8Trace", "$get$_v8Trace", () => A.RegExp_RegExp("\\n ?at ", false)); - _lazyFinal($, "_v8TraceLine", "$get$_v8TraceLine", () => A.RegExp_RegExp(" ?at ", false)); - _lazyFinal($, "_firefoxEvalTrace", "$get$_firefoxEvalTrace", () => A.RegExp_RegExp("@\\S+ line \\d+ >.* (Function|eval):\\d+:\\d+", false)); - _lazyFinal($, "_firefoxSafariTrace", "$get$_firefoxSafariTrace", () => A.RegExp_RegExp("^(([.0-9A-Za-z_$/<]|\\(.*\\))*@)?[^\\s]*:\\d*$", true)); - _lazyFinal($, "_friendlyTrace", "$get$_friendlyTrace", () => A.RegExp_RegExp("^[^\\s<][^\\s]*( \\d+(:\\d+)?)?[ \\t]+[^\\s]+$", true)); - _lazyFinal($, "vmChainGap", "$get$vmChainGap", () => A.RegExp_RegExp("^\\n?$", true)); - _lazyFinal($, "_newlineRegExp", "$get$_newlineRegExp", () => A.RegExp_RegExp("\\n|\\r\\n|\\r(?!\\n)", false)); - _lazyFinal($, "argumentListClass", "$get$argumentListClass", () => new A.argumentListClass_closure().call$0()); - _lazyFinal($, "booleanClass", "$get$booleanClass", () => new A.booleanClass_closure().call$0()); - _lazyFinal($, "legacyBooleanClass", "$get$legacyBooleanClass", () => new A.legacyBooleanClass_closure().call$0()); - _lazyFinal($, "calculationClass", "$get$calculationClass", () => new A.calculationClass_closure().call$0()); - _lazyFinal($, "calculationOperationClass", "$get$calculationOperationClass", () => new A.calculationOperationClass_closure().call$0()); - _lazyFinal($, "calculationInterpolationClass", "$get$calculationInterpolationClass", () => new A.calculationInterpolationClass_closure().call$0()); - _lazyFinal($, "_microsoftFilterStart0", "$get$_microsoftFilterStart0", () => A.RegExp_RegExp("^[a-zA-Z]+\\s*=", false)); - _lazyFinal($, "global6", "$get$global6", () => { - var _s5_ = "color", - _s27_ = "$red, $green, $blue, $alpha", - _s19_ = "$red, $green, $blue", - _s9_ = "$channels", - _s37_ = "$hue, $saturation, $lightness, $alpha", - _s29_ = "$hue, $saturation, $lightness", - _s17_ = "$hue, $saturation", - _s6_ = "adjust", - _s15_ = "$color, $amount", - t1 = type$.String, - t2 = type$.Value_Function_List_Value_2; - return A.UnmodifiableListView$(A._setArrayType([A._channelFunction0("red", B.RgbColorSpace_mlz0, new A.global_closure44(), true, null).withDeprecationWarning$1(_s5_), A._channelFunction0("green", B.RgbColorSpace_mlz0, new A.global_closure45(), true, null).withDeprecationWarning$1(_s5_), A._channelFunction0("blue", B.RgbColorSpace_mlz0, new A.global_closure46(), true, null).withDeprecationWarning$1(_s5_), $.$get$_mix0().withDeprecationWarning$1(_s5_), A.BuiltInCallable$overloadedFunction0("rgb", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure47(), _s19_, new A.global_closure48(), "$color, $alpha", new A.global_closure49(), "$channels", new A.global_closure50()], t1, t2)), A.BuiltInCallable$overloadedFunction0("rgba", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure51(), _s19_, new A.global_closure52(), "$color, $alpha", new A.global_closure53(), "$channels", new A.global_closure54()], t1, t2)), A._function12("invert", "$color, $weight: 100%, $space: null", new A.global_closure55()), A._channelFunction0("hue", B.HslColorSpace_gsm0, new A.global_closure56(), true, "deg").withDeprecationWarning$1(_s5_), A._channelFunction0("saturation", B.HslColorSpace_gsm0, new A.global_closure57(), true, "%").withDeprecationWarning$1(_s5_), A._channelFunction0("lightness", B.HslColorSpace_gsm0, new A.global_closure58(), true, "%").withDeprecationWarning$1(_s5_), A.BuiltInCallable$overloadedFunction0("hsl", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure59(), _s29_, new A.global_closure60(), _s17_, new A.global_closure61(), "$channels", new A.global_closure62()], t1, t2)), A.BuiltInCallable$overloadedFunction0("hsla", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure63(), _s29_, new A.global_closure64(), _s17_, new A.global_closure65(), "$channels", new A.global_closure66()], t1, t2)), A._function12("grayscale", "$color", new A.global_closure67()), A._function12("adjust-hue", "$color, $degrees", new A.global_closure68()).withDeprecationWarning$2(_s5_, _s6_), A._function12("lighten", _s15_, new A.global_closure69()).withDeprecationWarning$2(_s5_, _s6_), A._function12("darken", _s15_, new A.global_closure70()).withDeprecationWarning$2(_s5_, _s6_), A.BuiltInCallable$overloadedFunction0("saturate", A.LinkedHashMap_LinkedHashMap$_literal(["$amount", new A.global_closure71(), "$color, $amount", new A.global_closure72()], t1, t2)), A._function12("desaturate", _s15_, new A.global_closure73()).withDeprecationWarning$2(_s5_, _s6_), A._function12("opacify", _s15_, new A.global_closure74()).withDeprecationWarning$2(_s5_, _s6_), A._function12("fade-in", _s15_, new A.global_closure75()).withDeprecationWarning$2(_s5_, _s6_), A._function12("transparentize", _s15_, new A.global_closure76()).withDeprecationWarning$2(_s5_, _s6_), A._function12("fade-out", _s15_, new A.global_closure77()).withDeprecationWarning$2(_s5_, _s6_), A.BuiltInCallable$overloadedFunction0("alpha", A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.global_closure78(), "$args...", new A.global_closure79()], t1, t2)), A._function12("opacity", "$color", new A.global_closure80()), A._function12(_s5_, "$description", new A.global_closure81()), A._function12("hwb", _s9_, new A.global_closure82()), A._function12("lab", _s9_, new A.global_closure83()), A._function12("lch", _s9_, new A.global_closure84()), A._function12("oklab", _s9_, new A.global_closure85()), A._function12("oklch", _s9_, new A.global_closure86()), $.$get$_complement0().withDeprecationWarning$1(_s5_), $.$get$_ieHexStr0(), $.$get$_adjust0().withDeprecationWarning$1(_s5_).withName$1("adjust-color"), $.$get$_scale0().withDeprecationWarning$1(_s5_).withName$1("scale-color"), $.$get$_change0().withDeprecationWarning$1(_s5_).withName$1("change-color")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); - }); - _lazyFinal($, "module5", "$get$module5", () => { - var _null = null, - _s10_ = "saturation", - _s9_ = "lightness", - _s6_ = "$color", _s5_ = "alpha", - _s30_ = "$color, $channel, $space: null", - t1 = type$.String, - t2 = type$.Value_Function_List_Value_2; - return A.BuiltInModule$0("color", A._setArrayType([A._channelFunction0("red", B.RgbColorSpace_mlz0, new A.module_closure27(), false, _null), A._channelFunction0("green", B.RgbColorSpace_mlz0, new A.module_closure28(), false, _null), A._channelFunction0("blue", B.RgbColorSpace_mlz0, new A.module_closure29(), false, _null), $.$get$_mix0(), A._function12("invert", "$color, $weight: 100%, $space: null", new A.module_closure30()), A._channelFunction0("hue", B.HslColorSpace_gsm0, new A.module_closure31(), false, "deg"), A._channelFunction0(_s10_, B.HslColorSpace_gsm0, new A.module_closure32(), false, "%"), A._channelFunction0(_s9_, B.HslColorSpace_gsm0, new A.module_closure33(), false, "%"), A._removedColorFunction0("adjust-hue", "hue", false), A._removedColorFunction0("lighten", _s9_, false), A._removedColorFunction0("darken", _s9_, true), A._removedColorFunction0("saturate", _s10_, false), A._removedColorFunction0("desaturate", _s10_, true), A._function12("grayscale", _s6_, new A.module_closure34()), A.BuiltInCallable$overloadedFunction0("hwb", A.LinkedHashMap_LinkedHashMap$_literal(["$hue, $whiteness, $blackness, $alpha: 1", new A.module_closure35(), "$channels", new A.module_closure36()], t1, t2)), A._channelFunction0("whiteness", B.HwbColorSpace_06z0, new A.module_closure37(), false, "%"), A._channelFunction0("blackness", B.HwbColorSpace_06z0, new A.module_closure38(), false, "%"), A._removedColorFunction0("opacify", _s5_, false), A._removedColorFunction0("fade-in", _s5_, false), A._removedColorFunction0("transparentize", _s5_, true), A._removedColorFunction0("fade-out", _s5_, true), A.BuiltInCallable$overloadedFunction0(_s5_, A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.module_closure39(), "$args...", new A.module_closure40()], t1, t2)), A._function12("opacity", _s6_, new A.module_closure41()), A._function12("space", _s6_, new A.module_closure42()), A._function12("to-space", "$color, $space", new A.module_closure43()), A._function12("is-legacy", _s6_, new A.module_closure44()), A._function12("is-missing", "$color, $channel", new A.module_closure45()), A._function12("is-in-gamut", "$color, $space: null", new A.module_closure46()), A._function12("to-gamut", "$color, $space: null, $method: null", new A.module_closure47()), A._function12("channel", _s30_, new A.module_closure48()), A._function12("same", "$color1, $color2", new A.module_closure49()), A._function12("is-powerless", _s30_, new A.module_closure50()), $.$get$_complement0(), $.$get$_adjust0(), $.$get$_scale0(), $.$get$_change0(), $.$get$_ieHexStr0()], type$.JSArray_Callable_2), _null, _null, type$.Callable_2); - }); - _lazyFinal($, "_mix0", "$get$_mix0", () => A._function12("mix", string$.x24color, new A._mix_closure0())); - _lazyFinal($, "_complement0", "$get$_complement0", () => A._function12("complement", "$color, $space: null", new A._complement_closure0())); - _lazyFinal($, "_adjust0", "$get$_adjust0", () => A._function12("adjust", "$color, $kwargs...", new A._adjust_closure0())); - _lazyFinal($, "_scale0", "$get$_scale0", () => A._function12("scale", "$color, $kwargs...", new A._scale_closure0())); - _lazyFinal($, "_change0", "$get$_change0", () => A._function12("change", "$color, $kwargs...", new A._change_closure0())); - _lazyFinal($, "_ieHexStr0", "$get$_ieHexStr0", () => A._function12("ie-hex-str", "$color", new A._ieHexStr_closure0())); - _lazyFinal($, "colorClass", "$get$colorClass", () => new A.colorClass_closure().call$0()); - _lazyFinal($, "legacyColorClass", "$get$legacyColorClass", () => { - var t1 = A.createJSClass("sass.types.Color", new A.legacyColorClass_closure()); - A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getR", new A.legacyColorClass_closure0(), "getG", new A.legacyColorClass_closure1(), "getB", new A.legacyColorClass_closure2(), "getA", new A.legacyColorClass_closure3(), "setR", new A.legacyColorClass_closure4(), "setG", new A.legacyColorClass_closure5(), "setB", new A.legacyColorClass_closure6(), "setA", new A.legacyColorClass_closure7()], type$.String, type$.Function)); - return t1; - }); - _lazyFinal($, "colorsByName0", "$get$colorsByName0", () => A.LinkedHashMap_LinkedHashMap$_literal(["yellowgreen", A.SassColor_SassColor$rgb0(154, 205, 50, 1), "yellow", A.SassColor_SassColor$rgb0(255, 255, 0, 1), "whitesmoke", A.SassColor_SassColor$rgb0(245, 245, 245, 1), "white", A.SassColor_SassColor$rgb0(255, 255, 255, 1), "wheat", A.SassColor_SassColor$rgb0(245, 222, 179, 1), "violet", A.SassColor_SassColor$rgb0(238, 130, 238, 1), "turquoise", A.SassColor_SassColor$rgb0(64, 224, 208, 1), "transparent", A.SassColor_SassColor$rgb0(0, 0, 0, 0), "tomato", A.SassColor_SassColor$rgb0(255, 99, 71, 1), "thistle", A.SassColor_SassColor$rgb0(216, 191, 216, 1), "teal", A.SassColor_SassColor$rgb0(0, 128, 128, 1), "tan", A.SassColor_SassColor$rgb0(210, 180, 140, 1), "steelblue", A.SassColor_SassColor$rgb0(70, 130, 180, 1), "springgreen", A.SassColor_SassColor$rgb0(0, 255, 127, 1), "snow", A.SassColor_SassColor$rgb0(255, 250, 250, 1), "slategrey", A.SassColor_SassColor$rgb0(112, 128, 144, 1), "slategray", A.SassColor_SassColor$rgb0(112, 128, 144, 1), "slateblue", A.SassColor_SassColor$rgb0(106, 90, 205, 1), "skyblue", A.SassColor_SassColor$rgb0(135, 206, 235, 1), "silver", A.SassColor_SassColor$rgb0(192, 192, 192, 1), "sienna", A.SassColor_SassColor$rgb0(160, 82, 45, 1), "seashell", A.SassColor_SassColor$rgb0(255, 245, 238, 1), "seagreen", A.SassColor_SassColor$rgb0(46, 139, 87, 1), "sandybrown", A.SassColor_SassColor$rgb0(244, 164, 96, 1), "salmon", A.SassColor_SassColor$rgb0(250, 128, 114, 1), "saddlebrown", A.SassColor_SassColor$rgb0(139, 69, 19, 1), "royalblue", A.SassColor_SassColor$rgb0(65, 105, 225, 1), "rosybrown", A.SassColor_SassColor$rgb0(188, 143, 143, 1), "red", A.SassColor_SassColor$rgb0(255, 0, 0, 1), "rebeccapurple", A.SassColor_SassColor$rgb0(102, 51, 153, 1), "purple", A.SassColor_SassColor$rgb0(128, 0, 128, 1), "powderblue", A.SassColor_SassColor$rgb0(176, 224, 230, 1), "plum", A.SassColor_SassColor$rgb0(221, 160, 221, 1), "pink", A.SassColor_SassColor$rgb0(255, 192, 203, 1), "peru", A.SassColor_SassColor$rgb0(205, 133, 63, 1), "peachpuff", A.SassColor_SassColor$rgb0(255, 218, 185, 1), "papayawhip", A.SassColor_SassColor$rgb0(255, 239, 213, 1), "palevioletred", A.SassColor_SassColor$rgb0(219, 112, 147, 1), "paleturquoise", A.SassColor_SassColor$rgb0(175, 238, 238, 1), "palegreen", A.SassColor_SassColor$rgb0(152, 251, 152, 1), "palegoldenrod", A.SassColor_SassColor$rgb0(238, 232, 170, 1), "orchid", A.SassColor_SassColor$rgb0(218, 112, 214, 1), "orangered", A.SassColor_SassColor$rgb0(255, 69, 0, 1), "orange", A.SassColor_SassColor$rgb0(255, 165, 0, 1), "olivedrab", A.SassColor_SassColor$rgb0(107, 142, 35, 1), "olive", A.SassColor_SassColor$rgb0(128, 128, 0, 1), "oldlace", A.SassColor_SassColor$rgb0(253, 245, 230, 1), "navy", A.SassColor_SassColor$rgb0(0, 0, 128, 1), "navajowhite", A.SassColor_SassColor$rgb0(255, 222, 173, 1), "moccasin", A.SassColor_SassColor$rgb0(255, 228, 181, 1), "mistyrose", A.SassColor_SassColor$rgb0(255, 228, 225, 1), "mintcream", A.SassColor_SassColor$rgb0(245, 255, 250, 1), "midnightblue", A.SassColor_SassColor$rgb0(25, 25, 112, 1), "mediumvioletred", A.SassColor_SassColor$rgb0(199, 21, 133, 1), "mediumturquoise", A.SassColor_SassColor$rgb0(72, 209, 204, 1), "mediumspringgreen", A.SassColor_SassColor$rgb0(0, 250, 154, 1), "mediumslateblue", A.SassColor_SassColor$rgb0(123, 104, 238, 1), "mediumseagreen", A.SassColor_SassColor$rgb0(60, 179, 113, 1), "mediumpurple", A.SassColor_SassColor$rgb0(147, 112, 219, 1), "mediumorchid", A.SassColor_SassColor$rgb0(186, 85, 211, 1), "mediumblue", A.SassColor_SassColor$rgb0(0, 0, 205, 1), "mediumaquamarine", A.SassColor_SassColor$rgb0(102, 205, 170, 1), "maroon", A.SassColor_SassColor$rgb0(128, 0, 0, 1), "magenta", A.SassColor_SassColor$rgb0(255, 0, 255, 1), "linen", A.SassColor_SassColor$rgb0(250, 240, 230, 1), "limegreen", A.SassColor_SassColor$rgb0(50, 205, 50, 1), "lime", A.SassColor_SassColor$rgb0(0, 255, 0, 1), "lightyellow", A.SassColor_SassColor$rgb0(255, 255, 224, 1), "lightsteelblue", A.SassColor_SassColor$rgb0(176, 196, 222, 1), "lightslategrey", A.SassColor_SassColor$rgb0(119, 136, 153, 1), "lightslategray", A.SassColor_SassColor$rgb0(119, 136, 153, 1), "lightskyblue", A.SassColor_SassColor$rgb0(135, 206, 250, 1), "lightseagreen", A.SassColor_SassColor$rgb0(32, 178, 170, 1), "lightsalmon", A.SassColor_SassColor$rgb0(255, 160, 122, 1), "lightpink", A.SassColor_SassColor$rgb0(255, 182, 193, 1), "lightgrey", A.SassColor_SassColor$rgb0(211, 211, 211, 1), "lightgreen", A.SassColor_SassColor$rgb0(144, 238, 144, 1), "lightgray", A.SassColor_SassColor$rgb0(211, 211, 211, 1), "lightgoldenrodyellow", A.SassColor_SassColor$rgb0(250, 250, 210, 1), "lightcyan", A.SassColor_SassColor$rgb0(224, 255, 255, 1), "lightcoral", A.SassColor_SassColor$rgb0(240, 128, 128, 1), "lightblue", A.SassColor_SassColor$rgb0(173, 216, 230, 1), "lemonchiffon", A.SassColor_SassColor$rgb0(255, 250, 205, 1), "lawngreen", A.SassColor_SassColor$rgb0(124, 252, 0, 1), "lavenderblush", A.SassColor_SassColor$rgb0(255, 240, 245, 1), "lavender", A.SassColor_SassColor$rgb0(230, 230, 250, 1), "khaki", A.SassColor_SassColor$rgb0(240, 230, 140, 1), "ivory", A.SassColor_SassColor$rgb0(255, 255, 240, 1), "indigo", A.SassColor_SassColor$rgb0(75, 0, 130, 1), "indianred", A.SassColor_SassColor$rgb0(205, 92, 92, 1), "hotpink", A.SassColor_SassColor$rgb0(255, 105, 180, 1), "honeydew", A.SassColor_SassColor$rgb0(240, 255, 240, 1), "grey", A.SassColor_SassColor$rgb0(128, 128, 128, 1), "greenyellow", A.SassColor_SassColor$rgb0(173, 255, 47, 1), "green", A.SassColor_SassColor$rgb0(0, 128, 0, 1), "gray", A.SassColor_SassColor$rgb0(128, 128, 128, 1), "goldenrod", A.SassColor_SassColor$rgb0(218, 165, 32, 1), "gold", A.SassColor_SassColor$rgb0(255, 215, 0, 1), "ghostwhite", A.SassColor_SassColor$rgb0(248, 248, 255, 1), "gainsboro", A.SassColor_SassColor$rgb0(220, 220, 220, 1), "fuchsia", A.SassColor_SassColor$rgb0(255, 0, 255, 1), "forestgreen", A.SassColor_SassColor$rgb0(34, 139, 34, 1), "floralwhite", A.SassColor_SassColor$rgb0(255, 250, 240, 1), "firebrick", A.SassColor_SassColor$rgb0(178, 34, 34, 1), "dodgerblue", A.SassColor_SassColor$rgb0(30, 144, 255, 1), "dimgrey", A.SassColor_SassColor$rgb0(105, 105, 105, 1), "dimgray", A.SassColor_SassColor$rgb0(105, 105, 105, 1), "deepskyblue", A.SassColor_SassColor$rgb0(0, 191, 255, 1), "deeppink", A.SassColor_SassColor$rgb0(255, 20, 147, 1), "darkviolet", A.SassColor_SassColor$rgb0(148, 0, 211, 1), "darkturquoise", A.SassColor_SassColor$rgb0(0, 206, 209, 1), "darkslategrey", A.SassColor_SassColor$rgb0(47, 79, 79, 1), "darkslategray", A.SassColor_SassColor$rgb0(47, 79, 79, 1), "darkslateblue", A.SassColor_SassColor$rgb0(72, 61, 139, 1), "darkseagreen", A.SassColor_SassColor$rgb0(143, 188, 143, 1), "darksalmon", A.SassColor_SassColor$rgb0(233, 150, 122, 1), "darkred", A.SassColor_SassColor$rgb0(139, 0, 0, 1), "darkorchid", A.SassColor_SassColor$rgb0(153, 50, 204, 1), "darkorange", A.SassColor_SassColor$rgb0(255, 140, 0, 1), "darkolivegreen", A.SassColor_SassColor$rgb0(85, 107, 47, 1), "darkmagenta", A.SassColor_SassColor$rgb0(139, 0, 139, 1), "darkkhaki", A.SassColor_SassColor$rgb0(189, 183, 107, 1), "darkgrey", A.SassColor_SassColor$rgb0(169, 169, 169, 1), "darkgreen", A.SassColor_SassColor$rgb0(0, 100, 0, 1), "darkgray", A.SassColor_SassColor$rgb0(169, 169, 169, 1), "darkgoldenrod", A.SassColor_SassColor$rgb0(184, 134, 11, 1), "darkcyan", A.SassColor_SassColor$rgb0(0, 139, 139, 1), "darkblue", A.SassColor_SassColor$rgb0(0, 0, 139, 1), "cyan", A.SassColor_SassColor$rgb0(0, 255, 255, 1), "crimson", A.SassColor_SassColor$rgb0(220, 20, 60, 1), "cornsilk", A.SassColor_SassColor$rgb0(255, 248, 220, 1), "cornflowerblue", A.SassColor_SassColor$rgb0(100, 149, 237, 1), "coral", A.SassColor_SassColor$rgb0(255, 127, 80, 1), "chocolate", A.SassColor_SassColor$rgb0(210, 105, 30, 1), "chartreuse", A.SassColor_SassColor$rgb0(127, 255, 0, 1), "cadetblue", A.SassColor_SassColor$rgb0(95, 158, 160, 1), "burlywood", A.SassColor_SassColor$rgb0(222, 184, 135, 1), "brown", A.SassColor_SassColor$rgb0(165, 42, 42, 1), "blueviolet", A.SassColor_SassColor$rgb0(138, 43, 226, 1), "blue", A.SassColor_SassColor$rgb0(0, 0, 255, 1), "blanchedalmond", A.SassColor_SassColor$rgb0(255, 235, 205, 1), "black", A.SassColor_SassColor$rgb0(0, 0, 0, 1), "bisque", A.SassColor_SassColor$rgb0(255, 228, 196, 1), "beige", A.SassColor_SassColor$rgb0(245, 245, 220, 1), "azure", A.SassColor_SassColor$rgb0(240, 255, 255, 1), "aquamarine", A.SassColor_SassColor$rgb0(127, 255, 212, 1), "aqua", A.SassColor_SassColor$rgb0(0, 255, 255, 1), "antiquewhite", A.SassColor_SassColor$rgb0(250, 235, 215, 1), "aliceblue", A.SassColor_SassColor$rgb0(240, 248, 255, 1)], type$.String, type$.SassColor_2)); - _lazyFinal($, "namesByColor0", "$get$namesByColor0", () => { - var $name, - t1 = type$.SassColor_2, - t2 = type$.String, - t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); - for (t1 = A.MapExtensions_get_pairs0($.$get$colorsByName0(), t2, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t2 = t1.get$current(t1); - $name = t2._0; - t3.$indexSet(0, t2._1, $name); - } - return t3; - }); - _lazyFinal($, "nodePackageImporterClass", "$get$nodePackageImporterClass", () => new A.nodePackageImporterClass_closure().call$0()); - _lazyFinal($, "compilerClass", "$get$compilerClass", () => new A.compilerClass_closure().call$0()); - _lazyFinal($, "asyncCompilerClass", "$get$asyncCompilerClass", () => new A.asyncCompilerClass_closure().call$0()); - _lazyFinal($, "lmsToOklab0", "$get$lmsToOklab0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.210454268309314, 0.7936177747023054, -0.0040720430116193, 1.9779985324311684, -2.42859224204858, 0.450593709617411, 0.0259040424655478, 0.7827717124575296, -0.8086757549230774], type$.JSArray_double))); - _lazyFinal($, "oklabToLms0", "$get$oklabToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.0000000000000002, 0.3963377773761749, 0.2158037573099136, 0.9999999999999998, -0.10556134581565854, -0.06385417282581334, 0.9999999999999999, -0.0894841775298118, -1.2914855480194094], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToLinearDisplayP30", "$get$linearSrgbToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8224619687143623, 0.17753803128563775, 0, 0.03319419885096161, 0.9668058011490384, 0, 0.01708263072112003, 0.07239744066396346, 0.9105199286149165], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToLinearSrgb0", "$get$linearDisplayP3ToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2249401762805598, -0.22494017628055996, 0, -0.04205695470968816, 1.042056954709688, 0, -0.01963755459033443, -0.07863604555063188, 1.0982736001409663], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToLinearA98Rgb0", "$get$linearSrgbToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7151256068556247, 0.28487439314437535, 0, 0, 1, 0, 0, 0.04116194845011846, 0.9588380515498816], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToLinearSrgb0", "$get$linearA98RgbToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.3983557439607783, -0.3983557439607783, 0, 0, 1, 0, 0, -0.04292898929447326, 1.0429289892944733], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToLinearRec20200", "$get$linearSrgbToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.627403895934699, 0.3292830383778837, 0.04331306568741722, 0.06909728935823208, 0.9195403950754587, 0.01136231556630917, 0.01639143887515027, 0.08801330787722575, 0.895595253247624], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToLinearSrgb0", "$get$linearRec2020ToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.6604910021084345, -0.5876411387885495, -0.07284986331988487, -0.12455047452159074, 1.1328998971259603, -0.00834942260436947, -0.0181507633549053, -0.10057889800800737, 1.1187296613629127], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToXyzD650", "$get$linearSrgbToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.4123907992659595, 0.35758433938387796, 0.1804807884018343, 0.21263900587151036, 0.7151686787677559, 0.07219231536073371, 0.01933081871559185, 0.11919477979462598, 0.9505321522496606], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToLinearSrgb0", "$get$xyzD65ToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.2409699419045213, -1.5373831775700935, -0.4986107602930033, -0.9692436362808798, 1.8759675015077206, 0.04155505740717561, 0.0556300796969936, -0.20397695888897657, 1.0569715142428786], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToLms0", "$get$linearSrgbToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.412221469470763, 0.5363325372617348, 0.0514459932675022, 0.2119034958178252, 0.6806995506452342, 0.1073969535369405, 0.08830245919005641, 0.2817188391361215, 0.6299787016738221], type$.JSArray_double))); - _lazyFinal($, "lmsToLinearSrgb0", "$get$lmsToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([4.076741636075958, -3.307711539258062, 0.23096990318210417, -1.268437973285032, 2.609757349287689, -0.3413193760026571, -0.00419607613867551, -0.7034186179359363, 1.707614694074612], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToLinearProphotoRgb0", "$get$linearSrgbToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5292769776226116, 0.33015450197849283, 0.14056852039889556, 0.09836585954044917, 0.8734707129069618, 0.028163427552589, 0.01687534092138684, 0.11765941425612084, 0.8654652448224923], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToLinearSrgb0", "$get$linearProphotoRgbToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.034380849516996, -0.7276357899341342, -0.3067450595828618, -0.22882573163305037, 1.2317425411901048, -0.00291680955705449, -0.00855882878391742, -0.1532667021380372, 1.1618255309219547], type$.JSArray_double))); - _lazyFinal($, "linearSrgbToXyzD500", "$get$linearSrgbToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.43606574687426936, 0.3851515095901596, 0.14307841996513868, 0.22249317711056518, 0.7168870130944824, 0.06061980979495235, 0.01392392146316939, 0.09708132423141015, 0.7140993568158807], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToLinearSrgb0", "$get$xyzD50ToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.1341358529001178, -1.617385998018042, -0.49066221791109754, -0.9787954765557777, 1.9162543773959884, 0.03344287339036693, 0.07195539255794733, -0.228976759815182, 1.4053860351131182], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToLinearA98Rgb0", "$get$linearDisplayP3ToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8640051374740484, 0.13599486252595164, 0, -0.04205695470968816, 1.042056954709688, 0, -0.02056038078232985, -0.03250613804550798, 1.0530665188278379], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToLinearDisplayP30", "$get$linearA98RgbToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.1500944181410184, -0.15009441814101834, 0, 0.04641729862941844, 0.9535827013705815, 0, 0.02388759479083904, 0.02650477632633013, 0.9496076288828308], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToLinearRec20200", "$get$linearDisplayP3ToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7538330343617218, 0.1985973690526163, 0.04756959658566187, 0.04574384896535833, 0.9417772198116935, 0.01247893122294812, -0.00121034035451832, 0.01760171730108989, 0.9836086230534284], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToLinearDisplayP30", "$get$linearRec2020ToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.343578252584332, -0.2821796705261357, -0.06139858205819628, -0.06529745278911953, 1.0757879158485746, -0.01049046305945495, 0.00282178726170095, -0.01959849452449406, 1.0167767072627931], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToXyzD650", "$get$linearDisplayP3ToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.48657094864821626, 0.26566769316909294, 0.1982172852343625, 0.22897456406974884, 0.6917385218365062, 0.079286914093745, 0, 0.04511338185890257, 1.0439443689009757], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToLinearDisplayP30", "$get$xyzD65ToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.4934969119414245, -0.9313836179191236, -0.40271078445071684, -0.8294889695615749, 1.7626640603183468, 0.02362468584194359, 0.03584583024378433, -0.0761723892680417, 0.9568845240076873], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToLms0", "$get$linearDisplayP3ToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.48137985274995443, 0.46211837101131803, 0.05650177623872756, 0.22883194181124472, 0.6532168193835676, 0.11795123880518774, 0.08394575232299319, 0.22416527097756642, 0.6918889766994404], type$.JSArray_double))); - _lazyFinal($, "lmsToLinearDisplayP30", "$get$lmsToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.1277689713618737, -2.2571357625916386, 0.12936679122976494, -1.0910090184377979, 2.4133317103069225, -0.32232269186912466, -0.02601080193857045, -0.508041331704167, 1.5340521336427373], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToLinearProphotoRgb0", "$get$linearDisplayP3ToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6316869193403589, 0.21393038569465722, 0.1543826949649839, 0.08320371426648458, 0.8858651367630243, 0.03093114897049121, -0.00127273456473881, 0.05075510433665735, 0.9505176302280814], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToLinearDisplayP30", "$get$linearProphotoRgbToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.6325756087069179, -0.3797716184825984, -0.2528039902243195, -0.15370040233755072, 1.1667025472425014, -0.01300214490495082, 0.01039319529676572, -0.0628073126495944, 1.0524141173528287], type$.JSArray_double))); - _lazyFinal($, "linearDisplayP3ToXyzD500", "$get$linearDisplayP3ToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.515146442968116, 0.2920099820638577, 0.15713925139759397, 0.2412003221252552, 0.6922225411313818, 0.06657713674336294, -0.00105013914714014, 0.0418782701890746, 0.7842764714685257], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToLinearDisplayP30", "$get$xyzD50ToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.4039341218554973, -0.9900304424955931, -0.39761363181465614, -0.8422700161454688, 1.7989580161067082, 0.01604562477090472, 0.04819381686413303, -0.09738519815446048, 1.2736713693321273], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToLinearRec20200", "$get$linearA98RgbToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8773338416636568, 0.07749370651571998, 0.04517245182062317, 0.09662259146620378, 0.8915273202441805, 0.01185008828961569, 0.02292106270284839, 0.04303668501067932, 0.9340422522864723], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToLinearA98Rgb0", "$get$linearRec2020ToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.1519783947159163, -0.0975030553024086, -0.05447533941350766, -0.12455047452159074, 1.1328998971259603, -0.00834942260436947, -0.0225303827810559, -0.04980650742838876, 1.0723368902094446], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToXyzD650", "$get$linearA98RgbToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5766690429101308, 0.18555823790654627, 0.18822864623499472, 0.29734497525053616, 0.627363566255466, 0.07529145849399789, 0.02703136138641237, 0.07068885253582714, 0.9913375368376389], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToLinearA98Rgb0", "$get$xyzD65ToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.041587903810746, -0.5650069742788596, -0.3447313507783295, -0.9692436362808798, 1.8759675015077206, 0.04155505740717561, 0.01344428063203102, -0.11836239223101823, 1.0151749943912054], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToLms0", "$get$linearA98RgbToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5764322596183941, 0.36991322261987963, 0.05365451776172635, 0.29631647054222465, 0.5916761332521885, 0.11200739620558686, 0.1234782510142776, 0.21949869837199862, 0.6570230506137238], type$.JSArray_double))); - _lazyFinal($, "lmsToLinearA98Rgb0", "$get$lmsToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.5540368386115566, -1.6219761806828699, 0.06793934207131327, -1.268437973285032, 2.609757349287689, -0.3413193760026571, -0.05623473593749381, -0.5670418395669061, 1.6232765755043999], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToLinearProphotoRgb0", "$get$linearA98RgbToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7401175018047792, 0.11327951328898105, 0.1466029849062397, 0.1375504646980262, 0.833077080269484, 0.02937245503248977, 0.02359772990871766, 0.07378347703906656, 0.9026187930522158], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToLinearA98Rgb0", "$get$linearProphotoRgbToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.38965124815152, -0.16945907691487766, -0.22019217123664242, -0.22882573163305037, 1.2317425411901048, -0.00291680955705449, -0.01762544368426068, -0.09625702306122665, 1.1138824667454874], type$.JSArray_double))); - _lazyFinal($, "linearA98RgbToXyzD500", "$get$linearA98RgbToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6097750418861814, 0.20530000261929401, 0.14922063192409227, 0.31112461220464155, 0.6256532308346856, 0.06322215696067286, 0.01947059555648168, 0.06087908649415867, 0.7447549204598198], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToLinearA98Rgb0", "$get$xyzD50ToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.9624670363768806, -0.6107423404815073, -0.3413580980827154, -0.9787954765557777, 1.9162543773959884, 0.03344287339036693, 0.02870443944957101, -0.1406748663317068, 1.3489141814137937], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToXyzD650", "$get$linearRec2020ToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6369580483012913, 0.14461690358620838, 0.16888097516417205, 0.26270021201126703, 0.677998071518871, 0.05930171646986194, 0, 0.0280726930490875, 1.0609850577107909], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToLinearRec20200", "$get$xyzD65ToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.7166511879712676, -0.3556707837763924, -0.2533662813736598, -0.666684351832489, 1.616481236634939, 0.01576854581391113, 0.01763985744531091, -0.04277061325780865, 0.942103121235474], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToLms0", "$get$linearRec2020ToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6167557848654444, 0.36019840122646335, 0.02304581390809228, 0.2651330593926367, 0.6358393720678491, 0.09902756853951408, 0.10010262952034828, 0.20390652261661452, 0.6959908478630372], type$.JSArray_double))); - _lazyFinal($, "lmsToLinearRec20200", "$get$lmsToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.1399067304346513, -1.246389493760618, 0.10648276332596668, -0.8847358357577674, 2.1632309383612007, -0.2784951026034334, -0.04857374640044396, -0.4545031497140964, 1.5030768961145404], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToLinearProphotoRgb0", "$get$linearRec2020ToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8351873331297235, 0.04886884858605698, 0.11594381828421951, 0.05403324519953363, 0.9289184085692044, 0.01704834623126199, -0.00234203897072539, 0.03633215316169465, 0.9660098858090307], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToLinearRec20200", "$get$linearProphotoRgbToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.200659329517408, -0.05756805370122346, -0.14309127581618444, -0.06994154955888504, 1.080617897597214, -0.01067634803832895, 0.00554147334294746, -0.04078219298657951, 1.035240719643632], type$.JSArray_double))); - _lazyFinal($, "linearRec2020ToXyzD500", "$get$linearRec2020ToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.673515463188276, 0.16569726370390453, 0.12508294953738705, 0.2790590051411206, 0.6753180057491098, 0.04562298910976962, -0.00193242713400438, 0.02997782679282923, 0.7970592028516355], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToLinearRec20200", "$get$xyzD50ToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.647184904671766, -0.3936818981316471, -0.23595963848828266, -0.6826641074173818, 1.6477146127444076, 0.01281708338512084, 0.02966887665275675, -0.0629258964297003, 1.2535578201865771], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToLms0", "$get$xyzD65ToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.819022437996703, 0.36190626005289034, -0.12887378152098788, 0.03298365393238846, 0.9292868615863433, 0.03614466635064235, 0.0481771893596242, 0.2642395317527308, 0.6335478284694308], type$.JSArray_double))); - _lazyFinal($, "lmsToXyzD650", "$get$lmsToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2268798758459243, -0.5578149944602171, 0.2813910456659646, -0.04057574521480084, 1.1122868032803173, -0.07171105806551635, -0.07637293667466007, -0.42149333240224324, 1.5869240198367818], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToLinearProphotoRgb0", "$get$xyzD65ToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.4031904633774979, -0.22301514479051668, -0.1016066850741379, -0.5262384021633072, 1.4816319629234644, 0.01701879027252688, -0.0112022652862215, 0.01824640347962099, 0.9112472274915048], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToXyzD650", "$get$linearProphotoRgbToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.755590742296921, 0.11271984265940525, 0.0821453420953454, 0.2683218435785719, 0.7151152566617912, 0.01656289975963685, 0.0039159727624258, -0.01293344283684181, 1.0980752208342945], type$.JSArray_double))); - _lazyFinal($, "xyzD65ToXyzD500", "$get$xyzD65ToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.0479297925449966, 0.02294687060160952, -0.05019226628920519, 0.02962780877005567, 0.99043442675388, -0.01707379906341879, -0.00924304064620452, 0.01505519149029816, 0.751874281428137], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToXyzD650", "$get$xyzD50ToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.9554734214880752, -0.02309845494876452, 0.06325924320057065, -0.02836970933386358, 1.0099953980813041, 0.0210414411919173, 0.01231401486448199, -0.02050764929889898, 1.330365926242124], type$.JSArray_double))); - _lazyFinal($, "lmsToLinearProphotoRgb0", "$get$lmsToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.7383551481157207, -0.9879509427514458, 0.24959579463572504, -0.7070494015329266, 1.9343700444401382, -0.2273206429072115, -0.08407882206239634, -0.35754060521141334, 1.4416194272738097], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToLms0", "$get$linearProphotoRgbToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7154484605655534, 0.35279155007721186, -0.0682400106427653, 0.2744116490015671, 0.6677976498412367, 0.05779070115719616, 0.10978443261622942, 0.18619829115002018, 0.7040172762337504], type$.JSArray_double))); - _lazyFinal($, "lmsToXyzD500", "$get$lmsToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.288586218172706, -0.5378717444973745, 0.2135812027542364, -0.00253387643187372, 1.0923167988719165, -0.08978292244004273, -0.06937382305734124, -0.29500839894431263, 1.1894868245121142], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToLms0", "$get$xyzD50ToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7707000420431172, 0.34924840261939616, -0.11202351884164681, 0.00559649248368848, 0.9370723401136769, 0.06972568836252771, 0.04633714262191069, 0.25277531574310524, 0.851458076746796], type$.JSArray_double))); - _lazyFinal($, "linearProphotoRgbToXyzD500", "$get$linearProphotoRgbToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7977666449006423, 0.13518129740053308, 0.0313477341283922, 0.2880748288194013, 0.711835234241873, 0.00008993693872564, 0, 0, 0.8251046025104602], type$.JSArray_double))); - _lazyFinal($, "xyzD50ToLinearProphotoRgb0", "$get$xyzD50ToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.3457868816471583, -0.25557208737979464, -0.05110186497554526, -0.5446307051249019, 1.5082477428451468, 0.02052744743642139, 0, 0, 1.2119675456389452], type$.JSArray_double))); - _lazyFinal($, "_disallowedFunctionNames0", "$get$_disallowedFunctionNames0", () => { - var t1 = $.$get$globalFunctions0(); - t1 = t1.map$1$1(t1, new A._disallowedFunctionNames_closure0(), type$.String).toSet$0(0); - t1.add$1(0, "if"); - t1.remove$1(0, "rgb"); - t1.remove$1(0, "rgba"); - t1.remove$1(0, "hsl"); - t1.remove$1(0, "hsla"); - t1.remove$1(0, "grayscale"); - t1.remove$1(0, "invert"); - t1.remove$1(0, "alpha"); - t1.remove$1(0, "opacity"); - t1.remove$1(0, "saturate"); - t1.remove$1(0, "min"); - t1.remove$1(0, "max"); - t1.remove$1(0, "round"); - t1.remove$1(0, "abs"); - return t1; - }); - _lazyFinal($, "deprecations", "$get$deprecations", () => { - var _i, deprecation, t2, - t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, A.findType("Deprecation1?")); - for (_i = 0; _i < 24; ++_i) { - deprecation = B.List_31K[_i]; - if (deprecation !== B.Deprecation_ErI) { - t2 = deprecation.id; - t1.$indexSet(0, t2, {id: t2, status: new A.deprecations_closure(deprecation).call$0(), description: deprecation.description, deprecatedIn: deprecation.get$deprecatedIn(0), obsoleteIn: deprecation.get$deprecatedIn(0)}); - } - } - return t1; - }); - _lazyFinal($, "versionClass", "$get$versionClass", () => new A.versionClass_closure().call$0()); - _lazyFinal($, "exceptionClass", "$get$exceptionClass", () => new A.exceptionClass_closure().call$0()); - _lazyFinal($, "FilesystemImporter_cwd0", "$get$FilesystemImporter_cwd0", () => { - var _null = null; - return new A.FilesystemImporter0(A.absolute(".", _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), true); - }); - _lazyFinal($, "functionClass", "$get$functionClass", () => new A.functionClass_closure().call$0()); - _lazyFinal($, "globalFunctions0", "$get$globalFunctions0", () => { - var t1 = type$.BuiltInCallable_2, - t2 = A.List_List$of($.$get$global6(), true, t1); - B.JSArray_methods.addAll$1(t2, $.$get$global7()); - B.JSArray_methods.addAll$1(t2, $.$get$global8()); - B.JSArray_methods.addAll$1(t2, $.$get$global9()); - B.JSArray_methods.addAll$1(t2, $.$get$global10()); - B.JSArray_methods.addAll$1(t2, $.$get$global11()); - B.JSArray_methods.addAll$1(t2, $.$get$global12()); - t2.push(A.BuiltInCallable$function0("if", "$condition, $if-true, $if-false", new A.globalFunctions_closure0(), null)); - return A.UnmodifiableListView$(t2, t1); - }); - _lazyFinal($, "coreModules0", "$get$coreModules0", () => A.UnmodifiableListView$(A._setArrayType([$.$get$module5(), $.$get$module6(), $.$get$module7(), $.$get$module8(), $.$get$module9(), $.$get$module10()], A.findType("JSArray>")), type$.BuiltInModule_Callable_2)); - _lazyFinal($, "IfExpression_declaration0", "$get$IfExpression_declaration0", () => A.ArgumentDeclaration_ArgumentDeclaration$parse0(string$.x40funct, null)); - _lazyFinal($, "global7", "$get$global7", () => { - var _s4_ = "list"; - return A.UnmodifiableListView$(A._setArrayType([$.$get$_length2().withDeprecationWarning$1(_s4_), $.$get$_nth0().withDeprecationWarning$1(_s4_), $.$get$_setNth0().withDeprecationWarning$1(_s4_), $.$get$_join0().withDeprecationWarning$1(_s4_), $.$get$_append2().withDeprecationWarning$1(_s4_), $.$get$_zip0().withDeprecationWarning$1(_s4_), $.$get$_index2().withDeprecationWarning$1(_s4_), $.$get$_isBracketed0().withDeprecationWarning$1(_s4_), $.$get$_separator0().withDeprecationWarning$1(_s4_).withName$1("list-separator")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); - }); - _lazyFinal($, "module6", "$get$module6", () => A.BuiltInModule$0("list", A._setArrayType([$.$get$_length2(), $.$get$_nth0(), $.$get$_setNth0(), $.$get$_join0(), $.$get$_append2(), $.$get$_zip0(), $.$get$_index2(), $.$get$_isBracketed0(), $.$get$_separator0(), $.$get$_slash0()], type$.JSArray_Callable_2), null, null, type$.Callable_2)); - _lazyFinal($, "_length1", "$get$_length2", () => A._function11("length", "$list", new A._length_closure2())); - _lazyFinal($, "_nth0", "$get$_nth0", () => A._function11("nth", "$list, $n", new A._nth_closure0())); - _lazyFinal($, "_setNth0", "$get$_setNth0", () => A._function11("set-nth", "$list, $n, $value", new A._setNth_closure0())); - _lazyFinal($, "_join0", "$get$_join0", () => A._function11("join", string$.x24list1, new A._join_closure0())); - _lazyFinal($, "_append1", "$get$_append2", () => A._function11("append", "$list, $val, $separator: auto", new A._append_closure2())); - _lazyFinal($, "_zip0", "$get$_zip0", () => A._function11("zip", "$lists...", new A._zip_closure0())); - _lazyFinal($, "_index1", "$get$_index2", () => A._function11("index", "$list, $value", new A._index_closure2())); - _lazyFinal($, "_separator0", "$get$_separator0", () => A._function11("separator", "$list", new A._separator_closure0())); - _lazyFinal($, "_isBracketed0", "$get$_isBracketed0", () => A._function11("is-bracketed", "$list", new A._isBracketed_closure0())); - _lazyFinal($, "_slash0", "$get$_slash0", () => A._function11("slash", "$elements...", new A._slash_closure0())); - _lazyFinal($, "listClass", "$get$listClass", () => new A.listClass_closure().call$0()); - _lazyFinal($, "legacyListClass", "$get$legacyListClass", () => { - var t1 = A.createJSClass("sass.types.List", new A.legacyListClass_closure()); - A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getValue", new A.legacyListClass_closure0(), "setValue", new A.legacyListClass_closure1(), "getSeparator", new A.legacyListClass_closure2(), "setSeparator", new A.legacyListClass_closure3(), "getLength", new A.legacyListClass_closure4()], type$.String, type$.Function)); - return t1; - }); - _lazyFinal($, "global8", "$get$global8", () => { - var _s3_ = "map"; - return A.UnmodifiableListView$(A._setArrayType([$.$get$_get0().withDeprecationWarning$1(_s3_).withName$1("map-get"), $.$get$_merge0().withDeprecationWarning$1(_s3_).withName$1("map-merge"), $.$get$_remove0().withDeprecationWarning$1(_s3_).withName$1("map-remove"), $.$get$_keys0().withDeprecationWarning$1(_s3_).withName$1("map-keys"), $.$get$_values0().withDeprecationWarning$1(_s3_).withName$1("map-values"), $.$get$_hasKey0().withDeprecationWarning$1(_s3_).withName$1("map-has-key")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); - }); - _lazyFinal($, "module7", "$get$module7", () => A.BuiltInModule$0("map", A._setArrayType([$.$get$_get0(), $.$get$_set0(), $.$get$_merge0(), $.$get$_remove0(), $.$get$_keys0(), $.$get$_values0(), $.$get$_hasKey0(), $.$get$_deepMerge0(), $.$get$_deepRemove0()], type$.JSArray_Callable_2), null, null, type$.Callable_2)); - _lazyFinal($, "_get0", "$get$_get0", () => A._function10("get", "$map, $key, $keys...", new A._get_closure0())); - _lazyFinal($, "_set0", "$get$_set0", () => A.BuiltInCallable$overloadedFunction0("set", A.LinkedHashMap_LinkedHashMap$_literal(["$map, $key, $value", new A._set_closure1(), "$map, $args...", new A._set_closure2()], type$.String, type$.Value_Function_List_Value_2))); - _lazyFinal($, "_merge0", "$get$_merge0", () => A.BuiltInCallable$overloadedFunction0("merge", A.LinkedHashMap_LinkedHashMap$_literal(["$map1, $map2", new A._merge_closure1(), "$map1, $args...", new A._merge_closure2()], type$.String, type$.Value_Function_List_Value_2))); - _lazyFinal($, "_deepMerge0", "$get$_deepMerge0", () => A._function10("deep-merge", "$map1, $map2", new A._deepMerge_closure0())); - _lazyFinal($, "_deepRemove0", "$get$_deepRemove0", () => A._function10("deep-remove", "$map, $key, $keys...", new A._deepRemove_closure0())); - _lazyFinal($, "_remove0", "$get$_remove0", () => A.BuiltInCallable$overloadedFunction0("remove", A.LinkedHashMap_LinkedHashMap$_literal(["$map", new A._remove_closure1(), "$map, $key, $keys...", new A._remove_closure2()], type$.String, type$.Value_Function_List_Value_2))); - _lazyFinal($, "_keys0", "$get$_keys0", () => A._function10("keys", "$map", new A._keys_closure0())); - _lazyFinal($, "_values0", "$get$_values0", () => A._function10("values", "$map", new A._values_closure0())); - _lazyFinal($, "_hasKey0", "$get$_hasKey0", () => A._function10("has-key", "$map, $key, $keys...", new A._hasKey_closure0())); - _lazyFinal($, "mapClass", "$get$mapClass", () => new A.mapClass_closure().call$0()); - _lazyFinal($, "legacyMapClass", "$get$legacyMapClass", () => { - var t1 = A.createJSClass("sass.types.Map", new A.legacyMapClass_closure()); - A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getKey", new A.legacyMapClass_closure0(), "getValue", new A.legacyMapClass_closure1(), "getLength", new A.legacyMapClass_closure2(), "setKey", new A.legacyMapClass_closure3(), "setValue", new A.legacyMapClass_closure4()], type$.String, type$.Function)); - return t1; - }); - _lazyFinal($, "global9", "$get$global9", () => { - var _s4_ = "math"; - return A.UnmodifiableListView$(A._setArrayType([A._function9("abs", "$number", new A.global_closure43()), $.$get$_ceil0().withDeprecationWarning$1(_s4_), $.$get$_floor0().withDeprecationWarning$1(_s4_), $.$get$_max0().withDeprecationWarning$1(_s4_), $.$get$_min0().withDeprecationWarning$1(_s4_), $.$get$_percentage0().withDeprecationWarning$1(_s4_), $.$get$_randomFunction0().withDeprecationWarning$1(_s4_), $.$get$_round0().withDeprecationWarning$1(_s4_), $.$get$_unit0().withDeprecationWarning$1(_s4_), $.$get$_compatible0().withDeprecationWarning$1(_s4_).withName$1("comparable"), $.$get$_isUnitless0().withDeprecationWarning$1(_s4_).withName$1("unitless")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); - }); - _lazyFinal($, "module8", "$get$module8", () => { - var _null = null; - return A.BuiltInModule$0("math", A._setArrayType([A._numberFunction0("abs", new A.module_closure26()), $.$get$_acos0(), $.$get$_asin0(), $.$get$_atan0(), $.$get$_atan20(), $.$get$_ceil0(), $.$get$_clamp0(), $.$get$_cos0(), $.$get$_compatible0(), $.$get$_floor0(), $.$get$_hypot0(), $.$get$_isUnitless0(), $.$get$_log0(), $.$get$_max0(), $.$get$_min0(), $.$get$_percentage0(), $.$get$_pow0(), $.$get$_randomFunction0(), $.$get$_round0(), $.$get$_sin0(), $.$get$_sqrt0(), $.$get$_tan0(), $.$get$_unit0(), $.$get$_div0()], type$.JSArray_Callable_2), _null, A.LinkedHashMap_LinkedHashMap$_literal(["e", A.SassNumber_SassNumber0(2.718281828459045, _null), "pi", A.SassNumber_SassNumber0(3.141592653589793, _null), "epsilon", A.SassNumber_SassNumber0(2220446049250313e-31, _null), "max-safe-integer", A.SassNumber_SassNumber0(9007199254740991, _null), "min-safe-integer", A.SassNumber_SassNumber0(-9007199254740991, _null), "max-number", A.SassNumber_SassNumber0(17976931348623157e292, _null), "min-number", A.SassNumber_SassNumber0(5e-324, _null)], type$.String, type$.Value_2), type$.Callable_2); - }); - _lazyFinal($, "_ceil0", "$get$_ceil0", () => A._numberFunction0("ceil", new A._ceil_closure0())); - _lazyFinal($, "_clamp0", "$get$_clamp0", () => A._function9("clamp", "$min, $number, $max", new A._clamp_closure0())); - _lazyFinal($, "_floor0", "$get$_floor0", () => A._numberFunction0("floor", new A._floor_closure0())); - _lazyFinal($, "_max0", "$get$_max0", () => A._function9("max", "$numbers...", new A._max_closure0())); - _lazyFinal($, "_min0", "$get$_min0", () => A._function9("min", "$numbers...", new A._min_closure0())); - _lazyFinal($, "_round0", "$get$_round0", () => A._numberFunction0("round", new A._round_closure0())); - _lazyFinal($, "_hypot0", "$get$_hypot0", () => A._function9("hypot", "$numbers...", new A._hypot_closure0())); - _lazyFinal($, "_log0", "$get$_log0", () => A._function9("log", "$number, $base: null", new A._log_closure0())); - _lazyFinal($, "_pow0", "$get$_pow0", () => A._function9("pow", "$base, $exponent", new A._pow_closure0())); - _lazyFinal($, "_sqrt0", "$get$_sqrt0", () => A._singleArgumentMathFunc0("sqrt", A.number2__sqrt$closure())); - _lazyFinal($, "_acos0", "$get$_acos0", () => A._singleArgumentMathFunc0("acos", A.number2__acos$closure())); - _lazyFinal($, "_asin0", "$get$_asin0", () => A._singleArgumentMathFunc0("asin", A.number2__asin$closure())); - _lazyFinal($, "_atan0", "$get$_atan0", () => A._singleArgumentMathFunc0("atan", A.number2__atan$closure())); - _lazyFinal($, "_atan20", "$get$_atan20", () => A._function9("atan2", "$y, $x", new A._atan2_closure0())); - _lazyFinal($, "_cos0", "$get$_cos0", () => A._singleArgumentMathFunc0("cos", A.number2__cos$closure())); - _lazyFinal($, "_sin0", "$get$_sin0", () => A._singleArgumentMathFunc0("sin", A.number2__sin$closure())); - _lazyFinal($, "_tan0", "$get$_tan0", () => A._singleArgumentMathFunc0("tan", A.number2__tan$closure())); - _lazyFinal($, "_compatible0", "$get$_compatible0", () => A._function9("compatible", "$number1, $number2", new A._compatible_closure0())); - _lazyFinal($, "_isUnitless0", "$get$_isUnitless0", () => A._function9("is-unitless", "$number", new A._isUnitless_closure0())); - _lazyFinal($, "_unit0", "$get$_unit0", () => A._function9("unit", "$number", new A._unit_closure0())); - _lazyFinal($, "_percentage0", "$get$_percentage0", () => A._function9("percentage", "$number", new A._percentage_closure0())); - _lazyFinal($, "_random1", "$get$_random2", () => A.Random_Random()); - _lazyFinal($, "_randomFunction0", "$get$_randomFunction0", () => A._function9("random", "$limit: null", new A._randomFunction_closure0())); - _lazyFinal($, "_div0", "$get$_div0", () => A._function9("div", "$number1, $number2", new A._div_closure0())); - _lazyFinal($, "_shared0", "$get$_shared0", () => A.UnmodifiableListView$(A._setArrayType([A._function6("feature-exists", "$feature", new A._shared_closure3()), A._function6("inspect", "$value", new A._shared_closure4()), A._function6("type-of", "$value", new A._shared_closure5()), A._function6("keywords", "$args", new A._shared_closure6())], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2)); - _lazyFinal($, "global10", "$get$global12", () => { - var t2, - t1 = A._setArrayType([], type$.JSArray_BuiltInCallable_2); - for (t2 = $.$get$_shared0(), t2 = t2.get$iterator(t2); t2.moveNext$0();) - t1.push(t2.get$current(0).withDeprecationWarning$1("meta")); - return A.UnmodifiableListView$(t1, type$.BuiltInCallable_2); - }); - _lazyFinal($, "moduleFunctions0", "$get$moduleFunctions0", () => { - var t1 = type$.BuiltInCallable_2, - t2 = A.List_List$of($.$get$_shared0(), true, t1); - t2.push(A._function6("calc-name", "$calc", new A.moduleFunctions_closure2())); - t2.push(A._function6("calc-args", "$calc", new A.moduleFunctions_closure3())); - t2.push(A._function6("accepts-content", "$mixin", new A.moduleFunctions_closure4())); - return A.UnmodifiableListView$(t2, t1); - }); - _lazyFinal($, "mixinClass", "$get$mixinClass", () => new A.mixinClass_closure().call$0()); - _lazyFinal($, "legacyNullClass", "$get$legacyNullClass", () => new A.legacyNullClass_closure().call$0()); - _lazyFinal($, "_epsilon0", "$get$_epsilon0", () => A.pow(10, -11)); - _lazyFinal($, "_inverseEpsilon0", "$get$_inverseEpsilon0", () => A.pow(10, 11)); - _lazyFinal($, "numberClass", "$get$numberClass", () => new A.numberClass_closure().call$0()); - _lazyFinal($, "legacyNumberClass", "$get$legacyNumberClass", () => { - var t1 = A.createJSClass("sass.types.Number", new A.legacyNumberClass_closure()); - A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getValue", new A.legacyNumberClass_closure0(), "setValue", new A.legacyNumberClass_closure1(), "getUnit", new A.legacyNumberClass_closure2(), "setUnit", new A.legacyNumberClass_closure3()], type$.String, type$.Function)); - return t1; - }); - _lazyFinal($, "_typesByUnit0", "$get$_typesByUnit0", () => { - var t3, type, - t1 = type$.String, - t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); - for (t1 = A.MapExtensions_get_pairs0(B.Map_397RH, t1, type$.List_String), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - t3 = t1.get$current(t1); - type = t3._0; - for (t3 = J.get$iterator$ax(t3._1); t3.moveNext$0();) - t2.$indexSet(0, t3.get$current(t3), type); - } - return t2; - }); - _lazyFinal($, "_interpolation", "$get$_interpolation", () => A.Interpolation$0(B.List_empty28, B.List_empty29, $.$get$bogusSpan0())); - _lazyFinal($, "_expression", "$get$_expression", () => A.NullExpression$($.$get$bogusSpan0())); - _lazyFinal($, "global11", "$get$global10", () => { - var _s8_ = "selector"; - return A.UnmodifiableListView$(A._setArrayType([$.$get$_isSuperselector0().withDeprecationWarning$1(_s8_), $.$get$_simpleSelectors0().withDeprecationWarning$1(_s8_), $.$get$_parse0().withDeprecationWarning$1(_s8_).withName$1("selector-parse"), $.$get$_nest0().withDeprecationWarning$1(_s8_).withName$1("selector-nest"), $.$get$_append1().withDeprecationWarning$1(_s8_).withName$1("selector-append"), $.$get$_extend0().withDeprecationWarning$1(_s8_).withName$1("selector-extend"), $.$get$_replace0().withDeprecationWarning$1(_s8_).withName$1("selector-replace"), $.$get$_unify0().withDeprecationWarning$1(_s8_).withName$1("selector-unify")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); - }); - _lazyFinal($, "module9", "$get$module9", () => A.BuiltInModule$0("selector", A._setArrayType([$.$get$_isSuperselector0(), $.$get$_simpleSelectors0(), $.$get$_parse0(), $.$get$_nest0(), $.$get$_append1(), $.$get$_extend0(), $.$get$_replace0(), $.$get$_unify0()], type$.JSArray_Callable_2), null, null, type$.Callable_2)); - _lazyFinal($, "_nest0", "$get$_nest0", () => A._function8("nest", "$selectors...", new A._nest_closure0())); - _lazyFinal($, "_append2", "$get$_append1", () => A._function8("append", "$selectors...", new A._append_closure1())); - _lazyFinal($, "_extend0", "$get$_extend0", () => A._function8("extend", "$selector, $extendee, $extender", new A._extend_closure0())); - _lazyFinal($, "_replace0", "$get$_replace0", () => A._function8("replace", "$selector, $original, $replacement", new A._replace_closure0())); - _lazyFinal($, "_unify0", "$get$_unify0", () => A._function8("unify", "$selector1, $selector2", new A._unify_closure0())); - _lazyFinal($, "_isSuperselector0", "$get$_isSuperselector0", () => A._function8("is-superselector", "$super, $sub", new A._isSuperselector_closure0())); - _lazyFinal($, "_simpleSelectors0", "$get$_simpleSelectors0", () => A._function8("simple-selectors", "$selector", new A._simpleSelectors_closure0())); - _lazyFinal($, "_parse1", "$get$_parse0", () => A._function8("parse", "$selector", new A._parse_closure0())); - _lazyFinal($, "_knownCompatibilitiesByUnit0", "$get$_knownCompatibilitiesByUnit0", () => { - var _i, set, t2, - t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, A.findType("Set")); - for (_i = 0; _i < 5; ++_i) { - set = B.List_Eeh[_i]; - for (t2 = set.get$iterator(set); t2.moveNext$0();) - t1.$indexSet(0, t2.get$current(0), set); - } - return t1; - }); - _lazyFinal($, "bogusSpan0", "$get$bogusSpan0", () => A.SourceFile$decoded(A._setArrayType([], type$.JSArray_int), null).span$1(0, 0)); - _lazyFinal($, "_random2", "$get$_random1", () => A.Random_Random()); - _lazy($, "_previousUniqueId0", "$get$_previousUniqueId0", () => $.$get$_random1().nextInt$1(A._asInt(A.pow(36, 6)))); - _lazyFinal($, "global12", "$get$global11", () => { - var _s6_ = "string"; - return A.UnmodifiableListView$(A._setArrayType([$.$get$_unquote0().withDeprecationWarning$1(_s6_), $.$get$_quote0().withDeprecationWarning$1(_s6_), $.$get$_toUpperCase0().withDeprecationWarning$1(_s6_), $.$get$_toLowerCase0().withDeprecationWarning$1(_s6_), $.$get$_uniqueId0().withDeprecationWarning$1(_s6_), $.$get$_length1().withDeprecationWarning$1(_s6_).withName$1("str-length"), $.$get$_insert0().withDeprecationWarning$1(_s6_).withName$1("str-insert"), $.$get$_index1().withDeprecationWarning$1(_s6_).withName$1("str-index"), $.$get$_slice0().withDeprecationWarning$1(_s6_).withName$1("str-slice")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); - }); - _lazyFinal($, "module10", "$get$module10", () => A.BuiltInModule$0("string", A._setArrayType([$.$get$_unquote0(), $.$get$_quote0(), $.$get$_toUpperCase0(), $.$get$_toLowerCase0(), $.$get$_length1(), $.$get$_insert0(), $.$get$_index1(), $.$get$_slice0(), $.$get$_uniqueId0(), A._function7("split", "$string, $separator, $limit: null", new A.module_closure25())], type$.JSArray_Callable_2), null, null, type$.Callable_2)); - _lazyFinal($, "_unquote0", "$get$_unquote0", () => A._function7("unquote", "$string", new A._unquote_closure0())); - _lazyFinal($, "_quote0", "$get$_quote0", () => A._function7("quote", "$string", new A._quote_closure0())); - _lazyFinal($, "_length2", "$get$_length1", () => A._function7("length", "$string", new A._length_closure1())); - _lazyFinal($, "_insert0", "$get$_insert0", () => A._function7("insert", "$string, $insert, $index", new A._insert_closure0())); - _lazyFinal($, "_index2", "$get$_index1", () => A._function7("index", "$string, $substring", new A._index_closure1())); - _lazyFinal($, "_slice0", "$get$_slice0", () => A._function7("slice", "$string, $start-at, $end-at: -1", new A._slice_closure0())); - _lazyFinal($, "_toUpperCase0", "$get$_toUpperCase0", () => A._function7("to-upper-case", "$string", new A._toUpperCase_closure0())); - _lazyFinal($, "_toLowerCase0", "$get$_toLowerCase0", () => A._function7("to-lower-case", "$string", new A._toLowerCase_closure0())); - _lazyFinal($, "_uniqueId0", "$get$_uniqueId0", () => A._function7("unique-id", "", new A._uniqueId_closure0())); - _lazyFinal($, "stringClass", "$get$stringClass", () => new A.stringClass_closure().call$0()); - _lazyFinal($, "legacyStringClass", "$get$legacyStringClass", () => { - var t1 = A.createJSClass("sass.types.String", new A.legacyStringClass_closure()); - A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getValue", new A.legacyStringClass_closure0(), "setValue", new A.legacyStringClass_closure1()], type$.String, type$.Function)); - return t1; - }); - _lazyFinal($, "_emptyQuoted0", "$get$_emptyQuoted0", () => A.SassString$0("", true)); - _lazyFinal($, "_emptyUnquoted0", "$get$_emptyUnquoted0", () => A.SassString$0("", false)); - _lazyFinal($, "_urlSchemeRegExp", "$get$_urlSchemeRegExp", () => A.RegExp_RegExp("^[a-z0-9+.-]+$", false)); - _lazyFinal($, "_jsThrow0", "$get$_jsThrow", () => new self.Function("error", "throw error;")); - _lazyFinal($, "_isUndefined", "$get$_isUndefined", () => new self.Function("value", "return value === undefined;")); - _lazyFinal($, "_isNull", "$get$_isNull", () => new self.Function("value", "return value === null;")); - _lazyFinal($, "_noSourceUrl0", "$get$_noSourceUrl0", () => A.Uri_parse("-")); - _lazyFinal($, "_traces0", "$get$_traces0", () => A.Expando$()); - _lazyFinal($, "valueClass", "$get$valueClass", () => new A.valueClass_closure().call$0()); - })(); - (function nativeSupport() { - !function() { - var intern = function(s) { - var o = {}; - o[s] = 1; - return Object.keys(hunkHelpers.convertToFastObject(o))[0]; - }; - init.getIsolateTag = function(name) { - return intern("___dart_" + name + init.isolateTag); - }; - var tableProperty = "___dart_isolate_tags_"; - var usedProperties = Object[tableProperty] || (Object[tableProperty] = Object.create(null)); - var rootProperty = "_ZxYxX"; - for (var i = 0;; i++) { - var property = intern(rootProperty + "_" + i + "_"); - if (!(property in usedProperties)) { - usedProperties[property] = 1; - init.isolateTag = property; - break; - } - } - init.dispatchPropertyName = init.getIsolateTag("dispatch_record"); - }(); - hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer: A.NativeByteBuffer, ArrayBufferView: A.NativeTypedData, DataView: A.NativeByteData, Float32Array: A.NativeFloat32List, Float64Array: A.NativeFloat64List, Int16Array: A.NativeInt16List, Int32Array: A.NativeInt32List, Int8Array: A.NativeInt8List, Uint16Array: A.NativeUint16List, Uint32Array: A.NativeUint32List, Uint8ClampedArray: A.NativeUint8ClampedList, CanvasPixelArray: A.NativeUint8ClampedList, Uint8Array: A.NativeUint8List}); - hunkHelpers.setOrUpdateLeafTags({ArrayBuffer: true, ArrayBufferView: false, DataView: true, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false}); - A.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView"; - A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; - A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; - A.NativeTypedArrayOfDouble.$nativeSuperclassTag = "ArrayBufferView"; - A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; - A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; - A.NativeTypedArrayOfInt.$nativeSuperclassTag = "ArrayBufferView"; - })(); - Function.prototype.call$0 = function() { - return this(); - }; - Function.prototype.call$1 = function(a) { - return this(a); - }; - Function.prototype.call$2 = function(a, b) { - return this(a, b); - }; - Function.prototype.call$3$1 = function(a) { - return this(a); - }; - Function.prototype.call$2$1 = function(a) { - return this(a); - }; - Function.prototype.call$1$1 = function(a) { - return this(a); - }; - Function.prototype.call$3 = function(a, b, c) { - return this(a, b, c); - }; - Function.prototype.call$4 = function(a, b, c, d) { - return this(a, b, c, d); - }; - Function.prototype.call$3$3 = function(a, b, c) { - return this(a, b, c); - }; - Function.prototype.call$2$2 = function(a, b) { - return this(a, b); - }; - Function.prototype.call$5 = function(a, b, c, d, e) { - return this(a, b, c, d, e); - }; - Function.prototype.call$6 = function(a, b, c, d, e, f) { - return this(a, b, c, d, e, f); - }; - Function.prototype.call$2$0 = function() { - return this(); - }; - Function.prototype.call$1$0 = function() { - return this(); - }; - Function.prototype.call$1$2 = function(a, b) { - return this(a, b); - }; - Function.prototype.call$2$3 = function(a, b, c) { - return this(a, b, c); - }; - convertAllToFastObject(holders); - convertToFastObject($); - (function(callback) { - if (typeof document === "undefined") { - callback(null); - return; - } - if (typeof document.currentScript != "undefined") { - callback(document.currentScript); - return; - } - var scripts = document.scripts; - function onLoad(event) { - for (var i = 0; i < scripts.length; ++i) { - scripts[i].removeEventListener("load", onLoad, false); - } - callback(event.target); - } - for (var i = 0; i < scripts.length; ++i) { - scripts[i].addEventListener("load", onLoad, false); - } - })(function(currentScript) { - init.currentScript = currentScript; - var callMain = A.main2; - if (typeof dartMainRunner === "function") { - dartMainRunner(callMain, []); - } else { - callMain([]); - } - }); -})(); -} diff --git a/web/static/node_modules/sass/sass.default.cjs b/web/static/node_modules/sass/sass.default.cjs deleted file mode 100644 index 94d102ae..00000000 --- a/web/static/node_modules/sass/sass.default.cjs +++ /dev/null @@ -1,8 +0,0 @@ -require('./sass.dart.js'); -const library = globalThis._cliPkgExports.pop(); -if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; -library.load({ - immutable: require("immutable"), -}); - -module.exports = library; diff --git a/web/static/node_modules/sass/sass.default.js b/web/static/node_modules/sass/sass.default.js deleted file mode 100644 index 4a0540a6..00000000 --- a/web/static/node_modules/sass/sass.default.js +++ /dev/null @@ -1,48 +0,0 @@ -import * as immutable from "immutable" -import "./sass.dart.js"; - -const _cliPkgLibrary = globalThis._cliPkgExports.pop(); -if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; -const _cliPkgExports = {}; -_cliPkgLibrary.load({immutable}, _cliPkgExports); - -export const compile = _cliPkgExports.compile; -export const compileAsync = _cliPkgExports.compileAsync; -export const compileString = _cliPkgExports.compileString; -export const compileStringAsync = _cliPkgExports.compileStringAsync; -export const initCompiler = _cliPkgExports.initCompiler; -export const initAsyncCompiler = _cliPkgExports.initAsyncCompiler; -export const Compiler = _cliPkgExports.Compiler; -export const AsyncCompiler = _cliPkgExports.AsyncCompiler; -export const Logger = _cliPkgExports.Logger; -export const SassArgumentList = _cliPkgExports.SassArgumentList; -export const SassBoolean = _cliPkgExports.SassBoolean; -export const SassCalculation = _cliPkgExports.SassCalculation; -export const CalculationOperation = _cliPkgExports.CalculationOperation; -export const CalculationInterpolation = _cliPkgExports.CalculationInterpolation; -export const SassColor = _cliPkgExports.SassColor; -export const SassFunction = _cliPkgExports.SassFunction; -export const SassList = _cliPkgExports.SassList; -export const SassMap = _cliPkgExports.SassMap; -export const SassMixin = _cliPkgExports.SassMixin; -export const SassNumber = _cliPkgExports.SassNumber; -export const SassString = _cliPkgExports.SassString; -export const Value = _cliPkgExports.Value; -export const CustomFunction = _cliPkgExports.CustomFunction; -export const ListSeparator = _cliPkgExports.ListSeparator; -export const sassFalse = _cliPkgExports.sassFalse; -export const sassNull = _cliPkgExports.sassNull; -export const sassTrue = _cliPkgExports.sassTrue; -export const Exception = _cliPkgExports.Exception; -export const PromiseOr = _cliPkgExports.PromiseOr; -export const info = _cliPkgExports.info; -export const render = _cliPkgExports.render; -export const renderSync = _cliPkgExports.renderSync; -export const TRUE = _cliPkgExports.TRUE; -export const FALSE = _cliPkgExports.FALSE; -export const NULL = _cliPkgExports.NULL; -export const types = _cliPkgExports.types; -export const NodePackageImporter = _cliPkgExports.NodePackageImporter; -export const deprecations = _cliPkgExports.deprecations; -export const Version = _cliPkgExports.Version; -export const parser_ = _cliPkgExports.parser_; diff --git a/web/static/node_modules/sass/sass.js b/web/static/node_modules/sass/sass.js deleted file mode 100755 index df287fc4..00000000 --- a/web/static/node_modules/sass/sass.js +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env node - -require('./sass.dart.js'); -var library = globalThis._cliPkgExports.pop(); -if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; - -library.load({ - readline: require("readline"), - chokidar: require("chokidar"), - parcel_watcher: (function(i){let r;return function parcel_watcher(){if(void 0!==r)return r;try{r=require(i)}catch(e){if('MODULE_NOT_FOUND'!==e.code)console.error(e);r=null}return r}})("@parcel/watcher"), - util: require("util"), - stream: require("stream"), - nodeModule: require("module"), - fs: require("fs"), - immutable: require("immutable"), -}); - -library.cli_pkg_main_0_(process.argv.slice(2)); diff --git a/web/static/node_modules/sass/sass.node.js b/web/static/node_modules/sass/sass.node.js deleted file mode 100644 index 204ae2c4..00000000 --- a/web/static/node_modules/sass/sass.node.js +++ /dev/null @@ -1,12 +0,0 @@ -require('./sass.dart.js'); -const library = globalThis._cliPkgExports.pop(); -if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; -library.load({ - util: require("util"), - stream: require("stream"), - nodeModule: require("module"), - fs: require("fs"), - immutable: require("immutable"), -}); - -module.exports = library; diff --git a/web/static/node_modules/sass/sass.node.mjs b/web/static/node_modules/sass/sass.node.mjs deleted file mode 100644 index dfeadc4b..00000000 --- a/web/static/node_modules/sass/sass.node.mjs +++ /dev/null @@ -1,214 +0,0 @@ -import cjs from "./sass.node.js"; - -export const compile = cjs.compile; -export const compileAsync = cjs.compileAsync; -export const compileString = cjs.compileString; -export const compileStringAsync = cjs.compileStringAsync; -export const initCompiler = cjs.initCompiler; -export const initAsyncCompiler = cjs.initAsyncCompiler; -export const Compiler = cjs.Compiler; -export const AsyncCompiler = cjs.AsyncCompiler; -export const Logger = cjs.Logger; -export const SassArgumentList = cjs.SassArgumentList; -export const SassBoolean = cjs.SassBoolean; -export const SassCalculation = cjs.SassCalculation; -export const CalculationOperation = cjs.CalculationOperation; -export const CalculationInterpolation = cjs.CalculationInterpolation; -export const SassColor = cjs.SassColor; -export const SassFunction = cjs.SassFunction; -export const SassList = cjs.SassList; -export const SassMap = cjs.SassMap; -export const SassMixin = cjs.SassMixin; -export const SassNumber = cjs.SassNumber; -export const SassString = cjs.SassString; -export const Value = cjs.Value; -export const CustomFunction = cjs.CustomFunction; -export const ListSeparator = cjs.ListSeparator; -export const sassFalse = cjs.sassFalse; -export const sassNull = cjs.sassNull; -export const sassTrue = cjs.sassTrue; -export const Exception = cjs.Exception; -export const PromiseOr = cjs.PromiseOr; -export const info = cjs.info; -export const render = cjs.render; -export const renderSync = cjs.renderSync; -export const TRUE = cjs.TRUE; -export const FALSE = cjs.FALSE; -export const NULL = cjs.NULL; -export const types = cjs.types; -export const NodePackageImporter = cjs.NodePackageImporter; -export const deprecations = cjs.deprecations; -export const Version = cjs.Version; -export const parser_ = cjs.parser_; - -let printedDefaultExportDeprecation = false; -function defaultExportDeprecation() { - if (printedDefaultExportDeprecation) return; - printedDefaultExportDeprecation = true; - console.error( - "`import sass from 'sass'` is deprecated.\n" + - "Please use `import * as sass from 'sass'` instead."); -} - -export default { - get compile() { - defaultExportDeprecation(); - return cjs.compile; - }, - get compileAsync() { - defaultExportDeprecation(); - return cjs.compileAsync; - }, - get compileString() { - defaultExportDeprecation(); - return cjs.compileString; - }, - get compileStringAsync() { - defaultExportDeprecation(); - return cjs.compileStringAsync; - }, - get initCompiler() { - defaultExportDeprecation(); - return cjs.initCompiler; - }, - get initAsyncCompiler() { - defaultExportDeprecation(); - return cjs.initAsyncCompiler; - }, - get Compiler() { - defaultExportDeprecation(); - return cjs.Compiler; - }, - get AsyncCompiler() { - defaultExportDeprecation(); - return cjs.AsyncCompiler; - }, - get Logger() { - defaultExportDeprecation(); - return cjs.Logger; - }, - get SassArgumentList() { - defaultExportDeprecation(); - return cjs.SassArgumentList; - }, - get SassBoolean() { - defaultExportDeprecation(); - return cjs.SassBoolean; - }, - get SassCalculation() { - defaultExportDeprecation(); - return cjs.SassCalculation; - }, - get CalculationOperation() { - defaultExportDeprecation(); - return cjs.CalculationOperation; - }, - get CalculationInterpolation() { - defaultExportDeprecation(); - return cjs.CalculationInterpolation; - }, - get SassColor() { - defaultExportDeprecation(); - return cjs.SassColor; - }, - get SassFunction() { - defaultExportDeprecation(); - return cjs.SassFunction; - }, - get SassList() { - defaultExportDeprecation(); - return cjs.SassList; - }, - get SassMap() { - defaultExportDeprecation(); - return cjs.SassMap; - }, - get SassMixin() { - defaultExportDeprecation(); - return cjs.SassMixin; - }, - get SassNumber() { - defaultExportDeprecation(); - return cjs.SassNumber; - }, - get SassString() { - defaultExportDeprecation(); - return cjs.SassString; - }, - get Value() { - defaultExportDeprecation(); - return cjs.Value; - }, - get CustomFunction() { - defaultExportDeprecation(); - return cjs.CustomFunction; - }, - get ListSeparator() { - defaultExportDeprecation(); - return cjs.ListSeparator; - }, - get sassFalse() { - defaultExportDeprecation(); - return cjs.sassFalse; - }, - get sassNull() { - defaultExportDeprecation(); - return cjs.sassNull; - }, - get sassTrue() { - defaultExportDeprecation(); - return cjs.sassTrue; - }, - get Exception() { - defaultExportDeprecation(); - return cjs.Exception; - }, - get PromiseOr() { - defaultExportDeprecation(); - return cjs.PromiseOr; - }, - get info() { - defaultExportDeprecation(); - return cjs.info; - }, - get render() { - defaultExportDeprecation(); - return cjs.render; - }, - get renderSync() { - defaultExportDeprecation(); - return cjs.renderSync; - }, - get TRUE() { - defaultExportDeprecation(); - return cjs.TRUE; - }, - get FALSE() { - defaultExportDeprecation(); - return cjs.FALSE; - }, - get NULL() { - defaultExportDeprecation(); - return cjs.NULL; - }, - get types() { - defaultExportDeprecation(); - return cjs.types; - }, - get NodePackageImporter() { - defaultExportDeprecation(); - return cjs.NodePackageImporter; - }, - get deprecations() { - defaultExportDeprecation(); - return cjs.deprecations; - }, - get Version() { - defaultExportDeprecation(); - return cjs.Version; - }, - get parser_() { - defaultExportDeprecation(); - return cjs.parser_; - }, -}; diff --git a/web/static/node_modules/sass/types/compile.d.ts b/web/static/node_modules/sass/types/compile.d.ts deleted file mode 100644 index 872754c2..00000000 --- a/web/static/node_modules/sass/types/compile.d.ts +++ /dev/null @@ -1,342 +0,0 @@ -import {RawSourceMap} from 'source-map-js'; - -import {Options, StringOptions} from './options'; - -/** - * The result of compiling Sass to CSS. Returned by {@link compile}, {@link - * compileAsync}, {@link compileString}, and {@link compileStringAsync}. - * - * @category Compile - */ -export interface CompileResult { - /** - * The generated CSS. - * - * Note that this *never* includes a `sourceMapUrl` comment—it's up to the - * caller to determine where to save the source map and how to link to it from - * the stylesheet. - */ - css: string; - - /** - * The canonical URLs of all the stylesheets that were loaded during the - * Sass compilation. The order of these URLs is not guaranteed. - */ - loadedUrls: URL[]; - - /** - * The object representation of the source map that maps locations in the - * generated CSS back to locations in the Sass source code. - * - * This typically uses absolute `file:` URLs to refer to Sass files, although - * this can be controlled by having a custom {@link Importer} return {@link - * ImporterResult.sourceMapUrl}. - * - * This is set if and only if {@link Options.sourceMap} is `true`. - */ - sourceMap?: RawSourceMap; -} - -/** - * The result of creating a synchronous compiler. Returned by - * {@link initCompiler}. - * - * @category Compile - */ -export class Compiler { - /** - * Throws an error if constructed directly, instead of via - * {@link initCompiler}. - */ - private constructor(); - - /** - * The {@link compile} method exposed through a Compiler instance while it is - * active. If this is called after {@link dispose} on the Compiler - * instance, an error will be thrown. - * - * During the Compiler instance's lifespan, given the same input, this will - * return an identical result to the {@link compile} method exposed at the - * module root. - */ - compile(path: string, options?: Options<'sync'>): CompileResult; - - /** - * The {@link compileString} method exposed through a Compiler instance while - * it is active. If this is called after {@link dispose} on the Compiler - * instance, an error will be thrown. - * - * During the Compiler instance's lifespan, given the same input, this will - * return an identical result to the {@link compileString} method exposed at - * the module root. - */ - compileString(source: string, options?: StringOptions<'sync'>): CompileResult; - - /** - * Ends the lifespan of this Compiler instance. After this is invoked, all - * calls to the Compiler instance's {@link compile} or {@link compileString} - * methods will result in an error. - */ - dispose(): void; -} - -/** - * The result of creating an asynchronous compiler. Returned by - * {@link initAsyncCompiler}. - * - * @category Compile - */ -export class AsyncCompiler { - /** - * Throws an error if constructed directly, instead of via - * {@link initAsyncCompiler}. - */ - private constructor(); - - /** - * The {@link compileAsync} method exposed through an Async Compiler instance - * while it is active. If this is called after {@link dispose} on the Async - * Compiler instance, an error will be thrown. - * - * During the Async Compiler instance's lifespan, given the same input, this - * will return an identical result to the {@link compileAsync} method exposed - * at the module root. - */ - compileAsync( - path: string, - options?: Options<'async'> - ): Promise; - - /** - * The {@link compileStringAsync} method exposed through an Async Compiler - * instance while it is active. If this is called after {@link dispose} on the - * Async Compiler instance, an error will be thrown. - * - * During the Async Compiler instance's lifespan, given the same input, this - * will return an identical result to the {@link compileStringAsync} method - * exposed at the module root. - */ - compileStringAsync( - source: string, - options?: StringOptions<'async'> - ): Promise; - - /** - * Ends the lifespan of this Async Compiler instance. After this is invoked, - * all subsequent calls to the Compiler instance's `compileAsync` or - * `compileStringAsync` methods will result in an error. - * - * Any compilations that are submitted before `dispose` will not be cancelled, - * and will be allowed to settle. - * - * After all compilations have been settled and Sass completes any internal - * task cleanup, `dispose` will resolve its promise. - */ - dispose(): Promise; -} - -/** - * Synchronously compiles the Sass file at `path` to CSS. If it succeeds it - * returns a {@link CompileResult}, and if it fails it throws an {@link - * Exception}. - * - * This only allows synchronous {@link Importer}s and {@link CustomFunction}s. - * - * **Heads up!** When using the [sass-embedded] npm package for single - * compilations, **{@link compileAsync} is almost always faster than - * {@link compile}**, due to the overhead of emulating synchronous messaging - * with worker threads and concurrent compilations being blocked on main thread. - * - * If you are running multiple compilations with the [sass-embedded] npm - * package, using a {@link Compiler} will provide some speed improvements over - * the module-level methods, and an {@link AsyncCompiler} will be much faster. - * - * [sass-embedded]: https://www.npmjs.com/package/sass-embedded - * - * @example - * - * ```js - * const sass = require('sass'); - * - * const result = sass.compile("style.scss"); - * console.log(result.css); - * ``` - * - * @category Compile - * @compatibility dart: "1.45.0", node: false - */ -export function compile(path: string, options?: Options<'sync'>): CompileResult; - -/** - * Asynchronously compiles the Sass file at `path` to CSS. Returns a promise - * that resolves with a {@link CompileResult} if it succeeds and rejects with an - * {@link Exception} if it fails. - * - * This only allows synchronous or asynchronous {@link Importer}s and - * {@link CustomFunction}s. - * - * **Heads up!** When using the `sass` npm package, **{@link compile} is almost - * twice as fast as {@link compileAsync}**, due to the overhead of making the - * entire evaluation process asynchronous. - * - * @example - * - * ```js - * const sass = require('sass'); - * - * const result = await sass.compileAsync("style.scss"); - * console.log(result.css); - * ``` - * - * @category Compile - * @compatibility dart: "1.45.0", node: false - */ -export function compileAsync( - path: string, - options?: Options<'async'> -): Promise; - -/** - * Synchronously compiles a stylesheet whose contents is `source` to CSS. If it - * succeeds it returns a {@link CompileResult}, and if it fails it throws an - * {@link Exception}. - * - * This only allows synchronous {@link Importer}s and {@link CustomFunction}s. - * - * **Heads up!** When using the [sass-embedded] npm package for single - * compilations, **{@link compileStringAsync} is almost always faster than - * {@link compileString}**, due to the overhead of emulating synchronous - * messaging with worker threads and concurrent compilations being blocked on - * main thread. - * - * If you are running multiple compilations with the [sass-embedded] npm - * package, using a {@link Compiler} will provide some speed improvements over - * the module-level methods, and an {@link AsyncCompiler} will be much faster. - * - * [sass-embedded]: https://www.npmjs.com/package/sass-embedded - * - * @example - * - * ```js - * const sass = require('sass'); - * - * const result = sass.compileString(` - * h1 { - * font-size: 40px; - * code { - * font-face: Roboto Mono; - * } - * }`); - * console.log(result.css); - * ``` - * - * @category Compile - * @compatibility dart: "1.45.0", node: false - */ -export function compileString( - source: string, - options?: StringOptions<'sync'> -): CompileResult; - -/** - * Asynchronously compiles a stylesheet whose contents is `source` to CSS. - * Returns a promise that resolves with a {@link CompileResult} if it succeeds - * and rejects with an {@link Exception} if it fails. - * - * This only allows synchronous or asynchronous {@link Importer}s and {@link - * CustomFunction}s. - * - * **Heads up!** When using the `sass` npm package, **{@link compileString} is - * almost twice as fast as {@link compileStringAsync}**, due to the overhead - * of making the entire evaluation process asynchronous. - * - * @example - * - * ```js - * const sass = require('sass'); - * - * const result = await sass.compileStringAsync(` - * h1 { - * font-size: 40px; - * code { - * font-face: Roboto Mono; - * } - * }`); - * console.log(result.css); - * ``` - * - * @category Compile - * @compatibility dart: "1.45.0", node: false - */ -export function compileStringAsync( - source: string, - options?: StringOptions<'async'> -): Promise; - -/** - * Creates a synchronous {@link Compiler}. Each compiler instance exposes the - * {@link compile} and {@link compileString} methods within the lifespan of the - * Compiler. Given identical input, these methods will return results identical - * to their counterparts exposed at the module root. To use asynchronous - * compilation, use {@link initAsyncCompiler}. - * - * When calling the compile functions multiple times, using a compiler instance - * with the [sass-embedded] npm package is much faster than using the top-level - * compilation methods or the [sass] npm package. - * - * [sass-embedded]: https://www.npmjs.com/package/sass-embedded - * - * [sass]: https://www.npmjs.com/package/sass - * - * @example - * - * ```js - * const sass = require('sass'); - * function setup() { - * const compiler = sass.initCompiler(); - * const result1 = compiler.compileString('a {b: c}').css; - * const result2 = compiler.compileString('a {b: c}').css; - * compiler.dispose(); - * - * // throws error - * const result3 = sass.compileString('a {b: c}').css; - * } - * ``` - * @category Compile - * @compatibility dart: "1.70.0", node: false - */ -export function initCompiler(): Compiler; - -/** - * Creates an asynchronous {@link AsyncCompiler}. Each compiler - * instance exposes the {@link compileAsync} and {@link compileStringAsync} - * methods within the lifespan of the Compiler. Given identical input, these - * methods will return results identical to their counterparts exposed at the - * module root. To use synchronous compilation, use {@link initCompiler}; - * - * When calling the compile functions multiple times, using a compiler instance - * with the [sass-embedded] npm package is much faster than using the top-level - * compilation methods or the [sass] npm package. - * - * [sass-embedded]: https://www.npmjs.com/package/sass-embedded - * - * [sass]: https://www.npmjs.com/package/sass - * - * @example - * - * ```js - * const sass = require('sass'); - * async function setup() { - * const compiler = await sass.initAsyncCompiler(); - * const result1 = await compiler.compileStringAsync('a {b: c}').css; - * const result2 = await compiler.compileStringAsync('a {b: c}').css; - * await compiler.dispose(); - * - * // throws error - * const result3 = await sass.compileStringAsync('a {b: c}').css; - * } - * ``` - * @category Compile - * @compatibility dart: "1.70.0", node: false - */ -export function initAsyncCompiler(): Promise; diff --git a/web/static/node_modules/sass/types/deprecations.d.ts b/web/static/node_modules/sass/types/deprecations.d.ts deleted file mode 100644 index 19c24cea..00000000 --- a/web/static/node_modules/sass/types/deprecations.d.ts +++ /dev/null @@ -1,260 +0,0 @@ -/** - * All of the deprecation types currently used by Sass. - * - * Any of these IDs or the deprecation objects they point to can be passed to - * `fatalDeprecations`, `futureDeprecations`, or `silenceDeprecations`. - */ -export interface Deprecations { - // START AUTOGENERATED LIST - // Checksum: 47c97f7824eb25d7f1e64e3230938b88330d40b4 - - /** - * Deprecation for passing a string directly to meta.call(). - * - * This deprecation was active in the first version of Dart Sass. - */ - 'call-string': Deprecation<'call-string'>; - - /** - * Deprecation for @elseif. - * - * This deprecation became active in Dart Sass 1.3.2. - */ - elseif: Deprecation<'elseif'>; - - /** - * Deprecation for @-moz-document. - * - * This deprecation became active in Dart Sass 1.7.2. - */ - 'moz-document': Deprecation<'moz-document'>; - - /** - * Deprecation for imports using relative canonical URLs. - * - * This deprecation became active in Dart Sass 1.14.2. - */ - 'relative-canonical': Deprecation<'relative-canonical'>; - - /** - * Deprecation for declaring new variables with !global. - * - * This deprecation became active in Dart Sass 1.17.2. - */ - 'new-global': Deprecation<'new-global'>; - - /** - * Deprecation for using color module functions in place of plain CSS functions. - * - * This deprecation became active in Dart Sass 1.23.0. - */ - 'color-module-compat': Deprecation<'color-module-compat'>; - - /** - * Deprecation for / operator for division. - * - * This deprecation became active in Dart Sass 1.33.0. - */ - 'slash-div': Deprecation<'slash-div'>; - - /** - * Deprecation for leading, trailing, and repeated combinators. - * - * This deprecation became active in Dart Sass 1.54.0. - */ - 'bogus-combinators': Deprecation<'bogus-combinators'>; - - /** - * Deprecation for ambiguous + and - operators. - * - * This deprecation became active in Dart Sass 1.55.0. - */ - 'strict-unary': Deprecation<'strict-unary'>; - - /** - * Deprecation for passing invalid units to built-in functions. - * - * This deprecation became active in Dart Sass 1.56.0. - */ - 'function-units': Deprecation<'function-units'>; - - /** - * Deprecation for using !default or !global multiple times for one variable. - * - * This deprecation became active in Dart Sass 1.62.0. - */ - 'duplicate-var-flags': Deprecation<'duplicate-var-flags'>; - - /** - * Deprecation for passing null as alpha in the JS API. - * - * This deprecation became active in Dart Sass 1.62.3. - */ - 'null-alpha': Deprecation<'null-alpha'>; - - /** - * Deprecation for passing percentages to the Sass abs() function. - * - * This deprecation became active in Dart Sass 1.65.0. - */ - 'abs-percent': Deprecation<'abs-percent'>; - - /** - * Deprecation for using the current working directory as an implicit load path. - * - * This deprecation became active in Dart Sass 1.73.0. - */ - 'fs-importer-cwd': Deprecation<'fs-importer-cwd'>; - - /** - * Deprecation for function and mixin names beginning with --. - * - * This deprecation became active in Dart Sass 1.76.0. - */ - 'css-function-mixin': Deprecation<'css-function-mixin'>; - - /** - * Deprecation for declarations after or between nested rules. - * - * This deprecation became active in Dart Sass 1.77.7. - */ - 'mixed-decls': Deprecation<'mixed-decls'>; - - /** - * Deprecation for meta.feature-exists - * - * This deprecation became active in Dart Sass 1.78.0. - */ - 'feature-exists': Deprecation<'feature-exists'>; - - /** - * Deprecation for certain uses of built-in sass:color functions. - * - * This deprecation became active in Dart Sass 1.79.0. - */ - 'color-4-api': Deprecation<'color-4-api'>; - - /** - * Deprecation for using global color functions instead of sass:color. - * - * This deprecation became active in Dart Sass 1.79.0. - */ - 'color-functions': Deprecation<'color-functions'>; - - /** - * Deprecation for legacy JS API. - * - * This deprecation became active in Dart Sass 1.79.0. - */ - 'legacy-js-api': Deprecation<'legacy-js-api'>; - - /** - * Deprecation for @import rules. - * - * This deprecation became active in Dart Sass 1.80.0. - */ - import: Deprecation<'import'>; - - /** - * Deprecation for global built-in functions that are available in sass: modules. - * - * This deprecation became active in Dart Sass 1.80.0. - */ - 'global-builtin': Deprecation<'global-builtin'>; - - // END AUTOGENERATED LIST - - /** - * Used for any user-emitted deprecation warnings. - */ - 'user-authored': Deprecation<'user-authored', 'user'>; -} - -/** - * Either a deprecation or its ID, either of which can be passed to any of - * the relevant compiler options. - * - * @category Messages - * @compatibility dart: "1.74.0", node: false - */ -export type DeprecationOrId = Deprecation | keyof Deprecations; - -/** - * The possible statuses that each deprecation can have. - * - * "active" deprecations are currently emitting deprecation warnings. - * "future" deprecations are not yet active, but will be in the future. - * "obsolete" deprecations were once active, but no longer are. - * - * The only "user" deprecation is "user-authored", which is used for deprecation - * warnings coming from user code. - * - * @category Messages - * @compatibility dart: "1.74.0", node: false - */ -export type DeprecationStatus = 'active' | 'user' | 'future' | 'obsolete'; - -/** - * A deprecated feature in the language. - * - * @category Messages - * @compatibility dart: "1.74.0", node: false - */ -export interface Deprecation< - id extends keyof Deprecations = keyof Deprecations, - status extends DeprecationStatus = DeprecationStatus -> { - /** The unique ID of this deprecation. */ - id: id; - - /** The current status of this deprecation. */ - status: status; - - /** A human-readable description of this deprecation. */ - description?: string; - - /** The version this deprecation first became active in. */ - deprecatedIn: status extends 'future' | 'user' ? null : Version; - - /** The version this deprecation became obsolete in. */ - obsoleteIn: status extends 'obsolete' ? Version : null; -} - -/** - * A semantic version of the compiler. - * - * @category Messages - * @compatibility dart: "1.74.0", node: false - */ -export class Version { - /** - * Constructs a new version. - * - * All components must be non-negative integers. - * - * @param major - The major version. - * @param minor - The minor version. - * @param patch - The patch version. - */ - constructor(major: number, minor: number, patch: number); - readonly major: number; - readonly minor: number; - readonly patch: number; - - /** - * Parses a version from a string. - * - * This throws an error if a valid version can't be parsed. - * - * @param version - A string in the form "major.minor.patch". - */ - static parse(version: string): Version; -} - -/** - * An object containing all deprecation types. - * - * @category Messages - * @compatibility dart: "1.74.0", node: false - */ -export const deprecations: Deprecations; diff --git a/web/static/node_modules/sass/types/exception.d.ts b/web/static/node_modules/sass/types/exception.d.ts deleted file mode 100644 index 616d652c..00000000 --- a/web/static/node_modules/sass/types/exception.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import {SourceSpan} from './logger'; - -/** - * An exception thrown because a Sass compilation failed. - * - * @category Other - */ -export class Exception extends Error { - private constructor(); - - /** - * A human-friendly representation of the exception. - * - * Because many tools simply print `Error.message` directly, this includes not - * only the textual description of what went wrong (the {@link sassMessage}) - * but also an indication of where in the Sass stylesheet the error occurred - * (the {@link span}) and the Sass stack trace at the point of error (the - * {@link sassStack}). - */ - message: string; - - /** - * A textual description of what went wrong. - * - * Unlike {@link message}, this does *not* include representations of {@link - * span} or {@link sassStack}. - */ - readonly sassMessage: string; - - /** - * A human-friendly representation of the Sass stack trace at the point of - * error. - */ - readonly sassStack: string; - - /** The location the error occurred in the Sass file that triggered it. */ - readonly span: SourceSpan; - - /** Returns the same string as {@link message}. */ - toString(): string; -} diff --git a/web/static/node_modules/sass/types/importer.d.ts b/web/static/node_modules/sass/types/importer.d.ts deleted file mode 100644 index dca42663..00000000 --- a/web/static/node_modules/sass/types/importer.d.ts +++ /dev/null @@ -1,465 +0,0 @@ -import {Syntax} from './options'; -import {PromiseOr} from './util/promise_or'; - -/** - * Contextual information passed to {@link Importer.canonicalize} and {@link - * FileImporter.findFileUrl}. Not all importers will need this information to - * resolve loads, but some may find it useful. - */ -export interface CanonicalizeContext { - /** - * Whether this is being invoked because of a Sass - * `@import` rule, as opposed to a `@use` or `@forward` rule. - * - * This should *only* be used for determining whether or not to load - * [import-only files](https://sass-lang.com/documentation/at-rules/import#import-only-files). - */ - fromImport: boolean; - - /** - * The canonical URL of the file that contains the load, if that information - * is available. - * - * For an {@link Importer}, this is only passed when the `url` parameter is a - * relative URL _or_ when its [URL scheme] is included in {@link - * Importer.nonCanonicalScheme}. This ensures that canonical URLs are always - * resolved the same way regardless of context. - * - * [URL scheme]: https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL#scheme - * - * For a {@link FileImporter}, this is always available as long as Sass knows - * the canonical URL of the containing file. - */ - containingUrl: URL | null; -} - -/** - * A special type of importer that redirects all loads to existing files on - * disk. Although this is less powerful than a full {@link Importer}, it - * automatically takes care of Sass features like resolving partials and file - * extensions and of loading the file from disk. - * - * Like all importers, this implements custom Sass loading logic for [`@use` - * rules](https://sass-lang.com/documentation/at-rules/use) and [`@import` - * rules](https://sass-lang.com/documentation/at-rules/import). It can be passed - * to {@link Options.importers} or {@link StringOptions.importer}. - * - * @typeParam sync - A `FileImporter<'sync'>`'s {@link findFileUrl} must return - * synchronously, but in return it can be passed to {@link compile} and {@link - * compileString} in addition to {@link compileAsync} and {@link - * compileStringAsync}. - * - * A `FileImporter<'async'>`'s {@link findFileUrl} may either return - * synchronously or asynchronously, but it can only be used with {@link - * compileAsync} and {@link compileStringAsync}. - * - * @example - * - * ```js - * const {pathToFileURL} = require('url'); - * - * sass.compile('style.scss', { - * importers: [{ - * // An importer that redirects relative URLs starting with "~" to - * // `node_modules`. - * findFileUrl(url) { - * if (!url.startsWith('~')) return null; - * return new URL(url.substring(1), pathToFileURL('node_modules')); - * } - * }] - * }); - * ``` - * - * @category Importer - */ -export interface FileImporter< - sync extends 'sync' | 'async' = 'sync' | 'async' -> { - /** - * A callback that's called to partially resolve a load (such as - * [`@use`](https://sass-lang.com/documentation/at-rules/use) or - * [`@import`](https://sass-lang.com/documentation/at-rules/import)) to a file - * on disk. - * - * Unlike an {@link Importer}, the compiler will automatically handle relative - * loads for a {@link FileImporter}. See {@link Options.importers} for more - * details on the way loads are resolved. - * - * @param url - The loaded URL. Since this might be relative, it's represented - * as a string rather than a {@link URL} object. - * - * @returns An absolute `file:` URL if this importer recognizes the `url`. - * This may be only partially resolved: the compiler will automatically look - * for [partials](https://sass-lang.com/documentation/at-rules/use#partials), - * [index files](https://sass-lang.com/documentation/at-rules/use#index-files), - * and file extensions based on the returned URL. An importer may also return - * a fully resolved URL if it so chooses. - * - * If this importer doesn't recognize the URL, it should return `null` instead - * to allow other importers or {@link Options.loadPaths | load paths} to - * handle it. - * - * This may also return a `Promise`, but if it does the importer may only be - * passed to {@link compileAsync} and {@link compileStringAsync}, not {@link - * compile} or {@link compileString}. - * - * @throws any - If this importer recognizes `url` but determines that it's - * invalid, it may throw an exception that will be wrapped by Sass. If the - * exception object has a `message` property, it will be used as the wrapped - * exception's message; otherwise, the exception object's `toString()` will be - * used. This means it's safe for importers to throw plain strings. - */ - findFileUrl( - url: string, - context: CanonicalizeContext - ): PromiseOr; - - /** @hidden */ - canonicalize?: never; -} - -/** - * An object that implements custom Sass loading logic for [`@use` - * rules](https://sass-lang.com/documentation/at-rules/use) and [`@import` - * rules](https://sass-lang.com/documentation/at-rules/import). It can be passed - * to {@link Options.importers} or {@link StringOptions.importer}. - * - * Importers that simply redirect to files on disk are encouraged to use the - * {@link FileImporter} interface instead. - * - * ### Resolving a Load - * - * This is the process of resolving a load using a custom importer: - * - * - The compiler encounters `@use "db:foo/bar/baz"`. - * - It calls {@link canonicalize} with `"db:foo/bar/baz"`. - * - {@link canonicalize} returns `new URL("db:foo/bar/baz/_index.scss")`. - * - If the compiler has already loaded a stylesheet with this canonical URL, it - * re-uses the existing module. - * - Otherwise, it calls {@link load} with `new - * URL("db:foo/bar/baz/_index.scss")`. - * - {@link load} returns an {@link ImporterResult} that the compiler uses as - * the contents of the module. - * - * See {@link Options.importers} for more details on the way loads are resolved - * using multiple importers and load paths. - * - * @typeParam sync - An `Importer<'sync'>`'s {@link canonicalize} and {@link - * load} must return synchronously, but in return it can be passed to {@link - * compile} and {@link compileString} in addition to {@link compileAsync} and - * {@link compileStringAsync}. - * - * An `Importer<'async'>`'s {@link canonicalize} and {@link load} may either - * return synchronously or asynchronously, but it can only be used with {@link - * compileAsync} and {@link compileStringAsync}. - * - * @example - * - * ```js - * sass.compile('style.scss', { - * // An importer for URLs like `bgcolor:orange` that generates a - * // stylesheet with the given background color. - * importers: [{ - * canonicalize(url) { - * if (!url.startsWith('bgcolor:')) return null; - * return new URL(url); - * }, - * load(canonicalUrl) { - * return { - * contents: `body {background-color: ${canonicalUrl.pathname}}`, - * syntax: 'scss' - * }; - * } - * }] - * }); - * ``` - * - * @category Importer - */ -export interface Importer { - /** - * If `url` is recognized by this importer, returns its canonical format. - * - * If Sass has already loaded a stylesheet with the returned canonical URL, it - * re-uses the existing parse tree (and the loaded module for `@use`). This - * means that importers **must ensure** that the same canonical URL always - * refers to the same stylesheet, *even across different importers*. As such, - * importers are encouraged to use unique URL schemes to disambiguate between - * one another. - * - * As much as possible, custom importers should canonicalize URLs the same way - * as the built-in filesystem importer: - * - * - The importer should look for stylesheets by adding the prefix `_` to the - * URL's basename, and by adding the extensions `.sass` and `.scss` if the - * URL doesn't already have one of those extensions. For example, if the - * URL was `foo/bar/baz`, the importer would look for: - * - `foo/bar/baz.sass` - * - `foo/bar/baz.scss` - * - `foo/bar/_baz.sass` - * - `foo/bar/_baz.scss` - * - * If the URL was `foo/bar/baz.scss`, the importer would just look for: - * - `foo/bar/baz.scss` - * - `foo/bar/_baz.scss` - * - * If the importer finds a stylesheet at more than one of these URLs, it - * should throw an exception indicating that the URL is ambiguous. Note that - * if the extension is explicitly specified, a stylesheet with the opposite - * extension is allowed to exist. - * - * - If none of the possible paths is valid, the importer should perform the - * same resolution on the URL followed by `/index`. In the example above, - * it would look for: - * - `foo/bar/baz/index.sass` - * - `foo/bar/baz/index.scss` - * - `foo/bar/baz/_index.sass` - * - `foo/bar/baz/_index.scss` - * - * As above, if the importer finds a stylesheet at more than one of these - * URLs, it should throw an exception indicating that the import is - * ambiguous. - * - * If no stylesheets are found, the importer should return `null`. - * - * Calling {@link canonicalize} multiple times with the same URL must return - * the same result. Calling {@link canonicalize} with a URL returned by a - * previous call to {@link canonicalize} must return that URL. - * - * Relative loads in stylesheets loaded from an importer are handled by - * resolving the loaded URL relative to the canonical URL of the stylesheet - * that contains it, and passing that URL back to the importer's {@link - * canonicalize} method. For example, suppose the "Resolving a Load" example - * {@link Importer | above} returned a stylesheet that contained `@use - * "mixins"`: - * - * - The compiler resolves the URL `mixins` relative to the current - * stylesheet's canonical URL `db:foo/bar/baz/_index.scss` to get - * `db:foo/bar/baz/mixins`. - * - It calls {@link canonicalize} with `"db:foo/bar/baz/mixins"`. - * - {@link canonicalize} returns `new URL("db:foo/bar/baz/_mixins.scss")`. - * - * Because of this, {@link canonicalize} must return a meaningful result when - * called with a URL relative to one returned by an earlier call to {@link - * canonicalize}. - * - * @param url - The loaded URL. Since this might be relative, it's represented - * as a string rather than a {@link URL} object. - * - * @returns An absolute URL if this importer recognizes the `url`, or `null` - * if it doesn't. If this returns `null`, other importers or {@link - * Options.loadPaths | load paths} may handle the load. - * - * This may also return a `Promise`, but if it does the importer may only be - * passed to {@link compileAsync} and {@link compileStringAsync}, not {@link - * compile} or {@link compileString}. - * - * @throws any - If this importer recognizes `url` but determines that it's - * invalid, it may throw an exception that will be wrapped by Sass. If the - * exception object has a `message` property, it will be used as the wrapped - * exception's message; otherwise, the exception object's `toString()` will be - * used. This means it's safe for importers to throw plain strings. - */ - canonicalize( - url: string, - context: CanonicalizeContext - ): PromiseOr; - - /** - * Loads the Sass text for the given `canonicalUrl`, or returns `null` if this - * importer can't find the stylesheet it refers to. - * - * @param canonicalUrl - The canonical URL of the stylesheet to load. This is - * guaranteed to come from a call to {@link canonicalize}, although not every - * call to {@link canonicalize} will result in a call to {@link load}. - * - * @returns The contents of the stylesheet at `canonicalUrl` if it can be - * loaded, or `null` if it can't. - * - * This may also return a `Promise`, but if it does the importer may only be - * passed to {@link compileAsync} and {@link compileStringAsync}, not {@link - * compile} or {@link compileString}. - * - * @throws any - If this importer finds a stylesheet at `url` but it fails to - * load for some reason, or if `url` is uniquely associated with this importer - * but doesn't refer to a real stylesheet, the importer may throw an exception - * that will be wrapped by Sass. If the exception object has a `message` - * property, it will be used as the wrapped exception's message; otherwise, - * the exception object's `toString()` will be used. This means it's safe for - * importers to throw plain strings. - */ - load(canonicalUrl: URL): PromiseOr; - - /** @hidden */ - findFileUrl?: never; - - /** - * A URL scheme or set of schemes (without the `:`) that this importer - * promises never to use for URLs returned by {@link canonicalize}. If it does - * return a URL with one of these schemes, that's an error. - * - * If this is set, any call to canonicalize for a URL with a non-canonical - * scheme will be passed {@link CanonicalizeContext.containingUrl} if it's - * known. - * - * These schemes may only contain lowercase ASCII letters, ASCII numerals, - * `+`, `-`, and `.`. They may not be empty. - */ - nonCanonicalScheme?: string | string[]; -} - -declare const nodePackageImporterKey: unique symbol; - -/** - * The built-in Node.js package importer. This loads pkg: URLs from node_modules - * according to the standard Node.js resolution algorithm. - * - * A Node.js package importer is exposed as a class that can be added to the - * `importers` option. - * - *```js - * const sass = require('sass'); - * sass.compileString('@use "pkg:vuetify', { - * importers: [new sass.NodePackageImporter()] - * }); - *``` - * - * ## Writing Sass packages - * - * Package authors can control what is exposed to their users through their - * `package.json` manifest. The recommended method is to add a `sass` - * conditional export to `package.json`. - * - * ```json - * // node_modules/uicomponents/package.json - * { - * "exports": { - * ".": { - * "sass": "./src/scss/index.scss", - * "import": "./dist/js/index.mjs", - * "default": "./dist/js/index.js" - * } - * } - * } - * ``` - * - * This allows a package user to write `@use "pkg:uicomponents"` to load the - * file at `node_modules/uicomponents/src/scss/index.scss`. - * - * The Node.js package importer supports the variety of formats supported by - * Node.js [package entry points], allowing authors to expose multiple subpaths. - * - * [package entry points]: - * https://nodejs.org/api/packages.html#package-entry-points - * - * ```json - * // node_modules/uicomponents/package.json - * { - * "exports": { - * ".": { - * "sass": "./src/scss/index.scss", - * }, - * "./colors.scss": { - * "sass": "./src/scss/_colors.scss", - * }, - * "./theme/*.scss": { - * "sass": "./src/scss/theme/*.scss", - * }, - * } - * } - * ``` - * - * This allows a package user to write: - * - * - `@use "pkg:uicomponents";` to import the root export. - * - `@use "pkg:uicomponents/colors";` to import the colors partial. - * - `@use "pkg:uicomponents/theme/purple";` to import a purple theme. - * - * Note that while library users can rely on the importer to resolve - * [partials](https://sass-lang.com/documentation/at-rules/use#partials), [index - * files](https://sass-lang.com/documentation/at-rules/use#index-files), and - * extensions, library authors must specify the entire file path in `exports`. - * - * In addition to the `sass` condition, the `style` condition is also - * acceptable. Sass will match the `default` condition if it's a relevant file - * type, but authors are discouraged from relying on this. Notably, the key - * order matters, and the importer will resolve to the first value with a key - * that is `sass`, `style`, or `default`, so you should always put `default` - * last. - * - * To help package authors who haven't transitioned to package entry points - * using the `exports` field, the Node.js package importer provides several - * fallback options. If the `pkg:` URL does not have a subpath, the Node.js - * package importer will look for a `sass` or `style` key at the root of - * `package.json`. - * - * ```json - * // node_modules/uicomponents/package.json - * { - * "sass": "./src/scss/index.scss", - * } - * ``` - * - * This allows a user to write `@use "pkg:uicomponents";` to import the - * `index.scss` file. - * - * Finally, the Node.js package importer will look for an `index` file at the - * package root, resolving partials and extensions. For example, if the file - * `_index.scss` exists in the package root of `uicomponents`, a user can import - * that with `@use "pkg:uicomponents";`. - * - * If a `pkg:` URL includes a subpath that doesn't have a match in package entry - * points, the Node.js importer will attempt to find that file relative to the - * package root, resolving for file extensions, partials and index files. For - * example, if the file `src/sass/_colors.scss` exists in the `uicomponents` - * package, a user can import that file using `@use - * "pkg:uicomponents/src/sass/colors";`. - * - * @compatibility dart: "1.71.0", node: false - * @category Importer - */ -export class NodePackageImporter { - /** Used to distinguish this type from any arbitrary object. */ - private readonly [nodePackageImporterKey]: true; - - /** - * The NodePackageImporter has an optional `entryPointDirectory` option, which - * is the directory where the Node Package Importer should start when - * resolving `pkg:` URLs in sources other than files on disk. This will be - * used as the `parentURL` in the [Node Module - * Resolution](https://nodejs.org/api/esm.html#resolution-algorithm-specification) - * algorithm. - * - * In order to be found by the Node Package Importer, a package will need to - * be inside a node_modules folder located in the `entryPointDirectory`, or - * one of its parent directories, up to the filesystem root. - * - * Relative paths will be resolved relative to the current working directory. - * If a path is not provided, this defaults to the parent directory of the - * Node.js entrypoint. If that's not available, this will throw an error. - */ - constructor(entryPointDirectory?: string); -} - -/** - * The result of successfully loading a stylesheet with an {@link Importer}. - * - * @category Importer - */ -export interface ImporterResult { - /** The contents of the stylesheet. */ - contents: string; - - /** The syntax with which to parse {@link contents}. */ - syntax: Syntax; - - /** - * The URL to use to link to the loaded stylesheet's source code in source - * maps. A `file:` URL is ideal because it's accessible to both browsers and - * other build tools, but an `http:` URL is also acceptable. - * - * If this isn't set, it defaults to a `data:` URL that contains the contents - * of the loaded stylesheet. - */ - sourceMapUrl?: URL; -} diff --git a/web/static/node_modules/sass/types/index.d.ts b/web/static/node_modules/sass/types/index.d.ts deleted file mode 100644 index 3520dda8..00000000 --- a/web/static/node_modules/sass/types/index.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -// This is a mirror of the JS API definitions in `spec/js-api`, but with comments -// written to provide user-facing documentation rather than to specify behavior for -// implementations. - -export { - AsyncCompiler, - CompileResult, - Compiler, - compile, - compileAsync, - compileString, - compileStringAsync, - initCompiler, - initAsyncCompiler, -} from './compile'; -export { - deprecations, - Deprecation, - Deprecations, - DeprecationOrId, - DeprecationStatus, - Version, -} from './deprecations'; -export {Exception} from './exception'; -export { - CanonicalizeContext, - FileImporter, - Importer, - ImporterResult, - NodePackageImporter, -} from './importer'; -export {Logger, LoggerWarnOptions, SourceSpan, SourceLocation} from './logger'; -export { - CustomFunction, - Options, - OutputStyle, - StringOptions, - StringOptionsWithImporter, - StringOptionsWithoutImporter, - Syntax, -} from './options'; -export {PromiseOr} from './util/promise_or'; -export { - CalculationInterpolation, - CalculationOperation, - CalculationOperator, - CalculationValue, - ChannelName, - ChannelNameHsl, - ChannelNameHwb, - ChannelNameLch, - ChannelNameLab, - ChannelNameRgb, - ChannelNameXyz, - ColorSpaceHsl, - ColorSpaceHwb, - ColorSpaceLch, - ColorSpaceLab, - ColorSpaceRgb, - ColorSpaceXyz, - GamutMapMethod, - HueInterpolationMethod, - KnownColorSpace, - ListSeparator, - PolarColorSpace, - RectangularColorSpace, - SassArgumentList, - SassBoolean, - SassCalculation, - SassColor, - SassFunction, - SassList, - SassMap, - SassMixin, - SassNumber, - SassString, - Value, - sassFalse, - sassNull, - sassTrue, -} from './value'; - -// Legacy APIs -export {LegacyException} from './legacy/exception'; -export { - FALSE, - LegacyAsyncFunction, - LegacyAsyncFunctionDone, - LegacyFunction, - LegacySyncFunction, - LegacyValue, - NULL, - TRUE, - types, -} from './legacy/function'; -export { - LegacyAsyncImporter, - LegacyImporter, - LegacyImporterResult, - LegacyImporterThis, - LegacySyncImporter, -} from './legacy/importer'; -export { - LegacySharedOptions, - LegacyFileOptions, - LegacyStringOptions, - LegacyOptions, -} from './legacy/options'; -export {LegacyPluginThis} from './legacy/plugin_this'; -export {LegacyResult, render, renderSync} from './legacy/render'; - -/** - * Information about the Sass implementation. This always begins with a unique - * identifier for the Sass implementation, followed by U+0009 TAB, followed by - * its npm package version. Some implementations include additional information - * as well, but not in any standardized format. - * - * * For Dart Sass, the implementation name is `dart-sass`. - * * For Node Sass, the implementation name is `node-sass`. - * * For the embedded host, the implementation name is `sass-embedded`. - */ -export const info: string; diff --git a/web/static/node_modules/sass/types/legacy/exception.d.ts b/web/static/node_modules/sass/types/legacy/exception.d.ts deleted file mode 100644 index 29d3a54b..00000000 --- a/web/static/node_modules/sass/types/legacy/exception.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * The exception type thrown by {@link renderSync} and passed as the error to - * {@link render}'s callback. - * - * @category Legacy - * @deprecated This is only thrown by the legacy {@link render} and {@link - * renderSync} APIs. Use {@link compile}, {@link compileString}, {@link - * compileAsync}, and {@link compileStringAsync} instead. - */ -export interface LegacyException extends Error { - /** - * The error message. For Dart Sass, when possible this includes a highlighted - * indication of where in the source file the error occurred as well as the - * Sass stack trace. - */ - message: string; - - /** - * The error message. For Dart Sass, this is the same as the result of calling - * {@link toString}, which is itself the same as {@link message} but with the - * prefix "Error:". - */ - formatted: string; - - /** - * The (1-based) line number on which the error occurred, if this exception is - * associated with a specific Sass file location. - */ - line?: number; - - /** - * The (1-based) column number within {@link line} at which the error - * occurred, if this exception is associated with a specific Sass file - * location. - */ - column?: number; - - /** - * Analogous to the exit code for an executable. `1` for an error caused by a - * Sass file, `3` for any other type of error. - */ - status: number; - - /** - * If this exception was caused by an error in a Sass file, this will - * represent the Sass file's location. It can be in one of three formats: - * - * * If the Sass file was loaded from disk, this is the path to that file. - * * If the Sass file was generated by an importer, this is its canonical URL. - * * If the Sass file was passed as {@link LegacyStringOptions.data} without a - * corresponding {@link LegacyStringOptions.file}, this is the special - * string `"stdin"`. - */ - file?: string; -} diff --git a/web/static/node_modules/sass/types/legacy/function.d.ts b/web/static/node_modules/sass/types/legacy/function.d.ts deleted file mode 100644 index 7c27eb83..00000000 --- a/web/static/node_modules/sass/types/legacy/function.d.ts +++ /dev/null @@ -1,757 +0,0 @@ -import {LegacyPluginThis} from './plugin_this'; - -/** - * A synchronous callback that implements a custom Sass function. This can be - * passed to {@link LegacySharedOptions.functions} for either {@link render} or - * {@link renderSync}. - * - * If this throws an error, Sass will treat that as the function failing with - * that error message. - * - * ```js - * const result = sass.renderSync({ - * file: 'style.scss', - * functions: { - * "sum($arg1, $arg2)": (arg1, arg2) => { - * if (!(arg1 instanceof sass.types.Number)) { - * throw new Error("$arg1: Expected a number"); - * } else if (!(arg2 instanceof sass.types.Number)) { - * throw new Error("$arg2: Expected a number"); - * } - * return new sass.types.Number(arg1.getValue() + arg2.getValue()); - * } - * } - * }); - * ``` - * - * @param args - One argument for each argument that's declared in the signature - * that's passed to {@link LegacySharedOptions.functions}. If the signature - * [takes arbitrary - * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments), - * they're passed as a single argument list in the last argument. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export type LegacySyncFunction = ( - this: LegacyPluginThis, - ...args: LegacyValue[] -) => LegacyValue; - -/** - * An asynchronous callback that implements a custom Sass function. This can be - * passed to {@link LegacySharedOptions.functions}, but only for {@link render}. - * - * An asynchronous function must return `undefined`. Its final argument will - * always be a callback, which it should call with the result of the function - * once it's done running. - * - * If this throws an error, Sass will treat that as the function failing with - * that error message. - * - * ```js - * sass.render({ - * file: 'style.scss', - * functions: { - * "sum($arg1, $arg2)": (arg1, arg2, done) => { - * if (!(arg1 instanceof sass.types.Number)) { - * throw new Error("$arg1: Expected a number"); - * } else if (!(arg2 instanceof sass.types.Number)) { - * throw new Error("$arg2: Expected a number"); - * } - * done(new sass.types.Number(arg1.getValue() + arg2.getValue())); - * } - * } - * }, (result, error) => { - * // ... - * }); - * ``` - * - * This is passed one argument for each argument that's declared in the - * signature that's passed to {@link LegacySharedOptions.functions}. If the - * signature [takes arbitrary - * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments), - * they're passed as a single argument list in the last argument before the - * callback. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export type LegacyAsyncFunction = - | ((this: LegacyPluginThis, done: (result: LegacyValue) => void) => void) - | (( - this: LegacyPluginThis, - arg1: LegacyValue, - done: LegacyAsyncFunctionDone - ) => void) - | (( - this: LegacyPluginThis, - arg1: LegacyValue, - arg2: LegacyValue, - done: LegacyAsyncFunctionDone - ) => void) - | (( - this: LegacyPluginThis, - arg1: LegacyValue, - arg2: LegacyValue, - arg3: LegacyValue, - done: LegacyAsyncFunctionDone - ) => void) - | (( - this: LegacyPluginThis, - arg1: LegacyValue, - arg2: LegacyValue, - arg3: LegacyValue, - arg4: LegacyValue, - done: LegacyAsyncFunctionDone - ) => void) - | (( - this: LegacyPluginThis, - arg1: LegacyValue, - arg2: LegacyValue, - arg3: LegacyValue, - arg4: LegacyValue, - arg5: LegacyValue, - done: LegacyAsyncFunctionDone - ) => void) - | (( - this: LegacyPluginThis, - arg1: LegacyValue, - arg2: LegacyValue, - arg3: LegacyValue, - arg4: LegacyValue, - arg5: LegacyValue, - arg6: LegacyValue, - done: LegacyAsyncFunctionDone - ) => void) - | (( - this: LegacyPluginThis, - ...args: [...LegacyValue[], LegacyAsyncFunctionDone] - ) => void); - -/** - * The function called by a {@link LegacyAsyncFunction} to indicate that it's - * finished. - * - * @param result - If this is a {@link LegacyValue}, that indicates that the - * function call completed successfully. If it's a {@link types.Error}, that - * indicates that the function call failed. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export type LegacyAsyncFunctionDone = ( - result: LegacyValue | types.Error -) => void; - -/** - * A callback that implements a custom Sass function. For {@link renderSync}, - * this must be a {@link LegacySyncFunction} which returns its result directly; - * for {@link render}, it may be either a {@link LegacySyncFunction} or a {@link - * LegacyAsyncFunction} which calls a callback with its result. - * - * See {@link LegacySharedOptions.functions} for more details. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export type LegacyFunction = sync extends 'async' - ? LegacySyncFunction | LegacyAsyncFunction - : LegacySyncFunction; - -/** - * A type representing all the possible values that may be passed to or returned - * from a {@link LegacyFunction}. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link Value} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export type LegacyValue = - | types.Null - | types.Number - | types.String - | types.Boolean - | types.Color - | types.List - | types.Map; - -/** - * A shorthand for `sass.types.Boolean.TRUE`. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link sassTrue} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export const TRUE: types.Boolean; - -/** - * A shorthand for `sass.types.Boolean.FALSE`. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link sassFalse} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export const FALSE: types.Boolean; - -/** - * A shorthand for `sass.types.Null.NULL`. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link sassNull} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export const NULL: types.Null; - -/** - * The namespace for value types used in the legacy function API. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link Value} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export namespace types { - /** - * The class for Sass's singleton [`null` - * value](https://sass-lang.com/documentation/values/null). The value itself - * can be accessed through the {@link NULL} field. - */ - export class Null { - /** Sass's singleton `null` value. */ - static readonly NULL: Null; - } - - /** - * Sass's [number type](https://sass-lang.com/documentation/values/numbers). - */ - export class Number { - /** - * @param value - The numeric value of the number. - * - * @param unit - If passed, the number's unit. - * - * Complex units can be represented as - * `**.../**...`, with numerator units on the - * left-hand side of the `/` and denominator units on the right. A number - * with only numerator units may omit the `/` and the units after it, and a - * number with only denominator units may be represented - * with no units before the `/`. - * - * @example - * - * ```scss - * new sass.types.Number(0.5); // == 0.5 - * new sass.types.Number(10, "px"); // == 10px - * new sass.types.Number(10, "px*px"); // == 10px * 1px - * new sass.types.Number(10, "px/s"); // == math.div(10px, 1s) - * new sass.types.Number(10, "px*px/s*s"); // == 10px * math.div(math.div(1px, 1s), 1s) - * ``` - */ - constructor(value: number, unit?: string); - - /** - * Returns the value of the number, ignoring units. - * - * **Heads up!** This means that `96px` and `1in` will return different - * values, even though they represent the same length. - * - * @example - * - * ```js - * const number = new sass.types.Number(10, "px"); - * number.getValue(); // 10 - * ``` - */ - getValue(): number; - - /** - * Destructively modifies this number by setting its numeric value to - * `value`, independent of its units. - * - * @deprecated Use {@link constructor} instead. - */ - setValue(value: number): void; - - /** - * Returns a string representation of this number's units. Complex units are - * returned in the same format that {@link constructor} accepts them. - * - * @example - * - * ```js - * // number is `10px`. - * number.getUnit(); // "px" - * - * // number is `math.div(10px, 1s)`. - * number.getUnit(); // "px/s" - * ``` - */ - getUnit(): string; - - /** - * Destructively modifies this number by setting its units to `unit`, - * independent of its numeric value. Complex units are specified in the same - * format as {@link constructor}. - * - * @deprecated Use {@link constructor} instead. - */ - setUnit(unit: string): void; - } - - /** - * Sass's [string type](https://sass-lang.com/documentation/values/strings). - * - * **Heads up!** This API currently provides no way of distinguishing between - * a [quoted](https://sass-lang.com/documentation/values/strings#quoted) and - * [unquoted](https://sass-lang.com/documentation/values/strings#unquoted) - * string. - */ - export class String { - /** - * Creates an unquoted string with the given contents. - * - * **Heads up!** This API currently provides no way of creating a - * [quoted](https://sass-lang.com/documentation/values/strings#quoted) - * string. - */ - constructor(value: string); - - /** - * Returns the contents of the string. If the string contains escapes, - * those escapes are included literally if it’s - * [unquoted](https://sass-lang.com/documentation/values/strings#unquoted), - * while the values of the escapes are included if it’s - * [quoted](https://sass-lang.com/documentation/values/strings#quoted). - * - * @example - * - * ``` - * // string is `Arial`. - * string.getValue(); // "Arial" - * - * // string is `"Helvetica Neue"`. - * string.getValue(); // "Helvetica Neue" - * - * // string is `\1F46D`. - * string.getValue(); // "\\1F46D" - * - * // string is `"\1F46D"`. - * string.getValue(); // "👭" - * ``` - */ - getValue(): string; - - /** - * Destructively modifies this string by setting its numeric value to - * `value`. - * - * **Heads up!** Even if the string was originally quoted, this will cause - * it to become unquoted. - * - * @deprecated Use {@link constructor} instead. - */ - setValue(value: string): void; - } - - /** - * Sass's [boolean type](https://sass-lang.com/documentation/values/booleans). - * - * Custom functions should respect Sass’s notion of - * [truthiness](https://sass-lang.com/documentation/at-rules/control/if#truthiness-and-falsiness) - * by treating `false` and `null` as falsey and everything else as truthy. - * - * **Heads up!** Boolean values can't be constructed, they can only be - * accessed through the {@link TRUE} and {@link FALSE} constants. - */ - export class Boolean { - /** - * Returns `true` if this is Sass's `true` value and `false` if this is - * Sass's `false` value. - * - * @example - * - * ```js - * // boolean is `true`. - * boolean.getValue(); // true - * boolean === sass.types.Boolean.TRUE; // true - * - * // boolean is `false`. - * boolean.getValue(); // false - * boolean === sass.types.Boolean.FALSE; // true - * ``` - */ - getValue(): T; - - /** Sass's `true` value. */ - static readonly TRUE: Boolean; - - /** Sass's `false` value. */ - static readonly FALSE: Boolean; - } - - /** - * Sass's [color type](https://sass-lang.com/documentation/values/colors). - */ - export class Color { - /** - * Creates a new Sass color with the given red, green, blue, and alpha - * channels. The red, green, and blue channels must be integers between 0 - * and 255 (inclusive), and alpha must be between 0 and 1 (inclusive). - * - * @example - * - * ```js - * new sass.types.Color(107, 113, 127); // #6b717f - * new sass.types.Color(0, 0, 0, 0); // rgba(0, 0, 0, 0) - * ``` - */ - constructor(r: number, g: number, b: number, a?: number); - - /** - * Creates a new Sass color with alpha, red, green, and blue channels taken - * from respective two-byte chunks of a hexidecimal number. - * - * @example - * - * ```js - * new sass.types.Color(0xff6b717f); // #6b717f - * new sass.types.Color(0x00000000); // rgba(0, 0, 0, 0) - * ``` - */ - constructor(argb: number); - - /** - * Returns the red channel of the color as an integer from 0 to 255. - * - * @example - * - * ```js - * // color is `#6b717f`. - * color.getR(); // 107 - * - * // color is `#b37399`. - * color.getR(); // 179 - * ``` - */ - getR(): number; - - /** - * Sets the red channel of the color. The value must be an integer between 0 - * and 255 (inclusive). - * - * @deprecated Use {@link constructor} instead. - */ - setR(value: number): void; - - /** - * Returns the green channel of the color as an integer from 0 to 255. - * - * @example - * - * ```js - * // color is `#6b717f`. - * color.getG(); // 113 - * - * // color is `#b37399`. - * color.getG(); // 115 - * ``` - */ - getG(): number; - - /** - * Sets the green channel of the color. The value must be an integer between - * 0 and 255 (inclusive). - * - * @deprecated Use {@link constructor} instead. - */ - setG(value: number): void; - - /** - * Returns the blue channel of the color as an integer from 0 to 255. - * - * @example - * - * ```js - * // color is `#6b717f`. - * color.getB(); // 127 - * - * // color is `#b37399`. - * color.getB(); // 153 - * ``` - */ - getB(): number; - - /** - * Sets the blue channel of the color. The value must be an integer between - * 0 and 255 (inclusive). - * - * @deprecated Use {@link constructor} instead. - */ - setB(value: number): void; - - /** - * Returns the alpha channel of the color as a number from 0 to 1. - * - * @example - * - * ```js - * // color is `#6b717f`. - * color.getA(); // 1 - * - * // color is `transparent`. - * color.getA(); // 0 - * ``` - */ - getA(): number; - - /** - * Sets the alpha channel of the color. The value must be between 0 and 1 - * (inclusive). - * - * @deprecated Use {@link constructor} instead. - */ - setA(value: number): void; - } - - /** - * Sass's [list type](https://sass-lang.com/documentation/values/lists). - * - * **Heads up!** This list type’s methods use 0-based indexing, even though - * within Sass lists use 1-based indexing. These methods also don’t support - * using negative numbers to index backwards from the end of the list. - */ - export class List { - /** - * Creates a new Sass list. - * - * **Heads up!** The initial values of the list elements are undefined. - * These elements must be set using {@link setValue} before accessing them - * or passing the list back to Sass. - * - * @example - * - * ```js - * const list = new sass.types.List(3); - * list.setValue(0, new sass.types.Number(10, "px")); - * list.setValue(1, new sass.types.Number(15, "px")); - * list.setValue(2, new sass.types.Number(32, "px")); - * list; // 10px, 15px, 32px - * ``` - * - * @param length - The number of (initially undefined) elements in the list. - * @param commaSeparator - If `true`, the list is comma-separated; otherwise, - * it's space-separated. Defaults to `true`. - */ - constructor(length: number, commaSeparator?: boolean); - - /** - * Returns the element at `index`, or `undefined` if that value hasn't yet - * been set. - * - * @example - * - * ```js - * // list is `10px, 15px, 32px` - * list.getValue(0); // 10px - * list.getValue(2); // 32px - * ``` - * - * @param index - A (0-based) index into this list. - * @throws `Error` if `index` is less than 0 or greater than or equal to the - * number of elements in this list. - */ - getValue(index: number): LegacyValue | undefined; - - /** - * Sets the element at `index` to `value`. - * - * @example - * - * ```js - * // list is `10px, 15px, 32px` - * list.setValue(1, new sass.types.Number(18, "px")); - * list; // 10px, 18px, 32px - * ``` - * - * @param index - A (0-based) index into this list. - * @throws `Error` if `index` is less than 0 or greater than or equal to the - * number of elements in this list. - */ - setValue(index: number, value: LegacyValue): void; - - /** - * Returns `true` if this list is comma-separated and `false` otherwise. - * - * @example - * - * ```js - * // list is `10px, 15px, 32px` - * list.getSeparator(); // true - * - * // list is `1px solid` - * list.getSeparator(); // false - * ``` - */ - getSeparator(): boolean; - - /** - * Sets whether the list is comma-separated. - * - * @param isComma - `true` to make the list comma-separated, `false` otherwise. - */ - setSeparator(isComma: boolean): void; - - /** - * Returns the number of elements in the list. - * - * @example - * - * ```js - * // list is `10px, 15px, 32px` - * list.getLength(); // 3 - * - * // list is `1px solid` - * list.getLength(); // 2 - * ``` - */ - getLength(): number; - } - - /** - * Sass's [map type](https://sass-lang.com/documentation/values/maps). - * - * **Heads up!** This map type is represented as a list of key-value pairs - * rather than a mapping from keys to values. The only way to find the value - * associated with a given key is to iterate through the map checking for that - * key. Maps created through this API are still forbidden from having duplicate - * keys. - */ - export class Map { - /** - * Creates a new Sass map. - * - * **Heads up!** The initial keys and values of the map are undefined. They - * must be set using {@link setKey} and {@link setValue} before accessing - * them or passing the map back to Sass. - * - * @example - * - * ```js - * const map = new sass.types.Map(2); - * map.setKey(0, new sass.types.String("width")); - * map.setValue(0, new sass.types.Number(300, "px")); - * map.setKey(1, new sass.types.String("height")); - * map.setValue(1, new sass.types.Number(100, "px")); - * map; // (width: 300px, height: 100px) - * ``` - * - * @param length - The number of (initially undefined) key/value pairs in the map. - */ - constructor(length: number); - - /** - * Returns the value in the key/value pair at `index`. - * - * @example - * - * ```js - * // map is `(width: 300px, height: 100px)` - * map.getValue(0); // 300px - * map.getValue(1); // 100px - * ``` - * - * @param index - A (0-based) index of a key/value pair in this map. - * @throws `Error` if `index` is less than 0 or greater than or equal to the - * number of pairs in this map. - */ - getValue(index: number): LegacyValue; - - /** - * Sets the value in the key/value pair at `index` to `value`. - * - * @example - * - * ```js - * // map is `("light": 200, "medium": 400, "bold": 600)` - * map.setValue(1, new sass.types.Number(300)); - * map; // ("light": 200, "medium": 300, "bold": 600) - * ``` - * - * @param index - A (0-based) index of a key/value pair in this map. - * @throws `Error` if `index` is less than 0 or greater than or equal to the - * number of pairs in this map. - */ - setValue(index: number, value: LegacyValue): void; - - /** - * Returns the key in the key/value pair at `index`. - * - * @example - * - * ```js - * // map is `(width: 300px, height: 100px)` - * map.getKey(0); // width - * map.getKey(1); // height - * ``` - * - * @param index - A (0-based) index of a key/value pair in this map. - * @throws `Error` if `index` is less than 0 or greater than or equal to the - * number of pairs in this map. - */ - getKey(index: number): LegacyValue; - - /** - * Sets the value in the key/value pair at `index` to `value`. - * - * @example - * - * ```js - * // map is `("light": 200, "medium": 400, "bold": 600)` - * map.setValue(1, new sass.types.String("lighter")); - * map; // ("lighter": 200, "medium": 300, "bold": 600) - * ``` - * - * @param index - A (0-based) index of a key/value pair in this map. - * @throws `Error` if `index` is less than 0 or greater than or equal to the - * number of pairs in this map. - */ - setKey(index: number, key: LegacyValue): void; - - /** - * Returns the number of key/value pairs in this map. - * - * @example - * - * ```js - * // map is `("light": 200, "medium": 400, "bold": 600)` - * map.getLength(); // 3 - * - * // map is `(width: 300px, height: 100px)` - * map.getLength(); // 2 - * ``` - */ - getLength(): number; - } - - /** - * An error that can be returned from a Sass function to signal that it - * encountered an error. This is the only way to signal an error - * asynchronously from a {@link LegacyAsyncFunction}. - */ - export class Error { - constructor(message: string); - } -} diff --git a/web/static/node_modules/sass/types/legacy/importer.d.ts b/web/static/node_modules/sass/types/legacy/importer.d.ts deleted file mode 100644 index 4b7777a3..00000000 --- a/web/static/node_modules/sass/types/legacy/importer.d.ts +++ /dev/null @@ -1,169 +0,0 @@ -import {LegacyPluginThis} from './plugin_this'; - -/** - * The value of `this` in the context of a {@link LegacyImporter} function. - * - * @category Legacy - * @deprecated This is only used by the legacy {@link render} and {@link - * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -interface LegacyImporterThis extends LegacyPluginThis { - /** - * Whether the importer is being invoked because of a Sass `@import` rule, as - * opposed to a `@use` or `@forward` rule. - * - * This should *only* be used for determining whether or not to load - * [import-only files](https://sass-lang.com/documentation/at-rules/import#import-only-files). - * - * @compatibility dart: "1.33.0", node: false - */ - fromImport: boolean; -} - -/** - * The result of running a {@link LegacyImporter}. It must be one of the - * following types: - * - * * An object with the key `contents` whose value is the contents of a stylesheet - * (in SCSS syntax). This causes Sass to load that stylesheet’s contents. - * - * * An object with the key `file` whose value is a path on disk. This causes Sass - * to load that file as though it had been imported directly. - * - * * `null`, which indicates that it doesn’t recognize the URL and another - * importer should be tried instead. - * - * * An [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) - * object, indicating that importing failed. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link ImporterResult} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export type LegacyImporterResult = - | {file: string} - | {contents: string} - | Error - | null; - -/** - * A synchronous callback that implements custom Sass loading logic for - * [`@import` rules](https://sass-lang.com/documentation/at-rules/import) and - * [`@use` rules](https://sass-lang.com/documentation/at-rules/use). This can be - * passed to {@link LegacySharedOptions.importer} for either {@link render} or - * {@link renderSync}. - * - * See {@link LegacySharedOptions.importer} for more detailed documentation. - * - * ```js - * sass.renderSync({ - * file: "style.scss", - * importer: [ - * function(url, prev) { - * if (url != "big-headers") return null; - * - * return { - * contents: 'h1 { font-size: 40px; }' - * }; - * } - * ] - * }); - * ``` - * - * @param url - The `@use` or `@import` rule’s URL as a string, exactly as it - * appears in the stylesheet. - * - * @param prev - A string identifying the stylesheet that contained the `@use` - * or `@import`. This string’s format depends on how that stylesheet was loaded: - * - * * If the stylesheet was loaded from the filesystem, it’s the absolute path of - * its file. - * * If the stylesheet was loaded from an importer that returned its contents, - * it’s the URL of the `@use` or `@import` rule that loaded it. - * * If the stylesheet came from the data option, it’s the string "stdin". - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -type LegacySyncImporter = ( - this: LegacyImporterThis, - url: string, - prev: string -) => LegacyImporterResult; - -/** - * An asynchronous callback that implements custom Sass loading logic for - * [`@import` rules](https://sass-lang.com/documentation/at-rules/import) and - * [`@use` rules](https://sass-lang.com/documentation/at-rules/use). This can be - * passed to {@link LegacySharedOptions.importer} for either {@link render} or - * {@link renderSync}. - * - * An asynchronous importer must return `undefined`, and then call `done` with - * the result of its {@link LegacyImporterResult} once it's done running. - * - * See {@link LegacySharedOptions.importer} for more detailed documentation. - * - * ```js - * sass.render({ - * file: "style.scss", - * importer: [ - * function(url, prev, done) { - * if (url != "big-headers") done(null); - * - * done({ - * contents: 'h1 { font-size: 40px; }' - * }); - * } - * ] - * }); - * ``` - * - * @param url - The `@use` or `@import` rule’s URL as a string, exactly as it - * appears in the stylesheet. - * - * @param prev - A string identifying the stylesheet that contained the `@use` - * or `@import`. This string’s format depends on how that stylesheet was loaded: - * - * * If the stylesheet was loaded from the filesystem, it’s the absolute path of - * its file. - * * If the stylesheet was loaded from an importer that returned its contents, - * it’s the URL of the `@use` or `@import` rule that loaded it. - * * If the stylesheet came from the data option, it’s the string "stdin". - * - * @param done - The callback to call once the importer has finished running. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -type LegacyAsyncImporter = ( - this: LegacyImporterThis, - url: string, - prev: string, - done: (result: LegacyImporterResult) => void -) => void; - -/** - * A callback that implements custom Sass loading logic for [`@import` - * rules](https://sass-lang.com/documentation/at-rules/import) and [`@use` - * rules](https://sass-lang.com/documentation/at-rules/use). For {@link - * renderSync}, this must be a {@link LegacySyncImporter} which returns its - * result directly; for {@link render}, it may be either a {@link - * LegacySyncImporter} or a {@link LegacyAsyncImporter} which calls a callback - * with its result. - * - * See {@link LegacySharedOptions.importer} for more details. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export type LegacyImporter = sync extends 'async' - ? LegacySyncImporter | LegacyAsyncImporter - : LegacySyncImporter; diff --git a/web/static/node_modules/sass/types/legacy/options.d.ts b/web/static/node_modules/sass/types/legacy/options.d.ts deleted file mode 100644 index 922fd5df..00000000 --- a/web/static/node_modules/sass/types/legacy/options.d.ts +++ /dev/null @@ -1,700 +0,0 @@ -import {DeprecationOrId, Version} from '../deprecations'; -import {Logger} from '../logger'; -import {LegacyImporter} from './importer'; -import {LegacyFunction} from './function'; -import {NodePackageImporter} from '../importer'; - -/** - * Options for {@link render} and {@link renderSync} that are shared between - * {@link LegacyFileOptions} and {@link LegacyStringOptions}. - * - * @typeParam sync - This lets the TypeScript checker verify that {@link - * LegacyAsyncImporter}s and {@link LegacyAsyncFunction}s aren't passed to - * {@link renderSync}. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link Options} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export interface LegacySharedOptions { - /** - * This array of strings option provides [load - * paths](https://sass-lang.com/documentation/at-rules/import#load-paths) for - * Sass to look for stylesheets. Earlier load paths will take precedence over - * later ones. - * - * ```js - * sass.renderSync({ - * file: "style.scss", - * includePaths: ["node_modules/bootstrap/dist/css"] - * }); - * ``` - * - * Load paths are also loaded from the `SASS_PATH` environment variable, if - * it’s set. This variable should be a list of paths separated by `;` (on - * Windows) or `:` (on other operating systems). Load paths from the - * `includePaths` option take precedence over load paths from `SASS_PATH`. - * - * ```sh - * $ SASS_PATH=node_modules/bootstrap/dist/css sass style.scss style.css - * ``` - * - * @category Input - * @compatibility feature: "SASS_PATH", dart: "1.15.0", node: "3.9.0" - * - * Earlier versions of Dart Sass and Node Sass didn’t support the `SASS_PATH` - * environment variable. - */ - includePaths?: string[]; - - /** - * Whether the generated CSS should use spaces or tabs for indentation. - * - * ```js - * const result = sass.renderSync({ - * file: "style.scss", - * indentType: "tab", - * indentWidth: 1 - * }); - * - * result.css.toString(); - * // "h1 {\n\tfont-size: 40px;\n}\n" - * ``` - * - * @defaultValue `'space'` - * @category Output - * @compatibility dart: true, node: "3.0.0" - */ - indentType?: 'space' | 'tab'; - - /** - * How many spaces or tabs (depending on {@link indentType}) should be used - * per indentation level in the generated CSS. It must be between 0 and 10 - * (inclusive). - * - * @defaultValue `2` - * @category Output - * @compatibility dart: true, node: "3.0.0" - */ - indentWidth?: number; - - /** - * Which character sequence to use at the end of each line in the generated - * CSS. It can have the following values: - * - * * `'lf'` uses U+000A LINE FEED. - * * `'lfcr'` uses U+000A LINE FEED followed by U+000D CARRIAGE RETURN. - * * `'cr'` uses U+000D CARRIAGE RETURN. - * * `'crlf'` uses U+000D CARRIAGE RETURN followed by U+000A LINE FEED. - * - * @defaultValue `'lf'` - * @category Output - * @compatibility dart: true, node: "3.0.0" - */ - linefeed?: 'cr' | 'crlf' | 'lf' | 'lfcr'; - - /** - * If `true`, Sass won't add a link from the generated CSS to the source map. - * - * ```js - * const result = sass.renderSync({ - * file: "style.scss", - * sourceMap: "out.map", - * omitSourceMapUrl: true - * }) - * console.log(result.css.toString()); - * // h1 { - * // font-size: 40px; - * // } - * ``` - * - * @defaultValue `false` - * @category Source Maps - */ - omitSourceMapUrl?: boolean; - - /** - * The location that Sass expects the generated CSS to be saved to. It’s used - * to determine the URL used to link from the generated CSS to the source map, - * and from the source map to the Sass source files. - * - * **Heads up!** Despite the name, Sass does *not* write the CSS output to - * this file. The caller must do that themselves. - * - * ```js - * result = sass.renderSync({ - * file: "style.scss", - * sourceMap: true, - * outFile: "out.css" - * }) - * console.log(result.css.toString()); - * // h1 { - * // font-size: 40px; - * // } - * // /*# sourceMappingURL=out.css.map * / - * ``` - * - * @category Source Maps - */ - outFile?: string; - - /** - * The output style of the compiled CSS. There are four possible output styles: - * - * * `"expanded"` (the default for Dart Sass) writes each selector and - * declaration on its own line. - * - * * `"compressed"` removes as many extra characters as possible, and writes - * the entire stylesheet on a single line. - * - * * `"nested"` (the default for Node Sass, not supported by Dart Sass) - * indents CSS rules to match the nesting of the Sass source. - * - * * `"compact"` (not supported by Dart Sass) puts each CSS rule on its own single line. - * - * @example - * - * ```js - * const source = ` - * h1 { - * font-size: 40px; - * code { - * font-face: Roboto Mono; - * } - * }`; - * - * let result = sass.renderSync({ - * data: source, - * outputStyle: "expanded" - * }); - * console.log(result.css.toString()); - * // h1 { - * // font-size: 40px; - * // } - * // h1 code { - * // font-face: Roboto Mono; - * // } - * - * result = sass.renderSync({ - * data: source, - * outputStyle: "compressed" - * }); - * console.log(result.css.toString()); - * // h1{font-size:40px}h1 code{font-face:Roboto Mono} - * - * result = sass.renderSync({ - * data: source, - * outputStyle: "nested" - * }); - * console.log(result.css.toString()); - * // h1 { - * // font-size: 40px; } - * // h1 code { - * // font-face: Roboto Mono; } - * - * result = sass.renderSync({ - * data: source, - * outputStyle: "compact" - * }); - * console.log(result.css.toString()); - * // h1 { font-size: 40px; } - * // h1 code { font-face: Roboto Mono; } - * ``` - * - * @category Output - */ - outputStyle?: 'compressed' | 'expanded' | 'nested' | 'compact'; - - /** - * Whether or not Sass should generate a source map. If it does, the source - * map will be available as {@link LegacyResult.map} (unless {@link - * sourceMapEmbed} is `true`). - * - * If this option is a string, it’s the path that the source map is expected - * to be written to, which is used to link to the source map from the - * generated CSS and to link *from* the source map to the Sass source files. - * Note that if `sourceMap` is a string and {@link outFile} isn’t passed, Sass - * assumes that the CSS will be written to the same directory as the file - * option if it’s passed. - * - * If this option is `true`, the path is assumed to be {@link outFile} with - * `.map` added to the end. If it’s `true` and {@link outFile} isn’t passed, - * it has no effect. - * - * @example - * - * ```js - * let result = sass.renderSync({ - * file: "style.scss", - * sourceMap: "out.map" - * }) - * console.log(result.css.toString()); - * // h1 { - * // font-size: 40px; - * // } - * // /*# sourceMappingURL=out.map * / - * - * result = sass.renderSync({ - * file: "style.scss", - * sourceMap: true, - * outFile: "out.css" - * }) - * console.log(result.css.toString()); - * // h1 { - * // font-size: 40px; - * // } - * // /*# sourceMappingURL=out.css.map * / - * ``` - * - * @defaultValue `false` - * @category Source Maps - */ - sourceMap?: boolean | string; - - /** - * Whether to embed the entire contents of the Sass files that contributed to - * the generated CSS in the source map. This may produce very large source - * maps, but it guarantees that the source will be available on any computer - * no matter how the CSS is served. - * - * @example - * - * ```js - * sass.renderSync({ - * file: "style.scss", - * sourceMap: "out.map", - * sourceMapContents: true - * }) - * ``` - * - * @defaultValue `false` - * @category Source Maps - */ - sourceMapContents?: boolean; - - /** - * Whether to embed the contents of the source map file in the generated CSS, - * rather than creating a separate file and linking to it from the CSS. - * - * @example - * - * ```js - * sass.renderSync({ - * file: "style.scss", - * sourceMap: "out.map", - * sourceMapEmbed: true - * }); - * ``` - * - * @defaultValue `false` - * @category Source Maps - */ - sourceMapEmbed?: boolean; - - /** - * If this is passed, it's prepended to all the links from the source map to - * the Sass source files. - * - * @category Source Maps - */ - sourceMapRoot?: string; - - /** - * Additional handler(s) for loading files when a [`@use` - * rule](https://sass-lang.com/documentation/at-rules/use) or an [`@import` - * rule](https://sass-lang.com/documentation/at-rules/import) is encountered. - * It can either be a single {@link LegacyImporter} function, or an array of - * {@link LegacyImporter}s. - * - * Importers take the URL of the `@import` or `@use` rule and return a {@link - * LegacyImporterResult} indicating how to handle that rule. For more details, - * see {@link LegacySyncImporter} and {@link LegacyAsyncImporter}. - * - * Loads are resolved by trying, in order: - * - * * Loading a file from disk relative to the file in which the `@use` or - * `@import` appeared. - * - * * Each custom importer. - * - * * Loading a file relative to the current working directory. - * - * * Each load path in {@link includePaths}. - * - * * Each load path specified in the `SASS_PATH` environment variable, which - * should be semicolon-separated on Windows and colon-separated elsewhere. - * - * @example - * - * ```js - * sass.render({ - * file: "style.scss", - * importer: [ - * // This importer uses the synchronous API, and can be passed to either - * // renderSync() or render(). - * function(url, prev) { - * // This generates a stylesheet from scratch for `@use "big-headers"`. - * if (url != "big-headers") return null; - * - * return { - * contents: ` - * h1 { - * font-size: 40px; - * }` - * }; - * }, - * - * // This importer uses the asynchronous API, and can only be passed to - * // render(). - * function(url, prev, done) { - * // Convert `@use "foo/bar"` to "node_modules/foo/sass/bar". - * const components = url.split('/'); - * const innerPath = components.slice(1).join('/'); - * done({ - * file: `node_modules/${components.first}/sass/${innerPath}` - * }); - * } - * ] - * }, function(err, result) { - * // ... - * }); - * ``` - * - * @category Plugins - * @compatibility dart: true, node: "3.0.0" - * - * Versions of Node Sass before 3.0.0 don’t support arrays of importers, nor - * do they support importers that return `Error` objects. - * - * Versions of Node Sass before 2.0.0 don’t support the `importer` option at - * all. - * - * @compatibility feature: "Import order", dart: "1.20.2", node: false - * - * Versions of Dart Sass before 1.20.2 preferred resolving imports using - * {@link includePaths} before resolving them using custom importers. - * - * All versions of Node Sass currently pass imports to importers before - * loading them relative to the file in which the `@import` appears. This - * behavior is considered incorrect and should not be relied on because it - * violates the principle of *locality*, which says that it should be possible - * to reason about a stylesheet without knowing everything about how the - * entire system is set up. If a user tries to import a stylesheet relative to - * another stylesheet, that import should *always* work. It shouldn’t be - * possible for some configuration somewhere else to break it. - */ - importer?: LegacyImporter | LegacyImporter[]; - - /** - * Additional built-in Sass functions that are available in all stylesheets. - * This option takes an object whose keys are Sass function signatures and - * whose values are {@link LegacyFunction}s. Each function should take the - * same arguments as its signature. - * - * Functions are passed subclasses of {@link LegacyValue}, and must return the - * same. - * - * **Heads up!** When writing custom functions, it’s important to ensure that - * all the arguments are the types you expect. Otherwise, users’ stylesheets - * could crash in hard-to-debug ways or, worse, compile to meaningless CSS. - * - * @example - * - * ```js - * sass.render({ - * data: ` - * h1 { - * font-size: pow(2, 5) * 1px; - * }`, - * functions: { - * // This function uses the synchronous API, and can be passed to either - * // renderSync() or render(). - * 'pow($base, $exponent)': function(base, exponent) { - * if (!(base instanceof sass.types.Number)) { - * throw "$base: Expected a number."; - * } else if (base.getUnit()) { - * throw "$base: Expected a unitless number."; - * } - * - * if (!(exponent instanceof sass.types.Number)) { - * throw "$exponent: Expected a number."; - * } else if (exponent.getUnit()) { - * throw "$exponent: Expected a unitless number."; - * } - * - * return new sass.types.Number( - * Math.pow(base.getValue(), exponent.getValue())); - * }, - * - * // This function uses the asynchronous API, and can only be passed to - * // render(). - * 'sqrt($number)': function(number, done) { - * if (!(number instanceof sass.types.Number)) { - * throw "$number: Expected a number."; - * } else if (number.getUnit()) { - * throw "$number: Expected a unitless number."; - * } - * - * done(new sass.types.Number(Math.sqrt(number.getValue()))); - * } - * } - * }, function(err, result) { - * console.log(result.css.toString()); - * // h1 { - * // font-size: 32px; - * // } - * }); - * ``` - * - * @category Plugins - */ - functions?: {[key: string]: LegacyFunction}; - - /** - * By default, if the CSS document contains non-ASCII characters, Sass adds a - * `@charset` declaration (in expanded output mode) or a byte-order mark (in - * compressed mode) to indicate its encoding to browsers or other consumers. - * If `charset` is `false`, these annotations are omitted. - * - * @category Output - * @compatibility dart: "1.39.0", node: false - */ - charset?: boolean; - - /** - * If this option is set to `true`, Sass won’t print warnings that are caused - * by dependencies. A “dependency” is defined as any file that’s loaded - * through {@link includePaths} or {@link importer}. Stylesheets that are - * imported relative to the entrypoint are not considered dependencies. - * - * This is useful for silencing deprecation warnings that you can’t fix on - * your own. However, please also notify your dependencies of the deprecations - * so that they can get fixed as soon as possible! - * - * **Heads up!** If {@link render} or {@link renderSync} is called without - * {@link LegacyFileOptions.file} or {@link LegacyStringOptions.file}, - * all stylesheets it loads will be considered dependencies. Since it - * doesn’t have a path of its own, everything it loads is coming from a load - * path rather than a relative import. - * - * @defaultValue `false` - * @category Messages - * @compatibility dart: "1.35.0", node: false - */ - quietDeps?: boolean; - - /** - * A set of deprecations to treat as fatal. - * - * If a deprecation warning of any provided type is encountered during - * compilation, the compiler will error instead. - * - * If a `Version` is provided, then all deprecations that were active in that - * compiler version will be treated as fatal. - * - * @category Messages - * @compatiblity dart: "1.78.0", node: false - */ - fatalDeprecations?: (DeprecationOrId | Version)[]; - - /** - * A set of future deprecations to opt into early. - * - * Future deprecations passed here will be treated as active by the compiler, - * emitting warnings as necessary. - * - * @category Messages - * @compatiblity dart: "1.78.0", node: false - */ - futureDeprecations?: DeprecationOrId[]; - - /** - * A set of active deprecations to ignore. - * - * If a deprecation warning of any provided type is encountered during - * compilation, the compiler will ignore it instead. - * - * **Heads up!** The deprecated functionality you're depending on will - * eventually break. - * - * @category Messages - * @compatiblity dart: "1.78.0", node: false - */ - silenceDeprecations?: DeprecationOrId[]; - - /** - * By default, Dart Sass will print only five instances of the same - * deprecation warning per compilation to avoid deluging users in console - * noise. If you set `verbose` to `true`, it will instead print every - * deprecation warning it encounters. - * - * @defaultValue `false` - * @category Messages - * @compatibility dart: "1.35.0", node: false - */ - verbose?: boolean; - - /** - * An object to use to handle warnings and/or debug messages from Sass. - * - * By default, Sass emits warnings and debug messages to standard error, but - * if {@link Logger.warn} or {@link Logger.debug} is set, this will invoke - * them instead. - * - * The special value {@link Logger.silent} can be used to easily silence all - * messages. - * - * @category Messages - * @compatibility dart: "1.43.0", node: false - */ - logger?: Logger; - - /** - * If this option is set to an instance of `NodePackageImporter`, Sass will - * use the built-in Node.js package importer to resolve Sass files with a - * `pkg:` URL scheme. Details for library authors and users can be found in - * the {@link NodePackageImporter} documentation. - * - * @example - * ```js - * sass.renderSync({ - * data: '@use "pkg:vuetify";', - * pkgImporter: new sass.NodePackageImporter() - * }); - * ``` - * @category Plugins - * @compatibility dart: "2.0", node: false - */ - pkgImporter?: NodePackageImporter; -} - -/** - * If {@link file} is passed without {@link data}, Sass will load the stylesheet - * at {@link file} and compile it to CSS. - * - * @typeParam sync - This lets the TypeScript checker verify that {@link - * LegacyAsyncImporter}s and {@link LegacyAsyncFunction}s aren't passed to - * {@link renderSync}. - */ -export interface LegacyFileOptions - extends LegacySharedOptions { - /** - * The path to the file for Sass to load and compile. If the file’s extension - * is `.scss`, it will be parsed as SCSS; if it’s `.sass`, it will be parsed - * as the indented syntax; and if it’s `.css`, it will be parsed as plain CSS. - * If it has no extension, it will be parsed as SCSS. - * - * @example - * - * ```js - * sass.renderSync({file: "style.scss"}); - * ``` - * - * @category Input - * @compatibility feature: "Plain CSS files", dart: "1.11.0", node: "partial" - * - * Node Sass and older versions of Dart Sass support loading files with the - * extension `.css`, but contrary to the specification they’re treated as SCSS - * files rather than being parsed as CSS. This behavior has been deprecated - * and should not be relied on. Any files that use Sass features should use - * the `.scss` extension. - * - * All versions of Node Sass and Dart Sass otherwise support the file option - * as described below. - */ - file: string; - - /** - * See {@link LegacyStringOptions.file} for documentation of passing {@link - * file} along with {@link data}. - * - * @category Input - */ - data?: never; -} - -/** - * If {@link data} is passed, Sass will use it as the contents of the stylesheet - * to compile. - * - * @typeParam sync - This lets the TypeScript checker verify that {@link - * LegacyAsyncImporter}s and {@link LegacyAsyncFunction}s aren't passed to - * {@link renderSync}. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link StringOptions} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export interface LegacyStringOptions - extends LegacySharedOptions { - /** - * The contents of the stylesheet to compile. Unless {@link file} is passed as - * well, the stylesheet’s URL is set to `"stdin"`. - * - * By default, this stylesheet is parsed as SCSS. This can be controlled using - * {@link indentedSyntax}. - * - * @example - * - * ```js - * sass.renderSync({ - * data: ` - * h1 { - * font-size: 40px; - * }` - * }); - * ``` - * - * @category Input - */ - data: string; - - /** - * If `file` and {@link data} are both passed, `file` is used as the path of - * the stylesheet for error reporting, but {@link data} is used as the - * contents of the stylesheet. In this case, `file`’s extension is not used to - * determine the syntax of the stylesheet. - * - * @category Input - */ - file?: string; - - /** - * This flag controls whether {@link data} is parsed as the indented syntax or - * not. - * - * @example - * - * ```js - * sass.renderSync({ - * data: ` - * h1 - * font-size: 40px`, - * indentedSyntax: true - * }); - * ``` - * - * @defaultValue `false` - * @category Input - */ - indentedSyntax?: boolean; -} - -/** - * Options for {@link render} and {@link renderSync}. This can either be {@link - * LegacyFileOptions} to load a file from disk, or {@link LegacyStringOptions} - * to compile a string of Sass code. - * - * See {@link LegacySharedOptions} for options that are shared across both file - * and string inputs. - * - * @category Legacy - * @deprecated This only works with the legacy {@link render} and {@link - * renderSync} APIs. Use {@link Options} with {@link compile}, {@link - * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. - */ -export type LegacyOptions = - | LegacyFileOptions - | LegacyStringOptions; diff --git a/web/static/node_modules/sass/types/legacy/plugin_this.d.ts b/web/static/node_modules/sass/types/legacy/plugin_this.d.ts deleted file mode 100644 index 8ccffa76..00000000 --- a/web/static/node_modules/sass/types/legacy/plugin_this.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * The value of `this` in the context of a {@link LegacyImporter} or {@link - * LegacyFunction} callback. - * - * @category Legacy - * @deprecated This is only used by the legacy {@link render} and {@link - * renderSync} APIs. Use {@link compile}, {@link compileString}, {@link - * compileAsync}, and {@link compileStringAsync} instead. - */ -export interface LegacyPluginThis { - /** - * A partial representation of the options passed to {@link render} or {@link - * renderSync}. - */ - options: { - /** The same {@link LegacyPluginThis} instance that contains this object. */ - context: LegacyPluginThis; - - /** - * The value passed to {@link LegacyFileOptions.file} or {@link - * LegacyStringOptions.file}. - */ - file?: string; - - /** The value passed to {@link LegacyStringOptions.data}. */ - data?: string; - - /** - * The value passed to {@link LegacySharedOptions.includePaths} separated by - * `";"` on Windows or `":"` on other operating systems. This always - * includes the current working directory as the first entry. - */ - includePaths: string; - - /** Always the number 10. */ - precision: 10; - - /** Always the number 1. */ - style: 1; - - /** 1 if {@link LegacySharedOptions.indentType} was `"tab"`, 0 otherwise. */ - indentType: 1 | 0; - - /** - * The value passed to {@link LegacySharedOptions.indentWidth}, or `2` - * otherwise. - */ - indentWidth: number; - - /** - * The value passed to {@link LegacySharedOptions.linefeed}, or `"\n"` - * otherwise. - */ - linefeed: '\r' | '\r\n' | '\n' | '\n\r'; - - /** A partially-constructed {@link LegacyResult} object. */ - result: { - /** Partial information about the compilation in progress. */ - stats: { - /** - * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and - * the time at which Sass compilation began. - */ - start: number; - - /** - * {@link LegacyFileOptions.file} if it was passed, otherwise the string - * `"data"`. - */ - entry: string; - }; - }; - }; -} diff --git a/web/static/node_modules/sass/types/legacy/render.d.ts b/web/static/node_modules/sass/types/legacy/render.d.ts deleted file mode 100644 index 9f78816f..00000000 --- a/web/static/node_modules/sass/types/legacy/render.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -import {LegacyException} from './exception'; -import {LegacyOptions} from './options'; - -/** - * The object returned by {@link render} and {@link renderSync} after a - * successful compilation. - * - * @category Legacy - * @deprecated This is only used by the legacy {@link render} and {@link - * renderSync} APIs. Use {@link compile}, {@link compileString}, {@link - * compileAsync}, and {@link compileStringAsync} instead. - */ -export interface LegacyResult { - /** - * The compiled CSS. This can be converted to a string by calling - * [Buffer.toString](https://nodejs.org/api/buffer.html#buffer_buf_tostring_encoding_start_end). - * - * @example - * - * ```js - * const result = sass.renderSync({file: "style.scss"}); - * - * console.log(result.css.toString()); - * ``` - */ - css: Buffer; - - /** - * The source map that maps the compiled CSS to the source files from which it - * was generated. This can be converted to a string by calling - * [Buffer.toString](https://nodejs.org/api/buffer.html#buffer_buf_tostring_encoding_start_end). - * - * This is `undefined` unless either - * - * * {@link LegacySharedOptions.sourceMap} is a string; or - * * {@link LegacySharedOptions.sourceMap} is `true` and - * {@link LegacySharedOptions.outFile} is set. - * - * The source map uses absolute [`file:` - * URLs](https://en.wikipedia.org/wiki/File_URI_scheme) to link to the Sass - * source files, except if the source file comes from {@link - * LegacyStringOptions.data} in which case it lists its URL as `"stdin"`. - * - * @example - * - * ```js - * const result = sass.renderSync({ - * file: "style.scss", - * sourceMap: true, - * outFile: "style.css" - * }) - * - * console.log(result.map.toString()); - * ``` - */ - map?: Buffer; - - /** Additional information about the compilation. */ - stats: { - /** - * The absolute path of {@link LegacyFileOptions.file} or {@link - * LegacyStringOptions.file}, or `"data"` if {@link - * LegacyStringOptions.file} wasn't set. - */ - entry: string; - - /** - * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and the - * time at which Sass compilation began. - */ - start: number; - - /** - * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and the - * time at which Sass compilation ended. - */ - end: number; - - /** - * The number of milliseconds it took to compile the Sass file. This is - * always equal to `start` minus `end`. - */ - duration: number; - - /** - * An array of the absolute paths of all Sass files loaded during - * compilation. If a stylesheet was loaded from a {@link LegacyImporter} - * that returned the stylesheet’s contents, the raw string of the `@use` or - * `@import` that loaded that stylesheet included in this array. - */ - includedFiles: string[]; - }; -} - -/** - * This function synchronously compiles a Sass file to CSS. If it succeeds, it - * returns the result, and if it fails it throws an error. - * - * **Heads up!** When using the `sass-embedded` npm package, **{@link render} - * is almost always faster than {@link renderSync}**, due to the overhead of - * emulating synchronous messaging with worker threads and concurrent - * compilations being blocked on main thread. - * - * @example - * - * ```js - * const sass = require('sass'); // or require('node-sass'); - * - * const result = sass.renderSync({file: "style.scss"}); - * // ... - * ``` - * - * @category Legacy - * @deprecated Use {@link compile} or {@link compileString} instead. - */ -export function renderSync(options: LegacyOptions<'sync'>): LegacyResult; - -/** - - * This function asynchronously compiles a Sass file to CSS, and calls - * `callback` with a {@link LegacyResult} if compilation succeeds or {@link - * LegacyException} if it fails. - * - * **Heads up!** When using the `sass` npm package, **{@link renderSync} is - * almost twice as fast as {@link render}** by default, due to the overhead of - * making the entire evaluation process asynchronous. - * - * ```js - * const sass = require('sass'); // or require('node-sass'); - * - * sass.render({ - * file: "style.scss" - * }, function(err, result) { - * // ... - * }); - * ``` - * - * @category Legacy - * @deprecated Use {@link compileAsync} or {@link compileStringAsync} instead. - */ -export function render( - options: LegacyOptions<'async'>, - callback: (exception?: LegacyException, result?: LegacyResult) => void -): void; diff --git a/web/static/node_modules/sass/types/logger/index.d.ts b/web/static/node_modules/sass/types/logger/index.d.ts deleted file mode 100644 index 84ee9c2b..00000000 --- a/web/static/node_modules/sass/types/logger/index.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -import {Deprecation} from '../deprecations'; -import {SourceSpan} from './source_span'; - -export {SourceLocation} from './source_location'; -export {SourceSpan} from './source_span'; - -/** - * The options passed to {@link Logger.warn}. - * - * * `deprecation`: Whether this is a deprecation warning. - * - * * `deprecationType`: The type of deprecation. Only set if `deprecation` is - * true. - * - * * `span`: The location in the Sass source code that generated this warning. - * This may be unset if the warning didn't come from Sass source, for - * example if it's from a deprecated JavaScript option. - * - * * `stack`: The Sass stack trace at the point the warning was issued. This may - * be unset if the warning didn't come from Sass source, for example if it's - * from a deprecated JavaScript option. - * - * @category Logger - */ -export type LoggerWarnOptions = ( - | { - deprecation: true; - deprecationType: Deprecation; - } - | {deprecation: false} -) & { - span?: SourceSpan; - stack?: string; -}; - -/** - * An object that can be passed to {@link LegacySharedOptions.logger} to control - * how Sass emits warnings and debug messages. - * - * @example - * - * ```js - * const fs = require('fs'); - * const sass = require('sass'); - * - * let log = ""; - * sass.renderSync({ - * file: 'input.scss', - * logger: { - * warn(message, options) { - * if (options.span) { - * log += `${span.url}:${span.start.line}:${span.start.column}: ` + - * `${message}\n`; - * } else { - * log += `::: ${message}\n`; - * } - * } - * } - * }); - * - * fs.writeFileSync('log.txt', log); - * ``` - * - * @category Logger - */ -export interface Logger { - /** - * This method is called when Sass emits a warning, whether due to a [`@warn` - * rule](https://sass-lang.com/documentation/at-rules/warn) or a warning - * generated by the Sass compiler. - * - * If this is `undefined`, Sass will print warnings to standard error. - * - * `options` may contain the following fields: - * - * @param message - The warning message. - */ - warn?(message: string, options: LoggerWarnOptions): void; - - /** - * This method is called when Sass emits a debug message due to a [`@debug` - * rule](https://sass-lang.com/documentation/at-rules/debug). - * - * If this is `undefined`, Sass will print debug messages to standard error. - * - * @param message - The debug message. - * @param options.span - The location in the Sass source code that generated this - * debug message. - */ - debug?(message: string, options: {span: SourceSpan}): void; -} - -/** - * A namespace for built-in {@link Logger}s. - * - * @category Logger - * @compatibility dart: "1.43.0", node: false - */ -export namespace Logger { - /** - * A {@link Logger} that silently ignores all warnings and debug messages. - * - * @example - * - * ```js - * const sass = require('sass'); - * - * const result = sass.renderSync({ - * file: 'input.scss', - * logger: sass.Logger.silent, - * }); - * ``` - */ - export const silent: Logger; -} diff --git a/web/static/node_modules/sass/types/logger/source_location.d.ts b/web/static/node_modules/sass/types/logger/source_location.d.ts deleted file mode 100644 index 71927148..00000000 --- a/web/static/node_modules/sass/types/logger/source_location.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A specific location within a source file. - * - * This is always associated with a {@link SourceSpan} which indicates *which* - * file it refers to. - * - * @category Logger - */ -export interface SourceLocation { - /** - * The 0-based index of this location within its source file, in terms of - * UTF-16 code units. - */ - offset: number; - - /** The 0-based line number of this location. */ - line: number; - - /** The 0-based column number of this location. */ - column: number; -} diff --git a/web/static/node_modules/sass/types/logger/source_span.d.ts b/web/static/node_modules/sass/types/logger/source_span.d.ts deleted file mode 100644 index 88eb47f3..00000000 --- a/web/static/node_modules/sass/types/logger/source_span.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import {SourceLocation} from './source_location'; - -/** - * A span of text within a source file. - * - * @category Logger - */ -export interface SourceSpan { - /** The beginning of this span, inclusive. */ - start: SourceLocation; - - /** - * The end of this span, exclusive. - * - * If {@link start} and {@link end} refer to the same location, the span has - * zero length and refers to the point immediately after {@link start} and - * before the next character. - */ - end: SourceLocation; - - /** The canonical URL of the file this span refers to. */ - url?: URL; - - /** The text covered by the span. */ - text: string; - - /** - * Text surrounding the span. - * - * If this is set, it must include only whole lines, and it must include at - * least all line(s) which are partially covered by this span. - */ - context?: string; -} diff --git a/web/static/node_modules/sass/types/options.d.ts b/web/static/node_modules/sass/types/options.d.ts deleted file mode 100644 index 124bdb9a..00000000 --- a/web/static/node_modules/sass/types/options.d.ts +++ /dev/null @@ -1,455 +0,0 @@ -import {DeprecationOrId, Version} from './deprecations'; -import {FileImporter, Importer, NodePackageImporter} from './importer'; -import {Logger} from './logger'; -import {Value} from './value'; -import {PromiseOr} from './util/promise_or'; - -/** - * Syntaxes supported by Sass: - * - * - `'scss'` is the [SCSS - * syntax](https://sass-lang.com/documentation/syntax#scss). - * - `'indented'` is the [indented - * syntax](https://sass-lang.com/documentation/syntax#the-indented-syntax) - * - `'css'` is plain CSS, which is parsed like SCSS but forbids the use of any - * special Sass features. - * - * @category Options - */ -export type Syntax = 'scss' | 'indented' | 'css'; - -/** - * Possible output styles for the compiled CSS: - * - * - `"expanded"` (the default for Dart Sass) writes each selector and - * declaration on its own line. - * - * - `"compressed"` removes as many extra characters as possible, and writes - * the entire stylesheet on a single line. - * - * @category Options - */ -export type OutputStyle = 'expanded' | 'compressed'; - -/** - * A callback that implements a custom Sass function. This can be passed to - * {@link Options.functions}. - * - * ```js - * const result = sass.compile('style.scss', { - * functions: { - * "sum($arg1, $arg2)": (args) => { - * const arg1 = args[0].assertNumber('arg1'); - * const value1 = arg1.value; - * const value2 = args[1].assertNumber('arg2') - * .convertValueToMatch(arg1, 'arg2', 'arg1'); - * return new sass.SassNumber(value1 + value2).coerceToMatch(arg1); - * } - * } - * }); - * ``` - * - * @typeParam sync - A `CustomFunction<'sync'>` must return synchronously, but - * in return it can be passed to {@link compile} and {@link compileString} in - * addition to {@link compileAsync} and {@link compileStringAsync}. - * - * A `CustomFunction<'async'>` may either return synchronously or - * asynchronously, but it can only be used with {@link compileAsync} and {@link - * compileStringAsync}. - * - * @param args - An array of arguments passed by the function's caller. If the - * function takes [arbitrary - * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments), - * the last element will be a {@link SassArgumentList}. - * - * @returns The function's result. This may be in the form of a `Promise`, but - * if it is the function may only be passed to {@link compileAsync} and {@link - * compileStringAsync}, not {@link compile} or {@link compileString}. - * - * @throws any - This function may throw an error, which the Sass compiler will - * treat as the function call failing. If the exception object has a `message` - * property, it will be used as the wrapped exception's message; otherwise, the - * exception object's `toString()` will be used. This means it's safe for custom - * functions to throw plain strings. - * - * @category Custom Function - */ -export type CustomFunction = ( - args: Value[] -) => PromiseOr; - -/** - * Options that can be passed to {@link compile}, {@link compileAsync}, {@link - * compileString}, or {@link compileStringAsync}. - * - * @typeParam sync - This lets the TypeScript checker verify that asynchronous - * {@link Importer}s, {@link FileImporter}s, and {@link CustomFunction}s aren't - * passed to {@link compile} or {@link compileString}. - * - * @category Options - */ -export interface Options { - /** - * If this is `true`, the compiler will exclusively use ASCII characters in - * its error and warning messages. Otherwise, it may use non-ASCII Unicode - * characters as well. - * - * @defaultValue `false` - * @category Messages - */ - alertAscii?: boolean; - - /** - * If this is `true`, the compiler will use ANSI color escape codes in its - * error and warning messages. If it's `false`, it won't use these. If it's - * undefined, the compiler will determine whether or not to use colors - * depending on whether the user is using an interactive terminal. - * - * @category Messages - */ - alertColor?: boolean; - - /** - * If `true`, the compiler may prepend `@charset "UTF-8";` or U+FEFF - * (byte-order marker) if it outputs non-ASCII CSS. - * - * If `false`, the compiler never emits these byte sequences. This is ideal - * when concatenating or embedding in HTML `